@frontfriend/sdk 1.2.6 → 1.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,368 +1,28 @@
1
1
  # @frontfriend/sdk
2
2
 
3
- Connect your application to your Frontfriend Design System. Use design contracts on their own, or add generated tokens and components for React and Vue. The SDK includes the Frontfriend CLI, coding agent integrations, and runtime helpers.
4
-
5
- [Documentation](https://frontfriend.dev/docs/) · [Component catalogue](https://frontfriend.dev/components/)
3
+ Connect your application to your Frontfriend Design System. Use design contracts on their own, or add tokens and components for React and Vue. The SDK includes the `frontfriend` CLI, coding agent integrations and runtime helpers.
6
4
 
7
5
  ## Install
8
6
 
9
- Install `@frontfriend/sdk` to connect your application to Frontfriend. Follow the [installation guide](https://frontfriend.dev/docs/installation/) to get started.
10
-
11
- `latest` is the stable SDK release. Use `@frontfriend/sdk@next` only when the Frontfriend team asks you to test a preview; the `next` tag may not be available. Pin a version when your project needs a fixed SDK version.
12
-
13
- Use Node.js 20.19 or later. Web applications also need Tailwind CSS 4 and a compatible React or Vue 3 component library. Design contracts do not require Tailwind CSS, React, or Vue.
14
-
15
- The SDK runtime supports React 16.8–19. The components you select can require a newer React version; follow their dependency requirements. Install TypeScript as a development dependency when importing or updating component sources (`npm install -D typescript`).
16
-
17
- Every project starts from a Design System. Create one in Frontfriend, or open an existing one, and copy its ID (`ff-id`). For a web application, run these commands from the application root:
18
-
19
7
  ```bash
20
- npm install @frontfriend/sdk tw-animate-css
21
- npm install -D typescript
22
- npx frontfriend login
23
- npx frontfriend setup --ff-id <ff-id> --framework react --primitive base
8
+ pnpm add @frontfriend/sdk tw-animate-css
9
+ pnpm add -D typescript
24
10
  ```
25
11
 
26
- Setup connects the Design System and asks which features to adopt: design rules, tokens, and components. It creates `frontfriend.config.js` and initializes the local configuration. Without `--ff-id`, setup asks for the ID in an interactive terminal. Setup never replaces the Design System or App of a project that is already connected; pass `--force` to replace them.
27
-
28
- Use `setup` to configure a project and choose its features. Use `connect` for the complete flow, including sign-in, coding-agent installation, connection checks, and activation of reviewed design rules.
29
-
30
- A **Release** is a published selection of tokens, components, and design rules. **Adoption** means applying that selection to your application and recording it in `frontfriend.lock.json` (the adoption lock). The **MCP bridge** connects your coding agent to Frontfriend and runs local checks.
31
-
32
- Commands that work on the Design System, such as `init`, `migrate`, `update`, and `download`, check for the `ff-id` first. If the project has none, they stop and explain how to create or connect a Design System. They don't change the project. `npx frontfriend status` shows a missing Design System as the first problem.
33
-
34
- Every command reads the Frontfriend URL in the same order: the `--api-url` flag, then `api-url` in `frontfriend.config.js`, then `FF_API_URL`, then the URL stored by `frontfriend login`, then the default platform. `update`, `init`, `check`, `design sync`, `import-shadcn` and `migrate` accept `--api-url` (`check` runs offline and only accepts it). `connect` writes `api-url` into an existing `frontfriend.config.js` that has none.
35
-
36
- `frontfriend.config.js` holds data only. Setup writes `module.exports = {…}` for CommonJS and `const config = {…}; export default config;` for an ES module project. The CLI also reads `export default {…}` and `module.exports = config`.
37
-
38
- ### Design contracts without tokens or components
39
-
40
- Install the SDK and connect only the design contracts:
41
-
42
- ```bash
43
- npm install @frontfriend/sdk
44
- npx frontfriend login
45
- npx frontfriend setup --ff-id <ff-id> --adopt contracts
46
- npx frontfriend design sync --contracts-only
47
- ```
48
-
49
- This setup does not require a web framework, CSS, or a build plugin. Contract synchronization writes `.frontfriend/design/`. If the application has adopted a design snapshot, synchronization uses that snapshot. Otherwise, it reads the working contracts without adopting a Release.
50
-
51
- To adopt approved contracts and record the selection in the adoption lock (`frontfriend.lock.json`), preview and apply an update:
52
-
53
- ```bash
54
- npx frontfriend update --contracts-only --working-design --dry-run
55
- npx frontfriend update --contracts-only --working-design --yes
56
- ```
57
-
58
- Tailwind CSS, React, and Vue are optional peer dependencies. Install the framework and renderer only when your application uses their integrations.
59
-
60
- ### Existing shadcn projects
61
-
62
- Create a Design System with the **shadcn** base. Connect the first application with its selected adoption levels:
63
-
64
- ```bash
65
- npx --yes @frontfriend/sdk@latest connect --ff-id <ff-id> --base-library shadcn --agent codex --adopt contracts,tokens,components
66
- ```
67
-
68
- On a shadcn base that is not initialized yet, `connect` runs its `import` step after the agent installation: `import-shadcn`, the adoption of the imported Release (its tokens and the installed components, as `update --release <id> --installed --tokens`), then `init`. The JSON result reports it in `import` (`status`, `release_id`). A source conflict stops the step with exit 12, names the files and the fix, and writes nothing; run `connect` again after you resolve them and it continues from the import. A second run changes nothing. `--no-import` skips the step. Later applications adopt the existing Release in the same step. The Design contract review and Connect activation still apply.
69
-
70
- Without `connect`, run the same steps by hand. `init` exits 1 on a shadcn base that is not initialized and names them:
71
-
72
- ```bash
73
- npx frontfriend import-shadcn
74
- npx frontfriend update --release <releaseId> --installed --tokens --dry-run
75
- npx frontfriend update --release <releaseId> --installed --tokens --yes
76
- npx frontfriend init
77
- ```
78
-
79
- `--installed` selects local components and their dependencies. `--tokens` also advances the token pin. Check any source conflict before you use `--replace`.
80
-
81
- The first import keeps native light, dark, and custom tokens. With component adoption, it compares the actual UI sources with the pinned shadcn base. Changed components and local helpers become private versions at `1.0.0`. Explicit replacements have one file owner. Later applications adopt the configured Release. A repeated import does not publish local edits.
82
-
83
- Native `init` writes the selected native CSS and foundation context. It uses the shadcn base without a Frontfriend runtime plugin.
84
-
85
- To convert the same Design System to Frontfriend, run `npx frontfriend migrate`. It transforms token classes and preserves component logic. It publishes new private versions and adopts only this application's installed sources and tokens. Other applications keep their locks. If publication completes but local adoption fails, run `migrate` again to resume the saved adoption.
86
-
87
- Choose one target per application:
88
-
89
- | Framework | Primitive |
90
- | --------- | -------------------------- |
91
- | `react` | `base`, `radix`, or `aria` |
92
- | `vue` | `reka` |
93
-
94
- ### Connect an application with one command
95
-
96
- Run inside an application in a Git work tree. Existing shadcn and shadcn-vue applications retain their target. For a new app, pass an explicit `--framework` and `--primitive` or copy the command from Studio’s Connect flow:
97
-
98
- ```bash
99
- npx --yes @frontfriend/sdk@latest connect --ff-id <design-system-id> --agent claude
100
- ```
101
-
102
- `connect` runs the operations of `login`, `setup`, `agents install` and `doctor` in order, says which files it will create or change before it writes them, and ends with checks of configuration, authentication, Design System access, Release selection, and the first data read, followed by onboarding. It never replaces an identity in `frontfriend.config.js`. A second run changes nothing and reports "already connected"; a run that failed continues from the failed step. When the installed Claude or Codex registration reads another Frontfriend URL than this run, `connect` registers it again for this URL and says so. The registration is user-level: every project that the agent opens reads the new URL.
103
-
104
- | Flag | Meaning |
105
- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
106
- | `--ff-id <id>` | Design System. Needed when there is no terminal. |
107
- | `--base-library <base>` | The chosen Design System base: `frontfriend` or `shadcn`. |
108
- | `--agent <agent>` | `claude`, `codex`, `cursor`, `hermes` or `openclaw`; repeat it or use commas. `connect` installs for Claude and Codex and prints the exact MCP registration for the other agents. |
109
- | `--name`, `--adopt` | App name (default: the package name) and adoption levels (default: `contracts,tokens,components`). On an existing shadcn app the user may stop at `contracts`. On a connected project a different `--adopt` is written to `frontfriend.config.js` and `init` runs again. On a shadcn app, adopting components applies the Design System styling (`init --force`). |
110
- | `--framework`, `--primitive` | Declare the target when no primitive package is installed yet. Evidence in the project can contradict the flag, never the reverse. |
111
- | `--areas <a,b>` | Areas of the onboarding run: codebase areas, or the intended product areas of an app with no UI code yet. Used only while the App is not onboarded; without it, `connect` starts no run. |
112
- | `--resume` | Continue the onboarding of a connected project (review, activation). It never starts a run, so it takes no `--areas` (exit 2). |
113
- | `--no-activate` | Do not adopt the reviewed snapshot when the onboarding is ready to adopt, nor align the lock of a ready App. |
114
- | `--no-import` | On a shadcn base, skip the native import step. |
115
- | `--require-ready` | Exit 11 unless the App ends ready. |
116
- | `--verification-id <id>` | Report the verification to the Studio Connect wizard. |
117
- | `--login` | Start the device login when there is no terminal. A person approves the code in the browser. |
118
- | `--no-install` | `init` adds `@frontfriend/sdk` to `package.json`; `connect` then installs it with the package manager your lockfile names. This flag prints the command instead. |
119
- | `--dry-run`, `--yes`, `--force`, `--json` | Name the files (the activation included) and stop; do not ask before writing; run every step again; print one JSON result on stdout (progress goes to stderr). |
120
-
121
- Without a terminal `connect` never prompts: it stops and names the missing flag.
122
-
123
- #### Onboarding and activation
124
-
125
- After the connection, `connect` reads the onboarding state of the App from Studio and acts on it:
126
-
127
- | State | Waiting on | What `connect` does |
128
- | ----------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
129
- | `not_onboarded` | agent | With `--areas`, starts the setup run. Otherwise names the next step. |
130
- | `onboarding` | agent | Reports the run progress: the agent runs ff-setup, which resumes the run. |
131
- | `awaiting_review` | human (agent when changes were requested) | Prints the review URL in the Studio, and the comment when changes were requested. |
132
- | `ready_to_adopt` | cli | Activation: adopts exactly the reviewed snapshot with its source Release (contracts only), lists the files, asks at a terminal unless `--yes`, reports the adoption, then runs doctor again until the selection is the adopted snapshot, and writes `.frontfriend/rules/` for it so `frontfriend check` can run. When `frontfriend.lock.json` already pins the reviewed snapshot, it only reports the adoption again. |
133
- | `ready` | none | When `frontfriend.lock.json` is missing or pins neither the snapshot the platform reports as adopted nor the reviewed one, adopts that snapshot as in the activation (lock, `.frontfriend/design/`, `.frontfriend/rules/`) and reports it in `activation` (`reason`: `lock_missing` or `lock_mismatch`). Then prints the daily loop (design with ff-design, check with `frontfriend check`, update with `frontfriend update`) and how many contracts changed since the adopted snapshot (`daily_loop` in the JSON result). A second `connect` changes nothing. |
134
-
135
- The approval in the Studio is the adoption decision, so without a terminal `connect` adopts without `--yes`. A human still commits the lock. States that wait on someone exit 0, with `state` and `waiting_on` in the JSON result. If the platform does not support the required onboarding API, `connect` reports an error. Check that the Frontfriend platform supports this SDK version.
136
-
137
- `connect` also refreshes the installed `ff-*` skill stubs of Claude and Codex when this version renders them differently.
138
-
139
- | Exit code | Meaning |
140
- | --------- | ------------------------------------------------------------------------------------------------------------ |
141
- | 0 | Connected, already connected, or dry run complete |
142
- | 1 | Unexpected error, or the person declined |
143
- | 2 | A required input is missing or invalid (the message names the flag) |
144
- | 3 | Preflight refused: not a Git work tree, or several apps under this directory |
145
- | 4 | Not a shadcn application, or not a Frontfriend Project target |
146
- | 5 | Sign-in needed or failed |
147
- | 6 | The project is connected to another Design System or App |
148
- | 7 | Project configuration or agent installation failed |
149
- | 8 | Not connected: a verification outcome failed, or the verification was not reported |
150
- | 9 | Connected, but the onboarding status could not be read or the run could not be started |
151
- | 10 | The activation failed (adoption, report or verification); run `connect` again to continue from it |
152
- | 11 | The App is not ready (only with `--require-ready`) |
153
- | 12 | The native shadcn import stopped (source conflicts, import or init); run `connect` again to continue from it |
154
-
155
- `connect` pins the bridge version: the manual registration for Cursor, Hermes and OpenClaw pins `@frontfriend/sdk@<this version>` (set `FF_BRIDGE_VERSION` to pin another version or a tag), and `agents install` copies this version's runtime. The verification warns, and `result.bridge` lists the warning, when `.mcp.json` or the user-level runtime starts another version.
156
-
157
- `frontfriend doctor` checks configuration, authentication, Design System access, Release selection, and the first data read (`frontfriend mcp doctor` is the same operation), the bridge and compliance engine versions with a warning for a registered bridge of another version, and an informational readiness line. When the platform reports the App as ready but `frontfriend.lock.json` does not pin its adopted snapshot, doctor fails the `Local adoption` line and exits 1: run `connect` to adopt it. `frontfriend onboard` prints the same onboarding state; `frontfriend onboard --areas <a,b>` starts the run while the App is not onboarded. `onboard` never adopts: `connect` activates.
158
-
159
- ### Existing projects and updates
160
-
161
- Rerun `agents install` to update the managed runtime and registrations. Other client settings and MCP servers are preserved. When run from an existing project, the installer removes an equivalent generated Frontfriend entry from that project's `.mcp.json` only after configuring the user-level Claude entry, deleting the file if no other settings remain. It reports and preserves customized entries, which may take precedence over the global connection. Review those overrides explicitly when migrating; the installer does not scan other repositories.
162
-
163
- ```bash
164
- # Refresh project rules and registry wiring without reinstalling the MCP.
165
- npx --yes @frontfriend/sdk@latest agents configure
166
- ```
167
-
168
- `frontfriend setup` handles local adoption and calls `agents configure`. Project dependencies and generated `.frontfriend` artifacts remain local to each app. Global MCP installation does not add a package dependency to every repository.
169
-
170
- ## Connect your build
171
-
172
- Use these integrations when your application adopts tokens. They are not required for design contracts alone.
173
-
174
- ### Vite
175
-
176
- Add Frontfriend alongside your framework and Tailwind plugins:
177
-
178
- ```ts
179
- import { defineConfig } from "vite";
180
- import react from "@vitejs/plugin-react";
181
- import tailwindcss from "@tailwindcss/vite";
182
- import frontfriend from "@frontfriend/sdk/vite";
183
-
184
- export default defineConfig({
185
- plugins: [react(), tailwindcss(), frontfriend()],
186
- });
187
- ```
188
-
189
- For Vue, use your Vue plugin in place of `react()`.
190
-
191
- When the App adopts tokens, `init` adds the import and `frontfriend()` to an existing `vite.config.{ts,js,mts,mjs}`. It changes nothing else in the file and does nothing when the plugin is already there. When the config is not an inline `export default` object (or `defineConfig(...)` of one), `init` leaves it untouched and prints the snippet to paste.
192
-
193
- ### Next.js
194
-
195
- Wrap your Next.js configuration:
196
-
197
- ```js
198
- import frontfriend from "@frontfriend/sdk/next";
199
-
200
- export default frontfriend({
201
- // Your Next.js configuration
202
- });
203
- ```
204
-
205
- ### Styles
206
-
207
- Import the theme in your application CSS:
208
-
209
- ```css
210
- @import "tailwindcss";
211
- @import "@frontfriend/sdk/theme.css";
212
- @import "tw-animate-css";
213
- ```
214
-
215
- Use design tokens as Tailwind utilities:
216
-
217
- ```html
218
- <div class="bg-brand-mid text-onbrand-strong border border-neutral-subtle">
219
- Your content
220
- </div>
221
- ```
222
-
223
- ## Add components
224
-
225
- Preview a component from a Design System release, then apply it:
226
-
227
- ```bash
228
- npx frontfriend update button --release <release-id> --dry-run
229
- npx frontfriend update button --release <release-id> --yes
230
- ```
231
-
232
- The command installs the component and its required components for your configured target. It records the selection in `frontfriend.lock.json`.
233
-
234
- You can also select a release channel or add a private component:
235
-
236
- ```bash
237
- npx frontfriend update --channel latest --dry-run
238
- npx frontfriend add custom/acme/data-grid --release <release-id> --dry-run
239
- ```
240
-
241
- Without a component or a selection flag, `frontfriend update` adopts what the App's `adopt` levels cover, in one lock: the approved contracts (`--working-design`), plus the Release tokens and the installed components (`--installed --tokens`) when the App adopts tokens or components. A contracts-only App gets `--contracts-only --working-design`. An applied adoption also writes `.frontfriend/rules/`, so `frontfriend check` reads the adopted rules.
242
-
243
- An applied adoption installs the npm dependencies of the components it adds or moves to another version, with the package manager your lockfile names (`--no-install` prints the command instead). It installs a dependency that `package.json` lacks, or raises a requirement below the minimum of the declared range. It never lowers or replaces a newer requirement: ``⚠️ `lucide-react` stays at 1.17.0; `icon@1.1.0` declares ^0.468.0.`` A component whose pin does not change, or whose local edit is kept, does not impose its dependencies. If an unchanged component that you have not edited declares a package that `package.json` lacks, `update` prints the install command and does not install it. A file that already matches the incoming source is reported as unchanged and is not rewritten. `update --json` reports the install requests in `npm_dependencies.missing`, the newer requirements kept in `npm_dependencies.kept`, the packages unchanged components lack in `npm_dependencies.repair`, and `files_unchanged` and `files_kept` (local edits). It then refreshes the token cache in `node_modules/.cache/frontfriend` when the token pin moved: a running Vite dev server reloads by itself, without a restart. With `--installed --replace`, a stock shadcn file that the Design System ships under another name (`sonner.tsx` → `toast`) is replaced by the Design System component and removed, and its imports point at the new module.
244
-
245
- A private component deleted from the Design System leaves every Release. `update` removes its pin from `frontfriend.lock.json` and prints `custom/... was deleted from the design system. Its files in <path> were kept; remove them and their imports if you no longer use them.` It never deletes those files. `add` and `download` refuse a deleted component that the lock pins; `diff` and `doctor` report the pin until `update` removes it. `update --json` (with `--yes` or `--dry-run`) prints one JSON result on stdout, with the removed pins in `components_removed`.
246
-
247
- To apply the latest published Release of the App's tag in one step (lock, component source, npm dependencies, token cache), run:
248
-
249
- ```bash
250
- npx frontfriend adopt --dry-run
251
- npx frontfriend adopt --yes
252
- ```
253
-
254
- `adopt` never adopts a draft: a component or foundation commit reaches the App once it is published in a Release.
255
-
256
- Coding agents adopt through the MCP bridge instead: the local tool `adopt_design { project_path, dry_run?, scope? }` runs the same adoption without a prompt and returns a JSON summary (snapshot, Release, changed pins, files written, `npm_dependencies`, `token_cache`). It returns the install command for missing npm dependencies instead of running the package manager.
257
-
258
- See the [CLI reference](https://frontfriend.dev/docs/cli-reference/) for all options.
259
-
260
- ## Connect coding agents
261
-
262
- Install the Frontfriend MCP connection and skills for Codex and Claude Code:
263
-
264
- ```bash
265
- npx --yes @frontfriend/sdk@latest agents install
266
- ```
267
-
268
- Restart your coding agent after installation. Use `--client codex` or `--client claude` to select one client. The connection is installed for your user account; each task uses the configuration of its application.
269
-
270
- See [MCP connection](https://frontfriend.dev/docs/mcp/) and [Design Skills](https://frontfriend.dev/docs/design-skills/) for agent workflows.
271
-
272
- ## Runtime helpers
273
-
274
- ### Merge classes
275
-
276
- Use `cn` to combine conditional classes and resolve Tailwind class conflicts:
277
-
278
- ```ts
279
- import { cn } from "@frontfriend/sdk/cn";
280
-
281
- cn("px-2 py-1 bg-brand-mid", "px-4");
282
- // 'py-1 bg-brand-mid px-4'
283
- ```
284
-
285
- ### Read component configuration
286
-
287
- ```ts
288
- import { config, ffdc, iconSet } from "@frontfriend/sdk";
289
-
290
- const components = ffdc(config);
291
- const button = ffdc(config, "button");
292
- ```
293
-
294
- `ffdc(config)` returns the runtime configuration. The optional component name applies that component's shared rules, such as using `main` for an unconfigured `default` variant. `iconSet` provides the configured icons.
295
-
296
- The component form supports `badge`, `button`, `calendar`, `card`, `command`, `date-slider`, `input-group`, `popover`, `separator`, and `spinner`. Check for an absent result before use. Treat the result as read-only; save changes to the source configuration.
297
-
298
- TypeScript declarations are included. Automatic Vite/Next configuration edits use TypeScript. In a JavaScript project without it, the SDK leaves your configuration unchanged and shows the manual integration step.
299
-
300
- ## Maintain your project
301
-
302
- | Command | Purpose |
303
- | ---------------------------------- | -------------------------------------------------------------------------------------------- |
304
- | `npx frontfriend status` | Check configuration and cache status. |
305
- | `npx frontfriend init --force` | Fetch the current design tokens and configuration. |
306
- | `npx frontfriend check` | Check local code against the adopted design rules. |
307
- | `npx frontfriend diff` | Compare local component files with the adoption lock. |
308
- | `npx frontfriend restore` | List snapshots from a shadcn conversion; pass a snapshot ID to restore its original sources. |
309
- | `npx frontfriend logout` | Remove your saved Frontfriend login. |
310
- | `npx frontfriend clean` | Remove the local cache. |
311
- | `npx frontfriend design sync` | Refresh local design rules. |
312
- | `npx frontfriend agents configure` | Refresh project integration for coding agents. |
313
-
314
- If components have no styles, check the CSS imports and build plugin, then run `npx frontfriend init --force`. For installation errors, check your Design System access and application target, then preview the component with `--dry-run`.
315
-
316
- See [Troubleshooting](https://frontfriend.dev/docs/troubleshooting/) for more help.
317
-
318
- ## Token availability
319
-
320
- `frontfriend init` requires a login (`frontfriend login` or `FF_AUTH_TOKEN`) and reads tokens from Studio. It uses the token Release in `frontfriend.lock.json`; you can also select a Release or tag:
321
-
322
- ```sh
323
- npx frontfriend init --version <release-id>
324
- npx frontfriend init --tag <tag-name-or-id>
325
- ```
326
-
327
- `--version` takes a Release ID, not an SDK version. A Studio refusal, such as a missing login or no access to the Design System, stops initialization.
328
-
329
- After the tokens, an online `init` signed in as a person registers the App named in `frontfriend.config.js` on its tag (`--tag`, then `tag`) with its `framework` and `primitive`, so `update` and the design reads find it. When Studio refuses the registration, `init` stops with the reason; the installed tokens stay. With a machine credential, or with `--no-register`, `init` installs the selected tokens and never registers the App or changes its Release tag (see [Builds and CI](#builds-and-ci)). During an outage it keeps the tokens and asks you to run `init` again. When the App adopts contracts and `frontfriend.lock.json` pins a design snapshot, `init` also writes that snapshot's contracts to `.frontfriend/design/` and, when they are missing or belong to another snapshot, its rules to `.frontfriend/rules/`: the same files `update` writes.
330
-
331
- `frontfriend.lock.json` lists its contract pins by slug, then kind, and its `adoptionDigest` does not depend on the order of the pins. A lock written by an earlier SDK in another order is still valid; `update` keeps its bytes until the adoption itself changes.
332
-
333
- Every online `init` keeps a verified copy of the selected tokens in `.frontfriend/artifacts`. When Studio is unreachable (network failure, timeout or server error), a signed-in `init` restores that copy. A first install during an outage has no copy to restore.
334
-
335
- ### Offline tokens
336
-
337
- Offline tokens are a Workspace capability that Frontfriend enables on request; no plan includes them by default. With it, an online `init` also stores the Workspace's signed offline license next to the verified copies in `.frontfriend/artifacts`. Commit that directory to build and deploy without calling Frontfriend:
338
-
339
- ```sh
340
- npx frontfriend init --offline
341
- ```
342
-
343
- `--offline` makes no network request and needs no login: it verifies the license and the copy locally. The license does not expire; the next online `init` replaces it, or removes it if the Workspace no longer has offline tokens. With the capability, an `init` during a Studio outage also tries the token CDN before the local copy, so a first install can succeed with an explicit Release or tag. Without the capability, `--offline` fails and the CDN is never read.
344
-
345
- The default API uses the production token CDN automatically. For a custom API, set `token-cdn-url`, `FF_TOKEN_CDN_URL`, or `--token-cdn-url`. Set `token-cdn-url: false` to disable CDN delivery.
346
-
347
- Downloads validate artifact identity and integrity. Access refusals and invalid data stop initialization. Token delivery does not update component files or publish changes; `init --offline` also does not register the application or write contracts. Run `init`, `connect` or `design sync` online for those operations. External fonts and images have their own availability.
348
-
349
- ## Builds and CI
350
-
351
- Builds authenticate with a machine credential: create one with the `components:read` permission on the **API keys** page of the Workspace in Studio, and set it as `FF_AUTH_TOKEN` through your CI secret store. Do not commit it to project configuration or print it in build logs. Online token delivery, private components and design rules require it; `init --offline` does not.
352
-
353
- In CI or a Docker build, select the tag the build ships:
354
-
355
- ```sh
356
- FF_AUTH_TOKEN=<machine credential> npx frontfriend init --tag <tag-name>
357
- ```
12
+ Then follow the [installation guide](https://frontfriend.dev/docs/installation/) to connect your app.
358
13
 
359
- A machine credential is read-only for the App. `init` installs the tokens of the requested tag and prints `Build mode: App registration skipped (machine credential).`; it never registers the App or moves its Release tag in Studio, so a preview build on `next` does not move a production App off `base`. Pass `--no-register` to get the same behavior with any credential. Studio never changes an App for a machine credential either: it answers the registration of an earlier SDK with the App unchanged, so those builds also install the requested tag and leave the App on its own tag. If Studio refuses a registration with `MACHINE_CREDENTIAL_READ_ONLY`, `init` reports the registration as skipped and succeeds.
14
+ ## Documentation
360
15
 
361
- `update`, `adopt`, `download` and `add` with a machine credential use the App's current Release tag. They stop with a message when the selection would bind the App or move it to another tag. `connect` stops at its login step: it registers the App, which needs a person's login (`frontfriend login`, with `FF_AUTH_TOKEN` unset). Change an App's tag in Studio or with a person's login.
16
+ The documentation at [frontfriend.dev/docs](https://frontfriend.dev/docs/) is the reference for the SDK:
362
17
 
363
- ## Existing Tailwind clients
18
+ - [Installation](https://frontfriend.dev/docs/installation/), including builds in CI and Docker
19
+ - [CLI reference](https://frontfriend.dev/docs/cli-reference/)
20
+ - [SDK and runtime helpers](https://frontfriend.dev/docs/sdk/)
21
+ - [Versions and releases](https://frontfriend.dev/docs/versioning/)
22
+ - [Troubleshooting](https://frontfriend.dev/docs/troubleshooting/)
23
+ - [Component catalogue](https://frontfriend.dev/components/)
364
24
 
365
- `@frontfriend/sdk` is not backward compatible with `@frontfriend/tailwind`. Existing clients should use the [v3 documentation](https://frontfriend.dev/docs/legacy/v3/) and contact the Frontfriend team to arrange a migration. Do not replace the package directly.
25
+ Existing `@frontfriend/tailwind` clients should read the [v3 documentation](https://frontfriend.dev/docs/legacy/v3/) and contact Frontfriend to plan a migration. The two packages are not interchangeable.
366
26
 
367
27
  ## License
368
28
 
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- var g9=Object.create;var up=Object.defineProperty;var y9=Object.getOwnPropertyDescriptor;var v9=Object.getOwnPropertyNames;var _9=Object.getPrototypeOf,b9=Object.prototype.hasOwnProperty;var Ve=(e,t)=>()=>(e&&(t=e(e=0)),t);var B=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bo=(e,t)=>{for(var r in t)up(e,r,{get:t[r],enumerable:!0})},VE=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of v9(t))!b9.call(e,n)&&n!==r&&up(e,n,{get:()=>t[n],enumerable:!(i=y9(t,n))||i.enumerable});return e};var Bi=(e,t,r)=>(r=e!=null?g9(_9(e)):{},VE(t||!e||!e.__esModule?up(r,"default",{value:e,enumerable:!0}):r,e)),Mr=e=>VE(up({},"__esModule",{value:!0}),e);var xa=B((VIe,S9)=>{S9.exports={name:"@frontfriend/sdk",version:"1.2.6"}});var So=B((JIe,JE)=>{var{name:w9}=xa();JE.exports={PACKAGE_NAME:w9}});var fa=B((BIe,BE)=>{var $9="https://app.frontfriend.dev",R9=".cache/frontfriend",E9={JS:["tokens.js","variables.js","semanticVariables.js","semanticDarkVariables.js","keyframes.js","animations.js","safelist.js","custom.js"],JSON:["fonts.json","icons.json","components-config.json","iconLibrary.json","version.json","versionMetadata.json","metadata.json","base.json","nativeTokens.json"]},P9={FF_ID:"FF_ID",FF_API_URL:"FF_API_URL",FF_AUTH_TOKEN:"FF_AUTH_TOKEN",FF_MACHINE_TOKEN:"FRONTFRIEND_MACHINE_TOKEN"};function O9(e){if(!e)return null;try{let t=new URL(e);return t.hostname.startsWith("app.")?`${t.protocol}//${t.hostname.replace(/^app\./,"registry.")}`:null}catch{return null}}BE.exports={DEFAULT_API_URL:$9,CACHE_DIR_NAME:R9,CACHE_TTL_DAYS:7,CACHE_TTL_MS:6048e5,CACHE_FILES:E9,ENV_VARS:P9,deriveRegistryFromApiUrl:O9}});var WE=B((HIe,GE)=>{GE.exports=KE;KE.sync=C9;var HE=require("fs");function I9(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var i=0;i<r.length;i++){var n=r[i].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n)return!0}return!1}function ZE(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:I9(t,r)}function KE(e,t,r){HE.stat(e,function(i,n){r(i,i?!1:ZE(n,e,t))})}function C9(e,t){return ZE(HE.statSync(e),e,t)}});var tP=B((ZIe,eP)=>{eP.exports=XE;XE.sync=k9;var YE=require("fs");function XE(e,t,r){YE.stat(e,function(i,n){r(i,i?!1:QE(n,t))})}function k9(e,t){return QE(YE.statSync(e),t)}function QE(e,t){return e.isFile()&&T9(e,t)}function T9(e,t){var r=e.mode,i=e.uid,n=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,f=r&l||r&c&&n===s||r&a&&i===o||r&u&&o===0;return f}});var nP=B((GIe,rP)=>{var KIe=require("fs"),dp;process.platform==="win32"||global.TESTING_WINDOWS?dp=WE():dp=tP();rP.exports=Qv;Qv.sync=j9;function Qv(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){Qv(e,t||{},function(o,s){o?n(o):i(s)})})}dp(e,t||{},function(i,n){i&&(i.code==="EACCES"||t&&t.ignoreErrors)&&(i=null,n=!1),r(i,n)})}function j9(e,t){try{return dp.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var uP=B((WIe,lP)=>{var sl=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",iP=require("path"),A9=sl?";":":",oP=nP(),sP=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),aP=(e,t)=>{let r=t.colon||A9,i=e.match(/\//)||sl&&e.match(/\\/)?[""]:[...sl?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],n=sl?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=sl?n.split(r):[""];return sl&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:n}},cP=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:i,pathExt:n,pathExtExe:o}=aP(e,t),s=[],a=l=>new Promise((u,f)=>{if(l===i.length)return t.all&&s.length?u(s):f(sP(e));let p=i[l],g=/^".*"$/.test(p)?p.slice(1,-1):p,h=iP.join(g,e),v=!g&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;u(c(v,l,0))}),c=(l,u,f)=>new Promise((p,g)=>{if(f===n.length)return p(a(u+1));let h=n[f];oP(l+h,{pathExt:o},(v,y)=>{if(!v&&y)if(t.all)s.push(l+h);else return p(l+h);return p(c(l,u,f+1))})});return r?a(0).then(l=>r(null,l),r):a(0)},N9=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:i,pathExtExe:n}=aP(e,t),o=[];for(let s=0;s<r.length;s++){let a=r[s],c=/^".*"$/.test(a)?a.slice(1,-1):a,l=iP.join(c,e),u=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let f=0;f<i.length;f++){let p=u+i[f];try{if(oP.sync(p,{pathExt:n}))if(t.all)o.push(p);else return p}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw sP(e)};lP.exports=cP;cP.sync=N9});var fP=B((YIe,e_)=>{"use strict";var dP=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};e_.exports=dP;e_.exports.default=dP});var gP=B((XIe,mP)=>{"use strict";var pP=require("path"),x9=uP(),M9=fP();function hP(e,t){let r=e.options.env||process.env,i=process.cwd(),n=e.options.cwd!=null,o=n&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let s;try{s=x9.sync(e.command,{path:r[M9({env:r})],pathExt:t?pP.delimiter:void 0})}catch{}finally{o&&process.chdir(i)}return s&&(s=pP.resolve(n?e.options.cwd:"",s)),s}function q9(e){return hP(e)||hP(e,!0)}mP.exports=q9});var yP=B((QIe,r_)=>{"use strict";var t_=/([()\][%!^"`<>&|;, *?])/g;function L9(e){return e=e.replace(t_,"^$1"),e}function D9(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(t_,"^$1"),t&&(e=e.replace(t_,"^$1")),e}r_.exports.command=L9;r_.exports.argument=D9});var _P=B((eCe,vP)=>{"use strict";vP.exports=/^#!(.*)/});var SP=B((tCe,bP)=>{"use strict";var U9=_P();bP.exports=(e="")=>{let t=e.match(U9);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var $P=B((rCe,wP)=>{"use strict";var n_=require("fs"),z9=SP();function F9(e){let r=Buffer.alloc(150),i;try{i=n_.openSync(e,"r"),n_.readSync(i,r,0,150,0),n_.closeSync(i)}catch{}return z9(r.toString())}wP.exports=F9});var OP=B((nCe,PP)=>{"use strict";var V9=require("path"),RP=gP(),EP=yP(),J9=$P(),B9=process.platform==="win32",H9=/\.(?:com|exe)$/i,Z9=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function K9(e){e.file=RP(e);let t=e.file&&J9(e.file);return t?(e.args.unshift(e.file),e.command=t,RP(e)):e.file}function G9(e){if(!B9)return e;let t=K9(e),r=!H9.test(t);if(e.options.forceShell||r){let i=Z9.test(t);e.command=V9.normalize(e.command),e.command=EP.command(e.command),e.args=e.args.map(o=>EP.argument(o,i));let n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function W9(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let i={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?i:G9(i)}PP.exports=W9});var kP=B((iCe,CP)=>{"use strict";var i_=process.platform==="win32";function o_(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Y9(e,t){if(!i_)return;let r=e.emit;e.emit=function(i,n){if(i==="exit"){let o=IP(n,t);if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}function IP(e,t){return i_&&e===1&&!t.file?o_(t.original,"spawn"):null}function X9(e,t){return i_&&e===1&&!t.file?o_(t.original,"spawnSync"):null}CP.exports={hookChildProcess:Y9,verifyENOENT:IP,verifyENOENTSync:X9,notFoundError:o_}});var c_=B((oCe,al)=>{"use strict";var TP=require("child_process"),s_=OP(),a_=kP();function jP(e,t,r){let i=s_(e,t,r),n=TP.spawn(i.command,i.args,i.options);return a_.hookChildProcess(n,i),n}function Q9(e,t,r){let i=s_(e,t,r),n=TP.spawnSync(i.command,i.args,i.options);return n.error=n.error||a_.verifyENOENTSync(n.status,i),n}al.exports=jP;al.exports.spawn=jP;al.exports.sync=Q9;al.exports._parse=s_;al.exports._enoent=a_});var cl=B((sCe,AP)=>{"use strict";var eB="2.0.0",tB=Number.MAX_SAFE_INTEGER||9007199254740991,rB=16,nB=250,iB=["major","premajor","minor","preminor","patch","prepatch","prerelease"];AP.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:rB,MAX_SAFE_BUILD_LENGTH:nB,MAX_SAFE_INTEGER:tB,RELEASE_TYPES:iB,SEMVER_SPEC_VERSION:eB,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Fu=B((aCe,NP)=>{"use strict";var oB=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};NP.exports=oB});var ll=B((Bo,xP)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:l_,MAX_SAFE_BUILD_LENGTH:sB,MAX_LENGTH:aB}=cl(),cB=Fu();Bo=xP.exports={};var lB=Bo.re=[],uB=Bo.safeRe=[],Ze=Bo.src=[],dB=Bo.safeSrc=[],Ke=Bo.t={},fB=0,u_="[a-zA-Z0-9-]",pB=[["\\s",1],["\\d",aB],[u_,sB]],hB=e=>{for(let[t,r]of pB)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},St=(e,t,r)=>{let i=hB(t),n=fB++;cB(e,n,t),Ke[e]=n,Ze[n]=t,dB[n]=i,lB[n]=new RegExp(t,r?"g":void 0),uB[n]=new RegExp(i,r?"g":void 0)};St("NUMERICIDENTIFIER","0|[1-9]\\d*");St("NUMERICIDENTIFIERLOOSE","\\d+");St("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u_}*`);St("MAINVERSION",`(${Ze[Ke.NUMERICIDENTIFIER]})\\.(${Ze[Ke.NUMERICIDENTIFIER]})\\.(${Ze[Ke.NUMERICIDENTIFIER]})`);St("MAINVERSIONLOOSE",`(${Ze[Ke.NUMERICIDENTIFIERLOOSE]})\\.(${Ze[Ke.NUMERICIDENTIFIERLOOSE]})\\.(${Ze[Ke.NUMERICIDENTIFIERLOOSE]})`);St("PRERELEASEIDENTIFIER",`(?:${Ze[Ke.NONNUMERICIDENTIFIER]}|${Ze[Ke.NUMERICIDENTIFIER]})`);St("PRERELEASEIDENTIFIERLOOSE",`(?:${Ze[Ke.NONNUMERICIDENTIFIER]}|${Ze[Ke.NUMERICIDENTIFIERLOOSE]})`);St("PRERELEASE",`(?:-(${Ze[Ke.PRERELEASEIDENTIFIER]}(?:\\.${Ze[Ke.PRERELEASEIDENTIFIER]})*))`);St("PRERELEASELOOSE",`(?:-?(${Ze[Ke.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Ze[Ke.PRERELEASEIDENTIFIERLOOSE]})*))`);St("BUILDIDENTIFIER",`${u_}+`);St("BUILD",`(?:\\+(${Ze[Ke.BUILDIDENTIFIER]}(?:\\.${Ze[Ke.BUILDIDENTIFIER]})*))`);St("FULLPLAIN",`v?${Ze[Ke.MAINVERSION]}${Ze[Ke.PRERELEASE]}?${Ze[Ke.BUILD]}?`);St("FULL",`^${Ze[Ke.FULLPLAIN]}$`);St("LOOSEPLAIN",`[v=\\s]*${Ze[Ke.MAINVERSIONLOOSE]}${Ze[Ke.PRERELEASELOOSE]}?${Ze[Ke.BUILD]}?`);St("LOOSE",`^${Ze[Ke.LOOSEPLAIN]}$`);St("GTLT","((?:<|>)?=?)");St("XRANGEIDENTIFIERLOOSE",`${Ze[Ke.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);St("XRANGEIDENTIFIER",`${Ze[Ke.NUMERICIDENTIFIER]}|x|X|\\*`);St("XRANGEPLAIN",`[v=\\s]*(${Ze[Ke.XRANGEIDENTIFIER]})(?:\\.(${Ze[Ke.XRANGEIDENTIFIER]})(?:\\.(${Ze[Ke.XRANGEIDENTIFIER]})(?:${Ze[Ke.PRERELEASE]})?${Ze[Ke.BUILD]}?)?)?`);St("XRANGEPLAINLOOSE",`[v=\\s]*(${Ze[Ke.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Ze[Ke.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Ze[Ke.XRANGEIDENTIFIERLOOSE]})(?:${Ze[Ke.PRERELEASELOOSE]})?${Ze[Ke.BUILD]}?)?)?`);St("XRANGE",`^${Ze[Ke.GTLT]}\\s*${Ze[Ke.XRANGEPLAIN]}$`);St("XRANGELOOSE",`^${Ze[Ke.GTLT]}\\s*${Ze[Ke.XRANGEPLAINLOOSE]}$`);St("COERCEPLAIN",`(^|[^\\d])(\\d{1,${l_}})(?:\\.(\\d{1,${l_}}))?(?:\\.(\\d{1,${l_}}))?`);St("COERCE",`${Ze[Ke.COERCEPLAIN]}(?:$|[^\\d])`);St("COERCEFULL",Ze[Ke.COERCEPLAIN]+`(?:${Ze[Ke.PRERELEASE]})?(?:${Ze[Ke.BUILD]})?(?:$|[^\\d])`);St("COERCERTL",Ze[Ke.COERCE],!0);St("COERCERTLFULL",Ze[Ke.COERCEFULL],!0);St("LONETILDE","(?:~>?)");St("TILDETRIM",`(\\s*)${Ze[Ke.LONETILDE]}\\s+`,!0);Bo.tildeTrimReplace="$1~";St("TILDE",`^${Ze[Ke.LONETILDE]}${Ze[Ke.XRANGEPLAIN]}$`);St("TILDELOOSE",`^${Ze[Ke.LONETILDE]}${Ze[Ke.XRANGEPLAINLOOSE]}$`);St("LONECARET","(?:\\^)");St("CARETTRIM",`(\\s*)${Ze[Ke.LONECARET]}\\s+`,!0);Bo.caretTrimReplace="$1^";St("CARET",`^${Ze[Ke.LONECARET]}${Ze[Ke.XRANGEPLAIN]}$`);St("CARETLOOSE",`^${Ze[Ke.LONECARET]}${Ze[Ke.XRANGEPLAINLOOSE]}$`);St("COMPARATORLOOSE",`^${Ze[Ke.GTLT]}\\s*(${Ze[Ke.LOOSEPLAIN]})$|^$`);St("COMPARATOR",`^${Ze[Ke.GTLT]}\\s*(${Ze[Ke.FULLPLAIN]})$|^$`);St("COMPARATORTRIM",`(\\s*)${Ze[Ke.GTLT]}\\s*(${Ze[Ke.LOOSEPLAIN]}|${Ze[Ke.XRANGEPLAIN]})`,!0);Bo.comparatorTrimReplace="$1$2$3";St("HYPHENRANGE",`^\\s*(${Ze[Ke.XRANGEPLAIN]})\\s+-\\s+(${Ze[Ke.XRANGEPLAIN]})\\s*$`);St("HYPHENRANGELOOSE",`^\\s*(${Ze[Ke.XRANGEPLAINLOOSE]})\\s+-\\s+(${Ze[Ke.XRANGEPLAINLOOSE]})\\s*$`);St("STAR","(<|>)?=?\\s*\\*");St("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");St("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var fp=B((cCe,MP)=>{"use strict";var mB=Object.freeze({loose:!0}),gB=Object.freeze({}),yB=e=>e?typeof e!="object"?mB:e:gB;MP.exports=yB});var d_=B((lCe,DP)=>{"use strict";var qP=/^[0-9]+$/,LP=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;let r=qP.test(e),i=qP.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},vB=(e,t)=>LP(t,e);DP.exports={compareIdentifiers:LP,rcompareIdentifiers:vB}});var Sn=B((uCe,zP)=>{"use strict";var pp=Fu(),{MAX_LENGTH:UP,MAX_SAFE_INTEGER:hp}=cl(),{safeRe:mp,t:gp}=ll(),_B=fp(),{compareIdentifiers:f_}=d_(),bB=(e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let i=0;i<r.length;i++)if(f_(e[i],r[i])!==0)return!1;return!0},p_=class e{constructor(t,r){if(r=_B(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>UP)throw new TypeError(`version is longer than ${UP} characters`);pp("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let i=t.trim().match(r.loose?mp[gp.LOOSE]:mp[gp.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>hp||this.major<0)throw new TypeError("Invalid major version");if(this.minor>hp||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>hp||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let o=+n;if(o>=0&&o<hp)return o}return n}):this.prerelease=[],this.build=i[5]?i[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(t){if(pp("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let i=this.prerelease[r],n=t.prerelease[r];if(pp("prerelease compare",r,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return f_(i,n)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let i=this.build[r],n=t.build[r];if(pp("build compare",r,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return f_(i,n)}while(++r)}inc(t,r,i){if(t.startsWith("pre")){if(!r&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?mp[gp.PRERELEASELOOSE]:mp[gp.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,i),this.inc("pre",r,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,i),this.inc("pre",r,i);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 n=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let o=[r,n];if(i===!1&&(o=[r]),bB(this.prerelease,r)){let s=this.prerelease[r.split(".").length];isNaN(s)&&(this.prerelease=o)}else this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};zP.exports=p_});var Ma=B((dCe,VP)=>{"use strict";var FP=Sn(),SB=(e,t,r=!1)=>{if(e instanceof FP)return e;try{return new FP(e,t)}catch(i){if(!r)return null;throw i}};VP.exports=SB});var BP=B((fCe,JP)=>{"use strict";var wB=Ma(),$B=(e,t)=>{let r=wB(e,t);return r?r.version:null};JP.exports=$B});var ZP=B((pCe,HP)=>{"use strict";var RB=Ma(),EB=(e,t)=>{let r=RB(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};HP.exports=EB});var WP=B((hCe,GP)=>{"use strict";var KP=Sn(),PB=(e,t,r,i,n)=>{typeof r=="string"&&(n=i,i=r,r=void 0);try{return new KP(e instanceof KP?e.version:e,r).inc(t,i,n).version}catch{return null}};GP.exports=PB});var QP=B((mCe,XP)=>{"use strict";var YP=Ma(),OB=(e,t)=>{let r=YP(e,null,!0),i=YP(t,null,!0),n=r.compare(i);if(n===0)return null;let o=n>0,s=o?r:i,a=o?i:r,c=!!s.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(s)===0)return a.minor&&!a.patch?"minor":"patch"}let u=c?"pre":"";return r.major!==i.major?u+"major":r.minor!==i.minor?u+"minor":r.patch!==i.patch?u+"patch":"prerelease"};XP.exports=OB});var tO=B((gCe,eO)=>{"use strict";var IB=Sn(),CB=(e,t)=>new IB(e,t).major;eO.exports=CB});var nO=B((yCe,rO)=>{"use strict";var kB=Sn(),TB=(e,t)=>new kB(e,t).minor;rO.exports=TB});var oO=B((vCe,iO)=>{"use strict";var jB=Sn(),AB=(e,t)=>new jB(e,t).patch;iO.exports=AB});var aO=B((_Ce,sO)=>{"use strict";var NB=Ma(),xB=(e,t)=>{let r=NB(e,t);return r&&r.prerelease.length?r.prerelease:null};sO.exports=xB});var Hi=B((bCe,lO)=>{"use strict";var cO=Sn(),MB=(e,t,r)=>new cO(e,r).compare(new cO(t,r));lO.exports=MB});var dO=B((SCe,uO)=>{"use strict";var qB=Hi(),LB=(e,t,r)=>qB(t,e,r);uO.exports=LB});var pO=B((wCe,fO)=>{"use strict";var DB=Hi(),UB=(e,t)=>DB(e,t,!0);fO.exports=UB});var yp=B(($Ce,mO)=>{"use strict";var hO=Sn(),zB=(e,t,r)=>{let i=new hO(e,r),n=new hO(t,r);return i.compare(n)||i.compareBuild(n)};mO.exports=zB});var yO=B((RCe,gO)=>{"use strict";var FB=yp(),VB=(e,t)=>e.sort((r,i)=>FB(r,i,t));gO.exports=VB});var _O=B((ECe,vO)=>{"use strict";var JB=yp(),BB=(e,t)=>e.sort((r,i)=>JB(i,r,t));vO.exports=BB});var Vu=B((PCe,bO)=>{"use strict";var HB=Hi(),ZB=(e,t,r)=>HB(e,t,r)>0;bO.exports=ZB});var vp=B((OCe,SO)=>{"use strict";var KB=Hi(),GB=(e,t,r)=>KB(e,t,r)<0;SO.exports=GB});var h_=B((ICe,wO)=>{"use strict";var WB=Hi(),YB=(e,t,r)=>WB(e,t,r)===0;wO.exports=YB});var m_=B((CCe,$O)=>{"use strict";var XB=Hi(),QB=(e,t,r)=>XB(e,t,r)!==0;$O.exports=QB});var _p=B((kCe,RO)=>{"use strict";var eH=Hi(),tH=(e,t,r)=>eH(e,t,r)>=0;RO.exports=tH});var bp=B((TCe,EO)=>{"use strict";var rH=Hi(),nH=(e,t,r)=>rH(e,t,r)<=0;EO.exports=nH});var g_=B((jCe,PO)=>{"use strict";var iH=h_(),oH=m_(),sH=Vu(),aH=_p(),cH=vp(),lH=bp(),uH=(e,t,r,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return iH(e,r,i);case"!=":return oH(e,r,i);case">":return sH(e,r,i);case">=":return aH(e,r,i);case"<":return cH(e,r,i);case"<=":return lH(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}};PO.exports=uH});var IO=B((ACe,OO)=>{"use strict";var dH=Sn(),fH=Ma(),{safeRe:Sp,t:wp}=ll(),pH=(e,t)=>{if(e instanceof dH)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Sp[wp.COERCEFULL]:Sp[wp.COERCE]);else{let c=t.includePrerelease?Sp[wp.COERCERTLFULL]:Sp[wp.COERCERTL],l;for(;(l=c.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||l.index+l[0].length!==r.index+r[0].length)&&(r=l),c.lastIndex=l.index+l[1].length+l[2].length;c.lastIndex=-1}if(r===null)return null;let i=r[2],n=r[3]||"0",o=r[4]||"0",s=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return fH(`${i}.${n}.${o}${s}${a}`,t)};OO.exports=pH});var kO=B((NCe,CO)=>{"use strict";var hH=Ma(),mH=cl(),gH=Sn(),yH=(e,t,r)=>{if(!mH.RELEASE_TYPES.includes(t))return null;let i=vH(e,r);return i&&_H(i,t)},vH=(e,t)=>{let r=e instanceof gH?e.version:e;return hH(r,t)},_H=(e,t)=>{if(bH(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},bH=e=>e.startsWith("pre");CO.exports=yH});var jO=B((xCe,TO)=>{"use strict";var y_=class{constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(t,r)}return this}};TO.exports=y_});var Zi=B((MCe,MO)=>{"use strict";var SH=/\s+/g,v_=class e{constructor(t,r){if(r=$H(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof __)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(SH," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!NO(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&jH(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let i=0;i<r.length;i++)i>0&&(this.formatted+=" "),this.formatted+=r[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(TH,"");let i=((this.options.includePrerelease&&CH)|(this.options.loose&&kH))+":"+t,n=AO.get(i);if(n)return n;let o=this.options.loose,s=o?Bn[wn.HYPHENRANGELOOSE]:Bn[wn.HYPHENRANGE];t=t.replace(s,VH(this.options.includePrerelease)),dr("hyphen replace",t),t=t.replace(Bn[wn.COMPARATORTRIM],PH),dr("comparator trim",t),t=t.replace(Bn[wn.TILDETRIM],OH),dr("tilde trim",t),t=t.replace(Bn[wn.CARETTRIM],IH),dr("caret trim",t);let a=t.split(" ").map(f=>AH(f,this.options)).join(" ").split(/\s+/).map(f=>FH(f,this.options));o&&(a=a.filter(f=>(dr("loose invalid filter",f,this.options),!!f.match(Bn[wn.COMPARATORLOOSE])))),dr("range list",a);let c=new Map,l=a.map(f=>new __(f,this.options));for(let f of l){if(NO(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return AO.set(i,u),u}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(i=>xO(i,r)&&t.set.some(n=>xO(n,r)&&i.every(o=>n.every(s=>o.intersects(s,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new RH(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(JH(this.set[r],t,this.options))return!0;return!1}};MO.exports=v_;var wH=jO(),AO=new wH,$H=fp(),__=Ju(),dr=Fu(),RH=Sn(),{safeRe:Bn,src:EH,t:wn,comparatorTrimReplace:PH,tildeTrimReplace:OH,caretTrimReplace:IH}=ll(),{FLAG_INCLUDE_PRERELEASE:CH,FLAG_LOOSE:kH}=cl(),TH=new RegExp(EH[wn.BUILD],"g"),NO=e=>e.value==="<0.0.0-0",jH=e=>e.value==="",xO=(e,t)=>{let r=!0,i=e.slice(),n=i.pop();for(;r&&i.length;)r=i.every(o=>n.intersects(o,t)),n=i.pop();return r},AH=(e,t)=>(e=e.replace(Bn[wn.BUILD],""),dr("comp",e,t),e=qH(e,t),dr("caret",e),e=xH(e,t),dr("tildes",e),e=DH(e,t),dr("xrange",e),e=zH(e,t),dr("stars",e),e),Wr=e=>!e||e.toLowerCase()==="x"||e==="*",NH=(e,t,r)=>Wr(e)&&!Wr(t)||Wr(t)&&r&&!Wr(r),xH=(e,t)=>e.trim().split(/\s+/).map(r=>MH(r,t)).join(" "),MH=(e,t)=>{let r=t.loose?Bn[wn.TILDELOOSE]:Bn[wn.TILDE],i=t.includePrerelease?"-0":"";return e.replace(r,(n,o,s,a,c)=>{dr("tilde",e,n,o,s,a,c);let l;return Wr(o)?l="":Wr(s)?l=`>=${o}.0.0${i} <${+o+1}.0.0-0`:Wr(a)?l=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`:c?(dr("replaceTilde pr",c),l=`>=${o}.${s}.${a}-${c} <${o}.${+s+1}.0-0`):l=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`,dr("tilde return",l),l})},qH=(e,t)=>e.trim().split(/\s+/).map(r=>LH(r,t)).join(" "),LH=(e,t)=>{dr("caret",e,t);let r=t.loose?Bn[wn.CARETLOOSE]:Bn[wn.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,(n,o,s,a,c)=>{dr("caret",e,n,o,s,a,c);let l;return Wr(o)?l="":Wr(s)?l=`>=${o}.0.0${i} <${+o+1}.0.0-0`:Wr(a)?o==="0"?l=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.0${i} <${+o+1}.0.0-0`:c?(dr("replaceCaret pr",c),o==="0"?s==="0"?l=`>=${o}.${s}.${a}-${c} <${o}.${s}.${+a+1}-0`:l=`>=${o}.${s}.${a}-${c} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.${a}-${c} <${+o+1}.0.0-0`):(dr("no pr"),o==="0"?s==="0"?l=`>=${o}.${s}.${a} <${o}.${s}.${+a+1}-0`:l=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),dr("caret return",l),l})},DH=(e,t)=>(dr("replaceXRanges",e,t),e.split(/\s+/).map(r=>UH(r,t)).join(" ")),UH=(e,t)=>{e=e.trim();let r=t.loose?Bn[wn.XRANGELOOSE]:Bn[wn.XRANGE];return e.replace(r,(i,n,o,s,a,c)=>{if(dr("xRange",e,i,n,o,s,a,c),NH(o,s,a))return e;let l=Wr(o),u=l||Wr(s),f=u||Wr(a),p=f;return n==="="&&p&&(n=""),c=t.includePrerelease?"-0":"",l?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&p?(u&&(s=0),a=0,n===">"?(n=">=",u?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):n==="<="&&(n="<",u?o=+o+1:s=+s+1),n==="<"&&(c="-0"),i=`${n+o}.${s}.${a}${c}`):u?i=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(i=`>=${o}.${s}.0${c} <${o}.${+s+1}.0-0`),dr("xRange return",i),i})},zH=(e,t)=>(dr("replaceStars",e,t),e.trim().replace(Bn[wn.STAR],"")),FH=(e,t)=>(dr("replaceGTE0",e,t),e.trim().replace(Bn[t.includePrerelease?wn.GTE0PRE:wn.GTE0],"")),VH=e=>(t,r,i,n,o,s,a,c,l,u,f,p)=>(Wr(i)?r="":Wr(n)?r=`>=${i}.0.0${e?"-0":""}`:Wr(o)?r=`>=${i}.${n}.0${e?"-0":""}`:s?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,Wr(l)?c="":Wr(u)?c=`<${+l+1}.0.0-0`:Wr(f)?c=`<${l}.${+u+1}.0-0`:p?c=`<=${l}.${u}.${f}-${p}`:e?c=`<${l}.${u}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),JH=(e,t,r)=>{for(let i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let i=0;i<e.length;i++)if(dr(e[i].semver),e[i].semver!==__.ANY&&e[i].semver.prerelease.length>0){let n=e[i].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}});var Ju=B((qCe,FO)=>{"use strict";var Bu=Symbol("SemVer ANY"),w_=class e{static get ANY(){return Bu}constructor(t,r){if(r=qO(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),S_("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===Bu?this.value="":this.value=this.operator+this.semver.version,S_("comp",this)}parse(t){let r=this.options.loose?LO[DO.COMPARATORLOOSE]:LO[DO.COMPARATOR],i=t.match(r);if(!i)throw new TypeError(`Invalid comparator: ${t}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new UO(i[2],this.options.loose):this.semver=Bu}toString(){return this.value}test(t){if(S_("Comparator.test",t,this.options.loose),this.semver===Bu||t===Bu)return!0;if(typeof t=="string")try{t=new UO(t,this.options)}catch{return!1}return b_(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new zO(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new zO(this.value,r).test(t.semver):(r=qO(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||b_(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||b_(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};FO.exports=w_;var qO=fp(),{safeRe:LO,t:DO}=ll(),b_=g_(),S_=Fu(),UO=Sn(),zO=Zi()});var Hu=B((LCe,VO)=>{"use strict";var BH=Zi(),HH=(e,t,r)=>{try{t=new BH(t,r)}catch{return!1}return t.test(e)};VO.exports=HH});var BO=B((DCe,JO)=>{"use strict";var ZH=Zi(),KH=(e,t)=>new ZH(e,t).set.map(r=>r.map(i=>i.value).join(" ").trim().split(" "));JO.exports=KH});var ZO=B((UCe,HO)=>{"use strict";var GH=Sn(),WH=Zi(),YH=(e,t,r)=>{let i=null,n=null,o=null;try{o=new WH(t,r)}catch{return null}return e.forEach(s=>{o.test(s)&&(!i||n.compare(s)===-1)&&(i=s,n=new GH(i,r))}),i};HO.exports=YH});var GO=B((zCe,KO)=>{"use strict";var XH=Sn(),QH=Zi(),eZ=(e,t,r)=>{let i=null,n=null,o=null;try{o=new QH(t,r)}catch{return null}return e.forEach(s=>{o.test(s)&&(!i||n.compare(s)===1)&&(i=s,n=new XH(i,r))}),i};KO.exports=eZ});var XO=B((FCe,YO)=>{"use strict";var $_=Sn(),tZ=Zi(),WO=Vu(),rZ=(e,t)=>{e=new tZ(e,t);let r=new $_("0.0.0");if(e.test(r)||(r=new $_("0.0.0-0"),e.test(r)))return r;r=null;for(let i=0;i<e.set.length;++i){let n=e.set[i],o=null;n.forEach(s=>{let a=new $_(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||WO(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!r||WO(r,o))&&(r=o)}return r&&e.test(r)?r:null};YO.exports=rZ});var eI=B((VCe,QO)=>{"use strict";var nZ=Zi(),iZ=(e,t)=>{try{return new nZ(e,t).range||"*"}catch{return null}};QO.exports=iZ});var $p=B((JCe,iI)=>{"use strict";var oZ=Sn(),nI=Ju(),{ANY:sZ}=nI,aZ=Zi(),cZ=Hu(),tI=Vu(),rI=vp(),lZ=bp(),uZ=_p(),dZ=(e,t,r,i)=>{e=new oZ(e,i),t=new aZ(t,i);let n,o,s,a,c;switch(r){case">":n=tI,o=lZ,s=rI,a=">",c=">=";break;case"<":n=rI,o=uZ,s=tI,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(cZ(e,t,i))return!1;for(let l=0;l<t.set.length;++l){let u=t.set[l],f=null,p=null;if(u.forEach(g=>{g.semver===sZ&&(g=new nI(">=0.0.0")),f=f||g,p=p||g,n(g.semver,f.semver,i)?f=g:s(g.semver,p.semver,i)&&(p=g)}),f.operator===a||f.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0};iI.exports=dZ});var sI=B((BCe,oI)=>{"use strict";var fZ=$p(),pZ=(e,t,r)=>fZ(e,t,">",r);oI.exports=pZ});var cI=B((HCe,aI)=>{"use strict";var hZ=$p(),mZ=(e,t,r)=>hZ(e,t,"<",r);aI.exports=mZ});var dI=B((ZCe,uI)=>{"use strict";var lI=Zi(),gZ=(e,t,r)=>(e=new lI(e,r),t=new lI(t,r),e.intersects(t,r));uI.exports=gZ});var pI=B((KCe,fI)=>{"use strict";var yZ=Hu(),vZ=Hi();fI.exports=(e,t,r)=>{let i=[],n=null,o=null,s=e.sort((u,f)=>vZ(u,f,r));for(let u of s)yZ(u,t,r)?(o=u,n||(n=u)):(o&&i.push([n,o]),o=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,f]of i)u===f?a.push(u):!f&&u===s[0]?a.push("*"):f?u===s[0]?a.push(`<=${f}`):a.push(`${u} - ${f}`):a.push(`>=${u}`);let c=a.join(" || "),l=typeof t.raw=="string"?t.raw:String(t);return c.length<l.length?c:t}});var _I=B((GCe,vI)=>{"use strict";var hI=Zi(),P_=Ju(),{ANY:R_}=P_,E_=Hu(),O_=Hi(),_Z=(e,t,r={})=>{if(e===t)return!0;e=new hI(e,r),t=new hI(t,r);let i=!1;e:for(let n of e.set){for(let o of t.set){let s=SZ(n,o,r);if(i=i||s!==null,s)continue e}if(i)return!1}return!0},bZ=[new P_(">=0.0.0-0")],mI=[new P_(">=0.0.0")],SZ=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===R_){if(t.length===1&&t[0].semver===R_)return!0;r.includePrerelease?e=bZ:e=mI}if(t.length===1&&t[0].semver===R_){if(r.includePrerelease)return!0;t=mI}let i=new Set,n,o;for(let g of e)g.operator===">"||g.operator===">="?n=gI(n,g,r):g.operator==="<"||g.operator==="<="?o=yI(o,g,r):i.add(g.semver);if(i.size>1)return null;let s;if(n&&o){if(s=O_(n.semver,o.semver,r),s>0)return null;if(s===0&&(n.operator!==">="||o.operator!=="<="))return null}for(let g of i){if(n&&!E_(g,String(n),r)||o&&!E_(g,String(o),r))return null;for(let h of t)if(!E_(g,String(h),r))return!1;return!0}let a,c,l,u,f=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,p=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;f&&f.prerelease.length===1&&o.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let g of t){if(u=u||g.operator===">"||g.operator===">=",l=l||g.operator==="<"||g.operator==="<=",n){if(p&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===p.major&&g.semver.minor===p.minor&&g.semver.patch===p.patch&&(p=!1),g.operator===">"||g.operator===">="){if(a=gI(n,g,r),a===g&&a!==n)return!1}else if(n.operator===">="&&!g.test(n.semver))return!1}if(o){if(f&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===f.major&&g.semver.minor===f.minor&&g.semver.patch===f.patch&&(f=!1),g.operator==="<"||g.operator==="<="){if(c=yI(o,g,r),c===g&&c!==o)return!1}else if(o.operator==="<="&&!g.test(o.semver))return!1}if(!g.operator&&(o||n)&&s!==0)return!1}return!(n&&l&&!o&&s!==0||o&&u&&!n&&s!==0||p||f)},gI=(e,t,r)=>{if(!e)return t;let i=O_(e.semver,t.semver,r);return i>0?e:i<0||t.operator===">"&&e.operator===">="?t:e},yI=(e,t,r)=>{if(!e)return t;let i=O_(e.semver,t.semver,r);return i<0?e:i>0||t.operator==="<"&&e.operator==="<="?t:e};vI.exports=_Z});var $I=B((WCe,wI)=>{"use strict";var I_=ll(),bI=cl(),wZ=Sn(),SI=d_(),$Z=Ma(),RZ=BP(),EZ=ZP(),PZ=WP(),OZ=QP(),IZ=tO(),CZ=nO(),kZ=oO(),TZ=aO(),jZ=Hi(),AZ=dO(),NZ=pO(),xZ=yp(),MZ=yO(),qZ=_O(),LZ=Vu(),DZ=vp(),UZ=h_(),zZ=m_(),FZ=_p(),VZ=bp(),JZ=g_(),BZ=IO(),HZ=kO(),ZZ=Ju(),KZ=Zi(),GZ=Hu(),WZ=BO(),YZ=ZO(),XZ=GO(),QZ=XO(),e3=eI(),t3=$p(),r3=sI(),n3=cI(),i3=dI(),o3=pI(),s3=_I();wI.exports={parse:$Z,valid:RZ,clean:EZ,inc:PZ,diff:OZ,major:IZ,minor:CZ,patch:kZ,prerelease:TZ,compare:jZ,rcompare:AZ,compareLoose:NZ,compareBuild:xZ,sort:MZ,rsort:qZ,gt:LZ,lt:DZ,eq:UZ,neq:zZ,gte:FZ,lte:VZ,cmp:JZ,coerce:BZ,truncate:HZ,Comparator:ZZ,Range:KZ,satisfies:GZ,toComparators:WZ,maxSatisfying:YZ,minSatisfying:XZ,minVersion:QZ,validRange:e3,outside:t3,gtr:r3,ltr:n3,intersects:i3,simplifyRange:o3,subset:s3,SemVer:wZ,re:I_.re,src:I_.src,tokens:I_.t,SEMVER_SPEC_VERSION:bI.SEMVER_SPEC_VERSION,RELEASE_TYPES:bI.RELEASE_TYPES,compareIdentifiers:SI.compareIdentifiers,rcompareIdentifiers:SI.rcompareIdentifiers}});var pa=B((YCe,NI)=>{var qa=require("fs"),Ki=require("path"),EI=c_(),Gi=$I(),{DEFAULT_API_URL:a3}=fa(),PI=["dependencies","devDependencies","optionalDependencies","peerDependencies"];function C_(e){let t=typeof e=="string"&&e.match(/^((?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*)(?:@([^\r\n]+))?$/);if(!t)throw new Error(`Invalid npm dependency: ${String(e)}`);return{name:t[1],version:t[2]}}function k_(e){let t=new Map;for(let r of e){let{name:i,version:n}=C_(r),o=t.get(i);t.set(i,o&&n?OI(i,o,n):n||o)}return t}function OI(e,t,r){if(t===r)return t;let i=Gi.validRange(t),n=Gi.validRange(r);if(i&&n)try{if(Gi.subset(n,i))return r;if(Gi.subset(i,n))return t}catch{}throw new Error(`Conflicting registry versions for ${e}: ${t} and ${r}`)}function c3(e,t){let r=typeof e=="string"&&Gi.validRange(e),i=Gi.validRange(t);if(!r||!i)return!1;try{return Gi.subset(r,i)}catch{return!1}}function Ep(e,t){if(c3(e,t))return"satisfied";let r=typeof e=="string"&&Gi.validRange(e),i=Gi.validRange(t);if(!r||!i)return"incomparable";try{let n=Gi.minVersion(r),o=Gi.minVersion(i);return!n||!o?"incomparable":Gi.lt(n,o)?"lower":"newer"}catch{return"incomparable"}}function Rp(e,t){let r=PI.find(i=>Object.hasOwn(e[i]||{},t));return r?{section:r,existing:e[r][t]}:null}function II(e,t){let r=k_(t);if(r.size===0)return;let i=Ki.join(e,"package.json"),n=JSON.parse(qa.readFileSync(i,"utf8"));for(let[o,s]of r){let a=Rp(n,o),c=a?.section||"dependencies";n[c]||={};let l=a?.existing;n[c][o]=l===void 0?s||"latest":s&&Ep(l,s)==="lower"?s:l}qa.writeFileSync(i,`${JSON.stringify(n,null,2)}
2
+ var g9=Object.create;var up=Object.defineProperty;var y9=Object.getOwnPropertyDescriptor;var v9=Object.getOwnPropertyNames;var _9=Object.getPrototypeOf,b9=Object.prototype.hasOwnProperty;var Ve=(e,t)=>()=>(e&&(t=e(e=0)),t);var B=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bo=(e,t)=>{for(var r in t)up(e,r,{get:t[r],enumerable:!0})},VE=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of v9(t))!b9.call(e,n)&&n!==r&&up(e,n,{get:()=>t[n],enumerable:!(i=y9(t,n))||i.enumerable});return e};var Bi=(e,t,r)=>(r=e!=null?g9(_9(e)):{},VE(t||!e||!e.__esModule?up(r,"default",{value:e,enumerable:!0}):r,e)),Mr=e=>VE(up({},"__esModule",{value:!0}),e);var xa=B((VIe,S9)=>{S9.exports={name:"@frontfriend/sdk",version:"1.2.8"}});var So=B((JIe,JE)=>{var{name:w9}=xa();JE.exports={PACKAGE_NAME:w9}});var fa=B((BIe,BE)=>{var $9="https://app.frontfriend.dev",R9=".cache/frontfriend",E9={JS:["tokens.js","variables.js","semanticVariables.js","semanticDarkVariables.js","keyframes.js","animations.js","safelist.js","custom.js"],JSON:["fonts.json","icons.json","components-config.json","iconLibrary.json","version.json","versionMetadata.json","metadata.json","base.json","nativeTokens.json"]},P9={FF_ID:"FF_ID",FF_API_URL:"FF_API_URL",FF_AUTH_TOKEN:"FF_AUTH_TOKEN",FF_MACHINE_TOKEN:"FRONTFRIEND_MACHINE_TOKEN"};function O9(e){if(!e)return null;try{let t=new URL(e);return t.hostname.startsWith("app.")?`${t.protocol}//${t.hostname.replace(/^app\./,"registry.")}`:null}catch{return null}}BE.exports={DEFAULT_API_URL:$9,CACHE_DIR_NAME:R9,CACHE_TTL_DAYS:7,CACHE_TTL_MS:6048e5,CACHE_FILES:E9,ENV_VARS:P9,deriveRegistryFromApiUrl:O9}});var WE=B((HIe,GE)=>{GE.exports=KE;KE.sync=C9;var HE=require("fs");function I9(e,t){var r=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var i=0;i<r.length;i++){var n=r[i].toLowerCase();if(n&&e.substr(-n.length).toLowerCase()===n)return!0}return!1}function ZE(e,t,r){return!e.isSymbolicLink()&&!e.isFile()?!1:I9(t,r)}function KE(e,t,r){HE.stat(e,function(i,n){r(i,i?!1:ZE(n,e,t))})}function C9(e,t){return ZE(HE.statSync(e),e,t)}});var tP=B((ZIe,eP)=>{eP.exports=XE;XE.sync=k9;var YE=require("fs");function XE(e,t,r){YE.stat(e,function(i,n){r(i,i?!1:QE(n,t))})}function k9(e,t){return QE(YE.statSync(e),t)}function QE(e,t){return e.isFile()&&T9(e,t)}function T9(e,t){var r=e.mode,i=e.uid,n=e.gid,o=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),a=parseInt("100",8),c=parseInt("010",8),l=parseInt("001",8),u=a|c,f=r&l||r&c&&n===s||r&a&&i===o||r&u&&o===0;return f}});var nP=B((GIe,rP)=>{var KIe=require("fs"),dp;process.platform==="win32"||global.TESTING_WINDOWS?dp=WE():dp=tP();rP.exports=Qv;Qv.sync=j9;function Qv(e,t,r){if(typeof t=="function"&&(r=t,t={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){Qv(e,t||{},function(o,s){o?n(o):i(s)})})}dp(e,t||{},function(i,n){i&&(i.code==="EACCES"||t&&t.ignoreErrors)&&(i=null,n=!1),r(i,n)})}function j9(e,t){try{return dp.sync(e,t||{})}catch(r){if(t&&t.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var uP=B((WIe,lP)=>{var sl=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",iP=require("path"),A9=sl?";":":",oP=nP(),sP=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),aP=(e,t)=>{let r=t.colon||A9,i=e.match(/\//)||sl&&e.match(/\\/)?[""]:[...sl?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(r)],n=sl?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=sl?n.split(r):[""];return sl&&e.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:i,pathExt:o,pathExtExe:n}},cP=(e,t,r)=>{typeof t=="function"&&(r=t,t={}),t||(t={});let{pathEnv:i,pathExt:n,pathExtExe:o}=aP(e,t),s=[],a=l=>new Promise((u,f)=>{if(l===i.length)return t.all&&s.length?u(s):f(sP(e));let p=i[l],g=/^".*"$/.test(p)?p.slice(1,-1):p,h=iP.join(g,e),v=!g&&/^\.[\\\/]/.test(e)?e.slice(0,2)+h:h;u(c(v,l,0))}),c=(l,u,f)=>new Promise((p,g)=>{if(f===n.length)return p(a(u+1));let h=n[f];oP(l+h,{pathExt:o},(v,y)=>{if(!v&&y)if(t.all)s.push(l+h);else return p(l+h);return p(c(l,u,f+1))})});return r?a(0).then(l=>r(null,l),r):a(0)},N9=(e,t)=>{t=t||{};let{pathEnv:r,pathExt:i,pathExtExe:n}=aP(e,t),o=[];for(let s=0;s<r.length;s++){let a=r[s],c=/^".*"$/.test(a)?a.slice(1,-1):a,l=iP.join(c,e),u=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let f=0;f<i.length;f++){let p=u+i[f];try{if(oP.sync(p,{pathExt:n}))if(t.all)o.push(p);else return p}catch{}}}if(t.all&&o.length)return o;if(t.nothrow)return null;throw sP(e)};lP.exports=cP;cP.sync=N9});var fP=B((YIe,e_)=>{"use strict";var dP=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};e_.exports=dP;e_.exports.default=dP});var gP=B((XIe,mP)=>{"use strict";var pP=require("path"),x9=uP(),M9=fP();function hP(e,t){let r=e.options.env||process.env,i=process.cwd(),n=e.options.cwd!=null,o=n&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(e.options.cwd)}catch{}let s;try{s=x9.sync(e.command,{path:r[M9({env:r})],pathExt:t?pP.delimiter:void 0})}catch{}finally{o&&process.chdir(i)}return s&&(s=pP.resolve(n?e.options.cwd:"",s)),s}function q9(e){return hP(e)||hP(e,!0)}mP.exports=q9});var yP=B((QIe,r_)=>{"use strict";var t_=/([()\][%!^"`<>&|;, *?])/g;function L9(e){return e=e.replace(t_,"^$1"),e}function D9(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e=e.replace(/(?=(\\+?)?)\1$/,"$1$1"),e=`"${e}"`,e=e.replace(t_,"^$1"),t&&(e=e.replace(t_,"^$1")),e}r_.exports.command=L9;r_.exports.argument=D9});var _P=B((eCe,vP)=>{"use strict";vP.exports=/^#!(.*)/});var SP=B((tCe,bP)=>{"use strict";var U9=_P();bP.exports=(e="")=>{let t=e.match(U9);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,"").split(" "),n=r.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var $P=B((rCe,wP)=>{"use strict";var n_=require("fs"),z9=SP();function F9(e){let r=Buffer.alloc(150),i;try{i=n_.openSync(e,"r"),n_.readSync(i,r,0,150,0),n_.closeSync(i)}catch{}return z9(r.toString())}wP.exports=F9});var OP=B((nCe,PP)=>{"use strict";var V9=require("path"),RP=gP(),EP=yP(),J9=$P(),B9=process.platform==="win32",H9=/\.(?:com|exe)$/i,Z9=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function K9(e){e.file=RP(e);let t=e.file&&J9(e.file);return t?(e.args.unshift(e.file),e.command=t,RP(e)):e.file}function G9(e){if(!B9)return e;let t=K9(e),r=!H9.test(t);if(e.options.forceShell||r){let i=Z9.test(t);e.command=V9.normalize(e.command),e.command=EP.command(e.command),e.args=e.args.map(o=>EP.argument(o,i));let n=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${n}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function W9(e,t,r){t&&!Array.isArray(t)&&(r=t,t=null),t=t?t.slice(0):[],r=Object.assign({},r);let i={command:e,args:t,options:r,file:void 0,original:{command:e,args:t}};return r.shell?i:G9(i)}PP.exports=W9});var kP=B((iCe,CP)=>{"use strict";var i_=process.platform==="win32";function o_(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function Y9(e,t){if(!i_)return;let r=e.emit;e.emit=function(i,n){if(i==="exit"){let o=IP(n,t);if(o)return r.call(e,"error",o)}return r.apply(e,arguments)}}function IP(e,t){return i_&&e===1&&!t.file?o_(t.original,"spawn"):null}function X9(e,t){return i_&&e===1&&!t.file?o_(t.original,"spawnSync"):null}CP.exports={hookChildProcess:Y9,verifyENOENT:IP,verifyENOENTSync:X9,notFoundError:o_}});var c_=B((oCe,al)=>{"use strict";var TP=require("child_process"),s_=OP(),a_=kP();function jP(e,t,r){let i=s_(e,t,r),n=TP.spawn(i.command,i.args,i.options);return a_.hookChildProcess(n,i),n}function Q9(e,t,r){let i=s_(e,t,r),n=TP.spawnSync(i.command,i.args,i.options);return n.error=n.error||a_.verifyENOENTSync(n.status,i),n}al.exports=jP;al.exports.spawn=jP;al.exports.sync=Q9;al.exports._parse=s_;al.exports._enoent=a_});var cl=B((sCe,AP)=>{"use strict";var eB="2.0.0",tB=Number.MAX_SAFE_INTEGER||9007199254740991,rB=16,nB=250,iB=["major","premajor","minor","preminor","patch","prepatch","prerelease"];AP.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:rB,MAX_SAFE_BUILD_LENGTH:nB,MAX_SAFE_INTEGER:tB,RELEASE_TYPES:iB,SEMVER_SPEC_VERSION:eB,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Fu=B((aCe,NP)=>{"use strict";var oB=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};NP.exports=oB});var ll=B((Bo,xP)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:l_,MAX_SAFE_BUILD_LENGTH:sB,MAX_LENGTH:aB}=cl(),cB=Fu();Bo=xP.exports={};var lB=Bo.re=[],uB=Bo.safeRe=[],Ze=Bo.src=[],dB=Bo.safeSrc=[],Ke=Bo.t={},fB=0,u_="[a-zA-Z0-9-]",pB=[["\\s",1],["\\d",aB],[u_,sB]],hB=e=>{for(let[t,r]of pB)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e},St=(e,t,r)=>{let i=hB(t),n=fB++;cB(e,n,t),Ke[e]=n,Ze[n]=t,dB[n]=i,lB[n]=new RegExp(t,r?"g":void 0),uB[n]=new RegExp(i,r?"g":void 0)};St("NUMERICIDENTIFIER","0|[1-9]\\d*");St("NUMERICIDENTIFIERLOOSE","\\d+");St("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u_}*`);St("MAINVERSION",`(${Ze[Ke.NUMERICIDENTIFIER]})\\.(${Ze[Ke.NUMERICIDENTIFIER]})\\.(${Ze[Ke.NUMERICIDENTIFIER]})`);St("MAINVERSIONLOOSE",`(${Ze[Ke.NUMERICIDENTIFIERLOOSE]})\\.(${Ze[Ke.NUMERICIDENTIFIERLOOSE]})\\.(${Ze[Ke.NUMERICIDENTIFIERLOOSE]})`);St("PRERELEASEIDENTIFIER",`(?:${Ze[Ke.NONNUMERICIDENTIFIER]}|${Ze[Ke.NUMERICIDENTIFIER]})`);St("PRERELEASEIDENTIFIERLOOSE",`(?:${Ze[Ke.NONNUMERICIDENTIFIER]}|${Ze[Ke.NUMERICIDENTIFIERLOOSE]})`);St("PRERELEASE",`(?:-(${Ze[Ke.PRERELEASEIDENTIFIER]}(?:\\.${Ze[Ke.PRERELEASEIDENTIFIER]})*))`);St("PRERELEASELOOSE",`(?:-?(${Ze[Ke.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${Ze[Ke.PRERELEASEIDENTIFIERLOOSE]})*))`);St("BUILDIDENTIFIER",`${u_}+`);St("BUILD",`(?:\\+(${Ze[Ke.BUILDIDENTIFIER]}(?:\\.${Ze[Ke.BUILDIDENTIFIER]})*))`);St("FULLPLAIN",`v?${Ze[Ke.MAINVERSION]}${Ze[Ke.PRERELEASE]}?${Ze[Ke.BUILD]}?`);St("FULL",`^${Ze[Ke.FULLPLAIN]}$`);St("LOOSEPLAIN",`[v=\\s]*${Ze[Ke.MAINVERSIONLOOSE]}${Ze[Ke.PRERELEASELOOSE]}?${Ze[Ke.BUILD]}?`);St("LOOSE",`^${Ze[Ke.LOOSEPLAIN]}$`);St("GTLT","((?:<|>)?=?)");St("XRANGEIDENTIFIERLOOSE",`${Ze[Ke.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);St("XRANGEIDENTIFIER",`${Ze[Ke.NUMERICIDENTIFIER]}|x|X|\\*`);St("XRANGEPLAIN",`[v=\\s]*(${Ze[Ke.XRANGEIDENTIFIER]})(?:\\.(${Ze[Ke.XRANGEIDENTIFIER]})(?:\\.(${Ze[Ke.XRANGEIDENTIFIER]})(?:${Ze[Ke.PRERELEASE]})?${Ze[Ke.BUILD]}?)?)?`);St("XRANGEPLAINLOOSE",`[v=\\s]*(${Ze[Ke.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Ze[Ke.XRANGEIDENTIFIERLOOSE]})(?:\\.(${Ze[Ke.XRANGEIDENTIFIERLOOSE]})(?:${Ze[Ke.PRERELEASELOOSE]})?${Ze[Ke.BUILD]}?)?)?`);St("XRANGE",`^${Ze[Ke.GTLT]}\\s*${Ze[Ke.XRANGEPLAIN]}$`);St("XRANGELOOSE",`^${Ze[Ke.GTLT]}\\s*${Ze[Ke.XRANGEPLAINLOOSE]}$`);St("COERCEPLAIN",`(^|[^\\d])(\\d{1,${l_}})(?:\\.(\\d{1,${l_}}))?(?:\\.(\\d{1,${l_}}))?`);St("COERCE",`${Ze[Ke.COERCEPLAIN]}(?:$|[^\\d])`);St("COERCEFULL",Ze[Ke.COERCEPLAIN]+`(?:${Ze[Ke.PRERELEASE]})?(?:${Ze[Ke.BUILD]})?(?:$|[^\\d])`);St("COERCERTL",Ze[Ke.COERCE],!0);St("COERCERTLFULL",Ze[Ke.COERCEFULL],!0);St("LONETILDE","(?:~>?)");St("TILDETRIM",`(\\s*)${Ze[Ke.LONETILDE]}\\s+`,!0);Bo.tildeTrimReplace="$1~";St("TILDE",`^${Ze[Ke.LONETILDE]}${Ze[Ke.XRANGEPLAIN]}$`);St("TILDELOOSE",`^${Ze[Ke.LONETILDE]}${Ze[Ke.XRANGEPLAINLOOSE]}$`);St("LONECARET","(?:\\^)");St("CARETTRIM",`(\\s*)${Ze[Ke.LONECARET]}\\s+`,!0);Bo.caretTrimReplace="$1^";St("CARET",`^${Ze[Ke.LONECARET]}${Ze[Ke.XRANGEPLAIN]}$`);St("CARETLOOSE",`^${Ze[Ke.LONECARET]}${Ze[Ke.XRANGEPLAINLOOSE]}$`);St("COMPARATORLOOSE",`^${Ze[Ke.GTLT]}\\s*(${Ze[Ke.LOOSEPLAIN]})$|^$`);St("COMPARATOR",`^${Ze[Ke.GTLT]}\\s*(${Ze[Ke.FULLPLAIN]})$|^$`);St("COMPARATORTRIM",`(\\s*)${Ze[Ke.GTLT]}\\s*(${Ze[Ke.LOOSEPLAIN]}|${Ze[Ke.XRANGEPLAIN]})`,!0);Bo.comparatorTrimReplace="$1$2$3";St("HYPHENRANGE",`^\\s*(${Ze[Ke.XRANGEPLAIN]})\\s+-\\s+(${Ze[Ke.XRANGEPLAIN]})\\s*$`);St("HYPHENRANGELOOSE",`^\\s*(${Ze[Ke.XRANGEPLAINLOOSE]})\\s+-\\s+(${Ze[Ke.XRANGEPLAINLOOSE]})\\s*$`);St("STAR","(<|>)?=?\\s*\\*");St("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");St("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var fp=B((cCe,MP)=>{"use strict";var mB=Object.freeze({loose:!0}),gB=Object.freeze({}),yB=e=>e?typeof e!="object"?mB:e:gB;MP.exports=yB});var d_=B((lCe,DP)=>{"use strict";var qP=/^[0-9]+$/,LP=(e,t)=>{if(typeof e=="number"&&typeof t=="number")return e===t?0:e<t?-1:1;let r=qP.test(e),i=qP.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1},vB=(e,t)=>LP(t,e);DP.exports={compareIdentifiers:LP,rcompareIdentifiers:vB}});var Sn=B((uCe,zP)=>{"use strict";var pp=Fu(),{MAX_LENGTH:UP,MAX_SAFE_INTEGER:hp}=cl(),{safeRe:mp,t:gp}=ll(),_B=fp(),{compareIdentifiers:f_}=d_(),bB=(e,t)=>{let r=t.split(".");if(r.length>e.length)return!1;for(let i=0;i<r.length;i++)if(f_(e[i],r[i])!==0)return!1;return!0},p_=class e{constructor(t,r){if(r=_B(r),t instanceof e){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>UP)throw new TypeError(`version is longer than ${UP} characters`);pp("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let i=t.trim().match(r.loose?mp[gp.LOOSE]:mp[gp.FULL]);if(!i)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>hp||this.major<0)throw new TypeError("Invalid major version");if(this.minor>hp||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>hp||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let o=+n;if(o>=0&&o<hp)return o}return n}):this.prerelease=[],this.build=i[5]?i[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(t){if(pp("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let i=this.prerelease[r],n=t.prerelease[r];if(pp("prerelease compare",r,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return f_(i,n)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let i=this.build[r],n=t.build[r];if(pp("build compare",r,i,n),i===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(i===void 0)return-1;if(i===n)continue;return f_(i,n)}while(++r)}inc(t,r,i){if(t.startsWith("pre")){if(!r&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let n=`-${r}`.match(this.options.loose?mp[gp.PRERELEASELOOSE]:mp[gp.PRERELEASE]);if(!n||n[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,i),this.inc("pre",r,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,i),this.inc("pre",r,i);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 n=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(r){let o=[r,n];if(i===!1&&(o=[r]),bB(this.prerelease,r)){let s=this.prerelease[r.split(".").length];isNaN(s)&&(this.prerelease=o)}else this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};zP.exports=p_});var Ma=B((dCe,VP)=>{"use strict";var FP=Sn(),SB=(e,t,r=!1)=>{if(e instanceof FP)return e;try{return new FP(e,t)}catch(i){if(!r)return null;throw i}};VP.exports=SB});var BP=B((fCe,JP)=>{"use strict";var wB=Ma(),$B=(e,t)=>{let r=wB(e,t);return r?r.version:null};JP.exports=$B});var ZP=B((pCe,HP)=>{"use strict";var RB=Ma(),EB=(e,t)=>{let r=RB(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};HP.exports=EB});var WP=B((hCe,GP)=>{"use strict";var KP=Sn(),PB=(e,t,r,i,n)=>{typeof r=="string"&&(n=i,i=r,r=void 0);try{return new KP(e instanceof KP?e.version:e,r).inc(t,i,n).version}catch{return null}};GP.exports=PB});var QP=B((mCe,XP)=>{"use strict";var YP=Ma(),OB=(e,t)=>{let r=YP(e,null,!0),i=YP(t,null,!0),n=r.compare(i);if(n===0)return null;let o=n>0,s=o?r:i,a=o?i:r,c=!!s.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(s)===0)return a.minor&&!a.patch?"minor":"patch"}let u=c?"pre":"";return r.major!==i.major?u+"major":r.minor!==i.minor?u+"minor":r.patch!==i.patch?u+"patch":"prerelease"};XP.exports=OB});var tO=B((gCe,eO)=>{"use strict";var IB=Sn(),CB=(e,t)=>new IB(e,t).major;eO.exports=CB});var nO=B((yCe,rO)=>{"use strict";var kB=Sn(),TB=(e,t)=>new kB(e,t).minor;rO.exports=TB});var oO=B((vCe,iO)=>{"use strict";var jB=Sn(),AB=(e,t)=>new jB(e,t).patch;iO.exports=AB});var aO=B((_Ce,sO)=>{"use strict";var NB=Ma(),xB=(e,t)=>{let r=NB(e,t);return r&&r.prerelease.length?r.prerelease:null};sO.exports=xB});var Hi=B((bCe,lO)=>{"use strict";var cO=Sn(),MB=(e,t,r)=>new cO(e,r).compare(new cO(t,r));lO.exports=MB});var dO=B((SCe,uO)=>{"use strict";var qB=Hi(),LB=(e,t,r)=>qB(t,e,r);uO.exports=LB});var pO=B((wCe,fO)=>{"use strict";var DB=Hi(),UB=(e,t)=>DB(e,t,!0);fO.exports=UB});var yp=B(($Ce,mO)=>{"use strict";var hO=Sn(),zB=(e,t,r)=>{let i=new hO(e,r),n=new hO(t,r);return i.compare(n)||i.compareBuild(n)};mO.exports=zB});var yO=B((RCe,gO)=>{"use strict";var FB=yp(),VB=(e,t)=>e.sort((r,i)=>FB(r,i,t));gO.exports=VB});var _O=B((ECe,vO)=>{"use strict";var JB=yp(),BB=(e,t)=>e.sort((r,i)=>JB(i,r,t));vO.exports=BB});var Vu=B((PCe,bO)=>{"use strict";var HB=Hi(),ZB=(e,t,r)=>HB(e,t,r)>0;bO.exports=ZB});var vp=B((OCe,SO)=>{"use strict";var KB=Hi(),GB=(e,t,r)=>KB(e,t,r)<0;SO.exports=GB});var h_=B((ICe,wO)=>{"use strict";var WB=Hi(),YB=(e,t,r)=>WB(e,t,r)===0;wO.exports=YB});var m_=B((CCe,$O)=>{"use strict";var XB=Hi(),QB=(e,t,r)=>XB(e,t,r)!==0;$O.exports=QB});var _p=B((kCe,RO)=>{"use strict";var eH=Hi(),tH=(e,t,r)=>eH(e,t,r)>=0;RO.exports=tH});var bp=B((TCe,EO)=>{"use strict";var rH=Hi(),nH=(e,t,r)=>rH(e,t,r)<=0;EO.exports=nH});var g_=B((jCe,PO)=>{"use strict";var iH=h_(),oH=m_(),sH=Vu(),aH=_p(),cH=vp(),lH=bp(),uH=(e,t,r,i)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return iH(e,r,i);case"!=":return oH(e,r,i);case">":return sH(e,r,i);case">=":return aH(e,r,i);case"<":return cH(e,r,i);case"<=":return lH(e,r,i);default:throw new TypeError(`Invalid operator: ${t}`)}};PO.exports=uH});var IO=B((ACe,OO)=>{"use strict";var dH=Sn(),fH=Ma(),{safeRe:Sp,t:wp}=ll(),pH=(e,t)=>{if(e instanceof dH)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?Sp[wp.COERCEFULL]:Sp[wp.COERCE]);else{let c=t.includePrerelease?Sp[wp.COERCERTLFULL]:Sp[wp.COERCERTL],l;for(;(l=c.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||l.index+l[0].length!==r.index+r[0].length)&&(r=l),c.lastIndex=l.index+l[1].length+l[2].length;c.lastIndex=-1}if(r===null)return null;let i=r[2],n=r[3]||"0",o=r[4]||"0",s=t.includePrerelease&&r[5]?`-${r[5]}`:"",a=t.includePrerelease&&r[6]?`+${r[6]}`:"";return fH(`${i}.${n}.${o}${s}${a}`,t)};OO.exports=pH});var kO=B((NCe,CO)=>{"use strict";var hH=Ma(),mH=cl(),gH=Sn(),yH=(e,t,r)=>{if(!mH.RELEASE_TYPES.includes(t))return null;let i=vH(e,r);return i&&_H(i,t)},vH=(e,t)=>{let r=e instanceof gH?e.version:e;return hH(r,t)},_H=(e,t)=>{if(bH(t))return e.version;switch(e.prerelease=[],t){case"major":e.minor=0,e.patch=0;break;case"minor":e.patch=0;break}return e.format()},bH=e=>e.startsWith("pre");CO.exports=yH});var jO=B((xCe,TO)=>{"use strict";var y_=class{constructor(){this.max=1e3,this.map=new Map}get(t){let r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(t,r)}return this}};TO.exports=y_});var Zi=B((MCe,MO)=>{"use strict";var SH=/\s+/g,v_=class e{constructor(t,r){if(r=$H(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof __)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(SH," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!NO(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&jH(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let r=this.set[t];for(let i=0;i<r.length;i++)i>0&&(this.formatted+=" "),this.formatted+=r[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){t=t.replace(TH,"");let i=((this.options.includePrerelease&&CH)|(this.options.loose&&kH))+":"+t,n=AO.get(i);if(n)return n;let o=this.options.loose,s=o?Bn[wn.HYPHENRANGELOOSE]:Bn[wn.HYPHENRANGE];t=t.replace(s,VH(this.options.includePrerelease)),dr("hyphen replace",t),t=t.replace(Bn[wn.COMPARATORTRIM],PH),dr("comparator trim",t),t=t.replace(Bn[wn.TILDETRIM],OH),dr("tilde trim",t),t=t.replace(Bn[wn.CARETTRIM],IH),dr("caret trim",t);let a=t.split(" ").map(f=>AH(f,this.options)).join(" ").split(/\s+/).map(f=>FH(f,this.options));o&&(a=a.filter(f=>(dr("loose invalid filter",f,this.options),!!f.match(Bn[wn.COMPARATORLOOSE])))),dr("range list",a);let c=new Map,l=a.map(f=>new __(f,this.options));for(let f of l){if(NO(f))return[f];c.set(f.value,f)}c.size>1&&c.has("")&&c.delete("");let u=[...c.values()];return AO.set(i,u),u}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(i=>xO(i,r)&&t.set.some(n=>xO(n,r)&&i.every(o=>n.every(s=>o.intersects(s,r)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new RH(t,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(JH(this.set[r],t,this.options))return!0;return!1}};MO.exports=v_;var wH=jO(),AO=new wH,$H=fp(),__=Ju(),dr=Fu(),RH=Sn(),{safeRe:Bn,src:EH,t:wn,comparatorTrimReplace:PH,tildeTrimReplace:OH,caretTrimReplace:IH}=ll(),{FLAG_INCLUDE_PRERELEASE:CH,FLAG_LOOSE:kH}=cl(),TH=new RegExp(EH[wn.BUILD],"g"),NO=e=>e.value==="<0.0.0-0",jH=e=>e.value==="",xO=(e,t)=>{let r=!0,i=e.slice(),n=i.pop();for(;r&&i.length;)r=i.every(o=>n.intersects(o,t)),n=i.pop();return r},AH=(e,t)=>(e=e.replace(Bn[wn.BUILD],""),dr("comp",e,t),e=qH(e,t),dr("caret",e),e=xH(e,t),dr("tildes",e),e=DH(e,t),dr("xrange",e),e=zH(e,t),dr("stars",e),e),Wr=e=>!e||e.toLowerCase()==="x"||e==="*",NH=(e,t,r)=>Wr(e)&&!Wr(t)||Wr(t)&&r&&!Wr(r),xH=(e,t)=>e.trim().split(/\s+/).map(r=>MH(r,t)).join(" "),MH=(e,t)=>{let r=t.loose?Bn[wn.TILDELOOSE]:Bn[wn.TILDE],i=t.includePrerelease?"-0":"";return e.replace(r,(n,o,s,a,c)=>{dr("tilde",e,n,o,s,a,c);let l;return Wr(o)?l="":Wr(s)?l=`>=${o}.0.0${i} <${+o+1}.0.0-0`:Wr(a)?l=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`:c?(dr("replaceTilde pr",c),l=`>=${o}.${s}.${a}-${c} <${o}.${+s+1}.0-0`):l=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`,dr("tilde return",l),l})},qH=(e,t)=>e.trim().split(/\s+/).map(r=>LH(r,t)).join(" "),LH=(e,t)=>{dr("caret",e,t);let r=t.loose?Bn[wn.CARETLOOSE]:Bn[wn.CARET],i=t.includePrerelease?"-0":"";return e.replace(r,(n,o,s,a,c)=>{dr("caret",e,n,o,s,a,c);let l;return Wr(o)?l="":Wr(s)?l=`>=${o}.0.0${i} <${+o+1}.0.0-0`:Wr(a)?o==="0"?l=`>=${o}.${s}.0${i} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.0${i} <${+o+1}.0.0-0`:c?(dr("replaceCaret pr",c),o==="0"?s==="0"?l=`>=${o}.${s}.${a}-${c} <${o}.${s}.${+a+1}-0`:l=`>=${o}.${s}.${a}-${c} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.${a}-${c} <${+o+1}.0.0-0`):(dr("no pr"),o==="0"?s==="0"?l=`>=${o}.${s}.${a} <${o}.${s}.${+a+1}-0`:l=`>=${o}.${s}.${a} <${o}.${+s+1}.0-0`:l=`>=${o}.${s}.${a} <${+o+1}.0.0-0`),dr("caret return",l),l})},DH=(e,t)=>(dr("replaceXRanges",e,t),e.split(/\s+/).map(r=>UH(r,t)).join(" ")),UH=(e,t)=>{e=e.trim();let r=t.loose?Bn[wn.XRANGELOOSE]:Bn[wn.XRANGE];return e.replace(r,(i,n,o,s,a,c)=>{if(dr("xRange",e,i,n,o,s,a,c),NH(o,s,a))return e;let l=Wr(o),u=l||Wr(s),f=u||Wr(a),p=f;return n==="="&&p&&(n=""),c=t.includePrerelease?"-0":"",l?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&p?(u&&(s=0),a=0,n===">"?(n=">=",u?(o=+o+1,s=0,a=0):(s=+s+1,a=0)):n==="<="&&(n="<",u?o=+o+1:s=+s+1),n==="<"&&(c="-0"),i=`${n+o}.${s}.${a}${c}`):u?i=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(i=`>=${o}.${s}.0${c} <${o}.${+s+1}.0-0`),dr("xRange return",i),i})},zH=(e,t)=>(dr("replaceStars",e,t),e.trim().replace(Bn[wn.STAR],"")),FH=(e,t)=>(dr("replaceGTE0",e,t),e.trim().replace(Bn[t.includePrerelease?wn.GTE0PRE:wn.GTE0],"")),VH=e=>(t,r,i,n,o,s,a,c,l,u,f,p)=>(Wr(i)?r="":Wr(n)?r=`>=${i}.0.0${e?"-0":""}`:Wr(o)?r=`>=${i}.${n}.0${e?"-0":""}`:s?r=`>=${r}`:r=`>=${r}${e?"-0":""}`,Wr(l)?c="":Wr(u)?c=`<${+l+1}.0.0-0`:Wr(f)?c=`<${l}.${+u+1}.0-0`:p?c=`<=${l}.${u}.${f}-${p}`:e?c=`<${l}.${u}.${+f+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),JH=(e,t,r)=>{for(let i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let i=0;i<e.length;i++)if(dr(e[i].semver),e[i].semver!==__.ANY&&e[i].semver.prerelease.length>0){let n=e[i].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}});var Ju=B((qCe,FO)=>{"use strict";var Bu=Symbol("SemVer ANY"),w_=class e{static get ANY(){return Bu}constructor(t,r){if(r=qO(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),S_("comparator",t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===Bu?this.value="":this.value=this.operator+this.semver.version,S_("comp",this)}parse(t){let r=this.options.loose?LO[DO.COMPARATORLOOSE]:LO[DO.COMPARATOR],i=t.match(r);if(!i)throw new TypeError(`Invalid comparator: ${t}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new UO(i[2],this.options.loose):this.semver=Bu}toString(){return this.value}test(t){if(S_("Comparator.test",t,this.options.loose),this.semver===Bu||t===Bu)return!0;if(typeof t=="string")try{t=new UO(t,this.options)}catch{return!1}return b_(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new zO(t.value,r).test(this.value):t.operator===""?t.value===""?!0:new zO(this.value,r).test(t.semver):(r=qO(r),r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||b_(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||b_(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};FO.exports=w_;var qO=fp(),{safeRe:LO,t:DO}=ll(),b_=g_(),S_=Fu(),UO=Sn(),zO=Zi()});var Hu=B((LCe,VO)=>{"use strict";var BH=Zi(),HH=(e,t,r)=>{try{t=new BH(t,r)}catch{return!1}return t.test(e)};VO.exports=HH});var BO=B((DCe,JO)=>{"use strict";var ZH=Zi(),KH=(e,t)=>new ZH(e,t).set.map(r=>r.map(i=>i.value).join(" ").trim().split(" "));JO.exports=KH});var ZO=B((UCe,HO)=>{"use strict";var GH=Sn(),WH=Zi(),YH=(e,t,r)=>{let i=null,n=null,o=null;try{o=new WH(t,r)}catch{return null}return e.forEach(s=>{o.test(s)&&(!i||n.compare(s)===-1)&&(i=s,n=new GH(i,r))}),i};HO.exports=YH});var GO=B((zCe,KO)=>{"use strict";var XH=Sn(),QH=Zi(),eZ=(e,t,r)=>{let i=null,n=null,o=null;try{o=new QH(t,r)}catch{return null}return e.forEach(s=>{o.test(s)&&(!i||n.compare(s)===1)&&(i=s,n=new XH(i,r))}),i};KO.exports=eZ});var XO=B((FCe,YO)=>{"use strict";var $_=Sn(),tZ=Zi(),WO=Vu(),rZ=(e,t)=>{e=new tZ(e,t);let r=new $_("0.0.0");if(e.test(r)||(r=new $_("0.0.0-0"),e.test(r)))return r;r=null;for(let i=0;i<e.set.length;++i){let n=e.set[i],o=null;n.forEach(s=>{let a=new $_(s.semver.version);switch(s.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!o||WO(a,o))&&(o=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${s.operator}`)}}),o&&(!r||WO(r,o))&&(r=o)}return r&&e.test(r)?r:null};YO.exports=rZ});var eI=B((VCe,QO)=>{"use strict";var nZ=Zi(),iZ=(e,t)=>{try{return new nZ(e,t).range||"*"}catch{return null}};QO.exports=iZ});var $p=B((JCe,iI)=>{"use strict";var oZ=Sn(),nI=Ju(),{ANY:sZ}=nI,aZ=Zi(),cZ=Hu(),tI=Vu(),rI=vp(),lZ=bp(),uZ=_p(),dZ=(e,t,r,i)=>{e=new oZ(e,i),t=new aZ(t,i);let n,o,s,a,c;switch(r){case">":n=tI,o=lZ,s=rI,a=">",c=">=";break;case"<":n=rI,o=uZ,s=tI,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(cZ(e,t,i))return!1;for(let l=0;l<t.set.length;++l){let u=t.set[l],f=null,p=null;if(u.forEach(g=>{g.semver===sZ&&(g=new nI(">=0.0.0")),f=f||g,p=p||g,n(g.semver,f.semver,i)?f=g:s(g.semver,p.semver,i)&&(p=g)}),f.operator===a||f.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0};iI.exports=dZ});var sI=B((BCe,oI)=>{"use strict";var fZ=$p(),pZ=(e,t,r)=>fZ(e,t,">",r);oI.exports=pZ});var cI=B((HCe,aI)=>{"use strict";var hZ=$p(),mZ=(e,t,r)=>hZ(e,t,"<",r);aI.exports=mZ});var dI=B((ZCe,uI)=>{"use strict";var lI=Zi(),gZ=(e,t,r)=>(e=new lI(e,r),t=new lI(t,r),e.intersects(t,r));uI.exports=gZ});var pI=B((KCe,fI)=>{"use strict";var yZ=Hu(),vZ=Hi();fI.exports=(e,t,r)=>{let i=[],n=null,o=null,s=e.sort((u,f)=>vZ(u,f,r));for(let u of s)yZ(u,t,r)?(o=u,n||(n=u)):(o&&i.push([n,o]),o=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,f]of i)u===f?a.push(u):!f&&u===s[0]?a.push("*"):f?u===s[0]?a.push(`<=${f}`):a.push(`${u} - ${f}`):a.push(`>=${u}`);let c=a.join(" || "),l=typeof t.raw=="string"?t.raw:String(t);return c.length<l.length?c:t}});var _I=B((GCe,vI)=>{"use strict";var hI=Zi(),P_=Ju(),{ANY:R_}=P_,E_=Hu(),O_=Hi(),_Z=(e,t,r={})=>{if(e===t)return!0;e=new hI(e,r),t=new hI(t,r);let i=!1;e:for(let n of e.set){for(let o of t.set){let s=SZ(n,o,r);if(i=i||s!==null,s)continue e}if(i)return!1}return!0},bZ=[new P_(">=0.0.0-0")],mI=[new P_(">=0.0.0")],SZ=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===R_){if(t.length===1&&t[0].semver===R_)return!0;r.includePrerelease?e=bZ:e=mI}if(t.length===1&&t[0].semver===R_){if(r.includePrerelease)return!0;t=mI}let i=new Set,n,o;for(let g of e)g.operator===">"||g.operator===">="?n=gI(n,g,r):g.operator==="<"||g.operator==="<="?o=yI(o,g,r):i.add(g.semver);if(i.size>1)return null;let s;if(n&&o){if(s=O_(n.semver,o.semver,r),s>0)return null;if(s===0&&(n.operator!==">="||o.operator!=="<="))return null}for(let g of i){if(n&&!E_(g,String(n),r)||o&&!E_(g,String(o),r))return null;for(let h of t)if(!E_(g,String(h),r))return!1;return!0}let a,c,l,u,f=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,p=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1;f&&f.prerelease.length===1&&o.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let g of t){if(u=u||g.operator===">"||g.operator===">=",l=l||g.operator==="<"||g.operator==="<=",n){if(p&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===p.major&&g.semver.minor===p.minor&&g.semver.patch===p.patch&&(p=!1),g.operator===">"||g.operator===">="){if(a=gI(n,g,r),a===g&&a!==n)return!1}else if(n.operator===">="&&!g.test(n.semver))return!1}if(o){if(f&&g.semver.prerelease&&g.semver.prerelease.length&&g.semver.major===f.major&&g.semver.minor===f.minor&&g.semver.patch===f.patch&&(f=!1),g.operator==="<"||g.operator==="<="){if(c=yI(o,g,r),c===g&&c!==o)return!1}else if(o.operator==="<="&&!g.test(o.semver))return!1}if(!g.operator&&(o||n)&&s!==0)return!1}return!(n&&l&&!o&&s!==0||o&&u&&!n&&s!==0||p||f)},gI=(e,t,r)=>{if(!e)return t;let i=O_(e.semver,t.semver,r);return i>0?e:i<0||t.operator===">"&&e.operator===">="?t:e},yI=(e,t,r)=>{if(!e)return t;let i=O_(e.semver,t.semver,r);return i<0?e:i>0||t.operator==="<"&&e.operator==="<="?t:e};vI.exports=_Z});var $I=B((WCe,wI)=>{"use strict";var I_=ll(),bI=cl(),wZ=Sn(),SI=d_(),$Z=Ma(),RZ=BP(),EZ=ZP(),PZ=WP(),OZ=QP(),IZ=tO(),CZ=nO(),kZ=oO(),TZ=aO(),jZ=Hi(),AZ=dO(),NZ=pO(),xZ=yp(),MZ=yO(),qZ=_O(),LZ=Vu(),DZ=vp(),UZ=h_(),zZ=m_(),FZ=_p(),VZ=bp(),JZ=g_(),BZ=IO(),HZ=kO(),ZZ=Ju(),KZ=Zi(),GZ=Hu(),WZ=BO(),YZ=ZO(),XZ=GO(),QZ=XO(),e3=eI(),t3=$p(),r3=sI(),n3=cI(),i3=dI(),o3=pI(),s3=_I();wI.exports={parse:$Z,valid:RZ,clean:EZ,inc:PZ,diff:OZ,major:IZ,minor:CZ,patch:kZ,prerelease:TZ,compare:jZ,rcompare:AZ,compareLoose:NZ,compareBuild:xZ,sort:MZ,rsort:qZ,gt:LZ,lt:DZ,eq:UZ,neq:zZ,gte:FZ,lte:VZ,cmp:JZ,coerce:BZ,truncate:HZ,Comparator:ZZ,Range:KZ,satisfies:GZ,toComparators:WZ,maxSatisfying:YZ,minSatisfying:XZ,minVersion:QZ,validRange:e3,outside:t3,gtr:r3,ltr:n3,intersects:i3,simplifyRange:o3,subset:s3,SemVer:wZ,re:I_.re,src:I_.src,tokens:I_.t,SEMVER_SPEC_VERSION:bI.SEMVER_SPEC_VERSION,RELEASE_TYPES:bI.RELEASE_TYPES,compareIdentifiers:SI.compareIdentifiers,rcompareIdentifiers:SI.rcompareIdentifiers}});var pa=B((YCe,NI)=>{var qa=require("fs"),Ki=require("path"),EI=c_(),Gi=$I(),{DEFAULT_API_URL:a3}=fa(),PI=["dependencies","devDependencies","optionalDependencies","peerDependencies"];function C_(e){let t=typeof e=="string"&&e.match(/^((?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*)(?:@([^\r\n]+))?$/);if(!t)throw new Error(`Invalid npm dependency: ${String(e)}`);return{name:t[1],version:t[2]}}function k_(e){let t=new Map;for(let r of e){let{name:i,version:n}=C_(r),o=t.get(i);t.set(i,o&&n?OI(i,o,n):n||o)}return t}function OI(e,t,r){if(t===r)return t;let i=Gi.validRange(t),n=Gi.validRange(r);if(i&&n)try{if(Gi.subset(n,i))return r;if(Gi.subset(i,n))return t}catch{}throw new Error(`Conflicting registry versions for ${e}: ${t} and ${r}`)}function c3(e,t){let r=typeof e=="string"&&Gi.validRange(e),i=Gi.validRange(t);if(!r||!i)return!1;try{return Gi.subset(r,i)}catch{return!1}}function Ep(e,t){if(c3(e,t))return"satisfied";let r=typeof e=="string"&&Gi.validRange(e),i=Gi.validRange(t);if(!r||!i)return"incomparable";try{let n=Gi.minVersion(r),o=Gi.minVersion(i);return!n||!o?"incomparable":Gi.lt(n,o)?"lower":"newer"}catch{return"incomparable"}}function Rp(e,t){let r=PI.find(i=>Object.hasOwn(e[i]||{},t));return r?{section:r,existing:e[r][t]}:null}function II(e,t){let r=k_(t);if(r.size===0)return;let i=Ki.join(e,"package.json"),n=JSON.parse(qa.readFileSync(i,"utf8"));for(let[o,s]of r){let a=Rp(n,o),c=a?.section||"dependencies";n[c]||={};let l=a?.existing;n[c][o]=l===void 0?s||"latest":s&&Ep(l,s)==="lower"?s:l}qa.writeFileSync(i,`${JSON.stringify(n,null,2)}
3
3
  `)}function Pp(e){let t=[["pnpm-lock.yaml","pnpm"],["yarn.lock","yarn"],["bun.lock","bun"],["bun.lockb","bun"],["package-lock.json","npm"],["npm-shrinkwrap.json","npm"]];for(let r=Ki.resolve(e);;r=Ki.dirname(r)){let i=Ki.join(r,"package.json");if(qa.existsSync(i)){let n=JSON.parse(qa.readFileSync(i,"utf8")),o=String(n.packageManager||"").split("@")[0];if(["npm","pnpm","yarn","bun"].includes(o))return o}for(let[n,o]of t)if(qa.existsSync(Ki.join(r,n)))return o;if(Ki.dirname(r)===r)return"npm"}}var RI={npm:"npx",pnpm:"pnpm exec",yarn:"yarn",bun:"bunx"};function CI(e,t=process.cwd()){let r;try{r=Pp(t)}catch{r="npm"}return`${RI[r]||RI.npm} frontfriend ${e}`}function l3(e,t=process.cwd()){let r=null;try{r=e?new URL(e).origin:null}catch{r=null}return CI(r&&r!==new URL(a3).origin?`login --api-url ${r}`:"login",t)}function kI(e){return JSON.parse(qa.readFileSync(Ki.join(e,"package.json"),"utf8"))}function T_(e,t){let r=k_(t);if(r.size===0)return[];let i=kI(e),n=[];for(let[o,s]of r){let a=Rp(i,o);a&&(!s||Ep(a.existing,s)!=="lower")||n.push(s?`${o}@${s}`:o)}return n}function u3(e,t){let r=t.filter(f=>f.required),i=k_(r.flatMap(f=>f.dependencies)),n=(f,p)=>p.filter(g=>g.dependencies.some(h=>C_(h).name===f)).map(g=>g.component).filter(Boolean),o=t.filter(f=>!f.required);if(i.size===0&&o.length===0)return{missing:[],kept:[],repair:[]};let s=kI(e),a=[],c=[];for(let[f,p]of i){let g=Rp(s,f);if(!g){a.push(p?`${f}@${p}`:f);continue}if(!p)continue;let h=Ep(g.existing,p);h==="lower"?a.push(`${f}@${p}`):h!=="satisfied"&&c.push({name:f,current:g.existing,declared:p,components:n(f,r)})}let l=new Map;for(let f of o.flatMap(p=>p.dependencies)){let{name:p,version:g}=C_(f);if(i.has(p)||Rp(s,p))continue;let h=l.get(p),v=g||h?.version;if(h?.version&&g&&h.version!==g)try{v=OI(p,h.version,g)}catch{v=h.version}l.set(p,{version:v})}let u=[...l].map(([f,{version:p}])=>({request:p?`${f}@${p}`:f,components:n(f,o)}));return{missing:a,kept:c,repair:u}}function TI(e,t){return[e==="npm"?"install":"add",...t]}function d3(e){return/^[\w@/.:^~=+-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}function jI(e,t){let r=Pp(e);return[r,...TI(r,t)].map(d3).join(" ")}function AI(e,t,{stdio:r="inherit"}={}){let i=T_(e,t);if(i.length===0)return;let n=Pp(e),o=EI.sync(n,TI(n,i),{cwd:e,stdio:r});if(o.error||o.status!==0)throw II(e,t),o.error||new Error(`${n} dependency installation failed with status ${o.status}. Dependencies were saved; run ${n} install.`)}function f3(e,t,{install:r=!0,stdio:i="inherit",log:n=console.log}={}){let o=T_(e,t);if(o.length===0)return{missing:o,command:null,installed:!1};let s=jI(e,o);if(!r)return n(`\u{1F4E6} Component dependencies missing from package.json. Install them with:
4
4
  ${s}`),{missing:o,command:s,installed:!1};n(`\u{1F4E6} Installing component dependencies: ${s}`);try{return AI(e,o,{stdio:i}),{missing:o,command:s,installed:!0}}catch(a){return n(`\u26A0\uFE0F Component dependencies were not installed: ${a.message}
5
5
  Install them with: