aired 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +145 -0
  2. package/SKILL.md +172 -0
  3. package/dist/cli.cjs +84 -0
  4. package/package.json +52 -0
package/README.md ADDED
@@ -0,0 +1,145 @@
1
+ # aired
2
+
3
+ ```
4
+ █████╗ ██╗██████╗ ███████╗██████╗
5
+ ██╔══██╗██║██╔══██╗██╔════╝██╔══██╗
6
+ ███████║██║██████╔╝█████╗ ██║ ██║
7
+ ██╔══██║██║██╔══██╗██╔══╝ ██║ ██║
8
+ ██║ ██║██║██║ ██║███████╗██████╔╝
9
+ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚══════╝╚═════╝
10
+ ```
11
+
12
+ **Publish HTML artifacts to shareable URLs instantly.**
13
+
14
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](../../LICENSE)
15
+
16
+ ---
17
+
18
+ ## Why
19
+
20
+ AI tools generate beautiful HTML — dashboards, visualizations, reports — but sharing them is broken. You either email raw `.html` files or wrestle with GitHub Pages. Aired gives you `npx aired file.html` → live URL in 2 seconds.
21
+
22
+ ---
23
+
24
+ ## Install
25
+
26
+ **Instant (no install):**
27
+ ```bash
28
+ npx aired file.html
29
+ ```
30
+
31
+ **Global install:**
32
+ ```bash
33
+ npm install -g aired
34
+ aired --version
35
+ ```
36
+
37
+ > Requires Node.js >= 20
38
+
39
+ ---
40
+
41
+ ## Quick Start
42
+
43
+ ```bash
44
+ # 1. Publish an HTML file
45
+ aired dashboard.html
46
+
47
+ # 2. See it live
48
+ # → https://aired.sh/p/abc123
49
+
50
+ # 3. Update the same URL
51
+ aired update abc123 dashboard-v2.html
52
+ ```
53
+
54
+ ---
55
+
56
+ ## Commands
57
+
58
+ ### Publishing
59
+
60
+ | Command | Description |
61
+ |---------|-------------|
62
+ | `publish [file]` | Publish an HTML file (or pipe via stdin) |
63
+ | `update <id> <file>` | Update an existing page using the stored token |
64
+ | `delete <id>` | Delete a page using the stored token |
65
+ | `info <id>` | Show page metadata (title, size, reads, expiry) |
66
+
67
+ ### Management
68
+
69
+ | Command | Description |
70
+ |---------|-------------|
71
+ | `tokens` | List stored tokens |
72
+ | `tokens prune` | Remove tokens for pages that no longer exist |
73
+ | `doctor` | Run diagnostic checks |
74
+
75
+ ### Publish Options
76
+
77
+ | Flag | Description |
78
+ |------|-------------|
79
+ | `-t, --title <title>` | Custom title |
80
+ | `-p, --pin <pin>` | PIN-protect the page |
81
+ | `--ttl <duration>` | Expiry: `1h`, `24h`, `7d`, `30d` |
82
+ | `--permanent` | No expiry |
83
+ | `--reads <n>` | Max read count before page is gone |
84
+
85
+ ---
86
+
87
+ ## Output Modes
88
+
89
+ | Flag | Output |
90
+ |------|--------|
91
+ | *(default)* | Human-readable, colored terminal output |
92
+ | `--json` | Machine-readable JSON |
93
+ | `--quiet` | Suppress stderr, JSON only |
94
+ | `--verbose` | Extended detail |
95
+
96
+ When stdout is piped, JSON output is automatic — no flag needed.
97
+
98
+ ```bash
99
+ aired file.html --json
100
+ aired file.html | jq .url
101
+ echo "<h1>Hi</h1>" | aired --json
102
+ ```
103
+
104
+ ---
105
+
106
+ ## Configuration
107
+
108
+ | Source | Priority |
109
+ |--------|----------|
110
+ | `--api-url <url>` flag | Highest |
111
+ | `AIRED_API_URL` env var | Medium |
112
+ | Default (`https://aired.sh`) | Lowest |
113
+
114
+ Token store: `~/.config/aired/tokens.json` (mode `0600`).
115
+
116
+ ---
117
+
118
+ ## MCP Server
119
+
120
+ Spawn the MCP server for AI tool integration:
121
+
122
+ ```bash
123
+ aired --mcp
124
+ ```
125
+
126
+ This starts a stdio MCP server with a `publish_html` tool. Configure in your AI tool's MCP settings.
127
+
128
+ ---
129
+
130
+ ## AI Agent Integration
131
+
132
+ Every command outputs structured JSON. Exit codes are consistent:
133
+
134
+ | Code | Meaning |
135
+ |------|---------|
136
+ | 0 | Success |
137
+ | 1 | API error |
138
+ | 2 | Validation error |
139
+ | 3 | Rate limited |
140
+
141
+ ---
142
+
143
+ ## License
144
+
145
+ MIT — see [LICENSE](../../LICENSE)
package/SKILL.md ADDED
@@ -0,0 +1,172 @@
1
+ # aired — CLI for publishing HTML artifacts
2
+
3
+ Publish HTML files to shareable URLs. Works with any AI tool (Claude Code, Cursor, ChatGPT).
4
+
5
+ ## Setup
6
+
7
+ No auth required. Anonymous by default.
8
+
9
+ ```bash
10
+ # Install globally
11
+ npm install -g aired
12
+
13
+ # Or use directly
14
+ npx aired file.html
15
+ ```
16
+
17
+ Optional: set `AIRED_API_URL` env var for custom API endpoint.
18
+
19
+ ## Commands
20
+
21
+ ### publish (default)
22
+
23
+ Publish an HTML file to a shareable URL.
24
+
25
+ ```bash
26
+ aired file.html
27
+ aired file.html --json
28
+ cat file.html | aired
29
+ aired file.html --ttl 24h --pin secret123
30
+ aired file.html --permanent
31
+ ```
32
+
33
+ **Flags:** `--title`, `--pin`, `--ttl <1h|24h|7d|30d>`, `--permanent`, `--reads <n>`
34
+
35
+ **JSON output:**
36
+ ```json
37
+ {
38
+ "id": "abc123",
39
+ "url": "https://aired.sh/p/abc123",
40
+ "update_token": "at_...",
41
+ "expiresAt": "2026-04-04T12:00:00.000Z"
42
+ }
43
+ ```
44
+
45
+ ### update
46
+
47
+ Update an existing page.
48
+
49
+ ```bash
50
+ aired update <id> new-file.html
51
+ aired update <id> new-file.html --json
52
+ ```
53
+
54
+ ### delete
55
+
56
+ Delete a page.
57
+
58
+ ```bash
59
+ aired delete <id>
60
+ aired delete <id> --json
61
+ ```
62
+
63
+ ### info
64
+
65
+ Show page metadata.
66
+
67
+ ```bash
68
+ aired info <id>
69
+ aired info <id> --json
70
+ ```
71
+
72
+ **JSON output:**
73
+ ```json
74
+ {
75
+ "id": "abc123",
76
+ "title": "My Dashboard",
77
+ "size": 4096,
78
+ "readCount": 5,
79
+ "expiresAt": "2026-04-04T12:00:00.000Z"
80
+ }
81
+ ```
82
+
83
+ ### tokens
84
+
85
+ List stored tokens.
86
+
87
+ ```bash
88
+ aired tokens
89
+ aired tokens --json
90
+ aired tokens prune
91
+ ```
92
+
93
+ ### doctor
94
+
95
+ Run diagnostic checks.
96
+
97
+ ```bash
98
+ aired doctor
99
+ aired doctor --json
100
+ ```
101
+
102
+ **JSON output:**
103
+ ```json
104
+ {
105
+ "ok": true,
106
+ "checks": [
107
+ { "name": "CLI Version", "status": "pass", "message": "v0.1.0" },
108
+ { "name": "Node.js", "status": "pass", "message": "v22.19.0" },
109
+ { "name": "Token Store", "status": "pass", "message": "2 tokens at ~/.config/aired/tokens.json" },
110
+ { "name": "API", "status": "pass", "message": "https://aired.sh" }
111
+ ]
112
+ }
113
+ ```
114
+
115
+ ## Global Flags
116
+
117
+ | Flag | Effect |
118
+ |------|--------|
119
+ | `--json` | Force JSON output |
120
+ | `--quiet` | Suppress stderr, implies --json |
121
+ | `--verbose` | Extended output |
122
+ | `--api-url <url>` | Custom API endpoint |
123
+
124
+ When stdout is piped, JSON is automatic.
125
+
126
+ ## Exit Codes
127
+
128
+ | Code | Meaning |
129
+ |------|---------|
130
+ | 0 | Success |
131
+ | 1 | API error |
132
+ | 2 | Validation error |
133
+ | 3 | Rate limited |
134
+
135
+ ## MCP Server
136
+
137
+ Spawn the MCP stdio server:
138
+
139
+ ```bash
140
+ aired --mcp
141
+ ```
142
+
143
+ This starts the `@aired/mcp` package as a stdio MCP server with a `publish_html` tool.
144
+
145
+ ## Common Workflows
146
+
147
+ ### Publish and share
148
+ ```bash
149
+ aired dashboard.html
150
+ # → https://aired.sh/p/abc123
151
+ ```
152
+
153
+ ### Update same URL
154
+ ```bash
155
+ aired dashboard.html # first publish
156
+ aired update abc123 v2.html # update same URL
157
+ ```
158
+
159
+ ### Temporary with PIN
160
+ ```bash
161
+ aired report.html --ttl 24h --pin secret
162
+ ```
163
+
164
+ ### Pipe from stdin
165
+ ```bash
166
+ echo "<h1>Hello</h1>" | aired --json | jq .url
167
+ ```
168
+
169
+ ### Clean up expired tokens
170
+ ```bash
171
+ aired tokens prune
172
+ ```
package/dist/cli.cjs ADDED
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env node
2
+ // aired v0.1.0 — MIT License
3
+ "use strict";var Wh=Object.create;var Da=Object.defineProperty;var Bh=Object.getOwnPropertyDescriptor;var Jh=Object.getOwnPropertyNames;var Xh=Object.getPrototypeOf,Yh=Object.prototype.hasOwnProperty;var p=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var Zh=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Jh(e))!Yh.call(r,s)&&s!==t&&Da(r,s,{get:()=>e[s],enumerable:!(n=Bh(e,s))||n.enumerable});return r};var D=(r,e,t)=>(t=r!=null?Wh(Xh(r)):{},Zh(e||!r||!r.__esModule?Da(t,"default",{value:r,enumerable:!0}):t,r));var Qt=p(os=>{var zr=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},is=class extends zr{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};os.CommanderError=zr;os.InvalidArgumentError=is});var Kr=p(cs=>{var{InvalidArgumentError:Qh}=Qt(),as=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,n)=>{if(!this.argChoices.includes(t))throw new Qh(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function ep(r){let e=r.name()+(r.variadic===!0?"...":"");return r.required?"<"+e+">":"["+e+"]"}cs.Argument=as;cs.humanReadableArgName=ep});var ds=p(ls=>{var{humanReadableArgName:tp}=Kr(),us=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(s=>!s._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((s,i)=>s.name().localeCompare(i.name())),t}compareOptions(e,t){let n=s=>s.short?s.short.replace(/^-/,""):s.long.replace(/^--/,"");return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(s=>!s.hidden),n=e._getHelpOption();if(n&&!n.hidden){let s=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!s&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!s&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let s=n.options.filter(i=>!i.hidden);t.push(...s)}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(n=>tp(n)).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((n,s)=>Math.max(n,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(s)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((n,s)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(s)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((n,s)=>Math.max(n,this.displayWidth(t.styleOptionTerm(t.optionTerm(s)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((n,s)=>Math.max(n,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(s)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let s=e.parent;s;s=s.parent)n=s.name()+" "+n;return n+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(n=>JSON.stringify(n)).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 n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(n=>JSON.stringify(n)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,""]}groupItems(e,t,n){let s=new Map;return e.forEach(i=>{let o=n(i);s.has(o)||s.set(o,[])}),t.forEach(i=>{let o=n(i);s.has(o)||s.set(o,[]),s.get(o).push(i)}),s}formatHelp(e,t){let n=t.padWidth(e,t),s=t.helpWidth??80;function i(l,f){return t.formatItem(l,n,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),s),""]));let c=t.visibleArguments(e).map(l=>i(t.styleArgumentTerm(t.argumentTerm(l)),t.styleArgumentDescription(t.argumentDescription(l))));if(o=o.concat(this.formatItemList("Arguments:",c,t)),this.groupItems(e.options,t.visibleOptions(e),l=>l.helpGroupHeading??"Options:").forEach((l,f)=>{let h=l.map(m=>i(t.styleOptionTerm(t.optionTerm(m)),t.styleOptionDescription(t.optionDescription(m))));o=o.concat(this.formatItemList(f,h,t))}),t.showGlobalOptions){let l=t.visibleGlobalOptions(e).map(f=>i(t.styleOptionTerm(t.optionTerm(f)),t.styleOptionDescription(t.optionDescription(f))));o=o.concat(this.formatItemList("Global Options:",l,t))}return this.groupItems(e.commands,t.visibleCommands(e),l=>l.helpGroup()||"Commands:").forEach((l,f)=>{let h=l.map(m=>i(t.styleSubcommandTerm(t.subcommandTerm(m)),t.styleSubcommandDescription(t.subcommandDescription(m))));o=o.concat(this.formatItemList(f,h,t))}),o.join(`
4
+ `)}displayWidth(e){return La(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,n,s){let o=" ".repeat(2);if(!n)return o+e;let a=e.padEnd(t+e.length-s.displayWidth(e)),c=2,u=(this.helpWidth??80)-t-c-2,l;return u<this.minWidthToWrap||s.preformatted(n)?l=n:l=s.boxWrap(n,u).replace(/\n/g,`
5
+ `+" ".repeat(t+c)),o+a+" ".repeat(c)+l.replace(/\n/g,`
6
+ ${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),s=/[\s]*[^\s]+/g,i=[];return n.forEach(o=>{let a=o.match(s);if(a===null){i.push("");return}let c=[a.shift()],d=this.displayWidth(c[0]);a.forEach(u=>{let l=this.displayWidth(u);if(d+l<=t){c.push(u),d+=l;return}i.push(c.join(""));let f=u.trimStart();c=[f],d=this.displayWidth(f)}),i.push(c.join(""))}),i.join(`
7
+ `)}};function La(r){let e=/\x1b\[\d*(;\d*)*m/g;return r.replace(e,"")}ls.Help=us;ls.stripColor=La});var ms=p(ps=>{var{InvalidArgumentError:rp}=Qt(),fs=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 n=np(e);this.short=n.shortFlag,this.long=n.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,n)=>{if(!this.argChoices.includes(t))throw new rp(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,n):t},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.negate?Ma(this.name().replace(/^no-/,"")):Ma(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}},hs=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,n)=>{this.positiveOptions.has(n)&&this.dualOptions.add(n)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let s=this.negativeOptions.get(n).presetArg,i=s!==void 0?s:!1;return t.negate===(i===e)}};function Ma(r){return r.split("-").reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function np(r){let e,t,n=/^-[^-]$/,s=/^--[^-]/,i=r.split(/[ |,]+/).concat("guard");if(n.test(i[0])&&(e=i.shift()),s.test(i[0])&&(t=i.shift()),!e&&n.test(i[0])&&(e=i.shift()),!e&&s.test(i[0])&&(e=t,t=i.shift()),i[0].startsWith("-")){let o=i[0],a=`option creation failed due to '${o}' in option flags '${r}'`;throw/^-[^-][^-]/.test(o)?new Error(`${a}
8
+ - a short flag is a single dash and a single character
9
+ - either use a single dash and a single character (for a short flag)
10
+ - or use a double dash for a long option (and can have two, like '--ws, --workspace')`):n.test(o)?new Error(`${a}
11
+ - too many short flags`):s.test(o)?new Error(`${a}
12
+ - too many long flags`):new Error(`${a}
13
+ - 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}}ps.Option=fs;ps.DualOptions=hs});var Fa=p(Va=>{function sp(r,e){if(Math.abs(r.length-e.length)>3)return Math.max(r.length,e.length);let t=[];for(let n=0;n<=r.length;n++)t[n]=[n];for(let n=0;n<=e.length;n++)t[0][n]=n;for(let n=1;n<=e.length;n++)for(let s=1;s<=r.length;s++){let i=1;r[s-1]===e[n-1]?i=0:i=1,t[s][n]=Math.min(t[s-1][n]+1,t[s][n-1]+1,t[s-1][n-1]+i),s>1&&n>1&&r[s-1]===e[n-2]&&r[s-2]===e[n-1]&&(t[s][n]=Math.min(t[s][n],t[s-2][n-2]+1))}return t[r.length][e.length]}function ip(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 n=[],s=3,i=.4;return e.forEach(o=>{if(o.length<=1)return;let a=sp(r,o),c=Math.max(r.length,o.length);(c-a)/c>i&&(a<s?(s=a,n=[o]):a===s&&n.push(o))}),n.sort((o,a)=>o.localeCompare(a)),t&&(n=n.map(o=>`--${o}`)),n.length>1?`
14
+ (Did you mean one of ${n.join(", ")}?)`:n.length===1?`
15
+ (Did you mean ${n[0]}?)`:""}Va.suggestSimilar=ip});var za=p(Es=>{var op=require("node:events").EventEmitter,gs=require("node:child_process"),ze=require("node:path"),Wr=require("node:fs"),j=require("node:process"),{Argument:ap,humanReadableArgName:cp}=Kr(),{CommanderError:ys}=Qt(),{Help:up,stripColor:lp}=ds(),{Option:Ua,DualOptions:dp}=ms(),{suggestSimilar:Ga}=Fa(),_s=class r extends op{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=>j.stdout.write(t),writeErr:t=>j.stderr.write(t),outputError:(t,n)=>n(t),getOutHelpWidth:()=>j.stdout.isTTY?j.stdout.columns:void 0,getErrHelpWidth:()=>j.stderr.isTTY?j.stderr.columns:void 0,getOutHasColors:()=>$s()??(j.stdout.isTTY&&j.stdout.hasColors?.()),getErrHasColors:()=>$s()??(j.stderr.isTTY&&j.stderr.hasColors?.()),stripColor:t=>lp(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,n){let s=t,i=n;typeof s=="object"&&s!==null&&(i=s,s=null),i=i||{};let[,o,a]=e.match(/([^ ]+) *(.*)/),c=this.createCommand(o);return s&&(c.description(s),c._executableHandler=!0),i.isDefault&&(this._defaultCommandName=c._name),c._hidden=!!(i.noHelp||i.hidden),c._executableFile=i.executableFile||null,a&&c.arguments(a),this._registerCommand(c),c.parent=this,c.copyInheritedSettings(this),s?this:c}createCommand(e){return new r(e)}createHelp(){return Object.assign(new up,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
16
+ - 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 ap(e,t)}argument(e,t,n,s){let i=this.createArgument(e,t);return typeof n=="function"?i.default(s).argParser(n):i.default(n),this.addArgument(i),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 n=e??"help [command]",[,s,i]=n.match(/([^ ]+) *(.*)/),o=t??"display help for command",a=this.createCommand(s);return a.helpOption(!1),i&&a.arguments(i),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 n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.
17
+ Expecting one of '${n.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,n){this._exitCallback&&this._exitCallback(new ys(e,t,n)),j.exit(e)}action(e){let t=n=>{let s=this.registeredArguments.length,i=n.slice(0,s);return this._storeOptionsAsProperties?i[s]=this:i[s]=this.opts(),i.push(this),e.apply(this,i)};return this._actionHandler=t,this}createOption(e,t){return new Ua(e,t)}_callParseArg(e,t,n,s){try{return e.parseArg(t,n)}catch(i){if(i.code==="commander.invalidArgument"){let o=`${s} ${i.message}`;this.error(o,{exitCode:i.exitCode,code:i.code})}throw i}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=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 '${n}'
18
+ - already used by option '${t.flags}'`)}this._initOptionGroup(e),this.options.push(e)}_registerCommand(e){let t=s=>[s.name()].concat(s.aliases()),n=t(e).find(s=>this._findCommand(s));if(n){let s=t(this._findCommand(n)).join("|"),i=t(e).join("|");throw new Error(`cannot add command '${i}' as already have command '${s}'`)}this._initCommandGroup(e),this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let i=e.long.replace(/^--no-/,"--");this._findOption(i)||this.setOptionValueWithSource(n,e.defaultValue===void 0?!0:e.defaultValue,"default")}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,"default");let s=(i,o,a)=>{i==null&&e.presetArg!==void 0&&(i=e.presetArg);let c=this.getOptionValue(n);i!==null&&e.parseArg?i=this._callParseArg(e,i,c,o):i!==null&&e.variadic&&(i=e._collectValue(i,c)),i==null&&(e.negate?i=!1:e.isBoolean()||e.optional?i=!0:i=""),this.setOptionValueWithSource(n,i,a)};return this.on("option:"+t,i=>{let o=`error: option '${e.flags}' argument '${i}' is invalid.`;s(i,o,"cli")}),e.envVar&&this.on("optionEnv:"+t,i=>{let o=`error: option '${e.flags}' value '${i}' from env '${e.envVar}' is invalid.`;s(i,o,"env")}),this}_optionEx(e,t,n,s,i){if(typeof t=="object"&&t instanceof Ua)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");let o=this.createOption(t,n);if(o.makeOptionMandatory(!!e.mandatory),typeof s=="function")o.default(i).argParser(s);else if(s instanceof RegExp){let a=s;s=(c,d)=>{let u=a.exec(c);return u?u[0]:d},o.default(i).argParser(s)}else o.default(s);return this.addOption(o)}option(e,t,n,s){return this._optionEx({},e,t,n,s)}requiredOption(e,t,n,s){return this._optionEx({mandatory:!0},e,t,n,s)}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,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.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){j.versions?.electron&&(t.from="electron");let s=j.execArgv??[];(s.includes("-e")||s.includes("--eval")||s.includes("-p")||s.includes("--print"))&&(t.from="eval")}e===void 0&&(e=j.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":j.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;case"eval":n=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",n}parse(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){this._prepareForParse();let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),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.
19
+ - 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,n){if(Wr.existsSync(e))return;let s=t?`searched for local subcommand relative to directory '${t}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",i=`'${e}' does not exist
20
+ - if '${n}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
21
+ - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
22
+ - ${s}`;throw new Error(i)}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[".js",".ts",".tsx",".mjs",".cjs"];function i(u,l){let f=ze.resolve(u,l);if(Wr.existsSync(f))return f;if(s.includes(ze.extname(l)))return;let h=s.find(m=>Wr.existsSync(`${f}${m}`));if(h)return`${f}${h}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let o=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let u;try{u=Wr.realpathSync(this._scriptPath)}catch{u=this._scriptPath}a=ze.resolve(ze.dirname(u),a)}if(a){let u=i(a,o);if(!u&&!e._executableFile&&this._scriptPath){let l=ze.basename(this._scriptPath,ze.extname(this._scriptPath));l!==this._name&&(u=i(a,`${l}-${e._name}`))}o=u||o}n=s.includes(ze.extname(o));let c;j.platform!=="win32"?n?(t.unshift(o),t=Ha(j.execArgv).concat(t),c=gs.spawn(j.argv[0],t,{stdio:"inherit"})):c=gs.spawn(o,t,{stdio:"inherit"}):(this._checkForMissingExecutable(o,a,e._name),t.unshift(o),t=Ha(j.execArgv).concat(t),c=gs.spawn(j.execPath,t,{stdio:"inherit"})),c.killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(l=>{j.on(l,()=>{c.killed===!1&&c.exitCode===null&&c.kill(l)})});let d=this._exitCallback;c.on("close",u=>{u=u??1,d?d(new ys(u,"commander.executeSubCommandAsync","(close)")):j.exit(u)}),c.on("error",u=>{if(u.code==="ENOENT")this._checkForMissingExecutable(o,a,e._name);else if(u.code==="EACCES")throw new Error(`'${o}' not executable`);if(!d)j.exit(1);else{let l=new ys(1,"commander.executeSubCommandAsync","(error)");l.nestedError=u,d(l)}}),this.runningCommand=c}_dispatchSubcommand(e,t,n){let s=this._findCommand(e);s||this.help({error:!0}),s._prepareForParse();let i;return i=this._chainOrCallSubCommandHook(i,s,"preSubcommand"),i=this._chainOrCall(i,()=>{if(s._executableHandler)this._executeSubCommand(s,t.concat(n));else return s._parseCommand(t,n)}),i}_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=(n,s,i)=>{let o=s;if(s!==null&&n.parseArg){let a=`error: command-argument value '${s}' is invalid for argument '${n.name()}'.`;o=this._callParseArg(n,s,i,a)}return o};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,s)=>{let i=n.defaultValue;n.variadic?s<this.args.length?(i=this.args.slice(s),n.parseArg&&(i=i.reduce((o,a)=>e(n,a,o),n.defaultValue))):i===void 0&&(i=[]):s<this.args.length&&(i=this.args[s],n.parseArg&&(i=e(n,i,n.defaultValue))),t[s]=i}),this.processedArgs=t}_chainOrCall(e,t){return e?.then&&typeof e.then=="function"?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,s=[];return this._getCommandAndAncestors().reverse().filter(i=>i._lifeCycleHooks[t]!==void 0).forEach(i=>{i._lifeCycleHooks[t].forEach(o=>{s.push({hookedCommand:i,callback:o})})}),t==="postAction"&&s.reverse(),s.forEach(i=>{n=this._chainOrCall(n,()=>i.callback(i.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let s=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(i=>{s=this._chainOrCall(s,()=>i(this,t))}),s}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.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(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let s=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){s(),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(i,e,t)})),o=this._chainOrCallHooks(o,"postAction"),o}if(this.parent?.listenerCount(i))s(),this._processArguments(),this.parent.emit(i,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():(s(),this._processArguments())}else this.commands.length?(s(),this.help({error:!0})):(s(),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(n=>{let s=n.attributeName();return this.getOptionValue(s)===void 0?!1:this.getOptionValueSource(s)!=="default"});e.filter(n=>n.conflictsWith.length>0).forEach(n=>{let s=e.find(i=>n.conflictsWith.includes(i.attributeName()));s&&this._conflictingOption(n,s)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],s=t;function i(u){return u.length>1&&u[0]==="-"}let o=u=>/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(u)?!this._getCommandAndAncestors().some(l=>l.options.map(f=>f.short).some(f=>/^-\d$/.test(f))):!1,a=null,c=null,d=0;for(;d<e.length||c;){let u=c??e[d++];if(c=null,u==="--"){s===n&&s.push(u),s.push(...e.slice(d));break}if(a&&(!i(u)||o(u))){this.emit(`option:${a.name()}`,u);continue}if(a=null,i(u)){let l=this._findOption(u);if(l){if(l.required){let f=e[d++];f===void 0&&this.optionMissingArgument(l),this.emit(`option:${l.name()}`,f)}else if(l.optional){let f=null;d<e.length&&(!i(e[d])||o(e[d]))&&(f=e[d++]),this.emit(`option:${l.name()}`,f)}else this.emit(`option:${l.name()}`);a=l.variadic?l:null;continue}}if(u.length>2&&u[0]==="-"&&u[1]!=="-"){let l=this._findOption(`-${u[1]}`);if(l){l.required||l.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${l.name()}`,u.slice(2)):(this.emit(`option:${l.name()}`),c=`-${u.slice(2)}`);continue}}if(/^--[^=]+=/.test(u)){let l=u.indexOf("="),f=this._findOption(u.slice(0,l));if(f&&(f.required||f.optional)){this.emit(`option:${f.name()}`,u.slice(l+1));continue}}if(s===t&&i(u)&&!(this.commands.length===0&&o(u))&&(s=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(u)){t.push(u),n.push(...e.slice(d));break}else if(this._getHelpCommand()&&u===this._getHelpCommand().name()){t.push(u,...e.slice(d));break}else if(this._defaultCommandName){n.push(u,...e.slice(d));break}}if(this._passThroughOptions){s.push(u,...e.slice(d));break}s.push(u)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let s=this.options[n].attributeName();e[s]=s===this._versionOptionName?this._version:this[s]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}
23
+ `,this._outputConfiguration.writeErr),typeof this._showHelpAfterError=="string"?this._outputConfiguration.writeErr(`${this._showHelpAfterError}
24
+ `):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
25
+ `),this.outputHelp({error:!0}));let n=t||{},s=n.exitCode||1,i=n.code||"commander.error";this._exit(s,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in j.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()}`,j.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new dp(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(s=>!t(s)).forEach(s=>{this.setOptionValueWithSource(s,n.implied[s],"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 n=o=>{let a=o.attributeName(),c=this.getOptionValue(a),d=this.options.find(l=>l.negate&&a===l.attributeName()),u=this.options.find(l=>!l.negate&&a===l.attributeName());return d&&(d.presetArg===void 0&&c===!1||d.presetArg!==void 0&&c===d.presetArg)?d:u||o},s=o=>{let a=n(o),c=a.attributeName();return this.getOptionValueSource(c)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},i=`error: ${s(e)} cannot be used with ${s(t)}`;this.error(i,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let s=[],i=this;do{let o=i.createHelp().visibleOptions(i).filter(a=>a.long).map(a=>a.long);s=s.concat(o),i=i.parent}while(i&&!i._enablePositionalOptions);t=Ga(e,s)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",i=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(i,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let s=[];this.createHelp().visibleCommands(this).forEach(i=>{s.push(i.name()),i.alias()&&s.push(i.alias())}),t=Ga(e,s)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let s=this.createOption(t,n);return this._versionOptionName=s.attributeName(),this._registerOption(s),this.on("option:"+s.name(),()=>{this._outputConfiguration.writeOut(`${e}
26
+ `),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 n=this.parent?._findCommand(e);if(n){let s=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${s}'`)}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(n=>cp(n));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=ze.basename(e,ze.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let s=t.formatHelp(this,t);return n.hasColors?s:this._outputConfiguration.stripColor(s)}_getOutputContext(e){e=e||{};let t=!!e.error,n,s,i;return t?(n=a=>this._outputConfiguration.writeErr(a),s=this._outputConfiguration.getErrHasColors(),i=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),s=this._outputConfiguration.getOutHasColors(),i=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(s||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:s,helpWidth:i}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getOutputContext(e),s={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",s)),this.emit("beforeHelp",s);let i=this.helpInformation({error:n.error});if(t&&(i=t(i),typeof i!="string"&&!Buffer.isBuffer(i)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(i),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",s),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",s))}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(j.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
27
+ Expecting one of '${n.join("', '")}'`);let s=`${e}Help`;return this.on(s,i=>{let o;typeof t=="function"?o=t({error:i.error,command:i.command}):o=t,o&&i.write(`${o}
28
+ `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(s=>t.is(s))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function Ha(r){return r.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",s="9229",i;return(i=e.match(/^(--inspect(-brk)?)$/))!==null?t=i[1]:(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=i[1],/^\d+$/.test(i[3])?s=i[3]:n=i[3]):(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],s=i[4]),t&&s!=="0"?`${t}=${n}:${parseInt(s)+1}`:e})}function $s(){if(j.env.NO_COLOR||j.env.FORCE_COLOR==="0"||j.env.FORCE_COLOR==="false")return!1;if(j.env.FORCE_COLOR||j.env.CLICOLOR_FORCE!==void 0)return!0}Es.Command=_s;Es.useColor=$s});var Ja=p(ge=>{var{Argument:Ka}=Kr(),{Command:vs}=za(),{CommanderError:fp,InvalidArgumentError:Wa}=Qt(),{Help:hp}=ds(),{Option:Ba}=ms();ge.program=new vs;ge.createCommand=r=>new vs(r);ge.createOption=(r,e)=>new Ba(r,e);ge.createArgument=(r,e)=>new Ka(r,e);ge.Command=vs;ge.Option=Ba;ge.Argument=Ka;ge.Help=hp;ge.CommanderError=fp;ge.InvalidArgumentError=Wa;ge.InvalidOptionArgumentError=Wa});var Oe=p(($S,ws)=>{var Jr=process||{},Za=Jr.argv||[],Br=Jr.env||{},pp=!(Br.NO_COLOR||Za.includes("--no-color"))&&(!!Br.FORCE_COLOR||Za.includes("--color")||Jr.platform==="win32"||(Jr.stdout||{}).isTTY&&Br.TERM!=="dumb"||!!Br.CI),mp=(r,e,t=r)=>n=>{let s=""+n,i=s.indexOf(e,r.length);return~i?r+gp(s,e,t,i)+e:r+s+e},gp=(r,e,t,n)=>{let s="",i=0;do s+=r.substring(i,n)+t,i=n+e.length,n=r.indexOf(e,i);while(~n);return s+r.substring(i)},Qa=(r=pp)=>{let e=r?mp:()=>String;return{isColorSupported:r,reset:e("\x1B[0m","\x1B[0m"),bold:e("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:e("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:e("\x1B[3m","\x1B[23m"),underline:e("\x1B[4m","\x1B[24m"),inverse:e("\x1B[7m","\x1B[27m"),hidden:e("\x1B[8m","\x1B[28m"),strikethrough:e("\x1B[9m","\x1B[29m"),black:e("\x1B[30m","\x1B[39m"),red:e("\x1B[31m","\x1B[39m"),green:e("\x1B[32m","\x1B[39m"),yellow:e("\x1B[33m","\x1B[39m"),blue:e("\x1B[34m","\x1B[39m"),magenta:e("\x1B[35m","\x1B[39m"),cyan:e("\x1B[36m","\x1B[39m"),white:e("\x1B[37m","\x1B[39m"),gray:e("\x1B[90m","\x1B[39m"),bgBlack:e("\x1B[40m","\x1B[49m"),bgRed:e("\x1B[41m","\x1B[49m"),bgGreen:e("\x1B[42m","\x1B[49m"),bgYellow:e("\x1B[43m","\x1B[49m"),bgBlue:e("\x1B[44m","\x1B[49m"),bgMagenta:e("\x1B[45m","\x1B[49m"),bgCyan:e("\x1B[46m","\x1B[49m"),bgWhite:e("\x1B[47m","\x1B[49m"),blackBright:e("\x1B[90m","\x1B[39m"),redBright:e("\x1B[91m","\x1B[39m"),greenBright:e("\x1B[92m","\x1B[39m"),yellowBright:e("\x1B[93m","\x1B[39m"),blueBright:e("\x1B[94m","\x1B[39m"),magentaBright:e("\x1B[95m","\x1B[39m"),cyanBright:e("\x1B[96m","\x1B[39m"),whiteBright:e("\x1B[97m","\x1B[39m"),bgBlackBright:e("\x1B[100m","\x1B[49m"),bgRedBright:e("\x1B[101m","\x1B[49m"),bgGreenBright:e("\x1B[102m","\x1B[49m"),bgYellowBright:e("\x1B[103m","\x1B[49m"),bgBlueBright:e("\x1B[104m","\x1B[49m"),bgMagentaBright:e("\x1B[105m","\x1B[49m"),bgCyanBright:e("\x1B[106m","\x1B[49m"),bgWhiteBright:e("\x1B[107m","\x1B[49m")}};ws.exports=Qa();ws.exports.createColors=Qa});var or=p(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.regexpCode=q.getEsmExportName=q.getProperty=q.safeStringify=q.stringify=q.strConcat=q.addCodeArg=q.str=q._=q.nil=q._Code=q.Name=q.IDENTIFIER=q._CodeOrName=void 0;var sr=class{};q._CodeOrName=sr;q.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ht=class extends sr{constructor(e){if(super(),!q.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}}};q.Name=ht;var _e=class extends sr{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,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>(n instanceof ht&&(t[n.str]=(t[n.str]||0)+1),t),{})}};q._Code=_e;q.nil=new _e("");function Pc(r,...e){let t=[r[0]],n=0;for(;n<e.length;)Us(t,e[n]),t.push(r[++n]);return new _e(t)}q._=Pc;var Fs=new _e("+");function Ic(r,...e){let t=[ir(r[0])],n=0;for(;n<e.length;)t.push(Fs),Us(t,e[n]),t.push(Fs,ir(r[++n]));return Ip(t),new _e(t)}q.str=Ic;function Us(r,e){e instanceof _e?r.push(...e._items):e instanceof ht?r.push(e):r.push(Cp(e))}q.addCodeArg=Us;function Ip(r){let e=1;for(;e<r.length-1;){if(r[e]===Fs){let t=Rp(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function Rp(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof ht||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 ht))return`"${r}${e.slice(1)}`}function Np(r,e){return e.emptyStr()?r:r.emptyStr()?e:Ic`${r}${e}`}q.strConcat=Np;function Cp(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:ir(Array.isArray(r)?r.join(","):r)}function xp(r){return new _e(ir(r))}q.stringify=xp;function ir(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}q.safeStringify=ir;function kp(r){return typeof r=="string"&&q.IDENTIFIER.test(r)?new _e(`.${r}`):Pc`[${r}]`}q.getProperty=kp;function qp(r){if(typeof r=="string"&&q.IDENTIFIER.test(r))return new _e(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}q.getEsmExportName=qp;function jp(r){return new _e(r.toString())}q.regexpCode=jp});var zs=p(fe=>{"use strict";Object.defineProperty(fe,"__esModule",{value:!0});fe.ValueScope=fe.ValueScopeName=fe.Scope=fe.varKinds=fe.UsedValueState=void 0;var de=or(),Gs=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},tn;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(tn||(fe.UsedValueState=tn={}));fe.varKinds={const:new de.Name("const"),let:new de.Name("let"),var:new de.Name("var")};var rn=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof de.Name?e:this.name(e)}name(e){return new de.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.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}}};fe.Scope=rn;var nn=class extends de.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,de._)`.${new de.Name(t)}[${n}]`}};fe.ValueScopeName=nn;var Dp=(0,de._)`\n`,Hs=class extends rn{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?Dp:de.nil}}get(){return this._scope}name(e){return new nn(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let s=this.toName(e),{prefix:i}=s,o=(n=t.key)!==null&&n!==void 0?n:t.ref,a=this._values[i];if(a){let u=a.get(o);if(u)return u}else a=this._values[i]=new Map;a.set(o,s);let c=this._scope[i]||(this._scope[i]=[]),d=c.length;return c[d]=t.ref,s.setValue(t,{property:i,itemIndex:d}),s}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,de._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,s=>{if(s.value===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return s.value.code},t,n)}_reduceValues(e,t,n={},s){let i=de.nil;for(let o in e){let a=e[o];if(!a)continue;let c=n[o]=n[o]||new Map;a.forEach(d=>{if(c.has(d))return;c.set(d,tn.Started);let u=t(d);if(u){let l=this.opts.es5?fe.varKinds.var:fe.varKinds.const;i=(0,de._)`${i}${l} ${d} = ${u};${this.opts._n}`}else if(u=s?.(d))i=(0,de._)`${i}${u}${this.opts._n}`;else throw new Gs(d);c.set(d,tn.Completed)})}return i}};fe.ValueScope=Hs});var b=p(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.or=T.and=T.not=T.CodeGen=T.operators=T.varKinds=T.ValueScopeName=T.ValueScope=T.Scope=T.Name=T.regexpCode=T.stringify=T.getProperty=T.nil=T.strConcat=T.str=T._=void 0;var N=or(),Te=zs(),Ze=or();Object.defineProperty(T,"_",{enumerable:!0,get:function(){return Ze._}});Object.defineProperty(T,"str",{enumerable:!0,get:function(){return Ze.str}});Object.defineProperty(T,"strConcat",{enumerable:!0,get:function(){return Ze.strConcat}});Object.defineProperty(T,"nil",{enumerable:!0,get:function(){return Ze.nil}});Object.defineProperty(T,"getProperty",{enumerable:!0,get:function(){return Ze.getProperty}});Object.defineProperty(T,"stringify",{enumerable:!0,get:function(){return Ze.stringify}});Object.defineProperty(T,"regexpCode",{enumerable:!0,get:function(){return Ze.regexpCode}});Object.defineProperty(T,"Name",{enumerable:!0,get:function(){return Ze.Name}});var cn=zs();Object.defineProperty(T,"Scope",{enumerable:!0,get:function(){return cn.Scope}});Object.defineProperty(T,"ValueScope",{enumerable:!0,get:function(){return cn.ValueScope}});Object.defineProperty(T,"ValueScopeName",{enumerable:!0,get:function(){return cn.ValueScopeName}});Object.defineProperty(T,"varKinds",{enumerable:!0,get:function(){return cn.varKinds}});T.operators={GT:new N._Code(">"),GTE:new N._Code(">="),LT:new N._Code("<"),LTE:new N._Code("<="),EQ:new N._Code("==="),NEQ:new N._Code("!=="),NOT:new N._Code("!"),OR:new N._Code("||"),AND:new N._Code("&&"),ADD:new N._Code("+")};var Ke=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Ks=class extends Ke{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Te.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=It(this.rhs,e,t)),this}get names(){return this.rhs instanceof N._CodeOrName?this.rhs.names:{}}},sn=class extends Ke{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof N.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=It(this.rhs,e,t),this}get names(){let e=this.lhs instanceof N.Name?{}:{...this.lhs.names};return an(e,this.rhs)}},Ws=class extends sn{constructor(e,t,n,s){super(e,n,s),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Bs=class extends Ke{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Js=class extends Ke{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Xs=class extends Ke{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Ys=class extends Ke{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=It(this.code,e,t),this}get names(){return this.code instanceof N._CodeOrName?this.code.names:{}}},ar=class extends Ke{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,s=n.length;for(;s--;){let i=n[s];i.optimizeNames(e,t)||(Lp(e,i.names),n.splice(s,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>gt(e,t.names),{})}},We=class extends ar{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Zs=class extends ar{},Pt=class extends We{};Pt.kind="else";var pt=class r extends We{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 n=t.optimizeNodes();t=this.else=Array.isArray(n)?new Pt(n):n}if(t)return e===!1?t instanceof r?t:t.nodes:this.nodes.length?this:new r(Rc(e),t instanceof r?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=It(this.condition,e,t),this}get names(){let e=super.names;return an(e,this.condition),this.else&&gt(e,this.else.names),e}};pt.kind="if";var mt=class extends We{};mt.kind="for";var Qs=class extends mt{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=It(this.iteration,e,t),this}get names(){return gt(super.names,this.iteration.names)}},ei=class extends mt{constructor(e,t,n,s){super(),this.varKind=e,this.name=t,this.from=n,this.to=s}render(e){let t=e.es5?Te.varKinds.var:this.varKind,{name:n,from:s,to:i}=this;return`for(${t} ${n}=${s}; ${n}<${i}; ${n}++)`+super.render(e)}get names(){let e=an(super.names,this.from);return an(e,this.to)}},on=class extends mt{constructor(e,t,n,s){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=s}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=It(this.iterable,e,t),this}get names(){return gt(super.names,this.iterable.names)}},cr=class extends We{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};cr.kind="func";var ur=class extends ar{render(e){return"return "+super.render(e)}};ur.kind="return";var ti=class extends We{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 n,s;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(s=this.finally)===null||s===void 0||s.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}},lr=class extends We{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};lr.kind="catch";var dr=class extends We{render(e){return"finally"+super.render(e)}};dr.kind="finally";var ri=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?`
29
+ `:""},this._extScope=e,this._scope=new Te.Scope({parent:e}),this._nodes=[new Zs]}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 n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}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,n,s){let i=this._scope.toName(t);return n!==void 0&&s&&(this._constants[i.str]=n),this._leafNode(new Ks(e,i,n)),i}const(e,t,n){return this._def(Te.varKinds.const,e,t,n)}let(e,t,n){return this._def(Te.varKinds.let,e,t,n)}var(e,t,n){return this._def(Te.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new sn(e,t,n))}add(e,t){return this._leafNode(new Ws(e,T.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==N.nil&&this._leafNode(new Ys(e)),this}object(...e){let t=["{"];for(let[n,s]of e)t.length>1&&t.push(","),t.push(n),(n!==s||this.opts.es5)&&(t.push(":"),(0,N.addCodeArg)(t,s));return t.push("}"),new N._Code(t)}if(e,t,n){if(this._blockNode(new pt(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new pt(e))}else(){return this._elseNode(new Pt)}endIf(){return this._endBlockNode(pt,Pt)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new Qs(e),t)}forRange(e,t,n,s,i=this.opts.es5?Te.varKinds.var:Te.varKinds.let){let o=this._scope.toName(e);return this._for(new ei(i,o,t,n),()=>s(o))}forOf(e,t,n,s=Te.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let o=t instanceof N.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,N._)`${o}.length`,a=>{this.var(i,(0,N._)`${o}[${a}]`),n(i)})}return this._for(new on("of",s,i,t),()=>n(i))}forIn(e,t,n,s=this.opts.es5?Te.varKinds.var:Te.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,N._)`Object.keys(${t})`,n);let i=this._scope.toName(e);return this._for(new on("in",s,i,t),()=>n(i))}endFor(){return this._endBlockNode(mt)}label(e){return this._leafNode(new Bs(e))}break(e){return this._leafNode(new Js(e))}return(e){let t=new ur;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(ur)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let s=new ti;if(this._blockNode(s),this.code(e),t){let i=this.name("e");this._currNode=s.catch=new lr(i),t(i)}return n&&(this._currNode=s.finally=new dr,this.code(n)),this._endBlockNode(lr,dr)}throw(e){return this._leafNode(new Xs(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 n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=N.nil,n,s){return this._blockNode(new cr(e,t,n)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(cr)}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 n=this._currNode;if(n instanceof e||t&&n 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 pt))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}};T.CodeGen=ri;function gt(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function an(r,e){return e instanceof N._CodeOrName?gt(r,e.names):r}function It(r,e,t){if(r instanceof N.Name)return n(r);if(!s(r))return r;return new N._Code(r._items.reduce((i,o)=>(o instanceof N.Name&&(o=n(o)),o instanceof N._Code?i.push(...o._items):i.push(o),i),[]));function n(i){let o=t[i.str];return o===void 0||e[i.str]!==1?i:(delete e[i.str],o)}function s(i){return i instanceof N._Code&&i._items.some(o=>o instanceof N.Name&&e[o.str]===1&&t[o.str]!==void 0)}}function Lp(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function Rc(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,N._)`!${ni(r)}`}T.not=Rc;var Mp=Nc(T.operators.AND);function Vp(...r){return r.reduce(Mp)}T.and=Vp;var Fp=Nc(T.operators.OR);function Up(...r){return r.reduce(Fp)}T.or=Up;function Nc(r){return(e,t)=>e===N.nil?t:t===N.nil?e:(0,N._)`${ni(e)} ${r} ${ni(t)}`}function ni(r){return r instanceof N.Name?r:(0,N._)`(${r})`}});var I=p(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.checkStrictMode=P.getErrorPath=P.Type=P.useFunc=P.setEvaluated=P.evaluatedPropsToName=P.mergeEvaluated=P.eachItem=P.unescapeJsonPointer=P.escapeJsonPointer=P.escapeFragment=P.unescapeFragment=P.schemaRefOrVal=P.schemaHasRulesButRef=P.schemaHasRules=P.checkUnknownRules=P.alwaysValidSchema=P.toHash=void 0;var M=b(),Gp=or();function Hp(r){let e={};for(let t of r)e[t]=!0;return e}P.toHash=Hp;function zp(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(kc(r,e),!qc(e,r.self.RULES.all))}P.alwaysValidSchema=zp;function kc(r,e=r.schema){let{opts:t,self:n}=r;if(!t.strictSchema||typeof e=="boolean")return;let s=n.RULES.keywords;for(let i in e)s[i]||Lc(r,`unknown keyword: "${i}"`)}P.checkUnknownRules=kc;function qc(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}P.schemaHasRules=qc;function Kp(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}P.schemaHasRulesButRef=Kp;function Wp({topSchemaRef:r,schemaPath:e},t,n,s){if(!s){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,M._)`${t}`}return(0,M._)`${r}${e}${(0,M.getProperty)(n)}`}P.schemaRefOrVal=Wp;function Bp(r){return jc(decodeURIComponent(r))}P.unescapeFragment=Bp;function Jp(r){return encodeURIComponent(ii(r))}P.escapeFragment=Jp;function ii(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}P.escapeJsonPointer=ii;function jc(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}P.unescapeJsonPointer=jc;function Xp(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}P.eachItem=Xp;function Cc({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:n}){return(s,i,o,a)=>{let c=o===void 0?i:o instanceof M.Name?(i instanceof M.Name?r(s,i,o):e(s,i,o),o):i instanceof M.Name?(e(s,o,i),i):t(i,o);return a===M.Name&&!(c instanceof M.Name)?n(s,c):c}}P.mergeEvaluated={props:Cc({mergeNames:(r,e,t)=>r.if((0,M._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,M._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,M._)`${t} || {}`).code((0,M._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,M._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,M._)`${t} || {}`),oi(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:{...r,...e},resultToName:Dc}),items:Cc({mergeNames:(r,e,t)=>r.if((0,M._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,M._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,M._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,M._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function Dc(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,M._)`{}`);return e!==void 0&&oi(r,t,e),t}P.evaluatedPropsToName=Dc;function oi(r,e,t){Object.keys(t).forEach(n=>r.assign((0,M._)`${e}${(0,M.getProperty)(n)}`,!0))}P.setEvaluated=oi;var xc={};function Yp(r,e){return r.scopeValue("func",{ref:e,code:xc[e.code]||(xc[e.code]=new Gp._Code(e.code))})}P.useFunc=Yp;var si;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(si||(P.Type=si={}));function Zp(r,e,t){if(r instanceof M.Name){let n=e===si.Num;return t?n?(0,M._)`"[" + ${r} + "]"`:(0,M._)`"['" + ${r} + "']"`:n?(0,M._)`"/" + ${r}`:(0,M._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,M.getProperty)(r).toString():"/"+ii(r)}P.getErrorPath=Zp;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)}}P.checkStrictMode=Lc});var $e=p(ai=>{"use strict";Object.defineProperty(ai,"__esModule",{value:!0});var ee=b(),Qp={data:new ee.Name("data"),valCxt:new ee.Name("valCxt"),instancePath:new ee.Name("instancePath"),parentData:new ee.Name("parentData"),parentDataProperty:new ee.Name("parentDataProperty"),rootData:new ee.Name("rootData"),dynamicAnchors:new ee.Name("dynamicAnchors"),vErrors:new ee.Name("vErrors"),errors:new ee.Name("errors"),this:new ee.Name("this"),self:new ee.Name("self"),scope:new ee.Name("scope"),json:new ee.Name("json"),jsonPos:new ee.Name("jsonPos"),jsonLen:new ee.Name("jsonLen"),jsonPart:new ee.Name("jsonPart")};ai.default=Qp});var fr=p(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.extendErrors=te.resetErrorsCount=te.reportExtraError=te.reportError=te.keyword$DataError=te.keywordError=void 0;var k=b(),un=I(),ie=$e();te.keywordError={message:({keyword:r})=>(0,k.str)`must pass "${r}" keyword validation`};te.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 em(r,e=te.keywordError,t,n){let{it:s}=r,{gen:i,compositeRule:o,allErrors:a}=s,c=Fc(r,e,t);n??(o||a)?Mc(i,c):Vc(s,(0,k._)`[${c}]`)}te.reportError=em;function tm(r,e=te.keywordError,t){let{it:n}=r,{gen:s,compositeRule:i,allErrors:o}=n,a=Fc(r,e,t);Mc(s,a),i||o||Vc(n,ie.default.vErrors)}te.reportExtraError=tm;function rm(r,e){r.assign(ie.default.errors,e),r.if((0,k._)`${ie.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,k._)`${ie.default.vErrors}.length`,e),()=>r.assign(ie.default.vErrors,null)))}te.resetErrorsCount=rm;function nm({gen:r,keyword:e,schemaValue:t,data:n,errsCount:s,it:i}){if(s===void 0)throw new Error("ajv implementation error");let o=r.name("err");r.forRange("i",s,ie.default.errors,a=>{r.const(o,(0,k._)`${ie.default.vErrors}[${a}]`),r.if((0,k._)`${o}.instancePath === undefined`,()=>r.assign((0,k._)`${o}.instancePath`,(0,k.strConcat)(ie.default.instancePath,i.errorPath))),r.assign((0,k._)`${o}.schemaPath`,(0,k.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(r.assign((0,k._)`${o}.schema`,t),r.assign((0,k._)`${o}.data`,n))})}te.extendErrors=nm;function Mc(r,e){let t=r.const("err",e);r.if((0,k._)`${ie.default.vErrors} === null`,()=>r.assign(ie.default.vErrors,(0,k._)`[${t}]`),(0,k._)`${ie.default.vErrors}.push(${t})`),r.code((0,k._)`${ie.default.errors}++`)}function Vc(r,e){let{gen:t,validateName:n,schemaEnv:s}=r;s.$async?t.throw((0,k._)`new ${r.ValidationError}(${e})`):(t.assign((0,k._)`${n}.errors`,e),t.return(!1))}var yt={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 Fc(r,e,t){let{createErrors:n}=r.it;return n===!1?(0,k._)`{}`:sm(r,e,t)}function sm(r,e,t={}){let{gen:n,it:s}=r,i=[im(s,t),om(r,t)];return am(r,e,i),n.object(...i)}function im({errorPath:r},{instancePath:e}){let t=e?(0,k.str)`${r}${(0,un.getErrorPath)(e,un.Type.Str)}`:r;return[ie.default.instancePath,(0,k.strConcat)(ie.default.instancePath,t)]}function om({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:n}){let s=n?e:(0,k.str)`${e}/${r}`;return t&&(s=(0,k.str)`${s}${(0,un.getErrorPath)(t,un.Type.Str)}`),[yt.schemaPath,s]}function am(r,{params:e,message:t},n){let{keyword:s,data:i,schemaValue:o,it:a}=r,{opts:c,propertyName:d,topSchemaRef:u,schemaPath:l}=a;n.push([yt.keyword,s],[yt.params,typeof e=="function"?e(r):e||(0,k._)`{}`]),c.messages&&n.push([yt.message,typeof t=="function"?t(r):t]),c.verbose&&n.push([yt.schema,o],[yt.parentSchema,(0,k._)`${u}${l}`],[ie.default.data,i]),d&&n.push([yt.propertyName,d])}});var Gc=p(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.boolOrEmptySchema=Rt.topBoolOrEmptySchema=void 0;var cm=fr(),um=b(),lm=$e(),dm={message:"boolean schema is false"};function fm(r){let{gen:e,schema:t,validateName:n}=r;t===!1?Uc(r,!1):typeof t=="object"&&t.$async===!0?e.return(lm.default.data):(e.assign((0,um._)`${n}.errors`,null),e.return(!0))}Rt.topBoolOrEmptySchema=fm;function hm(r,e){let{gen:t,schema:n}=r;n===!1?(t.var(e,!1),Uc(r)):t.var(e,!0)}Rt.boolOrEmptySchema=hm;function Uc(r,e){let{gen:t,data:n}=r,s={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,cm.reportError)(s,dm,void 0,e)}});var ci=p(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.getRules=Nt.isJSONType=void 0;var pm=["string","number","integer","boolean","null","object","array"],mm=new Set(pm);function gm(r){return typeof r=="string"&&mm.has(r)}Nt.isJSONType=gm;function ym(){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:{}}}Nt.getRules=ym});var ui=p(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.shouldUseRule=Qe.shouldUseGroup=Qe.schemaHasRulesForType=void 0;function _m({schema:r,self:e},t){let n=e.RULES.types[t];return n&&n!==!0&&Hc(r,n)}Qe.schemaHasRulesForType=_m;function Hc(r,e){return e.rules.some(t=>zc(r,t))}Qe.shouldUseGroup=Hc;function zc(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>r[n]!==void 0))}Qe.shouldUseRule=zc});var hr=p(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.reportTypeError=re.checkDataTypes=re.checkDataType=re.coerceAndCheckDataType=re.getJSONTypes=re.getSchemaTypes=re.DataType=void 0;var $m=ci(),Em=ui(),vm=fr(),A=b(),Kc=I(),Ct;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(Ct||(re.DataType=Ct={}));function wm(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}re.getSchemaTypes=wm;function Wc(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every($m.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}re.getJSONTypes=Wc;function bm(r,e){let{gen:t,data:n,opts:s}=r,i=Sm(e,s.coerceTypes),o=e.length>0&&!(i.length===0&&e.length===1&&(0,Em.schemaHasRulesForType)(r,e[0]));if(o){let a=di(e,n,s.strictNumbers,Ct.Wrong);t.if(a,()=>{i.length?Om(r,e,i):fi(r)})}return o}re.coerceAndCheckDataType=bm;var Bc=new Set(["string","number","integer","boolean","null"]);function Sm(r,e){return e?r.filter(t=>Bc.has(t)||e==="array"&&t==="array"):[]}function Om(r,e,t){let{gen:n,data:s,opts:i}=r,o=n.let("dataType",(0,A._)`typeof ${s}`),a=n.let("coerced",(0,A._)`undefined`);i.coerceTypes==="array"&&n.if((0,A._)`${o} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,(0,A._)`${s}[0]`).assign(o,(0,A._)`typeof ${s}`).if(di(e,s,i.strictNumbers),()=>n.assign(a,s))),n.if((0,A._)`${a} !== undefined`);for(let d of t)(Bc.has(d)||d==="array"&&i.coerceTypes==="array")&&c(d);n.else(),fi(r),n.endIf(),n.if((0,A._)`${a} !== undefined`,()=>{n.assign(s,a),Am(r,a)});function c(d){switch(d){case"string":n.elseIf((0,A._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,A._)`"" + ${s}`).elseIf((0,A._)`${s} === null`).assign(a,(0,A._)`""`);return;case"number":n.elseIf((0,A._)`${o} == "boolean" || ${s} === null
30
+ || (${o} == "string" && ${s} && ${s} == +${s})`).assign(a,(0,A._)`+${s}`);return;case"integer":n.elseIf((0,A._)`${o} === "boolean" || ${s} === null
31
+ || (${o} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(a,(0,A._)`+${s}`);return;case"boolean":n.elseIf((0,A._)`${s} === "false" || ${s} === 0 || ${s} === null`).assign(a,!1).elseIf((0,A._)`${s} === "true" || ${s} === 1`).assign(a,!0);return;case"null":n.elseIf((0,A._)`${s} === "" || ${s} === 0 || ${s} === false`),n.assign(a,null);return;case"array":n.elseIf((0,A._)`${o} === "string" || ${o} === "number"
32
+ || ${o} === "boolean" || ${s} === null`).assign(a,(0,A._)`[${s}]`)}}}function Am({gen:r,parentData:e,parentDataProperty:t},n){r.if((0,A._)`${e} !== undefined`,()=>r.assign((0,A._)`${e}[${t}]`,n))}function li(r,e,t,n=Ct.Correct){let s=n===Ct.Correct?A.operators.EQ:A.operators.NEQ,i;switch(r){case"null":return(0,A._)`${e} ${s} null`;case"array":i=(0,A._)`Array.isArray(${e})`;break;case"object":i=(0,A._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=o((0,A._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=o();break;default:return(0,A._)`typeof ${e} ${s} ${r}`}return n===Ct.Correct?i:(0,A.not)(i);function o(a=A.nil){return(0,A.and)((0,A._)`typeof ${e} == "number"`,a,t?(0,A._)`isFinite(${e})`:A.nil)}}re.checkDataType=li;function di(r,e,t,n){if(r.length===1)return li(r[0],e,t,n);let s,i=(0,Kc.toHash)(r);if(i.array&&i.object){let o=(0,A._)`typeof ${e} != "object"`;s=i.null?o:(0,A._)`!${e} || ${o}`,delete i.null,delete i.array,delete i.object}else s=A.nil;i.number&&delete i.integer;for(let o in i)s=(0,A.and)(s,li(o,e,t,n));return s}re.checkDataTypes=di;var Tm={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,A._)`{type: ${r}}`:(0,A._)`{type: ${e}}`};function fi(r){let e=Pm(r);(0,vm.reportError)(e,Tm)}re.reportTypeError=fi;function Pm(r){let{gen:e,data:t,schema:n}=r,s=(0,Kc.schemaRefOrVal)(r,n,"type");return{gen:e,keyword:"type",data:t,schema:n.type,schemaCode:s,schemaValue:s,parentSchema:n,params:{},it:r}}});var Xc=p(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.assignDefaults=void 0;var xt=b(),Im=I();function Rm(r,e){let{properties:t,items:n}=r.schema;if(e==="object"&&t)for(let s in t)Jc(r,s,t[s].default);else e==="array"&&Array.isArray(n)&&n.forEach((s,i)=>Jc(r,i,s.default))}ln.assignDefaults=Rm;function Jc(r,e,t){let{gen:n,compositeRule:s,data:i,opts:o}=r;if(t===void 0)return;let a=(0,xt._)`${i}${(0,xt.getProperty)(e)}`;if(s){(0,Im.checkStrictMode)(r,`default is ignored for: ${a}`);return}let c=(0,xt._)`${a} === undefined`;o.useDefaults==="empty"&&(c=(0,xt._)`${c} || ${a} === null || ${a} === ""`),n.if(c,(0,xt._)`${a} = ${(0,xt.stringify)(t)}`)}});var Ee=p(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.validateUnion=L.validateArray=L.usePattern=L.callValidateCode=L.schemaProperties=L.allSchemaProperties=L.noPropertyInData=L.propertyInData=L.isOwnProperty=L.hasPropFunc=L.reportMissingProp=L.checkMissingProp=L.checkReportMissingProp=void 0;var F=b(),hi=I(),et=$e(),Nm=I();function Cm(r,e){let{gen:t,data:n,it:s}=r;t.if(mi(t,n,e,s.opts.ownProperties),()=>{r.setParams({missingProperty:(0,F._)`${e}`},!0),r.error()})}L.checkReportMissingProp=Cm;function xm({gen:r,data:e,it:{opts:t}},n,s){return(0,F.or)(...n.map(i=>(0,F.and)(mi(r,e,i,t.ownProperties),(0,F._)`${s} = ${i}`)))}L.checkMissingProp=xm;function km(r,e){r.setParams({missingProperty:e},!0),r.error()}L.reportMissingProp=km;function Yc(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,F._)`Object.prototype.hasOwnProperty`})}L.hasPropFunc=Yc;function pi(r,e,t){return(0,F._)`${Yc(r)}.call(${e}, ${t})`}L.isOwnProperty=pi;function qm(r,e,t,n){let s=(0,F._)`${e}${(0,F.getProperty)(t)} !== undefined`;return n?(0,F._)`${s} && ${pi(r,e,t)}`:s}L.propertyInData=qm;function mi(r,e,t,n){let s=(0,F._)`${e}${(0,F.getProperty)(t)} === undefined`;return n?(0,F.or)(s,(0,F.not)(pi(r,e,t))):s}L.noPropertyInData=mi;function Zc(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}L.allSchemaProperties=Zc;function jm(r,e){return Zc(e).filter(t=>!(0,hi.alwaysValidSchema)(r,e[t]))}L.schemaProperties=jm;function Dm({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:s,errorPath:i},it:o},a,c,d){let u=d?(0,F._)`${r}, ${e}, ${n}${s}`:e,l=[[et.default.instancePath,(0,F.strConcat)(et.default.instancePath,i)],[et.default.parentData,o.parentData],[et.default.parentDataProperty,o.parentDataProperty],[et.default.rootData,et.default.rootData]];o.opts.dynamicRef&&l.push([et.default.dynamicAnchors,et.default.dynamicAnchors]);let f=(0,F._)`${u}, ${t.object(...l)}`;return c!==F.nil?(0,F._)`${a}.call(${c}, ${f})`:(0,F._)`${a}(${f})`}L.callValidateCode=Dm;var Lm=(0,F._)`new RegExp`;function Mm({gen:r,it:{opts:e}},t){let n=e.unicodeRegExp?"u":"",{regExp:s}=e.code,i=s(t,n);return r.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,F._)`${s.code==="new RegExp"?Lm:(0,Nm.useFunc)(r,s)}(${t}, ${n})`})}L.usePattern=Mm;function Vm(r){let{gen:e,data:t,keyword:n,it:s}=r,i=e.name("valid");if(s.allErrors){let a=e.let("valid",!0);return o(()=>e.assign(a,!1)),a}return e.var(i,!0),o(()=>e.break()),i;function o(a){let c=e.const("len",(0,F._)`${t}.length`);e.forRange("i",0,c,d=>{r.subschema({keyword:n,dataProp:d,dataPropType:hi.Type.Num},i),e.if((0,F.not)(i),a)})}}L.validateArray=Vm;function Fm(r){let{gen:e,schema:t,keyword:n,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(c=>(0,hi.alwaysValidSchema)(s,c))&&!s.opts.unevaluated)return;let o=e.let("valid",!1),a=e.name("_valid");e.block(()=>t.forEach((c,d)=>{let u=r.subschema({keyword:n,schemaProp:d,compositeRule:!0},a);e.assign(o,(0,F._)`${o} || ${a}`),r.mergeValidEvaluated(u,a)||e.if((0,F.not)(o))})),r.result(o,()=>r.reset(),()=>r.error(!0))}L.validateUnion=Fm});var tu=p(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.validateKeywordUsage=De.validSchemaType=De.funcKeywordCode=De.macroKeywordCode=void 0;var oe=b(),_t=$e(),Um=Ee(),Gm=fr();function Hm(r,e){let{gen:t,keyword:n,schema:s,parentSchema:i,it:o}=r,a=e.macro.call(o.self,s,i,o),c=eu(t,n,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);let d=t.name("valid");r.subschema({schema:a,schemaPath:oe.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},d),r.pass(d,()=>r.error(!0))}De.macroKeywordCode=Hm;function zm(r,e){var t;let{gen:n,keyword:s,schema:i,parentSchema:o,$data:a,it:c}=r;Wm(c,e);let d=!a&&e.compile?e.compile.call(c.self,i,o,c):e.validate,u=eu(n,s,d),l=n.let("valid");r.block$data(l,f),r.ok((t=e.valid)!==null&&t!==void 0?t:l);function f(){if(e.errors===!1)g(),e.modifying&&Qc(r),y(()=>r.error());else{let _=e.async?h():m();e.modifying&&Qc(r),y(()=>Km(r,_))}}function h(){let _=n.let("ruleErrs",null);return n.try(()=>g((0,oe._)`await `),C=>n.assign(l,!1).if((0,oe._)`${C} instanceof ${c.ValidationError}`,()=>n.assign(_,(0,oe._)`${C}.errors`),()=>n.throw(C))),_}function m(){let _=(0,oe._)`${u}.errors`;return n.assign(_,null),g(oe.nil),_}function g(_=e.async?(0,oe._)`await `:oe.nil){let C=c.opts.passContext?_t.default.this:_t.default.self,R=!("compile"in e&&!a||e.schema===!1);n.assign(l,(0,oe._)`${_}${(0,Um.callValidateCode)(r,u,C,R)}`,e.modifying)}function y(_){var C;n.if((0,oe.not)((C=e.valid)!==null&&C!==void 0?C:l),_)}}De.funcKeywordCode=zm;function Qc(r){let{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,oe._)`${n.parentData}[${n.parentDataProperty}]`))}function Km(r,e){let{gen:t}=r;t.if((0,oe._)`Array.isArray(${e})`,()=>{t.assign(_t.default.vErrors,(0,oe._)`${_t.default.vErrors} === null ? ${e} : ${_t.default.vErrors}.concat(${e})`).assign(_t.default.errors,(0,oe._)`${_t.default.vErrors}.length`),(0,Gm.extendErrors)(r)},()=>r.error())}function Wm({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function eu(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,oe.stringify)(t)})}function Bm(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r>"u")}De.validSchemaType=Bm;function Jm({schema:r,opts:e,self:t,errSchemaPath:n},s,i){if(Array.isArray(s.keyword)?!s.keyword.includes(i):s.keyword!==i)throw new Error("ajv implementation error");let o=s.dependencies;if(o?.some(a=>!Object.prototype.hasOwnProperty.call(r,a)))throw new Error(`parent schema must have dependencies of ${i}: ${o.join(",")}`);if(s.validateSchema&&!s.validateSchema(r[i])){let c=`keyword "${i}" value is invalid at path "${n}": `+t.errorsText(s.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(c);else throw new Error(c)}}De.validateKeywordUsage=Jm});var nu=p(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.extendSubschemaMode=tt.extendSubschemaData=tt.getSubschema=void 0;var Le=b(),ru=I();function Xm(r,{keyword:e,schemaProp:t,schema:n,schemaPath:s,errSchemaPath:i,topSchemaRef:o}){if(e!==void 0&&n!==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,Le._)`${r.schemaPath}${(0,Le.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:a[t],schemaPath:(0,Le._)`${r.schemaPath}${(0,Le.getProperty)(e)}${(0,Le.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,ru.escapeFragment)(t)}`}}if(n!==void 0){if(s===void 0||i===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:s,topSchemaRef:o,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')}tt.getSubschema=Xm;function Ym(r,e,{dataProp:t,dataPropType:n,data:s,dataTypes:i,propertyName:o}){if(s!==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:d,dataPathArr:u,opts:l}=e,f=a.let("data",(0,Le._)`${e.data}${(0,Le.getProperty)(t)}`,!0);c(f),r.errorPath=(0,Le.str)`${d}${(0,ru.getErrorPath)(t,n,l.jsPropertySyntax)}`,r.parentDataProperty=(0,Le._)`${t}`,r.dataPathArr=[...u,r.parentDataProperty]}if(s!==void 0){let d=s instanceof Le.Name?s:a.let("data",s,!0);c(d),o!==void 0&&(r.propertyName=o)}i&&(r.dataTypes=i);function c(d){r.data=d,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,d]}}tt.extendSubschemaData=Ym;function Zm(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:s,allErrors:i}){n!==void 0&&(r.compositeRule=n),s!==void 0&&(r.createErrors=s),i!==void 0&&(r.allErrors=i),r.jtdDiscriminator=e,r.jtdMetadata=t}tt.extendSubschemaMode=Zm});var gi=p((MO,su)=>{"use strict";su.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 n,s,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(s=n;s--!==0;)if(!r(e[s],t[s]))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(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[s]))return!1;for(s=n;s--!==0;){var o=i[s];if(!r(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}});var ou=p((VO,iu)=>{"use strict";var rt=iu.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},s=t.post||function(){};dn(e,n,s,r,"",r)};rt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};rt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};rt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};rt.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 dn(r,e,t,n,s,i,o,a,c,d){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,s,i,o,a,c,d);for(var u in n){var l=n[u];if(Array.isArray(l)){if(u in rt.arrayKeywords)for(var f=0;f<l.length;f++)dn(r,e,t,l[f],s+"/"+u+"/"+f,i,s,u,n,f)}else if(u in rt.propsKeywords){if(l&&typeof l=="object")for(var h in l)dn(r,e,t,l[h],s+"/"+u+"/"+Qm(h),i,s,u,n,h)}else(u in rt.keywords||r.allKeys&&!(u in rt.skipKeywords))&&dn(r,e,t,l,s+"/"+u,i,s,u,n)}t(n,s,i,o,a,c,d)}}function Qm(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var pr=p(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.getSchemaRefs=he.resolveUrl=he.normalizeId=he._getFullPath=he.getFullPath=he.inlineRef=void 0;var eg=I(),tg=gi(),rg=ou(),ng=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function sg(r,e=!0){return typeof r=="boolean"?!0:e===!0?!yi(r):e?au(r)<=e:!1}he.inlineRef=sg;var ig=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function yi(r){for(let e in r){if(ig.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(yi)||typeof t=="object"&&yi(t))return!0}return!1}function au(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!ng.has(t)&&(typeof r[t]=="object"&&(0,eg.eachItem)(r[t],n=>e+=au(n)),e===1/0))return 1/0}return e}function cu(r,e="",t){t!==!1&&(e=kt(e));let n=r.parse(e);return uu(r,n)}he.getFullPath=cu;function uu(r,e){return r.serialize(e).split("#")[0]+"#"}he._getFullPath=uu;var og=/#\/?$/;function kt(r){return r?r.replace(og,""):""}he.normalizeId=kt;function ag(r,e,t){return t=kt(t),r.resolve(e,t)}he.resolveUrl=ag;var cg=/^[a-z_][-a-z0-9._]*$/i;function ug(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:n}=this.opts,s=kt(r[t]||e),i={"":s},o=cu(n,s,!1),a={},c=new Set;return rg(r,{allKeys:!0},(l,f,h,m)=>{if(m===void 0)return;let g=o+f,y=i[m];typeof l[t]=="string"&&(y=_.call(this,l[t])),C.call(this,l.$anchor),C.call(this,l.$dynamicAnchor),i[f]=y;function _(R){let V=this.opts.uriResolver.resolve;if(R=kt(y?V(y,R):R),c.has(R))throw u(R);c.add(R);let S=this.refs[R];return typeof S=="string"&&(S=this.refs[S]),typeof S=="object"?d(l,S.schema,R):R!==kt(g)&&(R[0]==="#"?(d(l,a[R],R),a[R]=l):this.refs[R]=g),R}function C(R){if(typeof R=="string"){if(!cg.test(R))throw new Error(`invalid anchor "${R}"`);_.call(this,`#${R}`)}}}),a;function d(l,f,h){if(f!==void 0&&!tg(l,f))throw u(h)}function u(l){return new Error(`reference "${l}" resolves to more than one schema`)}}he.getSchemaRefs=ug});var qt=p(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.getData=nt.KeywordCxt=nt.validateFunctionCode=void 0;var pu=Gc(),lu=hr(),$i=ui(),fn=hr(),lg=Xc(),gr=tu(),_i=nu(),v=b(),w=$e(),dg=pr(),Be=I(),mr=fr();function fg(r){if(yu(r)&&(_u(r),gu(r))){mg(r);return}mu(r,()=>(0,pu.topBoolOrEmptySchema)(r))}nt.validateFunctionCode=fg;function mu({gen:r,validateName:e,schema:t,schemaEnv:n,opts:s},i){s.code.es5?r.func(e,(0,v._)`${w.default.data}, ${w.default.valCxt}`,n.$async,()=>{r.code((0,v._)`"use strict"; ${du(t,s)}`),pg(r,s),r.code(i)}):r.func(e,(0,v._)`${w.default.data}, ${hg(s)}`,n.$async,()=>r.code(du(t,s)).code(i))}function hg(r){return(0,v._)`{${w.default.instancePath}="", ${w.default.parentData}, ${w.default.parentDataProperty}, ${w.default.rootData}=${w.default.data}${r.dynamicRef?(0,v._)`, ${w.default.dynamicAnchors}={}`:v.nil}}={}`}function pg(r,e){r.if(w.default.valCxt,()=>{r.var(w.default.instancePath,(0,v._)`${w.default.valCxt}.${w.default.instancePath}`),r.var(w.default.parentData,(0,v._)`${w.default.valCxt}.${w.default.parentData}`),r.var(w.default.parentDataProperty,(0,v._)`${w.default.valCxt}.${w.default.parentDataProperty}`),r.var(w.default.rootData,(0,v._)`${w.default.valCxt}.${w.default.rootData}`),e.dynamicRef&&r.var(w.default.dynamicAnchors,(0,v._)`${w.default.valCxt}.${w.default.dynamicAnchors}`)},()=>{r.var(w.default.instancePath,(0,v._)`""`),r.var(w.default.parentData,(0,v._)`undefined`),r.var(w.default.parentDataProperty,(0,v._)`undefined`),r.var(w.default.rootData,w.default.data),e.dynamicRef&&r.var(w.default.dynamicAnchors,(0,v._)`{}`)})}function mg(r){let{schema:e,opts:t,gen:n}=r;mu(r,()=>{t.$comment&&e.$comment&&Eu(r),Eg(r),n.let(w.default.vErrors,null),n.let(w.default.errors,0),t.unevaluated&&gg(r),$u(r),bg(r)})}function gg(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,v._)`${t}.evaluated`),e.if((0,v._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,v._)`${r.evaluated}.props`,(0,v._)`undefined`)),e.if((0,v._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,v._)`${r.evaluated}.items`,(0,v._)`undefined`))}function du(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,v._)`/*# sourceURL=${t} */`:v.nil}function yg(r,e){if(yu(r)&&(_u(r),gu(r))){_g(r,e);return}(0,pu.boolOrEmptySchema)(r,e)}function gu({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 yu(r){return typeof r.schema!="boolean"}function _g(r,e){let{schema:t,gen:n,opts:s}=r;s.$comment&&t.$comment&&Eu(r),vg(r),wg(r);let i=n.const("_errs",w.default.errors);$u(r,i),n.var(e,(0,v._)`${i} === ${w.default.errors}`)}function _u(r){(0,Be.checkUnknownRules)(r),$g(r)}function $u(r,e){if(r.opts.jtd)return fu(r,[],!1,e);let t=(0,lu.getSchemaTypes)(r.schema),n=(0,lu.coerceAndCheckDataType)(r,t);fu(r,t,!n,e)}function $g(r){let{schema:e,errSchemaPath:t,opts:n,self:s}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,Be.schemaHasRulesButRef)(e,s.RULES)&&s.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function Eg(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,Be.checkStrictMode)(r,"default is ignored in the schema root")}function vg(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,dg.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function wg(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function Eu({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:s}){let i=t.$comment;if(s.$comment===!0)r.code((0,v._)`${w.default.self}.logger.log(${i})`);else if(typeof s.$comment=="function"){let o=(0,v.str)`${n}/$comment`,a=r.scopeValue("root",{ref:e.root});r.code((0,v._)`${w.default.self}.opts.$comment(${i}, ${o}, ${a}.schema)`)}}function bg(r){let{gen:e,schemaEnv:t,validateName:n,ValidationError:s,opts:i}=r;t.$async?e.if((0,v._)`${w.default.errors} === 0`,()=>e.return(w.default.data),()=>e.throw((0,v._)`new ${s}(${w.default.vErrors})`)):(e.assign((0,v._)`${n}.errors`,w.default.vErrors),i.unevaluated&&Sg(r),e.return((0,v._)`${w.default.errors} === 0`))}function Sg({gen:r,evaluated:e,props:t,items:n}){t instanceof v.Name&&r.assign((0,v._)`${e}.props`,t),n instanceof v.Name&&r.assign((0,v._)`${e}.items`,n)}function fu(r,e,t,n){let{gen:s,schema:i,data:o,allErrors:a,opts:c,self:d}=r,{RULES:u}=d;if(i.$ref&&(c.ignoreKeywordsWithRef||!(0,Be.schemaHasRulesButRef)(i,u))){s.block(()=>wu(r,"$ref",u.all.$ref.definition));return}c.jtd||Og(r,e),s.block(()=>{for(let f of u.rules)l(f);l(u.post)});function l(f){(0,$i.shouldUseGroup)(i,f)&&(f.type?(s.if((0,fn.checkDataType)(f.type,o,c.strictNumbers)),hu(r,f),e.length===1&&e[0]===f.type&&t&&(s.else(),(0,fn.reportTypeError)(r)),s.endIf()):hu(r,f),a||s.if((0,v._)`${w.default.errors} === ${n||0}`))}}function hu(r,e){let{gen:t,schema:n,opts:{useDefaults:s}}=r;s&&(0,lg.assignDefaults)(r,e.type),t.block(()=>{for(let i of e.rules)(0,$i.shouldUseRule)(n,i)&&wu(r,i.keyword,i.definition,e.type)})}function Og(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(Ag(r,e),r.opts.allowUnionTypes||Tg(r,e),Pg(r,r.dataTypes))}function Ag(r,e){if(e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{vu(r.dataTypes,t)||Ei(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),Rg(r,e)}}function Tg(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Ei(r,"use allowUnionTypes to allow union type keyword")}function Pg(r,e){let t=r.self.RULES.all;for(let n in t){let s=t[n];if(typeof s=="object"&&(0,$i.shouldUseRule)(r.schema,s)){let{type:i}=s.definition;i.length&&!i.some(o=>Ig(e,o))&&Ei(r,`missing type "${i.join(",")}" for keyword "${n}"`)}}}function Ig(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function vu(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function Rg(r,e){let t=[];for(let n of r.dataTypes)vu(e,n)?t.push(n):e.includes("integer")&&n==="number"&&t.push("integer");r.dataTypes=t}function Ei(r,e){let t=r.schemaEnv.baseId+r.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,Be.checkStrictMode)(r,e,r.opts.strictTypes)}var hn=class{constructor(e,t,n){if((0,gr.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Be.schemaRefOrVal)(e,this.schema,n,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",bu(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,gr.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",w.default.errors))}result(e,t,n){this.failResult((0,v.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():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,v.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,v._)`${t} !== undefined && (${(0,v.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?mr.reportExtraError:mr.reportError)(this,this.def.error,t)}$dataError(){(0,mr.reportError)(this,this.def.$dataError||mr.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,mr.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,n=v.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=v.nil,t=v.nil){if(!this.$data)return;let{gen:n,schemaCode:s,schemaType:i,def:o}=this;n.if((0,v.or)((0,v._)`${s} === undefined`,t)),e!==v.nil&&n.assign(e,!0),(i.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==v.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:s,it:i}=this;return(0,v.or)(o(),a());function o(){if(n.length){if(!(t instanceof v.Name))throw new Error("ajv implementation error");let c=Array.isArray(n)?n:[n];return(0,v._)`${(0,fn.checkDataTypes)(c,t,i.opts.strictNumbers,fn.DataType.Wrong)}`}return v.nil}function a(){if(s.validateSchema){let c=e.scopeValue("validate$data",{ref:s.validateSchema});return(0,v._)`!${c}(${t})`}return v.nil}}subschema(e,t){let n=(0,_i.getSubschema)(this.it,e);(0,_i.extendSubschemaData)(n,this.it,e),(0,_i.extendSubschemaMode)(n,e);let s={...this.it,...n,items:void 0,props:void 0};return yg(s,t),s}mergeEvaluated(e,t){let{it:n,gen:s}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Be.mergeEvaluated.props(s,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=Be.mergeEvaluated.items(s,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:s}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return s.if(t,()=>this.mergeEvaluated(e,v.Name)),!0}};nt.KeywordCxt=hn;function wu(r,e,t,n){let s=new hn(r,t,e);"code"in t?t.code(s,n):s.$data&&t.validate?(0,gr.funcKeywordCode)(s,t):"macro"in t?(0,gr.macroKeywordCode)(s,t):(t.compile||t.validate)&&(0,gr.funcKeywordCode)(s,t)}var Ng=/^\/(?:[^~]|~0|~1)*$/,Cg=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function bu(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let s,i;if(r==="")return w.default.rootData;if(r[0]==="/"){if(!Ng.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);s=r,i=w.default.rootData}else{let d=Cg.exec(r);if(!d)throw new Error(`Invalid JSON-pointer: ${r}`);let u=+d[1];if(s=d[2],s==="#"){if(u>=e)throw new Error(c("property/index",u));return n[e-u]}if(u>e)throw new Error(c("data",u));if(i=t[e-u],!s)return i}let o=i,a=s.split("/");for(let d of a)d&&(i=(0,v._)`${i}${(0,v.getProperty)((0,Be.unescapeJsonPointer)(d))}`,o=(0,v._)`${o} && ${i}`);return o;function c(d,u){return`Cannot access ${d} ${u} levels up, current level is ${e}`}}nt.getData=bu});var yr=p(wi=>{"use strict";Object.defineProperty(wi,"__esModule",{value:!0});var vi=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};wi.default=vi});var jt=p(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});var bi=pr(),Si=class extends Error{constructor(e,t,n,s){super(s||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,bi.resolveUrl)(e,t,n),this.missingSchema=(0,bi.normalizeId)((0,bi.getFullPath)(e,this.missingRef))}};Oi.default=Si});var _r=p(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.resolveSchema=ve.getCompilingSchema=ve.resolveRef=ve.compileSchema=ve.SchemaEnv=void 0;var Pe=b(),xg=yr(),$t=$e(),Ie=pr(),Su=I(),kg=qt(),Dt=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=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,Ie.normalizeId)(n?.[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n?.$async,this.refs={}}};ve.SchemaEnv=Dt;function Ti(r){let e=Ou.call(this,r);if(e)return e;let t=(0,Ie.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:s}=this.opts.code,{ownProperties:i}=this.opts,o=new Pe.CodeGen(this.scope,{es5:n,lines:s,ownProperties:i}),a;r.$async&&(a=o.scopeValue("Error",{ref:xg.default,code:(0,Pe._)`require("ajv/dist/runtime/validation_error").default`}));let c=o.scopeName("validate");r.validateName=c;let d={gen:o,allErrors:this.opts.allErrors,data:$t.default.data,parentData:$t.default.parentData,parentDataProperty:$t.default.parentDataProperty,dataNames:[$t.default.data],dataPathArr:[Pe.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Pe.stringify)(r.schema)}:{ref:r.schema}),validateName:c,ValidationError:a,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Pe.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Pe._)`""`,opts:this.opts,self:this},u;try{this._compilations.add(r),(0,kg.validateFunctionCode)(d),o.optimize(this.opts.code.optimize);let l=o.toString();u=`${o.scopeRefs($t.default.scope)}return ${l}`,this.opts.code.process&&(u=this.opts.code.process(u,r));let h=new Function(`${$t.default.self}`,`${$t.default.scope}`,u)(this,this.scope.get());if(this.scope.value(c,{ref:h}),h.errors=null,h.schema=r.schema,h.schemaEnv=r,r.$async&&(h.$async=!0),this.opts.code.source===!0&&(h.source={validateName:c,validateCode:l,scopeValues:o._values}),this.opts.unevaluated){let{props:m,items:g}=d;h.evaluated={props:m instanceof Pe.Name?void 0:m,items:g instanceof Pe.Name?void 0:g,dynamicProps:m instanceof Pe.Name,dynamicItems:g instanceof Pe.Name},h.source&&(h.source.evaluated=(0,Pe.stringify)(h.evaluated))}return r.validate=h,r}catch(l){throw delete r.validate,delete r.validateName,u&&this.logger.error("Error compiling schema, function code:",u),l}finally{this._compilations.delete(r)}}ve.compileSchema=Ti;function qg(r,e,t){var n;t=(0,Ie.resolveUrl)(this.opts.uriResolver,e,t);let s=r.refs[t];if(s)return s;let i=Lg.call(this,r,t);if(i===void 0){let o=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:a}=this.opts;o&&(i=new Dt({schema:o,schemaId:a,root:r,baseId:e}))}if(i!==void 0)return r.refs[t]=jg.call(this,i)}ve.resolveRef=qg;function jg(r){return(0,Ie.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:Ti.call(this,r)}function Ou(r){for(let e of this._compilations)if(Dg(e,r))return e}ve.getCompilingSchema=Ou;function Dg(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function Lg(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||pn.call(this,r,e)}function pn(r,e){let t=this.opts.uriResolver.parse(e),n=(0,Ie._getFullPath)(this.opts.uriResolver,t),s=(0,Ie.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===s)return Ai.call(this,t,r);let i=(0,Ie.normalizeId)(n),o=this.refs[i]||this.schemas[i];if(typeof o=="string"){let a=pn.call(this,r,o);return typeof a?.schema!="object"?void 0:Ai.call(this,t,a)}if(typeof o?.schema=="object"){if(o.validate||Ti.call(this,o),i===(0,Ie.normalizeId)(e)){let{schema:a}=o,{schemaId:c}=this.opts,d=a[c];return d&&(s=(0,Ie.resolveUrl)(this.opts.uriResolver,s,d)),new Dt({schema:a,schemaId:c,root:r,baseId:s})}return Ai.call(this,t,o)}}ve.resolveSchema=pn;var Mg=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ai(r,{baseId:e,schema:t,root:n}){var s;if(((s=r.fragment)===null||s===void 0?void 0:s[0])!=="/")return;for(let a of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let c=t[(0,Su.unescapeFragment)(a)];if(c===void 0)return;t=c;let d=typeof t=="object"&&t[this.opts.schemaId];!Mg.has(a)&&d&&(e=(0,Ie.resolveUrl)(this.opts.uriResolver,e,d))}let i;if(typeof t!="boolean"&&t.$ref&&!(0,Su.schemaHasRulesButRef)(t,this.RULES)){let a=(0,Ie.resolveUrl)(this.opts.uriResolver,e,t.$ref);i=pn.call(this,n,a)}let{schemaId:o}=this.opts;if(i=i||new Dt({schema:t,schemaId:o,root:n,baseId:e}),i.schema!==i.root.schema)return i}});var Au=p((KO,Vg)=>{Vg.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 Ii=p((WO,Ru)=>{"use strict";var Fg=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Pu=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 Pi(r){let e="",t=0,n=0;for(n=0;n<r.length;n++)if(t=r[n].charCodeAt(0),t!==48){if(!(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102))return"";e+=r[n];break}for(n+=1;n<r.length;n++){if(t=r[n].charCodeAt(0),!(t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102))return"";e+=r[n]}return e}var Ug=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Tu(r){return r.length=0,!0}function Gg(r,e,t){if(r.length){let n=Pi(r);if(n!=="")e.push(n);else return t.error=!0,!1;r.length=0}return!0}function Hg(r){let e=0,t={error:!1,address:"",zone:""},n=[],s=[],i=!1,o=!1,a=Gg;for(let c=0;c<r.length;c++){let d=r[c];if(!(d==="["||d==="]"))if(d===":"){if(i===!0&&(o=!0),!a(s,n,t))break;if(++e>7){t.error=!0;break}c>0&&r[c-1]===":"&&(i=!0),n.push(":");continue}else if(d==="%"){if(!a(s,n,t))break;a=Tu}else{s.push(d);continue}}return s.length&&(a===Tu?t.zone=s.join(""):o?n.push(s.join("")):n.push(Pi(s))),t.address=n.join(""),t}function Iu(r){if(zg(r,":")<2)return{host:r,isIPV6:!1};let e=Hg(r);if(e.error)return{host:r,isIPV6:!1};{let t=e.address,n=e.address;return e.zone&&(t+="%"+e.zone,n+="%25"+e.zone),{host:t,isIPV6:!0,escapedHost:n}}}function zg(r,e){let t=0;for(let n=0;n<r.length;n++)r[n]===e&&t++;return t}function Kg(r){let e=r,t=[],n=-1,s=0;for(;s=e.length;){if(s===1){if(e===".")break;if(e==="/"){t.push("/");break}else{t.push(e);break}}else if(s===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(s===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((n=e.indexOf("/",1))===-1){t.push(e);break}else t.push(e.slice(0,n)),e=e.slice(n)}return t.join("")}function Wg(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 Bg(r){let e=[];if(r.userinfo!==void 0&&(e.push(r.userinfo),e.push("@")),r.host!==void 0){let t=unescape(r.host);if(!Pu(t)){let n=Iu(t);n.isIPV6===!0?t=`[${n.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}Ru.exports={nonSimpleDomain:Ug,recomposeAuthority:Bg,normalizeComponentEncoding:Wg,removeDotSegments:Kg,isIPv4:Pu,isUUID:Fg,normalizeIPv6:Iu,stringArrayToHexStripped:Pi}});var qu=p((BO,ku)=>{"use strict";var{isUUID:Jg}=Ii(),Xg=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,Yg=["http","https","ws","wss","urn","urn:uuid"];function Zg(r){return Yg.indexOf(r)!==-1}function Ri(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 Nu(r){return r.host||(r.error=r.error||"HTTP URIs must have a host."),r}function Cu(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 Qg(r){return r.secure=Ri(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r}function ey(r){if((r.port===(Ri(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 ty(r,e){if(!r.path)return r.error="URN can not be parsed",r;let t=r.path.match(Xg);if(t){let n=e.scheme||r.scheme||"urn";r.nid=t[1].toLowerCase(),r.nss=t[2];let s=`${n}:${e.nid||r.nid}`,i=Ni(s);r.path=void 0,i&&(r=i.parse(r,e))}else r.error=r.error||"URN can not be parsed.";return r}function ry(r,e){if(r.nid===void 0)throw new Error("URN without nid cannot be serialized");let t=e.scheme||r.scheme||"urn",n=r.nid.toLowerCase(),s=`${t}:${e.nid||n}`,i=Ni(s);i&&(r=i.serialize(r,e));let o=r,a=r.nss;return o.path=`${n||e.nid}:${a}`,e.skipEscape=!0,o}function ny(r,e){let t=r;return t.uuid=t.nss,t.nss=void 0,!e.tolerant&&(!t.uuid||!Jg(t.uuid))&&(t.error=t.error||"UUID is not valid."),t}function sy(r){let e=r;return e.nss=(r.uuid||"").toLowerCase(),e}var xu={scheme:"http",domainHost:!0,parse:Nu,serialize:Cu},iy={scheme:"https",domainHost:xu.domainHost,parse:Nu,serialize:Cu},mn={scheme:"ws",domainHost:!0,parse:Qg,serialize:ey},oy={scheme:"wss",domainHost:mn.domainHost,parse:mn.parse,serialize:mn.serialize},ay={scheme:"urn",parse:ty,serialize:ry,skipNormalize:!0},cy={scheme:"urn:uuid",parse:ny,serialize:sy,skipNormalize:!0},gn={http:xu,https:iy,ws:mn,wss:oy,urn:ay,"urn:uuid":cy};Object.setPrototypeOf(gn,null);function Ni(r){return r&&(gn[r]||gn[r.toLowerCase()])||void 0}ku.exports={wsIsSecure:Ri,SCHEMES:gn,isValidSchemeName:Zg,getSchemeHandler:Ni}});var Lu=p((JO,_n)=>{"use strict";var{normalizeIPv6:uy,removeDotSegments:$r,recomposeAuthority:ly,normalizeComponentEncoding:yn,isIPv4:dy,nonSimpleDomain:fy}=Ii(),{SCHEMES:hy,getSchemeHandler:ju}=qu();function py(r,e){return typeof r=="string"?r=Me(Je(r,e),e):typeof r=="object"&&(r=Je(Me(r,e),e)),r}function my(r,e,t){let n=t?Object.assign({scheme:"null"},t):{scheme:"null"},s=Du(Je(r,n),Je(e,n),n,!0);return n.skipEscape=!0,Me(s,n)}function Du(r,e,t,n){let s={};return n||(r=Je(Me(r,t),t),e=Je(Me(e,t),t)),t=t||{},!t.tolerant&&e.scheme?(s.scheme=e.scheme,s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=$r(e.path||""),s.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(s.userinfo=e.userinfo,s.host=e.host,s.port=e.port,s.path=$r(e.path||""),s.query=e.query):(e.path?(e.path[0]==="/"?s.path=$r(e.path):((r.userinfo!==void 0||r.host!==void 0||r.port!==void 0)&&!r.path?s.path="/"+e.path:r.path?s.path=r.path.slice(0,r.path.lastIndexOf("/")+1)+e.path:s.path=e.path,s.path=$r(s.path)),s.query=e.query):(s.path=r.path,e.query!==void 0?s.query=e.query:s.query=r.query),s.userinfo=r.userinfo,s.host=r.host,s.port=r.port),s.scheme=r.scheme),s.fragment=e.fragment,s}function gy(r,e,t){return typeof r=="string"?(r=unescape(r),r=Me(yn(Je(r,t),!0),{...t,skipEscape:!0})):typeof r=="object"&&(r=Me(yn(r,!0),{...t,skipEscape:!0})),typeof e=="string"?(e=unescape(e),e=Me(yn(Je(e,t),!0),{...t,skipEscape:!0})):typeof e=="object"&&(e=Me(yn(e,!0),{...t,skipEscape:!0})),r.toLowerCase()===e.toLowerCase()}function Me(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:""},n=Object.assign({},e),s=[],i=ju(n.scheme||t.scheme);i&&i.serialize&&i.serialize(t,n),t.path!==void 0&&(n.skipEscape?t.path=unescape(t.path):(t.path=escape(t.path),t.scheme!==void 0&&(t.path=t.path.split("%3A").join(":")))),n.reference!=="suffix"&&t.scheme&&s.push(t.scheme,":");let o=ly(t);if(o!==void 0&&(n.reference!=="suffix"&&s.push("//"),s.push(o),t.path&&t.path[0]!=="/"&&s.push("/")),t.path!==void 0){let a=t.path;!n.absolutePath&&(!i||!i.absolutePath)&&(a=$r(a)),o===void 0&&a[0]==="/"&&a[1]==="/"&&(a="/%2F"+a.slice(2)),s.push(a)}return t.query!==void 0&&s.push("?",t.query),t.fragment!==void 0&&s.push("#",t.fragment),s.join("")}var yy=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Je(r,e){let t=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=!1;t.reference==="suffix"&&(t.scheme?r=t.scheme+":"+r:r="//"+r);let i=r.match(yy);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host)if(dy(n.host)===!1){let c=uy(n.host);n.host=c.host.toLowerCase(),s=c.isIPV6}else s=!0;n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",t.reference&&t.reference!=="suffix"&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");let o=ju(t.scheme||n.scheme);if(!t.unicodeSupport&&(!o||!o.unicodeSupport)&&n.host&&(t.domainHost||o&&o.domainHost)&&s===!1&&fy(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(a){n.error=n.error||"Host's domain name can not be converted to ASCII: "+a}(!o||o&&!o.skipNormalize)&&(r.indexOf("%")!==-1&&(n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),n.host!==void 0&&(n.host=unescape(n.host))),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),o&&o.parse&&o.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}var Ci={SCHEMES:hy,normalize:py,resolve:my,resolveComponent:Du,equal:gy,serialize:Me,parse:Je};_n.exports=Ci;_n.exports.default=Ci;_n.exports.fastUri=Ci});var Vu=p(xi=>{"use strict";Object.defineProperty(xi,"__esModule",{value:!0});var Mu=Lu();Mu.code='require("ajv/dist/runtime/uri").default';xi.default=Mu});var ji=p(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.CodeGen=Z.Name=Z.nil=Z.stringify=Z.str=Z._=Z.KeywordCxt=void 0;var _y=qt();Object.defineProperty(Z,"KeywordCxt",{enumerable:!0,get:function(){return _y.KeywordCxt}});var Lt=b();Object.defineProperty(Z,"_",{enumerable:!0,get:function(){return Lt._}});Object.defineProperty(Z,"str",{enumerable:!0,get:function(){return Lt.str}});Object.defineProperty(Z,"stringify",{enumerable:!0,get:function(){return Lt.stringify}});Object.defineProperty(Z,"nil",{enumerable:!0,get:function(){return Lt.nil}});Object.defineProperty(Z,"Name",{enumerable:!0,get:function(){return Lt.Name}});Object.defineProperty(Z,"CodeGen",{enumerable:!0,get:function(){return Lt.CodeGen}});var $y=yr(),zu=jt(),Ey=ci(),Er=_r(),vy=b(),vr=pr(),$n=hr(),qi=I(),Fu=Au(),wy=Vu(),Ku=(r,e)=>new RegExp(r,e);Ku.code="new RegExp";var by=["removeAdditional","useDefaults","coerceTypes"],Sy=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Oy={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."},Ay={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Uu=200;function Ty(r){var e,t,n,s,i,o,a,c,d,u,l,f,h,m,g,y,_,C,R,V,S,Ce,He,rs,ns;let Zt=r.strict,ss=(e=r.code)===null||e===void 0?void 0:e.optimize,qa=ss===!0||ss===void 0?1:ss||0,ja=(n=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&n!==void 0?n:Ku,Kh=(s=r.uriResolver)!==null&&s!==void 0?s:wy.default;return{strictSchema:(o=(i=r.strictSchema)!==null&&i!==void 0?i:Zt)!==null&&o!==void 0?o:!0,strictNumbers:(c=(a=r.strictNumbers)!==null&&a!==void 0?a:Zt)!==null&&c!==void 0?c:!0,strictTypes:(u=(d=r.strictTypes)!==null&&d!==void 0?d:Zt)!==null&&u!==void 0?u:"log",strictTuples:(f=(l=r.strictTuples)!==null&&l!==void 0?l:Zt)!==null&&f!==void 0?f:"log",strictRequired:(m=(h=r.strictRequired)!==null&&h!==void 0?h:Zt)!==null&&m!==void 0?m:!1,code:r.code?{...r.code,optimize:qa,regExp:ja}:{optimize:qa,regExp:ja},loopRequired:(g=r.loopRequired)!==null&&g!==void 0?g:Uu,loopEnum:(y=r.loopEnum)!==null&&y!==void 0?y:Uu,meta:(_=r.meta)!==null&&_!==void 0?_:!0,messages:(C=r.messages)!==null&&C!==void 0?C:!0,inlineRefs:(R=r.inlineRefs)!==null&&R!==void 0?R:!0,schemaId:(V=r.schemaId)!==null&&V!==void 0?V:"$id",addUsedSchema:(S=r.addUsedSchema)!==null&&S!==void 0?S:!0,validateSchema:(Ce=r.validateSchema)!==null&&Ce!==void 0?Ce:!0,validateFormats:(He=r.validateFormats)!==null&&He!==void 0?He:!0,unicodeRegExp:(rs=r.unicodeRegExp)!==null&&rs!==void 0?rs:!0,int32range:(ns=r.int32range)!==null&&ns!==void 0?ns:!0,uriResolver:Kh}}var wr=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...Ty(e)};let{es5:t,lines:n}=this.opts.code;this.scope=new vy.ValueScope({scope:{},prefixes:Sy,es5:t,lines:n}),this.logger=xy(e.logger);let s=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Ey.getRules)(),Gu.call(this,Oy,e,"NOT SUPPORTED"),Gu.call(this,Ay,e,"DEPRECATED","warn"),this._metaOpts=Ny.call(this),e.formats&&Iy.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Ry.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Py.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,s=Fu;n==="id"&&(s={...Fu},s.id=s.$id,delete s.$id),t&&e&&this.addMetaSchema(s,s[n],!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 n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let s=n(t);return"$async"in n||(this.errors=n.errors),s}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return s.call(this,e,t);async function s(u,l){await i.call(this,u.$schema);let f=this._addSchema(u,l);return f.validate||o.call(this,f)}async function i(u){u&&!this.getSchema(u)&&await s.call(this,{$ref:u},!0)}async function o(u){try{return this._compileSchemaEnv(u)}catch(l){if(!(l instanceof zu.default))throw l;return a.call(this,l),await c.call(this,l.missingSchema),o.call(this,u)}}function a({missingSchema:u,missingRef:l}){if(this.refs[u])throw new Error(`AnySchema ${u} is loaded but ${l} cannot be resolved`)}async function c(u){let l=await d.call(this,u);this.refs[u]||await i.call(this,l.$schema),this.refs[u]||this.addSchema(l,u,t)}async function d(u){let l=this._loading[u];if(l)return l;try{return await(this._loading[u]=n(u))}finally{delete this._loading[u]}}}addSchema(e,t,n,s=this.opts.validateSchema){if(Array.isArray(e)){for(let o of e)this.addSchema(o,void 0,n,s);return this}let i;if(typeof e=="object"){let{schemaId:o}=this.opts;if(i=e[o],i!==void 0&&typeof i!="string")throw new Error(`schema ${o} must be string`)}return t=(0,vr.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,s,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let s=this.validate(n,e);if(!s&&t){let i="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(i);else throw new Error(i)}return s}getSchema(e){let t;for(;typeof(t=Hu.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:n}=this.opts,s=new Er.SchemaEnv({schema:{},schemaId:n});if(t=Er.resolveSchema.call(this,s,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=Hu.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 n=e[this.opts.schemaId];return n&&(n=(0,vr.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),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 n;if(typeof e=="string")n=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(qy.call(this,n,t),!t)return(0,qi.eachItem)(n,i=>ki.call(this,i)),this;Dy.call(this,t);let s={...t,type:(0,$n.getJSONTypes)(t.type),schemaType:(0,$n.getJSONTypes)(t.schemaType)};return(0,qi.eachItem)(n,s.type.length===0?i=>ki.call(this,i,s):i=>s.type.forEach(o=>ki.call(this,i,s,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 n of t.rules){let s=n.rules.findIndex(i=>i.keyword===e);s>=0&&n.rules.splice(s,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:n="data"}={}){return!e||e.length===0?"No errors":e.map(s=>`${n}${s.instancePath} ${s.message}`).reduce((s,i)=>s+t+i)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let s of t){let i=s.split("/").slice(1),o=e;for(let a of i)o=o[a];for(let a in n){let c=n[a];if(typeof c!="object")continue;let{$data:d}=c.definition,u=o[a];d&&u&&(o[a]=Wu(u))}}return e}_removeAllSchemas(e,t){for(let n in e){let s=e[n];(!t||t.test(n))&&(typeof s=="string"?delete e[n]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[n]))}}_addSchema(e,t,n,s=this.opts.validateSchema,i=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 c=this._cache.get(e);if(c!==void 0)return c;n=(0,vr.normalizeId)(o||n);let d=vr.getSchemaRefs.call(this,e,n);return c=new Er.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:n,localRefs:d}),this._cache.set(c.schema,c),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=c),s&&this.validateSchema(e,!0),c}_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):Er.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{Er.compileSchema.call(this,e)}finally{this.opts=t}}};wr.ValidationError=$y.default;wr.MissingRefError=zu.default;Z.default=wr;function Gu(r,e,t,n="error"){for(let s in r){let i=s;i in e&&this.logger[n](`${t}: option ${s}. ${r[i]}`)}}function Hu(r){return r=(0,vr.normalizeId)(r),this.schemas[r]||this.refs[r]}function Py(){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 Iy(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function Ry(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 Ny(){let r={...this.opts};for(let e of by)delete r[e];return r}var Cy={log(){},warn(){},error(){}};function xy(r){if(r===!1)return Cy;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 ky=/^[a-z_$][a-z0-9_$:-]*$/i;function qy(r,e){let{RULES:t}=this;if((0,qi.eachItem)(r,n=>{if(t.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!ky.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function ki(r,e,t){var n;let s=e?.post;if(t&&s)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:i}=this,o=s?i.post:i.rules.find(({type:c})=>c===t);if(o||(o={type:t,rules:[]},i.rules.push(o)),i.keywords[r]=!0,!e)return;let a={keyword:r,definition:{...e,type:(0,$n.getJSONTypes)(e.type),schemaType:(0,$n.getJSONTypes)(e.schemaType)}};e.before?jy.call(this,o,a,e.before):o.rules.push(a),i.all[r]=a,(n=e.implements)===null||n===void 0||n.forEach(c=>this.addKeyword(c))}function jy(r,e,t){let n=r.rules.findIndex(s=>s.keyword===t);n>=0?r.rules.splice(n,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function Dy(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=Wu(e)),r.validateSchema=this.compile(e,!0))}var Ly={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Wu(r){return{anyOf:[r,Ly]}}});var Bu=p(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});var My={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Di.default=My});var wn=p(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.callRef=Et.getValidate=void 0;var Vy=jt(),Ju=Ee(),pe=b(),Mt=$e(),Xu=_r(),En=I(),Fy={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:n}=r,{baseId:s,schemaEnv:i,validateName:o,opts:a,self:c}=n,{root:d}=i;if((t==="#"||t==="#/")&&s===d.baseId)return l();let u=Xu.resolveRef.call(c,d,s,t);if(u===void 0)throw new Vy.default(n.opts.uriResolver,s,t);if(u instanceof Xu.SchemaEnv)return f(u);return h(u);function l(){if(i===d)return vn(r,o,i,i.$async);let m=e.scopeValue("root",{ref:d});return vn(r,(0,pe._)`${m}.validate`,d,d.$async)}function f(m){let g=Yu(r,m);vn(r,g,m,m.$async)}function h(m){let g=e.scopeValue("schema",a.code.source===!0?{ref:m,code:(0,pe.stringify)(m)}:{ref:m}),y=e.name("valid"),_=r.subschema({schema:m,dataTypes:[],schemaPath:pe.nil,topSchemaRef:g,errSchemaPath:t},y);r.mergeEvaluated(_),r.ok(y)}}};function Yu(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,pe._)`${t.scopeValue("wrapper",{ref:e})}.validate`}Et.getValidate=Yu;function vn(r,e,t,n){let{gen:s,it:i}=r,{allErrors:o,schemaEnv:a,opts:c}=i,d=c.passContext?Mt.default.this:pe.nil;n?u():l();function u(){if(!a.$async)throw new Error("async schema referenced by sync schema");let m=s.let("valid");s.try(()=>{s.code((0,pe._)`await ${(0,Ju.callValidateCode)(r,e,d)}`),h(e),o||s.assign(m,!0)},g=>{s.if((0,pe._)`!(${g} instanceof ${i.ValidationError})`,()=>s.throw(g)),f(g),o||s.assign(m,!1)}),r.ok(m)}function l(){r.result((0,Ju.callValidateCode)(r,e,d),()=>h(e),()=>f(e))}function f(m){let g=(0,pe._)`${m}.errors`;s.assign(Mt.default.vErrors,(0,pe._)`${Mt.default.vErrors} === null ? ${g} : ${Mt.default.vErrors}.concat(${g})`),s.assign(Mt.default.errors,(0,pe._)`${Mt.default.vErrors}.length`)}function h(m){var g;if(!i.opts.unevaluated)return;let y=(g=t?.validate)===null||g===void 0?void 0:g.evaluated;if(i.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(i.props=En.mergeEvaluated.props(s,y.props,i.props));else{let _=s.var("props",(0,pe._)`${m}.evaluated.props`);i.props=En.mergeEvaluated.props(s,_,i.props,pe.Name)}if(i.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(i.items=En.mergeEvaluated.items(s,y.items,i.items));else{let _=s.var("items",(0,pe._)`${m}.evaluated.items`);i.items=En.mergeEvaluated.items(s,_,i.items,pe.Name)}}}Et.callRef=vn;Et.default=Fy});var Mi=p(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});var Uy=Bu(),Gy=wn(),Hy=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Uy.default,Gy.default];Li.default=Hy});var Zu=p(Vi=>{"use strict";Object.defineProperty(Vi,"__esModule",{value:!0});var bn=b(),st=bn.operators,Sn={maximum:{okStr:"<=",ok:st.LTE,fail:st.GT},minimum:{okStr:">=",ok:st.GTE,fail:st.LT},exclusiveMaximum:{okStr:"<",ok:st.LT,fail:st.GTE},exclusiveMinimum:{okStr:">",ok:st.GT,fail:st.LTE}},zy={message:({keyword:r,schemaCode:e})=>(0,bn.str)`must be ${Sn[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,bn._)`{comparison: ${Sn[r].okStr}, limit: ${e}}`},Ky={keyword:Object.keys(Sn),type:"number",schemaType:"number",$data:!0,error:zy,code(r){let{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,bn._)`${t} ${Sn[e].fail} ${n} || isNaN(${t})`)}};Vi.default=Ky});var Qu=p(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});var br=b(),Wy={message:({schemaCode:r})=>(0,br.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,br._)`{multipleOf: ${r}}`},By={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Wy,code(r){let{gen:e,data:t,schemaCode:n,it:s}=r,i=s.opts.multipleOfPrecision,o=e.let("res"),a=i?(0,br._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${i}`:(0,br._)`${o} !== parseInt(${o})`;r.fail$data((0,br._)`(${n} === 0 || (${o} = ${t}/${n}, ${a}))`)}};Fi.default=By});var tl=p(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});function el(r){let e=r.length,t=0,n=0,s;for(;n<e;)t++,s=r.charCodeAt(n++),s>=55296&&s<=56319&&n<e&&(s=r.charCodeAt(n),(s&64512)===56320&&n++);return t}Ui.default=el;el.code='require("ajv/dist/runtime/ucs2length").default'});var rl=p(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});var vt=b(),Jy=I(),Xy=tl(),Yy={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,vt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,vt._)`{limit: ${r}}`},Zy={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Yy,code(r){let{keyword:e,data:t,schemaCode:n,it:s}=r,i=e==="maxLength"?vt.operators.GT:vt.operators.LT,o=s.opts.unicode===!1?(0,vt._)`${t}.length`:(0,vt._)`${(0,Jy.useFunc)(r.gen,Xy.default)}(${t})`;r.fail$data((0,vt._)`${o} ${i} ${n}`)}};Gi.default=Zy});var nl=p(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});var Qy=Ee(),e_=I(),Vt=b(),t_={message:({schemaCode:r})=>(0,Vt.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,Vt._)`{pattern: ${r}}`},r_={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:t_,code(r){let{gen:e,data:t,$data:n,schema:s,schemaCode:i,it:o}=r,a=o.opts.unicodeRegExp?"u":"";if(n){let{regExp:c}=o.opts.code,d=c.code==="new RegExp"?(0,Vt._)`new RegExp`:(0,e_.useFunc)(e,c),u=e.let("valid");e.try(()=>e.assign(u,(0,Vt._)`${d}(${i}, ${a}).test(${t})`),()=>e.assign(u,!1)),r.fail$data((0,Vt._)`!${u}`)}else{let c=(0,Qy.usePattern)(r,s);r.fail$data((0,Vt._)`!${c}.test(${t})`)}}};Hi.default=r_});var sl=p(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0});var Sr=b(),n_={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,Sr.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,Sr._)`{limit: ${r}}`},s_={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:n_,code(r){let{keyword:e,data:t,schemaCode:n}=r,s=e==="maxProperties"?Sr.operators.GT:Sr.operators.LT;r.fail$data((0,Sr._)`Object.keys(${t}).length ${s} ${n}`)}};zi.default=s_});var il=p(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});var Or=Ee(),Ar=b(),i_=I(),o_={message:({params:{missingProperty:r}})=>(0,Ar.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,Ar._)`{missingProperty: ${r}}`},a_={keyword:"required",type:"object",schemaType:"array",$data:!0,error:o_,code(r){let{gen:e,schema:t,schemaCode:n,data:s,$data:i,it:o}=r,{opts:a}=o;if(!i&&t.length===0)return;let c=t.length>=a.loopRequired;if(o.allErrors?d():u(),a.strictRequired){let h=r.parentSchema.properties,{definedProperties:m}=r.it;for(let g of t)if(h?.[g]===void 0&&!m.has(g)){let y=o.schemaEnv.baseId+o.errSchemaPath,_=`required property "${g}" is not defined at "${y}" (strictRequired)`;(0,i_.checkStrictMode)(o,_,o.opts.strictRequired)}}function d(){if(c||i)r.block$data(Ar.nil,l);else for(let h of t)(0,Or.checkReportMissingProp)(r,h)}function u(){let h=e.let("missing");if(c||i){let m=e.let("valid",!0);r.block$data(m,()=>f(h,m)),r.ok(m)}else e.if((0,Or.checkMissingProp)(r,t,h)),(0,Or.reportMissingProp)(r,h),e.else()}function l(){e.forOf("prop",n,h=>{r.setParams({missingProperty:h}),e.if((0,Or.noPropertyInData)(e,s,h,a.ownProperties),()=>r.error())})}function f(h,m){r.setParams({missingProperty:h}),e.forOf(h,n,()=>{e.assign(m,(0,Or.propertyInData)(e,s,h,a.ownProperties)),e.if((0,Ar.not)(m),()=>{r.error(),e.break()})},Ar.nil)}}};Ki.default=a_});var ol=p(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});var Tr=b(),c_={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,Tr.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,Tr._)`{limit: ${r}}`},u_={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:c_,code(r){let{keyword:e,data:t,schemaCode:n}=r,s=e==="maxItems"?Tr.operators.GT:Tr.operators.LT;r.fail$data((0,Tr._)`${t}.length ${s} ${n}`)}};Wi.default=u_});var On=p(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});var al=gi();al.code='require("ajv/dist/runtime/equal").default';Bi.default=al});var cl=p(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});var Ji=hr(),Q=b(),l_=I(),d_=On(),f_={message:({params:{i:r,j:e}})=>(0,Q.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,Q._)`{i: ${r}, j: ${e}}`},h_={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:f_,code(r){let{gen:e,data:t,$data:n,schema:s,parentSchema:i,schemaCode:o,it:a}=r;if(!n&&!s)return;let c=e.let("valid"),d=i.items?(0,Ji.getSchemaTypes)(i.items):[];r.block$data(c,u,(0,Q._)`${o} === false`),r.ok(c);function u(){let m=e.let("i",(0,Q._)`${t}.length`),g=e.let("j");r.setParams({i:m,j:g}),e.assign(c,!0),e.if((0,Q._)`${m} > 1`,()=>(l()?f:h)(m,g))}function l(){return d.length>0&&!d.some(m=>m==="object"||m==="array")}function f(m,g){let y=e.name("item"),_=(0,Ji.checkDataTypes)(d,y,a.opts.strictNumbers,Ji.DataType.Wrong),C=e.const("indices",(0,Q._)`{}`);e.for((0,Q._)`;${m}--;`,()=>{e.let(y,(0,Q._)`${t}[${m}]`),e.if(_,(0,Q._)`continue`),d.length>1&&e.if((0,Q._)`typeof ${y} == "string"`,(0,Q._)`${y} += "_"`),e.if((0,Q._)`typeof ${C}[${y}] == "number"`,()=>{e.assign(g,(0,Q._)`${C}[${y}]`),r.error(),e.assign(c,!1).break()}).code((0,Q._)`${C}[${y}] = ${m}`)})}function h(m,g){let y=(0,l_.useFunc)(e,d_.default),_=e.name("outer");e.label(_).for((0,Q._)`;${m}--;`,()=>e.for((0,Q._)`${g} = ${m}; ${g}--;`,()=>e.if((0,Q._)`${y}(${t}[${m}], ${t}[${g}])`,()=>{r.error(),e.assign(c,!1).break(_)})))}}};Xi.default=h_});var ul=p(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});var Yi=b(),p_=I(),m_=On(),g_={message:"must be equal to constant",params:({schemaCode:r})=>(0,Yi._)`{allowedValue: ${r}}`},y_={keyword:"const",$data:!0,error:g_,code(r){let{gen:e,data:t,$data:n,schemaCode:s,schema:i}=r;n||i&&typeof i=="object"?r.fail$data((0,Yi._)`!${(0,p_.useFunc)(e,m_.default)}(${t}, ${s})`):r.fail((0,Yi._)`${i} !== ${t}`)}};Zi.default=y_});var ll=p(Qi=>{"use strict";Object.defineProperty(Qi,"__esModule",{value:!0});var Pr=b(),__=I(),$_=On(),E_={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,Pr._)`{allowedValues: ${r}}`},v_={keyword:"enum",schemaType:"array",$data:!0,error:E_,code(r){let{gen:e,data:t,$data:n,schema:s,schemaCode:i,it:o}=r;if(!n&&s.length===0)throw new Error("enum must have non-empty array");let a=s.length>=o.opts.loopEnum,c,d=()=>c??(c=(0,__.useFunc)(e,$_.default)),u;if(a||n)u=e.let("valid"),r.block$data(u,l);else{if(!Array.isArray(s))throw new Error("ajv implementation error");let h=e.const("vSchema",i);u=(0,Pr.or)(...s.map((m,g)=>f(h,g)))}r.pass(u);function l(){e.assign(u,!1),e.forOf("v",i,h=>e.if((0,Pr._)`${d()}(${t}, ${h})`,()=>e.assign(u,!0).break()))}function f(h,m){let g=s[m];return typeof g=="object"&&g!==null?(0,Pr._)`${d()}(${t}, ${h}[${m}])`:(0,Pr._)`${t} === ${g}`}}};Qi.default=v_});var to=p(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});var w_=Zu(),b_=Qu(),S_=rl(),O_=nl(),A_=sl(),T_=il(),P_=ol(),I_=cl(),R_=ul(),N_=ll(),C_=[w_.default,b_.default,S_.default,O_.default,A_.default,T_.default,P_.default,I_.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},R_.default,N_.default];eo.default=C_});var no=p(Ir=>{"use strict";Object.defineProperty(Ir,"__esModule",{value:!0});Ir.validateAdditionalItems=void 0;var wt=b(),ro=I(),x_={message:({params:{len:r}})=>(0,wt.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,wt._)`{limit: ${r}}`},k_={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:x_,code(r){let{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,ro.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}dl(r,n)}};function dl(r,e){let{gen:t,schema:n,data:s,keyword:i,it:o}=r;o.items=!0;let a=t.const("len",(0,wt._)`${s}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,wt._)`${a} <= ${e.length}`);else if(typeof n=="object"&&!(0,ro.alwaysValidSchema)(o,n)){let d=t.var("valid",(0,wt._)`${a} <= ${e.length}`);t.if((0,wt.not)(d),()=>c(d)),r.ok(d)}function c(d){t.forRange("i",e.length,a,u=>{r.subschema({keyword:i,dataProp:u,dataPropType:ro.Type.Num},d),o.allErrors||t.if((0,wt.not)(d),()=>t.break())})}}Ir.validateAdditionalItems=dl;Ir.default=k_});var so=p(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.validateTuple=void 0;var fl=b(),An=I(),q_=Ee(),j_={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return hl(r,"additionalItems",e);t.items=!0,!(0,An.alwaysValidSchema)(t,e)&&r.ok((0,q_.validateArray)(r))}};function hl(r,e,t=r.schema){let{gen:n,parentSchema:s,data:i,keyword:o,it:a}=r;u(s),a.opts.unevaluated&&t.length&&a.items!==!0&&(a.items=An.mergeEvaluated.items(n,t.length,a.items));let c=n.name("valid"),d=n.const("len",(0,fl._)`${i}.length`);t.forEach((l,f)=>{(0,An.alwaysValidSchema)(a,l)||(n.if((0,fl._)`${d} > ${f}`,()=>r.subschema({keyword:o,schemaProp:f,dataProp:f},c)),r.ok(c))});function u(l){let{opts:f,errSchemaPath:h}=a,m=t.length,g=m===l.minItems&&(m===l.maxItems||l[e]===!1);if(f.strictTuples&&!g){let y=`"${o}" is ${m}-tuple, but minItems or maxItems/${e} are not specified or different at path "${h}"`;(0,An.checkStrictMode)(a,y,f.strictTuples)}}}Rr.validateTuple=hl;Rr.default=j_});var pl=p(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});var D_=so(),L_={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,D_.validateTuple)(r,"items")};io.default=L_});var gl=p(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});var ml=b(),M_=I(),V_=Ee(),F_=no(),U_={message:({params:{len:r}})=>(0,ml.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,ml._)`{limit: ${r}}`},G_={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:U_,code(r){let{schema:e,parentSchema:t,it:n}=r,{prefixItems:s}=t;n.items=!0,!(0,M_.alwaysValidSchema)(n,e)&&(s?(0,F_.validateAdditionalItems)(r,s):r.ok((0,V_.validateArray)(r)))}};oo.default=G_});var yl=p(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});var we=b(),Tn=I(),H_={message:({params:{min:r,max:e}})=>e===void 0?(0,we.str)`must contain at least ${r} valid item(s)`:(0,we.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,we._)`{minContains: ${r}}`:(0,we._)`{minContains: ${r}, maxContains: ${e}}`},z_={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:H_,code(r){let{gen:e,schema:t,parentSchema:n,data:s,it:i}=r,o,a,{minContains:c,maxContains:d}=n;i.opts.next?(o=c===void 0?1:c,a=d):o=1;let u=e.const("len",(0,we._)`${s}.length`);if(r.setParams({min:o,max:a}),a===void 0&&o===0){(0,Tn.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,Tn.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,Tn.alwaysValidSchema)(i,t)){let g=(0,we._)`${u} >= ${o}`;a!==void 0&&(g=(0,we._)`${g} && ${u} <= ${a}`),r.pass(g);return}i.items=!0;let l=e.name("valid");a===void 0&&o===1?h(l,()=>e.if(l,()=>e.break())):o===0?(e.let(l,!0),a!==void 0&&e.if((0,we._)`${s}.length > 0`,f)):(e.let(l,!1),f()),r.result(l,()=>r.reset());function f(){let g=e.name("_valid"),y=e.let("count",0);h(g,()=>e.if(g,()=>m(y)))}function h(g,y){e.forRange("i",0,u,_=>{r.subschema({keyword:"contains",dataProp:_,dataPropType:Tn.Type.Num,compositeRule:!0},g),y()})}function m(g){e.code((0,we._)`${g}++`),a===void 0?e.if((0,we._)`${g} >= ${o}`,()=>e.assign(l,!0).break()):(e.if((0,we._)`${g} > ${a}`,()=>e.assign(l,!1).break()),o===1?e.assign(l,!0):e.if((0,we._)`${g} >= ${o}`,()=>e.assign(l,!0)))}}};ao.default=z_});var Pn=p(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.validateSchemaDeps=Ve.validatePropertyDeps=Ve.error=void 0;var co=b(),K_=I(),Nr=Ee();Ve.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let n=e===1?"property":"properties";return(0,co.str)`must have ${n} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:n}})=>(0,co._)`{property: ${r},
33
+ missingProperty: ${n},
34
+ depsCount: ${e},
35
+ deps: ${t}}`};var W_={keyword:"dependencies",type:"object",schemaType:"object",error:Ve.error,code(r){let[e,t]=B_(r);_l(r,e),$l(r,t)}};function B_({schema:r}){let e={},t={};for(let n in r){if(n==="__proto__")continue;let s=Array.isArray(r[n])?e:t;s[n]=r[n]}return[e,t]}function _l(r,e=r.schema){let{gen:t,data:n,it:s}=r;if(Object.keys(e).length===0)return;let i=t.let("missing");for(let o in e){let a=e[o];if(a.length===0)continue;let c=(0,Nr.propertyInData)(t,n,o,s.opts.ownProperties);r.setParams({property:o,depsCount:a.length,deps:a.join(", ")}),s.allErrors?t.if(c,()=>{for(let d of a)(0,Nr.checkReportMissingProp)(r,d)}):(t.if((0,co._)`${c} && (${(0,Nr.checkMissingProp)(r,a,i)})`),(0,Nr.reportMissingProp)(r,i),t.else())}}Ve.validatePropertyDeps=_l;function $l(r,e=r.schema){let{gen:t,data:n,keyword:s,it:i}=r,o=t.name("valid");for(let a in e)(0,K_.alwaysValidSchema)(i,e[a])||(t.if((0,Nr.propertyInData)(t,n,a,i.opts.ownProperties),()=>{let c=r.subschema({keyword:s,schemaProp:a},o);r.mergeValidEvaluated(c,o)},()=>t.var(o,!0)),r.ok(o))}Ve.validateSchemaDeps=$l;Ve.default=W_});var vl=p(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});var El=b(),J_=I(),X_={message:"property name must be valid",params:({params:r})=>(0,El._)`{propertyName: ${r.propertyName}}`},Y_={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:X_,code(r){let{gen:e,schema:t,data:n,it:s}=r;if((0,J_.alwaysValidSchema)(s,t))return;let i=e.name("valid");e.forIn("key",n,o=>{r.setParams({propertyName:o}),r.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},i),e.if((0,El.not)(i),()=>{r.error(!0),s.allErrors||e.break()})}),r.ok(i)}};uo.default=Y_});var fo=p(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});var In=Ee(),Re=b(),Z_=$e(),Rn=I(),Q_={message:"must NOT have additional properties",params:({params:r})=>(0,Re._)`{additionalProperty: ${r.additionalProperty}}`},e0={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Q_,code(r){let{gen:e,schema:t,parentSchema:n,data:s,errsCount:i,it:o}=r;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:c}=o;if(o.props=!0,c.removeAdditional!=="all"&&(0,Rn.alwaysValidSchema)(o,t))return;let d=(0,In.allSchemaProperties)(n.properties),u=(0,In.allSchemaProperties)(n.patternProperties);l(),r.ok((0,Re._)`${i} === ${Z_.default.errors}`);function l(){e.forIn("key",s,y=>{!d.length&&!u.length?m(y):e.if(f(y),()=>m(y))})}function f(y){let _;if(d.length>8){let C=(0,Rn.schemaRefOrVal)(o,n.properties,"properties");_=(0,In.isOwnProperty)(e,C,y)}else d.length?_=(0,Re.or)(...d.map(C=>(0,Re._)`${y} === ${C}`)):_=Re.nil;return u.length&&(_=(0,Re.or)(_,...u.map(C=>(0,Re._)`${(0,In.usePattern)(r,C)}.test(${y})`))),(0,Re.not)(_)}function h(y){e.code((0,Re._)`delete ${s}[${y}]`)}function m(y){if(c.removeAdditional==="all"||c.removeAdditional&&t===!1){h(y);return}if(t===!1){r.setParams({additionalProperty:y}),r.error(),a||e.break();return}if(typeof t=="object"&&!(0,Rn.alwaysValidSchema)(o,t)){let _=e.name("valid");c.removeAdditional==="failing"?(g(y,_,!1),e.if((0,Re.not)(_),()=>{r.reset(),h(y)})):(g(y,_),a||e.if((0,Re.not)(_),()=>e.break()))}}function g(y,_,C){let R={keyword:"additionalProperties",dataProp:y,dataPropType:Rn.Type.Str};C===!1&&Object.assign(R,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(R,_)}}};lo.default=e0});var Sl=p(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});var t0=qt(),wl=Ee(),ho=I(),bl=fo(),r0={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:n,data:s,it:i}=r;i.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&bl.default.code(new t0.KeywordCxt(i,bl.default,"additionalProperties"));let o=(0,wl.allSchemaProperties)(t);for(let l of o)i.definedProperties.add(l);i.opts.unevaluated&&o.length&&i.props!==!0&&(i.props=ho.mergeEvaluated.props(e,(0,ho.toHash)(o),i.props));let a=o.filter(l=>!(0,ho.alwaysValidSchema)(i,t[l]));if(a.length===0)return;let c=e.name("valid");for(let l of a)d(l)?u(l):(e.if((0,wl.propertyInData)(e,s,l,i.opts.ownProperties)),u(l),i.allErrors||e.else().var(c,!0),e.endIf()),r.it.definedProperties.add(l),r.ok(c);function d(l){return i.opts.useDefaults&&!i.compositeRule&&t[l].default!==void 0}function u(l){r.subschema({keyword:"properties",schemaProp:l,dataProp:l},c)}}};po.default=r0});var Pl=p(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});var Ol=Ee(),Nn=b(),Al=I(),Tl=I(),n0={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:n,parentSchema:s,it:i}=r,{opts:o}=i,a=(0,Ol.allSchemaProperties)(t),c=a.filter(g=>(0,Al.alwaysValidSchema)(i,t[g]));if(a.length===0||c.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let d=o.strictSchema&&!o.allowMatchingProperties&&s.properties,u=e.name("valid");i.props!==!0&&!(i.props instanceof Nn.Name)&&(i.props=(0,Tl.evaluatedPropsToName)(e,i.props));let{props:l}=i;f();function f(){for(let g of a)d&&h(g),i.allErrors?m(g):(e.var(u,!0),m(g),e.if(u))}function h(g){for(let y in d)new RegExp(g).test(y)&&(0,Al.checkStrictMode)(i,`property ${y} matches pattern ${g} (use allowMatchingProperties)`)}function m(g){e.forIn("key",n,y=>{e.if((0,Nn._)`${(0,Ol.usePattern)(r,g)}.test(${y})`,()=>{let _=c.includes(g);_||r.subschema({keyword:"patternProperties",schemaProp:g,dataProp:y,dataPropType:Tl.Type.Str},u),i.opts.unevaluated&&l!==!0?e.assign((0,Nn._)`${l}[${y}]`,!0):!_&&!i.allErrors&&e.if((0,Nn.not)(u),()=>e.break())})})}}};mo.default=n0});var Il=p(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});var s0=I(),i0={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:n}=r;if((0,s0.alwaysValidSchema)(n,t)){r.fail();return}let s=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),r.failResult(s,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};go.default=i0});var Rl=p(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});var o0=Ee(),a0={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:o0.validateUnion,error:{message:"must match a schema in anyOf"}};yo.default=a0});var Nl=p(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});var Cn=b(),c0=I(),u0={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,Cn._)`{passingSchemas: ${r.passing}}`},l0={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:u0,code(r){let{gen:e,schema:t,parentSchema:n,it:s}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(s.opts.discriminator&&n.discriminator)return;let i=t,o=e.let("valid",!1),a=e.let("passing",null),c=e.name("_valid");r.setParams({passing:a}),e.block(d),r.result(o,()=>r.reset(),()=>r.error(!0));function d(){i.forEach((u,l)=>{let f;(0,c0.alwaysValidSchema)(s,u)?e.var(c,!0):f=r.subschema({keyword:"oneOf",schemaProp:l,compositeRule:!0},c),l>0&&e.if((0,Cn._)`${c} && ${o}`).assign(o,!1).assign(a,(0,Cn._)`[${a}, ${l}]`).else(),e.if(c,()=>{e.assign(o,!0),e.assign(a,l),f&&r.mergeEvaluated(f,Cn.Name)})})}}};_o.default=l0});var Cl=p($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});var d0=I(),f0={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let s=e.name("valid");t.forEach((i,o)=>{if((0,d0.alwaysValidSchema)(n,i))return;let a=r.subschema({keyword:"allOf",schemaProp:o},s);r.ok(s),r.mergeEvaluated(a)})}};$o.default=f0});var ql=p(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var xn=b(),kl=I(),h0={message:({params:r})=>(0,xn.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,xn._)`{failingKeyword: ${r.ifClause}}`},p0={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:h0,code(r){let{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,kl.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let s=xl(n,"then"),i=xl(n,"else");if(!s&&!i)return;let o=e.let("valid",!0),a=e.name("_valid");if(c(),r.reset(),s&&i){let u=e.let("ifClause");r.setParams({ifClause:u}),e.if(a,d("then",u),d("else",u))}else s?e.if(a,d("then")):e.if((0,xn.not)(a),d("else"));r.pass(o,()=>r.error(!0));function c(){let u=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);r.mergeEvaluated(u)}function d(u,l){return()=>{let f=r.subschema({keyword:u},a);e.assign(o,a),r.mergeValidEvaluated(f,o),l?e.assign(l,(0,xn._)`${u}`):r.setParams({ifClause:u})}}}};function xl(r,e){let t=r.schema[e];return t!==void 0&&!(0,kl.alwaysValidSchema)(r,t)}Eo.default=p0});var jl=p(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});var m0=I(),g0={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,m0.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};vo.default=g0});var bo=p(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});var y0=no(),_0=pl(),$0=so(),E0=gl(),v0=yl(),w0=Pn(),b0=vl(),S0=fo(),O0=Sl(),A0=Pl(),T0=Il(),P0=Rl(),I0=Nl(),R0=Cl(),N0=ql(),C0=jl();function x0(r=!1){let e=[T0.default,P0.default,I0.default,R0.default,N0.default,C0.default,b0.default,S0.default,w0.default,O0.default,A0.default];return r?e.push(_0.default,E0.default):e.push(y0.default,$0.default),e.push(v0.default),e}wo.default=x0});var Oo=p(Cr=>{"use strict";Object.defineProperty(Cr,"__esModule",{value:!0});Cr.dynamicAnchor=void 0;var So=b(),k0=$e(),Dl=_r(),q0=wn(),j0={keyword:"$dynamicAnchor",schemaType:"string",code:r=>Ll(r,r.schema)};function Ll(r,e){let{gen:t,it:n}=r;n.schemaEnv.root.dynamicAnchors[e]=!0;let s=(0,So._)`${k0.default.dynamicAnchors}${(0,So.getProperty)(e)}`,i=n.errSchemaPath==="#"?n.validateName:D0(r);t.if((0,So._)`!${s}`,()=>t.assign(s,i))}Cr.dynamicAnchor=Ll;function D0(r){let{schemaEnv:e,schema:t,self:n}=r.it,{root:s,baseId:i,localRefs:o,meta:a}=e.root,{schemaId:c}=n.opts,d=new Dl.SchemaEnv({schema:t,schemaId:c,root:s,baseId:i,localRefs:o,meta:a});return Dl.compileSchema.call(n,d),(0,q0.getValidate)(r,d)}Cr.default=j0});var Ao=p(xr=>{"use strict";Object.defineProperty(xr,"__esModule",{value:!0});xr.dynamicRef=void 0;var Ml=b(),L0=$e(),Vl=wn(),M0={keyword:"$dynamicRef",schemaType:"string",code:r=>Fl(r,r.schema)};function Fl(r,e){let{gen:t,keyword:n,it:s}=r;if(e[0]!=="#")throw new Error(`"${n}" only supports hash fragment reference`);let i=e.slice(1);if(s.allErrors)o();else{let c=t.let("valid",!1);o(c),r.ok(c)}function o(c){if(s.schemaEnv.root.dynamicAnchors[i]){let d=t.let("_v",(0,Ml._)`${L0.default.dynamicAnchors}${(0,Ml.getProperty)(i)}`);t.if(d,a(d,c),a(s.validateName,c))}else a(s.validateName,c)()}function a(c,d){return d?()=>t.block(()=>{(0,Vl.callRef)(r,c),t.let(d,!0)}):()=>(0,Vl.callRef)(r,c)}}xr.dynamicRef=Fl;xr.default=M0});var Ul=p(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});var V0=Oo(),F0=I(),U0={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,V0.dynamicAnchor)(r,""):(0,F0.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};To.default=U0});var Gl=p(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});var G0=Ao(),H0={keyword:"$recursiveRef",schemaType:"string",code:r=>(0,G0.dynamicRef)(r,r.schema)};Po.default=H0});var Hl=p(Io=>{"use strict";Object.defineProperty(Io,"__esModule",{value:!0});var z0=Oo(),K0=Ao(),W0=Ul(),B0=Gl(),J0=[z0.default,K0.default,W0.default,B0.default];Io.default=J0});var Kl=p(Ro=>{"use strict";Object.defineProperty(Ro,"__esModule",{value:!0});var zl=Pn(),X0={keyword:"dependentRequired",type:"object",schemaType:"object",error:zl.error,code:r=>(0,zl.validatePropertyDeps)(r)};Ro.default=X0});var Wl=p(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});var Y0=Pn(),Z0={keyword:"dependentSchemas",type:"object",schemaType:"object",code:r=>(0,Y0.validateSchemaDeps)(r)};No.default=Z0});var Bl=p(Co=>{"use strict";Object.defineProperty(Co,"__esModule",{value:!0});var Q0=I(),e$={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:r,parentSchema:e,it:t}){e.contains===void 0&&(0,Q0.checkStrictMode)(t,`"${r}" without "contains" is ignored`)}};Co.default=e$});var Jl=p(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});var t$=Kl(),r$=Wl(),n$=Bl(),s$=[t$.default,r$.default,n$.default];xo.default=s$});var Yl=p(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});var it=b(),Xl=I(),i$=$e(),o$={message:"must NOT have unevaluated properties",params:({params:r})=>(0,it._)`{unevaluatedProperty: ${r.unevaluatedProperty}}`},a$={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:o$,code(r){let{gen:e,schema:t,data:n,errsCount:s,it:i}=r;if(!s)throw new Error("ajv implementation error");let{allErrors:o,props:a}=i;a instanceof it.Name?e.if((0,it._)`${a} !== true`,()=>e.forIn("key",n,l=>e.if(d(a,l),()=>c(l)))):a!==!0&&e.forIn("key",n,l=>a===void 0?c(l):e.if(u(a,l),()=>c(l))),i.props=!0,r.ok((0,it._)`${s} === ${i$.default.errors}`);function c(l){if(t===!1){r.setParams({unevaluatedProperty:l}),r.error(),o||e.break();return}if(!(0,Xl.alwaysValidSchema)(i,t)){let f=e.name("valid");r.subschema({keyword:"unevaluatedProperties",dataProp:l,dataPropType:Xl.Type.Str},f),o||e.if((0,it.not)(f),()=>e.break())}}function d(l,f){return(0,it._)`!${l} || !${l}[${f}]`}function u(l,f){let h=[];for(let m in l)l[m]===!0&&h.push((0,it._)`${f} !== ${m}`);return(0,it.and)(...h)}}};ko.default=a$});var Ql=p(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});var bt=b(),Zl=I(),c$={message:({params:{len:r}})=>(0,bt.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,bt._)`{limit: ${r}}`},u$={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:c$,code(r){let{gen:e,schema:t,data:n,it:s}=r,i=s.items||0;if(i===!0)return;let o=e.const("len",(0,bt._)`${n}.length`);if(t===!1)r.setParams({len:i}),r.fail((0,bt._)`${o} > ${i}`);else if(typeof t=="object"&&!(0,Zl.alwaysValidSchema)(s,t)){let c=e.var("valid",(0,bt._)`${o} <= ${i}`);e.if((0,bt.not)(c),()=>a(c,i)),r.ok(c)}s.items=!0;function a(c,d){e.forRange("i",d,o,u=>{r.subschema({keyword:"unevaluatedItems",dataProp:u,dataPropType:Zl.Type.Num},c),s.allErrors||e.if((0,bt.not)(c),()=>e.break())})}}};qo.default=u$});var ed=p(jo=>{"use strict";Object.defineProperty(jo,"__esModule",{value:!0});var l$=Yl(),d$=Ql(),f$=[l$.default,d$.default];jo.default=f$});var td=p(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});var K=b(),h$={message:({schemaCode:r})=>(0,K.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,K._)`{format: ${r}}`},p$={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:h$,code(r,e){let{gen:t,data:n,$data:s,schema:i,schemaCode:o,it:a}=r,{opts:c,errSchemaPath:d,schemaEnv:u,self:l}=a;if(!c.validateFormats)return;s?f():h();function f(){let m=t.scopeValue("formats",{ref:l.formats,code:c.code.formats}),g=t.const("fDef",(0,K._)`${m}[${o}]`),y=t.let("fType"),_=t.let("format");t.if((0,K._)`typeof ${g} == "object" && !(${g} instanceof RegExp)`,()=>t.assign(y,(0,K._)`${g}.type || "string"`).assign(_,(0,K._)`${g}.validate`),()=>t.assign(y,(0,K._)`"string"`).assign(_,g)),r.fail$data((0,K.or)(C(),R()));function C(){return c.strictSchema===!1?K.nil:(0,K._)`${o} && !${_}`}function R(){let V=u.$async?(0,K._)`(${g}.async ? await ${_}(${n}) : ${_}(${n}))`:(0,K._)`${_}(${n})`,S=(0,K._)`(typeof ${_} == "function" ? ${V} : ${_}.test(${n}))`;return(0,K._)`${_} && ${_} !== true && ${y} === ${e} && !${S}`}}function h(){let m=l.formats[i];if(!m){C();return}if(m===!0)return;let[g,y,_]=R(m);g===e&&r.pass(V());function C(){if(c.strictSchema===!1){l.logger.warn(S());return}throw new Error(S());function S(){return`unknown format "${i}" ignored in schema at path "${d}"`}}function R(S){let Ce=S instanceof RegExp?(0,K.regexpCode)(S):c.code.formats?(0,K._)`${c.code.formats}${(0,K.getProperty)(i)}`:void 0,He=t.scopeValue("formats",{key:i,ref:S,code:Ce});return typeof S=="object"&&!(S instanceof RegExp)?[S.type||"string",S.validate,(0,K._)`${He}.validate`]:["string",S,He]}function V(){if(typeof m=="object"&&!(m instanceof RegExp)&&m.async){if(!u.$async)throw new Error("async format in sync schema");return(0,K._)`await ${_}(${n})`}return typeof y=="function"?(0,K._)`${_}(${n})`:(0,K._)`${_}.test(${n})`}}}};Do.default=p$});var Mo=p(Lo=>{"use strict";Object.defineProperty(Lo,"__esModule",{value:!0});var m$=td(),g$=[m$.default];Lo.default=g$});var Vo=p(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.contentVocabulary=Ft.metadataVocabulary=void 0;Ft.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Ft.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var nd=p(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});var y$=Mi(),_$=to(),$$=bo(),E$=Hl(),v$=Jl(),w$=ed(),b$=Mo(),rd=Vo(),S$=[E$.default,y$.default,_$.default,(0,$$.default)(!0),b$.default,rd.metadataVocabulary,rd.contentVocabulary,v$.default,w$.default];Fo.default=S$});var id=p(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.DiscrError=void 0;var sd;(function(r){r.Tag="tag",r.Mapping="mapping"})(sd||(kn.DiscrError=sd={}))});var Ho=p(Go=>{"use strict";Object.defineProperty(Go,"__esModule",{value:!0});var Ut=b(),Uo=id(),od=_r(),O$=jt(),A$=I(),T$={message:({params:{discrError:r,tagName:e}})=>r===Uo.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,Ut._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},P$={keyword:"discriminator",type:"object",schemaType:"object",error:T$,code(r){let{gen:e,data:t,schema:n,parentSchema:s,it:i}=r,{oneOf:o}=s;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");let a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");let c=e.let("valid",!1),d=e.const("tag",(0,Ut._)`${t}${(0,Ut.getProperty)(a)}`);e.if((0,Ut._)`typeof ${d} == "string"`,()=>u(),()=>r.error(!1,{discrError:Uo.DiscrError.Tag,tag:d,tagName:a})),r.ok(c);function u(){let h=f();e.if(!1);for(let m in h)e.elseIf((0,Ut._)`${d} === ${m}`),e.assign(c,l(h[m]));e.else(),r.error(!1,{discrError:Uo.DiscrError.Mapping,tag:d,tagName:a}),e.endIf()}function l(h){let m=e.name("valid"),g=r.subschema({keyword:"oneOf",schemaProp:h},m);return r.mergeEvaluated(g,Ut.Name),m}function f(){var h;let m={},g=_(s),y=!0;for(let V=0;V<o.length;V++){let S=o[V];if(S?.$ref&&!(0,A$.schemaHasRulesButRef)(S,i.self.RULES)){let He=S.$ref;if(S=od.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,He),S instanceof od.SchemaEnv&&(S=S.schema),S===void 0)throw new O$.default(i.opts.uriResolver,i.baseId,He)}let Ce=(h=S?.properties)===null||h===void 0?void 0:h[a];if(typeof Ce!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${a}"`);y=y&&(g||_(S)),C(Ce,V)}if(!y)throw new Error(`discriminator: "${a}" must be required`);return m;function _({required:V}){return Array.isArray(V)&&V.includes(a)}function C(V,S){if(V.const)R(V.const,S);else if(V.enum)for(let Ce of V.enum)R(Ce,S);else throw new Error(`discriminator: "properties/${a}" must have "const" or "enum"`)}function R(V,S){if(typeof V!="string"||V in m)throw new Error(`discriminator: "${a}" values must be unique strings`);m[V]=S}}}};Go.default=P$});var ad=p((J1,I$)=>{I$.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 cd=p((X1,R$)=>{R$.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 ud=p((Y1,N$)=>{N$.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 ld=p((Z1,C$)=>{C$.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 dd=p((Q1,x$)=>{x$.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 fd=p((eA,k$)=>{k$.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 hd=p((tA,q$)=>{q$.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 pd=p((rA,j$)=>{j$.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 md=p(zo=>{"use strict";Object.defineProperty(zo,"__esModule",{value:!0});var D$=ad(),L$=cd(),M$=ud(),V$=ld(),F$=dd(),U$=fd(),G$=hd(),H$=pd(),z$=["/properties"];function K$(r){return[D$,L$,M$,V$,F$,e(this,U$),G$,e(this,H$)].forEach(t=>this.addMetaSchema(t,void 0,!1)),this;function e(t,n){return r?t.$dataMetaSchema(n,z$):n}}zo.default=K$});var gd=p((U,Wo)=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.MissingRefError=U.ValidationError=U.CodeGen=U.Name=U.nil=U.stringify=U.str=U._=U.KeywordCxt=U.Ajv2020=void 0;var W$=ji(),B$=nd(),J$=Ho(),X$=md(),Ko="https://json-schema.org/draft/2020-12/schema",Gt=class extends W$.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),B$.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(J$.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:e,meta:t}=this.opts;t&&(X$.default.call(this,e),this.refs["http://json-schema.org/schema"]=Ko)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Ko)?Ko:void 0)}};U.Ajv2020=Gt;Wo.exports=U=Gt;Wo.exports.Ajv2020=Gt;Object.defineProperty(U,"__esModule",{value:!0});U.default=Gt;var Y$=qt();Object.defineProperty(U,"KeywordCxt",{enumerable:!0,get:function(){return Y$.KeywordCxt}});var Ht=b();Object.defineProperty(U,"_",{enumerable:!0,get:function(){return Ht._}});Object.defineProperty(U,"str",{enumerable:!0,get:function(){return Ht.str}});Object.defineProperty(U,"stringify",{enumerable:!0,get:function(){return Ht.stringify}});Object.defineProperty(U,"nil",{enumerable:!0,get:function(){return Ht.nil}});Object.defineProperty(U,"Name",{enumerable:!0,get:function(){return Ht.Name}});Object.defineProperty(U,"CodeGen",{enumerable:!0,get:function(){return Ht.CodeGen}});var Z$=yr();Object.defineProperty(U,"ValidationError",{enumerable:!0,get:function(){return Z$.default}});var Q$=jt();Object.defineProperty(U,"MissingRefError",{enumerable:!0,get:function(){return Q$.default}})});var Sd=p(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.formatNames=Ue.fastFormats=Ue.fullFormats=void 0;function Fe(r,e){return{validate:r,compare:e}}Ue.fullFormats={date:Fe(Ed,Yo),time:Fe(Jo(!0),Zo),"date-time":Fe(yd(!0),wd),"iso-time":Fe(Jo(),vd),"iso-date-time":Fe(yd(),bd),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:iE,"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:fE,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:oE,int32:{type:"number",validate:uE},int64:{type:"number",validate:lE},float:{type:"number",validate:$d},double:{type:"number",validate:$d},password:!0,binary:!0};Ue.fastFormats={...Ue.fullFormats,date:Fe(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,Yo),time:Fe(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,Zo),"date-time":Fe(/^\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,wd),"iso-time":Fe(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,vd),"iso-date-time":Fe(/^\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,bd),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};Ue.formatNames=Object.keys(Ue.fullFormats);function eE(r){return r%4===0&&(r%100!==0||r%400===0)}var tE=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,rE=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Ed(r){let e=tE.exec(r);if(!e)return!1;let t=+e[1],n=+e[2],s=+e[3];return n>=1&&n<=12&&s>=1&&s<=(n===2&&eE(t)?29:rE[n])}function Yo(r,e){if(r&&e)return r>e?1:r<e?-1:0}var Bo=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function Jo(r){return function(t){let n=Bo.exec(t);if(!n)return!1;let s=+n[1],i=+n[2],o=+n[3],a=n[4],c=n[5]==="-"?-1:1,d=+(n[6]||0),u=+(n[7]||0);if(d>23||u>59||r&&!a)return!1;if(s<=23&&i<=59&&o<60)return!0;let l=i-u*c,f=s-d*c-(l<0?1:0);return(f===23||f===-1)&&(l===59||l===-1)&&o<61}}function Zo(r,e){if(!(r&&e))return;let t=new Date("2020-01-01T"+r).valueOf(),n=new Date("2020-01-01T"+e).valueOf();if(t&&n)return t-n}function vd(r,e){if(!(r&&e))return;let t=Bo.exec(r),n=Bo.exec(e);if(t&&n)return r=t[1]+t[2]+t[3],e=n[1]+n[2]+n[3],r>e?1:r<e?-1:0}var Xo=/t|\s/i;function yd(r){let e=Jo(r);return function(n){let s=n.split(Xo);return s.length===2&&Ed(s[0])&&e(s[1])}}function wd(r,e){if(!(r&&e))return;let t=new Date(r).valueOf(),n=new Date(e).valueOf();if(t&&n)return t-n}function bd(r,e){if(!(r&&e))return;let[t,n]=r.split(Xo),[s,i]=e.split(Xo),o=Yo(t,s);if(o!==void 0)return o||Zo(n,i)}var nE=/\/|:/,sE=/^(?:[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 iE(r){return nE.test(r)&&sE.test(r)}var _d=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function oE(r){return _d.lastIndex=0,_d.test(r)}var aE=-(2**31),cE=2**31-1;function uE(r){return Number.isInteger(r)&&r<=cE&&r>=aE}function lE(r){return Number.isInteger(r)}function $d(){return!0}var dE=/[^\\]\\Z/;function fE(r){if(dE.test(r))return!1;try{return new RegExp(r),!0}catch{return!1}}});var Ad=p(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});var hE=Mi(),pE=to(),mE=bo(),gE=Mo(),Od=Vo(),yE=[hE.default,pE.default,(0,mE.default)(),gE.default,Od.metadataVocabulary,Od.contentVocabulary];Qo.default=yE});var Td=p((oA,_E)=>{_E.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 Id=p((G,ea)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.MissingRefError=G.ValidationError=G.CodeGen=G.Name=G.nil=G.stringify=G.str=G._=G.KeywordCxt=G.Ajv=void 0;var $E=ji(),EE=Ad(),vE=Ho(),Pd=Td(),wE=["/properties"],qn="http://json-schema.org/draft-07/schema",zt=class extends $E.default{_addVocabularies(){super._addVocabularies(),EE.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(vE.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Pd,wE):Pd;this.addMetaSchema(e,qn,!1),this.refs["http://json-schema.org/schema"]=qn}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(qn)?qn:void 0)}};G.Ajv=zt;ea.exports=G=zt;ea.exports.Ajv=zt;Object.defineProperty(G,"__esModule",{value:!0});G.default=zt;var bE=qt();Object.defineProperty(G,"KeywordCxt",{enumerable:!0,get:function(){return bE.KeywordCxt}});var Kt=b();Object.defineProperty(G,"_",{enumerable:!0,get:function(){return Kt._}});Object.defineProperty(G,"str",{enumerable:!0,get:function(){return Kt.str}});Object.defineProperty(G,"stringify",{enumerable:!0,get:function(){return Kt.stringify}});Object.defineProperty(G,"nil",{enumerable:!0,get:function(){return Kt.nil}});Object.defineProperty(G,"Name",{enumerable:!0,get:function(){return Kt.Name}});Object.defineProperty(G,"CodeGen",{enumerable:!0,get:function(){return Kt.CodeGen}});var SE=yr();Object.defineProperty(G,"ValidationError",{enumerable:!0,get:function(){return SE.default}});var OE=jt();Object.defineProperty(G,"MissingRefError",{enumerable:!0,get:function(){return OE.default}})});var Rd=p(Wt=>{"use strict";Object.defineProperty(Wt,"__esModule",{value:!0});Wt.formatLimitDefinition=void 0;var AE=Id(),Ne=b(),ot=Ne.operators,jn={formatMaximum:{okStr:"<=",ok:ot.LTE,fail:ot.GT},formatMinimum:{okStr:">=",ok:ot.GTE,fail:ot.LT},formatExclusiveMaximum:{okStr:"<",ok:ot.LT,fail:ot.GTE},formatExclusiveMinimum:{okStr:">",ok:ot.GT,fail:ot.LTE}},TE={message:({keyword:r,schemaCode:e})=>(0,Ne.str)`should be ${jn[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,Ne._)`{comparison: ${jn[r].okStr}, limit: ${e}}`};Wt.formatLimitDefinition={keyword:Object.keys(jn),type:"string",schemaType:"string",$data:!0,error:TE,code(r){let{gen:e,data:t,schemaCode:n,keyword:s,it:i}=r,{opts:o,self:a}=i;if(!o.validateFormats)return;let c=new AE.KeywordCxt(i,a.RULES.all.format.definition,"format");c.$data?d():u();function d(){let f=e.scopeValue("formats",{ref:a.formats,code:o.code.formats}),h=e.const("fmt",(0,Ne._)`${f}[${c.schemaCode}]`);r.fail$data((0,Ne.or)((0,Ne._)`typeof ${h} != "object"`,(0,Ne._)`${h} instanceof RegExp`,(0,Ne._)`typeof ${h}.compare != "function"`,l(h)))}function u(){let f=c.schema,h=a.formats[f];if(!h||h===!0)return;if(typeof h!="object"||h instanceof RegExp||typeof h.compare!="function")throw new Error(`"${s}": format "${f}" does not define "compare" function`);let m=e.scopeValue("formats",{key:f,ref:h,code:o.code.formats?(0,Ne._)`${o.code.formats}${(0,Ne.getProperty)(f)}`:void 0});r.fail$data(l(m))}function l(f){return(0,Ne._)`${f}.compare(${t}, ${n}) ${jn[s].fail} 0`}},dependencies:["format"]};var PE=r=>(r.addKeyword(Wt.formatLimitDefinition),r);Wt.default=PE});var kd=p((kr,xd)=>{"use strict";Object.defineProperty(kr,"__esModule",{value:!0});var Bt=Sd(),IE=Rd(),ta=b(),Nd=new ta.Name("fullFormats"),RE=new ta.Name("fastFormats"),ra=(r,e={keywords:!0})=>{if(Array.isArray(e))return Cd(r,e,Bt.fullFormats,Nd),r;let[t,n]=e.mode==="fast"?[Bt.fastFormats,RE]:[Bt.fullFormats,Nd],s=e.formats||Bt.formatNames;return Cd(r,s,t,n),e.keywords&&(0,IE.default)(r),r};ra.get=(r,e="full")=>{let n=(e==="fast"?Bt.fastFormats:Bt.fullFormats)[r];if(!n)throw new Error(`Unknown format "${r}"`);return n};function Cd(r,e,t,n){var s,i;(s=(i=r.opts.code).formats)!==null&&s!==void 0||(i.formats=(0,ta._)`require("ajv-formats/dist/formats").${n}`);for(let o of e)r.addFormat(o,t[o])}xd.exports=kr=ra;Object.defineProperty(kr,"__esModule",{value:!0});kr.default=ra});var qr=p((dA,qd)=>{"use strict";var ME="2.0.0",VE=Number.MAX_SAFE_INTEGER||9007199254740991,FE=16,UE=250,GE=["major","premajor","minor","preminor","patch","prepatch","prerelease"];qd.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:FE,MAX_SAFE_BUILD_LENGTH:UE,MAX_SAFE_INTEGER:VE,RELEASE_TYPES:GE,SEMVER_SPEC_VERSION:ME,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var jr=p((fA,jd)=>{"use strict";var HE=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};jd.exports=HE});var Jt=p((Ge,Dd)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:ia,MAX_SAFE_BUILD_LENGTH:zE,MAX_LENGTH:KE}=qr(),WE=jr();Ge=Dd.exports={};var BE=Ge.re=[],JE=Ge.safeRe=[],$=Ge.src=[],XE=Ge.safeSrc=[],E=Ge.t={},YE=0,oa="[a-zA-Z0-9-]",ZE=[["\\s",1],["\\d",KE],[oa,zE]],QE=r=>{for(let[e,t]of ZE)r=r.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return r},O=(r,e,t)=>{let n=QE(e),s=YE++;WE(r,s,e),E[r]=s,$[s]=e,XE[s]=n,BE[s]=new RegExp(e,t?"g":void 0),JE[s]=new RegExp(n,t?"g":void 0)};O("NUMERICIDENTIFIER","0|[1-9]\\d*");O("NUMERICIDENTIFIERLOOSE","\\d+");O("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${oa}*`);O("MAINVERSION",`(${$[E.NUMERICIDENTIFIER]})\\.(${$[E.NUMERICIDENTIFIER]})\\.(${$[E.NUMERICIDENTIFIER]})`);O("MAINVERSIONLOOSE",`(${$[E.NUMERICIDENTIFIERLOOSE]})\\.(${$[E.NUMERICIDENTIFIERLOOSE]})\\.(${$[E.NUMERICIDENTIFIERLOOSE]})`);O("PRERELEASEIDENTIFIER",`(?:${$[E.NONNUMERICIDENTIFIER]}|${$[E.NUMERICIDENTIFIER]})`);O("PRERELEASEIDENTIFIERLOOSE",`(?:${$[E.NONNUMERICIDENTIFIER]}|${$[E.NUMERICIDENTIFIERLOOSE]})`);O("PRERELEASE",`(?:-(${$[E.PRERELEASEIDENTIFIER]}(?:\\.${$[E.PRERELEASEIDENTIFIER]})*))`);O("PRERELEASELOOSE",`(?:-?(${$[E.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${$[E.PRERELEASEIDENTIFIERLOOSE]})*))`);O("BUILDIDENTIFIER",`${oa}+`);O("BUILD",`(?:\\+(${$[E.BUILDIDENTIFIER]}(?:\\.${$[E.BUILDIDENTIFIER]})*))`);O("FULLPLAIN",`v?${$[E.MAINVERSION]}${$[E.PRERELEASE]}?${$[E.BUILD]}?`);O("FULL",`^${$[E.FULLPLAIN]}$`);O("LOOSEPLAIN",`[v=\\s]*${$[E.MAINVERSIONLOOSE]}${$[E.PRERELEASELOOSE]}?${$[E.BUILD]}?`);O("LOOSE",`^${$[E.LOOSEPLAIN]}$`);O("GTLT","((?:<|>)?=?)");O("XRANGEIDENTIFIERLOOSE",`${$[E.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);O("XRANGEIDENTIFIER",`${$[E.NUMERICIDENTIFIER]}|x|X|\\*`);O("XRANGEPLAIN",`[v=\\s]*(${$[E.XRANGEIDENTIFIER]})(?:\\.(${$[E.XRANGEIDENTIFIER]})(?:\\.(${$[E.XRANGEIDENTIFIER]})(?:${$[E.PRERELEASE]})?${$[E.BUILD]}?)?)?`);O("XRANGEPLAINLOOSE",`[v=\\s]*(${$[E.XRANGEIDENTIFIERLOOSE]})(?:\\.(${$[E.XRANGEIDENTIFIERLOOSE]})(?:\\.(${$[E.XRANGEIDENTIFIERLOOSE]})(?:${$[E.PRERELEASELOOSE]})?${$[E.BUILD]}?)?)?`);O("XRANGE",`^${$[E.GTLT]}\\s*${$[E.XRANGEPLAIN]}$`);O("XRANGELOOSE",`^${$[E.GTLT]}\\s*${$[E.XRANGEPLAINLOOSE]}$`);O("COERCEPLAIN",`(^|[^\\d])(\\d{1,${ia}})(?:\\.(\\d{1,${ia}}))?(?:\\.(\\d{1,${ia}}))?`);O("COERCE",`${$[E.COERCEPLAIN]}(?:$|[^\\d])`);O("COERCEFULL",$[E.COERCEPLAIN]+`(?:${$[E.PRERELEASE]})?(?:${$[E.BUILD]})?(?:$|[^\\d])`);O("COERCERTL",$[E.COERCE],!0);O("COERCERTLFULL",$[E.COERCEFULL],!0);O("LONETILDE","(?:~>?)");O("TILDETRIM",`(\\s*)${$[E.LONETILDE]}\\s+`,!0);Ge.tildeTrimReplace="$1~";O("TILDE",`^${$[E.LONETILDE]}${$[E.XRANGEPLAIN]}$`);O("TILDELOOSE",`^${$[E.LONETILDE]}${$[E.XRANGEPLAINLOOSE]}$`);O("LONECARET","(?:\\^)");O("CARETTRIM",`(\\s*)${$[E.LONECARET]}\\s+`,!0);Ge.caretTrimReplace="$1^";O("CARET",`^${$[E.LONECARET]}${$[E.XRANGEPLAIN]}$`);O("CARETLOOSE",`^${$[E.LONECARET]}${$[E.XRANGEPLAINLOOSE]}$`);O("COMPARATORLOOSE",`^${$[E.GTLT]}\\s*(${$[E.LOOSEPLAIN]})$|^$`);O("COMPARATOR",`^${$[E.GTLT]}\\s*(${$[E.FULLPLAIN]})$|^$`);O("COMPARATORTRIM",`(\\s*)${$[E.GTLT]}\\s*(${$[E.LOOSEPLAIN]}|${$[E.XRANGEPLAIN]})`,!0);Ge.comparatorTrimReplace="$1$2$3";O("HYPHENRANGE",`^\\s*(${$[E.XRANGEPLAIN]})\\s+-\\s+(${$[E.XRANGEPLAIN]})\\s*$`);O("HYPHENRANGELOOSE",`^\\s*(${$[E.XRANGEPLAINLOOSE]})\\s+-\\s+(${$[E.XRANGEPLAINLOOSE]})\\s*$`);O("STAR","(<|>)?=?\\s*\\*");O("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");O("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Dn=p((hA,Ld)=>{"use strict";var ev=Object.freeze({loose:!0}),tv=Object.freeze({}),rv=r=>r?typeof r!="object"?ev:r:tv;Ld.exports=rv});var aa=p((pA,Fd)=>{"use strict";var Md=/^[0-9]+$/,Vd=(r,e)=>{if(typeof r=="number"&&typeof e=="number")return r===e?0:r<e?-1:1;let t=Md.test(r),n=Md.test(e);return t&&n&&(r=+r,e=+e),r===e?0:t&&!n?-1:n&&!t?1:r<e?-1:1},nv=(r,e)=>Vd(e,r);Fd.exports={compareIdentifiers:Vd,rcompareIdentifiers:nv}});var ne=p((mA,Gd)=>{"use strict";var Ln=jr(),{MAX_LENGTH:Ud,MAX_SAFE_INTEGER:Mn}=qr(),{safeRe:Vn,t:Fn}=Jt(),sv=Dn(),{compareIdentifiers:ca}=aa(),ua=class r{constructor(e,t){if(t=sv(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>Ud)throw new TypeError(`version is longer than ${Ud} characters`);Ln("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let n=e.trim().match(t.loose?Vn[Fn.LOOSE]:Vn[Fn.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>Mn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Mn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Mn||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){let i=+s;if(i>=0&&i<Mn)return i}return s}):this.prerelease=[],this.build=n[5]?n[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(Ln("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 n=this.prerelease[t],s=e.prerelease[t];if(Ln("prerelease compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return ca(n,s)}while(++t)}compareBuild(e){e instanceof r||(e=new r(e,this.options));let t=0;do{let n=this.build[t],s=e.build[t];if(Ln("build compare",t,n,s),n===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(n===void 0)return-1;if(n===s)continue;return ca(n,s)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let s=`-${t}`.match(this.options.loose?Vn[Fn.PRERELEASELOOSE]:Vn[Fn.PRERELEASE]);if(!s||s[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,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,n),this.inc("pre",t,n);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 s=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let i=this.prerelease.length;for(;--i>=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(t===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(t){let i=[t,s];n===!1&&(i=[t]),ca(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};Gd.exports=ua});var St=p((gA,zd)=>{"use strict";var Hd=ne(),iv=(r,e,t=!1)=>{if(r instanceof Hd)return r;try{return new Hd(r,e)}catch(n){if(!t)return null;throw n}};zd.exports=iv});var Wd=p((yA,Kd)=>{"use strict";var ov=St(),av=(r,e)=>{let t=ov(r,e);return t?t.version:null};Kd.exports=av});var Jd=p((_A,Bd)=>{"use strict";var cv=St(),uv=(r,e)=>{let t=cv(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};Bd.exports=uv});var Zd=p(($A,Yd)=>{"use strict";var Xd=ne(),lv=(r,e,t,n,s)=>{typeof t=="string"&&(s=n,n=t,t=void 0);try{return new Xd(r instanceof Xd?r.version:r,t).inc(e,n,s).version}catch{return null}};Yd.exports=lv});var tf=p((EA,ef)=>{"use strict";var Qd=St(),dv=(r,e)=>{let t=Qd(r,null,!0),n=Qd(e,null,!0),s=t.compare(n);if(s===0)return null;let i=s>0,o=i?t:n,a=i?n:t,c=!!o.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(o)===0)return a.minor&&!a.patch?"minor":"patch"}let u=c?"pre":"";return t.major!==n.major?u+"major":t.minor!==n.minor?u+"minor":t.patch!==n.patch?u+"patch":"prerelease"};ef.exports=dv});var nf=p((vA,rf)=>{"use strict";var fv=ne(),hv=(r,e)=>new fv(r,e).major;rf.exports=hv});var of=p((wA,sf)=>{"use strict";var pv=ne(),mv=(r,e)=>new pv(r,e).minor;sf.exports=mv});var cf=p((bA,af)=>{"use strict";var gv=ne(),yv=(r,e)=>new gv(r,e).patch;af.exports=yv});var lf=p((SA,uf)=>{"use strict";var _v=St(),$v=(r,e)=>{let t=_v(r,e);return t&&t.prerelease.length?t.prerelease:null};uf.exports=$v});var be=p((OA,ff)=>{"use strict";var df=ne(),Ev=(r,e,t)=>new df(r,t).compare(new df(e,t));ff.exports=Ev});var pf=p((AA,hf)=>{"use strict";var vv=be(),wv=(r,e,t)=>vv(e,r,t);hf.exports=wv});var gf=p((TA,mf)=>{"use strict";var bv=be(),Sv=(r,e)=>bv(r,e,!0);mf.exports=Sv});var Un=p((PA,_f)=>{"use strict";var yf=ne(),Ov=(r,e,t)=>{let n=new yf(r,t),s=new yf(e,t);return n.compare(s)||n.compareBuild(s)};_f.exports=Ov});var Ef=p((IA,$f)=>{"use strict";var Av=Un(),Tv=(r,e)=>r.sort((t,n)=>Av(t,n,e));$f.exports=Tv});var wf=p((RA,vf)=>{"use strict";var Pv=Un(),Iv=(r,e)=>r.sort((t,n)=>Pv(n,t,e));vf.exports=Iv});var Dr=p((NA,bf)=>{"use strict";var Rv=be(),Nv=(r,e,t)=>Rv(r,e,t)>0;bf.exports=Nv});var Gn=p((CA,Sf)=>{"use strict";var Cv=be(),xv=(r,e,t)=>Cv(r,e,t)<0;Sf.exports=xv});var la=p((xA,Of)=>{"use strict";var kv=be(),qv=(r,e,t)=>kv(r,e,t)===0;Of.exports=qv});var da=p((kA,Af)=>{"use strict";var jv=be(),Dv=(r,e,t)=>jv(r,e,t)!==0;Af.exports=Dv});var Hn=p((qA,Tf)=>{"use strict";var Lv=be(),Mv=(r,e,t)=>Lv(r,e,t)>=0;Tf.exports=Mv});var zn=p((jA,Pf)=>{"use strict";var Vv=be(),Fv=(r,e,t)=>Vv(r,e,t)<=0;Pf.exports=Fv});var fa=p((DA,If)=>{"use strict";var Uv=la(),Gv=da(),Hv=Dr(),zv=Hn(),Kv=Gn(),Wv=zn(),Bv=(r,e,t,n)=>{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 Uv(r,t,n);case"!=":return Gv(r,t,n);case">":return Hv(r,t,n);case">=":return zv(r,t,n);case"<":return Kv(r,t,n);case"<=":return Wv(r,t,n);default:throw new TypeError(`Invalid operator: ${e}`)}};If.exports=Bv});var Nf=p((LA,Rf)=>{"use strict";var Jv=ne(),Xv=St(),{safeRe:Kn,t:Wn}=Jt(),Yv=(r,e)=>{if(r instanceof Jv)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?Kn[Wn.COERCEFULL]:Kn[Wn.COERCE]);else{let c=e.includePrerelease?Kn[Wn.COERCERTLFULL]:Kn[Wn.COERCERTL],d;for(;(d=c.exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||d.index+d[0].length!==t.index+t[0].length)&&(t=d),c.lastIndex=d.index+d[1].length+d[2].length;c.lastIndex=-1}if(t===null)return null;let n=t[2],s=t[3]||"0",i=t[4]||"0",o=e.includePrerelease&&t[5]?`-${t[5]}`:"",a=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Xv(`${n}.${s}.${i}${o}${a}`,e)};Rf.exports=Yv});var xf=p((MA,Cf)=>{"use strict";var ha=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 s=this.map.keys().next().value;this.delete(s)}this.map.set(e,t)}return this}};Cf.exports=ha});var Se=p((VA,Df)=>{"use strict";var Zv=/\s+/g,pa=class r{constructor(e,t){if(t=ew(t),e instanceof r)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new r(e.raw,t);if(e instanceof ma)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(Zv," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(s=>!qf(s[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let s of this.set)if(s.length===1&&aw(s[0])){this.set=[s];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 n=0;n<t.length;n++)n>0&&(this.formatted+=" "),this.formatted+=t[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&iw)|(this.options.loose&&ow))+":"+e,s=kf.get(n);if(s)return s;let i=this.options.loose,o=i?ae[se.HYPHENRANGELOOSE]:ae[se.HYPHENRANGE];e=e.replace(o,yw(this.options.includePrerelease)),H("hyphen replace",e),e=e.replace(ae[se.COMPARATORTRIM],rw),H("comparator trim",e),e=e.replace(ae[se.TILDETRIM],nw),H("tilde trim",e),e=e.replace(ae[se.CARETTRIM],sw),H("caret trim",e);let a=e.split(" ").map(l=>cw(l,this.options)).join(" ").split(/\s+/).map(l=>gw(l,this.options));i&&(a=a.filter(l=>(H("loose invalid filter",l,this.options),!!l.match(ae[se.COMPARATORLOOSE])))),H("range list",a);let c=new Map,d=a.map(l=>new ma(l,this.options));for(let l of d){if(qf(l))return[l];c.set(l.value,l)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return kf.set(n,u),u}intersects(e,t){if(!(e instanceof r))throw new TypeError("a Range is required");return this.set.some(n=>jf(n,t)&&e.set.some(s=>jf(s,t)&&n.every(i=>s.every(o=>i.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new tw(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(_w(this.set[t],e,this.options))return!0;return!1}};Df.exports=pa;var Qv=xf(),kf=new Qv,ew=Dn(),ma=Lr(),H=jr(),tw=ne(),{safeRe:ae,t:se,comparatorTrimReplace:rw,tildeTrimReplace:nw,caretTrimReplace:sw}=Jt(),{FLAG_INCLUDE_PRERELEASE:iw,FLAG_LOOSE:ow}=qr(),qf=r=>r.value==="<0.0.0-0",aw=r=>r.value==="",jf=(r,e)=>{let t=!0,n=r.slice(),s=n.pop();for(;t&&n.length;)t=n.every(i=>s.intersects(i,e)),s=n.pop();return t},cw=(r,e)=>(r=r.replace(ae[se.BUILD],""),H("comp",r,e),r=dw(r,e),H("caret",r),r=uw(r,e),H("tildes",r),r=hw(r,e),H("xrange",r),r=mw(r,e),H("stars",r),r),ce=r=>!r||r.toLowerCase()==="x"||r==="*",uw=(r,e)=>r.trim().split(/\s+/).map(t=>lw(t,e)).join(" "),lw=(r,e)=>{let t=e.loose?ae[se.TILDELOOSE]:ae[se.TILDE];return r.replace(t,(n,s,i,o,a)=>{H("tilde",r,n,s,i,o,a);let c;return ce(s)?c="":ce(i)?c=`>=${s}.0.0 <${+s+1}.0.0-0`:ce(o)?c=`>=${s}.${i}.0 <${s}.${+i+1}.0-0`:a?(H("replaceTilde pr",a),c=`>=${s}.${i}.${o}-${a} <${s}.${+i+1}.0-0`):c=`>=${s}.${i}.${o} <${s}.${+i+1}.0-0`,H("tilde return",c),c})},dw=(r,e)=>r.trim().split(/\s+/).map(t=>fw(t,e)).join(" "),fw=(r,e)=>{H("caret",r,e);let t=e.loose?ae[se.CARETLOOSE]:ae[se.CARET],n=e.includePrerelease?"-0":"";return r.replace(t,(s,i,o,a,c)=>{H("caret",r,s,i,o,a,c);let d;return ce(i)?d="":ce(o)?d=`>=${i}.0.0${n} <${+i+1}.0.0-0`:ce(a)?i==="0"?d=`>=${i}.${o}.0${n} <${i}.${+o+1}.0-0`:d=`>=${i}.${o}.0${n} <${+i+1}.0.0-0`:c?(H("replaceCaret pr",c),i==="0"?o==="0"?d=`>=${i}.${o}.${a}-${c} <${i}.${o}.${+a+1}-0`:d=`>=${i}.${o}.${a}-${c} <${i}.${+o+1}.0-0`:d=`>=${i}.${o}.${a}-${c} <${+i+1}.0.0-0`):(H("no pr"),i==="0"?o==="0"?d=`>=${i}.${o}.${a}${n} <${i}.${o}.${+a+1}-0`:d=`>=${i}.${o}.${a}${n} <${i}.${+o+1}.0-0`:d=`>=${i}.${o}.${a} <${+i+1}.0.0-0`),H("caret return",d),d})},hw=(r,e)=>(H("replaceXRanges",r,e),r.split(/\s+/).map(t=>pw(t,e)).join(" ")),pw=(r,e)=>{r=r.trim();let t=e.loose?ae[se.XRANGELOOSE]:ae[se.XRANGE];return r.replace(t,(n,s,i,o,a,c)=>{H("xRange",r,n,s,i,o,a,c);let d=ce(i),u=d||ce(o),l=u||ce(a),f=l;return s==="="&&f&&(s=""),c=e.includePrerelease?"-0":"",d?s===">"||s==="<"?n="<0.0.0-0":n="*":s&&f?(u&&(o=0),a=0,s===">"?(s=">=",u?(i=+i+1,o=0,a=0):(o=+o+1,a=0)):s==="<="&&(s="<",u?i=+i+1:o=+o+1),s==="<"&&(c="-0"),n=`${s+i}.${o}.${a}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:l&&(n=`>=${i}.${o}.0${c} <${i}.${+o+1}.0-0`),H("xRange return",n),n})},mw=(r,e)=>(H("replaceStars",r,e),r.trim().replace(ae[se.STAR],"")),gw=(r,e)=>(H("replaceGTE0",r,e),r.trim().replace(ae[e.includePrerelease?se.GTE0PRE:se.GTE0],"")),yw=r=>(e,t,n,s,i,o,a,c,d,u,l,f)=>(ce(n)?t="":ce(s)?t=`>=${n}.0.0${r?"-0":""}`:ce(i)?t=`>=${n}.${s}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,ce(d)?c="":ce(u)?c=`<${+d+1}.0.0-0`:ce(l)?c=`<${d}.${+u+1}.0-0`:f?c=`<=${d}.${u}.${l}-${f}`:r?c=`<${d}.${u}.${+l+1}-0`:c=`<=${c}`,`${t} ${c}`.trim()),_w=(r,e,t)=>{for(let n=0;n<r.length;n++)if(!r[n].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let n=0;n<r.length;n++)if(H(r[n].semver),r[n].semver!==ma.ANY&&r[n].semver.prerelease.length>0){let s=r[n].semver;if(s.major===e.major&&s.minor===e.minor&&s.patch===e.patch)return!0}return!1}return!0}});var Lr=p((FA,Gf)=>{"use strict";var Mr=Symbol("SemVer ANY"),_a=class r{static get ANY(){return Mr}constructor(e,t){if(t=Lf(t),e instanceof r){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),ya("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Mr?this.value="":this.value=this.operator+this.semver.version,ya("comp",this)}parse(e){let t=this.options.loose?Mf[Vf.COMPARATORLOOSE]:Mf[Vf.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Ff(n[2],this.options.loose):this.semver=Mr}toString(){return this.value}test(e){if(ya("Comparator.test",e,this.options.loose),this.semver===Mr||e===Mr)return!0;if(typeof e=="string")try{e=new Ff(e,this.options)}catch{return!1}return ga(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 Uf(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new Uf(this.value,t).test(e.semver):(t=Lf(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("=")||ga(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||ga(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Gf.exports=_a;var Lf=Dn(),{safeRe:Mf,t:Vf}=Jt(),ga=fa(),ya=jr(),Ff=ne(),Uf=Se()});var Vr=p((UA,Hf)=>{"use strict";var $w=Se(),Ew=(r,e,t)=>{try{e=new $w(e,t)}catch{return!1}return e.test(r)};Hf.exports=Ew});var Kf=p((GA,zf)=>{"use strict";var vw=Se(),ww=(r,e)=>new vw(r,e).set.map(t=>t.map(n=>n.value).join(" ").trim().split(" "));zf.exports=ww});var Bf=p((HA,Wf)=>{"use strict";var bw=ne(),Sw=Se(),Ow=(r,e,t)=>{let n=null,s=null,i=null;try{i=new Sw(e,t)}catch{return null}return r.forEach(o=>{i.test(o)&&(!n||s.compare(o)===-1)&&(n=o,s=new bw(n,t))}),n};Wf.exports=Ow});var Xf=p((zA,Jf)=>{"use strict";var Aw=ne(),Tw=Se(),Pw=(r,e,t)=>{let n=null,s=null,i=null;try{i=new Tw(e,t)}catch{return null}return r.forEach(o=>{i.test(o)&&(!n||s.compare(o)===1)&&(n=o,s=new Aw(n,t))}),n};Jf.exports=Pw});var Qf=p((KA,Zf)=>{"use strict";var $a=ne(),Iw=Se(),Yf=Dr(),Rw=(r,e)=>{r=new Iw(r,e);let t=new $a("0.0.0");if(r.test(t)||(t=new $a("0.0.0-0"),r.test(t)))return t;t=null;for(let n=0;n<r.set.length;++n){let s=r.set[n],i=null;s.forEach(o=>{let a=new $a(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!i||Yf(a,i))&&(i=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),i&&(!t||Yf(t,i))&&(t=i)}return t&&r.test(t)?t:null};Zf.exports=Rw});var th=p((WA,eh)=>{"use strict";var Nw=Se(),Cw=(r,e)=>{try{return new Nw(r,e).range||"*"}catch{return null}};eh.exports=Cw});var Bn=p((BA,ih)=>{"use strict";var xw=ne(),sh=Lr(),{ANY:kw}=sh,qw=Se(),jw=Vr(),rh=Dr(),nh=Gn(),Dw=zn(),Lw=Hn(),Mw=(r,e,t,n)=>{r=new xw(r,n),e=new qw(e,n);let s,i,o,a,c;switch(t){case">":s=rh,i=Dw,o=nh,a=">",c=">=";break;case"<":s=nh,i=Lw,o=rh,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(jw(r,e,n))return!1;for(let d=0;d<e.set.length;++d){let u=e.set[d],l=null,f=null;if(u.forEach(h=>{h.semver===kw&&(h=new sh(">=0.0.0")),l=l||h,f=f||h,s(h.semver,l.semver,n)?l=h:o(h.semver,f.semver,n)&&(f=h)}),l.operator===a||l.operator===c||(!f.operator||f.operator===a)&&i(r,f.semver))return!1;if(f.operator===c&&o(r,f.semver))return!1}return!0};ih.exports=Mw});var ah=p((JA,oh)=>{"use strict";var Vw=Bn(),Fw=(r,e,t)=>Vw(r,e,">",t);oh.exports=Fw});var uh=p((XA,ch)=>{"use strict";var Uw=Bn(),Gw=(r,e,t)=>Uw(r,e,"<",t);ch.exports=Gw});var fh=p((YA,dh)=>{"use strict";var lh=Se(),Hw=(r,e,t)=>(r=new lh(r,t),e=new lh(e,t),r.intersects(e,t));dh.exports=Hw});var ph=p((ZA,hh)=>{"use strict";var zw=Vr(),Kw=be();hh.exports=(r,e,t)=>{let n=[],s=null,i=null,o=r.sort((u,l)=>Kw(u,l,t));for(let u of o)zw(u,e,t)?(i=u,s||(s=u)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);let a=[];for(let[u,l]of n)u===l?a.push(u):!l&&u===o[0]?a.push("*"):l?u===o[0]?a.push(`<=${l}`):a.push(`${u} - ${l}`):a.push(`>=${u}`);let c=a.join(" || "),d=typeof e.raw=="string"?e.raw:String(e);return c.length<d.length?c:e}});var Eh=p((QA,$h)=>{"use strict";var mh=Se(),va=Lr(),{ANY:Ea}=va,Fr=Vr(),wa=be(),Ww=(r,e,t={})=>{if(r===e)return!0;r=new mh(r,t),e=new mh(e,t);let n=!1;e:for(let s of r.set){for(let i of e.set){let o=Jw(s,i,t);if(n=n||o!==null,o)continue e}if(n)return!1}return!0},Bw=[new va(">=0.0.0-0")],gh=[new va(">=0.0.0")],Jw=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===Ea){if(e.length===1&&e[0].semver===Ea)return!0;t.includePrerelease?r=Bw:r=gh}if(e.length===1&&e[0].semver===Ea){if(t.includePrerelease)return!0;e=gh}let n=new Set,s,i;for(let h of r)h.operator===">"||h.operator===">="?s=yh(s,h,t):h.operator==="<"||h.operator==="<="?i=_h(i,h,t):n.add(h.semver);if(n.size>1)return null;let o;if(s&&i){if(o=wa(s.semver,i.semver,t),o>0)return null;if(o===0&&(s.operator!==">="||i.operator!=="<="))return null}for(let h of n){if(s&&!Fr(h,String(s),t)||i&&!Fr(h,String(i),t))return null;for(let m of e)if(!Fr(h,String(m),t))return!1;return!0}let a,c,d,u,l=i&&!t.includePrerelease&&i.semver.prerelease.length?i.semver:!1,f=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1;l&&l.prerelease.length===1&&i.operator==="<"&&l.prerelease[0]===0&&(l=!1);for(let h of e){if(u=u||h.operator===">"||h.operator===">=",d=d||h.operator==="<"||h.operator==="<=",s){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=yh(s,h,t),a===h&&a!==s)return!1}else if(s.operator===">="&&!Fr(s.semver,String(h),t))return!1}if(i){if(l&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===l.major&&h.semver.minor===l.minor&&h.semver.patch===l.patch&&(l=!1),h.operator==="<"||h.operator==="<="){if(c=_h(i,h,t),c===h&&c!==i)return!1}else if(i.operator==="<="&&!Fr(i.semver,String(h),t))return!1}if(!h.operator&&(i||s)&&o!==0)return!1}return!(s&&d&&!i&&o!==0||i&&u&&!s&&o!==0||f||l)},yh=(r,e,t)=>{if(!r)return e;let n=wa(r.semver,e.semver,t);return n>0?r:n<0||e.operator===">"&&r.operator===">="?e:r},_h=(r,e,t)=>{if(!r)return e;let n=wa(r.semver,e.semver,t);return n<0?r:n>0||e.operator==="<"&&r.operator==="<="?e:r};$h.exports=Ww});var Sh=p((eT,bh)=>{"use strict";var ba=Jt(),vh=qr(),Xw=ne(),wh=aa(),Yw=St(),Zw=Wd(),Qw=Jd(),eb=Zd(),tb=tf(),rb=nf(),nb=of(),sb=cf(),ib=lf(),ob=be(),ab=pf(),cb=gf(),ub=Un(),lb=Ef(),db=wf(),fb=Dr(),hb=Gn(),pb=la(),mb=da(),gb=Hn(),yb=zn(),_b=fa(),$b=Nf(),Eb=Lr(),vb=Se(),wb=Vr(),bb=Kf(),Sb=Bf(),Ob=Xf(),Ab=Qf(),Tb=th(),Pb=Bn(),Ib=ah(),Rb=uh(),Nb=fh(),Cb=ph(),xb=Eh();bh.exports={parse:Yw,valid:Zw,clean:Qw,inc:eb,diff:tb,major:rb,minor:nb,patch:sb,prerelease:ib,compare:ob,rcompare:ab,compareLoose:cb,compareBuild:ub,sort:lb,rsort:db,gt:fb,lt:hb,eq:pb,neq:mb,gte:gb,lte:yb,cmp:_b,coerce:$b,Comparator:Eb,Range:vb,satisfies:wb,toComparators:bb,maxSatisfying:Sb,minSatisfying:Ob,minVersion:Ab,validRange:Tb,outside:Pb,gtr:Ib,ltr:Rb,intersects:Nb,simplifyRange:Cb,subset:xb,SemVer:Xw,re:ba.re,src:ba.src,tokens:ba.t,SEMVER_SPEC_VERSION:vh.SEMVER_SPEC_VERSION,RELEASE_TYPES:vh.RELEASE_TYPES,compareIdentifiers:wh.compareIdentifiers,rcompareIdentifiers:wh.rcompareIdentifiers}});var Xa=D(Ja(),1),{program:aS,createCommand:cS,createArgument:uS,createOption:lS,CommanderError:dS,InvalidArgumentError:fS,InvalidOptionArgumentError:hS,Command:ue,Argument:pS,Option:mS,Help:gS}=Xa.default;var ut="0.1.0",er="aired";var Ya="https://aired.sh",lt=`${er}/${ut}`;var bs=D(Oe(),1);var yp=`
36
+ \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557
37
+ \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
38
+ \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551
39
+ \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u255D \u2588\u2588\u2551 \u2588\u2588\u2551
40
+ \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D
41
+ \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D
42
+ `.trimStart();function ec(){let r=yp.split(`
43
+ `).map(t=>bs.default.bold(t)).join(`
44
+ `),e=bs.default.dim(`${er} v${ut}`);return`${r}${e}
45
+ `}var qh=require("node:fs/promises"),jh=require("node:path");var At=D(Oe(),1);function ye(r){return r.apiUrl??process.env.AIRED_API_URL??Ya}var tc=D(Oe(),1);function J(r){return!!(r.json||r.quiet||!process.stdout.isTTY)}function W(r,e){J(e)?process.stderr.write(JSON.stringify({error:r},null,2)+`
46
+ `):process.stderr.write(tc.default.red(`Error: ${r.message}`)+`
47
+ `)}var Os=D(Oe(),1);function rc(){return!(!process.stdout.isTTY||process.env.CI||process.env.TERM==="dumb")}var Ss=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"];async function xe(r,e,t){let n=rc()&&!J(t),s=0,i;n&&(process.stderr.write(`${Ss[0]} ${r}`),i=setInterval(()=>{s=(s+1)%Ss.length,process.stderr.write(`\r${Ss[s]} ${r}`)},80));try{let o=await e();return i&&clearInterval(i),n&&process.stderr.write(`\r${Os.default.green("\u2713")} ${r}
48
+ `),o}catch(o){throw i&&clearInterval(i),n&&process.stderr.write(`\r${Os.default.red("\u2717")} ${r}
49
+ `),o}}async function Xr(r,e){if(r.status===429){let t=new Error("Rate limited: too many uploads. Try again in an hour.");throw t.code="RATE_LIMITED",t}if(!r.ok){let t=`${e} failed (${r.status})`;try{let n=await r.json();typeof n.error=="string"&&(t=n.error)}catch{}throw new Error(t)}try{return await r.json()}catch{throw new Error(`${e}: unexpected response format`)}}async function nc(r,e,t={}){let n={html:e};t.title!==void 0&&(n.title=t.title),t.pin!==void 0&&(n.pin=t.pin),t.ttl!==void 0&&(n.ttl=t.ttl),t.reads!==void 0&&(n.reads=t.reads),t.permanent===!0&&(n.permanent=!0),t.update_token!==void 0&&(n.update_token=t.update_token),t.id!==void 0&&(n.id=t.id);let s=await fetch(`${r}/api/publish`,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":lt},body:JSON.stringify(n)});return Xr(s,"Publish")}async function sc(r,e,t,n,s={}){let i={html:t,update_token:n};s.title!==void 0&&(i.title=s.title);let o=await fetch(`${r}/api/pages/${e}`,{method:"PUT",headers:{"Content-Type":"application/json","User-Agent":lt},body:JSON.stringify(i)});return Xr(o,"Update")}async function ic(r,e,t){let n=await fetch(`${r}/api/pages/${e}`,{method:"DELETE",headers:{Authorization:`Bearer ${t}`,"User-Agent":lt}});await Xr(n,"Delete")}async function oc(r,e){let t=await fetch(`${r}/api/pages/${e}`,{headers:{"User-Agent":lt}});return Xr(t,"Get page")}async function ac(r,e){try{return(await fetch(`${r}/api/pages/${e}`,{method:"HEAD",headers:{"User-Agent":lt}})).ok}catch{return!0}}async function cc(r){try{let e=await fetch(`${r}/api/pages/___health_check`,{method:"GET",headers:{"User-Agent":lt},signal:AbortSignal.timeout(5e3)});return e.status===404||e.ok}catch{return!1}}var Ih=require("node:util"),Ta=D(require("node:process"),1),at=D(require("node:fs"),1),Pa=D(require("node:path"),1),Yt=D(require("node:crypto"),1),Rh=D(require("node:assert"),1);var dt=r=>{let e=typeof r;return r!==null&&(e==="object"||e==="function")};var As=new Set(["__proto__","prototype","constructor"]),_p=new Set("0123456789");function Yr(r){let e=[],t="",n="start",s=!1;for(let i of r)switch(i){case"\\":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");s&&(t+=i),n="property",s=!s;break}case".":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="property";break}if(s){s=!1,t+=i;break}if(As.has(t))return[];e.push(t),t="",n="property";break}case"[":{if(n==="index")throw new Error("Invalid character in an index");if(n==="indexEnd"){n="index";break}if(s){s=!1,t+=i;break}if(n==="property"){if(As.has(t))return[];e.push(t),t=""}n="index";break}case"]":{if(n==="index"){e.push(Number.parseInt(t,10)),t="",n="indexEnd";break}if(n==="indexEnd")throw new Error("Invalid character after an index")}default:{if(n==="index"&&!_p.has(i))throw new Error("Invalid character in an index");if(n==="indexEnd")throw new Error("Invalid character after an index");n==="start"&&(n="property"),s&&(s=!1,t+="\\"),t+=i}}switch(s&&(t+="\\"),n){case"property":{if(As.has(t))return[];e.push(t);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function Ts(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 uc(r,e){if(Ts(r,e))throw new Error("Cannot use string index")}function lc(r,e,t){if(!dt(r)||typeof e!="string")return t===void 0?r:t;let n=Yr(e);if(n.length===0)return t;for(let s=0;s<n.length;s++){let i=n[s];if(Ts(r,i)?r=s===n.length-1?void 0:null:r=r[i],r==null){if(s!==n.length-1)return t;break}}return r===void 0?t:r}function Ps(r,e,t){if(!dt(r)||typeof e!="string")return r;let n=r,s=Yr(e);for(let i=0;i<s.length;i++){let o=s[i];uc(r,o),i===s.length-1?r[o]=t:dt(r[o])||(r[o]=typeof s[i+1]=="number"?[]:{}),r=r[o]}return n}function dc(r,e){if(!dt(r)||typeof e!="string")return!1;let t=Yr(e);for(let n=0;n<t.length;n++){let s=t[n];if(uc(r,s),n===t.length-1)return delete r[s],!0;if(r=r[s],!dt(r))return!1}}function fc(r,e){if(!dt(r)||typeof e!="string")return!1;let t=Yr(e);if(t.length===0)return!1;for(let n of t){if(!dt(r)||!(n in r)||Ts(r,n))return!1;r=r[n]}return!0}var z=D(require("node:path"),1),Is=D(require("node:os"),1),Zr=D(require("node:process"),1),Xe=Is.default.homedir(),Rs=Is.default.tmpdir(),{env:Tt}=Zr.default,$p=r=>{let e=z.default.join(Xe,"Library");return{data:z.default.join(e,"Application Support",r),config:z.default.join(e,"Preferences",r),cache:z.default.join(e,"Caches",r),log:z.default.join(e,"Logs",r),temp:z.default.join(Rs,r)}},Ep=r=>{let e=Tt.APPDATA||z.default.join(Xe,"AppData","Roaming"),t=Tt.LOCALAPPDATA||z.default.join(Xe,"AppData","Local");return{data:z.default.join(t,r,"Data"),config:z.default.join(e,r,"Config"),cache:z.default.join(t,r,"Cache"),log:z.default.join(t,r,"Log"),temp:z.default.join(Rs,r)}},vp=r=>{let e=z.default.basename(Xe);return{data:z.default.join(Tt.XDG_DATA_HOME||z.default.join(Xe,".local","share"),r),config:z.default.join(Tt.XDG_CONFIG_HOME||z.default.join(Xe,".config"),r),cache:z.default.join(Tt.XDG_CACHE_HOME||z.default.join(Xe,".cache"),r),log:z.default.join(Tt.XDG_STATE_HOME||z.default.join(Xe,".local","state"),r),temp:z.default.join(Rs,e,r)}};function Ns(r,{suffix:e="nodejs"}={}){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);return e&&(r+=`-${e}`),Zr.default.platform==="darwin"?$p(r):Zr.default.platform==="win32"?Ep(r):vp(r)}var Tc=D(require("node:path"),1);var x=D(require("node:fs"),1),Y=require("node:util");var wp=(r,e)=>{let{onError:t}=e;return function(...s){return r.apply(void 0,s).catch(t)}},ke=wp;var bp=(r,e)=>{let{onError:t}=e;return function(...s){try{return r.apply(void 0,s)}catch(i){return t(i)}}},Ae=bp;var Op=(r,e)=>{let{isRetriable:t}=e;return function(s){let{timeout:i}=s,o=s.interval??250,a=Date.now()+i;return function c(...d){return r.apply(void 0,d).catch(u=>{if(!t(u)||Date.now()>=a)throw u;let l=Math.round(o*Math.random());return l>0?new Promise(h=>setTimeout(h,l)).then(()=>c.apply(void 0,d)):c.apply(void 0,d)})}}},qe=Op;var Ap=(r,e)=>{let{isRetriable:t}=e;return function(s){let{timeout:i}=s,o=Date.now()+i;return function(...c){for(;;)try{return r.apply(void 0,c)}catch(d){if(!t(d)||Date.now()>=o)throw d;continue}}}},je=Ap;var xs=D(require("node:process"),1);var tr={isChangeErrorOk:r=>{if(!tr.isNodeError(r))return!1;let{code:e}=r;return e==="ENOSYS"||!hc&&(e==="EINVAL"||e==="EPERM")},isNodeError:r=>r instanceof Error,isRetriableError:r=>{if(!tr.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(!tr.isNodeError(r))throw r;if(!tr.isChangeErrorOk(r))throw r}},Cs=tr;var rr={onError:Cs.onChangeError},le={onError:()=>{}},hc=xs.default.getuid?!xs.default.getuid():!1,X={isRetriable:Cs.isRetriableError};var Tp={attempt:{chmod:ke((0,Y.promisify)(x.default.chmod),rr),chown:ke((0,Y.promisify)(x.default.chown),rr),close:ke((0,Y.promisify)(x.default.close),le),fsync:ke((0,Y.promisify)(x.default.fsync),le),mkdir:ke((0,Y.promisify)(x.default.mkdir),le),realpath:ke((0,Y.promisify)(x.default.realpath),le),stat:ke((0,Y.promisify)(x.default.stat),le),unlink:ke((0,Y.promisify)(x.default.unlink),le),chmodSync:Ae(x.default.chmodSync,rr),chownSync:Ae(x.default.chownSync,rr),closeSync:Ae(x.default.closeSync,le),existsSync:Ae(x.default.existsSync,le),fsyncSync:Ae(x.default.fsync,le),mkdirSync:Ae(x.default.mkdirSync,le),realpathSync:Ae(x.default.realpathSync,le),statSync:Ae(x.default.statSync,le),unlinkSync:Ae(x.default.unlinkSync,le)},retry:{close:qe((0,Y.promisify)(x.default.close),X),fsync:qe((0,Y.promisify)(x.default.fsync),X),open:qe((0,Y.promisify)(x.default.open),X),readFile:qe((0,Y.promisify)(x.default.readFile),X),rename:qe((0,Y.promisify)(x.default.rename),X),stat:qe((0,Y.promisify)(x.default.stat),X),write:qe((0,Y.promisify)(x.default.write),X),writeFile:qe((0,Y.promisify)(x.default.writeFile),X),closeSync:je(x.default.closeSync,X),fsyncSync:je(x.default.fsyncSync,X),openSync:je(x.default.openSync,X),readFileSync:je(x.default.readFileSync,X),renameSync:je(x.default.renameSync,X),statSync:je(x.default.statSync,X),writeSync:je(x.default.writeSync,X),writeFileSync:je(x.default.writeFileSync,X)}},B=Tp;var Ye=D(require("node:process"),1),pc="utf8",ks=438,mc=511;var gc={},yc=Ye.default.geteuid?Ye.default.geteuid():-1,_c=Ye.default.getegid?Ye.default.getegid():-1;var $c=1e3,Ec=!!Ye.default.getuid,ZS=Ye.default.getuid?!Ye.default.getuid():!1,qs=128;var vc=r=>r instanceof Error&&"code"in r;var js=r=>typeof r=="string",Qr=r=>r===void 0;var Ac=D(require("node:path"),1);var ft=D(require("node:process"),1);var Ds=D(require("node:process"),1),wc=Ds.default.platform==="linux",en=Ds.default.platform==="win32";var Ls=["SIGHUP","SIGINT","SIGTERM"];en||Ls.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");wc&&Ls.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT");var bc=Ls;var Ms=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&&(en&&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 bc)try{ft.default.once(e,()=>this.exit(e))}catch{}},this.register=e=>(this.callbacks.add(e),()=>{this.callbacks.delete(e)}),this.hook()}},Sc=new Ms;var Pp=Sc.register,Oc=Pp;var me={store:{},create:r=>{let e=`000000${Math.floor(Math.random()*16777215).toString(16)}`.slice(-6),s=`.tmp-${Date.now().toString().slice(-10)}${e}`;return`${r}${s}`},get:(r,e,t=!0)=>{let n=me.truncate(e(r));return n in me.store?me.get(r,e,t):(me.store[n]=t,[n,()=>delete me.store[n]])},purge:r=>{me.store[r]&&(delete me.store[r],B.attempt.unlink(r))},purgeSync:r=>{me.store[r]&&(delete me.store[r],B.attempt.unlinkSync(r))},purgeSyncAll:()=>{for(let r in me.store)me.purgeSync(r)},truncate:r=>{let e=Ac.default.basename(r);if(e.length<=qs)return r;let t=/^(\.?)(.*?)((?:\.[^.]+)?(?:\.tmp-\d{10}[a-f0-9]{6})?)$/.exec(e);if(!t)return r;let n=e.length-qs;return`${r.slice(0,-e.length)}${t[1]}${t[2].slice(0,-n)}${t[3]}`}};Oc(me.purgeSyncAll);var nr=me;function Vs(r,e,t=gc){if(js(t))return Vs(r,e,{encoding:t});let s={timeout:t.timeout??$c},i=null,o=null,a=null;try{let c=B.attempt.realpathSync(r),d=!!c;r=c||r,[o,i]=nr.get(r,t.tmpCreate||nr.create,t.tmpPurge!==!1);let u=Ec&&Qr(t.chown),l=Qr(t.mode);if(d&&(u||l)){let f=B.attempt.statSync(r);f&&(t={...t},u&&(t.chown={uid:f.uid,gid:f.gid}),l&&(t.mode=f.mode))}if(!d){let f=Tc.default.dirname(r);B.attempt.mkdirSync(f,{mode:mc,recursive:!0})}a=B.retry.openSync(s)(o,"w",t.mode||ks),t.tmpCreated&&t.tmpCreated(o),js(e)?B.retry.writeSync(s)(a,e,0,t.encoding||pc):Qr(e)||B.retry.writeSync(s)(a,e,0,e.length,0),t.fsync!==!1&&(t.fsyncWait!==!1?B.retry.fsyncSync(s)(a):B.attempt.fsync(a)),B.retry.closeSync(s)(a),a=null,t.chown&&(t.chown.uid!==yc||t.chown.gid!==_c)&&B.attempt.chownSync(o,t.chown.uid,t.chown.gid),t.mode&&t.mode!==ks&&B.attempt.chmodSync(o,t.mode);try{B.retry.renameSync(s)(o,r)}catch(f){if(!vc(f)||f.code!=="ENAMETOOLONG")throw f;B.retry.renameSync(s)(o,nr.truncate(r))}i(),o=null}finally{a&&B.attempt.closeSync(a),o&&nr.purge(o)}}var Nh=D(gd(),1),Ch=D(kd(),1);var NE=(r,e,t,n)=>{if(t==="length"||t==="prototype"||t==="arguments"||t==="caller")return;let s=Object.getOwnPropertyDescriptor(r,t),i=Object.getOwnPropertyDescriptor(e,t);!CE(s,i)&&n||Object.defineProperty(r,t,i)},CE=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)},xE=(r,e)=>{let t=Object.getPrototypeOf(e);t!==Object.getPrototypeOf(r)&&Object.setPrototypeOf(r,t)},kE=(r,e)=>`/* Wrapped ${r}*/
50
+ ${e}`,qE=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),jE=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),DE=(r,e,t)=>{let n=t===""?"":`with ${t.trim()}() `,s=kE.bind(null,n,e.toString());Object.defineProperty(s,"name",jE);let{writable:i,enumerable:o,configurable:a}=qE;Object.defineProperty(r,"toString",{value:s,writable:i,enumerable:o,configurable:a})};function na(r,e,{ignoreNonConfigurable:t=!1}={}){let{name:n}=r;for(let s of Reflect.ownKeys(e))NE(r,e,s,t);return xE(r,e),DE(r,e,n),r}var LE=(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:n=Number.POSITIVE_INFINITY,before:s=!1,after:i=!0}=e;if(t<0||n<0)throw new RangeError("`wait` and `maxWait` must not be negative.");if(!s&&!i)throw new Error("Both `before` and `after` are false, function wouldn't be called.");let o,a,c,d=function(...u){let l=this,f=()=>{o=void 0,a&&(clearTimeout(a),a=void 0),i&&(c=r.apply(l,u))},h=()=>{a=void 0,o&&(clearTimeout(o),o=void 0),i&&(c=r.apply(l,u))},m=s&&!o;return clearTimeout(o),o=setTimeout(f,t),n>0&&n!==Number.POSITIVE_INFINITY&&!a&&(a=setTimeout(h,n)),m&&(c=r.apply(l,u)),c};return na(d,r),d.cancel=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearTimeout(a),a=void 0)},d},sa=LE;var Ot=D(Sh(),1);var kb=Object.prototype.toString,qb="[object Uint8Array]",jb="[object ArrayBuffer]";function Ah(r,e,t){return r?r.constructor===e?!0:kb.call(r)===t:!1}function Th(r){return Ah(r,Uint8Array,qb)}function Db(r){return Ah(r,ArrayBuffer,jb)}function Lb(r){return Th(r)||Db(r)}function Mb(r){if(!Th(r))throw new TypeError(`Expected \`Uint8Array\`, got \`${typeof r}\``)}function Vb(r){if(!Lb(r))throw new TypeError(`Expected \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof r}\``)}function Sa(r,e){if(r.length===0)return new Uint8Array(0);e??=r.reduce((s,i)=>s+i.length,0);let t=new Uint8Array(e),n=0;for(let s of r)Mb(s),t.set(s,n),n+=s.length;return t}var Oh={utf8:new globalThis.TextDecoder("utf8")};function Oa(r,e="utf8"){return Vb(r),Oh[e]??=new globalThis.TextDecoder(e),Oh[e].decode(r)}function Fb(r){if(typeof r!="string")throw new TypeError(`Expected \`string\`, got \`${typeof r}\``)}var Ub=new globalThis.TextEncoder;function Jn(r){return Fb(r),Ub.encode(r)}var tT=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));var Gb=Ch.default.default,Ph="aes-256-cbc",Xt=()=>Object.create(null),Hb=r=>r!=null,zb=(r,e)=>{let t=new Set(["undefined","symbol","function"]),n=typeof e;if(t.has(n))throw new TypeError(`Setting a value of type \`${n}\` for key \`${r}\` is not allowed as it's not supported by JSON`)},Xn="__internal__",Aa=`${Xn}.migrations.version`,Ur=class{path;events;#n;#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=Ns(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 Nh.Ajv2020({allErrors:!0,useDefaults:!0,...t.ajvOptions});Gb(o);let a={...t.rootSchema,type:"object",properties:t.schema};this.#n=o.compile(a);for(let[c,d]of Object.entries(t.schema??{}))d?.default&&(this.#r[c]=d.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 n=t.fileExtension?`.${t.fileExtension}`:"";this.path=Pa.default.resolve(t.cwd,`${t.configName??"config"}${n}`);let s=this.store,i=Object.assign(Xt(),t.defaults,s);if(t.migrations){if(!t.projectVersion)throw new Error("Please specify the `projectVersion` option.");this._migrate(t.migrations,t.projectVersion,t.beforeEachMigration)}this._validate(i);try{Rh.default.deepEqual(s,i)}catch{this.store=i}t.watch&&this._watch()}get(e,t){if(this.#e.accessPropertiesByDotNotation)return this._get(e,t);let{store:n}=this;return e in n?n[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 ${Xn} key, as it's used to manage this module internal operations.`);let{store:n}=this,s=(i,o)=>{zb(i,o),this.#e.accessPropertiesByDotNotation?Ps(n,i,o):n[i]=o};if(typeof e=="object"){let i=e;for(let[o,a]of Object.entries(i))s(o,a)}else s(e,t);this.store=n}has(e){return this.#e.accessPropertiesByDotNotation?fc(this.store,e):e in this.store}reset(...e){for(let t of e)Hb(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=Xt();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=at.default.readFileSync(this.path,this.#t?null:"utf8"),t=this._encryptData(e),n=this._deserialize(t);return this._validate(n),Object.assign(Xt(),n)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),Xt();if(this.#e.clearInvalidConfig&&e.name==="SyntaxError")return Xt();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:Oa(e);try{let t=e.slice(0,16),n=Yt.default.pbkdf2Sync(this.#t,t.toString(),1e4,32,"sha512"),s=Yt.default.createDecipheriv(Ph,n,t),i=e.slice(17),o=typeof i=="string"?Jn(i):i;return Oa(Sa([s.update(o),s.final()]))}catch{}return e.toString()}_handleChange(e,t){let n=e(),s=()=>{let i=n,o=e();(0,Ih.isDeepStrictEqual)(o,i)||(n=o,t.call(this,o,i))};return this.events.addEventListener("change",s),()=>{this.events.removeEventListener("change",s)}}_deserialize=e=>JSON.parse(e);_serialize=e=>JSON.stringify(e,void 0," ");_validate(e){if(!this.#n||this.#n(e)||!this.#n.errors)return;let n=this.#n.errors.map(({instancePath:s,message:i=""})=>`\`${s.slice(1)}\` ${i}`);throw new Error("Config schema violation: "+n.join("; "))}_ensureDirectory(){at.default.mkdirSync(Pa.default.dirname(this.path),{recursive:!0})}_write(e){let t=this._serialize(e);if(this.#t){let n=Yt.default.randomBytes(16),s=Yt.default.pbkdf2Sync(this.#t,n.toString(),1e4,32,"sha512"),i=Yt.default.createCipheriv(Ph,s,n);t=Sa([n,Jn(":"),i.update(Jn(t)),i.final()])}if(Ta.default.env.SNAP)at.default.writeFileSync(this.path,t,{mode:this.#e.configFileMode});else try{Vs(this.path,t,{mode:this.#e.configFileMode})}catch(n){if(n?.code==="EXDEV"){at.default.writeFileSync(this.path,t,{mode:this.#e.configFileMode});return}throw n}}_watch(){this._ensureDirectory(),at.default.existsSync(this.path)||this._write(Xt()),Ta.default.platform==="win32"?at.default.watch(this.path,{persistent:!1},sa(()=>{this.events.dispatchEvent(new Event("change"))},{wait:100})):at.default.watchFile(this.path,{persistent:!1},sa(()=>{this.events.dispatchEvent(new Event("change"))},{wait:5e3}))}_migrate(e,t,n){let s=this._get(Aa,"0.0.0"),i=Object.keys(e).filter(a=>this._shouldPerformMigration(a,s,t)),o={...this.store};for(let a of i)try{n&&n(this,{fromVersion:s,toVersion:a,finalVersion:t,versions:i});let c=e[a];c?.(this),this._set(Aa,a),s=a,o={...this.store}}catch(c){throw this.store=o,new Error(`Something went wrong during the migration! Changes applied to the store until this failed migration will be restored. ${c}`)}(this._isVersionInRangeFormat(s)||!Ot.default.eq(s,t))&&this._set(Aa,t)}_containsReservedKey(e){return typeof e=="object"&&Object.keys(e)[0]===Xn?!0:typeof e!="string"?!1:this.#e.accessPropertiesByDotNotation?!!e.startsWith(`${Xn}.`):!1}_isVersionInRangeFormat(e){return Ot.default.clean(e)===null}_shouldPerformMigration(e,t,n){return this._isVersionInRangeFormat(e)?t!=="0.0.0"&&Ot.default.satisfies(t,e)?!1:Ot.default.satisfies(n,e):!(Ot.default.lte(e,t)||Ot.default.gt(e,n))}_get(e,t){return lc(this.store,e,t)}_set(e,t){let{store:n}=this;Ps(n,e,t),this.store=n}};var Ia=null;function Gr(){return Ia===null&&(Ia=new Ur({projectName:"aired",configName:"tokens",cwd:`${process.env.HOME??"~"}/.config/aired`,fileExtension:"json",configFileMode:384,defaults:{}})),Ia}function Yn(r,e,t){Gr().set(r,{token:e,title:t.title??null,url:t.url,created:new Date().toISOString()})}function Zn(r){return Gr().get(r)?.token??null}function Hr(){let r=Gr();return Object.entries(r.store).map(([e,t])=>({id:e,...t}))}function Ra(r){Gr().delete(r)}function xh(){return Gr().path}async function kh(r){let e=Hr(),t=0;return await Promise.all(e.map(async n=>{await ac(r,n.id)||(Ra(n.id),t++)})),t}function Kb(r){let e=/^(\d+)(h|d|m)?$/i.exec(r);if(!e)return null;let t=parseInt(e[1],10),n=(e[2]??"s").toLowerCase();return n==="h"?t*3600:n==="d"?t*86400:n==="m"?t*60:t}async function Wb(){return new Promise((r,e)=>{let t=[];process.stdin.on("data",n=>t.push(n)),process.stdin.on("end",()=>r(Buffer.concat(t).toString("utf-8"))),process.stdin.on("error",e)})}function Bb(r){return r===null?"Never (permanent)":new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function Dh(r){return new ue("publish").alias("p").description("Publish an HTML file (or pipe via stdin)").argument("[file]","Path to HTML file (omit to read stdin)").option("-t, --title <title>","Custom title").option("-p, --pin <pin>","PIN-protect the page").option("--ttl <duration>","Expiry duration: 1h, 24h, 7d, 30d").option("--permanent","No expiry").option("--reads <n>","Max read count before page is gone").action(async(e,t)=>{let n=r(),s=ye(n),i;if(e===void 0||e==="-")process.stdin.isTTY&&(W({code:"VALIDATION",message:"Provide a file path or pipe HTML via stdin"},n),process.exit(2)),i=await Wb();else try{i=await(0,qh.readFile)((0,jh.resolve)(e),"utf-8")}catch(a){W({code:"VALIDATION",message:`Cannot read file '${e}': ${a.message}`},n),process.exit(2)}let o={};if(t.title!==void 0&&(o.title=t.title),t.pin!==void 0&&(o.pin=t.pin),t.permanent===!0)o.permanent=!0;else if(t.ttl!==void 0){let a=Kb(t.ttl);(a===null||a<=0)&&(W({code:"VALIDATION",message:`Invalid --ttl value '${t.ttl}'. Use formats like 1h, 24h, 7d, 30d`},n),process.exit(2)),o.ttl=a}if(t.reads!==void 0){let a=parseInt(t.reads,10);(isNaN(a)||a<=0)&&(W({code:"VALIDATION",message:"--reads must be a positive integer"},n),process.exit(2)),o.reads=a}try{let a=await xe("Publishing...",()=>nc(s,i,o),n);Yn(a.id,a.update_token,{title:t.title??null,url:a.url}),J(n)?process.stdout.write(JSON.stringify(a,null,2)+`
51
+ `):(process.stdout.write(`
52
+ `),process.stdout.write(At.default.green("Published!")+" "+At.default.bold(a.url)+`
53
+ `),process.stdout.write(At.default.dim("Token: ")+a.update_token+`
54
+ `),process.stdout.write(At.default.dim("Expires: ")+Bb(a.expiresAt)+`
55
+ `),process.stdout.write(`
56
+ `),process.stdout.write(At.default.dim("Update: ")+`npx aired update ${a.id} new-file.html
57
+ `),process.stdout.write(At.default.dim("Delete: ")+`npx aired delete ${a.id}
58
+ `))}catch(a){let c=a;c.code==="RATE_LIMITED"&&(W({code:"RATE_LIMIT",message:c.message},n),process.exit(3)),W({code:"API",message:c.message},n),process.exit(1)}})}var Lh=require("node:fs/promises"),Mh=require("node:path");var es=D(Oe(),1);function Jb(r){return r===null?"Never (permanent)":new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function Vh(r){return new ue("update").description("Update an existing page using the stored token").argument("<id>","Page ID").argument("<file>","Path to new HTML file").option("-t, --title <title>","New title").action(async(e,t,n)=>{let s=r(),i=ye(s),o=Zn(e);o===null&&(W({code:"VALIDATION",message:`No token found for page '${e}'. Run 'aired tokens' to list stored tokens.`},s),process.exit(2));let a;try{a=await(0,Lh.readFile)((0,Mh.resolve)(t),"utf-8")}catch(c){W({code:"VALIDATION",message:`Cannot read file '${t}': ${c.message}`},s),process.exit(2)}try{let c=await xe("Updating...",()=>sc(i,e,a,o,{title:n.title}),s);Yn(c.id,c.update_token,{title:n.title??null,url:c.url}),J(s)?process.stdout.write(JSON.stringify(c,null,2)+`
59
+ `):(process.stdout.write(es.default.green("Updated!")+" "+es.default.bold(c.url)+`
60
+ `),process.stdout.write(es.default.dim("Expires: ")+Jb(c.expiresAt)+`
61
+ `))}catch(c){let d=c;d.code==="RATE_LIMITED"&&(W({code:"RATE_LIMIT",message:d.message},s),process.exit(3)),W({code:"API",message:d.message},s),process.exit(1)}})}var Na=D(Oe(),1);function Fh(r){return new ue("delete").description("Delete a page using the stored token").argument("<id>","Page ID").action(async e=>{let t=r(),n=ye(t),s=Zn(e);s===null&&(W({code:"VALIDATION",message:`No token found for page '${e}'. Run 'aired tokens' to list stored tokens.`},t),process.exit(2));try{await xe("Deleting...",()=>ic(n,e,s),t),Ra(e),J(t)?process.stdout.write(JSON.stringify({ok:!0,id:e},null,2)+`
62
+ `):process.stdout.write(Na.default.green("Deleted")+` page ${Na.default.bold(e)}
63
+ `)}catch(i){W({code:"API",message:i.message},t),process.exit(1)}})}var ct=D(Oe(),1);function Xb(r){if(r<1024)return`${r} B`;let e=r/1024;return e<1024?`${e.toFixed(1)} KB`:`${(e/1024).toFixed(1)} MB`}function Yb(r){return r===null?"Never (permanent)":new Date(r).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function Uh(r){return new ue("info").description("Show page metadata (title, size, reads, expiry)").argument("<id>","Page ID").action(async e=>{let t=r(),n=ye(t);try{let s=await xe("Fetching...",()=>oc(n,e),t);if(J(t))process.stdout.write(JSON.stringify(s,null,2)+`
64
+ `);else{let i=`${n}/p/${e}`;process.stdout.write(`
65
+ `),process.stdout.write(ct.default.dim("ID: ")+ct.default.bold(s.id)+`
66
+ `),process.stdout.write(ct.default.dim("Title: ")+(s.title??"(untitled)")+`
67
+ `),process.stdout.write(ct.default.dim("URL: ")+i+`
68
+ `),process.stdout.write(ct.default.dim("Size: ")+Xb(s.size)+`
69
+ `),process.stdout.write(ct.default.dim("Reads: ")+String(s.readCount)+`
70
+ `),process.stdout.write(ct.default.dim("Expires: ")+Yb(s.expiresAt)+`
71
+ `)}}catch(s){W({code:"API",message:s.message},t),process.exit(1)}})}var xa=D(Oe(),1);var Ca=D(Oe(),1);function Gh(r,e){if(r.length===0)return"";let t=e.map(s=>{let i=s.header.length,o=r.reduce((a,c)=>Math.max(a,String(c[s.key]??"").length),0);return s.width??Math.max(i,o)}),n=[];n.push(e.map((s,i)=>Ca.default.bold(s.header.padEnd(t[i]))).join(" ")),n.push(Ca.default.dim(t.map(s=>"-".repeat(s)).join(" ")));for(let s of r)n.push(e.map((i,o)=>String(s[i.key]??"").padEnd(t[o])).join(" "));return n.join(`
72
+ `)}function Hh(r){let e=new ue("tokens").description("List stored tokens").action(async()=>{let t=r(),n=Hr();if(n.length===0){J(t)?process.stdout.write(`[]
73
+ `):process.stdout.write(`No tokens stored. Publish a page first.
74
+ `);return}if(J(t)){let i=n.map(o=>({id:o.id,title:o.title,url:o.url,created:o.created}));process.stdout.write(JSON.stringify(i,null,2)+`
75
+ `);return}let s=n.map(i=>({id:i.id,title:i.title??xa.default.dim("(untitled)"),url:i.url,created:new Date(i.created).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}));process.stdout.write(Gh(s,[{key:"id",header:"ID"},{key:"title",header:"Title"},{key:"url",header:"URL"},{key:"created",header:"Created"}])+`
76
+ `)});return e.command("prune").description("Remove tokens for pages that no longer exist").action(async()=>{let t=r(),n=ye(t);try{let s=await xe("Checking pages...",()=>kh(n),t);J(t)?process.stdout.write(JSON.stringify({pruned:s},null,2)+`
77
+ `):s===0?process.stdout.write(`Nothing to prune. All pages are still alive.
78
+ `):process.stdout.write(xa.default.green(`Pruned ${s} expired token${s===1?"":"s"}.
79
+ `))}catch(s){W({code:"API",message:s.message},t),process.exit(1)}}),e}var ka=D(Oe(),1),ts=D(require("node:fs"),1);function zh(r){return new ue("doctor").description("Run diagnostic checks").action(async()=>{let e=r(),t=J(e),n=[];n.push({name:"CLI Version",status:"pass",message:`v${ut}`});let s=parseInt(process.version.slice(1),10);n.push({name:"Node.js",status:s>=20?"pass":"fail",message:process.version});let i=xh(),o=!1;try{ts.accessSync(i,ts.constants.R_OK),o=!0}catch{}let a=o?Hr().length:0;n.push({name:"Token Store",status:"pass",message:o?`${a} token${a===1?"":"s"} at ${i}`:"Not created yet (publish a page first)"});let c=ye(e),d=!1;try{d=await cc(c)}catch{}if(n.push({name:"API",status:d?"pass":"fail",message:d?c:`Cannot reach ${c}`}),t)process.stdout.write(JSON.stringify({ok:n.every(u=>u.status==="pass"),checks:n},null,2)+`
80
+ `);else for(let u of n){let l=u.status==="pass"?ka.default.green("\u2713"):ka.default.red("\u2717");process.stderr.write(`${l} ${u.name}: ${u.message}
81
+ `)}})}if(process.argv.includes("--mcp")){let{spawn:r}=require("node:child_process"),t=require("node:path").resolve(__dirname,"../../mcp/dist/index.js"),n=r(process.execPath,[t],{stdio:"inherit",env:process.env});n.on("error",s=>{process.stderr.write(`MCP server failed to start: ${s.message}
82
+ `),process.stderr.write(`Make sure @aired/mcp is built: pnpm --filter @aired/mcp build
83
+ `),process.exit(1)}),n.on("exit",s=>{process.exit(s??0)})}else{let e=function(){let t=r.opts();return{apiUrl:t.apiUrl,json:t.json,quiet:t.quiet,verbose:t.verbose}};Zb=e;let r=new ue().name(er).version(ut,"-v, --version").description("Publish HTML artifacts to shareable URLs instantly").option("--api-url <url>","Custom API URL (default: https://aired.sh)").option("--json","Force JSON output").option("-q, --quiet","Suppress stderr, implies --json").option("--verbose","Show extended output");r.addCommand(Dh(e),{isDefault:!0}),r.addCommand(Vh(e)),r.addCommand(Fh(e)),r.addCommand(Uh(e)),r.addCommand(Hh(e)),r.addCommand(zh(e)),process.argv.length<=2?(process.stderr.write(ec()+`
84
+ `),r.help()):r.parse(process.argv)}var Zb;
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "aired",
3
+ "version": "0.1.0",
4
+ "description": "Publish HTML artifacts to shareable URLs instantly",
5
+ "type": "module",
6
+ "bin": {
7
+ "aired": "./dist/cli.cjs"
8
+ },
9
+ "files": [
10
+ "dist/cli.cjs",
11
+ "SKILL.md"
12
+ ],
13
+ "scripts": {
14
+ "build": "node build.mjs",
15
+ "dev": "tsx src/index.ts",
16
+ "typecheck": "tsc --noEmit"
17
+ },
18
+ "engines": {
19
+ "node": ">=20"
20
+ },
21
+ "keywords": [
22
+ "html",
23
+ "artifact",
24
+ "publish",
25
+ "share",
26
+ "cli",
27
+ "mcp",
28
+ "claude",
29
+ "ai"
30
+ ],
31
+ "license": "MIT",
32
+ "author": "Abdul Moiz",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://github.com/progrmoiz/aired.git",
36
+ "directory": "apps/cli"
37
+ },
38
+ "dependencies": {
39
+ "@aired/core": "workspace:*",
40
+ "commander": "^14.0.0",
41
+ "@commander-js/extra-typings": "^14.0.0",
42
+ "@clack/prompts": "^0.9.0",
43
+ "picocolors": "^1.1.0",
44
+ "conf": "^13.0.0"
45
+ },
46
+ "devDependencies": {
47
+ "@types/node": "^22.0.0",
48
+ "typescript": "^5.7.0",
49
+ "tsx": "^4.19.0",
50
+ "esbuild": "^0.25.0"
51
+ }
52
+ }