@collective-intelligence/ui-react 0.5.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/chat.js +1 -1
- package/dist/components/ai-elements/index.js +1 -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.js +4 -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.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-05ch8g3p.js +2 -0
- package/dist/{index-qbwndfn2.js → index-1amahhaz.js} +2 -2
- package/dist/index-2136bczj.js +2 -0
- package/dist/{index-m0v264jr.js → index-4r9c455p.js} +2 -2
- package/dist/index-4vk89see.js +2 -0
- package/dist/index-4xymfb7h.js +2 -0
- package/dist/index-50pv1cer.js +2 -0
- package/dist/{index-vx2b9cz3.js → index-5x3deeat.js} +2 -2
- package/dist/{index-fnk7gsdd.js → index-6aftpcjv.js} +2 -2
- package/dist/index-74qkvrg9.js +2 -0
- package/dist/{index-1hxjsnw5.js → index-79sav2qr.js} +2 -2
- package/dist/index-ar540v2r.js +2 -0
- package/dist/{index-ecvn2gnv.js → index-bpnj24pg.js} +1 -1
- package/dist/index-d6srr7et.js +2 -0
- package/dist/{index-2yf6mq9g.js → index-dea72se6.js} +2 -2
- package/dist/index-drbb68sv.js +2 -0
- package/dist/{index-rjemhrz1.js → index-e503pv3f.js} +2 -2
- package/dist/index-eccj25rh.js +2 -0
- package/dist/{index-7j277075.js → index-em3kg0cy.js} +1 -1
- package/dist/index-eyr85r2d.js +2 -0
- package/dist/index-f22spsh5.js +2 -0
- package/dist/index-h7m6anb3.js +7 -0
- package/dist/index-hmd0rx9g.js +2 -0
- package/dist/index-hqx38rgx.js +0 -0
- package/dist/index-j136rmty.js +1 -0
- package/dist/index-k1f6eehk.js +2 -0
- package/dist/{index-zmwpsfzp.js → index-m7gvtt3h.js} +2 -2
- package/dist/index-ncrdjrq1.js +2 -0
- package/dist/index-ndjegtyf.js +2 -0
- package/dist/{index-4cds99c5.js → index-q5rfnpnm.js} +2 -2
- package/dist/{index-9289ppfk.js → index-r2keb0zb.js} +2 -2
- package/dist/index-ra03yvht.js +2 -0
- package/dist/index-rqqztw4a.js +42 -0
- package/dist/index-s3nshy6x.js +2 -0
- package/dist/{index-6r0znbzv.js → index-xmk5as68.js} +2 -2
- package/dist/index-xqct5yan.js +2 -0
- package/dist/{index-9gtg7nt7.js → index-yp7dwqdt.js} +2 -2
- package/dist/index-yqjasa46.js +2 -0
- package/dist/index-z6vdzwb1.js +2 -0
- package/dist/{index-0gzm7bb9.js → index-z9tsk9ev.js} +2 -2
- package/dist/{index-064d20xp.js → index-zwm9cyre.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/resources.js +1 -1
- package/dist/tokens/theme.js +1 -1
- package/dist/utils/cn.js +1 -1
- package/package.json +8 -2
- package/dist/index-2twj52t7.js +0 -2
- package/dist/index-64r6cav3.js +0 -1
- 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-ggr2edm8.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
|
@@ -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{Po,Ct,Ve,Io,Lo,To,Eo,Mo,zt,Gt,St,Ao,Do,Rt}from"../../index-zwm9cyre.js";import"../../index-xqct5yan.js";import{n}from"../../index-rqqztw4a.js";import"../../index-j136rmty.js";import{N,_,U,Qt,O,Q,g}from"../../index-yqjasa46.js";import{lr,cr,dr,No,Xe,ur,ge,Qe,fr,Pt,pr,He,ve,q,j,K,Br,Oo,Fo,Bo,Vo,Ho,Uo,Wt,mr,hr,gr,Go,$o,Hr,Ur,qo,jo}from"../../index-h7m6anb3.js";import{Fr,wt,wa}from"../../index-6aftpcjv.js";import"../../index-ar540v2r.js";import"../../index-4xymfb7h.js";import{Zt,Jt,er}from"../../index-05ch8g3p.js";import{Zo}from"../../index-z6vdzwb1.js";import{L}from"../../index-74qkvrg9.js";import{Ie,Le,Te}from"../../index-50pv1cer.js";import{P}from"../../index-drbb68sv.js";import{Y,Gr,$r,Wr,Yt,Xt}from"../../index-ncrdjrq1.js";import{vr}from"../../index-r2keb0zb.js";import{aa}from"../../index-ndjegtyf.js";import{H,he,$t,kt,Ye}from"../../index-dea72se6.js";import{qt,jt,Ze,Je,ae,Kt,et}from"../../index-79sav2qr.js";import{b}from"../../index-bpnj24pg.js";import{I}from"../../index-hmd0rx9g.js";import{v}from"../../index-4vk89see.js";import"../../index-yp7dwqdt.js";import{y,C}from"../../index-em3kg0cy.js";import"../../index-z9tsk9ev.js";import{i}from"../../index-eccj25rh.js";import{e}from"../../index-1amahhaz.js";import{jsx as oc,jsxs as ac}from"react/jsx-runtime";var nc=({children:t,loading:r=!1,fullWidth:o=!1,className:a,disabled:s,variant:l,size:c,...d})=>ac(n,{variant:l,size:c,className:e(o&&"w-full",a),disabled:s===!0||r,...d,children:[r&&oc(Rt,{size:20,className:"mr-2"}),t]}),sc=nc;import*as Wa from"react";import{jsx as Ga,jsxs as lc}from"react/jsx-runtime";var ic=({children:t,className:r,type:o="button",...a},s)=>lc(n,{ref:s,type:o,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),...a,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(St,{className:"size-3.5"})}),t]}),En=Wa.forwardRef(ic);En.displayName="AddItemButton";var cc=En;import{forwardRef as dc}from"react";import{jsx as pc}from"react/jsx-runtime";var Xa=(t,r,o)=>{if(r<1||r>12||o<1||o>31)return!1;let a=new Date(t,r-1,o);return a.getFullYear()===t&&a.getMonth()===r-1&&a.getDate()===o},uc=(t)=>{let r=t.trim();if(!r)return null;let o=/^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u.exec(r);if(o){let{year:s,month:l,day:c}=o.groups??{};return Xa(Number(s),Number(l),Number(c))?`${s}-${l}-${c}`:null}let a=/^(?<day>\d{1,2})[/\-.](?<month>\d{1,2})[/\-.](?<year>\d{4})$/u.exec(r);if(a){let{day:s,month:l,year:c}=a.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=dc(function({onPaste:r,...o},a){return pc(g,{ref:a,type:"date",onPaste:(l)=>{let c=l.clipboardData.getData("text"),d=uc(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)},...o})});Ua.displayName="DateInput";var mc=Ua;import*as Ka from"react";import{jsx as gc}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]"}}}),fc=({as:t="h2",size:r,className:o,...a},s)=>gc(t,{ref:s,className:e(Ya({size:r}),o),...a}),qa=Ka.forwardRef(fc);qa.displayName="DisplayHeading";var bc=qa;import*as Vt from"react";import{jsx as Ir,jsxs as Qa,Fragment as Za}from"react/jsx-runtime";var Mn=Vt.forwardRef(function({value:r,label:o,variant:a="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]=Vt.useState(!1),x=Vt.useRef(null);Vt.useEffect(()=>()=>{if(x.current!==null)clearTimeout(x.current)},[]);let S=async(V)=>{p?.(V);try{if(await navigator.clipboard.writeText(r),R(!0),x.current!==null)clearTimeout(x.current);x.current=setTimeout(()=>{R(!1)},d)}catch{ge.error(c)}};if(a==="button")return Ir(n,{ref:f,type:"button",variant:"outline",onClick:(V)=>{S(V)},"aria-label":`Copy ${o}`,className:e("shrink-0",u),...m,children:h?Qa(Za,{children:[Ir(y,{className:"mr-1 size-4"}),l]}):Qa(Za,{children:[Ir(ae,{className:"mr-1 size-4"}),s]})});return Ir("button",{ref:f,type:"button",onClick:(V)=>{S(V)},"aria-label":`Copy ${o}`,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?Ir(y,{className:"size-3.5 text-primary"}):Ir(ae,{className:"size-3.5"})})});Mn.displayName="CopyButton";var vc=Mn;import{jsx as Jo,jsxs as hc}from"react/jsx-runtime";var es="#a3d54a",ts=({className:t,...r})=>hc("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 xc=ts;import{jsx as wc}from"react/jsx-runtime";var yc=({children:t,className:r})=>wc("div",{className:e("text-destructive text-sm text-center",r),children:t}),Nc=yc;import*as rs from"react";import{jsx as Cc}from"react/jsx-runtime";var Rc=({value:t,fallback:r="—",locale:o,className:a,...s},l)=>Cc("span",{ref:l,className:e("tabular-nums",a),...s,children:t===null||t===void 0?r:new Intl.NumberFormat(o).format(t)}),ns=rs.forwardRef(Rc);ns.displayName="FormattedNumber";var Sc=ns;import*as os from"react";import{jsx as kc}from"react/jsx-runtime";var Pc={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))]"},Tc={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:o="md",initial:a,className:s,children:l,...c},d){return kc("span",{ref:d,"aria-hidden":!0,className:e("inline-flex shrink-0 select-none items-center justify-center border font-display font-bold",Tc[o],Pc[r],s),...c,children:l??(a!==void 0&&a!==""?a.slice(0,2).toUpperCase():null)})});as.displayName="IconTile";var Lc=as;import*as ss from"react";import{jsx as Mc}from"react/jsx-runtime";var Dc={accent:"text-(--accent)",copper:"text-(--text-muted)",default:"text-(--text-muted)",muted:"text-(--text-muted)"},Ec=({as:t="span",tone:r="default",className:o,...a},s)=>Mc(t,{ref:s,className:e("inline-block text-[11px] font-semibold uppercase tracking-[0.06em]",Dc[r],o),...a}),Ar=ss.forwardRef(Ec);Ar.displayName="Kicker";var Ic=Ar;import*as is from"react";import{jsx as Hc}from"react/jsx-runtime";var Ac=(t)=>`+${t}`,Oc=({expanded:t,hiddenCount:r,collapsedLabel:o=Ac,expandedLabel:a="Show less",onToggle:s,className:l,...c},d)=>Hc("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?a:o(r)}),ls=is.forwardRef(Oc);ls.displayName="ShowMoreTag";var Vc=ls;import*as cs from"react";import{jsx as _c}from"react/jsx-runtime";var Bc=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]"}}}),Fc=({size:t,className:r,...o},a)=>_c("span",{ref:a,className:e(Bc({size:t}),r),...o}),Or=cs.forwardRef(Fc);Or.displayName="SerifNumeral";var zc=Or;import*as ps from"react";import{jsx as us,jsxs as ds}from"react/jsx-runtime";var $c={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))]"},jc=({tooltip:t,tone:r="neutral",icon:o,className:a,children:s,...l},c)=>ds(mr,{children:[us(hr,{asChild:!0,children:ds(L,{ref:c,variant:"outline",className:e($c[r],a),...l,children:[o,s]})}),us(gr,{children:t})]}),ms=ps.forwardRef(jc);ms.displayName="TooltipBadge";var Jc=ms;import*as fs from"react";import{jsx as Wc}from"react/jsx-runtime";var Gc={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"}},In=fs.forwardRef(function({variant:r="body1",as:o,className:a,...s},l){let{tag:c,className:d}=Gc[r];return Wc(o??c,{ref:l,className:e(d,a),...s})});In.displayName="Typography";import{jsx as Uc}from"react/jsx-runtime";var Xc=({children:t,as:r="form",className:o,onSubmit:a,...s})=>{let l=(c)=>{c.preventDefault(),a?.(c)};return Uc(r,{className:e("flex flex-col gap-4 min-w-[300px]",o),onSubmit:l,...s,children:t})},Kc=Xc;import{jsx as Qc}from"react/jsx-runtime";var gs={},Vr=(...t)=>{for(let r of t)if(r!==void 0)return r;return 1},Yc=(t=gs)=>({"--list-cols":Vr(t.cols),"--list-cols-2xl":Vr(t.cols2xl,t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-lg":Vr(t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-md":Vr(t.colsMd,t.colsSm,t.cols),"--list-cols-sm":Vr(t.colsSm,t.cols),"--list-cols-xl":Vr(t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols)}),qc=["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(" "),Zc=({cols:t=gs,children:r,...o})=>Qc("div",{className:qc,style:Yc(t),...o,children:r});import{jsx as td}from"react/jsx-runtime";var ed=({className:t,spaced:r=!1,...o})=>td("div",{className:e("animate-[rise-in_500ms_cubic-bezier(0.16,1,0.3,1)_both]",r&&"space-y-6",t),...o});var rd=ed;import{jsx as pn,jsxs as _r}from"react/jsx-runtime";var nd=(t)=>t!==null&&t!==void 0&&t.constructor===String,un=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==""&&t!==0,od=({title:t,description:r,icon:o,kicker:a,status:s,actions:l,className:c})=>_r("header",{className:e("space-y-2",c),children:[un(a)?_r("div",{className:"flex items-center gap-2 text-(--text-muted) [&_svg]:h-3.5 [&_svg]:w-3.5",children:[un(o)?pn("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-sm bg-(--bg-accent-soft) text-(--accent)",children:o}):null,pn("span",{className:"text-[12px] font-medium tracking-tight [&_span.sep]:mx-1.5 [&_span.sep]:text-(--accent)",children:nd(a)?a.split("·").map((d,u,p)=>_r("span",{children:[d.trim(),u<p.length-1?pn("span",{className:"sep","aria-hidden":!0,children:"·"}):null]},u)):a})]}):null,_r("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[_r("div",{className:"min-w-0 flex-1 basis-64 space-y-1.5",children:[pn("h1",{className:"font-display text-[27px] font-bold leading-tight tracking-[-0.02em] text-(--text-primary)",children:t}),un(r)?pn("p",{className:"max-w-2xl text-[14px] leading-relaxed text-(--text-secondary)",children:r}):null]}),un(l)||un(s)?_r("div",{className:"flex shrink-0 items-center gap-2 pt-1",children:[s,l]}):null]})]}),ad=od;import*as vs from"react";import{jsx as An,jsxs as bs}from"react/jsx-runtime";var Wo=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),hs=vs.forwardRef(function({icon:r,title:o,description:a,action:s,className:l,...c},d){return bs("div",{ref:d,className:e("flex items-start gap-3",l),...c,children:[Wo(r)?An("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:[An("h3",{className:"text-[15px] font-semibold leading-snug text-foreground",children:o}),Wo(a)?An("p",{className:"mt-0.5 text-sm leading-relaxed text-muted-foreground",children:a}):null]}),Wo(s)?An("div",{className:"shrink-0",children:s}):null]})});hs.displayName="SectionHeader";var sd=hs;import{jsx as xs,jsxs as ld}from"react/jsx-runtime";var id=({title:t,toolbar:r})=>ld("div",{className:"flex items-center justify-between mb-12",children:[xs(In,{variant:"h2",children:t}),Boolean(r)&&xs("div",{className:"flex items-center gap-2",children:r})]}),cd=id;import*as Hn from"react";import{jsx as qe,jsxs as On}from"react/jsx-runtime";var ys=(t,r,o)=>{if(t.length>=r)return t;return[...t,...Array.from({length:r-t.length},o)]},dd=[],Xo=({values:t,defaultValues:r=dd,onValuesChange:o,addLabel:a,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=Hn.useId(),[V,E]=Hn.useState(()=>ys(r,c,p)),T=ys(t??V,c,p),k=Boolean(l),M=(F)=>{if(t===void 0)E(F);o?.(F)};return On("div",{"data-slot":"array-input",className:e("space-y-2",f?.root,h),...x,children:[qe("div",{className:"space-y-2",children:T.map((F,D)=>{let A=D===0&&R!==void 0&&R!==""?R:`${S}-${D}`,B=m?.(F,D);return On("div",{className:e("flex items-center gap-3",f?.row),children:[u({disabled:d,id:A,index:D,onValueChange:(Z)=>{let J=[...T];J[D]=Z,M(J)},validationMessage:B,value:F}),T.length>c?qe(n,{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(T.filter((Z,J)=>J!==D))},children:qe(Ao,{"aria-hidden":"true",className:"size-4"})}):null]},D)})}),On("div",{className:e("flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",f?.actionRow),children:[qe(En,{disabled:d,className:f?.addButton,onClick:()=>{M([...T,p()])},children:a}),k?qe("div",{className:e("sm:ml-auto",f?.actions),children:l}):null]})]})},ud=(t)=>{let{createItem:r,getItemLabel:o,inputProps:a,placeholder:s,required:l=!1,renderItem:c,...d}=t,{className:u,...p}=a??{};if(c!==void 0)return qe(Xo,{...d,createItem:r??(()=>""),renderItem:c});return qe(Xo,{...d,createItem:r??(()=>""),renderItem:(m)=>{let{disabled:f,id:h,index:R,onValueChange:x,validationMessage:S,value:V}=m;return On("div",{className:"min-w-0 flex-1",children:[qe(g,{...p,id:h,"aria-label":o(R),"aria-invalid":Boolean(S),value:V,placeholder:s,required:l,disabled:f,className:e("w-full",u,d.classes?.input),onChange:(E)=>{x(E.target.value)}}),S!==void 0&&S!==""?qe("p",{className:"mt-1 text-xs text-destructive",role:"alert",children:S}):null]})}})},pd=(t)=>qe(Xo,{...t}),md=(t)=>t.createItem!==void 0&&t.renderItem!==void 0,ws=(t)=>{if(md(t))return qe(pd,{...t});return qe(ud,{...t})};ws.displayName="ArrayInput";var fd=ws;import*as zr from"react";var Bt=(t,r)=>{let o=[];for(let a of t){let s=o.findIndex((l)=>r(a,l)<0);if(s===-1)o.push(a);else o.splice(s,0,a)}return o};var tt={hour:9,interval:1,minute:0,mode:"day",monthday:1,weekdays:[1,2,3,4,5]},Ko=/^\*\/(?<step>\d+)$/u,gd=(t)=>{let r=[];for(let o of t.split(",")){let a=/^(?<start>\d+)-(?<end>\d+)$/u.exec(o);if(a){let s=Number(a.groups?.start),l=Number(a.groups?.end);if(s>l)return null;for(let c=s;c<=l;c+=1)r.push(c)}else if(/^\d+$/u.test(o))r.push(Number(o));else return null}return r},bd=(t,r,o,a)=>{if(r==="*"&&o==="*"&&a==="*"){let s=Ko.exec(t),l=Number(s?.groups?.step);return s&&l>=1&&l<=59?{...tt,interval:l,mode:"minutes"}:null}return},vd=(t,r,o,a)=>{if(r!=="*"||o!=="*")return;let s=Ko.exec(t);if(s){let l=Number(s.groups?.step);return l>=1&&l<=23?{...tt,interval:l,minute:a,mode:"hours"}:null}return},hd=(t,r,o)=>{let a=Ko.exec(t);if(a){let l=Number(a.groups?.step);if(l%7===0&&l>=7&&l<=28)return{...tt,hour:r,interval:l/7,minute:o,mode:"weeks"};return l>=1&&l<=31?{...tt,hour:r,interval:l,minute:o,mode:"days"}:null}let s=Number(t);return/^\d+$/u.test(t)&&s>=1&&s<=31?{...tt,hour:r,minute:o,mode:"month",monthday:s}:null},xd=(t,r,o)=>{let a=gd(t);if(!a||a.some((l)=>l<0||l>7))return null;let s=Bt(new Set(a.map((l)=>l===7?0:l)),(l,c)=>l-c);return{...tt,hour:r,minute:o,mode:"week",weekdays:s}},mn=(t)=>{let r=t.trim().split(/\s+/u);if(r.length!==5)return null;let[o,a,s,l,c]=r;if(l!=="*")return null;let d=bd(o,a,s,c);if(d!==void 0)return d;if(!/^\d+$/u.test(o))return null;let u=Number(o);if(u<0||u>59)return null;let p=vd(a,s,c,u);if(p!==void 0)return p;if(!/^\d+$/u.test(a))return null;let m=Number(a);if(m<0||m>23)return null;if(s==="*"&&c==="*")return{...tt,hour:m,minute:u,mode:"day"};if(c==="*")return hd(s,m,u);if(s==="*")return xd(c,m,u);return null},Ft=(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 o=t.weekdays.length>0?Bt(new Set(t.weekdays),(a,s)=>a-s).join(","):"*";return`${t.minute} ${t.hour} * * ${o}`}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,o)=>{if(t==="*")return!0;for(let a of t.split(",")){let s=/^(?<base>\*|\d+|\d+-\d+)\/(?<increment>\d+)$/u.exec(a);if(s){let c=s.groups?.base??"";if(c!=="*"&&!Ns(c,r,o))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(a);if(l){let c=Number(l.groups?.start),d=Number(l.groups?.end);if(c<r||d>o||c>d)return!1;continue}if(/^\d+$/u.test(a)){let c=Number(a);if(c<r||c>o)return!1;continue}return!1}return!0},yd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],wd=(t,r)=>{let o=String(t).padStart(2,"0"),a=String(r).padStart(2,"0");return`${o}:${a}`},Vn=(t)=>{let r=mn(t);if(!r)return t;let o=wd(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 ${o}`;case"days":return r.interval===1?`Every day at ${o}`:`Every ${r.interval} days at ${o}`;case"week":{if(r.weekdays.length===0)return`Weekly at ${o}`;let a=Bt(r.weekdays,(d,u)=>d-u),s=a.length===5&&a.every((d,u)=>d===u+1),l=a.length===2&&a[0]===0&&a[1]===6;if(s)return`Weekdays at ${o}`;if(l)return`Weekends at ${o}`;return`${a.map((d)=>yd[d].slice(0,3)).join(", ")} at ${o}`}case"weeks":return r.interval===1?`Every week at ${o}`:`Every ${r.interval} weeks at ${o}`;case"month":return`Day ${r.monthday} of every month at ${o}`;default:throw Error("Unsupported cron mode")}},Yo=(t)=>{let r=t.trim().split(/\s+/u);if(r.length!==5)return!1;let o=[[0,59],[0,23],[1,31],[1,12],[0,7]];return r.every((a,s)=>Ns(a,o[s][0],o[s][1]))};import*as Cs from"react";var Rs=(t)=>{let a=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(a);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)},Nd=(t)=>{let r=Rs(t),o=r>=0?"+":"-",a=Math.abs(r),s=String(Math.floor(a/60)).padStart(2,"0"),l=String(a%60).padStart(2,"0");return`${o}${s}:${l}`},Bn=null,Qo=()=>{if(Bn)return Bn;let t="supportedValuesOf"in Intl?Intl.supportedValuesOf("timeZone"):["UTC"];return Bn=Bt(["UTC",...t].map((r)=>({label:`${r} (UTC${Nd(r)})`,offset:Rs(r),value:r})),(r,o)=>r.offset-o.offset||r.value.localeCompare(o.value)).map(({value:r,label:o})=>({label:o,value:r})),Bn};import{jsx as Rd}from"react/jsx-runtime";var Fn=({value:t,onChange:r,className:o,width:a="100%",disabled:s,placeholder:l="Select timezone"})=>{let c=Cs.useMemo(()=>Qo(),[]);return Rd(Br,{options:c,value:t,onChange:(d)=>{r(d||"UTC")},placeholder:l,searchPlaceholder:"Search timezone...",emptyMessage:"No timezone found.",className:e("bg-transparent font-normal",o),width:a,disabled:s})};import{jsx as te,jsxs as Se,Fragment as Dd}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"}],Cd=[{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}],Sd=(t)=>Ts.some((r)=>r.value===t),Ss=(t)=>{let r=t.trim();if(!r)return{custom:Ft(tt),simple:tt,view:"simple"};let o=mn(r);if(o)return{custom:r,simple:o,view:"simple"};return{custom:r,simple:tt,view:"advanced"}},Pd=(t,r)=>{let o=r===1;switch(t.value){case"minutes":return o?"minute":"minutes";case"hours":return o?"hour":"hours";case"day":return"day";case"days":return o?"day":"days";case"week":return"week";case"weeks":return o?"week":"weeks";case"month":return"month";default:throw Error("Unsupported cron mode")}},_n=(t,r,o)=>Math.max(r,Math.min(o,t)),Ps=(t)=>String(t).padStart(2,"0"),Td=({hour:t,minute:r,onChange:o})=>Se("div",{className:"flex items-center gap-1",children:[te(g,{type:"number",min:0,max:23,value:Ps(t),onChange:(a)=>{o(_n(Number(a.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:(a)=>{o(t,_n(Number(a.target.value)||0,0,59))},className:"w-16 text-center font-mono"})]}),kd=({state:t,onChange:r,timezone:o,onTimezoneChange:a})=>{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(Fo,{value:t.mode,onValueChange:(p)=>{if(Sd(p))r({mode:p})},children:[te(Vo,{className:"flex-1",children:te(Bo,{})}),te(Uo,{children:Ts.map((p)=>te(Ho,{value:p.value,children:Pd(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(qo,{type:"multiple",variant:"outline",size:"sm",value:t.weekdays.map(String),onValueChange:(p)=>{r({weekdays:p.length?Bt(p.map(Number),(m,f)=>m-f):[1]})},className:"w-full",children:Cd.map((p)=>te(jo,{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:_n(Number(p.target.value)||1,1,31)})},className:"w-24"})]}),(l||o!==void 0&&a)&&Se("div",{className:e("grid gap-3",l&&o!==void 0&&a?"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(Td,{hour:t.hour,minute:t.minute,onChange:(p,m)=>{r({hour:p,minute:m})}})]}),o!==void 0&&a&&Se("div",{className:"space-y-2",children:[te("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),te(Fn,{value:o,onChange:a})]})]}),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:_n(Number(p.target.value)||0,0,59)})},className:"w-24"})]})]})},Ld=({value:t,onChange:r,className:o,showPreview:a=!0,timezone:s,onTimezoneChange:l})=>{let[c,d]=zr.useState(()=>Ss(t)),[u,p]=zr.useState(t),[m,f]=zr.useState(t);if(t!==u){if(p(t),t!==m)f(t),d(Ss(t))}let h=zr.useCallback((T)=>{let k=T.view==="simple"?Ft(T.simple):T.custom;f(k),r(k)},[r]),R=(T)=>{d((k)=>{let M={...k.simple,...T},F={...k,custom:Ft(M),simple:M};return h(F),F})},x=(T)=>{d((k)=>{let M={...k,custom:T};return h(M),M})},S=(T)=>{d((k)=>{if(T===k.view)return k;if(T==="advanced"){let D=Ft(k.simple),A={...k,custom:D,view:T};return h(A),A}let M=mn(k.custom),F=M?{...k,simple:M,view:T}:{...k,view:T};return h(F),F})},V=Yo(c.custom),E=null;if(c.view==="simple")E=Vn(Ft(c.simple));else if(V)E=Vn(c.custom);return Se("div",{className:e("space-y-4",o),children:[Se(Go,{value:c.view,onValueChange:(T)=>{if(T==="simple"||T==="advanced")S(T)},children:[Se($o,{className:"grid w-full grid-cols-2 rounded-md bg-muted/70 p-1 sm:w-[320px]",children:[te(Hr,{value:"simple",className:"text-xs",children:"Simple"}),te(Hr,{value:"advanced",className:"text-xs",children:"Advanced"})]}),te(Ur,{value:"simple",className:"space-y-3 pt-3",children:te(kd,{state:c.simple,onChange:R,timezone:s,onTimezoneChange:l})}),Se(Ur,{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:(T)=>{x(T.target.value)},placeholder:"0 9 * * 1-5",className:e("font-mono text-sm",!V&&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(Fn,{value:s,onChange:l})]}),a&&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(Dd,{children:[te("span",{className:"text-muted-foreground",children:E}),te(L,{variant:"secondary",className:"ml-auto font-mono text-[11px]",children:c.view==="simple"?Ft(c.simple):c.custom})]})})]})};import{jsx as ea}from"react/jsx-runtime";var Ed={both:"w-full h-full",horizontal:"w-full h-auto",none:"",vertical:"h-full w-auto"},Md=({src:t,alt:r="",className:o="",width:a,height:s,fill:l="horizontal",style:c})=>{if(l==="both")return ea("div",{className:e("relative overflow-hidden rounded-lg shadow-md",o),style:{height:s,width:a,...c},children:ea("img",{src:t,alt:r,className:"object-cover w-full h-full absolute inset-0"})});return ea("img",{src:t,alt:r,width:a,height:s,className:e("object-cover rounded-lg shadow-md",Ed[l],o),style:{height:l==="vertical"?"100%":s,width:l==="horizontal"?"100%":a,...c}})},Id=Md;import{jsx as zn,jsxs as ks}from"react/jsx-runtime";var Ad=({title:t,className:r,children:o,...a})=>ks("section",{"data-slot":"summary-list",className:e("space-y-2",r),...a,children:[t?zn("h3",{className:"text-sm font-semibold tracking-tight",children:t}):null,zn("dl",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border bg-card",children:o})]}),Od=({label:t,value:r,muted:o=!1,className:a,...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",a),...s,children:[zn("dt",{className:"text-sm text-muted-foreground",children:t}),zn("dd",{className:e("min-w-0 break-words text-sm",o?"text-muted-foreground":"font-medium text-foreground"),children:r})]});import*as ta from"react";import{jsx as sr,jsxs as Ls}from"react/jsx-runtime";var Hd=({className:t,...r})=>sr(Gr,{"data-slot":"choice-card-group",className:e("grid gap-3",t),...r}),Vd=({title:t,description:r,media:o,footer:a,className:s,...l})=>{let c=ta.useId(),d=ta.useId(),u=Boolean(r);return Ls($r,{"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:[sr("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:sr(Wr,{children:sr(y,{className:"size-3",strokeWidth:3})})}),o,Ls("span",{className:"block min-w-0 space-y-1 pr-7",children:[sr("span",{id:c,className:"block font-semibold tracking-tight",children:t}),u?sr("span",{id:d,className:"block text-sm leading-relaxed text-muted-foreground",children:r}):null]}),a?sr("span",{className:"mt-auto block w-full",children:a}):null]})};import*as _t from"react";import{jsx as Ut,jsxs as Ds}from"react/jsx-runtime";var Es=_t.forwardRef(function({className:r,...o},a){return Ut("div",{ref:a,className:e("grid gap-2",r),...o})}),Ms=({className:t,...r})=>Ut(Yt,{className:e("grid gap-2",t),...r}),ra=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),$n=_t.forwardRef(function({title:r,description:o,descriptionId:a,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}),ra(o)?Ut("span",{id:a,className:e("mt-1 block text-xs text-muted-foreground",!s&&"truncate"),children:o}):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"),Bd=({value:t,title:r,description:o,radioLabel:a,disabled:s=!1,onClick:l,...c})=>{let d=_t.useId(),u=_t.useId(),p=a??(Is(r)?r:void 0);return Ut($n,{description:o,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(Xt,{"aria-describedby":ra(o)?u:void 0,"aria-label":p,className:"mt-1",disabled:s,id:d,value:t}),...c})},Fd=({checked:t,title:r,description:o,checkboxLabel:a,disabled:s=!1,onClick:l,onCheckedChange:c,...d})=>{let u=_t.useId(),p=_t.useId(),m=a??(Is(r)?r:void 0);return Ut($n,{description:o,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(ur,{"aria-describedby":ra(o)?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";$n.displayName="CardOption";import*as Os from"react";import{jsx as fn,jsxs as na}from"react/jsx-runtime";var _d=({title:t,description:r,command:o,copyLabel:a=t??o,copyErrorMessage:s,className:l,...c},d)=>na("div",{ref:d,className:e("space-y-2",l),...c,children:[t===void 0&&r===void 0?null:na("div",{children:[t===void 0?null:fn("p",{className:"text-sm font-medium",children:t}),r===void 0?null:fn("p",{className:"text-sm text-muted-foreground",children:r})]}),na("div",{className:"flex items-start gap-2",children:[fn("pre",{className:"flex-1 overflow-x-auto rounded-md border bg-muted px-3 py-2 font-mono text-xs",children:fn("code",{children:o})}),fn(Mn,{value:o,label:a,errorMessage:s})]})]}),Hs=Os.forwardRef(_d);Hs.displayName="CommandStep";var zd=Hs;import{forwardRef as $d,useId as jd}from"react";import{jsx as gn,jsxs as Vs}from"react/jsx-runtime";var Bs=$d(function({currency:r,label:o="Amount",hint:a,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=jd(),V=p??S,E=`Enter amount in ${r}`,T=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&&gn(P,{htmlFor:V,children:o}),Vs("div",{className:"relative",children:[gn("span",{className:"-translate-y-1/2 absolute top-1/2 left-3 text-sm text-muted-foreground",children:r}),gn(g,{ref:x,className:e("bg-background pl-12",M&&"border-destructive",d),id:V,min:"0",placeholder:k,step:T,type:"number",...R})]}),M?gn("p",{className:"text-xs text-destructive",children:c}):!l&&gn("p",{className:"text-xs text-muted-foreground",children:a??E})]})});Bs.displayName="CurrencyInput";var Jd=Bs;import*as Fs from"react";import{jsx as jn,jsxs as oa}from"react/jsx-runtime";var _s=Fs.forwardRef(function({index:r,label:o,hint:a,className:s,children:l,...c},d){let u=Boolean(r),p=Boolean(a);return oa("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?jn("div",{className:"flex h-6 items-center justify-end pt-[2px]",children:jn(Or,{children:r})}):null,oa("div",{className:"min-w-0 space-y-1.5",children:[oa("div",{className:"flex items-baseline justify-between gap-2",children:[jn(Ar,{children:o}),p?jn("span",{className:"text-[10px] text-muted-foreground",children:a}):null]}),l]})]})});_s.displayName="FieldRow";var Gd=_s;import{jsx as ie,jsxs as at,Fragment as Zd}from"react/jsx-runtime";var Wd=(t)=>{if(t===0)return"0 Bytes";let r=1024,o=["Bytes","KB","MB","GB"],a=Math.floor(Math.log(t)/Math.log(r));return`${Math.round(t/r**a*100)/100} ${o[a]}`},Xd={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"},Ud=({active:t,activeLabel:r,inactiveLabel:o,hint:a})=>at("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(Do,{className:e("h-5 w-5",t?"text-primary":"text-muted-foreground")})}),at("div",{children:[ie("p",{className:"text-sm font-medium text-foreground",children:t?r:o}),ie("p",{className:"text-xs text-muted-foreground",children:a})]})]}),Kd=({message:t,retryLabel:r})=>at("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(I,{className:"h-5 w-5 text-destructive"})}),at("div",{children:[ie("p",{className:"text-sm font-medium text-destructive",children:t}),ie("p",{className:"text-xs text-destructive/80",children:r})]})]}),Yd=({file:t,downloading:r,downloadLabel:o,downloadingLabel:a,onDownload:s,onRemove:l})=>at("div",{className:"flex w-full items-center justify-between",children:[at("div",{className:"flex items-center gap-3",children:[t.previewUrl!==void 0&&t.previewUrl!==null&&t.previewUrl!==""?at(Zd,{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)"})}),at("div",{className:"flex flex-col",children:[at("div",{className:"flex items-center gap-2",children:[ie(Io,{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:Wd(t.size)})]})]}),at("div",{className:"flex shrink-0 items-center gap-1",children:[s?ie(n,{"aria-label":r?a:o,className:"h-8 w-8 rounded-full p-0",disabled:r,onClick:s,size:"sm",title:r?a:o,type:"button",variant:"ghost",children:r?ie(b,{className:"h-4 w-4 animate-spin"}):ie($t,{className:"h-4 w-4"})}):null,l?ie(n,{className:"h-8 w-8 rounded-full p-0 hover:bg-destructive/10",onClick:l,size:"sm",type:"button",variant:"ghost",children:ie(I,{className:"h-4 w-4 text-destructive"})}):null]})]}),qd=(t)=>{let{rootProps:r,inputProps:o,isDragActive:a,selectedFile:s,error:l,onRemoveFile:c,onDownloadFile:d,isDownloadingFile:u,disabled:p,className:m,labels:f}=t,h={...Xd,...f},R=s!==void 0&&s!==null,x=l!==void 0&&l!==null&&l!=="";return ie("div",{className:e("w-full",m),children:at("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",a===!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",{...o}),!R&&!x?ie(Ud,{active:Boolean(a),activeLabel:h.dragActive,hint:h.fileTypeHint,inactiveLabel:h.dragInactive}):null,s!==void 0&&s!==null&&!x?ie(Yd,{downloadLabel:h.downloadFile,downloading:Boolean(u),downloadingLabel:h.downloadingFile,file:s,onDownload:d,onRemove:c}):null,l!==void 0&&l!==null&&l!==""?ie(Kd,{message:l,retryLabel:h.errorRetry}):null]})})},Qd=qd;import{jsx as zs,jsxs as tu}from"react/jsx-runtime";var eu=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:o,label:a,size:s,className:l,classes:c,...d})=>zs("div",{"aria-label":a,className:e("flex flex-wrap items-center gap-1.5",c?.root,l),...d,children:t.map((u)=>{let p=u.value===r;return tu("button",{type:"button","aria-pressed":p,disabled:u.disabled,onClick:()=>{o(u.value)},className:e(eu({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 ru=$s;import*as jr from"react";import{jsx as yt,jsxs as du}from"react/jsx-runtime";var nu=52,ou=26,Gn=4,Jn=20,au=(t)=>({"--flow-lane":t}),Js=jr.createContext(null),Gs=(t)=>{let r=jr.useContext(Js);if(!r)throw Error(`${t} must be rendered inside a FlowBand.`);return r},su=({lanes:t=1,stepHeight:r=nu,laneHeight:o=ou,className:a,style:s,children:l,...c})=>{let d=Math.max(r,t*o+(t-1)*Gn),u=jr.useMemo(()=>({height:d,stepHeight:r}),[d,r]);return yt(Js.Provider,{value:u,children:yt("div",{className:e("flex min-w-0 items-stretch gap-1",a),style:{height:d,...s},...c,children:l})})},iu=({className:t,style:r,children:o,...a})=>{let{stepHeight:s}=Gs("FlowStep");return yt("div",{className:e("flex min-w-0 flex-1 items-stretch self-center",t),style:{height:s,...r},...a,children:o})},js=({centers:t,height:r,colors:o,merge:a=!1})=>{let s=r/2,l=7;return yt("svg",{"aria-hidden":!0,width:Jn,height:r,viewBox:`0 0 ${Jn} ${r}`,className:"shrink-0",style:a?{transform:"scaleX(-1)"}:void 0,children:t.map((c,d)=>{let u=o[d];return yt("path",{style:au(u),d:`M0 ${s}H7C13 ${s} ${Jn-6} ${c} ${Jn} ${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)})})},lu=(t,r)=>{let o=(r-Gn*(t-1))/t;return Array.from({length:t},(a,s)=>s*(o+Gn)+o/2)},cu=({lanes:t,fork:r=!0,rejoin:o=!0,label:a,className:s,...l})=>{let{height:c}=Gs("FlowBranch"),d=lu(t.length,c),u=t.map((p)=>p.color);return du("div",{"aria-label":a,className:e("flex min-w-0 flex-1 items-stretch",s),...l,children:[r&&yt(js,{centers:d,height:c,colors:u}),yt("div",{className:"flex min-w-0 flex-1 flex-col",style:{gap:Gn},children:t.map((p)=>yt("div",{className:"flex min-w-0 flex-1 items-stretch overflow-hidden",children:p.content},p.key))}),o&&yt(js,{centers:d,height:c,colors:u,merge:!0})]})};import*as Ws from"react";import{jsx as sa,jsxs as pu}from"react/jsx-runtime";var uu=({index:t,className:r,children:o,...a},s)=>pu("div",{ref:s,className:e("grid grid-cols-[1.75rem_1fr] gap-x-3 leading-relaxed",r),...a,children:[sa("div",{className:"pt-[1px] text-right",children:sa(Or,{className:"opacity-80",children:t})}),sa("p",{className:"text-[13px] text-muted-foreground",children:o})]}),Xs=Ws.forwardRef(uu);Xs.displayName="GuideStep";var mu=Xs;import*as Xr from"react";import{jsx as Be,jsxs as Jr,Fragment as gu}from"react/jsx-runtime";var Us=Xr.forwardRef(function({className:r,variant:o="island",...a},s){return Be(Xe,{ref:s,variant:o,className:e("gap-0 p-0",r),...a})});Us.displayName="HierarchyTree";var Ks=Xr.forwardRef(function({title:r,icon:o,count:a,actions:s,className:l,...c},d){return Jr("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:[Jr("div",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",children:[o!==void 0&&o!==null?Be("span",{className:"shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4",children:o}):null,Be("span",{className:"min-w-0 truncate",children:r}),a!==void 0&&a!==null?Be("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs font-normal text-muted-foreground",children:a}):null]}),s!==void 0&&s!==null?Be("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:s}):null]})});Ks.displayName="HierarchyTreeHeader";var Ys=Xr.forwardRef(function({className:r,...o},a){return Be("div",{ref:a,"data-slot":"hierarchy-tree-body",className:e("min-w-0",r),...o})});Ys.displayName="HierarchyTreeBody";var fu=[],qs=Xr.forwardRef(function({depth:r,rails:o=fu,isLastChild:a=!1,hasChildren:s=!1,contentClassName:l,className:c,children:d,...u},p){let m=Math.max(1,r);return Jr("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?Jr("div",{"aria-hidden":!0,className:"flex shrink-0 pl-5",children:[o.map((f,h)=>Be("span",{className:"relative w-5",children:f?Be("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}):null},h)),Be("span",{className:"relative w-5",children:a?Be("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")}):Jr(gu,{children:[Be("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}),Be("span",{className:e("absolute left-0 top-[22px] border-t border-(--border-subtle)",s?"w-full":"w-14")})]})})]}):null,Be("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=Xr.forwardRef(function({expanded:r,count:o,visible:a=!0,className:s,...l},c){return Jr(n,{ref:c,type:"button",variant:"ghost",size:"sm",className:e("h-6 shrink-0 gap-0.5 px-1 text-xs text-muted-foreground",!a&&"invisible",s),...l,children:[Be(C,{className:e("h-3.5 w-3.5 transition-transform",r&&"rotate-90")}),o]})});Zs.displayName="HierarchyTreeToggle";var bu=Us;import vu,{useState as hu}from"react";import{jsx as we,jsxs as We}from"react/jsx-runtime";var xu=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 o=Object.prototype.toString.call(t);if(o==="[object String]"){let a=JSON.stringify(t);return a===void 0?o:a.slice(1,-1)}if(o==="[object Number]")return Number(t);if(Array.isArray(t)){if(r.has(t))return"[Circular]";r.add(t);let a=t.map((s)=>ia({ancestors:r,value:s}));return r.delete(t),a}if(t instanceof Object){if(r.has(t))return"[Circular]";r.add(t);let a=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,ia({ancestors:r,value:l})]));return r.delete(t),a}return o},yu=(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"},wu=(t)=>{if(t===null)return"null";if(t===void 0)return"undefined";if(String(t)===t)return`"${t}"`;return String(t)},Nu=(t)=>t,Ru=(t)=>t!==null&&Object(t)===t,Cu=(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"})},Su=(t)=>t?{close:"]",open:"["}:{close:"}",open:"{"},Pu=(t,r,o)=>t?{name:null,path:`${o}[${r}]`}:{name:String(r),path:`${o}.${r}`},Tu=({data:t,className:r,classes:o,variant:a,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=vu.useMemo(()=>ia({ancestors:new WeakSet,value:t}),[t]),[x,S]=hu(()=>{let A={};if(c)A.root=!0;return A}),V=(A,B)=>{if(A==="root"&&x[A]===void 0)return c;return x[A]??B},E=(A)=>{S((B)=>({...B,[A]:!V(A,l)}))},T=(A)=>{S({})},k=()=>{try{let A=JSON.stringify(R,null,2);navigator.clipboard.writeText(A),ge.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),ge.error("Copy failed",{description:"Failed to copy JSON to clipboard",duration:3000})}},M={maxWidth:f??"auto"},F=(A,B,Z,J,ne)=>{let pe=[],ce=Ru(B),be=Array.isArray(B),ke=ce&&Object.keys(B).length===0,Ee=Su(be),le={marginLeft:Z*d},Fe=Nu(J),de=ne;if(!ce){let re=h?.(B,J);return pe.push(We("div",{className:"flex",children:[u&&we("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:de}),We("div",{className:"flex min-w-0",style:le,children:[we("span",{"aria-hidden":!0,className:"mr-1 w-4 shrink-0"}),A!==null&&We("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",yu(B)),children:wu(B)})]})]},Fe)),[pe,de+1]}let Me=V(J,l),W=Cu(ke,Me);if(pe.push(We("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:de}),We("div",{className:"flex items-start",style:le,children:[we("button",{onClick:()=>{E(J)},className:"mr-1 w-4 h-4 mt-0.5 focus:outline-none opacity-60 hover:opacity-100","aria-label":Me?"Collapse":"Expand",tabIndex:0,type:"button",children:W}),We("div",{children:[A!==null&&We("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:Ee.open}),ke||!Me?We("span",{className:"text-gray-600 dark:text-gray-400",children:[ke?"":"...",Ee.close]}):null]})]})]},`${Fe}-open`)),de+=1,Me&&!ke){let re=de,ee=be?B.map((xe,_e)=>[_e,xe]):Object.entries(B);for(let[xe,_e]of ee){let ye=Pu(be,xe,J),[Et,G]=F(ye.name,_e,Z+1,ye.path,re);pe.push(...Et),re=G}return pe.push(We("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:Ee.close})]},`${Fe}-close`)),re+=1,[pe,re]}return[pe,de]},[D]=F(null,R,0,"root",1);return We("div",{className:e(xu({size:s,variant:a}),o?.root,r),style:M,children:[p&&We("div",{className:e("flex justify-between items-center px-3 py-2 border-b border-border bg-muted/50",o?.toolbar),children:[we("div",{className:"text-sm font-medium",children:"JSON Viewer"}),We("div",{className:"flex gap-2",children:[we(n,{size:"sm",variant:"outline",onClick:()=>{T(!0)},children:"Expand All"}),we(n,{size:"sm",variant:"outline",onClick:()=>{T(!1)},children:"Collapse All"}),We(n,{size:"sm",variant:"outline",onClick:k,children:[we(ae,{className:"w-4 h-4 mr-1"}),"Copy"]})]})]}),we("div",{className:e("overflow-auto flex-1",o?.content),style:{maxHeight:m??void 0},children:D})]})},la=Tu;import{useId as ku,useState as Lu}from"react";import Du from"react-markdown";import{jsx as Nt,jsxs as ca,Fragment as Mu}from"react/jsx-runtime";var Qs=({mode:t,onModeChange:r,labels:o,disabled:a=!1,className:s})=>{let l=t==="write"?"preview":"write",c=l==="write"?o.write:o.preview,d=l==="write"?o.writeTitle??o.write:o.previewTitle??o.preview;return Nt(n,{type:"button",variant:"ghost",size:"icon",className:e("size-7",s),disabled:a,"aria-label":c,title:d,onClick:()=>{r(l)},children:l==="preview"?Nt(Ve,{className:"size-3.5 text-muted-foreground"}):Nt(Po,{className:"size-3.5 text-muted-foreground"})})},Eu=({label:t,value:r,onValueChange:o,emptyPreview:a,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:V,textareaProps:E})=>{let T=ku(),k=f??T,[M,F]=Lu(c),D=l??M,A=(B)=>{if(l===void 0)F(B);d?.(B)};return ca("div",{className:e("grid gap-2",x),children:[h&&ca("div",{className:"flex items-center justify-between gap-3",children:[Nt(P,{htmlFor:D==="write"?k:void 0,children:t}),Nt(Qs,{mode:D,onModeChange:A,labels:s,disabled:p})]}),D==="write"?ca(Mu,{children:[Nt(Y,{...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:(B)=>{o(B.target.value)}}),R]}):Nt("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",V),children:u.trim()?Nt(Du,{children:u}):Nt("div",{className:"not-prose text-muted-foreground",children:a})})]})};import{jsx as Wn,jsxs as Au}from"react/jsx-runtime";var Iu=({open:t,onOpenChange:r,title:o="JSON Viewer",data:a,jsonViewerProps:s})=>Wn(N,{open:t,onOpenChange:r,children:Au(_,{className:"max-w-2xl max-h-[80vh] flex flex-col",children:[Wn(U,{children:Wn(O,{children:o})}),Wn(la,{data:a,className:"min-h-0 flex-1",variant:"filled",size:"sm",showToolbar:!0,expandAll:!1,expandRoot:!0,...s})]})});import{jsx as ei,jsxs as ti}from"react/jsx-runtime";var Ou=({href:t,children:r,className:o,external:a=!1,linkComponent:s})=>{let l=e("inline-flex items-center gap-1 text-primary hover:underline",o);if(a||!s)return ti("a",{href:t,...a?{rel:"noopener noreferrer",target:"_blank"}:{},className:l,children:[r,ei(kt,{className:"h-3 w-3"})]});return ti(s,{to:t,className:l,children:[r,ei(kt,{className:"h-3 w-3"})]})};import{useState as Hu}from"react";import{jsx as Xn,jsxs as Bu}from"react/jsx-runtime";var Vu=({value:t,isSensitive:r=!1,className:o,maskChar:a="•",showToggle:s=!0,showLabel:l="Show value",hideLabel:c="Hide value",truncate:d=!0,children:u})=>{let[p,m]=Hu(!r),h=p?t:(()=>{if(t.startsWith("{")||t.startsWith("["))return`{ ${a.repeat(10)} }`;return a.repeat(Math.min(t.length,20))})(),R=d?h.slice(0,50)+(h.length>50?"...":""):h,x=p?c:l,S=r&&s?Xn(n,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{m(!p)},title:x,"aria-label":x,children:p?Xn(Ct,{className:"h-3 w-3"}):Xn(Ve,{className:"h-3 w-3"})}):null;if(u!==void 0)return u({displayValue:R,toggle:S});return Bu("div",{className:e("flex items-center gap-2",o),children:[Xn("code",{className:"text-sm bg-muted px-2 py-1 rounded flex-1 break-all",children:R}),S]})};import*as oi from"react";import{jsx as ri,jsxs as ni}from"react/jsx-runtime";var ai=oi.forwardRef(function({icon:r,text:o,trailing:a,className:s,...l},c){return ni("div",{ref:c,className:e("flex min-w-0 items-center gap-2",s),...l,children:[ni("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?ri("span",{className:"text-primary/70",children:r}):null,ri("span",{className:"min-w-0 truncate",children:o})]}),a]})});ai.displayName="MutedPlaceholder";var Fu=ai;import{useMemo as _u,useState as zu}from"react";import{jsx as Ue,jsxs as Un}from"react/jsx-runtime";var da=({value:t,ancestors:r})=>{if(t===null||t===void 0)return t;if(t===!0||t===!1)return t;let o=Object.prototype.toString.call(t);if(o==="[object String]")return String.prototype.valueOf.call(t);if(o==="[object Number]")return Number(t);if(Array.isArray(t)){if(r.has(t))return;r.add(t);let a=t.map((s)=>da({ancestors:r,value:s}));return r.delete(t),a}if(t instanceof Object){if(r.has(t))return;r.add(t);let a=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,da({ancestors:r,value:l})]));return r.delete(t),a}return},mt=(t)=>{if(t instanceof Object&&!Array.isArray(t))return t;return},tr=(t)=>Array.isArray(t)?t:void 0,si=(t)=>Object.prototype.toString.call(t)==="[object String]"&&t===String.prototype.valueOf.call(t),ua=(t)=>si(t)?t:void 0,$u=(t)=>tr(t)?.filter(si)??[],ju=(t)=>{let r=tr(t.anyOf);if(!r)return t;let o=r.filter((a)=>mt(a)?.type!=="null");return o.length===1?mt(o[0])??t:t},ii=(t)=>{let r=ua(t.type);if(r!==void 0&&r!=="")return r;if(tr(t.enum))return"enum";if(tr(t.oneOf)||tr(t.anyOf))return"variant";if(mt(t.properties))return"object";return"value"},li=(t,r="schema")=>{let o=mt(t.properties);if(o){let s=new Set($u(t.required));return Object.entries(o).flatMap(([l,c])=>{let d=mt(c);return d?[{name:l,path:`${r}.properties.${l}`,required:s.has(l),schema:d}]:[]})}if(ii(t)==="array"){let s=mt(t.items);return s?[{name:"Items",path:`${r}.items`,required:!0,schema:s}]:[]}let a=tr(t.oneOf)??tr(t.anyOf)??tr(t.allOf);if(!a)return[];return a.flatMap((s,l)=>{let c=mt(s);return c?[{name:`Option ${l+1}`,path:`${r}.option.${l}`,required:!0,schema:c}]:[]})},pa=(t,r,o=new Set)=>{let a=ju(t),s=ua(a.$ref);if(s===void 0||s===""||!s.startsWith("#/$defs/")||o.has(s))return a;let l=mt(mt(r.$defs)?.[s.slice(8)]);if(!l)return a;return pa(l,r,new Set([...o,s]))},ci=({child:t,depth:r,root:o,defaultExpandedDepth:a})=>{let s=pa(t.schema,o),l=li(s,t.path),[c,d]=zu(r<a),u=ii(s),p=ua(s.description),m=l.length>0,f=c?`Collapse ${t.name}`:`Expand ${t.name}`;return Un(Ie,{open:c,onOpenChange:d,children:[Un("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?Ue(Le,{"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:Ue(C,{className:e("size-3.5 transition-transform",c&&"rotate-90")})}):null,Un("div",{className:"min-w-0 flex-1",children:[Un("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[Ue("span",{className:"break-all text-xs font-medium text-foreground",children:t.name}),Ue("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:u}),t.required?Ue("span",{className:"text-[10px] font-medium text-destructive",children:"required"}):null]}),p!==void 0&&p!==""?Ue("p",{className:"mt-0.5 text-xs leading-snug text-muted-foreground",children:p}):null]})]}),m?Ue(Te,{children:Ue("div",{className:"border-l border-border/70",children:l.map((h)=>Ue(ci,{child:h,defaultExpandedDepth:a,depth:r+1,root:o},h.path))})}):null]})},Ju=({schema:t,className:r,defaultExpandedDepth:o=1,emptyLabel:a="No fields"})=>{let s=_u(()=>da({ancestors:new WeakSet,value:t}),[t]),l=mt(s);if(!l)return Ue("p",{className:e("text-xs text-muted-foreground",r),children:a});let c=pa(l,l),d=li(c);if(!d.length)return Ue("p",{className:e("text-xs text-muted-foreground",r),children:a});return Ue("div",{"aria-label":"Object schema",className:e("overflow-hidden rounded-lg border border-border",r),children:d.map((u)=>Ue(ci,{child:u,defaultExpandedDepth:o,depth:0,root:l},u.path))})};import ft,{createContext as wn,useContext as tn,useEffect as ue,useState as st,useCallback as it,useMemo as fe,useRef as Pe,memo as qu,useReducer as Zu,cloneElement as Hh,forwardRef as Vh}from"react";import{createPortal as Qu,unstable_batchedUpdates as to}from"react-dom";import{useMemo as fa,useLayoutEffect as Gu,useEffect as ui,useRef as Kr,useCallback as Kn}from"react";function pi(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return fa(()=>(a)=>{r.forEach((s)=>s(a))},r)}var bn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ir(t){let r=Object.prototype.toString.call(t);return r==="[object Window]"||r==="[object global]"}function Yn(t){return"nodeType"in t}function Ae(t){var r,o;if(!t)return window;if(ir(t))return t;if(!Yn(t))return window;return(r=(o=t.ownerDocument)==null?void 0:o.defaultView)!=null?r:window}function qn(t){let{Document:r}=Ae(t);return t instanceof r}function Yr(t){if(ir(t))return!1;return t instanceof Ae(t).HTMLElement}function ga(t){return t instanceof Ae(t).SVGElement}function br(t){if(!t)return document;if(ir(t))return t.document;if(!Yn(t))return document;if(qn(t))return t;if(Yr(t)||ga(t))return t.ownerDocument;return document}var rt=bn?Gu:ui;function Zn(t){let r=Kr(t);return rt(()=>{r.current=t}),Kn(function(){for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];return r.current==null?void 0:r.current(...a)},[])}function mi(){let t=Kr(null),r=Kn((a,s)=>{t.current=setInterval(a,s)},[]),o=Kn(()=>{if(t.current!==null)clearInterval(t.current),t.current=null},[]);return[r,o]}function qr(t,r){if(r===void 0)r=[t];let o=Kr(t);return rt(()=>{if(o.current!==t)o.current=t},r),o}function Zr(t,r){let o=Kr();return fa(()=>{let a=t(o.current);return o.current=a,a},[...r])}function vn(t){let r=Zn(t),o=Kr(null),a=Kn((s)=>{if(s!==o.current)r==null||r(s,o.current);o.current=s},[]);return[o,a]}function Qn(t){let r=Kr();return ui(()=>{r.current=t},[t]),r.current}var ma={};function xr(t,r){return fa(()=>{if(r)return r;let o=ma[t]==null?0:ma[t]+1;return ma[t]=o,t+"-"+o},[t,r])}function fi(t){return function(r){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((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 yr=fi(1),wr=fi(-1);function Wu(t){return"clientX"in t&&"clientY"in t}function hn(t){if(!t)return!1;let{KeyboardEvent:r}=Ae(t.target);return r&&t instanceof r}function Xu(t){if(!t)return!1;let{TouchEvent:r}=Ae(t.target);return r&&t instanceof r}function eo(t){if(Xu(t)){if(t.touches&&t.touches.length){let{clientX:r,clientY:o}=t.touches[0];return{x:r,y:o}}else if(t.changedTouches&&t.changedTouches.length){let{clientX:r,clientY:o}=t.changedTouches[0];return{x:r,y:o}}}if(Wu(t))return{x:t.clientX,y:t.clientY};return null}var rr=Object.freeze({Translate:{toString(t){if(!t)return;let{x:r,y:o}=t;return"translate3d("+(r?Math.round(r):0)+"px, "+(o?Math.round(o):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;let{scaleX:r,scaleY:o}=t;return"scaleX("+r+") scaleY("+o+")"}},Transform:{toString(t){if(!t)return;return[rr.Translate.toString(t),rr.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:r,duration:o,easing:a}=t;return r+" "+o+"ms "+a}}}),di="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function gi(t){if(t.matches(di))return t;return t.querySelector(di)}import bi,{useState as Uu,useCallback as Ku}from"react";var Yu={display:"none"};function vi(t){let{id:r,value:o}=t;return bi.createElement("div",{id:r,style:Yu},o)}function hi(t){let{id:r,announcement:o,ariaLiveType:a="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 bi.createElement("div",{id:r,style:s,role:"status","aria-live":a,"aria-atomic":!0},o)}function xi(){let[t,r]=Uu("");return{announce:Ku((a)=>{if(a!=null)r(a)},[]),announcement:t}}var Mi=wn(null);function ep(t){let r=tn(Mi);ue(()=>{if(!r)throw Error("useDndMonitor must be used within a children of <DndContext>");return r(t)},[t,r])}function tp(){let[t]=st(()=>new Set),r=it((a)=>(t.add(a),()=>t.delete(a)),[t]);return[it((a)=>{let{type:s,event:l}=a;t.forEach((c)=>{var d;return(d=c[s])==null?void 0:d.call(c,l)})},[t]),r]}var rp={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
|
+
`},np={onDragStart(t){let{active:r}=t;return"Picked up draggable item "+r.id+"."},onDragOver(t){let{active:r,over:o}=t;if(o)return"Draggable item "+r.id+" was moved over droppable area "+o.id+".";return"Draggable item "+r.id+" is no longer over a droppable area."},onDragEnd(t){let{active:r,over:o}=t;if(o)return"Draggable item "+r.id+" was dropped over droppable area "+o.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 op(t){let{announcements:r=np,container:o,hiddenTextDescribedById:a,screenReaderInstructions:s=rp}=t,{announce:l,announcement:c}=xi(),d=xr("DndLiveRegion"),[u,p]=st(!1);if(ue(()=>{p(!0)},[]),ep(fe(()=>({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=ft.createElement(ft.Fragment,null,ft.createElement(vi,{id:a,value:s.draggable}),ft.createElement(hi,{id:d,announcement:c}));return o?Qu(m,o):m}var me;(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"})(me||(me={}));function no(){}function Ra(t,r){return fe(()=>({sensor:t,options:r!=null?r:{}}),[t,r])}function Ii(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return fe(()=>[...r].filter((a)=>a!=null),[...r])}var lt=Object.freeze({x:0,y:0});function Ai(t,r){return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}function Oi(t,r){let{data:{value:o}}=t,{data:{value:a}}=r;return o-a}function ap(t,r){let{data:{value:o}}=t,{data:{value:a}}=r;return a-o}function yi(t){let{left:r,top:o,height:a,width:s}=t;return[{x:r,y:o},{x:r+s,y:o},{x:r,y:o+a},{x:r+s,y:o+a}]}function Ca(t,r){if(!t||t.length===0)return null;let[o]=t;return r?o[r]:o}function wi(t,r,o){if(r===void 0)r=t.left;if(o===void 0)o=t.top;return{x:r+t.width*0.5,y:o+t.height*0.5}}var Hi=(t)=>{let{collisionRect:r,droppableRects:o,droppableContainers:a}=t,s=wi(r,r.left,r.top),l=[];for(let c of a){let{id:d}=c,u=o.get(d);if(u){let p=Ai(wi(u),s);l.push({id:d,data:{droppableContainer:c,value:p}})}}return l.sort(Oi)},Vi=(t)=>{let{collisionRect:r,droppableRects:o,droppableContainers:a}=t,s=yi(r),l=[];for(let c of a){let{id:d}=c,u=o.get(d);if(u){let p=yi(u),m=s.reduce((h,R,x)=>h+Ai(p[x],R),0),f=Number((m/4).toFixed(4));l.push({id:d,data:{droppableContainer:c,value:f}})}}return l.sort(Oi)};function sp(t,r){let o=Math.max(r.top,t.top),a=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-a,d=l-o;if(a<s&&o<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 ip=(t)=>{let{collisionRect:r,droppableRects:o,droppableContainers:a}=t,s=[];for(let l of a){let{id:c}=l,d=o.get(c);if(d){let u=sp(d,r);if(u>0)s.push({id:c,data:{droppableContainer:l,value:u}})}}return s.sort(ap)};function lp(t,r,o){return{...t,scaleX:r&&o?r.width/o.width:1,scaleY:r&&o?r.height/o.height:1}}function Bi(t,r){return t&&r?{x:t.left-r.left,y:t.top-r.top}:lt}function cp(t){return function(o){for(var a=arguments.length,s=Array(a>1?a-1:0),l=1;l<a;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}),{...o})}}var dp=cp(1);function up(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 pp(t,r,o){let a=up(r);if(!a)return t;let{scaleX:s,scaleY:l,x:c,y:d}=a,u=t.left-c-(1-s)*parseFloat(o),p=t.top-d-(1-l)*parseFloat(o.slice(o.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 mp={ignoreTransform:!1};function Nr(t,r){if(r===void 0)r=mp;let o=t.getBoundingClientRect();if(r.ignoreTransform){let{transform:p,transformOrigin:m}=Ae(t).getComputedStyle(t);if(p)o=pp(o,p,m)}let{top:a,left:s,width:l,height:c,bottom:d,right:u}=o;return{top:a,left:s,width:l,height:c,bottom:d,right:u}}function Ni(t){return Nr(t,{ignoreTransform:!0})}function fp(t){let{innerWidth:r,innerHeight:o}=t;return{top:0,left:0,right:r,bottom:o,width:r,height:o}}function gp(t,r){if(r===void 0)r=Ae(t).getComputedStyle(t);return r.position==="fixed"}function bp(t,r){if(r===void 0)r=Ae(t).getComputedStyle(t);let o=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((s)=>{let l=r[s];return typeof l==="string"?o.test(l):!1})}function Nn(t,r){let o=[];function a(s){if(r!=null&&o.length>=r)return o;if(!s)return o;if(qn(s)&&s.scrollingElement!=null&&!o.includes(s.scrollingElement))return o.push(s.scrollingElement),o;if(!Yr(s)||ga(s))return o;if(o.includes(s))return o;let l=Ae(t).getComputedStyle(s);if(s!==t){if(bp(s,l))o.push(s)}if(gp(s,l))return o;return a(s.parentNode)}if(!t)return o;return a(t)}function Fi(t){let[r]=Nn(t,1);return r!=null?r:null}function ba(t){if(!bn||!t)return null;if(ir(t))return t;if(!Yn(t))return null;if(qn(t)||t===br(t).scrollingElement)return window;if(Yr(t))return t;return null}function _i(t){if(ir(t))return t.scrollX;return t.scrollLeft}function zi(t){if(ir(t))return t.scrollY;return t.scrollTop}function xa(t){return{x:_i(t),y:zi(t)}}var Ne;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(Ne||(Ne={}));function $i(t){if(!bn||!t)return!1;return t===document.scrollingElement}function ji(t){let r={x:0,y:0},o=$i(t)?{height:window.innerHeight,width:window.innerWidth}:{height:t.clientHeight,width:t.clientWidth},a={x:t.scrollWidth-o.width,y:t.scrollHeight-o.height},s=t.scrollTop<=r.y,l=t.scrollLeft<=r.x,c=t.scrollTop>=a.y,d=t.scrollLeft>=a.x;return{isTop:s,isLeft:l,isBottom:c,isRight:d,maxScroll:a,minScroll:r}}var vp={x:0.2,y:0.2};function hp(t,r,o,a,s){let{top:l,left:c,right:d,bottom:u}=o;if(a===void 0)a=10;if(s===void 0)s=vp;let{isTop:p,isBottom:m,isLeft:f,isRight:h}=ji(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=a*Math.abs((r.top+S.height-l)/S.height);else if(!m&&u>=r.bottom-S.height)R.y=Ne.Forward,x.y=a*Math.abs((r.bottom-S.height-u)/S.height);if(!h&&d>=r.right-S.width)R.x=Ne.Forward,x.x=a*Math.abs((r.right-S.width-d)/S.width);else if(!f&&c<=r.left+S.width)R.x=Ne.Backward,x.x=a*Math.abs((r.left+S.width-c)/S.width);return{direction:R,speed:x}}function xp(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:o,right:a,bottom:s}=t.getBoundingClientRect();return{top:r,left:o,right:a,bottom:s,width:t.clientWidth,height:t.clientHeight}}function Ji(t){return t.reduce((r,o)=>yr(r,xa(o)),lt)}function yp(t){return t.reduce((r,o)=>r+_i(o),0)}function wp(t){return t.reduce((r,o)=>r+zi(o),0)}function Np(t,r){if(r===void 0)r=Nr;if(!t)return;let{top:o,left:a,bottom:s,right:l}=r(t);if(!Fi(t))return;if(s<=0||l<=0||o>=window.innerHeight||a>=window.innerWidth)t.scrollIntoView({block:"center",inline:"center"})}var Rp=[["x",["left","right"],yp],["y",["top","bottom"],wp]];class ao{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 o=Nn(r),a=Ji(o);this.rect={...t},this.width=t.width,this.height=t.height;for(let[s,l,c]of Rp)for(let d of l)Object.defineProperty(this,d,{get:()=>{let u=c(o),p=a[s]-u;return this.rect[d]+p},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Qr{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((r)=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...r)})},this.target=t}add(t,r,o){var a;(a=this.target)==null||a.addEventListener(t,r,o),this.listeners.push([t,r,o])}}function Cp(t){let{EventTarget:r}=Ae(t);return t instanceof r?t:br(t)}function va(t,r){let o=Math.abs(t.x),a=Math.abs(t.y);if(typeof r==="number")return Math.sqrt(o**2+a**2)>r;if("x"in r&&"y"in r)return o>r.x&&a>r.y;if("x"in r)return o>r.x;if("y"in r)return a>r.y;return!1}var nt;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(nt||(nt={}));function Ri(t){t.preventDefault()}function Sp(t){t.stopPropagation()}var X;(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"})(X||(X={}));var Gi={start:[X.Space,X.Enter],cancel:[X.Esc],end:[X.Space,X.Enter,X.Tab]},Pp=(t,r)=>{let{currentCoordinates:o}=r;switch(t.code){case X.Right:return{...o,x:o.x+25};case X.Left:return{...o,x:o.x-25};case X.Down:return{...o,y:o.y+25};case X.Up:return{...o,y:o.y-25}}return};class Rn{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 Qr(br(r)),this.windowListeners=new Qr(Ae(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(nt.Resize,this.handleCancel),this.windowListeners.add(nt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(nt.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:t,onStart:r}=this.props,o=t.node.current;if(o)Np(o);r(lt)}handleKeyDown(t){if(hn(t)){let{active:r,context:o,options:a}=this.props,{keyboardCodes:s=Gi,coordinateGetter:l=Pp,scrollBehavior:c="smooth"}=a,{code:d}=t;if(s.end.includes(d)){this.handleEnd(t);return}if(s.cancel.includes(d)){this.handleCancel(t);return}let{collisionRect:u}=o.current,p=u?{x:u.left,y:u.top}:lt;if(!this.referenceCoordinates)this.referenceCoordinates=p;let m=l(t,{active:r,context:o.current,currentCoordinates:p});if(m){let f=wr(m,p),h={x:0,y:0},{scrollableAncestors:R}=o.current;for(let x of R){let S=t.code,{isTop:V,isRight:E,isLeft:T,isBottom:k,maxScroll:M,minScroll:F}=ji(x),D=xp(x),A={x:Math.min(S===X.Right?D.right-D.width/2:D.right,Math.max(S===X.Right?D.left:D.left+D.width/2,m.x)),y:Math.min(S===X.Down?D.bottom-D.height/2:D.bottom,Math.max(S===X.Down?D.top:D.top+D.height/2,m.y))},B=S===X.Right&&!E||S===X.Left&&!T,Z=S===X.Down&&!k||S===X.Up&&!V;if(B&&A.x!==m.x){let J=x.scrollLeft+f.x,ne=S===X.Right&&J<=M.x||S===X.Left&&J>=F.x;if(ne&&!f.y){x.scrollTo({left:J,behavior:c});return}if(ne)h.x=x.scrollLeft-J;else h.x=S===X.Right?x.scrollLeft-M.x:x.scrollLeft-F.x;if(h.x)x.scrollBy({left:-h.x,behavior:c});break}else if(Z&&A.y!==m.y){let J=x.scrollTop+f.y,ne=S===X.Down&&J<=M.y||S===X.Up&&J>=F.y;if(ne&&!f.x){x.scrollTo({top:J,behavior:c});return}if(ne)h.y=x.scrollTop-J;else h.y=S===X.Down?x.scrollTop-M.y:x.scrollTop-F.y;if(h.y)x.scrollBy({top:-h.y,behavior:c});break}}this.handleMove(t,yr(wr(m,this.referenceCoordinates),h))}}}handleMove(t,r){let{onMove:o}=this.props;t.preventDefault(),o(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()}}Rn.activators=[{eventName:"onKeyDown",handler:(t,r,o)=>{let{keyboardCodes:a=Gi,onActivation:s}=r,{active:l}=o,{code:c}=t.nativeEvent;if(a.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 Ci(t){return Boolean(t&&"distance"in t)}function Si(t){return Boolean(t&&"delay"in t)}class so{constructor(t,r,o){var a;if(o===void 0)o=Cp(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=br(l),this.documentListeners=new Qr(this.document),this.listeners=new Qr(o),this.windowListeners=new Qr(Ae(l)),this.initialCoordinates=(a=eo(s))!=null?a:lt,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:o}}}=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(nt.Resize,this.handleCancel),this.windowListeners.add(nt.DragStart,Ri),this.windowListeners.add(nt.VisibilityChange,this.handleCancel),this.windowListeners.add(nt.ContextMenu,Ri),this.documentListeners.add(nt.Keydown,this.handleKeydown),r){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Si(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(Ci(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:o,onPending:a}=this.props;a(o,t,this.initialCoordinates,r)}handleStart(){let{initialCoordinates:t}=this,{onStart:r}=this.props;if(t)this.activated=!0,this.documentListeners.add(nt.Click,Sp,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(nt.SelectionChange,this.removeTextSelection),r(t)}handleMove(t){var r;let{activated:o,initialCoordinates:a,props:s}=this,{onMove:l,options:{activationConstraint:c}}=s;if(!a)return;let d=(r=eo(t))!=null?r:lt,u=wr(a,d);if(!o&&c){if(Ci(c)){if(c.tolerance!=null&&va(u,c.tolerance))return this.handleCancel();if(va(u,c.distance))return this.handleStart()}if(Si(c)){if(va(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===X.Esc)this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}var Tp={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Cn extends so{constructor(t){let{event:r}=t,o=br(r.target);super(t,Tp,o)}}Cn.activators=[{eventName:"onPointerDown",handler:(t,r)=>{let{nativeEvent:o}=t,{onActivation:a}=r;if(!o.isPrimary||o.button!==0)return!1;return a==null||a({event:o}),!0}}];var kp={move:{name:"mousemove"},end:{name:"mouseup"}},ya;(function(t){t[t.RightClick=2]="RightClick"})(ya||(ya={}));class Wi extends so{constructor(t){super(t,kp,br(t.event.target))}}Wi.activators=[{eventName:"onMouseDown",handler:(t,r)=>{let{nativeEvent:o}=t,{onActivation:a}=r;if(o.button===ya.RightClick)return!1;return a==null||a({event:o}),!0}}];var ha={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Xi extends so{constructor(t){super(t,ha)}static setup(){return window.addEventListener(ha.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(ha.move.name,t)};function t(){}}}Xi.activators=[{eventName:"onTouchStart",handler:(t,r)=>{let{nativeEvent:o}=t,{onActivation:a}=r,{touches:s}=o;if(s.length>1)return!1;return a==null||a({event:o}),!0}}];var xn;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(xn||(xn={}));var oo;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(oo||(oo={}));function Lp(t){let{acceleration:r,activator:o=xn.Pointer,canScroll:a,draggingRect:s,enabled:l,interval:c=5,order:d=oo.TreeOrder,pointerCoordinates:u,scrollableAncestors:p,scrollableAncestorRects:m,delta:f,threshold:h}=t,R=Ep({delta:f,disabled:!l}),[x,S]=mi(),V=Pe({x:0,y:0}),E=Pe({x:0,y:0}),T=fe(()=>{switch(o){case xn.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case xn.DraggableRect:return s}},[o,s,u]),k=Pe(null),M=it(()=>{let D=k.current;if(!D)return;let A=V.current.x*E.current.x,B=V.current.y*E.current.y;D.scrollBy(A,B)},[]),F=fe(()=>d===oo.TreeOrder?[...p].reverse():p,[d,p]);ue(()=>{if(!l||!p.length||!T){S();return}for(let D of F){if((a==null?void 0:a(D))===!1)continue;let A=p.indexOf(D),B=m[A];if(!B)continue;let{direction:Z,speed:J}=hp(D,B,T,r,h);for(let ne of["x","y"])if(!R[ne][Z[ne]])J[ne]=0,Z[ne]=0;if(J.x>0||J.y>0){S(),k.current=D,x(M,c),V.current=J,E.current=Z;return}}V.current={x:0,y:0},E.current={x:0,y:0},S()},[r,M,a,S,l,c,JSON.stringify(T),JSON.stringify(R),x,p,F,m,JSON.stringify(h)])}var Dp={x:{[Ne.Backward]:!1,[Ne.Forward]:!1},y:{[Ne.Backward]:!1,[Ne.Forward]:!1}};function Ep(t){let{delta:r,disabled:o}=t,a=Qn(r);return Zr((s)=>{if(o||!a||!s)return Dp;let l={x:Math.sign(r.x-a.x),y:Math.sign(r.y-a.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}}},[o,r,a])}function Mp(t,r){let o=r!=null?t.get(r):void 0,a=o?o.node.current:null;return Zr((s)=>{var l;if(r==null)return null;return(l=a!=null?a:s)!=null?l:null},[a,r])}function Ip(t,r){return fe(()=>t.reduce((o,a)=>{let{sensor:s}=a,l=s.activators.map((c)=>({eventName:c.eventName,handler:r(c.handler,a)}));return[...o,...l]},[]),[t,r])}var yn;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(yn||(yn={}));var Na;(function(t){t.Optimized="optimized"})(Na||(Na={}));var Pi=new Map;function Ap(t,r){let{dragging:o,dependencies:a,config:s}=r,[l,c]=st(null),{frequency:d,measure:u,strategy:p}=s,m=Pe(t),f=V(),h=qr(f),R=it(function(E){if(E===void 0)E=[];if(h.current)return;c((T)=>{if(T===null)return E;return T.concat(E.filter((k)=>!T.includes(k)))})},[h]),x=Pe(null),S=Zr((E)=>{if(f&&!o)return Pi;if(!E||E===Pi||m.current!==t||l!=null){let T=new Map;for(let k of t){if(!k)continue;if(l&&l.length>0&&!l.includes(k.id)&&k.rect.current){T.set(k.id,k.rect.current);continue}let M=k.node.current,F=M?new ao(u(M),M):null;if(k.rect.current=F,F)T.set(k.id,F)}return T}return E},[t,l,o,f,u]);return ue(()=>{m.current=t},[t]),ue(()=>{if(f)return;R()},[o,f]),ue(()=>{if(l&&l.length>0)c(null)},[JSON.stringify(l)]),ue(()=>{if(f||typeof d!=="number"||x.current!==null)return;x.current=setTimeout(()=>{R(),x.current=null},d)},[d,f,R,...a]),{droppableRects:S,measureDroppableContainers:R,measuringScheduled:l!=null};function V(){switch(p){case yn.Always:return!1;case yn.BeforeDragging:return o;default:return!o}}}function Ui(t,r){return Zr((o)=>{if(!t)return null;if(o)return o;return typeof r==="function"?r(t):t},[r,t])}function Op(t,r){return Ui(t,r)}function Hp(t){let{callback:r,disabled:o}=t,a=Zn(r),s=fe(()=>{if(o||typeof window>"u"||typeof window.MutationObserver>"u")return;let{MutationObserver:l}=window;return new l(a)},[a,o]);return ue(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function io(t){let{callback:r,disabled:o}=t,a=Zn(r),s=fe(()=>{if(o||typeof window>"u"||typeof window.ResizeObserver>"u")return;let{ResizeObserver:l}=window;return new l(a)},[o]);return ue(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function Vp(t){return new ao(Nr(t),t)}function Ti(t,r,o){if(r===void 0)r=Vp;let[a,s]=st(null);function l(){s((u)=>{if(!t)return null;if(t.isConnected===!1){var p;return(p=u!=null?u:o)!=null?p:null}let m=r(t);if(JSON.stringify(u)===JSON.stringify(m))return u;return m})}let c=Hp({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=io({callback:l});return rt(()=>{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]),a}function Bp(t){let r=Ui(t);return Bi(t,r)}var ki=[];function Fp(t){let r=Pe(t),o=Zr((a)=>{if(!t)return ki;if(a&&a!==ki&&t&&r.current&&t.parentNode===r.current.parentNode)return a;return Nn(t)},[t]);return ue(()=>{r.current=t},[t]),o}function _p(t){let[r,o]=st(null),a=Pe(t),s=it((l)=>{let c=ba(l.target);if(!c)return;o((d)=>{if(!d)return null;return d.set(c,xa(c)),new Map(d)})},[]);return ue(()=>{let l=a.current;if(t!==l){c(l);let d=t.map((u)=>{let p=ba(u);if(p)return p.addEventListener("scroll",s,{passive:!0}),[p,xa(p)];return null}).filter((u)=>u!=null);o(d.length?new Map(d):null),a.current=t}return()=>{c(t),c(l)};function c(d){d.forEach((u)=>{let p=ba(u);p==null||p.removeEventListener("scroll",s)})}},[s,t]),fe(()=>{if(t.length)return r?Array.from(r.values()).reduce((l,c)=>yr(l,c),lt):Ji(t);return lt},[t,r])}function Li(t,r){if(r===void 0)r=[];let o=Pe(null);return ue(()=>{o.current=null},r),ue(()=>{let a=t!==lt;if(a&&!o.current)o.current=t;if(!a&&o.current)o.current=null},[t]),o.current?wr(t,o.current):lt}function zp(t){ue(()=>{if(!bn)return;let r=t.map((o)=>{let{sensor:a}=o;return a.setup==null?void 0:a.setup()});return()=>{for(let o of r)o==null||o()}},t.map((r)=>{let{sensor:o}=r;return o}))}function $p(t,r){return fe(()=>t.reduce((o,a)=>{let{eventName:s,handler:l}=a;return o[s]=(c)=>{l(c,r)},o},{}),[t,r])}function Ki(t){return fe(()=>t?fp(t):null,[t])}var Di=[];function jp(t,r){if(r===void 0)r=Nr;let[o]=t,a=Ki(o?Ae(o):null),[s,l]=st(Di);function c(){l(()=>{if(!t.length)return Di;return t.map((u)=>$i(u)?a:new ao(r(u),u))})}let d=io({callback:c});return rt(()=>{d==null||d.disconnect(),c(),t.forEach((u)=>d==null?void 0:d.observe(u))},[t]),s}function Jp(t){if(!t)return null;if(t.children.length>1)return t;let r=t.children[0];return Yr(r)?r:t}function Gp(t){let{measure:r}=t,[o,a]=st(null),s=it((p)=>{for(let{target:m}of p)if(Yr(m)){a((f)=>{let h=r(m);return f?{...f,width:h.width,height:h.height}:h});break}},[r]),l=io({callback:s}),c=it((p)=>{let m=Jp(p);if(l==null||l.disconnect(),m)l==null||l.observe(m);a(m?r(m):null)},[r,l]),[d,u]=vn(c);return fe(()=>({nodeRef:d,rect:o,setRef:u}),[o,d,u])}var Wp=[{sensor:Cn,options:{}},{sensor:Rn,options:{}}],Xp={current:{}},ro={draggable:{measure:Ni},droppable:{measure:Ni,strategy:yn.WhileDragging,frequency:Na.Optimized},dragOverlay:{measure:Nr}};class en 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,o;return(r=(o=this.get(t))==null?void 0:o.node.current)!=null?r:void 0}}var Up={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new en,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:no},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:ro,measureDroppableContainers:no,windowRect:null,measuringScheduled:!1},Kp={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:no,draggableNodes:new Map,over:null,measureDroppableContainers:no},lo=wn(Kp),Yi=wn(Up);function Yp(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new en}}}function qp(t,r){switch(r.type){case me.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:r.initialCoordinates,active:r.active}};case me.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 me.DragEnd:case me.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case me.RegisterDroppable:{let{element:o}=r,{id:a}=o,s=new en(t.droppable.containers);return s.set(a,o),{...t,droppable:{...t.droppable,containers:s}}}case me.SetDroppableDisabled:{let{id:o,key:a,disabled:s}=r,l=t.droppable.containers.get(o);if(!l||a!==l.key)return t;let c=new en(t.droppable.containers);return c.set(o,{...l,disabled:s}),{...t,droppable:{...t.droppable,containers:c}}}case me.UnregisterDroppable:{let{id:o,key:a}=r,s=t.droppable.containers.get(o);if(!s||a!==s.key)return t;let l=new en(t.droppable.containers);return l.delete(o),{...t,droppable:{...t.droppable,containers:l}}}default:return t}}function Zp(t){let{disabled:r}=t,{active:o,activatorEvent:a,draggableNodes:s}=tn(lo),l=Qn(a),c=Qn(o==null?void 0:o.id);return ue(()=>{if(r)return;if(!a&&l&&c!=null){if(!hn(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=gi(m);if(f){f.focus();break}}})}},[a,r,s,c,l]),null}function Qp(t,r){let{transform:o,...a}=r;return t!=null&&t.length?t.reduce((s,l)=>l({transform:s,...a}),o):o}function em(t){return fe(()=>({draggable:{...ro.draggable,...t==null?void 0:t.draggable},droppable:{...ro.droppable,...t==null?void 0:t.droppable},dragOverlay:{...ro.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 tm(t){let{activeNode:r,measure:o,initialRect:a,config:s=!0}=t,l=Pe(!1),{x:c,y:d}=typeof s==="boolean"?{x:s,y:s}:s;rt(()=>{if(!c&&!d||!r){l.current=!1;return}if(l.current||!a)return;let p=r==null?void 0:r.node.current;if(!p||p.isConnected===!1)return;let m=o(p),f=Bi(m,a);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=Fi(p);if(h)h.scrollBy({top:f.y,left:f.x})}},[r,c,d,a,o])}var qi=wn({...lt,scaleX:1,scaleY:1}),nr;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(nr||(nr={}));var Zi=qu(function(r){var o,a,s,l;let{id:c,accessibility:d,autoScroll:u=!0,children:p,sensors:m=Wp,collisionDetection:f=ip,measuring:h,modifiers:R,...x}=r,S=Zu(qp,void 0,Yp),[V,E]=S,[T,k]=tp(),[M,F]=st(nr.Uninitialized),D=M===nr.Initialized,{draggable:{active:A,nodes:B,translate:Z},droppable:{containers:J}}=V,ne=A!=null?B.get(A):null,pe=Pe({initial:null,translated:null}),ce=fe(()=>{var De;return A!=null?{id:A,data:(De=ne==null?void 0:ne.data)!=null?De:Xp,rect:pe}:null},[A,ne]),be=Pe(null),[ke,Ee]=st(null),[le,Fe]=st(null),de=qr(x,Object.values(x)),Me=xr("DndDescribedBy",c),W=fe(()=>J.getEnabled(),[J]),re=em(h),{droppableRects:ee,measureDroppableContainers:xe,measuringScheduled:_e}=Ap(W,{dragging:D,dependencies:[Z.x,Z.y],config:re.droppable}),ye=Mp(B,A),Et=fe(()=>le?eo(le):null,[le]),G=rc(),ze=Op(ye,re.draggable.measure);tm({activeNode:A!=null?B.get(A):null,config:G.layoutShiftCompensation,initialRect:ze,measure:re.draggable.measure});let se=Ti(ye,re.draggable.measure,ze),an=Ti(ye?ye.parentElement:null),dt=Pe({activatorEvent:null,active:null,activeNode:ye,collisionRect:null,collisions:null,droppableRects:ee,draggableNodes:B,draggingNode:null,draggingNodeRect:null,droppableContainers:J,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Tr=J.getNodeFor((o=dt.current.over)==null?void 0:o.id),ht=Gp({measure:re.dragOverlay.measure}),kr=(a=ht.nodeRef.current)!=null?a:ye,Lr=D?(s=ht.rect)!=null?s:se:null,Va=Boolean(ht.nodeRef.current&&ht.rect),Ba=Bp(Va?null:se),ko=Ki(kr?Ae(kr):null),Mt=Fp(D?Tr!=null?Tr:ye:null),Ln=jp(Mt),Dn=Qp(R,{transform:{x:Z.x-Ba.x,y:Z.y-Ba.y,scaleX:1,scaleY:1},activatorEvent:le,active:ce,activeNodeRect:se,containerNodeRect:an,draggingNodeRect:Lr,over:dt.current.over,overlayNodeRect:ht.rect,scrollableAncestors:Mt,scrollableAncestorRects:Ln,windowRect:ko}),Fa=Et?yr(Et,Z):null,_a=_p(Mt),Kl=Li(_a),Yl=Li(_a,[se]),Dr=yr(Dn,Kl),Er=Lr?dp(Lr,Dn):null,sn=ce&&Er?f({active:ce,collisionRect:Er,droppableRects:ee,droppableContainers:W,pointerCoordinates:Fa}):null,za=Ca(sn,"id"),[It,$a]=st(null),ql=Va?Dn:yr(Dn,Yl),Zl=lp(ql,(l=It==null?void 0:It.rect)!=null?l:null,se),_o=Pe(null),ja=it((De,$e)=>{let{sensor:je,options:At}=$e;if(be.current==null)return;let Ke=B.get(be.current);if(!Ke)return;let Ge=De.nativeEvent,ut=new je({active:be.current,activeNode:Ke,event:Ge,options:At,context:dt,onAbort(Ce){if(!B.get(Ce))return;let{onDragAbort:pt}=de.current,xt={id:Ce};pt==null||pt(xt),T({type:"onDragAbort",event:xt})},onPending(Ce,Ot,pt,xt){if(!B.get(Ce))return;let{onDragPending:cn}=de.current,Ht={id:Ce,constraint:Ot,initialCoordinates:pt,offset:xt};cn==null||cn(Ht),T({type:"onDragPending",event:Ht})},onStart(Ce){let Ot=be.current;if(Ot==null)return;let pt=B.get(Ot);if(!pt)return;let{onDragStart:xt}=de.current,ln={activatorEvent:Ge,active:{id:Ot,data:pt.data,rect:pe}};to(()=>{xt==null||xt(ln),F(nr.Initializing),E({type:me.DragStart,initialCoordinates:Ce,active:Ot}),T({type:"onDragStart",event:ln}),Ee(_o.current),Fe(Ge)})},onMove(Ce){E({type:me.DragMove,coordinates:Ce})},onEnd:Mr(me.DragEnd),onCancel:Mr(me.DragCancel)});_o.current=ut;function Mr(Ce){return async function(){let{active:pt,collisions:xt,over:ln,scrollAdjustedTranslate:cn}=dt.current,Ht=null;if(pt&&cn){let{cancelDrop:dn}=de.current;if(Ht={activatorEvent:Ge,active:pt,collisions:xt,delta:cn,over:ln},Ce===me.DragEnd&&typeof dn==="function"){if(await Promise.resolve(dn(Ht)))Ce=me.DragCancel}}be.current=null,to(()=>{E({type:Ce}),F(nr.Uninitialized),$a(null),Ee(null),Fe(null),_o.current=null;let dn=Ce===me.DragEnd?"onDragEnd":"onDragCancel";if(Ht){let zo=de.current[dn];zo==null||zo(Ht),T({type:dn,event:Ht})}})}}},[B]),Ql=it((De,$e)=>(je,At)=>{let Ke=je.nativeEvent,Ge=B.get(At);if(be.current!==null||!Ge||Ke.dndKit||Ke.defaultPrevented)return;let ut={active:Ge};if(De(je,$e.options,ut)===!0)Ke.dndKit={capturedBy:$e.sensor},be.current=At,ja(je,$e)},[B,ja]),Ja=Ip(m,Ql);zp(m),rt(()=>{if(se&&M===nr.Initializing)F(nr.Initialized)},[se,M]),ue(()=>{let{onDragMove:De}=de.current,{active:$e,activatorEvent:je,collisions:At,over:Ke}=dt.current;if(!$e||!je)return;let Ge={active:$e,activatorEvent:je,collisions:At,delta:{x:Dr.x,y:Dr.y},over:Ke};to(()=>{De==null||De(Ge),T({type:"onDragMove",event:Ge})})},[Dr.x,Dr.y]),ue(()=>{let{active:De,activatorEvent:$e,collisions:je,droppableContainers:At,scrollAdjustedTranslate:Ke}=dt.current;if(!De||be.current==null||!$e||!Ke)return;let{onDragOver:Ge}=de.current,ut=At.get(za),Mr=ut&&ut.rect.current?{id:ut.id,rect:ut.rect.current,data:ut.data,disabled:ut.disabled}:null,Ce={active:De,activatorEvent:$e,collisions:je,delta:{x:Ke.x,y:Ke.y},over:Mr};to(()=>{$a(Mr),Ge==null||Ge(Ce),T({type:"onDragOver",event:Ce})})},[za]),rt(()=>{dt.current={activatorEvent:le,active:ce,activeNode:ye,collisionRect:Er,collisions:sn,droppableRects:ee,draggableNodes:B,draggingNode:kr,draggingNodeRect:Lr,droppableContainers:J,over:It,scrollableAncestors:Mt,scrollAdjustedTranslate:Dr},pe.current={initial:Lr,translated:Er}},[ce,ye,sn,Er,B,kr,Lr,ee,J,It,Mt,Dr]),Lp({...G,delta:Z,draggingRect:Er,pointerCoordinates:Fa,scrollableAncestors:Mt,scrollableAncestorRects:Ln});let ec=fe(()=>({active:ce,activeNode:ye,activeNodeRect:se,activatorEvent:le,collisions:sn,containerNodeRect:an,dragOverlay:ht,draggableNodes:B,droppableContainers:J,droppableRects:ee,over:It,measureDroppableContainers:xe,scrollableAncestors:Mt,scrollableAncestorRects:Ln,measuringConfiguration:re,measuringScheduled:_e,windowRect:ko}),[ce,ye,se,le,sn,an,ht,B,J,ee,It,xe,Mt,Ln,re,_e,ko]),tc=fe(()=>({activatorEvent:le,activators:Ja,active:ce,activeNodeRect:se,ariaDescribedById:{draggable:Me},dispatch:E,draggableNodes:B,over:It,measureDroppableContainers:xe}),[le,Ja,ce,se,E,Me,B,It,xe]);return ft.createElement(Mi.Provider,{value:k},ft.createElement(lo.Provider,{value:tc},ft.createElement(Yi.Provider,{value:ec},ft.createElement(qi.Provider,{value:Zl},p)),ft.createElement(Zp,{disabled:(d==null?void 0:d.restoreFocus)===!1})),ft.createElement(op,{...d,hiddenTextDescribedById:Me}));function rc(){let De=(ke==null?void 0:ke.autoScrollEnabled)===!1,$e=typeof u==="object"?u.enabled===!1:u===!1,je=D&&!De&&!$e;if(typeof u==="object")return{...u,enabled:je};return{enabled:je}}}),rm=wn(null),Ei="button",nm="Draggable";function Qi(t){let{id:r,data:o,disabled:a=!1,attributes:s}=t,l=xr(nm),{activators:c,activatorEvent:d,active:u,activeNodeRect:p,ariaDescribedById:m,draggableNodes:f,over:h}=tn(lo),{role:R=Ei,roleDescription:x="draggable",tabIndex:S=0}=s!=null?s:{},V=(u==null?void 0:u.id)===r,E=tn(V?qi:rm),[T,k]=vn(),[M,F]=vn(),D=$p(c,r),A=qr(o);rt(()=>(f.set(r,{id:r,key:l,node:T,activatorNode:M,data:A}),()=>{let Z=f.get(r);if(Z&&Z.key===l)f.delete(r)}),[f,r]);let B=fe(()=>({role:R,tabIndex:S,"aria-disabled":a,"aria-pressed":V&&R===Ei?!0:void 0,"aria-roledescription":x,"aria-describedby":m.draggable}),[a,R,S,V,x,m.draggable]);return{active:u,activatorEvent:d,activeNodeRect:p,attributes:B,isDragging:V,listeners:a?void 0:D,node:T,over:h,setNodeRef:k,setActivatorNodeRef:F,transform:E}}function el(){return tn(Yi)}var om="Droppable",am={timeout:25};function tl(t){let{data:r,disabled:o=!1,id:a,resizeObserverConfig:s}=t,l=xr(om),{active:c,dispatch:d,over:u,measureDroppableContainers:p}=tn(lo),m=Pe({disabled:o}),f=Pe(!1),h=Pe(null),R=Pe(null),{disabled:x,updateMeasurementsFor:S,timeout:V}={...am,...s},E=qr(S!=null?S:a),T=it(()=>{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},V)},[V]),k=io({callback:T,disabled:x||!c}),M=it((B,Z)=>{if(!k)return;if(Z)k.unobserve(Z),f.current=!1;if(B)k.observe(B)},[k]),[F,D]=vn(M),A=qr(r);return ue(()=>{if(!k||!F.current)return;k.disconnect(),f.current=!1,k.observe(F.current)},[F,k]),ue(()=>(d({type:me.RegisterDroppable,element:{id:a,key:l,disabled:o,node:F,rect:h,data:A}}),()=>d({type:me.UnregisterDroppable,key:l,id:a})),[a]),ue(()=>{if(o!==m.current.disabled)d({type:me.SetDroppableDisabled,id:a,key:l,disabled:o}),m.current.disabled=o},[a,l,o,d]),{active:c,rect:h,isOver:(u==null?void 0:u.id)===a,node:F,over:u,setNodeRef:D}}import rl,{useMemo as po,useRef as Sa,useEffect as mo,useState as sm,useContext as im}from"react";function go(t,r,o){let a=t.slice();return a.splice(o<0?a.length+o:o,0,a.splice(r,1)[0]),a}function lm(t,r){return t.reduce((o,a,s)=>{let l=r.get(a);if(l)o[s]=l;return o},Array(t.length))}function co(t){return t!==null&&t>=0}function cm(t,r){if(t===r)return!0;if(t.length!==r.length)return!1;for(let o=0;o<t.length;o++)if(t[o]!==r[o])return!1;return!0}function dm(t){if(typeof t==="boolean")return{draggable:t,droppable:t};return t}var nl=(t)=>{let{rects:r,activeIndex:o,overIndex:a,index:s}=t,l=go(r,a,o),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 uo={scaleX:1,scaleY:1},ol=(t)=>{var r;let{activeIndex:o,activeNodeRect:a,index:s,rects:l,overIndex:c}=t,d=(r=l[o])!=null?r:a;if(!d)return null;if(s===o){let p=l[c];if(!p)return null;return{x:0,y:o<c?p.top+p.height-(d.top+d.height):p.top-d.top,...uo}}let u=um(l,s,o);if(s>o&&s<=c)return{x:0,y:-d.height-u,...uo};if(s<o&&s>=c)return{x:0,y:d.height+u,...uo};return{x:0,y:0,...uo}};function um(t,r,o){let a=t[r],s=t[r-1],l=t[r+1];if(!a)return 0;if(o<r)return s?a.top-(s.top+s.height):l?l.top-(a.top+a.height):0;return l?l.top-(a.top+a.height):s?a.top-(s.top+s.height):0}var al="Sortable",sl=rl.createContext({activeIndex:-1,containerId:al,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:nl,disabled:{draggable:!1,droppable:!1}});function il(t){let{children:r,id:o,items:a,strategy:s=nl,disabled:l=!1}=t,{active:c,dragOverlay:d,droppableRects:u,over:p,measureDroppableContainers:m}=el(),f=xr(al,o),h=Boolean(d.rect!==null),R=po(()=>a.map((D)=>typeof D==="object"&&("id"in D)?D.id:D),[a]),x=c!=null,S=c?R.indexOf(c.id):-1,V=p?R.indexOf(p.id):-1,E=Sa(R),T=!cm(R,E.current),k=V!==-1&&S===-1||T,M=dm(l);rt(()=>{if(T&&x)m(R)},[T,R,x,m]),mo(()=>{E.current=R},[R]);let F=po(()=>({activeIndex:S,containerId:f,disabled:M,disableTransforms:k,items:R,overIndex:V,useDragOverlay:h,sortedRects:lm(R,u),strategy:s}),[S,f,M.draggable,M.droppable,k,R,V,u,h,s]);return rl.createElement(sl.Provider,{value:F},r)}var pm=(t)=>{let{id:r,items:o,activeIndex:a,overIndex:s}=t;return go(o,a,s).indexOf(r)},mm=(t)=>{let{containerId:r,isSorting:o,wasDragging:a,index:s,items:l,newIndex:c,previousItems:d,previousContainerId:u,transition:p}=t;if(!p||!a)return!1;if(d!==l&&s===c)return!1;if(o)return!0;return c!==s&&r===u},fm={duration:200,easing:"ease"},ll="transform",gm=rr.Transition.toString({property:ll,duration:0,easing:"linear"}),bm={roleDescription:"sortable"};function vm(t){let{disabled:r,index:o,node:a,rect:s}=t,[l,c]=sm(null),d=Sa(o);return rt(()=>{if(!r&&o!==d.current&&a.current){let u=s.current;if(u){let p=Nr(a.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(o!==d.current)d.current=o},[r,o,a,s]),mo(()=>{if(l)c(null)},[l]),l}function cl(t){let{animateLayoutChanges:r=mm,attributes:o,disabled:a,data:s,getNewIndex:l=pm,id:c,strategy:d,resizeObserverConfig:u,transition:p=fm}=t,{items:m,containerId:f,activeIndex:h,disabled:R,disableTransforms:x,sortedRects:S,overIndex:V,useDragOverlay:E,strategy:T}=im(sl),k=hm(a,R),M=m.indexOf(c),F=po(()=>({sortable:{containerId:f,index:M,items:m},...s}),[f,s,M,m]),D=po(()=>m.slice(m.indexOf(c)),[m,c]),{rect:A,node:B,isOver:Z,setNodeRef:J}=tl({id:c,data:F,disabled:k.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...u}}),{active:ne,activatorEvent:pe,activeNodeRect:ce,attributes:be,setNodeRef:ke,listeners:Ee,isDragging:le,over:Fe,setActivatorNodeRef:de,transform:Me}=Qi({id:c,data:F,attributes:{...bm,...o},disabled:k.draggable}),W=pi(J,ke),re=Boolean(ne),ee=re&&!x&&co(h)&&co(V),xe=!E&&le,_e=xe&&ee?Me:null,ye=d!=null?d:T,Et=ee?_e!=null?_e:ye({rects:S,activeNodeRect:ce,activeIndex:h,overIndex:V,index:M}):null,G=co(h)&&co(V)?l({id:c,items:m,activeIndex:h,overIndex:V}):M,ze=ne==null?void 0:ne.id,se=Sa({activeId:ze,items:m,newIndex:G,containerId:f}),an=m!==se.current.items,dt=r({active:ne,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}),Tr=vm({disabled:!dt,index:M,node:B,rect:A});return mo(()=>{if(re&&se.current.newIndex!==G)se.current.newIndex=G;if(f!==se.current.containerId)se.current.containerId=f;if(m!==se.current.items)se.current.items=m},[re,G,f,m]),mo(()=>{if(ze===se.current.activeId)return;if(ze!=null&&se.current.activeId==null){se.current.activeId=ze;return}let kr=setTimeout(()=>{se.current.activeId=ze},50);return()=>clearTimeout(kr)},[ze]),{active:ne,activeIndex:h,attributes:be,data:F,rect:A,index:M,newIndex:G,items:m,isOver:Z,isSorting:re,isDragging:le,listeners:Ee,node:B,overIndex:V,over:Fe,setNodeRef:W,setActivatorNodeRef:de,setDroppableNodeRef:J,setDraggableNodeRef:ke,transform:Tr!=null?Tr:Et,transition:ht()};function ht(){if(Tr||an&&se.current.newIndex===M)return gm;if(xe&&!hn(pe)||!p)return;if(re||dt)return rr.Transition.toString({...p,property:ll});return}}function hm(t,r){var o,a;if(typeof t==="boolean")return{draggable:t,droppable:!1};return{draggable:(o=t==null?void 0:t.draggable)!=null?o:r.draggable,droppable:(a=t==null?void 0:t.droppable)!=null?a:r.droppable}}function fo(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 xm=[X.Down,X.Right,X.Up,X.Left],dl=(t,r)=>{let{context:{active:o,collisionRect:a,droppableRects:s,droppableContainers:l,over:c,scrollableAncestors:d}}=r;if(xm.includes(t.code)){if(t.preventDefault(),!o||!a)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 X.Down:if(a.top<h.top)u.push(f);break;case X.Up:if(a.top>h.top)u.push(f);break;case X.Left:if(a.left>h.left)u.push(f);break;case X.Right:if(a.left<h.left)u.push(f);break}});let p=Vi({active:o,collisionRect:a,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(o.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 V=Nn(x).some((D,A)=>d[A]!==D),E=ul(f,h),T=ym(f,h),k=V||!E?{x:0,y:0}:{x:T?a.width-R.width:0,y:T?a.height-R.height:0},M={x:R.left,y:R.top};return k.x&&k.y?M:wr(M,k)}}}return};function ul(t,r){if(!fo(t)||!fo(r))return!1;return t.data.current.sortable.containerId===r.data.current.sortable.containerId}function ym(t,r){if(!fo(t)||!fo(r))return!1;if(!ul(t,r))return!1;return t.data.current.sortable.index<r.data.current.sortable.index}import{Fragment as wm}from"react";import{jsx as or,Fragment as Cm}from"react/jsx-runtime";var Nm=({id:t,label:r,children:o})=>{let{attributes:a,listeners:s,setNodeRef:l,transform:c,transition:d,isDragging:u}=cl({id:t}),p={opacity:u?0.5:1,position:"relative",transform:rr.Transform.toString(c),transition:d,zIndex:u?10:"auto"},m=or("button",{type:"button",className:"touch-none cursor-grab text-muted-foreground/40 hover:text-muted-foreground active:cursor-grabbing",...a,...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:or(Kt,{className:"h-3.5 w-3.5"})});return or("div",{ref:l,style:p,children:o(m)})},Rm=({items:t,onReorder:r,getItemLabel:o,renderItem:a,disabled:s=!1})=>{let l=Ii(Ra(Cn,{activationConstraint:{distance:4}}),Ra(Rn,{coordinateGetter:dl})),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(go(t,m,f))};if(s)return t.map((d)=>or(wm,{children:a(d,null)},d.id));return or(Zi,{sensors:l,collisionDetection:Hi,onDragEnd:c,children:or(il,{items:t.map((d)=>d.id),strategy:ol,children:t.map((d)=>or(Nm,{id:d.id,label:o?.(d),children:(u)=>or(Cm,{children:a(d,u)})},d.id))})})},Sm=Rm;import*as pl from"react";import{jsx as Sn,jsxs as Pa}from"react/jsx-runtime";var ml=({open:t,onOpenChange:r,title:o,description:a,confirmLabel:s,cancelLabel:l="Cancel",confirmVariant:c="default",pendingLabel:d="Processing...",errorContent:u,keepOpenWhilePending:p=!1,onConfirm:m})=>{let[f,h]=pl.useState(!1),R=async()=>{h(!0);try{if(await m()!==!1)r(!1)}catch(x){throw h(!1),x}h(!1)};return Sn(N,{open:t,onOpenChange:(x)=>{if(!(p&&f))r(x)},children:Pa(_,{children:[Pa(U,{children:[Sn(O,{children:o}),Sn(Q,{children:a})]}),u,Pa(Qt,{children:[Sn(n,{variant:"outline",onClick:()=>{r(!1)},disabled:f,children:l}),Sn(n,{variant:c,onClick:()=>{R()},disabled:f,children:f?d:s})]})]})})};ml.displayName="ConfirmDialog";var Pm=ml;import*as gl from"react";import{jsx as bo,jsxs as fl}from"react/jsx-runtime";var bl=gl.forwardRef(function({step:r,total:o,title:a,helper:s,action:l,className:c,...d},u){let p=Boolean(l);return fl("div",{ref:u,className:e("flex flex-wrap items-start justify-between gap-4",c),...d,children:[fl("div",{className:"min-w-0 space-y-1.5",children:[bo(Ar,{tone:"accent",className:"tracking-[0.16em]",children:`Step ${r} of ${o}`}),bo("h2",{className:"text-lg font-semibold tracking-tight",children:a}),bo("p",{className:"max-w-xl text-sm leading-relaxed text-muted-foreground",children:s})]}),p?bo("div",{className:"shrink-0",children:l}):null]})});bl.displayName="StageHeader";var Tm=bl;import{jsx as ar,jsxs as Ta}from"react/jsx-runtime";var km=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)"}}}),Lm=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)"}}}),vo=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==0&&t!==0n&&t!==""&&!Number.isNaN(t),vl=({variant:t="tile",icon:r,label:o,value:a,detail:s,tone:l,className:c,...d})=>{if(t==="compact")return Ta(Xe,{className:e("gap-1 px-4 py-3.5",c),...d,children:[Ta("span",{className:"flex items-center justify-between gap-2",children:[ar("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-(--text-muted)",children:o}),vo(r)?ar("span",{className:e(Lm({tone:l})),"aria-hidden":!0,children:r}):null]}),ar("span",{className:"text-[22px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:a}),vo(s)?ar("span",{className:"text-xs text-(--text-muted)",children:s}):null]});return Ta(Xe,{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:[vo(r)?ar("span",{className:e(km({tone:l})),"aria-hidden":!0,children:r}):null,ar("span",{className:"text-[26px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:a}),ar("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-(--text-muted)",children:o}),vo(s)?ar("span",{className:"text-xs text-(--text-muted)",children:s}):null]})};vl.displayName="StatTile";var Dm=vl;import*as xl from"react";import{jsx as hl,jsxs as Am}from"react/jsx-runtime";var Em={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)"},Mm={danger:"danger",live:"primary",neutral:"neutral",success:"success",warning:"warning"},Im=({tone:t,active:r=!1,label:o,className:a,children:s,...l},c)=>{let d="border-border bg-card text-muted-foreground";if(t)d=Em[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 Am("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,a),...l,children:[t?hl(wt,{tone:Mm[t],pulse:t==="live"}):hl("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??o]})},yl=xl.forwardRef(Im);yl.displayName="StatusPill";var Om=yl;import*as xo from"react";import{jsx as ho,jsxs as Bm}from"react/jsx-runtime";var Hm=i("relative min-w-0",{defaultVariants:{size:"md",variant:"pill"},variants:{size:{md:"",sm:""},variant:{pill:"",plain:""}}}),Vm=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)"}}}),wl=({value:t,defaultValue:r,onValueChange:o,clearLabel:a,variant:s,size:l,className:c,classes:d,...u})=>{let[p,m]=xo.useState(r??""),f=t!==void 0,h=f?t:p,R=xo.useRef(null),x=(S)=>{if(!f)m(S);o?.(S)};return Bm("div",{className:e(Hm({size:l,variant:s}),d?.root,c),children:[ho(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)}),ho(g,{ref:R,type:"search",value:h,onChange:(S)=>{x(S.target.value)},className:e(Vm({size:l,variant:s}),h!==void 0&&h!==""&&a!==void 0?"pr-9":void 0,d?.input),...u}),h!==void 0&&h!==""&&a!==void 0?ho("button",{type:"button","aria-label":a,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:ho(I,{className:"h-3.5 w-3.5"})}):null]})};wl.displayName="SearchField";var Fm=wl;import{createContext as _m,useContext as Nl,useMemo as zm,useState as $m}from"react";import{createPortal as jm}from"react-dom";import{jsx as yo,jsxs as Um}from"react/jsx-runtime";var ka=_m(null),Jm=({children:t})=>{let[r,o]=$m(null),a=zm(()=>({container:r,setContainer:o}),[r]);return yo(ka.Provider,{value:a,children:t})},Rl=({className:t})=>{let r=Nl(ka);return yo("div",{ref:r?.setContainer,className:e("ml-auto flex items-center gap-2 empty:hidden",t)})},Gm=({children:t})=>{let r=Nl(ka);if(r===null)return t;return r.container===null?null:jm(t,r.container)},Wm=({count:t})=>t===void 0?null:yo("span",{className:"text-xs text-muted-foreground tabular-nums",children:t}),Xm=({children:t,className:r})=>Um("div",{className:e("flex flex-wrap items-center gap-3",r),children:[t,yo(Rl,{})]});import{jsx as wo,jsxs as Cl}from"react/jsx-runtime";var Sl=({title:t,description:r,value:o,options:a,onValueChange:s,align:l="center",className:c,...d})=>Cl("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:[Cl("div",{className:"min-w-0",children:[wo("h3",{className:"truncate text-sm font-semibold",children:t}),r!==void 0&&r!==null&&r!==!1&&r!==""&&r!==0?wo("p",{className:"mt-1 text-sm text-muted-foreground",children:r}):null]}),wo("div",{className:"inline-flex shrink-0 rounded-md border border-border bg-background p-1 shadow-xs",children:a.map((u)=>wo(n,{type:"button",size:"sm",variant:u.value===o?"secondary":"ghost",disabled:u.disabled,className:e("h-8 rounded-sm px-3",u.value===o&&"bg-primary/10 text-primary hover:bg-primary/15"),"aria-label":u.ariaLabel,"aria-pressed":u.value===o,onClick:()=>{s(u.value)},children:u.label},u.value))})]});Sl.displayName="SectionSwitcher";import*as gt from"react";import{jsx as ct}from"react/jsx-runtime";var Pl=gt.createContext({value:1}),La=()=>gt.useContext(Pl),Km=({value:t,defaultValue:r=1,indicators:o,className:a,...s})=>{let l=t??r,c=gt.useMemo(()=>({indicators:o,value:l}),[l,o]);return ct(Pl.Provider,{value:c,children:ct("div",{"data-slot":"stepper",className:e("space-y-8",a),...s})})},Ym=({className:t,...r})=>ct("nav",{"data-slot":"stepper-nav","data-orientation":"horizontal",className:e("group/stepper-nav flex items-start justify-between gap-2",t),...r}),Da=gt.createContext({state:"inactive",step:1}),qm=({step:t,loading:r,className:o,...a})=>{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=gt.useMemo(()=>({state:l,step:t}),[l,t]);return ct(Da.Provider,{value:c,children:ct("div",{"data-slot":"stepper-item","data-state":l,"data-step":t,className:e("group/step relative flex-1 items-start",o),...a})})},Zm=({className:t,...r})=>ct("div",{"data-slot":"stepper-trigger",className:e("flex flex-col items-center gap-2.5",t),...r}),Qm=({className:t,children:r,...o})=>{let{indicators:a}=La(),{state:s}=gt.useContext(Da),l=a?.completed,c=a?.loading,d=r;if(s==="completed"&&Boolean(l))d=l;else if(s==="loading"&&Boolean(c))d=c;return ct("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),...o,children:d})},ef=({className:t,...r})=>{let{state:o}=gt.useContext(Da);return ct("span",{"data-slot":"stepper-title","data-state":o,className:e("text-sm font-medium",(o==="completed"||o==="active")&&"text-foreground",o==="inactive"&&"text-muted-foreground",t),...r})},tf=({className:t,...r})=>ct("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}),rf=({className:t,...r})=>ct("div",{"data-slot":"stepper-panel",className:e(t),...r}),nf=({value:t,className:r,...o})=>{let{value:a}=La();if(t!==a)return null;return ct("div",{"data-slot":"stepper-content",className:e(r),...o})};import*as Cr from"react";import{jsx as Rr,jsxs as lf}from"react/jsx-runtime";var Ea=Cr.createContext({}),of=({className:t,size:r,variant:o,...a})=>{let s=Cr.useMemo(()=>({size:r,variant:o}),[r,o]);return Rr(Ea.Provider,{value:s,children:Rr("fieldset",{"data-slot":"split-button",className:e("inline-flex min-w-0 items-stretch",t),...a})})},af=({className:t,...r})=>{let{size:o,variant:a}=Cr.useContext(Ea);return Rr(n,{"data-slot":"split-button-action",className:e("rounded-r-none",t),size:o,variant:a,...r})},sf=({align:t="end",children:r,contentClassName:o,disabled:a,label:s,...l})=>{let{size:c,variant:d}=Cr.useContext(Ea);return lf(Zt,{...l,children:[Rr(Jt,{asChild:!0,children:Rr(n,{"aria-label":s,"data-slot":"split-button-menu",className:"-ml-px rounded-l-none border-l border-l-current/20 px-2",disabled:a,size:c,variant:d,children:Rr(v,{})})}),Rr(er,{align:t,className:o,children:r})]})};import*as rn from"react";import{jsx as bt,jsxs as Ro}from"react/jsx-runtime";var cf=({items:t,title:r,triggerAriaLabel:o="Technical details",copyLabel:a="Copy",trigger:s,align:l="end",side:c="bottom",onCopy:d,className:u,classes:p})=>{let[m,f]=rn.useState(null),h=rn.useRef(null);rn.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 Ro(q,{children:[bt(j,{asChild:!0,children:s??bt(n,{type:"button",variant:"ghost",size:"icon","aria-label":o,className:e("h-8 w-8 text-muted-foreground hover:text-foreground",p?.root,p?.trigger,u),children:bt(Mo,{className:"h-4 w-4"})})}),Ro(K,{align:l,side:c,className:e("w-80 p-3",p?.content),children:[r!==void 0&&r!==null?bt("div",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:r}):null,bt("dl",{className:"space-y-2.5",children:t.map((x)=>Ro("div",{className:e("min-w-0",p?.row),children:[bt("dt",{className:e("text-[11px] font-medium text-muted-foreground",p?.label),children:x.label}),Ro("dd",{className:"mt-0.5 flex min-w-0 items-start gap-1",children:[bt("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:bt(n,{type:"button",variant:"ghost",size:"icon","aria-label":`${a} ${x.label}`,className:"h-6 w-6 shrink-0 text-muted-foreground hover:text-foreground",onClick:()=>{R(x)},children:m===x.label?bt(y,{className:"h-3.5 w-3.5"}):bt(ae,{className:"h-3.5 w-3.5"})})]})]},x.label))})]})]})};var df=cf;import*as nn from"react";import{jsx as Re,jsxs as Tt,Fragment as kl}from"react/jsx-runtime";var uf={disabled:!1,emptyMessage:"No option found.",loading:!1,loadingMessage:"Loading options...",modal:!1,placeholder:"Select option...",searchPlaceholder:"Search...",width:"200px"},pf=1,mf=0.5,ff=(t)=>t.children!==void 0,Ll=(t)=>t.flatMap((r)=>{if(!r.children)return[r];let o=Ll(r.children);return o.length>0?[{...r,children:o}]:[]}),Dl=(t,r=[])=>t.flatMap((o)=>o.children?Dl(o.children,[...r,o]):[{ancestorIds:r.map((a)=>a.id),node:o,path:r.map((a)=>a.label).join(" / ")}]),Tl=(t)=>({paddingLeft:`${mf+t*pf}rem`}),El=nn.forwardRef(function(r,o){let a={...uf,...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:V,onSearchChange:E,modal:T}=a,[k,M]=nn.useState(!1),[F,D]=nn.useState(""),[A,B]=nn.useState(()=>new Set),Z=Ll(s),J=Dl(Z),ne=J.find((W)=>W.node.id===l),pe=F.trim().toLowerCase(),ce=(W)=>{if(W)B(new Set(ne?.ancestorIds));else if(F!=="")D(""),E?.("");M(W)},be=(W)=>{D(W),E?.(W)},ke=(W)=>{B((re)=>{let ee=new Set(re);if(!ee.delete(W))ee.add(W);return ee})},Ee=(W)=>{c(W),ce(!1)},le=(W)=>Tt(kl,{children:[Re(y,{"aria-hidden":!0,className:e(l===W.id?"opacity-100":"opacity-0")}),W.icon]}),Fe=(W,re)=>W.flatMap((ee)=>{if(!ff(ee))return[Tt(ve,{value:ee.id,style:Tl(re),onSelect:()=>{Ee(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),_e=xe?Lo:To;return[Tt(ve,{value:ee.id,"aria-expanded":xe,style:Tl(re),onSelect:()=>{ke(ee.id)},children:[Re(C,{"aria-hidden":!0,className:e(xe&&"rotate-90")}),ee.icon??Re(_e,{"aria-hidden":!0}),Re("span",{className:"min-w-0 truncate",title:ee.label,children:ee.label})]},ee.id),...xe&&ee.children?Fe(ee.children,re+1):[]]}),de=pe===""?[]:J.filter((W)=>E!==void 0||`${W.path} / ${W.node.label}`.toLowerCase().includes(pe)),Me=ne?.node.label??d;return Tt(q,{modal:T,open:k,onOpenChange:ce,children:[Re(j,{asChild:!0,children:Tt(n,{ref:o,id:f,variant:"outline","aria-expanded":k,"aria-busy":S,className:e("justify-between",h),style:{width:R},disabled:x,children:[Me===void 0?Re("span",{className:"min-w-0 truncate text-muted-foreground",children:u}):Re("span",{className:"min-w-0 truncate",children:Me}),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(K,{className:"p-0",style:{width:"var(--radix-popover-trigger-width)"},children:Tt(Qe,{shouldFilter:!1,children:[Re(fr,{"aria-label":p,placeholder:p,value:F,onValueChange:be}),Re(Pt,{className:"max-h-[min(300px,calc(var(--radix-popover-content-available-height)-2.5rem))]",children:S?Tt("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"}),V]}):Tt(kl,{children:[Re(pr,{children:m}),Re(He,{children:pe===""?Fe(Z,0):de.map((W)=>Tt(ve,{value:W.node.id,onSelect:()=>{Ee(W.node.id)},children:[le(W.node),Re("span",{className:"min-w-0 truncate",title:W.node.label,children:W.node.label}),W.path===""?null:Re("span",{className:"ml-auto min-w-0 shrink truncate pl-2 text-xs text-muted-foreground",title:W.path,children:W.path})]},W.node.id))})]})})]})})]})});El.displayName="TreeSelect";import*as Il from"react";import{jsx as Ml,jsxs as bf}from"react/jsx-runtime";var gf=({value:t,state:r="value",trailing:o,monospace:a=!0,className:s,...l},c)=>{let d=r==="secret";return bf("div",{ref:c,className:e("flex min-w-0 items-center gap-2",s),...l,children:[Ml("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:Ml("code",{className:e("block min-w-0 flex-1 overflow-x-auto whitespace-nowrap text-[13px] text-foreground",a?"font-mono":"font-sans"),children:t})}),o]})},Al=Il.forwardRef(gf);Al.displayName="ValueRow";var vf=Al;import{forwardRef as Ol,useCallback as Sr,useLayoutEffect as Hl,useId as hf,useRef as Vl,useState as Oe}from"react";import{jsx as w,jsxs as z,Fragment as Pn}from"react/jsx-runtime";var xf=({mode:t,onModeChange:r,disabled:o})=>z("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)]")}),z("button",{type:"button",role:"tab","aria-selected":t==="linked",disabled:o,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(Ye,{className:"h-3 w-3"}),"Linked"]}),z("button",{type:"button",role:"tab","aria-selected":t==="inline",disabled:o,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(Gt,{className:"h-3 w-3"}),"Inline"]})]}),yf=({variableKey:t,initialValue:r,isSecret:o,loading:a,saving:s,onSubmit:l,onCancel:c})=>{let[d,u]=Oe(r),[p,m]=Oe(!1),f=Vl(null);return Hl(()=>{if(!a)f.current?.focus()},[a]),z("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:[z("div",{className:"flex items-start justify-between gap-2",children:[z("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(I,{className:"h-3.5 w-3.5"})})]}),z("div",{className:"space-y-1",children:[w(P,{htmlFor:"linked-value",className:"text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground",children:o?"Secret value":"Value"}),z("div",{className:"relative",children:[w(g,{ref:f,id:"linked-value",type:p?"text":"password",value:d,onChange:(h)=>{u(h.target.value)},placeholder:a?"Loading current value…":"Enter value",disabled:a||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(Ct,{className:"h-3.5 w-3.5"}):w(Ve,{className:"h-3.5 w-3.5"})})]})]}),z("div",{className:"flex items-center justify-between gap-2 pt-1",children:[z("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(n,{type:"submit",size:"sm",disabled:a||s,className:"h-7 px-3 text-xs",children:s?z(Pn,{children:[w(b,{className:"h-3 w-3 animate-spin"}),"Saving"]}):"Save"})]})]})},wf=({suggestedName:t,onSubmit:r,onCancel:o})=>{let[a,s]=Oe(t),[l,c]=Oe(""),[d,u]=Oe(!0),[p,m]=Oe(!1),f=Vl(null);Hl(()=>{f.current?.focus(),f.current?.select()},[]);let h=a.trim(),R=h.length>0;return z("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(),o()},className:"flex flex-col",children:[z("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:o,"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(jt,{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(St,{className:"h-3 w-3 text-muted-foreground/60"})]}),z("div",{className:"space-y-2.5 px-3 py-2.5",children:[z("div",{className:"space-y-1",children:[w(P,{htmlFor:"var-key",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Name"}),z("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(zt,{className:"h-3 w-3"})}),w(g,{ref:f,id:"var-key",value:a,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})]})]}),z("div",{className:"space-y-1",children:[w(P,{htmlFor:"var-value",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Value"}),z("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(Ct,{className:"h-3.5 w-3.5"}):w(Ve,{className:"h-3.5 w-3.5"})})]})]}),z("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"}),z("span",{className:"flex items-center gap-1",children:[w(zt,{className:"h-3 w-3"}),"Mark as secret"]})]})]}),z("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"})}),z("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?z(Pn,{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"})]})]})},Bl=Ol(function({selected:r,value:o,placeholder:a,disabled:s,open:l,onOpen:c},d){let u=Boolean(o),p=Boolean(r);return z("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(Ye,{className:"h-3 w-3"})}),u?z("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:o}),!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:a}),w(Je,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/60 transition-colors group-hover/trigger:text-muted-foreground"})]})});Bl.displayName="LinkedTrigger";var Nf=({value:t,onChange:r,onBlur:o,placeholder:a,disabled:s,masked:l,inputId:c})=>{let[d,u]=Oe(!1),p=l&&!d?"password":"text";return z("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(Gt,{className:"h-3 w-3"})}),w("input",{id:c,type:p,value:t,onChange:(m)=>{r(m.target.value)},onBlur:o,placeholder:a,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(Ct,{className:"h-3.5 w-3.5"}):w(Ve,{className:"h-3.5 w-3.5"})})]})},Rf=({options:t,value:r,onSelect:o})=>z("div",{className:"px-1",children:[z("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(He,{className:"!p-0 [&_[cmdk-group-heading]]:hidden",children:t.map((a)=>{let s=r===a.key;return z(ve,{value:a.key,keywords:[a.key,a.description??""],onSelect:()=>{o(a.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(zt,{className:"h-3 w-3"})}),z("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:a.key}),a.description!==void 0&&a.description!==""&&w("span",{className:"truncate text-[10.5px] leading-tight text-muted-foreground",children:a.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"})})]},a.key)})})]}),Cf=()=>z("div",{className:"space-y-1.5 px-2 py-3",children:[z("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)=>z("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))]}),Sf=({query:t,canCreate:r,onCreate:o})=>{let a=t.trim();return z("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(zt,{className:"h-4 w-4"})}),z("div",{className:"space-y-0.5",children:[w("p",{className:"text-[12px] font-medium text-foreground",children:a?z(Pn,{children:["No variables match"," ",z("span",{className:"font-mono text-foreground",children:['"',a,'"']})]}):"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&&z(n,{type:"button",size:"sm",variant:"outline",onClick:o,className:"mt-1 h-7 text-[11px]",children:[w(St,{className:"h-3 w-3"}),a?`Create "${a.toUpperCase().replaceAll(/[^A-Z0-9_]/gu,"_")}"`:"Create variable"]})]})},Pf=({options:t,optionsLoading:r,optionsFetching:o,value:a,query:s,onQueryChange:l,onSelect:c,onCreate:d,suggestedName:u,showCreate:p,onShowCreate:m})=>{if(p&&d)return w(wf,{suggestedName:u??s.trim(),onSubmit:(h)=>{d(h)},onCancel:()=>{m(!1)}});let f=w(Rf,{options:t,value:a,onSelect:c});if(r)f=w(Cf,{});else if(t.length===0)f=w(Sf,{query:s,canCreate:Boolean(d),onCreate:()=>{m(!0)}});return z("div",{className:"flex flex-col",children:[z("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"}),z("div",{className:"flex h-4 w-4 items-center justify-center",children:[o&&!r&&w(b,{className:"h-3 w-3 animate-spin text-muted-foreground/70"}),!o&&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(I,{className:"h-3 w-3"})})]})]}),w(Qe,{shouldFilter:!1,className:"rounded-none bg-transparent",loop:!0,children:w(Pt,{className:"max-h-[280px] py-1",children:f})}),d&&z("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(St,{className:"h-3 w-3"})}),z("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"})]})]})},Tf=Ol(function({value:r,mode:o,onChange:a,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:V},E){let[T,k]=Oe(!1),[M,F]=Oe(""),[D,A]=Oe(!1),[B,Z]=Oe(!1),[J,ne]=Oe(null),[pe,ce]=Oe(!1),[be,ke]=Oe(!1),[Ee,le]=Oe(null),Fe=hf(),de=Sr((G)=>{if(G===o)return;a("",G),A(!1),F("")},[o,a]),Me=Sr((G)=>{a(G===r?"":G,"linked"),k(!1),A(!1)},[r,a]),W=Sr((G)=>{a(G,"inline")},[a]),re=Sr(async(G)=>{if(!p)return;let ze=await p(G);A(!1),k(!1),a(ze.key,"linked")},[p,a]),ee=Sr(async()=>{if(!r||!m)return;Z(!0),ce(!0),le(null);try{let G=await m(r);ne(G??{key:r,secret:!0,value:null})}catch(G){le(G instanceof Error?G.message:"Failed to load variable"),ne({key:r,secret:!0,value:null})}ce(!1)},[r,m]),xe=Sr(async(G)=>{if(!f||!r)return;ke(!0);try{await f({key:r,value:G}),Z(!1)}catch(ze){throw ke(!1),ze}ke(!1)},[f,r]),_e=Sr((G)=>{F(G),u?.(G)},[u]),ye=l.find((G)=>G.key===r),Et=o==="linked"&&Boolean(r)&&Boolean(f);return z("div",{className:e("space-y-1.5",V),children:[z("div",{className:"flex items-center gap-1.5",children:[w("div",{className:"min-w-0 flex-1",children:o==="linked"?z(q,{open:T,onOpenChange:(G)=>{if(k(G),!G)A(!1),s?.()},modal:!0,children:[w(j,{asChild:!0,children:w(Bl,{ref:E,selected:ye,value:r,placeholder:R,disabled:x,open:T,onOpen:()=>{k(!0)}})}),w(K,{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(Pf,{options:l,optionsLoading:Boolean(c),optionsFetching:Boolean(d),value:r,query:M,onQueryChange:_e,onSelect:Me,onCreate:p?re:void 0,suggestedName:h,showCreate:D,onShowCreate:A})})]}):w(Nf,{inputId:Fe,value:r,onChange:W,onBlur:()=>s?.(),placeholder:R||"Enter value",disabled:x,masked:S})}),Et&&z(q,{open:B,onOpenChange:(G)=>{if(Z(G),!G)ne(null),le(null);else if(!J)ee()},modal:!0,children:[w(j,{asChild:!0,children:w(n,{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(Gt,{className:"h-3.5 w-3.5"})})}),z(K,{align:"end",side:"bottom",sideOffset:6,className:"w-80 p-0 shadow-lg",children:[Ee!==null&&Ee!==""&&w("div",{className:"border-b border-destructive/30 bg-destructive/5 px-3 py-2 text-[11px] text-destructive",children:Ee}),w(yf,{variableKey:r,initialValue:J?.value??"",isSecret:J?.secret??!0,loading:pe,saving:be,onSubmit:(G)=>{xe(G)},onCancel:()=>{Z(!1)}},`${r}:${J?.value??""}`)]})]}),w(xf,{mode:o,onModeChange:de,disabled:x})]}),w("p",{className:"flex items-center gap-1.5 text-[10.5px] leading-tight text-muted-foreground/80",children:o==="linked"?z(Pn,{children:[w(Ye,{className:"h-3 w-3"}),w("span",{children:"Reads from an org variable. Rotate values in one place; every connector picks it up."})]}):z(Pn,{children:[w(Gt,{className:"h-3 w-3"}),z("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 kf}from"react";import{jsx as Co,jsxs as Ma}from"react/jsx-runtime";var Lf=(t)=>{let r="",o=0,a=" ",s=t.replaceAll(/>\s*</gu,`>
|
|
7
7
|
<`).split(`
|
|
8
|
-
`);for(let l of s){let c=l.trim();if(!c)continue;if(c.startsWith("</"))
|
|
9
|
-
`,c.startsWith("<")&&!c.startsWith("</")&&!c.startsWith("<?")&&!c.endsWith("/>")&&!/<\/[^>]+>$/u.test(c))
|
|
8
|
+
`);for(let l of s){let c=l.trim();if(!c)continue;if(c.startsWith("</"))o=Math.max(0,o-1);if(r+=`${a.repeat(o)+c}
|
|
9
|
+
`,c.startsWith("<")&&!c.startsWith("</")&&!c.startsWith("<?")&&!c.endsWith("/>")&&!/<\/[^>]+>$/u.test(c))o+=1}return r.trim()},Df=({open:t,onOpenChange:r,title:o="XML Viewer",data:a})=>{let s=kf(()=>Lf(a??""),[a]);return Co(N,{open:t,onOpenChange:r,children:Ma(_,{className:"max-w-2xl max-h-[80vh] flex flex-col",children:[Ma(U,{className:"flex flex-row items-center justify-between gap-2",children:[Co(O,{children:o}),Ma(n,{type:"button",variant:"outline",size:"sm",onClick:()=>{navigator.clipboard.writeText(s),ge.success("Copied to clipboard")},children:[Co(ae,{className:"h-3.5 w-3.5 mr-1"}),"Copy"]})]}),Co("pre",{className:"min-h-0 flex-1 overflow-auto rounded-md bg-muted p-4 text-xs font-mono whitespace-pre",children:s})]})})};import{jsx as on,jsxs as Ia}from"react/jsx-runtime";var Ef=({title:t,children:r,details:o,className:a,defaultOpen:s=!1,classes:l,...c})=>Ia(lr,{variant:"destructive",className:e("border-destructive/25 bg-destructive/5","has-[>svg]:grid-cols-[1rem_minmax(0,1fr)]",l?.root,a),children:[on(qt,{"aria-hidden":"true"}),t!==void 0&&t!==null&&on(cr,{className:e("line-clamp-none min-w-0 break-words text-foreground",l?.title),children:t}),on(dr,{className:e("min-w-0 break-words",l?.message),children:r}),o!==void 0&&Ia(Ie,{...c,defaultOpen:s,className:e("col-start-2 mt-3 min-w-0",l?.details),children:[Ia(Le,{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",l?.trigger),children:[on(v,{"aria-hidden":"true",className:"size-3.5 shrink-0 transition-transform group-data-[state=open]:rotate-180 motion-reduce:transition-none"}),o.label]}),on(Te,{children:on("div",{className:e("mt-3 min-w-0 rounded-md border border-border bg-background/70 p-3 text-sm text-foreground",l?.content),children:o.content})})]})]});import{jsx as Lt,jsxs as Aa,Fragment as Of}from"react/jsx-runtime";var Fl=(t)=>Math.max(0,Math.min(100,Math.round(t))),Oa=(t)=>Fl(t.value??0),Mf=(t)=>{if(t.length===0)return 0;return Fl(t.reduce((r,o)=>r+Oa(o),0)/t.length)},If=({lane:t})=>{let r=t.fillClassName??"bg-primary";if(t.mode==="indeterminate")return Aa(Of,{children:[Lt("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"}}),Lt("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 Lt("div",{className:e("h-full transition-all",r),style:{width:`${Oa(t)}%`}})},
|
|
20
|
+
}`})]});return Lt("div",{className:e("h-full transition-all",r),style:{width:`${Oa(t)}%`}})},Af=({className:t,detail:r,label:o,lanes:a})=>{let s=a.some((c)=>c.mode==="indeterminate"),l=Mf(a);return Aa("div",{className:e("flex w-full min-w-0 max-w-full flex-col gap-1.5",t),children:[Aa("div",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-baseline gap-3",children:[Lt("span",{className:"truncate text-xs font-medium",title:o,children:o}),r!==null&&r!==void 0&&r!==""?Lt("span",{className:"shrink-0 text-[11px] text-muted-foreground",title:r,children:r}):null]}),Lt("progress",{"aria-label":o,className:"sr-only",max:100,value:s?void 0:l}),Lt("div",{"aria-hidden":"true",className:"flex h-2 w-full gap-0.5","data-slot":"lane-progress",children:a.map((c,d)=>Lt("div",{className:"relative min-w-0 flex-1 overflow-hidden rounded-full bg-muted","data-mode":c.mode??"determinate","data-slot":"lane-progress-lane","data-value":Oa(c),children:Lt(If,{lane:c})},d))})]})};import*as _l from"react";import{jsx as oe,jsxs as ot}from"react/jsx-runtime";var Pr=(t)=>Boolean(t)&&t!==0,Hf=({context:t})=>oe("div",{className:"sr-only","data-slot":"lifecycle-status-card-status","aria-live":"polite",children:t.statusLabel}),Vf=({error:t})=>{let[r,o]=_l.useState(!1);return ot(lr,{variant:t.tone==="destructive"?"destructive":"default","data-slot":"lifecycle-status-card-error",children:[oe(he,{"aria-hidden":!0}),Pr(t.title)?oe(cr,{children:t.title}):null,ot(dr,{children:[Pr(t.summary)?oe("p",{children:t.summary}):null,Pr(t.detail)?ot("div",{className:"mt-2 space-y-2",children:[oe(n,{"aria-expanded":r,onClick:()=>{o((a)=>!a)},size:"sm",type:"button",variant:"link",children:r?"Hide details":"Show details"}),r?oe("p",{className:"whitespace-pre-wrap break-words rounded-md bg-muted/50 p-2 text-foreground",children:t.detail}):null]}):null]})]})},Bf=(t)=>Object.prototype.toString.call(t)==="[object Function]",Dt=(t,r)=>Bf(t)?t(r):t,Ff=(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},_f=(t)=>{if(t==="danger")return"destructive";return t==="success"?"soft":"outline"},zf=(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"}},$f=(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"}},jf=({model:t})=>oe("span",{className:e("flex size-9 items-center justify-center rounded-md border",zf(t.tone)),children:oe("span",{className:e("flex size-4 items-center justify-center",t.iconAnimated===!0&&"animate-spin"),"aria-hidden":!0,children:t.icon})}),Jf=({model:t})=>{let{progress:r}=t,o=Ff(r),a=r?.label??t.currentStep;if(!r&&!Pr(a))return null;return ot("div",{className:"space-y-2","data-slot":"lifecycle-status-card-progress",children:[ot("div",{className:"flex min-h-5 items-center justify-between gap-3 text-sm",children:[oe("span",{className:"min-w-0 truncate text-muted-foreground",children:a??"Waiting for updates"}),r?.completed!==void 0&&r.total!==void 0?ot("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:[r.completed," of ",r.total]}):null]}),o===void 0?ot("div",{"aria-label":"Progress",className:"relative h-2 overflow-hidden rounded-full bg-primary/15","data-progress-mode":"indeterminate",children:[oe("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"}}),oe("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
|
+
}`})]}):oe(Oo,{"aria-label":"Progress","data-progress-mode":"determinate",value:o})]})},Gf=({milestones:t})=>{if(t===void 0||t.length===0)return null;return oe("ol",{className:"space-y-3","data-slot":"lifecycle-status-card-milestones",children:t.map((r)=>ot("li",{className:"grid grid-cols-[auto_1fr] gap-3",children:[oe("span",{"aria-hidden":!0,className:e("mt-1.5 size-2 rounded-full",$f(r.tone))}),ot("div",{className:"min-w-0",children:[oe("div",{className:"text-sm font-medium leading-5 text-foreground",children:r.label}),Pr(r.description)?oe("div",{className:"text-sm leading-5 text-muted-foreground",children:r.description}):null]})]},r.id))})},Wf=({context:t,slots:r})=>ot("div",{className:"grid grid-cols-[auto_1fr] gap-3 sm:grid-cols-[auto_1fr_auto]",children:[oe("div",{className:"pt-0.5",children:Dt(r?.icon,t)??oe(jf,{model:t.model})}),ot("div",{className:"min-w-0 space-y-1",children:[oe("h3",{className:"text-[15px] font-semibold leading-6 text-foreground",children:Dt(r?.title,t)??t.title}),oe("div",{className:"text-sm leading-6 text-muted-foreground",children:Dt(r?.description,t)??t.description})]}),oe(L,{className:"col-start-2 w-fit sm:col-start-auto",variant:_f(t.model.tone),children:t.statusLabel})]}),Xf=({model:t,slots:r,className:o,...a})=>{let s={description:t.description,model:t,statusLabel:t.statusLabel,title:t.title},l=Dt(r?.actions,s),c=Dt(r?.completedState,s)??t.completedState,d=oe(Xe,{className:e("w-full gap-0 overflow-hidden py-0",o),"data-status-tone":t.tone??"default",...a,children:ot(No,{className:"space-y-5 p-5 sm:p-6",children:[oe(Hf,{context:s}),Dt(r?.header,s)??oe(Wf,{context:s,slots:r}),Dt(r?.progressBody,s)??oe(Jf,{model:t}),Dt(r?.milestoneList,s)??oe(Gf,{milestones:t.milestones}),Pr(c)?oe("div",{"data-slot":"lifecycle-status-card-completed",children:c}):null,t.error?Dt(r?.errorPanel,s)??oe(Vf,{error:t.error}):null,Pr(l)?oe("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:l}):null]})});return r?.shell?r.shell({...s,children:d}):d};import*as $l from"react";import{jsx as zl}from"react/jsx-runtime";var Uf=({rows:t=5,rowClassName:r,className:o,...a},s)=>zl("div",{ref:s,"aria-label":"Loading",className:e("flex flex-col gap-2",o),...a,children:Array.from({length:t}).map((l,c)=>zl(Wt,{className:e("h-10 w-full",r)},c))}),jl=$l.forwardRef(Uf);jl.displayName="SkeletonRows";var Kf=jl;import*as Gl from"react";import{jsx as Tn,jsxs as Jl}from"react/jsx-runtime";var Wl=Gl.forwardRef(function({icon:r,illustration:o,title:a,description:s,action:l,secondaryAction:c,size:d="md",variant:u="bare",className:p,...m},f){let h=d==="sm",R=Boolean(o),x=!h&&!R,S=r??Tn(Eo,{className:"h-6 w-6"}),V=Boolean(s),E=Boolean(l)||Boolean(c),T=null;if(R)T=Tn("div",{className:e("flex items-center justify-center","[&_svg]:w-auto",h?"mb-3 [&_svg]:h-16":"mb-5 [&_svg]:h-24"),children:o});else if(x)T=Tn("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-md bg-(--bg-accent-soft) text-(--accent)",children:S});return Jl("div",{ref:f,"data-slot":"empty-state","data-size":d,"data-variant":u,className:e("mx-auto flex w-full max-w-130 flex-col items-center justify-center rounded-lg px-6 text-center",u==="framed"&&"border border-dashed border-(--border-default)",h?"py-8":"px-8 py-14",p),...m,children:[T,Tn("h3",{className:e("font-semibold text-(--text-primary)",h?"text-[14px]":"text-[15px]"),children:a}),V?Tn("p",{className:e("mt-1 max-w-sm leading-relaxed text-(--text-secondary)",h?"text-[12px]":"text-[13px]"),children:s}):null,E?Jl("div",{className:e("flex flex-wrap items-center justify-center gap-2",h?"mt-4":"mt-5"),children:[l,c]}):null]})});Wl.displayName="EmptyState";var Yf=Wl;import*as Xl from"react";import{jsx as vt,jsxs as kn,Fragment as Zf}from"react/jsx-runtime";var qf=(t)=>Object.prototype.toString.call(t)==="[object String]",Ul=Xl.forwardRef(function({title:r="Something went wrong",message:o,detail:a,detailLabel:s="Show technical details",detailHeading:l="Inner error detail",defaultOpen:c=!1,className:d,...u},p){let m=Boolean(a);return vt(Ie,{ref:p,defaultOpen:c&&m,"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)]",d),...u,children:kn("div",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-3",children:[vt("span",{className:"mt-0.5 flex size-7 items-center justify-center rounded-md bg-destructive/10 text-destructive",children:vt(he,{className:"size-4","aria-hidden":"true"})}),kn("div",{className:"min-w-0",children:[vt("div",{className:"font-semibold text-foreground",children:r}),vt("div",{className:"mt-1 leading-6 text-muted-foreground",children:o}),m?kn(Zf,{children:[kn(Le,{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:[vt(v,{className:"size-3.5 transition-transform group-data-[state=open]:rotate-180","aria-hidden":"true"}),s]}),vt(Te,{children:kn("div",{className:"mt-3 rounded-md border border-destructive/15 bg-background/70 p-3",children:[vt("div",{className:"mb-2 text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground",children:l}),qf(a)?vt("pre",{className:"max-h-52 overflow-auto whitespace-pre-wrap break-words font-mono text-xs leading-5 text-foreground",children:a}):vt("div",{className:"text-xs leading-5 text-foreground",children:a})]})})]}):null]})]})})});Ul.displayName="TechnicalErrorDisclosure";var Qf=Ul;import{jsx as Ha,jsxs as tg}from"react/jsx-runtime";var eg=({icon:t,title:r="Loading...",className:o,spinnerSize:a=30})=>tg("div",{className:e("min-h-screen flex flex-col items-center justify-center gap-6 bg-background",o),children:[t!==void 0&&t!==null&&t!==!1&&t!==""&&t!==0&&Ha("div",{children:t}),Ha("h1",{className:"text-2xl font-semibold text-center",children:r}),Ha(Rt,{size:a})]}),rg=eg;import{jsx as So,jsxs as og}from"react/jsx-runtime";var ng=({children:t,className:r,classes:o,loading:a=!1,coverImage:s})=>So("div",{className:e("min-h-screen flex items-center justify-center",o?.root,r),children:og("div",{className:e("flex flex-col md:flex-row w-full min-h-[100vh] max-h-[100vh] overflow-hidden",o?.content),children:[So("div",{className:e("hidden md:flex flex-1 items-center justify-center overflow-hidden bg-black",o?.left),children:s}),So("div",{className:e("flex-1 flex flex-col items-center justify-center gap-4 bg-background p-6 md:p-8",o?.right),children:a?So(Rt,{size:48}):t})]})}),ag=ng;export{sc as ActionButton,cc as AddItemButton,rg as AppLoadingLayout,fd as ArrayInput,$n as CardOption,Es as CardOptionsBlock,Fd as CheckboxCardOption,Vd as ChoiceCard,Hd as ChoiceCardGroup,xc as CollectiveIntelligenceLoader,zd as CommandStep,Pm as ConfirmDialog,vc as CopyButton,Id as CoverImage,Ld as CronBuilder,Jd as CurrencyInput,mc as DateInput,bc as DisplayHeading,Yf as EmptyState,Ef as ErrorAlert,Nc as ErrorMessage,Gd as FieldRow,Qd as FileDropArea,ru as FilterChips,su as FlowBand,cu as FlowBranch,iu as FlowStep,Kc as FormFrame,Sc as FormattedNumber,Zc as Grid,mu as GuideStep,bu as HierarchyTree,Ys as HierarchyTreeBody,Ks as HierarchyTreeHeader,qs as HierarchyTreeRow,Zs as HierarchyTreeToggle,Lc as IconTile,la as JsonViewer,Iu as JsonViewerDialog,Ic as Kicker,aa as LabeledField,Af as LaneProgress,Xf as LifecycleStatusCard,Ou as LinkedItem,Eu as MarkdownEditorPreview,Qs as MarkdownEditorPreviewToggle,Vu as MaskedValue,Fu as MutedPlaceholder,Ju as ObjectSchemaExplorer,rd as PageRoot,ad as PageTitle,Bd as RadioCardOption,Ms as RadioCardOptionsBlock,Fr as Ring,Fm as SearchField,sd as SectionHeader,Sl as SectionSwitcher,zc as SerifNumeral,Vc as ShowMoreTag,Kf as SkeletonRows,Sm as SortableList,ag as SplashScreenLayout,of as SplitButton,af as SplitButtonAction,sf as SplitButtonMenu,Tm as StageHeader,Dm as StatTile,wa as StatusDot,Om as StatusPill,Km as Stepper,nf as StepperContent,Qm as StepperIndicator,qm as StepperItem,Ym as StepperNav,rf as StepperPanel,tf as StepperSeparator,ef as StepperTitle,Zm as StepperTrigger,Od as SummaryItem,Ad as SummaryList,Gm as TabActions,Xm as TabActionsRow,Jm as TabActionsScope,Rl as TabActionsSlot,Wm as TabCount,cd as TableHead,df as TechnicalDetailsPopover,Qf as TechnicalErrorDisclosure,Zo as ThemeToggle,Fn as TimezonePicker,Jc as TooltipBadge,El as TreeSelect,In as Typography,vf as ValueRow,Tf as VariableReferenceField,Df as XmlViewerDialog,Ft as buildCron,tt as defaultSimpleState,Vn as describeCron,Ya as displayHeadingVariants,Qo as getTimezoneOptions,Yo as isValidCron,mn as parseCron,vr as useIsMobile};
|