@viglet/viglet-design-system 2026.3.5 → 2026.3.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,9 +1,9 @@
1
1
  # Viglet Design System
2
2
 
3
- Shared component library, design tokens, hooks, utilities, and i18n for the six
4
- applications that install it: the Turing, Dumont and Shio consoles,
5
- the Cloud Console, the Cloud Home, and Schools. `consumers.json` is the list,
6
- and it is what the guards read.
3
+ Shared component library, design tokens, hooks, utilities, and i18n for the
4
+ seven applications that install it: the Turing, Dumont and Shio consoles,
5
+ the Cloud Console, the Cloud Home, Schools, and the Roadkeep GUI.
6
+ `consumers.json` is the list, and it is what the guards read.
7
7
 
8
8
  **[Browse the component catalogue](https://openviglet.github.io/viglet-design-system/)** — every
9
9
  component, its variants and its props, rebuilt on each commit to `2026.3`. Look
@@ -14,11 +14,12 @@ The six applications that install this package are the consumers it holds itself
14
14
  to, declared in [`consumers.json`](consumers.json) rather than remembered: each
15
15
  entry names its framework, its chrome, the accent it renders with and the
16
16
  subpaths it takes, and CI refuses prose that names a subset as though it were
17
- the whole set. A seventh is one entry there, and the checks widen with it.
17
+ the whole set. An eighth is one entry there, and the checks widen with it.
18
18
 
19
19
  Three are Vite consoles (Turing, Shio, Dumont), one is a Vite platform home
20
- (the Cloud Home), and two are Next applications (the Cloud Console and Schools).
21
- The split matters: a Next consumer takes no `./router` and no `./vite`.
20
+ (the Cloud Home), one is a Vite desktop shell (the Roadkeep GUI), and two are
21
+ Next applications (the Cloud Console and Schools). The split matters: a Next
22
+ consumer takes no `./router` and no `./vite`.
22
23
 
23
24
  ## Installation
24
25
 
@@ -29,10 +30,10 @@ pnpm add @viglet/viglet-design-system
29
30
  ## Trying a change in a product before publishing
30
31
 
31
32
  A change here is a change to shared chrome, so the question is always what it
32
- does to Shio, Turing, Dumont, the Cloud Console, the Cloud Home and Schools —
33
- and the answer should not require a publish. `use:local` walks a products root,
34
- so it reaches the first three; the other three are checked out elsewhere and
35
- `npm pack` into them is the loop until that changes (VDS73). From this checkout:
33
+ does to Shio, Turing, Dumont, the Cloud Console, the Cloud Home, Schools and the
34
+ Roadkeep GUI — and the answer should not require a publish. `use:local` walks a
35
+ products root, so it reaches the first three; the other four are checked out
36
+ elsewhere and `npm pack` into them is the loop until that changes (VDS73). From this checkout:
36
37
 
37
38
  ```bash
38
39
  pnpm use:local # build, then push dist into every 2026.3 product on disk
@@ -397,6 +398,19 @@ The tint, the strong tint and the hairline (`--vg-accent-surface`, `--vg-accent-
397
398
 
398
399
  **Declare them on `:root`, not on a wrapper.** A custom property substitutes its `var()` references where it is *declared*, so the derived tokens above are mixed against the `--vg-accent-from` declared in the preset's `:root`. Re-keying a subtree moves what a utility class mixes on the element — the chip, the solid fill — and leaves the tint, the hairline and the button fill at the root's value. The result looks like a component that half-ignores the theme.
399
400
 
401
+ **The accent is not the whole re-key.** `--primary` is the other half, and it is a separate set of properties because it takes one value per ground rather than one value plus a readable pair. It is what the bento rail's active marker, the tile's hover glow, an inline edit's border and the default `Button` fill all read, so a product that sets only the four above leaves those in the preset's neutral:
402
+
403
+ ```css
404
+ :root {
405
+ --vg-primary-base: oklch(55.3% 0.195 38.402);
406
+ --vg-primary-base-dark: oklch(75% 0.183 55.934);
407
+ --vg-primary-foreground-base: oklch(0.985 0 0);
408
+ --vg-primary-foreground-base-dark: oklch(0.205 0 0);
409
+ }
410
+ ```
411
+
412
+ Set the inputs, never `--vg-primary` itself. Your stylesheet is declared after this package's dark block, at the same specificity and in no layer, so a single `--vg-primary` there wins on both grounds and keys the dark one to the light value. The preset reads the inputs per ground, which is why re-keying stays a `:root` edit. The fill carries text, so keep that pair at 4.5:1 on both grounds — usually a deeper step than the gradient stops.
413
+
400
414
  Three utility classes cover the common shapes: `vg-accent-chip` (the tinted gradient chip — pair it with Tailwind's `ring-1`), `vg-accent-text` (an accented label or icon), and `vg-accent-solid` (a solid gradient fill).
401
415
 
402
416
  `GradientButton` and `GradientSwitch` follow the accent in their primary variants (`default`, `outline`, `ghost`), so a re-key reaches the buttons too; their `secondary`, `destructive` and `success` variants keep fixed semantic hues, because "destructive" does not change colour with the brand.
@@ -498,11 +512,17 @@ of this package and which stay in the product, and why. Four of them are one
498
512
  product's commercial offer rendered as cards, and shipping those as chrome would
499
513
  put that offer in every console.
500
514
 
515
+ [docs/reference/](docs/reference/) is the same contract drawn: eight artboards,
516
+ one per decision that makes two products built from this package stop looking
517
+ like one — the header's set, who owns the reading column, what `--primary`
518
+ reaches, the three page shapes, the panel, and both grounds with their ratios.
519
+ The catalogue proves a component; these prove the arrangement.
520
+
501
521
  ## Contributing
502
522
 
503
523
  The package manager here is pnpm, matching the Shio, Turing, Dumont, Cloud Home
504
- and Schools workspaces. The Cloud Console installs with npm, which is a fact
505
- about that repository and not about this one.
524
+ and Schools workspaces. The Cloud Console and the Roadkeep GUI install with npm,
525
+ which is a fact about those repositories and not about this one.
506
526
 
507
527
  ```bash
508
528
  pnpm install
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/components/login/login.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAsB,KAAK,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAG9F,OAAO,aAAa,CAAC;AAiDrB,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,cAAc,CAAC;IACpE,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,SAAS,CAAC,EACjB,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EACtD,EAAE,QAAQ,CAAC,cAAc,CAAC,+BAqB1B;AAED,yEAAyE;AACzE,iBAAS,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,uBAAuB,EAAE,OAAO,GAAG,WAAW,CAAC,CAAC,+BAG7F;AAED,8EAA8E;AAC9E,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,+BAMhG;AAED,wEAAwE;AACxE,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,+BAM/F;AAED,UAAU,cAAe,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC7D,wCAAwC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AACD,sDAAsD;AACtD,iBAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,+BAUzF;AAED,8BAA8B;AAC9B,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,+BAWjG;AAED,sCAAsC;AACtC,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,+BAQrG;AAED,4BAA4B;AAC5B,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,+BAMhG;AAED,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC3E,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AACD,qEAAqE;AACrE,iBAAS,gBAAgB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,qBAAqB,CAAC,+BAOhG;AAED,4DAA4D;AAC5D,iBAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,+BAM5F;AAED,yCAAyC;AACzC,iBAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,+BAQpG;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;CAWhB,CAAC"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/components/login/login.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAsB,KAAK,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAG9F,OAAO,aAAa,CAAC;AAiDrB,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,cAAc,CAAC;IACpE,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,iBAAS,SAAS,CAAC,EACjB,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EACtD,EAAE,QAAQ,CAAC,cAAc,CAAC,+BA4B1B;AAED,yEAAyE;AACzE,iBAAS,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,uBAAuB,EAAE,OAAO,GAAG,WAAW,CAAC,CAAC,+BAG7F;AAED,8EAA8E;AAC9E,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,+BAMhG;AAED,wEAAwE;AACxE,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,+BAM/F;AAED,UAAU,cAAe,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC7D,wCAAwC;IACxC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AACD,sDAAsD;AACtD,iBAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,+BAUzF;AAED,8BAA8B;AAC9B,iBAAS,UAAU,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC,+BAWjG;AAED,sCAAsC;AACtC,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,+BAQrG;AAED,4BAA4B;AAC5B,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,+BAMhG;AAED,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC3E,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AACD,qEAAqE;AACrE,iBAAS,gBAAgB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,qBAAqB,CAAC,+BAOhG;AAED,4DAA4D;AAC5D,iBAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,+BAM5F;AAED,yCAAyC;AACzC,iBAAS,WAAW,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,+BAQpG;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;CAWhB,CAAC"}
package/dist/exports.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viglet/viglet-design-system",
3
- "version": "2026.3.5",
3
+ "version": "2026.3.8",
4
4
  "generatedBy": "scripts/emit-exports.mjs",
5
5
  "entries": {
6
6
  ".": {
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./badge-locale-sIsBdP_e.cjs"),n=require("./breadcrumb.context-DYeZEC65.cjs"),r=require("./user.context-r50nSWER.cjs"),i=require("./floating-formulas-bg.cjs"),a=require("./products-DL_YYXkV.cjs"),o=require("./i18n-DoNdMLEd.cjs");let s=require("@radix-ui/react-accordion");s=e.t(s,1);let c=require("react");c=e.t(c,1);let l=require("react/jsx-runtime"),u=require("@radix-ui/react-slot"),d=require("class-variance-authority"),f=require("@radix-ui/react-checkbox");f=e.t(f,1);let p=require("vaul"),m=require("react-hook-form"),h=require("@radix-ui/react-label");h=e.t(h,1);let g=require("@tabler/icons-react"),_=require("react-i18next"),v=require("@radix-ui/react-switch");v=e.t(v,1);let y=require("@radix-ui/react-hover-card");y=e.t(y,1);let b=require("@radix-ui/react-navigation-menu");b=e.t(b,1);let x=require("radix-ui"),S=require("react-resizable-panels"),C=require("@radix-ui/react-slider");C=e.t(C,1);let w=require("@radix-ui/react-tabs");w=e.t(w,1);let T=require("@radix-ui/react-toggle");T=e.t(T,1);let E=require("@radix-ui/react-toggle-group");E=e.t(E,1);let D=require("axios");D=e.t(D,1);let O=require("date-fns/locale"),k=require("xlsx");k=e.t(k,1);let ee=require("sonner");var te=t.H(`book`,[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),ne=t.H(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),re=t.H(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),ie=t.H(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ae=t.H(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),oe=t.H(`languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),se=t.H(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),ce=s.Root,le=c.forwardRef(({className:e,...n},r)=>(0,l.jsx)(s.Item,{ref:r,className:t.U(`border-b`,e),...n}));le.displayName=`AccordionItem`;var ue=c.forwardRef(({className:e,children:r,...i},a)=>(0,l.jsx)(s.Header,{className:`flex`,children:(0,l.jsxs)(s.Trigger,{ref:a,className:t.U(`flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180`,e),...i,children:[r,(0,l.jsx)(n._t,{className:`h-4 w-4 shrink-0 transition-transform duration-200`})]})}));ue.displayName=s.Trigger.displayName;var de=c.forwardRef(({className:e,children:n,...r},i)=>(0,l.jsx)(s.Content,{ref:i,className:`overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...r,children:(0,l.jsx)(`div`,{className:t.U(`pb-4 pt-0`,e),children:n})}));de.displayName=s.Content.displayName;function fe({className:e,...n}){return(0,l.jsx)(f.Root,{"data-slot":`checkbox`,className:t.U(`peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...n,children:(0,l.jsx)(f.Indicator,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,l.jsx)(t.V,{className:`size-3.5`})})})}function pe({...e}){return(0,l.jsx)(p.Drawer.Root,{"data-slot":`drawer`,...e})}function me({...e}){return(0,l.jsx)(p.Drawer.Trigger,{"data-slot":`drawer-trigger`,...e})}function he({...e}){return(0,l.jsx)(p.Drawer.Portal,{"data-slot":`drawer-portal`,...e})}function ge({...e}){return(0,l.jsx)(p.Drawer.Close,{"data-slot":`drawer-close`,...e})}function _e({className:e,...n}){return(0,l.jsx)(p.Drawer.Overlay,{"data-slot":`drawer-overlay`,className:t.U(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...n})}function ve({className:e,children:n,...r}){return(0,l.jsxs)(he,{"data-slot":`drawer-portal`,children:[(0,l.jsx)(_e,{}),(0,l.jsxs)(p.Drawer.Content,{"data-slot":`drawer-content`,className:t.U(`group/drawer-content bg-background fixed z-50 flex h-auto flex-col`,`data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b`,`data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t`,`data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm`,`data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm`,e),...r,children:[(0,l.jsx)(`div`,{className:`bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block`}),n]})]})}function ye({className:e,...n}){return(0,l.jsx)(`div`,{"data-slot":`drawer-header`,className:t.U(`flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left`,e),...n})}function be({className:e,...n}){return(0,l.jsx)(`div`,{"data-slot":`drawer-footer`,className:t.U(`mt-auto flex flex-col gap-2 p-4`,e),...n})}function xe({className:e,...n}){return(0,l.jsx)(p.Drawer.Title,{"data-slot":`drawer-title`,className:t.U(`text-foreground font-semibold`,e),...n})}function Se({className:e,...n}){return(0,l.jsx)(p.Drawer.Description,{"data-slot":`drawer-description`,className:t.U(`text-muted-foreground text-sm`,e),...n})}function Ce({className:e,...n}){return(0,l.jsx)(h.Root,{"data-slot":`label`,className:t.U(`flex items-center gap-2 text-sm leading-none font-medium text-foreground select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...n})}var we=m.FormProvider,A=c.createContext({}),Te=({...e})=>{let t=!!e.rules?.required,n=c.useMemo(()=>({name:e.name,required:t}),[e.name,t]);return(0,l.jsx)(A.Provider,{value:n,children:(0,l.jsx)(m.Controller,{...e})})},j=()=>{let e=c.useContext(A),t=c.useContext(M),{getFieldState:n}=(0,m.useFormContext)(),r=(0,m.useFormState)({name:e.name}),i=n(e.name,r);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:a}=t;return{id:a,name:e.name,required:e.required,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},M=c.createContext({});function N({className:e,...n}){let r=c.useId(),i=c.useMemo(()=>({id:r}),[r]);return(0,l.jsx)(M.Provider,{value:i,children:(0,l.jsx)(`div`,{"data-slot":`form-item`,className:t.U(`grid gap-2`,e),...n})})}function P({className:e,children:n,...r}){let{error:i,formItemId:a,required:o}=j();return(0,l.jsxs)(Ce,{"data-slot":`form-label`,"data-error":!!i,className:t.U(`data-[error=true]:text-destructive`,e),htmlFor:a,...r,children:[n,o?(0,l.jsx)(`span`,{className:`text-destructive`,children:` *`}):null]})}function Ee({...e}){let{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=j();return(0,l.jsx)(u.Slot,{"data-slot":`form-control`,id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})}function F({className:e,...n}){let{formDescriptionId:r}=j();return(0,l.jsx)(`p`,{"data-slot":`form-description`,id:r,className:t.U(`text-muted-foreground text-sm`,e),...n})}function De({className:e,...n}){let{error:r,formMessageId:i}=j(),a=r?String(r?.message??``):n.children;return a?(0,l.jsx)(`p`,{"data-slot":`form-message`,id:i,className:t.U(`text-destructive text-sm`,e),...n,children:a}):null}function I({children:e,className:n}){return(0,l.jsx)(`div`,{className:t.U(`flex items-center justify-end gap-3 pt-4 border-t`,n),children:e})}function Oe({onClick:e,children:n,className:r}){let{t:i}=(0,_.useTranslation)();return(0,l.jsxs)(t.u,{type:`button`,variant:`outline`,onClick:e,className:r,children:[(0,l.jsx)(g.IconX,{className:`size-4`}),n??i(`forms.formActions.cancel`)]})}function ke({loading:e,disabled:n,children:r,className:i}){let{t:a}=(0,_.useTranslation)();return(0,l.jsxs)(t.u,{type:`submit`,disabled:n||e,className:i,children:[e?(0,l.jsx)(g.IconLoader2,{className:`size-4 animate-spin`}):(0,l.jsx)(g.IconDeviceFloppy,{className:`size-4`}),r??a(`forms.formActions.saveChanges`)]})}function Ae({onClick:e,children:n,className:r}){let{t:i}=(0,_.useTranslation)();return(0,l.jsxs)(t.u,{type:`button`,variant:`outline`,onClick:e,className:t.U(`md:hidden text-destructive border-destructive/30 hover:bg-destructive/10 mr-auto`,r),children:[(0,l.jsx)(g.IconTrash,{className:`size-4`}),n??i(`forms.formActions.delete`)]})}I.Cancel=Oe,I.Submit=ke,I.Delete=Ae;var je=Object.assign(({className:e,...n})=>(0,l.jsx)(N,{children:(0,l.jsx)(`div`,{className:t.U(`flex w-full flex-row items-center gap-4`,e),...n})}),{Left:({className:e,...n})=>(0,l.jsx)(`div`,{className:t.U(`flex w-1/2 flex-col gap-1`,e),...n}),Right:({className:e,...n})=>(0,l.jsx)(`div`,{className:t.U(`flex w-1/2 justify-end`,e),...n}),Label:({className:e,...n})=>(0,l.jsx)(P,{className:t.U(e),...n}),Description:({className:e,...n})=>(0,l.jsx)(F,{className:t.U(e),...n})}),Me=(0,d.cva)(`peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,{variants:{variant:{default:[`data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-[var(--vg-accent-fill-from)] data-[state=checked]:to-[var(--vg-accent-fill-to)]`,`data-[state=unchecked]:bg-input`,`focus-visible:ring-[var(--vg-accent-ring)]`,`dark:data-[state=unchecked]:bg-input/80`].join(` `),secondary:[`data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-slate-600 data-[state=checked]:to-slate-700`,`data-[state=unchecked]:bg-input`,`focus-visible:ring-slate-500/50`,`dark:data-[state=checked]:from-slate-500 dark:data-[state=checked]:to-slate-600`,`dark:data-[state=unchecked]:bg-input/80`,`dark:focus-visible:ring-slate-400/50`].join(` `),destructive:[`data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-red-600 data-[state=checked]:to-rose-600`,`data-[state=unchecked]:bg-input`,`focus-visible:ring-red-500/50`,`dark:data-[state=checked]:from-red-500 dark:data-[state=checked]:to-rose-500`,`dark:data-[state=unchecked]:bg-input/80`,`dark:focus-visible:ring-red-400/50`].join(` `),success:[`data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-emerald-600 data-[state=checked]:to-teal-600`,`data-[state=unchecked]:bg-input`,`focus-visible:ring-emerald-500/50`,`dark:data-[state=checked]:from-emerald-500 dark:data-[state=checked]:to-teal-500`,`dark:data-[state=unchecked]:bg-input/80`,`dark:focus-visible:ring-emerald-400/50`].join(` `)}},defaultVariants:{variant:`default`}});function Ne({className:e,variant:n,...r}){return(0,l.jsx)(v.Root,{"data-slot":`gradient-switch`,className:t.U(Me({variant:n}),e),...r,children:(0,l.jsx)(v.Thumb,{"data-slot":`gradient-switch-thumb`,className:t.U(`bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-primary-foreground`)})})}var Pe=`rounded-2xl p-6 sm:p-8`;function L({children:e,color:n,colorDark:r,className:i,style:a,...o}){let s={};return n&&(s[`--glass-card-color`]=n),r?s[`--glass-card-color-dark`]=r:n&&(s[`--glass-card-color-dark`]=n),(0,l.jsx)(`div`,{className:t.U(`vig-glass-card`,Pe,i),style:{...a??{},...s},...o,children:e})}function R({children:e,color:t,colorDark:n,paused:r,className:i,style:a,...o}){let s={};return t&&(s[`--pulse-ring-color`]=t),n?s[`--pulse-ring-color-dark`]=n:t&&(s[`--pulse-ring-color-dark`]=t),(0,l.jsx)(`div`,{className:`vig-pulse-ring ${r?``:`vig-pulse-ring--active`} ${i??``}`,style:{...a??{},...s},...o,children:e})}var Fe=y.Root,Ie=y.Trigger,Le=c.forwardRef(({className:e,align:n=`center`,sideOffset:r=4,...i},a)=>(0,l.jsx)(y.Content,{ref:a,align:n,sideOffset:r,className:t.U(`z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...i}));Le.displayName=y.Content.displayName;function Re({className:e,children:n,viewport:r=!0,...i}){return(0,l.jsxs)(b.Root,{"data-slot":`navigation-menu`,"data-viewport":r,className:t.U(`group/navigation-menu relative flex max-w-max flex-1 items-center justify-center`,e),...i,children:[n,r&&(0,l.jsx)(z,{})]})}function ze({className:e,...n}){return(0,l.jsx)(b.List,{"data-slot":`navigation-menu-list`,className:t.U(`group flex flex-1 list-none items-center justify-center gap-1`,e),...n})}function Be({className:e,...n}){return(0,l.jsx)(b.Item,{"data-slot":`navigation-menu-item`,className:t.U(`relative`,e),...n})}var Ve=(0,d.cva)(`group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1`);function He({className:e,children:r,...i}){return(0,l.jsxs)(b.Trigger,{"data-slot":`navigation-menu-trigger`,className:t.U(Ve(),`group`,e),...i,children:[r,` `,(0,l.jsx)(n._t,{className:`relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180`,"aria-hidden":`true`})]})}function Ue({className:e,...n}){return(0,l.jsx)(b.Content,{"data-slot":`navigation-menu-content`,className:t.U(`data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto`,`group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none`,e),...n})}function z({className:e,...n}){return(0,l.jsx)(`div`,{className:t.U(`absolute top-full left-0 isolate z-50 flex justify-center`),children:(0,l.jsx)(b.Viewport,{"data-slot":`navigation-menu-viewport`,className:t.U(`origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]`,e),...n})})}function We({className:e,...n}){return(0,l.jsx)(b.Link,{"data-slot":`navigation-menu-link`,className:t.U(`data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4`,e),...n})}function Ge({className:e,...n}){return(0,l.jsx)(b.Indicator,{"data-slot":`navigation-menu-indicator`,className:t.U(`data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden`,e),...n,children:(0,l.jsx)(`div`,{className:`bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md`})})}function Ke({className:e,...n}){return(0,l.jsx)(`nav`,{role:`navigation`,"aria-label":`pagination`,className:t.U(`mx-auto flex w-full justify-center`,e),...n})}var B=c.forwardRef(({className:e,...n},r)=>(0,l.jsx)(`ol`,{ref:r,className:t.U(`flex flex-row items-center gap-1`,e),...n}));B.displayName=`PaginationContent`;var V=c.forwardRef(({className:e,...n},r)=>(0,l.jsx)(`li`,{ref:r,className:t.U(``,e),...n}));V.displayName=`PaginationItem`;function H({className:e,isActive:n,size:i=`icon`,children:a,...o}){return(0,l.jsx)(`a`,{"aria-current":n?`page`:void 0,className:t.U(r.l({variant:n?`outline`:`ghost`,size:i}),n&&`bg-accent text-accent-foreground`,e),...o,children:a})}function qe({className:e,...n}){return(0,l.jsxs)(H,{"aria-label":`Go to previous page`,size:`default`,className:t.U(`gap-1 pl-2.5`,e),...n,children:[(0,l.jsx)(ne,{className:`h-4 w-4`}),(0,l.jsx)(`span`,{children:`Previous`})]})}function Je({className:e,...n}){return(0,l.jsxs)(H,{"aria-label":`Go to next page`,size:`default`,className:t.U(`gap-1 pr-2.5`,e),...n,children:[(0,l.jsx)(`span`,{children:`Next`}),(0,l.jsx)(t.B,{className:`h-4 w-4`})]})}function Ye({className:e,...r}){return(0,l.jsxs)(`span`,{"aria-hidden":`true`,className:t.U(`flex h-9 w-9 items-center justify-center`,e),...r,children:[(0,l.jsx)(n.gt,{className:`h-4 w-4`}),(0,l.jsx)(`span`,{className:`sr-only`,children:`More pages`})]})}function Xe({...e}){return(0,l.jsx)(x.Popover.Root,{"data-slot":`popover`,...e})}function Ze({...e}){return(0,l.jsx)(x.Popover.Trigger,{"data-slot":`popover-trigger`,...e})}function Qe({className:e,align:n=`center`,sideOffset:r=4,...i}){return(0,l.jsx)(x.Popover.Portal,{children:(0,l.jsx)(x.Popover.Content,{"data-slot":`popover-content`,align:n,sideOffset:r,className:t.U(`z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...i})})}function $e({...e}){return(0,l.jsx)(x.Popover.Anchor,{"data-slot":`popover-anchor`,...e})}function et({className:e,value:n,...r}){return(0,l.jsx)(x.Progress.Root,{"data-slot":`progress`,className:t.U(`relative h-2 w-full overflow-hidden rounded-full bg-primary/20`,e),...r,children:(0,l.jsx)(x.Progress.Indicator,{"data-slot":`progress-indicator`,className:`h-full w-full flex-1 bg-primary transition-all`,style:{transform:`translateX(-${100-(n||0)}%)`}})})}function tt({className:e,...n}){return(0,l.jsx)(S.Group,{"data-slot":`resizable-panel-group`,className:t.U(`flex h-full w-full data-[panel-group-orientation=vertical]:flex-col`,e),...n})}function nt({overflowHidden:e,className:n,...r}){return(0,l.jsx)(S.Panel,{"data-slot":`resizable-panel`,className:t.U(e&&`[&>div]:overflow-hidden!`,n),style:e?{overflow:`hidden`}:void 0,...r})}function rt({withHandle:e,className:n,...r}){return(0,l.jsx)(S.Separator,{"data-slot":`resizable-handle`,className:t.U(`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:-left-2 after:-right-2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-orientation=vertical]:h-px data-[panel-group-orientation=vertical]:w-full data-[panel-group-orientation=vertical]:after:inset-x-0 data-[panel-group-orientation=vertical]:after:-top-2 data-[panel-group-orientation=vertical]:after:-bottom-2 [&[data-panel-group-direction=vertical]>div]:rotate-90`,n),...r,children:e&&(0,l.jsx)(`div`,{className:`bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border`,children:(0,l.jsx)(ae,{className:`size-2.5`})})})}var it={gray:`bg-gray-50 dark:bg-gray-950/30`,blue:`bg-blue-50 dark:bg-blue-950/30`,orange:`bg-orange-50 dark:bg-orange-950/30`,green:`bg-green-50 dark:bg-green-950/30`};function U({title:e,badges:n,actions:r,onCancel:i,loading:a,disabled:o,variant:s=`gray`}){let{t:c}=(0,_.useTranslation)();return(0,l.jsxs)(`div`,{className:`sticky top-0 z-10 border rounded-lg px-4 py-3 flex items-center justify-between gap-4 ${it[s]}`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,l.jsx)(`h3`,{className:`text-lg font-semibold text-foreground truncate`,children:e}),n&&(0,l.jsx)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:n})]}),(0,l.jsx)(`div`,{className:`flex gap-2 shrink-0`,children:r??(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(t.u,{type:`submit`,size:`sm`,loading:a,disabled:o,children:[(0,l.jsx)(g.IconDeviceFloppy,{className:`size-4`}),c(`forms.formActions.saveChanges`)]}),i&&(0,l.jsxs)(t.u,{type:`button`,variant:`outline`,size:`sm`,onClick:i,children:[(0,l.jsx)(g.IconX,{className:`size-4`}),c(`forms.formActions.cancel`)]})]})})]})}function at({children:e}){return(0,l.jsx)(t.L,{variant:`outline`,className:`text-xs`,children:e})}U.Badge=at;function ot({className:e,defaultValue:n,value:r,min:i=0,max:a=100,"aria-label":o,"aria-labelledby":s,...u}){let d=c.useMemo(()=>Array.isArray(r)?r:Array.isArray(n)?n:[i,a],[r,n,i,a]);return(0,l.jsxs)(C.Root,{"data-slot":`slider`,defaultValue:n,value:r,min:i,max:a,className:t.U(`relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col`,e),...u,children:[(0,l.jsx)(C.Track,{"data-slot":`slider-track`,className:t.U(`bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5`),children:(0,l.jsx)(C.Range,{"data-slot":`slider-range`,className:t.U(`bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`)})}),Array.from({length:d.length},(e,t)=>(0,l.jsx)(C.Thumb,{"data-slot":`slider-thumb`,"aria-label":o&&d.length>1?`${o} ${t+1}`:o,"aria-labelledby":s,className:`border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50`},t))]})}var W=(0,c.createContext)({completedSteps:[],allDone:!1});function G({completedSteps:e,children:n,className:r}){let i=e.length>0&&e.every(Boolean);return(0,l.jsx)(W.Provider,{value:{completedSteps:e,allDone:i},children:(0,l.jsxs)(`div`,{className:t.U(`relative`,r),children:[(0,l.jsx)(`div`,{className:`stepper-line absolute left-3.75 top-4 bottom-4 w-0.5 rounded-full`}),n]})})}function st({index:e,children:n,className:r}){let{completedSteps:i}=(0,c.useContext)(W),a=i[e]??!1,o=e+1;return(0,l.jsxs)(`div`,{className:t.U(`relative flex items-start gap-4 pb-8`,r),children:[(0,l.jsx)(`div`,{className:`flex flex-col items-center`,children:(0,l.jsx)(`div`,{className:t.U(`relative z-10 flex h-8 w-8 items-center justify-center rounded-full text-xs font-bold transition-all duration-500`,a?`bg-emerald-500 text-white shadow-md shadow-emerald-500/30 scale-105`:`bg-primary text-primary-foreground`),children:a?(0,l.jsx)(g.IconCheck,{className:`h-4 w-4`}):o})}),(0,l.jsx)(`div`,{className:`flex-1 pt-0.5`,children:n})]})}function ct({readyLabel:e=`Ready to submit`,pendingLabel:n=`Complete all steps above`,className:r}){let{allDone:i}=(0,c.useContext)(W);return(0,l.jsxs)(`div`,{className:t.U(`relative flex items-center gap-4`,r),children:[(0,l.jsx)(`div`,{className:`flex flex-col items-center`,children:(0,l.jsx)(`div`,{className:t.U(`relative z-10 flex h-8 w-8 items-center justify-center rounded-full transition-all duration-700`,i?`stepper-ready bg-emerald-500 text-white shadow-lg shadow-emerald-500/40 scale-110`:`bg-muted text-muted-foreground/40`),children:(0,l.jsx)(g.IconCircleCheck,{className:`h-5 w-5`})})}),(0,l.jsx)(`span`,{className:t.U(`text-sm font-medium transition-all duration-500`,i?`text-emerald-600 dark:text-emerald-400`:`text-muted-foreground/40`),children:i?e:n})]})}G.Step=st,G.Completion=ct;function lt({className:e,...n}){return(0,l.jsx)(v.Root,{"data-slot":`switch`,className:t.U(`peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...n,children:(0,l.jsx)(v.Thumb,{"data-slot":`switch-thumb`,className:t.U(`bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0`)})})}function ut({className:e,...n}){return(0,l.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,l.jsx)(`table`,{"data-slot":`table`,className:t.U(`w-full caption-bottom text-sm`,e),...n})})}function dt({className:e,...n}){return(0,l.jsx)(`thead`,{"data-slot":`table-header`,className:t.U(`[&_tr]:border-b`,e),...n})}function ft({className:e,...n}){return(0,l.jsx)(`tbody`,{"data-slot":`table-body`,className:t.U(`[&_tr:last-child]:border-0`,e),...n})}function pt({className:e,...n}){return(0,l.jsx)(`tfoot`,{"data-slot":`table-footer`,className:t.U(`bg-muted/50 border-t font-medium [&>tr]:last:border-b-0`,e),...n})}function mt({className:e,...n}){return(0,l.jsx)(`tr`,{"data-slot":`table-row`,className:t.U(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors`,e),...n})}function ht({className:e,...n}){return(0,l.jsx)(`th`,{"data-slot":`table-head`,className:t.U(`text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...n})}function gt({className:e,...n}){return(0,l.jsx)(`td`,{"data-slot":`table-cell`,className:t.U(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...n})}function _t({className:e,...n}){return(0,l.jsx)(`caption`,{"data-slot":`table-caption`,className:t.U(`text-muted-foreground mt-4 text-sm`,e),...n})}function vt({className:e,...n}){return(0,l.jsx)(w.Root,{"data-slot":`tabs`,className:t.U(`flex flex-col gap-2`,e),...n})}function yt({className:e,...n}){return(0,l.jsx)(w.List,{"data-slot":`tabs-list`,className:t.U(`bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]`,e),...n})}function bt({className:e,...n}){return(0,l.jsx)(w.Trigger,{"data-slot":`tabs-trigger`,className:t.U(`data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n})}function xt({className:e,...n}){return(0,l.jsx)(w.Content,{"data-slot":`tabs-content`,className:t.U(`flex-1 outline-none`,e),...n})}function St({className:e,...n}){return(0,l.jsx)(`textarea`,{"data-slot":`textarea`,className:t.U(`border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),...n})}var K=(0,d.cva)(`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 px-2 min-w-9`,sm:`h-8 px-1.5 min-w-8`,lg:`h-10 px-2.5 min-w-10`}},defaultVariants:{variant:`default`,size:`default`}});function Ct({className:e,variant:n,size:r,...i}){return(0,l.jsx)(T.Root,{"data-slot":`toggle`,className:t.U(K({variant:n,size:r,className:e})),...i})}var q=c.createContext({size:`default`,variant:`default`,spacing:0});function wt({className:e,variant:n,size:r,spacing:i=0,children:a,...o}){return(0,l.jsx)(E.Root,{"data-slot":`toggle-group`,"data-variant":n,"data-size":r,"data-spacing":i,style:{"--gap":i},className:t.U(`group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs`,e),...o,children:(0,l.jsx)(q.Provider,{value:{variant:n,size:r,spacing:i},children:a})})}function Tt({className:e,children:n,variant:r,size:i,...a}){let o=c.useContext(q);return(0,l.jsx)(E.Item,{"data-slot":`toggle-group-item`,"data-variant":o.variant||r,"data-size":o.size||i,"data-spacing":o.spacing,className:t.U(K({variant:o.variant||r,size:o.size||i}),`w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10`,`data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l`,e),...a,children:n})}function Et({user:e,onAccount:n,onSignOut:i,extraItems:a,className:o,align:s=`end`}){let{t:c}=(0,_.useTranslation)(),u=`${e.firstName??``} ${e.lastName??``}`.trim()||e.username||``;return(0,l.jsxs)(t.f,{children:[(0,l.jsx)(t.E,{asChild:!0,children:(0,l.jsx)(`button`,{type:`button`,title:u||e.username,className:t.U(`cursor-pointer rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring`,o),children:(0,l.jsx)(r.r,{givenName:e.firstName,familyName:e.lastName,name:u||e.username,src:e.avatarUrl||void 0,alt:e.username,className:`hover:ring-2 hover:ring-border transition-all`})})}),(0,l.jsxs)(t.m,{className:`min-w-56 rounded-lg`,align:s,sideOffset:8,children:[(0,l.jsx)(t._,{className:`p-0 font-normal`,children:(0,l.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-left text-sm`,children:[(0,l.jsx)(r.r,{givenName:e.firstName,familyName:e.lastName,name:u||e.username,src:e.avatarUrl||void 0,alt:e.username}),(0,l.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[u&&(0,l.jsx)(`span`,{className:`truncate font-medium`,children:u}),e.email&&(0,l.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:e.email})]})]})}),(0,l.jsx)(t.x,{}),(0,l.jsxs)(t.h,{children:[n&&(0,l.jsxs)(t.g,{onSelect:n,className:`cursor-pointer`,children:[(0,l.jsx)(g.IconUserCircle,{}),c(`nav.account`)]}),a]}),(n||a)&&(0,l.jsx)(t.x,{}),i&&(0,l.jsxs)(t.g,{onSelect:i,className:`cursor-pointer text-red-500 focus:text-red-500 focus:bg-red-50 dark:focus:bg-red-950`,children:[(0,l.jsx)(g.IconLogout,{}),c(`nav.logOut`)]})]})]})}var Dt=(0,c.createContext)({});function Ot(e){if(!e)return null;let t=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e.trim());if(t){let[,e,n,r]=t;return`${Number.parseInt(e+e,16)}, ${Number.parseInt(n+n,16)}, ${Number.parseInt(r+r,16)}`}let n=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e.trim());if(n){let[,e,t,r]=n;return`${Number.parseInt(e,16)}, ${Number.parseInt(t,16)}, ${Number.parseInt(r,16)}`}return null}function kt({color:e,colorDark:t,children:n,className:r,style:i,...a}){let o={};e&&(o[`--ff-color`]=e),t?o[`--ff-color-dark`]=t:e&&(o[`--ff-color-dark`]=e);let s=Ot(e);s&&(o[`--ff-color-rgb`]=s);let c=Ot(t)??s;return c&&(o[`--ff-color-dark-rgb`]=c),(0,l.jsx)(Dt.Provider,{value:{color:e,colorDark:t},children:(0,l.jsx)(`div`,{className:`vig-login relative min-h-svh flex items-center justify-center overflow-hidden bg-slate-50 dark:bg-slate-950 ${r??``}`,style:{...i??{},...o},...a,children:n})})}function At(e){let{color:t,colorDark:n}=(0,c.useContext)(Dt);return(0,l.jsx)(i.FloatingFormulasBg,{color:t,colorDark:n,...e})}function jt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`absolute top-4 right-4 z-30 flex items-center gap-2 ${t??``}`,...n,children:e})}function Mt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`relative z-20 flex flex-col items-center w-full max-w-md px-6 py-4 ${t??``}`,...n,children:e})}function Nt({children:e,pulsePaused:t,className:n,...r}){return(0,l.jsx)(`div`,{className:`vig-login__fade-in mb-3 ${n??``}`,...r,children:(0,l.jsx)(R,{paused:t,children:(0,l.jsx)(`div`,{className:`flex h-16 w-16 items-center justify-center rounded-2xl bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm shadow-lg ring-1 ring-[rgba(var(--ff-color-rgb,37,99,235),0.2)] dark:ring-[rgba(var(--ff-color-dark-rgb,96,165,250),0.2)]`,children:e})})})}function Pt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-login__fade-in-d1 text-center mb-1`,children:(0,l.jsx)(`h1`,{className:`text-2xl font-bold tracking-tight bg-clip-text text-transparent vig-login__title-gradient ${t??``}`,...n,children:e})})}function Ft({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-login__fade-in-d1 text-center mb-4`,children:(0,l.jsx)(`p`,{className:`text-sm text-slate-500 dark:text-slate-400 max-w-xs leading-relaxed ${t??``}`,...n,children:e})})}function It({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-login__fade-in-d2 flex flex-wrap justify-center gap-2 mb-5 ${t??``}`,...n,children:e})}function Lt({icon:e,children:t,className:n,...r}){return(0,l.jsxs)(`div`,{className:`vig-login__feature-pill flex items-center gap-1.5 rounded-full px-3 py-1 ${n??``}`,...r,children:[e,(0,l.jsx)(`span`,{className:`text-xs font-medium text-slate-600 dark:text-slate-300`,children:t})]})}function Rt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-login__fade-in-d3 w-full ${t??``}`,...n,children:(0,l.jsx)(L,{children:e})})}function zt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-login__fade-in-d3 mt-4 text-center`,children:(0,l.jsx)(`p`,{className:`text-xs text-slate-400 dark:text-slate-500 ${t??``}`,...n,children:e})})}var Bt=Object.assign(kt,{Background:At,Settings:jt,Content:Mt,Logo:Nt,Title:Pt,Tagline:Ft,Features:It,FeaturePill:Lt,Card:Rt,Footer:zt}),Vt=(0,c.createContext)({});function Ht(e){if(!e)return null;let t=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e.trim());if(t){let[,e,n,r]=t;return`${Number.parseInt(e+e,16)}, ${Number.parseInt(n+n,16)}, ${Number.parseInt(r+r,16)}`}let n=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e.trim());if(n){let[,e,t,r]=n;return`${Number.parseInt(e,16)}, ${Number.parseInt(t,16)}, ${Number.parseInt(r,16)}`}return null}function Ut({color:e,colorDark:t,children:n,className:r,style:i,...a}){let o={};e&&(o[`--ff-color`]=e),t?o[`--ff-color-dark`]=t:e&&(o[`--ff-color-dark`]=e);let s=Ht(e);s&&(o[`--ff-color-rgb`]=s);let c=Ht(t)??s;return c&&(o[`--ff-color-dark-rgb`]=c),(0,l.jsx)(Vt.Provider,{value:{color:e,colorDark:t},children:(0,l.jsx)(`div`,{className:`vig-sf relative min-h-svh flex items-center justify-center overflow-hidden bg-slate-50 dark:bg-slate-950 ${r??``}`,style:{...i??{},...o},...a,children:n})})}function Wt(e){let{color:t,colorDark:n}=(0,c.useContext)(Vt);return(0,l.jsx)(i.FloatingFormulasBg,{color:t,colorDark:n,...e})}function Gt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`relative z-20 flex flex-col items-center w-full max-w-lg px-6 py-6 ${t??``}`,...n,children:e})}function Kt({current:e,total:t,className:n,...r}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in flex items-center gap-2 mb-4 ${n??``}`,role:`group`,"aria-label":`Step ${e} of ${t}`,...r,children:Array.from({length:t},(t,n)=>(0,l.jsx)(`span`,{className:n+1<=e?`vig-sf__step vig-sf__step--active`:`vig-sf__step`,"aria-current":n+1===e?`step`:void 0},`step-${n+1}`))})}function qt({children:e,pulsePaused:t,size:n=80,className:r,style:i,...a}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in mb-4 ${r??``}`,style:i,...a,children:(0,l.jsx)(R,{paused:t,children:(0,l.jsx)(`div`,{className:`flex items-center justify-center rounded-3xl bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm shadow-xl ring-1 ring-[rgba(var(--ff-color-rgb,37,99,235),0.2)] dark:ring-[rgba(var(--ff-color-dark-rgb,96,165,250),0.2)]`,style:{width:n,height:n},children:e})})})}function Jt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in-d1 text-center mb-2`,children:(0,l.jsx)(`h1`,{className:`text-3xl font-bold tracking-tight bg-clip-text text-transparent vig-sf__title-gradient ${t??``}`,...n,children:e})})}function Yt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in-d1 text-center mb-5`,children:(0,l.jsx)(`p`,{className:`text-sm text-slate-500 dark:text-slate-400 max-w-md leading-relaxed ${t??``}`,...n,children:e})})}function Xt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in-d2 w-full ${t??``}`,...n,children:(0,l.jsx)(L,{children:e})})}function Zt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in-d3 w-full mt-4 flex items-center justify-between gap-3 ${t??``}`,...n,children:e})}function Qt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in-d3 mt-6 text-center`,children:(0,l.jsx)(`p`,{className:`text-xs text-slate-400 dark:text-slate-500 ${t??``}`,...n,children:e})})}function $t({icon:e,children:t,className:n,...r}){return(0,l.jsxs)(`div`,{className:`vig-sf__hint flex items-start gap-2 rounded-lg px-3 py-2 text-xs text-slate-600 dark:text-slate-300 ${n??``}`,...r,children:[e,(0,l.jsx)(`span`,{children:t})]})}var en=Object.assign(Ut,{Background:Wt,Content:Gt,Steps:Kt,Logo:qt,Title:Jt,Description:Yt,Card:Xt,Actions:Zt,Footer:Qt,Hint:$t});function tn({logo:e,productName:t,version:n,links:r=[]}){return(0,l.jsxs)(`footer`,{className:`mt-auto`,children:[(0,l.jsx)(`div`,{className:`mx-6 border-t`}),(0,l.jsxs)(`div`,{className:`px-6 py-3 flex items-center justify-center gap-2 flex-wrap`,children:[e,(0,l.jsxs)(`span`,{className:`text-xs text-muted-foreground/70`,children:[t,n?` ${n}`:``]}),r.map(e=>(0,l.jsxs)(c.default.Fragment,{children:[(0,l.jsx)(`span`,{className:`text-xs text-muted-foreground/40`,children:`·`}),(0,l.jsx)(`a`,{href:e.href,target:`_blank`,rel:`noopener noreferrer`,className:`text-[11px] text-muted-foreground/50 hover:text-muted-foreground transition-colors`,children:e.label})]},e.label))]})]})}function nn({open:e,onToggle:t,apps:n,triggerTitle:r=`Apps`,closeLabel:i=`Close app switcher`,showTrigger:a=!0,headerHeight:o=56}){let s={top:`${o}px`,height:`calc(100vh - ${o}px)`};return(0,l.jsxs)(l.Fragment,{children:[a&&(0,l.jsx)(`button`,{type:`button`,title:r,onClick:t,className:`inline-flex items-center justify-center rounded-full w-9 h-9 transition-colors ${e?`text-foreground bg-accent`:`text-muted-foreground hover:text-foreground hover:bg-accent`}`,children:(0,l.jsx)(se,{className:`h-5 w-5`})}),e&&(0,l.jsx)(`button`,{type:`button`,className:`fixed inset-0 z-40 cursor-default bg-transparent border-none`,onClick:t,onKeyDown:e=>e.key===`Escape`&&t(),"aria-label":i}),e&&(0,l.jsx)(`div`,{className:`vg-app-switcher-panel fixed right-0 z-50 w-72 border-l border-border bg-card shadow-xl overflow-y-auto`,style:s,children:(0,l.jsx)(`div`,{className:`p-4`,children:n.map(e=>(0,l.jsx)(rn,{app:e,onToggle:t},e.id))})})]})}function rn({app:e,onToggle:n}){let{t:r}=(0,_.useTranslation)(),i=e.name.includes(`.`)?r(e.name,{defaultValue:e.name}):e.name;return(0,l.jsxs)(`a`,{href:e.href,target:e.external?`_blank`:void 0,rel:e.external?`noopener noreferrer`:void 0,onClick:n,className:`flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors ${e.active?`bg-accent font-medium`:`hover:bg-accent`}`,children:[e.active&&(0,l.jsx)(t.V,{className:`h-4 w-4 text-[var(--vg-brand,#C2410C)] shrink-0`}),e.image?(0,l.jsx)(`img`,{src:e.image,alt:``,"aria-hidden":`true`,className:`${e.active?``:`ml-7`} shrink-0 w-7 h-7 object-contain`}):(0,l.jsx)(`div`,{className:`${e.active?``:`ml-7`} shrink-0 w-7 h-7 rounded-[18%] bg-[#f5deb3] dark:bg-amber-900/40 p-0.5`,children:(0,l.jsx)(`div`,{className:`w-full h-full rounded-[14%] ${e.iconBg??`bg-muted`} flex items-center justify-center text-white`,children:e.icon})}),(0,l.jsx)(`span`,{className:`text-sm flex-1`,children:i}),e.external&&(0,l.jsx)(ie,{className:`h-3.5 w-3.5 text-muted-foreground`})]})}var J=new class{status=`online`;listeners=new Set;get current(){return this.status}set(e){e!==this.status&&(this.status=e,this.listeners.forEach(t=>t(e)))}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}};function an(){J.set(`offline`)}function on(){J.set(`online`)}var sn=(0,c.createContext)(null);function cn(){let e=(0,c.useContext)(sn);if(!e)throw Error(`useBackendStatus must be used inside <BackendStatusProvider>`);return e}function ln({healthEndpoint:e=`/api/v2/ping`,pollInterval:t=5e3,showBanner:n=!0,children:r}){let[i,a]=(0,c.useState)(J.current);(0,c.useEffect)(()=>J.subscribe(a),[]);let o=(0,c.useCallback)(async()=>{J.set(`checking`);try{await D.default.get(e,{timeout:4e3}),J.set(`online`)}catch{J.set(`offline`)}},[e]);return(0,c.useEffect)(()=>{if(i===`online`)return;let e=setInterval(o,t);return()=>clearInterval(e)},[i,t,o]),(0,l.jsxs)(sn.Provider,{value:{status:i,retry:o},children:[n&&(0,l.jsx)(un,{}),r]})}function un(){let{status:e,retry:n}=cn(),{t:r}=(0,_.useTranslation)();if(e===`online`)return null;let i=e===`checking`;return(0,l.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`sticky top-0 z-50 w-full border-b border-amber-500/30 bg-amber-500/10 backdrop-blur supports-[backdrop-filter]:bg-amber-500/15 text-amber-900 dark:text-amber-100`,children:(0,l.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-2 text-sm`,children:[i?(0,l.jsx)(g.IconLoader2,{className:`size-4 animate-spin shrink-0`}):(0,l.jsx)(g.IconAlertTriangle,{className:`size-4 shrink-0`}),(0,l.jsx)(`span`,{className:`flex-1`,children:r(i?`backendStatus.checking`:`backendStatus.offline`,i?`Reconnecting to the server...`:`Server unavailable. Retrying...`)}),(0,l.jsxs)(t.u,{type:`button`,variant:`ghost`,size:`sm`,onClick:n,disabled:i,className:`text-amber-900 dark:text-amber-100 hover:bg-amber-500/20`,children:[(0,l.jsx)(g.IconRefresh,{className:`size-4 ${i?`animate-spin`:``}`}),r(`backendStatus.retry`,`Retry now`)]})]})})}var dn=class extends c.default.Component{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`ErrorBoundary caught an error:`,e,t)}reset=()=>{this.setState({hasError:!1,error:void 0})};render(){if(!this.state.hasError)return this.props.children;let e=this.state.error??Error(`Unknown error`);return this.props.fallback?this.props.fallback({error:e,reset:this.reset}):(0,l.jsx)(fn,{error:e})}};function fn({error:e}){let{t:n}=(0,_.useTranslation)();return(0,l.jsx)(`div`,{className:`flex items-center justify-center min-h-[80vh] px-6 py-16`,children:(0,l.jsx)(`div`,{className:`relative w-full max-w-md overflow-hidden rounded-2xl border border-border/50 bg-card/80 backdrop-blur-sm shadow-xl`,children:(0,l.jsxs)(`div`,{className:`relative flex flex-col items-center text-center px-8 py-12 space-y-6`,children:[(0,l.jsxs)(`div`,{className:`relative`,children:[(0,l.jsx)(`div`,{className:`absolute inset-0 rounded-2xl bg-gradient-to-br from-red-500/20 to-rose-500/20 blur-xl animate-pulse`}),(0,l.jsx)(`div`,{className:`relative inline-flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-red-600 to-rose-600 shadow-lg shadow-red-500/25 ring-4 ring-red-500/10`,children:(0,l.jsx)(g.IconAlertTriangleFilled,{className:`text-white`,size:30})})]}),(0,l.jsxs)(`div`,{className:`space-y-2`,children:[(0,l.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:n(`errorBoundary.title`,`Something went wrong`)}),(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground leading-relaxed max-w-xs mx-auto`,children:n(`errorBoundary.description`,`An unexpected error occurred. Try reloading the page.`)}),e.message&&(0,l.jsx)(`pre`,{className:`mt-3 text-xs text-left text-muted-foreground bg-muted/40 rounded-md p-3 max-h-32 overflow-auto whitespace-pre-wrap break-words`,children:e.message})]}),(0,l.jsxs)(t.u,{size:`lg`,onClick:()=>window.location.reload(),children:[(0,l.jsx)(g.IconRefresh,{className:`size-4`}),n(`errorBoundary.reload`,`Reload page`)]})]})})})}function pn({value:e,onValueChange:r,locales:i,extraLocaleValues:a=[],placeholder:o,className:s}){let{t:c}=(0,_.useTranslation)(),u=o??c(`forms.common.chooseLanguage`),d=new Map;i.forEach(e=>{d.set(e.initials,{name:e.en,label:`${e.en}`})}),a.forEach(e=>{e&&!d.has(e)&&d.set(e,{name:e,label:e})});let f=Array.from(d.entries()).map(([e,t])=>({value:e,name:t.name,label:t.label})),p=f.find(t=>t.value===e);return(0,l.jsxs)(n.U,{value:e,onValueChange:r,children:[(0,l.jsx)(n.Z,{className:s,"aria-label":u,children:p?(0,l.jsxs)(`div`,{className:`flex items-center gap-2 truncate`,children:[(0,l.jsx)(t.t,{locale:p.value}),(0,l.jsx)(`span`,{className:`truncate`,children:p.label})]}):(0,l.jsx)(`span`,{className:`text-muted-foreground`,children:u})}),(0,l.jsx)(n.W,{children:f.map(e=>(0,l.jsx)(n.K,{value:e.value,children:(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(t.t,{locale:e.value}),(0,l.jsx)(`span`,{children:e.label})]})},e.value))})]})}var mn=[{code:`en`,label:`English`,flag:`🇺🇸`},{code:`pt`,label:`Português`,flag:`🇧🇷`}];function hn({languages:e=mn}){let{i18n:n,t:r}=(0,_.useTranslation)();return(0,l.jsxs)(t.f,{children:[(0,l.jsx)(t.E,{asChild:!0,children:(0,l.jsxs)(t.u,{variant:`outline`,size:`sm`,children:[(0,l.jsx)(oe,{className:`h-[1.2rem] w-[1.2rem]`}),(0,l.jsx)(`span`,{className:`sr-only`,children:r(`language.toggle`,`Change language`)})]})}),(0,l.jsx)(t.m,{align:`end`,children:e.map(e=>(0,l.jsxs)(t.g,{onClick:()=>n.changeLanguage(e.code),className:n.language===e.code?`font-semibold bg-accent`:``,children:[e.flag&&(0,l.jsx)(`span`,{className:`mr-2`,children:e.flag}),e.label]},e.code))})]})}function gn({items:e,...t}){return(0,l.jsx)(n.d,{...t,children:(0,l.jsx)(n.p,{children:(0,l.jsx)(n.v,{children:e.map(e=>(0,l.jsx)(n.S,{children:(0,l.jsx)(n.x,{asChild:!0,children:(0,l.jsxs)(`a`,{href:e.url,children:[(0,l.jsx)(e.icon,{}),(0,l.jsx)(`span`,{children:e.title})]})})},e.title))})})})}var _n={cloud:`https://console.viglet.cloud`,turing:`https://turing.viglet.cloud`,shio:`https://shio.viglet.cloud`,dumont:`https://dumont.viglet.cloud`,docs:`https://docs.viglet.org`};function vn({open:e,onToggle:t,activeProduct:n,urls:r,triggerTitle:i,closeLabel:o,headerHeight:s=56}){let{t:c}=(0,_.useTranslation)(),u={..._n,...r},d=[{id:`cloud`,name:`Viglet Cloud`,icon:(0,l.jsx)(re,{className:`h-4 w-4`}),iconBg:`bg-linear-to-br from-[#C2410C] to-[#F97316]`,href:n===`cloud`?`/`:u.cloud,external:n!==`cloud`,active:n===`cloud`},{id:`turing`,name:`Turing ES`,image:a.i,href:n===`turing`?`/`:u.turing,external:n!==`turing`,active:n===`turing`},{id:`shio`,name:`Shio CMS`,image:a.r,href:n===`shio`?`/`:u.shio,external:n!==`shio`,active:n===`shio`},{id:`dumont`,name:`Dumont DEP`,image:a.n,href:n===`dumont`?`/`:u.dumont,external:n!==`dumont`,active:n===`dumont`},{id:`docs`,name:c(`common.docs`,{defaultValue:`Documentation`}),icon:(0,l.jsx)(te,{className:`h-4 w-4`}),iconBg:`bg-linear-to-br from-violet-500 to-purple-600`,href:u.docs,external:!0}],f=i??c(`common.apps`,{defaultValue:`Apps`});return(0,l.jsx)(nn,{open:e,onToggle:t,apps:d,triggerTitle:f,closeLabel:o??f,headerHeight:s})}var yn={en:O.enUS,pt:O.ptBR};function bn(){let{i18n:e}=(0,_.useTranslation)();return(0,c.useMemo)(()=>yn[e.language?.substring(0,2)]??O.enUS,[e.language])}function xn(e,t){let{id:n,name:r,description:i,url:a,icon:o}=t;return(0,c.useMemo)(()=>{if(!Array.isArray(e)||e.length===0)return[];let t=(e,t)=>{if(typeof t==`function`)return t(e);let n=e[t];return n==null?``:String(n)},s=e=>{if(!n){let t=e.id;return t==null?``:String(t)}return String(typeof n==`function`?n(e):e[n])};return e.map(e=>({id:s(e),name:t(e,r),description:t(e,i),url:a(e),icon:o&&t(e,o)||null}))},[e,n,r,i,a,o])}function Sn(e){let t=n.r()?.setItems,r=(0,c.useRef)([]);(0,c.useEffect)(()=>{if(e===void 0||!t)return;let n=typeof e==`string`?[{label:e}]:Array.isArray(e)?e:[e],i=r.current;i.length===n.length&&i.every((e,t)=>e.label===n[t].label&&e.href===n[t].href)||t(e=>{let t=i.length>0?e.indexOf(i[0]):-1,a=t>=0?e.slice(0,t):e,o=t>=0?e.slice(t+i.length):[],s=0;for(let e=Math.min(n.length,a.length);e>0;--e)if(a.slice(a.length-e).every((e,t)=>e.label===n[t].label)){s=e;break}let c=n.slice(s);return r.current=c,t<0&&c.length===0?e:[...a,...c,...o]})},[e,t]),(0,c.useEffect)(()=>()=>{let e=r.current;e.length>0&&t&&t(t=>{let n=t.indexOf(e[0]);return n>=0?[...t.slice(0,n),...t.slice(n+e.length)]:t}),r.current=[]},[t])}var Y=`X-XSRF-TOKEN`,Cn=`/csrf`,X=null,Z=D.default.create({withCredentials:!0});function wn(e){return[`post`,`put`,`delete`,`patch`].includes(e?.toLowerCase()||``)}function Q(e){return e?typeof e==`object`&&e&&`get`in e&&typeof e.get==`function`?e.get(Y)||null:typeof e==`object`&&e&&e[Y.toLowerCase()]||null:null}function Tn(e,t){if(typeof e.headers==`object`&&e.headers!==null&&`set`in e.headers&&typeof e.headers.set==`function`){e.headers.set(Y,t);return}let n=e.headers||{};n[Y]=t,e.headers=n}function En(){X=null,$=null}function Dn(){let e=/(?:^|;\s*)XSRF-TOKEN=([^;]+)/.exec(globalThis.document.cookie);return e?decodeURIComponent(e[1]):null}var $=null;async function On(){Z.defaults.baseURL=D.default.defaults.baseURL;let e=await Z.get(Cn),t=Q(e.headers),n=typeof e.data==`object`&&e.data!==null?e.data.token:void 0,r=Dn();X=t||n||r||null}async function kn(){if(!X){if(!$){let e=On().finally(()=>{$===e&&($=null)});$=e}await $}}function An(e={}){let t=e.loginPath??`/login`;e.baseURL&&(D.default.defaults.baseURL=e.baseURL),D.default.defaults.withCredentials=!0,D.default.defaults.xsrfCookieName=`XSRF-TOKEN`,D.default.defaults.xsrfHeaderName=Y,D.default.interceptors.request.use(async e=>{let t=e.url||``,n=e.baseURL||D.default.defaults.baseURL;if(Z.defaults.baseURL=n,t.includes(Cn)||!wn(e.method))return e;if(X||await kn(),!X)throw Error(`Unable to obtain CSRF token for mutating request.`);return Tn(e,X),e},e=>Promise.reject(e)),D.default.interceptors.response.use(e=>{let t=Q(e.headers);return t&&(X=t),e},async e=>{let n=Q(e.response?.headers);n&&(X=n);let r=e.config;if(e.response?.status===403&&r&&!r._csrfRetried&&wn(r.method)){if(r._csrfRetried=!0,En(),Z.defaults.baseURL=r.baseURL||D.default.defaults.baseURL,await kn(),!X)throw e;return Tn(r,X),D.default.request(r)}if(e.response?.status===401&&!globalThis.location.pathname.startsWith(t)){let e=globalThis.location.pathname+globalThis.location.search;globalThis.location.href=`${t}?returnUrl=${encodeURIComponent(e)}`}throw e})}var jn=/[[\]:*?/\\]/g,Mn=31;function Nn(e){return e.replace(jn,` `).trim().slice(0,Mn)||`Sheet1`}function Pn(e){return Array.isArray(e)?e.join(`, `):e instanceof Date?e.toISOString():e}function Fn(e,t,n,r){let i=t.map(e=>e.label),a=e.map(e=>t.map(t=>Pn(e[t.key]))),o=k.utils.aoa_to_sheet([i,...a]);o[`!cols`]=t.map((e,t)=>{let n=e.label.length;for(let e of a){let r=String(e[t]??``).length;r>n&&(n=r)}return{wch:Math.min(Math.max(n+2,12),60)}});let s=k.utils.book_new();k.utils.book_append_sheet(s,o,Nn(r??n)),k.writeFile(s,`${n}.xlsx`)}exports.Accordion=ce,exports.AccordionContent=de,exports.AccordionItem=le,exports.AccordionTrigger=ue,exports.AppFooter=tn,exports.AppSwitcher=nn,exports.Avatar=n.pt,exports.AvatarFallback=n.mt,exports.AvatarImage=n.ht,exports.BackendStatusBanner=un,exports.BackendStatusProvider=ln,exports.Badge=t.L,exports.BadgeColorful=t.r,exports.BadgeLocale=t.t,exports.Breadcrumb=n.ot,exports.BreadcrumbEllipsis=n.st,exports.BreadcrumbItem=n.ct,exports.BreadcrumbLink=n.lt,exports.BreadcrumbList=n.ut,exports.BreadcrumbPage=n.dt,exports.BreadcrumbProvider=n.t,exports.BreadcrumbSeparator=n.ft,exports.Button=r.c,exports.Card=n.$,exports.CardAction=n.et,exports.CardContent=n.tt,exports.CardDescription=n.nt,exports.CardFooter=n.rt,exports.CardHeader=n.it,exports.CardTitle=n.at,exports.Checkbox=fe,exports.Dialog=t.D,exports.DialogClose=t.O,exports.DialogContent=t.k,exports.DialogDescription=t.A,exports.DialogFooter=t.j,exports.DialogHeader=t.M,exports.DialogOverlay=t.N,exports.DialogPortal=t.P,exports.DialogTitle=t.F,exports.DialogTrigger=t.I,exports.Drawer=pe,exports.DrawerClose=ge,exports.DrawerContent=ve,exports.DrawerDescription=Se,exports.DrawerFooter=be,exports.DrawerHeader=ye,exports.DrawerOverlay=_e,exports.DrawerPortal=he,exports.DrawerTitle=xe,exports.DrawerTrigger=me,exports.DropdownMenu=t.f,exports.DropdownMenuCheckboxItem=t.p,exports.DropdownMenuContent=t.m,exports.DropdownMenuGroup=t.h,exports.DropdownMenuItem=t.g,exports.DropdownMenuLabel=t._,exports.DropdownMenuPortal=t.v,exports.DropdownMenuRadioGroup=t.y,exports.DropdownMenuRadioItem=t.b,exports.DropdownMenuSeparator=t.x,exports.DropdownMenuShortcut=t.S,exports.DropdownMenuSub=t.C,exports.DropdownMenuSubContent=t.w,exports.DropdownMenuSubTrigger=t.T,exports.DropdownMenuTrigger=t.E,exports.ErrorBoundary=dn,exports.FloatingFormulasBg=i.FloatingFormulasBg,exports.Form=we,exports.FormActions=I,exports.FormControl=Ee,exports.FormDescription=F,exports.FormField=Te,exports.FormItem=N,exports.FormItemTwoColumns=je,exports.FormLabel=P,exports.FormMessage=De,exports.GlassCard=L,exports.GradientButton=t.u,exports.GradientSwitch=Ne,exports.HoverCard=Fe,exports.HoverCardContent=Le,exports.HoverCardTrigger=Ie,exports.IconPickerDialog=r.s,exports.Input=t.l,exports.Label=Ce,exports.LanguageSelect=pn,exports.LanguageSwitcher=hn,exports.Login=Bt,exports.ModeToggle=n.i,exports.ModeToggleSidebar=n.a,exports.NavSecondary=gn,exports.NavigationMenu=Re,exports.NavigationMenuContent=Ue,exports.NavigationMenuIndicator=Ge,exports.NavigationMenuItem=Be,exports.NavigationMenuLink=We,exports.NavigationMenuList=ze,exports.NavigationMenuTrigger=He,exports.NavigationMenuViewport=z,exports.Pagination=Ke,exports.PaginationContent=B,exports.PaginationEllipsis=Ye,exports.PaginationItem=V,exports.PaginationLink=H,exports.PaginationNext=Je,exports.PaginationPrevious=qe,exports.Popover=Xe,exports.PopoverAnchor=$e,exports.PopoverContent=Qe,exports.PopoverTrigger=Ze,exports.Progress=et,exports.PulseRing=R,exports.ResizableHandle=rt,exports.ResizablePanel=nt,exports.ResizablePanelGroup=tt,exports.SectionCard=r.o,exports.Select=n.U,exports.SelectContent=n.W,exports.SelectGroup=n.G,exports.SelectItem=n.K,exports.SelectLabel=n.q,exports.SelectScrollDownButton=n.J,exports.SelectScrollUpButton=n.Y,exports.SelectSeparator=n.X,exports.SelectTrigger=n.Z,exports.SelectValue=n.Q,exports.Separator=n.H,exports.Sheet=n.P,exports.SheetClose=n.F,exports.SheetContent=n.I,exports.SheetDescription=n.L,exports.SheetFooter=n.R,exports.SheetHeader=n.z,exports.SheetTitle=n.B,exports.SheetTrigger=n.V,exports.Sidebar=n.c,exports.SidebarContent=n.l,exports.SidebarFooter=n.u,exports.SidebarGroup=n.d,exports.SidebarGroupAction=n.f,exports.SidebarGroupContent=n.p,exports.SidebarGroupLabel=n.m,exports.SidebarHeader=n.h,exports.SidebarInput=n.g,exports.SidebarInset=n._,exports.SidebarMenu=n.v,exports.SidebarMenuAction=n.y,exports.SidebarMenuBadge=n.b,exports.SidebarMenuButton=n.x,exports.SidebarMenuItem=n.S,exports.SidebarMenuSkeleton=n.C,exports.SidebarMenuSub=n.w,exports.SidebarMenuSubButton=n.T,exports.SidebarMenuSubItem=n.E,exports.SidebarProvider=n.D,exports.SidebarRail=n.O,exports.SidebarSeparator=n.k,exports.SidebarTrigger=n.A,exports.Skeleton=t.c,exports.Slider=ot,exports.StartupFirst=en,exports.Stepper=G,exports.StickySaveBar=U,exports.Switch=lt,exports.Table=ut,exports.TableBody=ft,exports.TableCaption=_t,exports.TableCell=gt,exports.TableFooter=pt,exports.TableHead=ht,exports.TableHeader=dt,exports.TableRow=mt,exports.Tabs=vt,exports.TabsContent=xt,exports.TabsList=yt,exports.TabsTrigger=bt,exports.Textarea=St,exports.ThemeProvider=n.o,exports.Toaster=r.a,exports.Toggle=Ct,exports.ToggleGroup=wt,exports.ToggleGroupItem=Tt,exports.Tooltip=t.i,exports.TooltipContent=t.a,exports.TooltipProvider=t.o,exports.TooltipTrigger=t.s,exports.UserAvatar=r.r,exports.UserMenu=Et,exports.UserProvider=r.t,exports.VigletAppSwitcher=vn,exports.badgeVariants=t.R,exports.buttonVariants=r.l,exports.cn=t.U,exports.exportToXlsx=Fn,exports.getFlagEmoji=t.W,exports.getHashedColor=t.G,exports.getLocaleCountryCode=t.n,exports.getUserInitials=r.i,exports.gradientButtonVariants=t.d,exports.initVigI18n=o.t,exports.navigationMenuTriggerStyle=Ve,exports.registerVigTranslations=o.n,exports.reportBackendOffline=an,exports.reportBackendOnline=on,exports.setupAxiosInterceptors=An,exports.toast=ee.toast,exports.toggleVariants=K,exports.truncateMiddle=t.K,exports.useBackendStatus=cn,exports.useBreadcrumb=n.n,exports.useBreadcrumbOptional=n.r,exports.useCurrentUser=r.n,exports.useDateLocale=bn,exports.useFormField=j,exports.useGridAdapter=xn,exports.useIsMobile=n.N,exports.useSidebar=n.j,exports.useSubPageBreadcrumb=Sn,exports.useTheme=n.s,exports.vigDesignSystemTranslations=o.r;
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.cjs"),t=require("./badge-locale-sIsBdP_e.cjs"),n=require("./breadcrumb.context-DYeZEC65.cjs"),r=require("./user.context-r50nSWER.cjs"),i=require("./floating-formulas-bg.cjs"),a=require("./products-DL_YYXkV.cjs"),o=require("./i18n-DoNdMLEd.cjs");let s=require("@radix-ui/react-accordion");s=e.t(s,1);let c=require("react");c=e.t(c,1);let l=require("react/jsx-runtime"),u=require("@radix-ui/react-slot"),d=require("class-variance-authority"),f=require("@radix-ui/react-checkbox");f=e.t(f,1);let p=require("vaul"),m=require("react-hook-form"),h=require("@radix-ui/react-label");h=e.t(h,1);let g=require("@tabler/icons-react"),_=require("react-i18next"),v=require("@radix-ui/react-switch");v=e.t(v,1);let y=require("@radix-ui/react-hover-card");y=e.t(y,1);let b=require("@radix-ui/react-navigation-menu");b=e.t(b,1);let x=require("radix-ui"),S=require("react-resizable-panels"),C=require("@radix-ui/react-slider");C=e.t(C,1);let w=require("@radix-ui/react-tabs");w=e.t(w,1);let T=require("@radix-ui/react-toggle");T=e.t(T,1);let E=require("@radix-ui/react-toggle-group");E=e.t(E,1);let D=require("axios");D=e.t(D,1);let O=require("date-fns/locale"),k=require("xlsx");k=e.t(k,1);let ee=require("sonner");var te=t.H(`book`,[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),ne=t.H(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),re=t.H(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),ie=t.H(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),ae=t.H(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),oe=t.H(`languages`,[[`path`,{d:`m5 8 6 6`,key:`1wu5hv`}],[`path`,{d:`m4 14 6-6 2-3`,key:`1k1g8d`}],[`path`,{d:`M2 5h12`,key:`or177f`}],[`path`,{d:`M7 2h1`,key:`1t2jsx`}],[`path`,{d:`m22 22-5-10-5 10`,key:`don7ne`}],[`path`,{d:`M14 18h6`,key:`1m8k6r`}]]),se=t.H(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),ce=s.Root,le=c.forwardRef(({className:e,...n},r)=>(0,l.jsx)(s.Item,{ref:r,className:t.U(`border-b`,e),...n}));le.displayName=`AccordionItem`;var ue=c.forwardRef(({className:e,children:r,...i},a)=>(0,l.jsx)(s.Header,{className:`flex`,children:(0,l.jsxs)(s.Trigger,{ref:a,className:t.U(`flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180`,e),...i,children:[r,(0,l.jsx)(n._t,{className:`h-4 w-4 shrink-0 transition-transform duration-200`})]})}));ue.displayName=s.Trigger.displayName;var de=c.forwardRef(({className:e,children:n,...r},i)=>(0,l.jsx)(s.Content,{ref:i,className:`overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...r,children:(0,l.jsx)(`div`,{className:t.U(`pb-4 pt-0`,e),children:n})}));de.displayName=s.Content.displayName;function fe({className:e,...n}){return(0,l.jsx)(f.Root,{"data-slot":`checkbox`,className:t.U(`peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...n,children:(0,l.jsx)(f.Indicator,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,l.jsx)(t.V,{className:`size-3.5`})})})}function pe({...e}){return(0,l.jsx)(p.Drawer.Root,{"data-slot":`drawer`,...e})}function me({...e}){return(0,l.jsx)(p.Drawer.Trigger,{"data-slot":`drawer-trigger`,...e})}function he({...e}){return(0,l.jsx)(p.Drawer.Portal,{"data-slot":`drawer-portal`,...e})}function ge({...e}){return(0,l.jsx)(p.Drawer.Close,{"data-slot":`drawer-close`,...e})}function _e({className:e,...n}){return(0,l.jsx)(p.Drawer.Overlay,{"data-slot":`drawer-overlay`,className:t.U(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...n})}function ve({className:e,children:n,...r}){return(0,l.jsxs)(he,{"data-slot":`drawer-portal`,children:[(0,l.jsx)(_e,{}),(0,l.jsxs)(p.Drawer.Content,{"data-slot":`drawer-content`,className:t.U(`group/drawer-content bg-background fixed z-50 flex h-auto flex-col`,`data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b`,`data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t`,`data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm`,`data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm`,e),...r,children:[(0,l.jsx)(`div`,{className:`bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block`}),n]})]})}function ye({className:e,...n}){return(0,l.jsx)(`div`,{"data-slot":`drawer-header`,className:t.U(`flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left`,e),...n})}function be({className:e,...n}){return(0,l.jsx)(`div`,{"data-slot":`drawer-footer`,className:t.U(`mt-auto flex flex-col gap-2 p-4`,e),...n})}function xe({className:e,...n}){return(0,l.jsx)(p.Drawer.Title,{"data-slot":`drawer-title`,className:t.U(`text-foreground font-semibold`,e),...n})}function Se({className:e,...n}){return(0,l.jsx)(p.Drawer.Description,{"data-slot":`drawer-description`,className:t.U(`text-muted-foreground text-sm`,e),...n})}function Ce({className:e,...n}){return(0,l.jsx)(h.Root,{"data-slot":`label`,className:t.U(`flex items-center gap-2 text-sm leading-none font-medium text-foreground select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...n})}var we=m.FormProvider,A=c.createContext({}),Te=({...e})=>{let t=!!e.rules?.required,n=c.useMemo(()=>({name:e.name,required:t}),[e.name,t]);return(0,l.jsx)(A.Provider,{value:n,children:(0,l.jsx)(m.Controller,{...e})})},j=()=>{let e=c.useContext(A),t=c.useContext(M),{getFieldState:n}=(0,m.useFormContext)(),r=(0,m.useFormState)({name:e.name}),i=n(e.name,r);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:a}=t;return{id:a,name:e.name,required:e.required,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},M=c.createContext({});function N({className:e,...n}){let r=c.useId(),i=c.useMemo(()=>({id:r}),[r]);return(0,l.jsx)(M.Provider,{value:i,children:(0,l.jsx)(`div`,{"data-slot":`form-item`,className:t.U(`grid gap-2`,e),...n})})}function P({className:e,children:n,...r}){let{error:i,formItemId:a,required:o}=j();return(0,l.jsxs)(Ce,{"data-slot":`form-label`,"data-error":!!i,className:t.U(`data-[error=true]:text-destructive`,e),htmlFor:a,...r,children:[n,o?(0,l.jsx)(`span`,{className:`text-destructive`,children:` *`}):null]})}function Ee({...e}){let{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=j();return(0,l.jsx)(u.Slot,{"data-slot":`form-control`,id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})}function F({className:e,...n}){let{formDescriptionId:r}=j();return(0,l.jsx)(`p`,{"data-slot":`form-description`,id:r,className:t.U(`text-muted-foreground text-sm`,e),...n})}function De({className:e,...n}){let{error:r,formMessageId:i}=j(),a=r?String(r?.message??``):n.children;return a?(0,l.jsx)(`p`,{"data-slot":`form-message`,id:i,className:t.U(`text-destructive text-sm`,e),...n,children:a}):null}function I({children:e,className:n}){return(0,l.jsx)(`div`,{className:t.U(`flex items-center justify-end gap-3 pt-4 border-t`,n),children:e})}function Oe({onClick:e,children:n,className:r}){let{t:i}=(0,_.useTranslation)();return(0,l.jsxs)(t.u,{type:`button`,variant:`outline`,onClick:e,className:r,children:[(0,l.jsx)(g.IconX,{className:`size-4`}),n??i(`forms.formActions.cancel`)]})}function ke({loading:e,disabled:n,children:r,className:i}){let{t:a}=(0,_.useTranslation)();return(0,l.jsxs)(t.u,{type:`submit`,disabled:n||e,className:i,children:[e?(0,l.jsx)(g.IconLoader2,{className:`size-4 animate-spin`}):(0,l.jsx)(g.IconDeviceFloppy,{className:`size-4`}),r??a(`forms.formActions.saveChanges`)]})}function Ae({onClick:e,children:n,className:r}){let{t:i}=(0,_.useTranslation)();return(0,l.jsxs)(t.u,{type:`button`,variant:`outline`,onClick:e,className:t.U(`md:hidden text-destructive border-destructive/30 hover:bg-destructive/10 mr-auto`,r),children:[(0,l.jsx)(g.IconTrash,{className:`size-4`}),n??i(`forms.formActions.delete`)]})}I.Cancel=Oe,I.Submit=ke,I.Delete=Ae;var je=Object.assign(({className:e,...n})=>(0,l.jsx)(N,{children:(0,l.jsx)(`div`,{className:t.U(`flex w-full flex-row items-center gap-4`,e),...n})}),{Left:({className:e,...n})=>(0,l.jsx)(`div`,{className:t.U(`flex w-1/2 flex-col gap-1`,e),...n}),Right:({className:e,...n})=>(0,l.jsx)(`div`,{className:t.U(`flex w-1/2 justify-end`,e),...n}),Label:({className:e,...n})=>(0,l.jsx)(P,{className:t.U(e),...n}),Description:({className:e,...n})=>(0,l.jsx)(F,{className:t.U(e),...n})}),Me=(0,d.cva)(`peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,{variants:{variant:{default:[`data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-[var(--vg-accent-fill-from)] data-[state=checked]:to-[var(--vg-accent-fill-to)]`,`data-[state=unchecked]:bg-input`,`focus-visible:ring-[var(--vg-accent-ring)]`,`dark:data-[state=unchecked]:bg-input/80`].join(` `),secondary:[`data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-slate-600 data-[state=checked]:to-slate-700`,`data-[state=unchecked]:bg-input`,`focus-visible:ring-slate-500/50`,`dark:data-[state=checked]:from-slate-500 dark:data-[state=checked]:to-slate-600`,`dark:data-[state=unchecked]:bg-input/80`,`dark:focus-visible:ring-slate-400/50`].join(` `),destructive:[`data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-red-600 data-[state=checked]:to-rose-600`,`data-[state=unchecked]:bg-input`,`focus-visible:ring-red-500/50`,`dark:data-[state=checked]:from-red-500 dark:data-[state=checked]:to-rose-500`,`dark:data-[state=unchecked]:bg-input/80`,`dark:focus-visible:ring-red-400/50`].join(` `),success:[`data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-emerald-600 data-[state=checked]:to-teal-600`,`data-[state=unchecked]:bg-input`,`focus-visible:ring-emerald-500/50`,`dark:data-[state=checked]:from-emerald-500 dark:data-[state=checked]:to-teal-500`,`dark:data-[state=unchecked]:bg-input/80`,`dark:focus-visible:ring-emerald-400/50`].join(` `)}},defaultVariants:{variant:`default`}});function Ne({className:e,variant:n,...r}){return(0,l.jsx)(v.Root,{"data-slot":`gradient-switch`,className:t.U(Me({variant:n}),e),...r,children:(0,l.jsx)(v.Thumb,{"data-slot":`gradient-switch-thumb`,className:t.U(`bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-primary-foreground`)})})}var Pe=`rounded-2xl p-6 sm:p-8`;function L({children:e,color:n,colorDark:r,className:i,style:a,...o}){let s={};return n&&(s[`--glass-card-color`]=n),r?s[`--glass-card-color-dark`]=r:n&&(s[`--glass-card-color-dark`]=n),(0,l.jsx)(`div`,{className:t.U(`vig-glass-card`,Pe,i),style:{...a??{},...s},...o,children:e})}function R({children:e,color:t,colorDark:n,paused:r,className:i,style:a,...o}){let s={};return t&&(s[`--pulse-ring-color`]=t),n?s[`--pulse-ring-color-dark`]=n:t&&(s[`--pulse-ring-color-dark`]=t),(0,l.jsx)(`div`,{className:`vig-pulse-ring ${r?``:`vig-pulse-ring--active`} ${i??``}`,style:{...a??{},...s},...o,children:e})}var Fe=y.Root,Ie=y.Trigger,Le=c.forwardRef(({className:e,align:n=`center`,sideOffset:r=4,...i},a)=>(0,l.jsx)(y.Content,{ref:a,align:n,sideOffset:r,className:t.U(`z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,e),...i}));Le.displayName=y.Content.displayName;function Re({className:e,children:n,viewport:r=!0,...i}){return(0,l.jsxs)(b.Root,{"data-slot":`navigation-menu`,"data-viewport":r,className:t.U(`group/navigation-menu relative flex max-w-max flex-1 items-center justify-center`,e),...i,children:[n,r&&(0,l.jsx)(z,{})]})}function ze({className:e,...n}){return(0,l.jsx)(b.List,{"data-slot":`navigation-menu-list`,className:t.U(`group flex flex-1 list-none items-center justify-center gap-1`,e),...n})}function Be({className:e,...n}){return(0,l.jsx)(b.Item,{"data-slot":`navigation-menu-item`,className:t.U(`relative`,e),...n})}var Ve=(0,d.cva)(`group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1`);function He({className:e,children:r,...i}){return(0,l.jsxs)(b.Trigger,{"data-slot":`navigation-menu-trigger`,className:t.U(Ve(),`group`,e),...i,children:[r,` `,(0,l.jsx)(n._t,{className:`relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180`,"aria-hidden":`true`})]})}function Ue({className:e,...n}){return(0,l.jsx)(b.Content,{"data-slot":`navigation-menu-content`,className:t.U(`data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto`,`group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none`,e),...n})}function z({className:e,...n}){return(0,l.jsx)(`div`,{className:t.U(`absolute top-full left-0 isolate z-50 flex justify-center`),children:(0,l.jsx)(b.Viewport,{"data-slot":`navigation-menu-viewport`,className:t.U(`origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]`,e),...n})})}function We({className:e,...n}){return(0,l.jsx)(b.Link,{"data-slot":`navigation-menu-link`,className:t.U(`data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4`,e),...n})}function Ge({className:e,...n}){return(0,l.jsx)(b.Indicator,{"data-slot":`navigation-menu-indicator`,className:t.U(`data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden`,e),...n,children:(0,l.jsx)(`div`,{className:`bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md`})})}function Ke({className:e,...n}){return(0,l.jsx)(`nav`,{role:`navigation`,"aria-label":`pagination`,className:t.U(`mx-auto flex w-full justify-center`,e),...n})}var B=c.forwardRef(({className:e,...n},r)=>(0,l.jsx)(`ol`,{ref:r,className:t.U(`flex flex-row items-center gap-1`,e),...n}));B.displayName=`PaginationContent`;var V=c.forwardRef(({className:e,...n},r)=>(0,l.jsx)(`li`,{ref:r,className:t.U(``,e),...n}));V.displayName=`PaginationItem`;function H({className:e,isActive:n,size:i=`icon`,children:a,...o}){return(0,l.jsx)(`a`,{"aria-current":n?`page`:void 0,className:t.U(r.l({variant:n?`outline`:`ghost`,size:i}),n&&`bg-accent text-accent-foreground`,e),...o,children:a})}function qe({className:e,...n}){return(0,l.jsxs)(H,{"aria-label":`Go to previous page`,size:`default`,className:t.U(`gap-1 pl-2.5`,e),...n,children:[(0,l.jsx)(ne,{className:`h-4 w-4`}),(0,l.jsx)(`span`,{children:`Previous`})]})}function Je({className:e,...n}){return(0,l.jsxs)(H,{"aria-label":`Go to next page`,size:`default`,className:t.U(`gap-1 pr-2.5`,e),...n,children:[(0,l.jsx)(`span`,{children:`Next`}),(0,l.jsx)(t.B,{className:`h-4 w-4`})]})}function Ye({className:e,...r}){return(0,l.jsxs)(`span`,{"aria-hidden":`true`,className:t.U(`flex h-9 w-9 items-center justify-center`,e),...r,children:[(0,l.jsx)(n.gt,{className:`h-4 w-4`}),(0,l.jsx)(`span`,{className:`sr-only`,children:`More pages`})]})}function Xe({...e}){return(0,l.jsx)(x.Popover.Root,{"data-slot":`popover`,...e})}function Ze({...e}){return(0,l.jsx)(x.Popover.Trigger,{"data-slot":`popover-trigger`,...e})}function Qe({className:e,align:n=`center`,sideOffset:r=4,...i}){return(0,l.jsx)(x.Popover.Portal,{children:(0,l.jsx)(x.Popover.Content,{"data-slot":`popover-content`,align:n,sideOffset:r,className:t.U(`z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...i})})}function $e({...e}){return(0,l.jsx)(x.Popover.Anchor,{"data-slot":`popover-anchor`,...e})}function et({className:e,value:n,...r}){return(0,l.jsx)(x.Progress.Root,{"data-slot":`progress`,className:t.U(`relative h-2 w-full overflow-hidden rounded-full bg-primary/20`,e),...r,children:(0,l.jsx)(x.Progress.Indicator,{"data-slot":`progress-indicator`,className:`h-full w-full flex-1 bg-primary transition-all`,style:{transform:`translateX(-${100-(n||0)}%)`}})})}function tt({className:e,...n}){return(0,l.jsx)(S.Group,{"data-slot":`resizable-panel-group`,className:t.U(`flex h-full w-full data-[panel-group-orientation=vertical]:flex-col`,e),...n})}function nt({overflowHidden:e,className:n,...r}){return(0,l.jsx)(S.Panel,{"data-slot":`resizable-panel`,className:t.U(e&&`[&>div]:overflow-hidden!`,n),style:e?{overflow:`hidden`}:void 0,...r})}function rt({withHandle:e,className:n,...r}){return(0,l.jsx)(S.Separator,{"data-slot":`resizable-handle`,className:t.U(`bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:-left-2 after:-right-2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-orientation=vertical]:h-px data-[panel-group-orientation=vertical]:w-full data-[panel-group-orientation=vertical]:after:inset-x-0 data-[panel-group-orientation=vertical]:after:-top-2 data-[panel-group-orientation=vertical]:after:-bottom-2 [&[data-panel-group-direction=vertical]>div]:rotate-90`,n),...r,children:e&&(0,l.jsx)(`div`,{className:`bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border`,children:(0,l.jsx)(ae,{className:`size-2.5`})})})}var it={gray:`bg-gray-50 dark:bg-gray-950/30`,blue:`bg-blue-50 dark:bg-blue-950/30`,orange:`bg-orange-50 dark:bg-orange-950/30`,green:`bg-green-50 dark:bg-green-950/30`};function U({title:e,badges:n,actions:r,onCancel:i,loading:a,disabled:o,variant:s=`gray`}){let{t:c}=(0,_.useTranslation)();return(0,l.jsxs)(`div`,{className:`sticky top-0 z-10 border rounded-lg px-4 py-3 flex items-center justify-between gap-4 ${it[s]}`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[(0,l.jsx)(`h3`,{className:`text-lg font-semibold text-foreground truncate`,children:e}),n&&(0,l.jsx)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:n})]}),(0,l.jsx)(`div`,{className:`flex gap-2 shrink-0`,children:r??(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(t.u,{type:`submit`,size:`sm`,loading:a,disabled:o,children:[(0,l.jsx)(g.IconDeviceFloppy,{className:`size-4`}),c(`forms.formActions.saveChanges`)]}),i&&(0,l.jsxs)(t.u,{type:`button`,variant:`outline`,size:`sm`,onClick:i,children:[(0,l.jsx)(g.IconX,{className:`size-4`}),c(`forms.formActions.cancel`)]})]})})]})}function at({children:e}){return(0,l.jsx)(t.L,{variant:`outline`,className:`text-xs`,children:e})}U.Badge=at;function ot({className:e,defaultValue:n,value:r,min:i=0,max:a=100,"aria-label":o,"aria-labelledby":s,...u}){let d=c.useMemo(()=>Array.isArray(r)?r:Array.isArray(n)?n:[i,a],[r,n,i,a]);return(0,l.jsxs)(C.Root,{"data-slot":`slider`,defaultValue:n,value:r,min:i,max:a,className:t.U(`relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col`,e),...u,children:[(0,l.jsx)(C.Track,{"data-slot":`slider-track`,className:t.U(`bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5`),children:(0,l.jsx)(C.Range,{"data-slot":`slider-range`,className:t.U(`bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`)})}),Array.from({length:d.length},(e,t)=>(0,l.jsx)(C.Thumb,{"data-slot":`slider-thumb`,"aria-label":o&&d.length>1?`${o} ${t+1}`:o,"aria-labelledby":s,className:`border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50`},t))]})}var W=(0,c.createContext)({completedSteps:[],allDone:!1});function G({completedSteps:e,children:n,className:r}){let i=e.length>0&&e.every(Boolean);return(0,l.jsx)(W.Provider,{value:{completedSteps:e,allDone:i},children:(0,l.jsxs)(`div`,{className:t.U(`relative`,r),children:[(0,l.jsx)(`div`,{className:`stepper-line absolute left-3.75 top-4 bottom-4 w-0.5 rounded-full`}),n]})})}function st({index:e,children:n,className:r}){let{completedSteps:i}=(0,c.useContext)(W),a=i[e]??!1,o=e+1;return(0,l.jsxs)(`div`,{className:t.U(`relative flex items-start gap-4 pb-8`,r),children:[(0,l.jsx)(`div`,{className:`flex flex-col items-center`,children:(0,l.jsx)(`div`,{className:t.U(`relative z-10 flex h-8 w-8 items-center justify-center rounded-full text-xs font-bold transition-all duration-500`,a?`bg-emerald-500 text-white shadow-md shadow-emerald-500/30 scale-105`:`bg-primary text-primary-foreground`),children:a?(0,l.jsx)(g.IconCheck,{className:`h-4 w-4`}):o})}),(0,l.jsx)(`div`,{className:`flex-1 pt-0.5`,children:n})]})}function ct({readyLabel:e=`Ready to submit`,pendingLabel:n=`Complete all steps above`,className:r}){let{allDone:i}=(0,c.useContext)(W);return(0,l.jsxs)(`div`,{className:t.U(`relative flex items-center gap-4`,r),children:[(0,l.jsx)(`div`,{className:`flex flex-col items-center`,children:(0,l.jsx)(`div`,{className:t.U(`relative z-10 flex h-8 w-8 items-center justify-center rounded-full transition-all duration-700`,i?`stepper-ready bg-emerald-500 text-white shadow-lg shadow-emerald-500/40 scale-110`:`bg-muted text-muted-foreground/40`),children:(0,l.jsx)(g.IconCircleCheck,{className:`h-5 w-5`})})}),(0,l.jsx)(`span`,{className:t.U(`text-sm font-medium transition-all duration-500`,i?`text-emerald-600 dark:text-emerald-400`:`text-muted-foreground/40`),children:i?e:n})]})}G.Step=st,G.Completion=ct;function lt({className:e,...n}){return(0,l.jsx)(v.Root,{"data-slot":`switch`,className:t.U(`peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,e),...n,children:(0,l.jsx)(v.Thumb,{"data-slot":`switch-thumb`,className:t.U(`bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0`)})})}function ut({className:e,...n}){return(0,l.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,l.jsx)(`table`,{"data-slot":`table`,className:t.U(`w-full caption-bottom text-sm`,e),...n})})}function dt({className:e,...n}){return(0,l.jsx)(`thead`,{"data-slot":`table-header`,className:t.U(`[&_tr]:border-b`,e),...n})}function ft({className:e,...n}){return(0,l.jsx)(`tbody`,{"data-slot":`table-body`,className:t.U(`[&_tr:last-child]:border-0`,e),...n})}function pt({className:e,...n}){return(0,l.jsx)(`tfoot`,{"data-slot":`table-footer`,className:t.U(`bg-muted/50 border-t font-medium [&>tr]:last:border-b-0`,e),...n})}function mt({className:e,...n}){return(0,l.jsx)(`tr`,{"data-slot":`table-row`,className:t.U(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors`,e),...n})}function ht({className:e,...n}){return(0,l.jsx)(`th`,{"data-slot":`table-head`,className:t.U(`text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...n})}function gt({className:e,...n}){return(0,l.jsx)(`td`,{"data-slot":`table-cell`,className:t.U(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...n})}function _t({className:e,...n}){return(0,l.jsx)(`caption`,{"data-slot":`table-caption`,className:t.U(`text-muted-foreground mt-4 text-sm`,e),...n})}function vt({className:e,...n}){return(0,l.jsx)(w.Root,{"data-slot":`tabs`,className:t.U(`flex flex-col gap-2`,e),...n})}function yt({className:e,...n}){return(0,l.jsx)(w.List,{"data-slot":`tabs-list`,className:t.U(`bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]`,e),...n})}function bt({className:e,...n}){return(0,l.jsx)(w.Trigger,{"data-slot":`tabs-trigger`,className:t.U(`data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...n})}function xt({className:e,...n}){return(0,l.jsx)(w.Content,{"data-slot":`tabs-content`,className:t.U(`flex-1 outline-none`,e),...n})}function St({className:e,...n}){return(0,l.jsx)(`textarea`,{"data-slot":`textarea`,className:t.U(`border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),...n})}var K=(0,d.cva)(`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 px-2 min-w-9`,sm:`h-8 px-1.5 min-w-8`,lg:`h-10 px-2.5 min-w-10`}},defaultVariants:{variant:`default`,size:`default`}});function Ct({className:e,variant:n,size:r,...i}){return(0,l.jsx)(T.Root,{"data-slot":`toggle`,className:t.U(K({variant:n,size:r,className:e})),...i})}var q=c.createContext({size:`default`,variant:`default`,spacing:0});function wt({className:e,variant:n,size:r,spacing:i=0,children:a,...o}){return(0,l.jsx)(E.Root,{"data-slot":`toggle-group`,"data-variant":n,"data-size":r,"data-spacing":i,style:{"--gap":i},className:t.U(`group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs`,e),...o,children:(0,l.jsx)(q.Provider,{value:{variant:n,size:r,spacing:i},children:a})})}function Tt({className:e,children:n,variant:r,size:i,...a}){let o=c.useContext(q);return(0,l.jsx)(E.Item,{"data-slot":`toggle-group-item`,"data-variant":o.variant||r,"data-size":o.size||i,"data-spacing":o.spacing,className:t.U(K({variant:o.variant||r,size:o.size||i}),`w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10`,`data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l`,e),...a,children:n})}function Et({user:e,onAccount:n,onSignOut:i,extraItems:a,className:o,align:s=`end`}){let{t:c}=(0,_.useTranslation)(),u=`${e.firstName??``} ${e.lastName??``}`.trim()||e.username||``;return(0,l.jsxs)(t.f,{children:[(0,l.jsx)(t.E,{asChild:!0,children:(0,l.jsx)(`button`,{type:`button`,title:u||e.username,className:t.U(`cursor-pointer rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring`,o),children:(0,l.jsx)(r.r,{givenName:e.firstName,familyName:e.lastName,name:u||e.username,src:e.avatarUrl||void 0,alt:e.username,className:`hover:ring-2 hover:ring-border transition-all`})})}),(0,l.jsxs)(t.m,{className:`min-w-56 rounded-lg`,align:s,sideOffset:8,children:[(0,l.jsx)(t._,{className:`p-0 font-normal`,children:(0,l.jsxs)(`div`,{className:`flex items-center gap-2 px-1 py-1.5 text-left text-sm`,children:[(0,l.jsx)(r.r,{givenName:e.firstName,familyName:e.lastName,name:u||e.username,src:e.avatarUrl||void 0,alt:e.username}),(0,l.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[u&&(0,l.jsx)(`span`,{className:`truncate font-medium`,children:u}),e.email&&(0,l.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,children:e.email})]})]})}),(0,l.jsx)(t.x,{}),(0,l.jsxs)(t.h,{children:[n&&(0,l.jsxs)(t.g,{onSelect:n,className:`cursor-pointer`,children:[(0,l.jsx)(g.IconUserCircle,{}),c(`nav.account`)]}),a]}),(n||a)&&(0,l.jsx)(t.x,{}),i&&(0,l.jsxs)(t.g,{onSelect:i,className:`cursor-pointer text-red-500 focus:text-red-500 focus:bg-red-50 dark:focus:bg-red-950`,children:[(0,l.jsx)(g.IconLogout,{}),c(`nav.logOut`)]})]})]})}var Dt=(0,c.createContext)({});function Ot(e){if(!e)return null;let t=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e.trim());if(t){let[,e,n,r]=t;return`${Number.parseInt(e+e,16)}, ${Number.parseInt(n+n,16)}, ${Number.parseInt(r+r,16)}`}let n=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e.trim());if(n){let[,e,t,r]=n;return`${Number.parseInt(e,16)}, ${Number.parseInt(t,16)}, ${Number.parseInt(r,16)}`}return null}function kt({color:e,colorDark:t,children:n,className:r,style:i,...a}){let o={};e&&(o[`--ff-color`]=e),t?o[`--ff-color-dark`]=t:e&&(o[`--ff-color-dark`]=e);let s=Ot(e);s&&(o[`--ff-color-rgb`]=s);let c=Ot(t)??s;return c&&(o[`--ff-color-dark-rgb`]=c),(0,l.jsx)(Dt.Provider,{value:{color:e,colorDark:t},children:(0,l.jsx)(`div`,{className:`vig-login relative min-h-svh flex items-center justify-center overflow-hidden bg-slate-50 dark:bg-slate-900 ${r??``}`,style:{...i??{},...o},...a,children:n})})}function At(e){let{color:t,colorDark:n}=(0,c.useContext)(Dt);return(0,l.jsx)(i.FloatingFormulasBg,{color:t,colorDark:n,...e})}function jt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`absolute top-4 right-4 z-30 flex items-center gap-2 ${t??``}`,...n,children:e})}function Mt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`relative z-20 flex flex-col items-center w-full max-w-md px-6 py-4 ${t??``}`,...n,children:e})}function Nt({children:e,pulsePaused:t,className:n,...r}){return(0,l.jsx)(`div`,{className:`vig-login__fade-in mb-3 ${n??``}`,...r,children:(0,l.jsx)(R,{paused:t,children:(0,l.jsx)(`div`,{className:`flex h-16 w-16 items-center justify-center rounded-2xl bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm shadow-lg ring-1 ring-[rgba(var(--ff-color-rgb,37,99,235),0.2)] dark:ring-[rgba(var(--ff-color-dark-rgb,96,165,250),0.2)]`,children:e})})})}function Pt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-login__fade-in-d1 text-center mb-1`,children:(0,l.jsx)(`h1`,{className:`text-2xl font-bold tracking-tight bg-clip-text text-transparent vig-login__title-gradient ${t??``}`,...n,children:e})})}function Ft({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-login__fade-in-d1 text-center mb-4`,children:(0,l.jsx)(`p`,{className:`text-sm text-slate-500 dark:text-slate-400 max-w-xs leading-relaxed ${t??``}`,...n,children:e})})}function It({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-login__fade-in-d2 flex flex-wrap justify-center gap-2 mb-5 ${t??``}`,...n,children:e})}function Lt({icon:e,children:t,className:n,...r}){return(0,l.jsxs)(`div`,{className:`vig-login__feature-pill flex items-center gap-1.5 rounded-full px-3 py-1 ${n??``}`,...r,children:[e,(0,l.jsx)(`span`,{className:`text-xs font-medium text-slate-600 dark:text-slate-300`,children:t})]})}function Rt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-login__fade-in-d3 w-full ${t??``}`,...n,children:(0,l.jsx)(L,{children:e})})}function zt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-login__fade-in-d3 mt-4 text-center`,children:(0,l.jsx)(`p`,{className:`text-xs text-slate-400 dark:text-slate-500 ${t??``}`,...n,children:e})})}var Bt=Object.assign(kt,{Background:At,Settings:jt,Content:Mt,Logo:Nt,Title:Pt,Tagline:Ft,Features:It,FeaturePill:Lt,Card:Rt,Footer:zt}),Vt=(0,c.createContext)({});function Ht(e){if(!e)return null;let t=/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e.trim());if(t){let[,e,n,r]=t;return`${Number.parseInt(e+e,16)}, ${Number.parseInt(n+n,16)}, ${Number.parseInt(r+r,16)}`}let n=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e.trim());if(n){let[,e,t,r]=n;return`${Number.parseInt(e,16)}, ${Number.parseInt(t,16)}, ${Number.parseInt(r,16)}`}return null}function Ut({color:e,colorDark:t,children:n,className:r,style:i,...a}){let o={};e&&(o[`--ff-color`]=e),t?o[`--ff-color-dark`]=t:e&&(o[`--ff-color-dark`]=e);let s=Ht(e);s&&(o[`--ff-color-rgb`]=s);let c=Ht(t)??s;return c&&(o[`--ff-color-dark-rgb`]=c),(0,l.jsx)(Vt.Provider,{value:{color:e,colorDark:t},children:(0,l.jsx)(`div`,{className:`vig-sf relative min-h-svh flex items-center justify-center overflow-hidden bg-slate-50 dark:bg-slate-950 ${r??``}`,style:{...i??{},...o},...a,children:n})})}function Wt(e){let{color:t,colorDark:n}=(0,c.useContext)(Vt);return(0,l.jsx)(i.FloatingFormulasBg,{color:t,colorDark:n,...e})}function Gt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`relative z-20 flex flex-col items-center w-full max-w-lg px-6 py-6 ${t??``}`,...n,children:e})}function Kt({current:e,total:t,className:n,...r}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in flex items-center gap-2 mb-4 ${n??``}`,role:`group`,"aria-label":`Step ${e} of ${t}`,...r,children:Array.from({length:t},(t,n)=>(0,l.jsx)(`span`,{className:n+1<=e?`vig-sf__step vig-sf__step--active`:`vig-sf__step`,"aria-current":n+1===e?`step`:void 0},`step-${n+1}`))})}function qt({children:e,pulsePaused:t,size:n=80,className:r,style:i,...a}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in mb-4 ${r??``}`,style:i,...a,children:(0,l.jsx)(R,{paused:t,children:(0,l.jsx)(`div`,{className:`flex items-center justify-center rounded-3xl bg-white/80 dark:bg-slate-800/80 backdrop-blur-sm shadow-xl ring-1 ring-[rgba(var(--ff-color-rgb,37,99,235),0.2)] dark:ring-[rgba(var(--ff-color-dark-rgb,96,165,250),0.2)]`,style:{width:n,height:n},children:e})})})}function Jt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in-d1 text-center mb-2`,children:(0,l.jsx)(`h1`,{className:`text-3xl font-bold tracking-tight bg-clip-text text-transparent vig-sf__title-gradient ${t??``}`,...n,children:e})})}function Yt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in-d1 text-center mb-5`,children:(0,l.jsx)(`p`,{className:`text-sm text-slate-500 dark:text-slate-400 max-w-md leading-relaxed ${t??``}`,...n,children:e})})}function Xt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in-d2 w-full ${t??``}`,...n,children:(0,l.jsx)(L,{children:e})})}function Zt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in-d3 w-full mt-4 flex items-center justify-between gap-3 ${t??``}`,...n,children:e})}function Qt({children:e,className:t,...n}){return(0,l.jsx)(`div`,{className:`vig-sf__fade-in-d3 mt-6 text-center`,children:(0,l.jsx)(`p`,{className:`text-xs text-slate-400 dark:text-slate-500 ${t??``}`,...n,children:e})})}function $t({icon:e,children:t,className:n,...r}){return(0,l.jsxs)(`div`,{className:`vig-sf__hint flex items-start gap-2 rounded-lg px-3 py-2 text-xs text-slate-600 dark:text-slate-300 ${n??``}`,...r,children:[e,(0,l.jsx)(`span`,{children:t})]})}var en=Object.assign(Ut,{Background:Wt,Content:Gt,Steps:Kt,Logo:qt,Title:Jt,Description:Yt,Card:Xt,Actions:Zt,Footer:Qt,Hint:$t});function tn({logo:e,productName:t,version:n,links:r=[]}){return(0,l.jsxs)(`footer`,{className:`mt-auto`,children:[(0,l.jsx)(`div`,{className:`mx-6 border-t`}),(0,l.jsxs)(`div`,{className:`px-6 py-3 flex items-center justify-center gap-2 flex-wrap`,children:[e,(0,l.jsxs)(`span`,{className:`text-xs text-muted-foreground/70`,children:[t,n?` ${n}`:``]}),r.map(e=>(0,l.jsxs)(c.default.Fragment,{children:[(0,l.jsx)(`span`,{className:`text-xs text-muted-foreground/40`,children:`·`}),(0,l.jsx)(`a`,{href:e.href,target:`_blank`,rel:`noopener noreferrer`,className:`text-[11px] text-muted-foreground/50 hover:text-muted-foreground transition-colors`,children:e.label})]},e.label))]})]})}function nn({open:e,onToggle:t,apps:n,triggerTitle:r=`Apps`,closeLabel:i=`Close app switcher`,showTrigger:a=!0,headerHeight:o=56}){let s={top:`${o}px`,height:`calc(100vh - ${o}px)`};return(0,l.jsxs)(l.Fragment,{children:[a&&(0,l.jsx)(`button`,{type:`button`,title:r,onClick:t,className:`inline-flex items-center justify-center rounded-full w-9 h-9 transition-colors ${e?`text-foreground bg-accent`:`text-muted-foreground hover:text-foreground hover:bg-accent`}`,children:(0,l.jsx)(se,{className:`h-5 w-5`})}),e&&(0,l.jsx)(`button`,{type:`button`,className:`fixed inset-0 z-40 cursor-default bg-transparent border-none`,onClick:t,onKeyDown:e=>e.key===`Escape`&&t(),"aria-label":i}),e&&(0,l.jsx)(`div`,{className:`vg-app-switcher-panel fixed right-0 z-50 w-72 border-l border-border bg-card shadow-xl overflow-y-auto`,style:s,children:(0,l.jsx)(`div`,{className:`p-4`,children:n.map(e=>(0,l.jsx)(rn,{app:e,onToggle:t},e.id))})})]})}function rn({app:e,onToggle:n}){let{t:r}=(0,_.useTranslation)(),i=e.name.includes(`.`)?r(e.name,{defaultValue:e.name}):e.name;return(0,l.jsxs)(`a`,{href:e.href,target:e.external?`_blank`:void 0,rel:e.external?`noopener noreferrer`:void 0,onClick:n,className:`flex items-center gap-3 px-3 py-2.5 rounded-lg transition-colors ${e.active?`bg-accent font-medium`:`hover:bg-accent`}`,children:[e.active&&(0,l.jsx)(t.V,{className:`h-4 w-4 text-[var(--vg-brand,#C2410C)] shrink-0`}),e.image?(0,l.jsx)(`img`,{src:e.image,alt:``,"aria-hidden":`true`,className:`${e.active?``:`ml-7`} shrink-0 w-7 h-7 object-contain`}):(0,l.jsx)(`div`,{className:`${e.active?``:`ml-7`} shrink-0 w-7 h-7 rounded-[18%] bg-[#f5deb3] dark:bg-amber-900/40 p-0.5`,children:(0,l.jsx)(`div`,{className:`w-full h-full rounded-[14%] ${e.iconBg??`bg-muted`} flex items-center justify-center text-white`,children:e.icon})}),(0,l.jsx)(`span`,{className:`text-sm flex-1`,children:i}),e.external&&(0,l.jsx)(ie,{className:`h-3.5 w-3.5 text-muted-foreground`})]})}var J=new class{status=`online`;listeners=new Set;get current(){return this.status}set(e){e!==this.status&&(this.status=e,this.listeners.forEach(t=>t(e)))}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}};function an(){J.set(`offline`)}function on(){J.set(`online`)}var sn=(0,c.createContext)(null);function cn(){let e=(0,c.useContext)(sn);if(!e)throw Error(`useBackendStatus must be used inside <BackendStatusProvider>`);return e}function ln({healthEndpoint:e=`/api/v2/ping`,pollInterval:t=5e3,showBanner:n=!0,children:r}){let[i,a]=(0,c.useState)(J.current);(0,c.useEffect)(()=>J.subscribe(a),[]);let o=(0,c.useCallback)(async()=>{J.set(`checking`);try{await D.default.get(e,{timeout:4e3}),J.set(`online`)}catch{J.set(`offline`)}},[e]);return(0,c.useEffect)(()=>{if(i===`online`)return;let e=setInterval(o,t);return()=>clearInterval(e)},[i,t,o]),(0,l.jsxs)(sn.Provider,{value:{status:i,retry:o},children:[n&&(0,l.jsx)(un,{}),r]})}function un(){let{status:e,retry:n}=cn(),{t:r}=(0,_.useTranslation)();if(e===`online`)return null;let i=e===`checking`;return(0,l.jsx)(`div`,{role:`status`,"aria-live":`polite`,className:`sticky top-0 z-50 w-full border-b border-amber-500/30 bg-amber-500/10 backdrop-blur supports-[backdrop-filter]:bg-amber-500/15 text-amber-900 dark:text-amber-100`,children:(0,l.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-2 text-sm`,children:[i?(0,l.jsx)(g.IconLoader2,{className:`size-4 animate-spin shrink-0`}):(0,l.jsx)(g.IconAlertTriangle,{className:`size-4 shrink-0`}),(0,l.jsx)(`span`,{className:`flex-1`,children:r(i?`backendStatus.checking`:`backendStatus.offline`,i?`Reconnecting to the server...`:`Server unavailable. Retrying...`)}),(0,l.jsxs)(t.u,{type:`button`,variant:`ghost`,size:`sm`,onClick:n,disabled:i,className:`text-amber-900 dark:text-amber-100 hover:bg-amber-500/20`,children:[(0,l.jsx)(g.IconRefresh,{className:`size-4 ${i?`animate-spin`:``}`}),r(`backendStatus.retry`,`Retry now`)]})]})})}var dn=class extends c.default.Component{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`ErrorBoundary caught an error:`,e,t)}reset=()=>{this.setState({hasError:!1,error:void 0})};render(){if(!this.state.hasError)return this.props.children;let e=this.state.error??Error(`Unknown error`);return this.props.fallback?this.props.fallback({error:e,reset:this.reset}):(0,l.jsx)(fn,{error:e})}};function fn({error:e}){let{t:n}=(0,_.useTranslation)();return(0,l.jsx)(`div`,{className:`flex items-center justify-center min-h-[80vh] px-6 py-16`,children:(0,l.jsx)(`div`,{className:`relative w-full max-w-md overflow-hidden rounded-2xl border border-border/50 bg-card/80 backdrop-blur-sm shadow-xl`,children:(0,l.jsxs)(`div`,{className:`relative flex flex-col items-center text-center px-8 py-12 space-y-6`,children:[(0,l.jsxs)(`div`,{className:`relative`,children:[(0,l.jsx)(`div`,{className:`absolute inset-0 rounded-2xl bg-gradient-to-br from-red-500/20 to-rose-500/20 blur-xl animate-pulse`}),(0,l.jsx)(`div`,{className:`relative inline-flex h-16 w-16 items-center justify-center rounded-2xl bg-gradient-to-br from-red-600 to-rose-600 shadow-lg shadow-red-500/25 ring-4 ring-red-500/10`,children:(0,l.jsx)(g.IconAlertTriangleFilled,{className:`text-white`,size:30})})]}),(0,l.jsxs)(`div`,{className:`space-y-2`,children:[(0,l.jsx)(`h2`,{className:`text-xl font-semibold tracking-tight`,children:n(`errorBoundary.title`,`Something went wrong`)}),(0,l.jsx)(`p`,{className:`text-sm text-muted-foreground leading-relaxed max-w-xs mx-auto`,children:n(`errorBoundary.description`,`An unexpected error occurred. Try reloading the page.`)}),e.message&&(0,l.jsx)(`pre`,{className:`mt-3 text-xs text-left text-muted-foreground bg-muted/40 rounded-md p-3 max-h-32 overflow-auto whitespace-pre-wrap break-words`,children:e.message})]}),(0,l.jsxs)(t.u,{size:`lg`,onClick:()=>window.location.reload(),children:[(0,l.jsx)(g.IconRefresh,{className:`size-4`}),n(`errorBoundary.reload`,`Reload page`)]})]})})})}function pn({value:e,onValueChange:r,locales:i,extraLocaleValues:a=[],placeholder:o,className:s}){let{t:c}=(0,_.useTranslation)(),u=o??c(`forms.common.chooseLanguage`),d=new Map;i.forEach(e=>{d.set(e.initials,{name:e.en,label:`${e.en}`})}),a.forEach(e=>{e&&!d.has(e)&&d.set(e,{name:e,label:e})});let f=Array.from(d.entries()).map(([e,t])=>({value:e,name:t.name,label:t.label})),p=f.find(t=>t.value===e);return(0,l.jsxs)(n.U,{value:e,onValueChange:r,children:[(0,l.jsx)(n.Z,{className:s,"aria-label":u,children:p?(0,l.jsxs)(`div`,{className:`flex items-center gap-2 truncate`,children:[(0,l.jsx)(t.t,{locale:p.value}),(0,l.jsx)(`span`,{className:`truncate`,children:p.label})]}):(0,l.jsx)(`span`,{className:`text-muted-foreground`,children:u})}),(0,l.jsx)(n.W,{children:f.map(e=>(0,l.jsx)(n.K,{value:e.value,children:(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsx)(t.t,{locale:e.value}),(0,l.jsx)(`span`,{children:e.label})]})},e.value))})]})}var mn=[{code:`en`,label:`English`,flag:`🇺🇸`},{code:`pt`,label:`Português`,flag:`🇧🇷`}];function hn({languages:e=mn}){let{i18n:n,t:r}=(0,_.useTranslation)();return(0,l.jsxs)(t.f,{children:[(0,l.jsx)(t.E,{asChild:!0,children:(0,l.jsxs)(t.u,{variant:`outline`,size:`sm`,children:[(0,l.jsx)(oe,{className:`h-[1.2rem] w-[1.2rem]`}),(0,l.jsx)(`span`,{className:`sr-only`,children:r(`language.toggle`,`Change language`)})]})}),(0,l.jsx)(t.m,{align:`end`,children:e.map(e=>(0,l.jsxs)(t.g,{onClick:()=>n.changeLanguage(e.code),className:n.language===e.code?`font-semibold bg-accent`:``,children:[e.flag&&(0,l.jsx)(`span`,{className:`mr-2`,children:e.flag}),e.label]},e.code))})]})}function gn({items:e,...t}){return(0,l.jsx)(n.d,{...t,children:(0,l.jsx)(n.p,{children:(0,l.jsx)(n.v,{children:e.map(e=>(0,l.jsx)(n.S,{children:(0,l.jsx)(n.x,{asChild:!0,children:(0,l.jsxs)(`a`,{href:e.url,children:[(0,l.jsx)(e.icon,{}),(0,l.jsx)(`span`,{children:e.title})]})})},e.title))})})})}var _n={cloud:`https://console.viglet.cloud`,turing:`https://turing.viglet.cloud`,shio:`https://shio.viglet.cloud`,dumont:`https://dumont.viglet.cloud`,docs:`https://docs.viglet.org`};function vn({open:e,onToggle:t,activeProduct:n,urls:r,triggerTitle:i,closeLabel:o,headerHeight:s=56}){let{t:c}=(0,_.useTranslation)(),u={..._n,...r},d=[{id:`cloud`,name:`Viglet Cloud`,icon:(0,l.jsx)(re,{className:`h-4 w-4`}),iconBg:`bg-linear-to-br from-[#C2410C] to-[#F97316]`,href:n===`cloud`?`/`:u.cloud,external:n!==`cloud`,active:n===`cloud`},{id:`turing`,name:`Turing ES`,image:a.i,href:n===`turing`?`/`:u.turing,external:n!==`turing`,active:n===`turing`},{id:`shio`,name:`Shio CMS`,image:a.r,href:n===`shio`?`/`:u.shio,external:n!==`shio`,active:n===`shio`},{id:`dumont`,name:`Dumont DEP`,image:a.n,href:n===`dumont`?`/`:u.dumont,external:n!==`dumont`,active:n===`dumont`},{id:`docs`,name:c(`common.docs`,{defaultValue:`Documentation`}),icon:(0,l.jsx)(te,{className:`h-4 w-4`}),iconBg:`bg-linear-to-br from-violet-500 to-purple-600`,href:u.docs,external:!0}],f=i??c(`common.apps`,{defaultValue:`Apps`});return(0,l.jsx)(nn,{open:e,onToggle:t,apps:d,triggerTitle:f,closeLabel:o??f,headerHeight:s})}var yn={en:O.enUS,pt:O.ptBR};function bn(){let{i18n:e}=(0,_.useTranslation)();return(0,c.useMemo)(()=>yn[e.language?.substring(0,2)]??O.enUS,[e.language])}function xn(e,t){let{id:n,name:r,description:i,url:a,icon:o}=t;return(0,c.useMemo)(()=>{if(!Array.isArray(e)||e.length===0)return[];let t=(e,t)=>{if(typeof t==`function`)return t(e);let n=e[t];return n==null?``:String(n)},s=e=>{if(!n){let t=e.id;return t==null?``:String(t)}return String(typeof n==`function`?n(e):e[n])};return e.map(e=>({id:s(e),name:t(e,r),description:t(e,i),url:a(e),icon:o&&t(e,o)||null}))},[e,n,r,i,a,o])}function Sn(e){let t=n.r()?.setItems,r=(0,c.useRef)([]);(0,c.useEffect)(()=>{if(e===void 0||!t)return;let n=typeof e==`string`?[{label:e}]:Array.isArray(e)?e:[e],i=r.current;i.length===n.length&&i.every((e,t)=>e.label===n[t].label&&e.href===n[t].href)||t(e=>{let t=i.length>0?e.indexOf(i[0]):-1,a=t>=0?e.slice(0,t):e,o=t>=0?e.slice(t+i.length):[],s=0;for(let e=Math.min(n.length,a.length);e>0;--e)if(a.slice(a.length-e).every((e,t)=>e.label===n[t].label)){s=e;break}let c=n.slice(s);return r.current=c,t<0&&c.length===0?e:[...a,...c,...o]})},[e,t]),(0,c.useEffect)(()=>()=>{let e=r.current;e.length>0&&t&&t(t=>{let n=t.indexOf(e[0]);return n>=0?[...t.slice(0,n),...t.slice(n+e.length)]:t}),r.current=[]},[t])}var Y=`X-XSRF-TOKEN`,Cn=`/csrf`,X=null,Z=D.default.create({withCredentials:!0});function wn(e){return[`post`,`put`,`delete`,`patch`].includes(e?.toLowerCase()||``)}function Q(e){return e?typeof e==`object`&&e&&`get`in e&&typeof e.get==`function`?e.get(Y)||null:typeof e==`object`&&e&&e[Y.toLowerCase()]||null:null}function Tn(e,t){if(typeof e.headers==`object`&&e.headers!==null&&`set`in e.headers&&typeof e.headers.set==`function`){e.headers.set(Y,t);return}let n=e.headers||{};n[Y]=t,e.headers=n}function En(){X=null,$=null}function Dn(){let e=/(?:^|;\s*)XSRF-TOKEN=([^;]+)/.exec(globalThis.document.cookie);return e?decodeURIComponent(e[1]):null}var $=null;async function On(){Z.defaults.baseURL=D.default.defaults.baseURL;let e=await Z.get(Cn),t=Q(e.headers),n=typeof e.data==`object`&&e.data!==null?e.data.token:void 0,r=Dn();X=t||n||r||null}async function kn(){if(!X){if(!$){let e=On().finally(()=>{$===e&&($=null)});$=e}await $}}function An(e={}){let t=e.loginPath??`/login`;e.baseURL&&(D.default.defaults.baseURL=e.baseURL),D.default.defaults.withCredentials=!0,D.default.defaults.xsrfCookieName=`XSRF-TOKEN`,D.default.defaults.xsrfHeaderName=Y,D.default.interceptors.request.use(async e=>{let t=e.url||``,n=e.baseURL||D.default.defaults.baseURL;if(Z.defaults.baseURL=n,t.includes(Cn)||!wn(e.method))return e;if(X||await kn(),!X)throw Error(`Unable to obtain CSRF token for mutating request.`);return Tn(e,X),e},e=>Promise.reject(e)),D.default.interceptors.response.use(e=>{let t=Q(e.headers);return t&&(X=t),e},async e=>{let n=Q(e.response?.headers);n&&(X=n);let r=e.config;if(e.response?.status===403&&r&&!r._csrfRetried&&wn(r.method)){if(r._csrfRetried=!0,En(),Z.defaults.baseURL=r.baseURL||D.default.defaults.baseURL,await kn(),!X)throw e;return Tn(r,X),D.default.request(r)}if(e.response?.status===401&&!globalThis.location.pathname.startsWith(t)){let e=globalThis.location.pathname+globalThis.location.search;globalThis.location.href=`${t}?returnUrl=${encodeURIComponent(e)}`}throw e})}var jn=/[[\]:*?/\\]/g,Mn=31;function Nn(e){return e.replace(jn,` `).trim().slice(0,Mn)||`Sheet1`}function Pn(e){return Array.isArray(e)?e.join(`, `):e instanceof Date?e.toISOString():e}function Fn(e,t,n,r){let i=t.map(e=>e.label),a=e.map(e=>t.map(t=>Pn(e[t.key]))),o=k.utils.aoa_to_sheet([i,...a]);o[`!cols`]=t.map((e,t)=>{let n=e.label.length;for(let e of a){let r=String(e[t]??``).length;r>n&&(n=r)}return{wch:Math.min(Math.max(n+2,12),60)}});let s=k.utils.book_new();k.utils.book_append_sheet(s,o,Nn(r??n)),k.writeFile(s,`${n}.xlsx`)}exports.Accordion=ce,exports.AccordionContent=de,exports.AccordionItem=le,exports.AccordionTrigger=ue,exports.AppFooter=tn,exports.AppSwitcher=nn,exports.Avatar=n.pt,exports.AvatarFallback=n.mt,exports.AvatarImage=n.ht,exports.BackendStatusBanner=un,exports.BackendStatusProvider=ln,exports.Badge=t.L,exports.BadgeColorful=t.r,exports.BadgeLocale=t.t,exports.Breadcrumb=n.ot,exports.BreadcrumbEllipsis=n.st,exports.BreadcrumbItem=n.ct,exports.BreadcrumbLink=n.lt,exports.BreadcrumbList=n.ut,exports.BreadcrumbPage=n.dt,exports.BreadcrumbProvider=n.t,exports.BreadcrumbSeparator=n.ft,exports.Button=r.c,exports.Card=n.$,exports.CardAction=n.et,exports.CardContent=n.tt,exports.CardDescription=n.nt,exports.CardFooter=n.rt,exports.CardHeader=n.it,exports.CardTitle=n.at,exports.Checkbox=fe,exports.Dialog=t.D,exports.DialogClose=t.O,exports.DialogContent=t.k,exports.DialogDescription=t.A,exports.DialogFooter=t.j,exports.DialogHeader=t.M,exports.DialogOverlay=t.N,exports.DialogPortal=t.P,exports.DialogTitle=t.F,exports.DialogTrigger=t.I,exports.Drawer=pe,exports.DrawerClose=ge,exports.DrawerContent=ve,exports.DrawerDescription=Se,exports.DrawerFooter=be,exports.DrawerHeader=ye,exports.DrawerOverlay=_e,exports.DrawerPortal=he,exports.DrawerTitle=xe,exports.DrawerTrigger=me,exports.DropdownMenu=t.f,exports.DropdownMenuCheckboxItem=t.p,exports.DropdownMenuContent=t.m,exports.DropdownMenuGroup=t.h,exports.DropdownMenuItem=t.g,exports.DropdownMenuLabel=t._,exports.DropdownMenuPortal=t.v,exports.DropdownMenuRadioGroup=t.y,exports.DropdownMenuRadioItem=t.b,exports.DropdownMenuSeparator=t.x,exports.DropdownMenuShortcut=t.S,exports.DropdownMenuSub=t.C,exports.DropdownMenuSubContent=t.w,exports.DropdownMenuSubTrigger=t.T,exports.DropdownMenuTrigger=t.E,exports.ErrorBoundary=dn,exports.FloatingFormulasBg=i.FloatingFormulasBg,exports.Form=we,exports.FormActions=I,exports.FormControl=Ee,exports.FormDescription=F,exports.FormField=Te,exports.FormItem=N,exports.FormItemTwoColumns=je,exports.FormLabel=P,exports.FormMessage=De,exports.GlassCard=L,exports.GradientButton=t.u,exports.GradientSwitch=Ne,exports.HoverCard=Fe,exports.HoverCardContent=Le,exports.HoverCardTrigger=Ie,exports.IconPickerDialog=r.s,exports.Input=t.l,exports.Label=Ce,exports.LanguageSelect=pn,exports.LanguageSwitcher=hn,exports.Login=Bt,exports.ModeToggle=n.i,exports.ModeToggleSidebar=n.a,exports.NavSecondary=gn,exports.NavigationMenu=Re,exports.NavigationMenuContent=Ue,exports.NavigationMenuIndicator=Ge,exports.NavigationMenuItem=Be,exports.NavigationMenuLink=We,exports.NavigationMenuList=ze,exports.NavigationMenuTrigger=He,exports.NavigationMenuViewport=z,exports.Pagination=Ke,exports.PaginationContent=B,exports.PaginationEllipsis=Ye,exports.PaginationItem=V,exports.PaginationLink=H,exports.PaginationNext=Je,exports.PaginationPrevious=qe,exports.Popover=Xe,exports.PopoverAnchor=$e,exports.PopoverContent=Qe,exports.PopoverTrigger=Ze,exports.Progress=et,exports.PulseRing=R,exports.ResizableHandle=rt,exports.ResizablePanel=nt,exports.ResizablePanelGroup=tt,exports.SectionCard=r.o,exports.Select=n.U,exports.SelectContent=n.W,exports.SelectGroup=n.G,exports.SelectItem=n.K,exports.SelectLabel=n.q,exports.SelectScrollDownButton=n.J,exports.SelectScrollUpButton=n.Y,exports.SelectSeparator=n.X,exports.SelectTrigger=n.Z,exports.SelectValue=n.Q,exports.Separator=n.H,exports.Sheet=n.P,exports.SheetClose=n.F,exports.SheetContent=n.I,exports.SheetDescription=n.L,exports.SheetFooter=n.R,exports.SheetHeader=n.z,exports.SheetTitle=n.B,exports.SheetTrigger=n.V,exports.Sidebar=n.c,exports.SidebarContent=n.l,exports.SidebarFooter=n.u,exports.SidebarGroup=n.d,exports.SidebarGroupAction=n.f,exports.SidebarGroupContent=n.p,exports.SidebarGroupLabel=n.m,exports.SidebarHeader=n.h,exports.SidebarInput=n.g,exports.SidebarInset=n._,exports.SidebarMenu=n.v,exports.SidebarMenuAction=n.y,exports.SidebarMenuBadge=n.b,exports.SidebarMenuButton=n.x,exports.SidebarMenuItem=n.S,exports.SidebarMenuSkeleton=n.C,exports.SidebarMenuSub=n.w,exports.SidebarMenuSubButton=n.T,exports.SidebarMenuSubItem=n.E,exports.SidebarProvider=n.D,exports.SidebarRail=n.O,exports.SidebarSeparator=n.k,exports.SidebarTrigger=n.A,exports.Skeleton=t.c,exports.Slider=ot,exports.StartupFirst=en,exports.Stepper=G,exports.StickySaveBar=U,exports.Switch=lt,exports.Table=ut,exports.TableBody=ft,exports.TableCaption=_t,exports.TableCell=gt,exports.TableFooter=pt,exports.TableHead=ht,exports.TableHeader=dt,exports.TableRow=mt,exports.Tabs=vt,exports.TabsContent=xt,exports.TabsList=yt,exports.TabsTrigger=bt,exports.Textarea=St,exports.ThemeProvider=n.o,exports.Toaster=r.a,exports.Toggle=Ct,exports.ToggleGroup=wt,exports.ToggleGroupItem=Tt,exports.Tooltip=t.i,exports.TooltipContent=t.a,exports.TooltipProvider=t.o,exports.TooltipTrigger=t.s,exports.UserAvatar=r.r,exports.UserMenu=Et,exports.UserProvider=r.t,exports.VigletAppSwitcher=vn,exports.badgeVariants=t.R,exports.buttonVariants=r.l,exports.cn=t.U,exports.exportToXlsx=Fn,exports.getFlagEmoji=t.W,exports.getHashedColor=t.G,exports.getLocaleCountryCode=t.n,exports.getUserInitials=r.i,exports.gradientButtonVariants=t.d,exports.initVigI18n=o.t,exports.navigationMenuTriggerStyle=Ve,exports.registerVigTranslations=o.n,exports.reportBackendOffline=an,exports.reportBackendOnline=on,exports.setupAxiosInterceptors=An,exports.toast=ee.toast,exports.toggleVariants=K,exports.truncateMiddle=t.K,exports.useBackendStatus=cn,exports.useBreadcrumb=n.n,exports.useBreadcrumbOptional=n.r,exports.useCurrentUser=r.n,exports.useDateLocale=bn,exports.useFormField=j,exports.useGridAdapter=xn,exports.useIsMobile=n.N,exports.useSidebar=n.j,exports.useSubPageBreadcrumb=Sn,exports.useTheme=n.s,exports.vigDesignSystemTranslations=o.r;
package/dist/index.es.js CHANGED
@@ -1101,7 +1101,7 @@ function bi({ color: e, colorDark: t, children: n, className: r, style: i, ...a
1101
1101
  colorDark: t
1102
1102
  },
1103
1103
  children: /* @__PURE__ */ E("div", {
1104
- className: `vig-login relative min-h-svh flex items-center justify-center overflow-hidden bg-slate-50 dark:bg-slate-950 ${r ?? ""}`,
1104
+ className: `vig-login relative min-h-svh flex items-center justify-center overflow-hidden bg-slate-50 dark:bg-slate-900 ${r ?? ""}`,
1105
1105
  style: {
1106
1106
  ...i ?? {},
1107
1107
  ...o
package/dist/preset.css CHANGED
@@ -78,8 +78,24 @@
78
78
  --vg-card-foreground: oklch(0.145 0 0);
79
79
  --vg-popover: oklch(1 0 0);
80
80
  --vg-popover-foreground: oklch(0.145 0 0);
81
- --vg-primary: oklch(0.205 0 0);
82
- --vg-primary-foreground: oklch(0.985 0 0);
81
+ /* The mark for where a product is. The bento layer reads this for the rail's
82
+ active item, the tile's hover glow and an inline edit's border, and the
83
+ default Button variant is `bg-primary text-primary-foreground` -- so a
84
+ product that keys only the accent has all four in a neutral.
85
+
86
+ Claimed through the four inputs below rather than by setting --vg-primary
87
+ directly, for the reason the accent has -text-dark: a consumer stylesheet
88
+ imports this file and then declares its own :root, which lands after the
89
+ dark block at the same specificity and in no layer. A bare --vg-primary set
90
+ there wins on BOTH grounds and keys the dark one to the light value. The
91
+ inputs are read per ground, so a product never writes a dark block. */
92
+ --vg-primary-base: oklch(0.205 0 0);
93
+ --vg-primary-base-dark: oklch(0.922 0 0);
94
+ --vg-primary-foreground-base: oklch(0.985 0 0);
95
+ --vg-primary-foreground-base-dark: oklch(0.205 0 0);
96
+
97
+ --vg-primary: var(--vg-primary-base);
98
+ --vg-primary-foreground: var(--vg-primary-foreground-base);
83
99
  --vg-secondary: oklch(0.97 0 0);
84
100
  --vg-secondary-foreground: oklch(0.205 0 0);
85
101
  --vg-muted: oklch(0.97 0 0);
@@ -259,8 +275,12 @@
259
275
  /* Dark surfaces sit one step above pure black on purpose. Near-black (0.145)
260
276
  under near-white text runs ~17:1 — far past AAA, and that overshoot is what
261
277
  produces halation: the glyphs bloom at the edges, worst for astigmatic eyes.
262
- The ramp below lands text at ~13.5:1, still comfortably AAA, and follows the
263
- dark-theme elevation rule that higher surfaces are LIGHTER, not shadowed:
278
+ The ramp below lands text at ~11.2:1 — still well past AAA (7:1), and inside
279
+ the band Material recommends for high-emphasis dark-theme text (white at
280
+ ~87%). Going further starts closing on --vg-muted-foreground (6.7:1) and
281
+ flattens the title/supporting-text hierarchy, which is the same problem from
282
+ the other side. It also follows the dark-theme elevation rule that higher
283
+ surfaces are LIGHTER, not shadowed:
264
284
 
265
285
  background 0.205 < card/sidebar 0.269 < muted/accent/popover 0.320
266
286
 
@@ -269,21 +289,23 @@
269
289
  .dark,
270
290
  [data-theme="dark"] {
271
291
  --vg-background: oklch(0.205 0 0);
272
- --vg-foreground: oklch(0.96 0 0);
292
+ --vg-foreground: oklch(0.90 0 0);
273
293
  --vg-card: oklch(0.269 0 0);
274
- --vg-card-foreground: oklch(0.96 0 0);
294
+ --vg-card-foreground: oklch(0.90 0 0);
275
295
  /* Elevated above card, so a dropdown over a card reads as lifted. */
276
296
  --vg-popover: oklch(0.32 0 0);
277
- --vg-popover-foreground: oklch(0.96 0 0);
278
- --vg-primary: oklch(0.922 0 0);
279
- --vg-primary-foreground: oklch(0.205 0 0);
297
+ --vg-popover-foreground: oklch(0.90 0 0);
298
+ /* The other half of the pair above: this block re-points the output, and the
299
+ value it points at is the product's, so re-keying stays a :root edit. */
300
+ --vg-primary: var(--vg-primary-base-dark);
301
+ --vg-primary-foreground: var(--vg-primary-foreground-base-dark);
280
302
  --vg-secondary: oklch(0.32 0 0);
281
- --vg-secondary-foreground: oklch(0.96 0 0);
303
+ --vg-secondary-foreground: oklch(0.90 0 0);
282
304
  --vg-muted: oklch(0.32 0 0);
283
305
  /* 0.708 -> 0.75 recovers the ~6.9:1 that the lighter card would have cost. */
284
306
  --vg-muted-foreground: oklch(0.75 0 0);
285
307
  --vg-accent: oklch(0.32 0 0);
286
- --vg-accent-foreground: oklch(0.96 0 0);
308
+ --vg-accent-foreground: oklch(0.90 0 0);
287
309
  /* The brand accent's dark twin. The tint surfaces are color-mix over the same
288
310
  stop and read correctly on either ground, so only the foreground and the
289
311
  interactive fill re-point here. */
@@ -312,12 +334,15 @@
312
334
  --vg-chart-4: oklch(0.627 0.265 303.9);
313
335
  --vg-chart-5: oklch(0.645 0.246 16.439);
314
336
  --vg-sidebar: oklch(0.269 0 0);
315
- --vg-sidebar-foreground: oklch(0.96 0 0);
337
+ --vg-sidebar-foreground: oklch(0.90 0 0);
316
338
  --vg-sidebar-primary: oklch(0.488 0.243 264.376);
339
+ /* Stays brighter than the other foregrounds: this one sits on a saturated
340
+ blue fill, not on a dark neutral, so the halation argument does not apply
341
+ and contrast is the only thing to optimise. */
317
342
  --vg-sidebar-primary-foreground: oklch(0.96 0 0);
318
343
  /* Must stay one step above --vg-sidebar or the selected item disappears. */
319
344
  --vg-sidebar-accent: oklch(0.32 0 0);
320
- --vg-sidebar-accent-foreground: oklch(0.96 0 0);
345
+ --vg-sidebar-accent-foreground: oklch(0.90 0 0);
321
346
  --vg-sidebar-border: oklch(1 0 0 / 14%);
322
347
  --vg-sidebar-ring: var(--vg-accent-text-dark);
323
348