@gradeui/ui 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import {z}from'zod';import*as w from'react';import {useRef,useEffect}from'react';import*as Be from'@radix-ui/react-accordion';import {ChevronDown,ChevronLeft,ChevronRight,Check,X as X$1,Circle,Search,XCircle,ChevronUp,Image,Box,Code2,Music,Video,UtensilsCrossed,Package,Film,Mountain,User,Book,Gamepad2,Clapperboard,Tv,Disc3,Pause,Play,ChevronLeftIcon,ChevronRightIcon,ChevronDownIcon,CalendarIcon,GripVertical,MoreHorizontal,Palette,Download,Trash2,SunDim,Sun,Moon,MoonStar}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {cva}from'class-variance-authority';import {Slot}from'@radix-ui/react-slot';import*as nt from'@radix-ui/react-avatar';import {getDefaultClassNames,DayPicker}from'react-day-picker';import md from'embla-carousel-react';import*as mo from'@radix-ui/react-checkbox';import {format}from'date-fns';import*as Ue from'@radix-ui/react-popover';import*as X from'@radix-ui/react-dialog';import*as A from'@radix-ui/react-dropdown-menu';import*as Lr from'@radix-ui/react-label';import*as fo from'@radix-ui/react-progress';import {Command}from'cmdk';import*as zr from'@radix-ui/react-separator';import*as ht from'@radix-ui/react-radio-group';import*as Kt from'react-resizable-panels';import*as Ge from'@radix-ui/react-scroll-area';import*as F from'@radix-ui/react-select';import*as it from'@radix-ui/react-slider';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,closestCenter,useDroppable}from'@dnd-kit/core';import {sortableKeyboardCoordinates,arrayMove,SortableContext,rectSortingStrategy,horizontalListSortingStrategy,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import*as wo from'@radix-ui/react-switch';import*as qe from'@radix-ui/react-tabs';import*as Ke from'@radix-ui/react-tooltip';import*as qr from'@radix-ui/react-toggle';import*as qt from'@radix-ui/react-toggle-group';import {createPortal}from'react-dom';import*as Z from'three';import {EffectComposer,RenderPass,BloomEffect,KernelSize,NoiseEffect,BlendFunction,ScanlineEffect,VignetteEffect,ChromaticAberrationEffect,GlitchEffect,EffectPass}from'postprocessing';import Rm from'lenis';var Tl=Object.defineProperty;var Ao=(e,t)=>()=>(e&&(t=e(e=0)),t);var vr=(e,t)=>{for(var o in t)Tl(e,o,{get:t[o],enumerable:true});};var mr,Qs,el=Ao(()=>{mr="2pMfyvhpuKonkf7h8HzH",Qs=()=>mr!=="YOUR_KEY_HERE"&&mr.length>0;});var rl={};vr(rl,{createMaplibreAdapter:()=>hp});function fp(){if(typeof document>"u"||document.getElementById(ol))return;let e=document.createElement("link");e.id=ol,e.rel="stylesheet",e.href=gp,document.head.appendChild(e);}var up,tl,gp,ol,hp,al=Ao(()=>{el();up={light:"dataviz-light",dark:"dataviz-dark",satellite:"satellite"},tl=(e,t)=>`https://api.maptiler.com/maps/${up[e]}/style.json?key=${encodeURIComponent(t)}`,gp="https://unpkg.com/maplibre-gl@4/dist/maplibre-gl.css",ol="gds-maplibre-gl-css";hp=async(e,t,o)=>{fp();let r;try{r=await import('maplibre-gl'),r.default&&(r=r.default);}catch(c){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `maplibre-gl` is not installed. Run `pnpm add maplibre-gl` (or your package manager\'s equivalent) to use provider="maplibre".',cause:c}),c}let i=t.tilerKey??mr;process.env.NODE_ENV!=="production"&&!t.tilerKey&&!Qs()&&console.warn("@gradeui/ui Map: no `tilerKey` prop and the bundled MapTiler demo key is unset. Tile requests will 403. Set `tilerKey` or paste a key into demo-config.ts.");let a=t.styleUrl??tl(t.appearance,i),d=new r.Map({container:e,style:a,center:t.center,zoom:t.zoom,interactive:t.interactive,attributionControl:{compact:true}});t.bounds&&d.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(c=>{d.once("load",()=>c());}),o.onLoad(),d.on("error",c=>{let l=String(c?.error?.message??c?.message??"MapLibre error"),p=l.toLowerCase().includes("style");o.onError({code:p?"style-load-failed":"tile-load-failed",message:l,cause:c?.error??c});});let m=new globalThis.Map;return {setCenter:c=>d.setCenter(c),setZoom:c=>d.setZoom(c),setBounds:(c,l)=>d.fitBounds([c,l],{animate:false}),setAppearance:c=>{let l=t.styleUrl??tl(c,i);d.setStyle(l,{diff:false});},setInteractive:c=>{let l=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let p of l){let g=d[p];g&&(c?g.enable():g.disable());}},flyTo:(c,l)=>d.flyTo({center:c,zoom:l?.zoom,duration:l?.durationMs??800}),panTo:(c,l)=>d.panTo(c,{duration:l?.durationMs??600}),fitBounds:(c,l)=>{if(c.length===0)return;let p=1/0,g=1/0,u=-1/0,b=-1/0;for(let[f,h]of c)f<p&&(p=f),h<g&&(g=h),f>u&&(u=f),h>b&&(b=h);d.fitBounds([[p,g],[u,b]],{padding:l?.paddingPx??40,duration:l?.durationMs??800});},getCenter:()=>{let c=d.getCenter();return [c.lng,c.lat]},getZoom:()=>d.getZoom(),getBounds:()=>{let c=d.getBounds();return [[c.getWest(),c.getSouth()],[c.getEast(),c.getNorth()]]},addMarker:(c,l,p)=>{let g=document.createElement("div");g.dataset.gdsPart="map-marker",g.dataset.gdsState="idle",g.style.cursor="pointer",g.addEventListener("mouseenter",()=>o.onMarkerHover(c)),g.addEventListener("mouseleave",()=>o.onMarkerHover(null)),g.addEventListener("click",f=>{o.onMarkerClick(c,b.coords,f);});let u=new r.Marker({element:g,anchor:p==="center"?"center":"bottom"}).setLngLat(l).addTo(d),b={element:g,coords:l,setHovered:f=>{g.dataset.gdsState=f?"hovered":"idle",g.style.zIndex=f?"10":"1";},setPosition:f=>{b.coords=f,u.setLngLat(f);},remove:()=>{u.remove(),m.delete(c);}};return m.set(c,{marker:u,handle:b}),b},destroy:()=>{m.forEach(({marker:c})=>c.remove()),m.clear(),d.remove();},instance:d}};});var sl={};vr(sl,{createMapboxAdapter:()=>yp});function vp(){if(typeof document>"u"||document.getElementById(il))return;let e=document.createElement("link");e.id=il,e.rel="stylesheet",e.href=bp,document.head.appendChild(e);}var nl,bp,il,yp,ll=Ao(()=>{nl={light:"mapbox://styles/mapbox/light-v11",dark:"mapbox://styles/mapbox/dark-v11",satellite:"mapbox://styles/mapbox/satellite-streets-v12"},bp="https://unpkg.com/mapbox-gl@3/dist/mapbox-gl.css",il="gds-mapbox-gl-css";yp=async(e,t,o)=>{if(!t.accessToken)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="mapbox" requires an `accessToken` prop.'}),new Error("mapbox accessToken missing");vp();let r;try{r=await import('mapbox-gl'),r.default&&(r=r.default);}catch(s){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `mapbox-gl` is not installed. Run `pnpm add mapbox-gl` to use provider="mapbox".',cause:s}),s}r.accessToken=t.accessToken;let i=t.styleUrl??nl[t.appearance],a=new r.Map({container:e,style:i,center:t.center,zoom:t.zoom,interactive:t.interactive});t.bounds&&a.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(s=>{a.once("load",()=>s());}),o.onLoad(),a.on("error",s=>{let c=String(s?.error?.message??s?.message??"Mapbox error"),l=c.toLowerCase().includes("style");o.onError({code:l?"style-load-failed":"tile-load-failed",message:c,cause:s?.error??s});});let d=new globalThis.Map;return {setCenter:s=>a.setCenter(s),setZoom:s=>a.setZoom(s),setBounds:(s,c)=>a.fitBounds([s,c],{animate:false}),setAppearance:s=>{let c=t.styleUrl??nl[s];a.setStyle(c,{diff:false});},setInteractive:s=>{let c=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let l of c){let p=a[l];p&&(s?p.enable():p.disable());}},flyTo:(s,c)=>a.flyTo({center:s,zoom:c?.zoom,duration:c?.durationMs??800}),panTo:(s,c)=>a.panTo(s,{duration:c?.durationMs??600}),fitBounds:(s,c)=>{if(s.length===0)return;let l=1/0,p=1/0,g=-1/0,u=-1/0;for(let[b,f]of s)b<l&&(l=b),f<p&&(p=f),b>g&&(g=b),f>u&&(u=f);a.fitBounds([[l,p],[g,u]],{padding:c?.paddingPx??40,duration:c?.durationMs??800});},getCenter:()=>{let s=a.getCenter();return [s.lng,s.lat]},getZoom:()=>a.getZoom(),getBounds:()=>{let s=a.getBounds();return [[s.getWest(),s.getSouth()],[s.getEast(),s.getNorth()]]},addMarker:(s,c,l)=>{let p=document.createElement("div");p.dataset.gdsPart="map-marker",p.dataset.gdsState="idle",p.style.cursor="pointer",p.addEventListener("mouseenter",()=>o.onMarkerHover(s)),p.addEventListener("mouseleave",()=>o.onMarkerHover(null)),p.addEventListener("click",b=>{o.onMarkerClick(s,u.coords,b);});let g=new r.Marker({element:p,anchor:l==="center"?"center":"bottom"}).setLngLat(c).addTo(a),u={element:p,coords:c,setHovered:b=>{p.dataset.gdsState=b?"hovered":"idle",p.style.zIndex=b?"10":"1";},setPosition:b=>{u.coords=b,g.setLngLat(b);},remove:()=>{g.remove(),d.delete(s);}};return d.set(s,{marker:g,handle:u}),u},destroy:()=>{d.forEach(({marker:s})=>s.remove()),d.clear(),a.remove();},instance:a}};});var cl={};vr(cl,{createGoogleAdapter:()=>Rp});var wp,xp,dl,Rp,pl=Ao(()=>{wp=[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"simplified"}]}],xp=[{elementType:"geometry",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#262626"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0f172a"}]},{featureType:"transit",stylers:[{visibility:"simplified"},{color:"#3a3a3a"}]}],dl=e=>e==="dark"?xp:wp,Rp=async(e,t,o)=>{if(!t.apiKey)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="google" requires an `apiKey` prop.'}),new Error("google apiKey missing");let r;try{let l=await import('@googlemaps/js-api-loader');r=l.Loader??l.default?.Loader;}catch(l){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `@googlemaps/js-api-loader` is not installed. Run `pnpm add @googlemaps/js-api-loader` to use provider="google".',cause:l}),l}let i=new r({apiKey:t.apiKey,version:"weekly",libraries:["maps","marker"]}),a;try{a=await i.load();}catch(l){throw o.onError({code:"provider-init-failed",message:"@gradeui/ui Map: Google Maps loader failed.",cause:l}),l}let d=t.appearance==="satellite",m=new a.maps.Map(e,{center:{lat:t.center[1],lng:t.center[0]},zoom:t.zoom,mapTypeId:d?a.maps.MapTypeId.HYBRID:a.maps.MapTypeId.ROADMAP,mapId:t.mapId,styles:d?void 0:dl(t.appearance==="dark"?"dark":"light"),disableDefaultUI:!t.interactive,gestureHandling:t.interactive?"auto":"none",keyboardShortcuts:t.interactive});if(t.bounds){let l=new a.maps.LatLngBounds({lat:t.bounds[0][1],lng:t.bounds[0][0]},{lat:t.bounds[1][1],lng:t.bounds[1][0]});m.fitBounds(l);}await new Promise(l=>{a.maps.event.addListenerOnce(m,"idle",()=>l());}),o.onLoad();let s=new globalThis.Map;return {setCenter:l=>m.setCenter({lat:l[1],lng:l[0]}),setZoom:l=>m.setZoom(l),setBounds:(l,p)=>{let g=new a.maps.LatLngBounds({lat:l[1],lng:l[0]},{lat:p[1],lng:p[0]});m.fitBounds(g);},setAppearance:l=>{l==="satellite"?(m.setMapTypeId(a.maps.MapTypeId.HYBRID),m.setOptions({styles:void 0})):(m.setMapTypeId(a.maps.MapTypeId.ROADMAP),m.setOptions({styles:dl(l)}));},setInteractive:l=>{m.setOptions({disableDefaultUI:!l,gestureHandling:l?"auto":"none",keyboardShortcuts:l});},flyTo:(l,p)=>{m.panTo({lat:l[1],lng:l[0]}),p?.zoom!=null&&m.setZoom(p.zoom);},panTo:l=>m.panTo({lat:l[1],lng:l[0]}),fitBounds:(l,p)=>{if(l.length===0)return;let g=new a.maps.LatLngBounds;for(let[u,b]of l)g.extend({lat:b,lng:u});m.fitBounds(g,p?.paddingPx??40);},getCenter:()=>{let l=m.getCenter();return l?[l.lng(),l.lat()]:[0,0]},getZoom:()=>m.getZoom()??0,getBounds:()=>{let l=m.getBounds();if(!l)return [[0,0],[0,0]];let p=l.getSouthWest(),g=l.getNorthEast();return [[p.lng(),p.lat()],[g.lng(),g.lat()]]},addMarker:(l,p,g)=>{let u=document.createElement("div");u.dataset.gdsPart="map-marker",u.dataset.gdsState="idle",u.style.cursor="pointer",g==="center"&&(u.style.transform="translateY(50%)"),u.addEventListener("mouseenter",()=>o.onMarkerHover(l)),u.addEventListener("mouseleave",()=>o.onMarkerHover(null)),u.addEventListener("click",h=>{o.onMarkerClick(l,f.coords,h);});let b=new a.maps.marker.AdvancedMarkerElement({map:m,position:{lat:p[1],lng:p[0]},content:u}),f={element:u,coords:p,setHovered:h=>{u.dataset.gdsState=h?"hovered":"idle",b.zIndex=h?10:1;},setPosition:h=>{f.coords=h,b.position={lat:h[1],lng:h[0]};},remove:()=>{b.map=null,s.delete(l);}};return s.set(l,{marker:b,handle:f}),f},destroy:()=>{s.forEach(({marker:l})=>{l.map=null;}),s.clear();},instance:m}};});var Ca={name:"Accordion",description:`Long-form content that would overwhelm if shown all at once \u2014 FAQs, settings groups, "what's included" sections, nested help. For tab-style peer views with one always visible, reach for Tabs. For a single show/hide reveal use Collapsible.`,import:"@gradeui/ui",aliases:["accordion","faq","expand","collapse list","disclosure list","disclosure group","outline group","expandable list","sectionlist"],subcomponents:["AccordionItem","AccordionTrigger","AccordionContent"],composesWith:["Card (as a faq inside a card body)","Section primitives"],props:{type:{schema:z.enum(["single","multiple"]),design:"knob",description:"single keeps one open at a time, multiple lets several be open at once"},collapsible:{schema:z.boolean().optional(),design:"knob",description:'only valid with type="single"; allows the open item to be toggled shut'},defaultValue:{schema:z.string().optional(),design:"content",description:"initial open item(s)"},value:{schema:z.string().optional(),design:"content",description:"controlled"},onValueChange:{schema:z.unknown().optional(),design:"event"},children:{schema:z.unknown(),design:"plumbing",description:"the row label users click to expand"}}};var ka={name:"AiChat",description:'A flexible chat block \u2014 header + scrollable message list + composer. Out of the box it looks like a polished "AI panel"; under it, every region is a slot so hosts can compose richer chat surfaces (e.g. Studio\'s left column with selection chip + settings panel above the composer, an error banner inline, per-message usage / refs / actions). Per-turn token usage, refs, and actions are optional and gated by `showUsage` / `showRefs` / `showActions` \u2014 leave them off for product-facing chats, turn them on for developer-facing ones where transparency matters. Composes with [[AIChatComposer]] (rendered internally; can be slotted in with custom props via `composerSlot`).',import:"@gradeui/ui",aliases:["ai chat","chat panel","chat block","llm chat","assistant panel","copilot chat","ai assistant"],composesWith:["Card (host in a sidebar panel)","Sheet (mobile drawer)","Stack (place above other content)","AIChatComposer (internal composer; slot to override)"],props:{messages:{schema:z.unknown().optional(),design:"plumbing",description:'`{ id, role: "user" | "assistant", content, timestamp, thinking?, steps?, usage?, refs?, actions?, duration? }`; defaults to empty'},onSendMessage:{schema:z.unknown().optional(),design:"event",description:"fires when the user submits via the default composer; ignored if `composerSlot` is set"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"shows a typing indicator at the bottom of the message list"},placeholder:{schema:z.string().optional(),design:"content",description:"composer placeholder text (ignored if `composerSlot` is set)"},title:{schema:z.string().optional(),design:"plumbing",description:'header title; defaults to "AI Assistant"'},titleIcon:{schema:z.unknown().optional(),design:"plumbing",description:"optional icon rendered before the title (e.g. `<Sparkles />`)"},headerTokens:{schema:z.number().optional(),design:"knob",description:'optional session-level token total shown on the right of the header; rendered as "N tokens" with a small gauge icon when set'},headerEnd:{schema:z.unknown().optional(),design:"plumbing",description:"optional arbitrary content appended after `headerTokens` on the right of the header"},showUsage:{schema:z.boolean().optional(),design:"knob",description:"show the per-turn `usage` strip below the assistant bubble; default false"},showRefs:{schema:z.boolean().optional(),design:"knob",description:"show the per-turn `refs` strip below the assistant bubble; default false"},showActions:{schema:z.boolean().optional(),design:"knob",description:"render per-turn `actions` chips when a message has them; default true"},showDuration:{schema:z.boolean().optional(),design:"knob",description:'render the per-turn wall-clock duration ("2.3s") below the assistant bubble when a message carries `duration`; default false'},showThinking:{schema:z.boolean().optional(),design:"knob",description:'render the per-turn reasoning ("Thoughts") disclosure above the assistant prose when a message carries `thinking`; collapsed by default, click to expand; default false'},showSteps:{schema:z.boolean().optional(),design:"knob",description:'render the per-turn step timeline above the assistant prose when a message carries `steps`; collapsed view shows the current running step (or "N steps completed"), click to expand the vertical timeline with status glyphs; default false'},thinkingPhrase:{schema:z.string().optional(),design:"content",description:'override the "Thinking" label in the loading indicator'},suggestedPrompts:{schema:z.unknown().optional(),design:"plumbing",description:"empty-state quick prompts (ignored if `emptyStateSlot` is set)"},emptyStateSlot:{schema:z.unknown().optional(),design:"plumbing",description:"replaces the default empty state entirely"},errorSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered after the messages list (typically an error banner)"},composerAboveSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered between the messages and the composer (selection chip, settings panel)"},composerBelowSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered below the composer (disclaimer, char counter)"},composerSlot:{schema:z.unknown().optional(),design:"plumbing",description:"full override of the composer; when provided, `onSendMessage` + `placeholder` are unused"},bare:{schema:z.boolean().optional(),design:"knob",description:"strip the outer card chrome (background, border, rounded corners) so the chat takes the surface of its container; default false (keeps the canned card look)"},assistantBubble:{schema:z.boolean().optional(),design:"knob",description:"whether assistant messages render with a bubble (background + border + padding + rounded corners); default true. Set false for a Claude.ai-style chromeless transcript where assistant text sits on the surface and only user turns wear a bubble."},className:{schema:z.string().optional(),design:"plumbing"}}};var Ta={name:"AiChatComposer",description:"The reusable \"input card\" for any chat surface \u2014 auto-growing textarea, image attachments via paperclip and clipboard paste, attachment chips with previews, Send/Stop toggle, controlled value. Drop in below any messages list. Use this when you want the input affordances of `<AIChat>` but you're rendering your own messages list / scrollarea / header (e.g. Studio's left-column chat, where SelectionChip and SettingsPanel sit between messages and composer). For the full canned chat block, use `<AIChat>` instead.",import:"@gradeui/ui",aliases:["chat composer","chat input","prompt composer","message input"],composesWith:["AIChat (uses this internally)","Card (host above)","ScrollArea (place messages above)"],props:{value:{schema:z.string(),design:"content",description:"controlled textarea value"},onChange:{schema:z.unknown(),design:"event",description:"fires for every textarea change"},onSend:{schema:z.unknown(),design:"event",description:"fires when the user submits (Enter or click Send); composer validates that text or attachments exist before firing"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"disables the textarea + paperclip and swaps Send for Stop"},onStop:{schema:z.unknown().optional(),design:"event",description:"fires when the user clicks Stop; without this, Stop renders disabled"},placeholder:{schema:z.string().optional(),design:"content"},maxLength:{schema:z.number().optional(),design:"knob",description:"hard cap passed to the underlying `<textarea>`"},showHint:{schema:z.boolean().optional(),design:"knob",description:'show the "Press Enter\u2026 \xB7 Paste images" hint below the card; default true, set false when the host renders its own footer'},className:{schema:z.string().optional(),design:"plumbing"}}};var Pa={name:"AppShell",description:`The top-level page scaffold for any app-like or marketing layout. Reach for AppShell
2
+ import {z}from'zod';import*as w from'react';import {useRef,useEffect}from'react';import*as je from'@radix-ui/react-accordion';import {ChevronDown,X,ChevronLeft,ChevronRight,Check,Circle,Search,XCircle,ChevronUp,Image,Box,Code2,Music,Video,UtensilsCrossed,Package,Film,Mountain,User,Book,Gamepad2,Clapperboard,Tv,Disc3,Pause,Play,ChevronLeftIcon,ChevronRightIcon,ChevronDownIcon,CalendarIcon,GripVertical,MoreHorizontal,Palette,Download,Trash2,SunDim,Sun,Moon,MoonStar}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {cva}from'class-variance-authority';import {Slot}from'@radix-ui/react-slot';import*as yt from'@radix-ui/react-avatar';import {getDefaultClassNames,DayPicker}from'react-day-picker';import $d from'embla-carousel-react';import*as Ao from'@radix-ui/react-checkbox';import {Highlight}from'prism-react-renderer';import {useInView,motion}from'motion/react';import {format}from'date-fns';import*as tt from'@radix-ui/react-popover';import*as ae from'@radix-ui/react-dialog';import*as I from'@radix-ui/react-dropdown-menu';import*as ta from'@radix-ui/react-label';import*as zo from'@radix-ui/react-progress';import {Command}from'cmdk';import*as sa from'@radix-ui/react-separator';import*as Ht from'@radix-ui/react-radio-group';import*as go from'react-resizable-panels';import*as Ke from'@radix-ui/react-scroll-area';import*as B from'@radix-ui/react-select';import*as xt from'@radix-ui/react-slider';import {useSensors,useSensor,PointerSensor,KeyboardSensor,DndContext,closestCorners,closestCenter,useDroppable}from'@dnd-kit/core';import {sortableKeyboardCoordinates,arrayMove,SortableContext,rectSortingStrategy,horizontalListSortingStrategy,verticalListSortingStrategy,useSortable}from'@dnd-kit/sortable';import {CSS}from'@dnd-kit/utilities';import*as _o from'@radix-ui/react-switch';import*as at from'@radix-ui/react-tabs';import*as rt from'@radix-ui/react-tooltip';import*as va from'@radix-ui/react-toggle';import*as fo from'@radix-ui/react-toggle-group';import {createPortal}from'react-dom';import*as oe from'three';import {EffectComposer,RenderPass,BloomEffect,KernelSize,NoiseEffect,BlendFunction,ScanlineEffect,VignetteEffect,ChromaticAberrationEffect,GlitchEffect,EffectPass}from'postprocessing';import su from'lenis';var od=Object.defineProperty;var or=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ur=(e,t)=>{for(var o in t)od(e,o,{get:t[o],enumerable:true});};var Ir,Nl,El=or(()=>{Ir="2pMfyvhpuKonkf7h8HzH",Nl=()=>Ir!=="YOUR_KEY_HERE"&&Ir.length>0;});var Dl={};Ur(Dl,{createMaplibreAdapter:()=>tm});function em(){if(typeof document>"u"||document.getElementById(Hl))return;let e=document.createElement("link");e.id=Hl,e.rel="stylesheet",e.href=Qp,document.head.appendChild(e);}var Jp,Ll,Qp,Hl,tm,Al=or(()=>{El();Jp={light:"dataviz-light",dark:"dataviz-dark",satellite:"satellite"},Ll=(e,t)=>`https://api.maptiler.com/maps/${Jp[e]}/style.json?key=${encodeURIComponent(t)}`,Qp="https://unpkg.com/maplibre-gl@4/dist/maplibre-gl.css",Hl="gds-maplibre-gl-css";tm=async(e,t,o)=>{em();let r;try{r=await import('maplibre-gl'),r.default&&(r=r.default);}catch(c){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `maplibre-gl` is not installed. Run `pnpm add maplibre-gl` (or your package manager\'s equivalent) to use provider="maplibre".',cause:c}),c}let n=t.tilerKey??Ir;process.env.NODE_ENV!=="production"&&!t.tilerKey&&!Nl()&&console.warn("@gradeui/ui Map: no `tilerKey` prop and the bundled MapTiler demo key is unset. Tile requests will 403. Set `tilerKey` or paste a key into demo-config.ts.");let a=t.styleUrl??Ll(t.appearance,n),l=new r.Map({container:e,style:a,center:t.center,zoom:t.zoom,interactive:t.interactive,attributionControl:{compact:true}});t.bounds&&l.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(c=>{l.once("load",()=>c());}),o.onLoad(),l.on("error",c=>{let d=String(c?.error?.message??c?.message??"MapLibre error"),p=d.toLowerCase().includes("style");o.onError({code:p?"style-load-failed":"tile-load-failed",message:d,cause:c?.error??c});});let m=new globalThis.Map;return {setCenter:c=>l.setCenter(c),setZoom:c=>l.setZoom(c),setBounds:(c,d)=>l.fitBounds([c,d],{animate:false}),setAppearance:c=>{let d=t.styleUrl??Ll(c,n);l.setStyle(d,{diff:false});},setInteractive:c=>{let d=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let p of d){let g=l[p];g&&(c?g.enable():g.disable());}},flyTo:(c,d)=>l.flyTo({center:c,zoom:d?.zoom,duration:d?.durationMs??800}),panTo:(c,d)=>l.panTo(c,{duration:d?.durationMs??600}),fitBounds:(c,d)=>{if(c.length===0)return;let p=1/0,g=1/0,u=-1/0,b=-1/0;for(let[f,h]of c)f<p&&(p=f),h<g&&(g=h),f>u&&(u=f),h>b&&(b=h);l.fitBounds([[p,g],[u,b]],{padding:d?.paddingPx??40,duration:d?.durationMs??800});},getCenter:()=>{let c=l.getCenter();return [c.lng,c.lat]},getZoom:()=>l.getZoom(),getBounds:()=>{let c=l.getBounds();return [[c.getWest(),c.getSouth()],[c.getEast(),c.getNorth()]]},addMarker:(c,d,p)=>{let g=document.createElement("div");g.dataset.gdsPart="map-marker",g.dataset.gdsState="idle",g.style.cursor="pointer",g.addEventListener("mouseenter",()=>o.onMarkerHover(c)),g.addEventListener("mouseleave",()=>o.onMarkerHover(null)),g.addEventListener("click",f=>{o.onMarkerClick(c,b.coords,f);});let u=new r.Marker({element:g,anchor:p==="center"?"center":"bottom"}).setLngLat(d).addTo(l),b={element:g,coords:d,setHovered:f=>{g.dataset.gdsState=f?"hovered":"idle",g.style.zIndex=f?"10":"1";},setPosition:f=>{b.coords=f,u.setLngLat(f);},remove:()=>{u.remove(),m.delete(c);}};return m.set(c,{marker:u,handle:b}),b},destroy:()=>{m.forEach(({marker:c})=>c.remove()),m.clear(),l.remove();},instance:l}};});var zl={};Ur(zl,{createMapboxAdapter:()=>am});function rm(){if(typeof document>"u"||document.getElementById(Fl))return;let e=document.createElement("link");e.id=Fl,e.rel="stylesheet",e.href=om,document.head.appendChild(e);}var Il,om,Fl,am,Bl=or(()=>{Il={light:"mapbox://styles/mapbox/light-v11",dark:"mapbox://styles/mapbox/dark-v11",satellite:"mapbox://styles/mapbox/satellite-streets-v12"},om="https://unpkg.com/mapbox-gl@3/dist/mapbox-gl.css",Fl="gds-mapbox-gl-css";am=async(e,t,o)=>{if(!t.accessToken)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="mapbox" requires an `accessToken` prop.'}),new Error("mapbox accessToken missing");rm();let r;try{r=await import('mapbox-gl'),r.default&&(r=r.default);}catch(s){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `mapbox-gl` is not installed. Run `pnpm add mapbox-gl` to use provider="mapbox".',cause:s}),s}r.accessToken=t.accessToken;let n=t.styleUrl??Il[t.appearance],a=new r.Map({container:e,style:n,center:t.center,zoom:t.zoom,interactive:t.interactive});t.bounds&&a.fitBounds([t.bounds[0],t.bounds[1]],{animate:false}),await new Promise(s=>{a.once("load",()=>s());}),o.onLoad(),a.on("error",s=>{let c=String(s?.error?.message??s?.message??"Mapbox error"),d=c.toLowerCase().includes("style");o.onError({code:d?"style-load-failed":"tile-load-failed",message:c,cause:s?.error??s});});let l=new globalThis.Map;return {setCenter:s=>a.setCenter(s),setZoom:s=>a.setZoom(s),setBounds:(s,c)=>a.fitBounds([s,c],{animate:false}),setAppearance:s=>{let c=t.styleUrl??Il[s];a.setStyle(c,{diff:false});},setInteractive:s=>{let c=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"];for(let d of c){let p=a[d];p&&(s?p.enable():p.disable());}},flyTo:(s,c)=>a.flyTo({center:s,zoom:c?.zoom,duration:c?.durationMs??800}),panTo:(s,c)=>a.panTo(s,{duration:c?.durationMs??600}),fitBounds:(s,c)=>{if(s.length===0)return;let d=1/0,p=1/0,g=-1/0,u=-1/0;for(let[b,f]of s)b<d&&(d=b),f<p&&(p=f),b>g&&(g=b),f>u&&(u=f);a.fitBounds([[d,p],[g,u]],{padding:c?.paddingPx??40,duration:c?.durationMs??800});},getCenter:()=>{let s=a.getCenter();return [s.lng,s.lat]},getZoom:()=>a.getZoom(),getBounds:()=>{let s=a.getBounds();return [[s.getWest(),s.getSouth()],[s.getEast(),s.getNorth()]]},addMarker:(s,c,d)=>{let p=document.createElement("div");p.dataset.gdsPart="map-marker",p.dataset.gdsState="idle",p.style.cursor="pointer",p.addEventListener("mouseenter",()=>o.onMarkerHover(s)),p.addEventListener("mouseleave",()=>o.onMarkerHover(null)),p.addEventListener("click",b=>{o.onMarkerClick(s,u.coords,b);});let g=new r.Marker({element:p,anchor:d==="center"?"center":"bottom"}).setLngLat(c).addTo(a),u={element:p,coords:c,setHovered:b=>{p.dataset.gdsState=b?"hovered":"idle",p.style.zIndex=b?"10":"1";},setPosition:b=>{u.coords=b,g.setLngLat(b);},remove:()=>{g.remove(),l.delete(s);}};return l.set(s,{marker:g,handle:u}),u},destroy:()=>{l.forEach(({marker:s})=>s.remove()),l.clear(),a.remove();},instance:a}};});var Ol={};Ur(Ol,{createGoogleAdapter:()=>sm});var nm,im,Vl,sm,Gl=or(()=>{nm=[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"simplified"}]}],im=[{elementType:"geometry",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.stroke",stylers:[{color:"#1a1a1a"}]},{elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#262626"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca3af"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#0f172a"}]},{featureType:"transit",stylers:[{visibility:"simplified"},{color:"#3a3a3a"}]}],Vl=e=>e==="dark"?im:nm,sm=async(e,t,o)=>{if(!t.apiKey)throw o.onError({code:"api-key-missing",message:'@gradeui/ui Map: provider="google" requires an `apiKey` prop.'}),new Error("google apiKey missing");let r;try{let d=await import('@googlemaps/js-api-loader');r=d.Loader??d.default?.Loader;}catch(d){throw o.onError({code:"sdk-missing",message:'@gradeui/ui Map: `@googlemaps/js-api-loader` is not installed. Run `pnpm add @googlemaps/js-api-loader` to use provider="google".',cause:d}),d}let n=new r({apiKey:t.apiKey,version:"weekly",libraries:["maps","marker"]}),a;try{a=await n.load();}catch(d){throw o.onError({code:"provider-init-failed",message:"@gradeui/ui Map: Google Maps loader failed.",cause:d}),d}let l=t.appearance==="satellite",m=new a.maps.Map(e,{center:{lat:t.center[1],lng:t.center[0]},zoom:t.zoom,mapTypeId:l?a.maps.MapTypeId.HYBRID:a.maps.MapTypeId.ROADMAP,mapId:t.mapId,styles:l?void 0:Vl(t.appearance==="dark"?"dark":"light"),disableDefaultUI:!t.interactive,gestureHandling:t.interactive?"auto":"none",keyboardShortcuts:t.interactive});if(t.bounds){let d=new a.maps.LatLngBounds({lat:t.bounds[0][1],lng:t.bounds[0][0]},{lat:t.bounds[1][1],lng:t.bounds[1][0]});m.fitBounds(d);}await new Promise(d=>{a.maps.event.addListenerOnce(m,"idle",()=>d());}),o.onLoad();let s=new globalThis.Map;return {setCenter:d=>m.setCenter({lat:d[1],lng:d[0]}),setZoom:d=>m.setZoom(d),setBounds:(d,p)=>{let g=new a.maps.LatLngBounds({lat:d[1],lng:d[0]},{lat:p[1],lng:p[0]});m.fitBounds(g);},setAppearance:d=>{d==="satellite"?(m.setMapTypeId(a.maps.MapTypeId.HYBRID),m.setOptions({styles:void 0})):(m.setMapTypeId(a.maps.MapTypeId.ROADMAP),m.setOptions({styles:Vl(d)}));},setInteractive:d=>{m.setOptions({disableDefaultUI:!d,gestureHandling:d?"auto":"none",keyboardShortcuts:d});},flyTo:(d,p)=>{m.panTo({lat:d[1],lng:d[0]}),p?.zoom!=null&&m.setZoom(p.zoom);},panTo:d=>m.panTo({lat:d[1],lng:d[0]}),fitBounds:(d,p)=>{if(d.length===0)return;let g=new a.maps.LatLngBounds;for(let[u,b]of d)g.extend({lat:b,lng:u});m.fitBounds(g,p?.paddingPx??40);},getCenter:()=>{let d=m.getCenter();return d?[d.lng(),d.lat()]:[0,0]},getZoom:()=>m.getZoom()??0,getBounds:()=>{let d=m.getBounds();if(!d)return [[0,0],[0,0]];let p=d.getSouthWest(),g=d.getNorthEast();return [[p.lng(),p.lat()],[g.lng(),g.lat()]]},addMarker:(d,p,g)=>{let u=document.createElement("div");u.dataset.gdsPart="map-marker",u.dataset.gdsState="idle",u.style.cursor="pointer",g==="center"&&(u.style.transform="translateY(50%)"),u.addEventListener("mouseenter",()=>o.onMarkerHover(d)),u.addEventListener("mouseleave",()=>o.onMarkerHover(null)),u.addEventListener("click",h=>{o.onMarkerClick(d,f.coords,h);});let b=new a.maps.marker.AdvancedMarkerElement({map:m,position:{lat:p[1],lng:p[0]},content:u}),f={element:u,coords:p,setHovered:h=>{u.dataset.gdsState=h?"hovered":"idle",b.zIndex=h?10:1;},setPosition:h=>{f.coords=h,b.position={lat:h[1],lng:h[0]};},remove:()=>{b.map=null,s.delete(d);}};return s.set(d,{marker:b,handle:f}),f},destroy:()=>{s.forEach(({marker:d})=>{d.map=null;}),s.clear();},instance:m}};});var ja={name:"Accordion",description:`Long-form content that would overwhelm if shown all at once \u2014 FAQs, settings groups, "what's included" sections, nested help. For tab-style peer views with one always visible, reach for Tabs. For a single show/hide reveal use Collapsible.`,import:"@gradeui/ui",aliases:["accordion","faq","expand","collapse list","disclosure list","disclosure group","outline group","expandable list","sectionlist"],subcomponents:["AccordionItem","AccordionTrigger","AccordionContent"],composesWith:["Card (as a faq inside a card body)","Section primitives"],props:{type:{schema:z.enum(["single","multiple"]),design:"knob",description:"single keeps one open at a time, multiple lets several be open at once"},collapsible:{schema:z.boolean().optional(),design:"knob",description:'only valid with type="single"; allows the open item to be toggled shut'},defaultValue:{schema:z.string().optional(),design:"content",description:"initial open item(s)"},value:{schema:z.string().optional(),design:"content",description:"controlled"},onValueChange:{schema:z.unknown().optional(),design:"event"},children:{schema:z.unknown(),design:"plumbing",description:"the row label users click to expand"}}};var Ka={name:"AiChat",description:'A flexible chat block \u2014 header + scrollable message list + composer. Out of the box it looks like a polished "AI panel"; under it, every region is a slot so hosts can compose richer chat surfaces (e.g. Studio\'s left column with selection chip + settings panel above the composer, an error banner inline, per-message usage / refs / actions). Per-turn token usage, refs, and actions are optional and gated by `showUsage` / `showRefs` / `showActions` \u2014 leave them off for product-facing chats, turn them on for developer-facing ones where transparency matters. Composes with [[AIChatComposer]] (rendered internally; can be slotted in with custom props via `composerSlot`).',import:"@gradeui/ui",aliases:["ai chat","chat panel","chat block","llm chat","assistant panel","copilot chat","ai assistant"],composesWith:["Card (host in a sidebar panel)","Sheet (mobile drawer)","Stack (place above other content)","AIChatComposer (internal composer; slot to override)"],props:{messages:{schema:z.unknown().optional(),design:"plumbing",description:'`{ id, role: "user" | "assistant", content, timestamp, thinking?, steps?, usage?, refs?, actions?, duration? }`; defaults to empty'},onSendMessage:{schema:z.unknown().optional(),design:"event",description:"fires when the user submits via the default composer; ignored if `composerSlot` is set"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"shows a typing indicator at the bottom of the message list"},placeholder:{schema:z.string().optional(),design:"content",description:"composer placeholder text (ignored if `composerSlot` is set)"},title:{schema:z.string().optional(),design:"plumbing",description:'header title; defaults to "AI Assistant"'},titleIcon:{schema:z.unknown().optional(),design:"plumbing",description:"optional icon rendered before the title (e.g. `<Sparkles />`)"},headerTokens:{schema:z.number().optional(),design:"knob",description:'optional session-level token total shown on the right of the header; rendered as "N tokens" with a small gauge icon when set'},headerEnd:{schema:z.unknown().optional(),design:"plumbing",description:"optional arbitrary content appended after `headerTokens` on the right of the header"},showUsage:{schema:z.boolean().optional(),design:"knob",description:"show the per-turn `usage` strip below the assistant bubble; default false"},showRefs:{schema:z.boolean().optional(),design:"knob",description:"show the per-turn `refs` strip below the assistant bubble; default false"},showActions:{schema:z.boolean().optional(),design:"knob",description:"render per-turn `actions` chips when a message has them; default true"},showDuration:{schema:z.boolean().optional(),design:"knob",description:'render the per-turn wall-clock duration ("2.3s") below the assistant bubble when a message carries `duration`; default false'},showThinking:{schema:z.boolean().optional(),design:"knob",description:'render the per-turn reasoning ("Thoughts") disclosure above the assistant prose when a message carries `thinking`; collapsed by default, click to expand; default false'},showSteps:{schema:z.boolean().optional(),design:"knob",description:'render the per-turn step timeline above the assistant prose when a message carries `steps`; collapsed view shows the current running step (or "N steps completed"), click to expand the vertical timeline with status glyphs; default false'},thinkingPhrase:{schema:z.string().optional(),design:"content",description:'override the "Thinking" label in the loading indicator'},suggestedPrompts:{schema:z.unknown().optional(),design:"plumbing",description:"empty-state quick prompts (ignored if `emptyStateSlot` is set)"},emptyStateSlot:{schema:z.unknown().optional(),design:"plumbing",description:"replaces the default empty state entirely"},errorSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered after the messages list (typically an error banner)"},composerAboveSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered between the messages and the composer (selection chip, settings panel)"},composerBelowSlot:{schema:z.unknown().optional(),design:"plumbing",description:"rendered below the composer (disclaimer, char counter)"},composerSlot:{schema:z.unknown().optional(),design:"plumbing",description:"full override of the composer; when provided, `onSendMessage` + `placeholder` are unused"},bare:{schema:z.boolean().optional(),design:"knob",description:"strip the outer card chrome (background, border, rounded corners) so the chat takes the surface of its container; default false (keeps the canned card look)"},assistantBubble:{schema:z.boolean().optional(),design:"knob",description:"whether assistant messages render with a bubble (background + border + padding + rounded corners); default true. Set false for a Claude.ai-style chromeless transcript where assistant text sits on the surface and only user turns wear a bubble."},className:{schema:z.string().optional(),design:"plumbing"}}};var qa={name:"AiChatComposer",description:"The reusable \"input card\" for any chat surface \u2014 auto-growing textarea, image attachments via paperclip and clipboard paste, attachment chips with previews, Send/Stop toggle, controlled value. Drop in below any messages list. Use this when you want the input affordances of `<AIChat>` but you're rendering your own messages list / scrollarea / header (e.g. Studio's left-column chat, where SelectionChip and SettingsPanel sit between messages and composer). For the full canned chat block, use `<AIChat>` instead.",import:"@gradeui/ui",aliases:["chat composer","chat input","prompt composer","message input"],composesWith:["AIChat (uses this internally)","Card (host above)","ScrollArea (place messages above)"],props:{value:{schema:z.string(),design:"content",description:"controlled textarea value"},onChange:{schema:z.unknown(),design:"event",description:"fires for every textarea change"},onSend:{schema:z.unknown(),design:"event",description:"fires when the user submits (Enter or click Send); composer validates that text or attachments exist before firing"},isLoading:{schema:z.boolean().optional(),design:"knob",description:"disables the textarea + paperclip and swaps Send for Stop"},onStop:{schema:z.unknown().optional(),design:"event",description:"fires when the user clicks Stop; without this, Stop renders disabled"},placeholder:{schema:z.string().optional(),design:"content"},maxLength:{schema:z.number().optional(),design:"knob",description:"hard cap passed to the underlying `<textarea>`"},showHint:{schema:z.boolean().optional(),design:"knob",description:'show the "Press Enter\u2026 \xB7 Paste images" hint below the card; default true, set false when the host renders its own footer'},className:{schema:z.string().optional(),design:"plumbing"}}};var Ya={name:"AppShell",description:`The top-level page scaffold for any app-like or marketing layout. Reach for AppShell
3
3
  instead of hand-rolling \`grid grid-cols-[auto_1fr]\` so the layout shape (top nav,
4
4
  side nav, three-pane Slack/Mail/Notion shape, constrained vs full-width main) is a
5
5
  prop the settings panel can mutate. Don't compose top-level layouts from raw grid
@@ -14,7 +14,7 @@ Pick the \`nav\` variant from the source:
14
14
  shape. ANY time you see a vertical icon rail next to
15
15
  a separate list/sidebar, this is the answer \u2014 don't
16
16
  reach for raw \`<div className="grid">\` with three
17
- column tracks.`,import:"@gradeui/ui",subcomponents:["AppShellHeader","AppShellNav","AppShellAside","AppShellMain","AppShellFooter"],composesWith:["Stack","Row","Card","Button","Separator","Sidebar","Toolbar","any page content"],props:{nav:{schema:z.enum(["none","top","side","three-pane"]).optional(),design:"knob",description:"layout structure",default:"none"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Ma={name:"Avatar",description:"User/entity identity for PEOPLE \u2014 profile pictures, author rows, member lists, account headers. Circular by default; the AvatarFallback initials read as a person's name. Always include AvatarFallback so load failure doesn't leave a gap.",import:"@gradeui/ui",aliases:["profile picture","user image","account image","avatar","person glyph","user avatar","profile image","react native avatar"],subcomponents:["AvatarImage","AvatarFallback"],composesWith:["Card (in CardHeader)","Table cells","Badge (placed next to for status)","Skeleton (loading state)"],props:{className:{schema:z.unknown().optional(),design:"plumbing",description:"set size via utilities (default h-10 w-10)"},src:{schema:z.unknown(),design:"plumbing"},initials:{schema:z.unknown(),design:"plumbing"}}};var Ea={name:"Badge",description:"Compact status chips, counts, tags, pills. For higher-signal inline status \u2192 use Callout. For solid CTAs \u2192 Button. Soft/outline variants are quieter; solid variants are loud.",import:"@gradeui/ui",aliases:["chip","tag","pill","label chip","badge","tag view","status pill","token","count badge"],composesWith:["Card","Table (inside a cell)","Avatar (next to it)","anywhere inline"],props:{variant:{schema:z.enum(["see list above"]).optional(),design:"knob"},rounded:{schema:z.enum(["default","full"]).optional(),design:"knob",description:'"full" gives a pill shape'}}};var La={name:"Breadcrumb",description:'Reach for Breadcrumb whenever a screen sits inside a hierarchy and you want the path back to the top to be visible. Common spots: above page titles in admin/CMS screens, top of Settings detail pages, after a router redirect when the URL implies depth. Use the current page as a <BreadcrumbPage> (non-clickable) and prior levels as <BreadcrumbLink>. For a horizontal "top nav" of peer destinations use Side Menu or Tabs instead \u2014 Breadcrumb is strictly for hierarchical path.',import:"@gradeui/ui",aliases:["breadcrumb","breadcrumbs","crumbs","path","page hierarchy","path bar","navigation trail","finder path"],subcomponents:["BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis"],composesWith:["AppShellMain","Card (in CardHeader)","Dialog"],props:{"aria-label":{schema:z.unknown().optional(),design:"plumbing",description:"passed to the underlying <nav>"},separator:{schema:z.unknown().optional(),design:"plumbing",description:'**tree-wide default** for every <BreadcrumbSeparator/> inside. Pass a string ("/", "\u203A", "\u2022"), a lucide icon (`<Slash/>`, `<ChevronRight/>`), or any ReactNode. Default: `<ChevronRight/>`. Set once on the root; every separator below picks it up via context.'},className:{schema:z.unknown().optional(),design:"plumbing",description:"the <ol> wrapper; usually no overrides needed"},href:{schema:z.unknown().optional(),design:"plumbing",description:"renders as <a> when set, <button> when not; asChild? wraps a custom element"},children:{schema:z.unknown().optional(),design:"plumbing",description:"per-instance override of the separator glyph. When set, beats the root's `separator` prop for this one slot. When not set, falls back to the root's `separator`, then to `<ChevronRight/>`."}}};var Ha={name:"Button",description:'Any clickable action. Use size="icon" for square icon-only buttons, variant="link" for inline links that should look like Button. A Button placed next to a TabsList of the same size lines up edge-to-edge without per-call overrides.',import:"@gradeui/ui",aliases:["button","push button","plain button","bordered button","destructive button","capsule button","link button","action button","cta"],composesWith:["Dialog","DropdownMenu","Tooltip","Card (in CardFooter)","Row","Form controls"],props:{variant:{schema:z.enum(["default","destructive","outline","secondary","ghost","link"]).optional(),design:"knob"},size:{schema:z.enum(["sm","md","lg","icon"]).optional(),design:"knob",description:"t-shirt scale aligned with Tabs/ToggleGroup heights (sm=h-7, md=h-8, lg=h-10). `default` still works as an alias for `md`."},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"renders as the child element (use to wrap <a>/<Link>)"},disabled:{schema:z.boolean().optional(),design:"knob"}}};var Da={name:"Calendar",description:'An inline date grid \u2014 date-of-birth pickers in profile forms, scheduling screens with a month view, range selection in reporting filters. For a compact trigger-and-popover input, use DatePicker / DateRangePicker (which wrap Calendar internally). For one-off relative dates ("yesterday", "last week") use a Select instead.',import:"@gradeui/ui",aliases:["calendar","date grid","month view","scheduler grid","calendar view","multidate picker","react native calendars"],subcomponents:["CalendarDayButton"],composesWith:["Popover (DatePicker composes them)","Card (inline scheduling card)","Dialog (full-screen mobile date pick)"],props:{mode:{schema:z.enum(["single","multiple","range"]).optional(),design:"knob",description:"picks one date, several dates, or a [from, to] range"},selected:{schema:z.unknown().optional(),design:"plumbing",description:"controlled selection; shape matches `mode`"},onSelect:{schema:z.unknown().optional(),design:"event",description:"fires with the new selection"},month:{schema:z.unknown().optional(),design:"plumbing",description:"controlled displayed month"},defaultMonth:{schema:z.unknown().optional(),design:"plumbing",description:"uncontrolled initial month"},onMonthChange:{schema:z.unknown().optional(),design:"event"},numberOfMonths:{schema:z.number().optional(),design:"knob",description:"render multiple months side by side, useful for range pickers"},disabled:{schema:z.unknown().optional(),design:"plumbing"},captionLayout:{schema:z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing"}}};var Aa={name:"Callout",description:"Inline, ambient, non-blocking status/feedback that sits inside the layout flow. Form-level validation summaries, settings-page notices, page-level banners. NOT a toast (use Sonner for transient). NOT a modal (use Dialog when the user must respond). Put an icon as first child \u2014 it's auto-positioned; CalloutTitle + CalloutDescription follow.",import:"@gradeui/ui",aliases:["callout","banner","notice","inline alert","in-app notification","status banner","info banner","info callout","warning callout","success callout"],subcomponents:["CalloutTitle","CalloutDescription"],composesWith:["lucide-react icons as first child","Button (inside CalloutDescription)","Card (as a section callout)"],props:{variant:{schema:z.enum(["default","destructive","success","warning","info"]).optional(),design:"knob",description:"semantic colouring; `default` is neutral"}}};var Fa={name:"Card",description:"Grouped content with a distinct surface \u2014 settings panels, dashboard tiles, list-of-cards layouts. Pair CardHeader (title + description) with CardContent and optional CardFooter (actions).",import:"@gradeui/ui",aliases:["card","group box","groupbox","panel","tile","surface"],subcomponents:["CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],composesWith:["Button (in CardFooter)","Badge","Separator","Avatar","any form controls"],props:{Each:{schema:z.unknown(),design:"plumbing"},No:{schema:z.unknown(),design:"plumbing",description:"Card is a flexible container surface"}}};var Ml=z.enum(["start","center","end"]),Nl=z.object({delay:z.number().int().positive().optional(),pauseOnHover:z.boolean().optional(),pauseWhenOffscreen:z.boolean().optional()}),El=z.union([z.boolean(),Nl]),za={name:"Carousel",description:"Token-driven slideshow primitive. Embla under the hood, custom autoplay loop with per-slide duration overrides, and a VideoSlide variant that autoplays muted+loop with a poster fallback. Reach for it for marketing hero rotations, app onboarding tours, image galleries, TV/streaming featured rails \u2014 anywhere a horizontal stack of slides cycles automatically or on user input.",import:"@gradeui/ui",aliases:["carousel","slideshow","slider","hero rotation","image gallery","featured row","swipe deck"],subcomponents:["Carousel.Slide","Carousel.VideoSlide","Carousel.Dots","Carousel.Arrows","Carousel.Prev","Carousel.Next"],composesWith:["MediaSurface (inside Carousel.Slide for posters / album art)","Card (slide content)","Stack / Row (slide composition)"],props:{loop:{schema:z.boolean().optional(),design:"knob",label:"Loop",default:true,description:"Wrap from the last slide back to the first. Default true \u2014 the natural fit for hero rotations. Turn off for finite onboarding sequences."},align:{schema:Ml.optional(),design:"knob",control:"toggle-group",label:"Slide alignment",default:"start",description:"How slides line up inside the viewport when not at 100% width. 'start' is full-bleed; 'center' gives the 'peek of neighbours' carousel look."},slidesPerView:{schema:z.number().int().positive().optional(),design:"knob",label:"Slides per view",default:1,description:"How many slides show at once. 1 for hero rotations; 3 for thumbnail strips; etc. For media-query responsive layouts, leave this at 1 and override `--gds-carousel-slide-basis` on each Slide via CSS."},autoplay:{schema:El.optional(),design:"structured",label:"Autoplay",default:false,description:"`true` for sensible defaults (5s, pause on hover, pause offscreen). Object form: `{ delay, pauseOnHover, pauseWhenOffscreen }`. Per-slide overrides go on `<Carousel.Slide duration={ms}>`."},draggable:{schema:z.boolean().optional(),design:"knob",label:"Drag to swipe",default:true,description:"Disable when slide content (a Map, a chart, a draggable card) needs to swallow drag events."},onSlideChange:{schema:z.function().optional(),design:"event",description:"Fires with the new slide index whenever the active slide changes (programmatic, autoplay, or user swipe)."},className:{schema:z.string().optional(),design:"plumbing"},style:{schema:z.record(z.string(),z.unknown()).optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing",description:"Carousel.Slide / Carousel.VideoSlide children, plus optionally Carousel.Dots and Carousel.Arrows."}}};var Ba={name:"Chart",description:"Reporting dashboards, single-purpose analytics cards (revenue, conversions, active users), or anywhere you'd otherwise hand-roll a Recharts setup. Bring the actual chart type from `recharts` \u2014 ChartContainer doesn't pick the chart shape for you, it themes whatever you nest. For sparkline-style decorative trends consider just rendering a small SVG line directly; ChartContainer is overkill for non-interactive ornament.",import:"@gradeui/ui",aliases:["chart","charts","graph","bar chart","line chart","area chart","recharts","analytics chart","swift chart","swiftui chart","victory chart","victory native"],subcomponents:["ChartTooltip","ChartTooltipContent","ChartLegend","ChartLegendContent","ChartStyle"],composesWith:["Card (chart-in-a-card pattern)","Tabs (multi-metric switcher)","Recharts components (Bar","Line","Area","Pie",'Radar from "recharts")'],props:{config:{schema:z.unknown(),design:"plumbing",description:'`{ [seriesKey]: { label: string; color?: string; theme?: { light: string; dark: string } } }`; the keys here are the names you reference in your Recharts <Bar dataKey="\u2026" /> calls'},id:{schema:z.string().optional(),design:"plumbing",description:"used for the inlined <style> tag"},children:{schema:z.unknown(),design:"plumbing",description:"typically a single Recharts ResponsiveContainer or chart"},passes:{schema:z.unknown(),design:"plumbing",description:"pair with `content={<ChartTooltipContent />}`"},indicator:{schema:z.enum(["dot","line","dashed"]).optional(),design:"knob"},ChartLegend:{schema:z.unknown(),design:"plumbing"}}};var Ga={name:"Checkbox",description:"Binary on/off tied to a list (select multiple, agree to terms). Single on/off that controls a setting is better with Switch.",import:"@gradeui/ui",aliases:["checkbox","tickbox","tick box","check","multi-select item"],composesWith:["Label (via htmlFor)","Card","Form rows","Table (for row selection)"],props:{checked:{schema:z.boolean().optional(),design:"knob"},onCheckedChange:{schema:z.unknown().optional(),design:"event"},defaultChecked:{schema:z.boolean().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},id:{schema:z.string().optional(),design:"plumbing",description:"bind a Label's htmlFor to this"}}};var Oa={name:"Collapsible",description:'A single show/hide reveal \u2014 "Show advanced settings" rows, expandable inline help, "More details" sections inside cards. For multiple rows of expandable content where one-at-a-time matters, reach for Accordion. For a separate panel that floats above content, use Popover.',import:"@gradeui/ui",aliases:["collapsible","expand","show more","disclosure","advanced settings","disclosure group","expandable section","expandable view","show hide"],subcomponents:["CollapsibleTrigger","CollapsibleContent"],composesWith:["Button (as the trigger","asChild)","Card (expandable settings group)","Row (header + chevron)"],props:{open:{schema:z.boolean().optional(),design:"knob",description:"controlled open state"},defaultOpen:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onOpenChange:{schema:z.unknown().optional(),design:"event"},children:{schema:z.unknown(),design:"plumbing",description:"the clickable header (often a Button asChild)"}}};var Va={name:"Command",description:'A searchable list of actions or destinations \u2014 global \u2318K palettes, "jump to" inputs, account switchers with filter. Wrap in CommandDialog when it should pop over the entire app on a hotkey. For straight forms with filter, prefer a Select with a search input. For free-text autocomplete tied to a single value, prefer Combobox built on Popover + Command.',import:"@gradeui/ui",aliases:["command palette","command menu","cmd k","quick switcher","action menu","spotlight","spotlight search","quick open","fuzzy finder"],subcomponents:["CommandInput","CommandList","CommandEmpty","CommandGroup","CommandItem","CommandSeparator","CommandShortcut","CommandDialog"],composesWith:["Dialog (CommandDialog wraps it)","Popover (inline combobox)","Tooltip"],props:{value:{schema:z.string().optional(),design:"content",description:"controlled active item value"},onValueChange:{schema:z.unknown().optional(),design:"event"},placeholder:{schema:z.string().optional(),design:"content"},children:{schema:z.unknown(),design:"plumbing",description:"wraps groups and empty state"},heading:{schema:z.string().optional(),design:"content"},onSelect:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},open:{schema:z.unknown(),design:"plumbing",description:"when you want the command palette mounted in a modal (cmd+k pattern)"}}};var _a={name:"DatePicker",description:'Any date or date-range entry. Use DatePicker for a single date (DOB, due date, booking). Use DateRangePicker for a span (report period, stay dates, filter window). Prefer these over <Input type="date"> \u2014 consistent theming, keyboard nav, a11y, and no browser-native UI drift.',import:"@gradeui/ui",aliases:["datepicker","calendar input","date field","date range","datepickerios","react native date picker","calendar input field","date field control"],subcomponents:["DateRangePicker"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],props:{value:{schema:z.unknown().optional(),design:"plumbing"},onChange:{schema:z.unknown().optional(),design:"event",description:"called on select or clear"},placeholder:{schema:z.string().optional(),design:"content",description:'trigger label when empty (default "Pick a date" / "Pick a date range")'},disabled:{schema:z.boolean().optional(),design:"knob"},format:{schema:z.string().optional(),design:"content",description:'date-fns format token for the trigger label (default "PPP" single, "LLL dd, y" range)'},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob",description:'popover align (default "start")'},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",description:"popover side"},captionLayout:{schema:z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing",description:"on the trigger button"},contentClassName:{schema:z.string().optional(),design:"content",description:"on the PopoverContent"},icon:{schema:z.unknown().optional(),design:"plumbing",description:"replaces the default CalendarIcon"},numberOfMonths:{schema:z.number().optional(),design:"knob",description:"DateRangePicker only, default 2"}}};var Wa={name:"Dialog",description:'Modal interruptions \u2014 confirmations, focused forms, detail views. Dialog is the right primitive for Apple HIG / React Native "Alert" (modal) semantics. For non-blocking inline messaging use Callout; for transient notifications use Toaster (Sonner). Always include DialogTitle (a11y requirement).',import:"@gradeui/ui",aliases:["modal","popup","overlay","alert","system alert","alert dialog","modal dialog","confirm dialog","react native modal","rn alert"],subcomponents:["DialogTrigger","DialogContent","DialogHeader","DialogTitle","DialogDescription","DialogFooter","DialogClose"],composesWith:["Button (as DialogTrigger asChild","and inside DialogFooter)","Input/Textarea/Select inside DialogContent"],props:{open:{schema:z.unknown().optional(),design:"plumbing",description:"Radix controlled/uncontrolled pattern"},asChild:{schema:z.enum(["wrap a Button"]).optional(),design:"plumbing"},accepts:{schema:z.unknown(),design:"plumbing"},used:{schema:z.unknown(),design:"plumbing"}}};var $a={name:"DropdownMenu",description:'A small action menu attached to a trigger \u2014 overflow "\u2026" buttons on cards, user-avatar menus in headers, "Insert" menus in editors. For a full searchable list, use Command. For ONE primary action plus a secondary, use a Button next to a smaller ghost Button instead of a dropdown.',import:"@gradeui/ui",aliases:["dropdown","dropdown menu","overflow menu","kebab menu","more menu","action menu","context-style menu","menu","pull-down menu","pulldown menu","context menu","popup menu","actions menu"],subcomponents:["DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuGroup","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"],composesWith:["Button (as trigger asChild)","Avatar (user menu)","Card (overflow on a tile)","Tooltip (on the trigger)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually wraps a Button"},align:{schema:z.enum(["start","center","end","top","right","bottom","left"]).optional(),design:"knob"},onSelect:{schema:z.unknown().optional(),design:"event"},DropdownMenuCheckboxItem:{schema:z.unknown(),design:"plumbing"},DropdownMenuSub:{schema:z.unknown(),design:"plumbing",description:"sub-trigger shows children, sub-content holds the deeper items"},children:{schema:z.unknown(),design:"plumbing",description:"right-aligned kbd hint"}}};var Ua={name:"Flex",description:"The unopinionated flexbox primitive \u2014 reach for Flex when Stack, Row, or Grid don't quite fit. Specifically when you need reverse direction (`row-reverse` / `col-reverse`), CSS defaults instead of Row's baked-in `items-center gap-md`, or baseline alignment. Otherwise prefer Stack / Row / Grid \u2014 they're easier to read and tuned for the 95% case. Flex is the escape hatch, not the default.",import:"@gradeui/ui",aliases:["flex","flexbox","flex container","hstack","vstack","horizontal","vertical","generic container","layout view"],composesWith:["any content component"],props:{direction:{schema:z.enum(["row","col","row-reverse","col-reverse"]).optional(),design:"knob",description:"main-axis direction",default:"row"},gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"none"},align:{schema:z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis alignment",default:"stretch"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:z.enum(["nowrap","wrap","wrap-reverse"]).optional(),design:"knob",description:"wrap behaviour when children overflow",default:"nowrap"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var ja={name:"Grid",description:"2D layouts where Stack (vertical) and Row (horizontal) don't fit \u2014 stat-card grids, feature tiles, pricing columns, photo grids. Reach for Grid over hand-rolled `grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4` so the column count is a prop the settings panel can mutate and the responsive ladder stays consistent across designs.",import:"@gradeui/ui",aliases:["grid","tiles","cards grid","stat grid","columns","feature grid","grid view","lazy v grid","lazyvgrid","lazy h grid","lazyhgrid","tile grid","masonry"],composesWith:["Card","Stack (inside each cell)","Row","Button","any content component"],props:{cols:{schema:z.enum(["1","2","3","4","5","6","12"]).optional(),design:"knob",description:'desktop column count; each value has a baked-in responsive ladder (e.g. "4" \u2192 1 col mobile, 2 tablet, 4 desktop)',default:"3"},gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between grid cells (same scale as Stack/Row)",default:"md"},align:{schema:z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis alignment of cells",default:"stretch"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Ka={name:"HoverCard",description:"Rich preview content surfaced on hover \u2014 user profile mini-cards on @-mentions, link previews, definition popups. Pointer-only by design (no touch-friendly trigger); pair with a click target for touch devices, or fall back to Popover. NEVER use HoverCard for critical info \u2014 if the user can't reach it via keyboard or touch, it might as well not exist for accessibility.",import:"@gradeui/ui",aliases:["hover card","hover preview","mention preview","profile peek","link preview","rich tooltip","link preview card","profile hover","peek card"],subcomponents:["HoverCardTrigger","HoverCardContent"],composesWith:["Avatar (user preview)","Card (richer content)","Link (the trigger)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually a Link or Button"},side:{schema:z.unknown().optional(),design:"plumbing"}}};var qa={name:"Input",description:"Any single-line text entry. Always pair with a Label for accessibility.",import:"@gradeui/ui",aliases:["text field","textbox","textfield","form field","text input","secure field","search field","url field","number field","textinput","text input field","react native textinput"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],props:{type:{schema:z.string().optional(),design:"content"}}};var Ya={name:"Label",description:"Every Input / Textarea / Checkbox / Switch / RadioGroup. Always use htmlFor so clicking the label focuses the control.",import:"@gradeui/ui",aliases:["label","form label","field label","caption"],composesWith:["Input","Textarea","Checkbox","Switch","RadioGroup","Select"],props:{htmlFor:{schema:z.string().optional(),design:"content",description:"binds to the input's id"}}};var Za={name:"Map",description:"Any layout that needs a real map \u2014 listings (real estate, Airbnb-style), fleet/logistics dashboards, store locators, anywhere a user picks a location from a viewport. Reach for the controlled `hoveredId` prop when a sibling list and the map need to highlight each other.",import:"@gradeui/ui",aliases:["map","maps","mapbox","maplibre","google maps","geo","location","latlng","coordinates","marker","pin","airbnb","listings","fleet","real estate","logistics","map view","mapkit","mapview","react native maps","rn maps"],subcomponents:["MapMarker"],composesWith:["Card (as marker content)","Badge","Avatar","Button","Row","Stack","Skeleton"],props:{provider:{schema:z.unknown(),design:"plumbing",description:'"maplibre" (default, free, no key) | "mapbox" (needs accessToken) | "google" (needs apiKey). Switching is one prop change.'},center:{schema:z.unknown(),design:"plumbing",description:"`[lng, lat]` tuple. ALWAYS lng first. Required."},zoom:{schema:z.unknown(),design:"plumbing",description:"number, 0\u201322. Required."},bounds:{schema:z.unknown(),design:"plumbing",description:"`[[swLng, swLat], [neLng, neLat]]`. When set, takes precedence over center+zoom."},appearance:{schema:z.unknown(),design:"plumbing",description:'"light" | "dark" | "satellite" | "auto" (default "auto", follows GradeThemeProvider mode).'},hoveredId:{schema:z.unknown(),design:"plumbing",description:'controlled string id, pairs with onHoveredIdChange. The matching MapMarker gets `data-gds-state="hovered"` automatically. This is how you build list \u2194 map two-way sync.'},interactive:{schema:z.unknown(),design:"plumbing",description:"false freezes pan/zoom, useful for static cards."},onLoad:{schema:z.unknown(),design:"event",description:"handle exposes flyTo, panTo, fitBounds, getCenter, getZoom, getBounds, instance."},tilerKey:{schema:z.enum(["maplibre"]),design:"knob",description:"only needed off `gradeui.com`/`localhost`. Default key is referrer-locked."},accessToken:{schema:z.enum(["mapbox), apiKey (google"]),design:"knob",description:"required for those providers."}}};var Dl=z.object({kind:z.literal("album"),artist:z.string(),title:z.string(),year:z.number().optional(),description:z.string().optional()}),Al=z.object({kind:z.literal("tv-show"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),Il=z.object({kind:z.literal("movie"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),Fl=z.object({kind:z.literal("game"),title:z.string(),description:z.string().optional()}),zl=z.object({kind:z.literal("book"),title:z.string().optional(),author:z.string().optional(),isbn:z.string().optional(),description:z.string().optional()}),Bl=z.object({kind:z.literal("poster"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),Gl=z.object({kind:z.literal("portrait"),name:z.string().optional(),role:z.string().optional()}),Ol=z.object({kind:z.literal("landscape"),location:z.string().optional(),mood:z.string().optional()}),Vl=z.object({kind:z.literal("product"),name:z.string().optional(),brand:z.string().optional()}),_l=z.object({kind:z.literal("food"),dish:z.string().optional(),cuisine:z.string().optional()}),Wl=z.object({kind:z.literal("generic"),prompt:z.string()}),$l=z.union([z.object({kind:z.literal("video")}),z.object({kind:z.literal("audio")}),z.object({kind:z.literal("embed")}),z.object({kind:z.literal("3d")})]),Ul=z.union([Dl,Al,Il,Fl,zl,Bl,Gl,Ol,Vl,_l,Wl,$l]),jl=z.enum(["video","square","portrait","wide","auto"]),Kl=z.enum(["none","sm","md","lg","xl"]),ql=z.enum(["album","tv-show","movie","game","book","portrait","landscape","poster","product","food","video","audio","embed","3d","generic"]),Yl=z.union([z.literal("auto"),z.literal("icon"),z.literal("none")]),xr={name:"MediaSurface",description:"The canonical media slot for ALL non-person imagery \u2014 album art, posters, hero images, landscape photos, video and 3D containers.",when:"Pass `hint` + `alt` + (optionally) `source` so the empty-state placeholder is meaningful and the generation pipeline can later fill the slot with a real image. Use directly for declarative slots; the higher-level VideoPlayer / RivePlayer / ThreeScene wrap this for runtime-heavy media.",antipatterns:["Don't wrap <Avatar> inside <MediaSurface> to get an initials fallback. Set `alt` + `hint` on MediaSurface directly \u2014 the placeholder renders initials at small sizes derived from `alt`.","Don't use <Avatar> for album art, posters, products, food, landscapes, etc. Avatar is for PEOPLE only.","Don't inline manual gradient backgrounds (`bg-gradient-to-br \u2026`) on MediaSurface as a 'placeholder vibe' \u2014 the empty-state is already styled via `--gds-media-placeholder-bg/-fg` tokens."],composesWith:["Card","CardBlock","MediaBlock","VideoPlayer","RivePlayer","ThreeScene"],aliases:["media","image slot","media slot","image placeholder","cover","thumbnail","poster slot"],import:"@gradeui/ui",props:{hint:{schema:ql.optional(),design:"knob",control:"glyph-picker",label:"Slot kind",description:"Picks the placeholder glyph + the default aspect + the future generation provider. Defaults to 'generic'.",default:"generic",examples:["album","portrait","landscape","poster"]},aspect:{schema:jl.optional(),design:"knob",control:"toggle-group",label:"Aspect ratio",description:"Override the slot's natural framing. When omitted, derived from `hint`: album/product/food \u2192 square, portrait/poster \u2192 portrait, landscape \u2192 wide, video/audio/embed/generic \u2192 video."},radius:{schema:Kl.optional(),design:"knob",control:"toggle-group",label:"Corner radius",default:"lg",description:"Driven by the `--gds-media-radius` CSS variable."},border:{schema:z.boolean().optional(),design:"knob",label:"Show border",default:false},loading:{schema:z.boolean().optional(),design:"knob",label:"Loading state",default:false,description:"Overlays the muted-pulse skeleton on top of the slot."},emptyState:{schema:Yl.optional(),design:"knob",control:"select",label:"Empty state",default:"auto",description:"'auto' renders the size-tiered placeholder (initials \u2192 glyph \u2192 glyph + caption). 'icon' is a legacy alias. 'none' renders a truly empty surface."},alt:{schema:z.string().optional(),design:"content",control:"text",label:"Alt text",description:"Becomes the eventual `<img alt>`. Also drives the placeholder caption (>160px slots) and the 2-letter initials fallback (<64px slots).",examples:["Travelling Without Moving \u2014 Jamiroquai","Sunset over Mount Fuji"]},src:{schema:z.string().url().optional(),design:"content",control:"url",label:"Image URL",description:"When set, renders an `<img>` filling the slot via object-cover. The wrapper keeps its aspect/radius/border. Generators patch this prop; manual values always win."},source:{schema:Ul.optional(),design:"structured",label:"Source descriptor",description:"Structured metadata for the generation pipeline. Opaque to MediaSurface itself; read by the resolver to look up real imagery from the right provider (MusicBrainz / Pollinations / etc.).",perKindFields:{album:{artist:"string",title:"string",year:"number?"},poster:{title:"string",year:"number?"},portrait:{name:"string?",role:"string?"},landscape:{location:"string?",mood:"string?"},product:{name:"string?",brand:"string?"},food:{dish:"string?",cuisine:"string?"},generic:{prompt:"string"},video:{},audio:{},embed:{},"3d":{}}},className:{schema:z.string().optional(),design:"plumbing"},style:{schema:z.record(z.string(),z.unknown()).optional(),design:"plumbing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"Escape hatch for putting a custom <video>, <canvas>, Rive runtime, etc. inside. When supplied, the placeholder is suppressed."},overlay:{schema:z.unknown().optional(),design:"plumbing",description:"Decorative layer rendered ABOVE the media/placeholder (play buttons, hover gradients, corner badges). Does NOT suppress the placeholder."},glyph:{schema:z.unknown().optional(),design:"plumbing",description:"Per-instance override of the hint-derived placeholder glyph. Most consumers should pick a `hint` and let the map decide."},fallback:{schema:z.unknown().optional(),design:"plumbing",description:"Custom node shown while `loading` is true."},onVisibilityChange:{schema:z.function().optional(),design:"event",description:"Fires when the surface enters / leaves the viewport (IntersectionObserver)."}},actions:{fill:{label:"Fill image",icon:"Sparkles",description:"Resolve this slot's source via the free providers (MusicBrainz \u2192 Pollinations \u2192 Picsum) and patch the result into the runtime URL map.",kind:"resolve-media-source",enabledWhen:{propPresent:"source"}},refresh:{label:"Refresh",icon:"RotateCw",description:"Re-fetch this slot's resolved URL (cache-busts the browser AND the local URL map). Useful when a Pollinations URL failed to load on first hit \u2014 Pollinations has typically finished its cold-start by now, so a retry usually succeeds.",kind:"refresh-media-source",enabledWhen:{propPresent:"source"}}}};var Xa={name:"MultiSelect",description:`Picking multiple items from a finite list \u2014 tag selectors, filter chips,
17
+ column tracks.`,import:"@gradeui/ui",subcomponents:["AppShellHeader","AppShellNav","AppShellAside","AppShellMain","AppShellFooter"],composesWith:["Stack","Row","Card","Button","Separator","Sidebar","Toolbar","any page content"],props:{nav:{schema:z.enum(["none","top","side","three-pane"]).optional(),design:"knob",description:"layout structure",default:"none"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Za={name:"Avatar",description:"User/entity identity for PEOPLE \u2014 profile pictures, author rows, member lists, account headers. Circular by default; the AvatarFallback initials read as a person's name. Always include AvatarFallback so load failure doesn't leave a gap.",import:"@gradeui/ui",aliases:["profile picture","user image","account image","avatar","person glyph","user avatar","profile image","react native avatar"],subcomponents:["AvatarImage","AvatarFallback"],composesWith:["Card (in CardHeader)","Table cells","Badge (placed next to for status)","Skeleton (loading state)"],props:{className:{schema:z.unknown().optional(),design:"plumbing",description:"set size via utilities (default h-10 w-10)"},src:{schema:z.unknown(),design:"plumbing"},initials:{schema:z.unknown(),design:"plumbing"}}};var Ja={name:"Badge",description:"Compact status chips, counts, tags, pills. For higher-signal inline status \u2192 use Callout. For solid CTAs \u2192 Button. Soft/outline variants are quieter; solid variants are loud.",import:"@gradeui/ui",aliases:["chip","tag","pill","label chip","badge","tag view","status pill","token","count badge"],composesWith:["Card","Table (inside a cell)","Avatar (next to it)","anywhere inline"],props:{variant:{schema:z.enum(["see list above"]).optional(),design:"knob"},rounded:{schema:z.enum(["default","full"]).optional(),design:"knob",description:'"full" gives a pill shape'}}};var Qa={name:"Banner",description:`A full-width horizontal strip surfacing system-level state, announcements, or first-run guidance \u2014 "you're previewing a draft", "investigating incident", "new feature available", "send your design to Figma". Distinct from Callout (inline boxed message in the layout flow), Toast (transient floating notification), Dialog (modal interrupt). Banner is what lives at the TOP of an AppShellHeader, page, or panel.`,import:"@gradeui/ui",aliases:["banner","notification banner","system banner","header banner","announcement bar","top bar","status bar","promo banner","incident banner","draft banner","first run banner","glass banner","sticky banner"],composesWith:["AppShellHeader (most common host \u2014 banner sits ABOVE the header content)","Button (in the action slot)","Link (inside the content)","Lucide icons (in the icon slot)"],props:{variant:{schema:z.enum(["default","info","success","warning","destructive","announcement"]).optional(),design:"knob",description:'intent + tonal direction. `default` is a calm muted strip; `announcement` is a low-alpha brand tint for "new feature" messaging; status variants pick up the soft+deep token pairs.'},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"material applied over the variant tint. `glass` for banners that sit over imagery / generative backdrops."},align:{schema:z.enum(["start","center","between"]).optional(),design:"knob",description:"justify behaviour of the inner flex row. Defaults to `between` so the action / dismiss button right-align."},sticky:{schema:z.boolean().optional(),design:"knob",description:"stick to the top of the scroll container."},dismissible:{schema:z.boolean().optional(),design:"knob",description:"render the trailing X close button. Pair with `onDismiss` to react."},onDismiss:{schema:z.unknown().optional(),design:"event"},icon:{schema:z.unknown().optional(),design:"plumbing",description:"leading icon slot. NOT inferred from variant; pass what fits the message."},action:{schema:z.unknown().optional(),design:"plumbing",description:'trailing slot before dismiss. Usually a `<Button size="sm">` or `<a>`.'},role:{schema:z.string().optional(),design:"plumbing",description:"overrides the automatic role mapping (warning/destructive \u2192 alert, others \u2192 status)."}}};var en={name:"Breadcrumb",description:'Reach for Breadcrumb whenever a screen sits inside a hierarchy and you want the path back to the top to be visible. Common spots: above page titles in admin/CMS screens, top of Settings detail pages, after a router redirect when the URL implies depth. Use the current page as a <BreadcrumbPage> (non-clickable) and prior levels as <BreadcrumbLink>. For a horizontal "top nav" of peer destinations use Side Menu or Tabs instead \u2014 Breadcrumb is strictly for hierarchical path.',import:"@gradeui/ui",aliases:["breadcrumb","breadcrumbs","crumbs","path","page hierarchy","path bar","navigation trail","finder path"],subcomponents:["BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbPage","BreadcrumbSeparator","BreadcrumbEllipsis"],composesWith:["AppShellMain","Card (in CardHeader)","Dialog"],props:{"aria-label":{schema:z.unknown().optional(),design:"plumbing",description:"passed to the underlying <nav>"},separator:{schema:z.unknown().optional(),design:"plumbing",description:'**tree-wide default** for every <BreadcrumbSeparator/> inside. Pass a string ("/", "\u203A", "\u2022"), a lucide icon (`<Slash/>`, `<ChevronRight/>`), or any ReactNode. Default: `<ChevronRight/>`. Set once on the root; every separator below picks it up via context.'},className:{schema:z.unknown().optional(),design:"plumbing",description:"the <ol> wrapper; usually no overrides needed"},href:{schema:z.unknown().optional(),design:"plumbing",description:"renders as <a> when set, <button> when not; asChild? wraps a custom element"},children:{schema:z.unknown().optional(),design:"plumbing",description:"per-instance override of the separator glyph. When set, beats the root's `separator` prop for this one slot. When not set, falls back to the root's `separator`, then to `<ChevronRight/>`."}}};var tn={name:"Button",description:'Any clickable action. Use size="icon" for square icon-only buttons, variant="link" for inline links that should look like Button, variant="raised" for high-commitment / weighty actions where the chrome can afford a tactile "physical key" treatment. A Button placed next to a TabsList of the same size lines up edge-to-edge without per-call overrides.',import:"@gradeui/ui",aliases:["button","push button","plain button","bordered button","destructive button","capsule button","link button","action button","cta","raised button","pill button","key button"],composesWith:["Dialog","DropdownMenu","Tooltip","Card (in CardFooter)","Row","Form controls"],props:{variant:{schema:z.enum(["default","destructive","outline","secondary","ghost","link","raised"]).optional(),design:"knob"},size:{schema:z.enum(["sm","md","lg","icon"]).optional(),design:"knob",description:"t-shirt scale aligned with Tabs/ToggleGroup heights (sm=h-7, md=h-8, lg=h-10). `default` still works as an alias for `md`."},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"renders as the child element (use to wrap <a>/<Link>)"},disabled:{schema:z.boolean().optional(),design:"knob"}}};var on={name:"Calendar",description:'An inline date grid \u2014 date-of-birth pickers in profile forms, scheduling screens with a month view, range selection in reporting filters. For a compact trigger-and-popover input, use DatePicker / DateRangePicker (which wrap Calendar internally). For one-off relative dates ("yesterday", "last week") use a Select instead.',import:"@gradeui/ui",aliases:["calendar","date grid","month view","scheduler grid","calendar view","multidate picker","react native calendars"],subcomponents:["CalendarDayButton"],composesWith:["Popover (DatePicker composes them)","Card (inline scheduling card)","Dialog (full-screen mobile date pick)"],props:{mode:{schema:z.enum(["single","multiple","range"]).optional(),design:"knob",description:"picks one date, several dates, or a [from, to] range"},selected:{schema:z.unknown().optional(),design:"plumbing",description:"controlled selection; shape matches `mode`"},onSelect:{schema:z.unknown().optional(),design:"event",description:"fires with the new selection"},month:{schema:z.unknown().optional(),design:"plumbing",description:"controlled displayed month"},defaultMonth:{schema:z.unknown().optional(),design:"plumbing",description:"uncontrolled initial month"},onMonthChange:{schema:z.unknown().optional(),design:"event"},numberOfMonths:{schema:z.number().optional(),design:"knob",description:"render multiple months side by side, useful for range pickers"},disabled:{schema:z.unknown().optional(),design:"plumbing"},captionLayout:{schema:z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing"}}};var rn={name:"Callout",description:"Inline, ambient, non-blocking status/feedback that sits inside the layout flow. Form-level validation summaries, settings-page notices, page-level banners. NOT a toast (use Sonner for transient). NOT a modal (use Dialog when the user must respond). Put an icon as first child \u2014 it's auto-positioned; CalloutTitle + CalloutDescription follow.",import:"@gradeui/ui",aliases:["callout","banner","notice","inline alert","in-app notification","status banner","info banner","info callout","warning callout","success callout"],subcomponents:["CalloutTitle","CalloutDescription"],composesWith:["lucide-react icons as first child","Button (inside CalloutDescription)","Card (as a section callout)"],props:{variant:{schema:z.enum(["default","destructive","success","warning","info"]).optional(),design:"knob",description:"semantic colouring; `default` is neutral"}}};var nn={name:"Card",description:'Grouped content with a distinct surface \u2014 settings panels, dashboard tiles, list-of-cards layouts, marketing hero containers, AI suggestion overlays. Pair CardHeader (title + description) with CardContent and optional CardFooter (actions). Reach for `surface="glass"` whenever the card sits over a busy backdrop (gradient mesh, dot grid, generative art, image hero).',import:"@gradeui/ui",aliases:["card","group box","groupbox","panel","tile","surface","glass card","frosted card","floating panel","hero card","ai suggestion card","dashboard tile","settings panel"],subcomponents:["CardHeader","CardTitle","CardDescription","CardContent","CardFooter"],composesWith:["Button (in CardFooter)","Badge","Separator","Avatar","Code","MediaSurface","any form controls"],props:{surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the card surface is *made of*. `solid` is the default opaque `bg-card`. `translucent` is ~82% opacity for menu sheets. `glass` is ~58% opacity + 14px blur + edge highlight for floating panels. `glass-strong` is ~42% + 24px blur for full-page overlays. Composes with `shadow-elevation-*` (depth) and `gds-aura-*` (state signal)."},Each:{schema:z.unknown(),design:"plumbing"}}};var ad=z.enum(["start","center","end"]),nd=z.object({delay:z.number().int().positive().optional(),pauseOnHover:z.boolean().optional(),pauseWhenOffscreen:z.boolean().optional()}),id=z.union([z.boolean(),nd]),sn={name:"Carousel",description:"Token-driven slideshow primitive. Embla under the hood, custom autoplay loop with per-slide duration overrides, and a VideoSlide variant that autoplays muted+loop with a poster fallback. Reach for it for marketing hero rotations, app onboarding tours, image galleries, TV/streaming featured rails \u2014 anywhere a horizontal stack of slides cycles automatically or on user input.",import:"@gradeui/ui",aliases:["carousel","slideshow","slider","hero rotation","image gallery","featured row","swipe deck"],subcomponents:["Carousel.Slide","Carousel.VideoSlide","Carousel.Dots","Carousel.Arrows","Carousel.Prev","Carousel.Next"],composesWith:["MediaSurface (inside Carousel.Slide for posters / album art)","Card (slide content)","Stack / Row (slide composition)"],props:{loop:{schema:z.boolean().optional(),design:"knob",label:"Loop",default:true,description:"Wrap from the last slide back to the first. Default true \u2014 the natural fit for hero rotations. Turn off for finite onboarding sequences."},align:{schema:ad.optional(),design:"knob",control:"toggle-group",label:"Slide alignment",default:"start",description:"How slides line up inside the viewport when not at 100% width. 'start' is full-bleed; 'center' gives the 'peek of neighbours' carousel look."},slidesPerView:{schema:z.number().int().positive().optional(),design:"knob",label:"Slides per view",default:1,description:"How many slides show at once. 1 for hero rotations; 3 for thumbnail strips; etc. For media-query responsive layouts, leave this at 1 and override `--gds-carousel-slide-basis` on each Slide via CSS."},autoplay:{schema:id.optional(),design:"structured",label:"Autoplay",default:false,description:"`true` for sensible defaults (5s, pause on hover, pause offscreen). Object form: `{ delay, pauseOnHover, pauseWhenOffscreen }`. Per-slide overrides go on `<Carousel.Slide duration={ms}>`."},draggable:{schema:z.boolean().optional(),design:"knob",label:"Drag to swipe",default:true,description:"Disable when slide content (a Map, a chart, a draggable card) needs to swallow drag events."},onSlideChange:{schema:z.function().optional(),design:"event",description:"Fires with the new slide index whenever the active slide changes (programmatic, autoplay, or user swipe)."},className:{schema:z.string().optional(),design:"plumbing"},style:{schema:z.record(z.string(),z.unknown()).optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing",description:"Carousel.Slide / Carousel.VideoSlide children, plus optionally Carousel.Dots and Carousel.Arrows."}}};var ln={name:"Chart",description:"Reporting dashboards, single-purpose analytics cards (revenue, conversions, active users), or anywhere you'd otherwise hand-roll a Recharts setup. Bring the actual chart type from `recharts` \u2014 ChartContainer doesn't pick the chart shape for you, it themes whatever you nest. For sparkline-style decorative trends consider just rendering a small SVG line directly; ChartContainer is overkill for non-interactive ornament.",import:"@gradeui/ui",aliases:["chart","charts","graph","bar chart","line chart","area chart","recharts","analytics chart","swift chart","swiftui chart","victory chart","victory native"],subcomponents:["ChartTooltip","ChartTooltipContent","ChartLegend","ChartLegendContent","ChartStyle"],composesWith:["Card (chart-in-a-card pattern)","Tabs (multi-metric switcher)","Recharts components (Bar","Line","Area","Pie",'Radar from "recharts")'],props:{config:{schema:z.unknown(),design:"plumbing",description:'`{ [seriesKey]: { label: string; color?: string; theme?: { light: string; dark: string } } }`; the keys here are the names you reference in your Recharts <Bar dataKey="\u2026" /> calls'},id:{schema:z.string().optional(),design:"plumbing",description:"used for the inlined <style> tag"},children:{schema:z.unknown(),design:"plumbing",description:"typically a single Recharts ResponsiveContainer or chart"},passes:{schema:z.unknown(),design:"plumbing",description:"pair with `content={<ChartTooltipContent />}`"},indicator:{schema:z.enum(["dot","line","dashed"]).optional(),design:"knob"},ChartLegend:{schema:z.unknown(),design:"plumbing"}}};var dn={name:"Checkbox",description:"Binary on/off tied to a list (select multiple, agree to terms). Single on/off that controls a setting is better with Switch.",import:"@gradeui/ui",aliases:["checkbox","tickbox","tick box","check","multi-select item"],composesWith:["Label (via htmlFor)","Card","Form rows","Table (for row selection)"],props:{checked:{schema:z.boolean().optional(),design:"knob"},onCheckedChange:{schema:z.unknown().optional(),design:"event"},defaultChecked:{schema:z.boolean().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},id:{schema:z.string().optional(),design:"plumbing",description:"bind a Label's htmlFor to this"}}};var cn={name:"Code",description:'Read-only code surface for marketing heroes, docs, changelog entries, AI-output displays. Use `diff` for the "diff hero" pattern (before/after side-by-side or stacked). Use `reveal="lines"` with `trigger="inView"` for scroll-driven marketing pages. Use `reveal="typewriter"` for AI-output / chat-style displays. Use `bare` for inline code inside prose. NOT a code editor \u2014 for editable code, reach for an external editor primitive (CodeMirror / Monaco).',import:"@gradeui/ui",aliases:["code block","code","code snippet","code surface","syntax highlighted code","diff hero","diff view","diff block","changelog code","before after code","scroll-triggered code","typewriter code"],composesWith:["SectionBlock","Card","Tabs (for multi-file examples)","Carousel (slide-to-slide code progression)"],props:{source:{schema:z.string(),design:"content",description:"the code to render"},language:{schema:z.enum(["tsx","jsx","ts","js","html","css","json","bash","md","py","go","rust"]).optional(),design:"knob",description:"Prism language id; defaults to `tsx`"},highlight:{schema:z.unknown().optional(),design:"plumbing",description:"1-indexed line number, array of numbers, or array of `[start, end]` ranges to emphasise"},diff:{schema:z.unknown().optional(),design:"plumbing",description:"`{ added?: number[]; removed?: number[] }` \u2014 1-indexed lines for diff hero / changelog mode"},reveal:{schema:z.enum(["none","lines","typewriter","diff"]).optional(),design:"knob",description:"entrance animation; defaults to `none`"},trigger:{schema:z.enum(["mount","inView","manual"]).optional(),design:"knob",description:"what kicks the reveal off; defaults to `mount`"},play:{schema:z.boolean().optional(),design:"knob",description:'for `trigger="manual"`, set true to play'},speed:{schema:z.enum(["slow","normal","fast"]).optional(),design:"knob",description:"animation feel preset. `normal` (default) maps to the canonical 50ms/22ms staggers + 180ms pre-delay. Pick a feel; don't tune individual numbers unless you have to."},delay:{schema:z.number().optional(),design:"knob",description:"explicit delay before reveal starts (ms) \u2014 overrides the `speed` preset"},stagger:{schema:z.number().optional(),design:"knob",description:"explicit per-line stagger for `lines`/`diff`, per-token for `typewriter` (ms) \u2014 overrides the `speed` preset"},prompt:{schema:z.string().optional(),design:"content",description:'string prepended to each line. Use for terminal emulation: `prompt="$ "` for bash, `prompt="> "` for PowerShell, `prompt=">>> "` for Python REPL. Prompt characters render in muted token colour, don\'t pick up the typewriter stagger, and are hidden from screen readers.'},showLineNumbers:{schema:z.boolean().optional(),design:"knob"},filename:{schema:z.string().optional(),design:"content",description:"optional label rendered in the header chrome"},wrap:{schema:z.boolean().optional(),design:"knob",description:"wrap long lines instead of horizontal scroll"},bare:{schema:z.boolean().optional(),design:"knob",description:"drop chrome (border, header, padding) \u2014 for inline use"},height:{schema:z.enum(["auto","number","string"]).optional(),design:"knob",description:'container sizing. `auto` (default) grows with content. Number = pixels (`300` \u2192 `300px`). String passes through as CSS (`"20rem"`, `"50vh"`).'},maxLines:{schema:z.number().optional(),design:"knob",description:"cap the visible line count at exactly N line-heights. Wins over `height`. Use for terminal windows, code-tour cards, and surfaces that need a stable vertical rhythm regardless of snippet length."}}};var pn={name:"Collapsible",description:'A single show/hide reveal \u2014 "Show advanced settings" rows, expandable inline help, "More details" sections inside cards. For multiple rows of expandable content where one-at-a-time matters, reach for Accordion. For a separate panel that floats above content, use Popover.',import:"@gradeui/ui",aliases:["collapsible","expand","show more","disclosure","advanced settings","disclosure group","expandable section","expandable view","show hide"],subcomponents:["CollapsibleTrigger","CollapsibleContent"],composesWith:["Button (as the trigger","asChild)","Card (expandable settings group)","Row (header + chevron)"],props:{open:{schema:z.boolean().optional(),design:"knob",description:"controlled open state"},defaultOpen:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onOpenChange:{schema:z.unknown().optional(),design:"event"},children:{schema:z.unknown(),design:"plumbing",description:"the clickable header (often a Button asChild)"}}};var mn={name:"Command",description:'A searchable list of actions or destinations \u2014 global \u2318K palettes, "jump to" inputs, account switchers with filter. Wrap in CommandDialog when it should pop over the entire app on a hotkey. For straight forms with filter, prefer a Select with a search input. For free-text autocomplete tied to a single value, prefer Combobox built on Popover + Command.',import:"@gradeui/ui",aliases:["command palette","command menu","cmd k","quick switcher","action menu","spotlight","spotlight search","quick open","fuzzy finder"],subcomponents:["CommandInput","CommandList","CommandEmpty","CommandGroup","CommandItem","CommandSeparator","CommandShortcut","CommandDialog"],composesWith:["Dialog (CommandDialog wraps it)","Popover (inline combobox)","Tooltip"],props:{value:{schema:z.string().optional(),design:"content",description:"controlled active item value"},onValueChange:{schema:z.unknown().optional(),design:"event"},placeholder:{schema:z.string().optional(),design:"content"},children:{schema:z.unknown(),design:"plumbing",description:"wraps groups and empty state"},heading:{schema:z.string().optional(),design:"content"},onSelect:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},open:{schema:z.unknown(),design:"plumbing",description:"when you want the command palette mounted in a modal (cmd+k pattern)"}}};var un={name:"DatePicker",description:'Any date or date-range entry. Use DatePicker for a single date (DOB, due date, booking). Use DateRangePicker for a span (report period, stay dates, filter window). Prefer these over <Input type="date"> \u2014 consistent theming, keyboard nav, a11y, and no browser-native UI drift.',import:"@gradeui/ui",aliases:["datepicker","calendar input","date field","date range","datepickerios","react native date picker","calendar input field","date field control"],subcomponents:["DateRangePicker"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],props:{value:{schema:z.unknown().optional(),design:"plumbing"},onChange:{schema:z.unknown().optional(),design:"event",description:"called on select or clear"},placeholder:{schema:z.string().optional(),design:"content",description:'trigger label when empty (default "Pick a date" / "Pick a date range")'},disabled:{schema:z.boolean().optional(),design:"knob"},format:{schema:z.string().optional(),design:"content",description:'date-fns format token for the trigger label (default "PPP" single, "LLL dd, y" range)'},align:{schema:z.enum(["start","center","end"]).optional(),design:"knob",description:'popover align (default "start")'},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",description:"popover side"},captionLayout:{schema:z.enum(["label","dropdown","dropdown-months","dropdown-years"]).optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing",description:"on the trigger button"},contentClassName:{schema:z.string().optional(),design:"content",description:"on the PopoverContent"},icon:{schema:z.unknown().optional(),design:"plumbing",description:"replaces the default CalendarIcon"},numberOfMonths:{schema:z.number().optional(),design:"knob",description:"DateRangePicker only, default 2"}}};var gn={name:"Dialog",description:'Modal interruptions \u2014 confirmations, focused forms, detail views, AI suggestion sheets. Dialog is the right primitive for Apple HIG / React Native "Alert" (modal) semantics. For non-blocking inline messaging use Callout; for transient notifications use Toaster (Sonner). Always include DialogTitle (a11y requirement).',import:"@gradeui/ui",aliases:["modal","popup","overlay","alert","system alert","alert dialog","modal dialog","confirm dialog","react native modal","rn alert","glass modal","frosted modal","ai suggestion modal"],subcomponents:["DialogTrigger","DialogContent","DialogHeader","DialogTitle","DialogDescription","DialogFooter","DialogClose"],composesWith:["Button (as DialogTrigger asChild","and inside DialogFooter)","Input/Textarea/Select inside DialogContent","Code (for changelog / diff modals)","MediaSurface (for image / preview modals)"],props:{open:{schema:z.unknown().optional(),design:"plumbing",description:"Radix controlled/uncontrolled pattern"},asChild:{schema:z.enum(["wrap a Button"]).optional(),design:"plumbing"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the modal panel is *made of*. Defaults to `solid` (opaque `bg-background`). `glass` lets the page show through softly \u2014 pairs with rich backdrops or AI-suggestion modals."},accepts:{schema:z.unknown(),design:"plumbing"},used:{schema:z.unknown(),design:"plumbing"}}};var fn={name:"DropdownMenu",description:'A small action menu attached to a trigger \u2014 overflow "\u2026" buttons on cards, user-avatar menus in headers, "Insert" menus in editors. For a full searchable list, use Command. For ONE primary action plus a secondary, use a Button next to a smaller ghost Button instead of a dropdown.',import:"@gradeui/ui",aliases:["dropdown","dropdown menu","overflow menu","kebab menu","more menu","action menu","context-style menu","menu","pull-down menu","pulldown menu","context menu","popup menu","actions menu","glass menu","frosted menu","ios menu","hig menu"],subcomponents:["DropdownMenuTrigger","DropdownMenuContent","DropdownMenuItem","DropdownMenuCheckboxItem","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuGroup","DropdownMenuSub","DropdownMenuSubTrigger","DropdownMenuSubContent"],composesWith:["Button (as trigger asChild)","Avatar (user menu)","Card (overflow on a tile)","Tooltip (on the trigger)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually wraps a Button"},align:{schema:z.enum(["start","center","end","top","right","bottom","left"]).optional(),design:"knob"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the menu surface is *made of*. `solid` (default) is `bg-popover`. `translucent` matches Apple HIG / iOS menu sheets. `glass` for menus floating over rich canvases."},onSelect:{schema:z.unknown().optional(),design:"event"},DropdownMenuCheckboxItem:{schema:z.unknown(),design:"plumbing"},DropdownMenuSub:{schema:z.unknown(),design:"plumbing",description:"sub-trigger shows children, sub-content holds the deeper items"},children:{schema:z.unknown(),design:"plumbing",description:"right-aligned kbd hint"}}};var hn={name:"Flex",description:"The unopinionated flexbox primitive \u2014 reach for Flex when Stack, Row, or Grid don't quite fit. Specifically when you need reverse direction (`row-reverse` / `col-reverse`), CSS defaults instead of Row's baked-in `items-center gap-md`, or baseline alignment. Otherwise prefer Stack / Row / Grid \u2014 they're easier to read and tuned for the 95% case. Flex is the escape hatch, not the default.",import:"@gradeui/ui",aliases:["flex","flexbox","flex container","hstack","vstack","horizontal","vertical","generic container","layout view"],composesWith:["any content component"],props:{direction:{schema:z.enum(["row","col","row-reverse","col-reverse"]).optional(),design:"knob",description:"main-axis direction",default:"row"},gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"none"},align:{schema:z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis alignment",default:"stretch"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:z.enum(["nowrap","wrap","wrap-reverse"]).optional(),design:"knob",description:"wrap behaviour when children overflow",default:"nowrap"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var bn={name:"Grid",description:"2D layouts where Stack (vertical) and Row (horizontal) don't fit \u2014 stat-card grids, feature tiles, pricing columns, photo grids. Reach for Grid over hand-rolled `grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4` so the column count is a prop the settings panel can mutate and the responsive ladder stays consistent across designs.",import:"@gradeui/ui",aliases:["grid","tiles","cards grid","stat grid","columns","feature grid","grid view","lazy v grid","lazyvgrid","lazy h grid","lazyhgrid","tile grid","masonry"],composesWith:["Card","Stack (inside each cell)","Row","Button","any content component"],props:{cols:{schema:z.enum(["1","2","3","4","5","6","12"]).optional(),design:"knob",description:'desktop column count; each value has a baked-in responsive ladder (e.g. "4" \u2192 1 col mobile, 2 tablet, 4 desktop)',default:"3"},gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between grid cells (same scale as Stack/Row)",default:"md"},align:{schema:z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis alignment of cells",default:"stretch"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var vn={name:"HoverCard",description:"Rich preview content surfaced on hover \u2014 user profile mini-cards on @-mentions, link previews, definition popups, layer-thumbnail peeks. Pointer-only by design (no touch-friendly trigger); pair with a click target for touch devices, or fall back to Popover. NEVER use HoverCard for critical info \u2014 if the user can't reach it via keyboard or touch, it might as well not exist for accessibility.",import:"@gradeui/ui",aliases:["hover card","hover preview","mention preview","profile peek","link preview","rich tooltip","link preview card","profile hover","peek card","glass preview","frosted preview"],subcomponents:["HoverCardTrigger","HoverCardContent"],composesWith:["Avatar (user preview)","Card (richer content)","Link (the trigger)","MediaSurface (link/layer previews)","Code (snippet previews)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually a Link or Button"},side:{schema:z.unknown().optional(),design:"plumbing"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the preview surface is *made of*. `solid` (default) is `bg-popover`. `glass` for hover previews over rich content (a media feed, a layout canvas)."}}};var yn={name:"Input",description:"Any single-line text entry. Always pair with a Label for accessibility.",import:"@gradeui/ui",aliases:["text field","textbox","textfield","form field","text input","secure field","search field","url field","number field","textinput","text input field","react native textinput"],composesWith:["Label","Form","Card (in CardContent)","Button (form submit)"],props:{type:{schema:z.string().optional(),design:"content"}}};var wn={name:"Label",description:"Every Input / Textarea / Checkbox / Switch / RadioGroup. Always use htmlFor so clicking the label focuses the control.",import:"@gradeui/ui",aliases:["label","form label","field label","caption"],composesWith:["Input","Textarea","Checkbox","Switch","RadioGroup","Select"],props:{htmlFor:{schema:z.string().optional(),design:"content",description:"binds to the input's id"}}};var xn={name:"Map",description:"Any layout that needs a real map \u2014 listings (real estate, Airbnb-style), fleet/logistics dashboards, store locators, anywhere a user picks a location from a viewport. Reach for the controlled `hoveredId` prop when a sibling list and the map need to highlight each other.",import:"@gradeui/ui",aliases:["map","maps","mapbox","maplibre","google maps","geo","location","latlng","coordinates","marker","pin","airbnb","listings","fleet","real estate","logistics","map view","mapkit","mapview","react native maps","rn maps"],subcomponents:["MapMarker"],composesWith:["Card (as marker content)","Badge","Avatar","Button","Row","Stack","Skeleton"],props:{provider:{schema:z.unknown(),design:"plumbing",description:'"maplibre" (default, free, no key) | "mapbox" (needs accessToken) | "google" (needs apiKey). Switching is one prop change.'},center:{schema:z.unknown(),design:"plumbing",description:"`[lng, lat]` tuple. ALWAYS lng first. Required."},zoom:{schema:z.unknown(),design:"plumbing",description:"number, 0\u201322. Required."},bounds:{schema:z.unknown(),design:"plumbing",description:"`[[swLng, swLat], [neLng, neLat]]`. When set, takes precedence over center+zoom."},appearance:{schema:z.unknown(),design:"plumbing",description:'"light" | "dark" | "satellite" | "auto" (default "auto", follows GradeThemeProvider mode).'},hoveredId:{schema:z.unknown(),design:"plumbing",description:'controlled string id, pairs with onHoveredIdChange. The matching MapMarker gets `data-gds-state="hovered"` automatically. This is how you build list \u2194 map two-way sync.'},interactive:{schema:z.unknown(),design:"plumbing",description:"false freezes pan/zoom, useful for static cards."},onLoad:{schema:z.unknown(),design:"event",description:"handle exposes flyTo, panTo, fitBounds, getCenter, getZoom, getBounds, instance."},tilerKey:{schema:z.enum(["maplibre"]),design:"knob",description:"only needed off `gradeui.com`/`localhost`. Default key is referrer-locked."},accessToken:{schema:z.enum(["mapbox), apiKey (google"]),design:"knob",description:"required for those providers."}}};var dd=z.object({kind:z.literal("album"),artist:z.string(),title:z.string(),year:z.number().optional(),description:z.string().optional()}),cd=z.object({kind:z.literal("tv-show"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),pd=z.object({kind:z.literal("movie"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),md=z.object({kind:z.literal("game"),title:z.string(),description:z.string().optional()}),ud=z.object({kind:z.literal("book"),title:z.string().optional(),author:z.string().optional(),isbn:z.string().optional(),description:z.string().optional()}),gd=z.object({kind:z.literal("poster"),title:z.string(),year:z.number().optional(),description:z.string().optional()}),fd=z.object({kind:z.literal("portrait"),name:z.string().optional(),role:z.string().optional()}),hd=z.object({kind:z.literal("landscape"),location:z.string().optional(),mood:z.string().optional()}),bd=z.object({kind:z.literal("product"),name:z.string().optional(),brand:z.string().optional()}),vd=z.object({kind:z.literal("food"),dish:z.string().optional(),cuisine:z.string().optional()}),yd=z.object({kind:z.literal("generic"),prompt:z.string()}),wd=z.union([z.object({kind:z.literal("video")}),z.object({kind:z.literal("audio")}),z.object({kind:z.literal("embed")}),z.object({kind:z.literal("3d")})]),xd=z.union([dd,cd,pd,md,ud,gd,fd,hd,bd,vd,yd,wd]),Rd=z.enum(["video","square","portrait","wide","auto"]),Sd=z.enum(["none","sm","md","lg","xl"]),Cd=z.enum(["album","tv-show","movie","game","book","portrait","landscape","poster","product","food","video","audio","embed","3d","generic"]),kd=z.union([z.literal("auto"),z.literal("icon"),z.literal("none")]),jr={name:"MediaSurface",description:"The canonical media slot for ALL non-person imagery \u2014 album art, posters, hero images, landscape photos, video and 3D containers.",when:"Pass `hint` + `alt` + (optionally) `source` so the empty-state placeholder is meaningful and the generation pipeline can later fill the slot with a real image. Use directly for declarative slots; the higher-level VideoPlayer / RivePlayer / ThreeScene wrap this for runtime-heavy media.",antipatterns:["Don't wrap <Avatar> inside <MediaSurface> to get an initials fallback. Set `alt` + `hint` on MediaSurface directly \u2014 the placeholder renders initials at small sizes derived from `alt`.","Don't use <Avatar> for album art, posters, products, food, landscapes, etc. Avatar is for PEOPLE only.","Don't inline manual gradient backgrounds (`bg-gradient-to-br \u2026`) on MediaSurface as a 'placeholder vibe' \u2014 the empty-state is already styled via `--gds-media-placeholder-bg/-fg` tokens."],composesWith:["Card","CardBlock","MediaBlock","VideoPlayer","RivePlayer","ThreeScene"],aliases:["media","image slot","media slot","image placeholder","cover","thumbnail","poster slot"],import:"@gradeui/ui",props:{hint:{schema:Cd.optional(),design:"knob",control:"glyph-picker",label:"Slot kind",description:"Picks the placeholder glyph + the default aspect + the future generation provider. Defaults to 'generic'.",default:"generic",examples:["album","portrait","landscape","poster"]},aspect:{schema:Rd.optional(),design:"knob",control:"toggle-group",label:"Aspect ratio",description:"Override the slot's natural framing. When omitted, derived from `hint`: album/product/food \u2192 square, portrait/poster \u2192 portrait, landscape \u2192 wide, video/audio/embed/generic \u2192 video."},radius:{schema:Sd.optional(),design:"knob",control:"toggle-group",label:"Corner radius",default:"lg",description:"Driven by the `--gds-media-radius` CSS variable."},border:{schema:z.boolean().optional(),design:"knob",label:"Show border",default:false},loading:{schema:z.boolean().optional(),design:"knob",label:"Loading state",default:false,description:"Overlays the muted-pulse skeleton on top of the slot."},emptyState:{schema:kd.optional(),design:"knob",control:"select",label:"Empty state",default:"auto",description:"'auto' renders the size-tiered placeholder (initials \u2192 glyph \u2192 glyph + caption). 'icon' is a legacy alias. 'none' renders a truly empty surface."},alt:{schema:z.string().optional(),design:"content",control:"text",label:"Alt text",description:"Becomes the eventual `<img alt>`. Also drives the placeholder caption (>160px slots) and the 2-letter initials fallback (<64px slots).",examples:["Travelling Without Moving \u2014 Jamiroquai","Sunset over Mount Fuji"]},src:{schema:z.string().url().optional(),design:"content",control:"url",label:"Image URL",description:"When set, renders an `<img>` filling the slot via object-cover. The wrapper keeps its aspect/radius/border. Generators patch this prop; manual values always win."},source:{schema:xd.optional(),design:"structured",label:"Source descriptor",description:"Structured metadata for the generation pipeline. Opaque to MediaSurface itself; read by the resolver to look up real imagery from the right provider (MusicBrainz / Pollinations / etc.).",perKindFields:{album:{artist:"string",title:"string",year:"number?"},poster:{title:"string",year:"number?"},portrait:{name:"string?",role:"string?"},landscape:{location:"string?",mood:"string?"},product:{name:"string?",brand:"string?"},food:{dish:"string?",cuisine:"string?"},generic:{prompt:"string"},video:{},audio:{},embed:{},"3d":{}}},className:{schema:z.string().optional(),design:"plumbing"},style:{schema:z.record(z.string(),z.unknown()).optional(),design:"plumbing"},children:{schema:z.unknown().optional(),design:"plumbing",description:"Escape hatch for putting a custom <video>, <canvas>, Rive runtime, etc. inside. When supplied, the placeholder is suppressed."},overlay:{schema:z.unknown().optional(),design:"plumbing",description:"Decorative layer rendered ABOVE the media/placeholder (play buttons, hover gradients, corner badges). Does NOT suppress the placeholder."},glyph:{schema:z.unknown().optional(),design:"plumbing",description:"Per-instance override of the hint-derived placeholder glyph. Most consumers should pick a `hint` and let the map decide."},fallback:{schema:z.unknown().optional(),design:"plumbing",description:"Custom node shown while `loading` is true."},onVisibilityChange:{schema:z.function().optional(),design:"event",description:"Fires when the surface enters / leaves the viewport (IntersectionObserver)."}},actions:{fill:{label:"Fill image",icon:"Sparkles",description:"Resolve this slot's source via the free providers (MusicBrainz \u2192 Pollinations \u2192 Picsum) and patch the result into the runtime URL map.",kind:"resolve-media-source",enabledWhen:{propPresent:"source"}},refresh:{label:"Refresh",icon:"RotateCw",description:"Re-fetch this slot's resolved URL (cache-busts the browser AND the local URL map). Useful when a Pollinations URL failed to load on first hit \u2014 Pollinations has typically finished its cold-start by now, so a retry usually succeeds.",kind:"refresh-media-source",enabledWhen:{propPresent:"source"}}}};var Rn={name:"MultiSelect",description:`Picking multiple items from a finite list \u2014 tag selectors, filter chips,
18
18
  "share with N people", multi-region settings.
19
19
 
20
20
  **This is the answer for ANY "removable-chips-inside-an-input" pattern.**
@@ -32,7 +32,7 @@ already covers the trigger-with-badges shape.
32
32
 
33
33
  Use \`<Select>\` instead for SINGLE selection. Use \`<Command>\` directly
34
34
  (no MultiSelect wrapper) when the option set is unbounded or async
35
- (users to @-mention, email recipients, search-as-you-type API results).`,import:"@gradeui/ui",composesWith:["Popover","Command","Badge","Checkbox-style row indicator","Separator"],props:{options:{schema:z.unknown(),design:"plumbing"},value:{schema:z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial selection"},onValueChange:{schema:z.unknown().optional(),design:"event"},placeholder:{schema:z.string().optional(),design:"content",default:"Select\u2026"},searchPlaceholder:{schema:z.string().optional(),design:"content",default:"Search\u2026"},emptyMessage:{schema:z.string().optional(),design:"content",default:"Nothing matches."},maxCount:{schema:z.number().optional(),design:"knob",description:'badges shown on the trigger before collapsing to "+N more"'},searchable:{schema:z.boolean().optional(),design:"knob",description:"hide for short option lists",default:true},badgeDismissible:{schema:z.boolean().optional(),design:"knob",description:"show \xD7 on each selected badge",default:true},disabled:{schema:z.boolean().optional(),design:"knob"},modalPopover:{schema:z.boolean().optional(),design:"knob",description:"Popover modal mode",default:false},className:{schema:z.string().optional(),design:"plumbing"}}};var Ja={name:"Popover",description:'A floating panel anchored to a trigger that contains interactive content \u2014 date pickers, color pickers, filter pickers, "more info" panels, inline forms. Differs from Tooltip (hover-only, no focusable content) and Dialog (modal, blocks the page). DatePicker, DateRangePicker, and the Combobox pattern all compose Popover internally.',import:"@gradeui/ui",aliases:["popover","dropdown panel","floating panel","inline editor","attached panel","filter pop","popover view","popoverpresentation","attached popover"],subcomponents:["PopoverTrigger","PopoverContent","PopoverAnchor"],composesWith:["Button (as trigger)","Calendar (date picker)","Command (combobox)","Form controls (inline edit popover)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually a Button"},side:{schema:z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob"}}};var Qa={name:"Progress",description:"Determinate progress \u2014 file uploads, multi-step forms, quota meters. Indeterminate state \u2192 use Skeleton or animated Loader icon.",import:"@gradeui/ui",aliases:["progress","progress view","progress indicator","progress bar","determinate progress","loading bar","completion bar"],composesWith:["Card (as a section)","Badge (showing % next to it)","Label (describing what's loading)"],props:{value:{schema:z.number().optional(),design:"knob",description:"percent complete"},max:{schema:z.number().optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing"}}};var en={name:"RadioGroup",description:"A small set of mutually-exclusive options where the user needs to SEE all of them at once \u2014 pricing tiers (3-4 options), shipping speed, payment method radio cards. For 5+ options use Select. For a segmented control as part of a toolbar use ToggleGroup. For yes/no use Switch.",import:"@gradeui/ui",aliases:["radio group","radio buttons","single-choice","pricing options","payment method","radio buttons","radio control","single-select"],subcomponents:["RadioGroupItem"],composesWith:["Label (paired with each item via htmlFor)","Stack (vertical list)","Card (radio card pattern)"],props:{value:{schema:z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"vertical"},name:{schema:z.string().optional(),design:"content",description:"form name when posting natively"},id:{schema:z.string().optional(),design:"plumbing",description:"pair with a <Label htmlFor> for click-on-label"}}};var tn={name:"Resizable",description:`A multi-pane layout where the user wants to drag the divider \u2014 Slack/Mail-style list+detail, IDE editor+terminal, side-by-side compare view. Static layouts shouldn't use this \u2014 reach for AppShell with nav="three-pane" (fixed widths) or Grid (responsive ladder). Built on react-resizable-panels under the hood.`,import:"@gradeui/ui",aliases:["resizable","splitter","split pane","drag divider","adjustable panels","resizer","split view","draggable divider","split pane resizer","ns split view"],subcomponents:["ResizablePanelGroup","ResizablePanel","ResizableHandle"],composesWith:["AppShellMain (host the splitter inside main)","ScrollArea (each panel's content)","Card"],props:{direction:{schema:z.enum(["horizontal","vertical"]),design:"knob",description:"required; sets the axis the user drags along"},autoSaveId:{schema:z.string().optional(),design:"content",description:"persists user-adjusted sizes to localStorage under this id"},onLayout:{schema:z.unknown().optional(),design:"event"},defaultSize:{schema:z.number().optional(),design:"knob",description:"percent of group (0-100); siblings should sum to ~100"},minSize:{schema:z.unknown().optional(),design:"plumbing",description:"percent bounds"},collapsible:{schema:z.boolean().optional(),design:"knob",description:"allow this panel to collapse to zero"},collapsedSize:{schema:z.unknown().optional(),design:"plumbing",description:"collapse behaviour controls"},withHandle:{schema:z.boolean().optional(),design:"knob",description:"show a visible drag affordance (default just a hit-zone)"}}};var on={name:"RivePlayer",description:"Rive runtime wrapped in the shared media surface. Reach for Rive when you need interactive state-machine animations driven by scroll/hover/input. For non-interactive looping video, use VideoPlayer; for shader-driven backgrounds, use ThreeScene.",import:"@gradeui/ui",aliases:["rive","riv","animation","animated","lottie"],composesWith:["MediaSurface (internal)","Card","any container"],props:{src:{schema:z.string(),design:"content",description:"URL or path to the .riv file"},stateMachines:{schema:z.string().optional(),design:"content",description:"state machine(s) to run"},artboard:{schema:z.string().optional(),design:"content",description:"artboard name; omit to use default"},controls:{schema:z.boolean().optional(),design:"knob",description:"viewer mode by default; set true for play/pause overlay",default:false},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},loop:{schema:z.boolean().optional(),design:"knob",default:true},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",default:true},fit:{schema:z.enum(["contain","cover","fill","fitWidth","fitHeight","none"]).optional(),design:"knob",default:"contain"},stateMachineInputs:{schema:z.unknown().optional(),design:"plumbing"},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"square"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"},poster:{schema:z.string().optional(),design:"content",description:"image shown while the runtime loads"}}};var rn={name:"Row",description:"Horizontal composition \u2014 button groups, inline form rows, logo + nav rows, anything on one line. Reach for Row instead of `flex items-center gap-*` so the alignment and spacing are editable through the settings panel. For two-pane layouts with an explicit ratio (sidebar + content, 1/3 + 2/3) use Split instead \u2014 Row evenly flows whatever children it holds.",import:"@gradeui/ui",aliases:["row","hstack","horizontal","inline","horizontal layout","hstack","h-stack","horizontal stack","lazyhstack"],composesWith:["Button","Input","NavItem","Stack (can wrap a Row)","any content component"],props:{gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"md"},align:{schema:z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis (vertical) alignment",default:"center"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:z.boolean().optional(),design:"knob",description:"allow children to wrap onto additional lines when they overflow",default:false},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var an={name:"ScrollArea",description:"Bounded content that needs custom scroll chrome \u2014 sidebars with long item lists, chat transcripts, table panels inside a dashboard, anywhere the OS scrollbar would feel out of place against the design tokens. The wrapping element has to have a height constraint (`h-`, `max-h-`, or grid row sizing) or nothing scrolls \u2014 scroll-area can't infer a bound on its own. For body-level scrolling, leave the document to the browser.",import:"@gradeui/ui",aliases:["scroll area","scroll container","custom scrollbar","sidebar scroll","panel scroll","scroll view","scrollview","react native scrollview"],subcomponents:["ScrollBar"],composesWith:["Card (long card body)","AppShellNav (long sidebar)","Sheet (long modal body)","Table (sticky-header scrolling list)"],props:{type:{schema:z.enum(["auto","always","scroll","hover"]).optional(),design:"knob",description:"when the scrollbar shows"},scrollHideDelay:{schema:z.number().optional(),design:"knob",description:'ms before "scroll"/"hover" scrollbars fade'},dir:{schema:z.enum(["ltr","rtl"]).optional(),design:"plumbing"},className:{schema:z.string().optional(),design:"plumbing",description:"set a height/max-height here, otherwise nothing scrolls"},orientation:{schema:z.enum(["vertical","horizontal"]).optional(),design:"knob",default:"vertical"}}};var nn={name:"Select",description:"Single-choice from 3+ known options. Fewer than 3 \u2192 RadioGroup. Huge list with search \u2192 use a Combobox (not in DS yet). Multi-select \u2192 not supported by this primitive.",import:"@gradeui/ui",aliases:["dropdown","combobox","picker","select","pop-up button","popup button","popup picker","picker view","rnpickerselect","react native picker","native picker"],subcomponents:["SelectTrigger","SelectValue","SelectContent","SelectItem","SelectGroup","SelectLabel","SelectSeparator"],composesWith:["Label (above SelectTrigger)","Form","Card"],props:{value:{schema:z.unknown().optional(),design:"plumbing",description:"Radix root"},wraps:{schema:z.unknown(),design:"plumbing"},placeholder:{schema:z.string().optional(),design:"content",description:"text when nothing is selected"},accepts:{schema:z.unknown(),design:"plumbing"}}};var sn={name:"Separator",description:"Light divider between sibling blocks in a Card, list, or header. For section-level partition use extra spacing instead.",import:"@gradeui/ui",aliases:["divider","rule","hr","line","horizontal rule"],composesWith:["Card (between CardHeader/Content/Footer)","navigation menus","any vertical stacks"],props:{orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",description:'default "horizontal"'},decorative:{schema:z.boolean().optional(),design:"knob",description:"hide from a11y tree",default:true},className:{schema:z.string().optional(),design:"plumbing"}}};var ln={name:"ShaderPresetPicker",description:"Runtime gallery of shader presets \u2014 click to select. Use with ThreeScene as a controlled input so the user can pick a background shader. For a single preview card, use ShaderPresetPreview directly.",import:"@gradeui/ui",aliases:["shader picker","preset picker","shader gallery","preset gallery"],composesWith:["ShaderPresetPreview (internal)","ThreeScene (the typical downstream consumer)"],props:{value:{schema:z.string().optional(),design:"content",description:"currently selected preset id (controlled)"},onChange:{schema:z.unknown().optional(),design:"event",description:"called when the user clicks a preset card"},filterTags:{schema:z.string().optional(),design:"content",description:'only show presets matching at least one tag ("space" | "retro" | "motion" | "hero" | "background" \u2026)'},live:{schema:z.enum(["never","hover","always"]).optional(),design:"knob",description:"thumbnail render mode",default:"hover"},postPreset:{schema:z.string().optional(),design:"content",description:"shared post-FX preset applied to every thumbnail"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"shared palette applied to every thumbnail"},columns:{schema:z.unknown().optional(),design:"plumbing",description:"grid columns at md+ breakpoint"}}};var dn={name:"ShaderPresetPreview",description:"Thumbnail-sized preview card for a shader preset. Defaults to a cheap static placeholder until hovered, at which point the live WebGL render kicks in. Use directly when you want a single preset card; use ShaderPresetPicker for a filterable grid.",import:"@gradeui/ui",aliases:["shader preview","preset preview","shader card"],composesWith:["ThreeScene (internal)","ShaderPresetPicker (wraps this)"],props:{preset:{schema:z.string(),design:"content",description:"shader preset id from the registry"},live:{schema:z.enum(["never","hover","always"]).optional(),design:"knob",description:"when to run the live WebGL render",default:"hover"},postPreset:{schema:z.string().optional(),design:"content",description:"override the preset's default post-FX"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"palette overrides for the preview"},aspect:{schema:z.enum(["video","square","portrait","wide"]).optional(),design:"knob",default:"video"},hideLabel:{schema:z.boolean().optional(),design:"knob",description:"hide the label strip under the preview",default:false},onClick:{schema:z.unknown().optional(),design:"event"}}};var cn={name:"Sheet",description:"A panel that slides in from a screen edge \u2014 mobile nav drawers, side panels for editing a single record without leaving the list, filter trays on small viewports. For a centered focus modal use Dialog. For a transient announcement use Toast (Sonner). For inline reveals use Collapsible.",import:"@gradeui/ui",aliases:["sheet","drawer","side panel","slide-in","nav drawer","mobile drawer","slide-over","action sheet","modal sheet","bottom sheet","side sheet","react native modal sheet","bottom-sheet","ios action sheet"],subcomponents:["SheetTrigger","SheetContent","SheetHeader","SheetTitle","SheetDescription","SheetFooter","SheetClose"],composesWith:["Form controls (an inline edit sheet)","Button (trigger + close)","AppShellNav (mobile-only swap)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing"},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",default:"right"},className:{schema:z.string().optional(),design:"plumbing",description:"usually set a width (right/left) or height (top/bottom)"},SheetTitle:{schema:z.unknown(),design:"plumbing"}}};var pn={name:"Sidebar",description:'Vertical app navigation. Drop inside `<AppShellNav placement="side">` for full-page layouts. Compound API \u2014 `<SidebarHeader>` for brand, `<SidebarContent>` for the scrollable body of `<SidebarSection>` + `<SidebarItem>` rows, `<SidebarFooter>` for user / settings chrome. For top nav reach for TopMenu; for command-palette style search reach for Command.',import:"@gradeui/ui",aliases:["sidebar","side menu","sidemenu","navigation sidebar","app sidebar","side nav","side nav rail","master pane","sidebarmenu","navigation rail","react native drawer"],subcomponents:["SidebarHeader","SidebarContent","SidebarFooter","SidebarSection","SidebarItem"],composesWith:["AppShell (inside AppShellNav)","Avatar (in Footer)","Tooltip (auto-wrapped on collapsed items)","Button (asChild for custom routing)"],props:{collapsed:{schema:z.boolean().optional(),design:"knob",description:"controlled collapsed state (wire onCollapsedChange when set)"},defaultCollapsed:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial value (default false)"},onCollapsedChange:{schema:z.unknown().optional(),design:"event"},collapsible:{schema:z.boolean().optional(),design:"knob",description:"show the affordance for the user to collapse (default true)"},variant:{schema:z.enum(["rail","panel"]).optional(),design:"knob",description:"outer chrome \u2014 `rail` (default) sits flush against an adjacent surface with a single right-border + tracked width; `panel` is a card-style floating sidebar with full border + rounded corners and width inherited from the parent flex/grid track."},any:{schema:z.unknown(),design:"plumbing",description:"brand / logo / org switcher; hides nothing when collapsed (centred)"},title:{schema:z.unknown().optional(),design:"plumbing",description:'group label; **uppercase tracking-wide muted** styling auto-applied (Notion / Linear / Slack-style "GAMES", "FAVORITES", "WORKSPACE" headers); hidden when sidebar is collapsed'},icon:{schema:z.unknown().optional(),design:"plumbing",description:"optional icon beside the title"},trailing:{schema:z.unknown().optional(),design:"plumbing",description:`Right-edge action slot. On **SidebarSection**: the canonical "+" / "..." header affordance (Notion's "+ Add page", Linear's "+" next to Favorites). On **SidebarTreeItem**: a sibling-of-button slot for settings cog / more-actions / '+ add child'; vertically centered against the row; click events stopPropagation'd so taps don't toggle expand. Branch row exposes \`group/row\` named-group, so consumer can use \`hidden group-hover/row:flex\` for hover-only visibility scoped to the branch alone.`},defaultExpanded:{schema:z.boolean().optional(),design:"knob",description:"initial open state (default true)"},badge:{schema:z.unknown().optional(),design:"plumbing",description:"trailing count / label (hidden when collapsed)"},active:{schema:z.boolean().optional(),design:"knob",description:'current route; adds aria-current="page"'},href:{schema:z.string().optional(),design:"content",description:"renders as <a>; for routing use `asChild` with your link component"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"wrap a custom link (<Link href> from Next.js etc.) via Radix Slot"},asButton:{schema:z.boolean().optional(),design:"knob",description:"render as <button> for action rows (open dialog, log out)"},disabled:{schema:z.boolean().optional(),design:"knob"},collapsedLabel:{schema:z.unknown().optional(),design:"plumbing",description:"tooltip override when sidebar is collapsed (defaults to children text)"},size:{schema:z.enum(["sm","md"]).optional(),design:"knob",description:"row size \u2014 `md` (default) is the standard `text-sm font-medium` nav row; `sm` is `text-xs` + lighter weight + tighter padding for visually subordinate rows (nested screens, sub-pages). Active state still wins on color + weight."},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line under the label \u2014 `Edited 2m ago`, `12 items`, etc. Layout stacks label + description; icon vertically centered against stack; badge stays trailing. Hidden when sidebar collapsed."}}};var mn={name:"Skeleton",description:'Loading placeholder for content whose shape you know. Set width/height via className to mimic the real content (e.g. "h-4 w-32"). Not a spinner \u2014 use it where the real thing will drop in.',import:"@gradeui/ui",aliases:["placeholder","shimmer","loader","loading state","redacted","redacted placeholder","shimmer placeholder","content placeholder","lottie placeholder"],composesWith:["Card","Avatar (inside a Skeleton for avatar loading)","any layout"],props:{className:{schema:z.string().optional(),design:"plumbing",description:"required in practice; supply width/height utilities"}}};var un={name:"Slider",description:'A continuous-ish numeric pick \u2014 volume, opacity, font size, price-range filters. Use a single-thumb slider for one value, two-thumb for a range. For a small set of discrete options (1-5 stars, sm/md/lg) prefer ToggleGroup. For free-text numeric entry use an Input type="number".',import:"@gradeui/ui",aliases:["slider","range slider","range input","volume","opacity slider","scrub","drag value","slider control","value slider","react native slider"],composesWith:["Label (mandatory above)","Row (label + current value display)","Card (settings rows)"],props:{value:{schema:z.number().optional(),design:"knob",description:"controlled value; ALWAYS an array even for a single-thumb slider (`[50]`)"},defaultValue:{schema:z.number().optional(),design:"knob",description:"uncontrolled initial; `[20, 80]` for a two-thumb range"},onValueChange:{schema:z.unknown().optional(),design:"event"},min:{schema:z.number().optional(),design:"knob"},max:{schema:z.number().optional(),design:"knob"},step:{schema:z.number().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"horizontal"},dir:{schema:z.enum(["ltr","rtl"]).optional(),design:"plumbing"},inverted:{schema:z.boolean().optional(),design:"knob",description:"flip the visual direction"},name:{schema:z.string().optional(),design:"content",description:"form name when posting natively"}}};var gn={name:"Sortable",description:"Drag-to-reorder lists, kanban-column reordering, sortable shelves, tab strips the user can rearrange. Pairs with any layout primitive \u2014 Stack for vertical lists, Row for horizontal strips, Grid for 2D card walls. For cross-container drag (drag a card from one column to another) hand-roll DndContext at the page level \u2014 Sortable v1 covers single-list reorder; Sortable.Group for cross-container is a planned follow-up. Reach for raw `@dnd-kit/core` if you need custom collision detection, drag overlays with arbitrary chrome, or non-list use cases (kanban swimlanes, draggable canvas nodes).",import:"@gradeui/ui",aliases:["sortable","reorder","drag and drop","dnd","draggable list","sortable list","kanban","drag to reorder","drag-drop","dragdroplist","drag handle","react native draggable flatlist"],subcomponents:["Sortable.Item","Sortable.Handle"],composesWith:["Stack (vertical lists)","Row (horizontal strips)","Grid (2D card walls)","Card (typical item content)","Button (as Sortable.Handle asChild)"],props:{values:{schema:z.unknown(),design:"plumbing",description:"ordered list of unique ids; the source of truth for the order"},onReorder:{schema:z.unknown().optional(),design:"event",description:"fires with the new order after a drag that changed it"},strategy:{schema:z.enum(["vertical","horizontal","grid"]).optional(),design:"knob",description:"match the layout your items render in",default:"vertical"},disabled:{schema:z.boolean().optional(),design:"knob",description:"disable drag on every item"},Sortable:{schema:z.unknown(),design:"plumbing",description:"must match one entry in the parent `values` array (identity, not React key)"}}};var fn={name:"Stack",description:"Default top-level layout inside the main slot when composing two or more stacked regions (hero + content + footer, auth card + subtext, etc.). Prefer Stack over hand-rolled `flex flex-col gap-*` so the vertical rhythm is editable through the settings panel.",import:"@gradeui/ui",aliases:["stack","vstack","vertical","column","vertical layout","v-stack","vertical stack","lazyvstack"],composesWith:["Section","Row","Split","Hero","any content component"],props:{gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"vertical gap between children",default:"md"},align:{schema:z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis (horizontal) alignment of children",default:"stretch"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:'main-axis (vertical) distribution. Reach for this on absolute-positioned overlays (`justify="end"` pins children to the bottom) and split footers (`justify="between"`).',default:"start"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot, so `<Stack asChild><section>\u2026</section></Stack>` stamps Stack's classes onto the `<section>` rather than nesting a wrapper div",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var hn={name:"Switch",description:'Instant on/off setting ("Enable notifications", "Dark mode"). Commits on toggle \u2014 no submit button needed. For selecting-from-a-list use Checkbox.',import:"@gradeui/ui",aliases:["toggle","switch","on/off switch","ios toggle","toggle switch","switch control","react native switch"],composesWith:["Label (via htmlFor)","Card (settings rows)"],props:{checked:{schema:z.boolean().optional(),design:"knob"},onCheckedChange:{schema:z.unknown().optional(),design:"event"},defaultChecked:{schema:z.boolean().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},id:{schema:z.string().optional(),design:"plumbing"}}};var vn={name:"Table",description:"Structured tabular data \u2014 rows \xD7 columns with alignment requirements. NOT a layout grid \u2014 for that use div+Tailwind grid utilities. Keep to <100 rows; larger datasets need virtualisation (not in DS).",import:"@gradeui/ui",aliases:["table","table view","data table","datatable","grid view","data grid","rows and columns"],subcomponents:["TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],composesWith:["Card (wrap the table)","Badge (inside TableCell for status)","Checkbox (row selection)","Button (row actions)"],props:{Each:{schema:z.unknown(),design:"plumbing"},No:{schema:z.unknown(),design:"plumbing",description:"styling follows the active theme tokens"}}};var yn={name:"Tabs",description:'A small set of peer views within one surface (2\u20135 tabs). For primary nav use Side Menu/routing. For filters use a filter control, not tabs. Pick `variant="pill"` for app chrome (settings panels, in-card tab strips). Pick `variant="underlined"` for marketing/docs pages and browser-tab-style treatments.',import:"@gradeui/ui",aliases:["tabs","tab strip","tab bar","tab view","tabbed interface","pageviewcontroller","react native tab view","underlined tabs","page tabs","segment switcher","simple tabs"],subcomponents:["TabsList","TabsTrigger","TabsContent"],composesWith:["Card (tabs inside a card body)","Dialog","TooltipProvider (required for tooltip prop)"],props:{defaultValue:{schema:z.unknown().optional(),design:"plumbing"},size:{schema:z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"t-shirt scale aligned with Button/ToggleGroup heights; cascades to every TabsTrigger via context so set it once on the list"},variant:{schema:z.enum(["pill","underlined, default pill"]).optional(),design:"knob",description:"`pill` is the shadcn chip-on-muted look; `underlined` is the minimal text + bottom-border treatment (formerly the separate SimpleTabs component, collapsed into Tabs in May 2026). Cascades to triggers."},value:{schema:z.string(),design:"content",description:"matches a TabsContent value; tooltip?: string \u2014 when set, wraps the trigger in the design-system Tooltip and auto-applies aria-label (useful for icon-only triggers); requires a TooltipProvider somewhere above the tabs"}}};var wn={name:"Textarea",description:"Multi-line text entry (descriptions, messages, comments). Pair with a Label. Single-line input \u2192 use Input instead.",import:"@gradeui/ui",aliases:["text area","multiline","comment box","message field","text editor","multi-line text","multiline input","multiline text field","comments box","multiline textinput"],composesWith:["Label","Form","Card (in CardContent)"],props:{}};var xn={name:"ThreeScene",description:"WebGL primitive for shader backgrounds, generative visuals, and bespoke three.js scenes. Three authoring paths, in order of preference \u2014 (1) pick a `preset` id; (2) if nothing in the registry fits, write a `fragmentShader` against the fixed uniform contract; (3) only as a last resort, pass a full `createScene` factory. For looping video, use VideoPlayer; for interactive animations, use RivePlayer.",import:"@gradeui/ui",aliases:["three","threejs","webgl","shader","scene","3d","generative","hero background","fragment shader","glsl"],composesWith:["MediaSurface (internal)","foreground content stacked above with `position: absolute/relative z-10`"],props:{preset:{schema:z.enum(["space","plasma","voronoi","synthwave"]).optional(),design:"knob",description:"shader preset id from the registry"},fragmentShader:{schema:z.string().optional(),design:"content",description:"user-authored GLSL body; takes precedence over preset"},onShaderError:{schema:z.unknown().optional(),design:"event",description:'fires on compile failure; scene falls back to `preset="space"`'},postPreset:{schema:z.enum(["none","vhs","cinematic","synthwave","crt"]).optional(),design:"knob",description:"post-processing pass",default:"vhs"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"any CSS-legal colour string per slot. Re-tints automatically when the theme changes. Unset slots fall back to defaults."},createScene:{schema:z.unknown().optional(),design:"plumbing",description:"custom full scene factory; takes precedence over preset AND fragmentShader"},controls:{schema:z.boolean().optional(),design:"knob",description:"play/pause overlay",default:false},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",description:"big win for WebGL battery life",default:true},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},maxDpr:{schema:z.number().optional(),design:"knob",description:"lower for thumbnails / low-end devices"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"}}};var Rn={name:"Toast",description:'Transient, non-blocking feedback that confirms or warns about an action \u2014 "Saved", "Failed to upload", "Copied to clipboard", "Invitation sent". For permanent inline messages reach for Callout. For confirmations that block until acknowledged use Dialog. Mount <Toaster /> ONCE at the root of the app; everywhere else, call the `toast` helper.',import:"@gradeui/ui",aliases:["toast","toaster","sonner","notification","snackbar","alert toast","transient alert","transient banner","banner notification","toastandroid"],composesWith:["App root layout (single <Toaster /> mount)","Form submit handlers (success/error toasts)","Async actions"],props:{position:{schema:z.enum(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]).optional(),design:"knob",default:"bottom-right"},theme:{schema:z.enum(["light","dark","system"]).optional(),design:"knob"},richColors:{schema:z.boolean().optional(),design:"knob",description:"colored variants for success/error/warning/info"},expand:{schema:z.boolean().optional(),design:"knob",description:"keep multiple toasts visually separated rather than stacked"},visibleToasts:{schema:z.number().optional(),design:"knob",description:"max concurrent toasts on screen (default 3)"},duration:{schema:z.number().optional(),design:"knob",description:"default ms before auto-dismiss"}}};var Sn={name:"Toggle",description:`A standalone on/off button \u2014 Bold/Italic in a toolbar, "Show grid" in a header, single binary toggle that doesn't belong inside a Switch row. For two-or-more mutually-exclusive options use ToggleGroup. For a labeled settings switch ("Active: on/off") use Switch.`,import:"@gradeui/ui",aliases:["toggle","toggle button","press button","bold button","italic button"],composesWith:["Tooltip (wrap an icon-only Toggle)","Row","TabsList (sibling)"],props:{variant:{schema:z.enum(["default","outline"]).optional(),design:"knob",description:"outline adds a border, default is borderless and ghost-like"},size:{schema:z.enum(["default","sm","lg"]).optional(),design:"knob"},pressed:{schema:z.boolean().optional(),design:"knob",description:"controlled pressed state"},defaultPressed:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onPressedChange:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},children:{schema:z.unknown(),design:"plumbing",description:"usually an icon or short label"}}};var Cn={name:"ToggleGroup",description:'A small set of mutually-exclusive (`type="single"`) or independent (`type="multiple"`) binary options that live side-by-side as a segmented control \u2014 viewport size picker (Mobile/Tablet/Desktop), text alignment, view density. Reads identically to a TabsList of the same size; reach for ToggleGroup when each option emits a value (like a form input) rather than swapping panels. Use Tabs for panel switching, Toggle for a single on/off.',import:"@gradeui/ui",aliases:["toggle group","segmented control","segmented buttons","button group","pill group","view selector","segmented picker","segmentedcontrolios","segmented buttons group","rn segmented control"],subcomponents:["ToggleGroupItem"],composesWith:["Card (header controls)","Row","AppShellHeader chrome","settings panels"],props:{type:{schema:z.enum(["single","multiple"]),design:"knob",description:"single picks one, multiple picks any number"},value:{schema:z.string().optional(),design:"content",description:"controlled; matches `type` (string for single, string[] for multiple)"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:z.unknown().optional(),design:"event"},size:{schema:z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"cascades to every ToggleGroupItem via context, matches Tabs/Button heights"},variant:{schema:z.enum(["default","outline"]).optional(),design:"knob"},tooltip:{schema:z.unknown().optional(),design:"plumbing",description:"when set, wraps the item in a Tooltip; required for icon-only items where the visible chrome doesn't carry a label"},tooltipSide:{schema:z.enum(["top","right","bottom",'left", default "top']).optional(),design:"knob",description:"side the tooltip renders on"},tooltipDelay:{schema:z.number().optional(),design:"knob",description:"per-item delay override; falls back to the upstream TooltipProvider's delayDuration"}}};var kn={name:"Toolbar",description:`ANY three-region chrome bar \u2014 the leading/center/trailing pattern Apple HIG
35
+ (users to @-mention, email recipients, search-as-you-type API results).`,import:"@gradeui/ui",composesWith:["Popover","Command","Badge","Checkbox-style row indicator","Separator"],props:{options:{schema:z.unknown(),design:"plumbing"},value:{schema:z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial selection"},onValueChange:{schema:z.unknown().optional(),design:"event"},placeholder:{schema:z.string().optional(),design:"content",default:"Select\u2026"},searchPlaceholder:{schema:z.string().optional(),design:"content",default:"Search\u2026"},emptyMessage:{schema:z.string().optional(),design:"content",default:"Nothing matches."},maxCount:{schema:z.number().optional(),design:"knob",description:'badges shown on the trigger before collapsing to "+N more"'},searchable:{schema:z.boolean().optional(),design:"knob",description:"hide for short option lists",default:true},badgeDismissible:{schema:z.boolean().optional(),design:"knob",description:"show \xD7 on each selected badge",default:true},disabled:{schema:z.boolean().optional(),design:"knob"},modalPopover:{schema:z.boolean().optional(),design:"knob",description:"Popover modal mode",default:false},className:{schema:z.string().optional(),design:"plumbing"}}};var Sn={name:"Popover",description:'A floating panel anchored to a trigger that contains interactive content \u2014 date pickers, color pickers, filter pickers, "more info" panels, inline forms. Differs from Tooltip (hover-only, no focusable content) and Dialog (modal, blocks the page). DatePicker, DateRangePicker, and the Combobox pattern all compose Popover internally.',import:"@gradeui/ui",aliases:["popover","dropdown panel","floating panel","inline editor","attached panel","filter pop","popover view","popoverpresentation","attached popover","glass popover","frosted popover","inspector popover"],subcomponents:["PopoverTrigger","PopoverContent","PopoverAnchor"],composesWith:["Button (as trigger)","Calendar (date picker)","Command (combobox)","Form controls (inline edit popover)","Code (code-detail popovers)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually a Button"},side:{schema:z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the popover surface is *made of*. `solid` is the default opaque `bg-popover`. `translucent` is the Apple HIG menu-sheet feel. `glass` for floating panels over rich canvases (Studio inspector, image-tool palette)."}}};var Cn={name:"Progress",description:"Determinate progress \u2014 file uploads, multi-step forms, quota meters. Indeterminate state \u2192 use Skeleton or animated Loader icon.",import:"@gradeui/ui",aliases:["progress","progress view","progress indicator","progress bar","determinate progress","loading bar","completion bar"],composesWith:["Card (as a section)","Badge (showing % next to it)","Label (describing what's loading)"],props:{value:{schema:z.number().optional(),design:"knob",description:"percent complete"},max:{schema:z.number().optional(),design:"knob"},className:{schema:z.string().optional(),design:"plumbing"}}};var kn={name:"RadioGroup",description:"A small set of mutually-exclusive options where the user needs to SEE all of them at once \u2014 pricing tiers (3-4 options), shipping speed, payment method radio cards. For 5+ options use Select. For a segmented control as part of a toolbar use ToggleGroup. For yes/no use Switch.",import:"@gradeui/ui",aliases:["radio group","radio buttons","single-choice","pricing options","payment method","radio buttons","radio control","single-select"],subcomponents:["RadioGroupItem"],composesWith:["Label (paired with each item via htmlFor)","Stack (vertical list)","Card (radio card pattern)"],props:{value:{schema:z.string().optional(),design:"content",description:"controlled selection"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"vertical"},name:{schema:z.string().optional(),design:"content",description:"form name when posting natively"},id:{schema:z.string().optional(),design:"plumbing",description:"pair with a <Label htmlFor> for click-on-label"}}};var Tn={name:"Resizable",description:`A multi-pane layout where the user wants to drag the divider \u2014 Slack/Mail-style list+detail, IDE editor+terminal, side-by-side compare view. Static layouts shouldn't use this \u2014 reach for AppShell with nav="three-pane" (fixed widths) or Grid (responsive ladder). Built on react-resizable-panels under the hood.`,import:"@gradeui/ui",aliases:["resizable","splitter","split pane","drag divider","adjustable panels","resizer","split view","draggable divider","split pane resizer","ns split view"],subcomponents:["ResizablePanelGroup","ResizablePanel","ResizableHandle"],composesWith:["AppShellMain (host the splitter inside main)","ScrollArea (each panel's content)","Card"],props:{direction:{schema:z.enum(["horizontal","vertical"]),design:"knob",description:"required; sets the axis the user drags along"},autoSaveId:{schema:z.string().optional(),design:"content",description:"persists user-adjusted sizes to localStorage under this id"},onLayout:{schema:z.unknown().optional(),design:"event"},defaultSize:{schema:z.number().optional(),design:"knob",description:"percent of group (0-100); siblings should sum to ~100"},minSize:{schema:z.unknown().optional(),design:"plumbing",description:"percent bounds"},collapsible:{schema:z.boolean().optional(),design:"knob",description:"allow this panel to collapse to zero"},collapsedSize:{schema:z.unknown().optional(),design:"plumbing",description:"collapse behaviour controls"},withHandle:{schema:z.boolean().optional(),design:"knob",description:"show a visible drag affordance (default just a hit-zone)"}}};var Pn={name:"RivePlayer",description:"Rive runtime wrapped in the shared media surface. Reach for Rive when you need interactive state-machine animations driven by scroll/hover/input. For non-interactive looping video, use VideoPlayer; for shader-driven backgrounds, use ThreeScene.",import:"@gradeui/ui",aliases:["rive","riv","animation","animated","lottie"],composesWith:["MediaSurface (internal)","Card","any container"],props:{src:{schema:z.string(),design:"content",description:"URL or path to the .riv file"},stateMachines:{schema:z.string().optional(),design:"content",description:"state machine(s) to run"},artboard:{schema:z.string().optional(),design:"content",description:"artboard name; omit to use default"},controls:{schema:z.boolean().optional(),design:"knob",description:"viewer mode by default; set true for play/pause overlay",default:false},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},loop:{schema:z.boolean().optional(),design:"knob",default:true},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",default:true},fit:{schema:z.enum(["contain","cover","fill","fitWidth","fitHeight","none"]).optional(),design:"knob",default:"contain"},stateMachineInputs:{schema:z.unknown().optional(),design:"plumbing"},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"square"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"},poster:{schema:z.string().optional(),design:"content",description:"image shown while the runtime loads"}}};var Mn={name:"Row",description:"Horizontal composition \u2014 button groups, inline form rows, logo + nav rows, anything on one line. Reach for Row instead of `flex items-center gap-*` so the alignment and spacing are editable through the settings panel. For two-pane layouts with an explicit ratio (sidebar + content, 1/3 + 2/3) use Split instead \u2014 Row evenly flows whatever children it holds.",import:"@gradeui/ui",aliases:["row","hstack","horizontal","inline","horizontal layout","hstack","h-stack","horizontal stack","lazyhstack"],composesWith:["Button","Input","NavItem","Stack (can wrap a Row)","any content component"],props:{gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"gap between children",default:"md"},align:{schema:z.enum(["start","center","end","stretch","baseline"]).optional(),design:"knob",description:"cross-axis (vertical) alignment",default:"center"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:"main-axis distribution",default:"start"},wrap:{schema:z.boolean().optional(),design:"knob",description:"allow children to wrap onto additional lines when they overflow",default:false},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Nn={name:"ScrollArea",description:"Bounded content that needs custom scroll chrome \u2014 sidebars with long item lists, chat transcripts, table panels inside a dashboard, anywhere the OS scrollbar would feel out of place against the design tokens. The wrapping element has to have a height constraint (`h-`, `max-h-`, or grid row sizing) or nothing scrolls \u2014 scroll-area can't infer a bound on its own. For body-level scrolling, leave the document to the browser.",import:"@gradeui/ui",aliases:["scroll area","scroll container","custom scrollbar","sidebar scroll","panel scroll","scroll view","scrollview","react native scrollview"],subcomponents:["ScrollBar"],composesWith:["Card (long card body)","AppShellNav (long sidebar)","Sheet (long modal body)","Table (sticky-header scrolling list)"],props:{type:{schema:z.enum(["auto","always","scroll","hover"]).optional(),design:"knob",description:"when the scrollbar shows"},scrollHideDelay:{schema:z.number().optional(),design:"knob",description:'ms before "scroll"/"hover" scrollbars fade'},dir:{schema:z.enum(["ltr","rtl"]).optional(),design:"plumbing"},className:{schema:z.string().optional(),design:"plumbing",description:"set a height/max-height here, otherwise nothing scrolls"},orientation:{schema:z.enum(["vertical","horizontal"]).optional(),design:"knob",default:"vertical"}}};var En={name:"SectionBlock",description:'The top-level container for a marketing page section \u2014 hero, feature row, pricing table, testimonial strip, FAQ section. Always reach for SectionBlock over a hand-rolled `<section>` so vertical rhythm, container width, and tonal background stay consistent across the page. Pair `background="gradient"` + `surface="glass"` inner Cards for the "modern marketing hero" pattern.',import:"@gradeui/ui",aliases:["section","section block","hero section","marketing section","page section","content section","container section","feature section","hero","page hero","marketing hero","glass section","gradient section","mesh hero"],composesWith:['Card (the most common child \u2014 especially with surface="glass")',"Grid (feature rows)","Stack (hero column)","MediaSurface (hero imagery)","Code (developer hero)","Carousel (logo strips)"],props:{padding:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"vertical rhythm. Defaults to `lg`."},background:{schema:z.enum(["transparent","muted","card","primary","gradient"]).optional(),design:"knob",description:"tonal direction of the section bg."},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the section is *made of*. Orthogonal to `background`. Use `glass` for hero sections that float over a generative backdrop / image / dot grid."},container:{schema:z.enum(["default","wide","narrow","full"]).optional(),design:"knob",description:"max-width of the inner content."},alignment:{schema:z.enum(["left","center","right"]).optional(),design:"knob",description:"header / CTA alignment."},titleSize:{schema:z.enum(["sm","md","lg","xl"]).optional(),design:"knob"},title:{schema:z.string().optional(),design:"plumbing"},subtitle:{schema:z.string().optional(),design:"content"},cta1:{schema:z.unknown().optional(),design:"plumbing",description:"string or `{ text, variant, href, onClick }` config"},backgroundImage:{schema:z.string().optional(),design:"content",description:"direct CSS background image url"},as:{schema:z.enum(["section","div","article"]).optional(),design:"knob",description:"semantic root"},fullBleed:{schema:z.boolean().optional(),design:"knob"}}};var Ln={name:"Select",description:"Single-choice from 3+ known options. Fewer than 3 \u2192 RadioGroup. Huge list with search \u2192 use a Combobox (not in DS yet). Multi-select \u2192 not supported by this primitive.",import:"@gradeui/ui",aliases:["dropdown","combobox","picker","select","pop-up button","popup button","popup picker","picker view","rnpickerselect","react native picker","native picker"],subcomponents:["SelectTrigger","SelectValue","SelectContent","SelectItem","SelectGroup","SelectLabel","SelectSeparator"],composesWith:["Label (above SelectTrigger)","Form","Card"],props:{value:{schema:z.unknown().optional(),design:"plumbing",description:"Radix root"},wraps:{schema:z.unknown(),design:"plumbing"},placeholder:{schema:z.string().optional(),design:"content",description:"text when nothing is selected"},accepts:{schema:z.unknown(),design:"plumbing"}}};var Hn={name:"Separator",description:"Light divider between sibling blocks in a Card, list, or header. For section-level partition use extra spacing instead.",import:"@gradeui/ui",aliases:["divider","rule","hr","line","horizontal rule"],composesWith:["Card (between CardHeader/Content/Footer)","navigation menus","any vertical stacks"],props:{orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",description:'default "horizontal"'},decorative:{schema:z.boolean().optional(),design:"knob",description:"hide from a11y tree",default:true},className:{schema:z.string().optional(),design:"plumbing"}}};var Dn={name:"ShaderPresetPicker",description:"Runtime gallery of shader presets \u2014 click to select. Use with ThreeScene as a controlled input so the user can pick a background shader. For a single preview card, use ShaderPresetPreview directly.",import:"@gradeui/ui",aliases:["shader picker","preset picker","shader gallery","preset gallery"],composesWith:["ShaderPresetPreview (internal)","ThreeScene (the typical downstream consumer)"],props:{value:{schema:z.string().optional(),design:"content",description:"currently selected preset id (controlled)"},onChange:{schema:z.unknown().optional(),design:"event",description:"called when the user clicks a preset card"},filterTags:{schema:z.string().optional(),design:"content",description:'only show presets matching at least one tag ("space" | "retro" | "motion" | "hero" | "background" \u2026)'},live:{schema:z.enum(["never","hover","always"]).optional(),design:"knob",description:"thumbnail render mode",default:"hover"},postPreset:{schema:z.string().optional(),design:"content",description:"shared post-FX preset applied to every thumbnail"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"shared palette applied to every thumbnail"},columns:{schema:z.unknown().optional(),design:"plumbing",description:"grid columns at md+ breakpoint"}}};var An={name:"ShaderPresetPreview",description:"Thumbnail-sized preview card for a shader preset. Defaults to a cheap static placeholder until hovered, at which point the live WebGL render kicks in. Use directly when you want a single preset card; use ShaderPresetPicker for a filterable grid.",import:"@gradeui/ui",aliases:["shader preview","preset preview","shader card"],composesWith:["ThreeScene (internal)","ShaderPresetPicker (wraps this)"],props:{preset:{schema:z.string(),design:"content",description:"shader preset id from the registry"},live:{schema:z.enum(["never","hover","always"]).optional(),design:"knob",description:"when to run the live WebGL render",default:"hover"},postPreset:{schema:z.string().optional(),design:"content",description:"override the preset's default post-FX"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"palette overrides for the preview"},aspect:{schema:z.enum(["video","square","portrait","wide"]).optional(),design:"knob",default:"video"},hideLabel:{schema:z.boolean().optional(),design:"knob",description:"hide the label strip under the preview",default:false},onClick:{schema:z.unknown().optional(),design:"event"}}};var In={name:"Sheet",description:"A panel that slides in from a screen edge \u2014 mobile nav drawers, side panels for editing a single record without leaving the list, filter trays on small viewports, Studio-style inspector panels. For a centered focus modal use Dialog. For a transient announcement use Toast (Sonner). For inline reveals use Collapsible.",import:"@gradeui/ui",aliases:["sheet","drawer","side panel","slide-in","nav drawer","mobile drawer","slide-over","action sheet","modal sheet","bottom sheet","side sheet","react native modal sheet","bottom-sheet","ios action sheet","inspector panel","glass sheet","frosted drawer"],subcomponents:["SheetTrigger","SheetContent","SheetHeader","SheetTitle","SheetDescription","SheetFooter","SheetClose"],composesWith:["Form controls (an inline edit sheet)","Button (trigger + close)","AppShellNav (mobile-only swap)","Code (changelog drawers)","MediaSurface (image-detail sheets)"],props:{open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing"},side:{schema:z.enum(["top","right","bottom","left"]).optional(),design:"knob",default:"right"},surface:{schema:z.enum(["solid","translucent","glass","glass-strong"]).optional(),design:"knob",description:"what the sheet panel is *made of*. `solid` is the default opaque `bg-background`. Reach for `glass` whenever the canvas behind the sheet (a layout in progress, a media gallery, a dashboard) should remain visible."},className:{schema:z.string().optional(),design:"plumbing",description:"usually set a width (right/left) or height (top/bottom)"},SheetTitle:{schema:z.unknown(),design:"plumbing"}}};var Fn={name:"Sidebar",description:'Vertical app navigation. Drop inside `<AppShellNav placement="side">` for full-page layouts. Compound API \u2014 `<SidebarHeader>` for brand, `<SidebarContent>` for the scrollable body of `<SidebarSection>` + `<SidebarItem>` rows, `<SidebarFooter>` for user / settings chrome. For top nav reach for TopMenu; for command-palette style search reach for Command.',import:"@gradeui/ui",aliases:["sidebar","side menu","sidemenu","navigation sidebar","app sidebar","side nav","side nav rail","master pane","sidebarmenu","navigation rail","react native drawer"],subcomponents:["SidebarHeader","SidebarContent","SidebarFooter","SidebarSection","SidebarItem"],composesWith:["AppShell (inside AppShellNav)","Avatar (in Footer)","Tooltip (auto-wrapped on collapsed items)","Button (asChild for custom routing)"],props:{collapsed:{schema:z.boolean().optional(),design:"knob",description:"controlled collapsed state (wire onCollapsedChange when set)"},defaultCollapsed:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial value (default false)"},onCollapsedChange:{schema:z.unknown().optional(),design:"event"},collapsible:{schema:z.boolean().optional(),design:"knob",description:"show the affordance for the user to collapse (default true)"},variant:{schema:z.enum(["rail","panel"]).optional(),design:"knob",description:'outer chrome treatment. `rail` (default) is the classic nav rail with a single right-border + tracked width via `--gds-sidebar-width`; drops cleanly into `<AppShellNav placement="side">`. `panel` is a card-style floating sidebar with full border + rounded corners + parent-controlled width; use when the sidebar is one of several adjacent panes in a body row (e.g. Projects | Canvas | Settings). The compound children (Header/Content/Footer/Section/Item) are identical in both treatments.'},any:{schema:z.unknown(),design:"plumbing",description:"brand / logo / org switcher; hides nothing when collapsed (centred)"},title:{schema:z.unknown().optional(),design:"plumbing",description:'group label; **uppercase tracking-wide muted** styling auto-applied (Notion / Linear / Slack-style "GAMES", "FAVORITES", "WORKSPACE" headers); hidden when sidebar is collapsed'},icon:{schema:z.unknown().optional(),design:"plumbing",description:"optional icon beside the title"},trailing:{schema:z.unknown().optional(),design:"plumbing",description:`**action(s) on the right edge of the header** \u2014 the canonical "+" / "..." slot (Notion's "+ Add page" next to Pages, Linear's "+" next to Favorites, Slack's "+" next to Channels). Pointer events isolated so a Button here doesn't toggle collapse.`},defaultExpanded:{schema:z.boolean().optional(),design:"knob",description:"initial open state (default true)"},badge:{schema:z.unknown().optional(),design:"plumbing",description:"trailing count / label (hidden when collapsed)"},active:{schema:z.boolean().optional(),design:"knob",description:'current route; adds aria-current="page"'},href:{schema:z.string().optional(),design:"content",description:"renders as <a>; for routing use `asChild` with your link component"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"wrap a custom link (<Link href> from Next.js etc.) via Radix Slot"},asButton:{schema:z.boolean().optional(),design:"knob",description:"render as <button> for action rows (open dialog, log out)"},disabled:{schema:z.boolean().optional(),design:"knob"},collapsedLabel:{schema:z.unknown().optional(),design:"plumbing",description:"tooltip override when sidebar is collapsed (defaults to children text)"},size:{schema:z.enum(["sm","md"]).optional(),design:"knob",description:"row size. `md` (default) is the standard `text-sm font-medium` nav row; `sm` is `text-xs` + lighter weight + tighter padding for visually subordinate rows (nested screens under a project, sub-pages under a section). Active state still wins on color + weight so the current row pops at either size."},description:{schema:z.unknown().optional(),design:"plumbing",description:"secondary line beneath the label (metadata like 'Edited 2m ago', '12 items', a brief description). Row layout adapts: label + description stacked vertically; icon vertically-centered against the stack; badge stays on trailing edge. Hidden when sidebar collapsed."}}};var zn={name:"Skeleton",description:'Loading placeholder for content whose shape you know. Set width/height via className to mimic the real content (e.g. "h-4 w-32"). Not a spinner \u2014 use it where the real thing will drop in.',import:"@gradeui/ui",aliases:["placeholder","shimmer","loader","loading state","redacted","redacted placeholder","shimmer placeholder","content placeholder","lottie placeholder"],composesWith:["Card","Avatar (inside a Skeleton for avatar loading)","any layout"],props:{className:{schema:z.string().optional(),design:"plumbing",description:"required in practice; supply width/height utilities"}}};var Bn={name:"Slider",description:'A continuous-ish numeric pick \u2014 volume, opacity, font size, price-range filters. Use a single-thumb slider for one value, two-thumb for a range. For a small set of discrete options (1-5 stars, sm/md/lg) prefer ToggleGroup. For free-text numeric entry use an Input type="number".',import:"@gradeui/ui",aliases:["slider","range slider","range input","volume","opacity slider","scrub","drag value","slider control","value slider","react native slider"],composesWith:["Label (mandatory above)","Row (label + current value display)","Card (settings rows)"],props:{value:{schema:z.number().optional(),design:"knob",description:"controlled value; ALWAYS an array even for a single-thumb slider (`[50]`)"},defaultValue:{schema:z.number().optional(),design:"knob",description:"uncontrolled initial; `[20, 80]` for a two-thumb range"},onValueChange:{schema:z.unknown().optional(),design:"event"},min:{schema:z.number().optional(),design:"knob"},max:{schema:z.number().optional(),design:"knob"},step:{schema:z.number().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},orientation:{schema:z.enum(["horizontal","vertical"]).optional(),design:"knob",default:"horizontal"},dir:{schema:z.enum(["ltr","rtl"]).optional(),design:"plumbing"},inverted:{schema:z.boolean().optional(),design:"knob",description:"flip the visual direction"},name:{schema:z.string().optional(),design:"content",description:"form name when posting natively"}}};var Vn={name:"Sortable",description:"Drag-to-reorder lists, kanban-column reordering, sortable shelves, tab strips the user can rearrange. Pairs with any layout primitive \u2014 Stack for vertical lists, Row for horizontal strips, Grid for 2D card walls. For cross-container drag (drag a card from one column to another) hand-roll DndContext at the page level \u2014 Sortable v1 covers single-list reorder; Sortable.Group for cross-container is a planned follow-up. Reach for raw `@dnd-kit/core` if you need custom collision detection, drag overlays with arbitrary chrome, or non-list use cases (kanban swimlanes, draggable canvas nodes).",import:"@gradeui/ui",aliases:["sortable","reorder","drag and drop","dnd","draggable list","sortable list","kanban","drag to reorder","drag-drop","dragdroplist","drag handle","react native draggable flatlist"],subcomponents:["Sortable.Item","Sortable.Handle"],composesWith:["Stack (vertical lists)","Row (horizontal strips)","Grid (2D card walls)","Card (typical item content)","Button (as Sortable.Handle asChild)"],props:{values:{schema:z.unknown(),design:"plumbing",description:"ordered list of unique ids; the source of truth for the order"},onReorder:{schema:z.unknown().optional(),design:"event",description:"fires with the new order after a drag that changed it"},strategy:{schema:z.enum(["vertical","horizontal","grid"]).optional(),design:"knob",description:"match the layout your items render in",default:"vertical"},disabled:{schema:z.boolean().optional(),design:"knob",description:"disable drag on every item"},Sortable:{schema:z.unknown(),design:"plumbing",description:"must match one entry in the parent `values` array (identity, not React key)"}}};var On={name:"Stack",description:"Default top-level layout inside the main slot when composing two or more stacked regions (hero + content + footer, auth card + subtext, etc.). Prefer Stack over hand-rolled `flex flex-col gap-*` so the vertical rhythm is editable through the settings panel.",import:"@gradeui/ui",aliases:["stack","vstack","vertical","column","vertical layout","v-stack","vertical stack","lazyvstack"],composesWith:["Section","Row","Split","Hero","any content component"],props:{gap:{schema:z.enum(["none","xs","sm","md","lg","xl","2xl"]).optional(),design:"knob",description:"vertical gap between children",default:"md"},align:{schema:z.enum(["start","center","end","stretch"]).optional(),design:"knob",description:"cross-axis (horizontal) alignment of children",default:"stretch"},justify:{schema:z.enum(["start","center","end","between","around","evenly"]).optional(),design:"knob",description:'main-axis (vertical) distribution. Reach for this on absolute-positioned overlays (`justify="end"` pins children to the bottom) and split footers (`justify="between"`).',default:"start"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"render as the child element via Slot, so `<Stack asChild><section>\u2026</section></Stack>` stamps Stack's classes onto the `<section>` rather than nesting a wrapper div",default:false},className:{schema:z.string().optional(),design:"plumbing"},children:{schema:z.unknown(),design:"plumbing"}}};var Gn={name:"Switch",description:'Instant on/off setting ("Enable notifications", "Dark mode"). Commits on toggle \u2014 no submit button needed. For selecting-from-a-list use Checkbox.',import:"@gradeui/ui",aliases:["toggle","switch","on/off switch","ios toggle","toggle switch","switch control","react native switch"],composesWith:["Label (via htmlFor)","Card (settings rows)"],props:{checked:{schema:z.boolean().optional(),design:"knob"},onCheckedChange:{schema:z.unknown().optional(),design:"event"},defaultChecked:{schema:z.boolean().optional(),design:"knob"},disabled:{schema:z.boolean().optional(),design:"knob"},id:{schema:z.string().optional(),design:"plumbing"}}};var Wn={name:"Table",description:"Structured tabular data \u2014 rows \xD7 columns with alignment requirements. NOT a layout grid \u2014 for that use div+Tailwind grid utilities. Keep to <100 rows; larger datasets need virtualisation (not in DS).",import:"@gradeui/ui",aliases:["table","table view","data table","datatable","grid view","data grid","rows and columns"],subcomponents:["TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],composesWith:["Card (wrap the table)","Badge (inside TableCell for status)","Checkbox (row selection)","Button (row actions)"],props:{Each:{schema:z.unknown(),design:"plumbing"},No:{schema:z.unknown(),design:"plumbing",description:"styling follows the active theme tokens"}}};var Un={name:"Tabs",description:'A small set of peer views within one surface (2\u20135 tabs). For primary nav use Side Menu/routing. For filters use a filter control, not tabs. Pick `variant="pill"` for app chrome (settings panels, in-card tab strips). Pick `variant="underlined"` for marketing/docs pages and browser-tab-style treatments.',import:"@gradeui/ui",aliases:["tabs","tab strip","tab bar","tab view","tabbed interface","pageviewcontroller","react native tab view","underlined tabs","page tabs","segment switcher","simple tabs"],subcomponents:["TabsList","TabsTrigger","TabsContent"],composesWith:["Card (tabs inside a card body)","Dialog","TooltipProvider (required for tooltip prop)"],props:{defaultValue:{schema:z.unknown().optional(),design:"plumbing"},size:{schema:z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"t-shirt scale aligned with Button/ToggleGroup heights; cascades to every TabsTrigger via context so set it once on the list"},variant:{schema:z.enum(["pill","underlined, default pill"]).optional(),design:"knob",description:"`pill` is the shadcn chip-on-muted look; `underlined` is the minimal text + bottom-border treatment (formerly the separate SimpleTabs component, collapsed into Tabs in May 2026). Cascades to triggers."},value:{schema:z.string(),design:"content",description:"matches a TabsContent value; tooltip?: string \u2014 when set, wraps the trigger in the design-system Tooltip and auto-applies aria-label (useful for icon-only triggers); requires a TooltipProvider somewhere above the tabs"}}};var $n={name:"Textarea",description:"Multi-line text entry (descriptions, messages, comments). Pair with a Label. Single-line input \u2192 use Input instead.",import:"@gradeui/ui",aliases:["text area","multiline","comment box","message field","text editor","multi-line text","multiline input","multiline text field","comments box","multiline textinput"],composesWith:["Label","Form","Card (in CardContent)"],props:{}};var jn={name:"ThreeScene",description:"WebGL primitive for shader backgrounds, generative visuals, and bespoke three.js scenes. Three authoring paths, in order of preference \u2014 (1) pick a `preset` id; (2) if nothing in the registry fits, write a `fragmentShader` against the fixed uniform contract; (3) only as a last resort, pass a full `createScene` factory. For looping video, use VideoPlayer; for interactive animations, use RivePlayer.",import:"@gradeui/ui",aliases:["three","threejs","webgl","shader","scene","3d","generative","hero background","fragment shader","glsl"],composesWith:["MediaSurface (internal)","foreground content stacked above with `position: absolute/relative z-10`"],props:{preset:{schema:z.enum(["space","plasma","voronoi","synthwave"]).optional(),design:"knob",description:"shader preset id from the registry"},fragmentShader:{schema:z.string().optional(),design:"content",description:"user-authored GLSL body; takes precedence over preset"},onShaderError:{schema:z.unknown().optional(),design:"event",description:'fires on compile failure; scene falls back to `preset="space"`'},postPreset:{schema:z.enum(["none","vhs","cinematic","synthwave","crt"]).optional(),design:"knob",description:"post-processing pass",default:"vhs"},palette:{schema:z.unknown().optional(),design:"plumbing",description:"any CSS-legal colour string per slot. Re-tints automatically when the theme changes. Unset slots fall back to defaults."},createScene:{schema:z.unknown().optional(),design:"plumbing",description:"custom full scene factory; takes precedence over preset AND fragmentShader"},controls:{schema:z.boolean().optional(),design:"knob",description:"play/pause overlay",default:false},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"respects reduced-motion",default:true},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",description:"big win for WebGL battery life",default:true},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},maxDpr:{schema:z.number().optional(),design:"knob",description:"lower for thumbnails / low-end devices"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",default:"lg"}}};var Kn={name:"Toast",description:'Transient, non-blocking feedback that confirms or warns about an action \u2014 "Saved", "Failed to upload", "Copied to clipboard", "Invitation sent". For permanent inline messages reach for Callout. For confirmations that block until acknowledged use Dialog. Mount <Toaster /> ONCE at the root of the app; everywhere else, call the `toast` helper.',import:"@gradeui/ui",aliases:["toast","toaster","sonner","notification","snackbar","alert toast","transient alert","transient banner","banner notification","toastandroid"],composesWith:["App root layout (single <Toaster /> mount)","Form submit handlers (success/error toasts)","Async actions"],props:{position:{schema:z.enum(["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]).optional(),design:"knob",default:"bottom-right"},theme:{schema:z.enum(["light","dark","system"]).optional(),design:"knob"},richColors:{schema:z.boolean().optional(),design:"knob",description:"colored variants for success/error/warning/info"},expand:{schema:z.boolean().optional(),design:"knob",description:"keep multiple toasts visually separated rather than stacked"},visibleToasts:{schema:z.number().optional(),design:"knob",description:"max concurrent toasts on screen (default 3)"},duration:{schema:z.number().optional(),design:"knob",description:"default ms before auto-dismiss"}}};var qn={name:"Toggle",description:`A standalone on/off button \u2014 Bold/Italic in a toolbar, "Show grid" in a header, single binary toggle that doesn't belong inside a Switch row. For two-or-more mutually-exclusive options use ToggleGroup. For a labeled settings switch ("Active: on/off") use Switch.`,import:"@gradeui/ui",aliases:["toggle","toggle button","press button","bold button","italic button"],composesWith:["Tooltip (wrap an icon-only Toggle)","Row","TabsList (sibling)"],props:{variant:{schema:z.enum(["default","outline"]).optional(),design:"knob",description:"outline adds a border, default is borderless and ghost-like"},size:{schema:z.enum(["default","sm","lg"]).optional(),design:"knob"},pressed:{schema:z.boolean().optional(),design:"knob",description:"controlled pressed state"},defaultPressed:{schema:z.boolean().optional(),design:"knob",description:"uncontrolled initial state"},onPressedChange:{schema:z.unknown().optional(),design:"event"},disabled:{schema:z.boolean().optional(),design:"knob"},children:{schema:z.unknown(),design:"plumbing",description:"usually an icon or short label"}}};var Yn={name:"ToggleGroup",description:'A small set of mutually-exclusive (`type="single"`) or independent (`type="multiple"`) binary options that live side-by-side as a segmented control \u2014 viewport size picker (Mobile/Tablet/Desktop), text alignment, view density. Reads identically to a TabsList of the same size; reach for ToggleGroup when each option emits a value (like a form input) rather than swapping panels. Use Tabs for panel switching, Toggle for a single on/off.',import:"@gradeui/ui",aliases:["toggle group","segmented control","segmented buttons","button group","pill group","view selector","segmented picker","segmentedcontrolios","segmented buttons group","rn segmented control"],subcomponents:["ToggleGroupItem"],composesWith:["Card (header controls)","Row","AppShellHeader chrome","settings panels"],props:{type:{schema:z.enum(["single","multiple"]),design:"knob",description:"single picks one, multiple picks any number"},value:{schema:z.string().optional(),design:"content",description:"controlled; matches `type` (string for single, string[] for multiple)"},defaultValue:{schema:z.string().optional(),design:"content",description:"uncontrolled initial"},onValueChange:{schema:z.unknown().optional(),design:"event"},size:{schema:z.enum(["sm","md","lg, default md"]).optional(),design:"knob",description:"cascades to every ToggleGroupItem via context, matches Tabs/Button heights"},variant:{schema:z.enum(["default","outline"]).optional(),design:"knob"},tooltip:{schema:z.unknown().optional(),design:"plumbing",description:"when set, wraps the item in a Tooltip; required for icon-only items where the visible chrome doesn't carry a label"},tooltipSide:{schema:z.enum(["top","right","bottom",'left", default "top']).optional(),design:"knob",description:"side the tooltip renders on"},tooltipDelay:{schema:z.number().optional(),design:"knob",description:"per-item delay override; falls back to the upstream TooltipProvider's delayDuration"}}};var Zn={name:"Toolbar",description:`ANY three-region chrome bar \u2014 the leading/center/trailing pattern Apple HIG
36
36
  describes as a "Toolbar." App window chrome (Reddit, Twitter, GitHub, Linear,
37
37
  most desktop apps), section toolbars inside Cards or panels, bottom action
38
38
  bars on mobile layouts, persistent footer toolbars.
@@ -60,9 +60,18 @@ Use directly inside a Card or page section for section-scoped toolbars:
60
60
  <Card>
61
61
  <Toolbar size="sm" variant="subtle" leading={...} trailing={...} />
62
62
  {content}
63
- </Card>`,import:"@gradeui/ui",subcomponents:["ToolbarSlot"],composesWith:["Button","Avatar","Input","Logo","Badge","AppShellHeader","Card","Row","Stack"],props:{leading:{schema:z.unknown().optional(),design:"plumbing",description:"left-aligned region (logo + primary nav)"},center:{schema:z.unknown().optional(),design:"plumbing",description:"center region (search, page title, segmented control)"},trailing:{schema:z.unknown().optional(),design:"plumbing",description:"right-aligned region (action icons, avatar, primary CTA)"},children:{schema:z.unknown().optional(),design:"plumbing",description:"escape hatch; bypasses slot layout"},position:{schema:z.enum(["top","bottom","inline"]).optional(),design:"knob",description:"border placement",default:"top"},variant:{schema:z.enum(["default","subtle","transparent"]).optional(),design:"knob",default:"default"},size:{schema:z.enum(["sm","md","lg"]).optional(),design:"knob",description:"height + padding",default:"md"},sticky:{schema:z.boolean().optional(),design:"knob",description:"pin to top/bottom of scroll container",default:false},"aria-label":{schema:z.string().optional(),design:"content",description:"required by WAI-ARIA toolbar pattern",default:"Toolbar"},className:{schema:z.string().optional(),design:"plumbing"}}};var Tn={name:"Tooltip",description:"A short, non-essential label that explains a control on hover/focus \u2014 icon-only buttons in toolbars, abbreviated column headers, status dots. NEVER hide critical info inside a tooltip \u2014 they're invisible on touch and can be skipped by screen readers if implemented carelessly. For richer hover content use HoverCard. For inline help text that's always visible, use a description paragraph.",import:"@gradeui/ui",aliases:["tooltip","tip","hover tip","hint","label on hover","help tag","hint","helper text bubble","info tip"],subcomponents:["TooltipTrigger","TooltipContent","TooltipProvider"],composesWith:["Button (icon-only)","Toggle","TabsTrigger (the canonical tabs already have a `tooltip` prop that wraps this)","Avatar (status badge meaning)"],props:{delayDuration:{schema:z.number().optional(),design:"knob",description:"ms hover before show; mount ONCE near the app root"},skipDelayDuration:{schema:z.number().optional(),design:"knob",description:'ms gap that still feels like "same hover"'},open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually wraps a Button or icon"},side:{schema:z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob",default:"top"}}};var Pn={name:"VideoPlayer",description:"HTML5 video wrapped in the shared media surface. Controls-on for a standard player, controls-off (+ autoplay/muted/loop) for hero / background video. Prefer Rive for anything interactive, Three Scene for shader backgrounds.",import:"@gradeui/ui",aliases:["video","mp4","movie","webm","clip","video view","av player","react native video","video element"],composesWith:["MediaSurface (internal)","Card (wrap for thumbnail grids)"],props:{src:{schema:z.string(),design:"content",description:"video URL"},controls:{schema:z.boolean().optional(),design:"knob",description:"show native controls; false for chromeless hero/background video",default:true},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"forces muted=true (browser restriction)",default:false},loop:{schema:z.boolean().optional(),design:"knob",default:false},muted:{schema:z.boolean().optional(),design:"knob",default:false},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",description:"pause when scrolled out of viewport",default:true},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"driven by `--gds-media-radius`",default:"lg"},objectFit:{schema:z.enum(["cover","contain","fill"]).optional(),design:"knob",default:"cover"},poster:{schema:z.string().optional(),design:"content",description:'image shown before playback. Always rendered as a `loading="lazy"` `<img>` overlay (not the native `poster` attribute, which fetches eagerly).'},playbackRate:{schema:z.number().optional(),design:"knob"}}};var kr={Accordion:Ca,AiChat:ka,AiChatComposer:Ta,AppShell:Pa,Avatar:Ma,Badge:Ea,Breadcrumb:La,Button:Ha,Calendar:Da,Callout:Aa,Card:Fa,Carousel:za,Chart:Ba,Checkbox:Ga,Collapsible:Oa,Command:Va,DatePicker:_a,Dialog:Wa,DropdownMenu:$a,Flex:Ua,Grid:ja,HoverCard:Ka,Input:qa,Label:Ya,Map:Za,MediaSurface:xr,MultiSelect:Xa,Popover:Ja,Progress:Qa,RadioGroup:en,Resizable:tn,RivePlayer:on,Row:rn,ScrollArea:an,Select:nn,Separator:sn,ShaderPresetPicker:ln,ShaderPresetPreview:dn,Sheet:cn,Sidebar:pn,Skeleton:mn,Slider:un,Sortable:gn,Stack:fn,Switch:hn,Table:vn,Tabs:yn,Textarea:wn,ThreeScene:xn,Toast:Rn,Toggle:Sn,ToggleGroup:Cn,Toolbar:kn,Tooltip:Tn,VideoPlayer:Pn};function Xl(e){return e?kr[e]??null:null}function Jl(){return Object.keys(kr)}function n(...e){return twMerge(clsx(e))}var od=Be.Root,Mn=w.forwardRef(({className:e,...t},o)=>w.createElement(Be.Item,{ref:o,className:n("border-b",e),...t}));Mn.displayName="AccordionItem";var Nn=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(Be.Header,{className:"flex"},w.createElement(Be.Trigger,{ref:r,className:n("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o},t,w.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));Nn.displayName=Be.Trigger.displayName;var En=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(Be.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o},w.createElement("div",{className:n("pb-4 pt-0",e)},t)));En.displayName=Be.Content.displayName;var Ln=cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{default:"bg-background text-foreground [&>svg]:text-foreground",destructive:"border-destructive/30 bg-destructive-soft text-destructive-deep [&>svg]:text-destructive-deep",success:"border-success/30 bg-success-soft text-success-deep [&>svg]:text-success-deep",warning:"border-warning/30 bg-warning-soft text-warning-deep [&>svg]:text-warning-deep",info:"border-info/30 bg-info-soft text-info-deep [&>svg]:text-info-deep"}},defaultVariants:{variant:"default"}}),ad={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status"},Hn=w.forwardRef(({className:e,variant:t,role:o,...r},i)=>w.createElement("div",{ref:i,role:o??ad[t??"default"],"data-gds-part":"callout",className:n(Ln({variant:t}),e),...r}));Hn.displayName="Callout";var Dn=w.forwardRef(({className:e,...t},o)=>w.createElement("h5",{ref:o,"data-gds-part":"callout-title",className:n("mb-1 font-medium leading-none tracking-tight",e),...t}));Dn.displayName="CalloutTitle";var An=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"callout-description",className:n("text-sm [&_p]:leading-relaxed",e),...t}));An.displayName="CalloutDescription";var In=cva("gds-app-shell min-h-screen w-full bg-background text-foreground grid",{variants:{nav:{none:"",top:"",side:"","three-pane":""}},defaultVariants:{nav:"none"}}),Fn=cva("gds-app-shell-header",{variants:{sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{sticky:false}}),zn=cva("gds-app-shell-nav",{variants:{placement:{top:"border-b bg-background",side:"border-r bg-background",none:"hidden"},sticky:{true:"",false:""}},compoundVariants:[{placement:"top",sticky:true,className:"sticky top-0 z-30"},{placement:"side",sticky:true,className:"sticky top-0 h-screen self-start"}],defaultVariants:{placement:"top",sticky:true}}),Bn=cva("gds-app-shell-aside min-w-0 border-r bg-background",{variants:{sticky:{true:"sticky top-0 h-screen self-start",false:""}},defaultVariants:{sticky:false}}),Gn=cva("gds-app-shell-main min-w-0",{variants:{maxWidth:{full:"w-full",container:"w-full mx-auto max-w-7xl px-4 md:px-6 lg:px-8"}},defaultVariants:{maxWidth:"full"}}),On=cva("gds-app-shell-footer border-t bg-background"),Vn=w.forwardRef(({className:e,nav:t,asChild:o=false,...r},i)=>w.createElement(o?Slot:"div",{ref:i,"data-gds-part":"app-shell","data-nav":t??"none",className:n(In({nav:t,className:e})),...r}));Vn.displayName="AppShell";var _n=w.forwardRef(({className:e,sticky:t,asChild:o=false,...r},i)=>w.createElement(o?Slot:"header",{ref:i,"data-gds-part":"app-shell-header",className:n(Fn({sticky:t,className:e})),...r}));_n.displayName="AppShellHeader";var Wn=w.forwardRef(({className:e,placement:t,sticky:o,asChild:r=false,...i},a)=>w.createElement(r?Slot:"nav",{ref:a,"data-gds-part":"app-shell-nav","data-placement":t??"top",className:n(zn({placement:t,sticky:o,className:e})),...i}));Wn.displayName="AppShellNav";var $n=w.forwardRef(({className:e,sticky:t,asChild:o=false,...r},i)=>w.createElement(o?Slot:"aside",{ref:i,"data-gds-part":"app-shell-aside",className:n(Bn({sticky:t,className:e})),...r}));$n.displayName="AppShellAside";var Un=w.forwardRef(({className:e,maxWidth:t,asChild:o=false,...r},i)=>w.createElement(o?Slot:"main",{ref:i,"data-gds-part":"app-shell-main",className:n(Gn({maxWidth:t,className:e})),...r}));Un.displayName="AppShellMain";var jn=w.forwardRef(({className:e,asChild:t=false,...o},r)=>w.createElement(t?Slot:"footer",{ref:r,"data-gds-part":"app-shell-footer",className:n(On({className:e})),...o}));jn.displayName="AppShellFooter";var Kn=w.forwardRef(({className:e,...t},o)=>w.createElement(nt.Root,{ref:o,className:n("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Kn.displayName=nt.Root.displayName;var qn=w.forwardRef(({className:e,...t},o)=>w.createElement(nt.Image,{ref:o,className:n("aspect-square h-full w-full",e),...t}));qn.displayName=nt.Image.displayName;var Yn=w.forwardRef(({className:e,...t},o)=>w.createElement(nt.Fallback,{ref:o,className:n("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Yn.displayName=nt.Fallback.displayName;var Xn=cva("inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",highlight:"border-transparent bg-gds-yellow-400 text-gds-gray-900 shadow hover:bg-gds-yellow-500",success:"border-transparent bg-gds-green-500 text-gds-gray-900 shadow hover:bg-gds-green-600",warning:"border-transparent bg-orange-500 text-white shadow hover:bg-orange-600",info:"border-transparent bg-blue-500 text-white shadow hover:bg-blue-600","success-soft":"border-gds-green-500/20 bg-gds-green-500/10 text-gds-green-600 dark:text-gds-green-400","warning-soft":"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400","destructive-soft":"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-400","info-soft":"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400","highlight-soft":"border-gds-yellow-500/20 bg-gds-yellow-400/10 text-gds-yellow-600 dark:text-gds-yellow-400","success-outline":"border-gds-green-500/50 bg-transparent text-gds-green-600 dark:text-gds-green-400","warning-outline":"border-orange-500/50 bg-transparent text-orange-600 dark:text-orange-400","destructive-outline":"border-destructive/50 bg-transparent text-destructive dark:text-red-400","info-outline":"border-blue-500/50 bg-transparent text-blue-600 dark:text-blue-400"},rounded:{default:"rounded-md",full:"rounded-full"}},defaultVariants:{variant:"default",rounded:"default"}});function Vo({className:e,variant:t,rounded:o,...r}){return w.createElement("div",{className:n(Xn({variant:t,rounded:o}),e),...r})}var so=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",raised:"gds-button-raised"},size:{sm:"h-7 gap-1.5 px-2.5 text-xs [&_svg]:size-3.5",md:"h-8 gap-1.5 px-3 text-xs [&_svg]:size-3.5",default:"h-8 gap-1.5 px-3 text-xs [&_svg]:size-3.5",lg:"h-10 gap-2 px-4 text-sm [&_svg]:size-4",icon:"h-8 w-8 [&_svg]:size-3.5"}},defaultVariants:{variant:"default",size:"md"}}),xe=w.forwardRef(({className:e,variant:t,size:o,asChild:r=false,...i},a)=>w.createElement(r?Slot:"button",{"data-gds-part":"button",className:n("gds-button",so({variant:t,size:o,className:e})),ref:a,...i}));xe.displayName="Button";function Wo({className:e,classNames:t,showOutsideDays:o=true,captionLayout:r="label",buttonVariant:i="ghost",formatters:a,components:d,...m}){let s=getDefaultClassNames();return w.createElement(DayPicker,{showOutsideDays:o,className:n("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:c=>c.toLocaleString("default",{month:"short"}),...a},classNames:{root:n("w-fit",s.root),months:n("relative flex flex-col gap-4 md:flex-row",s.months),month:n("flex w-full flex-col gap-4",s.month),nav:n("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",s.nav),button_previous:n(so({variant:i}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_previous),button_next:n(so({variant:i}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_next),month_caption:n("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",s.month_caption),dropdowns:n("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",s.dropdowns),dropdown_root:n("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",s.dropdown_root),dropdown:n("bg-popover absolute inset-0 opacity-0",s.dropdown),caption_label:n("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",s.caption_label),table:"w-full border-collapse",weekdays:n("flex",s.weekdays),weekday:n("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",s.weekday),week:n("mt-2 flex w-full",s.week),week_number_header:n("w-[--cell-size] select-none",s.week_number_header),week_number:n("text-muted-foreground select-none text-[0.8rem]",s.week_number),day:n("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",s.day),range_start:n("bg-accent rounded-l-md",s.range_start),range_middle:n("rounded-none",s.range_middle),range_end:n("bg-accent rounded-r-md",s.range_end),today:n("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",s.today),outside:n("text-muted-foreground aria-selected:text-muted-foreground",s.outside),disabled:n("text-muted-foreground opacity-50",s.disabled),hidden:n("invisible",s.hidden),...t},components:{Root:({className:c,rootRef:l,...p})=>w.createElement("div",{"data-slot":"calendar",ref:l,className:n(c),...p}),Chevron:({className:c,orientation:l,...p})=>l==="left"?w.createElement(ChevronLeftIcon,{className:n("size-4",c),...p}):l==="right"?w.createElement(ChevronRightIcon,{className:n("size-4",c),...p}):w.createElement(ChevronDownIcon,{className:n("size-4",c),...p}),DayButton:Qn,WeekNumber:({children:c,...l})=>w.createElement("td",{...l},w.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},c)),...d},...m})}function Qn({className:e,day:t,modifiers:o,...r}){let i=getDefaultClassNames(),a=w.useRef(null);return w.useEffect(()=>{o.focused&&a.current?.focus();},[o.focused]),w.createElement(xe,{ref:a,variant:"ghost",size:"icon","data-day":`${t.date.getFullYear()}-${String(t.date.getMonth()+1).padStart(2,"0")}-${String(t.date.getDate()).padStart(2,"0")}`,"data-selected-single":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:n("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",i.day,e),...r})}var Tr=w.createContext(null);function po(e){let t=w.useContext(Tr);if(!t)throw new Error(`<${e}> must be rendered inside a <Carousel> root.`);return t}var fd=5e3,gt=w.forwardRef(({loop:e=true,align:t="start",slidesPerView:o=1,autoplay:r=false,draggable:i=true,onSlideChange:a,className:d,style:m,children:s,...c},l)=>{let p=w.useMemo(()=>({loop:e,align:t,slidesToScroll:1,watchDrag:i,containScroll:e?false:"trimSnaps"}),[e,t,i]),[g,u]=md(p),[b,f]=w.useState(0),[h,P]=w.useState(0),[S,R]=w.useState(false),[C,k]=w.useState(false),B=w.useRef(new Map),H=w.useRef(a);H.current=a;let I=w.useMemo(()=>r?r===true?{}:r:null,[r]);w.useEffect(()=>{if(!u)return;let v=()=>{f(u.selectedScrollSnap()),P(u.scrollSnapList().length),R(u.canScrollPrev()),k(u.canScrollNext()),H.current?.(u.selectedScrollSnap());};return v(),u.on("select",v),u.on("reInit",v),()=>{u.off("select",v),u.off("reInit",v);}},[u]);let V=w.useCallback(v=>{u&&u.selectedScrollSnap()===v&&u.scrollNext();},[u]),Pe=w.useRef(false),ee=w.useRef(true),ye=w.useRef(null);w.useImperativeHandle(l,()=>ye.current),w.useEffect(()=>{if(!I?.pauseWhenOffscreen){ee.current=true;return}let v=ye.current;if(!v||typeof IntersectionObserver>"u")return;let O=new IntersectionObserver(D=>{ee.current=D.some(te=>te.isIntersecting);},{threshold:.25});return O.observe(v),()=>O.disconnect()},[I?.pauseWhenOffscreen]),w.useEffect(()=>{if(!u||!I)return;let v=null,O=()=>{v&&clearTimeout(v);let fe=u.selectedScrollSnap(),ne=B.current.get(fe)??I.delay??fd;v=setTimeout(()=>{if(Pe.current||!ee.current){O();return}u.scrollNext();},ne);},D=()=>O(),te=()=>{v&&clearTimeout(v);},Me=()=>O();return u.on("select",D),u.on("pointerDown",te),u.on("settle",Me),O(),()=>{v&&clearTimeout(v),u.off("select",D),u.off("pointerDown",te),u.off("settle",Me);}},[u,I]);let G=()=>{I?.pauseOnHover!==false&&(Pe.current=true);},ge=()=>{Pe.current=false;},Ae=w.useMemo(()=>({api:u,selectedIndex:b,slideCount:h,canScrollPrev:S,canScrollNext:C,durationsRef:B,advanceFromSlide:V}),[u,b,h,S,C,V]),we=`calc(100% / ${o})`;return w.createElement(Tr.Provider,{value:Ae},w.createElement("div",{ref:ye,"data-gds-part":"carousel",className:n("relative",d),style:{"--gds-carousel-slide-basis":we,...m},onMouseEnter:G,onMouseLeave:ge,...c},w.createElement("div",{ref:g,"data-gds-part":"carousel-viewport",className:"overflow-hidden",style:{borderRadius:"var(--gds-carousel-radius, var(--gds-media-radius, 0.5rem))"}},w.createElement("div",{"data-gds-part":"carousel-track",className:"flex",style:{gap:"var(--gds-carousel-gap, 0)",touchAction:"pan-y pinch-zoom"}},s))))});gt.displayName="Carousel";var $o=w.forwardRef(({duration:e,className:t,style:o,children:r,...i},a)=>{let{durationsRef:d}=po("Carousel.Slide"),m=w.useRef(null);return w.useImperativeHandle(a,()=>m.current),w.useEffect(()=>{if(e==null)return;let s=m.current;if(!s?.parentElement)return;let c=Array.from(s.parentElement.children).indexOf(s);if(c<0)return;let l=d.current;return l.set(c,e),()=>{l.delete(c);}},[e,d]),w.createElement("div",{ref:m,"data-gds-part":"carousel-slide",className:n("min-w-0 shrink-0 grow-0",t),style:{flexBasis:"var(--gds-carousel-slide-basis, 100%)",...o},...i},r)});$o.displayName="Carousel.Slide";var Pr=w.forwardRef(({src:e,poster:t,alt:o,controls:r=false,loop:i=true,fit:a="cover",duration:d,className:m,style:s,...c},l)=>{let{api:p,selectedIndex:g,advanceFromSlide:u}=po("Carousel.VideoSlide"),b=w.useRef(null),f=w.useRef(null);w.useImperativeHandle(l,()=>b.current);let[h,P]=w.useState(null);w.useEffect(()=>{let R=b.current;R?.parentElement&&P(Array.from(R.parentElement.children).indexOf(R));},[p]);let S=h!=null&&h===g;return w.useEffect(()=>{let R=f.current;if(R)if(S){let C=R.play();C&&typeof C.catch=="function"&&C.catch(()=>{});}else R.pause(),R.currentTime=0;},[S]),w.createElement($o,{ref:b,duration:d,className:n("relative overflow-hidden bg-[var(--gds-media-placeholder-bg)]",m),style:s,"data-gds-part":"carousel-video-slide",...c},t&&w.createElement("img",{src:t,alt:o??"","aria-hidden":S,className:"absolute inset-0 h-full w-full",style:{objectFit:a,opacity:S?0:1,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"}}),w.createElement("video",{ref:f,src:e,muted:true,playsInline:true,loop:i,controls:r,preload:"metadata","aria-label":o,className:"block h-full w-full",style:{objectFit:a,opacity:S?1:0,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"},onEnded:()=>{i||h!=null&&u(h);}}))});Pr.displayName="Carousel.VideoSlide";var Mr=w.forwardRef(({position:e="below",renderDot:t,className:o,style:r,...i},a)=>{let{api:d,selectedIndex:m,slideCount:s}=po("Carousel.Dots");if(s<=1)return null;let c=Array.from({length:s},(p,g)=>g),l=e==="overlay"?{position:"absolute",insetInlineStart:0,insetInlineEnd:0,bottom:"var(--gds-carousel-dots-inset, 0.75rem)",zIndex:1}:{marginBlockStart:"var(--gds-carousel-dots-gap, 0.75rem)"};return w.createElement("div",{ref:a,"data-gds-part":"carousel-dots",className:n("flex items-center justify-center",o),style:{gap:"var(--gds-carousel-dots-spacing, 0.5rem)",...l,...r},...i},c.map(p=>{let g=p===m,u=()=>d?.scrollTo(p);return t?t({index:p,active:g,onClick:u}):w.createElement("button",{key:p,type:"button",onClick:u,"aria-label":`Go to slide ${p+1}`,"aria-current":g?"true":void 0,"data-active":g||void 0,className:"rounded-full transition-all",style:{width:g?"var(--gds-carousel-dot-active-width, 1.25rem)":"var(--gds-carousel-dot-size, 0.5rem)",height:"var(--gds-carousel-dot-size, 0.5rem)",background:g?"var(--gds-carousel-dot-active-color, oklch(var(--primary)))":"var(--gds-carousel-dot-color, oklch(var(--muted-foreground) / 0.4))"}})}))});Mr.displayName="Carousel.Dots";var Nr=w.forwardRef(({position:e="overlay",className:t,style:o,...r},i)=>e==="outside"?w.createElement("div",{ref:i,"data-gds-part":"carousel-arrows",className:n("flex items-center justify-end gap-2 pt-2",t),style:o,...r},w.createElement(lo,null),w.createElement(co,null)):w.createElement("div",{ref:i,"data-gds-part":"carousel-arrows",className:n("pointer-events-none absolute inset-0 z-[1]",t),style:o,...r},w.createElement(lo,{className:"pointer-events-auto absolute left-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"}),w.createElement(co,{className:"pointer-events-auto absolute right-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"})));Nr.displayName="Carousel.Arrows";var lo=w.forwardRef(({className:e,style:t,children:o,...r},i)=>{let{api:a,canScrollPrev:d}=po("Carousel.Prev");return w.createElement("button",{ref:i,type:"button","data-gds-part":"carousel-prev","aria-label":"Previous slide",disabled:!d,onClick:()=>a?.scrollPrev(),className:n("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??w.createElement(ChevronLeft,{className:"h-4 w-4","aria-hidden":true}))});lo.displayName="Carousel.Prev";var co=w.forwardRef(({className:e,style:t,children:o,...r},i)=>{let{api:a,canScrollNext:d}=po("Carousel.Next");return w.createElement("button",{ref:i,type:"button","data-gds-part":"carousel-next","aria-label":"Next slide",disabled:!d,onClick:()=>a?.scrollNext(),className:n("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??w.createElement(ChevronRight,{className:"h-4 w-4","aria-hidden":true}))});co.displayName="Carousel.Next";gt.Slide=$o;gt.VideoSlide=Pr;gt.Dots=Mr;gt.Arrows=Nr;gt.Prev=lo;gt.Next=co;var hd=gt;function bd(){return w.useContext(Tr)?.api}var ei=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card",className:n("gds-card rounded-xl border bg-card text-card-foreground shadow",e),...t}));ei.displayName="Card";var ti=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-header",className:n("flex flex-col space-y-1.5 p-6",e),...t}));ti.displayName="CardHeader";var oi=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-title",className:n("font-semibold leading-none tracking-tight",e),...t}));oi.displayName="CardTitle";var ri=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-description",className:n("text-sm text-muted-foreground",e),...t}));ri.displayName="CardDescription";var ai=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-content",className:n("p-6 pt-0",e),...t}));ai.displayName="CardContent";var ni=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-footer",className:n("flex items-center p-6 pt-0",e),...t}));ni.displayName="CardFooter";var ii=w.forwardRef(({className:e,...t},o)=>w.createElement(mo.Root,{ref:o,className:n("gds-checkbox peer h-4 w-4 shrink-0 rounded-[3px] border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t},w.createElement(mo.Indicator,{className:n("flex items-center justify-center text-current")},w.createElement(Check,{className:"h-4 w-4"}))));ii.displayName=mo.Root.displayName;var Je=Ue.Root,Qe=Ue.Trigger,yd=Ue.Anchor,je=w.forwardRef(({className:e,align:t="center",sideOffset:o=4,...r},i)=>w.createElement(Ue.Portal,null,w.createElement(Ue.Content,{ref:i,align:t,sideOffset:o,className:n("z-50 w-72 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 origin-[--radix-popover-content-transform-origin]",e),...r})));je.displayName=Ue.Content.displayName;var wd="PPP",xd="LLL dd, y";function Rd({value:e,onChange:t,placeholder:o="Pick a date",disabled:r,className:i,contentClassName:a,align:d="start",side:m,format:s=wd,captionLayout:c,icon:l,"aria-label":p}){return w.createElement(Je,null,w.createElement(Qe,{asChild:true},w.createElement(xe,{type:"button",variant:"outline",disabled:r,"aria-label":p??(e?void 0:o),"data-empty":!e,className:n("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",i)},l??w.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?format(e,s):w.createElement("span",null,o))),w.createElement(je,{className:n("w-auto p-0",a),align:d,side:m},w.createElement(Wo,{mode:"single",selected:e,onSelect:t,captionLayout:c,initialFocus:true})))}function Sd({value:e,onChange:t,placeholder:o="Pick a date range",disabled:r,className:i,contentClassName:a,align:d="start",side:m,format:s=xd,captionLayout:c,icon:l,numberOfMonths:p=2,"aria-label":g}){let u=!!e?.from;return w.createElement(Je,null,w.createElement(Qe,{asChild:true},w.createElement(xe,{type:"button",variant:"outline",disabled:r,"aria-label":g??(u?void 0:o),"data-empty":!u,className:n("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",i)},l??w.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?w.createElement(w.Fragment,null,format(e.from,s)," \u2013"," ",format(e.to,s)):format(e.from,s):w.createElement("span",null,o))),w.createElement(je,{className:n("w-auto p-0",a),align:d,side:m},w.createElement(Wo,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:p,captionLayout:c,initialFocus:true})))}var kd=X.Root,Td=X.Trigger,li=X.Portal,Pd=X.Close,Er=w.forwardRef(({className:e,...t},o)=>w.createElement(X.Overlay,{ref:o,className:n("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Er.displayName=X.Overlay.displayName;var di=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(li,null,w.createElement(Er,null),w.createElement(X.Content,{ref:r,className:n("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...o},t,w.createElement(X.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},w.createElement(X$1,{className:"h-4 w-4"}),w.createElement("span",{className:"sr-only"},"Close")))));di.displayName=X.Content.displayName;var ci=({className:e,...t})=>w.createElement("div",{className:n("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ci.displayName="DialogHeader";var pi=({className:e,...t})=>w.createElement("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});pi.displayName="DialogFooter";var mi=w.forwardRef(({className:e,...t},o)=>w.createElement(X.Title,{ref:o,className:n("text-lg font-semibold leading-none tracking-tight",e),...t}));mi.displayName=X.Title.displayName;var ui=w.forwardRef(({className:e,...t},o)=>w.createElement(X.Description,{ref:o,className:n("text-sm text-muted-foreground",e),...t}));ui.displayName=X.Description.displayName;var Ld=A.Root,Hd=A.Trigger,Dd=A.Group,Ad=A.Portal,Id=A.Sub,Fd=A.RadioGroup,gi=w.forwardRef(({className:e,inset:t,children:o,...r},i)=>w.createElement(A.SubTrigger,{ref:i,className:n("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r},o,w.createElement(ChevronRight,{className:"ml-auto"})));gi.displayName=A.SubTrigger.displayName;var fi=w.forwardRef(({className:e,...t},o)=>w.createElement(A.SubContent,{ref:o,className:n("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));fi.displayName=A.SubContent.displayName;var hi=w.forwardRef(({className:e,sideOffset:t=4,...o},r)=>w.createElement(A.Portal,null,w.createElement(A.Content,{ref:r,sideOffset:t,className:n("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","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 origin-[--radix-dropdown-menu-content-transform-origin]",e),...o})));hi.displayName=A.Content.displayName;var bi=w.forwardRef(({className:e,inset:t,...o},r)=>w.createElement(A.Item,{ref:r,className:n("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));bi.displayName=A.Item.displayName;var vi=w.forwardRef(({className:e,children:t,checked:o,...r},i)=>w.createElement(A.CheckboxItem,{ref:i,className:n("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r},w.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},w.createElement(A.ItemIndicator,null,w.createElement(Check,{className:"h-4 w-4"}))),t));vi.displayName=A.CheckboxItem.displayName;var yi=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(A.RadioItem,{ref:r,className:n("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},w.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},w.createElement(A.ItemIndicator,null,w.createElement(Circle,{className:"h-2 w-2 fill-current"}))),t));yi.displayName=A.RadioItem.displayName;var wi=w.forwardRef(({className:e,inset:t,...o},r)=>w.createElement(A.Label,{ref:r,className:n("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));wi.displayName=A.Label.displayName;var xi=w.forwardRef(({className:e,...t},o)=>w.createElement(A.Separator,{ref:o,className:n("-mx-1 my-1 h-px bg-muted",e),...t}));xi.displayName=A.Separator.displayName;var Ri=({className:e,...t})=>w.createElement("span",{className:n("ml-auto text-xs tracking-widest opacity-60",e),...t});Ri.displayName="DropdownMenuShortcut";var Bd=cva("flex w-full rounded-md border border-input bg-transparent shadow-sm transition-colors file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{default:"h-9 pl-3 pr-3 py-1 text-base file:text-sm md:text-sm",sm:"h-8 pl-2 pr-2 py-1 text-xs file:text-xs"}},defaultVariants:{size:"default"}}),Si=w.forwardRef(({className:e,type:t,size:o="default",...r},i)=>w.createElement("input",{type:t,className:n(Bd({size:o}),e),ref:i,...r}));Si.displayName="Input";var Od=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ci=w.forwardRef(({className:e,...t},o)=>w.createElement(Lr.Root,{ref:o,className:n(Od(),e),...t}));Ci.displayName=Lr.Root.displayName;var ki=w.forwardRef(({className:e,value:t,...o},r)=>w.createElement(fo.Root,{ref:r,className:n("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o},w.createElement(fo.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));ki.displayName=fo.Root.displayName;var Hr=w.forwardRef(({className:e,...t},o)=>w.createElement(Command,{ref:o,className:n("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Hr.displayName=Command.displayName;var Dr=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},w.createElement(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),w.createElement(Command.Input,{ref:o,className:n("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})));Dr.displayName=Command.Input.displayName;var Ar=w.forwardRef(({className:e,...t},o)=>w.createElement(Command.List,{ref:o,className:n("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Ar.displayName=Command.List.displayName;var Ir=w.forwardRef((e,t)=>w.createElement(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Ir.displayName=Command.Empty.displayName;var qo=w.forwardRef(({className:e,...t},o)=>w.createElement(Command.Group,{ref:o,className:n("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));qo.displayName=Command.Group.displayName;var Fr=w.forwardRef(({className:e,...t},o)=>w.createElement(Command.Separator,{ref:o,className:n("-mx-1 h-px bg-border",e),...t}));Fr.displayName=Command.Separator.displayName;var jt=w.forwardRef(({className:e,...t},o)=>w.createElement(Command.Item,{ref:o,className:n("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));jt.displayName=Command.Item.displayName;var ho=w.forwardRef(({className:e,orientation:t="horizontal",decorative:o=true,...r},i)=>w.createElement(zr.Root,{ref:i,decorative:o,orientation:t,className:n("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));ho.displayName=zr.Root.displayName;var Kd=3,Ti=w.forwardRef(function({options:t,value:o,defaultValue:r,onValueChange:i,placeholder:a="Select\u2026",searchPlaceholder:d="Search\u2026",emptyMessage:m="Nothing matches.",maxCount:s=Kd,searchable:c=true,badgeDismissible:l=true,disabled:p=false,modalPopover:g=false,className:u,id:b,"aria-label":f,...h},P){let S=o!==void 0,[R,C]=w.useState(r??[]),k=S?o:R,[B,H]=w.useState(false),I=w.useMemo(()=>{let v=new Map;for(let O of t)v.set(O.value,O);return v},[t]),V=w.useCallback(v=>{S||C(v),i?.(v);},[S,i]),Pe=v=>{k.includes(v)?V(k.filter(O=>O!==v)):V([...k,v]);},ee=(v,O)=>{v.preventDefault(),v.stopPropagation(),V(k.filter(D=>D!==O));},ye=v=>{v?.preventDefault(),v?.stopPropagation(),V([]);},G=()=>{let v=t.filter(O=>!O.disabled).map(O=>O.value);V(v);},ge=t.length>0&&t.filter(v=>!v.disabled).every(v=>k.includes(v.value)),Ae=k.slice(0,s),we=Math.max(0,k.length-s);return w.createElement(Je,{open:B,onOpenChange:H,modal:g},w.createElement(Qe,{asChild:true},w.createElement("button",{ref:P,type:"button",id:b,role:"combobox","aria-expanded":B,"aria-haspopup":"listbox","aria-label":f,disabled:p,"data-gds-part":"multi-select",className:n("flex min-h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent pl-2 pr-2 text-sm shadow-sm","ring-offset-background placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50","[&[data-state=open]]:ring-1 [&[data-state=open]]:ring-ring",u)},k.length===0?w.createElement("span",{className:"text-muted-foreground px-1"},a):w.createElement("div",{className:"flex flex-1 flex-wrap items-center gap-1 py-1","data-gds-part":"multi-select-badges"},Ae.map(v=>{let O=I.get(v);if(!O)return null;let D=O.icon;return w.createElement(Vo,{key:v,variant:"secondary",className:"gap-1 pr-1","data-gds-part":"multi-select-badge"},D?w.createElement(D,{className:"h-3 w-3"}):null,w.createElement("span",{className:"truncate max-w-[12rem]"},O.label),l&&!p&&w.createElement("span",{role:"button","aria-label":`Remove ${O.label}`,tabIndex:0,onClick:te=>ee(te,v),onKeyDown:te=>{(te.key==="Enter"||te.key===" ")&&ee(te,v);},className:"ml-0.5 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-sm hover:bg-muted-foreground/20"},w.createElement(X$1,{className:"h-3 w-3","aria-hidden":true})))}),we>0&&w.createElement(Vo,{variant:"outline",className:"text-muted-foreground","data-gds-part":"multi-select-overflow",title:k.slice(s).map(v=>I.get(v)?.label??v).join(", ")},"+",we," more")),w.createElement("div",{className:"flex shrink-0 items-center gap-1"},k.length>0&&!p&&w.createElement("span",{role:"button","aria-label":"Clear all",tabIndex:0,onClick:v=>ye(v),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&ye(v);},className:"inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-sm text-muted-foreground hover:text-foreground hover:bg-muted"},w.createElement(XCircle,{className:"h-3.5 w-3.5","aria-hidden":true})),w.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":true})))),w.createElement(je,{align:"start",className:"w-[var(--radix-popover-trigger-width)] p-0","data-gds-part":"multi-select-content"},w.createElement(Hr,null,c&&w.createElement(Dr,{placeholder:d}),w.createElement(Ar,null,w.createElement(Ir,null,m),w.createElement(qo,null,t.map(v=>{let O=v.icon,D=k.includes(v.value);return w.createElement(jt,{key:v.value,value:v.label,onSelect:()=>Pe(v.value),disabled:v.disabled,"data-gds-part":"multi-select-item","data-selected":D||void 0},w.createElement("div",{className:n("mr-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary",D?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),"aria-hidden":true},w.createElement(Check,{className:"h-3 w-3"})),O?w.createElement(O,{className:"mr-2 h-4 w-4 text-muted-foreground"}):null,w.createElement("span",{className:"truncate"},v.label))})),w.createElement(Fr,null),w.createElement(qo,null,w.createElement("div",{className:"flex items-center justify-between gap-1 p-1"},w.createElement(jt,{onSelect:G,className:"flex-1 justify-center text-xs",disabled:ge},"Select all"),w.createElement(ho,{orientation:"vertical",className:"h-5"}),w.createElement(jt,{onSelect:()=>ye(),className:"flex-1 justify-center text-xs",disabled:k.length===0},"Clear"),w.createElement(ho,{orientation:"vertical",className:"h-5"}),w.createElement(jt,{onSelect:()=>H(false),className:"flex-1 justify-center text-xs"},"Close")))))))});Ti.displayName="MultiSelect";var Pi=w.forwardRef(({className:e,...t},o)=>w.createElement(ht.Root,{className:n("grid gap-2",e),...t,ref:o}));Pi.displayName=ht.Root.displayName;var Mi=w.forwardRef(({className:e,...t},o)=>w.createElement(ht.Item,{ref:o,className:n("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t},w.createElement(ht.Indicator,{className:"flex items-center justify-center"},w.createElement(Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));Mi.displayName=ht.Item.displayName;var Zd=({className:e,...t})=>w.createElement(Kt.PanelGroup,{"data-gds-part":"resizable-panel-group",className:n("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),Xd=Kt.Panel,Jd=({withHandle:e,className:t,...o})=>w.createElement(Kt.PanelResizeHandle,{"data-gds-part":"resizable-handle",className:n("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...o},e&&w.createElement("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"},w.createElement(GripVertical,{className:"h-2.5 w-2.5"})));var Ni=cva("gds-row flex flex-row",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{true:"flex-wrap",false:"flex-nowrap"}},defaultVariants:{gap:"md",align:"center",justify:"start",wrap:false}}),Ei=w.forwardRef(({className:e,gap:t,align:o,justify:r,wrap:i,asChild:a=false,...d},m)=>w.createElement(a?Slot:"div",{ref:m,"data-gds-part":"row",className:n(Ni({gap:t,align:o,justify:r,wrap:i,className:e})),...d}));Ei.displayName="Row";var Li=cva("gds-grid grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",12:"grid-cols-4 md:grid-cols-6 lg:grid-cols-12"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}},defaultVariants:{cols:"3",gap:"md",align:"stretch"}}),Hi=w.forwardRef(({className:e,cols:t,gap:o,align:r,asChild:i=false,...a},d)=>w.createElement(i?Slot:"div",{ref:d,"data-gds-part":"grid",className:n(Li({cols:t,gap:o,align:r,className:e})),...a}));Hi.displayName="Grid";var Di=cva("gds-flex flex",{variants:{direction:{row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"}},defaultVariants:{direction:"row",gap:"none",align:"stretch",justify:"start",wrap:"nowrap"}}),Ai=w.forwardRef(({className:e,direction:t,gap:o,align:r,justify:i,wrap:a,asChild:d=false,...m},s)=>w.createElement(d?Slot:"div",{ref:s,"data-gds-part":"flex",className:n(Di({direction:t,gap:o,align:r,justify:i,wrap:a,className:e})),...m}));Ai.displayName="Flex";var Ii=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(Ge.Root,{ref:r,className:n("relative overflow-hidden",e),...o},w.createElement(Ge.Viewport,{className:"h-full w-full rounded-[inherit]"},t),w.createElement(Br,null),w.createElement(Ge.Corner,null)));Ii.displayName=Ge.Root.displayName;var Br=w.forwardRef(({className:e,orientation:t="vertical",...o},r)=>w.createElement(Ge.ScrollAreaScrollbar,{ref:r,orientation:t,className:n("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o},w.createElement(Ge.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));Br.displayName=Ge.ScrollAreaScrollbar.displayName;var lc=F.Root,dc=F.Group,cc=F.Value,pc=cva("flex w-full items-center justify-between rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",{variants:{size:{default:"h-10 px-3 py-2 text-sm",sm:"h-8 px-2 py-1 text-xs"}},defaultVariants:{size:"default"}}),zi=w.forwardRef(({className:e,children:t,size:o="default",...r},i)=>w.createElement(F.Trigger,{ref:i,className:n(pc({size:o}),e),...r},t,w.createElement(F.Icon,{asChild:true},w.createElement(ChevronDown,{className:n("opacity-50",o==="sm"?"h-3.5 w-3.5":"h-4 w-4")}))));zi.displayName=F.Trigger.displayName;var Gr=w.forwardRef(({className:e,...t},o)=>w.createElement(F.ScrollUpButton,{ref:o,className:n("flex cursor-default items-center justify-center py-1",e),...t},w.createElement(ChevronUp,{className:"h-4 w-4"})));Gr.displayName=F.ScrollUpButton.displayName;var Or=w.forwardRef(({className:e,...t},o)=>w.createElement(F.ScrollDownButton,{ref:o,className:n("flex cursor-default items-center justify-center py-1",e),...t},w.createElement(ChevronDown,{className:"h-4 w-4"})));Or.displayName=F.ScrollDownButton.displayName;var Bi=w.forwardRef(({className:e,children:t,position:o="popper",...r},i)=>w.createElement(F.Portal,null,w.createElement(F.Content,{ref:i,className:n("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...r},w.createElement(Gr,null),w.createElement(F.Viewport,{className:n("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),w.createElement(Or,null))));Bi.displayName=F.Content.displayName;var Gi=w.forwardRef(({className:e,...t},o)=>w.createElement(F.Label,{ref:o,className:n("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Gi.displayName=F.Label.displayName;var Oi=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(F.Item,{ref:r,className:n("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},w.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},w.createElement(F.ItemIndicator,null,w.createElement(Check,{className:"h-4 w-4"}))),w.createElement(F.ItemText,null,t)));Oi.displayName=F.Item.displayName;var Vi=w.forwardRef(({className:e,...t},o)=>w.createElement(F.Separator,{ref:o,className:n("-mx-1 my-1 h-px bg-muted",e),...t}));Vi.displayName=F.Separator.displayName;var gc=X.Root,fc=X.Trigger,hc=X.Close,_i=X.Portal,Vr=w.forwardRef(({className:e,...t},o)=>w.createElement(X.Overlay,{className:n("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));Vr.displayName=X.Overlay.displayName;var bc=cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Wi=w.forwardRef(({side:e="right",className:t,children:o,...r},i)=>w.createElement(_i,null,w.createElement(Vr,null),w.createElement(X.Content,{ref:i,className:n(bc({side:e}),t),...r},o,w.createElement(X.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},w.createElement(X$1,{className:"h-4 w-4"}),w.createElement("span",{className:"sr-only"},"Close")))));Wi.displayName=X.Content.displayName;var $i=({className:e,...t})=>w.createElement("div",{className:n("flex flex-col space-y-2 text-center sm:text-left",e),...t});$i.displayName="SheetHeader";var Ui=({className:e,...t})=>w.createElement("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ui.displayName="SheetFooter";var ji=w.forwardRef(({className:e,...t},o)=>w.createElement(X.Title,{ref:o,className:n("text-lg font-semibold text-foreground",e),...t}));ji.displayName=X.Title.displayName;var Ki=w.forwardRef(({className:e,...t},o)=>w.createElement(X.Description,{ref:o,className:n("text-sm text-muted-foreground",e),...t}));Ki.displayName=X.Description.displayName;function vc({className:e,...t}){return React.createElement("div",{className:n("animate-pulse rounded-md bg-muted",e),...t})}var qi=w.forwardRef(({className:e,...t},o)=>w.createElement(it.Root,{ref:o,className:n("relative flex w-full touch-none select-none items-center",e),...t},w.createElement(it.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},w.createElement(it.Range,{className:"absolute h-full bg-primary"})),w.createElement(it.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})));qi.displayName=it.Root.displayName;var Mc={vertical:verticalListSortingStrategy,horizontal:horizontalListSortingStrategy,grid:rectSortingStrategy},_r=w.createContext(null),os=w.createContext(null),Wr=w.forwardRef(function({disabled:t=false,className:o,children:r,...i},a){let d=w.useRef(new Map),m=w.useCallback(p=>(d.current.set(p.id,p),()=>{d.current.delete(p.id);}),[]),s=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:4}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),c=p=>{let g=d.current,u=g.get(String(p));if(u)return u;for(let b of g.values())if(b.values.some(f=>f===p))return b;return null},l=w.useCallback(p=>{if(t)return;let{active:g,over:u}=p;if(!u)return;let b=c(g.id),f=c(u.id);if(!b||!f)return;if(b.id===f.id){if(g.id===u.id)return;let R=b.values.findIndex(k=>k===g.id),C=b.values.findIndex(k=>k===u.id);if(R===-1||C===-1)return;b.onReorder?.(arrayMove(b.values,R,C));return}let h=b.values.filter(R=>R!==g.id),P=u.id===f.id?f.values.length:Math.max(0,f.values.findIndex(R=>R===u.id)),S=[...f.values.slice(0,P),g.id,...f.values.slice(P)];b.onReorder?.(h),f.onReorder?.(S);},[t]);return w.createElement(os.Provider,{value:{registerContainer:m}},w.createElement(DndContext,{sensors:s,collisionDetection:closestCorners,onDragEnd:l},w.createElement("div",{ref:a,"data-gds-part":"sortable-group","data-disabled":t||void 0,className:n(o),...i},r)))});Wr.displayName="Sortable.Group";var vo=w.forwardRef(function({values:t,onReorder:o,strategy:r="vertical",disabled:i=false,id:a,className:d,children:m,...s},c){let l=w.useContext(os),p=l!==null,g=w.useId(),u=a??g;w.useEffect(()=>{if(p)return l.registerContainer({id:u,values:t,onReorder:o})},[p,l,u,t,o]);let b=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:4}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),f=w.useCallback(S=>{let{active:R,over:C}=S;if(!C||R.id===C.id)return;let k=t.findIndex(H=>H===R.id),B=t.findIndex(H=>H===C.id);k===-1||B===-1||o?.(arrayMove(t,k,B));},[t,o]),h=w.useMemo(()=>({disabled:i}),[i]),P=w.createElement(SortableContext,{items:t,strategy:Mc[r]},w.createElement(Nc,{id:u,enabled:p,forwardedRef:c,strategy:r,disabled:i,className:d,...s},m));return p?w.createElement(_r.Provider,{value:h},P):w.createElement(_r.Provider,{value:h},w.createElement(DndContext,{sensors:b,collisionDetection:closestCenter,onDragEnd:f},P))});vo.displayName="Sortable";function Nc({id:e,enabled:t,forwardedRef:o,strategy:r,disabled:i,className:a,children:d,...m}){let s=useDroppable({id:e,disabled:!t}),c=w.useCallback(l=>{t&&s.setNodeRef(l),typeof o=="function"?o(l):o&&(o.current=l);},[t,s,o]);return w.createElement("div",{ref:c,"data-gds-part":"sortable","data-strategy":r,"data-disabled":i||void 0,className:n(a),...m},d)}var rs=w.createContext(null),$r=w.forwardRef(function({value:t,asChild:o=false,disabled:r,className:i,style:a,children:d,...m},s){let c=w.useContext(_r);if(!c)throw new Error("<Sortable.Item> must be rendered inside <Sortable>.");let l=c.disabled||r||false,{attributes:p,listeners:g,setNodeRef:u,setActivatorNodeRef:b,transform:f,transition:h,isDragging:P}=useSortable({id:t,disabled:l}),S=w.useRef(false),R=w.useCallback(H=>{u(H),typeof s=="function"?s(H):s&&(s.current=H);},[u,s]),C=w.useMemo(()=>({listeners:g,setActivatorNodeRef:b,hasHandle:S,disabled:l}),[g,b,l]),k={transform:CSS.Transform.toString(f),transition:h,zIndex:P?1:void 0,cursor:l?"default":S.current?void 0:"grab",...a},B=o?Slot:"div";return w.createElement(rs.Provider,{value:C},w.createElement(B,{ref:R,"data-gds-part":"sortable-item","data-value":String(t),"data-dragging":P||void 0,className:n(i),style:k,...p,...S.current?{}:g,...m},d))});$r.displayName="Sortable.Item";var Ur=w.forwardRef(function({asChild:t=false,className:o,children:r,...i},a){let d=w.useContext(rs);if(!d)throw new Error("<Sortable.Handle> must be rendered inside <Sortable.Item>.");w.useLayoutEffect(()=>(d.hasHandle.current=true,()=>{d.hasHandle.current=false;}),[d.hasHandle]);let m=w.useCallback(c=>{d.setActivatorNodeRef(c),typeof a=="function"?a(c):a&&(a.current=c);},[d,a]),s={"data-gds-part":"sortable-handle","aria-label":"Drag to reorder",className:n("cursor-grab touch-none select-none",d.disabled&&"cursor-default opacity-50",o),...d.disabled?{}:d.listeners,...i};return t?w.createElement(Slot,{ref:m,...s},r):w.createElement("button",{type:"button",ref:m,...s},r)});Ur.displayName="Sortable.Handle";vo.Item=$r;vo.Handle=Ur;vo.Group=Wr;var Ec=vo;var as=cva("gds-stack flex flex-col",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}},defaultVariants:{gap:"md",align:"stretch",justify:"start"}}),ns=w.forwardRef(({className:e,gap:t,align:o,justify:r,asChild:i=false,...a},d)=>w.createElement(i?Slot:"div",{ref:d,"data-gds-part":"stack",className:n(as({gap:t,align:o,justify:r,className:e})),...a}));ns.displayName="Stack";var is=w.forwardRef(({className:e,...t},o)=>w.createElement(wo.Root,{className:n("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:o},w.createElement(wo.Thumb,{className:n("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})));is.displayName=wo.Root.displayName;var ss=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{className:"relative w-full overflow-auto"},w.createElement("table",{ref:o,className:n("w-full caption-bottom text-sm",e),...t})));ss.displayName="Table";var ls=w.forwardRef(({className:e,...t},o)=>w.createElement("thead",{ref:o,className:n("[&_tr]:border-b",e),...t}));ls.displayName="TableHeader";var ds=w.forwardRef(({className:e,...t},o)=>w.createElement("tbody",{ref:o,className:n("[&_tr:last-child]:border-0",e),...t}));ds.displayName="TableBody";var cs=w.forwardRef(({className:e,...t},o)=>w.createElement("tfoot",{ref:o,className:n("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));cs.displayName="TableFooter";var ps=w.forwardRef(({className:e,...t},o)=>w.createElement("tr",{ref:o,className:n("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));ps.displayName="TableRow";var ms=w.forwardRef(({className:e,...t},o)=>w.createElement("th",{ref:o,className:n("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));ms.displayName="TableHead";var us=w.forwardRef(({className:e,...t},o)=>w.createElement("td",{ref:o,className:n("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));us.displayName="TableCell";var gs=w.forwardRef(({className:e,...t},o)=>w.createElement("caption",{ref:o,className:n("mt-4 text-sm text-muted-foreground",e),...t}));gs.displayName="TableCaption";var fs=w.createContext(w.createElement(ChevronRight,null)),hs=w.forwardRef(({separator:e,children:t,...o},r)=>w.createElement(fs.Provider,{value:e??w.createElement(ChevronRight,null)},w.createElement("nav",{ref:r,"aria-label":"breadcrumb",...o},t)));hs.displayName="Breadcrumb";var bs=w.forwardRef(({className:e,...t},o)=>w.createElement("ol",{ref:o,className:n("flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",e),...t}));bs.displayName="BreadcrumbList";var vs=w.forwardRef(({className:e,...t},o)=>w.createElement("li",{ref:o,className:n("inline-flex items-center gap-1.5",e),...t}));vs.displayName="BreadcrumbItem";var tr=n("inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 text-xs","transition-colors hover:text-foreground hover:bg-muted/60","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0"),ys=w.forwardRef(({asChild:e,className:t,href:o,...r},i)=>e?w.createElement("span",{ref:i,className:n(tr,t),...r}):o?w.createElement("a",{ref:i,href:o,className:n(tr,t),...r}):w.createElement("button",{ref:i,type:"button",className:n(tr,t),...r}));ys.displayName="BreadcrumbLink";var ws=w.forwardRef(({className:e,...t},o)=>w.createElement("span",{ref:o,role:"link","aria-disabled":"true","aria-current":"page",className:n("inline-flex items-center gap-1.5 px-0.5 text-xs font-medium text-foreground","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0",e),...t}));ws.displayName="BreadcrumbPage";var xs=({children:e,className:t,...o})=>{let r=w.useContext(fs);return w.createElement("li",{role:"presentation","aria-hidden":"true",className:n("[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",t),...o},e??r)};xs.displayName="BreadcrumbSeparator";var Rs=({className:e,...t})=>w.createElement("span",{role:"presentation","aria-hidden":"true",className:n("flex h-5 w-5 items-center justify-center",e),...t},w.createElement(MoreHorizontal,{className:"h-3.5 w-3.5"}),w.createElement("span",{className:"sr-only"},"More"));Rs.displayName="BreadcrumbEllipsis";var Ss=w.forwardRef(({label:e,items:t,onSelect:o,onSelectLabel:r,current:i,className:a},d)=>{let[m,s]=w.useState(false);return w.createElement(Je,{open:m,onOpenChange:s},w.createElement(Qe,{asChild:true},w.createElement("button",{ref:d,type:"button",className:n(tr,i&&"font-medium text-foreground",a),onClick:()=>{r?r():s(c=>!c);}},w.createElement("span",null,e),w.createElement(ChevronDown,{className:n("h-3 w-3 text-muted-foreground transition-transform",m&&"rotate-180"),onClick:c=>{c.stopPropagation(),s(l=>!l);},role:"button","aria-label":`Show ${e} children`}))),w.createElement(je,{align:"start",className:"w-64 p-1 max-h-80 overflow-y-auto"},t.length===0?w.createElement("p",{className:"px-2 py-1.5 text-xs text-muted-foreground"},"No items here yet."):w.createElement("ul",{className:"flex flex-col gap-0.5"},t.map(c=>w.createElement("li",{key:c.id},w.createElement("button",{type:"button",onClick:()=>{o(c.id),s(false);},className:n("w-full text-left rounded-md px-2 py-1.5","flex items-start gap-2","hover:bg-muted transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",c.active&&"bg-muted/60")},w.createElement("span",{className:"flex-1 min-w-0"},w.createElement("span",{className:"flex items-center gap-1.5"},w.createElement("span",{className:"text-xs font-medium text-foreground truncate"},c.label),c.active&&w.createElement(Check,{className:"h-3 w-3 text-primary shrink-0"})),c.summary&&w.createElement("span",{className:"block text-[10px] text-muted-foreground leading-snug truncate"},c.summary)),c.hasChildren&&w.createElement(ChevronRight,{className:"h-3 w-3 text-muted-foreground/70 shrink-0 mt-0.5"})))))))});Ss.displayName="BreadcrumbMenuTrigger";var Kr=Ke.Provider,Lt=Ke.Root,Ht=Ke.Trigger,bt=w.forwardRef(({className:e,sideOffset:t=4,...o},r)=>w.createElement(Ke.Portal,null,w.createElement(Ke.Content,{ref:r,sideOffset:t,className:n("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]",e),...o})));bt.displayName=Ke.Content.displayName;var ks=w.createContext({size:"md",variant:"pill"}),Fc=qe.Root,zc=cva("inline-flex items-center text-muted-foreground",{variants:{variant:{pill:"justify-center rounded-lg bg-muted",underlined:"justify-start border-b border-border"},size:{sm:"",md:"",lg:""}},compoundVariants:[{variant:"pill",size:"sm",className:"h-7 p-0.5"},{variant:"pill",size:"md",className:"h-8 p-0.5"},{variant:"pill",size:"lg",className:"h-10 p-1"},{variant:"underlined",size:"sm",className:"gap-3"},{variant:"underlined",size:"md",className:"gap-4"},{variant:"underlined",size:"lg",className:"gap-6"}],defaultVariants:{variant:"pill",size:"md"}}),Bc=cva("inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{pill:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground",underlined:"rounded-none bg-transparent border-b-2 border-transparent -mb-px hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-primary"},size:{sm:"text-[11px] gap-1 [&_svg]:size-3",md:"text-xs gap-1.5 [&_svg]:size-3.5",lg:"text-sm gap-2 [&_svg]:size-4"}},compoundVariants:[{variant:"pill",size:"sm",className:"h-6 px-1.5"},{variant:"pill",size:"md",className:"h-7 px-2"},{variant:"pill",size:"lg",className:"h-8 px-2.5"},{variant:"underlined",size:"sm",className:"pb-1.5 pt-1 px-1"},{variant:"underlined",size:"md",className:"pb-2 pt-1.5 px-1.5"},{variant:"underlined",size:"lg",className:"pb-2.5 pt-2 px-2"}],defaultVariants:{variant:"pill",size:"md"}}),Ts=w.forwardRef(({className:e,size:t="md",variant:o="pill",children:r,...i},a)=>w.createElement(ks.Provider,{value:{size:t??"md",variant:o??"pill"}},w.createElement(qe.List,{ref:a,className:n(zc({size:t,variant:o}),e),...i},r)));Ts.displayName=qe.List.displayName;var Ps=w.forwardRef(({className:e,size:t,variant:o,tooltip:r,...i},a)=>{let d=w.useContext(ks),m=t??d.size,s=o??d.variant,c=i["aria-label"]??(typeof r=="string"?r:void 0),l=w.createElement(qe.Trigger,{ref:a,className:n(Bc({size:m,variant:s}),e),"aria-label":c,...i});return r?w.createElement(Lt,null,w.createElement(Ht,{asChild:true},l),w.createElement(bt,null,r)):l});Ps.displayName=qe.Trigger.displayName;var Ms=w.forwardRef(({className:e,...t},o)=>w.createElement(qe.Content,{ref:o,className:n("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ms.displayName=qe.Content.displayName;var Ns=w.forwardRef(({className:e,...t},o)=>w.createElement("textarea",{className:n("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));Ns.displayName="Textarea";var Es=cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm 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"}}),Ls=w.forwardRef(({className:e,variant:t,size:o,...r},i)=>w.createElement(qr.Root,{ref:i,className:n(Es({variant:t,size:o,className:e})),...r}));Ls.displayName=qr.Root.displayName;var Ds=w.createContext("md"),Oc=cva("inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground",{variants:{size:{sm:"h-7 p-0.5",md:"h-8 p-0.5",lg:"h-10 p-1"}},defaultVariants:{size:"md"}}),Vc=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[state=on]:bg-background data-[state=on]:text-foreground",{variants:{size:{sm:"h-6 px-1.5 text-[11px] gap-1 [&_svg]:size-3",md:"h-7 px-2 text-xs gap-1.5 [&_svg]:size-3.5",lg:"h-8 px-2.5 text-sm gap-2 [&_svg]:size-4"}},defaultVariants:{size:"md"}}),As=w.forwardRef(({className:e,size:t="md",children:o,...r},i)=>w.createElement(Ds.Provider,{value:t??"md"},w.createElement(qt.Root,{ref:i,className:n(Oc({size:t}),e),...r},o)));As.displayName=qt.Root.displayName;var Is=w.forwardRef(({className:e,size:t,tooltip:o,tooltipSide:r="top",tooltipDelay:i,"aria-label":a,...d},m)=>{let s=w.useContext(Ds),c=t??s,l=a??(typeof o=="string"?o:void 0),p=w.createElement(qt.Item,{ref:m,className:n(Vc({size:c}),e),"aria-label":l,...d});return o==null?p:w.createElement(Lt,{delayDuration:i},w.createElement(Ht,{asChild:true},w.createElement("span",{className:"inline-flex"},p)),w.createElement(bt,{side:r},o))});Is.displayName=qt.Item.displayName;var Wc=cva("grid items-center w-full gap-3 [grid-template-columns:auto_1fr_auto]",{variants:{position:{top:"border-b border-border",bottom:"border-t border-border",inline:""},variant:{default:"bg-background",subtle:"bg-muted/30",transparent:"bg-transparent"},size:{sm:"min-h-10 px-3",md:"min-h-12 px-4",lg:"min-h-14 px-6"},sticky:{true:"",false:""}},compoundVariants:[{sticky:true,position:"top",className:"sticky top-0 z-20"},{sticky:true,position:"bottom",className:"sticky bottom-0 z-20"}],defaultVariants:{position:"top",variant:"default",size:"md",sticky:false}}),Fs=w.forwardRef(({className:e,position:t,variant:o,size:r,sticky:i,leading:a,center:d,trailing:m,children:s,"aria-label":c,...l},p)=>{let g=s==null;return w.createElement("div",{ref:p,role:"toolbar","aria-label":c??"Toolbar","data-gds-part":"toolbar","data-position":t??"top",className:n(Wc({position:t,variant:o,size:r,sticky:i}),e),...l},g?w.createElement(w.Fragment,null,w.createElement("div",{"data-gds-part":"toolbar-leading",className:"flex items-center min-w-0"},a),w.createElement("div",{"data-gds-part":"toolbar-center",className:"flex items-center min-w-0 justify-center"},d),w.createElement("div",{"data-gds-part":"toolbar-trailing",className:"flex items-center min-w-0 justify-end"},m)):s)});Fs.displayName="Toolbar";var zs=w.forwardRef(({className:e,align:t="leading",...o},r)=>w.createElement("div",{ref:r,"data-gds-part":`toolbar-${t}`,className:n("flex items-center min-w-0",t==="center"&&"justify-center",t==="trailing"&&"justify-end",e),...o}));zs.displayName="ToolbarSlot";var Gs=w.createContext(null),Yr=w.createContext(0);function Os(){return w.useContext(Yr)}function Ro(e){let t=w.useContext(Gs);if(!t)throw new Error(`<${e}> must be rendered inside a <Sidebar> root.`);return t}var vt=w.forwardRef(({collapsed:e,defaultCollapsed:t=false,onCollapsedChange:o,collapsible:r=true,variant:i="rail",className:a,style:d,children:m,...s},c)=>{let l=e!==void 0,[p,g]=w.useState(t),u=l?e:p,b=i==="panel",f=()=>{let h=!u;l||g(h),o?.(h);};return w.createElement(Kr,{delayDuration:0},w.createElement(Gs.Provider,{value:{collapsed:u}},w.createElement("aside",{ref:c,"data-gds-part":"sidebar","data-collapsed":u||void 0,"data-variant":i,className:n("relative flex h-full flex-col bg-card text-card-foreground",b?"w-full border border-border rounded-lg overflow-hidden":"border-r border-border transition-[width] duration-200 ease-out",a),style:b?d:{width:u?"var(--gds-sidebar-collapsed-width, 4rem)":"var(--gds-sidebar-width, 16rem)",...d},...s},m,r&&!b&&w.createElement("button",{type:"button",onClick:f,"aria-label":u?"Expand sidebar":"Collapse sidebar","data-gds-part":"sidebar-collapse-toggle",className:n("absolute -right-3 top-6 z-10 flex h-6 w-6 items-center justify-center","rounded-full border border-border bg-card text-muted-foreground shadow-sm","hover:text-foreground hover:bg-muted transition-colors")},u?w.createElement(ChevronRight,{className:"h-3 w-3"}):w.createElement(ChevronLeft,{className:"h-3 w-3"})))))});vt.displayName="Sidebar";var Xr=w.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Ro("SidebarHeader");return w.createElement("div",{ref:o,"data-gds-part":"sidebar-header","data-collapsed":r||void 0,className:n("flex shrink-0 items-center border-b border-border",r?"justify-center px-2":"px-3","h-[var(--gds-sidebar-header-height,3.25rem)]",e),...t})});Xr.displayName="SidebarHeader";var Jr=w.forwardRef(({className:e,...t},o)=>w.createElement("nav",{ref:o,"data-gds-part":"sidebar-content",className:n("flex-1 overflow-y-auto overflow-x-hidden","py-[var(--gds-sidebar-content-py,0.5rem)]",e),...t}));Jr.displayName="SidebarContent";var Qr=w.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Ro("SidebarFooter");return w.createElement("div",{ref:o,"data-gds-part":"sidebar-footer","data-collapsed":r||void 0,className:n("shrink-0 border-t border-border",r?"px-2 py-2":"px-3 py-2",e),...t})});Qr.displayName="SidebarFooter";var ea=w.forwardRef(({title:e,icon:t,trailing:o,collapsible:r=true,defaultExpanded:i=true,className:a,children:d,...m},s)=>{let{collapsed:c}=Ro("SidebarSection"),[l,p]=w.useState(i),g=!!e&&r;return c?w.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:n("px-[var(--gds-sidebar-section-px,0.5rem)] space-y-[var(--gds-sidebar-section-gap,0.125rem)]",a),...m},d):w.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:n("px-[var(--gds-sidebar-section-px,0.5rem)] pb-1",a),...m},e&&(g?w.createElement("div",{className:n("group/header flex w-full items-center gap-1 rounded-md px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors")},w.createElement("button",{type:"button",onClick:()=>p(u=>!u),"aria-expanded":l,className:"flex flex-1 items-center gap-2 text-left min-w-0"},t,w.createElement("span",{className:"flex-1 text-left normal-case truncate"},e),l?w.createElement(ChevronDown,{className:"h-3 w-3 shrink-0",strokeWidth:1.5}):w.createElement(ChevronRight,{className:"h-3 w-3 shrink-0",strokeWidth:1.5})),o&&w.createElement("span",{className:"flex items-center shrink-0",onClick:u=>u.stopPropagation(),onKeyDown:u=>u.stopPropagation()},o)):w.createElement("div",{className:n("flex items-center gap-2 px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground")},t,w.createElement("span",{className:"flex-1 truncate"},e),o&&w.createElement("span",{className:"shrink-0"},o))),l&&w.createElement("div",{className:n("mt-[var(--gds-sidebar-section-gap,0.125rem)]","space-y-[var(--gds-sidebar-section-gap,0.125rem)]")},d))});ea.displayName="SidebarSection";var ta=w.forwardRef(({icon:e,badge:t,active:o=false,asButton:r=false,asChild:i=false,disabled:a=false,collapsedLabel:d,size:m="md",description:s,className:c,children:l,...p},g)=>{let{collapsed:u}=Ro("SidebarItem"),b=Os(),f=!u&&b>0?{paddingLeft:`calc(0.5rem + ${b} * var(--gds-sidebar-tree-indent, 1.5rem))`}:void 0,h=m==="sm",P=h?"text-xs px-2 py-1":"text-sm px-2 py-1.5",S=h&&!o?"font-normal":"font-medium",R=o?"bg-primary/10 text-primary":h?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-foreground/80 hover:bg-muted hover:text-foreground",C=!u&&s!=null,k=n("group flex items-center gap-2.5 rounded-md transition-colors",P,S,C&&(h?"py-1.5":"py-2"),u?"justify-center px-2 py-2":null,R,a&&"opacity-50 pointer-events-none",c),B=C?w.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},w.createElement("span",{className:"truncate"},l),w.createElement("span",{className:n("truncate font-normal text-muted-foreground",h?"text-[10px]":"text-[11px]")},s)):w.createElement("span",{className:"flex-1 truncate text-left"},l),H=w.createElement(w.Fragment,null,e&&w.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},e),!u&&B,!u&&t!==void 0&&t!==null&&w.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},t)),I;if(i)I=w.createElement(Slot,{"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,className:k,style:f},l);else if(r){let{href:Pe,target:ee,rel:ye,download:G,hrefLang:ge,ping:Ae,referrerPolicy:we,type:v,...O}=p;I=w.createElement("button",{type:"button","data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,disabled:a,className:n(k,"w-full text-left"),style:f,...O},H);}else I=w.createElement("a",{ref:g,"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,"aria-disabled":a||void 0,className:k,style:f,...p},H);if(!u)return I;let V=d??(typeof l=="string"?l:null);return V?w.createElement(Lt,null,w.createElement(Ht,{asChild:true},I),w.createElement(bt,{side:"right",sideOffset:8},V,t!=null&&w.createElement("span",{className:"ml-2 inline-flex items-center justify-center rounded bg-foreground/10 px-1.5 py-0 text-[10px]"},t))):I});ta.displayName="SidebarItem";var oa=w.forwardRef(function({label:t,icon:o,badge:r,active:i=false,defaultExpanded:a=true,expanded:d,onExpandedChange:m,disabled:s,description:c,trailing:l,className:p,style:g,children:u,...b},f){let{collapsed:h}=Ro("SidebarTreeItem"),P=Os(),S=d!==void 0,[R,C]=w.useState(a),k=S?d:R,B=()=>{let I=!k;S||C(I),m?.(I);};if(h)return w.createElement(Yr.Provider,{value:P},u);let H=P*1.5;return w.createElement("div",{"data-gds-part":"sidebar-tree-item"},w.createElement("div",{className:"group/row relative"},w.createElement("button",{ref:f,type:"button",onClick:B,"aria-expanded":k,"aria-current":i?"page":void 0,"data-active":i||void 0,disabled:s,className:n("group flex w-full items-center gap-1.5 rounded-md py-1 text-sm font-medium transition-colors",i?"bg-primary/10 text-primary":"text-foreground/80 hover:bg-muted hover:text-foreground",s&&"opacity-50 pointer-events-none",l!=null&&"pr-12",p),style:{paddingLeft:`calc(0.25rem + ${H}rem)`,paddingRight:l!=null?"3rem":"0.5rem",...g},...b},w.createElement("span",{className:"inline-flex h-4 w-4 items-center justify-center text-muted-foreground shrink-0","aria-hidden":true},k?w.createElement(ChevronDown,{className:"h-3 w-3"}):w.createElement(ChevronRight,{className:"h-3 w-3"})),o&&w.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},o),c!=null?w.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},w.createElement("span",{className:"truncate"},t),w.createElement("span",{className:"truncate text-[11px] font-normal text-muted-foreground"},c)):w.createElement("span",{className:"flex-1 truncate text-left"},t),r!=null&&w.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},r)),l!=null&&w.createElement("div",{onClick:I=>I.stopPropagation(),className:"pointer-events-auto absolute inset-y-0 right-1.5 flex items-center gap-0.5"},l)),k&&u&&w.createElement(Yr.Provider,{value:P+1},w.createElement("div",{className:"space-y-[var(--gds-sidebar-section-gap,0.125rem)]"},u)))});oa.displayName="SidebarTreeItem";vt.Header=Xr;vt.Content=Jr;vt.Footer=Qr;vt.Section=ea;vt.Item=ta;vt.TreeItem=oa;var yt=[50,100,200,300,400,500,600,700,800,900,950],Vs=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],jc=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function ar({hue:e,chromaScale:t=1}){let o=(e%360+360)%360,r={};for(let i=0;i<yt.length;i++){let a=Vs[i],d=jc[i]*t;r[yt[i]]=`${a.toFixed(4)} ${d.toFixed(4)} ${o.toFixed(2)}`;}return r}function _s(){let e={};for(let t=0;t<yt.length;t++){let o=Vs[t];e[yt[t]]=`${o.toFixed(4)} 0 0`;}return e}var ra={light:{destructive:"0.560 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.610 0.180 145.0",warning:"0.720 0.180 60.0",info:"0.580 0.200 240.0",highlight:"0.860 0.180 95.0"},dark:{destructive:"0.680 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.720 0.180 145.0",warning:"0.800 0.180 60.0",info:"0.700 0.200 240.0",highlight:"0.880 0.180 95.0"}},So="1 0 0",Ws="0 0 0";function Yt(e,t){let[,o,r]=e.split(/\s+/).map(l=>l.trim()),i=Number(o),a=r;if(t==="light"){let p=Math.min(i*.22,.045),g=.38,u=i;return {soft:`${.965.toFixed(3)} ${p.toFixed(3)} ${a}`,deep:`${g.toFixed(3)} ${u.toFixed(3)} ${a}`}}let d=.22,m=Math.min(i*.45,.075),s=.82,c=i*.9;return {soft:`${d.toFixed(3)} ${m.toFixed(3)} ${a}`,deep:`${s.toFixed(3)} ${c.toFixed(3)} ${a}`}}var nr={geist:"var(--font-geist), system-ui, sans-serif",inter:"var(--font-inter), system-ui, sans-serif",manrope:"var(--font-manrope), system-ui, sans-serif",figtree:"var(--font-figtree), system-ui, sans-serif",dmSans:"var(--font-dm-sans), system-ui, sans-serif",lexend:"var(--font-lexend), system-ui, sans-serif",outfit:"var(--font-outfit), system-ui, sans-serif",plusJakarta:"var(--font-plus-jakarta), system-ui, sans-serif",spaceGrotesk:"var(--font-space-grotesk), system-ui, sans-serif",fraunces:"var(--font-fraunces), Georgia, serif",instrumentSerif:"var(--font-instrument-serif), Georgia, serif",sourceSerif:"var(--font-source-serif), Georgia, serif",jetbrainsMono:"var(--font-jetbrains-mono), ui-monospace, monospace",geistMono:"var(--font-geist-mono), ui-monospace, monospace",ibmPlexMono:"var(--font-ibm-plex-mono), ui-monospace, monospace",system:"system-ui, -apple-system, sans-serif",serif:"Georgia, 'Times New Roman', serif",mono:"ui-monospace, Menlo, monospace"};var Kc=["superLight","light","dark","superDark"],qc={muted:.6,default:1,vibrant:1.3};function Yc(e,t,o){let r=t.primary*o,i=t.accent*o,a=(r+i)/2*.8,d=m=>(m%360+360)%360;return {1:`0.600 ${(.17*r).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*a).toFixed(4)} ${d(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*a).toFixed(4)} ${d(e.primary+220).toFixed(2)}`,4:`0.510 0.0250 ${e.neutral.toFixed(2)}`,5:`0.620 ${(.17*i).toFixed(4)} ${e.accent.toFixed(2)}`}}var L=e=>({source:"neutral",step:e}),Ve=e=>({source:"primary",step:e}),wt=e=>({source:"accent",step:e}),Co=e=>({source:"pure",value:e}),Zc={superLight:{background:L(50),foreground:L(800),card:Co(So),cardForeground:L(800),popover:Co(So),popoverForeground:L(800),primary:Ve(600),primaryForeground:Ve(50),secondary:L(100),secondaryForeground:L(700),muted:L(100),mutedForeground:L(500),accent:wt(600),accentForeground:wt(50),border:L(200),input:L(200),ring:Ve(500)},light:{background:L(50),foreground:L(950),card:Co(So),cardForeground:L(950),popover:Co(So),popoverForeground:L(950),primary:Ve(500),primaryForeground:Ve(50),secondary:L(100),secondaryForeground:L(700),muted:L(100),mutedForeground:L(500),accent:wt(500),accentForeground:wt(50),border:L(200),input:L(200),ring:Ve(500)},dark:{background:L(950),foreground:L(50),card:L(900),cardForeground:L(50),popover:L(900),popoverForeground:L(50),primary:Ve(400),primaryForeground:Ve(950),secondary:L(800),secondaryForeground:L(200),muted:L(800),mutedForeground:L(400),accent:wt(400),accentForeground:wt(950),border:L(800),input:L(800),ring:Ve(400)},superDark:{background:Co(Ws),foreground:L(100),card:L(950),cardForeground:L(100),popover:L(950),popoverForeground:L(100),primary:Ve(300),primaryForeground:Ve(950),secondary:L(900),secondaryForeground:L(300),muted:L(900),mutedForeground:L(500),accent:wt(300),accentForeground:wt(950),border:L(900),input:L(900),ring:Ve(300)}};function ce(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function Xc(e,t){let o=Zc[t],r=t==="superLight"||t==="light",i=r?ra.light:ra.dark;return {background:ce(o.background,e),foreground:ce(o.foreground,e),card:ce(o.card,e),cardForeground:ce(o.cardForeground,e),popover:ce(o.popover,e),popoverForeground:ce(o.popoverForeground,e),primary:ce(o.primary,e),primaryForeground:ce(o.primaryForeground,e),secondary:ce(o.secondary,e),secondaryForeground:ce(o.secondaryForeground,e),muted:ce(o.muted,e),mutedForeground:ce(o.mutedForeground,e),accent:ce(o.accent,e),accentForeground:ce(o.accentForeground,e),border:ce(o.border,e),input:ce(o.input,e),ring:ce(o.ring,e),destructive:i.destructive,destructiveForeground:i.destructiveFg,success:i.success,warning:i.warning,info:i.info,highlight:i.highlight,...(()=>{let a=r?"light":"dark",d=Yt(i.destructive,a),m=Yt(i.success,a),s=Yt(i.warning,a),c=Yt(i.info,a),l=Yt(i.highlight,a);return {destructiveSoft:d.soft,destructiveDeep:d.deep,successSoft:m.soft,successDeep:m.deep,warningSoft:s.soft,warningDeep:s.deep,infoSoft:c.soft,infoDeep:c.deep,highlightSoft:l.soft,highlightDeep:l.deep}})()}}var st={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},Jc={compact:.85,default:1,spacious:1.18};function Qc(e){let t=Jc[e.scale],o=r=>`${(r*t).toFixed(3)}rem`;return {fontSans:nr[e.body],fontMono:nr[e.mono],fontDisplay:nr[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:o(st.display),h1:o(st.h1),h2:o(st.h2),h3:o(st.h3),h4:o(st.h4),h5:o(st.h5),h6:o(st.h6),body:o(st.body),bodySm:o(st.bodySm)}}}var ep={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function tp(e){let t=ep[e.style],o=r=>`${r.toFixed(3)}rem`;return {base:o(t),sm:o(Math.max(0,t-.25)),md:o(t),lg:o(t+.25),xl:o(t+.5),"2xl":o(t+1),full:"9999px"}}var op={tight:.85,default:1,roomy:1.2};function rp(e){return {baseUnit:"1rem",densityFactor:op[e.density]}}var ap={none:{sm:"none",md:"none",lg:"none",xl:"none","2xl":"none",inner:"none"},subtle:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.03)",md:"0 2px 4px -1px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.03)",lg:"0 6px 14px -2px rgb(0 0 0 / 0.05)",xl:"0 12px 24px -4px rgb(0 0 0 / 0.06)","2xl":"0 24px 48px -12px rgb(0 0 0 / 0.12)",inner:"inset 0 1px 2px 0 rgb(0 0 0 / 0.03)"},default:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},dramatic:{sm:"0 2px 4px 0 rgb(0 0 0 / 0.12)",md:"0 8px 16px -2px rgb(0 0 0 / 0.18), 0 4px 8px -4px rgb(0 0 0 / 0.12)",lg:"0 20px 32px -4px rgb(0 0 0 / 0.22), 0 8px 16px -8px rgb(0 0 0 / 0.18)",xl:"0 32px 48px -6px rgb(0 0 0 / 0.28), 0 12px 24px -10px rgb(0 0 0 / 0.22)","2xl":"0 48px 80px -16px rgb(0 0 0 / 0.45)",inner:"inset 0 4px 8px 0 rgb(0 0 0 / 0.1)"}};function np(e){let t=e?.shadows??"default",o=e?.motionIntensity??1,r=i=>`${Math.round(i*o)}ms`;return {shadows:ap[t],motion:{fast:r(150),base:r(200),slow:r(300),slower:r(500)},borderWidth:e?.borderWidth??"1px"}}function Dt(e){let t=qc[e.intensity??"default"],o=e.neutralPureGray??false,r=(e.chroma?.neutral??.08)*t,i=(e.chroma?.primary??1)*t,a=(e.chroma?.accent??1)*t,d=o?_s():ar({hue:e.hues.neutral,chromaScale:r}),m=ar({hue:e.hues.primary,chromaScale:i}),s=ar({hue:e.hues.accent,chromaScale:a}),c={neutral:d,primary:m,accent:s},l=Yc(e.hues,{primary:i,accent:a},t),p=Object.fromEntries(Kc.map(P=>[P,Xc(c,P)])),g=Qc(e.typography),u=tp(e.radius),b=rp(e.spacing),f=np(e.effects),h={buttonShape:e.components?.buttonShape??"default",inputStyle:e.components?.inputStyle??"outlined",cardStyle:e.components?.cardStyle??"flat"};return {id:e.id,name:e.name,description:e.description,tagline:e.tagline,input:e,ramps:c,colors:p,chart:l,typography:g,radius:u,spacing:b,effects:f,components:h}}var ko={id:"calm",name:"Calm",description:"Warm neutrals, terracotta primary, serif typography.",tagline:"Signature",hues:{neutral:40,primary:20,accent:40},chroma:{neutral:.15,primary:.75,accent:.8},intensity:"muted",typography:{display:"fraunces",body:"fraunces",mono:"jetbrainsMono",scale:"default",headingWeight:600,headingTracking:"-0.02em"},spacing:{density:"roomy"},radius:{style:"round"},effects:{shadows:"subtle",motionIntensity:1.25},components:{buttonShape:"pill",inputStyle:"outlined",cardStyle:"outlined"}},aa={id:"energy",name:"Energy",description:"Teal + indigo \u2014 punchy, cool-tone, modern sans.",tagline:"Alternate",hues:{neutral:175,primary:175,accent:235},chroma:{neutral:.08,primary:1,accent:1},intensity:"vibrant",typography:{display:"geist",body:"geist",mono:"geistMono",scale:"default",headingWeight:600},spacing:{density:"default"},radius:{style:"soft"},effects:{shadows:"default",motionIntensity:1},components:{buttonShape:"default",inputStyle:"outlined",cardStyle:"flat"}},ir=[ko,aa];function ip(e){return {"--background":e.background,"--foreground":e.foreground,"--card":e.card,"--card-foreground":e.cardForeground,"--popover":e.popover,"--popover-foreground":e.popoverForeground,"--primary":e.primary,"--primary-foreground":e.primaryForeground,"--secondary":e.secondary,"--secondary-foreground":e.secondaryForeground,"--muted":e.muted,"--muted-foreground":e.mutedForeground,"--accent":e.accent,"--accent-foreground":e.accentForeground,"--destructive":e.destructive,"--destructive-foreground":e.destructiveForeground,"--border":e.border,"--input":e.input,"--ring":e.ring,"--success":e.success,"--warning":e.warning,"--info":e.info,"--highlight":e.highlight,"--destructive-soft":e.destructiveSoft,"--destructive-deep":e.destructiveDeep,"--success-soft":e.successSoft,"--success-deep":e.successDeep,"--warning-soft":e.warningSoft,"--warning-deep":e.warningDeep,"--info-soft":e.infoSoft,"--info-deep":e.infoDeep,"--highlight-soft":e.highlightSoft,"--highlight-deep":e.highlightDeep}}function ia(e,t){let o=e.colors[t];return {...ip(o),...na("neutral",e.ramps.neutral),...na("primary",e.ramps.primary),...na("accent",e.ramps.accent),"--chart-1":e.chart[1],"--chart-2":e.chart[2],"--chart-3":e.chart[3],"--chart-4":e.chart[4],"--chart-5":e.chart[5],"--font-sans":e.typography.fontSans,"--font-mono":e.typography.fontMono,"--font-display":e.typography.fontDisplay,"--font-heading-weight":String(e.typography.headingWeight),"--font-body-weight":String(e.typography.bodyWeight),"--font-heading-tracking":e.typography.headingTracking,"--text-display":e.typography.scale.display,"--text-h1":e.typography.scale.h1,"--text-h2":e.typography.scale.h2,"--text-h3":e.typography.scale.h3,"--text-h4":e.typography.scale.h4,"--text-h5":e.typography.scale.h5,"--text-h6":e.typography.scale.h6,"--text-body":e.typography.scale.body,"--text-body-sm":e.typography.scale.bodySm,"--radius":e.radius.base,"--gds-radius-sm":e.radius.sm,"--gds-radius-md":e.radius.md,"--gds-radius-lg":e.radius.lg,"--gds-radius-xl":e.radius.xl,"--gds-radius-2xl":e.radius["2xl"],"--gds-radius-full":e.radius.full,"--gds-density":String(e.spacing.densityFactor),"--gds-shadow-sm":e.effects.shadows.sm,"--gds-shadow-md":e.effects.shadows.md,"--gds-shadow-lg":e.effects.shadows.lg,"--gds-shadow-xl":e.effects.shadows.xl,"--gds-shadow-2xl":e.effects.shadows["2xl"],"--gds-shadow-inner":e.effects.shadows.inner,"--gds-transition-fast":e.effects.motion.fast,"--gds-transition-base":e.effects.motion.base,"--gds-transition-slow":e.effects.motion.slow,"--gds-transition-slower":e.effects.motion.slower,"--gds-border-width":e.effects.borderWidth}}function na(e,t){let o={};for(let r of yt)o[`--ramp-${e}-${r}`]=t[r];return o}function sr(e,t){if(typeof document>"u")return;let o=document.documentElement,r=ia(e,t);for(let[i,a]of Object.entries(r))o.style.setProperty(i,a);o.setAttribute("data-grade-theme",e.id),o.setAttribute("data-mode",t),o.setAttribute("data-button-shape",e.components.buttonShape??"default"),o.setAttribute("data-input-style",e.components.inputStyle??"outlined"),o.setAttribute("data-card-style",e.components.cardStyle??"flat");}function To(e){if(typeof document>"u")return "";let t=document.createElement("span");t.style.color=`oklch(${e})`,t.style.position="absolute",t.style.visibility="hidden",document.body.appendChild(t);let o=getComputedStyle(t).color;document.body.removeChild(t);let r=o.match(/\d+/g);if(!r||r.length<3)return "";let[i,a,d]=r.slice(0,3).map(Number);return "#"+[i,a,d].map(m=>Math.max(0,Math.min(255,m)).toString(16).padStart(2,"0")).join("").toUpperCase()}function sp(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[o,r,i]=t.map(Number),a=`${o.toFixed(3)} ${r.toFixed(3)} ${Math.round(i)}`,d=To(e);return {oklch:a,hex:d}}function sa(e,t,o){let r=[`### ${e} ramp (hue ${Math.round(o)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let i of yt){let{oklch:a,hex:d}=sp(t[i]);r.push(`| ${i} | \`${a}\` | \`${d||"\u2014"}\` |`);}return r.join(`
64
- `)}function $s(e,t){let o=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let r of t){let i=To(r.light)||"\u2014",a=To(r.dark)||"\u2014";o.push(`| \`--${r.token}\` | ${r.usage} | \`${i}\` (\`${r.light}\`) | \`${a}\` (\`${r.dark}\`) |`);}return o.join(`
65
- `)}function Us(e){return JSON.stringify(e.input,null,2)}function js(e){let{input:t,ramps:o,colors:r,chart:i,typography:a,radius:d,spacing:m,effects:s,components:c}=e,l=t.intensity??"default",p=f=>({token:f,usage:lp[f]??"",light:r.light[f],dark:r.dark[f]}),g=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","border","input","ring"].map(p),u=["destructive","destructiveForeground","success","warning","info","highlight"].map(p),b=[1,2,3,4,5].map(f=>{let h=i[f];return {slot:f,triplet:h,hex:To(h)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
63
+ </Card>`,import:"@gradeui/ui",subcomponents:["ToolbarSlot"],composesWith:["Button","Avatar","Input","Logo","Badge","AppShellHeader","Card","Row","Stack"],props:{leading:{schema:z.unknown().optional(),design:"plumbing",description:"left-aligned region (logo + primary nav)"},center:{schema:z.unknown().optional(),design:"plumbing",description:"center region (search, page title, segmented control)"},trailing:{schema:z.unknown().optional(),design:"plumbing",description:"right-aligned region (action icons, avatar, primary CTA)"},children:{schema:z.unknown().optional(),design:"plumbing",description:"escape hatch; bypasses slot layout"},position:{schema:z.enum(["top","bottom","inline"]).optional(),design:"knob",description:"border placement",default:"top"},variant:{schema:z.enum(["default","subtle","transparent"]).optional(),design:"knob",default:"default"},size:{schema:z.enum(["sm","md","lg"]).optional(),design:"knob",description:"height + padding",default:"md"},sticky:{schema:z.boolean().optional(),design:"knob",description:"pin to top/bottom of scroll container",default:false},"aria-label":{schema:z.string().optional(),design:"content",description:"required by WAI-ARIA toolbar pattern",default:"Toolbar"},className:{schema:z.string().optional(),design:"plumbing"}}};var Xn={name:"Tooltip",description:"A short, non-essential label that explains a control on hover/focus \u2014 icon-only buttons in toolbars, abbreviated column headers, status dots. NEVER hide critical info inside a tooltip \u2014 they're invisible on touch and can be skipped by screen readers if implemented carelessly. For richer hover content use HoverCard. For inline help text that's always visible, use a description paragraph.",import:"@gradeui/ui",aliases:["tooltip","tip","hover tip","hint","label on hover","help tag","hint","helper text bubble","info tip"],subcomponents:["TooltipTrigger","TooltipContent","TooltipProvider"],composesWith:["Button (icon-only)","Toggle","TabsTrigger (the canonical tabs already have a `tooltip` prop that wraps this)","Avatar (status badge meaning)"],props:{delayDuration:{schema:z.number().optional(),design:"knob",description:"ms hover before show; mount ONCE near the app root"},skipDelayDuration:{schema:z.number().optional(),design:"knob",description:'ms gap that still feels like "same hover"'},open:{schema:z.unknown().optional(),design:"plumbing"},asChild:{schema:z.boolean().optional(),design:"plumbing",description:"usually wraps a Button or icon"},side:{schema:z.enum(["top","right","bottom","left","start","center","end"]).optional(),design:"knob",default:"top"}}};var Jn={name:"VideoPlayer",description:"HTML5 video wrapped in the shared media surface. Controls-on for a standard player, controls-off (+ autoplay/muted/loop) for hero / background video. Prefer Rive for anything interactive, Three Scene for shader backgrounds.",import:"@gradeui/ui",aliases:["video","mp4","movie","webm","clip","video view","av player","react native video","video element"],composesWith:["MediaSurface (internal)","Card (wrap for thumbnail grids)"],props:{src:{schema:z.string(),design:"content",description:"video URL"},controls:{schema:z.boolean().optional(),design:"knob",description:"show native controls; false for chromeless hero/background video",default:true},autoPlay:{schema:z.boolean().optional(),design:"knob",description:"forces muted=true (browser restriction)",default:false},loop:{schema:z.boolean().optional(),design:"knob",default:false},muted:{schema:z.boolean().optional(),design:"knob",default:false},pauseOffscreen:{schema:z.boolean().optional(),design:"knob",description:"pause when scrolled out of viewport",default:true},aspect:{schema:z.enum(["video","square","portrait","wide","auto"]).optional(),design:"knob",default:"video"},radius:{schema:z.enum(["none","sm","md","lg","xl"]).optional(),design:"knob",description:"driven by `--gds-media-radius`",default:"lg"},objectFit:{schema:z.enum(["cover","contain","fill"]).optional(),design:"knob",default:"cover"},poster:{schema:z.string().optional(),design:"content",description:'image shown before playback. Always rendered as a `loading="lazy"` `<img>` overlay (not the native `poster` attribute, which fetches eagerly).'},playbackRate:{schema:z.number().optional(),design:"knob"}}};var Yr={Accordion:ja,AiChat:Ka,AiChatComposer:qa,AppShell:Ya,Avatar:Za,Badge:Ja,Banner:Qa,Breadcrumb:en,Button:tn,Calendar:on,Callout:rn,Card:nn,Carousel:sn,Chart:ln,Checkbox:dn,Code:cn,Collapsible:pn,Command:mn,DatePicker:un,Dialog:gn,DropdownMenu:fn,Flex:hn,Grid:bn,HoverCard:vn,Input:yn,Label:wn,Map:xn,MediaSurface:jr,MultiSelect:Rn,Popover:Sn,Progress:Cn,RadioGroup:kn,Resizable:Tn,RivePlayer:Pn,Row:Mn,ScrollArea:Nn,SectionBlock:En,Select:Ln,Separator:Hn,ShaderPresetPicker:Dn,ShaderPresetPreview:An,Sheet:In,Sidebar:Fn,Skeleton:zn,Slider:Bn,Sortable:Vn,Stack:On,Switch:Gn,Table:Wn,Tabs:Un,Textarea:$n,ThreeScene:jn,Toast:Kn,Toggle:qn,ToggleGroup:Yn,Toolbar:Zn,Tooltip:Xn,VideoPlayer:Jn};function Pd(e){return e?Yr[e]??null:null}function Md(){return Object.keys(Yr)}function i(...e){return twMerge(clsx(e))}var Hd=je.Root,Qn=w.forwardRef(({className:e,...t},o)=>w.createElement(je.Item,{ref:o,className:i("border-b",e),...t}));Qn.displayName="AccordionItem";var ei=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(je.Header,{className:"flex"},w.createElement(je.Trigger,{ref:r,className:i("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...o},t,w.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 transition-transform duration-200"}))));ei.displayName=je.Trigger.displayName;var ti=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(je.Content,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...o},w.createElement("div",{className:i("pb-4 pt-0",e)},t)));ti.displayName=je.Content.displayName;var oi=cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4",{variants:{variant:{default:"bg-background text-foreground [&>svg]:text-foreground",destructive:"border-destructive/30 bg-destructive-soft text-destructive-deep [&>svg]:text-destructive-deep",success:"border-success/30 bg-success-soft text-success-deep [&>svg]:text-success-deep",warning:"border-warning/30 bg-warning-soft text-warning-deep [&>svg]:text-warning-deep",info:"border-info/30 bg-info-soft text-info-deep [&>svg]:text-info-deep"}},defaultVariants:{variant:"default"}}),Ad={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status"},ri=w.forwardRef(({className:e,variant:t,role:o,...r},n)=>w.createElement("div",{ref:n,role:o??Ad[t??"default"],"data-gds-part":"callout",className:i(oi({variant:t}),e),...r}));ri.displayName="Callout";var ai=w.forwardRef(({className:e,...t},o)=>w.createElement("h5",{ref:o,"data-gds-part":"callout-title",className:i("mb-1 font-medium leading-none tracking-tight",e),...t}));ai.displayName="CalloutTitle";var ni=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"callout-description",className:i("text-sm [&_p]:leading-relaxed",e),...t}));ni.displayName="CalloutDescription";var ii=cva("gds-app-shell min-h-screen w-full bg-background text-foreground grid",{variants:{nav:{none:"",top:"",side:"","three-pane":""}},defaultVariants:{nav:"none"}}),si=cva("gds-app-shell-header",{variants:{sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{sticky:false}}),li=cva("gds-app-shell-nav",{variants:{placement:{top:"border-b bg-background",side:"border-r bg-background",none:"hidden"},sticky:{true:"",false:""}},compoundVariants:[{placement:"top",sticky:true,className:"sticky top-0 z-30"},{placement:"side",sticky:true,className:"sticky top-0 h-screen self-start"}],defaultVariants:{placement:"top",sticky:true}}),di=cva("gds-app-shell-aside min-w-0 border-r bg-background",{variants:{sticky:{true:"sticky top-0 h-screen self-start",false:""}},defaultVariants:{sticky:false}}),ci=cva("gds-app-shell-main min-w-0",{variants:{maxWidth:{full:"w-full",container:"w-full mx-auto max-w-7xl px-4 md:px-6 lg:px-8"}},defaultVariants:{maxWidth:"full"}}),pi=cva("gds-app-shell-footer border-t bg-background"),mi=w.forwardRef(({className:e,nav:t,asChild:o=false,...r},n)=>w.createElement(o?Slot:"div",{ref:n,"data-gds-part":"app-shell","data-nav":t??"none",className:i(ii({nav:t,className:e})),...r}));mi.displayName="AppShell";var ui=w.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>w.createElement(o?Slot:"header",{ref:n,"data-gds-part":"app-shell-header",className:i(si({sticky:t,className:e})),...r}));ui.displayName="AppShellHeader";var gi=w.forwardRef(({className:e,placement:t,sticky:o,asChild:r=false,...n},a)=>w.createElement(r?Slot:"nav",{ref:a,"data-gds-part":"app-shell-nav","data-placement":t??"top",className:i(li({placement:t,sticky:o,className:e})),...n}));gi.displayName="AppShellNav";var fi=w.forwardRef(({className:e,sticky:t,asChild:o=false,...r},n)=>w.createElement(o?Slot:"aside",{ref:n,"data-gds-part":"app-shell-aside",className:i(di({sticky:t,className:e})),...r}));fi.displayName="AppShellAside";var hi=w.forwardRef(({className:e,maxWidth:t,asChild:o=false,...r},n)=>w.createElement(o?Slot:"main",{ref:n,"data-gds-part":"app-shell-main",className:i(ci({maxWidth:t,className:e})),...r}));hi.displayName="AppShellMain";var bi=w.forwardRef(({className:e,asChild:t=false,...o},r)=>w.createElement(t?Slot:"footer",{ref:r,"data-gds-part":"app-shell-footer",className:i(pi({className:e})),...o}));bi.displayName="AppShellFooter";var vi=w.forwardRef(({className:e,...t},o)=>w.createElement(yt.Root,{ref:o,className:i("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));vi.displayName=yt.Root.displayName;var yi=w.forwardRef(({className:e,...t},o)=>w.createElement(yt.Image,{ref:o,className:i("aspect-square h-full w-full",e),...t}));yi.displayName=yt.Image.displayName;var wi=w.forwardRef(({className:e,...t},o)=>w.createElement(yt.Fallback,{ref:o,className:i("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));wi.displayName=yt.Fallback.displayName;var Ri=cva("inline-flex items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 [&_svg]:size-3 [&_svg]:shrink-0",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground",highlight:"border-transparent bg-gds-yellow-400 text-gds-gray-900 shadow hover:bg-gds-yellow-500",success:"border-transparent bg-gds-green-500 text-gds-gray-900 shadow hover:bg-gds-green-600",warning:"border-transparent bg-orange-500 text-white shadow hover:bg-orange-600",info:"border-transparent bg-blue-500 text-white shadow hover:bg-blue-600","success-soft":"border-gds-green-500/20 bg-gds-green-500/10 text-gds-green-600 dark:text-gds-green-400","warning-soft":"border-orange-500/20 bg-orange-500/10 text-orange-600 dark:text-orange-400","destructive-soft":"border-destructive/20 bg-destructive/10 text-destructive dark:text-red-400","info-soft":"border-blue-500/20 bg-blue-500/10 text-blue-600 dark:text-blue-400","highlight-soft":"border-gds-yellow-500/20 bg-gds-yellow-400/10 text-gds-yellow-600 dark:text-gds-yellow-400","success-outline":"border-gds-green-500/50 bg-transparent text-gds-green-600 dark:text-gds-green-400","warning-outline":"border-orange-500/50 bg-transparent text-orange-600 dark:text-orange-400","destructive-outline":"border-destructive/50 bg-transparent text-destructive dark:text-red-400","info-outline":"border-blue-500/50 bg-transparent text-blue-600 dark:text-blue-400"},rounded:{default:"rounded-md",full:"rounded-full"}},defaultVariants:{variant:"default",rounded:"default"}});function cr({className:e,variant:t,rounded:o,...r}){return w.createElement("div",{className:i(Ri({variant:t,rounded:o}),e),...r})}var ze={solid:"",translucent:"gds-surface-translucent",glass:"gds-surface-glass","glass-strong":"gds-surface-glass-strong"};function et(e,t){return e==="solid"?t:""}var Si=cva("relative flex items-center gap-3 px-4 py-2.5 text-sm leading-relaxed border-b",{variants:{variant:{default:"bg-muted text-foreground border-border [&>svg]:text-muted-foreground",info:"bg-info-soft text-info-deep border-info/30 [&>svg]:text-info-deep",success:"bg-success-soft text-success-deep border-success/30 [&>svg]:text-success-deep",warning:"bg-warning-soft text-warning-deep border-warning/30 [&>svg]:text-warning-deep",destructive:"bg-destructive-soft text-destructive-deep border-destructive/30 [&>svg]:text-destructive-deep",announcement:"bg-[oklch(var(--primary)_/_0.06)] text-foreground border-[oklch(var(--primary)_/_0.18)] [&>svg]:text-primary"},align:{start:"justify-start",center:"justify-center",between:"justify-between"},sticky:{true:"sticky top-0 z-30",false:""}},defaultVariants:{variant:"default",align:"between",sticky:false}}),Bd={destructive:"alert",warning:"alert",info:"status",success:"status",default:"status",announcement:"status"},Ci=w.forwardRef(({className:e,variant:t="default",align:o,sticky:r,surface:n="solid",dismissible:a,onDismiss:l,icon:m,action:s,role:c,children:d,...p},g)=>{let u=t??"default",b=c??Bd[u];return w.createElement("div",{ref:g,role:b,"data-gds-part":"banner","data-variant":u,"data-surface":n,className:i(Si({variant:t,align:o,sticky:r}),ze[n],e),...p},m?w.createElement("span",{"data-gds-part":"banner-icon","aria-hidden":true,className:"shrink-0"},m):null,w.createElement("div",{"data-gds-part":"banner-content",className:"flex-1 min-w-0"},d),s?w.createElement("span",{"data-gds-part":"banner-action",className:"shrink-0"},s):null,a?w.createElement("button",{type:"button","data-gds-part":"banner-dismiss",onClick:l,"aria-label":"Dismiss",className:"shrink-0 inline-flex h-7 w-7 items-center justify-center rounded-md opacity-70 hover:opacity-100 hover:bg-black/5 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 transition-opacity"},w.createElement(X,{className:"h-4 w-4"})):null)});Ci.displayName="Banner";var Eo=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",raised:"gds-button-raised"},size:{sm:"h-7 gap-1.5 px-2.5 text-xs [&_svg]:size-3.5",md:"h-8 gap-1.5 px-3 text-xs [&_svg]:size-3.5",default:"h-8 gap-1.5 px-3 text-xs [&_svg]:size-3.5",lg:"h-10 gap-2 px-4 text-sm [&_svg]:size-4",icon:"h-8 w-8 [&_svg]:size-3.5"}},defaultVariants:{variant:"default",size:"md"}}),Ne=w.forwardRef(({className:e,variant:t,size:o,asChild:r=false,...n},a)=>w.createElement(r?Slot:"button",{"data-gds-part":"button",className:i("gds-button",Eo({variant:t,size:o,className:e})),ref:a,...n}));Ne.displayName="Button";function mr({className:e,classNames:t,showOutsideDays:o=true,captionLayout:r="label",buttonVariant:n="ghost",formatters:a,components:l,...m}){let s=getDefaultClassNames();return w.createElement(DayPicker,{showOutsideDays:o,className:i("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:c=>c.toLocaleString("default",{month:"short"}),...a},classNames:{root:i("w-fit",s.root),months:i("relative flex flex-col gap-4 md:flex-row",s.months),month:i("flex w-full flex-col gap-4",s.month),nav:i("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",s.nav),button_previous:i(Eo({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_previous),button_next:i(Eo({variant:n}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",s.button_next),month_caption:i("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",s.month_caption),dropdowns:i("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",s.dropdowns),dropdown_root:i("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",s.dropdown_root),dropdown:i("bg-popover absolute inset-0 opacity-0",s.dropdown),caption_label:i("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",s.caption_label),table:"w-full border-collapse",weekdays:i("flex",s.weekdays),weekday:i("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",s.weekday),week:i("mt-2 flex w-full",s.week),week_number_header:i("w-[--cell-size] select-none",s.week_number_header),week_number:i("text-muted-foreground select-none text-[0.8rem]",s.week_number),day:i("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",s.day),range_start:i("bg-accent rounded-l-md",s.range_start),range_middle:i("rounded-none",s.range_middle),range_end:i("bg-accent rounded-r-md",s.range_end),today:i("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",s.today),outside:i("text-muted-foreground aria-selected:text-muted-foreground",s.outside),disabled:i("text-muted-foreground opacity-50",s.disabled),hidden:i("invisible",s.hidden),...t},components:{Root:({className:c,rootRef:d,...p})=>w.createElement("div",{"data-slot":"calendar",ref:d,className:i(c),...p}),Chevron:({className:c,orientation:d,...p})=>d==="left"?w.createElement(ChevronLeftIcon,{className:i("size-4",c),...p}):d==="right"?w.createElement(ChevronRightIcon,{className:i("size-4",c),...p}):w.createElement(ChevronDownIcon,{className:i("size-4",c),...p}),DayButton:Ti,WeekNumber:({children:c,...d})=>w.createElement("td",{...d},w.createElement("div",{className:"flex size-[--cell-size] items-center justify-center text-center"},c)),...l},...m})}function Ti({className:e,day:t,modifiers:o,...r}){let n=getDefaultClassNames(),a=w.useRef(null);return w.useEffect(()=>{o.focused&&a.current?.focus();},[o.focused]),w.createElement(Ne,{ref:a,variant:"ghost",size:"icon","data-day":`${t.date.getFullYear()}-${String(t.date.getMonth()+1).padStart(2,"0")}-${String(t.date.getDate()).padStart(2,"0")}`,"data-selected-single":o.selected&&!o.range_start&&!o.range_end&&!o.range_middle,"data-range-start":o.range_start,"data-range-end":o.range_end,"data-range-middle":o.range_middle,className:i("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] [&>span]:text-xs [&>span]:opacity-70",n.day,e),...r})}var Zr=w.createContext(null);function Do(e){let t=w.useContext(Zr);if(!t)throw new Error(`<${e}> must be rendered inside a <Carousel> root.`);return t}var qd=5e3,Et=w.forwardRef(({loop:e=true,align:t="start",slidesPerView:o=1,autoplay:r=false,draggable:n=true,onSlideChange:a,className:l,style:m,children:s,...c},d)=>{let p=w.useMemo(()=>({loop:e,align:t,slidesToScroll:1,watchDrag:n,containScroll:e?false:"trimSnaps"}),[e,t,n]),[g,u]=$d(p),[b,f]=w.useState(0),[h,C]=w.useState(0),[S,x]=w.useState(false),[k,P]=w.useState(false),V=w.useRef(new Map),N=w.useRef(a);N.current=a;let F=w.useMemo(()=>r?r===true?{}:r:null,[r]);w.useEffect(()=>{if(!u)return;let v=()=>{f(u.selectedScrollSnap()),C(u.scrollSnapList().length),x(u.canScrollPrev()),P(u.canScrollNext()),N.current?.(u.selectedScrollSnap());};return v(),u.on("select",v),u.on("reInit",v),()=>{u.off("select",v),u.off("reInit",v);}},[u]);let G=w.useCallback(v=>{u&&u.selectedScrollSnap()===v&&u.scrollNext();},[u]),he=w.useRef(false),re=w.useRef(true),K=w.useRef(null);w.useImperativeHandle(d,()=>K.current),w.useEffect(()=>{if(!F?.pauseWhenOffscreen){re.current=true;return}let v=K.current;if(!v||typeof IntersectionObserver>"u")return;let z=new IntersectionObserver(H=>{re.current=H.some(X=>X.isIntersecting);},{threshold:.25});return z.observe(v),()=>z.disconnect()},[F?.pauseWhenOffscreen]),w.useEffect(()=>{if(!u||!F)return;let v=null,z=()=>{v&&clearTimeout(v);let le=u.selectedScrollSnap(),de=V.current.get(le)??F.delay??qd;v=setTimeout(()=>{if(he.current||!re.current){z();return}u.scrollNext();},de);},H=()=>z(),X=()=>{v&&clearTimeout(v);},Pe=()=>z();return u.on("select",H),u.on("pointerDown",X),u.on("settle",Pe),z(),()=>{v&&clearTimeout(v),u.off("select",H),u.off("pointerDown",X),u.off("settle",Pe);}},[u,F]);let O=()=>{F?.pauseOnHover!==false&&(he.current=true);},te=()=>{he.current=false;},He=w.useMemo(()=>({api:u,selectedIndex:b,slideCount:h,canScrollPrev:S,canScrollNext:k,durationsRef:V,advanceFromSlide:G}),[u,b,h,S,k,G]),se=`calc(100% / ${o})`;return w.createElement(Zr.Provider,{value:He},w.createElement("div",{ref:K,"data-gds-part":"carousel",className:i("relative",l),style:{"--gds-carousel-slide-basis":se,...m},onMouseEnter:O,onMouseLeave:te,...c},w.createElement("div",{ref:g,"data-gds-part":"carousel-viewport",className:"overflow-hidden",style:{borderRadius:"var(--gds-carousel-radius, var(--gds-media-radius, 0.5rem))"}},w.createElement("div",{"data-gds-part":"carousel-track",className:"flex",style:{gap:"var(--gds-carousel-gap, 0)",touchAction:"pan-y pinch-zoom"}},s))))});Et.displayName="Carousel";var ur=w.forwardRef(({duration:e,className:t,style:o,children:r,...n},a)=>{let{durationsRef:l}=Do("Carousel.Slide"),m=w.useRef(null);return w.useImperativeHandle(a,()=>m.current),w.useEffect(()=>{if(e==null)return;let s=m.current;if(!s?.parentElement)return;let c=Array.from(s.parentElement.children).indexOf(s);if(c<0)return;let d=l.current;return d.set(c,e),()=>{d.delete(c);}},[e,l]),w.createElement("div",{ref:m,"data-gds-part":"carousel-slide",className:i("min-w-0 shrink-0 grow-0",t),style:{flexBasis:"var(--gds-carousel-slide-basis, 100%)",...o},...n},r)});ur.displayName="Carousel.Slide";var Xr=w.forwardRef(({src:e,poster:t,alt:o,controls:r=false,loop:n=true,fit:a="cover",duration:l,className:m,style:s,...c},d)=>{let{api:p,selectedIndex:g,advanceFromSlide:u}=Do("Carousel.VideoSlide"),b=w.useRef(null),f=w.useRef(null);w.useImperativeHandle(d,()=>b.current);let[h,C]=w.useState(null);w.useEffect(()=>{let x=b.current;x?.parentElement&&C(Array.from(x.parentElement.children).indexOf(x));},[p]);let S=h!=null&&h===g;return w.useEffect(()=>{let x=f.current;if(x)if(S){let k=x.play();k&&typeof k.catch=="function"&&k.catch(()=>{});}else x.pause(),x.currentTime=0;},[S]),w.createElement(ur,{ref:b,duration:l,className:i("relative overflow-hidden bg-[var(--gds-media-placeholder-bg)]",m),style:s,"data-gds-part":"carousel-video-slide",...c},t&&w.createElement("img",{src:t,alt:o??"","aria-hidden":S,className:"absolute inset-0 h-full w-full",style:{objectFit:a,opacity:S?0:1,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"}}),w.createElement("video",{ref:f,src:e,muted:true,playsInline:true,loop:n,controls:r,preload:"metadata","aria-label":o,className:"block h-full w-full",style:{objectFit:a,opacity:S?1:0,transition:"opacity var(--gds-carousel-fade-ms, 200ms) ease-out"},onEnded:()=>{n||h!=null&&u(h);}}))});Xr.displayName="Carousel.VideoSlide";var Jr=w.forwardRef(({position:e="below",renderDot:t,className:o,style:r,...n},a)=>{let{api:l,selectedIndex:m,slideCount:s}=Do("Carousel.Dots");if(s<=1)return null;let c=Array.from({length:s},(p,g)=>g),d=e==="overlay"?{position:"absolute",insetInlineStart:0,insetInlineEnd:0,bottom:"var(--gds-carousel-dots-inset, 0.75rem)",zIndex:1}:{marginBlockStart:"var(--gds-carousel-dots-gap, 0.75rem)"};return w.createElement("div",{ref:a,"data-gds-part":"carousel-dots",className:i("flex items-center justify-center",o),style:{gap:"var(--gds-carousel-dots-spacing, 0.5rem)",...d,...r},...n},c.map(p=>{let g=p===m,u=()=>l?.scrollTo(p);return t?t({index:p,active:g,onClick:u}):w.createElement("button",{key:p,type:"button",onClick:u,"aria-label":`Go to slide ${p+1}`,"aria-current":g?"true":void 0,"data-active":g||void 0,className:"rounded-full transition-all",style:{width:g?"var(--gds-carousel-dot-active-width, 1.25rem)":"var(--gds-carousel-dot-size, 0.5rem)",height:"var(--gds-carousel-dot-size, 0.5rem)",background:g?"var(--gds-carousel-dot-active-color, oklch(var(--primary)))":"var(--gds-carousel-dot-color, oklch(var(--muted-foreground) / 0.4))"}})}))});Jr.displayName="Carousel.Dots";var Qr=w.forwardRef(({position:e="overlay",className:t,style:o,...r},n)=>e==="outside"?w.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:i("flex items-center justify-end gap-2 pt-2",t),style:o,...r},w.createElement(Lo,null),w.createElement(Ho,null)):w.createElement("div",{ref:n,"data-gds-part":"carousel-arrows",className:i("pointer-events-none absolute inset-0 z-[1]",t),style:o,...r},w.createElement(Lo,{className:"pointer-events-auto absolute left-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"}),w.createElement(Ho,{className:"pointer-events-auto absolute right-[var(--gds-carousel-arrow-inset,0.75rem)] top-1/2 -translate-y-1/2"})));Qr.displayName="Carousel.Arrows";var Lo=w.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollPrev:l}=Do("Carousel.Prev");return w.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-prev","aria-label":"Previous slide",disabled:!l,onClick:()=>a?.scrollPrev(),className:i("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??w.createElement(ChevronLeft,{className:"h-4 w-4","aria-hidden":true}))});Lo.displayName="Carousel.Prev";var Ho=w.forwardRef(({className:e,style:t,children:o,...r},n)=>{let{api:a,canScrollNext:l}=Do("Carousel.Next");return w.createElement("button",{ref:n,type:"button","data-gds-part":"carousel-next","aria-label":"Next slide",disabled:!l,onClick:()=>a?.scrollNext(),className:i("inline-flex items-center justify-center rounded-full","transition disabled:opacity-40 disabled:cursor-not-allowed","hover:[background:var(--gds-carousel-arrow-hover-bg,oklch(var(--background)))]",e),style:{width:"var(--gds-carousel-arrow-size, 2.25rem)",height:"var(--gds-carousel-arrow-size, 2.25rem)",background:"var(--gds-carousel-arrow-bg, oklch(var(--background) / 0.85))",color:"var(--gds-carousel-arrow-fg, oklch(var(--foreground)))",backdropFilter:"var(--gds-carousel-arrow-backdrop, blur(6px))",boxShadow:"var(--gds-carousel-arrow-shadow, 0 2px 8px oklch(0 0 0 / 0.12))",...t},...r},o??w.createElement(ChevronRight,{className:"h-4 w-4","aria-hidden":true}))});Ho.displayName="Carousel.Next";Et.Slide=ur;Et.VideoSlide=Xr;Et.Dots=Jr;Et.Arrows=Qr;Et.Prev=Lo;Et.Next=Ho;var Yd=Et;function Zd(){return w.useContext(Zr)?.api}var Pi=w.forwardRef(({className:e,surface:t="solid",...o},r)=>w.createElement("div",{ref:r,"data-gds-part":"card","data-surface":t,className:i("gds-card rounded-xl border text-card-foreground shadow",et(t,"bg-card"),ze[t],e),...o}));Pi.displayName="Card";var Mi=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-header",className:i("flex flex-col space-y-1.5 p-6",e),...t}));Mi.displayName="CardHeader";var Ni=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-title",className:i("font-semibold leading-none tracking-tight",e),...t}));Ni.displayName="CardTitle";var Ei=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-description",className:i("text-sm text-muted-foreground",e),...t}));Ei.displayName="CardDescription";var Li=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-content",className:i("p-6 pt-0",e),...t}));Li.displayName="CardContent";var Hi=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{ref:o,"data-gds-part":"card-footer",className:i("flex items-center p-6 pt-0",e),...t}));Hi.displayName="CardFooter";var Di=w.forwardRef(({className:e,...t},o)=>w.createElement(Ao.Root,{ref:o,className:i("gds-checkbox peer h-4 w-4 shrink-0 rounded-[3px] border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t},w.createElement(Ao.Indicator,{className:i("flex items-center justify-center text-current")},w.createElement(Check,{className:"h-4 w-4"}))));Di.displayName=Ao.Root.displayName;var Ai={slow:{lineStagger:200,tokenStagger:70,preDelay:500,fadeMs:480},normal:{lineStagger:55,tokenStagger:22,preDelay:200,fadeMs:280},fast:{lineStagger:18,tokenStagger:8,preDelay:60,fadeMs:160}},ec={plain:{color:"var(--gds-code-fg)",backgroundColor:"transparent"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"var(--gds-code-comment)",fontStyle:"normal"}},{types:["punctuation"],style:{color:"var(--gds-code-punctuation)"}},{types:["property","constant","symbol","deleted"],style:{color:"var(--gds-code-property)"}},{types:["boolean","number"],style:{color:"var(--gds-code-number)"}},{types:["selector","attr-name","string","char","builtin","inserted"],style:{color:"var(--gds-code-string)"}},{types:["operator","entity","url"],style:{color:"var(--gds-code-operator)"}},{types:["atrule","keyword"],style:{color:"var(--gds-code-keyword)"}},{types:["function","class-name"],style:{color:"var(--gds-code-function)"}},{types:["regex","important","variable"],style:{color:"var(--gds-code-variable)"}},{types:["tag"],style:{color:"var(--gds-code-tag)"}},{types:["attr-name"],style:{color:"var(--gds-code-attr-name)"}},{types:["attr-value"],style:{color:"var(--gds-code-attr-value)"}}]};function tc(e){let t=new Set;if(e==null)return t;let o=Array.isArray(e)?e:[e];for(let r of o)if(typeof r=="number")t.add(r);else if(Array.isArray(r)&&r.length===2){let[n,a]=r;for(let l=n;l<=a;l++)t.add(l);}return t}function oc(e,t,o){return t?.added?.includes(e)?"added":t?.removed?.includes(e)?"removed":o.has(e)?"highlight":"default"}var Fi=w.forwardRef(function({source:t,language:o="tsx",highlight:r,diff:n,reveal:a="none",trigger:l="mount",play:m,speed:s="normal",delay:c,stagger:d,showLineNumbers:p=false,filename:g,wrap:u=false,bare:b=false,prompt:f,cursor:h,steps:C,loop:S=false,height:x,maxLines:k,className:P,style:V,...N},F){let G=Ai[s],he=c??0,re=d??(a==="typewriter"?G.tokenStagger:G.lineStagger),K=!!(C&&C.length),[O,te]=w.useState(""),[He,se]=w.useState(()=>new Set),v=K?O:t??"",z=w.useMemo(()=>v.replace(/\n$/,""),[v]),H=w.useMemo(()=>tc(r),[r]),X=!!(n?.added?.length||n?.removed?.length),Pe=p||X,le=w.useRef(null);w.useImperativeHandle(F,()=>le.current);let[de,J]=w.useState(a==="none"),nt=useInView(le,{once:true,amount:.55}),it=l==="inView"?G.preDelay:0,Ge=l==="mount"?true:l==="inView"?nt:!!m,Ot=re,er=z.split(`
64
+ `).length,tr=a==="typewriter"?z.replace(/\s+/g," ").split(" ").length:er,Gt=it+he+tr*Ot+280;w.useEffect(()=>{if(K)return;if(!Ge||a==="none"){J(a==="none");return}J(false);let Q=window.setTimeout(()=>J(true),Gt);return ()=>window.clearTimeout(Q)},[Ge,a,Gt,K]),w.useEffect(()=>{if(!K||!C||!Ge)return;let Q=false,Me;te(""),se(new Set),J(false);let Ze=(st,Ce,_t)=>{if(Q)return;if(st>=C.length){J(true),S&&(Me=window.setTimeout(()=>{Q||(te(""),se(new Set),J(false),Ze(0,"",new Set));},2e3));return}let ue=C[st];if(ue.type==="wait"){Me=window.setTimeout(()=>Ze(st+1,Ce,_t),ue.ms);return}if(ue.type==="clear"){te(""),se(new Set),Ze(st+1,"",new Set);return}if(ue.type==="output"){let Wt=Ce.length>0&&!Ce.endsWith(`
65
+ `)?Ce+`
66
+ `:Ce,Ro=Wt+ue.text,Gr=Wt.split(`
67
+ `).length,td=ue.text.split(`
68
+ `).length,_r=new Set(_t);for(let Wr=0;Wr<td;Wr++)_r.add(Gr+Wr);te(Ro),se(_r),Me=window.setTimeout(()=>Ze(st+1,Ro+(Ro.endsWith(`
69
+ `)?"":`
70
+ `),_r),240);return}let St=ue.speed?Ai[ue.speed].tokenStagger:G.tokenStagger,oo=Ce.length>0&&!Ce.endsWith(`
71
+ `)?Ce+`
72
+ `:Ce,wo=0,xo=()=>{if(Q)return;if(wo>=ue.text.length){Ze(st+1,oo+ue.text,_t);return}wo++;let Wt=oo+ue.text.slice(0,wo);te(Wt),Me=window.setTimeout(xo,St);};Me=window.setTimeout(xo,60);};return Ze(0,"",new Set),()=>{Q=true,Me!==void 0&&window.clearTimeout(Me);}},[K,C,Ge,S,G.tokenStagger]);let q=h??(a==="typewriter"||K);return w.createElement("div",{ref:le,"data-gds-part":"code","data-gds-reveal":a,"data-gds-trigger":l,className:i("gds-code relative w-full overflow-hidden text-sm",!b&&["rounded-lg border bg-[var(--gds-code-bg)] text-[var(--gds-code-fg)]","border-border/60"],P),style:V,...N},g&&!b?w.createElement("div",{"data-gds-part":"code-header",className:"flex items-center justify-between border-b border-border/60 px-4 py-2 text-xs text-muted-foreground"},w.createElement("span",{className:"font-mono"},g),o?w.createElement("span",{className:"uppercase tracking-wider opacity-60"},o):null):null,w.createElement(Highlight,{code:z,language:o,theme:ec},({tokens:Q,getLineProps:Me,getTokenProps:Ze})=>w.createElement("pre",{"data-gds-part":"code-pre",className:i("font-mono leading-relaxed",b?"p-0":"px-0 py-3",u?"whitespace-pre-wrap break-words":"overflow-x-auto whitespace-pre",(x!==void 0||k!==void 0)&&"overflow-y-auto"),style:{background:"transparent",margin:0,...k!==void 0?{height:`calc(${k} * 1lh + 0.5rem)`}:x!==void 0&&x!=="auto"?{height:typeof x=="number"?`${x}px`:x}:null}},Q.map((st,Ce)=>{let _t=Ce+1,ue=oc(_t,n,H),St=Me({line:st}),$a=Ce===Q.length-1,oo=K&&He.has(_t),wo=q&&$a&&(!de||h===true),xo=i("flex w-full pr-4",b?"pl-0":"pl-4",ue==="added"&&"bg-[var(--gds-code-diff-added-bg)] text-[var(--gds-code-diff-added-fg)]",ue==="removed"&&"bg-[var(--gds-code-diff-removed-bg)] text-[var(--gds-code-diff-removed-fg)]",ue==="highlight"&&"bg-[var(--gds-code-line-highlight-bg)] shadow-[inset_2px_0_0_0_var(--gds-code-line-highlight-marker)]"),Wt=w.createElement(w.Fragment,null,Pe?w.createElement("span",{"data-gds-part":"code-gutter",className:i("select-none pr-3 text-right font-mono text-xs leading-relaxed opacity-60",X?"w-10":"w-8"),"aria-hidden":true},X?w.createElement("span",{className:"inline-block w-3 text-center"},ue==="added"?"+":ue==="removed"?"-":" "):null,p?w.createElement("span",{className:"ml-1 tabular-nums"},_t):null):null,w.createElement("span",{className:"flex-1",style:oo?{color:"var(--gds-code-comment)"}:void 0},f&&!oo?w.createElement("span",{"data-gds-part":"code-prompt","aria-hidden":true,className:"select-none opacity-60",style:{color:"var(--gds-code-comment)"}},f):null,a==="typewriter"&&Ge&&!K?w.createElement(rc,{line:st,getTokenProps:Ze,delay:it+he+Ce*Ot,stagger:Ot}):st.map((Ro,Gr)=>w.createElement("span",{key:Gr,...Ze({token:Ro})})),wo&&!oo?w.createElement("span",{"data-gds-part":"code-cursor","aria-hidden":true,className:"gds-code-cursor"}):null));return a==="none"||a==="typewriter"||K||!Ge?w.createElement("div",{key:Ce,...St,className:i(St.className,xo),style:{...St.style,opacity:l!=="mount"&&!Ge&&a!=="none"?0:void 0}},Wt):w.createElement(motion.div,{key:Ce,...St,className:i(St.className,xo),initial:{opacity:0,y:a==="diff"?ue==="removed"?-4:6:4},animate:{opacity:1,y:0},transition:{delay:(it+he+Ce*Ot)/1e3,duration:G.fadeMs/1e3,ease:[.22,1,.36,1]},style:St.style},Wt)}))))});Fi.displayName="Code";function rc({line:e,getTokenProps:t,delay:o,stagger:r}){let n=0;return w.createElement(w.Fragment,null,e.map((a,l)=>{let m=/^\s*$/.test(a.content),s=t({token:a});if(m)return w.createElement("span",{key:l,...s});let c=n++;return w.createElement(motion.span,{key:l,...s,initial:{opacity:0},animate:{opacity:1},transition:{delay:(o+c*r)/1e3,duration:.12}})}))}var pt=tt.Root,mt=tt.Trigger,ac=tt.Anchor,ot=w.forwardRef(({className:e,align:t="center",sideOffset:o=4,surface:r="solid",...n},a)=>w.createElement(tt.Portal,null,w.createElement(tt.Content,{ref:a,align:t,sideOffset:o,"data-surface":r,className:i("z-50 w-72 rounded-md border 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 origin-[--radix-popover-content-transform-origin]",et(r,"bg-popover"),ze[r],e),...n})));ot.displayName=tt.Content.displayName;var nc="PPP",ic="LLL dd, y";function sc({value:e,onChange:t,placeholder:o="Pick a date",disabled:r,className:n,contentClassName:a,align:l="start",side:m,format:s=nc,captionLayout:c,icon:d,"aria-label":p}){return w.createElement(pt,null,w.createElement(mt,{asChild:true},w.createElement(Ne,{type:"button",variant:"outline",disabled:r,"aria-label":p??(e?void 0:o),"data-empty":!e,className:i("w-[280px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},d??w.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?format(e,s):w.createElement("span",null,o))),w.createElement(ot,{className:i("w-auto p-0",a),align:l,side:m},w.createElement(mr,{mode:"single",selected:e,onSelect:t,captionLayout:c,initialFocus:true})))}function lc({value:e,onChange:t,placeholder:o="Pick a date range",disabled:r,className:n,contentClassName:a,align:l="start",side:m,format:s=ic,captionLayout:c,icon:d,numberOfMonths:p=2,"aria-label":g}){let u=!!e?.from;return w.createElement(pt,null,w.createElement(mt,{asChild:true},w.createElement(Ne,{type:"button",variant:"outline",disabled:r,"aria-label":g??(u?void 0:o),"data-empty":!u,className:i("w-[300px] justify-start text-left font-normal data-[empty=true]:text-muted-foreground",n)},d??w.createElement(CalendarIcon,{className:"mr-2 h-4 w-4","aria-hidden":true}),e?.from?e.to?w.createElement(w.Fragment,null,format(e.from,s)," \u2013"," ",format(e.to,s)):format(e.from,s):w.createElement("span",null,o))),w.createElement(ot,{className:i("w-auto p-0",a),align:l,side:m},w.createElement(mr,{mode:"range",selected:e,onSelect:t,defaultMonth:e?.from,numberOfMonths:p,captionLayout:c,initialFocus:true})))}var cc=ae.Root,pc=ae.Trigger,Bi=ae.Portal,mc=ae.Close,ea=w.forwardRef(({className:e,...t},o)=>w.createElement(ae.Overlay,{ref:o,className:i("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ea.displayName=ae.Overlay.displayName;var Vi=w.forwardRef(({className:e,children:t,surface:o="solid",...r},n)=>w.createElement(Bi,null,w.createElement(ea,null),w.createElement(ae.Content,{ref:n,"data-surface":o,className:i("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",et(o,"bg-background"),ze[o],e),...r},t,w.createElement(ae.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},w.createElement(X,{className:"h-4 w-4"}),w.createElement("span",{className:"sr-only"},"Close")))));Vi.displayName=ae.Content.displayName;var Oi=({className:e,...t})=>w.createElement("div",{className:i("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Oi.displayName="DialogHeader";var Gi=({className:e,...t})=>w.createElement("div",{className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Gi.displayName="DialogFooter";var _i=w.forwardRef(({className:e,...t},o)=>w.createElement(ae.Title,{ref:o,className:i("text-lg font-semibold leading-none tracking-tight",e),...t}));_i.displayName=ae.Title.displayName;var Wi=w.forwardRef(({className:e,...t},o)=>w.createElement(ae.Description,{ref:o,className:i("text-sm text-muted-foreground",e),...t}));Wi.displayName=ae.Description.displayName;var hc=I.Root,bc=I.Trigger,vc=I.Group,yc=I.Portal,wc=I.Sub,xc=I.RadioGroup,Ui=w.forwardRef(({className:e,inset:t,children:o,...r},n)=>w.createElement(I.SubTrigger,{ref:n,className:i("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r},o,w.createElement(ChevronRight,{className:"ml-auto"})));Ui.displayName=I.SubTrigger.displayName;var $i=w.forwardRef(({className:e,surface:t="solid",...o},r)=>w.createElement(I.SubContent,{ref:r,"data-surface":t,className:i("z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 text-popover-foreground shadow-lg 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 origin-[--radix-dropdown-menu-content-transform-origin]",et(t,"bg-popover"),ze[t],e),...o}));$i.displayName=I.SubContent.displayName;var ji=w.forwardRef(({className:e,sideOffset:t=4,surface:o="solid",...r},n)=>w.createElement(I.Portal,null,w.createElement(I.Content,{ref:n,sideOffset:t,"data-surface":o,className:i("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border p-1 text-popover-foreground shadow-md","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 origin-[--radix-dropdown-menu-content-transform-origin]",et(o,"bg-popover"),ze[o],e),...r})));ji.displayName=I.Content.displayName;var Ki=w.forwardRef(({className:e,inset:t,...o},r)=>w.createElement(I.Item,{ref:r,className:i("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));Ki.displayName=I.Item.displayName;var qi=w.forwardRef(({className:e,children:t,checked:o,...r},n)=>w.createElement(I.CheckboxItem,{ref:n,className:i("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r},w.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},w.createElement(I.ItemIndicator,null,w.createElement(Check,{className:"h-4 w-4"}))),t));qi.displayName=I.CheckboxItem.displayName;var Yi=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(I.RadioItem,{ref:r,className:i("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},w.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},w.createElement(I.ItemIndicator,null,w.createElement(Circle,{className:"h-2 w-2 fill-current"}))),t));Yi.displayName=I.RadioItem.displayName;var Zi=w.forwardRef(({className:e,inset:t,...o},r)=>w.createElement(I.Label,{ref:r,className:i("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));Zi.displayName=I.Label.displayName;var Xi=w.forwardRef(({className:e,...t},o)=>w.createElement(I.Separator,{ref:o,className:i("-mx-1 my-1 h-px bg-muted",e),...t}));Xi.displayName=I.Separator.displayName;var Ji=({className:e,...t})=>w.createElement("span",{className:i("ml-auto text-xs tracking-widest opacity-60",e),...t});Ji.displayName="DropdownMenuShortcut";var Sc=cva("flex w-full rounded-md border border-input bg-transparent shadow-sm transition-colors file:border-0 file:bg-transparent file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{default:"h-9 pl-3 pr-3 py-1 text-base file:text-sm md:text-sm",sm:"h-8 pl-2 pr-2 py-1 text-xs file:text-xs"}},defaultVariants:{size:"default"}}),Qi=w.forwardRef(({className:e,type:t,size:o="default",...r},n)=>w.createElement("input",{type:t,className:i(Sc({size:o}),e),ref:n,...r}));Qi.displayName="Input";var kc=cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),es=w.forwardRef(({className:e,...t},o)=>w.createElement(ta.Root,{ref:o,className:i(kc(),e),...t}));es.displayName=ta.Root.displayName;var ts=w.forwardRef(({className:e,value:t,...o},r)=>w.createElement(zo.Root,{ref:r,className:i("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...o},w.createElement(zo.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})));ts.displayName=zo.Root.displayName;var oa=w.forwardRef(({className:e,...t},o)=>w.createElement(Command,{ref:o,className:i("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));oa.displayName=Command.displayName;var ra=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":""},w.createElement(Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),w.createElement(Command.Input,{ref:o,className:i("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})));ra.displayName=Command.Input.displayName;var aa=w.forwardRef(({className:e,...t},o)=>w.createElement(Command.List,{ref:o,className:i("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));aa.displayName=Command.List.displayName;var na=w.forwardRef((e,t)=>w.createElement(Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));na.displayName=Command.Empty.displayName;var br=w.forwardRef(({className:e,...t},o)=>w.createElement(Command.Group,{ref:o,className:i("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));br.displayName=Command.Group.displayName;var ia=w.forwardRef(({className:e,...t},o)=>w.createElement(Command.Separator,{ref:o,className:i("-mx-1 h-px bg-border",e),...t}));ia.displayName=Command.Separator.displayName;var uo=w.forwardRef(({className:e,...t},o)=>w.createElement(Command.Item,{ref:o,className:i("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));uo.displayName=Command.Item.displayName;var Bo=w.forwardRef(({className:e,orientation:t="horizontal",decorative:o=true,...r},n)=>w.createElement(sa.Root,{ref:n,decorative:o,orientation:t,className:i("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));Bo.displayName=sa.Root.displayName;var Hc=3,os=w.forwardRef(function({options:t,value:o,defaultValue:r,onValueChange:n,placeholder:a="Select\u2026",searchPlaceholder:l="Search\u2026",emptyMessage:m="Nothing matches.",maxCount:s=Hc,searchable:c=true,badgeDismissible:d=true,disabled:p=false,modalPopover:g=false,className:u,id:b,"aria-label":f,...h},C){let S=o!==void 0,[x,k]=w.useState(r??[]),P=S?o:x,[V,N]=w.useState(false),F=w.useMemo(()=>{let v=new Map;for(let z of t)v.set(z.value,z);return v},[t]),G=w.useCallback(v=>{S||k(v),n?.(v);},[S,n]),he=v=>{P.includes(v)?G(P.filter(z=>z!==v)):G([...P,v]);},re=(v,z)=>{v.preventDefault(),v.stopPropagation(),G(P.filter(H=>H!==z));},K=v=>{v?.preventDefault(),v?.stopPropagation(),G([]);},O=()=>{let v=t.filter(z=>!z.disabled).map(z=>z.value);G(v);},te=t.length>0&&t.filter(v=>!v.disabled).every(v=>P.includes(v.value)),He=P.slice(0,s),se=Math.max(0,P.length-s);return w.createElement(pt,{open:V,onOpenChange:N,modal:g},w.createElement(mt,{asChild:true},w.createElement("button",{ref:C,type:"button",id:b,role:"combobox","aria-expanded":V,"aria-haspopup":"listbox","aria-label":f,disabled:p,"data-gds-part":"multi-select",className:i("flex min-h-9 w-full items-center justify-between gap-2 rounded-md border border-input bg-transparent pl-2 pr-2 text-sm shadow-sm","ring-offset-background placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring","disabled:cursor-not-allowed disabled:opacity-50","[&[data-state=open]]:ring-1 [&[data-state=open]]:ring-ring",u)},P.length===0?w.createElement("span",{className:"text-muted-foreground px-1"},a):w.createElement("div",{className:"flex flex-1 flex-wrap items-center gap-1 py-1","data-gds-part":"multi-select-badges"},He.map(v=>{let z=F.get(v);if(!z)return null;let H=z.icon;return w.createElement(cr,{key:v,variant:"secondary",className:"gap-1 pr-1","data-gds-part":"multi-select-badge"},H?w.createElement(H,{className:"h-3 w-3"}):null,w.createElement("span",{className:"truncate max-w-[12rem]"},z.label),d&&!p&&w.createElement("span",{role:"button","aria-label":`Remove ${z.label}`,tabIndex:0,onClick:X=>re(X,v),onKeyDown:X=>{(X.key==="Enter"||X.key===" ")&&re(X,v);},className:"ml-0.5 inline-flex h-4 w-4 cursor-pointer items-center justify-center rounded-sm hover:bg-muted-foreground/20"},w.createElement(X,{className:"h-3 w-3","aria-hidden":true})))}),se>0&&w.createElement(cr,{variant:"outline",className:"text-muted-foreground","data-gds-part":"multi-select-overflow",title:P.slice(s).map(v=>F.get(v)?.label??v).join(", ")},"+",se," more")),w.createElement("div",{className:"flex shrink-0 items-center gap-1"},P.length>0&&!p&&w.createElement("span",{role:"button","aria-label":"Clear all",tabIndex:0,onClick:v=>K(v),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&K(v);},className:"inline-flex h-5 w-5 cursor-pointer items-center justify-center rounded-sm text-muted-foreground hover:text-foreground hover:bg-muted"},w.createElement(XCircle,{className:"h-3.5 w-3.5","aria-hidden":true})),w.createElement(ChevronDown,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":true})))),w.createElement(ot,{align:"start",className:"w-[var(--radix-popover-trigger-width)] p-0","data-gds-part":"multi-select-content"},w.createElement(oa,null,c&&w.createElement(ra,{placeholder:l}),w.createElement(aa,null,w.createElement(na,null,m),w.createElement(br,null,t.map(v=>{let z=v.icon,H=P.includes(v.value);return w.createElement(uo,{key:v.value,value:v.label,onSelect:()=>he(v.value),disabled:v.disabled,"data-gds-part":"multi-select-item","data-selected":H||void 0},w.createElement("div",{className:i("mr-2 flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-primary",H?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),"aria-hidden":true},w.createElement(Check,{className:"h-3 w-3"})),z?w.createElement(z,{className:"mr-2 h-4 w-4 text-muted-foreground"}):null,w.createElement("span",{className:"truncate"},v.label))})),w.createElement(ia,null),w.createElement(br,null,w.createElement("div",{className:"flex items-center justify-between gap-1 p-1"},w.createElement(uo,{onSelect:O,className:"flex-1 justify-center text-xs",disabled:te},"Select all"),w.createElement(Bo,{orientation:"vertical",className:"h-5"}),w.createElement(uo,{onSelect:()=>K(),className:"flex-1 justify-center text-xs",disabled:P.length===0},"Clear"),w.createElement(Bo,{orientation:"vertical",className:"h-5"}),w.createElement(uo,{onSelect:()=>N(false),className:"flex-1 justify-center text-xs"},"Close")))))))});os.displayName="MultiSelect";var rs=w.forwardRef(({className:e,...t},o)=>w.createElement(Ht.Root,{className:i("grid gap-2",e),...t,ref:o}));rs.displayName=Ht.Root.displayName;var as=w.forwardRef(({className:e,...t},o)=>w.createElement(Ht.Item,{ref:o,className:i("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t},w.createElement(Ht.Indicator,{className:"flex items-center justify-center"},w.createElement(Circle,{className:"h-2.5 w-2.5 fill-current text-current"}))));as.displayName=Ht.Item.displayName;var Ic=({className:e,...t})=>w.createElement(go.PanelGroup,{"data-gds-part":"resizable-panel-group",className:i("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),Fc=go.Panel,zc=({withHandle:e,className:t,...o})=>w.createElement(go.PanelResizeHandle,{"data-gds-part":"resizable-handle",className:i("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...o},e&&w.createElement("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border"},w.createElement(GripVertical,{className:"h-2.5 w-2.5"})));var ns=cva("gds-row flex flex-row",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{true:"flex-wrap",false:"flex-nowrap"}},defaultVariants:{gap:"md",align:"center",justify:"start",wrap:false}}),is=w.forwardRef(({className:e,gap:t,align:o,justify:r,wrap:n,asChild:a=false,...l},m)=>w.createElement(a?Slot:"div",{ref:m,"data-gds-part":"row",className:i(ns({gap:t,align:o,justify:r,wrap:n,className:e})),...l}));is.displayName="Row";var ss=cva("gds-grid grid",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 md:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",5:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",12:"grid-cols-4 md:grid-cols-6 lg:grid-cols-12"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"}},defaultVariants:{cols:"3",gap:"md",align:"stretch"}}),ls=w.forwardRef(({className:e,cols:t,gap:o,align:r,asChild:n=false,...a},l)=>w.createElement(n?Slot:"div",{ref:l,"data-gds-part":"grid",className:i(ss({cols:t,gap:o,align:r,className:e})),...a}));ls.displayName="Grid";var ds=cva("gds-flex flex",{variants:{direction:{row:"flex-row",col:"flex-col","row-reverse":"flex-row-reverse","col-reverse":"flex-col-reverse"},gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch",baseline:"items-baseline"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"},wrap:{nowrap:"flex-nowrap",wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse"}},defaultVariants:{direction:"row",gap:"none",align:"stretch",justify:"start",wrap:"nowrap"}}),cs=w.forwardRef(({className:e,direction:t,gap:o,align:r,justify:n,wrap:a,asChild:l=false,...m},s)=>w.createElement(l?Slot:"div",{ref:s,"data-gds-part":"flex",className:i(ds({direction:t,gap:o,align:r,justify:n,wrap:a,className:e})),...m}));cs.displayName="Flex";var ps=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(Ke.Root,{ref:r,className:i("relative overflow-hidden",e),...o},w.createElement(Ke.Viewport,{className:"h-full w-full rounded-[inherit]"},t),w.createElement(la,null),w.createElement(Ke.Corner,null)));ps.displayName=Ke.Root.displayName;var la=w.forwardRef(({className:e,orientation:t="vertical",...o},r)=>w.createElement(Ke.ScrollAreaScrollbar,{ref:r,orientation:t,className:i("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o},w.createElement(Ke.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));la.displayName=Ke.ScrollAreaScrollbar.displayName;var Kc=B.Root,qc=B.Group,Yc=B.Value,Zc=cva("flex w-full items-center justify-between rounded-md border border-input bg-background ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",{variants:{size:{default:"h-10 px-3 py-2 text-sm",sm:"h-8 px-2 py-1 text-xs"}},defaultVariants:{size:"default"}}),us=w.forwardRef(({className:e,children:t,size:o="default",...r},n)=>w.createElement(B.Trigger,{ref:n,className:i(Zc({size:o}),e),...r},t,w.createElement(B.Icon,{asChild:true},w.createElement(ChevronDown,{className:i("opacity-50",o==="sm"?"h-3.5 w-3.5":"h-4 w-4")}))));us.displayName=B.Trigger.displayName;var da=w.forwardRef(({className:e,...t},o)=>w.createElement(B.ScrollUpButton,{ref:o,className:i("flex cursor-default items-center justify-center py-1",e),...t},w.createElement(ChevronUp,{className:"h-4 w-4"})));da.displayName=B.ScrollUpButton.displayName;var ca=w.forwardRef(({className:e,...t},o)=>w.createElement(B.ScrollDownButton,{ref:o,className:i("flex cursor-default items-center justify-center py-1",e),...t},w.createElement(ChevronDown,{className:"h-4 w-4"})));ca.displayName=B.ScrollDownButton.displayName;var gs=w.forwardRef(({className:e,children:t,position:o="popper",...r},n)=>w.createElement(B.Portal,null,w.createElement(B.Content,{ref:n,className:i("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...r},w.createElement(da,null),w.createElement(B.Viewport,{className:i("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]")},t),w.createElement(ca,null))));gs.displayName=B.Content.displayName;var fs=w.forwardRef(({className:e,...t},o)=>w.createElement(B.Label,{ref:o,className:i("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));fs.displayName=B.Label.displayName;var hs=w.forwardRef(({className:e,children:t,...o},r)=>w.createElement(B.Item,{ref:r,className:i("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o},w.createElement("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},w.createElement(B.ItemIndicator,null,w.createElement(Check,{className:"h-4 w-4"}))),w.createElement(B.ItemText,null,t)));hs.displayName=B.Item.displayName;var bs=w.forwardRef(({className:e,...t},o)=>w.createElement(B.Separator,{ref:o,className:i("-mx-1 my-1 h-px bg-muted",e),...t}));bs.displayName=B.Separator.displayName;var Qc=ae.Root,ep=ae.Trigger,tp=ae.Close,vs=ae.Portal,pa=w.forwardRef(({className:e,...t},o)=>w.createElement(ae.Overlay,{className:i("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));pa.displayName=ae.Overlay.displayName;var op=cva("fixed z-50 gap-4 p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ys=w.forwardRef(({side:e="right",surface:t="solid",className:o,children:r,...n},a)=>w.createElement(vs,null,w.createElement(pa,null),w.createElement(ae.Content,{ref:a,"data-surface":t,className:i(op({side:e}),et(t,"bg-background"),ze[t],o),...n},r,w.createElement(ae.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary"},w.createElement(X,{className:"h-4 w-4"}),w.createElement("span",{className:"sr-only"},"Close")))));ys.displayName=ae.Content.displayName;var ws=({className:e,...t})=>w.createElement("div",{className:i("flex flex-col space-y-2 text-center sm:text-left",e),...t});ws.displayName="SheetHeader";var xs=({className:e,...t})=>w.createElement("div",{className:i("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});xs.displayName="SheetFooter";var Rs=w.forwardRef(({className:e,...t},o)=>w.createElement(ae.Title,{ref:o,className:i("text-lg font-semibold text-foreground",e),...t}));Rs.displayName=ae.Title.displayName;var Ss=w.forwardRef(({className:e,...t},o)=>w.createElement(ae.Description,{ref:o,className:i("text-sm text-muted-foreground",e),...t}));Ss.displayName=ae.Description.displayName;function rp({className:e,...t}){return React.createElement("div",{className:i("animate-pulse rounded-md bg-muted",e),...t})}var Cs=w.forwardRef(({className:e,...t},o)=>w.createElement(xt.Root,{ref:o,className:i("relative flex w-full touch-none select-none items-center",e),...t},w.createElement(xt.Track,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary"},w.createElement(xt.Range,{className:"absolute h-full bg-primary"})),w.createElement(xt.Thumb,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})));Cs.displayName=xt.Root.displayName;var up={vertical:verticalListSortingStrategy,horizontal:horizontalListSortingStrategy,grid:rectSortingStrategy},ma=w.createContext(null),Hs=w.createContext(null),ua=w.forwardRef(function({disabled:t=false,className:o,children:r,...n},a){let l=w.useRef(new Map),m=w.useCallback(p=>(l.current.set(p.id,p),()=>{l.current.delete(p.id);}),[]),s=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:4}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),c=p=>{let g=l.current,u=g.get(String(p));if(u)return u;for(let b of g.values())if(b.values.some(f=>f===p))return b;return null},d=w.useCallback(p=>{if(t)return;let{active:g,over:u}=p;if(!u)return;let b=c(g.id),f=c(u.id);if(!b||!f)return;if(b.id===f.id){if(g.id===u.id)return;let x=b.values.findIndex(P=>P===g.id),k=b.values.findIndex(P=>P===u.id);if(x===-1||k===-1)return;b.onReorder?.(arrayMove(b.values,x,k));return}let h=b.values.filter(x=>x!==g.id),C=u.id===f.id?f.values.length:Math.max(0,f.values.findIndex(x=>x===u.id)),S=[...f.values.slice(0,C),g.id,...f.values.slice(C)];b.onReorder?.(h),f.onReorder?.(S);},[t]);return w.createElement(Hs.Provider,{value:{registerContainer:m}},w.createElement(DndContext,{sensors:s,collisionDetection:closestCorners,onDragEnd:d},w.createElement("div",{ref:a,"data-gds-part":"sortable-group","data-disabled":t||void 0,className:i(o),...n},r)))});ua.displayName="Sortable.Group";var Oo=w.forwardRef(function({values:t,onReorder:o,strategy:r="vertical",disabled:n=false,id:a,className:l,children:m,...s},c){let d=w.useContext(Hs),p=d!==null,g=w.useId(),u=a??g;w.useEffect(()=>{if(p)return d.registerContainer({id:u,values:t,onReorder:o})},[p,d,u,t,o]);let b=useSensors(useSensor(PointerSensor,{activationConstraint:{distance:4}}),useSensor(KeyboardSensor,{coordinateGetter:sortableKeyboardCoordinates})),f=w.useCallback(S=>{let{active:x,over:k}=S;if(!k||x.id===k.id)return;let P=t.findIndex(N=>N===x.id),V=t.findIndex(N=>N===k.id);P===-1||V===-1||o?.(arrayMove(t,P,V));},[t,o]),h=w.useMemo(()=>({disabled:n}),[n]),C=w.createElement(SortableContext,{items:t,strategy:up[r]},w.createElement(gp,{id:u,enabled:p,forwardedRef:c,strategy:r,disabled:n,className:l,...s},m));return p?w.createElement(ma.Provider,{value:h},C):w.createElement(ma.Provider,{value:h},w.createElement(DndContext,{sensors:b,collisionDetection:closestCenter,onDragEnd:f},C))});Oo.displayName="Sortable";function gp({id:e,enabled:t,forwardedRef:o,strategy:r,disabled:n,className:a,children:l,...m}){let s=useDroppable({id:e,disabled:!t}),c=w.useCallback(d=>{t&&s.setNodeRef(d),typeof o=="function"?o(d):o&&(o.current=d);},[t,s,o]);return w.createElement("div",{ref:c,"data-gds-part":"sortable","data-strategy":r,"data-disabled":n||void 0,className:i(a),...m},l)}var Ds=w.createContext(null),ga=w.forwardRef(function({value:t,asChild:o=false,disabled:r,className:n,style:a,children:l,...m},s){let c=w.useContext(ma);if(!c)throw new Error("<Sortable.Item> must be rendered inside <Sortable>.");let d=c.disabled||r||false,{attributes:p,listeners:g,setNodeRef:u,setActivatorNodeRef:b,transform:f,transition:h,isDragging:C}=useSortable({id:t,disabled:d}),S=w.useRef(false),x=w.useCallback(N=>{u(N),typeof s=="function"?s(N):s&&(s.current=N);},[u,s]),k=w.useMemo(()=>({listeners:g,setActivatorNodeRef:b,hasHandle:S,disabled:d}),[g,b,d]),P={transform:CSS.Transform.toString(f),transition:h,zIndex:C?1:void 0,cursor:d?"default":S.current?void 0:"grab",...a},V=o?Slot:"div";return w.createElement(Ds.Provider,{value:k},w.createElement(V,{ref:x,"data-gds-part":"sortable-item","data-value":String(t),"data-dragging":C||void 0,className:i(n),style:P,...p,...S.current?{}:g,...m},l))});ga.displayName="Sortable.Item";var fa=w.forwardRef(function({asChild:t=false,className:o,children:r,...n},a){let l=w.useContext(Ds);if(!l)throw new Error("<Sortable.Handle> must be rendered inside <Sortable.Item>.");w.useLayoutEffect(()=>(l.hasHandle.current=true,()=>{l.hasHandle.current=false;}),[l.hasHandle]);let m=w.useCallback(c=>{l.setActivatorNodeRef(c),typeof a=="function"?a(c):a&&(a.current=c);},[l,a]),s={"data-gds-part":"sortable-handle","aria-label":"Drag to reorder",className:i("cursor-grab touch-none select-none",l.disabled&&"cursor-default opacity-50",o),...l.disabled?{}:l.listeners,...n};return t?w.createElement(Slot,{ref:m,...s},r):w.createElement("button",{type:"button",ref:m,...s},r)});fa.displayName="Sortable.Handle";Oo.Item=ga;Oo.Handle=fa;Oo.Group=ua;var fp=Oo;var As=cva("gds-stack flex flex-col",{variants:{gap:{none:"gap-0",xs:"gap-1",sm:"gap-2",md:"gap-4",lg:"gap-6",xl:"gap-8","2xl":"gap-12"},align:{start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},justify:{start:"justify-start",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around",evenly:"justify-evenly"}},defaultVariants:{gap:"md",align:"stretch",justify:"start"}}),Is=w.forwardRef(({className:e,gap:t,align:o,justify:r,asChild:n=false,...a},l)=>w.createElement(n?Slot:"div",{ref:l,"data-gds-part":"stack",className:i(As({gap:t,align:o,justify:r,className:e})),...a}));Is.displayName="Stack";var Fs=w.forwardRef(({className:e,...t},o)=>w.createElement(_o.Root,{className:i("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:o},w.createElement(_o.Thumb,{className:i("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})));Fs.displayName=_o.Root.displayName;var zs=w.forwardRef(({className:e,...t},o)=>w.createElement("div",{className:"relative w-full overflow-auto"},w.createElement("table",{ref:o,className:i("w-full caption-bottom text-sm",e),...t})));zs.displayName="Table";var Bs=w.forwardRef(({className:e,...t},o)=>w.createElement("thead",{ref:o,className:i("[&_tr]:border-b",e),...t}));Bs.displayName="TableHeader";var Vs=w.forwardRef(({className:e,...t},o)=>w.createElement("tbody",{ref:o,className:i("[&_tr:last-child]:border-0",e),...t}));Vs.displayName="TableBody";var Os=w.forwardRef(({className:e,...t},o)=>w.createElement("tfoot",{ref:o,className:i("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));Os.displayName="TableFooter";var Gs=w.forwardRef(({className:e,...t},o)=>w.createElement("tr",{ref:o,className:i("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Gs.displayName="TableRow";var _s=w.forwardRef(({className:e,...t},o)=>w.createElement("th",{ref:o,className:i("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));_s.displayName="TableHead";var Ws=w.forwardRef(({className:e,...t},o)=>w.createElement("td",{ref:o,className:i("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t}));Ws.displayName="TableCell";var Us=w.forwardRef(({className:e,...t},o)=>w.createElement("caption",{ref:o,className:i("mt-4 text-sm text-muted-foreground",e),...t}));Us.displayName="TableCaption";var $s=w.createContext(w.createElement(ChevronRight,null)),js=w.forwardRef(({separator:e,children:t,...o},r)=>w.createElement($s.Provider,{value:e??w.createElement(ChevronRight,null)},w.createElement("nav",{ref:r,"aria-label":"breadcrumb",...o},t)));js.displayName="Breadcrumb";var Ks=w.forwardRef(({className:e,...t},o)=>w.createElement("ol",{ref:o,className:i("flex flex-wrap items-center gap-1.5 break-words text-xs text-muted-foreground",e),...t}));Ks.displayName="BreadcrumbList";var qs=w.forwardRef(({className:e,...t},o)=>w.createElement("li",{ref:o,className:i("inline-flex items-center gap-1.5",e),...t}));qs.displayName="BreadcrumbItem";var Cr=i("inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 text-xs","transition-colors hover:text-foreground hover:bg-muted/60","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0"),Ys=w.forwardRef(({asChild:e,className:t,href:o,...r},n)=>e?w.createElement("span",{ref:n,className:i(Cr,t),...r}):o?w.createElement("a",{ref:n,href:o,className:i(Cr,t),...r}):w.createElement("button",{ref:n,type:"button",className:i(Cr,t),...r}));Ys.displayName="BreadcrumbLink";var Zs=w.forwardRef(({className:e,...t},o)=>w.createElement("span",{ref:o,role:"link","aria-disabled":"true","aria-current":"page",className:i("inline-flex items-center gap-1.5 px-0.5 text-xs font-medium text-foreground","[&_svg]:pointer-events-none [&_svg]:size-3.5 [&_svg]:shrink-0",e),...t}));Zs.displayName="BreadcrumbPage";var Xs=({children:e,className:t,...o})=>{let r=w.useContext($s);return w.createElement("li",{role:"presentation","aria-hidden":"true",className:i("[&_svg]:size-3 [&_svg]:shrink-0 text-muted-foreground/60",t),...o},e??r)};Xs.displayName="BreadcrumbSeparator";var Js=({className:e,...t})=>w.createElement("span",{role:"presentation","aria-hidden":"true",className:i("flex h-5 w-5 items-center justify-center",e),...t},w.createElement(MoreHorizontal,{className:"h-3.5 w-3.5"}),w.createElement("span",{className:"sr-only"},"More"));Js.displayName="BreadcrumbEllipsis";var Qs=w.forwardRef(({label:e,items:t,onSelect:o,onSelectLabel:r,current:n,className:a},l)=>{let[m,s]=w.useState(false);return w.createElement(pt,{open:m,onOpenChange:s},w.createElement(mt,{asChild:true},w.createElement("button",{ref:l,type:"button",className:i(Cr,n&&"font-medium text-foreground",a),onClick:()=>{r?r():s(c=>!c);}},w.createElement("span",null,e),w.createElement(ChevronDown,{className:i("h-3 w-3 text-muted-foreground transition-transform",m&&"rotate-180"),onClick:c=>{c.stopPropagation(),s(d=>!d);},role:"button","aria-label":`Show ${e} children`}))),w.createElement(ot,{align:"start",className:"w-64 p-1 max-h-80 overflow-y-auto"},t.length===0?w.createElement("p",{className:"px-2 py-1.5 text-xs text-muted-foreground"},"No items here yet."):w.createElement("ul",{className:"flex flex-col gap-0.5"},t.map(c=>w.createElement("li",{key:c.id},w.createElement("button",{type:"button",onClick:()=>{o(c.id),s(false);},className:i("w-full text-left rounded-md px-2 py-1.5","flex items-start gap-2","hover:bg-muted transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",c.active&&"bg-muted/60")},w.createElement("span",{className:"flex-1 min-w-0"},w.createElement("span",{className:"flex items-center gap-1.5"},w.createElement("span",{className:"text-xs font-medium text-foreground truncate"},c.label),c.active&&w.createElement(Check,{className:"h-3 w-3 text-primary shrink-0"})),c.summary&&w.createElement("span",{className:"block text-[10px] text-muted-foreground leading-snug truncate"},c.summary)),c.hasChildren&&w.createElement(ChevronRight,{className:"h-3 w-3 text-muted-foreground/70 shrink-0 mt-0.5"})))))))});Qs.displayName="BreadcrumbMenuTrigger";var ba=rt.Provider,Zt=rt.Root,Xt=rt.Trigger,Dt=w.forwardRef(({className:e,sideOffset:t=4,...o},r)=>w.createElement(rt.Portal,null,w.createElement(rt.Content,{ref:r,sideOffset:t,className:i("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]",e),...o})));Dt.displayName=rt.Content.displayName;var tl=w.createContext({size:"md",variant:"pill"}),xp=at.Root,Rp=cva("inline-flex items-center text-muted-foreground",{variants:{variant:{pill:"justify-center rounded-lg bg-muted",underlined:"justify-start border-b border-border"},size:{sm:"",md:"",lg:""}},compoundVariants:[{variant:"pill",size:"sm",className:"h-7 p-0.5"},{variant:"pill",size:"md",className:"h-8 p-0.5"},{variant:"pill",size:"lg",className:"h-10 p-1"},{variant:"underlined",size:"sm",className:"gap-3"},{variant:"underlined",size:"md",className:"gap-4"},{variant:"underlined",size:"lg",className:"gap-6"}],defaultVariants:{variant:"pill",size:"md"}}),Sp=cva("inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",{variants:{variant:{pill:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground",underlined:"rounded-none bg-transparent border-b-2 border-transparent -mb-px hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-primary"},size:{sm:"text-[11px] gap-1 [&_svg]:size-3",md:"text-xs gap-1.5 [&_svg]:size-3.5",lg:"text-sm gap-2 [&_svg]:size-4"}},compoundVariants:[{variant:"pill",size:"sm",className:"h-6 px-1.5"},{variant:"pill",size:"md",className:"h-7 px-2"},{variant:"pill",size:"lg",className:"h-8 px-2.5"},{variant:"underlined",size:"sm",className:"pb-1.5 pt-1 px-1"},{variant:"underlined",size:"md",className:"pb-2 pt-1.5 px-1.5"},{variant:"underlined",size:"lg",className:"pb-2.5 pt-2 px-2"}],defaultVariants:{variant:"pill",size:"md"}}),ol=w.forwardRef(({className:e,size:t="md",variant:o="pill",children:r,...n},a)=>w.createElement(tl.Provider,{value:{size:t??"md",variant:o??"pill"}},w.createElement(at.List,{ref:a,className:i(Rp({size:t,variant:o}),e),...n},r)));ol.displayName=at.List.displayName;var rl=w.forwardRef(({className:e,size:t,variant:o,tooltip:r,...n},a)=>{let l=w.useContext(tl),m=t??l.size,s=o??l.variant,c=n["aria-label"]??(typeof r=="string"?r:void 0),d=w.createElement(at.Trigger,{ref:a,className:i(Sp({size:m,variant:s}),e),"aria-label":c,...n});return r?w.createElement(Zt,null,w.createElement(Xt,{asChild:true},d),w.createElement(Dt,null,r)):d});rl.displayName=at.Trigger.displayName;var al=w.forwardRef(({className:e,...t},o)=>w.createElement(at.Content,{ref:o,className:i("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));al.displayName=at.Content.displayName;var nl=w.forwardRef(({className:e,...t},o)=>w.createElement("textarea",{className:i("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));nl.displayName="Textarea";var il=cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm 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"}}),sl=w.forwardRef(({className:e,variant:t,size:o,...r},n)=>w.createElement(va.Root,{ref:n,className:i(il({variant:t,size:o,className:e})),...r}));sl.displayName=va.Root.displayName;var dl=w.createContext("md"),kp=cva("inline-flex items-center justify-center rounded-lg bg-muted text-muted-foreground",{variants:{size:{sm:"h-7 p-0.5",md:"h-8 p-0.5",lg:"h-10 p-1"}},defaultVariants:{size:"md"}}),Tp=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 data-[state=on]:bg-background data-[state=on]:text-foreground",{variants:{size:{sm:"h-6 px-1.5 text-[11px] gap-1 [&_svg]:size-3",md:"h-7 px-2 text-xs gap-1.5 [&_svg]:size-3.5",lg:"h-8 px-2.5 text-sm gap-2 [&_svg]:size-4"}},defaultVariants:{size:"md"}}),cl=w.forwardRef(({className:e,size:t="md",children:o,...r},n)=>w.createElement(dl.Provider,{value:t??"md"},w.createElement(fo.Root,{ref:n,className:i(kp({size:t}),e),...r},o)));cl.displayName=fo.Root.displayName;var pl=w.forwardRef(({className:e,size:t,tooltip:o,tooltipSide:r="top",tooltipDelay:n,"aria-label":a,...l},m)=>{let s=w.useContext(dl),c=t??s,d=a??(typeof o=="string"?o:void 0),p=w.createElement(fo.Item,{ref:m,className:i(Tp({size:c}),e),"aria-label":d,...l});return o==null?p:w.createElement(Zt,{delayDuration:n},w.createElement(Xt,{asChild:true},w.createElement("span",{className:"inline-flex"},p)),w.createElement(Dt,{side:r},o))});pl.displayName=fo.Item.displayName;var Mp=cva("grid items-center w-full gap-3 [grid-template-columns:auto_1fr_auto]",{variants:{position:{top:"border-b border-border",bottom:"border-t border-border",inline:""},variant:{default:"bg-background",subtle:"bg-muted/30",transparent:"bg-transparent"},size:{sm:"min-h-10 px-3",md:"min-h-12 px-4",lg:"min-h-14 px-6"},sticky:{true:"",false:""}},compoundVariants:[{sticky:true,position:"top",className:"sticky top-0 z-20"},{sticky:true,position:"bottom",className:"sticky bottom-0 z-20"}],defaultVariants:{position:"top",variant:"default",size:"md",sticky:false}}),ml=w.forwardRef(({className:e,position:t,variant:o,size:r,sticky:n,leading:a,center:l,trailing:m,children:s,"aria-label":c,...d},p)=>{let g=s==null;return w.createElement("div",{ref:p,role:"toolbar","aria-label":c??"Toolbar","data-gds-part":"toolbar","data-position":t??"top",className:i(Mp({position:t,variant:o,size:r,sticky:n}),e),...d},g?w.createElement(w.Fragment,null,w.createElement("div",{"data-gds-part":"toolbar-leading",className:"flex items-center min-w-0"},a),w.createElement("div",{"data-gds-part":"toolbar-center",className:"flex items-center min-w-0 justify-center"},l),w.createElement("div",{"data-gds-part":"toolbar-trailing",className:"flex items-center min-w-0 justify-end"},m)):s)});ml.displayName="Toolbar";var ul=w.forwardRef(({className:e,align:t="leading",...o},r)=>w.createElement("div",{ref:r,"data-gds-part":`toolbar-${t}`,className:i("flex items-center min-w-0",t==="center"&&"justify-center",t==="trailing"&&"justify-end",e),...o}));ul.displayName="ToolbarSlot";var fl=w.createContext(null),ya=w.createContext(0);function hl(){return w.useContext(ya)}function Uo(e){let t=w.useContext(fl);if(!t)throw new Error(`<${e}> must be rendered inside a <Sidebar> root.`);return t}var At=w.forwardRef(({collapsed:e,defaultCollapsed:t=false,onCollapsedChange:o,collapsible:r=true,variant:n="rail",className:a,style:l,children:m,...s},c)=>{let d=e!==void 0,[p,g]=w.useState(t),u=d?e:p,b=n==="panel",f=()=>{let h=!u;d||g(h),o?.(h);};return w.createElement(ba,{delayDuration:0},w.createElement(fl.Provider,{value:{collapsed:u}},w.createElement("aside",{ref:c,"data-gds-part":"sidebar","data-collapsed":u||void 0,"data-variant":n,className:i("relative flex h-full flex-col bg-card text-card-foreground",b?"w-full border border-border rounded-lg overflow-hidden":"border-r border-border transition-[width] duration-200 ease-out",a),style:b?l:{width:u?"var(--gds-sidebar-collapsed-width, 4rem)":"var(--gds-sidebar-width, 16rem)",...l},...s},m,r&&!b&&w.createElement("button",{type:"button",onClick:f,"aria-label":u?"Expand sidebar":"Collapse sidebar","data-gds-part":"sidebar-collapse-toggle",className:i("absolute -right-3 top-6 z-10 flex h-6 w-6 items-center justify-center","rounded-full border border-border bg-card text-muted-foreground shadow-sm","hover:text-foreground hover:bg-muted transition-colors")},u?w.createElement(ChevronRight,{className:"h-3 w-3"}):w.createElement(ChevronLeft,{className:"h-3 w-3"})))))});At.displayName="Sidebar";var xa=w.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Uo("SidebarHeader");return w.createElement("div",{ref:o,"data-gds-part":"sidebar-header","data-collapsed":r||void 0,className:i("flex shrink-0 items-center border-b border-border",r?"justify-center px-2":"px-3","h-[var(--gds-sidebar-header-height,3.25rem)]",e),...t})});xa.displayName="SidebarHeader";var Ra=w.forwardRef(({className:e,...t},o)=>w.createElement("nav",{ref:o,"data-gds-part":"sidebar-content",className:i("flex-1 overflow-y-auto overflow-x-hidden","py-[var(--gds-sidebar-content-py,0.5rem)]",e),...t}));Ra.displayName="SidebarContent";var Sa=w.forwardRef(({className:e,...t},o)=>{let{collapsed:r}=Uo("SidebarFooter");return w.createElement("div",{ref:o,"data-gds-part":"sidebar-footer","data-collapsed":r||void 0,className:i("shrink-0 border-t border-border",r?"px-2 py-2":"px-3 py-2",e),...t})});Sa.displayName="SidebarFooter";var Ca=w.forwardRef(({title:e,icon:t,trailing:o,collapsible:r=true,defaultExpanded:n=true,className:a,children:l,...m},s)=>{let{collapsed:c}=Uo("SidebarSection"),[d,p]=w.useState(n),g=!!e&&r;return c?w.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:i("px-[var(--gds-sidebar-section-px,0.5rem)] space-y-[var(--gds-sidebar-section-gap,0.125rem)]",a),...m},l):w.createElement("div",{ref:s,"data-gds-part":"sidebar-section",className:i("px-[var(--gds-sidebar-section-px,0.5rem)] pb-1",a),...m},e&&(g?w.createElement("div",{className:i("group/header flex w-full items-center gap-1 rounded-md px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors")},w.createElement("button",{type:"button",onClick:()=>p(u=>!u),"aria-expanded":d,className:"flex flex-1 items-center gap-2 text-left min-w-0"},t,w.createElement("span",{className:"flex-1 text-left normal-case truncate"},e),d?w.createElement(ChevronDown,{className:"h-3 w-3 shrink-0",strokeWidth:1.5}):w.createElement(ChevronRight,{className:"h-3 w-3 shrink-0",strokeWidth:1.5})),o&&w.createElement("span",{className:"flex items-center shrink-0",onClick:u=>u.stopPropagation(),onKeyDown:u=>u.stopPropagation()},o)):w.createElement("div",{className:i("flex items-center gap-2 px-2 py-1.5 text-xs font-medium uppercase tracking-wide","text-muted-foreground")},t,w.createElement("span",{className:"flex-1 truncate"},e),o&&w.createElement("span",{className:"shrink-0"},o))),d&&w.createElement("div",{className:i("mt-[var(--gds-sidebar-section-gap,0.125rem)]","space-y-[var(--gds-sidebar-section-gap,0.125rem)]")},l))});Ca.displayName="SidebarSection";var ka=w.forwardRef(({icon:e,badge:t,active:o=false,asButton:r=false,asChild:n=false,disabled:a=false,collapsedLabel:l,size:m="md",description:s,className:c,children:d,...p},g)=>{let{collapsed:u}=Uo("SidebarItem"),b=hl(),f=!u&&b>0?{paddingLeft:`calc(0.5rem + ${b} * var(--gds-sidebar-tree-indent, 1.5rem))`}:void 0,h=m==="sm",C=h?"text-xs px-2 py-1":"text-sm px-2 py-1.5",S=h&&!o?"font-normal":"font-medium",x=o?"bg-primary/10 text-primary":h?"text-muted-foreground hover:bg-muted hover:text-foreground":"text-foreground/80 hover:bg-muted hover:text-foreground",k=!u&&s!=null,P=i("group flex items-center gap-2.5 rounded-md transition-colors",C,S,k&&(h?"py-1.5":"py-2"),u?"justify-center px-2 py-2":null,x,a&&"opacity-50 pointer-events-none",c),V=k?w.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},w.createElement("span",{className:"truncate"},d),w.createElement("span",{className:i("truncate font-normal text-muted-foreground",h?"text-[10px]":"text-[11px]")},s)):w.createElement("span",{className:"flex-1 truncate text-left"},d),N=w.createElement(w.Fragment,null,e&&w.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},e),!u&&V,!u&&t!==void 0&&t!==null&&w.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},t)),F;if(n)F=w.createElement(Slot,{"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,className:P,style:f},d);else if(r){let{href:he,target:re,rel:K,download:O,hrefLang:te,ping:He,referrerPolicy:se,type:v,...z}=p;F=w.createElement("button",{type:"button","data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,disabled:a,className:i(P,"w-full text-left"),style:f,...z},N);}else F=w.createElement("a",{ref:g,"data-gds-part":"sidebar-item","data-active":o||void 0,"aria-current":o?"page":void 0,"aria-disabled":a||void 0,className:P,style:f,...p},N);if(!u)return F;let G=l??(typeof d=="string"?d:null);return G?w.createElement(Zt,null,w.createElement(Xt,{asChild:true},F),w.createElement(Dt,{side:"right",sideOffset:8},G,t!=null&&w.createElement("span",{className:"ml-2 inline-flex items-center justify-center rounded bg-foreground/10 px-1.5 py-0 text-[10px]"},t))):F});ka.displayName="SidebarItem";var Ta=w.forwardRef(function({label:t,icon:o,badge:r,active:n=false,defaultExpanded:a=true,expanded:l,onExpandedChange:m,disabled:s,description:c,trailing:d,className:p,style:g,children:u,...b},f){let{collapsed:h}=Uo("SidebarTreeItem"),C=hl(),S=l!==void 0,[x,k]=w.useState(a),P=S?l:x,V=()=>{let F=!P;S||k(F),m?.(F);};if(h)return w.createElement(ya.Provider,{value:C},u);let N=C*1.5;return w.createElement("div",{"data-gds-part":"sidebar-tree-item"},w.createElement("div",{className:"group/row relative"},w.createElement("button",{ref:f,type:"button",onClick:V,"aria-expanded":P,"aria-current":n?"page":void 0,"data-active":n||void 0,disabled:s,className:i("group flex w-full items-center gap-1.5 rounded-md py-1 text-sm font-medium transition-colors",n?"bg-primary/10 text-primary":"text-foreground/80 hover:bg-muted hover:text-foreground",s&&"opacity-50 pointer-events-none",d!=null&&"pr-12",p),style:{paddingLeft:`calc(0.25rem + ${N}rem)`,paddingRight:d!=null?"3rem":"0.5rem",...g},...b},w.createElement("span",{className:"inline-flex h-4 w-4 items-center justify-center text-muted-foreground shrink-0","aria-hidden":true},P?w.createElement(ChevronDown,{className:"h-3 w-3"}):w.createElement(ChevronRight,{className:"h-3 w-3"})),o&&w.createElement("span",{className:"shrink-0 [&>svg]:h-4 [&>svg]:w-4","aria-hidden":true},o),c!=null?w.createElement("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5 text-left leading-tight"},w.createElement("span",{className:"truncate"},t),w.createElement("span",{className:"truncate text-[11px] font-normal text-muted-foreground"},c)):w.createElement("span",{className:"flex-1 truncate text-left"},t),r!=null&&w.createElement("span",{className:"ml-auto inline-flex items-center justify-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground"},r)),d!=null&&w.createElement("div",{onClick:F=>F.stopPropagation(),className:"pointer-events-auto absolute inset-y-0 right-1.5 flex items-center gap-0.5"},d)),P&&u&&w.createElement(ya.Provider,{value:C+1},w.createElement("div",{className:"space-y-[var(--gds-sidebar-section-gap,0.125rem)]"},u)))});Ta.displayName="SidebarTreeItem";At.Header=xa;At.Content=Ra;At.Footer=Sa;At.Section=Ca;At.Item=ka;At.TreeItem=Ta;var It=[50,100,200,300,400,500,600,700,800,900,950],bl=[.985,.955,.895,.82,.72,.61,.51,.415,.325,.245,.17],Lp=[.015,.04,.075,.11,.14,.17,.17,.15,.12,.08,.04];function Pr({hue:e,chromaScale:t=1}){let o=(e%360+360)%360,r={};for(let n=0;n<It.length;n++){let a=bl[n],l=Lp[n]*t;r[It[n]]=`${a.toFixed(4)} ${l.toFixed(4)} ${o.toFixed(2)}`;}return r}function vl(){let e={};for(let t=0;t<It.length;t++){let o=bl[t];e[It[t]]=`${o.toFixed(4)} 0 0`;}return e}var Pa={light:{destructive:"0.560 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.610 0.180 145.0",warning:"0.720 0.180 60.0",info:"0.580 0.200 240.0",highlight:"0.860 0.180 95.0"},dark:{destructive:"0.680 0.220 27.0",destructiveFg:"0.990 0.005 27.0",success:"0.720 0.180 145.0",warning:"0.800 0.180 60.0",info:"0.700 0.200 240.0",highlight:"0.880 0.180 95.0"}},$o="1 0 0",yl="0 0 0";function ho(e,t){let[,o,r]=e.split(/\s+/).map(d=>d.trim()),n=Number(o),a=r;if(t==="light"){let p=Math.min(n*.22,.045),g=.38,u=n;return {soft:`${.965.toFixed(3)} ${p.toFixed(3)} ${a}`,deep:`${g.toFixed(3)} ${u.toFixed(3)} ${a}`}}let l=.22,m=Math.min(n*.45,.075),s=.82,c=n*.9;return {soft:`${l.toFixed(3)} ${m.toFixed(3)} ${a}`,deep:`${s.toFixed(3)} ${c.toFixed(3)} ${a}`}}var Mr={geist:"var(--font-geist), system-ui, sans-serif",inter:"var(--font-inter), system-ui, sans-serif",manrope:"var(--font-manrope), system-ui, sans-serif",figtree:"var(--font-figtree), system-ui, sans-serif",dmSans:"var(--font-dm-sans), system-ui, sans-serif",lexend:"var(--font-lexend), system-ui, sans-serif",outfit:"var(--font-outfit), system-ui, sans-serif",plusJakarta:"var(--font-plus-jakarta), system-ui, sans-serif",spaceGrotesk:"var(--font-space-grotesk), system-ui, sans-serif",fraunces:"var(--font-fraunces), Georgia, serif",instrumentSerif:"var(--font-instrument-serif), Georgia, serif",sourceSerif:"var(--font-source-serif), Georgia, serif",jetbrainsMono:"var(--font-jetbrains-mono), ui-monospace, monospace",geistMono:"var(--font-geist-mono), ui-monospace, monospace",ibmPlexMono:"var(--font-ibm-plex-mono), ui-monospace, monospace",system:"system-ui, -apple-system, sans-serif",serif:"Georgia, 'Times New Roman', serif",mono:"ui-monospace, Menlo, monospace"};var Hp=["superLight","light","dark","superDark"],Dp={muted:.6,default:1,vibrant:1.3};function Ap(e,t,o){let r=t.primary*o,n=t.accent*o,a=(r+n)/2*.8,l=m=>(m%360+360)%360;return {1:`0.600 ${(.17*r).toFixed(4)} ${e.primary.toFixed(2)}`,2:`0.640 ${(.17*a).toFixed(4)} ${l(e.primary+140).toFixed(2)}`,3:`0.580 ${(.17*a).toFixed(4)} ${l(e.primary+220).toFixed(2)}`,4:`0.510 0.0250 ${e.neutral.toFixed(2)}`,5:`0.620 ${(.17*n).toFixed(4)} ${e.accent.toFixed(2)}`}}var D=e=>({source:"neutral",step:e}),Ye=e=>({source:"primary",step:e}),Ft=e=>({source:"accent",step:e}),jo=e=>({source:"pure",value:e}),Ip={superLight:{background:D(50),foreground:D(800),card:jo($o),cardForeground:D(800),popover:jo($o),popoverForeground:D(800),primary:Ye(600),primaryForeground:Ye(50),secondary:D(100),secondaryForeground:D(700),muted:D(100),mutedForeground:D(500),accent:Ft(600),accentForeground:Ft(50),border:D(200),input:D(200),ring:Ye(500)},light:{background:D(50),foreground:D(950),card:jo($o),cardForeground:D(950),popover:jo($o),popoverForeground:D(950),primary:Ye(500),primaryForeground:Ye(50),secondary:D(100),secondaryForeground:D(700),muted:D(100),mutedForeground:D(500),accent:Ft(500),accentForeground:Ft(50),border:D(200),input:D(200),ring:Ye(500)},dark:{background:D(950),foreground:D(50),card:D(900),cardForeground:D(50),popover:D(900),popoverForeground:D(50),primary:Ye(400),primaryForeground:Ye(950),secondary:D(800),secondaryForeground:D(200),muted:D(800),mutedForeground:D(400),accent:Ft(400),accentForeground:Ft(950),border:D(800),input:D(800),ring:Ye(400)},superDark:{background:jo(yl),foreground:D(100),card:D(950),cardForeground:D(100),popover:D(950),popoverForeground:D(100),primary:Ye(300),primaryForeground:Ye(950),secondary:D(900),secondaryForeground:D(300),muted:D(900),mutedForeground:D(500),accent:Ft(300),accentForeground:Ft(950),border:D(900),input:D(900),ring:Ye(300)}};function we(e,t){return e.source==="pure"?e.value:t[e.source][e.step]}function Fp(e,t){let o=Ip[t],r=t==="superLight"||t==="light",n=r?Pa.light:Pa.dark;return {background:we(o.background,e),foreground:we(o.foreground,e),card:we(o.card,e),cardForeground:we(o.cardForeground,e),popover:we(o.popover,e),popoverForeground:we(o.popoverForeground,e),primary:we(o.primary,e),primaryForeground:we(o.primaryForeground,e),secondary:we(o.secondary,e),secondaryForeground:we(o.secondaryForeground,e),muted:we(o.muted,e),mutedForeground:we(o.mutedForeground,e),accent:we(o.accent,e),accentForeground:we(o.accentForeground,e),border:we(o.border,e),input:we(o.input,e),ring:we(o.ring,e),destructive:n.destructive,destructiveForeground:n.destructiveFg,success:n.success,warning:n.warning,info:n.info,highlight:n.highlight,...(()=>{let a=r?"light":"dark",l=ho(n.destructive,a),m=ho(n.success,a),s=ho(n.warning,a),c=ho(n.info,a),d=ho(n.highlight,a);return {destructiveSoft:l.soft,destructiveDeep:l.deep,successSoft:m.soft,successDeep:m.deep,warningSoft:s.soft,warningDeep:s.deep,infoSoft:c.soft,infoDeep:c.deep,highlightSoft:d.soft,highlightDeep:d.deep}})()}}var Rt={display:3.75,h1:2.5,h2:2,h3:1.5,h4:1.25,h5:1.125,h6:1,body:1,bodySm:.875},zp={compact:.85,default:1,spacious:1.18};function Bp(e){let t=zp[e.scale],o=r=>`${(r*t).toFixed(3)}rem`;return {fontSans:Mr[e.body],fontMono:Mr[e.mono],fontDisplay:Mr[e.display],headingWeight:e.headingWeight??600,bodyWeight:e.bodyWeight??400,headingTracking:e.headingTracking??"-0.01em",scale:{display:o(Rt.display),h1:o(Rt.h1),h2:o(Rt.h2),h3:o(Rt.h3),h4:o(Rt.h4),h5:o(Rt.h5),h6:o(Rt.h6),body:o(Rt.body),bodySm:o(Rt.bodySm)}}}var Vp={sharp:0,subtle:.25,soft:.5,round:.875,pill:1.25};function Op(e){let t=Vp[e.style],o=r=>`${r.toFixed(3)}rem`;return {base:o(t),sm:o(Math.max(0,t-.25)),md:o(t),lg:o(t+.25),xl:o(t+.5),"2xl":o(t+1),full:"9999px"}}var Gp={tight:.85,default:1,roomy:1.2};function _p(e){return {baseUnit:"1rem",densityFactor:Gp[e.density]}}var Wp={none:{sm:"none",md:"none",lg:"none",xl:"none","2xl":"none",inner:"none"},subtle:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.03)",md:"0 2px 4px -1px rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.03)",lg:"0 6px 14px -2px rgb(0 0 0 / 0.05)",xl:"0 12px 24px -4px rgb(0 0 0 / 0.06)","2xl":"0 24px 48px -12px rgb(0 0 0 / 0.12)",inner:"inset 0 1px 2px 0 rgb(0 0 0 / 0.03)"},default:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},dramatic:{sm:"0 2px 4px 0 rgb(0 0 0 / 0.12)",md:"0 8px 16px -2px rgb(0 0 0 / 0.18), 0 4px 8px -4px rgb(0 0 0 / 0.12)",lg:"0 20px 32px -4px rgb(0 0 0 / 0.22), 0 8px 16px -8px rgb(0 0 0 / 0.18)",xl:"0 32px 48px -6px rgb(0 0 0 / 0.28), 0 12px 24px -10px rgb(0 0 0 / 0.22)","2xl":"0 48px 80px -16px rgb(0 0 0 / 0.45)",inner:"inset 0 4px 8px 0 rgb(0 0 0 / 0.1)"}};function Up(e){let t=e?.shadows??"default",o=e?.motionIntensity??1,r=n=>`${Math.round(n*o)}ms`;return {shadows:Wp[t],motion:{fast:r(150),base:r(200),slow:r(300),slower:r(500)},borderWidth:e?.borderWidth??"1px"}}function Jt(e){let t=Dp[e.intensity??"default"],o=e.neutralPureGray??false,r=(e.chroma?.neutral??.08)*t,n=(e.chroma?.primary??1)*t,a=(e.chroma?.accent??1)*t,l=o?vl():Pr({hue:e.hues.neutral,chromaScale:r}),m=Pr({hue:e.hues.primary,chromaScale:n}),s=Pr({hue:e.hues.accent,chromaScale:a}),c={neutral:l,primary:m,accent:s},d=Ap(e.hues,{primary:n,accent:a},t),p=Object.fromEntries(Hp.map(C=>[C,Fp(c,C)])),g=Bp(e.typography),u=Op(e.radius),b=_p(e.spacing),f=Up(e.effects),h={buttonShape:e.components?.buttonShape??"default",inputStyle:e.components?.inputStyle??"outlined",cardStyle:e.components?.cardStyle??"flat"};return {id:e.id,name:e.name,description:e.description,tagline:e.tagline,input:e,ramps:c,colors:p,chart:d,typography:g,radius:u,spacing:b,effects:f,components:h}}var Ko={id:"calm",name:"Calm",description:"Warm neutrals, terracotta primary, serif typography.",tagline:"Signature",hues:{neutral:40,primary:20,accent:40},chroma:{neutral:.15,primary:.75,accent:.8},intensity:"muted",typography:{display:"fraunces",body:"fraunces",mono:"jetbrainsMono",scale:"default",headingWeight:600,headingTracking:"-0.02em"},spacing:{density:"roomy"},radius:{style:"round"},effects:{shadows:"subtle",motionIntensity:1.25},components:{buttonShape:"pill",inputStyle:"outlined",cardStyle:"outlined"}},Ma={id:"energy",name:"Energy",description:"Teal + indigo \u2014 punchy, cool-tone, modern sans.",tagline:"Alternate",hues:{neutral:175,primary:175,accent:235},chroma:{neutral:.08,primary:1,accent:1},intensity:"vibrant",typography:{display:"geist",body:"geist",mono:"geistMono",scale:"default",headingWeight:600},spacing:{density:"default"},radius:{style:"soft"},effects:{shadows:"default",motionIntensity:1},components:{buttonShape:"default",inputStyle:"outlined",cardStyle:"flat"}},Nr=[Ko,Ma];function $p(e){return {"--background":e.background,"--foreground":e.foreground,"--card":e.card,"--card-foreground":e.cardForeground,"--popover":e.popover,"--popover-foreground":e.popoverForeground,"--primary":e.primary,"--primary-foreground":e.primaryForeground,"--secondary":e.secondary,"--secondary-foreground":e.secondaryForeground,"--muted":e.muted,"--muted-foreground":e.mutedForeground,"--accent":e.accent,"--accent-foreground":e.accentForeground,"--destructive":e.destructive,"--destructive-foreground":e.destructiveForeground,"--border":e.border,"--input":e.input,"--ring":e.ring,"--success":e.success,"--warning":e.warning,"--info":e.info,"--highlight":e.highlight,"--destructive-soft":e.destructiveSoft,"--destructive-deep":e.destructiveDeep,"--success-soft":e.successSoft,"--success-deep":e.successDeep,"--warning-soft":e.warningSoft,"--warning-deep":e.warningDeep,"--info-soft":e.infoSoft,"--info-deep":e.infoDeep,"--highlight-soft":e.highlightSoft,"--highlight-deep":e.highlightDeep}}function Ea(e,t){let o=e.colors[t];return {...$p(o),...Na("neutral",e.ramps.neutral),...Na("primary",e.ramps.primary),...Na("accent",e.ramps.accent),"--chart-1":e.chart[1],"--chart-2":e.chart[2],"--chart-3":e.chart[3],"--chart-4":e.chart[4],"--chart-5":e.chart[5],"--font-sans":e.typography.fontSans,"--font-mono":e.typography.fontMono,"--font-display":e.typography.fontDisplay,"--font-heading-weight":String(e.typography.headingWeight),"--font-body-weight":String(e.typography.bodyWeight),"--font-heading-tracking":e.typography.headingTracking,"--text-display":e.typography.scale.display,"--text-h1":e.typography.scale.h1,"--text-h2":e.typography.scale.h2,"--text-h3":e.typography.scale.h3,"--text-h4":e.typography.scale.h4,"--text-h5":e.typography.scale.h5,"--text-h6":e.typography.scale.h6,"--text-body":e.typography.scale.body,"--text-body-sm":e.typography.scale.bodySm,"--radius":e.radius.base,"--gds-radius-sm":e.radius.sm,"--gds-radius-md":e.radius.md,"--gds-radius-lg":e.radius.lg,"--gds-radius-xl":e.radius.xl,"--gds-radius-2xl":e.radius["2xl"],"--gds-radius-full":e.radius.full,"--gds-density":String(e.spacing.densityFactor),"--gds-shadow-sm":e.effects.shadows.sm,"--gds-shadow-md":e.effects.shadows.md,"--gds-shadow-lg":e.effects.shadows.lg,"--gds-shadow-xl":e.effects.shadows.xl,"--gds-shadow-2xl":e.effects.shadows["2xl"],"--gds-shadow-inner":e.effects.shadows.inner,"--gds-transition-fast":e.effects.motion.fast,"--gds-transition-base":e.effects.motion.base,"--gds-transition-slow":e.effects.motion.slow,"--gds-transition-slower":e.effects.motion.slower,"--gds-border-width":e.effects.borderWidth}}function Na(e,t){let o={};for(let r of It)o[`--ramp-${e}-${r}`]=t[r];return o}function Er(e,t){if(typeof document>"u")return;let o=document.documentElement,r=Ea(e,t);for(let[n,a]of Object.entries(r))o.style.setProperty(n,a);o.setAttribute("data-grade-theme",e.id),o.setAttribute("data-mode",t),o.setAttribute("data-button-shape",e.components.buttonShape??"default"),o.setAttribute("data-input-style",e.components.inputStyle??"outlined"),o.setAttribute("data-card-style",e.components.cardStyle??"flat");}function qo(e){if(typeof document>"u")return "";let t=document.createElement("span");t.style.color=`oklch(${e})`,t.style.position="absolute",t.style.visibility="hidden",document.body.appendChild(t);let o=getComputedStyle(t).color;document.body.removeChild(t);let r=o.match(/\d+/g);if(!r||r.length<3)return "";let[n,a,l]=r.slice(0,3).map(Number);return "#"+[n,a,l].map(m=>Math.max(0,Math.min(255,m)).toString(16).padStart(2,"0")).join("").toUpperCase()}function jp(e){let t=e.trim().split(/\s+/);if(t.length<3)return {oklch:e,hex:""};let[o,r,n]=t.map(Number),a=`${o.toFixed(3)} ${r.toFixed(3)} ${Math.round(n)}`,l=qo(e);return {oklch:a,hex:l}}function La(e,t,o){let r=[`### ${e} ramp (hue ${Math.round(o)}\xB0)`,"","| Step | OKLCH | Hex |","|------|-------|-----|"];for(let n of It){let{oklch:a,hex:l}=jp(t[n]);r.push(`| ${n} | \`${a}\` | \`${l||"\u2014"}\` |`);}return r.join(`
73
+ `)}function wl(e,t){let o=[`### ${e}`,"","| Token | Usage | Light (hex) | Dark (hex) |","|-------|-------|-------------|------------|"];for(let r of t){let n=qo(r.light)||"\u2014",a=qo(r.dark)||"\u2014";o.push(`| \`--${r.token}\` | ${r.usage} | \`${n}\` (\`${r.light}\`) | \`${a}\` (\`${r.dark}\`) |`);}return o.join(`
74
+ `)}function xl(e){return !e||e.input==null?"{}":JSON.stringify(e.input,null,2)??"{}"}function Rl(e){let{input:t,ramps:o,colors:r,chart:n,typography:a,radius:l,spacing:m,effects:s,components:c}=e,d=t.intensity??"default",p=f=>({token:f,usage:Kp[f]??"",light:r.light[f],dark:r.dark[f]}),g=["background","foreground","card","cardForeground","popover","popoverForeground","primary","primaryForeground","secondary","secondaryForeground","muted","mutedForeground","accent","accentForeground","border","input","ring"].map(p),u=["destructive","destructiveForeground","success","warning","info","highlight"].map(p),b=[1,2,3,4,5].map(f=>{let h=n[f];return {slot:f,triplet:h,hex:qo(h)||"\u2014"}});return `# ${e.name} \u2014 Grade Design System Theme
66
75
 
67
76
  > **Portable theme spec.** Paste this entire file into a fresh LLM prompt along with your design brief. The model will have everything it needs to produce UI that matches this exact theme \u2014 colors, typography, spacing, shapes, and the "feel" we're after.
68
77
 
@@ -72,10 +81,10 @@ Use directly inside a Card or page section for section-scoped toolbars:
72
81
  - **ID**: \`${t.id}\`
73
82
  ${t.description?`- **Description**: ${t.description}
74
83
  `:""}- **Hues**: neutral \`${t.hues.neutral}\xB0\` \xB7 primary \`${t.hues.primary}\xB0\` \xB7 accent \`${t.hues.accent}\xB0\`
75
- - **Intensity**: \`${l}\` ${l==="muted"?"(quieter chroma across the board)":l==="vibrant"?"(punchier chroma across the board)":"(balanced)"}
84
+ - **Intensity**: \`${d}\` ${d==="muted"?"(quieter chroma across the board)":d==="vibrant"?"(punchier chroma across the board)":"(balanced)"}
76
85
  - **Typography**: ${t.typography.display} display \xB7 ${t.typography.body} body \xB7 ${t.typography.mono} mono \xB7 scale \`${t.typography.scale}\`
77
86
  - **Spacing density**: \`${t.spacing.density}\`
78
- - **Radius style**: \`${t.radius.style}\` (base \`${d.base}\`)
87
+ - **Radius style**: \`${t.radius.style}\` (base \`${l.base}\`)
79
88
  - **Button shape**: \`${c.buttonShape}\` \xB7 **Input style**: \`${c.inputStyle}\` \xB7 **Card style**: \`${c.cardStyle}\`
80
89
  - **Shadow preset**: \`${t.effects?.shadows??"default"}\` \xB7 **Motion intensity**: \`${t.effects?.motionIntensity??1}\`
81
90
 
@@ -92,30 +101,30 @@ A \`ThemeInput\` is a small object (three hues plus a handful of presets). The g
92
101
  ## Full ThemeInput (round-trippable)
93
102
 
94
103
  \`\`\`json
95
- ${Us(e)}
104
+ ${xl(e)}
96
105
  \`\`\`
97
106
 
98
107
  ## Color ramps
99
108
 
100
109
  Three 11-stop OKLCH ramps, generated from the input hues + chromas + global intensity. Every color elsewhere in the theme resolves back to one of these stops.
101
110
 
102
- ${sa("Neutral",o.neutral,t.hues.neutral)}
111
+ ${La("Neutral",o.neutral,t.hues.neutral)}
103
112
 
104
- ${sa("Primary",o.primary,t.hues.primary)}
113
+ ${La("Primary",o.primary,t.hues.primary)}
105
114
 
106
- ${sa("Accent",o.accent,t.hues.accent)}
115
+ ${La("Accent",o.accent,t.hues.accent)}
107
116
 
108
117
  ## Semantic tokens (hue-derived)
109
118
 
110
119
  Purpose-based tokens drawn from the ramps. Two values per token \u2014 the generator produces them for all four brightness modes, but only light + dark are shown here for brevity.
111
120
 
112
- ${$s("Core semantic tokens",g)}
121
+ ${wl("Core semantic tokens",g)}
113
122
 
114
123
  ## Fixed semantic tokens (not hue-derived)
115
124
 
116
125
  Status colors stay consistent across themes so users always read green as success, red as destructive, etc. Accessibility wins over brand cohesion.
117
126
 
118
- ${$s("Status colors",u)}
127
+ ${wl("Status colors",u)}
119
128
 
120
129
  ## Chart palette
121
130
 
@@ -155,13 +164,13 @@ ${b.map(f=>`| \`--chart-${f.slot}\` | \`${f.triplet}\` | \`${f.hex}\` |`).join(`
155
164
 
156
165
  | Step | Value |
157
166
  |------|-------|
158
- | \`--radius\` (base) | \`${d.base}\` |
159
- | \`--gds-radius-sm\` | \`${d.sm}\` |
160
- | \`--gds-radius-md\` | \`${d.md}\` |
161
- | \`--gds-radius-lg\` | \`${d.lg}\` |
162
- | \`--gds-radius-xl\` | \`${d.xl}\` |
163
- | \`--gds-radius-2xl\` | \`${d["2xl"]}\` |
164
- | \`--gds-radius-full\` | \`${d.full}\` |
167
+ | \`--radius\` (base) | \`${l.base}\` |
168
+ | \`--gds-radius-sm\` | \`${l.sm}\` |
169
+ | \`--gds-radius-md\` | \`${l.md}\` |
170
+ | \`--gds-radius-lg\` | \`${l.lg}\` |
171
+ | \`--gds-radius-xl\` | \`${l.xl}\` |
172
+ | \`--gds-radius-2xl\` | \`${l["2xl"]}\` |
173
+ | \`--gds-radius-full\` | \`${l.full}\` |
165
174
 
166
175
  ### Spacing
167
176
 
@@ -244,7 +253,7 @@ Every component accepts a \`className\` for layout tweaks. Variants are passed v
244
253
 
245
254
  When generating UI in the ${e.name} theme, match this character:
246
255
 
247
- ${dp(e)}
256
+ ${qp(e)}
248
257
 
249
258
  ## Instructions for the generating LLM
250
259
 
@@ -263,7 +272,7 @@ To recreate this theme in code:
263
272
  \`\`\`ts
264
273
  import { generateTheme, applyThemeToRoot, type ThemeInput } from "@gradeui/ui";
265
274
 
266
- const input: ThemeInput = ${Us(e).replace(/\n/g,`
275
+ const input: ThemeInput = ${xl(e).replace(/\n/g,`
267
276
  `)};
268
277
 
269
278
  const theme = generateTheme(input);
@@ -272,11 +281,11 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
272
281
 
273
282
  ---
274
283
  *Generated from Grade Design System v1 \xB7 ${new Date().toISOString()}*
275
- `}var lp={background:"Page / body background",foreground:"Primary text",card:"Elevated surface background",cardForeground:"Text on cards",popover:"Floating menu background",popoverForeground:"Text inside floating menus",primary:"Primary actions, links, default button",primaryForeground:"Text on primary-tinted fills",secondary:"Secondary surfaces + quiet buttons",secondaryForeground:"Text on secondary surfaces",muted:"Subtle surfaces (hover states, skeletons)",mutedForeground:"Secondary / less-important text",accent:"Highlights, hover accents",accentForeground:"Text on accent surfaces",border:"Default borders",input:"Form input borders",ring:"Focus ring color",destructive:"Destructive actions, errors",destructiveForeground:"Text on destructive surfaces",success:"Success states",warning:"Warning states",info:"Informational states",highlight:"Emphasis, new features, callouts"};function dp(e){let t=[],{input:o,components:r}=e;o.intensity==="muted"?t.push("- **Quiet and restrained.** Avoid heavy saturation, glowing effects, or loud contrast jumps. Let whitespace do the work."):o.intensity==="vibrant"?t.push("- **Loud and confident.** Primary color wants to lead. Use it on hero CTAs, key metrics, empty states. Don't be shy."):t.push("- **Balanced.** Neither shouty nor sleepy \u2014 a workhorse feel suited to product interfaces."),o.spacing.density==="roomy"?t.push("- **Generous spacing.** Stretch things out \u2014 reach for `gap-6`, `gap-8`, `p-6`, `p-8`. Airy is the vibe."):o.spacing.density==="tight"?t.push("- **Dense layouts.** Pack information in \u2014 `gap-2`, `gap-3`, `p-3`, `p-4`. Scan-friendly dashboard energy."):t.push("- **Standard density.** Use Tailwind's default spacing ladder."),o.radius.style==="pill"?t.push("- **Fully rounded.** Controls are pill-shaped. Use `rounded-full` on custom chips / pills too."):o.radius.style==="sharp"?t.push("- **Square corners.** Zero radius everywhere \u2014 very architectural. Do not add curves."):o.radius.style==="round"?t.push("- **Rounded and friendly.** Corner radius is noticeable (\u224814px base). Avoid sharp edges."):t.push("- **Standard rounded corners.**");let i=o.typography.display;return i==="fraunces"||i==="instrumentSerif"||i==="sourceSerif"?t.push("- **Editorial serif headings.** Treat headings like magazine titles \u2014 give them space and weight. Serifs reward larger sizes."):(i==="geist"||i==="inter")&&t.push("- **Modern technical sans.** Clean, functional, neutral. Good for product UIs."),r.cardStyle==="outlined"?t.push("- **Cards are outlined**, not shadowed. Rely on borders + spacing for hierarchy."):r.cardStyle==="elevated"?t.push("- **Cards have real elevation.** Use shadows to stack content visually."):r.cardStyle==="glass"&&t.push("- **Glass / frosted cards.** Use translucent surfaces over background imagery or gradients."),r.buttonShape==="pill"&&t.push("- **Buttons are pills** \u2014 don't override with square corners."),t.join(`
276
- `)}function la(e){if(typeof window>"u"||typeof document>"u")return;let t=js(e),o=new Blob([t],{type:"text/markdown;charset=utf-8"}),r=URL.createObjectURL(o),i=document.createElement("a");i.href=r,i.download=`grade-theme-${e.input.id}.md`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r);}var tt=Object.fromEntries(ir.map(e=>[e.id,Dt(e)])),Zt=ko.id;function At(e){if(e in tt)return tt[e];let t=ca(e);if(t)return Dt(t)}function da(){return [...Object.values(tt),...Ys()]}var Ks="grade-user-themes";function lr(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(Ks);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function qs(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(Ks,JSON.stringify(e));}catch{}}function Ys(){return Object.values(lr()).map(Dt)}function ca(e){return lr()[e]}function dr(e){let t=lr();return t[e.id]=e,qs(t),Dt(e)}function pa(e){if(e in tt)return;let t=lr();delete t[e],qs(t);}function cp(e,t,o){let r=tt[e]?.input??ca(e);if(!r)return;let i={...r,id:t,name:o};return dr(i),i}var ma="grade-theme",cr="grade-mode",Xs=["superLight","light","dark","superDark"],Zs=new Set(["dark","superDark"]),pp=`
284
+ `}var Kp={background:"Page / body background",foreground:"Primary text",card:"Elevated surface background",cardForeground:"Text on cards",popover:"Floating menu background",popoverForeground:"Text inside floating menus",primary:"Primary actions, links, default button",primaryForeground:"Text on primary-tinted fills",secondary:"Secondary surfaces + quiet buttons",secondaryForeground:"Text on secondary surfaces",muted:"Subtle surfaces (hover states, skeletons)",mutedForeground:"Secondary / less-important text",accent:"Highlights, hover accents",accentForeground:"Text on accent surfaces",border:"Default borders",input:"Form input borders",ring:"Focus ring color",destructive:"Destructive actions, errors",destructiveForeground:"Text on destructive surfaces",success:"Success states",warning:"Warning states",info:"Informational states",highlight:"Emphasis, new features, callouts"};function qp(e){let t=[],{input:o,components:r}=e;o.intensity==="muted"?t.push("- **Quiet and restrained.** Avoid heavy saturation, glowing effects, or loud contrast jumps. Let whitespace do the work."):o.intensity==="vibrant"?t.push("- **Loud and confident.** Primary color wants to lead. Use it on hero CTAs, key metrics, empty states. Don't be shy."):t.push("- **Balanced.** Neither shouty nor sleepy \u2014 a workhorse feel suited to product interfaces."),o.spacing.density==="roomy"?t.push("- **Generous spacing.** Stretch things out \u2014 reach for `gap-6`, `gap-8`, `p-6`, `p-8`. Airy is the vibe."):o.spacing.density==="tight"?t.push("- **Dense layouts.** Pack information in \u2014 `gap-2`, `gap-3`, `p-3`, `p-4`. Scan-friendly dashboard energy."):t.push("- **Standard density.** Use Tailwind's default spacing ladder."),o.radius.style==="pill"?t.push("- **Fully rounded.** Controls are pill-shaped. Use `rounded-full` on custom chips / pills too."):o.radius.style==="sharp"?t.push("- **Square corners.** Zero radius everywhere \u2014 very architectural. Do not add curves."):o.radius.style==="round"?t.push("- **Rounded and friendly.** Corner radius is noticeable (\u224814px base). Avoid sharp edges."):t.push("- **Standard rounded corners.**");let n=o.typography.display;return n==="fraunces"||n==="instrumentSerif"||n==="sourceSerif"?t.push("- **Editorial serif headings.** Treat headings like magazine titles \u2014 give them space and weight. Serifs reward larger sizes."):(n==="geist"||n==="inter")&&t.push("- **Modern technical sans.** Clean, functional, neutral. Good for product UIs."),r.cardStyle==="outlined"?t.push("- **Cards are outlined**, not shadowed. Rely on borders + spacing for hierarchy."):r.cardStyle==="elevated"?t.push("- **Cards have real elevation.** Use shadows to stack content visually."):r.cardStyle==="glass"&&t.push("- **Glass / frosted cards.** Use translucent surfaces over background imagery or gradients."),r.buttonShape==="pill"&&t.push("- **Buttons are pills** \u2014 don't override with square corners."),t.join(`
285
+ `)}function Ha(e){if(typeof window>"u"||typeof document>"u")return;let t=Rl(e),o=new Blob([t],{type:"text/markdown;charset=utf-8"}),r=URL.createObjectURL(o),n=document.createElement("a");n.href=r,n.download=`grade-theme-${e.input.id}.md`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r);}var gt=Object.fromEntries(Nr.map(e=>[e.id,Jt(e)])),bo=Ko.id;function Qt(e){if(e in gt)return gt[e];let t=Aa(e);if(t)return Jt(t)}function Da(){return [...Object.values(gt),...kl()]}var Sl="grade-user-themes";function Lr(){if(typeof localStorage>"u")return {};try{let e=localStorage.getItem(Sl);if(!e)return {};let t=JSON.parse(e);return t&&typeof t=="object"?t:{}}catch{return {}}}function Cl(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(Sl,JSON.stringify(e));}catch{}}function kl(){return Object.values(Lr()).map(Jt)}function Aa(e){return Lr()[e]}function Hr(e){let t=Lr();return t[e.id]=e,Cl(t),Jt(e)}function Ia(e){if(e in gt)return;let t=Lr();delete t[e],Cl(t);}function Yp(e,t,o){let r=gt[e]?.input??Aa(e);if(!r)return;let n={...r,id:t,name:o};return Hr(n),n}var Fa="grade-theme",Dr="grade-mode",Pl=["superLight","light","dark","superDark"],Tl=new Set(["dark","superDark"]),Zp=`
277
286
  (function() {
278
287
  try {
279
- var mode = localStorage.getItem('${cr}');
288
+ var mode = localStorage.getItem('${Dr}');
280
289
  var valid = ['superLight','light','dark','superDark'];
281
290
  if (!mode || valid.indexOf(mode) === -1) {
282
291
  mode = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
@@ -285,11 +294,11 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
285
294
  document.documentElement.classList.add('dark');
286
295
  }
287
296
  document.documentElement.setAttribute('data-mode', mode);
288
- var themeId = localStorage.getItem('${ma}');
297
+ var themeId = localStorage.getItem('${Fa}');
289
298
  if (themeId) document.documentElement.setAttribute('data-grade-theme', themeId);
290
299
  } catch(e) {}
291
300
  })();
292
- `,ua=w.createContext(null);function mp({children:e,defaultTheme:t=Zt,defaultMode:o="light"}){let[r,i]=w.useState(t),[a,d]=w.useState(o),[m,s]=w.useState(0);w.useEffect(()=>{try{let f=localStorage.getItem(ma);f&&At(f)&&i(f);let h=localStorage.getItem(cr);if(h&&Xs.includes(h))d(h);else if(typeof window<"u"){let P=window.matchMedia("(prefers-color-scheme: dark)").matches;d(P?"dark":"light");}}catch{}},[]),w.useEffect(()=>{let f=At(r)??At(Zt);f&&(sr(f,a),typeof document<"u"&&document.documentElement.classList.toggle("dark",Zs.has(a)));},[r,a,m]),w.useEffect(()=>{if(typeof window>"u")return;let f=window.matchMedia("(prefers-color-scheme: dark)"),h=P=>{try{if(localStorage.getItem(cr))return}catch{return}d(P.matches?"dark":"light");};return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[]);let c=w.useCallback(f=>{i(f);try{localStorage.setItem(ma,f);}catch{}},[]),l=w.useCallback(f=>{d(f);try{localStorage.setItem(cr,f);}catch{}},[]),p=w.useCallback(f=>{dr(f),s(h=>h+1),c(f.id);},[c]),g=w.useCallback(f=>{f in tt||(pa(f),s(h=>h+1),i(h=>h===f?Zt:h));},[]),u=w.useCallback(()=>{s(f=>f+1);},[]),b=w.useMemo(()=>{let f=At(r)??At(Zt);return {theme:f,themeId:f.id,mode:a,isDark:Zs.has(a),setThemeId:c,setMode:l,themes:da(),saveAndActivate:p,deleteTheme:g,refresh:u}},[r,a,m,c,l,p,g,u]);return w.createElement(ua.Provider,{value:b},e)}function ga(){let e=w.useContext(ua);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function It(){return w.useContext(ua)}var fa=w.createContext(null);function Js(){return w.useContext(fa)}var Sp={maplibre:()=>Promise.resolve().then(()=>(al(),rl)).then(e=>e.createMaplibreAdapter),mapbox:()=>Promise.resolve().then(()=>(ll(),sl)).then(e=>e.createMapboxAdapter),google:()=>Promise.resolve().then(()=>(pl(),cl)).then(e=>e.createGoogleAdapter)},Cp=500,ha=w.forwardRef(function(t,o){let{center:r,zoom:i,bounds:a,appearance:d="auto",interactive:m=true,hoveredId:s,onHoveredIdChange:c,onLoad:l,onError:p,className:g,style:u,children:b,...f}=t,h=f.provider??"maplibre",P=f.styleUrl,S=f.tilerKey,R=f.accessToken,C=f.apiKey,k=f.mapId,B=w.useRef(null),H=w.useRef(null),I=w.useRef(new globalThis.Map),V=w.useRef(null),[Pe,ee]=w.useState(false),ye=w.useRef(c),G=w.useRef(p),ge=w.useRef(l);w.useEffect(()=>{ye.current=c,G.current=p,ge.current=l;});let we=It()?.isDark??false,v=d==="auto"?we?"dark":"light":d;w.useEffect(()=>{let D=false,te=B.current;if(!te)return;let Me=d==="auto"?we?"dark":"light":d;return (async()=>{try{let fe=await Sp[h]();if(D)return;let ne=await fe(te,{center:r,zoom:i,bounds:a,appearance:Me,interactive:m,styleUrl:P,tilerKey:S,accessToken:R,apiKey:C,mapId:k},{onLoad:()=>{},onError:he=>G.current?.(he),onMarkerHover:he=>ye.current?.(he),onMarkerClick:()=>{}});if(D){ne.destroy();return}H.current=ne,ee(!0),ge.current?.(ml(H,I));}catch(fe){if(D)return;fe?.code||G.current?.({code:"provider-init-failed",message:fe?.message??"Map init failed",cause:fe});}})(),()=>{D=true,H.current?.destroy(),H.current=null,ee(false),I.current.clear(),V.current=null;}},[h,P,R,C,k,S]),w.useEffect(()=>{H.current?.setAppearance(v);},[v]),w.useEffect(()=>{H.current?.setInteractive(m);},[m]),w.useEffect(()=>{H.current&&(a?H.current.setBounds(a[0],a[1]):(H.current.setCenter(r),H.current.setZoom(i)));},[r[0],r[1],i,a?.[0]?.[0],a?.[0]?.[1],a?.[1]?.[0],a?.[1]?.[1]]),w.useEffect(()=>{let D=V.current;D&&D!==s&&I.current.get(D)?.setHovered(false),s&&I.current.get(s)?.setHovered(true),V.current=s??null;},[s]),w.useImperativeHandle(o,()=>ml(H,I),[]);let O=w.useMemo(()=>({registerMarker:(D,te,Me)=>{let fe=H.current;if(!fe)return null;let ne=fe.addMarker(D,te,Me);I.current.set(D,ne),process.env.NODE_ENV!=="production"&&I.current.size===Cp+1&&console.warn(`@gradeui/ui Map: rendering ${I.current.size} markers. DOM markers degrade past ~1k. Consider clustering via the .instance escape hatch.`);let he=ne.remove;return ne.remove=()=>{he(),I.current.delete(D),V.current===D&&(V.current=null);},s===D&&ne.setHovered(true),ne}}),[Pe]);return w.createElement("div",{ref:B,"data-gds-part":"map",className:n("gds-map relative isolate overflow-hidden",g),style:{borderRadius:"var(--gds-map-radius, var(--radius, 0.5rem))",border:"var(--gds-map-border, 1px solid var(--border, transparent))",...u}},w.createElement(fa.Provider,{value:O},b))});ha.displayName="Map";function ml(e,t){let o=()=>{};return {flyTo:(r,i)=>{let a=e.current;if(!a)return;let d;if(typeof r=="string"){if(d=t.current.get(r)?.coords??null,!d){console.warn(`@gradeui/ui Map.flyTo: no marker registered with id "${r}".`);return}}else d=r;a.flyTo(d,i);},panTo:(r,i)=>e.current?.panTo(r,i)??o(),fitBounds:(r,i)=>e.current?.fitBounds(r,i)??o(),getCenter:()=>e.current?.getCenter()??[0,0],getZoom:()=>e.current?.getZoom()??0,getBounds:()=>e.current?.getBounds()??[[0,0],[0,0]],get instance(){return e.current?.instance??null}}}var ba=w.memo(function({id:t,at:o,anchor:r="bottom",className:i,children:a,onClick:d}){let m=Js(),[s,c]=w.useState(null),l=w.useRef(null),p=w.useRef(d);return w.useEffect(()=>{p.current=d;}),w.useEffect(()=>{if(!m)return;let g=m.registerMarker(t,o,r);if(g){l.current=g,c(g.element);let u=b=>{p.current?.({id:t,coords:g.coords,native:b});};return g.element.addEventListener("click",u),()=>{g.element.removeEventListener("click",u),g.remove(),l.current=null,c(null);}}},[m,t]),w.useEffect(()=>{l.current?.setPosition(o);},[o[0],o[1]]),s?createPortal(w.createElement("div",{"data-gds-part":"map-marker-content",className:n("pointer-events-auto",i)},a),s):null});ba.displayName="MapMarker";var Op={video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},Vp={none:"0",sm:"var(--radius, 0.25rem)",md:"calc(var(--radius, 0.375rem) * 1.25)",lg:"calc(var(--radius, 0.5rem) * 1.5)",xl:"calc(var(--radius, 0.75rem) * 2)"},_p={album:Disc3,"tv-show":Tv,movie:Clapperboard,game:Gamepad2,book:Book,portrait:User,landscape:Mountain,poster:Film,product:Package,food:UtensilsCrossed,video:Video,audio:Music,embed:Code2,"3d":Box,generic:Image},Wp={album:"square","tv-show":"portrait",movie:"portrait",game:"portrait",book:"portrait",portrait:"portrait",landscape:"wide",poster:"portrait",product:"square",food:"square",video:"video",audio:"video",embed:"video","3d":"square",generic:"video"};function $p(e){if(!e)return "";let t=/^(the|a|an|and|for|by|of|in|on|at|to)$/i,o=e.trim().split(/\s+/).filter(r=>r&&!t.test(r));return o.length===0?e.replace(/\s+/g,"").slice(0,2).toUpperCase():o.length===1?o[0].slice(0,2).toUpperCase():(o[0][0]+o[1][0]).toUpperCase()}function Up(e){return e<64?"sm":e>=160?"lg":"md"}var ot=w.forwardRef(({className:e,aspect:t,radius:o="lg",border:r=false,loading:i=false,onVisibilityChange:a,fallback:d,emptyState:m="auto",hint:s="generic",alt:c,source:l,src:p,glyph:g,overlay:u,instanceId:b,style:f,children:h,...P},S)=>{let R=w.useRef(null);w.useImperativeHandle(S,()=>R.current);let C=s,k=t,B=o,H=r,I=i,V=c,Pe=p,ee=m,ye=k??Wp[C];w.useEffect(()=>{if(!a||!R.current)return;let he=R.current,lt=new IntersectionObserver(([zt])=>a(zt.isIntersecting),{threshold:.05});return lt.observe(he),()=>lt.disconnect()},[a]);let G=!h&&ee!=="none",[ge,Ae]=w.useState("md");w.useEffect(()=>{if(!G)return;let he=R.current;if(!he)return;let lt=new ResizeObserver(([zt])=>{let Ho=zt.contentRect.width;Ae(Up(Ho));});return lt.observe(he),()=>lt.disconnect()},[G]);let we=w.useMemo(()=>$p(V),[V]),v=_p[C]??Image,O=ee==="auto"||ee==="icon",D=Pe,te=w.useMemo(()=>l?JSON.stringify(l):void 0,[l]),[Me,fe]=w.useState(false);w.useEffect(()=>{fe(false);},[D]);let ne=Me?void 0:D;return w.createElement("div",{ref:R,"data-gds-part":"media-surface","data-media-hint":C,"data-media-source-kind":l?.kind,"data-media-source":te,"data-media-alt":V,"data-gds-instance-id":b,className:n("gds-media-surface relative w-full overflow-hidden",Op[ye],H&&"border border-border",e),style:{borderRadius:`var(--gds-media-radius, ${Vp[B]})`,...f},...P},G&&w.createElement("div",{"data-gds-part":"media-surface-placeholder","data-tier":ge,className:"absolute inset-0 z-0 flex flex-col items-center justify-center gap-2 pointer-events-none px-3 text-center",style:{background:"var(--gds-media-placeholder-bg)",color:"var(--gds-media-placeholder-fg)"},"aria-hidden":true},O?ge==="sm"?we?w.createElement("span",{className:"font-semibold text-sm tracking-tight"},we):w.createElement(v,{className:"h-1/2 w-1/2 max-h-6 max-w-6"}):ge==="md"?w.createElement(w.Fragment,null,g??w.createElement(v,{className:"h-1/3 w-1/3 max-h-10 max-w-10"})):w.createElement(w.Fragment,null,g??w.createElement(v,{className:"h-1/4 w-1/4 max-h-12 max-w-12"}),V&&w.createElement("span",{className:"text-xs leading-snug line-clamp-2 max-w-[80%]","data-gds-part":"media-surface-caption"},V)):ee),(ne||h)&&w.createElement("div",{"data-gds-part":"media-surface-content",className:"absolute inset-0 z-[1]"},ne&&w.createElement("img",{src:ne,alt:V??"",onError:()=>fe(true),className:"absolute inset-0 h-full w-full object-cover","data-gds-part":"media-surface-img"}),h),I&&w.createElement("div",{className:"absolute inset-0 z-[2] flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},d),u&&w.createElement("div",{"data-gds-part":"media-surface-overlay",className:"absolute inset-0 z-10"},u))});ot.displayName="MediaSurface";function Ft(){let[e,t]=w.useState(false);return w.useEffect(()=>{let o=window.matchMedia("(prefers-reduced-motion: reduce)");t(o.matches);let r=i=>t(i.matches);return o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[]),e}var gl=w.forwardRef(({src:e,controls:t=true,autoPlay:o=false,loop:r=false,muted:i,pauseOffscreen:a=true,aspect:d="video",radius:m="lg",border:s=false,poster:c,label:l,className:p,style:g,playbackRate:u=1,objectFit:b="cover"},f)=>{let h=w.useRef(null),P=Ft(),[S,R]=w.useState(!!c);w.useImperativeHandle(f,()=>h.current);let C=i??o,k=o&&!P;w.useEffect(()=>{h.current&&(h.current.playbackRate=u);},[u]),w.useEffect(()=>{R(!!c);},[c]);let B=w.useCallback(H=>{!a||!h.current||(H&&k?h.current.play().catch(()=>{}):h.current.pause());},[a,k]);return w.createElement(ot,{aspect:d,radius:m,border:s,"aria-label":l,className:p,style:g,onVisibilityChange:a?B:void 0},w.createElement("video",{ref:h,src:e,controls:t,autoPlay:k,loop:r,muted:C,playsInline:true,preload:k?"auto":"metadata",onPlaying:()=>R(false),className:n("w-full h-full",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")},"Your browser does not support the video tag."),c&&S&&w.createElement("img",{src:c,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async","data-gds-part":"video-poster",className:n("absolute inset-0 w-full h-full pointer-events-none transition-opacity duration-200",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")}))});gl.displayName="VideoPlayer";var fl=w.forwardRef(({src:e,controls:t=false,autoPlay:o=true,loop:r=true,pauseOffscreen:i=true,aspect:a="square",radius:d="lg",border:m=false,poster:s,label:c,className:l,style:p,stateMachines:g,artboard:u,fit:b="contain",stateMachineInputs:f},h)=>{let P=Ft(),[S,R]=w.useState(null),[C,k]=w.useState(null);return w.useEffect(()=>{let B=false;return import('@rive-app/react-canvas').then(H=>{B||R(H);}).catch(()=>{B||k("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{B=true;}},[]),w.createElement(ot,{ref:h,aspect:a,radius:d,border:m,"aria-label":c,className:l,style:p},C?w.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},C):S&&e?w.createElement(qp,{Mod:S,src:e,stateMachines:g,artboard:u,fit:b,stateMachineInputs:f,autoPlay:o&&!P,loop:r,pauseOffscreen:i,controls:t,poster:s}):s&&w.createElement("img",{src:s,alt:"",className:"w-full h-full object-contain"}))});fl.displayName="RivePlayer";function qp({Mod:e,src:t,stateMachines:o,artboard:r,fit:i,autoPlay:a,loop:d,pauseOffscreen:m,controls:s,poster:c}){let{useRive:l,Layout:p,Fit:g,Alignment:u,EventType:b}=e,f={contain:g.Contain,cover:g.Cover,fill:g.Fill,fitWidth:g.FitWidth,fitHeight:g.FitHeight,none:g.None},{rive:h,RiveComponent:P}=l({src:t,stateMachines:o,artboard:r,autoplay:a,layout:new p({fit:f[i],alignment:u.Center})}),[S,R]=w.useState(a);w.useEffect(()=>{if(!h||!d)return;let k=()=>{h.play();};return h.on(b.Stop,k),()=>{h.off(b.Stop,k);}},[h,d,b]),w.useEffect(()=>{if(!m||!h)return;let k=h.canvas;if(!k)return;let B=new IntersectionObserver(([H])=>{H.isIntersecting&&a?h.play():h.pause();},{threshold:.05});return B.observe(k),()=>B.disconnect()},[h,m,a]);let C=()=>{h&&(S?(h.pause(),R(false)):(h.play(),R(true)));};return w.createElement(w.Fragment,null,w.createElement(P,{className:"w-full h-full"}),!h&&c&&w.createElement("img",{src:c,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),s&&w.createElement("div",{className:n("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/40 to-transparent")},w.createElement(xe,{size:"icon",variant:"secondary",onClick:C},S?w.createElement(Pause,{className:"h-4 w-4"}):w.createElement(Play,{className:"h-4 w-4"}))))}var bl=({renderer:e,scene:t,camera:o,preset:r,width:i,height:a})=>{let d=new EffectComposer(e);d.setSize(i,a),d.addPass(new RenderPass(t,o));let m=new BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:KernelSize.MEDIUM}),s=new NoiseEffect({blendFunction:BlendFunction.OVERLAY});s.blendMode.opacity.value=0;let c=new ScanlineEffect({blendFunction:BlendFunction.OVERLAY,density:1.25});c.blendMode.opacity.value=0;let l=new VignetteEffect({darkness:0,offset:.5}),p=new ChromaticAberrationEffect({offset:new Z.Vector2(0,0),radialModulation:false,modulationOffset:.15}),g=new GlitchEffect({chromaticAberrationOffset:new Z.Vector2(0,0),columns:.05});g.minStrength=0,g.maxStrength=0,d.addPass(new EffectPass(o,m)),d.addPass(new EffectPass(o,s,c,l)),d.addPass(new EffectPass(o,p)),d.addPass(new EffectPass(o,g));function u(b){let f=b.effects;m.intensity=f.bloom?.intensity??0,m.luminanceMaterial&&f.bloom?.luminanceThreshold!==void 0&&(m.luminanceMaterial.threshold=f.bloom.luminanceThreshold),s.blendMode.opacity.value=f.noise?.intensity??0,c.density=f.scanlines?.density??1.25,c.blendMode.opacity.value=f.scanlines?.opacity??0,l.darkness=f.vignette?.darkness??0,l.offset=f.vignette?.offset??.5;let h=f.chromatic?.offset??0;p.offset?.set(h,h),f.glitch?(g.minStrength=f.glitch.strength?.[0]??0,g.maxStrength=f.glitch.strength?.[1]??0):(g.minStrength=0,g.maxStrength=0);}return u(r),{composer:d,setPreset:u,resize:(b,f)=>d.setSize(b,f),dispose:()=>{d.dispose();}}};var Xt=3e3,ya=400,am=80,vl=({width:e,height:t,palette:o})=>{let r=new Z.Scene;r.background=new Z.Color(o.background);let i=new Z.PerspectiveCamera(70,e/t,.1,ya*2);i.position.z=0;let a=new Float32Array(Xt*6),d=new Float32Array(Xt*6),m=new Float32Array(Xt),s=new Z.Color(o.primary),c=new Z.Color(o.accent);function l(h,P){let S=Math.random()*Math.PI*2,R=am*Math.pow(Math.random(),.6),C=Math.cos(S)*R,k=Math.sin(S)*R,B=P?-Math.random()*ya:-ya;m[h]=B,a[h*6+0]=C,a[h*6+1]=k,a[h*6+2]=B,a[h*6+3]=C,a[h*6+4]=k,a[h*6+5]=B-2,d[h*6+0]=s.r,d[h*6+1]=s.g,d[h*6+2]=s.b,d[h*6+3]=c.r,d[h*6+4]=c.g,d[h*6+5]=c.b;}for(let h=0;h<Xt;h++)l(h,true);let p=new Z.BufferGeometry;p.setAttribute("position",new Z.BufferAttribute(a,3)),p.setAttribute("color",new Z.BufferAttribute(d,3));let g=new Z.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:Z.AdditiveBlending}),u=new Z.LineSegments(p,g);r.add(u);let b=60,f=6;return {scene:r,camera:i,update:(h,P)=>{let S=p.attributes.position.array;for(let R=0;R<Xt;R++){let C=R*6;S[C+2]+=b*P,S[C+5]=S[C+2]-f,S[C+2]>5&&l(R,false);}p.attributes.position.needsUpdate=true;},resize:(h,P)=>{let S=i;S.aspect=h/P,S.updateProjectionMatrix();},setPalette:h=>{r.background=new Z.Color(h.background);let P=new Z.Color(h.primary),S=new Z.Color(h.accent),R=p.attributes.color.array;for(let C=0;C<Xt;C++)R[C*6+0]=P.r,R[C*6+1]=P.g,R[C*6+2]=P.b,R[C*6+3]=S.r,R[C*6+4]=S.g,R[C*6+5]=S.b;p.attributes.color.needsUpdate=true;},dispose:()=>{p.dispose(),g.dispose();}}};var nm=`
301
+ `,za=w.createContext(null);function Xp({children:e,defaultTheme:t=bo,defaultMode:o="light"}){let[r,n]=w.useState(t),[a,l]=w.useState(o),[m,s]=w.useState(0);w.useEffect(()=>{try{let f=localStorage.getItem(Fa);f&&Qt(f)&&n(f);let h=localStorage.getItem(Dr);if(h&&Pl.includes(h))l(h);else if(typeof window<"u"){let C=window.matchMedia("(prefers-color-scheme: dark)").matches;l(C?"dark":"light");}}catch{}},[]),w.useEffect(()=>{let f=Qt(r)??Qt(bo);f&&(Er(f,a),typeof document<"u"&&document.documentElement.classList.toggle("dark",Tl.has(a)));},[r,a,m]),w.useEffect(()=>{if(typeof window>"u")return;let f=window.matchMedia("(prefers-color-scheme: dark)"),h=C=>{try{if(localStorage.getItem(Dr))return}catch{return}l(C.matches?"dark":"light");};return f.addEventListener("change",h),()=>f.removeEventListener("change",h)},[]);let c=w.useCallback(f=>{n(f);try{localStorage.setItem(Fa,f);}catch{}},[]),d=w.useCallback(f=>{l(f);try{localStorage.setItem(Dr,f);}catch{}},[]),p=w.useCallback(f=>{Hr(f),s(h=>h+1),c(f.id);},[c]),g=w.useCallback(f=>{f in gt||(Ia(f),s(h=>h+1),n(h=>h===f?bo:h));},[]),u=w.useCallback(()=>{s(f=>f+1);},[]),b=w.useMemo(()=>{let f=Qt(r)??Qt(bo);return {theme:f,themeId:f.id,mode:a,isDark:Tl.has(a),setThemeId:c,setMode:d,themes:Da(),saveAndActivate:p,deleteTheme:g,refresh:u}},[r,a,m,c,d,p,g,u]);return w.createElement(za.Provider,{value:b},e)}function Ba(){let e=w.useContext(za);if(!e)throw new Error("useGradeTheme must be used inside <GradeThemeProvider>. Wrap your app (typically in app/layout.tsx).");return e}function eo(){return w.useContext(za)}var Va=w.createContext(null);function Ml(){return w.useContext(Va)}var lm={maplibre:()=>Promise.resolve().then(()=>(Al(),Dl)).then(e=>e.createMaplibreAdapter),mapbox:()=>Promise.resolve().then(()=>(Bl(),zl)).then(e=>e.createMapboxAdapter),google:()=>Promise.resolve().then(()=>(Gl(),Ol)).then(e=>e.createGoogleAdapter)},dm=500,Oa=w.forwardRef(function(t,o){let{center:r,zoom:n,bounds:a,appearance:l="auto",interactive:m=true,hoveredId:s,onHoveredIdChange:c,onLoad:d,onError:p,className:g,style:u,children:b,...f}=t,h=f.provider??"maplibre",C=f.styleUrl,S=f.tilerKey,x=f.accessToken,k=f.apiKey,P=f.mapId,V=w.useRef(null),N=w.useRef(null),F=w.useRef(new globalThis.Map),G=w.useRef(null),[he,re]=w.useState(false),K=w.useRef(c),O=w.useRef(p),te=w.useRef(d);w.useEffect(()=>{K.current=c,O.current=p,te.current=d;});let se=eo()?.isDark??false,v=l==="auto"?se?"dark":"light":l;w.useEffect(()=>{let H=false,X=V.current;if(!X)return;let Pe=l==="auto"?se?"dark":"light":l;return (async()=>{try{let le=await lm[h]();if(H)return;let de=await le(X,{center:r,zoom:n,bounds:a,appearance:Pe,interactive:m,styleUrl:C,tilerKey:S,accessToken:x,apiKey:k,mapId:P},{onLoad:()=>{},onError:J=>O.current?.(J),onMarkerHover:J=>K.current?.(J),onMarkerClick:()=>{}});if(H){de.destroy();return}N.current=de,re(!0),te.current?.(_l(N,F));}catch(le){if(H)return;le?.code||O.current?.({code:"provider-init-failed",message:le?.message??"Map init failed",cause:le});}})(),()=>{H=true,N.current?.destroy(),N.current=null,re(false),F.current.clear(),G.current=null;}},[h,C,x,k,P,S]),w.useEffect(()=>{N.current?.setAppearance(v);},[v]),w.useEffect(()=>{N.current?.setInteractive(m);},[m]),w.useEffect(()=>{N.current&&(a?N.current.setBounds(a[0],a[1]):(N.current.setCenter(r),N.current.setZoom(n)));},[r[0],r[1],n,a?.[0]?.[0],a?.[0]?.[1],a?.[1]?.[0],a?.[1]?.[1]]),w.useEffect(()=>{let H=G.current;H&&H!==s&&F.current.get(H)?.setHovered(false),s&&F.current.get(s)?.setHovered(true),G.current=s??null;},[s]),w.useImperativeHandle(o,()=>_l(N,F),[]);let z=w.useMemo(()=>({registerMarker:(H,X,Pe)=>{let le=N.current;if(!le)return null;let de=le.addMarker(H,X,Pe);F.current.set(H,de),process.env.NODE_ENV!=="production"&&F.current.size===dm+1&&console.warn(`@gradeui/ui Map: rendering ${F.current.size} markers. DOM markers degrade past ~1k. Consider clustering via the .instance escape hatch.`);let J=de.remove;return de.remove=()=>{J(),F.current.delete(H),G.current===H&&(G.current=null);},s===H&&de.setHovered(true),de}}),[he]);return w.createElement("div",{ref:V,"data-gds-part":"map",className:i("gds-map relative isolate overflow-hidden",g),style:{borderRadius:"var(--gds-map-radius, var(--radius, 0.5rem))",border:"var(--gds-map-border, 1px solid var(--border, transparent))",...u}},w.createElement(Va.Provider,{value:z},b))});Oa.displayName="Map";function _l(e,t){let o=()=>{};return {flyTo:(r,n)=>{let a=e.current;if(!a)return;let l;if(typeof r=="string"){if(l=t.current.get(r)?.coords??null,!l){console.warn(`@gradeui/ui Map.flyTo: no marker registered with id "${r}".`);return}}else l=r;a.flyTo(l,n);},panTo:(r,n)=>e.current?.panTo(r,n)??o(),fitBounds:(r,n)=>e.current?.fitBounds(r,n)??o(),getCenter:()=>e.current?.getCenter()??[0,0],getZoom:()=>e.current?.getZoom()??0,getBounds:()=>e.current?.getBounds()??[[0,0],[0,0]],get instance(){return e.current?.instance??null}}}var Ga=w.memo(function({id:t,at:o,anchor:r="bottom",className:n,children:a,onClick:l}){let m=Ml(),[s,c]=w.useState(null),d=w.useRef(null),p=w.useRef(l);return w.useEffect(()=>{p.current=l;}),w.useEffect(()=>{if(!m)return;let g=m.registerMarker(t,o,r);if(g){d.current=g,c(g.element);let u=b=>{p.current?.({id:t,coords:g.coords,native:b});};return g.element.addEventListener("click",u),()=>{g.element.removeEventListener("click",u),g.remove(),d.current=null,c(null);}}},[m,t]),w.useEffect(()=>{d.current?.setPosition(o);},[o[0],o[1]]),s?createPortal(w.createElement("div",{"data-gds-part":"map-marker-content",className:i("pointer-events-auto",n)},a),s):null});Ga.displayName="MapMarker";var km={video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]",wide:"aspect-[21/9]",auto:""},Tm={none:"0",sm:"var(--radius, 0.25rem)",md:"calc(var(--radius, 0.375rem) * 1.25)",lg:"calc(var(--radius, 0.5rem) * 1.5)",xl:"calc(var(--radius, 0.75rem) * 2)"},Pm={album:Disc3,"tv-show":Tv,movie:Clapperboard,game:Gamepad2,book:Book,portrait:User,landscape:Mountain,poster:Film,product:Package,food:UtensilsCrossed,video:Video,audio:Music,embed:Code2,"3d":Box,generic:Image},Mm={album:"square","tv-show":"portrait",movie:"portrait",game:"portrait",book:"portrait",portrait:"portrait",landscape:"wide",poster:"portrait",product:"square",food:"square",video:"video",audio:"video",embed:"video","3d":"square",generic:"video"};function Nm(e){if(!e)return "";let t=/^(the|a|an|and|for|by|of|in|on|at|to)$/i,o=e.trim().split(/\s+/).filter(r=>r&&!t.test(r));return o.length===0?e.replace(/\s+/g,"").slice(0,2).toUpperCase():o.length===1?o[0].slice(0,2).toUpperCase():(o[0][0]+o[1][0]).toUpperCase()}function Em(e){return e<64?"sm":e>=160?"lg":"md"}var ft=w.forwardRef(({className:e,aspect:t,radius:o="lg",border:r=false,loading:n=false,onVisibilityChange:a,fallback:l,emptyState:m="auto",hint:s="generic",alt:c,source:d,src:p,glyph:g,overlay:u,instanceId:b,style:f,children:h,...C},S)=>{let x=w.useRef(null);w.useImperativeHandle(S,()=>x.current);let k=s,P=t,V=o,N=r,F=n,G=c,he=p,re=m,K=P??Mm[k];w.useEffect(()=>{if(!a||!x.current)return;let J=x.current,nt=new IntersectionObserver(([it])=>a(it.isIntersecting),{threshold:.05});return nt.observe(J),()=>nt.disconnect()},[a]);let O=!h&&re!=="none",[te,He]=w.useState("md");w.useEffect(()=>{if(!O)return;let J=x.current;if(!J)return;let nt=new ResizeObserver(([it])=>{let Ge=it.contentRect.width;He(Em(Ge));});return nt.observe(J),()=>nt.disconnect()},[O]);let se=w.useMemo(()=>Nm(G),[G]),v=Pm[k]??Image,z=re==="auto"||re==="icon",H=he,X=w.useMemo(()=>d?JSON.stringify(d):void 0,[d]),[Pe,le]=w.useState(false);w.useEffect(()=>{le(false);},[H]);let de=Pe?void 0:H;return w.createElement("div",{ref:x,"data-gds-part":"media-surface","data-media-hint":k,"data-media-source-kind":d?.kind,"data-media-source":X,"data-media-alt":G,"data-gds-instance-id":b,className:i("gds-media-surface relative w-full overflow-hidden",km[K],N&&"border border-border",e),style:{borderRadius:`var(--gds-media-radius, ${Tm[V]})`,...f},...C},O&&w.createElement("div",{"data-gds-part":"media-surface-placeholder","data-tier":te,className:"absolute inset-0 z-0 flex flex-col items-center justify-center gap-2 pointer-events-none px-3 text-center",style:{background:"var(--gds-media-placeholder-bg)",color:"var(--gds-media-placeholder-fg)"},"aria-hidden":true},z?te==="sm"?se?w.createElement("span",{className:"font-semibold text-sm tracking-tight"},se):w.createElement(v,{className:"h-1/2 w-1/2 max-h-6 max-w-6"}):te==="md"?w.createElement(w.Fragment,null,g??w.createElement(v,{className:"h-1/3 w-1/3 max-h-10 max-w-10"})):w.createElement(w.Fragment,null,g??w.createElement(v,{className:"h-1/4 w-1/4 max-h-12 max-w-12"}),G&&w.createElement("span",{className:"text-xs leading-snug line-clamp-2 max-w-[80%]","data-gds-part":"media-surface-caption"},G)):re),(de||h)&&w.createElement("div",{"data-gds-part":"media-surface-content",className:"absolute inset-0 z-[1]"},de&&w.createElement("img",{src:de,alt:G??"",onError:()=>le(true),className:"absolute inset-0 h-full w-full object-cover","data-gds-part":"media-surface-img"}),h),F&&w.createElement("div",{className:"absolute inset-0 z-[2] flex items-center justify-center bg-muted animate-pulse","aria-hidden":true},l),u&&w.createElement("div",{"data-gds-part":"media-surface-overlay",className:"absolute inset-0 z-10"},u))});ft.displayName="MediaSurface";function to(){let[e,t]=w.useState(false);return w.useEffect(()=>{let o=window.matchMedia("(prefers-reduced-motion: reduce)");t(o.matches);let r=n=>t(n.matches);return o.addEventListener("change",r),()=>o.removeEventListener("change",r)},[]),e}var Ul=w.forwardRef(({src:e,controls:t=true,autoPlay:o=false,loop:r=false,muted:n,pauseOffscreen:a=true,aspect:l="video",radius:m="lg",border:s=false,poster:c,label:d,className:p,style:g,playbackRate:u=1,objectFit:b="cover"},f)=>{let h=w.useRef(null),C=to(),[S,x]=w.useState(!!c);w.useImperativeHandle(f,()=>h.current);let k=n??o,P=o&&!C;w.useEffect(()=>{h.current&&(h.current.playbackRate=u);},[u]),w.useEffect(()=>{x(!!c);},[c]);let V=w.useCallback(N=>{!a||!h.current||(N&&P?h.current.play().catch(()=>{}):h.current.pause());},[a,P]);return w.createElement(ft,{aspect:l,radius:m,border:s,"aria-label":d,className:p,style:g,onVisibilityChange:a?V:void 0},w.createElement("video",{ref:h,src:e,controls:t,autoPlay:P,loop:r,muted:k,playsInline:true,preload:P?"auto":"metadata",onPlaying:()=>x(false),className:i("w-full h-full",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")},"Your browser does not support the video tag."),c&&S&&w.createElement("img",{src:c,alt:"","aria-hidden":"true",loading:"lazy",decoding:"async","data-gds-part":"video-poster",className:i("absolute inset-0 w-full h-full pointer-events-none transition-opacity duration-200",b==="cover"&&"object-cover",b==="contain"&&"object-contain",b==="fill"&&"object-fill")}))});Ul.displayName="VideoPlayer";var $l=w.forwardRef(({src:e,controls:t=false,autoPlay:o=true,loop:r=true,pauseOffscreen:n=true,aspect:a="square",radius:l="lg",border:m=false,poster:s,label:c,className:d,style:p,stateMachines:g,artboard:u,fit:b="contain",stateMachineInputs:f},h)=>{let C=to(),[S,x]=w.useState(null),[k,P]=w.useState(null);return w.useEffect(()=>{let V=false;return import('@rive-app/react-canvas').then(N=>{V||x(N);}).catch(()=>{V||P("Rive runtime not installed. Run `npm install @rive-app/react-canvas`.");}),()=>{V=true;}},[]),w.createElement(ft,{ref:h,aspect:a,radius:l,border:m,"aria-label":c,className:d,style:p},k?w.createElement("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4 text-center"},k):S&&e?w.createElement(Dm,{Mod:S,src:e,stateMachines:g,artboard:u,fit:b,stateMachineInputs:f,autoPlay:o&&!C,loop:r,pauseOffscreen:n,controls:t,poster:s}):s&&w.createElement("img",{src:s,alt:"",className:"w-full h-full object-contain"}))});$l.displayName="RivePlayer";function Dm({Mod:e,src:t,stateMachines:o,artboard:r,fit:n,autoPlay:a,loop:l,pauseOffscreen:m,controls:s,poster:c}){let{useRive:d,Layout:p,Fit:g,Alignment:u,EventType:b}=e,f={contain:g.Contain,cover:g.Cover,fill:g.Fill,fitWidth:g.FitWidth,fitHeight:g.FitHeight,none:g.None},{rive:h,RiveComponent:C}=d({src:t,stateMachines:o,artboard:r,autoplay:a,layout:new p({fit:f[n],alignment:u.Center})}),[S,x]=w.useState(a);w.useEffect(()=>{if(!h||!l)return;let P=()=>{h.play();};return h.on(b.Stop,P),()=>{h.off(b.Stop,P);}},[h,l,b]),w.useEffect(()=>{if(!m||!h)return;let P=h.canvas;if(!P)return;let V=new IntersectionObserver(([N])=>{N.isIntersecting&&a?h.play():h.pause();},{threshold:.05});return V.observe(P),()=>V.disconnect()},[h,m,a]);let k=()=>{h&&(S?(h.pause(),x(false)):(h.play(),x(true)));};return w.createElement(w.Fragment,null,w.createElement(C,{className:"w-full h-full"}),!h&&c&&w.createElement("img",{src:c,alt:"",className:"absolute inset-0 w-full h-full object-contain pointer-events-none"}),s&&w.createElement("div",{className:i("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/40 to-transparent")},w.createElement(Ne,{size:"icon",variant:"secondary",onClick:k},S?w.createElement(Pause,{className:"h-4 w-4"}):w.createElement(Play,{className:"h-4 w-4"}))))}var Kl=({renderer:e,scene:t,camera:o,preset:r,width:n,height:a})=>{let l=new EffectComposer(e);l.setSize(n,a),l.addPass(new RenderPass(t,o));let m=new BloomEffect({intensity:0,luminanceThreshold:.6,radius:.6,kernelSize:KernelSize.MEDIUM}),s=new NoiseEffect({blendFunction:BlendFunction.OVERLAY});s.blendMode.opacity.value=0;let c=new ScanlineEffect({blendFunction:BlendFunction.OVERLAY,density:1.25});c.blendMode.opacity.value=0;let d=new VignetteEffect({darkness:0,offset:.5}),p=new ChromaticAberrationEffect({offset:new oe.Vector2(0,0),radialModulation:false,modulationOffset:.15}),g=new GlitchEffect({chromaticAberrationOffset:new oe.Vector2(0,0),columns:.05});g.minStrength=0,g.maxStrength=0,l.addPass(new EffectPass(o,m)),l.addPass(new EffectPass(o,s,c,d)),l.addPass(new EffectPass(o,p)),l.addPass(new EffectPass(o,g));function u(b){let f=b.effects;m.intensity=f.bloom?.intensity??0,m.luminanceMaterial&&f.bloom?.luminanceThreshold!==void 0&&(m.luminanceMaterial.threshold=f.bloom.luminanceThreshold),s.blendMode.opacity.value=f.noise?.intensity??0,c.density=f.scanlines?.density??1.25,c.blendMode.opacity.value=f.scanlines?.opacity??0,d.darkness=f.vignette?.darkness??0,d.offset=f.vignette?.offset??.5;let h=f.chromatic?.offset??0;p.offset?.set(h,h),f.glitch?(g.minStrength=f.glitch.strength?.[0]??0,g.maxStrength=f.glitch.strength?.[1]??0):(g.minStrength=0,g.maxStrength=0);}return u(r),{composer:l,setPreset:u,resize:(b,f)=>l.setSize(b,f),dispose:()=>{l.dispose();}}};var vo=3e3,Wa=400,Wm=80,ql=({width:e,height:t,palette:o})=>{let r=new oe.Scene;r.background=new oe.Color(o.background);let n=new oe.PerspectiveCamera(70,e/t,.1,Wa*2);n.position.z=0;let a=new Float32Array(vo*6),l=new Float32Array(vo*6),m=new Float32Array(vo),s=new oe.Color(o.primary),c=new oe.Color(o.accent);function d(h,C){let S=Math.random()*Math.PI*2,x=Wm*Math.pow(Math.random(),.6),k=Math.cos(S)*x,P=Math.sin(S)*x,V=C?-Math.random()*Wa:-Wa;m[h]=V,a[h*6+0]=k,a[h*6+1]=P,a[h*6+2]=V,a[h*6+3]=k,a[h*6+4]=P,a[h*6+5]=V-2,l[h*6+0]=s.r,l[h*6+1]=s.g,l[h*6+2]=s.b,l[h*6+3]=c.r,l[h*6+4]=c.g,l[h*6+5]=c.b;}for(let h=0;h<vo;h++)d(h,true);let p=new oe.BufferGeometry;p.setAttribute("position",new oe.BufferAttribute(a,3)),p.setAttribute("color",new oe.BufferAttribute(l,3));let g=new oe.LineBasicMaterial({vertexColors:true,transparent:true,opacity:.95,blending:oe.AdditiveBlending}),u=new oe.LineSegments(p,g);r.add(u);let b=60,f=6;return {scene:r,camera:n,update:(h,C)=>{let S=p.attributes.position.array;for(let x=0;x<vo;x++){let k=x*6;S[k+2]+=b*C,S[k+5]=S[k+2]-f,S[k+2]>5&&d(x,false);}p.attributes.position.needsUpdate=true;},resize:(h,C)=>{let S=n;S.aspect=h/C,S.updateProjectionMatrix();},setPalette:h=>{r.background=new oe.Color(h.background);let C=new oe.Color(h.primary),S=new oe.Color(h.accent),x=p.attributes.color.array;for(let k=0;k<vo;k++)x[k*6+0]=C.r,x[k*6+1]=C.g,x[k*6+2]=C.b,x[k*6+3]=S.r,x[k*6+4]=S.g,x[k*6+5]=S.b;p.attributes.color.needsUpdate=true;},dispose:()=>{p.dispose(),g.dispose();}}};var Um=`
293
302
  precision highp float;
294
303
  varying vec2 vUv;
295
304
  uniform float uTime;
@@ -327,19 +336,19 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
327
336
 
328
337
  gl_FragColor = vec4(col, 1.0);
329
338
  }
330
- `,im=`
339
+ `,$m=`
331
340
  varying vec2 vUv;
332
341
  void main() {
333
342
  vUv = uv;
334
343
  gl_Position = vec4(position.xy, 0.0, 1.0);
335
344
  }
336
- `,yl=({width:e,height:t,palette:o})=>{let r=new Z.Scene,i=new Z.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new Z.Vector2(e,t)},uBackground:{value:new Z.Color(o.background)},uPrimary:{value:new Z.Color(o.primary)},uSecondary:{value:new Z.Color(o.secondary)},uAccent:{value:new Z.Color(o.accent)}},d=new Z.ShaderMaterial({uniforms:a,vertexShader:im,fragmentShader:nm,depthTest:false,depthWrite:false}),m=new Z.PlaneGeometry(2,2),s=new Z.Mesh(m,d);return r.add(s),{scene:r,camera:i,update:l=>{a.uTime.value=l;},resize:(l,p)=>{a.uResolution.value.set(l,p);},setPalette:l=>{a.uBackground.value.set(l.background),a.uPrimary.value.set(l.primary),a.uSecondary.value.set(l.secondary),a.uAccent.value.set(l.accent);},dispose:()=>{m.dispose(),d.dispose();}}};var sm=`
345
+ `,Yl=({width:e,height:t,palette:o})=>{let r=new oe.Scene,n=new oe.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new oe.Vector2(e,t)},uBackground:{value:new oe.Color(o.background)},uPrimary:{value:new oe.Color(o.primary)},uSecondary:{value:new oe.Color(o.secondary)},uAccent:{value:new oe.Color(o.accent)}},l=new oe.ShaderMaterial({uniforms:a,vertexShader:$m,fragmentShader:Um,depthTest:false,depthWrite:false}),m=new oe.PlaneGeometry(2,2),s=new oe.Mesh(m,l);return r.add(s),{scene:r,camera:n,update:d=>{a.uTime.value=d;},resize:(d,p)=>{a.uResolution.value.set(d,p);},setPalette:d=>{a.uBackground.value.set(d.background),a.uPrimary.value.set(d.primary),a.uSecondary.value.set(d.secondary),a.uAccent.value.set(d.accent);},dispose:()=>{m.dispose(),l.dispose();}}};var jm=`
337
346
  varying vec2 vUv;
338
347
  void main() {
339
348
  vUv = uv;
340
349
  gl_Position = vec4(position.xy, 0.0, 1.0);
341
350
  }
342
- `,lm=`
351
+ `,Km=`
343
352
  precision highp float;
344
353
  varying vec2 vUv;
345
354
  uniform float uTime;
@@ -396,13 +405,13 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
396
405
 
397
406
  gl_FragColor = vec4(col, 1.0);
398
407
  }
399
- `,wl=({width:e,height:t,palette:o})=>{let r=new Z.Scene,i=new Z.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new Z.Vector2(e,t)},uBackground:{value:new Z.Color(o.background)},uPrimary:{value:new Z.Color(o.primary)},uSecondary:{value:new Z.Color(o.secondary)},uAccent:{value:new Z.Color(o.accent)}},d=new Z.ShaderMaterial({uniforms:a,vertexShader:sm,fragmentShader:lm,depthTest:false,depthWrite:false}),m=new Z.PlaneGeometry(2,2),s=new Z.Mesh(m,d);return r.add(s),{scene:r,camera:i,update:l=>{a.uTime.value=l;},resize:(l,p)=>{a.uResolution.value.set(l,p);},setPalette:l=>{a.uBackground.value.set(l.background),a.uPrimary.value.set(l.primary),a.uSecondary.value.set(l.secondary),a.uAccent.value.set(l.accent);},dispose:()=>{m.dispose(),d.dispose();}}};var dm=`
408
+ `,Zl=({width:e,height:t,palette:o})=>{let r=new oe.Scene,n=new oe.OrthographicCamera(-1,1,1,-1,0,1),a={uTime:{value:0},uResolution:{value:new oe.Vector2(e,t)},uBackground:{value:new oe.Color(o.background)},uPrimary:{value:new oe.Color(o.primary)},uSecondary:{value:new oe.Color(o.secondary)},uAccent:{value:new oe.Color(o.accent)}},l=new oe.ShaderMaterial({uniforms:a,vertexShader:jm,fragmentShader:Km,depthTest:false,depthWrite:false}),m=new oe.PlaneGeometry(2,2),s=new oe.Mesh(m,l);return r.add(s),{scene:r,camera:n,update:d=>{a.uTime.value=d;},resize:(d,p)=>{a.uResolution.value.set(d,p);},setPalette:d=>{a.uBackground.value.set(d.background),a.uPrimary.value.set(d.primary),a.uSecondary.value.set(d.secondary),a.uAccent.value.set(d.accent);},dispose:()=>{m.dispose(),l.dispose();}}};var qm=`
400
409
  varying vec2 vUv;
401
410
  void main() {
402
411
  vUv = uv;
403
412
  gl_Position = vec4(position.xy, 0.0, 1.0);
404
413
  }
405
- `,cm=`
414
+ `,Ym=`
406
415
  precision highp float;
407
416
  varying vec2 vUv;
408
417
  uniform float uTime;
@@ -472,7 +481,7 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
472
481
 
473
482
  gl_FragColor = vec4(col, 1.0);
474
483
  }
475
- `,xl=({palette:e})=>{let t=new Z.Scene,o=new Z.OrthographicCamera(-1,1,1,-1,0,1),r={uTime:{value:0},uBackground:{value:new Z.Color(e.background)},uPrimary:{value:new Z.Color(e.primary)},uSecondary:{value:new Z.Color(e.secondary)},uAccent:{value:new Z.Color(e.accent)}},i=new Z.ShaderMaterial({uniforms:r,vertexShader:dm,fragmentShader:cm,depthTest:false,depthWrite:false}),a=new Z.PlaneGeometry(2,2),d=new Z.Mesh(a,i);return t.add(d),{scene:t,camera:o,update:s=>{r.uTime.value=s;},setPalette:s=>{r.uBackground.value.set(s.background),r.uPrimary.value.set(s.primary),r.uSecondary.value.set(s.secondary),r.uAccent.value.set(s.accent);},dispose:()=>{a.dispose(),i.dispose();}}};var Po={space:vl,plasma:yl,voronoi:wl,synthwave:xl},Mo=[{id:"space",label:"Hyperspace",description:"Classic 'jump to hyperspace' \u2014 streaking stars flying past camera. Pairs well with VHS or Cinematic post-FX.",tags:["space","retro","motion","hero","background"],scene:"space",defaultPostPreset:"vhs"},{id:"plasma",label:"Plasma",description:"Soft rolling colour clouds \u2014 overlapping sines warping a palette ramp. Classic demoscene vibe. Pairs well with Synthwave or Cinematic.",tags:["abstract","soft","ambient","hero","background","gradient"],scene:"plasma",defaultPostPreset:"synthwave"},{id:"voronoi",label:"Voronoi",description:"Jittered cellular grid \u2014 orbiting seed points form animated cells with glowing edges. Great for data / organic / network moods. Pairs well with CRT or VHS.",tags:["abstract","cells","organic","network","hero","background"],scene:"voronoi",defaultPostPreset:"crt"},{id:"synthwave",label:"Synthwave Grid",description:"Retro-future perspective grid receding to a banded sun disc on the horizon. Pairs beautifully with the Synthwave post preset (its namesake).",tags:["retro","synthwave","80s","hero","background","grid","sun"],scene:"synthwave",defaultPostPreset:"synthwave"}],No=Object.fromEntries(Mo.map(e=>[e.id,e]));var Eo={none:{id:"none",label:"Clean",effects:{}},vhs:{id:"vhs",label:"VHS",effects:{bloom:{intensity:.35,luminanceThreshold:.5,radius:.7},noise:{intensity:.04},scanlines:{density:1.5,opacity:.12},vignette:{darkness:.4,offset:.45},chromatic:{offset:.0015}}},cinematic:{id:"cinematic",label:"Cinematic",effects:{bloom:{intensity:.5,luminanceThreshold:.55,radius:.8},vignette:{darkness:.5,offset:.5}}},synthwave:{id:"synthwave",label:"Synthwave",effects:{bloom:{intensity:.8,luminanceThreshold:.3,radius:.9},chromatic:{offset:.002},vignette:{darkness:.3,offset:.55}}},crt:{id:"crt",label:"CRT",effects:{bloom:{intensity:.2,luminanceThreshold:.7,radius:.4},scanlines:{density:2,opacity:.25},vignette:{darkness:.6,offset:.4},chromatic:{offset:.0025}}}},gr="vhs";var Rl=`
484
+ `,Xl=({palette:e})=>{let t=new oe.Scene,o=new oe.OrthographicCamera(-1,1,1,-1,0,1),r={uTime:{value:0},uBackground:{value:new oe.Color(e.background)},uPrimary:{value:new oe.Color(e.primary)},uSecondary:{value:new oe.Color(e.secondary)},uAccent:{value:new oe.Color(e.accent)}},n=new oe.ShaderMaterial({uniforms:r,vertexShader:qm,fragmentShader:Ym,depthTest:false,depthWrite:false}),a=new oe.PlaneGeometry(2,2),l=new oe.Mesh(a,n);return t.add(l),{scene:t,camera:o,update:s=>{r.uTime.value=s;},setPalette:s=>{r.uBackground.value.set(s.background),r.uPrimary.value.set(s.primary),r.uSecondary.value.set(s.secondary),r.uAccent.value.set(s.accent);},dispose:()=>{a.dispose(),n.dispose();}}};var Yo={space:ql,plasma:Yl,voronoi:Zl,synthwave:Xl},Zo=[{id:"space",label:"Hyperspace",description:"Classic 'jump to hyperspace' \u2014 streaking stars flying past camera. Pairs well with VHS or Cinematic post-FX.",tags:["space","retro","motion","hero","background"],scene:"space",defaultPostPreset:"vhs"},{id:"plasma",label:"Plasma",description:"Soft rolling colour clouds \u2014 overlapping sines warping a palette ramp. Classic demoscene vibe. Pairs well with Synthwave or Cinematic.",tags:["abstract","soft","ambient","hero","background","gradient"],scene:"plasma",defaultPostPreset:"synthwave"},{id:"voronoi",label:"Voronoi",description:"Jittered cellular grid \u2014 orbiting seed points form animated cells with glowing edges. Great for data / organic / network moods. Pairs well with CRT or VHS.",tags:["abstract","cells","organic","network","hero","background"],scene:"voronoi",defaultPostPreset:"crt"},{id:"synthwave",label:"Synthwave Grid",description:"Retro-future perspective grid receding to a banded sun disc on the horizon. Pairs beautifully with the Synthwave post preset (its namesake).",tags:["retro","synthwave","80s","hero","background","grid","sun"],scene:"synthwave",defaultPostPreset:"synthwave"}],Xo=Object.fromEntries(Zo.map(e=>[e.id,e]));var Jo={none:{id:"none",label:"Clean",effects:{}},vhs:{id:"vhs",label:"VHS",effects:{bloom:{intensity:.35,luminanceThreshold:.5,radius:.7},noise:{intensity:.04},scanlines:{density:1.5,opacity:.12},vignette:{darkness:.4,offset:.45},chromatic:{offset:.0015}}},cinematic:{id:"cinematic",label:"Cinematic",effects:{bloom:{intensity:.5,luminanceThreshold:.55,radius:.8},vignette:{darkness:.5,offset:.5}}},synthwave:{id:"synthwave",label:"Synthwave",effects:{bloom:{intensity:.8,luminanceThreshold:.3,radius:.9},chromatic:{offset:.002},vignette:{darkness:.3,offset:.55}}},crt:{id:"crt",label:"CRT",effects:{bloom:{intensity:.2,luminanceThreshold:.7,radius:.4},scanlines:{density:2,opacity:.25},vignette:{darkness:.6,offset:.4},chromatic:{offset:.0025}}}},zr="vhs";var Jl=`
476
485
  precision highp float;
477
486
  varying vec2 vUv;
478
487
  uniform float uTime;
@@ -482,13 +491,13 @@ applyThemeToRoot(theme, "light"); // or "dark" / "superLight" / "superDark"
482
491
  uniform vec3 uSecondary;
483
492
  uniform vec3 uAccent;
484
493
  uniform vec3 uBackground;
485
- `,pm=`
494
+ `,Zm=`
486
495
  varying vec2 vUv;
487
496
  void main() {
488
497
  vUv = uv;
489
498
  gl_Position = vec4(position.xy, 0.0, 1.0);
490
499
  }
491
- `,Jt=class extends Error{log;source;constructor(t,o){super(`Fragment shader failed to compile:
492
- ${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=o;}};function mm(e,t){let o=e.getContext(),r=o.createShader(o.FRAGMENT_SHADER);if(!r)throw new Error("Unable to allocate fragment shader");o.shaderSource(r,t),o.compileShader(r);let i=o.getShaderParameter(r,o.COMPILE_STATUS),a=o.getShaderInfoLog(r)||"";if(o.deleteShader(r),!i)throw new Jt(a,t)}function wa(e){return ({renderer:t,width:o,height:r,palette:i})=>{let a=`${Rl}
493
- ${e}`;mm(t,a);let d=new Z.Scene,m=new Z.OrthographicCamera(-1,1,1,-1,0,1),s={uTime:{value:0},uResolution:{value:new Z.Vector2(o,r)},uMouse:{value:new Z.Vector2(.5,.5)},uPrimary:{value:new Z.Color(i.primary)},uSecondary:{value:new Z.Color(i.secondary)},uAccent:{value:new Z.Color(i.accent)},uBackground:{value:new Z.Color(i.background)}},c=new Z.ShaderMaterial({uniforms:s,vertexShader:pm,fragmentShader:a,depthTest:false,depthWrite:false}),l=new Z.PlaneGeometry(2,2),p=new Z.Mesh(l,c);return d.add(p),{scene:d,camera:m,update:u=>{s.uTime.value=u;},resize:(u,b)=>{s.uResolution.value.set(u,b);},setPalette:u=>{s.uPrimary.value.set(u.primary),s.uSecondary.value.set(u.secondary),s.uAccent.value.set(u.accent),s.uBackground.value.set(u.background);},setMouse:(u,b)=>{s.uMouse.value.set(u,b);},dispose:()=>{l.dispose(),c.dispose();}}}}var Lo={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"},fm=/^[\d.]+\s+[\d.]+\s+[\d.]+(?:\s*\/\s*[\d.%]+)?$/,hm=/^[\d.]+\s+[\d.]+%\s+[\d.]+%(?:\s*\/\s*[\d.%]+)?$/,bm=/^\s*var\(\s*(--[^,)\s]+)(?:\s*,[^)]*)?\s*\)\s*$/;function fr(e,t,o){if(typeof document>"u")return o;let r=e,i=bm.exec(e);if(i){let m=getComputedStyle(t).getPropertyValue(i[1]).trim();m&&(fm.test(m)?r=`oklch(${m})`:hm.test(m)&&(r=`hsl(${m})`));}let a=document.createElement("span");if(a.style.color="",a.style.color=r,a.style.color==="")return o;a.style.display="none",t.appendChild(a);let d=getComputedStyle(a).color;if(t.removeChild(a),!d)return o;if(d.startsWith("rgb"))return d;try{let m=document.createElement("canvas");m.width=1,m.height=1;let s=m.getContext("2d");if(!s)return d;s.clearRect(0,0,1,1),s.fillStyle=d,s.fillRect(0,0,1,1);let[c,l,p]=s.getImageData(0,0,1,1).data;return `rgb(${c}, ${l}, ${p})`}catch{return d}}function Sl(e,t){return {primary:fr(e.primary,t,Lo.primary),secondary:fr(e.secondary,t,Lo.secondary),accent:fr(e.accent,t,Lo.accent),background:fr(e.background,t,Lo.background)}}var hr=w.forwardRef(({preset:e,fragmentShader:t,onShaderError:o,postPreset:r,palette:i,createScene:a,controls:d=false,autoPlay:m=true,pauseOffscreen:s=true,aspect:c="video",radius:l="lg",border:p=false,poster:g,label:u,className:b,style:f,maxDpr:h},P)=>{let S=w.useRef(null),[R,C]=w.useState(m),[k,B]=w.useState(false),H=Ft(),I=w.useMemo(()=>({...Lo,...i}),[i]),V=w.useMemo(()=>a||(t?wa(t):e&&Po[e]?Po[e]:null),[a,t,e]),Pe=w.useMemo(()=>{if(r)return r;if(e){let G=No[e];if(G?.defaultPostPreset)return G.defaultPostPreset}return gr},[r,e]);w.useEffect(()=>{let G=S.current;if(!G||!V)return;let ge=G.clientWidth||1,Ae=G.clientHeight||1,we=Sl(I,G),v=new Z.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),O=h??Math.min(window.devicePixelRatio||1,2);v.setPixelRatio(O),v.setSize(ge,Ae),v.setClearColor(new Z.Color(we.background),1),v.domElement.dataset.gdsPart="shader-canvas",v.domElement.style.width="100%",v.domElement.style.height="100%",v.domElement.style.display="block",G.appendChild(v.domElement);let D;try{D=V({renderer:v,width:ge,height:Ae,palette:we});}catch(Y){if(Y instanceof Jt)o?.(Y),D=Po.space({renderer:v,width:ge,height:Ae,palette:we});else throw v.dispose(),v.domElement.parentElement===G&&G.removeChild(v.domElement),Y}let te=Eo[Pe]??Eo[gr],Me=bl({renderer:v,scene:D.scene,camera:D.camera,preset:te,width:ge,height:Ae}),fe=new Z.Clock,ne=0,he=m&&!H,lt=true,zt=()=>{if(ne=requestAnimationFrame(zt),!he||s&&!lt)return;let Y=fe.getDelta(),Ne=fe.getElapsedTime();D.update?.(Ne,Y),Me.composer.render(Y);};zt(),he&&B(true);let Ho=new ResizeObserver(([Y])=>{let Ne=Math.max(1,Math.floor(Y.contentRect.width)),Qt=Math.max(1,Math.floor(Y.contentRect.height));v.setSize(Ne,Qt),Me.resize(Ne,Qt),D.resize?.(Ne,Qt);});Ho.observe(G);let xa=new IntersectionObserver(([Y])=>{lt=Y.isIntersecting;},{threshold:.05});xa.observe(G);let Ra=new MutationObserver(()=>{if(!S.current)return;let Y=Sl(I,S.current);v.setClearColor(new Z.Color(Y.background),1),D.setPalette?.(Y);});Ra.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let Sa=D,Do=Sa.setMouse?Y=>{let Ne=G.getBoundingClientRect(),Qt=(Y.clientX-Ne.left)/Ne.width,kl=1-(Y.clientY-Ne.top)/Ne.height;Sa.setMouse(Qt,kl);}:null;return Do&&G.addEventListener("pointermove",Do),ee.current={toggle:()=>{he=!he,C(he);},setPalette:Y=>{v.setClearColor(new Z.Color(Y.background),1),D.setPalette?.(Y);},setPostPreset:Y=>{let Ne=Eo[Y];Ne&&Me.setPreset(Ne);}},()=>{cancelAnimationFrame(ne),Ho.disconnect(),xa.disconnect(),Ra.disconnect(),Do&&G.removeEventListener("pointermove",Do),Me.dispose(),D.dispose?.(),v.dispose(),v.domElement.parentElement===G&&G.removeChild(v.domElement),ee.current=null;}},[V,Pe,I,m,H,s,h,o]);let ee=w.useRef(null),ye=()=>ee.current?.toggle();return w.createElement(ot,{ref:G=>{S.current=G,typeof P=="function"?P(G):P&&(P.current=G);},aspect:c,radius:l,border:p,"aria-label":u,className:b,style:f,"data-gds-part":"three-scene"},!k&&g&&w.createElement("img",{src:g,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),d&&w.createElement("div",{"data-gds-part":"scene-controls",className:n("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/30 to-transparent")},w.createElement(xe,{size:"icon",variant:"secondary",onClick:ye},R?w.createElement(Pause,{className:"h-4 w-4"}):w.createElement(Play,{className:"h-4 w-4"}))))});hr.displayName="ThreeScene";var br=w.forwardRef(({preset:e,live:t="hover",postPreset:o,palette:r,className:i,aspect:a="video",radius:d="lg",label:m,hideLabel:s=false,onClick:c},l)=>{let p=No[e],[g,u]=w.useState(false),b=t==="always"||t==="hover"&&g;return w.createElement("div",{ref:l,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>u(true),onMouseLeave:()=>u(false),onClick:c,className:n("group cursor-pointer flex flex-col gap-2",i)},b?w.createElement(hr,{preset:e,postPreset:o,palette:r,aspect:a,radius:d,autoPlay:true,controls:false,pauseOffscreen:true,poster:p?.poster,maxDpr:1}):w.createElement(ot,{aspect:a,radius:d,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},p?.poster?w.createElement("img",{src:p.poster,alt:p.label,className:"w-full h-full object-cover"}):w.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},p?.label??e)),!s&&w.createElement("div",{className:"flex items-baseline justify-between text-xs"},w.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},m??p?.label??e),p?.tags?.[0]&&w.createElement("span",{className:"text-muted-foreground"},p.tags[0])))});br.displayName="ShaderPresetPreview";function ym({value:e,onChange:t,filterTags:o,live:r="hover",postPreset:i,palette:a,columns:d=3,className:m}){let s=w.useMemo(()=>o?.length?Mo.filter(l=>o.some(p=>l.tags.includes(p))):Mo,[o]);return w.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:n("grid grid-cols-2 gap-3",d===2?"md:grid-cols-2":d===4?"md:grid-cols-4":"md:grid-cols-3",m)},s.map(l=>{let p=e===l.id;return w.createElement("div",{key:l.id,className:"relative",role:"radio","aria-checked":p},w.createElement(br,{preset:l.id,postPreset:i,palette:a,live:r,onClick:()=>t?.(l.id),className:n("transition-all",p&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),p&&w.createElement("div",{"data-gds-part":"picker-selected-badge",className:"absolute top-2 right-2 rounded-full bg-primary text-primary-foreground p-1 shadow-sm"},w.createElement(Check,{className:"h-3.5 w-3.5"})))}))}function Sm({children:e}){let t=useRef(null);return useEffect(()=>{let o=new Rm({duration:1.2,easing:i=>Math.min(1,1.001-Math.pow(2,-10*i)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=o;function r(i){o.raf(i),requestAnimationFrame(r);}return requestAnimationFrame(r),()=>{o.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}function Mm({className:e}){let t=It();if(!t)return null;let{theme:o,themes:r,setThemeId:i,deleteTheme:a}=t;return w.createElement(Je,null,w.createElement(Qe,{asChild:true},w.createElement(xe,{variant:"ghost",size:"sm",className:n("gap-2",e),"aria-label":"Switch theme"},w.createElement(Palette,{className:"h-4 w-4"}),w.createElement("span",{className:"hidden sm:inline"},o.name))),w.createElement(je,{className:"w-80 p-2",align:"end"},w.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},w.createElement("div",null,w.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),w.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),w.createElement("button",{type:"button",onClick:()=>la(o),className:"flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",title:"Download the active theme as a markdown spec \u2014 paste into a fresh LLM prompt"},w.createElement(Download,{className:"h-3 w-3"}),".md")),w.createElement("div",{className:"flex flex-col gap-0.5"},r.map(d=>{let m=d.id===o.id,s=d.id in tt,c=d.ramps.primary[500],l=d.ramps.accent[500],p=d.ramps.neutral[500];return w.createElement("div",{key:d.id,className:n("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",m&&"bg-muted")},w.createElement("button",{type:"button",onClick:()=>i(d.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},w.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},w.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${c})`},"aria-hidden":true}),w.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${l})`},"aria-hidden":true}),w.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${p})`},"aria-hidden":true})),w.createElement("div",{className:"min-w-0 flex-1"},w.createElement("div",{className:"flex items-center gap-2"},w.createElement("span",{className:"text-sm font-medium truncate text-foreground"},d.name),d.tagline&&w.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},d.tagline)),d.description&&w.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},d.description))),m&&w.createElement(Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!s&&!m&&w.createElement("button",{type:"button",onClick:g=>{g.stopPropagation(),a(d.id);},className:"mt-1 opacity-0 group-hover:opacity-100 transition-opacity rounded p-1 hover:bg-destructive/10 hover:text-destructive","aria-label":`Delete theme ${d.name}`},w.createElement(Trash2,{className:"h-3.5 w-3.5"})))}))))}var Cl=[{mode:"superLight",label:"Super light",icon:SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function Dm({className:e,variant:t="icons"}){let o=It();if(!o)return null;let{mode:r,setMode:i}=o;return t==="labeled"?w.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:n("inline-flex flex-wrap gap-1 rounded-md border border-border bg-background p-1",e)},Cl.map(({mode:a,label:d,icon:m})=>{let s=r===a;return w.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,onClick:()=>i(a),className:n("flex items-center gap-2 rounded px-3 py-1.5 text-sm transition-colors",s?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground")},w.createElement(m,{className:"h-4 w-4"}),w.createElement("span",null,d))})):w.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:n("inline-flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5",e)},Cl.map(({mode:a,icon:d,tooltip:m})=>{let s=r===a;return w.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,"aria-label":m,title:m,onClick:()=>i(a),className:n("flex h-7 w-7 items-center justify-center rounded transition-colors",s?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},w.createElement(d,{className:"h-3.5 w-3.5"}))}))}function Fm(){let{isDark:e,setMode:t}=ga();return React.createElement(xe,{variant:"ghost",size:"sm",onClick:()=>t(e?"light":"dark"),className:"gap-2","aria-label":e?"Switch to light mode":"Switch to dark mode"},e?React.createElement(React.Fragment,null,React.createElement(Sun,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Light")):React.createElement(React.Fragment,null,React.createElement(Moon,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Dark")))}export{Xs as ALL_MODES,od as Accordion,En as AccordionContent,Mn as AccordionItem,Nn as AccordionTrigger,Vn as AppShell,$n as AppShellAside,jn as AppShellFooter,_n as AppShellHeader,Un as AppShellMain,Wn as AppShellNav,Kn as Avatar,Yn as AvatarFallback,qn as AvatarImage,ir as BUILT_IN_INPUTS,Vo as Badge,hs as Breadcrumb,Rs as BreadcrumbEllipsis,vs as BreadcrumbItem,ys as BreadcrumbLink,bs as BreadcrumbList,Ss as BreadcrumbMenuTrigger,ws as BreadcrumbPage,xs as BreadcrumbSeparator,xe as Button,kr as COMPONENT_CONTRACTS,Wo as Calendar,Qn as CalendarDayButton,Hn as Callout,An as CalloutDescription,Dn as CalloutTitle,ei as Card,ai as CardContent,ri as CardDescription,ni as CardFooter,ti as CardHeader,oi as CardTitle,hd as Carousel,Nr as CarouselArrows,Mr as CarouselDots,co as CarouselNext,lo as CarouselPrev,$o as CarouselSlide,Pr as CarouselVideoSlide,ii as Checkbox,Rd as DatePicker,Sd as DateRangePicker,kd as Dialog,Pd as DialogClose,di as DialogContent,ui as DialogDescription,pi as DialogFooter,ci as DialogHeader,Er as DialogOverlay,li as DialogPortal,mi as DialogTitle,Td as DialogTrigger,Ld as DropdownMenu,vi as DropdownMenuCheckboxItem,hi as DropdownMenuContent,Dd as DropdownMenuGroup,bi as DropdownMenuItem,wi as DropdownMenuLabel,Ad as DropdownMenuPortal,Fd as DropdownMenuRadioGroup,yi as DropdownMenuRadioItem,xi as DropdownMenuSeparator,Ri as DropdownMenuShortcut,Id as DropdownMenuSub,fi as DropdownMenuSubContent,gi as DropdownMenuSubTrigger,Hd as DropdownMenuTrigger,Rl as FRAGMENT_HEADER,Ai as Flex,pp as GRADE_PRE_HYDRATION_SCRIPT,Dm as GradeModeSwitcher,mp as GradeThemeProvider,Mm as GradeThemeSwitcher,Hi as Grid,Si as Input,Ci as Label,Sm as LenisProvider,ha as Map,ba as MapMarker,ot as MediaSurface,xr as MediaSurfaceContract,Ti as MultiSelect,Je as Popover,yd as PopoverAnchor,je as PopoverContent,Qe as PopoverTrigger,ki as Progress,Pi as RadioGroup,Mi as RadioGroupItem,Jd as ResizableHandle,Xd as ResizablePanel,Zd as ResizablePanelGroup,fl as RivePlayer,Ei as Row,Ii as ScrollArea,Br as ScrollBar,lc as Select,Bi as SelectContent,dc as SelectGroup,Oi as SelectItem,Gi as SelectLabel,Or as SelectScrollDownButton,Gr as SelectScrollUpButton,Vi as SelectSeparator,zi as SelectTrigger,cc as SelectValue,ho as Separator,Jt as ShaderCompileError,ym as ShaderPresetPicker,br as ShaderPresetPreview,gc as Sheet,hc as SheetClose,Wi as SheetContent,Ki as SheetDescription,Ui as SheetFooter,$i as SheetHeader,Vr as SheetOverlay,_i as SheetPortal,ji as SheetTitle,fc as SheetTrigger,vt as Sidebar,Jr as SidebarContent,Qr as SidebarFooter,Xr as SidebarHeader,ta as SidebarItem,ea as SidebarSection,oa as SidebarTreeItem,vc as Skeleton,qi as Slider,Ec as Sortable,Wr as SortableGroup,Ur as SortableHandle,$r as SortableItem,ns as Stack,is as Switch,ss as Table,ds as TableBody,gs as TableCaption,us as TableCell,cs as TableFooter,ms as TableHead,ls as TableHeader,ps as TableRow,Fc as Tabs,Ms as TabsContent,Ts as TabsList,Ps as TabsTrigger,Ns as Textarea,Fm as ThemeToggle,hr as ThreeScene,Ls as Toggle,As as ToggleGroup,Is as ToggleGroupItem,Fs as Toolbar,zs as ToolbarSlot,Lt as Tooltip,bt as TooltipContent,Kr as TooltipProvider,Ht as TooltipTrigger,gl as VideoPlayer,Bn as appShellAsideVariants,On as appShellFooterVariants,Fn as appShellHeaderVariants,Gn as appShellMainVariants,zn as appShellNavVariants,sr as applyThemeToRoot,Xn as badgeVariants,wa as buildFragmentShaderScene,tt as builtInThemes,so as buttonVariants,Ln as calloutVariants,ko as calmInput,n as cn,gr as defaultPostPreset,Zt as defaultThemeId,pa as deleteUserTheme,cp as duplicateTheme,aa as energyInput,Di as flexVariants,Dt as generateTheme,Xl as getComponentContract,At as getTheme,Li as gridVariants,Jl as listContractedComponents,da as listThemes,Ys as listUserThemes,ca as loadUserThemeInput,Eo as postPresets,Ni as rowVariants,dr as saveUserTheme,Po as sceneRegistry,No as shaderPresetById,Mo as shaderPresets,In as shellVariants,as as stackVariants,ia as themeToCSSVars,Es as toggleVariants,bd as useCarouselApi,ga as useGradeTheme,It as useMaybeGradeTheme,Ft as usePrefersReducedMotion};//# sourceMappingURL=index.mjs.map
500
+ `,yo=class extends Error{log;source;constructor(t,o){super(`Fragment shader failed to compile:
501
+ ${t.trim()}`),this.name="ShaderCompileError",this.log=t,this.source=o;}};function Xm(e,t){let o=e.getContext(),r=o.createShader(o.FRAGMENT_SHADER);if(!r)throw new Error("Unable to allocate fragment shader");o.shaderSource(r,t),o.compileShader(r);let n=o.getShaderParameter(r,o.COMPILE_STATUS),a=o.getShaderInfoLog(r)||"";if(o.deleteShader(r),!n)throw new yo(a,t)}function Ua(e){return ({renderer:t,width:o,height:r,palette:n})=>{let a=`${Jl}
502
+ ${e}`;Xm(t,a);let l=new oe.Scene,m=new oe.OrthographicCamera(-1,1,1,-1,0,1),s={uTime:{value:0},uResolution:{value:new oe.Vector2(o,r)},uMouse:{value:new oe.Vector2(.5,.5)},uPrimary:{value:new oe.Color(n.primary)},uSecondary:{value:new oe.Color(n.secondary)},uAccent:{value:new oe.Color(n.accent)},uBackground:{value:new oe.Color(n.background)}},c=new oe.ShaderMaterial({uniforms:s,vertexShader:Zm,fragmentShader:a,depthTest:false,depthWrite:false}),d=new oe.PlaneGeometry(2,2),p=new oe.Mesh(d,c);return l.add(p),{scene:l,camera:m,update:u=>{s.uTime.value=u;},resize:(u,b)=>{s.uResolution.value.set(u,b);},setPalette:u=>{s.uPrimary.value.set(u.primary),s.uSecondary.value.set(u.secondary),s.uAccent.value.set(u.accent),s.uBackground.value.set(u.background);},setMouse:(u,b)=>{s.uMouse.value.set(u,b);},dispose:()=>{d.dispose(),c.dispose();}}}}var Qo={primary:"#ff5fb9",secondary:"#9fe8ff",accent:"#ffc857",background:"#0a0a14"},eu=/^[\d.]+\s+[\d.]+\s+[\d.]+(?:\s*\/\s*[\d.%]+)?$/,tu=/^[\d.]+\s+[\d.]+%\s+[\d.]+%(?:\s*\/\s*[\d.%]+)?$/,ou=/^\s*var\(\s*(--[^,)\s]+)(?:\s*,[^)]*)?\s*\)\s*$/;function Br(e,t,o){if(typeof document>"u")return o;let r=e,n=ou.exec(e);if(n){let m=getComputedStyle(t).getPropertyValue(n[1]).trim();m&&(eu.test(m)?r=`oklch(${m})`:tu.test(m)&&(r=`hsl(${m})`));}let a=document.createElement("span");if(a.style.color="",a.style.color=r,a.style.color==="")return o;a.style.display="none",t.appendChild(a);let l=getComputedStyle(a).color;if(t.removeChild(a),!l)return o;if(l.startsWith("rgb"))return l;try{let m=document.createElement("canvas");m.width=1,m.height=1;let s=m.getContext("2d");if(!s)return l;s.clearRect(0,0,1,1),s.fillStyle=l,s.fillRect(0,0,1,1);let[c,d,p]=s.getImageData(0,0,1,1).data;return `rgb(${c}, ${d}, ${p})`}catch{return l}}function Ql(e,t){return {primary:Br(e.primary,t,Qo.primary),secondary:Br(e.secondary,t,Qo.secondary),accent:Br(e.accent,t,Qo.accent),background:Br(e.background,t,Qo.background)}}var Vr=w.forwardRef(({preset:e,fragmentShader:t,onShaderError:o,postPreset:r,palette:n,createScene:a,controls:l=false,autoPlay:m=true,pauseOffscreen:s=true,aspect:c="video",radius:d="lg",border:p=false,poster:g,label:u,className:b,style:f,maxDpr:h},C)=>{let S=w.useRef(null),[x,k]=w.useState(m),[P,V]=w.useState(false),N=to(),F=w.useMemo(()=>({...Qo,...n}),[n]),G=w.useMemo(()=>a||(t?Ua(t):e&&Yo[e]?Yo[e]:null),[a,t,e]),he=w.useMemo(()=>{if(r)return r;if(e){let O=Xo[e];if(O?.defaultPostPreset)return O.defaultPostPreset}return zr},[r,e]);w.useEffect(()=>{let O=S.current;if(!O||!G)return;let te=O.clientWidth||1,He=O.clientHeight||1,se=Ql(F,O),v=new oe.WebGLRenderer({antialias:true,alpha:false,powerPreference:"high-performance"}),z=h??Math.min(window.devicePixelRatio||1,2);v.setPixelRatio(z),v.setSize(te,He),v.setClearColor(new oe.Color(se.background),1),v.domElement.dataset.gdsPart="shader-canvas",v.domElement.style.width="100%",v.domElement.style.height="100%",v.domElement.style.display="block",O.appendChild(v.domElement);let H;try{H=G({renderer:v,width:te,height:He,palette:se});}catch(q){if(q instanceof yo)o?.(q),H=Yo.space({renderer:v,width:te,height:He,palette:se});else throw v.dispose(),v.domElement.parentElement===O&&O.removeChild(v.domElement),q}let X=Jo[he]??Jo[zr],Pe=Kl({renderer:v,scene:H.scene,camera:H.camera,preset:X,width:te,height:He}),le=new oe.Clock,de=0,J=m&&!N,nt=true,it=()=>{if(de=requestAnimationFrame(it),!J||s&&!nt)return;let q=le.getDelta(),Q=le.getElapsedTime();H.update?.(Q,q),Pe.composer.render(q);};it(),J&&V(true);let Ge=new ResizeObserver(([q])=>{let Q=Math.max(1,Math.floor(q.contentRect.width)),Me=Math.max(1,Math.floor(q.contentRect.height));v.setSize(Q,Me),Pe.resize(Q,Me),H.resize?.(Q,Me);});Ge.observe(O);let Ot=new IntersectionObserver(([q])=>{nt=q.isIntersecting;},{threshold:.05});Ot.observe(O);let er=new MutationObserver(()=>{if(!S.current)return;let q=Ql(F,S.current);v.setClearColor(new oe.Color(q.background),1),H.setPalette?.(q);});er.observe(document.documentElement,{attributes:true,attributeFilter:["class","style","data-theme","data-gds-theme","data-grade-mode"]});let tr=H,Gt=tr.setMouse?q=>{let Q=O.getBoundingClientRect(),Me=(q.clientX-Q.left)/Q.width,Ze=1-(q.clientY-Q.top)/Q.height;tr.setMouse(Me,Ze);}:null;return Gt&&O.addEventListener("pointermove",Gt),re.current={toggle:()=>{J=!J,k(J);},setPalette:q=>{v.setClearColor(new oe.Color(q.background),1),H.setPalette?.(q);},setPostPreset:q=>{let Q=Jo[q];Q&&Pe.setPreset(Q);}},()=>{cancelAnimationFrame(de),Ge.disconnect(),Ot.disconnect(),er.disconnect(),Gt&&O.removeEventListener("pointermove",Gt),Pe.dispose(),H.dispose?.(),v.dispose(),v.domElement.parentElement===O&&O.removeChild(v.domElement),re.current=null;}},[G,he,F,m,N,s,h,o]);let re=w.useRef(null),K=()=>re.current?.toggle();return w.createElement(ft,{ref:O=>{S.current=O,typeof C=="function"?C(O):C&&(C.current=O);},aspect:c,radius:d,border:p,"aria-label":u,className:b,style:f,"data-gds-part":"three-scene"},!P&&g&&w.createElement("img",{src:g,alt:"",className:"absolute inset-0 w-full h-full object-cover","data-gds-part":"scene-poster"}),l&&w.createElement("div",{"data-gds-part":"scene-controls",className:i("absolute inset-0 flex items-end justify-end p-2","opacity-0 hover:opacity-100 transition-opacity","bg-gradient-to-t from-black/30 to-transparent")},w.createElement(Ne,{size:"icon",variant:"secondary",onClick:K},x?w.createElement(Pause,{className:"h-4 w-4"}):w.createElement(Play,{className:"h-4 w-4"}))))});Vr.displayName="ThreeScene";var Or=w.forwardRef(({preset:e,live:t="hover",postPreset:o,palette:r,className:n,aspect:a="video",radius:l="lg",label:m,hideLabel:s=false,onClick:c},d)=>{let p=Xo[e],[g,u]=w.useState(false),b=t==="always"||t==="hover"&&g;return w.createElement("div",{ref:d,"data-gds-part":"picker-card","data-gds-preset":e,onMouseEnter:()=>u(true),onMouseLeave:()=>u(false),onClick:c,className:i("group cursor-pointer flex flex-col gap-2",n)},b?w.createElement(Vr,{preset:e,postPreset:o,palette:r,aspect:a,radius:l,autoPlay:true,controls:false,pauseOffscreen:true,poster:p?.poster,maxDpr:1}):w.createElement(ft,{aspect:a,radius:l,"data-gds-part":"preset-poster",className:"bg-gradient-to-br from-muted to-muted/50"},p?.poster?w.createElement("img",{src:p.poster,alt:p.label,className:"w-full h-full object-cover"}):w.createElement("div",{className:"absolute inset-0 flex items-center justify-center text-xs text-muted-foreground"},p?.label??e)),!s&&w.createElement("div",{className:"flex items-baseline justify-between text-xs"},w.createElement("span",{className:"font-medium text-foreground","data-gds-part":"preset-label"},m??p?.label??e),p?.tags?.[0]&&w.createElement("span",{className:"text-muted-foreground"},p.tags[0])))});Or.displayName="ShaderPresetPreview";function au({value:e,onChange:t,filterTags:o,live:r="hover",postPreset:n,palette:a,columns:l=3,className:m}){let s=w.useMemo(()=>o?.length?Zo.filter(d=>o.some(p=>d.tags.includes(p))):Zo,[o]);return w.createElement("div",{"data-gds-part":"preset-grid",role:"radiogroup",className:i("grid grid-cols-2 gap-3",l===2?"md:grid-cols-2":l===4?"md:grid-cols-4":"md:grid-cols-3",m)},s.map(d=>{let p=e===d.id;return w.createElement("div",{key:d.id,className:"relative",role:"radio","aria-checked":p},w.createElement(Or,{preset:d.id,postPreset:n,palette:a,live:r,onClick:()=>t?.(d.id),className:i("transition-all",p&&"ring-2 ring-primary ring-offset-2 ring-offset-background rounded-lg")}),p&&w.createElement("div",{"data-gds-part":"picker-selected-badge",className:"absolute top-2 right-2 rounded-full bg-primary text-primary-foreground p-1 shadow-sm"},w.createElement(Check,{className:"h-3.5 w-3.5"})))}))}function lu({children:e}){let t=useRef(null);return useEffect(()=>{let o=new su({duration:1.2,easing:n=>Math.min(1,1.001-Math.pow(2,-10*n)),orientation:"vertical",gestureOrientation:"vertical",smoothWheel:true});t.current=o;function r(n){o.raf(n),requestAnimationFrame(r);}return requestAnimationFrame(r),()=>{o.destroy(),t.current=null;}},[]),React.createElement(React.Fragment,null,e)}function uu({className:e}){let t=eo();if(!t)return null;let{theme:o,themes:r,setThemeId:n,deleteTheme:a}=t;return w.createElement(pt,null,w.createElement(mt,{asChild:true},w.createElement(Ne,{variant:"ghost",size:"sm",className:i("gap-2",e),"aria-label":"Switch theme"},w.createElement(Palette,{className:"h-4 w-4"}),w.createElement("span",{className:"hidden sm:inline"},o.name))),w.createElement(ot,{className:"w-80 p-2",align:"end"},w.createElement("div",{className:"flex items-start justify-between gap-2 px-2 py-1.5 mb-1"},w.createElement("div",null,w.createElement("div",{className:"text-xs font-medium text-muted-foreground"},"Theme"),w.createElement("div",{className:"text-xs text-muted-foreground/80"},"Switch the skin applied site-wide.")),w.createElement("button",{type:"button",onClick:()=>Ha(o),className:"flex items-center gap-1 rounded-md border border-border px-2 py-1 text-[10px] font-medium text-muted-foreground hover:bg-muted hover:text-foreground transition-colors",title:"Download the active theme as a markdown spec \u2014 paste into a fresh LLM prompt"},w.createElement(Download,{className:"h-3 w-3"}),".md")),w.createElement("div",{className:"flex flex-col gap-0.5"},r.map(l=>{let m=l.id===o.id,s=l.id in gt,c=l.ramps.primary[500],d=l.ramps.accent[500],p=l.ramps.neutral[500];return w.createElement("div",{key:l.id,className:i("group flex items-start gap-3 rounded-md px-2 py-2 text-left transition-colors","hover:bg-muted",m&&"bg-muted")},w.createElement("button",{type:"button",onClick:()=>n(l.id),className:"flex items-start gap-3 flex-1 min-w-0 text-left"},w.createElement("div",{className:"mt-0.5 flex shrink-0 overflow-hidden rounded-md border border-border"},w.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${c})`},"aria-hidden":true}),w.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${d})`},"aria-hidden":true}),w.createElement("div",{className:"h-5 w-2.5",style:{background:`oklch(${p})`},"aria-hidden":true})),w.createElement("div",{className:"min-w-0 flex-1"},w.createElement("div",{className:"flex items-center gap-2"},w.createElement("span",{className:"text-sm font-medium truncate text-foreground"},l.name),l.tagline&&w.createElement("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground shrink-0"},l.tagline)),l.description&&w.createElement("div",{className:"text-xs text-muted-foreground line-clamp-2"},l.description))),m&&w.createElement(Check,{className:"mt-2 h-4 w-4 shrink-0 text-primary"}),!s&&!m&&w.createElement("button",{type:"button",onClick:g=>{g.stopPropagation(),a(l.id);},className:"mt-1 opacity-0 group-hover:opacity-100 transition-opacity rounded p-1 hover:bg-destructive/10 hover:text-destructive","aria-label":`Delete theme ${l.name}`},w.createElement(Trash2,{className:"h-3.5 w-3.5"})))}))))}var ed=[{mode:"superLight",label:"Super light",icon:SunDim,tooltip:"Super light \u2014 airy, low contrast"},{mode:"light",label:"Light",icon:Sun,tooltip:"Light"},{mode:"dark",label:"Dark",icon:Moon,tooltip:"Dark"},{mode:"superDark",label:"Super dark",icon:MoonStar,tooltip:"Super dark \u2014 OLED, high contrast"}];function vu({className:e,variant:t="icons"}){let o=eo();if(!o)return null;let{mode:r,setMode:n}=o;return t==="labeled"?w.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:i("inline-flex flex-wrap gap-1 rounded-md border border-border bg-background p-1",e)},ed.map(({mode:a,label:l,icon:m})=>{let s=r===a;return w.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,onClick:()=>n(a),className:i("flex items-center gap-2 rounded px-3 py-1.5 text-sm transition-colors",s?"bg-primary text-primary-foreground":"hover:bg-accent hover:text-accent-foreground")},w.createElement(m,{className:"h-4 w-4"}),w.createElement("span",null,l))})):w.createElement("div",{role:"radiogroup","aria-label":"Brightness mode",className:i("inline-flex items-center gap-0.5 rounded-md border border-border bg-background p-0.5",e)},ed.map(({mode:a,icon:l,tooltip:m})=>{let s=r===a;return w.createElement("button",{key:a,type:"button",role:"radio","aria-checked":s,"aria-label":m,title:m,onClick:()=>n(a),className:i("flex h-7 w-7 items-center justify-center rounded transition-colors",s?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground")},w.createElement(l,{className:"h-3.5 w-3.5"}))}))}function xu(){let{isDark:e,setMode:t}=Ba();return React.createElement(Ne,{variant:"ghost",size:"sm",onClick:()=>t(e?"light":"dark"),className:"gap-2","aria-label":e?"Switch to light mode":"Switch to dark mode"},e?React.createElement(React.Fragment,null,React.createElement(Sun,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Light")):React.createElement(React.Fragment,null,React.createElement(Moon,{className:"h-4 w-4"}),React.createElement("span",{className:"hidden sm:inline"},"Dark")))}export{Pl as ALL_MODES,Hd as Accordion,ti as AccordionContent,Qn as AccordionItem,ei as AccordionTrigger,mi as AppShell,fi as AppShellAside,bi as AppShellFooter,ui as AppShellHeader,hi as AppShellMain,gi as AppShellNav,vi as Avatar,wi as AvatarFallback,yi as AvatarImage,Nr as BUILT_IN_INPUTS,cr as Badge,Ci as Banner,js as Breadcrumb,Js as BreadcrumbEllipsis,qs as BreadcrumbItem,Ys as BreadcrumbLink,Ks as BreadcrumbList,Qs as BreadcrumbMenuTrigger,Zs as BreadcrumbPage,Xs as BreadcrumbSeparator,Ne as Button,Yr as COMPONENT_CONTRACTS,mr as Calendar,Ti as CalendarDayButton,ri as Callout,ni as CalloutDescription,ai as CalloutTitle,Pi as Card,Li as CardContent,Ei as CardDescription,Hi as CardFooter,Mi as CardHeader,Ni as CardTitle,Yd as Carousel,Qr as CarouselArrows,Jr as CarouselDots,Ho as CarouselNext,Lo as CarouselPrev,ur as CarouselSlide,Xr as CarouselVideoSlide,Di as Checkbox,Fi as Code,sc as DatePicker,lc as DateRangePicker,cc as Dialog,mc as DialogClose,Vi as DialogContent,Wi as DialogDescription,Gi as DialogFooter,Oi as DialogHeader,ea as DialogOverlay,Bi as DialogPortal,_i as DialogTitle,pc as DialogTrigger,hc as DropdownMenu,qi as DropdownMenuCheckboxItem,ji as DropdownMenuContent,vc as DropdownMenuGroup,Ki as DropdownMenuItem,Zi as DropdownMenuLabel,yc as DropdownMenuPortal,xc as DropdownMenuRadioGroup,Yi as DropdownMenuRadioItem,Xi as DropdownMenuSeparator,Ji as DropdownMenuShortcut,wc as DropdownMenuSub,$i as DropdownMenuSubContent,Ui as DropdownMenuSubTrigger,bc as DropdownMenuTrigger,Jl as FRAGMENT_HEADER,cs as Flex,Zp as GRADE_PRE_HYDRATION_SCRIPT,vu as GradeModeSwitcher,Xp as GradeThemeProvider,uu as GradeThemeSwitcher,ls as Grid,Qi as Input,es as Label,lu as LenisProvider,Oa as Map,Ga as MapMarker,ft as MediaSurface,jr as MediaSurfaceContract,os as MultiSelect,pt as Popover,ac as PopoverAnchor,ot as PopoverContent,mt as PopoverTrigger,ts as Progress,rs as RadioGroup,as as RadioGroupItem,zc as ResizableHandle,Fc as ResizablePanel,Ic as ResizablePanelGroup,$l as RivePlayer,is as Row,ps as ScrollArea,la as ScrollBar,Kc as Select,gs as SelectContent,qc as SelectGroup,hs as SelectItem,fs as SelectLabel,ca as SelectScrollDownButton,da as SelectScrollUpButton,bs as SelectSeparator,us as SelectTrigger,Yc as SelectValue,Bo as Separator,yo as ShaderCompileError,au as ShaderPresetPicker,Or as ShaderPresetPreview,Qc as Sheet,tp as SheetClose,ys as SheetContent,Ss as SheetDescription,xs as SheetFooter,ws as SheetHeader,pa as SheetOverlay,vs as SheetPortal,Rs as SheetTitle,ep as SheetTrigger,At as Sidebar,Ra as SidebarContent,Sa as SidebarFooter,xa as SidebarHeader,ka as SidebarItem,Ca as SidebarSection,Ta as SidebarTreeItem,rp as Skeleton,Cs as Slider,fp as Sortable,ua as SortableGroup,fa as SortableHandle,ga as SortableItem,Is as Stack,Fs as Switch,zs as Table,Vs as TableBody,Us as TableCaption,Ws as TableCell,Os as TableFooter,_s as TableHead,Bs as TableHeader,Gs as TableRow,xp as Tabs,al as TabsContent,ol as TabsList,rl as TabsTrigger,nl as Textarea,xu as ThemeToggle,Vr as ThreeScene,sl as Toggle,cl as ToggleGroup,pl as ToggleGroupItem,ml as Toolbar,ul as ToolbarSlot,Zt as Tooltip,Dt as TooltipContent,ba as TooltipProvider,Xt as TooltipTrigger,Ul as VideoPlayer,di as appShellAsideVariants,pi as appShellFooterVariants,si as appShellHeaderVariants,ci as appShellMainVariants,li as appShellNavVariants,Er as applyThemeToRoot,Ri as badgeVariants,Si as bannerVariants,Ua as buildFragmentShaderScene,gt as builtInThemes,Eo as buttonVariants,oi as calloutVariants,Ko as calmInput,i as cn,zr as defaultPostPreset,bo as defaultThemeId,Ia as deleteUserTheme,Yp as duplicateTheme,Ma as energyInput,ds as flexVariants,Jt as generateTheme,Pd as getComponentContract,Qt as getTheme,ss as gridVariants,Md as listContractedComponents,Da as listThemes,kl as listUserThemes,Aa as loadUserThemeInput,Jo as postPresets,ns as rowVariants,Hr as saveUserTheme,Yo as sceneRegistry,Xo as shaderPresetById,Zo as shaderPresets,ii as shellVariants,As as stackVariants,Ea as themeToCSSVars,il as toggleVariants,Zd as useCarouselApi,Ba as useGradeTheme,eo as useMaybeGradeTheme,to as usePrefersReducedMotion};//# sourceMappingURL=index.mjs.map
494
503
  //# sourceMappingURL=index.mjs.map