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