@collective-intelligence/ui-react 0.6.0 → 0.7.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 +220 -170
- package/dist/components/ai-elements/index.d.ts +445 -4
- package/dist/components/ai-elements/index.js +3 -1
- package/dist/components/icons/index.d.ts +184 -1
- package/dist/components/icons/index.js +1 -1
- package/dist/components/illustrations/index.js +1 -1
- package/dist/components/ui/index.d.ts +293 -235
- package/dist/components/ui/index.js +2 -4
- package/dist/components/ui-extensions/atoms/ThemeToggle/index.js +1 -1
- package/dist/components/ui-extensions/hooks/use-mobile.js +1 -1
- package/dist/components/ui-extensions/index.d.ts +36 -21
- package/dist/components/ui-extensions/index.js +6 -6
- package/dist/components/ui-extensions/molecules/LabeledField/index.d.ts +22 -0
- package/dist/components/ui-extensions/molecules/LabeledField/index.js +2 -0
- package/dist/components/ui-extensions/molecules/VideoPlayer/index.js +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/operations.js +1 -1
- package/dist/hooks/use-debounced-callback.js +1 -1
- package/dist/hooks/use-mount-action.js +1 -1
- package/dist/index-0dt7qv78.js +2 -0
- package/dist/index-33ef93f6.js +2 -0
- package/dist/index-410hza8j.js +2 -0
- package/dist/index-78w37zqq.js +2 -0
- package/dist/{index-9gtg7nt7.js → index-9tdk1jd5.js} +2 -2
- package/dist/index-ampejsqd.js +2 -0
- package/dist/index-aq49ztmj.js +2 -0
- package/dist/index-brb2fssx.js +4 -0
- package/dist/index-c4aack9s.js +2 -0
- package/dist/index-e0qytqhh.js +2 -0
- package/dist/index-eh2w7m4e.js +2 -0
- package/dist/index-ftn430ea.js +2 -0
- package/dist/{index-6r0znbzv.js → index-fzn1f905.js} +2 -2
- package/dist/index-hqx38rgx.js +0 -0
- package/dist/{index-4cds99c5.js → index-jmgcfmxe.js} +2 -2
- package/dist/index-jzyzapvz.js +2 -0
- package/dist/{index-qbwndfn2.js → index-kzykjydw.js} +2 -2
- package/dist/{index-zmwpsfzp.js → index-p2yzw0qb.js} +2 -2
- package/dist/index-pe89kg1j.js +2 -0
- package/dist/index-pkw46hwt.js +2 -0
- package/dist/index-q560eskm.js +2 -0
- package/dist/{index-rjemhrz1.js → index-r9trsk22.js} +2 -2
- package/dist/{index-vx2b9cz3.js → index-shpd3834.js} +2 -2
- package/dist/index-t2rwc8rk.js +2 -0
- package/dist/index-tb9dhges.js +2 -0
- package/dist/{index-9289ppfk.js → index-w3zn83g3.js} +2 -2
- package/dist/index-w7hwsck8.js +2 -0
- package/dist/index-wnkq9nn0.js +2 -0
- package/dist/index-xy8a2fr7.js +2 -0
- package/dist/index-yaf9t9w5.js +42 -0
- package/dist/index-yh7sjgdy.js +2 -0
- package/dist/index.js +1 -1
- package/dist/resources.js +1 -1
- package/dist/shadcn.css +3 -4
- package/dist/tokens/theme.js +1 -1
- package/dist/utils/cn.js +1 -1
- package/package.json +12 -45
- package/dist/chat.d.ts +0 -579
- package/dist/chat.js +0 -2
- package/dist/index-064d20xp.js +0 -2
- package/dist/index-0gzm7bb9.js +0 -2
- package/dist/index-1hxjsnw5.js +0 -2
- package/dist/index-2twj52t7.js +0 -2
- package/dist/index-2yf6mq9g.js +0 -2
- package/dist/index-64r6cav3.js +0 -1
- package/dist/index-7j277075.js +0 -2
- package/dist/index-ab3fc47y.js +0 -2
- package/dist/index-b1wfq5b8.js +0 -2
- package/dist/index-dg126t3v.js +0 -2
- package/dist/index-dvvkk1vk.js +0 -2
- package/dist/index-ecvn2gnv.js +0 -2
- package/dist/index-fnk7gsdd.js +0 -2
- package/dist/index-ggr2edm8.js +0 -2
- package/dist/index-m0v264jr.js +0 -2
- package/dist/index-ngpxevag.js +0 -2
- package/dist/index-nxbvv8m4.js +0 -2
- package/dist/index-pearjjhb.js +0 -2
- package/dist/index-r2snvwyb.js +0 -42
- package/dist/index-r5ds1mtq.js +0 -2
- package/dist/index-r7hjj3ek.js +0 -2
- package/dist/index-rgbg5bsy.js +0 -2
- package/dist/index-sd38wa4w.js +0 -2
- package/dist/index-t9yq7kfg.js +0 -2
- package/dist/index-tcwzyy71.js +0 -2
- package/dist/index-vyhk8kgm.js +0 -6
- package/dist/index-ykjbsyeq.js +0 -2
- package/dist/index-zrw7ne3f.js +0 -2
- package/dist/styles.css +0 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{Vo,St,Ve,Uo,Ho,zo,Go,$o,Gt,$t,Rt,Wo,qo,wt}from"../../index-064d20xp.js";import{i}from"../../index-dg126t3v.js";import{a}from"../../index-r2snvwyb.js";import"../../index-64r6cav3.js";import{N,O,V,sr,_,q,g,I}from"../../index-sd38wa4w.js";import{qt,jt,Kt,Ur,Ue,Yt,ue,He,Xt,Qe,Qt,Le,de,z,G,W,gr,Gr,$r,Wr,qr,jr,Kr,Tt,Zt,Jt,er,Xr,Qr,vr,xr,Jr,eo}from"../../index-vyhk8kgm.js";import{Vr,Pt,wn}from"../../index-fnk7gsdd.js";import"../../index-ngpxevag.js";import{ir,lr,cr}from"../../index-ggr2edm8.js";import{Qo}from"../../index-b1wfq5b8.js";import{T}from"../../index-r5ds1mtq.js";import{Te,Ee,ke}from"../../index-zrw7ne3f.js";import{Q,ro,oo,no,nr,ar}from"../../index-2twj52t7.js";import{br}from"../../index-9289ppfk.js";import{H,ve,Wt,It,Xe}from"../../index-2yf6mq9g.js";import{tr,rr,Ze,Je,ne,or,et}from"../../index-1hxjsnw5.js";import{b}from"../../index-ecvn2gnv.js";import{L}from"../../index-rgbg5bsy.js";import{v}from"../../index-tcwzyy71.js";import"../../index-9gtg7nt7.js";import{y,C}from"../../index-7j277075.js";import"../../index-0gzm7bb9.js";import{e}from"../../index-qbwndfn2.js";import{jsx as ic,jsxs as lc}from"react/jsx-runtime";var sc=({children:t,loading:r=!1,fullWidth:n=!1,className:o,disabled:s,variant:l,size:c,...d})=>lc(a,{variant:l,size:c,className:e(n&&"w-full",o),disabled:s===!0||r,...d,children:[r&&ic(wt,{size:20,className:"mr-2"}),t]}),cc=sc;import*as Wa from"react";import{jsx as Ga,jsxs as uc}from"react/jsx-runtime";var dc=({children:t,className:r,type:n="button",...o},s)=>uc(a,{ref:s,type:n,variant:"ghost",size:"sm",className:e("h-9 rounded-full border border-dashed border-border/80 bg-background px-3 text-xs font-medium text-muted-foreground shadow-xs transition-[transform,color,background-color,border-color] hover:border-primary/35 hover:bg-muted/45 hover:text-foreground active:scale-[0.98]",r),...o,children:[Ga("span",{className:"mr-2 inline-flex size-5 items-center justify-center rounded-full border border-border/70 bg-muted/45 text-foreground",children:Ga(Rt,{className:"size-3.5"})}),t]}),Fn=Wa.forwardRef(dc);Fn.displayName="AddItemButton";var pc=Fn;import{forwardRef as mc}from"react";import{jsx as gc}from"react/jsx-runtime";var Xa=(t,r,n)=>{if(r<1||r>12||n<1||n>31)return!1;let o=new Date(t,r-1,n);return o.getFullYear()===t&&o.getMonth()===r-1&&o.getDate()===n},fc=(t)=>{let r=t.trim();if(!r)return null;let n=/^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u.exec(r);if(n){let{year:s,month:l,day:c}=n.groups??{};return Xa(Number(s),Number(l),Number(c))?`${s}-${l}-${c}`:null}let o=/^(?<day>\d{1,2})[/\-.](?<month>\d{1,2})[/\-.](?<year>\d{4})$/u.exec(r);if(o){let{day:s,month:l,year:c}=o.groups??{},d=Number(s),u=Number(l),p=Number(c);if(!Xa(p,u,d))return null;return`${p}-${String(u).padStart(2,"0")}-${String(d).padStart(2,"0")}`}return null},Ua=mc(function({onPaste:r,...n},o){return gc(g,{ref:o,type:"date",onPaste:(l)=>{let c=l.clipboardData.getData("text"),d=fc(c);if(d!==null&&d!==""){l.preventDefault();let u=l.currentTarget,p=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.bind(u);if(p!==void 0)p(d),u.dispatchEvent(new Event("input",{bubbles:!0}))}r?.(l)},...n})});Ua.displayName="DateInput";var bc=Ua;import*as Ka from"react";import{jsx as hc}from"react/jsx-runtime";var Ya=i("font-display font-bold leading-[1.06] tracking-tight text-foreground",{defaultVariants:{size:"lg"},variants:{size:{lg:"text-[1.5rem] sm:text-[1.85rem]",md:"text-[1.15rem] sm:text-[1.25rem]",sm:"text-[1rem]",xl:"text-[2.1rem] sm:text-[2.5rem]"}}}),vc=({as:t="h2",size:r,className:n,...o},s)=>hc(t,{ref:s,className:e(Ya({size:r}),n),...o}),qa=Ka.forwardRef(vc);qa.displayName="DisplayHeading";var xc=qa;import*as Bt from"react";import{jsx as Hr,jsxs as Qa,Fragment as Za}from"react/jsx-runtime";var _n=Bt.forwardRef(function({value:r,label:n,variant:o="icon",copyLabel:s="Copy",copiedLabel:l="Copied",errorMessage:c="Failed to copy to clipboard",resetDelay:d=1500,className:u,onClick:p,...m},f){let[h,R]=Bt.useState(!1),x=Bt.useRef(null);Bt.useEffect(()=>()=>{if(x.current!==null)clearTimeout(x.current)},[]);let S=async(B)=>{p?.(B);try{if(await navigator.clipboard.writeText(r),R(!0),x.current!==null)clearTimeout(x.current);x.current=setTimeout(()=>{R(!1)},d)}catch{ue.error(c)}};if(o==="button")return Hr(a,{ref:f,type:"button",variant:"outline",onClick:(B)=>{S(B)},"aria-label":`Copy ${n}`,className:e("shrink-0",u),...m,children:h?Qa(Za,{children:[Hr(y,{className:"mr-1 size-4"}),l]}):Qa(Za,{children:[Hr(ne,{className:"mr-1 size-4"}),s]})});return Hr("button",{ref:f,type:"button",onClick:(B)=>{S(B)},"aria-label":`Copy ${n}`,className:e("flex size-8 shrink-0 items-center justify-center rounded-md border border-border bg-card text-muted-foreground transition hover:border-primary/40 hover:text-primary",u),...m,children:h?Hr(y,{className:"size-3.5 text-primary"}):Hr(ne,{className:"size-3.5"})})});_n.displayName="CopyButton";var yc=_n;import{jsx as Jo,jsxs as wc}from"react/jsx-runtime";var es="#a3d54a",ts=({className:t,...r})=>wc("svg",{...r,"aria-hidden":"true",className:e("size-6 shrink-0",t),"data-slot":"collective-intelligence-loader",fill:"none",viewBox:"0 0 24 24",children:[Jo("polyline",{className:"origin-center motion-safe:animate-[ci-breathe-left_1.8s_ease-in-out_infinite]",points:"10,5.5 4.5,12 10,18.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.2}),Jo("polyline",{className:"origin-center motion-safe:animate-[ci-breathe-right_1.8s_ease-in-out_infinite]",points:"14,5.5 19.5,12 14,18.5",stroke:es,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.2}),Jo("circle",{className:"origin-center [transform-box:fill-box] motion-safe:animate-[ci-pulse-dot_1.8s_ease-in-out_infinite]",cx:12,cy:12,fill:es,r:2.3})]});ts.displayName="CollectiveIntelligenceLoader";var Nc=ts;import{jsx as Cc}from"react/jsx-runtime";var Rc=({children:t,className:r})=>Cc("div",{className:e("text-destructive text-sm text-center",r),children:t}),Sc=Rc;import*as rs from"react";import{jsx as Tc}from"react/jsx-runtime";var Pc=({value:t,fallback:r="—",locale:n,className:o,...s},l)=>Tc("span",{ref:l,className:e("tabular-nums",o),...s,children:t===null||t===void 0?r:new Intl.NumberFormat(n).format(t)}),ns=rs.forwardRef(Pc);ns.displayName="FormattedNumber";var kc=ns;import*as os from"react";import{jsx as Ec}from"react/jsx-runtime";var Lc={accent:"bg-[color-mix(in_oklab,var(--chart-1)_12%,var(--card))] text-[color-mix(in_oklab,var(--chart-1)_85%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-1)_22%,var(--border))]",gold:"bg-[color-mix(in_oklab,var(--chart-3)_15%,var(--card))] text-[color-mix(in_oklab,var(--chart-3)_65%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-3)_28%,var(--border))]",neutral:"bg-(--bg-surface-alt)/70 text-(--text-secondary) border-(--border-subtle)",sage:"bg-[color-mix(in_oklab,var(--chart-2)_14%,var(--card))] text-[color-mix(in_oklab,var(--chart-2)_70%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-2)_26%,var(--border))]",sky:"bg-[color-mix(in_oklab,var(--chart-4)_14%,var(--card))] text-[color-mix(in_oklab,var(--chart-4)_70%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-4)_26%,var(--border))]",violet:"bg-[color-mix(in_oklab,var(--chart-5)_14%,var(--card))] text-[color-mix(in_oklab,var(--chart-5)_70%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-5)_26%,var(--border))]"},Dc={lg:"size-12 rounded-lg text-[17px] [&_svg]:size-6",md:"size-10 rounded-lg text-[15px] [&_svg]:size-5",sm:"size-8 rounded-md text-[13px] [&_svg]:size-4"},as=os.forwardRef(function({tone:r="neutral",size:n="md",initial:o,className:s,children:l,...c},d){return Ec("span",{ref:d,"aria-hidden":!0,className:e("inline-flex shrink-0 select-none items-center justify-center border font-display font-bold",Dc[n],Lc[r],s),...c,children:l??(o!==void 0&&o!==""?o.slice(0,2).toUpperCase():null)})});as.displayName="IconTile";var Mc=as;import*as ss from"react";import{jsx as Oc}from"react/jsx-runtime";var Ic={accent:"text-(--accent)",copper:"text-(--text-muted)",default:"text-(--text-muted)",muted:"text-(--text-muted)"},Ac=({as:t="span",tone:r="default",className:n,...o},s)=>Oc(t,{ref:s,className:e("inline-block text-[11px] font-semibold uppercase tracking-[0.06em]",Ic[r],n),...o}),Br=ss.forwardRef(Ac);Br.displayName="Kicker";var Hc=Br;import*as is from"react";import{jsx as Fc}from"react/jsx-runtime";var Vc=(t)=>`+${t}`,Bc=({expanded:t,hiddenCount:r,collapsedLabel:n=Vc,expandedLabel:o="Show less",onToggle:s,className:l,...c},d)=>Fc("button",{ref:d,type:"button",onClick:s,className:e("inline-flex items-center gap-1 rounded-full border border-dashed border-muted-foreground/40 bg-muted/20 px-2.5 py-1 text-[11px] font-medium text-muted-foreground hover:bg-muted/40 hover:text-foreground transition-colors",l),...c,children:t?o:n(r)}),ls=is.forwardRef(Bc);ls.displayName="ShowMoreTag";var _c=ls;import*as cs from"react";import{jsx as jc}from"react/jsx-runtime";var zc=i("font-sans leading-none tabular-nums text-primary",{defaultVariants:{size:"md"},variants:{size:{lg:"text-[1.4rem]",md:"text-[1.1rem]",sm:"text-[0.95rem]",xl:"text-[2rem]"}}}),$c=({size:t,className:r,...n},o)=>jc("span",{ref:o,className:e(zc({size:t}),r),...n}),Fr=cs.forwardRef($c);Fr.displayName="SerifNumeral";var Jc=Fr;import*as ps from"react";import{jsx as us,jsxs as ds}from"react/jsx-runtime";var Gc={neutral:"border-(--border-subtle) bg-card text-muted-foreground",warning:"border-[color-mix(in_oklab,var(--warning)_40%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_12%,var(--card))] text-[color-mix(in_oklab,var(--warning)_75%,var(--foreground))]"},Wc=({tooltip:t,tone:r="neutral",icon:n,className:o,children:s,...l},c)=>ds(Zt,{children:[us(Jt,{asChild:!0,children:ds(T,{ref:c,variant:"outline",className:e(Gc[r],o),...l,children:[n,s]})}),us(er,{children:t})]}),ms=ps.forwardRef(Wc);ms.displayName="TooltipBadge";var Xc=ms;import*as fs from"react";import{jsx as Kc}from"react/jsx-runtime";var Uc={body1:{className:"text-base",tag:"p"},body2:{className:"text-sm",tag:"p"},h1:{className:"text-2xl font-semibold",tag:"h1"},h2:{className:"text-xl font-bold",tag:"h2"},h3:{className:"text-lg font-semibold",tag:"h3"},h4:{className:"text-base font-medium",tag:"h4"},subtitle1:{className:"text-base font-normal text-muted-foreground",tag:"h6"},subtitle2:{className:"text-sm font-medium text-muted-foreground",tag:"h6"}},zn=fs.forwardRef(function({variant:r="body1",as:n,className:o,...s},l){let{tag:c,className:d}=Uc[r];return Kc(n??c,{ref:l,className:e(d,o),...s})});zn.displayName="Typography";import{jsx as qc}from"react/jsx-runtime";var Yc=({children:t,as:r="form",className:n,onSubmit:o,...s})=>{let l=(c)=>{c.preventDefault(),o?.(c)};return qc(r,{className:e("flex flex-col gap-4 min-w-[300px]",n),onSubmit:l,...s,children:t})},Zc=Yc;import{jsx as rd}from"react/jsx-runtime";var gs={},_r=(...t)=>{for(let r of t)if(r!==void 0)return r;return 1},Qc=(t=gs)=>({"--list-cols":_r(t.cols),"--list-cols-2xl":_r(t.cols2xl,t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-lg":_r(t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-md":_r(t.colsMd,t.colsSm,t.cols),"--list-cols-sm":_r(t.colsSm,t.cols),"--list-cols-xl":_r(t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols)}),ed=["grid","gap-4","[grid-template-columns:repeat(var(--list-cols),minmax(0,1fr))]","sm:[grid-template-columns:repeat(var(--list-cols-sm),minmax(0,1fr))]","md:[grid-template-columns:repeat(var(--list-cols-md),minmax(0,1fr))]","lg:[grid-template-columns:repeat(var(--list-cols-lg),minmax(0,1fr))]","xl:[grid-template-columns:repeat(var(--list-cols-xl),minmax(0,1fr))]","2xl:[grid-template-columns:repeat(var(--list-cols-2xl),minmax(0,1fr))]"].join(" "),td=({cols:t=gs,children:r,...n})=>rd("div",{className:ed,style:Qc(t),...n,children:r});import{jsx as od}from"react/jsx-runtime";var nd=({className:t,spaced:r=!1,...n})=>od("div",{className:e("animate-[rise-in_500ms_cubic-bezier(0.16,1,0.3,1)_both]",r&&"space-y-6",t),...n});var ad=nd;import{jsx as xn,jsxs as zr}from"react/jsx-runtime";var sd=(t)=>t!==null&&t!==void 0&&t.constructor===String,hn=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==""&&t!==0,id=({title:t,description:r,icon:n,kicker:o,status:s,actions:l,className:c})=>zr("header",{className:e("space-y-2",c),children:[hn(o)?zr("div",{className:"flex items-center gap-2 text-(--text-muted) [&_svg]:h-3.5 [&_svg]:w-3.5",children:[hn(n)?xn("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-sm bg-(--bg-accent-soft) text-(--accent)",children:n}):null,xn("span",{className:"text-[12px] font-medium tracking-tight [&_span.sep]:mx-1.5 [&_span.sep]:text-(--accent)",children:sd(o)?o.split("·").map((d,u,p)=>zr("span",{children:[d.trim(),u<p.length-1?xn("span",{className:"sep","aria-hidden":!0,children:"·"}):null]},u)):o})]}):null,zr("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[zr("div",{className:"min-w-0 flex-1 basis-64 space-y-1.5",children:[xn("h1",{className:"font-display text-[27px] font-bold leading-tight tracking-[-0.02em] text-(--text-primary)",children:t}),hn(r)?xn("p",{className:"max-w-2xl text-[14px] leading-relaxed text-(--text-secondary)",children:r}):null]}),hn(l)||hn(s)?zr("div",{className:"flex shrink-0 items-center gap-2 pt-1",children:[s,l]}):null]})]}),ld=id;import*as vs from"react";import{jsx as $n,jsxs as bs}from"react/jsx-runtime";var Xo=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),hs=vs.forwardRef(function({icon:r,title:n,description:o,action:s,className:l,...c},d){return bs("div",{ref:d,className:e("flex items-start gap-3",l),...c,children:[Xo(r)?$n("span",{"aria-hidden":!0,className:"mt-0.5 inline-flex shrink-0 items-center justify-center rounded-md bg-muted p-2 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4",children:r}):null,bs("div",{className:"min-w-0 flex-1",children:[$n("h3",{className:"text-[15px] font-semibold leading-snug text-foreground",children:n}),Xo(o)?$n("p",{className:"mt-0.5 text-sm leading-relaxed text-muted-foreground",children:o}):null]}),Xo(s)?$n("div",{className:"shrink-0",children:s}):null]})});hs.displayName="SectionHeader";var cd=hs;import{jsx as xs,jsxs as ud}from"react/jsx-runtime";var dd=({title:t,toolbar:r})=>ud("div",{className:"flex items-center justify-between mb-12",children:[xs(zn,{variant:"h2",children:t}),Boolean(r)&&xs("div",{className:"flex items-center gap-2",children:r})]}),pd=dd;import*as Jn from"react";import{jsx as tt,jsxs as jn}from"react/jsx-runtime";var ys=(t,r,n)=>{if(t.length>=r)return t;return[...t,...Array.from({length:r-t.length},n)]},md=[],Ko=({values:t,defaultValues:r=md,onValuesChange:n,addLabel:o,getRemoveLabel:s,actions:l,minItems:c=0,disabled:d=!1,renderItem:u,createItem:p,validateItem:m,classes:f,className:h,id:R,...x})=>{let S=Jn.useId(),[B,E]=Jn.useState(()=>ys(r,c,p)),P=ys(t??B,c,p),k=Boolean(l),M=(j)=>{if(t===void 0)E(j);n?.(j)};return jn("div",{"data-slot":"array-input",className:e("space-y-2",f?.root,h),...x,children:[tt("div",{className:"space-y-2",children:P.map((j,D)=>{let A=D===0&&R!==void 0&&R!==""?R:`${S}-${D}`,F=m?.(j,D);return jn("div",{className:e("flex items-center gap-3",f?.row),children:[u({disabled:d,id:A,index:D,onValueChange:(Z)=>{let X=[...P];X[D]=Z,M(X)},validationMessage:F,value:j}),P.length>c?tt(a,{type:"button",variant:"ghost",size:"icon",disabled:d,"aria-label":s(D),className:e("size-10 shrink-0 text-muted-foreground hover:text-destructive",f?.removeButton),onClick:()=>{M(P.filter((Z,X)=>X!==D))},children:tt(Wo,{"aria-hidden":"true",className:"size-4"})}):null]},D)})}),jn("div",{className:e("flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",f?.actionRow),children:[tt(Fn,{disabled:d,className:f?.addButton,onClick:()=>{M([...P,p()])},children:o}),k?tt("div",{className:e("sm:ml-auto",f?.actions),children:l}):null]})]})},fd=(t)=>{let{createItem:r,getItemLabel:n,inputProps:o,placeholder:s,required:l=!1,renderItem:c,...d}=t,{className:u,...p}=o??{};if(c!==void 0)return tt(Ko,{...d,createItem:r??(()=>""),renderItem:c});return tt(Ko,{...d,createItem:r??(()=>""),renderItem:(m)=>{let{disabled:f,id:h,index:R,onValueChange:x,validationMessage:S,value:B}=m;return jn("div",{className:"min-w-0 flex-1",children:[tt(g,{...p,id:h,"aria-label":n(R),"aria-invalid":Boolean(S),value:B,placeholder:s,required:l,disabled:f,className:e("w-full",u,d.classes?.input),onChange:(E)=>{x(E.target.value)}}),S!==void 0&&S!==""?tt("p",{className:"mt-1 text-xs text-destructive",role:"alert",children:S}):null]})}})},gd=(t)=>tt(Ko,{...t}),bd=(t)=>t.createItem!==void 0&&t.renderItem!==void 0,ws=(t)=>{if(bd(t))return tt(gd,{...t});return tt(fd,{...t})};ws.displayName="ArrayInput";var vd=ws;import*as Yr from"react";var Ft=(t,r)=>{let n=[];for(let o of t){let s=n.findIndex((l)=>r(o,l)<0);if(s===-1)n.push(o);else n.splice(s,0,o)}return n};var rt={hour:9,interval:1,minute:0,mode:"day",monthday:1,weekdays:[1,2,3,4,5]},Yo=/^\*\/(?<step>\d+)$/u,hd=(t)=>{let r=[];for(let n of t.split(",")){let o=/^(?<start>\d+)-(?<end>\d+)$/u.exec(n);if(o){let s=Number(o.groups?.start),l=Number(o.groups?.end);if(s>l)return null;for(let c=s;c<=l;c+=1)r.push(c)}else if(/^\d+$/u.test(n))r.push(Number(n));else return null}return r},xd=(t,r,n,o)=>{if(r==="*"&&n==="*"&&o==="*"){let s=Yo.exec(t),l=Number(s?.groups?.step);return s&&l>=1&&l<=59?{...rt,interval:l,mode:"minutes"}:null}return},yd=(t,r,n,o)=>{if(r!=="*"||n!=="*")return;let s=Yo.exec(t);if(s){let l=Number(s.groups?.step);return l>=1&&l<=23?{...rt,interval:l,minute:o,mode:"hours"}:null}return},wd=(t,r,n)=>{let o=Yo.exec(t);if(o){let l=Number(o.groups?.step);if(l%7===0&&l>=7&&l<=28)return{...rt,hour:r,interval:l/7,minute:n,mode:"weeks"};return l>=1&&l<=31?{...rt,hour:r,interval:l,minute:n,mode:"days"}:null}let s=Number(t);return/^\d+$/u.test(t)&&s>=1&&s<=31?{...rt,hour:r,minute:n,mode:"month",monthday:s}:null},Nd=(t,r,n)=>{let o=hd(t);if(!o||o.some((l)=>l<0||l>7))return null;let s=Ft(new Set(o.map((l)=>l===7?0:l)),(l,c)=>l-c);return{...rt,hour:r,minute:n,mode:"week",weekdays:s}},yn=(t)=>{let r=t.trim().split(/\s+/u);if(r.length!==5)return null;let[n,o,s,l,c]=r;if(l!=="*")return null;let d=xd(n,o,s,c);if(d!==void 0)return d;if(!/^\d+$/u.test(n))return null;let u=Number(n);if(u<0||u>59)return null;let p=yd(o,s,c,u);if(p!==void 0)return p;if(!/^\d+$/u.test(o))return null;let m=Number(o);if(m<0||m>23)return null;if(s==="*"&&c==="*")return{...rt,hour:m,minute:u,mode:"day"};if(c==="*")return wd(s,m,u);if(s==="*")return Nd(c,m,u);return null},_t=(t)=>{let r=Math.max(1,Math.floor(t.interval));switch(t.mode){case"minutes":return`*/${Math.min(r,59)} * * * *`;case"hours":return`${t.minute} */${Math.min(r,23)} * * *`;case"day":return`${t.minute} ${t.hour} * * *`;case"days":return`${t.minute} ${t.hour} */${Math.min(r,31)} * *`;case"week":{let n=t.weekdays.length>0?Ft(new Set(t.weekdays),(o,s)=>o-s).join(","):"*";return`${t.minute} ${t.hour} * * ${n}`}case"weeks":return`${t.minute} ${t.hour} */${Math.min(r*7,28)} * *`;case"month":return`${t.minute} ${t.hour} ${Math.min(Math.max(t.monthday,1),31)} * *`;default:throw Error("Unsupported cron mode")}},Ns=(t,r,n)=>{if(t==="*")return!0;for(let o of t.split(",")){let s=/^(?<base>\*|\d+|\d+-\d+)\/(?<increment>\d+)$/u.exec(o);if(s){let c=s.groups?.base??"";if(c!=="*"&&!Ns(c,r,n))return!1;let d=Number(s.groups?.increment);if(!Number.isFinite(d)||d<1)return!1;continue}let l=/^(?<start>\d+)-(?<end>\d+)$/u.exec(o);if(l){let c=Number(l.groups?.start),d=Number(l.groups?.end);if(c<r||d>n||c>d)return!1;continue}if(/^\d+$/u.test(o)){let c=Number(o);if(c<r||c>n)return!1;continue}return!1}return!0},Rd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Cd=(t,r)=>{let n=String(t).padStart(2,"0"),o=String(r).padStart(2,"0");return`${n}:${o}`},Gn=(t)=>{let r=yn(t);if(!r)return t;let n=Cd(r.hour,r.minute);switch(r.mode){case"minutes":return r.interval===1?"Every minute":`Every ${r.interval} minutes`;case"hours":return r.interval===1?`Every hour at :${String(r.minute).padStart(2,"0")}`:`Every ${r.interval} hours at :${String(r.minute).padStart(2,"0")}`;case"day":return`Every day at ${n}`;case"days":return r.interval===1?`Every day at ${n}`:`Every ${r.interval} days at ${n}`;case"week":{if(r.weekdays.length===0)return`Weekly at ${n}`;let o=Ft(r.weekdays,(d,u)=>d-u),s=o.length===5&&o.every((d,u)=>d===u+1),l=o.length===2&&o[0]===0&&o[1]===6;if(s)return`Weekdays at ${n}`;if(l)return`Weekends at ${n}`;return`${o.map((d)=>Rd[d].slice(0,3)).join(", ")} at ${n}`}case"weeks":return r.interval===1?`Every week at ${n}`:`Every ${r.interval} weeks at ${n}`;case"month":return`Day ${r.monthday} of every month at ${n}`;default:throw Error("Unsupported cron mode")}},Zo=(t)=>{let r=t.trim().split(/\s+/u);if(r.length!==5)return!1;let n=[[0,59],[0,23],[1,31],[1,12],[0,7]];return r.every((o,s)=>Ns(o,n[s][0],n[s][1]))};import*as Cs from"react";var Rs=(t)=>{let o=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(new Date).find((u)=>u.type==="timeZoneName")?.value??"GMT",s=/(?<sign>[+-])(?<hours>\d{1,2})(?::(?<minutes>\d{2}))?/u.exec(o);if(!s)return 0;let l=s.groups?.sign==="-"?-1:1,c=Number(s.groups?.hours??0),d=Number(s.groups?.minutes??0);return l*(c*60+d)},Sd=(t)=>{let r=Rs(t),n=r>=0?"+":"-",o=Math.abs(r),s=String(Math.floor(o/60)).padStart(2,"0"),l=String(o%60).padStart(2,"0");return`${n}${s}:${l}`},Wn=null,ea=()=>{if(Wn)return Wn;let t="supportedValuesOf"in Intl?Intl.supportedValuesOf("timeZone"):["UTC"];return Wn=Ft(["UTC",...t].map((r)=>({label:`${r} (UTC${Sd(r)})`,offset:Rs(r),value:r})),(r,n)=>r.offset-n.offset||r.value.localeCompare(n.value)).map(({value:r,label:n})=>({label:n,value:r})),Wn};import{jsx as Pd}from"react/jsx-runtime";var Xn=({value:t,onChange:r,className:n,width:o="100%",disabled:s,placeholder:l="Select timezone"})=>{let c=Cs.useMemo(()=>ea(),[]);return Pd(gr,{options:c,value:t,onChange:(d)=>{r(d||"UTC")},placeholder:l,searchPlaceholder:"Search timezone...",emptyMessage:"No timezone found.",className:e("bg-transparent font-normal",n),width:o,disabled:s})};import{jsx as te,jsxs as Se,Fragment as Id}from"react/jsx-runtime";var Ts=[{label:"X minutes",value:"minutes"},{label:"X hours",value:"hours"},{label:"Day",value:"day"},{label:"X days",value:"days"},{label:"Week",value:"week"},{label:"X weeks",value:"weeks"},{label:"Month",value:"month"}],Td=[{label:"Monday",short:"Mon",value:1},{label:"Tuesday",short:"Tue",value:2},{label:"Wednesday",short:"Wed",value:3},{label:"Thursday",short:"Thu",value:4},{label:"Friday",short:"Fri",value:5},{label:"Saturday",short:"Sat",value:6},{label:"Sunday",short:"Sun",value:0}],kd=(t)=>Ts.some((r)=>r.value===t),Ss=(t)=>{let r=t.trim();if(!r)return{custom:_t(rt),simple:rt,view:"simple"};let n=yn(r);if(n)return{custom:r,simple:n,view:"simple"};return{custom:r,simple:rt,view:"advanced"}},Ld=(t,r)=>{let n=r===1;switch(t.value){case"minutes":return n?"minute":"minutes";case"hours":return n?"hour":"hours";case"day":return"day";case"days":return n?"day":"days";case"week":return"week";case"weeks":return n?"week":"weeks";case"month":return"month";default:throw Error("Unsupported cron mode")}},Un=(t,r,n)=>Math.max(r,Math.min(n,t)),Ps=(t)=>String(t).padStart(2,"0"),Dd=({hour:t,minute:r,onChange:n})=>Se("div",{className:"flex items-center gap-1",children:[te(g,{type:"number",min:0,max:23,value:Ps(t),onChange:(o)=>{n(Un(Number(o.target.value)||0,0,23),r)},className:"w-16 text-center font-mono"}),te("span",{className:"text-muted-foreground",children:":"}),te(g,{type:"number",min:0,max:59,value:Ps(r),onChange:(o)=>{n(t,Un(Number(o.target.value)||0,0,59))},className:"w-16 text-center font-mono"})]}),Ed=({state:t,onChange:r,timezone:n,onTimezoneChange:o})=>{let s=t.mode==="minutes"||t.mode==="hours"||t.mode==="days"||t.mode==="weeks",l=t.mode!=="minutes"&&t.mode!=="hours",c=t.mode==="hours",d=t.mode==="week",u=t.mode==="month";return Se("div",{className:"space-y-3",children:[te("div",{className:"grid gap-2 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-end",children:Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"Every"}),Se("div",{className:e("grid gap-2",s?"grid-cols-[88px_minmax(0,1fr)]":"grid-cols-1"),children:[s&&te(g,{type:"number",min:1,value:t.interval,onChange:(p)=>{r({interval:Math.max(1,Number(p.target.value)||1)})},className:"font-mono"}),Se($r,{value:t.mode,onValueChange:(p)=>{if(kd(p))r({mode:p})},children:[te(qr,{className:"flex-1",children:te(Wr,{})}),te(Kr,{children:Ts.map((p)=>te(jr,{value:p.value,children:Ld(p,t.interval)},p.value))})]})]})]})}),d&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"On"}),te(Jr,{type:"multiple",variant:"outline",size:"sm",value:t.weekdays.map(String),onValueChange:(p)=>{r({weekdays:p.length?Ft(p.map(Number),(m,f)=>m-f):[1]})},className:"w-full",children:Td.map((p)=>te(eo,{value:String(p.value),"aria-label":p.label,className:"text-xs",children:p.short},p.value))})]}),u&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"On day"}),te(g,{type:"number",min:1,max:31,value:t.monthday,onChange:(p)=>{r({monthday:Un(Number(p.target.value)||1,1,31)})},className:"w-24"})]}),(l||n!==void 0&&o)&&Se("div",{className:e("grid gap-3",l&&n!==void 0&&o?"lg:grid-cols-[auto_minmax(0,1fr)] lg:items-end":"grid-cols-1"),children:[l&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"At"}),te(Dd,{hour:t.hour,minute:t.minute,onChange:(p,m)=>{r({hour:p,minute:m})}})]}),n!==void 0&&o&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),te(Xn,{value:n,onChange:o})]})]}),c&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"At minute"}),te(g,{type:"number",min:0,max:59,value:t.minute,onChange:(p)=>{r({minute:Un(Number(p.target.value)||0,0,59)})},className:"w-24"})]})]})},Md=({value:t,onChange:r,className:n,showPreview:o=!0,timezone:s,onTimezoneChange:l})=>{let[c,d]=Yr.useState(()=>Ss(t)),[u,p]=Yr.useState(t),[m,f]=Yr.useState(t);if(t!==u){if(p(t),t!==m)f(t),d(Ss(t))}let h=Yr.useCallback((P)=>{let k=P.view==="simple"?_t(P.simple):P.custom;f(k),r(k)},[r]),R=(P)=>{d((k)=>{let M={...k.simple,...P},j={...k,custom:_t(M),simple:M};return h(j),j})},x=(P)=>{d((k)=>{let M={...k,custom:P};return h(M),M})},S=(P)=>{d((k)=>{if(P===k.view)return k;if(P==="advanced"){let D=_t(k.simple),A={...k,custom:D,view:P};return h(A),A}let M=yn(k.custom),j=M?{...k,simple:M,view:P}:{...k,view:P};return h(j),j})},B=Zo(c.custom),E=null;if(c.view==="simple")E=Gn(_t(c.simple));else if(B)E=Gn(c.custom);return Se("div",{className:e("space-y-4",n),children:[Se(Xr,{value:c.view,onValueChange:(P)=>{if(P==="simple"||P==="advanced")S(P)},children:[Se(Qr,{className:"grid w-full grid-cols-2 rounded-md bg-muted/70 p-1 sm:w-[320px]",children:[te(vr,{value:"simple",className:"text-xs",children:"Simple"}),te(vr,{value:"advanced",className:"text-xs",children:"Advanced"})]}),te(xr,{value:"simple",className:"space-y-3 pt-3",children:te(Ed,{state:c.simple,onChange:R,timezone:s,onTimezoneChange:l})}),Se(xr,{value:"advanced",className:"space-y-2 pt-3",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"Cron Expression"}),te(g,{value:c.custom,onChange:(P)=>{x(P.target.value)},placeholder:"0 9 * * 1-5",className:e("font-mono text-sm",!B&&c.custom.trim()&&"border-destructive focus-visible:ring-destructive/40"),spellCheck:!1}),te("p",{className:"text-[11px] text-muted-foreground",children:"Format: minute hour day-of-month month day-of-week"})]})]}),c.view==="advanced"&&s!==void 0&&l&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),te(Xn,{value:s,onChange:l})]}),o&&te("div",{className:"flex min-h-8 flex-wrap items-center gap-2 rounded-md bg-muted/35 px-3 py-2 text-xs",children:E===null?te("span",{className:"text-destructive",children:"Invalid cron expression"}):Se(Id,{children:[te("span",{className:"text-muted-foreground",children:E}),te(T,{variant:"secondary",className:"ml-auto font-mono text-[11px]",children:c.view==="simple"?_t(c.simple):c.custom})]})})]})};import{jsx as ta}from"react/jsx-runtime";var Ad={both:"w-full h-full",horizontal:"w-full h-auto",none:"",vertical:"h-full w-auto"},Od=({src:t,alt:r="",className:n="",width:o,height:s,fill:l="horizontal",style:c})=>{if(l==="both")return ta("div",{className:e("relative overflow-hidden rounded-lg shadow-md",n),style:{height:s,width:o,...c},children:ta("img",{src:t,alt:r,className:"object-cover w-full h-full absolute inset-0"})});return ta("img",{src:t,alt:r,width:o,height:s,className:e("object-cover rounded-lg shadow-md",Ad[l],n),style:{height:l==="vertical"?"100%":s,width:l==="horizontal"?"100%":o,...c}})},Hd=Od;import{jsx as Kn,jsxs as ks}from"react/jsx-runtime";var Vd=({title:t,className:r,children:n,...o})=>ks("section",{"data-slot":"summary-list",className:e("space-y-2",r),...o,children:[t?Kn("h3",{className:"text-sm font-semibold tracking-tight",children:t}):null,Kn("dl",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border bg-card",children:n})]}),Bd=({label:t,value:r,muted:n=!1,className:o,...s})=>ks("div",{"data-slot":"summary-item",className:e("grid gap-1 px-4 py-3 sm:grid-cols-[minmax(8rem,14rem)_1fr] sm:gap-4",o),...s,children:[Kn("dt",{className:"text-sm text-muted-foreground",children:t}),Kn("dd",{className:e("min-w-0 break-words text-sm",n?"text-muted-foreground":"font-medium text-foreground"),children:r})]});import*as ra from"react";import{jsx as hr,jsxs as Ls}from"react/jsx-runtime";var Fd=({className:t,...r})=>hr(ro,{"data-slot":"choice-card-group",className:e("grid gap-3",t),...r}),_d=({title:t,description:r,media:n,footer:o,className:s,...l})=>{let c=ra.useId(),d=ra.useId(),u=Boolean(r);return Ls(oo,{"data-slot":"choice-card","aria-labelledby":c,"aria-describedby":u?d:void 0,className:e("group/choice relative flex h-full min-w-0 flex-col items-start gap-4 rounded-lg border border-border bg-card p-5 text-left shadow-(--shadow-sm) outline-none transition-[border-color,background-color,box-shadow] dark:shadow-none","hover:border-foreground/25 focus-visible:ring-[3px] focus-visible:ring-ring/50","data-[state=checked]:border-primary data-[state=checked]:bg-primary/[0.04] data-[state=checked]:ring-1 data-[state=checked]:ring-primary/25","disabled:cursor-not-allowed disabled:bg-muted/30 disabled:opacity-65 disabled:hover:border-border",s),...l,children:[hr("span",{"aria-hidden":!0,className:"absolute top-4 right-4 flex size-5 items-center justify-center rounded-full border border-input bg-background text-primary-foreground transition-colors group-data-[state=checked]/choice:border-primary group-data-[state=checked]/choice:bg-primary",children:hr(no,{children:hr(y,{className:"size-3",strokeWidth:3})})}),n,Ls("span",{className:"block min-w-0 space-y-1 pr-7",children:[hr("span",{id:c,className:"block font-semibold tracking-tight",children:t}),u?hr("span",{id:d,className:"block text-sm leading-relaxed text-muted-foreground",children:r}):null]}),o?hr("span",{className:"mt-auto block w-full",children:o}):null]})};import*as zt from"react";import{jsx as Ut,jsxs as Ds}from"react/jsx-runtime";var Es=zt.forwardRef(function({className:r,...n},o){return Ut("div",{ref:o,className:e("grid gap-2",r),...n})}),Ms=({className:t,...r})=>Ut(nr,{className:e("grid gap-2",t),...r}),na=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),Yn=zt.forwardRef(function({title:r,description:n,descriptionId:o,wrapDescription:s=!1,disabled:l=!1,control:c,className:d,children:u,...p},m){return Ds("label",{ref:m,className:e("flex min-w-0 items-start gap-3 rounded-md border border-border p-3","has-[[data-state=checked]]:border-primary/50 has-[[data-state=checked]]:bg-primary/5",l?"cursor-not-allowed bg-muted/30 opacity-65":"cursor-pointer hover:bg-muted/50",d),...p,children:[c,Ds("span",{className:"min-w-0 flex-1",children:[Ut("span",{className:"block truncate text-sm font-medium",children:r}),na(n)?Ut("span",{id:o,className:e("mt-1 block text-xs text-muted-foreground",!s&&"truncate"),children:n}):null,u]})]})}),Is=(t)=>Object.prototype.toString.call(t)==="[object String]",As=(t,r)=>t!==null&&r instanceof Node&&(t.contains(r)||r instanceof HTMLInputElement&&r.getAttribute("aria-hidden")==="true"),zd=({value:t,title:r,description:n,radioLabel:o,disabled:s=!1,onClick:l,...c})=>{let d=zt.useId(),u=zt.useId(),p=o??(Is(r)?r:void 0);return Ut(Yn,{description:n,descriptionId:u,disabled:s,title:r,onClick:(m)=>{if(l?.(m),m.defaultPrevented||s)return;let f=document.querySelector(`#${d}`);if(As(f,m.target))return;m.preventDefault(),f?.click()},control:Ut(ar,{"aria-describedby":na(n)?u:void 0,"aria-label":p,className:"mt-1",disabled:s,id:d,value:t}),...c})},$d=({checked:t,title:r,description:n,checkboxLabel:o,disabled:s=!1,onClick:l,onCheckedChange:c,...d})=>{let u=zt.useId(),p=zt.useId(),m=o??(Is(r)?r:void 0);return Ut(Yn,{description:n,descriptionId:p,disabled:s,title:r,onClick:(f)=>{if(l?.(f),f.defaultPrevented||s)return;if(As(document.querySelector(`#${u}`),f.target))return;f.preventDefault(),c(!t)},control:Ut(Yt,{"aria-describedby":na(n)?p:void 0,"aria-label":m,checked:t,className:"mt-0.5",disabled:s,id:u,onCheckedChange:(f)=>{if(!s)c(f===!0)}}),...d})};Es.displayName="CardOptionsBlock";Ms.displayName="RadioCardOptionsBlock";Yn.displayName="CardOption";import*as Os from"react";import{jsx as Nn,jsxs as oa}from"react/jsx-runtime";var jd=({title:t,description:r,command:n,copyLabel:o=t??n,copyErrorMessage:s,className:l,...c},d)=>oa("div",{ref:d,className:e("space-y-2",l),...c,children:[t===void 0&&r===void 0?null:oa("div",{children:[t===void 0?null:Nn("p",{className:"text-sm font-medium",children:t}),r===void 0?null:Nn("p",{className:"text-sm text-muted-foreground",children:r})]}),oa("div",{className:"flex items-start gap-2",children:[Nn("pre",{className:"flex-1 overflow-x-auto rounded-md border bg-muted px-3 py-2 font-mono text-xs",children:Nn("code",{children:n})}),Nn(_n,{value:n,label:o,errorMessage:s})]})]}),Hs=Os.forwardRef(jd);Hs.displayName="CommandStep";var Jd=Hs;import{forwardRef as Gd,useId as Wd}from"react";import{jsx as Rn,jsxs as Vs}from"react/jsx-runtime";var Bs=Gd(function({currency:r,label:n="Amount",hint:o,hideLabel:s=!1,hideHint:l=!1,error:c,className:d,wrapperClassName:u,id:p,decimals:m=2,step:f,placeholder:h,...R},x){let S=Wd(),B=p??S,E=`Enter amount in ${r}`,P=f??1/10**m,k=h??(m>0?`0.${"0".repeat(m)}`:"0"),M=c!==null&&c!==void 0&&c.length>0;return Vs("div",{className:e("w-full space-y-2",u),children:[!s&&Rn(I,{htmlFor:B,children:n}),Vs("div",{className:"relative",children:[Rn("span",{className:"-translate-y-1/2 absolute top-1/2 left-3 text-sm text-muted-foreground",children:r}),Rn(g,{ref:x,className:e("bg-background pl-12",M&&"border-destructive",d),id:B,min:"0",placeholder:k,step:P,type:"number",...R})]}),M?Rn("p",{className:"text-xs text-destructive",children:c}):!l&&Rn("p",{className:"text-xs text-muted-foreground",children:o??E})]})});Bs.displayName="CurrencyInput";var Xd=Bs;import*as Fs from"react";import{jsx as qn,jsxs as aa}from"react/jsx-runtime";var _s=Fs.forwardRef(function({index:r,label:n,hint:o,className:s,children:l,...c},d){let u=Boolean(r),p=Boolean(o);return aa("div",{ref:d,className:e("grid gap-x-4",u?"grid-cols-[2.25rem_1fr] sm:grid-cols-[2.5rem_1fr]":"grid-cols-1",s),...c,children:[u?qn("div",{className:"flex h-6 items-center justify-end pt-[2px]",children:qn(Fr,{children:r})}):null,aa("div",{className:"min-w-0 space-y-1.5",children:[aa("div",{className:"flex items-baseline justify-between gap-2",children:[qn(Br,{children:n}),p?qn("span",{className:"text-[10px] text-muted-foreground",children:o}):null]}),l]})]})});_s.displayName="FieldRow";var Ud=_s;import{jsx as ie,jsxs as st,Fragment as tu}from"react/jsx-runtime";var Kd=(t)=>{if(t===0)return"0 Bytes";let r=1024,n=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(t)/Math.log(r));return`${Math.round(t/r**o*100)/100} ${n[o]}`},Yd={downloadFile:"Download file",downloadingFile:"Downloading file",dragActive:"Drop the file here",dragInactive:"Drag & drop a file here, or click to select",errorRetry:"Please try again",fileTypeHint:"PDF, DOC, DOCX up to 10MB"},qd=({active:t,activeLabel:r,inactiveLabel:n,hint:o})=>st("div",{className:"flex w-full items-center gap-3",children:[ie("div",{className:e("flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors",t?"bg-[color-mix(in_oklab,var(--primary)_14%,var(--card))]":"bg-muted"),children:ie(qo,{className:e("h-5 w-5",t?"text-primary":"text-muted-foreground")})}),st("div",{children:[ie("p",{className:"text-sm font-medium text-foreground",children:t?r:n}),ie("p",{className:"text-xs text-muted-foreground",children:o})]})]}),Zd=({message:t,retryLabel:r})=>st("div",{className:"flex w-full items-center gap-3",children:[ie("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-destructive/10",children:ie(L,{className:"h-5 w-5 text-destructive"})}),st("div",{children:[ie("p",{className:"text-sm font-medium text-destructive",children:t}),ie("p",{className:"text-xs text-destructive/80",children:r})]})]}),Qd=({file:t,downloading:r,downloadLabel:n,downloadingLabel:o,onDownload:s,onRemove:l})=>st("div",{className:"flex w-full items-center justify-between",children:[st("div",{className:"flex items-center gap-3",children:[t.previewUrl!==void 0&&t.previewUrl!==null&&t.previewUrl!==""?st(tu,{children:[ie("span",{"aria-hidden":"true",className:"h-20 w-28 shrink-0 rounded-md border border-input bg-background bg-contain bg-center bg-no-repeat",style:{backgroundImage:`url(${t.previewUrl})`}}),ie("span",{className:"sr-only",children:t.name})]}):ie("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[color-mix(in_oklab,var(--success)_14%,var(--card))]",children:ie(H,{className:"h-5 w-5 text-(--success)"})}),st("div",{className:"flex flex-col",children:[st("div",{className:"flex items-center gap-2",children:[ie(Uo,{className:"h-4 w-4 text-muted-foreground"}),ie("span",{className:"text-sm font-medium text-foreground",children:t.name})]}),ie("span",{className:"text-xs text-muted-foreground",children:Kd(t.size)})]})]}),st("div",{className:"flex shrink-0 items-center gap-1",children:[s?ie(a,{"aria-label":r?o:n,className:"h-8 w-8 rounded-full p-0",disabled:r,onClick:s,size:"sm",title:r?o:n,type:"button",variant:"ghost",children:r?ie(b,{className:"h-4 w-4 animate-spin"}):ie(Wt,{className:"h-4 w-4"})}):null,l?ie(a,{className:"h-8 w-8 rounded-full p-0 hover:bg-destructive/10",onClick:l,size:"sm",type:"button",variant:"ghost",children:ie(L,{className:"h-4 w-4 text-destructive"})}):null]})]}),eu=(t)=>{let{rootProps:r,inputProps:n,isDragActive:o,selectedFile:s,error:l,onRemoveFile:c,onDownloadFile:d,isDownloadingFile:u,disabled:p,className:m,labels:f}=t,h={...Yd,...f},R=s!==void 0&&s!==null,x=l!==void 0&&l!==null&&l!=="";return ie("div",{className:e("w-full",m),children:st("div",{...r,className:e("relative flex min-h-24 cursor-pointer items-center justify-center rounded-lg border-2 border-dashed bg-transparent px-4 py-5 transition-all",o===!0?"border-primary bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))]":"border-input hover:border-input",R&&"border-[color-mix(in_oklab,var(--success)_60%,var(--border))] bg-[color-mix(in_oklab,var(--success)_10%,transparent)]",x&&"border-destructive bg-[color-mix(in_oklab,var(--destructive)_10%,var(--card))]",p===!0&&"cursor-not-allowed opacity-60",r?.className),children:[ie("input",{...n}),!R&&!x?ie(qd,{active:Boolean(o),activeLabel:h.dragActive,hint:h.fileTypeHint,inactiveLabel:h.dragInactive}):null,s!==void 0&&s!==null&&!x?ie(Qd,{downloadLabel:h.downloadFile,downloading:Boolean(u),downloadingLabel:h.downloadingFile,file:s,onDownload:d,onRemove:c}):null,l!==void 0&&l!==null&&l!==""?ie(Zd,{message:l,retryLabel:h.errorRetry}):null]})})},ru=eu;import{jsx as zs,jsxs as ou}from"react/jsx-runtime";var nu=i("inline-flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full border font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{active:!1,size:"md"},variants:{active:{false:"border-(--border-subtle) bg-(--bg-surface)/60 text-(--text-secondary) hover:border-(--border-default) hover:text-(--text-primary)",true:"border-[color-mix(in_oklab,var(--accent)_35%,var(--border))] bg-(--bg-accent-soft) text-(--text-primary)"},size:{md:"h-8 px-3.5 text-[13px]",sm:"h-7 px-3 text-[12px]"}}}),$s=({options:t,value:r,onValueChange:n,label:o,size:s,className:l,classes:c,...d})=>zs("div",{"aria-label":o,className:e("flex flex-wrap items-center gap-1.5",c?.root,l),...d,children:t.map((u)=>{let p=u.value===r;return ou("button",{type:"button","aria-pressed":p,disabled:u.disabled,onClick:()=>{n(u.value)},className:e(nu({active:p,size:s}),c?.chip),children:[u.label,u.count===void 0?null:zs("span",{className:e("tabular-nums text-[11px] text-(--text-muted)",c?.count),children:u.count})]},u.value)})});$s.displayName="FilterChips";var au=$s;import*as Zr from"react";import{jsx as Nt,jsxs as mu}from"react/jsx-runtime";var su=52,iu=26,Qn=4,Zn=20,lu=(t)=>({"--flow-lane":t}),Js=Zr.createContext(null),Gs=(t)=>{let r=Zr.useContext(Js);if(!r)throw Error(`${t} must be rendered inside a FlowBand.`);return r},cu=({lanes:t=1,stepHeight:r=su,laneHeight:n=iu,className:o,style:s,children:l,...c})=>{let d=Math.max(r,t*n+(t-1)*Qn),u=Zr.useMemo(()=>({height:d,stepHeight:r}),[d,r]);return Nt(Js.Provider,{value:u,children:Nt("div",{className:e("flex min-w-0 items-stretch gap-1",o),style:{height:d,...s},...c,children:l})})},du=({className:t,style:r,children:n,...o})=>{let{stepHeight:s}=Gs("FlowStep");return Nt("div",{className:e("flex min-w-0 flex-1 items-stretch self-center",t),style:{height:s,...r},...o,children:n})},js=({centers:t,height:r,colors:n,merge:o=!1})=>{let s=r/2,l=7;return Nt("svg",{"aria-hidden":!0,width:Zn,height:r,viewBox:`0 0 ${Zn} ${r}`,className:"shrink-0",style:o?{transform:"scaleX(-1)"}:void 0,children:t.map((c,d)=>{let u=n[d];return Nt("path",{style:lu(u),d:`M0 ${s}H7C13 ${s} ${Zn-6} ${c} ${Zn} ${c}`,fill:"none",strokeWidth:1.5,strokeLinecap:"round",className:u!==void 0&&u!==""?"stroke-[color-mix(in_oklab,var(--flow-lane)_45%,var(--border))]":"stroke-border"},d)})})},uu=(t,r)=>{let n=(r-Qn*(t-1))/t;return Array.from({length:t},(o,s)=>s*(n+Qn)+n/2)},pu=({lanes:t,fork:r=!0,rejoin:n=!0,label:o,className:s,...l})=>{let{height:c}=Gs("FlowBranch"),d=uu(t.length,c),u=t.map((p)=>p.color);return mu("div",{"aria-label":o,className:e("flex min-w-0 flex-1 items-stretch",s),...l,children:[r&&Nt(js,{centers:d,height:c,colors:u}),Nt("div",{className:"flex min-w-0 flex-1 flex-col",style:{gap:Qn},children:t.map((p)=>Nt("div",{className:"flex min-w-0 flex-1 items-stretch overflow-hidden",children:p.content},p.key))}),n&&Nt(js,{centers:d,height:c,colors:u,merge:!0})]})};import*as Ws from"react";import{jsx as sa,jsxs as gu}from"react/jsx-runtime";var fu=({index:t,className:r,children:n,...o},s)=>gu("div",{ref:s,className:e("grid grid-cols-[1.75rem_1fr] gap-x-3 leading-relaxed",r),...o,children:[sa("div",{className:"pt-[1px] text-right",children:sa(Fr,{className:"opacity-80",children:t})}),sa("p",{className:"text-[13px] text-muted-foreground",children:n})]}),Xs=Ws.forwardRef(fu);Xs.displayName="GuideStep";var bu=Xs;import*as tn from"react";import{jsx as Fe,jsxs as en,Fragment as hu}from"react/jsx-runtime";var Us=tn.forwardRef(function({className:r,variant:n="island",...o},s){return Fe(Ue,{ref:s,variant:n,className:e("gap-0 p-0",r),...o})});Us.displayName="HierarchyTree";var Ks=tn.forwardRef(function({title:r,icon:n,count:o,actions:s,className:l,...c},d){return en("div",{ref:d,"data-slot":"hierarchy-tree-header",className:e("flex flex-wrap items-center gap-3 border-b border-border px-4 py-3",l),...c,children:[en("div",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",children:[n!==void 0&&n!==null?Fe("span",{className:"shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4",children:n}):null,Fe("span",{className:"min-w-0 truncate",children:r}),o!==void 0&&o!==null?Fe("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs font-normal text-muted-foreground",children:o}):null]}),s!==void 0&&s!==null?Fe("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:s}):null]})});Ks.displayName="HierarchyTreeHeader";var Ys=tn.forwardRef(function({className:r,...n},o){return Fe("div",{ref:o,"data-slot":"hierarchy-tree-body",className:e("min-w-0",r),...n})});Ys.displayName="HierarchyTreeBody";var vu=[],qs=tn.forwardRef(function({depth:r,rails:n=vu,isLastChild:o=!1,hasChildren:s=!1,contentClassName:l,className:c,children:d,...u},p){let m=Math.max(1,r);return en("div",{ref:p,"data-slot":"hierarchy-tree-row","data-depth":m,className:e("group flex items-stretch transition-colors hover:bg-muted/40",m===1&&"border-t border-border first:border-t-0",c),...u,children:[m>1?en("div",{"aria-hidden":!0,className:"flex shrink-0 pl-5",children:[n.map((f,h)=>Fe("span",{className:"relative w-5",children:f?Fe("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}):null},h)),Fe("span",{className:"relative w-5",children:o?Fe("span",{className:e("absolute left-0 top-0 h-[22px] rounded-bl-md border-b border-l border-(--border-subtle)",s?"w-full":"w-14")}):en(hu,{children:[Fe("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}),Fe("span",{className:e("absolute left-0 top-[22px] border-t border-(--border-subtle)",s?"w-full":"w-14")})]})})]}):null,Fe("div",{className:e("flex min-w-0 flex-1 items-start gap-2 py-3 pl-2 pr-3",l),children:d})]})});qs.displayName="HierarchyTreeRow";var Zs=tn.forwardRef(function({expanded:r,count:n,visible:o=!0,className:s,...l},c){return en(a,{ref:c,type:"button",variant:"ghost",size:"sm",className:e("h-6 shrink-0 gap-0.5 px-1 text-xs text-muted-foreground",!o&&"invisible",s),...l,children:[Fe(C,{className:e("h-3.5 w-3.5 transition-transform",r&&"rotate-90")}),n]})});Zs.displayName="HierarchyTreeToggle";var xu=Us;import yu,{useState as wu}from"react";import{jsx as we,jsxs as Ke}from"react/jsx-runtime";var Nu=i("font-mono text-sm rounded-md overflow-hidden flex flex-col",{defaultVariants:{size:"md",variant:"default"},variants:{size:{lg:"p-4 text-base",md:"p-3",sm:"p-2 text-xs"},variant:{default:"bg-card border border-border",filled:"bg-muted",outlined:"border border-border"}}}),ia=({value:t,ancestors:r})=>{if(t===null||t===void 0)return t;if(t===!0||t===!1)return t;let n=Object.prototype.toString.call(t);if(n==="[object String]"){let o=JSON.stringify(t);return o===void 0?n:o.slice(1,-1)}if(n==="[object Number]")return Number(t);if(Array.isArray(t)){if(r.has(t))return"[Circular]";r.add(t);let o=t.map((s)=>ia({ancestors:r,value:s}));return r.delete(t),o}if(t instanceof Object){if(r.has(t))return"[Circular]";r.add(t);let o=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,ia({ancestors:r,value:l})]));return r.delete(t),o}return n},Ru=(t)=>{if(t===null||t===void 0)return"text-gray-500 dark:text-gray-400";if(String(t)===t)return"text-green-600 dark:text-green-400";if(t===!0||t===!1)return"text-amber-600 dark:text-amber-400";return"text-blue-600 dark:text-blue-400"},Cu=(t)=>{if(t===null)return"null";if(t===void 0)return"undefined";if(String(t)===t)return`"${t}"`;return String(t)},Su=(t)=>t,Pu=(t)=>t!==null&&Object(t)===t,Tu=(t,r)=>{if(t)return we("span",{className:"w-4"});return r?we(v,{className:"w-4 h-4"}):we(C,{className:"w-4 h-4"})},ku=(t)=>t?{close:"]",open:"["}:{close:"}",open:"{"},Lu=(t,r,n)=>t?{name:null,path:`${n}[${r}]`}:{name:String(r),path:`${n}.${r}`},Du=({data:t,className:r,classes:n,variant:o,size:s,expandAll:l=!1,expandRoot:c=!0,indentSize:d=16,showLineNumbers:u=!1,showToolbar:p=!1,maxHeight:m,maxWidth:f,renderValue:h})=>{let R=yu.useMemo(()=>ia({ancestors:new WeakSet,value:t}),[t]),[x,S]=wu(()=>{let A={};if(c)A.root=!0;return A}),B=(A,F)=>{if(A==="root"&&x[A]===void 0)return c;return x[A]??F},E=(A)=>{S((F)=>({...F,[A]:!B(A,l)}))},P=(A)=>{S({})},k=()=>{try{let A=JSON.stringify(R,null,2);navigator.clipboard.writeText(A),ue.success("Copied to clipboard",{description:"JSON data has been copied to clipboard",duration:3000})}catch(A){console.error("Failed to copy JSON to clipboard",A),ue.error("Copy failed",{description:"Failed to copy JSON to clipboard",duration:3000})}},M={maxWidth:f??"auto"},j=(A,F,Z,X,oe)=>{let fe=[],ce=Pu(F),he=Array.isArray(F),De=ce&&Object.keys(F).length===0,Ie=ku(he),le={marginLeft:Z*d},_e=Su(X),pe=oe;if(!ce){let re=h?.(F,X);return fe.push(Ke("div",{className:"flex",children:[u&&we("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:pe}),Ke("div",{className:"flex min-w-0",style:le,children:[we("span",{"aria-hidden":!0,className:"mr-1 w-4 shrink-0"}),A!==null&&Ke("span",{className:"shrink-0 text-purple-600 dark:text-purple-400",children:[`"${A}":`,we("span",{className:"text-gray-600 dark:text-gray-400 mr-1",children:" "})]}),re??we("span",{className:e("min-w-0 break-all",Ru(F)),children:Cu(F)})]})]},_e)),[fe,pe+1]}let Ae=B(X,l),K=Tu(De,Ae);if(fe.push(Ke("div",{className:"flex items-start group",children:[u&&we("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:pe}),Ke("div",{className:"flex items-start",style:le,children:[we("button",{onClick:()=>{E(X)},className:"mr-1 w-4 h-4 mt-0.5 focus:outline-none opacity-60 hover:opacity-100","aria-label":Ae?"Collapse":"Expand",tabIndex:0,type:"button",children:K}),Ke("div",{children:[A!==null&&Ke("span",{className:"text-purple-600 dark:text-purple-400",children:[`"${A}":`,we("span",{className:"text-gray-600 dark:text-gray-400 mr-1",children:" "})]}),we("span",{className:"text-gray-600 dark:text-gray-400",children:Ie.open}),De||!Ae?Ke("span",{className:"text-gray-600 dark:text-gray-400",children:[De?"":"...",Ie.close]}):null]})]})]},`${_e}-open`)),pe+=1,Ae&&!De){let re=pe,ee=he?F.map((xe,ze)=>[ze,xe]):Object.entries(F);for(let[xe,ze]of ee){let ye=Lu(he,xe,X),[Et,U]=j(ye.name,ze,Z+1,ye.path,re);fe.push(...Et),re=U}return fe.push(Ke("div",{className:"flex",children:[u&&we("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:re}),we("div",{className:"text-gray-600 dark:text-gray-400",style:le,children:Ie.close})]},`${_e}-close`)),re+=1,[fe,re]}return[fe,pe]},[D]=j(null,R,0,"root",1);return Ke("div",{className:e(Nu({size:s,variant:o}),n?.root,r),style:M,children:[p&&Ke("div",{className:e("flex justify-between items-center px-3 py-2 border-b border-border bg-muted/50",n?.toolbar),children:[we("div",{className:"text-sm font-medium",children:"JSON Viewer"}),Ke("div",{className:"flex gap-2",children:[we(a,{size:"sm",variant:"outline",onClick:()=>{P(!0)},children:"Expand All"}),we(a,{size:"sm",variant:"outline",onClick:()=>{P(!1)},children:"Collapse All"}),Ke(a,{size:"sm",variant:"outline",onClick:k,children:[we(ne,{className:"w-4 h-4 mr-1"}),"Copy"]})]})]}),we("div",{className:e("overflow-auto flex-1",n?.content),style:{maxHeight:m??void 0},children:D})]})},la=Du;import{useId as Eu,useState as Mu}from"react";import Iu from"react-markdown";import{jsx as Ct,jsxs as ca,Fragment as Ou}from"react/jsx-runtime";var Qs=({mode:t,onModeChange:r,labels:n,disabled:o=!1,className:s})=>{let l=t==="write"?"preview":"write",c=l==="write"?n.write:n.preview,d=l==="write"?n.writeTitle??n.write:n.previewTitle??n.preview;return Ct(a,{type:"button",variant:"ghost",size:"icon",className:e("size-7",s),disabled:o,"aria-label":c,title:d,onClick:()=>{r(l)},children:l==="preview"?Ct(Ve,{className:"size-3.5 text-muted-foreground"}):Ct(Vo,{className:"size-3.5 text-muted-foreground"})})},Au=({label:t,value:r,onValueChange:n,emptyPreview:o,toggleLabels:s,mode:l,defaultMode:c="write",onModeChange:d,previewValue:u=r,disabled:p=!1,placeholder:m,editorId:f,showHeader:h=!0,footer:R,className:x,editorClassName:S,previewClassName:B,textareaProps:E})=>{let P=Eu(),k=f??P,[M,j]=Mu(c),D=l??M,A=(F)=>{if(l===void 0)j(F);d?.(F)};return ca("div",{className:e("grid gap-2",x),children:[h&&ca("div",{className:"flex items-center justify-between gap-3",children:[Ct(I,{htmlFor:D==="write"?k:void 0,children:t}),Ct(Qs,{mode:D,onModeChange:A,labels:s,disabled:p})]}),D==="write"?ca(Ou,{children:[Ct(Q,{...E,id:k,value:r,disabled:p,placeholder:m,"aria-label":h?E?.["aria-label"]:E?.["aria-label"]??t,className:e("min-h-48 resize-y font-mono text-sm",S),onChange:(F)=>{n(F.target.value)}}),R]}):Ct("div",{"aria-label":`${t} ${s.preview}`,className:e("prose prose-sm max-w-none rounded-lg border bg-muted/30 p-4 dark:prose-invert [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",B),children:u.trim()?Ct(Iu,{children:u}):Ct("div",{className:"not-prose text-muted-foreground",children:o})})]})};import{jsx as to,jsxs as Vu}from"react/jsx-runtime";var Hu=({open:t,onOpenChange:r,title:n="JSON Viewer",data:o,jsonViewerProps:s})=>to(N,{open:t,onOpenChange:r,children:Vu(O,{className:"max-w-2xl max-h-[80vh] flex flex-col",children:[to(V,{children:to(_,{children:n})}),to(la,{data:o,className:"min-h-0 flex-1",variant:"filled",size:"sm",showToolbar:!0,expandAll:!1,expandRoot:!0,...s})]})});import*as ti from"react";import{jsx as ei,jsxs as da}from"react/jsx-runtime";var ri=ti.forwardRef(function({id:r,label:n,optionalLabel:o,help:s,error:l,className:c,children:d,...u},p){return da("div",{ref:p,className:e("grid content-start gap-2",c),...u,children:[da(I,{htmlFor:r,children:[n,o===void 0?null:da("span",{className:"font-normal text-muted-foreground",children:["(",o,")"]})]}),d,l===void 0?null:ei("p",{role:"alert",className:"text-sm text-destructive",children:l}),l===void 0&&s!==void 0&&s!==""?ei("p",{className:"text-xs leading-relaxed text-muted-foreground",children:s}):null]})});ri.displayName="LabeledField";var Bu=ri;import{jsx as ni,jsxs as oi}from"react/jsx-runtime";var Fu=({href:t,children:r,className:n,external:o=!1,linkComponent:s})=>{let l=e("inline-flex items-center gap-1 text-primary hover:underline",n);if(o||!s)return oi("a",{href:t,...o?{rel:"noopener noreferrer",target:"_blank"}:{},className:l,children:[r,ni(It,{className:"h-3 w-3"})]});return oi(s,{to:t,className:l,children:[r,ni(It,{className:"h-3 w-3"})]})};import{useState as _u}from"react";import{jsx as ao,jsxs as $u}from"react/jsx-runtime";var zu=({value:t,isSensitive:r=!1,className:n,maskChar:o="•",showToggle:s=!0,showLabel:l="Show value",hideLabel:c="Hide value",truncate:d=!0,children:u})=>{let[p,m]=_u(!r),h=p?t:(()=>{if(t.startsWith("{")||t.startsWith("["))return`{ ${o.repeat(10)} }`;return o.repeat(Math.min(t.length,20))})(),R=d?h.slice(0,50)+(h.length>50?"...":""):h,x=p?c:l,S=r&&s?ao(a,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{m(!p)},title:x,"aria-label":x,children:p?ao(St,{className:"h-3 w-3"}):ao(Ve,{className:"h-3 w-3"})}):null;if(u!==void 0)return u({displayValue:R,toggle:S});return $u("div",{className:e("flex items-center gap-2",n),children:[ao("code",{className:"text-sm bg-muted px-2 py-1 rounded flex-1 break-all",children:R}),S]})};import*as ii from"react";import{jsx as ai,jsxs as si}from"react/jsx-runtime";var li=ii.forwardRef(function({icon:r,text:n,trailing:o,className:s,...l},c){return si("div",{ref:c,className:e("flex min-w-0 items-center gap-2",s),...l,children:[si("div",{className:"flex min-w-0 flex-1 items-center gap-2 border-b border-dashed border-border py-2 text-[13px] text-muted-foreground",children:[r!==null&&r!==void 0?ai("span",{className:"text-primary/70",children:r}):null,ai("span",{className:"min-w-0 truncate",children:n})]}),o]})});li.displayName="MutedPlaceholder";var ju=li;import{useMemo as Ju,useState as Gu}from"react";import{jsx as Ye,jsxs as so}from"react/jsx-runtime";var ua=({value:t,ancestors:r})=>{if(t===null||t===void 0)return t;if(t===!0||t===!1)return t;let n=Object.prototype.toString.call(t);if(n==="[object String]")return String.prototype.valueOf.call(t);if(n==="[object Number]")return Number(t);if(Array.isArray(t)){if(r.has(t))return;r.add(t);let o=t.map((s)=>ua({ancestors:r,value:s}));return r.delete(t),o}if(t instanceof Object){if(r.has(t))return;r.add(t);let o=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,ua({ancestors:r,value:l})]));return r.delete(t),o}return},ft=(t)=>{if(t instanceof Object&&!Array.isArray(t))return t;return},dr=(t)=>Array.isArray(t)?t:void 0,ci=(t)=>Object.prototype.toString.call(t)==="[object String]"&&t===String.prototype.valueOf.call(t),pa=(t)=>ci(t)?t:void 0,Wu=(t)=>dr(t)?.filter(ci)??[],Xu=(t)=>{let r=dr(t.anyOf);if(!r)return t;let n=r.filter((o)=>ft(o)?.type!=="null");return n.length===1?ft(n[0])??t:t},di=(t)=>{let r=pa(t.type);if(r!==void 0&&r!=="")return r;if(dr(t.enum))return"enum";if(dr(t.oneOf)||dr(t.anyOf))return"variant";if(ft(t.properties))return"object";return"value"},ui=(t,r="schema")=>{let n=ft(t.properties);if(n){let s=new Set(Wu(t.required));return Object.entries(n).flatMap(([l,c])=>{let d=ft(c);return d?[{name:l,path:`${r}.properties.${l}`,required:s.has(l),schema:d}]:[]})}if(di(t)==="array"){let s=ft(t.items);return s?[{name:"Items",path:`${r}.items`,required:!0,schema:s}]:[]}let o=dr(t.oneOf)??dr(t.anyOf)??dr(t.allOf);if(!o)return[];return o.flatMap((s,l)=>{let c=ft(s);return c?[{name:`Option ${l+1}`,path:`${r}.option.${l}`,required:!0,schema:c}]:[]})},ma=(t,r,n=new Set)=>{let o=Xu(t),s=pa(o.$ref);if(s===void 0||s===""||!s.startsWith("#/$defs/")||n.has(s))return o;let l=ft(ft(r.$defs)?.[s.slice(8)]);if(!l)return o;return ma(l,r,new Set([...n,s]))},pi=({child:t,depth:r,root:n,defaultExpandedDepth:o})=>{let s=ma(t.schema,n),l=ui(s,t.path),[c,d]=Gu(r<o),u=di(s),p=pa(s.description),m=l.length>0,f=c?`Collapse ${t.name}`:`Expand ${t.name}`;return so(Te,{open:c,onOpenChange:d,children:[so("div",{className:e("flex min-w-0 items-start border-b border-border/70 bg-background px-2.5 py-2 last:border-b-0",m&&"gap-2"),style:{paddingLeft:`${10+r*16}px`},children:[m?Ye(Ee,{"aria-label":f,className:"mt-0.5 shrink-0 rounded-sm text-muted-foreground outline-none transition hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/40",children:Ye(C,{className:e("size-3.5 transition-transform",c&&"rotate-90")})}):null,so("div",{className:"min-w-0 flex-1",children:[so("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[Ye("span",{className:"break-all text-xs font-medium text-foreground",children:t.name}),Ye("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:u}),t.required?Ye("span",{className:"text-[10px] font-medium text-destructive",children:"required"}):null]}),p!==void 0&&p!==""?Ye("p",{className:"mt-0.5 text-xs leading-snug text-muted-foreground",children:p}):null]})]}),m?Ye(ke,{children:Ye("div",{className:"border-l border-border/70",children:l.map((h)=>Ye(pi,{child:h,defaultExpandedDepth:o,depth:r+1,root:n},h.path))})}):null]})},Uu=({schema:t,className:r,defaultExpandedDepth:n=1,emptyLabel:o="No fields"})=>{let s=Ju(()=>ua({ancestors:new WeakSet,value:t}),[t]),l=ft(s);if(!l)return Ye("p",{className:e("text-xs text-muted-foreground",r),children:o});let c=ma(l,l),d=ui(c);if(!d.length)return Ye("p",{className:e("text-xs text-muted-foreground",r),children:o});return Ye("div",{"aria-label":"Object schema",className:e("overflow-hidden rounded-lg border border-border",r),children:d.map((u)=>Ye(pi,{child:u,defaultExpandedDepth:n,depth:0,root:l},u.path))})};import gt,{createContext as Ln,useContext as cn,useEffect as me,useState as it,useCallback as lt,useMemo as be,useRef as Pe,memo as tp,useReducer as rp,cloneElement as Jh,forwardRef as Gh}from"react";import{createPortal as np,unstable_batchedUpdates as fo}from"react-dom";import{useMemo as ga,useLayoutEffect as Ku,useEffect as fi,useRef as rn,useCallback as io}from"react";function gi(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return ga(()=>(o)=>{r.forEach((s)=>s(o))},r)}var Cn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function yr(t){let r=Object.prototype.toString.call(t);return r==="[object Window]"||r==="[object global]"}function lo(t){return"nodeType"in t}function Oe(t){var r,n;if(!t)return window;if(yr(t))return t;if(!lo(t))return window;return(r=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function co(t){let{Document:r}=Oe(t);return t instanceof r}function nn(t){if(yr(t))return!1;return t instanceof Oe(t).HTMLElement}function ba(t){return t instanceof Oe(t).SVGElement}function wr(t){if(!t)return document;if(yr(t))return t.document;if(!lo(t))return document;if(co(t))return t;if(nn(t)||ba(t))return t.ownerDocument;return document}var nt=Cn?Ku:fi;function uo(t){let r=rn(t);return nt(()=>{r.current=t}),io(function(){for(var n=arguments.length,o=Array(n),s=0;s<n;s++)o[s]=arguments[s];return r.current==null?void 0:r.current(...o)},[])}function bi(){let t=rn(null),r=io((o,s)=>{t.current=setInterval(o,s)},[]),n=io(()=>{if(t.current!==null)clearInterval(t.current),t.current=null},[]);return[r,n]}function on(t,r){if(r===void 0)r=[t];let n=rn(t);return nt(()=>{if(n.current!==t)n.current=t},r),n}function an(t,r){let n=rn();return ga(()=>{let o=t(n.current);return n.current=o,o},[...r])}function Sn(t){let r=uo(t),n=rn(null),o=io((s)=>{if(s!==n.current)r==null||r(s,n.current);n.current=s},[]);return[n,o]}function po(t){let r=rn();return fi(()=>{r.current=t},[t]),r.current}var fa={};function Nr(t,r){return ga(()=>{if(r)return r;let n=fa[t]==null?0:fa[t]+1;return fa[t]=n,t+"-"+n},[t,r])}function vi(t){return function(r){for(var n=arguments.length,o=Array(n>1?n-1:0),s=1;s<n;s++)o[s-1]=arguments[s];return o.reduce((l,c)=>{let d=Object.entries(c);for(let[u,p]of d){let m=l[u];if(m!=null)l[u]=m+t*p}return l},{...r})}}var Rr=vi(1),Cr=vi(-1);function Yu(t){return"clientX"in t&&"clientY"in t}function Pn(t){if(!t)return!1;let{KeyboardEvent:r}=Oe(t.target);return r&&t instanceof r}function qu(t){if(!t)return!1;let{TouchEvent:r}=Oe(t.target);return r&&t instanceof r}function mo(t){if(qu(t)){if(t.touches&&t.touches.length){let{clientX:r,clientY:n}=t.touches[0];return{x:r,y:n}}else if(t.changedTouches&&t.changedTouches.length){let{clientX:r,clientY:n}=t.changedTouches[0];return{x:r,y:n}}}if(Yu(t))return{x:t.clientX,y:t.clientY};return null}var ur=Object.freeze({Translate:{toString(t){if(!t)return;let{x:r,y:n}=t;return"translate3d("+(r?Math.round(r):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:r,scaleY:n}=t;return"scaleX("+r+") scaleY("+n+")"}},Transform:{toString(t){if(!t)return;return[ur.Translate.toString(t),ur.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:r,duration:n,easing:o}=t;return r+" "+n+"ms "+o}}}),mi="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function hi(t){if(t.matches(mi))return t;return t.querySelector(mi)}import xi,{useState as Zu,useCallback as Qu}from"react";var ep={display:"none"};function yi(t){let{id:r,value:n}=t;return xi.createElement("div",{id:r,style:ep},n)}function wi(t){let{id:r,announcement:n,ariaLiveType:o="assertive"}=t,s={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return xi.createElement("div",{id:r,style:s,role:"status","aria-live":o,"aria-atomic":!0},n)}function Ni(){let[t,r]=Zu("");return{announce:Qu((o)=>{if(o!=null)r(o)},[]),announcement:t}}var Oi=Ln(null);function op(t){let r=cn(Oi);me(()=>{if(!r)throw Error("useDndMonitor must be used within a children of <DndContext>");return r(t)},[t,r])}function ap(){let[t]=it(()=>new Set),r=lt((o)=>(t.add(o),()=>t.delete(o)),[t]);return[lt((o)=>{let{type:s,event:l}=o;t.forEach((c)=>{var d;return(d=c[s])==null?void 0:d.call(c,l)})},[t]),r]}var sp={draggable:`
|
|
2
|
+
import{Ja,Xo,es,$n,Ar,Qt,ts,rs,os,ns,as,xo,Qo,vo,ss,is,Dr}from"../../index-e0qytqhh.js";import{x,l}from"../../index-33ef93f6.js";import{S,k}from"../../index-410hza8j.js";import{nt,at,zt,Cs,st,rr,M,ke,Y,K,Q}from"../../index-q560eskm.js";import{ls,dr,Zo,yt,Be,Ae,Ve,qn,cs,us,Jo,ds,fs,yo,ps,ms,jn,Yn,gs,xs}from"../../index-pkw46hwt.js";import{mr,tn,hr,rn,Pt,Zt,wt,Jt,rt,Ne,Eo,Lo,Mo,Ao,Do,No,Bt,Vt,Ht}from"../../index-yaf9t9w5.js";import{kt,Et,vt}from"../../index-t2rwc8rk.js";import{Ss}from"../../index-ftn430ea.js";import{ue}from"../../index-tb9dhges.js";import{en}from"../../index-w3zn83g3.js";import{zs}from"../../index-78w37zqq.js";import{Co,So,fr,pr,Ro}from"../../index-w7hwsck8.js";import{Po,Ft}from"../../index-0dt7qv78.js";import{de,ot,gr}from"../../index-eh2w7m4e.js";import{E,B}from"../../index-aq49ztmj.js";import"../../index-9tdk1jd5.js";import{e}from"../../index-kzykjydw.js";import{jsx as dc,jsxs as uc}from"react/jsx-runtime";var cc=({children:t,loading:r=!1,fullWidth:n=!1,className:o,disabled:a,variant:s,size:i,...c})=>uc(l,{variant:s,size:i,className:e(n&&"w-full",o),disabled:a===!0||r,...c,children:[r&&dc(Dr,{size:20,className:"mr-2"}),t]}),pc=cc;import*as Pa from"react";import{jsx as Sa,jsxs as fc}from"react/jsx-runtime";var mc=({children:t,className:r,type:n="button",...o},a)=>fc(l,{ref:a,type:n,variant:"ghost",size:"sm",className:e("h-9 rounded-full border border-dashed border-border/80 bg-background px-3 text-xs font-medium text-muted-foreground shadow-xs transition-[transform,color,background-color,border-color] hover:border-primary/35 hover:bg-muted/45 hover:text-foreground active:scale-[0.98]",r),...o,children:[Sa("span",{className:"mr-2 inline-flex size-5 items-center justify-center rounded-full border border-border/70 bg-muted/45 text-foreground",children:Sa(Ft,{className:"size-3.5"})}),t]}),ln=Pa.forwardRef(mc);ln.displayName="AddItemButton";var gc=ln;import{forwardRef as bc}from"react";import{jsx as hc}from"react/jsx-runtime";var Ta=(t,r,n)=>{if(r<1||r>12||n<1||n>31)return!1;let o=new Date(t,r-1,n);return o.getFullYear()===t&&o.getMonth()===r-1&&o.getDate()===n},vc=(t)=>{let r=t.trim();if(!r)return null;let n=/^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u.exec(r);if(n){let{year:a,month:s,day:i}=n.groups??{};return Ta(Number(a),Number(s),Number(i))?`${a}-${s}-${i}`:null}let o=/^(?<day>\d{1,2})[/\-.](?<month>\d{1,2})[/\-.](?<year>\d{4})$/u.exec(r);if(o){let{day:a,month:s,year:i}=o.groups??{},c=Number(a),d=Number(s),u=Number(i);if(!Ta(u,d,c))return null;return`${u}-${String(d).padStart(2,"0")}-${String(c).padStart(2,"0")}`}return null},ka=bc(function({onPaste:r,...n},o){return hc(M,{ref:o,type:"date",onPaste:(s)=>{let i=s.clipboardData.getData("text"),c=vc(i);if(c!==null&&c!==""){s.preventDefault();let d=s.currentTarget,u=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.bind(d);if(u!==void 0)u(c),d.dispatchEvent(new Event("input",{bubbles:!0}))}r?.(s)},...n})});ka.displayName="DateInput";var xc=ka;import*as La from"react";import{jsx as wc}from"react/jsx-runtime";var Da=x("font-display font-bold leading-[1.06] tracking-tight text-foreground",{defaultVariants:{size:"lg"},variants:{size:{lg:"text-[1.5rem] sm:text-[1.85rem]",md:"text-[1.15rem] sm:text-[1.25rem]",sm:"text-[1rem]",xl:"text-[2.1rem] sm:text-[2.5rem]"}}}),yc=({as:t="h2",size:r,className:n,...o},a)=>wc(t,{ref:a,className:e(Da({size:r}),n),...o}),Ea=La.forwardRef(yc);Ea.displayName="DisplayHeading";var Nc=Ea;import*as xt from"react";import{jsx as sr,jsxs as Ia,Fragment as Ma}from"react/jsx-runtime";var cn=xt.forwardRef(function({value:r,label:n,variant:o="icon",copyLabel:a="Copy",copiedLabel:s="Copied",errorMessage:i="Failed to copy to clipboard",resetDelay:c=1500,className:d,onClick:u,...p},m){let[f,b]=xt.useState(!1),g=xt.useRef(null);xt.useEffect(()=>()=>{if(g.current!==null)clearTimeout(g.current)},[]);let h=async(T)=>{u?.(T);try{if(await navigator.clipboard.writeText(r),b(!0),g.current!==null)clearTimeout(g.current);g.current=setTimeout(()=>{b(!1)},c)}catch{yt.error(i)}};if(o==="button")return sr(l,{ref:m,type:"button",variant:"outline",onClick:(T)=>{h(T)},"aria-label":`Copy ${n}`,className:e("shrink-0",d),...p,children:f?Ia(Ma,{children:[sr(S,{className:"mr-1 size-4"}),s]}):Ia(Ma,{children:[sr(ot,{className:"mr-1 size-4"}),a]})});return sr("button",{ref:m,type:"button",onClick:(T)=>{h(T)},"aria-label":`Copy ${n}`,className:e("flex size-8 shrink-0 items-center justify-center rounded-md border border-border bg-card text-muted-foreground transition hover:border-primary/40 hover:text-primary",d),...p,children:f?sr(S,{className:"size-3.5 text-primary"}):sr(ot,{className:"size-3.5"})})});cn.displayName="CopyButton";var Rc=cn;import{jsx as co,jsxs as Cc}from"react/jsx-runtime";var Aa="#a3d54a",Oa=({className:t,...r})=>Cc("svg",{...r,"aria-hidden":"true",className:e("size-6 shrink-0",t),"data-slot":"collective-intelligence-loader",fill:"none",viewBox:"0 0 24 24",children:[co("polyline",{className:"origin-center motion-safe:animate-[ci-breathe-left_1.8s_ease-in-out_infinite]",points:"10,5.5 4.5,12 10,18.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.2}),co("polyline",{className:"origin-center motion-safe:animate-[ci-breathe-right_1.8s_ease-in-out_infinite]",points:"14,5.5 19.5,12 14,18.5",stroke:Aa,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.2}),co("circle",{className:"origin-center [transform-box:fill-box] motion-safe:animate-[ci-pulse-dot_1.8s_ease-in-out_infinite]",cx:12,cy:12,fill:Aa,r:2.3})]});Oa.displayName="CollectiveIntelligenceLoader";var Sc=Oa;import{jsx as Tc}from"react/jsx-runtime";var Pc=({children:t,className:r})=>Tc("div",{className:e("text-destructive text-sm text-center",r),children:t}),kc=Pc;import*as Ha from"react";import{jsx as Dc}from"react/jsx-runtime";var Lc=({value:t,fallback:r="—",locale:n,className:o,...a},s)=>Dc("span",{ref:s,className:e("tabular-nums",o),...a,children:t===null||t===void 0?r:new Intl.NumberFormat(n).format(t)}),Va=Ha.forwardRef(Lc);Va.displayName="FormattedNumber";var Ec=Va;import*as Ba from"react";import{jsx as Ac}from"react/jsx-runtime";var Mc={accent:"bg-[color-mix(in_oklab,var(--chart-1)_12%,var(--card))] text-[color-mix(in_oklab,var(--chart-1)_85%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-1)_22%,var(--border))]",gold:"bg-[color-mix(in_oklab,var(--chart-3)_15%,var(--card))] text-[color-mix(in_oklab,var(--chart-3)_65%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-3)_28%,var(--border))]",neutral:"bg-(--bg-surface-alt)/70 text-(--text-secondary) border-(--border-subtle)",sage:"bg-[color-mix(in_oklab,var(--chart-2)_14%,var(--card))] text-[color-mix(in_oklab,var(--chart-2)_70%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-2)_26%,var(--border))]",sky:"bg-[color-mix(in_oklab,var(--chart-4)_14%,var(--card))] text-[color-mix(in_oklab,var(--chart-4)_70%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-4)_26%,var(--border))]",violet:"bg-[color-mix(in_oklab,var(--chart-5)_14%,var(--card))] text-[color-mix(in_oklab,var(--chart-5)_70%,var(--foreground))] border-[color-mix(in_oklab,var(--chart-5)_26%,var(--border))]"},Ic={lg:"size-12 rounded-lg text-[17px] [&_svg]:size-6",md:"size-10 rounded-lg text-[15px] [&_svg]:size-5",sm:"size-8 rounded-md text-[13px] [&_svg]:size-4"},Fa=Ba.forwardRef(function({tone:r="neutral",size:n="md",initial:o,className:a,children:s,...i},c){return Ac("span",{ref:c,"aria-hidden":!0,className:e("inline-flex shrink-0 select-none items-center justify-center border font-display font-bold",Ic[n],Mc[r],a),...i,children:s??(o!==void 0&&o!==""?o.slice(0,2).toUpperCase():null)})});Fa.displayName="IconTile";var Oc=Fa;import*as _a from"react";import{jsx as Bc}from"react/jsx-runtime";var Hc={accent:"text-(--brand)",copper:"text-(--text-muted)",default:"text-(--text-muted)",muted:"text-(--text-muted)"},Vc=({as:t="span",tone:r="default",className:n,...o},a)=>Bc(t,{ref:a,className:e("inline-block text-[11px] font-semibold uppercase tracking-[0.06em]",Hc[r],n),...o}),ir=_a.forwardRef(Vc);ir.displayName="Kicker";var Fc=ir;import*as za from"react";import{jsx as $c}from"react/jsx-runtime";var _c=(t)=>`+${t}`,zc=({expanded:t,hiddenCount:r,collapsedLabel:n=_c,expandedLabel:o="Show less",onToggle:a,className:s,...i},c)=>$c("button",{ref:c,type:"button",onClick:a,className:e("inline-flex items-center gap-1 rounded-full border border-dashed border-muted-foreground/40 bg-muted/20 px-2.5 py-1 text-[11px] font-medium text-muted-foreground hover:bg-muted/40 hover:text-foreground transition-colors",s),...i,children:t?o:n(r)}),$a=za.forwardRef(zc);$a.displayName="ShowMoreTag";var Jc=$a;import*as ja from"react";import{jsx as Wc}from"react/jsx-runtime";var jc=x("font-sans leading-none tabular-nums text-primary",{defaultVariants:{size:"md"},variants:{size:{lg:"text-[1.4rem]",md:"text-[1.1rem]",sm:"text-[0.95rem]",xl:"text-[2rem]"}}}),Gc=({size:t,className:r,...n},o)=>Wc("span",{ref:o,className:e(jc({size:t}),r),...n}),lr=ja.forwardRef(Gc);lr.displayName="SerifNumeral";var Xc=lr;import{jsx as uo,jsxs as Kc}from"react/jsx-runtime";var po=9,Ga=2*Math.PI*po,Uc=(t,r,n)=>{if(!Number.isFinite(t)||!Number.isFinite(r)||!Number.isFinite(n))return 0;if(n<=r)return 0;return Math.min(1,Math.max(0,(t-r)/(n-r)))},Wa=({className:t,classes:r,label:n,max:o=100,min:a=0,title:s,value:i,"aria-label":c,...d})=>{let u=Uc(i,a,o),p=Math.round(u*100),m=a+u*(o-a),f=Ga*(1-u);return uo("span",{"aria-label":c??`${n}: ${p}%`,"aria-valuemax":o,"aria-valuemin":a,"aria-valuenow":m,className:e("grid size-8 shrink-0 place-items-center text-muted-foreground",r?.root,t),title:s??`${n} ${p}%`,...d,children:Kc("svg",{"aria-hidden":"true",className:e("size-6 -rotate-90",r?.svg),viewBox:"0 0 24 24",children:[uo("circle",{className:e("stroke-muted",r?.track),cx:"12",cy:"12",fill:"none",r:po,strokeWidth:"3"}),uo("circle",{className:e("stroke-foreground transition-[stroke-dashoffset]",r?.indicator),cx:"12",cy:"12",fill:"none",r:po,strokeDasharray:Ga,strokeDashoffset:f,strokeLinecap:"round",strokeWidth:"3"})]})})};Wa.displayName="Ring";var Yc=Wa;import*as Ka from"react";import{jsx as Ua,jsxs as Qc}from"react/jsx-runtime";var Xa={danger:"bg-destructive",neutral:"bg-muted-foreground/40",primary:"bg-primary",success:"bg-emerald-500",warning:"bg-amber-500"},qc={md:"size-2",sm:"size-1.5"},Zc=({tone:t="neutral",pulse:r=!1,size:n="sm",className:o,...a},s)=>Qc("span",{ref:s,className:e("relative inline-flex shrink-0",qc[n],o),...a,children:[r&&Ua("span",{"aria-hidden":!0,className:e("absolute inline-flex h-full w-full animate-ping rounded-full opacity-60",Xa[t])}),Ua("span",{"aria-hidden":!0,className:e("relative inline-flex h-full w-full rounded-full",Xa[t])})]}),dn=Ka.forwardRef(Zc);dn.displayName="StatusDot";var ed=dn;import*as Za from"react";import{jsx as Ya,jsxs as qa}from"react/jsx-runtime";var td={neutral:"border-(--border-subtle) bg-card text-muted-foreground",warning:"border-[color-mix(in_oklab,var(--warning)_40%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_12%,var(--card))] text-[color-mix(in_oklab,var(--warning)_75%,var(--foreground))]"},rd=({tooltip:t,tone:r="neutral",icon:n,className:o,children:a,...s},i)=>qa(Bt,{children:[qa(Vt,{render:Ya(ke,{ref:i,variant:"outline",className:e(td[r],o),...s}),children:[n,a]}),Ya(Ht,{children:t})]}),Qa=Za.forwardRef(rd);Qa.displayName="TooltipBadge";var nd=Qa;import*as bs from"react";import{jsx as ad}from"react/jsx-runtime";var od={body1:{className:"text-base",tag:"p"},body2:{className:"text-sm",tag:"p"},h1:{className:"text-2xl font-semibold",tag:"h1"},h2:{className:"text-xl font-bold",tag:"h2"},h3:{className:"text-lg font-semibold",tag:"h3"},h4:{className:"text-base font-medium",tag:"h4"},subtitle1:{className:"text-base font-normal text-muted-foreground",tag:"h6"},subtitle2:{className:"text-sm font-medium text-muted-foreground",tag:"h6"}},un=bs.forwardRef(function({variant:r="body1",as:n,className:o,...a},s){let{tag:i,className:c}=od[r];return ad(n??i,{ref:s,className:e(c,o),...a})});un.displayName="Typography";import{jsx as id}from"react/jsx-runtime";var sd=({children:t,as:r="form",className:n,onSubmit:o,...a})=>{let s=(i)=>{i.preventDefault(),o?.(i)};return id(r,{className:e("flex flex-col gap-4 min-w-[300px]",n),onSubmit:s,...a,children:t})},ld=sd;import{jsx as pd}from"react/jsx-runtime";var vs={},cr=(...t)=>{for(let r of t)if(r!==void 0)return r;return 1},cd=(t=vs)=>({"--list-cols":cr(t.cols),"--list-cols-2xl":cr(t.cols2xl,t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-lg":cr(t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-md":cr(t.colsMd,t.colsSm,t.cols),"--list-cols-sm":cr(t.colsSm,t.cols),"--list-cols-xl":cr(t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols)}),dd=["grid","gap-4","[grid-template-columns:repeat(var(--list-cols),minmax(0,1fr))]","sm:[grid-template-columns:repeat(var(--list-cols-sm),minmax(0,1fr))]","md:[grid-template-columns:repeat(var(--list-cols-md),minmax(0,1fr))]","lg:[grid-template-columns:repeat(var(--list-cols-lg),minmax(0,1fr))]","xl:[grid-template-columns:repeat(var(--list-cols-xl),minmax(0,1fr))]","2xl:[grid-template-columns:repeat(var(--list-cols-2xl),minmax(0,1fr))]"].join(" "),ud=({cols:t=vs,children:r,...n})=>pd("div",{className:dd,style:cd(t),...n,children:r});import{jsx as fd}from"react/jsx-runtime";var md=({className:t,spaced:r=!1,...n})=>fd("div",{className:e("animate-[rise-in_500ms_cubic-bezier(0.16,1,0.3,1)_both]",r&&"space-y-6",t),...n});var gd=md;import{jsx as Fr,jsxs as ur}from"react/jsx-runtime";var bd=(t)=>t!==null&&t!==void 0&&t.constructor===String,Br=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==""&&t!==0,vd=({title:t,description:r,icon:n,kicker:o,status:a,actions:s,className:i})=>ur("header",{className:e("space-y-2",i),children:[Br(o)?ur("div",{className:"flex items-center gap-2 text-(--text-muted) [&_svg]:h-3.5 [&_svg]:w-3.5",children:[Br(n)?Fr("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-sm bg-(--bg-accent-soft) text-(--brand)",children:n}):null,Fr("span",{className:"text-[12px] font-medium tracking-tight [&_span.sep]:mx-1.5 [&_span.sep]:text-(--brand)",children:bd(o)?o.split("·").map((c,d,u)=>ur("span",{children:[c.trim(),d<u.length-1?Fr("span",{className:"sep","aria-hidden":!0,children:"·"}):null]},d)):o})]}):null,ur("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[ur("div",{className:"min-w-0 flex-1 basis-64 space-y-1.5",children:[Fr("h1",{className:"font-display text-[27px] font-bold leading-tight tracking-[-0.02em] text-(--text-primary)",children:t}),Br(r)?Fr("p",{className:"max-w-2xl text-[14px] leading-relaxed text-(--text-secondary)",children:r}):null]}),Br(s)||Br(a)?ur("div",{className:"flex shrink-0 items-center gap-2 pt-1",children:[a,s]}):null]})]}),hd=vd;import*as ys from"react";import{jsx as pn,jsxs as hs}from"react/jsx-runtime";var mo=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),ws=ys.forwardRef(function({icon:r,title:n,description:o,action:a,className:s,...i},c){return hs("div",{ref:c,className:e("flex items-start gap-3",s),...i,children:[mo(r)?pn("span",{"aria-hidden":!0,className:"mt-0.5 inline-flex shrink-0 items-center justify-center rounded-md bg-muted p-2 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4",children:r}):null,hs("div",{className:"min-w-0 flex-1",children:[pn("h3",{className:"text-[15px] font-semibold leading-snug text-foreground",children:n}),mo(o)?pn("p",{className:"mt-0.5 text-sm leading-relaxed text-muted-foreground",children:o}):null]}),mo(a)?pn("div",{className:"shrink-0",children:a}):null]})});ws.displayName="SectionHeader";var xd=ws;import{jsx as Ns,jsxs as wd}from"react/jsx-runtime";var yd=({title:t,toolbar:r})=>wd("div",{className:"flex items-center justify-between mb-12",children:[Ns(un,{variant:"h2",children:t}),Boolean(r)&&Ns("div",{className:"flex items-center gap-2",children:r})]}),Nd=yd;import*as fn from"react";import{jsx as Ie,jsxs as mn}from"react/jsx-runtime";var Rs=(t,r,n)=>{if(t.length>=r)return t;return[...t,...Array.from({length:r-t.length},n)]},Rd=[],fo=({values:t,defaultValues:r=Rd,onValuesChange:n,addLabel:o,getRemoveLabel:a,actions:s,minItems:i=0,disabled:c=!1,renderItem:d,createItem:u,validateItem:p,classes:m,className:f,id:b,...g})=>{let h=fn.useId(),[T,R]=fn.useState(()=>Rs(r,i,u)),y=Rs(t??T,i,u),w=Boolean(s),C=(D)=>{if(t===void 0)R(D);n?.(D)};return mn("div",{"data-slot":"array-input",className:e("space-y-2",m?.root,f),...g,children:[Ie("div",{className:"space-y-2",children:y.map((D,N)=>{let P=N===0&&b!==void 0&&b!==""?b:`${h}-${N}`,L=p?.(D,N);return mn("div",{className:e("flex items-center gap-3",m?.row),children:[d({disabled:c,id:P,index:N,onValueChange:(F)=>{let A=[...y];A[N]=F,C(A)},validationMessage:L,value:D}),y.length>i?Ie(l,{type:"button",variant:"ghost",size:"icon",disabled:c,"aria-label":a(N),className:e("size-10 shrink-0 text-muted-foreground hover:text-destructive",m?.removeButton),onClick:()=>{C(y.filter((F,A)=>A!==N))},children:Ie(ss,{"aria-hidden":"true",className:"size-4"})}):null]},N)})}),mn("div",{className:e("flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",m?.actionRow),children:[Ie(ln,{disabled:c,className:m?.addButton,onClick:()=>{C([...y,u()])},children:o}),w?Ie("div",{className:e("sm:ml-auto",m?.actions),children:s}):null]})]})},Cd=(t)=>{let{createItem:r,getItemLabel:n,inputProps:o,placeholder:a,required:s=!1,renderItem:i,...c}=t,{className:d,...u}=o??{};if(i!==void 0)return Ie(fo,{...c,createItem:r??(()=>""),renderItem:i});return Ie(fo,{...c,createItem:r??(()=>""),renderItem:(p)=>{let{disabled:m,id:f,index:b,onValueChange:g,validationMessage:h,value:T}=p;return mn("div",{className:"min-w-0 flex-1",children:[Ie(M,{...u,id:f,"aria-label":n(b),"aria-invalid":Boolean(h),value:T,placeholder:a,required:s,disabled:m,className:e("w-full",d,c.classes?.input),onChange:(R)=>{g(R.target.value)}}),h!==void 0&&h!==""?Ie("p",{className:"mt-1 text-xs text-destructive",role:"alert",children:h}):null]})}})},Sd=(t)=>Ie(fo,{...t}),Pd=(t)=>t.createItem!==void 0&&t.renderItem!==void 0,Ps=(t)=>{if(Pd(t))return Ie(Sd,{...t});return Ie(Cd,{...t})};Ps.displayName="ArrayInput";var Td=Ps;import*as br from"react";var Nt=(t,r)=>{let n=[];for(let o of t){let a=n.findIndex((s)=>r(o,s)<0);if(a===-1)n.push(o);else n.splice(a,0,o)}return n};var Oe={hour:9,interval:1,minute:0,mode:"day",monthday:1,weekdays:[1,2,3,4,5]},go=/^\*\/(?<step>\d+)$/u,kd=(t)=>{let r=[];for(let n of t.split(",")){let o=/^(?<start>\d+)-(?<end>\d+)$/u.exec(n);if(o){let a=Number(o.groups?.start),s=Number(o.groups?.end);if(a>s)return null;for(let i=a;i<=s;i+=1)r.push(i)}else if(/^\d+$/u.test(n))r.push(Number(n));else return null}return r},Ld=(t,r,n,o)=>{if(r==="*"&&n==="*"&&o==="*"){let a=go.exec(t),s=Number(a?.groups?.step);return a&&s>=1&&s<=59?{...Oe,interval:s,mode:"minutes"}:null}return},Dd=(t,r,n,o)=>{if(r!=="*"||n!=="*")return;let a=go.exec(t);if(a){let s=Number(a.groups?.step);return s>=1&&s<=23?{...Oe,interval:s,minute:o,mode:"hours"}:null}return},Ed=(t,r,n)=>{let o=go.exec(t);if(o){let s=Number(o.groups?.step);if(s%7===0&&s>=7&&s<=28)return{...Oe,hour:r,interval:s/7,minute:n,mode:"weeks"};return s>=1&&s<=31?{...Oe,hour:r,interval:s,minute:n,mode:"days"}:null}let a=Number(t);return/^\d+$/u.test(t)&&a>=1&&a<=31?{...Oe,hour:r,minute:n,mode:"month",monthday:a}:null},Md=(t,r,n)=>{let o=kd(t);if(!o||o.some((s)=>s<0||s>7))return null;let a=Nt(new Set(o.map((s)=>s===7?0:s)),(s,i)=>s-i);return{...Oe,hour:r,minute:n,mode:"week",weekdays:a}},_r=(t)=>{let r=t.trim().split(/\s+/u);if(r.length!==5)return null;let[n,o,a,s,i]=r;if(s!=="*")return null;let c=Ld(n,o,a,i);if(c!==void 0)return c;if(!/^\d+$/u.test(n))return null;let d=Number(n);if(d<0||d>59)return null;let u=Dd(o,a,i,d);if(u!==void 0)return u;if(!/^\d+$/u.test(o))return null;let p=Number(o);if(p<0||p>23)return null;if(a==="*"&&i==="*")return{...Oe,hour:p,minute:d,mode:"day"};if(i==="*")return Ed(a,p,d);if(a==="*")return Md(i,p,d);return null},Rt=(t)=>{let r=Math.max(1,Math.floor(t.interval));switch(t.mode){case"minutes":return`*/${Math.min(r,59)} * * * *`;case"hours":return`${t.minute} */${Math.min(r,23)} * * *`;case"day":return`${t.minute} ${t.hour} * * *`;case"days":return`${t.minute} ${t.hour} */${Math.min(r,31)} * *`;case"week":{let n=t.weekdays.length>0?Nt(new Set(t.weekdays),(o,a)=>o-a).join(","):"*";return`${t.minute} ${t.hour} * * ${n}`}case"weeks":return`${t.minute} ${t.hour} */${Math.min(r*7,28)} * *`;case"month":return`${t.minute} ${t.hour} ${Math.min(Math.max(t.monthday,1),31)} * *`;default:throw Error("Unsupported cron mode")}},Ts=(t,r,n)=>{if(t==="*")return!0;for(let o of t.split(",")){let a=/^(?<base>\*|\d+|\d+-\d+)\/(?<increment>\d+)$/u.exec(o);if(a){let i=a.groups?.base??"";if(i!=="*"&&!Ts(i,r,n))return!1;let c=Number(a.groups?.increment);if(!Number.isFinite(c)||c<1)return!1;continue}let s=/^(?<start>\d+)-(?<end>\d+)$/u.exec(o);if(s){let i=Number(s.groups?.start),c=Number(s.groups?.end);if(i<r||c>n||i>c)return!1;continue}if(/^\d+$/u.test(o)){let i=Number(o);if(i<r||i>n)return!1;continue}return!1}return!0},Id=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ad=(t,r)=>{let n=String(t).padStart(2,"0"),o=String(r).padStart(2,"0");return`${n}:${o}`},gn=(t)=>{let r=_r(t);if(!r)return t;let n=Ad(r.hour,r.minute);switch(r.mode){case"minutes":return r.interval===1?"Every minute":`Every ${r.interval} minutes`;case"hours":return r.interval===1?`Every hour at :${String(r.minute).padStart(2,"0")}`:`Every ${r.interval} hours at :${String(r.minute).padStart(2,"0")}`;case"day":return`Every day at ${n}`;case"days":return r.interval===1?`Every day at ${n}`:`Every ${r.interval} days at ${n}`;case"week":{if(r.weekdays.length===0)return`Weekly at ${n}`;let o=Nt(r.weekdays,(c,d)=>c-d),a=o.length===5&&o.every((c,d)=>c===d+1),s=o.length===2&&o[0]===0&&o[1]===6;if(a)return`Weekdays at ${n}`;if(s)return`Weekends at ${n}`;return`${o.map((c)=>Id[c].slice(0,3)).join(", ")} at ${n}`}case"weeks":return r.interval===1?`Every week at ${n}`:`Every ${r.interval} weeks at ${n}`;case"month":return`Day ${r.monthday} of every month at ${n}`;default:throw Error("Unsupported cron mode")}},bo=(t)=>{let r=t.trim().split(/\s+/u);if(r.length!==5)return!1;let n=[[0,59],[0,23],[1,31],[1,12],[0,7]];return r.every((o,a)=>Ts(o,n[a][0],n[a][1]))};import*as Ls from"react";var ks=(t)=>{let o=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(new Date).find((d)=>d.type==="timeZoneName")?.value??"GMT",a=/(?<sign>[+-])(?<hours>\d{1,2})(?::(?<minutes>\d{2}))?/u.exec(o);if(!a)return 0;let s=a.groups?.sign==="-"?-1:1,i=Number(a.groups?.hours??0),c=Number(a.groups?.minutes??0);return s*(i*60+c)},Od=(t)=>{let r=ks(t),n=r>=0?"+":"-",o=Math.abs(r),a=String(Math.floor(o/60)).padStart(2,"0"),s=String(o%60).padStart(2,"0");return`${n}${a}:${s}`},bn=null,ho=()=>{if(bn)return bn;let t="supportedValuesOf"in Intl?Intl.supportedValuesOf("timeZone"):["UTC"];return bn=Nt(["UTC",...t].map((r)=>({label:`${r} (UTC${Od(r)})`,offset:ks(r),value:r})),(r,n)=>r.offset-n.offset||r.value.localeCompare(n.value)).map(({value:r,label:n})=>({label:n,value:r})),bn};import{jsx as Hd}from"react/jsx-runtime";var vn=({value:t,onChange:r,className:n,width:o="100%",disabled:a,placeholder:s="Select timezone"})=>{let i=Ls.useMemo(()=>ho(),[]);return Hd(qn,{options:i,value:t,onChange:(c)=>{r(c||"UTC")},placeholder:s,searchPlaceholder:"Search timezone...",emptyMessage:"No timezone found.",className:e("bg-transparent font-normal",n),width:o,disabled:a})};import{jsx as z,jsxs as me,Fragment as $d}from"react/jsx-runtime";var wo=[{label:"X minutes",value:"minutes"},{label:"X hours",value:"hours"},{label:"Day",value:"day"},{label:"X days",value:"days"},{label:"Week",value:"week"},{label:"X weeks",value:"weeks"},{label:"Month",value:"month"}],Vd=[{label:"Monday",short:"Mon",value:1},{label:"Tuesday",short:"Tue",value:2},{label:"Wednesday",short:"Wed",value:3},{label:"Thursday",short:"Thu",value:4},{label:"Friday",short:"Fri",value:5},{label:"Saturday",short:"Sat",value:6},{label:"Sunday",short:"Sun",value:0}],Bd=(t)=>wo.some((r)=>r.value===t),Ds=(t)=>{let r=t.trim();if(!r)return{custom:Rt(Oe),simple:Oe,view:"simple"};let n=_r(r);if(n)return{custom:r,simple:n,view:"simple"};return{custom:r,simple:Oe,view:"advanced"}},Es=(t,r)=>{let n=r===1;switch(t.value){case"minutes":return n?"minute":"minutes";case"hours":return n?"hour":"hours";case"day":return"day";case"days":return n?"day":"days";case"week":return"week";case"weeks":return n?"week":"weeks";case"month":return"month";default:throw Error("Unsupported cron mode")}},hn=(t,r,n)=>Math.max(r,Math.min(n,t)),Ms=(t)=>String(t).padStart(2,"0"),Fd=({hour:t,minute:r,onChange:n})=>me("div",{className:"flex items-center gap-1",children:[z(M,{type:"number",min:0,max:23,value:Ms(t),onChange:(o)=>{n(hn(Number(o.target.value)||0,0,23),r)},className:"w-16 text-center font-mono"}),z("span",{className:"text-muted-foreground",children:":"}),z(M,{type:"number",min:0,max:59,value:Ms(r),onChange:(o)=>{n(t,hn(Number(o.target.value)||0,0,59))},className:"w-16 text-center font-mono"})]}),_d=({state:t,onChange:r,timezone:n,onTimezoneChange:o})=>{let a=t.mode==="minutes"||t.mode==="hours"||t.mode==="days"||t.mode==="weeks",s=t.mode!=="minutes"&&t.mode!=="hours",i=t.mode==="hours",c=t.mode==="week",d=t.mode==="month";return me("div",{className:"space-y-3",children:[z("div",{className:"grid gap-2 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-end",children:me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"Every"}),me("div",{className:e("grid gap-2",a?"grid-cols-[88px_minmax(0,1fr)]":"grid-cols-1"),children:[a&&z(M,{type:"number",min:1,value:t.interval,onChange:(u)=>{r({interval:Math.max(1,Number(u.target.value)||1)})},className:"font-mono"}),me(Lo,{items:wo.map((u)=>({label:Es(u,t.interval),value:u.value})),value:t.mode,onValueChange:(u)=>{if(Bd(u))r({mode:u})},children:[z(Ao,{className:"flex-1",children:z(Mo,{})}),z(Do,{children:wo.map((u)=>z(No,{value:u.value,children:Es(u,t.interval)},u.value))})]})]})]})}),c&&me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"On"}),z(gs,{multiple:!0,variant:"outline",size:"sm",value:t.weekdays.map(String),onValueChange:(u)=>{r({weekdays:u.length?Nt(u.map(Number),(p,m)=>p-m):[1]})},className:"w-full",children:Vd.map((u)=>z(xs,{value:String(u.value),"aria-label":u.label,className:"text-xs",children:u.short},u.value))})]}),d&&me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"On day"}),z(M,{type:"number",min:1,max:31,value:t.monthday,onChange:(u)=>{r({monthday:hn(Number(u.target.value)||1,1,31)})},className:"w-24"})]}),(s||n!==void 0&&o)&&me("div",{className:e("grid gap-3",s&&n!==void 0&&o?"lg:grid-cols-[auto_minmax(0,1fr)] lg:items-end":"grid-cols-1"),children:[s&&me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"At"}),z(Fd,{hour:t.hour,minute:t.minute,onChange:(u,p)=>{r({hour:u,minute:p})}})]}),n!==void 0&&o&&me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),z(vn,{value:n,onChange:o})]})]}),i&&me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"At minute"}),z(M,{type:"number",min:0,max:59,value:t.minute,onChange:(u)=>{r({minute:hn(Number(u.target.value)||0,0,59)})},className:"w-24"})]})]})},zd=({value:t,onChange:r,className:n,showPreview:o=!0,timezone:a,onTimezoneChange:s})=>{let[i,c]=br.useState(()=>Ds(t)),[d,u]=br.useState(t),[p,m]=br.useState(t);if(t!==d){if(u(t),t!==p)m(t),c(Ds(t))}let f=br.useCallback((y)=>{let w=y.view==="simple"?Rt(y.simple):y.custom;m(w),r(w)},[r]),b=(y)=>{c((w)=>{let C={...w.simple,...y},D={...w,custom:Rt(C),simple:C};return f(D),D})},g=(y)=>{c((w)=>{let C={...w,custom:y};return f(C),C})},h=(y)=>{c((w)=>{if(y===w.view)return w;if(y==="advanced"){let N=Rt(w.simple),P={...w,custom:N,view:y};return f(P),P}let C=_r(w.custom),D=C?{...w,simple:C,view:y}:{...w,view:y};return f(D),D})},T=bo(i.custom),R=null;if(i.view==="simple")R=gn(Rt(i.simple));else if(T)R=gn(i.custom);return me("div",{className:e("space-y-4",n),children:[me(ps,{value:i.view,onValueChange:(y)=>{if(y==="simple"||y==="advanced")h(y)},children:[me(ms,{className:"grid w-full grid-cols-2 rounded-md bg-muted/70 p-1 sm:w-[320px]",children:[z(jn,{value:"simple",className:"text-xs",children:"Simple"}),z(jn,{value:"advanced",className:"text-xs",children:"Advanced"})]}),z(Yn,{value:"simple",className:"space-y-3 pt-3",children:z(_d,{state:i.simple,onChange:b,timezone:a,onTimezoneChange:s})}),me(Yn,{value:"advanced",className:"space-y-2 pt-3",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"Cron Expression"}),z(M,{value:i.custom,onChange:(y)=>{g(y.target.value)},placeholder:"0 9 * * 1-5",className:e("font-mono text-sm",!T&&i.custom.trim()&&"border-destructive focus-visible:ring-destructive/40"),spellCheck:!1}),z("p",{className:"text-[11px] text-muted-foreground",children:"Format: minute hour day-of-month month day-of-week"})]})]}),i.view==="advanced"&&a!==void 0&&s&&me("div",{className:"space-y-2",children:[z("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),z(vn,{value:a,onChange:s})]}),o&&z("div",{className:"flex min-h-8 flex-wrap items-center gap-2 rounded-md bg-muted/35 px-3 py-2 text-xs",children:R===null?z("span",{className:"text-destructive",children:"Invalid cron expression"}):me($d,{children:[z("span",{className:"text-muted-foreground",children:R}),z(ke,{variant:"secondary",className:"ml-auto font-mono text-[11px]",children:i.view==="simple"?Rt(i.simple):i.custom})]})})]})};import{jsx as To}from"react/jsx-runtime";var Jd={both:"w-full h-full",horizontal:"w-full h-auto",none:"",vertical:"h-full w-auto"},jd=({src:t,alt:r="",className:n="",width:o,height:a,fill:s="horizontal",style:i})=>{if(s==="both")return To("div",{className:e("relative overflow-hidden rounded-lg shadow-md",n),style:{height:a,width:o,...i},children:To("img",{src:t,alt:r,className:"object-cover w-full h-full absolute inset-0"})});return To("img",{src:t,alt:r,width:o,height:a,className:e("object-cover rounded-lg shadow-md",Jd[s],n),style:{height:s==="vertical"?"100%":a,width:s==="horizontal"?"100%":o,...i}})},Gd=jd;import{jsx as xn,jsxs as Is}from"react/jsx-runtime";var Wd=({title:t,className:r,children:n,...o})=>Is("section",{"data-slot":"summary-list",className:e("space-y-2",r),...o,children:[t?xn("h3",{className:"text-sm font-semibold tracking-tight",children:t}):null,xn("dl",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border bg-card",children:n})]}),Xd=({label:t,value:r,muted:n=!1,className:o,...a})=>Is("div",{"data-slot":"summary-item",className:e("grid gap-1 px-4 py-3 sm:grid-cols-[minmax(8rem,14rem)_1fr] sm:gap-4",o),...a,children:[xn("dt",{className:"text-sm text-muted-foreground",children:t}),xn("dd",{className:e("min-w-0 break-words text-sm",n?"text-muted-foreground":"font-medium text-foreground"),children:r})]});import*as ko from"react";import{jsx as At,jsxs as As}from"react/jsx-runtime";var Ud=({className:t,...r})=>At(Jo,{"data-slot":"choice-card-group",className:e("grid gap-3",t),...r}),Kd=({title:t,description:r,media:n,footer:o,className:a,...s})=>{let i=ko.useId(),c=ko.useId(),d=Boolean(r);return As(cs,{"data-slot":"choice-card","aria-labelledby":i,"aria-describedby":d?c:void 0,className:e("group/choice relative flex h-full min-w-0 flex-col items-start gap-4 rounded-lg border border-border bg-card p-5 text-left shadow-(--shadow-sm) outline-none transition-[border-color,background-color,box-shadow] dark:shadow-none","hover:border-foreground/25 focus-visible:ring-[3px] focus-visible:ring-ring/50","data-checked:border-primary data-checked:bg-primary/[0.04] data-checked:ring-1 data-checked:ring-primary/25","data-disabled:cursor-not-allowed data-disabled:bg-muted/30 data-disabled:opacity-65 data-disabled:hover:border-border",a),...s,children:[At("span",{"aria-hidden":!0,className:"absolute top-4 right-4 flex size-5 items-center justify-center rounded-full border border-input bg-background text-primary-foreground transition-colors group-data-checked/choice:border-primary group-data-checked/choice:bg-primary",children:At(us,{children:At(S,{className:"size-3",strokeWidth:3})})}),n,As("span",{className:"block min-w-0 space-y-1 pr-7",children:[At("span",{id:i,className:"block font-semibold tracking-tight",children:t}),d?At("span",{id:c,className:"block text-sm leading-relaxed text-muted-foreground",children:r}):null]}),o?At("span",{className:"mt-auto block w-full",children:o}):null]})};import*as Ct from"react";import{jsx as St,jsxs as Os}from"react/jsx-runtime";var Hs=Ct.forwardRef(function({className:r,...n},o){return St("div",{ref:o,className:e("grid gap-2",r),...n})}),Vs=({className:t,...r})=>St(ds,{className:e("grid gap-2",t),...r}),Io=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),yn=Ct.forwardRef(function({title:r,description:n,descriptionId:o,wrapDescription:a=!1,disabled:s=!1,control:i,className:c,children:d,...u},p){return Os("label",{ref:p,className:e("flex min-w-0 items-start gap-3 rounded-md border border-border p-3","has-data-checked:border-primary/50 has-data-checked:bg-primary/5",s?"cursor-not-allowed bg-muted/30 opacity-65":"cursor-pointer hover:bg-muted/50",c),...u,children:[i,Os("span",{className:"min-w-0 flex-1",children:[St("span",{className:"block truncate text-sm font-medium",children:r}),Io(n)?St("span",{id:o,className:e("mt-1 block text-xs text-muted-foreground",!a&&"truncate"),children:n}):null,d]})]})}),Bs=(t)=>Object.prototype.toString.call(t)==="[object String]",Fs=(t,r)=>t!==null&&r instanceof Node&&(t.contains(r)||r instanceof HTMLInputElement&&r.getAttribute("aria-hidden")==="true"),Yd=({value:t,title:r,description:n,radioLabel:o,disabled:a=!1,onClick:s,...i})=>{let c=Ct.useId(),d=Ct.useId(),u=o??(Bs(r)?r:void 0);return St(yn,{description:n,descriptionId:d,disabled:a,title:r,onClick:(p)=>{if(s?.(p),p.defaultPrevented||a)return;let m=document.querySelector(`#${c}`);if(Fs(m,p.target))return;p.preventDefault(),m?.click()},control:St(fs,{"aria-describedby":Io(n)?d:void 0,"aria-label":u,className:"mt-1",disabled:a,id:c,value:t}),...i})},qd=({checked:t,title:r,description:n,checkboxLabel:o,disabled:a=!1,onClick:s,onCheckedChange:i,...c})=>{let d=Ct.useId(),u=Ct.useId(),p=o??(Bs(r)?r:void 0);return St(yn,{description:n,descriptionId:u,disabled:a,title:r,onClick:(m)=>{if(s?.(m),m.defaultPrevented||a)return;if(Fs(document.querySelector(`#${d}`),m.target))return;m.preventDefault(),i(!t)},control:St(Zo,{"aria-describedby":Io(n)?u:void 0,"aria-label":p,checked:t,className:"mt-0.5",disabled:a,id:d,onCheckedChange:(m)=>{if(!a)i(m===!0)}}),...c})};Hs.displayName="CardOptionsBlock";Vs.displayName="RadioCardOptionsBlock";yn.displayName="CardOption";import*as _s from"react";import{jsx as zr,jsxs as Oo}from"react/jsx-runtime";var Zd=({title:t,description:r,command:n,copyLabel:o=t??n,copyErrorMessage:a,className:s,...i},c)=>Oo("div",{ref:c,className:e("space-y-2",s),...i,children:[t===void 0&&r===void 0?null:Oo("div",{children:[t===void 0?null:zr("p",{className:"text-sm font-medium",children:t}),r===void 0?null:zr("p",{className:"text-sm text-muted-foreground",children:r})]}),Oo("div",{className:"flex items-start gap-2",children:[zr("pre",{className:"flex-1 overflow-x-auto rounded-md border bg-muted px-3 py-2 font-mono text-xs",children:zr("code",{children:n})}),zr(cn,{value:n,label:o,errorMessage:a})]})]}),$s=_s.forwardRef(Zd);$s.displayName="CommandStep";var Qd=$s;import{forwardRef as eu,useId as tu}from"react";import{jsx as $r,jsxs as Js}from"react/jsx-runtime";var js=eu(function({currency:r,label:n="Amount",hint:o,hideLabel:a=!1,hideHint:s=!1,error:i,className:c,wrapperClassName:d,id:u,decimals:p=2,step:m,placeholder:f,...b},g){let h=tu(),T=u??h,R=`Enter amount in ${r}`,y=m??1/10**p,w=f??(p>0?`0.${"0".repeat(p)}`:"0"),C=i!==null&&i!==void 0&&i.length>0;return Js("div",{className:e("w-full space-y-2",d),children:[!a&&$r(ue,{htmlFor:T,children:n}),Js("div",{className:"relative",children:[$r("span",{className:"-translate-y-1/2 absolute top-1/2 left-3 text-sm text-muted-foreground",children:r}),$r(M,{ref:g,className:e("bg-background pl-12",C&&"border-destructive",c),id:T,min:"0",placeholder:w,step:y,type:"number",...b})]}),C?$r("p",{className:"text-xs text-destructive",children:i}):!s&&$r("p",{className:"text-xs text-muted-foreground",children:o??R})]})});js.displayName="CurrencyInput";var ru=js;import*as Gs from"react";import{jsx as wn,jsxs as Ho}from"react/jsx-runtime";var Ws=Gs.forwardRef(function({index:r,label:n,hint:o,className:a,children:s,...i},c){let d=Boolean(r),u=Boolean(o);return Ho("div",{ref:c,className:e("grid gap-x-4",d?"grid-cols-[2.25rem_1fr] sm:grid-cols-[2.5rem_1fr]":"grid-cols-1",a),...i,children:[d?wn("div",{className:"flex h-6 items-center justify-end pt-[2px]",children:wn(lr,{children:r})}):null,Ho("div",{className:"min-w-0 space-y-1.5",children:[Ho("div",{className:"flex items-baseline justify-between gap-2",children:[wn(ir,{children:n}),u?wn("span",{className:"text-[10px] text-muted-foreground",children:o}):null]}),s]})]})});Ws.displayName="FieldRow";var nu=Ws;import{jsx as X,jsxs as ze,Fragment as du}from"react/jsx-runtime";var ou=(t)=>{if(t===0)return"0 Bytes";let r=1024,n=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(t)/Math.log(r));return`${Math.round(t/r**o*100)/100} ${n[o]}`},au={downloadFile:"Download file",downloadingFile:"Downloading file",dragActive:"Drop the file here",dragInactive:"Drag & drop a file here, or click to select",errorRetry:"Please try again",fileTypeHint:"PDF, DOC, DOCX up to 10MB"},su=({active:t,activeLabel:r,inactiveLabel:n,hint:o})=>ze("div",{className:"flex w-full items-center gap-3",children:[X("div",{className:e("flex h-10 w-10 shrink-0 items-center justify-center rounded-full transition-colors",t?"bg-[color-mix(in_oklab,var(--primary)_14%,var(--card))]":"bg-muted"),children:X(is,{className:e("h-5 w-5",t?"text-primary":"text-muted-foreground")})}),ze("div",{children:[X("p",{className:"text-sm font-medium text-foreground",children:t?r:n}),X("p",{className:"text-xs text-muted-foreground",children:o})]})]}),iu=({message:t,retryLabel:r})=>ze("div",{className:"flex w-full items-center gap-3",children:[X("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-destructive/10",children:X(B,{className:"h-5 w-5 text-destructive"})}),ze("div",{children:[X("p",{className:"text-sm font-medium text-destructive",children:t}),X("p",{className:"text-xs text-destructive/80",children:r})]})]}),lu=({file:t,downloading:r,downloadLabel:n,downloadingLabel:o,onDownload:a,onRemove:s})=>ze("div",{className:"flex w-full items-center justify-between",children:[ze("div",{className:"flex items-center gap-3",children:[t.previewUrl!==void 0&&t.previewUrl!==null&&t.previewUrl!==""?ze(du,{children:[X("span",{"aria-hidden":"true",className:"h-20 w-28 shrink-0 rounded-md border border-input bg-background bg-contain bg-center bg-no-repeat",style:{backgroundImage:`url(${t.previewUrl})`}}),X("span",{className:"sr-only",children:t.name})]}):X("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-[color-mix(in_oklab,var(--success)_14%,var(--card))]",children:X(Ja,{className:"h-5 w-5 text-(--success)"})}),ze("div",{className:"flex flex-col",children:[ze("div",{className:"flex items-center gap-2",children:[X(ts,{className:"h-4 w-4 text-muted-foreground"}),X("span",{className:"text-sm font-medium text-foreground",children:t.name})]}),X("span",{className:"text-xs text-muted-foreground",children:ou(t.size)})]})]}),ze("div",{className:"flex shrink-0 items-center gap-1",children:[a?X(l,{"aria-label":r?o:n,className:"h-8 w-8 rounded-full p-0",disabled:r,onClick:a,size:"sm",title:r?o:n,type:"button",variant:"ghost",children:r?X(de,{className:"h-4 w-4 animate-spin"}):X(Po,{className:"h-4 w-4"})}):null,s?X(l,{className:"h-8 w-8 rounded-full p-0 hover:bg-destructive/10",onClick:s,size:"sm",type:"button",variant:"ghost",children:X(B,{className:"h-4 w-4 text-destructive"})}):null]})]}),cu=(t)=>{let{rootProps:r,inputProps:n,isDragActive:o,selectedFile:a,error:s,onRemoveFile:i,onDownloadFile:c,isDownloadingFile:d,disabled:u,className:p,labels:m}=t,f={...au,...m},b=a!==void 0&&a!==null,g=s!==void 0&&s!==null&&s!=="";return X("div",{className:e("w-full",p),children:ze("div",{...r,className:e("relative flex min-h-24 cursor-pointer items-center justify-center rounded-lg border-2 border-dashed bg-transparent px-4 py-5 transition-all",o===!0?"border-primary bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))]":"border-input hover:border-input",b&&"border-[color-mix(in_oklab,var(--success)_60%,var(--border))] bg-[color-mix(in_oklab,var(--success)_10%,transparent)]",g&&"border-destructive bg-[color-mix(in_oklab,var(--destructive)_10%,var(--card))]",u===!0&&"cursor-not-allowed opacity-60",r?.className),children:[X("input",{...n}),!b&&!g?X(su,{active:Boolean(o),activeLabel:f.dragActive,hint:f.fileTypeHint,inactiveLabel:f.dragInactive}):null,a!==void 0&&a!==null&&!g?X(lu,{downloadLabel:f.downloadFile,downloading:Boolean(d),downloadingLabel:f.downloadingFile,file:a,onDownload:c,onRemove:i}):null,s!==void 0&&s!==null&&s!==""?X(iu,{message:s,retryLabel:f.errorRetry}):null]})})},uu=cu;import{jsx as Xs,jsxs as mu}from"react/jsx-runtime";var pu=x("inline-flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full border font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{active:!1,size:"md"},variants:{active:{false:"border-(--border-subtle) bg-(--bg-surface)/60 text-(--text-secondary) hover:border-(--border-default) hover:text-(--text-primary)",true:"border-[color-mix(in_oklab,var(--brand)_35%,var(--border))] bg-(--bg-accent-soft) text-(--text-primary)"},size:{md:"h-8 px-3.5 text-[13px]",sm:"h-7 px-3 text-[12px]"}}}),Us=({options:t,value:r,onValueChange:n,label:o,size:a,className:s,classes:i,...c})=>Xs("div",{"aria-label":o,className:e("flex flex-wrap items-center gap-1.5",i?.root,s),...c,children:t.map((d)=>{let u=d.value===r;return mu("button",{type:"button","aria-pressed":u,disabled:d.disabled,onClick:()=>{n(d.value)},className:e(pu({active:u,size:a}),i?.chip),children:[d.label,d.count===void 0?null:Xs("span",{className:e("tabular-nums text-[11px] text-(--text-muted)",i?.count),children:d.count})]},d.value)})});Us.displayName="FilterChips";var fu=Us;import*as vr from"react";import{jsx as it,jsxs as Nu}from"react/jsx-runtime";var gu=52,bu=26,Rn=4,Nn=20,vu=(t)=>({"--flow-lane":t}),Ys=vr.createContext(null),qs=(t)=>{let r=vr.useContext(Ys);if(!r)throw Error(`${t} must be rendered inside a FlowBand.`);return r},hu=({lanes:t=1,stepHeight:r=gu,laneHeight:n=bu,className:o,style:a,children:s,...i})=>{let c=Math.max(r,t*n+(t-1)*Rn),d=vr.useMemo(()=>({height:c,stepHeight:r}),[c,r]);return it(Ys.Provider,{value:d,children:it("div",{className:e("flex min-w-0 items-stretch gap-1",o),style:{height:c,...a},...i,children:s})})},xu=({className:t,style:r,children:n,...o})=>{let{stepHeight:a}=qs("FlowStep");return it("div",{className:e("flex min-w-0 flex-1 items-stretch self-center",t),style:{height:a,...r},...o,children:n})},Ks=({centers:t,height:r,colors:n,merge:o=!1})=>{let a=r/2,s=7;return it("svg",{"aria-hidden":!0,width:Nn,height:r,viewBox:`0 0 ${Nn} ${r}`,className:"shrink-0",style:o?{transform:"scaleX(-1)"}:void 0,children:t.map((i,c)=>{let d=n[c];return it("path",{style:vu(d),d:`M0 ${a}H7C13 ${a} ${Nn-6} ${i} ${Nn} ${i}`,fill:"none",strokeWidth:1.5,strokeLinecap:"round",className:d!==void 0&&d!==""?"stroke-[color-mix(in_oklab,var(--flow-lane)_45%,var(--border))]":"stroke-border"},c)})})},yu=(t,r)=>{let n=(r-Rn*(t-1))/t;return Array.from({length:t},(o,a)=>a*(n+Rn)+n/2)},wu=({lanes:t,fork:r=!0,rejoin:n=!0,label:o,className:a,...s})=>{let{height:i}=qs("FlowBranch"),c=yu(t.length,i),d=t.map((u)=>u.color);return Nu("div",{"aria-label":o,className:e("flex min-w-0 flex-1 items-stretch",a),...s,children:[r&&it(Ks,{centers:c,height:i,colors:d}),it("div",{className:"flex min-w-0 flex-1 flex-col",style:{gap:Rn},children:t.map((u)=>it("div",{className:"flex min-w-0 flex-1 items-stretch overflow-hidden",children:u.content},u.key))}),n&&it(Ks,{centers:c,height:i,colors:d,merge:!0})]})};import*as Zs from"react";import{jsx as Vo,jsxs as Cu}from"react/jsx-runtime";var Ru=({index:t,className:r,children:n,...o},a)=>Cu("div",{ref:a,className:e("grid grid-cols-[1.75rem_1fr] gap-x-3 leading-relaxed",r),...o,children:[Vo("div",{className:"pt-[1px] text-right",children:Vo(lr,{className:"opacity-80",children:t})}),Vo("p",{className:"text-[13px] text-muted-foreground",children:n})]}),Qs=Zs.forwardRef(Ru);Qs.displayName="GuideStep";var Su=Qs;import*as yr from"react";import{jsx as we,jsxs as xr,Fragment as Tu}from"react/jsx-runtime";var ei=yr.forwardRef(function({className:r,variant:n="island",...o},a){return we(dr,{ref:a,variant:n,className:e("gap-0 p-0",r),...o})});ei.displayName="HierarchyTree";var ti=yr.forwardRef(function({title:r,icon:n,count:o,actions:a,className:s,...i},c){return xr("div",{ref:c,"data-slot":"hierarchy-tree-header",className:e("flex flex-wrap items-center gap-3 border-b border-border px-4 py-3",s),...i,children:[xr("div",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",children:[n!==void 0&&n!==null?we("span",{className:"shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4",children:n}):null,we("span",{className:"min-w-0 truncate",children:r}),o!==void 0&&o!==null?we("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs font-normal text-muted-foreground",children:o}):null]}),a!==void 0&&a!==null?we("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:a}):null]})});ti.displayName="HierarchyTreeHeader";var ri=yr.forwardRef(function({className:r,...n},o){return we("div",{ref:o,"data-slot":"hierarchy-tree-body",className:e("min-w-0",r),...n})});ri.displayName="HierarchyTreeBody";var Pu=[],ni=yr.forwardRef(function({depth:r,rails:n=Pu,isLastChild:o=!1,hasChildren:a=!1,contentClassName:s,className:i,children:c,...d},u){let p=Math.max(1,r);return xr("div",{ref:u,"data-slot":"hierarchy-tree-row","data-depth":p,className:e("group flex items-stretch transition-colors hover:bg-muted/40",p===1&&"border-t border-border first:border-t-0",i),...d,children:[p>1?xr("div",{"aria-hidden":!0,className:"flex shrink-0 pl-5",children:[n.map((m,f)=>we("span",{className:"relative w-5",children:m?we("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}):null},f)),we("span",{className:"relative w-5",children:o?we("span",{className:e("absolute left-0 top-0 h-[22px] rounded-bl-md border-b border-l border-(--border-subtle)",a?"w-full":"w-14")}):xr(Tu,{children:[we("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}),we("span",{className:e("absolute left-0 top-[22px] border-t border-(--border-subtle)",a?"w-full":"w-14")})]})})]}):null,we("div",{className:e("flex min-w-0 flex-1 items-start gap-2 py-3 pl-2 pr-3",s),children:c})]})});ni.displayName="HierarchyTreeRow";var oi=yr.forwardRef(function({expanded:r,count:n,visible:o=!0,className:a,...s},i){return xr(l,{ref:i,type:"button",variant:"ghost",size:"sm",className:e("h-6 shrink-0 gap-0.5 px-1 text-xs text-muted-foreground",!o&&"invisible",a),...s,children:[we(k,{className:e("h-3.5 w-3.5 transition-transform",r&&"rotate-90")}),n]})});oi.displayName="HierarchyTreeToggle";var ku=ei;import Lu,{useState as Du}from"react";import{jsx as ie,jsxs as De}from"react/jsx-runtime";var Eu=x("font-mono text-sm rounded-md overflow-hidden flex flex-col",{defaultVariants:{size:"md",variant:"default"},variants:{size:{lg:"p-4 text-base",md:"p-3",sm:"p-2 text-xs"},variant:{default:"bg-card border border-border",filled:"bg-muted",outlined:"border border-border"}}}),Bo=({value:t,ancestors:r})=>{if(t===null||t===void 0)return t;if(t===!0||t===!1)return t;let n=Object.prototype.toString.call(t);if(n==="[object String]"){let o=JSON.stringify(t);return o===void 0?n:o.slice(1,-1)}if(n==="[object Number]")return Number(t);if(Array.isArray(t)){if(r.has(t))return"[Circular]";r.add(t);let o=t.map((a)=>Bo({ancestors:r,value:a}));return r.delete(t),o}if(t instanceof Object){if(r.has(t))return"[Circular]";r.add(t);let o=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,Bo({ancestors:r,value:s})]));return r.delete(t),o}return n},Mu=(t)=>{if(t===null||t===void 0)return"text-gray-500 dark:text-gray-400";if(String(t)===t)return"text-green-600 dark:text-green-400";if(t===!0||t===!1)return"text-amber-600 dark:text-amber-400";return"text-blue-600 dark:text-blue-400"},Iu=(t)=>{if(t===null)return"null";if(t===void 0)return"undefined";if(String(t)===t)return`"${t}"`;return String(t)},Au=(t)=>t,Ou=(t)=>t!==null&&Object(t)===t,Hu=(t,r)=>{if(t)return ie("span",{className:"w-4"});return r?ie(E,{className:"w-4 h-4"}):ie(k,{className:"w-4 h-4"})},Vu=(t)=>t?{close:"]",open:"["}:{close:"}",open:"{"},Bu=(t,r,n)=>t?{name:null,path:`${n}[${r}]`}:{name:String(r),path:`${n}.${r}`},Fu=({data:t,className:r,classes:n,variant:o,size:a,expandAll:s=!1,expandRoot:i=!0,indentSize:c=16,showLineNumbers:d=!1,showToolbar:u=!1,maxHeight:p,maxWidth:m,renderValue:f})=>{let b=Lu.useMemo(()=>Bo({ancestors:new WeakSet,value:t}),[t]),[g,h]=Du(()=>{let P={};if(i)P.root=!0;return P}),T=(P,L)=>{if(P==="root"&&g[P]===void 0)return i;return g[P]??L},R=(P)=>{h((L)=>({...L,[P]:!T(P,s)}))},y=(P)=>{h({})},w=()=>{try{let P=JSON.stringify(b,null,2);navigator.clipboard.writeText(P),yt.success("Copied to clipboard",{description:"JSON data has been copied to clipboard",duration:3000})}catch(P){console.error("Failed to copy JSON to clipboard",P),yt.error("Copy failed",{description:"Failed to copy JSON to clipboard",duration:3000})}},C={maxWidth:m??"auto"},D=(P,L,F,A,j)=>{let te=[],q=Ou(L),oe=Array.isArray(L),ge=q&&Object.keys(L).length===0,ve=Vu(oe),U={marginLeft:F*c},Re=Au(A),Z=j;if(!q){let J=f?.(L,A);return te.push(De("div",{className:"flex",children:[d&&ie("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:Z}),De("div",{className:"flex min-w-0",style:U,children:[ie("span",{"aria-hidden":!0,className:"mr-1 w-4 shrink-0"}),P!==null&&De("span",{className:"shrink-0 text-purple-600 dark:text-purple-400",children:[`"${P}":`,ie("span",{className:"text-gray-600 dark:text-gray-400 mr-1",children:" "})]}),J??ie("span",{className:e("min-w-0 break-all",Mu(L)),children:Iu(L)})]})]},Re)),[te,Z+1]}let he=T(A,s),H=Hu(ge,he);if(te.push(De("div",{className:"flex items-start group",children:[d&&ie("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:Z}),De("div",{className:"flex items-start",style:U,children:[ie("button",{onClick:()=>{R(A)},className:"mr-1 w-4 h-4 mt-0.5 focus:outline-none opacity-60 hover:opacity-100","aria-label":he?"Collapse":"Expand",tabIndex:0,type:"button",children:H}),De("div",{children:[P!==null&&De("span",{className:"text-purple-600 dark:text-purple-400",children:[`"${P}":`,ie("span",{className:"text-gray-600 dark:text-gray-400 mr-1",children:" "})]}),ie("span",{className:"text-gray-600 dark:text-gray-400",children:ve.open}),ge||!he?De("span",{className:"text-gray-600 dark:text-gray-400",children:[ge?"":"...",ve.close]}):null]})]})]},`${Re}-open`)),Z+=1,he&&!ge){let J=Z,_=oe?L.map((ae,Ce)=>[Ce,ae]):Object.entries(L);for(let[ae,Ce]of _){let se=Bu(oe,ae,A),[pt,O]=D(se.name,Ce,F+1,se.path,J);te.push(...pt),J=O}return te.push(De("div",{className:"flex",children:[d&&ie("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:J}),ie("div",{className:"text-gray-600 dark:text-gray-400",style:U,children:ve.close})]},`${Re}-close`)),J+=1,[te,J]}return[te,Z]},[N]=D(null,b,0,"root",1);return De("div",{className:e(Eu({size:a,variant:o}),n?.root,r),style:C,children:[u&&De("div",{className:e("flex justify-between items-center px-3 py-2 border-b border-border bg-muted/50",n?.toolbar),children:[ie("div",{className:"text-sm font-medium",children:"JSON Viewer"}),De("div",{className:"flex gap-2",children:[ie(l,{size:"sm",variant:"outline",onClick:()=>{y(!0)},children:"Expand All"}),ie(l,{size:"sm",variant:"outline",onClick:()=>{y(!1)},children:"Collapse All"}),De(l,{size:"sm",variant:"outline",onClick:w,children:[ie(ot,{className:"w-4 h-4 mr-1"}),"Copy"]})]})]}),ie("div",{className:e("overflow-auto flex-1",n?.content),style:{maxHeight:p??void 0},children:N})]})},Fo=Fu;import{useId as _u,useState as zu}from"react";import{Streamdown as $u}from"streamdown";import{jsx as lt,jsxs as _o,Fragment as ju}from"react/jsx-runtime";var ai=({mode:t,onModeChange:r,labels:n,disabled:o=!1,className:a})=>{let s=t==="write"?"preview":"write",i=s==="write"?n.write:n.preview,c=s==="write"?n.writeTitle??n.write:n.previewTitle??n.preview;return lt(l,{type:"button",variant:"ghost",size:"icon",className:e("size-7",a),disabled:o,"aria-label":i,title:c,onClick:()=>{r(s)},children:s==="preview"?lt(Qt,{className:"size-3.5 text-muted-foreground"}):lt(es,{className:"size-3.5 text-muted-foreground"})})},Ju=({label:t,value:r,onValueChange:n,emptyPreview:o,toggleLabels:a,mode:s,defaultMode:i="write",onModeChange:c,previewValue:d=r,disabled:u=!1,placeholder:p,editorId:m,showHeader:f=!0,footer:b,className:g,editorClassName:h,previewClassName:T,textareaProps:R})=>{let y=_u(),w=m??y,[C,D]=zu(i),N=s??C,P=(L)=>{if(s===void 0)D(L);c?.(L)};return _o("div",{className:e("grid gap-2",g),children:[f&&_o("div",{className:"flex items-center justify-between gap-3",children:[lt(ue,{htmlFor:N==="write"?w:void 0,children:t}),lt(ai,{mode:N,onModeChange:P,labels:a,disabled:u})]}),N==="write"?_o(ju,{children:[lt(rn,{...R,id:w,value:r,disabled:u,placeholder:p,"aria-label":f?R?.["aria-label"]:R?.["aria-label"]??t,className:e("min-h-48 resize-y font-mono text-sm",h),onChange:(L)=>{n(L.target.value)}}),b]}):lt("div",{"aria-label":`${t} ${a.preview}`,className:e("prose prose-sm max-w-none rounded-lg border bg-muted/30 p-4 dark:prose-invert [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",T),children:d.trim()?lt($u,{mode:"static",className:"[&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:d}):lt("div",{className:"not-prose text-muted-foreground",children:o})})]})};import{jsx as Cn,jsxs as Wu}from"react/jsx-runtime";var Gu=({open:t,onOpenChange:r,title:n="JSON Viewer",data:o,jsonViewerProps:a})=>Cn(nt,{open:t,onOpenChange:r,children:Wu(at,{className:"max-w-2xl max-h-[80vh] flex flex-col",children:[Cn(zt,{children:Cn(st,{children:n})}),Cn(Fo,{data:o,className:"min-h-0 flex-1",variant:"filled",size:"sm",showToolbar:!0,expandAll:!1,expandRoot:!0,...a})]})});import{jsx as si,jsxs as ii}from"react/jsx-runtime";var Xu=({href:t,children:r,className:n,external:o=!1,linkComponent:a})=>{let s=e("inline-flex items-center gap-1 text-primary hover:underline",n);if(o||!a)return ii("a",{href:t,...o?{rel:"noopener noreferrer",target:"_blank"}:{},className:s,children:[r,si($n,{className:"h-3 w-3"})]});return ii(a,{to:t,className:s,children:[r,si($n,{className:"h-3 w-3"})]})};import{useState as Uu}from"react";import{jsx as Sn,jsxs as Yu}from"react/jsx-runtime";var Ku=({value:t,isSensitive:r=!1,className:n,maskChar:o="•",showToggle:a=!0,showLabel:s="Show value",hideLabel:i="Hide value",truncate:c=!0,children:d})=>{let[u,p]=Uu(!r),f=u?t:(()=>{if(t.startsWith("{")||t.startsWith("["))return`{ ${o.repeat(10)} }`;return o.repeat(Math.min(t.length,20))})(),b=c?f.slice(0,50)+(f.length>50?"...":""):f,g=u?i:s,h=r&&a?Sn(l,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{p(!u)},title:g,"aria-label":g,children:u?Sn(Ar,{className:"h-3 w-3"}):Sn(Qt,{className:"h-3 w-3"})}):null;if(d!==void 0)return d({displayValue:b,toggle:h});return Yu("div",{className:e("flex items-center gap-2",n),children:[Sn("code",{className:"text-sm bg-muted px-2 py-1 rounded flex-1 break-all",children:b}),h]})};import*as di from"react";import{jsx as li,jsxs as ci}from"react/jsx-runtime";var ui=di.forwardRef(function({icon:r,text:n,trailing:o,className:a,...s},i){return ci("div",{ref:i,className:e("flex min-w-0 items-center gap-2",a),...s,children:[ci("div",{className:"flex min-w-0 flex-1 items-center gap-2 border-b border-dashed border-border py-2 text-[13px] text-muted-foreground",children:[r!==null&&r!==void 0?li("span",{className:"text-primary/70",children:r}):null,li("span",{className:"min-w-0 truncate",children:n})]}),o]})});ui.displayName="MutedPlaceholder";var qu=ui;import{useMemo as Zu,useState as Qu}from"react";import{jsx as Ee,jsxs as Pn}from"react/jsx-runtime";var zo=({value:t,ancestors:r})=>{if(t===null||t===void 0)return t;if(t===!0||t===!1)return t;let n=Object.prototype.toString.call(t);if(n==="[object String]")return String.prototype.valueOf.call(t);if(n==="[object Number]")return Number(t);if(Array.isArray(t)){if(r.has(t))return;r.add(t);let o=t.map((a)=>zo({ancestors:r,value:a}));return r.delete(t),o}if(t instanceof Object){if(r.has(t))return;r.add(t);let o=Object.fromEntries(Object.entries(t).map(([a,s])=>[a,zo({ancestors:r,value:s})]));return r.delete(t),o}return},Ye=(t)=>{if(t instanceof Object&&!Array.isArray(t))return t;return},Tt=(t)=>Array.isArray(t)?t:void 0,pi=(t)=>Object.prototype.toString.call(t)==="[object String]"&&t===String.prototype.valueOf.call(t),$o=(t)=>pi(t)?t:void 0,ep=(t)=>Tt(t)?.filter(pi)??[],tp=(t)=>{let r=Tt(t.anyOf);if(!r)return t;let n=r.filter((o)=>Ye(o)?.type!=="null");return n.length===1?Ye(n[0])??t:t},mi=(t)=>{let r=$o(t.type);if(r!==void 0&&r!=="")return r;if(Tt(t.enum))return"enum";if(Tt(t.oneOf)||Tt(t.anyOf))return"variant";if(Ye(t.properties))return"object";return"value"},fi=(t,r="schema")=>{let n=Ye(t.properties);if(n){let a=new Set(ep(t.required));return Object.entries(n).flatMap(([s,i])=>{let c=Ye(i);return c?[{name:s,path:`${r}.properties.${s}`,required:a.has(s),schema:c}]:[]})}if(mi(t)==="array"){let a=Ye(t.items);return a?[{name:"Items",path:`${r}.items`,required:!0,schema:a}]:[]}let o=Tt(t.oneOf)??Tt(t.anyOf)??Tt(t.allOf);if(!o)return[];return o.flatMap((a,s)=>{let i=Ye(a);return i?[{name:`Option ${s+1}`,path:`${r}.option.${s}`,required:!0,schema:i}]:[]})},jo=(t,r,n=new Set)=>{let o=tp(t),a=$o(o.$ref);if(a===void 0||a===""||!a.startsWith("#/$defs/")||n.has(a))return o;let s=Ye(Ye(r.$defs)?.[a.slice(8)]);if(!s)return o;return jo(s,r,new Set([...n,a]))},gi=({child:t,depth:r,root:n,defaultExpandedDepth:o})=>{let a=jo(t.schema,n),s=fi(a,t.path),[i,c]=Qu(r<o),d=mi(a),u=$o(a.description),p=s.length>0,m=i?`Collapse ${t.name}`:`Expand ${t.name}`;return Pn(Y,{open:i,onOpenChange:c,children:[Pn("div",{className:e("flex min-w-0 items-start border-b border-border/70 bg-background px-2.5 py-2 last:border-b-0",p&&"gap-2"),style:{paddingLeft:`${10+r*16}px`},children:[p?Ee(K,{"aria-label":m,className:"mt-0.5 shrink-0 rounded-sm text-muted-foreground outline-none transition hover:text-foreground focus-visible:ring-2 focus-visible:ring-primary/40",children:Ee(k,{className:e("size-3.5 transition-transform",i&&"rotate-90")})}):null,Pn("div",{className:"min-w-0 flex-1",children:[Pn("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[Ee("span",{className:"break-all text-xs font-medium text-foreground",children:t.name}),Ee("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:d}),t.required?Ee("span",{className:"text-[10px] font-medium text-destructive",children:"required"}):null]}),u!==void 0&&u!==""?Ee("p",{className:"mt-0.5 text-xs leading-snug text-muted-foreground",children:u}):null]})]}),p?Ee(Q,{children:Ee("div",{className:"border-l border-border/70",children:s.map((f)=>Ee(gi,{child:f,defaultExpandedDepth:o,depth:r+1,root:n},f.path))})}):null]})},rp=({schema:t,className:r,defaultExpandedDepth:n=1,emptyLabel:o="No fields"})=>{let a=Zu(()=>zo({ancestors:new WeakSet,value:t}),[t]),s=Ye(a);if(!s)return Ee("p",{className:e("text-xs text-muted-foreground",r),children:o});let i=jo(s,s),c=fi(i);if(!c.length)return Ee("p",{className:e("text-xs text-muted-foreground",r),children:o});return Ee("div",{"aria-label":"Object schema",className:e("overflow-hidden rounded-lg border border-border",r),children:c.map((d)=>Ee(gi,{child:d,defaultExpandedDepth:n,depth:0,root:s},d.path))})};import qe,{createContext as Ur,useContext as Tr,useEffect as ee,useState as $e,useCallback as Je,useMemo as ne,useRef as fe,memo as cp,useReducer as dp,cloneElement as rx,forwardRef as nx}from"react";import{createPortal as up,unstable_batchedUpdates as In}from"react-dom";import{useMemo as Wo,useLayoutEffect as np,useEffect as vi,useRef as wr,useCallback as Tn}from"react";function hi(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wo(()=>(o)=>{r.forEach((a)=>a(o))},r)}var Jr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ot(t){let r=Object.prototype.toString.call(t);return r==="[object Window]"||r==="[object global]"}function kn(t){return"nodeType"in t}function xe(t){var r,n;if(!t)return window;if(Ot(t))return t;if(!kn(t))return window;return(r=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Ln(t){let{Document:r}=xe(t);return t instanceof r}function Nr(t){if(Ot(t))return!1;return t instanceof xe(t).HTMLElement}function Uo(t){return t instanceof xe(t).SVGElement}function _t(t){if(!t)return document;if(Ot(t))return t.document;if(!kn(t))return document;if(Ln(t))return t;if(Nr(t)||Uo(t))return t.ownerDocument;return document}var He=Jr?np:vi;function Dn(t){let r=wr(t);return He(()=>{r.current=t}),Tn(function(){for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];return r.current==null?void 0:r.current(...o)},[])}function xi(){let t=wr(null),r=Tn((o,a)=>{t.current=setInterval(o,a)},[]),n=Tn(()=>{if(t.current!==null)clearInterval(t.current),t.current=null},[]);return[r,n]}function Rr(t,r){if(r===void 0)r=[t];let n=wr(t);return He(()=>{if(n.current!==t)n.current=t},r),n}function Cr(t,r){let n=wr();return Wo(()=>{let o=t(n.current);return n.current=o,o},[...r])}function jr(t){let r=Dn(t),n=wr(null),o=Tn((a)=>{if(a!==n.current)r==null||r(a,n.current);n.current=a},[]);return[n,o]}function En(t){let r=wr();return vi(()=>{r.current=t},[t]),r.current}var Go={};function $t(t,r){return Wo(()=>{if(r)return r;let n=Go[t]==null?0:Go[t]+1;return Go[t]=n,t+"-"+n},[t,r])}function yi(t){return function(r){for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;a<n;a++)o[a-1]=arguments[a];return o.reduce((s,i)=>{let c=Object.entries(i);for(let[d,u]of c){let p=s[d];if(p!=null)s[d]=p+t*u}return s},{...r})}}var jt=yi(1),Gt=yi(-1);function op(t){return"clientX"in t&&"clientY"in t}function Gr(t){if(!t)return!1;let{KeyboardEvent:r}=xe(t.target);return r&&t instanceof r}function ap(t){if(!t)return!1;let{TouchEvent:r}=xe(t.target);return r&&t instanceof r}function Mn(t){if(ap(t)){if(t.touches&&t.touches.length){let{clientX:r,clientY:n}=t.touches[0];return{x:r,y:n}}else if(t.changedTouches&&t.changedTouches.length){let{clientX:r,clientY:n}=t.changedTouches[0];return{x:r,y:n}}}if(op(t))return{x:t.clientX,y:t.clientY};return null}var Lt=Object.freeze({Translate:{toString(t){if(!t)return;let{x:r,y:n}=t;return"translate3d("+(r?Math.round(r):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:r,scaleY:n}=t;return"scaleX("+r+") scaleY("+n+")"}},Transform:{toString(t){if(!t)return;return[Lt.Translate.toString(t),Lt.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:r,duration:n,easing:o}=t;return r+" "+n+"ms "+o}}}),bi="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function wi(t){if(t.matches(bi))return t;return t.querySelector(bi)}import Ni,{useState as sp,useCallback as ip}from"react";var lp={display:"none"};function Ri(t){let{id:r,value:n}=t;return Ni.createElement("div",{id:r,style:lp},n)}function Ci(t){let{id:r,announcement:n,ariaLiveType:o="assertive"}=t,a={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Ni.createElement("div",{id:r,style:a,role:"status","aria-live":o,"aria-atomic":!0},n)}function Si(){let[t,r]=sp("");return{announce:ip((o)=>{if(o!=null)r(o)},[]),announcement:t}}var Bi=Ur(null);function pp(t){let r=Tr(Bi);ee(()=>{if(!r)throw Error("useDndMonitor must be used within a children of <DndContext>");return r(t)},[t,r])}function mp(){let[t]=$e(()=>new Set),r=Je((o)=>(t.add(o),()=>t.delete(o)),[t]);return[Je((o)=>{let{type:a,event:s}=o;t.forEach((i)=>{var c;return(c=i[a])==null?void 0:c.call(i,s)})},[t]),r]}var fp={draggable:`
|
|
3
3
|
To pick up a draggable item, press the space bar.
|
|
4
4
|
While dragging, use the arrow keys to move the item.
|
|
5
5
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
6
|
-
`},ip={onDragStart(t){let{active:r}=t;return"Picked up draggable item "+r.id+"."},onDragOver(t){let{active:r,over:n}=t;if(n)return"Draggable item "+r.id+" was moved over droppable area "+n.id+".";return"Draggable item "+r.id+" is no longer over a droppable area."},onDragEnd(t){let{active:r,over:n}=t;if(n)return"Draggable item "+r.id+" was dropped over droppable area "+n.id;return"Draggable item "+r.id+" was dropped."},onDragCancel(t){let{active:r}=t;return"Dragging was cancelled. Draggable item "+r.id+" was dropped."}};function lp(t){let{announcements:r=ip,container:n,hiddenTextDescribedById:o,screenReaderInstructions:s=sp}=t,{announce:l,announcement:c}=Ni(),d=Nr("DndLiveRegion"),[u,p]=it(!1);if(me(()=>{p(!0)},[]),op(be(()=>({onDragStart(f){let{active:h}=f;l(r.onDragStart({active:h}))},onDragMove(f){let{active:h,over:R}=f;if(r.onDragMove)l(r.onDragMove({active:h,over:R}))},onDragOver(f){let{active:h,over:R}=f;l(r.onDragOver({active:h,over:R}))},onDragEnd(f){let{active:h,over:R}=f;l(r.onDragEnd({active:h,over:R}))},onDragCancel(f){let{active:h,over:R}=f;l(r.onDragCancel({active:h,over:R}))}}),[l,r])),!u)return null;let m=gt.createElement(gt.Fragment,null,gt.createElement(yi,{id:o,value:s.draggable}),gt.createElement(wi,{id:d,announcement:c}));return n?np(m,n):m}var ge;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(ge||(ge={}));function bo(){}function Ra(t,r){return be(()=>({sensor:t,options:r!=null?r:{}}),[t,r])}function Hi(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return be(()=>[...r].filter((o)=>o!=null),[...r])}var ct=Object.freeze({x:0,y:0});function Vi(t,r){return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}function Bi(t,r){let{data:{value:n}}=t,{data:{value:o}}=r;return n-o}function cp(t,r){let{data:{value:n}}=t,{data:{value:o}}=r;return o-n}function Ri(t){let{left:r,top:n,height:o,width:s}=t;return[{x:r,y:n},{x:r+s,y:n},{x:r,y:n+o},{x:r+s,y:n+o}]}function Ca(t,r){if(!t||t.length===0)return null;let[n]=t;return r?n[r]:n}function Ci(t,r,n){if(r===void 0)r=t.left;if(n===void 0)n=t.top;return{x:r+t.width*0.5,y:n+t.height*0.5}}var Fi=(t)=>{let{collisionRect:r,droppableRects:n,droppableContainers:o}=t,s=Ci(r,r.left,r.top),l=[];for(let c of o){let{id:d}=c,u=n.get(d);if(u){let p=Vi(Ci(u),s);l.push({id:d,data:{droppableContainer:c,value:p}})}}return l.sort(Bi)},_i=(t)=>{let{collisionRect:r,droppableRects:n,droppableContainers:o}=t,s=Ri(r),l=[];for(let c of o){let{id:d}=c,u=n.get(d);if(u){let p=Ri(u),m=s.reduce((h,R,x)=>h+Vi(p[x],R),0),f=Number((m/4).toFixed(4));l.push({id:d,data:{droppableContainer:c,value:f}})}}return l.sort(Bi)};function dp(t,r){let n=Math.max(r.top,t.top),o=Math.max(r.left,t.left),s=Math.min(r.left+r.width,t.left+t.width),l=Math.min(r.top+r.height,t.top+t.height),c=s-o,d=l-n;if(o<s&&n<l){let u=r.width*r.height,p=t.width*t.height,m=c*d,f=m/(u+p-m);return Number(f.toFixed(4))}return 0}var up=(t)=>{let{collisionRect:r,droppableRects:n,droppableContainers:o}=t,s=[];for(let l of o){let{id:c}=l,d=n.get(c);if(d){let u=dp(d,r);if(u>0)s.push({id:c,data:{droppableContainer:l,value:u}})}}return s.sort(cp)};function pp(t,r,n){return{...t,scaleX:r&&n?r.width/n.width:1,scaleY:r&&n?r.height/n.height:1}}function zi(t,r){return t&&r?{x:t.left-r.left,y:t.top-r.top}:ct}function mp(t){return function(n){for(var o=arguments.length,s=Array(o>1?o-1:0),l=1;l<o;l++)s[l-1]=arguments[l];return s.reduce((c,d)=>({...c,top:c.top+t*d.y,bottom:c.bottom+t*d.y,left:c.left+t*d.x,right:c.right+t*d.x}),{...n})}}var fp=mp(1);function gp(t){if(t.startsWith("matrix3d(")){let r=t.slice(9,-1).split(/, /);return{x:+r[12],y:+r[13],scaleX:+r[0],scaleY:+r[5]}}else if(t.startsWith("matrix(")){let r=t.slice(7,-1).split(/, /);return{x:+r[4],y:+r[5],scaleX:+r[0],scaleY:+r[3]}}return null}function bp(t,r,n){let o=gp(r);if(!o)return t;let{scaleX:s,scaleY:l,x:c,y:d}=o,u=t.left-c-(1-s)*parseFloat(n),p=t.top-d-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),m=s?t.width/s:t.width,f=l?t.height/l:t.height;return{width:m,height:f,top:p,right:u+m,bottom:p+f,left:u}}var vp={ignoreTransform:!1};function Sr(t,r){if(r===void 0)r=vp;let n=t.getBoundingClientRect();if(r.ignoreTransform){let{transform:p,transformOrigin:m}=Oe(t).getComputedStyle(t);if(p)n=bp(n,p,m)}let{top:o,left:s,width:l,height:c,bottom:d,right:u}=n;return{top:o,left:s,width:l,height:c,bottom:d,right:u}}function Si(t){return Sr(t,{ignoreTransform:!0})}function hp(t){let{innerWidth:r,innerHeight:n}=t;return{top:0,left:0,right:r,bottom:n,width:r,height:n}}function xp(t,r){if(r===void 0)r=Oe(t).getComputedStyle(t);return r.position==="fixed"}function yp(t,r){if(r===void 0)r=Oe(t).getComputedStyle(t);let n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((s)=>{let l=r[s];return typeof l==="string"?n.test(l):!1})}function Dn(t,r){let n=[];function o(s){if(r!=null&&n.length>=r)return n;if(!s)return n;if(co(s)&&s.scrollingElement!=null&&!n.includes(s.scrollingElement))return n.push(s.scrollingElement),n;if(!nn(s)||ba(s))return n;if(n.includes(s))return n;let l=Oe(t).getComputedStyle(s);if(s!==t){if(yp(s,l))n.push(s)}if(xp(s,l))return n;return o(s.parentNode)}if(!t)return n;return o(t)}function $i(t){let[r]=Dn(t,1);return r!=null?r:null}function va(t){if(!Cn||!t)return null;if(yr(t))return t;if(!lo(t))return null;if(co(t)||t===wr(t).scrollingElement)return window;if(nn(t))return t;return null}function ji(t){if(yr(t))return t.scrollX;return t.scrollLeft}function Ji(t){if(yr(t))return t.scrollY;return t.scrollTop}function ya(t){return{x:ji(t),y:Ji(t)}}var Ne;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(Ne||(Ne={}));function Gi(t){if(!Cn||!t)return!1;return t===document.scrollingElement}function Wi(t){let r={x:0,y:0},n=Gi(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},o={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},s=t.scrollTop<=r.y,l=t.scrollLeft<=r.x,c=t.scrollTop>=o.y,d=t.scrollLeft>=o.x;return{isTop:s,isLeft:l,isBottom:c,isRight:d,maxScroll:o,minScroll:r}}var wp={x:0.2,y:0.2};function Np(t,r,n,o,s){let{top:l,left:c,right:d,bottom:u}=n;if(o===void 0)o=10;if(s===void 0)s=wp;let{isTop:p,isBottom:m,isLeft:f,isRight:h}=Wi(t),R={x:0,y:0},x={x:0,y:0},S={height:r.height*s.y,width:r.width*s.x};if(!p&&l<=r.top+S.height)R.y=Ne.Backward,x.y=o*Math.abs((r.top+S.height-l)/S.height);else if(!m&&u>=r.bottom-S.height)R.y=Ne.Forward,x.y=o*Math.abs((r.bottom-S.height-u)/S.height);if(!h&&d>=r.right-S.width)R.x=Ne.Forward,x.x=o*Math.abs((r.right-S.width-d)/S.width);else if(!f&&c<=r.left+S.width)R.x=Ne.Backward,x.x=o*Math.abs((r.left+S.width-c)/S.width);return{direction:R,speed:x}}function Rp(t){if(t===document.scrollingElement){let{innerWidth:l,innerHeight:c}=window;return{top:0,left:0,right:l,bottom:c,width:l,height:c}}let{top:r,left:n,right:o,bottom:s}=t.getBoundingClientRect();return{top:r,left:n,right:o,bottom:s,width:t.clientWidth,height:t.clientHeight}}function Xi(t){return t.reduce((r,n)=>Rr(r,ya(n)),ct)}function Cp(t){return t.reduce((r,n)=>r+ji(n),0)}function Sp(t){return t.reduce((r,n)=>r+Ji(n),0)}function Pp(t,r){if(r===void 0)r=Sr;if(!t)return;let{top:n,left:o,bottom:s,right:l}=r(t);if(!$i(t))return;if(s<=0||l<=0||n>=window.innerHeight||o>=window.innerWidth)t.scrollIntoView({block:"center",inline:"center"})}var Tp=[["x",["left","right"],Cp],["y",["top","bottom"],Sp]];class ho{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=Dn(r),o=Xi(n);this.rect={...t},this.width=t.width,this.height=t.height;for(let[s,l,c]of Tp)for(let d of l)Object.defineProperty(this,d,{get:()=>{let u=c(n),p=o[s]-u;return this.rect[d]+p},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class sn{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((r)=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var o;(o=this.target)==null||o.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function kp(t){let{EventTarget:r}=Oe(t);return t instanceof r?t:wr(t)}function ha(t,r){let n=Math.abs(t.x),o=Math.abs(t.y);if(typeof r==="number")return Math.sqrt(n**2+o**2)>r;if("x"in r&&"y"in r)return n>r.x&&o>r.y;if("x"in r)return n>r.x;if("y"in r)return o>r.y;return!1}var ot;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(ot||(ot={}));function Pi(t){t.preventDefault()}function Lp(t){t.stopPropagation()}var Y;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(Y||(Y={}));var Ui={start:[Y.Space,Y.Enter],cancel:[Y.Esc],end:[Y.Space,Y.Enter,Y.Tab]},Dp=(t,r)=>{let{currentCoordinates:n}=r;switch(t.code){case Y.Right:return{...n,x:n.x+25};case Y.Left:return{...n,x:n.x-25};case Y.Down:return{...n,y:n.y+25};case Y.Up:return{...n,y:n.y-25}}return};class En{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;let{event:{target:r}}=t;this.props=t,this.listeners=new sn(wr(r)),this.windowListeners=new sn(Oe(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ot.Resize,this.handleCancel),this.windowListeners.add(ot.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ot.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:t,onStart:r}=this.props,n=t.node.current;if(n)Pp(n);r(ct)}handleKeyDown(t){if(Pn(t)){let{active:r,context:n,options:o}=this.props,{keyboardCodes:s=Ui,coordinateGetter:l=Dp,scrollBehavior:c="smooth"}=o,{code:d}=t;if(s.end.includes(d)){this.handleEnd(t);return}if(s.cancel.includes(d)){this.handleCancel(t);return}let{collisionRect:u}=n.current,p=u?{x:u.left,y:u.top}:ct;if(!this.referenceCoordinates)this.referenceCoordinates=p;let m=l(t,{active:r,context:n.current,currentCoordinates:p});if(m){let f=Cr(m,p),h={x:0,y:0},{scrollableAncestors:R}=n.current;for(let x of R){let S=t.code,{isTop:B,isRight:E,isLeft:P,isBottom:k,maxScroll:M,minScroll:j}=Wi(x),D=Rp(x),A={x:Math.min(S===Y.Right?D.right-D.width/2:D.right,Math.max(S===Y.Right?D.left:D.left+D.width/2,m.x)),y:Math.min(S===Y.Down?D.bottom-D.height/2:D.bottom,Math.max(S===Y.Down?D.top:D.top+D.height/2,m.y))},F=S===Y.Right&&!E||S===Y.Left&&!P,Z=S===Y.Down&&!k||S===Y.Up&&!B;if(F&&A.x!==m.x){let X=x.scrollLeft+f.x,oe=S===Y.Right&&X<=M.x||S===Y.Left&&X>=j.x;if(oe&&!f.y){x.scrollTo({left:X,behavior:c});return}if(oe)h.x=x.scrollLeft-X;else h.x=S===Y.Right?x.scrollLeft-M.x:x.scrollLeft-j.x;if(h.x)x.scrollBy({left:-h.x,behavior:c});break}else if(Z&&A.y!==m.y){let X=x.scrollTop+f.y,oe=S===Y.Down&&X<=M.y||S===Y.Up&&X>=j.y;if(oe&&!f.x){x.scrollTo({top:X,behavior:c});return}if(oe)h.y=x.scrollTop-X;else h.y=S===Y.Down?x.scrollTop-M.y:x.scrollTop-j.y;if(h.y)x.scrollBy({top:-h.y,behavior:c});break}}this.handleMove(t,Rr(Cr(m,this.referenceCoordinates),h))}}}handleMove(t,r){let{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){let{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){let{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}En.activators=[{eventName:"onKeyDown",handler:(t,r,n)=>{let{keyboardCodes:o=Ui,onActivation:s}=r,{active:l}=n,{code:c}=t.nativeEvent;if(o.start.includes(c)){let d=l.activatorNode.current;if(d&&t.target!==d)return!1;return t.preventDefault(),s==null||s({event:t.nativeEvent}),!0}return!1}}];function Ti(t){return Boolean(t&&"distance"in t)}function ki(t){return Boolean(t&&"delay"in t)}class xo{constructor(t,r,n){var o;if(n===void 0)n=kp(t.event.target);this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;let{event:s}=t,{target:l}=s;this.props=t,this.events=r,this.document=wr(l),this.documentListeners=new sn(this.document),this.listeners=new sn(n),this.windowListeners=new sn(Oe(l)),this.initialCoordinates=(o=mo(s))!=null?o:ct,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel)this.listeners.add(t.cancel.name,this.handleCancel);if(this.windowListeners.add(ot.Resize,this.handleCancel),this.windowListeners.add(ot.DragStart,Pi),this.windowListeners.add(ot.VisibilityChange,this.handleCancel),this.windowListeners.add(ot.ContextMenu,Pi),this.documentListeners.add(ot.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(ki(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(Ti(r)){this.handlePending(r);return}}this.handleStart()}detach(){if(this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null)clearTimeout(this.timeoutId),this.timeoutId=null}handlePending(t,r){let{active:n,onPending:o}=this.props;o(n,t,this.initialCoordinates,r)}handleStart(){let{initialCoordinates:t}=this,{onStart:r}=this.props;if(t)this.activated=!0,this.documentListeners.add(ot.Click,Lp,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ot.SelectionChange,this.removeTextSelection),r(t)}handleMove(t){var r;let{activated:n,initialCoordinates:o,props:s}=this,{onMove:l,options:{activationConstraint:c}}=s;if(!o)return;let d=(r=mo(t))!=null?r:ct,u=Cr(o,d);if(!n&&c){if(Ti(c)){if(c.tolerance!=null&&ha(u,c.tolerance))return this.handleCancel();if(ha(u,c.distance))return this.handleStart()}if(ki(c)){if(ha(u,c.tolerance))return this.handleCancel()}this.handlePending(c,u);return}if(t.cancelable)t.preventDefault();l(d)}handleEnd(){let{onAbort:t,onEnd:r}=this.props;if(this.detach(),!this.activated)t(this.props.active);r()}handleCancel(){let{onAbort:t,onCancel:r}=this.props;if(this.detach(),!this.activated)t(this.props.active);r()}handleKeydown(t){if(t.code===Y.Esc)this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}var Ep={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Mn extends xo{constructor(t){let{event:r}=t,n=wr(r.target);super(t,Ep,n)}}Mn.activators=[{eventName:"onPointerDown",handler:(t,r)=>{let{nativeEvent:n}=t,{onActivation:o}=r;if(!n.isPrimary||n.button!==0)return!1;return o==null||o({event:n}),!0}}];var Mp={move:{name:"mousemove"},end:{name:"mouseup"}},wa;(function(t){t[t.RightClick=2]="RightClick"})(wa||(wa={}));class Ki extends xo{constructor(t){super(t,Mp,wr(t.event.target))}}Ki.activators=[{eventName:"onMouseDown",handler:(t,r)=>{let{nativeEvent:n}=t,{onActivation:o}=r;if(n.button===wa.RightClick)return!1;return o==null||o({event:n}),!0}}];var xa={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Yi extends xo{constructor(t){super(t,xa)}static setup(){return window.addEventListener(xa.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(xa.move.name,t)};function t(){}}}Yi.activators=[{eventName:"onTouchStart",handler:(t,r)=>{let{nativeEvent:n}=t,{onActivation:o}=r,{touches:s}=n;if(s.length>1)return!1;return o==null||o({event:n}),!0}}];var Tn;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(Tn||(Tn={}));var vo;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(vo||(vo={}));function Ip(t){let{acceleration:r,activator:n=Tn.Pointer,canScroll:o,draggingRect:s,enabled:l,interval:c=5,order:d=vo.TreeOrder,pointerCoordinates:u,scrollableAncestors:p,scrollableAncestorRects:m,delta:f,threshold:h}=t,R=Op({delta:f,disabled:!l}),[x,S]=bi(),B=Pe({x:0,y:0}),E=Pe({x:0,y:0}),P=be(()=>{switch(n){case Tn.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case Tn.DraggableRect:return s}},[n,s,u]),k=Pe(null),M=lt(()=>{let D=k.current;if(!D)return;let A=B.current.x*E.current.x,F=B.current.y*E.current.y;D.scrollBy(A,F)},[]),j=be(()=>d===vo.TreeOrder?[...p].reverse():p,[d,p]);me(()=>{if(!l||!p.length||!P){S();return}for(let D of j){if((o==null?void 0:o(D))===!1)continue;let A=p.indexOf(D),F=m[A];if(!F)continue;let{direction:Z,speed:X}=Np(D,F,P,r,h);for(let oe of["x","y"])if(!R[oe][Z[oe]])X[oe]=0,Z[oe]=0;if(X.x>0||X.y>0){S(),k.current=D,x(M,c),B.current=X,E.current=Z;return}}B.current={x:0,y:0},E.current={x:0,y:0},S()},[r,M,o,S,l,c,JSON.stringify(P),JSON.stringify(R),x,p,j,m,JSON.stringify(h)])}var Ap={x:{[Ne.Backward]:!1,[Ne.Forward]:!1},y:{[Ne.Backward]:!1,[Ne.Forward]:!1}};function Op(t){let{delta:r,disabled:n}=t,o=po(r);return an((s)=>{if(n||!o||!s)return Ap;let l={x:Math.sign(r.x-o.x),y:Math.sign(r.y-o.y)};return{x:{[Ne.Backward]:s.x[Ne.Backward]||l.x===-1,[Ne.Forward]:s.x[Ne.Forward]||l.x===1},y:{[Ne.Backward]:s.y[Ne.Backward]||l.y===-1,[Ne.Forward]:s.y[Ne.Forward]||l.y===1}}},[n,r,o])}function Hp(t,r){let n=r!=null?t.get(r):void 0,o=n?n.node.current:null;return an((s)=>{var l;if(r==null)return null;return(l=o!=null?o:s)!=null?l:null},[o,r])}function Vp(t,r){return be(()=>t.reduce((n,o)=>{let{sensor:s}=o,l=s.activators.map((c)=>({eventName:c.eventName,handler:r(c.handler,o)}));return[...n,...l]},[]),[t,r])}var kn;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(kn||(kn={}));var Na;(function(t){t.Optimized="optimized"})(Na||(Na={}));var Li=new Map;function Bp(t,r){let{dragging:n,dependencies:o,config:s}=r,[l,c]=it(null),{frequency:d,measure:u,strategy:p}=s,m=Pe(t),f=B(),h=on(f),R=lt(function(E){if(E===void 0)E=[];if(h.current)return;c((P)=>{if(P===null)return E;return P.concat(E.filter((k)=>!P.includes(k)))})},[h]),x=Pe(null),S=an((E)=>{if(f&&!n)return Li;if(!E||E===Li||m.current!==t||l!=null){let P=new Map;for(let k of t){if(!k)continue;if(l&&l.length>0&&!l.includes(k.id)&&k.rect.current){P.set(k.id,k.rect.current);continue}let M=k.node.current,j=M?new ho(u(M),M):null;if(k.rect.current=j,j)P.set(k.id,j)}return P}return E},[t,l,n,f,u]);return me(()=>{m.current=t},[t]),me(()=>{if(f)return;R()},[n,f]),me(()=>{if(l&&l.length>0)c(null)},[JSON.stringify(l)]),me(()=>{if(f||typeof d!=="number"||x.current!==null)return;x.current=setTimeout(()=>{R(),x.current=null},d)},[d,f,R,...o]),{droppableRects:S,measureDroppableContainers:R,measuringScheduled:l!=null};function B(){switch(p){case kn.Always:return!1;case kn.BeforeDragging:return n;default:return!n}}}function qi(t,r){return an((n)=>{if(!t)return null;if(n)return n;return typeof r==="function"?r(t):t},[r,t])}function Fp(t,r){return qi(t,r)}function _p(t){let{callback:r,disabled:n}=t,o=uo(r),s=be(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;let{MutationObserver:l}=window;return new l(o)},[o,n]);return me(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function yo(t){let{callback:r,disabled:n}=t,o=uo(r),s=be(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;let{ResizeObserver:l}=window;return new l(o)},[n]);return me(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function zp(t){return new ho(Sr(t),t)}function Di(t,r,n){if(r===void 0)r=zp;let[o,s]=it(null);function l(){s((u)=>{if(!t)return null;if(t.isConnected===!1){var p;return(p=u!=null?u:n)!=null?p:null}let m=r(t);if(JSON.stringify(u)===JSON.stringify(m))return u;return m})}let c=_p({callback(u){if(!t)return;for(let p of u){let{type:m,target:f}=p;if(m==="childList"&&f instanceof HTMLElement&&f.contains(t)){l();break}}}}),d=yo({callback:l});return nt(()=>{if(l(),t)d==null||d.observe(t),c==null||c.observe(document.body,{childList:!0,subtree:!0});else d==null||d.disconnect(),c==null||c.disconnect()},[t]),o}function $p(t){let r=qi(t);return zi(t,r)}var Ei=[];function jp(t){let r=Pe(t),n=an((o)=>{if(!t)return Ei;if(o&&o!==Ei&&t&&r.current&&t.parentNode===r.current.parentNode)return o;return Dn(t)},[t]);return me(()=>{r.current=t},[t]),n}function Jp(t){let[r,n]=it(null),o=Pe(t),s=lt((l)=>{let c=va(l.target);if(!c)return;n((d)=>{if(!d)return null;return d.set(c,ya(c)),new Map(d)})},[]);return me(()=>{let l=o.current;if(t!==l){c(l);let d=t.map((u)=>{let p=va(u);if(p)return p.addEventListener("scroll",s,{passive:!0}),[p,ya(p)];return null}).filter((u)=>u!=null);n(d.length?new Map(d):null),o.current=t}return()=>{c(t),c(l)};function c(d){d.forEach((u)=>{let p=va(u);p==null||p.removeEventListener("scroll",s)})}},[s,t]),be(()=>{if(t.length)return r?Array.from(r.values()).reduce((l,c)=>Rr(l,c),ct):Xi(t);return ct},[t,r])}function Mi(t,r){if(r===void 0)r=[];let n=Pe(null);return me(()=>{n.current=null},r),me(()=>{let o=t!==ct;if(o&&!n.current)n.current=t;if(!o&&n.current)n.current=null},[t]),n.current?Cr(t,n.current):ct}function Gp(t){me(()=>{if(!Cn)return;let r=t.map((n)=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(let n of r)n==null||n()}},t.map((r)=>{let{sensor:n}=r;return n}))}function Wp(t,r){return be(()=>t.reduce((n,o)=>{let{eventName:s,handler:l}=o;return n[s]=(c)=>{l(c,r)},n},{}),[t,r])}function Zi(t){return be(()=>t?hp(t):null,[t])}var Ii=[];function Xp(t,r){if(r===void 0)r=Sr;let[n]=t,o=Zi(n?Oe(n):null),[s,l]=it(Ii);function c(){l(()=>{if(!t.length)return Ii;return t.map((u)=>Gi(u)?o:new ho(r(u),u))})}let d=yo({callback:c});return nt(()=>{d==null||d.disconnect(),c(),t.forEach((u)=>d==null?void 0:d.observe(u))},[t]),s}function Up(t){if(!t)return null;if(t.children.length>1)return t;let r=t.children[0];return nn(r)?r:t}function Kp(t){let{measure:r}=t,[n,o]=it(null),s=lt((p)=>{for(let{target:m}of p)if(nn(m)){o((f)=>{let h=r(m);return f?{...f,width:h.width,height:h.height}:h});break}},[r]),l=yo({callback:s}),c=lt((p)=>{let m=Up(p);if(l==null||l.disconnect(),m)l==null||l.observe(m);o(m?r(m):null)},[r,l]),[d,u]=Sn(c);return be(()=>({nodeRef:d,rect:n,setRef:u}),[n,d,u])}var Yp=[{sensor:Mn,options:{}},{sensor:En,options:{}}],qp={current:{}},go={draggable:{measure:Si},droppable:{measure:Si,strategy:kn.WhileDragging,frequency:Na.Optimized},dragOverlay:{measure:Sr}};class ln extends Map{get(t){var r;return t!=null?(r=super.get(t))!=null?r:void 0:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((t)=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}var Zp={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new ln,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:bo},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:go,measureDroppableContainers:bo,windowRect:null,measuringScheduled:!1},Qp={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:bo,draggableNodes:new Map,over:null,measureDroppableContainers:bo},wo=Ln(Qp),Qi=Ln(Zp);function em(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new ln}}}function tm(t,r){switch(r.type){case ge.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:r.initialCoordinates,active:r.active}};case ge.DragMove:if(t.draggable.active==null)return t;return{...t,draggable:{...t.draggable,translate:{x:r.coordinates.x-t.draggable.initialCoordinates.x,y:r.coordinates.y-t.draggable.initialCoordinates.y}}};case ge.DragEnd:case ge.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ge.RegisterDroppable:{let{element:n}=r,{id:o}=n,s=new ln(t.droppable.containers);return s.set(o,n),{...t,droppable:{...t.droppable,containers:s}}}case ge.SetDroppableDisabled:{let{id:n,key:o,disabled:s}=r,l=t.droppable.containers.get(n);if(!l||o!==l.key)return t;let c=new ln(t.droppable.containers);return c.set(n,{...l,disabled:s}),{...t,droppable:{...t.droppable,containers:c}}}case ge.UnregisterDroppable:{let{id:n,key:o}=r,s=t.droppable.containers.get(n);if(!s||o!==s.key)return t;let l=new ln(t.droppable.containers);return l.delete(n),{...t,droppable:{...t.droppable,containers:l}}}default:return t}}function rm(t){let{disabled:r}=t,{active:n,activatorEvent:o,draggableNodes:s}=cn(wo),l=po(o),c=po(n==null?void 0:n.id);return me(()=>{if(r)return;if(!o&&l&&c!=null){if(!Pn(l))return;if(document.activeElement===l.target)return;let d=s.get(c);if(!d)return;let{activatorNode:u,node:p}=d;if(!u.current&&!p.current)return;requestAnimationFrame(()=>{for(let m of[u.current,p.current]){if(!m)continue;let f=hi(m);if(f){f.focus();break}}})}},[o,r,s,c,l]),null}function nm(t,r){let{transform:n,...o}=r;return t!=null&&t.length?t.reduce((s,l)=>l({transform:s,...o}),n):n}function om(t){return be(()=>({draggable:{...go.draggable,...t==null?void 0:t.draggable},droppable:{...go.droppable,...t==null?void 0:t.droppable},dragOverlay:{...go.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function am(t){let{activeNode:r,measure:n,initialRect:o,config:s=!0}=t,l=Pe(!1),{x:c,y:d}=typeof s==="boolean"?{x:s,y:s}:s;nt(()=>{if(!c&&!d||!r){l.current=!1;return}if(l.current||!o)return;let p=r==null?void 0:r.node.current;if(!p||p.isConnected===!1)return;let m=n(p),f=zi(m,o);if(!c)f.x=0;if(!d)f.y=0;if(l.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){let h=$i(p);if(h)h.scrollBy({top:f.y,left:f.x})}},[r,c,d,o,n])}var el=Ln({...ct,scaleX:1,scaleY:1}),pr;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(pr||(pr={}));var tl=tp(function(r){var n,o,s,l;let{id:c,accessibility:d,autoScroll:u=!0,children:p,sensors:m=Yp,collisionDetection:f=up,measuring:h,modifiers:R,...x}=r,S=rp(tm,void 0,em),[B,E]=S,[P,k]=ap(),[M,j]=it(pr.Uninitialized),D=M===pr.Initialized,{draggable:{active:A,nodes:F,translate:Z},droppable:{containers:X}}=B,oe=A!=null?F.get(A):null,fe=Pe({initial:null,translated:null}),ce=be(()=>{var Me;return A!=null?{id:A,data:(Me=oe==null?void 0:oe.data)!=null?Me:qp,rect:fe}:null},[A,oe]),he=Pe(null),[De,Ie]=it(null),[le,_e]=it(null),pe=on(x,Object.values(x)),Ae=Nr("DndDescribedBy",c),K=be(()=>X.getEnabled(),[X]),re=om(h),{droppableRects:ee,measureDroppableContainers:xe,measuringScheduled:ze}=Bp(K,{dragging:D,dependencies:[Z.x,Z.y],config:re.droppable}),ye=Hp(F,A),Et=be(()=>le?mo(le):null,[le]),U=ac(),$e=Fp(ye,re.draggable.measure);am({activeNode:A!=null?F.get(A):null,config:U.layoutShiftCompensation,initialRect:$e,measure:re.draggable.measure});let se=Di(ye,re.draggable.measure,$e),mn=Di(ye?ye.parentElement:null),ut=Pe({activatorEvent:null,active:null,activeNode:ye,collisionRect:null,collisions:null,droppableRects:ee,draggableNodes:F,draggingNode:null,draggingNodeRect:null,droppableContainers:X,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Dr=X.getNodeFor((n=ut.current.over)==null?void 0:n.id),xt=Kp({measure:re.dragOverlay.measure}),Er=(o=xt.nodeRef.current)!=null?o:ye,Mr=D?(s=xt.rect)!=null?s:se:null,Va=Boolean(xt.nodeRef.current&&xt.rect),Ba=$p(Va?null:se),Fo=Zi(Er?Oe(Er):null),Mt=jp(D?Dr!=null?Dr:ye:null),Vn=Xp(Mt),Bn=nm(R,{transform:{x:Z.x-Ba.x,y:Z.y-Ba.y,scaleX:1,scaleY:1},activatorEvent:le,active:ce,activeNodeRect:se,containerNodeRect:mn,draggingNodeRect:Mr,over:ut.current.over,overlayNodeRect:xt.rect,scrollableAncestors:Mt,scrollableAncestorRects:Vn,windowRect:Fo}),Fa=Et?Rr(Et,Z):null,_a=Jp(Mt),Zl=Mi(_a),Ql=Mi(_a,[se]),Ir=Rr(Bn,Zl),Ar=Mr?fp(Mr,Bn):null,fn=ce&&Ar?f({active:ce,collisionRect:Ar,droppableRects:ee,droppableContainers:K,pointerCoordinates:Fa}):null,za=Ca(fn,"id"),[At,$a]=it(null),ec=Va?Bn:Rr(Bn,Ql),tc=pp(ec,(l=At==null?void 0:At.rect)!=null?l:null,se),_o=Pe(null),ja=lt((Me,je)=>{let{sensor:Ge,options:Ot}=je;if(he.current==null)return;let qe=F.get(he.current);if(!qe)return;let We=Me.nativeEvent,pt=new Ge({active:he.current,activeNode:qe,event:We,options:Ot,context:ut,onAbort(Ce){if(!F.get(Ce))return;let{onDragAbort:mt}=pe.current,yt={id:Ce};mt==null||mt(yt),P({type:"onDragAbort",event:yt})},onPending(Ce,Ht,mt,yt){if(!F.get(Ce))return;let{onDragPending:bn}=pe.current,Vt={id:Ce,constraint:Ht,initialCoordinates:mt,offset:yt};bn==null||bn(Vt),P({type:"onDragPending",event:Vt})},onStart(Ce){let Ht=he.current;if(Ht==null)return;let mt=F.get(Ht);if(!mt)return;let{onDragStart:yt}=pe.current,gn={activatorEvent:We,active:{id:Ht,data:mt.data,rect:fe}};fo(()=>{yt==null||yt(gn),j(pr.Initializing),E({type:ge.DragStart,initialCoordinates:Ce,active:Ht}),P({type:"onDragStart",event:gn}),Ie(_o.current),_e(We)})},onMove(Ce){E({type:ge.DragMove,coordinates:Ce})},onEnd:Or(ge.DragEnd),onCancel:Or(ge.DragCancel)});_o.current=pt;function Or(Ce){return async function(){let{active:mt,collisions:yt,over:gn,scrollAdjustedTranslate:bn}=ut.current,Vt=null;if(mt&&bn){let{cancelDrop:vn}=pe.current;if(Vt={activatorEvent:We,active:mt,collisions:yt,delta:bn,over:gn},Ce===ge.DragEnd&&typeof vn==="function"){if(await Promise.resolve(vn(Vt)))Ce=ge.DragCancel}}he.current=null,fo(()=>{E({type:Ce}),j(pr.Uninitialized),$a(null),Ie(null),_e(null),_o.current=null;let vn=Ce===ge.DragEnd?"onDragEnd":"onDragCancel";if(Vt){let jo=pe.current[vn];jo==null||jo(Vt),P({type:vn,event:Vt})}})}}},[F]),rc=lt((Me,je)=>(Ge,Ot)=>{let qe=Ge.nativeEvent,We=F.get(Ot);if(he.current!==null||!We||qe.dndKit||qe.defaultPrevented)return;let pt={active:We};if(Me(Ge,je.options,pt)===!0)qe.dndKit={capturedBy:je.sensor},he.current=Ot,ja(Ge,je)},[F,ja]),Ja=Vp(m,rc);Gp(m),nt(()=>{if(se&&M===pr.Initializing)j(pr.Initialized)},[se,M]),me(()=>{let{onDragMove:Me}=pe.current,{active:je,activatorEvent:Ge,collisions:Ot,over:qe}=ut.current;if(!je||!Ge)return;let We={active:je,activatorEvent:Ge,collisions:Ot,delta:{x:Ir.x,y:Ir.y},over:qe};fo(()=>{Me==null||Me(We),P({type:"onDragMove",event:We})})},[Ir.x,Ir.y]),me(()=>{let{active:Me,activatorEvent:je,collisions:Ge,droppableContainers:Ot,scrollAdjustedTranslate:qe}=ut.current;if(!Me||he.current==null||!je||!qe)return;let{onDragOver:We}=pe.current,pt=Ot.get(za),Or=pt&&pt.rect.current?{id:pt.id,rect:pt.rect.current,data:pt.data,disabled:pt.disabled}:null,Ce={active:Me,activatorEvent:je,collisions:Ge,delta:{x:qe.x,y:qe.y},over:Or};fo(()=>{$a(Or),We==null||We(Ce),P({type:"onDragOver",event:Ce})})},[za]),nt(()=>{ut.current={activatorEvent:le,active:ce,activeNode:ye,collisionRect:Ar,collisions:fn,droppableRects:ee,draggableNodes:F,draggingNode:Er,draggingNodeRect:Mr,droppableContainers:X,over:At,scrollableAncestors:Mt,scrollAdjustedTranslate:Ir},fe.current={initial:Mr,translated:Ar}},[ce,ye,fn,Ar,F,Er,Mr,ee,X,At,Mt,Ir]),Ip({...U,delta:Z,draggingRect:Ar,pointerCoordinates:Fa,scrollableAncestors:Mt,scrollableAncestorRects:Vn});let nc=be(()=>({active:ce,activeNode:ye,activeNodeRect:se,activatorEvent:le,collisions:fn,containerNodeRect:mn,dragOverlay:xt,draggableNodes:F,droppableContainers:X,droppableRects:ee,over:At,measureDroppableContainers:xe,scrollableAncestors:Mt,scrollableAncestorRects:Vn,measuringConfiguration:re,measuringScheduled:ze,windowRect:Fo}),[ce,ye,se,le,fn,mn,xt,F,X,ee,At,xe,Mt,Vn,re,ze,Fo]),oc=be(()=>({activatorEvent:le,activators:Ja,active:ce,activeNodeRect:se,ariaDescribedById:{draggable:Ae},dispatch:E,draggableNodes:F,over:At,measureDroppableContainers:xe}),[le,Ja,ce,se,E,Ae,F,At,xe]);return gt.createElement(Oi.Provider,{value:k},gt.createElement(wo.Provider,{value:oc},gt.createElement(Qi.Provider,{value:nc},gt.createElement(el.Provider,{value:tc},p)),gt.createElement(rm,{disabled:(d==null?void 0:d.restoreFocus)===!1})),gt.createElement(lp,{...d,hiddenTextDescribedById:Ae}));function ac(){let Me=(De==null?void 0:De.autoScrollEnabled)===!1,je=typeof u==="object"?u.enabled===!1:u===!1,Ge=D&&!Me&&!je;if(typeof u==="object")return{...u,enabled:Ge};return{enabled:Ge}}}),sm=Ln(null),Ai="button",im="Draggable";function rl(t){let{id:r,data:n,disabled:o=!1,attributes:s}=t,l=Nr(im),{activators:c,activatorEvent:d,active:u,activeNodeRect:p,ariaDescribedById:m,draggableNodes:f,over:h}=cn(wo),{role:R=Ai,roleDescription:x="draggable",tabIndex:S=0}=s!=null?s:{},B=(u==null?void 0:u.id)===r,E=cn(B?el:sm),[P,k]=Sn(),[M,j]=Sn(),D=Wp(c,r),A=on(n);nt(()=>(f.set(r,{id:r,key:l,node:P,activatorNode:M,data:A}),()=>{let Z=f.get(r);if(Z&&Z.key===l)f.delete(r)}),[f,r]);let F=be(()=>({role:R,tabIndex:S,"aria-disabled":o,"aria-pressed":B&&R===Ai?!0:void 0,"aria-roledescription":x,"aria-describedby":m.draggable}),[o,R,S,B,x,m.draggable]);return{active:u,activatorEvent:d,activeNodeRect:p,attributes:F,isDragging:B,listeners:o?void 0:D,node:P,over:h,setNodeRef:k,setActivatorNodeRef:j,transform:E}}function nl(){return cn(Qi)}var lm="Droppable",cm={timeout:25};function ol(t){let{data:r,disabled:n=!1,id:o,resizeObserverConfig:s}=t,l=Nr(lm),{active:c,dispatch:d,over:u,measureDroppableContainers:p}=cn(wo),m=Pe({disabled:n}),f=Pe(!1),h=Pe(null),R=Pe(null),{disabled:x,updateMeasurementsFor:S,timeout:B}={...cm,...s},E=on(S!=null?S:o),P=lt(()=>{if(!f.current){f.current=!0;return}if(R.current!=null)clearTimeout(R.current);R.current=setTimeout(()=>{p(Array.isArray(E.current)?E.current:[E.current]),R.current=null},B)},[B]),k=yo({callback:P,disabled:x||!c}),M=lt((F,Z)=>{if(!k)return;if(Z)k.unobserve(Z),f.current=!1;if(F)k.observe(F)},[k]),[j,D]=Sn(M),A=on(r);return me(()=>{if(!k||!j.current)return;k.disconnect(),f.current=!1,k.observe(j.current)},[j,k]),me(()=>(d({type:ge.RegisterDroppable,element:{id:o,key:l,disabled:n,node:j,rect:h,data:A}}),()=>d({type:ge.UnregisterDroppable,key:l,id:o})),[o]),me(()=>{if(n!==m.current.disabled)d({type:ge.SetDroppableDisabled,id:o,key:l,disabled:n}),m.current.disabled=n},[o,l,n,d]),{active:c,rect:h,isOver:(u==null?void 0:u.id)===o,node:j,over:u,setNodeRef:D}}import al,{useMemo as Co,useRef as Sa,useEffect as So,useState as dm,useContext as um}from"react";function To(t,r,n){let o=t.slice();return o.splice(n<0?o.length+n:n,0,o.splice(r,1)[0]),o}function pm(t,r){return t.reduce((n,o,s)=>{let l=r.get(o);if(l)n[s]=l;return n},Array(t.length))}function No(t){return t!==null&&t>=0}function mm(t,r){if(t===r)return!0;if(t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==r[n])return!1;return!0}function fm(t){if(typeof t==="boolean")return{draggable:t,droppable:t};return t}var sl=(t)=>{let{rects:r,activeIndex:n,overIndex:o,index:s}=t,l=To(r,o,n),c=r[s],d=l[s];if(!d||!c)return null;return{x:d.left-c.left,y:d.top-c.top,scaleX:d.width/c.width,scaleY:d.height/c.height}};var Ro={scaleX:1,scaleY:1},il=(t)=>{var r;let{activeIndex:n,activeNodeRect:o,index:s,rects:l,overIndex:c}=t,d=(r=l[n])!=null?r:o;if(!d)return null;if(s===n){let p=l[c];if(!p)return null;return{x:0,y:n<c?p.top+p.height-(d.top+d.height):p.top-d.top,...Ro}}let u=gm(l,s,n);if(s>n&&s<=c)return{x:0,y:-d.height-u,...Ro};if(s<n&&s>=c)return{x:0,y:d.height+u,...Ro};return{x:0,y:0,...Ro}};function gm(t,r,n){let o=t[r],s=t[r-1],l=t[r+1];if(!o)return 0;if(n<r)return s?o.top-(s.top+s.height):l?l.top-(o.top+o.height):0;return l?l.top-(o.top+o.height):s?o.top-(s.top+s.height):0}var ll="Sortable",cl=al.createContext({activeIndex:-1,containerId:ll,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:sl,disabled:{draggable:!1,droppable:!1}});function dl(t){let{children:r,id:n,items:o,strategy:s=sl,disabled:l=!1}=t,{active:c,dragOverlay:d,droppableRects:u,over:p,measureDroppableContainers:m}=nl(),f=Nr(ll,n),h=Boolean(d.rect!==null),R=Co(()=>o.map((D)=>typeof D==="object"&&("id"in D)?D.id:D),[o]),x=c!=null,S=c?R.indexOf(c.id):-1,B=p?R.indexOf(p.id):-1,E=Sa(R),P=!mm(R,E.current),k=B!==-1&&S===-1||P,M=fm(l);nt(()=>{if(P&&x)m(R)},[P,R,x,m]),So(()=>{E.current=R},[R]);let j=Co(()=>({activeIndex:S,containerId:f,disabled:M,disableTransforms:k,items:R,overIndex:B,useDragOverlay:h,sortedRects:pm(R,u),strategy:s}),[S,f,M.draggable,M.droppable,k,R,B,u,h,s]);return al.createElement(cl.Provider,{value:j},r)}var bm=(t)=>{let{id:r,items:n,activeIndex:o,overIndex:s}=t;return To(n,o,s).indexOf(r)},vm=(t)=>{let{containerId:r,isSorting:n,wasDragging:o,index:s,items:l,newIndex:c,previousItems:d,previousContainerId:u,transition:p}=t;if(!p||!o)return!1;if(d!==l&&s===c)return!1;if(n)return!0;return c!==s&&r===u},hm={duration:200,easing:"ease"},ul="transform",xm=ur.Transition.toString({property:ul,duration:0,easing:"linear"}),ym={roleDescription:"sortable"};function wm(t){let{disabled:r,index:n,node:o,rect:s}=t,[l,c]=dm(null),d=Sa(n);return nt(()=>{if(!r&&n!==d.current&&o.current){let u=s.current;if(u){let p=Sr(o.current,{ignoreTransform:!0}),m={x:u.left-p.left,y:u.top-p.top,scaleX:u.width/p.width,scaleY:u.height/p.height};if(m.x||m.y)c(m)}}if(n!==d.current)d.current=n},[r,n,o,s]),So(()=>{if(l)c(null)},[l]),l}function pl(t){let{animateLayoutChanges:r=vm,attributes:n,disabled:o,data:s,getNewIndex:l=bm,id:c,strategy:d,resizeObserverConfig:u,transition:p=hm}=t,{items:m,containerId:f,activeIndex:h,disabled:R,disableTransforms:x,sortedRects:S,overIndex:B,useDragOverlay:E,strategy:P}=um(cl),k=Nm(o,R),M=m.indexOf(c),j=Co(()=>({sortable:{containerId:f,index:M,items:m},...s}),[f,s,M,m]),D=Co(()=>m.slice(m.indexOf(c)),[m,c]),{rect:A,node:F,isOver:Z,setNodeRef:X}=ol({id:c,data:j,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...u}}),{active:oe,activatorEvent:fe,activeNodeRect:ce,attributes:he,setNodeRef:De,listeners:Ie,isDragging:le,over:_e,setActivatorNodeRef:pe,transform:Ae}=rl({id:c,data:j,attributes:{...ym,...n},disabled:k.draggable}),K=gi(X,De),re=Boolean(oe),ee=re&&!x&&No(h)&&No(B),xe=!E&&le,ze=xe&&ee?Ae:null,ye=d!=null?d:P,Et=ee?ze!=null?ze:ye({rects:S,activeNodeRect:ce,activeIndex:h,overIndex:B,index:M}):null,U=No(h)&&No(B)?l({id:c,items:m,activeIndex:h,overIndex:B}):M,$e=oe==null?void 0:oe.id,se=Sa({activeId:$e,items:m,newIndex:U,containerId:f}),mn=m!==se.current.items,ut=r({active:oe,containerId:f,isDragging:le,isSorting:re,id:c,index:M,items:m,newIndex:se.current.newIndex,previousItems:se.current.items,previousContainerId:se.current.containerId,transition:p,wasDragging:se.current.activeId!=null}),Dr=wm({disabled:!ut,index:M,node:F,rect:A});return So(()=>{if(re&&se.current.newIndex!==U)se.current.newIndex=U;if(f!==se.current.containerId)se.current.containerId=f;if(m!==se.current.items)se.current.items=m},[re,U,f,m]),So(()=>{if($e===se.current.activeId)return;if($e!=null&&se.current.activeId==null){se.current.activeId=$e;return}let Er=setTimeout(()=>{se.current.activeId=$e},50);return()=>clearTimeout(Er)},[$e]),{active:oe,activeIndex:h,attributes:he,data:j,rect:A,index:M,newIndex:U,items:m,isOver:Z,isSorting:re,isDragging:le,listeners:Ie,node:F,overIndex:B,over:_e,setNodeRef:K,setActivatorNodeRef:pe,setDroppableNodeRef:X,setDraggableNodeRef:De,transform:Dr!=null?Dr:Et,transition:xt()};function xt(){if(Dr||mn&&se.current.newIndex===M)return xm;if(xe&&!Pn(fe)||!p)return;if(re||ut)return ur.Transition.toString({...p,property:ul});return}}function Nm(t,r){var n,o;if(typeof t==="boolean")return{draggable:t,droppable:!1};return{draggable:(n=t==null?void 0:t.draggable)!=null?n:r.draggable,droppable:(o=t==null?void 0:t.droppable)!=null?o:r.droppable}}function Po(t){if(!t)return!1;let r=t.data.current;if(r&&"sortable"in r&&typeof r.sortable==="object"&&"containerId"in r.sortable&&"items"in r.sortable&&"index"in r.sortable)return!0;return!1}var Rm=[Y.Down,Y.Right,Y.Up,Y.Left],ml=(t,r)=>{let{context:{active:n,collisionRect:o,droppableRects:s,droppableContainers:l,over:c,scrollableAncestors:d}}=r;if(Rm.includes(t.code)){if(t.preventDefault(),!n||!o)return;let u=[];l.getEnabled().forEach((f)=>{if(!f||f!=null&&f.disabled)return;let h=s.get(f.id);if(!h)return;switch(t.code){case Y.Down:if(o.top<h.top)u.push(f);break;case Y.Up:if(o.top>h.top)u.push(f);break;case Y.Left:if(o.left>h.left)u.push(f);break;case Y.Right:if(o.left<h.left)u.push(f);break}});let p=_i({active:n,collisionRect:o,droppableRects:s,droppableContainers:u,pointerCoordinates:null}),m=Ca(p,"id");if(m===(c==null?void 0:c.id)&&p.length>1)m=p[1].id;if(m!=null){let f=l.get(n.id),h=l.get(m),R=h?s.get(h.id):null,x=h==null?void 0:h.node.current;if(x&&R&&f&&h){let B=Dn(x).some((D,A)=>d[A]!==D),E=fl(f,h),P=Cm(f,h),k=B||!E?{x:0,y:0}:{x:P?o.width-R.width:0,y:P?o.height-R.height:0},M={x:R.left,y:R.top};return k.x&&k.y?M:Cr(M,k)}}}return};function fl(t,r){if(!Po(t)||!Po(r))return!1;return t.data.current.sortable.containerId===r.data.current.sortable.containerId}function Cm(t,r){if(!Po(t)||!Po(r))return!1;if(!fl(t,r))return!1;return t.data.current.sortable.index<r.data.current.sortable.index}import{Fragment as Sm}from"react";import{jsx as mr,Fragment as km}from"react/jsx-runtime";var Pm=({id:t,label:r,children:n})=>{let{attributes:o,listeners:s,setNodeRef:l,transform:c,transition:d,isDragging:u}=pl({id:t}),p={opacity:u?0.5:1,position:"relative",transform:ur.Transform.toString(c),transition:d,zIndex:u?10:"auto"},m=mr("button",{type:"button",className:"touch-none cursor-grab text-muted-foreground/40 hover:text-muted-foreground active:cursor-grabbing",...o,...s,title:r!==void 0&&r!==""?`Drag ${r} to reorder`:"Drag to reorder","aria-label":r!==void 0&&r!==""?`Drag ${r} to reorder`:"Drag handle",children:mr(or,{className:"h-3.5 w-3.5"})});return mr("div",{ref:l,style:p,children:n(m)})},Tm=({items:t,onReorder:r,getItemLabel:n,renderItem:o,disabled:s=!1})=>{let l=Hi(Ra(Mn,{activationConstraint:{distance:4}}),Ra(En,{coordinateGetter:ml})),c=(d)=>{let{active:u,over:p}=d;if(!p||u.id===p.id)return;let m=t.findIndex((h)=>h.id===u.id),f=t.findIndex((h)=>h.id===p.id);if(m===-1||f===-1)return;r(To(t,m,f))};if(s)return t.map((d)=>mr(Sm,{children:o(d,null)},d.id));return mr(tl,{sensors:l,collisionDetection:Fi,onDragEnd:c,children:mr(dl,{items:t.map((d)=>d.id),strategy:il,children:t.map((d)=>mr(Pm,{id:d.id,label:n?.(d),children:(u)=>mr(km,{children:o(d,u)})},d.id))})})},Lm=Tm;import*as gl from"react";import{jsx as In,jsxs as Pa}from"react/jsx-runtime";var bl=({open:t,onOpenChange:r,title:n,description:o,confirmLabel:s,cancelLabel:l="Cancel",confirmVariant:c="default",pendingLabel:d="Processing...",errorContent:u,keepOpenWhilePending:p=!1,onConfirm:m})=>{let[f,h]=gl.useState(!1),R=async()=>{h(!0);try{if(await m()!==!1)r(!1)}catch(x){throw h(!1),x}h(!1)};return In(N,{open:t,onOpenChange:(x)=>{if(!(p&&f))r(x)},children:Pa(O,{children:[Pa(V,{children:[In(_,{children:n}),In(q,{children:o})]}),u,Pa(sr,{children:[In(a,{variant:"outline",onClick:()=>{r(!1)},disabled:f,children:l}),In(a,{variant:c,onClick:()=>{R()},disabled:f,children:f?d:s})]})]})})};bl.displayName="ConfirmDialog";var Dm=bl;import*as hl from"react";import{jsx as ko,jsxs as vl}from"react/jsx-runtime";var xl=hl.forwardRef(function({step:r,total:n,title:o,helper:s,action:l,className:c,...d},u){let p=Boolean(l);return vl("div",{ref:u,className:e("flex flex-wrap items-start justify-between gap-4",c),...d,children:[vl("div",{className:"min-w-0 space-y-1.5",children:[ko(Br,{tone:"accent",className:"tracking-[0.16em]",children:`Step ${r} of ${n}`}),ko("h2",{className:"text-lg font-semibold tracking-tight",children:o}),ko("p",{className:"max-w-xl text-sm leading-relaxed text-muted-foreground",children:s})]}),p?ko("div",{className:"shrink-0",children:l}):null]})});xl.displayName="StageHeader";var Em=xl;import{jsx as fr,jsxs as Ta}from"react/jsx-runtime";var Mm=i("flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border [&_svg]:h-[18px] [&_svg]:w-[18px]",{defaultVariants:{tone:"default"},variants:{tone:{accent:"border-[color-mix(in_oklab,var(--accent)_28%,var(--border))] bg-[color-mix(in_oklab,var(--accent)_10%,var(--card))] text-(--accent)",danger:"border-[color-mix(in_oklab,var(--danger)_30%,var(--border))] bg-[color-mix(in_oklab,var(--danger)_12%,var(--card))] text-(--danger)",default:"border-border bg-muted/40 text-(--text-muted)",success:"border-[color-mix(in_oklab,var(--success)_30%,var(--border))] bg-[color-mix(in_oklab,var(--success)_12%,var(--card))] text-(--success)",warning:"border-[color-mix(in_oklab,var(--warning)_30%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_12%,var(--card))] text-(--warning)"}}}),Im=i("shrink-0 [&_svg]:h-4 [&_svg]:w-4",{defaultVariants:{tone:"default"},variants:{tone:{accent:"text-(--accent)",danger:"text-(--danger)",default:"text-(--text-muted)",success:"text-(--success)",warning:"text-(--warning)"}}}),Lo=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==0&&t!==0n&&t!==""&&!Number.isNaN(t),yl=({variant:t="tile",icon:r,label:n,value:o,detail:s,tone:l,className:c,...d})=>{if(t==="compact")return Ta(Ue,{className:e("gap-1 px-4 py-3.5",c),...d,children:[Ta("span",{className:"flex items-center justify-between gap-2",children:[fr("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-(--text-muted)",children:n}),Lo(r)?fr("span",{className:e(Im({tone:l})),"aria-hidden":!0,children:r}):null]}),fr("span",{className:"text-[22px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:o}),Lo(s)?fr("span",{className:"text-xs text-(--text-muted)",children:s}):null]});return Ta(Ue,{className:e("flex flex-col items-center gap-2.5 px-4 py-5 text-center","transition-colors hover:border-[color-mix(in_oklab,var(--accent)_22%,var(--border))]",c),...d,children:[Lo(r)?fr("span",{className:e(Mm({tone:l})),"aria-hidden":!0,children:r}):null,fr("span",{className:"text-[26px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:o}),fr("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-(--text-muted)",children:n}),Lo(s)?fr("span",{className:"text-xs text-(--text-muted)",children:s}):null]})};yl.displayName="StatTile";var Am=yl;import*as Nl from"react";import{jsx as wl,jsxs as Bm}from"react/jsx-runtime";var Om={danger:"border-[color-mix(in_oklab,var(--danger)_40%,var(--border))] bg-[color-mix(in_oklab,var(--danger)_8%,var(--card))] text-(--danger)",live:"border-[color-mix(in_oklab,var(--primary)_45%,var(--border))] bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))] text-primary",neutral:"border-border bg-card text-muted-foreground",success:"border-[color-mix(in_oklab,var(--success)_38%,var(--border))] bg-[color-mix(in_oklab,var(--success)_8%,var(--card))] text-(--success)",warning:"border-[color-mix(in_oklab,var(--warning)_42%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_9%,var(--card))] text-(--warning)"},Hm={danger:"danger",live:"primary",neutral:"neutral",success:"success",warning:"warning"},Vm=({tone:t,active:r=!1,label:n,className:o,children:s,...l},c)=>{let d="border-border bg-card text-muted-foreground";if(t)d=Om[t];else if(r)d="border-[color-mix(in_oklab,var(--primary)_45%,var(--border))] bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))] text-primary";return Bm("div",{ref:c,className:e("inline-flex items-center gap-2 rounded-full border px-3 py-1 text-[10px] font-semibold uppercase tracking-[0.16em]",d,o),...l,children:[t?wl(Pt,{tone:Hm[t],pulse:t==="live"}):wl("span",{"aria-hidden":!0,className:e("h-1.5 w-1.5 rounded-full",r?"bg-primary shadow-[0_0_0_3px_color-mix(in_oklab,var(--primary)_22%,transparent)]":"bg-muted-foreground")}),s??n]})},Rl=Nl.forwardRef(Vm);Rl.displayName="StatusPill";var Fm=Rl;import*as Eo from"react";import{jsx as Do,jsxs as $m}from"react/jsx-runtime";var _m=i("relative min-w-0",{defaultVariants:{size:"md",variant:"pill"},variants:{size:{md:"",sm:""},variant:{pill:"",plain:""}}}),zm=i("pl-9 [&::-webkit-search-cancel-button]:appearance-none",{defaultVariants:{size:"md",variant:"pill"},variants:{size:{md:"",sm:"h-8 text-[13px]"},variant:{pill:"rounded-full bg-(--bg-surface)",plain:"bg-(--bg-surface)"}}}),Cl=({value:t,defaultValue:r,onValueChange:n,clearLabel:o,variant:s,size:l,className:c,classes:d,...u})=>{let[p,m]=Eo.useState(r??""),f=t!==void 0,h=f?t:p,R=Eo.useRef(null),x=(S)=>{if(!f)m(S);n?.(S)};return $m("div",{className:e(_m({size:l,variant:s}),d?.root,c),children:[Do(et,{"aria-hidden":!0,className:e("pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",d?.icon)}),Do(g,{ref:R,type:"search",value:h,onChange:(S)=>{x(S.target.value)},className:e(zm({size:l,variant:s}),h!==void 0&&h!==""&&o!==void 0?"pr-9":void 0,d?.input),...u}),h!==void 0&&h!==""&&o!==void 0?Do("button",{type:"button","aria-label":o,onClick:()=>{x(""),R.current?.focus()},className:e("absolute right-2.5 top-1/2 flex size-5 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-(--bg-surface-alt) hover:text-(--text-primary) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",d?.clear),children:Do(L,{className:"h-3.5 w-3.5"})}):null]})};Cl.displayName="SearchField";var jm=Cl;import{createContext as Jm,useContext as Sl,useMemo as Gm,useState as Wm}from"react";import{createPortal as Xm}from"react-dom";import{jsx as Mo,jsxs as Zm}from"react/jsx-runtime";var ka=Jm(null),Um=({children:t})=>{let[r,n]=Wm(null),o=Gm(()=>({container:r,setContainer:n}),[r]);return Mo(ka.Provider,{value:o,children:t})},Pl=({className:t})=>{let r=Sl(ka);return Mo("div",{ref:r?.setContainer,className:e("ml-auto flex items-center gap-2 empty:hidden",t)})},Km=({children:t})=>{let r=Sl(ka);if(r===null)return t;return r.container===null?null:Xm(t,r.container)},Ym=({count:t})=>t===void 0?null:Mo("span",{className:"text-xs text-muted-foreground tabular-nums",children:t}),qm=({children:t,className:r})=>Zm("div",{className:e("flex flex-wrap items-center gap-3",r),children:[t,Mo(Pl,{})]});import{jsx as Io,jsxs as Tl}from"react/jsx-runtime";var kl=({title:t,description:r,value:n,options:o,onValueChange:s,align:l="center",className:c,...d})=>Tl("section",{className:e("flex min-w-0 flex-col gap-3 sm:flex-row sm:justify-between",l==="center"?"sm:items-center":"sm:items-start",c),...d,children:[Tl("div",{className:"min-w-0",children:[Io("h3",{className:"truncate text-sm font-semibold",children:t}),r!==void 0&&r!==null&&r!==!1&&r!==""&&r!==0?Io("p",{className:"mt-1 text-sm text-muted-foreground",children:r}):null]}),Io("div",{className:"inline-flex shrink-0 rounded-md border border-border bg-background p-1 shadow-xs",children:o.map((u)=>Io(a,{type:"button",size:"sm",variant:u.value===n?"secondary":"ghost",disabled:u.disabled,className:e("h-8 rounded-sm px-3",u.value===n&&"bg-primary/10 text-primary hover:bg-primary/15"),"aria-label":u.ariaLabel,"aria-pressed":u.value===n,onClick:()=>{s(u.value)},children:u.label},u.value))})]});kl.displayName="SectionSwitcher";import*as bt from"react";import{jsx as dt}from"react/jsx-runtime";var Ll=bt.createContext({value:1}),La=()=>bt.useContext(Ll),Qm=({value:t,defaultValue:r=1,indicators:n,className:o,...s})=>{let l=t??r,c=bt.useMemo(()=>({indicators:n,value:l}),[l,n]);return dt(Ll.Provider,{value:c,children:dt("div",{"data-slot":"stepper",className:e("space-y-8",o),...s})})},ef=({className:t,...r})=>dt("nav",{"data-slot":"stepper-nav","data-orientation":"horizontal",className:e("group/stepper-nav flex items-start justify-between gap-2",t),...r}),Da=bt.createContext({state:"inactive",step:1}),tf=({step:t,loading:r,className:n,...o})=>{let{value:s}=La(),l="inactive";if(r===!0)l="loading";else if(t<s)l="completed";else if(t===s)l="active";let c=bt.useMemo(()=>({state:l,step:t}),[l,t]);return dt(Da.Provider,{value:c,children:dt("div",{"data-slot":"stepper-item","data-state":l,"data-step":t,className:e("group/step relative flex-1 items-start",n),...o})})},rf=({className:t,...r})=>dt("div",{"data-slot":"stepper-trigger",className:e("flex flex-col items-center gap-2.5",t),...r}),nf=({className:t,children:r,...n})=>{let{indicators:o}=La(),{state:s}=bt.useContext(Da),l=o?.completed,c=o?.loading,d=r;if(s==="completed"&&Boolean(l))d=l;else if(s==="loading"&&Boolean(c))d=c;return dt("div",{"data-slot":"stepper-indicator","data-state":s,className:e("flex size-7 shrink-0 items-center justify-center rounded-full border-2 text-xs font-semibold transition-colors",s==="completed"&&"border-primary bg-primary text-primary-foreground",s==="active"&&"border-primary bg-primary text-primary-foreground",s==="loading"&&"border-primary bg-primary text-primary-foreground",s==="inactive"&&"border-muted-foreground/30 bg-background text-muted-foreground",t),...n,children:d})},of=({className:t,...r})=>{let{state:n}=bt.useContext(Da);return dt("span",{"data-slot":"stepper-title","data-state":n,className:e("text-sm font-medium",(n==="completed"||n==="active")&&"text-foreground",n==="inactive"&&"text-muted-foreground",t),...r})},af=({className:t,...r})=>dt("div",{"data-slot":"stepper-separator",className:e("h-0.5 rounded-full bg-muted-foreground/30 transition-colors","group-data-[state=completed]/step:bg-primary",t),...r}),sf=({className:t,...r})=>dt("div",{"data-slot":"stepper-panel",className:e(t),...r}),lf=({value:t,className:r,...n})=>{let{value:o}=La();if(t!==o)return null;return dt("div",{"data-slot":"stepper-content",className:e(r),...n})};import*as Tr from"react";import{jsx as Pr,jsxs as pf}from"react/jsx-runtime";var Ea=Tr.createContext({}),cf=({className:t,size:r,variant:n,...o})=>{let s=Tr.useMemo(()=>({size:r,variant:n}),[r,n]);return Pr(Ea.Provider,{value:s,children:Pr("fieldset",{"data-slot":"split-button",className:e("inline-flex min-w-0 items-stretch",t),...o})})},df=({className:t,...r})=>{let{size:n,variant:o}=Tr.useContext(Ea);return Pr(a,{"data-slot":"split-button-action",className:e("rounded-r-none",t),size:n,variant:o,...r})},uf=({align:t="end",children:r,contentClassName:n,disabled:o,label:s,...l})=>{let{size:c,variant:d}=Tr.useContext(Ea);return pf(ir,{...l,children:[Pr(lr,{asChild:!0,children:Pr(a,{"aria-label":s,"data-slot":"split-button-menu",className:"-ml-px rounded-l-none border-l border-l-current/20 px-2",disabled:o,size:c,variant:d,children:Pr(v,{})})}),Pr(cr,{align:t,className:n,children:r})]})};import*as dn from"react";import{jsx as vt,jsxs as Ao}from"react/jsx-runtime";var mf=({items:t,title:r,triggerAriaLabel:n="Technical details",copyLabel:o="Copy",trigger:s,align:l="end",side:c="bottom",onCopy:d,className:u,classes:p})=>{let[m,f]=dn.useState(null),h=dn.useRef(null);dn.useEffect(()=>()=>{if(h.current!==null)window.clearTimeout(h.current)},[]);let R=(x)=>{if(navigator.clipboard.writeText(x.value),f(x.label),h.current!==null)window.clearTimeout(h.current);h.current=window.setTimeout(()=>{f(null)},1500),d?.(x)};return Ao(z,{children:[vt(G,{asChild:!0,children:s??vt(a,{type:"button",variant:"ghost",size:"icon","aria-label":n,className:e("h-8 w-8 text-muted-foreground hover:text-foreground",p?.root,p?.trigger,u),children:vt($o,{className:"h-4 w-4"})})}),Ao(W,{align:l,side:c,className:e("w-80 p-3",p?.content),children:[r!==void 0&&r!==null?vt("div",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:r}):null,vt("dl",{className:"space-y-2.5",children:t.map((x)=>Ao("div",{className:e("min-w-0",p?.row),children:[vt("dt",{className:e("text-[11px] font-medium text-muted-foreground",p?.label),children:x.label}),Ao("dd",{className:"mt-0.5 flex min-w-0 items-start gap-1",children:[vt("code",{className:e("min-w-0 flex-1 select-all break-all rounded bg-muted/60 px-1.5 py-1 font-mono text-xs leading-relaxed text-foreground",p?.value),children:x.value}),x.copyable===!1?null:vt(a,{type:"button",variant:"ghost",size:"icon","aria-label":`${o} ${x.label}`,className:"h-6 w-6 shrink-0 text-muted-foreground hover:text-foreground",onClick:()=>{R(x)},children:m===x.label?vt(y,{className:"h-3.5 w-3.5"}):vt(ne,{className:"h-3.5 w-3.5"})})]})]},x.label))})]})]})};var ff=mf;import*as un from"react";import{jsx as Re,jsxs as kt,Fragment as El}from"react/jsx-runtime";var gf={disabled:!1,emptyMessage:"No option found.",loading:!1,loadingMessage:"Loading options...",modal:!1,placeholder:"Select option...",searchPlaceholder:"Search...",width:"200px"},bf=1,vf=0.5,hf=(t)=>t.children!==void 0,Ml=(t)=>t.flatMap((r)=>{if(!r.children)return[r];let n=Ml(r.children);return n.length>0?[{...r,children:n}]:[]}),Il=(t,r=[])=>t.flatMap((n)=>n.children?Il(n.children,[...r,n]):[{ancestorIds:r.map((o)=>o.id),node:n,path:r.map((o)=>o.label).join(" / ")}]),Dl=(t)=>({paddingLeft:`${vf+t*bf}rem`}),Al=un.forwardRef(function(r,n){let o={...gf,...r},{nodes:s,value:l,onChange:c,selectedLabel:d,placeholder:u,searchPlaceholder:p,emptyMessage:m,id:f,className:h,width:R,disabled:x,loading:S,loadingMessage:B,onSearchChange:E,modal:P}=o,[k,M]=un.useState(!1),[j,D]=un.useState(""),[A,F]=un.useState(()=>new Set),Z=Ml(s),X=Il(Z),oe=X.find((K)=>K.node.id===l),fe=j.trim().toLowerCase(),ce=(K)=>{if(K)F(new Set(oe?.ancestorIds));else if(j!=="")D(""),E?.("");M(K)},he=(K)=>{D(K),E?.(K)},De=(K)=>{F((re)=>{let ee=new Set(re);if(!ee.delete(K))ee.add(K);return ee})},Ie=(K)=>{c(K),ce(!1)},le=(K)=>kt(El,{children:[Re(y,{"aria-hidden":!0,className:e(l===K.id?"opacity-100":"opacity-0")}),K.icon]}),_e=(K,re)=>K.flatMap((ee)=>{if(!hf(ee))return[kt(de,{value:ee.id,style:Dl(re),onSelect:()=>{Ie(ee.id)},children:[le(ee),Re("span",{className:"min-w-0 truncate",title:ee.label,children:ee.label})]},ee.id)];let xe=A.has(ee.id),ze=xe?Ho:zo;return[kt(de,{value:ee.id,"aria-expanded":xe,style:Dl(re),onSelect:()=>{De(ee.id)},children:[Re(C,{"aria-hidden":!0,className:e(xe&&"rotate-90")}),ee.icon??Re(ze,{"aria-hidden":!0}),Re("span",{className:"min-w-0 truncate",title:ee.label,children:ee.label})]},ee.id),...xe&&ee.children?_e(ee.children,re+1):[]]}),pe=fe===""?[]:X.filter((K)=>E!==void 0||`${K.path} / ${K.node.label}`.toLowerCase().includes(fe)),Ae=oe?.node.label??d;return kt(z,{modal:P,open:k,onOpenChange:ce,children:[Re(G,{asChild:!0,children:kt(a,{ref:n,id:f,variant:"outline","aria-expanded":k,"aria-busy":S,className:e("justify-between",h),style:{width:R},disabled:x,children:[Ae===void 0?Re("span",{className:"min-w-0 truncate text-muted-foreground",children:u}):Re("span",{className:"min-w-0 truncate",children:Ae}),S?Re(b,{"aria-hidden":!0,className:"ml-2 size-4 shrink-0 animate-spin text-muted-foreground"}):Re(Je,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),Re(W,{className:"p-0",style:{width:"var(--radix-popover-trigger-width)"},children:kt(He,{shouldFilter:!1,children:[Re(Xt,{"aria-label":p,placeholder:p,value:j,onValueChange:he}),Re(Qe,{className:"max-h-[min(300px,calc(var(--radix-popover-content-available-height)-2.5rem))]",children:S?kt("div",{"aria-live":"polite",className:"flex items-center justify-center gap-2 px-3 py-6 text-sm text-muted-foreground",children:[Re(b,{"aria-hidden":!0,className:"size-4 animate-spin"}),B]}):kt(El,{children:[Re(Qt,{children:m}),Re(Le,{children:fe===""?_e(Z,0):pe.map((K)=>kt(de,{value:K.node.id,onSelect:()=>{Ie(K.node.id)},children:[le(K.node),Re("span",{className:"min-w-0 truncate",title:K.node.label,children:K.node.label}),K.path===""?null:Re("span",{className:"ml-auto min-w-0 shrink truncate pl-2 text-xs text-muted-foreground",title:K.path,children:K.path})]},K.node.id))})]})})]})})]})});Al.displayName="TreeSelect";import*as Hl from"react";import{jsx as Ol,jsxs as yf}from"react/jsx-runtime";var xf=({value:t,state:r="value",trailing:n,monospace:o=!0,className:s,...l},c)=>{let d=r==="secret";return yf("div",{ref:c,className:e("flex min-w-0 items-center gap-2",s),...l,children:[Ol("div",{className:e("flex min-w-0 flex-1 items-center border-b py-2",d?"border-[color-mix(in_oklab,var(--primary)_45%,var(--border))]":"border-border"),children:Ol("code",{className:e("block min-w-0 flex-1 overflow-x-auto whitespace-nowrap text-[13px] text-foreground",o?"font-mono":"font-sans"),children:t})}),n]})},Vl=Hl.forwardRef(xf);Vl.displayName="ValueRow";var wf=Vl;import{forwardRef as Bl,useCallback as kr,useLayoutEffect as Fl,useId as Nf,useRef as _l,useState as Be}from"react";import{jsx as w,jsxs as J,Fragment as An}from"react/jsx-runtime";var Rf=({mode:t,onModeChange:r,disabled:n})=>J("div",{role:"tablist","aria-label":"Value source",className:"relative inline-flex h-7 items-center rounded-full border border-border/70 bg-muted/40 p-0.5 text-[10px] font-medium tracking-[0.08em] uppercase shadow-inner",children:[w("span",{"aria-hidden":!0,className:e("absolute top-0.5 bottom-0.5 w-[calc(50%-2px)] rounded-full bg-background shadow-xs ring-1 ring-border/60 transition-transform duration-200 ease-out",t==="inline"&&"translate-x-[calc(100%+0px)]")}),J("button",{type:"button",role:"tab","aria-selected":t==="linked",disabled:n,onClick:()=>{r("linked")},className:e("relative z-10 flex items-center gap-1 rounded-full px-2.5 py-1 transition-colors",t==="linked"?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[w(Xe,{className:"h-3 w-3"}),"Linked"]}),J("button",{type:"button",role:"tab","aria-selected":t==="inline",disabled:n,onClick:()=>{r("inline")},className:e("relative z-10 flex items-center gap-1 rounded-full px-2.5 py-1 transition-colors",t==="inline"?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[w($t,{className:"h-3 w-3"}),"Inline"]})]}),Cf=({variableKey:t,initialValue:r,isSecret:n,loading:o,saving:s,onSubmit:l,onCancel:c})=>{let[d,u]=Be(r),[p,m]=Be(!1),f=_l(null);return Fl(()=>{if(!o)f.current?.focus()},[o]),J("form",{role:"presentation",onSubmit:(h)=>{h.preventDefault(),l(d)},onKeyDown:(h)=>{if(h.key==="Escape")h.preventDefault(),c()},className:"space-y-3 p-3",children:[J("div",{className:"flex items-start justify-between gap-2",children:[J("div",{className:"min-w-0",children:[w("p",{className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground",children:"Editing linked variable"}),w("p",{className:"mt-0.5 truncate font-mono text-xs text-foreground",children:t})]}),w("button",{type:"button",onClick:c,"aria-label":"Close editor",className:"rounded p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:w(L,{className:"h-3.5 w-3.5"})})]}),J("div",{className:"space-y-1",children:[w(I,{htmlFor:"linked-value",className:"text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground",children:n?"Secret value":"Value"}),J("div",{className:"relative",children:[w(g,{ref:f,id:"linked-value",type:p?"text":"password",value:d,onChange:(h)=>{u(h.target.value)},placeholder:o?"Loading current value…":"Enter value",disabled:o||s,className:"h-8 pr-8 font-mono text-xs",autoComplete:"off",spellCheck:!1}),w("button",{type:"button",onClick:()=>{m((h)=>!h)},"aria-label":p?"Hide value":"Reveal value",className:"absolute inset-y-0 right-1 my-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:p?w(St,{className:"h-3.5 w-3.5"}):w(Ve,{className:"h-3.5 w-3.5"})})]})]}),J("div",{className:"flex items-center justify-between gap-2 pt-1",children:[J("p",{className:"text-[10px] leading-relaxed text-muted-foreground",children:["Updates the linked secret. Other connectors using"," ",w("span",{className:"font-mono",children:t})," will pick it up on their next run."]}),w(a,{type:"submit",size:"sm",disabled:o||s,className:"h-7 px-3 text-xs",children:s?J(An,{children:[w(b,{className:"h-3 w-3 animate-spin"}),"Saving"]}):"Save"})]})]})},Sf=({suggestedName:t,onSubmit:r,onCancel:n})=>{let[o,s]=Be(t),[l,c]=Be(""),[d,u]=Be(!0),[p,m]=Be(!1),f=_l(null);Fl(()=>{f.current?.focus(),f.current?.select()},[]);let h=o.trim(),R=h.length>0;return J("form",{role:"presentation",onSubmit:(x)=>{if(x.preventDefault(),R)r({key:h,secret:d,value:l})},onClick:(x)=>{x.stopPropagation()},onKeyDown:(x)=>{if(x.key==="Escape")x.preventDefault(),x.stopPropagation(),n()},className:"flex flex-col",children:[J("div",{className:"flex items-center gap-2 border-b border-border/60 bg-muted/15 px-3 py-2",children:[w("button",{type:"button",onClick:n,"aria-label":"Back to picker",className:"-ml-1 flex h-5 w-5 shrink-0 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground",children:w(rr,{className:"h-3.5 w-3.5"})}),w("span",{className:"flex-1 text-[10.5px] font-medium uppercase tracking-[0.12em] text-muted-foreground/80",children:"New variable"}),w(Rt,{className:"h-3 w-3 text-muted-foreground/60"})]}),J("div",{className:"space-y-2.5 px-3 py-2.5",children:[J("div",{className:"space-y-1",children:[w(I,{htmlFor:"var-key",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Name"}),J("div",{className:"relative",children:[w("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-0 left-2.5 flex items-center text-muted-foreground/60",children:w(Gt,{className:"h-3 w-3"})}),w(g,{ref:f,id:"var-key",value:o,onChange:(x)=>{s(x.target.value.toUpperCase())},placeholder:"VARIABLE_NAME",className:"h-8 pl-7 font-mono text-[12.5px] tracking-tight",autoComplete:"off",spellCheck:!1})]})]}),J("div",{className:"space-y-1",children:[w(I,{htmlFor:"var-value",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Value"}),J("div",{className:"relative",children:[w(g,{id:"var-value",type:p?"text":"password",value:l,onChange:(x)=>{c(x.target.value)},placeholder:"Encrypted at rest",className:"h-8 pr-8 font-mono text-[12.5px]",autoComplete:"off",spellCheck:!1}),w("button",{type:"button",onClick:()=>{m((x)=>!x)},"aria-label":p?"Hide value":"Reveal value",className:"absolute inset-y-0 right-1 my-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground",children:p?w(St,{className:"h-3.5 w-3.5"}):w(Ve,{className:"h-3.5 w-3.5"})})]})]}),J("label",{className:"flex cursor-pointer items-center gap-2 select-none text-[11px] text-muted-foreground",children:[w("input",{type:"checkbox",checked:d,onChange:(x)=>{u(x.target.checked)},className:"h-3 w-3 accent-primary"}),J("span",{className:"flex items-center gap-1",children:[w(Gt,{className:"h-3 w-3"}),"Mark as secret"]})]})]}),J("button",{type:"submit",disabled:!R,className:"group/save flex w-full items-center gap-2.5 border-t border-border/60 bg-gradient-to-r from-muted/30 to-muted/10 px-3 py-2.5 text-left text-xs transition-colors hover:from-muted/50 hover:to-muted/30 disabled:cursor-not-allowed disabled:opacity-50",children:[w("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/15",children:w(y,{className:"h-3 w-3"})}),J("span",{className:"flex min-w-0 flex-1 flex-col",children:[w("span",{className:"text-[12px] font-medium leading-tight",children:"Create variable"}),w("span",{className:"truncate text-[10px] leading-tight text-muted-foreground",children:R?J(An,{children:["Link this field to"," ",w("span",{className:"font-mono text-foreground/80",children:h})]}):"Enter a name to continue"})]}),w(Ze,{className:"h-3.5 w-3.5 text-muted-foreground/60 transition-transform group-hover/save:translate-x-0.5 group-disabled/save:translate-x-0"})]})]})},zl=Bl(function({selected:r,value:n,placeholder:o,disabled:s,open:l,onOpen:c},d){let u=Boolean(n),p=Boolean(r);return J("button",{ref:d,type:"button","aria-expanded":l,disabled:s,onClick:c,className:e("group/trigger relative flex h-9 w-full items-center gap-2 rounded-md border bg-background px-2.5 text-left text-sm shadow-xs transition-all outline-none","hover:border-ring/50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:cursor-not-allowed disabled:opacity-50",u?"border-primary/20 bg-primary/[0.03]":"border-input"),children:[w("span",{"aria-hidden":!0,className:e("flex h-5 w-5 shrink-0 items-center justify-center rounded-sm transition-colors",u?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:w(Xe,{className:"h-3 w-3"})}),u?J("span",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[w("span",{className:"truncate font-mono text-[12.5px] tracking-tight",children:n}),!p&&w("span",{title:"Not in your variables list",className:"rounded-sm border border-dashed border-muted-foreground/40 px-1 py-px text-[9px] uppercase tracking-wider text-muted-foreground",children:"Unresolved"})]}):w("span",{className:"flex-1 truncate text-muted-foreground",children:o}),w(Je,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/60 transition-colors group-hover/trigger:text-muted-foreground"})]})});zl.displayName="LinkedTrigger";var Pf=({value:t,onChange:r,onBlur:n,placeholder:o,disabled:s,masked:l,inputId:c})=>{let[d,u]=Be(!1),p=l&&!d?"password":"text";return J("div",{className:e("group/inline relative flex h-9 w-full items-center rounded-md border border-input bg-background pl-2.5 pr-1 shadow-xs transition-all","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]"),children:[w("span",{"aria-hidden":!0,className:"mr-2 flex h-5 w-5 shrink-0 items-center justify-center rounded-sm bg-muted text-muted-foreground",children:w($t,{className:"h-3 w-3"})}),w("input",{id:c,type:p,value:t,onChange:(m)=>{r(m.target.value)},onBlur:n,placeholder:o,disabled:s,autoComplete:"off",spellCheck:!1,className:"flex-1 bg-transparent font-mono text-[12.5px] tracking-tight outline-none placeholder:font-sans placeholder:tracking-normal placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),l&&w("button",{type:"button",onClick:()=>{u((m)=>!m)},"aria-label":d?"Hide value":"Reveal value",className:"flex h-7 w-7 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:d?w(St,{className:"h-3.5 w-3.5"}):w(Ve,{className:"h-3.5 w-3.5"})})]})},Tf=({options:t,value:r,onSelect:n})=>J("div",{className:"px-1",children:[J("div",{className:"flex items-center justify-between px-2 pt-2 pb-1",children:[w("span",{className:"text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/80",children:"Linked variables"}),w("span",{className:"text-[10px] tabular-nums text-muted-foreground/60",children:t.length})]}),w(Le,{className:"!p-0 [&_[cmdk-group-heading]]:hidden",children:t.map((o)=>{let s=r===o.key;return J(de,{value:o.key,keywords:[o.key,o.description??""],onSelect:()=>{n(o.key)},className:e("group/row relative my-px cursor-pointer rounded-md px-2 py-1.5 transition-colors","data-[selected=true]:bg-muted/60 data-[selected=true]:text-foreground",s&&"bg-primary/[0.05]"),children:[s&&w("span",{"aria-hidden":!0,className:"absolute inset-y-1.5 left-0 w-[2px] rounded-r bg-primary"}),w("span",{"aria-hidden":!0,className:e("flex h-5 w-5 shrink-0 items-center justify-center rounded-sm transition-colors",s?"bg-primary/15 text-primary":"bg-muted/60 text-muted-foreground/70 group-hover/row:bg-muted"),children:w(Gt,{className:"h-3 w-3"})}),J("div",{className:"flex min-w-0 flex-1 flex-col",children:[w("span",{className:e("truncate font-mono text-[12.5px] tracking-tight",s&&"text-primary"),children:o.key}),o.description!==void 0&&o.description!==""&&w("span",{className:"truncate text-[10.5px] leading-tight text-muted-foreground",children:o.description})]}),s?w(y,{className:"h-3.5 w-3.5 shrink-0 text-primary"}):w("span",{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 text-transparent transition-colors group-data-[selected=true]/row:text-muted-foreground/40",children:w(Ze,{className:"h-3.5 w-3.5"})})]},o.key)})})]}),kf=()=>J("div",{className:"space-y-1.5 px-2 py-3",children:[J("div",{className:"flex items-center justify-between px-1 pb-1",children:[w("span",{className:"text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/60",children:"Loading"}),w(b,{className:"h-3 w-3 animate-spin text-muted-foreground/60"})]}),[0.95,0.7,0.85].map((t,r)=>J("div",{className:"flex items-center gap-2 rounded-md px-2 py-1.5",style:{opacity:1-r*0.18},children:[w("div",{className:"h-5 w-5 shrink-0 animate-pulse rounded-sm bg-muted/70"}),w("div",{className:"h-3 animate-pulse rounded bg-muted/70",style:{width:`${t*100}%`}})]},r))]}),Lf=({query:t,canCreate:r,onCreate:n})=>{let o=t.trim();return J("div",{className:"flex flex-col items-center gap-2 px-4 py-7 text-center",children:[w("span",{"aria-hidden":!0,className:"flex h-9 w-9 items-center justify-center rounded-full bg-muted/60 text-muted-foreground/70",children:w(Gt,{className:"h-4 w-4"})}),J("div",{className:"space-y-0.5",children:[w("p",{className:"text-[12px] font-medium text-foreground",children:o?J(An,{children:["No variables match"," ",J("span",{className:"font-mono text-foreground",children:['"',o,'"']})]}):"No variables yet"}),w("p",{className:"text-[10.5px] leading-snug text-muted-foreground",children:"Variables let you reuse secrets across connectors and rotate them in one place."})]}),r&&J(a,{type:"button",size:"sm",variant:"outline",onClick:n,className:"mt-1 h-7 text-[11px]",children:[w(Rt,{className:"h-3 w-3"}),o?`Create "${o.toUpperCase().replaceAll(/[^A-Z0-9_]/gu,"_")}"`:"Create variable"]})]})},Df=({options:t,optionsLoading:r,optionsFetching:n,value:o,query:s,onQueryChange:l,onSelect:c,onCreate:d,suggestedName:u,showCreate:p,onShowCreate:m})=>{if(p&&d)return w(Sf,{suggestedName:u??s.trim(),onSubmit:(h)=>{d(h)},onCancel:()=>{m(!1)}});let f=w(Tf,{options:t,value:o,onSelect:c});if(r)f=w(kf,{});else if(t.length===0)f=w(Lf,{query:s,canCreate:Boolean(d),onCreate:()=>{m(!0)}});return J("div",{className:"flex flex-col",children:[J("div",{className:"relative flex items-center gap-2 border-b border-border/60 bg-muted/15 px-3 py-2",children:[w(et,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/70"}),w("input",{autoFocus:!0,type:"text",value:s,onChange:(h)=>{l(h.target.value)},placeholder:"Search variables…",autoComplete:"off",spellCheck:!1,className:"flex-1 bg-transparent text-xs tracking-tight outline-none placeholder:text-muted-foreground/60"}),J("div",{className:"flex h-4 w-4 items-center justify-center",children:[n&&!r&&w(b,{className:"h-3 w-3 animate-spin text-muted-foreground/70"}),!n&&s&&w("button",{type:"button",onClick:()=>{l("")},"aria-label":"Clear search",className:"rounded p-0.5 text-muted-foreground/60 transition-colors hover:bg-muted hover:text-foreground",children:w(L,{className:"h-3 w-3"})})]})]}),w(He,{shouldFilter:!1,className:"rounded-none bg-transparent",loop:!0,children:w(Qe,{className:"max-h-[280px] py-1",children:f})}),d&&J("button",{type:"button",onClick:()=>{m(!0)},className:"group/cta flex w-full items-center gap-2.5 border-t border-border/60 bg-gradient-to-r from-muted/30 to-muted/10 px-3 py-2.5 text-left text-xs transition-colors hover:from-muted/50 hover:to-muted/30",children:[w("span",{className:"flex h-6 w-6 items-center justify-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/15",children:w(Rt,{className:"h-3 w-3"})}),J("span",{className:"flex min-w-0 flex-1 flex-col",children:[w("span",{className:"text-[12px] font-medium leading-tight",children:"Create new variable"}),w("span",{className:"text-[10px] leading-tight text-muted-foreground",children:"Encrypted at rest · reusable across connectors"})]}),w(Ze,{className:"h-3.5 w-3.5 text-muted-foreground/60 transition-transform group-hover/cta:translate-x-0.5"})]})]})},Ef=Bl(function({value:r,mode:n,onChange:o,onBlur:s,options:l,optionsLoading:c,optionsFetching:d,onSearch:u,onCreate:p,onResolve:m,onUpdate:f,suggestedName:h,placeholder:R="Select variable…",disabled:x=!1,masked:S=!0,className:B},E){let[P,k]=Be(!1),[M,j]=Be(""),[D,A]=Be(!1),[F,Z]=Be(!1),[X,oe]=Be(null),[fe,ce]=Be(!1),[he,De]=Be(!1),[Ie,le]=Be(null),_e=Nf(),pe=kr((U)=>{if(U===n)return;o("",U),A(!1),j("")},[n,o]),Ae=kr((U)=>{o(U===r?"":U,"linked"),k(!1),A(!1)},[r,o]),K=kr((U)=>{o(U,"inline")},[o]),re=kr(async(U)=>{if(!p)return;let $e=await p(U);A(!1),k(!1),o($e.key,"linked")},[p,o]),ee=kr(async()=>{if(!r||!m)return;Z(!0),ce(!0),le(null);try{let U=await m(r);oe(U??{key:r,secret:!0,value:null})}catch(U){le(U instanceof Error?U.message:"Failed to load variable"),oe({key:r,secret:!0,value:null})}ce(!1)},[r,m]),xe=kr(async(U)=>{if(!f||!r)return;De(!0);try{await f({key:r,value:U}),Z(!1)}catch($e){throw De(!1),$e}De(!1)},[f,r]),ze=kr((U)=>{j(U),u?.(U)},[u]),ye=l.find((U)=>U.key===r),Et=n==="linked"&&Boolean(r)&&Boolean(f);return J("div",{className:e("space-y-1.5",B),children:[J("div",{className:"flex items-center gap-1.5",children:[w("div",{className:"min-w-0 flex-1",children:n==="linked"?J(z,{open:P,onOpenChange:(U)=>{if(k(U),!U)A(!1),s?.()},modal:!0,children:[w(G,{asChild:!0,children:w(zl,{ref:E,selected:ye,value:r,placeholder:R,disabled:x,open:P,onOpen:()=>{k(!0)}})}),w(W,{className:"w-[--radix-popover-trigger-width] min-w-[300px] overflow-hidden border-border/80 p-0 shadow-xl",side:"bottom",align:"start",sideOffset:6,children:w(Df,{options:l,optionsLoading:Boolean(c),optionsFetching:Boolean(d),value:r,query:M,onQueryChange:ze,onSelect:Ae,onCreate:p?re:void 0,suggestedName:h,showCreate:D,onShowCreate:A})})]}):w(Pf,{inputId:_e,value:r,onChange:K,onBlur:()=>s?.(),placeholder:R||"Enter value",disabled:x,masked:S})}),Et&&J(z,{open:F,onOpenChange:(U)=>{if(Z(U),!U)oe(null),le(null);else if(!X)ee()},modal:!0,children:[w(G,{asChild:!0,children:w(a,{type:"button",variant:"outline",size:"icon",disabled:x,"aria-label":"Edit linked variable value",title:"Edit linked variable value",className:"h-9 w-9 shrink-0 border-input text-muted-foreground hover:text-foreground",children:w($t,{className:"h-3.5 w-3.5"})})}),J(W,{align:"end",side:"bottom",sideOffset:6,className:"w-80 p-0 shadow-lg",children:[Ie!==null&&Ie!==""&&w("div",{className:"border-b border-destructive/30 bg-destructive/5 px-3 py-2 text-[11px] text-destructive",children:Ie}),w(Cf,{variableKey:r,initialValue:X?.value??"",isSecret:X?.secret??!0,loading:fe,saving:he,onSubmit:(U)=>{xe(U)},onCancel:()=>{Z(!1)}},`${r}:${X?.value??""}`)]})]}),w(Rf,{mode:n,onModeChange:pe,disabled:x})]}),w("p",{className:"flex items-center gap-1.5 text-[10.5px] leading-tight text-muted-foreground/80",children:n==="linked"?J(An,{children:[w(Xe,{className:"h-3 w-3"}),w("span",{children:"Reads from an org variable. Rotate values in one place; every connector picks it up."})]}):J(An,{children:[w($t,{className:"h-3 w-3"}),J("span",{children:["Stored inline on this connector. Use"," ",w("span",{className:"font-medium text-foreground/80",children:"Linked"})," ","to share across connectors."]})]})})]})});import{useMemo as Mf}from"react";import{jsx as Oo,jsxs as Ma}from"react/jsx-runtime";var If=(t)=>{let r="",n=0,o=" ",s=t.replaceAll(/>\s*</gu,`>
|
|
6
|
+
`},gp={onDragStart(t){let{active:r}=t;return"Picked up draggable item "+r.id+"."},onDragOver(t){let{active:r,over:n}=t;if(n)return"Draggable item "+r.id+" was moved over droppable area "+n.id+".";return"Draggable item "+r.id+" is no longer over a droppable area."},onDragEnd(t){let{active:r,over:n}=t;if(n)return"Draggable item "+r.id+" was dropped over droppable area "+n.id;return"Draggable item "+r.id+" was dropped."},onDragCancel(t){let{active:r}=t;return"Dragging was cancelled. Draggable item "+r.id+" was dropped."}};function bp(t){let{announcements:r=gp,container:n,hiddenTextDescribedById:o,screenReaderInstructions:a=fp}=t,{announce:s,announcement:i}=Si(),c=$t("DndLiveRegion"),[d,u]=$e(!1);if(ee(()=>{u(!0)},[]),pp(ne(()=>({onDragStart(m){let{active:f}=m;s(r.onDragStart({active:f}))},onDragMove(m){let{active:f,over:b}=m;if(r.onDragMove)s(r.onDragMove({active:f,over:b}))},onDragOver(m){let{active:f,over:b}=m;s(r.onDragOver({active:f,over:b}))},onDragEnd(m){let{active:f,over:b}=m;s(r.onDragEnd({active:f,over:b}))},onDragCancel(m){let{active:f,over:b}=m;s(r.onDragCancel({active:f,over:b}))}}),[s,r])),!d)return null;let p=qe.createElement(qe.Fragment,null,qe.createElement(Ri,{id:o,value:a.draggable}),qe.createElement(Ci,{id:c,announcement:i}));return n?up(p,n):p}var re;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(re||(re={}));function On(){}function na(t,r){return ne(()=>({sensor:t,options:r!=null?r:{}}),[t,r])}function Fi(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return ne(()=>[...r].filter((o)=>o!=null),[...r])}var je=Object.freeze({x:0,y:0});function _i(t,r){return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}function zi(t,r){let{data:{value:n}}=t,{data:{value:o}}=r;return n-o}function vp(t,r){let{data:{value:n}}=t,{data:{value:o}}=r;return o-n}function Pi(t){let{left:r,top:n,height:o,width:a}=t;return[{x:r,y:n},{x:r+a,y:n},{x:r,y:n+o},{x:r+a,y:n+o}]}function oa(t,r){if(!t||t.length===0)return null;let[n]=t;return r?n[r]:n}function Ti(t,r,n){if(r===void 0)r=t.left;if(n===void 0)n=t.top;return{x:r+t.width*0.5,y:n+t.height*0.5}}var $i=(t)=>{let{collisionRect:r,droppableRects:n,droppableContainers:o}=t,a=Ti(r,r.left,r.top),s=[];for(let i of o){let{id:c}=i,d=n.get(c);if(d){let u=_i(Ti(d),a);s.push({id:c,data:{droppableContainer:i,value:u}})}}return s.sort(zi)},Ji=(t)=>{let{collisionRect:r,droppableRects:n,droppableContainers:o}=t,a=Pi(r),s=[];for(let i of o){let{id:c}=i,d=n.get(c);if(d){let u=Pi(d),p=a.reduce((f,b,g)=>f+_i(u[g],b),0),m=Number((p/4).toFixed(4));s.push({id:c,data:{droppableContainer:i,value:m}})}}return s.sort(zi)};function hp(t,r){let n=Math.max(r.top,t.top),o=Math.max(r.left,t.left),a=Math.min(r.left+r.width,t.left+t.width),s=Math.min(r.top+r.height,t.top+t.height),i=a-o,c=s-n;if(o<a&&n<s){let d=r.width*r.height,u=t.width*t.height,p=i*c,m=p/(d+u-p);return Number(m.toFixed(4))}return 0}var xp=(t)=>{let{collisionRect:r,droppableRects:n,droppableContainers:o}=t,a=[];for(let s of o){let{id:i}=s,c=n.get(i);if(c){let d=hp(c,r);if(d>0)a.push({id:i,data:{droppableContainer:s,value:d}})}}return a.sort(vp)};function yp(t,r,n){return{...t,scaleX:r&&n?r.width/n.width:1,scaleY:r&&n?r.height/n.height:1}}function ji(t,r){return t&&r?{x:t.left-r.left,y:t.top-r.top}:je}function wp(t){return function(n){for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];return a.reduce((i,c)=>({...i,top:i.top+t*c.y,bottom:i.bottom+t*c.y,left:i.left+t*c.x,right:i.right+t*c.x}),{...n})}}var Np=wp(1);function Rp(t){if(t.startsWith("matrix3d(")){let r=t.slice(9,-1).split(/, /);return{x:+r[12],y:+r[13],scaleX:+r[0],scaleY:+r[5]}}else if(t.startsWith("matrix(")){let r=t.slice(7,-1).split(/, /);return{x:+r[4],y:+r[5],scaleX:+r[0],scaleY:+r[3]}}return null}function Cp(t,r,n){let o=Rp(r);if(!o)return t;let{scaleX:a,scaleY:s,x:i,y:c}=o,d=t.left-i-(1-a)*parseFloat(n),u=t.top-c-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),p=a?t.width/a:t.width,m=s?t.height/s:t.height;return{width:p,height:m,top:u,right:d+p,bottom:u+m,left:d}}var Sp={ignoreTransform:!1};function Wt(t,r){if(r===void 0)r=Sp;let n=t.getBoundingClientRect();if(r.ignoreTransform){let{transform:u,transformOrigin:p}=xe(t).getComputedStyle(t);if(u)n=Cp(n,u,p)}let{top:o,left:a,width:s,height:i,bottom:c,right:d}=n;return{top:o,left:a,width:s,height:i,bottom:c,right:d}}function ki(t){return Wt(t,{ignoreTransform:!0})}function Pp(t){let{innerWidth:r,innerHeight:n}=t;return{top:0,left:0,right:r,bottom:n,width:r,height:n}}function Tp(t,r){if(r===void 0)r=xe(t).getComputedStyle(t);return r.position==="fixed"}function kp(t,r){if(r===void 0)r=xe(t).getComputedStyle(t);let n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((a)=>{let s=r[a];return typeof s==="string"?n.test(s):!1})}function Kr(t,r){let n=[];function o(a){if(r!=null&&n.length>=r)return n;if(!a)return n;if(Ln(a)&&a.scrollingElement!=null&&!n.includes(a.scrollingElement))return n.push(a.scrollingElement),n;if(!Nr(a)||Uo(a))return n;if(n.includes(a))return n;let s=xe(t).getComputedStyle(a);if(a!==t){if(kp(a,s))n.push(a)}if(Tp(a,s))return n;return o(a.parentNode)}if(!t)return n;return o(t)}function Gi(t){let[r]=Kr(t,1);return r!=null?r:null}function Ko(t){if(!Jr||!t)return null;if(Ot(t))return t;if(!kn(t))return null;if(Ln(t)||t===_t(t).scrollingElement)return window;if(Nr(t))return t;return null}function Wi(t){if(Ot(t))return t.scrollX;return t.scrollLeft}function Xi(t){if(Ot(t))return t.scrollY;return t.scrollTop}function ea(t){return{x:Wi(t),y:Xi(t)}}var le;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(le||(le={}));function Ui(t){if(!Jr||!t)return!1;return t===document.scrollingElement}function Ki(t){let r={x:0,y:0},n=Ui(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},o={x:t.scrollWidth-n.width,y:t.scrollHeight-n.height},a=t.scrollTop<=r.y,s=t.scrollLeft<=r.x,i=t.scrollTop>=o.y,c=t.scrollLeft>=o.x;return{isTop:a,isLeft:s,isBottom:i,isRight:c,maxScroll:o,minScroll:r}}var Lp={x:0.2,y:0.2};function Dp(t,r,n,o,a){let{top:s,left:i,right:c,bottom:d}=n;if(o===void 0)o=10;if(a===void 0)a=Lp;let{isTop:u,isBottom:p,isLeft:m,isRight:f}=Ki(t),b={x:0,y:0},g={x:0,y:0},h={height:r.height*a.y,width:r.width*a.x};if(!u&&s<=r.top+h.height)b.y=le.Backward,g.y=o*Math.abs((r.top+h.height-s)/h.height);else if(!p&&d>=r.bottom-h.height)b.y=le.Forward,g.y=o*Math.abs((r.bottom-h.height-d)/h.height);if(!f&&c>=r.right-h.width)b.x=le.Forward,g.x=o*Math.abs((r.right-h.width-c)/h.width);else if(!m&&i<=r.left+h.width)b.x=le.Backward,g.x=o*Math.abs((r.left+h.width-i)/h.width);return{direction:b,speed:g}}function Ep(t){if(t===document.scrollingElement){let{innerWidth:s,innerHeight:i}=window;return{top:0,left:0,right:s,bottom:i,width:s,height:i}}let{top:r,left:n,right:o,bottom:a}=t.getBoundingClientRect();return{top:r,left:n,right:o,bottom:a,width:t.clientWidth,height:t.clientHeight}}function Yi(t){return t.reduce((r,n)=>jt(r,ea(n)),je)}function Mp(t){return t.reduce((r,n)=>r+Wi(n),0)}function Ip(t){return t.reduce((r,n)=>r+Xi(n),0)}function Ap(t,r){if(r===void 0)r=Wt;if(!t)return;let{top:n,left:o,bottom:a,right:s}=r(t);if(!Gi(t))return;if(a<=0||s<=0||n>=window.innerHeight||o>=window.innerWidth)t.scrollIntoView({block:"center",inline:"center"})}var Op=[["x",["left","right"],Mp],["y",["top","bottom"],Ip]];class Vn{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=Kr(r),o=Yi(n);this.rect={...t},this.width=t.width,this.height=t.height;for(let[a,s,i]of Op)for(let c of s)Object.defineProperty(this,c,{get:()=>{let d=i(n),u=o[a]-d;return this.rect[c]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Sr{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((r)=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var o;(o=this.target)==null||o.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function Hp(t){let{EventTarget:r}=xe(t);return t instanceof r?t:_t(t)}function Yo(t,r){let n=Math.abs(t.x),o=Math.abs(t.y);if(typeof r==="number")return Math.sqrt(n**2+o**2)>r;if("x"in r&&"y"in r)return n>r.x&&o>r.y;if("x"in r)return n>r.x;if("y"in r)return o>r.y;return!1}var Fe;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(Fe||(Fe={}));function Li(t){t.preventDefault()}function Vp(t){t.stopPropagation()}var V;(function(t){t.Space="Space",t.Down="ArrowDown",t.Right="ArrowRight",t.Left="ArrowLeft",t.Up="ArrowUp",t.Esc="Escape",t.Enter="Enter",t.Tab="Tab"})(V||(V={}));var qi={start:[V.Space,V.Enter],cancel:[V.Esc],end:[V.Space,V.Enter,V.Tab]},Bp=(t,r)=>{let{currentCoordinates:n}=r;switch(t.code){case V.Right:return{...n,x:n.x+25};case V.Left:return{...n,x:n.x-25};case V.Down:return{...n,y:n.y+25};case V.Up:return{...n,y:n.y-25}}return};class Yr{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;let{event:{target:r}}=t;this.props=t,this.listeners=new Sr(_t(r)),this.windowListeners=new Sr(xe(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Fe.Resize,this.handleCancel),this.windowListeners.add(Fe.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Fe.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:t,onStart:r}=this.props,n=t.node.current;if(n)Ap(n);r(je)}handleKeyDown(t){if(Gr(t)){let{active:r,context:n,options:o}=this.props,{keyboardCodes:a=qi,coordinateGetter:s=Bp,scrollBehavior:i="smooth"}=o,{code:c}=t;if(a.end.includes(c)){this.handleEnd(t);return}if(a.cancel.includes(c)){this.handleCancel(t);return}let{collisionRect:d}=n.current,u=d?{x:d.left,y:d.top}:je;if(!this.referenceCoordinates)this.referenceCoordinates=u;let p=s(t,{active:r,context:n.current,currentCoordinates:u});if(p){let m=Gt(p,u),f={x:0,y:0},{scrollableAncestors:b}=n.current;for(let g of b){let h=t.code,{isTop:T,isRight:R,isLeft:y,isBottom:w,maxScroll:C,minScroll:D}=Ki(g),N=Ep(g),P={x:Math.min(h===V.Right?N.right-N.width/2:N.right,Math.max(h===V.Right?N.left:N.left+N.width/2,p.x)),y:Math.min(h===V.Down?N.bottom-N.height/2:N.bottom,Math.max(h===V.Down?N.top:N.top+N.height/2,p.y))},L=h===V.Right&&!R||h===V.Left&&!y,F=h===V.Down&&!w||h===V.Up&&!T;if(L&&P.x!==p.x){let A=g.scrollLeft+m.x,j=h===V.Right&&A<=C.x||h===V.Left&&A>=D.x;if(j&&!m.y){g.scrollTo({left:A,behavior:i});return}if(j)f.x=g.scrollLeft-A;else f.x=h===V.Right?g.scrollLeft-C.x:g.scrollLeft-D.x;if(f.x)g.scrollBy({left:-f.x,behavior:i});break}else if(F&&P.y!==p.y){let A=g.scrollTop+m.y,j=h===V.Down&&A<=C.y||h===V.Up&&A>=D.y;if(j&&!m.x){g.scrollTo({top:A,behavior:i});return}if(j)f.y=g.scrollTop-A;else f.y=h===V.Down?g.scrollTop-C.y:g.scrollTop-D.y;if(f.y)g.scrollBy({top:-f.y,behavior:i});break}}this.handleMove(t,jt(Gt(p,this.referenceCoordinates),f))}}}handleMove(t,r){let{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){let{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){let{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Yr.activators=[{eventName:"onKeyDown",handler:(t,r,n)=>{let{keyboardCodes:o=qi,onActivation:a}=r,{active:s}=n,{code:i}=t.nativeEvent;if(o.start.includes(i)){let c=s.activatorNode.current;if(c&&t.target!==c)return!1;return t.preventDefault(),a==null||a({event:t.nativeEvent}),!0}return!1}}];function Di(t){return Boolean(t&&"distance"in t)}function Ei(t){return Boolean(t&&"delay"in t)}class Bn{constructor(t,r,n){var o;if(n===void 0)n=Hp(t.event.target);this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;let{event:a}=t,{target:s}=a;this.props=t,this.events=r,this.document=_t(s),this.documentListeners=new Sr(this.document),this.listeners=new Sr(n),this.windowListeners=new Sr(xe(s)),this.initialCoordinates=(o=Mn(a))!=null?o:je,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel)this.listeners.add(t.cancel.name,this.handleCancel);if(this.windowListeners.add(Fe.Resize,this.handleCancel),this.windowListeners.add(Fe.DragStart,Li),this.windowListeners.add(Fe.VisibilityChange,this.handleCancel),this.windowListeners.add(Fe.ContextMenu,Li),this.documentListeners.add(Fe.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ei(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(Di(r)){this.handlePending(r);return}}this.handleStart()}detach(){if(this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null)clearTimeout(this.timeoutId),this.timeoutId=null}handlePending(t,r){let{active:n,onPending:o}=this.props;o(n,t,this.initialCoordinates,r)}handleStart(){let{initialCoordinates:t}=this,{onStart:r}=this.props;if(t)this.activated=!0,this.documentListeners.add(Fe.Click,Vp,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Fe.SelectionChange,this.removeTextSelection),r(t)}handleMove(t){var r;let{activated:n,initialCoordinates:o,props:a}=this,{onMove:s,options:{activationConstraint:i}}=a;if(!o)return;let c=(r=Mn(t))!=null?r:je,d=Gt(o,c);if(!n&&i){if(Di(i)){if(i.tolerance!=null&&Yo(d,i.tolerance))return this.handleCancel();if(Yo(d,i.distance))return this.handleStart()}if(Ei(i)){if(Yo(d,i.tolerance))return this.handleCancel()}this.handlePending(i,d);return}if(t.cancelable)t.preventDefault();s(c)}handleEnd(){let{onAbort:t,onEnd:r}=this.props;if(this.detach(),!this.activated)t(this.props.active);r()}handleCancel(){let{onAbort:t,onCancel:r}=this.props;if(this.detach(),!this.activated)t(this.props.active);r()}handleKeydown(t){if(t.code===V.Esc)this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}var Fp={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class qr extends Bn{constructor(t){let{event:r}=t,n=_t(r.target);super(t,Fp,n)}}qr.activators=[{eventName:"onPointerDown",handler:(t,r)=>{let{nativeEvent:n}=t,{onActivation:o}=r;if(!n.isPrimary||n.button!==0)return!1;return o==null||o({event:n}),!0}}];var _p={move:{name:"mousemove"},end:{name:"mouseup"}},ta;(function(t){t[t.RightClick=2]="RightClick"})(ta||(ta={}));class Zi extends Bn{constructor(t){super(t,_p,_t(t.event.target))}}Zi.activators=[{eventName:"onMouseDown",handler:(t,r)=>{let{nativeEvent:n}=t,{onActivation:o}=r;if(n.button===ta.RightClick)return!1;return o==null||o({event:n}),!0}}];var qo={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Qi extends Bn{constructor(t){super(t,qo)}static setup(){return window.addEventListener(qo.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(qo.move.name,t)};function t(){}}}Qi.activators=[{eventName:"onTouchStart",handler:(t,r)=>{let{nativeEvent:n}=t,{onActivation:o}=r,{touches:a}=n;if(a.length>1)return!1;return o==null||o({event:n}),!0}}];var Wr;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(Wr||(Wr={}));var Hn;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Hn||(Hn={}));function zp(t){let{acceleration:r,activator:n=Wr.Pointer,canScroll:o,draggingRect:a,enabled:s,interval:i=5,order:c=Hn.TreeOrder,pointerCoordinates:d,scrollableAncestors:u,scrollableAncestorRects:p,delta:m,threshold:f}=t,b=Jp({delta:m,disabled:!s}),[g,h]=xi(),T=fe({x:0,y:0}),R=fe({x:0,y:0}),y=ne(()=>{switch(n){case Wr.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Wr.DraggableRect:return a}},[n,a,d]),w=fe(null),C=Je(()=>{let N=w.current;if(!N)return;let P=T.current.x*R.current.x,L=T.current.y*R.current.y;N.scrollBy(P,L)},[]),D=ne(()=>c===Hn.TreeOrder?[...u].reverse():u,[c,u]);ee(()=>{if(!s||!u.length||!y){h();return}for(let N of D){if((o==null?void 0:o(N))===!1)continue;let P=u.indexOf(N),L=p[P];if(!L)continue;let{direction:F,speed:A}=Dp(N,L,y,r,f);for(let j of["x","y"])if(!b[j][F[j]])A[j]=0,F[j]=0;if(A.x>0||A.y>0){h(),w.current=N,g(C,i),T.current=A,R.current=F;return}}T.current={x:0,y:0},R.current={x:0,y:0},h()},[r,C,o,h,s,i,JSON.stringify(y),JSON.stringify(b),g,u,D,p,JSON.stringify(f)])}var $p={x:{[le.Backward]:!1,[le.Forward]:!1},y:{[le.Backward]:!1,[le.Forward]:!1}};function Jp(t){let{delta:r,disabled:n}=t,o=En(r);return Cr((a)=>{if(n||!o||!a)return $p;let s={x:Math.sign(r.x-o.x),y:Math.sign(r.y-o.y)};return{x:{[le.Backward]:a.x[le.Backward]||s.x===-1,[le.Forward]:a.x[le.Forward]||s.x===1},y:{[le.Backward]:a.y[le.Backward]||s.y===-1,[le.Forward]:a.y[le.Forward]||s.y===1}}},[n,r,o])}function jp(t,r){let n=r!=null?t.get(r):void 0,o=n?n.node.current:null;return Cr((a)=>{var s;if(r==null)return null;return(s=o!=null?o:a)!=null?s:null},[o,r])}function Gp(t,r){return ne(()=>t.reduce((n,o)=>{let{sensor:a}=o,s=a.activators.map((i)=>({eventName:i.eventName,handler:r(i.handler,o)}));return[...n,...s]},[]),[t,r])}var Xr;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Xr||(Xr={}));var ra;(function(t){t.Optimized="optimized"})(ra||(ra={}));var Mi=new Map;function Wp(t,r){let{dragging:n,dependencies:o,config:a}=r,[s,i]=$e(null),{frequency:c,measure:d,strategy:u}=a,p=fe(t),m=T(),f=Rr(m),b=Je(function(R){if(R===void 0)R=[];if(f.current)return;i((y)=>{if(y===null)return R;return y.concat(R.filter((w)=>!y.includes(w)))})},[f]),g=fe(null),h=Cr((R)=>{if(m&&!n)return Mi;if(!R||R===Mi||p.current!==t||s!=null){let y=new Map;for(let w of t){if(!w)continue;if(s&&s.length>0&&!s.includes(w.id)&&w.rect.current){y.set(w.id,w.rect.current);continue}let C=w.node.current,D=C?new Vn(d(C),C):null;if(w.rect.current=D,D)y.set(w.id,D)}return y}return R},[t,s,n,m,d]);return ee(()=>{p.current=t},[t]),ee(()=>{if(m)return;b()},[n,m]),ee(()=>{if(s&&s.length>0)i(null)},[JSON.stringify(s)]),ee(()=>{if(m||typeof c!=="number"||g.current!==null)return;g.current=setTimeout(()=>{b(),g.current=null},c)},[c,m,b,...o]),{droppableRects:h,measureDroppableContainers:b,measuringScheduled:s!=null};function T(){switch(u){case Xr.Always:return!1;case Xr.BeforeDragging:return n;default:return!n}}}function el(t,r){return Cr((n)=>{if(!t)return null;if(n)return n;return typeof r==="function"?r(t):t},[r,t])}function Xp(t,r){return el(t,r)}function Up(t){let{callback:r,disabled:n}=t,o=Dn(r),a=ne(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;let{MutationObserver:s}=window;return new s(o)},[o,n]);return ee(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function Fn(t){let{callback:r,disabled:n}=t,o=Dn(r),a=ne(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;let{ResizeObserver:s}=window;return new s(o)},[n]);return ee(()=>()=>a==null?void 0:a.disconnect(),[a]),a}function Kp(t){return new Vn(Wt(t),t)}function Ii(t,r,n){if(r===void 0)r=Kp;let[o,a]=$e(null);function s(){a((d)=>{if(!t)return null;if(t.isConnected===!1){var u;return(u=d!=null?d:n)!=null?u:null}let p=r(t);if(JSON.stringify(d)===JSON.stringify(p))return d;return p})}let i=Up({callback(d){if(!t)return;for(let u of d){let{type:p,target:m}=u;if(p==="childList"&&m instanceof HTMLElement&&m.contains(t)){s();break}}}}),c=Fn({callback:s});return He(()=>{if(s(),t)c==null||c.observe(t),i==null||i.observe(document.body,{childList:!0,subtree:!0});else c==null||c.disconnect(),i==null||i.disconnect()},[t]),o}function Yp(t){let r=el(t);return ji(t,r)}var Ai=[];function qp(t){let r=fe(t),n=Cr((o)=>{if(!t)return Ai;if(o&&o!==Ai&&t&&r.current&&t.parentNode===r.current.parentNode)return o;return Kr(t)},[t]);return ee(()=>{r.current=t},[t]),n}function Zp(t){let[r,n]=$e(null),o=fe(t),a=Je((s)=>{let i=Ko(s.target);if(!i)return;n((c)=>{if(!c)return null;return c.set(i,ea(i)),new Map(c)})},[]);return ee(()=>{let s=o.current;if(t!==s){i(s);let c=t.map((d)=>{let u=Ko(d);if(u)return u.addEventListener("scroll",a,{passive:!0}),[u,ea(u)];return null}).filter((d)=>d!=null);n(c.length?new Map(c):null),o.current=t}return()=>{i(t),i(s)};function i(c){c.forEach((d)=>{let u=Ko(d);u==null||u.removeEventListener("scroll",a)})}},[a,t]),ne(()=>{if(t.length)return r?Array.from(r.values()).reduce((s,i)=>jt(s,i),je):Yi(t);return je},[t,r])}function Oi(t,r){if(r===void 0)r=[];let n=fe(null);return ee(()=>{n.current=null},r),ee(()=>{let o=t!==je;if(o&&!n.current)n.current=t;if(!o&&n.current)n.current=null},[t]),n.current?Gt(t,n.current):je}function Qp(t){ee(()=>{if(!Jr)return;let r=t.map((n)=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(let n of r)n==null||n()}},t.map((r)=>{let{sensor:n}=r;return n}))}function em(t,r){return ne(()=>t.reduce((n,o)=>{let{eventName:a,handler:s}=o;return n[a]=(i)=>{s(i,r)},n},{}),[t,r])}function tl(t){return ne(()=>t?Pp(t):null,[t])}var Hi=[];function tm(t,r){if(r===void 0)r=Wt;let[n]=t,o=tl(n?xe(n):null),[a,s]=$e(Hi);function i(){s(()=>{if(!t.length)return Hi;return t.map((d)=>Ui(d)?o:new Vn(r(d),d))})}let c=Fn({callback:i});return He(()=>{c==null||c.disconnect(),i(),t.forEach((d)=>c==null?void 0:c.observe(d))},[t]),a}function rm(t){if(!t)return null;if(t.children.length>1)return t;let r=t.children[0];return Nr(r)?r:t}function nm(t){let{measure:r}=t,[n,o]=$e(null),a=Je((u)=>{for(let{target:p}of u)if(Nr(p)){o((m)=>{let f=r(p);return m?{...m,width:f.width,height:f.height}:f});break}},[r]),s=Fn({callback:a}),i=Je((u)=>{let p=rm(u);if(s==null||s.disconnect(),p)s==null||s.observe(p);o(p?r(p):null)},[r,s]),[c,d]=jr(i);return ne(()=>({nodeRef:c,rect:n,setRef:d}),[n,c,d])}var om=[{sensor:qr,options:{}},{sensor:Yr,options:{}}],am={current:{}},An={draggable:{measure:ki},droppable:{measure:ki,strategy:Xr.WhileDragging,frequency:ra.Optimized},dragOverlay:{measure:Wt}};class Pr extends Map{get(t){var r;return t!=null?(r=super.get(t))!=null?r:void 0:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((t)=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}var sm={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Pr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:On},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:An,measureDroppableContainers:On,windowRect:null,measuringScheduled:!1},im={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:On,draggableNodes:new Map,over:null,measureDroppableContainers:On},_n=Ur(im),rl=Ur(sm);function lm(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Pr}}}function cm(t,r){switch(r.type){case re.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:r.initialCoordinates,active:r.active}};case re.DragMove:if(t.draggable.active==null)return t;return{...t,draggable:{...t.draggable,translate:{x:r.coordinates.x-t.draggable.initialCoordinates.x,y:r.coordinates.y-t.draggable.initialCoordinates.y}}};case re.DragEnd:case re.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case re.RegisterDroppable:{let{element:n}=r,{id:o}=n,a=new Pr(t.droppable.containers);return a.set(o,n),{...t,droppable:{...t.droppable,containers:a}}}case re.SetDroppableDisabled:{let{id:n,key:o,disabled:a}=r,s=t.droppable.containers.get(n);if(!s||o!==s.key)return t;let i=new Pr(t.droppable.containers);return i.set(n,{...s,disabled:a}),{...t,droppable:{...t.droppable,containers:i}}}case re.UnregisterDroppable:{let{id:n,key:o}=r,a=t.droppable.containers.get(n);if(!a||o!==a.key)return t;let s=new Pr(t.droppable.containers);return s.delete(n),{...t,droppable:{...t.droppable,containers:s}}}default:return t}}function dm(t){let{disabled:r}=t,{active:n,activatorEvent:o,draggableNodes:a}=Tr(_n),s=En(o),i=En(n==null?void 0:n.id);return ee(()=>{if(r)return;if(!o&&s&&i!=null){if(!Gr(s))return;if(document.activeElement===s.target)return;let c=a.get(i);if(!c)return;let{activatorNode:d,node:u}=c;if(!d.current&&!u.current)return;requestAnimationFrame(()=>{for(let p of[d.current,u.current]){if(!p)continue;let m=wi(p);if(m){m.focus();break}}})}},[o,r,a,i,s]),null}function um(t,r){let{transform:n,...o}=r;return t!=null&&t.length?t.reduce((a,s)=>s({transform:a,...o}),n):n}function pm(t){return ne(()=>({draggable:{...An.draggable,...t==null?void 0:t.draggable},droppable:{...An.droppable,...t==null?void 0:t.droppable},dragOverlay:{...An.dragOverlay,...t==null?void 0:t.dragOverlay}}),[t==null?void 0:t.draggable,t==null?void 0:t.droppable,t==null?void 0:t.dragOverlay])}function mm(t){let{activeNode:r,measure:n,initialRect:o,config:a=!0}=t,s=fe(!1),{x:i,y:c}=typeof a==="boolean"?{x:a,y:a}:a;He(()=>{if(!i&&!c||!r){s.current=!1;return}if(s.current||!o)return;let u=r==null?void 0:r.node.current;if(!u||u.isConnected===!1)return;let p=n(u),m=ji(p,o);if(!i)m.x=0;if(!c)m.y=0;if(s.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){let f=Gi(u);if(f)f.scrollBy({top:m.y,left:m.x})}},[r,i,c,o,n])}var nl=Ur({...je,scaleX:1,scaleY:1}),Dt;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Dt||(Dt={}));var ol=cp(function(r){var n,o,a,s;let{id:i,accessibility:c,autoScroll:d=!0,children:u,sensors:p=om,collisionDetection:m=xp,measuring:f,modifiers:b,...g}=r,h=dp(cm,void 0,lm),[T,R]=h,[y,w]=mp(),[C,D]=$e(Dt.Uninitialized),N=C===Dt.Initialized,{draggable:{active:P,nodes:L,translate:F},droppable:{containers:A}}=T,j=P!=null?L.get(P):null,te=fe({initial:null,translated:null}),q=ne(()=>{var be;return P!=null?{id:P,data:(be=j==null?void 0:j.data)!=null?be:am,rect:te}:null},[P,j]),oe=fe(null),[ge,ve]=$e(null),[U,Re]=$e(null),Z=Rr(g,Object.values(g)),he=$t("DndDescribedBy",i),H=ne(()=>A.getEnabled(),[A]),J=pm(f),{droppableRects:_,measureDroppableContainers:ae,measuringScheduled:Ce}=Wp(H,{dragging:N,dependencies:[F.x,F.y],config:J.droppable}),se=jp(L,P),pt=ne(()=>U?Mn(U):null,[U]),O=lc(),Se=Xp(se,J.draggable.measure);mm({activeNode:P!=null?L.get(P):null,config:O.layoutShiftCompensation,initialRect:Se,measure:J.draggable.measure});let W=Ii(se,J.draggable.measure,Se),Mr=Ii(se?se.parentElement:null),Xe=fe({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:_,draggableNodes:L,draggingNode:null,draggingNodeRect:null,droppableContainers:A,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),qt=A.getNodeFor((n=Xe.current.over)==null?void 0:n.id),et=nm({measure:J.dragOverlay.measure}),er=(o=et.nodeRef.current)!=null?o:se,tr=N?(a=et.rect)!=null?a:W:null,va=Boolean(et.nodeRef.current&&et.rect),ha=Yp(va?null:W),so=tl(er?xe(er):null),mt=qp(N?qt!=null?qt:se:null),an=tm(mt),sn=um(b,{transform:{x:F.x-ha.x,y:F.y-ha.y,scaleX:1,scaleY:1},activatorEvent:U,active:q,activeNodeRect:W,containerNodeRect:Mr,draggingNodeRect:tr,over:Xe.current.over,overlayNodeRect:et.rect,scrollableAncestors:mt,scrollableAncestorRects:an,windowRect:so}),xa=pt?jt(pt,F):null,ya=Zp(mt),tc=Oi(ya),rc=Oi(ya,[W]),nr=jt(sn,tc),or=tr?Np(tr,sn):null,Ir=q&&or?m({active:q,collisionRect:or,droppableRects:_,droppableContainers:H,pointerCoordinates:xa}):null,wa=oa(Ir,"id"),[ft,Na]=$e(null),nc=va?sn:jt(sn,rc),oc=yp(nc,(s=ft==null?void 0:ft.rect)!=null?s:null,W),io=fe(null),Ra=Je((be,Pe)=>{let{sensor:Te,options:gt}=Pe;if(oe.current==null)return;let Me=L.get(oe.current);if(!Me)return;let Le=be.nativeEvent,Ue=new Te({active:oe.current,activeNode:Me,event:Le,options:gt,context:Xe,onAbort(pe){if(!L.get(pe))return;let{onDragAbort:Ke}=Z.current,tt={id:pe};Ke==null||Ke(tt),y({type:"onDragAbort",event:tt})},onPending(pe,bt,Ke,tt){if(!L.get(pe))return;let{onDragPending:Hr}=Z.current,ht={id:pe,constraint:bt,initialCoordinates:Ke,offset:tt};Hr==null||Hr(ht),y({type:"onDragPending",event:ht})},onStart(pe){let bt=oe.current;if(bt==null)return;let Ke=L.get(bt);if(!Ke)return;let{onDragStart:tt}=Z.current,Or={activatorEvent:Le,active:{id:bt,data:Ke.data,rect:te}};In(()=>{tt==null||tt(Or),D(Dt.Initializing),R({type:re.DragStart,initialCoordinates:pe,active:bt}),y({type:"onDragStart",event:Or}),ve(io.current),Re(Le)})},onMove(pe){R({type:re.DragMove,coordinates:pe})},onEnd:ar(re.DragEnd),onCancel:ar(re.DragCancel)});io.current=Ue;function ar(pe){return async function(){let{active:Ke,collisions:tt,over:Or,scrollAdjustedTranslate:Hr}=Xe.current,ht=null;if(Ke&&Hr){let{cancelDrop:Vr}=Z.current;if(ht={activatorEvent:Le,active:Ke,collisions:tt,delta:Hr,over:Or},pe===re.DragEnd&&typeof Vr==="function"){if(await Promise.resolve(Vr(ht)))pe=re.DragCancel}}oe.current=null,In(()=>{R({type:pe}),D(Dt.Uninitialized),Na(null),ve(null),Re(null),io.current=null;let Vr=pe===re.DragEnd?"onDragEnd":"onDragCancel";if(ht){let lo=Z.current[Vr];lo==null||lo(ht),y({type:Vr,event:ht})}})}}},[L]),ac=Je((be,Pe)=>(Te,gt)=>{let Me=Te.nativeEvent,Le=L.get(gt);if(oe.current!==null||!Le||Me.dndKit||Me.defaultPrevented)return;let Ue={active:Le};if(be(Te,Pe.options,Ue)===!0)Me.dndKit={capturedBy:Pe.sensor},oe.current=gt,Ra(Te,Pe)},[L,Ra]),Ca=Gp(p,ac);Qp(p),He(()=>{if(W&&C===Dt.Initializing)D(Dt.Initialized)},[W,C]),ee(()=>{let{onDragMove:be}=Z.current,{active:Pe,activatorEvent:Te,collisions:gt,over:Me}=Xe.current;if(!Pe||!Te)return;let Le={active:Pe,activatorEvent:Te,collisions:gt,delta:{x:nr.x,y:nr.y},over:Me};In(()=>{be==null||be(Le),y({type:"onDragMove",event:Le})})},[nr.x,nr.y]),ee(()=>{let{active:be,activatorEvent:Pe,collisions:Te,droppableContainers:gt,scrollAdjustedTranslate:Me}=Xe.current;if(!be||oe.current==null||!Pe||!Me)return;let{onDragOver:Le}=Z.current,Ue=gt.get(wa),ar=Ue&&Ue.rect.current?{id:Ue.id,rect:Ue.rect.current,data:Ue.data,disabled:Ue.disabled}:null,pe={active:be,activatorEvent:Pe,collisions:Te,delta:{x:Me.x,y:Me.y},over:ar};In(()=>{Na(ar),Le==null||Le(pe),y({type:"onDragOver",event:pe})})},[wa]),He(()=>{Xe.current={activatorEvent:U,active:q,activeNode:se,collisionRect:or,collisions:Ir,droppableRects:_,draggableNodes:L,draggingNode:er,draggingNodeRect:tr,droppableContainers:A,over:ft,scrollableAncestors:mt,scrollAdjustedTranslate:nr},te.current={initial:tr,translated:or}},[q,se,Ir,or,L,er,tr,_,A,ft,mt,nr]),zp({...O,delta:F,draggingRect:or,pointerCoordinates:xa,scrollableAncestors:mt,scrollableAncestorRects:an});let sc=ne(()=>({active:q,activeNode:se,activeNodeRect:W,activatorEvent:U,collisions:Ir,containerNodeRect:Mr,dragOverlay:et,draggableNodes:L,droppableContainers:A,droppableRects:_,over:ft,measureDroppableContainers:ae,scrollableAncestors:mt,scrollableAncestorRects:an,measuringConfiguration:J,measuringScheduled:Ce,windowRect:so}),[q,se,W,U,Ir,Mr,et,L,A,_,ft,ae,mt,an,J,Ce,so]),ic=ne(()=>({activatorEvent:U,activators:Ca,active:q,activeNodeRect:W,ariaDescribedById:{draggable:he},dispatch:R,draggableNodes:L,over:ft,measureDroppableContainers:ae}),[U,Ca,q,W,R,he,L,ft,ae]);return qe.createElement(Bi.Provider,{value:w},qe.createElement(_n.Provider,{value:ic},qe.createElement(rl.Provider,{value:sc},qe.createElement(nl.Provider,{value:oc},u)),qe.createElement(dm,{disabled:(c==null?void 0:c.restoreFocus)===!1})),qe.createElement(bp,{...c,hiddenTextDescribedById:he}));function lc(){let be=(ge==null?void 0:ge.autoScrollEnabled)===!1,Pe=typeof d==="object"?d.enabled===!1:d===!1,Te=N&&!be&&!Pe;if(typeof d==="object")return{...d,enabled:Te};return{enabled:Te}}}),fm=Ur(null),Vi="button",gm="Draggable";function al(t){let{id:r,data:n,disabled:o=!1,attributes:a}=t,s=$t(gm),{activators:i,activatorEvent:c,active:d,activeNodeRect:u,ariaDescribedById:p,draggableNodes:m,over:f}=Tr(_n),{role:b=Vi,roleDescription:g="draggable",tabIndex:h=0}=a!=null?a:{},T=(d==null?void 0:d.id)===r,R=Tr(T?nl:fm),[y,w]=jr(),[C,D]=jr(),N=em(i,r),P=Rr(n);He(()=>(m.set(r,{id:r,key:s,node:y,activatorNode:C,data:P}),()=>{let F=m.get(r);if(F&&F.key===s)m.delete(r)}),[m,r]);let L=ne(()=>({role:b,tabIndex:h,"aria-disabled":o,"aria-pressed":T&&b===Vi?!0:void 0,"aria-roledescription":g,"aria-describedby":p.draggable}),[o,b,h,T,g,p.draggable]);return{active:d,activatorEvent:c,activeNodeRect:u,attributes:L,isDragging:T,listeners:o?void 0:N,node:y,over:f,setNodeRef:w,setActivatorNodeRef:D,transform:R}}function sl(){return Tr(rl)}var bm="Droppable",vm={timeout:25};function il(t){let{data:r,disabled:n=!1,id:o,resizeObserverConfig:a}=t,s=$t(bm),{active:i,dispatch:c,over:d,measureDroppableContainers:u}=Tr(_n),p=fe({disabled:n}),m=fe(!1),f=fe(null),b=fe(null),{disabled:g,updateMeasurementsFor:h,timeout:T}={...vm,...a},R=Rr(h!=null?h:o),y=Je(()=>{if(!m.current){m.current=!0;return}if(b.current!=null)clearTimeout(b.current);b.current=setTimeout(()=>{u(Array.isArray(R.current)?R.current:[R.current]),b.current=null},T)},[T]),w=Fn({callback:y,disabled:g||!i}),C=Je((L,F)=>{if(!w)return;if(F)w.unobserve(F),m.current=!1;if(L)w.observe(L)},[w]),[D,N]=jr(C),P=Rr(r);return ee(()=>{if(!w||!D.current)return;w.disconnect(),m.current=!1,w.observe(D.current)},[D,w]),ee(()=>(c({type:re.RegisterDroppable,element:{id:o,key:s,disabled:n,node:D,rect:f,data:P}}),()=>c({type:re.UnregisterDroppable,key:s,id:o})),[o]),ee(()=>{if(n!==p.current.disabled)c({type:re.SetDroppableDisabled,id:o,key:s,disabled:n}),p.current.disabled=n},[o,s,n,c]),{active:i,rect:f,isOver:(d==null?void 0:d.id)===o,node:D,over:d,setNodeRef:N}}import ll,{useMemo as Gn,useRef as aa,useEffect as Wn,useState as hm,useContext as xm}from"react";function Un(t,r,n){let o=t.slice();return o.splice(n<0?o.length+n:n,0,o.splice(r,1)[0]),o}function ym(t,r){return t.reduce((n,o,a)=>{let s=r.get(o);if(s)n[a]=s;return n},Array(t.length))}function zn(t){return t!==null&&t>=0}function wm(t,r){if(t===r)return!0;if(t.length!==r.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==r[n])return!1;return!0}function Nm(t){if(typeof t==="boolean")return{draggable:t,droppable:t};return t}var cl=(t)=>{let{rects:r,activeIndex:n,overIndex:o,index:a}=t,s=Un(r,o,n),i=r[a],c=s[a];if(!c||!i)return null;return{x:c.left-i.left,y:c.top-i.top,scaleX:c.width/i.width,scaleY:c.height/i.height}};var Jn={scaleX:1,scaleY:1},dl=(t)=>{var r;let{activeIndex:n,activeNodeRect:o,index:a,rects:s,overIndex:i}=t,c=(r=s[n])!=null?r:o;if(!c)return null;if(a===n){let u=s[i];if(!u)return null;return{x:0,y:n<i?u.top+u.height-(c.top+c.height):u.top-c.top,...Jn}}let d=Rm(s,a,n);if(a>n&&a<=i)return{x:0,y:-c.height-d,...Jn};if(a<n&&a>=i)return{x:0,y:c.height+d,...Jn};return{x:0,y:0,...Jn}};function Rm(t,r,n){let o=t[r],a=t[r-1],s=t[r+1];if(!o)return 0;if(n<r)return a?o.top-(a.top+a.height):s?s.top-(o.top+o.height):0;return s?s.top-(o.top+o.height):a?o.top-(a.top+a.height):0}var ul="Sortable",pl=ll.createContext({activeIndex:-1,containerId:ul,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:cl,disabled:{draggable:!1,droppable:!1}});function ml(t){let{children:r,id:n,items:o,strategy:a=cl,disabled:s=!1}=t,{active:i,dragOverlay:c,droppableRects:d,over:u,measureDroppableContainers:p}=sl(),m=$t(ul,n),f=Boolean(c.rect!==null),b=Gn(()=>o.map((N)=>typeof N==="object"&&("id"in N)?N.id:N),[o]),g=i!=null,h=i?b.indexOf(i.id):-1,T=u?b.indexOf(u.id):-1,R=aa(b),y=!wm(b,R.current),w=T!==-1&&h===-1||y,C=Nm(s);He(()=>{if(y&&g)p(b)},[y,b,g,p]),Wn(()=>{R.current=b},[b]);let D=Gn(()=>({activeIndex:h,containerId:m,disabled:C,disableTransforms:w,items:b,overIndex:T,useDragOverlay:f,sortedRects:ym(b,d),strategy:a}),[h,m,C.draggable,C.droppable,w,b,T,d,f,a]);return ll.createElement(pl.Provider,{value:D},r)}var Cm=(t)=>{let{id:r,items:n,activeIndex:o,overIndex:a}=t;return Un(n,o,a).indexOf(r)},Sm=(t)=>{let{containerId:r,isSorting:n,wasDragging:o,index:a,items:s,newIndex:i,previousItems:c,previousContainerId:d,transition:u}=t;if(!u||!o)return!1;if(c!==s&&a===i)return!1;if(n)return!0;return i!==a&&r===d},Pm={duration:200,easing:"ease"},fl="transform",Tm=Lt.Transition.toString({property:fl,duration:0,easing:"linear"}),km={roleDescription:"sortable"};function Lm(t){let{disabled:r,index:n,node:o,rect:a}=t,[s,i]=hm(null),c=aa(n);return He(()=>{if(!r&&n!==c.current&&o.current){let d=a.current;if(d){let u=Wt(o.current,{ignoreTransform:!0}),p={x:d.left-u.left,y:d.top-u.top,scaleX:d.width/u.width,scaleY:d.height/u.height};if(p.x||p.y)i(p)}}if(n!==c.current)c.current=n},[r,n,o,a]),Wn(()=>{if(s)i(null)},[s]),s}function gl(t){let{animateLayoutChanges:r=Sm,attributes:n,disabled:o,data:a,getNewIndex:s=Cm,id:i,strategy:c,resizeObserverConfig:d,transition:u=Pm}=t,{items:p,containerId:m,activeIndex:f,disabled:b,disableTransforms:g,sortedRects:h,overIndex:T,useDragOverlay:R,strategy:y}=xm(pl),w=Dm(o,b),C=p.indexOf(i),D=Gn(()=>({sortable:{containerId:m,index:C,items:p},...a}),[m,a,C,p]),N=Gn(()=>p.slice(p.indexOf(i)),[p,i]),{rect:P,node:L,isOver:F,setNodeRef:A}=il({id:i,data:D,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...d}}),{active:j,activatorEvent:te,activeNodeRect:q,attributes:oe,setNodeRef:ge,listeners:ve,isDragging:U,over:Re,setActivatorNodeRef:Z,transform:he}=al({id:i,data:D,attributes:{...km,...n},disabled:w.draggable}),H=hi(A,ge),J=Boolean(j),_=J&&!g&&zn(f)&&zn(T),ae=!R&&U,Ce=ae&&_?he:null,se=c!=null?c:y,pt=_?Ce!=null?Ce:se({rects:h,activeNodeRect:q,activeIndex:f,overIndex:T,index:C}):null,O=zn(f)&&zn(T)?s({id:i,items:p,activeIndex:f,overIndex:T}):C,Se=j==null?void 0:j.id,W=aa({activeId:Se,items:p,newIndex:O,containerId:m}),Mr=p!==W.current.items,Xe=r({active:j,containerId:m,isDragging:U,isSorting:J,id:i,index:C,items:p,newIndex:W.current.newIndex,previousItems:W.current.items,previousContainerId:W.current.containerId,transition:u,wasDragging:W.current.activeId!=null}),qt=Lm({disabled:!Xe,index:C,node:L,rect:P});return Wn(()=>{if(J&&W.current.newIndex!==O)W.current.newIndex=O;if(m!==W.current.containerId)W.current.containerId=m;if(p!==W.current.items)W.current.items=p},[J,O,m,p]),Wn(()=>{if(Se===W.current.activeId)return;if(Se!=null&&W.current.activeId==null){W.current.activeId=Se;return}let er=setTimeout(()=>{W.current.activeId=Se},50);return()=>clearTimeout(er)},[Se]),{active:j,activeIndex:f,attributes:oe,data:D,rect:P,index:C,newIndex:O,items:p,isOver:F,isSorting:J,isDragging:U,listeners:ve,node:L,overIndex:T,over:Re,setNodeRef:H,setActivatorNodeRef:Z,setDroppableNodeRef:A,setDraggableNodeRef:ge,transform:qt!=null?qt:pt,transition:et()};function et(){if(qt||Mr&&W.current.newIndex===C)return Tm;if(ae&&!Gr(te)||!u)return;if(J||Xe)return Lt.Transition.toString({...u,property:fl});return}}function Dm(t,r){var n,o;if(typeof t==="boolean")return{draggable:t,droppable:!1};return{draggable:(n=t==null?void 0:t.draggable)!=null?n:r.draggable,droppable:(o=t==null?void 0:t.droppable)!=null?o:r.droppable}}function Xn(t){if(!t)return!1;let r=t.data.current;if(r&&"sortable"in r&&typeof r.sortable==="object"&&"containerId"in r.sortable&&"items"in r.sortable&&"index"in r.sortable)return!0;return!1}var Em=[V.Down,V.Right,V.Up,V.Left],bl=(t,r)=>{let{context:{active:n,collisionRect:o,droppableRects:a,droppableContainers:s,over:i,scrollableAncestors:c}}=r;if(Em.includes(t.code)){if(t.preventDefault(),!n||!o)return;let d=[];s.getEnabled().forEach((m)=>{if(!m||m!=null&&m.disabled)return;let f=a.get(m.id);if(!f)return;switch(t.code){case V.Down:if(o.top<f.top)d.push(m);break;case V.Up:if(o.top>f.top)d.push(m);break;case V.Left:if(o.left>f.left)d.push(m);break;case V.Right:if(o.left<f.left)d.push(m);break}});let u=Ji({active:n,collisionRect:o,droppableRects:a,droppableContainers:d,pointerCoordinates:null}),p=oa(u,"id");if(p===(i==null?void 0:i.id)&&u.length>1)p=u[1].id;if(p!=null){let m=s.get(n.id),f=s.get(p),b=f?a.get(f.id):null,g=f==null?void 0:f.node.current;if(g&&b&&m&&f){let T=Kr(g).some((N,P)=>c[P]!==N),R=vl(m,f),y=Mm(m,f),w=T||!R?{x:0,y:0}:{x:y?o.width-b.width:0,y:y?o.height-b.height:0},C={x:b.left,y:b.top};return w.x&&w.y?C:Gt(C,w)}}}return};function vl(t,r){if(!Xn(t)||!Xn(r))return!1;return t.data.current.sortable.containerId===r.data.current.sortable.containerId}function Mm(t,r){if(!Xn(t)||!Xn(r))return!1;if(!vl(t,r))return!1;return t.data.current.sortable.index<r.data.current.sortable.index}import{Fragment as Im}from"react";import{jsx as Mt,Fragment as Hm}from"react/jsx-runtime";var Am=({id:t,label:r,children:n})=>{let{attributes:o,listeners:a,setNodeRef:s,transform:i,transition:c,isDragging:d}=gl({id:t}),u={opacity:d?0.5:1,position:"relative",transform:Lt.Transform.toString(i),transition:c,zIndex:d?10:"auto"},p=Mt("button",{type:"button",className:"touch-none cursor-grab text-muted-foreground/40 hover:text-muted-foreground active:cursor-grabbing",...o,...a,title:r!==void 0&&r!==""?`Drag ${r} to reorder`:"Drag to reorder","aria-label":r!==void 0&&r!==""?`Drag ${r} to reorder`:"Drag handle",children:Mt(Ro,{className:"h-3.5 w-3.5"})});return Mt("div",{ref:s,style:u,children:n(p)})},Om=({items:t,onReorder:r,getItemLabel:n,renderItem:o,disabled:a=!1})=>{let s=Fi(na(qr,{activationConstraint:{distance:4}}),na(Yr,{coordinateGetter:bl})),i=(c)=>{let{active:d,over:u}=c;if(!u||d.id===u.id)return;let p=t.findIndex((f)=>f.id===d.id),m=t.findIndex((f)=>f.id===u.id);if(p===-1||m===-1)return;r(Un(t,p,m))};if(a)return t.map((c)=>Mt(Im,{children:o(c,null)},c.id));return Mt(ol,{sensors:s,collisionDetection:$i,onDragEnd:i,children:Mt(ml,{items:t.map((c)=>c.id),strategy:dl,children:t.map((c)=>Mt(Am,{id:c.id,label:n?.(c),children:(d)=>Mt(Hm,{children:o(c,d)})},c.id))})})},Vm=Om;import*as hl from"react";import{jsx as Zr,jsxs as sa}from"react/jsx-runtime";var xl=({open:t,onOpenChange:r,title:n,description:o,confirmLabel:a,cancelLabel:s="Cancel",confirmVariant:i="default",pendingLabel:c="Processing...",errorContent:d,keepOpenWhilePending:u=!1,onConfirm:p})=>{let[m,f]=hl.useState(!1),b=async()=>{f(!0);try{if(await p()!==!1)r(!1)}catch(g){throw f(!1),g}f(!1)};return Zr(nt,{open:t,onOpenChange:(g)=>{if(!(u&&m))r(g)},children:sa(at,{children:[sa(zt,{children:[Zr(st,{children:n}),Zr(rr,{children:o})]}),d,sa(Cs,{children:[Zr(l,{variant:"outline",onClick:()=>{r(!1)},disabled:m,children:s}),Zr(l,{variant:i,onClick:()=>{b()},disabled:m,children:m?c:a})]})]})})};xl.displayName="ConfirmDialog";var Bm=xl;import*as wl from"react";import{jsx as Kn,jsxs as yl}from"react/jsx-runtime";var Nl=wl.forwardRef(function({step:r,total:n,title:o,helper:a,action:s,className:i,...c},d){let u=Boolean(s);return yl("div",{ref:d,className:e("flex flex-wrap items-start justify-between gap-4",i),...c,children:[yl("div",{className:"min-w-0 space-y-1.5",children:[Kn(ir,{tone:"accent",className:"tracking-[0.16em]",children:`Step ${r} of ${n}`}),Kn("h2",{className:"text-lg font-semibold tracking-tight",children:o}),Kn("p",{className:"max-w-xl text-sm leading-relaxed text-muted-foreground",children:a})]}),u?Kn("div",{className:"shrink-0",children:s}):null]})});Nl.displayName="StageHeader";var Fm=Nl;import{jsx as It,jsxs as ia}from"react/jsx-runtime";var _m=x("flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border [&_svg]:h-[18px] [&_svg]:w-[18px]",{defaultVariants:{tone:"default"},variants:{tone:{accent:"border-[color-mix(in_oklab,var(--brand)_28%,var(--border))] bg-[color-mix(in_oklab,var(--brand)_10%,var(--card))] text-(--brand)",danger:"border-[color-mix(in_oklab,var(--danger)_30%,var(--border))] bg-[color-mix(in_oklab,var(--danger)_12%,var(--card))] text-(--danger)",default:"border-border bg-muted/40 text-(--text-muted)",success:"border-[color-mix(in_oklab,var(--success)_30%,var(--border))] bg-[color-mix(in_oklab,var(--success)_12%,var(--card))] text-(--success)",warning:"border-[color-mix(in_oklab,var(--warning)_30%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_12%,var(--card))] text-(--warning)"}}}),zm=x("shrink-0 [&_svg]:h-4 [&_svg]:w-4",{defaultVariants:{tone:"default"},variants:{tone:{accent:"text-(--brand)",danger:"text-(--danger)",default:"text-(--text-muted)",success:"text-(--success)",warning:"text-(--warning)"}}}),Zn=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==0&&t!==0n&&t!==""&&!Number.isNaN(t),Rl=({variant:t="tile",icon:r,label:n,value:o,detail:a,tone:s,className:i,...c})=>{if(t==="compact")return ia(dr,{className:e("gap-1 px-4 py-3.5",i),...c,children:[ia("span",{className:"flex items-center justify-between gap-2",children:[It("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-(--text-muted)",children:n}),Zn(r)?It("span",{className:e(zm({tone:s})),"aria-hidden":!0,children:r}):null]}),It("span",{className:"text-[22px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:o}),Zn(a)?It("span",{className:"text-xs text-(--text-muted)",children:a}):null]});return ia(dr,{className:e("flex flex-col items-center gap-2.5 px-4 py-5 text-center","transition-colors hover:border-[color-mix(in_oklab,var(--brand)_22%,var(--border))]",i),...c,children:[Zn(r)?It("span",{className:e(_m({tone:s})),"aria-hidden":!0,children:r}):null,It("span",{className:"text-[26px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:o}),It("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-(--text-muted)",children:n}),Zn(a)?It("span",{className:"text-xs text-(--text-muted)",children:a}):null]})};Rl.displayName="StatTile";var $m=Rl;import*as Sl from"react";import{jsx as Cl,jsxs as Wm}from"react/jsx-runtime";var Jm={danger:"border-[color-mix(in_oklab,var(--danger)_40%,var(--border))] bg-[color-mix(in_oklab,var(--danger)_8%,var(--card))] text-(--danger)",live:"border-[color-mix(in_oklab,var(--primary)_45%,var(--border))] bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))] text-primary",neutral:"border-border bg-card text-muted-foreground",success:"border-[color-mix(in_oklab,var(--success)_38%,var(--border))] bg-[color-mix(in_oklab,var(--success)_8%,var(--card))] text-(--success)",warning:"border-[color-mix(in_oklab,var(--warning)_42%,var(--border))] bg-[color-mix(in_oklab,var(--warning)_9%,var(--card))] text-(--warning)"},jm={danger:"danger",live:"primary",neutral:"neutral",success:"success",warning:"warning"},Gm=({tone:t,active:r=!1,label:n,className:o,children:a,...s},i)=>{let c="border-border bg-card text-muted-foreground";if(t)c=Jm[t];else if(r)c="border-[color-mix(in_oklab,var(--primary)_45%,var(--border))] bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))] text-primary";return Wm("div",{ref:i,className:e("inline-flex items-center gap-2 rounded-full border px-3 py-1 text-[10px] font-semibold uppercase tracking-[0.16em]",c,o),...s,children:[t?Cl(dn,{tone:jm[t],pulse:t==="live"}):Cl("span",{"aria-hidden":!0,className:e("h-1.5 w-1.5 rounded-full",r?"bg-primary shadow-[0_0_0_3px_color-mix(in_oklab,var(--primary)_22%,transparent)]":"bg-muted-foreground")}),a??n]})},Pl=Sl.forwardRef(Gm);Pl.displayName="StatusPill";var Xm=Pl;import*as eo from"react";import{jsx as Qn,jsxs as Ym}from"react/jsx-runtime";var Um=x("relative min-w-0",{defaultVariants:{size:"md",variant:"pill"},variants:{size:{md:"",sm:""},variant:{pill:"",plain:""}}}),Km=x("pl-9 [&::-webkit-search-cancel-button]:appearance-none",{defaultVariants:{size:"md",variant:"pill"},variants:{size:{md:"",sm:"h-8 text-[13px]"},variant:{pill:"rounded-full bg-(--bg-surface)",plain:"bg-(--bg-surface)"}}}),Tl=({value:t,defaultValue:r,onValueChange:n,clearLabel:o,variant:a,size:s,className:i,classes:c,...d})=>{let[u,p]=eo.useState(r??""),m=t!==void 0,f=m?t:u,b=eo.useRef(null),g=(h)=>{if(!m)p(h);n?.(h)};return Ym("div",{className:e(Um({size:s,variant:a}),c?.root,i),children:[Qn(gr,{"aria-hidden":!0,className:e("pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",c?.icon)}),Qn(M,{ref:b,type:"search",value:f,onChange:(h)=>{g(h.target.value)},className:e(Km({size:s,variant:a}),f!==void 0&&f!==""&&o!==void 0?"pr-9":void 0,c?.input),...d}),f!==void 0&&f!==""&&o!==void 0?Qn("button",{type:"button","aria-label":o,onClick:()=>{g(""),b.current?.focus()},className:e("absolute right-2.5 top-1/2 flex size-5 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-(--bg-surface-alt) hover:text-(--text-primary) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",c?.clear),children:Qn(B,{className:"h-3.5 w-3.5"})}):null]})};Tl.displayName="SearchField";var qm=Tl;import{createContext as Zm,useContext as kl,useMemo as Qm,useState as ef}from"react";import{createPortal as tf}from"react-dom";import{jsx as to,jsxs as sf}from"react/jsx-runtime";var la=Zm(null),rf=({children:t})=>{let[r,n]=ef(null),o=Qm(()=>({container:r,setContainer:n}),[r]);return to(la.Provider,{value:o,children:t})},Ll=({className:t})=>{let r=kl(la);return to("div",{ref:r?.setContainer,className:e("ml-auto flex items-center gap-2 empty:hidden",t)})},nf=({children:t})=>{let r=kl(la);if(r===null)return t;return r.container===null?null:tf(t,r.container)},of=({count:t})=>t===void 0?null:to("span",{className:"text-xs text-muted-foreground tabular-nums",children:t}),af=({children:t,className:r})=>sf("div",{className:e("flex flex-wrap items-center gap-3",r),children:[t,to(Ll,{})]});import{jsx as ro,jsxs as Dl}from"react/jsx-runtime";var El=({title:t,description:r,value:n,options:o,onValueChange:a,align:s="center",className:i,...c})=>Dl("section",{className:e("flex min-w-0 flex-col gap-3 sm:flex-row sm:justify-between",s==="center"?"sm:items-center":"sm:items-start",i),...c,children:[Dl("div",{className:"min-w-0",children:[ro("h3",{className:"truncate text-sm font-semibold",children:t}),r!==void 0&&r!==null&&r!==!1&&r!==""&&r!==0?ro("p",{className:"mt-1 text-sm text-muted-foreground",children:r}):null]}),ro("div",{className:"inline-flex shrink-0 rounded-md border border-border bg-background p-1 shadow-xs",children:o.map((d)=>ro(l,{type:"button",size:"sm",variant:d.value===n?"secondary":"ghost",disabled:d.disabled,className:e("h-8 rounded-sm px-3",d.value===n&&"bg-primary/10 text-primary hover:bg-primary/15"),"aria-label":d.ariaLabel,"aria-pressed":d.value===n,onClick:()=>{a(d.value)},children:d.label},d.value))})]});El.displayName="SectionSwitcher";import*as Ze from"react";import{jsx as Ge}from"react/jsx-runtime";var Ml=Ze.createContext({value:1}),ca=()=>Ze.useContext(Ml),lf=({value:t,defaultValue:r=1,indicators:n,className:o,...a})=>{let s=t??r,i=Ze.useMemo(()=>({indicators:n,value:s}),[s,n]);return Ge(Ml.Provider,{value:i,children:Ge("div",{"data-slot":"stepper",className:e("space-y-8",o),...a})})},cf=({className:t,...r})=>Ge("nav",{"data-slot":"stepper-nav","data-orientation":"horizontal",className:e("group/stepper-nav flex items-start justify-between gap-2",t),...r}),da=Ze.createContext({state:"inactive",step:1}),df=({step:t,loading:r,className:n,...o})=>{let{value:a}=ca(),s="inactive";if(r===!0)s="loading";else if(t<a)s="completed";else if(t===a)s="active";let i=Ze.useMemo(()=>({state:s,step:t}),[s,t]);return Ge(da.Provider,{value:i,children:Ge("div",{"data-slot":"stepper-item","data-state":s,"data-step":t,className:e("group/step relative flex-1 items-start",n),...o})})},uf=({className:t,...r})=>Ge("div",{"data-slot":"stepper-trigger",className:e("flex flex-col items-center gap-2.5",t),...r}),pf=({className:t,children:r,...n})=>{let{indicators:o}=ca(),{state:a}=Ze.useContext(da),s=o?.completed,i=o?.loading,c=r;if(a==="completed"&&Boolean(s))c=s;else if(a==="loading"&&Boolean(i))c=i;return Ge("div",{"data-slot":"stepper-indicator","data-state":a,className:e("flex size-7 shrink-0 items-center justify-center rounded-full border-2 text-xs font-semibold transition-colors",a==="completed"&&"border-primary bg-primary text-primary-foreground",a==="active"&&"border-primary bg-primary text-primary-foreground",a==="loading"&&"border-primary bg-primary text-primary-foreground",a==="inactive"&&"border-muted-foreground/30 bg-background text-muted-foreground",t),...n,children:c})},mf=({className:t,...r})=>{let{state:n}=Ze.useContext(da);return Ge("span",{"data-slot":"stepper-title","data-state":n,className:e("text-sm font-medium",(n==="completed"||n==="active")&&"text-foreground",n==="inactive"&&"text-muted-foreground",t),...r})},ff=({className:t,...r})=>Ge("div",{"data-slot":"stepper-separator",className:e("h-0.5 rounded-full bg-muted-foreground/30 transition-colors","group-data-[state=completed]/step:bg-primary",t),...r}),gf=({className:t,...r})=>Ge("div",{"data-slot":"stepper-panel",className:e(t),...r}),bf=({value:t,className:r,...n})=>{let{value:o}=ca();if(t!==o)return null;return Ge("div",{"data-slot":"stepper-content",className:e(r),...n})};import*as Ut from"react";import{jsx as Xt,jsxs as yf}from"react/jsx-runtime";var ua=Ut.createContext({}),vf=({className:t,size:r,variant:n,...o})=>{let a=Ut.useMemo(()=>({size:r,variant:n}),[r,n]);return Xt(ua.Provider,{value:a,children:Xt("fieldset",{"data-slot":"split-button",className:e("inline-flex min-w-0 items-stretch",t),...o})})},hf=({className:t,...r})=>{let{size:n,variant:o}=Ut.useContext(ua);return Xt(l,{"data-slot":"split-button-action",className:e("rounded-r-none",t),size:n,variant:o,...r})},xf=({align:t="end",children:r,contentClassName:n,disabled:o,label:a,...s})=>{let{size:i,variant:c}=Ut.useContext(ua);return yf(kt,{...s,children:[Xt(Et,{render:Xt(l,{"aria-label":a,"data-slot":"split-button-menu",className:"-ml-px rounded-l-none border-l border-l-current/20 px-2",size:i,variant:c}),disabled:o,children:Xt(E,{})}),Xt(vt,{align:t,className:n,children:r})]})};import*as kr from"react";import{jsx as We,jsxs as no}from"react/jsx-runtime";var wf=({items:t,title:r,triggerAriaLabel:n="Technical details",copyLabel:o="Copy",trigger:a,triggerNativeButton:s=!0,align:i="end",side:c="bottom",onCopy:d,className:u,classes:p})=>{let[m,f]=kr.useState(null),b=kr.useRef(null);kr.useEffect(()=>()=>{if(b.current!==null)window.clearTimeout(b.current)},[]);let g=(h)=>{if(navigator.clipboard.writeText(h.value),f(h.label),b.current!==null)window.clearTimeout(b.current);b.current=window.setTimeout(()=>{f(null)},1500),d?.(h)};return no(Be,{children:[a===void 0?We(Ae,{render:We(l,{variant:"ghost",size:"icon","aria-label":n,className:e("h-8 w-8 text-muted-foreground hover:text-foreground",p?.root,p?.trigger,u)}),children:We(as,{className:"h-4 w-4"})}):We(Ae,{render:a,nativeButton:s}),no(Ve,{align:i,side:c,className:e("w-80 p-3",p?.content),children:[r!==void 0&&r!==null?We("div",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:r}):null,We("dl",{className:"space-y-2.5",children:t.map((h)=>no("div",{className:e("min-w-0",p?.row),children:[We("dt",{className:e("text-[11px] font-medium text-muted-foreground",p?.label),children:h.label}),no("dd",{className:"mt-0.5 flex min-w-0 items-start gap-1",children:[We("code",{className:e("min-w-0 flex-1 select-all break-all rounded bg-muted/60 px-1.5 py-1 font-mono text-xs leading-relaxed text-foreground",p?.value),children:h.value}),h.copyable===!1?null:We(l,{type:"button",variant:"ghost",size:"icon","aria-label":`${o} ${h.label}`,className:"h-6 w-6 shrink-0 text-muted-foreground hover:text-foreground",onClick:()=>{g(h)},children:m===h.label?We(S,{className:"h-3.5 w-3.5"}):We(ot,{className:"h-3.5 w-3.5"})})]})]},h.label))})]})]})};var Nf=wf;import*as Lr from"react";import{jsx as ce,jsxs as ct,Fragment as Al}from"react/jsx-runtime";var Rf={disabled:!1,emptyMessage:"No option found.",loading:!1,loadingMessage:"Loading options...",modal:!1,placeholder:"Select option...",searchPlaceholder:"Search...",width:"200px"},Cf=1,Sf=0.5,Pf=(t)=>t.children!==void 0,Ol=(t)=>t.flatMap((r)=>{if(!r.children)return[r];let n=Ol(r.children);return n.length>0?[{...r,children:n}]:[]}),Hl=(t,r=[])=>t.flatMap((n)=>n.children?Hl(n.children,[...r,n]):[{ancestorIds:r.map((o)=>o.id),node:n,path:r.map((o)=>o.label).join(" / ")}]),Il=(t)=>({paddingLeft:`${Sf+t*Cf}rem`}),Vl=Lr.forwardRef(function(r,n){let o={...Rf,...r},{nodes:a,value:s,onChange:i,selectedLabel:c,placeholder:d,searchPlaceholder:u,emptyMessage:p,id:m,className:f,width:b,disabled:g,loading:h,loadingMessage:T,onSearchChange:R,modal:y}=o,[w,C]=Lr.useState(!1),[D,N]=Lr.useState(""),[P,L]=Lr.useState(()=>new Set),F=Ol(a),A=Hl(F),j=A.find((H)=>H.node.id===s),te=D.trim().toLowerCase(),q=(H)=>{if(H)L(new Set(j?.ancestorIds));else if(D!=="")N(""),R?.("");C(H)},oe=(H)=>{N(H),R?.(H)},ge=(H)=>{L((J)=>{let _=new Set(J);if(!_.delete(H))_.add(H);return _})},ve=(H)=>{i(H),q(!1)},U=(H)=>ct(Al,{children:[ce(S,{"aria-hidden":!0,className:e(s===H.id?"opacity-100":"opacity-0")}),H.icon]}),Re=(H,J)=>H.flatMap((_)=>{if(!Pf(_))return[ct(Ne,{value:_.id,style:Il(J),onSelect:()=>{ve(_.id)},children:[U(_),ce("span",{className:"min-w-0 truncate",title:_.label,children:_.label})]},_.id)];let ae=P.has(_.id),Ce=ae?rs:os;return[ct(Ne,{value:_.id,"aria-expanded":ae,style:Il(J),onSelect:()=>{ge(_.id)},children:[ce(k,{"aria-hidden":!0,className:e(ae&&"rotate-90")}),_.icon??ce(Ce,{"aria-hidden":!0}),ce("span",{className:"min-w-0 truncate",title:_.label,children:_.label})]},_.id),...ae&&_.children?Re(_.children,J+1):[]]}),Z=te===""?[]:A.filter((H)=>R!==void 0||`${H.path} / ${H.node.label}`.toLowerCase().includes(te)),he=j?.node.label??c;return ct(Be,{modal:y,open:w,onOpenChange:q,children:[ct(Ae,{ref:n,id:m,"aria-busy":h,disabled:g,render:ce(l,{variant:"outline",className:e("justify-between",f),style:{width:b}}),children:[he===void 0?ce("span",{className:"min-w-0 truncate text-muted-foreground",children:d}):ce("span",{className:"min-w-0 truncate",children:he}),h?ce(de,{"aria-hidden":!0,className:"ml-2 size-4 shrink-0 animate-spin text-muted-foreground"}):ce(pr,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]}),ce(Ve,{className:"w-(--anchor-width) p-0",children:ct(Pt,{shouldFilter:!1,children:[ce(Zt,{"aria-label":u,placeholder:u,value:D,onValueChange:oe}),ce(wt,{className:"max-h-[min(300px,calc(var(--available-height)-2.5rem))]",children:h?ct("div",{"aria-live":"polite",className:"flex items-center justify-center gap-2 px-3 py-6 text-sm text-muted-foreground",children:[ce(de,{"aria-hidden":!0,className:"size-4 animate-spin"}),T]}):ct(Al,{children:[ce(Jt,{children:p}),ce(rt,{children:te===""?Re(F,0):Z.map((H)=>ct(Ne,{value:H.node.id,onSelect:()=>{ve(H.node.id)},children:[U(H.node),ce("span",{className:"min-w-0 truncate",title:H.node.label,children:H.node.label}),H.path===""?null:ce("span",{className:"ml-auto min-w-0 shrink truncate pl-2 text-xs text-muted-foreground",title:H.path,children:H.path})]},H.node.id))})]})})]})})]})});Vl.displayName="TreeSelect";import*as Fl from"react";import{jsx as Bl,jsxs as kf}from"react/jsx-runtime";var Tf=({value:t,state:r="value",trailing:n,monospace:o=!0,className:a,...s},i)=>{let c=r==="secret";return kf("div",{ref:i,className:e("flex min-w-0 items-center gap-2",a),...s,children:[Bl("div",{className:e("flex min-w-0 flex-1 items-center border-b py-2",c?"border-[color-mix(in_oklab,var(--primary)_45%,var(--border))]":"border-border"),children:Bl("code",{className:e("block min-w-0 flex-1 overflow-x-auto whitespace-nowrap text-[13px] text-foreground",o?"font-mono":"font-sans"),children:t})}),n]})},_l=Fl.forwardRef(Tf);_l.displayName="ValueRow";var Lf=_l;import{forwardRef as zl,useCallback as Kt,useLayoutEffect as $l,useId as Df,useRef as Jl,useState as ye}from"react";import{jsx as v,jsxs as I,Fragment as Qr}from"react/jsx-runtime";var Ef=({mode:t,onModeChange:r,disabled:n})=>I("div",{role:"tablist","aria-label":"Value source",className:"relative inline-flex h-7 items-center rounded-full border border-border/70 bg-muted/40 p-0.5 text-[10px] font-medium tracking-[0.08em] uppercase shadow-inner",children:[v("span",{"aria-hidden":!0,className:e("absolute top-0.5 bottom-0.5 w-[calc(50%-2px)] rounded-full bg-background shadow-xs ring-1 ring-border/60 transition-transform duration-200 ease-out",t==="inline"&&"translate-x-[calc(100%+0px)]")}),I("button",{type:"button",role:"tab","aria-selected":t==="linked",disabled:n,onClick:()=>{r("linked")},className:e("relative z-10 flex items-center gap-1 rounded-full px-2.5 py-1 transition-colors",t==="linked"?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[v(Qo,{className:"h-3 w-3"}),"Linked"]}),I("button",{type:"button",role:"tab","aria-selected":t==="inline",disabled:n,onClick:()=>{r("inline")},className:e("relative z-10 flex items-center gap-1 rounded-full px-2.5 py-1 transition-colors",t==="inline"?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[v(vo,{className:"h-3 w-3"}),"Inline"]})]}),Mf=({variableKey:t,initialValue:r,isSecret:n,loading:o,saving:a,onSubmit:s,onCancel:i})=>{let[c,d]=ye(r),[u,p]=ye(!1),m=Jl(null);return $l(()=>{if(!o)m.current?.focus()},[o]),I("form",{role:"presentation",onSubmit:(f)=>{f.preventDefault(),s(c)},onKeyDown:(f)=>{if(f.key==="Escape")f.preventDefault(),i()},className:"space-y-3 p-3",children:[I("div",{className:"flex items-start justify-between gap-2",children:[I("div",{className:"min-w-0",children:[v("p",{className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground",children:"Editing linked variable"}),v("p",{className:"mt-0.5 truncate font-mono text-xs text-foreground",children:t})]}),v("button",{type:"button",onClick:i,"aria-label":"Close editor",className:"rounded p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:v(B,{className:"h-3.5 w-3.5"})})]}),I("div",{className:"space-y-1",children:[v(ue,{htmlFor:"linked-value",className:"text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground",children:n?"Secret value":"Value"}),I("div",{className:"relative",children:[v(M,{ref:m,id:"linked-value",type:u?"text":"password",value:c,onChange:(f)=>{d(f.target.value)},placeholder:o?"Loading current value…":"Enter value",disabled:o||a,className:"h-8 pr-8 font-mono text-xs",autoComplete:"off",spellCheck:!1}),v("button",{type:"button",onClick:()=>{p((f)=>!f)},"aria-label":u?"Hide value":"Reveal value",className:"absolute inset-y-0 right-1 my-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:u?v(Ar,{className:"h-3.5 w-3.5"}):v(Qt,{className:"h-3.5 w-3.5"})})]})]}),I("div",{className:"flex items-center justify-between gap-2 pt-1",children:[I("p",{className:"text-[10px] leading-relaxed text-muted-foreground",children:["Updates the linked secret. Other connectors using"," ",v("span",{className:"font-mono",children:t})," will pick it up on their next run."]}),v(l,{type:"submit",size:"sm",disabled:o||a,className:"h-7 px-3 text-xs",children:a?I(Qr,{children:[v(de,{className:"h-3 w-3 animate-spin"}),"Saving"]}):"Save"})]})]})},If=({suggestedName:t,onSubmit:r,onCancel:n})=>{let[o,a]=ye(t),[s,i]=ye(""),[c,d]=ye(!0),[u,p]=ye(!1),m=Jl(null);$l(()=>{m.current?.focus(),m.current?.select()},[]);let f=o.trim(),b=f.length>0;return I("form",{role:"presentation",onSubmit:(g)=>{if(g.preventDefault(),b)r({key:f,secret:c,value:s})},onClick:(g)=>{g.stopPropagation()},onKeyDown:(g)=>{if(g.key==="Escape")g.preventDefault(),g.stopPropagation(),n()},className:"flex flex-col",children:[I("div",{className:"flex items-center gap-2 border-b border-border/60 bg-muted/15 px-3 py-2",children:[v("button",{type:"button",onClick:n,"aria-label":"Back to picker",className:"-ml-1 flex h-5 w-5 shrink-0 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground",children:v(So,{className:"h-3.5 w-3.5"})}),v("span",{className:"flex-1 text-[10.5px] font-medium uppercase tracking-[0.12em] text-muted-foreground/80",children:"New variable"}),v(Ft,{className:"h-3 w-3 text-muted-foreground/60"})]}),I("div",{className:"space-y-2.5 px-3 py-2.5",children:[I("div",{className:"space-y-1",children:[v(ue,{htmlFor:"var-key",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Name"}),I("div",{className:"relative",children:[v("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-0 left-2.5 flex items-center text-muted-foreground/60",children:v(xo,{className:"h-3 w-3"})}),v(M,{ref:m,id:"var-key",value:o,onChange:(g)=>{a(g.target.value.toUpperCase())},placeholder:"VARIABLE_NAME",className:"h-8 pl-7 font-mono text-[12.5px] tracking-tight",autoComplete:"off",spellCheck:!1})]})]}),I("div",{className:"space-y-1",children:[v(ue,{htmlFor:"var-value",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Value"}),I("div",{className:"relative",children:[v(M,{id:"var-value",type:u?"text":"password",value:s,onChange:(g)=>{i(g.target.value)},placeholder:"Encrypted at rest",className:"h-8 pr-8 font-mono text-[12.5px]",autoComplete:"off",spellCheck:!1}),v("button",{type:"button",onClick:()=>{p((g)=>!g)},"aria-label":u?"Hide value":"Reveal value",className:"absolute inset-y-0 right-1 my-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground",children:u?v(Ar,{className:"h-3.5 w-3.5"}):v(Qt,{className:"h-3.5 w-3.5"})})]})]}),I("label",{className:"flex cursor-pointer items-center gap-2 select-none text-[11px] text-muted-foreground",children:[v("input",{type:"checkbox",checked:c,onChange:(g)=>{d(g.target.checked)},className:"h-3 w-3 accent-primary"}),I("span",{className:"flex items-center gap-1",children:[v(xo,{className:"h-3 w-3"}),"Mark as secret"]})]})]}),I("button",{type:"submit",disabled:!b,className:"group/save flex w-full items-center gap-2.5 border-t border-border/60 bg-gradient-to-r from-muted/30 to-muted/10 px-3 py-2.5 text-left text-xs transition-colors hover:from-muted/50 hover:to-muted/30 disabled:cursor-not-allowed disabled:opacity-50",children:[v("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/15",children:v(S,{className:"h-3 w-3"})}),I("span",{className:"flex min-w-0 flex-1 flex-col",children:[v("span",{className:"text-[12px] font-medium leading-tight",children:"Create variable"}),v("span",{className:"truncate text-[10px] leading-tight text-muted-foreground",children:b?I(Qr,{children:["Link this field to"," ",v("span",{className:"font-mono text-foreground/80",children:f})]}):"Enter a name to continue"})]}),v(fr,{className:"h-3.5 w-3.5 text-muted-foreground/60 transition-transform group-hover/save:translate-x-0.5 group-disabled/save:translate-x-0"})]})]})},jl=zl(function({selected:r,value:n,placeholder:o,className:a,...s},i){let c=Boolean(n),d=Boolean(r);return I("button",{ref:i,type:"button",...s,className:e("group/trigger relative flex h-9 w-full items-center gap-2 rounded-md border bg-background px-2.5 text-left text-sm shadow-xs transition-all outline-none","hover:border-ring/50","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:cursor-not-allowed disabled:opacity-50",c?"border-primary/20 bg-primary/[0.03]":"border-input",a),children:[v("span",{"aria-hidden":!0,className:e("flex h-5 w-5 shrink-0 items-center justify-center rounded-sm transition-colors",c?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:v(Qo,{className:"h-3 w-3"})}),c?I("span",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[v("span",{className:"truncate font-mono text-[12.5px] tracking-tight",children:n}),!d&&v("span",{title:"Not in your variables list",className:"rounded-sm border border-dashed border-muted-foreground/40 px-1 py-px text-[9px] uppercase tracking-wider text-muted-foreground",children:"Unresolved"})]}):v("span",{className:"flex-1 truncate text-muted-foreground",children:o}),v(pr,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/60 transition-colors group-hover/trigger:text-muted-foreground"})]})});jl.displayName="LinkedTrigger";var Af=({value:t,onChange:r,onBlur:n,placeholder:o,disabled:a,masked:s,inputId:i})=>{let[c,d]=ye(!1),u=s&&!c?"password":"text";return I("div",{className:e("group/inline relative flex h-9 w-full items-center rounded-md border border-input bg-background pl-2.5 pr-1 shadow-xs transition-all","focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]"),children:[v("span",{"aria-hidden":!0,className:"mr-2 flex h-5 w-5 shrink-0 items-center justify-center rounded-sm bg-muted text-muted-foreground",children:v(vo,{className:"h-3 w-3"})}),v("input",{id:i,type:u,value:t,onChange:(p)=>{r(p.target.value)},onBlur:n,placeholder:o,disabled:a,autoComplete:"off",spellCheck:!1,className:"flex-1 bg-transparent font-mono text-[12.5px] tracking-tight outline-none placeholder:font-sans placeholder:tracking-normal placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50"}),s&&v("button",{type:"button",onClick:()=>{d((p)=>!p)},"aria-label":c?"Hide value":"Reveal value",className:"flex h-7 w-7 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:c?v(Ar,{className:"h-3.5 w-3.5"}):v(Qt,{className:"h-3.5 w-3.5"})})]})},Of=({options:t,value:r,onSelect:n})=>I("div",{className:"px-1",children:[I("div",{className:"flex items-center justify-between px-2 pt-2 pb-1",children:[v("span",{className:"text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/80",children:"Linked variables"}),v("span",{className:"text-[10px] tabular-nums text-muted-foreground/60",children:t.length})]}),v(rt,{className:"!p-0 [&_[cmdk-group-heading]]:hidden",children:t.map((o)=>{let a=r===o.key;return I(Ne,{value:o.key,keywords:[o.key,o.description??""],onSelect:()=>{n(o.key)},className:e("group/row relative my-px cursor-pointer rounded-md px-2 py-1.5 transition-colors","data-[selected=true]:bg-muted/60 data-[selected=true]:text-foreground",a&&"bg-primary/[0.05]"),children:[a&&v("span",{"aria-hidden":!0,className:"absolute inset-y-1.5 left-0 w-[2px] rounded-r bg-primary"}),v("span",{"aria-hidden":!0,className:e("flex h-5 w-5 shrink-0 items-center justify-center rounded-sm transition-colors",a?"bg-primary/15 text-primary":"bg-muted/60 text-muted-foreground/70 group-hover/row:bg-muted"),children:v(xo,{className:"h-3 w-3"})}),I("div",{className:"flex min-w-0 flex-1 flex-col",children:[v("span",{className:e("truncate font-mono text-[12.5px] tracking-tight",a&&"text-primary"),children:o.key}),o.description!==void 0&&o.description!==""&&v("span",{className:"truncate text-[10.5px] leading-tight text-muted-foreground",children:o.description})]}),a?v(S,{className:"h-3.5 w-3.5 shrink-0 text-primary"}):v("span",{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 text-transparent transition-colors group-data-[selected=true]/row:text-muted-foreground/40",children:v(fr,{className:"h-3.5 w-3.5"})})]},o.key)})})]}),Hf=()=>I("div",{className:"space-y-1.5 px-2 py-3",children:[I("div",{className:"flex items-center justify-between px-1 pb-1",children:[v("span",{className:"text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/60",children:"Loading"}),v(de,{className:"h-3 w-3 animate-spin text-muted-foreground/60"})]}),[0.95,0.7,0.85].map((t,r)=>I("div",{className:"flex items-center gap-2 rounded-md px-2 py-1.5",style:{opacity:1-r*0.18},children:[v("div",{className:"h-5 w-5 shrink-0 animate-pulse rounded-sm bg-muted/70"}),v("div",{className:"h-3 animate-pulse rounded bg-muted/70",style:{width:`${t*100}%`}})]},r))]}),Vf=({query:t,canCreate:r,onCreate:n})=>{let o=t.trim();return I("div",{className:"flex flex-col items-center gap-2 px-4 py-7 text-center",children:[v("span",{"aria-hidden":!0,className:"flex h-9 w-9 items-center justify-center rounded-full bg-muted/60 text-muted-foreground/70",children:v(xo,{className:"h-4 w-4"})}),I("div",{className:"space-y-0.5",children:[v("p",{className:"text-[12px] font-medium text-foreground",children:o?I(Qr,{children:["No variables match"," ",I("span",{className:"font-mono text-foreground",children:['"',o,'"']})]}):"No variables yet"}),v("p",{className:"text-[10.5px] leading-snug text-muted-foreground",children:"Variables let you reuse secrets across connectors and rotate them in one place."})]}),r&&I(l,{type:"button",size:"sm",variant:"outline",onClick:n,className:"mt-1 h-7 text-[11px]",children:[v(Ft,{className:"h-3 w-3"}),o?`Create "${o.toUpperCase().replaceAll(/[^A-Z0-9_]/gu,"_")}"`:"Create variable"]})]})},Bf=({options:t,optionsLoading:r,optionsFetching:n,value:o,query:a,onQueryChange:s,onSelect:i,onCreate:c,suggestedName:d,showCreate:u,onShowCreate:p})=>{if(u&&c)return v(If,{suggestedName:d??a.trim(),onSubmit:(f)=>{c(f)},onCancel:()=>{p(!1)}});let m=v(Of,{options:t,value:o,onSelect:i});if(r)m=v(Hf,{});else if(t.length===0)m=v(Vf,{query:a,canCreate:Boolean(c),onCreate:()=>{p(!0)}});return I("div",{className:"flex flex-col",children:[I("div",{className:"relative flex items-center gap-2 border-b border-border/60 bg-muted/15 px-3 py-2",children:[v(gr,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/70"}),v("input",{autoFocus:!0,type:"text",value:a,onChange:(f)=>{s(f.target.value)},placeholder:"Search variables…",autoComplete:"off",spellCheck:!1,className:"flex-1 bg-transparent text-xs tracking-tight outline-none placeholder:text-muted-foreground/60"}),I("div",{className:"flex h-4 w-4 items-center justify-center",children:[n&&!r&&v(de,{className:"h-3 w-3 animate-spin text-muted-foreground/70"}),!n&&a&&v("button",{type:"button",onClick:()=>{s("")},"aria-label":"Clear search",className:"rounded p-0.5 text-muted-foreground/60 transition-colors hover:bg-muted hover:text-foreground",children:v(B,{className:"h-3 w-3"})})]})]}),v(Pt,{shouldFilter:!1,className:"rounded-none bg-transparent",loop:!0,children:v(wt,{className:"max-h-[280px] py-1",children:m})}),c&&I("button",{type:"button",onClick:()=>{p(!0)},className:"group/cta flex w-full items-center gap-2.5 border-t border-border/60 bg-gradient-to-r from-muted/30 to-muted/10 px-3 py-2.5 text-left text-xs transition-colors hover:from-muted/50 hover:to-muted/30",children:[v("span",{className:"flex h-6 w-6 items-center justify-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/15",children:v(Ft,{className:"h-3 w-3"})}),I("span",{className:"flex min-w-0 flex-1 flex-col",children:[v("span",{className:"text-[12px] font-medium leading-tight",children:"Create new variable"}),v("span",{className:"text-[10px] leading-tight text-muted-foreground",children:"Encrypted at rest · reusable across connectors"})]}),v(fr,{className:"h-3.5 w-3.5 text-muted-foreground/60 transition-transform group-hover/cta:translate-x-0.5"})]})]})},Ff=zl(function({value:r,mode:n,onChange:o,onBlur:a,options:s,optionsLoading:i,optionsFetching:c,onSearch:d,onCreate:u,onResolve:p,onUpdate:m,suggestedName:f,placeholder:b="Select variable…",disabled:g=!1,masked:h=!0,className:T},R){let[y,w]=ye(!1),[C,D]=ye(""),[N,P]=ye(!1),[L,F]=ye(!1),[A,j]=ye(null),[te,q]=ye(!1),[oe,ge]=ye(!1),[ve,U]=ye(null),Re=Df(),Z=Kt((O)=>{if(O===n)return;o("",O),P(!1),D("")},[n,o]),he=Kt((O)=>{o(O===r?"":O,"linked"),w(!1),P(!1)},[r,o]),H=Kt((O)=>{o(O,"inline")},[o]),J=Kt(async(O)=>{if(!u)return;let Se=await u(O);P(!1),w(!1),o(Se.key,"linked")},[u,o]),_=Kt(async()=>{if(!r||!p)return;F(!0),q(!0),U(null);try{let O=await p(r);j(O??{key:r,secret:!0,value:null})}catch(O){U(O instanceof Error?O.message:"Failed to load variable"),j({key:r,secret:!0,value:null})}q(!1)},[r,p]),ae=Kt(async(O)=>{if(!m||!r)return;ge(!0);try{await m({key:r,value:O}),F(!1)}catch(Se){throw ge(!1),Se}ge(!1)},[m,r]),Ce=Kt((O)=>{D(O),d?.(O)},[d]),se=s.find((O)=>O.key===r),pt=n==="linked"&&Boolean(r)&&Boolean(m);return I("div",{className:e("space-y-1.5",T),children:[I("div",{className:"flex items-center gap-1.5",children:[v("div",{className:"min-w-0 flex-1",children:n==="linked"?I(Be,{open:y,onOpenChange:(O)=>{if(w(O),!O)P(!1),a?.()},modal:!0,children:[v(Ae,{ref:R,disabled:g,render:v(jl,{selected:se,value:r,placeholder:b})}),v(Ve,{className:"w-(--anchor-width) min-w-[300px] overflow-hidden border-border/80 p-0 shadow-xl",side:"bottom",align:"start",sideOffset:6,children:v(Bf,{options:s,optionsLoading:Boolean(i),optionsFetching:Boolean(c),value:r,query:C,onQueryChange:Ce,onSelect:he,onCreate:u?J:void 0,suggestedName:f,showCreate:N,onShowCreate:P})})]}):v(Af,{inputId:Re,value:r,onChange:H,onBlur:()=>a?.(),placeholder:b||"Enter value",disabled:g,masked:h})}),pt&&I(Be,{open:L,onOpenChange:(O)=>{if(F(O),!O)j(null),U(null);else if(!A)_()},modal:!0,children:[v(Ae,{disabled:g,"aria-label":"Edit linked variable value",title:"Edit linked variable value",render:v(l,{variant:"outline",size:"icon",className:"h-9 w-9 shrink-0 border-input text-muted-foreground hover:text-foreground"}),children:v(vo,{className:"h-3.5 w-3.5"})}),I(Ve,{align:"end",side:"bottom",sideOffset:6,className:"w-80 p-0 shadow-lg",children:[ve!==null&&ve!==""&&v("div",{className:"border-b border-destructive/30 bg-destructive/5 px-3 py-2 text-[11px] text-destructive",children:ve}),v(Mf,{variableKey:r,initialValue:A?.value??"",isSecret:A?.secret??!0,loading:te,saving:oe,onSubmit:(O)=>{ae(O)},onCancel:()=>{F(!1)}},`${r}:${A?.value??""}`)]})]}),v(Ef,{mode:n,onModeChange:Z,disabled:g})]}),v("p",{className:"flex items-center gap-1.5 text-[10.5px] leading-tight text-muted-foreground/80",children:n==="linked"?I(Qr,{children:[v(Qo,{className:"h-3 w-3"}),v("span",{children:"Reads from an org variable. Rotate values in one place; every connector picks it up."})]}):I(Qr,{children:[v(vo,{className:"h-3 w-3"}),I("span",{children:["Stored inline on this connector. Use"," ",v("span",{className:"font-medium text-foreground/80",children:"Linked"})," ","to share across connectors."]})]})})]})});import{useMemo as _f}from"react";import{jsx as oo,jsxs as pa}from"react/jsx-runtime";var zf=(t)=>{let r="",n=0,o=" ",a=t.replaceAll(/>\s*</gu,`>
|
|
7
7
|
<`).split(`
|
|
8
|
-
`);for(let
|
|
9
|
-
`,
|
|
8
|
+
`);for(let s of a){let i=s.trim();if(!i)continue;if(i.startsWith("</"))n=Math.max(0,n-1);if(r+=`${o.repeat(n)+i}
|
|
9
|
+
`,i.startsWith("<")&&!i.startsWith("</")&&!i.startsWith("<?")&&!i.endsWith("/>")&&!/<\/[^>]+>$/u.test(i))n+=1}return r.trim()},$f=({open:t,onOpenChange:r,title:n="XML Viewer",data:o})=>{let a=_f(()=>zf(o??""),[o]);return oo(nt,{open:t,onOpenChange:r,children:pa(at,{className:"max-w-2xl max-h-[80vh] flex flex-col",children:[pa(zt,{className:"flex flex-row items-center justify-between gap-2",children:[oo(st,{children:n}),pa(l,{type:"button",variant:"outline",size:"sm",onClick:()=>{navigator.clipboard.writeText(a),yt.success("Copied to clipboard")},children:[oo(ot,{className:"h-3.5 w-3.5 mr-1"}),"Copy"]})]}),oo("pre",{className:"min-h-0 flex-1 overflow-auto rounded-md bg-muted p-4 text-xs font-mono whitespace-pre",children:a})]})})};import{jsx as Er,jsxs as ma}from"react/jsx-runtime";var Jf=({title:t,children:r,details:n,className:o,defaultOpen:a=!1,classes:s,...i})=>ma(mr,{variant:"destructive",className:e("border-destructive/25 bg-destructive/5","has-[>svg]:grid-cols-[1rem_minmax(0,1fr)]",s?.root,o),children:[Er(Co,{"aria-hidden":"true"}),t!==void 0&&t!==null&&Er(tn,{className:e("line-clamp-none min-w-0 break-words text-foreground",s?.title),children:t}),Er(hr,{className:e("min-w-0 break-words",s?.message),children:r}),n!==void 0&&ma(Y,{...i,defaultOpen:a,className:e("col-start-2 mt-3 min-w-0",s?.details),children:[ma(K,{type:"button",className:e("group inline-flex max-w-full items-center gap-1.5 rounded-sm text-left","text-xs font-medium text-foreground underline-offset-4 hover:underline","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",s?.trigger),children:[Er(E,{"aria-hidden":"true",className:"size-3.5 shrink-0 transition-transform group-data-panel-open:rotate-180 motion-reduce:transition-none"}),n.label]}),Er(Q,{children:Er("div",{className:e("mt-3 min-w-0 rounded-md border border-border bg-background/70 p-3 text-sm text-foreground",s?.content),children:n.content})})]})]});import{jsx as dt,jsxs as fa,Fragment as Xf}from"react/jsx-runtime";var Gl=(t)=>Math.max(0,Math.min(100,Math.round(t))),ga=(t)=>Gl(t.value??0),jf=(t)=>{if(t.length===0)return 0;return Gl(t.reduce((r,n)=>r+ga(n),0)/t.length)},Gf=({lane:t})=>{let r=t.fillClassName??"bg-primary";if(t.mode==="indeterminate")return fa(Xf,{children:[dt("div",{className:e("absolute inset-y-0 w-1/3 rounded-full motion-reduce:w-full motion-reduce:opacity-40",r),"data-slot":"lane-progress-indeterminate",style:{animation:"lane-progress-indeterminate 1.35s linear infinite"}}),dt("style",{children:`@keyframes lane-progress-indeterminate {
|
|
10
10
|
0% { transform: translateX(-120%); }
|
|
11
11
|
100% { transform: translateX(320%); }
|
|
12
12
|
}
|
|
@@ -17,8 +17,8 @@ import{Vo,St,Ve,Uo,Ho,zo,Go,$o,Gt,$t,Rt,Wo,qo,wt}from"../../index-064d20xp.js";i
|
|
|
17
17
|
transform: none;
|
|
18
18
|
width: 100%;
|
|
19
19
|
}
|
|
20
|
-
}`})]});return
|
|
20
|
+
}`})]});return dt("div",{className:e("h-full transition-all",r),style:{width:`${ga(t)}%`}})},Wf=({className:t,detail:r,label:n,lanes:o})=>{let a=o.some((i)=>i.mode==="indeterminate"),s=jf(o);return fa("div",{className:e("flex w-full min-w-0 max-w-full flex-col gap-1.5",t),children:[fa("div",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-baseline gap-3",children:[dt("span",{className:"truncate text-xs font-medium",title:n,children:n}),r!==null&&r!==void 0&&r!==""?dt("span",{className:"shrink-0 text-[11px] text-muted-foreground",title:r,children:r}):null]}),dt("progress",{"aria-label":n,className:"sr-only",max:100,value:a?void 0:s}),dt("div",{"aria-hidden":"true",className:"flex h-2 w-full gap-0.5","data-slot":"lane-progress",children:o.map((i,c)=>dt("div",{className:"relative min-w-0 flex-1 overflow-hidden rounded-full bg-muted","data-mode":i.mode??"determinate","data-slot":"lane-progress-lane","data-value":ga(i),children:dt(Gf,{lane:i})},c))})]})};import*as Wl from"react";import{jsx as G,jsxs as _e}from"react/jsx-runtime";var Yt=(t)=>Boolean(t)&&t!==0,Uf=({context:t})=>G("div",{className:"sr-only","data-slot":"lifecycle-status-card-status","aria-live":"polite",children:t.statusLabel}),Kf=({error:t})=>{let[r,n]=Wl.useState(!1);return _e(mr,{variant:t.tone==="destructive"?"destructive":"default","data-slot":"lifecycle-status-card-error",children:[G(Xo,{"aria-hidden":!0}),Yt(t.title)?G(tn,{children:t.title}):null,_e(hr,{children:[Yt(t.summary)?G("p",{children:t.summary}):null,Yt(t.detail)?_e("div",{className:"mt-2 space-y-2",children:[G(l,{"aria-expanded":r,onClick:()=>{n((o)=>!o)},size:"sm",type:"button",variant:"link",children:r?"Hide details":"Show details"}),r?G("p",{className:"whitespace-pre-wrap break-words rounded-md bg-muted/50 p-2 text-foreground",children:t.detail}):null]}):null]})]})},Yf=(t)=>Object.prototype.toString.call(t)==="[object Function]",ut=(t,r)=>Yf(t)?t(r):t,qf=(t)=>{let r;if(t?.mode!=="indeterminate"){if(t?.value!==void 0)({value:r}=t);else if(t?.completed!==void 0&&t.total!==void 0&&t.total>0)r=Math.round(t.completed/t.total*100)}return r},Zf=(t)=>{if(t==="danger")return"destructive";return t==="success"?"soft":"outline"},Qf=(t)=>{switch(t){case"success":return"border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900/60 dark:bg-emerald-950/30 dark:text-emerald-300";case"danger":return"border-destructive/25 bg-destructive/10 text-destructive";case"warning":return"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-300";case"muted":return"border-border bg-muted text-muted-foreground";case void 0:case"active":case"default":return"border-primary/20 bg-primary/10 text-primary";default:return"border-primary/20 bg-primary/10 text-primary"}},eg=(t)=>{switch(t){case"success":return"bg-emerald-500";case"danger":return"bg-destructive";case"warning":return"bg-amber-500";case"muted":return"bg-muted-foreground";case void 0:case"active":case"default":return"bg-primary";default:return"bg-primary"}},tg=({model:t})=>G("span",{className:e("flex size-9 items-center justify-center rounded-md border",Qf(t.tone)),children:G("span",{className:e("flex size-4 items-center justify-center",t.iconAnimated===!0&&"animate-spin"),"aria-hidden":!0,children:t.icon})}),rg=({model:t})=>{let{progress:r}=t,n=qf(r),o=r?.label??t.currentStep;if(!r&&!Yt(o))return null;return _e("div",{className:"space-y-2","data-slot":"lifecycle-status-card-progress",children:[_e("div",{className:"flex min-h-5 items-center justify-between gap-3 text-sm",children:[G("span",{className:"min-w-0 truncate text-muted-foreground",children:o??"Waiting for updates"}),r?.completed!==void 0&&r.total!==void 0?_e("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:[r.completed," of ",r.total]}):null]}),n===void 0?_e("div",{"aria-label":"Progress",className:"relative h-2 overflow-hidden rounded-full bg-primary/15","data-progress-mode":"indeterminate",children:[G("div",{className:"absolute inset-y-0 w-1/3 rounded-full bg-primary/45",style:{animation:"lifecycle-status-card-indeterminate 1.35s ease-in-out infinite"}}),G("style",{children:`@keyframes lifecycle-status-card-indeterminate {
|
|
21
21
|
0% { transform: translateX(-120%); }
|
|
22
22
|
55% { transform: translateX(150%); }
|
|
23
23
|
100% { transform: translateX(330%); }
|
|
24
|
-
}`})]}):
|
|
24
|
+
}`})]}):G(Eo,{"aria-label":"Progress","data-progress-mode":"determinate",value:n})]})},ng=({milestones:t})=>{if(t===void 0||t.length===0)return null;return G("ol",{className:"space-y-3","data-slot":"lifecycle-status-card-milestones",children:t.map((r)=>_e("li",{className:"grid grid-cols-[auto_1fr] gap-3",children:[G("span",{"aria-hidden":!0,className:e("mt-1.5 size-2 rounded-full",eg(r.tone))}),_e("div",{className:"min-w-0",children:[G("div",{className:"text-sm font-medium leading-5 text-foreground",children:r.label}),Yt(r.description)?G("div",{className:"text-sm leading-5 text-muted-foreground",children:r.description}):null]})]},r.id))})},og=({context:t,slots:r})=>_e("div",{className:"grid grid-cols-[auto_1fr] gap-3 sm:grid-cols-[auto_1fr_auto]",children:[G("div",{className:"pt-0.5",children:ut(r?.icon,t)??G(tg,{model:t.model})}),_e("div",{className:"min-w-0 space-y-1",children:[G("h3",{className:"text-[15px] font-semibold leading-6 text-foreground",children:ut(r?.title,t)??t.title}),G("div",{className:"text-sm leading-6 text-muted-foreground",children:ut(r?.description,t)??t.description})]}),G(ke,{className:"col-start-2 w-fit sm:col-start-auto",variant:Zf(t.model.tone),children:t.statusLabel})]}),ag=({model:t,slots:r,className:n,...o})=>{let a={description:t.description,model:t,statusLabel:t.statusLabel,title:t.title},s=ut(r?.actions,a),i=ut(r?.completedState,a)??t.completedState,c=G(dr,{className:e("w-full gap-0 overflow-hidden py-0",n),"data-status-tone":t.tone??"default",...o,children:_e(ls,{className:"space-y-5 p-5 sm:p-6",children:[G(Uf,{context:a}),ut(r?.header,a)??G(og,{context:a,slots:r}),ut(r?.progressBody,a)??G(rg,{model:t}),ut(r?.milestoneList,a)??G(ng,{milestones:t.milestones}),Yt(i)?G("div",{"data-slot":"lifecycle-status-card-completed",children:i}):null,t.error?ut(r?.errorPanel,a)??G(Kf,{error:t.error}):null,Yt(s)?G("div",{className:"flex min-h-9 flex-wrap items-center gap-2 border-t border-border pt-4","data-slot":"lifecycle-status-card-actions",children:s}):null]})});return r?.shell?r.shell({...a,children:c}):c};import*as Ul from"react";import{jsx as Xl}from"react/jsx-runtime";var sg=({rows:t=5,rowClassName:r,className:n,...o},a)=>Xl("div",{ref:a,"aria-label":"Loading",className:e("flex flex-col gap-2",n),...o,children:Array.from({length:t}).map((s,i)=>Xl(yo,{className:e("h-10 w-full",r)},i))}),Kl=Ul.forwardRef(sg);Kl.displayName="SkeletonRows";var ig=Kl;import*as ql from"react";import{jsx as nn,jsxs as Yl}from"react/jsx-runtime";var Zl=ql.forwardRef(function({icon:r,illustration:n,title:o,description:a,action:s,secondaryAction:i,size:c="md",variant:d="bare",className:u,...p},m){let f=c==="sm",b=Boolean(n),g=!f&&!b,h=r??nn(ns,{className:"h-6 w-6"}),T=Boolean(a),R=Boolean(s)||Boolean(i),y=null;if(b)y=nn("div",{className:e("flex items-center justify-center","[&_svg]:w-auto",f?"mb-3 [&_svg]:h-16":"mb-5 [&_svg]:h-24"),children:n});else if(g)y=nn("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-md bg-(--bg-accent-soft) text-(--brand)",children:h});return Yl("div",{ref:m,"data-slot":"empty-state","data-size":c,"data-variant":d,className:e("mx-auto flex w-full max-w-130 flex-col items-center justify-center rounded-lg px-6 text-center",d==="framed"&&"border border-dashed border-(--border-default)",f?"py-8":"px-8 py-14",u),...p,children:[y,nn("h3",{className:e("font-semibold text-(--text-primary)",f?"text-[14px]":"text-[15px]"),children:o}),T?nn("p",{className:e("mt-1 max-w-sm leading-relaxed text-(--text-secondary)",f?"text-[12px]":"text-[13px]"),children:a}):null,R?Yl("div",{className:e("flex flex-wrap items-center justify-center gap-2",f?"mt-4":"mt-5"),children:[s,i]}):null]})});Zl.displayName="EmptyState";var lg=Zl;import*as Ql from"react";import{jsx as Qe,jsxs as on,Fragment as dg}from"react/jsx-runtime";var cg=(t)=>Object.prototype.toString.call(t)==="[object String]",ec=Ql.forwardRef(function({title:r="Something went wrong",message:n,detail:o,detailLabel:a="Show technical details",detailHeading:s="Inner error detail",defaultOpen:i=!1,className:c,...d},u){let p=Boolean(o);return Qe(Y,{ref:u,defaultOpen:i&&p,"data-slot":"technical-error-disclosure",className:e("rounded-md border border-destructive/25 bg-destructive/[0.035] p-4 text-sm","shadow-[inset_0_1px_0_rgba(255,255,255,0.48)]",c),...d,children:on("div",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-3",children:[Qe("span",{className:"mt-0.5 flex size-7 items-center justify-center rounded-md bg-destructive/10 text-destructive",children:Qe(Xo,{className:"size-4","aria-hidden":"true"})}),on("div",{className:"min-w-0",children:[Qe("div",{className:"font-semibold text-foreground",children:r}),Qe("div",{className:"mt-1 leading-6 text-muted-foreground",children:n}),p?on(dg,{children:[on(K,{className:e("group mt-3 inline-flex items-center gap-1.5 rounded-md","text-xs font-medium text-destructive underline-offset-4","transition-[color,transform] hover:underline","focus-visible:outline-none focus-visible:ring-2","focus-visible:ring-ring focus-visible:ring-offset-2","active:translate-y-px"),children:[Qe(E,{className:"size-3.5 transition-transform group-data-panel-open:rotate-180","aria-hidden":"true"}),a]}),Qe(Q,{children:on("div",{className:"mt-3 rounded-md border border-destructive/15 bg-background/70 p-3",children:[Qe("div",{className:"mb-2 text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground",children:s}),cg(o)?Qe("pre",{className:"max-h-52 overflow-auto whitespace-pre-wrap break-words font-mono text-xs leading-5 text-foreground",children:o}):Qe("div",{className:"text-xs leading-5 text-foreground",children:o})]})})]}):null]})]})})});ec.displayName="TechnicalErrorDisclosure";var ug=ec;import{jsx as ba,jsxs as mg}from"react/jsx-runtime";var pg=({icon:t,title:r="Loading...",className:n,spinnerSize:o=30})=>mg("div",{className:e("min-h-screen flex flex-col items-center justify-center gap-6 bg-background",n),children:[t!==void 0&&t!==null&&t!==!1&&t!==""&&t!==0&&ba("div",{children:t}),ba("h1",{className:"text-2xl font-semibold text-center",children:r}),ba(Dr,{size:o})]}),fg=pg;import{jsx as ao,jsxs as bg}from"react/jsx-runtime";var gg=({children:t,className:r,classes:n,loading:o=!1,coverImage:a})=>ao("div",{className:e("min-h-screen flex items-center justify-center",n?.root,r),children:bg("div",{className:e("flex flex-col md:flex-row w-full min-h-[100vh] max-h-[100vh] overflow-hidden",n?.content),children:[ao("div",{className:e("hidden md:flex flex-1 items-center justify-center overflow-hidden bg-black",n?.left),children:a}),ao("div",{className:e("flex-1 flex flex-col items-center justify-center gap-4 bg-background p-6 md:p-8",n?.right),children:o?ao(Dr,{size:48}):t})]})}),vg=gg;export{pc as ActionButton,gc as AddItemButton,fg as AppLoadingLayout,Td as ArrayInput,yn as CardOption,Hs as CardOptionsBlock,qd as CheckboxCardOption,Kd as ChoiceCard,Ud as ChoiceCardGroup,Sc as CollectiveIntelligenceLoader,Qd as CommandStep,Bm as ConfirmDialog,Rc as CopyButton,Gd as CoverImage,zd as CronBuilder,ru as CurrencyInput,xc as DateInput,Nc as DisplayHeading,lg as EmptyState,Jf as ErrorAlert,kc as ErrorMessage,nu as FieldRow,uu as FileDropArea,fu as FilterChips,hu as FlowBand,wu as FlowBranch,xu as FlowStep,ld as FormFrame,Ec as FormattedNumber,ud as Grid,Su as GuideStep,ku as HierarchyTree,ri as HierarchyTreeBody,ti as HierarchyTreeHeader,ni as HierarchyTreeRow,oi as HierarchyTreeToggle,Oc as IconTile,Fo as JsonViewer,Gu as JsonViewerDialog,Fc as Kicker,zs as LabeledField,Wf as LaneProgress,ag as LifecycleStatusCard,Xu as LinkedItem,Ju as MarkdownEditorPreview,ai as MarkdownEditorPreviewToggle,Ku as MaskedValue,qu as MutedPlaceholder,rp as ObjectSchemaExplorer,gd as PageRoot,hd as PageTitle,Yd as RadioCardOption,Vs as RadioCardOptionsBlock,Yc as Ring,qm as SearchField,xd as SectionHeader,El as SectionSwitcher,Xc as SerifNumeral,Jc as ShowMoreTag,ig as SkeletonRows,Vm as SortableList,vg as SplashScreenLayout,vf as SplitButton,hf as SplitButtonAction,xf as SplitButtonMenu,Fm as StageHeader,$m as StatTile,ed as StatusDot,Xm as StatusPill,lf as Stepper,bf as StepperContent,pf as StepperIndicator,df as StepperItem,cf as StepperNav,gf as StepperPanel,ff as StepperSeparator,mf as StepperTitle,uf as StepperTrigger,Xd as SummaryItem,Wd as SummaryList,nf as TabActions,af as TabActionsRow,rf as TabActionsScope,Ll as TabActionsSlot,of as TabCount,Nd as TableHead,Nf as TechnicalDetailsPopover,ug as TechnicalErrorDisclosure,Ss as ThemeToggle,vn as TimezonePicker,nd as TooltipBadge,Vl as TreeSelect,un as Typography,Lf as ValueRow,Ff as VariableReferenceField,$f as XmlViewerDialog,Rt as buildCron,Oe as defaultSimpleState,gn as describeCron,Da as displayHeadingVariants,ho as getTimezoneOptions,bo as isValidCron,_r as parseCron,en as useIsMobile};
|