@pat-lewczuk/cezar 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/claude-ui-mapper.d.ts +57 -0
- package/dist/core/claude-ui-mapper.js +370 -0
- package/dist/core/claude-ui-mapper.js.map +1 -0
- package/dist/core/codex-ui-mapper.d.ts +53 -0
- package/dist/core/codex-ui-mapper.js +411 -0
- package/dist/core/codex-ui-mapper.js.map +1 -0
- package/dist/core/opencode-ui-mapper.d.ts +105 -0
- package/dist/core/opencode-ui-mapper.js +578 -0
- package/dist/core/opencode-ui-mapper.js.map +1 -0
- package/dist/core/process-usage.d.ts +63 -0
- package/dist/core/process-usage.js +181 -0
- package/dist/core/process-usage.js.map +1 -0
- package/dist/core/tool-display.d.ts +27 -0
- package/dist/core/tool-display.js +150 -0
- package/dist/core/tool-display.js.map +1 -0
- package/dist/core/ui-events.d.ts +294 -0
- package/dist/core/ui-events.js +25 -0
- package/dist/core/ui-events.js.map +1 -0
- package/dist/index.js +0 -0
- package/dist/pack-check.d.ts +17 -0
- package/dist/pack-check.js +27 -0
- package/dist/pack-check.js.map +1 -0
- package/dist/runs/title-summary.d.ts +15 -0
- package/dist/runs/title-summary.js +84 -0
- package/dist/runs/title-summary.js.map +1 -0
- package/dist/runs/ui-event-sink.d.ts +81 -0
- package/dist/runs/ui-event-sink.js +210 -0
- package/dist/runs/ui-event-sink.js.map +1 -0
- package/dist/server/capabilities.d.ts +18 -0
- package/dist/server/capabilities.js +23 -0
- package/dist/server/capabilities.js.map +1 -0
- package/dist/server/forge/github.d.ts +39 -0
- package/dist/server/forge/github.js +369 -0
- package/dist/server/forge/github.js.map +1 -0
- package/dist/server/forge/index.d.ts +24 -0
- package/dist/server/forge/index.js +45 -0
- package/dist/server/forge/index.js.map +1 -0
- package/dist/server/forge/types.d.ts +80 -0
- package/dist/server/forge/types.js +2 -0
- package/dist/server/forge/types.js.map +1 -0
- package/dist/server/git-changes.d.ts +182 -0
- package/dist/server/git-changes.js +424 -0
- package/dist/server/git-changes.js.map +1 -0
- package/dist/server/open-in-app.d.ts +19 -0
- package/dist/server/open-in-app.js +134 -0
- package/dist/server/open-in-app.js.map +1 -0
- package/dist/server/static-ui.d.ts +49 -0
- package/dist/server/static-ui.js +92 -0
- package/dist/server/static-ui.js.map +1 -0
- package/dist/update-check.d.ts +12 -0
- package/dist/update-check.js +41 -0
- package/dist/update-check.js.map +1 -0
- package/package.json +1 -1
- package/web/app/node_modules/.vite/vitest/ca84d1343b96baa8137c943ed1860e522cacb238/results.json +1 -0
- package/web/app/src/components/app-shell-container.tsx +76 -0
- package/web/dist/assets/arrow-left-BE957rJs.js +1 -0
- package/web/dist/assets/bundle-mjs-DLPpRFyl.js +1 -0
- package/web/dist/assets/chunk-BO2N2NFS-f5igTtpB.js +131 -0
- package/web/dist/assets/compare-variants-D6fPL9cS.js +1 -0
- package/web/dist/assets/core-BuMqAF_1.js +12 -0
- package/web/dist/assets/css-BsVw1vtW.js +1 -0
- package/web/dist/assets/dialog-BEgEWFDS.js +1 -0
- package/web/dist/assets/diff-view-CctnJHWe.js +4 -0
- package/web/dist/assets/diff-woXpYk--.js +1 -0
- package/web/dist/assets/dist-CW7M_Jhs.js +1 -0
- package/web/dist/assets/ellipsis-vertical-DJPAfccS.js +1 -0
- package/web/dist/assets/engine-javascript-FQvzRocB.js +141 -0
- package/web/dist/assets/folder-RbRLfIX-.js +1 -0
- package/web/dist/assets/git-pull-request-DJkAMT0f.js +1 -0
- package/web/dist/assets/git-toolbar-D8OPPqBP.js +1 -0
- package/web/dist/assets/github-BYIHwIJB.js +1 -0
- package/web/dist/assets/go-rLFTqkRN.js +1 -0
- package/web/dist/assets/highlighted-body-OFNGDK62-DGHHie_q.js +1 -0
- package/web/dist/assets/highlighter-BKVEsACy.js +3 -0
- package/web/dist/assets/html-BY76lXLH.js +1 -0
- package/web/dist/assets/index-9qG98Orw.js +11 -0
- package/web/dist/assets/index-Bz_r8Jt3.css +2 -0
- package/web/dist/assets/input-BRsSo4xH.js +1 -0
- package/web/dist/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/web/dist/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/web/dist/assets/javascript-BgS3c2Ky.js +1 -0
- package/web/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/web/dist/assets/json-qhed-kSA.js +1 -0
- package/web/dist/assets/jsonc-CYpm1nAK.js +1 -0
- package/web/dist/assets/jsx-Bz0zcwM4.js +1 -0
- package/web/dist/assets/lib-CNGa3Dig.js +1 -0
- package/web/dist/assets/loader-circle-BV3DO9mE.js +1 -0
- package/web/dist/assets/markdown-BYOwaDjH.js +1 -0
- package/web/dist/assets/markdown-CR_HLGTs.js +1 -0
- package/web/dist/assets/mermaid-GHXKKRXX-DM2VsGBG.js +1 -0
- package/web/dist/assets/open-mercato-toBr6SOa.svg +11 -0
- package/web/dist/assets/python-gzcpVVnB.js +1 -0
- package/web/dist/assets/react-dom-Ddtik4qM.js +1 -0
- package/web/dist/assets/refresh-cw-DCa-Rlwz.js +1 -0
- package/web/dist/assets/repo-git-XTqlVOl2.js +1 -0
- package/web/dist/assets/run-diff-C7mfxj7f.js +3 -0
- package/web/dist/assets/run-header-CfVeY3uM.js +1 -0
- package/web/dist/assets/rust-Cfkwpbl8.js +1 -0
- package/web/dist/assets/search-x-CoCyl7zT.js +1 -0
- package/web/dist/assets/shellscript-CLZ0U2zV.js +1 -0
- package/web/dist/assets/skill-detail-C9cniyId.js +1 -0
- package/web/dist/assets/skills-DXgY1uXJ.js +1 -0
- package/web/dist/assets/skills-ynuO5oCr.js +1 -0
- package/web/dist/assets/sql-BsFa4tDR.js +1 -0
- package/web/dist/assets/square-terminal-B6PZX4Qp.js +1 -0
- package/web/dist/assets/tab-link-phWEqSBy.js +1 -0
- package/web/dist/assets/task-changes-DYwnPnTN.js +1 -0
- package/web/dist/assets/task-commits-DZzxEzbn.js +1 -0
- package/web/dist/assets/task-files-FOAAz2FB.js +2 -0
- package/web/dist/assets/task-thread-Bncxe8Os.js +5 -0
- package/web/dist/assets/toaster-BS2E1bhz.js +43 -0
- package/web/dist/assets/trash-2-CDtxmmc8.js +1 -0
- package/web/dist/assets/triangle-alert-6su4Js5O.js +1 -0
- package/web/dist/assets/tsx-udAQXfEw.js +1 -0
- package/web/dist/assets/typescript-bsJCZSQ-.js +1 -0
- package/web/dist/assets/upload-Bp7hQxll.js +1 -0
- package/web/dist/assets/use-desktop-eHm2iTXX.js +3 -0
- package/web/dist/assets/utils-rQGbOrwc.js +1 -0
- package/web/dist/assets/workflows-Dg2wQg6i.js +11 -0
- package/web/dist/assets/x-Br_jIDBw.js +1 -0
- package/web/dist/assets/yaml-rwi0_p6S.js +1 -0
- package/web/dist/index.html +67 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { accessSync, constants, existsSync } from 'node:fs';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { openInTerminal } from './open-in-terminal.js';
|
|
6
|
+
const EDITORS = [
|
|
7
|
+
{ id: 'vscode', label: 'VS Code', cli: 'code', mac: 'Visual Studio Code' },
|
|
8
|
+
{ id: 'cursor', label: 'Cursor', cli: 'cursor', mac: 'Cursor' },
|
|
9
|
+
{ id: 'zed', label: 'Zed', cli: 'zed', mac: 'Zed' },
|
|
10
|
+
{ id: 'windsurf', label: 'Windsurf', cli: 'windsurf', mac: 'Windsurf' },
|
|
11
|
+
{ id: 'sublime', label: 'Sublime Text', cli: 'subl', mac: 'Sublime Text' },
|
|
12
|
+
{ id: 'webstorm', label: 'WebStorm', cli: 'webstorm', mac: 'WebStorm' },
|
|
13
|
+
{ id: 'idea', label: 'IntelliJ IDEA', cli: 'idea', mac: 'IntelliJ IDEA' },
|
|
14
|
+
{ id: 'xcode', label: 'Xcode', mac: 'Xcode' },
|
|
15
|
+
{ id: 'warp', label: 'Warp', mac: 'Warp' },
|
|
16
|
+
];
|
|
17
|
+
const FILE_MANAGER_LABEL = process.platform === 'darwin' ? 'Finder' : process.platform === 'win32' ? 'Explorer' : 'Files';
|
|
18
|
+
/** Is `bin` an executable somewhere on PATH? Pure filesystem probe — no child process. */
|
|
19
|
+
function onPath(bin) {
|
|
20
|
+
const dirs = (process.env.PATH ?? '').split(process.platform === 'win32' ? ';' : ':');
|
|
21
|
+
const names = process.platform === 'win32' ? [bin, `${bin}.exe`, `${bin}.cmd`] : [bin];
|
|
22
|
+
for (const dir of dirs) {
|
|
23
|
+
if (!dir)
|
|
24
|
+
continue;
|
|
25
|
+
for (const name of names) {
|
|
26
|
+
try {
|
|
27
|
+
accessSync(join(dir, name), constants.X_OK);
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
// keep looking
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
/** macOS: is `<name>.app` installed in a standard Applications dir? */
|
|
38
|
+
function macAppExists(name) {
|
|
39
|
+
if (process.platform !== 'darwin')
|
|
40
|
+
return false;
|
|
41
|
+
return [
|
|
42
|
+
`/Applications/${name}.app`,
|
|
43
|
+
join(homedir(), 'Applications', `${name}.app`),
|
|
44
|
+
`/System/Applications/${name}.app`,
|
|
45
|
+
].some((p) => existsSync(p));
|
|
46
|
+
}
|
|
47
|
+
function editorAvailable(editor) {
|
|
48
|
+
if (editor.cli && onPath(editor.cli))
|
|
49
|
+
return true;
|
|
50
|
+
if (editor.mac && macAppExists(editor.mac))
|
|
51
|
+
return true;
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
/** Coding-agent CLIs a session can be handed off to (#cli-handoff). Selecting one opens a
|
|
55
|
+
* terminal that resumes THIS run's session when the runner matches, or launches a fresh CLI in
|
|
56
|
+
* the worktree otherwise. The actual command is built server-side (needs the run's session). */
|
|
57
|
+
const AGENT_CLIS = [
|
|
58
|
+
{ runner: 'claude', label: 'Claude CLI', bin: 'claude', envBin: process.env.CEZ_CLAUDE_BIN },
|
|
59
|
+
{ runner: 'codex', label: 'Codex CLI', bin: 'codex', envBin: process.env.CEZ_CODEX_BIN },
|
|
60
|
+
{ runner: 'opencode', label: 'OpenCode', bin: 'opencode', envBin: process.env.CEZ_OPENCODE_BIN },
|
|
61
|
+
];
|
|
62
|
+
/** The runner behind a `cli:<runner>` open target, or null when the id isn't a CLI handoff. */
|
|
63
|
+
export function agentCliRunner(targetId) {
|
|
64
|
+
const match = AGENT_CLIS.find((c) => `cli:${c.runner}` === targetId);
|
|
65
|
+
return match ? match.runner : null;
|
|
66
|
+
}
|
|
67
|
+
/** The open targets available on this machine: the file manager, a terminal, every detected
|
|
68
|
+
* editor, and every installed coding-agent CLI. Order is stable so the menu never reshuffles. */
|
|
69
|
+
export function detectOpenTargets() {
|
|
70
|
+
const targets = [
|
|
71
|
+
{ id: 'finder', label: FILE_MANAGER_LABEL },
|
|
72
|
+
{ id: 'terminal', label: 'Terminal' },
|
|
73
|
+
];
|
|
74
|
+
for (const editor of EDITORS) {
|
|
75
|
+
if (editorAvailable(editor))
|
|
76
|
+
targets.push({ id: editor.id, label: editor.label });
|
|
77
|
+
}
|
|
78
|
+
for (const cli of AGENT_CLIS) {
|
|
79
|
+
if ((cli.envBin && existsSync(cli.envBin)) || onPath(cli.bin)) {
|
|
80
|
+
targets.push({ id: `cli:${cli.runner}`, label: cli.label });
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return targets;
|
|
84
|
+
}
|
|
85
|
+
/** Open `dir` in the file manager, natively per platform. */
|
|
86
|
+
async function openFileManager(dir) {
|
|
87
|
+
if (process.platform === 'darwin')
|
|
88
|
+
return runDetached('open', [dir]);
|
|
89
|
+
if (process.platform === 'win32')
|
|
90
|
+
return runDetached('explorer', [dir]);
|
|
91
|
+
return runDetached('xdg-open', [dir]);
|
|
92
|
+
}
|
|
93
|
+
/** Open `dir` in the given target. Unknown/unavailable target → false (the caller 409s). */
|
|
94
|
+
export async function openInApp(targetId, dir) {
|
|
95
|
+
if (targetId === 'finder')
|
|
96
|
+
return openFileManager(dir);
|
|
97
|
+
// A bare interactive shell at the worktree — `:` is a no-op so no command actually runs.
|
|
98
|
+
if (targetId === 'terminal')
|
|
99
|
+
return openInTerminal(dir, ':');
|
|
100
|
+
const editor = EDITORS.find((e) => e.id === targetId);
|
|
101
|
+
if (!editor)
|
|
102
|
+
return false;
|
|
103
|
+
if (editor.cli && onPath(editor.cli))
|
|
104
|
+
return runDetached(editor.cli, [dir]);
|
|
105
|
+
if (editor.mac && macAppExists(editor.mac))
|
|
106
|
+
return runDetached('open', ['-a', editor.mac, dir]);
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
/** Spawn detached; success = no error within a short settle window (mirrors open-in-terminal). */
|
|
110
|
+
function runDetached(bin, args) {
|
|
111
|
+
return new Promise((resolve) => {
|
|
112
|
+
let child;
|
|
113
|
+
try {
|
|
114
|
+
child = spawn(bin, args, { stdio: 'ignore', detached: true });
|
|
115
|
+
}
|
|
116
|
+
catch {
|
|
117
|
+
resolve(false);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
let settled = false;
|
|
121
|
+
const settle = (ok) => {
|
|
122
|
+
if (settled)
|
|
123
|
+
return;
|
|
124
|
+
settled = true;
|
|
125
|
+
resolve(ok);
|
|
126
|
+
};
|
|
127
|
+
child.once('error', () => settle(false));
|
|
128
|
+
setTimeout(() => {
|
|
129
|
+
child.unref();
|
|
130
|
+
settle(true);
|
|
131
|
+
}, 250);
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=open-in-app.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"open-in-app.js","sourceRoot":"","sources":["../../src/server/open-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M,CAAC,KAAK,CAAC,CAAC,CAAC;QACzC,UAAU,CAAC,GAAG,EAAE;YACd,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,MAAM,CAAC,IAAI,CAAC,CAAC;QACf,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** Which browser UI a request for `/` gets.
|
|
2
|
+
*
|
|
3
|
+
* The React cockpit built to `web/dist` is the only web UI — the legacy
|
|
4
|
+
* vanilla page (`web/app.js` + friends) was deleted in phase R7 of the spec
|
|
5
|
+
* `.ai/specs/2026-07-14-cockpit-ui-redesign.md`. A checkout without a build
|
|
6
|
+
* gets a small built-in hint page (`build-hint`), never a 404.
|
|
7
|
+
*/
|
|
8
|
+
export type IndexTarget = 'dist' | 'build-hint';
|
|
9
|
+
/** Pick the response for `/`, given whether the build exists.
|
|
10
|
+
*
|
|
11
|
+
* The published tarball always ships `web/dist`, so `build-hint` is a dev-only
|
|
12
|
+
* state (a fresh checkout that never ran `npm run build:web`) — the spec's
|
|
13
|
+
* degradation matrix answers it with a plain "run the build" page.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveIndexHtml(opts: {
|
|
16
|
+
distExists: boolean;
|
|
17
|
+
}): IndexTarget;
|
|
18
|
+
/** `passthrough` = not the SPA's to answer: `/api/*` keeps its JSON/SSE behavior
|
|
19
|
+
* and its own 404s, and the files with dedicated static routes keep being
|
|
20
|
+
* served by them. */
|
|
21
|
+
export type GetTarget = IndexTarget | 'passthrough';
|
|
22
|
+
/** Decide what any GET gets, so every route in the spec's map (`/tasks/:id/changes`,
|
|
23
|
+
* `/settings/skills`, …) cold-loads and survives a refresh — that is what makes a
|
|
24
|
+
* cockpit URL pasteable.
|
|
25
|
+
*
|
|
26
|
+
* Unknown paths deliberately resolve to the shell, not a 404: react-router owns
|
|
27
|
+
* the 404 (it is the only side that knows the route map). Everything the server
|
|
28
|
+
* itself owns — `/api/*` and the static files above — passes through untouched.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveGetRequest(opts: {
|
|
31
|
+
path: string;
|
|
32
|
+
distExists: boolean;
|
|
33
|
+
}): GetTarget;
|
|
34
|
+
/** The dev fallback page served for every shell route when `web/dist` is
|
|
35
|
+
* missing (spec degradation matrix: "run `npm run dev:web` or
|
|
36
|
+
* `npm run build:web`"). Built into the server so it needs no files on disk. */
|
|
37
|
+
export declare const BUILD_HINT_HTML = "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>cezar \u2014 build the cockpit</title>\n<style>\n body { margin: 0; display: grid; place-items: center; min-height: 100dvh;\n font: 15px/1.6 system-ui, sans-serif; background: #101014; color: #e8e8ea; }\n main { max-width: 34rem; padding: 2rem; }\n code { font-family: ui-monospace, monospace; background: #1c1c22; border-radius: 6px; padding: 2px 6px; }\n p { color: #a0a0aa; }\n</style>\n</head>\n<body>\n<main>\n <h1>The cockpit isn’t built yet</h1>\n <p>This checkout has no <code>web/dist</code>. Run <code>npm run build:web</code>\n and reload \u2014 or use <code>npm run dev:web</code> for the live dev server.</p>\n</main>\n</body>\n</html>\n";
|
|
38
|
+
/** True only for a plain filename the `/assets/:file` route may serve.
|
|
39
|
+
*
|
|
40
|
+
* `basename` alone is not a guard here: `basename('..')` is `'..'`, which
|
|
41
|
+
* joins back to the assets dir itself and turns the route's `readFileSync`
|
|
42
|
+
* into an EISDIR crash (a 500) instead of a 404. Dot-segments, separators,
|
|
43
|
+
* and NUL all mean "not a file we ship" — the caller answers 404. */
|
|
44
|
+
export declare function isSafeAssetFilename(file: string): boolean;
|
|
45
|
+
/** Content type for a hashed file under `web/dist/assets/`. */
|
|
46
|
+
export declare function assetContentType(file: string): string;
|
|
47
|
+
/** Vite fingerprints every filename under `assets/`, so the bytes behind a URL
|
|
48
|
+
* can never change — cache them for a year. */
|
|
49
|
+
export declare const ASSET_CACHE_CONTROL = "public, max-age=31536000, immutable";
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/** Pick the response for `/`, given whether the build exists.
|
|
2
|
+
*
|
|
3
|
+
* The published tarball always ships `web/dist`, so `build-hint` is a dev-only
|
|
4
|
+
* state (a fresh checkout that never ran `npm run build:web`) — the spec's
|
|
5
|
+
* degradation matrix answers it with a plain "run the build" page.
|
|
6
|
+
*/
|
|
7
|
+
export function resolveIndexHtml(opts) {
|
|
8
|
+
return opts.distExists ? 'dist' : 'build-hint';
|
|
9
|
+
}
|
|
10
|
+
/** Paths owned by routes registered before the catch-all: the built app's
|
|
11
|
+
* hashed bundles and the favicon. */
|
|
12
|
+
function isStaticAsset(path) {
|
|
13
|
+
return path.startsWith('/assets/') || path === '/open-mercato.svg';
|
|
14
|
+
}
|
|
15
|
+
/** Decide what any GET gets, so every route in the spec's map (`/tasks/:id/changes`,
|
|
16
|
+
* `/settings/skills`, …) cold-loads and survives a refresh — that is what makes a
|
|
17
|
+
* cockpit URL pasteable.
|
|
18
|
+
*
|
|
19
|
+
* Unknown paths deliberately resolve to the shell, not a 404: react-router owns
|
|
20
|
+
* the 404 (it is the only side that knows the route map). Everything the server
|
|
21
|
+
* itself owns — `/api/*` and the static files above — passes through untouched.
|
|
22
|
+
*/
|
|
23
|
+
export function resolveGetRequest(opts) {
|
|
24
|
+
const { path, distExists } = opts;
|
|
25
|
+
if (path === '/api' || path.startsWith('/api/') || isStaticAsset(path)) {
|
|
26
|
+
return 'passthrough';
|
|
27
|
+
}
|
|
28
|
+
return resolveIndexHtml({ distExists });
|
|
29
|
+
}
|
|
30
|
+
/** The dev fallback page served for every shell route when `web/dist` is
|
|
31
|
+
* missing (spec degradation matrix: "run `npm run dev:web` or
|
|
32
|
+
* `npm run build:web`"). Built into the server so it needs no files on disk. */
|
|
33
|
+
export const BUILD_HINT_HTML = `<!doctype html>
|
|
34
|
+
<html lang="en">
|
|
35
|
+
<head>
|
|
36
|
+
<meta charset="utf-8">
|
|
37
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
38
|
+
<title>cezar — build the cockpit</title>
|
|
39
|
+
<style>
|
|
40
|
+
body { margin: 0; display: grid; place-items: center; min-height: 100dvh;
|
|
41
|
+
font: 15px/1.6 system-ui, sans-serif; background: #101014; color: #e8e8ea; }
|
|
42
|
+
main { max-width: 34rem; padding: 2rem; }
|
|
43
|
+
code { font-family: ui-monospace, monospace; background: #1c1c22; border-radius: 6px; padding: 2px 6px; }
|
|
44
|
+
p { color: #a0a0aa; }
|
|
45
|
+
</style>
|
|
46
|
+
</head>
|
|
47
|
+
<body>
|
|
48
|
+
<main>
|
|
49
|
+
<h1>The cockpit isn’t built yet</h1>
|
|
50
|
+
<p>This checkout has no <code>web/dist</code>. Run <code>npm run build:web</code>
|
|
51
|
+
and reload — or use <code>npm run dev:web</code> for the live dev server.</p>
|
|
52
|
+
</main>
|
|
53
|
+
</body>
|
|
54
|
+
</html>
|
|
55
|
+
`;
|
|
56
|
+
const ASSET_TYPES = {
|
|
57
|
+
js: 'text/javascript; charset=utf-8',
|
|
58
|
+
css: 'text/css; charset=utf-8',
|
|
59
|
+
svg: 'image/svg+xml',
|
|
60
|
+
woff2: 'font/woff2',
|
|
61
|
+
woff: 'font/woff',
|
|
62
|
+
png: 'image/png',
|
|
63
|
+
jpg: 'image/jpeg',
|
|
64
|
+
jpeg: 'image/jpeg',
|
|
65
|
+
gif: 'image/gif',
|
|
66
|
+
webp: 'image/webp',
|
|
67
|
+
ico: 'image/x-icon',
|
|
68
|
+
json: 'application/json; charset=utf-8',
|
|
69
|
+
map: 'application/json; charset=utf-8',
|
|
70
|
+
};
|
|
71
|
+
/** True only for a plain filename the `/assets/:file` route may serve.
|
|
72
|
+
*
|
|
73
|
+
* `basename` alone is not a guard here: `basename('..')` is `'..'`, which
|
|
74
|
+
* joins back to the assets dir itself and turns the route's `readFileSync`
|
|
75
|
+
* into an EISDIR crash (a 500) instead of a 404. Dot-segments, separators,
|
|
76
|
+
* and NUL all mean "not a file we ship" — the caller answers 404. */
|
|
77
|
+
export function isSafeAssetFilename(file) {
|
|
78
|
+
return (file.length > 0 &&
|
|
79
|
+
file !== '.' &&
|
|
80
|
+
file !== '..' &&
|
|
81
|
+
!file.includes('/') &&
|
|
82
|
+
!file.includes('\\') &&
|
|
83
|
+
!file.includes('\0'));
|
|
84
|
+
}
|
|
85
|
+
/** Content type for a hashed file under `web/dist/assets/`. */
|
|
86
|
+
export function assetContentType(file) {
|
|
87
|
+
return ASSET_TYPES[file.split('.').pop()?.toLowerCase() ?? ''] ?? 'application/octet-stream';
|
|
88
|
+
}
|
|
89
|
+
/** Vite fingerprints every filename under `assets/`, so the bytes behind a URL
|
|
90
|
+
* can never change — cache them for a year. */
|
|
91
|
+
export const ASSET_CACHE_CONTROL = 'public, max-age=31536000, immutable';
|
|
92
|
+
//# sourceMappingURL=static-ui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-ui.js","sourceRoot":"","sources":["../../src/server/static-ui.ts"],"names":[],"mappings":"AASA;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAA6B;IAC5D,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC;AACjD,CAAC;AAOD;sCACsC;AACtC,SAAS,aAAa,CAAC,IAAY;IACjC,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,IAAI,KAAK,mBAAmB,CAAC;AACrE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAA2C;IAC3E,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAClC,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC;QACvE,OAAO,aAAa,CAAC;IACvB,CAAC;IACD,OAAO,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;AAC1C,CAAC;AAED;;iFAEiF;AACjF,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsB9B,CAAC;AAEF,MAAM,WAAW,GAA2B;IAC1C,EAAE,EAAE,gCAAgC;IACpC,GAAG,EAAE,yBAAyB;IAC9B,GAAG,EAAE,eAAe;IACpB,KAAK,EAAE,YAAY;IACnB,IAAI,EAAE,WAAW;IACjB,GAAG,EAAE,WAAW;IAChB,GAAG,EAAE,YAAY;IACjB,IAAI,EAAE,YAAY;IAClB,GAAG,EAAE,WAAW;IAChB,IAAI,EAAE,YAAY;IAClB,GAAG,EAAE,cAAc;IACnB,IAAI,EAAE,iCAAiC;IACvC,GAAG,EAAE,iCAAiC;CACvC,CAAC;AAEF;;;;;sEAKsE;AACtE,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,CACL,IAAI,CAAC,MAAM,GAAG,CAAC;QACf,IAAI,KAAK,GAAG;QACZ,IAAI,KAAK,IAAI;QACb,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QACnB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;QACpB,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CACrB,CAAC;AACJ,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,IAAI,0BAA0B,CAAC;AAC/F,CAAC;AAED;gDACgD;AAChD,MAAM,CAAC,MAAM,mBAAmB,GAAG,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update discovery (#368): a best-effort, fire-and-forget check against the
|
|
3
|
+
* npm registry so the cockpit can tell the user a newer cezar exists — the
|
|
4
|
+
* root cause behind most "bug already fixed" reports is `npx` happily reusing
|
|
5
|
+
* a stale cached version forever. Silent on any failure: offline, slow
|
|
6
|
+
* registry or a weird payload must never affect startup.
|
|
7
|
+
*/
|
|
8
|
+
/** Newest published version when it's newer than `current`, else null. */
|
|
9
|
+
export declare function checkForUpdate(pkgName: string, current: string): Promise<string | null>;
|
|
10
|
+
/** Plain numeric semver compare (`1.2.10` > `1.2.9`); pre-release tags and
|
|
11
|
+
* anything unparseable compare as 0 — good enough for release-only publishes. */
|
|
12
|
+
export declare function isNewerVersion(candidate: string, current: string): boolean;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update discovery (#368): a best-effort, fire-and-forget check against the
|
|
3
|
+
* npm registry so the cockpit can tell the user a newer cezar exists — the
|
|
4
|
+
* root cause behind most "bug already fixed" reports is `npx` happily reusing
|
|
5
|
+
* a stale cached version forever. Silent on any failure: offline, slow
|
|
6
|
+
* registry or a weird payload must never affect startup.
|
|
7
|
+
*/
|
|
8
|
+
const REGISTRY_TIMEOUT_MS = 3_000;
|
|
9
|
+
/** Newest published version when it's newer than `current`, else null. */
|
|
10
|
+
export async function checkForUpdate(pkgName, current) {
|
|
11
|
+
try {
|
|
12
|
+
const res = await fetch(`https://registry.npmjs.org/${encodeURIComponent(pkgName)}/latest`, {
|
|
13
|
+
signal: AbortSignal.timeout(REGISTRY_TIMEOUT_MS),
|
|
14
|
+
});
|
|
15
|
+
if (!res.ok)
|
|
16
|
+
return null;
|
|
17
|
+
const data = (await res.json());
|
|
18
|
+
const latest = typeof data.version === 'string' ? data.version : null;
|
|
19
|
+
return latest && isNewerVersion(latest, current) ? latest : null;
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/** Plain numeric semver compare (`1.2.10` > `1.2.9`); pre-release tags and
|
|
26
|
+
* anything unparseable compare as 0 — good enough for release-only publishes. */
|
|
27
|
+
export function isNewerVersion(candidate, current) {
|
|
28
|
+
const parse = (v) => v
|
|
29
|
+
.split('.')
|
|
30
|
+
.slice(0, 3)
|
|
31
|
+
.map((part) => Number.parseInt(part, 10) || 0);
|
|
32
|
+
const a = parse(candidate);
|
|
33
|
+
const b = parse(current);
|
|
34
|
+
for (let i = 0; i < 3; i++) {
|
|
35
|
+
const diff = (a[i] ?? 0) - (b[i] ?? 0);
|
|
36
|
+
if (diff !== 0)
|
|
37
|
+
return diff > 0;
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=update-check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-check.js","sourceRoot":"","sources":["../src/update-check.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAElC,0EAA0E;AAC1E,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAAe,EAAE,OAAe;IACnE,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,8BAA8B,kBAAkB,CAAC,OAAO,CAAC,SAAS,EAAE;YAC1F,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,mBAAmB,CAAC;SACjD,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,IAAI,CAAC;QACzB,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAA0B,CAAC;QACzD,MAAM,MAAM,GAAG,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;QACtE,OAAO,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACnE,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;kFACkF;AAClF,MAAM,UAAU,cAAc,CAAC,SAAiB,EAAE,OAAe;IAC/D,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAC1B,CAAC;SACE,KAAK,CAAC,GAAG,CAAC;SACV,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;SACX,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,MAAM,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;IAC3B,MAAM,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;IACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QACvC,IAAI,IAAI,KAAK,CAAC;YAAE,OAAO,IAAI,GAAG,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pat-lewczuk/cezar",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Local cockpit for running and tracking AI agent tasks in your repo. Uses your logged-in `claude` CLI and `gh` — zero config, zero database.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
package/web/app/node_modules/.vite/vitest/ca84d1343b96baa8137c943ed1860e522cacb238/results.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"4.1.10","results":[["web:src/components/diff/diff.test.tsx",{"duration":284.488375,"failed":false}],["web:src/routes/repo-git/repo-git.test.tsx",{"duration":290.943041,"failed":false}],["web:src/routes/github/github.test.tsx",{"duration":446.789167,"failed":false}]]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
import { useHealth, useTodos } from '@/api/queries'
|
|
4
|
+
import type { HealthResponse } from '@/api/types'
|
|
5
|
+
import { AppShell, type RepoChip } from '@/components/app-shell'
|
|
6
|
+
import { CommandPalette } from '@/components/command-palette'
|
|
7
|
+
import { ListViewProvider } from '@/components/list-view'
|
|
8
|
+
import { TaskQuickListContainer } from '@/components/task-quick-list'
|
|
9
|
+
import { ToolsMenu } from '@/components/tools-menu'
|
|
10
|
+
import { visibleTodos } from '@/routes/inbox'
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Derive the sidebar's repo chip from `/api/health`.
|
|
14
|
+
*
|
|
15
|
+
* Null — the chip renders nothing — whenever there is nothing true to say: health hasn't
|
|
16
|
+
* answered yet, or cezar is running outside a git repository (`repo: null`), which is a
|
|
17
|
+
* supported way to run it. An empty chip is honest; "loading…" or a guessed folder name is not.
|
|
18
|
+
*
|
|
19
|
+
* The name is the repo root's basename: `/home/me/Projects/cezar` → `cezar`. Both separators,
|
|
20
|
+
* because the server sends whatever path git gave it, and a trailing one is stripped first so
|
|
21
|
+
* `/repo/` doesn't chip as an empty string.
|
|
22
|
+
*/
|
|
23
|
+
export function repoChipOf(health: HealthResponse | undefined): RepoChip | null {
|
|
24
|
+
const repo = health?.repo
|
|
25
|
+
if (!repo) return null
|
|
26
|
+
const name = repo.root.replace(/[\\/]+$/, '').split(/[\\/]/).pop()
|
|
27
|
+
if (!name) return null
|
|
28
|
+
return { name, branch: repo.branch }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The app shell, wired to live data.
|
|
33
|
+
*
|
|
34
|
+
* AppShell itself stays presentational — it takes repo/version/inboxCount and renders them, or
|
|
35
|
+
* renders nothing. This is the seam where those become real: `useHealth()` for the repo and
|
|
36
|
+
* version chips, `useTodos()` for the inbox badge.
|
|
37
|
+
*
|
|
38
|
+
* Nothing here caches boot-time values (#369: the legacy UI read the branch once at startup and
|
|
39
|
+
* then showed a stale branch forever). The chips read whatever is currently in the health query,
|
|
40
|
+
* so making them live is Step 3.2's job of invalidating that query — not a change here.
|
|
41
|
+
*/
|
|
42
|
+
export function AppShellContainer({ children }: { children: ReactNode }) {
|
|
43
|
+
const health = useHealth()
|
|
44
|
+
const todos = useTodos()
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
// The Active/Archived filter is shared by the quick-list below and the Tasks table (Step 3.4),
|
|
48
|
+
// which renders in `children`. The provider goes here because this is the lowest node that has
|
|
49
|
+
// both of them under it — the spec requires the two sets of tabs to be one filter.
|
|
50
|
+
<ListViewProvider>
|
|
51
|
+
<AppShell
|
|
52
|
+
repo={repoChipOf(health.data)}
|
|
53
|
+
version={health.data?.version ?? null}
|
|
54
|
+
latestVersion={health.data?.latestVersion ?? null}
|
|
55
|
+
// `?? null` rather than `?? 0`: no badge while the inbox is unknown, and no badge when it
|
|
56
|
+
// is known to be empty — AppShell renders neither for a falsy count.
|
|
57
|
+
//
|
|
58
|
+
// `visibleTodos()` — not raw `.length` — so the badge counts exactly the cards the
|
|
59
|
+
// inbox route shows: started entries (`startedTaskId`) are the audit trail, not the
|
|
60
|
+
// inbox (#396-style disagreement where the badge read 5 but the page listed 3).
|
|
61
|
+
inboxCount={todos.data ? visibleTodos(todos.data).length : null}
|
|
62
|
+
// Hidden until health confirms the forge driver (R6 Step 1.1) — same honesty rule as
|
|
63
|
+
// the chips: the nav must not claim a GitHub tab it cannot back. The Tools menu's
|
|
64
|
+
// forge note says why it is absent.
|
|
65
|
+
forgeAvailable={health.data?.forge?.available === true}
|
|
66
|
+
taskQuickList={<TaskQuickListContainer />}
|
|
67
|
+
toolsMenu={<ToolsMenu health={health.data} />}
|
|
68
|
+
>
|
|
69
|
+
{children}
|
|
70
|
+
</AppShell>
|
|
71
|
+
{/* Global chrome, not a route: ⌘K must work on every URL. Mounted here (not in AppShell)
|
|
72
|
+
because it needs the query client and router this container already assumes. */}
|
|
73
|
+
<CommandPalette />
|
|
74
|
+
</ListViewProvider>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./utils-rQGbOrwc.js";var t=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray;function S(){}var C={H:null,A:null,T:null,S:null},w=Object.prototype.hasOwnProperty;function T(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function E(e,t){return T(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g;function k(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function A(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(S,S):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+k(e,0):a,x(o)?(i=``,c!=null&&(i=c.replace(O,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(O,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(x(e))for(var u=0;u<e.length;u++)a=e[u],s=l+k(a,u),c+=j(a,r,i,s,o);else if(u=p(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+k(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(A(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ne(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var N=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},re={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=ee,e.Children=re,e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=h({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!w.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return T(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)w.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return T(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ne}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=C.T,n={};C.T=n;try{var r=e(),i=C.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(S,N)}catch(e){N(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}},e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},e.use=function(e){return C.H.use(e)},e.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},e.useCallback=function(e,t){return C.H.useCallback(e,t)},e.useContext=function(e){return C.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return C.H.useEffect(e,t)},e.useEffectEvent=function(e){return C.H.useEffectEvent(e)},e.useId=function(){return C.H.useId()},e.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return C.H.useMemo(e,t)},e.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},e.useRef=function(e){return C.H.useRef(e)},e.useState=function(e){return C.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return C.H.useTransition()},e.version=`19.2.7`})),d=o(((e,t)=>{t.exports=u()})),ee=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),f=o(((e,t)=>{t.exports=ee()})),p=`modulepreload`,m=function(e){return`/`+e},h={},g=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=m(t,n),t=s(t),t in h)return;h[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:p,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function _(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function v(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_(e))&&(r&&(r+=` `),r+=t);return r}var y=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},b=(e,t)=>({classGroupId:e,validator:t}),x=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),S=`-`,C=[],w=`arbitrary..`,T=e=>{let t=te(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return D(e);let n=e.split(S);return E(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?y(i,t):t:i||C}return n[e]||C}}},E=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=E(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(S):e.slice(t).join(S),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},D=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?w+r:void 0})(),te=e=>{let{theme:t,classGroups:n}=e;return O(n,t)},O=(e,t)=>{let n=x();for(let r in e){let i=e[r];k(i,n,r,t)}return n},k=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];A(i,t,n,r)}},A=(e,t,n,r)=>{if(typeof e==`string`){j(e,t,n);return}if(typeof e==`function`){M(e,t,n,r);return}ne(e,t,n,r)},j=(e,t,n)=>{let r=e===``?t:N(t,e);r.classGroupId=n},M=(e,t,n,r)=>{if(re(e)){k(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(b(n,e))},ne=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];k(o,N(t,a),n,r)}},N=(e,t)=>{let n=e,r=t.split(S),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=x(),n.nextPart.set(t,i)),n=i}return n},re=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,ie=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},ae=`!`,P=`:`,F=[],I=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),L=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===P){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(ae)?(c=s.slice(0,-1),l=!0):s.startsWith(ae)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return I(t,l,c,u)};if(t){let e=t+P,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):I(F,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},oe=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},R=e=>({cache:ie(e.cacheSize),parseClassName:L(e),sortModifiers:oe(e),postfixLookupClassGroupIds:se(e),...T(e)}),se=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},z=/\s+/,B=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(z),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:ee,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let m=!!p,h;if(m){h=r(f.substring(0,p));let e=h&&o[h]?r(f):void 0;e&&e!==h&&(h=e,m=!1)}else h=r(f);if(!h){if(!m){l=t+(l.length>0?` `+l:l);continue}if(h=r(f),!h){l=t+(l.length>0?` `+l:l);continue}m=!1}let g=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),_=ee?g+ae:g,v=_+h;if(s.indexOf(v)>-1)continue;s.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];s.push(_+t)}l=t+(l.length>0?` `+l:l)}return l},ce=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=V(n))&&(i&&(i+=` `),i+=r);return i},V=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=V(e[r]))&&(n&&(n+=` `),n+=t);return n},le=(e,...t)=>{let n,r,i,a,o=o=>(n=R(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=B(e,n);return i(e,a),a};return a=o,(...e)=>a(ce(...e))},ue=[],H=e=>{let t=t=>t[e]||ue;return t.isThemeGetter=!0,t},de=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,me=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,he=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ge=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,U=e=>pe.test(e),W=e=>!!e&&!Number.isNaN(Number(e)),G=e=>!!e&&Number.isInteger(Number(e)),ye=e=>e.endsWith(`%`)&&W(e.slice(0,-1)),K=e=>me.test(e),be=()=>!0,xe=e=>he.test(e)&&!ge.test(e),Se=()=>!1,Ce=e=>_e.test(e),we=e=>ve.test(e),Te=e=>!q(e)&&!Y(e),Ee=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),De=e=>Z(e,He,Se),q=e=>de.test(e),J=e=>Z(e,Ue,xe),Oe=e=>Z(e,We,W),ke=e=>Z(e,Ke,be),Ae=e=>Z(e,Ge,Se),je=e=>Z(e,Be,Se),Me=e=>Z(e,Ve,we),Ne=e=>Z(e,qe,Ce),Y=e=>fe.test(e),X=e=>Q(e,Ue),Pe=e=>Q(e,Ge),Fe=e=>Q(e,Be),Ie=e=>Q(e,He),Le=e=>Q(e,Ve),Re=e=>Q(e,qe,!0),ze=e=>Q(e,Ke,!0),Z=(e,t,n)=>{let r=de.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Q=(e,t,n=!1)=>{let r=fe.exec(e);return r?r[1]?t(r[1]):n:!1},Be=e=>e===`position`||e===`percentage`,Ve=e=>e===`image`||e===`url`,He=e=>e===`length`||e===`size`||e===`bg-size`,Ue=e=>e===`length`,We=e=>e===`number`,Ge=e=>e===`family-name`,Ke=e=>e===`number`||e===`weight`,qe=e=>e===`shadow`,Je=()=>{let e=H(`color`),t=H(`font`),n=H(`text`),r=H(`font-weight`),i=H(`tracking`),a=H(`leading`),o=H(`breakpoint`),s=H(`container`),c=H(`spacing`),l=H(`radius`),u=H(`shadow`),d=H(`inset-shadow`),ee=H(`text-shadow`),f=H(`drop-shadow`),p=H(`blur`),m=H(`perspective`),h=H(`aspect`),g=H(`ease`),_=H(`animate`),v=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],y=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],b=()=>[...y(),Y,q],x=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],S=()=>[`auto`,`contain`,`none`],C=()=>[Y,q,c],w=()=>[U,`full`,`auto`,...C()],T=()=>[G,`none`,`subgrid`,Y,q],E=()=>[`auto`,{span:[`full`,G,Y,q]},G,Y,q],D=()=>[G,`auto`,Y,q],te=()=>[`auto`,`min`,`max`,`fr`,Y,q],O=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...C()],j=()=>[U,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...C()],M=()=>[U,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...C()],ne=()=>[U,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...C()],N=()=>[e,Y,q],re=()=>[...y(),Fe,je,{position:[Y,q]}],ie=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,Ie,De,{size:[Y,q]}],P=()=>[ye,X,J],F=()=>[``,`none`,`full`,l,Y,q],I=()=>[``,W,X,J],L=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],R=()=>[W,ye,Fe,je],se=()=>[``,`none`,p,Y,q],z=()=>[`none`,W,Y,q],B=()=>[`none`,W,Y,q],ce=()=>[W,Y,q],V=()=>[U,`full`,...C()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[K],breakpoint:[K],color:[be],container:[K],"drop-shadow":[K],ease:[`in`,`out`,`in-out`],font:[Te],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[K],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[K],shadow:[K],spacing:[`px`,W],text:[K],"text-shadow":[K],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,U,q,Y,h]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Y,q]}],"container-named":[Ee],columns:[{columns:[W,q,Y,s]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:b()}],overflow:[{overflow:x()}],"overflow-x":[{"overflow-x":x()}],"overflow-y":[{"overflow-y":x()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[G,`auto`,Y,q]}],basis:[{basis:[U,`full`,`auto`,s,...C()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[W,U,`auto`,`initial`,`none`,q]}],grow:[{grow:[``,W,Y,q]}],shrink:[{shrink:[``,W,Y,q]}],order:[{order:[G,`first`,`last`,`none`,Y,q]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...O(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...O()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":C()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":C()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...M()]}],"min-inline-size":[{"min-inline":[`auto`,...M()]}],"max-inline-size":[{"max-inline":[`none`,...M()]}],"block-size":[{block:[`auto`,...ne()]}],"min-block-size":[{"min-block":[`auto`,...ne()]}],"max-block-size":[{"max-block":[`none`,...ne()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,...j()]}],"font-size":[{text:[`base`,n,X,J]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,ze,ke]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ye,q]}],"font-family":[{font:[Pe,Ae,t]}],"font-features":[{"font-features":[q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Y,q]}],"line-clamp":[{"line-clamp":[W,`none`,Y,Oe]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":[`none`,Y,q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[W,`from-font`,`auto`,Y,J]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[W,`auto`,Y,q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:C()}],"tab-size":[{tab:[G,Y,q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Y,q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},G,Y,q],radial:[``,Y,q],conic:[G,Y,q]},Le,Me]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[W,Y,q]}],"outline-w":[{outline:[``,W,X,J]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`none`,u,Re,Ne]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,Re,Ne]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[W,J]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,ee,Re,Ne]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[W,Y,q]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[W]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[Y,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[W]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,q]}],filter:[{filter:[``,`none`,Y,q]}],blur:[{blur:se()}],brightness:[{brightness:[W,Y,q]}],contrast:[{contrast:[W,Y,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,f,Re,Ne]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,W,Y,q]}],"hue-rotate":[{"hue-rotate":[W,Y,q]}],invert:[{invert:[``,W,Y,q]}],saturate:[{saturate:[W,Y,q]}],sepia:[{sepia:[``,W,Y,q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,q]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[W,Y,q]}],"backdrop-contrast":[{"backdrop-contrast":[W,Y,q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,W,Y,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[W,Y,q]}],"backdrop-invert":[{"backdrop-invert":[``,W,Y,q]}],"backdrop-opacity":[{"backdrop-opacity":[W,Y,q]}],"backdrop-saturate":[{"backdrop-saturate":[W,Y,q]}],"backdrop-sepia":[{"backdrop-sepia":[``,W,Y,q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[W,`initial`,Y,q]}],ease:[{ease:[`linear`,`initial`,g,Y,q]}],delay:[{delay:[W,Y,q]}],animate:[{animate:[`none`,_,Y,q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[m,Y,q]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:B()}],"scale-x":[{"scale-x":B()}],"scale-y":[{"scale-y":B()}],"scale-z":[{"scale-z":B()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[Y,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:V()}],"translate-x":[{"translate-x":V()}],"translate-y":[{"translate-y":V()}],"translate-z":[{"translate-z":V()}],"translate-none":[`translate-none`],zoom:[{zoom:[G,Y,q]}],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Y,q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Y,q]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[W,X,J,Oe]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}},Ye=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:a={}})=>($(e,`cacheSize`,t),$(e,`prefix`,n),$(e,`experimentalParseClassName`,r),Xe(e.theme,a.theme),Xe(e.classGroups,a.classGroups),Xe(e.conflictingClassGroups,a.conflictingClassGroups),Xe(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),$(e,`postfixLookupClassGroups`,a.postfixLookupClassGroups),$(e,`orderSensitiveModifiers`,a.orderSensitiveModifiers),Ze(e.theme,i.theme),Ze(e.classGroups,i.classGroups),Ze(e.conflictingClassGroups,i.conflictingClassGroups),Ze(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Qe(e,i,`postfixLookupClassGroups`),Qe(e,i,`orderSensitiveModifiers`),e),$=(e,t,n)=>{n!==void 0&&(e[t]=n)},Xe=(e,t)=>{if(t)for(let n in t)$(e,n,t[n])},Ze=(e,t)=>{if(t)for(let n in t)Qe(e,t,n)},Qe=(e,t,n)=>{let r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},$e=(e,...t)=>typeof e==`function`?le(Je,e,...t):le(()=>Ye(Je(),e),...t),et=le(Je);export{f as a,s as c,g as i,l,et as n,d as o,v as r,o as s,$e as t};
|