@tetrascience-npm/tetrascience-react-ui 0.4.0-beta.9.1 → 0.5.0-beta.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -4
- package/dist/athena.d.ts +167 -0
- package/dist/databricks.d.ts +129 -0
- package/dist/exceptions-DN25pCDi.cjs +2 -0
- package/dist/exceptions-DN25pCDi.cjs.map +1 -0
- package/dist/exceptions-jCQ6h5C8.js +33 -0
- package/dist/exceptions-jCQ6h5C8.js.map +1 -0
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2049 -2027
- package/dist/index.js +9438 -3
- package/dist/index.js.map +1 -0
- package/dist/providers/athena.cjs +2 -0
- package/dist/providers/athena.cjs.map +1 -0
- package/dist/providers/athena.d.ts +2 -79
- package/dist/providers/athena.js +160 -0
- package/dist/providers/athena.js.map +1 -0
- package/dist/providers/databricks.cjs +2 -0
- package/dist/providers/databricks.cjs.map +1 -0
- package/dist/providers/databricks.d.ts +2 -43
- package/dist/providers/databricks.js +85 -0
- package/dist/providers/databricks.js.map +1 -0
- package/dist/providers/snowflake.cjs +2 -0
- package/dist/providers/snowflake.cjs.map +1 -0
- package/dist/providers/snowflake.d.ts +2 -40
- package/dist/providers/snowflake.js +122 -0
- package/dist/providers/snowflake.js.map +1 -0
- package/dist/server.cjs +2 -0
- package/dist/server.cjs.map +1 -0
- package/dist/server.d.ts +533 -525
- package/dist/server.js +266 -0
- package/dist/server.js.map +1 -0
- package/dist/{providers/types-Ck4uFaGp.d.ts → snowflake.d.ts} +125 -82
- package/package.json +54 -55
- package/dist/cjs/index.js +0 -2001
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/providers/athena.js +0 -2
- package/dist/cjs/providers/athena.js.map +0 -1
- package/dist/cjs/providers/databricks.js +0 -2
- package/dist/cjs/providers/databricks.js.map +0 -1
- package/dist/cjs/providers/exceptions-CYktpdqW.js +0 -2
- package/dist/cjs/providers/exceptions-CYktpdqW.js.map +0 -1
- package/dist/cjs/providers/snowflake.js +0 -2
- package/dist/cjs/providers/snowflake.js.map +0 -1
- package/dist/cjs/server.js +0 -2
- package/dist/cjs/server.js.map +0 -1
- package/dist/esm/index.js +0 -2001
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/providers/athena.js +0 -2
- package/dist/esm/providers/athena.js.map +0 -1
- package/dist/esm/providers/databricks.js +0 -2
- package/dist/esm/providers/databricks.js.map +0 -1
- package/dist/esm/providers/exceptions-C3uFWZB2.js +0 -2
- package/dist/esm/providers/exceptions-C3uFWZB2.js.map +0 -1
- package/dist/esm/providers/snowflake.js +0 -2
- package/dist/esm/providers/snowflake.js.map +0 -1
- package/dist/esm/server.js +0 -2
- package/dist/esm/server.js.map +0 -1
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),N=require("lucide-react"),p=require("radix-ui"),wo=require("clsx"),yo=require("tailwind-merge"),ne=require("class-variance-authority"),m=require("react"),Co=require("@monaco-editor/react"),be=require("sonner"),V=require("plotly.js-dist"),wt=require("react-day-picker"),No=require("embla-carousel-react"),q=require("@base-ui/react"),ve=require("cmdk"),fe=require("vaul"),xa=require("input-otp"),ko=require("react-resizable-panels");function ha(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(a,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return a.default=e,Object.freeze(a)}const H=ha(m),Mt=ha(ko);function s(...e){return yo.twMerge(wo.clsx(e))}function _t({className:e,size:a="default",...o}){return t.jsx(p.Avatar.Root,{"data-slot":"avatar","data-size":a,className:s("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",e),...o})}function St({className:e,...a}){return t.jsx(p.Avatar.Image,{"data-slot":"avatar-image",className:s("aspect-square size-full rounded-full object-cover",e),...a})}function zt({className:e,...a}){return t.jsx(p.Avatar.Fallback,{"data-slot":"avatar-fallback",className:s("flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",e),...a})}function Mo({className:e,...a}){return t.jsx("span",{"data-slot":"avatar-badge",className:s("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none","group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden","group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2","group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",e),...a})}function _o({className:e,...a}){return t.jsx("div",{"data-slot":"avatar-group",className:s("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",e),...a})}function So({className:e,...a}){return t.jsx("div",{"data-slot":"avatar-group-count",className:s("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",e),...a})}const tt=ne.cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function L({className:e,variant:a="default",size:o="default",asChild:r=!1,...n}){const i=r?p.Slot.Root:"button";return t.jsx(i,{"data-slot":"button","data-variant":a,"data-size":o,className:s(tt({variant:a,size:o,className:e})),...n})}function ce({className:e,orientation:a="horizontal",decorative:o=!0,...r}){return t.jsx(p.Separator.Root,{"data-slot":"separator",decorative:o,orientation:a,className:s("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...r})}const ba=({hostname:e,userProfile:a,onHomeClick:o,onSettingsClick:r,onUserProfileClick:n})=>{const i=d=>d.split(" ").map(f=>f.charAt(0)).join("").toUpperCase().substring(0,2);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center justify-between h-auto w-full px-7 py-4 box-border",children:[t.jsx("div",{className:"text-lg font-medium leading-7",children:e}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(L,{variant:"outline",size:"icon-sm",onClick:o,"aria-label":"Home",children:t.jsx(N.Home,{size:20})}),t.jsx(L,{variant:"outline",size:"icon-sm",onClick:r,"aria-label":"Settings",children:t.jsx(N.Settings,{size:20})}),t.jsx(ce,{orientation:"vertical"}),t.jsxs(_t,{onClick:n,children:[t.jsx(St,{src:a.avatar,alt:a.name}),t.jsx(zt,{children:i(a.name)})]}),t.jsx("div",{className:"text-base font-normal leading-6",children:a.name})," "]})]}),t.jsx(ce,{})]})};function zo({delayDuration:e=0,...a}){return t.jsx(p.Tooltip.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...a})}function at({...e}){return t.jsx(p.Tooltip.Root,{"data-slot":"tooltip",...e})}function ot({...e}){return t.jsx(p.Tooltip.Trigger,{"data-slot":"tooltip-trigger",...e})}function rt({className:e,sideOffset:a=0,children:o,...r}){return t.jsx(p.Tooltip.Portal,{children:t.jsxs(p.Tooltip.Content,{"data-slot":"tooltip-content",sideOffset:a,className:s("z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) rounded-md bg-foreground px-3 py-1.5 text-xs text-background data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r,children:[o,t.jsx(p.Tooltip.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function It(){const[e,a]=m.useState(()=>typeof document>"u"?!1:document.documentElement.classList.contains("dark"));return m.useEffect(()=>{if(typeof document>"u")return;const o=document.documentElement;a(o.classList.contains("dark"));const r=new MutationObserver(n=>{for(const i of n)i.attributeName==="class"&&a(o.classList.contains("dark"))});return r.observe(o,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),e}const Io={monacoTheme:"vs",editorBg:"#ffffff",editorFg:"rgba(26, 26, 26, 1)",lineNumberColor:"rgba(26, 26, 26, 0.4)",lineNumberActiveColor:"rgba(26, 26, 26, 0.8)",selectionBg:"rgba(47, 69, 181, 0.15)",gutterBg:"#f9fafb",borderColor:"rgba(229, 231, 235, 1)",isDark:!1},Ao={monacoTheme:"vs-dark",editorBg:"rgba(20, 30, 53, 1)",editorFg:"rgba(255, 255, 255, 0.9)",lineNumberColor:"rgba(255, 255, 255, 0.35)",lineNumberActiveColor:"rgba(255, 255, 255, 0.7)",selectionBg:"rgba(84, 157, 255, 0.2)",gutterBg:"rgba(29, 40, 57, 1)",borderColor:"rgba(51, 65, 86, 1)",isDark:!0};function To(){const e=It();return m.useMemo(()=>e?Ao:Io,[e])}const Do={light:"vs",dark:"vs-dark"},je=({value:e,onChange:a,language:o="python",theme:r,height:n=400,width:i="100%",options:d={},onCopy:f,onLaunch:u,disabled:l=!1})=>{const c=To(),j=m.useRef(null),[y,x]=m.useState("Copy"),[w,C]=m.useState("Launch"),S=1e3,_=m.useCallback(g=>{f&&!l&&(f(g),x("Copied"),setTimeout(()=>{x("Copy")},S))},[f,l]),b=m.useCallback(g=>{u&&!l&&(u(g),C("Launched"),setTimeout(()=>{C("Launch")},S))},[u,l]),v=async g=>{j.current=g},M={minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"on",padding:{top:12,bottom:12,left:20,right:20},scrollbar:{vertical:"hidden",verticalScrollbarSize:0},readOnly:l,...d};return t.jsxs("div",{className:s("rounded-2xl overflow-hidden relative border",l&&"opacity-60 cursor-not-allowed"),children:[t.jsxs("div",{className:"ml-auto flex gap-2 px-4 py-2 absolute top-0 right-0 z-[1]",children:[f&&t.jsxs(at,{children:[t.jsx(ot,{asChild:!0,children:t.jsx("div",{className:"w-8 h-8 flex items-center justify-center",children:t.jsx(L,{className:"w-full h-full",variant:"outline",size:"icon-sm",onClick:()=>_(e),disabled:l,children:t.jsx(N.Copy,{})})})}),t.jsx(rt,{side:"bottom",children:y})]}),u&&t.jsxs(at,{children:[t.jsx(ot,{asChild:!0,children:t.jsx("div",{className:"w-8 h-8 flex items-center justify-center",children:t.jsx(L,{className:"w-full h-full",variant:"outline",size:"icon-sm",onClick:()=>b(e),disabled:l,children:t.jsx(N.Rocket,{})})})}),t.jsx(rt,{side:"bottom",children:w})]})]}),t.jsx(Co,{value:e,onChange:a,language:o,theme:r?Do[r]:c.monacoTheme,height:n,width:i,options:M,beforeMount:v})]})};function Re({...e}){return t.jsx(p.Dialog.Root,{"data-slot":"dialog",...e})}function Eo({...e}){return t.jsx(p.Dialog.Trigger,{"data-slot":"dialog-trigger",...e})}function va({...e}){return t.jsx(p.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function ja({...e}){return t.jsx(p.Dialog.Close,{"data-slot":"dialog-close",...e})}function wa({className:e,...a}){return t.jsx(p.Dialog.Overlay,{"data-slot":"dialog-overlay",className:s("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function Le({className:e,children:a,showCloseButton:o=!0,...r}){return t.jsxs(va,{children:[t.jsx(wa,{}),t.jsxs(p.Dialog.Content,{"data-slot":"dialog-content",className:s("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r,children:[a,o&&t.jsx(p.Dialog.Close,{"data-slot":"dialog-close",asChild:!0,children:t.jsxs(L,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[t.jsx(N.XIcon,{}),t.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function Oe({className:e,...a}){return t.jsx("div",{"data-slot":"dialog-header",className:s("flex flex-col gap-2",e),...a})}function At({className:e,showCloseButton:a=!1,children:o,...r}){return t.jsxs("div",{"data-slot":"dialog-footer",className:s("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",e),...r,children:[o,a&&t.jsx(p.Dialog.Close,{asChild:!0,children:t.jsx(L,{variant:"outline",children:"Close"})})]})}function Pe({className:e,...a}){return t.jsx(p.Dialog.Title,{"data-slot":"dialog-title",className:s("text-base leading-none font-medium",e),...a})}function Tt({className:e,...a}){return t.jsx(p.Dialog.Description,{"data-slot":"dialog-description",className:s("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function Ge({className:e,type:a,...o}){return t.jsx("input",{type:a,"data-slot":"input",className:s("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...o})}const Dt=H.forwardRef(({size:e=24,className:a,fill:o="currentColor",...r},n)=>t.jsxs("svg",{ref:n,xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",className:s("shrink-0",a),...r,children:[t.jsx("path",{d:"M22.392 10.5705C21.693 5.4495 17.313 1.5 12 1.5C6.201 1.5 1.5 6.201 1.5 12C1.5 14.064 2.1045 15.9825 3.132 17.6055L1.5 22.5L6.3945 20.868C7.6395 21.657 9.06 22.188 10.584 22.3965",stroke:o,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("path",{d:"M17.625 12.75L18.75 16.5L22.5 17.625L18.75 18.75L17.625 22.5L16.5 18.75L12.75 17.625L16.5 16.5L17.625 12.75Z",fill:o,stroke:o,strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"})]}));Dt.displayName="TetraScienceIcon";function Et({className:e,...a}){return t.jsx("textarea",{"data-slot":"textarea",className:s("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a})}const Ro=({open:e,onOpenChange:a,title:o,prompt:r,initialCode:n="",userQuery:i="",onUserQueryChange:d,onCopy:f,onLaunch:u,onSend:l})=>{const[c,j]=m.useState(n),[y,x]=m.useState(""),[w,C]=m.useState(i);return m.useEffect(()=>{C(i)},[i]),t.jsx(Re,{open:e,onOpenChange:a,children:t.jsxs(Le,{className:"min-w-[600px]",children:[t.jsx(Oe,{children:t.jsxs(Pe,{className:"flex items-center gap-2",children:[t.jsx(Dt,{fill:"var(--primary)"}),t.jsx("span",{className:"font-semibold text-xl",children:o})]})}),t.jsx("div",{className:"px-6 py-6 text-sm font-normal leading-5",children:r}),t.jsx("div",{className:"mx-6 shadow-sm rounded-lg",children:t.jsx(Et,{value:w,onChange:S=>{C(S.target.value),d&&d(S.target.value)},rows:2,placeholder:"Type your question here..."})}),t.jsx("div",{className:"px-6 pt-6 pb-0 flex-1",children:t.jsx("div",{className:"rounded-[20px] overflow-hidden bg-[var(--primary)] min-h-[200px] relative",children:t.jsx(je,{value:c,onChange:S=>j(S??""),language:"python",height:200,onCopy:f,onLaunch:u})})}),t.jsxs("div",{className:"flex items-center gap-3 px-6 pt-4 pb-6 rounded-bl-[20px] rounded-br-[20px]",children:[t.jsx(Ge,{value:y,onChange:S=>x(S.target.value),placeholder:"Ask us anything related to your work...",onKeyDown:S=>{S.key==="Enter"&&l(y)}}),t.jsxs(L,{className:"min-w-[100px] flex items-center gap-[6px]",variant:"default",onClick:()=>l(y),children:[t.jsx(N.SendHorizontal,{}),"Send"]})]})]})})},Lo=({initialCode:e="",onCodeSave:a,language:o="python",buttonText:r="Edit Code",modalTitle:n="Edit Code",buttonProps:i,modalProps:d,disabled:f=!1})=>{const[u,l]=m.useState(!1),[c,j]=m.useState(e),y=c?c.split(`
|
|
2
|
+
`).length:0,x=c.length,w=m.useCallback(()=>{j(e),l(!0)},[e]),C=m.useCallback(()=>{a&&a(c),l(!1)},[a,c]),S=m.useCallback(()=>{l(!1)},[]),_=m.useCallback(b=>{j(b||"")},[]);return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center flex-row gap-4 flex-wrap w-full",children:[t.jsx("div",{className:"[&>button]:h-[38px]",children:t.jsxs(L,{onClick:w,size:"sm",variant:"secondary",...i,disabled:f,children:[t.jsx(N.Pencil,{}),r]})}),t.jsxs("span",{className:"text-xs text-muted-foreground",title:`${y} lines, ${x} characters`,children:[y," lines / ",x," chars"]})]}),t.jsx(Re,{...d,open:u,onOpenChange:b=>{l(b),b||S()},children:t.jsxs(Le,{className:"min-w-[80%]",children:[t.jsx(Oe,{children:t.jsx(Pe,{children:n})}),t.jsx(je,{height:"400px",language:o,value:c,onChange:_,options:{minimap:{enabled:!1}}}),t.jsxs(At,{children:[t.jsx(ja,{asChild:!0,children:t.jsx(L,{variant:"outline",onClick:S,children:"Close"})}),t.jsx(L,{onClick:C,children:"Save changes"})]})]})})]})};function we({className:e,...a}){return t.jsx(p.Label.Root,{"data-slot":"label",className:s("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}function Be({...e}){return t.jsx(p.Select.Root,{"data-slot":"select",...e})}function Oo({className:e,...a}){return t.jsx(p.Select.Group,{"data-slot":"select-group",className:s("scroll-my-1 p-1",e),...a})}function Ue({...e}){return t.jsx(p.Select.Value,{"data-slot":"select-value",...e})}function He({className:e,size:a="default",children:o,...r}){return t.jsxs(p.Select.Trigger,{"data-slot":"select-trigger","data-size":a,className:s("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[o,t.jsx(p.Select.Icon,{asChild:!0,children:t.jsx(N.ChevronDownIcon,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function Fe({className:e,children:a,position:o="item-aligned",align:r="center",...n}){return t.jsx(p.Select.Portal,{children:t.jsxs(p.Select.Content,{"data-slot":"select-content","data-align-trigger":o==="item-aligned",className:s("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",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,align:r,...n,children:[t.jsx(ya,{}),t.jsx(p.Select.Viewport,{"data-position":o,className:s("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",o==="popper"&&""),children:a}),t.jsx(Ca,{})]})})}function Po({className:e,...a}){return t.jsx(p.Select.Label,{"data-slot":"select-label",className:s("px-1.5 py-1 text-xs text-muted-foreground",e),...a})}function $e({className:e,children:a,...o}){return t.jsxs(p.Select.Item,{"data-slot":"select-item",className:s("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...o,children:[t.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:t.jsx(p.Select.ItemIndicator,{children:t.jsx(N.CheckIcon,{className:"pointer-events-none"})})}),t.jsx(p.Select.ItemText,{children:a})]})}function Go({className:e,...a}){return t.jsx(p.Select.Separator,{"data-slot":"select-separator",className:s("pointer-events-none -mx-1 my-1 h-px bg-border",e),...a})}function ya({className:e,...a}){return t.jsx(p.Select.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:s("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...a,children:t.jsx(N.ChevronUpIcon,{})})}function Ca({className:e,...a}){return t.jsx(p.Select.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:s("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",e),...a,children:t.jsx(N.ChevronDownIcon,{})})}function _e({className:e,size:a="default",...o}){return t.jsx(p.Switch.Root,{"data-slot":"switch","data-size":a,className:s("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",e),...o,children:t.jsx(p.Switch.Thumb,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"})})}const Bo=3e3,Uo=`protocolSchema: v3
|
|
3
|
+
name: v3
|
|
4
|
+
description: No description
|
|
5
|
+
config: {}
|
|
6
|
+
steps: []`,Ho=({initialCode:e=Uo,onDeploy:a,versions:o=["v0.0.7","v0.0.6","v0.0.5"],currentVersion:r="v0.0.7"})=>{const[n,i]=m.useState(e),[d,f]=m.useState(!0),[u,l]=m.useState(!1),c=w=>{w!==void 0&&i(w)},j=w=>{navigator.clipboard.writeText(w)},y=w=>{console.log("Launching code:",w)},x=()=>{l(!0),be.toast.info("Building Protocol: Status=IN_PROGRESS, Phase=FINALIZING"),setTimeout(()=>{Math.random()>.3?be.toast.success(`Pipeline visual-pipeline-builder-protocol-${r}-pipeline deployed successfully! Deployment complete`):be.toast.error(`Failed to deploy pipeline visual-pipeline-builder-protocol-${r}-pipeline. Please try again.`),l(!1),a&&a()},Bo)};return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h1",{className:"text-default text-lg font-semibold leading-7 m-0",children:"Launch"}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(we,{htmlFor:"overwrite-switch",children:"Overwrite Mode"}),t.jsx(_e,{checked:d,onCheckedChange:f,disabled:u}),t.jsx(ce,{orientation:"vertical"}),t.jsx("div",{className:"flex items-center",children:t.jsxs(Be,{defaultValue:"workspace",children:[t.jsx(He,{size:"default",children:t.jsx(Ue,{placeholder:"Choose a destination"})}),t.jsx(Fe,{children:o.map(w=>t.jsx($e,{value:w,children:w},w))})]})}),t.jsx(L,{onClick:x,disabled:u,children:"Deploy"})]})]}),t.jsx(je,{value:n,onChange:c,language:"yaml",width:"100%",onCopy:j,onLaunch:y,disabled:!d})]})},Fo=()=>t.jsx("div",{className:"rounded flex items-center justify-center",children:t.jsx(N.Building,{})}),$o=()=>t.jsx(N.Lamp,{}),Na=({organization:e})=>t.jsxs("div",{className:"flex items-center h-20 w-full pt-3 pr-6 pb-3 pl-32 box-border gap-10",children:[t.jsx("div",{className:"flex items-center h-full",children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"uppercase mb-0.5 text-[10px] font-medium leading-4 tracking-[0.2px]",children:"ORGANIZATION"}),t.jsxs("div",{className:"flex items-center gap-2 w-80",children:[t.jsx("div",{className:"flex items-center justify-center",children:e.logo||t.jsx(Fo,{})}),t.jsxs("div",{children:[t.jsx("div",{className:"text-sm font-medium leading-[22px]",children:e.name}),e.subtext&&t.jsx("div",{className:"text-muted-foreground text-xs italic font-medium leading-4",children:e.subtext})]})]})]})}),t.jsx("div",{className:"flex items-center h-full",children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"uppercase mb-0.5 text-[10px] font-medium leading-4 tracking-[0.2px]",children:"PROJECT"}),t.jsxs("div",{className:"flex items-center py-1.5 rounded gap-2",children:[t.jsx("div",{className:"flex items-center justify-center",children:t.jsx($o,{})}),t.jsx("div",{className:"text-muted-foreground text-sm font-medium leading-[22px]",children:"Not Selected"})]})]})})]});function lt({className:e,size:a="default",...o}){return t.jsx("div",{"data-slot":"card","data-size":a,className:s("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...o})}function Rt({className:e,...a}){return t.jsx("div",{"data-slot":"card-header",className:s("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",e),...a})}function Lt({className:e,...a}){return t.jsx("div",{"data-slot":"card-title",className:s("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",e),...a})}function Vo({className:e,...a}){return t.jsx("div",{"data-slot":"card-description",className:s("text-sm text-muted-foreground",e),...a})}function Yo({className:e,...a}){return t.jsx("div",{"data-slot":"card-action",className:s("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a})}function dt({className:e,...a}){return t.jsx("div",{"data-slot":"card-content",className:s("px-4 group-data-[size=sm]/card:px-3",e),...a})}function Wo({className:e,...a}){return t.jsx("div",{"data-slot":"card-footer",className:s("flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3",e),...a})}const qo=({className:e})=>{const[a,o]=m.useState(!1);return t.jsxs("div",{className:e,children:[t.jsxs("div",{className:"flex items-center justify-between pb-6 rounded-tl-3xl rounded-tr-3xl",children:[t.jsx("h2",{className:"text-xl font-semibold leading-7 m-0",children:"Protocol Configuration"}),t.jsxs("div",{className:"flex items-center gap-2 text-[15px] font-medium",children:[t.jsx(_e,{checked:a,onCheckedChange:()=>o(r=>!r)}),t.jsx(we,{htmlFor:"edit-mode-switch",children:"Edit Mode"})]})]}),t.jsxs(lt,{children:[t.jsx(Rt,{className:"border-b",children:t.jsx(Lt,{children:"Configuration"})}),t.jsx(dt,{children:a?t.jsxs(L,{variant:"secondary",children:[t.jsx(N.Plus,{}),"Add Input"]}):t.jsx("div",{className:"flex flex-col items-start gap-4",children:t.jsx("div",{className:"text-muted-foreground text-sm font-medium",children:"No values, Use the 'edit' button to add values"})})})]})]})},Ko=({title:e,newVersionMode:a,onToggleNewVersionMode:o,versionOptions:r,selectedVersion:n,onVersionChange:i,onDeploy:d,yaml:f,onYamlChange:u})=>t.jsxs("div",{className:"flex flex-col items-start p-0 gap-4 w-[928px] bg-transparent",children:[t.jsxs("div",{className:"flex flex-row justify-between items-center w-[928px] h-9",children:[t.jsx("span",{className:"font-semibold text-lg leading-7",children:e}),t.jsxs("div",{className:"flex flex-row items-center gap-4 justify-end",children:[t.jsx(_e,{checked:a,onCheckedChange:o}),t.jsx(we,{htmlFor:"new-version-mode-switch",children:"New Version Mode"}),t.jsx("div",{className:"w-px h-5"}),t.jsxs(Be,{value:n,onValueChange:i,children:[t.jsx(He,{size:"default",children:t.jsx(Ue,{placeholder:"Choose a version"})}),t.jsx(Fe,{children:r.map(l=>t.jsx($e,{value:l.value,children:l.label},l.value))})]}),t.jsx(L,{onClick:d,children:"Deploy"})]})]}),t.jsx("div",{className:"w-full",children:t.jsx(je,{value:f,onChange:l=>u(l??""),language:"yaml",onCopy:()=>{},onLaunch:()=>{}})})]}),Xo=({open:e,onOpenChange:a,initialValue:o="",title:r="",description:n="",onSave:i,onCancel:d})=>{const[f,u]=m.useState(o),l=()=>{i(f)},c=()=>{d?.(),a(!1)};return t.jsx(Re,{open:e,onOpenChange:a,children:t.jsxs(Le,{className:"min-w-[600px]",children:[t.jsx(Oe,{children:t.jsx(Pe,{children:r})}),t.jsx(Tt,{className:"sr-only",children:n}),t.jsx("div",{className:"py-3 flex-1",children:t.jsx(je,{value:f,onChange:j=>u(j??""),language:"python",height:300,onCopy:()=>{},onLaunch:()=>{}})}),t.jsxs(At,{children:[t.jsx(L,{variant:"outline",onClick:c,children:"Cancel"}),t.jsx(L,{onClick:l,children:"Save Code"})]})]})})},Zo=({icon:e,label:a,active:o,onClick:r})=>t.jsxs("div",{className:s("w-full inline-flex flex-col rounded items-center py-3 cursor-pointer transition-colors duration-200 ease-in-out hover:bg-primary/50",o?"bg-primary":"bg-transparent"),onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&r?.()},onClick:r,children:[t.jsx("div",{className:"flex justify-center items-center mb-[10px]",children:t.jsx(e,{size:20})}),t.jsx("div",{className:"text-center text-xs font-medium leading-4 px-2",children:a})]}),Ot=({items:e,activeItem:a,onItemClick:o})=>{const r=n=>{o&&o(n)};return t.jsx("div",{className:"w-[104px] h-full flex flex-col items-center pl-2 pr-2 gap-1",children:e.map(n=>t.jsx(Zo,{icon:n.icon,label:n.label,active:a===n.label,onClick:()=>r(n.label)},n.label))})},Jo="__tdp-search-empty__",Qo=e=>`${Jo}:${e}`,er=({filters:e,filterValues:a,onFilterChange:o})=>t.jsx("div",{className:"tdp-search__filters-row",children:e.map(r=>{const n=Qo(r.key),i=r.options.some(l=>l.value===""),d=a[r.key]??"",f=r.options.some(l=>l.value===d),u=d===""?i?n:void 0:f?d:void 0;return t.jsxs("div",{className:"tdp-search__filter-wrapper",children:[t.jsx("label",{className:"tdp-search__filter-label",children:r.label}),t.jsxs(Be,{value:u,onValueChange:l=>o(r.key,l===n?"":l),children:[t.jsx(He,{className:"h-[38px] w-full justify-between rounded-md",children:t.jsx(Ue,{placeholder:"Select an option"})}),t.jsx(Fe,{children:r.options.map(l=>t.jsx($e,{value:l.value===""?n:l.value,disabled:l.disabled,children:l.label},`${r.key}-${l.value||n}`))})]})]},r.key)})});function ka({className:e,...a}){return t.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:t.jsx("table",{"data-slot":"table",className:s("w-full caption-bottom text-sm",e),...a})})}function Ma({className:e,...a}){return t.jsx("thead",{"data-slot":"table-header",className:s("[&_tr]:border-b",e),...a})}function _a({className:e,...a}){return t.jsx("tbody",{"data-slot":"table-body",className:s("[&_tr:last-child]:border-0",e),...a})}function tr({className:e,...a}){return t.jsx("tfoot",{"data-slot":"table-footer",className:s("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a})}function yt({className:e,...a}){return t.jsx("tr",{"data-slot":"table-row",className:s("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...a})}function Sa({className:e,...a}){return t.jsx("th",{"data-slot":"table-head",className:s("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0",e),...a})}function za({className:e,...a}){return t.jsx("td",{"data-slot":"table-cell",className:s("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",e),...a})}function ar({className:e,...a}){return t.jsx("caption",{"data-slot":"table-caption",className:s("mt-4 text-sm text-muted-foreground",e),...a})}const or=({results:e,total:a,currentPage:o,pageSize:r,columns:n,onPageChange:i,sortKey:d,sortDirection:f,onSort:u})=>{const l=m.useMemo(()=>Math.max(1,Math.ceil(a/r)),[a,r]),c=m.useMemo(()=>{const x=[];if(l<=5)for(let C=1;C<=l;C++)x.push(C);else{x.push(1),o>3&&x.push("...");const C=Math.max(2,o-1),S=Math.min(l-1,o+1);for(let _=C;_<=S;_++)x.push(_);o<l-2&&x.push("..."),x.push(l)}return x},[l,o]),j=m.useCallback(x=>{u(x,d===x&&f==="asc"?"desc":"asc")},[d,f,u]),y=m.useCallback(x=>d!==x?t.jsx(N.ArrowUpDown,{className:"ml-1 inline size-3.5 text-muted-foreground"}):f==="asc"?t.jsx(N.ArrowUp,{className:"ml-1 inline size-3.5"}):t.jsx(N.ArrowDown,{className:"ml-1 inline size-3.5"}),[d,f]);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"tdp-search__results-header",children:t.jsxs("div",{className:"tdp-search__results-count",children:["Showing ",(o-1)*r+1,"-",Math.min(o*r,a)," of ",a," results"]})}),t.jsx("div",{className:"rounded-lg border",children:t.jsxs(ka,{children:[t.jsx(Ma,{children:t.jsx(yt,{children:n.map(x=>t.jsxs(Sa,{style:{width:x.width,textAlign:x.align},className:x.sortable?"cursor-pointer select-none":void 0,onClick:x.sortable?()=>j(x.key):void 0,children:[x.header,x.sortable&&y(x.key)]},x.key))})}),t.jsx(_a,{children:e.map((x,w)=>t.jsx(yt,{children:n.map(C=>{const S=x[C.key],_=C.render?C.render(S,x,w):S;return t.jsx(za,{style:{textAlign:C.align},children:_},C.key)})},x.id||w))})]})}),l>1&&t.jsxs("div",{className:"flex items-center justify-center gap-2 py-2.5",children:[t.jsx(L,{variant:"outline",size:"icon-sm",disabled:o===1,onClick:()=>i(o-1),"aria-label":"Previous page",children:t.jsx(N.ChevronLeft,{})}),c.map((x,w)=>typeof x=="number"?t.jsx(L,{variant:x===o?"default":"ghost",size:"icon-sm",onClick:()=>i(x),children:x},w):t.jsx("span",{className:"px-1 text-sm text-muted-foreground",children:x},w)),t.jsx(L,{variant:"outline",size:"icon-sm",disabled:o===l,onClick:()=>i(o+1),"aria-label":"Next page",children:t.jsx(N.ChevronRight,{})})]})]})},rr=({query:e,setQuery:a,onSearch:o,isLoading:r,placeholder:n})=>{const i=d=>{d.key==="Enter"&&o()};return t.jsxs("div",{className:"tdp-search__search-bar",children:[t.jsx("div",{className:"tdp-search__search-input-wrapper",children:t.jsxs("div",{className:"relative",children:[t.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2.5 text-muted-foreground",children:t.jsx(N.Search,{})}),t.jsx(Ge,{value:e,onChange:d=>a(d.target.value),onKeyDown:i,placeholder:n,className:"pl-9"})]})}),t.jsx(L,{variant:"default",onClick:o,disabled:!e.trim()||r,children:r?"Searching...":"Search"})]})},nt="ts-auth-token",st="x-org-slug",nr="/v1/datalake/searchEql",sr=(e,a,o)=>{const{searchTerm:r,sort:n,order:i,...d}=e,f={from:a,size:o};return r!==void 0&&r!==""&&(f.query={simple_query_string:{query:r,default_operator:"and"}}),n!==void 0&&n!==""&&(f.sort=i?[{[n]:i}]:[n]),Object.entries(d).forEach(([u,l])=>{l!==void 0&&(f[u]=l)}),f};function Ia(e){const[a,o]=m.useState([]),[r,n]=m.useState(0),[i,d]=m.useState(1),[f,u]=m.useState(!1),[l,c]=m.useState(null);return{results:a,total:r,currentPage:i,isLoading:f,error:l,executeSearch:async(y,x=1)=>{u(!0),c(null);const{pageSize:w,standalone:C,baseUrl:S,apiEndpoint:_="/api/search",authToken:b,orgSlug:v}=e,M=(x-1)*w;let g,h;if(C){if(!S)throw new Error("baseUrl is required when standalone is true");g=`${S.replace(/\/$/,"")}${nr}`,h={method:"POST",headers:{"Content-Type":"application/json",...b&&{[nt]:b},...v&&{[st]:v}},body:JSON.stringify(sr(y,M,w))}}else{const k={"Content-Type":"application/json"};b&&v&&(k[nt]=b,k[st]=v),g=_,h={method:"POST",headers:k,credentials:"include",body:JSON.stringify({...y,size:w,from:M})}}try{const k=await fetch(g,h);if(!k.ok){const D=await k.json().catch(()=>({error:"Unknown error"})),R=C&&D.error?.message||D.error;throw new Error(R||`HTTP ${k.status}: ${k.statusText}`)}const z=await k.json(),A=(z.hits?.hits||[]).map(D=>({id:D._id,...D._source,_score:D._score})),I=typeof z.hits?.total=="number"?z.hits.total:z.hits?.total?.value||0;return o(A),n(I),d(x),A}catch(k){return c(k.message||"An error occurred while searching"),o([]),n(0),[]}finally{u(!1)}}}}function sa(e){try{return localStorage.getItem(e)??void 0}catch{return}}function ia(e){try{const a=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return a?decodeURIComponent(a[1]):void 0}catch{return}}function ir(e,a){if(e&&a)return{authToken:e,orgSlug:a};const o=sa(nt),r=sa(st);if(o&&r)return{authToken:o,orgSlug:r};const n=ia(nt),i=ia(st);return n&&i?{authToken:n,orgSlug:i}:{authToken:e,orgSlug:a}}const lr=ne.cva("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function Aa({className:e,variant:a,...o}){return t.jsx("div",{"data-slot":"alert",role:"alert",className:s(lr({variant:a}),e),...o})}function Ta({className:e,...a}){return t.jsx("div",{"data-slot":"alert-title",className:s("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",e),...a})}function Da({className:e,...a}){return t.jsx("div",{"data-slot":"alert-description",className:s("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...a})}function dr({className:e,...a}){return t.jsx("div",{"data-slot":"alert-action",className:s("absolute top-2 right-2",e),...a})}const cr=({defaultQuery:e="",columns:a,filters:o=[],defaultSort:r,advancedSearchParams:n,pageSize:i=10,searchPlaceholder:d="Enter search term...",className:f,onSearch:u,renderSearchBar:l,renderFilters:c,renderResults:j,...y})=>{const{authToken:x,orgSlug:w}=ir(y.authToken,y.orgSlug),{results:C,total:S,currentPage:_,isLoading:b,error:v,executeSearch:M}=Ia({...y,authToken:x??"",orgSlug:w??"",pageSize:i}),[g,h]=m.useState(e),[k,z]=m.useState({}),[A,I]=m.useState(null),[D,R]=m.useState("asc"),[O,K]=m.useState(!1),Z=async(ae=1,oe)=>{if(!g.trim())return;K(!0);const Ce=oe?.sortKey??A??r?.field,me=oe==null?A?D:r?.order??D:oe.sortDirection,xe=Object.entries(k).filter(([,de])=>de!=="").map(([de,We])=>({field:de,operator:"eq",value:We}));let ue=n?.expression;xe.length>0&&(ue={g:"AND",e:ue?[...xe,ue]:xe});const Ne={searchTerm:g.trim(),sort:Ce??void 0,order:me,...n,...ue!==void 0&&{expression:ue}},pe=await M(Ne,ae);u&&u({...Ne,from:(ae-1)*i,size:i},pe)},W=()=>{Z(1)},X=(ae,oe)=>{z(Ce=>({...Ce,[ae]:oe}))},J=ae=>{Z(ae)},B=(ae,oe)=>{I(ae),R(oe),Z(1,{sortKey:ae,sortDirection:oe})},Q=t.jsxs("div",{className:"tdp-search__empty-state",children:[t.jsx("div",{className:"tdp-search__empty-state-icon",children:t.jsx(N.Search,{})}),t.jsx("div",{className:"tdp-search__empty-state-text",children:"No results found. Try adjusting your search query or filters."})]}),ee={query:g,setQuery:h,onSearch:W,isLoading:b,placeholder:d},ye={filters:o,filterValues:k,onFilterChange:X},ge={results:C,total:S,currentPage:_,pageSize:i,columns:a,onPageChange:J,sortKey:A,sortDirection:D,onSort:B};return t.jsxs("div",{className:`tdp-search ${f||""}`,children:[l?l(ee):t.jsx(rr,{...ee}),o.length>0&&(c?c(ye):t.jsx(er,{...ye})),v&&t.jsxs(t.Fragment,{children:[t.jsxs(Aa,{variant:"destructive",children:[t.jsx(N.AlertCircle,{}),t.jsx(Ta,{children:"Error"}),t.jsx(Da,{children:v})]}),Q]}),b&&t.jsx("div",{className:"tdp-search__loading-overlay",children:"Loading results..."}),!b&&!O&&t.jsxs("div",{className:"tdp-search__empty-state",children:[t.jsx("div",{className:"tdp-search__empty-state-icon",children:t.jsx(N.Search,{})}),t.jsx("div",{className:"tdp-search__empty-state-text",children:"Enter a search query and click Search to get started."})]}),!b&&!v&&O&&C.length>0&&(j?j(ge):t.jsx(or,{...ge})),!b&&!v&&O&&C.length===0&&Q]})},ur=["/data-workspace","/data-apps","/pipelines","/pipeline-edit/","/pipeline-details/","/pipeline-processing/","/file/","/file-details/","/files","/search","/search-classic","/artifacts/","/admin","/settings","/agent-studio"];function Pt(){if(typeof document>"u"||!document.referrer)return null;try{const e=new URL(document.referrer),a=e.pathname;for(const o of ur){const r=a.indexOf(o);if(r!==-1){const n=a.slice(0,r).replace(/\/$/u,"");return`${e.origin}${n}`}}return e.origin}catch{return null}}function Ee(e,a){try{const o=a.startsWith("/")?a:`/${a}`,r=new URL(e);return r.pathname=`${r.pathname.replace(/\/$/u,"")}${o}`,r.href}catch{return null}}function Gt(e,a={}){if(a.newTab){window.open(e,"_blank","noopener,noreferrer");return}if(window.parent!==window)try{window.parent.location.href}catch{try{const o=new URL(e),r=`${o.pathname}${o.search}${o.hash}`;window.parent.postMessage({type:"navigate",path:r},"*");return}catch{}}window.location.href=e}const pr={fileDetails:e=>`/file/${e}`,pipelineEdit:e=>`/pipeline-edit/${e}`,pipelineDetails:e=>`/pipeline-details/${e}`,search:e=>e?`/search?q=${encodeURIComponent(e)}`:"/search",dataWorkspace:()=>"/data-workspace",dataApps:()=>"/data-apps",artifact:(e,a,o)=>`/artifacts/${e}/${a}/${o}`},Bt=m.createContext(null);function Ea(){const e=m.useContext(Bt);if(!e)throw new Error("useTdpNavigationContext must be used within a TdpNavigationProvider. Wrap your app with <TdpNavigationProvider> or use the standalone useTdpNavigation() hook instead.");return e}const mr=({tdpBaseUrl:e,children:a})=>{const o=m.useMemo(()=>e?e.replace(/\/$/u,""):Pt(),[e]),r=m.useMemo(()=>({tdpBaseUrl:o,getTdpUrl:n=>o?Ee(o,n):null,navigateToTdp:(n,i)=>{if(!o){console.warn("[TdpNavigation] Cannot navigate: TDP base URL not resolved");return}const d=Ee(o,n);d&&Gt(d,i)}}),[o]);return t.jsx(Bt.Provider,{value:r,children:a})};function fr(e={}){const{tdpBaseUrl:a}=e,o=m.useMemo(()=>a?a.replace(/\/$/u,""):Pt(),[a]);return m.useMemo(()=>({tdpBaseUrl:o,getTdpUrl:r=>o?Ee(o,r):null,navigateToTdp:(r,n)=>{if(!o){console.warn("[useTdpNavigation] Cannot navigate: TDP base URL not resolved");return}const i=Ee(o,r);i&&Gt(i,n)}}),[o])}const gr=({path:e,navigationOptions:a={newTab:!0},children:o,onClick:r,className:n,...i})=>{const{getTdpUrl:d,navigateToTdp:f}=Ea(),u=d(e),l=c=>{c.metaKey||c.ctrlKey||c.shiftKey||(c.preventDefault(),r?.(c),f(e,a))};return t.jsx("a",{href:u??"#",target:a.newTab?"_blank":void 0,rel:a.newTab?"noopener noreferrer":void 0,onClick:l,className:`no-underline cursor-pointer hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:rounded-[2px] ${n??""}`,style:{color:"var(--primary)",outlineColor:"var(--border)"},...i,children:o})},xr=({userProfile:e,hostname:a,organization:o,children:r})=>{const n=[{icon:N.Search,label:"Search"},{icon:N.SearchCode,label:"SQL Search"},{icon:N.Lamp,label:"Projects"},{icon:N.Workflow,label:"Pipelines"},{icon:N.Monitor,label:"Data & AI Workspace"},{icon:N.Box,label:"Artifacts"},{icon:N.Database,label:"Data Sources"},{icon:N.PieChart,label:"Health Monitoring"},{icon:N.CheckCheck,label:"Bulk Actions"},{icon:N.Code,label:"Attribute Management"},{icon:N.Settings,label:"Administration"}],[i,d]=m.useState("Pipelines"),f=j=>{d(j)},u=()=>{console.log("Home clicked")},l=()=>{console.log("Settings clicked")},c=()=>{console.log("User profile clicked")};return t.jsxs("div",{className:"app-layout",children:[t.jsx(Na,{organization:o}),t.jsxs("div",{className:"content-container",children:[t.jsx(Ot,{items:n,activeItem:i,onItemClick:f}),t.jsxs("div",{className:"main-content",children:[t.jsx(ba,{hostname:a,userProfile:e,onHomeClick:u,onSettingsClick:l,onUserProfileClick:c}),t.jsx("div",{className:"main-layout",children:r})]})]})]})},hr={paperBg:"transparent",plotBg:"transparent",textColor:"rgba(26, 26, 26, 1)",textSecondary:"rgba(26, 26, 26, 0.6)",gridColor:"rgba(225, 231, 239, 1)",lineColor:"rgba(26, 26, 26, 1)",tickColor:"rgba(225, 231, 239, 1)",legendColor:"rgba(4, 38, 63, 1)",spikeColor:"rgba(100, 116, 139, 1)",isDark:!1},br={paperBg:"transparent",plotBg:"transparent",textColor:"rgba(255, 255, 255, 0.9)",textSecondary:"rgba(255, 255, 255, 0.6)",gridColor:"rgba(51, 65, 86, 1)",lineColor:"rgba(158, 172, 192, 1)",tickColor:"rgba(51, 65, 86, 1)",legendColor:"rgba(200, 214, 229, 1)",spikeColor:"rgba(158, 172, 192, 1)",isDark:!0};function le(){const e=It();return m.useMemo(()=>e?br:hr,[e])}const vr=({dataSeries:e,width:a=1e3,height:o=600,xRange:r,yRange:n,variant:i="normal",xTitle:d="Columns",yTitle:f="Rows",title:u="Area Graph"})=>{const l=m.useRef(null),c=le(),{xMin:j,xMax:y,yMin:x,yMax:w}=m.useMemo(()=>{let g=Number.MAX_VALUE,h=Number.MIN_VALUE,k=Number.MAX_VALUE,z=Number.MIN_VALUE;e.forEach(D=>{D.x.forEach(R=>{g=Math.min(g,R),h=Math.max(h,R)}),D.y.forEach(R=>{k=Math.min(k,R),z=Math.max(z,R)})});const A=(h-g)*.1,I=(z-k)*.1;return{xMin:g-A,xMax:h+A,yMin:i==="stacked"?0:k-I,yMax:z+I}},[e,i]),C=m.useMemo(()=>r||[j,y],[r,j,y]),S=m.useMemo(()=>n||[x,w],[n,x,w]),_=m.useMemo(()=>{const g=C[1]-C[0];let h=Math.pow(10,Math.floor(Math.log10(g)));g/h>10&&(h=h*2),g/h<4&&(h=h/2);const k=[];let z=Math.ceil(C[0]/h)*h;for(;z<=C[1];)k.push(z),z+=h;return k},[C]),b=m.useMemo(()=>{const g=S[1]-S[0];let h=Math.pow(10,Math.floor(Math.log10(g)));g/h>10&&(h=h*2),g/h<4&&(h=h/2);const k=[];let z=Math.ceil(S[0]/h)*h;for(;z<=S[1];)k.push(z),z+=h;return k},[S]),v=m.useMemo(()=>({tickcolor:c.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:c.textColor,family:"Inter, sans-serif",weight:400},linecolor:c.lineColor,linewidth:1,position:0,zeroline:!1}),[c]),M=m.useMemo(()=>({text:u,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:"Inter, sans-serif",color:c.textColor,lineheight:1.2,standoff:30}}),[u,c]);return m.useEffect(()=>{if(!l.current)return;let g;if(i==="stacked"){const A=new Array(e[0]?.x.length||0).fill(0);g=e.map((I,D)=>{const R=I.y.map((O,K)=>{const Z=A[K]+O;return A[K]=Z,Z});return{x:I.x,y:R,type:"scatter",mode:"lines",name:I.name,fill:D===0?"tozeroy":"tonexty",fillcolor:I.color,line:{color:I.color,width:2}}})}else g=e.map(A=>({x:A.x,y:A.y,type:"scatter",mode:"lines",name:A.name,fill:A.fill||"tozeroy",fillcolor:A.color,line:{color:A.color,width:2}}));const h={width:a,height:o,title:M,margin:{l:80,r:40,b:80,t:80,pad:0},paper_bgcolor:c.paperBg,plot_bgcolor:c.plotBg,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:d,font:{size:16,color:c.textSecondary,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:c.gridColor,range:r,autorange:!r,tickmode:"array",tickvals:_,showgrid:!0,...v},yaxis:{title:{text:f,font:{size:16,color:c.textSecondary,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:c.gridColor,range:n,autorange:!n,tickmode:"array",tickvals:b,showgrid:!0,...v},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:13,color:c.legendColor,family:"Inter, sans-serif",weight:500,lineheight:18}},showlegend:!0},k={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(l.current,g,h,k);const z=l.current;return()=>{z&&V.purge(z)}},[e,a,o,r,n,C,S,i,d,f,M,v,_,b,c]),t.jsx("div",{className:"area-graph-container",children:t.jsx("div",{ref:l,style:{width:"100%",height:"100%"}})})},jr=({dataSeries:e,width:a=1e3,height:o=600,xRange:r,yRange:n,variant:i="group",xTitle:d="Columns",yTitle:f="Rows",title:u="Bar Graph",barWidth:l=24})=>{const c=m.useRef(null),j=le(),{yMin:y,yMax:x}=m.useMemo(()=>{let v=Number.MAX_VALUE,M=Number.MIN_VALUE,g=Number.MAX_VALUE,h=Number.MIN_VALUE;e.forEach(A=>{A.x.forEach(I=>{v=Math.min(v,I),M=Math.max(M,I)}),A.y.forEach(I=>{g=Math.min(g,I),h=Math.max(h,I)})});const k=(M-v)*.1,z=(h-g)*.1;return{xMin:v-k,xMax:M+k,yMin:i==="stack"?0:g-z,yMax:h+z}},[e,i]),w=m.useMemo(()=>n||[y,x],[n,y,x]),C=m.useMemo(()=>[...new Set(e.flatMap(v=>v.x))],[e]),S=m.useMemo(()=>{const v=w[1]-w[0];let M=Math.pow(10,Math.floor(Math.log10(v)));v/M>10&&(M=M*2),v/M<4&&(M=M/2);const g=[];let h=Math.ceil(w[0]/M)*M;for(;h<=w[1];)g.push(h),h+=M;return g},[w]),_=m.useMemo(()=>{switch(i){case"stack":return"stack";case"overlay":return"overlay";default:return"group"}},[i]),b=m.useMemo(()=>({tickcolor:j.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:j.textColor,family:"Inter, sans-serif",weight:400},linecolor:j.lineColor,linewidth:1,position:0,zeroline:!1}),[j]);return m.useEffect(()=>{if(!c.current)return;const v=e.map(k=>({x:k.x,y:k.y,type:"bar",name:k.name,marker:{color:k.color},width:l,error_y:k.error_y})),M={title:{text:u,font:{size:32,family:"Inter, sans-serif",color:j.textColor}},width:a,height:o,margin:{l:80,r:30,b:80,t:60,pad:0},paper_bgcolor:j.paperBg,plot_bgcolor:j.plotBg,font:{family:"Inter, sans-serif"},barmode:_,bargap:.15,dragmode:!1,xaxis:{title:{text:d,font:{size:16,color:j.textSecondary,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:j.gridColor,range:r,autorange:!r,tickmode:"array",tickvals:C,showgrid:!0,...b},yaxis:{title:{text:f,font:{size:16,color:j.textSecondary,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:j.gridColor,range:n,autorange:!n,tickmode:"array",tickvals:S,showgrid:!0,...b},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:j.legendColor,family:"Inter, sans-serif",weight:500}},showlegend:e.length>1},g={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(c.current,v,M,g);const h=c.current;return()=>{h&&V.purge(h)}},[e,a,o,r,n,d,f,u,l,_,b,C,S,j]),t.jsx("div",{className:"bar-graph-container",children:t.jsx("div",{ref:c,style:{width:"100%",height:"100%"}})})},wr=-1.8,yr=({dataSeries:e,width:a=1e3,height:o=600,xRange:r,yRange:n,xTitle:i="Columns",yTitle:d="Rows",title:f="Boxplot",showPoints:u=!1})=>{const l=m.useRef(null),c=le(),{yMin:j,yMax:y}=m.useMemo(()=>{let _=Number.MAX_VALUE,b=Number.MIN_VALUE;e.forEach(M=>{M.y.forEach(g=>{_=Math.min(_,g),b=Math.max(b,g)})});const v=(b-_)*.1;return{yMin:_-v,yMax:b+v}},[e]),x=m.useMemo(()=>n||[j,y],[n,j,y]),w=m.useMemo(()=>{const _=x[1]-x[0];let b=Math.pow(10,Math.floor(Math.log10(_)));_/b>10&&(b=b*2),_/b<4&&(b=b/2);const v=[];let M=Math.ceil(x[0]/b)*b;for(;M<=x[1];)v.push(M),M+=b;return v},[x]),C=m.useMemo(()=>({tickcolor:c.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:c.textColor,family:"Inter, sans-serif",weight:400},linecolor:c.lineColor,linewidth:1,position:0,zeroline:!1}),[c]),S=m.useMemo(()=>({text:f,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:"Inter, sans-serif",color:c.textColor,lineheight:1.2,standoff:30}}),[f,c]);return m.useEffect(()=>{if(!l.current)return;const _=e.map(g=>({y:g.y,x:g.x,type:"box",name:g.name,marker:{color:g.color},line:{color:g.color},fillcolor:g.color+"40",boxpoints:u?g.boxpoints||"outliers":!1,jitter:g.jitter||.3,pointpos:g.pointpos||wr})),b={width:a,height:o,title:S,margin:{l:80,r:40,b:80,t:80,pad:0},paper_bgcolor:c.paperBg,plot_bgcolor:c.plotBg,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:i,font:{size:16,color:c.textSecondary,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:c.gridColor,range:r,autorange:!r,showgrid:!0,...C},yaxis:{title:{text:d,font:{size:16,color:c.textSecondary,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:c.gridColor,range:n,autorange:!n,tickmode:"array",tickvals:w,showgrid:!0,...C},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:13,color:c.legendColor,family:"Inter, sans-serif",weight:500,lineheight:18}},showlegend:!0},v={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(l.current,_,b,v);const M=l.current;return()=>{M&&V.purge(M)}},[e,a,o,r,n,x,i,d,u,S,C,w,c]),t.jsx("div",{className:"boxplot-container",children:t.jsx("div",{ref:l,style:{width:"100%",height:"100%"}})})},Cr=75,Nr=1.05,kr=e=>{const a={A:e.peakA,T:e.peakT,G:e.peakG,C:e.peakC},o=Object.values(a);if(o.every(d=>d===o[0]))return"";let n="",i=0;return Object.entries(a).forEach(([d,f])=>{f>i&&(n=d,i=f)}),n},Mr=({data:e=[],width:a=900,height:o=600,positionInterval:r=10,colorA:n="#2D9CDB",colorT:i="#A1C63C",colorG:d="#FF5C64",colorC:f="#FFA62E"})=>{const u=m.useRef(null),l=le(),c=m.useMemo(()=>e.map(h=>h.position),[e]),j=m.useMemo(()=>e.map(h=>kr(h)),[e]),y=m.useMemo(()=>e.map(h=>h.peakA),[e]),x=m.useMemo(()=>e.map(h=>h.peakT),[e]),w=m.useMemo(()=>e.map(h=>h.peakG),[e]),C=m.useMemo(()=>e.map(h=>h.peakC),[e]),S=m.useMemo(()=>({x:c,y,type:"scatter",mode:"lines",name:"A",line:{color:n,width:2,shape:"spline"}}),[c,y,n]),_=m.useMemo(()=>({x:c,y:x,type:"scatter",mode:"lines",name:"T",line:{color:i,width:2,shape:"spline"}}),[c,x,i]),b=m.useMemo(()=>({x:c,y:w,type:"scatter",mode:"lines",name:"G",line:{color:d,width:2,shape:"spline"}}),[c,w,d]),v=m.useMemo(()=>({x:c,y:C,type:"scatter",mode:"lines",name:"C",line:{color:f,width:2,shape:"spline"}}),[c,C,f]),M=m.useMemo(()=>Math.max(...y,...x,...w,...C),[y,x,w,C]);if(m.useEffect(()=>{if(!u.current||e.length===0)return;const h=[S,_,b,v],k={width:a,height:o-Cr,margin:{l:0,r:0,b:20,t:10,pad:0},paper_bgcolor:l.paperBg,plot_bgcolor:l.plotBg,font:{family:"Inter, sans-serif"},showlegend:!1,xaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,showline:!1,range:[Math.min(...c),Math.max(...c)],fixedrange:!0},yaxis:{showgrid:!1,zeroline:!1,showticklabels:!1,showline:!1,range:[0,M*Nr],fixedrange:!0}},z={responsive:!0,displayModeBar:!1,displaylogo:!1,fillFrame:!0};V.newPlot(u.current,h,k,z);const A=u.current;return()=>{A&&V.purge(A)}},[e,a,o,S,_,b,v,M,c,l]),e.length===0)return t.jsx("div",{className:"chart-container",children:"No data available"});const g=()=>{const h=()=>{const z=Math.min(...c),A=Math.max(...c),I=a;return t.jsx("div",{className:"sequence-letters-container",children:j.map((D,R)=>{const O=c[R],K=D==="A"?n:D==="T"?i:D==="G"?d:D==="C"?f:l.textColor,W=(O-z)/(A-z)*I;return t.jsx("span",{className:"sequence-letter",style:{left:`${W}px`,color:K},children:D},`base-${R}`)})})},k=()=>{const z=Math.min(...c),A=Math.max(...c),I=a,D=Math.ceil(z/r)*r,R=[];for(let O=D;O<=A;O+=r)R.push({position:O,label:O.toString()});return t.jsx("div",{className:"position-numbers-container",children:R.map(O=>{const Z=(O.position-z)/(A-z)*I;return t.jsx("span",{className:"position-number",style:{left:`${Z}px`},children:O.label},`pos-${O.position}`)})})};return t.jsxs("div",{className:"sequence-header",children:[h(),k()]})};return t.jsxs("div",{className:"chromatogram-container",style:{width:a,height:o},children:[g(),t.jsx("div",{className:"chromatogram-chart",children:t.jsx("div",{ref:u,style:{width:"100%",height:"100%"}})})]})},T=(e,a)=>{if(typeof window<"u")return getComputedStyle(document.documentElement).getPropertyValue("--"+e).trim()||a||"";const o=a?", "+a:"";return"var(--"+e+o+")"},P={BLACK_50:T("black-50","rgba(26, 26, 26, 0.05)"),BLACK_100:T("black-100","rgba(26, 26, 26, 0.1)"),BLACK_200:T("black-200","rgba(26, 26, 26, 0.2)"),BLACK_300:T("black-300","rgba(26, 26, 26, 0.3)"),BLACK_400:T("black-400","rgba(26, 26, 26, 0.4)"),BLACK_500:T("black-500","rgba(26, 26, 26, 0.5)"),BLACK_600:T("black-600","rgba(26, 26, 26, 0.6)"),BLACK_700:T("black-700","rgba(26, 26, 26, 0.7)"),BLACK_800:T("black-800","rgba(26, 26, 26, 0.8)"),BLACK_900:T("black-900","rgba(26, 26, 26, 1)"),BLACK:T("black-900","#1a1a1a"),WHITE_50:T("white-50","rgba(255, 255, 255, 0.05)"),WHITE_100:T("white-100","rgba(255, 255, 255, 0.1)"),WHITE_200:T("white-200","rgba(255, 255, 255, 0.2)"),WHITE_300:T("white-300","rgba(255, 255, 255, 0.3)"),WHITE_400:T("white-400","rgba(255, 255, 255, 0.4)"),WHITE_500:T("white-500","rgba(255, 255, 255, 0.5)"),WHITE_600:T("white-600","rgba(255, 255, 255, 0.6)"),WHITE_700:T("white-700","rgba(255, 255, 255, 0.7)"),WHITE_800:T("white-800","rgba(255, 255, 255, 0.8)"),WHITE_900:T("white-900","rgba(255, 255, 255, 1)"),WHITE:T("white-900","#ffffff"),BLUE_50:T("blue-50","rgba(240, 249, 255, 1)"),BLUE_100:T("blue-100","rgba(225, 243, 254, 1)"),BLUE_200:T("blue-200","rgba(185, 229, 252, 1)"),BLUE_300:T("blue-300","rgba(125, 211, 251, 1)"),BLUE_400:T("blue-400","rgba(58, 190, 247, 1)"),BLUE_500:T("blue-500","rgba(27, 173, 240, 1)"),BLUE_600:T("blue-600","rgba(64, 114, 210, 1)"),BLUE_700:T("blue-700","rgba(3, 105, 159, 1)"),BLUE_800:T("blue-800","rgba(5, 69, 103, 1)"),BLUE_900:T("blue-900","rgba(4, 38, 63, 1)"),BLUE:T("graph-primary-blue","#2D9CDB"),GREY_50:T("grey-50","rgba(248, 250, 252, 1)"),GREY_100:T("grey-100","rgba(241, 245, 249, 1)"),GREY_200:T("grey-200","rgba(225, 231, 239, 1)"),GREY_300:T("grey-300","rgba(200, 214, 229, 1)"),GREY_400:T("grey-400","rgba(158, 172, 192, 1)"),GREY_500:T("grey-500","rgba(100, 116, 139, 1)"),GREY_600:T("grey-600","rgba(72, 86, 106, 1)"),GREY_700:T("grey-700","rgba(51, 65, 86, 1)"),GREY_800:T("grey-800","rgba(29, 40, 57, 1)"),GREY_900:T("grey-900","rgba(20, 30, 53, 1)"),GREY:T("grey-400","#CCCCCC"),ORANGE:T("graph-primary-orange","#FFA62E"),RED:T("graph-primary-red","#FF5C64"),GREEN:T("graph-primary-green","#A5C34E"),YELLOW:T("graph-primary-yellow","#FBED53"),PURPLE:T("graph-primary-purple","#7A51AB"),GREEN_BG:T("green-bg","rgba(234, 254, 229, 1)"),GREEN_SUCCESS:T("green-success","rgba(8, 173, 55, 1)"),ORANGE_BG:T("orange-bg","rgba(254, 250, 229, 1)"),ORANGE_CAUTION:T("orange-caution","rgba(249, 173, 20, 1)"),RED_BG:T("red-bg","rgba(254, 234, 229, 1)"),RED_ERROR:T("red-error","rgba(216, 35, 44, 1)"),GRAPH_SECONDARY_BROWN:T("graph-secondary-brown","#AD7942"),GRAPH_SECONDARY_PINK:T("graph-secondary-pink","#FB90B4"),GRAPH_SECONDARY_TEAL:T("graph-secondary-teal","#3CCABA"),GRAPH_SECONDARY_DARK_BLUE:T("graph-secondary-dark-blue","#4072D2"),GRAPH_SECONDARY_BLACK:T("graph-secondary-black","#424E62"),GRAPH_SECONDARY_GREY:T("graph-secondary-grey","#B4B4B4")},Me=[P.ORANGE,P.RED,P.GREEN,P.BLUE,P.YELLOW,P.PURPLE,P.GRAPH_SECONDARY_BROWN,P.GRAPH_SECONDARY_PINK,P.GRAPH_SECONDARY_TEAL,P.GRAPH_SECONDARY_DARK_BLUE,P.GRAPH_SECONDARY_BLACK,P.GRAPH_SECONDARY_GREY],ke={MARGIN_LEFT:70,MARGIN_RIGHT:30,MARGIN_BOTTOM:60,MARGIN_TOP_WITH_TITLE:50,MARGIN_TOP_NO_TITLE:30,MARGIN_PAD:5},la={USER_ANNOTATION_FONT_SIZE:11,AUTO_ANNOTATION_FONT_SIZE:10},xt={default:{ax:0,ay:-35},overlap:[{ax:50,ay:-35},{ax:-60,ay:-35},{ax:70,ay:-55},{ax:-80,ay:-55},{ax:50,ay:-75},{ax:-60,ay:-75}]};function _r(e,a){const o=[...e].sort((i,d)=>i.peak.x-d.peak.x),r=[];let n=[];for(const i of o){if(n.length===0){n.push(i);continue}const d=n[n.length-1];Math.abs(i.peak.x-d.peak.x)<a?n.push(i):(r.push(n),n=[i])}return n.length>0&&r.push(n),r}function da(e,a,o){const r=a===-1,n=r?P.GREY_500:Me[a%Me.length],i=r?P.BLACK_900:n,d=e.text??(e._computed?.area===void 0?"":`Area: ${e._computed.area.toFixed(2)}`),f=r&&e.ax!==void 0?e.ax:o.ax,u=r&&e.ay!==void 0?e.ay:o.ay;return{x:e.x,y:e.y,text:d,showarrow:!0,arrowhead:2,arrowsize:1,arrowwidth:1,arrowcolor:n,ax:f,ay:u,font:{size:r?la.USER_ANNOTATION_FONT_SIZE:la.AUTO_ANNOTATION_FONT_SIZE,color:i,family:"Inter, sans-serif"},bgcolor:P.WHITE,borderpad:2,bordercolor:r?void 0:n,borderwidth:r?0:1}}function Sr(e){if(e.length===1){const{peak:o,seriesIndex:r}=e[0];return[da(o,r,xt.default)]}return[...e].sort((o,r)=>o.peak.y-r.peak.y).map(({peak:o,seriesIndex:r},n)=>{const i=xt.overlap[n%xt.overlap.length];return da(o,r,i)})}const zr=-5,Ir=-12,ca=-16;function ua(e,a,o,r){return o==="none"?[]:[{x:[e],y:[a],type:"scatter",mode:"markers",marker:{symbol:o==="diamond"?"diamond":"triangle-up",size:8,color:r},showlegend:!1,hoverinfo:"skip"}]}function Ar(e){const a=[];for(const{peaks:o,seriesIndex:r,x:n}of e){const i=Me[r%Me.length],d=zr+r*ca,f=Ir+r*ca;for(const u of o){const l=u._computed?.startIndex??0,c=u._computed?.endIndex??0,j=n[l],y=n[c],x=u.startMarker??"triangle",w=u.endMarker??"diamond";a.push(...ua(j,d,x,i)),a.push(...ua(y,f,w,i))}}return a}function Tr(e,a,o){let r=e[a],n=e[a];for(let i=a-1;i>=Math.max(0,a-o);i--)r=Math.min(r,e[i]);for(let i=a+1;i<Math.min(e.length,a+o);i++)n=Math.min(n,e[i]);return e[a]-Math.max(r,n)}function Dr(e,a){let o=a,r=a;for(let n=a-1;n>=0&&e[n]<=e[n+1];n--)o=n;for(let n=a+1;n<e.length&&e[n]<=e[n-1];n++)r=n;return{startIndex:o,endIndex:r}}function Ra(e,a,o,r){const n=Math.min(a[o],a[r]);let i=0;for(let d=o;d<r;d++){const f=e[d+1]-e[d],u=a[d]-n,l=a[d+1]-n;i+=(u+l)*f/2}return i}function Er(e,a,o,r,n){const i=Math.min(a[r],a[n]),d=(a[o]+i)/2;let f=o,u=o;for(let l=o;l>=r;l--)if(a[l]<d){f=l;break}for(let l=o;l<=n;l++)if(a[l]<d){u=l;break}return e[u]-e[f]}function Rr(e,a){const o=[];for(const r of e)o.some(i=>Math.abs((i._computed?.index??0)-(r._computed?.index??0))<a)?o.length>0&&r.y>o[o.length-1].y&&(o.pop(),o.push(r)):o.push(r);return o.sort((r,n)=>r.x-n.x)}function Lr(e,a,o={}){const{minHeight:r=.05,minDistance:n=5,prominence:i=.02,relativeThreshold:d=!0}=o;if(a.length<3)return[];const f=Math.max(...a),u=d?r*f:r,l=d?i*f:i,c=n*3,j=[];for(let y=1;y<a.length-1;y++){if(!(a[y]>a[y-1]&&a[y]>a[y+1]&&a[y]>=u)||Tr(a,y,c)<l)continue;const{startIndex:C,endIndex:S}=Dr(a,y),_=Ra(e,a,C,S),b=Er(e,a,y,C,S);j.push({x:e[y],y:a[y],_computed:{area:_,index:y,startIndex:C,endIndex:S,widthAtHalfMax:b}})}return Rr(j,n)}function ht(e,a){if(e.length===0||e.length===1)return 0;let o=0,r=e.length-1;for(;o<r;){const n=Math.floor((o+r)/2);e[n]<a?o=n+1:r=n}return o>0&&Math.abs(e[o-1]-a)<Math.abs(e[o]-a)?o-1:o}function Or(e,a,o){return e.map(r=>{if(r.startX!==void 0&&r.endX!==void 0){const n=ht(a,r.startX),i=ht(a,r.endX),d=ht(a,r.x),f=r._computed?.area??Ra(a,o,n,i);return{...r,_computed:{...r._computed,index:d,startIndex:n,endIndex:i,area:f}}}return r})}function Pr(e,a,o){const r=[];e.forEach(({peaks:i,seriesIndex:d})=>{r.push({peaks:i,seriesIndex:d,x:o[d].x,y:o[d].y})});const n=a.filter(i=>i._computed?.startIndex!==void 0&&i._computed?.endIndex!==void 0);return n.length>0&&o.length>0&&r.push({peaks:n,seriesIndex:0,x:o[0].x,y:o[0].y}),r}function Gr(e,a){if(!a)return e;const o=[];for(const[r,n]of Object.entries(a))if(n!=null&&n!==""){const i=r.replace(/([A-Z])/g," $1").replace(/^./,d=>d.toUpperCase()).trim();o.push(`${i}: ${String(n)}`)}return o.length>0?`${e}<br>${o.join("<br>")}`:e}function Br(e,a){const o=Math.min(e.length,a.length),r=e.slice(0,o),i=a.slice(0,o).map(f=>Number.isFinite(f)?f:0);return{x:r.map(f=>Number.isFinite(f)?f:0),y:i}}function Ur(e,a,o=50){if(a==="none"||e.length===0)return e;if(a==="linear"){if(e.length===1)return[0];const r=(e[e.length-1]-e[0])/(e.length-1);return e.map((n,i)=>n-(e[0]+r*i))}if(a==="rolling"){const r=[],n=Math.floor(o/2);for(let i=0;i<e.length;i++){const d=Math.max(0,i-n),f=Math.min(e.length,i+n+1),u=e.slice(d,f);r.push(Math.min(...u))}return e.map((i,d)=>i-r[d])}return e}const Hr=({series:e,width:a=900,height:o=500,title:r,xAxisTitle:n="Retention Time (min)",yAxisTitle:i="Signal (mAU)",annotations:d=[],xRange:f,yRange:u,showLegend:l=!0,showGridX:c=!0,showGridY:j=!0,showMarkers:y=!1,markerSize:x=4,showCrosshairs:w=!1,baselineCorrection:C="none",baselineWindowSize:S=50,peakDetectionOptions:_,showPeakAreas:b=!1,boundaryMarkers:v="none",annotationOverlapThreshold:M=.4,showExportButton:g=!0})=>{const h=_!==void 0,k=m.useRef(null),z=le(),A=m.useMemo(()=>e.map(R=>{const O=Br(R.x,R.y);return{...R,x:O.x,y:Ur(O.y,C,S)}}),[e,C,S]),I=m.useMemo(()=>{if(d.length===0||A.length===0)return d;const{x:R,y:O}=A[0];return Or(d,R,O)},[d,A]),D=m.useMemo(()=>{const R=[];return h&&_&&A.forEach((O,K)=>{const Z=Lr(O.x,O.y,_);Z.length>0&&R.push({peaks:Z,seriesIndex:K})}),R},[A,h,_]);return m.useEffect(()=>{const R=k.current;if(!R||e.length===0)return;const O=A.map((B,Q)=>{const ee=B.color||Me[Q%Me.length],ye=Gr(B.name,B.metadata),ge={x:B.x,y:B.y,type:"scatter",mode:y?"lines+markers":"lines",name:B.name,line:{color:ee,width:1.5},hovertemplate:`%{x:.2f} ${n}<br>%{y:.2f} ${i}<extra>${ye}</extra>`};return y&&(ge.marker={size:x,color:ee}),ge});if(v!=="none"){const B=Pr(D,I,A);if(B.length>0){const Q=Ar(B);O.push(...Q)}}const K=[];I.forEach(B=>{K.push({peak:B,seriesIndex:-1})}),b&&h&&D.forEach(({peaks:B,seriesIndex:Q})=>{B.forEach(ee=>{K.push({peak:ee,seriesIndex:Q})})});const Z=_r(K,M),W=[];for(const B of Z)W.push(...Sr(B));const X={title:r?{text:r,font:{size:20,family:"Inter, sans-serif",color:z.textColor}}:void 0,width:a,height:o,margin:{l:ke.MARGIN_LEFT,r:ke.MARGIN_RIGHT,b:ke.MARGIN_BOTTOM,t:r?ke.MARGIN_TOP_WITH_TITLE:ke.MARGIN_TOP_NO_TITLE,pad:ke.MARGIN_PAD},paper_bgcolor:z.paperBg,plot_bgcolor:z.plotBg,font:{family:"Inter, sans-serif"},hovermode:w?"x":"x unified",dragmode:"zoom",xaxis:{title:{text:n,font:{size:14,color:z.textSecondary,family:"Inter, sans-serif"},standoff:15},showgrid:c,gridcolor:z.gridColor,linecolor:z.lineColor,linewidth:1,range:f,autorange:!f,zeroline:!1,tickfont:{size:12,color:z.textColor,family:"Inter, sans-serif"},showspikes:w,spikemode:"across",spikesnap:"cursor",spikecolor:z.spikeColor,spikethickness:1,spikedash:"dot"},yaxis:{title:{text:i,font:{size:14,color:z.textSecondary,family:"Inter, sans-serif"},standoff:10},showgrid:j,gridcolor:z.gridColor,linecolor:z.lineColor,linewidth:1,range:u,autorange:!u,zeroline:!1,tickfont:{size:12,color:z.textColor,family:"Inter, sans-serif"},showspikes:w,spikemode:"across",spikesnap:"cursor",spikecolor:z.spikeColor,spikethickness:1,spikedash:"dot"},legend:{x:.5,y:-.15,xanchor:"center",yanchor:"top",orientation:"h",font:{size:12,color:z.textColor,family:"Inter, sans-serif"}},showlegend:l&&e.length>1,annotations:W},J={responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToRemove:["lasso2d","select2d",...g?[]:["toImage"]],...g&&{toImageButtonOptions:{format:"png",filename:"chromatogram",width:a,height:o}}};return V.newPlot(R,O,X,J),()=>{R&&V.purge(R)}},[A,D,e.length,a,o,r,n,i,I,f,u,l,c,j,y,x,w,h,_,b,v,M,g,z]),t.jsx("div",{className:"chromatogram-chart-container",children:t.jsx("div",{ref:k,style:{width:"100%",height:"100%"}})})},Fr=({dataSeries:e,width:a=1e3,height:o=600,title:r="Dot Plot",xTitle:n="Columns",yTitle:i="Rows",variant:d="default",markerSize:f=8})=>{const u=m.useRef(null),l=le(),c=m.useMemo(()=>Array.isArray(e)?e:[e],[e]),j=m.useMemo(()=>[P.ORANGE,P.RED,P.GREEN,P.BLUE,P.YELLOW,P.PURPLE],[]),y=m.useMemo(()=>["circle","square","diamond","triangle-up","triangle-down","star"],[]),x=m.useMemo(()=>c.map((b,v)=>d==="default"?{...b,color:b.color||j[0],symbol:"circle",size:b.size||f}:{...b,color:b.color||j[v%j.length],symbol:b.symbol||y[v%y.length],size:b.size||f}),[c,d,f,j,y]),w=l.gridColor,C=m.useMemo(()=>x.map(b=>({type:"scatter",x:b.x,y:b.y,mode:"markers",name:b.name,marker:{color:b.color,size:b.size,symbol:b.symbol,line:{color:l.paperBg,width:1}},hovertemplate:`${n}: %{x}<br>${i}: %{y}<extra>${b.name}</extra>`})),[x,n,i,l]),S=m.useMemo(()=>({tickcolor:l.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:l.textColor,family:"Inter, sans-serif",weight:400},linecolor:l.lineColor,linewidth:1,position:0,zeroline:!1}),[l]),_=m.useMemo(()=>({text:r,x:.5,y:.95,xanchor:"center",yanchor:"top",font:{size:32,weight:600,family:"Inter, sans-serif",color:l.textColor,lineheight:1.2,standoff:30}}),[r,l]);return m.useEffect(()=>{if(!u.current)return;const b={width:a,height:o,font:{family:"Inter, sans-serif"},title:_,margin:{l:80,r:40,b:80,t:80,pad:0},showlegend:!0,legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:13,color:l.legendColor,family:"Inter, sans-serif",weight:500,lineheight:18}},xaxis:{title:{text:n,font:{size:16,color:l.textSecondary,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:w,...S},yaxis:{title:{text:i,font:{size:16,color:l.textSecondary,family:"Inter, sans-serif",weight:400},standoff:15},gridcolor:w,...S},paper_bgcolor:l.paperBg,plot_bgcolor:l.plotBg},v={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(u.current,C,b,v);const M=u.current;return()=>{M&&V.purge(M)}},[a,o,n,i,C,_,S,w,l]),t.jsx("div",{className:"dotplot-container",style:{width:a},children:t.jsx("div",{ref:u,style:{width:"100%",height:"100%",margin:"0"}})})},La="96",$r="384",Vr="1536",Yr="custom",Wr={sample:"#4575b4",control:"#d73027",empty:"#f0f0f0"},qr={[La]:{rows:8,columns:12},[$r]:{rows:16,columns:24},[Vr]:{rows:32,columns:48}},Kr=[[0,"#313695"],[.1,"#4575b4"],[.2,"#74add1"],[.3,"#abd9e9"],[.4,"#e0f3f8"],[.5,"#ffffbf"],[.6,"#fee090"],[.7,"#fdae61"],[.8,"#f46d43"],[.9,"#d73027"],[1,"#a50026"]],bt={textDark:"#333",regionBorder:"#000",emptyWell:"#f0f0f0"},Xr={Viridis:[[0,"#440154"],[.25,"#414487"],[.5,"#2a788e"],[.75,"#22a884"],[1,"#7ad151"]],Blues:[[0,"#f7fbff"],[.25,"#c6dbef"],[.5,"#6baed6"],[.75,"#2171b5"],[1,"#08306b"]],RdBu:[[0,"#67001f"],[.25,"#d6604d"],[.5,"#f7f7f7"],[.75,"#4393c3"],[1,"#053061"]],Greens:[[0,"#f7fcf5"],[.25,"#c7e9c0"],[.5,"#74c476"],[.75,"#238b45"],[1,"#00441b"]],Reds:[[0,"#fff5f0"],[.25,"#fcbba1"],[.5,"#fb6a4a"],[.75,"#cb181d"],[1,"#67000d"]],Greys:[[0,"#ffffff"],[.25,"#d9d9d9"],[.5,"#969696"],[.75,"#525252"],[1,"#000000"]],Hot:[[0,"#000000"],[.33,"#e60000"],[.66,"#ffff00"],[1,"#ffffff"]],YlGnBu:[[0,"#ffffd9"],[.25,"#c7e9b4"],[.5,"#41b6c4"],[.75,"#225ea8"],[1,"#081d58"]],YlOrRd:[[0,"#ffffcc"],[.25,"#fed976"],[.5,"#fd8d3c"],[.75,"#e31a1c"],[1,"#800026"]],Plasma:[[0,"#0d0887"],[.25,"#7e03a8"],[.5,"#cc4778"],[.75,"#f89540"],[1,"#f0f921"]]},$={MAX_RANDOM_VALUE:5e4,SENTINEL_RATIO:.01,COLOR_SCALE_THRESHOLD:.99,COLOR_SCALE_EPSILON:.001,MULTI_VALUE_PRIMARY_RATIO:.575,MULTI_VALUE_SECONDARY_RATIO:.425,FONT_SIZE_LARGE:11,LABEL_CENTER_OFFSET:-.5,MARGIN_TOP:70,MARGIN_RIGHT:50,MARGIN_BOTTOM:40,MARGIN_LEFT:80,COLORBAR_LENGTH:130,DOMAIN_COLORBAR_OFFSET:.15,DOMAIN_COLORBAR_END:.85},it=65,Ct=26;function Zr(e){return Array.from({length:e},(a,o)=>o<Ct?String.fromCharCode(it+o):"A"+String.fromCharCode(it+(o-Ct)))}function Jr(e){return Array.from({length:e},(a,o)=>o+1)}function Nt(e){const a=e.match(/^([A-Z]{1,2})(\d{1,2})$/i);if(!a)return null;const o=a[1].toUpperCase(),r=o.length===1?o.charCodeAt(0)-it:Ct+(o.charCodeAt(1)-it),n=parseInt(a[2],10)-1;return{row:r,col:n}}function Qr(e,a,o){if(!e)return!1;const{row:r,col:n}=e;return r>=0&&n>=0&&r<a&&n<o}function en(e,a){if(!e)return null;const o=a??Object.keys(e)[0];return o?e[o]:null}function tn(e,a,o,r,n){typeof e=="number"?r[a][o]=e:typeof e=="string"&&(n[a][o]=e)}function an(e,a,o,r){const n=Array.from({length:a},()=>Array(o).fill(null)),i=Array.from({length:a},()=>Array(o).fill(null)),d=new Map,f=new Map;for(const u of e){const l=Nt(u.wellId);if(!Qr(l,a,o))continue;const c=u.wellId.toUpperCase();u.values&&d.set(c,u.values),u.tooltipData&&f.set(c,u.tooltipData);const j=en(u.values,r);tn(j,l.row,l.col,n,i)}return{grid:n,categories:i,allValues:d,tooltipData:f}}function on(e){let a=1/0,o=-1/0;for(const r of e)for(const n of r)n!==null&&Number.isFinite(n)&&(a=Math.min(a,n),o=Math.max(o,n));return Number.isFinite(a)||(a=0),Number.isFinite(o)||(o=1),a===o&&(o=a+1),{min:a,max:o}}function rn(e){return e.some(a=>a.values&&Object.keys(a.values).length>0)}function nn(e){const a=new Set;for(const o of e)o.values&&Object.keys(o.values).forEach(r=>a.add(r));return[...a]}function sn(e,a){for(const o of e)if(typeof o.values?.[a]=="string")return!0;return!1}function ln(e,a){return nn(e).map(r=>{const n=a?.find(d=>d.id===r),i=sn(e,r);return{id:r,name:n?.name??r,visualizationMode:n?.visualizationMode??(i?"categorical":void 0),colorScale:n?.colorScale,valueMin:n?.valueMin,valueMax:n?.valueMax,valueUnit:n?.valueUnit,categoryColors:n?.categoryColors}})}function dn(e,a,o){const r=e.match(/^([A-Z]{1,2})(\d{1,2}):([A-Z]{1,2})(\d{1,2})$/i);if(!r)return null;const n=Nt(`${r[1]}${r[2]}`),i=Nt(`${r[3]}${r[4]}`),d=Math.min(n.row,i.row),f=Math.max(n.row,i.row),u=Math.min(n.col,i.col),l=Math.max(n.col,i.col),c=a.length,j=o.length;return d>=c||f>=c||u>=j||l>=j?null:{minRow:d,maxRow:f,minCol:u,maxCol:l}}function cn({wellId:e,value:a,allValues:o,tooltipExtra:r,activeLayerId:n,layerConfigMap:i,precision:d,valueUnit:f}){let u=`Well ${e}`;return o?u+=un(o,n,i,d):a!==null?u+=`<br>Value: ${a.toFixed(d)}${f}`:n?u+=`<br>▶ ${n}: -`:u+="<br>No data",r&&(u+=pn(r)),u}function un(e,a,o,r){let n="";for(const[i,d]of Object.entries(e)){const u=i===a?"▶ ":"",l=o.get(i)?.valueUnit,c=l?` ${l}`:"";d===null?n+=`<br>${u}${i}: -`:typeof d=="number"?n+=`<br>${u}${i}: ${d.toFixed(r)}${c}`:n+=`<br>${u}${i}: ${d.charAt(0).toUpperCase()+d.slice(1)}`}return n}function pn(e){let a="";for(const[o,r]of Object.entries(e))a+=`<br>${o}: ${String(r)}`;return a}function mn(e,a,o){const r=o?{text:o}:void 0;switch(e){case"bottom":return{orientation:"h",thickness:20,len:.75,outlinewidth:0,ticksuffix:a,y:-.15,yanchor:"top",x:.5,xanchor:"center",title:r?{...r,side:"top"}:void 0};case"top":return{orientation:"h",thickness:20,len:.75,outlinewidth:0,ticksuffix:a,y:1.15,yanchor:"bottom",x:.5,xanchor:"center",title:r?{...r,side:"bottom"}:void 0};case"left":return{thickness:28,len:1,outlinewidth:0,ticksuffix:a,y:.5,yanchor:"middle",x:-.15,xanchor:"right",title:r?{...r,side:"right"}:void 0};default:return{thickness:20,len:.9,outlinewidth:0,ticksuffix:a,x:.88,xanchor:"left",y:.5,yanchor:"middle",title:r?{...r,side:"right"}:void 0}}}function fn(e,a,o){const r=o?$.MARGIN_TOP:$.MARGIN_RIGHT,n=$.MARGIN_RIGHT,i=e==="left"?r+$.MARGIN_RIGHT:r,d=e==="right"?n+$.MARGIN_RIGHT:n,f=e==="bottom"?$.MARGIN_LEFT:$.MARGIN_RIGHT;let u;return a?u=e==="top"?$.COLORBAR_LENGTH:100:u=e==="top"?$.MARGIN_TOP:$.MARGIN_BOTTOM,{l:i,r:d,b:f,t:u,pad:5}}function gn(e){switch(e){case"left":return $.MULTI_VALUE_PRIMARY_RATIO;case"right":return $.MULTI_VALUE_SECONDARY_RATIO;default:return .5}}function xn(e){switch(e){case"left":return[$.DOMAIN_COLORBAR_OFFSET,1];case"right":return[0,$.DOMAIN_COLORBAR_END];default:return[0,1]}}function hn(e,a,o,r,n,i){const d=[],f=[],u=[],l=[];for(let c=0;c<r;c++)for(let j=0;j<n;j++){d.push(j+1),f.push(a[c]);const y=e[c][j];u.push(y??i),l.push(o[c][j])}return{xData:d,yData:f,colorData:u,textData:l}}const bn=4,vn=1,jn=.8,pa=100;function wn(e,a,o,r,n,i,d){const f=d?$.MARGIN_TOP:$.MARGIN_RIGHT,u=pa,l=i?pa:$.MARGIN_BOTTOM,c=$.MARGIN_RIGHT,j=e-f-u,y=a-l-c,x=j/r,w=y/o,C=n==="square"?Math.max(x,w):Math.min(x,w);return Math.max(bn,C*(n==="square"?vn:jn))}const Oa=({data:e,layerConfigs:a,initialLayerId:o,onLayerChange:r,plateFormat:n=La,rows:i,columns:d,visualizationMode:f="heatmap",categoryColors:u,regions:l,title:c,xTitle:j,yTitle:y,xLabels:x,yLabels:w,colorScale:C=Kr,valueMin:S,valueMax:_,emptyWellColor:b=bt.emptyWell,showColorBar:v=!0,showLegend:M=!0,legendConfig:g,width:h=800,height:k=500,precision:z=0,markerShape:A="circle",onWellClick:I})=>{const D=m.useRef(null),R=le(),O=m.useRef(I);O.current=I;const[K,Z]=m.useState(o);let W,X;if(n===Yr)W=i??8,X=d??12;else{const E=qr[n];W=E.rows,X=E.columns}const J=m.useMemo(()=>{if(Array.isArray(e)&&e.length>0&&"wellId"in e[0]){const E=e;if(rn(E))return ln(E,a)}return null},[e,a]),B=m.useMemo(()=>!J||J.length===0?null:K?J.find(E=>E.id===K)??J[0]:J[0],[J,K]),Q=B?.visualizationMode??f,ee=B?.colorScale??C,ye=B?.valueMin??S,ge=B?.valueMax??_,ae=B?.valueUnit?` ${B.valueUnit}`:"",oe=m.useMemo(()=>({...Wr,...u,...B?.categoryColors}),[u,B?.categoryColors]),Ce=B?.id,{grid:me,categoriesGrid:xe,allValuesMap:ue,tooltipDataMap:Ne}=m.useMemo(()=>{let E,G=Array.from({length:W},()=>Array(X).fill(null)),F=new Map,Y=new Map;if(Array.isArray(e)&&e.length>0){const U=an(e,W,X,Ce);E=U.grid,G=U.categories,F=U.allValues,Y=U.tooltipData}else E=Array.from({length:W},()=>Array.from({length:X},()=>Math.random()*$.MAX_RANDOM_VALUE));return{grid:E,categoriesGrid:G,allValuesMap:F,tooltipDataMap:Y}},[e,W,X,Ce]),pe=w??Zr(W),de=x??Jr(X),We=on(me),Se=ye??We.min,ze=ge??We.max,qe=me.some(E=>E.includes(null)),Ie=Se-(ze-Se)*$.SENTINEL_RATIO-1,Yt=qe?me.map(E=>E.map(G=>G===null?Ie:G)):me,Wt=m.useMemo(()=>{if(!qe)return ee;let E;if(typeof ee=="string"){const U=Xr[ee];if(U)E=U;else return ee}else E=ee;const G=ze-Ie,F=(Se-Ie)/G,Y=[[0,b],[F*$.COLOR_SCALE_THRESHOLD,b]];for(const[U,re]of E){const se=F+U*(1-F);Y.push([se,re])}return Y},[ee,qe,Se,ze,Ie,b]),qt=qe?Ie:Se,uo=m.useMemo(()=>{const E=new Map;if(J)for(const G of J)E.set(G.id,G);return E},[J]),Kt=me.map((E,G)=>E.map((F,Y)=>{const U=`${pe[G]}${de[Y]}`,re=String(U).toUpperCase();return cn({wellId:U,value:F,allValues:ue.get(re),tooltipExtra:Ne.get(re),activeLayerId:B?.id,layerConfigMap:uo,precision:z,valueUnit:ae})})),{categoricalGrid:ct,categoricalColorScale:ut,uniqueTypes:pt,catMax:Xt}=m.useMemo(()=>{if(Q!=="categorical")return{categoricalGrid:null,categoricalColorScale:null,uniqueTypes:[],catMax:0};const E=new Set;let G=!1;for(const te of xe)for(const ie of te)ie?E.add(ie):G=!0;G&&E.add("empty");const F=[...E].sort(),Y=new Map;F.forEach((te,ie)=>Y.set(te,ie));const U=xe.map(te=>te.map(ie=>ie===null?Y.get("empty")??0:Y.get(ie)??Y.get("empty")??0)),re=F.length,se=[];if(re===1){const te=oe[F[0]]||b;se.push([0,te]),se.push([1,te])}else F.forEach((te,ie)=>{const Je=oe[te]||b,Qe=ie/(re-1),et=.5/(re-1),ft=Math.max(0,Qe-et),De=Math.min(1,Qe+et-$.COLOR_SCALE_EPSILON);se.push([ft,Je]),se.push([De,Je])});return{categoricalGrid:U,categoricalColorScale:se,uniqueTypes:F,catMax:re-1}},[Q,xe,oe,b]),Zt=m.useMemo(()=>{if(!l||l.length===0)return[];const E=[];for(const G of l){const F=dn(G.wells,pe,de);if(!F)continue;const Y=.49,U=F.minCol+1-Y,re=F.maxCol+1+Y,se=F.minRow-Y,te=F.maxRow+Y;E.push({type:"rect",xref:"x",yref:"y",x0:U,x1:re,y0:se,y1:te,line:{color:G.borderColor||bt.textDark,width:G.borderWidth??2},fillcolor:G.fillColor||"transparent",layer:"above"})}return E},[l,pe,de]);m.useEffect(()=>{const E=D.current;if(!E)return;const G=Q==="categorical",F=G&&ct?ct:Yt,Y=G&&ut?ut:Wt,U=G?0:qt,re=G?Xt||1:ze,se=G?!1:v,{xData:te,yData:ie,colorData:Je,textData:Qe}=hn(F,pe,Kt,W,X,U),et=wn(h,k,W,X,A,!!c,!!y),ft=[{x:te,y:ie,mode:"markers",type:"scatter",marker:{symbol:A,size:et,color:Je,colorscale:Y,cmin:U,cmax:re,showscale:se,colorbar:mn(g?.position??"right",ae,g?.title),line:{color:R.gridColor,width:1}},hoverinfo:"text",text:Qe}],De=g?.position??"right",xo={autosize:!1,title:c?{text:c,font:{family:"Inter, sans-serif",size:20,color:R.textSecondary},x:gn(De),xanchor:"center",y:.98,yanchor:"top"}:void 0,width:h,height:k,margin:fn(De,!!c,!!y),xaxis:{title:{text:j||"",font:{size:16,color:R.textSecondary,family:"Inter, sans-serif"},standoff:15},side:"top",fixedrange:!0,dtick:1,range:[.5,X+.5],automargin:!1,tickmode:"array",tickvals:Array.from({length:X},(gt,he)=>he+1),ticktext:de.map(String),tickangle:0,tickfont:{size:X>24?8:$.FONT_SIZE_LARGE},domain:xn(De)},yaxis:{title:{text:y||"",font:{size:16,color:R.textSecondary,family:"Inter, sans-serif"},standoff:15},fixedrange:!0,dtick:1,range:[W+$.LABEL_CENTER_OFFSET,$.LABEL_CENTER_OFFSET],automargin:!1,tickmode:"array",tickvals:Array.from({length:W},(gt,he)=>he),ticktext:pe.map(String),tickfont:{size:W>16?8:$.FONT_SIZE_LARGE}},paper_bgcolor:R.paperBg,plot_bgcolor:R.plotBg,font:{family:"Inter, sans-serif",color:R.textSecondary},shapes:Zt},ho={responsive:!0,displayModeBar:!1,displaylogo:!1};return V.newPlot(E,ft,xo,ho),E.on("plotly_click",gt=>{if(!O.current)return;const he=gt.points[0];if(he){const ea=pe,ta=de,aa=ea.indexOf(he.y),oa=ta.indexOf(he.x);if(aa>=0&&oa>=0){const ra=`${ea[aa]}${ta[oa]}`,na=String(ra).toUpperCase(),bo=ue.get(na),vo=Ne.get(na),jo={wellId:ra,values:bo,tooltipData:vo};O.current?.(jo)}}}),()=>{E&&V.purge(E)}},[Yt,de,pe,Wt,v,qt,ze,ae,c,j,y,h,k,Kt,z,Ne,ue,me,Q,ct,ut,pt.length,Xt,Zt,W,X,g,A,R]);const po=()=>!J||J.length<=1?null:t.jsx("div",{className:"platemap-layer-selector",children:J.map(E=>{const G=B?.id===E.id;return t.jsx(L,{variant:G?"default":"outline",size:"sm",onClick:()=>{Z(E.id),r?.(E.id)},children:E.name},E.id)})}),Ae=g?.position??"right",mt=g?.fontSize??12,mo=g?.itemSpacing??4,Ke=g?.swatchSize??16,Jt=g?.title,Qt=120,Te=Ae==="top"||Ae==="bottom",fo=()=>{const E=Q==="categorical"&&pt.length>0,G=l&&l.length>0;if(!M||!E&&!G)return Te?null:t.jsx("div",{className:"platemap-legend-placeholder",style:{width:Qt}});const F=["platemap-legend"];Te?F.push("platemap-legend--horizontal"):Ae==="left"?F.push("platemap-legend--left"):Ae==="right"&&F.push("platemap-legend--right");const Y={gap:`${mo}px`,width:Te?void 0:Qt};return t.jsxs("div",{className:F.join(" "),style:Y,children:[Jt&&t.jsx("div",{className:`platemap-legend__title${Te?" platemap-legend__title--horizontal":""}`,style:{fontSize:`${mt}px`},children:Jt}),E&&pt.map(U=>t.jsxs("div",{className:"platemap-legend__item",children:[t.jsx("div",{className:"platemap-legend__swatch",style:{width:`${Ke}px`,height:`${Ke}px`,backgroundColor:oe[U]||b}}),t.jsx("span",{className:"platemap-legend__label platemap-legend__label--capitalize",style:{fontSize:`${mt}px`},children:U})]},U)),G&&l.map(U=>t.jsxs("div",{className:"platemap-legend__item",children:[t.jsx("div",{className:"platemap-legend__swatch platemap-legend__swatch--region",style:{width:`${Ke}px`,height:`${Ke}px`,backgroundColor:U.fillColor||"transparent",border:`${U.borderWidth||2}px solid ${U.borderColor||bt.regionBorder}`}}),t.jsx("span",{className:"platemap-legend__label",style:{fontSize:`${mt}px`},children:U.name})]},U.id))]})},Xe=t.jsx("div",{ref:D,className:"platemap-plot",style:{width:h,height:k}}),Ze=fo(),go=()=>{switch(Ae){case"left":return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--vertical",children:[Ze,Xe]});case"top":return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--horizontal",children:[Ze,Xe]});case"bottom":return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--horizontal",children:[Xe,Ze]});default:return t.jsxs("div",{className:"platemap-plot-wrapper platemap-plot-wrapper--vertical",children:[Xe,Ze]})}};return t.jsxs("div",{className:"platemap-container",style:{width:Te?void 0:h},children:[po(),go()]})};function yn(e){if(!e||e.length===0)return[];const a=Math.max(...e.map(o=>o.length));return e.map(o=>{if(o.length===a)return o;const r=[...o];for(;r.length<a;)r.push(0);return r})}const Cn=({data:e,xLabels:a,yLabels:o,title:r,xTitle:n,yTitle:i,colorscale:d,width:f=800,height:u=600,showScale:l=!0,precision:c=0,zmin:j,zmax:y,valueUnit:x=""})=>{const w=e?yn(e):void 0,C=w?.length??o?.length??16,S=w?.[0]?.length??a?.length??24,_=m.useMemo(()=>{if(!w)return;const v="ABCDEFGHIJKLMNOPQRSTUVWXYZ",M=[];for(let g=0;g<w.length;g++)for(let h=0;h<w[g].length;h++){const k=o?.[g]?.toString()??v[g]??`R${g+1}`,z=a?.[h]?.toString()??String(h+1),A=`${k}${z}`;M.push({wellId:A,values:{Value:w[g][h]}})}return M},[w,a,o]),b=d;return t.jsx(Oa,{data:_,plateFormat:"custom",rows:C,columns:S,title:r,xTitle:n,yTitle:i,xLabels:a,yLabels:o,colorScale:b,valueMin:j,valueMax:y,showColorBar:l,width:f,height:u,layerConfigs:[{id:"Value",valueUnit:x}],precision:c})},Nn=-.5,kn=e=>e.reduce((o,r)=>o+r,0)/e.length,Mn=(e,a)=>{const r=e.map(n=>Math.pow(n-a,2)).reduce((n,i)=>n+i,0)/e.length;return Math.sqrt(r)},_n=(e,a,o,r,n=100)=>{const i=[],d=[],f=(r-o)/(n-1);for(let u=0;u<n;u++){const l=o+u*f;i.push(l);const c=Nn*Math.pow((l-e)/a,2),j=1/(a*Math.sqrt(2*Math.PI))*Math.exp(c);d.push(j)}return{x:i,y:d}},Sn=(e,a,o)=>{const r=Math.ceil((o.end-o.start)/o.size),n=Array(r).fill(0);a.forEach(u=>{if(u>=o.start&&u<=o.end){const l=Math.floor((u-o.start)/o.size);n[l]++}});const i=Math.max(...n),d=Math.max(...e),f=i/d;return e.map(u=>u*f)},zn=({dataSeries:e,width:a=480,height:o=480,title:r="Histogram",xTitle:n="X Axis",yTitle:i="Frequency",bargap:d=.2,showDistributionLine:f=!1})=>{const u=m.useRef(null),l=le(),c=m.useMemo(()=>Array.isArray(e)?e:[e],[e]),j=m.useMemo(()=>c.length>1?"stack":void 0,[c.length]),y=m.useMemo(()=>[P.ORANGE,P.RED,P.BLUE,P.GREEN,P.PURPLE,P.YELLOW],[]),x=m.useMemo(()=>c.map((v,M)=>{const g=typeof v.showDistributionLine>"u"?f:v.showDistributionLine;return{...v,color:v.color||y[M%y.length],opacity:g?.5:v.opacity||1,showDistributionLine:g,lineWidth:v.lineWidth||3}}),[c,f,y]),w=l.gridColor,C=m.useMemo(()=>x.map(v=>({type:"histogram",x:v.x,name:v.name,marker:{color:v.color,line:{color:l.paperBg,width:1},opacity:v.opacity},autobinx:v.autobinx,xbins:v.xbins,hovertemplate:`${n}: %{x}<br>${i}: %{y}<extra>${v.name}</extra>`})),[x,n,i,l]),S=m.useMemo(()=>x.filter(v=>v.showDistributionLine).map(v=>{const M=kn(v.x),g=Mn(v.x,M),h=Math.min(...v.x),k=Math.max(...v.x),z=k-h,A=h-z*.1,I=k+z*.1,D=v.xbins||{start:A,end:I,size:z/10},R=_n(M,g,A,I,100),O=Sn(R.y,v.x,D);return{type:"scatter",x:R.x,y:O,mode:"lines",name:`${v.name} Distribution`,line:{color:v.color,width:v.lineWidth},hoverinfo:"none"}}),[x]),_=m.useMemo(()=>[...C,...S],[C,S]);m.useEffect(()=>{if(!u.current)return;const v={width:a,height:o,font:{family:"Inter, sans-serif"},showlegend:!1,margin:{l:90,r:40,b:80,t:40},xaxis:{title:{text:n,font:{size:16,color:l.textSecondary,family:"Inter, sans-serif",weight:400},standoff:20},gridcolor:w,tickcolor:l.tickColor,ticklen:8,tickwidth:1,ticks:"outside",linecolor:l.lineColor,linewidth:1,zeroline:!1},yaxis:{title:{text:i,font:{size:16,color:l.textSecondary,family:"Inter, sans-serif",weight:400},standoff:20},gridcolor:w,tickcolor:l.tickColor,ticklen:8,tickwidth:1,ticks:"outside",linecolor:l.lineColor,linewidth:1,zeroline:!1,rangemode:"tozero"},barmode:j,bargap:d,paper_bgcolor:l.paperBg,plot_bgcolor:l.plotBg},M={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(u.current,_,v,M);const g=u.current;return()=>{g&&V.purge(g)}},[a,o,n,i,d,_,j,w,l]);const b=({series:v})=>{const M=v.map((k,z)=>t.jsx(m.Fragment,{children:t.jsxs("div",{className:"legend-item",children:[t.jsx("span",{className:"color-box",style:{background:k.color}}),k.name,z<v.length-1&&t.jsx("span",{className:"divider"})]})},k.name)),g=[],h=6;for(let k=0;k<M.length;k+=h)g.push(t.jsx("div",{className:"legend-row",children:M.slice(k,k+h)},k));return t.jsx("div",{className:"legend-container",children:g})};return t.jsx("div",{className:"histogram-container",style:{width:a},children:t.jsxs("div",{className:"chart-container",children:[r&&t.jsx("div",{className:"title-container",children:t.jsx("h2",{className:"title",children:r})}),t.jsx("div",{ref:u,style:{width:"100%",height:"100%",margin:"0"}}),t.jsx(b,{series:x})]})})},In=({dataSeries:e,width:a=1e3,height:o=600,xRange:r,yRange:n,variant:i="lines",xTitle:d="Columns",yTitle:f="Rows",title:u="Line Graph"})=>{const l=m.useRef(null),c=le(),{yMin:j,yMax:y}=m.useMemo(()=>{let b=Number.MAX_VALUE,v=Number.MIN_VALUE,M=Number.MAX_VALUE,g=Number.MIN_VALUE;e.forEach(z=>{z.x.forEach(A=>{b=Math.min(b,A),v=Math.max(v,A)}),z.y.forEach(A=>{M=Math.min(M,A),g=Math.max(g,A)})});const h=(v-b)*.1,k=(g-M)*.1;return{xMin:b-h,xMax:v+h,yMin:M-k,yMax:g+k}},[e]),x=m.useMemo(()=>n||[j,y],[n,j,y]),w=m.useMemo(()=>{const b=x[1]-x[0];let v=Math.pow(10,Math.floor(Math.log10(b)));b/v>10&&(v=v*2),b/v<4&&(v=v/2);const M=[];let g=Math.ceil(x[0]/v)*v;for(;g<=x[1];)M.push(g),g+=v;return M},[x]),C=m.useMemo(()=>[...new Set(e.flatMap(b=>b.x))],[e]),S=m.useMemo(()=>{switch(i){case"lines+markers":case"lines+markers+error_bars":return"lines+markers";default:return"lines"}},[i]),_=m.useMemo(()=>({tickcolor:c.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:c.textColor,family:"Inter, sans-serif",weight:400},linecolor:c.lineColor,linewidth:1,position:0,zeroline:!1}),[c]);return m.useEffect(()=>{if(!l.current)return;const b=e.map(h=>({x:h.x,y:h.y,type:"scatter",mode:S,name:h.name,line:{color:h.color,width:1.5},marker:i==="lines"?{opacity:0}:{color:h.color,size:8,symbol:h.symbol||"triangle-up"},error_y:i==="lines+markers+error_bars"?h.error_y||{type:"data",array:h.y.map(()=>10),visible:!0,color:h.color,thickness:1,width:5}:void 0})),v={title:{text:u,font:{size:32,family:"Inter, sans-serif",color:c.textColor}},width:a,height:o,margin:{l:80,r:30,b:80,t:60,pad:10},paper_bgcolor:c.paperBg,plot_bgcolor:c.plotBg,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:d,font:{size:16,color:c.textSecondary,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:c.gridColor,range:r,autorange:!r,tickmode:"array",tickvals:C,ticktext:C.map(String),showgrid:!0,..._},yaxis:{title:{text:f,font:{size:16,color:c.textSecondary,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:c.gridColor,range:n,autorange:!n,tickmode:"array",tickvals:w,showgrid:!0,..._},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:c.legendColor,family:"Inter, sans-serif",weight:500}},showlegend:!0},M={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(l.current,b,v,M);const g=l.current;return()=>{g&&V.purge(g)}},[e,a,o,r,n,d,f,u,S,_,C,w,x,i,c]),t.jsx("div",{className:"chart-container",children:t.jsx("div",{ref:l,style:{width:"100%",height:"100%"}})})},An=3e3,Tn=`protocolSchema: v3
|
|
7
|
+
name: v3
|
|
8
|
+
description: No description
|
|
9
|
+
config: {}
|
|
10
|
+
steps: []`,Dn=()=>{const e=["v0.0.7","v0.0.6","v0.0.5"],[a,o]=m.useState(Tn),[r,n]=m.useState(e[0]),[i,d]=m.useState(!0),[f,u]=m.useState(!1),l=()=>{u(!0),be.toast.info("Building Protocol: Status=IN_PROGRESS, Phase=FINALIZING"),setTimeout(()=>{Math.random()>.3?be.toast.success(`Pipeline visual-pipeline-builder-protocol-${r}-pipeline deployed successfully! Deployment complete`):be.toast.error(`Failed to deploy pipeline visual-pipeline-builder-protocol-${r}-pipeline. Please try again.`),u(!1)},An)};return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h1",{className:"m-0",children:"Launch"}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(we,{htmlFor:"overwrite-switch",children:"Overwrite Mode"}),t.jsx(_e,{checked:i,onCheckedChange:d,disabled:f}),t.jsx(ce,{orientation:"vertical"}),t.jsxs(Be,{value:r,onValueChange:n,children:[t.jsx(He,{size:"default",className:"w-[180px]",children:t.jsx(Ue,{placeholder:"Choose a version"})}),t.jsx(Fe,{children:e.map(c=>t.jsx($e,{value:c,children:c},c))})]}),t.jsx(L,{onClick:l,disabled:f,children:"Deploy"})]})]}),t.jsx(je,{value:a,onChange:c=>o(c??""),language:"yaml",theme:"light",width:"100%",onCopy:c=>navigator.clipboard.writeText(c),onLaunch:c=>console.log("Launching code:",c),disabled:!i})]})},En=e=>e.split(" ").map(a=>a.charAt(0)).join("").toUpperCase().substring(0,2),Rn=({hostname:e,userProfile:a,onHomeClick:o,onSettingsClick:r,onUserProfileClick:n})=>t.jsxs("div",{className:"flex items-center justify-between w-full px-7 py-4 box-border",children:[t.jsx("div",{children:e}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(L,{variant:"outline",size:"icon-sm",onClick:o,"aria-label":"Home",children:t.jsx(N.Home,{size:20})}),t.jsx(L,{variant:"outline",size:"icon-sm",onClick:r,"aria-label":"Settings",children:t.jsx(N.Settings,{size:20})}),t.jsx("div",{className:"h-5 w-px"}),t.jsxs(_t,{onClick:n,children:[t.jsx(St,{src:a.avatar,alt:a.name}),t.jsx(zt,{children:En(a.name)})]}),t.jsx("div",{children:a.name})]})]}),Ln=()=>t.jsx(N.Building,{}),On=()=>t.jsx(N.Lamp,{}),Pn=({organization:e})=>t.jsxs("div",{className:"flex items-center h-20 w-full pt-3 pr-6 pb-3 pl-32 box-border gap-10",children:[t.jsx("div",{className:"flex items-center h-full",children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"uppercase mb-0.5 tracking-[0.2px]",children:"ORGANIZATION"}),t.jsxs("div",{className:"flex items-center gap-2 w-80",children:[t.jsx("div",{children:e.logo||t.jsx(Ln,{})}),t.jsxs("div",{children:[t.jsx("div",{children:e.name}),e.subtext&&t.jsx("div",{children:e.subtext})]})]})]})}),t.jsx("div",{className:"flex items-center h-full",children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"uppercase mb-0.5 tracking-[0.2px]",children:"PROJECT"}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(On,{}),t.jsx("div",{children:"Not Selected"})]})]})})]});function Ut({className:e,children:a,...o}){return t.jsxs(p.ScrollArea.Root,{"data-slot":"scroll-area",className:s("relative",e),...o,children:[t.jsx(p.ScrollArea.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:a}),t.jsx(Pa,{}),t.jsx(p.ScrollArea.Corner,{})]})}function Pa({className:e,orientation:a="vertical",...o}){return t.jsx(p.ScrollArea.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":a,orientation:a,className:s("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",e),...o,children:t.jsx(p.ScrollArea.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}const Gn=({items:e,activeItem:a,onItemClick:o})=>t.jsx(Ut,{children:t.jsx(Ot,{items:e,activeItem:a,onItemClick:o})});function Ga({className:e,orientation:a="horizontal",...o}){return t.jsx(p.Tabs.Root,{"data-slot":"tabs","data-orientation":a,className:s("group/tabs flex gap-2 data-horizontal:flex-col",e),...o})}const Ba=ne.cva("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function Ua({className:e,variant:a="default",...o}){return t.jsx(p.Tabs.List,{"data-slot":"tabs-list","data-variant":a,className:s(Ba({variant:a}),e),...o})}function Ha({className:e,...a}){return t.jsx(p.Tabs.Trigger,{"data-slot":"tabs-trigger",className:s("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...a})}function Bn({className:e,...a}){return t.jsx(p.Tabs.Content,{"data-slot":"tabs-content",className:s("flex-1 text-sm outline-none",e),...a})}const ma=({tabs:e,value:a,onChange:o})=>t.jsx(Ga,{className:"gap-0",value:a,onValueChange:o,children:t.jsx(Ua,{variant:"line",className:"w-full justify-start gap-6 p-0",children:e.map(r=>t.jsx(Ha,{className:"flex-none pb-3 px-0 pt-0",value:r.id,children:r.label},r.id))})}),Un=()=>{const[e,a]=m.useState(!1);return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between pb-6",children:[t.jsx("h2",{className:"m-0 text-xl font-semibold leading-7",children:"Protocol Configuration"}),t.jsxs("div",{className:"flex items-center gap-2 text-[15px] font-medium",children:[t.jsx(_e,{checked:e,onCheckedChange:a}),t.jsx(we,{htmlFor:"edit-mode-switch",children:"Edit Mode"})]})]}),t.jsxs(lt,{children:[t.jsx(Rt,{children:t.jsx(Lt,{children:"Configuration"})}),t.jsx(dt,{children:e?t.jsxs(L,{variant:"secondary",children:[t.jsx(N.Plus,{}),"Add Input"]}):t.jsx("div",{children:"No values, Use the 'edit' button to add values"})})]})]})},vt=({title:e,description:a,buttonText:o,linkText:r,status:n="default",onButtonClick:i,onLinkClick:d,className:f})=>{const u=n==="disabled";return t.jsx(lt,{className:s("hover:bg-secondary/50 transition-colors duration-200 ease-in-out",u?"cursor-not-allowed":"cursor-pointer",f),size:"sm",children:t.jsxs(dt,{children:[t.jsx("h3",{className:s("m-0 mb-1 text-base font-semibold leading-6",u?"text-disabled":"text-default"),children:e}),a&&t.jsx("p",{className:"m-0 mb-4 text-muted-foreground text-[13px] font-normal leading-5",children:a}),(o||r)&&t.jsxs("div",{className:"flex items-center gap-4",children:[o&&t.jsx(L,{variant:"secondary",size:"sm",disabled:u,onClick:l=>{l.stopPropagation(),i?.()},children:o}),r&&t.jsx("button",{className:s("no-underline text-[13px] font-medium leading-[18px]",u?"text-[var(--muted)] cursor-not-allowed":"text-[var(--primary)] cursor-pointer hover:underline"),onClick:l=>{l.preventDefault(),l.stopPropagation(),u||d?.()},children:r})]})]})})};function Fa({...e}){return t.jsx(p.Dialog.Root,{"data-slot":"sheet",...e})}function Hn({...e}){return t.jsx(p.Dialog.Trigger,{"data-slot":"sheet-trigger",...e})}function Fn({...e}){return t.jsx(p.Dialog.Close,{"data-slot":"sheet-close",...e})}function $n({...e}){return t.jsx(p.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function Vn({className:e,...a}){return t.jsx(p.Dialog.Overlay,{"data-slot":"sheet-overlay",className:s("fixed inset-0 z-50 bg-black/10 duration-100 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function $a({className:e,children:a,side:o="right",showCloseButton:r=!0,...n}){return t.jsxs($n,{children:[t.jsx(Vn,{}),t.jsxs(p.Dialog.Content,{"data-slot":"sheet-content","data-side":o,className:s("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",e),...n,children:[a,r&&t.jsx(p.Dialog.Close,{"data-slot":"sheet-close",asChild:!0,children:t.jsxs(L,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm",children:[t.jsx(N.XIcon,{}),t.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function Va({className:e,...a}){return t.jsx("div",{"data-slot":"sheet-header",className:s("flex flex-col gap-0.5 p-4",e),...a})}function Yn({className:e,...a}){return t.jsx("div",{"data-slot":"sheet-footer",className:s("mt-auto flex flex-col gap-2 p-4",e),...a})}function Ya({className:e,...a}){return t.jsx(p.Dialog.Title,{"data-slot":"sheet-title",className:s("text-base font-medium text-foreground",e),...a})}function Wa({className:e,...a}){return t.jsx(p.Dialog.Description,{"data-slot":"sheet-description",className:s("text-sm text-muted-foreground",e),...a})}function kt({className:e,...a}){return t.jsx("div",{"data-slot":"skeleton",className:s("animate-pulse rounded-md bg-muted",e),...a})}const jt=768;function Wn(){const[e,a]=H.useState();return H.useEffect(()=>{const o=window.matchMedia(`(max-width: ${jt-1}px)`),r=()=>{a(window.innerWidth<jt)};return o.addEventListener("change",r),a(window.innerWidth<jt),()=>o.removeEventListener("change",r)},[]),!!e}const fa=60,qn=24,Kn=7,Xn="sidebar_state",Zn=fa*fa*qn*Kn,Jn="16rem",Qn="18rem",es="3rem",ts="b",qa=H.createContext(null);function Ve(){const e=H.useContext(qa);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Ka({defaultOpen:e=!0,open:a,onOpenChange:o,className:r,style:n,children:i,...d}){const f=Wn(),[u,l]=H.useState(!1),[c,j]=H.useState(e),y=a??c,x=H.useCallback(_=>{const b=typeof _=="function"?_(y):_;o?o(b):j(b),document.cookie=`${Xn}=${b}; path=/; max-age=${Zn}`},[o,y]),w=H.useCallback(()=>f?l(_=>!_):x(_=>!_),[f,x,l]);H.useEffect(()=>{const _=b=>{b.key===ts&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),w())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[w]);const C=y?"expanded":"collapsed",S=H.useMemo(()=>({state:C,open:y,setOpen:x,isMobile:f,openMobile:u,setOpenMobile:l,toggleSidebar:w}),[C,y,x,f,u,l,w]);return t.jsx(qa.Provider,{value:S,children:t.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Jn,"--sidebar-width-icon":es,...n},className:s("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...d,children:i})})}function as({side:e="left",variant:a="sidebar",collapsible:o="offcanvas",className:r,children:n,dir:i,...d}){const{isMobile:f,state:u,openMobile:l,setOpenMobile:c}=Ve();return o==="none"?t.jsx("div",{"data-slot":"sidebar",className:s("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...d,children:n}):f?t.jsx(Fa,{open:l,onOpenChange:c,...d,children:t.jsxs($a,{dir:i,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Qn},side:e,children:[t.jsxs(Va,{className:"sr-only",children:[t.jsx(Ya,{children:"Sidebar"}),t.jsx(Wa,{children:"Displays the mobile sidebar."})]}),t.jsx("div",{className:"flex h-full w-full flex-col",children:n})]})}):t.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":u==="collapsed"?o:"","data-variant":a,"data-side":e,"data-slot":"sidebar",children:[t.jsx("div",{"data-slot":"sidebar-gap",className:s("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),t.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:s("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...d,children:t.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:n})})]})}function os({className:e,onClick:a,...o}){const{toggleSidebar:r}=Ve();return t.jsxs(L,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:s(e),onClick:n=>{a?.(n),r()},...o,children:[t.jsx(N.PanelLeftIcon,{}),t.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function rs({className:e,...a}){const{toggleSidebar:o}=Ve();return t.jsx("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:s("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...a})}function ns({className:e,...a}){return t.jsx("main",{"data-slot":"sidebar-inset",className:s("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...a})}function ss({className:e,...a}){return t.jsx(Ge,{"data-slot":"sidebar-input","data-sidebar":"input",className:s("h-8 w-full bg-background shadow-none",e),...a})}function is({className:e,...a}){return t.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:s("flex flex-col gap-2 p-2",e),...a})}function ls({className:e,...a}){return t.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:s("flex flex-col gap-2 p-2",e),...a})}function ds({className:e,...a}){return t.jsx(ce,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:s("mx-2 w-auto bg-sidebar-border",e),...a})}function cs({className:e,...a}){return t.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:s("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...a})}function us({className:e,...a}){return t.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:s("relative flex w-full min-w-0 flex-col p-2",e),...a})}function ps({className:e,asChild:a=!1,...o}){const r=a?p.Slot.Root:"div";return t.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:s("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",e),...o})}function ms({className:e,asChild:a=!1,...o}){const r=a?p.Slot.Root:"button";return t.jsx(r,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:s("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",e),...o})}function fs({className:e,...a}){return t.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:s("w-full text-sm",e),...a})}function gs({className:e,...a}){return t.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:s("flex w-full min-w-0 flex-col gap-0",e),...a})}function xs({className:e,...a}){return t.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:s("group/menu-item relative",e),...a})}const hs=ne.cva("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function bs({asChild:e=!1,isActive:a=!1,variant:o="default",size:r="default",tooltip:n,className:i,...d}){const f=e?p.Slot.Root:"button",{isMobile:u,state:l}=Ve(),c=t.jsx(f,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":a,className:s(hs({variant:o,size:r}),i),...d});return n?(typeof n=="string"&&(n={children:n}),t.jsxs(at,{children:[t.jsx(ot,{asChild:!0,children:c}),t.jsx(rt,{side:"right",align:"center",hidden:l!=="collapsed"||u,...n})]})):c}function vs({className:e,asChild:a=!1,showOnHover:o=!1,...r}){const n=a?p.Slot.Root:"button";return t.jsx(n,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:s("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0",o&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0",e),...r})}function js({className:e,...a}){return t.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:s("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground",e),...a})}function ws({className:e,showIcon:a=!1,...o}){const[r]=H.useState(()=>`${Math.floor(Math.random()*40)+50}%`);return t.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:s("flex h-8 items-center gap-2 rounded-md px-2",e),...o,children:[a&&t.jsx(kt,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),t.jsx(kt,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})}function ys({className:e,...a}){return t.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:s("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",e),...a})}function Cs({className:e,...a}){return t.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:s("group/menu-sub-item relative",e),...a})}function Ns({asChild:e=!1,size:a="md",isActive:o=!1,className:r,...n}){const i=e?p.Slot.Root:"a";return t.jsx(i,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":a,"data-active":o,className:s("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",r),...n})}const ks=({userProfile:e,hostname:a,organization:o})=>{const r=[{icon:N.Search,label:"Search"},{icon:N.SearchCode,label:"SQL Search"},{icon:N.Lamp,label:"Projects"},{icon:N.Workflow,label:"Pipelines"},{icon:N.Monitor,label:"Data & AI Workspace"},{icon:N.Box,label:"Artifacts"},{icon:N.Database,label:"Data Sources"},{icon:N.PieChart,label:"Health Monitoring"},{icon:N.CheckCheck,label:"Bulk Actions"},{icon:N.Code,label:"Attribute Management"},{icon:N.Settings,label:"Administration"}],n=[{id:"templates",label:"Templates"},{id:"protocol",label:"Protocol"},{id:"steps",label:"Steps"}],i=[{id:"pipelineBuilder",label:"Pipeline Builder"},{id:"configuration",label:"Configuration"},{id:"launch",label:"Launch"}],[d,f]=m.useState("Pipelines"),[u,l]=m.useState("templates"),[c,j]=m.useState("pipelineBuilder"),[y,x]=m.useState("1"),w=[{id:"1",title:"Tecan D300e and PerkinElmer EnVision to Dotmatics (v1)",description:"c901ejs",buttonText:"",linkText:""},{id:"2",title:"Bruker D8 Andvanced CRD Raw to IDS(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"3",title:"Extract and Decorate(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"4",title:"Intellict (Que3 Raw to IDS(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"5",title:"Leica Aperio RAW to IDS(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"6",title:"IDS to Benchling(Draft)",description:"c901ejs",buttonText:"",linkText:""},{id:"7",title:"Lorem Ipsum",description:"c901ejs",buttonText:"",linkText:""}],C=[],S=[],_=I=>{f(I)},b=I=>{l(I)},v=I=>{j(I)},M=()=>{console.log("Home clicked")},g=()=>{console.log("Settings clicked")},h=()=>{console.log("User profile clicked")},k=I=>{x(I===y?null:I)},z=I=>{console.log(`Using template: ${I}`)},A=I=>{console.log(`Viewing template: ${I}`)};return t.jsxs("div",{className:"flex flex-col w-screen h-screen",children:[t.jsx(Pn,{organization:o}),t.jsx("div",{className:"flex flex-1 overflow-hidden",children:t.jsxs(Ka,{className:"min-h-0 flex-1 w-full",children:[t.jsx(Gn,{items:r,activeItem:d,onItemClick:_}),t.jsxs("div",{className:"bg-card rounded-lg flex flex-col flex-1 overflow-hidden",children:[t.jsx(ce,{}),t.jsx(Rn,{hostname:a,userProfile:e,onHomeClick:M,onSettingsClick:g,onUserProfileClick:h}),t.jsx("div",{className:"flex flex-col flex-1 overflow-hidden",children:t.jsx("div",{className:"flex flex-col flex-1 overflow-hidden",children:t.jsxs("div",{style:{display:"flex",height:"100%"},children:[t.jsxs("div",{className:"w-[360px] h-full flex flex-col py-4 px-6 overflow-hidden max-h-full",children:[t.jsx(ma,{tabs:n,value:u,onChange:b}),u==="templates"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex justify-between items-center py-6",children:[t.jsx("h2",{className:"text-xl font-medium m-0",children:"Templates"}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(L,{className:"rounded-[4px] w-8 h-8",variant:"destructive",size:"icon-sm","aria-label":"Delete",children:t.jsx(N.Trash2,{size:20})}),t.jsx(L,{className:"rounded-[4px] w-8 h-8",size:"icon-sm","aria-label":"Add",children:t.jsx(N.Plus,{size:20})})]})]}),t.jsx(Ut,{className:"flex-1 h-full",children:w.length>0?w.map(I=>t.jsx("div",{className:"cursor-pointer p-1 last:border-b-0",onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&k(I.id)},onClick:()=>k(I.id),children:t.jsx(vt,{title:I.title,description:I.description,buttonText:I.buttonText,linkText:I.linkText,status:y===I.id?"active":"default",onButtonClick:()=>z(I.id),onLinkClick:()=>A(I.id)})},I.id)):t.jsxs("div",{className:"flex flex-col justify-center items-center gap-4",children:[t.jsx(N.Inbox,{size:40}),t.jsx("div",{className:"text-sm font-medium",children:"No data"})]})})]}),u==="protocol"&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex justify-between items-center py-6",children:t.jsxs("h2",{className:"text-xl font-medium m-0",children:["Protocol (",C.length,")"]})}),t.jsx("div",{className:"flex flex-col overflow-y-auto flex-1 mt-2 max-h-[calc(100vh-240px)]",children:C.length>0?C.map(I=>t.jsx("div",{className:"cursor-pointer last:border-b-0",onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&k(I.id)},onClick:()=>k(I.id),children:t.jsx(vt,{title:I.title,description:I.description,status:y===I.id?"active":"default",onButtonClick:()=>z(I.id),onLinkClick:()=>A(I.id)})},I.id)):t.jsxs("div",{className:"flex flex-col justify-center items-center gap-4",children:[t.jsx(N.Inbox,{size:40}),t.jsx("div",{className:"text-sm font-medium",children:"No data"})]})})]}),u==="steps"&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex justify-between items-center py-6",children:t.jsxs("h2",{className:"text-xl font-medium m-0",children:["Task Scripts (",S.length,")"]})}),t.jsx("div",{className:"flex flex-col overflow-y-auto flex-1 mt-2 max-h-[calc(100vh-240px)]",children:C.length>0?C.map(I=>t.jsx("div",{className:"cursor-pointer last:border-b-0",onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&k(I.id)},onClick:()=>k(I.id),children:t.jsx(vt,{title:I.title,description:I.description,status:y===I.id?"active":"default",onButtonClick:()=>z(I.id),onLinkClick:()=>A(I.id)})},I.id)):t.jsxs("div",{className:"flex flex-col justify-center items-center gap-4",children:[t.jsx(N.Inbox,{size:40}),t.jsx("div",{className:"text-sm font-medium",children:"No data"})]})})]})]}),t.jsxs("div",{className:"flex-1 h-full flex flex-col",children:[t.jsx("div",{className:"pt-4 px-6 pb-0",children:t.jsx(ma,{tabs:i,value:c,onChange:v})}),t.jsxs("div",{className:"p-6 -mt-px flex-1",children:[c==="pipelineBuilder"&&t.jsx("div",{className:"h-full border rounded-lg overflow-hidden"}),c==="configuration"&&t.jsx(Un,{}),c==="launch"&&t.jsx(Dn,{})]})]})]})})})]})]})})]})},ga=[P.BLUE,P.GREEN,P.ORANGE,P.RED,P.YELLOW,P.PURPLE],Ms=({dataSeries:e,width:a=400,height:o=400,title:r="Pie Chart",textInfo:n="percent",hole:i=0,rotation:d=0})=>{const f=m.useRef(null),u=le(),l=m.useMemo(()=>{if(e.colors&&e.colors.length>=e.labels.length)return e.colors;const j=[...e.colors||[]],y=e.labels.length-j.length;if(y<=0)return j;for(let x=0;x<y;x++)j.push(ga[x%ga.length]);return j},[e.colors,e.labels.length]);m.useEffect(()=>{if(!f.current)return;const j=[{type:"pie",labels:e.labels,values:e.values,name:e.name,marker:{colors:l},textinfo:n,hoverinfo:"label+text+value",insidetextfont:{size:0,family:"Inter, sans-serif",color:"transparent"},hole:i,rotation:d}],y={width:a,height:o,font:{family:"Inter, sans-serif",color:u.textColor},showlegend:!1,margin:{l:40,r:40,b:40,t:40},paper_bgcolor:u.paperBg,plot_bgcolor:u.plotBg},x={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(f.current,j,y,x);const w=f.current;return()=>{w&&V.purge(w)}},[l,e.labels,e.name,e.values,a,o,n,i,d,u]);const c=({labels:j,colors:y})=>{const x=j.map((S,_)=>t.jsx(m.Fragment,{children:t.jsxs("div",{className:"legend-item",children:[t.jsx("span",{className:"color-box",style:{background:y[_]}}),S,_<j.length-1&&t.jsx("span",{className:"divider"})]})},S)),w=6,C=[];for(let S=0;S<x.length;S+=w)C.push(t.jsx("div",{className:"legend-row",children:x.slice(S,S+w)},S));return t.jsx("div",{className:"legend-container",children:C})};return t.jsx("div",{className:"card-container",style:{width:a},children:t.jsxs("div",{className:"chart-container",children:[r&&t.jsx("div",{className:"title-container",children:t.jsx("h2",{className:"title",children:r})}),t.jsx("div",{ref:f,style:{width:"100%",height:"100%",margin:"0"}}),t.jsx(c,{labels:e.labels,colors:l})]})})},_s=({dataSeries:e,width:a=1e3,height:o=600,xRange:r,yRange:n,xTitle:i="Columns",yTitle:d="Rows",title:f="Scatter Plot"})=>{const u=m.useRef(null),l=le(),{xMin:c,xMax:j,yMin:y,yMax:x}=m.useMemo(()=>{let M=Number.MAX_VALUE,g=Number.MIN_VALUE,h=Number.MAX_VALUE,k=Number.MIN_VALUE;e.forEach(I=>{I.x.forEach(D=>{M=Math.min(M,D),g=Math.max(g,D)}),I.y.forEach(D=>{h=Math.min(h,D),k=Math.max(k,D)})});const z=(g-M)*.1,A=(k-h)*.1;return{xMin:M-z,xMax:g+z,yMin:h-A,yMax:k+A}},[e]),w=m.useMemo(()=>r||[c,j],[r,c,j]),C=m.useMemo(()=>n||[y,x],[n,y,x]),S=m.useMemo(()=>{const M=w[1]-w[0];let g=Math.pow(10,Math.floor(Math.log10(M)));M/g>10&&(g=g*2),M/g<4&&(g=g/2);const h=[];let k=Math.ceil(w[0]/g)*g;for(;k<=w[1];)h.push(k),k+=g;return h},[w]),_=m.useMemo(()=>{const M=C[1]-C[0];let g=Math.pow(10,Math.floor(Math.log10(M)));M/g>10&&(g=g*2),M/g<4&&(g=g/2);const h=[];let k=Math.ceil(C[0]/g)*g;for(;k<=C[1];)h.push(k),k+=g;return h},[C]),b=m.useMemo(()=>({tickcolor:l.tickColor,ticklen:12,tickwidth:1,ticks:"outside",tickfont:{size:16,color:l.textColor,family:"Inter, sans-serif",weight:400},linecolor:l.lineColor,linewidth:1,position:0,zeroline:!1}),[l]),v=m.useMemo(()=>({showspikes:!0,spikemode:"across",spikedash:"solid",spikecolor:l.spikeColor,spikethickness:2}),[l]);return m.useEffect(()=>{if(!u.current)return;const M=e.map(z=>({x:z.x,y:z.y,type:"scatter",mode:"markers",name:z.name,marker:{color:z.color,size:10,symbol:"circle"},hovertemplate:`${i}: %{x}<br>${d}: %{y}<extra>${z.name}</extra>`})),g={title:{text:f,font:{size:32,family:"Inter, sans-serif",color:l.textColor}},width:a,height:o,margin:{l:80,r:30,b:80,t:60,pad:10},paper_bgcolor:l.paperBg,plot_bgcolor:l.plotBg,font:{family:"Inter, sans-serif"},dragmode:!1,xaxis:{title:{text:i,font:{size:16,color:l.textSecondary,family:"Inter, sans-serif",weight:400},standoff:32},gridcolor:l.gridColor,range:r,autorange:!r,tickmode:"array",tickvals:S,ticktext:S.map(String),showgrid:!0,...v,...b},yaxis:{title:{text:d,font:{size:16,color:l.textSecondary,family:"Inter, sans-serif",weight:400},standoff:30},gridcolor:l.gridColor,range:n,autorange:!n,tickmode:"array",tickvals:_,showgrid:!0,...v,...b},legend:{x:.5,y:-.2,xanchor:"center",yanchor:"top",orientation:"h",font:{size:16,color:l.legendColor,family:"Inter, sans-serif",weight:500}},showlegend:!0,hovermode:"closest"},h={responsive:!0,displayModeBar:!1,displaylogo:!1};V.newPlot(u.current,M,g,h);const k=u.current;return()=>{k&&V.purge(k)}},[e,a,o,r,n,i,d,f,w,C,S,_,b,v,l]),t.jsx("div",{className:"chart-container",children:t.jsx("div",{ref:u,style:{width:"100%",height:"100%"}})})};function Ss({className:e,...a}){return t.jsx(p.Accordion.Root,{"data-slot":"accordion",className:s("flex w-full flex-col",e),...a})}function zs({className:e,...a}){return t.jsx(p.Accordion.Item,{"data-slot":"accordion-item",className:s("not-last:border-b",e),...a})}function Is({className:e,children:a,...o}){return t.jsx(p.Accordion.Header,{className:"flex",children:t.jsxs(p.Accordion.Trigger,{"data-slot":"accordion-trigger",className:s("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring disabled:pointer-events-none disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",e),...o,children:[a,t.jsx(N.ChevronDownIcon,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden"}),t.jsx(N.ChevronUpIcon,{"data-slot":"accordion-trigger-icon",className:"pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline"})]})})}function As({className:e,children:a,...o}){return t.jsx(p.Accordion.Content,{"data-slot":"accordion-content",className:"overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up",...o,children:t.jsx("div",{className:s("h-(--radix-accordion-content-height) pt-0 pb-2.5 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),children:a})})}function Ts({...e}){return t.jsx(p.AlertDialog.Root,{"data-slot":"alert-dialog",...e})}function Ds({...e}){return t.jsx(p.AlertDialog.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function Xa({...e}){return t.jsx(p.AlertDialog.Portal,{"data-slot":"alert-dialog-portal",...e})}function Za({className:e,...a}){return t.jsx(p.AlertDialog.Overlay,{"data-slot":"alert-dialog-overlay",className:s("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function Es({className:e,size:a="default",...o}){return t.jsxs(Xa,{children:[t.jsx(Za,{}),t.jsx(p.AlertDialog.Content,{"data-slot":"alert-dialog-content","data-size":a,className:s("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o})]})}function Rs({className:e,...a}){return t.jsx("div",{"data-slot":"alert-dialog-header",className:s("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function Ls({className:e,...a}){return t.jsx("div",{"data-slot":"alert-dialog-footer",className:s("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function Os({className:e,...a}){return t.jsx("div",{"data-slot":"alert-dialog-media",className:s("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6",e),...a})}function Ps({className:e,...a}){return t.jsx(p.AlertDialog.Title,{"data-slot":"alert-dialog-title",className:s("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function Gs({className:e,...a}){return t.jsx(p.AlertDialog.Description,{"data-slot":"alert-dialog-description",className:s("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function Bs({className:e,variant:a="default",size:o="default",...r}){return t.jsx(L,{variant:a,size:o,asChild:!0,children:t.jsx(p.AlertDialog.Action,{"data-slot":"alert-dialog-action",className:s(e),...r})})}function Us({className:e,variant:a="outline",size:o="default",...r}){return t.jsx(L,{variant:a,size:o,asChild:!0,children:t.jsx(p.AlertDialog.Cancel,{"data-slot":"alert-dialog-cancel",className:s(e),...r})})}function Hs({...e}){return t.jsx(p.AspectRatio.Root,{"data-slot":"aspect-ratio",...e})}const Ja=ne.cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function Fs({className:e,variant:a="default",asChild:o=!1,...r}){const n=o?p.Slot.Root:"span";return t.jsx(n,{"data-slot":"badge","data-variant":a,className:s(Ja({variant:a}),e),...r})}function $s({className:e,...a}){return t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s(e),...a})}function Vs({className:e,...a}){return t.jsx("ol",{"data-slot":"breadcrumb-list",className:s("flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground",e),...a})}function Ys({className:e,...a}){return t.jsx("li",{"data-slot":"breadcrumb-item",className:s("inline-flex items-center gap-1",e),...a})}function Ws({asChild:e,className:a,...o}){const r=e?p.Slot.Root:"a";return t.jsx(r,{"data-slot":"breadcrumb-link",className:s("transition-colors hover:text-foreground",a),...o})}function qs({className:e,...a}){return t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s("font-normal text-foreground",e),...a})}function Ks({children:e,className:a,...o}){return t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:s("[&>svg]:size-3.5",a),...o,children:e??t.jsx(N.ChevronRightIcon,{})})}function Xs({className:e,...a}){return t.jsxs("span",{"data-slot":"breadcrumb-ellipsis",role:"presentation","aria-hidden":"true",className:s("flex size-5 items-center justify-center [&>svg]:size-4",e),...a,children:[t.jsx(N.MoreHorizontalIcon,{}),t.jsx("span",{className:"sr-only",children:"More"})]})}const Qa=ne.cva("flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",{variants:{orientation:{horizontal:"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg!",vertical:"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg!"}},defaultVariants:{orientation:"horizontal"}});function Zs({className:e,orientation:a,...o}){return t.jsx("div",{role:"group","data-slot":"button-group","data-orientation":a,className:s(Qa({orientation:a}),e),...o})}function Js({className:e,asChild:a=!1,...o}){const r=a?p.Slot.Root:"div";return t.jsx(r,{className:s("flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...o})}function Qs({className:e,orientation:a="vertical",...o}){return t.jsx(ce,{"data-slot":"button-group-separator",orientation:a,className:s("relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto",e),...o})}function ei({className:e,classNames:a,showOutsideDays:o=!0,captionLayout:r="label",buttonVariant:n="ghost",locale:i,formatters:d,components:f,...u}){const l=wt.getDefaultClassNames();return t.jsx(wt.DayPicker,{showOutsideDays:o,className:s("group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-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,locale:i,formatters:{formatMonthDropdown:c=>c.toLocaleString(i?.code,{month:"short"}),...d},classNames:{root:s("w-fit",l.root),months:s("relative flex flex-col gap-4 md:flex-row",l.months),month:s("flex w-full flex-col gap-4",l.month),nav:s("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",l.nav),button_previous:s(tt({variant:n}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",l.button_previous),button_next:s(tt({variant:n}),"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",l.button_next),month_caption:s("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",l.month_caption),dropdowns:s("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",l.dropdowns),dropdown_root:s("relative rounded-(--cell-radius)",l.dropdown_root),dropdown:s("absolute inset-0 bg-popover opacity-0",l.dropdown),caption_label:s("font-medium select-none",r==="label"?"text-sm":"flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",l.caption_label),table:"w-full border-collapse",weekdays:s("flex",l.weekdays),weekday:s("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",l.weekday),week:s("mt-2 flex w-full",l.week),week_number_header:s("w-(--cell-size) select-none",l.week_number_header),week_number:s("text-[0.8rem] text-muted-foreground select-none",l.week_number),day:s("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",u.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)":"[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",l.day),range_start:s("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",l.range_start),range_middle:s("rounded-none",l.range_middle),range_end:s("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",l.range_end),today:s("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",l.today),outside:s("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:s("text-muted-foreground opacity-50",l.disabled),hidden:s("invisible",l.hidden),...a},components:{Root:({className:c,rootRef:j,...y})=>t.jsx("div",{"data-slot":"calendar",ref:j,className:s(c),...y}),Chevron:({className:c,orientation:j,...y})=>j==="left"?t.jsx(N.ChevronLeftIcon,{className:s("size-4",c),...y}):j==="right"?t.jsx(N.ChevronRightIcon,{className:s("size-4",c),...y}):t.jsx(N.ChevronDownIcon,{className:s("size-4",c),...y}),DayButton:({...c})=>t.jsx(eo,{locale:i,...c}),WeekNumber:({children:c,...j})=>t.jsx("td",{...j,children:t.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:c})}),...f},...u})}function eo({className:e,day:a,modifiers:o,locale:r,...n}){const i=wt.getDefaultClassNames(),d=H.useRef(null);return H.useEffect(()=>{o.focused&&d.current?.focus()},[o.focused]),t.jsx(L,{ref:d,variant:"ghost",size:"icon","data-day":a.date.toLocaleDateString(r?.code),"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:s("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",i.day,e),...n})}const to=H.createContext(null);function Ye(){const e=H.useContext(to);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function ti({orientation:e="horizontal",opts:a,setApi:o,plugins:r,className:n,children:i,...d}){const[f,u]=No({...a,axis:e==="horizontal"?"x":"y"},r),[l,c]=H.useState(!1),[j,y]=H.useState(!1),x=H.useCallback(_=>{_&&(c(_.canScrollPrev()),y(_.canScrollNext()))},[]),w=H.useCallback(()=>{u?.scrollPrev()},[u]),C=H.useCallback(()=>{u?.scrollNext()},[u]),S=H.useCallback(_=>{_.key==="ArrowLeft"?(_.preventDefault(),w()):_.key==="ArrowRight"&&(_.preventDefault(),C())},[w,C]);return H.useEffect(()=>{!u||!o||o(u)},[u,o]),H.useEffect(()=>{if(u)return x(u),u.on("reInit",x),u.on("select",x),()=>{u?.off("select",x)}},[u,x]),t.jsx(to.Provider,{value:{carouselRef:f,api:u,opts:a,orientation:e||(a?.axis==="y"?"vertical":"horizontal"),scrollPrev:w,scrollNext:C,canScrollPrev:l,canScrollNext:j},children:t.jsx("div",{onKeyDownCapture:S,className:s("relative",n),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...d,children:i})})}function ai({className:e,...a}){const{carouselRef:o,orientation:r}=Ye();return t.jsx("div",{ref:o,className:"overflow-hidden","data-slot":"carousel-content",children:t.jsx("div",{className:s("flex",r==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...a})})}function oi({className:e,...a}){const{orientation:o}=Ye();return t.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:s("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...a})}function ri({className:e,variant:a="outline",size:o="icon-sm",...r}){const{orientation:n,scrollPrev:i,canScrollPrev:d}=Ye();return t.jsxs(L,{"data-slot":"carousel-previous",variant:a,size:o,className:s("absolute touch-manipulation rounded-full",n==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!d,onClick:i,...r,children:[t.jsx(N.ChevronLeftIcon,{}),t.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function ni({className:e,variant:a="outline",size:o="icon-sm",...r}){const{orientation:n,scrollNext:i,canScrollNext:d}=Ye();return t.jsxs(L,{"data-slot":"carousel-next",variant:a,size:o,className:s("absolute touch-manipulation rounded-full",n==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!d,onClick:i,...r,children:[t.jsx(N.ChevronRightIcon,{}),t.jsx("span",{className:"sr-only",children:"Next slide"})]})}function si({className:e,...a}){return t.jsx(p.Checkbox.Root,{"data-slot":"checkbox",className:s("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...a,children:t.jsx(p.Checkbox.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:t.jsx(N.CheckIcon,{})})})}function ii({...e}){return t.jsx(p.Collapsible.Root,{"data-slot":"collapsible",...e})}function li({...e}){return t.jsx(p.Collapsible.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...e})}function di({...e}){return t.jsx(p.Collapsible.CollapsibleContent,{"data-slot":"collapsible-content",...e})}function Ht({className:e,...a}){return t.jsx("div",{"data-slot":"input-group",role:"group",className:s("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...a})}const ci=ne.cva("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function Ft({className:e,align:a="inline-start",...o}){return t.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:s(ci({align:a}),e),onKeyDown:r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),r.currentTarget.click())},onClick:r=>{r.target.closest("button")||r.currentTarget.parentElement?.querySelector("input")?.focus()},...o})}const ui=ne.cva("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function $t({className:e,type:a="button",variant:o="ghost",size:r="xs",...n}){return t.jsx(L,{type:a,"data-size":r,variant:o,className:s(ui({size:r}),e),...n})}function pi({className:e,...a}){return t.jsx("span",{className:s("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...a})}function ao({className:e,...a}){return t.jsx(Ge,{"data-slot":"input-group-control",className:s("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",e),...a})}function mi({className:e,...a}){return t.jsx(Et,{"data-slot":"input-group-control",className:s("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",e),...a})}const fi=q.Combobox.Root;function gi({...e}){return t.jsx(q.Combobox.Value,{"data-slot":"combobox-value",...e})}function oo({className:e,children:a,...o}){return t.jsxs(q.Combobox.Trigger,{"data-slot":"combobox-trigger",className:s("[&_svg:not([class*='size-'])]:size-4",e),...o,children:[a,t.jsx(N.ChevronDownIcon,{className:"pointer-events-none size-4 text-muted-foreground"})]})}function xi({className:e,...a}){return t.jsx(q.Combobox.Clear,{"data-slot":"combobox-clear",render:t.jsx($t,{variant:"ghost",size:"icon-xs"}),className:s(e),...a,children:t.jsx(N.XIcon,{className:"pointer-events-none"})})}function hi({className:e,children:a,disabled:o=!1,showTrigger:r=!0,showClear:n=!1,...i}){return t.jsxs(Ht,{className:s("w-auto",e),children:[t.jsx(q.Combobox.Input,{render:t.jsx(ao,{disabled:o}),...i}),t.jsxs(Ft,{align:"inline-end",children:[r&&t.jsx($t,{size:"icon-xs",variant:"ghost",asChild:!0,"data-slot":"input-group-button",className:"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",disabled:o,children:t.jsx(oo,{})}),n&&t.jsx(xi,{disabled:o})]}),a]})}function bi({className:e,side:a="bottom",sideOffset:o=6,align:r="start",alignOffset:n=0,anchor:i,...d}){return t.jsx(q.Combobox.Portal,{children:t.jsx(q.Combobox.Positioner,{side:a,sideOffset:o,align:r,alignOffset:n,anchor:i,className:"isolate z-50",children:t.jsx(q.Combobox.Popup,{"data-slot":"combobox-content","data-chips":!!i,className:s("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...d})})})}function vi({className:e,...a}){return t.jsx(q.Combobox.List,{"data-slot":"combobox-list",className:s("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0",e),...a})}function ji({className:e,children:a,...o}){return t.jsxs(q.Combobox.Item,{"data-slot":"combobox-item",className:s("relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o,children:[a,t.jsx(q.Combobox.ItemIndicator,{render:t.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center"}),children:t.jsx(N.CheckIcon,{className:"pointer-events-none"})})]})}function wi({className:e,...a}){return t.jsx(q.Combobox.Group,{"data-slot":"combobox-group",className:s(e),...a})}function yi({className:e,...a}){return t.jsx(q.Combobox.GroupLabel,{"data-slot":"combobox-label",className:s("px-2 py-1.5 text-xs text-muted-foreground",e),...a})}function Ci({...e}){return t.jsx(q.Combobox.Collection,{"data-slot":"combobox-collection",...e})}function Ni({className:e,...a}){return t.jsx(q.Combobox.Empty,{"data-slot":"combobox-empty",className:s("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",e),...a})}function ki({className:e,...a}){return t.jsx(q.Combobox.Separator,{"data-slot":"combobox-separator",className:s("-mx-1 my-1 h-px bg-border",e),...a})}function Mi({className:e,...a}){return t.jsx(q.Combobox.Chips,{"data-slot":"combobox-chips",className:s("flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",e),...a})}function _i({className:e,children:a,showRemove:o=!0,...r}){return t.jsxs(q.Combobox.Chip,{"data-slot":"combobox-chip",className:s("flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",e),...r,children:[a,o&&t.jsx(q.Combobox.ChipRemove,{render:t.jsx(L,{variant:"ghost",size:"icon-xs"}),className:"-ml-1 opacity-50 hover:opacity-100","data-slot":"combobox-chip-remove",children:t.jsx(N.XIcon,{className:"pointer-events-none"})})]})}function Si({className:e,...a}){return t.jsx(q.Combobox.Input,{"data-slot":"combobox-chip-input",className:s("min-w-16 flex-1 outline-none",e),...a})}function zi(){return H.useRef(null)}function Ii({className:e,...a}){return t.jsx(ve.Command,{"data-slot":"command",className:s("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",e),...a})}function Ai({title:e="Command Palette",description:a="Search for a command to run...",children:o,className:r,showCloseButton:n=!1,...i}){return t.jsxs(Re,{...i,children:[t.jsxs(Oe,{className:"sr-only",children:[t.jsx(Pe,{children:e}),t.jsx(Tt,{children:a})]}),t.jsx(Le,{className:s("top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",r),showCloseButton:n,children:o})]})}function Ti({className:e,...a}){return t.jsx("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:t.jsxs(Ht,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[t.jsx(ve.Command.Input,{"data-slot":"command-input",className:s("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...a}),t.jsx(Ft,{children:t.jsx(N.SearchIcon,{className:"size-4 shrink-0 opacity-50"})})]})})}function Di({className:e,...a}){return t.jsx(ve.Command.List,{"data-slot":"command-list",className:s("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",e),...a})}function Ei({className:e,...a}){return t.jsx(ve.Command.Empty,{"data-slot":"command-empty",className:s("py-6 text-center text-sm",e),...a})}function Ri({className:e,...a}){return t.jsx(ve.Command.Group,{"data-slot":"command-group",className:s("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),...a})}function Li({className:e,...a}){return t.jsx(ve.Command.Separator,{"data-slot":"command-separator",className:s("-mx-1 h-px bg-border",e),...a})}function Oi({className:e,children:a,...o}){return t.jsxs(ve.Command.Item,{"data-slot":"command-item",className:s("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",e),...o,children:[a,t.jsx(N.CheckIcon,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function Pi({className:e,...a}){return t.jsx("span",{"data-slot":"command-shortcut",className:s("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",e),...a})}function Gi({...e}){return t.jsx(p.ContextMenu.Root,{"data-slot":"context-menu",...e})}function Bi({className:e,...a}){return t.jsx(p.ContextMenu.Trigger,{"data-slot":"context-menu-trigger",className:s("select-none",e),...a})}function Ui({...e}){return t.jsx(p.ContextMenu.Group,{"data-slot":"context-menu-group",...e})}function Hi({...e}){return t.jsx(p.ContextMenu.Portal,{"data-slot":"context-menu-portal",...e})}function Fi({...e}){return t.jsx(p.ContextMenu.Sub,{"data-slot":"context-menu-sub",...e})}function $i({...e}){return t.jsx(p.ContextMenu.RadioGroup,{"data-slot":"context-menu-radio-group",...e})}function Vi({className:e,...a}){return t.jsx(p.ContextMenu.Portal,{children:t.jsx(p.ContextMenu.Content,{"data-slot":"context-menu-content",className:s("z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})})}function Yi({className:e,inset:a,variant:o="default",...r}){return t.jsx(p.ContextMenu.Item,{"data-slot":"context-menu-item","data-inset":a,"data-variant":o,className:s("group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function Wi({className:e,inset:a,children:o,...r}){return t.jsxs(p.ContextMenu.SubTrigger,{"data-slot":"context-menu-sub-trigger","data-inset":a,className:s("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[o,t.jsx(N.ChevronRightIcon,{className:"ml-auto"})]})}function qi({className:e,...a}){return t.jsx(p.ContextMenu.SubContent,{"data-slot":"context-menu-sub-content",className:s("z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border bg-popover p-1 text-popover-foreground shadow-lg duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})}function Ki({className:e,children:a,checked:o,inset:r,...n}){return t.jsxs(p.ContextMenu.CheckboxItem,{"data-slot":"context-menu-checkbox-item","data-inset":r,className:s("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:o,...n,children:[t.jsx("span",{className:"pointer-events-none absolute right-2",children:t.jsx(p.ContextMenu.ItemIndicator,{children:t.jsx(N.CheckIcon,{})})}),a]})}function Xi({className:e,children:a,inset:o,...r}){return t.jsxs(p.ContextMenu.RadioItem,{"data-slot":"context-menu-radio-item","data-inset":o,className:s("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[t.jsx("span",{className:"pointer-events-none absolute right-2",children:t.jsx(p.ContextMenu.ItemIndicator,{children:t.jsx(N.CheckIcon,{})})}),a]})}function Zi({className:e,inset:a,...o}){return t.jsx(p.ContextMenu.Label,{"data-slot":"context-menu-label","data-inset":a,className:s("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",e),...o})}function Ji({className:e,...a}){return t.jsx(p.ContextMenu.Separator,{"data-slot":"context-menu-separator",className:s("-mx-1 my-1 h-px bg-border",e),...a})}function Qi({className:e,...a}){return t.jsx("span",{"data-slot":"context-menu-shortcut",className:s("ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground",e),...a})}function el({...e}){return t.jsx(fe.Drawer.Root,{"data-slot":"drawer",...e})}function tl({...e}){return t.jsx(fe.Drawer.Trigger,{"data-slot":"drawer-trigger",...e})}function ro({...e}){return t.jsx(fe.Drawer.Portal,{"data-slot":"drawer-portal",...e})}function al({...e}){return t.jsx(fe.Drawer.Close,{"data-slot":"drawer-close",...e})}function no({className:e,...a}){return t.jsx(fe.Drawer.Overlay,{"data-slot":"drawer-overlay",className:s("fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function ol({className:e,children:a,...o}){return t.jsxs(ro,{"data-slot":"drawer-portal",children:[t.jsx(no,{}),t.jsxs(fe.Drawer.Content,{"data-slot":"drawer-content",className:s("group/drawer-content fixed z-50 flex h-auto flex-col bg-background text-sm data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm",e),...o,children:[t.jsx("div",{className:"mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full bg-muted group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),a]})]})}function rl({className:e,...a}){return t.jsx("div",{"data-slot":"drawer-header",className:s("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-0.5 md:text-left",e),...a})}function nl({className:e,...a}){return t.jsx("div",{"data-slot":"drawer-footer",className:s("mt-auto flex flex-col gap-2 p-4",e),...a})}function sl({className:e,...a}){return t.jsx(fe.Drawer.Title,{"data-slot":"drawer-title",className:s("text-base font-medium text-foreground",e),...a})}function il({className:e,...a}){return t.jsx(fe.Drawer.Description,{"data-slot":"drawer-description",className:s("text-sm text-muted-foreground",e),...a})}function ll({...e}){return t.jsx(p.DropdownMenu.Root,{"data-slot":"dropdown-menu",...e})}function dl({...e}){return t.jsx(p.DropdownMenu.Portal,{"data-slot":"dropdown-menu-portal",...e})}function cl({...e}){return t.jsx(p.DropdownMenu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function ul({className:e,align:a="start",sideOffset:o=4,...r}){return t.jsx(p.DropdownMenu.Portal,{children:t.jsx(p.DropdownMenu.Content,{"data-slot":"dropdown-menu-content",sideOffset:o,align:a,className:s("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})})}function pl({...e}){return t.jsx(p.DropdownMenu.Group,{"data-slot":"dropdown-menu-group",...e})}function ml({className:e,inset:a,variant:o="default",...r}){return t.jsx(p.DropdownMenu.Item,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":o,className:s("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...r})}function fl({className:e,children:a,checked:o,inset:r,...n}){return t.jsxs(p.DropdownMenu.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":r,className:s("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:o,...n,children:[t.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:t.jsx(p.DropdownMenu.ItemIndicator,{children:t.jsx(N.CheckIcon,{})})}),a]})}function gl({...e}){return t.jsx(p.DropdownMenu.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function xl({className:e,children:a,inset:o,...r}){return t.jsxs(p.DropdownMenu.RadioItem,{"data-slot":"dropdown-menu-radio-item","data-inset":o,className:s("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[t.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:t.jsx(p.DropdownMenu.ItemIndicator,{children:t.jsx(N.CheckIcon,{})})}),a]})}function hl({className:e,inset:a,...o}){return t.jsx(p.DropdownMenu.Label,{"data-slot":"dropdown-menu-label","data-inset":a,className:s("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",e),...o})}function bl({className:e,...a}){return t.jsx(p.DropdownMenu.Separator,{"data-slot":"dropdown-menu-separator",className:s("-mx-1 my-1 h-px bg-border",e),...a})}function vl({className:e,...a}){return t.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:s("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",e),...a})}function jl({...e}){return t.jsx(p.DropdownMenu.Sub,{"data-slot":"dropdown-menu-sub",...e})}function wl({className:e,inset:a,children:o,...r}){return t.jsxs(p.DropdownMenu.SubTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":a,className:s("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[o,t.jsx(N.ChevronRightIcon,{className:"ml-auto"})]})}function yl({className:e,...a}){return t.jsx(p.DropdownMenu.SubContent,{"data-slot":"dropdown-menu-sub-content",className:s("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})}function Cl({className:e,...a}){return t.jsx("fieldset",{"data-slot":"field-set",className:s("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",e),...a})}function Nl({className:e,variant:a="legend",...o}){return t.jsx("legend",{"data-slot":"field-legend","data-variant":a,className:s("mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",e),...o})}function kl({className:e,...a}){return t.jsx("div",{"data-slot":"field-group",className:s("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",e),...a})}const Ml=ne.cva("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function _l({className:e,orientation:a="vertical",...o}){return t.jsx("div",{role:"group","data-slot":"field","data-orientation":a,className:s(Ml({orientation:a}),e),...o})}function Sl({className:e,...a}){return t.jsx("div",{"data-slot":"field-content",className:s("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...a})}function zl({className:e,...a}){return t.jsx(we,{"data-slot":"field-label",className:s("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...a})}function Il({className:e,...a}){return t.jsx("div",{"data-slot":"field-label",className:s("flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50",e),...a})}function Al({className:e,...a}){return t.jsx("p",{"data-slot":"field-description",className:s("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5","last:mt-0 nth-last-2:-mt-1","[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})}function Tl({children:e,className:a,...o}){return t.jsxs("div",{"data-slot":"field-separator","data-content":!!e,className:s("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",a),...o,children:[t.jsx(ce,{className:"absolute inset-0 top-1/2"}),e&&t.jsx("span",{className:"relative mx-auto block w-fit bg-background px-2 text-muted-foreground","data-slot":"field-separator-content",children:e})]})}function Dl({className:e,children:a,errors:o,...r}){const n=m.useMemo(()=>{if(a)return a;if(!o?.length)return null;const i=[...new Map(o.map(d=>[d?.message,d])).values()];return i?.length==1?i[0]?.message:t.jsx("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:i.map((d,f)=>d?.message&&t.jsx("li",{children:d.message},f))})},[a,o]);return n?t.jsx("div",{role:"alert","data-slot":"field-error",className:s("text-sm font-normal text-destructive",e),...r,children:n}):null}function El({...e}){return t.jsx(p.HoverCard.Root,{"data-slot":"hover-card",...e})}function Rl({...e}){return t.jsx(p.HoverCard.Trigger,{"data-slot":"hover-card-trigger",...e})}function Ll({className:e,align:a="center",sideOffset:o=4,...r}){return t.jsx(p.HoverCard.Portal,{"data-slot":"hover-card-portal",children:t.jsx(p.HoverCard.Content,{"data-slot":"hover-card-content",align:a,sideOffset:o,className:s("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})})}function Ol({className:e,containerClassName:a,...o}){return t.jsx(xa.OTPInput,{"data-slot":"input-otp",containerClassName:s("cn-input-otp flex items-center has-disabled:opacity-50",a),spellCheck:!1,className:s("disabled:cursor-not-allowed",e),...o})}function Pl({className:e,...a}){return t.jsx("div",{"data-slot":"input-otp-group",className:s("flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40",e),...a})}function Gl({index:e,className:a,...o}){const r=H.useContext(xa.OTPInputContext),{char:n,hasFakeCaret:i,isActive:d}=r?.slots[e]??{};return t.jsxs("div",{"data-slot":"input-otp-slot","data-active":d,className:s("relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",a),...o,children:[n,i&&t.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:t.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})}function Bl({...e}){return t.jsx("div",{"data-slot":"input-otp-separator",className:"flex items-center [&_svg:not([class*='size-'])]:size-4",role:"separator",...e,children:t.jsx(N.MinusIcon,{})})}function Ul({className:e,...a}){return t.jsx("div",{role:"list","data-slot":"item-group",className:s("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",e),...a})}function Hl({className:e,...a}){return t.jsx(ce,{"data-slot":"item-separator",orientation:"horizontal",className:s("my-2",e),...a})}const Fl=ne.cva("group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",{variants:{variant:{default:"border-transparent",outline:"border-border",muted:"border-transparent bg-muted/50"},size:{default:"gap-2.5 px-3 py-2.5",sm:"gap-2.5 px-3 py-2.5",xs:"gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"}},defaultVariants:{variant:"default",size:"default"}});function $l({className:e,variant:a="default",size:o="default",asChild:r=!1,...n}){const i=r?p.Slot.Root:"div";return t.jsx(i,{"data-slot":"item","data-variant":a,"data-size":o,className:s(Fl({variant:a,size:o,className:e})),...n})}const Vl=ne.cva("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",{variants:{variant:{default:"bg-transparent",icon:"[&_svg:not([class*='size-'])]:size-4",image:"size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"}},defaultVariants:{variant:"default"}});function Yl({className:e,variant:a="default",...o}){return t.jsx("div",{"data-slot":"item-media","data-variant":a,className:s(Vl({variant:a,className:e})),...o})}function Wl({className:e,...a}){return t.jsx("div",{"data-slot":"item-content",className:s("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",e),...a})}function ql({className:e,...a}){return t.jsx("div",{"data-slot":"item-title",className:s("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",e),...a})}function Kl({className:e,...a}){return t.jsx("p",{"data-slot":"item-description",className:s("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",e),...a})}function Xl({className:e,...a}){return t.jsx("div",{"data-slot":"item-actions",className:s("flex items-center gap-2",e),...a})}function Zl({className:e,...a}){return t.jsx("div",{"data-slot":"item-header",className:s("flex basis-full items-center justify-between gap-2",e),...a})}function Jl({className:e,...a}){return t.jsx("div",{"data-slot":"item-footer",className:s("flex basis-full items-center justify-between gap-2",e),...a})}function Ql({className:e,...a}){return t.jsx("kbd",{"data-slot":"kbd",className:s("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",e),...a})}function ed({className:e,...a}){return t.jsx("kbd",{"data-slot":"kbd-group",className:s("inline-flex items-center gap-1",e),...a})}function td({className:e,...a}){return t.jsx(p.Menubar.Root,{"data-slot":"menubar",className:s("flex h-8 items-center gap-0.5 rounded-lg border bg-background p-[3px]",e),...a})}function ad({...e}){return t.jsx(p.Menubar.Menu,{"data-slot":"menubar-menu",...e})}function od({...e}){return t.jsx(p.Menubar.Group,{"data-slot":"menubar-group",...e})}function so({...e}){return t.jsx(p.Menubar.Portal,{"data-slot":"menubar-portal",...e})}function rd({...e}){return t.jsx(p.Menubar.RadioGroup,{"data-slot":"menubar-radio-group",...e})}function nd({className:e,...a}){return t.jsx(p.Menubar.Trigger,{"data-slot":"menubar-trigger",className:s("flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted",e),...a})}function sd({className:e,align:a="start",alignOffset:o=-4,sideOffset:r=8,...n}){return t.jsx(so,{children:t.jsx(p.Menubar.Content,{"data-slot":"menubar-content",align:a,alignOffset:o,sideOffset:r,className:s("z-50 min-w-36 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",e),...n})})}function id({className:e,inset:a,variant:o="default",...r}){return t.jsx(p.Menubar.Item,{"data-slot":"menubar-item","data-inset":a,"data-variant":o,className:s("group/menubar-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",e),...r})}function ld({className:e,children:a,checked:o,inset:r,...n}){return t.jsxs(p.Menubar.CheckboxItem,{"data-slot":"menubar-checkbox-item","data-inset":r,className:s("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0",e),checked:o,...n,children:[t.jsx("span",{className:"pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",children:t.jsx(p.Menubar.ItemIndicator,{children:t.jsx(N.CheckIcon,{})})}),a]})}function dd({className:e,children:a,inset:o,...r}){return t.jsxs(p.Menubar.RadioItem,{"data-slot":"menubar-radio-item","data-inset":o,className:s("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[t.jsx("span",{className:"pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",children:t.jsx(p.Menubar.ItemIndicator,{children:t.jsx(N.CheckIcon,{})})}),a]})}function cd({className:e,inset:a,...o}){return t.jsx(p.Menubar.Label,{"data-slot":"menubar-label","data-inset":a,className:s("px-1.5 py-1 text-sm font-medium data-inset:pl-7",e),...o})}function ud({className:e,...a}){return t.jsx(p.Menubar.Separator,{"data-slot":"menubar-separator",className:s("-mx-1 my-1 h-px bg-border",e),...a})}function pd({className:e,...a}){return t.jsx("span",{"data-slot":"menubar-shortcut",className:s("ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground",e),...a})}function md({...e}){return t.jsx(p.Menubar.Sub,{"data-slot":"menubar-sub",...e})}function fd({className:e,inset:a,children:o,...r}){return t.jsxs(p.Menubar.SubTrigger,{"data-slot":"menubar-sub-trigger","data-inset":a,className:s("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-none select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",e),...r,children:[o,t.jsx(N.ChevronRightIcon,{className:"ml-auto size-4"})]})}function gd({className:e,...a}){return t.jsx(p.Menubar.SubContent,{"data-slot":"menubar-sub-content",className:s("z-50 min-w-32 origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})}function xd({className:e,children:a,viewport:o=!0,...r}){return t.jsxs(p.NavigationMenu.Root,{"data-slot":"navigation-menu","data-viewport":o,className:s("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...r,children:[a,o&&t.jsx(lo,{})]})}function hd({className:e,...a}){return t.jsx(p.NavigationMenu.List,{"data-slot":"navigation-menu-list",className:s("group flex flex-1 list-none items-center justify-center gap-0",e),...a})}function bd({className:e,...a}){return t.jsx(p.NavigationMenu.Item,{"data-slot":"navigation-menu-item",className:s("relative",e),...a})}const io=ne.cva("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg bg-background px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted");function vd({className:e,children:a,...o}){return t.jsxs(p.NavigationMenu.Trigger,{"data-slot":"navigation-menu-trigger",className:s(io(),"group",e),...o,children:[a," ",t.jsx(N.ChevronDownIcon,{className:"relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180","aria-hidden":"true"})]})}function jd({className:e,...a}){return t.jsx(p.NavigationMenu.Content,{"data-slot":"navigation-menu-content",className:s("top-0 left-0 w-full p-1 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none md:absolute md:w-auto group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95",e),...a})}function lo({className:e,...a}){return t.jsx("div",{className:s("absolute top-full left-0 isolate z-50 flex justify-center"),children:t.jsx(p.NavigationMenu.Viewport,{"data-slot":"navigation-menu-viewport",className:s("origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg bg-popover text-popover-foreground shadow ring-1 ring-foreground/10 duration-100 md:w-(--radix-navigation-menu-viewport-width) data-open:animate-in data-open:zoom-in-90 data-closed:animate-out data-closed:zoom-out-95",e),...a})})}function wd({className:e,...a}){return t.jsx(p.NavigationMenu.Link,{"data-slot":"navigation-menu-link",className:s("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",e),...a})}function yd({className:e,...a}){return t.jsx(p.NavigationMenu.Indicator,{"data-slot":"navigation-menu-indicator",className:s("top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in",e),...a,children:t.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})})}function Cd({className:e,...a}){return t.jsx(p.RadioGroup.Root,{"data-slot":"radio-group",className:s("grid w-full gap-2",e),...a})}function Nd({className:e,...a}){return t.jsx(p.RadioGroup.Item,{"data-slot":"radio-group-item",className:s("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",e),...a,children:t.jsx(p.RadioGroup.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:t.jsx("span",{className:"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground"})})})}function kd({className:e,...a}){return t.jsx(Mt.Group,{"data-slot":"resizable-panel-group",className:s("flex h-full w-full aria-[orientation=vertical]:flex-col",e),...a})}function Md({...e}){return t.jsx(Mt.Panel,{"data-slot":"resizable-panel",...e})}function _d({withHandle:e,className:a,...o}){return t.jsx(Mt.Separator,{"data-slot":"resizable-handle",className:s("relative flex w-px items-center justify-center bg-border ring-offset-background after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-hidden aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90",a),...o,children:e&&t.jsx("div",{className:"z-10 flex h-6 w-1 shrink-0 rounded-lg bg-border"})})}function Sd({className:e,defaultValue:a,value:o,min:r=0,max:n=100,...i}){const d=H.useMemo(()=>Array.isArray(o)?o:Array.isArray(a)?a:[r,n],[o,a,r,n]);return t.jsxs(p.Slider.Root,{"data-slot":"slider",defaultValue:a,value:o,min:r,max:n,className:s("relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:min-h-40 data-vertical:w-auto data-vertical:flex-col",e),...i,children:[t.jsx(p.Slider.Track,{"data-slot":"slider-track",className:"relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",children:t.jsx(p.Slider.Range,{"data-slot":"slider-range",className:"absolute bg-primary select-none data-horizontal:h-full data-vertical:w-full"})}),Array.from({length:d.length},(f,u)=>t.jsx(p.Slider.Thumb,{"data-slot":"slider-thumb",className:"relative block size-3 shrink-0 rounded-full border border-ring bg-white ring-ring/50 transition-[color,box-shadow] select-none after:absolute after:-inset-2 hover:ring-3 focus-visible:ring-3 focus-visible:outline-hidden active:ring-3 disabled:pointer-events-none disabled:opacity-50"},u))]})}const zd=({...e})=>{const o=It()?"dark":"light";return t.jsx(be.Toaster,{theme:o,className:"toaster group",icons:{success:t.jsx(N.CircleCheckIcon,{className:"size-4"}),info:t.jsx(N.InfoIcon,{className:"size-4"}),warning:t.jsx(N.TriangleAlertIcon,{className:"size-4"}),error:t.jsx(N.OctagonXIcon,{className:"size-4"}),loading:t.jsx(N.Loader2Icon,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})};function Id({className:e,...a}){return t.jsx(N.Loader2Icon,{role:"status","aria-label":"Loading",className:s("size-4 animate-spin",e),...a})}const Vt=ne.cva("group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-muted"},size:{default:"h-8 min-w-8 px-2",sm:"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-1.5 text-[0.8rem]",lg:"h-9 min-w-9 px-2.5"}},defaultVariants:{variant:"default",size:"default"}});function Ad({className:e,variant:a="default",size:o="default",...r}){return t.jsx(p.Toggle.Root,{"data-slot":"toggle",className:s(Vt({variant:a,size:o,className:e})),...r})}const co=H.createContext({size:"default",variant:"default",spacing:0,orientation:"horizontal"});function Td({className:e,variant:a,size:o,spacing:r=0,orientation:n="horizontal",children:i,...d}){return t.jsx(p.ToggleGroup.Root,{"data-slot":"toggle-group","data-variant":a,"data-size":o,"data-spacing":r,"data-orientation":n,style:{"--gap":r},className:s("group/toggle-group flex w-fit flex-row items-center gap-[--spacing(var(--gap))] rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] data-vertical:flex-col data-vertical:items-stretch",e),...d,children:t.jsx(co.Provider,{value:{variant:a,size:o,spacing:r,orientation:n},children:i})})}function Dd({className:e,children:a,variant:o="default",size:r="default",...n}){const i=H.useContext(co);return t.jsx(p.ToggleGroup.Item,{"data-slot":"toggle-group-item","data-variant":i.variant||o,"data-size":i.size||r,"data-spacing":i.spacing,className:s("shrink-0 group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 focus:z-10 focus-visible:z-10 group-data-horizontal/toggle-group:data-[spacing=0]:first:rounded-l-lg group-data-vertical/toggle-group:data-[spacing=0]:first:rounded-t-lg group-data-horizontal/toggle-group:data-[spacing=0]:last:rounded-r-lg group-data-vertical/toggle-group:data-[spacing=0]:last:rounded-b-lg group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:border-l-0 group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:border-t-0 group-data-horizontal/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-l group-data-vertical/toggle-group:data-[spacing=0]:data-[variant=outline]:first:border-t",Vt({variant:i.variant||o,size:i.size||r}),e),...n,children:a})}exports.Accordion=Ss;exports.AccordionContent=As;exports.AccordionItem=zs;exports.AccordionTrigger=Is;exports.Alert=Aa;exports.AlertAction=dr;exports.AlertDescription=Da;exports.AlertDialog=Ts;exports.AlertDialogAction=Bs;exports.AlertDialogCancel=Us;exports.AlertDialogContent=Es;exports.AlertDialogDescription=Gs;exports.AlertDialogFooter=Ls;exports.AlertDialogHeader=Rs;exports.AlertDialogMedia=Os;exports.AlertDialogOverlay=Za;exports.AlertDialogPortal=Xa;exports.AlertDialogTitle=Ps;exports.AlertDialogTrigger=Ds;exports.AlertTitle=Ta;exports.AppHeader=ba;exports.AppLayout=xr;exports.AppSidebar=Ot;exports.AreaGraph=vr;exports.AspectRatio=Hs;exports.AssistantModal=Ro;exports.Avatar=_t;exports.AvatarBadge=Mo;exports.AvatarFallback=zt;exports.AvatarGroup=_o;exports.AvatarGroupCount=So;exports.AvatarImage=St;exports.Badge=Fs;exports.BarGraph=jr;exports.Boxplot=yr;exports.Breadcrumb=$s;exports.BreadcrumbEllipsis=Xs;exports.BreadcrumbItem=Ys;exports.BreadcrumbLink=Ws;exports.BreadcrumbList=Vs;exports.BreadcrumbPage=qs;exports.BreadcrumbSeparator=Ks;exports.Button=L;exports.ButtonGroup=Zs;exports.ButtonGroupSeparator=Qs;exports.ButtonGroupText=Js;exports.Calendar=ei;exports.CalendarDayButton=eo;exports.Card=lt;exports.CardAction=Yo;exports.CardContent=dt;exports.CardDescription=Vo;exports.CardFooter=Wo;exports.CardHeader=Rt;exports.CardTitle=Lt;exports.Carousel=ti;exports.CarouselContent=ai;exports.CarouselItem=oi;exports.CarouselNext=ni;exports.CarouselPrevious=ri;exports.Checkbox=si;exports.Chromatogram=Mr;exports.ChromatogramChart=Hr;exports.CodeEditor=je;exports.CodeScriptEditorButton=Lo;exports.Collapsible=ii;exports.CollapsibleContent=di;exports.CollapsibleTrigger=li;exports.Combobox=fi;exports.ComboboxChip=_i;exports.ComboboxChips=Mi;exports.ComboboxChipsInput=Si;exports.ComboboxCollection=Ci;exports.ComboboxContent=bi;exports.ComboboxEmpty=Ni;exports.ComboboxGroup=wi;exports.ComboboxInput=hi;exports.ComboboxItem=ji;exports.ComboboxLabel=yi;exports.ComboboxList=vi;exports.ComboboxSeparator=ki;exports.ComboboxTrigger=oo;exports.ComboboxValue=gi;exports.Command=Ii;exports.CommandDialog=Ai;exports.CommandEmpty=Ei;exports.CommandGroup=Ri;exports.CommandInput=Ti;exports.CommandItem=Oi;exports.CommandList=Di;exports.CommandSeparator=Li;exports.CommandShortcut=Pi;exports.ContextMenu=Gi;exports.ContextMenuCheckboxItem=Ki;exports.ContextMenuContent=Vi;exports.ContextMenuGroup=Ui;exports.ContextMenuItem=Yi;exports.ContextMenuLabel=Zi;exports.ContextMenuPortal=Hi;exports.ContextMenuRadioGroup=$i;exports.ContextMenuRadioItem=Xi;exports.ContextMenuSeparator=Ji;exports.ContextMenuShortcut=Qi;exports.ContextMenuSub=Fi;exports.ContextMenuSubContent=qi;exports.ContextMenuSubTrigger=Wi;exports.ContextMenuTrigger=Bi;exports.Dialog=Re;exports.DialogClose=ja;exports.DialogContent=Le;exports.DialogDescription=Tt;exports.DialogFooter=At;exports.DialogHeader=Oe;exports.DialogOverlay=wa;exports.DialogPortal=va;exports.DialogTitle=Pe;exports.DialogTrigger=Eo;exports.DotPlot=Fr;exports.Drawer=el;exports.DrawerClose=al;exports.DrawerContent=ol;exports.DrawerDescription=il;exports.DrawerFooter=nl;exports.DrawerHeader=rl;exports.DrawerOverlay=no;exports.DrawerPortal=ro;exports.DrawerTitle=sl;exports.DrawerTrigger=tl;exports.DropdownMenu=ll;exports.DropdownMenuCheckboxItem=fl;exports.DropdownMenuContent=ul;exports.DropdownMenuGroup=pl;exports.DropdownMenuItem=ml;exports.DropdownMenuLabel=hl;exports.DropdownMenuPortal=dl;exports.DropdownMenuRadioGroup=gl;exports.DropdownMenuRadioItem=xl;exports.DropdownMenuSeparator=bl;exports.DropdownMenuShortcut=vl;exports.DropdownMenuSub=jl;exports.DropdownMenuSubContent=yl;exports.DropdownMenuSubTrigger=wl;exports.DropdownMenuTrigger=cl;exports.Field=_l;exports.FieldContent=Sl;exports.FieldDescription=Al;exports.FieldError=Dl;exports.FieldGroup=kl;exports.FieldLabel=zl;exports.FieldLegend=Nl;exports.FieldSeparator=Tl;exports.FieldSet=Cl;exports.FieldTitle=Il;exports.Heatmap=Cn;exports.Histogram=zn;exports.HoverCard=El;exports.HoverCardContent=Ll;exports.HoverCardTrigger=Rl;exports.Input=Ge;exports.InputGroup=Ht;exports.InputGroupAddon=Ft;exports.InputGroupButton=$t;exports.InputGroupInput=ao;exports.InputGroupText=pi;exports.InputGroupTextarea=mi;exports.InputOTP=Ol;exports.InputOTPGroup=Pl;exports.InputOTPSeparator=Bl;exports.InputOTPSlot=Gl;exports.Item=$l;exports.ItemActions=Xl;exports.ItemContent=Wl;exports.ItemDescription=Kl;exports.ItemFooter=Jl;exports.ItemGroup=Ul;exports.ItemHeader=Zl;exports.ItemMedia=Yl;exports.ItemSeparator=Hl;exports.ItemTitle=ql;exports.Kbd=Ql;exports.KbdGroup=ed;exports.Label=we;exports.LaunchContent=Ho;exports.LineGraph=In;exports.Main=ks;exports.Menubar=td;exports.MenubarCheckboxItem=ld;exports.MenubarContent=sd;exports.MenubarGroup=od;exports.MenubarItem=id;exports.MenubarLabel=cd;exports.MenubarMenu=ad;exports.MenubarPortal=so;exports.MenubarRadioGroup=rd;exports.MenubarRadioItem=dd;exports.MenubarSeparator=ud;exports.MenubarShortcut=pd;exports.MenubarSub=md;exports.MenubarSubContent=gd;exports.MenubarSubTrigger=fd;exports.MenubarTrigger=nd;exports.Navbar=Na;exports.NavigationMenu=xd;exports.NavigationMenuContent=jd;exports.NavigationMenuIndicator=yd;exports.NavigationMenuItem=bd;exports.NavigationMenuLink=wd;exports.NavigationMenuList=hd;exports.NavigationMenuTrigger=vd;exports.NavigationMenuViewport=lo;exports.PieChart=Ms;exports.PlateMap=Oa;exports.ProtocolConfiguration=qo;exports.ProtocolYamlCard=Ko;exports.PythonEditorModal=Xo;exports.RadioGroup=Cd;exports.RadioGroupItem=Nd;exports.ResizableHandle=_d;exports.ResizablePanel=Md;exports.ResizablePanelGroup=kd;exports.ScatterGraph=_s;exports.ScrollArea=Ut;exports.ScrollBar=Pa;exports.Select=Be;exports.SelectContent=Fe;exports.SelectGroup=Oo;exports.SelectItem=$e;exports.SelectLabel=Po;exports.SelectScrollDownButton=Ca;exports.SelectScrollUpButton=ya;exports.SelectSeparator=Go;exports.SelectTrigger=He;exports.SelectValue=Ue;exports.Separator=ce;exports.Sheet=Fa;exports.SheetClose=Fn;exports.SheetContent=$a;exports.SheetDescription=Wa;exports.SheetFooter=Yn;exports.SheetHeader=Va;exports.SheetTitle=Ya;exports.SheetTrigger=Hn;exports.Sidebar=as;exports.SidebarContent=cs;exports.SidebarFooter=ls;exports.SidebarGroup=us;exports.SidebarGroupAction=ms;exports.SidebarGroupContent=fs;exports.SidebarGroupLabel=ps;exports.SidebarHeader=is;exports.SidebarInput=ss;exports.SidebarInset=ns;exports.SidebarMenu=gs;exports.SidebarMenuAction=vs;exports.SidebarMenuBadge=js;exports.SidebarMenuButton=bs;exports.SidebarMenuItem=xs;exports.SidebarMenuSkeleton=ws;exports.SidebarMenuSub=ys;exports.SidebarMenuSubButton=Ns;exports.SidebarMenuSubItem=Cs;exports.SidebarProvider=Ka;exports.SidebarRail=rs;exports.SidebarSeparator=ds;exports.SidebarTrigger=os;exports.Skeleton=kt;exports.Slider=Sd;exports.Spinner=Id;exports.Switch=_e;exports.TDPLink=gr;exports.Table=ka;exports.TableBody=_a;exports.TableCaption=ar;exports.TableCell=za;exports.TableFooter=tr;exports.TableHead=Sa;exports.TableHeader=Ma;exports.TableRow=yt;exports.Tabs=Ga;exports.TabsContent=Bn;exports.TabsList=Ua;exports.TabsTrigger=Ha;exports.TdpNavigationContext=Bt;exports.TdpNavigationProvider=mr;exports.TdpSearch=cr;exports.TetraScienceIcon=Dt;exports.Textarea=Et;exports.Toaster=zd;exports.Toggle=Ad;exports.ToggleGroup=Td;exports.ToggleGroupItem=Dd;exports.Tooltip=at;exports.TooltipContent=rt;exports.TooltipProvider=zo;exports.TooltipTrigger=ot;exports.badgeVariants=Ja;exports.buildTdpUrl=Ee;exports.buttonGroupVariants=Qa;exports.buttonVariants=tt;exports.getTdpBaseUrlFromReferrer=Pt;exports.navigateToTdpUrl=Gt;exports.navigationMenuTriggerStyle=io;exports.tabsListVariants=Ba;exports.tdpPaths=pr;exports.toggleVariants=Vt;exports.useCarousel=Ye;exports.useComboboxAnchor=zi;exports.useSearch=Ia;exports.useSidebar=Ve;exports.useTdpNavigation=fr;exports.useTdpNavigationContext=Ea;
|
|
11
|
+
//# sourceMappingURL=index.cjs.map
|