@collective-intelligence/ui-react 0.3.4 → 0.3.7
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 +133 -3
- package/dist/chat.d.ts +578 -0
- package/dist/chat.js +2 -0
- package/dist/components/icons/index.js +1 -1
- package/dist/components/illustrations/index.js +1 -1
- package/dist/components/ui/index.d.ts +28 -17
- package/dist/components/ui/index.js +2 -2
- package/dist/components/ui-extensions/atoms/ThemeToggle/index.js +1 -1
- package/dist/components/ui-extensions/hooks/use-mobile.js +1 -1
- package/dist/components/ui-extensions/index.d.ts +6 -6
- package/dist/components/ui-extensions/index.js +5 -5
- 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-y2h3pwvb.js → index-07wswd5f.js} +2 -2
- package/dist/index-1wmmfj25.js +2 -0
- package/dist/index-2thxhq0q.js +2 -0
- package/dist/index-3yxm33ex.js +42 -0
- package/dist/index-4ekvdxt4.js +2 -0
- package/dist/{index-r4k327de.js → index-4mm4a7nt.js} +2 -2
- package/dist/{index-dhysnhdt.js → index-590xzssr.js} +2 -2
- package/dist/index-7fcrqgn8.js +2 -0
- package/dist/index-99ad0xy6.js +2 -0
- package/dist/index-9at1018y.js +2 -0
- package/dist/index-9az9jb0y.js +2 -0
- package/dist/index-9me7rg96.js +2 -0
- package/dist/{index-t5c4bv5n.js → index-aahc5q93.js} +2 -2
- package/dist/index-adta20n6.js +2 -0
- package/dist/index-b3s2d1rk.js +2 -0
- package/dist/index-e105w3b8.js +2 -0
- package/dist/index-ek4ar1qs.js +2 -0
- package/dist/{index-38vsn5nv.js → index-hcecckjn.js} +2 -2
- package/dist/index-md173efw.js +2 -0
- package/dist/{index-fwsd4nes.js → index-mp8nkq9m.js} +2 -2
- package/dist/index-mxgt32b6.js +2 -0
- package/dist/index-n43k1xpt.js +6 -0
- package/dist/index-nadagexv.js +2 -0
- package/dist/{index-cx7rgb00.js → index-q04zgt5k.js} +2 -2
- package/dist/index-rbdjqvhp.js +2 -0
- package/dist/index-rvwx0vhw.js +2 -0
- package/dist/index-v31zghad.js +2 -0
- package/dist/index-vejf6hg0.js +2 -0
- package/dist/{index-a27yrhds.js → index-wwq9v1me.js} +2 -2
- package/dist/index.js +1 -1
- package/dist/resources.js +1 -1
- package/dist/styles.css +2 -0
- package/dist/tokens/theme.js +1 -1
- package/dist/utils/cn.js +1 -1
- package/package.json +22 -6
- package/dist/index-0warxk1d.js +0 -2
- package/dist/index-1qb5701q.js +0 -2
- package/dist/index-38vag578.js +0 -2
- package/dist/index-3y40hfmd.js +0 -2
- package/dist/index-4d90e50j.js +0 -2
- package/dist/index-50g897x2.js +0 -42
- package/dist/index-58jcemv5.js +0 -2
- package/dist/index-956qe6w8.js +0 -2
- package/dist/index-dcmmdjnn.js +0 -2
- package/dist/index-k8bsc1hv.js +0 -2
- package/dist/index-kgq1r8sg.js +0 -2
- package/dist/index-rvcf3zsv.js +0 -2
- package/dist/index-s18na57g.js +0 -6
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{mr,yt,hr,ne,gr,zt,He,pe,vr,xr,br,yr,Sr,lt,St,ct,Ge,Cr,wr,$e}from"../../index-956qe6w8.js";import{f,n}from"../../index-50g897x2.js";import{p,m}from"../../index-0warxk1d.js";import{k,E,G,or,M,Q,h,y,z,J,ee,te}from"../../index-3y40hfmd.js";import{Ke,je,Ye,wt,ie,Xe,D,se,Ze,me,Qe,Z,N,R,L,I,pt,Je,It,Pt,Tt,kt,Et,Mt,At,Dt,Nt,_t,Ot,Ve,et,tt,rt,Bt,Ut,mt,ht,Ht,Gt}from"../../index-s18na57g.js";import{ot,at,nt}from"../../index-dcmmdjnn.js";import{nr}from"../../index-rvcf3zsv.js";import{gt}from"../../index-r4k327de.js";import{ut,T,dt,Oe,Fe,ft,Be}from"../../index-1qb5701q.js";import{v,x}from"../../index-4d90e50j.js";import"../../index-a27yrhds.js";import{e}from"../../index-fwsd4nes.js";import{jsx as pc,jsxs as mc}from"react/jsx-runtime";var uc=({children:t,loading:r=!1,fullWidth:o=!1,className:a,disabled:s,variant:i,size:l,...c})=>mc(n,{variant:i,size:l,className:e(o&&"w-full",a),disabled:s===!0||r,...c,children:[r&&pc($e,{size:20,className:"mr-2"}),t]}),fc=uc;import*as Wa from"react";import{jsx as Ga,jsxs as bc}from"react/jsx-runtime";var gc=({children:t,className:r,type:o="button",...a},s)=>bc(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(Ge,{className:"size-3.5"})}),t]}),Kn=Wa.forwardRef(gc);Kn.displayName="AddItemButton";var vc=Kn;import{forwardRef as hc}from"react";import{jsx as yc}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},xc=(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:i,day:l}=o.groups??{};return Xa(Number(s),Number(i),Number(l))?`${s}-${i}-${l}`:null}let a=/^(?<day>\d{1,2})[/\-.](?<month>\d{1,2})[/\-.](?<year>\d{4})$/u.exec(r);if(a){let{day:s,month:i,year:l}=a.groups??{},c=Number(s),d=Number(i),u=Number(l);if(!Xa(u,d,c))return null;return`${u}-${String(d).padStart(2,"0")}-${String(c).padStart(2,"0")}`}return null},Ua=hc(function({onPaste:r,...o},a){return yc(h,{ref:a,type:"date",onPaste:(i)=>{let l=i.clipboardData.getData("text"),c=xc(l);if(c!==null&&c!==""){i.preventDefault();let d=i.currentTarget,u=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.bind(d);if(u!==void 0)u(c),d.dispatchEvent(new Event("input",{bubbles:!0}))}r?.(i)},...o})});Ua.displayName="DateInput";var wc=Ua;import*as Ka from"react";import{jsx as Rc}from"react/jsx-runtime";var Ya=f("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]"}}}),Nc=({as:t="h2",size:r,className:o,...a},s)=>Rc(t,{ref:s,className:e(Ya({size:r}),o),...a}),qa=Ka.forwardRef(Nc);qa.displayName="DisplayHeading";var Cc=qa;import*as Er from"react";import{jsx as on,jsxs as Qa,Fragment as Za}from"react/jsx-runtime";var Yn=Er.forwardRef(function({value:r,label:o,variant:a="icon",copyLabel:s="Copy",copiedLabel:i="Copied",errorMessage:l="Failed to copy to clipboard",resetDelay:c=1500,className:d,onClick:u,...g},b){let[w,P]=Er.useState(!1),C=Er.useRef(null);Er.useEffect(()=>()=>{if(C.current!==null)clearTimeout(C.current)},[]);let A=async(j)=>{u?.(j);try{if(await navigator.clipboard.writeText(r),P(!0),C.current!==null)clearTimeout(C.current);C.current=setTimeout(()=>{P(!1)},c)}catch{D.error(l)}};if(a==="button")return on(n,{ref:b,type:"button",variant:"outline",onClick:(j)=>{A(j)},"aria-label":`Copy ${o}`,className:e("shrink-0",d),...g,children:w?Qa(Za,{children:[on(p,{className:"mr-1 size-4"}),i]}):Qa(Za,{children:[on(ne,{className:"mr-1 size-4"}),s]})});return on("button",{ref:b,type:"button",onClick:(j)=>{A(j)},"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",d),...g,children:w?on(p,{className:"size-3.5 text-primary"}):on(ne,{className:"size-3.5"})})});Yn.displayName="CopyButton";var Sc=Yn;import{jsx as Xo,jsxs as Pc}from"react/jsx-runtime";var es="#a3d54a",ts=({className:t,...r})=>Pc("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:[Xo("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}),Xo("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}),Xo("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 Tc=ts;import{jsx as Lc}from"react/jsx-runtime";var kc=({children:t,className:r})=>Lc("div",{className:e("text-destructive text-sm text-center",r),children:t}),Dc=kc;import*as rs from"react";import{jsx as Mc}from"react/jsx-runtime";var Ec=({value:t,fallback:r="—",locale:o,className:a,...s},i)=>Mc("span",{ref:i,className:e("tabular-nums",a),...s,children:t===null||t===void 0?r:new Intl.NumberFormat(o).format(t)}),ns=rs.forwardRef(Ec);ns.displayName="FormattedNumber";var Ic=ns;import*as os from"react";import{jsx as Hc}from"react/jsx-runtime";var Ac={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))]"},Oc={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:i,...l},c){return Hc("span",{ref:c,"aria-hidden":!0,className:e("inline-flex shrink-0 select-none items-center justify-center border font-display font-bold",Oc[o],Ac[r],s),...l,children:i??(a!==void 0&&a!==""?a.slice(0,2).toUpperCase():null)})});as.displayName="IconTile";var Vc=as;import*as ss from"react";import{jsx as _c}from"react/jsx-runtime";var Bc={accent:"text-(--accent)",copper:"text-(--text-muted)",default:"text-(--text-muted)",muted:"text-(--text-muted)"},Fc=({as:t="span",tone:r="default",className:o,...a},s)=>_c(t,{ref:s,className:e("inline-block text-[11px] font-semibold uppercase tracking-[0.06em]",Bc[r],o),...a}),an=ss.forwardRef(Fc);an.displayName="Kicker";var zc=an;import*as is from"react";import{jsx as jc}from"react/jsx-runtime";var $c=(t)=>`+${t}`,Jc=({expanded:t,hiddenCount:r,collapsedLabel:o=$c,expandedLabel:a="Show less",onToggle:s,className:i,...l},c)=>jc("button",{ref:c,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",i),...l,children:t?a:o(r)}),ls=is.forwardRef(Jc);ls.displayName="ShowMoreTag";var Gc=ls;import*as cs from"react";import{jsx as Uc}from"react/jsx-runtime";var Wc=f("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]"}}}),Xc=({size:t,className:r,...o},a)=>Uc("span",{ref:a,className:e(Wc({size:t}),r),...o}),sn=cs.forwardRef(Xc);sn.displayName="SerifNumeral";var Kc=sn;import{jsx as Uo,jsxs as qc}from"react/jsx-runtime";var Ko=9,ds=2*Math.PI*Ko,Yc=(t,r,o)=>{if(!Number.isFinite(t)||!Number.isFinite(r)||!Number.isFinite(o))return 0;if(o<=r)return 0;return Math.min(1,Math.max(0,(t-r)/(o-r)))},us=({className:t,classes:r,label:o,max:a=100,min:s=0,title:i,value:l,"aria-label":c,...d})=>{let u=Yc(l,s,a),g=Math.round(u*100),b=s+u*(a-s),w=ds*(1-u);return Uo("span",{"aria-label":c??`${o}: ${g}%`,"aria-valuemax":a,"aria-valuemin":s,"aria-valuenow":b,className:e("grid size-8 shrink-0 place-items-center text-muted-foreground",r?.root,t),title:i??`${o} ${g}%`,...d,children:qc("svg",{"aria-hidden":"true",className:e("size-6 -rotate-90",r?.svg),viewBox:"0 0 24 24",children:[Uo("circle",{className:e("stroke-muted",r?.track),cx:"12",cy:"12",fill:"none",r:Ko,strokeWidth:"3"}),Uo("circle",{className:e("stroke-foreground transition-[stroke-dashoffset]",r?.indicator),cx:"12",cy:"12",fill:"none",r:Ko,strokeDasharray:ds,strokeDashoffset:w,strokeLinecap:"round",strokeWidth:"3"})]})})};us.displayName="Ring";var Zc=us;import*as fs from"react";import{jsx as ms,jsxs as td}from"react/jsx-runtime";var ps={danger:"bg-destructive",neutral:"bg-muted-foreground/40",primary:"bg-primary",success:"bg-emerald-500",warning:"bg-amber-500"},Qc={md:"size-2",sm:"size-1.5"},ed=({tone:t="neutral",pulse:r=!1,size:o="sm",className:a,...s},i)=>td("span",{ref:i,className:e("relative inline-flex shrink-0",Qc[o],a),...s,children:[r&&ms("span",{"aria-hidden":!0,className:e("absolute inline-flex h-full w-full animate-ping rounded-full opacity-60",ps[t])}),ms("span",{"aria-hidden":!0,className:e("relative inline-flex h-full w-full rounded-full",ps[t])})]}),qn=fs.forwardRef(ed);qn.displayName="StatusDot";var rd=qn;import*as vs from"react";import{jsx as bs,jsxs as gs}from"react/jsx-runtime";var nd={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))]"},od=({tooltip:t,tone:r="neutral",icon:o,className:a,children:s,...i},l)=>gs(et,{children:[bs(tt,{asChild:!0,children:gs(z,{ref:l,variant:"outline",className:e(nd[r],a),...i,children:[o,s]})}),bs(rt,{children:t})]}),hs=vs.forwardRef(od);hs.displayName="TooltipBadge";var ad=hs;import*as xs from"react";import{jsx as id}from"react/jsx-runtime";var sd={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=xs.forwardRef(function({variant:r="body1",as:o,className:a,...s},i){let{tag:l,className:c}=sd[r];return id(o??l,{ref:i,className:e(c,a),...s})});Zn.displayName="Typography";import{jsx as cd}from"react/jsx-runtime";var ld=({children:t,as:r="form",className:o,onSubmit:a,...s})=>{let i=(l)=>{l.preventDefault(),a?.(l)};return cd(r,{className:e("flex flex-col gap-4 min-w-[300px]",o),onSubmit:i,...s,children:t})},dd=ld;import{jsx as fd}from"react/jsx-runtime";var ys={},ln=(...t)=>{for(let r of t)if(r!==void 0)return r;return 1},ud=(t=ys)=>({"--list-cols":ln(t.cols),"--list-cols-2xl":ln(t.cols2xl,t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-lg":ln(t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-md":ln(t.colsMd,t.colsSm,t.cols),"--list-cols-sm":ln(t.colsSm,t.cols),"--list-cols-xl":ln(t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols)}),pd=["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(" "),md=({cols:t=ys,children:r,...o})=>fd("div",{className:pd,style:ud(t),...o,children:r});import{jsx as bd}from"react/jsx-runtime";var gd=({className:t,spaced:r=!1,...o})=>bd("div",{className:e("animate-[rise-in_500ms_cubic-bezier(0.16,1,0.3,1)_both]",r&&"space-y-6",t),...o});var vd=gd;import{jsx as Dn,jsxs as cn}from"react/jsx-runtime";var hd=(t)=>t!==null&&t!==void 0&&t.constructor===String,Ln=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==""&&t!==0,xd=({title:t,description:r,icon:o,kicker:a,status:s,actions:i,className:l})=>cn("header",{className:e("space-y-2",l),children:[Ln(a)?cn("div",{className:"flex items-center gap-2 text-(--text-muted) [&_svg]:h-3.5 [&_svg]:w-3.5",children:[Ln(o)?Dn("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-sm bg-(--bg-accent-soft) text-(--accent)",children:o}):null,Dn("span",{className:"text-[12px] font-medium tracking-tight [&_span.sep]:mx-1.5 [&_span.sep]:text-(--accent)",children:hd(a)?a.split("·").map((c,d,u)=>cn("span",{children:[c.trim(),d<u.length-1?Dn("span",{className:"sep","aria-hidden":!0,children:"·"}):null]},d)):a})]}):null,cn("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[cn("div",{className:"min-w-0 flex-1 basis-64 space-y-1.5",children:[Dn("h1",{className:"font-display text-[27px] font-bold leading-tight tracking-[-0.02em] text-(--text-primary)",children:t}),Ln(r)?Dn("p",{className:"max-w-2xl text-[14px] leading-relaxed text-(--text-secondary)",children:r}):null]}),Ln(i)||Ln(s)?cn("div",{className:"flex shrink-0 items-center gap-2 pt-1",children:[s,i]}):null]})]}),yd=xd;import*as Ns from"react";import{jsx as Qn,jsxs as ws}from"react/jsx-runtime";var Yo=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),Rs=Ns.forwardRef(function({icon:r,title:o,description:a,action:s,className:i,...l},c){return ws("div",{ref:c,className:e("flex items-start gap-3",i),...l,children:[Yo(r)?Qn("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,ws("div",{className:"min-w-0 flex-1",children:[Qn("h3",{className:"text-[15px] font-semibold leading-snug text-foreground",children:o}),Yo(a)?Qn("p",{className:"mt-0.5 text-sm leading-relaxed text-muted-foreground",children:a}):null]}),Yo(s)?Qn("div",{className:"shrink-0",children:s}):null]})});Rs.displayName="SectionHeader";var wd=Rs;import{jsx as Cs,jsxs as Rd}from"react/jsx-runtime";var Nd=({title:t,toolbar:r})=>Rd("div",{className:"flex items-center justify-between mb-12",children:[Cs(Zn,{variant:"h2",children:t}),Boolean(r)&&Cs("div",{className:"flex items-center gap-2",children:r})]}),Cd=Nd;import*as to from"react";import{jsx as Vt,jsxs as eo}from"react/jsx-runtime";var Ss=(t,r,o)=>{if(t.length>=r)return t;return[...t,...Array.from({length:r-t.length},o)]},Sd=[],qo=({values:t,defaultValues:r=Sd,onValuesChange:o,addLabel:a,getRemoveLabel:s,actions:i,minItems:l=0,disabled:c=!1,renderItem:d,createItem:u,validateItem:g,classes:b,className:w,id:P,...C})=>{let A=to.useId(),[j,B]=to.useState(()=>Ss(r,l,u)),O=Ss(t??j,l,u),H=Boolean(i),F=(X)=>{if(t===void 0)B(X);o?.(X)};return eo("div",{"data-slot":"array-input",className:e("space-y-2",b?.root,w),...C,children:[Vt("div",{className:"space-y-2",children:O.map((X,V)=>{let _=V===0&&P!==void 0&&P!==""?P:`${A}-${V}`,W=g?.(X,V);return eo("div",{className:e("flex items-center gap-3",b?.row),children:[d({disabled:c,id:_,index:V,onValueChange:(oe)=>{let K=[...O];K[V]=oe,F(K)},validationMessage:W,value:X}),O.length>l?Vt(n,{type:"button",variant:"ghost",size:"icon",disabled:c,"aria-label":s(V),className:e("size-10 shrink-0 text-muted-foreground hover:text-destructive",b?.removeButton),onClick:()=>{F(O.filter((oe,K)=>K!==V))},children:Vt(Cr,{"aria-hidden":"true",className:"size-4"})}):null]},V)})}),eo("div",{className:e("flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",b?.actionRow),children:[Vt(Kn,{disabled:c,className:b?.addButton,onClick:()=>{F([...O,u()])},children:a}),H?Vt("div",{className:e("sm:ml-auto",b?.actions),children:i}):null]})]})},Pd=(t)=>{let{createItem:r,getItemLabel:o,inputProps:a,placeholder:s,required:i=!1,renderItem:l,...c}=t,{className:d,...u}=a??{};if(l!==void 0)return Vt(qo,{...c,createItem:r??(()=>""),renderItem:l});return Vt(qo,{...c,createItem:r??(()=>""),renderItem:(g)=>{let{disabled:b,id:w,index:P,onValueChange:C,validationMessage:A,value:j}=g;return eo("div",{className:"min-w-0 flex-1",children:[Vt(h,{...u,id:w,"aria-label":o(P),"aria-invalid":Boolean(A),value:j,placeholder:s,required:i,disabled:b,className:e("w-full",d,c.classes?.input),onChange:(B)=>{C(B.target.value)}}),A!==void 0&&A!==""?Vt("p",{className:"mt-1 text-xs text-destructive",role:"alert",children:A}):null]})}})},Td=(t)=>Vt(qo,{...t}),kd=(t)=>t.createItem!==void 0&&t.renderItem!==void 0,Ps=(t)=>{if(kd(t))return Vt(Td,{...t});return Vt(Pd,{...t})};Ps.displayName="ArrayInput";var Ld=Ps;import*as dn from"react";var Mr=(t,r)=>{let o=[];for(let a of t){let s=o.findIndex((i)=>r(a,i)<0);if(s===-1)o.push(a);else o.splice(s,0,a)}return o};var Ft={hour:9,interval:1,minute:0,mode:"day",monthday:1,weekdays:[1,2,3,4,5]},Zo=/^\*\/(?<step>\d+)$/u,Dd=(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),i=Number(a.groups?.end);if(s>i)return null;for(let l=s;l<=i;l+=1)r.push(l)}else if(/^\d+$/u.test(o))r.push(Number(o));else return null}return r},Ed=(t,r,o,a)=>{if(r==="*"&&o==="*"&&a==="*"){let s=Zo.exec(t),i=Number(s?.groups?.step);return s&&i>=1&&i<=59?{...Ft,interval:i,mode:"minutes"}:null}return},Md=(t,r,o,a)=>{if(r!=="*"||o!=="*")return;let s=Zo.exec(t);if(s){let i=Number(s.groups?.step);return i>=1&&i<=23?{...Ft,interval:i,minute:a,mode:"hours"}:null}return},Id=(t,r,o)=>{let a=Zo.exec(t);if(a){let i=Number(a.groups?.step);if(i%7===0&&i>=7&&i<=28)return{...Ft,hour:r,interval:i/7,minute:o,mode:"weeks"};return i>=1&&i<=31?{...Ft,hour:r,interval:i,minute:o,mode:"days"}:null}let s=Number(t);return/^\d+$/u.test(t)&&s>=1&&s<=31?{...Ft,hour:r,minute:o,mode:"month",monthday:s}:null},Ad=(t,r,o)=>{let a=Dd(t);if(!a||a.some((i)=>i<0||i>7))return null;let s=Mr(new Set(a.map((i)=>i===7?0:i)),(i,l)=>i-l);return{...Ft,hour:r,minute:o,mode:"week",weekdays:s}},En=(t)=>{let r=t.trim().split(/\s+/u);if(r.length!==5)return null;let[o,a,s,i,l]=r;if(i!=="*")return null;let c=Ed(o,a,s,l);if(c!==void 0)return c;if(!/^\d+$/u.test(o))return null;let d=Number(o);if(d<0||d>59)return null;let u=Md(a,s,l,d);if(u!==void 0)return u;if(!/^\d+$/u.test(a))return null;let g=Number(a);if(g<0||g>23)return null;if(s==="*"&&l==="*")return{...Ft,hour:g,minute:d,mode:"day"};if(l==="*")return Id(s,g,d);if(s==="*")return Ad(l,g,d);return null},Ir=(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?Mr(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")}},Ts=(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 l=s.groups?.base??"";if(l!=="*"&&!Ts(l,r,o))return!1;let c=Number(s.groups?.increment);if(!Number.isFinite(c)||c<1)return!1;continue}let i=/^(?<start>\d+)-(?<end>\d+)$/u.exec(a);if(i){let l=Number(i.groups?.start),c=Number(i.groups?.end);if(l<r||c>o||l>c)return!1;continue}if(/^\d+$/u.test(a)){let l=Number(a);if(l<r||l>o)return!1;continue}return!1}return!0},Od=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Hd=(t,r)=>{let o=String(t).padStart(2,"0"),a=String(r).padStart(2,"0");return`${o}:${a}`},ro=(t)=>{let r=En(t);if(!r)return t;let o=Hd(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=Mr(r.weekdays,(c,d)=>c-d),s=a.length===5&&a.every((c,d)=>c===d+1),i=a.length===2&&a[0]===0&&a[1]===6;if(s)return`Weekdays at ${o}`;if(i)return`Weekends at ${o}`;return`${a.map((c)=>Od[c].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")}},Qo=(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)=>Ts(a,o[s][0],o[s][1]))};import*as Ls from"react";var ks=(t)=>{let a=new Intl.DateTimeFormat("en-US",{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(new Date).find((d)=>d.type==="timeZoneName")?.value??"GMT",s=/(?<sign>[+-])(?<hours>\d{1,2})(?::(?<minutes>\d{2}))?/u.exec(a);if(!s)return 0;let i=s.groups?.sign==="-"?-1:1,l=Number(s.groups?.hours??0),c=Number(s.groups?.minutes??0);return i*(l*60+c)},Vd=(t)=>{let r=ks(t),o=r>=0?"+":"-",a=Math.abs(r),s=String(Math.floor(a/60)).padStart(2,"0"),i=String(a%60).padStart(2,"0");return`${o}${s}:${i}`},no=null,ea=()=>{if(no)return no;let t="supportedValuesOf"in Intl?Intl.supportedValuesOf("timeZone"):["UTC"];return no=Mr(["UTC",...t].map((r)=>({label:`${r} (UTC${Vd(r)})`,offset:ks(r),value:r})),(r,o)=>r.offset-o.offset||r.value.localeCompare(o.value)).map(({value:r,label:o})=>({label:o,value:r})),no};import{jsx as Bd}from"react/jsx-runtime";var oo=({value:t,onChange:r,className:o,width:a="100%",disabled:s,placeholder:i="Select timezone"})=>{let l=Ls.useMemo(()=>ea(),[]);return Bd(pt,{options:l,value:t,onChange:(c)=>{r(c||"UTC")},placeholder:i,searchPlaceholder:"Search timezone...",emptyMessage:"No timezone found.",className:e("bg-transparent font-normal",o),width:a,disabled:s})};import{jsx as le,jsxs as De,Fragment as Gd}from"react/jsx-runtime";var Ms=[{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"}],Fd=[{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}],_d=(t)=>Ms.some((r)=>r.value===t),Ds=(t)=>{let r=t.trim();if(!r)return{custom:Ir(Ft),simple:Ft,view:"simple"};let o=En(r);if(o)return{custom:r,simple:o,view:"simple"};return{custom:r,simple:Ft,view:"advanced"}},zd=(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")}},ao=(t,r,o)=>Math.max(r,Math.min(o,t)),Es=(t)=>String(t).padStart(2,"0"),$d=({hour:t,minute:r,onChange:o})=>De("div",{className:"flex items-center gap-1",children:[le(h,{type:"number",min:0,max:23,value:Es(t),onChange:(a)=>{o(ao(Number(a.target.value)||0,0,23),r)},className:"w-16 text-center font-mono"}),le("span",{className:"text-muted-foreground",children:":"}),le(h,{type:"number",min:0,max:59,value:Es(r),onChange:(a)=>{o(t,ao(Number(a.target.value)||0,0,59))},className:"w-16 text-center font-mono"})]}),Jd=({state:t,onChange:r,timezone:o,onTimezoneChange:a})=>{let s=t.mode==="minutes"||t.mode==="hours"||t.mode==="days"||t.mode==="weeks",i=t.mode!=="minutes"&&t.mode!=="hours",l=t.mode==="hours",c=t.mode==="week",d=t.mode==="month";return De("div",{className:"space-y-3",children:[le("div",{className:"grid gap-2 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-end",children:De("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"Every"}),De("div",{className:e("grid gap-2",s?"grid-cols-[88px_minmax(0,1fr)]":"grid-cols-1"),children:[s&&le(h,{type:"number",min:1,value:t.interval,onChange:(u)=>{r({interval:Math.max(1,Number(u.target.value)||1)})},className:"font-mono"}),De(At,{value:t.mode,onValueChange:(u)=>{if(_d(u))r({mode:u})},children:[le(Nt,{className:"flex-1",children:le(Dt,{})}),le(Ot,{children:Ms.map((u)=>le(_t,{value:u.value,children:zd(u,t.interval)},u.value))})]})]})]})}),c&&De("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"On"}),le(Ht,{type:"multiple",variant:"outline",size:"sm",value:t.weekdays.map(String),onValueChange:(u)=>{r({weekdays:u.length?Mr(u.map(Number),(g,b)=>g-b):[1]})},className:"w-full",children:Fd.map((u)=>le(Gt,{value:String(u.value),"aria-label":u.label,className:"text-xs",children:u.short},u.value))})]}),d&&De("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"On day"}),le(h,{type:"number",min:1,max:31,value:t.monthday,onChange:(u)=>{r({monthday:ao(Number(u.target.value)||1,1,31)})},className:"w-24"})]}),(i||o!==void 0&&a)&&De("div",{className:e("grid gap-3",i&&o!==void 0&&a?"lg:grid-cols-[auto_minmax(0,1fr)] lg:items-end":"grid-cols-1"),children:[i&&De("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"At"}),le($d,{hour:t.hour,minute:t.minute,onChange:(u,g)=>{r({hour:u,minute:g})}})]}),o!==void 0&&a&&De("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),le(oo,{value:o,onChange:a})]})]}),l&&De("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"At minute"}),le(h,{type:"number",min:0,max:59,value:t.minute,onChange:(u)=>{r({minute:ao(Number(u.target.value)||0,0,59)})},className:"w-24"})]})]})},jd=({value:t,onChange:r,className:o,showPreview:a=!0,timezone:s,onTimezoneChange:i})=>{let[l,c]=dn.useState(()=>Ds(t)),[d,u]=dn.useState(t),[g,b]=dn.useState(t);if(t!==d){if(u(t),t!==g)b(t),c(Ds(t))}let w=dn.useCallback((O)=>{let H=O.view==="simple"?Ir(O.simple):O.custom;b(H),r(H)},[r]),P=(O)=>{c((H)=>{let F={...H.simple,...O},X={...H,custom:Ir(F),simple:F};return w(X),X})},C=(O)=>{c((H)=>{let F={...H,custom:O};return w(F),F})},A=(O)=>{c((H)=>{if(O===H.view)return H;if(O==="advanced"){let V=Ir(H.simple),_={...H,custom:V,view:O};return w(_),_}let F=En(H.custom),X=F?{...H,simple:F,view:O}:{...H,view:O};return w(X),X})},j=Qo(l.custom),B=null;if(l.view==="simple")B=ro(Ir(l.simple));else if(j)B=ro(l.custom);return De("div",{className:e("space-y-4",o),children:[De(Bt,{value:l.view,onValueChange:(O)=>{if(O==="simple"||O==="advanced")A(O)},children:[De(Ut,{className:"grid w-full grid-cols-2 rounded-md bg-muted/70 p-1 sm:w-[320px]",children:[le(mt,{value:"simple",className:"text-xs",children:"Simple"}),le(mt,{value:"advanced",className:"text-xs",children:"Advanced"})]}),le(ht,{value:"simple",className:"space-y-3 pt-3",children:le(Jd,{state:l.simple,onChange:P,timezone:s,onTimezoneChange:i})}),De(ht,{value:"advanced",className:"space-y-2 pt-3",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"Cron Expression"}),le(h,{value:l.custom,onChange:(O)=>{C(O.target.value)},placeholder:"0 9 * * 1-5",className:e("font-mono text-sm",!j&&l.custom.trim()&&"border-destructive focus-visible:ring-destructive/40"),spellCheck:!1}),le("p",{className:"text-[11px] text-muted-foreground",children:"Format: minute hour day-of-month month day-of-week"})]})]}),l.view==="advanced"&&s!==void 0&&i&&De("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),le(oo,{value:s,onChange:i})]}),a&&le("div",{className:"flex min-h-8 flex-wrap items-center gap-2 rounded-md bg-muted/35 px-3 py-2 text-xs",children:B===null?le("span",{className:"text-destructive",children:"Invalid cron expression"}):De(Gd,{children:[le("span",{className:"text-muted-foreground",children:B}),le(z,{variant:"secondary",className:"ml-auto font-mono text-[11px]",children:l.view==="simple"?Ir(l.simple):l.custom})]})})]})};import{jsx as ta}from"react/jsx-runtime";var Wd={both:"w-full h-full",horizontal:"w-full h-auto",none:"",vertical:"h-full w-auto"},Xd=({src:t,alt:r="",className:o="",width:a,height:s,fill:i="horizontal",style:l})=>{if(i==="both")return ta("div",{className:e("relative overflow-hidden rounded-lg shadow-md",o),style:{height:s,width:a,...l},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:a,height:s,className:e("object-cover rounded-lg shadow-md",Wd[i],o),style:{height:i==="vertical"?"100%":s,width:i==="horizontal"?"100%":a,...l}})},Ud=Xd;import{jsx as so,jsxs as Is}from"react/jsx-runtime";var Kd=({title:t,className:r,children:o,...a})=>Is("section",{"data-slot":"summary-list",className:e("space-y-2",r),...a,children:[t?so("h3",{className:"text-sm font-semibold tracking-tight",children:t}):null,so("dl",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border bg-card",children:o})]}),Yd=({label:t,value:r,muted:o=!1,className:a,...s})=>Is("div",{"data-slot":"summary-item",className:e("grid gap-1 px-4 py-3 sm:grid-cols-[minmax(8rem,14rem)_1fr] sm:gap-4",a),...s,children:[so("dt",{className:"text-sm text-muted-foreground",children:t}),so("dd",{className:e("min-w-0 break-words text-sm",o?"text-muted-foreground":"font-medium text-foreground"),children:r})]});import*as ra from"react";import{jsx as zr,jsxs as As}from"react/jsx-runtime";var qd=({className:t,...r})=>zr(Pt,{"data-slot":"choice-card-group",className:e("grid gap-3",t),...r}),Zd=({title:t,description:r,media:o,footer:a,className:s,...i})=>{let l=ra.useId(),c=ra.useId(),d=Boolean(r);return As(Tt,{"data-slot":"choice-card","aria-labelledby":l,"aria-describedby":d?c:void 0,className:e("group/choice relative flex h-full min-w-0 flex-col items-start gap-4 rounded-lg border border-border bg-card p-5 text-left shadow-(--shadow-sm) outline-none transition-[border-color,background-color,box-shadow] dark:shadow-none","hover:border-foreground/25 focus-visible:ring-[3px] focus-visible:ring-ring/50","data-[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),...i,children:[zr("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:zr(kt,{children:zr(p,{className:"size-3",strokeWidth:3})})}),o,As("span",{className:"block min-w-0 space-y-1 pr-7",children:[zr("span",{id:l,className:"block font-semibold tracking-tight",children:t}),d?zr("span",{id:c,className:"block text-sm leading-relaxed text-muted-foreground",children:r}):null]}),a?zr("span",{className:"mt-auto block w-full",children:a}):null]})};import*as Ar from"react";import{jsx as Or,jsxs as Os}from"react/jsx-runtime";var Hs=Ar.forwardRef(function({className:r,...o},a){return Or("div",{ref:a,className:e("grid gap-2",r),...o})}),Vs=({className:t,...r})=>Or(Et,{className:e("grid gap-2",t),...r}),na=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),io=Ar.forwardRef(function({title:r,description:o,descriptionId:a,wrapDescription:s=!1,disabled:i=!1,control:l,className:c,children:d,...u},g){return Os("label",{ref:g,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",i?"cursor-not-allowed bg-muted/30 opacity-65":"cursor-pointer hover:bg-muted/50",c),...u,children:[l,Os("span",{className:"min-w-0 flex-1",children:[Or("span",{className:"block truncate text-sm font-medium",children:r}),na(o)?Or("span",{id:a,className:e("mt-1 block text-xs text-muted-foreground",!s&&"truncate"),children:o}):null,d]})]})}),Bs=(t)=>Object.prototype.toString.call(t)==="[object String]",Fs=(t,r)=>t!==null&&r instanceof Node&&(t.contains(r)||r instanceof HTMLInputElement&&r.getAttribute("aria-hidden")==="true"),Qd=({value:t,title:r,description:o,radioLabel:a,disabled:s=!1,onClick:i,...l})=>{let c=Ar.useId(),d=Ar.useId(),u=a??(Bs(r)?r:void 0);return Or(io,{description:o,descriptionId:d,disabled:s,title:r,onClick:(g)=>{if(i?.(g),g.defaultPrevented||s)return;let b=document.querySelector(`#${c}`);if(Fs(b,g.target))return;g.preventDefault(),b?.click()},control:Or(Mt,{"aria-describedby":na(o)?d:void 0,"aria-label":u,className:"mt-1",disabled:s,id:c,value:t}),...l})},eu=({checked:t,title:r,description:o,checkboxLabel:a,disabled:s=!1,onClick:i,onCheckedChange:l,...c})=>{let d=Ar.useId(),u=Ar.useId(),g=a??(Bs(r)?r:void 0);return Or(io,{description:o,descriptionId:u,disabled:s,title:r,onClick:(b)=>{if(i?.(b),b.defaultPrevented||s)return;if(Fs(document.querySelector(`#${d}`),b.target))return;b.preventDefault(),l(!t)},control:Or(Xe,{"aria-describedby":na(o)?u:void 0,"aria-label":g,checked:t,className:"mt-0.5",disabled:s,id:d,onCheckedChange:(b)=>{if(!s)l(b===!0)}}),...c})};Hs.displayName="CardOptionsBlock";Vs.displayName="RadioCardOptionsBlock";io.displayName="CardOption";import*as _s from"react";import{jsx as Mn,jsxs as oa}from"react/jsx-runtime";var tu=({title:t,description:r,command:o,copyLabel:a=t??o,copyErrorMessage:s,className:i,...l},c)=>oa("div",{ref:c,className:e("space-y-2",i),...l,children:[t===void 0&&r===void 0?null:oa("div",{children:[t===void 0?null:Mn("p",{className:"text-sm font-medium",children:t}),r===void 0?null:Mn("p",{className:"text-sm text-muted-foreground",children:r})]}),oa("div",{className:"flex items-start gap-2",children:[Mn("pre",{className:"flex-1 overflow-x-auto rounded-md border bg-muted px-3 py-2 font-mono text-xs",children:Mn("code",{children:o})}),Mn(Yn,{value:o,label:a,errorMessage:s})]})]}),zs=_s.forwardRef(tu);zs.displayName="CommandStep";var ru=zs;import{forwardRef as nu,useId as ou}from"react";import{jsx as In,jsxs as $s}from"react/jsx-runtime";var Js=nu(function({currency:r,label:o="Amount",hint:a,hideLabel:s=!1,hideHint:i=!1,error:l,className:c,wrapperClassName:d,id:u,decimals:g=2,step:b,placeholder:w,...P},C){let A=ou(),j=u??A,B=`Enter amount in ${r}`,O=b??1/10**g,H=w??(g>0?`0.${"0".repeat(g)}`:"0"),F=l!==null&&l!==void 0&&l.length>0;return $s("div",{className:e("w-full space-y-2",d),children:[!s&&In(y,{htmlFor:j,children:o}),$s("div",{className:"relative",children:[In("span",{className:"-translate-y-1/2 absolute top-1/2 left-3 text-sm text-muted-foreground",children:r}),In(h,{ref:C,className:e("bg-background pl-12",F&&"border-destructive",c),id:j,min:"0",placeholder:H,step:O,type:"number",...P})]}),F?In("p",{className:"text-xs text-destructive",children:l}):!i&&In("p",{className:"text-xs text-muted-foreground",children:a??B})]})});Js.displayName="CurrencyInput";var au=Js;import*as js from"react";import{jsx as lo,jsxs as aa}from"react/jsx-runtime";var Gs=js.forwardRef(function({index:r,label:o,hint:a,className:s,children:i,...l},c){let d=Boolean(r),u=Boolean(a);return aa("div",{ref:c,className:e("grid gap-x-4",d?"grid-cols-[2.25rem_1fr] sm:grid-cols-[2.5rem_1fr]":"grid-cols-1",s),...l,children:[d?lo("div",{className:"flex h-6 items-center justify-end pt-[2px]",children:lo(sn,{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:[lo(an,{children:o}),u?lo("span",{className:"text-[10px] text-muted-foreground",children:a}):null]}),i]})]})});Gs.displayName="FieldRow";var su=Gs;import{jsx as ge,jsxs as Wt,Fragment as mu}from"react/jsx-runtime";var iu=(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]}`},lu={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"},cu=({active:t,activeLabel:r,inactiveLabel:o,hint:a})=>Wt("div",{className:"flex w-full items-center gap-3",children:[ge("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:ge(wr,{className:e("h-5 w-5",t?"text-primary":"text-muted-foreground")})}),Wt("div",{children:[ge("p",{className:"text-sm font-medium text-foreground",children:t?r:o}),ge("p",{className:"text-xs text-muted-foreground",children:a})]})]}),du=({message:t,retryLabel:r})=>Wt("div",{className:"flex w-full items-center gap-3",children:[ge("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-destructive/10",children:ge(x,{className:"h-5 w-5 text-destructive"})}),Wt("div",{children:[ge("p",{className:"text-sm font-medium text-destructive",children:t}),ge("p",{className:"text-xs text-destructive/80",children:r})]})]}),uu=({file:t,downloading:r,downloadLabel:o,downloadingLabel:a,onDownload:s,onRemove:i})=>Wt("div",{className:"flex w-full items-center justify-between",children:[Wt("div",{className:"flex items-center gap-3",children:[t.previewUrl!==void 0&&t.previewUrl!==null&&t.previewUrl!==""?Wt(mu,{children:[ge("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})`}}),ge("span",{className:"sr-only",children:t.name})]}):ge("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:ge(mr,{className:"h-5 w-5 text-(--success)"})}),Wt("div",{className:"flex flex-col",children:[Wt("div",{className:"flex items-center gap-2",children:[ge(vr,{className:"h-4 w-4 text-muted-foreground"}),ge("span",{className:"text-sm font-medium text-foreground",children:t.name})]}),ge("span",{className:"text-xs text-muted-foreground",children:iu(t.size)})]})]}),Wt("div",{className:"flex shrink-0 items-center gap-1",children:[s?ge(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?ge(T,{className:"h-4 w-4 animate-spin"}):ge(gr,{className:"h-4 w-4"})}):null,i?ge(n,{className:"h-8 w-8 rounded-full p-0 hover:bg-destructive/10",onClick:i,size:"sm",type:"button",variant:"ghost",children:ge(x,{className:"h-4 w-4 text-destructive"})}):null]})]}),pu=(t)=>{let{rootProps:r,inputProps:o,isDragActive:a,selectedFile:s,error:i,onRemoveFile:l,onDownloadFile:c,isDownloadingFile:d,disabled:u,className:g,labels:b}=t,w={...lu,...b},P=s!==void 0&&s!==null,C=i!==void 0&&i!==null&&i!=="";return ge("div",{className:e("w-full",g),children:Wt("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",P&&"border-[color-mix(in_oklab,var(--success)_60%,var(--border))] bg-[color-mix(in_oklab,var(--success)_10%,transparent)]",C&&"border-destructive bg-[color-mix(in_oklab,var(--destructive)_10%,var(--card))]",u===!0&&"cursor-not-allowed opacity-60",r?.className),children:[ge("input",{...o}),!P&&!C?ge(cu,{active:Boolean(a),activeLabel:w.dragActive,hint:w.fileTypeHint,inactiveLabel:w.dragInactive}):null,s!==void 0&&s!==null&&!C?ge(uu,{downloadLabel:w.downloadFile,downloading:Boolean(d),downloadingLabel:w.downloadingFile,file:s,onDownload:c,onRemove:l}):null,i!==void 0&&i!==null&&i!==""?ge(du,{message:i,retryLabel:w.errorRetry}):null]})})},fu=pu;import{jsx as Ws,jsxs as bu}from"react/jsx-runtime";var gu=f("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]"}}}),Xs=({options:t,value:r,onValueChange:o,label:a,size:s,className:i,classes:l,...c})=>Ws("div",{"aria-label":a,className:e("flex flex-wrap items-center gap-1.5",l?.root,i),...c,children:t.map((d)=>{let u=d.value===r;return bu("button",{type:"button","aria-pressed":u,disabled:d.disabled,onClick:()=>{o(d.value)},className:e(gu({active:u,size:s}),l?.chip),children:[d.label,d.count===void 0?null:Ws("span",{className:e("tabular-nums text-[11px] text-(--text-muted)",l?.count),children:d.count})]},d.value)})});Xs.displayName="FilterChips";var vu=Xs;import*as un from"react";import{jsx as dr,jsxs as Su}from"react/jsx-runtime";var hu=52,xu=26,uo=4,co=20,yu=(t)=>({"--flow-lane":t}),Ks=un.createContext(null),Ys=(t)=>{let r=un.useContext(Ks);if(!r)throw Error(`${t} must be rendered inside a FlowBand.`);return r},wu=({lanes:t=1,stepHeight:r=hu,laneHeight:o=xu,className:a,style:s,children:i,...l})=>{let c=Math.max(r,t*o+(t-1)*uo),d=un.useMemo(()=>({height:c,stepHeight:r}),[c,r]);return dr(Ks.Provider,{value:d,children:dr("div",{className:e("flex min-w-0 items-stretch gap-1",a),style:{height:c,...s},...l,children:i})})},Nu=({className:t,style:r,children:o,...a})=>{let{stepHeight:s}=Ys("FlowStep");return dr("div",{className:e("flex min-w-0 flex-1 items-stretch self-center",t),style:{height:s,...r},...a,children:o})},Us=({centers:t,height:r,colors:o,merge:a=!1})=>{let s=r/2,i=7;return dr("svg",{"aria-hidden":!0,width:co,height:r,viewBox:`0 0 ${co} ${r}`,className:"shrink-0",style:a?{transform:"scaleX(-1)"}:void 0,children:t.map((l,c)=>{let d=o[c];return dr("path",{style:yu(d),d:`M0 ${s}H7C13 ${s} ${co-6} ${l} ${co} ${l}`,fill:"none",strokeWidth:1.5,strokeLinecap:"round",className:d!==void 0&&d!==""?"stroke-[color-mix(in_oklab,var(--flow-lane)_45%,var(--border))]":"stroke-border"},c)})})},Ru=(t,r)=>{let o=(r-uo*(t-1))/t;return Array.from({length:t},(a,s)=>s*(o+uo)+o/2)},Cu=({lanes:t,fork:r=!0,rejoin:o=!0,label:a,className:s,...i})=>{let{height:l}=Ys("FlowBranch"),c=Ru(t.length,l),d=t.map((u)=>u.color);return Su("div",{"aria-label":a,className:e("flex min-w-0 flex-1 items-stretch",s),...i,children:[r&&dr(Us,{centers:c,height:l,colors:d}),dr("div",{className:"flex min-w-0 flex-1 flex-col",style:{gap:uo},children:t.map((u)=>dr("div",{className:"flex min-w-0 flex-1 items-stretch overflow-hidden",children:u.content},u.key))}),o&&dr(Us,{centers:c,height:l,colors:d,merge:!0})]})};import*as qs from"react";import{jsx as sa,jsxs as Tu}from"react/jsx-runtime";var Pu=({index:t,className:r,children:o,...a},s)=>Tu("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(sn,{className:"opacity-80",children:t})}),sa("p",{className:"text-[13px] text-muted-foreground",children:o})]}),Zs=qs.forwardRef(Pu);Zs.displayName="GuideStep";var ku=Zs;import*as mn from"react";import{jsx as Ue,jsxs as pn,Fragment as Du}from"react/jsx-runtime";var Qs=mn.forwardRef(function({className:r,variant:o="island",...a},s){return Ue(ie,{ref:s,variant:o,className:e("gap-0 p-0",r),...a})});Qs.displayName="HierarchyTree";var ei=mn.forwardRef(function({title:r,icon:o,count:a,actions:s,className:i,...l},c){return pn("div",{ref:c,"data-slot":"hierarchy-tree-header",className:e("flex flex-wrap items-center gap-3 border-b border-border px-4 py-3",i),...l,children:[pn("div",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",children:[o!==void 0&&o!==null?Ue("span",{className:"shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4",children:o}):null,Ue("span",{className:"min-w-0 truncate",children:r}),a!==void 0&&a!==null?Ue("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?Ue("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:s}):null]})});ei.displayName="HierarchyTreeHeader";var ti=mn.forwardRef(function({className:r,...o},a){return Ue("div",{ref:a,"data-slot":"hierarchy-tree-body",className:e("min-w-0",r),...o})});ti.displayName="HierarchyTreeBody";var Lu=[],ri=mn.forwardRef(function({depth:r,rails:o=Lu,isLastChild:a=!1,hasChildren:s=!1,contentClassName:i,className:l,children:c,...d},u){let g=Math.max(1,r);return pn("div",{ref:u,"data-slot":"hierarchy-tree-row","data-depth":g,className:e("group flex items-stretch transition-colors hover:bg-muted/40",g===1&&"border-t border-border first:border-t-0",l),...d,children:[g>1?pn("div",{"aria-hidden":!0,className:"flex shrink-0 pl-5",children:[o.map((b,w)=>Ue("span",{className:"relative w-5",children:b?Ue("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}):null},w)),Ue("span",{className:"relative w-5",children:a?Ue("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")}):pn(Du,{children:[Ue("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}),Ue("span",{className:e("absolute left-0 top-[22px] border-t border-(--border-subtle)",s?"w-full":"w-14")})]})})]}):null,Ue("div",{className:e("flex min-w-0 flex-1 items-start gap-2 py-3 pl-2 pr-3",i),children:c})]})});ri.displayName="HierarchyTreeRow";var ni=mn.forwardRef(function({expanded:r,count:o,visible:a=!0,className:s,...i},l){return pn(n,{ref:l,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),...i,children:[Ue(m,{className:e("h-3.5 w-3.5 transition-transform",r&&"rotate-90")}),o]})});ni.displayName="HierarchyTreeToggle";var Eu=Qs;import Mu,{useState as Iu}from"react";import{jsx as Pe,jsxs as Rt}from"react/jsx-runtime";var Au=f("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,i])=>[s,ia({ancestors:r,value:i})]));return r.delete(t),a}return o},Ou=(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"},Hu=(t)=>{if(t===null)return"null";if(t===void 0)return"undefined";if(String(t)===t)return`"${t}"`;return String(t)},Vu=(t)=>t,Bu=(t)=>t!==null&&Object(t)===t,Fu=(t,r)=>{if(t)return Pe("span",{className:"w-4"});return r?Pe(v,{className:"w-4 h-4"}):Pe(m,{className:"w-4 h-4"})},_u=(t)=>t?{close:"]",open:"["}:{close:"}",open:"{"},zu=(t,r,o)=>t?{name:null,path:`${o}[${r}]`}:{name:String(r),path:`${o}.${r}`},$u=({data:t,className:r,classes:o,variant:a,size:s,expandAll:i=!1,expandRoot:l=!0,indentSize:c=16,showLineNumbers:d=!1,showToolbar:u=!1,maxHeight:g,maxWidth:b,renderValue:w})=>{let P=Mu.useMemo(()=>ia({ancestors:new WeakSet,value:t}),[t]),[C,A]=Iu(()=>{let _={};if(l)_.root=!0;return _}),j=(_,W)=>{if(_==="root"&&C[_]===void 0)return l;return C[_]??W},B=(_)=>{A((W)=>({...W,[_]:!j(_,i)}))},O=(_)=>{A({})},H=()=>{try{let _=JSON.stringify(P,null,2);navigator.clipboard.writeText(_),D.success("Copied to clipboard",{description:"JSON data has been copied to clipboard",duration:3000})}catch(_){console.error("Failed to copy JSON to clipboard",_),D.error("Copy failed",{description:"Failed to copy JSON to clipboard",duration:3000})}},F={maxWidth:b??"auto"},X=(_,W,oe,K,de)=>{let ye=[],ve=Bu(W),Re=Array.isArray(W),Me=ve&&Object.keys(W).length===0,Ae=_u(Re),be={marginLeft:oe*c},qe=Vu(K),he=de;if(!ve){let ce=w?.(W,K);return ye.push(Rt("div",{className:"flex",children:[d&&Pe("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:he}),Rt("div",{className:"flex min-w-0",style:be,children:[Pe("span",{"aria-hidden":!0,className:"mr-1 w-4 shrink-0"}),_!==null&&Rt("span",{className:"shrink-0 text-purple-600 dark:text-purple-400",children:[`"${_}":`,Pe("span",{className:"text-gray-600 dark:text-gray-400 mr-1",children:" "})]}),ce??Pe("span",{className:e("min-w-0 break-all",Ou(W)),children:Hu(W)})]})]},qe)),[ye,he+1]}let _e=j(K,i),q=Fu(Me,_e);if(ye.push(Rt("div",{className:"flex items-start group",children:[d&&Pe("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:he}),Rt("div",{className:"flex items-start",style:be,children:[Pe("button",{onClick:()=>{B(K)},className:"mr-1 w-4 h-4 mt-0.5 focus:outline-none opacity-60 hover:opacity-100","aria-label":_e?"Collapse":"Expand",tabIndex:0,type:"button",children:q}),Rt("div",{children:[_!==null&&Rt("span",{className:"text-purple-600 dark:text-purple-400",children:[`"${_}":`,Pe("span",{className:"text-gray-600 dark:text-gray-400 mr-1",children:" "})]}),Pe("span",{className:"text-gray-600 dark:text-gray-400",children:Ae.open}),Me||!_e?Rt("span",{className:"text-gray-600 dark:text-gray-400",children:[Me?"":"...",Ae.close]}):null]})]})]},`${qe}-open`)),he+=1,_e&&!Me){let ce=he,ae=Re?W.map((Ce,st)=>[st,Ce]):Object.entries(W);for(let[Ce,st]of ae){let Se=zu(Re,Ce,K),[Rr,Y]=X(Se.name,st,oe+1,Se.path,ce);ye.push(...Rr),ce=Y}return ye.push(Rt("div",{className:"flex",children:[d&&Pe("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:ce}),Pe("div",{className:"text-gray-600 dark:text-gray-400",style:be,children:Ae.close})]},`${qe}-close`)),ce+=1,[ye,ce]}return[ye,he]},[V]=X(null,P,0,"root",1);return Rt("div",{className:e(Au({size:s,variant:a}),o?.root,r),style:F,children:[u&&Rt("div",{className:e("flex justify-between items-center px-3 py-2 border-b border-border bg-muted/50",o?.toolbar),children:[Pe("div",{className:"text-sm font-medium",children:"JSON Viewer"}),Rt("div",{className:"flex gap-2",children:[Pe(n,{size:"sm",variant:"outline",onClick:()=>{O(!0)},children:"Expand All"}),Pe(n,{size:"sm",variant:"outline",onClick:()=>{O(!1)},children:"Collapse All"}),Rt(n,{size:"sm",variant:"outline",onClick:H,children:[Pe(ne,{className:"w-4 h-4 mr-1"}),"Copy"]})]})]}),Pe("div",{className:e("overflow-auto flex-1",o?.content),style:{maxHeight:g??void 0},children:V})]})},la=$u;import{useId as Ju,useState as ju}from"react";import Gu from"react-markdown";import{jsx as ur,jsxs as ca,Fragment as Xu}from"react/jsx-runtime";var oi=({mode:t,onModeChange:r,labels:o,disabled:a=!1,className:s})=>{let i=t==="write"?"preview":"write",l=i==="write"?o.write:o.preview,c=i==="write"?o.writeTitle??o.write:o.previewTitle??o.preview;return ur(n,{type:"button",variant:"ghost",size:"icon",className:e("size-7",s),disabled:a,"aria-label":l,title:c,onClick:()=>{r(i)},children:i==="preview"?ur(pe,{className:"size-3.5 text-muted-foreground"}):ur(hr,{className:"size-3.5 text-muted-foreground"})})},Wu=({label:t,value:r,onValueChange:o,emptyPreview:a,toggleLabels:s,mode:i,defaultMode:l="write",onModeChange:c,previewValue:d=r,disabled:u=!1,placeholder:g,editorId:b,showHeader:w=!0,footer:P,className:C,editorClassName:A,previewClassName:j,textareaProps:B})=>{let O=Ju(),H=b??O,[F,X]=ju(l),V=i??F,_=(W)=>{if(i===void 0)X(W);c?.(W)};return ca("div",{className:e("grid gap-2",C),children:[w&&ca("div",{className:"flex items-center justify-between gap-3",children:[ur(y,{htmlFor:V==="write"?H:void 0,children:t}),ur(oi,{mode:V,onModeChange:_,labels:s,disabled:u})]}),V==="write"?ca(Xu,{children:[ur(Je,{...B,id:H,value:r,disabled:u,placeholder:g,"aria-label":w?B?.["aria-label"]:B?.["aria-label"]??t,className:e("min-h-48 resize-y font-mono text-sm",A),onChange:(W)=>{o(W.target.value)}}),P]}):ur("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",j),children:d.trim()?ur(Gu,{children:d}):ur("div",{className:"not-prose text-muted-foreground",children:a})})]})};import{jsx as po,jsxs as Ku}from"react/jsx-runtime";var Uu=({open:t,onOpenChange:r,title:o="JSON Viewer",data:a,jsonViewerProps:s})=>po(k,{open:t,onOpenChange:r,children:Ku(E,{className:"max-w-2xl max-h-[80vh] flex flex-col",children:[po(G,{children:po(M,{children:o})}),po(la,{data:a,className:"min-h-0 flex-1",variant:"filled",size:"sm",showToolbar:!0,expandAll:!1,expandRoot:!0,...s})]})});import*as si from"react";import{jsx as ai,jsxs as da}from"react/jsx-runtime";var ii=si.forwardRef(function({id:r,label:o,optionalLabel:a,help:s,error:i,className:l,children:c,...d},u){return da("div",{ref:u,className:e("grid content-start gap-2",l),...d,children:[da(y,{htmlFor:r,children:[o,a===void 0?null:da("span",{className:"font-normal text-muted-foreground",children:["(",a,")"]})]}),c,i===void 0?null:ai("p",{role:"alert",className:"text-sm text-destructive",children:i}),i===void 0&&s!==void 0&&s!==""?ai("p",{className:"text-xs leading-relaxed text-muted-foreground",children:s}):null]})});ii.displayName="LabeledField";var Yu=ii;import{jsx as li,jsxs as ci}from"react/jsx-runtime";var qu=({href:t,children:r,className:o,external:a=!1,linkComponent:s})=>{let i=e("inline-flex items-center gap-1 text-primary hover:underline",o);if(a||!s)return ci("a",{href:t,...a?{rel:"noopener noreferrer",target:"_blank"}:{},className:i,children:[r,li(zt,{className:"h-3 w-3"})]});return ci(s,{to:t,className:i,children:[r,li(zt,{className:"h-3 w-3"})]})};import{useState as Zu}from"react";import{jsx as mo,jsxs as ep}from"react/jsx-runtime";var Qu=({value:t,isSensitive:r=!1,className:o,maskChar:a="•",showToggle:s=!0,showLabel:i="Show value",hideLabel:l="Hide value",truncate:c=!0,children:d})=>{let[u,g]=Zu(!r),w=u?t:(()=>{if(t.startsWith("{")||t.startsWith("["))return`{ ${a.repeat(10)} }`;return a.repeat(Math.min(t.length,20))})(),P=c?w.slice(0,50)+(w.length>50?"...":""):w,C=u?l:i,A=r&&s?mo(n,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{g(!u)},title:C,"aria-label":C,children:u?mo(He,{className:"h-3 w-3"}):mo(pe,{className:"h-3 w-3"})}):null;if(d!==void 0)return d({displayValue:P,toggle:A});return ep("div",{className:e("flex items-center gap-2",o),children:[mo("code",{className:"text-sm bg-muted px-2 py-1 rounded flex-1 break-all",children:P}),A]})};import*as pi from"react";import{jsx as di,jsxs as ui}from"react/jsx-runtime";var mi=pi.forwardRef(function({icon:r,text:o,trailing:a,className:s,...i},l){return ui("div",{ref:l,className:e("flex min-w-0 items-center gap-2",s),...i,children:[ui("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?di("span",{className:"text-primary/70",children:r}):null,di("span",{className:"min-w-0 truncate",children:o})]}),a]})});mi.displayName="MutedPlaceholder";var tp=mi;import{useMemo as rp,useState as np}from"react";import{jsx as Ct,jsxs as fo}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 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)=>ua({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,i])=>[s,ua({ancestors:r,value:i})]));return r.delete(t),a}return},tr=(t)=>{if(t instanceof Object&&!Array.isArray(t))return t;return},Hr=(t)=>Array.isArray(t)?t:void 0,fi=(t)=>Object.prototype.toString.call(t)==="[object String]"&&t===String.prototype.valueOf.call(t),pa=(t)=>fi(t)?t:void 0,op=(t)=>Hr(t)?.filter(fi)??[],ap=(t)=>{let r=Hr(t.anyOf);if(!r)return t;let o=r.filter((a)=>tr(a)?.type!=="null");return o.length===1?tr(o[0])??t:t},gi=(t)=>{let r=pa(t.type);if(r!==void 0&&r!=="")return r;if(Hr(t.enum))return"enum";if(Hr(t.oneOf)||Hr(t.anyOf))return"variant";if(tr(t.properties))return"object";return"value"},bi=(t,r="schema")=>{let o=tr(t.properties);if(o){let s=new Set(op(t.required));return Object.entries(o).flatMap(([i,l])=>{let c=tr(l);return c?[{name:i,path:`${r}.properties.${i}`,required:s.has(i),schema:c}]:[]})}if(gi(t)==="array"){let s=tr(t.items);return s?[{name:"Items",path:`${r}.items`,required:!0,schema:s}]:[]}let a=Hr(t.oneOf)??Hr(t.anyOf)??Hr(t.allOf);if(!a)return[];return a.flatMap((s,i)=>{let l=tr(s);return l?[{name:`Option ${i+1}`,path:`${r}.option.${i}`,required:!0,schema:l}]:[]})},ma=(t,r,o=new Set)=>{let a=ap(t),s=pa(a.$ref);if(s===void 0||s===""||!s.startsWith("#/$defs/")||o.has(s))return a;let i=tr(tr(r.$defs)?.[s.slice(8)]);if(!i)return a;return ma(i,r,new Set([...o,s]))},vi=({child:t,depth:r,root:o,defaultExpandedDepth:a})=>{let s=ma(t.schema,o),i=bi(s,t.path),[l,c]=np(r<a),d=gi(s),u=pa(s.description),g=i.length>0,b=l?`Collapse ${t.name}`:`Expand ${t.name}`;return fo(J,{open:l,onOpenChange:c,children:[fo("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",g&&"gap-2"),style:{paddingLeft:`${10+r*16}px`},children:[g?Ct(ee,{"aria-label":b,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:Ct(m,{className:e("size-3.5 transition-transform",l&&"rotate-90")})}):null,fo("div",{className:"min-w-0 flex-1",children:[fo("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[Ct("span",{className:"break-all text-xs font-medium text-foreground",children:t.name}),Ct("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:d}),t.required?Ct("span",{className:"text-[10px] font-medium text-destructive",children:"required"}):null]}),u!==void 0&&u!==""?Ct("p",{className:"mt-0.5 text-xs leading-snug text-muted-foreground",children:u}):null]})]}),g?Ct(te,{children:Ct("div",{className:"border-l border-border/70",children:i.map((w)=>Ct(vi,{child:w,defaultExpandedDepth:a,depth:r+1,root:o},w.path))})}):null]})},sp=({schema:t,className:r,defaultExpandedDepth:o=1,emptyLabel:a="No fields"})=>{let s=rp(()=>ua({ancestors:new WeakSet,value:t}),[t]),i=tr(s);if(!i)return Ct("p",{className:e("text-xs text-muted-foreground",r),children:a});let l=ma(i,i),c=bi(l);if(!c.length)return Ct("p",{className:e("text-xs text-muted-foreground",r),children:a});return Ct("div",{"aria-label":"Object schema",className:e("overflow-hidden rounded-lg border border-border",r),children:c.map((d)=>Ct(vi,{child:d,defaultExpandedDepth:o,depth:0,root:i},d.path))})};import rr,{createContext as Fn,useContext as yn,useEffect as xe,useState as Xt,useCallback as Kt,useMemo as Ne,useRef as Ee,memo as mp,useReducer as fp,cloneElement as lx,forwardRef as cx}from"react";import{createPortal as gp,unstable_batchedUpdates as wo}from"react-dom";import{useMemo as ga,useLayoutEffect as ip,useEffect as xi,useRef as fn,useCallback as go}from"react";function yi(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return ga(()=>(a)=>{r.forEach((s)=>s(a))},r)}var An=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $r(t){let r=Object.prototype.toString.call(t);return r==="[object Window]"||r==="[object global]"}function bo(t){return"nodeType"in t}function ze(t){var r,o;if(!t)return window;if($r(t))return t;if(!bo(t))return window;return(r=(o=t.ownerDocument)==null?void 0:o.defaultView)!=null?r:window}function vo(t){let{Document:r}=ze(t);return t instanceof r}function gn(t){if($r(t))return!1;return t instanceof ze(t).HTMLElement}function ba(t){return t instanceof ze(t).SVGElement}function Jr(t){if(!t)return document;if($r(t))return t.document;if(!bo(t))return document;if(vo(t))return t;if(gn(t)||ba(t))return t.ownerDocument;return document}var $t=An?ip:xi;function ho(t){let r=fn(t);return $t(()=>{r.current=t}),go(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 wi(){let t=fn(null),r=go((a,s)=>{t.current=setInterval(a,s)},[]),o=go(()=>{if(t.current!==null)clearInterval(t.current),t.current=null},[]);return[r,o]}function bn(t,r){if(r===void 0)r=[t];let o=fn(t);return $t(()=>{if(o.current!==t)o.current=t},r),o}function vn(t,r){let o=fn();return ga(()=>{let a=t(o.current);return o.current=a,a},[...r])}function On(t){let r=ho(t),o=fn(null),a=go((s)=>{if(s!==o.current)r==null||r(s,o.current);o.current=s},[]);return[o,a]}function xo(t){let r=fn();return xi(()=>{r.current=t},[t]),r.current}var fa={};function jr(t,r){return ga(()=>{if(r)return r;let o=fa[t]==null?0:fa[t]+1;return fa[t]=o,t+"-"+o},[t,r])}function Ni(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((i,l)=>{let c=Object.entries(l);for(let[d,u]of c){let g=i[d];if(g!=null)i[d]=g+t*u}return i},{...r})}}var Gr=Ni(1),Wr=Ni(-1);function lp(t){return"clientX"in t&&"clientY"in t}function Hn(t){if(!t)return!1;let{KeyboardEvent:r}=ze(t.target);return r&&t instanceof r}function cp(t){if(!t)return!1;let{TouchEvent:r}=ze(t.target);return r&&t instanceof r}function yo(t){if(cp(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(lp(t))return{x:t.clientX,y:t.clientY};return null}var Vr=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[Vr.Translate.toString(t),Vr.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:r,duration:o,easing:a}=t;return r+" "+o+"ms "+a}}}),hi="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ri(t){if(t.matches(hi))return t;return t.querySelector(hi)}import Ci,{useState as dp,useCallback as up}from"react";var pp={display:"none"};function Si(t){let{id:r,value:o}=t;return Ci.createElement("div",{id:r,style:pp},o)}function Pi(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 Ci.createElement("div",{id:r,style:s,role:"status","aria-live":a,"aria-atomic":!0},o)}function Ti(){let[t,r]=dp("");return{announce:up((a)=>{if(a!=null)r(a)},[]),announcement:t}}var _i=Fn(null);function bp(t){let r=yn(_i);xe(()=>{if(!r)throw Error("useDndMonitor must be used within a children of <DndContext>");return r(t)},[t,r])}function vp(){let[t]=Xt(()=>new Set),r=Kt((a)=>(t.add(a),()=>t.delete(a)),[t]);return[Kt((a)=>{let{type:s,event:i}=a;t.forEach((l)=>{var c;return(c=l[s])==null?void 0:c.call(l,i)})},[t]),r]}var hp={draggable:`
|
|
2
|
+
import{_r,ue,Ye,xe,Or,Fr,Br,Ur,Vr,yt,St,Xe,Hr,Gr,Qe}from"../../index-nadagexv.js";import{p,n}from"../../index-3yxm33ex.js";import"../../index-99ad0xy6.js";import{w,R,k,pt,L,N,f,y,I}from"../../index-2thxhq0q.js";import{rt,ot,at,Bt,fe,nt,G,pe,it,be,st,oe,z,M,A,D,It,Ht,Gt,zt,$t,Wt,qt,Ke,lt,ct,dt,Kt,Yt,Pt,Tt,Qt,Zt}from"../../index-n43k1xpt.js";import{Ft,qe,ao}from"../../index-9az9jb0y.js";import"../../index-rbdjqvhp.js";import{mt,ht,gt}from"../../index-1wmmfj25.js";import{xr}from"../../index-v31zghad.js";import{ae,ne,ie}from"../../index-mxgt32b6.js";import{B,er,tr,rr,ut,ft}from"../../index-vejf6hg0.js";import{kt}from"../../index-4mm4a7nt.js";import{e}from"../../index-mp8nkq9m.js";import{F,re,Ct,Ze,Ge}from"../../index-4ekvdxt4.js";import{wt,Rt,ze,$e,Lt,We}from"../../index-rvwx0vhw.js";import{h}from"../../index-ek4ar1qs.js";import{g,S}from"../../index-9me7rg96.js";import"../../index-wwq9v1me.js";import{m,v}from"../../index-e105w3b8.js";import{jsx as ic,jsxs as lc}from"react/jsx-runtime";var sc=({children:t,loading:r=!1,fullWidth:o=!1,className:a,disabled:s,variant:i,size:l,...c})=>lc(n,{variant:i,size:l,className:e(o&&"w-full",a),disabled:s===!0||r,...c,children:[r&&ic(Qe,{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:o="button",...a},s)=>uc(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(Xe,{className:"size-3.5"})}),t]}),qn=Wa.forwardRef(dc);qn.displayName="AddItemButton";var pc=qn;import{forwardRef as mc}from"react";import{jsx as gc}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},fc=(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:i,day:l}=o.groups??{};return Xa(Number(s),Number(i),Number(l))?`${s}-${i}-${l}`:null}let a=/^(?<day>\d{1,2})[/\-.](?<month>\d{1,2})[/\-.](?<year>\d{4})$/u.exec(r);if(a){let{day:s,month:i,year:l}=a.groups??{},c=Number(s),d=Number(i),u=Number(l);if(!Xa(u,d,c))return null;return`${u}-${String(d).padStart(2,"0")}-${String(c).padStart(2,"0")}`}return null},Ua=mc(function({onPaste:r,...o},a){return gc(f,{ref:a,type:"date",onPaste:(i)=>{let l=i.clipboardData.getData("text"),c=fc(l);if(c!==null&&c!==""){i.preventDefault();let d=i.currentTarget,u=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.bind(d);if(u!==void 0)u(c),d.dispatchEvent(new Event("input",{bubbles:!0}))}r?.(i)},...o})});Ua.displayName="DateInput";var bc=Ua;import*as Ka from"react";import{jsx as hc}from"react/jsx-runtime";var Ya=p("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:o,...a},s)=>hc(t,{ref:s,className:e(Ya({size:r}),o),...a}),qa=Ka.forwardRef(vc);qa.displayName="DisplayHeading";var xc=qa;import*as Sr from"react";import{jsx as sn,jsxs as Qa,Fragment as Za}from"react/jsx-runtime";var Zn=Sr.forwardRef(function({value:r,label:o,variant:a="icon",copyLabel:s="Copy",copiedLabel:i="Copied",errorMessage:l="Failed to copy to clipboard",resetDelay:c=1500,className:d,onClick:u,...b},x){let[C,E]=Sr.useState(!1),P=Sr.useRef(null);Sr.useEffect(()=>()=>{if(P.current!==null)clearTimeout(P.current)},[]);let O=async(X)=>{u?.(X);try{if(await navigator.clipboard.writeText(r),E(!0),P.current!==null)clearTimeout(P.current);P.current=setTimeout(()=>{E(!1)},c)}catch{G.error(l)}};if(a==="button")return sn(n,{ref:x,type:"button",variant:"outline",onClick:(X)=>{O(X)},"aria-label":`Copy ${o}`,className:e("shrink-0",d),...b,children:C?Qa(Za,{children:[sn(m,{className:"mr-1 size-4"}),i]}):Qa(Za,{children:[sn(ue,{className:"mr-1 size-4"}),s]})});return sn("button",{ref:x,type:"button",onClick:(X)=>{O(X)},"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",d),...b,children:C?sn(m,{className:"size-3.5 text-primary"}):sn(ue,{className:"size-3.5"})})});Zn.displayName="CopyButton";var yc=Zn;import{jsx as Ko,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:[Ko("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}),Ko("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}),Ko("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:o,className:a,...s},i)=>Tc("span",{ref:i,className:e("tabular-nums",a),...s,children:t===null||t===void 0?r:new Intl.NumberFormat(o).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:o="md",initial:a,className:s,children:i,...l},c){return Ec("span",{ref:c,"aria-hidden":!0,className:e("inline-flex shrink-0 select-none items-center justify-center border font-display font-bold",Dc[o],Lc[r],s),...l,children:i??(a!==void 0&&a!==""?a.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:o,...a},s)=>Oc(t,{ref:s,className:e("inline-block text-[11px] font-semibold uppercase tracking-[0.06em]",Ic[r],o),...a}),ln=ss.forwardRef(Ac);ln.displayName="Kicker";var Hc=ln;import*as is from"react";import{jsx as Fc}from"react/jsx-runtime";var Vc=(t)=>`+${t}`,Bc=({expanded:t,hiddenCount:r,collapsedLabel:o=Vc,expandedLabel:a="Show less",onToggle:s,className:i,...l},c)=>Fc("button",{ref:c,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",i),...l,children:t?a:o(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=p("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,...o},a)=>jc("span",{ref:a,className:e(zc({size:t}),r),...o}),cn=cs.forwardRef($c);cn.displayName="SerifNumeral";var Jc=cn;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:o,className:a,children:s,...i},l)=>ds(lt,{children:[us(ct,{asChild:!0,children:ds(I,{ref:l,variant:"outline",className:e(Gc[r],a),...i,children:[o,s]})}),us(dt,{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"}},Qn=fs.forwardRef(function({variant:r="body1",as:o,className:a,...s},i){let{tag:l,className:c}=Uc[r];return Kc(o??l,{ref:i,className:e(c,a),...s})});Qn.displayName="Typography";import{jsx as qc}from"react/jsx-runtime";var Yc=({children:t,as:r="form",className:o,onSubmit:a,...s})=>{let i=(l)=>{l.preventDefault(),a?.(l)};return qc(r,{className:e("flex flex-col gap-4 min-w-[300px]",o),onSubmit:i,...s,children:t})},Zc=Yc;import{jsx as rd}from"react/jsx-runtime";var gs={},dn=(...t)=>{for(let r of t)if(r!==void 0)return r;return 1},Qc=(t=gs)=>({"--list-cols":dn(t.cols),"--list-cols-2xl":dn(t.cols2xl,t.colsXl,t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-lg":dn(t.colsLg,t.colsMd,t.colsSm,t.cols),"--list-cols-md":dn(t.colsMd,t.colsSm,t.cols),"--list-cols-sm":dn(t.colsSm,t.cols),"--list-cols-xl":dn(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,...o})=>rd("div",{className:ed,style:Qc(t),...o,children:r});import{jsx as od}from"react/jsx-runtime";var nd=({className:t,spaced:r=!1,...o})=>od("div",{className:e("animate-[rise-in_500ms_cubic-bezier(0.16,1,0.3,1)_both]",r&&"space-y-6",t),...o});var ad=nd;import{jsx as Mn,jsxs as un}from"react/jsx-runtime";var sd=(t)=>t!==null&&t!==void 0&&t.constructor===String,En=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==""&&t!==0,id=({title:t,description:r,icon:o,kicker:a,status:s,actions:i,className:l})=>un("header",{className:e("space-y-2",l),children:[En(a)?un("div",{className:"flex items-center gap-2 text-(--text-muted) [&_svg]:h-3.5 [&_svg]:w-3.5",children:[En(o)?Mn("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-sm bg-(--bg-accent-soft) text-(--accent)",children:o}):null,Mn("span",{className:"text-[12px] font-medium tracking-tight [&_span.sep]:mx-1.5 [&_span.sep]:text-(--accent)",children:sd(a)?a.split("·").map((c,d,u)=>un("span",{children:[c.trim(),d<u.length-1?Mn("span",{className:"sep","aria-hidden":!0,children:"·"}):null]},d)):a})]}):null,un("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[un("div",{className:"min-w-0 flex-1 basis-64 space-y-1.5",children:[Mn("h1",{className:"font-display text-[27px] font-bold leading-tight tracking-[-0.02em] text-(--text-primary)",children:t}),En(r)?Mn("p",{className:"max-w-2xl text-[14px] leading-relaxed text-(--text-secondary)",children:r}):null]}),En(i)||En(s)?un("div",{className:"flex shrink-0 items-center gap-2 pt-1",children:[s,i]}):null]})]}),ld=id;import*as vs from"react";import{jsx as eo,jsxs as bs}from"react/jsx-runtime";var Yo=(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:i,...l},c){return bs("div",{ref:c,className:e("flex items-start gap-3",i),...l,children:[Yo(r)?eo("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:[eo("h3",{className:"text-[15px] font-semibold leading-snug text-foreground",children:o}),Yo(a)?eo("p",{className:"mt-0.5 text-sm leading-relaxed text-muted-foreground",children:a}):null]}),Yo(s)?eo("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(Qn,{variant:"h2",children:t}),Boolean(r)&&xs("div",{className:"flex items-center gap-2",children:r})]}),pd=dd;import*as ro from"react";import{jsx as Et,jsxs as to}from"react/jsx-runtime";var ys=(t,r,o)=>{if(t.length>=r)return t;return[...t,...Array.from({length:r-t.length},o)]},md=[],qo=({values:t,defaultValues:r=md,onValuesChange:o,addLabel:a,getRemoveLabel:s,actions:i,minItems:l=0,disabled:c=!1,renderItem:d,createItem:u,validateItem:b,classes:x,className:C,id:E,...P})=>{let O=ro.useId(),[X,j]=ro.useState(()=>ys(r,l,u)),H=ys(t??X,l,u),V=Boolean(i),J=(K)=>{if(t===void 0)j(K);o?.(K)};return to("div",{"data-slot":"array-input",className:e("space-y-2",x?.root,C),...P,children:[Et("div",{className:"space-y-2",children:H.map((K,_)=>{let W=_===0&&E!==void 0&&E!==""?E:`${O}-${_}`,U=b?.(K,_);return to("div",{className:e("flex items-center gap-3",x?.row),children:[d({disabled:c,id:W,index:_,onValueChange:(te)=>{let q=[...H];q[_]=te,J(q)},validationMessage:U,value:K}),H.length>l?Et(n,{type:"button",variant:"ghost",size:"icon",disabled:c,"aria-label":s(_),className:e("size-10 shrink-0 text-muted-foreground hover:text-destructive",x?.removeButton),onClick:()=>{J(H.filter((te,q)=>q!==_))},children:Et(Hr,{"aria-hidden":"true",className:"size-4"})}):null]},_)})}),to("div",{className:e("flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",x?.actionRow),children:[Et(qn,{disabled:c,className:x?.addButton,onClick:()=>{J([...H,u()])},children:a}),V?Et("div",{className:e("sm:ml-auto",x?.actions),children:i}):null]})]})},fd=(t)=>{let{createItem:r,getItemLabel:o,inputProps:a,placeholder:s,required:i=!1,renderItem:l,...c}=t,{className:d,...u}=a??{};if(l!==void 0)return Et(qo,{...c,createItem:r??(()=>""),renderItem:l});return Et(qo,{...c,createItem:r??(()=>""),renderItem:(b)=>{let{disabled:x,id:C,index:E,onValueChange:P,validationMessage:O,value:X}=b;return to("div",{className:"min-w-0 flex-1",children:[Et(f,{...u,id:C,"aria-label":o(E),"aria-invalid":Boolean(O),value:X,placeholder:s,required:i,disabled:x,className:e("w-full",d,c.classes?.input),onChange:(j)=>{P(j.target.value)}}),O!==void 0&&O!==""?Et("p",{className:"mt-1 text-xs text-destructive",role:"alert",children:O}):null]})}})},gd=(t)=>Et(qo,{...t}),bd=(t)=>t.createItem!==void 0&&t.renderItem!==void 0,ws=(t)=>{if(bd(t))return Et(gd,{...t});return Et(fd,{...t})};ws.displayName="ArrayInput";var vd=ws;import*as pn from"react";var Pr=(t,r)=>{let o=[];for(let a of t){let s=o.findIndex((i)=>r(a,i)<0);if(s===-1)o.push(a);else o.splice(s,0,a)}return o};var Mt={hour:9,interval:1,minute:0,mode:"day",monthday:1,weekdays:[1,2,3,4,5]},Zo=/^\*\/(?<step>\d+)$/u,hd=(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),i=Number(a.groups?.end);if(s>i)return null;for(let l=s;l<=i;l+=1)r.push(l)}else if(/^\d+$/u.test(o))r.push(Number(o));else return null}return r},xd=(t,r,o,a)=>{if(r==="*"&&o==="*"&&a==="*"){let s=Zo.exec(t),i=Number(s?.groups?.step);return s&&i>=1&&i<=59?{...Mt,interval:i,mode:"minutes"}:null}return},yd=(t,r,o,a)=>{if(r!=="*"||o!=="*")return;let s=Zo.exec(t);if(s){let i=Number(s.groups?.step);return i>=1&&i<=23?{...Mt,interval:i,minute:a,mode:"hours"}:null}return},wd=(t,r,o)=>{let a=Zo.exec(t);if(a){let i=Number(a.groups?.step);if(i%7===0&&i>=7&&i<=28)return{...Mt,hour:r,interval:i/7,minute:o,mode:"weeks"};return i>=1&&i<=31?{...Mt,hour:r,interval:i,minute:o,mode:"days"}:null}let s=Number(t);return/^\d+$/u.test(t)&&s>=1&&s<=31?{...Mt,hour:r,minute:o,mode:"month",monthday:s}:null},Nd=(t,r,o)=>{let a=hd(t);if(!a||a.some((i)=>i<0||i>7))return null;let s=Pr(new Set(a.map((i)=>i===7?0:i)),(i,l)=>i-l);return{...Mt,hour:r,minute:o,mode:"week",weekdays:s}},In=(t)=>{let r=t.trim().split(/\s+/u);if(r.length!==5)return null;let[o,a,s,i,l]=r;if(i!=="*")return null;let c=xd(o,a,s,l);if(c!==void 0)return c;if(!/^\d+$/u.test(o))return null;let d=Number(o);if(d<0||d>59)return null;let u=yd(a,s,l,d);if(u!==void 0)return u;if(!/^\d+$/u.test(a))return null;let b=Number(a);if(b<0||b>23)return null;if(s==="*"&&l==="*")return{...Mt,hour:b,minute:d,mode:"day"};if(l==="*")return wd(s,b,d);if(s==="*")return Nd(l,b,d);return null},Tr=(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?Pr(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 l=s.groups?.base??"";if(l!=="*"&&!Ns(l,r,o))return!1;let c=Number(s.groups?.increment);if(!Number.isFinite(c)||c<1)return!1;continue}let i=/^(?<start>\d+)-(?<end>\d+)$/u.exec(a);if(i){let l=Number(i.groups?.start),c=Number(i.groups?.end);if(l<r||c>o||l>c)return!1;continue}if(/^\d+$/u.test(a)){let l=Number(a);if(l<r||l>o)return!1;continue}return!1}return!0},Rd=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Cd=(t,r)=>{let o=String(t).padStart(2,"0"),a=String(r).padStart(2,"0");return`${o}:${a}`},no=(t)=>{let r=In(t);if(!r)return t;let o=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 ${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=Pr(r.weekdays,(c,d)=>c-d),s=a.length===5&&a.every((c,d)=>c===d+1),i=a.length===2&&a[0]===0&&a[1]===6;if(s)return`Weekdays at ${o}`;if(i)return`Weekends at ${o}`;return`${a.map((c)=>Rd[c].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")}},Qo=(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((d)=>d.type==="timeZoneName")?.value??"GMT",s=/(?<sign>[+-])(?<hours>\d{1,2})(?::(?<minutes>\d{2}))?/u.exec(a);if(!s)return 0;let i=s.groups?.sign==="-"?-1:1,l=Number(s.groups?.hours??0),c=Number(s.groups?.minutes??0);return i*(l*60+c)},Sd=(t)=>{let r=Rs(t),o=r>=0?"+":"-",a=Math.abs(r),s=String(Math.floor(a/60)).padStart(2,"0"),i=String(a%60).padStart(2,"0");return`${o}${s}:${i}`},oo=null,ea=()=>{if(oo)return oo;let t="supportedValuesOf"in Intl?Intl.supportedValuesOf("timeZone"):["UTC"];return oo=Pr(["UTC",...t].map((r)=>({label:`${r} (UTC${Sd(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})),oo};import{jsx as Pd}from"react/jsx-runtime";var so=({value:t,onChange:r,className:o,width:a="100%",disabled:s,placeholder:i="Select timezone"})=>{let l=Cs.useMemo(()=>ea(),[]);return Pd(It,{options:l,value:t,onChange:(c)=>{r(c||"UTC")},placeholder:i,searchPlaceholder:"Search timezone...",emptyMessage:"No timezone found.",className:e("bg-transparent font-normal",o),width:a,disabled:s})};import{jsx as le,jsxs as Ie,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:Tr(Mt),simple:Mt,view:"simple"};let o=In(r);if(o)return{custom:r,simple:o,view:"simple"};return{custom:r,simple:Mt,view:"advanced"}},Ld=(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")}},io=(t,r,o)=>Math.max(r,Math.min(o,t)),Ps=(t)=>String(t).padStart(2,"0"),Dd=({hour:t,minute:r,onChange:o})=>Ie("div",{className:"flex items-center gap-1",children:[le(f,{type:"number",min:0,max:23,value:Ps(t),onChange:(a)=>{o(io(Number(a.target.value)||0,0,23),r)},className:"w-16 text-center font-mono"}),le("span",{className:"text-muted-foreground",children:":"}),le(f,{type:"number",min:0,max:59,value:Ps(r),onChange:(a)=>{o(t,io(Number(a.target.value)||0,0,59))},className:"w-16 text-center font-mono"})]}),Ed=({state:t,onChange:r,timezone:o,onTimezoneChange:a})=>{let s=t.mode==="minutes"||t.mode==="hours"||t.mode==="days"||t.mode==="weeks",i=t.mode!=="minutes"&&t.mode!=="hours",l=t.mode==="hours",c=t.mode==="week",d=t.mode==="month";return Ie("div",{className:"space-y-3",children:[le("div",{className:"grid gap-2 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-end",children:Ie("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"Every"}),Ie("div",{className:e("grid gap-2",s?"grid-cols-[88px_minmax(0,1fr)]":"grid-cols-1"),children:[s&&le(f,{type:"number",min:1,value:t.interval,onChange:(u)=>{r({interval:Math.max(1,Number(u.target.value)||1)})},className:"font-mono"}),Ie(Gt,{value:t.mode,onValueChange:(u)=>{if(kd(u))r({mode:u})},children:[le($t,{className:"flex-1",children:le(zt,{})}),le(qt,{children:Ts.map((u)=>le(Wt,{value:u.value,children:Ld(u,t.interval)},u.value))})]})]})]})}),c&&Ie("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"On"}),le(Qt,{type:"multiple",variant:"outline",size:"sm",value:t.weekdays.map(String),onValueChange:(u)=>{r({weekdays:u.length?Pr(u.map(Number),(b,x)=>b-x):[1]})},className:"w-full",children:Td.map((u)=>le(Zt,{value:String(u.value),"aria-label":u.label,className:"text-xs",children:u.short},u.value))})]}),d&&Ie("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"On day"}),le(f,{type:"number",min:1,max:31,value:t.monthday,onChange:(u)=>{r({monthday:io(Number(u.target.value)||1,1,31)})},className:"w-24"})]}),(i||o!==void 0&&a)&&Ie("div",{className:e("grid gap-3",i&&o!==void 0&&a?"lg:grid-cols-[auto_minmax(0,1fr)] lg:items-end":"grid-cols-1"),children:[i&&Ie("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"At"}),le(Dd,{hour:t.hour,minute:t.minute,onChange:(u,b)=>{r({hour:u,minute:b})}})]}),o!==void 0&&a&&Ie("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),le(so,{value:o,onChange:a})]})]}),l&&Ie("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"At minute"}),le(f,{type:"number",min:0,max:59,value:t.minute,onChange:(u)=>{r({minute:io(Number(u.target.value)||0,0,59)})},className:"w-24"})]})]})},Md=({value:t,onChange:r,className:o,showPreview:a=!0,timezone:s,onTimezoneChange:i})=>{let[l,c]=pn.useState(()=>Ss(t)),[d,u]=pn.useState(t),[b,x]=pn.useState(t);if(t!==d){if(u(t),t!==b)x(t),c(Ss(t))}let C=pn.useCallback((H)=>{let V=H.view==="simple"?Tr(H.simple):H.custom;x(V),r(V)},[r]),E=(H)=>{c((V)=>{let J={...V.simple,...H},K={...V,custom:Tr(J),simple:J};return C(K),K})},P=(H)=>{c((V)=>{let J={...V,custom:H};return C(J),J})},O=(H)=>{c((V)=>{if(H===V.view)return V;if(H==="advanced"){let _=Tr(V.simple),W={...V,custom:_,view:H};return C(W),W}let J=In(V.custom),K=J?{...V,simple:J,view:H}:{...V,view:H};return C(K),K})},X=Qo(l.custom),j=null;if(l.view==="simple")j=no(Tr(l.simple));else if(X)j=no(l.custom);return Ie("div",{className:e("space-y-4",o),children:[Ie(Kt,{value:l.view,onValueChange:(H)=>{if(H==="simple"||H==="advanced")O(H)},children:[Ie(Yt,{className:"grid w-full grid-cols-2 rounded-md bg-muted/70 p-1 sm:w-[320px]",children:[le(Pt,{value:"simple",className:"text-xs",children:"Simple"}),le(Pt,{value:"advanced",className:"text-xs",children:"Advanced"})]}),le(Tt,{value:"simple",className:"space-y-3 pt-3",children:le(Ed,{state:l.simple,onChange:E,timezone:s,onTimezoneChange:i})}),Ie(Tt,{value:"advanced",className:"space-y-2 pt-3",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"Cron Expression"}),le(f,{value:l.custom,onChange:(H)=>{P(H.target.value)},placeholder:"0 9 * * 1-5",className:e("font-mono text-sm",!X&&l.custom.trim()&&"border-destructive focus-visible:ring-destructive/40"),spellCheck:!1}),le("p",{className:"text-[11px] text-muted-foreground",children:"Format: minute hour day-of-month month day-of-week"})]})]}),l.view==="advanced"&&s!==void 0&&i&&Ie("div",{className:"space-y-2",children:[le("span",{className:"text-xs font-medium text-muted-foreground",children:"Timezone"}),le(so,{value:s,onChange:i})]}),a&&le("div",{className:"flex min-h-8 flex-wrap items-center gap-2 rounded-md bg-muted/35 px-3 py-2 text-xs",children:j===null?le("span",{className:"text-destructive",children:"Invalid cron expression"}):Ie(Id,{children:[le("span",{className:"text-muted-foreground",children:j}),le(I,{variant:"secondary",className:"ml-auto font-mono text-[11px]",children:l.view==="simple"?Tr(l.simple):l.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:o="",width:a,height:s,fill:i="horizontal",style:l})=>{if(i==="both")return ta("div",{className:e("relative overflow-hidden rounded-lg shadow-md",o),style:{height:s,width:a,...l},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:a,height:s,className:e("object-cover rounded-lg shadow-md",Ad[i],o),style:{height:i==="vertical"?"100%":s,width:i==="horizontal"?"100%":a,...l}})},Hd=Od;import{jsx as lo,jsxs as ks}from"react/jsx-runtime";var Vd=({title:t,className:r,children:o,...a})=>ks("section",{"data-slot":"summary-list",className:e("space-y-2",r),...a,children:[t?lo("h3",{className:"text-sm font-semibold tracking-tight",children:t}):null,lo("dl",{className:"divide-y divide-border overflow-hidden rounded-lg border border-border bg-card",children:o})]}),Bd=({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:[lo("dt",{className:"text-sm text-muted-foreground",children:t}),lo("dd",{className:e("min-w-0 break-words text-sm",o?"text-muted-foreground":"font-medium text-foreground"),children:r})]});import*as ra from"react";import{jsx as zr,jsxs as Ls}from"react/jsx-runtime";var Fd=({className:t,...r})=>zr(er,{"data-slot":"choice-card-group",className:e("grid gap-3",t),...r}),_d=({title:t,description:r,media:o,footer:a,className:s,...i})=>{let l=ra.useId(),c=ra.useId(),d=Boolean(r);return Ls(tr,{"data-slot":"choice-card","aria-labelledby":l,"aria-describedby":d?c:void 0,className:e("group/choice relative flex h-full min-w-0 flex-col items-start gap-4 rounded-lg border border-border bg-card p-5 text-left shadow-(--shadow-sm) outline-none transition-[border-color,background-color,box-shadow] dark:shadow-none","hover:border-foreground/25 focus-visible:ring-[3px] focus-visible:ring-ring/50","data-[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),...i,children:[zr("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:zr(rr,{children:zr(m,{className:"size-3",strokeWidth:3})})}),o,Ls("span",{className:"block min-w-0 space-y-1 pr-7",children:[zr("span",{id:l,className:"block font-semibold tracking-tight",children:t}),d?zr("span",{id:c,className:"block text-sm leading-relaxed text-muted-foreground",children:r}):null]}),a?zr("span",{className:"mt-auto block w-full",children:a}):null]})};import*as kr from"react";import{jsx as Lr,jsxs as Ds}from"react/jsx-runtime";var Es=kr.forwardRef(function({className:r,...o},a){return Lr("div",{ref:a,className:e("grid gap-2",r),...o})}),Ms=({className:t,...r})=>Lr(ut,{className:e("grid gap-2",t),...r}),na=(t)=>t!==void 0&&t!==null&&t!==!1&&t!==0&&t!==""&&!Number.isNaN(t),co=kr.forwardRef(function({title:r,description:o,descriptionId:a,wrapDescription:s=!1,disabled:i=!1,control:l,className:c,children:d,...u},b){return Ds("label",{ref:b,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",i?"cursor-not-allowed bg-muted/30 opacity-65":"cursor-pointer hover:bg-muted/50",c),...u,children:[l,Ds("span",{className:"min-w-0 flex-1",children:[Lr("span",{className:"block truncate text-sm font-medium",children:r}),na(o)?Lr("span",{id:a,className:e("mt-1 block text-xs text-muted-foreground",!s&&"truncate"),children:o}):null,d]})]})}),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:o,radioLabel:a,disabled:s=!1,onClick:i,...l})=>{let c=kr.useId(),d=kr.useId(),u=a??(Is(r)?r:void 0);return Lr(co,{description:o,descriptionId:d,disabled:s,title:r,onClick:(b)=>{if(i?.(b),b.defaultPrevented||s)return;let x=document.querySelector(`#${c}`);if(As(x,b.target))return;b.preventDefault(),x?.click()},control:Lr(ft,{"aria-describedby":na(o)?d:void 0,"aria-label":u,className:"mt-1",disabled:s,id:c,value:t}),...l})},$d=({checked:t,title:r,description:o,checkboxLabel:a,disabled:s=!1,onClick:i,onCheckedChange:l,...c})=>{let d=kr.useId(),u=kr.useId(),b=a??(Is(r)?r:void 0);return Lr(co,{description:o,descriptionId:u,disabled:s,title:r,onClick:(x)=>{if(i?.(x),x.defaultPrevented||s)return;if(As(document.querySelector(`#${d}`),x.target))return;x.preventDefault(),l(!t)},control:Lr(nt,{"aria-describedby":na(o)?u:void 0,"aria-label":b,checked:t,className:"mt-0.5",disabled:s,id:d,onCheckedChange:(x)=>{if(!s)l(x===!0)}}),...c})};Es.displayName="CardOptionsBlock";Ms.displayName="RadioCardOptionsBlock";co.displayName="CardOption";import*as Os from"react";import{jsx as An,jsxs as oa}from"react/jsx-runtime";var jd=({title:t,description:r,command:o,copyLabel:a=t??o,copyErrorMessage:s,className:i,...l},c)=>oa("div",{ref:c,className:e("space-y-2",i),...l,children:[t===void 0&&r===void 0?null:oa("div",{children:[t===void 0?null:An("p",{className:"text-sm font-medium",children:t}),r===void 0?null:An("p",{className:"text-sm text-muted-foreground",children:r})]}),oa("div",{className:"flex items-start gap-2",children:[An("pre",{className:"flex-1 overflow-x-auto rounded-md border bg-muted px-3 py-2 font-mono text-xs",children:An("code",{children:o})}),An(Zn,{value:o,label:a,errorMessage:s})]})]}),Hs=Os.forwardRef(jd);Hs.displayName="CommandStep";var Jd=Hs;import{forwardRef as Gd,useId as Wd}from"react";import{jsx as On,jsxs as Vs}from"react/jsx-runtime";var Bs=Gd(function({currency:r,label:o="Amount",hint:a,hideLabel:s=!1,hideHint:i=!1,error:l,className:c,wrapperClassName:d,id:u,decimals:b=2,step:x,placeholder:C,...E},P){let O=Wd(),X=u??O,j=`Enter amount in ${r}`,H=x??1/10**b,V=C??(b>0?`0.${"0".repeat(b)}`:"0"),J=l!==null&&l!==void 0&&l.length>0;return Vs("div",{className:e("w-full space-y-2",d),children:[!s&&On(y,{htmlFor:X,children:o}),Vs("div",{className:"relative",children:[On("span",{className:"-translate-y-1/2 absolute top-1/2 left-3 text-sm text-muted-foreground",children:r}),On(f,{ref:P,className:e("bg-background pl-12",J&&"border-destructive",c),id:X,min:"0",placeholder:V,step:H,type:"number",...E})]}),J?On("p",{className:"text-xs text-destructive",children:l}):!i&&On("p",{className:"text-xs text-muted-foreground",children:a??j})]})});Bs.displayName="CurrencyInput";var Xd=Bs;import*as Fs from"react";import{jsx as uo,jsxs as aa}from"react/jsx-runtime";var _s=Fs.forwardRef(function({index:r,label:o,hint:a,className:s,children:i,...l},c){let d=Boolean(r),u=Boolean(a);return aa("div",{ref:c,className:e("grid gap-x-4",d?"grid-cols-[2.25rem_1fr] sm:grid-cols-[2.5rem_1fr]":"grid-cols-1",s),...l,children:[d?uo("div",{className:"flex h-6 items-center justify-end pt-[2px]",children:uo(cn,{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:[uo(ln,{children:o}),u?uo("span",{className:"text-[10px] text-muted-foreground",children:a}):null]}),i]})]})});_s.displayName="FieldRow";var Ud=_s;import{jsx as ve,jsxs as _t,Fragment as tu}from"react/jsx-runtime";var Kd=(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]}`},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:o,hint:a})=>_t("div",{className:"flex w-full items-center gap-3",children:[ve("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:ve(Gr,{className:e("h-5 w-5",t?"text-primary":"text-muted-foreground")})}),_t("div",{children:[ve("p",{className:"text-sm font-medium text-foreground",children:t?r:o}),ve("p",{className:"text-xs text-muted-foreground",children:a})]})]}),Zd=({message:t,retryLabel:r})=>_t("div",{className:"flex w-full items-center gap-3",children:[ve("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-destructive/10",children:ve(S,{className:"h-5 w-5 text-destructive"})}),_t("div",{children:[ve("p",{className:"text-sm font-medium text-destructive",children:t}),ve("p",{className:"text-xs text-destructive/80",children:r})]})]}),Qd=({file:t,downloading:r,downloadLabel:o,downloadingLabel:a,onDownload:s,onRemove:i})=>_t("div",{className:"flex w-full items-center justify-between",children:[_t("div",{className:"flex items-center gap-3",children:[t.previewUrl!==void 0&&t.previewUrl!==null&&t.previewUrl!==""?_t(tu,{children:[ve("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})`}}),ve("span",{className:"sr-only",children:t.name})]}):ve("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:ve(F,{className:"h-5 w-5 text-(--success)"})}),_t("div",{className:"flex flex-col",children:[_t("div",{className:"flex items-center gap-2",children:[ve(Or,{className:"h-4 w-4 text-muted-foreground"}),ve("span",{className:"text-sm font-medium text-foreground",children:t.name})]}),ve("span",{className:"text-xs text-muted-foreground",children:Kd(t.size)})]})]}),_t("div",{className:"flex shrink-0 items-center gap-1",children:[s?ve(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?ve(h,{className:"h-4 w-4 animate-spin"}):ve(Ct,{className:"h-4 w-4"})}):null,i?ve(n,{className:"h-8 w-8 rounded-full p-0 hover:bg-destructive/10",onClick:i,size:"sm",type:"button",variant:"ghost",children:ve(S,{className:"h-4 w-4 text-destructive"})}):null]})]}),eu=(t)=>{let{rootProps:r,inputProps:o,isDragActive:a,selectedFile:s,error:i,onRemoveFile:l,onDownloadFile:c,isDownloadingFile:d,disabled:u,className:b,labels:x}=t,C={...Yd,...x},E=s!==void 0&&s!==null,P=i!==void 0&&i!==null&&i!=="";return ve("div",{className:e("w-full",b),children:_t("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",E&&"border-[color-mix(in_oklab,var(--success)_60%,var(--border))] bg-[color-mix(in_oklab,var(--success)_10%,transparent)]",P&&"border-destructive bg-[color-mix(in_oklab,var(--destructive)_10%,var(--card))]",u===!0&&"cursor-not-allowed opacity-60",r?.className),children:[ve("input",{...o}),!E&&!P?ve(qd,{active:Boolean(a),activeLabel:C.dragActive,hint:C.fileTypeHint,inactiveLabel:C.dragInactive}):null,s!==void 0&&s!==null&&!P?ve(Qd,{downloadLabel:C.downloadFile,downloading:Boolean(d),downloadingLabel:C.downloadingFile,file:s,onDownload:c,onRemove:l}):null,i!==void 0&&i!==null&&i!==""?ve(Zd,{message:i,retryLabel:C.errorRetry}):null]})})},ru=eu;import{jsx as zs,jsxs as ou}from"react/jsx-runtime";var nu=p("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:i,classes:l,...c})=>zs("div",{"aria-label":a,className:e("flex flex-wrap items-center gap-1.5",l?.root,i),...c,children:t.map((d)=>{let u=d.value===r;return ou("button",{type:"button","aria-pressed":u,disabled:d.disabled,onClick:()=>{o(d.value)},className:e(nu({active:u,size:s}),l?.chip),children:[d.label,d.count===void 0?null:zs("span",{className:e("tabular-nums text-[11px] text-(--text-muted)",l?.count),children:d.count})]},d.value)})});$s.displayName="FilterChips";var au=$s;import*as mn from"react";import{jsx as mr,jsxs as mu}from"react/jsx-runtime";var su=52,iu=26,mo=4,po=20,lu=(t)=>({"--flow-lane":t}),Js=mn.createContext(null),Gs=(t)=>{let r=mn.useContext(Js);if(!r)throw Error(`${t} must be rendered inside a FlowBand.`);return r},cu=({lanes:t=1,stepHeight:r=su,laneHeight:o=iu,className:a,style:s,children:i,...l})=>{let c=Math.max(r,t*o+(t-1)*mo),d=mn.useMemo(()=>({height:c,stepHeight:r}),[c,r]);return mr(Js.Provider,{value:d,children:mr("div",{className:e("flex min-w-0 items-stretch gap-1",a),style:{height:c,...s},...l,children:i})})},du=({className:t,style:r,children:o,...a})=>{let{stepHeight:s}=Gs("FlowStep");return mr("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,i=7;return mr("svg",{"aria-hidden":!0,width:po,height:r,viewBox:`0 0 ${po} ${r}`,className:"shrink-0",style:a?{transform:"scaleX(-1)"}:void 0,children:t.map((l,c)=>{let d=o[c];return mr("path",{style:lu(d),d:`M0 ${s}H7C13 ${s} ${po-6} ${l} ${po} ${l}`,fill:"none",strokeWidth:1.5,strokeLinecap:"round",className:d!==void 0&&d!==""?"stroke-[color-mix(in_oklab,var(--flow-lane)_45%,var(--border))]":"stroke-border"},c)})})},uu=(t,r)=>{let o=(r-mo*(t-1))/t;return Array.from({length:t},(a,s)=>s*(o+mo)+o/2)},pu=({lanes:t,fork:r=!0,rejoin:o=!0,label:a,className:s,...i})=>{let{height:l}=Gs("FlowBranch"),c=uu(t.length,l),d=t.map((u)=>u.color);return mu("div",{"aria-label":a,className:e("flex min-w-0 flex-1 items-stretch",s),...i,children:[r&&mr(js,{centers:c,height:l,colors:d}),mr("div",{className:"flex min-w-0 flex-1 flex-col",style:{gap:mo},children:t.map((u)=>mr("div",{className:"flex min-w-0 flex-1 items-stretch overflow-hidden",children:u.content},u.key))}),o&&mr(js,{centers:c,height:l,colors:d,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:o,...a},s)=>gu("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(cn,{className:"opacity-80",children:t})}),sa("p",{className:"text-[13px] text-muted-foreground",children:o})]}),Xs=Ws.forwardRef(fu);Xs.displayName="GuideStep";var bu=Xs;import*as gn from"react";import{jsx as je,jsxs as fn,Fragment as hu}from"react/jsx-runtime";var Us=gn.forwardRef(function({className:r,variant:o="island",...a},s){return je(fe,{ref:s,variant:o,className:e("gap-0 p-0",r),...a})});Us.displayName="HierarchyTree";var Ks=gn.forwardRef(function({title:r,icon:o,count:a,actions:s,className:i,...l},c){return fn("div",{ref:c,"data-slot":"hierarchy-tree-header",className:e("flex flex-wrap items-center gap-3 border-b border-border px-4 py-3",i),...l,children:[fn("div",{className:"flex min-w-0 items-center gap-2 text-sm font-medium",children:[o!==void 0&&o!==null?je("span",{className:"shrink-0 text-muted-foreground [&_svg]:h-4 [&_svg]:w-4",children:o}):null,je("span",{className:"min-w-0 truncate",children:r}),a!==void 0&&a!==null?je("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?je("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:s}):null]})});Ks.displayName="HierarchyTreeHeader";var Ys=gn.forwardRef(function({className:r,...o},a){return je("div",{ref:a,"data-slot":"hierarchy-tree-body",className:e("min-w-0",r),...o})});Ys.displayName="HierarchyTreeBody";var vu=[],qs=gn.forwardRef(function({depth:r,rails:o=vu,isLastChild:a=!1,hasChildren:s=!1,contentClassName:i,className:l,children:c,...d},u){let b=Math.max(1,r);return fn("div",{ref:u,"data-slot":"hierarchy-tree-row","data-depth":b,className:e("group flex items-stretch transition-colors hover:bg-muted/40",b===1&&"border-t border-border first:border-t-0",l),...d,children:[b>1?fn("div",{"aria-hidden":!0,className:"flex shrink-0 pl-5",children:[o.map((x,C)=>je("span",{className:"relative w-5",children:x?je("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}):null},C)),je("span",{className:"relative w-5",children:a?je("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")}):fn(hu,{children:[je("span",{className:"absolute inset-y-0 left-0 border-l border-(--border-subtle)"}),je("span",{className:e("absolute left-0 top-[22px] border-t border-(--border-subtle)",s?"w-full":"w-14")})]})})]}):null,je("div",{className:e("flex min-w-0 flex-1 items-start gap-2 py-3 pl-2 pr-3",i),children:c})]})});qs.displayName="HierarchyTreeRow";var Zs=gn.forwardRef(function({expanded:r,count:o,visible:a=!0,className:s,...i},l){return fn(n,{ref:l,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),...i,children:[je(v,{className:e("h-3.5 w-3.5 transition-transform",r&&"rotate-90")}),o]})});Zs.displayName="HierarchyTreeToggle";var xu=Us;import yu,{useState as wu}from"react";import{jsx as Le,jsxs as xt}from"react/jsx-runtime";var Nu=p("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,i])=>[s,ia({ancestors:r,value:i})]));return r.delete(t),a}return o},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 Le("span",{className:"w-4"});return r?Le(g,{className:"w-4 h-4"}):Le(v,{className:"w-4 h-4"})},ku=(t)=>t?{close:"]",open:"["}:{close:"}",open:"{"},Lu=(t,r,o)=>t?{name:null,path:`${o}[${r}]`}:{name:String(r),path:`${o}.${r}`},Du=({data:t,className:r,classes:o,variant:a,size:s,expandAll:i=!1,expandRoot:l=!0,indentSize:c=16,showLineNumbers:d=!1,showToolbar:u=!1,maxHeight:b,maxWidth:x,renderValue:C})=>{let E=yu.useMemo(()=>ia({ancestors:new WeakSet,value:t}),[t]),[P,O]=wu(()=>{let W={};if(l)W.root=!0;return W}),X=(W,U)=>{if(W==="root"&&P[W]===void 0)return l;return P[W]??U},j=(W)=>{O((U)=>({...U,[W]:!X(W,i)}))},H=(W)=>{O({})},V=()=>{try{let W=JSON.stringify(E,null,2);navigator.clipboard.writeText(W),G.success("Copied to clipboard",{description:"JSON data has been copied to clipboard",duration:3000})}catch(W){console.error("Failed to copy JSON to clipboard",W),G.error("Copy failed",{description:"Failed to copy JSON to clipboard",duration:3000})}},J={maxWidth:x??"auto"},K=(W,U,te,q,de)=>{let Re=[],ye=Pu(U),Pe=Array.isArray(U),Oe=ye&&Object.keys(U).length===0,Ve=ku(Pe),he={marginLeft:te*c},Je=Su(q),we=de;if(!ye){let ce=C?.(U,q);return Re.push(xt("div",{className:"flex",children:[d&&Le("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:we}),xt("div",{className:"flex min-w-0",style:he,children:[Le("span",{"aria-hidden":!0,className:"mr-1 w-4 shrink-0"}),W!==null&&xt("span",{className:"shrink-0 text-purple-600 dark:text-purple-400",children:[`"${W}":`,Le("span",{className:"text-gray-600 dark:text-gray-400 mr-1",children:" "})]}),ce??Le("span",{className:e("min-w-0 break-all",Ru(U)),children:Cu(U)})]})]},Je)),[Re,we+1]}let Be=X(q,i),Q=Tu(Oe,Be);if(Re.push(xt("div",{className:"flex items-start group",children:[d&&Le("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:we}),xt("div",{className:"flex items-start",style:he,children:[Le("button",{onClick:()=>{j(q)},className:"mr-1 w-4 h-4 mt-0.5 focus:outline-none opacity-60 hover:opacity-100","aria-label":Be?"Collapse":"Expand",tabIndex:0,type:"button",children:Q}),xt("div",{children:[W!==null&&xt("span",{className:"text-purple-600 dark:text-purple-400",children:[`"${W}":`,Le("span",{className:"text-gray-600 dark:text-gray-400 mr-1",children:" "})]}),Le("span",{className:"text-gray-600 dark:text-gray-400",children:Ve.open}),Oe||!Be?xt("span",{className:"text-gray-600 dark:text-gray-400",children:[Oe?"":"...",Ve.close]}):null]})]})]},`${Je}-open`)),we+=1,Be&&!Oe){let ce=we,se=Pe?U.map((Te,Ue)=>[Ue,Te]):Object.entries(U);for(let[Te,Ue]of se){let ke=Lu(Pe,Te,q),[hr,Z]=K(ke.name,Ue,te+1,ke.path,ce);Re.push(...hr),ce=Z}return Re.push(xt("div",{className:"flex",children:[d&&Le("div",{className:"text-gray-400 dark:text-gray-600 select-none w-8 text-right pr-2",children:ce}),Le("div",{className:"text-gray-600 dark:text-gray-400",style:he,children:Ve.close})]},`${Je}-close`)),ce+=1,[Re,ce]}return[Re,we]},[_]=K(null,E,0,"root",1);return xt("div",{className:e(Nu({size:s,variant:a}),o?.root,r),style:J,children:[u&&xt("div",{className:e("flex justify-between items-center px-3 py-2 border-b border-border bg-muted/50",o?.toolbar),children:[Le("div",{className:"text-sm font-medium",children:"JSON Viewer"}),xt("div",{className:"flex gap-2",children:[Le(n,{size:"sm",variant:"outline",onClick:()=>{H(!0)},children:"Expand All"}),Le(n,{size:"sm",variant:"outline",onClick:()=>{H(!1)},children:"Collapse All"}),xt(n,{size:"sm",variant:"outline",onClick:V,children:[Le(ue,{className:"w-4 h-4 mr-1"}),"Copy"]})]})]}),Le("div",{className:e("overflow-auto flex-1",o?.content),style:{maxHeight:b??void 0},children:_})]})},la=Du;import{useId as Eu,useState as Mu}from"react";import Iu from"react-markdown";import{jsx as fr,jsxs as ca,Fragment as Ou}from"react/jsx-runtime";var Qs=({mode:t,onModeChange:r,labels:o,disabled:a=!1,className:s})=>{let i=t==="write"?"preview":"write",l=i==="write"?o.write:o.preview,c=i==="write"?o.writeTitle??o.write:o.previewTitle??o.preview;return fr(n,{type:"button",variant:"ghost",size:"icon",className:e("size-7",s),disabled:a,"aria-label":l,title:c,onClick:()=>{r(i)},children:i==="preview"?fr(xe,{className:"size-3.5 text-muted-foreground"}):fr(_r,{className:"size-3.5 text-muted-foreground"})})},Au=({label:t,value:r,onValueChange:o,emptyPreview:a,toggleLabels:s,mode:i,defaultMode:l="write",onModeChange:c,previewValue:d=r,disabled:u=!1,placeholder:b,editorId:x,showHeader:C=!0,footer:E,className:P,editorClassName:O,previewClassName:X,textareaProps:j})=>{let H=Eu(),V=x??H,[J,K]=Mu(l),_=i??J,W=(U)=>{if(i===void 0)K(U);c?.(U)};return ca("div",{className:e("grid gap-2",P),children:[C&&ca("div",{className:"flex items-center justify-between gap-3",children:[fr(y,{htmlFor:_==="write"?V:void 0,children:t}),fr(Qs,{mode:_,onModeChange:W,labels:s,disabled:u})]}),_==="write"?ca(Ou,{children:[fr(B,{...j,id:V,value:r,disabled:u,placeholder:b,"aria-label":C?j?.["aria-label"]:j?.["aria-label"]??t,className:e("min-h-48 resize-y font-mono text-sm",O),onChange:(U)=>{o(U.target.value)}}),E]}):fr("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",X),children:d.trim()?fr(Iu,{children:d}):fr("div",{className:"not-prose text-muted-foreground",children:a})})]})};import{jsx as fo,jsxs as Vu}from"react/jsx-runtime";var Hu=({open:t,onOpenChange:r,title:o="JSON Viewer",data:a,jsonViewerProps:s})=>fo(w,{open:t,onOpenChange:r,children:Vu(R,{className:"max-w-2xl max-h-[80vh] flex flex-col",children:[fo(k,{children:fo(L,{children:o})}),fo(la,{data:a,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:o,optionalLabel:a,help:s,error:i,className:l,children:c,...d},u){return da("div",{ref:u,className:e("grid content-start gap-2",l),...d,children:[da(y,{htmlFor:r,children:[o,a===void 0?null:da("span",{className:"font-normal text-muted-foreground",children:["(",a,")"]})]}),c,i===void 0?null:ei("p",{role:"alert",className:"text-sm text-destructive",children:i}),i===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:o,external:a=!1,linkComponent:s})=>{let i=e("inline-flex items-center gap-1 text-primary hover:underline",o);if(a||!s)return oi("a",{href:t,...a?{rel:"noopener noreferrer",target:"_blank"}:{},className:i,children:[r,ni(Ze,{className:"h-3 w-3"})]});return oi(s,{to:t,className:i,children:[r,ni(Ze,{className:"h-3 w-3"})]})};import{useState as _u}from"react";import{jsx as go,jsxs as $u}from"react/jsx-runtime";var zu=({value:t,isSensitive:r=!1,className:o,maskChar:a="•",showToggle:s=!0,showLabel:i="Show value",hideLabel:l="Hide value",truncate:c=!0,children:d})=>{let[u,b]=_u(!r),C=u?t:(()=>{if(t.startsWith("{")||t.startsWith("["))return`{ ${a.repeat(10)} }`;return a.repeat(Math.min(t.length,20))})(),E=c?C.slice(0,50)+(C.length>50?"...":""):C,P=u?l:i,O=r&&s?go(n,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>{b(!u)},title:P,"aria-label":P,children:u?go(Ye,{className:"h-3 w-3"}):go(xe,{className:"h-3 w-3"})}):null;if(d!==void 0)return d({displayValue:E,toggle:O});return $u("div",{className:e("flex items-center gap-2",o),children:[go("code",{className:"text-sm bg-muted px-2 py-1 rounded flex-1 break-all",children:E}),O]})};import*as ii from"react";import{jsx as ai,jsxs as si}from"react/jsx-runtime";var li=ii.forwardRef(function({icon:r,text:o,trailing:a,className:s,...i},l){return si("div",{ref:l,className:e("flex min-w-0 items-center gap-2",s),...i,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:o})]}),a]})});li.displayName="MutedPlaceholder";var ju=li;import{useMemo as Ju,useState as Gu}from"react";import{jsx as Nt,jsxs as bo}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 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)=>ua({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,i])=>[s,ua({ancestors:r,value:i})]));return r.delete(t),a}return},sr=(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 o=r.filter((a)=>sr(a)?.type!=="null");return o.length===1?sr(o[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(sr(t.properties))return"object";return"value"},ui=(t,r="schema")=>{let o=sr(t.properties);if(o){let s=new Set(Wu(t.required));return Object.entries(o).flatMap(([i,l])=>{let c=sr(l);return c?[{name:i,path:`${r}.properties.${i}`,required:s.has(i),schema:c}]:[]})}if(di(t)==="array"){let s=sr(t.items);return s?[{name:"Items",path:`${r}.items`,required:!0,schema:s}]:[]}let a=Dr(t.oneOf)??Dr(t.anyOf)??Dr(t.allOf);if(!a)return[];return a.flatMap((s,i)=>{let l=sr(s);return l?[{name:`Option ${i+1}`,path:`${r}.option.${i}`,required:!0,schema:l}]:[]})},ma=(t,r,o=new Set)=>{let a=Xu(t),s=pa(a.$ref);if(s===void 0||s===""||!s.startsWith("#/$defs/")||o.has(s))return a;let i=sr(sr(r.$defs)?.[s.slice(8)]);if(!i)return a;return ma(i,r,new Set([...o,s]))},pi=({child:t,depth:r,root:o,defaultExpandedDepth:a})=>{let s=ma(t.schema,o),i=ui(s,t.path),[l,c]=Gu(r<a),d=di(s),u=pa(s.description),b=i.length>0,x=l?`Collapse ${t.name}`:`Expand ${t.name}`;return bo(ae,{open:l,onOpenChange:c,children:[bo("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",b&&"gap-2"),style:{paddingLeft:`${10+r*16}px`},children:[b?Nt(ne,{"aria-label":x,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:Nt(v,{className:e("size-3.5 transition-transform",l&&"rotate-90")})}):null,bo("div",{className:"min-w-0 flex-1",children:[bo("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[Nt("span",{className:"break-all text-xs font-medium text-foreground",children:t.name}),Nt("span",{className:"rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:d}),t.required?Nt("span",{className:"text-[10px] font-medium text-destructive",children:"required"}):null]}),u!==void 0&&u!==""?Nt("p",{className:"mt-0.5 text-xs leading-snug text-muted-foreground",children:u}):null]})]}),b?Nt(ie,{children:Nt("div",{className:"border-l border-border/70",children:i.map((C)=>Nt(pi,{child:C,defaultExpandedDepth:a,depth:r+1,root:o},C.path))})}):null]})},Uu=({schema:t,className:r,defaultExpandedDepth:o=1,emptyLabel:a="No fields"})=>{let s=Ju(()=>ua({ancestors:new WeakSet,value:t}),[t]),i=sr(s);if(!i)return Nt("p",{className:e("text-xs text-muted-foreground",r),children:a});let l=ma(i,i),c=ui(l);if(!c.length)return Nt("p",{className:e("text-xs text-muted-foreground",r),children:a});return Nt("div",{"aria-label":"Object schema",className:e("overflow-hidden rounded-lg border border-border",r),children:c.map((d)=>Nt(pi,{child:d,defaultExpandedDepth:o,depth:0,root:i},d.path))})};import ir,{createContext as zn,useContext as Nn,useEffect as Ne,useState as jt,useCallback as Jt,useMemo as Se,useRef as Ae,memo as tp,useReducer as rp,cloneElement as Jh,forwardRef as Gh}from"react";import{createPortal as np,unstable_batchedUpdates as Ro}from"react-dom";import{useMemo as ga,useLayoutEffect as Ku,useEffect as fi,useRef as bn,useCallback as vo}from"react";function gi(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return ga(()=>(a)=>{r.forEach((s)=>s(a))},r)}var Hn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $r(t){let r=Object.prototype.toString.call(t);return r==="[object Window]"||r==="[object global]"}function ho(t){return"nodeType"in t}function Fe(t){var r,o;if(!t)return window;if($r(t))return t;if(!ho(t))return window;return(r=(o=t.ownerDocument)==null?void 0:o.defaultView)!=null?r:window}function xo(t){let{Document:r}=Fe(t);return t instanceof r}function vn(t){if($r(t))return!1;return t instanceof Fe(t).HTMLElement}function ba(t){return t instanceof Fe(t).SVGElement}function jr(t){if(!t)return document;if($r(t))return t.document;if(!ho(t))return document;if(xo(t))return t;if(vn(t)||ba(t))return t.ownerDocument;return document}var At=Hn?Ku:fi;function yo(t){let r=bn(t);return At(()=>{r.current=t}),vo(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 bi(){let t=bn(null),r=vo((a,s)=>{t.current=setInterval(a,s)},[]),o=vo(()=>{if(t.current!==null)clearInterval(t.current),t.current=null},[]);return[r,o]}function hn(t,r){if(r===void 0)r=[t];let o=bn(t);return At(()=>{if(o.current!==t)o.current=t},r),o}function xn(t,r){let o=bn();return ga(()=>{let a=t(o.current);return o.current=a,a},[...r])}function Vn(t){let r=yo(t),o=bn(null),a=vo((s)=>{if(s!==o.current)r==null||r(s,o.current);o.current=s},[]);return[o,a]}function wo(t){let r=bn();return fi(()=>{r.current=t},[t]),r.current}var fa={};function Jr(t,r){return ga(()=>{if(r)return r;let o=fa[t]==null?0:fa[t]+1;return fa[t]=o,t+"-"+o},[t,r])}function vi(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((i,l)=>{let c=Object.entries(l);for(let[d,u]of c){let b=i[d];if(b!=null)i[d]=b+t*u}return i},{...r})}}var Wr=vi(1),Xr=vi(-1);function Yu(t){return"clientX"in t&&"clientY"in t}function Bn(t){if(!t)return!1;let{KeyboardEvent:r}=Fe(t.target);return r&&t instanceof r}function qu(t){if(!t)return!1;let{TouchEvent:r}=Fe(t.target);return r&&t instanceof r}function No(t){if(qu(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(Yu(t))return{x:t.clientX,y:t.clientY};return null}var Er=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[Er.Translate.toString(t),Er.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:r,duration:o,easing:a}=t;return r+" "+o+"ms "+a}}}),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:o}=t;return xi.createElement("div",{id:r,style:ep},o)}function wi(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 xi.createElement("div",{id:r,style:s,role:"status","aria-live":a,"aria-atomic":!0},o)}function Ni(){let[t,r]=Zu("");return{announce:Qu((a)=>{if(a!=null)r(a)},[]),announcement:t}}var Oi=zn(null);function op(t){let r=Nn(Oi);Ne(()=>{if(!r)throw Error("useDndMonitor must be used within a children of <DndContext>");return r(t)},[t,r])}function ap(){let[t]=jt(()=>new Set),r=Jt((a)=>(t.add(a),()=>t.delete(a)),[t]);return[Jt((a)=>{let{type:s,event:i}=a;t.forEach((l)=>{var c;return(c=l[s])==null?void 0:c.call(l,i)})},[t]),r]}var sp={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
|
-
`},xp={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 yp(t){let{announcements:r=xp,container:o,hiddenTextDescribedById:a,screenReaderInstructions:s=hp}=t,{announce:i,announcement:l}=Ti(),c=jr("DndLiveRegion"),[d,u]=Xt(!1);if(xe(()=>{u(!0)},[]),bp(Ne(()=>({onDragStart(b){let{active:w}=b;i(r.onDragStart({active:w}))},onDragMove(b){let{active:w,over:P}=b;if(r.onDragMove)i(r.onDragMove({active:w,over:P}))},onDragOver(b){let{active:w,over:P}=b;i(r.onDragOver({active:w,over:P}))},onDragEnd(b){let{active:w,over:P}=b;i(r.onDragEnd({active:w,over:P}))},onDragCancel(b){let{active:w,over:P}=b;i(r.onDragCancel({active:w,over:P}))}}),[i,r])),!d)return null;let g=rr.createElement(rr.Fragment,null,rr.createElement(Si,{id:a,value:s.draggable}),rr.createElement(Pi,{id:c,announcement:l}));return o?gp(g,o):g}var we;(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"})(we||(we={}));function Ro(){}function Ra(t,r){return Ne(()=>({sensor:t,options:r!=null?r:{}}),[t,r])}function zi(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return Ne(()=>[...r].filter((a)=>a!=null),[...r])}var Yt=Object.freeze({x:0,y:0});function $i(t,r){return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}function Ji(t,r){let{data:{value:o}}=t,{data:{value:a}}=r;return o-a}function wp(t,r){let{data:{value:o}}=t,{data:{value:a}}=r;return a-o}function ki(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 Li(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 ji=(t)=>{let{collisionRect:r,droppableRects:o,droppableContainers:a}=t,s=Li(r,r.left,r.top),i=[];for(let l of a){let{id:c}=l,d=o.get(c);if(d){let u=$i(Li(d),s);i.push({id:c,data:{droppableContainer:l,value:u}})}}return i.sort(Ji)},Gi=(t)=>{let{collisionRect:r,droppableRects:o,droppableContainers:a}=t,s=ki(r),i=[];for(let l of a){let{id:c}=l,d=o.get(c);if(d){let u=ki(d),g=s.reduce((w,P,C)=>w+$i(u[C],P),0),b=Number((g/4).toFixed(4));i.push({id:c,data:{droppableContainer:l,value:b}})}}return i.sort(Ji)};function Np(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),i=Math.min(r.top+r.height,t.top+t.height),l=s-a,c=i-o;if(a<s&&o<i){let d=r.width*r.height,u=t.width*t.height,g=l*c,b=g/(d+u-g);return Number(b.toFixed(4))}return 0}var Rp=(t)=>{let{collisionRect:r,droppableRects:o,droppableContainers:a}=t,s=[];for(let i of a){let{id:l}=i,c=o.get(l);if(c){let d=Np(c,r);if(d>0)s.push({id:l,data:{droppableContainer:i,value:d}})}}return s.sort(wp)};function Cp(t,r,o){return{...t,scaleX:r&&o?r.width/o.width:1,scaleY:r&&o?r.height/o.height:1}}function Wi(t,r){return t&&r?{x:t.left-r.left,y:t.top-r.top}:Yt}function Sp(t){return function(o){for(var a=arguments.length,s=Array(a>1?a-1:0),i=1;i<a;i++)s[i-1]=arguments[i];return s.reduce((l,c)=>({...l,top:l.top+t*c.y,bottom:l.bottom+t*c.y,left:l.left+t*c.x,right:l.right+t*c.x}),{...o})}}var Pp=Sp(1);function Tp(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 kp(t,r,o){let a=Tp(r);if(!a)return t;let{scaleX:s,scaleY:i,x:l,y:c}=a,d=t.left-l-(1-s)*parseFloat(o),u=t.top-c-(1-i)*parseFloat(o.slice(o.indexOf(" ")+1)),g=s?t.width/s:t.width,b=i?t.height/i:t.height;return{width:g,height:b,top:u,right:d+g,bottom:u+b,left:d}}var Lp={ignoreTransform:!1};function Xr(t,r){if(r===void 0)r=Lp;let o=t.getBoundingClientRect();if(r.ignoreTransform){let{transform:u,transformOrigin:g}=ze(t).getComputedStyle(t);if(u)o=kp(o,u,g)}let{top:a,left:s,width:i,height:l,bottom:c,right:d}=o;return{top:a,left:s,width:i,height:l,bottom:c,right:d}}function Di(t){return Xr(t,{ignoreTransform:!0})}function Dp(t){let{innerWidth:r,innerHeight:o}=t;return{top:0,left:0,right:r,bottom:o,width:r,height:o}}function Ep(t,r){if(r===void 0)r=ze(t).getComputedStyle(t);return r.position==="fixed"}function Mp(t,r){if(r===void 0)r=ze(t).getComputedStyle(t);let o=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((s)=>{let i=r[s];return typeof i==="string"?o.test(i):!1})}function _n(t,r){let o=[];function a(s){if(r!=null&&o.length>=r)return o;if(!s)return o;if(vo(s)&&s.scrollingElement!=null&&!o.includes(s.scrollingElement))return o.push(s.scrollingElement),o;if(!gn(s)||ba(s))return o;if(o.includes(s))return o;let i=ze(t).getComputedStyle(s);if(s!==t){if(Mp(s,i))o.push(s)}if(Ep(s,i))return o;return a(s.parentNode)}if(!t)return o;return a(t)}function Xi(t){let[r]=_n(t,1);return r!=null?r:null}function va(t){if(!An||!t)return null;if($r(t))return t;if(!bo(t))return null;if(vo(t)||t===Jr(t).scrollingElement)return window;if(gn(t))return t;return null}function Ui(t){if($r(t))return t.scrollX;return t.scrollLeft}function Ki(t){if($r(t))return t.scrollY;return t.scrollTop}function ya(t){return{x:Ui(t),y:Ki(t)}}var Te;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(Te||(Te={}));function Yi(t){if(!An||!t)return!1;return t===document.scrollingElement}function qi(t){let r={x:0,y:0},o=Yi(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,i=t.scrollLeft<=r.x,l=t.scrollTop>=a.y,c=t.scrollLeft>=a.x;return{isTop:s,isLeft:i,isBottom:l,isRight:c,maxScroll:a,minScroll:r}}var Ip={x:0.2,y:0.2};function Ap(t,r,o,a,s){let{top:i,left:l,right:c,bottom:d}=o;if(a===void 0)a=10;if(s===void 0)s=Ip;let{isTop:u,isBottom:g,isLeft:b,isRight:w}=qi(t),P={x:0,y:0},C={x:0,y:0},A={height:r.height*s.y,width:r.width*s.x};if(!u&&i<=r.top+A.height)P.y=Te.Backward,C.y=a*Math.abs((r.top+A.height-i)/A.height);else if(!g&&d>=r.bottom-A.height)P.y=Te.Forward,C.y=a*Math.abs((r.bottom-A.height-d)/A.height);if(!w&&c>=r.right-A.width)P.x=Te.Forward,C.x=a*Math.abs((r.right-A.width-c)/A.width);else if(!b&&l<=r.left+A.width)P.x=Te.Backward,C.x=a*Math.abs((r.left+A.width-l)/A.width);return{direction:P,speed:C}}function Op(t){if(t===document.scrollingElement){let{innerWidth:i,innerHeight:l}=window;return{top:0,left:0,right:i,bottom:l,width:i,height:l}}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 Zi(t){return t.reduce((r,o)=>Gr(r,ya(o)),Yt)}function Hp(t){return t.reduce((r,o)=>r+Ui(o),0)}function Vp(t){return t.reduce((r,o)=>r+Ki(o),0)}function Bp(t,r){if(r===void 0)r=Xr;if(!t)return;let{top:o,left:a,bottom:s,right:i}=r(t);if(!Xi(t))return;if(s<=0||i<=0||o>=window.innerHeight||a>=window.innerWidth)t.scrollIntoView({block:"center",inline:"center"})}var Fp=[["x",["left","right"],Hp],["y",["top","bottom"],Vp]];class So{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=_n(r),a=Zi(o);this.rect={...t},this.width=t.width,this.height=t.height;for(let[s,i,l]of Fp)for(let c of i)Object.defineProperty(this,c,{get:()=>{let d=l(o),u=a[s]-d;return this.rect[c]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class hn{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 _p(t){let{EventTarget:r}=ze(t);return t instanceof r?t:Jr(t)}function ha(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 Jt;(function(t){t.Click="click",t.DragStart="dragstart",t.Keydown="keydown",t.ContextMenu="contextmenu",t.Resize="resize",t.SelectionChange="selectionchange",t.VisibilityChange="visibilitychange"})(Jt||(Jt={}));function Ei(t){t.preventDefault()}function zp(t){t.stopPropagation()}var re;(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"})(re||(re={}));var Qi={start:[re.Space,re.Enter],cancel:[re.Esc],end:[re.Space,re.Enter,re.Tab]},$p=(t,r)=>{let{currentCoordinates:o}=r;switch(t.code){case re.Right:return{...o,x:o.x+25};case re.Left:return{...o,x:o.x-25};case re.Down:return{...o,y:o.y+25};case re.Up:return{...o,y:o.y-25}}return};class zn{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 hn(Jr(r)),this.windowListeners=new hn(ze(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Jt.Resize,this.handleCancel),this.windowListeners.add(Jt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Jt.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:t,onStart:r}=this.props,o=t.node.current;if(o)Bp(o);r(Yt)}handleKeyDown(t){if(Hn(t)){let{active:r,context:o,options:a}=this.props,{keyboardCodes:s=Qi,coordinateGetter:i=$p,scrollBehavior:l="smooth"}=a,{code:c}=t;if(s.end.includes(c)){this.handleEnd(t);return}if(s.cancel.includes(c)){this.handleCancel(t);return}let{collisionRect:d}=o.current,u=d?{x:d.left,y:d.top}:Yt;if(!this.referenceCoordinates)this.referenceCoordinates=u;let g=i(t,{active:r,context:o.current,currentCoordinates:u});if(g){let b=Wr(g,u),w={x:0,y:0},{scrollableAncestors:P}=o.current;for(let C of P){let A=t.code,{isTop:j,isRight:B,isLeft:O,isBottom:H,maxScroll:F,minScroll:X}=qi(C),V=Op(C),_={x:Math.min(A===re.Right?V.right-V.width/2:V.right,Math.max(A===re.Right?V.left:V.left+V.width/2,g.x)),y:Math.min(A===re.Down?V.bottom-V.height/2:V.bottom,Math.max(A===re.Down?V.top:V.top+V.height/2,g.y))},W=A===re.Right&&!B||A===re.Left&&!O,oe=A===re.Down&&!H||A===re.Up&&!j;if(W&&_.x!==g.x){let K=C.scrollLeft+b.x,de=A===re.Right&&K<=F.x||A===re.Left&&K>=X.x;if(de&&!b.y){C.scrollTo({left:K,behavior:l});return}if(de)w.x=C.scrollLeft-K;else w.x=A===re.Right?C.scrollLeft-F.x:C.scrollLeft-X.x;if(w.x)C.scrollBy({left:-w.x,behavior:l});break}else if(oe&&_.y!==g.y){let K=C.scrollTop+b.y,de=A===re.Down&&K<=F.y||A===re.Up&&K>=X.y;if(de&&!b.x){C.scrollTo({top:K,behavior:l});return}if(de)w.y=C.scrollTop-K;else w.y=A===re.Down?C.scrollTop-F.y:C.scrollTop-X.y;if(w.y)C.scrollBy({top:-w.y,behavior:l});break}}this.handleMove(t,Gr(Wr(g,this.referenceCoordinates),w))}}}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()}}zn.activators=[{eventName:"onKeyDown",handler:(t,r,o)=>{let{keyboardCodes:a=Qi,onActivation:s}=r,{active:i}=o,{code:l}=t.nativeEvent;if(a.start.includes(l)){let c=i.activatorNode.current;if(c&&t.target!==c)return!1;return t.preventDefault(),s==null||s({event:t.nativeEvent}),!0}return!1}}];function Mi(t){return Boolean(t&&"distance"in t)}function Ii(t){return Boolean(t&&"delay"in t)}class Po{constructor(t,r,o){var a;if(o===void 0)o=_p(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:i}=s;this.props=t,this.events=r,this.document=Jr(i),this.documentListeners=new hn(this.document),this.listeners=new hn(o),this.windowListeners=new hn(ze(i)),this.initialCoordinates=(a=yo(s))!=null?a:Yt,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(Jt.Resize,this.handleCancel),this.windowListeners.add(Jt.DragStart,Ei),this.windowListeners.add(Jt.VisibilityChange,this.handleCancel),this.windowListeners.add(Jt.ContextMenu,Ei),this.documentListeners.add(Jt.Keydown,this.handleKeydown),r){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ii(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(Mi(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(Jt.Click,zp,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Jt.SelectionChange,this.removeTextSelection),r(t)}handleMove(t){var r;let{activated:o,initialCoordinates:a,props:s}=this,{onMove:i,options:{activationConstraint:l}}=s;if(!a)return;let c=(r=yo(t))!=null?r:Yt,d=Wr(a,c);if(!o&&l){if(Mi(l)){if(l.tolerance!=null&&ha(d,l.tolerance))return this.handleCancel();if(ha(d,l.distance))return this.handleStart()}if(Ii(l)){if(ha(d,l.tolerance))return this.handleCancel()}this.handlePending(l,d);return}if(t.cancelable)t.preventDefault();i(c)}handleEnd(){let{onAbort:t,onEnd:r}=this.props;if(this.detach(),!this.activated)t(this.props.active);r()}handleCancel(){let{onAbort:t,onCancel:r}=this.props;if(this.detach(),!this.activated)t(this.props.active);r()}handleKeydown(t){if(t.code===re.Esc)this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}var Jp={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class $n extends Po{constructor(t){let{event:r}=t,o=Jr(r.target);super(t,Jp,o)}}$n.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 jp={move:{name:"mousemove"},end:{name:"mouseup"}},wa;(function(t){t[t.RightClick=2]="RightClick"})(wa||(wa={}));class el extends Po{constructor(t){super(t,jp,Jr(t.event.target))}}el.activators=[{eventName:"onMouseDown",handler:(t,r)=>{let{nativeEvent:o}=t,{onActivation:a}=r;if(o.button===wa.RightClick)return!1;return a==null||a({event:o}),!0}}];var xa={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class tl extends Po{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(){}}}tl.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 Vn;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(Vn||(Vn={}));var Co;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Co||(Co={}));function Gp(t){let{acceleration:r,activator:o=Vn.Pointer,canScroll:a,draggingRect:s,enabled:i,interval:l=5,order:c=Co.TreeOrder,pointerCoordinates:d,scrollableAncestors:u,scrollableAncestorRects:g,delta:b,threshold:w}=t,P=Xp({delta:b,disabled:!i}),[C,A]=wi(),j=Ee({x:0,y:0}),B=Ee({x:0,y:0}),O=Ne(()=>{switch(o){case Vn.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Vn.DraggableRect:return s}},[o,s,d]),H=Ee(null),F=Kt(()=>{let V=H.current;if(!V)return;let _=j.current.x*B.current.x,W=j.current.y*B.current.y;V.scrollBy(_,W)},[]),X=Ne(()=>c===Co.TreeOrder?[...u].reverse():u,[c,u]);xe(()=>{if(!i||!u.length||!O){A();return}for(let V of X){if((a==null?void 0:a(V))===!1)continue;let _=u.indexOf(V),W=g[_];if(!W)continue;let{direction:oe,speed:K}=Ap(V,W,O,r,w);for(let de of["x","y"])if(!P[de][oe[de]])K[de]=0,oe[de]=0;if(K.x>0||K.y>0){A(),H.current=V,C(F,l),j.current=K,B.current=oe;return}}j.current={x:0,y:0},B.current={x:0,y:0},A()},[r,F,a,A,i,l,JSON.stringify(O),JSON.stringify(P),C,u,X,g,JSON.stringify(w)])}var Wp={x:{[Te.Backward]:!1,[Te.Forward]:!1},y:{[Te.Backward]:!1,[Te.Forward]:!1}};function Xp(t){let{delta:r,disabled:o}=t,a=xo(r);return vn((s)=>{if(o||!a||!s)return Wp;let i={x:Math.sign(r.x-a.x),y:Math.sign(r.y-a.y)};return{x:{[Te.Backward]:s.x[Te.Backward]||i.x===-1,[Te.Forward]:s.x[Te.Forward]||i.x===1},y:{[Te.Backward]:s.y[Te.Backward]||i.y===-1,[Te.Forward]:s.y[Te.Forward]||i.y===1}}},[o,r,a])}function Up(t,r){let o=r!=null?t.get(r):void 0,a=o?o.node.current:null;return vn((s)=>{var i;if(r==null)return null;return(i=a!=null?a:s)!=null?i:null},[a,r])}function Kp(t,r){return Ne(()=>t.reduce((o,a)=>{let{sensor:s}=a,i=s.activators.map((l)=>({eventName:l.eventName,handler:r(l.handler,a)}));return[...o,...i]},[]),[t,r])}var Bn;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(Bn||(Bn={}));var Na;(function(t){t.Optimized="optimized"})(Na||(Na={}));var Ai=new Map;function Yp(t,r){let{dragging:o,dependencies:a,config:s}=r,[i,l]=Xt(null),{frequency:c,measure:d,strategy:u}=s,g=Ee(t),b=j(),w=bn(b),P=Kt(function(B){if(B===void 0)B=[];if(w.current)return;l((O)=>{if(O===null)return B;return O.concat(B.filter((H)=>!O.includes(H)))})},[w]),C=Ee(null),A=vn((B)=>{if(b&&!o)return Ai;if(!B||B===Ai||g.current!==t||i!=null){let O=new Map;for(let H of t){if(!H)continue;if(i&&i.length>0&&!i.includes(H.id)&&H.rect.current){O.set(H.id,H.rect.current);continue}let F=H.node.current,X=F?new So(d(F),F):null;if(H.rect.current=X,X)O.set(H.id,X)}return O}return B},[t,i,o,b,d]);return xe(()=>{g.current=t},[t]),xe(()=>{if(b)return;P()},[o,b]),xe(()=>{if(i&&i.length>0)l(null)},[JSON.stringify(i)]),xe(()=>{if(b||typeof c!=="number"||C.current!==null)return;C.current=setTimeout(()=>{P(),C.current=null},c)},[c,b,P,...a]),{droppableRects:A,measureDroppableContainers:P,measuringScheduled:i!=null};function j(){switch(u){case Bn.Always:return!1;case Bn.BeforeDragging:return o;default:return!o}}}function rl(t,r){return vn((o)=>{if(!t)return null;if(o)return o;return typeof r==="function"?r(t):t},[r,t])}function qp(t,r){return rl(t,r)}function Zp(t){let{callback:r,disabled:o}=t,a=ho(r),s=Ne(()=>{if(o||typeof window>"u"||typeof window.MutationObserver>"u")return;let{MutationObserver:i}=window;return new i(a)},[a,o]);return xe(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function To(t){let{callback:r,disabled:o}=t,a=ho(r),s=Ne(()=>{if(o||typeof window>"u"||typeof window.ResizeObserver>"u")return;let{ResizeObserver:i}=window;return new i(a)},[o]);return xe(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function Qp(t){return new So(Xr(t),t)}function Oi(t,r,o){if(r===void 0)r=Qp;let[a,s]=Xt(null);function i(){s((d)=>{if(!t)return null;if(t.isConnected===!1){var u;return(u=d!=null?d:o)!=null?u:null}let g=r(t);if(JSON.stringify(d)===JSON.stringify(g))return d;return g})}let l=Zp({callback(d){if(!t)return;for(let u of d){let{type:g,target:b}=u;if(g==="childList"&&b instanceof HTMLElement&&b.contains(t)){i();break}}}}),c=To({callback:i});return $t(()=>{if(i(),t)c==null||c.observe(t),l==null||l.observe(document.body,{childList:!0,subtree:!0});else c==null||c.disconnect(),l==null||l.disconnect()},[t]),a}function em(t){let r=rl(t);return Wi(t,r)}var Hi=[];function tm(t){let r=Ee(t),o=vn((a)=>{if(!t)return Hi;if(a&&a!==Hi&&t&&r.current&&t.parentNode===r.current.parentNode)return a;return _n(t)},[t]);return xe(()=>{r.current=t},[t]),o}function rm(t){let[r,o]=Xt(null),a=Ee(t),s=Kt((i)=>{let l=va(i.target);if(!l)return;o((c)=>{if(!c)return null;return c.set(l,ya(l)),new Map(c)})},[]);return xe(()=>{let i=a.current;if(t!==i){l(i);let c=t.map((d)=>{let u=va(d);if(u)return u.addEventListener("scroll",s,{passive:!0}),[u,ya(u)];return null}).filter((d)=>d!=null);o(c.length?new Map(c):null),a.current=t}return()=>{l(t),l(i)};function l(c){c.forEach((d)=>{let u=va(d);u==null||u.removeEventListener("scroll",s)})}},[s,t]),Ne(()=>{if(t.length)return r?Array.from(r.values()).reduce((i,l)=>Gr(i,l),Yt):Zi(t);return Yt},[t,r])}function Vi(t,r){if(r===void 0)r=[];let o=Ee(null);return xe(()=>{o.current=null},r),xe(()=>{let a=t!==Yt;if(a&&!o.current)o.current=t;if(!a&&o.current)o.current=null},[t]),o.current?Wr(t,o.current):Yt}function nm(t){xe(()=>{if(!An)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 om(t,r){return Ne(()=>t.reduce((o,a)=>{let{eventName:s,handler:i}=a;return o[s]=(l)=>{i(l,r)},o},{}),[t,r])}function nl(t){return Ne(()=>t?Dp(t):null,[t])}var Bi=[];function am(t,r){if(r===void 0)r=Xr;let[o]=t,a=nl(o?ze(o):null),[s,i]=Xt(Bi);function l(){i(()=>{if(!t.length)return Bi;return t.map((d)=>Yi(d)?a:new So(r(d),d))})}let c=To({callback:l});return $t(()=>{c==null||c.disconnect(),l(),t.forEach((d)=>c==null?void 0:c.observe(d))},[t]),s}function sm(t){if(!t)return null;if(t.children.length>1)return t;let r=t.children[0];return gn(r)?r:t}function im(t){let{measure:r}=t,[o,a]=Xt(null),s=Kt((u)=>{for(let{target:g}of u)if(gn(g)){a((b)=>{let w=r(g);return b?{...b,width:w.width,height:w.height}:w});break}},[r]),i=To({callback:s}),l=Kt((u)=>{let g=sm(u);if(i==null||i.disconnect(),g)i==null||i.observe(g);a(g?r(g):null)},[r,i]),[c,d]=On(l);return Ne(()=>({nodeRef:c,rect:o,setRef:d}),[o,c,d])}var lm=[{sensor:$n,options:{}},{sensor:zn,options:{}}],cm={current:{}},No={draggable:{measure:Di},droppable:{measure:Di,strategy:Bn.WhileDragging,frequency:Na.Optimized},dragOverlay:{measure:Xr}};class xn 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 dm={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new xn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ro},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:No,measureDroppableContainers:Ro,windowRect:null,measuringScheduled:!1},um={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ro,draggableNodes:new Map,over:null,measureDroppableContainers:Ro},ko=Fn(um),ol=Fn(dm);function pm(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new xn}}}function mm(t,r){switch(r.type){case we.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:r.initialCoordinates,active:r.active}};case we.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 we.DragEnd:case we.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case we.RegisterDroppable:{let{element:o}=r,{id:a}=o,s=new xn(t.droppable.containers);return s.set(a,o),{...t,droppable:{...t.droppable,containers:s}}}case we.SetDroppableDisabled:{let{id:o,key:a,disabled:s}=r,i=t.droppable.containers.get(o);if(!i||a!==i.key)return t;let l=new xn(t.droppable.containers);return l.set(o,{...i,disabled:s}),{...t,droppable:{...t.droppable,containers:l}}}case we.UnregisterDroppable:{let{id:o,key:a}=r,s=t.droppable.containers.get(o);if(!s||a!==s.key)return t;let i=new xn(t.droppable.containers);return i.delete(o),{...t,droppable:{...t.droppable,containers:i}}}default:return t}}function fm(t){let{disabled:r}=t,{active:o,activatorEvent:a,draggableNodes:s}=yn(ko),i=xo(a),l=xo(o==null?void 0:o.id);return xe(()=>{if(r)return;if(!a&&i&&l!=null){if(!Hn(i))return;if(document.activeElement===i.target)return;let c=s.get(l);if(!c)return;let{activatorNode:d,node:u}=c;if(!d.current&&!u.current)return;requestAnimationFrame(()=>{for(let g of[d.current,u.current]){if(!g)continue;let b=Ri(g);if(b){b.focus();break}}})}},[a,r,s,l,i]),null}function gm(t,r){let{transform:o,...a}=r;return t!=null&&t.length?t.reduce((s,i)=>i({transform:s,...a}),o):o}function bm(t){return Ne(()=>({draggable:{...No.draggable,...t==null?void 0:t.draggable},droppable:{...No.droppable,...t==null?void 0:t.droppable},dragOverlay:{...No.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 vm(t){let{activeNode:r,measure:o,initialRect:a,config:s=!0}=t,i=Ee(!1),{x:l,y:c}=typeof s==="boolean"?{x:s,y:s}:s;$t(()=>{if(!l&&!c||!r){i.current=!1;return}if(i.current||!a)return;let u=r==null?void 0:r.node.current;if(!u||u.isConnected===!1)return;let g=o(u),b=Wi(g,a);if(!l)b.x=0;if(!c)b.y=0;if(i.current=!0,Math.abs(b.x)>0||Math.abs(b.y)>0){let w=Xi(u);if(w)w.scrollBy({top:b.y,left:b.x})}},[r,l,c,a,o])}var al=Fn({...Yt,scaleX:1,scaleY:1}),Br;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Br||(Br={}));var sl=mp(function(r){var o,a,s,i;let{id:l,accessibility:c,autoScroll:d=!0,children:u,sensors:g=lm,collisionDetection:b=Rp,measuring:w,modifiers:P,...C}=r,A=fp(mm,void 0,pm),[j,B]=A,[O,H]=vp(),[F,X]=Xt(Br.Uninitialized),V=F===Br.Initialized,{draggable:{active:_,nodes:W,translate:oe},droppable:{containers:K}}=j,de=_!=null?W.get(_):null,ye=Ee({initial:null,translated:null}),ve=Ne(()=>{var Ie;return _!=null?{id:_,data:(Ie=de==null?void 0:de.data)!=null?Ie:cm,rect:ye}:null},[_,de]),Re=Ee(null),[Me,Ae]=Xt(null),[be,qe]=Xt(null),he=bn(C,Object.values(C)),_e=jr("DndDescribedBy",l),q=Ne(()=>K.getEnabled(),[K]),ce=bm(w),{droppableRects:ae,measureDroppableContainers:Ce,measuringScheduled:st}=Yp(q,{dragging:V,dependencies:[oe.x,oe.y],config:ce.droppable}),Se=Up(W,_),Rr=Ne(()=>be?yo(be):null,[be]),Y=dc(),it=qp(Se,ce.draggable.measure);vm({activeNode:_!=null?W.get(_):null,config:Y.layoutShiftCompensation,initialRect:it,measure:ce.draggable.measure});let fe=Oi(Se,ce.draggable.measure,it),Cn=Oi(Se?Se.parentElement:null),Zt=Ee({activatorEvent:null,active:null,activeNode:Se,collisionRect:null,collisions:null,droppableRects:ae,draggableNodes:W,draggingNode:null,draggingNodeRect:null,droppableContainers:K,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Zr=K.getNodeFor((o=Zt.current.over)==null?void 0:o.id),lr=im({measure:ce.dragOverlay.measure}),Qr=(a=lr.nodeRef.current)!=null?a:Se,en=V?(s=lr.rect)!=null?s:fe:null,Va=Boolean(lr.nodeRef.current&&lr.rect),Ba=em(Va?null:fe),jo=nl(Qr?ze(Qr):null),Pr=tm(V?Zr!=null?Zr:Se:null),Xn=am(Pr),Un=gm(P,{transform:{x:oe.x-Ba.x,y:oe.y-Ba.y,scaleX:1,scaleY:1},activatorEvent:be,active:ve,activeNodeRect:fe,containerNodeRect:Cn,draggingNodeRect:en,over:Zt.current.over,overlayNodeRect:lr.rect,scrollableAncestors:Pr,scrollableAncestorRects:Xn,windowRect:jo}),Fa=Rr?Gr(Rr,oe):null,_a=rm(Pr),nc=Vi(_a),oc=Vi(_a,[fe]),tn=Gr(Un,nc),rn=en?Pp(en,Un):null,Sn=ve&&rn?b({active:ve,collisionRect:rn,droppableRects:ae,droppableContainers:q,pointerCoordinates:Fa}):null,za=Ca(Sn,"id"),[Tr,$a]=Xt(null),ac=Va?Un:Gr(Un,oc),sc=Cp(ac,(i=Tr==null?void 0:Tr.rect)!=null?i:null,fe),Go=Ee(null),Ja=Kt((Ie,bt)=>{let{sensor:vt,options:kr}=bt;if(Re.current==null)return;let Lt=W.get(Re.current);if(!Lt)return;let xt=Ie.nativeEvent,Qt=new vt({active:Re.current,activeNode:Lt,event:xt,options:kr,context:Zt,onAbort(Le){if(!W.get(Le))return;let{onDragAbort:er}=he.current,cr={id:Le};er==null||er(cr),O({type:"onDragAbort",event:cr})},onPending(Le,Lr,er,cr){if(!W.get(Le))return;let{onDragPending:Tn}=he.current,Dr={id:Le,constraint:Lr,initialCoordinates:er,offset:cr};Tn==null||Tn(Dr),O({type:"onDragPending",event:Dr})},onStart(Le){let Lr=Re.current;if(Lr==null)return;let er=W.get(Lr);if(!er)return;let{onDragStart:cr}=he.current,Pn={activatorEvent:xt,active:{id:Lr,data:er.data,rect:ye}};wo(()=>{cr==null||cr(Pn),X(Br.Initializing),B({type:we.DragStart,initialCoordinates:Le,active:Lr}),O({type:"onDragStart",event:Pn}),Ae(Go.current),qe(xt)})},onMove(Le){B({type:we.DragMove,coordinates:Le})},onEnd:nn(we.DragEnd),onCancel:nn(we.DragCancel)});Go.current=Qt;function nn(Le){return async function(){let{active:er,collisions:cr,over:Pn,scrollAdjustedTranslate:Tn}=Zt.current,Dr=null;if(er&&Tn){let{cancelDrop:kn}=he.current;if(Dr={activatorEvent:xt,active:er,collisions:cr,delta:Tn,over:Pn},Le===we.DragEnd&&typeof kn==="function"){if(await Promise.resolve(kn(Dr)))Le=we.DragCancel}}Re.current=null,wo(()=>{B({type:Le}),X(Br.Uninitialized),$a(null),Ae(null),qe(null),Go.current=null;let kn=Le===we.DragEnd?"onDragEnd":"onDragCancel";if(Dr){let Wo=he.current[kn];Wo==null||Wo(Dr),O({type:kn,event:Dr})}})}}},[W]),ic=Kt((Ie,bt)=>(vt,kr)=>{let Lt=vt.nativeEvent,xt=W.get(kr);if(Re.current!==null||!xt||Lt.dndKit||Lt.defaultPrevented)return;let Qt={active:xt};if(Ie(vt,bt.options,Qt)===!0)Lt.dndKit={capturedBy:bt.sensor},Re.current=kr,Ja(vt,bt)},[W,Ja]),ja=Kp(g,ic);nm(g),$t(()=>{if(fe&&F===Br.Initializing)X(Br.Initialized)},[fe,F]),xe(()=>{let{onDragMove:Ie}=he.current,{active:bt,activatorEvent:vt,collisions:kr,over:Lt}=Zt.current;if(!bt||!vt)return;let xt={active:bt,activatorEvent:vt,collisions:kr,delta:{x:tn.x,y:tn.y},over:Lt};wo(()=>{Ie==null||Ie(xt),O({type:"onDragMove",event:xt})})},[tn.x,tn.y]),xe(()=>{let{active:Ie,activatorEvent:bt,collisions:vt,droppableContainers:kr,scrollAdjustedTranslate:Lt}=Zt.current;if(!Ie||Re.current==null||!bt||!Lt)return;let{onDragOver:xt}=he.current,Qt=kr.get(za),nn=Qt&&Qt.rect.current?{id:Qt.id,rect:Qt.rect.current,data:Qt.data,disabled:Qt.disabled}:null,Le={active:Ie,activatorEvent:bt,collisions:vt,delta:{x:Lt.x,y:Lt.y},over:nn};wo(()=>{$a(nn),xt==null||xt(Le),O({type:"onDragOver",event:Le})})},[za]),$t(()=>{Zt.current={activatorEvent:be,active:ve,activeNode:Se,collisionRect:rn,collisions:Sn,droppableRects:ae,draggableNodes:W,draggingNode:Qr,draggingNodeRect:en,droppableContainers:K,over:Tr,scrollableAncestors:Pr,scrollAdjustedTranslate:tn},ye.current={initial:en,translated:rn}},[ve,Se,Sn,rn,W,Qr,en,ae,K,Tr,Pr,tn]),Gp({...Y,delta:oe,draggingRect:rn,pointerCoordinates:Fa,scrollableAncestors:Pr,scrollableAncestorRects:Xn});let lc=Ne(()=>({active:ve,activeNode:Se,activeNodeRect:fe,activatorEvent:be,collisions:Sn,containerNodeRect:Cn,dragOverlay:lr,draggableNodes:W,droppableContainers:K,droppableRects:ae,over:Tr,measureDroppableContainers:Ce,scrollableAncestors:Pr,scrollableAncestorRects:Xn,measuringConfiguration:ce,measuringScheduled:st,windowRect:jo}),[ve,Se,fe,be,Sn,Cn,lr,W,K,ae,Tr,Ce,Pr,Xn,ce,st,jo]),cc=Ne(()=>({activatorEvent:be,activators:ja,active:ve,activeNodeRect:fe,ariaDescribedById:{draggable:_e},dispatch:B,draggableNodes:W,over:Tr,measureDroppableContainers:Ce}),[be,ja,ve,fe,B,_e,W,Tr,Ce]);return rr.createElement(_i.Provider,{value:H},rr.createElement(ko.Provider,{value:cc},rr.createElement(ol.Provider,{value:lc},rr.createElement(al.Provider,{value:sc},u)),rr.createElement(fm,{disabled:(c==null?void 0:c.restoreFocus)===!1})),rr.createElement(yp,{...c,hiddenTextDescribedById:_e}));function dc(){let Ie=(Me==null?void 0:Me.autoScrollEnabled)===!1,bt=typeof d==="object"?d.enabled===!1:d===!1,vt=V&&!Ie&&!bt;if(typeof d==="object")return{...d,enabled:vt};return{enabled:vt}}}),hm=Fn(null),Fi="button",xm="Draggable";function il(t){let{id:r,data:o,disabled:a=!1,attributes:s}=t,i=jr(xm),{activators:l,activatorEvent:c,active:d,activeNodeRect:u,ariaDescribedById:g,draggableNodes:b,over:w}=yn(ko),{role:P=Fi,roleDescription:C="draggable",tabIndex:A=0}=s!=null?s:{},j=(d==null?void 0:d.id)===r,B=yn(j?al:hm),[O,H]=On(),[F,X]=On(),V=om(l,r),_=bn(o);$t(()=>(b.set(r,{id:r,key:i,node:O,activatorNode:F,data:_}),()=>{let oe=b.get(r);if(oe&&oe.key===i)b.delete(r)}),[b,r]);let W=Ne(()=>({role:P,tabIndex:A,"aria-disabled":a,"aria-pressed":j&&P===Fi?!0:void 0,"aria-roledescription":C,"aria-describedby":g.draggable}),[a,P,A,j,C,g.draggable]);return{active:d,activatorEvent:c,activeNodeRect:u,attributes:W,isDragging:j,listeners:a?void 0:V,node:O,over:w,setNodeRef:H,setActivatorNodeRef:X,transform:B}}function ll(){return yn(ol)}var ym="Droppable",wm={timeout:25};function cl(t){let{data:r,disabled:o=!1,id:a,resizeObserverConfig:s}=t,i=jr(ym),{active:l,dispatch:c,over:d,measureDroppableContainers:u}=yn(ko),g=Ee({disabled:o}),b=Ee(!1),w=Ee(null),P=Ee(null),{disabled:C,updateMeasurementsFor:A,timeout:j}={...wm,...s},B=bn(A!=null?A:a),O=Kt(()=>{if(!b.current){b.current=!0;return}if(P.current!=null)clearTimeout(P.current);P.current=setTimeout(()=>{u(Array.isArray(B.current)?B.current:[B.current]),P.current=null},j)},[j]),H=To({callback:O,disabled:C||!l}),F=Kt((W,oe)=>{if(!H)return;if(oe)H.unobserve(oe),b.current=!1;if(W)H.observe(W)},[H]),[X,V]=On(F),_=bn(r);return xe(()=>{if(!H||!X.current)return;H.disconnect(),b.current=!1,H.observe(X.current)},[X,H]),xe(()=>(c({type:we.RegisterDroppable,element:{id:a,key:i,disabled:o,node:X,rect:w,data:_}}),()=>c({type:we.UnregisterDroppable,key:i,id:a})),[a]),xe(()=>{if(o!==g.current.disabled)c({type:we.SetDroppableDisabled,id:a,key:i,disabled:o}),g.current.disabled=o},[a,i,o,c]),{active:l,rect:w,isOver:(d==null?void 0:d.id)===a,node:X,over:d,setNodeRef:V}}import dl,{useMemo as Eo,useRef as Sa,useEffect as Mo,useState as Nm,useContext as Rm}from"react";function Ao(t,r,o){let a=t.slice();return a.splice(o<0?a.length+o:o,0,a.splice(r,1)[0]),a}function Cm(t,r){return t.reduce((o,a,s)=>{let i=r.get(a);if(i)o[s]=i;return o},Array(t.length))}function Lo(t){return t!==null&&t>=0}function Sm(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 Pm(t){if(typeof t==="boolean")return{draggable:t,droppable:t};return t}var ul=(t)=>{let{rects:r,activeIndex:o,overIndex:a,index:s}=t,i=Ao(r,a,o),l=r[s],c=i[s];if(!c||!l)return null;return{x:c.left-l.left,y:c.top-l.top,scaleX:c.width/l.width,scaleY:c.height/l.height}};var Do={scaleX:1,scaleY:1},pl=(t)=>{var r;let{activeIndex:o,activeNodeRect:a,index:s,rects:i,overIndex:l}=t,c=(r=i[o])!=null?r:a;if(!c)return null;if(s===o){let u=i[l];if(!u)return null;return{x:0,y:o<l?u.top+u.height-(c.top+c.height):u.top-c.top,...Do}}let d=Tm(i,s,o);if(s>o&&s<=l)return{x:0,y:-c.height-d,...Do};if(s<o&&s>=l)return{x:0,y:c.height+d,...Do};return{x:0,y:0,...Do}};function Tm(t,r,o){let a=t[r],s=t[r-1],i=t[r+1];if(!a)return 0;if(o<r)return s?a.top-(s.top+s.height):i?i.top-(a.top+a.height):0;return i?i.top-(a.top+a.height):s?a.top-(s.top+s.height):0}var ml="Sortable",fl=dl.createContext({activeIndex:-1,containerId:ml,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ul,disabled:{draggable:!1,droppable:!1}});function gl(t){let{children:r,id:o,items:a,strategy:s=ul,disabled:i=!1}=t,{active:l,dragOverlay:c,droppableRects:d,over:u,measureDroppableContainers:g}=ll(),b=jr(ml,o),w=Boolean(c.rect!==null),P=Eo(()=>a.map((V)=>typeof V==="object"&&("id"in V)?V.id:V),[a]),C=l!=null,A=l?P.indexOf(l.id):-1,j=u?P.indexOf(u.id):-1,B=Sa(P),O=!Sm(P,B.current),H=j!==-1&&A===-1||O,F=Pm(i);$t(()=>{if(O&&C)g(P)},[O,P,C,g]),Mo(()=>{B.current=P},[P]);let X=Eo(()=>({activeIndex:A,containerId:b,disabled:F,disableTransforms:H,items:P,overIndex:j,useDragOverlay:w,sortedRects:Cm(P,d),strategy:s}),[A,b,F.draggable,F.droppable,H,P,j,d,w,s]);return dl.createElement(fl.Provider,{value:X},r)}var km=(t)=>{let{id:r,items:o,activeIndex:a,overIndex:s}=t;return Ao(o,a,s).indexOf(r)},Lm=(t)=>{let{containerId:r,isSorting:o,wasDragging:a,index:s,items:i,newIndex:l,previousItems:c,previousContainerId:d,transition:u}=t;if(!u||!a)return!1;if(c!==i&&s===l)return!1;if(o)return!0;return l!==s&&r===d},Dm={duration:200,easing:"ease"},bl="transform",Em=Vr.Transition.toString({property:bl,duration:0,easing:"linear"}),Mm={roleDescription:"sortable"};function Im(t){let{disabled:r,index:o,node:a,rect:s}=t,[i,l]=Nm(null),c=Sa(o);return $t(()=>{if(!r&&o!==c.current&&a.current){let d=s.current;if(d){let u=Xr(a.current,{ignoreTransform:!0}),g={x:d.left-u.left,y:d.top-u.top,scaleX:d.width/u.width,scaleY:d.height/u.height};if(g.x||g.y)l(g)}}if(o!==c.current)c.current=o},[r,o,a,s]),Mo(()=>{if(i)l(null)},[i]),i}function vl(t){let{animateLayoutChanges:r=Lm,attributes:o,disabled:a,data:s,getNewIndex:i=km,id:l,strategy:c,resizeObserverConfig:d,transition:u=Dm}=t,{items:g,containerId:b,activeIndex:w,disabled:P,disableTransforms:C,sortedRects:A,overIndex:j,useDragOverlay:B,strategy:O}=Rm(fl),H=Am(a,P),F=g.indexOf(l),X=Eo(()=>({sortable:{containerId:b,index:F,items:g},...s}),[b,s,F,g]),V=Eo(()=>g.slice(g.indexOf(l)),[g,l]),{rect:_,node:W,isOver:oe,setNodeRef:K}=cl({id:l,data:X,disabled:H.droppable,resizeObserverConfig:{updateMeasurementsFor:V,...d}}),{active:de,activatorEvent:ye,activeNodeRect:ve,attributes:Re,setNodeRef:Me,listeners:Ae,isDragging:be,over:qe,setActivatorNodeRef:he,transform:_e}=il({id:l,data:X,attributes:{...Mm,...o},disabled:H.draggable}),q=yi(K,Me),ce=Boolean(de),ae=ce&&!C&&Lo(w)&&Lo(j),Ce=!B&&be,st=Ce&&ae?_e:null,Se=c!=null?c:O,Rr=ae?st!=null?st:Se({rects:A,activeNodeRect:ve,activeIndex:w,overIndex:j,index:F}):null,Y=Lo(w)&&Lo(j)?i({id:l,items:g,activeIndex:w,overIndex:j}):F,it=de==null?void 0:de.id,fe=Sa({activeId:it,items:g,newIndex:Y,containerId:b}),Cn=g!==fe.current.items,Zt=r({active:de,containerId:b,isDragging:be,isSorting:ce,id:l,index:F,items:g,newIndex:fe.current.newIndex,previousItems:fe.current.items,previousContainerId:fe.current.containerId,transition:u,wasDragging:fe.current.activeId!=null}),Zr=Im({disabled:!Zt,index:F,node:W,rect:_});return Mo(()=>{if(ce&&fe.current.newIndex!==Y)fe.current.newIndex=Y;if(b!==fe.current.containerId)fe.current.containerId=b;if(g!==fe.current.items)fe.current.items=g},[ce,Y,b,g]),Mo(()=>{if(it===fe.current.activeId)return;if(it!=null&&fe.current.activeId==null){fe.current.activeId=it;return}let Qr=setTimeout(()=>{fe.current.activeId=it},50);return()=>clearTimeout(Qr)},[it]),{active:de,activeIndex:w,attributes:Re,data:X,rect:_,index:F,newIndex:Y,items:g,isOver:oe,isSorting:ce,isDragging:be,listeners:Ae,node:W,overIndex:j,over:qe,setNodeRef:q,setActivatorNodeRef:he,setDroppableNodeRef:K,setDraggableNodeRef:Me,transform:Zr!=null?Zr:Rr,transition:lr()};function lr(){if(Zr||Cn&&fe.current.newIndex===F)return Em;if(Ce&&!Hn(ye)||!u)return;if(ce||Zt)return Vr.Transition.toString({...u,property:bl});return}}function Am(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 Io(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 Om=[re.Down,re.Right,re.Up,re.Left],hl=(t,r)=>{let{context:{active:o,collisionRect:a,droppableRects:s,droppableContainers:i,over:l,scrollableAncestors:c}}=r;if(Om.includes(t.code)){if(t.preventDefault(),!o||!a)return;let d=[];i.getEnabled().forEach((b)=>{if(!b||b!=null&&b.disabled)return;let w=s.get(b.id);if(!w)return;switch(t.code){case re.Down:if(a.top<w.top)d.push(b);break;case re.Up:if(a.top>w.top)d.push(b);break;case re.Left:if(a.left>w.left)d.push(b);break;case re.Right:if(a.left<w.left)d.push(b);break}});let u=Gi({active:o,collisionRect:a,droppableRects:s,droppableContainers:d,pointerCoordinates:null}),g=Ca(u,"id");if(g===(l==null?void 0:l.id)&&u.length>1)g=u[1].id;if(g!=null){let b=i.get(o.id),w=i.get(g),P=w?s.get(w.id):null,C=w==null?void 0:w.node.current;if(C&&P&&b&&w){let j=_n(C).some((V,_)=>c[_]!==V),B=xl(b,w),O=Hm(b,w),H=j||!B?{x:0,y:0}:{x:O?a.width-P.width:0,y:O?a.height-P.height:0},F={x:P.left,y:P.top};return H.x&&H.y?F:Wr(F,H)}}}return};function xl(t,r){if(!Io(t)||!Io(r))return!1;return t.data.current.sortable.containerId===r.data.current.sortable.containerId}function Hm(t,r){if(!Io(t)||!Io(r))return!1;if(!xl(t,r))return!1;return t.data.current.sortable.index<r.data.current.sortable.index}import{Fragment as Vm}from"react";import{jsx as Fr,Fragment as _m}from"react/jsx-runtime";var Bm=({id:t,label:r,children:o})=>{let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=vl({id:t}),u={opacity:d?0.5:1,position:"relative",transform:Vr.Transform.toString(l),transition:c,zIndex:d?10:"auto"},g=Fr("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:Fr(ft,{className:"h-3.5 w-3.5"})});return Fr("div",{ref:i,style:u,children:o(g)})},Fm=({items:t,onReorder:r,getItemLabel:o,renderItem:a,disabled:s=!1})=>{let i=zi(Ra($n,{activationConstraint:{distance:4}}),Ra(zn,{coordinateGetter:hl})),l=(c)=>{let{active:d,over:u}=c;if(!u||d.id===u.id)return;let g=t.findIndex((w)=>w.id===d.id),b=t.findIndex((w)=>w.id===u.id);if(g===-1||b===-1)return;r(Ao(t,g,b))};if(s)return t.map((c)=>Fr(Vm,{children:a(c,null)},c.id));return Fr(sl,{sensors:i,collisionDetection:ji,onDragEnd:l,children:Fr(gl,{items:t.map((c)=>c.id),strategy:pl,children:t.map((c)=>Fr(Bm,{id:c.id,label:o?.(c),children:(d)=>Fr(_m,{children:a(c,d)})},c.id))})})},zm=Fm;import*as yl from"react";import{jsx as Jn,jsxs as Pa}from"react/jsx-runtime";var wl=({open:t,onOpenChange:r,title:o,description:a,confirmLabel:s,cancelLabel:i="Cancel",confirmVariant:l="default",pendingLabel:c="Processing...",errorContent:d,keepOpenWhilePending:u=!1,onConfirm:g})=>{let[b,w]=yl.useState(!1),P=async()=>{w(!0);try{if(await g()!==!1)r(!1)}catch(C){throw w(!1),C}w(!1)};return Jn(k,{open:t,onOpenChange:(C)=>{if(!(u&&b))r(C)},children:Pa(E,{children:[Pa(G,{children:[Jn(M,{children:o}),Jn(Q,{children:a})]}),d,Pa(or,{children:[Jn(n,{variant:"outline",onClick:()=>{r(!1)},disabled:b,children:i}),Jn(n,{variant:l,onClick:()=>{P()},disabled:b,children:b?c:s})]})]})})};wl.displayName="ConfirmDialog";var $m=wl;import*as Rl from"react";import{jsx as Oo,jsxs as Nl}from"react/jsx-runtime";var Cl=Rl.forwardRef(function({step:r,total:o,title:a,helper:s,action:i,className:l,...c},d){let u=Boolean(i);return Nl("div",{ref:d,className:e("flex flex-wrap items-start justify-between gap-4",l),...c,children:[Nl("div",{className:"min-w-0 space-y-1.5",children:[Oo(an,{tone:"accent",className:"tracking-[0.16em]",children:`Step ${r} of ${o}`}),Oo("h2",{className:"text-lg font-semibold tracking-tight",children:a}),Oo("p",{className:"max-w-xl text-sm leading-relaxed text-muted-foreground",children:s})]}),u?Oo("div",{className:"shrink-0",children:i}):null]})});Cl.displayName="StageHeader";var Jm=Cl;import{jsx as _r,jsxs as Ta}from"react/jsx-runtime";var jm=f("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)"}}}),Gm=f("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)"}}}),Ho=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==0&&t!==0n&&t!==""&&!Number.isNaN(t),Sl=({variant:t="tile",icon:r,label:o,value:a,detail:s,tone:i,className:l,...c})=>{if(t==="compact")return Ta(ie,{className:e("gap-1 px-4 py-3.5",l),...c,children:[Ta("span",{className:"flex items-center justify-between gap-2",children:[_r("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-(--text-muted)",children:o}),Ho(r)?_r("span",{className:e(Gm({tone:i})),"aria-hidden":!0,children:r}):null]}),_r("span",{className:"text-[22px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:a}),Ho(s)?_r("span",{className:"text-xs text-(--text-muted)",children:s}):null]});return Ta(ie,{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))]",l),...c,children:[Ho(r)?_r("span",{className:e(jm({tone:i})),"aria-hidden":!0,children:r}):null,_r("span",{className:"text-[26px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:a}),_r("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em] text-(--text-muted)",children:o}),Ho(s)?_r("span",{className:"text-xs text-(--text-muted)",children:s}):null]})};Sl.displayName="StatTile";var Wm=Sl;import*as Tl from"react";import{jsx as Pl,jsxs as Ym}from"react/jsx-runtime";var Xm={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)"},Um={danger:"danger",live:"primary",neutral:"neutral",success:"success",warning:"warning"},Km=({tone:t,active:r=!1,label:o,className:a,children:s,...i},l)=>{let c="border-border bg-card text-muted-foreground";if(t)c=Xm[t];else if(r)c="border-[color-mix(in_oklab,var(--primary)_45%,var(--border))] bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))] text-primary";return Ym("div",{ref:l,className:e("inline-flex items-center gap-2 rounded-full border px-3 py-1 text-[10px] font-semibold uppercase tracking-[0.16em]",c,a),...i,children:[t?Pl(qn,{tone:Um[t],pulse:t==="live"}):Pl("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]})},kl=Tl.forwardRef(Km);kl.displayName="StatusPill";var qm=kl;import*as Bo from"react";import{jsx as Vo,jsxs as ef}from"react/jsx-runtime";var Zm=f("relative min-w-0",{defaultVariants:{size:"md",variant:"pill"},variants:{size:{md:"",sm:""},variant:{pill:"",plain:""}}}),Qm=f("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)"}}}),Ll=({value:t,defaultValue:r,onValueChange:o,clearLabel:a,variant:s,size:i,className:l,classes:c,...d})=>{let[u,g]=Bo.useState(r??""),b=t!==void 0,w=b?t:u,P=Bo.useRef(null),C=(A)=>{if(!b)g(A);o?.(A)};return ef("div",{className:e(Zm({size:i,variant:s}),c?.root,l),children:[Vo(Be,{"aria-hidden":!0,className:e("pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",c?.icon)}),Vo(h,{ref:P,type:"search",value:w,onChange:(A)=>{C(A.target.value)},className:e(Qm({size:i,variant:s}),w!==void 0&&w!==""&&a!==void 0?"pr-9":void 0,c?.input),...d}),w!==void 0&&w!==""&&a!==void 0?Vo("button",{type:"button","aria-label":a,onClick:()=>{C(""),P.current?.focus()},className:e("absolute right-2.5 top-1/2 flex size-5 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-(--bg-surface-alt) hover:text-(--text-primary) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",c?.clear),children:Vo(x,{className:"h-3.5 w-3.5"})}):null]})};Ll.displayName="SearchField";var tf=Ll;import{createContext as rf,useContext as Dl,useMemo as nf,useState as of}from"react";import{createPortal as af}from"react-dom";import{jsx as Fo,jsxs as uf}from"react/jsx-runtime";var ka=rf(null),sf=({children:t})=>{let[r,o]=of(null),a=nf(()=>({container:r,setContainer:o}),[r]);return Fo(ka.Provider,{value:a,children:t})},El=({className:t})=>{let r=Dl(ka);return Fo("div",{ref:r?.setContainer,className:e("ml-auto flex items-center gap-2 empty:hidden",t)})},lf=({children:t})=>{let r=Dl(ka);if(r===null)return t;return r.container===null?null:af(t,r.container)},cf=({count:t})=>t===void 0?null:Fo("span",{className:"text-xs text-muted-foreground tabular-nums",children:t}),df=({children:t,className:r})=>uf("div",{className:e("flex flex-wrap items-center gap-3",r),children:[t,Fo(El,{})]});import{jsx as _o,jsxs as Ml}from"react/jsx-runtime";var Il=({title:t,description:r,value:o,options:a,onValueChange:s,align:i="center",className:l,...c})=>Ml("section",{className:e("flex min-w-0 flex-col gap-3 sm:flex-row sm:justify-between",i==="center"?"sm:items-center":"sm:items-start",l),...c,children:[Ml("div",{className:"min-w-0",children:[_o("h3",{className:"truncate text-sm font-semibold",children:t}),r!==void 0&&r!==null&&r!==!1&&r!==""&&r!==0?_o("p",{className:"mt-1 text-sm text-muted-foreground",children:r}):null]}),_o("div",{className:"inline-flex shrink-0 rounded-md border border-border bg-background p-1 shadow-xs",children:a.map((d)=>_o(n,{type:"button",size:"sm",variant:d.value===o?"secondary":"ghost",disabled:d.disabled,className:e("h-8 rounded-sm px-3",d.value===o&&"bg-primary/10 text-primary hover:bg-primary/15"),"aria-label":d.ariaLabel,"aria-pressed":d.value===o,onClick:()=>{s(d.value)},children:d.label},d.value))})]});Il.displayName="SectionSwitcher";import*as ar from"react";import{jsx as qt}from"react/jsx-runtime";var Al=ar.createContext({value:1}),La=()=>ar.useContext(Al),pf=({value:t,defaultValue:r=1,indicators:o,className:a,...s})=>{let i=t??r,l=ar.useMemo(()=>({indicators:o,value:i}),[i,o]);return qt(Al.Provider,{value:l,children:qt("div",{"data-slot":"stepper",className:e("space-y-8",a),...s})})},mf=({className:t,...r})=>qt("nav",{"data-slot":"stepper-nav","data-orientation":"horizontal",className:e("group/stepper-nav flex items-start justify-between gap-2",t),...r}),Da=ar.createContext({state:"inactive",step:1}),ff=({step:t,loading:r,className:o,...a})=>{let{value:s}=La(),i="inactive";if(r===!0)i="loading";else if(t<s)i="completed";else if(t===s)i="active";let l=ar.useMemo(()=>({state:i,step:t}),[i,t]);return qt(Da.Provider,{value:l,children:qt("div",{"data-slot":"stepper-item","data-state":i,"data-step":t,className:e("group/step relative flex-1 items-start",o),...a})})},gf=({className:t,...r})=>qt("div",{"data-slot":"stepper-trigger",className:e("flex flex-col items-center gap-2.5",t),...r}),bf=({className:t,children:r,...o})=>{let{indicators:a}=La(),{state:s}=ar.useContext(Da),i=a?.completed,l=a?.loading,c=r;if(s==="completed"&&Boolean(i))c=i;else if(s==="loading"&&Boolean(l))c=l;return qt("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:c})},vf=({className:t,...r})=>{let{state:o}=ar.useContext(Da);return qt("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})},hf=({className:t,...r})=>qt("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}),xf=({className:t,...r})=>qt("div",{"data-slot":"stepper-panel",className:e(t),...r}),yf=({value:t,className:r,...o})=>{let{value:a}=La();if(t!==a)return null;return qt("div",{"data-slot":"stepper-content",className:e(r),...o})};import*as Kr from"react";import{jsx as Ur,jsxs as Cf}from"react/jsx-runtime";var Ea=Kr.createContext({}),wf=({className:t,size:r,variant:o,...a})=>{let s=Kr.useMemo(()=>({size:r,variant:o}),[r,o]);return Ur(Ea.Provider,{value:s,children:Ur("fieldset",{"data-slot":"split-button",className:e("inline-flex min-w-0 items-stretch",t),...a})})},Nf=({className:t,...r})=>{let{size:o,variant:a}=Kr.useContext(Ea);return Ur(n,{"data-slot":"split-button-action",className:e("rounded-r-none",t),size:o,variant:a,...r})},Rf=({align:t="end",children:r,contentClassName:o,disabled:a,label:s,modal:i,onOpenChange:l,open:c})=>{let{size:d,variant:u}=Kr.useContext(Ea);return Cf(ot,{modal:i,onOpenChange:l,open:c,children:[Ur(at,{asChild:!0,children:Ur(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:d,variant:u,children:Ur(v,{})})}),Ur(nt,{align:t,className:o,children:r})]})};import*as wn from"react";import{jsx as sr,jsxs as zo}from"react/jsx-runtime";var Sf=({items:t,title:r,triggerAriaLabel:o="Technical details",copyLabel:a="Copy",trigger:s,align:i="end",side:l,onCopy:c,className:d,classes:u})=>{let[g,b]=wn.useState(null),w=wn.useRef(null);wn.useEffect(()=>()=>{if(w.current!==null)window.clearTimeout(w.current)},[]);let P=(C)=>{if(navigator.clipboard.writeText(C.value),b(C.label),w.current!==null)window.clearTimeout(w.current);w.current=window.setTimeout(()=>{b(null)},1500),c?.(C)};return zo(R,{children:[sr(L,{asChild:!0,children:s??sr(n,{type:"button",variant:"ghost",size:"icon","aria-label":o,className:e("h-8 w-8 text-muted-foreground hover:text-foreground",u?.root,u?.trigger,d),children:sr(Sr,{className:"h-4 w-4"})})}),zo(I,{align:i,side:l,className:e("w-80 p-3",u?.content),children:[r!==void 0&&r!==null?sr("div",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:r}):null,sr("dl",{className:"space-y-2.5",children:t.map((C)=>zo("div",{className:e("min-w-0",u?.row),children:[sr("dt",{className:e("text-[11px] font-medium text-muted-foreground",u?.label),children:C.label}),zo("dd",{className:"mt-0.5 flex min-w-0 items-start gap-1",children:[sr("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",u?.value),children:C.value}),C.copyable===!1?null:sr(n,{type:"button",variant:"ghost",size:"icon","aria-label":`${a} ${C.label}`,className:"h-6 w-6 shrink-0 text-muted-foreground hover:text-foreground",onClick:()=>{P(C)},children:g===C.label?sr(p,{className:"h-3.5 w-3.5"}):sr(ne,{className:"h-3.5 w-3.5"})})]})]},C.label))})]})]})};var Pf=Sf;import*as Nn from"react";import{jsx as ke,jsxs as pr,Fragment as Hl}from"react/jsx-runtime";var Tf={disabled:!1,emptyMessage:"No option found.",loading:!1,loadingMessage:"Loading options...",modal:!1,placeholder:"Select option...",searchPlaceholder:"Search...",width:"200px"},kf=1,Lf=0.5,Df=(t)=>t.children!==void 0,Vl=(t)=>t.flatMap((r)=>{if(!r.children)return[r];let o=Vl(r.children);return o.length>0?[{...r,children:o}]:[]}),Bl=(t,r=[])=>t.flatMap((o)=>o.children?Bl(o.children,[...r,o]):[{ancestorIds:r.map((a)=>a.id),node:o,path:r.map((a)=>a.label).join(" / ")}]),Ol=(t)=>({paddingLeft:`${Lf+t*kf}rem`}),Fl=Nn.forwardRef(function(r,o){let a={...Tf,...r},{nodes:s,value:i,onChange:l,selectedLabel:c,placeholder:d,searchPlaceholder:u,emptyMessage:g,id:b,className:w,width:P,disabled:C,loading:A,loadingMessage:j,onSearchChange:B,modal:O}=a,[H,F]=Nn.useState(!1),[X,V]=Nn.useState(""),[_,W]=Nn.useState(()=>new Set),oe=Vl(s),K=Bl(oe),de=K.find((q)=>q.node.id===i),ye=X.trim().toLowerCase(),ve=(q)=>{if(q)W(new Set(de?.ancestorIds));else if(X!=="")V(""),B?.("");F(q)},Re=(q)=>{V(q),B?.(q)},Me=(q)=>{W((ce)=>{let ae=new Set(ce);if(!ae.delete(q))ae.add(q);return ae})},Ae=(q)=>{l(q),ve(!1)},be=(q)=>pr(Hl,{children:[ke(p,{"aria-hidden":!0,className:e(i===q.id?"opacity-100":"opacity-0")}),q.icon]}),qe=(q,ce)=>q.flatMap((ae)=>{if(!Df(ae))return[pr(N,{value:ae.id,style:Ol(ce),onSelect:()=>{Ae(ae.id)},children:[be(ae),ke("span",{className:"min-w-0 truncate",title:ae.label,children:ae.label})]},ae.id)];let Ce=_.has(ae.id),st=Ce?xr:br;return[pr(N,{value:ae.id,"aria-expanded":Ce,style:Ol(ce),onSelect:()=>{Me(ae.id)},children:[ke(m,{"aria-hidden":!0,className:e(Ce&&"rotate-90")}),ae.icon??ke(st,{"aria-hidden":!0}),ke("span",{className:"min-w-0 truncate",title:ae.label,children:ae.label})]},ae.id),...Ce&&ae.children?qe(ae.children,ce+1):[]]}),he=ye===""?[]:K.filter((q)=>B!==void 0||`${q.path} / ${q.node.label}`.toLowerCase().includes(ye)),_e=de?.node.label??c;return pr(R,{modal:O,open:H,onOpenChange:ve,children:[ke(L,{asChild:!0,children:pr(n,{ref:o,id:b,variant:"outline","aria-expanded":H,"aria-busy":A,className:e("justify-between",w),style:{width:P},disabled:C,children:[_e===void 0?ke("span",{className:"min-w-0 truncate text-muted-foreground",children:d}):ke("span",{className:"min-w-0 truncate",children:_e}),A?ke(T,{"aria-hidden":!0,className:"ml-2 size-4 shrink-0 animate-spin text-muted-foreground"}):ke(Fe,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),ke(I,{className:"p-0",style:{width:"var(--radix-popover-trigger-width)"},children:pr(se,{shouldFilter:!1,children:[ke(Ze,{"aria-label":u,placeholder:u,value:X,onValueChange:Re}),ke(me,{className:"max-h-[min(300px,calc(var(--radix-popover-content-available-height)-2.5rem))]",children:A?pr("div",{"aria-live":"polite",className:"flex items-center justify-center gap-2 px-3 py-6 text-sm text-muted-foreground",children:[ke(T,{"aria-hidden":!0,className:"size-4 animate-spin"}),j]}):pr(Hl,{children:[ke(Qe,{children:g}),ke(Z,{children:ye===""?qe(oe,0):he.map((q)=>pr(N,{value:q.node.id,onSelect:()=>{Ae(q.node.id)},children:[be(q.node),ke("span",{className:"min-w-0 truncate",title:q.node.label,children:q.node.label}),q.path===""?null:ke("span",{className:"ml-auto min-w-0 shrink truncate pl-2 text-xs text-muted-foreground",title:q.path,children:q.path})]},q.node.id))})]})})]})})]})});Fl.displayName="TreeSelect";import*as zl from"react";import{jsx as _l,jsxs as Mf}from"react/jsx-runtime";var Ef=({value:t,state:r="value",trailing:o,monospace:a=!0,className:s,...i},l)=>{let c=r==="secret";return Mf("div",{ref:l,className:e("flex min-w-0 items-center gap-2",s),...i,children:[_l("div",{className:e("flex min-w-0 flex-1 items-center border-b py-2",c?"border-[color-mix(in_oklab,var(--primary)_45%,var(--border))]":"border-border"),children:_l("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]})},$l=zl.forwardRef(Ef);$l.displayName="ValueRow";var If=$l;import{forwardRef as Jl,useCallback as Yr,useLayoutEffect as jl,useId as Af,useRef as Gl,useState as We}from"react";import{jsx as S,jsxs as U,Fragment as jn}from"react/jsx-runtime";var Of=({mode:t,onModeChange:r,disabled:o})=>U("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:[S("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)]")}),U("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:[S(St,{className:"h-3 w-3"}),"Linked"]}),U("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:[S(ct,{className:"h-3 w-3"}),"Inline"]})]}),Hf=({variableKey:t,initialValue:r,isSecret:o,loading:a,saving:s,onSubmit:i,onCancel:l})=>{let[c,d]=We(r),[u,g]=We(!1),b=Gl(null);return jl(()=>{if(!a)b.current?.focus()},[a]),U("form",{role:"presentation",onSubmit:(w)=>{w.preventDefault(),i(c)},onKeyDown:(w)=>{if(w.key==="Escape")w.preventDefault(),l()},className:"space-y-3 p-3",children:[U("div",{className:"flex items-start justify-between gap-2",children:[U("div",{className:"min-w-0",children:[S("p",{className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground",children:"Editing linked variable"}),S("p",{className:"mt-0.5 truncate font-mono text-xs text-foreground",children:t})]}),S("button",{type:"button",onClick:l,"aria-label":"Close editor",className:"rounded p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:S(x,{className:"h-3.5 w-3.5"})})]}),U("div",{className:"space-y-1",children:[S(y,{htmlFor:"linked-value",className:"text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground",children:o?"Secret value":"Value"}),U("div",{className:"relative",children:[S(h,{ref:b,id:"linked-value",type:u?"text":"password",value:c,onChange:(w)=>{d(w.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}),S("button",{type:"button",onClick:()=>{g((w)=>!w)},"aria-label":u?"Hide value":"Reveal value",className:"absolute inset-y-0 right-1 my-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:u?S(He,{className:"h-3.5 w-3.5"}):S(pe,{className:"h-3.5 w-3.5"})})]})]}),U("div",{className:"flex items-center justify-between gap-2 pt-1",children:[U("p",{className:"text-[10px] leading-relaxed text-muted-foreground",children:["Updates the linked secret. Other connectors using"," ",S("span",{className:"font-mono",children:t})," will pick it up on their next run."]}),S(n,{type:"submit",size:"sm",disabled:a||s,className:"h-7 px-3 text-xs",children:s?U(jn,{children:[S(T,{className:"h-3 w-3 animate-spin"}),"Saving"]}):"Save"})]})]})},Vf=({suggestedName:t,onSubmit:r,onCancel:o})=>{let[a,s]=We(t),[i,l]=We(""),[c,d]=We(!0),[u,g]=We(!1),b=Gl(null);jl(()=>{b.current?.focus(),b.current?.select()},[]);let w=a.trim(),P=w.length>0;return U("form",{role:"presentation",onSubmit:(C)=>{if(C.preventDefault(),P)r({key:w,secret:c,value:i})},onClick:(C)=>{C.stopPropagation()},onKeyDown:(C)=>{if(C.key==="Escape")C.preventDefault(),C.stopPropagation(),o()},className:"flex flex-col",children:[U("div",{className:"flex items-center gap-2 border-b border-border/60 bg-muted/15 px-3 py-2",children:[S("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:S(dt,{className:"h-3.5 w-3.5"})}),S("span",{className:"flex-1 text-[10.5px] font-medium uppercase tracking-[0.12em] text-muted-foreground/80",children:"New variable"}),S(Ge,{className:"h-3 w-3 text-muted-foreground/60"})]}),U("div",{className:"space-y-2.5 px-3 py-2.5",children:[U("div",{className:"space-y-1",children:[S(y,{htmlFor:"var-key",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Name"}),U("div",{className:"relative",children:[S("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-0 left-2.5 flex items-center text-muted-foreground/60",children:S(lt,{className:"h-3 w-3"})}),S(h,{ref:b,id:"var-key",value:a,onChange:(C)=>{s(C.target.value.toUpperCase())},placeholder:"VARIABLE_NAME",className:"h-8 pl-7 font-mono text-[12.5px] tracking-tight",autoComplete:"off",spellCheck:!1})]})]}),U("div",{className:"space-y-1",children:[S(y,{htmlFor:"var-value",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Value"}),U("div",{className:"relative",children:[S(h,{id:"var-value",type:u?"text":"password",value:i,onChange:(C)=>{l(C.target.value)},placeholder:"Encrypted at rest",className:"h-8 pr-8 font-mono text-[12.5px]",autoComplete:"off",spellCheck:!1}),S("button",{type:"button",onClick:()=>{g((C)=>!C)},"aria-label":u?"Hide value":"Reveal value",className:"absolute inset-y-0 right-1 my-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground",children:u?S(He,{className:"h-3.5 w-3.5"}):S(pe,{className:"h-3.5 w-3.5"})})]})]}),U("label",{className:"flex cursor-pointer items-center gap-2 select-none text-[11px] text-muted-foreground",children:[S("input",{type:"checkbox",checked:c,onChange:(C)=>{d(C.target.checked)},className:"h-3 w-3 accent-primary"}),U("span",{className:"flex items-center gap-1",children:[S(lt,{className:"h-3 w-3"}),"Mark as secret"]})]})]}),U("button",{type:"submit",disabled:!P,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:[S("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:S(p,{className:"h-3 w-3"})}),U("span",{className:"flex min-w-0 flex-1 flex-col",children:[S("span",{className:"text-[12px] font-medium leading-tight",children:"Create variable"}),S("span",{className:"truncate text-[10px] leading-tight text-muted-foreground",children:P?U(jn,{children:["Link this field to"," ",S("span",{className:"font-mono text-foreground/80",children:w})]}):"Enter a name to continue"})]}),S(Oe,{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"})]})]})},Wl=Jl(function({selected:r,value:o,placeholder:a,disabled:s,open:i,onOpen:l},c){let d=Boolean(o),u=Boolean(r);return U("button",{ref:c,type:"button","aria-expanded":i,disabled:s,onClick:l,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",d?"border-primary/20 bg-primary/[0.03]":"border-input"),children:[S("span",{"aria-hidden":!0,className:e("flex h-5 w-5 shrink-0 items-center justify-center rounded-sm transition-colors",d?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:S(St,{className:"h-3 w-3"})}),d?U("span",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[S("span",{className:"truncate font-mono text-[12.5px] tracking-tight",children:o}),!u&&S("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"})]}):S("span",{className:"flex-1 truncate text-muted-foreground",children:a}),S(Fe,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/60 transition-colors group-hover/trigger:text-muted-foreground"})]})});Wl.displayName="LinkedTrigger";var Bf=({value:t,onChange:r,onBlur:o,placeholder:a,disabled:s,masked:i,inputId:l})=>{let[c,d]=We(!1),u=i&&!c?"password":"text";return U("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:[S("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:S(ct,{className:"h-3 w-3"})}),S("input",{id:l,type:u,value:t,onChange:(g)=>{r(g.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"}),i&&S("button",{type:"button",onClick:()=>{d((g)=>!g)},"aria-label":c?"Hide value":"Reveal value",className:"flex h-7 w-7 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:c?S(He,{className:"h-3.5 w-3.5"}):S(pe,{className:"h-3.5 w-3.5"})})]})},Ff=({options:t,value:r,onSelect:o})=>U("div",{className:"px-1",children:[U("div",{className:"flex items-center justify-between px-2 pt-2 pb-1",children:[S("span",{className:"text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/80",children:"Linked variables"}),S("span",{className:"text-[10px] tabular-nums text-muted-foreground/60",children:t.length})]}),S(Z,{className:"!p-0 [&_[cmdk-group-heading]]:hidden",children:t.map((a)=>{let s=r===a.key;return U(N,{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&&S("span",{"aria-hidden":!0,className:"absolute inset-y-1.5 left-0 w-[2px] rounded-r bg-primary"}),S("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:S(lt,{className:"h-3 w-3"})}),U("div",{className:"flex min-w-0 flex-1 flex-col",children:[S("span",{className:e("truncate font-mono text-[12.5px] tracking-tight",s&&"text-primary"),children:a.key}),a.description!==void 0&&a.description!==""&&S("span",{className:"truncate text-[10.5px] leading-tight text-muted-foreground",children:a.description})]}),s?S(p,{className:"h-3.5 w-3.5 shrink-0 text-primary"}):S("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:S(Oe,{className:"h-3.5 w-3.5"})})]},a.key)})})]}),_f=()=>U("div",{className:"space-y-1.5 px-2 py-3",children:[U("div",{className:"flex items-center justify-between px-1 pb-1",children:[S("span",{className:"text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/60",children:"Loading"}),S(T,{className:"h-3 w-3 animate-spin text-muted-foreground/60"})]}),[0.95,0.7,0.85].map((t,r)=>U("div",{className:"flex items-center gap-2 rounded-md px-2 py-1.5",style:{opacity:1-r*0.18},children:[S("div",{className:"h-5 w-5 shrink-0 animate-pulse rounded-sm bg-muted/70"}),S("div",{className:"h-3 animate-pulse rounded bg-muted/70",style:{width:`${t*100}%`}})]},r))]}),zf=({query:t,canCreate:r,onCreate:o})=>{let a=t.trim();return U("div",{className:"flex flex-col items-center gap-2 px-4 py-7 text-center",children:[S("span",{"aria-hidden":!0,className:"flex h-9 w-9 items-center justify-center rounded-full bg-muted/60 text-muted-foreground/70",children:S(lt,{className:"h-4 w-4"})}),U("div",{className:"space-y-0.5",children:[S("p",{className:"text-[12px] font-medium text-foreground",children:a?U(jn,{children:["No variables match"," ",U("span",{className:"font-mono text-foreground",children:['"',a,'"']})]}):"No variables yet"}),S("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&&U(n,{type:"button",size:"sm",variant:"outline",onClick:o,className:"mt-1 h-7 text-[11px]",children:[S(Ge,{className:"h-3 w-3"}),a?`Create "${a.toUpperCase().replaceAll(/[^A-Z0-9_]/gu,"_")}"`:"Create variable"]})]})},$f=({options:t,optionsLoading:r,optionsFetching:o,value:a,query:s,onQueryChange:i,onSelect:l,onCreate:c,suggestedName:d,showCreate:u,onShowCreate:g})=>{if(u&&c)return S(Vf,{suggestedName:d??s.trim(),onSubmit:(w)=>{c(w)},onCancel:()=>{g(!1)}});let b=S(Ff,{options:t,value:a,onSelect:l});if(r)b=S(_f,{});else if(t.length===0)b=S(zf,{query:s,canCreate:Boolean(c),onCreate:()=>{g(!0)}});return U("div",{className:"flex flex-col",children:[U("div",{className:"relative flex items-center gap-2 border-b border-border/60 bg-muted/15 px-3 py-2",children:[S(Be,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/70"}),S("input",{autoFocus:!0,type:"text",value:s,onChange:(w)=>{i(w.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"}),U("div",{className:"flex h-4 w-4 items-center justify-center",children:[o&&!r&&S(T,{className:"h-3 w-3 animate-spin text-muted-foreground/70"}),!o&&s&&S("button",{type:"button",onClick:()=>{i("")},"aria-label":"Clear search",className:"rounded p-0.5 text-muted-foreground/60 transition-colors hover:bg-muted hover:text-foreground",children:S(x,{className:"h-3 w-3"})})]})]}),S(se,{shouldFilter:!1,className:"rounded-none bg-transparent",loop:!0,children:S(me,{className:"max-h-[280px] py-1",children:b})}),c&&U("button",{type:"button",onClick:()=>{g(!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:[S("span",{className:"flex h-6 w-6 items-center justify-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/15",children:S(Ge,{className:"h-3 w-3"})}),U("span",{className:"flex min-w-0 flex-1 flex-col",children:[S("span",{className:"text-[12px] font-medium leading-tight",children:"Create new variable"}),S("span",{className:"text-[10px] leading-tight text-muted-foreground",children:"Encrypted at rest · reusable across connectors"})]}),S(Oe,{className:"h-3.5 w-3.5 text-muted-foreground/60 transition-transform group-hover/cta:translate-x-0.5"})]})]})},Jf=Jl(function({value:r,mode:o,onChange:a,onBlur:s,options:i,optionsLoading:l,optionsFetching:c,onSearch:d,onCreate:u,onResolve:g,onUpdate:b,suggestedName:w,placeholder:P="Select variable…",disabled:C=!1,masked:A=!0,className:j},B){let[O,H]=We(!1),[F,X]=We(""),[V,_]=We(!1),[W,oe]=We(!1),[K,de]=We(null),[ye,ve]=We(!1),[Re,Me]=We(!1),[Ae,be]=We(null),qe=Af(),he=Yr((Y)=>{if(Y===o)return;a("",Y),_(!1),X("")},[o,a]),_e=Yr((Y)=>{a(Y===r?"":Y,"linked"),H(!1),_(!1)},[r,a]),q=Yr((Y)=>{a(Y,"inline")},[a]),ce=Yr(async(Y)=>{if(!u)return;let it=await u(Y);_(!1),H(!1),a(it.key,"linked")},[u,a]),ae=Yr(async()=>{if(!r||!g)return;oe(!0),ve(!0),be(null);try{let Y=await g(r);de(Y??{key:r,secret:!0,value:null})}catch(Y){be(Y instanceof Error?Y.message:"Failed to load variable"),de({key:r,secret:!0,value:null})}ve(!1)},[r,g]),Ce=Yr(async(Y)=>{if(!b||!r)return;Me(!0);try{await b({key:r,value:Y}),oe(!1)}catch(it){throw Me(!1),it}Me(!1)},[b,r]),st=Yr((Y)=>{X(Y),d?.(Y)},[d]),Se=i.find((Y)=>Y.key===r),Rr=o==="linked"&&Boolean(r)&&Boolean(b);return U("div",{className:e("space-y-1.5",j),children:[U("div",{className:"flex items-center gap-1.5",children:[S("div",{className:"min-w-0 flex-1",children:o==="linked"?U(R,{open:O,onOpenChange:(Y)=>{if(H(Y),!Y)_(!1),s?.()},modal:!0,children:[S(L,{asChild:!0,children:S(Wl,{ref:B,selected:Se,value:r,placeholder:P,disabled:C,open:O,onOpen:()=>{H(!0)}})}),S(I,{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:S($f,{options:i,optionsLoading:Boolean(l),optionsFetching:Boolean(c),value:r,query:F,onQueryChange:st,onSelect:_e,onCreate:u?ce:void 0,suggestedName:w,showCreate:V,onShowCreate:_})})]}):S(Bf,{inputId:qe,value:r,onChange:q,onBlur:()=>s?.(),placeholder:P||"Enter value",disabled:C,masked:A})}),Rr&&U(R,{open:W,onOpenChange:(Y)=>{if(oe(Y),!Y)de(null),be(null);else if(!K)ae()},modal:!0,children:[S(L,{asChild:!0,children:S(n,{type:"button",variant:"outline",size:"icon",disabled:C,"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:S(ct,{className:"h-3.5 w-3.5"})})}),U(I,{align:"end",side:"bottom",sideOffset:6,className:"w-80 p-0 shadow-lg",children:[Ae!==null&&Ae!==""&&S("div",{className:"border-b border-destructive/30 bg-destructive/5 px-3 py-2 text-[11px] text-destructive",children:Ae}),S(Hf,{variableKey:r,initialValue:K?.value??"",isSecret:K?.secret??!0,loading:ye,saving:Re,onSubmit:(Y)=>{Ce(Y)},onCancel:()=>{oe(!1)}},`${r}:${K?.value??""}`)]})]}),S(Of,{mode:o,onModeChange:he,disabled:C})]}),S("p",{className:"flex items-center gap-1.5 text-[10.5px] leading-tight text-muted-foreground/80",children:o==="linked"?U(jn,{children:[S(St,{className:"h-3 w-3"}),S("span",{children:"Reads from an org variable. Rotate values in one place; every connector picks it up."})]}):U(jn,{children:[S(ct,{className:"h-3 w-3"}),U("span",{children:["Stored inline on this connector. Use"," ",S("span",{className:"font-medium text-foreground/80",children:"Linked"})," ","to share across connectors."]})]})})]})});import{useMemo as jf}from"react";import{jsx as $o,jsxs as Ma}from"react/jsx-runtime";var Gf=(t)=>{let r="",o=0,a=" ",s=t.replaceAll(/>\s*</gu,`>
|
|
6
|
+
`},ip={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 lp(t){let{announcements:r=ip,container:o,hiddenTextDescribedById:a,screenReaderInstructions:s=sp}=t,{announce:i,announcement:l}=Ni(),c=Jr("DndLiveRegion"),[d,u]=jt(!1);if(Ne(()=>{u(!0)},[]),op(Se(()=>({onDragStart(x){let{active:C}=x;i(r.onDragStart({active:C}))},onDragMove(x){let{active:C,over:E}=x;if(r.onDragMove)i(r.onDragMove({active:C,over:E}))},onDragOver(x){let{active:C,over:E}=x;i(r.onDragOver({active:C,over:E}))},onDragEnd(x){let{active:C,over:E}=x;i(r.onDragEnd({active:C,over:E}))},onDragCancel(x){let{active:C,over:E}=x;i(r.onDragCancel({active:C,over:E}))}}),[i,r])),!d)return null;let b=ir.createElement(ir.Fragment,null,ir.createElement(yi,{id:a,value:s.draggable}),ir.createElement(wi,{id:c,announcement:l}));return o?np(b,o):b}var Ce;(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"})(Ce||(Ce={}));function So(){}function Ra(t,r){return Se(()=>({sensor:t,options:r!=null?r:{}}),[t,r])}function Hi(){for(var t=arguments.length,r=Array(t),o=0;o<t;o++)r[o]=arguments[o];return Se(()=>[...r].filter((a)=>a!=null),[...r])}var Xt=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:o}}=t,{data:{value:a}}=r;return o-a}function cp(t,r){let{data:{value:o}}=t,{data:{value:a}}=r;return a-o}function Ri(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 Ci(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 Fi=(t)=>{let{collisionRect:r,droppableRects:o,droppableContainers:a}=t,s=Ci(r,r.left,r.top),i=[];for(let l of a){let{id:c}=l,d=o.get(c);if(d){let u=Vi(Ci(d),s);i.push({id:c,data:{droppableContainer:l,value:u}})}}return i.sort(Bi)},_i=(t)=>{let{collisionRect:r,droppableRects:o,droppableContainers:a}=t,s=Ri(r),i=[];for(let l of a){let{id:c}=l,d=o.get(c);if(d){let u=Ri(d),b=s.reduce((C,E,P)=>C+Vi(u[P],E),0),x=Number((b/4).toFixed(4));i.push({id:c,data:{droppableContainer:l,value:x}})}}return i.sort(Bi)};function dp(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),i=Math.min(r.top+r.height,t.top+t.height),l=s-a,c=i-o;if(a<s&&o<i){let d=r.width*r.height,u=t.width*t.height,b=l*c,x=b/(d+u-b);return Number(x.toFixed(4))}return 0}var up=(t)=>{let{collisionRect:r,droppableRects:o,droppableContainers:a}=t,s=[];for(let i of a){let{id:l}=i,c=o.get(l);if(c){let d=dp(c,r);if(d>0)s.push({id:l,data:{droppableContainer:i,value:d}})}}return s.sort(cp)};function pp(t,r,o){return{...t,scaleX:r&&o?r.width/o.width:1,scaleY:r&&o?r.height/o.height:1}}function zi(t,r){return t&&r?{x:t.left-r.left,y:t.top-r.top}:Xt}function mp(t){return function(o){for(var a=arguments.length,s=Array(a>1?a-1:0),i=1;i<a;i++)s[i-1]=arguments[i];return s.reduce((l,c)=>({...l,top:l.top+t*c.y,bottom:l.bottom+t*c.y,left:l.left+t*c.x,right:l.right+t*c.x}),{...o})}}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,o){let a=gp(r);if(!a)return t;let{scaleX:s,scaleY:i,x:l,y:c}=a,d=t.left-l-(1-s)*parseFloat(o),u=t.top-c-(1-i)*parseFloat(o.slice(o.indexOf(" ")+1)),b=s?t.width/s:t.width,x=i?t.height/i:t.height;return{width:b,height:x,top:u,right:d+b,bottom:u+x,left:d}}var vp={ignoreTransform:!1};function Kr(t,r){if(r===void 0)r=vp;let o=t.getBoundingClientRect();if(r.ignoreTransform){let{transform:u,transformOrigin:b}=Fe(t).getComputedStyle(t);if(u)o=bp(o,u,b)}let{top:a,left:s,width:i,height:l,bottom:c,right:d}=o;return{top:a,left:s,width:i,height:l,bottom:c,right:d}}function Si(t){return Kr(t,{ignoreTransform:!0})}function hp(t){let{innerWidth:r,innerHeight:o}=t;return{top:0,left:0,right:r,bottom:o,width:r,height:o}}function xp(t,r){if(r===void 0)r=Fe(t).getComputedStyle(t);return r.position==="fixed"}function yp(t,r){if(r===void 0)r=Fe(t).getComputedStyle(t);let o=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((s)=>{let i=r[s];return typeof i==="string"?o.test(i):!1})}function $n(t,r){let o=[];function a(s){if(r!=null&&o.length>=r)return o;if(!s)return o;if(xo(s)&&s.scrollingElement!=null&&!o.includes(s.scrollingElement))return o.push(s.scrollingElement),o;if(!vn(s)||ba(s))return o;if(o.includes(s))return o;let i=Fe(t).getComputedStyle(s);if(s!==t){if(yp(s,i))o.push(s)}if(xp(s,i))return o;return a(s.parentNode)}if(!t)return o;return a(t)}function $i(t){let[r]=$n(t,1);return r!=null?r:null}function va(t){if(!Hn||!t)return null;if($r(t))return t;if(!ho(t))return null;if(xo(t)||t===jr(t).scrollingElement)return window;if(vn(t))return t;return null}function ji(t){if($r(t))return t.scrollX;return t.scrollLeft}function Ji(t){if($r(t))return t.scrollY;return t.scrollTop}function ya(t){return{x:ji(t),y:Ji(t)}}var De;(function(t){t[t.Forward=1]="Forward",t[t.Backward=-1]="Backward"})(De||(De={}));function Gi(t){if(!Hn||!t)return!1;return t===document.scrollingElement}function Wi(t){let r={x:0,y:0},o=Gi(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,i=t.scrollLeft<=r.x,l=t.scrollTop>=a.y,c=t.scrollLeft>=a.x;return{isTop:s,isLeft:i,isBottom:l,isRight:c,maxScroll:a,minScroll:r}}var wp={x:0.2,y:0.2};function Np(t,r,o,a,s){let{top:i,left:l,right:c,bottom:d}=o;if(a===void 0)a=10;if(s===void 0)s=wp;let{isTop:u,isBottom:b,isLeft:x,isRight:C}=Wi(t),E={x:0,y:0},P={x:0,y:0},O={height:r.height*s.y,width:r.width*s.x};if(!u&&i<=r.top+O.height)E.y=De.Backward,P.y=a*Math.abs((r.top+O.height-i)/O.height);else if(!b&&d>=r.bottom-O.height)E.y=De.Forward,P.y=a*Math.abs((r.bottom-O.height-d)/O.height);if(!C&&c>=r.right-O.width)E.x=De.Forward,P.x=a*Math.abs((r.right-O.width-c)/O.width);else if(!x&&l<=r.left+O.width)E.x=De.Backward,P.x=a*Math.abs((r.left+O.width-l)/O.width);return{direction:E,speed:P}}function Rp(t){if(t===document.scrollingElement){let{innerWidth:i,innerHeight:l}=window;return{top:0,left:0,right:i,bottom:l,width:i,height:l}}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 Xi(t){return t.reduce((r,o)=>Wr(r,ya(o)),Xt)}function Cp(t){return t.reduce((r,o)=>r+ji(o),0)}function Sp(t){return t.reduce((r,o)=>r+Ji(o),0)}function Pp(t,r){if(r===void 0)r=Kr;if(!t)return;let{top:o,left:a,bottom:s,right:i}=r(t);if(!$i(t))return;if(s<=0||i<=0||o>=window.innerHeight||a>=window.innerWidth)t.scrollIntoView({block:"center",inline:"center"})}var Tp=[["x",["left","right"],Cp],["y",["top","bottom"],Sp]];class To{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=$n(r),a=Xi(o);this.rect={...t},this.width=t.width,this.height=t.height;for(let[s,i,l]of Tp)for(let c of i)Object.defineProperty(this,c,{get:()=>{let d=l(o),u=a[s]-d;return this.rect[c]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class yn{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 kp(t){let{EventTarget:r}=Fe(t);return t instanceof r?t:jr(t)}function ha(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 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 ee;(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"})(ee||(ee={}));var Ui={start:[ee.Space,ee.Enter],cancel:[ee.Esc],end:[ee.Space,ee.Enter,ee.Tab]},Dp=(t,r)=>{let{currentCoordinates:o}=r;switch(t.code){case ee.Right:return{...o,x:o.x+25};case ee.Left:return{...o,x:o.x-25};case ee.Down:return{...o,y:o.y+25};case ee.Up:return{...o,y:o.y-25}}return};class jn{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 yn(jr(r)),this.windowListeners=new yn(Fe(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,o=t.node.current;if(o)Pp(o);r(Xt)}handleKeyDown(t){if(Bn(t)){let{active:r,context:o,options:a}=this.props,{keyboardCodes:s=Ui,coordinateGetter:i=Dp,scrollBehavior:l="smooth"}=a,{code:c}=t;if(s.end.includes(c)){this.handleEnd(t);return}if(s.cancel.includes(c)){this.handleCancel(t);return}let{collisionRect:d}=o.current,u=d?{x:d.left,y:d.top}:Xt;if(!this.referenceCoordinates)this.referenceCoordinates=u;let b=i(t,{active:r,context:o.current,currentCoordinates:u});if(b){let x=Xr(b,u),C={x:0,y:0},{scrollableAncestors:E}=o.current;for(let P of E){let O=t.code,{isTop:X,isRight:j,isLeft:H,isBottom:V,maxScroll:J,minScroll:K}=Wi(P),_=Rp(P),W={x:Math.min(O===ee.Right?_.right-_.width/2:_.right,Math.max(O===ee.Right?_.left:_.left+_.width/2,b.x)),y:Math.min(O===ee.Down?_.bottom-_.height/2:_.bottom,Math.max(O===ee.Down?_.top:_.top+_.height/2,b.y))},U=O===ee.Right&&!j||O===ee.Left&&!H,te=O===ee.Down&&!V||O===ee.Up&&!X;if(U&&W.x!==b.x){let q=P.scrollLeft+x.x,de=O===ee.Right&&q<=J.x||O===ee.Left&&q>=K.x;if(de&&!x.y){P.scrollTo({left:q,behavior:l});return}if(de)C.x=P.scrollLeft-q;else C.x=O===ee.Right?P.scrollLeft-J.x:P.scrollLeft-K.x;if(C.x)P.scrollBy({left:-C.x,behavior:l});break}else if(te&&W.y!==b.y){let q=P.scrollTop+x.y,de=O===ee.Down&&q<=J.y||O===ee.Up&&q>=K.y;if(de&&!x.x){P.scrollTo({top:q,behavior:l});return}if(de)C.y=P.scrollTop-q;else C.y=O===ee.Down?P.scrollTop-J.y:P.scrollTop-K.y;if(C.y)P.scrollBy({top:-C.y,behavior:l});break}}this.handleMove(t,Wr(Xr(b,this.referenceCoordinates),C))}}}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()}}jn.activators=[{eventName:"onKeyDown",handler:(t,r,o)=>{let{keyboardCodes:a=Ui,onActivation:s}=r,{active:i}=o,{code:l}=t.nativeEvent;if(a.start.includes(l)){let c=i.activatorNode.current;if(c&&t.target!==c)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 ko{constructor(t,r,o){var a;if(o===void 0)o=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:i}=s;this.props=t,this.events=r,this.document=jr(i),this.documentListeners=new yn(this.document),this.listeners=new yn(o),this.windowListeners=new yn(Fe(i)),this.initialCoordinates=(a=No(s))!=null?a:Xt,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(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(o!=null&&o({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: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(Ot.Click,Lp,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ot.SelectionChange,this.removeTextSelection),r(t)}handleMove(t){var r;let{activated:o,initialCoordinates:a,props:s}=this,{onMove:i,options:{activationConstraint:l}}=s;if(!a)return;let c=(r=No(t))!=null?r:Xt,d=Xr(a,c);if(!o&&l){if(Ti(l)){if(l.tolerance!=null&&ha(d,l.tolerance))return this.handleCancel();if(ha(d,l.distance))return this.handleStart()}if(ki(l)){if(ha(d,l.tolerance))return this.handleCancel()}this.handlePending(l,d);return}if(t.cancelable)t.preventDefault();i(c)}handleEnd(){let{onAbort:t,onEnd:r}=this.props;if(this.detach(),!this.activated)t(this.props.active);r()}handleCancel(){let{onAbort:t,onCancel:r}=this.props;if(this.detach(),!this.activated)t(this.props.active);r()}handleKeydown(t){if(t.code===ee.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 Jn extends ko{constructor(t){let{event:r}=t,o=jr(r.target);super(t,Ep,o)}}Jn.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 Mp={move:{name:"mousemove"},end:{name:"mouseup"}},wa;(function(t){t[t.RightClick=2]="RightClick"})(wa||(wa={}));class Ki extends ko{constructor(t){super(t,Mp,jr(t.event.target))}}Ki.activators=[{eventName:"onMouseDown",handler:(t,r)=>{let{nativeEvent:o}=t,{onActivation:a}=r;if(o.button===wa.RightClick)return!1;return a==null||a({event:o}),!0}}];var xa={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Yi extends ko{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:o}=t,{onActivation:a}=r,{touches:s}=o;if(s.length>1)return!1;return a==null||a({event:o}),!0}}];var Fn;(function(t){t[t.Pointer=0]="Pointer",t[t.DraggableRect=1]="DraggableRect"})(Fn||(Fn={}));var Po;(function(t){t[t.TreeOrder=0]="TreeOrder",t[t.ReversedTreeOrder=1]="ReversedTreeOrder"})(Po||(Po={}));function Ip(t){let{acceleration:r,activator:o=Fn.Pointer,canScroll:a,draggingRect:s,enabled:i,interval:l=5,order:c=Po.TreeOrder,pointerCoordinates:d,scrollableAncestors:u,scrollableAncestorRects:b,delta:x,threshold:C}=t,E=Op({delta:x,disabled:!i}),[P,O]=bi(),X=Ae({x:0,y:0}),j=Ae({x:0,y:0}),H=Se(()=>{switch(o){case Fn.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Fn.DraggableRect:return s}},[o,s,d]),V=Ae(null),J=Jt(()=>{let _=V.current;if(!_)return;let W=X.current.x*j.current.x,U=X.current.y*j.current.y;_.scrollBy(W,U)},[]),K=Se(()=>c===Po.TreeOrder?[...u].reverse():u,[c,u]);Ne(()=>{if(!i||!u.length||!H){O();return}for(let _ of K){if((a==null?void 0:a(_))===!1)continue;let W=u.indexOf(_),U=b[W];if(!U)continue;let{direction:te,speed:q}=Np(_,U,H,r,C);for(let de of["x","y"])if(!E[de][te[de]])q[de]=0,te[de]=0;if(q.x>0||q.y>0){O(),V.current=_,P(J,l),X.current=q,j.current=te;return}}X.current={x:0,y:0},j.current={x:0,y:0},O()},[r,J,a,O,i,l,JSON.stringify(H),JSON.stringify(E),P,u,K,b,JSON.stringify(C)])}var Ap={x:{[De.Backward]:!1,[De.Forward]:!1},y:{[De.Backward]:!1,[De.Forward]:!1}};function Op(t){let{delta:r,disabled:o}=t,a=wo(r);return xn((s)=>{if(o||!a||!s)return Ap;let i={x:Math.sign(r.x-a.x),y:Math.sign(r.y-a.y)};return{x:{[De.Backward]:s.x[De.Backward]||i.x===-1,[De.Forward]:s.x[De.Forward]||i.x===1},y:{[De.Backward]:s.y[De.Backward]||i.y===-1,[De.Forward]:s.y[De.Forward]||i.y===1}}},[o,r,a])}function Hp(t,r){let o=r!=null?t.get(r):void 0,a=o?o.node.current:null;return xn((s)=>{var i;if(r==null)return null;return(i=a!=null?a:s)!=null?i:null},[a,r])}function Vp(t,r){return Se(()=>t.reduce((o,a)=>{let{sensor:s}=a,i=s.activators.map((l)=>({eventName:l.eventName,handler:r(l.handler,a)}));return[...o,...i]},[]),[t,r])}var _n;(function(t){t[t.Always=0]="Always",t[t.BeforeDragging=1]="BeforeDragging",t[t.WhileDragging=2]="WhileDragging"})(_n||(_n={}));var Na;(function(t){t.Optimized="optimized"})(Na||(Na={}));var Li=new Map;function Bp(t,r){let{dragging:o,dependencies:a,config:s}=r,[i,l]=jt(null),{frequency:c,measure:d,strategy:u}=s,b=Ae(t),x=X(),C=hn(x),E=Jt(function(j){if(j===void 0)j=[];if(C.current)return;l((H)=>{if(H===null)return j;return H.concat(j.filter((V)=>!H.includes(V)))})},[C]),P=Ae(null),O=xn((j)=>{if(x&&!o)return Li;if(!j||j===Li||b.current!==t||i!=null){let H=new Map;for(let V of t){if(!V)continue;if(i&&i.length>0&&!i.includes(V.id)&&V.rect.current){H.set(V.id,V.rect.current);continue}let J=V.node.current,K=J?new To(d(J),J):null;if(V.rect.current=K,K)H.set(V.id,K)}return H}return j},[t,i,o,x,d]);return Ne(()=>{b.current=t},[t]),Ne(()=>{if(x)return;E()},[o,x]),Ne(()=>{if(i&&i.length>0)l(null)},[JSON.stringify(i)]),Ne(()=>{if(x||typeof c!=="number"||P.current!==null)return;P.current=setTimeout(()=>{E(),P.current=null},c)},[c,x,E,...a]),{droppableRects:O,measureDroppableContainers:E,measuringScheduled:i!=null};function X(){switch(u){case _n.Always:return!1;case _n.BeforeDragging:return o;default:return!o}}}function qi(t,r){return xn((o)=>{if(!t)return null;if(o)return o;return typeof r==="function"?r(t):t},[r,t])}function Fp(t,r){return qi(t,r)}function _p(t){let{callback:r,disabled:o}=t,a=yo(r),s=Se(()=>{if(o||typeof window>"u"||typeof window.MutationObserver>"u")return;let{MutationObserver:i}=window;return new i(a)},[a,o]);return Ne(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function Lo(t){let{callback:r,disabled:o}=t,a=yo(r),s=Se(()=>{if(o||typeof window>"u"||typeof window.ResizeObserver>"u")return;let{ResizeObserver:i}=window;return new i(a)},[o]);return Ne(()=>()=>s==null?void 0:s.disconnect(),[s]),s}function zp(t){return new To(Kr(t),t)}function Di(t,r,o){if(r===void 0)r=zp;let[a,s]=jt(null);function i(){s((d)=>{if(!t)return null;if(t.isConnected===!1){var u;return(u=d!=null?d:o)!=null?u:null}let b=r(t);if(JSON.stringify(d)===JSON.stringify(b))return d;return b})}let l=_p({callback(d){if(!t)return;for(let u of d){let{type:b,target:x}=u;if(b==="childList"&&x instanceof HTMLElement&&x.contains(t)){i();break}}}}),c=Lo({callback:i});return At(()=>{if(i(),t)c==null||c.observe(t),l==null||l.observe(document.body,{childList:!0,subtree:!0});else c==null||c.disconnect(),l==null||l.disconnect()},[t]),a}function $p(t){let r=qi(t);return zi(t,r)}var Ei=[];function jp(t){let r=Ae(t),o=xn((a)=>{if(!t)return Ei;if(a&&a!==Ei&&t&&r.current&&t.parentNode===r.current.parentNode)return a;return $n(t)},[t]);return Ne(()=>{r.current=t},[t]),o}function Jp(t){let[r,o]=jt(null),a=Ae(t),s=Jt((i)=>{let l=va(i.target);if(!l)return;o((c)=>{if(!c)return null;return c.set(l,ya(l)),new Map(c)})},[]);return Ne(()=>{let i=a.current;if(t!==i){l(i);let c=t.map((d)=>{let u=va(d);if(u)return u.addEventListener("scroll",s,{passive:!0}),[u,ya(u)];return null}).filter((d)=>d!=null);o(c.length?new Map(c):null),a.current=t}return()=>{l(t),l(i)};function l(c){c.forEach((d)=>{let u=va(d);u==null||u.removeEventListener("scroll",s)})}},[s,t]),Se(()=>{if(t.length)return r?Array.from(r.values()).reduce((i,l)=>Wr(i,l),Xt):Xi(t);return Xt},[t,r])}function Mi(t,r){if(r===void 0)r=[];let o=Ae(null);return Ne(()=>{o.current=null},r),Ne(()=>{let a=t!==Xt;if(a&&!o.current)o.current=t;if(!a&&o.current)o.current=null},[t]),o.current?Xr(t,o.current):Xt}function Gp(t){Ne(()=>{if(!Hn)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 Wp(t,r){return Se(()=>t.reduce((o,a)=>{let{eventName:s,handler:i}=a;return o[s]=(l)=>{i(l,r)},o},{}),[t,r])}function Zi(t){return Se(()=>t?hp(t):null,[t])}var Ii=[];function Xp(t,r){if(r===void 0)r=Kr;let[o]=t,a=Zi(o?Fe(o):null),[s,i]=jt(Ii);function l(){i(()=>{if(!t.length)return Ii;return t.map((d)=>Gi(d)?a:new To(r(d),d))})}let c=Lo({callback:l});return At(()=>{c==null||c.disconnect(),l(),t.forEach((d)=>c==null?void 0:c.observe(d))},[t]),s}function Up(t){if(!t)return null;if(t.children.length>1)return t;let r=t.children[0];return vn(r)?r:t}function Kp(t){let{measure:r}=t,[o,a]=jt(null),s=Jt((u)=>{for(let{target:b}of u)if(vn(b)){a((x)=>{let C=r(b);return x?{...x,width:C.width,height:C.height}:C});break}},[r]),i=Lo({callback:s}),l=Jt((u)=>{let b=Up(u);if(i==null||i.disconnect(),b)i==null||i.observe(b);a(b?r(b):null)},[r,i]),[c,d]=Vn(l);return Se(()=>({nodeRef:c,rect:o,setRef:d}),[o,c,d])}var Yp=[{sensor:Jn,options:{}},{sensor:jn,options:{}}],qp={current:{}},Co={draggable:{measure:Si},droppable:{measure:Si,strategy:_n.WhileDragging,frequency:Na.Optimized},dragOverlay:{measure:Kr}};class wn 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 Zp={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new wn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:So},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Co,measureDroppableContainers:So,windowRect:null,measuringScheduled:!1},Qp={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:So,draggableNodes:new Map,over:null,measureDroppableContainers:So},Do=zn(Qp),Qi=zn(Zp);function em(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new wn}}}function tm(t,r){switch(r.type){case Ce.DragStart:return{...t,draggable:{...t.draggable,initialCoordinates:r.initialCoordinates,active:r.active}};case Ce.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 Ce.DragEnd:case Ce.DragCancel:return{...t,draggable:{...t.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ce.RegisterDroppable:{let{element:o}=r,{id:a}=o,s=new wn(t.droppable.containers);return s.set(a,o),{...t,droppable:{...t.droppable,containers:s}}}case Ce.SetDroppableDisabled:{let{id:o,key:a,disabled:s}=r,i=t.droppable.containers.get(o);if(!i||a!==i.key)return t;let l=new wn(t.droppable.containers);return l.set(o,{...i,disabled:s}),{...t,droppable:{...t.droppable,containers:l}}}case Ce.UnregisterDroppable:{let{id:o,key:a}=r,s=t.droppable.containers.get(o);if(!s||a!==s.key)return t;let i=new wn(t.droppable.containers);return i.delete(o),{...t,droppable:{...t.droppable,containers:i}}}default:return t}}function rm(t){let{disabled:r}=t,{active:o,activatorEvent:a,draggableNodes:s}=Nn(Do),i=wo(a),l=wo(o==null?void 0:o.id);return Ne(()=>{if(r)return;if(!a&&i&&l!=null){if(!Bn(i))return;if(document.activeElement===i.target)return;let c=s.get(l);if(!c)return;let{activatorNode:d,node:u}=c;if(!d.current&&!u.current)return;requestAnimationFrame(()=>{for(let b of[d.current,u.current]){if(!b)continue;let x=hi(b);if(x){x.focus();break}}})}},[a,r,s,l,i]),null}function nm(t,r){let{transform:o,...a}=r;return t!=null&&t.length?t.reduce((s,i)=>i({transform:s,...a}),o):o}function om(t){return Se(()=>({draggable:{...Co.draggable,...t==null?void 0:t.draggable},droppable:{...Co.droppable,...t==null?void 0:t.droppable},dragOverlay:{...Co.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:o,initialRect:a,config:s=!0}=t,i=Ae(!1),{x:l,y:c}=typeof s==="boolean"?{x:s,y:s}:s;At(()=>{if(!l&&!c||!r){i.current=!1;return}if(i.current||!a)return;let u=r==null?void 0:r.node.current;if(!u||u.isConnected===!1)return;let b=o(u),x=zi(b,a);if(!l)x.x=0;if(!c)x.y=0;if(i.current=!0,Math.abs(x.x)>0||Math.abs(x.y)>0){let C=$i(u);if(C)C.scrollBy({top:x.y,left:x.x})}},[r,l,c,a,o])}var el=zn({...Xt,scaleX:1,scaleY:1}),Mr;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Initializing=1]="Initializing",t[t.Initialized=2]="Initialized"})(Mr||(Mr={}));var tl=tp(function(r){var o,a,s,i;let{id:l,accessibility:c,autoScroll:d=!0,children:u,sensors:b=Yp,collisionDetection:x=up,measuring:C,modifiers:E,...P}=r,O=rp(tm,void 0,em),[X,j]=O,[H,V]=ap(),[J,K]=jt(Mr.Uninitialized),_=J===Mr.Initialized,{draggable:{active:W,nodes:U,translate:te},droppable:{containers:q}}=X,de=W!=null?U.get(W):null,Re=Ae({initial:null,translated:null}),ye=Se(()=>{var He;return W!=null?{id:W,data:(He=de==null?void 0:de.data)!=null?He:qp,rect:Re}:null},[W,de]),Pe=Ae(null),[Oe,Ve]=jt(null),[he,Je]=jt(null),we=hn(P,Object.values(P)),Be=Jr("DndDescribedBy",l),Q=Se(()=>q.getEnabled(),[q]),ce=om(C),{droppableRects:se,measureDroppableContainers:Te,measuringScheduled:Ue}=Bp(Q,{dragging:_,dependencies:[te.x,te.y],config:ce.droppable}),ke=Hp(U,W),hr=Se(()=>he?No(he):null,[he]),Z=ac(),et=Fp(ke,ce.draggable.measure);am({activeNode:W!=null?U.get(W):null,config:Z.layoutShiftCompensation,initialRect:et,measure:ce.draggable.measure});let ge=Di(ke,ce.draggable.measure,et),Pn=Di(ke?ke.parentElement:null),nr=Ae({activatorEvent:null,active:null,activeNode:ke,collisionRect:null,collisions:null,droppableRects:se,draggableNodes:U,draggingNode:null,draggingNodeRect:null,droppableContainers:q,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),en=q.getNodeFor((o=nr.current.over)==null?void 0:o.id),ur=Kp({measure:ce.dragOverlay.measure}),tn=(a=ur.nodeRef.current)!=null?a:ke,rn=_?(s=ur.rect)!=null?s:ge:null,Va=Boolean(ur.nodeRef.current&&ur.rect),Ba=$p(Va?null:ge),Wo=Zi(tn?Fe(tn):null),yr=jp(_?en!=null?en:ke:null),Kn=Xp(yr),Yn=nm(E,{transform:{x:te.x-Ba.x,y:te.y-Ba.y,scaleX:1,scaleY:1},activatorEvent:he,active:ye,activeNodeRect:ge,containerNodeRect:Pn,draggingNodeRect:rn,over:nr.current.over,overlayNodeRect:ur.rect,scrollableAncestors:yr,scrollableAncestorRects:Kn,windowRect:Wo}),Fa=hr?Wr(hr,te):null,_a=Jp(yr),Zl=Mi(_a),Ql=Mi(_a,[ge]),nn=Wr(Yn,Zl),on=rn?fp(rn,Yn):null,Tn=ye&&on?x({active:ye,collisionRect:on,droppableRects:se,droppableContainers:Q,pointerCoordinates:Fa}):null,za=Ca(Tn,"id"),[wr,$a]=jt(null),ec=Va?Yn:Wr(Yn,Ql),tc=pp(ec,(i=wr==null?void 0:wr.rect)!=null?i:null,ge),Xo=Ae(null),ja=Jt((He,tt)=>{let{sensor:bt,options:Nr}=tt;if(Pe.current==null)return;let Dt=U.get(Pe.current);if(!Dt)return;let vt=He.nativeEvent,or=new bt({active:Pe.current,activeNode:Dt,event:vt,options:Nr,context:nr,onAbort(Me){if(!U.get(Me))return;let{onDragAbort:ar}=we.current,pr={id:Me};ar==null||ar(pr),H({type:"onDragAbort",event:pr})},onPending(Me,Rr,ar,pr){if(!U.get(Me))return;let{onDragPending:Ln}=we.current,Cr={id:Me,constraint:Rr,initialCoordinates:ar,offset:pr};Ln==null||Ln(Cr),H({type:"onDragPending",event:Cr})},onStart(Me){let Rr=Pe.current;if(Rr==null)return;let ar=U.get(Rr);if(!ar)return;let{onDragStart:pr}=we.current,kn={activatorEvent:vt,active:{id:Rr,data:ar.data,rect:Re}};Ro(()=>{pr==null||pr(kn),K(Mr.Initializing),j({type:Ce.DragStart,initialCoordinates:Me,active:Rr}),H({type:"onDragStart",event:kn}),Ve(Xo.current),Je(vt)})},onMove(Me){j({type:Ce.DragMove,coordinates:Me})},onEnd:an(Ce.DragEnd),onCancel:an(Ce.DragCancel)});Xo.current=or;function an(Me){return async function(){let{active:ar,collisions:pr,over:kn,scrollAdjustedTranslate:Ln}=nr.current,Cr=null;if(ar&&Ln){let{cancelDrop:Dn}=we.current;if(Cr={activatorEvent:vt,active:ar,collisions:pr,delta:Ln,over:kn},Me===Ce.DragEnd&&typeof Dn==="function"){if(await Promise.resolve(Dn(Cr)))Me=Ce.DragCancel}}Pe.current=null,Ro(()=>{j({type:Me}),K(Mr.Uninitialized),$a(null),Ve(null),Je(null),Xo.current=null;let Dn=Me===Ce.DragEnd?"onDragEnd":"onDragCancel";if(Cr){let Uo=we.current[Dn];Uo==null||Uo(Cr),H({type:Dn,event:Cr})}})}}},[U]),rc=Jt((He,tt)=>(bt,Nr)=>{let Dt=bt.nativeEvent,vt=U.get(Nr);if(Pe.current!==null||!vt||Dt.dndKit||Dt.defaultPrevented)return;let or={active:vt};if(He(bt,tt.options,or)===!0)Dt.dndKit={capturedBy:tt.sensor},Pe.current=Nr,ja(bt,tt)},[U,ja]),Ja=Vp(b,rc);Gp(b),At(()=>{if(ge&&J===Mr.Initializing)K(Mr.Initialized)},[ge,J]),Ne(()=>{let{onDragMove:He}=we.current,{active:tt,activatorEvent:bt,collisions:Nr,over:Dt}=nr.current;if(!tt||!bt)return;let vt={active:tt,activatorEvent:bt,collisions:Nr,delta:{x:nn.x,y:nn.y},over:Dt};Ro(()=>{He==null||He(vt),H({type:"onDragMove",event:vt})})},[nn.x,nn.y]),Ne(()=>{let{active:He,activatorEvent:tt,collisions:bt,droppableContainers:Nr,scrollAdjustedTranslate:Dt}=nr.current;if(!He||Pe.current==null||!tt||!Dt)return;let{onDragOver:vt}=we.current,or=Nr.get(za),an=or&&or.rect.current?{id:or.id,rect:or.rect.current,data:or.data,disabled:or.disabled}:null,Me={active:He,activatorEvent:tt,collisions:bt,delta:{x:Dt.x,y:Dt.y},over:an};Ro(()=>{$a(an),vt==null||vt(Me),H({type:"onDragOver",event:Me})})},[za]),At(()=>{nr.current={activatorEvent:he,active:ye,activeNode:ke,collisionRect:on,collisions:Tn,droppableRects:se,draggableNodes:U,draggingNode:tn,draggingNodeRect:rn,droppableContainers:q,over:wr,scrollableAncestors:yr,scrollAdjustedTranslate:nn},Re.current={initial:rn,translated:on}},[ye,ke,Tn,on,U,tn,rn,se,q,wr,yr,nn]),Ip({...Z,delta:te,draggingRect:on,pointerCoordinates:Fa,scrollableAncestors:yr,scrollableAncestorRects:Kn});let nc=Se(()=>({active:ye,activeNode:ke,activeNodeRect:ge,activatorEvent:he,collisions:Tn,containerNodeRect:Pn,dragOverlay:ur,draggableNodes:U,droppableContainers:q,droppableRects:se,over:wr,measureDroppableContainers:Te,scrollableAncestors:yr,scrollableAncestorRects:Kn,measuringConfiguration:ce,measuringScheduled:Ue,windowRect:Wo}),[ye,ke,ge,he,Tn,Pn,ur,U,q,se,wr,Te,yr,Kn,ce,Ue,Wo]),oc=Se(()=>({activatorEvent:he,activators:Ja,active:ye,activeNodeRect:ge,ariaDescribedById:{draggable:Be},dispatch:j,draggableNodes:U,over:wr,measureDroppableContainers:Te}),[he,Ja,ye,ge,j,Be,U,wr,Te]);return ir.createElement(Oi.Provider,{value:V},ir.createElement(Do.Provider,{value:oc},ir.createElement(Qi.Provider,{value:nc},ir.createElement(el.Provider,{value:tc},u)),ir.createElement(rm,{disabled:(c==null?void 0:c.restoreFocus)===!1})),ir.createElement(lp,{...c,hiddenTextDescribedById:Be}));function ac(){let He=(Oe==null?void 0:Oe.autoScrollEnabled)===!1,tt=typeof d==="object"?d.enabled===!1:d===!1,bt=_&&!He&&!tt;if(typeof d==="object")return{...d,enabled:bt};return{enabled:bt}}}),sm=zn(null),Ai="button",im="Draggable";function rl(t){let{id:r,data:o,disabled:a=!1,attributes:s}=t,i=Jr(im),{activators:l,activatorEvent:c,active:d,activeNodeRect:u,ariaDescribedById:b,draggableNodes:x,over:C}=Nn(Do),{role:E=Ai,roleDescription:P="draggable",tabIndex:O=0}=s!=null?s:{},X=(d==null?void 0:d.id)===r,j=Nn(X?el:sm),[H,V]=Vn(),[J,K]=Vn(),_=Wp(l,r),W=hn(o);At(()=>(x.set(r,{id:r,key:i,node:H,activatorNode:J,data:W}),()=>{let te=x.get(r);if(te&&te.key===i)x.delete(r)}),[x,r]);let U=Se(()=>({role:E,tabIndex:O,"aria-disabled":a,"aria-pressed":X&&E===Ai?!0:void 0,"aria-roledescription":P,"aria-describedby":b.draggable}),[a,E,O,X,P,b.draggable]);return{active:d,activatorEvent:c,activeNodeRect:u,attributes:U,isDragging:X,listeners:a?void 0:_,node:H,over:C,setNodeRef:V,setActivatorNodeRef:K,transform:j}}function nl(){return Nn(Qi)}var lm="Droppable",cm={timeout:25};function ol(t){let{data:r,disabled:o=!1,id:a,resizeObserverConfig:s}=t,i=Jr(lm),{active:l,dispatch:c,over:d,measureDroppableContainers:u}=Nn(Do),b=Ae({disabled:o}),x=Ae(!1),C=Ae(null),E=Ae(null),{disabled:P,updateMeasurementsFor:O,timeout:X}={...cm,...s},j=hn(O!=null?O:a),H=Jt(()=>{if(!x.current){x.current=!0;return}if(E.current!=null)clearTimeout(E.current);E.current=setTimeout(()=>{u(Array.isArray(j.current)?j.current:[j.current]),E.current=null},X)},[X]),V=Lo({callback:H,disabled:P||!l}),J=Jt((U,te)=>{if(!V)return;if(te)V.unobserve(te),x.current=!1;if(U)V.observe(U)},[V]),[K,_]=Vn(J),W=hn(r);return Ne(()=>{if(!V||!K.current)return;V.disconnect(),x.current=!1,V.observe(K.current)},[K,V]),Ne(()=>(c({type:Ce.RegisterDroppable,element:{id:a,key:i,disabled:o,node:K,rect:C,data:W}}),()=>c({type:Ce.UnregisterDroppable,key:i,id:a})),[a]),Ne(()=>{if(o!==b.current.disabled)c({type:Ce.SetDroppableDisabled,id:a,key:i,disabled:o}),b.current.disabled=o},[a,i,o,c]),{active:l,rect:C,isOver:(d==null?void 0:d.id)===a,node:K,over:d,setNodeRef:_}}import al,{useMemo as Io,useRef as Sa,useEffect as Ao,useState as dm,useContext as um}from"react";function Ho(t,r,o){let a=t.slice();return a.splice(o<0?a.length+o:o,0,a.splice(r,1)[0]),a}function pm(t,r){return t.reduce((o,a,s)=>{let i=r.get(a);if(i)o[s]=i;return o},Array(t.length))}function Eo(t){return t!==null&&t>=0}function mm(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 fm(t){if(typeof t==="boolean")return{draggable:t,droppable:t};return t}var sl=(t)=>{let{rects:r,activeIndex:o,overIndex:a,index:s}=t,i=Ho(r,a,o),l=r[s],c=i[s];if(!c||!l)return null;return{x:c.left-l.left,y:c.top-l.top,scaleX:c.width/l.width,scaleY:c.height/l.height}};var Mo={scaleX:1,scaleY:1},il=(t)=>{var r;let{activeIndex:o,activeNodeRect:a,index:s,rects:i,overIndex:l}=t,c=(r=i[o])!=null?r:a;if(!c)return null;if(s===o){let u=i[l];if(!u)return null;return{x:0,y:o<l?u.top+u.height-(c.top+c.height):u.top-c.top,...Mo}}let d=gm(i,s,o);if(s>o&&s<=l)return{x:0,y:-c.height-d,...Mo};if(s<o&&s>=l)return{x:0,y:c.height+d,...Mo};return{x:0,y:0,...Mo}};function gm(t,r,o){let a=t[r],s=t[r-1],i=t[r+1];if(!a)return 0;if(o<r)return s?a.top-(s.top+s.height):i?i.top-(a.top+a.height):0;return i?i.top-(a.top+a.height):s?a.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:o,items:a,strategy:s=sl,disabled:i=!1}=t,{active:l,dragOverlay:c,droppableRects:d,over:u,measureDroppableContainers:b}=nl(),x=Jr(ll,o),C=Boolean(c.rect!==null),E=Io(()=>a.map((_)=>typeof _==="object"&&("id"in _)?_.id:_),[a]),P=l!=null,O=l?E.indexOf(l.id):-1,X=u?E.indexOf(u.id):-1,j=Sa(E),H=!mm(E,j.current),V=X!==-1&&O===-1||H,J=fm(i);At(()=>{if(H&&P)b(E)},[H,E,P,b]),Ao(()=>{j.current=E},[E]);let K=Io(()=>({activeIndex:O,containerId:x,disabled:J,disableTransforms:V,items:E,overIndex:X,useDragOverlay:C,sortedRects:pm(E,d),strategy:s}),[O,x,J.draggable,J.droppable,V,E,X,d,C,s]);return al.createElement(cl.Provider,{value:K},r)}var bm=(t)=>{let{id:r,items:o,activeIndex:a,overIndex:s}=t;return Ho(o,a,s).indexOf(r)},vm=(t)=>{let{containerId:r,isSorting:o,wasDragging:a,index:s,items:i,newIndex:l,previousItems:c,previousContainerId:d,transition:u}=t;if(!u||!a)return!1;if(c!==i&&s===l)return!1;if(o)return!0;return l!==s&&r===d},hm={duration:200,easing:"ease"},ul="transform",xm=Er.Transition.toString({property:ul,duration:0,easing:"linear"}),ym={roleDescription:"sortable"};function wm(t){let{disabled:r,index:o,node:a,rect:s}=t,[i,l]=dm(null),c=Sa(o);return At(()=>{if(!r&&o!==c.current&&a.current){let d=s.current;if(d){let u=Kr(a.current,{ignoreTransform:!0}),b={x:d.left-u.left,y:d.top-u.top,scaleX:d.width/u.width,scaleY:d.height/u.height};if(b.x||b.y)l(b)}}if(o!==c.current)c.current=o},[r,o,a,s]),Ao(()=>{if(i)l(null)},[i]),i}function pl(t){let{animateLayoutChanges:r=vm,attributes:o,disabled:a,data:s,getNewIndex:i=bm,id:l,strategy:c,resizeObserverConfig:d,transition:u=hm}=t,{items:b,containerId:x,activeIndex:C,disabled:E,disableTransforms:P,sortedRects:O,overIndex:X,useDragOverlay:j,strategy:H}=um(cl),V=Nm(a,E),J=b.indexOf(l),K=Io(()=>({sortable:{containerId:x,index:J,items:b},...s}),[x,s,J,b]),_=Io(()=>b.slice(b.indexOf(l)),[b,l]),{rect:W,node:U,isOver:te,setNodeRef:q}=ol({id:l,data:K,disabled:V.droppable,resizeObserverConfig:{updateMeasurementsFor:_,...d}}),{active:de,activatorEvent:Re,activeNodeRect:ye,attributes:Pe,setNodeRef:Oe,listeners:Ve,isDragging:he,over:Je,setActivatorNodeRef:we,transform:Be}=rl({id:l,data:K,attributes:{...ym,...o},disabled:V.draggable}),Q=gi(q,Oe),ce=Boolean(de),se=ce&&!P&&Eo(C)&&Eo(X),Te=!j&&he,Ue=Te&&se?Be:null,ke=c!=null?c:H,hr=se?Ue!=null?Ue:ke({rects:O,activeNodeRect:ye,activeIndex:C,overIndex:X,index:J}):null,Z=Eo(C)&&Eo(X)?i({id:l,items:b,activeIndex:C,overIndex:X}):J,et=de==null?void 0:de.id,ge=Sa({activeId:et,items:b,newIndex:Z,containerId:x}),Pn=b!==ge.current.items,nr=r({active:de,containerId:x,isDragging:he,isSorting:ce,id:l,index:J,items:b,newIndex:ge.current.newIndex,previousItems:ge.current.items,previousContainerId:ge.current.containerId,transition:u,wasDragging:ge.current.activeId!=null}),en=wm({disabled:!nr,index:J,node:U,rect:W});return Ao(()=>{if(ce&&ge.current.newIndex!==Z)ge.current.newIndex=Z;if(x!==ge.current.containerId)ge.current.containerId=x;if(b!==ge.current.items)ge.current.items=b},[ce,Z,x,b]),Ao(()=>{if(et===ge.current.activeId)return;if(et!=null&&ge.current.activeId==null){ge.current.activeId=et;return}let tn=setTimeout(()=>{ge.current.activeId=et},50);return()=>clearTimeout(tn)},[et]),{active:de,activeIndex:C,attributes:Pe,data:K,rect:W,index:J,newIndex:Z,items:b,isOver:te,isSorting:ce,isDragging:he,listeners:Ve,node:U,overIndex:X,over:Je,setNodeRef:Q,setActivatorNodeRef:we,setDroppableNodeRef:q,setDraggableNodeRef:Oe,transform:en!=null?en:hr,transition:ur()};function ur(){if(en||Pn&&ge.current.newIndex===J)return xm;if(Te&&!Bn(Re)||!u)return;if(ce||nr)return Er.Transition.toString({...u,property:ul});return}}function Nm(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 Oo(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=[ee.Down,ee.Right,ee.Up,ee.Left],ml=(t,r)=>{let{context:{active:o,collisionRect:a,droppableRects:s,droppableContainers:i,over:l,scrollableAncestors:c}}=r;if(Rm.includes(t.code)){if(t.preventDefault(),!o||!a)return;let d=[];i.getEnabled().forEach((x)=>{if(!x||x!=null&&x.disabled)return;let C=s.get(x.id);if(!C)return;switch(t.code){case ee.Down:if(a.top<C.top)d.push(x);break;case ee.Up:if(a.top>C.top)d.push(x);break;case ee.Left:if(a.left>C.left)d.push(x);break;case ee.Right:if(a.left<C.left)d.push(x);break}});let u=_i({active:o,collisionRect:a,droppableRects:s,droppableContainers:d,pointerCoordinates:null}),b=Ca(u,"id");if(b===(l==null?void 0:l.id)&&u.length>1)b=u[1].id;if(b!=null){let x=i.get(o.id),C=i.get(b),E=C?s.get(C.id):null,P=C==null?void 0:C.node.current;if(P&&E&&x&&C){let X=$n(P).some((_,W)=>c[W]!==_),j=fl(x,C),H=Cm(x,C),V=X||!j?{x:0,y:0}:{x:H?a.width-E.width:0,y:H?a.height-E.height:0},J={x:E.left,y:E.top};return V.x&&V.y?J:Xr(J,V)}}}return};function fl(t,r){if(!Oo(t)||!Oo(r))return!1;return t.data.current.sortable.containerId===r.data.current.sortable.containerId}function Cm(t,r){if(!Oo(t)||!Oo(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 Ir,Fragment as km}from"react/jsx-runtime";var Pm=({id:t,label:r,children:o})=>{let{attributes:a,listeners:s,setNodeRef:i,transform:l,transition:c,isDragging:d}=pl({id:t}),u={opacity:d?0.5:1,position:"relative",transform:Er.Transform.toString(l),transition:c,zIndex:d?10:"auto"},b=Ir("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:Ir(Lt,{className:"h-3.5 w-3.5"})});return Ir("div",{ref:i,style:u,children:o(b)})},Tm=({items:t,onReorder:r,getItemLabel:o,renderItem:a,disabled:s=!1})=>{let i=Hi(Ra(Jn,{activationConstraint:{distance:4}}),Ra(jn,{coordinateGetter:ml})),l=(c)=>{let{active:d,over:u}=c;if(!u||d.id===u.id)return;let b=t.findIndex((C)=>C.id===d.id),x=t.findIndex((C)=>C.id===u.id);if(b===-1||x===-1)return;r(Ho(t,b,x))};if(s)return t.map((c)=>Ir(Sm,{children:a(c,null)},c.id));return Ir(tl,{sensors:i,collisionDetection:Fi,onDragEnd:l,children:Ir(dl,{items:t.map((c)=>c.id),strategy:il,children:t.map((c)=>Ir(Pm,{id:c.id,label:o?.(c),children:(d)=>Ir(km,{children:a(c,d)})},c.id))})})},Lm=Tm;import*as gl from"react";import{jsx as Gn,jsxs as Pa}from"react/jsx-runtime";var bl=({open:t,onOpenChange:r,title:o,description:a,confirmLabel:s,cancelLabel:i="Cancel",confirmVariant:l="default",pendingLabel:c="Processing...",errorContent:d,keepOpenWhilePending:u=!1,onConfirm:b})=>{let[x,C]=gl.useState(!1),E=async()=>{C(!0);try{if(await b()!==!1)r(!1)}catch(P){throw C(!1),P}C(!1)};return Gn(w,{open:t,onOpenChange:(P)=>{if(!(u&&x))r(P)},children:Pa(R,{children:[Pa(k,{children:[Gn(L,{children:o}),Gn(N,{children:a})]}),d,Pa(pt,{children:[Gn(n,{variant:"outline",onClick:()=>{r(!1)},disabled:x,children:i}),Gn(n,{variant:l,onClick:()=>{E()},disabled:x,children:x?c:s})]})]})})};bl.displayName="ConfirmDialog";var Dm=bl;import*as hl from"react";import{jsx as Vo,jsxs as vl}from"react/jsx-runtime";var xl=hl.forwardRef(function({step:r,total:o,title:a,helper:s,action:i,className:l,...c},d){let u=Boolean(i);return vl("div",{ref:d,className:e("flex flex-wrap items-start justify-between gap-4",l),...c,children:[vl("div",{className:"min-w-0 space-y-1.5",children:[Vo(ln,{tone:"accent",className:"tracking-[0.16em]",children:`Step ${r} of ${o}`}),Vo("h2",{className:"text-lg font-semibold tracking-tight",children:a}),Vo("p",{className:"max-w-xl text-sm leading-relaxed text-muted-foreground",children:s})]}),u?Vo("div",{className:"shrink-0",children:i}):null]})});xl.displayName="StageHeader";var Em=xl;import{jsx as Ar,jsxs as Ta}from"react/jsx-runtime";var Mm=p("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=p("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)"}}}),Bo=(t)=>t!==null&&t!==void 0&&t!==!1&&t!==0&&t!==0n&&t!==""&&!Number.isNaN(t),yl=({variant:t="tile",icon:r,label:o,value:a,detail:s,tone:i,className:l,...c})=>{if(t==="compact")return Ta(fe,{className:e("gap-1 px-4 py-3.5",l),...c,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}),Bo(r)?Ar("span",{className:e(Im({tone:i})),"aria-hidden":!0,children:r}):null]}),Ar("span",{className:"text-[22px] font-semibold leading-none tabular-nums tracking-tight text-(--text-primary)",children:a}),Bo(s)?Ar("span",{className:"text-xs text-(--text-muted)",children:s}):null]});return Ta(fe,{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))]",l),...c,children:[Bo(r)?Ar("span",{className:e(Mm({tone:i})),"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}),Bo(s)?Ar("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:o,className:a,children:s,...i},l)=>{let c="border-border bg-card text-muted-foreground";if(t)c=Om[t];else if(r)c="border-[color-mix(in_oklab,var(--primary)_45%,var(--border))] bg-[color-mix(in_oklab,var(--primary)_8%,var(--card))] text-primary";return Bm("div",{ref:l,className:e("inline-flex items-center gap-2 rounded-full border px-3 py-1 text-[10px] font-semibold uppercase tracking-[0.16em]",c,a),...i,children:[t?wl(qe,{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??o]})},Rl=Nl.forwardRef(Vm);Rl.displayName="StatusPill";var Fm=Rl;import*as _o from"react";import{jsx as Fo,jsxs as $m}from"react/jsx-runtime";var _m=p("relative min-w-0",{defaultVariants:{size:"md",variant:"pill"},variants:{size:{md:"",sm:""},variant:{pill:"",plain:""}}}),zm=p("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:o,clearLabel:a,variant:s,size:i,className:l,classes:c,...d})=>{let[u,b]=_o.useState(r??""),x=t!==void 0,C=x?t:u,E=_o.useRef(null),P=(O)=>{if(!x)b(O);o?.(O)};return $m("div",{className:e(_m({size:i,variant:s}),c?.root,l),children:[Fo(We,{"aria-hidden":!0,className:e("pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground",c?.icon)}),Fo(f,{ref:E,type:"search",value:C,onChange:(O)=>{P(O.target.value)},className:e(zm({size:i,variant:s}),C!==void 0&&C!==""&&a!==void 0?"pr-9":void 0,c?.input),...d}),C!==void 0&&C!==""&&a!==void 0?Fo("button",{type:"button","aria-label":a,onClick:()=>{P(""),E.current?.focus()},className:e("absolute right-2.5 top-1/2 flex size-5 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-(--bg-surface-alt) hover:text-(--text-primary) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",c?.clear),children:Fo(S,{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 zo,jsxs as Zm}from"react/jsx-runtime";var ka=Jm(null),Um=({children:t})=>{let[r,o]=Wm(null),a=Gm(()=>({container:r,setContainer:o}),[r]);return zo(ka.Provider,{value:a,children:t})},Pl=({className:t})=>{let r=Sl(ka);return zo("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:zo("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,zo(Pl,{})]});import{jsx as $o,jsxs as Tl}from"react/jsx-runtime";var kl=({title:t,description:r,value:o,options:a,onValueChange:s,align:i="center",className:l,...c})=>Tl("section",{className:e("flex min-w-0 flex-col gap-3 sm:flex-row sm:justify-between",i==="center"?"sm:items-center":"sm:items-start",l),...c,children:[Tl("div",{className:"min-w-0",children:[$o("h3",{className:"truncate text-sm font-semibold",children:t}),r!==void 0&&r!==null&&r!==!1&&r!==""&&r!==0?$o("p",{className:"mt-1 text-sm text-muted-foreground",children:r}):null]}),$o("div",{className:"inline-flex shrink-0 rounded-md border border-border bg-background p-1 shadow-xs",children:a.map((d)=>$o(n,{type:"button",size:"sm",variant:d.value===o?"secondary":"ghost",disabled:d.disabled,className:e("h-8 rounded-sm px-3",d.value===o&&"bg-primary/10 text-primary hover:bg-primary/15"),"aria-label":d.ariaLabel,"aria-pressed":d.value===o,onClick:()=>{s(d.value)},children:d.label},d.value))})]});kl.displayName="SectionSwitcher";import*as lr from"react";import{jsx as Ut}from"react/jsx-runtime";var Ll=lr.createContext({value:1}),La=()=>lr.useContext(Ll),Qm=({value:t,defaultValue:r=1,indicators:o,className:a,...s})=>{let i=t??r,l=lr.useMemo(()=>({indicators:o,value:i}),[i,o]);return Ut(Ll.Provider,{value:l,children:Ut("div",{"data-slot":"stepper",className:e("space-y-8",a),...s})})},ef=({className:t,...r})=>Ut("nav",{"data-slot":"stepper-nav","data-orientation":"horizontal",className:e("group/stepper-nav flex items-start justify-between gap-2",t),...r}),Da=lr.createContext({state:"inactive",step:1}),tf=({step:t,loading:r,className:o,...a})=>{let{value:s}=La(),i="inactive";if(r===!0)i="loading";else if(t<s)i="completed";else if(t===s)i="active";let l=lr.useMemo(()=>({state:i,step:t}),[i,t]);return Ut(Da.Provider,{value:l,children:Ut("div",{"data-slot":"stepper-item","data-state":i,"data-step":t,className:e("group/step relative flex-1 items-start",o),...a})})},rf=({className:t,...r})=>Ut("div",{"data-slot":"stepper-trigger",className:e("flex flex-col items-center gap-2.5",t),...r}),nf=({className:t,children:r,...o})=>{let{indicators:a}=La(),{state:s}=lr.useContext(Da),i=a?.completed,l=a?.loading,c=r;if(s==="completed"&&Boolean(i))c=i;else if(s==="loading"&&Boolean(l))c=l;return Ut("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:c})},of=({className:t,...r})=>{let{state:o}=lr.useContext(Da);return Ut("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})},af=({className:t,...r})=>Ut("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})=>Ut("div",{"data-slot":"stepper-panel",className:e(t),...r}),lf=({value:t,className:r,...o})=>{let{value:a}=La();if(t!==a)return null;return Ut("div",{"data-slot":"stepper-content",className:e(r),...o})};import*as qr from"react";import{jsx as Yr,jsxs as pf}from"react/jsx-runtime";var Ea=qr.createContext({}),cf=({className:t,size:r,variant:o,...a})=>{let s=qr.useMemo(()=>({size:r,variant:o}),[r,o]);return Yr(Ea.Provider,{value:s,children:Yr("fieldset",{"data-slot":"split-button",className:e("inline-flex min-w-0 items-stretch",t),...a})})},df=({className:t,...r})=>{let{size:o,variant:a}=qr.useContext(Ea);return Yr(n,{"data-slot":"split-button-action",className:e("rounded-r-none",t),size:o,variant:a,...r})},uf=({align:t="end",children:r,contentClassName:o,disabled:a,label:s,...i})=>{let{size:l,variant:c}=qr.useContext(Ea);return pf(mt,{...i,children:[Yr(ht,{asChild:!0,children:Yr(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:l,variant:c,children:Yr(g,{})})}),Yr(gt,{align:t,className:o,children:r})]})};import*as Rn from"react";import{jsx as cr,jsxs as jo}from"react/jsx-runtime";var mf=({items:t,title:r,triggerAriaLabel:o="Technical details",copyLabel:a="Copy",trigger:s,align:i="end",side:l="bottom",onCopy:c,className:d,classes:u})=>{let[b,x]=Rn.useState(null),C=Rn.useRef(null);Rn.useEffect(()=>()=>{if(C.current!==null)window.clearTimeout(C.current)},[]);let E=(P)=>{if(navigator.clipboard.writeText(P.value),x(P.label),C.current!==null)window.clearTimeout(C.current);C.current=window.setTimeout(()=>{x(null)},1500),c?.(P)};return jo(M,{children:[cr(A,{asChild:!0,children:s??cr(n,{type:"button",variant:"ghost",size:"icon","aria-label":o,className:e("h-8 w-8 text-muted-foreground hover:text-foreground",u?.root,u?.trigger,d),children:cr(Vr,{className:"h-4 w-4"})})}),jo(D,{align:i,side:l,className:e("w-80 p-3",u?.content),children:[r!==void 0&&r!==null?cr("div",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:r}):null,cr("dl",{className:"space-y-2.5",children:t.map((P)=>jo("div",{className:e("min-w-0",u?.row),children:[cr("dt",{className:e("text-[11px] font-medium text-muted-foreground",u?.label),children:P.label}),jo("dd",{className:"mt-0.5 flex min-w-0 items-start gap-1",children:[cr("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",u?.value),children:P.value}),P.copyable===!1?null:cr(n,{type:"button",variant:"ghost",size:"icon","aria-label":`${a} ${P.label}`,className:"h-6 w-6 shrink-0 text-muted-foreground hover:text-foreground",onClick:()=>{E(P)},children:b===P.label?cr(m,{className:"h-3.5 w-3.5"}):cr(ue,{className:"h-3.5 w-3.5"})})]})]},P.label))})]})]})};var ff=mf;import*as Cn from"react";import{jsx as Ee,jsxs as gr,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 o=Ml(r.children);return o.length>0?[{...r,children:o}]:[]}),Il=(t,r=[])=>t.flatMap((o)=>o.children?Il(o.children,[...r,o]):[{ancestorIds:r.map((a)=>a.id),node:o,path:r.map((a)=>a.label).join(" / ")}]),Dl=(t)=>({paddingLeft:`${vf+t*bf}rem`}),Al=Cn.forwardRef(function(r,o){let a={...gf,...r},{nodes:s,value:i,onChange:l,selectedLabel:c,placeholder:d,searchPlaceholder:u,emptyMessage:b,id:x,className:C,width:E,disabled:P,loading:O,loadingMessage:X,onSearchChange:j,modal:H}=a,[V,J]=Cn.useState(!1),[K,_]=Cn.useState(""),[W,U]=Cn.useState(()=>new Set),te=Ml(s),q=Il(te),de=q.find((Q)=>Q.node.id===i),Re=K.trim().toLowerCase(),ye=(Q)=>{if(Q)U(new Set(de?.ancestorIds));else if(K!=="")_(""),j?.("");J(Q)},Pe=(Q)=>{_(Q),j?.(Q)},Oe=(Q)=>{U((ce)=>{let se=new Set(ce);if(!se.delete(Q))se.add(Q);return se})},Ve=(Q)=>{l(Q),ye(!1)},he=(Q)=>gr(El,{children:[Ee(m,{"aria-hidden":!0,className:e(i===Q.id?"opacity-100":"opacity-0")}),Q.icon]}),Je=(Q,ce)=>Q.flatMap((se)=>{if(!hf(se))return[gr(z,{value:se.id,style:Dl(ce),onSelect:()=>{Ve(se.id)},children:[he(se),Ee("span",{className:"min-w-0 truncate",title:se.label,children:se.label})]},se.id)];let Te=W.has(se.id),Ue=Te?Fr:Br;return[gr(z,{value:se.id,"aria-expanded":Te,style:Dl(ce),onSelect:()=>{Oe(se.id)},children:[Ee(v,{"aria-hidden":!0,className:e(Te&&"rotate-90")}),se.icon??Ee(Ue,{"aria-hidden":!0}),Ee("span",{className:"min-w-0 truncate",title:se.label,children:se.label})]},se.id),...Te&&se.children?Je(se.children,ce+1):[]]}),we=Re===""?[]:q.filter((Q)=>j!==void 0||`${Q.path} / ${Q.node.label}`.toLowerCase().includes(Re)),Be=de?.node.label??c;return gr(M,{modal:H,open:V,onOpenChange:ye,children:[Ee(A,{asChild:!0,children:gr(n,{ref:o,id:x,variant:"outline","aria-expanded":V,"aria-busy":O,className:e("justify-between",C),style:{width:E},disabled:P,children:[Be===void 0?Ee("span",{className:"min-w-0 truncate text-muted-foreground",children:d}):Ee("span",{className:"min-w-0 truncate",children:Be}),O?Ee(h,{"aria-hidden":!0,className:"ml-2 size-4 shrink-0 animate-spin text-muted-foreground"}):Ee($e,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),Ee(D,{className:"p-0",style:{width:"var(--radix-popover-trigger-width)"},children:gr(pe,{shouldFilter:!1,children:[Ee(it,{"aria-label":u,placeholder:u,value:K,onValueChange:Pe}),Ee(be,{className:"max-h-[min(300px,calc(var(--radix-popover-content-available-height)-2.5rem))]",children:O?gr("div",{"aria-live":"polite",className:"flex items-center justify-center gap-2 px-3 py-6 text-sm text-muted-foreground",children:[Ee(h,{"aria-hidden":!0,className:"size-4 animate-spin"}),X]}):gr(El,{children:[Ee(st,{children:b}),Ee(oe,{children:Re===""?Je(te,0):we.map((Q)=>gr(z,{value:Q.node.id,onSelect:()=>{Ve(Q.node.id)},children:[he(Q.node),Ee("span",{className:"min-w-0 truncate",title:Q.node.label,children:Q.node.label}),Q.path===""?null:Ee("span",{className:"ml-auto min-w-0 shrink truncate pl-2 text-xs text-muted-foreground",title:Q.path,children:Q.path})]},Q.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:o,monospace:a=!0,className:s,...i},l)=>{let c=r==="secret";return yf("div",{ref:l,className:e("flex min-w-0 items-center gap-2",s),...i,children:[Ol("div",{className:e("flex min-w-0 flex-1 items-center border-b py-2",c?"border-[color-mix(in_oklab,var(--primary)_45%,var(--border))]":"border-border"),children:Ol("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]})},Vl=Hl.forwardRef(xf);Vl.displayName="ValueRow";var wf=Vl;import{forwardRef as Bl,useCallback as Zr,useLayoutEffect as Fl,useId as Nf,useRef as _l,useState as _e}from"react";import{jsx as T,jsxs as Y,Fragment as Wn}from"react/jsx-runtime";var Rf=({mode:t,onModeChange:r,disabled:o})=>Y("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:[T("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)]")}),Y("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:[T(Ge,{className:"h-3 w-3"}),"Linked"]}),Y("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:[T(St,{className:"h-3 w-3"}),"Inline"]})]}),Cf=({variableKey:t,initialValue:r,isSecret:o,loading:a,saving:s,onSubmit:i,onCancel:l})=>{let[c,d]=_e(r),[u,b]=_e(!1),x=_l(null);return Fl(()=>{if(!a)x.current?.focus()},[a]),Y("form",{role:"presentation",onSubmit:(C)=>{C.preventDefault(),i(c)},onKeyDown:(C)=>{if(C.key==="Escape")C.preventDefault(),l()},className:"space-y-3 p-3",children:[Y("div",{className:"flex items-start justify-between gap-2",children:[Y("div",{className:"min-w-0",children:[T("p",{className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground",children:"Editing linked variable"}),T("p",{className:"mt-0.5 truncate font-mono text-xs text-foreground",children:t})]}),T("button",{type:"button",onClick:l,"aria-label":"Close editor",className:"rounded p-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:T(S,{className:"h-3.5 w-3.5"})})]}),Y("div",{className:"space-y-1",children:[T(y,{htmlFor:"linked-value",className:"text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground",children:o?"Secret value":"Value"}),Y("div",{className:"relative",children:[T(f,{ref:x,id:"linked-value",type:u?"text":"password",value:c,onChange:(C)=>{d(C.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}),T("button",{type:"button",onClick:()=>{b((C)=>!C)},"aria-label":u?"Hide value":"Reveal value",className:"absolute inset-y-0 right-1 my-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:u?T(Ye,{className:"h-3.5 w-3.5"}):T(xe,{className:"h-3.5 w-3.5"})})]})]}),Y("div",{className:"flex items-center justify-between gap-2 pt-1",children:[Y("p",{className:"text-[10px] leading-relaxed text-muted-foreground",children:["Updates the linked secret. Other connectors using"," ",T("span",{className:"font-mono",children:t})," will pick it up on their next run."]}),T(n,{type:"submit",size:"sm",disabled:a||s,className:"h-7 px-3 text-xs",children:s?Y(Wn,{children:[T(h,{className:"h-3 w-3 animate-spin"}),"Saving"]}):"Save"})]})]})},Sf=({suggestedName:t,onSubmit:r,onCancel:o})=>{let[a,s]=_e(t),[i,l]=_e(""),[c,d]=_e(!0),[u,b]=_e(!1),x=_l(null);Fl(()=>{x.current?.focus(),x.current?.select()},[]);let C=a.trim(),E=C.length>0;return Y("form",{role:"presentation",onSubmit:(P)=>{if(P.preventDefault(),E)r({key:C,secret:c,value:i})},onClick:(P)=>{P.stopPropagation()},onKeyDown:(P)=>{if(P.key==="Escape")P.preventDefault(),P.stopPropagation(),o()},className:"flex flex-col",children:[Y("div",{className:"flex items-center gap-2 border-b border-border/60 bg-muted/15 px-3 py-2",children:[T("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:T(Rt,{className:"h-3.5 w-3.5"})}),T("span",{className:"flex-1 text-[10.5px] font-medium uppercase tracking-[0.12em] text-muted-foreground/80",children:"New variable"}),T(Xe,{className:"h-3 w-3 text-muted-foreground/60"})]}),Y("div",{className:"space-y-2.5 px-3 py-2.5",children:[Y("div",{className:"space-y-1",children:[T(y,{htmlFor:"var-key",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Name"}),Y("div",{className:"relative",children:[T("span",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-0 left-2.5 flex items-center text-muted-foreground/60",children:T(yt,{className:"h-3 w-3"})}),T(f,{ref:x,id:"var-key",value:a,onChange:(P)=>{s(P.target.value.toUpperCase())},placeholder:"VARIABLE_NAME",className:"h-8 pl-7 font-mono text-[12.5px] tracking-tight",autoComplete:"off",spellCheck:!1})]})]}),Y("div",{className:"space-y-1",children:[T(y,{htmlFor:"var-value",className:"text-[10px] font-medium uppercase tracking-[0.1em] text-muted-foreground/70",children:"Value"}),Y("div",{className:"relative",children:[T(f,{id:"var-value",type:u?"text":"password",value:i,onChange:(P)=>{l(P.target.value)},placeholder:"Encrypted at rest",className:"h-8 pr-8 font-mono text-[12.5px]",autoComplete:"off",spellCheck:!1}),T("button",{type:"button",onClick:()=>{b((P)=>!P)},"aria-label":u?"Hide value":"Reveal value",className:"absolute inset-y-0 right-1 my-auto flex h-6 w-6 items-center justify-center rounded text-muted-foreground/70 transition-colors hover:bg-muted hover:text-foreground",children:u?T(Ye,{className:"h-3.5 w-3.5"}):T(xe,{className:"h-3.5 w-3.5"})})]})]}),Y("label",{className:"flex cursor-pointer items-center gap-2 select-none text-[11px] text-muted-foreground",children:[T("input",{type:"checkbox",checked:c,onChange:(P)=>{d(P.target.checked)},className:"h-3 w-3 accent-primary"}),Y("span",{className:"flex items-center gap-1",children:[T(yt,{className:"h-3 w-3"}),"Mark as secret"]})]})]}),Y("button",{type:"submit",disabled:!E,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:[T("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:T(m,{className:"h-3 w-3"})}),Y("span",{className:"flex min-w-0 flex-1 flex-col",children:[T("span",{className:"text-[12px] font-medium leading-tight",children:"Create variable"}),T("span",{className:"truncate text-[10px] leading-tight text-muted-foreground",children:E?Y(Wn,{children:["Link this field to"," ",T("span",{className:"font-mono text-foreground/80",children:C})]}):"Enter a name to continue"})]}),T(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:o,placeholder:a,disabled:s,open:i,onOpen:l},c){let d=Boolean(o),u=Boolean(r);return Y("button",{ref:c,type:"button","aria-expanded":i,disabled:s,onClick:l,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",d?"border-primary/20 bg-primary/[0.03]":"border-input"),children:[T("span",{"aria-hidden":!0,className:e("flex h-5 w-5 shrink-0 items-center justify-center rounded-sm transition-colors",d?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:T(Ge,{className:"h-3 w-3"})}),d?Y("span",{className:"flex min-w-0 flex-1 items-center gap-1.5",children:[T("span",{className:"truncate font-mono text-[12.5px] tracking-tight",children:o}),!u&&T("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"})]}):T("span",{className:"flex-1 truncate text-muted-foreground",children:a}),T($e,{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:o,placeholder:a,disabled:s,masked:i,inputId:l})=>{let[c,d]=_e(!1),u=i&&!c?"password":"text";return Y("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:[T("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:T(St,{className:"h-3 w-3"})}),T("input",{id:l,type:u,value:t,onChange:(b)=>{r(b.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"}),i&&T("button",{type:"button",onClick:()=>{d((b)=>!b)},"aria-label":c?"Hide value":"Reveal value",className:"flex h-7 w-7 items-center justify-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:c?T(Ye,{className:"h-3.5 w-3.5"}):T(xe,{className:"h-3.5 w-3.5"})})]})},Tf=({options:t,value:r,onSelect:o})=>Y("div",{className:"px-1",children:[Y("div",{className:"flex items-center justify-between px-2 pt-2 pb-1",children:[T("span",{className:"text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/80",children:"Linked variables"}),T("span",{className:"text-[10px] tabular-nums text-muted-foreground/60",children:t.length})]}),T(oe,{className:"!p-0 [&_[cmdk-group-heading]]:hidden",children:t.map((a)=>{let s=r===a.key;return Y(z,{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&&T("span",{"aria-hidden":!0,className:"absolute inset-y-1.5 left-0 w-[2px] rounded-r bg-primary"}),T("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:T(yt,{className:"h-3 w-3"})}),Y("div",{className:"flex min-w-0 flex-1 flex-col",children:[T("span",{className:e("truncate font-mono text-[12.5px] tracking-tight",s&&"text-primary"),children:a.key}),a.description!==void 0&&a.description!==""&&T("span",{className:"truncate text-[10.5px] leading-tight text-muted-foreground",children:a.description})]}),s?T(m,{className:"h-3.5 w-3.5 shrink-0 text-primary"}):T("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:T(ze,{className:"h-3.5 w-3.5"})})]},a.key)})})]}),kf=()=>Y("div",{className:"space-y-1.5 px-2 py-3",children:[Y("div",{className:"flex items-center justify-between px-1 pb-1",children:[T("span",{className:"text-[10px] font-medium uppercase tracking-[0.12em] text-muted-foreground/60",children:"Loading"}),T(h,{className:"h-3 w-3 animate-spin text-muted-foreground/60"})]}),[0.95,0.7,0.85].map((t,r)=>Y("div",{className:"flex items-center gap-2 rounded-md px-2 py-1.5",style:{opacity:1-r*0.18},children:[T("div",{className:"h-5 w-5 shrink-0 animate-pulse rounded-sm bg-muted/70"}),T("div",{className:"h-3 animate-pulse rounded bg-muted/70",style:{width:`${t*100}%`}})]},r))]}),Lf=({query:t,canCreate:r,onCreate:o})=>{let a=t.trim();return Y("div",{className:"flex flex-col items-center gap-2 px-4 py-7 text-center",children:[T("span",{"aria-hidden":!0,className:"flex h-9 w-9 items-center justify-center rounded-full bg-muted/60 text-muted-foreground/70",children:T(yt,{className:"h-4 w-4"})}),Y("div",{className:"space-y-0.5",children:[T("p",{className:"text-[12px] font-medium text-foreground",children:a?Y(Wn,{children:["No variables match"," ",Y("span",{className:"font-mono text-foreground",children:['"',a,'"']})]}):"No variables yet"}),T("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&&Y(n,{type:"button",size:"sm",variant:"outline",onClick:o,className:"mt-1 h-7 text-[11px]",children:[T(Xe,{className:"h-3 w-3"}),a?`Create "${a.toUpperCase().replaceAll(/[^A-Z0-9_]/gu,"_")}"`:"Create variable"]})]})},Df=({options:t,optionsLoading:r,optionsFetching:o,value:a,query:s,onQueryChange:i,onSelect:l,onCreate:c,suggestedName:d,showCreate:u,onShowCreate:b})=>{if(u&&c)return T(Sf,{suggestedName:d??s.trim(),onSubmit:(C)=>{c(C)},onCancel:()=>{b(!1)}});let x=T(Tf,{options:t,value:a,onSelect:l});if(r)x=T(kf,{});else if(t.length===0)x=T(Lf,{query:s,canCreate:Boolean(c),onCreate:()=>{b(!0)}});return Y("div",{className:"flex flex-col",children:[Y("div",{className:"relative flex items-center gap-2 border-b border-border/60 bg-muted/15 px-3 py-2",children:[T(We,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground/70"}),T("input",{autoFocus:!0,type:"text",value:s,onChange:(C)=>{i(C.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"}),Y("div",{className:"flex h-4 w-4 items-center justify-center",children:[o&&!r&&T(h,{className:"h-3 w-3 animate-spin text-muted-foreground/70"}),!o&&s&&T("button",{type:"button",onClick:()=>{i("")},"aria-label":"Clear search",className:"rounded p-0.5 text-muted-foreground/60 transition-colors hover:bg-muted hover:text-foreground",children:T(S,{className:"h-3 w-3"})})]})]}),T(pe,{shouldFilter:!1,className:"rounded-none bg-transparent",loop:!0,children:T(be,{className:"max-h-[280px] py-1",children:x})}),c&&Y("button",{type:"button",onClick:()=>{b(!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:[T("span",{className:"flex h-6 w-6 items-center justify-center rounded-md bg-primary/10 text-primary ring-1 ring-primary/15",children:T(Xe,{className:"h-3 w-3"})}),Y("span",{className:"flex min-w-0 flex-1 flex-col",children:[T("span",{className:"text-[12px] font-medium leading-tight",children:"Create new variable"}),T("span",{className:"text-[10px] leading-tight text-muted-foreground",children:"Encrypted at rest · reusable across connectors"})]}),T(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:o,onChange:a,onBlur:s,options:i,optionsLoading:l,optionsFetching:c,onSearch:d,onCreate:u,onResolve:b,onUpdate:x,suggestedName:C,placeholder:E="Select variable…",disabled:P=!1,masked:O=!0,className:X},j){let[H,V]=_e(!1),[J,K]=_e(""),[_,W]=_e(!1),[U,te]=_e(!1),[q,de]=_e(null),[Re,ye]=_e(!1),[Pe,Oe]=_e(!1),[Ve,he]=_e(null),Je=Nf(),we=Zr((Z)=>{if(Z===o)return;a("",Z),W(!1),K("")},[o,a]),Be=Zr((Z)=>{a(Z===r?"":Z,"linked"),V(!1),W(!1)},[r,a]),Q=Zr((Z)=>{a(Z,"inline")},[a]),ce=Zr(async(Z)=>{if(!u)return;let et=await u(Z);W(!1),V(!1),a(et.key,"linked")},[u,a]),se=Zr(async()=>{if(!r||!b)return;te(!0),ye(!0),he(null);try{let Z=await b(r);de(Z??{key:r,secret:!0,value:null})}catch(Z){he(Z instanceof Error?Z.message:"Failed to load variable"),de({key:r,secret:!0,value:null})}ye(!1)},[r,b]),Te=Zr(async(Z)=>{if(!x||!r)return;Oe(!0);try{await x({key:r,value:Z}),te(!1)}catch(et){throw Oe(!1),et}Oe(!1)},[x,r]),Ue=Zr((Z)=>{K(Z),d?.(Z)},[d]),ke=i.find((Z)=>Z.key===r),hr=o==="linked"&&Boolean(r)&&Boolean(x);return Y("div",{className:e("space-y-1.5",X),children:[Y("div",{className:"flex items-center gap-1.5",children:[T("div",{className:"min-w-0 flex-1",children:o==="linked"?Y(M,{open:H,onOpenChange:(Z)=>{if(V(Z),!Z)W(!1),s?.()},modal:!0,children:[T(A,{asChild:!0,children:T(zl,{ref:j,selected:ke,value:r,placeholder:E,disabled:P,open:H,onOpen:()=>{V(!0)}})}),T(D,{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:T(Df,{options:i,optionsLoading:Boolean(l),optionsFetching:Boolean(c),value:r,query:J,onQueryChange:Ue,onSelect:Be,onCreate:u?ce:void 0,suggestedName:C,showCreate:_,onShowCreate:W})})]}):T(Pf,{inputId:Je,value:r,onChange:Q,onBlur:()=>s?.(),placeholder:E||"Enter value",disabled:P,masked:O})}),hr&&Y(M,{open:U,onOpenChange:(Z)=>{if(te(Z),!Z)de(null),he(null);else if(!q)se()},modal:!0,children:[T(A,{asChild:!0,children:T(n,{type:"button",variant:"outline",size:"icon",disabled:P,"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:T(St,{className:"h-3.5 w-3.5"})})}),Y(D,{align:"end",side:"bottom",sideOffset:6,className:"w-80 p-0 shadow-lg",children:[Ve!==null&&Ve!==""&&T("div",{className:"border-b border-destructive/30 bg-destructive/5 px-3 py-2 text-[11px] text-destructive",children:Ve}),T(Cf,{variableKey:r,initialValue:q?.value??"",isSecret:q?.secret??!0,loading:Re,saving:Pe,onSubmit:(Z)=>{Te(Z)},onCancel:()=>{te(!1)}},`${r}:${q?.value??""}`)]})]}),T(Rf,{mode:o,onModeChange:we,disabled:P})]}),T("p",{className:"flex items-center gap-1.5 text-[10.5px] leading-tight text-muted-foreground/80",children:o==="linked"?Y(Wn,{children:[T(Ge,{className:"h-3 w-3"}),T("span",{children:"Reads from an org variable. Rotate values in one place; every connector picks it up."})]}):Y(Wn,{children:[T(St,{className:"h-3 w-3"}),Y("span",{children:["Stored inline on this connector. Use"," ",T("span",{className:"font-medium text-foreground/80",children:"Linked"})," ","to share across connectors."]})]})})]})});import{useMemo as Mf}from"react";import{jsx as Jo,jsxs as Ma}from"react/jsx-runtime";var If=(t)=>{let r="",o=0,a=" ",s=t.replaceAll(/>\s*</gu,`>
|
|
7
7
|
<`).split(`
|
|
8
8
|
`);for(let i of s){let l=i.trim();if(!l)continue;if(l.startsWith("</"))o=Math.max(0,o-1);if(r+=`${a.repeat(o)+l}
|
|
9
|
-
`,l.startsWith("<")&&!l.startsWith("</")&&!l.startsWith("<?")&&!l.endsWith("/>")&&!/<\/[^>]+>$/u.test(l))o+=1}return r.trim()},
|
|
9
|
+
`,l.startsWith("<")&&!l.startsWith("</")&&!l.startsWith("<?")&&!l.endsWith("/>")&&!/<\/[^>]+>$/u.test(l))o+=1}return r.trim()},Af=({open:t,onOpenChange:r,title:o="XML Viewer",data:a})=>{let s=Mf(()=>If(a??""),[a]);return Jo(w,{open:t,onOpenChange:r,children:Ma(R,{className:"max-w-2xl max-h-[80vh] flex flex-col",children:[Ma(k,{className:"flex flex-row items-center justify-between gap-2",children:[Jo(L,{children:o}),Ma(n,{type:"button",variant:"outline",size:"sm",onClick:()=>{navigator.clipboard.writeText(s),G.success("Copied to clipboard")},children:[Jo(ue,{className:"h-3.5 w-3.5 mr-1"}),"Copy"]})]}),Jo("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 Sn,jsxs as Ia}from"react/jsx-runtime";var Of=({title:t,children:r,details:o,className:a,defaultOpen:s=!1,classes:i,...l})=>Ia(rt,{variant:"destructive",className:e("border-destructive/25 bg-destructive/5","has-[>svg]:grid-cols-[1rem_minmax(0,1fr)]",i?.root,a),children:[Sn(wt,{"aria-hidden":"true"}),t!==void 0&&t!==null&&Sn(ot,{className:e("line-clamp-none min-w-0 break-words text-foreground",i?.title),children:t}),Sn(at,{className:e("min-w-0 break-words",i?.message),children:r}),o!==void 0&&Ia(ae,{...l,defaultOpen:s,className:e("col-start-2 mt-3 min-w-0",i?.details),children:[Ia(ne,{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",i?.trigger),children:[Sn(g,{"aria-hidden":"true",className:"size-3.5 shrink-0 transition-transform group-data-[state=open]:rotate-180 motion-reduce:transition-none"}),o.label]}),Sn(ie,{children:Sn("div",{className:e("mt-3 min-w-0 rounded-md border border-border bg-background/70 p-3 text-sm text-foreground",i?.content),children:o.content})})]})]});import{jsx as br,jsxs as Aa,Fragment as Ff}from"react/jsx-runtime";var $l=(t)=>Math.max(0,Math.min(100,Math.round(t))),Oa=(t)=>$l(t.value??0),Hf=(t)=>{if(t.length===0)return 0;return $l(t.reduce((r,o)=>r+Oa(o),0)/t.length)},Vf=({lane:t})=>{let r=t.fillClassName??"bg-primary";if(t.mode==="indeterminate")return Aa(Ff,{children:[br("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"}}),br("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{mr,yt,hr,ne,gr,zt,He,pe,vr,xr,br,yr,Sr,lt,St,ct,Ge,Cr,wr,$e}from"../../in
|
|
|
17
17
|
transform: none;
|
|
18
18
|
width: 100%;
|
|
19
19
|
}
|
|
20
|
-
}`})]});return
|
|
20
|
+
}`})]});return br("div",{className:e("h-full transition-all",r),style:{width:`${Oa(t)}%`}})},Bf=({className:t,detail:r,label:o,lanes:a})=>{let s=a.some((l)=>l.mode==="indeterminate"),i=Hf(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:[br("span",{className:"truncate text-xs font-medium",title:o,children:o}),r!==null&&r!==void 0&&r!==""?br("span",{className:"shrink-0 text-[11px] text-muted-foreground",title:r,children:r}):null]}),br("progress",{"aria-label":o,className:"sr-only",max:100,value:s?void 0:i}),br("div",{"aria-hidden":"true",className:"flex h-2 w-full gap-0.5","data-slot":"lane-progress",children:a.map((l,c)=>br("div",{className:"relative min-w-0 flex-1 overflow-hidden rounded-full bg-muted","data-mode":l.mode??"determinate","data-slot":"lane-progress-lane","data-value":Oa(l),children:br(Vf,{lane:l})},c))})]})};import*as jl from"react";import{jsx as me,jsxs as Vt}from"react/jsx-runtime";var Qr=(t)=>Boolean(t)&&t!==0,_f=({context:t})=>me("div",{className:"sr-only","data-slot":"lifecycle-status-card-status","aria-live":"polite",children:t.statusLabel}),zf=({error:t})=>{let[r,o]=jl.useState(!1);return Vt(rt,{variant:t.tone==="destructive"?"destructive":"default","data-slot":"lifecycle-status-card-error",children:[me(re,{"aria-hidden":!0}),Qr(t.title)?me(ot,{children:t.title}):null,Vt(at,{children:[Qr(t.summary)?me("p",{children:t.summary}):null,Qr(t.detail)?Vt("div",{className:"mt-2 space-y-2",children:[me(n,{"aria-expanded":r,onClick:()=>{o((a)=>!a)},size:"sm",type:"button",variant:"link",children:r?"Hide details":"Show details"}),r?me("p",{className:"whitespace-pre-wrap break-words rounded-md bg-muted/50 p-2 text-foreground",children:t.detail}):null]}):null]})]})},$f=(t)=>Object.prototype.toString.call(t)==="[object Function]",vr=(t,r)=>$f(t)?t(r):t,jf=(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},Jf=(t)=>{if(t==="danger")return"destructive";return t==="success"?"soft":"outline"},Gf=(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"}},Wf=(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"}},Xf=({model:t})=>me("span",{className:e("flex size-9 items-center justify-center rounded-md border",Gf(t.tone)),children:me("span",{className:e("flex size-4 items-center justify-center",t.iconAnimated===!0&&"animate-spin"),"aria-hidden":!0,children:t.icon})}),Uf=({model:t})=>{let{progress:r}=t,o=jf(r),a=r?.label??t.currentStep;if(!r&&!Qr(a))return null;return Vt("div",{className:"space-y-2","data-slot":"lifecycle-status-card-progress",children:[Vt("div",{className:"flex min-h-5 items-center justify-between gap-3 text-sm",children:[me("span",{className:"min-w-0 truncate text-muted-foreground",children:a??"Waiting for updates"}),r?.completed!==void 0&&r.total!==void 0?Vt("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:[r.completed," of ",r.total]}):null]}),o===void 0?Vt("div",{"aria-label":"Progress",className:"relative h-2 overflow-hidden rounded-full bg-primary/15","data-progress-mode":"indeterminate",children:[me("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"}}),me("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
|
+
}`})]}):me(Ht,{"aria-label":"Progress","data-progress-mode":"determinate",value:o})]})},Kf=({milestones:t})=>{if(t===void 0||t.length===0)return null;return me("ol",{className:"space-y-3","data-slot":"lifecycle-status-card-milestones",children:t.map((r)=>Vt("li",{className:"grid grid-cols-[auto_1fr] gap-3",children:[me("span",{"aria-hidden":!0,className:e("mt-1.5 size-2 rounded-full",Wf(r.tone))}),Vt("div",{className:"min-w-0",children:[me("div",{className:"text-sm font-medium leading-5 text-foreground",children:r.label}),Qr(r.description)?me("div",{className:"text-sm leading-5 text-muted-foreground",children:r.description}):null]})]},r.id))})},Yf=({context:t,slots:r})=>Vt("div",{className:"grid grid-cols-[auto_1fr] gap-3 sm:grid-cols-[auto_1fr_auto]",children:[me("div",{className:"pt-0.5",children:vr(r?.icon,t)??me(Xf,{model:t.model})}),Vt("div",{className:"min-w-0 space-y-1",children:[me("h3",{className:"text-[15px] font-semibold leading-6 text-foreground",children:vr(r?.title,t)??t.title}),me("div",{className:"text-sm leading-6 text-muted-foreground",children:vr(r?.description,t)??t.description})]}),me(I,{className:"col-start-2 w-fit sm:col-start-auto",variant:Jf(t.model.tone),children:t.statusLabel})]}),qf=({model:t,slots:r,className:o,...a})=>{let s={description:t.description,model:t,statusLabel:t.statusLabel,title:t.title},i=vr(r?.actions,s),l=vr(r?.completedState,s)??t.completedState,c=me(fe,{className:e("w-full gap-0 overflow-hidden py-0",o),"data-status-tone":t.tone??"default",...a,children:Vt(Bt,{className:"space-y-5 p-5 sm:p-6",children:[me(_f,{context:s}),vr(r?.header,s)??me(Yf,{context:s,slots:r}),vr(r?.progressBody,s)??me(Uf,{model:t}),vr(r?.milestoneList,s)??me(Kf,{milestones:t.milestones}),Qr(l)?me("div",{"data-slot":"lifecycle-status-card-completed",children:l}):null,t.error?vr(r?.errorPanel,s)??me(zf,{error:t.error}):null,Qr(i)?me("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:i}):null]})});return r?.shell?r.shell({...s,children:c}):c};import*as Gl from"react";import{jsx as Jl}from"react/jsx-runtime";var Zf=({rows:t=5,rowClassName:r,className:o,...a},s)=>Jl("div",{ref:s,"aria-label":"Loading",className:e("flex flex-col gap-2",o),...a,children:Array.from({length:t}).map((i,l)=>Jl(Ke,{className:e("h-10 w-full",r)},l))}),Wl=Gl.forwardRef(Zf);Wl.displayName="SkeletonRows";var Qf=Wl;import*as Ul from"react";import{jsx as Xn,jsxs as Xl}from"react/jsx-runtime";var Kl=Ul.forwardRef(function({icon:r,illustration:o,title:a,description:s,action:i,secondaryAction:l,size:c="md",variant:d="bare",className:u,...b},x){let C=c==="sm",E=Boolean(o),P=!C&&!E,O=r??Xn(Ur,{className:"h-6 w-6"}),X=Boolean(s),j=Boolean(i)||Boolean(l),H=null;if(E)H=Xn("div",{className:e("flex items-center justify-center","[&_svg]:w-auto",C?"mb-3 [&_svg]:h-16":"mb-5 [&_svg]:h-24"),children:o});else if(P)H=Xn("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-md bg-(--bg-accent-soft) text-(--accent)",children:O});return Xl("div",{ref:x,"data-slot":"empty-state","data-size":c,"data-variant":d,className:e("mx-auto flex w-full max-w-130 flex-col items-center justify-center rounded-lg px-6 text-center",d==="framed"&&"border border-dashed border-(--border-default)",C?"py-8":"px-8 py-14",u),...b,children:[H,Xn("h3",{className:e("font-semibold text-(--text-primary)",C?"text-[14px]":"text-[15px]"),children:a}),X?Xn("p",{className:e("mt-1 max-w-sm leading-relaxed text-(--text-secondary)",C?"text-[12px]":"text-[13px]"),children:s}):null,j?Xl("div",{className:e("flex flex-wrap items-center justify-center gap-2",C?"mt-4":"mt-5"),children:[i,l]}):null]})});Kl.displayName="EmptyState";var eg=Kl;import*as Yl from"react";import{jsx as dr,jsxs as Un,Fragment as rg}from"react/jsx-runtime";var tg=(t)=>Object.prototype.toString.call(t)==="[object String]",ql=Yl.forwardRef(function({title:r="Something went wrong",message:o,detail:a,detailLabel:s="Show technical details",detailHeading:i="Inner error detail",defaultOpen:l=!1,className:c,...d},u){let b=Boolean(a);return dr(ae,{ref:u,defaultOpen:l&&b,"data-slot":"technical-error-disclosure",className:e("rounded-md border border-destructive/25 bg-destructive/[0.035] p-4 text-sm","shadow-[inset_0_1px_0_rgba(255,255,255,0.48)]",c),...d,children:Un("div",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-3",children:[dr("span",{className:"mt-0.5 flex size-7 items-center justify-center rounded-md bg-destructive/10 text-destructive",children:dr(re,{className:"size-4","aria-hidden":"true"})}),Un("div",{className:"min-w-0",children:[dr("div",{className:"font-semibold text-foreground",children:r}),dr("div",{className:"mt-1 leading-6 text-muted-foreground",children:o}),b?Un(rg,{children:[Un(ne,{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:[dr(g,{className:"size-3.5 transition-transform group-data-[state=open]:rotate-180","aria-hidden":"true"}),s]}),dr(ie,{children:Un("div",{className:"mt-3 rounded-md border border-destructive/15 bg-background/70 p-3",children:[dr("div",{className:"mb-2 text-[11px] font-medium uppercase tracking-[0.08em] text-muted-foreground",children:i}),tg(a)?dr("pre",{className:"max-h-52 overflow-auto whitespace-pre-wrap break-words font-mono text-xs leading-5 text-foreground",children:a}):dr("div",{className:"text-xs leading-5 text-foreground",children:a})]})})]}):null]})]})})});ql.displayName="TechnicalErrorDisclosure";var ng=ql;import{jsx as Ha,jsxs as ag}from"react/jsx-runtime";var og=({icon:t,title:r="Loading...",className:o,spinnerSize:a=30})=>ag("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(Qe,{size:a})]}),sg=og;import{jsx as Go,jsxs as lg}from"react/jsx-runtime";var ig=({children:t,className:r,classes:o,loading:a=!1,coverImage:s})=>Go("div",{className:e("min-h-screen flex items-center justify-center",o?.root,r),children:lg("div",{className:e("flex flex-col md:flex-row w-full min-h-[100vh] max-h-[100vh] overflow-hidden",o?.content),children:[Go("div",{className:e("hidden md:flex flex-1 items-center justify-center overflow-hidden bg-black",o?.left),children:s}),Go("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?Go(Qe,{size:48}):t})]})}),cg=ig;export{cc as ActionButton,pc as AddItemButton,sg as AppLoadingLayout,vd as ArrayInput,co as CardOption,Es as CardOptionsBlock,$d as CheckboxCardOption,_d as ChoiceCard,Fd as ChoiceCardGroup,Nc as CollectiveIntelligenceLoader,Jd as CommandStep,Dm as ConfirmDialog,yc as CopyButton,Hd as CoverImage,Md as CronBuilder,Xd as CurrencyInput,bc as DateInput,xc as DisplayHeading,eg as EmptyState,Of as ErrorAlert,Sc as ErrorMessage,Ud as FieldRow,ru as FileDropArea,au as FilterChips,cu as FlowBand,pu as FlowBranch,du as FlowStep,Zc as FormFrame,kc as FormattedNumber,td as Grid,bu as GuideStep,xu as HierarchyTree,Ys as HierarchyTreeBody,Ks as HierarchyTreeHeader,qs as HierarchyTreeRow,Zs as HierarchyTreeToggle,Mc as IconTile,la as JsonViewer,Hu as JsonViewerDialog,Hc as Kicker,Bu as LabeledField,Bf as LaneProgress,qf as LifecycleStatusCard,Fu as LinkedItem,Au as MarkdownEditorPreview,Qs as MarkdownEditorPreviewToggle,zu as MaskedValue,ju as MutedPlaceholder,Uu as ObjectSchemaExplorer,ad as PageRoot,ld as PageTitle,zd as RadioCardOption,Ms as RadioCardOptionsBlock,Ft as Ring,jm as SearchField,cd as SectionHeader,kl as SectionSwitcher,Jc as SerifNumeral,_c as ShowMoreTag,Qf as SkeletonRows,Lm as SortableList,cg as SplashScreenLayout,cf as SplitButton,df as SplitButtonAction,uf as SplitButtonMenu,Em as StageHeader,Am as StatTile,ao as StatusDot,Fm as StatusPill,Qm as Stepper,lf as StepperContent,nf as StepperIndicator,tf as StepperItem,ef as StepperNav,sf as StepperPanel,af as StepperSeparator,of as StepperTitle,rf as StepperTrigger,Bd as SummaryItem,Vd as SummaryList,Km as TabActions,qm as TabActionsRow,Um as TabActionsScope,Pl as TabActionsSlot,Ym as TabCount,pd as TableHead,ff as TechnicalDetailsPopover,ng as TechnicalErrorDisclosure,xr as ThemeToggle,so as TimezonePicker,Xc as TooltipBadge,Al as TreeSelect,Qn as Typography,wf as ValueRow,Ef as VariableReferenceField,Af as XmlViewerDialog,Tr as buildCron,Mt as defaultSimpleState,no as describeCron,Ya as displayHeadingVariants,ea as getTimezoneOptions,Qo as isValidCron,In as parseCron,kt as useIsMobile};
|