@epam/ai-dial-ui-kit 0.16.0-dev.15 → 0.16.0-dev.18
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/dist/CHANGELOG.md +7 -1
- package/dist/{DateCellRenderer-CkDF66wX.cjs → DateCellRenderer-DDEzIi2B.cjs} +8 -8
- package/dist/JsonEditor-eAV7SaKu.cjs +1 -0
- package/dist/{MarkdownEditor-BKtFs714.cjs → MarkdownEditor-Cp-KX6-T.cjs} +1 -1
- package/dist/{MarkdownEditor-Bapd1ycU.cjs → MarkdownEditor-Dav_pp0T.cjs} +1 -1
- package/dist/MarkdownEditorContainer-D8YTX8EM.cjs +1 -0
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +18 -16
- package/dist/components/New/Checkbox/Checkbox.js +23 -21
- package/dist/components/New/Checkbox/CheckboxBox.js +25 -18
- package/dist/components/New/FolderPath/FolderPath.js +136 -77
- package/dist/components/New/Popup/constants.js +1 -1
- package/dist/components/New/Radio/Radio.js +19 -17
- package/dist/components/New/Switch/Switch.js +19 -17
- package/dist/components-manifest.json +3 -3
- package/dist/dial-ui-kit.cjs +3 -3
- package/dist/editor-BH6_A1k2.cjs +1 -0
- package/dist/editors.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/lazy-DMVYJhUR.cjs +1 -0
- package/dist/src/components/New/FolderPath/FolderPath.d.ts +5 -0
- package/dist/src/components/New/Popup/constants.d.ts +1 -1
- package/package.json +1 -1
- package/dist/JsonEditor-Bxui5wJH.cjs +0 -1
- package/dist/MarkdownEditorContainer-DLPODjar.cjs +0 -1
- package/dist/lazy-_W6FYhKg.cjs +0 -1
package/dist/dial-ui-kit.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),S=require("./merge-classes-BEJXjzkx.cjs"),C=require("./DateCellRenderer-CkDF66wX.cjs"),ze=require("./Switch-DAaAOaIu.cjs"),g=require("react"),_=require("@tabler/icons-react"),ne=require("classnames"),P=require("./icon-CrGVkVpG.cjs"),O=require("./IconButton-B1Hx0Y3y.cjs"),zn=require("react-dom"),J=require("@floating-ui/react"),Yt=require("./lazy-_W6FYhKg.cjs"),se=require("./icon-DhjrDQ8I.cjs");function xi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const te=xi(g),Xt=({text:e,className:t,variant:s=C.CaptionType.Description,...n})=>e?r.jsx("span",{...n,role:"alert",className:S.mergeClasses("dial-tiny-text",s===C.CaptionType.Error?"text-error":"text-secondary",t),children:e}):null,Se=({...e})=>r.jsx(Xt,{...e,variant:C.CaptionType.Error}),ot=({label:e,variant:t,appearance:s=O.ButtonAppearance.Solid,size:n=O.ElementSize.Standard,className:a,textClassName:i,iconAfter:o,iconBefore:l,hideTitleOnMobile:c,type:d="button",tooltipProps:u,...f})=>{const h=ne(c?"hidden sm:inline":"inline",i),p=S.mergeClasses(t&&O.getButtonClassNames(t,s),n===O.ElementSize.Small?"dial-tiny-semi-text":"dial-small-semi-text",s!==O.ButtonAppearance.Link&&(n===O.ElementSize.Small?"h-[24px] px-2":"h-[40px] px-3"),n!==O.ElementSize.Small&&s!==O.ButtonAppearance.Link&&"dial-kit-enhanced-target","disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-focus outline-offset-0",a),m=r.jsxs("button",{...f,type:d,className:p,"aria-label":typeof e=="string"&&e||f["aria-label"],children:[r.jsx(C.DialIcon,{icon:l}),e&&r.jsx("span",{className:h,children:e}),r.jsx(C.DialIcon,{icon:o})]});return u?r.jsx(O.DialTooltip,{...u,children:m}):m},pt=({label:e,className:t,icon:s,selected:n,closable:a,onClick:i,onRemove:o})=>{const l=S.mergeClasses("flex items-center gap-1 cursor-pointer dial-tiny-text px-2 h-[24px] border text-primary rounded-[8px]",n?"hover:bg-controls-accent-primary-alpha-active bg-accent-primary-alpha border-accent-primary":"bg-neutral border-primary",t);return r.jsxs("div",{className:l,onClick:i,children:[r.jsx(C.DialIcon,{icon:s}),r.jsx(C.DialEllipsisTooltip,{text:e}),a&&o&&r.jsx(ot,{className:"p-0",iconAfter:r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM}),onClick:c=>o(c)})]},e)},ds=({label:e="Error",className:t})=>r.jsx(pt,{label:e,className:S.mergeClasses("dial-tiny-semi-text cursor-default rounded-[120px] border-transparent bg-error text-error",t)}),Ci="flex items-center justify-center text-secondary",bi="shrink-0 grow-0 basis-auto animate-spin-steps",vi=e=>te.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),lt=({size:e=18,className:t,iconClassName:s,fullWidth:n=!0,ariaLabel:a="Loading"})=>r.jsx("div",{role:"status",className:ne({[Ci]:!0,"size-full":n,[t||""]:!!t}),children:r.jsx(C.DialIcon,{icon:r.jsx(vi,{width:e,height:e,className:ne(bi,s),role:"img","aria-label":a})})});var Vt=(e=>(e.Default="default",e.Compact="compact",e))(Vt||{});const yi={[Vt.Default]:{container:"bg-layer-3",title:"dial-small-text text-secondary",value:"dial-display2-text text-primary",showDescription:!0},[Vt.Compact]:{container:"bg-layer-2",title:"dial-tiny-text text-secondary",value:"dial-body-semi-text text-primary",showDescription:!1}},Si=({title:e,value:t,description:s,variant:n=Vt.Default,error:a,isLoading:i,className:o,delta:l,deltaPositive:c,deltaUnit:d,compareValues:u})=>{const f=yi[n],h=c!==void 0?c:(l??0)>=0,p=l===void 0?null:`${l>=0?`+${l}`:String(l)}${d??""}`;return r.jsxs("div",{className:S.mergeClasses("flex flex-col rounded-lg border border-secondary p-4",a||i?"gap-2":"gap-1",f.container,o),children:[l!==void 0?r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:f.title,children:e}),r.jsx("span",{className:S.mergeClasses("dial-tiny-semi-text rounded-[120px] border border-transparent px-2",h?"bg-success text-success":"bg-error text-error"),children:p})]}):r.jsx("span",{className:f.title,children:e}),a?r.jsx(ds,{className:"self-start"}):i?r.jsx(lt,{fullWidth:!1,className:"self-start"}):u?r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[r.jsx(C.DialEllipsisTooltip,{text:u[0].title,className:"dial-tiny-text text-secondary"}),r.jsx("span",{className:f.value,children:u[0].value})]}),r.jsx("div",{className:"h-4 w-px flex-shrink-0 bg-controls-disable-accent"}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[r.jsx(C.DialEllipsisTooltip,{text:u[1].title,className:"dial-tiny-text text-secondary"}),r.jsx("span",{className:f.value,children:u[1].value})]})]}):r.jsx("span",{className:f.value,children:t}),!a&&!i&&f.showDescription&&s!=null&&s!==!1&&r.jsx("span",{className:"dial-tiny-text text-secondary",children:s})]})},us=[{from:0,to:.1,color:"#F26B5B"},{from:.1,to:.2,color:"#E5764A"},{from:.2,to:.3,color:"#E08C3F"},{from:.3,to:.4,color:"#D9A638"},{from:.4,to:.5,color:"#D4BE3A"},{from:.5,to:.6,color:"#B8C94A"},{from:.6,to:.7,color:"#7EC96B"},{from:.7,to:.8,color:"#4ECBA8"},{from:.8,to:.9,color:"#4EC5C5"},{from:.9,to:1,color:"#4DC87A"},{from:1,to:1,color:"#30E070"}],Ii=(e,t)=>t<=0?0:Math.min(Math.max(e/t,0),1),Ni=(e,t)=>{if(e<=0)return;let s;for(const n of t)(n.from===n.to?e>=n.from:e>n.from&&e<=n.to)&&(s=n.color);return s},cr=({value:e,maxValue:t=1,error:s,isLoading:n,title:a,valueLabel:i,colorMap:o=us,className:l,titleClassName:c,valueClassName:d,inline:u,ariaLabel:f})=>{const h=e==null,p=!!(s||n||!h),m=Ii(h?0:e,t),b=Ni(m,o),x=i??(h?"—":e),v=f??(typeof a=="string"?a:void 0),y=s||n,I=s?r.jsx(ds,{}):n?r.jsx(lt,{fullWidth:!1}):r.jsx("span",{className:S.mergeClasses("shrink-0 tabular-nums text-end",u?"dial-small-text min-w-[5ch] text-primary":"dial-small-semi-text text-primary",d),children:x}),j=p?r.jsx("div",{role:"progressbar","aria-valuenow":s||n||typeof e!="number"?void 0:e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":v,className:S.mergeClasses("w-full overflow-hidden rounded-xs",u?"h-1":"h-2",s?"bg-error":"bg-layer-1"),children:!y&&r.jsx("div",{className:"h-full rounded-xs transition-[width] duration-300",style:{width:`${m*100}%`,backgroundColor:b}})}):null,N=r.jsx("span",{className:S.mergeClasses("dial-small-text text-primary",c),children:a});return u?r.jsxs("div",{className:S.mergeClasses("flex flex-row items-center gap-2",l),children:[r.jsx("div",{className:"w-1/2 min-w-0",children:N}),r.jsxs("div",{className:"flex w-1/2 flex-row items-center gap-2",children:[r.jsx("div",{className:"min-w-0 flex-1",children:j}),I]})]}):r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-1",l),children:[r.jsxs("div",{className:"flex flex-row items-center justify-between gap-2",children:[N,I]}),j]})},Bn=({title:e,description:t,children:s,expanded:n,defaultExpanded:a=!1,disabled:i,nonCollapsible:o,onToggle:l,className:c,headerClassName:d,contentClassName:u})=>{const f=n!==void 0,[h,p]=g.useState(a),m=o?!0:f?n:h,b=g.useId(),x=()=>{if(i)return;const v=!m;f||p(v),l?.(v)};return r.jsxs("div",{className:S.mergeClasses("rounded border border-secondary",c),children:[r.jsxs("button",{type:"button","aria-expanded":m,"aria-controls":b,disabled:i||o,onClick:x,className:S.mergeClasses("flex w-full items-center gap-2 p-4 text-left",i?"cursor-not-allowed":"cursor-pointer",o&&"cursor-default",d),children:[!o&&r.jsx(C.DialIcon,{className:ne("text-secondary transition-transform",m&&"rotate-90"),icon:r.jsx(_.IconChevronRight,{size:P.DIAL_ICON_SIZE.SM})}),r.jsx("span",{className:"dial-body-text text-primary",children:e}),t!=null&&t!==!1&&r.jsx("span",{className:"dial-tiny-text text-secondary",children:t})]}),m&&r.jsx("div",{id:b,role:"region",className:S.mergeClasses("px-4 pb-4",u),children:s})]})},ji=({title:e,titleTooltip:t,description:s,data:n,compareData:a,compareLabels:i,maxValue:o,colorMap:l,defaultExpanded:c=!0,nonCollapsible:d,isLoading:u,onBarClick:f,inline:h,barTitleClassName:p,barValueClassName:m,barClassName:b,barDescriptions:x,className:v})=>{const y=Object.entries(n),I=h?S.mergeClasses("text-secondary",p):p,j=i?"dial-tiny-text text-secondary":void 0,N=t?r.jsx(O.DialTooltip,{tooltip:t,children:e}):e,w=a?[...new Set([...Object.keys(n),...Object.keys(a)])]:[],A="cursor-pointer rounded-xs text-left focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-primary",D="group flex flex-col gap-1.5",T=S.mergeClasses("flex flex-col gap-1.5 pl-2",f&&"group-hover:bg-accent-primary-alpha group-focus-visible:bg-accent-primary-alpha",b);return r.jsx(Bn,{title:N,description:s,defaultExpanded:c,nonCollapsible:d,className:v,children:r.jsx("div",{className:S.mergeClasses("flex flex-col",a?"gap-4":h?"gap-2":"gap-3"),children:u?r.jsx(lt,{fullWidth:!1,className:"self-center"}):a?w.map(E=>{const L=E in n?n[E]:null,k=E in a?a[E]:null,R=typeof L=="number"&&typeof k=="number"?parseFloat((k-L).toFixed(3)):null,Z=R!=null&&R!==0,H=Z&&R>0,B=Z?H?`+${R}`:String(R):null,K=x?.[E],V=r.jsx("span",{className:"dial-small-text text-secondary",children:E}),W=r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-2",children:[K?r.jsx(O.DialTooltip,{tooltip:K,children:V}):V,B!=null&&r.jsx("span",{className:S.mergeClasses("dial-tiny-semi-text rounded-[120px] border border-transparent px-2",H?"bg-success text-success":"bg-error text-error"),children:B})]}),r.jsxs("div",{className:T,children:[r.jsx(cr,{title:i?.[0],value:L,maxValue:o,colorMap:l,inline:h,titleClassName:j,ariaLabel:E}),r.jsx(cr,{title:i?.[1],value:k,maxValue:o,colorMap:l,inline:h,titleClassName:j,ariaLabel:`${E} compare`})]})]});return f?r.jsx("button",{type:"button",onClick:()=>f(E,L),className:S.mergeClasses(D,A),children:W},E):r.jsx("div",{className:D,children:W},E)}):y.map(([E,L])=>{const k=r.jsx(cr,{title:E,value:L,maxValue:o,colorMap:l,inline:h,titleClassName:I,valueClassName:m,className:b}),z=f?r.jsx("button",{type:"button",onClick:()=>f(E,L),className:A,children:k}):k,R=x?.[E];return R?r.jsx(O.DialTooltip,{tooltip:R,triggerClassName:"flex flex-col",children:z},E):r.jsx(g.Fragment,{children:z},E)})})})},Di="#FF4E50",wi=(e,t)=>{let s=-1;return t.forEach((n,a)=>{(n.from===n.to?e>=n.from:e>n.from&&e<=n.to)&&(s=a)}),s},zs=(e,t)=>{const s=t.map(()=>0);let n=0;e.forEach(c=>{if(c<=0){n+=1;return}const d=wi(c,t);d>=0&&(s[d]+=1)});const a=Math.max(0,n,...s),i=c=>a>0?c/a:0,o={from:0,to:0,color:Di,count:n,ratio:i(n),isZeroBucket:!0},l=t.map((c,d)=>({from:c.from,to:c.to,color:c.color,count:s[d],ratio:i(s[d]),isZeroBucket:!1}));return[o,...l]},Fn=e=>e<=0?2:e%2===0?e:e+1,Li=e=>{const t=Fn(e);return[t,t/2,0]},Mr=e=>`${Math.round(e*100)/100}`,Hn=(e,t)=>e===t?Mr(e):`${Mr(e)}-${Mr(t)}`,Pr=128,Ti=(e,t)=>{const s=Hn(e,t);return e===t?`scored ${s}`:`scored between ${s}`},Bs=(e,t,s,n,a)=>r.jsxs("div",{className:"flex flex-col gap-0.5",children:[e&&r.jsx("strong",{children:e}),r.jsxs("span",{children:[t," out of ",s," ",n]}),r.jsx("span",{children:Ti(a.from,a.to)})]}),Ei=({title:e,values:t,colorMap:s=us,valueTitle:n="values",showCount:a,isLoading:i,className:o,compareValues:l,valueSetLabel:c,compareValueSetLabel:d})=>{const u=zs(t,s),f=l?zs(l,s):void 0,h=t.length,p=l?.length??0,m=Math.max(h,p),b=Fn(m),x=Li(m),v=N=>N.map(w=>({...w,ratio:b>0?w.count/b:0})),y=v(u),I=f?v(f):void 0,j=(N,w,A,D)=>{if(N.count===0)return r.jsx("div",{className:"flex h-full flex-1 items-end","aria-hidden":"true",children:r.jsx("div",{className:"min-h-2 w-full rounded-xs",style:{height:`${N.ratio*100}%`}})});const T=D?{backgroundImage:`repeating-linear-gradient(135deg, ${N.color} 0px, ${N.color} 1px, transparent 1px, transparent 4px)`,borderColor:N.color}:{backgroundColor:N.color};return r.jsx(O.DialTooltip,{placement:"bottom",tooltip:w,triggerClassName:"flex h-full flex-1 items-end",children:r.jsx("div",{role:"img","aria-label":A,className:"flex min-h-2 w-full items-center justify-center rounded-xs border border-transparent",style:{height:`${N.ratio*100}%`,...T},children:a&&r.jsx("span",{className:"dial-tiny-semi-text text-primary",children:N.count})})})};return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-2",o),children:[r.jsx("span",{className:"dial-small-text text-primary",children:e}),i?r.jsx("div",{className:"flex items-center justify-center",style:{height:Pr},children:r.jsx(lt,{fullWidth:!1})}):r.jsxs("div",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-1",children:[r.jsx("div",{"data-histogram-y-axis":!0,"aria-hidden":"true",className:"relative",style:{height:Pr},children:x.map((N,w)=>r.jsx("span",{className:"dial-tiny-text absolute right-0 whitespace-nowrap text-secondary",style:{top:`${w/(x.length-1)*100}%`,transform:"translateY(-50%)"},children:N},N))}),r.jsxs("div",{className:"relative min-w-0",children:[x.map((N,w)=>r.jsx("div",{"data-histogram-grid":!0,className:"pointer-events-none absolute inset-x-0 border-t border-primary",style:{top:`${w/(x.length-1)*100}%`}},N)),r.jsx("div",{className:"relative flex items-end gap-1",style:{height:Pr},children:I?y.map((N,w)=>{const A=I[w],D=`${N.count} out of ${h} ${n}`,T=`${A.count} out of ${p} ${n}`;return r.jsxs("div",{className:"flex h-full flex-1 items-end",children:[j(N,Bs(c,N.count,h,n,N),D,!0),j(A,Bs(d,A.count,p,n,A),T,!1)]},w)}):y.map((N,w)=>{const A=`${N.count} out of ${h} ${n}`;return N.count===0?r.jsx("div",{className:"flex h-full flex-1 items-end","aria-hidden":"true",children:r.jsx("div",{className:"min-h-2 w-full rounded-xs",style:{height:`${N.ratio*100}%`}})},w):r.jsx(O.DialTooltip,{placement:"bottom",tooltip:A,triggerClassName:"flex h-full flex-1 items-end",children:r.jsx("div",{role:"img","aria-label":A,className:S.mergeClasses("flex min-h-2 w-full items-center justify-center rounded-xs border","border-transparent"),style:{height:`${N.ratio*100}%`,backgroundColor:N.color},children:a&&N.count>0&&r.jsx("span",{className:"dial-tiny-semi-text text-primary",children:N.count})})},w)})})]}),r.jsx("div",{}),r.jsx("div",{"data-histogram-x-axis":!0,className:"flex gap-1",children:y.map((N,w)=>r.jsx("span",{className:"dial-caption-text flex-1 text-center text-secondary",children:Hn(N.from,N.to)},w))})]})]})};var ce=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e.Loading="loading",e.General="general",e))(ce||{}),be=(e=>(e.Toast="toast",e.SectionMessage="section-message",e))(be||{});const Et=({size:e=40,className:t,fullWidth:s=!1,ariaLabel:n="Loading"})=>r.jsx("div",{role:"status",className:S.mergeClasses("flex items-center justify-center",{"size-full":s},t,C.DIAL_KIT_CLASS.spinner),children:r.jsx("div",{role:"img","aria-label":n,style:{width:e,height:e},className:"rounded-full border-2 border-secondary border-t-accent animate-spin-steps shrink-0"})}),Oi=e=>({info:r.jsx(_.IconInfoCircleFilled,{size:e.size}),error:r.jsx(_.IconAlertCircleFilled,{size:e.size}),warning:r.jsx(_.IconAlertTriangleFilled,{size:e.size}),success:r.jsx(_.IconCircleCheckFilled,{size:e.size}),loading:r.jsx(Et,{size:e.size}),general:r.jsx(_.IconCheck,{size:e.size,stroke:e.stroke})}),Ai={[ce.Info]:"bg-info border-info text-info",[ce.Success]:"bg-success border-success text-success",[ce.Warning]:"bg-warning border-warning text-warning",[ce.Error]:"bg-error border-error text-error",[ce.Loading]:"bg-info border-info text-info",[ce.General]:"bg-sunken border-secondary text-primary"},_i="items-center justify-between relative gap-3 p-3 border border-solid dial-small-text-150 rounded shadow flex",ki=({variant:e=ce.Info,title:t,message:s,className:n,iconSize:a=24,iconStroke:i=2,closable:o=!1,onClose:l,children:c,textClassName:d="flex-col",...u})=>{const f=g.useMemo(()=>Oi({size:a,stroke:i})[e],[e,a,i]);return r.jsxs("div",{...u,role:"alert",className:S.mergeClasses(_i,Ai[e],n),children:[r.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[r.jsx(C.DialIcon,{icon:f}),t?r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-1 text-primary",d),children:[r.jsx("div",{className:"dial-small-semi-text",children:t}),r.jsx("div",{className:"dial-small-text",children:s})]}):r.jsx("div",{className:"dial-small-text text-primary",children:s})]}),c,o&&r.jsx("div",{className:"relative size-[40px]",children:r.jsx(C.DialGhostIconButton,{className:"absolute top-0 right-0 size-auto","aria-label":"Close notification",icon:r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM}),onClick:l})})]})},$n=({value:e,max:t=100,size:s=O.ElementSize.Standard,labelProps:n,valueLabel:a,id:i,className:o,"aria-label":l,...c})=>{const d=g.useId(),u=i??d,f=!!n?.label,h=f?n?.id??`${u}-label`:void 0,p=t>0?t:0,m=Number.isFinite(e)?e:0,b=Math.min(Math.max(m,0),p),x=p>0?b/p*100:0,v=r.jsx("div",{...c,id:u,role:"progressbar","aria-valuenow":b,"aria-valuemin":0,"aria-valuemax":p,"aria-labelledby":h,"aria-label":O.resolveAccessibleName(l,f?void 0:"Progress"),className:S.mergeClasses("w-full overflow-hidden rounded-full bg-control-disable-primary",s===O.ElementSize.Small?"h-1":"h-2",o,!f&&!a&&C.DIAL_KIT_CLASS.progressBar),children:r.jsx("div",{style:{width:`${x}%`},className:"h-full rounded-full bg-control-accent transition-[width] duration-300 motion-reduce:transition-none"})});return!f&&!a?v:r.jsxs("div",{className:S.mergeClasses("flex w-full flex-col gap-1",C.DIAL_KIT_CLASS.progressBar),children:[r.jsxs("div",{className:"flex items-baseline gap-2",children:[n&&r.jsx(C.Label,{...n,id:h}),a&&r.jsx("span",{className:"dial-tiny-text text-secondary ml-auto shrink-0",children:a})]}),v]})},Ri=7,Mi=2,Pi=e=>e<=0?[]:Array.from({length:e},(t,s)=>s+1);var dr=(e=>(e.Active="active",e.Adjacent="adjacent",e.Far="far",e))(dr||{});const zi=(e,t,s)=>e===t?"active":s<Ri||Math.abs(e-t)<=Mi?"adjacent":"far",Bi=({page:e,totalPages:t,onPageChange:s,className:n})=>{const a=Pi(t);return r.jsxs("nav",{"aria-label":"Pagination",className:S.mergeClasses("flex items-center gap-2",n),children:[r.jsx(O.DialIconButton,{icon:r.jsx(_.IconCaretLeftFilled,{size:P.DIAL_ICON_SIZE.SM,className:"text-secondary"}),size:O.ElementSize.Small,className:"!p-0 items-center flex justify-center",disabled:e<=1,onClick:()=>s(e-1),"aria-label":"Previous page"}),r.jsx("div",{className:"flex flex-row items-center gap-2",children:a.map(i=>{const o=zi(i,e,t);return r.jsx("button",{type:"button",onClick:()=>s(i),"aria-label":`Page ${i}`,"aria-current":i===e?"page":void 0,className:S.mergeClasses("dial-pagination-dot rounded-full focus-visible:outline outline-offset-0 transition-all duration-300 ease-in-out",o===dr.Active&&"h-[8px] w-[32px]",o===dr.Adjacent&&"size-[8px]",o===dr.Far&&"size-[4px]")},i)})}),r.jsx(O.DialIconButton,{icon:r.jsx(_.IconCaretRightFilled,{size:P.DIAL_ICON_SIZE.SM,className:"text-secondary"}),size:O.ElementSize.Small,className:"!p-0 items-center flex justify-center",disabled:e>=t,onClick:()=>s(e+1),"aria-label":"Next page"})]})},es=({label:e,id:t,checked:s,indeterminate:n,disabled:a,ariaLabel:i,onChange:o,className:l,...c})=>{const d=g.useCallback(p=>{o?.(p.target.checked,t)},[o,t]),u=ne("flex flex-row items-center cursor-pointer text-accent-primary small-medium min-w-0",`${s||n?"":'before:content-[""] before:inline-block before:size-[18px] before:border before:border-hover before:rounded'}`,a?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",l),f=ne("border rounded",a?"bg-layer-4 border-icon-secondary":""),h=()=>n?r.jsx(_.IconMinus,{className:f,...P.BASE_ICON_PROPS}):s?r.jsx(_.IconCheck,{className:f,...P.BASE_ICON_PROPS}):null;return r.jsxs("label",{...c,className:u,htmlFor:t,"aria-description":c["aria-description"]||C.ariaDescription,children:[h(),e&&(typeof e=="string"?r.jsx(C.DialEllipsisTooltip,{text:e,className:"ml-2 text-primary"}):e),r.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:d,id:t,checked:s,"aria-checked":n?"mixed":s,"aria-disabled":a||void 0,"aria-label":e?void 0:i,className:"invisible size-0"})]})};var Oe=(e=>(e.VALID="valid",e.ERROR="error",e))(Oe||{});const Fi=(e,t)=>{if(t===e.id)switch(e.status){case Oe.VALID:return"border-accent-secondary text-primary";case Oe.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case Oe.VALID:return"border-primary text-primary";case Oe.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},Hi=(e,t)=>{if(t===e.id)switch(e.status){case Oe.VALID:return"bg-accent-secondary";case Oe.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case Oe.VALID:return"bg-accent-secondary";case Oe.ERROR:return"bg-red-400";default:return"bg-layer-4"}},$i=({step:e,index:t,currentStep:s,onChangeStep:n})=>{const a="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny-text cursor-pointer dial-step",i="w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full",o=()=>s===e.id&&e.status===Oe.ERROR?r.jsx(_.IconExclamationCircle,{stroke:2,size:P.DIAL_ICON_SIZE.SM}):s!==e.id&&e.status===Oe.VALID?r.jsx(_.IconCheck,{stroke:2,size:P.DIAL_ICON_SIZE.SM}):t+1;return r.jsxs("button",{className:ne(a,Fi(e,s)),onClick:()=>n(e.id),children:[r.jsx("span",{className:ne(i,Hi(e,s)),children:o()}),r.jsx("span",{children:e.name})]})},Vi=({steps:e,currentStep:t,onChangeStep:s})=>{const n=a=>{const i=e.findIndex(c=>c.id===t),o=e.findIndex(c=>c.id===a);if(a===t)return;(e.slice(0,o).every(c=>c.status===Oe.VALID)||o<i)&&s(a)};return r.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((a,i)=>r.jsx($i,{currentStep:t,onChangeStep:n,step:a,index:i},a.id))})};var Kt=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(Kt||{});const Ki="w-full flex gap-1",Wi={[Kt.Vertical]:"flex-col",[Kt.Horizontal]:"flex-row items-end"},yr=({id:e,label:t,required:s,description:n,error:a,orientation:i=Kt.Vertical,labelVisuallyHidden:o=!1,className:l,labelClassName:c,errorClassName:d,childrenClassName:u,captionDescription:f,readonly:h,value:p,defaultEmptyText:m,children:b})=>{const x=`${e}-label`,v=n?`${e}-desc`:void 0,y=a?`${e}-err`:void 0,I=`${e}-caption-desc`,j=[v,y].filter(Boolean).join(" ")||void 0,N=g.useCallback(()=>typeof a=="boolean"?null:typeof a=="string"||typeof a>"u"?a?r.jsx("div",{id:y,"aria-live":"polite",className:d,children:r.jsx(Se,{text:a})}):null:r.jsx("div",{id:y,role:"alert","aria-live":"polite",className:d,children:a}),[a,d,y]),w=g.useCallback(()=>p?typeof p=="string"||typeof p=="number"?r.jsx("span",{"aria-readonly":"true",children:p}):p:r.jsx("span",{className:"flex min-h-4","aria-readonly":"true",children:m??"None"}),[p,m]);return r.jsxs("div",{role:"group","aria-labelledby":t?x:void 0,"aria-describedby":j,className:S.mergeClasses(Ki,Wi[i],"gap-3",l),children:[t&&r.jsx("div",{id:x,className:S.mergeClasses(i==="horizontal"&&"shrink-0"),children:r.jsx(ze.DialLabel,{htmlFor:e,label:t,required:s,className:S.mergeClasses(o&&"sr-only",c),caption:n})}),r.jsxs("div",{className:S.mergeClasses("min-w-0 w-full",u),children:[h?r.jsx("div",{className:"dial-input px-3 py-2",children:w()}):b,f&&r.jsx("div",{id:I,className:S.mergeClasses({"dial-tiny-text text-secondary mt-1":!0,"text-error":!!a}),children:f}),N()]})]})};var Ae=(e=>(e.Row="Row",e.Column="Column",e))(Ae||{});const Zi="flex",Gi="pb-1 mt-2",Ui={[Ae.Column]:"flex-col gap-y-2",[Ae.Row]:"flex-row gap-x-4"},Vn=({fieldTitle:e,radioClassName:t,containerClassName:s,selectedItemClassName:n,selectedLabelClassName:a,radioGroupClassName:i,inputContainerClassName:o,selectedInputContainerClassName:l,groupLabelClassName:c,formItemChildrenClassName:d,labelClassName:u,disabled:f,elementId:h,radioButtons:p,activeRadioButton:m,orientation:b,labelDescription:x,onChange:v})=>r.jsx(yr,{id:h,label:e,labelClassName:c||u,description:x,className:s,childrenClassName:d,children:r.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":f||void 0,className:S.mergeClasses(Zi,Ui[b],i),children:p.map(y=>r.jsxs("div",{className:S.mergeClasses("flex flex-col",o,y.id===m&&l),children:[r.jsx(C.DialRadioButton,{name:h,value:y.id,inputId:`${h}-${y.id}`,disabled:f,className:t,labelClassName:S.mergeClasses(u,y.id===m&&a),label:y.name,caption:y.caption,checked:y.id===m,onChange:()=>v(y.id)}),y.id===m&&y.content?r.jsx("div",{className:S.mergeClasses(Gi,n),children:y.content}):null]},y.id))})}),zr=e=>(e.toString().split(".")[1]??"").length,qi=({value:e,min:t=0,max:s=1,step:n=.1,disabled:a=!1,labelProps:i,labels:o,formatValue:l,onChange:c,className:d,trackClassName:u,fillClassName:f,thumbClassName:h,labelsClassName:p,"aria-label":m,"aria-labelledby":b,...x})=>{const v=g.useRef(null),y=Math.max(0,Math.min(100,(e-t)/(s-t)*100)),I=zr(n),j=l?l(e):e.toFixed(I),N=g.useCallback(T=>{const E=v.current;if(!E)return e;const L=E.getBoundingClientRect(),k=(T-L.left)/L.width,z=t+k*(s-t),R=zr(n),Z=parseFloat((Math.round((z-t)/n)*n+t).toFixed(R));return Math.min(s,Math.max(t,Z))},[t,s,n,e]),w=g.useCallback(T=>{a||(T.currentTarget.setPointerCapture(T.pointerId),c?.(N(T.clientX)))},[a,N,c]),A=g.useCallback(T=>{a||T.buttons===0||c?.(N(T.clientX))},[a,N,c]),D=g.useCallback(T=>{if(a)return;const E=zr(n),L=R=>parseFloat((Math.round((R-t)/n)*n+t).toFixed(E)),k=R=>Math.min(s,Math.max(t,R));let z=e;switch(T.key){case"ArrowRight":case"ArrowUp":z=k(L(e+n));break;case"ArrowLeft":case"ArrowDown":z=k(L(e-n));break;case"Home":z=t;break;case"End":z=s;break;default:return}T.preventDefault(),z!==e&&c?.(z)},[a,e,n,t,s,c]);return r.jsxs("div",{className:S.mergeClasses("flex flex-col",a&&"pointer-events-none opacity-50",d),...x,children:[i&&r.jsx(ze.DialLabel,{...i,htmlFor:x.id}),r.jsxs("div",{ref:v,className:"relative flex h-[38px] cursor-pointer items-center",onPointerDown:w,onPointerMove:A,children:[r.jsx("div",{className:S.mergeClasses("pointer-events-none absolute inset-x-0 h-3 rounded-[10px] bg-layer-1",u)}),r.jsx("div",{className:S.mergeClasses("pointer-events-none absolute left-0 h-3 rounded-[10px] bg-controls-accent-primary",f),style:{width:`${y}%`}}),r.jsx("div",{role:"slider",tabIndex:a?-1:0,"aria-valuenow":e,"aria-valuemin":t,"aria-valuemax":s,"aria-disabled":a||void 0,"aria-label":m,"aria-labelledby":b,className:S.mergeClasses("dial-small-text absolute -translate-x-1/2 flex size-[38px] cursor-grab select-none items-center justify-center rounded-full bg-layer-3 text-primary shadow focus:outline-hidden focus-visible:ring-2 focus-visible:ring-focus",h),style:{left:`${y}%`},onKeyDown:D,children:j})]}),o&&r.jsx("div",{className:S.mergeClasses("dial-tiny-text flex text-secondary",p),children:o.length===3?r.jsxs(r.Fragment,{children:[r.jsx("span",{children:o[0]}),r.jsx("span",{className:"flex-1 text-center",children:o[1]}),r.jsx("span",{children:o[2]})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{children:o[0]}),r.jsx("span",{className:"ml-auto",children:o[1]})]})})]})},Br=48,Yi=({containerClassName:e,children:t,width:s=280,title:n,iconSize:a=24,iconStroke:i=1.5,titleClassName:o,additionalButtons:l,isOpened:c,onToggle:d})=>{const[u,f]=g.useState(s),[h,p]=g.useState(!0),m=g.useMemo(()=>typeof c=="boolean",[c]),b=m?c:h;g.useEffect(()=>{m&&f(c?s:Br)},[m,c,s]);const x=S.mergeClasses(["transform rotate-180 [writing-mode:tb-rl] py-4 px-3",b&&"hidden",o]),v=S.mergeClasses(["flex flex-row gap-2 cursor-pointer text-secondary py-2 items-center",b?"justify-end px-4":"justify-center"]),y=I=>{const j=!b;if(m){f(j?s:Br),d?.(j,I);return}f(j?s:Br),p(j)};return r.jsxs("div",{className:S.mergeClasses(["rounded flex flex-col justify-between",e]),style:{width:`${u}px`},"aria-label":"collapsible-sidebar",children:[r.jsx("div",{className:S.mergeClasses(["flex-1 p-4 min-h-0 overflow-auto",!b&&"hidden"]),children:t}),r.jsx("div",{className:x,children:n}),r.jsxs("div",{className:S.mergeClasses("border-t border-tertiary h-12",v),children:[b&&l,r.jsx(O.DialIconButton,{className:"hover:text-accent-primary",onClick:y,"aria-label":"sidebar-state",size:O.ElementSize.Small,icon:b?r.jsx(_.IconChevronsLeft,{size:a,stroke:i}):r.jsx(_.IconChevronsRight,{size:a,stroke:i})})]})]})},Xi=({label:e,text:t,tooltip:s,children:n,postfix:a,className:i})=>r.jsxs("div",{className:S.mergeClasses("flex flex-col",n?"":"max-w-[200px]",i),children:[e&&r.jsx("label",{className:"dial-tiny-text mb-2 text-secondary",children:e}),n||r.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[r.jsx(O.DialTooltip,{triggerClassName:"text-primary flex-1 min-w-0",tooltip:s||t,children:t}),a||null]})]}),Kn=g.createContext({dragDropManager:void 0});function ke(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Fs=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),Hs=function(){return Math.random().toString(36).substring(7).split("").join(".")},$s={INIT:"@@redux/INIT"+Hs(),REPLACE:"@@redux/REPLACE"+Hs()};function Ji(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Qi(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(ro(e))return"date";if(to(e))return"error";var s=eo(e);switch(s){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return s}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function eo(e){return typeof e.constructor=="function"?e.constructor.name:null}function to(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function ro(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Nt(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Qi(e)),t}function Wn(e,t,s){var n;if(typeof t=="function"&&typeof s=="function"||typeof s=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?ke(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof s>"u"&&(s=t,t=void 0),typeof s<"u"){if(typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?ke(1):"Expected the enhancer to be a function. Instead, received: '"+Nt(s)+"'");return s(Wn)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?ke(2):"Expected the root reducer to be a function. Instead, received: '"+Nt(e)+"'");var a=e,i=t,o=[],l=o,c=!1;function d(){l===o&&(l=o.slice())}function u(){if(c)throw new Error(process.env.NODE_ENV==="production"?ke(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function f(b){if(typeof b!="function")throw new Error(process.env.NODE_ENV==="production"?ke(4):"Expected the listener to be a function. Instead, received: '"+Nt(b)+"'");if(c)throw new Error(process.env.NODE_ENV==="production"?ke(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var x=!0;return d(),l.push(b),function(){if(x){if(c)throw new Error(process.env.NODE_ENV==="production"?ke(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");x=!1,d();var y=l.indexOf(b);l.splice(y,1),o=null}}}function h(b){if(!Ji(b))throw new Error(process.env.NODE_ENV==="production"?ke(7):"Actions must be plain objects. Instead, the actual type was: '"+Nt(b)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof b.type>"u")throw new Error(process.env.NODE_ENV==="production"?ke(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(c)throw new Error(process.env.NODE_ENV==="production"?ke(9):"Reducers may not dispatch actions.");try{c=!0,i=a(i,b)}finally{c=!1}for(var x=o=l,v=0;v<x.length;v++){var y=x[v];y()}return b}function p(b){if(typeof b!="function")throw new Error(process.env.NODE_ENV==="production"?ke(10):"Expected the nextReducer to be a function. Instead, received: '"+Nt(b));a=b,h({type:$s.REPLACE})}function m(){var b,x=f;return b={subscribe:function(y){if(typeof y!="object"||y===null)throw new Error(process.env.NODE_ENV==="production"?ke(11):"Expected the observer to be an object. Instead, received: '"+Nt(y)+"'");function I(){y.next&&y.next(u())}I();var j=x(I);return{unsubscribe:j}}},b[Fs]=function(){return this},b}return h({type:$s.INIT}),n={dispatch:h,subscribe:f,getState:u,replaceReducer:p},n[Fs]=m,n}function re(e,t,...s){if(so()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let a=0;n=new Error(t.replace(/%s/g,function(){return s[a++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function so(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function no(e,t,s){return t.split(".").reduce((n,a)=>n&&n[a]?n[a]:s||null,e)}function ao(e,t){return e.filter(s=>s!==t)}function Zn(e){return typeof e=="object"}function io(e,t){const s=new Map,n=i=>{s.set(i,s.has(i)?s.get(i)+1:1)};e.forEach(n),t.forEach(n);const a=[];return s.forEach((i,o)=>{i===1&&a.push(o)}),a}function oo(e,t){return e.filter(s=>t.indexOf(s)>-1)}const fs="dnd-core/INIT_COORDS",Sr="dnd-core/BEGIN_DRAG",ps="dnd-core/PUBLISH_DRAG_SOURCE",Ir="dnd-core/HOVER",Nr="dnd-core/DROP",jr="dnd-core/END_DRAG";function Vs(e,t){return{type:fs,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const lo={type:fs,payload:{clientOffset:null,sourceClientOffset:null}};function co(e){return function(s=[],n={publishSource:!0}){const{publishSource:a=!0,clientOffset:i,getSourceClientOffset:o}=n,l=e.getMonitor(),c=e.getRegistry();e.dispatch(Vs(i)),uo(s,l,c);const d=ho(s,l);if(d==null){e.dispatch(lo);return}let u=null;if(i){if(!o)throw new Error("getSourceClientOffset must be defined");fo(o),u=o(d)}e.dispatch(Vs(i,u));const h=c.getSource(d).beginDrag(l,d);if(h==null)return;po(h),c.pinSource(d);const p=c.getSourceType(d);return{type:Sr,payload:{itemType:p,item:h,sourceId:d,clientOffset:i||null,sourceClientOffset:u||null,isSourcePublic:!!a}}}}function uo(e,t,s){re(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){re(s.getSource(n),"Expected sourceIds to be registered.")})}function fo(e){re(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function po(e){re(Zn(e),"Item must be an object.")}function ho(e,t){let s=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){s=e[n];break}return s}function mo(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function go(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable}))),n.forEach(function(a){mo(e,a,s[a])})}return e}function xo(e){return function(s={}){const n=e.getMonitor(),a=e.getRegistry();Co(n),yo(n).forEach((o,l)=>{const c=bo(o,l,a,n),d={type:Nr,payload:{dropResult:go({},s,c)}};e.dispatch(d)})}}function Co(e){re(e.isDragging(),"Cannot call drop while not dragging."),re(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function bo(e,t,s,n){const a=s.getTarget(e);let i=a?a.drop(n,e):void 0;return vo(i),typeof i>"u"&&(i=t===0?{}:n.getDropResult()),i}function vo(e){re(typeof e>"u"||Zn(e),"Drop result must either be an object or undefined.")}function yo(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function So(e){return function(){const s=e.getMonitor(),n=e.getRegistry();Io(s);const a=s.getSourceId();return a!=null&&(n.getSource(a,!0).endDrag(s,a),n.unpinSource()),{type:jr}}}function Io(e){re(e.isDragging(),"Cannot call endDrag while not dragging.")}function ts(e,t){return t===null?e===null:Array.isArray(e)?e.some(s=>s===t):e===t}function No(e){return function(s,{clientOffset:n}={}){jo(s);const a=s.slice(0),i=e.getMonitor(),o=e.getRegistry(),l=i.getItemType();return wo(a,o,l),Do(a,i,o),Lo(a,i,o),{type:Ir,payload:{targetIds:a,clientOffset:n||null}}}}function jo(e){re(Array.isArray(e),"Expected targetIds to be an array.")}function Do(e,t,s){re(t.isDragging(),"Cannot call hover while not dragging."),re(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){const a=e[n];re(e.lastIndexOf(a)===n,"Expected targetIds to be unique in the passed array.");const i=s.getTarget(a);re(i,"Expected targetIds to be registered.")}}function wo(e,t,s){for(let n=e.length-1;n>=0;n--){const a=e[n],i=t.getTargetType(a);ts(i,s)||e.splice(n,1)}}function Lo(e,t,s){e.forEach(function(n){s.getTarget(n).hover(t,n)})}function To(e){return function(){if(e.getMonitor().isDragging())return{type:ps}}}function Eo(e){return{beginDrag:co(e),publishDragSource:To(e),hover:No(e),drop:xo(e),endDrag:So(e)}}class Oo{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:s}=this.store;function n(i){return(...o)=>{const l=i.apply(t,o);typeof l<"u"&&s(l)}}const a=Eo(this);return Object.keys(a).reduce((i,o)=>{const l=a[o];return i[o]=n(l),i},{})}dispatch(t){this.store.dispatch(t)}constructor(t,s){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=s,t.subscribe(this.handleRefCountChange)}}function Ao(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Gn(e,t){return{x:e.x-t.x,y:e.y-t.y}}function _o(e){const{clientOffset:t,initialClientOffset:s,initialSourceClientOffset:n}=e;return!t||!s||!n?null:Gn(Ao(t,n),s)}function ko(e){const{clientOffset:t,initialClientOffset:s}=e;return!t||!s?null:Gn(t,s)}const Bt=[],hs=[];Bt.__IS_NONE__=!0;hs.__IS_ALL__=!0;function Ro(e,t){return e===Bt?!1:e===hs||typeof t>"u"?!0:oo(t,e).length>0}class Mo{subscribeToStateChange(t,s={}){const{handlerIds:n}=s;re(typeof t=="function","listener must be a function."),re(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let a=this.store.getState().stateId;const i=()=>{const o=this.store.getState(),l=o.stateId;try{l===a||l===a+1&&!Ro(o.dirtyHandlerIds,n)||t()}finally{a=l}};return this.store.subscribe(i)}subscribeToOffsetChange(t){re(typeof t=="function","listener must be a function.");let s=this.store.getState().dragOffset;const n=()=>{const a=this.store.getState().dragOffset;a!==s&&(s=a,t())};return this.store.subscribe(n)}canDragSource(t){if(!t)return!1;const s=this.registry.getSource(t);return re(s,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:s.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const s=this.registry.getTarget(t);if(re(s,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(t),a=this.getItemType();return ts(n,a)&&s.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const s=this.registry.getSource(t,!0);if(re(s,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(t),a=this.getItemType();return n!==a?!1:s.isDragging(this,t)}isOverTarget(t,s={shallow:!1}){if(!t)return!1;const{shallow:n}=s;if(!this.isDragging())return!1;const a=this.registry.getTargetType(t),i=this.getItemType();if(i&&!ts(a,i))return!1;const o=this.getTargetIds();if(!o.length)return!1;const l=o.indexOf(t);return n?l===o.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return _o(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return ko(this.store.getState().dragOffset)}constructor(t,s){this.store=t,this.registry=s}}const Ks=typeof global<"u"?global:self,Un=Ks.MutationObserver||Ks.WebKitMutationObserver;function qn(e){return function(){const s=setTimeout(a,0),n=setInterval(a,50);function a(){clearTimeout(s),clearInterval(n),e()}}}function Po(e){let t=1;const s=new Un(e),n=document.createTextNode("");return s.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const zo=typeof Un=="function"?Po:qn;class Bo{enqueueTask(t){const{queue:s,requestFlush:n}=this;s.length||(n(),this.flushing=!0),s[s.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const s=this.index;if(this.index++,t[s].call(),this.index>this.capacity){for(let n=0,a=t.length-this.index;n<a;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=zo(this.flush),this.requestErrorThrow=qn(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Fo{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,s){this.onError=t,this.release=s,this.task=null}}class Ho{create(t){const s=this.freeTasks,n=s.length?s.pop():new Fo(this.onError,a=>s[s.length]=a);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const Yn=new Bo,$o=new Ho(Yn.registerPendingError);function Vo(e){Yn.enqueueTask($o.create(e))}const ms="dnd-core/ADD_SOURCE",gs="dnd-core/ADD_TARGET",xs="dnd-core/REMOVE_SOURCE",Dr="dnd-core/REMOVE_TARGET";function Ko(e){return{type:ms,payload:{sourceId:e}}}function Wo(e){return{type:gs,payload:{targetId:e}}}function Zo(e){return{type:xs,payload:{sourceId:e}}}function Go(e){return{type:Dr,payload:{targetId:e}}}function Uo(e){re(typeof e.canDrag=="function","Expected canDrag to be a function."),re(typeof e.beginDrag=="function","Expected beginDrag to be a function."),re(typeof e.endDrag=="function","Expected endDrag to be a function.")}function qo(e){re(typeof e.canDrop=="function","Expected canDrop to be a function."),re(typeof e.hover=="function","Expected hover to be a function."),re(typeof e.drop=="function","Expected beginDrag to be a function.")}function rs(e,t){if(t&&Array.isArray(e)){e.forEach(s=>rs(s,!1));return}re(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var Me;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(Me||(Me={}));let Yo=0;function Xo(){return Yo++}function Jo(e){const t=Xo().toString();switch(e){case Me.SOURCE:return`S${t}`;case Me.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function Ws(e){switch(e[0]){case"S":return Me.SOURCE;case"T":return Me.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Zs(e,t){const s=e.entries();let n=!1;do{const{done:a,value:[,i]}=s.next();if(i===t)return!0;n=!!a}while(!n);return!1}class Qo{addSource(t,s){rs(t),Uo(s);const n=this.addHandler(Me.SOURCE,t,s);return this.store.dispatch(Ko(n)),n}addTarget(t,s){rs(t,!0),qo(s);const n=this.addHandler(Me.TARGET,t,s);return this.store.dispatch(Wo(n)),n}containsHandler(t){return Zs(this.dragSources,t)||Zs(this.dropTargets,t)}getSource(t,s=!1){return re(this.isSourceId(t),"Expected a valid source ID."),s&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return re(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return re(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return re(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return Ws(t)===Me.SOURCE}isTargetId(t){return Ws(t)===Me.TARGET}removeSource(t){re(this.getSource(t),"Expected an existing source."),this.store.dispatch(Zo(t)),Vo(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){re(this.getTarget(t),"Expected an existing target."),this.store.dispatch(Go(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const s=this.getSource(t);re(s,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=s}unpinSource(){re(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,s,n){const a=Jo(t);return this.types.set(a,s),t===Me.SOURCE?this.dragSources.set(a,n):t===Me.TARGET&&this.dropTargets.set(a,n),a}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const el=(e,t)=>e===t;function tl(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function rl(e,t,s=el){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!s(e[n],t[n]))return!1;return!0}function sl(e=Bt,t){switch(t.type){case Ir:break;case ms:case gs:case Dr:case xs:return Bt;case Sr:case ps:case jr:case Nr:default:return hs}const{targetIds:s=[],prevTargetIds:n=[]}=t.payload,a=io(s,n);if(!(a.length>0||!rl(s,n)))return Bt;const o=n[n.length-1],l=s[s.length-1];return o!==l&&(o&&a.push(o),l&&a.push(l)),a}function nl(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function al(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable}))),n.forEach(function(a){nl(e,a,s[a])})}return e}const Gs={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function il(e=Gs,t){const{payload:s}=t;switch(t.type){case fs:case Sr:return{initialSourceClientOffset:s.sourceClientOffset,initialClientOffset:s.clientOffset,clientOffset:s.clientOffset};case Ir:return tl(e.clientOffset,s.clientOffset)?e:al({},e,{clientOffset:s.clientOffset});case jr:case Nr:return Gs;default:return e}}function ol(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function jt(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable}))),n.forEach(function(a){ol(e,a,s[a])})}return e}const ll={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function cl(e=ll,t){const{payload:s}=t;switch(t.type){case Sr:return jt({},e,{itemType:s.itemType,item:s.item,sourceId:s.sourceId,isSourcePublic:s.isSourcePublic,dropResult:null,didDrop:!1});case ps:return jt({},e,{isSourcePublic:!0});case Ir:return jt({},e,{targetIds:s.targetIds});case Dr:return e.targetIds.indexOf(s.targetId)===-1?e:jt({},e,{targetIds:ao(e.targetIds,s.targetId)});case Nr:return jt({},e,{dropResult:s.dropResult,didDrop:!0,targetIds:[]});case jr:return jt({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function dl(e=0,t){switch(t.type){case ms:case gs:return e+1;case xs:case Dr:return e-1;default:return e}}function ul(e=0){return e+1}function fl(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function pl(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable}))),n.forEach(function(a){fl(e,a,s[a])})}return e}function hl(e={},t){return{dirtyHandlerIds:sl(e.dirtyHandlerIds,{type:t.type,payload:pl({},t.payload,{prevTargetIds:no(e,"dragOperation.targetIds",[])})}),dragOffset:il(e.dragOffset,t),refCount:dl(e.refCount,t),dragOperation:cl(e.dragOperation,t),stateId:ul(e.stateId)}}function ml(e,t=void 0,s={},n=!1){const a=gl(n),i=new Mo(a,new Qo(a)),o=new Oo(a,i),l=e(o,t,s);return o.receiveBackend(l),o}function gl(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Wn(hl,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function xl(e,t){if(e==null)return{};var s=Cl(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}function Cl(e,t){if(e==null)return{};var s={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(s[a]=e[a]);return s}let Us=0;const ur=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var bl=g.memo(function(t){var{children:s}=t,n=xl(t,["children"]);const[a,i]=vl(n);return g.useEffect(()=>{if(i){const o=Xn();return++Us,()=>{--Us===0&&(o[ur]=null)}}},[]),r.jsx(Kn.Provider,{value:a,children:s})});function vl(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=yl(e.backend,e.context,e.options,e.debugMode),s=!e.context;return[t,s]}function yl(e,t=Xn(),s,n){const a=t;return a[ur]||(a[ur]={dragDropManager:ml(e,t,s,n)}),a[ur]}function Xn(){return typeof global<"u"?global:window}function Sl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fr,qs;function Il(){return qs||(qs=1,Fr=function e(t,s){if(t===s)return!0;if(t&&s&&typeof t=="object"&&typeof s=="object"){if(t.constructor!==s.constructor)return!1;var n,a,i;if(Array.isArray(t)){if(n=t.length,n!=s.length)return!1;for(a=n;a--!==0;)if(!e(t[a],s[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&&t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(s).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(s,i[a]))return!1;for(a=n;a--!==0;){var o=i[a];if(!e(t[o],s[o]))return!1}return!0}return t!==t&&s!==s}),Fr}var Nl=Il();const jl=Sl(Nl),mt=typeof window<"u"?g.useLayoutEffect:g.useEffect;function Dl(e,t,s){const[n,a]=g.useState(()=>t(e)),i=g.useCallback(()=>{const o=t(e);jl(n,o)||(a(o),s&&s())},[n,e,s]);return mt(i),[n,i]}function wl(e,t,s){const[n,a]=Dl(e,t,s);return mt(function(){const o=e.getHandlerId();if(o!=null)return e.subscribeToStateChange(a,{handlerIds:[o]})},[e,a]),n}function Jn(e,t,s){return wl(t,e||(()=>({})),()=>s.reconnect())}function Qn(e,t){const s=[...t||[]];return t==null&&typeof e!="function"&&s.push(e),g.useMemo(()=>typeof e=="function"?e():e,s)}function Ll(e){return g.useMemo(()=>e.hooks.dragSource(),[e])}function Tl(e){return g.useMemo(()=>e.hooks.dragPreview(),[e])}let Hr=!1,$r=!1;class El{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){re(!Hr,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Hr=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Hr=!1}}isDragging(){if(!this.sourceId)return!1;re(!$r,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return $r=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{$r=!1}}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,s){return this.internalMonitor.isOverTarget(t,s)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let Vr=!1;class Ol{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}canDrop(){if(!this.targetId)return!1;re(!Vr,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Vr=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Vr=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function Al(e,t,s){const n=s.getRegistry(),a=n.addTarget(e,t);return[a,()=>n.removeTarget(a)]}function _l(e,t,s){const n=s.getRegistry(),a=n.addSource(e,t);return[a,()=>n.removeSource(a)]}function ss(e,t,s,n){let a;if(a!==void 0)return!!a;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let c=0;c<i.length;c++){const d=i[c];if(!l(d))return!1;const u=e[d],f=t[d];if(a=void 0,a===!1||a===void 0&&u!==f)return!1}return!0}function ns(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kl(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function Rl(e){return(t=null,s=null)=>{if(!g.isValidElement(t)){const i=t;return e(i,s),i}const n=t;return kl(n),Ml(n,s?i=>e(i,s):e)}}function ea(e){const t={};return Object.keys(e).forEach(s=>{const n=e[s];if(s.endsWith("Ref"))t[s]=e[s];else{const a=Rl(n);t[s]=()=>a}}),t}function Ys(e,t){typeof e=="function"?e(t):e.current=t}function Ml(e,t){const s=e.ref;return re(typeof s!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),s?g.cloneElement(e,{ref:n=>{Ys(s,n),Ys(t,n)}}):g.cloneElement(e,{ref:t})}class Pl{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,s=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return s&&this.disconnectDragSource(),this.handlerId?t?(s&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),s):(this.lastConnectedDragSource=t,s):s}reconnectDragPreview(t=!1){const s=this.dragPreview,n=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!s){this.lastConnectedDragPreview=s;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=s,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,s,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!ss(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ss(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=ea({dragSource:(s,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,ns(s)?this.dragSourceRef=s:this.dragSourceNode=s,this.reconnectDragSource()},dragPreview:(s,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,ns(s)?this.dragPreviewRef=s:this.dragPreviewNode=s,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class zl{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const s=this.dropTarget;if(this.handlerId){if(!s){this.lastConnectedDropTarget=s;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=s,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,s,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!ss(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=ea({dropTarget:(s,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,ns(s)?this.dropTargetRef=s:this.dropTargetNode=s,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function Ot(){const{dragDropManager:e}=g.useContext(Kn);return re(e!=null,"Expected drag drop context"),e}function Bl(e,t){const s=Ot(),n=g.useMemo(()=>new Pl(s.getBackend()),[s]);return mt(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),mt(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function Fl(){const e=Ot();return g.useMemo(()=>new El(e),[e])}class Hl{beginDrag(){const t=this.spec,s=this.monitor;let n=null;return typeof t.item=="object"?n=t.item:typeof t.item=="function"?n=t.item(s):n={},n??null}canDrag(){const t=this.spec,s=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(s):!0}isDragging(t,s){const n=this.spec,a=this.monitor,{isDragging:i}=n;return i?i(a):s===t.getSourceId()}endDrag(){const t=this.spec,s=this.monitor,n=this.connector,{end:a}=t;a&&a(s.getItem(),s),n.reconnect()}constructor(t,s,n){this.spec=t,this.monitor=s,this.connector=n}}function $l(e,t,s){const n=g.useMemo(()=>new Hl(e,t,s),[t,s]);return g.useEffect(()=>{n.spec=e},[e]),n}function Vl(e){return g.useMemo(()=>{const t=e.type;return re(t!=null,"spec.type must be defined"),t},[e])}function Kl(e,t,s){const n=Ot(),a=$l(e,t,s),i=Vl(e);mt(function(){if(i!=null){const[l,c]=_l(i,a,n);return t.receiveHandlerId(l),s.receiveHandlerId(l),c}},[n,t,s,a,i])}function Wl(e,t){const s=Qn(e,t);re(!s.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=Fl(),a=Bl(s.options,s.previewOptions);return Kl(s,n,a),[Jn(s.collect,n,a),Ll(a),Tl(a)]}function Zl(e){return g.useMemo(()=>e.hooks.dropTarget(),[e])}function Gl(e){const t=Ot(),s=g.useMemo(()=>new zl(t.getBackend()),[t]);return mt(()=>(s.dropTargetOptions=e||null,s.reconnect(),()=>s.disconnectDropTarget()),[e]),s}function Ul(){const e=Ot();return g.useMemo(()=>new Ol(e),[e])}function ql(e){const{accept:t}=e;return g.useMemo(()=>(re(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class Yl{canDrop(){const t=this.spec,s=this.monitor;return t.canDrop?t.canDrop(s.getItem(),s):!0}hover(){const t=this.spec,s=this.monitor;t.hover&&t.hover(s.getItem(),s)}drop(){const t=this.spec,s=this.monitor;if(t.drop)return t.drop(s.getItem(),s)}constructor(t,s){this.spec=t,this.monitor=s}}function Xl(e,t){const s=g.useMemo(()=>new Yl(e,t),[t]);return g.useEffect(()=>{s.spec=e},[e]),s}function Jl(e,t,s){const n=Ot(),a=Xl(e,t),i=ql(e);mt(function(){const[l,c]=Al(i,a,n);return t.receiveHandlerId(l),s.receiveHandlerId(l),c},[n,t,a,s,i.map(o=>o.toString()).join("|")])}function Cs(e,t){const s=Qn(e,t),n=Ul(),a=Gl(s.options);return Jl(s,n,a),[Jn(s.collect,n,a),Zl(a)]}const Xs="column",Ql="flex items-center",ec="mr-3 cursor-move text-secondary",tc=({id:e,children:t,className:s,onFind:n,onMove:a,ariaLabel:i="Drag item"})=>{const o=g.useRef(null),l=g.useRef(null),c=typeof n=="function"?n(e):-1,[{isDragging:d},u,f]=Wl(()=>({type:Xs,item:{id:e,originalIndex:c},collect:p=>{const m=p.getItem();return{isDragging:p.isDragging()&&m?.id===e}},end:(p,m)=>{if(!p)return;!m.didDrop()&&typeof a=="function"&&p.originalIndex>-1&&a(p.id,p.originalIndex)}}),[e,c,a]),[,h]=Cs(()=>({accept:Xs,hover:p=>{if(!(!p||p.id===e)&&typeof n=="function"&&typeof a=="function"){const m=n(e);a(p.id,m)}}}),[n,a,e]);return f(h(l)),u(o),r.jsxs("div",{ref:l,className:S.mergeClasses(Ql,s),style:{opacity:d?0:1},"aria-roledescription":"Draggable item",children:[r.jsx("div",{ref:o,className:ec,"aria-label":i,children:r.jsx(_.IconGripVertical,{...P.BASE_ICON_PROPS})}),t]})},rc=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M3.68628 10.3945C3.91003 10.408 4.10927 10.4422 4.2832 10.4978L4.28394 10.4971C4.5167 10.5698 4.71621 10.6662 4.87939 10.7871C4.9994 10.876 5.10332 10.974 5.18994 11.0815L5.27051 11.1929L5.27197 11.1943L5.34009 11.3079C5.38301 11.3838 5.42067 11.4597 5.45288 11.5356L5.49683 11.6492L5.49756 11.6514L5.53198 11.7649C5.56274 11.877 5.5838 11.9867 5.59497 12.0938C5.61194 12.23 5.62059 12.3501 5.62061 12.4534C5.62061 12.6166 5.57231 12.7639 5.47559 12.8906C5.41544 12.9694 5.325 13.0198 5.21997 13.0503C5.11455 13.0809 4.98537 13.0942 4.83691 13.0942C4.73711 13.0942 4.62608 13.0838 4.50439 13.0635C4.37577 13.0415 4.26002 12.9966 4.16089 12.9272L4.15869 12.9258C4.04118 12.8396 3.98657 12.7121 3.98657 12.5625C3.98655 12.2721 3.94576 12.0552 3.87231 11.9033L3.87158 11.9011C3.81572 11.7798 3.69406 11.7026 3.45337 11.7026C3.33114 11.7027 3.25307 11.7292 3.20435 11.7671C3.14221 11.8149 3.10061 11.864 3.07617 11.9128C3.04149 11.985 3.02355 12.0599 3.02124 12.1384V14.7905L3.02637 14.8652C3.03466 14.9384 3.05266 15.0073 3.07983 15.0725L3.10254 15.1201C3.12874 15.1672 3.16488 15.2124 3.21167 15.2556C3.2602 15.2978 3.33572 15.3259 3.45337 15.3259C3.56813 15.3259 3.65533 15.3041 3.71997 15.2673C3.78314 15.2313 3.83208 15.1772 3.86646 15.0996C3.94535 14.9186 3.98655 14.7002 3.98657 14.4412C3.98657 14.3004 4.04381 14.1839 4.1499 14.0991L4.19824 14.0647C4.33673 13.9762 4.55866 13.9431 4.83691 13.9431C5.09384 13.9431 5.30559 13.9858 5.43604 14.1013C5.55182 14.204 5.62061 14.3293 5.62061 14.4749C5.62057 14.7549 5.57953 15.0125 5.49536 15.2461L5.45654 15.3442C5.36294 15.5677 5.23261 15.7627 5.06543 15.928L4.99146 15.9968C4.58057 16.3629 4.03856 16.541 3.37793 16.541L3.12671 16.5278C3.00679 16.5188 2.87303 16.495 2.72607 16.4575C2.61505 16.4287 2.50136 16.3894 2.38696 16.3396L2.27197 16.2861C2.1155 16.2094 1.9705 16.0983 1.83691 15.9558L1.83618 15.9551C1.70598 15.8128 1.59909 15.6391 1.51392 15.4365L1.51318 15.4351C1.42797 15.2251 1.38722 14.9736 1.38721 14.6843V12.345C1.38721 12.1069 1.41644 11.892 1.47656 11.7026C1.52068 11.5616 1.57629 11.4337 1.64355 11.3196L1.7146 11.2097C1.81013 11.07 1.92167 10.9524 2.04932 10.8582C2.17206 10.7676 2.29884 10.6909 2.42871 10.6289L2.54297 10.5798C2.81231 10.4716 3.11394 10.4081 3.44678 10.3879L3.45337 10.3872L3.68628 10.3945Z",fill:"currentColor"}),te.createElement("path",{d:"M8.10791 11.7371C8.33261 11.7371 8.5218 11.8023 8.61255 11.9758C8.68772 12.1131 8.72383 12.2741 8.72388 12.4534V12.7522H9.03003C9.21461 12.7522 9.37781 12.7845 9.5127 12.8562C9.68704 12.9456 9.7463 13.149 9.74634 13.3843C9.74634 13.612 9.68105 13.8034 9.50537 13.894L9.5061 13.8948C9.36923 13.9665 9.20861 14.0002 9.03003 14.0002H8.72388V14.3064C8.72388 14.4941 8.68994 14.6588 8.61768 14.7942L8.61841 14.7949C8.5293 14.9647 8.334 15.0226 8.10791 15.0227C7.87257 15.0227 7.66761 14.9685 7.5769 14.8L7.57617 14.7993C7.50612 14.6659 7.47583 14.4988 7.47583 14.3064V14.0002H7.18579C6.99507 14.0002 6.82804 13.9669 6.69214 13.894C6.52182 13.8026 6.46069 13.6102 6.46069 13.3843C6.46073 13.1491 6.51509 12.944 6.68335 12.8533L6.68481 12.8525L6.79102 12.8079C6.90305 12.7697 7.03293 12.7522 7.177 12.7522H7.47583V12.4534C7.47587 12.2683 7.50712 12.1056 7.57617 11.9707L7.5769 11.9685L7.61646 11.9092C7.72038 11.7825 7.90134 11.7371 8.10791 11.7371Z",fill:"currentColor"}),te.createElement("path",{d:"M12.728 11.7371C12.9527 11.7371 13.1419 11.8023 13.2327 11.9758C13.3078 12.1131 13.3439 12.2741 13.344 12.4534V12.7522H13.6501C13.8347 12.7522 13.9979 12.7845 14.1328 12.8562C14.3072 12.9456 14.3664 13.149 14.3665 13.3843C14.3665 13.612 14.3012 13.8034 14.1255 13.894L14.1262 13.8948C13.9894 13.9665 13.8287 14.0002 13.6501 14.0002H13.344V14.3064C13.344 14.4941 13.3101 14.6588 13.2378 14.7942L13.2385 14.7949C13.1494 14.9647 12.9541 15.0226 12.728 15.0227C12.4927 15.0227 12.2877 14.9685 12.197 14.8L12.1963 14.7993C12.1262 14.6659 12.0959 14.4988 12.0959 14.3064V14.0002H11.8059C11.6152 14.0002 11.4482 13.9669 11.3123 13.894C11.1419 13.8026 11.0808 13.6102 11.0808 13.3843C11.0808 13.1491 11.1352 12.944 11.3035 12.8533L11.3049 12.8525L11.4111 12.8079C11.5232 12.7697 11.653 12.7522 11.7971 12.7522H12.0959V12.4534C12.096 12.2683 12.1272 12.1056 12.1963 11.9707L12.197 11.9685L12.2366 11.9092C12.3405 11.7825 12.5215 11.7371 12.728 11.7371Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),sc=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M4.29639 10.3945C4.50665 10.4083 4.69413 10.4433 4.85815 10.5L4.85889 10.4993C5.07789 10.5733 5.26574 10.6715 5.41919 10.7944C5.53204 10.8849 5.62958 10.9843 5.71069 11.0933L5.78613 11.2053L5.78687 11.2068L5.85059 11.3218C5.89058 11.3983 5.92606 11.4746 5.95605 11.551L5.99707 11.666L5.9978 11.6682L6.05566 11.8945C6.0708 11.9689 6.08168 12.0422 6.08862 12.1143C6.10449 12.252 6.11279 12.3734 6.11279 12.4775C6.11276 12.6403 6.06824 12.7876 5.97803 12.9155C5.92155 12.9956 5.83545 13.0472 5.73486 13.0789C5.63441 13.1104 5.51212 13.1243 5.37231 13.1243C5.32505 13.1243 5.27524 13.1215 5.2229 13.1162L5.05811 13.0928C4.93553 13.0701 4.82533 13.024 4.73145 12.9529L4.72998 12.9514C4.61882 12.8632 4.56958 12.7352 4.56958 12.5874C4.56955 12.2926 4.5312 12.0715 4.46191 11.9165L4.46045 11.9143C4.4319 11.8474 4.38931 11.8003 4.33154 11.7686C4.27185 11.7358 4.18944 11.7158 4.07812 11.7158C3.96626 11.7158 3.89622 11.7421 3.85254 11.7788C3.79519 11.8265 3.75637 11.8759 3.73315 11.926C3.70026 11.9999 3.68262 12.0771 3.68042 12.1582V14.8425L3.68555 14.9187C3.69337 14.9937 3.71038 15.0643 3.73608 15.1311L3.75732 15.1802C3.78176 15.2276 3.81496 15.2727 3.85767 15.3157L3.89575 15.3442C3.93843 15.3699 3.99697 15.386 4.07812 15.386C4.18296 15.386 4.26146 15.3647 4.31982 15.3289C4.37727 15.2935 4.4233 15.2389 4.45605 15.1589C4.53037 14.9746 4.56957 14.7522 4.56958 14.4888C4.56958 14.3307 4.63662 14.2007 4.7666 14.1116L4.82007 14.0801C4.95284 14.0119 5.14337 13.9856 5.37231 13.9856C5.61445 13.9856 5.81633 14.0298 5.94067 14.1489C6.04986 14.2536 6.11274 14.379 6.11279 14.5225C6.11279 14.8453 6.06245 15.1386 5.95972 15.3999C5.85998 15.6574 5.71501 15.8781 5.52466 16.0598L5.52393 16.0591C5.13817 16.4307 4.62871 16.6128 4.00708 16.6128C3.95774 16.6128 3.87811 16.6081 3.77124 16.5996C3.65793 16.5904 3.53127 16.5659 3.39331 16.5278C3.28866 16.4984 3.18149 16.4584 3.07397 16.4077L2.96631 16.3535C2.81858 16.2752 2.68196 16.1624 2.55688 16.0181L2.55615 16.0166C2.43435 15.8725 2.33453 15.6972 2.25513 15.4929L2.25439 15.4915C2.17508 15.28 2.13721 15.0267 2.13721 14.7349V12.3669C2.13721 12.1269 2.16476 11.9109 2.2207 11.7202L2.26538 11.5825C2.3136 11.4491 2.37234 11.3289 2.44263 11.2229C2.53187 11.0816 2.63607 10.9621 2.7561 10.8662C2.87117 10.7743 2.98996 10.6964 3.11206 10.6333L3.11353 10.6326L3.22046 10.5828C3.47384 10.4727 3.75793 10.4085 4.0708 10.3879L4.07812 10.3872L4.29639 10.3945Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H8.625C8.21079 16.5 7.875 16.1642 7.875 15.75C7.875 15.3358 8.21079 15 8.625 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),nc=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M3.62109 10.571C3.83849 10.5842 4.03206 10.618 4.20117 10.6721L4.2019 10.6714C4.42776 10.742 4.62121 10.8352 4.77979 10.9526C4.89663 11.0392 4.99793 11.135 5.08228 11.2397L5.16064 11.3474L5.16211 11.3489L5.22803 11.4595C5.26973 11.5332 5.30659 11.6069 5.33789 11.6807L5.38037 11.7905L5.3811 11.7935L5.44116 12.0117C5.45675 12.0826 5.46834 12.1524 5.47559 12.2212L5.49463 12.4087C5.49888 12.4674 5.50049 12.5222 5.50049 12.5728C5.50045 12.7317 5.45415 12.8755 5.35986 12.999C5.30088 13.0762 5.2117 13.1246 5.10938 13.1543C5.0067 13.1841 4.88146 13.1975 4.7373 13.1975C4.64029 13.1975 4.53244 13.1872 4.41431 13.1675C4.28898 13.1461 4.17557 13.1026 4.07886 13.0349L4.07739 13.0334C3.96236 12.9491 3.90894 12.8243 3.90894 12.6782C3.90893 12.3968 3.86925 12.187 3.79834 12.0403L3.79761 12.0381C3.74418 11.922 3.62816 11.847 3.39551 11.8469C3.27715 11.8469 3.20179 11.873 3.15527 11.9092C3.09597 11.9548 3.05572 12.0012 3.03223 12.0476L3.03296 12.0483C2.99919 12.1182 2.98102 12.1906 2.97876 12.2666V14.8396L2.98389 14.9114C2.99188 14.9821 3.00888 15.049 3.03516 15.1121L3.05786 15.1582C3.08304 15.2033 3.11768 15.2464 3.1626 15.2878C3.2089 15.3285 3.28115 15.356 3.39551 15.356C3.50633 15.3559 3.58982 15.3349 3.65186 15.2996C3.71249 15.2651 3.75936 15.2131 3.79248 15.1384L3.84302 15.0007C3.88665 14.8554 3.90893 14.6891 3.90894 14.5005C3.90894 14.363 3.96502 14.2494 4.0686 14.1665L4.11621 14.1328C4.25147 14.0465 4.46739 14.0134 4.7373 14.0134C4.98658 14.0134 5.19278 14.0552 5.32031 14.168C5.43323 14.268 5.5004 14.3903 5.50049 14.5327C5.50049 14.8049 5.46077 15.0556 5.37891 15.2827L5.34155 15.3779C5.23762 15.6261 5.08621 15.8373 4.88892 16.0115L4.88965 16.0122C4.49029 16.3681 3.96383 16.541 3.32227 16.541C3.27168 16.541 3.18935 16.5367 3.07837 16.5286C3.02014 16.5242 2.95789 16.5158 2.89307 16.5044L2.68799 16.4597C2.5801 16.4317 2.47025 16.3938 2.35913 16.3455L2.2478 16.2935C2.09553 16.2188 1.95433 16.1112 1.82446 15.9727L1.82373 15.9712C1.69712 15.8328 1.593 15.6642 1.51025 15.4673L1.50952 15.4658C1.42669 15.2616 1.38721 15.0172 1.38721 14.7363V12.4666C1.38723 12.2355 1.41597 12.0273 1.47437 11.8433C1.53119 11.6615 1.60684 11.502 1.70361 11.3665L1.77686 11.2676C1.85263 11.1732 1.9374 11.0913 2.03101 11.0222C2.15024 10.9342 2.27322 10.8598 2.39941 10.7996L2.40015 10.7988L2.51074 10.7512C2.77229 10.6462 3.0652 10.5848 3.38818 10.5652L3.39551 10.5645L3.62109 10.571Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.36914 11.28C9.50263 11.28 9.62352 11.3063 9.72583 11.3643L9.7251 11.365C9.85906 11.4379 9.90454 11.5838 9.90454 11.7429C9.9045 11.7567 9.90157 11.7778 9.89941 11.7935C9.89658 11.814 9.89242 11.8422 9.88696 11.8777C9.87611 11.9455 9.8639 12.0222 9.85034 12.1062C9.84553 12.136 9.84018 12.1643 9.83569 12.1912H10.0525C10.1919 12.1912 10.3171 12.2148 10.4216 12.2688L10.4209 12.2695C10.5686 12.3412 10.6128 12.5089 10.6128 12.6863C10.6128 12.8587 10.5617 13.0123 10.4194 13.0898L10.4187 13.0906C10.3122 13.1472 10.1885 13.1726 10.0525 13.1726H9.67529L9.55225 13.8589H9.75952C9.89706 13.8589 10.0206 13.8819 10.1243 13.9343C10.2748 14.005 10.3198 14.1752 10.3198 14.354C10.3198 14.5291 10.2702 14.6875 10.1243 14.7627L10.1235 14.7634C10.0176 14.8164 9.89461 14.8403 9.75952 14.8403H9.38452L9.33398 15.1677L9.33325 15.1714C9.30492 15.3271 9.26297 15.4669 9.20728 15.5903L9.20801 15.5911C9.17656 15.6626 9.13001 15.7228 9.06592 15.7646C9.00162 15.8065 8.92683 15.8247 8.84839 15.8247C8.72 15.8247 8.60307 15.8041 8.50122 15.7581L8.49976 15.7573C8.35755 15.6908 8.31299 15.5386 8.31299 15.3787C8.31299 15.3406 8.31787 15.2939 8.32617 15.241L8.35913 15.0242C8.36863 14.9624 8.37948 14.9012 8.38989 14.8403H7.92847L7.87793 15.1677L7.8772 15.1714C7.84887 15.3271 7.80691 15.4669 7.75122 15.5903L7.75195 15.5911C7.72046 15.6627 7.6734 15.7228 7.60913 15.7646C7.54487 15.8064 7.47071 15.8247 7.39233 15.8247C7.26394 15.8247 7.14702 15.8041 7.04517 15.7581L7.0437 15.7573C6.90149 15.6908 6.85693 15.5387 6.85693 15.3787C6.85694 15.3406 6.86181 15.2939 6.87012 15.241L6.90308 15.0242C6.91257 14.9624 6.92342 14.9012 6.93384 14.8403H6.6687C6.52906 14.8403 6.40313 14.8167 6.29663 14.7634L6.29297 14.762C6.15355 14.6853 6.10844 14.5261 6.1084 14.354C6.1084 14.1782 6.1487 14.0079 6.29297 13.9358C6.39784 13.882 6.52535 13.8589 6.6687 13.8589H7.09497L7.21802 13.1726H6.95361C6.81311 13.1726 6.68646 13.1475 6.57935 13.0906L6.57788 13.0898C6.43874 13.0135 6.39332 12.8568 6.39331 12.6863C6.39331 12.5105 6.43361 12.3402 6.57788 12.2681C6.68271 12.2144 6.81036 12.1912 6.95361 12.1912H7.38721L7.46045 11.7561C7.47174 11.6625 7.50842 11.5673 7.56372 11.4712C7.63824 11.3418 7.76255 11.2801 7.91309 11.28C8.04657 11.28 8.16746 11.3063 8.26978 11.3643L8.26904 11.365C8.403 11.4379 8.44849 11.5838 8.44849 11.7429C8.44844 11.7567 8.44552 11.7778 8.44336 11.7935C8.44053 11.814 8.43636 11.8422 8.43091 11.8777C8.42006 11.9455 8.40784 12.0222 8.39429 12.1062C8.38947 12.136 8.38413 12.1643 8.37964 12.1912H8.84326L8.9165 11.7561C8.92779 11.6625 8.96448 11.5673 9.01978 11.4712C9.0943 11.3418 9.21861 11.2801 9.36914 11.28ZM8.09619 13.8589H8.55103L8.67407 13.1726H8.21924L8.09619 13.8589Z",fill:"currentColor"})),ac=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M4.43188 10.4409C4.65285 10.4409 4.85471 10.4869 4.99951 10.6152L4.99878 10.6159C5.13097 10.7305 5.21409 10.881 5.25146 11.0576C5.28474 11.2148 5.30052 11.3869 5.30054 11.5724V15.4323C5.30054 15.6193 5.28417 15.7927 5.25146 15.9516L5.2522 15.9523C5.21779 16.1313 5.13551 16.2842 4.99951 16.3976L4.99878 16.3969C4.85386 16.52 4.65269 16.5646 4.43188 16.5646C4.21337 16.5646 4.01411 16.5195 3.86792 16.3976L3.86353 16.394C3.73466 16.2798 3.65263 16.1299 3.6123 15.9553L3.61157 15.9516C3.57826 15.7941 3.5625 15.6205 3.5625 15.4323V11.5724C3.56252 11.3869 3.5783 11.2148 3.61157 11.0576C3.64882 10.8815 3.72996 10.7302 3.85986 10.6152L3.86133 10.6137C4.00804 10.4875 4.2103 10.4409 4.43188 10.4409Z",fill:"currentColor"}),te.createElement("path",{d:"M8.07129 10.4474C8.18434 10.4599 8.28945 10.4924 8.3811 10.55L8.38184 10.5493C8.45754 10.5942 8.52569 10.6451 8.58472 10.7016L8.64111 10.7602L8.64331 10.7631L8.69385 10.8298C8.72596 10.8768 8.75504 10.9284 8.78101 10.9836L8.81763 11.0685L8.81909 11.0729L9.85986 13.8928V11.2692C9.85986 11.0565 9.89522 10.8654 9.98291 10.7119L9.98364 10.7104L10.0349 10.6393C10.1656 10.4886 10.3781 10.4409 10.5974 10.4409C10.8635 10.4409 11.125 10.4947 11.2529 10.6965C11.3535 10.8508 11.3928 11.0487 11.3928 11.2692V15.4323C11.3928 15.6163 11.3809 15.7863 11.3577 15.9413L11.3584 15.9421C11.3349 16.1167 11.2678 16.2708 11.1467 16.3881C11.0102 16.5202 10.8106 16.5646 10.5974 16.5646H10.0554C9.86994 16.5646 9.69972 16.5199 9.56104 16.416C9.44129 16.3261 9.3452 16.215 9.27466 16.0842C9.21353 15.9706 9.16292 15.8593 9.12378 15.7509L8.14893 13.1091V15.7363C8.14893 15.9493 8.11322 16.1406 8.02661 16.2958L8.02588 16.2973C7.90706 16.5052 7.66112 16.5646 7.41138 16.5646C7.14233 16.5646 6.88122 16.5106 6.75 16.312C6.64812 16.1572 6.60791 15.9581 6.60791 15.7363V11.5724C6.60792 11.3882 6.61818 11.2193 6.63867 11.0671V11.0641L6.66724 10.9367C6.7042 10.8142 6.76699 10.706 6.85986 10.6188C6.9982 10.4862 7.19704 10.4409 7.41138 10.4409H7.95337L8.07129 10.4474Z",fill:"currentColor"}),te.createElement("path",{d:"M13.5688 10.4409C13.7898 10.4409 13.9917 10.4869 14.1365 10.6152L14.1357 10.6159C14.2679 10.7305 14.3511 10.881 14.3884 11.0576C14.4217 11.2148 14.4375 11.3869 14.4375 11.5724V15.4323C14.4375 15.6193 14.4211 15.7927 14.3884 15.9516L14.3892 15.9523C14.3548 16.1313 14.2725 16.2842 14.1365 16.3976L14.1357 16.3969C13.9908 16.52 13.7897 16.5646 13.5688 16.5646C13.3503 16.5646 13.1511 16.5195 13.0049 16.3976L13.0005 16.394C12.8716 16.2798 12.7896 16.1299 12.7493 15.9553L12.7485 15.9516C12.7152 15.7941 12.6995 15.6205 12.6995 15.4323V11.5724C12.6995 11.3869 12.7153 11.2148 12.7485 11.0576C12.7858 10.8815 12.8669 10.7302 12.9968 10.6152L12.9983 10.6137C13.145 10.4875 13.3473 10.4409 13.5688 10.4409Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50385C10.7457 1.52087 10.9072 1.59681 11.0303 1.71991L14.7803 5.46991C14.9208 5.61054 15 5.80136 15 6.00018V9.00018C14.9998 9.41423 14.6641 9.75018 14.25 9.75018C13.8359 9.75018 13.5002 9.41423 13.5 9.00018V6.75018H11.25C10.8523 6.75018 10.4707 6.59192 10.1895 6.31073C9.90824 6.02951 9.7501 5.64788 9.75 5.25018V3.00018H5.25C5.05109 3.00018 4.86038 3.07926 4.71973 3.21991C4.57919 3.36054 4.5 3.55136 4.5 3.75018V9.00018C4.4998 9.41423 4.16409 9.75018 3.75 9.75018C3.33591 9.75018 3.0002 9.41423 3 9.00018V3.75018C3 3.15353 3.23734 2.5813 3.65918 2.15936C4.08114 1.73741 4.65326 1.50018 5.25 1.50018H10.5L10.574 1.50385ZM11.25 5.25018H12.4395L11.25 4.06073V5.25018Z",fill:"currentColor"})),ic=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M6.76831 10.8267C6.93291 10.8267 7.08404 10.8408 7.22021 10.8691L7.35205 10.9021L7.35278 10.9028L7.46851 10.9431C7.57872 10.986 7.67614 11.038 7.75928 11.0991C7.84245 11.1591 7.91481 11.2265 7.97388 11.3005L8.02881 11.3767L8.02954 11.3774L8.11011 11.5254C8.13317 11.5747 8.15233 11.6249 8.16797 11.6755C8.19815 11.7711 8.21863 11.8631 8.22656 11.9502C8.23376 12.0294 8.23755 12.096 8.23755 12.1479C8.23753 12.318 8.17338 12.4626 8.04639 12.572C7.92503 12.676 7.77653 12.7265 7.60913 12.7266C7.4711 12.7266 7.34146 12.6749 7.22241 12.583C7.1027 12.4905 7.02328 12.3741 7.02319 12.2329C7.02319 12.0468 6.98759 11.9498 6.94775 11.907L6.94629 11.9055C6.90561 11.8606 6.83878 11.8294 6.72583 11.8293C6.58234 11.8293 6.48534 11.856 6.42334 11.896C6.4086 11.9056 6.38747 11.9281 6.37061 11.981C6.35372 12.0341 6.34351 12.1099 6.34351 12.2117C6.34581 12.2878 6.36799 12.3546 6.40869 12.4153C6.45761 12.4821 6.52298 12.549 6.60718 12.6138L6.73608 12.7053C6.78632 12.7386 6.84449 12.7751 6.9104 12.8145C7.04454 12.8945 7.16167 12.9644 7.2605 13.0232L7.44507 13.1426C7.50565 13.1844 7.56597 13.2284 7.62524 13.2744C7.74715 13.3666 7.8562 13.4715 7.95337 13.5886C8.05276 13.7085 8.13297 13.8432 8.1936 13.9922C8.25599 14.1456 8.28891 14.3172 8.29395 14.5049V14.5364C8.29395 14.7339 8.26896 14.9141 8.21777 15.0754V15.0776C8.11696 15.3776 7.94914 15.6082 7.7124 15.761L7.71313 15.7617C7.62701 15.8179 7.53944 15.8644 7.45166 15.9016L7.36304 15.936C7.30225 15.9571 7.24075 15.9753 7.1792 15.9902L6.99243 16.0261C6.87331 16.0431 6.75886 16.0529 6.65039 16.0554H6.61304C6.41017 16.0554 6.22414 16.0345 6.05786 15.9917C5.89914 15.9495 5.75823 15.8922 5.63892 15.8196L5.63745 15.8188C5.52025 15.7449 5.42093 15.6589 5.34155 15.561C5.26338 15.4674 5.20001 15.3681 5.15332 15.2644C5.10802 15.1659 5.07431 15.0659 5.05371 14.9656C5.03361 14.8676 5.02297 14.7738 5.02295 14.6851C5.02295 14.5014 5.0798 14.3447 5.20898 14.2375L5.20972 14.2368L5.30493 14.1731C5.40409 14.1186 5.51594 14.0918 5.63745 14.0918C5.79553 14.0919 5.94175 14.1407 6.07251 14.2354L6.12451 14.2764C6.2216 14.3622 6.27861 14.4745 6.2959 14.6067L6.30103 14.6741L6.31055 14.7847C6.32502 14.8796 6.35383 14.9312 6.38306 14.9568C6.43071 14.9963 6.50789 15.0238 6.63135 15.0242C6.76743 15.0198 6.85874 14.9863 6.91772 14.9355L6.91846 14.9341L6.95361 14.8938C6.98575 14.8434 7.00924 14.7604 7.00928 14.6287C7.00928 14.4903 6.96843 14.3706 6.8877 14.2661L6.88696 14.2646C6.80068 14.1504 6.68858 14.0439 6.55078 13.946L6.55005 13.9453C6.40626 13.841 6.25592 13.7396 6.10034 13.6421C5.93262 13.5343 5.77326 13.4207 5.62427 13.303L5.62354 13.3022C5.46846 13.1772 5.34021 13.0351 5.24121 12.8752C5.13746 12.7076 5.0852 12.514 5.08008 12.2988V12.2388L5.0874 12.0505C5.10126 11.869 5.13388 11.7086 5.18628 11.5708V11.5693L5.2478 11.4382C5.31532 11.3136 5.40255 11.2077 5.51074 11.1233L5.62207 11.0464C5.73813 10.9764 5.87099 10.9263 6.01831 10.894C6.21201 10.8494 6.43196 10.8267 6.67603 10.8267H6.76831Z",fill:"currentColor"}),te.createElement("path",{d:"M14.2266 10.8062C14.3565 10.8062 14.4736 10.8329 14.5693 10.8933L14.5701 10.8926L14.5715 10.894L14.5737 10.8948L14.573 10.8955C14.6342 10.9321 14.6895 10.9722 14.7363 11.0171L14.781 11.064L14.7825 11.0662L14.8235 11.1204C14.8363 11.1392 14.8492 11.159 14.8608 11.1797L14.9246 11.3159L14.9253 11.3181L15.9163 14.0024V11.4705C15.9163 11.2922 15.9461 11.1369 16.0159 11.0149L16.054 10.9607C16.1527 10.8467 16.3175 10.8062 16.5022 10.8062C16.7284 10.8062 16.9271 10.8532 17.0229 11.0017C17.1032 11.1237 17.1379 11.2847 17.1379 11.4705V15.0535C17.1379 15.21 17.1275 15.3541 17.1079 15.4849L17.1086 15.4856C17.0896 15.6273 17.0355 15.7491 16.9409 15.8408C16.837 15.9414 16.6806 15.9784 16.5022 15.9785H16.0356C15.8837 15.9785 15.7483 15.9422 15.6394 15.8606C15.5419 15.7874 15.4638 15.6974 15.4065 15.5911C15.3549 15.4953 15.3125 15.4018 15.2798 15.3113L14.3459 12.7815V15.3149C14.3459 15.4932 14.316 15.6489 14.2471 15.7727L14.2463 15.7734C14.158 15.9281 13.9711 15.9784 13.76 15.9785C13.53 15.9785 13.3292 15.9315 13.2312 15.783C13.151 15.6609 13.1169 15.5006 13.1169 15.3149V11.7319C13.117 11.575 13.126 11.4319 13.1433 11.3035V11.3013L13.166 11.1987C13.1955 11.1009 13.2454 11.0157 13.3176 10.9475L13.3594 10.9124C13.4627 10.8363 13.6027 10.8062 13.76 10.8062H14.2266Z",fill:"currentColor"}),te.createElement("path",{d:"M3.62183 10.73C3.8058 10.73 3.96571 10.7696 4.07959 10.8677C4.185 10.9586 4.25306 11.0796 4.28613 11.2229C4.31675 11.3557 4.33154 11.5018 4.33154 11.6602V14.3606C4.33154 14.617 4.29481 14.8413 4.21655 15.0293C4.15993 15.1652 4.09098 15.286 4.00928 15.3896L3.92285 15.4878C3.80762 15.6056 3.67869 15.6971 3.5376 15.7625L3.53833 15.7632C3.40115 15.8269 3.27011 15.872 3.14722 15.8979L3.14795 15.8987C3.09669 15.9112 3.04501 15.9213 2.99414 15.9294L2.8418 15.9478C2.74998 15.9548 2.68156 15.9587 2.64111 15.9587C2.3706 15.9587 2.13396 15.928 1.93506 15.8643C1.73937 15.8022 1.56914 15.7204 1.42749 15.6174C1.28776 15.5158 1.17335 15.3984 1.08691 15.2651L1.02686 15.1685C0.970789 15.0715 0.926873 14.9732 0.895752 14.874L0.896484 14.8733C0.852315 14.745 0.821564 14.6203 0.806396 14.499L0.805664 14.4968C0.793555 14.3806 0.786621 14.2779 0.786621 14.1899C0.786659 14.0481 0.829716 13.9196 0.914062 13.8091C0.968035 13.7386 1.04873 13.6949 1.13965 13.6685C1.231 13.642 1.34202 13.6297 1.46851 13.6296C1.55651 13.6297 1.65224 13.6393 1.75415 13.6567C1.8653 13.6758 1.96539 13.7157 2.05151 13.7783C2.15785 13.853 2.20677 13.9666 2.20679 14.0977C2.20679 14.3421 2.24112 14.5246 2.302 14.6528L2.32178 14.6865C2.37332 14.7613 2.46833 14.8095 2.64111 14.8096C2.74386 14.8095 2.80532 14.7883 2.8396 14.762L2.84106 14.7605L2.90552 14.7019C2.92253 14.6822 2.9356 14.6623 2.94507 14.6426L2.97803 14.5518C2.98565 14.5209 2.98953 14.4889 2.99048 14.4565V11.9641H2.17236C2.0293 11.9641 1.8922 11.9536 1.76221 11.9312L1.76001 11.9304C1.62252 11.9035 1.50268 11.8482 1.40698 11.7612L1.40625 11.7598C1.30008 11.6602 1.25688 11.5177 1.25684 11.3547C1.25684 11.1882 1.29936 11.0419 1.40625 10.9417C1.49986 10.8517 1.6187 10.7951 1.75635 10.7681L1.9585 10.7395C2.02775 10.7333 2.09935 10.73 2.17236 10.73H3.62183Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0061 10.8398C11.1058 10.8474 11.2146 10.8676 11.3313 10.8984L11.332 10.8977C11.4562 10.9275 11.5817 10.9747 11.7078 11.0376L11.803 11.0896C11.8653 11.1277 11.926 11.1727 11.9839 11.2244L12.0688 11.3071L12.0696 11.3079L12.1472 11.4001C12.2197 11.4965 12.2807 11.608 12.3303 11.7327L12.3772 11.8674C12.417 12.0081 12.4358 12.1667 12.4358 12.3406V14.4111C12.4358 14.649 12.4035 14.8579 12.3347 15.0337L12.334 15.0352C12.2654 15.204 12.1782 15.349 12.071 15.4666C11.9653 15.5823 11.8439 15.6747 11.7085 15.7412L11.7078 15.7405C11.5864 15.8034 11.4622 15.8534 11.335 15.8877C11.2172 15.9189 11.1066 15.9387 11.0061 15.9463C10.9136 15.9532 10.8413 15.9573 10.793 15.9573H10.675L10.4626 15.9463C10.362 15.9387 10.2518 15.919 10.1338 15.8877C10.0122 15.8554 9.8873 15.8055 9.75952 15.7405C9.62706 15.6742 9.50578 15.5832 9.39624 15.4688L9.39551 15.468C9.28579 15.3506 9.19561 15.2056 9.12451 15.0366L9.12378 15.0352C9.05226 14.8589 9.01835 14.6495 9.01831 14.4111V12.3406C9.01831 12.105 9.05259 11.8998 9.12451 11.7297C9.19368 11.5618 9.28389 11.4184 9.39697 11.3027C9.50677 11.1905 9.62826 11.1014 9.76099 11.0376C9.82393 11.0062 9.88688 10.9792 9.94849 10.957L9.94922 10.9563L10.1323 10.8992L10.1345 10.8984L10.3066 10.8604C10.3612 10.8506 10.4136 10.8436 10.4626 10.8398L10.675 10.8289H10.793C10.8413 10.8289 10.9136 10.8329 11.0061 10.8398ZM10.738 11.9473C10.6399 11.9473 10.5796 11.9688 10.5439 11.9963L10.5432 11.9971C10.4934 12.0354 10.4596 12.0746 10.4385 12.1135L10.4377 12.1143C10.4103 12.1641 10.3949 12.222 10.3931 12.2886V14.5393L10.4062 14.6309L10.4385 14.7151L10.4392 14.7158L10.481 14.7766C10.4976 14.7958 10.5181 14.8147 10.5417 14.833L10.5732 14.8521C10.6101 14.8689 10.6637 14.8806 10.738 14.8806C10.8345 14.8805 10.8925 14.8598 10.9255 14.8345C10.9743 14.7969 11.0075 14.7565 11.0288 14.7158C11.054 14.6605 11.0699 14.5993 11.0757 14.5327V12.2944L11.0588 12.197C11.051 12.167 11.0406 12.138 11.0281 12.1106C11.0069 12.0728 10.9738 12.0343 10.9255 11.9971L10.9233 11.9949C10.8905 11.9684 10.8335 11.9474 10.738 11.9473Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),oc=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),te.createElement("path",{d:"M2.39355 10.5C2.53545 10.5 2.6592 10.5122 2.75757 10.5417C2.88987 10.5815 2.99161 10.6954 3.07251 10.8289L3.15747 10.9885L3.25195 11.2031L3.25269 11.2046L3.35229 11.4683C3.38786 11.5664 3.42601 11.6752 3.46655 11.7942L3.76318 12.6665L3.76392 12.6687L3.76904 12.6848L3.79907 12.5911L3.94849 12.1348C3.99515 11.9948 4.03674 11.8689 4.073 11.7576L4.07373 11.7561L4.1814 11.4434C4.21489 11.3495 4.24596 11.265 4.27515 11.1907L4.36084 10.9849C4.38855 10.9239 4.41584 10.8705 4.44214 10.8252C4.51581 10.6953 4.61188 10.5823 4.74243 10.5417H4.7439L4.82153 10.5227C4.90321 10.5069 4.99686 10.5 5.09985 10.5H5.67041C5.87137 10.5 6.05265 10.5425 6.17505 10.6619L6.17944 10.6655C6.29073 10.7714 6.35329 10.9108 6.375 11.072C6.39695 11.2133 6.40721 11.3701 6.40723 11.5415V15.5149C6.4072 15.7232 6.3696 15.9065 6.27686 16.0474C6.16065 16.2235 5.92578 16.2751 5.67041 16.2751C5.43573 16.2751 5.21924 16.2184 5.11157 16.0378L5.10938 16.0342C5.03005 15.8921 4.9966 15.7149 4.99658 15.5149V12.8335L4.4436 14.4456L4.44141 14.4521C4.39239 14.576 4.32667 14.6919 4.24658 14.8008L4.24731 14.8015C4.14341 14.9438 3.9882 15.008 3.80933 15.0081H3.73096C3.55351 15.008 3.40015 14.9437 3.29004 14.8081L3.28857 14.8066C3.20076 14.6954 3.13356 14.575 3.08862 14.4463L2.53564 12.8496V15.5149C2.53562 15.7149 2.50218 15.8921 2.42285 16.0342L2.42212 16.0356C2.31692 16.2193 2.09741 16.2751 1.86182 16.2751C1.60639 16.2751 1.37154 16.2236 1.25537 16.0474C1.16263 15.9065 1.12502 15.7232 1.125 15.5149V11.5415C1.12501 11.3697 1.13426 11.2129 1.15356 11.072L1.1543 11.0691L1.17993 10.9526C1.21308 10.8409 1.26884 10.7425 1.35059 10.6633L1.39966 10.6223C1.52082 10.5332 1.68333 10.5 1.86182 10.5H2.39355Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.1106 10.5C9.62746 10.5 10.0624 10.6251 10.4026 10.8875L10.5256 10.9944C10.6405 11.1071 10.7342 11.238 10.8062 11.3862C10.9039 11.5876 10.9497 11.8187 10.9497 12.074V14.4983C10.9497 14.7119 10.927 14.9051 10.8779 15.0754C10.8306 15.2398 10.7676 15.3875 10.689 15.5156L10.6875 15.5186C10.6079 15.6408 10.5165 15.7481 10.4143 15.8386C10.3155 15.9261 10.2132 15.9989 10.1074 16.0547L10.1067 16.054C9.86566 16.1854 9.58987 16.2585 9.28271 16.2751H7.97681C7.77408 16.2751 7.59145 16.2335 7.46704 16.1169C7.35471 16.0115 7.2898 15.8714 7.26489 15.7097C7.24266 15.5651 7.23194 15.4033 7.23193 15.2256V11.5415C7.23195 11.3663 7.2426 11.2069 7.26489 11.0647C7.28985 10.9032 7.35482 10.7635 7.46704 10.6582C7.59145 10.5416 7.77403 10.5 7.97681 10.5H9.1106ZM8.72095 15.0447H9.07544C9.15931 15.0426 9.23737 15.0225 9.31055 14.9839L9.31348 14.9817L9.35815 14.9553C9.40066 14.926 9.43743 14.8876 9.46802 14.8381L9.46875 14.8367L9.49438 14.7861C9.51748 14.7305 9.53172 14.6593 9.53174 14.5686V12.2615C9.53174 12.1256 9.50631 12.0248 9.46509 11.9517L9.46362 11.9495C9.42061 11.8696 9.36785 11.8162 9.30762 11.7825C9.25706 11.7542 9.19978 11.7342 9.1355 11.7231L9.06885 11.7151H8.72095V15.0447Z",fill:"currentColor"})),lc=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.6416 10.3784C3.95675 10.4068 4.24355 10.4808 4.49927 10.6033L4.68896 10.7058C4.75102 10.7437 4.81209 10.7853 4.87207 10.8303C4.99897 10.9227 5.10899 11.0375 5.20459 11.1724C5.30765 11.311 5.38613 11.4733 5.44116 11.6558L5.47998 11.8008C5.51306 11.9504 5.52903 12.1125 5.52905 12.2856C5.52905 12.6011 5.47828 12.8867 5.37305 13.1382L5.37378 13.1389C5.28434 13.3557 5.15787 13.5441 4.99512 13.7014L4.92334 13.7666C4.52343 14.1103 3.97203 14.269 3.2959 14.269H2.95166V15.4292C2.95165 15.614 2.93964 15.7845 2.91577 15.9397C2.8883 16.1182 2.81511 16.2739 2.68652 16.3909L2.68579 16.3901C2.54556 16.5202 2.34254 16.5645 2.12329 16.5645C1.90696 16.5644 1.70685 16.5194 1.56738 16.3887L1.56519 16.3865C1.44288 16.2679 1.37145 16.1152 1.34399 15.9404L1.34326 15.936C1.32257 15.7822 1.31251 15.613 1.3125 15.4292V11.5042C1.31251 11.3204 1.3225 11.1524 1.34326 11.001L1.34399 10.9973L1.37256 10.8691C1.40991 10.7455 1.47366 10.6362 1.56738 10.5483C1.70673 10.4148 1.90677 10.3689 2.12329 10.3689H3.50464L3.6416 10.3784ZM2.95166 12.9053H3.31787C3.43267 12.8984 3.53116 12.8714 3.61597 12.8269C3.69435 12.7857 3.75967 12.7244 3.81226 12.6387L3.84448 12.5728C3.8728 12.5 3.88989 12.4058 3.88989 12.2856C3.88984 12.1374 3.85971 12.0411 3.81812 11.9795L3.81519 11.9744C3.76419 11.8937 3.70357 11.8366 3.63428 11.7979C3.56584 11.7635 3.47692 11.7377 3.36328 11.7253H2.95166V12.9053Z",fill:"currentColor"}),te.createElement("path",{d:"M9.85181 10.3689C9.96017 10.369 10.0701 10.3945 10.1792 10.4392L10.2876 10.4897L10.2935 10.4927L10.2993 10.4963C10.4209 10.5712 10.5226 10.6619 10.5879 10.7725C10.6503 10.8716 10.6882 10.9809 10.6882 11.0969C10.6882 11.1892 10.6526 11.2993 10.6077 11.4089L10.6069 11.4082C10.5828 11.4685 10.5524 11.5379 10.5154 11.6147C10.4774 11.6937 10.4326 11.7792 10.3813 11.8704L9.1582 14.0391V15.4373C9.1582 15.6164 9.14303 15.7853 9.11279 15.9426C9.07918 16.1138 9.00547 16.2635 8.88647 16.3799L8.88721 16.3806C8.75142 16.5164 8.5562 16.5644 8.34668 16.5645C8.13595 16.5644 7.94219 16.5154 7.80249 16.3843L7.80103 16.3828C7.68055 16.2661 7.60635 16.1157 7.57251 15.9434C7.54226 15.786 7.52783 15.6164 7.52783 15.4373V14.0398L6.12085 11.5283L6.11938 11.5261C6.0459 11.3891 6.00587 11.2453 6.00586 11.0969C6.00589 10.986 6.03681 10.8798 6.09155 10.7812L6.09302 10.7791L6.15015 10.6963C6.21492 10.6176 6.30071 10.5509 6.39771 10.4941L6.4043 10.4905L6.5127 10.4392C6.6213 10.3943 6.73162 10.369 6.84155 10.3689C7.06446 10.369 7.25232 10.4649 7.39307 10.6399L7.48096 10.752C7.5635 10.8656 7.6337 10.9873 7.69263 11.116L8.34668 12.4878L9.00073 11.116C9.07902 10.945 9.177 10.7867 9.29443 10.6421L9.29517 10.6414L9.35083 10.5791C9.48615 10.443 9.65571 10.3689 9.85181 10.3689Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),pe=(e,t)=>r.jsx(e,{size:t.size??P.BASE_ICON_PROPS.size,stroke:t.stroke??P.BASE_ICON_PROPS.stroke,className:t.className}),ut=(e,t)=>r.jsx(e,{width:Number(t.size??P.BASE_ICON_PROPS.size),height:Number(t.size??P.BASE_ICON_PROPS.size),className:t.className}),Js={".bmp":e=>pe(_.IconFileTypeBmp,e),".cpp":e=>ut(rc,e),".c":e=>ut(sc,e),".cs":e=>ut(nc,e),".css":e=>pe(_.IconFileTypeCss,e),".csv":e=>pe(_.IconFileTypeCsv,e),".doc":e=>pe(_.IconFileTypeDoc,e),".docx":e=>pe(_.IconFileTypeDocx,e),".html":e=>pe(_.IconFileTypeHtml,e),".ini":e=>ut(ac,e),".jpg":e=>pe(_.IconFileTypeJpg,e),".js":e=>pe(_.IconFileTypeJs,e),".json":e=>ut(ic,e),".jsx":e=>pe(_.IconFileTypeJsx,e),".md":e=>ut(oc,e),".pdf":e=>pe(_.IconFileTypePdf,e),".php":e=>pe(_.IconFileTypePhp,e),".png":e=>pe(_.IconFileTypePng,e),".ppt":e=>pe(_.IconFileTypePpt,e),".py":e=>ut(lc,e),".rs":e=>pe(_.IconFileTypeRs,e),".sql":e=>pe(_.IconFileTypeSql,e),".svg":e=>pe(_.IconFileTypeSvg,e),".ts":e=>pe(_.IconFileTypeTs,e),".tsx":e=>pe(_.IconFileTypeTsx,e),".txt":e=>pe(_.IconFileTypeTxt,e),".vue":e=>pe(_.IconFileTypeVue,e),".xls":e=>pe(_.IconFileTypeXls,e),".xml":e=>pe(_.IconFileTypeXml,e),".zip":e=>pe(_.IconFileTypeZip,e),default:e=>pe(_.IconFile,e)},ta=({extension:e,size:t=P.BASE_ICON_PROPS.size,stroke:s=P.BASE_ICON_PROPS.stroke,className:n,decorative:a=!1,label:i,indicator:o})=>{const l=(()=>{if(!e)return"";const f=e.trim().toLowerCase();return f.startsWith(".")?f:`.${f}`})(),d=(Js[l]??Js.default)({size:t,stroke:s}),u=typeof i=="string"?i:`${l.slice(1).toUpperCase()} file icon`;return r.jsxs("span",{className:ne("inline-flex relative",n),...a?{"aria-hidden":!0}:{role:"img","aria-label":u},children:[r.jsx(C.DialIcon,{icon:d,className:"inline-block align-middle"}),o&&r.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:o})]})},bs=({label:e="Shared entity",size:t=14,className:s,containerClassName:n,stroke:a=1.5,sharedIndicatorTooltip:i})=>r.jsx(O.DialTooltip,{tooltip:i||"Shared",children:r.jsx(C.DialIcon,{className:S.mergeClasses("text-accent-primary flex bg-layer-3",n),icon:r.jsx(_.IconArrowUpRight,{size:t,stroke:a,"aria-label":typeof e=="string"?e:void 0,className:s,role:"img"})})}),cc=({name:e,className:t,shared:s=!1,iconSize:n=P.BASE_ICON_SIZE,details:a,sharedIndicatorClassName:i,sharedIndicatorTooltip:o,fileExtension:l,hideTooltip:c=!1,isInvalidName:d=!1,tooltipContent:u})=>{const f=l||(e.includes(".")?e.split(".").pop():void 0);return r.jsxs("div",{className:S.mergeClasses("flex items-center gap-2 w-full",t),children:[r.jsx(ta,{extension:f,size:n,className:"text-secondary",indicator:s?r.jsx(bs,{className:i,sharedIndicatorTooltip:o}):null,label:"File type icon"}),r.jsxs("div",{className:ne(["w-full flex min-w-0",a&&"flex-col gap-1"]),children:[r.jsx(C.DialEllipsisTooltip,{className:ne(["dial-small-text flex-1 min-w-0",d?"text-secondary":"text-primary"]),text:e,id:"name",hideTooltip:c,customTooltipContent:u}),a]})]})},dc=({name:e,className:t,shared:s=!1,loading:n=!1,iconSize:a=P.BASE_ICON_SIZE,sharedIndicatorClassName:i,sharedIndicatorTooltip:o,hideTooltip:l=!1,isInvalidName:c=!1,tooltipContent:d})=>{const u=()=>n?r.jsx(lt,{size:a}):r.jsx(C.DialIcon,{icon:r.jsx(_.IconFolder,{...P.BASE_ICON_PROPS,size:a}),className:"inline-block align-middle"});return r.jsxs("div",{className:S.mergeClasses("flex items-center gap-2 w-full",t),children:[r.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[u(),s&&r.jsx("span",{className:"absolute z-50 -bottom-0.5 -left-0.5",children:r.jsx(bs,{className:i,sharedIndicatorTooltip:o})})]}),r.jsx(C.DialEllipsisTooltip,{className:ne("dial-small-text flex-1 min-w-0",c?"text-secondary":"text-primary"),text:e,id:"name",hideTooltip:l,customTooltipContent:d})]})};var nt=(e=>(e.Left="left",e.Right="right",e))(nt||{}),ge=function(){return ge=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++){t=arguments[s];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},ge.apply(this,arguments)},Qs={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},en={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},rr={width:"20px",height:"20px",position:"absolute",zIndex:1},uc={top:ge(ge({},Qs),{top:"-5px"}),right:ge(ge({},en),{left:void 0,right:"-5px"}),bottom:ge(ge({},Qs),{top:void 0,bottom:"-5px"}),left:ge(ge({},en),{left:"-5px"}),topRight:ge(ge({},rr),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:ge(ge({},rr),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:ge(ge({},rr),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:ge(ge({},rr),{left:"-10px",top:"-10px",cursor:"nw-resize"})},fc=g.memo(function(e){var t=e.onResizeStart,s=e.direction,n=e.children,a=e.replaceStyles,i=e.className,o=g.useCallback(function(d){t(d,s)},[t,s]),l=g.useCallback(function(d){t(d,s)},[t,s]),c=g.useMemo(function(){return ge(ge({position:"absolute",userSelect:"none"},uc[s]),a??{})},[a,s]);return r.jsx("div",{className:i||void 0,style:c,onMouseDown:o,onTouchStart:l,children:n})}),pc=(function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,s)};return function(t,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(t,s);function n(){this.constructor=t}t.prototype=s===null?Object.create(s):(n.prototype=s.prototype,new n)}})(),Fe=function(){return Fe=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++){t=arguments[s];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Fe.apply(this,arguments)},hc={width:"auto",height:"auto"},sr=function(e,t,s){return Math.max(Math.min(e,s),t)},tn=function(e,t,s){var n=Math.round(e/t);return n*t+s*(n-1)},Dt=function(e,t){return new RegExp(e,"i").test(t)},nr=function(e){return!!(e.touches&&e.touches.length)},mc=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},rn=function(e,t,s){s===void 0&&(s=0);var n=t.reduce(function(i,o,l){return Math.abs(o-e)<Math.abs(t[i]-e)?l:i},0),a=Math.abs(t[n]-e);return s===0||a<s?t[n]:e},Kr=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},ar=function(e,t,s,n){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var a=Number(e.replace("%",""))/100;return t*a}if(e.endsWith("vw")){var a=Number(e.replace("vw",""))/100;return s*a}if(e.endsWith("vh")){var a=Number(e.replace("vh",""))/100;return n*a}}return e},gc=function(e,t,s,n,a,i,o){return n=ar(n,e.width,t,s),a=ar(a,e.height,t,s),i=ar(i,e.width,t,s),o=ar(o,e.height,t,s),{maxWidth:typeof n>"u"?void 0:Number(n),maxHeight:typeof a>"u"?void 0:Number(a),minWidth:typeof i>"u"?void 0:Number(i),minHeight:typeof o>"u"?void 0:Number(o)}},xc=function(e){return Array.isArray(e)?e:[e,e]},Cc=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],sn="__resizable_base__",ra=(function(e){pc(t,e);function t(s){var n,a,i,o,l=e.call(this,s)||this;return l.ratio=1,l.resizable=null,l.parentLeft=0,l.parentTop=0,l.resizableLeft=0,l.resizableRight=0,l.resizableTop=0,l.resizableBottom=0,l.targetLeft=0,l.targetTop=0,l.delta={width:0,height:0},l.appendBase=function(){if(!l.resizable||!l.window)return null;var c=l.parentNode;if(!c)return null;var d=l.window.document.createElement("div");return d.style.width="100%",d.style.height="100%",d.style.position="absolute",d.style.transform="scale(0, 0)",d.style.left="0",d.style.flex="0 0 100%",d.classList?d.classList.add(sn):d.className+=sn,c.appendChild(d),d},l.removeBase=function(c){var d=l.parentNode;d&&d.removeChild(c)},l.state={isResizing:!1,width:(a=(n=l.propsSize)===null||n===void 0?void 0:n.width)!==null&&a!==void 0?a:"auto",height:(o=(i=l.propsSize)===null||i===void 0?void 0:i.height)!==null&&o!==void 0?o:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},l.onResizeStart=l.onResizeStart.bind(l),l.onMouseMove=l.onMouseMove.bind(l),l.onMouseUp=l.onMouseUp.bind(l),l}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||hc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var s=0,n=0;if(this.resizable&&this.window){var a=this.resizable.offsetWidth,i=this.resizable.offsetHeight,o=this.resizable.style.position;o!=="relative"&&(this.resizable.style.position="relative"),s=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:a,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:i,this.resizable.style.position=o}return{width:s,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var s=this,n=this.props.size,a=function(l){var c;if(typeof s.state[l]>"u"||s.state[l]==="auto")return"auto";if(s.propsSize&&s.propsSize[l]&&(!((c=s.propsSize[l])===null||c===void 0)&&c.toString().endsWith("%"))){if(s.state[l].toString().endsWith("%"))return s.state[l].toString();var d=s.getParentSize(),u=Number(s.state[l].toString().replace("px","")),f=u/d[l]*100;return"".concat(f,"%")}return Kr(s.state[l])},i=n&&typeof n.width<"u"&&!this.state.isResizing?Kr(n.width):a("width"),o=n&&typeof n.height<"u"&&!this.state.isResizing?Kr(n.height):a("height");return{width:i,height:o}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var s=this.appendBase();if(!s)return{width:0,height:0};var n=!1,a=this.parentNode.style.flexWrap;a!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),s.style.position="relative",s.style.minWidth="100%",s.style.minHeight="100%";var i={width:s.offsetWidth,height:s.offsetHeight};return n&&(this.parentNode.style.flexWrap=a),this.removeBase(s),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var s=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:s.flexBasis!=="auto"?s.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(s,n){var a=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===s&&(typeof a>"u"||a==="auto")?"auto":s},t.prototype.calculateNewMaxFromBoundary=function(s,n){var a=this.props.boundsByDirection,i=this.state.direction,o=a&&Dt("left",i),l=a&&Dt("top",i),c,d;if(this.props.bounds==="parent"){var u=this.parentNode;u&&(c=o?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),d=l?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(c=o?this.resizableRight:this.window.innerWidth-this.resizableLeft,d=l?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(c=o?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),d=l?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return c&&Number.isFinite(c)&&(s=s&&s<c?s:c),d&&Number.isFinite(d)&&(n=n&&n<d?n:d),{maxWidth:s,maxHeight:n}},t.prototype.calculateNewSizeFromDirection=function(s,n){var a=this.props.scale||1,i=xc(this.props.resizeRatio||1),o=i[0],l=i[1],c=this.state,d=c.direction,u=c.original,f=this.props,h=f.lockAspectRatio,p=f.lockAspectRatioExtraHeight,m=f.lockAspectRatioExtraWidth,b=u.width,x=u.height,v=p||0,y=m||0;return Dt("right",d)&&(b=u.width+(s-u.x)*o/a,h&&(x=(b-y)/this.ratio+v)),Dt("left",d)&&(b=u.width-(s-u.x)*o/a,h&&(x=(b-y)/this.ratio+v)),Dt("bottom",d)&&(x=u.height+(n-u.y)*l/a,h&&(b=(x-v)*this.ratio+y)),Dt("top",d)&&(x=u.height-(n-u.y)*l/a,h&&(b=(x-v)*this.ratio+y)),{newWidth:b,newHeight:x}},t.prototype.calculateNewSizeFromAspectRatio=function(s,n,a,i){var o=this.props,l=o.lockAspectRatio,c=o.lockAspectRatioExtraHeight,d=o.lockAspectRatioExtraWidth,u=typeof i.width>"u"?10:i.width,f=typeof a.width>"u"||a.width<0?s:a.width,h=typeof i.height>"u"?10:i.height,p=typeof a.height>"u"||a.height<0?n:a.height,m=c||0,b=d||0;if(l){var x=(h-m)*this.ratio+b,v=(p-m)*this.ratio+b,y=(u-b)/this.ratio+m,I=(f-b)/this.ratio+m,j=Math.max(u,x),N=Math.min(f,v),w=Math.max(h,y),A=Math.min(p,I);s=sr(s,j,N),n=sr(n,w,A)}else s=sr(s,u,f),n=sr(n,h,p);return{newWidth:s,newHeight:n}},t.prototype.setBoundingClientRect=function(){var s=1/(this.props.scale||1);if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var a=n.getBoundingClientRect();this.parentLeft=a.left*s,this.parentTop=a.top*s}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left*s,this.targetTop=i.top*s}if(this.resizable){var o=this.resizable.getBoundingClientRect(),l=o.left,c=o.top,d=o.right,u=o.bottom;this.resizableLeft=l*s,this.resizableRight=d*s,this.resizableTop=c*s,this.resizableBottom=u*s}},t.prototype.onResizeStart=function(s,n){if(!(!this.resizable||!this.window)){var a=0,i=0;if(s.nativeEvent&&mc(s.nativeEvent)?(a=s.nativeEvent.clientX,i=s.nativeEvent.clientY):s.nativeEvent&&nr(s.nativeEvent)&&(a=s.nativeEvent.touches[0].clientX,i=s.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var o=this.props.onResizeStart(s,n,this.resizable);if(o===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var l,c=this.window.getComputedStyle(this.resizable);if(c.flexBasis!=="auto"){var d=this.parentNode;if(d){var u=this.window.getComputedStyle(d).flexDirection;this.flexDir=u.startsWith("row")?"row":"column",l=c.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var f={original:{x:a,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Fe(Fe({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(s.target).cursor||"auto"}),direction:n,flexBasis:l};this.setState(f)}},t.prototype.onMouseMove=function(s){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&nr(s))try{s.preventDefault(),s.stopPropagation()}catch{}var a=this.props,i=a.maxWidth,o=a.maxHeight,l=a.minWidth,c=a.minHeight,d=nr(s)?s.touches[0].clientX:s.clientX,u=nr(s)?s.touches[0].clientY:s.clientY,f=this.state,h=f.direction,p=f.original,m=f.width,b=f.height,x=this.getParentSize(),v=gc(x,this.window.innerWidth,this.window.innerHeight,i,o,l,c);i=v.maxWidth,o=v.maxHeight,l=v.minWidth,c=v.minHeight;var y=this.calculateNewSizeFromDirection(d,u),I=y.newHeight,j=y.newWidth,N=this.calculateNewMaxFromBoundary(i,o);this.props.snap&&this.props.snap.x&&(j=rn(j,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(I=rn(I,this.props.snap.y,this.props.snapGap));var w=this.calculateNewSizeFromAspectRatio(j,I,{width:N.maxWidth,height:N.maxHeight},{width:l,height:c});if(j=w.newWidth,I=w.newHeight,this.props.grid){var A=tn(j,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),D=tn(I,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),T=this.props.snapGap||0,E=T===0||Math.abs(A-j)<=T?A:j,L=T===0||Math.abs(D-I)<=T?D:I;j=E,I=L}var k={width:j-p.width,height:I-p.height};if(this.delta=k,m&&typeof m=="string"){if(m.endsWith("%")){var z=j/x.width*100;j="".concat(z,"%")}else if(m.endsWith("vw")){var R=j/this.window.innerWidth*100;j="".concat(R,"vw")}else if(m.endsWith("vh")){var Z=j/this.window.innerHeight*100;j="".concat(Z,"vh")}}if(b&&typeof b=="string"){if(b.endsWith("%")){var z=I/x.height*100;I="".concat(z,"%")}else if(b.endsWith("vw")){var R=I/this.window.innerWidth*100;I="".concat(R,"vw")}else if(b.endsWith("vh")){var Z=I/this.window.innerHeight*100;I="".concat(Z,"vh")}}var H={width:this.createSizeForCssProperty(j,"width"),height:this.createSizeForCssProperty(I,"height")};this.flexDir==="row"?H.flexBasis=H.width:this.flexDir==="column"&&(H.flexBasis=H.height);var B=this.state.width!==H.width,K=this.state.height!==H.height,V=this.state.flexBasis!==H.flexBasis,W=B||K||V;W&&zn.flushSync(function(){n.setState(H)}),this.props.onResize&&W&&this.props.onResize(s,h,this.resizable,k)}},t.prototype.onMouseUp=function(s){var n,a,i=this.state,o=i.isResizing,l=i.direction;i.original,!(!o||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(s,l,this.resizable,this.delta),this.props.size&&this.setState({width:(n=this.props.size.width)!==null&&n!==void 0?n:"auto",height:(a=this.props.size.height)!==null&&a!==void 0?a:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Fe(Fe({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(s){var n,a;this.setState({width:(n=s.width)!==null&&n!==void 0?n:"auto",height:(a=s.height)!==null&&a!==void 0?a:"auto"})},t.prototype.renderResizer=function(){var s=this,n=this.props,a=n.enable,i=n.handleStyles,o=n.handleClasses,l=n.handleWrapperStyle,c=n.handleWrapperClass,d=n.handleComponent;if(!a)return null;var u=Object.keys(a).map(function(f){return a[f]!==!1?r.jsx(fc,{direction:f,onResizeStart:s.onResizeStart,replaceStyles:i&&i[f],className:o&&o[f],children:d&&d[f]?d[f]:null},f):null});return r.jsx("div",{className:c,style:l,children:u})},t.prototype.render=function(){var s=this,n=Object.keys(this.props).reduce(function(o,l){return Cc.indexOf(l)!==-1||(o[l]=s.props[l]),o},{}),a=Fe(Fe(Fe({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(a.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return r.jsxs(i,Fe({style:a,className:this.props.className},n,{ref:function(o){o&&(s.resizable=o)},children:[this.state.isResizing&&r.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t})(g.PureComponent);const bc=({side:e,className:t})=>{const s=e===nt.Left,n=s?_.IconChevronLeft:_.IconChevronRight;return r.jsx("div",{className:t,children:r.jsx(n,{className:ne("h-full",s&&"-ml-6")})})},vc=({side:e,isResizing:t,customHandler:s,handlerClassName:n})=>{const a=S.mergeClasses("invisible h-full w-0.5 group-hover:visible bg-accent-primary text-accent-primary cursor-col-resize transition-opacity",t&&"visible",n),i=r.jsx(bc,{side:e,className:a});return s?r.jsx("div",{className:a,children:s}):i},sa=({children:e,minWidth:t,maxWidth:s,width:n,defaultWidth:a,onResizeStop:i,onResize:o,side:l=nt.Right,resizeHandlerClassName:c,resizeHandler:d})=>{const[u,f]=g.useState(!1),[h,p]=g.useState(a),m=n!==void 0,b=m?n:h,x=g.useRef(null),v=g.useCallback(()=>{f(!0)},[]),y=g.useCallback(()=>{f(!1);const j=x.current?.resizable?.getBoundingClientRect(),N=j?Math.round(j.width):t;m||p(N),i?.(N)},[i,m,t]),I=g.useMemo(()=>{const j=l===nt.Left,N=r.jsx(vc,{side:l,isResizing:u,customHandler:d,handlerClassName:c});return{size:m?{width:b,height:"100%"}:void 0,defaultSize:m?void 0:{width:b,height:"100%"},minWidth:t,maxWidth:s,enable:{left:j,right:!j},handleClasses:{right:"group",left:"group"},handleStyles:{right:{right:"-8px",zIndex:10},left:{left:0,zIndex:10}},handleComponent:{left:j?N:void 0,right:j?void 0:N},onResizeStart:v,onResize:(w,A,D)=>{const T=Math.round(D.offsetWidth);o?.(T)},onResizeStop:y}},[l,m,b,t,s,d,c,u,v,y,o]);return r.jsx(ra,{ref:x,...I,children:r.jsx("div",{className:"group flex size-full flex-col bg-layer-3 divide-y divide-tertiary transition-all",children:e})})},yc=({enabled:e=!0,children:t,...s})=>e?r.jsx(sa,{...s,children:t}):t;var ft=(e=>(e.Default="default",e.Text="text",e.Circular="circular",e.Rectangular="rectangular",e))(ft||{}),Ft=(e=>(e.Small="small",e.Default="default",e.Large="large",e))(Ft||{}),pr=(e=>(e.Circle="circle",e.Square="square",e))(pr||{});const Sc=e=>{if(typeof e=="number")return e;switch(e){case Ft.Small:return 32;case Ft.Large:return 64;case Ft.Default:default:return 40}},Ic=({active:e=!0,paragraph:t=!0,avatar:s=!1,showTitle:n=!0,loading:a=!0,children:i,variant:o=ft.Default,width:l,height:c,overlay:d,color:u,className:f,...h})=>{if(!a&&i)return r.jsx(r.Fragment,{children:i});const p=S.mergeClasses("bg-layer-raised",e&&"animate-pulse",f);if(o!==ft.Default){const E=S.mergeClasses(p,o===ft.Circular&&"rounded-full",o===ft.Rectangular&&"rounded",o===ft.Text&&"rounded",!!d&&"relative"),L={};return l&&(L.width=typeof l=="number"?`${l}px`:l),c&&(L.height=typeof c=="number"?`${c}px`:c),u&&(L.backgroundColor=u),r.jsx("div",{className:E,style:L,...h,children:d&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:d})})}const m=!!s,b=!!n,x=!!t,v=typeof s=="object"?s:{},y=typeof n=="object"?n:{},I=typeof t=="object"?t:{},j=Sc(v.size),N=v.shape??pr.Circle,w=y.width??"38%",A=I.rows??3,D=I.width,T=E=>D?Array.isArray(D)?D[E]??"100%":D:E===A-1?"61%":"100%";return r.jsxs("div",{...h,className:S.mergeClasses("flex gap-4",!!d&&"relative",f,C.DIAL_KIT_CLASS.skeleton),children:[m&&r.jsx("div",{className:S.mergeClasses(p,N===pr.Circle?"rounded-full":"rounded","flex-shrink-0"),style:{width:j,height:j,...u&&{backgroundColor:u}}}),r.jsxs("div",{className:"flex-1 flex flex-col gap-3",children:[b&&r.jsx("div",{className:S.mergeClasses(p,"h-4 rounded"),style:{width:w,...u&&{backgroundColor:u}}}),x&&r.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:A}).map((E,L)=>r.jsx("div",{className:S.mergeClasses(p,"h-4 rounded"),style:{width:T(L),...u&&{backgroundColor:u}}},L))})]}),d&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:d})]})};var at=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(at||{}),ht=(e=>(e.Default="default",e.Inline="inline",e))(ht||{}),hr=(e=>(e.Mobile="mobile",e.Tablet="tablet",e))(hr||{});const zt=({tab:e,active:t,invalid:s,className:n,horizontal:a,view:i=ht.Default,onClick:o})=>{const l=i===ht.Inline,c=S.mergeClasses("rounded h-[38px] items-center flex flex-row border-transparent cursor-pointer dial-small-text hover:text-accent-primary",{"border-b-2 px-4":a,"border-l-2 px-3":!a},{"bg-layer-4":a,"bg-layer-1 text-secondary pointer-events-none":e.disabled,"bg-accent-primary-alpha text-primary":t&&!e.disabled,"text-primary":!t&&!e.disabled,"border-b-accent-primary":t&&a&&!e.disabled,"border-l-accent-primary":t&&!a&&!e.disabled}),d=S.mergeClasses("flex flex-row gap-1 h-6 items-center py-1 px-2 rounded cursor-pointer hover:bg-accent-primary-alpha",t?"dial-small-semi-text":"dial-small-text",{"text-secondary pointer-events-none":e.disabled,"bg-accent-primary-alpha text-primary":t&&!e.disabled,"text-secondary":!t&&!e.disabled}),u=S.mergeClasses(l?d:c,n);return r.jsxs("button",{role:"tab","aria-selected":t,className:u,onClick:()=>o(e.id),disabled:e.disabled,children:[l&&t&&!e.disabled&&r.jsx(_.IconCheck,{size:P.DIAL_ICON_SIZE.SM}),r.jsx(C.DialEllipsisTooltip,{text:e.label,contentClassName:"max-w-[200px]",className:"max-w-[200px]"}),(s||e.invalid)&&r.jsx("div",{className:"text-error pl-1",children:r.jsx(_.IconExclamationCircle,{...P.BASE_ICON_PROPS})}),e.warning&&r.jsx("div",{className:"text-warning pl-1",children:r.jsx(_.IconAlertTriangle,{...P.BASE_ICON_PROPS})})]})},Nc=()=>{const[e,t]=g.useState(()=>typeof window>"u"?C.ScreenType.Desktop:C.getScreenType());return g.useEffect(()=>{t(C.getScreenType());const s=()=>t(C.getScreenType());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},jc=12,Dc=({tabs:e,activeTab:t,onClick:s,className:n,orientation:a=at.Horizontal,view:i=ht.Default,screenThreshold:o=hr.Tablet,smallScreenContainerClassName:l,smallScreenDropdownItemClassName:c,desktopDropdownClassName:d,desktopTabClassName:u,inlineContainerClassName:f,inlineTabClassName:h})=>{const[p,m]=g.useState(!1),[b,x]=g.useState(!1),[v,y]=g.useState(!1),I=Nc(),j=I===C.ScreenType.Mobile||o===hr.Tablet&&I===C.ScreenType.Tablet,N=a===at.Horizontal,w=g.useRef(null),A=g.useRef(null),D=g.useRef(null),T=e.find(R=>R.id===t),E=g.useMemo(()=>S.mergeClasses("flex gap-2",N?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[N]),L=g.useCallback(()=>{const R=A.current;R&&y(R.scrollWidth>R.clientWidth)},[]),k=g.useCallback(()=>{const R=D.current,Z=A.current;if(!R||!Z)return;const H=R.getBoundingClientRect(),B=Z.getBoundingClientRect();if(H.width===0||B.width===0)return;const K=jc;let V=Z.scrollLeft;if(H.left<B.left+K)V-=B.left+K-H.left;else if(H.right>B.right-K)V+=H.right-(B.right-K);else return;const W=Math.max(0,Z.scrollWidth-Z.clientWidth);V=Math.max(0,Math.min(V,W)),V!==Z.scrollLeft&&Z.scrollTo({left:V,behavior:"smooth"})},[]),z=g.useCallback(R=>{s(R),R===t&&k()},[s,t,k]);return g.useEffect(()=>{L();const R=new ResizeObserver(()=>L()),Z=A.current;return Z&&R.observe(Z),()=>R.disconnect()},[e,L]),g.useEffect(()=>{k()},[t,k]),i===ht.Inline?r.jsx("div",{role:"tablist",className:S.mergeClasses("flex flex-row items-center gap-0.5 bg-layer-4 rounded w-fit p-0.5",f),children:e.map(R=>r.jsx(zt,{tab:R,active:t===R.id,view:ht.Inline,onClick:z,className:h},R.id))}):j?r.jsx("div",{role:"tablist",className:S.mergeClasses("h-11 flex items-center bg-layer-3 px-4",l),children:r.jsx(C.DialDropdown,{trigger:[C.DropdownTrigger.Click],open:p,onOpenChange:m,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(R=>r.jsx(zt,{tab:R,active:R.id===t,onClick:Z=>{z(Z),m(!1)},className:S.mergeClasses("w-full rounded-none h-11 items-center px-6",c)},R.id)),children:r.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[r.jsx(zt,{tab:T,active:!0,onClick:z,className:"rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"},t),r.jsx(C.DialIcon,{icon:r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.SM}),className:S.mergeClasses("text-primary transition-transform",p&&"rotate-180")})]})})}):r.jsxs("div",{ref:w,className:S.mergeClasses("flex items-center",n),children:[r.jsx("div",{ref:A,role:"tablist",className:E,children:e.map(R=>r.jsx("div",{ref:t===R.id?D:void 0,className:"w-full",children:r.jsx(zt,{tab:R,active:t===R.id,onClick:z,horizontal:N,className:S.mergeClasses("w-full",u)})},R.id))}),v&&r.jsx("div",{className:"flex items-center ml-2",children:r.jsx(C.DialDropdown,{trigger:[C.DropdownTrigger.Click],open:b,onOpenChange:x,placement:"bottom-end",renderOverlay:()=>e.map(R=>r.jsx(zt,{tab:R,active:R.id===t,onClick:Z=>{z(Z),x(!1)},className:"w-full rounded-none h-8 items-center px-3 py-2"},R.id)),children:r.jsx(ot,{iconBefore:r.jsx(_.IconDotsVertical,{size:P.BASE_ICON_SIZE}),className:S.mergeClasses("w-8 h-8 flex items-center justify-center rounded border",b?"bg-layer-4 border-transparent":"border-primary",d)})})})]})},na="w-full overflow-hidden",aa="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",vs="flex items-center gap-2 dial-small-text",Wr={first:"shrink-0",middle:"shrink min-w-0 max-w-[30%]",last:"shrink min-w-0 max-w-[51%]"},nn="flex flex-1 items-center gap-1 min-w-0 transition-colors",wc="text-secondary hover:text-accent-primary",Lc="text-primary cursor-default",ys="flex-none inline-flex items-center leading-none text-secondary",Tc="items-center gap-1 min-w-0 transition-colors text-secondary hover:text-accent-primary",ia=r.jsx(_.IconChevronRight,{size:P.DIAL_ICON_SIZE.SM,"aria-hidden":"true"}),Lt=({label:e,href:t,onClick:s,disabled:n,isLast:a,isFirst:i,separator:o=ia,className:l,iconBefore:c,labelClassName:d,onBeforeNavigate:u,...f})=>{const h=async y=>{if(u&&!a&&!await u()){y.preventDefault();return}s&&s(y)},p=a?Wr.last:i?Wr.first:Wr.middle,m=S.mergeClasses(vs,p,l),b=(!!t||!!s)&&!a&&!n,x=b?S.mergeClasses(nn,wc):S.mergeClasses(nn,Lc,n?"pointer-events-none opacity-75":""),v=typeof e=="string"?r.jsx(C.DialEllipsisTooltip,{className:S.mergeClasses("cursor-pointer",d),text:e,id:"breadcrumb-item-content"}):r.jsx("span",{className:S.mergeClasses("flex-1 min-w-0 truncate cursor-pointer max-w-[300px]",d),"aria-label":"breadcrumb-item-content",children:e});return r.jsxs("li",{...f,className:m,"aria-label":f["aria-label"]||"breadcrumb-item",children:[b?r.jsxs("a",{href:t,onClick:h,className:x,children:[c,v]}):r.jsxs("span",{className:x,"aria-current":a?"page":void 0,"aria-disabled":n?"true":void 0,children:[c,v]}),!a&&r.jsx("span",{className:ys,"aria-label":"separator",children:o})]})},Ec=({pathItems:e,separator:t=ia,ariaLabel:s="Breadcrumb",className:n,children:a,labelClassName:i,onBeforeNavigate:o})=>{const l=g.useMemo(()=>e?.length?e:g.Children.toArray(a).filter(g.isValidElement).map(u=>{const f=u.props,{labelClassName:h,isLast:p,separator:m,...b}=f;return b}),[e,a]),c=g.useCallback(async u=>{const f=parseInt(u.key,10),h=l[f];if(o&&!await o()){u.domEvent.preventDefault();return}h.onClick?h.onClick(u.domEvent):h.href&&(window.location.href=h.href)},[l,o]),d=g.useMemo(()=>{if(l.length===0)return null;if(l.length<=3)return l.map((b,x)=>g.createElement(Lt,{...b,key:`item-${x}`,isFirst:x===0&&l.length>1,isLast:x===l.length-1,separator:t,labelClassName:i,onBeforeNavigate:o}));const u=l.at(0),f=l.slice(1,-2),h=l.at(-2),p=l.at(-1);if(!u||!h||!p)return null;const m=f.map((b,x)=>({key:String(x+1),label:typeof b.label=="string"?b.label:`Item ${x+1}`,disabled:b.disabled}));return r.jsxs(r.Fragment,{children:[g.createElement(Lt,{...u,key:"item-0",isFirst:!0,separator:t,labelClassName:i,onBeforeNavigate:o}),r.jsxs("li",{className:S.mergeClasses(vs,"shrink-0"),children:[r.jsx(C.DialDropdown,{items:m,onItemClick:c,placement:"bottom-start",matchReferenceWidth:!1,children:r.jsx("button",{type:"button","aria-label":"More breadcrumbs",className:Tc,children:r.jsx(_.IconDots,{size:P.DIAL_ICON_SIZE.SM})})}),r.jsx("span",{className:ys,children:t})]}),g.createElement(Lt,{...h,key:`item-${l.length-2}`,separator:t,labelClassName:i,onBeforeNavigate:o}),g.createElement(Lt,{...p,key:`item-${l.length-1}`,isLast:!0,separator:t,labelClassName:i,onBeforeNavigate:o})]})},[l,t,i,c,o]);return r.jsx("nav",{"aria-label":s,className:S.mergeClasses(na,n),children:r.jsx("ol",{className:aa,children:d})})},Ss=(e,t)=>({appearance:n,...a})=>r.jsx(ot,{...a,variant:e,appearance:n||t}),oa=(e,t)=>({variant:n,...a})=>r.jsx(ot,{...a,variant:n||t,appearance:e}),Jt=Ss(O.ButtonVariant.Primary,O.ButtonAppearance.Solid),Qt=Ss(O.ButtonVariant.Neutral,O.ButtonAppearance.Outlined),la=Ss(O.ButtonVariant.Danger,O.ButtonAppearance.Outlined),Oc=oa(O.ButtonAppearance.Link,O.ButtonVariant.Primary),Is=oa(O.ButtonAppearance.Ghost,O.ButtonVariant.Primary),wr=({iconClassName:e,label:t,...s})=>t?r.jsx(la,{...s,label:t,appearance:O.ButtonAppearance.Ghost,iconBefore:r.jsx(_.IconTrashX,{...P.BASE_ICON_PROPS,className:e||""})}):r.jsx(C.DialDangerIconButton,{...s,appearance:O.ButtonAppearance.Ghost,icon:r.jsx(_.IconTrashX,{...P.BASE_ICON_PROPS,className:e||""})}),Ac=({className:e="",value:t,onChange:s,error:n,containerClassName:a,resize:i=!1,labelProps:o,caption:l,id:c,...d})=>{const u=S.mergeClasses("dial-textarea dial-input px-3 py-2",d.invalid&&"dial-input-error",d.disabled&&"dial-input-disable",i?"resize":"resize-none",e);return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-y-1",a),children:[o&&r.jsx(ze.DialLabel,{...o,htmlFor:c}),r.jsx("textarea",{id:c,value:t||"",className:u,onChange:f=>s?.(f.currentTarget.value),...d}),r.jsx(Se,{text:n}),!n&&r.jsx(Xt,{text:l})]})},_c="inline-flex items-center rounded bg-layer-3",kc="flex flex-1 items-center justify-center gap-2 h-7 px-3 py-1 border border-primary dial-small-text whitespace-nowrap focus-visible:outline outline-offset-0 focus-visible:relative focus-visible:z-10",Rc="relative z-10 bg-controls-accent-primary-alpha-active text-primary",Mc="text-secondary hover:text-primary",Pc="text-controls-disable-accent cursor-not-allowed hover:text-controls-disable-accent",zc=({options:e,value:t,onChange:s,disabled:n,className:a,ariaLabel:i})=>{const o=g.useCallback(l=>{if(n)return;const c=e.filter(h=>!h.disabled);if(c.length===0)return;const d=c.findIndex(h=>h.value===t);let u=null;switch(l.key){case"ArrowRight":case"ArrowDown":u=(d+1)%c.length;break;case"ArrowLeft":case"ArrowUp":u=(d-1+c.length)%c.length;break;case"Home":u=0;break;case"End":u=c.length-1;break;default:return}l.preventDefault();const f=c[u];f&&f.value!==t&&s(f.value)},[n,e,t,s]);return r.jsx("div",{role:"tablist","aria-label":i,className:S.mergeClasses(_c,a),children:e.map((l,c)=>{const d=l.value===t,u=c===0,f=c===e.length-1,h=n||l.disabled;return r.jsxs("button",{type:"button",role:"tab","aria-selected":d,tabIndex:d?0:-1,disabled:h,onClick:()=>s(l.value),onKeyDown:o,className:S.mergeClasses(kc,!f&&"-mr-px",u&&"rounded-l",f&&"rounded-r",d?Rc:Mc,h&&Pc),children:[l.icon,l.label]},l.value)})})};var De=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(De||{});const Bc="z-popup flex items-center justify-center bg-blackout md:p-4",an="divide-tertiary divide-y",Fc="flex flex-row justify-between py-4 px-6 items-center",Hc={[De.Sm]:"dial-sm-popup",[De.Md]:"dial-md-popup",[De.Lg]:"dial-lg-popup"},Lr=({open:e=!1,header:t,portalId:s,className:n,overlayClassName:a,titleClassName:i,headerClassName:o,dividers:l=!0,dividerFooter:c=!0,children:d,footer:u,onClose:f,size:h=De.Md,hideClose:p=!1,closeOnOutsideClick:m=!0,preventKeyboardOnOpen:b=!1})=>{const x=g.useRef(null),{refs:v,context:y}=J.useFloating({open:e,onOpenChange:D=>{D||f?.(null)}}),I=J.useRole(y,{role:"dialog"}),j=J.useDismiss(y,{outsidePress:m}),{getFloatingProps:N}=J.useInteractions([I,j]);if(!e)return null;const w=typeof t=="string"?"dial-popup-heading":void 0,A=D=>D?typeof D=="string"?r.jsx("h3",{id:w,className:ne("flex-1 min-w-0 mr-3 truncate dial-h3-text text-primary",i),children:r.jsx(O.DialTooltip,{tooltip:D,children:D})}):D:r.jsx("span",{});return r.jsx(J.FloatingPortal,{id:s,children:r.jsx(J.FloatingOverlay,{className:ne(Bc,a),children:r.jsx(J.FloatingFocusManager,{context:y,initialFocus:b?x:v.floating,children:r.jsxs("div",{ref:v.setFloating,...N(),role:"dialog","aria-modal":"true","aria-labelledby":w,className:ne("dial-popup",Hc[h],l&&an,n),children:[b&&r.jsx("div",{ref:x,tabIndex:-1,"aria-hidden":!0,className:"absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"}),r.jsxs("div",{className:S.mergeClasses(Fc,o),children:[A(t),!p&&r.jsx(C.DialCloseButton,{size:P.DIAL_ICON_SIZE.SM,ariaLabel:"Close dialog",onClose:D=>f?.(D)})]}),r.jsx("div",{className:"grow overflow-auto","aria-label":"popup-description",children:d}),c&&!u&&r.jsx("div",{className:an}),u]})})})})};var Je=(e=>(e.Info="info",e.Danger="danger",e))(Je||{});const $c="flex justify-end gap-2 px-6 py-4 border-t border-tertiary",Vc="text-secondary dial-small-text px-6 pb-4",Kc="Cancel",Wc="Ok",Zr={[Je.Info]:{confirm:{variant:O.ButtonVariant.Primary,appearance:O.ButtonAppearance.Solid},cancel:{variant:O.ButtonVariant.Neutral,appearance:O.ButtonAppearance.Outlined}},[Je.Danger]:{container:"dial-danger-popup",confirm:{variant:O.ButtonVariant.Danger,appearance:O.ButtonAppearance.Solid},cancel:{variant:O.ButtonVariant.Neutral,appearance:O.ButtonAppearance.Outlined}}},Zc=({header:e,description:t,descriptionClassName:s,open:n=!1,confirmLabel:a=Wc,cancelLabel:i=Kc,isLoading:o=!1,disableConfirmButton:l=!1,className:c,confirmClassName:d,onClose:u,onConfirm:f,onCancel:h,children:p,dividers:m=!1,variant:b=Je.Info,size:x=De.Sm,footer:v,hideClose:y})=>{const I=o?null:r.jsxs("div",{className:$c,children:[r.jsx(Qt,{label:i,onClick:()=>h?h():u?.()}),r.jsx(ot,{variant:Zr[b].confirm?.variant,appearance:Zr[b].confirm?.appearance,className:d,label:a,disabled:l,onClick:()=>f()})]}),j=g.useCallback(()=>o?r.jsx("div",{className:"px-6 py-4 h-[120px]",children:r.jsx(lt,{size:40})}):p??(t?r.jsx("div",{className:ne(Vc,s),children:t}):null),[p,t,o,s]);return r.jsx(Lr,{open:n,header:e,className:ne(Zr[b].container,c),dividers:m,onClose:()=>u?.(),footer:v??I,size:x,hideClose:y??(!o&&v===void 0),children:j()})},Gr=8,Gc=24,ca=({initialTags:e=[],label:t,required:s,elementId:n,placeholder:a,captionDescription:i,errorText:o,invalid:l,disabled:c,collapseTagOverflow:d=!1,readOnly:u=!1,containerClassName:f,tagClassName:h,onChange:p})=>{const m=g.useRef(null),b=g.useRef([]),x=g.useRef(null),[v,y]=g.useState(e),[I,j]=g.useState(""),[N,w]=g.useState(!1),[A,D]=g.useState(e.length),T=g.useCallback(B=>K=>{b.current[B]=K},[]),E=g.useCallback(()=>{if(!d)return;const B=m.current;if(!B)return;const K=B.offsetWidth;if(K===0)return;const V=x.current?.offsetWidth??0,oe=K-(u?0:Gc)-Gr;let X=0,le=0;for(let G=0;G<v.length;G++){const ee=b.current[G];if(!ee)continue;const ae=ee.offsetWidth+Gr;if(X+ae>oe)break;X+=ae,le++}if(le<v.length&&le>0)for(;X+V>oe&&le>0;){le--;const G=b.current[le]?.offsetWidth??0;X-=G+Gr}D(le)},[d,u,v.length]),L=B=>{const K=B.trim().replace(/,$/,"");if(K&&!v.includes(K)){const V=[K,...v];y(V),p?.(V)}},k=B=>{(B.key===","||B.key==="Enter")&&(B.preventDefault(),L(I),j(""))},z=()=>{I.trim()&&(L(I),j(""))},R=B=>{const K=v.filter((V,W)=>W!==B);y(K),p?.(K)},Z=()=>o?r.jsx(Se,{text:o}):i?r.jsx(Xt,{text:i}):null;g.useEffect(()=>{if(d)return;const B=new ResizeObserver(()=>{if(m.current){const K=m.current.scrollHeight>m.current.clientHeight+10;w(K)}});return m.current&&B.observe(m.current),()=>B.disconnect()},[v,d]),g.useEffect(()=>{if(!d){D(v.length);return}D(v.length);const B=new ResizeObserver(()=>{E()}),K=m.current;return K&&B.observe(K),E(),()=>B.disconnect()},[d,E,v]),g.useEffect(()=>{y(e)},[JSON.stringify(e)]);const H=r.jsxs("div",{ref:m,className:ne("flex gap-2 items-center relative",d?"flex-nowrap overflow-hidden w-full min-w-0":ne("flex-wrap",N?"flex-col-reverse":"flex-row"),f),children:[(d?v.slice(0,A):v).map((B,K)=>r.jsx(pt,{label:B,className:h,closable:!c&&!u,onRemove:!c&&!u?()=>R(K):void 0},B+K)),d&&A<v.length&&r.jsx(O.DialTooltip,{tooltip:v.slice(A).join(", "),triggerClassName:"inline-flex shrink-0 cursor-pointer",children:r.jsx(pt,{label:`+${v.length-A}`})}),!u&&r.jsx("input",{id:n,type:"text",value:I,onChange:B=>j(B.target.value),onKeyDown:k,onBlur:z,className:ne("dial-input outline-hidden !border-none w-full flex-1 !p-1 !h-auto",d?"min-w-0":"min-w-[100px]"),placeholder:a??"",disabled:c}),d&&r.jsxs("div",{className:"absolute left-0 top-0 invisible pointer-events-none h-0 overflow-hidden whitespace-nowrap","aria-hidden":!0,children:[v.map((B,K)=>r.jsx("div",{ref:T(K),className:"inline-flex shrink-0",children:r.jsx(pt,{label:B,className:h,closable:!c&&!u,onRemove:!c&&!u?()=>R(K):void 0})},`measure-${B}-${K}`)),r.jsx("div",{ref:x,className:"inline-flex shrink-0",children:r.jsx(pt,{label:`+${v.length}`})})]})]});return u?H:r.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[r.jsx(ze.DialLabel,{label:t,required:s,htmlFor:n}),r.jsx("div",{className:ne("dial-input min-h-[38px] p-[6px]",l&&"dial-input-error",c&&"dial-input-disable"),children:H}),Z()]})},da=({selectedItems:e,placeholder:t,collapseTagOverflow:s=!1,listClassName:n,listElementClassName:a})=>e?.length?r.jsx(ca,{readOnly:!0,initialTags:e,collapseTagOverflow:s,containerClassName:n,tagClassName:a}):t?r.jsx("span",{className:"text-secondary",children:t}):null,Ur=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z",fill:"currentColor"})),ua=({children:e,open:t,disabled:s=!1,selectedValue:n,valueClassName:a,inputClassName:i,onOpen:o,elementId:l,errorText:c,invalid:d,emptyValueText:u,placeholder:f,editable:h=!1,onValueChange:p,collapseTagOverflow:m=!1,iconBefore:b})=>{const x=Array.isArray(n)&&n.length>0,v=typeof n=="string"&&!!n.trim(),y=x||v?n:f?void 0:u,I=s?void 0:o,j=g.useCallback(D=>{p?.(D.target.value)},[p]),N=()=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:ne("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between",i,s&&"dial-input-disable",(c||d)&&"dial-input-error"),children:[r.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[b&&r.jsx(C.DialIcon,{icon:b}),r.jsx("input",{type:"text",className:ne("flex-1 min-w-0 bg-transparent outline-hidden border-none p-0 dial-small-text text-primary placeholder:text-secondary",a),value:typeof n=="string"?n:"",placeholder:f||u,onChange:j,disabled:s,id:l,"aria-label":"input-popup-field"})]}),!s&&r.jsx("button",{type:"button",className:"shrink-0 cursor-pointer bg-transparent border-none p-0 ml-1",onClick:o,"aria-label":"open-popup",children:r.jsx(C.DialIcon,{icon:r.jsx(Ur,{role:"img",width:P.BASE_ICON_SIZE,height:P.BASE_ICON_SIZE})})})]}),r.jsx(Se,{text:c})]}),w=()=>r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"w-full",onClick:I,"aria-label":"open-popup",id:l,children:r.jsxs("div",{className:ne("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",i,s&&"dial-input-disable",(c||d)&&"dial-input-error"),children:[r.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[b&&r.jsx(C.DialIcon,{icon:b}),r.jsx(O.DialTooltip,{tooltip:y==null?void 0:String(y),children:y||!f?r.jsx("span",{className:a,children:y}):r.jsx("span",{className:"text-secondary",children:f})})]}),!s&&r.jsx("div",{className:"shrink-0",children:r.jsx(C.DialIcon,{icon:r.jsx(Ur,{role:"img",width:P.BASE_ICON_SIZE,height:P.BASE_ICON_SIZE})})})]})}),r.jsx(Se,{text:c})]}),A=()=>r.jsx("div",{className:"w-full",onClick:I,children:r.jsxs("div",{className:ne("dial-input px-3 py-2 flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",s&&"dial-input-disable"),children:[r.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[b&&r.jsx(C.DialIcon,{icon:b}),r.jsx(da,{placeholder:f,selectedItems:y,collapseTagOverflow:m})]}),!s&&r.jsx("div",{className:"ml-1",children:r.jsx(C.DialIcon,{icon:r.jsx(Ur,{role:"img",width:P.BASE_ICON_SIZE,height:P.BASE_ICON_SIZE})})})]})});return r.jsxs(r.Fragment,{children:[x?A():h?N():w(),t&&zn.createPortal(e,document.body)]})},Uc=({label:e,htmlFor:t,disabled:s,selectedValue:n,radioButtons:a,customInputValue:i,valueClassName:o,inputClassName:l,emptyValueText:c,placeholder:d,onClose:u,header:f,portalId:h,onApply:p,onCancel:m,cancelButtonTitle:b="Cancel",applyButtonTitle:x="Apply",isValid:v,selectedRadioValue:y,onChangeRadioField:I,id:j,size:N=De.Md})=>{const[w,A]=g.useState(!1),D=g.useCallback(()=>{s||A(!0)},[s]),T=g.useCallback(()=>{A(!1),u?.()},[u]),E=g.useCallback(()=>{m?.(),T()},[m,T]),L=g.useCallback(()=>{p(),T()},[p,T]);return r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx(ze.DialLabel,{label:e,htmlFor:t}),r.jsx(ua,{disabled:s,open:w,selectedValue:i??a.find(k=>k.id===n)?.name,valueClassName:o,inputClassName:ne(l,"py-2","px-3"),emptyValueText:c,placeholder:d,onOpen:D,children:r.jsx(Lr,{open:w,onClose:E,header:f,portalId:h,size:N,footer:r.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[r.jsx(Qt,{label:b,onClick:E}),r.jsx(Jt,{label:x,onClick:L,disabled:!v})]}),children:r.jsx("div",{className:"px-6 py-4",children:r.jsx(Vn,{radioButtons:a,labelClassName:"dial-small-text",activeRadioButton:y,onChange:I,elementId:j,orientation:Ae.Column})})})})]})},qc="Create",Yc="Cancel",Xc="flex items-center justify-end gap-2 px-6 py-3",Jc=({header:e,open:t=!1,submitLabel:s=qc,cancelLabel:n=Yc,isLoading:a=!1,disableSubmitButton:i=!1,className:o,submitClassName:l,onClose:c,onSubmit:d,onCancel:u,children:f,dividers:h=!0,size:p=De.Md,footer:m})=>{const b=a?null:r.jsxs("div",{className:Xc,children:[r.jsx(Qt,{label:n,onClick:()=>u?u():c?.()}),r.jsx(Jt,{className:l,label:s,disabled:i,onClick:()=>d()})]}),x=g.useCallback(()=>a?r.jsx("div",{className:"px-6 py-4 h-[120px]",children:r.jsx(lt,{size:50})}):f??null,[f,a]);return r.jsx(Lr,{open:t,header:e,className:o,dividers:h,onClose:()=>c?.(),footer:m??b,size:p,children:x()})},Qc="bg-layer-4 flex items-center justify-center enabled:text-secondary enabled:hover:text-accent-primary enabled:active:bg-controls-accent-primary-alpha-active enabled:hover:bg-accent-primary-alpha enabled:active:text-accent-primary",e1=({icon:e,onClick:t,disabled:s,size:n=O.ElementSize.Standard,className:a})=>r.jsx("div",{className:ne("border-l border-tertiary",n===O.ElementSize.Standard?"h-[40px] w-[44px]":"h-[24px] w-[32px]"),children:r.jsx(O.DialIconButton,{className:ne(Qc,n===O.ElementSize.Small&&"p-1",a),icon:e,onClick:t,disabled:s,size:n})}),t1=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],fa=(e,t,s,n)=>{if((t==="number"||s!==void 0||n!==void 0)&&!t1.includes(e.key)&&!(e.ctrlKey||e.metaKey)&&!(e.key==="-"&&(e.currentTarget.selectionStart??0)===0&&!e.currentTarget.value.includes("-"))&&!(e.key==="."&&t==="number"&&!e.currentTarget.value.includes("."))){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(s!==void 0||n!==void 0){const i=e.currentTarget.value,o=e.currentTarget.selectionStart||0,l=i.slice(0,o)+e.key+i.slice(o),c=parseFloat(l);if(!isNaN(c)){if(s!==void 0&&c<+s){e.preventDefault();return}if(n!==void 0&&c>+n){e.preventDefault();return}}}}},Qe=({labelProps:e,error:t,caption:s,id:n,containerClassName:a,...i})=>r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-y-3",a),children:[e&&r.jsx(ze.DialLabel,{...e,htmlFor:n}),r.jsx(pa,{id:n,...i}),r.jsx(Se,{text:t}),!t&&r.jsx(Xt,{text:s})]}),pa=({invalid:e,disabled:t,prefix:s,className:n,postfix:a,iconBefore:i,iconAfter:o,wrapperClassName:l,type:c,inputRef:d,value:u,tooltipText:f,min:h,onChange:p,max:m,inputButtonProps:b,...x})=>{const v=g.useRef(null),y=J.useMergeRefs([d,v]),I=c==="number"||h!==void 0||m!==void 0;g.useEffect(()=>{const A=v.current;if(!A||!I||t)return;const D=T=>{T.preventDefault()};return A.addEventListener("wheel",D,{passive:!1}),()=>{A.removeEventListener("wheel",D)}},[t,I,c]);const j=A=>{fa(A,c,h,m)},N=A=>{const D=A.currentTarget.value;if(I&&D!==""){const T=parseFloat(D);if(isNaN(T)&&D!=="-"&&D!=="."||!isNaN(T)&&(h!==void 0&&T<+h||m!==void 0&&T>+m))return}p?.(D||void 0)},w=()=>r.jsxs("div",{className:S.mergeClasses("dial-input flex flex-row items-center gap-x-2 justify-between py-2",e&&"dial-input-error",t&&"dial-input-disable",!s&&"pl-3",!b&&"pr-3",l),"aria-label":"input-container",children:[s&&r.jsx("div",{className:"border-r border-tertiary",children:r.jsx(pa,{wrapperClassName:"!rounded-r-none",className:"truncate",value:s,disabled:!0,id:`${s}_textBefore`})}),r.jsx(C.DialIcon,{icon:i}),r.jsx("input",{ref:y,type:c,autoComplete:c==="password"?"new-password":"off",value:u??"",className:S.mergeClasses("border-0 bg-transparent w-full truncate",t&&"cursor-not-allowed",n),onChange:N,onKeyDown:j,min:h,disabled:t,max:m,...x}),a&&r.jsxs("p",{className:"text-secondary dial-small-text",children:[" ",a]}),r.jsx(C.DialIcon,{icon:o}),b&&r.jsx(e1,{...b,disabled:t})]});return t&&c!=="password"?r.jsx(O.DialTooltip,{tooltip:f||u,children:w()}):w()},r1=/^0+\.(\d+)?$/,s1=/^0+/,as=({integer:e,onChange:t,min:s,max:n,onKeyDown:a,onPaste:i,...o})=>{const l=u=>!u||u==="-"?u:String(u)?.match(r1)?String(u)?.replace(s1,"0"):Number(u),c=u=>{if([".","-","+","e","E"].includes(u.key)){u.preventDefault();return}fa(u,"number",s,n)},d=u=>{const f=u.clipboardData.getData("text"),h=f.replace(/\D/g,"");if(h!==f&&(u.preventDefault(),h)){const p=u.currentTarget,m=p.selectionStart??0,b=p.selectionEnd??0,x=p.value.slice(0,m)+h+p.value.slice(b);t?.(l(x))}};return r.jsx(Qe,{type:"number",min:s,max:n,onChange:u=>t?.(l(u)),onKeyDown:e?c:a,onPaste:e?d:i,...o})},n1=({onClick:e})=>r.jsx(_.IconEyeOff,{...P.BASE_ICON_PROPS,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),a1=({onClick:e})=>r.jsx(_.IconEye,{...P.BASE_ICON_PROPS,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),ha=({...e})=>{const[t,s]=g.useState(!1),n=g.useCallback(a=>{s(a)},[]);return r.jsx(Qe,{type:t?"text":"password",...e,iconAfter:e.disabled?null:t?r.jsx(n1,{onClick:()=>n(!1)}):r.jsx(a1,{onClick:()=>n(!0)})})},ma={[O.ElementSize.Small]:{className:"dial-tiny-text",wrapperClassName:"pl-2 py-0",containerClassName:"h-[24px]",iconSize:16,iconStroke:1},[O.ElementSize.Standard]:{className:"dial-small-text",wrapperClassName:"",containerClassName:"",iconSize:20,iconStroke:1.5},[O.ElementSize.Large]:{className:"",wrapperClassName:"",containerClassName:"",iconSize:0,iconStroke:0}},ga=({size:e=O.ElementSize.Standard,placeholder:t="Search...",value:s,onChange:n,withoutBorder:a,...i})=>{const[o,l]=g.useState(s||"");g.useEffect(()=>{l(s||"")},[s]);const c=g.useCallback(h=>{l(h||""),n?.(h||"")},[n]),d=ma[e],u=g.useCallback(()=>{c("")},[c]),f=g.useMemo(()=>{if(o)return{icon:r.jsx(_.IconX,{size:d.iconSize,"aria-label":"Clear search",role:"button"}),className:a?"bg-transparent":"",onClick:u,size:e}},[u,o,e,d.iconSize,a]);return r.jsx(Qe,{placeholder:t,iconBefore:r.jsx(_.IconSearch,{size:d.iconSize,stroke:d.iconStroke}),value:o,onChange:c,inputButtonProps:f,containerClassName:d.containerClassName,className:d.className,wrapperClassName:S.mergeClasses(d.wrapperClassName,a?"!border-0 !ps-5 [&>div]:!border-0":""),...i})},xa=({options:e,selectedValues:t,handleRemoveTag:s})=>r.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(n=>{const a=e.find(o=>o.value===n)?.label??n,i=e.find(o=>o.value===n)?.icon;return r.jsx(pt,{label:a,onRemove:o=>s?.(o,n),icon:i?r.jsx(C.DialIcon,{icon:i}):null,className:"max-w-full"},n)})});var mr=(e=>(e.Sm="sm",e.Md="md",e))(mr||{}),gr=(e=>(e.Primary="Primary",e.Secondary="Secondary",e))(gr||{});const i1="dial-input flex w-full items-center justify-between gap-2 dial-small-text cursor-pointer",o1="w-full rounded flex flex-col",Ht="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small-text text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-hidden",l1="bg-accent-primary-alpha",is="bg-accent-primary-alpha border-l border-accent-primary",xr="opacity-75",c1=352,d1=4,u1=r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.SM}),f1=({opt:e,selectedValues:t,onSelect:s})=>{const{isOpen:n,refs:a,floatingStyles:i,context:o,getReferenceProps:l,getFloatingProps:c}=C.useSubMenuFloating(d1,"listbox",!!e.disabled),d=e.children?.some(u=>t.includes(u.value));return r.jsxs(r.Fragment,{children:[r.jsxs("button",{ref:a.setReference,type:"button",role:"option","aria-haspopup":"listbox","aria-expanded":n,"aria-selected":!!d,"aria-disabled":!!e.disabled,disabled:e.disabled,className:ne(Ht,d&&is,e.disabled&&xr),...l(),children:[r.jsxs("div",{className:"flex items-center gap-2 w-full min-w-0",children:[e.icon&&r.jsx(C.DialIcon,{icon:e.icon}),r.jsx(C.DialEllipsisTooltip,{text:e.labelNode??e.label})]}),r.jsx(_.IconChevronRight,{size:14,className:"shrink-0"})]}),n&&r.jsx(C.SubMenuPanel,{refs:a,floatingStyles:i,context:o,getFloatingProps:c,role:"listbox",className:"w-max py-1",children:e.children.map(u=>{const f=t.includes(u.value);return r.jsx("button",{type:"button",role:"option","aria-selected":f,"aria-disabled":!!u.disabled,disabled:u.disabled,className:ne(Ht,f&&is,u.disabled&&xr),onClick:()=>!u.disabled&&s(u.value),children:r.jsxs("div",{className:"flex items-center gap-2 w-full",children:[u.icon&&r.jsx(C.DialIcon,{icon:u.icon}),r.jsx(C.DialEllipsisTooltip,{text:u.labelNode??u.label})]})},u.value)})})]})},Ke=({options:e,multiple:t=!1,elementId:s,value:n,defaultValue:a,variant:i=gr.Primary,size:o=mr.Md,prefix:l,customSelectedValue:c,placeholder:d="Select...",searchable:u=!1,searchSize:f=O.ElementSize.Standard,searchPlaceholder:h,selectAll:p=!1,invalid:m,selectAllLabel:b="Select all",emptyStateTitle:x="No options available",emptyStateDescription:v,emptyStateIcon:y,disabled:I=!1,className:j,listClassName:N,closable:w=!1,header:A,footer:D,onClose:T,onChange:E,inlineSearch:L=!1,dismissRef:k,onFooterClick:z,open:R,onOpenChange:Z,onInlineQueryChange:H,customMultiSelectTagsRenderer:B})=>{const K=g.useId(),[V,W]=g.useState(!1),oe=R!==void 0,X=oe?!!R:V,le=g.useCallback(M=>{oe||W(M),Z?.(M)},[oe,Z]),[G,ee]=g.useState(L&&c||""),ae=g.useRef(null),de=g.useCallback(M=>{M!==G&&(ee(M||""),H?.(M||""))},[H,G]),me=n!==void 0,[Ne,xe]=g.useState(a),U=me?n:Ne,Q=g.useMemo(()=>t?Array.isArray(U)?U:[]:typeof U=="string"?[U]:[],[U,t]),_e=g.useMemo(()=>{const M=G.trim().toLowerCase();return M?e.filter(ie=>ie.label.toLowerCase().includes(M)):e},[e,G]);g.useEffect(()=>{!X&&!L&&de("")},[L,X,de]);const Be=g.useRef(c);g.useEffect(()=>{L&&c!==Be.current&&(X||(Be.current=c,de(c||"")))},[c,L,X,de]);const ve=g.useCallback(M=>{me||xe(M),E?.(M)},[me,E]),Ue=g.useCallback(M=>{if(t){const ie=new Set(Q);ie.has(M)?ie.delete(M):ie.add(M),ve(Array.from(ie));return}if(ve(M),L){const ie=e.find(Le=>Le.value===M)??e.flatMap(Le=>Le.children??[]).find(Le=>Le.value===M);ie&&de(ie.label)}le(!1)},[t,ve,L,le,Q,e,de]),ct=g.useCallback((M,ie)=>{if(M.stopPropagation(),!t){ve("");return}const Le=Q.filter(kr=>kr!==ie);ve(Le)},[t,Q,ve]),Ce=g.useMemo(()=>_e.filter(M=>!M.disabled),[_e]),Y=g.useMemo(()=>Ce.filter(M=>Q.includes(M.value)).length,[Ce,Q]),ue=g.useCallback(M=>{L&&!t&&!M&&Ue(G),le(M)},[Ue,L,t,G,le]),{allSelectedInFiltered:fe,someSelectedInFiltered:Mt}=g.useMemo(()=>{const M=Ce.length>0&&Y===Ce.length;return{allSelectedInFiltered:M,someSelectedInFiltered:Y>0&&!M}},[Ce,Y]),St=g.useCallback(()=>{if(!(!t||Ce.length===0))if(fe){const M=new Set(Ce.map(ie=>ie.value));ve(Q.filter(ie=>!M.has(ie)))}else{const M=new Set(Q);Ce.forEach(ie=>M.add(ie.value)),ve(Array.from(M))}},[fe,t,Ce,Q,ve]),we=Q.length>0;g.useEffect(()=>{X&&L&&!t&&!I&&requestAnimationFrame(()=>{const M=ae.current;if(!M)return;M.focus();const ie=M.value?.length??0;M.setSelectionRange?.(ie,ie)})},[X,L,t,I]);const st=!t&&we?Q[0]:void 0,je=g.useMemo(()=>st?e.find(M=>M.value===st)??e.flatMap(M=>M.children??[]).find(M=>M.value===st):void 0,[e,st]),_r=g.useCallback(()=>t?we?B?.(e,Q,ct)||r.jsx(xa,{options:e,selectedValues:Q,handleRemoveTag:ct}):r.jsx("span",{className:"text-secondary truncate",children:d}):je?r.jsxs(r.Fragment,{children:[je.icon&&r.jsx(C.DialIcon,{icon:je.icon}),r.jsx(C.DialEllipsisTooltip,{text:je.labelNode??(l?`${l} ${je.label}`:je.label)}),je?.description&&r.jsx("div",{className:"text-secondary dial-small-text",children:je.description})]}):c&&n?c:r.jsx("span",{className:"text-secondary truncate",children:d}),[we,t,c,l,n,d,je,e,Q,ct,B]);g.useImperativeHandle(k,()=>({dismiss:()=>{le(!1)}}));const It=g.useCallback(()=>{de(Q.length===1?je?.label??G:"")},[G,Q.length,de,je?.label]),dt=g.useCallback(()=>{I||(le(!X),L&&!t&&(It(),ae.current?.focus()))},[I,L,X,t,It,le]);return r.jsx(C.DialDropdown,{open:X,onOpenChange:ue,disabled:I,closable:w,onClose:T,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],maxDropdownHeight:u?null:c1,listClassName:N,renderOverlay:()=>r.jsxs("div",{id:`list-${s||K}`,role:"listbox","aria-multiselectable":t||void 0,className:o1,children:[A&&r.jsx(r.Fragment,{children:typeof A=="function"?A():A}),(u||w)&&e.length>8&&r.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[u&&r.jsx(ga,{size:f,placeholder:h,onChange:de,value:G,id:`search-${s||K}`,containerClassName:S.mergeClasses(ma[f].containerClassName,"w-full")}),w&&r.jsx(ot,{"aria-label":"Close select",className:"shrink-0",iconBefore:r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM}),onClick:M=>{T?.(M),le(!1)}})]}),t&&p&&Ce.length>0&&r.jsx("div",{className:ne(Ht,"mt-2"),children:r.jsx(es,{id:`${s||K}-selectAll`,label:b,checked:fe,indeterminate:Mt,onChange:St,ariaLabel:b})}),r.jsx("div",{className:ne("overflow-y-auto max-h-[352px]",L&&_e.length===0?"":"py-1"),children:_e.length===0?!L&&r.jsx("div",{className:"px-2 py-3",children:r.jsx(C.DialNoDataContent,{icon:y??r.jsx(_.IconClipboardX,{size:P.DIAL_ICON_SIZE.LG,stroke:.5}),title:x,description:v})}):_e.map(M=>{const ie=Q.includes(M.value);return t?r.jsxs("div",{role:"option","aria-selected":ie,"aria-disabled":!!M.disabled,className:ne(Ht,ie&&l1,M.disabled&&xr,"w-full"),children:[r.jsx(es,{id:`${s||K}-${M.value}`,label:r.jsxs("span",{className:"flex w-full flex-1 pl-2 min-w-0 items-center gap-2 text-primary",children:[M.icon&&r.jsx(C.DialIcon,{icon:M.icon}),r.jsx("span",{className:"truncate",children:M.labelNode??M.label})]}),checked:ie,disabled:M.disabled,onChange:()=>!M.disabled&&Ue(M.value),ariaLabel:M.label}),M.description&&r.jsx("div",{className:"text-secondary dial-small-text",children:M.description})]},M.value):M.children?.length?r.jsx(f1,{opt:M,selectedValues:Q,onSelect:Ue},M.value):r.jsx("button",{role:"option",type:"button","aria-selected":ie,"aria-disabled":!!M.disabled,disabled:M.disabled,className:ne(Ht,ie&&is,M.disabled&&xr),onClick:()=>!M.disabled&&Ue(M.value),children:r.jsxs("div",{className:"flex items-center gap-2 w-full",children:[M.icon&&r.jsx(C.DialIcon,{icon:M.icon}),r.jsx(C.DialEllipsisTooltip,{text:M.labelNode??M.label}),M.description&&r.jsx("div",{className:"text-secondary dial-small-text",children:M.description})]})},M.value)})}),D&&r.jsx("div",{onClick:M=>{z?.(M),z&&le(!1)},children:typeof D=="function"?D():D})]}),children:r.jsxs("div",{role:"button",tabIndex:0,"aria-roledescription":"button to open select list","aria-haspopup":"listbox","aria-expanded":X,"aria-controls":`list-${s||K}`,className:S.mergeClasses(i1,I&&"opacity-75 !cursor-not-allowed !border-primary",o===mr.Sm?"min-h-[25px] px-1.5 py-1":"min-h-[38px] px-3 py-2",m&&"dial-input-error",i===gr.Secondary?"!bg-layer-4 !h-auto":"",j),onMouseDown:M=>{I||L&&!t&&(It(),M.preventDefault())},onClick:()=>{dt()},onKeyDown:M=>{(M.key===" "||M.code==="Space")&&(M.preventDefault(),dt())},children:[L&&!t?r.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary flex-1",children:r.jsx("input",{id:`inline-${s||K}`,type:"text",placeholder:h??d,value:G||"",onChange:M=>de(M.currentTarget.value.trimStart()),onFocus:()=>!I&&le(!0),onMouseDown:M=>{It(),M.stopPropagation()},onClick:M=>{M.stopPropagation()},onKeyDown:M=>{M.stopPropagation()},className:"bg-transparent outline-hidden w-full dial-small-text",ref:ae,disabled:I,"aria-disabled":I,autoComplete:"off"})}):r.jsx("div",{className:"flex w-full min-w-0 items-center gap-2 text-primary",children:_r()}),!L&&r.jsx(C.DialIcon,{icon:u1,className:ne("text-primary",X&&"rotate-180")})]})})},p1=({label:e,required:t,captionDescription:s,containerClassName:n,selectClassName:a,error:i,id:o,caption:l,readonly:c,value:d,defaultEmptyText:u,...f})=>{const h=g.useCallback(()=>{if(!d||Array.isArray(d)&&d.length===0)return u??"None";if(Array.isArray(d))return r.jsx(xa,{options:f.options,selectedValues:d});{const p=f.options?.find(m=>m.value===d);return r.jsx("span",{"aria-readonly":!0,className:"text-primary",children:p?.label||d})}},[d,f.options,u]);return r.jsx(yr,{id:o,label:e,required:t,description:l,error:i,captionDescription:s,className:n,readonly:c,value:h(),defaultEmptyText:u,children:r.jsx(Ke,{className:a,value:d,elementId:o,invalid:!!i,...f})})};function Ca(e){let t=null;return()=>(t==null&&(t=e()),t)}function h1(e,t){return e.filter(s=>s!==t)}function m1(e,t){const s=new Set,n=i=>s.add(i);e.forEach(n),t.forEach(n);const a=[];return s.forEach(i=>a.push(i)),a}class g1{enter(t){const s=this.entered.length,n=a=>this.isNodeInDocument(a)&&(!a.contains||a.contains(t));return this.entered=m1(this.entered.filter(n),[t]),s===0&&this.entered.length>0}leave(t){const s=this.entered.length;return this.entered=h1(this.entered.filter(this.isNodeInDocument),t),s>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class x1{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const s={};Object.keys(this.config.exposeProperties).forEach(n=>{const a=this.config.exposeProperties[n];a!=null&&(s[n]={value:a(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,s)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,s){return s===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Tr="__NATIVE_FILE__",ba="__NATIVE_URL__",va="__NATIVE_TEXT__",ya="__NATIVE_HTML__",on=Object.freeze(Object.defineProperty({__proto__:null,FILE:Tr,HTML:ya,TEXT:va,URL:ba},Symbol.toStringTag,{value:"Module"}));function qr(e,t,s){const n=t.reduce((a,i)=>a||e.getData(i),"");return n??s}const os={[Tr]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[ya]:{exposeProperties:{html:(e,t)=>qr(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[ba]:{exposeProperties:{urls:(e,t)=>qr(e,t,"").split(`
|
|
2
|
-
`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[va]:{exposeProperties:{text:(e,t)=>qr(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function C1(e,t){const s=os[e];if(!s)throw new Error(`native type ${e} has no configuration`);const n=new x1(s);return n.loadDataTransfer(t),n}function Yr(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(os).filter(s=>{const n=os[s];return n?.matchesTypes?n.matchesTypes.some(a=>t.indexOf(a)>-1):!1})[0]||null}const b1=Ca(()=>/firefox/i.test(navigator.userAgent)),Sa=Ca(()=>!!window.safari);class ln{interpolate(t){const{xs:s,ys:n,c1s:a,c2s:i,c3s:o}=this;let l=s.length-1;if(t===s[l])return n[l];let c=0,d=o.length-1,u;for(;c<=d;){u=Math.floor(.5*(c+d));const p=s[u];if(p<t)c=u+1;else if(p>t)d=u-1;else return n[u]}l=Math.max(0,d);const f=t-s[l],h=f*f;return n[l]+a[l]*f+i[l]*h+o[l]*f*h}constructor(t,s){const{length:n}=t,a=[];for(let p=0;p<n;p++)a.push(p);a.sort((p,m)=>t[p]<t[m]?-1:1);const i=[],o=[];let l,c;for(let p=0;p<n-1;p++)l=t[p+1]-t[p],c=s[p+1]-s[p],i.push(l),o.push(c/l);const d=[o[0]];for(let p=0;p<i.length-1;p++){const m=o[p],b=o[p+1];if(m*b<=0)d.push(0);else{l=i[p];const x=i[p+1],v=l+x;d.push(3*v/((v+x)/m+(v+l)/b))}}d.push(o[o.length-1]);const u=[],f=[];let h;for(let p=0;p<d.length-1;p++){h=o[p];const m=d[p],b=1/i[p],x=m+d[p+1]-h-h;u.push((h-m-x)*b),f.push(x*b*b)}this.xs=t,this.ys=s,this.c1s=d,this.c2s=u,this.c3s=f}}const v1=1;function Ia(e){const t=e.nodeType===v1?e:e.parentElement;if(!t)return null;const{top:s,left:n}=t.getBoundingClientRect();return{x:n,y:s}}function ir(e){return{x:e.clientX,y:e.clientY}}function y1(e){var t;return e.nodeName==="IMG"&&(b1()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function S1(e,t,s,n){let a=e?t.width:s,i=e?t.height:n;return Sa()&&e&&(i/=window.devicePixelRatio,a/=window.devicePixelRatio),{dragPreviewWidth:a,dragPreviewHeight:i}}function I1(e,t,s,n,a){const i=y1(t),l=Ia(i?e:t),c={x:s.x-l.x,y:s.y-l.y},{offsetWidth:d,offsetHeight:u}=e,{anchorX:f,anchorY:h}=n,{dragPreviewWidth:p,dragPreviewHeight:m}=S1(i,t,d,u),b=()=>{let w=new ln([0,.5,1],[c.y,c.y/u*m,c.y+m-u]).interpolate(h);return Sa()&&i&&(w+=(window.devicePixelRatio-1)*m),w},x=()=>new ln([0,.5,1],[c.x,c.x/d*p,c.x+p-d]).interpolate(f),{offsetX:v,offsetY:y}=a,I=v===0||v,j=y===0||y;return{x:I?v:x(),y:j?y:b()}}class N1{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,s){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=s}}function j1(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function cn(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable}))),n.forEach(function(a){j1(e,a,s[a])})}return e}class D1{profile(){var t,s;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((s=this.dragOverTargetIds)===null||s===void 0?void 0:s.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var s;(s=this.window)===null||s===void 0||s.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,s,n){return this.sourcePreviewNodeOptions.set(t,n),this.sourcePreviewNodes.set(t,s),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,s,n){this.sourceNodes.set(t,s),this.sourceNodeOptions.set(t,n);const a=o=>this.handleDragStart(o,t),i=o=>this.handleSelectStart(o);return s.setAttribute("draggable","true"),s.addEventListener("dragstart",a),s.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),s.removeEventListener("dragstart",a),s.removeEventListener("selectstart",i),s.setAttribute("draggable","false")}}connectDropTarget(t,s){const n=o=>this.handleDragEnter(o,t),a=o=>this.handleDragOver(o,t),i=o=>this.handleDrop(o,t);return s.addEventListener("dragenter",n),s.addEventListener("dragover",a),s.addEventListener("drop",i),()=>{s.removeEventListener("dragenter",n),s.removeEventListener("dragover",a),s.removeEventListener("drop",i)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourceNodeOptions.get(t);return cn({dropEffect:this.altKeyPressed?"copy":"move"},s||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourcePreviewNodeOptions.get(t);return cn({anchorX:.5,anchorY:.5,captureDraggingState:!1},s||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(on).some(s=>on[s]===t)}beginDragNativeItem(t,s){this.clearCurrentDragSourceNode(),this.currentNativeSource=C1(t,s),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const s=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},s)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,s){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(s))}handleDragEnter(t,s){this.dragEnterTargetIds.unshift(s)}handleDragOver(t,s){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(s)}handleDrop(t,s){this.dropTargetIds.unshift(s)}constructor(t,s,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=a=>{const i=this.sourceNodes.get(a);return i&&Ia(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=a=>!!(a&&this.document&&this.document.body&&this.document.body.contains(a)),this.endDragIfSourceWasRemovedFromDOM=()=>{const a=this.currentDragSourceNode;a==null||this.isNodeInDocument(a)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=a=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(a||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=a=>{if(a.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const o=ir(a);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:o});const{dataTransfer:l}=a,c=Yr(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const u=this.monitor.getSourceId(),f=this.sourceNodes.get(u),h=this.sourcePreviewNodes.get(u)||f;if(h){const{anchorX:p,anchorY:m,offsetX:b,offsetY:x}=this.getCurrentSourcePreviewNodeOptions(),I=I1(f,h,o,{anchorX:p,anchorY:m},{offsetX:b,offsetY:x});l.setDragImage(h,I.x,I.y)}}try{l?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(a.target);const{captureDraggingState:d}=this.getCurrentSourcePreviewNodeOptions();d?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(l&&!l.types&&(a.target&&!a.target.hasAttribute||!a.target.hasAttribute("draggable")))return;a.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=a=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(a.dataTransfer)}if(!this.enterLeaveCounter.enter(a.target)||this.monitor.isDragging())return;const{dataTransfer:l}=a,c=Yr(l);c&&this.beginDragNativeItem(c,l)},this.handleTopDragEnter=a=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=a.altKey,i.length>0&&this.actions.hover(i,{clientOffset:ir(a)}),i.some(l=>this.monitor.canDropOnTarget(l))&&(a.preventDefault(),a.dataTransfer&&(a.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=a=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(a.dataTransfer)}},this.handleTopDragOver=a=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){a.preventDefault(),a.dataTransfer&&(a.dataTransfer.dropEffect="none");return}this.altKeyPressed=a.altKey,this.lastClientOffset=ir(a),this.scheduleHover(i),(i||[]).some(l=>this.monitor.canDropOnTarget(l))?(a.preventDefault(),a.dataTransfer&&(a.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?a.preventDefault():(a.preventDefault(),a.dataTransfer&&(a.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=a=>{this.isDraggingNativeItem()&&a.preventDefault(),this.enterLeaveCounter.leave(a.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=a=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;a.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(a.dataTransfer)}else Yr(a.dataTransfer)&&a.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=a=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:ir(a)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=a=>{const i=a.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(a.preventDefault(),i.dragDrop()))},this.options=new N1(s,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new g1(this.isNodeInDocument)}}const w1=function(t,s,n){return new D1(t,s,n)},L1=({onChange:e,emptyTextFirstLine:t,emptyTextSecondLine:s,emptyButtonLabel:n,acceptTypes:a,maxFilesCount:i,multiple:o,fileFormatError:l,fileCountError:c,fileSizeError:d,getIsFileFormatError:u,getIsFileSizeError:f})=>{const h=g.useRef(null),p=g.useRef(null),[m,b]=g.useState([]),[x,v]=g.useState(!1),[y,I]=g.useState(!1),j=g.useCallback(H=>{const B=H.target.files;if(B&&B.length>0){const K=Array.from(B),V=u?.(K),W=f?.(K);V?v(!0):W?I(!0):e(K)}},[u,f,e]),N=g.useCallback(H=>i&&H?.length>i,[i]),w=g.useMemo(()=>x||y||N(m),[x,y,N,m]),A=()=>{b([]),v(!1),I(!1)},D=g.useMemo(()=>x?r.jsx(Se,{text:l}):y?r.jsx(Se,{text:d}):N(m)?r.jsx(Se,{text:c}):null,[c,l,d,m,N,x,y]);g.useEffect(()=>{A()},[a]);const[{isOver:T,canDrop:E},L]=Cs(()=>({accept:[Tr],drop(H){const B=H.files,K=u?.(B)??!1,V=f?.(B)??!1,W=N?.(B)??!1;if(v(K),I(V),K||V||W){b(B);return}e(B),A()},collect:H=>({isOver:H.isOver(),canDrop:H.canDrop()})}),[e,u,f,N]),k=H=>{(H.key==="Enter"||H.key==="Space")&&(H.preventDefault(),p.current?.click())},z=H=>{H?.preventDefault();const B=Array.from(H.dataTransfer?.items??[]);v(!!u?.(B)),I(!!f?.(B)),b(B)},R=H=>{H.target===H.currentTarget&&A()},Z=ne("border border-dashed rounded size-full cursor-pointer relative hover:border-hover",!E&&!w&&"border-primary",E&&(T?"border-accent-primary":"border-hover"),w&&"border-error");return L(h),r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:Z,ref:h,onDragOver:z,onDragLeave:R,children:[r.jsxs("label",{htmlFor:"file",tabIndex:0,onKeyDown:k,className:"flex flex-col items-center cursor-pointer size-full text-secondary dial-tiny-text justify-center",children:[t&&r.jsx("p",{className:"mb-1",children:t}),s&&r.jsx("p",{className:"mb-0.5",children:s}),n&&r.jsx(Jt,{appearance:O.ButtonAppearance.Ghost,label:n,onClick:()=>p.current?.click()})]}),r.jsx("input",{multiple:o,id:"file",type:"file",ref:p,hidden:!0,accept:a,onChange:j})]}),r.jsx(r.Fragment,{children:D})]})},T1=({iconBefore:e,className:t,...s})=>{const n=s.invalid,a=()=>r.jsx("div",{className:"mr-2",children:n?r.jsx(_.IconExclamationCircle,{...P.BASE_ICON_PROPS,className:"text-error"}):e});return r.jsx(Qe,{...s,iconBefore:a(),containerClassName:ne("h-[40px] p-0",n&&"h-[60px]"),className:ne("rounded-r-none border-r-0",n&&"text-error",t)})},E1=({children:e,existingFiles:t,onDrop:s,getIsFileFormatError:n,getIsFileSizeError:a,maxFilesCount:i,fileFormatError:o,fileSizeError:l,fileCountError:c})=>{const d=g.useRef(null),[u,f]=g.useState(!1),[h,p]=g.useState(!1),[m,b]=g.useState(0),x=g.useCallback(()=>{f(!1),p(!1),b(0)},[]),v=g.useCallback(T=>!!(i&&t.length+T.length>i),[i,t.length]),y=u||h,[{isOver:I,canDrop:j},N]=Cs(()=>({accept:[Tr],drop(T){const E=T.files,L=[...t,...E],k=n?.(E)??!1,z=a?.(E)??!1,R=v?.(E)??!1;if(f(k),p(z),k||z||R){b(E.length);return}s(L),x()},collect:T=>({isOver:T.isOver(),canDrop:T.canDrop()})}),[t,s,n,a,v,x]),w=T=>{T.preventDefault();const E=Array.from(T.dataTransfer?.items??[]);f(!!n?.(E)),p(!1),b(E.length)},A=T=>{T.target===T.currentTarget&&x()};N(d);const D=v(Array.from({length:m}));return r.jsxs("div",{className:"h-full flex flex-col",children:[r.jsx("div",{ref:d,onDragOver:w,onDragLeave:A,className:ne("flex-1 min-h-0 border border-solid rounded p-2 overflow-y-auto",!y&&!D&&(j&&I?"border-accent-primary":"border-primary"),(y||D)&&"border-error"),children:e}),u&&r.jsx(Se,{text:o}),h&&r.jsx(Se,{text:l}),!u&&!h&&D&&r.jsx(Se,{text:c})]})},Na=e=>{const{files:t,iconBeforeInput:s,dynamicIcon:n,onChange:a,isInvalid:i,errorText:o,removeButtonAriaLabel:l,getIsMultiFilesSizeError:c,multiFilesSizeError:d,getIsFileFormatError:u,getIsFileSizeError:f,maxFilesCount:h}=e,p=g.useCallback((x,v)=>{x.stopPropagation(),a(t?.filter(y=>y.name!==v)||[])},[a,t]),m=g.useCallback(x=>r.jsx(wr,{"aria-label":l,onClick:v=>p(v,x)}),[l,p]),b=g.useMemo(()=>r.jsx("div",{className:"flex flex-col gap-y-1",children:t?.map((x,v)=>r.jsx(T1,{id:x.name,value:x.name,iconAfter:m(x.name),iconBefore:s||n?.(x.name),invalid:i?.(x),error:i?.(x)?o:""},x.name+v))}),[t,s,n,i,o,m]);return r.jsx(bl,{backend:w1,children:!t||t.length===0?r.jsx(L1,{...e,onChange:a}):r.jsxs(r.Fragment,{children:[r.jsx(E1,{existingFiles:t,onDrop:a,getIsFileFormatError:u,getIsFileSizeError:f,maxFilesCount:h,fileFormatError:e.fileFormatError,fileSizeError:e.fileSizeError,fileCountError:e.fileCountError,children:b}),c?.(t)&&r.jsx(Se,{text:d})]})})},O1=({onChange:e,fieldTitle:t,elementId:s,files:n,maxFilesCount:a,maxFileSize:i,maxMultiFilesSize:o,fileFormatError:l,fileCountError:c,fileSizeError:d,multiFilesSizeError:u,multiple:f=!0,acceptTypes:h,deleteAllButtonLabel:p,addButtonLabel:m,additionalActionButtons:b,...x})=>{const v=g.useRef(null),y=()=>v.current?.click(),I=()=>{e([])},j=g.useCallback(D=>D?.some(T=>!(h==="/"||h?.toLowerCase()?.includes(T?.type?.toLowerCase()))),[h]),N=g.useCallback(D=>{if(!i)return!1;const T=i*(1024*1024);return D?.some(E=>{const L=E.size;return!!L&&L>T})},[i]),w=g.useCallback(D=>{if(!o||!f)return!1;const T=o*1024*1024;return D.reduce((L,k)=>L+k.size,0)>T},[o,f]),A=g.useCallback(D=>{const T=D.target.files;if(T&&T.length>0){const E=Array.from(T),L=j(E),k=N(E);!L&&!k&&e([...n||[],...E])}},[j,N,e,n]);return r.jsxs("div",{className:"h-full flex flex-col",children:[r.jsxs("div",{className:"flex justify-between items-center pb-1 min-h-[42px]",children:[r.jsx(ze.DialLabel,{label:`${t}: ${f?n?.length||0:""}`,htmlFor:s}),f&&!!n?.length&&r.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[r.jsx(Qt,{label:p,iconBefore:r.jsx(_.IconTrashX,{...P.BASE_ICON_PROPS}),onClick:I}),(a?a>n?.length:!0)&&r.jsx(Jt,{appearance:O.ButtonAppearance.Ghost,iconBefore:r.jsx(_.IconPlus,{...P.BASE_ICON_PROPS}),label:m,onClick:y}),b]})]}),n&&n.length>0&&r.jsx("input",{id:"file",type:"file",multiple:f,ref:v,hidden:!0,accept:h,onChange:A}),r.jsx(Na,{files:n,onChange:e,acceptTypes:h,maxFilesCount:a,multiple:f,fileFormatError:l,fileCountError:c,fileSizeError:d,multiFilesSizeError:u,getIsFileFormatError:j,getIsFileSizeError:N,getIsMultiFilesSizeError:w,...x})]})},A1=r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.SM}),_1=r.jsx(_.IconChevronUp,{size:P.DIAL_ICON_SIZE.SM}),k1=({variant:e,appearance:t,items:s,...n})=>{const[a,i]=g.useState(!1),o=g.useMemo(()=>a?_1:A1,[a]);return r.jsx("div",{children:r.jsx(C.DialDropdown,{items:s,onOpenChange:l=>i(l),children:r.jsx(ot,{...n,iconAfter:o,variant:e||O.ButtonVariant.Primary,appearance:t||O.ButtonAppearance.Solid})})})},R1=({icon:e,ariaLabel:t,size:s=O.ElementSize.Standard,disabled:n=!1,className:a,buttonClassName:i,iconClassName:o,caretIcon:l=r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.SM}),showCaret:c=!0,placement:d="bottom-start",matchReferenceWidth:u=!1,open:f,onOpenChange:h,defaultOpen:p=!1,...m})=>{const b=s===O.ElementSize.Small,[x,v]=g.useState(p),y=f??x,I=b?"w-8 px-0":"w-10 px-0",j={[O.ElementSize.Small]:"size-5",[O.ElementSize.Standard]:"size-6",[O.ElementSize.Large]:"size-7"},N=w=>{v(w),h?.(w)};return r.jsx(C.DialDropdown,{...m,disabled:n,placement:d,matchReferenceWidth:u,className:a,open:y,onOpenChange:N,defaultOpen:p,children:r.jsxs("button",{type:"button","aria-label":t,disabled:n,className:S.mergeClasses("group flex items-center justify-center rounded border border-transparent bg-layer-4 text-primary","enabled:hover:bg-accent-primary-alpha enabled:active:bg-controls-accent-primary-alpha-active","focus-visible:border-focus focus-visible:outline-hidden disabled:cursor-not-allowed disabled:text-controls-secondary-disable disabled:opacity-75",b?"h-8 px-2":"h-10 px-2",c?void 0:I,i),children:[r.jsx(C.DialIcon,{icon:e,className:S.mergeClasses("flex items-center justify-center text-inherit",j[s],c&&"-mr-2",o,C.DIAL_KIT_CLASS.dropdownIcon)}),c&&r.jsxs("div",{className:S.mergeClasses("relative z-10 inline-grid size-5 shrink-0 place-items-center",C.DIAL_KIT_CLASS.dropdownIconCaret),children:[r.jsx("div",{className:"absolute inset-0 rounded-full bg-layer-2"}),r.jsx(C.DialIcon,{icon:l,className:S.mergeClasses("relative flex items-center justify-center text-secondary transition-transform group-hover:text-primary group-disabled:text-controls-secondary-disable",y&&"rotate-180")})]})]})})};var ja=(e=>(e.Normal="normal",e.Reverse="reverse",e))(ja||{}),Ve=(e=>(e.File="file",e.Folder="folder",e))(Ve||{});const Ns="data-editable-container",M1={[Ns]:""};function P1({value:e,isEditing:t,isCreating:s,isLoading:n=!1,restoreOnCancel:a=!0,onValidate:i,onSave:o,onCancel:l,onCreateFolderSave:c,onCreateFolderCancel:d}){const[u,f]=g.useState(e),[h,p]=g.useState(!1),[m,b]=g.useState(""),x=g.useRef(null),v=g.useRef(!1),y=g.useRef(!1),I=g.useCallback((T=!1,E="")=>{p(T),b(E)},[]),j=g.useCallback(T=>{if(!i)return I(),!0;const E=i(T);return E?E.startsWith(`${ce.Warning}__`)?(I(!1,E),!0):(I(!0,E),!1):(I(),!0)},[i,I]),N=g.useCallback(T=>{const E=T??"";f(E),j(E)},[j]),w=g.useCallback(T=>{s&&!v.current&&!n?c?.(T):!s&&t&&o?.(T),v.current=!1},[o,c,s,t,n]),A=g.useCallback(()=>{a&&f(e),s?d?.():l?.(),v.current=!0,I()},[e,l,a,I,d,s]),D=g.useCallback(()=>{if(!y.current){if(y.current=!0,j(u)){w(u);return}!s&&j(e)?(f(e),I(),w(e)):A()}},[j,u,e,w,A,I,s]);return g.useEffect(()=>{!t&&!s||(v.current=!1,y.current=!1,f(e),I(),requestAnimationFrame(()=>{x.current?.focus(),x.current?.select()}))},[t,s,e,I]),g.useEffect(()=>{const T=x.current;if(!t&&!s||!T)return;const E=L=>{L.key==="Enter"?(L.preventDefault(),x.current?.blur()):L.key==="Escape"&&(L.preventDefault(),A())};return T.addEventListener("keydown",E),()=>T.removeEventListener("keydown",E)},[t,s,A]),g.useEffect(()=>{if(!t&&!s||n)return;const T=x.current;if(!T)return;const E=z=>z?(T.closest(`[${Ns}]`)??T).contains(z):!1,L=z=>{E(z.target)||D()},k=z=>{E(z.relatedTarget)||D()};return document.addEventListener("pointerdown",L,!0),T.addEventListener("blur",k),()=>{document.removeEventListener("pointerdown",L,!0),T.removeEventListener("blur",k)}},[t,s,n,D]),{inputRef:x,value:u,onChange:N,invalid:h,invalidMessage:m}}var Xe=(e=>(e.ITEM="item",e.FOLDER="folder",e))(Xe||{}),js=(e=>(e.FILE="FILE",e.PROMPT="PROMPT",e.CONVERSATION="CONVERSATION",e.APPLICATION="APPLICATION",e.TOOLSET="TOOL_SET",e))(js||{}),Da=(e=>(e.READ="READ",e.WRITE="WRITE",e.SHARE="SHARE",e))(Da||{});const z1="application/octet-stream";function B1(e,t){if(!e||e.length===0)return[];const s=e.find(c=>c.parentPath===""&&c.nodeType==="FOLDER");if(!s)return[];const n=s.path||s.url||"",a=Xr(n,!0),i=e.filter(c=>c!==s).map(c=>{const d=c.path||c.url||"",u=F1(c.nodeType),f=u===Xe.FOLDER,h=Xr(d,f);let p;return c.parentPath===null||c.parentPath===void 0?p=a:c.parentPath===""?p="":p=Xr(c.parentPath,!0),{...c,originalPath:d,path:h,parentPath:p,nodeType:u}}),o=new Map;i.forEach(c=>{const d={...c,id:c.originalPath,name:c.name,path:c.path,parentPath:c.parentPath,nodeType:c.nodeType,resourceType:H1(c.resourceType),folderId:t,updatedAt:c.updatedAt?new Date(c.updatedAt).toISOString():new Date().toISOString(),items:c.nodeType===Xe.FOLDER?[]:void 0};c.nodeType===Xe.ITEM&&(d.extension=$1(c.name),d.contentType=c.contentType||z1,d.contentLength=c.contentLength||0),o.set(c.path,d)});const l=[];return o.forEach(c=>{if(c.parentPath===a)l.push(c);else{const d=c.path.lastIndexOf(c.name||""),u=c.path.slice(0,d),f=o.get(u);f&&f.nodeType===Xe.FOLDER?(f.items=f.items||[],f.items.push(c)):l.push(c)}}),l}function Xr(e,t){try{let s=decodeURIComponent(e);return t?s.endsWith("/")||(s+="/"):s.endsWith("/")&&(s=s.slice(0,-1)),s}catch{return t&&!e.endsWith("/")?e+"/":!t&&e.endsWith("/")?e.slice(0,-1):e}}function F1(e){return e.toUpperCase()==="FOLDER"?Xe.FOLDER:Xe.ITEM}function H1(e){if(!e)return;const t=e.toUpperCase();return Object.values(js).find(n=>n.toUpperCase()===t)}function $1(e){const t=e.split(".");return t.length>1?t[t.length-1]:""}function V1(e,t="Prompts",s="prompts/public/",n="root"){const a=B1(e,n);return[{id:n,name:t,path:s,parentPath:"",nodeType:Xe.FOLDER,folderId:n,items:a}]}const wa=({locale:e,timeZone:t,date:s=new Date}={})=>{const n=t??Intl.DateTimeFormat().resolvedOptions().timeZone;try{const a=new Intl.DateTimeFormat(e,{timeZone:n,timeZoneName:"longOffset"}).formatToParts(s).find(i=>i.type==="timeZoneName")?.value;return a?`(${a}) ${n}`:n}catch{return n}},La=':;,=/{}%&\\"',Ds=`(\r
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),S=require("./merge-classes-BEJXjzkx.cjs"),C=require("./DateCellRenderer-DDEzIi2B.cjs"),ze=require("./Switch-DAaAOaIu.cjs"),m=require("react"),_=require("@tabler/icons-react"),ne=require("classnames"),P=require("./icon-CrGVkVpG.cjs"),O=require("./IconButton-B1Hx0Y3y.cjs"),zn=require("react-dom"),J=require("@floating-ui/react"),Yt=require("./lazy-DMVYJhUR.cjs"),se=require("./icon-DhjrDQ8I.cjs");function Ci(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const te=Ci(m),Xt=({text:e,className:t,variant:s=C.CaptionType.Description,...n})=>e?r.jsx("span",{...n,role:"alert",className:S.mergeClasses("dial-tiny-text",s===C.CaptionType.Error?"text-error":"text-secondary",t),children:e}):null,Se=({...e})=>r.jsx(Xt,{...e,variant:C.CaptionType.Error}),ot=({label:e,variant:t,appearance:s=O.ButtonAppearance.Solid,size:n=O.ElementSize.Standard,className:a,textClassName:i,iconAfter:o,iconBefore:l,hideTitleOnMobile:c,type:d="button",tooltipProps:u,...f})=>{const h=ne(c?"hidden sm:inline":"inline",i),p=S.mergeClasses(t&&O.getButtonClassNames(t,s),n===O.ElementSize.Small?"dial-tiny-semi-text":"dial-small-semi-text",s!==O.ButtonAppearance.Link&&(n===O.ElementSize.Small?"h-[24px] px-2":"h-[40px] px-3"),n!==O.ElementSize.Small&&s!==O.ButtonAppearance.Link&&"dial-kit-enhanced-target","disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-focus outline-offset-0",a),g=r.jsxs("button",{...f,type:d,className:p,"aria-label":typeof e=="string"&&e||f["aria-label"],children:[r.jsx(C.DialIcon,{icon:l}),e&&r.jsx("span",{className:h,children:e}),r.jsx(C.DialIcon,{icon:o})]});return u?r.jsx(O.DialTooltip,{...u,children:g}):g},pt=({label:e,className:t,icon:s,selected:n,closable:a,onClick:i,onRemove:o})=>{const l=S.mergeClasses("flex items-center gap-1 cursor-pointer dial-tiny-text px-2 h-[24px] border text-primary rounded-[8px]",n?"hover:bg-controls-accent-primary-alpha-active bg-accent-primary-alpha border-accent-primary":"bg-neutral border-primary",t);return r.jsxs("div",{className:l,onClick:i,children:[r.jsx(C.DialIcon,{icon:s}),r.jsx(C.DialEllipsisTooltip,{text:e}),a&&o&&r.jsx(ot,{className:"p-0",iconAfter:r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM}),onClick:c=>o(c)})]},e)},fs=({label:e="Error",className:t})=>r.jsx(pt,{label:e,className:S.mergeClasses("dial-tiny-semi-text cursor-default rounded-[120px] border-transparent bg-error text-error",t)}),bi="flex items-center justify-center text-secondary",vi="shrink-0 grow-0 basis-auto animate-spin-steps",yi=e=>te.createElement("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M24 39V46.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.4,d:"M9 24H1.5",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.5,d:"M8.0918 8.0918L13.3994 13.3994",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.6,d:"M24 1.5V9",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.7,d:"M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.8,d:"M46.5 24H39",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.9,d:"M34.6055 34.6055L39.9082 39.9082",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),te.createElement("path",{opacity:.3,d:"M13.3936 34.6055L8.08594 39.9131",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"})),lt=({size:e=18,className:t,iconClassName:s,fullWidth:n=!0,ariaLabel:a="Loading"})=>r.jsx("div",{role:"status",className:ne({[bi]:!0,"size-full":n,[t||""]:!!t}),children:r.jsx(C.DialIcon,{icon:r.jsx(yi,{width:e,height:e,className:ne(vi,s),role:"img","aria-label":a})})});var Vt=(e=>(e.Default="default",e.Compact="compact",e))(Vt||{});const Si={[Vt.Default]:{container:"bg-layer-3",title:"dial-small-text text-secondary",value:"dial-display2-text text-primary",showDescription:!0},[Vt.Compact]:{container:"bg-layer-2",title:"dial-tiny-text text-secondary",value:"dial-body-semi-text text-primary",showDescription:!1}},Ii=({title:e,value:t,description:s,variant:n=Vt.Default,error:a,isLoading:i,className:o,delta:l,deltaPositive:c,deltaUnit:d,compareValues:u})=>{const f=Si[n],h=c!==void 0?c:(l??0)>=0,p=l===void 0?null:`${l>=0?`+${l}`:String(l)}${d??""}`;return r.jsxs("div",{className:S.mergeClasses("flex flex-col rounded-lg border border-secondary p-4",a||i?"gap-2":"gap-1",f.container,o),children:[l!==void 0?r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:f.title,children:e}),r.jsx("span",{className:S.mergeClasses("dial-tiny-semi-text rounded-[120px] border border-transparent px-2",h?"bg-success text-success":"bg-error text-error"),children:p})]}):r.jsx("span",{className:f.title,children:e}),a?r.jsx(fs,{className:"self-start"}):i?r.jsx(lt,{fullWidth:!1,className:"self-start"}):u?r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[r.jsx(C.DialEllipsisTooltip,{text:u[0].title,className:"dial-tiny-text text-secondary"}),r.jsx("span",{className:f.value,children:u[0].value})]}),r.jsx("div",{className:"h-4 w-px flex-shrink-0 bg-controls-disable-accent"}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[r.jsx(C.DialEllipsisTooltip,{text:u[1].title,className:"dial-tiny-text text-secondary"}),r.jsx("span",{className:f.value,children:u[1].value})]})]}):r.jsx("span",{className:f.value,children:t}),!a&&!i&&f.showDescription&&s!=null&&s!==!1&&r.jsx("span",{className:"dial-tiny-text text-secondary",children:s})]})},ps=[{from:0,to:.1,color:"#F26B5B"},{from:.1,to:.2,color:"#E5764A"},{from:.2,to:.3,color:"#E08C3F"},{from:.3,to:.4,color:"#D9A638"},{from:.4,to:.5,color:"#D4BE3A"},{from:.5,to:.6,color:"#B8C94A"},{from:.6,to:.7,color:"#7EC96B"},{from:.7,to:.8,color:"#4ECBA8"},{from:.8,to:.9,color:"#4EC5C5"},{from:.9,to:1,color:"#4DC87A"},{from:1,to:1,color:"#30E070"}],Ni=(e,t)=>t<=0?0:Math.min(Math.max(e/t,0),1),ji=(e,t)=>{if(e<=0)return;let s;for(const n of t)(n.from===n.to?e>=n.from:e>n.from&&e<=n.to)&&(s=n.color);return s},cr=({value:e,maxValue:t=1,error:s,isLoading:n,title:a,valueLabel:i,colorMap:o=ps,className:l,titleClassName:c,valueClassName:d,inline:u,ariaLabel:f})=>{const h=e==null,p=!!(s||n||!h),g=Ni(h?0:e,t),b=ji(g,o),x=i??(h?"—":e),v=f??(typeof a=="string"?a:void 0),y=s||n,I=s?r.jsx(fs,{}):n?r.jsx(lt,{fullWidth:!1}):r.jsx("span",{className:S.mergeClasses("shrink-0 tabular-nums text-end",u?"dial-small-text min-w-[5ch] text-primary":"dial-small-semi-text text-primary",d),children:x}),j=p?r.jsx("div",{role:"progressbar","aria-valuenow":s||n||typeof e!="number"?void 0:e,"aria-valuemin":0,"aria-valuemax":t,"aria-label":v,className:S.mergeClasses("w-full overflow-hidden rounded-xs",u?"h-1":"h-2",s?"bg-error":"bg-layer-1"),children:!y&&r.jsx("div",{className:"h-full rounded-xs transition-[width] duration-300",style:{width:`${g*100}%`,backgroundColor:b}})}):null,N=r.jsx("span",{className:S.mergeClasses("dial-small-text text-primary",c),children:a});return u?r.jsxs("div",{className:S.mergeClasses("flex flex-row items-center gap-2",l),children:[r.jsx("div",{className:"w-1/2 min-w-0",children:N}),r.jsxs("div",{className:"flex w-1/2 flex-row items-center gap-2",children:[r.jsx("div",{className:"min-w-0 flex-1",children:j}),I]})]}):r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-1",l),children:[r.jsxs("div",{className:"flex flex-row items-center justify-between gap-2",children:[N,I]}),j]})},Bn=({title:e,description:t,children:s,expanded:n,defaultExpanded:a=!1,disabled:i,nonCollapsible:o,onToggle:l,className:c,headerClassName:d,contentClassName:u})=>{const f=n!==void 0,[h,p]=m.useState(a),g=o?!0:f?n:h,b=m.useId(),x=()=>{if(i)return;const v=!g;f||p(v),l?.(v)};return r.jsxs("div",{className:S.mergeClasses("rounded border border-secondary",c),children:[r.jsxs("button",{type:"button","aria-expanded":g,"aria-controls":b,disabled:i||o,onClick:x,className:S.mergeClasses("flex w-full items-center gap-2 p-4 text-left",i?"cursor-not-allowed":"cursor-pointer",o&&"cursor-default",d),children:[!o&&r.jsx(C.DialIcon,{className:ne("text-secondary transition-transform",g&&"rotate-90"),icon:r.jsx(_.IconChevronRight,{size:P.DIAL_ICON_SIZE.SM})}),r.jsx("span",{className:"dial-body-text text-primary",children:e}),t!=null&&t!==!1&&r.jsx("span",{className:"dial-tiny-text text-secondary",children:t})]}),g&&r.jsx("div",{id:b,role:"region",className:S.mergeClasses("px-4 pb-4",u),children:s})]})},Di=({title:e,titleTooltip:t,description:s,data:n,compareData:a,compareLabels:i,maxValue:o,colorMap:l,defaultExpanded:c=!0,nonCollapsible:d,isLoading:u,onBarClick:f,inline:h,barTitleClassName:p,barValueClassName:g,barClassName:b,barDescriptions:x,className:v})=>{const y=Object.entries(n),I=h?S.mergeClasses("text-secondary",p):p,j=i?"dial-tiny-text text-secondary":void 0,N=t?r.jsx(O.DialTooltip,{tooltip:t,children:e}):e,w=a?[...new Set([...Object.keys(n),...Object.keys(a)])]:[],A="cursor-pointer rounded-xs text-left focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-primary",D="group flex flex-col gap-1.5",L=S.mergeClasses("flex flex-col gap-1.5 pl-2",f&&"group-hover:bg-accent-primary-alpha group-focus-visible:bg-accent-primary-alpha",b);return r.jsx(Bn,{title:N,description:s,defaultExpanded:c,nonCollapsible:d,className:v,children:r.jsx("div",{className:S.mergeClasses("flex flex-col",a?"gap-4":h?"gap-2":"gap-3"),children:u?r.jsx(lt,{fullWidth:!1,className:"self-center"}):a?w.map(E=>{const T=E in n?n[E]:null,k=E in a?a[E]:null,R=typeof T=="number"&&typeof k=="number"?parseFloat((k-T).toFixed(3)):null,Z=R!=null&&R!==0,H=Z&&R>0,B=Z?H?`+${R}`:String(R):null,K=x?.[E],V=r.jsx("span",{className:"dial-small-text text-secondary",children:E}),W=r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-2",children:[K?r.jsx(O.DialTooltip,{tooltip:K,children:V}):V,B!=null&&r.jsx("span",{className:S.mergeClasses("dial-tiny-semi-text rounded-[120px] border border-transparent px-2",H?"bg-success text-success":"bg-error text-error"),children:B})]}),r.jsxs("div",{className:L,children:[r.jsx(cr,{title:i?.[0],value:T,maxValue:o,colorMap:l,inline:h,titleClassName:j,ariaLabel:E}),r.jsx(cr,{title:i?.[1],value:k,maxValue:o,colorMap:l,inline:h,titleClassName:j,ariaLabel:`${E} compare`})]})]});return f?r.jsx("button",{type:"button",onClick:()=>f(E,T),className:S.mergeClasses(D,A),children:W},E):r.jsx("div",{className:D,children:W},E)}):y.map(([E,T])=>{const k=r.jsx(cr,{title:E,value:T,maxValue:o,colorMap:l,inline:h,titleClassName:I,valueClassName:g,className:b}),z=f?r.jsx("button",{type:"button",onClick:()=>f(E,T),className:A,children:k}):k,R=x?.[E];return R?r.jsx(O.DialTooltip,{tooltip:R,triggerClassName:"flex flex-col",children:z},E):r.jsx(m.Fragment,{children:z},E)})})})},wi="#FF4E50",Li=(e,t)=>{let s=-1;return t.forEach((n,a)=>{(n.from===n.to?e>=n.from:e>n.from&&e<=n.to)&&(s=a)}),s},Bs=(e,t)=>{const s=t.map(()=>0);let n=0;e.forEach(c=>{if(c<=0){n+=1;return}const d=Li(c,t);d>=0&&(s[d]+=1)});const a=Math.max(0,n,...s),i=c=>a>0?c/a:0,o={from:0,to:0,color:wi,count:n,ratio:i(n),isZeroBucket:!0},l=t.map((c,d)=>({from:c.from,to:c.to,color:c.color,count:s[d],ratio:i(s[d]),isZeroBucket:!1}));return[o,...l]},Fn=e=>e<=0?2:e%2===0?e:e+1,Ti=e=>{const t=Fn(e);return[t,t/2,0]},Pr=e=>`${Math.round(e*100)/100}`,Hn=(e,t)=>e===t?Pr(e):`${Pr(e)}-${Pr(t)}`,zr=128,Ei=(e,t)=>{const s=Hn(e,t);return e===t?`scored ${s}`:`scored between ${s}`},Fs=(e,t,s,n,a)=>r.jsxs("div",{className:"flex flex-col gap-0.5",children:[e&&r.jsx("strong",{children:e}),r.jsxs("span",{children:[t," out of ",s," ",n]}),r.jsx("span",{children:Ei(a.from,a.to)})]}),Oi=({title:e,values:t,colorMap:s=ps,valueTitle:n="values",showCount:a,isLoading:i,className:o,compareValues:l,valueSetLabel:c,compareValueSetLabel:d})=>{const u=Bs(t,s),f=l?Bs(l,s):void 0,h=t.length,p=l?.length??0,g=Math.max(h,p),b=Fn(g),x=Ti(g),v=N=>N.map(w=>({...w,ratio:b>0?w.count/b:0})),y=v(u),I=f?v(f):void 0,j=(N,w,A,D)=>{if(N.count===0)return r.jsx("div",{className:"flex h-full flex-1 items-end","aria-hidden":"true",children:r.jsx("div",{className:"min-h-2 w-full rounded-xs",style:{height:`${N.ratio*100}%`}})});const L=D?{backgroundImage:`repeating-linear-gradient(135deg, ${N.color} 0px, ${N.color} 1px, transparent 1px, transparent 4px)`,borderColor:N.color}:{backgroundColor:N.color};return r.jsx(O.DialTooltip,{placement:"bottom",tooltip:w,triggerClassName:"flex h-full flex-1 items-end",children:r.jsx("div",{role:"img","aria-label":A,className:"flex min-h-2 w-full items-center justify-center rounded-xs border border-transparent",style:{height:`${N.ratio*100}%`,...L},children:a&&r.jsx("span",{className:"dial-tiny-semi-text text-primary",children:N.count})})})};return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-2",o),children:[r.jsx("span",{className:"dial-small-text text-primary",children:e}),i?r.jsx("div",{className:"flex items-center justify-center",style:{height:zr},children:r.jsx(lt,{fullWidth:!1})}):r.jsxs("div",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-1",children:[r.jsx("div",{"data-histogram-y-axis":!0,"aria-hidden":"true",className:"relative",style:{height:zr},children:x.map((N,w)=>r.jsx("span",{className:"dial-tiny-text absolute right-0 whitespace-nowrap text-secondary",style:{top:`${w/(x.length-1)*100}%`,transform:"translateY(-50%)"},children:N},N))}),r.jsxs("div",{className:"relative min-w-0",children:[x.map((N,w)=>r.jsx("div",{"data-histogram-grid":!0,className:"pointer-events-none absolute inset-x-0 border-t border-primary",style:{top:`${w/(x.length-1)*100}%`}},N)),r.jsx("div",{className:"relative flex items-end gap-1",style:{height:zr},children:I?y.map((N,w)=>{const A=I[w],D=`${N.count} out of ${h} ${n}`,L=`${A.count} out of ${p} ${n}`;return r.jsxs("div",{className:"flex h-full flex-1 items-end",children:[j(N,Fs(c,N.count,h,n,N),D,!0),j(A,Fs(d,A.count,p,n,A),L,!1)]},w)}):y.map((N,w)=>{const A=`${N.count} out of ${h} ${n}`;return N.count===0?r.jsx("div",{className:"flex h-full flex-1 items-end","aria-hidden":"true",children:r.jsx("div",{className:"min-h-2 w-full rounded-xs",style:{height:`${N.ratio*100}%`}})},w):r.jsx(O.DialTooltip,{placement:"bottom",tooltip:A,triggerClassName:"flex h-full flex-1 items-end",children:r.jsx("div",{role:"img","aria-label":A,className:S.mergeClasses("flex min-h-2 w-full items-center justify-center rounded-xs border","border-transparent"),style:{height:`${N.ratio*100}%`,backgroundColor:N.color},children:a&&N.count>0&&r.jsx("span",{className:"dial-tiny-semi-text text-primary",children:N.count})})},w)})})]}),r.jsx("div",{}),r.jsx("div",{"data-histogram-x-axis":!0,className:"flex gap-1",children:y.map((N,w)=>r.jsx("span",{className:"dial-caption-text flex-1 text-center text-secondary",children:Hn(N.from,N.to)},w))})]})]})};var ce=(e=>(e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e.Loading="loading",e.General="general",e))(ce||{}),be=(e=>(e.Toast="toast",e.SectionMessage="section-message",e))(be||{});const Tt=({size:e=40,className:t,fullWidth:s=!1,ariaLabel:n="Loading"})=>r.jsx("div",{role:"status",className:S.mergeClasses("flex items-center justify-center",{"size-full":s},t,C.DIAL_KIT_CLASS.spinner),children:r.jsx("div",{role:"img","aria-label":n,style:{width:e,height:e},className:"rounded-full border-2 border-secondary border-t-accent animate-spin-steps shrink-0"})}),Ai=e=>({info:r.jsx(_.IconInfoCircleFilled,{size:e.size}),error:r.jsx(_.IconAlertCircleFilled,{size:e.size}),warning:r.jsx(_.IconAlertTriangleFilled,{size:e.size}),success:r.jsx(_.IconCircleCheckFilled,{size:e.size}),loading:r.jsx(Tt,{size:e.size}),general:r.jsx(_.IconCheck,{size:e.size,stroke:e.stroke})}),_i={[ce.Info]:"bg-info border-info text-info",[ce.Success]:"bg-success border-success text-success",[ce.Warning]:"bg-warning border-warning text-warning",[ce.Error]:"bg-error border-error text-error",[ce.Loading]:"bg-info border-info text-info",[ce.General]:"bg-sunken border-secondary text-primary"},ki="items-center justify-between relative gap-3 p-3 border border-solid dial-small-text-150 rounded shadow flex",Ri=({variant:e=ce.Info,title:t,message:s,className:n,iconSize:a=24,iconStroke:i=2,closable:o=!1,onClose:l,children:c,textClassName:d="flex-col",...u})=>{const f=m.useMemo(()=>Ai({size:a,stroke:i})[e],[e,a,i]);return r.jsxs("div",{...u,role:"alert",className:S.mergeClasses(ki,_i[e],n),children:[r.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[r.jsx(C.DialIcon,{icon:f}),t?r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-1 text-primary",d),children:[r.jsx("div",{className:"dial-small-semi-text",children:t}),r.jsx("div",{className:"dial-small-text",children:s})]}):r.jsx("div",{className:"dial-small-text text-primary",children:s})]}),c,o&&r.jsx("div",{className:"relative size-[40px]",children:r.jsx(C.DialGhostIconButton,{className:"absolute top-0 right-0 size-auto","aria-label":"Close notification",icon:r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM}),onClick:l})})]})},$n=({value:e,max:t=100,size:s=O.ElementSize.Standard,labelProps:n,valueLabel:a,id:i,className:o,"aria-label":l,...c})=>{const d=m.useId(),u=i??d,f=!!n?.label,h=f?n?.id??`${u}-label`:void 0,p=t>0?t:0,g=Number.isFinite(e)?e:0,b=Math.min(Math.max(g,0),p),x=p>0?b/p*100:0,v=r.jsx("div",{...c,id:u,role:"progressbar","aria-valuenow":b,"aria-valuemin":0,"aria-valuemax":p,"aria-labelledby":h,"aria-label":O.resolveAccessibleName(l,f?void 0:"Progress"),className:S.mergeClasses("w-full overflow-hidden rounded-full bg-control-disable-primary",s===O.ElementSize.Small?"h-1":"h-2",o,!f&&!a&&C.DIAL_KIT_CLASS.progressBar),children:r.jsx("div",{style:{width:`${x}%`},className:"h-full rounded-full bg-control-accent transition-[width] duration-300 motion-reduce:transition-none"})});return!f&&!a?v:r.jsxs("div",{className:S.mergeClasses("flex w-full flex-col gap-1",C.DIAL_KIT_CLASS.progressBar),children:[r.jsxs("div",{className:"flex items-baseline gap-2",children:[n&&r.jsx(C.Label,{...n,id:h}),a&&r.jsx("span",{className:"dial-tiny-text text-secondary ml-auto shrink-0",children:a})]}),v]})},Mi=7,Pi=2,zi=e=>e<=0?[]:Array.from({length:e},(t,s)=>s+1);var dr=(e=>(e.Active="active",e.Adjacent="adjacent",e.Far="far",e))(dr||{});const Bi=(e,t,s)=>e===t?"active":s<Mi||Math.abs(e-t)<=Pi?"adjacent":"far",Fi=({page:e,totalPages:t,onPageChange:s,className:n})=>{const a=zi(t);return r.jsxs("nav",{"aria-label":"Pagination",className:S.mergeClasses("flex items-center gap-2",n),children:[r.jsx(O.DialIconButton,{icon:r.jsx(_.IconCaretLeftFilled,{size:P.DIAL_ICON_SIZE.SM,className:"text-secondary"}),size:O.ElementSize.Small,className:"!p-0 items-center flex justify-center",disabled:e<=1,onClick:()=>s(e-1),"aria-label":"Previous page"}),r.jsx("div",{className:"flex flex-row items-center gap-2",children:a.map(i=>{const o=Bi(i,e,t);return r.jsx("button",{type:"button",onClick:()=>s(i),"aria-label":`Page ${i}`,"aria-current":i===e?"page":void 0,className:S.mergeClasses("dial-pagination-dot rounded-full focus-visible:outline outline-offset-0 transition-all duration-300 ease-in-out",o===dr.Active&&"h-[8px] w-[32px]",o===dr.Adjacent&&"size-[8px]",o===dr.Far&&"size-[4px]")},i)})}),r.jsx(O.DialIconButton,{icon:r.jsx(_.IconCaretRightFilled,{size:P.DIAL_ICON_SIZE.SM,className:"text-secondary"}),size:O.ElementSize.Small,className:"!p-0 items-center flex justify-center",disabled:e>=t,onClick:()=>s(e+1),"aria-label":"Next page"})]})},ts=({label:e,id:t,checked:s,indeterminate:n,disabled:a,ariaLabel:i,onChange:o,className:l,...c})=>{const d=m.useCallback(p=>{o?.(p.target.checked,t)},[o,t]),u=ne("flex flex-row items-center cursor-pointer text-accent-primary small-medium min-w-0",`${s||n?"":'before:content-[""] before:inline-block before:size-[18px] before:border before:border-hover before:rounded'}`,a?"pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4":"",l),f=ne("border rounded",a?"bg-layer-4 border-icon-secondary":""),h=()=>n?r.jsx(_.IconMinus,{className:f,...P.BASE_ICON_PROPS}):s?r.jsx(_.IconCheck,{className:f,...P.BASE_ICON_PROPS}):null;return r.jsxs("label",{...c,className:u,htmlFor:t,"aria-description":c["aria-description"]||C.ariaDescription,children:[h(),e&&(typeof e=="string"?r.jsx(C.DialEllipsisTooltip,{text:e,className:"ml-2 text-primary"}):e),r.jsx("input",{type:"checkbox",role:"checkbox",name:t,onChange:d,id:t,checked:s,"aria-checked":n?"mixed":s,"aria-disabled":a||void 0,"aria-label":e?void 0:i,className:"invisible size-0"})]})};var Oe=(e=>(e.VALID="valid",e.ERROR="error",e))(Oe||{});const Hi=(e,t)=>{if(t===e.id)switch(e.status){case Oe.VALID:return"border-accent-secondary text-primary";case Oe.ERROR:return"border-red-900 text-primary";default:return"border-accent-primary text-primary"}switch(e.status){case Oe.VALID:return"border-primary text-primary";case Oe.ERROR:return"border-red-900 text-error";default:return"border-primary text-secondary"}},$i=(e,t)=>{if(t===e.id)switch(e.status){case Oe.VALID:return"bg-accent-secondary";case Oe.ERROR:return"bg-red-400";default:return"bg-accent-primary"}switch(e.status){case Oe.VALID:return"bg-accent-secondary";case Oe.ERROR:return"bg-red-400";default:return"bg-layer-4"}},Vi=({step:e,index:t,currentStep:s,onChangeStep:n})=>{const a="h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny-text cursor-pointer dial-step",i="w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full",o=()=>s===e.id&&e.status===Oe.ERROR?r.jsx(_.IconExclamationCircle,{stroke:2,size:P.DIAL_ICON_SIZE.SM}):s!==e.id&&e.status===Oe.VALID?r.jsx(_.IconCheck,{stroke:2,size:P.DIAL_ICON_SIZE.SM}):t+1;return r.jsxs("button",{className:ne(a,Hi(e,s)),onClick:()=>n(e.id),children:[r.jsx("span",{className:ne(i,$i(e,s)),children:o()}),r.jsx("span",{children:e.name})]})},Ki=({steps:e,currentStep:t,onChangeStep:s})=>{const n=a=>{const i=e.findIndex(c=>c.id===t),o=e.findIndex(c=>c.id===a);if(a===t)return;(e.slice(0,o).every(c=>c.status===Oe.VALID)||o<i)&&s(a)};return r.jsx("div",{id:"steps",className:"flex gap-x-3",children:e.map((a,i)=>r.jsx(Vi,{currentStep:t,onChangeStep:n,step:a,index:i},a.id))})};var Kt=(e=>(e.Vertical="vertical",e.Horizontal="horizontal",e))(Kt||{});const Wi="w-full flex gap-1",Zi={[Kt.Vertical]:"flex-col",[Kt.Horizontal]:"flex-row items-end"},Sr=({id:e,label:t,required:s,description:n,error:a,orientation:i=Kt.Vertical,labelVisuallyHidden:o=!1,className:l,labelClassName:c,errorClassName:d,childrenClassName:u,captionDescription:f,readonly:h,value:p,defaultEmptyText:g,children:b})=>{const x=`${e}-label`,v=n?`${e}-desc`:void 0,y=a?`${e}-err`:void 0,I=`${e}-caption-desc`,j=[v,y].filter(Boolean).join(" ")||void 0,N=m.useCallback(()=>typeof a=="boolean"?null:typeof a=="string"||typeof a>"u"?a?r.jsx("div",{id:y,"aria-live":"polite",className:d,children:r.jsx(Se,{text:a})}):null:r.jsx("div",{id:y,role:"alert","aria-live":"polite",className:d,children:a}),[a,d,y]),w=m.useCallback(()=>p?typeof p=="string"||typeof p=="number"?r.jsx("span",{"aria-readonly":"true",children:p}):p:r.jsx("span",{className:"flex min-h-4","aria-readonly":"true",children:g??"None"}),[p,g]);return r.jsxs("div",{role:"group","aria-labelledby":t?x:void 0,"aria-describedby":j,className:S.mergeClasses(Wi,Zi[i],"gap-3",l),children:[t&&r.jsx("div",{id:x,className:S.mergeClasses(i==="horizontal"&&"shrink-0"),children:r.jsx(ze.DialLabel,{htmlFor:e,label:t,required:s,className:S.mergeClasses(o&&"sr-only",c),caption:n})}),r.jsxs("div",{className:S.mergeClasses("min-w-0 w-full",u),children:[h?r.jsx("div",{className:"dial-input px-3 py-2",children:w()}):b,f&&r.jsx("div",{id:I,className:S.mergeClasses({"dial-tiny-text text-secondary mt-1":!0,"text-error":!!a}),children:f}),N()]})]})};var Ae=(e=>(e.Row="Row",e.Column="Column",e))(Ae||{});const Gi="flex",Ui="pb-1 mt-2",qi={[Ae.Column]:"flex-col gap-y-2",[Ae.Row]:"flex-row gap-x-4"},Vn=({fieldTitle:e,radioClassName:t,containerClassName:s,selectedItemClassName:n,selectedLabelClassName:a,radioGroupClassName:i,inputContainerClassName:o,selectedInputContainerClassName:l,groupLabelClassName:c,formItemChildrenClassName:d,labelClassName:u,disabled:f,elementId:h,radioButtons:p,activeRadioButton:g,orientation:b,labelDescription:x,onChange:v})=>r.jsx(Sr,{id:h,label:e,labelClassName:c||u,description:x,className:s,childrenClassName:d,children:r.jsx("div",{role:"radiogroup","aria-label":e,"aria-disabled":f||void 0,className:S.mergeClasses(Gi,qi[b],i),children:p.map(y=>r.jsxs("div",{className:S.mergeClasses("flex flex-col",o,y.id===g&&l),children:[r.jsx(C.DialRadioButton,{name:h,value:y.id,inputId:`${h}-${y.id}`,disabled:f,className:t,labelClassName:S.mergeClasses(u,y.id===g&&a),label:y.name,caption:y.caption,checked:y.id===g,onChange:()=>v(y.id)}),y.id===g&&y.content?r.jsx("div",{className:S.mergeClasses(Ui,n),children:y.content}):null]},y.id))})}),Br=e=>(e.toString().split(".")[1]??"").length,Yi=({value:e,min:t=0,max:s=1,step:n=.1,disabled:a=!1,labelProps:i,labels:o,formatValue:l,onChange:c,className:d,trackClassName:u,fillClassName:f,thumbClassName:h,labelsClassName:p,"aria-label":g,"aria-labelledby":b,...x})=>{const v=m.useRef(null),y=Math.max(0,Math.min(100,(e-t)/(s-t)*100)),I=Br(n),j=l?l(e):e.toFixed(I),N=m.useCallback(L=>{const E=v.current;if(!E)return e;const T=E.getBoundingClientRect(),k=(L-T.left)/T.width,z=t+k*(s-t),R=Br(n),Z=parseFloat((Math.round((z-t)/n)*n+t).toFixed(R));return Math.min(s,Math.max(t,Z))},[t,s,n,e]),w=m.useCallback(L=>{a||(L.currentTarget.setPointerCapture(L.pointerId),c?.(N(L.clientX)))},[a,N,c]),A=m.useCallback(L=>{a||L.buttons===0||c?.(N(L.clientX))},[a,N,c]),D=m.useCallback(L=>{if(a)return;const E=Br(n),T=R=>parseFloat((Math.round((R-t)/n)*n+t).toFixed(E)),k=R=>Math.min(s,Math.max(t,R));let z=e;switch(L.key){case"ArrowRight":case"ArrowUp":z=k(T(e+n));break;case"ArrowLeft":case"ArrowDown":z=k(T(e-n));break;case"Home":z=t;break;case"End":z=s;break;default:return}L.preventDefault(),z!==e&&c?.(z)},[a,e,n,t,s,c]);return r.jsxs("div",{className:S.mergeClasses("flex flex-col",a&&"pointer-events-none opacity-50",d),...x,children:[i&&r.jsx(ze.DialLabel,{...i,htmlFor:x.id}),r.jsxs("div",{ref:v,className:"relative flex h-[38px] cursor-pointer items-center",onPointerDown:w,onPointerMove:A,children:[r.jsx("div",{className:S.mergeClasses("pointer-events-none absolute inset-x-0 h-3 rounded-[10px] bg-layer-1",u)}),r.jsx("div",{className:S.mergeClasses("pointer-events-none absolute left-0 h-3 rounded-[10px] bg-controls-accent-primary",f),style:{width:`${y}%`}}),r.jsx("div",{role:"slider",tabIndex:a?-1:0,"aria-valuenow":e,"aria-valuemin":t,"aria-valuemax":s,"aria-disabled":a||void 0,"aria-label":g,"aria-labelledby":b,className:S.mergeClasses("dial-small-text absolute -translate-x-1/2 flex size-[38px] cursor-grab select-none items-center justify-center rounded-full bg-layer-3 text-primary shadow focus:outline-hidden focus-visible:ring-2 focus-visible:ring-focus",h),style:{left:`${y}%`},onKeyDown:D,children:j})]}),o&&r.jsx("div",{className:S.mergeClasses("dial-tiny-text flex text-secondary",p),children:o.length===3?r.jsxs(r.Fragment,{children:[r.jsx("span",{children:o[0]}),r.jsx("span",{className:"flex-1 text-center",children:o[1]}),r.jsx("span",{children:o[2]})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{children:o[0]}),r.jsx("span",{className:"ml-auto",children:o[1]})]})})]})},Fr=48,Xi=({containerClassName:e,children:t,width:s=280,title:n,iconSize:a=24,iconStroke:i=1.5,titleClassName:o,additionalButtons:l,isOpened:c,onToggle:d})=>{const[u,f]=m.useState(s),[h,p]=m.useState(!0),g=m.useMemo(()=>typeof c=="boolean",[c]),b=g?c:h;m.useEffect(()=>{g&&f(c?s:Fr)},[g,c,s]);const x=S.mergeClasses(["transform rotate-180 [writing-mode:tb-rl] py-4 px-3",b&&"hidden",o]),v=S.mergeClasses(["flex flex-row gap-2 cursor-pointer text-secondary py-2 items-center",b?"justify-end px-4":"justify-center"]),y=I=>{const j=!b;if(g){f(j?s:Fr),d?.(j,I);return}f(j?s:Fr),p(j)};return r.jsxs("div",{className:S.mergeClasses(["rounded flex flex-col justify-between",e]),style:{width:`${u}px`},"aria-label":"collapsible-sidebar",children:[r.jsx("div",{className:S.mergeClasses(["flex-1 p-4 min-h-0 overflow-auto",!b&&"hidden"]),children:t}),r.jsx("div",{className:x,children:n}),r.jsxs("div",{className:S.mergeClasses("border-t border-tertiary h-12",v),children:[b&&l,r.jsx(O.DialIconButton,{className:"hover:text-accent-primary",onClick:y,"aria-label":"sidebar-state",size:O.ElementSize.Small,icon:b?r.jsx(_.IconChevronsLeft,{size:a,stroke:i}):r.jsx(_.IconChevronsRight,{size:a,stroke:i})})]})]})},Ji=({label:e,text:t,tooltip:s,children:n,postfix:a,className:i})=>r.jsxs("div",{className:S.mergeClasses("flex flex-col",n?"":"max-w-[200px]",i),children:[e&&r.jsx("label",{className:"dial-tiny-text mb-2 text-secondary",children:e}),n||r.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[r.jsx(O.DialTooltip,{triggerClassName:"text-primary flex-1 min-w-0",tooltip:s||t,children:t}),a||null]})]}),Kn=m.createContext({dragDropManager:void 0});function ke(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Hs=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),$s=function(){return Math.random().toString(36).substring(7).split("").join(".")},Vs={INIT:"@@redux/INIT"+$s(),REPLACE:"@@redux/REPLACE"+$s()};function Qi(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function eo(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(so(e))return"date";if(ro(e))return"error";var s=to(e);switch(s){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return s}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function to(e){return typeof e.constructor=="function"?e.constructor.name:null}function ro(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function so(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Nt(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=eo(e)),t}function Wn(e,t,s){var n;if(typeof t=="function"&&typeof s=="function"||typeof s=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?ke(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof s>"u"&&(s=t,t=void 0),typeof s<"u"){if(typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?ke(1):"Expected the enhancer to be a function. Instead, received: '"+Nt(s)+"'");return s(Wn)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?ke(2):"Expected the root reducer to be a function. Instead, received: '"+Nt(e)+"'");var a=e,i=t,o=[],l=o,c=!1;function d(){l===o&&(l=o.slice())}function u(){if(c)throw new Error(process.env.NODE_ENV==="production"?ke(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function f(b){if(typeof b!="function")throw new Error(process.env.NODE_ENV==="production"?ke(4):"Expected the listener to be a function. Instead, received: '"+Nt(b)+"'");if(c)throw new Error(process.env.NODE_ENV==="production"?ke(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var x=!0;return d(),l.push(b),function(){if(x){if(c)throw new Error(process.env.NODE_ENV==="production"?ke(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");x=!1,d();var y=l.indexOf(b);l.splice(y,1),o=null}}}function h(b){if(!Qi(b))throw new Error(process.env.NODE_ENV==="production"?ke(7):"Actions must be plain objects. Instead, the actual type was: '"+Nt(b)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof b.type>"u")throw new Error(process.env.NODE_ENV==="production"?ke(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(c)throw new Error(process.env.NODE_ENV==="production"?ke(9):"Reducers may not dispatch actions.");try{c=!0,i=a(i,b)}finally{c=!1}for(var x=o=l,v=0;v<x.length;v++){var y=x[v];y()}return b}function p(b){if(typeof b!="function")throw new Error(process.env.NODE_ENV==="production"?ke(10):"Expected the nextReducer to be a function. Instead, received: '"+Nt(b));a=b,h({type:Vs.REPLACE})}function g(){var b,x=f;return b={subscribe:function(y){if(typeof y!="object"||y===null)throw new Error(process.env.NODE_ENV==="production"?ke(11):"Expected the observer to be an object. Instead, received: '"+Nt(y)+"'");function I(){y.next&&y.next(u())}I();var j=x(I);return{unsubscribe:j}}},b[Hs]=function(){return this},b}return h({type:Vs.INIT}),n={dispatch:h,subscribe:f,getState:u,replaceReducer:p},n[Hs]=g,n}function re(e,t,...s){if(no()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let a=0;n=new Error(t.replace(/%s/g,function(){return s[a++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function no(){return typeof process<"u"&&process.env.NODE_ENV==="production"}function ao(e,t,s){return t.split(".").reduce((n,a)=>n&&n[a]?n[a]:s||null,e)}function io(e,t){return e.filter(s=>s!==t)}function Zn(e){return typeof e=="object"}function oo(e,t){const s=new Map,n=i=>{s.set(i,s.has(i)?s.get(i)+1:1)};e.forEach(n),t.forEach(n);const a=[];return s.forEach((i,o)=>{i===1&&a.push(o)}),a}function lo(e,t){return e.filter(s=>t.indexOf(s)>-1)}const hs="dnd-core/INIT_COORDS",Ir="dnd-core/BEGIN_DRAG",ms="dnd-core/PUBLISH_DRAG_SOURCE",Nr="dnd-core/HOVER",jr="dnd-core/DROP",Dr="dnd-core/END_DRAG";function Ks(e,t){return{type:hs,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const co={type:hs,payload:{clientOffset:null,sourceClientOffset:null}};function uo(e){return function(s=[],n={publishSource:!0}){const{publishSource:a=!0,clientOffset:i,getSourceClientOffset:o}=n,l=e.getMonitor(),c=e.getRegistry();e.dispatch(Ks(i)),fo(s,l,c);const d=mo(s,l);if(d==null){e.dispatch(co);return}let u=null;if(i){if(!o)throw new Error("getSourceClientOffset must be defined");po(o),u=o(d)}e.dispatch(Ks(i,u));const h=c.getSource(d).beginDrag(l,d);if(h==null)return;ho(h),c.pinSource(d);const p=c.getSourceType(d);return{type:Ir,payload:{itemType:p,item:h,sourceId:d,clientOffset:i||null,sourceClientOffset:u||null,isSourcePublic:!!a}}}}function fo(e,t,s){re(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){re(s.getSource(n),"Expected sourceIds to be registered.")})}function po(e){re(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function ho(e){re(Zn(e),"Item must be an object.")}function mo(e,t){let s=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){s=e[n];break}return s}function go(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function xo(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable}))),n.forEach(function(a){go(e,a,s[a])})}return e}function Co(e){return function(s={}){const n=e.getMonitor(),a=e.getRegistry();bo(n),So(n).forEach((o,l)=>{const c=vo(o,l,a,n),d={type:jr,payload:{dropResult:xo({},s,c)}};e.dispatch(d)})}}function bo(e){re(e.isDragging(),"Cannot call drop while not dragging."),re(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function vo(e,t,s,n){const a=s.getTarget(e);let i=a?a.drop(n,e):void 0;return yo(i),typeof i>"u"&&(i=t===0?{}:n.getDropResult()),i}function yo(e){re(typeof e>"u"||Zn(e),"Drop result must either be an object or undefined.")}function So(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Io(e){return function(){const s=e.getMonitor(),n=e.getRegistry();No(s);const a=s.getSourceId();return a!=null&&(n.getSource(a,!0).endDrag(s,a),n.unpinSource()),{type:Dr}}}function No(e){re(e.isDragging(),"Cannot call endDrag while not dragging.")}function rs(e,t){return t===null?e===null:Array.isArray(e)?e.some(s=>s===t):e===t}function jo(e){return function(s,{clientOffset:n}={}){Do(s);const a=s.slice(0),i=e.getMonitor(),o=e.getRegistry(),l=i.getItemType();return Lo(a,o,l),wo(a,i,o),To(a,i,o),{type:Nr,payload:{targetIds:a,clientOffset:n||null}}}}function Do(e){re(Array.isArray(e),"Expected targetIds to be an array.")}function wo(e,t,s){re(t.isDragging(),"Cannot call hover while not dragging."),re(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){const a=e[n];re(e.lastIndexOf(a)===n,"Expected targetIds to be unique in the passed array.");const i=s.getTarget(a);re(i,"Expected targetIds to be registered.")}}function Lo(e,t,s){for(let n=e.length-1;n>=0;n--){const a=e[n],i=t.getTargetType(a);rs(i,s)||e.splice(n,1)}}function To(e,t,s){e.forEach(function(n){s.getTarget(n).hover(t,n)})}function Eo(e){return function(){if(e.getMonitor().isDragging())return{type:ms}}}function Oo(e){return{beginDrag:uo(e),publishDragSource:Eo(e),hover:jo(e),drop:Co(e),endDrag:Io(e)}}class Ao{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:s}=this.store;function n(i){return(...o)=>{const l=i.apply(t,o);typeof l<"u"&&s(l)}}const a=Oo(this);return Object.keys(a).reduce((i,o)=>{const l=a[o];return i[o]=n(l),i},{})}dispatch(t){this.store.dispatch(t)}constructor(t,s){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=s,t.subscribe(this.handleRefCountChange)}}function _o(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Gn(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ko(e){const{clientOffset:t,initialClientOffset:s,initialSourceClientOffset:n}=e;return!t||!s||!n?null:Gn(_o(t,n),s)}function Ro(e){const{clientOffset:t,initialClientOffset:s}=e;return!t||!s?null:Gn(t,s)}const Bt=[],gs=[];Bt.__IS_NONE__=!0;gs.__IS_ALL__=!0;function Mo(e,t){return e===Bt?!1:e===gs||typeof t>"u"?!0:lo(t,e).length>0}class Po{subscribeToStateChange(t,s={}){const{handlerIds:n}=s;re(typeof t=="function","listener must be a function."),re(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let a=this.store.getState().stateId;const i=()=>{const o=this.store.getState(),l=o.stateId;try{l===a||l===a+1&&!Mo(o.dirtyHandlerIds,n)||t()}finally{a=l}};return this.store.subscribe(i)}subscribeToOffsetChange(t){re(typeof t=="function","listener must be a function.");let s=this.store.getState().dragOffset;const n=()=>{const a=this.store.getState().dragOffset;a!==s&&(s=a,t())};return this.store.subscribe(n)}canDragSource(t){if(!t)return!1;const s=this.registry.getSource(t);return re(s,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:s.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const s=this.registry.getTarget(t);if(re(s,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(t),a=this.getItemType();return rs(n,a)&&s.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const s=this.registry.getSource(t,!0);if(re(s,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(t),a=this.getItemType();return n!==a?!1:s.isDragging(this,t)}isOverTarget(t,s={shallow:!1}){if(!t)return!1;const{shallow:n}=s;if(!this.isDragging())return!1;const a=this.registry.getTargetType(t),i=this.getItemType();if(i&&!rs(a,i))return!1;const o=this.getTargetIds();if(!o.length)return!1;const l=o.indexOf(t);return n?l===o.length-1:l>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return ko(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Ro(this.store.getState().dragOffset)}constructor(t,s){this.store=t,this.registry=s}}const Ws=typeof global<"u"?global:self,Un=Ws.MutationObserver||Ws.WebKitMutationObserver;function qn(e){return function(){const s=setTimeout(a,0),n=setInterval(a,50);function a(){clearTimeout(s),clearInterval(n),e()}}}function zo(e){let t=1;const s=new Un(e),n=document.createTextNode("");return s.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const Bo=typeof Un=="function"?zo:qn;class Fo{enqueueTask(t){const{queue:s,requestFlush:n}=this;s.length||(n(),this.flushing=!0),s[s.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const s=this.index;if(this.index++,t[s].call(),this.index>this.capacity){for(let n=0,a=t.length-this.index;n<a;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Bo(this.flush),this.requestErrorThrow=qn(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Ho{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,s){this.onError=t,this.release=s,this.task=null}}class $o{create(t){const s=this.freeTasks,n=s.length?s.pop():new Ho(this.onError,a=>s[s.length]=a);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const Yn=new Fo,Vo=new $o(Yn.registerPendingError);function Ko(e){Yn.enqueueTask(Vo.create(e))}const xs="dnd-core/ADD_SOURCE",Cs="dnd-core/ADD_TARGET",bs="dnd-core/REMOVE_SOURCE",wr="dnd-core/REMOVE_TARGET";function Wo(e){return{type:xs,payload:{sourceId:e}}}function Zo(e){return{type:Cs,payload:{targetId:e}}}function Go(e){return{type:bs,payload:{sourceId:e}}}function Uo(e){return{type:wr,payload:{targetId:e}}}function qo(e){re(typeof e.canDrag=="function","Expected canDrag to be a function."),re(typeof e.beginDrag=="function","Expected beginDrag to be a function."),re(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Yo(e){re(typeof e.canDrop=="function","Expected canDrop to be a function."),re(typeof e.hover=="function","Expected hover to be a function."),re(typeof e.drop=="function","Expected beginDrag to be a function.")}function ss(e,t){if(t&&Array.isArray(e)){e.forEach(s=>ss(s,!1));return}re(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var Me;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(Me||(Me={}));let Xo=0;function Jo(){return Xo++}function Qo(e){const t=Jo().toString();switch(e){case Me.SOURCE:return`S${t}`;case Me.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function Zs(e){switch(e[0]){case"S":return Me.SOURCE;case"T":return Me.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function Gs(e,t){const s=e.entries();let n=!1;do{const{done:a,value:[,i]}=s.next();if(i===t)return!0;n=!!a}while(!n);return!1}class el{addSource(t,s){ss(t),qo(s);const n=this.addHandler(Me.SOURCE,t,s);return this.store.dispatch(Wo(n)),n}addTarget(t,s){ss(t,!0),Yo(s);const n=this.addHandler(Me.TARGET,t,s);return this.store.dispatch(Zo(n)),n}containsHandler(t){return Gs(this.dragSources,t)||Gs(this.dropTargets,t)}getSource(t,s=!1){return re(this.isSourceId(t),"Expected a valid source ID."),s&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return re(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return re(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return re(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return Zs(t)===Me.SOURCE}isTargetId(t){return Zs(t)===Me.TARGET}removeSource(t){re(this.getSource(t),"Expected an existing source."),this.store.dispatch(Go(t)),Ko(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){re(this.getTarget(t),"Expected an existing target."),this.store.dispatch(Uo(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const s=this.getSource(t);re(s,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=s}unpinSource(){re(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,s,n){const a=Qo(t);return this.types.set(a,s),t===Me.SOURCE?this.dragSources.set(a,n):t===Me.TARGET&&this.dropTargets.set(a,n),a}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const tl=(e,t)=>e===t;function rl(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function sl(e,t,s=tl){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!s(e[n],t[n]))return!1;return!0}function nl(e=Bt,t){switch(t.type){case Nr:break;case xs:case Cs:case wr:case bs:return Bt;case Ir:case ms:case Dr:case jr:default:return gs}const{targetIds:s=[],prevTargetIds:n=[]}=t.payload,a=oo(s,n);if(!(a.length>0||!sl(s,n)))return Bt;const o=n[n.length-1],l=s[s.length-1];return o!==l&&(o&&a.push(o),l&&a.push(l)),a}function al(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function il(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable}))),n.forEach(function(a){al(e,a,s[a])})}return e}const Us={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function ol(e=Us,t){const{payload:s}=t;switch(t.type){case hs:case Ir:return{initialSourceClientOffset:s.sourceClientOffset,initialClientOffset:s.clientOffset,clientOffset:s.clientOffset};case Nr:return rl(e.clientOffset,s.clientOffset)?e:il({},e,{clientOffset:s.clientOffset});case Dr:case jr:return Us;default:return e}}function ll(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function jt(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable}))),n.forEach(function(a){ll(e,a,s[a])})}return e}const cl={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function dl(e=cl,t){const{payload:s}=t;switch(t.type){case Ir:return jt({},e,{itemType:s.itemType,item:s.item,sourceId:s.sourceId,isSourcePublic:s.isSourcePublic,dropResult:null,didDrop:!1});case ms:return jt({},e,{isSourcePublic:!0});case Nr:return jt({},e,{targetIds:s.targetIds});case wr:return e.targetIds.indexOf(s.targetId)===-1?e:jt({},e,{targetIds:io(e.targetIds,s.targetId)});case jr:return jt({},e,{dropResult:s.dropResult,didDrop:!0,targetIds:[]});case Dr:return jt({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function ul(e=0,t){switch(t.type){case xs:case Cs:return e+1;case bs:case wr:return e-1;default:return e}}function fl(e=0){return e+1}function pl(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function hl(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable}))),n.forEach(function(a){pl(e,a,s[a])})}return e}function ml(e={},t){return{dirtyHandlerIds:nl(e.dirtyHandlerIds,{type:t.type,payload:hl({},t.payload,{prevTargetIds:ao(e,"dragOperation.targetIds",[])})}),dragOffset:ol(e.dragOffset,t),refCount:ul(e.refCount,t),dragOperation:dl(e.dragOperation,t),stateId:fl(e.stateId)}}function gl(e,t=void 0,s={},n=!1){const a=xl(n),i=new Po(a,new el(a)),o=new Ao(a,i),l=e(o,t,s);return o.receiveBackend(l),o}function xl(e){const t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Wn(ml,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}function Cl(e,t){if(e==null)return{};var s=bl(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s}function bl(e,t){if(e==null)return{};var s={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(s[a]=e[a]);return s}let qs=0;const ur=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var vl=m.memo(function(t){var{children:s}=t,n=Cl(t,["children"]);const[a,i]=yl(n);return m.useEffect(()=>{if(i){const o=Xn();return++qs,()=>{--qs===0&&(o[ur]=null)}}},[]),r.jsx(Kn.Provider,{value:a,children:s})});function yl(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=Sl(e.backend,e.context,e.options,e.debugMode),s=!e.context;return[t,s]}function Sl(e,t=Xn(),s,n){const a=t;return a[ur]||(a[ur]={dragDropManager:gl(e,t,s,n)}),a[ur]}function Xn(){return typeof global<"u"?global:window}function Il(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hr,Ys;function Nl(){return Ys||(Ys=1,Hr=function e(t,s){if(t===s)return!0;if(t&&s&&typeof t=="object"&&typeof s=="object"){if(t.constructor!==s.constructor)return!1;var n,a,i;if(Array.isArray(t)){if(n=t.length,n!=s.length)return!1;for(a=n;a--!==0;)if(!e(t[a],s[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===s.source&&t.flags===s.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===s.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===s.toString();if(i=Object.keys(t),n=i.length,n!==Object.keys(s).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(s,i[a]))return!1;for(a=n;a--!==0;){var o=i[a];if(!e(t[o],s[o]))return!1}return!0}return t!==t&&s!==s}),Hr}var jl=Nl();const Dl=Il(jl),mt=typeof window<"u"?m.useLayoutEffect:m.useEffect;function wl(e,t,s){const[n,a]=m.useState(()=>t(e)),i=m.useCallback(()=>{const o=t(e);Dl(n,o)||(a(o),s&&s())},[n,e,s]);return mt(i),[n,i]}function Ll(e,t,s){const[n,a]=wl(e,t,s);return mt(function(){const o=e.getHandlerId();if(o!=null)return e.subscribeToStateChange(a,{handlerIds:[o]})},[e,a]),n}function Jn(e,t,s){return Ll(t,e||(()=>({})),()=>s.reconnect())}function Qn(e,t){const s=[...t||[]];return t==null&&typeof e!="function"&&s.push(e),m.useMemo(()=>typeof e=="function"?e():e,s)}function Tl(e){return m.useMemo(()=>e.hooks.dragSource(),[e])}function El(e){return m.useMemo(()=>e.hooks.dragPreview(),[e])}let $r=!1,Vr=!1;class Ol{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){re(!$r,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return $r=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{$r=!1}}isDragging(){if(!this.sourceId)return!1;re(!Vr,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Vr=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Vr=!1}}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,s){return this.internalMonitor.isOverTarget(t,s)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let Kr=!1;class Al{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,s){return this.internalMonitor.subscribeToStateChange(t,s)}canDrop(){if(!this.targetId)return!1;re(!Kr,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Kr=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Kr=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function _l(e,t,s){const n=s.getRegistry(),a=n.addTarget(e,t);return[a,()=>n.removeTarget(a)]}function kl(e,t,s){const n=s.getRegistry(),a=n.addSource(e,t);return[a,()=>n.removeSource(a)]}function ns(e,t,s,n){let a;if(a!==void 0)return!!a;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;const l=Object.prototype.hasOwnProperty.bind(t);for(let c=0;c<i.length;c++){const d=i[c];if(!l(d))return!1;const u=e[d],f=t[d];if(a=void 0,a===!1||a===void 0&&u!==f)return!1}return!0}function as(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Rl(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function Ml(e){return(t=null,s=null)=>{if(!m.isValidElement(t)){const i=t;return e(i,s),i}const n=t;return Rl(n),Pl(n,s?i=>e(i,s):e)}}function ea(e){const t={};return Object.keys(e).forEach(s=>{const n=e[s];if(s.endsWith("Ref"))t[s]=e[s];else{const a=Ml(n);t[s]=()=>a}}),t}function Xs(e,t){typeof e=="function"?e(t):e.current=t}function Pl(e,t){const s=e.ref;return re(typeof s!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),s?m.cloneElement(e,{ref:n=>{Xs(s,n),Xs(t,n)}}):m.cloneElement(e,{ref:t})}class zl{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,s=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return s&&this.disconnectDragSource(),this.handlerId?t?(s&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),s):(this.lastConnectedDragSource=t,s):s}reconnectDragPreview(t=!1){const s=this.dragPreview,n=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(n&&this.disconnectDragPreview(),!!this.handlerId){if(!s){this.lastConnectedDragPreview=s;return}n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=s,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,s,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!ns(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!ns(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=ea({dragSource:(s,n)=>{this.clearDragSource(),this.dragSourceOptions=n||null,as(s)?this.dragSourceRef=s:this.dragSourceNode=s,this.reconnectDragSource()},dragPreview:(s,n)=>{this.clearDragPreview(),this.dragPreviewOptions=n||null,as(s)?this.dragPreviewRef=s:this.dragPreviewNode=s,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class Bl{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const s=this.dropTarget;if(this.handlerId){if(!s){this.lastConnectedDropTarget=s;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=s,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,s,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!ns(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=ea({dropTarget:(s,n)=>{this.clearDropTarget(),this.dropTargetOptions=n,as(s)?this.dropTargetRef=s:this.dropTargetNode=s,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function Et(){const{dragDropManager:e}=m.useContext(Kn);return re(e!=null,"Expected drag drop context"),e}function Fl(e,t){const s=Et(),n=m.useMemo(()=>new zl(s.getBackend()),[s]);return mt(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),mt(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function Hl(){const e=Et();return m.useMemo(()=>new Ol(e),[e])}class $l{beginDrag(){const t=this.spec,s=this.monitor;let n=null;return typeof t.item=="object"?n=t.item:typeof t.item=="function"?n=t.item(s):n={},n??null}canDrag(){const t=this.spec,s=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(s):!0}isDragging(t,s){const n=this.spec,a=this.monitor,{isDragging:i}=n;return i?i(a):s===t.getSourceId()}endDrag(){const t=this.spec,s=this.monitor,n=this.connector,{end:a}=t;a&&a(s.getItem(),s),n.reconnect()}constructor(t,s,n){this.spec=t,this.monitor=s,this.connector=n}}function Vl(e,t,s){const n=m.useMemo(()=>new $l(e,t,s),[t,s]);return m.useEffect(()=>{n.spec=e},[e]),n}function Kl(e){return m.useMemo(()=>{const t=e.type;return re(t!=null,"spec.type must be defined"),t},[e])}function Wl(e,t,s){const n=Et(),a=Vl(e,t,s),i=Kl(e);mt(function(){if(i!=null){const[l,c]=kl(i,a,n);return t.receiveHandlerId(l),s.receiveHandlerId(l),c}},[n,t,s,a,i])}function Zl(e,t){const s=Qn(e,t);re(!s.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const n=Hl(),a=Fl(s.options,s.previewOptions);return Wl(s,n,a),[Jn(s.collect,n,a),Tl(a),El(a)]}function Gl(e){return m.useMemo(()=>e.hooks.dropTarget(),[e])}function Ul(e){const t=Et(),s=m.useMemo(()=>new Bl(t.getBackend()),[t]);return mt(()=>(s.dropTargetOptions=e||null,s.reconnect(),()=>s.disconnectDropTarget()),[e]),s}function ql(){const e=Et();return m.useMemo(()=>new Al(e),[e])}function Yl(e){const{accept:t}=e;return m.useMemo(()=>(re(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class Xl{canDrop(){const t=this.spec,s=this.monitor;return t.canDrop?t.canDrop(s.getItem(),s):!0}hover(){const t=this.spec,s=this.monitor;t.hover&&t.hover(s.getItem(),s)}drop(){const t=this.spec,s=this.monitor;if(t.drop)return t.drop(s.getItem(),s)}constructor(t,s){this.spec=t,this.monitor=s}}function Jl(e,t){const s=m.useMemo(()=>new Xl(e,t),[t]);return m.useEffect(()=>{s.spec=e},[e]),s}function Ql(e,t,s){const n=Et(),a=Jl(e,t),i=Yl(e);mt(function(){const[l,c]=_l(i,a,n);return t.receiveHandlerId(l),s.receiveHandlerId(l),c},[n,t,a,s,i.map(o=>o.toString()).join("|")])}function vs(e,t){const s=Qn(e,t),n=ql(),a=Ul(s.options);return Ql(s,n,a),[Jn(s.collect,n,a),Gl(a)]}const Js="column",ec="flex items-center",tc="mr-3 cursor-move text-secondary",rc=({id:e,children:t,className:s,onFind:n,onMove:a,ariaLabel:i="Drag item"})=>{const o=m.useRef(null),l=m.useRef(null),c=typeof n=="function"?n(e):-1,[{isDragging:d},u,f]=Zl(()=>({type:Js,item:{id:e,originalIndex:c},collect:p=>{const g=p.getItem();return{isDragging:p.isDragging()&&g?.id===e}},end:(p,g)=>{if(!p)return;!g.didDrop()&&typeof a=="function"&&p.originalIndex>-1&&a(p.id,p.originalIndex)}}),[e,c,a]),[,h]=vs(()=>({accept:Js,hover:p=>{if(!(!p||p.id===e)&&typeof n=="function"&&typeof a=="function"){const g=n(e);a(p.id,g)}}}),[n,a,e]);return f(h(l)),u(o),r.jsxs("div",{ref:l,className:S.mergeClasses(ec,s),style:{opacity:d?0:1},"aria-roledescription":"Draggable item",children:[r.jsx("div",{ref:o,className:tc,"aria-label":i,children:r.jsx(_.IconGripVertical,{...P.BASE_ICON_PROPS})}),t]})},sc=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M3.68628 10.3945C3.91003 10.408 4.10927 10.4422 4.2832 10.4978L4.28394 10.4971C4.5167 10.5698 4.71621 10.6662 4.87939 10.7871C4.9994 10.876 5.10332 10.974 5.18994 11.0815L5.27051 11.1929L5.27197 11.1943L5.34009 11.3079C5.38301 11.3838 5.42067 11.4597 5.45288 11.5356L5.49683 11.6492L5.49756 11.6514L5.53198 11.7649C5.56274 11.877 5.5838 11.9867 5.59497 12.0938C5.61194 12.23 5.62059 12.3501 5.62061 12.4534C5.62061 12.6166 5.57231 12.7639 5.47559 12.8906C5.41544 12.9694 5.325 13.0198 5.21997 13.0503C5.11455 13.0809 4.98537 13.0942 4.83691 13.0942C4.73711 13.0942 4.62608 13.0838 4.50439 13.0635C4.37577 13.0415 4.26002 12.9966 4.16089 12.9272L4.15869 12.9258C4.04118 12.8396 3.98657 12.7121 3.98657 12.5625C3.98655 12.2721 3.94576 12.0552 3.87231 11.9033L3.87158 11.9011C3.81572 11.7798 3.69406 11.7026 3.45337 11.7026C3.33114 11.7027 3.25307 11.7292 3.20435 11.7671C3.14221 11.8149 3.10061 11.864 3.07617 11.9128C3.04149 11.985 3.02355 12.0599 3.02124 12.1384V14.7905L3.02637 14.8652C3.03466 14.9384 3.05266 15.0073 3.07983 15.0725L3.10254 15.1201C3.12874 15.1672 3.16488 15.2124 3.21167 15.2556C3.2602 15.2978 3.33572 15.3259 3.45337 15.3259C3.56813 15.3259 3.65533 15.3041 3.71997 15.2673C3.78314 15.2313 3.83208 15.1772 3.86646 15.0996C3.94535 14.9186 3.98655 14.7002 3.98657 14.4412C3.98657 14.3004 4.04381 14.1839 4.1499 14.0991L4.19824 14.0647C4.33673 13.9762 4.55866 13.9431 4.83691 13.9431C5.09384 13.9431 5.30559 13.9858 5.43604 14.1013C5.55182 14.204 5.62061 14.3293 5.62061 14.4749C5.62057 14.7549 5.57953 15.0125 5.49536 15.2461L5.45654 15.3442C5.36294 15.5677 5.23261 15.7627 5.06543 15.928L4.99146 15.9968C4.58057 16.3629 4.03856 16.541 3.37793 16.541L3.12671 16.5278C3.00679 16.5188 2.87303 16.495 2.72607 16.4575C2.61505 16.4287 2.50136 16.3894 2.38696 16.3396L2.27197 16.2861C2.1155 16.2094 1.9705 16.0983 1.83691 15.9558L1.83618 15.9551C1.70598 15.8128 1.59909 15.6391 1.51392 15.4365L1.51318 15.4351C1.42797 15.2251 1.38722 14.9736 1.38721 14.6843V12.345C1.38721 12.1069 1.41644 11.892 1.47656 11.7026C1.52068 11.5616 1.57629 11.4337 1.64355 11.3196L1.7146 11.2097C1.81013 11.07 1.92167 10.9524 2.04932 10.8582C2.17206 10.7676 2.29884 10.6909 2.42871 10.6289L2.54297 10.5798C2.81231 10.4716 3.11394 10.4081 3.44678 10.3879L3.45337 10.3872L3.68628 10.3945Z",fill:"currentColor"}),te.createElement("path",{d:"M8.10791 11.7371C8.33261 11.7371 8.5218 11.8023 8.61255 11.9758C8.68772 12.1131 8.72383 12.2741 8.72388 12.4534V12.7522H9.03003C9.21461 12.7522 9.37781 12.7845 9.5127 12.8562C9.68704 12.9456 9.7463 13.149 9.74634 13.3843C9.74634 13.612 9.68105 13.8034 9.50537 13.894L9.5061 13.8948C9.36923 13.9665 9.20861 14.0002 9.03003 14.0002H8.72388V14.3064C8.72388 14.4941 8.68994 14.6588 8.61768 14.7942L8.61841 14.7949C8.5293 14.9647 8.334 15.0226 8.10791 15.0227C7.87257 15.0227 7.66761 14.9685 7.5769 14.8L7.57617 14.7993C7.50612 14.6659 7.47583 14.4988 7.47583 14.3064V14.0002H7.18579C6.99507 14.0002 6.82804 13.9669 6.69214 13.894C6.52182 13.8026 6.46069 13.6102 6.46069 13.3843C6.46073 13.1491 6.51509 12.944 6.68335 12.8533L6.68481 12.8525L6.79102 12.8079C6.90305 12.7697 7.03293 12.7522 7.177 12.7522H7.47583V12.4534C7.47587 12.2683 7.50712 12.1056 7.57617 11.9707L7.5769 11.9685L7.61646 11.9092C7.72038 11.7825 7.90134 11.7371 8.10791 11.7371Z",fill:"currentColor"}),te.createElement("path",{d:"M12.728 11.7371C12.9527 11.7371 13.1419 11.8023 13.2327 11.9758C13.3078 12.1131 13.3439 12.2741 13.344 12.4534V12.7522H13.6501C13.8347 12.7522 13.9979 12.7845 14.1328 12.8562C14.3072 12.9456 14.3664 13.149 14.3665 13.3843C14.3665 13.612 14.3012 13.8034 14.1255 13.894L14.1262 13.8948C13.9894 13.9665 13.8287 14.0002 13.6501 14.0002H13.344V14.3064C13.344 14.4941 13.3101 14.6588 13.2378 14.7942L13.2385 14.7949C13.1494 14.9647 12.9541 15.0226 12.728 15.0227C12.4927 15.0227 12.2877 14.9685 12.197 14.8L12.1963 14.7993C12.1262 14.6659 12.0959 14.4988 12.0959 14.3064V14.0002H11.8059C11.6152 14.0002 11.4482 13.9669 11.3123 13.894C11.1419 13.8026 11.0808 13.6102 11.0808 13.3843C11.0808 13.1491 11.1352 12.944 11.3035 12.8533L11.3049 12.8525L11.4111 12.8079C11.5232 12.7697 11.653 12.7522 11.7971 12.7522H12.0959V12.4534C12.096 12.2683 12.1272 12.1056 12.1963 11.9707L12.197 11.9685L12.2366 11.9092C12.3405 11.7825 12.5215 11.7371 12.728 11.7371Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),nc=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M4.29639 10.3945C4.50665 10.4083 4.69413 10.4433 4.85815 10.5L4.85889 10.4993C5.07789 10.5733 5.26574 10.6715 5.41919 10.7944C5.53204 10.8849 5.62958 10.9843 5.71069 11.0933L5.78613 11.2053L5.78687 11.2068L5.85059 11.3218C5.89058 11.3983 5.92606 11.4746 5.95605 11.551L5.99707 11.666L5.9978 11.6682L6.05566 11.8945C6.0708 11.9689 6.08168 12.0422 6.08862 12.1143C6.10449 12.252 6.11279 12.3734 6.11279 12.4775C6.11276 12.6403 6.06824 12.7876 5.97803 12.9155C5.92155 12.9956 5.83545 13.0472 5.73486 13.0789C5.63441 13.1104 5.51212 13.1243 5.37231 13.1243C5.32505 13.1243 5.27524 13.1215 5.2229 13.1162L5.05811 13.0928C4.93553 13.0701 4.82533 13.024 4.73145 12.9529L4.72998 12.9514C4.61882 12.8632 4.56958 12.7352 4.56958 12.5874C4.56955 12.2926 4.5312 12.0715 4.46191 11.9165L4.46045 11.9143C4.4319 11.8474 4.38931 11.8003 4.33154 11.7686C4.27185 11.7358 4.18944 11.7158 4.07812 11.7158C3.96626 11.7158 3.89622 11.7421 3.85254 11.7788C3.79519 11.8265 3.75637 11.8759 3.73315 11.926C3.70026 11.9999 3.68262 12.0771 3.68042 12.1582V14.8425L3.68555 14.9187C3.69337 14.9937 3.71038 15.0643 3.73608 15.1311L3.75732 15.1802C3.78176 15.2276 3.81496 15.2727 3.85767 15.3157L3.89575 15.3442C3.93843 15.3699 3.99697 15.386 4.07812 15.386C4.18296 15.386 4.26146 15.3647 4.31982 15.3289C4.37727 15.2935 4.4233 15.2389 4.45605 15.1589C4.53037 14.9746 4.56957 14.7522 4.56958 14.4888C4.56958 14.3307 4.63662 14.2007 4.7666 14.1116L4.82007 14.0801C4.95284 14.0119 5.14337 13.9856 5.37231 13.9856C5.61445 13.9856 5.81633 14.0298 5.94067 14.1489C6.04986 14.2536 6.11274 14.379 6.11279 14.5225C6.11279 14.8453 6.06245 15.1386 5.95972 15.3999C5.85998 15.6574 5.71501 15.8781 5.52466 16.0598L5.52393 16.0591C5.13817 16.4307 4.62871 16.6128 4.00708 16.6128C3.95774 16.6128 3.87811 16.6081 3.77124 16.5996C3.65793 16.5904 3.53127 16.5659 3.39331 16.5278C3.28866 16.4984 3.18149 16.4584 3.07397 16.4077L2.96631 16.3535C2.81858 16.2752 2.68196 16.1624 2.55688 16.0181L2.55615 16.0166C2.43435 15.8725 2.33453 15.6972 2.25513 15.4929L2.25439 15.4915C2.17508 15.28 2.13721 15.0267 2.13721 14.7349V12.3669C2.13721 12.1269 2.16476 11.9109 2.2207 11.7202L2.26538 11.5825C2.3136 11.4491 2.37234 11.3289 2.44263 11.2229C2.53187 11.0816 2.63607 10.9621 2.7561 10.8662C2.87117 10.7743 2.98996 10.6964 3.11206 10.6333L3.11353 10.6326L3.22046 10.5828C3.47384 10.4727 3.75793 10.4085 4.0708 10.3879L4.07812 10.3872L4.29639 10.3945Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H8.625C8.21079 16.5 7.875 16.1642 7.875 15.75C7.875 15.3358 8.21079 15 8.625 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),ac=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M3.62109 10.571C3.83849 10.5842 4.03206 10.618 4.20117 10.6721L4.2019 10.6714C4.42776 10.742 4.62121 10.8352 4.77979 10.9526C4.89663 11.0392 4.99793 11.135 5.08228 11.2397L5.16064 11.3474L5.16211 11.3489L5.22803 11.4595C5.26973 11.5332 5.30659 11.6069 5.33789 11.6807L5.38037 11.7905L5.3811 11.7935L5.44116 12.0117C5.45675 12.0826 5.46834 12.1524 5.47559 12.2212L5.49463 12.4087C5.49888 12.4674 5.50049 12.5222 5.50049 12.5728C5.50045 12.7317 5.45415 12.8755 5.35986 12.999C5.30088 13.0762 5.2117 13.1246 5.10938 13.1543C5.0067 13.1841 4.88146 13.1975 4.7373 13.1975C4.64029 13.1975 4.53244 13.1872 4.41431 13.1675C4.28898 13.1461 4.17557 13.1026 4.07886 13.0349L4.07739 13.0334C3.96236 12.9491 3.90894 12.8243 3.90894 12.6782C3.90893 12.3968 3.86925 12.187 3.79834 12.0403L3.79761 12.0381C3.74418 11.922 3.62816 11.847 3.39551 11.8469C3.27715 11.8469 3.20179 11.873 3.15527 11.9092C3.09597 11.9548 3.05572 12.0012 3.03223 12.0476L3.03296 12.0483C2.99919 12.1182 2.98102 12.1906 2.97876 12.2666V14.8396L2.98389 14.9114C2.99188 14.9821 3.00888 15.049 3.03516 15.1121L3.05786 15.1582C3.08304 15.2033 3.11768 15.2464 3.1626 15.2878C3.2089 15.3285 3.28115 15.356 3.39551 15.356C3.50633 15.3559 3.58982 15.3349 3.65186 15.2996C3.71249 15.2651 3.75936 15.2131 3.79248 15.1384L3.84302 15.0007C3.88665 14.8554 3.90893 14.6891 3.90894 14.5005C3.90894 14.363 3.96502 14.2494 4.0686 14.1665L4.11621 14.1328C4.25147 14.0465 4.46739 14.0134 4.7373 14.0134C4.98658 14.0134 5.19278 14.0552 5.32031 14.168C5.43323 14.268 5.5004 14.3903 5.50049 14.5327C5.50049 14.8049 5.46077 15.0556 5.37891 15.2827L5.34155 15.3779C5.23762 15.6261 5.08621 15.8373 4.88892 16.0115L4.88965 16.0122C4.49029 16.3681 3.96383 16.541 3.32227 16.541C3.27168 16.541 3.18935 16.5367 3.07837 16.5286C3.02014 16.5242 2.95789 16.5158 2.89307 16.5044L2.68799 16.4597C2.5801 16.4317 2.47025 16.3938 2.35913 16.3455L2.2478 16.2935C2.09553 16.2188 1.95433 16.1112 1.82446 15.9727L1.82373 15.9712C1.69712 15.8328 1.593 15.6642 1.51025 15.4673L1.50952 15.4658C1.42669 15.2616 1.38721 15.0172 1.38721 14.7363V12.4666C1.38723 12.2355 1.41597 12.0273 1.47437 11.8433C1.53119 11.6615 1.60684 11.502 1.70361 11.3665L1.77686 11.2676C1.85263 11.1732 1.9374 11.0913 2.03101 11.0222C2.15024 10.9342 2.27322 10.8598 2.39941 10.7996L2.40015 10.7988L2.51074 10.7512C2.77229 10.6462 3.0652 10.5848 3.38818 10.5652L3.39551 10.5645L3.62109 10.571Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.36914 11.28C9.50263 11.28 9.62352 11.3063 9.72583 11.3643L9.7251 11.365C9.85906 11.4379 9.90454 11.5838 9.90454 11.7429C9.9045 11.7567 9.90157 11.7778 9.89941 11.7935C9.89658 11.814 9.89242 11.8422 9.88696 11.8777C9.87611 11.9455 9.8639 12.0222 9.85034 12.1062C9.84553 12.136 9.84018 12.1643 9.83569 12.1912H10.0525C10.1919 12.1912 10.3171 12.2148 10.4216 12.2688L10.4209 12.2695C10.5686 12.3412 10.6128 12.5089 10.6128 12.6863C10.6128 12.8587 10.5617 13.0123 10.4194 13.0898L10.4187 13.0906C10.3122 13.1472 10.1885 13.1726 10.0525 13.1726H9.67529L9.55225 13.8589H9.75952C9.89706 13.8589 10.0206 13.8819 10.1243 13.9343C10.2748 14.005 10.3198 14.1752 10.3198 14.354C10.3198 14.5291 10.2702 14.6875 10.1243 14.7627L10.1235 14.7634C10.0176 14.8164 9.89461 14.8403 9.75952 14.8403H9.38452L9.33398 15.1677L9.33325 15.1714C9.30492 15.3271 9.26297 15.4669 9.20728 15.5903L9.20801 15.5911C9.17656 15.6626 9.13001 15.7228 9.06592 15.7646C9.00162 15.8065 8.92683 15.8247 8.84839 15.8247C8.72 15.8247 8.60307 15.8041 8.50122 15.7581L8.49976 15.7573C8.35755 15.6908 8.31299 15.5386 8.31299 15.3787C8.31299 15.3406 8.31787 15.2939 8.32617 15.241L8.35913 15.0242C8.36863 14.9624 8.37948 14.9012 8.38989 14.8403H7.92847L7.87793 15.1677L7.8772 15.1714C7.84887 15.3271 7.80691 15.4669 7.75122 15.5903L7.75195 15.5911C7.72046 15.6627 7.6734 15.7228 7.60913 15.7646C7.54487 15.8064 7.47071 15.8247 7.39233 15.8247C7.26394 15.8247 7.14702 15.8041 7.04517 15.7581L7.0437 15.7573C6.90149 15.6908 6.85693 15.5387 6.85693 15.3787C6.85694 15.3406 6.86181 15.2939 6.87012 15.241L6.90308 15.0242C6.91257 14.9624 6.92342 14.9012 6.93384 14.8403H6.6687C6.52906 14.8403 6.40313 14.8167 6.29663 14.7634L6.29297 14.762C6.15355 14.6853 6.10844 14.5261 6.1084 14.354C6.1084 14.1782 6.1487 14.0079 6.29297 13.9358C6.39784 13.882 6.52535 13.8589 6.6687 13.8589H7.09497L7.21802 13.1726H6.95361C6.81311 13.1726 6.68646 13.1475 6.57935 13.0906L6.57788 13.0898C6.43874 13.0135 6.39332 12.8568 6.39331 12.6863C6.39331 12.5105 6.43361 12.3402 6.57788 12.2681C6.68271 12.2144 6.81036 12.1912 6.95361 12.1912H7.38721L7.46045 11.7561C7.47174 11.6625 7.50842 11.5673 7.56372 11.4712C7.63824 11.3418 7.76255 11.2801 7.91309 11.28C8.04657 11.28 8.16746 11.3063 8.26978 11.3643L8.26904 11.365C8.403 11.4379 8.44849 11.5838 8.44849 11.7429C8.44844 11.7567 8.44552 11.7778 8.44336 11.7935C8.44053 11.814 8.43636 11.8422 8.43091 11.8777C8.42006 11.9455 8.40784 12.0222 8.39429 12.1062C8.38947 12.136 8.38413 12.1643 8.37964 12.1912H8.84326L8.9165 11.7561C8.92779 11.6625 8.96448 11.5673 9.01978 11.4712C9.0943 11.3418 9.21861 11.2801 9.36914 11.28ZM8.09619 13.8589H8.55103L8.67407 13.1726H8.21924L8.09619 13.8589Z",fill:"currentColor"})),ic=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M4.43188 10.4409C4.65285 10.4409 4.85471 10.4869 4.99951 10.6152L4.99878 10.6159C5.13097 10.7305 5.21409 10.881 5.25146 11.0576C5.28474 11.2148 5.30052 11.3869 5.30054 11.5724V15.4323C5.30054 15.6193 5.28417 15.7927 5.25146 15.9516L5.2522 15.9523C5.21779 16.1313 5.13551 16.2842 4.99951 16.3976L4.99878 16.3969C4.85386 16.52 4.65269 16.5646 4.43188 16.5646C4.21337 16.5646 4.01411 16.5195 3.86792 16.3976L3.86353 16.394C3.73466 16.2798 3.65263 16.1299 3.6123 15.9553L3.61157 15.9516C3.57826 15.7941 3.5625 15.6205 3.5625 15.4323V11.5724C3.56252 11.3869 3.5783 11.2148 3.61157 11.0576C3.64882 10.8815 3.72996 10.7302 3.85986 10.6152L3.86133 10.6137C4.00804 10.4875 4.2103 10.4409 4.43188 10.4409Z",fill:"currentColor"}),te.createElement("path",{d:"M8.07129 10.4474C8.18434 10.4599 8.28945 10.4924 8.3811 10.55L8.38184 10.5493C8.45754 10.5942 8.52569 10.6451 8.58472 10.7016L8.64111 10.7602L8.64331 10.7631L8.69385 10.8298C8.72596 10.8768 8.75504 10.9284 8.78101 10.9836L8.81763 11.0685L8.81909 11.0729L9.85986 13.8928V11.2692C9.85986 11.0565 9.89522 10.8654 9.98291 10.7119L9.98364 10.7104L10.0349 10.6393C10.1656 10.4886 10.3781 10.4409 10.5974 10.4409C10.8635 10.4409 11.125 10.4947 11.2529 10.6965C11.3535 10.8508 11.3928 11.0487 11.3928 11.2692V15.4323C11.3928 15.6163 11.3809 15.7863 11.3577 15.9413L11.3584 15.9421C11.3349 16.1167 11.2678 16.2708 11.1467 16.3881C11.0102 16.5202 10.8106 16.5646 10.5974 16.5646H10.0554C9.86994 16.5646 9.69972 16.5199 9.56104 16.416C9.44129 16.3261 9.3452 16.215 9.27466 16.0842C9.21353 15.9706 9.16292 15.8593 9.12378 15.7509L8.14893 13.1091V15.7363C8.14893 15.9493 8.11322 16.1406 8.02661 16.2958L8.02588 16.2973C7.90706 16.5052 7.66112 16.5646 7.41138 16.5646C7.14233 16.5646 6.88122 16.5106 6.75 16.312C6.64812 16.1572 6.60791 15.9581 6.60791 15.7363V11.5724C6.60792 11.3882 6.61818 11.2193 6.63867 11.0671V11.0641L6.66724 10.9367C6.7042 10.8142 6.76699 10.706 6.85986 10.6188C6.9982 10.4862 7.19704 10.4409 7.41138 10.4409H7.95337L8.07129 10.4474Z",fill:"currentColor"}),te.createElement("path",{d:"M13.5688 10.4409C13.7898 10.4409 13.9917 10.4869 14.1365 10.6152L14.1357 10.6159C14.2679 10.7305 14.3511 10.881 14.3884 11.0576C14.4217 11.2148 14.4375 11.3869 14.4375 11.5724V15.4323C14.4375 15.6193 14.4211 15.7927 14.3884 15.9516L14.3892 15.9523C14.3548 16.1313 14.2725 16.2842 14.1365 16.3976L14.1357 16.3969C13.9908 16.52 13.7897 16.5646 13.5688 16.5646C13.3503 16.5646 13.1511 16.5195 13.0049 16.3976L13.0005 16.394C12.8716 16.2798 12.7896 16.1299 12.7493 15.9553L12.7485 15.9516C12.7152 15.7941 12.6995 15.6205 12.6995 15.4323V11.5724C12.6995 11.3869 12.7153 11.2148 12.7485 11.0576C12.7858 10.8815 12.8669 10.7302 12.9968 10.6152L12.9983 10.6137C13.145 10.4875 13.3473 10.4409 13.5688 10.4409Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50385C10.7457 1.52087 10.9072 1.59681 11.0303 1.71991L14.7803 5.46991C14.9208 5.61054 15 5.80136 15 6.00018V9.00018C14.9998 9.41423 14.6641 9.75018 14.25 9.75018C13.8359 9.75018 13.5002 9.41423 13.5 9.00018V6.75018H11.25C10.8523 6.75018 10.4707 6.59192 10.1895 6.31073C9.90824 6.02951 9.7501 5.64788 9.75 5.25018V3.00018H5.25C5.05109 3.00018 4.86038 3.07926 4.71973 3.21991C4.57919 3.36054 4.5 3.55136 4.5 3.75018V9.00018C4.4998 9.41423 4.16409 9.75018 3.75 9.75018C3.33591 9.75018 3.0002 9.41423 3 9.00018V3.75018C3 3.15353 3.23734 2.5813 3.65918 2.15936C4.08114 1.73741 4.65326 1.50018 5.25 1.50018H10.5L10.574 1.50385ZM11.25 5.25018H12.4395L11.25 4.06073V5.25018Z",fill:"currentColor"})),oc=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M6.76831 10.8267C6.93291 10.8267 7.08404 10.8408 7.22021 10.8691L7.35205 10.9021L7.35278 10.9028L7.46851 10.9431C7.57872 10.986 7.67614 11.038 7.75928 11.0991C7.84245 11.1591 7.91481 11.2265 7.97388 11.3005L8.02881 11.3767L8.02954 11.3774L8.11011 11.5254C8.13317 11.5747 8.15233 11.6249 8.16797 11.6755C8.19815 11.7711 8.21863 11.8631 8.22656 11.9502C8.23376 12.0294 8.23755 12.096 8.23755 12.1479C8.23753 12.318 8.17338 12.4626 8.04639 12.572C7.92503 12.676 7.77653 12.7265 7.60913 12.7266C7.4711 12.7266 7.34146 12.6749 7.22241 12.583C7.1027 12.4905 7.02328 12.3741 7.02319 12.2329C7.02319 12.0468 6.98759 11.9498 6.94775 11.907L6.94629 11.9055C6.90561 11.8606 6.83878 11.8294 6.72583 11.8293C6.58234 11.8293 6.48534 11.856 6.42334 11.896C6.4086 11.9056 6.38747 11.9281 6.37061 11.981C6.35372 12.0341 6.34351 12.1099 6.34351 12.2117C6.34581 12.2878 6.36799 12.3546 6.40869 12.4153C6.45761 12.4821 6.52298 12.549 6.60718 12.6138L6.73608 12.7053C6.78632 12.7386 6.84449 12.7751 6.9104 12.8145C7.04454 12.8945 7.16167 12.9644 7.2605 13.0232L7.44507 13.1426C7.50565 13.1844 7.56597 13.2284 7.62524 13.2744C7.74715 13.3666 7.8562 13.4715 7.95337 13.5886C8.05276 13.7085 8.13297 13.8432 8.1936 13.9922C8.25599 14.1456 8.28891 14.3172 8.29395 14.5049V14.5364C8.29395 14.7339 8.26896 14.9141 8.21777 15.0754V15.0776C8.11696 15.3776 7.94914 15.6082 7.7124 15.761L7.71313 15.7617C7.62701 15.8179 7.53944 15.8644 7.45166 15.9016L7.36304 15.936C7.30225 15.9571 7.24075 15.9753 7.1792 15.9902L6.99243 16.0261C6.87331 16.0431 6.75886 16.0529 6.65039 16.0554H6.61304C6.41017 16.0554 6.22414 16.0345 6.05786 15.9917C5.89914 15.9495 5.75823 15.8922 5.63892 15.8196L5.63745 15.8188C5.52025 15.7449 5.42093 15.6589 5.34155 15.561C5.26338 15.4674 5.20001 15.3681 5.15332 15.2644C5.10802 15.1659 5.07431 15.0659 5.05371 14.9656C5.03361 14.8676 5.02297 14.7738 5.02295 14.6851C5.02295 14.5014 5.0798 14.3447 5.20898 14.2375L5.20972 14.2368L5.30493 14.1731C5.40409 14.1186 5.51594 14.0918 5.63745 14.0918C5.79553 14.0919 5.94175 14.1407 6.07251 14.2354L6.12451 14.2764C6.2216 14.3622 6.27861 14.4745 6.2959 14.6067L6.30103 14.6741L6.31055 14.7847C6.32502 14.8796 6.35383 14.9312 6.38306 14.9568C6.43071 14.9963 6.50789 15.0238 6.63135 15.0242C6.76743 15.0198 6.85874 14.9863 6.91772 14.9355L6.91846 14.9341L6.95361 14.8938C6.98575 14.8434 7.00924 14.7604 7.00928 14.6287C7.00928 14.4903 6.96843 14.3706 6.8877 14.2661L6.88696 14.2646C6.80068 14.1504 6.68858 14.0439 6.55078 13.946L6.55005 13.9453C6.40626 13.841 6.25592 13.7396 6.10034 13.6421C5.93262 13.5343 5.77326 13.4207 5.62427 13.303L5.62354 13.3022C5.46846 13.1772 5.34021 13.0351 5.24121 12.8752C5.13746 12.7076 5.0852 12.514 5.08008 12.2988V12.2388L5.0874 12.0505C5.10126 11.869 5.13388 11.7086 5.18628 11.5708V11.5693L5.2478 11.4382C5.31532 11.3136 5.40255 11.2077 5.51074 11.1233L5.62207 11.0464C5.73813 10.9764 5.87099 10.9263 6.01831 10.894C6.21201 10.8494 6.43196 10.8267 6.67603 10.8267H6.76831Z",fill:"currentColor"}),te.createElement("path",{d:"M14.2266 10.8062C14.3565 10.8062 14.4736 10.8329 14.5693 10.8933L14.5701 10.8926L14.5715 10.894L14.5737 10.8948L14.573 10.8955C14.6342 10.9321 14.6895 10.9722 14.7363 11.0171L14.781 11.064L14.7825 11.0662L14.8235 11.1204C14.8363 11.1392 14.8492 11.159 14.8608 11.1797L14.9246 11.3159L14.9253 11.3181L15.9163 14.0024V11.4705C15.9163 11.2922 15.9461 11.1369 16.0159 11.0149L16.054 10.9607C16.1527 10.8467 16.3175 10.8062 16.5022 10.8062C16.7284 10.8062 16.9271 10.8532 17.0229 11.0017C17.1032 11.1237 17.1379 11.2847 17.1379 11.4705V15.0535C17.1379 15.21 17.1275 15.3541 17.1079 15.4849L17.1086 15.4856C17.0896 15.6273 17.0355 15.7491 16.9409 15.8408C16.837 15.9414 16.6806 15.9784 16.5022 15.9785H16.0356C15.8837 15.9785 15.7483 15.9422 15.6394 15.8606C15.5419 15.7874 15.4638 15.6974 15.4065 15.5911C15.3549 15.4953 15.3125 15.4018 15.2798 15.3113L14.3459 12.7815V15.3149C14.3459 15.4932 14.316 15.6489 14.2471 15.7727L14.2463 15.7734C14.158 15.9281 13.9711 15.9784 13.76 15.9785C13.53 15.9785 13.3292 15.9315 13.2312 15.783C13.151 15.6609 13.1169 15.5006 13.1169 15.3149V11.7319C13.117 11.575 13.126 11.4319 13.1433 11.3035V11.3013L13.166 11.1987C13.1955 11.1009 13.2454 11.0157 13.3176 10.9475L13.3594 10.9124C13.4627 10.8363 13.6027 10.8062 13.76 10.8062H14.2266Z",fill:"currentColor"}),te.createElement("path",{d:"M3.62183 10.73C3.8058 10.73 3.96571 10.7696 4.07959 10.8677C4.185 10.9586 4.25306 11.0796 4.28613 11.2229C4.31675 11.3557 4.33154 11.5018 4.33154 11.6602V14.3606C4.33154 14.617 4.29481 14.8413 4.21655 15.0293C4.15993 15.1652 4.09098 15.286 4.00928 15.3896L3.92285 15.4878C3.80762 15.6056 3.67869 15.6971 3.5376 15.7625L3.53833 15.7632C3.40115 15.8269 3.27011 15.872 3.14722 15.8979L3.14795 15.8987C3.09669 15.9112 3.04501 15.9213 2.99414 15.9294L2.8418 15.9478C2.74998 15.9548 2.68156 15.9587 2.64111 15.9587C2.3706 15.9587 2.13396 15.928 1.93506 15.8643C1.73937 15.8022 1.56914 15.7204 1.42749 15.6174C1.28776 15.5158 1.17335 15.3984 1.08691 15.2651L1.02686 15.1685C0.970789 15.0715 0.926873 14.9732 0.895752 14.874L0.896484 14.8733C0.852315 14.745 0.821564 14.6203 0.806396 14.499L0.805664 14.4968C0.793555 14.3806 0.786621 14.2779 0.786621 14.1899C0.786659 14.0481 0.829716 13.9196 0.914062 13.8091C0.968035 13.7386 1.04873 13.6949 1.13965 13.6685C1.231 13.642 1.34202 13.6297 1.46851 13.6296C1.55651 13.6297 1.65224 13.6393 1.75415 13.6567C1.8653 13.6758 1.96539 13.7157 2.05151 13.7783C2.15785 13.853 2.20677 13.9666 2.20679 14.0977C2.20679 14.3421 2.24112 14.5246 2.302 14.6528L2.32178 14.6865C2.37332 14.7613 2.46833 14.8095 2.64111 14.8096C2.74386 14.8095 2.80532 14.7883 2.8396 14.762L2.84106 14.7605L2.90552 14.7019C2.92253 14.6822 2.9356 14.6623 2.94507 14.6426L2.97803 14.5518C2.98565 14.5209 2.98953 14.4889 2.99048 14.4565V11.9641H2.17236C2.0293 11.9641 1.8922 11.9536 1.76221 11.9312L1.76001 11.9304C1.62252 11.9035 1.50268 11.8482 1.40698 11.7612L1.40625 11.7598C1.30008 11.6602 1.25688 11.5177 1.25684 11.3547C1.25684 11.1882 1.29936 11.0419 1.40625 10.9417C1.49986 10.8517 1.6187 10.7951 1.75635 10.7681L1.9585 10.7395C2.02775 10.7333 2.09935 10.73 2.17236 10.73H3.62183Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0061 10.8398C11.1058 10.8474 11.2146 10.8676 11.3313 10.8984L11.332 10.8977C11.4562 10.9275 11.5817 10.9747 11.7078 11.0376L11.803 11.0896C11.8653 11.1277 11.926 11.1727 11.9839 11.2244L12.0688 11.3071L12.0696 11.3079L12.1472 11.4001C12.2197 11.4965 12.2807 11.608 12.3303 11.7327L12.3772 11.8674C12.417 12.0081 12.4358 12.1667 12.4358 12.3406V14.4111C12.4358 14.649 12.4035 14.8579 12.3347 15.0337L12.334 15.0352C12.2654 15.204 12.1782 15.349 12.071 15.4666C11.9653 15.5823 11.8439 15.6747 11.7085 15.7412L11.7078 15.7405C11.5864 15.8034 11.4622 15.8534 11.335 15.8877C11.2172 15.9189 11.1066 15.9387 11.0061 15.9463C10.9136 15.9532 10.8413 15.9573 10.793 15.9573H10.675L10.4626 15.9463C10.362 15.9387 10.2518 15.919 10.1338 15.8877C10.0122 15.8554 9.8873 15.8055 9.75952 15.7405C9.62706 15.6742 9.50578 15.5832 9.39624 15.4688L9.39551 15.468C9.28579 15.3506 9.19561 15.2056 9.12451 15.0366L9.12378 15.0352C9.05226 14.8589 9.01835 14.6495 9.01831 14.4111V12.3406C9.01831 12.105 9.05259 11.8998 9.12451 11.7297C9.19368 11.5618 9.28389 11.4184 9.39697 11.3027C9.50677 11.1905 9.62826 11.1014 9.76099 11.0376C9.82393 11.0062 9.88688 10.9792 9.94849 10.957L9.94922 10.9563L10.1323 10.8992L10.1345 10.8984L10.3066 10.8604C10.3612 10.8506 10.4136 10.8436 10.4626 10.8398L10.675 10.8289H10.793C10.8413 10.8289 10.9136 10.8329 11.0061 10.8398ZM10.738 11.9473C10.6399 11.9473 10.5796 11.9688 10.5439 11.9963L10.5432 11.9971C10.4934 12.0354 10.4596 12.0746 10.4385 12.1135L10.4377 12.1143C10.4103 12.1641 10.3949 12.222 10.3931 12.2886V14.5393L10.4062 14.6309L10.4385 14.7151L10.4392 14.7158L10.481 14.7766C10.4976 14.7958 10.5181 14.8147 10.5417 14.833L10.5732 14.8521C10.6101 14.8689 10.6637 14.8806 10.738 14.8806C10.8345 14.8805 10.8925 14.8598 10.9255 14.8345C10.9743 14.7969 11.0075 14.7565 11.0288 14.7158C11.054 14.6605 11.0699 14.5993 11.0757 14.5327V12.2944L11.0588 12.197C11.051 12.167 11.0406 12.138 11.0281 12.1106C11.0069 12.0728 10.9738 12.0343 10.9255 11.9971L10.9233 11.9949C10.8905 11.9684 10.8335 11.9474 10.738 11.9473Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V9C15 9.41421 14.6642 9.75 14.25 9.75C13.8358 9.75 13.5 9.41421 13.5 9V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),lc=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"}),te.createElement("path",{d:"M2.39355 10.5C2.53545 10.5 2.6592 10.5122 2.75757 10.5417C2.88987 10.5815 2.99161 10.6954 3.07251 10.8289L3.15747 10.9885L3.25195 11.2031L3.25269 11.2046L3.35229 11.4683C3.38786 11.5664 3.42601 11.6752 3.46655 11.7942L3.76318 12.6665L3.76392 12.6687L3.76904 12.6848L3.79907 12.5911L3.94849 12.1348C3.99515 11.9948 4.03674 11.8689 4.073 11.7576L4.07373 11.7561L4.1814 11.4434C4.21489 11.3495 4.24596 11.265 4.27515 11.1907L4.36084 10.9849C4.38855 10.9239 4.41584 10.8705 4.44214 10.8252C4.51581 10.6953 4.61188 10.5823 4.74243 10.5417H4.7439L4.82153 10.5227C4.90321 10.5069 4.99686 10.5 5.09985 10.5H5.67041C5.87137 10.5 6.05265 10.5425 6.17505 10.6619L6.17944 10.6655C6.29073 10.7714 6.35329 10.9108 6.375 11.072C6.39695 11.2133 6.40721 11.3701 6.40723 11.5415V15.5149C6.4072 15.7232 6.3696 15.9065 6.27686 16.0474C6.16065 16.2235 5.92578 16.2751 5.67041 16.2751C5.43573 16.2751 5.21924 16.2184 5.11157 16.0378L5.10938 16.0342C5.03005 15.8921 4.9966 15.7149 4.99658 15.5149V12.8335L4.4436 14.4456L4.44141 14.4521C4.39239 14.576 4.32667 14.6919 4.24658 14.8008L4.24731 14.8015C4.14341 14.9438 3.9882 15.008 3.80933 15.0081H3.73096C3.55351 15.008 3.40015 14.9437 3.29004 14.8081L3.28857 14.8066C3.20076 14.6954 3.13356 14.575 3.08862 14.4463L2.53564 12.8496V15.5149C2.53562 15.7149 2.50218 15.8921 2.42285 16.0342L2.42212 16.0356C2.31692 16.2193 2.09741 16.2751 1.86182 16.2751C1.60639 16.2751 1.37154 16.2236 1.25537 16.0474C1.16263 15.9065 1.12502 15.7232 1.125 15.5149V11.5415C1.12501 11.3697 1.13426 11.2129 1.15356 11.072L1.1543 11.0691L1.17993 10.9526C1.21308 10.8409 1.26884 10.7425 1.35059 10.6633L1.39966 10.6223C1.52082 10.5332 1.68333 10.5 1.86182 10.5H2.39355Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.1106 10.5C9.62746 10.5 10.0624 10.6251 10.4026 10.8875L10.5256 10.9944C10.6405 11.1071 10.7342 11.238 10.8062 11.3862C10.9039 11.5876 10.9497 11.8187 10.9497 12.074V14.4983C10.9497 14.7119 10.927 14.9051 10.8779 15.0754C10.8306 15.2398 10.7676 15.3875 10.689 15.5156L10.6875 15.5186C10.6079 15.6408 10.5165 15.7481 10.4143 15.8386C10.3155 15.9261 10.2132 15.9989 10.1074 16.0547L10.1067 16.054C9.86566 16.1854 9.58987 16.2585 9.28271 16.2751H7.97681C7.77408 16.2751 7.59145 16.2335 7.46704 16.1169C7.35471 16.0115 7.2898 15.8714 7.26489 15.7097C7.24266 15.5651 7.23194 15.4033 7.23193 15.2256V11.5415C7.23195 11.3663 7.2426 11.2069 7.26489 11.0647C7.28985 10.9032 7.35482 10.7635 7.46704 10.6582C7.59145 10.5416 7.77403 10.5 7.97681 10.5H9.1106ZM8.72095 15.0447H9.07544C9.15931 15.0426 9.23737 15.0225 9.31055 14.9839L9.31348 14.9817L9.35815 14.9553C9.40066 14.926 9.43743 14.8876 9.46802 14.8381L9.46875 14.8367L9.49438 14.7861C9.51748 14.7305 9.53172 14.6593 9.53174 14.5686V12.2615C9.53174 12.1256 9.50631 12.0248 9.46509 11.9517L9.46362 11.9495C9.42061 11.8696 9.36785 11.8162 9.30762 11.7825C9.25706 11.7542 9.19978 11.7342 9.1355 11.7231L9.06885 11.7151H8.72095V15.0447Z",fill:"currentColor"})),cc=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.6416 10.3784C3.95675 10.4068 4.24355 10.4808 4.49927 10.6033L4.68896 10.7058C4.75102 10.7437 4.81209 10.7853 4.87207 10.8303C4.99897 10.9227 5.10899 11.0375 5.20459 11.1724C5.30765 11.311 5.38613 11.4733 5.44116 11.6558L5.47998 11.8008C5.51306 11.9504 5.52903 12.1125 5.52905 12.2856C5.52905 12.6011 5.47828 12.8867 5.37305 13.1382L5.37378 13.1389C5.28434 13.3557 5.15787 13.5441 4.99512 13.7014L4.92334 13.7666C4.52343 14.1103 3.97203 14.269 3.2959 14.269H2.95166V15.4292C2.95165 15.614 2.93964 15.7845 2.91577 15.9397C2.8883 16.1182 2.81511 16.2739 2.68652 16.3909L2.68579 16.3901C2.54556 16.5202 2.34254 16.5645 2.12329 16.5645C1.90696 16.5644 1.70685 16.5194 1.56738 16.3887L1.56519 16.3865C1.44288 16.2679 1.37145 16.1152 1.34399 15.9404L1.34326 15.936C1.32257 15.7822 1.31251 15.613 1.3125 15.4292V11.5042C1.31251 11.3204 1.3225 11.1524 1.34326 11.001L1.34399 10.9973L1.37256 10.8691C1.40991 10.7455 1.47366 10.6362 1.56738 10.5483C1.70673 10.4148 1.90677 10.3689 2.12329 10.3689H3.50464L3.6416 10.3784ZM2.95166 12.9053H3.31787C3.43267 12.8984 3.53116 12.8714 3.61597 12.8269C3.69435 12.7857 3.75967 12.7244 3.81226 12.6387L3.84448 12.5728C3.8728 12.5 3.88989 12.4058 3.88989 12.2856C3.88984 12.1374 3.85971 12.0411 3.81812 11.9795L3.81519 11.9744C3.76419 11.8937 3.70357 11.8366 3.63428 11.7979C3.56584 11.7635 3.47692 11.7377 3.36328 11.7253H2.95166V12.9053Z",fill:"currentColor"}),te.createElement("path",{d:"M9.85181 10.3689C9.96017 10.369 10.0701 10.3945 10.1792 10.4392L10.2876 10.4897L10.2935 10.4927L10.2993 10.4963C10.4209 10.5712 10.5226 10.6619 10.5879 10.7725C10.6503 10.8716 10.6882 10.9809 10.6882 11.0969C10.6882 11.1892 10.6526 11.2993 10.6077 11.4089L10.6069 11.4082C10.5828 11.4685 10.5524 11.5379 10.5154 11.6147C10.4774 11.6937 10.4326 11.7792 10.3813 11.8704L9.1582 14.0391V15.4373C9.1582 15.6164 9.14303 15.7853 9.11279 15.9426C9.07918 16.1138 9.00547 16.2635 8.88647 16.3799L8.88721 16.3806C8.75142 16.5164 8.5562 16.5644 8.34668 16.5645C8.13595 16.5644 7.94219 16.5154 7.80249 16.3843L7.80103 16.3828C7.68055 16.2661 7.60635 16.1157 7.57251 15.9434C7.54226 15.786 7.52783 15.6164 7.52783 15.4373V14.0398L6.12085 11.5283L6.11938 11.5261C6.0459 11.3891 6.00587 11.2453 6.00586 11.0969C6.00589 10.986 6.03681 10.8798 6.09155 10.7812L6.09302 10.7791L6.15015 10.6963C6.21492 10.6176 6.30071 10.5509 6.39771 10.4941L6.4043 10.4905L6.5127 10.4392C6.6213 10.3943 6.73162 10.369 6.84155 10.3689C7.06446 10.369 7.25232 10.4649 7.39307 10.6399L7.48096 10.752C7.5635 10.8656 7.6337 10.9873 7.69263 11.116L8.34668 12.4878L9.00073 11.116C9.07902 10.945 9.177 10.7867 9.29443 10.6421L9.29517 10.6414L9.35083 10.5791C9.48615 10.443 9.65571 10.3689 9.85181 10.3689Z",fill:"currentColor"}),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.574 1.50366C10.7457 1.52068 10.9072 1.59662 11.0303 1.71973L14.7803 5.46973C14.9209 5.61038 15 5.80109 15 6V14.25C15 14.8467 14.7628 15.4189 14.3408 15.8408C13.9189 16.2628 13.3467 16.5 12.75 16.5H12C11.5858 16.5 11.25 16.1642 11.25 15.75C11.25 15.3358 11.5858 15 12 15H12.75C12.9489 15 13.1396 14.9209 13.2803 14.7803C13.4209 14.6396 13.5 14.4489 13.5 14.25V6.75H11.25C10.8522 6.75 10.4708 6.59185 10.1895 6.31055C9.90815 6.02924 9.75 5.64783 9.75 5.25V3H5.25C5.05109 3 4.86038 3.07907 4.71973 3.21973C4.57907 3.36038 4.5 3.55109 4.5 3.75V9C4.5 9.41421 4.16421 9.75 3.75 9.75C3.33579 9.75 3 9.41421 3 9V3.75C3 3.15326 3.23722 2.58114 3.65918 2.15918C4.08114 1.73722 4.65326 1.5 5.25 1.5H10.5L10.574 1.50366ZM11.25 5.25H12.4395L11.25 4.06055V5.25Z",fill:"currentColor"})),pe=(e,t)=>r.jsx(e,{size:t.size??P.BASE_ICON_PROPS.size,stroke:t.stroke??P.BASE_ICON_PROPS.stroke,className:t.className}),ut=(e,t)=>r.jsx(e,{width:Number(t.size??P.BASE_ICON_PROPS.size),height:Number(t.size??P.BASE_ICON_PROPS.size),className:t.className}),Qs={".bmp":e=>pe(_.IconFileTypeBmp,e),".cpp":e=>ut(sc,e),".c":e=>ut(nc,e),".cs":e=>ut(ac,e),".css":e=>pe(_.IconFileTypeCss,e),".csv":e=>pe(_.IconFileTypeCsv,e),".doc":e=>pe(_.IconFileTypeDoc,e),".docx":e=>pe(_.IconFileTypeDocx,e),".html":e=>pe(_.IconFileTypeHtml,e),".ini":e=>ut(ic,e),".jpg":e=>pe(_.IconFileTypeJpg,e),".js":e=>pe(_.IconFileTypeJs,e),".json":e=>ut(oc,e),".jsx":e=>pe(_.IconFileTypeJsx,e),".md":e=>ut(lc,e),".pdf":e=>pe(_.IconFileTypePdf,e),".php":e=>pe(_.IconFileTypePhp,e),".png":e=>pe(_.IconFileTypePng,e),".ppt":e=>pe(_.IconFileTypePpt,e),".py":e=>ut(cc,e),".rs":e=>pe(_.IconFileTypeRs,e),".sql":e=>pe(_.IconFileTypeSql,e),".svg":e=>pe(_.IconFileTypeSvg,e),".ts":e=>pe(_.IconFileTypeTs,e),".tsx":e=>pe(_.IconFileTypeTsx,e),".txt":e=>pe(_.IconFileTypeTxt,e),".vue":e=>pe(_.IconFileTypeVue,e),".xls":e=>pe(_.IconFileTypeXls,e),".xml":e=>pe(_.IconFileTypeXml,e),".zip":e=>pe(_.IconFileTypeZip,e),default:e=>pe(_.IconFile,e)},ta=({extension:e,size:t=P.BASE_ICON_PROPS.size,stroke:s=P.BASE_ICON_PROPS.stroke,className:n,decorative:a=!1,label:i,indicator:o})=>{const l=(()=>{if(!e)return"";const f=e.trim().toLowerCase();return f.startsWith(".")?f:`.${f}`})(),d=(Qs[l]??Qs.default)({size:t,stroke:s}),u=typeof i=="string"?i:`${l.slice(1).toUpperCase()} file icon`;return r.jsxs("span",{className:ne("inline-flex relative",n),...a?{"aria-hidden":!0}:{role:"img","aria-label":u},children:[r.jsx(C.DialIcon,{icon:d,className:"inline-block align-middle"}),o&&r.jsx("span",{className:"absolute -bottom-0.5 -left-0.5",children:o})]})},ys=({label:e="Shared entity",size:t=14,className:s,containerClassName:n,stroke:a=1.5,sharedIndicatorTooltip:i})=>r.jsx(O.DialTooltip,{tooltip:i||"Shared",children:r.jsx(C.DialIcon,{className:S.mergeClasses("text-accent-primary flex bg-layer-3",n),icon:r.jsx(_.IconArrowUpRight,{size:t,stroke:a,"aria-label":typeof e=="string"?e:void 0,className:s,role:"img"})})}),dc=({name:e,className:t,shared:s=!1,iconSize:n=P.BASE_ICON_SIZE,details:a,sharedIndicatorClassName:i,sharedIndicatorTooltip:o,fileExtension:l,hideTooltip:c=!1,isInvalidName:d=!1,tooltipContent:u})=>{const f=l||(e.includes(".")?e.split(".").pop():void 0);return r.jsxs("div",{className:S.mergeClasses("flex items-center gap-2 w-full",t),children:[r.jsx(ta,{extension:f,size:n,className:"text-secondary",indicator:s?r.jsx(ys,{className:i,sharedIndicatorTooltip:o}):null,label:"File type icon"}),r.jsxs("div",{className:ne(["w-full flex min-w-0",a&&"flex-col gap-1"]),children:[r.jsx(C.DialEllipsisTooltip,{className:ne(["dial-small-text flex-1 min-w-0",d?"text-secondary":"text-primary"]),text:e,id:"name",hideTooltip:c,customTooltipContent:u}),a]})]})},uc=({name:e,className:t,shared:s=!1,loading:n=!1,iconSize:a=P.BASE_ICON_SIZE,sharedIndicatorClassName:i,sharedIndicatorTooltip:o,hideTooltip:l=!1,isInvalidName:c=!1,tooltipContent:d})=>{const u=()=>n?r.jsx(lt,{size:a}):r.jsx(C.DialIcon,{icon:r.jsx(_.IconFolder,{...P.BASE_ICON_PROPS,size:a}),className:"inline-block align-middle"});return r.jsxs("div",{className:S.mergeClasses("flex items-center gap-2 w-full",t),children:[r.jsxs("span",{className:"inline-flex relative text-secondary",role:"img",children:[u(),s&&r.jsx("span",{className:"absolute z-50 -bottom-0.5 -left-0.5",children:r.jsx(ys,{className:i,sharedIndicatorTooltip:o})})]}),r.jsx(C.DialEllipsisTooltip,{className:ne("dial-small-text flex-1 min-w-0",c?"text-secondary":"text-primary"),text:e,id:"name",hideTooltip:l,customTooltipContent:d})]})};var nt=(e=>(e.Left="left",e.Right="right",e))(nt||{}),ge=function(){return ge=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++){t=arguments[s];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},ge.apply(this,arguments)},en={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},tn={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},rr={width:"20px",height:"20px",position:"absolute",zIndex:1},fc={top:ge(ge({},en),{top:"-5px"}),right:ge(ge({},tn),{left:void 0,right:"-5px"}),bottom:ge(ge({},en),{top:void 0,bottom:"-5px"}),left:ge(ge({},tn),{left:"-5px"}),topRight:ge(ge({},rr),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:ge(ge({},rr),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:ge(ge({},rr),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:ge(ge({},rr),{left:"-10px",top:"-10px",cursor:"nw-resize"})},pc=m.memo(function(e){var t=e.onResizeStart,s=e.direction,n=e.children,a=e.replaceStyles,i=e.className,o=m.useCallback(function(d){t(d,s)},[t,s]),l=m.useCallback(function(d){t(d,s)},[t,s]),c=m.useMemo(function(){return ge(ge({position:"absolute",userSelect:"none"},fc[s]),a??{})},[a,s]);return r.jsx("div",{className:i||void 0,style:c,onMouseDown:o,onTouchStart:l,children:n})}),hc=(function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=a[i])},e(t,s)};return function(t,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(t,s);function n(){this.constructor=t}t.prototype=s===null?Object.create(s):(n.prototype=s.prototype,new n)}})(),Fe=function(){return Fe=Object.assign||function(e){for(var t,s=1,n=arguments.length;s<n;s++){t=arguments[s];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},Fe.apply(this,arguments)},mc={width:"auto",height:"auto"},sr=function(e,t,s){return Math.max(Math.min(e,s),t)},rn=function(e,t,s){var n=Math.round(e/t);return n*t+s*(n-1)},Dt=function(e,t){return new RegExp(e,"i").test(t)},nr=function(e){return!!(e.touches&&e.touches.length)},gc=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},sn=function(e,t,s){s===void 0&&(s=0);var n=t.reduce(function(i,o,l){return Math.abs(o-e)<Math.abs(t[i]-e)?l:i},0),a=Math.abs(t[n]-e);return s===0||a<s?t[n]:e},Wr=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},ar=function(e,t,s,n){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var a=Number(e.replace("%",""))/100;return t*a}if(e.endsWith("vw")){var a=Number(e.replace("vw",""))/100;return s*a}if(e.endsWith("vh")){var a=Number(e.replace("vh",""))/100;return n*a}}return e},xc=function(e,t,s,n,a,i,o){return n=ar(n,e.width,t,s),a=ar(a,e.height,t,s),i=ar(i,e.width,t,s),o=ar(o,e.height,t,s),{maxWidth:typeof n>"u"?void 0:Number(n),maxHeight:typeof a>"u"?void 0:Number(a),minWidth:typeof i>"u"?void 0:Number(i),minHeight:typeof o>"u"?void 0:Number(o)}},Cc=function(e){return Array.isArray(e)?e:[e,e]},bc=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],nn="__resizable_base__",ra=(function(e){hc(t,e);function t(s){var n,a,i,o,l=e.call(this,s)||this;return l.ratio=1,l.resizable=null,l.parentLeft=0,l.parentTop=0,l.resizableLeft=0,l.resizableRight=0,l.resizableTop=0,l.resizableBottom=0,l.targetLeft=0,l.targetTop=0,l.delta={width:0,height:0},l.appendBase=function(){if(!l.resizable||!l.window)return null;var c=l.parentNode;if(!c)return null;var d=l.window.document.createElement("div");return d.style.width="100%",d.style.height="100%",d.style.position="absolute",d.style.transform="scale(0, 0)",d.style.left="0",d.style.flex="0 0 100%",d.classList?d.classList.add(nn):d.className+=nn,c.appendChild(d),d},l.removeBase=function(c){var d=l.parentNode;d&&d.removeChild(c)},l.state={isResizing:!1,width:(a=(n=l.propsSize)===null||n===void 0?void 0:n.width)!==null&&a!==void 0?a:"auto",height:(o=(i=l.propsSize)===null||i===void 0?void 0:i.height)!==null&&o!==void 0?o:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},l.onResizeStart=l.onResizeStart.bind(l),l.onMouseMove=l.onMouseMove.bind(l),l.onMouseUp=l.onMouseUp.bind(l),l}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||mc},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var s=0,n=0;if(this.resizable&&this.window){var a=this.resizable.offsetWidth,i=this.resizable.offsetHeight,o=this.resizable.style.position;o!=="relative"&&(this.resizable.style.position="relative"),s=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:a,n=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:i,this.resizable.style.position=o}return{width:s,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var s=this,n=this.props.size,a=function(l){var c;if(typeof s.state[l]>"u"||s.state[l]==="auto")return"auto";if(s.propsSize&&s.propsSize[l]&&(!((c=s.propsSize[l])===null||c===void 0)&&c.toString().endsWith("%"))){if(s.state[l].toString().endsWith("%"))return s.state[l].toString();var d=s.getParentSize(),u=Number(s.state[l].toString().replace("px","")),f=u/d[l]*100;return"".concat(f,"%")}return Wr(s.state[l])},i=n&&typeof n.width<"u"&&!this.state.isResizing?Wr(n.width):a("width"),o=n&&typeof n.height<"u"&&!this.state.isResizing?Wr(n.height):a("height");return{width:i,height:o}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var s=this.appendBase();if(!s)return{width:0,height:0};var n=!1,a=this.parentNode.style.flexWrap;a!=="wrap"&&(n=!0,this.parentNode.style.flexWrap="wrap"),s.style.position="relative",s.style.minWidth="100%",s.style.minHeight="100%";var i={width:s.offsetWidth,height:s.offsetHeight};return n&&(this.parentNode.style.flexWrap=a),this.removeBase(s),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var s=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:s.flexBasis!=="auto"?s.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(s,n){var a=this.propsSize&&this.propsSize[n];return this.state[n]==="auto"&&this.state.original[n]===s&&(typeof a>"u"||a==="auto")?"auto":s},t.prototype.calculateNewMaxFromBoundary=function(s,n){var a=this.props.boundsByDirection,i=this.state.direction,o=a&&Dt("left",i),l=a&&Dt("top",i),c,d;if(this.props.bounds==="parent"){var u=this.parentNode;u&&(c=o?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),d=l?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(c=o?this.resizableRight:this.window.innerWidth-this.resizableLeft,d=l?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(c=o?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),d=l?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return c&&Number.isFinite(c)&&(s=s&&s<c?s:c),d&&Number.isFinite(d)&&(n=n&&n<d?n:d),{maxWidth:s,maxHeight:n}},t.prototype.calculateNewSizeFromDirection=function(s,n){var a=this.props.scale||1,i=Cc(this.props.resizeRatio||1),o=i[0],l=i[1],c=this.state,d=c.direction,u=c.original,f=this.props,h=f.lockAspectRatio,p=f.lockAspectRatioExtraHeight,g=f.lockAspectRatioExtraWidth,b=u.width,x=u.height,v=p||0,y=g||0;return Dt("right",d)&&(b=u.width+(s-u.x)*o/a,h&&(x=(b-y)/this.ratio+v)),Dt("left",d)&&(b=u.width-(s-u.x)*o/a,h&&(x=(b-y)/this.ratio+v)),Dt("bottom",d)&&(x=u.height+(n-u.y)*l/a,h&&(b=(x-v)*this.ratio+y)),Dt("top",d)&&(x=u.height-(n-u.y)*l/a,h&&(b=(x-v)*this.ratio+y)),{newWidth:b,newHeight:x}},t.prototype.calculateNewSizeFromAspectRatio=function(s,n,a,i){var o=this.props,l=o.lockAspectRatio,c=o.lockAspectRatioExtraHeight,d=o.lockAspectRatioExtraWidth,u=typeof i.width>"u"?10:i.width,f=typeof a.width>"u"||a.width<0?s:a.width,h=typeof i.height>"u"?10:i.height,p=typeof a.height>"u"||a.height<0?n:a.height,g=c||0,b=d||0;if(l){var x=(h-g)*this.ratio+b,v=(p-g)*this.ratio+b,y=(u-b)/this.ratio+g,I=(f-b)/this.ratio+g,j=Math.max(u,x),N=Math.min(f,v),w=Math.max(h,y),A=Math.min(p,I);s=sr(s,j,N),n=sr(n,w,A)}else s=sr(s,u,f),n=sr(n,h,p);return{newWidth:s,newHeight:n}},t.prototype.setBoundingClientRect=function(){var s=1/(this.props.scale||1);if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var a=n.getBoundingClientRect();this.parentLeft=a.left*s,this.parentTop=a.top*s}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left*s,this.targetTop=i.top*s}if(this.resizable){var o=this.resizable.getBoundingClientRect(),l=o.left,c=o.top,d=o.right,u=o.bottom;this.resizableLeft=l*s,this.resizableRight=d*s,this.resizableTop=c*s,this.resizableBottom=u*s}},t.prototype.onResizeStart=function(s,n){if(!(!this.resizable||!this.window)){var a=0,i=0;if(s.nativeEvent&&gc(s.nativeEvent)?(a=s.nativeEvent.clientX,i=s.nativeEvent.clientY):s.nativeEvent&&nr(s.nativeEvent)&&(a=s.nativeEvent.touches[0].clientX,i=s.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var o=this.props.onResizeStart(s,n,this.resizable);if(o===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var l,c=this.window.getComputedStyle(this.resizable);if(c.flexBasis!=="auto"){var d=this.parentNode;if(d){var u=this.window.getComputedStyle(d).flexDirection;this.flexDir=u.startsWith("row")?"row":"column",l=c.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var f={original:{x:a,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Fe(Fe({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(s.target).cursor||"auto"}),direction:n,flexBasis:l};this.setState(f)}},t.prototype.onMouseMove=function(s){var n=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&nr(s))try{s.preventDefault(),s.stopPropagation()}catch{}var a=this.props,i=a.maxWidth,o=a.maxHeight,l=a.minWidth,c=a.minHeight,d=nr(s)?s.touches[0].clientX:s.clientX,u=nr(s)?s.touches[0].clientY:s.clientY,f=this.state,h=f.direction,p=f.original,g=f.width,b=f.height,x=this.getParentSize(),v=xc(x,this.window.innerWidth,this.window.innerHeight,i,o,l,c);i=v.maxWidth,o=v.maxHeight,l=v.minWidth,c=v.minHeight;var y=this.calculateNewSizeFromDirection(d,u),I=y.newHeight,j=y.newWidth,N=this.calculateNewMaxFromBoundary(i,o);this.props.snap&&this.props.snap.x&&(j=sn(j,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(I=sn(I,this.props.snap.y,this.props.snapGap));var w=this.calculateNewSizeFromAspectRatio(j,I,{width:N.maxWidth,height:N.maxHeight},{width:l,height:c});if(j=w.newWidth,I=w.newHeight,this.props.grid){var A=rn(j,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),D=rn(I,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),L=this.props.snapGap||0,E=L===0||Math.abs(A-j)<=L?A:j,T=L===0||Math.abs(D-I)<=L?D:I;j=E,I=T}var k={width:j-p.width,height:I-p.height};if(this.delta=k,g&&typeof g=="string"){if(g.endsWith("%")){var z=j/x.width*100;j="".concat(z,"%")}else if(g.endsWith("vw")){var R=j/this.window.innerWidth*100;j="".concat(R,"vw")}else if(g.endsWith("vh")){var Z=j/this.window.innerHeight*100;j="".concat(Z,"vh")}}if(b&&typeof b=="string"){if(b.endsWith("%")){var z=I/x.height*100;I="".concat(z,"%")}else if(b.endsWith("vw")){var R=I/this.window.innerWidth*100;I="".concat(R,"vw")}else if(b.endsWith("vh")){var Z=I/this.window.innerHeight*100;I="".concat(Z,"vh")}}var H={width:this.createSizeForCssProperty(j,"width"),height:this.createSizeForCssProperty(I,"height")};this.flexDir==="row"?H.flexBasis=H.width:this.flexDir==="column"&&(H.flexBasis=H.height);var B=this.state.width!==H.width,K=this.state.height!==H.height,V=this.state.flexBasis!==H.flexBasis,W=B||K||V;W&&zn.flushSync(function(){n.setState(H)}),this.props.onResize&&W&&this.props.onResize(s,h,this.resizable,k)}},t.prototype.onMouseUp=function(s){var n,a,i=this.state,o=i.isResizing,l=i.direction;i.original,!(!o||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(s,l,this.resizable,this.delta),this.props.size&&this.setState({width:(n=this.props.size.width)!==null&&n!==void 0?n:"auto",height:(a=this.props.size.height)!==null&&a!==void 0?a:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Fe(Fe({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(s){var n,a;this.setState({width:(n=s.width)!==null&&n!==void 0?n:"auto",height:(a=s.height)!==null&&a!==void 0?a:"auto"})},t.prototype.renderResizer=function(){var s=this,n=this.props,a=n.enable,i=n.handleStyles,o=n.handleClasses,l=n.handleWrapperStyle,c=n.handleWrapperClass,d=n.handleComponent;if(!a)return null;var u=Object.keys(a).map(function(f){return a[f]!==!1?r.jsx(pc,{direction:f,onResizeStart:s.onResizeStart,replaceStyles:i&&i[f],className:o&&o[f],children:d&&d[f]?d[f]:null},f):null});return r.jsx("div",{className:c,style:l,children:u})},t.prototype.render=function(){var s=this,n=Object.keys(this.props).reduce(function(o,l){return bc.indexOf(l)!==-1||(o[l]=s.props[l]),o},{}),a=Fe(Fe(Fe({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(a.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return r.jsxs(i,Fe({style:a,className:this.props.className},n,{ref:function(o){o&&(s.resizable=o)},children:[this.state.isResizing&&r.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t})(m.PureComponent);const vc=({side:e,className:t})=>{const s=e===nt.Left,n=s?_.IconChevronLeft:_.IconChevronRight;return r.jsx("div",{className:t,children:r.jsx(n,{className:ne("h-full",s&&"-ml-6")})})},yc=({side:e,isResizing:t,customHandler:s,handlerClassName:n})=>{const a=S.mergeClasses("invisible h-full w-0.5 group-hover:visible bg-accent-primary text-accent-primary cursor-col-resize transition-opacity",t&&"visible",n),i=r.jsx(vc,{side:e,className:a});return s?r.jsx("div",{className:a,children:s}):i},sa=({children:e,minWidth:t,maxWidth:s,width:n,defaultWidth:a,onResizeStop:i,onResize:o,side:l=nt.Right,resizeHandlerClassName:c,resizeHandler:d})=>{const[u,f]=m.useState(!1),[h,p]=m.useState(a),g=n!==void 0,b=g?n:h,x=m.useRef(null),v=m.useCallback(()=>{f(!0)},[]),y=m.useCallback(()=>{f(!1);const j=x.current?.resizable?.getBoundingClientRect(),N=j?Math.round(j.width):t;g||p(N),i?.(N)},[i,g,t]),I=m.useMemo(()=>{const j=l===nt.Left,N=r.jsx(yc,{side:l,isResizing:u,customHandler:d,handlerClassName:c});return{size:g?{width:b,height:"100%"}:void 0,defaultSize:g?void 0:{width:b,height:"100%"},minWidth:t,maxWidth:s,enable:{left:j,right:!j},handleClasses:{right:"group",left:"group"},handleStyles:{right:{right:"-8px",zIndex:10},left:{left:0,zIndex:10}},handleComponent:{left:j?N:void 0,right:j?void 0:N},onResizeStart:v,onResize:(w,A,D)=>{const L=Math.round(D.offsetWidth);o?.(L)},onResizeStop:y}},[l,g,b,t,s,d,c,u,v,y,o]);return r.jsx(ra,{ref:x,...I,children:r.jsx("div",{className:"group flex size-full flex-col bg-layer-3 divide-y divide-tertiary transition-all",children:e})})},Sc=({enabled:e=!0,children:t,...s})=>e?r.jsx(sa,{...s,children:t}):t;var ft=(e=>(e.Default="default",e.Text="text",e.Circular="circular",e.Rectangular="rectangular",e))(ft||{}),Ft=(e=>(e.Small="small",e.Default="default",e.Large="large",e))(Ft||{}),pr=(e=>(e.Circle="circle",e.Square="square",e))(pr||{});const Ic=e=>{if(typeof e=="number")return e;switch(e){case Ft.Small:return 32;case Ft.Large:return 64;case Ft.Default:default:return 40}},Nc=({active:e=!0,paragraph:t=!0,avatar:s=!1,showTitle:n=!0,loading:a=!0,children:i,variant:o=ft.Default,width:l,height:c,overlay:d,color:u,className:f,...h})=>{if(!a&&i)return r.jsx(r.Fragment,{children:i});const p=S.mergeClasses("bg-layer-raised",e&&"animate-pulse",f);if(o!==ft.Default){const E=S.mergeClasses(p,o===ft.Circular&&"rounded-full",o===ft.Rectangular&&"rounded",o===ft.Text&&"rounded",!!d&&"relative"),T={};return l&&(T.width=typeof l=="number"?`${l}px`:l),c&&(T.height=typeof c=="number"?`${c}px`:c),u&&(T.backgroundColor=u),r.jsx("div",{className:E,style:T,...h,children:d&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:d})})}const g=!!s,b=!!n,x=!!t,v=typeof s=="object"?s:{},y=typeof n=="object"?n:{},I=typeof t=="object"?t:{},j=Ic(v.size),N=v.shape??pr.Circle,w=y.width??"38%",A=I.rows??3,D=I.width,L=E=>D?Array.isArray(D)?D[E]??"100%":D:E===A-1?"61%":"100%";return r.jsxs("div",{...h,className:S.mergeClasses("flex gap-4",!!d&&"relative",f,C.DIAL_KIT_CLASS.skeleton),children:[g&&r.jsx("div",{className:S.mergeClasses(p,N===pr.Circle?"rounded-full":"rounded","flex-shrink-0"),style:{width:j,height:j,...u&&{backgroundColor:u}}}),r.jsxs("div",{className:"flex-1 flex flex-col gap-3",children:[b&&r.jsx("div",{className:S.mergeClasses(p,"h-4 rounded"),style:{width:w,...u&&{backgroundColor:u}}}),x&&r.jsx("div",{className:"flex flex-col gap-3",children:Array.from({length:A}).map((E,T)=>r.jsx("div",{className:S.mergeClasses(p,"h-4 rounded"),style:{width:L(T),...u&&{backgroundColor:u}}},T))})]}),d&&r.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:d})]})};var at=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(at||{}),ht=(e=>(e.Default="default",e.Inline="inline",e))(ht||{}),hr=(e=>(e.Mobile="mobile",e.Tablet="tablet",e))(hr||{});const Pt=({tab:e,active:t,invalid:s,className:n,horizontal:a,view:i=ht.Default,onClick:o})=>{const l=i===ht.Inline,c=S.mergeClasses("rounded h-[38px] items-center flex flex-row border-transparent cursor-pointer dial-small-text hover:text-accent-primary",{"border-b-2 px-4":a,"border-l-2 px-3":!a},{"bg-layer-4":a,"bg-layer-1 text-secondary pointer-events-none":e.disabled,"bg-accent-primary-alpha text-primary":t&&!e.disabled,"text-primary":!t&&!e.disabled,"border-b-accent-primary":t&&a&&!e.disabled,"border-l-accent-primary":t&&!a&&!e.disabled}),d=S.mergeClasses("flex flex-row gap-1 h-6 items-center py-1 px-2 rounded cursor-pointer hover:bg-accent-primary-alpha",t?"dial-small-semi-text":"dial-small-text",{"text-secondary pointer-events-none":e.disabled,"bg-accent-primary-alpha text-primary":t&&!e.disabled,"text-secondary":!t&&!e.disabled}),u=S.mergeClasses(l?d:c,n);return r.jsxs("button",{role:"tab","aria-selected":t,className:u,onClick:()=>o(e.id),disabled:e.disabled,children:[l&&t&&!e.disabled&&r.jsx(_.IconCheck,{size:P.DIAL_ICON_SIZE.SM}),r.jsx(C.DialEllipsisTooltip,{text:e.label,contentClassName:"max-w-[200px]",className:"max-w-[200px]"}),(s||e.invalid)&&r.jsx("div",{className:"text-error pl-1",children:r.jsx(_.IconExclamationCircle,{...P.BASE_ICON_PROPS})}),e.warning&&r.jsx("div",{className:"text-warning pl-1",children:r.jsx(_.IconAlertTriangle,{...P.BASE_ICON_PROPS})})]})},jc=()=>{const[e,t]=m.useState(()=>typeof window>"u"?C.ScreenType.Desktop:C.getScreenType());return m.useEffect(()=>{t(C.getScreenType());const s=()=>t(C.getScreenType());return window.addEventListener("resize",s),()=>window.removeEventListener("resize",s)},[]),e},Dc=12,wc=({tabs:e,activeTab:t,onClick:s,className:n,orientation:a=at.Horizontal,view:i=ht.Default,screenThreshold:o=hr.Tablet,smallScreenContainerClassName:l,smallScreenDropdownItemClassName:c,desktopDropdownClassName:d,desktopTabClassName:u,inlineContainerClassName:f,inlineTabClassName:h})=>{const[p,g]=m.useState(!1),[b,x]=m.useState(!1),[v,y]=m.useState(!1),I=jc(),j=I===C.ScreenType.Mobile||o===hr.Tablet&&I===C.ScreenType.Tablet,N=a===at.Horizontal,w=m.useRef(null),A=m.useRef(null),D=m.useRef(null),L=e.find(R=>R.id===t),E=m.useMemo(()=>S.mergeClasses("flex gap-2",N?"flex-row flex-nowrap overflow-x-auto":"flex-col flex-wrap w-full"),[N]),T=m.useCallback(()=>{const R=A.current;R&&y(R.scrollWidth>R.clientWidth)},[]),k=m.useCallback(()=>{const R=D.current,Z=A.current;if(!R||!Z)return;const H=R.getBoundingClientRect(),B=Z.getBoundingClientRect();if(H.width===0||B.width===0)return;const K=Dc;let V=Z.scrollLeft;if(H.left<B.left+K)V-=B.left+K-H.left;else if(H.right>B.right-K)V+=H.right-(B.right-K);else return;const W=Math.max(0,Z.scrollWidth-Z.clientWidth);V=Math.max(0,Math.min(V,W)),V!==Z.scrollLeft&&Z.scrollTo({left:V,behavior:"smooth"})},[]),z=m.useCallback(R=>{s(R),R===t&&k()},[s,t,k]);return m.useEffect(()=>{T();const R=new ResizeObserver(()=>T()),Z=A.current;return Z&&R.observe(Z),()=>R.disconnect()},[e,T]),m.useEffect(()=>{k()},[t,k]),i===ht.Inline?r.jsx("div",{role:"tablist",className:S.mergeClasses("flex flex-row items-center gap-0.5 bg-layer-4 rounded w-fit p-0.5",f),children:e.map(R=>r.jsx(Pt,{tab:R,active:t===R.id,view:ht.Inline,onClick:z,className:h},R.id))}):j?r.jsx("div",{role:"tablist",className:S.mergeClasses("h-11 flex items-center bg-layer-3 px-4",l),children:r.jsx(C.DialDropdown,{trigger:[C.DropdownTrigger.Click],open:p,onOpenChange:g,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],renderOverlay:()=>e.map(R=>r.jsx(Pt,{tab:R,active:R.id===t,onClick:Z=>{z(Z),g(!1)},className:S.mergeClasses("w-full rounded-none h-11 items-center px-6",c)},R.id)),children:r.jsxs("div",{className:"flex gap-2 items-center h-11 cursor-pointer",children:[r.jsx(Pt,{tab:L,active:!0,onClick:z,className:"rounded-none bg-transparent border-l-0 border-b-0 h-full items-center px-0"},t),r.jsx(C.DialIcon,{icon:r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.SM}),className:S.mergeClasses("text-primary transition-transform",p&&"rotate-180")})]})})}):r.jsxs("div",{ref:w,className:S.mergeClasses("flex items-center",n),children:[r.jsx("div",{ref:A,role:"tablist",className:E,children:e.map(R=>r.jsx("div",{ref:t===R.id?D:void 0,className:"w-full",children:r.jsx(Pt,{tab:R,active:t===R.id,onClick:z,horizontal:N,className:S.mergeClasses("w-full",u)})},R.id))}),v&&r.jsx("div",{className:"flex items-center ml-2",children:r.jsx(C.DialDropdown,{trigger:[C.DropdownTrigger.Click],open:b,onOpenChange:x,placement:"bottom-end",renderOverlay:()=>e.map(R=>r.jsx(Pt,{tab:R,active:R.id===t,onClick:Z=>{z(Z),x(!1)},className:"w-full rounded-none h-8 items-center px-3 py-2"},R.id)),children:r.jsx(ot,{iconBefore:r.jsx(_.IconDotsVertical,{size:P.BASE_ICON_SIZE}),className:S.mergeClasses("w-8 h-8 flex items-center justify-center rounded border",b?"bg-layer-4 border-transparent":"border-primary",d)})})})]})},na="w-full overflow-hidden",aa="flex flex-nowrap items-center gap-2 min-w-0 px-0 py-0 whitespace-nowrap",mr="flex items-center gap-2 dial-small-text",Zr={first:"shrink-0",middle:"shrink min-w-0 max-w-[30%]",last:"shrink min-w-0 max-w-[51%]"},is="flex flex-1 items-center gap-1 min-w-0 transition-colors",Lc="text-secondary hover:text-accent-primary",ia="text-primary cursor-default",Ss="flex-none inline-flex items-center leading-none text-secondary",Tc="items-center gap-1 min-w-0 transition-colors text-secondary hover:text-accent-primary",oa=r.jsx(_.IconChevronRight,{size:P.DIAL_ICON_SIZE.SM,"aria-hidden":"true"}),zt=({label:e,href:t,onClick:s,disabled:n,isLast:a,isFirst:i,separator:o=oa,className:l,iconBefore:c,labelClassName:d,onBeforeNavigate:u,...f})=>{const h=async y=>{if(u&&!a&&!await u()){y.preventDefault();return}s&&s(y)},p=a?Zr.last:i?Zr.first:Zr.middle,g=S.mergeClasses(mr,p,l),b=(!!t||!!s)&&!a&&!n,x=b?S.mergeClasses(is,Lc):S.mergeClasses(is,ia,n?"pointer-events-none opacity-75":""),v=typeof e=="string"?r.jsx(C.DialEllipsisTooltip,{className:S.mergeClasses("cursor-pointer",d),text:e,id:"breadcrumb-item-content"}):r.jsx("span",{className:S.mergeClasses("flex-1 min-w-0 truncate cursor-pointer max-w-[300px]",d),"aria-label":"breadcrumb-item-content",children:e});return r.jsxs("li",{...f,className:g,"aria-label":f["aria-label"]||"breadcrumb-item",children:[b?r.jsxs("a",{href:t,onClick:h,className:x,children:[c,v]}):r.jsxs("span",{className:x,"aria-current":a?"page":void 0,"aria-disabled":n?"true":void 0,children:[c,v]}),!a&&r.jsx("span",{className:Ss,"aria-label":"separator",children:o})]})},Ec=({pathItems:e,separator:t=oa,ariaLabel:s="Breadcrumb",className:n,children:a,labelClassName:i,onBeforeNavigate:o})=>{const l=m.useMemo(()=>e?.length?e:m.Children.toArray(a).filter(m.isValidElement).map(u=>{const f=u.props,{labelClassName:h,isLast:p,separator:g,...b}=f;return b}),[e,a]),c=m.useCallback(async u=>{const f=parseInt(u.key,10),h=l[f];if(o&&!await o()){u.domEvent.preventDefault();return}h.onClick?h.onClick(u.domEvent):h.href&&(window.location.href=h.href)},[l,o]),d=m.useMemo(()=>{if(l.length===0)return null;if(l.length<=3)return l.map((b,x)=>m.createElement(zt,{...b,key:`item-${x}`,isFirst:x===0&&l.length>1,isLast:x===l.length-1,separator:t,labelClassName:i,onBeforeNavigate:o}));const u=l.at(0),f=l.slice(1,-2),h=l.at(-2),p=l.at(-1);if(!u||!h||!p)return null;const g=f.map((b,x)=>({key:String(x+1),label:typeof b.label=="string"?b.label:`Item ${x+1}`,disabled:b.disabled}));return r.jsxs(r.Fragment,{children:[m.createElement(zt,{...u,key:"item-0",isFirst:!0,separator:t,labelClassName:i,onBeforeNavigate:o}),r.jsxs("li",{className:S.mergeClasses(mr,"shrink-0"),children:[r.jsx(C.DialDropdown,{items:g,onItemClick:c,placement:"bottom-start",matchReferenceWidth:!1,children:r.jsx("button",{type:"button","aria-label":"More breadcrumbs",className:Tc,children:r.jsx(_.IconDots,{size:P.DIAL_ICON_SIZE.SM})})}),r.jsx("span",{className:Ss,children:t})]}),m.createElement(zt,{...h,key:`item-${l.length-2}`,separator:t,labelClassName:i,onBeforeNavigate:o}),m.createElement(zt,{...p,key:`item-${l.length-1}`,isLast:!0,separator:t,labelClassName:i,onBeforeNavigate:o})]})},[l,t,i,c,o]);return r.jsx("nav",{"aria-label":s,className:S.mergeClasses(na,n),children:r.jsx("ol",{className:aa,children:d})})},Is=(e,t)=>({appearance:n,...a})=>r.jsx(ot,{...a,variant:e,appearance:n||t}),la=(e,t)=>({variant:n,...a})=>r.jsx(ot,{...a,variant:n||t,appearance:e}),Jt=Is(O.ButtonVariant.Primary,O.ButtonAppearance.Solid),Qt=Is(O.ButtonVariant.Neutral,O.ButtonAppearance.Outlined),ca=Is(O.ButtonVariant.Danger,O.ButtonAppearance.Outlined),Oc=la(O.ButtonAppearance.Link,O.ButtonVariant.Primary),Ns=la(O.ButtonAppearance.Ghost,O.ButtonVariant.Primary),Lr=({iconClassName:e,label:t,...s})=>t?r.jsx(ca,{...s,label:t,appearance:O.ButtonAppearance.Ghost,iconBefore:r.jsx(_.IconTrashX,{...P.BASE_ICON_PROPS,className:e||""})}):r.jsx(C.DialDangerIconButton,{...s,appearance:O.ButtonAppearance.Ghost,icon:r.jsx(_.IconTrashX,{...P.BASE_ICON_PROPS,className:e||""})}),Ac=({className:e="",value:t,onChange:s,error:n,containerClassName:a,resize:i=!1,labelProps:o,caption:l,id:c,...d})=>{const u=S.mergeClasses("dial-textarea dial-input px-3 py-2",d.invalid&&"dial-input-error",d.disabled&&"dial-input-disable",i?"resize":"resize-none",e);return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-y-1",a),children:[o&&r.jsx(ze.DialLabel,{...o,htmlFor:c}),r.jsx("textarea",{id:c,value:t||"",className:u,onChange:f=>s?.(f.currentTarget.value),...d}),r.jsx(Se,{text:n}),!n&&r.jsx(Xt,{text:l})]})},_c="inline-flex items-center rounded bg-layer-3",kc="flex flex-1 items-center justify-center gap-2 h-7 px-3 py-1 border border-primary dial-small-text whitespace-nowrap focus-visible:outline outline-offset-0 focus-visible:relative focus-visible:z-10",Rc="relative z-10 bg-controls-accent-primary-alpha-active text-primary",Mc="text-secondary hover:text-primary",Pc="text-controls-disable-accent cursor-not-allowed hover:text-controls-disable-accent",zc=({options:e,value:t,onChange:s,disabled:n,className:a,ariaLabel:i})=>{const o=m.useCallback(l=>{if(n)return;const c=e.filter(h=>!h.disabled);if(c.length===0)return;const d=c.findIndex(h=>h.value===t);let u=null;switch(l.key){case"ArrowRight":case"ArrowDown":u=(d+1)%c.length;break;case"ArrowLeft":case"ArrowUp":u=(d-1+c.length)%c.length;break;case"Home":u=0;break;case"End":u=c.length-1;break;default:return}l.preventDefault();const f=c[u];f&&f.value!==t&&s(f.value)},[n,e,t,s]);return r.jsx("div",{role:"tablist","aria-label":i,className:S.mergeClasses(_c,a),children:e.map((l,c)=>{const d=l.value===t,u=c===0,f=c===e.length-1,h=n||l.disabled;return r.jsxs("button",{type:"button",role:"tab","aria-selected":d,tabIndex:d?0:-1,disabled:h,onClick:()=>s(l.value),onKeyDown:o,className:S.mergeClasses(kc,!f&&"-mr-px",u&&"rounded-l",f&&"rounded-r",d?Rc:Mc,h&&Pc),children:[l.icon,l.label]},l.value)})})};var De=(e=>(e.Sm="sm",e.Md="md",e.Lg="lg",e))(De||{});const Bc="z-popup flex items-center justify-center bg-blackout md:p-4",an="divide-tertiary divide-y",Fc="flex flex-row justify-between py-4 px-6 items-center",Hc={[De.Sm]:"dial-sm-popup",[De.Md]:"dial-md-popup",[De.Lg]:"dial-lg-popup"},Tr=({open:e=!1,header:t,portalId:s,className:n,overlayClassName:a,titleClassName:i,headerClassName:o,dividers:l=!0,dividerFooter:c=!0,children:d,footer:u,onClose:f,size:h=De.Md,hideClose:p=!1,closeOnOutsideClick:g=!0,preventKeyboardOnOpen:b=!1})=>{const x=m.useRef(null),{refs:v,context:y}=J.useFloating({open:e,onOpenChange:D=>{D||f?.(null)}}),I=J.useRole(y,{role:"dialog"}),j=J.useDismiss(y,{outsidePress:g}),{getFloatingProps:N}=J.useInteractions([I,j]);if(!e)return null;const w=typeof t=="string"?"dial-popup-heading":void 0,A=D=>D?typeof D=="string"?r.jsx("h3",{id:w,className:ne("flex-1 min-w-0 mr-3 truncate dial-h3-text text-primary",i),children:r.jsx(O.DialTooltip,{tooltip:D,children:D})}):D:r.jsx("span",{});return r.jsx(J.FloatingPortal,{id:s,children:r.jsx(J.FloatingOverlay,{className:ne(Bc,a),children:r.jsx(J.FloatingFocusManager,{context:y,initialFocus:b?x:v.floating,children:r.jsxs("div",{ref:v.setFloating,...N(),role:"dialog","aria-modal":"true","aria-labelledby":w,className:ne("dial-popup",Hc[h],l&&an,n),children:[b&&r.jsx("div",{ref:x,tabIndex:-1,"aria-hidden":!0,className:"absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"}),r.jsxs("div",{className:S.mergeClasses(Fc,o),children:[A(t),!p&&r.jsx(C.DialCloseButton,{size:P.DIAL_ICON_SIZE.SM,ariaLabel:"Close dialog",onClose:D=>f?.(D)})]}),r.jsx("div",{className:"grow overflow-auto","aria-label":"popup-description",children:d}),c&&!u&&r.jsx("div",{className:an}),u]})})})})};var Je=(e=>(e.Info="info",e.Danger="danger",e))(Je||{});const $c="flex justify-end gap-2 px-6 py-4 border-t border-tertiary",Vc="text-secondary dial-small-text px-6 pb-4",Kc="Cancel",Wc="Ok",Gr={[Je.Info]:{confirm:{variant:O.ButtonVariant.Primary,appearance:O.ButtonAppearance.Solid},cancel:{variant:O.ButtonVariant.Neutral,appearance:O.ButtonAppearance.Outlined}},[Je.Danger]:{container:"dial-danger-popup",confirm:{variant:O.ButtonVariant.Danger,appearance:O.ButtonAppearance.Solid},cancel:{variant:O.ButtonVariant.Neutral,appearance:O.ButtonAppearance.Outlined}}},Zc=({header:e,description:t,descriptionClassName:s,open:n=!1,confirmLabel:a=Wc,cancelLabel:i=Kc,isLoading:o=!1,disableConfirmButton:l=!1,className:c,confirmClassName:d,onClose:u,onConfirm:f,onCancel:h,children:p,dividers:g=!1,variant:b=Je.Info,size:x=De.Sm,footer:v,hideClose:y})=>{const I=o?null:r.jsxs("div",{className:$c,children:[r.jsx(Qt,{label:i,onClick:()=>h?h():u?.()}),r.jsx(ot,{variant:Gr[b].confirm?.variant,appearance:Gr[b].confirm?.appearance,className:d,label:a,disabled:l,onClick:()=>f()})]}),j=m.useCallback(()=>o?r.jsx("div",{className:"px-6 py-4 h-[120px]",children:r.jsx(lt,{size:40})}):p??(t?r.jsx("div",{className:ne(Vc,s),children:t}):null),[p,t,o,s]);return r.jsx(Tr,{open:n,header:e,className:ne(Gr[b].container,c),dividers:g,onClose:()=>u?.(),footer:v??I,size:x,hideClose:y??(!o&&v===void 0),children:j()})},Ur=8,Gc=24,da=({initialTags:e=[],label:t,required:s,elementId:n,placeholder:a,captionDescription:i,errorText:o,invalid:l,disabled:c,collapseTagOverflow:d=!1,readOnly:u=!1,containerClassName:f,tagClassName:h,onChange:p})=>{const g=m.useRef(null),b=m.useRef([]),x=m.useRef(null),[v,y]=m.useState(e),[I,j]=m.useState(""),[N,w]=m.useState(!1),[A,D]=m.useState(e.length),L=m.useCallback(B=>K=>{b.current[B]=K},[]),E=m.useCallback(()=>{if(!d)return;const B=g.current;if(!B)return;const K=B.offsetWidth;if(K===0)return;const V=x.current?.offsetWidth??0,oe=K-(u?0:Gc)-Ur;let X=0,le=0;for(let G=0;G<v.length;G++){const ee=b.current[G];if(!ee)continue;const ae=ee.offsetWidth+Ur;if(X+ae>oe)break;X+=ae,le++}if(le<v.length&&le>0)for(;X+V>oe&&le>0;){le--;const G=b.current[le]?.offsetWidth??0;X-=G+Ur}D(le)},[d,u,v.length]),T=B=>{const K=B.trim().replace(/,$/,"");if(K&&!v.includes(K)){const V=[K,...v];y(V),p?.(V)}},k=B=>{(B.key===","||B.key==="Enter")&&(B.preventDefault(),T(I),j(""))},z=()=>{I.trim()&&(T(I),j(""))},R=B=>{const K=v.filter((V,W)=>W!==B);y(K),p?.(K)},Z=()=>o?r.jsx(Se,{text:o}):i?r.jsx(Xt,{text:i}):null;m.useEffect(()=>{if(d)return;const B=new ResizeObserver(()=>{if(g.current){const K=g.current.scrollHeight>g.current.clientHeight+10;w(K)}});return g.current&&B.observe(g.current),()=>B.disconnect()},[v,d]),m.useEffect(()=>{if(!d){D(v.length);return}D(v.length);const B=new ResizeObserver(()=>{E()}),K=g.current;return K&&B.observe(K),E(),()=>B.disconnect()},[d,E,v]),m.useEffect(()=>{y(e)},[JSON.stringify(e)]);const H=r.jsxs("div",{ref:g,className:ne("flex gap-2 items-center relative",d?"flex-nowrap overflow-hidden w-full min-w-0":ne("flex-wrap",N?"flex-col-reverse":"flex-row"),f),children:[(d?v.slice(0,A):v).map((B,K)=>r.jsx(pt,{label:B,className:h,closable:!c&&!u,onRemove:!c&&!u?()=>R(K):void 0},B+K)),d&&A<v.length&&r.jsx(O.DialTooltip,{tooltip:v.slice(A).join(", "),triggerClassName:"inline-flex shrink-0 cursor-pointer",children:r.jsx(pt,{label:`+${v.length-A}`})}),!u&&r.jsx("input",{id:n,type:"text",value:I,onChange:B=>j(B.target.value),onKeyDown:k,onBlur:z,className:ne("dial-input outline-hidden !border-none w-full flex-1 !p-1 !h-auto",d?"min-w-0":"min-w-[100px]"),placeholder:a??"",disabled:c}),d&&r.jsxs("div",{className:"absolute left-0 top-0 invisible pointer-events-none h-0 overflow-hidden whitespace-nowrap","aria-hidden":!0,children:[v.map((B,K)=>r.jsx("div",{ref:L(K),className:"inline-flex shrink-0",children:r.jsx(pt,{label:B,className:h,closable:!c&&!u,onRemove:!c&&!u?()=>R(K):void 0})},`measure-${B}-${K}`)),r.jsx("div",{ref:x,className:"inline-flex shrink-0",children:r.jsx(pt,{label:`+${v.length}`})})]})]});return u?H:r.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[r.jsx(ze.DialLabel,{label:t,required:s,htmlFor:n}),r.jsx("div",{className:ne("dial-input min-h-[38px] p-[6px]",l&&"dial-input-error",c&&"dial-input-disable"),children:H}),Z()]})},ua=({selectedItems:e,placeholder:t,collapseTagOverflow:s=!1,listClassName:n,listElementClassName:a})=>e?.length?r.jsx(da,{readOnly:!0,initialTags:e,collapseTagOverflow:s,containerClassName:n,tagClassName:a}):t?r.jsx("span",{className:"text-secondary",children:t}):null,qr=e=>te.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},te.createElement("path",{d:"M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z",fill:"currentColor"})),fa=({children:e,open:t,disabled:s=!1,selectedValue:n,valueClassName:a,inputClassName:i,onOpen:o,elementId:l,errorText:c,invalid:d,emptyValueText:u,placeholder:f,editable:h=!1,onValueChange:p,collapseTagOverflow:g=!1,iconBefore:b})=>{const x=Array.isArray(n)&&n.length>0,v=typeof n=="string"&&!!n.trim(),y=x||v?n:f?void 0:u,I=s?void 0:o,j=m.useCallback(D=>{p?.(D.target.value)},[p]),N=()=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:ne("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between",i,s&&"dial-input-disable",(c||d)&&"dial-input-error"),children:[r.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[b&&r.jsx(C.DialIcon,{icon:b}),r.jsx("input",{type:"text",className:ne("flex-1 min-w-0 bg-transparent outline-hidden border-none p-0 dial-small-text text-primary placeholder:text-secondary",a),value:typeof n=="string"?n:"",placeholder:f||u,onChange:j,disabled:s,id:l,"aria-label":"input-popup-field"})]}),!s&&r.jsx("button",{type:"button",className:"shrink-0 cursor-pointer bg-transparent border-none p-0 ml-1",onClick:o,"aria-label":"open-popup",children:r.jsx(C.DialIcon,{icon:r.jsx(qr,{role:"img",width:P.BASE_ICON_SIZE,height:P.BASE_ICON_SIZE})})})]}),r.jsx(Se,{text:c})]}),w=()=>r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"w-full",onClick:I,"aria-label":"open-popup",id:l,children:r.jsxs("div",{className:ne("dial-input px-3 py-2 dial-input-field flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",i,s&&"dial-input-disable",(c||d)&&"dial-input-error"),children:[r.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[b&&r.jsx(C.DialIcon,{icon:b}),r.jsx(O.DialTooltip,{tooltip:y==null?void 0:String(y),children:y||!f?r.jsx("span",{className:a,children:y}):r.jsx("span",{className:"text-secondary",children:f})})]}),!s&&r.jsx("div",{className:"shrink-0",children:r.jsx(C.DialIcon,{icon:r.jsx(qr,{role:"img",width:P.BASE_ICON_SIZE,height:P.BASE_ICON_SIZE})})})]})}),r.jsx(Se,{text:c})]}),A=()=>r.jsx("div",{className:"w-full",onClick:I,children:r.jsxs("div",{className:ne("dial-input px-3 py-2 flex flex-row items-center gap-x-2 w-full justify-between cursor-pointer",s&&"dial-input-disable"),children:[r.jsxs("div",{className:"flex flex-row items-center gap-x-2 flex-1 min-w-0",children:[b&&r.jsx(C.DialIcon,{icon:b}),r.jsx(ua,{placeholder:f,selectedItems:y,collapseTagOverflow:g})]}),!s&&r.jsx("div",{className:"ml-1",children:r.jsx(C.DialIcon,{icon:r.jsx(qr,{role:"img",width:P.BASE_ICON_SIZE,height:P.BASE_ICON_SIZE})})})]})});return r.jsxs(r.Fragment,{children:[x?A():h?N():w(),t&&zn.createPortal(e,document.body)]})},Uc=({label:e,htmlFor:t,disabled:s,selectedValue:n,radioButtons:a,customInputValue:i,valueClassName:o,inputClassName:l,emptyValueText:c,placeholder:d,onClose:u,header:f,portalId:h,onApply:p,onCancel:g,cancelButtonTitle:b="Cancel",applyButtonTitle:x="Apply",isValid:v,selectedRadioValue:y,onChangeRadioField:I,id:j,size:N=De.Md})=>{const[w,A]=m.useState(!1),D=m.useCallback(()=>{s||A(!0)},[s]),L=m.useCallback(()=>{A(!1),u?.()},[u]),E=m.useCallback(()=>{g?.(),L()},[g,L]),T=m.useCallback(()=>{p(),L()},[p,L]);return r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx(ze.DialLabel,{label:e,htmlFor:t}),r.jsx(fa,{disabled:s,open:w,selectedValue:i??a.find(k=>k.id===n)?.name,valueClassName:o,inputClassName:ne(l,"py-2","px-3"),emptyValueText:c,placeholder:d,onOpen:D,children:r.jsx(Tr,{open:w,onClose:E,header:f,portalId:h,size:N,footer:r.jsxs("div",{className:"flex flex-row items-center justify-end gap-2 px-6 py-4",children:[r.jsx(Qt,{label:b,onClick:E}),r.jsx(Jt,{label:x,onClick:T,disabled:!v})]}),children:r.jsx("div",{className:"px-6 py-4",children:r.jsx(Vn,{radioButtons:a,labelClassName:"dial-small-text",activeRadioButton:y,onChange:I,elementId:j,orientation:Ae.Column})})})})]})},qc="Create",Yc="Cancel",Xc="flex items-center justify-end gap-2 px-6 py-3",Jc=({header:e,open:t=!1,submitLabel:s=qc,cancelLabel:n=Yc,isLoading:a=!1,disableSubmitButton:i=!1,className:o,submitClassName:l,onClose:c,onSubmit:d,onCancel:u,children:f,dividers:h=!0,size:p=De.Md,footer:g})=>{const b=a?null:r.jsxs("div",{className:Xc,children:[r.jsx(Qt,{label:n,onClick:()=>u?u():c?.()}),r.jsx(Jt,{className:l,label:s,disabled:i,onClick:()=>d()})]}),x=m.useCallback(()=>a?r.jsx("div",{className:"px-6 py-4 h-[120px]",children:r.jsx(lt,{size:50})}):f??null,[f,a]);return r.jsx(Tr,{open:t,header:e,className:o,dividers:h,onClose:()=>c?.(),footer:g??b,size:p,children:x()})},Qc="bg-layer-4 flex items-center justify-center enabled:text-secondary enabled:hover:text-accent-primary enabled:active:bg-controls-accent-primary-alpha-active enabled:hover:bg-accent-primary-alpha enabled:active:text-accent-primary",e1=({icon:e,onClick:t,disabled:s,size:n=O.ElementSize.Standard,className:a})=>r.jsx("div",{className:ne("border-l border-tertiary",n===O.ElementSize.Standard?"h-[40px] w-[44px]":"h-[24px] w-[32px]"),children:r.jsx(O.DialIconButton,{className:ne(Qc,n===O.ElementSize.Small&&"p-1",a),icon:e,onClick:t,disabled:s,size:n})}),t1=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Tab","Enter","Escape","Home","End","Insert"],pa=(e,t,s,n)=>{if((t==="number"||s!==void 0||n!==void 0)&&!t1.includes(e.key)&&!(e.ctrlKey||e.metaKey)&&!(e.key==="-"&&(e.currentTarget.selectionStart??0)===0&&!e.currentTarget.value.includes("-"))&&!(e.key==="."&&t==="number"&&!e.currentTarget.value.includes("."))){if(!/^[0-9]$/.test(e.key)){e.preventDefault();return}if(s!==void 0||n!==void 0){const i=e.currentTarget.value,o=e.currentTarget.selectionStart||0,l=i.slice(0,o)+e.key+i.slice(o),c=parseFloat(l);if(!isNaN(c)){if(s!==void 0&&c<+s){e.preventDefault();return}if(n!==void 0&&c>+n){e.preventDefault();return}}}}},Qe=({labelProps:e,error:t,caption:s,id:n,containerClassName:a,...i})=>r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-y-3",a),children:[e&&r.jsx(ze.DialLabel,{...e,htmlFor:n}),r.jsx(ha,{id:n,...i}),r.jsx(Se,{text:t}),!t&&r.jsx(Xt,{text:s})]}),ha=({invalid:e,disabled:t,prefix:s,className:n,postfix:a,iconBefore:i,iconAfter:o,wrapperClassName:l,type:c,inputRef:d,value:u,tooltipText:f,min:h,onChange:p,max:g,inputButtonProps:b,...x})=>{const v=m.useRef(null),y=J.useMergeRefs([d,v]),I=c==="number"||h!==void 0||g!==void 0;m.useEffect(()=>{const A=v.current;if(!A||!I||t)return;const D=L=>{L.preventDefault()};return A.addEventListener("wheel",D,{passive:!1}),()=>{A.removeEventListener("wheel",D)}},[t,I,c]);const j=A=>{pa(A,c,h,g)},N=A=>{const D=A.currentTarget.value;if(I&&D!==""){const L=parseFloat(D);if(isNaN(L)&&D!=="-"&&D!=="."||!isNaN(L)&&(h!==void 0&&L<+h||g!==void 0&&L>+g))return}p?.(D||void 0)},w=()=>r.jsxs("div",{className:S.mergeClasses("dial-input flex flex-row items-center gap-x-2 justify-between py-2",e&&"dial-input-error",t&&"dial-input-disable",!s&&"pl-3",!b&&"pr-3",l),"aria-label":"input-container",children:[s&&r.jsx("div",{className:"border-r border-tertiary",children:r.jsx(ha,{wrapperClassName:"!rounded-r-none",className:"truncate",value:s,disabled:!0,id:`${s}_textBefore`})}),r.jsx(C.DialIcon,{icon:i}),r.jsx("input",{ref:y,type:c,autoComplete:c==="password"?"new-password":"off",value:u??"",className:S.mergeClasses("border-0 bg-transparent w-full truncate",t&&"cursor-not-allowed",n),onChange:N,onKeyDown:j,min:h,disabled:t,max:g,...x}),a&&r.jsxs("p",{className:"text-secondary dial-small-text",children:[" ",a]}),r.jsx(C.DialIcon,{icon:o}),b&&r.jsx(e1,{...b,disabled:t})]});return t&&c!=="password"?r.jsx(O.DialTooltip,{tooltip:f||u,children:w()}):w()},r1=/^0+\.(\d+)?$/,s1=/^0+/,os=({integer:e,onChange:t,min:s,max:n,onKeyDown:a,onPaste:i,...o})=>{const l=u=>!u||u==="-"?u:String(u)?.match(r1)?String(u)?.replace(s1,"0"):Number(u),c=u=>{if([".","-","+","e","E"].includes(u.key)){u.preventDefault();return}pa(u,"number",s,n)},d=u=>{const f=u.clipboardData.getData("text"),h=f.replace(/\D/g,"");if(h!==f&&(u.preventDefault(),h)){const p=u.currentTarget,g=p.selectionStart??0,b=p.selectionEnd??0,x=p.value.slice(0,g)+h+p.value.slice(b);t?.(l(x))}};return r.jsx(Qe,{type:"number",min:s,max:n,onChange:u=>t?.(l(u)),onKeyDown:e?c:a,onPaste:e?d:i,...o})},n1=({onClick:e})=>r.jsx(_.IconEyeOff,{...P.BASE_ICON_PROPS,className:"text-primary",onClick:e,role:"button","aria-label":"hide"}),a1=({onClick:e})=>r.jsx(_.IconEye,{...P.BASE_ICON_PROPS,className:"text-primary",onClick:e,role:"button","aria-label":"show"}),ma=({...e})=>{const[t,s]=m.useState(!1),n=m.useCallback(a=>{s(a)},[]);return r.jsx(Qe,{type:t?"text":"password",...e,iconAfter:e.disabled?null:t?r.jsx(n1,{onClick:()=>n(!1)}):r.jsx(a1,{onClick:()=>n(!0)})})},ga={[O.ElementSize.Small]:{className:"dial-tiny-text",wrapperClassName:"pl-2 py-0",containerClassName:"h-[24px]",iconSize:16,iconStroke:1},[O.ElementSize.Standard]:{className:"dial-small-text",wrapperClassName:"",containerClassName:"",iconSize:20,iconStroke:1.5},[O.ElementSize.Large]:{className:"",wrapperClassName:"",containerClassName:"",iconSize:0,iconStroke:0}},xa=({size:e=O.ElementSize.Standard,placeholder:t="Search...",value:s,onChange:n,withoutBorder:a,...i})=>{const[o,l]=m.useState(s||"");m.useEffect(()=>{l(s||"")},[s]);const c=m.useCallback(h=>{l(h||""),n?.(h||"")},[n]),d=ga[e],u=m.useCallback(()=>{c("")},[c]),f=m.useMemo(()=>{if(o)return{icon:r.jsx(_.IconX,{size:d.iconSize,"aria-label":"Clear search",role:"button"}),className:a?"bg-transparent":"",onClick:u,size:e}},[u,o,e,d.iconSize,a]);return r.jsx(Qe,{placeholder:t,iconBefore:r.jsx(_.IconSearch,{size:d.iconSize,stroke:d.iconStroke}),value:o,onChange:c,inputButtonProps:f,containerClassName:d.containerClassName,className:d.className,wrapperClassName:S.mergeClasses(d.wrapperClassName,a?"!border-0 !ps-5 [&>div]:!border-0":""),...i})},Ca=({options:e,selectedValues:t,handleRemoveTag:s})=>r.jsx("div",{className:"flex flex-wrap w-full items-center gap-1",children:t.map(n=>{const a=e.find(o=>o.value===n)?.label??n,i=e.find(o=>o.value===n)?.icon;return r.jsx(pt,{label:a,onRemove:o=>s?.(o,n),icon:i?r.jsx(C.DialIcon,{icon:i}):null,className:"max-w-full"},n)})});var gr=(e=>(e.Sm="sm",e.Md="md",e))(gr||{}),xr=(e=>(e.Primary="Primary",e.Secondary="Secondary",e))(xr||{});const i1="dial-input flex w-full items-center justify-between gap-2 dial-small-text cursor-pointer",o1="w-full rounded flex flex-col",Ht="flex w-full items-center justify-between gap-2 px-3 h-[34px] dial-small-text text-primary truncate hover:bg-accent-primary-alpha focus:bg-accent-primary-alpha focus:outline-hidden",l1="bg-accent-primary-alpha",ls="bg-accent-primary-alpha border-l border-accent-primary",Cr="opacity-75",c1=352,d1=4,u1=r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.SM}),f1=({opt:e,selectedValues:t,onSelect:s})=>{const{isOpen:n,refs:a,floatingStyles:i,context:o,getReferenceProps:l,getFloatingProps:c}=C.useSubMenuFloating(d1,"listbox",!!e.disabled),d=e.children?.some(u=>t.includes(u.value));return r.jsxs(r.Fragment,{children:[r.jsxs("button",{ref:a.setReference,type:"button",role:"option","aria-haspopup":"listbox","aria-expanded":n,"aria-selected":!!d,"aria-disabled":!!e.disabled,disabled:e.disabled,className:ne(Ht,d&&ls,e.disabled&&Cr),...l(),children:[r.jsxs("div",{className:"flex items-center gap-2 w-full min-w-0",children:[e.icon&&r.jsx(C.DialIcon,{icon:e.icon}),r.jsx(C.DialEllipsisTooltip,{text:e.labelNode??e.label})]}),r.jsx(_.IconChevronRight,{size:14,className:"shrink-0"})]}),n&&r.jsx(C.SubMenuPanel,{refs:a,floatingStyles:i,context:o,getFloatingProps:c,role:"listbox",className:"w-max py-1",children:e.children.map(u=>{const f=t.includes(u.value);return r.jsx("button",{type:"button",role:"option","aria-selected":f,"aria-disabled":!!u.disabled,disabled:u.disabled,className:ne(Ht,f&&ls,u.disabled&&Cr),onClick:()=>!u.disabled&&s(u.value),children:r.jsxs("div",{className:"flex items-center gap-2 w-full",children:[u.icon&&r.jsx(C.DialIcon,{icon:u.icon}),r.jsx(C.DialEllipsisTooltip,{text:u.labelNode??u.label})]})},u.value)})})]})},Ke=({options:e,multiple:t=!1,elementId:s,value:n,defaultValue:a,variant:i=xr.Primary,size:o=gr.Md,prefix:l,customSelectedValue:c,placeholder:d="Select...",searchable:u=!1,searchSize:f=O.ElementSize.Standard,searchPlaceholder:h,selectAll:p=!1,invalid:g,selectAllLabel:b="Select all",emptyStateTitle:x="No options available",emptyStateDescription:v,emptyStateIcon:y,disabled:I=!1,className:j,listClassName:N,closable:w=!1,header:A,footer:D,onClose:L,onChange:E,inlineSearch:T=!1,dismissRef:k,onFooterClick:z,open:R,onOpenChange:Z,onInlineQueryChange:H,customMultiSelectTagsRenderer:B})=>{const K=m.useId(),[V,W]=m.useState(!1),oe=R!==void 0,X=oe?!!R:V,le=m.useCallback(M=>{oe||W(M),Z?.(M)},[oe,Z]),[G,ee]=m.useState(T&&c||""),ae=m.useRef(null),de=m.useCallback(M=>{M!==G&&(ee(M||""),H?.(M||""))},[H,G]),me=n!==void 0,[Ne,xe]=m.useState(a),U=me?n:Ne,Q=m.useMemo(()=>t?Array.isArray(U)?U:[]:typeof U=="string"?[U]:[],[U,t]),_e=m.useMemo(()=>{const M=G.trim().toLowerCase();return M?e.filter(ie=>ie.label.toLowerCase().includes(M)):e},[e,G]);m.useEffect(()=>{!X&&!T&&de("")},[T,X,de]);const Be=m.useRef(c);m.useEffect(()=>{T&&c!==Be.current&&(X||(Be.current=c,de(c||"")))},[c,T,X,de]);const ve=m.useCallback(M=>{me||xe(M),E?.(M)},[me,E]),Ue=m.useCallback(M=>{if(t){const ie=new Set(Q);ie.has(M)?ie.delete(M):ie.add(M),ve(Array.from(ie));return}if(ve(M),T){const ie=e.find(Le=>Le.value===M)??e.flatMap(Le=>Le.children??[]).find(Le=>Le.value===M);ie&&de(ie.label)}le(!1)},[t,ve,T,le,Q,e,de]),ct=m.useCallback((M,ie)=>{if(M.stopPropagation(),!t){ve("");return}const Le=Q.filter(Rr=>Rr!==ie);ve(Le)},[t,Q,ve]),Ce=m.useMemo(()=>_e.filter(M=>!M.disabled),[_e]),Y=m.useMemo(()=>Ce.filter(M=>Q.includes(M.value)).length,[Ce,Q]),ue=m.useCallback(M=>{T&&!t&&!M&&Ue(G),le(M)},[Ue,T,t,G,le]),{allSelectedInFiltered:fe,someSelectedInFiltered:Rt}=m.useMemo(()=>{const M=Ce.length>0&&Y===Ce.length;return{allSelectedInFiltered:M,someSelectedInFiltered:Y>0&&!M}},[Ce,Y]),St=m.useCallback(()=>{if(!(!t||Ce.length===0))if(fe){const M=new Set(Ce.map(ie=>ie.value));ve(Q.filter(ie=>!M.has(ie)))}else{const M=new Set(Q);Ce.forEach(ie=>M.add(ie.value)),ve(Array.from(M))}},[fe,t,Ce,Q,ve]),we=Q.length>0;m.useEffect(()=>{X&&T&&!t&&!I&&requestAnimationFrame(()=>{const M=ae.current;if(!M)return;M.focus();const ie=M.value?.length??0;M.setSelectionRange?.(ie,ie)})},[X,T,t,I]);const st=!t&&we?Q[0]:void 0,je=m.useMemo(()=>st?e.find(M=>M.value===st)??e.flatMap(M=>M.children??[]).find(M=>M.value===st):void 0,[e,st]),kr=m.useCallback(()=>t?we?B?.(e,Q,ct)||r.jsx(Ca,{options:e,selectedValues:Q,handleRemoveTag:ct}):r.jsx("span",{className:"text-secondary truncate",children:d}):je?r.jsxs(r.Fragment,{children:[je.icon&&r.jsx(C.DialIcon,{icon:je.icon}),r.jsx(C.DialEllipsisTooltip,{text:je.labelNode??(l?`${l} ${je.label}`:je.label)}),je?.description&&r.jsx("div",{className:"text-secondary dial-small-text",children:je.description})]}):c&&n?c:r.jsx("span",{className:"text-secondary truncate",children:d}),[we,t,c,l,n,d,je,e,Q,ct,B]);m.useImperativeHandle(k,()=>({dismiss:()=>{le(!1)}}));const It=m.useCallback(()=>{de(Q.length===1?je?.label??G:"")},[G,Q.length,de,je?.label]),dt=m.useCallback(()=>{I||(le(!X),T&&!t&&(It(),ae.current?.focus()))},[I,T,X,t,It,le]);return r.jsx(C.DialDropdown,{open:X,onOpenChange:ue,disabled:I,closable:w,onClose:L,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],maxDropdownHeight:u?null:c1,listClassName:N,renderOverlay:()=>r.jsxs("div",{id:`list-${s||K}`,role:"listbox","aria-multiselectable":t||void 0,className:o1,children:[A&&r.jsx(r.Fragment,{children:typeof A=="function"?A():A}),(u||w)&&e.length>8&&r.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[u&&r.jsx(xa,{size:f,placeholder:h,onChange:de,value:G,id:`search-${s||K}`,containerClassName:S.mergeClasses(ga[f].containerClassName,"w-full")}),w&&r.jsx(ot,{"aria-label":"Close select",className:"shrink-0",iconBefore:r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM}),onClick:M=>{L?.(M),le(!1)}})]}),t&&p&&Ce.length>0&&r.jsx("div",{className:ne(Ht,"mt-2"),children:r.jsx(ts,{id:`${s||K}-selectAll`,label:b,checked:fe,indeterminate:Rt,onChange:St,ariaLabel:b})}),r.jsx("div",{className:ne("overflow-y-auto max-h-[352px]",T&&_e.length===0?"":"py-1"),children:_e.length===0?!T&&r.jsx("div",{className:"px-2 py-3",children:r.jsx(C.DialNoDataContent,{icon:y??r.jsx(_.IconClipboardX,{size:P.DIAL_ICON_SIZE.LG,stroke:.5}),title:x,description:v})}):_e.map(M=>{const ie=Q.includes(M.value);return t?r.jsxs("div",{role:"option","aria-selected":ie,"aria-disabled":!!M.disabled,className:ne(Ht,ie&&l1,M.disabled&&Cr,"w-full"),children:[r.jsx(ts,{id:`${s||K}-${M.value}`,label:r.jsxs("span",{className:"flex w-full flex-1 pl-2 min-w-0 items-center gap-2 text-primary",children:[M.icon&&r.jsx(C.DialIcon,{icon:M.icon}),r.jsx("span",{className:"truncate",children:M.labelNode??M.label})]}),checked:ie,disabled:M.disabled,onChange:()=>!M.disabled&&Ue(M.value),ariaLabel:M.label}),M.description&&r.jsx("div",{className:"text-secondary dial-small-text",children:M.description})]},M.value):M.children?.length?r.jsx(f1,{opt:M,selectedValues:Q,onSelect:Ue},M.value):r.jsx("button",{role:"option",type:"button","aria-selected":ie,"aria-disabled":!!M.disabled,disabled:M.disabled,className:ne(Ht,ie&&ls,M.disabled&&Cr),onClick:()=>!M.disabled&&Ue(M.value),children:r.jsxs("div",{className:"flex items-center gap-2 w-full",children:[M.icon&&r.jsx(C.DialIcon,{icon:M.icon}),r.jsx(C.DialEllipsisTooltip,{text:M.labelNode??M.label}),M.description&&r.jsx("div",{className:"text-secondary dial-small-text",children:M.description})]})},M.value)})}),D&&r.jsx("div",{onClick:M=>{z?.(M),z&&le(!1)},children:typeof D=="function"?D():D})]}),children:r.jsxs("div",{role:"button",tabIndex:0,"aria-roledescription":"button to open select list","aria-haspopup":"listbox","aria-expanded":X,"aria-controls":`list-${s||K}`,className:S.mergeClasses(i1,I&&"opacity-75 !cursor-not-allowed !border-primary",o===gr.Sm?"min-h-[25px] px-1.5 py-1":"min-h-[38px] px-3 py-2",g&&"dial-input-error",i===xr.Secondary?"!bg-layer-4 !h-auto":"",j),onMouseDown:M=>{I||T&&!t&&(It(),M.preventDefault())},onClick:()=>{dt()},onKeyDown:M=>{(M.key===" "||M.code==="Space")&&(M.preventDefault(),dt())},children:[T&&!t?r.jsx("div",{className:"flex min-w-0 items-center gap-2 text-primary flex-1",children:r.jsx("input",{id:`inline-${s||K}`,type:"text",placeholder:h??d,value:G||"",onChange:M=>de(M.currentTarget.value.trimStart()),onFocus:()=>!I&&le(!0),onMouseDown:M=>{It(),M.stopPropagation()},onClick:M=>{M.stopPropagation()},onKeyDown:M=>{M.stopPropagation()},className:"bg-transparent outline-hidden w-full dial-small-text",ref:ae,disabled:I,"aria-disabled":I,autoComplete:"off"})}):r.jsx("div",{className:"flex w-full min-w-0 items-center gap-2 text-primary",children:kr()}),!T&&r.jsx(C.DialIcon,{icon:u1,className:ne("text-primary",X&&"rotate-180")})]})})},p1=({label:e,required:t,captionDescription:s,containerClassName:n,selectClassName:a,error:i,id:o,caption:l,readonly:c,value:d,defaultEmptyText:u,...f})=>{const h=m.useCallback(()=>{if(!d||Array.isArray(d)&&d.length===0)return u??"None";if(Array.isArray(d))return r.jsx(Ca,{options:f.options,selectedValues:d});{const p=f.options?.find(g=>g.value===d);return r.jsx("span",{"aria-readonly":!0,className:"text-primary",children:p?.label||d})}},[d,f.options,u]);return r.jsx(Sr,{id:o,label:e,required:t,description:l,error:i,captionDescription:s,className:n,readonly:c,value:h(),defaultEmptyText:u,children:r.jsx(Ke,{className:a,value:d,elementId:o,invalid:!!i,...f})})};function ba(e){let t=null;return()=>(t==null&&(t=e()),t)}function h1(e,t){return e.filter(s=>s!==t)}function m1(e,t){const s=new Set,n=i=>s.add(i);e.forEach(n),t.forEach(n);const a=[];return s.forEach(i=>a.push(i)),a}class g1{enter(t){const s=this.entered.length,n=a=>this.isNodeInDocument(a)&&(!a.contains||a.contains(t));return this.entered=m1(this.entered.filter(n),[t]),s===0&&this.entered.length>0}leave(t){const s=this.entered.length;return this.entered=h1(this.entered.filter(this.isNodeInDocument),t),s>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class x1{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const s={};Object.keys(this.config.exposeProperties).forEach(n=>{const a=this.config.exposeProperties[n];a!=null&&(s[n]={value:a(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,s)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,s){return s===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Er="__NATIVE_FILE__",va="__NATIVE_URL__",ya="__NATIVE_TEXT__",Sa="__NATIVE_HTML__",on=Object.freeze(Object.defineProperty({__proto__:null,FILE:Er,HTML:Sa,TEXT:ya,URL:va},Symbol.toStringTag,{value:"Module"}));function Yr(e,t,s){const n=t.reduce((a,i)=>a||e.getData(i),"");return n??s}const cs={[Er]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Sa]:{exposeProperties:{html:(e,t)=>Yr(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[va]:{exposeProperties:{urls:(e,t)=>Yr(e,t,"").split(`
|
|
2
|
+
`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[ya]:{exposeProperties:{text:(e,t)=>Yr(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function C1(e,t){const s=cs[e];if(!s)throw new Error(`native type ${e} has no configuration`);const n=new x1(s);return n.loadDataTransfer(t),n}function Xr(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(cs).filter(s=>{const n=cs[s];return n?.matchesTypes?n.matchesTypes.some(a=>t.indexOf(a)>-1):!1})[0]||null}const b1=ba(()=>/firefox/i.test(navigator.userAgent)),Ia=ba(()=>!!window.safari);class ln{interpolate(t){const{xs:s,ys:n,c1s:a,c2s:i,c3s:o}=this;let l=s.length-1;if(t===s[l])return n[l];let c=0,d=o.length-1,u;for(;c<=d;){u=Math.floor(.5*(c+d));const p=s[u];if(p<t)c=u+1;else if(p>t)d=u-1;else return n[u]}l=Math.max(0,d);const f=t-s[l],h=f*f;return n[l]+a[l]*f+i[l]*h+o[l]*f*h}constructor(t,s){const{length:n}=t,a=[];for(let p=0;p<n;p++)a.push(p);a.sort((p,g)=>t[p]<t[g]?-1:1);const i=[],o=[];let l,c;for(let p=0;p<n-1;p++)l=t[p+1]-t[p],c=s[p+1]-s[p],i.push(l),o.push(c/l);const d=[o[0]];for(let p=0;p<i.length-1;p++){const g=o[p],b=o[p+1];if(g*b<=0)d.push(0);else{l=i[p];const x=i[p+1],v=l+x;d.push(3*v/((v+x)/g+(v+l)/b))}}d.push(o[o.length-1]);const u=[],f=[];let h;for(let p=0;p<d.length-1;p++){h=o[p];const g=d[p],b=1/i[p],x=g+d[p+1]-h-h;u.push((h-g-x)*b),f.push(x*b*b)}this.xs=t,this.ys=s,this.c1s=d,this.c2s=u,this.c3s=f}}const v1=1;function Na(e){const t=e.nodeType===v1?e:e.parentElement;if(!t)return null;const{top:s,left:n}=t.getBoundingClientRect();return{x:n,y:s}}function ir(e){return{x:e.clientX,y:e.clientY}}function y1(e){var t;return e.nodeName==="IMG"&&(b1()||!(!((t=document.documentElement)===null||t===void 0)&&t.contains(e)))}function S1(e,t,s,n){let a=e?t.width:s,i=e?t.height:n;return Ia()&&e&&(i/=window.devicePixelRatio,a/=window.devicePixelRatio),{dragPreviewWidth:a,dragPreviewHeight:i}}function I1(e,t,s,n,a){const i=y1(t),l=Na(i?e:t),c={x:s.x-l.x,y:s.y-l.y},{offsetWidth:d,offsetHeight:u}=e,{anchorX:f,anchorY:h}=n,{dragPreviewWidth:p,dragPreviewHeight:g}=S1(i,t,d,u),b=()=>{let w=new ln([0,.5,1],[c.y,c.y/u*g,c.y+g-u]).interpolate(h);return Ia()&&i&&(w+=(window.devicePixelRatio-1)*g),w},x=()=>new ln([0,.5,1],[c.x,c.x/d*p,c.x+p-d]).interpolate(f),{offsetX:v,offsetY:y}=a,I=v===0||v,j=y===0||y;return{x:I?v:x(),y:j?y:b()}}class N1{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,s){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=s}}function j1(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function cn(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{},n=Object.keys(s);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(s).filter(function(a){return Object.getOwnPropertyDescriptor(s,a).enumerable}))),n.forEach(function(a){j1(e,a,s[a])})}return e}class D1{profile(){var t,s;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((t=this.dragStartSourceIds)===null||t===void 0?void 0:t.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((s=this.dragOverTargetIds)===null||s===void 0?void 0:s.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const t=this.rootElement;if(t!==void 0){if(t.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");t.__isReactDndBackendSetUp=!0,this.addEventListeners(t)}}teardown(){const t=this.rootElement;if(t!==void 0&&(t.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var s;(s=this.window)===null||s===void 0||s.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(t,s,n){return this.sourcePreviewNodeOptions.set(t,n),this.sourcePreviewNodes.set(t,s),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,s,n){this.sourceNodes.set(t,s),this.sourceNodeOptions.set(t,n);const a=o=>this.handleDragStart(o,t),i=o=>this.handleSelectStart(o);return s.setAttribute("draggable","true"),s.addEventListener("dragstart",a),s.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),s.removeEventListener("dragstart",a),s.removeEventListener("selectstart",i),s.setAttribute("draggable","false")}}connectDropTarget(t,s){const n=o=>this.handleDragEnter(o,t),a=o=>this.handleDragOver(o,t),i=o=>this.handleDrop(o,t);return s.addEventListener("dragenter",n),s.addEventListener("dragover",a),s.addEventListener("drop",i),()=>{s.removeEventListener("dragenter",n),s.removeEventListener("dragover",a),s.removeEventListener("drop",i)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourceNodeOptions.get(t);return cn({dropEffect:this.altKeyPressed?"copy":"move"},s||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),s=this.sourcePreviewNodeOptions.get(t);return cn({anchorX:.5,anchorY:.5,captureDraggingState:!1},s||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(on).some(s=>on[s]===t)}beginDragNativeItem(t,s){this.clearCurrentDragSourceNode(),this.currentNativeSource=C1(t,s),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const s=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var n;return(n=this.rootElement)===null||n===void 0?void 0:n.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},s)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,s){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(s))}handleDragEnter(t,s){this.dragEnterTargetIds.unshift(s)}handleDragOver(t,s){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(s)}handleDrop(t,s){this.dropTargetIds.unshift(s)}constructor(t,s,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=a=>{const i=this.sourceNodes.get(a);return i&&Na(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=a=>!!(a&&this.document&&this.document.body&&this.document.body.contains(a)),this.endDragIfSourceWasRemovedFromDOM=()=>{const a=this.currentDragSourceNode;a==null||this.isNodeInDocument(a)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=a=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(a||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=a=>{if(a.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const o=ir(a);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:o});const{dataTransfer:l}=a,c=Xr(l);if(this.monitor.isDragging()){if(l&&typeof l.setDragImage=="function"){const u=this.monitor.getSourceId(),f=this.sourceNodes.get(u),h=this.sourcePreviewNodes.get(u)||f;if(h){const{anchorX:p,anchorY:g,offsetX:b,offsetY:x}=this.getCurrentSourcePreviewNodeOptions(),I=I1(f,h,o,{anchorX:p,anchorY:g},{offsetX:b,offsetY:x});l.setDragImage(h,I.x,I.y)}}try{l?.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(a.target);const{captureDraggingState:d}=this.getCurrentSourcePreviewNodeOptions();d?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(c)this.beginDragNativeItem(c);else{if(l&&!l.types&&(a.target&&!a.target.hasAttribute||!a.target.hasAttribute("draggable")))return;a.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=a=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(a.dataTransfer)}if(!this.enterLeaveCounter.enter(a.target)||this.monitor.isDragging())return;const{dataTransfer:l}=a,c=Xr(l);c&&this.beginDragNativeItem(c,l)},this.handleTopDragEnter=a=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=a.altKey,i.length>0&&this.actions.hover(i,{clientOffset:ir(a)}),i.some(l=>this.monitor.canDropOnTarget(l))&&(a.preventDefault(),a.dataTransfer&&(a.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=a=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(a.dataTransfer)}},this.handleTopDragOver=a=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){a.preventDefault(),a.dataTransfer&&(a.dataTransfer.dropEffect="none");return}this.altKeyPressed=a.altKey,this.lastClientOffset=ir(a),this.scheduleHover(i),(i||[]).some(l=>this.monitor.canDropOnTarget(l))?(a.preventDefault(),a.dataTransfer&&(a.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?a.preventDefault():(a.preventDefault(),a.dataTransfer&&(a.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=a=>{this.isDraggingNativeItem()&&a.preventDefault(),this.enterLeaveCounter.leave(a.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=a=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;a.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(a.dataTransfer)}else Xr(a.dataTransfer)&&a.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=a=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:ir(a)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=a=>{const i=a.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(a.preventDefault(),i.dragDrop()))},this.options=new N1(s,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new g1(this.isNodeInDocument)}}const w1=function(t,s,n){return new D1(t,s,n)},L1=({onChange:e,emptyTextFirstLine:t,emptyTextSecondLine:s,emptyButtonLabel:n,acceptTypes:a,maxFilesCount:i,multiple:o,fileFormatError:l,fileCountError:c,fileSizeError:d,getIsFileFormatError:u,getIsFileSizeError:f})=>{const h=m.useRef(null),p=m.useRef(null),[g,b]=m.useState([]),[x,v]=m.useState(!1),[y,I]=m.useState(!1),j=m.useCallback(H=>{const B=H.target.files;if(B&&B.length>0){const K=Array.from(B),V=u?.(K),W=f?.(K);V?v(!0):W?I(!0):e(K)}},[u,f,e]),N=m.useCallback(H=>i&&H?.length>i,[i]),w=m.useMemo(()=>x||y||N(g),[x,y,N,g]),A=()=>{b([]),v(!1),I(!1)},D=m.useMemo(()=>x?r.jsx(Se,{text:l}):y?r.jsx(Se,{text:d}):N(g)?r.jsx(Se,{text:c}):null,[c,l,d,g,N,x,y]);m.useEffect(()=>{A()},[a]);const[{isOver:L,canDrop:E},T]=vs(()=>({accept:[Er],drop(H){const B=H.files,K=u?.(B)??!1,V=f?.(B)??!1,W=N?.(B)??!1;if(v(K),I(V),K||V||W){b(B);return}e(B),A()},collect:H=>({isOver:H.isOver(),canDrop:H.canDrop()})}),[e,u,f,N]),k=H=>{(H.key==="Enter"||H.key==="Space")&&(H.preventDefault(),p.current?.click())},z=H=>{H?.preventDefault();const B=Array.from(H.dataTransfer?.items??[]);v(!!u?.(B)),I(!!f?.(B)),b(B)},R=H=>{H.target===H.currentTarget&&A()},Z=ne("border border-dashed rounded size-full cursor-pointer relative hover:border-hover",!E&&!w&&"border-primary",E&&(L?"border-accent-primary":"border-hover"),w&&"border-error");return T(h),r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:Z,ref:h,onDragOver:z,onDragLeave:R,children:[r.jsxs("label",{htmlFor:"file",tabIndex:0,onKeyDown:k,className:"flex flex-col items-center cursor-pointer size-full text-secondary dial-tiny-text justify-center",children:[t&&r.jsx("p",{className:"mb-1",children:t}),s&&r.jsx("p",{className:"mb-0.5",children:s}),n&&r.jsx(Jt,{appearance:O.ButtonAppearance.Ghost,label:n,onClick:()=>p.current?.click()})]}),r.jsx("input",{multiple:o,id:"file",type:"file",ref:p,hidden:!0,accept:a,onChange:j})]}),r.jsx(r.Fragment,{children:D})]})},T1=({iconBefore:e,className:t,...s})=>{const n=s.invalid,a=()=>r.jsx("div",{className:"mr-2",children:n?r.jsx(_.IconExclamationCircle,{...P.BASE_ICON_PROPS,className:"text-error"}):e});return r.jsx(Qe,{...s,iconBefore:a(),containerClassName:ne("h-[40px] p-0",n&&"h-[60px]"),className:ne("rounded-r-none border-r-0",n&&"text-error",t)})},E1=({children:e,existingFiles:t,onDrop:s,getIsFileFormatError:n,getIsFileSizeError:a,maxFilesCount:i,fileFormatError:o,fileSizeError:l,fileCountError:c})=>{const d=m.useRef(null),[u,f]=m.useState(!1),[h,p]=m.useState(!1),[g,b]=m.useState(0),x=m.useCallback(()=>{f(!1),p(!1),b(0)},[]),v=m.useCallback(L=>!!(i&&t.length+L.length>i),[i,t.length]),y=u||h,[{isOver:I,canDrop:j},N]=vs(()=>({accept:[Er],drop(L){const E=L.files,T=[...t,...E],k=n?.(E)??!1,z=a?.(E)??!1,R=v?.(E)??!1;if(f(k),p(z),k||z||R){b(E.length);return}s(T),x()},collect:L=>({isOver:L.isOver(),canDrop:L.canDrop()})}),[t,s,n,a,v,x]),w=L=>{L.preventDefault();const E=Array.from(L.dataTransfer?.items??[]);f(!!n?.(E)),p(!1),b(E.length)},A=L=>{L.target===L.currentTarget&&x()};N(d);const D=v(Array.from({length:g}));return r.jsxs("div",{className:"h-full flex flex-col",children:[r.jsx("div",{ref:d,onDragOver:w,onDragLeave:A,className:ne("flex-1 min-h-0 border border-solid rounded p-2 overflow-y-auto",!y&&!D&&(j&&I?"border-accent-primary":"border-primary"),(y||D)&&"border-error"),children:e}),u&&r.jsx(Se,{text:o}),h&&r.jsx(Se,{text:l}),!u&&!h&&D&&r.jsx(Se,{text:c})]})},ja=e=>{const{files:t,iconBeforeInput:s,dynamicIcon:n,onChange:a,isInvalid:i,errorText:o,removeButtonAriaLabel:l,getIsMultiFilesSizeError:c,multiFilesSizeError:d,getIsFileFormatError:u,getIsFileSizeError:f,maxFilesCount:h}=e,p=m.useCallback((x,v)=>{x.stopPropagation(),a(t?.filter(y=>y.name!==v)||[])},[a,t]),g=m.useCallback(x=>r.jsx(Lr,{"aria-label":l,onClick:v=>p(v,x)}),[l,p]),b=m.useMemo(()=>r.jsx("div",{className:"flex flex-col gap-y-1",children:t?.map((x,v)=>r.jsx(T1,{id:x.name,value:x.name,iconAfter:g(x.name),iconBefore:s||n?.(x.name),invalid:i?.(x),error:i?.(x)?o:""},x.name+v))}),[t,s,n,i,o,g]);return r.jsx(vl,{backend:w1,children:!t||t.length===0?r.jsx(L1,{...e,onChange:a}):r.jsxs(r.Fragment,{children:[r.jsx(E1,{existingFiles:t,onDrop:a,getIsFileFormatError:u,getIsFileSizeError:f,maxFilesCount:h,fileFormatError:e.fileFormatError,fileSizeError:e.fileSizeError,fileCountError:e.fileCountError,children:b}),c?.(t)&&r.jsx(Se,{text:d})]})})},O1=({onChange:e,fieldTitle:t,elementId:s,files:n,maxFilesCount:a,maxFileSize:i,maxMultiFilesSize:o,fileFormatError:l,fileCountError:c,fileSizeError:d,multiFilesSizeError:u,multiple:f=!0,acceptTypes:h,deleteAllButtonLabel:p,addButtonLabel:g,additionalActionButtons:b,...x})=>{const v=m.useRef(null),y=()=>v.current?.click(),I=()=>{e([])},j=m.useCallback(D=>D?.some(L=>!(h==="/"||h?.toLowerCase()?.includes(L?.type?.toLowerCase()))),[h]),N=m.useCallback(D=>{if(!i)return!1;const L=i*(1024*1024);return D?.some(E=>{const T=E.size;return!!T&&T>L})},[i]),w=m.useCallback(D=>{if(!o||!f)return!1;const L=o*1024*1024;return D.reduce((T,k)=>T+k.size,0)>L},[o,f]),A=m.useCallback(D=>{const L=D.target.files;if(L&&L.length>0){const E=Array.from(L),T=j(E),k=N(E);!T&&!k&&e([...n||[],...E])}},[j,N,e,n]);return r.jsxs("div",{className:"h-full flex flex-col",children:[r.jsxs("div",{className:"flex justify-between items-center pb-1 min-h-[42px]",children:[r.jsx(ze.DialLabel,{label:`${t}: ${f?n?.length||0:""}`,htmlFor:s}),f&&!!n?.length&&r.jsxs("div",{className:"flex flex-row items-center gap-x-2",children:[r.jsx(Qt,{label:p,iconBefore:r.jsx(_.IconTrashX,{...P.BASE_ICON_PROPS}),onClick:I}),(a?a>n?.length:!0)&&r.jsx(Jt,{appearance:O.ButtonAppearance.Ghost,iconBefore:r.jsx(_.IconPlus,{...P.BASE_ICON_PROPS}),label:g,onClick:y}),b]})]}),n&&n.length>0&&r.jsx("input",{id:"file",type:"file",multiple:f,ref:v,hidden:!0,accept:h,onChange:A}),r.jsx(ja,{files:n,onChange:e,acceptTypes:h,maxFilesCount:a,multiple:f,fileFormatError:l,fileCountError:c,fileSizeError:d,multiFilesSizeError:u,getIsFileFormatError:j,getIsFileSizeError:N,getIsMultiFilesSizeError:w,...x})]})},A1=r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.SM}),_1=r.jsx(_.IconChevronUp,{size:P.DIAL_ICON_SIZE.SM}),k1=({variant:e,appearance:t,items:s,...n})=>{const[a,i]=m.useState(!1),o=m.useMemo(()=>a?_1:A1,[a]);return r.jsx("div",{children:r.jsx(C.DialDropdown,{items:s,onOpenChange:l=>i(l),children:r.jsx(ot,{...n,iconAfter:o,variant:e||O.ButtonVariant.Primary,appearance:t||O.ButtonAppearance.Solid})})})},R1=({icon:e,ariaLabel:t,size:s=O.ElementSize.Standard,disabled:n=!1,className:a,buttonClassName:i,iconClassName:o,caretIcon:l=r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.SM}),showCaret:c=!0,placement:d="bottom-start",matchReferenceWidth:u=!1,open:f,onOpenChange:h,defaultOpen:p=!1,...g})=>{const b=s===O.ElementSize.Small,[x,v]=m.useState(p),y=f??x,I=b?"w-8 px-0":"w-10 px-0",j={[O.ElementSize.Small]:"size-5",[O.ElementSize.Standard]:"size-6",[O.ElementSize.Large]:"size-7"},N=w=>{v(w),h?.(w)};return r.jsx(C.DialDropdown,{...g,disabled:n,placement:d,matchReferenceWidth:u,className:a,open:y,onOpenChange:N,defaultOpen:p,children:r.jsxs("button",{type:"button","aria-label":t,disabled:n,className:S.mergeClasses("group flex items-center justify-center rounded border border-transparent bg-layer-4 text-primary","enabled:hover:bg-accent-primary-alpha enabled:active:bg-controls-accent-primary-alpha-active","focus-visible:border-focus focus-visible:outline-hidden disabled:cursor-not-allowed disabled:text-controls-secondary-disable disabled:opacity-75",b?"h-8 px-2":"h-10 px-2",c?void 0:I,i),children:[r.jsx(C.DialIcon,{icon:e,className:S.mergeClasses("flex items-center justify-center text-inherit",j[s],c&&"-mr-2",o,C.DIAL_KIT_CLASS.dropdownIcon)}),c&&r.jsxs("div",{className:S.mergeClasses("relative z-10 inline-grid size-5 shrink-0 place-items-center",C.DIAL_KIT_CLASS.dropdownIconCaret),children:[r.jsx("div",{className:"absolute inset-0 rounded-full bg-layer-2"}),r.jsx(C.DialIcon,{icon:l,className:S.mergeClasses("relative flex items-center justify-center text-secondary transition-transform group-hover:text-primary group-disabled:text-controls-secondary-disable",y&&"rotate-180")})]})]})})};var Da=(e=>(e.Normal="normal",e.Reverse="reverse",e))(Da||{}),Ve=(e=>(e.File="file",e.Folder="folder",e))(Ve||{});const js="data-editable-container",M1={[js]:""};function P1({value:e,isEditing:t,isCreating:s,isLoading:n=!1,restoreOnCancel:a=!0,onValidate:i,onSave:o,onCancel:l,onCreateFolderSave:c,onCreateFolderCancel:d}){const[u,f]=m.useState(e),[h,p]=m.useState(!1),[g,b]=m.useState(""),x=m.useRef(null),v=m.useRef(!1),y=m.useRef(!1),I=m.useCallback((L=!1,E="")=>{p(L),b(E)},[]),j=m.useCallback(L=>{if(!i)return I(),!0;const E=i(L);return E?E.startsWith(`${ce.Warning}__`)?(I(!1,E),!0):(I(!0,E),!1):(I(),!0)},[i,I]),N=m.useCallback(L=>{const E=L??"";f(E),j(E)},[j]),w=m.useCallback(L=>{s&&!v.current&&!n?c?.(L):!s&&t&&o?.(L),v.current=!1},[o,c,s,t,n]),A=m.useCallback(()=>{a&&f(e),s?d?.():l?.(),v.current=!0,I()},[e,l,a,I,d,s]),D=m.useCallback(()=>{if(!y.current){if(y.current=!0,j(u)){w(u);return}!s&&j(e)?(f(e),I(),w(e)):A()}},[j,u,e,w,A,I,s]);return m.useEffect(()=>{!t&&!s||(v.current=!1,y.current=!1,f(e),I(),requestAnimationFrame(()=>{x.current?.focus(),x.current?.select()}))},[t,s,e,I]),m.useEffect(()=>{const L=x.current;if(!t&&!s||!L)return;const E=T=>{T.key==="Enter"?(T.preventDefault(),x.current?.blur()):T.key==="Escape"&&(T.preventDefault(),A())};return L.addEventListener("keydown",E),()=>L.removeEventListener("keydown",E)},[t,s,A]),m.useEffect(()=>{if(!t&&!s||n)return;const L=x.current;if(!L)return;const E=z=>z?(L.closest(`[${js}]`)??L).contains(z):!1,T=z=>{E(z.target)||D()},k=z=>{E(z.relatedTarget)||D()};return document.addEventListener("pointerdown",T,!0),L.addEventListener("blur",k),()=>{document.removeEventListener("pointerdown",T,!0),L.removeEventListener("blur",k)}},[t,s,n,D]),{inputRef:x,value:u,onChange:N,invalid:h,invalidMessage:g}}var Xe=(e=>(e.ITEM="item",e.FOLDER="folder",e))(Xe||{}),Ds=(e=>(e.FILE="FILE",e.PROMPT="PROMPT",e.CONVERSATION="CONVERSATION",e.APPLICATION="APPLICATION",e.TOOLSET="TOOL_SET",e))(Ds||{}),wa=(e=>(e.READ="READ",e.WRITE="WRITE",e.SHARE="SHARE",e))(wa||{});const z1="application/octet-stream";function B1(e,t){if(!e||e.length===0)return[];const s=e.find(c=>c.parentPath===""&&c.nodeType==="FOLDER");if(!s)return[];const n=s.path||s.url||"",a=Jr(n,!0),i=e.filter(c=>c!==s).map(c=>{const d=c.path||c.url||"",u=F1(c.nodeType),f=u===Xe.FOLDER,h=Jr(d,f);let p;return c.parentPath===null||c.parentPath===void 0?p=a:c.parentPath===""?p="":p=Jr(c.parentPath,!0),{...c,originalPath:d,path:h,parentPath:p,nodeType:u}}),o=new Map;i.forEach(c=>{const d={...c,id:c.originalPath,name:c.name,path:c.path,parentPath:c.parentPath,nodeType:c.nodeType,resourceType:H1(c.resourceType),folderId:t,updatedAt:c.updatedAt?new Date(c.updatedAt).toISOString():new Date().toISOString(),items:c.nodeType===Xe.FOLDER?[]:void 0};c.nodeType===Xe.ITEM&&(d.extension=$1(c.name),d.contentType=c.contentType||z1,d.contentLength=c.contentLength||0),o.set(c.path,d)});const l=[];return o.forEach(c=>{if(c.parentPath===a)l.push(c);else{const d=c.path.lastIndexOf(c.name||""),u=c.path.slice(0,d),f=o.get(u);f&&f.nodeType===Xe.FOLDER?(f.items=f.items||[],f.items.push(c)):l.push(c)}}),l}function Jr(e,t){try{let s=decodeURIComponent(e);return t?s.endsWith("/")||(s+="/"):s.endsWith("/")&&(s=s.slice(0,-1)),s}catch{return t&&!e.endsWith("/")?e+"/":!t&&e.endsWith("/")?e.slice(0,-1):e}}function F1(e){return e.toUpperCase()==="FOLDER"?Xe.FOLDER:Xe.ITEM}function H1(e){if(!e)return;const t=e.toUpperCase();return Object.values(Ds).find(n=>n.toUpperCase()===t)}function $1(e){const t=e.split(".");return t.length>1?t[t.length-1]:""}function V1(e,t="Prompts",s="prompts/public/",n="root"){const a=B1(e,n);return[{id:n,name:t,path:s,parentPath:"",nodeType:Xe.FOLDER,folderId:n,items:a}]}const La=({locale:e,timeZone:t,date:s=new Date}={})=>{const n=t??Intl.DateTimeFormat().resolvedOptions().timeZone;try{const a=new Intl.DateTimeFormat(e,{timeZone:n,timeZoneName:"longOffset"}).formatToParts(s).find(i=>i.type==="timeZoneName")?.value;return a?`(${a}) ${n}`:n}catch{return n}},Ta=':;,=/{}%&\\"',ws=`(\r
|
|
3
3
|
|
|
|
4
|
-
|\r| )|[\0-]`,K1=`[${La.replace(/\\/g,"\\\\")}]`,W1=new RegExp(`${K1}|${Ds}`),Z1=new RegExp(Ds);var He=(e=>(e.Sections="sections",e.Flat="flat",e.FlatSections="flat-sections",e))(He||{}),gt=(e=>(e.Select="select",e.Radio="radio",e))(gt||{}),At=(e=>(e.Row="row",e.Column="column",e))(At||{}),F=(e=>(e.String="string",e.Number="number",e.Integer="integer",e.Boolean="boolean",e.Object="object",e.Array="array",e.Null="null",e))(F||{});const Ta={noItemSchema:"No item schema defined.",noItemsYet:"No items yet. Add one below.",addItem:"Add Item",selectTypeToAdd:"Select type to add…",noConfigurableProperties:"No configurable properties.",noFieldsYet:"No fields yet. Add one below.",keyColumnHeader:"Key",valueColumnHeader:"Value",addField:"Add Field",keyInputPlaceholder:"Enter key",stringInputPlaceholder:"Enter a value",integerInputPlaceholder:"Enter a whole number",numberInputPlaceholder:"Enter a number",enumSelectPlaceholder:"Select an option",selectTypePlaceholder:"Select type",removeItemAriaLabel:"Remove item",removeFieldAriaLabel:"Remove field",typeColumnHeader:"Type",entryTypeString:"String",entryTypeNumber:"Number",entryTypeBoolean:"Boolean",entryTypeNull:"Null",entryTypeObject:"Object",entryTypeArray:"Array",entryTypeChangeWarning:"Changing type will reset the current value.",booleanTrueOption:"True",booleanFalseOption:"False",invalidJsonError:"Invalid JSON"},Ea=g.createContext(null);function We(){const e=g.useContext(Ea);if(!e)throw new Error("useSchemaContext must be used inside DialSchemaRenderer");return e}function dn(e,t){const s={...e,...t};return(e.properties||t.properties)&&(s.properties={...e.properties,...t.properties}),(e.required||t.required)&&(s.required=Array.from(new Set([...e.required??[],...t.required??[]]))),s}function q(e,t,s=0){if(s>10)return e;let n=e;if(n.$ref){const a=n.$ref.replace(/^#\//,"").split("/");let i=t;for(const u of a)i=i?.[u];if(!i||typeof i!="object")return e;const{$ref:o,...l}=n,c=i;n={...c.$ref?q(c,t,s+1):c,...l}}if(n.allOf&&n.allOf.length>0){const{allOf:a,...i}=n;let o={};for(const l of a)o=dn(o,q(l,t,s+1));n=dn(o,i)}return n}function Er(e){return e.map((t,s)=>({entry:t,index:s})).sort((t,s)=>{const n=t.entry[1]["dial:meta"]?.["dial:propertyOrder"]??1/0,a=s.entry[1]["dial:meta"]?.["dial:propertyOrder"]??1/0;return n!==a?n-a:t.index-s.index}).map(({entry:t})=>t)}function vt(e){return e==null||e===""}function Ze(e){return e.type===F.Object||e.properties!=null&&e.oneOf==null&&e.anyOf==null&&e.type==null}function xt(e){return e.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}const er=e=>`"${e}" is required`;function Or(e,t){return e.type===F.Null?"null":e.$ref?q(e,t).title??e.$ref.split("/").pop()??"Option":e.title?e.title:e.type?Array.isArray(e.type)?e.type.join(" | "):e.type:e.discriminator?Object.keys(e.discriminator.mapping).join(" | "):e.const!=null?String(e.const):e.oneOf?"One of options":"Option"}function Ie(e,t,s=0){if(s>15)return;const n=q(e,t);if("default"in n)return n.default;if(n.discriminator&&n.oneOf){const a=Object.keys(n.discriminator.mapping)[0];if(a){const i=q({$ref:n.discriminator.mapping[a]},t);return{...Ie(i,t,s+1)??{},[n.discriminator.propertyName]:a}}}if(Ze(n)){if(n.properties){const a={};let i=!1;for(const[o,l]of Object.entries(n.properties)){const c=Ie(l,t,s+1);c!==void 0&&(a[o]=c,i=!0)}return i?a:void 0}if(n.additionalProperties!=null&&n.additionalProperties!==!1)return{}}}function Ee(e,t,s,n="",a=0){if(a>15)return[];const i=[],o=q(t,s);if(o.anyOf){const d=o.anyOf.filter(u=>u.type!==F.Null);return e!=null&&d.length===1?Ee(e,d[0],s,n,a+1):i}if(o.oneOf&&o.discriminator){const d=o.discriminator.propertyName,u=e?.[d];if(u&&o.discriminator.mapping[u]){const f={$ref:o.discriminator.mapping[u]},h=q(f,s);return Ee(e,h,s,n,a+1)}return i}if(o.type===F.Array||!o.type&&Array.isArray(e)){if(Array.isArray(e)&&o.items)for(let d=0;d<e.length;d++){const u=Ee(e[d],o.items,s,`${n}[${d}]`,a+1);i.push(...u)}return i}if(!Ze(o))return i;const l=o.required??[],c=e;for(const d of l){const u=o.properties?.[d];if(u&&q(u,s).isHidden)continue;const f=n?`${n}.${d}`:d,h=c?.[d];if(vt(h)){const p=u?.title??xt(d);i.push({path:f,message:er(p)})}}if(c&&o.properties)for(const[d,u]of Object.entries(o.properties)){if(q(u,s).isHidden)continue;const f=n?`${n}.${d}`:d,h=c[d];if(h!=null){const p=Ee(h,u,s,f,a+1);i.push(...p)}}if(c&&o.additionalProperties!=null&&o.additionalProperties!==!1&&typeof o.additionalProperties=="object"){const d=o.additionalProperties;for(const[u,f]of Object.entries(c)){const h=n?`${n}.${u}`:u,p=Ee(f,d,s,h,a+1);i.push(...p)}}return i}function _t(e,t,s){const n=q(t,s);if(Array.isArray(e))return`${e.length} item${e.length!==1?"s":""}`;if(Ze(n)&&n.properties){const a=Object.entries(n.properties).filter(([,c])=>!q(c,s).isHidden),i=a.length,o=e;return`${a.filter(([c])=>{const d=o?.[c];return d!=null&&d!==""}).length}/${i} fields`}return""}function Oa(e,t,s){if(e==null){const n=t.findIndex(a=>a.type===F.Null);return n>=0?n:0}if(Array.isArray(e)){const n=t.findIndex(a=>q(a,s).type===F.Array);return n>=0?n:0}if(typeof e=="boolean"){const n=t.findIndex(a=>q(a,s).type===F.Boolean);return n>=0?n:0}if(typeof e=="number"){const n=t.findIndex(a=>{const i=q(a,s);return i.type===F.Number||i.type===F.Integer});return n>=0?n:0}if(typeof e=="string"){const n=t.findIndex(a=>q(a,s).type===F.String);return n>=0?n:0}if(typeof e=="object"){const n=e;for(let a=0;a<t.length;a++){const i=q(t[a],s);if(i.discriminator&&i.discriminator.propertyName in n)return a}for(let a=0;a<t.length;a++){const i=q(t[a],s);if(Ze(i)||i.oneOf)return a}return 0}return 0}function Aa(e,t,s){if(t&&typeof e=="object"&&e!==null){const n=e[t];if(n)return`Item ${s+1}: ${n}`}if(typeof e=="object"&&e!==null){const n=e,a=n.name??n.title??n.id;if(a)return`Item ${s+1}: ${a}`}return`Item ${s+1}`}function Ar(e){switch(Array.isArray(e.type)?e.type[0]:e.type){case F.String:return"";case F.Boolean:return!1;case F.Array:return[];case F.Integer:case F.Number:return;default:return{}}}const _a=[F.String,F.Number,F.Boolean,F.Null,F.Object,F.Array];function ka(e){return Array.isArray(e)?F.Array:typeof e=="object"&&e!==null?F.Object:typeof e=="boolean"?F.Boolean:typeof e=="number"?F.Number:e===null?F.Null:F.String}const G1={[F.String]:"",[F.Number]:0,[F.Boolean]:!1,[F.Null]:null,[F.Object]:{},[F.Array]:[]};function Ra(e){return G1[e]}const Wt=({title:e,description:t,summary:s,errorCount:n=0,level:a=0,children:i,onRemove:o,defaultExpanded:l=!0,removeItemAriaLabel:c="Remove item"})=>{const[d,u]=g.useState(l),f=a===0,h="rounded border border-secondary",p=S.mergeClasses("flex items-center gap-2 cursor-pointer select-none transition-colors",f?"px-4 py-3 bg-layer-3 hover:bg-layer-4":"px-3 py-2 bg-layer-4 hover:bg-layer-3",d?"rounded-t":"rounded"),m=S.mergeClasses("border-t border-secondary",f?"p-4":"p-3");return r.jsxs("div",{className:h,children:[r.jsxs("div",{className:p,onClick:()=>u(b=>!b),role:"button","aria-expanded":d,children:[r.jsx("span",{className:"shrink-0 text-secondary",children:d?r.jsx(_.IconChevronDown,{size:16,stroke:2}):r.jsx(_.IconChevronRight,{size:16,stroke:2})}),r.jsx("span",{className:S.mergeClasses("flex-1 truncate",f?"dial-small-semi-text text-primary":"dial-small-text text-primary"),children:e}),t&&r.jsx(ze.DialInfoButton,{caption:t}),s&&r.jsx("span",{className:"dial-tiny-text text-secondary whitespace-nowrap ml-2",children:s}),n>0?r.jsxs("span",{className:"flex items-center gap-1 dial-tiny-text text-error whitespace-nowrap",children:[r.jsx(C.DialIcon,{icon:r.jsx(_.IconAlertTriangle,{size:13,stroke:2})}),n," error",n>1?"s":""]}):r.jsx(C.DialIcon,{icon:r.jsx(_.IconCheck,{size:13,stroke:2}),className:"text-success shrink-0"}),o&&r.jsx(wr,{size:O.ElementSize.Small,onClick:b=>{b.stopPropagation(),o()},"aria-label":c,className:"ml-1 shrink-0 p-0.5"})]}),d&&r.jsx("div",{className:m,children:i})]})},Ma=({schema:e,value:t,onChange:s,path:n,level:a=0,required:i,label:o})=>{const{rootSchema:l,defaultExpanded:c=!0,touchedPaths:d=new Set,skipUntouched:u=!1}=We(),f=q(e,l),h=Ze(f),p=f.type===F.Array;if(h||p){const x=_t(t,f,l),v=Ee(t,f,l,n.join(".")),y=n.join("."),I=y+".",j=!u||d.has(y)||[...d].some(N=>N.startsWith(I));return r.jsx(Wt,{title:o??f.title??n[n.length-1]??"Section",description:f.description,level:a,summary:x,errorCount:j?v.length:0,defaultExpanded:c,children:r.jsx(et,{schema:f,value:t,onChange:s,path:n,level:a+1,required:i})})}const b=(!u||d.has(n.join(".")))&&i&&vt(t)?er(o??"Field"):void 0;return r.jsx(yr,{label:o,required:i,description:f.description,error:b,children:r.jsx(et,{schema:f,value:t,onChange:s,path:n,level:a,required:i,suppressInlineError:!0})})},fr=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o}=We(),l=q(e,i),c=Er(Object.entries(l.properties??{}).filter(([,f])=>!q(f,i).isHidden)),d=l.required??[],u=t??{};return c.length===0?r.jsx("p",{className:"dial-tiny-text text-secondary italic",children:o.noConfigurableProperties}):r.jsx("div",{className:"flex flex-col gap-4",children:c.map(([f,h])=>{const m=q(h,i).title??h.title??xt(f),b=d.includes(f);return r.jsx(Ma,{schema:h,value:u[f],onChange:x=>s({...u,[f]:x}),path:[...n,f],level:a,required:b,label:m},f)})})},U1=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o,readonly:l=!1,defaultExpanded:c=!0}=We(),d=Array.isArray(t)?t:[],u=e.items,[f,h]=g.useState(void 0);if(!u)return r.jsx("p",{className:"dial-tiny-text text-secondary italic",children:o.noItemSchema});const p=g.useMemo(()=>q(u,i),[u,i]),m=g.useMemo(()=>p.discriminator,[p]),b=g.useMemo(()=>m?.propertyName,[m]),x=g.useMemo(()=>m?Object.keys(m.mapping).map(j=>({value:j,label:j})):[],[m]),v=()=>{const j=f??x[0]?.value;let N;if(m&&j){const w=q({$ref:m.mapping[j]},i);N={...Ie(w,i)??{},[m.propertyName]:j}}else N=Ie(p,i)??Ar(p);s([...d,N])},y=j=>{s(d.filter((N,w)=>w!==j))},I=(j,N)=>{s(d.map((w,A)=>A===j?N:w))};return r.jsxs("div",{className:"flex flex-col gap-3",children:[d.length===0&&r.jsx("p",{className:"dial-tiny-text text-secondary italic",children:o.noItemsYet}),d.map((j,N)=>{const w=Aa(j,b,N),A=_t(j,p,i),D=Ee(j,p,i,`${n.join(".")}[${N}]`);return r.jsx(Wt,{title:w,level:a,summary:A,errorCount:D.length,onRemove:l?void 0:()=>y(N),defaultExpanded:c,removeItemAriaLabel:o.removeItemAriaLabel,children:r.jsx(et,{schema:u,value:j,onChange:T=>I(N,T),path:[...n,String(N)],level:a+1})},N)}),!l&&r.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[x.length>0&&r.jsx("div",{className:"flex-1 max-w-[280px]",children:r.jsx(Ke,{options:x,value:f??x[0]?.value,placeholder:o.selectTypeToAdd,onChange:j=>{const N=typeof j=="string"?j:j[0];h(N)}})}),r.jsx(Is,{label:o.addItem,iconBefore:r.jsx(_.IconPlus,{size:16,stroke:2}),onClick:v})]})]})},q1=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o,readonly:l=!1}=We(),c=g.useId(),d=e.discriminator;if(d){const x=d.propertyName,v=d.mapping,y=Object.keys(v).map(w=>({value:w,label:w})),I=typeof t=="object"&&t!==null?t[x]:void 0,j=I?q({$ref:v[I]},i):void 0,N=w=>{const A=q({$ref:v[w]},i),D=Ie(A,i)??{};s({...D,[x]:w})};if(e.discriminatorDisplay===gt.Radio){const w=e.discriminatorOrientation===At.Row,A=I?(()=>{const D=q({$ref:v[I]},i),{[x]:T,...E}=D.properties??{};return{...D,properties:E}})():void 0;return w?r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("div",{role:"radiogroup",className:"flex flex-row flex-wrap gap-4",children:Object.keys(v).map(D=>{const T=q({$ref:v[D]},i);return r.jsx(C.DialRadioButton,{name:c,value:D,inputId:`${c}-${D}`,label:T.title??D,checked:I===D,disabled:l,onChange:()=>N(D)},D)})}),A&&r.jsx(fr,{schema:A,value:t,onChange:s,path:n,level:a})]}):r.jsx("div",{role:"radiogroup",className:"flex flex-col gap-2",children:Object.keys(v).map(D=>{const T=q({$ref:v[D]},i),E=I===D,{[x]:L,...k}=T.properties??{},z={...T,properties:k};return r.jsxs("div",{className:"flex flex-col",children:[r.jsx(C.DialRadioButton,{name:c,value:D,inputId:`${c}-${D}`,label:T.title??D,checked:E,disabled:l,onChange:()=>N(D)}),E&&r.jsx("div",{className:"ml-6 mt-2",children:r.jsx(fr,{schema:z,value:t,onChange:s,path:n,level:a})})]},D)})})}return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("div",{className:"flex-1 max-w-[280px]",children:r.jsx(Ke,{options:y,value:I,placeholder:o.selectTypePlaceholder,disabled:l,onChange:w=>{const A=typeof w=="string"?w:w[0];A&&N(A)}})}),j&&r.jsx("div",{className:"pl-3",children:r.jsx(fr,{schema:j,value:t,onChange:s,path:n,level:a})})]})}const u=e.oneOf??[],h=(()=>{if(t==null)return 0;if(typeof t=="object"&&!Array.isArray(t)){for(let x=0;x<u.length;x++)if(q(u[x],i).required?.every(y=>y in t))return x}return 0})(),p=x=>{const v=q(u[x],i),y=Ie(v,i);s(y??null)},m=u[h];if(e.discriminatorDisplay===gt.Radio)return r.jsx("div",{role:"radiogroup",className:"flex flex-col gap-2",children:u.map((x,v)=>{const y=q(x,i),I=Or(x,i)??`Option ${v+1}`,j=h===v;return r.jsxs("div",{className:"flex flex-col",children:[r.jsx(C.DialRadioButton,{name:c,value:String(v),inputId:`${c}-${v}`,label:I,checked:j,disabled:l,onChange:()=>p(v)}),j&&y&&r.jsx("div",{className:"ml-6 mt-2",children:r.jsx(et,{schema:y,value:t,onChange:s,path:n,level:a})})]},v)})});const b=u.map((x,v)=>{const y=q(x,i);return{value:String(v),label:y.title??`Option ${v+1}`}});return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("div",{className:"flex-1 max-w-[280px]",children:r.jsx(Ke,{options:b,value:String(h),disabled:l,onChange:x=>{const v=typeof x=="string"?x:x[0];p(Number(v))}})}),m&&r.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:r.jsx(et,{schema:m,value:t,onChange:s,path:n,level:a})})]})},Y1=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,readonly:o=!1}=We(),l=e.anyOf??[],c=l.map((m,b)=>({value:String(b),label:Or(m,i)})),d=Oa(t,l,i),u=l[d],h=q(u,i).type===F.Null,p=m=>{const b=q(l[m],i);if(b.type===F.Null){s(null);return}const x=Ie(b,i);if(x!==void 0){s(x);return}switch(b.type){case F.Array:s([]);break;case F.String:s("");break;case F.Boolean:s(!1);break;case F.Integer:case F.Number:s(0);break;default:s({});break}};return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("div",{className:"flex-1 max-w-[280px]",children:r.jsx(Ke,{options:c,value:String(d),disabled:o,onChange:m=>{const b=typeof m=="string"?m:m[0];p(Number(b))}})}),!h&&u&&r.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:r.jsx(et,{schema:u,value:t,onChange:s,path:n,level:a})})]})},Pa=({schema:e,value:t,onChange:s,invalid:n})=>{const a=g.useId(),{texts:i,readonly:o=!1,inputClassName:l,acceptableResourceTypes:c}=We(),d=e.const!==void 0,u=Array.isArray(e.enum)&&e.enum.length>0;if(e["dial:resource"]===!0&&Array.isArray(e.acceptableResourceTypes)&&e.acceptableResourceTypes.length>0&&(e.type===F.String||e.type===void 0)){const h=(e.acceptableResourceTypes??[]).flatMap(p=>{const m=c?.[p];return Array.isArray(m)?m.map(b=>{const x=String(b);return{value:x,label:x}}):[]});return r.jsx(Ke,{options:h,value:t!=null?String(t):void 0,invalid:n,disabled:o,onChange:p=>s(typeof p=="string"?p:p[0]),placeholder:i.enumSelectPlaceholder,className:l})}if(d)return r.jsx(Qe,{value:String(e.const??""),disabled:!0,onChange:void 0,className:"opacity-60"});if(u&&e.enumDisplay===gt.Radio){const h=e.enumOrientation===At.Row;return r.jsx("div",{role:"radiogroup",className:h?"flex flex-row flex-wrap gap-x-4 gap-y-2":"flex flex-col gap-2",children:e.enum.map(p=>{const m=String(p);return r.jsx(C.DialRadioButton,{name:a,value:m,inputId:`${a}-${m}`,label:m,checked:t!=null?String(t)===m:!1,disabled:o,onChange:b=>s(b)},m)})})}if(u){const h=e.enum.map(p=>({value:String(p),label:String(p)}));return r.jsx(Ke,{options:h,value:t!=null?String(t):void 0,invalid:n,disabled:o,onChange:p=>s(typeof p=="string"?p:p[0]),placeholder:i.enumSelectPlaceholder})}switch(e.type){case F.Boolean:return r.jsx(ze.DialSwitch,{switchId:a,isOn:!!t,disabled:o,onChange:h=>s(h)});case F.Integer:return r.jsx(as,{integer:!0,value:t!=null?String(t):"",invalid:n,disabled:o,onChange:h=>s(h!==void 0?Number(h):void 0),placeholder:i.integerInputPlaceholder,containerClassName:l});case F.Number:return r.jsx(as,{value:t!=null?String(t):"",invalid:n,disabled:o,onChange:h=>s(h!==void 0?Number(h):void 0),placeholder:i.numberInputPlaceholder,containerClassName:l});default:return e.isProtected?r.jsx(ha,{value:t!=null?String(t):"",invalid:n,disabled:o,onChange:h=>s(h??void 0),placeholder:i.stringInputPlaceholder,containerClassName:l}):r.jsx(Qe,{value:t!=null?String(t):"",invalid:n,disabled:o,onChange:h=>s(h??void 0),placeholder:i.stringInputPlaceholder,containerClassName:l})}},ws=({value:e,onChange:t,theme:s=Yt.EditorThemes.dark,height:n=240})=>{const{readonly:a,texts:i}=We(),[o,l]=g.useState(null),[c,d]=g.useState(()=>JSON.stringify(e,null,2));g.useEffect(()=>{typeof window<"u"&&Promise.resolve().then(()=>require("./JsonEditor-Bxui5wJH.cjs")).then(h=>{l(()=>h.DialJsonEditor)})},[]);let u=!1;try{JSON.parse(c)}catch{u=!0}const f=h=>{const p=h??"";d(p);try{t(JSON.parse(p))}catch{}};return r.jsxs("div",{children:[r.jsx("div",{className:"border border-primary rounded",style:{height:`${n}px`},children:o&&r.jsx(o,{value:c,currentTheme:s,onChange:f,options:{readOnly:a}})}),r.jsx(Se,{text:u?i.invalidJsonError:void 0})]})},un=(e,t)=>({id:Math.random().toString(36).slice(2),key:e,value:t}),za=e=>!!(e.oneOf||e.anyOf||e.type===F.Array||Ze(e)),X1={[F.String]:"entryTypeString",[F.Number]:"entryTypeNumber",[F.Boolean]:"entryTypeBoolean",[F.Null]:"entryTypeNull",[F.Object]:"entryTypeObject",[F.Array]:"entryTypeArray"},J1=({pairId:e,pairKey:t,pairValue:s,valueSchema:n,isUnschematizedValue:a,jsonEditorTheme:i,onKeyChange:o,onValueChange:l,onRemove:c,keyInputPlaceholder:d,removeFieldAriaLabel:u,path:f,level:h,readonly:p=!1,inputClassName:m})=>{const{rootSchema:b,texts:x,defaultExpanded:v=!0,touchedPaths:y=new Set,markTouched:I=()=>{},skipUntouched:j=!1}=We(),[N,w]=g.useState(t),A=za(n),[D,T]=g.useState(()=>ka(s)),E=a&&(D===F.Object||D===F.Array),L=a&&D===F.Null,k=A||E,z=[...f,e,"key"].join("."),Z=(!j||y.has(z))&&t==="",H=g.useCallback(ee=>{l(Ra(ee)),T(ee)},[l]),B=g.useMemo(()=>_a.map(ee=>({value:ee,label:x[X1[ee]]})),[x]),K=g.useMemo(()=>[{value:"true",label:x.booleanTrueOption},{value:"false",label:x.booleanFalseOption}],[x]),V=`${e}-key-error`,W=a&&D===F.Boolean,oe=r.jsxs("div",{className:"flex gap-2 items-start",children:[r.jsxs("div",{className:k?"flex-1 min-w-0":"w-2/5 min-w-0",children:[r.jsx(Qe,{value:N,disabled:p,invalid:Z,"aria-describedby":Z?V:void 0,onChange:ee=>w(ee??""),onBlur:()=>{I(z),N!==t&&o(N)},placeholder:d,containerClassName:m}),r.jsx(Se,{id:V,text:Z?`${x.keyColumnHeader} is required`:void 0})]}),!A&&!E&&r.jsx("div",{className:"flex-1 min-w-0",children:L?r.jsx(Qe,{value:"null",disabled:!0,onChange:void 0,className:"opacity-60"}):W?r.jsx(Ke,{options:K,value:s?"true":"false",disabled:p,onChange:ee=>{const ae=typeof ee=="string"?ee:ee[0];ae&&l(ae==="true")}}):r.jsx(Pa,{schema:a?{type:D}:n,value:s,onChange:l})}),a&&r.jsx("div",{className:"w-28 shrink-0",children:r.jsx(O.DialTooltip,{tooltip:x.entryTypeChangeWarning,triggerClassName:"block",children:r.jsx(Ke,{options:B,value:D,disabled:p,onChange:ee=>{const ae=typeof ee=="string"?ee:ee[0];ae&&H(ae)}})})}),!p&&r.jsx(wr,{size:O.ElementSize.Small,onClick:c,"aria-label":u,className:"shrink-0 p-1"})]});if(!k)return oe;if(E)return r.jsxs("div",{className:"flex flex-col gap-2",children:[oe,r.jsx(ws,{value:s,onChange:l,theme:i},D)]});const X=[...f,t],le=_t(s,n,b),G=Ee(s,n,b,X.join("."));return r.jsxs("div",{className:"flex flex-col gap-2",children:[oe,r.jsx(Wt,{title:t,level:h,summary:le,errorCount:G.length+(Z?1:0),defaultExpanded:v,children:r.jsx(et,{schema:n,value:s,onChange:l,path:X,level:h+1})})]})},Q1=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o,readonly:l=!1,inputClassName:c,jsonEditorTheme:d}=We(),u=e.additionalProperties===!0||e.additionalProperties==null,f=u?{type:"string"}:typeof e.additionalProperties=="object"?q(e.additionalProperties,i):{type:"string"},h=za(f),[p,m]=g.useState(()=>Object.entries(t??{}).map(([N,w])=>un(N,w))),b=N=>Object.fromEntries(N.filter(w=>w.key!=="").map(w=>[w.key,w.value])),x=(N,w)=>{const A=p.map((D,T)=>T===N?{...D,key:w}:D);m(A),s(b(A))},v=(N,w)=>{const A=p.map((D,T)=>T===N?{...D,value:w}:D);m(A),s(b(A))},y=()=>h?Ie(f,i)??Ar(f):"",I=()=>{m(N=>[...N,un("",y())])},j=N=>{const w=p.filter((A,D)=>D!==N);m(w),s(b(w))};return r.jsxs("div",{className:"flex flex-col gap-2",children:[p.length===0&&r.jsx("p",{className:"dial-tiny-text text-secondary italic",children:o.noFieldsYet}),p.length>0&&!h&&r.jsxs("div",{className:"flex gap-2 mb-1 pr-7",children:[r.jsx("span",{className:"w-2/5 dial-tiny-text text-secondary font-medium",children:o.keyColumnHeader}),r.jsx("span",{className:"flex-1 dial-tiny-text text-secondary font-medium",children:o.valueColumnHeader}),u&&r.jsx("span",{className:"w-28 shrink-0 dial-tiny-text text-secondary font-medium",children:o.typeColumnHeader})]}),p.map((N,w)=>r.jsx(J1,{pairId:N.id,pairKey:N.key,pairValue:N.value,valueSchema:f,isUnschematizedValue:u,jsonEditorTheme:d,onKeyChange:A=>x(w,A),onValueChange:A=>v(w,A),onRemove:()=>j(w),keyInputPlaceholder:o.keyInputPlaceholder,removeFieldAriaLabel:o.removeFieldAriaLabel,path:n,level:a,readonly:l,inputClassName:c},N.id)),!l&&r.jsx("div",{className:"pt-1",children:r.jsx(Is,{label:o.addField,iconBefore:r.jsx(_.IconPlus,{size:16,stroke:2}),onClick:I})})]})},et=({schema:e,value:t,onChange:s,path:n,level:a,required:i,suppressInlineError:o=!1})=>{const{rootSchema:l,renderField:c,markTouched:d=()=>{},touchedPaths:u=new Set,skipUntouched:f=!1,jsonEditorTheme:h}=We(),p=q(e,l),m=v=>{d(n.join(".")),s(v)},b=!f||u.has(n.join("."));let x;if(p.oneOf)x=r.jsx(q1,{schema:p,value:t,onChange:m,path:n,level:a});else if(p.anyOf&&p.type!==F.Object)x=r.jsx(Y1,{schema:p,value:t,onChange:m,path:n,level:a});else if(Ze(p)){const v=p.additionalProperties!=null&&p.additionalProperties!==!1,y=!p.properties||Object.keys(p.properties).length===0;v&&y?x=r.jsx(Q1,{schema:p,value:t,onChange:m,path:n,level:a}):y&&p.additionalProperties!==!1?x=r.jsx(ws,{value:t,onChange:m,theme:h}):x=r.jsx(fr,{schema:p,value:t,onChange:m,path:n,level:a})}else if(p.type===F.Array)x=r.jsx(U1,{schema:p,value:t,onChange:m,path:n,level:a});else{const v=b&&i&&vt(t),y=!o&&v?er(p.title??"Field"):void 0;x=r.jsxs(r.Fragment,{children:[r.jsx(Pa,{schema:p,value:t,onChange:m,invalid:v}),r.jsx(Se,{text:y})]})}return c?c(n,p,x):x},ed=({schema:e,defaultValue:t,texts:s,className:n,readonly:a=!1,defaultExpanded:i=!0,inputClassName:o,variant:l=He.Sections,onChange:c,onPropertyChange:d,onDefaultValues:u,renderField:f,skipUntouched:h=!1,jsonEditorTheme:p,acceptableResourceTypes:m})=>{const b=g.useMemo(()=>({...Ta,...s}),[s]),x=g.useMemo(()=>t||(Ie(e,e)??{}),[]),[v,y]=g.useState(x),[I,j]=g.useState(new Set),N=g.useCallback(L=>{j(k=>k.has(L)?k:new Set([...k,L]))},[]);g.useEffect(()=>{u?.(x)},[]);const w=(L,k)=>{const z={...v,[L]:k};y(z),c?.(z),d?.(L,k)},A=new Set(Object.keys(e.properties??{})),D=Object.keys(v).filter(L=>!A.has(L)),T=Er(Object.entries(e.properties??{}).filter(([,L])=>!q(L,e).isHidden)),E=e.required??[];return r.jsx(Ea.Provider,{value:{rootSchema:e,texts:b,readonly:a,defaultExpanded:i,inputClassName:o,jsonEditorTheme:p,acceptableResourceTypes:m,renderField:f,touchedPaths:I,markTouched:N,skipUntouched:h},children:r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-4",n),children:[T.map(([L,k])=>{const z=q(k,e),R=z.title??k.title??xt(L),Z=E.includes(L),H=v[L];if(l===He.Flat)return r.jsx(Ma,{schema:k,value:H,onChange:W=>w(L,W),path:[L],level:0,required:Z,label:R},L);if(l===He.FlatSections)return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("h2",{className:"dial-small-semi-text text-primary",children:R}),r.jsx(et,{schema:k,value:H,onChange:W=>w(L,W),path:[L],level:0,required:Z})]},L);const B=Ee(H,z,e,L),K=L+".",V=!h||I.has(L)||[...I].some(W=>W.startsWith(K));return r.jsx(Wt,{title:R,description:z.description,level:0,defaultExpanded:i,errorCount:V?Z&&vt(H)?Math.max(B.length,1):B.length:0,children:r.jsx(et,{schema:k,value:H,onChange:W=>w(L,W),path:[L],level:1,required:Z})},L)}),D.map(L=>{const k=xt(L),z=r.jsx(ws,{value:v[L],onChange:R=>w(L,R),theme:p});return l===He.Sections?r.jsx(Wt,{title:k,level:0,defaultExpanded:i,children:z},L):r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("h2",{className:"dial-small-semi-text text-primary",children:k}),z]},L)})]})})},Ba=g.createContext(null),Ge=()=>{const e=g.useContext(Ba);if(!e)throw new Error("useSchemaContext must be used inside SchemaRenderer");return e},Zt=(e,t=new Set,s=!1,n=!1)=>{if(!s||t.has(e))return!0;if(!n)return!1;const a=e+".";return[...t].some(i=>i.startsWith(a))},Fa=({availableWidth:e,tagWidths:t,overflowChipWidth:s,gap:n})=>{if(e<=0)return t.length;let a=0,i=0;for(const o of t){const l=o+n;if(a+l>e)break;a+=l,i++}if(i===t.length)return i;for(;i>0&&a+s>e;)i--,a-=t[i]+n;return i};var Ct=(e=>(e.Outlined="outlined",e.Selectable="selectable",e))(Ct||{});const td="inline-flex h-[32px] max-w-full items-center gap-1 rounded-full px-3",rd={[Ct.Outlined]:{default:"bg-layer-raised text-primary",selected:"bg-control-accent-alpha text-primary"},[Ct.Selectable]:{default:"text-secondary",selected:"bg-control-accent-alpha text-primary"}},sd="cursor-pointer outline-offset-0 focus-visible:outline focus-visible:outline-focus",nd="hover:bg-control-accent-alpha-hover active:bg-control-accent-alpha-active",$e=({label:e,icon:t,appearance:s=Ct.Outlined,selected:n=!1,disabled:a=!1,closable:i=!1,removeLabel:o,className:l,title:c,onClick:d,onRemove:u,onKeyDown:f,...h})=>{const p=s===Ct.Selectable,m=!!d&&!a,b=i&&!!u&&!a,x=p&&n,v=y=>{f?.(y),!(!m||y.defaultPrevented)&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),y.currentTarget.click())};return r.jsxs("span",{...h,role:m?"button":h.role,tabIndex:m?0:h.tabIndex,"aria-disabled":a||void 0,"aria-pressed":p&&m?n:void 0,onClick:a?void 0:d,onKeyDown:v,className:S.mergeClasses(td,x?"dial-tiny-semi-text":"dial-tiny-text",rd[s][n?"selected":"default"],a&&"cursor-not-allowed",m&&[sd,nd],l,C.DIAL_KIT_CLASS.tag),children:[t&&r.jsx("span",{className:"flex shrink-0 items-center","aria-hidden":"true",children:t}),r.jsx("span",{className:"truncate",title:c??e,children:e}),b&&r.jsx(C.GhostIconButton,{className:"size-[16px] shrink-0 dial-kit-minimum-target",size:O.ElementSize.Small,"aria-label":o??`Remove ${e}`,icon:r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),onClick:y=>{y.stopPropagation(),u?.(y)}})]})},Cr="h-[24px] max-w-full rounded-md border border-secondary bg-layer-sunken px-2",$t=({options:e,selectedValues:t,handleRemoveTag:s,tagClassName:n})=>r.jsx(r.Fragment,{children:t.map(a=>{const i=e.find(o=>o.value===a);return r.jsx($e,{label:i?.label??a,closable:!!s,onRemove:o=>s?.(o,a),icon:i?.icon,className:S.mergeClasses(Cr,n)},a)})}),ad=8,id=e=>e.stopPropagation(),od=e=>{e.key!=="Escape"&&e.stopPropagation()},ld=({options:e,selectedValues:t,handleRemoveTag:s})=>{const n=g.useRef(null),a=g.useRef(null),[i,o]=g.useState(null),l=g.useCallback(()=>{const f=n.current,h=a.current;if(!f||!h)return;const p=Array.from(h.children,b=>b.offsetWidth),m=p.pop()??0;o(Fa({tagWidths:p,overflowChipWidth:m,availableWidth:f.clientWidth,gap:ad}))},[]);g.useLayoutEffect(()=>{l()},[l,e,t]),g.useLayoutEffect(()=>{const f=n.current;return f?C.observeElementSize(f,l):void 0},[l]);const c=i??t.length,d=t.slice(0,c),u=t.slice(c);return r.jsxs("div",{ref:n,className:"relative flex min-w-0 flex-1 items-center gap-2 overflow-hidden",children:[r.jsx($t,{options:e,selectedValues:d,handleRemoveTag:s,tagClassName:"min-w-0"}),u.length>0&&r.jsx(C.InteractiveTooltip,{asChild:!0,placement:C.TooltipPlacement.Bottom,content:r.jsx("div",{className:"flex flex-wrap gap-2",onClick:id,onKeyDown:od,children:r.jsx($t,{options:e,selectedValues:u,handleRemoveTag:s})}),children:r.jsx($e,{label:`+${u.length}`,role:"button",tabIndex:0,"aria-haspopup":"true","aria-label":`${u.length} more selected: ${u.map(f=>e.find(h=>h.value===f)?.label??f).join(", ")}`,title:"",className:S.mergeClasses(Cr,"shrink-0")})}),r.jsxs("div",{ref:a,"aria-hidden":"true",inert:!0,className:"pointer-events-none invisible absolute left-0 top-0 flex h-0 w-max gap-2 overflow-hidden",children:[r.jsx($t,{options:e,selectedValues:t,handleRemoveTag:s,tagClassName:"shrink-0"}),r.jsx($e,{label:`+${t.length}`,className:S.mergeClasses(Cr,"shrink-0")})]})]})},cd=S.mergeClasses("w-full flex flex-col"),dd=C.overlayItemClassName,ud="!max-w-[var(--reference-width)]",fd=S.mergeClasses("max-h-[344px] overflow-y-auto py-1",C.overlayListClassName),pd=C.overlayGap,hd=C.overlaySubMenuListClassName,md=r.jsx(_.IconChevronRight,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),gd="text-secondary transition-transform",xd=8,Cd=r.jsx(_.IconSearch,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),bd=r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),vd=r.jsx(C.SvgNoData,{width:P.DIAL_ICON_SIZE.LG,height:P.DIAL_ICON_SIZE.LG,"aria-hidden":"true"}),yd=({opt:e,selectedValues:t,mark:s=C.MenuItemMark.Tint,onSelect:n})=>{const{isOpen:a,nodeId:i,refs:o,floatingStyles:l,context:c,getReferenceProps:d,getFloatingProps:u}=C.useSubMenuFloating(pd,"listbox",!!e.disabled),f=e.children?.some(p=>t.includes(p.value)),h=r.jsx(C.MenuItem,{ref:o.setReference,role:"option","aria-haspopup":"listbox","aria-expanded":a,"aria-selected":!!f,"aria-disabled":!!e.disabled,disabled:e.disabled,ellipsisLabel:!0,icon:e.icon,label:e.labelNode??e.label,trailing:md,...d()});return r.jsxs(J.FloatingNode,{id:i,children:[e.interactiveTooltip?r.jsx(C.InteractiveTooltip,{asChild:!0,placement:e.interactiveTooltip.placement,content:e.interactiveTooltip.content,contentClassName:e.interactiveTooltip.contentClassName,children:h}):h,a&&r.jsx(C.SubMenuPanel,{refs:o,floatingStyles:l,context:c,getFloatingProps:u,role:"listbox",surfaceClassName:hd,children:e.children.map(p=>{const m=r.jsx(C.MenuItem,{role:"option","aria-selected":t.includes(p.value),"aria-disabled":!!p.disabled,disabled:p.disabled,mark:s,selected:t.includes(p.value),ellipsisLabel:!0,icon:p.icon,label:p.labelNode??p.label,rightControl:p.rightControl,onClick:()=>!p.disabled&&n(p.value)});return r.jsx(g.Fragment,{children:p.interactiveTooltip?r.jsx(C.InteractiveTooltip,{asChild:!0,placement:p.interactiveTooltip.placement,content:p.interactiveTooltip.content,contentClassName:p.interactiveTooltip.contentClassName,children:m}):m},p.value)})})]})},tt=({options:e,multiple:t=!1,id:s,value:n,defaultValue:a,size:i=O.ElementSize.Standard,prefix:o,customSelectedValue:l,placeholder:c="Select...",labelProps:d,error:u,caption:f,ariaLabel:h,searchable:p=!1,searchSize:m=O.ElementSize.Standard,searchPlaceholder:b,selectAll:x=!1,invalid:v,selectAllLabel:y="Select all",collapseTagOverflow:I=!1,selectedOptionMark:j=C.MenuItemMark.Tint,emptyStateTitle:N="No options available",emptyStateDescription:w,emptyStateIcon:A,disabled:D=!1,className:T,fieldClassName:E,listClassName:L,closable:k=!1,header:z,footer:R,onClose:Z,onChange:H,dismissRef:B,onFooterClick:K,open:V,onOpenChange:W,onSearchQueryChange:oe,customMultiSelectTagsRenderer:X})=>{const le=g.useId(),G=s||le,ee=`list-${G}`,ae=i===O.ElementSize.Small,[de,me]=g.useState(!1),Ne=V!==void 0,xe=Ne?!!V:de,U=g.useCallback($=>{Ne||me($),W?.($)},[Ne,W]),[Q,_e]=g.useState(""),Be=g.useCallback($=>{$!==Q&&(_e($||""),oe?.($||""))},[oe,Q]),ve=n!==void 0,[Ue,ct]=g.useState(a),Ce=ve?n:Ue,Y=g.useMemo(()=>t?Array.isArray(Ce)?Ce:[]:typeof Ce=="string"?[Ce]:[],[Ce,t]),ue=g.useMemo(()=>{const $=Q.trim().toLowerCase();return $?e.filter(he=>he.label.toLowerCase().includes($)):e},[e,Q]);g.useEffect(()=>{xe||Be("")},[xe,Be]);const fe=g.useCallback($=>{ve||ct($),H?.($)},[ve,H]),Mt=g.useCallback($=>{if(t){const he=new Set(Y);he.has($)?he.delete($):he.add($),fe(Array.from(he));return}fe($),U(!1)},[t,fe,U,Y]),St=g.useCallback(($,he)=>{if($.stopPropagation(),!t){fe("");return}const tr=Y.filter(gi=>gi!==he);fe(tr)},[t,Y,fe]),we=g.useMemo(()=>ue.filter($=>!$.disabled),[ue]),st=g.useMemo(()=>we.filter($=>Y.includes($.value)).length,[we,Y]),{allSelectedInFiltered:je,someSelectedInFiltered:_r}=g.useMemo(()=>{const $=we.length>0&&st===we.length;return{allSelectedInFiltered:$,someSelectedInFiltered:st>0&&!$}},[we,st]),It=g.useCallback(()=>{if(!(!t||we.length===0))if(je){const $=new Set(we.map(he=>he.value));fe(Y.filter(he=>!$.has(he)))}else{const $=new Set(Y);we.forEach(he=>$.add(he.value)),fe(Array.from($))}},[je,t,we,Y,fe]),dt=Y.length>0,M=!t&&dt?Y[0]:void 0,ie=g.useMemo(()=>M?e.find($=>$.value===M)??e.flatMap($=>$.children??[]).find($=>$.value===M):void 0,[e,M]),Le=ie?o?`${o} ${ie.label}`:ie.label:void 0,kr=C.useIsMobileScreen(),Rr=t&&I&&!X&&!kr,Pt=g.useMemo(()=>t?dt?Rr?r.jsx(ld,{options:e,selectedValues:Y,handleRemoveTag:St}):r.jsx("span",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:X?.(e,Y,St)??r.jsx($t,{options:e,selectedValues:Y,handleRemoveTag:St})}):null:!ie||!ie.labelNode&&!ie.description?null:r.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[r.jsx(C.EllipsisTooltip,{text:ie.labelNode??Le}),ie.description&&r.jsx("span",{className:"truncate text-secondary dial-tiny-text",children:ie.description})]}),[Rr,X,St,dt,t,e,Le,Y,ie]),ui=t||Pt?"":Le||(l&&n?l:""),fi=typeof d?.label=="string"?d.label:void 0,pi=Pt?[O.resolveAccessibleName(h,fi),t?Y.map($=>e.find(he=>he.value===$)?.label??$).join(", "):Le].filter(Boolean).join(", ")||void 0:O.resolveAccessibleName(h);g.useImperativeHandle(B,()=>({dismiss:()=>{U(!1)}}));const hi=g.useCallback($=>{D||($.key==="ArrowDown"||$.key==="ArrowUp")&&($.preventDefault(),xe||U(!0))},[D,xe,U]),mi=()=>r.jsxs("div",{id:ee,role:"listbox","aria-multiselectable":t||void 0,className:cd,children:[z&&r.jsx(r.Fragment,{children:typeof z=="function"?z():z}),(p||k)&&(e.length>xd||!!Q)&&r.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[p&&r.jsx(C.Input,{id:`search-${G}`,size:m,placeholder:b,"aria-label":b||"Search options",onChange:$=>Be($),value:Q,iconBefore:Cd,containerClassName:"w-full"}),k&&r.jsx(C.GhostIconButton,{"aria-label":"Close select",className:"shrink-0",size:O.ElementSize.Small,icon:bd,onClick:$=>{Z?.($),U(!1)}})]}),t&&x&&we.length>0&&r.jsx("div",{className:S.mergeClasses(dd,"mt-2"),children:r.jsx(C.Checkbox,{id:`${G}-selectAll`,labelProps:{label:y},isSelected:je,isIndeterminate:_r,onChange:It})}),r.jsx("div",{role:"none",className:fd,children:ue.length===0?r.jsx("div",{className:"px-2 py-3",children:r.jsx(C.DialNoDataContent,{icon:A??vd,title:N,description:w})}):ue.map($=>{const he=Y.includes($.value);if($.children?.length)return r.jsx(yd,{opt:$,selectedValues:Y,mark:t?C.MenuItemMark.Checkbox:j,onSelect:Mt},$.value);const tr=t?r.jsx(C.MenuItem,{id:`${G}-${$.value}`,role:"option","aria-selected":he,"aria-disabled":!!$.disabled,disabled:$.disabled,mark:C.MenuItemMark.Checkbox,selected:he,icon:$.icon,label:$.labelNode??$.label,description:$.description,rightControl:$.rightControl,onClick:()=>Mt($.value)}):r.jsx(C.MenuItem,{role:"option","aria-selected":he,"aria-disabled":!!$.disabled,disabled:$.disabled,mark:j,selected:he,ellipsisLabel:!0,icon:$.icon,label:$.labelNode??$.label,description:$.description,rightControl:$.rightControl,onClick:()=>!$.disabled&&Mt($.value)});return r.jsx(g.Fragment,{children:$.interactiveTooltip?r.jsx(C.InteractiveTooltip,{asChild:!0,placement:$.interactiveTooltip.placement,content:$.interactiveTooltip.content,contentClassName:$.interactiveTooltip.contentClassName,children:tr}):tr},$.value)})}),R&&r.jsx("div",{onClick:$=>{K?.($),K&&U(!1)},children:typeof R=="function"?R():R})]});return r.jsxs("div",{className:S.mergeClasses("flex w-full flex-col gap-2",T,C.DIAL_KIT_CLASS.select),children:[d&&r.jsx(C.Label,{...d,htmlFor:G}),r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx(C.Dropdown,{open:xe,onOpenChange:U,disabled:D,closable:k,onClose:Z,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],listClassName:S.mergeClasses(ud,L),className:"w-full",renderOverlay:mi,children:r.jsx(C.Input,{id:G,size:i,disabled:D,invalid:v,value:ui,placeholder:Pt?void 0:c,readOnly:!0,iconBefore:t?void 0:ie?.icon,iconAfter:r.jsx(_.IconChevronDown,{size:ae?P.DIAL_ICON_SIZE.SM:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:S.mergeClasses(gd,xe&&"rotate-180")}),role:"combobox","aria-haspopup":"listbox","aria-expanded":xe,"aria-controls":ee,"aria-autocomplete":"none","aria-label":pi,containerClassName:"w-full",wrapperClassName:S.mergeClasses(!D&&"cursor-pointer",t&&dt&&!Rr&&["!h-auto flex-wrap py-2",ae?"min-h-[24px]":"min-h-[40px]"],E),className:S.mergeClasses("cursor-pointer",Pt&&"w-0 min-w-0 flex-none p-0"),onKeyDown:hi,children:Pt})}),r.jsx(C.ErrorText,{text:u}),!u&&r.jsx(C.CaptionText,{text:f})]})]})},fn={[F.Array]:[],[F.String]:"",[F.Boolean]:!1,[F.Integer]:0,[F.Number]:0},Sd=({schema:e,value:t,onChange:s,path:n,level:a,ariaLabel:i})=>{const{rootSchema:o,texts:l,readonly:c=!1}=Ge(),d=e.anyOf??[],u=Oa(t,d,o),f=d[u],h=!f||q(f,o).type===F.Null,p=m=>{const b=q(d[m],o);if(b.type===F.Null){s(null);return}const x=Ie(b,o);if(x!==void 0){s(x);return}const v=typeof b.type=="string"?b.type:"";s(v in fn?fn[v]:{})};return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx(tt,{ariaLabel:i??l.selectTypePlaceholder,options:d.map((m,b)=>({value:String(b),label:Or(m,o)})),value:String(u),disabled:c,onChange:m=>p(Number(typeof m=="string"?m:m[0])),className:"max-w-[280px]"}),!h&&r.jsx("div",{className:"border-l-2 border-tertiary pl-3",children:r.jsx(rt,{schema:f,value:t,onChange:s,path:n,level:a,ariaLabel:i})})]})},yt=({label:e,variant:t,appearance:s=O.ButtonAppearance.Solid,size:n=O.ElementSize.Standard,className:a,textClassName:i,iconAfter:o,iconBefore:l,type:c="button",tooltipProps:d,href:u,target:f,rel:h,disabled:p,...m})=>{const b=S.mergeClasses("dial-kit-base-button",t&&C.getButtonClassNames(t,s),n===O.ElementSize.Small?"dial-tiny-semi-text":"dial-small-paragraph-semi-text",n===O.ElementSize.Small?"h-[24px] gap-1":"h-[40px] gap-2",n===O.ElementSize.Small&&"dial-kit-base-button-small",s!==O.ButtonAppearance.Link&&(n===O.ElementSize.Small?"px-2":"px-4"),n!==O.ElementSize.Small&&s!==O.ButtonAppearance.Link&&"dial-kit-enhanced-target",a),x=e?void 0:d?.tooltip,v=O.resolveAccessibleName(typeof e=="string"?e:void 0,m["aria-label"],x),y=r.jsxs(r.Fragment,{children:[r.jsx(C.DialIcon,{icon:l}),e&&r.jsx("span",{className:i,children:e}),r.jsx(C.DialIcon,{icon:o})]}),I=m,j=u!==void 0?r.jsx("a",{...I,href:p?void 0:u,target:f,rel:h??(f==="_blank"?"noopener noreferrer":void 0),"aria-disabled":p||void 0,tabIndex:p?-1:I.tabIndex,onClick:p?void 0:I.onClick,className:b,"aria-label":v,children:y}):r.jsx("button",{...m,...C.getDisabledButtonProps(p,d,m.onClick),type:c,className:b,"aria-label":v,children:y});return d?r.jsx(C.Tooltip,{asChild:!0,...d,children:j}):j},Ls=(e,t)=>({appearance:n,...a})=>r.jsx(yt,{...a,variant:e,appearance:n||t}),Ts=(e,t)=>({variant:n,...a})=>r.jsx(yt,{...a,variant:n||t,appearance:e}),Ha=Ls(O.ButtonVariant.Primary,O.ButtonAppearance.Solid),Es=Ls(O.ButtonVariant.Neutral,O.ButtonAppearance.Solid),Id=Ls(O.ButtonVariant.Danger,O.ButtonAppearance.Solid),wt={x1:"-5.06",y1:"2.26",x2:"30.62",y2:"22.63",from:"var(--stroke-gradient-1, #5976E9)",to:"var(--stroke-gradient-2, #885DF2)"},Nd=r.jsx(_.IconSparkles,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":!0}),jd=({appearance:e=O.ButtonAppearance.Outlined,iconBefore:t=Nd,iconAfter:s,style:n,...a})=>{const i=`dial-kit-starter-gradient-${g.useId().replace(/[^\w-]/g,"")}`,o=r.jsx("svg",{className:"pointer-events-none absolute size-0 overflow-hidden","aria-hidden":"true",focusable:"false",children:r.jsx("defs",{children:r.jsxs("linearGradient",{id:i,x1:wt.x1,y1:wt.y1,x2:wt.x2,y2:wt.y2,gradientUnits:"userSpaceOnUse",children:[r.jsx("stop",{stopColor:wt.from}),r.jsx("stop",{offset:"1",stopColor:wt.to})]})})}),l=c=>r.jsxs(r.Fragment,{children:[o,c]});return r.jsx(yt,{...a,variant:O.ButtonVariant.Starter,appearance:e,iconBefore:t?l(t):void 0,iconAfter:s&&!t?l(s):s,style:{"--dial-kit-starter-icon-stroke":`url(#${i})`,...n}})},Dd=Ts(O.ButtonAppearance.Link,O.ButtonVariant.Primary),Os=Ts(O.ButtonAppearance.Ghost,O.ButtonVariant.Primary),wd=Ts(O.ButtonAppearance.Outlined,O.ButtonVariant.Neutral),Gt=({title:e,description:t,summary:s,errorCount:n=0,level:a=0,children:i,onRemove:o,defaultExpanded:l=!0,removeItemAriaLabel:c="Remove item"})=>{const[d,u]=g.useState(l),f=g.useId(),h=a===0;return r.jsxs("div",{className:S.mergeClasses("flex flex-col border border-tertiary",h?"rounded-xl bg-layer-raised":"rounded-lg",C.DIAL_KIT_CLASS.schemaRendererSection),children:[r.jsxs("div",{className:S.mergeClasses("flex items-center gap-2",h?"px-4 py-3":"px-3 py-2"),children:[r.jsxs("button",{type:"button","aria-expanded":d,"aria-controls":d?f:void 0,onClick:()=>u(p=>!p),className:"flex min-w-0 flex-1 items-center gap-2 rounded text-left text-primary focus-visible:outline focus-visible:outline-focus",children:[r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:S.mergeClasses("shrink-0 text-secondary transition-transform",!d&&"-rotate-90")}),r.jsx("span",{className:S.mergeClasses("truncate",h?"dial-small-semi-text":"dial-small-text"),children:e})]}),r.jsx(C.InfoButton,{caption:t}),s&&r.jsx("span",{className:"dial-tiny-text whitespace-nowrap text-secondary",children:s}),n>0?r.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap dial-tiny-text text-error",children:[r.jsx(_.IconAlertTriangle,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:"shrink-0"}),n," error",n>1?"s":""]}):r.jsx(_.IconCheck,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:"shrink-0 text-success"}),o&&r.jsx(C.DangerIconButton,{size:O.ElementSize.Small,icon:r.jsx(_.IconTrash,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),"aria-label":c,onClick:o,className:"shrink-0"})]}),d&&r.jsx("div",{id:f,className:S.mergeClasses("border-t border-tertiary",h?"p-4":"p-3"),children:i})]})},Ld=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o,readonly:l=!1,defaultExpanded:c=!0}=Ge(),[d,u]=g.useState(),f=Array.isArray(t)?t:[],h=e.items;if(!h)return r.jsx("p",{className:"dial-small-text text-secondary",children:o.noItemSchema});const p=q(h,i),m=p.discriminator,b=m?Object.keys(m.mapping).map(j=>({value:j,label:j})):[],x=d??b[0]?.value,v=()=>{let j;if(m&&x){const N=q({$ref:m.mapping[x]},i);j={...Ie(N,i)??{},[m.propertyName]:x}}else j=Ie(p,i)??Ar(p);s([...f,j])},y=j=>{s(f.filter((N,w)=>w!==j))},I=(j,N)=>{s(f.map((w,A)=>A===j?N:w))};return r.jsxs("div",{className:"flex flex-col gap-3",children:[f.length===0&&r.jsx("p",{className:"dial-small-text text-secondary",children:o.noItemsYet}),f.map((j,N)=>{const w=Aa(j,m?.propertyName,N),A=Ee(j,p,i,`${n.join(".")}[${N}]`);return r.jsx(Gt,{title:w,level:a,summary:_t(j,p,i),errorCount:A.length,onRemove:l?void 0:()=>y(N),defaultExpanded:c,removeItemAriaLabel:`${o.removeItemAriaLabel}: ${w}`,children:r.jsx(rt,{schema:h,value:j,onChange:D=>I(N,D),path:[...n,String(N)],level:a+1,ariaLabel:w})},N)}),!l&&r.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[b.length>0&&r.jsx(tt,{ariaLabel:o.selectTypeToAdd,options:b,value:x,placeholder:o.selectTypeToAdd,onChange:j=>u(typeof j=="string"?j:j[0]),className:"max-w-[280px] flex-1"}),r.jsx(Os,{label:o.addItem,iconBefore:r.jsx(_.IconPlus,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),onClick:v})]})]})};var As=(e=>(e.None="none",e.Both="both",e.Horizontal="horizontal",e.Vertical="vertical",e))(As||{});const pn={none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"},Td=e=>typeof e=="boolean"?pn[e?"both":"none"]:pn[e],$a=({className:e="",value:t,onChange:s,error:n,containerClassName:a,resize:i=!1,labelProps:o,caption:l,id:c,invalid:d,...u})=>{const f=S.mergeClasses("dial-kit-textarea dial-kit-input px-3 py-2",d&&"dial-kit-input-error",u.disabled&&"dial-kit-input-disable",Td(i),e);return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-2",a),children:[o&&r.jsx(C.Label,{...o,htmlFor:c}),r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx("textarea",{id:c,value:t||"",className:f,onChange:h=>s?.(h.currentTarget.value),...u}),r.jsx(C.ErrorText,{text:n}),!n&&r.jsx(C.CaptionText,{text:l})]})]})},hn=e=>{try{return JSON.parse(e),!0}catch{return!1}},_s=({value:e,onChange:t,id:s,ariaLabel:n})=>{const{readonly:a,texts:i}=Ge(),[o,l]=g.useState(()=>JSON.stringify(e,null,2)??""),c=!hn(o),d=u=>{l(u),hn(u)&&t(JSON.parse(u))};return r.jsx($a,{id:s,"aria-label":n,value:o,onChange:d,readOnly:a,invalid:c,error:c?i.invalidJsonError:void 0,spellCheck:!1,rows:10,resize:As.Vertical,className:"font-mono !whitespace-pre"})},Ed=/^0+\.(\d+)?$/,Od=/^0+/,Ad=[".","-","+","e","E"],mn=e=>!e||e==="-"?e:String(e).match(Ed)?String(e).replace(Od,"0"):Number(e),ks=({integer:e,onChange:t,min:s,max:n,onKeyDown:a,onPaste:i,...o})=>{const l=d=>{if(e&&Ad.includes(d.key)){d.preventDefault();return}C.handleKeyDown(d,"number",s,n),a?.(d)},c=d=>{if(e){const u=d.clipboardData.getData("text"),f=u.replace(/\D/g,"");if(f!==u&&(d.preventDefault(),f)){const h=d.currentTarget,p=h.selectionStart??0,m=h.selectionEnd??0,b=h.value.slice(0,p)+f+h.value.slice(m);t?.(mn(b))}}i?.(d)};return r.jsx(C.Input,{...o,wrapperClassName:S.mergeClasses(o.wrapperClassName,C.DIAL_KIT_CLASS.numberInput),type:"number",min:s,max:n,onChange:d=>t?.(mn(d)),onKeyDown:l,onPaste:c})},Va=({showPasswordLabel:e="Show password",hidePasswordLabel:t="Hide password",disabled:s,size:n=O.ElementSize.Standard,...a})=>{const[i,o]=g.useState(!1),l=i&&!s;return g.useEffect(()=>{s&&o(!1)},[s]),r.jsx(C.Input,{...a,wrapperClassName:S.mergeClasses(a.wrapperClassName,C.DIAL_KIT_CLASS.passwordInput),size:n,disabled:s,type:l?"text":"password",iconAfter:s?void 0:r.jsx(C.GhostIconButton,{size:O.ElementSize.Small,"aria-label":l?t:e,"aria-pressed":l,icon:l?r.jsx(_.IconEyeOff,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}):r.jsx(_.IconEye,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),onClick:()=>o(c=>!c)})})},_d="flex flex-col gap-2",kd="flex",Rd="mt-2 ml-[26px]",Md={[Ae.Column]:"flex-col gap-y-3",[Ae.Row]:"flex-row flex-wrap gap-x-4 gap-y-3"},Ut=({items:e,value:t,onChange:s,name:n,id:a,orientation:i=Ae.Column,labelProps:o,disabled:l,error:c,caption:d,ariaLabel:u,className:f,optionsClassName:h,radioClassName:p,contentClassName:m})=>{const b=g.useId(),x=a??b,v=`${x}-label`,y=c?`${x}-error`:void 0,I=!c&&d?`${x}-caption`:void 0,j=O.resolveAccessibleName(o?.label);return r.jsxs("div",{className:S.mergeClasses(_d,f,C.DIAL_KIT_CLASS.radioGroup),children:[o&&r.jsx(C.Label,{...o,id:v}),r.jsx("div",{role:"radiogroup","aria-labelledby":j?v:void 0,"aria-label":j?void 0:O.resolveAccessibleName(u),"aria-describedby":[y,I].filter(Boolean).join(" ")||void 0,"aria-disabled":l||void 0,className:S.mergeClasses(kd,Md[i],h),children:e.map(N=>{const w=N.value===t;return r.jsxs("div",{className:"flex min-w-0 flex-col",children:[r.jsx(C.Radio,{id:`${x}-${N.value}`,name:n??x,value:N.value,labelProps:N.label==null?void 0:{label:N.label},"aria-label":N["aria-label"],caption:N.caption,isSelected:w,disabled:l||N.disabled,onChange:s,className:p}),w&&N.content?r.jsx("div",{className:S.mergeClasses(Rd,m),children:N.content}):null]},N.value)})}),r.jsx(C.ErrorText,{id:y,text:c}),!c&&r.jsx(C.CaptionText,{id:I,text:d})]})},Ka=({id:e,labelProps:t,isOn:s=!1,disabled:n,onChange:a,caption:i,className:o,...l})=>{const c=g.useId(),d=e??c,u=i?`${d}-caption`:void 0,f=g.useCallback(h=>{a?.(h.target.checked)},[a]);return r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsxs("div",{className:S.mergeClasses("flex items-center gap-2",o,C.DIAL_KIT_CLASS.switch),children:[r.jsx("input",{...l,type:"checkbox",role:"switch",id:d,checked:s,"aria-checked":s,disabled:n,onChange:f,"aria-label":O.resolveAccessibleName(typeof t?.label!="string"?l["aria-label"]:void 0),"aria-describedby":u,className:"peer sr-only"}),r.jsx("label",{htmlFor:d,className:S.mergeClasses("flex h-[18px] w-[36px] shrink-0 items-center rounded-full p-0.5 transition-colors duration-200","peer-focus-visible:outline peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus",s?"justify-end":"justify-start",n?"cursor-not-allowed bg-control-disable-primary":S.mergeClasses("cursor-pointer",s?"bg-control-accent hover:bg-control-accent-hover":"bg-control-neutral-default hover:bg-control-neutral-hover-strong")),children:r.jsx("span",{className:S.mergeClasses("size-3.5 shrink-0 rounded-full",n?"bg-control-disable-secondary":"bg-control-neutral")})}),t&&r.jsx(C.Label,{size:O.ElementSize.Standard,...t,htmlFor:d,className:S.mergeClasses("py-[1px]",n?"cursor-not-allowed text-control-disable-primary":"cursor-pointer text-primary",t.className)})]}),i&&r.jsx("span",{id:u,className:"dial-tiny-text text-secondary ml-[44px]",children:i})]})},gn=e=>typeof e=="string"?e:e[0],Jr=e=>e!=null?String(e):"",Pd=e=>e!==void 0?Number(e):void 0,Wa=({schema:e,value:t,onChange:s,invalid:n,id:a,ariaLabel:i})=>{const{texts:o,readonly:l=!1,inputClassName:c,acceptableResourceTypes:d}=Ge(),u=e.const!==void 0,f=Array.isArray(e.enum)?e.enum:[],h=f.length>0;if(e["dial:resource"]===!0&&Array.isArray(e.acceptableResourceTypes)&&e.acceptableResourceTypes.length>0&&(e.type===F.String||e.type===void 0)){const m=(e.acceptableResourceTypes??[]).flatMap(b=>{const x=d?.[b];return Array.isArray(x)?x.map(v=>{const y=String(v);return{value:y,label:y}}):[]});return r.jsx(tt,{id:a,ariaLabel:i,options:m,value:t!=null?String(t):void 0,invalid:n,disabled:l,onChange:b=>s(gn(b)),placeholder:o.enumSelectPlaceholder,className:c})}if(u)return r.jsx(C.Input,{id:a,"aria-label":i,value:String(e.const??""),disabled:!0,containerClassName:c});if(h&&e.enumDisplay===gt.Radio)return r.jsx(Ut,{id:a,ariaLabel:i,items:f.map(m=>({value:String(m),label:String(m)})),value:t!=null?String(t):void 0,orientation:e.enumOrientation===At.Row?Ae.Row:Ae.Column,disabled:l,onChange:m=>s(m)});if(h)return r.jsx(tt,{id:a,ariaLabel:i,options:f.map(m=>({value:String(m),label:String(m)})),value:t!=null?String(t):void 0,invalid:n,disabled:l,onChange:m=>s(gn(m)),placeholder:o.enumSelectPlaceholder,className:c});switch(e.type){case F.Boolean:return r.jsx(Ka,{id:a,"aria-label":i,isOn:!!t,disabled:l,onChange:m=>s(m)});case F.Integer:case F.Number:return r.jsx(ks,{id:a,"aria-label":i,integer:e.type===F.Integer,value:Jr(t),invalid:n,disabled:l,onChange:m=>s(Pd(m)),placeholder:e.type===F.Integer?o.integerInputPlaceholder:o.numberInputPlaceholder,containerClassName:c});default:return e.isProtected?r.jsx(Va,{id:a,"aria-label":i,value:Jr(t),invalid:n,disabled:l,onChange:m=>s(m??void 0),placeholder:o.stringInputPlaceholder,containerClassName:c}):r.jsx(C.Input,{id:a,"aria-label":i,value:Jr(t),invalid:n,disabled:l,onChange:m=>s(m??void 0),placeholder:o.stringInputPlaceholder,containerClassName:c})}},xn=(e,t)=>({id:Math.random().toString(36).slice(2),key:e,value:t}),Za=e=>!!(e.oneOf||e.anyOf||e.type===F.Array||Ze(e)),zd={[F.String]:"entryTypeString",[F.Number]:"entryTypeNumber",[F.Boolean]:"entryTypeBoolean",[F.Null]:"entryTypeNull",[F.Object]:"entryTypeObject",[F.Array]:"entryTypeArray"},Cn=e=>typeof e=="string"?e:e[0],Bd=({pair:e,valueSchema:t,isUnschematizedValue:s,onKeyChange:n,onValueChange:a,onRemove:i,path:o,level:l})=>{const{rootSchema:c,texts:d,readonly:u=!1,inputClassName:f,defaultExpanded:h=!0,touchedPaths:p,markTouched:m,skipUntouched:b}=Ge(),[x,v]=g.useState(e.key),[y,I]=g.useState(()=>ka(e.value)),j=Za(t),N=s&&(y===F.Object||y===F.Array),w=s&&y===F.Null,A=s&&y===F.Boolean,D=j||N,T=[...o,e.id,"key"].join("."),E=Zt(T,p,b)&&e.key==="",L=e.key||d.valueColumnHeader,k=V=>{a(Ra(V)),I(V)},z=g.useMemo(()=>_a.map(V=>({value:V,label:d[zd[V]]})),[d]),R=g.useMemo(()=>[{value:"true",label:d.booleanTrueOption},{value:"false",label:d.booleanFalseOption}],[d]),Z=()=>w?r.jsx(C.Input,{"aria-label":L,value:"null",disabled:!0}):A?r.jsx(tt,{ariaLabel:L,options:R,value:e.value?"true":"false",disabled:u,onChange:V=>{const W=Cn(V);W&&a(W==="true")}}):r.jsx(Wa,{schema:s?{type:y}:t,value:e.value,onChange:a,ariaLabel:L}),H=r.jsxs("div",{className:"flex items-start gap-2",children:[r.jsx("div",{className:D?"min-w-0 flex-1":"w-2/5 min-w-0",children:r.jsx(C.Input,{"aria-label":d.keyColumnHeader,value:x,disabled:u,invalid:E,error:E?`${d.keyColumnHeader} is required`:void 0,onChange:V=>v(V??""),onBlur:()=>{m?.(T),x!==e.key&&n(x)},placeholder:d.keyInputPlaceholder,containerClassName:f})}),!D&&r.jsx("div",{className:"min-w-0 flex-1",children:Z()}),s&&r.jsx("div",{className:"w-28 shrink-0",children:r.jsx(C.Tooltip,{tooltip:d.entryTypeChangeWarning,triggerClassName:"block",children:r.jsx(tt,{ariaLabel:d.typeColumnHeader,options:z,value:y,disabled:u,onChange:V=>{const W=Cn(V);W&&k(W)}})})}),!u&&r.jsx(C.DangerIconButton,{size:O.ElementSize.Small,icon:r.jsx(_.IconTrash,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),"aria-label":e.key?`${d.removeFieldAriaLabel}: ${e.key}`:d.removeFieldAriaLabel,onClick:i,className:"mt-2 shrink-0"})]});if(!D)return H;if(N)return r.jsxs("div",{className:"flex flex-col gap-2",children:[H,r.jsx(_s,{value:e.value,onChange:a,ariaLabel:L},y)]});const B=[...o,e.key],K=Ee(e.value,t,c,B.join("."));return r.jsxs("div",{className:"flex flex-col gap-2",children:[H,r.jsx(Gt,{title:e.key,level:l,summary:_t(e.value,t,c),errorCount:K.length+(E?1:0),defaultExpanded:h,children:r.jsx(rt,{schema:t,value:e.value,onChange:a,path:B,level:l+1,ariaLabel:L})})]})},Fd=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o,readonly:l=!1}=Ge(),c=e.additionalProperties===!0||e.additionalProperties==null,d=!c&&typeof e.additionalProperties=="object"?q(e.additionalProperties,i):{type:F.String},u=Za(d),[f,h]=g.useState(()=>Object.entries(t??{}).map(([x,v])=>xn(x,v))),p=x=>{h(x),s(Object.fromEntries(x.filter(v=>v.key!=="").map(v=>[v.key,v.value])))},m=(x,v)=>p(f.map((y,I)=>I===x?{...y,...v}:y)),b=()=>{const x=u?Ie(d,i)??Ar(d):"";h(v=>[...v,xn("",x)])};return r.jsxs("div",{className:"flex flex-col gap-2",children:[f.length===0&&r.jsx("p",{className:"dial-small-text text-secondary",children:o.noFieldsYet}),f.length>0&&!u&&r.jsxs("div",{"aria-hidden":"true",className:"flex gap-2 pr-8",children:[r.jsx("span",{className:"w-2/5 dial-tiny-semi-text text-secondary",children:o.keyColumnHeader}),r.jsx("span",{className:"flex-1 dial-tiny-semi-text text-secondary",children:o.valueColumnHeader}),c&&r.jsx("span",{className:"w-28 shrink-0 dial-tiny-semi-text text-secondary",children:o.typeColumnHeader})]}),f.map((x,v)=>r.jsx(Bd,{pair:x,valueSchema:d,isUnschematizedValue:c,onKeyChange:y=>m(v,{key:y}),onValueChange:y=>m(v,{value:y}),onRemove:()=>p(f.filter((y,I)=>I!==v)),path:n,level:a},x.id)),!l&&r.jsx("div",{className:"pt-1",children:r.jsx(Os,{label:o.addField,iconBefore:r.jsx(_.IconPlus,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),onClick:b})})]})},ls=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o}=Ge(),l=q(e,i),c=Er(Object.entries(l.properties??{}).filter(([,f])=>!q(f,i).isHidden)),d=l.required??[],u=t??{};return c.length===0?r.jsx("p",{className:"dial-small-text text-secondary",children:o.noConfigurableProperties}):r.jsx("div",{className:"flex flex-col gap-4",children:c.map(([f,h])=>{const p=q(h,i);return r.jsx(Ga,{schema:h,value:u[f],onChange:m=>s({...u,[f]:m}),path:[...n,f],level:a,required:d.includes(f),label:p.title??h.title??xt(f)},f)})})},bn=e=>typeof e=="string"?e:e[0],Hd=(e,t)=>{const{[t]:s,...n}=e.properties??{};return{...e,properties:n}},$d=({schema:e,value:t,onChange:s,path:n,level:a,ariaLabel:i})=>{const{rootSchema:o,texts:l,readonly:c=!1}=Ge(),d=g.useId(),u=i??l.selectTypePlaceholder,f=e.discriminatorDisplay===gt.Radio,h=e.discriminator;if(h){const y=h.propertyName,I=h.mapping,j=D=>q({$ref:I[D]},o),N=typeof t=="object"&&t!==null?t[y]:void 0,w=N?j(N):void 0,A=D=>{const T=Ie(j(D),o)??{};s({...T,[y]:D})};if(f){const D=e.discriminatorOrientation===At.Row,T=L=>r.jsx(ls,{schema:Hd(L,y),value:t,onChange:s,path:n,level:a}),E=r.jsx(Ut,{id:d,ariaLabel:u,value:N,onChange:A,disabled:c,orientation:D?Ae.Row:Ae.Column,items:Object.keys(I).map(L=>{const k=j(L);return{value:L,label:k.title??L,content:D?void 0:T(k)}})});return D?r.jsxs("div",{className:"flex flex-col gap-3",children:[E,w&&T(w)]}):E}return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx(tt,{ariaLabel:u,options:Object.keys(I).map(D=>({value:D,label:D})),value:N,placeholder:l.selectTypePlaceholder,disabled:c,onChange:D=>{const T=bn(D);T&&A(T)},className:"max-w-[280px]"}),w&&r.jsx("div",{className:"pl-3",children:r.jsx(ls,{schema:w,value:t,onChange:s,path:n,level:a})})]})}const p=e.oneOf??[],b=(()=>{if(typeof t!="object"||t===null||Array.isArray(t))return 0;const y=p.findIndex(I=>q(I,o).required?.every(j=>j in t));return y>=0?y:0})(),x=p[b],v=y=>{const I=Ie(q(p[y],o),o);s(I??null)};return f?r.jsx(Ut,{id:d,ariaLabel:u,value:String(b),onChange:y=>v(Number(y)),disabled:c,items:p.map((y,I)=>({value:String(I),label:Or(y,o)??`Option ${I+1}`,content:r.jsx(rt,{schema:q(y,o),value:t,onChange:s,path:n,level:a,ariaLabel:i})}))}):r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx(tt,{ariaLabel:u,options:p.map((y,I)=>({value:String(I),label:q(y,o).title??`Option ${I+1}`})),value:String(b),disabled:c,onChange:y=>v(Number(bn(y))),className:"max-w-[280px]"}),x&&r.jsx("div",{className:"border-l-2 border-tertiary pl-3",children:r.jsx(rt,{schema:x,value:t,onChange:s,path:n,level:a,ariaLabel:i})})]})},rt=({schema:e,value:t,onChange:s,path:n,level:a,required:i,suppressInlineError:o=!1,fieldId:l,ariaLabel:c})=>{const{rootSchema:d,renderField:u,markTouched:f,touchedPaths:h,skipUntouched:p}=Ge(),m=q(e,d),b=n.join("."),x=I=>{f?.(b),s(I)},v={schema:m,value:t,onChange:x,path:n,level:a};let y;if(m.oneOf)y=r.jsx($d,{...v,ariaLabel:c});else if(m.anyOf&&m.type!==F.Object)y=r.jsx(Sd,{...v,ariaLabel:c});else if(Ze(m)){const I=m.additionalProperties!=null&&m.additionalProperties!==!1,j=!m.properties||Object.keys(m.properties).length===0;I&&j?y=r.jsx(Fd,{...v}):j&&m.additionalProperties!==!1?y=r.jsx(_s,{value:t,onChange:x,id:l,ariaLabel:c}):y=r.jsx(ls,{...v})}else if(m.type===F.Array)y=r.jsx(Ld,{...v});else{const I=Zt(b,h,p)&&!!i&&vt(t),j=!o&&I?er(m.title??c??"Field"):void 0;y=r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx(Wa,{schema:m,value:t,onChange:x,invalid:I,id:l,ariaLabel:c}),r.jsx(C.ErrorText,{text:j})]})}return u?u(n,m,y):y},Ga=({schema:e,value:t,onChange:s,path:n,level:a=0,required:i,label:o})=>{const l=g.useId(),{rootSchema:c,defaultExpanded:d=!0,touchedPaths:u,skipUntouched:f}=Ge(),h=q(e,c),p=n.join(".");if(Ze(h)||h.type===F.Array){const b=Ee(t,h,c,p),x=o??h.title??n[n.length-1]??"Section";return r.jsx(Gt,{title:x,description:h.description,level:a,summary:_t(t,h,c),errorCount:Zt(p,u,f,!0)?b.length:0,defaultExpanded:d,children:r.jsx(rt,{schema:h,value:t,onChange:s,path:n,level:a+1,required:i,ariaLabel:x})})}const m=Zt(p,u,f)&&i&&vt(t)?er(o??"Field"):void 0;return r.jsxs("div",{className:"flex flex-col gap-2",children:[r.jsx(C.Label,{htmlFor:l,label:o,required:i,caption:h.description}),r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx(rt,{schema:h,value:t,onChange:s,path:n,level:a,required:i,suppressInlineError:!0,fieldId:l,ariaLabel:o}),r.jsx(C.ErrorText,{text:m})]})]})},vn="dial-small-semi-text text-primary",Vd=({schema:e,defaultValue:t,texts:s,className:n,readonly:a=!1,defaultExpanded:i=!0,inputClassName:o,variant:l=He.Sections,onChange:c,onPropertyChange:d,onDefaultValues:u,renderField:f,skipUntouched:h=!1,acceptableResourceTypes:p})=>{const m=g.useMemo(()=>({...Ta,...s}),[s]),b=g.useMemo(()=>t||(Ie(e,e)??{}),[]),[x,v]=g.useState(b),[y,I]=g.useState(()=>new Set),j=g.useCallback(E=>{I(L=>L.has(E)?L:new Set([...L,E]))},[]);g.useEffect(()=>{u?.(b)},[]);const N=(E,L)=>{const k={...x,[E]:L};v(k),c?.(k),d?.(E,L)},w=new Set(Object.keys(e.properties??{})),A=Object.keys(x).filter(E=>!w.has(E)),D=Er(Object.entries(e.properties??{}).filter(([,E])=>!q(E,e).isHidden)),T=e.required??[];return r.jsx(Ba.Provider,{value:{rootSchema:e,texts:m,readonly:a,defaultExpanded:i,inputClassName:o,acceptableResourceTypes:p,renderField:f,touchedPaths:y,markTouched:j,skipUntouched:h},children:r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-4",n,C.DIAL_KIT_CLASS.schemaRenderer),children:[D.map(([E,L])=>{const k=q(L,e),z=k.title??L.title??xt(E),R=T.includes(E),Z=x[E],H=V=>N(E,V);if(l===He.Flat)return r.jsx(Ga,{schema:L,value:Z,onChange:H,path:[E],level:0,required:R,label:z},E);if(l===He.FlatSections)return r.jsxs("section",{className:"flex flex-col gap-3",children:[r.jsx("h2",{className:vn,children:z}),r.jsx(rt,{schema:L,value:Z,onChange:H,path:[E],level:0,required:R,ariaLabel:z})]},E);const B=Ee(Z,k,e,E),K=R&&vt(Z)?Math.max(B.length,1):B.length;return r.jsx(Gt,{title:z,description:k.description,level:0,defaultExpanded:i,errorCount:Zt(E,y,h,!0)?K:0,children:r.jsx(rt,{schema:L,value:Z,onChange:H,path:[E],level:1,required:R,ariaLabel:z})},E)}),A.map(E=>{const L=xt(E),k=r.jsx(_s,{value:x[E],onChange:z=>N(E,z),ariaLabel:L});return l===He.Sections?r.jsx(Gt,{title:L,level:0,defaultExpanded:i,children:k},E):r.jsxs("section",{className:"flex flex-col gap-3",children:[r.jsx("h2",{className:vn,children:L}),k]},E)})]})})},Kd=e=>({info:r.jsx(_.IconInfoCircleFilled,{size:e.size}),error:r.jsx(_.IconAlertCircleFilled,{size:e.size}),warning:r.jsx(_.IconAlertTriangleFilled,{size:e.size}),success:r.jsx(_.IconCircleCheckFilled,{size:e.size}),loading:r.jsx(Et,{size:e.size}),general:r.jsx(_.IconCheck,{size:e.size,stroke:e.stroke})}),Wd={[ce.Info]:"bg-info text-info",[ce.Success]:"bg-success text-success",[ce.Warning]:"bg-warning text-warning",[ce.Error]:"bg-error text-error",[ce.Loading]:"bg-layer-raised text-info",[ce.General]:"bg-layer-sunken text-primary"},Zd={[ce.Info]:"status",[ce.Success]:"status",[ce.Warning]:"alert",[ce.Error]:"alert",[ce.Loading]:"status",[ce.General]:"status"},Gd="items-center justify-between rounded-xl relative gap-3 p-3 border flex border-transparent",Rs=({variant:e=ce.Info,type:t=be.Toast,title:s,message:n,action:a,className:i,iconSize:o=24,iconStroke:l=2,closable:c=!1,onClose:d,children:u,textClassName:f,...h})=>{const p=g.useMemo(()=>Kd({size:o,stroke:l})[e],[e,o,l]),m=f??(t===be.SectionMessage?"flex-row flex-wrap items-baseline gap-x-1":"flex-col");return r.jsxs("div",{role:Zd[e],...h,className:S.mergeClasses(Gd,Wd[e],t===be.Toast&&"min-w-[200px] max-w-[600px] shadow-lg",t===be.SectionMessage&&e===ce.Loading&&"border-secondary",i,C.DIAL_KIT_CLASS.notification),children:[r.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[r.jsx("span",{"aria-hidden":"true",className:"flex shrink-0",children:r.jsx(C.DialIcon,{icon:p})}),s?r.jsxs("div",{className:S.mergeClasses("flex min-w-0 text-primary break-words",m),children:[r.jsx("div",{className:"dial-small-paragraph-semi-text min-w-0 break-words",children:s}),r.jsx("div",{className:"dial-small-paragraph-text min-w-0 break-words",children:n})]}):r.jsx("div",{className:"dial-small-paragraph-text min-w-0 text-primary break-words",children:n})]}),a!=null&&r.jsx("div",{className:"flex shrink-0 items-center",children:a}),u,c&&r.jsx(C.CloseButton,{className:"shrink-0 self-start",ariaLabel:"Close notification",onClose:b=>d?.(b)})]})},Ud=({className:e,children:t,...s})=>r.jsx("article",{...s,className:S.mergeClasses("relative flex flex-col gap-3 rounded-[20px] border-2 border-transparent p-5","bg-layer-raised shadow-md transition-[transform,box-shadow] duration-200 ease-out hover:-translate-y-[3px] hover:shadow-lg motion-reduce:transition-none motion-reduce:hover:translate-y-0",e,C.DIAL_KIT_CLASS.cardShell),children:t}),kt=(e,t)=>({type:n,...a})=>r.jsx(Rs,{...a,variant:e,type:n||t}),Rt=(e,t)=>({variant:n,...a})=>r.jsx(Rs,{...a,variant:n||t,type:e}),qd=kt(ce.Error,be.Toast),Yd=kt(ce.Info,be.Toast),Xd=kt(ce.Success,be.Toast),Jd=kt(ce.Warning,be.Toast),Qd=kt(ce.Loading,be.Toast),eu=kt(ce.General,be.Toast),tu=Rt(be.SectionMessage,ce.Error),ru=Rt(be.SectionMessage,ce.Info),su=Rt(be.SectionMessage,ce.Success),nu=Rt(be.SectionMessage,ce.Warning),au=Rt(be.SectionMessage,ce.Loading),iu=Rt(be.SectionMessage,ce.General);var Te=(e=>(e.Date="date",e.DateTime="datetime",e.Time="time",e.Weekday="weekday",e))(Te||{});const ou="en-GB",lu={[Te.Date]:"Select date",[Te.DateTime]:"Select date and time",[Te.Time]:"--:--",[Te.Weekday]:"Select day"},Ua="flex w-full items-center justify-between gap-2 rounded-xl border border-secondary bg-layer-raised px-4 py-3 dial-small-text text-primary outline-hidden transition-colors hover:border-accent-alpha focus-within:border-accent-focus",qa="!cursor-not-allowed !border-transparent bg-layer-sunken text-control-disable-primary hover:!border-transparent",Ya="!border-error",cu="z-floating flex w-[248px] flex-col gap-4 rounded-lg bg-layer-raised px-2 py-4 shadow-md",du="flex size-10 items-center justify-center rounded-full dial-small-text text-primary hover:bg-control-accent-alpha-hover hover:text-primary focus:outline-hidden focus-visible:outline focus-visible:outline-focus",uu="bg-control-accent text-control-permanent",fu="text-accent dial-small-semi-text",pu="text-control-disable-primary",Xa="text-secondary",hu=r.jsx(_.IconCalendar,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:Xa}),yn={prev:r.jsx(_.IconChevronLeft,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),next:r.jsx(_.IconChevronRight,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})},mu=(e,t)=>{const n=(new Date(e,t,1).getDay()+6)%7,a=new Date(e,t,1-n);return Array.from({length:42},(i,o)=>{const l=new Date(a);return l.setDate(a.getDate()+o),l})},Sn=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),In=(e,t,s)=>{const n=new Date(e.getFullYear(),e.getMonth(),e.getDate());if(t){const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());if(n<a)return!0}if(s){const a=new Date(s.getFullYear(),s.getMonth(),s.getDate());if(n>a)return!0}return!1},gu=(e,t)=>e.toLocaleDateString(t,{month:"long",year:"numeric"}),Nn=(e,t)=>e.toLocaleDateString(t,{day:"numeric",month:"short",year:"numeric"}),xu=(e,t)=>e.toLocaleDateString(t,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),or=e=>`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,jn=(e,t)=>{const[s,n]=t.split(":").map(Number),a=new Date(e);return a.setHours(s||0,n||0,0,0),a},Cu=e=>/^([01]\d|2[0-3]):[0-5]\d$/.test(e),bu=e=>{const t=e.replace(/\D/g,"").slice(0,4);let s=t.slice(0,2);const n=t.slice(2,4);if(s.length===2&&(s=String(Math.min(Number(s),23)).padStart(2,"0")),n.length===0)return s;const a=String(Math.min(Number(n),59)).padStart(n.length,"0");return`${s}:${a}`},Ja=5,Qa=e=>e.charAt(0).toUpperCase()+e.slice(1),vu=e=>Array.from({length:7},(t,s)=>{const n=new Date(Date.UTC(1970,0,Ja+s));return Qa(n.toLocaleDateString(e,{weekday:"short",timeZone:"UTC"}))}),yu=e=>Array.from({length:7},(t,s)=>{const n=new Date(Date.UTC(1970,0,Ja+s));return{value:String(s+1),label:Qa(n.toLocaleDateString(e,{weekday:"long",timeZone:"UTC"}))}}),Dn=({id:e,disabled:t,invalid:s,trigger:n,panelClassName:a,fieldClassName:i,panel:o,labelledBy:l,panelLabel:c})=>{const d=C.useThemeScope(),[u,f]=g.useState(!1),{refs:h,floatingStyles:p,context:m}=J.useFloating({open:u,onOpenChange:j=>f(t?!1:j),placement:"bottom-start",whileElementsMounted:J.autoUpdate,middleware:[J.offset(8),J.flip({padding:8}),J.shift({padding:8})]}),b=J.useClick(m,{enabled:!t}),x=J.useDismiss(m),v=J.useRole(m,{role:"dialog"}),{getReferenceProps:y,getFloatingProps:I}=J.useInteractions([b,x,v]);return r.jsxs(r.Fragment,{children:[r.jsx("div",{id:e,ref:h.setReference,role:"button","aria-haspopup":"dialog","aria-expanded":u,"aria-disabled":t,"aria-labelledby":l,tabIndex:t?-1:0,className:S.mergeClasses(Ua,"focus-visible:outline focus-visible:outline-focus",s&&Ya,t&&qa,i),...y(),children:n}),u&&r.jsx(J.FloatingPortal,{children:r.jsx(J.FloatingFocusManager,{context:m,modal:!1,initialFocus:-1,returnFocus:!0,children:r.jsx("div",{ref:h.setFloating,style:p,"aria-label":c,className:S.mergeClasses(cu,d,a),...I(),children:o(()=>f(!1))})})})]})},wn=({id:e,value:t,onChange:s,onBlur:n,disabled:a,invalid:i,className:o,ariaLabel:l,placeholder:c="--:--",timezoneLabel:d,timezoneLabelClassName:u})=>{const[f,h]=g.useState(t);g.useEffect(()=>{h(t)},[t]);const p=r.jsx("input",{id:e,type:"text",inputMode:"numeric",autoComplete:"off","aria-label":l,placeholder:c,disabled:a,value:f,onChange:m=>{const b=bu(m.target.value);h(b),Cu(b)&&s(b)},onBlur:n,className:S.mergeClasses(Ua,i&&Ya,a&&qa,o)});return d?r.jsxs("div",{className:"relative w-full",children:[p,r.jsx("span",{className:S.mergeClasses("dial-small-paragraph-text pointer-events-none absolute end-4 top-1/2 -translate-y-1/2 truncate text-secondary",u),children:d})]}):p},Su=({mode:e=Te.Date,value:t,onChange:s,onBlur:n,labelProps:a,placeholder:i,disabled:o=!1,invalid:l=!1,id:c,className:d,minDate:u,maxDate:f,locale:h=ou,fieldClassName:p,showTimezone:m=!1})=>{const b=i??lu[e],x=t instanceof Date?t:null,v=g.useId(),y=c??v,I=a?.id??`${y}-label`,j=!!a?.label,N=typeof a?.label=="string"?a.label:void 0,w=j?`${I} ${y}`:void 0,A=a?r.jsx(C.Label,{...a,id:I,htmlFor:y}):null,[D,T]=g.useState(()=>x??new Date),E=g.useMemo(()=>new Date,[]),L=g.useMemo(()=>m?wa({locale:h}):null,[m,h]),k=g.useMemo(()=>vu(h),[h]),z=g.useMemo(()=>yu(h),[h]),R=g.useMemo(()=>mu(D.getFullYear(),D.getMonth()),[D]),Z=V=>{T(W=>new Date(W.getFullYear(),W.getMonth()+V,1))},H=(V,W)=>{if(In(V,u,f))return;const oe=e===Te.DateTime&&x?jn(V,or(x)):V;s?.(oe),e===Te.Date&&W()},B=V=>{s?.(jn(x??new Date,V))},K=()=>x?e===Te.DateTime?`${Nn(x,h)}, ${or(x)}`:Nn(x,h):b;if(e===Te.Time){const V=typeof t=="string"?t:x?or(x):"";return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-y-3",d,C.DIAL_KIT_CLASS.calendar),children:[A,r.jsx(wn,{id:y,value:V,onChange:W=>s?.(W),onBlur:n,disabled:o,invalid:l,placeholder:b,className:p,timezoneLabel:L})]})}if(e===Te.Weekday){const V=typeof t=="string"?t:void 0,W=z.find(oe=>oe.value===V);return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-y-3",d,C.DIAL_KIT_CLASS.calendar),children:[A,r.jsx(Dn,{id:y,disabled:o,invalid:l,labelledBy:w,panelLabel:N??b,fieldClassName:p,trigger:r.jsxs(r.Fragment,{children:[r.jsx("span",{className:S.mergeClasses("truncate",!W&&"text-secondary"),children:W?.label??b}),r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:Xa})]}),panel:oe=>r.jsx("div",{role:"listbox","aria-label":N??b,className:"flex flex-col gap-0.5",children:z.map(X=>r.jsx("button",{type:"button",role:"option","aria-selected":X.value===V,className:S.mergeClasses("flex w-full items-center rounded-lg px-3 py-2 text-left dial-small-text text-primary hover:bg-control-accent-alpha-hover","focus-visible:outline focus-visible:outline-focus",X.value===V&&"bg-control-accent-alpha-hover"),onClick:()=>{s?.(X.value),oe()},children:X.label},X.value))})})]})}return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-y-3",d,C.DIAL_KIT_CLASS.calendar),children:[A,r.jsx(Dn,{id:y,disabled:o,invalid:l,labelledBy:w,panelLabel:N??b,fieldClassName:p,trigger:r.jsxs(r.Fragment,{children:[r.jsx("span",{className:S.mergeClasses("truncate",!x&&"text-secondary"),children:K()}),hu]}),panel:V=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(C.StaticIconButton,{"aria-label":"Previous month",icon:yn.prev,size:O.ElementSize.Small,onClick:()=>Z(-1)}),r.jsx("div",{className:"dial-small-semi-text text-primary","aria-live":"polite",children:gu(D,h)}),r.jsx(C.StaticIconButton,{"aria-label":"Next month",icon:yn.next,size:O.ElementSize.Small,onClick:()=>Z(1)})]}),r.jsxs("div",{className:"grid grid-cols-7 gap-y-1 text-center",children:[k.map(W=>r.jsx("div",{"aria-hidden":"true",className:"dial-tiny-text py-1 text-secondary",children:W},W)),R.map(W=>{const oe=W.getMonth()!==D.getMonth(),X=Sn(W,x),le=Sn(W,E),G=In(W,u,f);return r.jsx("button",{type:"button",disabled:G,"aria-label":xu(W,h),"aria-pressed":X,"aria-current":le?"date":void 0,className:S.mergeClasses(du,oe&&pu,le&&!X&&fu,X&&uu,G&&"cursor-not-allowed opacity-40 hover:bg-transparent"),onClick:()=>H(W,V),children:W.getDate()},W.toISOString())})]}),e===Te.DateTime&&r.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-secondary pt-3",children:[r.jsx("span",{className:"dial-small-text text-primary",children:"Time"}),r.jsx(wn,{ariaLabel:"Time",value:x?or(x):"",onChange:B,onBlur:n,className:S.mergeClasses(!L&&"w-[120px]","px-3 py-1.5"),timezoneLabel:L,timezoneLabelClassName:"end-3 max-w-[60%]"})]})]})})]})},Iu=3,Nu=({segments:e,labelClassName:t="dial-small-text",leafClassName:s="dial-small-semi-text",className:n,ariaLabel:a="Folder path"})=>{const i=r.jsx(C.DialIcon,{icon:r.jsx(_.IconFolder,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),className:"text-secondary"}),o=r.jsx(C.DialIcon,{icon:r.jsx(_.IconChevronRight,{size:14,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:"rtl:scale-x-[-1]"}),className:"text-secondary"}),l=S.mergeClasses(t,"text-secondary","!cursor-default"),c=f=>{const h=f===e.length-1;return r.jsx(Lt,{label:h?r.jsx("span",{className:s,children:e[f]}):e[f],disabled:!0,iconBefore:f===0?i:void 0,isFirst:f===0&&e.length>1,isLast:h,separator:o,labelClassName:l},`item-${f}`)},d=e.length>Iu,u=e.slice(1,-2);return r.jsx("nav",{"aria-label":a,className:S.mergeClasses(na,n,C.DIAL_KIT_CLASS.folderPath),children:r.jsx("ol",{className:aa,children:d?r.jsxs(r.Fragment,{children:[c(0),r.jsxs("li",{className:S.mergeClasses(vs,"shrink-0"),children:[r.jsxs(C.Tooltip,{tooltip:e.join(" > "),triggerClassName:"inline-flex cursor-default items-center text-secondary",children:[r.jsx(_.IconDots,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),r.jsx("span",{className:"sr-only",children:u.join(", ")})]}),r.jsx("span",{className:ys,children:o})]}),c(e.length-2),c(e.length-1)]}):e.map((f,h)=>c(h))})})};var bt=(e=>(e.Small="small",e.Heading="heading",e))(bt||{});const ju="w-full overflow-hidden",Du="flex min-w-0 flex-nowrap items-center gap-2 whitespace-nowrap",Ln="flex min-w-0 items-center gap-2",Tn={[bt.Small]:"dial-small-text",[bt.Heading]:"dial-h2-text"},wu={[bt.Small]:"dial-small-semi-text",[bt.Heading]:"dial-h2-text"},Lu={first:"shrink-0",middle:"min-w-0 max-w-[30%] shrink",last:"min-w-0 max-w-[51%] shrink"},Tu="flex min-w-0 flex-1 items-center gap-1 rounded-xs transition-colors",Eu="text-secondary hover:text-accent focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-focus",Ou="cursor-default text-primary",Au="cursor-default text-secondary",En="inline-flex flex-none items-center leading-none text-secondary",_u="dial-kit-minimum-target flex shrink-0 items-center rounded-xs text-secondary transition-colors hover:text-accent focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-focus",ku=3,Ru=4,Mu=r.jsx(_.IconChevronRight,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:"rtl:scale-x-[-1]"}),Pu=({items:e,maxVisibleItems:t=Ru,size:s=bt.Small,separator:n=Mu,ariaLabel:a="Breadcrumb",overflowAriaLabel:i="Show hidden path segments",className:o,itemClassName:l})=>{const c=Math.max(t,ku),d=g.useMemo(()=>e.length>c?e.slice(1,-(c-2)):[],[e,c]),u=g.useMemo(()=>d.map((m,b)=>({key:String(b),label:m.label,icon:m.icon})),[d]),f=g.useCallback(({key:m,domEvent:b})=>{const x=d[Number(m)];x&&(x.onClick?.(b),!x.onClick&&x.href&&!b.defaultPrevented&&(window.location.href=x.href))},[d]);if(e.length===0)return null;const h=e.slice(d.length+1),p=(m,{index:b,isFirst:x,isCurrent:v})=>{const y=!v&&(!!m.href||!!m.onClick),I=S.mergeClasses(Tu,y?Eu:v?S.mergeClasses(Ou,wu[s]):Au,l,C.DIAL_KIT_CLASS.breadcrumbsItem),j=r.jsxs(r.Fragment,{children:[m.icon,r.jsx(C.EllipsisTooltip,{text:m.label})]});return r.jsxs("li",{className:S.mergeClasses(Ln,Tn[s],Lu[v?"last":x?"first":"middle"]),children:[y?m.href?r.jsx("a",{href:m.href,onClick:m.onClick,className:I,children:j}):r.jsx("button",{type:"button",onClick:m.onClick,className:I,children:j}):r.jsx("span",{className:I,"aria-current":v?"page":void 0,children:j}),!v&&r.jsx("span",{className:En,"aria-hidden":"true",children:n})]},`segment-${b}`)};return r.jsx("nav",{"aria-label":a,className:S.mergeClasses(ju,o,C.DIAL_KIT_CLASS.breadcrumbs),children:r.jsxs("ol",{className:Du,children:[p(e[0],{index:0,isFirst:!0,isCurrent:e.length===1}),d.length>0&&r.jsxs("li",{className:S.mergeClasses(Ln,Tn[s],"shrink-0"),children:[r.jsx(C.Dropdown,{items:u,onItemClick:f,placement:"bottom-start",matchReferenceWidth:!1,children:r.jsx("button",{type:"button","aria-label":i,className:_u,children:r.jsx(_.IconDots,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})})}),r.jsx("span",{className:En,"aria-hidden":"true",children:n})]}),h.map((m,b)=>p(m,{index:e.length-h.length+b,isFirst:!1,isCurrent:b===h.length-1}))]})})},zu=({className:e,icon:t,tooltipProps:s,type:n="button",...a})=>{const i=S.mergeClasses("flex items-center justify-center rounded-full size-[40px]","dial-kit-enhanced-target","dial-kit-fab-button disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-focus outline-offset-0",e),o=r.jsx("button",{...a,type:n,className:i,"aria-label":O.resolveAccessibleName(a["aria-label"],s?.tooltip),children:t||r.jsx(_.IconArrowNarrowDown,{size:24,stroke:1.5,"aria-hidden":"true"})});return s?r.jsx(O.DialTooltip,{...s,children:o}):o},Bu=e=>r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":!0,className:S.mergeClasses("transition-transform",e&&"rotate-180")}),Fu=({variant:e,appearance:t,items:s,dropdownProps:n,...a})=>{const[i,o]=g.useState(!1),l=g.useMemo(()=>Bu(i),[i]);return r.jsx("div",{className:C.DIAL_KIT_CLASS.buttonDropdown,children:r.jsx(C.Dropdown,{...n,items:s,onOpenChange:c=>o(c),children:r.jsx(yt,{...a,iconAfter:l,variant:e||O.ButtonVariant.Primary,appearance:t||O.ButtonAppearance.Solid,"aria-haspopup":"menu","aria-expanded":i})})})},ei=({label:e,size:t,isOpen:s=!1,labelClassName:n,className:a,"aria-label":i,...o})=>{const l=t===O.ElementSize.Small?"h-[32px]":"h-[40px] dial-kit-enhanced-target";return r.jsxs("button",{type:"button",...o,"aria-haspopup":"menu","aria-expanded":s,"aria-label":i?`${i} ${e}`:void 0,className:S.mergeClasses("dial-small-paragraph-text px-3 focus-visible:outline focus-visible:outline-focus","flex items-center gap-1 rounded-full text-primary disabled:text-control-disable-primary","hover:bg-control-accent-alpha-hover focus-visible:outline-offset-2 active:bg-control-accent-alpha-active",l,a,C.DIAL_KIT_CLASS.inlineSelect),children:[r.jsx("span",{className:n,children:e}),r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":!0,className:S.mergeClasses("transition-transform",s&&"rotate-180")})]})},Hu=({items:e,selectedKey:t,defaultSelectedKey:s,onSelect:n,size:a,disabled:i,placement:o="bottom-end",matchReferenceWidth:l=!1,listClassName:c,listStyle:d,ariaLabel:u,triggerClassName:f,triggerLabelClassName:h,open:p,onOpenChange:m})=>{const[b,x]=g.useState(!1),v=p!==void 0,y=v?p:b,I=g.useCallback(E=>{v||x(E),m?.(E)},[v,m]),[j,N]=g.useState(s??e[0]?.key),w=t!==void 0,A=w?t:j,D=g.useMemo(()=>{const E=e.find(L=>L.key===A);return E?.label?String(E.label):""},[e,A]),T=g.useCallback(({key:E})=>{const L=e.find(k=>k.key===E);L&&(w||N(E),n?.(L))},[e,w,n]);return r.jsx(C.Dropdown,{items:e,placement:o,matchReferenceWidth:l,listClassName:c,listStyle:d,disabled:i,open:v?p:void 0,onOpenChange:I,onItemClick:T,children:r.jsx(ei,{label:D,size:a,isOpen:y,disabled:i,"aria-label":u,className:f,labelClassName:h})})},$u="z-popup flex items-center justify-center bg-backdrop md:p-4 gap-5 p-6",Vu="relative flex w-full max-h-full flex-col rounded-xl bg-layer-raised md:h-auto",Ku="flex flex-row items-center justify-between px-6 py-4",Wu="flex-1 min-w-0 mr-3 truncate dial-h1-text text-primary",Zu="border-b border-tertiary",Gu="flex flex-row items-center gap-2 px-6 py-4",Uu="border-t border-tertiary",Qr="flex shrink-0 flex-row items-center gap-2",qu="ml-auto mobile:flex-1",br="mobile:flex-1",Yu={[De.Sm]:"max-w-full md:max-w-[400px]",[De.Md]:"max-w-full md:max-w-[800px]",[De.Lg]:"max-w-full md:max-w-[1200px]"},Ms=({open:e=!1,header:t,ariaLabel:s,portalId:n,className:a,overlayClassName:i,overlayStyle:o,titleClassName:l,headerClassName:c,bodyClassName:d,children:u,footer:f,footerClassName:h,onClose:p,onBack:m,backAriaLabel:b="Back",headerActions:x,headerDivider:v=!1,mainButtons:y,additionalButtons:I,additionalButtonsOnLeft:j=!1,footerDivider:N=!1,size:w=De.Md,hideClose:A=!1,closeAriaLabel:D="Close dialog",closeOnOutsideClick:T=!0,preventKeyboardOnOpen:E=!1})=>{const L=C.useThemeScope(),k=g.useRef(null),z=g.useId(),{refs:R,context:Z}=J.useFloating({open:e,onOpenChange:G=>{G||p?.(null)}}),H=J.useRole(Z,{role:"dialog"}),B=J.useDismiss(Z,{outsidePress:T}),{getFloatingProps:K}=J.useInteractions([H,B]);if(!e)return null;const V=typeof t=="string"?`popup-heading-${z}`:void 0,W=G=>G?typeof G=="string"?r.jsx("h2",{id:V,className:S.mergeClasses(Wu,l),children:r.jsx(C.Tooltip,{tooltip:G,triggerClassName:"truncate",children:G})}):G:r.jsx("span",{}),oe=A?null:r.jsx(C.CloseButton,{ariaLabel:D,onClose:G=>p?.(G)}),X=(G,ee=[],ae)=>ee.map(({variant:de=O.ButtonVariant.Neutral,className:me,...Ne},xe)=>r.jsx(yt,{variant:de,className:S.mergeClasses(ae,me),...Ne},`${G}-${xe}`)),le=()=>{if(f!==void 0)return f;if(!y?.length&&!I?.length)return null;const G=X("additional",I,j?void 0:br);return r.jsxs("div",{className:S.mergeClasses(Gu,N&&Uu,h),children:[j&&G.length>0&&r.jsx("div",{className:Qr,children:G}),r.jsxs("div",{className:S.mergeClasses(Qr,qu),children:[!j&&G,X("main",y,br)]})]})};return r.jsx(J.FloatingPortal,{id:n,children:r.jsx(J.FloatingOverlay,{style:o,className:S.mergeClasses($u,L,i),children:r.jsx(J.FloatingFocusManager,{context:Z,initialFocus:E?k:R.floating,children:r.jsxs("div",{ref:R.setFloating,...K(),role:"dialog","aria-modal":"true","aria-labelledby":V,"aria-label":V?void 0:s,className:S.mergeClasses(Vu,Yu[w],a,C.DIAL_KIT_CLASS.popup),children:[E&&r.jsx("div",{ref:k,tabIndex:-1,"aria-hidden":!0,className:"absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"}),r.jsxs("div",{className:S.mergeClasses(Ku,v&&Zu,c),children:[m&&r.jsx(C.GhostIconButton,{"aria-label":b,size:O.ElementSize.Small,className:"mr-2",onClick:m,icon:r.jsx(_.IconChevronLeft,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})}),W(t),x?r.jsxs("div",{className:Qr,children:[x,oe]}):oe]}),r.jsx("div",{className:S.mergeClasses("grow overflow-auto",d),children:u}),le()]})})})})},Xu="flex justify-end gap-2 px-6 py-4 border-t border-tertiary",Ju="text-secondary dial-small-paragraph-text px-6 pb-4",Qu="px-6 py-4 h-[120px]",ef="Cancel",tf="Ok",On={[Je.Info]:{confirm:{variant:O.ButtonVariant.Primary,appearance:O.ButtonAppearance.Solid}},[Je.Danger]:{confirm:{variant:O.ButtonVariant.Danger,appearance:O.ButtonAppearance.Solid}}},ti=({header:e,description:t,descriptionClassName:s,open:n=!1,confirmLabel:a=tf,cancelLabel:i=ef,isLoading:o=!1,disableConfirmButton:l=!1,className:c,confirmClassName:d,onClose:u,onConfirm:f,onCancel:h,children:p,variant:m=Je.Info,size:b=De.Sm,footer:x,hideClose:v,...y})=>{const I=o?null:r.jsxs("div",{className:Xu,children:[r.jsx(Es,{className:br,label:i,onClick:()=>h?h():u?.()}),r.jsx(yt,{variant:On[m].confirm.variant,appearance:On[m].confirm.appearance,className:S.mergeClasses(br,d),label:a,disabled:l,onClick:f})]}),j=g.useCallback(()=>o?r.jsx("div",{className:Qu,children:r.jsx(Et,{size:40})}):p??(t?r.jsx("div",{className:S.mergeClasses(Ju,s),children:t}):null),[p,t,o,s]);return r.jsx(Ms,{...y,open:n,header:e,className:S.mergeClasses(c,C.DIAL_KIT_CLASS.confirmationPopup),onClose:()=>u?.(),footer:x??I,size:b,hideClose:v??(!o&&x===void 0),children:j()})};var vr=(e=>(e.Start="start",e.End="end",e))(vr||{});const rf=({title:e,description:t,children:s,expanded:n,defaultExpanded:a=!1,disabled:i,nonCollapsible:o,ariaLabel:l,onToggle:c,caretPosition:d=vr.End,className:u,headerClassName:f,contentClassName:h})=>{const p=n!==void 0,[m,b]=g.useState(a),x=o?!0:p?n:m,v=g.useId(),y=`accordion-header-${v}`,I=`accordion-content-${v}`,j=()=>{if(i)return;const T=!x;p||b(T),c?.(T)},N=d===vr.Start,w=o?null:r.jsx(_.IconChevronRight,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:S.mergeClasses("shrink-0 text-secondary transition-transform motion-reduce:transition-none",x?"rotate-90":"rtl:rotate-180")}),A=r.jsxs(r.Fragment,{children:[N&&w,r.jsxs("span",{className:"flex min-w-0 flex-col",children:[r.jsx("span",{className:"truncate dial-body-text text-primary",children:e}),t?r.jsx("span",{className:"truncate dial-tiny-text text-secondary",children:t}):null]}),!N&&w]}),D=N?"justify-start gap-2":"justify-between";return r.jsxs("div",{className:S.mergeClasses("flex flex-col py-3 overflow-hidden bg-transparent",u,C.DIAL_KIT_CLASS.accordion),children:[o?r.jsx("div",{id:y,className:S.mergeClasses("flex w-full px-4 rounded-xl items-center dial-tiny-text",D,f),children:A}):r.jsx("button",{id:y,type:"button","aria-expanded":x,"aria-controls":I,"aria-label":O.resolveAccessibleName(l),disabled:i,onClick:j,className:S.mergeClasses("flex w-full px-4 rounded-xl items-center dial-tiny-text",D,i?"cursor-not-allowed opacity-75":"cursor-pointer hover:bg-control-accent-alpha-hover focus-visible:outline focus-visible:outline-focus",f),children:A}),r.jsx("div",{inert:!x,className:S.mergeClasses("grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",x?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:r.jsx("div",{className:"min-h-0 overflow-hidden",children:r.jsx("div",{className:"pt-3",children:r.jsx("div",{id:I,role:"region","aria-labelledby":y,className:S.mergeClasses("px-4 dial-small-text text-primary",h),children:s})})})})]})},sf="dial-kit-input flex flex-row items-center justify-between gap-x-2 px-3 text-left",nf="min-w-0 flex-1 truncate text-primary",af="min-w-0 flex-1 truncate text-secondary",of="shrink-0 text-secondary",lf="px-6 pb-4",cf="flex justify-end gap-2 px-6 py-4 border-t border-tertiary",df="Cancel",uf="Apply",ff=({items:e,value:t,customValue:s,header:n,onApply:a,id:i,labelProps:o,placeholder:l,selectedValue:c,onSelectionChange:d,onCancel:u,onClose:f,isValid:h=!0,applyButtonLabel:p=uf,cancelButtonLabel:m=df,size:b=De.Md,portalId:x,disabled:v,invalid:y,error:I,caption:j,ariaLabel:N,className:w,fieldClassName:A})=>{const D=g.useId(),T=i??D,E=`${T}-label`,L=`${T}-value`,k=I?`${T}-error`:void 0,z=!I&&j?`${T}-caption`:void 0,[R,Z]=g.useState(!1),H=c!==void 0,[B,K]=g.useState(t),V=H?c:B,W=g.useCallback(()=>{v||(H||K(t),Z(!0))},[v,H,t]),oe=g.useCallback(()=>{Z(!1),f?.()},[f]),X=g.useCallback(()=>{u?.(),oe()},[u,oe]),le=g.useCallback(()=>{a(V),oe()},[a,V,oe]),G=g.useCallback(U=>{H||K(U),d?.(U)},[H,d]),ee=O.resolveAccessibleName(o?.label),ae=ee?void 0:O.resolveAccessibleName(N),de=ee?E:ae&&`${T}-name`,me=O.resolveAccessibleName(n),Ne=e.find(U=>U.value===t)?.label,xe=s??Ne;return r.jsxs("div",{className:S.mergeClasses("flex w-full flex-col gap-2",w,C.DIAL_KIT_CLASS.radioGroupPopupField),children:[o&&r.jsx(C.Label,{...o,id:E,htmlFor:T}),r.jsxs("div",{className:"flex flex-col gap-1",children:[ae&&r.jsx("span",{id:de,className:"sr-only",children:ae}),r.jsxs("button",{type:"button",id:T,disabled:v,"aria-haspopup":"dialog","aria-expanded":R,"aria-labelledby":de?`${de} ${L}`:void 0,"aria-describedby":[k,z].filter(Boolean).join(" ")||void 0,onClick:W,className:S.mergeClasses(sf,y&&"dial-kit-input-error",v&&"dial-kit-input-disable",A),children:[r.jsx("span",{id:L,className:xe==null?af:nf,children:xe??l}),r.jsx(_.IconMaximize,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:of})]}),r.jsx(C.ErrorText,{id:k,text:I}),!I&&r.jsx(C.CaptionText,{id:z,text:j})]}),r.jsx(Ms,{open:R,header:n,ariaLabel:me?void 0:ee,portalId:x,size:b,onClose:X,footer:r.jsxs("div",{className:cf,children:[r.jsx(Es,{label:m,onClick:X}),r.jsx(Ha,{label:p,disabled:!h,onClick:le})]}),children:r.jsx("div",{className:lf,children:r.jsx(Ut,{id:`${T}-options`,items:e,value:V,onChange:G,orientation:Ae.Column,ariaLabel:ee??me})})})]})},pf=({icon:e,selectedIcon:t,isSelected:s=!1,onToggle:n,onClick:a,tooltipProps:i,size:o=O.ElementSize.Small,className:l,...c})=>{const d=g.useCallback(f=>{a?.(f),n?.(!s)},[a,n,s]),u=r.jsx(C.IconButton,{...c,size:o,variant:O.ButtonVariant.Primary,appearance:O.ButtonAppearance.Ghost,icon:s?t??e:e,"aria-pressed":s,"aria-label":O.resolveAccessibleName(c["aria-label"],i?.tooltip),onClick:d,className:S.mergeClasses("!rounded","[&_svg]:size-4",s&&"!text-accent",l,C.DIAL_KIT_CLASS.toggleIconButton)});return i?r.jsx(C.Tooltip,{asChild:!0,...i,children:u}):u},hf=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End"],mf="inline-flex w-fit items-center gap-1 rounded-full border border-tertiary bg-layer-sunken p-[3px]",gf="flex h-8 min-w-8 grow shrink-0 basis-auto items-center justify-center gap-2 whitespace-nowrap rounded-full px-4 dial-small-text transition-colors duration-200 outline-offset-0 focus-visible:outline focus-visible:outline-focus",xf="bg-layer-raised text-accent shadow-xs",Cf="bg-transparent text-secondary",bf="cursor-pointer hover:bg-control-accent-alpha-hover active:bg-control-accent-alpha-active",vf="cursor-pointer hover:bg-control-accent-alpha-hover hover:text-accent active:bg-control-accent-alpha-active",yf="cursor-not-allowed bg-control-disable-primary text-control-disable-primary shadow-none",Sf="cursor-not-allowed bg-transparent text-control-disable-primary",If=({items:e,value:t,onChange:s,disabled:n,className:a,segmentClassName:i,"aria-label":o})=>{const l=g.useRef({}),c=e.find(f=>f.value===t),d=c&&!c.disabled?c.value:e.find(f=>!f.disabled)?.value,u=g.useCallback(f=>{if(n||!hf.includes(f.key))return;const h=e.filter(v=>!v.disabled);if(h.length===0)return;const p=Math.max(h.findIndex(v=>v.value===t),0),m=h.length-1;let b=p;switch(f.key){case"ArrowRight":case"ArrowDown":b=p===m?0:p+1;break;case"ArrowLeft":case"ArrowUp":b=p===0?m:p-1;break;case"Home":b=0;break;case"End":b=m;break}f.preventDefault();const x=h[b];l.current[x.value]?.focus(),x.value!==t&&s(x.value)},[n,e,t,s]);return r.jsx("div",{role:"radiogroup","aria-label":o,"aria-disabled":n||void 0,onKeyDown:u,className:S.mergeClasses(mf,a,C.DIAL_KIT_CLASS.segmentedControl),children:e.map(f=>{const h=f.value===t,p=n||f.disabled;return r.jsxs("button",{ref:m=>{l.current[f.value]=m},type:"button",role:"radio","aria-checked":h,"aria-label":O.resolveAccessibleName(f["aria-label"],typeof f.label=="string"?f.label:void 0),tabIndex:f.value===d?0:-1,disabled:p,onClick:()=>s(f.value),className:S.mergeClasses(gf,h?xf:Cf,p?h?yf:Sf:h?bf:vf,i,C.DIAL_KIT_CLASS.segmentedControlItem),children:[f.icon,f.label]},f.value)})})},Nf={[at.Horizontal]:{next:"ArrowRight",previous:"ArrowLeft"},[at.Vertical]:{next:"ArrowDown",previous:"ArrowUp"}},jf=({tabs:e,activeTabId:t,onTabChange:s,orientation:n=at.Horizontal,sectionLabel:a,ariaLabel:i,className:o,tabListClassName:l,tabClassName:c,sectionLabelClassName:d})=>{const u=g.useRef({}),f=g.useId(),h=n===at.Vertical,p=e.find(v=>v.id===t),m=p&&!p.disabled?p.id:e.find(v=>!v.disabled)?.id,b=g.useCallback(v=>{const{next:y,previous:I}=Nf[n];if(![y,I,"Home","End"].includes(v.key)||e.length===0)return;const j=e.filter(T=>!T.disabled);if(j.length===0)return;const N=Math.max(j.findIndex(T=>T.id===t),0),w=j.length-1;let A=N;v.key===y?A=N===w?0:N+1:v.key===I?A=N===0?w:N-1:v.key==="Home"?A=0:A=w,v.preventDefault();const D=j[A];u.current[D.id]?.focus(),D.id!==t&&s(D.id)},[e,t,s,n]),x=r.jsx("div",{role:"tablist","aria-orientation":h?"vertical":void 0,"aria-label":i,"aria-labelledby":!i&&a?f:void 0,onKeyDown:b,className:S.mergeClasses(h?"flex flex-col gap-1 px-2":"flex justify-start gap-1",!a&&o,l,C.DIAL_KIT_CLASS.tabList,!a&&C.DIAL_KIT_CLASS.tabs),children:e.map(v=>{const y=t===v.id,I=!!v.disabled;return r.jsxs("button",{ref:j=>{u.current[v.id]=j},type:"button",role:"tab","aria-selected":y,disabled:I,tabIndex:v.id===m?0:-1,onClick:()=>s(v.id),className:S.mergeClasses("dial-kit-enhanced-target flex items-center gap-2 text-start","transition-colors motion-reduce:transition-none","focus-visible:outline focus-visible:outline-focus",h?["h-11 w-full rounded-lg px-3 desktop:h-10","focus-visible:-outline-offset-1",y?"dial-small-semi-text":"dial-small-text text-secondary"]:["dial-small-paragraph-semi-text border-b-2 border-transparent px-3 py-2","focus-visible:outline-offset-2"],I&&(h?"cursor-not-allowed text-control-disable-primary":"cursor-not-allowed border-control-disable-primary text-control-disable-primary"),!I&&(h?y?"bg-control-accent-alpha text-accent hover:bg-control-accent-alpha-hover":"hover:bg-control-accent-alpha-hover":y?"dial-kit-tab-selected-underline text-primary":"border-transparent text-secondary"),c,C.DIAL_KIT_CLASS.tab,y&&C.DIAL_KIT_CLASS.tabSelected),children:[v.icon&&r.jsx("span",{"aria-hidden":"true",className:"flex shrink-0",children:v.icon}),r.jsx("span",{className:S.mergeClasses(h&&!y&&!I&&"text-primary"),children:v.label}),v.count!=null&&r.jsx("span",{className:S.mergeClasses("dial-tiny-semi-text rounded-full px-1.5 py-0.5",h&&"ms-auto",I&&"bg-layer-sunken text-control-disable-primary",!I&&(y?"bg-control-accent-alpha text-accent":"bg-layer-sunken text-secondary")),children:v.count})]},v.id)})});return a?r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-3",o,C.DIAL_KIT_CLASS.tabs),children:[r.jsx("div",{className:S.mergeClasses("flex h-16 shrink-0 items-center",h?"px-4":"px-3"),children:r.jsx("span",{id:f,className:S.mergeClasses("dial-h1-text text-primary",d,C.DIAL_KIT_CLASS.tabsSectionLabel),children:a})}),x]}):x},Df="flex flex-nowrap items-center gap-1",wf="min-w-max flex-1 justify-center",Lf=({items:e,value:t,onChange:s,stretch:n=!1,className:a,chipClassName:i,"aria-label":o,"aria-labelledby":l})=>r.jsx("div",{role:"group","aria-label":o,"aria-labelledby":l,className:S.mergeClasses(Df,a,C.DIAL_KIT_CLASS.filterChips),children:e.map(c=>r.jsx($e,{label:c.label,icon:c.icon,appearance:Ct.Selectable,selected:c.value===t,onClick:()=>s(c.value),className:S.mergeClasses(n&&wf,i)},c.value))}),cs=(e,t)=>{const s=(t??"").split(",").map(i=>i.trim().toLowerCase()).filter(Boolean);if(s.length===0)return!0;const n=e.name.toLowerCase(),a=e.type.toLowerCase();return s.some(i=>{if(i.startsWith("."))return n.endsWith(i);if(i.endsWith("/*")){const o=i.slice(0,-1);return a.length>o.length&&a.startsWith(o)}return a===i})},Tf=({labelProps:e,label:t,description:s,onChange:n,onReject:a,accept:i,multiple:o=!1,disabled:l=!1,errorText:c,icon:d,id:u,ariaLabel:f,className:h})=>{const p=g.useId(),m=u??`file-dropzone-${p}`,b=c?`${m}-error`:void 0,[x,v]=g.useState(!1),y=g.useRef(0),I=g.useCallback(E=>{if(E.length===0)return;const L=o?E:E.slice(0,1),k=L.filter(R=>cs(R,i)),z=L.filter(R=>!cs(R,i));z.length>0&&a?.(z),k.length>0&&n(k)},[i,o,n,a]),j=g.useCallback(E=>{I(Array.from(E.target.files??[])),E.target.value=""},[I]),N=g.useCallback(()=>{y.current=0,v(!1)},[]),w=g.useCallback(E=>{l||(E.preventDefault(),y.current+=1,v(!0))},[l]),A=g.useCallback(E=>{l||(E.preventDefault(),E.dataTransfer.dropEffect="copy")},[l]),D=g.useCallback(()=>{l||(y.current-=1,y.current<=0&&N())},[l,N]),T=g.useCallback(E=>{E.preventDefault(),!l&&(N(),I(Array.from(E.dataTransfer?.files??[])))},[l,N,I]);return r.jsxs("div",{className:"flex flex-col gap-1",children:[e&&r.jsx(C.Label,{...e,htmlFor:m}),r.jsx("input",{id:m,type:"file",accept:i,multiple:o,disabled:l,onChange:j,"aria-label":O.resolveAccessibleName(typeof t!="string"?f:void 0),"aria-describedby":b,"aria-invalid":c?!0:void 0,className:"peer sr-only"}),r.jsxs("label",{htmlFor:m,onDragEnter:w,onDragOver:A,onDragLeave:D,onDrop:T,className:S.mergeClasses("flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed px-6 py-10 text-center","transition-colors motion-reduce:transition-none","peer-focus-visible:outline peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus",l?"cursor-not-allowed border-secondary bg-layer-sunken":"cursor-pointer bg-layer-base",!l&&x&&"border-accent bg-control-accent-alpha",!l&&!x&&"border-secondary hover:border-accent",c&&!x&&"border-error hover:border-error",h,C.DIAL_KIT_CLASS.fileDropzone),children:[d??r.jsx(_.IconUpload,{size:P.DIAL_ICON_SIZE.LG,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:l?"text-control-disable-primary":"text-secondary"}),r.jsxs("span",{className:"flex flex-col gap-1",children:[r.jsx("span",{className:S.mergeClasses("dial-small-text",l?"text-control-disable-primary":"text-primary"),children:t}),s&&r.jsx("span",{className:S.mergeClasses("dial-tiny-text",l?"text-control-disable-primary":"text-secondary"),children:s})]})]}),r.jsx(C.ErrorText,{id:b,text:c})]})},ri=({label:e="Shared",tooltip:t,size:s=12,className:n})=>r.jsx(C.Tooltip,{tooltip:t||"Shared",asChild:!0,children:r.jsx("span",{role:"img","aria-label":e,className:S.mergeClasses("flex shrink-0 rounded-xs bg-layer-raised text-accent",n,C.DIAL_KIT_CLASS.sharedEntityIndicator),children:r.jsx(_.IconArrowUpRight,{size:s,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})})});var Re=(e=>(e.Images="images",e.Video="video",e.Audio="audio",e.Code="code",e.Text="text",e.Pdf="pdf",e.Spreadsheet="spreadsheet",e.Presentation="presentation",e.Archive="archive",e.Dial="dial",e.Other="other",e))(Re||{});const Ef={images:["apng","avif","bmp","gif","heic","heif","ico","jpeg","jpg","png","svg","tif","tiff","webp"],video:["avi","flv","m4v","mkv","mov","mp4","mpeg","mpg","ogv","webm","wmv"],audio:["aac","aiff","flac","m4a","mid","midi","mp3","oga","ogg","opus","wav","wma"],code:["bash","c","cjs","cpp","cs","css","go","h","hpp","htm","html","ini","ipynb","java","js","json","jsx","kt","less","lua","mjs","php","ps1","py","r","rb","rs","sass","scala","scss","sh","sql","svelte","swift","toml","ts","tsx","vue","xml","yaml","yml","zsh"],text:["doc","docx","log","markdown","md","odt","rtf","text","txt"],pdf:["pdf"],spreadsheet:["csv","numbers","ods","tsv","xls","xlsm","xlsx"],presentation:["key","odp","pps","ppsx","ppt","pptx"],archive:["7z","bz2","gz","rar","tar","tgz","xz","zip"],dial:["dial"]},Of=new Map(Object.entries(Ef).flatMap(([e,t])=>t.map(s=>[s,e]))),Af=e=>Of.get(e)??"other",An="var(--text-control-permanent, #FCFCFC)",lr={x1:"20.4167",y1:"-3.33333",x2:"2.5",y2:"20",from:"var(--bg-visual-blue, #D6EDF9)",to:"var(--stroke-gradient-1, #5976E9)"},_f="#1B212D",kf={[Re.Images]:{path:"M11.0002 8.66667H11.0036M7.00024 11.3333L8.66691 9.66667C8.97624 9.369 9.35758 9.369 9.66691 9.66667L11.3336 11.3333M10.6669 10.6667L11.0002 10.3333C11.3096 10.0357 11.6909 10.0357 12.0002 10.3333L13.0002 11.3333M7.00024 8C7.00024 7.73478 7.1056 7.48043 7.29314 7.29289C7.48067 7.10536 7.73503 7 8.00024 7H12.0002C12.2655 7 12.5198 7.10536 12.7074 7.29289C12.8949 7.48043 13.0002 7.73478 13.0002 8V12C13.0002 12.2652 12.8949 12.5196 12.7074 12.7071C12.5198 12.8946 12.2655 13 12.0002 13H8.00024C7.73503 13 7.48067 12.8946 7.29314 12.7071C7.1056 12.5196 7.00024 12.2652 7.00024 12V8Z",sheet:lr},[Re.Code]:{path:"M8.33358 8.66665L7.00024 9.99998L8.33358 11.3333M11.6669 8.66665L13.0002 9.99998L11.6669 11.3333M10.6669 7.33331L9.33358 12.6666",sheet:{x1:"16.6667",y1:"0",x2:"2.08333",y2:"20.4167",from:"var(--bg-control-inverted, #57647A)",to:_f}},[Re.Text]:{path:"M7.3335 8H12.6668M7.3335 10H12.6668M7.3335 12H11.3335",sheet:{x1:"25.8333",y1:"-11.6667",x2:"2.5",y2:"20",from:"var(--bg-visual-violet-1, #DDE3F9)",to:"var(--bg-gradient-1, #1D4ED8)"}},[Re.Spreadsheet]:{path:"M7.33325 10.1667H12.6666M9.99992 7.5V12.8333M7.33325 8.16667C7.33325 7.98986 7.40349 7.82029 7.52851 7.69526C7.65354 7.57024 7.82311 7.5 7.99992 7.5H11.9999C12.1767 7.5 12.3463 7.57024 12.4713 7.69526C12.5963 7.82029 12.6666 7.98986 12.6666 8.16667V12.1667C12.6666 12.3435 12.5963 12.513 12.4713 12.6381C12.3463 12.7631 12.1767 12.8333 11.9999 12.8333H7.99992C7.82311 12.8333 7.65354 12.7631 7.52851 12.6381C7.40349 12.513 7.33325 12.3435 7.33325 12.1667V8.16667Z",sheet:{x1:"20.4167",y1:"-3.75",x2:"2.91667",y2:"20.4167",from:"var(--bg-visual-green-1, #CDE8E5)",to:"var(--text-visual-green-1, #059669)"}},[Re.Pdf]:{fillPath:"M12.5373 10.3151C12.0382 10.3151 11.4137 10.4021 11.2094 10.4328C10.3637 9.54967 10.1231 9.04771 10.069 8.91388C10.1423 8.72544 10.3975 8.0096 10.4338 7.09022C10.4517 6.62991 10.3544 6.28596 10.1447 6.06792C9.93533 5.85024 9.68191 5.83331 9.60924 5.83331C9.35443 5.83331 8.92697 5.96216 8.92697 6.82503C8.92697 7.5737 9.27603 8.36813 9.37252 8.57339C8.86416 10.0536 8.31837 11.0669 8.20248 11.2753C6.15974 12.0444 6 12.788 6 12.9988C6 13.3775 6.26973 13.6036 6.72152 13.6036C7.8192 13.6036 8.8209 11.7607 8.98653 11.4407C9.76614 11.1301 10.8096 10.9377 11.0749 10.8918C11.8357 11.6166 12.7157 11.81 13.0811 11.81C13.3561 11.81 14 11.81 14 11.148C14 10.5332 13.2121 10.3151 12.5373 10.3151ZM12.4844 10.7497C13.0773 10.7497 13.234 10.9458 13.234 11.0494C13.234 11.1145 13.2093 11.3268 12.8915 11.3268C12.6065 11.3268 12.1145 11.1621 11.6303 10.8047C11.8322 10.7782 12.131 10.7497 12.4844 10.7497ZM9.57812 6.25458C9.63218 6.25458 9.66777 6.27195 9.69711 6.31264C9.86764 6.54926 9.73014 7.32242 9.56279 7.92745C9.40124 7.40867 9.28 6.61264 9.45058 6.33259C9.48392 6.27793 9.52204 6.25458 9.57812 6.25458ZM9.29017 10.8856C9.50483 10.452 9.74542 9.81997 9.87646 9.46253C10.1387 9.90147 10.4914 10.309 10.6954 10.53C10.0603 10.6639 9.57969 10.7976 9.29017 10.8856ZM6.4264 13.0566C6.41226 13.0399 6.41017 13.0045 6.42083 12.9621C6.44317 12.8731 6.61396 12.4322 7.84924 11.8796C7.67236 12.1582 7.39585 12.5563 7.09208 12.8537C6.87825 13.0538 6.71174 13.1553 6.59719 13.1553C6.55621 13.1553 6.49974 13.1442 6.4264 13.0566Z",sheet:{x1:"26.25",y1:"-11.6667",x2:"2.5",y2:"20",from:"var(--bg-visual-red, #FCE7F3)",to:"var(--bg-control-error-active, #CC4545)"}},[Re.Audio]:{path:"M9 11.5C9 11.7652 8.89464 12.0195 8.70711 12.2071C8.51957 12.3946 8.26522 12.5 8 12.5C7.73478 12.5 7.48043 12.3946 7.29289 12.2071C7.10536 12.0195 7 11.7652 7 11.5C7 11.2347 7.10536 10.9804 7.29289 10.7929C7.48043 10.6053 7.73478 10.5 8 10.5C8.26522 10.5 8.51957 10.6053 8.70711 10.7929C8.89464 10.9804 9 11.2347 9 11.5ZM9 11.5V7.16663H12.3333V11.5M12.3333 11.5C12.3333 11.7652 12.228 12.0195 12.0404 12.2071C11.8529 12.3946 11.5985 12.5 11.3333 12.5C11.0681 12.5 10.8138 12.3946 10.6262 12.2071C10.4387 12.0195 10.3333 11.7652 10.3333 11.5C10.3333 11.2347 10.4387 10.9804 10.6262 10.7929C10.8138 10.6053 11.0681 10.5 11.3333 10.5C11.5985 10.5 11.8529 10.6053 12.0404 10.7929C12.228 10.9804 12.3333 11.2347 12.3333 11.5ZM9 8.49996H12.3333",sheet:lr},[Re.Video]:{path:"M9.99996 13.1667C11.8409 13.1667 13.3333 11.6743 13.3333 9.83333C13.3333 7.99238 11.8409 6.5 9.99996 6.5C8.15901 6.5 6.66663 7.99238 6.66663 9.83333C6.66663 11.6743 8.15901 13.1667 9.99996 13.1667ZM9.33337 8.5L11.3334 9.83333L9.33337 11.1667V8.5Z",sheet:lr},[Re.Presentation]:{path:"M7 7.33331H13M7.33333 7.33331V10.6666C7.33333 10.8435 7.40357 11.013 7.5286 11.1381C7.65362 11.2631 7.82319 11.3333 8 11.3333H12C12.1768 11.3333 12.3464 11.2631 12.4714 11.1381C12.5964 11.013 12.6667 10.8435 12.6667 10.6666V7.33331M10 11.3333V12.6666M9 12.6666H11M8.66667 9.99998L9.66667 8.99998L10.3333 9.66665L11.3333 8.66665",sheet:{x1:"24.5",y1:"-9.5",x2:"2.5",y2:"20",from:"var(--bg-visual-brown, #FDE8D8)",to:"var(--text-visual-brown-2, #B45309)"}},[Re.Archive]:{path:"M10.0001 6.66669H9.58341M10.8334 7.451H10.4167M10.0001 8.23531H9.58341M10.8334 9.01963H10.4167M10.0001 9.80394H9.58341M10.8334 10.5883H10.4167M10.0001 11.3726C10.2211 11.3726 10.4331 11.4552 10.5893 11.6023C10.7456 11.7494 10.8334 11.9489 10.8334 12.1569V12.9412C10.8334 13.0452 10.7895 13.1449 10.7114 13.2185C10.6332 13.292 10.5273 13.3334 10.4167 13.3334H9.58341C9.47291 13.3334 9.36693 13.292 9.28879 13.2185C9.21065 13.1449 9.16675 13.0452 9.16675 12.9412V12.1569C9.16675 11.9489 9.25455 11.7494 9.41083 11.6023C9.56711 11.4552 9.77907 11.3726 10.0001 11.3726Z",sheet:{x1:"24.5",y1:"-9.5",x2:"2.5",y2:"20",from:"var(--bg-visual-green-1, #CDE8E5)",to:"var(--text-visual-green-3, #065F46)"}},[Re.Dial]:{path:"M8.26392 7.44049C8.80816 7.44049 9.28449 7.50578 9.69653 7.63092L9.69849 7.6319C10.1079 7.75343 10.4556 7.938 10.7463 8.1817L10.7483 8.18365C11.0312 8.41601 11.2537 8.72491 11.4104 9.12115V9.12213C11.5666 9.51456 11.6496 9.98403 11.6497 10.5381C11.6497 11.5957 11.3539 12.3492 10.8108 12.8565C10.2602 13.3708 9.47204 13.6504 8.39868 13.6505H6.71313V7.44049H8.26392Z",fillPath:"M12.7167 12.1008L12.9558 12.3564L12.9558 12.3564L12.7167 12.1008ZM11.4504 6.20825L11.3486 6.54311L11.3507 6.54375L11.4504 6.20825ZM12.637 6.833L12.4119 7.10109L12.4147 7.10334L12.637 6.833ZM13.4108 7.9263L13.0853 8.05488L13.0856 8.05566L13.4108 7.9263ZM11.1666 12.8853L11.0909 12.5436V12.5436L11.1666 12.8853ZM10.4391 12.6553C10.2487 12.689 10.1217 12.8706 10.1553 13.0609C10.189 13.2513 10.3706 13.3783 10.5609 13.3447L10.5 13L10.4391 12.6553ZM13.6781 9.49291H13.3281C13.3281 10.5655 13.0283 11.33 12.4776 11.8451L12.7167 12.1008L12.9558 12.3564C13.687 11.6724 14.0281 10.6984 14.0281 9.49291H13.6781ZM7.9751 6.12805H8.3251C8.3251 6.24476 8.23053 6.35 8.1009 6.35V6V5.65C7.83231 5.65 7.6251 5.86989 7.6251 6.12805H7.9751ZM8.1009 6V6.35H9.89799V6V5.65H8.1009V6ZM9.89799 6V6.35C10.449 6.35 10.9312 6.41618 11.3486 6.54311L11.4504 6.20825L11.5522 5.87339C11.0566 5.72265 10.5039 5.65 9.89799 5.65V6ZM11.4504 6.20825L11.3507 6.54375C11.7654 6.66701 12.1173 6.85376 12.4119 7.10107L12.637 6.833L12.862 6.56492C12.4875 6.2506 12.0484 6.02084 11.5501 5.87275L11.4504 6.20825ZM12.637 6.833L12.4147 7.10334C12.7016 7.33926 12.9264 7.65273 13.0853 8.05488L13.4108 7.9263L13.7363 7.79772C13.5387 7.29746 13.2477 6.88206 12.8593 6.56265L12.637 6.833ZM13.4108 7.9263L13.0856 8.05566C13.2441 8.45409 13.3281 8.93071 13.3281 9.49291H13.6781H14.0281C14.0281 8.86239 13.934 8.29465 13.736 7.79694L13.4108 7.9263ZM7.9751 7.21882H8.3251V6.12805H7.9751H7.6251V7.21882H7.9751ZM12.7167 12.1008L12.4776 11.8451C12.117 12.1824 11.6591 12.4177 11.0909 12.5436L11.1666 12.8853L11.2423 13.227C11.9168 13.0776 12.4923 12.7898 12.9558 12.3564L12.7167 12.1008ZM11.1666 12.8853L11.0909 12.5436C11.091 12.5435 11.0826 12.5452 11.0606 12.5493C11.041 12.5528 11.0155 12.5573 10.9857 12.5625C10.926 12.5729 10.8511 12.5857 10.7756 12.5984C10.6269 12.6236 10.472 12.6495 10.4391 12.6553L10.5 13L10.5609 13.3447C10.6064 13.3366 11.1725 13.2425 11.2423 13.227L11.1666 12.8853Z",sheet:"var(--bg-gradient-2, #885DF2)"},[Re.Other]:{path:"M6.80005 8H13.2M6.80005 10.2222H13.2M6.80005 12.4444H13.2",sheet:lr}},Rf=({size:e,kind:t})=>{const s=`dial-kit-file-gradient-${g.useId().replace(/[^\w-]/g,"")}`,{path:n,fillPath:a,sheet:i}=kf[t],o=typeof i=="string";return r.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[r.jsx("path",{d:"M17.4999 3.97859V16C17.4999 18.2091 15.709 20 13.4999 20H6.5C4.29086 20 2.5 18.2091 2.5 16V4C2.5 1.79086 4.29086 0 6.5 0H13.1683H13.5213C15.7186 0 17.4999 1.78128 17.4999 3.97859Z",fill:o?i:`url(#${s})`}),n&&r.jsx("path",{d:n,stroke:An,strokeWidth:"0.7",strokeLinecap:"round",strokeLinejoin:"round"}),a&&r.jsx("path",{d:a,fill:An}),!o&&r.jsx("defs",{children:r.jsxs("linearGradient",{id:s,x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2,gradientUnits:"userSpaceOnUse",children:[r.jsx("stop",{stopColor:i.from}),r.jsx("stop",{offset:"1",stopColor:i.to})]})})]})},Mf=({size:e})=>{const t=`dial-kit-folder-gradient-${g.useId().replace(/[^\w-]/g,"")}`;return r.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[r.jsx("path",{d:"M6.38992 3.75H4.66663C3.00977 3.75 1.66663 5.09315 1.66663 6.75V7.91667H7.16339L10.8333 5.79247L7.85075 4.1297C7.40412 3.8807 6.90127 3.75 6.38992 3.75Z",fill:"var(--stroke-gradient-1, #5976E9)"}),r.jsx("path",{d:"M14.3333 5.41669C16.5424 5.41669 18.3333 7.20755 18.3333 9.41669V12.25C18.3333 14.4592 16.5424 16.25 14.3333 16.25H5.66663C3.45749 16.25 1.66663 14.4592 1.66663 12.25V7.6708C1.66663 7.11851 2.11434 6.6708 2.66663 6.6708H6.89447C7.43998 6.6708 7.97973 6.55922 8.48053 6.34291L9.86582 5.74458C10.3666 5.52827 10.9064 5.41669 11.4519 5.41669H14.3333Z",fill:`url(#${t})`}),r.jsx("defs",{children:r.jsxs("linearGradient",{id:t,x1:"17.0833",y1:"5.83335",x2:"9.38489",y2:"19.6653",gradientUnits:"userSpaceOnUse",children:[r.jsx("stop",{stopColor:"var(--stroke-secondary, #D1DBEA)"}),r.jsx("stop",{offset:"0.91",stopColor:"var(--stroke-gradient-1, #5976E9)"})]})})]})},Pf=(e,t)=>(t??(e.includes(".")?e.split(".").pop():"")??"").trim().replace(/^\./,"").toLowerCase(),zf=(e,t)=>e===Ve.Folder?"Folder":t?`${t.toUpperCase()} file`:"File",Bf=(e,t,s)=>e===Ve.Folder?r.jsx(Mf,{size:s}):r.jsx(Rf,{size:s,kind:Af(t)}),Ps=({type:e,name:t,fileExtension:s,shared:n=!1,loading:a=!1,size:i=P.DIAL_ICON_SIZE.MD,className:o,decorative:l=!1,label:c,loadingLabel:d="Loading",sharedIndicatorClassName:u,sharedIndicatorTooltip:f})=>{if(e!==Ve.File&&e!==Ve.Folder)return null;const h=e===Ve.File?Pf(t,s):"",p=zf(e,h),m=c??(n?`${p}, shared`:p),b=l?{"aria-hidden":!0}:a?{}:{role:"img","aria-label":m};return r.jsxs("span",{className:S.mergeClasses("relative inline-flex shrink-0 items-center justify-center text-secondary",o,C.DIAL_KIT_CLASS.fileIcon),...b,children:[a?r.jsx(Et,{size:i,ariaLabel:d}):Bf(e,h,i),n&&r.jsx(ri,{tooltip:f,className:S.mergeClasses("absolute -bottom-0.5 -left-0.5",u)})]})},si=({name:e,type:t=Ve.File,fileExtension:s,shared:n=!1,loading:a=!1,loadingLabel:i,iconSize:o,details:l,isInvalidName:c=!1,className:d,nameClassName:u,sharedIndicatorClassName:f,sharedIndicatorTooltip:h,sharedLabel:p="Shared",hideTooltip:m=!1,tooltipContent:b})=>r.jsxs("div",{className:S.mergeClasses("flex w-full min-w-0 items-center gap-2",d,C.DIAL_KIT_CLASS.fileName),children:[r.jsx(Ps,{name:e,type:t,fileExtension:s,shared:n,loading:a,loadingLabel:i,size:o,sharedIndicatorClassName:f,sharedIndicatorTooltip:h,decorative:!a}),r.jsxs("div",{className:S.mergeClasses("flex min-w-0 flex-1",{"flex-col gap-1":!!l}),children:[r.jsx(C.EllipsisTooltip,{className:S.mergeClasses("dial-small-paragraph-text",c?"text-secondary":"text-primary",u),text:e,hideTooltip:m,customTooltipContent:b}),n&&r.jsx("span",{className:"sr-only",children:p}),l]})]}),Ff=({className:e,...t})=>r.jsx(si,{...t,type:Ve.Folder,className:S.mergeClasses(e,C.DIAL_KIT_CLASS.folderName)}),Hf=({open:e,onClose:t,title:s,ariaLabel:n,onBack:a,backAriaLabel:i="Back",closeAriaLabel:o="Close",closeOnOutsideClick:l=!0,children:c,className:d,overlayClassName:u,headerClassName:f,style:h,overlayStyle:p,bodyClassName:m,titleClassName:b,portalId:x})=>{const v=C.useThemeScope(),y=`bottom-sheet-title-${g.useId()}`,{refs:I,context:j}=J.useFloating({open:e,onOpenChange:D=>{D||t()}}),N=J.useRole(j,{role:"dialog"}),w=J.useDismiss(j,{outsidePress:l}),{getFloatingProps:A}=J.useInteractions([N,w]);return e?r.jsx(J.FloatingPortal,{id:x,children:r.jsx(J.FloatingOverlay,{lockScroll:!0,style:p,className:S.mergeClasses("z-popup flex items-end bg-backdrop",v,u,C.DIAL_KIT_CLASS.bottomSheetOverlay),children:r.jsx(J.FloatingFocusManager,{context:j,initialFocus:I.floating,children:r.jsxs("div",{ref:I.setFloating,...A(),role:"dialog","aria-modal":"true","aria-labelledby":s?y:void 0,"aria-label":s?void 0:n,style:h,className:S.mergeClasses("flex max-h-[85dvh] w-full flex-col rounded-t-lg bg-layer-raised outline-hidden","animate-slideUp motion-reduce:animate-none",d,C.DIAL_KIT_CLASS.bottomSheet),children:[s&&r.jsxs("div",{className:S.mergeClasses("relative flex h-[60px] shrink-0 items-center justify-center border-b border-tertiary px-14",f),children:[a&&r.jsx(C.GhostIconButton,{"aria-label":i,className:"absolute start-4",onClick:a,icon:r.jsx(_.IconArrowLeft,{size:P.DIAL_ICON_SIZE.LG,stroke:se.DIAL_KIT_ICON_STROKE,className:"rtl:-scale-x-100","aria-hidden":"true"})}),r.jsx("h2",{id:y,className:S.mergeClasses("min-w-0 truncate text-primary",b??"dial-body-semi-text"),children:s}),r.jsx(C.CloseButton,{ariaLabel:o,onClose:t,size:O.ElementSize.Standard,className:"absolute end-4"})]}),r.jsx("div",{className:S.mergeClasses("min-h-0 overflow-y-auto",m),children:c})]})})})}):null};var it=(e=>(e.Outlined="outlined",e.Filled="filled",e))(it||{}),Ye=(e=>(e.Blue="blue",e.Green="green",e.Violet="violet",e.Indigo="indigo",e.Brown="brown",e.Red="red",e))(Ye||{});const $f={[Ye.Blue]:"bg-blue text-blue",[Ye.Green]:"bg-green-2 text-green-1",[Ye.Violet]:"bg-violet-2 text-violet-1",[Ye.Indigo]:"bg-violet-1 text-violet-2",[Ye.Brown]:"bg-brown text-brown-2",[Ye.Red]:"bg-red text-red"},Vf={[it.Outlined]:"rounded-md border border-tertiary bg-layer-sunken text-secondary",[it.Filled]:"rounded-full"},Kf={[it.Outlined]:"dial-tiny-text",[it.Filled]:"dial-caption-lead-semi-text"},Wf=({label:e,variant:t=it.Outlined,color:s=Ye.Blue,icon:n,textClassName:a,className:i,...o})=>r.jsxs("span",{...o,className:S.mergeClasses("inline-flex h-6 w-fit shrink-0 items-center gap-1 whitespace-nowrap px-2",Vf[t],t===it.Filled&&$f[s],i,C.DIAL_KIT_CLASS.badge),children:[n&&r.jsx("span",{className:"flex shrink-0 items-center","aria-hidden":"true",children:n}),r.jsx("span",{className:a??Kf[t],children:e})]});var Tt=(e=>(e.Circle="circle",e.Square="square",e))(Tt||{}),qe=(e=>(e.Green1="green-1",e.Violet2="violet-2",e.Brown="brown",e.Red="red",e.Green2="green-2",e.Blue="blue",e.Violet1="violet-1",e))(qe||{});const ni={[qe.Green1]:{background:"bg-green-1",foreground:"text-green-2"},[qe.Violet2]:{background:"bg-violet-2",foreground:"text-violet-1"},[qe.Brown]:{background:"bg-brown",foreground:"text-brown-2"},[qe.Red]:{background:"bg-red",foreground:"text-red"},[qe.Green2]:{background:"bg-green-2",foreground:"text-green-3"},[qe.Blue]:{background:"bg-blue",foreground:"text-accent"},[qe.Violet1]:{background:"bg-violet-1",foreground:"text-violet-2"}},Zf=e=>{const t=Object.values(ni);let s=0;for(let n=0;n<e.length;n++)s+=e.charCodeAt(n);return t[s%t.length]},_n=e=>e.match(new RegExp("\\p{L}","u"))?.[0]??"",ai=e=>{const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length>=2?(_n(t[0])+_n(t[1])).toUpperCase()||"?":t[0].replace(/[^\p{L}]/gu,"").slice(0,2).toUpperCase()||"?"},Gf={[Tt.Circle]:"rounded-full",[Tt.Square]:"rounded-md"},ii=({name:e,initials:t,src:s,alt:n="",size:a=32,shape:i=Tt.Circle,color:o,className:l,textClassName:c,onImageError:d})=>{const[u,f]=g.useState(),h=!!s&&u!==s,p=n!=="",m=v=>S.mergeClasses("inline-flex shrink-0 select-none items-center justify-center overflow-hidden",Gf[i],v,l,C.DIAL_KIT_CLASS.avatar);if(h)return r.jsx("img",{src:s,alt:n,width:a,height:a,className:S.mergeClasses(m(),"object-cover"),onError:v=>{f(s),d?.(v)}});const{background:b,foreground:x}=o??Zf(e);return r.jsx("span",{role:p?"img":void 0,"aria-label":p?n:void 0,"aria-hidden":p?void 0:!0,className:m(S.mergeClasses(b,x)),style:{width:a,height:a,fontSize:c?void 0:Math.round(a*.4)},children:r.jsx("span",{className:S.mergeClasses("leading-none",c??"font-semibold"),children:t??ai(e)})})};var ye=(e=>(e.Model="model",e.Agent="agent",e.Toolset="toolset",e.Skill="skill",e.Prompt="prompt",e))(ye||{});const Uf={[ye.Model]:"Model",[ye.Agent]:"Agent",[ye.Toolset]:"Toolset",[ye.Skill]:"Skill",[ye.Prompt]:"Prompt"},kn={[ye.Model]:"text-blue",[ye.Agent]:"text-green-1",[ye.Toolset]:"text-brown-2",[ye.Skill]:"text-violet-1",[ye.Prompt]:"text-violet-2"},qf={[ye.Model]:"bg-blue",[ye.Agent]:"bg-green-2",[ye.Toolset]:"bg-brown",[ye.Skill]:"bg-violet-2",[ye.Prompt]:"bg-violet-1"},Yf=["h1","h2","h3","h4","h5","h6"],Xf=e=>Yf[Math.min(6,Math.max(1,Math.round(e)))-1],Jf=({item:e,labels:t,showVersion:s=!0,hasFeaturedTag:n=!0,iconSize:a=48,headingLevel:i=3,query:o,footer:l,statusBadge:c,className:d,nameClassName:u="dial-h3-text",typeClassName:f="dial-caption-lead-semi-text",versionClassName:h="dial-tiny-text",iconClassName:p,featuredChipClassName:m})=>{const b=Xf(i),x=n&&!!e.isFeatured,v=c!=null||x,y=s?e.version:void 0;return r.jsxs("div",{className:S.mergeClasses("flex items-start gap-2",d,C.DIAL_KIT_CLASS.entityIdentity),children:[r.jsx(ii,{name:e.name,src:e.iconUrl,size:a,shape:Tt.Square,className:S.mergeClasses("rounded-[14px]",p)}),r.jsxs("div",{className:S.mergeClasses("flex min-w-0 flex-1 flex-col gap-1",l!=null&&"self-stretch"),children:[r.jsxs("div",{className:"relative flex items-center justify-between",children:[r.jsx("span",{className:S.mergeClasses("uppercase",f,kn[e.type]),children:t?.type??Uf[e.type]}),v&&r.jsxs("div",{className:"absolute end-0 top-[-6px] flex items-center gap-2",children:[c,x&&r.jsx("span",{className:S.mergeClasses("flex h-6 items-center justify-center rounded-2xl px-2","dial-caption-lead-semi-text",qf[e.type],kn[e.type],m),children:t?.featured??"Featured"})]})]}),r.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r.jsx(b,{className:S.mergeClasses("min-w-0 shrink text-primary",u),children:o?r.jsx(C.Highlight,{text:e.name,query:o,maxLines:1}):r.jsx(C.EllipsisTooltip,{text:e.name})}),y!=null&&r.jsx(C.EllipsisTooltip,{className:S.mergeClasses("max-w-[30%] shrink-0 text-secondary",h),text:y})]}),l!=null&&r.jsx("div",{className:"mt-auto pt-1",children:l})]})]})},Qf=({open:e,onClose:t,header:s,ariaLabel:n,headerActions:a,onBack:i,backAriaLabel:o="Back",backDisabled:l=!1,closeAriaLabel:c="Close",closeDisabled:d=!1,hideClose:u=!1,closeOnOutsideClick:f=!0,children:h,className:p,overlayClassName:m,headerClassName:b,style:x,overlayStyle:v,bodyClassName:y,titleClassName:I,portalId:j})=>{const N=C.useThemeScope(),w=`side-drawer-title-${g.useId()}`,A=typeof s=="string",{refs:D,context:T}=J.useFloating({open:e,onOpenChange:R=>{R||t()}}),E=J.useRole(T,{role:"dialog"}),L=J.useDismiss(T,{outsidePress:f}),{getFloatingProps:k}=J.useInteractions([E,L]),z=s!=null||i!=null||!u;return r.jsx(J.FloatingPortal,{id:j,children:r.jsx(J.FloatingOverlay,{lockScroll:e,style:v,className:S.mergeClasses("z-popup bg-backdrop transition-opacity duration-300 motion-reduce:transition-none",e?"opacity-100":"pointer-events-none opacity-0",N,m),children:r.jsx(J.FloatingFocusManager,{context:T,disabled:!e,initialFocus:D.floating,children:r.jsxs("div",{ref:D.setFloating,...k(),role:"dialog","aria-modal":"true","aria-labelledby":A?w:void 0,"aria-label":A?void 0:n,inert:!e,style:x,className:S.mergeClasses("fixed inset-y-0 end-0 flex w-full flex-col overflow-hidden bg-layer-raised outline-hidden","desktop:w-[540px] desktop:rounded-s-xl desktop:border-s desktop:border-secondary","transition-transform duration-300 motion-reduce:transition-none",e?"translate-x-0":"translate-x-full rtl:-translate-x-full",p,C.DIAL_KIT_CLASS.sideDrawer),children:[z&&r.jsxs("div",{className:S.mergeClasses("flex shrink-0 items-center gap-2 border-b border-tertiary px-6 py-3",b),children:[i&&r.jsx(C.GhostIconButton,{"aria-label":o,disabled:l,onClick:i,icon:r.jsx(_.IconChevronLeft,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,className:"rtl:-scale-x-100","aria-hidden":"true"})}),A?r.jsx("h2",{id:w,className:S.mergeClasses("min-w-0 flex-1 truncate text-primary",I??"dial-h2-text"),children:s}):r.jsx("div",{className:"min-w-0 flex-1",children:s}),a,!u&&r.jsx(C.CloseButton,{ariaLabel:c,onClose:t,disabled:d,size:O.ElementSize.Standard})]}),r.jsx("div",{className:S.mergeClasses("min-h-0 flex-1 overflow-y-auto",y),children:h})]})})})})},ep=4,tp=24,Rn=e=>parseFloat(e)||0,rp=e=>{let t=e.length;for(;t>0&&e[t-1]===",";)t--;return e.slice(0,t)},sp=()=>{},np=({id:e,value:t,defaultValue:s,size:n=O.ElementSize.Standard,labelProps:a,placeholder:i,caption:o,error:l,invalid:c,disabled:d=!1,readOnly:u=!1,collapseTagOverflow:f=!1,ariaLabel:h,tagListLabel:p="Tags",className:m,fieldClassName:b,tagClassName:x,onChange:v})=>{const y=g.useId(),I=e||y,j=n===O.ElementSize.Small,N=g.useRef(null),w=g.useRef([]),A=g.useRef(null),D=t!==void 0,[T,E]=g.useState(s??[]),L=D?t:T,k=L.length,[z,R]=g.useState(""),[Z,H]=g.useState(k),B=!u&&!d,K=g.useCallback(U=>{D||E(U),v?.(U)},[D,v]),V=g.useCallback(U=>Q=>{w.current[U]=Q},[]),W=g.useCallback(()=>{const U=N.current;if(!U||U.clientWidth===0){H(L.length);return}const{paddingLeft:Q,paddingRight:_e}=getComputedStyle(U);H(Fa({availableWidth:U.clientWidth-Rn(Q)-Rn(_e)-(u?0:tp),tagWidths:L.map((Be,ve)=>w.current[ve]?.offsetWidth??0),overflowChipWidth:A.current?.offsetWidth??0,gap:ep}))},[u,L]);g.useEffect(()=>{if(!f){H(k);return}const U=N.current;if(!U)return;const Q=new ResizeObserver(()=>W());return Q.observe(U),W(),()=>Q.disconnect()},[f,W,k]);const oe=S.mergeClasses(f?"shrink-0":"min-w-0",x),X=U=>{const Q=rp(U.trim()).trim();!Q||L.includes(Q)||K([...L,Q])},le=U=>{K(L.filter(Q=>Q!==U))},G=()=>{X(z),R("")},ee=U=>{if(B){if(U.key==="Enter"||U.key===","){U.preventDefault(),G();return}U.key==="Backspace"&&!z&&k>0&&(U.preventDefault(),K(L.slice(0,-1)))}},ae=()=>{B&&z.trim()&&G()},de=f?L.slice(0,Z):L,me=f?L.slice(Z):[],Ne=me.join(", "),xe=k>0&&r.jsxs("span",{role:"list","aria-label":p,className:S.mergeClasses("relative flex min-w-0 items-center gap-1",f?"flex-nowrap":"flex-wrap"),children:[de.map(U=>r.jsx($e,{role:"listitem",label:U,className:oe,disabled:d,closable:B,onRemove:B?()=>le(U):void 0},U)),me.length>0&&r.jsx($e,{role:"listitem",label:`+${me.length}`,"aria-label":Ne,title:Ne,className:S.mergeClasses("shrink-0",x),disabled:d}),f&&r.jsxs("span",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 overflow-hidden whitespace-nowrap",children:[L.map((U,Q)=>r.jsx("span",{ref:V(Q),className:"inline-flex",children:r.jsx($e,{label:U,className:x,disabled:d,closable:B,onRemove:B?sp:void 0})},U)),r.jsx("span",{ref:A,className:"inline-flex",children:r.jsx($e,{label:`+${k}`,className:x})})]})]});return r.jsx(C.Input,{id:I,size:n,labelProps:a,caption:o,error:l,invalid:c,disabled:d,readOnly:u,value:z,placeholder:k>0?void 0:i,"aria-label":h,wrapperRef:N,onChange:U=>R(U??""),onKeyDown:ee,onBlur:ae,containerClassName:S.mergeClasses("w-full",m),wrapperClassName:S.mergeClasses(k>0&&["!h-auto",j?"min-h-[24px] py-0.5":"min-h-[40px] py-[3px]",f?"flex-nowrap overflow-hidden":"flex-wrap"],b,C.DIAL_KIT_CLASS.tagInput),className:S.mergeClasses("w-auto flex-1",f?"min-w-[24px]":"min-w-[100px]",u&&"cursor-default"),children:xe})},ap=(e,t,s,n)=>{const a=t.trim().toLowerCase(),i=new Set(s);return e.filter(({value:o,label:l,description:c})=>!i.has(o)&&[l,o,c].some(d=>d?.toLowerCase().includes(a))).slice(0,Math.max(n,0))},ip=5,op=({id:e,value:t,defaultValue:s,suggestions:n,maxSuggestions:a=ip,openOnFocus:i=!1,size:o=O.ElementSize.Standard,labelProps:l,placeholder:c,caption:d,error:u,invalid:f=!1,disabled:h=!1,readOnly:p=!1,ariaLabel:m,tagListLabel:b="Tags",getRemoveTagLabel:x,className:v,fieldClassName:y,tagClassName:I,listClassName:j,onChange:N})=>{const w=g.useId(),A=e||w,D=`${A}-listbox`,T=C.useThemeScope(),E=o===O.ElementSize.Small,L=t!==void 0,[k,z]=g.useState(s??[]),R=L?t:k,Z=R.length>0,H=!p&&!h,[B,K]=g.useState(""),[V,W]=g.useState(!1),[oe,X]=g.useState(0),le=!B.trim(),G=g.useMemo(()=>ap(n,B,R,i&&le?n.length:a),[B,le,a,i,n,R]),ee=V&&H&&G.length>0,ae=Math.min(oe,G.length-1),de=ee&&ae>=0,me=Y=>`${D}-option-${Y}`,{refs:Ne,floatingStyles:xe}=J.useFloating({open:ee,placement:"bottom-start",whileElementsMounted:J.autoUpdate,middleware:[J.offset(C.overlayGap),J.flip({padding:C.overlayGap}),J.size({padding:C.overlayGap,apply({rects:Y,availableHeight:ue,elements:fe}){fe.floating.style.width=`${Math.round(Y.reference.width)}px`,fe.floating.style.maxHeight=`${Math.floor(ue)}px`}})]}),U=g.useCallback(Y=>{L||z(Y),N?.(Y)},[L,N]),Q=()=>{W(!1),X(0)},_e=()=>{!i||!H||(W(!0),X(le?-1:0))},Be=Y=>{const ue=Y.trim();ue&&!R.includes(ue)&&U([...R,ue]),K(""),i?X(-1):Q()},ve=Y=>U(R.filter(ue=>ue!==Y)),Ue=Y=>{const ue=Y??"",fe=!!ue.trim();K(ue),W(fe||i),X(fe?0:-1)},ct=Y=>{if(H)switch(Y.key){case"ArrowDown":case"ArrowUp":{if(Y.preventDefault(),!ee){W(!0),X(0);return}const ue=Y.key==="ArrowDown"?1:-1,fe=ae<0?Math.min(-ue,0):ae;X((fe+ue+G.length)%G.length);return}case"Enter":case",":Y.preventDefault(),Be(de?G[ae].value:B);return;case"Escape":ee&&Y.preventDefault(),Q();return;case"Backspace":!B&&Z&&(Y.preventDefault(),U(R.slice(0,-1)));return}},Ce=Y=>Y.preventDefault();return r.jsxs(r.Fragment,{children:[r.jsx(C.Input,{id:A,role:"combobox","aria-autocomplete":"list","aria-expanded":ee,"aria-controls":D,"aria-activedescendant":de?me(ae):void 0,"aria-invalid":f||void 0,"aria-label":m,size:o,labelProps:l,caption:d,error:u,invalid:f,disabled:h,readOnly:p,value:B,placeholder:Z?void 0:c,wrapperRef:Ne.setReference,onChange:Ue,onKeyDown:ct,onFocus:_e,onClick:_e,onBlur:Q,containerClassName:S.mergeClasses("w-full",v),wrapperClassName:S.mergeClasses(Z&&["!h-auto flex-wrap gap-1 py-2",E?"min-h-[24px]":"min-h-[40px]"],y,C.DIAL_KIT_CLASS.autocompleteTagInput),className:S.mergeClasses("w-auto min-w-[100px] flex-1",p&&"cursor-default"),children:Z&&r.jsx("span",{role:"list","aria-label":b,className:"flex min-w-0 flex-wrap items-center gap-1",children:R.map(Y=>r.jsx($e,{role:"listitem",label:Y,className:S.mergeClasses(Cr,"min-w-0",I),disabled:h,closable:H,removeLabel:x?.(Y),onRemove:H?()=>ve(Y):void 0},Y))})}),r.jsx(J.FloatingPortal,{children:r.jsx("div",{ref:Ne.setFloating,id:D,role:"listbox","aria-label":b,hidden:!ee,style:xe,className:S.mergeClasses("z-floating overflow-y-auto",C.overlaySurfaceClassName,C.overlayListClassName,!ee&&"hidden",T,j),children:ee&&G.map((Y,ue)=>{const fe=ue===ae;return r.jsx(C.MenuItem,{id:me(ue),role:"option","aria-selected":fe,tabIndex:-1,label:Y.label,description:Y.description,mark:C.MenuItemMark.Tint,selected:fe,onMouseDown:Ce,onMouseEnter:()=>X(ue),onClick:()=>Be(Y.value)},Y.value)})})})]})},lp=(e,t)=>{if(e<=0||t<=0)return[];const s=Math.floor(e/t+1e-9);return Array.from({length:s},(n,a)=>(a+1)*t/e*100)},oi=e=>(e.toString().split(".")[1]??"").length,cp=(e,t,s,n)=>{const a=Math.min(s,Math.max(t,e));if(n<=0)return a;const i=Math.round(Number(((a-t)/n).toFixed(9))),o=t+i*n;return Number(Math.min(s,o).toFixed(oi(n)))},dp=12,Mn=e=>`calc(${e}% + ${(.5-e/100)*dp}px)`,up=(e,t)=>e&&t?"grid-cols-[auto_minmax(0,1fr)_auto]":e?"grid-cols-[auto_minmax(0,1fr)]":t?"grid-cols-[minmax(0,1fr)_auto]":"grid-cols-[minmax(0,1fr)]",fp=({id:e,value:t,min:s=0,max:n=1,step:a=.1,disabled:i,labelProps:o,labels:l,formatValue:c,showValue:d=!1,showTooltip:u=!1,showTicks:f=!1,leftContent:h,rightContent:p,showValueInput:m=!1,valueInputAriaLabel:b,caption:x,error:v,onChange:y,containerClassName:I,trackClassName:j,fillClassName:N,className:w,...A})=>{const D=g.useId(),T=e??D,E=x&&!v?`${T}-caption`:void 0,L=v?`${T}-error`:void 0,k=n-s,z=k>0?Math.min(100,Math.max(0,(t-s)/k*100)):0,R=Mn(z),Z=f&&!i?lp(k,a):[],H=u&&!i,B=h!=null,K=m||p!=null,V=oi(a),[W,oe]=g.useState(null),X=c?c(t):t.toFixed(V),le=g.useCallback(ae=>{y?.(Number(ae.target.value))},[y]),G=g.useCallback(ae=>{const de=ae==null?"":String(ae);oe(de);const me=Number(de);de!==""&&Number.isFinite(me)&&y?.(cp(me,s,n,a))},[n,s,y,a]),ee=g.useCallback(()=>oe(null),[]);return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-2",I),children:[(o||d)&&r.jsxs("div",{className:"flex items-center gap-2",children:[o&&r.jsx(C.Label,{...o,htmlFor:T}),d&&r.jsx("span",{"aria-hidden":"true",className:S.mergeClasses("dial-small-text ml-auto",i?"text-control-disable-primary":"text-primary"),children:X})]}),r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsxs("div",{className:S.mergeClasses("grid items-center gap-y-1",m?"gap-x-2":"gap-x-3",up(B,K),H&&"mt-2"),children:[B&&r.jsx("div",{className:"flex items-center",children:h}),r.jsxs("div",{className:"relative flex h-6 items-center",children:[r.jsx("div",{className:S.mergeClasses("pointer-events-none absolute inset-x-0 h-1 rounded-full",i?"bg-control-disable-primary":"bg-control-accent-muted",j)}),Z.map(ae=>r.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute size-0.5 -translate-x-1/2 rounded-full border border-accent-focus",style:{left:Mn(ae)}},ae)),r.jsx("div",{className:S.mergeClasses("pointer-events-none absolute left-0 h-1 rounded-full",i?"bg-control-disable-secondary":"bg-control-accent",N),style:{width:R}}),H&&r.jsxs("span",{"aria-hidden":"true",className:"pointer-events-none absolute bottom-full mb-0.5 flex -translate-x-1/2 flex-col items-center",style:{left:R},children:[r.jsx("span",{className:"whitespace-nowrap rounded-md bg-control-inverted px-2 py-0.5 dial-small-text text-control-inverted shadow-xs",children:X}),r.jsx("svg",{width:"8",height:"4",viewBox:"0 0 8 4",className:"fill-control-inverted",children:r.jsx("path",{d:"M0 0h8L4 4z"})})]}),r.jsx("input",{...A,type:"range",id:T,value:t,min:s,max:n,step:a,disabled:i,onChange:le,"aria-label":O.resolveAccessibleName(typeof o?.label!="string"?A["aria-label"]:void 0),"aria-valuetext":c?X:void 0,"aria-describedby":L??E,className:S.mergeClasses("dial-kit-slider absolute inset-0 h-full w-full",w)})]}),K&&r.jsx("div",{className:"flex items-center",children:m?r.jsx(ks,{"aria-label":O.resolveAccessibleName(b??(typeof o?.label=="string"?o.label:void 0)),value:W??t.toFixed(V),min:s,max:n,step:a,disabled:i,size:O.ElementSize.Small,containerClassName:"w-12",className:"text-center",onChange:G,onBlur:ee}):p}),l&&r.jsx("div",{className:S.mergeClasses("dial-tiny-text flex text-secondary",B&&"col-start-2"),children:l.length===3?r.jsxs(r.Fragment,{children:[r.jsx("span",{children:l[0]}),r.jsx("span",{className:"flex-1 text-center",children:l[1]}),r.jsx("span",{children:l[2]})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{children:l[0]}),r.jsx("span",{className:"ml-auto",children:l[1]})]})})]}),r.jsx(C.ErrorText,{id:L,text:v}),!v&&r.jsx(C.CaptionText,{id:E,text:x})]})]})},pp=48,hp=({children:e,title:t,width:s=280,collapsedWidth:n=pp,isOpened:a,defaultOpened:i=!0,onToggle:o,additionalButtons:l,ariaLabel:c="Sidebar",collapseLabel:d="Collapse sidebar",expandLabel:u="Expand sidebar",className:f,titleClassName:h,contentClassName:p,footerClassName:m})=>{const b=a!==void 0,[x,v]=g.useState(i),y=b?a:x,I=`collapsible-sidebar-content-${g.useId()}`,j=y?d:u,N=w=>{const A=!y;b||v(A),o?.(A,w)};return r.jsxs("aside",{"aria-label":c,style:{width:`${y?s:n}px`},className:S.mergeClasses("flex flex-col justify-between",f,C.DIAL_KIT_CLASS.collapsibleSidebar),children:[r.jsx("div",{id:I,hidden:!y,className:S.mergeClasses("min-h-0 flex-1 overflow-auto p-4",p),children:e}),r.jsx("div",{hidden:y,className:S.mergeClasses("rotate-180 px-3 py-4 [writing-mode:tb-rl] dial-small-text text-primary",h),children:t}),r.jsxs("div",{className:S.mergeClasses("flex h-12 shrink-0 flex-row items-center gap-2 border-t border-tertiary py-1",y?"justify-end px-2":"justify-center",m),children:[y&&l,r.jsx(C.IconButton,{variant:O.ButtonVariant.Primary,appearance:O.ButtonAppearance.Ghost,size:O.ElementSize.Standard,onClick:N,"aria-label":j,"aria-expanded":y,"aria-controls":I,tooltipProps:{tooltip:j},icon:y?r.jsx(_.IconChevronsLeft,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}):r.jsx(_.IconChevronsRight,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})})]})]})},mp=({side:e,isResizing:t,width:s,minWidth:n,maxWidth:a,step:i,ariaLabel:o,onWidthChange:l,customHandler:c,handlerClassName:d})=>{const u=e===nt.Left,f=u?_.IconChevronLeft:_.IconChevronRight,h=p=>{let m;switch(p.key){case"ArrowLeft":m=s+(u?i:-i);break;case"ArrowRight":m=s+(u?-i:i);break;case"Home":m=n;break;case"End":m=a;break;default:return}p.preventDefault(),l(m)};return r.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":o,"aria-valuenow":s,"aria-valuemin":n,"aria-valuemax":a,tabIndex:0,onKeyDown:h,className:S.mergeClasses("relative h-full w-0.5 cursor-col-resize bg-control-accent text-accent","opacity-0 transition-opacity motion-reduce:transition-none","group-hover:opacity-100 focus-visible:opacity-100","focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-focus",t&&"opacity-100",d),children:c??r.jsx(f,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:S.mergeClasses("pointer-events-none absolute top-1/2 -translate-y-1/2",u?"right-full":"left-full")})})},gp=16,li=({children:e,minWidth:t,maxWidth:s,width:n,defaultWidth:a,onResizeStop:i,onResize:o,side:l=nt.Right,keyboardStep:c=gp,ariaLabel:d="Resize panel",className:u,resizeHandlerClassName:f,resizeHandler:h})=>{const[p,m]=g.useState(!1),[b,x]=g.useState(a??t),v=n!==void 0,y=v?n:b,I=g.useRef(null),j=g.useCallback(()=>{m(!0)},[]),N=g.useCallback(()=>{m(!1);const D=I.current?.resizable?.getBoundingClientRect(),T=D?Math.round(D.width):t;v||x(T),i?.(T)},[i,v,t]),w=g.useCallback(D=>{const T=Math.min(s,Math.max(t,D));T!==y&&(v||(x(T),I.current?.updateSize({width:T,height:"100%"})),o?.(T),i?.(T))},[s,t,y,v,o,i]),A=g.useMemo(()=>{const D=l===nt.Left,T=r.jsx(mp,{side:l,isResizing:p,width:y,minWidth:t,maxWidth:s,step:c,ariaLabel:d,onWidthChange:w,customHandler:h,handlerClassName:f});return{size:v?{width:y,height:"100%"}:void 0,defaultSize:v?void 0:{width:y,height:"100%"},minWidth:t,maxWidth:s,enable:{left:D,right:!D},handleClasses:{right:"group",left:"group"},handleStyles:{right:{right:"-8px",zIndex:10},left:{left:0,zIndex:10}},handleComponent:{left:D?T:void 0,right:D?void 0:T},onResizeStart:j,onResize:(E,L,k)=>{o?.(Math.round(k.offsetWidth))},onResizeStop:N}},[l,v,y,t,s,c,d,w,h,f,p,j,N,o]);return r.jsx(ra,{ref:I,...A,children:r.jsx("div",{className:S.mergeClasses("group flex size-full flex-col bg-layer-raised transition-all motion-reduce:transition-none",u,C.DIAL_KIT_CLASS.resizableContainer),children:e})})},xp=({enabled:e=!0,children:t,...s})=>e?r.jsx(li,{...s,children:t}):t;var Pe=(e=>(e.InProgress="inProgress",e.Success="success",e.Warning="warning",e.Failed="failed",e.Canceled="canceled",e))(Pe||{});const ci=8e3,qt="flex size-7 shrink-0 items-center justify-center",di={cancelItemAriaLabel:e=>`Cancel "${e}"`,itemProgressAriaLabel:e=>`"${e}" in progress`,successLabel:"Completed",canceledLabel:"Canceled",failedMessage:"Failed",warningMessage:"Completed with warnings",queueProgressAriaLabel:"Progress",queueProgressValueText:(e,t)=>`${e} of ${t}`,collapseAriaLabel:"Collapse",expandAriaLabel:"Expand",closeAriaLabel:"Close",closeConfirmHeader:"Close?",closeConfirmDescriptionInProgress:"Some items are still in progress.",closeConfirmDescriptionFailed:"Some items have failed.",closeConfirmDescriptionMixed:"Some items are still in progress, and some have failed.",closeConfirmLabel:"Close",closeCancelLabel:"Cancel"},Cp=({title:e,failedCount:t,isCollapsed:s,itemsId:n,labels:a,onToggleCollapse:i,onClose:o})=>{const l=s?_.IconChevronUp:_.IconChevronDown;return r.jsxs("div",{className:"mx-4 flex items-center justify-between border-b border-tertiary py-3",children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r.jsx("span",{className:"dial-small-paragraph-semi-text truncate text-primary",children:e}),t>0&&r.jsx("span",{className:"dial-small-paragraph-semi-text inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full bg-control-error px-1 text-control-permanent",children:t})]}),r.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[r.jsx(C.GhostIconButton,{"aria-label":s?a.expandAriaLabel:a.collapseAriaLabel,"aria-expanded":!s,"aria-controls":n,size:O.ElementSize.Small,icon:r.jsx(l,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,className:"text-secondary","aria-hidden":!0}),onClick:i,className:qt}),r.jsx(C.GhostIconButton,{"aria-label":a.closeAriaLabel,size:O.ElementSize.Small,icon:r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,className:"text-secondary","aria-hidden":!0}),onClick:o,className:qt})]})]})},Pn=({message:e,isError:t})=>{const s=t?_.IconAlertCircleFilled:_.IconAlertTriangleFilled;return r.jsx(C.Tooltip,{tooltip:e,asChild:!0,children:r.jsx("span",{className:qt,role:"img","aria-label":e,tabIndex:0,children:r.jsx(s,{size:P.DIAL_ICON_SIZE.SM,className:t?"text-error":"text-warning-icon","aria-hidden":!0})})})},bp=({item:e,labels:t,onCancel:s})=>{const n=e.status===Pe.Canceled;return r.jsxs("div",{className:"group flex items-center gap-2 px-4 py-2",children:[r.jsx(Ps,{type:Ve.File,name:e.name,size:P.DIAL_ICON_SIZE.MD,className:S.mergeClasses(n&&"opacity-50"),decorative:!0}),r.jsx(C.EllipsisTooltip,{text:e.name,className:S.mergeClasses("dial-small-text",n?"text-secondary":"text-primary")}),e.status===Pe.InProgress&&r.jsxs("div",{className:S.mergeClasses(qt,"grid"),children:[r.jsx(Et,{size:P.DIAL_ICON_SIZE.SM,ariaLabel:t.itemProgressAriaLabel(e.name),className:S.mergeClasses("pointer-events-none col-start-1 row-start-1 transition-opacity",s&&"group-focus-within:opacity-0 group-hover:opacity-0")}),s&&r.jsx(C.GhostIconButton,{"aria-label":t.cancelItemAriaLabel(e.name),size:O.ElementSize.Small,icon:r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,className:"text-secondary","aria-hidden":!0}),onClick:()=>s(e.id),className:"col-start-1 row-start-1 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100"})]}),e.status===Pe.Success&&r.jsx("span",{className:qt,role:"img","aria-label":t.successLabel,children:r.jsx(_.IconCheck,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,className:"text-accent","aria-hidden":!0})}),e.status===Pe.Warning&&r.jsx(Pn,{message:e.message||t.warningMessage,isError:!1}),e.status===Pe.Failed&&r.jsx(Pn,{message:e.message||t.failedMessage,isError:!0}),n&&r.jsx("span",{className:"dial-small-text shrink-0 text-secondary",children:t.canceledLabel})]})},vp=e=>Math.round(e.reduce((t,s)=>t+(s.percent??(s.status===Pe.InProgress?0:100)),0)/e.length),yp=(e,t,s)=>e&&t?s.closeConfirmDescriptionMixed:t?s.closeConfirmDescriptionFailed:s.closeConfirmDescriptionInProgress,Sp=({title:e,items:t,onClose:s,onCancelItem:n,labels:a,autoCloseDelay:i=ci,className:o,bodyClassName:l})=>{const[c,d]=g.useState(!1),[u,f]=g.useState(!1),h=g.useId(),p={...di,...a},m=t.filter(w=>w.status===Pe.InProgress).length,b=m>0,x=t.filter(w=>w.status===Pe.Failed).length,v=x>0,y=t.length>0&&t.every(w=>w.status===Pe.Success),I=g.useCallback(()=>{b||v?f(!0):s()},[b,v,s]),j=g.useCallback(()=>{f(!1),s()},[s]),N=g.useCallback(()=>{d(w=>!w)},[]);return g.useEffect(()=>{if(!y||i<=0)return;const w=setTimeout(s,i);return()=>clearTimeout(w)},[y,i,s]),t.length===0?null:r.jsxs("div",{role:"status","aria-live":"polite",className:S.mergeClasses("w-[370px] max-w-[calc(100vw-2rem)] rounded-xl bg-layer-raised shadow-md",o,C.DIAL_KIT_CLASS.transferQueue),children:[r.jsx(Cp,{title:e,failedCount:x,isCollapsed:c,itemsId:h,labels:p,onToggleCollapse:N,onClose:I}),c&&b&&r.jsx($n,{value:vp(t),size:O.ElementSize.Small,"aria-label":p.queueProgressAriaLabel,"aria-valuetext":p.queueProgressValueText(t.length-m,t.length)}),!c&&r.jsx("div",{id:h,className:S.mergeClasses("flex max-h-[40vh] flex-col overflow-y-auto py-1",l),children:t.map(w=>r.jsx(bp,{item:w,labels:p,onCancel:n},w.id))}),r.jsx(ti,{open:u,header:p.closeConfirmHeader,description:yp(b,v,p),confirmLabel:p.closeConfirmLabel,cancelLabel:p.closeCancelLabel,variant:Je.Danger,onConfirm:j,onClose:()=>f(!1)})]})};exports.mergeClasses=S.mergeClasses;exports.CaptionText=C.CaptionText;exports.Checkbox=C.Checkbox;exports.CheckboxBox=C.CheckboxBox;exports.CloseButton=C.CloseButton;exports.DEFAULT_DATE_FORMAT_OPTIONS=C.DEFAULT_DATE_FORMAT_OPTIONS;exports.DEFAULT_DATE_LOCALE=C.DEFAULT_LOCALE;exports.DEFAULT_GRID_DATE_FORMAT_OPTIONS=C.DEFAULT_DATE_FORMAT_OPTIONS$1;exports.DEFAULT_GRID_DATE_LOCALE=C.DEFAULT_LOCALE$1;exports.DIAL_KIT_CLASS=C.DIAL_KIT_CLASS;exports.DangerIconButton=C.DangerIconButton;exports.DateCellRenderer=C.DateCellRenderer;exports.DialCloseButton=C.DialCloseButton;exports.DialDangerIconButton=C.DialDangerIconButton;exports.DialDateCellRenderer=C.DialDateCellRenderer;exports.DialDropdown=C.DialDropdown;exports.DialEllipsisTooltip=C.DialEllipsisTooltip;exports.DialGhostIconButton=C.DialGhostIconButton;exports.DialGrid=C.DialGrid;exports.DialIcon=C.DialIcon;exports.DialNeutralIconButton=C.DialNeutralIconButton;exports.DialNoDataContent=C.DialNoDataContent;exports.DialPrimaryIconButton=C.DialPrimaryIconButton;exports.DialRadioButton=C.DialRadioButton;exports.DialSecondaryIconButton=C.DialSecondaryIconButton;exports.DialSuccessIconButton=C.DialSuccessIconButton;exports.DialTertiaryIconButton=C.DialTertiaryIconButton;exports.Dropdown=C.Dropdown;exports.DropdownItemType=C.DropdownItemType;exports.DropdownTrigger=C.DropdownTrigger;exports.DropdownType=C.DropdownType;exports.EllipsisTooltip=C.EllipsisTooltip;exports.ErrorText=C.ErrorText;exports.GRID_ALIGN_RIGHT_CLASS=C.GRID_ALIGN_RIGHT_CLASS;exports.GRID_ROOT_CLASS=C.GRID_ROOT_CLASS;exports.GRID_ROW_HEIGHT=C.ROW_HEIGHT;exports.GRID_SELECTION_COLUMN_ID=C.GRID_SELECTION_COLUMN_ID;exports.GRID_THEME_PARAMS=C.GRID_THEME_PARAMS;exports.GhostIconButton=C.GhostIconButton;exports.Grid=C.Grid;exports.GridColorScheme=C.GridColorScheme;exports.GridSelectionMode=C.GridSelectionMode;exports.Highlight=C.Highlight;exports.IconButton=C.IconButton;exports.InfoButton=C.InfoButton;exports.Input=C.Input;exports.InteractiveTooltip=C.InteractiveTooltip;exports.InteractiveTooltipTrigger=C.InteractiveTooltipTrigger;exports.Label=C.Label;exports.MenuItem=C.MenuItem;exports.MenuItemMark=C.MenuItemMark;exports.NeutralIconButton=C.NeutralIconButton;exports.NoDataContent=C.NoDataContent;exports.PrimaryIconButton=C.PrimaryIconButton;exports.Radio=C.Radio;exports.Search=C.Search;exports.StaticIconButton=C.StaticIconButton;exports.ThemeScope=C.ThemeScope;exports.Tooltip=C.Tooltip;exports.TooltipContainer=C.TooltipContainer;exports.TooltipContent=C.TooltipContent;exports.TooltipPlacement=C.TooltipPlacement;exports.TooltipTrigger=C.TooltipTrigger;exports.baseColumnComparator=C.baseColumnComparator;exports.checkColDefsChanges=C.checkColDefsChanges;exports.convertGridDateToDate=C.convertToDate;exports.convertToDate=C.convertToDate;exports.useThemeScope=C.useThemeScope;exports.DialLabel=ze.DialLabel;exports.DialSwitch=ze.DialSwitch;exports.BASE_ICON_PROPS=P.BASE_ICON_PROPS;exports.BASE_ICON_SIZE=P.BASE_ICON_SIZE;exports.DIAL_ICON_SIZE=P.DIAL_ICON_SIZE;exports.ButtonAppearance=O.ButtonAppearance;exports.ButtonVariant=O.ButtonVariant;exports.DialIconButton=O.DialIconButton;exports.DialTooltip=O.DialTooltip;exports.DialTooltipContainer=O.DialTooltipContainer;exports.DialTooltipContent=O.DialTooltipContent;exports.DialTooltipTrigger=O.DialTooltipTrigger;exports.ElementSize=O.ElementSize;exports.EditorThemes=Yt.EditorThemes;exports.LazyDialJsonEditor=Yt.LazyDialJsonEditor;exports.LazyDialMarkdownEditor=Yt.LazyDialMarkdownEditor;exports.LazyMarkdownEditor=Yt.LazyMarkdownEditor;exports.DIAL_KIT_ICON_STROKE=se.DIAL_KIT_ICON_STROKE;exports.AVATAR_PALETTE=ni;exports.Accordion=rf;exports.AccordionCaretPosition=vr;exports.AnalyticsCardVariant=Vt;exports.AutocompleteTagInput=op;exports.Avatar=ii;exports.AvatarColor=qe;exports.AvatarShape=Tt;exports.Badge=Wf;exports.BadgeColor=Ye;exports.BadgeVariant=it;exports.BottomSheet=Hf;exports.Breadcrumbs=Pu;exports.BreadcrumbsSize=bt;exports.Button=yt;exports.ButtonDropdown=Fu;exports.Calendar=Su;exports.CalendarMode=Te;exports.CardShell=Ud;exports.CollapsibleSidebar=hp;exports.ConditionalResizableContainer=xp;exports.ConfirmationPopup=ti;exports.ConfirmationPopupVariant=Je;exports.DEFAULT_ANALYTICS_BAR_COLOR_MAP=us;exports.DEFAULT_TRANSFER_QUEUE_LABELS=di;exports.DangerButton=Id;exports.DialAccordion=Bn;exports.DialAnalyticsBar=cr;exports.DialAnalyticsBarGroup=ji;exports.DialAnalyticsCard=Si;exports.DialAnalyticsErrorTag=ds;exports.DialAnalyticsHistogram=Ei;exports.DialAutocompleteInputValue=da;exports.DialBreadcrumb=Ec;exports.DialBreadcrumbItem=Lt;exports.DialButton=ot;exports.DialButtonDropdown=k1;exports.DialCaptionText=Xt;exports.DialCheckbox=es;exports.DialCollapsibleSidebar=Yi;exports.DialConditionalResizableContainer=yc;exports.DialConfirmationPopup=Zc;exports.DialDangerButton=la;exports.DialDraggableItem=tc;exports.DialDropdownIcon=R1;exports.DialErrorText=Se;exports.DialFileIcon=ta;exports.DialFileName=cc;exports.DialFileNodeType=Xe;exports.DialFilePermission=Da;exports.DialFileResourceType=js;exports.DialFolderName=dc;exports.DialFormItem=yr;exports.DialFormPopup=Jc;exports.DialGhostButton=Is;exports.DialInput=Qe;exports.DialInputPopup=ua;exports.DialItemType=Ve;exports.DialLabelledText=Xi;exports.DialLinkButton=Oc;exports.DialLoadFileArea=Na;exports.DialLoadFileAreaField=O1;exports.DialLoader=lt;exports.DialNeutralButton=Qt;exports.DialNotification=ki;exports.DialNumberInput=as;exports.DialPagination=Bi;exports.DialPasswordInput=ha;exports.DialPopup=Lr;exports.DialPrimaryButton=Jt;exports.DialRadioGroup=Vn;exports.DialRadioGroupPopupField=Uc;exports.DialRemoveButton=wr;exports.DialResizableContainer=sa;exports.DialSchemaRenderer=ed;exports.DialSearch=ga;exports.DialSegmentedControl=zc;exports.DialSelect=Ke;exports.DialSelectField=p1;exports.DialSharedEntityIndicator=bs;exports.DialSlider=qi;exports.DialSteps=Vi;exports.DialTabs=Dc;exports.DialTag=pt;exports.DialTagInput=ca;exports.DialTextarea=Ac;exports.EDITABLE_CONTAINER_ATTRIBUTE=Ns;exports.EntityIdentity=Jf;exports.EntityType=ye;exports.ErrorMessageNotification=tu;exports.ErrorToastNotification=qd;exports.FabButton=zu;exports.FileDropzone=Tf;exports.FileIcon=Ps;exports.FileName=si;exports.FilterChips=Lf;exports.FlexibleActionsDirection=ja;exports.FolderName=Ff;exports.FolderPath=Nu;exports.FormItemOrientation=Kt;exports.GeneralMessageNotification=iu;exports.GeneralToastNotification=eu;exports.GhostButton=Os;exports.InfoMessageNotification=ru;exports.InfoToastNotification=Yd;exports.InlineSelect=Hu;exports.InlineSelectTrigger=ei;exports.JsonSchemaType=F;exports.LinkButton=Dd;exports.LoadingMessageNotification=au;exports.LoadingToastNotification=Qd;exports.MultiSelectTags=$t;exports.NOT_ALLOWED_SPACES=Ds;exports.NOT_ALLOWED_SPACES_REGEXP=Z1;exports.NOT_ALLOWED_SYMBOLS=La;exports.NOT_ALLOWED_SYMBOLS_REGEXP=W1;exports.NeutralButton=Es;exports.Notification=Rs;exports.NotificationType=be;exports.NotificationVariant=ce;exports.NumberInput=ks;exports.OutlinedButton=wd;exports.PasswordInput=Va;exports.Popup=Ms;exports.PopupSize=De;exports.PrimaryButton=Ha;exports.ProgressBar=$n;exports.RadioGroup=Ut;exports.RadioGroupOrientation=Ae;exports.RadioGroupPopupField=ff;exports.ResizableContainer=li;exports.ResizableContainerSide=nt;exports.SchemaDisplayMode=gt;exports.SchemaOrientation=At;exports.SchemaRenderer=Vd;exports.SchemaRendererVariant=He;exports.ScreenResolution=hr;exports.SegmentedControl=If;exports.Select=tt;exports.SelectSize=mr;exports.SelectVariant=gr;exports.SharedEntityIndicator=ri;exports.SideDrawer=Qf;exports.Skeleton=Ic;exports.SkeletonAvatarShape=pr;exports.SkeletonAvatarSize=Ft;exports.SkeletonVariant=ft;exports.Slider=fp;exports.Spinner=Et;exports.StarterButton=jd;exports.StepStatus=Oe;exports.SuccessMessageNotification=su;exports.SuccessToastNotification=Xd;exports.Switch=Ka;exports.TRANSFER_QUEUE_AUTO_CLOSE_DELAY_MS=ci;exports.TabOrientation=at;exports.TabView=ht;exports.Tabs=jf;exports.Tag=$e;exports.TagAppearance=Ct;exports.TagInput=np;exports.Textarea=$a;exports.TextareaResize=As;exports.ToggleIconButton=pf;exports.TransferQueue=Sp;exports.TransferQueueItemStatus=Pe;exports.WarningMessageNotification=nu;exports.WarningToastNotification=Jd;exports.editableContainerProps=M1;exports.extractInitials=ai;exports.getTimezoneLabel=wa;exports.matchesAccept=cs;exports.useEditableItem=P1;exports.wrapInRootFolder=V1;
|
|
4
|
+
|\r| )|[\0-]`,K1=`[${Ta.replace(/\\/g,"\\\\")}]`,W1=new RegExp(`${K1}|${ws}`),Z1=new RegExp(ws);var He=(e=>(e.Sections="sections",e.Flat="flat",e.FlatSections="flat-sections",e))(He||{}),gt=(e=>(e.Select="select",e.Radio="radio",e))(gt||{}),Ot=(e=>(e.Row="row",e.Column="column",e))(Ot||{}),F=(e=>(e.String="string",e.Number="number",e.Integer="integer",e.Boolean="boolean",e.Object="object",e.Array="array",e.Null="null",e))(F||{});const Ea={noItemSchema:"No item schema defined.",noItemsYet:"No items yet. Add one below.",addItem:"Add Item",selectTypeToAdd:"Select type to add…",noConfigurableProperties:"No configurable properties.",noFieldsYet:"No fields yet. Add one below.",keyColumnHeader:"Key",valueColumnHeader:"Value",addField:"Add Field",keyInputPlaceholder:"Enter key",stringInputPlaceholder:"Enter a value",integerInputPlaceholder:"Enter a whole number",numberInputPlaceholder:"Enter a number",enumSelectPlaceholder:"Select an option",selectTypePlaceholder:"Select type",removeItemAriaLabel:"Remove item",removeFieldAriaLabel:"Remove field",typeColumnHeader:"Type",entryTypeString:"String",entryTypeNumber:"Number",entryTypeBoolean:"Boolean",entryTypeNull:"Null",entryTypeObject:"Object",entryTypeArray:"Array",entryTypeChangeWarning:"Changing type will reset the current value.",booleanTrueOption:"True",booleanFalseOption:"False",invalidJsonError:"Invalid JSON"},Oa=m.createContext(null);function We(){const e=m.useContext(Oa);if(!e)throw new Error("useSchemaContext must be used inside DialSchemaRenderer");return e}function dn(e,t){const s={...e,...t};return(e.properties||t.properties)&&(s.properties={...e.properties,...t.properties}),(e.required||t.required)&&(s.required=Array.from(new Set([...e.required??[],...t.required??[]]))),s}function q(e,t,s=0){if(s>10)return e;let n=e;if(n.$ref){const a=n.$ref.replace(/^#\//,"").split("/");let i=t;for(const u of a)i=i?.[u];if(!i||typeof i!="object")return e;const{$ref:o,...l}=n,c=i;n={...c.$ref?q(c,t,s+1):c,...l}}if(n.allOf&&n.allOf.length>0){const{allOf:a,...i}=n;let o={};for(const l of a)o=dn(o,q(l,t,s+1));n=dn(o,i)}return n}function Or(e){return e.map((t,s)=>({entry:t,index:s})).sort((t,s)=>{const n=t.entry[1]["dial:meta"]?.["dial:propertyOrder"]??1/0,a=s.entry[1]["dial:meta"]?.["dial:propertyOrder"]??1/0;return n!==a?n-a:t.index-s.index}).map(({entry:t})=>t)}function vt(e){return e==null||e===""}function Ze(e){return e.type===F.Object||e.properties!=null&&e.oneOf==null&&e.anyOf==null&&e.type==null}function xt(e){return e.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\b\w/g,t=>t.toUpperCase())}const er=e=>`"${e}" is required`;function Ar(e,t){return e.type===F.Null?"null":e.$ref?q(e,t).title??e.$ref.split("/").pop()??"Option":e.title?e.title:e.type?Array.isArray(e.type)?e.type.join(" | "):e.type:e.discriminator?Object.keys(e.discriminator.mapping).join(" | "):e.const!=null?String(e.const):e.oneOf?"One of options":"Option"}function Ie(e,t,s=0){if(s>15)return;const n=q(e,t);if("default"in n)return n.default;if(n.discriminator&&n.oneOf){const a=Object.keys(n.discriminator.mapping)[0];if(a){const i=q({$ref:n.discriminator.mapping[a]},t);return{...Ie(i,t,s+1)??{},[n.discriminator.propertyName]:a}}}if(Ze(n)){if(n.properties){const a={};let i=!1;for(const[o,l]of Object.entries(n.properties)){const c=Ie(l,t,s+1);c!==void 0&&(a[o]=c,i=!0)}return i?a:void 0}if(n.additionalProperties!=null&&n.additionalProperties!==!1)return{}}}function Ee(e,t,s,n="",a=0){if(a>15)return[];const i=[],o=q(t,s);if(o.anyOf){const d=o.anyOf.filter(u=>u.type!==F.Null);return e!=null&&d.length===1?Ee(e,d[0],s,n,a+1):i}if(o.oneOf&&o.discriminator){const d=o.discriminator.propertyName,u=e?.[d];if(u&&o.discriminator.mapping[u]){const f={$ref:o.discriminator.mapping[u]},h=q(f,s);return Ee(e,h,s,n,a+1)}return i}if(o.type===F.Array||!o.type&&Array.isArray(e)){if(Array.isArray(e)&&o.items)for(let d=0;d<e.length;d++){const u=Ee(e[d],o.items,s,`${n}[${d}]`,a+1);i.push(...u)}return i}if(!Ze(o))return i;const l=o.required??[],c=e;for(const d of l){const u=o.properties?.[d];if(u&&q(u,s).isHidden)continue;const f=n?`${n}.${d}`:d,h=c?.[d];if(vt(h)){const p=u?.title??xt(d);i.push({path:f,message:er(p)})}}if(c&&o.properties)for(const[d,u]of Object.entries(o.properties)){if(q(u,s).isHidden)continue;const f=n?`${n}.${d}`:d,h=c[d];if(h!=null){const p=Ee(h,u,s,f,a+1);i.push(...p)}}if(c&&o.additionalProperties!=null&&o.additionalProperties!==!1&&typeof o.additionalProperties=="object"){const d=o.additionalProperties;for(const[u,f]of Object.entries(c)){const h=n?`${n}.${u}`:u,p=Ee(f,d,s,h,a+1);i.push(...p)}}return i}function At(e,t,s){const n=q(t,s);if(Array.isArray(e))return`${e.length} item${e.length!==1?"s":""}`;if(Ze(n)&&n.properties){const a=Object.entries(n.properties).filter(([,c])=>!q(c,s).isHidden),i=a.length,o=e;return`${a.filter(([c])=>{const d=o?.[c];return d!=null&&d!==""}).length}/${i} fields`}return""}function Aa(e,t,s){if(e==null){const n=t.findIndex(a=>a.type===F.Null);return n>=0?n:0}if(Array.isArray(e)){const n=t.findIndex(a=>q(a,s).type===F.Array);return n>=0?n:0}if(typeof e=="boolean"){const n=t.findIndex(a=>q(a,s).type===F.Boolean);return n>=0?n:0}if(typeof e=="number"){const n=t.findIndex(a=>{const i=q(a,s);return i.type===F.Number||i.type===F.Integer});return n>=0?n:0}if(typeof e=="string"){const n=t.findIndex(a=>q(a,s).type===F.String);return n>=0?n:0}if(typeof e=="object"){const n=e;for(let a=0;a<t.length;a++){const i=q(t[a],s);if(i.discriminator&&i.discriminator.propertyName in n)return a}for(let a=0;a<t.length;a++){const i=q(t[a],s);if(Ze(i)||i.oneOf)return a}return 0}return 0}function _a(e,t,s){if(t&&typeof e=="object"&&e!==null){const n=e[t];if(n)return`Item ${s+1}: ${n}`}if(typeof e=="object"&&e!==null){const n=e,a=n.name??n.title??n.id;if(a)return`Item ${s+1}: ${a}`}return`Item ${s+1}`}function _r(e){switch(Array.isArray(e.type)?e.type[0]:e.type){case F.String:return"";case F.Boolean:return!1;case F.Array:return[];case F.Integer:case F.Number:return;default:return{}}}const ka=[F.String,F.Number,F.Boolean,F.Null,F.Object,F.Array];function Ra(e){return Array.isArray(e)?F.Array:typeof e=="object"&&e!==null?F.Object:typeof e=="boolean"?F.Boolean:typeof e=="number"?F.Number:e===null?F.Null:F.String}const G1={[F.String]:"",[F.Number]:0,[F.Boolean]:!1,[F.Null]:null,[F.Object]:{},[F.Array]:[]};function Ma(e){return G1[e]}const Wt=({title:e,description:t,summary:s,errorCount:n=0,level:a=0,children:i,onRemove:o,defaultExpanded:l=!0,removeItemAriaLabel:c="Remove item"})=>{const[d,u]=m.useState(l),f=a===0,h="rounded border border-secondary",p=S.mergeClasses("flex items-center gap-2 cursor-pointer select-none transition-colors",f?"px-4 py-3 bg-layer-3 hover:bg-layer-4":"px-3 py-2 bg-layer-4 hover:bg-layer-3",d?"rounded-t":"rounded"),g=S.mergeClasses("border-t border-secondary",f?"p-4":"p-3");return r.jsxs("div",{className:h,children:[r.jsxs("div",{className:p,onClick:()=>u(b=>!b),role:"button","aria-expanded":d,children:[r.jsx("span",{className:"shrink-0 text-secondary",children:d?r.jsx(_.IconChevronDown,{size:16,stroke:2}):r.jsx(_.IconChevronRight,{size:16,stroke:2})}),r.jsx("span",{className:S.mergeClasses("flex-1 truncate",f?"dial-small-semi-text text-primary":"dial-small-text text-primary"),children:e}),t&&r.jsx(ze.DialInfoButton,{caption:t}),s&&r.jsx("span",{className:"dial-tiny-text text-secondary whitespace-nowrap ml-2",children:s}),n>0?r.jsxs("span",{className:"flex items-center gap-1 dial-tiny-text text-error whitespace-nowrap",children:[r.jsx(C.DialIcon,{icon:r.jsx(_.IconAlertTriangle,{size:13,stroke:2})}),n," error",n>1?"s":""]}):r.jsx(C.DialIcon,{icon:r.jsx(_.IconCheck,{size:13,stroke:2}),className:"text-success shrink-0"}),o&&r.jsx(Lr,{size:O.ElementSize.Small,onClick:b=>{b.stopPropagation(),o()},"aria-label":c,className:"ml-1 shrink-0 p-0.5"})]}),d&&r.jsx("div",{className:g,children:i})]})},Pa=({schema:e,value:t,onChange:s,path:n,level:a=0,required:i,label:o})=>{const{rootSchema:l,defaultExpanded:c=!0,touchedPaths:d=new Set,skipUntouched:u=!1}=We(),f=q(e,l),h=Ze(f),p=f.type===F.Array;if(h||p){const x=At(t,f,l),v=Ee(t,f,l,n.join(".")),y=n.join("."),I=y+".",j=!u||d.has(y)||[...d].some(N=>N.startsWith(I));return r.jsx(Wt,{title:o??f.title??n[n.length-1]??"Section",description:f.description,level:a,summary:x,errorCount:j?v.length:0,defaultExpanded:c,children:r.jsx(et,{schema:f,value:t,onChange:s,path:n,level:a+1,required:i})})}const b=(!u||d.has(n.join(".")))&&i&&vt(t)?er(o??"Field"):void 0;return r.jsx(Sr,{label:o,required:i,description:f.description,error:b,children:r.jsx(et,{schema:f,value:t,onChange:s,path:n,level:a,required:i,suppressInlineError:!0})})},fr=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o}=We(),l=q(e,i),c=Or(Object.entries(l.properties??{}).filter(([,f])=>!q(f,i).isHidden)),d=l.required??[],u=t??{};return c.length===0?r.jsx("p",{className:"dial-tiny-text text-secondary italic",children:o.noConfigurableProperties}):r.jsx("div",{className:"flex flex-col gap-4",children:c.map(([f,h])=>{const g=q(h,i).title??h.title??xt(f),b=d.includes(f);return r.jsx(Pa,{schema:h,value:u[f],onChange:x=>s({...u,[f]:x}),path:[...n,f],level:a,required:b,label:g},f)})})},U1=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o,readonly:l=!1,defaultExpanded:c=!0}=We(),d=Array.isArray(t)?t:[],u=e.items,[f,h]=m.useState(void 0);if(!u)return r.jsx("p",{className:"dial-tiny-text text-secondary italic",children:o.noItemSchema});const p=m.useMemo(()=>q(u,i),[u,i]),g=m.useMemo(()=>p.discriminator,[p]),b=m.useMemo(()=>g?.propertyName,[g]),x=m.useMemo(()=>g?Object.keys(g.mapping).map(j=>({value:j,label:j})):[],[g]),v=()=>{const j=f??x[0]?.value;let N;if(g&&j){const w=q({$ref:g.mapping[j]},i);N={...Ie(w,i)??{},[g.propertyName]:j}}else N=Ie(p,i)??_r(p);s([...d,N])},y=j=>{s(d.filter((N,w)=>w!==j))},I=(j,N)=>{s(d.map((w,A)=>A===j?N:w))};return r.jsxs("div",{className:"flex flex-col gap-3",children:[d.length===0&&r.jsx("p",{className:"dial-tiny-text text-secondary italic",children:o.noItemsYet}),d.map((j,N)=>{const w=_a(j,b,N),A=At(j,p,i),D=Ee(j,p,i,`${n.join(".")}[${N}]`);return r.jsx(Wt,{title:w,level:a,summary:A,errorCount:D.length,onRemove:l?void 0:()=>y(N),defaultExpanded:c,removeItemAriaLabel:o.removeItemAriaLabel,children:r.jsx(et,{schema:u,value:j,onChange:L=>I(N,L),path:[...n,String(N)],level:a+1})},N)}),!l&&r.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[x.length>0&&r.jsx("div",{className:"flex-1 max-w-[280px]",children:r.jsx(Ke,{options:x,value:f??x[0]?.value,placeholder:o.selectTypeToAdd,onChange:j=>{const N=typeof j=="string"?j:j[0];h(N)}})}),r.jsx(Ns,{label:o.addItem,iconBefore:r.jsx(_.IconPlus,{size:16,stroke:2}),onClick:v})]})]})},q1=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o,readonly:l=!1}=We(),c=m.useId(),d=e.discriminator;if(d){const x=d.propertyName,v=d.mapping,y=Object.keys(v).map(w=>({value:w,label:w})),I=typeof t=="object"&&t!==null?t[x]:void 0,j=I?q({$ref:v[I]},i):void 0,N=w=>{const A=q({$ref:v[w]},i),D=Ie(A,i)??{};s({...D,[x]:w})};if(e.discriminatorDisplay===gt.Radio){const w=e.discriminatorOrientation===Ot.Row,A=I?(()=>{const D=q({$ref:v[I]},i),{[x]:L,...E}=D.properties??{};return{...D,properties:E}})():void 0;return w?r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("div",{role:"radiogroup",className:"flex flex-row flex-wrap gap-4",children:Object.keys(v).map(D=>{const L=q({$ref:v[D]},i);return r.jsx(C.DialRadioButton,{name:c,value:D,inputId:`${c}-${D}`,label:L.title??D,checked:I===D,disabled:l,onChange:()=>N(D)},D)})}),A&&r.jsx(fr,{schema:A,value:t,onChange:s,path:n,level:a})]}):r.jsx("div",{role:"radiogroup",className:"flex flex-col gap-2",children:Object.keys(v).map(D=>{const L=q({$ref:v[D]},i),E=I===D,{[x]:T,...k}=L.properties??{},z={...L,properties:k};return r.jsxs("div",{className:"flex flex-col",children:[r.jsx(C.DialRadioButton,{name:c,value:D,inputId:`${c}-${D}`,label:L.title??D,checked:E,disabled:l,onChange:()=>N(D)}),E&&r.jsx("div",{className:"ml-6 mt-2",children:r.jsx(fr,{schema:z,value:t,onChange:s,path:n,level:a})})]},D)})})}return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("div",{className:"flex-1 max-w-[280px]",children:r.jsx(Ke,{options:y,value:I,placeholder:o.selectTypePlaceholder,disabled:l,onChange:w=>{const A=typeof w=="string"?w:w[0];A&&N(A)}})}),j&&r.jsx("div",{className:"pl-3",children:r.jsx(fr,{schema:j,value:t,onChange:s,path:n,level:a})})]})}const u=e.oneOf??[],h=(()=>{if(t==null)return 0;if(typeof t=="object"&&!Array.isArray(t)){for(let x=0;x<u.length;x++)if(q(u[x],i).required?.every(y=>y in t))return x}return 0})(),p=x=>{const v=q(u[x],i),y=Ie(v,i);s(y??null)},g=u[h];if(e.discriminatorDisplay===gt.Radio)return r.jsx("div",{role:"radiogroup",className:"flex flex-col gap-2",children:u.map((x,v)=>{const y=q(x,i),I=Ar(x,i)??`Option ${v+1}`,j=h===v;return r.jsxs("div",{className:"flex flex-col",children:[r.jsx(C.DialRadioButton,{name:c,value:String(v),inputId:`${c}-${v}`,label:I,checked:j,disabled:l,onChange:()=>p(v)}),j&&y&&r.jsx("div",{className:"ml-6 mt-2",children:r.jsx(et,{schema:y,value:t,onChange:s,path:n,level:a})})]},v)})});const b=u.map((x,v)=>{const y=q(x,i);return{value:String(v),label:y.title??`Option ${v+1}`}});return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("div",{className:"flex-1 max-w-[280px]",children:r.jsx(Ke,{options:b,value:String(h),disabled:l,onChange:x=>{const v=typeof x=="string"?x:x[0];p(Number(v))}})}),g&&r.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:r.jsx(et,{schema:g,value:t,onChange:s,path:n,level:a})})]})},Y1=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,readonly:o=!1}=We(),l=e.anyOf??[],c=l.map((g,b)=>({value:String(b),label:Ar(g,i)})),d=Aa(t,l,i),u=l[d],h=q(u,i).type===F.Null,p=g=>{const b=q(l[g],i);if(b.type===F.Null){s(null);return}const x=Ie(b,i);if(x!==void 0){s(x);return}switch(b.type){case F.Array:s([]);break;case F.String:s("");break;case F.Boolean:s(!1);break;case F.Integer:case F.Number:s(0);break;default:s({});break}};return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("div",{className:"flex-1 max-w-[280px]",children:r.jsx(Ke,{options:c,value:String(d),disabled:o,onChange:g=>{const b=typeof g=="string"?g:g[0];p(Number(b))}})}),!h&&u&&r.jsx("div",{className:"pl-3 border-l-2 border-secondary",children:r.jsx(et,{schema:u,value:t,onChange:s,path:n,level:a})})]})},za=({schema:e,value:t,onChange:s,invalid:n})=>{const a=m.useId(),{texts:i,readonly:o=!1,inputClassName:l,acceptableResourceTypes:c}=We(),d=e.const!==void 0,u=Array.isArray(e.enum)&&e.enum.length>0;if(e["dial:resource"]===!0&&Array.isArray(e.acceptableResourceTypes)&&e.acceptableResourceTypes.length>0&&(e.type===F.String||e.type===void 0)){const h=(e.acceptableResourceTypes??[]).flatMap(p=>{const g=c?.[p];return Array.isArray(g)?g.map(b=>{const x=String(b);return{value:x,label:x}}):[]});return r.jsx(Ke,{options:h,value:t!=null?String(t):void 0,invalid:n,disabled:o,onChange:p=>s(typeof p=="string"?p:p[0]),placeholder:i.enumSelectPlaceholder,className:l})}if(d)return r.jsx(Qe,{value:String(e.const??""),disabled:!0,onChange:void 0,className:"opacity-60"});if(u&&e.enumDisplay===gt.Radio){const h=e.enumOrientation===Ot.Row;return r.jsx("div",{role:"radiogroup",className:h?"flex flex-row flex-wrap gap-x-4 gap-y-2":"flex flex-col gap-2",children:e.enum.map(p=>{const g=String(p);return r.jsx(C.DialRadioButton,{name:a,value:g,inputId:`${a}-${g}`,label:g,checked:t!=null?String(t)===g:!1,disabled:o,onChange:b=>s(b)},g)})})}if(u){const h=e.enum.map(p=>({value:String(p),label:String(p)}));return r.jsx(Ke,{options:h,value:t!=null?String(t):void 0,invalid:n,disabled:o,onChange:p=>s(typeof p=="string"?p:p[0]),placeholder:i.enumSelectPlaceholder})}switch(e.type){case F.Boolean:return r.jsx(ze.DialSwitch,{switchId:a,isOn:!!t,disabled:o,onChange:h=>s(h)});case F.Integer:return r.jsx(os,{integer:!0,value:t!=null?String(t):"",invalid:n,disabled:o,onChange:h=>s(h!==void 0?Number(h):void 0),placeholder:i.integerInputPlaceholder,containerClassName:l});case F.Number:return r.jsx(os,{value:t!=null?String(t):"",invalid:n,disabled:o,onChange:h=>s(h!==void 0?Number(h):void 0),placeholder:i.numberInputPlaceholder,containerClassName:l});default:return e.isProtected?r.jsx(ma,{value:t!=null?String(t):"",invalid:n,disabled:o,onChange:h=>s(h??void 0),placeholder:i.stringInputPlaceholder,containerClassName:l}):r.jsx(Qe,{value:t!=null?String(t):"",invalid:n,disabled:o,onChange:h=>s(h??void 0),placeholder:i.stringInputPlaceholder,containerClassName:l})}},Ls=({value:e,onChange:t,theme:s=Yt.EditorThemes.dark,height:n=240})=>{const{readonly:a,texts:i}=We(),[o,l]=m.useState(null),[c,d]=m.useState(()=>JSON.stringify(e,null,2));m.useEffect(()=>{typeof window<"u"&&Promise.resolve().then(()=>require("./JsonEditor-eAV7SaKu.cjs")).then(h=>{l(()=>h.DialJsonEditor)})},[]);let u=!1;try{JSON.parse(c)}catch{u=!0}const f=h=>{const p=h??"";d(p);try{t(JSON.parse(p))}catch{}};return r.jsxs("div",{children:[r.jsx("div",{className:"border border-primary rounded",style:{height:`${n}px`},children:o&&r.jsx(o,{value:c,currentTheme:s,onChange:f,options:{readOnly:a}})}),r.jsx(Se,{text:u?i.invalidJsonError:void 0})]})},un=(e,t)=>({id:Math.random().toString(36).slice(2),key:e,value:t}),Ba=e=>!!(e.oneOf||e.anyOf||e.type===F.Array||Ze(e)),X1={[F.String]:"entryTypeString",[F.Number]:"entryTypeNumber",[F.Boolean]:"entryTypeBoolean",[F.Null]:"entryTypeNull",[F.Object]:"entryTypeObject",[F.Array]:"entryTypeArray"},J1=({pairId:e,pairKey:t,pairValue:s,valueSchema:n,isUnschematizedValue:a,jsonEditorTheme:i,onKeyChange:o,onValueChange:l,onRemove:c,keyInputPlaceholder:d,removeFieldAriaLabel:u,path:f,level:h,readonly:p=!1,inputClassName:g})=>{const{rootSchema:b,texts:x,defaultExpanded:v=!0,touchedPaths:y=new Set,markTouched:I=()=>{},skipUntouched:j=!1}=We(),[N,w]=m.useState(t),A=Ba(n),[D,L]=m.useState(()=>Ra(s)),E=a&&(D===F.Object||D===F.Array),T=a&&D===F.Null,k=A||E,z=[...f,e,"key"].join("."),Z=(!j||y.has(z))&&t==="",H=m.useCallback(ee=>{l(Ma(ee)),L(ee)},[l]),B=m.useMemo(()=>ka.map(ee=>({value:ee,label:x[X1[ee]]})),[x]),K=m.useMemo(()=>[{value:"true",label:x.booleanTrueOption},{value:"false",label:x.booleanFalseOption}],[x]),V=`${e}-key-error`,W=a&&D===F.Boolean,oe=r.jsxs("div",{className:"flex gap-2 items-start",children:[r.jsxs("div",{className:k?"flex-1 min-w-0":"w-2/5 min-w-0",children:[r.jsx(Qe,{value:N,disabled:p,invalid:Z,"aria-describedby":Z?V:void 0,onChange:ee=>w(ee??""),onBlur:()=>{I(z),N!==t&&o(N)},placeholder:d,containerClassName:g}),r.jsx(Se,{id:V,text:Z?`${x.keyColumnHeader} is required`:void 0})]}),!A&&!E&&r.jsx("div",{className:"flex-1 min-w-0",children:T?r.jsx(Qe,{value:"null",disabled:!0,onChange:void 0,className:"opacity-60"}):W?r.jsx(Ke,{options:K,value:s?"true":"false",disabled:p,onChange:ee=>{const ae=typeof ee=="string"?ee:ee[0];ae&&l(ae==="true")}}):r.jsx(za,{schema:a?{type:D}:n,value:s,onChange:l})}),a&&r.jsx("div",{className:"w-28 shrink-0",children:r.jsx(O.DialTooltip,{tooltip:x.entryTypeChangeWarning,triggerClassName:"block",children:r.jsx(Ke,{options:B,value:D,disabled:p,onChange:ee=>{const ae=typeof ee=="string"?ee:ee[0];ae&&H(ae)}})})}),!p&&r.jsx(Lr,{size:O.ElementSize.Small,onClick:c,"aria-label":u,className:"shrink-0 p-1"})]});if(!k)return oe;if(E)return r.jsxs("div",{className:"flex flex-col gap-2",children:[oe,r.jsx(Ls,{value:s,onChange:l,theme:i},D)]});const X=[...f,t],le=At(s,n,b),G=Ee(s,n,b,X.join("."));return r.jsxs("div",{className:"flex flex-col gap-2",children:[oe,r.jsx(Wt,{title:t,level:h,summary:le,errorCount:G.length+(Z?1:0),defaultExpanded:v,children:r.jsx(et,{schema:n,value:s,onChange:l,path:X,level:h+1})})]})},Q1=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o,readonly:l=!1,inputClassName:c,jsonEditorTheme:d}=We(),u=e.additionalProperties===!0||e.additionalProperties==null,f=u?{type:"string"}:typeof e.additionalProperties=="object"?q(e.additionalProperties,i):{type:"string"},h=Ba(f),[p,g]=m.useState(()=>Object.entries(t??{}).map(([N,w])=>un(N,w))),b=N=>Object.fromEntries(N.filter(w=>w.key!=="").map(w=>[w.key,w.value])),x=(N,w)=>{const A=p.map((D,L)=>L===N?{...D,key:w}:D);g(A),s(b(A))},v=(N,w)=>{const A=p.map((D,L)=>L===N?{...D,value:w}:D);g(A),s(b(A))},y=()=>h?Ie(f,i)??_r(f):"",I=()=>{g(N=>[...N,un("",y())])},j=N=>{const w=p.filter((A,D)=>D!==N);g(w),s(b(w))};return r.jsxs("div",{className:"flex flex-col gap-2",children:[p.length===0&&r.jsx("p",{className:"dial-tiny-text text-secondary italic",children:o.noFieldsYet}),p.length>0&&!h&&r.jsxs("div",{className:"flex gap-2 mb-1 pr-7",children:[r.jsx("span",{className:"w-2/5 dial-tiny-text text-secondary font-medium",children:o.keyColumnHeader}),r.jsx("span",{className:"flex-1 dial-tiny-text text-secondary font-medium",children:o.valueColumnHeader}),u&&r.jsx("span",{className:"w-28 shrink-0 dial-tiny-text text-secondary font-medium",children:o.typeColumnHeader})]}),p.map((N,w)=>r.jsx(J1,{pairId:N.id,pairKey:N.key,pairValue:N.value,valueSchema:f,isUnschematizedValue:u,jsonEditorTheme:d,onKeyChange:A=>x(w,A),onValueChange:A=>v(w,A),onRemove:()=>j(w),keyInputPlaceholder:o.keyInputPlaceholder,removeFieldAriaLabel:o.removeFieldAriaLabel,path:n,level:a,readonly:l,inputClassName:c},N.id)),!l&&r.jsx("div",{className:"pt-1",children:r.jsx(Ns,{label:o.addField,iconBefore:r.jsx(_.IconPlus,{size:16,stroke:2}),onClick:I})})]})},et=({schema:e,value:t,onChange:s,path:n,level:a,required:i,suppressInlineError:o=!1})=>{const{rootSchema:l,renderField:c,markTouched:d=()=>{},touchedPaths:u=new Set,skipUntouched:f=!1,jsonEditorTheme:h}=We(),p=q(e,l),g=v=>{d(n.join(".")),s(v)},b=!f||u.has(n.join("."));let x;if(p.oneOf)x=r.jsx(q1,{schema:p,value:t,onChange:g,path:n,level:a});else if(p.anyOf&&p.type!==F.Object)x=r.jsx(Y1,{schema:p,value:t,onChange:g,path:n,level:a});else if(Ze(p)){const v=p.additionalProperties!=null&&p.additionalProperties!==!1,y=!p.properties||Object.keys(p.properties).length===0;v&&y?x=r.jsx(Q1,{schema:p,value:t,onChange:g,path:n,level:a}):y&&p.additionalProperties!==!1?x=r.jsx(Ls,{value:t,onChange:g,theme:h}):x=r.jsx(fr,{schema:p,value:t,onChange:g,path:n,level:a})}else if(p.type===F.Array)x=r.jsx(U1,{schema:p,value:t,onChange:g,path:n,level:a});else{const v=b&&i&&vt(t),y=!o&&v?er(p.title??"Field"):void 0;x=r.jsxs(r.Fragment,{children:[r.jsx(za,{schema:p,value:t,onChange:g,invalid:v}),r.jsx(Se,{text:y})]})}return c?c(n,p,x):x},ed=({schema:e,defaultValue:t,texts:s,className:n,readonly:a=!1,defaultExpanded:i=!0,inputClassName:o,variant:l=He.Sections,onChange:c,onPropertyChange:d,onDefaultValues:u,renderField:f,skipUntouched:h=!1,jsonEditorTheme:p,acceptableResourceTypes:g})=>{const b=m.useMemo(()=>({...Ea,...s}),[s]),x=m.useMemo(()=>t||(Ie(e,e)??{}),[]),[v,y]=m.useState(x),[I,j]=m.useState(new Set),N=m.useCallback(T=>{j(k=>k.has(T)?k:new Set([...k,T]))},[]);m.useEffect(()=>{u?.(x)},[]);const w=(T,k)=>{const z={...v,[T]:k};y(z),c?.(z),d?.(T,k)},A=new Set(Object.keys(e.properties??{})),D=Object.keys(v).filter(T=>!A.has(T)),L=Or(Object.entries(e.properties??{}).filter(([,T])=>!q(T,e).isHidden)),E=e.required??[];return r.jsx(Oa.Provider,{value:{rootSchema:e,texts:b,readonly:a,defaultExpanded:i,inputClassName:o,jsonEditorTheme:p,acceptableResourceTypes:g,renderField:f,touchedPaths:I,markTouched:N,skipUntouched:h},children:r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-4",n),children:[L.map(([T,k])=>{const z=q(k,e),R=z.title??k.title??xt(T),Z=E.includes(T),H=v[T];if(l===He.Flat)return r.jsx(Pa,{schema:k,value:H,onChange:W=>w(T,W),path:[T],level:0,required:Z,label:R},T);if(l===He.FlatSections)return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("h2",{className:"dial-small-semi-text text-primary",children:R}),r.jsx(et,{schema:k,value:H,onChange:W=>w(T,W),path:[T],level:0,required:Z})]},T);const B=Ee(H,z,e,T),K=T+".",V=!h||I.has(T)||[...I].some(W=>W.startsWith(K));return r.jsx(Wt,{title:R,description:z.description,level:0,defaultExpanded:i,errorCount:V?Z&&vt(H)?Math.max(B.length,1):B.length:0,children:r.jsx(et,{schema:k,value:H,onChange:W=>w(T,W),path:[T],level:1,required:Z})},T)}),D.map(T=>{const k=xt(T),z=r.jsx(Ls,{value:v[T],onChange:R=>w(T,R),theme:p});return l===He.Sections?r.jsx(Wt,{title:k,level:0,defaultExpanded:i,children:z},T):r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx("h2",{className:"dial-small-semi-text text-primary",children:k}),z]},T)})]})})},Fa=m.createContext(null),Ge=()=>{const e=m.useContext(Fa);if(!e)throw new Error("useSchemaContext must be used inside SchemaRenderer");return e},Zt=(e,t=new Set,s=!1,n=!1)=>{if(!s||t.has(e))return!0;if(!n)return!1;const a=e+".";return[...t].some(i=>i.startsWith(a))},Ha=({availableWidth:e,tagWidths:t,overflowChipWidth:s,gap:n})=>{if(e<=0)return t.length;let a=0,i=0;for(const o of t){const l=o+n;if(a+l>e)break;a+=l,i++}if(i===t.length)return i;for(;i>0&&a+s>e;)i--,a-=t[i]+n;return i};var Ct=(e=>(e.Outlined="outlined",e.Selectable="selectable",e))(Ct||{});const td="inline-flex h-[32px] max-w-full items-center gap-1 rounded-full px-3",rd={[Ct.Outlined]:{default:"bg-layer-raised text-primary",selected:"bg-control-accent-alpha text-primary"},[Ct.Selectable]:{default:"text-secondary",selected:"bg-control-accent-alpha text-primary"}},sd="cursor-pointer outline-offset-0 focus-visible:outline focus-visible:outline-focus",nd="hover:bg-control-accent-alpha-hover active:bg-control-accent-alpha-active",$e=({label:e,icon:t,appearance:s=Ct.Outlined,selected:n=!1,disabled:a=!1,closable:i=!1,removeLabel:o,className:l,title:c,onClick:d,onRemove:u,onKeyDown:f,...h})=>{const p=s===Ct.Selectable,g=!!d&&!a,b=i&&!!u&&!a,x=p&&n,v=y=>{f?.(y),!(!g||y.defaultPrevented)&&(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),y.currentTarget.click())};return r.jsxs("span",{...h,role:g?"button":h.role,tabIndex:g?0:h.tabIndex,"aria-disabled":a||void 0,"aria-pressed":p&&g?n:void 0,onClick:a?void 0:d,onKeyDown:v,className:S.mergeClasses(td,x?"dial-tiny-semi-text":"dial-tiny-text",rd[s][n?"selected":"default"],a&&"cursor-not-allowed",g&&[sd,nd],l,C.DIAL_KIT_CLASS.tag),children:[t&&r.jsx("span",{className:"flex shrink-0 items-center","aria-hidden":"true",children:t}),r.jsx("span",{className:"truncate",title:c??e,children:e}),b&&r.jsx(C.GhostIconButton,{className:"size-[16px] shrink-0 dial-kit-minimum-target",size:O.ElementSize.Small,"aria-label":o??`Remove ${e}`,icon:r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),onClick:y=>{y.stopPropagation(),u?.(y)}})]})},br="h-[24px] max-w-full rounded-md border border-secondary bg-layer-sunken px-2",$t=({options:e,selectedValues:t,handleRemoveTag:s,tagClassName:n})=>r.jsx(r.Fragment,{children:t.map(a=>{const i=e.find(o=>o.value===a);return r.jsx($e,{label:i?.label??a,closable:!!s,onRemove:o=>s?.(o,a),icon:i?.icon,className:S.mergeClasses(br,n)},a)})}),ad=8,id=e=>e.stopPropagation(),od=e=>{e.key!=="Escape"&&e.stopPropagation()},ld=({options:e,selectedValues:t,handleRemoveTag:s})=>{const n=m.useRef(null),a=m.useRef(null),[i,o]=m.useState(null),l=m.useCallback(()=>{const f=n.current,h=a.current;if(!f||!h)return;const p=Array.from(h.children,b=>b.offsetWidth),g=p.pop()??0;o(Ha({tagWidths:p,overflowChipWidth:g,availableWidth:f.clientWidth,gap:ad}))},[]);m.useLayoutEffect(()=>{l()},[l,e,t]),m.useLayoutEffect(()=>{const f=n.current;return f?C.observeElementSize(f,l):void 0},[l]);const c=i??t.length,d=t.slice(0,c),u=t.slice(c);return r.jsxs("div",{ref:n,className:"relative flex min-w-0 flex-1 items-center gap-2 overflow-hidden",children:[r.jsx($t,{options:e,selectedValues:d,handleRemoveTag:s,tagClassName:"min-w-0"}),u.length>0&&r.jsx(C.InteractiveTooltip,{asChild:!0,placement:C.TooltipPlacement.Bottom,content:r.jsx("div",{className:"flex flex-wrap gap-2",onClick:id,onKeyDown:od,children:r.jsx($t,{options:e,selectedValues:u,handleRemoveTag:s})}),children:r.jsx($e,{label:`+${u.length}`,role:"button",tabIndex:0,"aria-haspopup":"true","aria-label":`${u.length} more selected: ${u.map(f=>e.find(h=>h.value===f)?.label??f).join(", ")}`,title:"",className:S.mergeClasses(br,"shrink-0")})}),r.jsxs("div",{ref:a,"aria-hidden":"true",inert:!0,className:"pointer-events-none invisible absolute left-0 top-0 flex h-0 w-max gap-2 overflow-hidden",children:[r.jsx($t,{options:e,selectedValues:t,handleRemoveTag:s,tagClassName:"shrink-0"}),r.jsx($e,{label:`+${t.length}`,className:S.mergeClasses(br,"shrink-0")})]})]})},cd=S.mergeClasses("w-full flex flex-col"),dd=C.overlayItemClassName,ud="!max-w-[var(--reference-width)]",fd=S.mergeClasses("max-h-[344px] overflow-y-auto py-1",C.overlayListClassName),pd=C.overlayGap,hd=C.overlaySubMenuListClassName,md=r.jsx(_.IconChevronRight,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),gd="text-secondary transition-transform",xd=8,Cd=r.jsx(_.IconSearch,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),bd=r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),vd=r.jsx(C.SvgNoData,{width:P.DIAL_ICON_SIZE.LG,height:P.DIAL_ICON_SIZE.LG,"aria-hidden":"true"}),yd=({opt:e,selectedValues:t,mark:s=C.MenuItemMark.Tint,onSelect:n})=>{const{isOpen:a,nodeId:i,refs:o,floatingStyles:l,context:c,getReferenceProps:d,getFloatingProps:u}=C.useSubMenuFloating(pd,"listbox",!!e.disabled),f=e.children?.some(p=>t.includes(p.value)),h=r.jsx(C.MenuItem,{ref:o.setReference,role:"option","aria-haspopup":"listbox","aria-expanded":a,"aria-selected":!!f,"aria-disabled":!!e.disabled,disabled:e.disabled,ellipsisLabel:!0,icon:e.icon,label:e.labelNode??e.label,trailing:md,...d()});return r.jsxs(J.FloatingNode,{id:i,children:[e.interactiveTooltip?r.jsx(C.InteractiveTooltip,{asChild:!0,placement:e.interactiveTooltip.placement,content:e.interactiveTooltip.content,contentClassName:e.interactiveTooltip.contentClassName,children:h}):h,a&&r.jsx(C.SubMenuPanel,{refs:o,floatingStyles:l,context:c,getFloatingProps:u,role:"listbox",surfaceClassName:hd,children:e.children.map(p=>{const g=r.jsx(C.MenuItem,{role:"option","aria-selected":t.includes(p.value),"aria-disabled":!!p.disabled,disabled:p.disabled,mark:s,selected:t.includes(p.value),ellipsisLabel:!0,icon:p.icon,label:p.labelNode??p.label,rightControl:p.rightControl,onClick:()=>!p.disabled&&n(p.value)});return r.jsx(m.Fragment,{children:p.interactiveTooltip?r.jsx(C.InteractiveTooltip,{asChild:!0,placement:p.interactiveTooltip.placement,content:p.interactiveTooltip.content,contentClassName:p.interactiveTooltip.contentClassName,children:g}):g},p.value)})})]})},tt=({options:e,multiple:t=!1,id:s,value:n,defaultValue:a,size:i=O.ElementSize.Standard,prefix:o,customSelectedValue:l,placeholder:c="Select...",labelProps:d,error:u,caption:f,ariaLabel:h,searchable:p=!1,searchSize:g=O.ElementSize.Standard,searchPlaceholder:b,selectAll:x=!1,invalid:v,selectAllLabel:y="Select all",collapseTagOverflow:I=!1,selectedOptionMark:j=C.MenuItemMark.Tint,emptyStateTitle:N="No options available",emptyStateDescription:w,emptyStateIcon:A,disabled:D=!1,className:L,fieldClassName:E,listClassName:T,closable:k=!1,header:z,footer:R,onClose:Z,onChange:H,dismissRef:B,onFooterClick:K,open:V,onOpenChange:W,onSearchQueryChange:oe,customMultiSelectTagsRenderer:X})=>{const le=m.useId(),G=s||le,ee=`list-${G}`,ae=i===O.ElementSize.Small,[de,me]=m.useState(!1),Ne=V!==void 0,xe=Ne?!!V:de,U=m.useCallback($=>{Ne||me($),W?.($)},[Ne,W]),[Q,_e]=m.useState(""),Be=m.useCallback($=>{$!==Q&&(_e($||""),oe?.($||""))},[oe,Q]),ve=n!==void 0,[Ue,ct]=m.useState(a),Ce=ve?n:Ue,Y=m.useMemo(()=>t?Array.isArray(Ce)?Ce:[]:typeof Ce=="string"?[Ce]:[],[Ce,t]),ue=m.useMemo(()=>{const $=Q.trim().toLowerCase();return $?e.filter(he=>he.label.toLowerCase().includes($)):e},[e,Q]);m.useEffect(()=>{xe||Be("")},[xe,Be]);const fe=m.useCallback($=>{ve||ct($),H?.($)},[ve,H]),Rt=m.useCallback($=>{if(t){const he=new Set(Y);he.has($)?he.delete($):he.add($),fe(Array.from(he));return}fe($),U(!1)},[t,fe,U,Y]),St=m.useCallback(($,he)=>{if($.stopPropagation(),!t){fe("");return}const tr=Y.filter(xi=>xi!==he);fe(tr)},[t,Y,fe]),we=m.useMemo(()=>ue.filter($=>!$.disabled),[ue]),st=m.useMemo(()=>we.filter($=>Y.includes($.value)).length,[we,Y]),{allSelectedInFiltered:je,someSelectedInFiltered:kr}=m.useMemo(()=>{const $=we.length>0&&st===we.length;return{allSelectedInFiltered:$,someSelectedInFiltered:st>0&&!$}},[we,st]),It=m.useCallback(()=>{if(!(!t||we.length===0))if(je){const $=new Set(we.map(he=>he.value));fe(Y.filter(he=>!$.has(he)))}else{const $=new Set(Y);we.forEach(he=>$.add(he.value)),fe(Array.from($))}},[je,t,we,Y,fe]),dt=Y.length>0,M=!t&&dt?Y[0]:void 0,ie=m.useMemo(()=>M?e.find($=>$.value===M)??e.flatMap($=>$.children??[]).find($=>$.value===M):void 0,[e,M]),Le=ie?o?`${o} ${ie.label}`:ie.label:void 0,Rr=C.useIsMobileScreen(),Mr=t&&I&&!X&&!Rr,Mt=m.useMemo(()=>t?dt?Mr?r.jsx(ld,{options:e,selectedValues:Y,handleRemoveTag:St}):r.jsx("span",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-2",children:X?.(e,Y,St)??r.jsx($t,{options:e,selectedValues:Y,handleRemoveTag:St})}):null:!ie||!ie.labelNode&&!ie.description?null:r.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[r.jsx(C.EllipsisTooltip,{text:ie.labelNode??Le}),ie.description&&r.jsx("span",{className:"truncate text-secondary dial-tiny-text",children:ie.description})]}),[Mr,X,St,dt,t,e,Le,Y,ie]),fi=t||Mt?"":Le||(l&&n?l:""),pi=typeof d?.label=="string"?d.label:void 0,hi=Mt?[O.resolveAccessibleName(h,pi),t?Y.map($=>e.find(he=>he.value===$)?.label??$).join(", "):Le].filter(Boolean).join(", ")||void 0:O.resolveAccessibleName(h);m.useImperativeHandle(B,()=>({dismiss:()=>{U(!1)}}));const mi=m.useCallback($=>{D||($.key==="ArrowDown"||$.key==="ArrowUp")&&($.preventDefault(),xe||U(!0))},[D,xe,U]),gi=()=>r.jsxs("div",{id:ee,role:"listbox","aria-multiselectable":t||void 0,className:cd,children:[z&&r.jsx(r.Fragment,{children:typeof z=="function"?z():z}),(p||k)&&(e.length>xd||!!Q)&&r.jsxs("div",{className:"flex items-center gap-2 px-2 pt-2",children:[p&&r.jsx(C.Input,{id:`search-${G}`,size:g,placeholder:b,"aria-label":b||"Search options",onChange:$=>Be($),value:Q,iconBefore:Cd,containerClassName:"w-full"}),k&&r.jsx(C.GhostIconButton,{"aria-label":"Close select",className:"shrink-0",size:O.ElementSize.Small,icon:bd,onClick:$=>{Z?.($),U(!1)}})]}),t&&x&&we.length>0&&r.jsx("div",{className:S.mergeClasses(dd,"mt-2"),children:r.jsx(C.Checkbox,{id:`${G}-selectAll`,labelProps:{label:y},isSelected:je,isIndeterminate:kr,onChange:It})}),r.jsx("div",{role:"none",className:fd,children:ue.length===0?r.jsx("div",{className:"px-2 py-3",children:r.jsx(C.DialNoDataContent,{icon:A??vd,title:N,description:w})}):ue.map($=>{const he=Y.includes($.value);if($.children?.length)return r.jsx(yd,{opt:$,selectedValues:Y,mark:t?C.MenuItemMark.Checkbox:j,onSelect:Rt},$.value);const tr=t?r.jsx(C.MenuItem,{id:`${G}-${$.value}`,role:"option","aria-selected":he,"aria-disabled":!!$.disabled,disabled:$.disabled,mark:C.MenuItemMark.Checkbox,selected:he,icon:$.icon,label:$.labelNode??$.label,description:$.description,rightControl:$.rightControl,onClick:()=>Rt($.value)}):r.jsx(C.MenuItem,{role:"option","aria-selected":he,"aria-disabled":!!$.disabled,disabled:$.disabled,mark:j,selected:he,ellipsisLabel:!0,icon:$.icon,label:$.labelNode??$.label,description:$.description,rightControl:$.rightControl,onClick:()=>!$.disabled&&Rt($.value)});return r.jsx(m.Fragment,{children:$.interactiveTooltip?r.jsx(C.InteractiveTooltip,{asChild:!0,placement:$.interactiveTooltip.placement,content:$.interactiveTooltip.content,contentClassName:$.interactiveTooltip.contentClassName,children:tr}):tr},$.value)})}),R&&r.jsx("div",{onClick:$=>{K?.($),K&&U(!1)},children:typeof R=="function"?R():R})]});return r.jsxs("div",{className:S.mergeClasses("flex w-full flex-col gap-2",L,C.DIAL_KIT_CLASS.select),children:[d&&r.jsx(C.Label,{...d,htmlFor:G}),r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx(C.Dropdown,{open:xe,onOpenChange:U,disabled:D,closable:k,onClose:Z,placement:"bottom-start",allowedPlacements:["bottom-start","top-start"],listClassName:S.mergeClasses(ud,T),className:"w-full",renderOverlay:gi,children:r.jsx(C.Input,{id:G,size:i,disabled:D,invalid:v,value:fi,placeholder:Mt?void 0:c,readOnly:!0,iconBefore:t?void 0:ie?.icon,iconAfter:r.jsx(_.IconChevronDown,{size:ae?P.DIAL_ICON_SIZE.SM:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:S.mergeClasses(gd,xe&&"rotate-180")}),role:"combobox","aria-haspopup":"listbox","aria-expanded":xe,"aria-controls":ee,"aria-autocomplete":"none","aria-label":hi,containerClassName:"w-full",wrapperClassName:S.mergeClasses(!D&&"cursor-pointer",t&&dt&&!Mr&&["!h-auto flex-wrap py-2",ae?"min-h-[24px]":"min-h-[40px]"],E),className:S.mergeClasses("cursor-pointer",Mt&&"w-0 min-w-0 flex-none p-0"),onKeyDown:mi,children:Mt})}),r.jsx(C.ErrorText,{text:u}),!u&&r.jsx(C.CaptionText,{text:f})]})]})},fn={[F.Array]:[],[F.String]:"",[F.Boolean]:!1,[F.Integer]:0,[F.Number]:0},Sd=({schema:e,value:t,onChange:s,path:n,level:a,ariaLabel:i})=>{const{rootSchema:o,texts:l,readonly:c=!1}=Ge(),d=e.anyOf??[],u=Aa(t,d,o),f=d[u],h=!f||q(f,o).type===F.Null,p=g=>{const b=q(d[g],o);if(b.type===F.Null){s(null);return}const x=Ie(b,o);if(x!==void 0){s(x);return}const v=typeof b.type=="string"?b.type:"";s(v in fn?fn[v]:{})};return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx(tt,{ariaLabel:i??l.selectTypePlaceholder,options:d.map((g,b)=>({value:String(b),label:Ar(g,o)})),value:String(u),disabled:c,onChange:g=>p(Number(typeof g=="string"?g:g[0])),className:"max-w-[280px]"}),!h&&r.jsx("div",{className:"border-l-2 border-tertiary pl-3",children:r.jsx(rt,{schema:f,value:t,onChange:s,path:n,level:a,ariaLabel:i})})]})},yt=({label:e,variant:t,appearance:s=O.ButtonAppearance.Solid,size:n=O.ElementSize.Standard,className:a,textClassName:i,iconAfter:o,iconBefore:l,type:c="button",tooltipProps:d,href:u,target:f,rel:h,disabled:p,...g})=>{const b=S.mergeClasses("dial-kit-base-button",t&&C.getButtonClassNames(t,s),n===O.ElementSize.Small?"dial-tiny-semi-text":"dial-small-paragraph-semi-text",n===O.ElementSize.Small?"h-[24px] gap-1":"h-[40px] gap-2",n===O.ElementSize.Small&&"dial-kit-base-button-small",s!==O.ButtonAppearance.Link&&(n===O.ElementSize.Small?"px-2":"px-4"),n!==O.ElementSize.Small&&s!==O.ButtonAppearance.Link&&"dial-kit-enhanced-target",a),x=e?void 0:d?.tooltip,v=O.resolveAccessibleName(typeof e=="string"?e:void 0,g["aria-label"],x),y=r.jsxs(r.Fragment,{children:[r.jsx(C.DialIcon,{icon:l}),e&&r.jsx("span",{className:i,children:e}),r.jsx(C.DialIcon,{icon:o})]}),I=g,j=u!==void 0?r.jsx("a",{...I,href:p?void 0:u,target:f,rel:h??(f==="_blank"?"noopener noreferrer":void 0),"aria-disabled":p||void 0,tabIndex:p?-1:I.tabIndex,onClick:p?void 0:I.onClick,className:b,"aria-label":v,children:y}):r.jsx("button",{...g,...C.getDisabledButtonProps(p,d,g.onClick),type:c,className:b,"aria-label":v,children:y});return d?r.jsx(C.Tooltip,{asChild:!0,...d,children:j}):j},Ts=(e,t)=>({appearance:n,...a})=>r.jsx(yt,{...a,variant:e,appearance:n||t}),Es=(e,t)=>({variant:n,...a})=>r.jsx(yt,{...a,variant:n||t,appearance:e}),$a=Ts(O.ButtonVariant.Primary,O.ButtonAppearance.Solid),Os=Ts(O.ButtonVariant.Neutral,O.ButtonAppearance.Solid),Id=Ts(O.ButtonVariant.Danger,O.ButtonAppearance.Solid),wt={x1:"-5.06",y1:"2.26",x2:"30.62",y2:"22.63",from:"var(--stroke-gradient-1, #5976E9)",to:"var(--stroke-gradient-2, #885DF2)"},Nd=r.jsx(_.IconSparkles,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":!0}),jd=({appearance:e=O.ButtonAppearance.Outlined,iconBefore:t=Nd,iconAfter:s,style:n,...a})=>{const i=`dial-kit-starter-gradient-${m.useId().replace(/[^\w-]/g,"")}`,o=r.jsx("svg",{className:"pointer-events-none absolute size-0 overflow-hidden","aria-hidden":"true",focusable:"false",children:r.jsx("defs",{children:r.jsxs("linearGradient",{id:i,x1:wt.x1,y1:wt.y1,x2:wt.x2,y2:wt.y2,gradientUnits:"userSpaceOnUse",children:[r.jsx("stop",{stopColor:wt.from}),r.jsx("stop",{offset:"1",stopColor:wt.to})]})})}),l=c=>r.jsxs(r.Fragment,{children:[o,c]});return r.jsx(yt,{...a,variant:O.ButtonVariant.Starter,appearance:e,iconBefore:t?l(t):void 0,iconAfter:s&&!t?l(s):s,style:{"--dial-kit-starter-icon-stroke":`url(#${i})`,...n}})},Dd=Es(O.ButtonAppearance.Link,O.ButtonVariant.Primary),As=Es(O.ButtonAppearance.Ghost,O.ButtonVariant.Primary),wd=Es(O.ButtonAppearance.Outlined,O.ButtonVariant.Neutral),Gt=({title:e,description:t,summary:s,errorCount:n=0,level:a=0,children:i,onRemove:o,defaultExpanded:l=!0,removeItemAriaLabel:c="Remove item"})=>{const[d,u]=m.useState(l),f=m.useId(),h=a===0;return r.jsxs("div",{className:S.mergeClasses("flex flex-col border border-tertiary",h?"rounded-xl bg-layer-raised":"rounded-lg",C.DIAL_KIT_CLASS.schemaRendererSection),children:[r.jsxs("div",{className:S.mergeClasses("flex items-center gap-2",h?"px-4 py-3":"px-3 py-2"),children:[r.jsxs("button",{type:"button","aria-expanded":d,"aria-controls":d?f:void 0,onClick:()=>u(p=>!p),className:"flex min-w-0 flex-1 items-center gap-2 rounded text-left text-primary focus-visible:outline focus-visible:outline-focus",children:[r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:S.mergeClasses("shrink-0 text-secondary transition-transform",!d&&"-rotate-90")}),r.jsx("span",{className:S.mergeClasses("truncate",h?"dial-small-semi-text":"dial-small-text"),children:e})]}),r.jsx(C.InfoButton,{caption:t}),s&&r.jsx("span",{className:"dial-tiny-text whitespace-nowrap text-secondary",children:s}),n>0?r.jsxs("span",{className:"flex items-center gap-1 whitespace-nowrap dial-tiny-text text-error",children:[r.jsx(_.IconAlertTriangle,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:"shrink-0"}),n," error",n>1?"s":""]}):r.jsx(_.IconCheck,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:"shrink-0 text-success"}),o&&r.jsx(C.DangerIconButton,{size:O.ElementSize.Small,icon:r.jsx(_.IconTrash,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),"aria-label":c,onClick:o,className:"shrink-0"})]}),d&&r.jsx("div",{id:f,className:S.mergeClasses("border-t border-tertiary",h?"p-4":"p-3"),children:i})]})},Ld=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o,readonly:l=!1,defaultExpanded:c=!0}=Ge(),[d,u]=m.useState(),f=Array.isArray(t)?t:[],h=e.items;if(!h)return r.jsx("p",{className:"dial-small-text text-secondary",children:o.noItemSchema});const p=q(h,i),g=p.discriminator,b=g?Object.keys(g.mapping).map(j=>({value:j,label:j})):[],x=d??b[0]?.value,v=()=>{let j;if(g&&x){const N=q({$ref:g.mapping[x]},i);j={...Ie(N,i)??{},[g.propertyName]:x}}else j=Ie(p,i)??_r(p);s([...f,j])},y=j=>{s(f.filter((N,w)=>w!==j))},I=(j,N)=>{s(f.map((w,A)=>A===j?N:w))};return r.jsxs("div",{className:"flex flex-col gap-3",children:[f.length===0&&r.jsx("p",{className:"dial-small-text text-secondary",children:o.noItemsYet}),f.map((j,N)=>{const w=_a(j,g?.propertyName,N),A=Ee(j,p,i,`${n.join(".")}[${N}]`);return r.jsx(Gt,{title:w,level:a,summary:At(j,p,i),errorCount:A.length,onRemove:l?void 0:()=>y(N),defaultExpanded:c,removeItemAriaLabel:`${o.removeItemAriaLabel}: ${w}`,children:r.jsx(rt,{schema:h,value:j,onChange:D=>I(N,D),path:[...n,String(N)],level:a+1,ariaLabel:w})},N)}),!l&&r.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[b.length>0&&r.jsx(tt,{ariaLabel:o.selectTypeToAdd,options:b,value:x,placeholder:o.selectTypeToAdd,onChange:j=>u(typeof j=="string"?j:j[0]),className:"max-w-[280px] flex-1"}),r.jsx(As,{label:o.addItem,iconBefore:r.jsx(_.IconPlus,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),onClick:v})]})]})};var _s=(e=>(e.None="none",e.Both="both",e.Horizontal="horizontal",e.Vertical="vertical",e))(_s||{});const pn={none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"},Td=e=>typeof e=="boolean"?pn[e?"both":"none"]:pn[e],Va=({className:e="",value:t,onChange:s,error:n,containerClassName:a,resize:i=!1,labelProps:o,caption:l,id:c,invalid:d,...u})=>{const f=S.mergeClasses("dial-kit-textarea dial-kit-input px-3 py-2",d&&"dial-kit-input-error",u.disabled&&"dial-kit-input-disable",Td(i),e);return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-2",a),children:[o&&r.jsx(C.Label,{...o,htmlFor:c}),r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx("textarea",{id:c,value:t||"",className:f,onChange:h=>s?.(h.currentTarget.value),...u}),r.jsx(C.ErrorText,{text:n}),!n&&r.jsx(C.CaptionText,{text:l})]})]})},hn=e=>{try{return JSON.parse(e),!0}catch{return!1}},ks=({value:e,onChange:t,id:s,ariaLabel:n})=>{const{readonly:a,texts:i}=Ge(),[o,l]=m.useState(()=>JSON.stringify(e,null,2)??""),c=!hn(o),d=u=>{l(u),hn(u)&&t(JSON.parse(u))};return r.jsx(Va,{id:s,"aria-label":n,value:o,onChange:d,readOnly:a,invalid:c,error:c?i.invalidJsonError:void 0,spellCheck:!1,rows:10,resize:_s.Vertical,className:"font-mono !whitespace-pre"})},Ed=/^0+\.(\d+)?$/,Od=/^0+/,Ad=[".","-","+","e","E"],mn=e=>!e||e==="-"?e:String(e).match(Ed)?String(e).replace(Od,"0"):Number(e),Rs=({integer:e,onChange:t,min:s,max:n,onKeyDown:a,onPaste:i,...o})=>{const l=d=>{if(e&&Ad.includes(d.key)){d.preventDefault();return}C.handleKeyDown(d,"number",s,n),a?.(d)},c=d=>{if(e){const u=d.clipboardData.getData("text"),f=u.replace(/\D/g,"");if(f!==u&&(d.preventDefault(),f)){const h=d.currentTarget,p=h.selectionStart??0,g=h.selectionEnd??0,b=h.value.slice(0,p)+f+h.value.slice(g);t?.(mn(b))}}i?.(d)};return r.jsx(C.Input,{...o,wrapperClassName:S.mergeClasses(o.wrapperClassName,C.DIAL_KIT_CLASS.numberInput),type:"number",min:s,max:n,onChange:d=>t?.(mn(d)),onKeyDown:l,onPaste:c})},Ka=({showPasswordLabel:e="Show password",hidePasswordLabel:t="Hide password",disabled:s,size:n=O.ElementSize.Standard,...a})=>{const[i,o]=m.useState(!1),l=i&&!s;return m.useEffect(()=>{s&&o(!1)},[s]),r.jsx(C.Input,{...a,wrapperClassName:S.mergeClasses(a.wrapperClassName,C.DIAL_KIT_CLASS.passwordInput),size:n,disabled:s,type:l?"text":"password",iconAfter:s?void 0:r.jsx(C.GhostIconButton,{size:O.ElementSize.Small,"aria-label":l?t:e,"aria-pressed":l,icon:l?r.jsx(_.IconEyeOff,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}):r.jsx(_.IconEye,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),onClick:()=>o(c=>!c)})})},_d="flex flex-col gap-2",kd="flex",Rd="mt-2 ml-[26px]",Md={[Ae.Column]:"flex-col gap-y-3",[Ae.Row]:"flex-row flex-wrap gap-x-4 gap-y-3"},Ut=({items:e,value:t,onChange:s,name:n,id:a,orientation:i=Ae.Column,labelProps:o,disabled:l,error:c,caption:d,ariaLabel:u,className:f,optionsClassName:h,radioClassName:p,contentClassName:g})=>{const b=m.useId(),x=a??b,v=`${x}-label`,y=c?`${x}-error`:void 0,I=!c&&d?`${x}-caption`:void 0,j=O.resolveAccessibleName(o?.label);return r.jsxs("div",{className:S.mergeClasses(_d,f,C.DIAL_KIT_CLASS.radioGroup),children:[o&&r.jsx(C.Label,{...o,id:v}),r.jsx("div",{role:"radiogroup","aria-labelledby":j?v:void 0,"aria-label":j?void 0:O.resolveAccessibleName(u),"aria-describedby":[y,I].filter(Boolean).join(" ")||void 0,"aria-disabled":l||void 0,className:S.mergeClasses(kd,Md[i],h),children:e.map(N=>{const w=N.value===t;return r.jsxs("div",{className:"flex min-w-0 flex-col",children:[r.jsx(C.Radio,{id:`${x}-${N.value}`,name:n??x,value:N.value,labelProps:N.label==null?void 0:{label:N.label},"aria-label":N["aria-label"],caption:N.caption,isSelected:w,disabled:l||N.disabled,onChange:s,className:p}),w&&N.content?r.jsx("div",{className:S.mergeClasses(Rd,g),children:N.content}):null]},N.value)})}),r.jsx(C.ErrorText,{id:y,text:c}),!c&&r.jsx(C.CaptionText,{id:I,text:d})]})},Wa=({id:e,labelProps:t,isOn:s=!1,disabled:n,onChange:a,caption:i,className:o,...l})=>{const c=m.useId(),d=e??c,u=i?`${d}-caption`:void 0,f=m.useCallback(h=>{a?.(h.target.checked)},[a]);return r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsxs("div",{className:S.mergeClasses("group/choice flex items-center gap-2",o,C.DIAL_KIT_CLASS.switch),children:[r.jsx("input",{...l,type:"checkbox",role:"switch",id:d,checked:s,"aria-checked":s,disabled:n,onChange:f,"aria-label":O.resolveAccessibleName(typeof t?.label!="string"?l["aria-label"]:void 0),"aria-describedby":u,className:"peer sr-only"}),r.jsx("label",{htmlFor:d,className:S.mergeClasses("flex h-[18px] w-[36px] shrink-0 items-center rounded-full p-0.5 transition-colors duration-200","peer-focus-visible:outline peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus",s?"justify-end":"justify-start",n?"cursor-not-allowed bg-control-disable-primary":S.mergeClasses("cursor-pointer",s?"bg-control-accent group-has-[label:hover]/choice:bg-control-accent-hover":"bg-control-neutral-default group-has-[label:hover]/choice:bg-control-neutral-hover-strong")),children:r.jsx("span",{className:S.mergeClasses("size-3.5 shrink-0 rounded-full",n?"bg-control-disable-secondary":"bg-control-neutral")})}),t&&r.jsx(C.Label,{size:O.ElementSize.Standard,...t,htmlFor:d,className:S.mergeClasses("py-[1px]",n?"cursor-not-allowed text-control-disable-primary":"cursor-pointer text-primary",t.className)})]}),i&&r.jsx("span",{id:u,className:"dial-tiny-text text-secondary ml-[44px]",children:i})]})},gn=e=>typeof e=="string"?e:e[0],Qr=e=>e!=null?String(e):"",Pd=e=>e!==void 0?Number(e):void 0,Za=({schema:e,value:t,onChange:s,invalid:n,id:a,ariaLabel:i})=>{const{texts:o,readonly:l=!1,inputClassName:c,acceptableResourceTypes:d}=Ge(),u=e.const!==void 0,f=Array.isArray(e.enum)?e.enum:[],h=f.length>0;if(e["dial:resource"]===!0&&Array.isArray(e.acceptableResourceTypes)&&e.acceptableResourceTypes.length>0&&(e.type===F.String||e.type===void 0)){const g=(e.acceptableResourceTypes??[]).flatMap(b=>{const x=d?.[b];return Array.isArray(x)?x.map(v=>{const y=String(v);return{value:y,label:y}}):[]});return r.jsx(tt,{id:a,ariaLabel:i,options:g,value:t!=null?String(t):void 0,invalid:n,disabled:l,onChange:b=>s(gn(b)),placeholder:o.enumSelectPlaceholder,className:c})}if(u)return r.jsx(C.Input,{id:a,"aria-label":i,value:String(e.const??""),disabled:!0,containerClassName:c});if(h&&e.enumDisplay===gt.Radio)return r.jsx(Ut,{id:a,ariaLabel:i,items:f.map(g=>({value:String(g),label:String(g)})),value:t!=null?String(t):void 0,orientation:e.enumOrientation===Ot.Row?Ae.Row:Ae.Column,disabled:l,onChange:g=>s(g)});if(h)return r.jsx(tt,{id:a,ariaLabel:i,options:f.map(g=>({value:String(g),label:String(g)})),value:t!=null?String(t):void 0,invalid:n,disabled:l,onChange:g=>s(gn(g)),placeholder:o.enumSelectPlaceholder,className:c});switch(e.type){case F.Boolean:return r.jsx(Wa,{id:a,"aria-label":i,isOn:!!t,disabled:l,onChange:g=>s(g)});case F.Integer:case F.Number:return r.jsx(Rs,{id:a,"aria-label":i,integer:e.type===F.Integer,value:Qr(t),invalid:n,disabled:l,onChange:g=>s(Pd(g)),placeholder:e.type===F.Integer?o.integerInputPlaceholder:o.numberInputPlaceholder,containerClassName:c});default:return e.isProtected?r.jsx(Ka,{id:a,"aria-label":i,value:Qr(t),invalid:n,disabled:l,onChange:g=>s(g??void 0),placeholder:o.stringInputPlaceholder,containerClassName:c}):r.jsx(C.Input,{id:a,"aria-label":i,value:Qr(t),invalid:n,disabled:l,onChange:g=>s(g??void 0),placeholder:o.stringInputPlaceholder,containerClassName:c})}},xn=(e,t)=>({id:Math.random().toString(36).slice(2),key:e,value:t}),Ga=e=>!!(e.oneOf||e.anyOf||e.type===F.Array||Ze(e)),zd={[F.String]:"entryTypeString",[F.Number]:"entryTypeNumber",[F.Boolean]:"entryTypeBoolean",[F.Null]:"entryTypeNull",[F.Object]:"entryTypeObject",[F.Array]:"entryTypeArray"},Cn=e=>typeof e=="string"?e:e[0],Bd=({pair:e,valueSchema:t,isUnschematizedValue:s,onKeyChange:n,onValueChange:a,onRemove:i,path:o,level:l})=>{const{rootSchema:c,texts:d,readonly:u=!1,inputClassName:f,defaultExpanded:h=!0,touchedPaths:p,markTouched:g,skipUntouched:b}=Ge(),[x,v]=m.useState(e.key),[y,I]=m.useState(()=>Ra(e.value)),j=Ga(t),N=s&&(y===F.Object||y===F.Array),w=s&&y===F.Null,A=s&&y===F.Boolean,D=j||N,L=[...o,e.id,"key"].join("."),E=Zt(L,p,b)&&e.key==="",T=e.key||d.valueColumnHeader,k=V=>{a(Ma(V)),I(V)},z=m.useMemo(()=>ka.map(V=>({value:V,label:d[zd[V]]})),[d]),R=m.useMemo(()=>[{value:"true",label:d.booleanTrueOption},{value:"false",label:d.booleanFalseOption}],[d]),Z=()=>w?r.jsx(C.Input,{"aria-label":T,value:"null",disabled:!0}):A?r.jsx(tt,{ariaLabel:T,options:R,value:e.value?"true":"false",disabled:u,onChange:V=>{const W=Cn(V);W&&a(W==="true")}}):r.jsx(Za,{schema:s?{type:y}:t,value:e.value,onChange:a,ariaLabel:T}),H=r.jsxs("div",{className:"flex items-start gap-2",children:[r.jsx("div",{className:D?"min-w-0 flex-1":"w-2/5 min-w-0",children:r.jsx(C.Input,{"aria-label":d.keyColumnHeader,value:x,disabled:u,invalid:E,error:E?`${d.keyColumnHeader} is required`:void 0,onChange:V=>v(V??""),onBlur:()=>{g?.(L),x!==e.key&&n(x)},placeholder:d.keyInputPlaceholder,containerClassName:f})}),!D&&r.jsx("div",{className:"min-w-0 flex-1",children:Z()}),s&&r.jsx("div",{className:"w-28 shrink-0",children:r.jsx(C.Tooltip,{tooltip:d.entryTypeChangeWarning,triggerClassName:"block",children:r.jsx(tt,{ariaLabel:d.typeColumnHeader,options:z,value:y,disabled:u,onChange:V=>{const W=Cn(V);W&&k(W)}})})}),!u&&r.jsx(C.DangerIconButton,{size:O.ElementSize.Small,icon:r.jsx(_.IconTrash,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),"aria-label":e.key?`${d.removeFieldAriaLabel}: ${e.key}`:d.removeFieldAriaLabel,onClick:i,className:"mt-2 shrink-0"})]});if(!D)return H;if(N)return r.jsxs("div",{className:"flex flex-col gap-2",children:[H,r.jsx(ks,{value:e.value,onChange:a,ariaLabel:T},y)]});const B=[...o,e.key],K=Ee(e.value,t,c,B.join("."));return r.jsxs("div",{className:"flex flex-col gap-2",children:[H,r.jsx(Gt,{title:e.key,level:l,summary:At(e.value,t,c),errorCount:K.length+(E?1:0),defaultExpanded:h,children:r.jsx(rt,{schema:t,value:e.value,onChange:a,path:B,level:l+1,ariaLabel:T})})]})},Fd=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o,readonly:l=!1}=Ge(),c=e.additionalProperties===!0||e.additionalProperties==null,d=!c&&typeof e.additionalProperties=="object"?q(e.additionalProperties,i):{type:F.String},u=Ga(d),[f,h]=m.useState(()=>Object.entries(t??{}).map(([x,v])=>xn(x,v))),p=x=>{h(x),s(Object.fromEntries(x.filter(v=>v.key!=="").map(v=>[v.key,v.value])))},g=(x,v)=>p(f.map((y,I)=>I===x?{...y,...v}:y)),b=()=>{const x=u?Ie(d,i)??_r(d):"";h(v=>[...v,xn("",x)])};return r.jsxs("div",{className:"flex flex-col gap-2",children:[f.length===0&&r.jsx("p",{className:"dial-small-text text-secondary",children:o.noFieldsYet}),f.length>0&&!u&&r.jsxs("div",{"aria-hidden":"true",className:"flex gap-2 pr-8",children:[r.jsx("span",{className:"w-2/5 dial-tiny-semi-text text-secondary",children:o.keyColumnHeader}),r.jsx("span",{className:"flex-1 dial-tiny-semi-text text-secondary",children:o.valueColumnHeader}),c&&r.jsx("span",{className:"w-28 shrink-0 dial-tiny-semi-text text-secondary",children:o.typeColumnHeader})]}),f.map((x,v)=>r.jsx(Bd,{pair:x,valueSchema:d,isUnschematizedValue:c,onKeyChange:y=>g(v,{key:y}),onValueChange:y=>g(v,{value:y}),onRemove:()=>p(f.filter((y,I)=>I!==v)),path:n,level:a},x.id)),!l&&r.jsx("div",{className:"pt-1",children:r.jsx(As,{label:o.addField,iconBefore:r.jsx(_.IconPlus,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),onClick:b})})]})},ds=({schema:e,value:t,onChange:s,path:n,level:a})=>{const{rootSchema:i,texts:o}=Ge(),l=q(e,i),c=Or(Object.entries(l.properties??{}).filter(([,f])=>!q(f,i).isHidden)),d=l.required??[],u=t??{};return c.length===0?r.jsx("p",{className:"dial-small-text text-secondary",children:o.noConfigurableProperties}):r.jsx("div",{className:"flex flex-col gap-4",children:c.map(([f,h])=>{const p=q(h,i);return r.jsx(Ua,{schema:h,value:u[f],onChange:g=>s({...u,[f]:g}),path:[...n,f],level:a,required:d.includes(f),label:p.title??h.title??xt(f)},f)})})},bn=e=>typeof e=="string"?e:e[0],Hd=(e,t)=>{const{[t]:s,...n}=e.properties??{};return{...e,properties:n}},$d=({schema:e,value:t,onChange:s,path:n,level:a,ariaLabel:i})=>{const{rootSchema:o,texts:l,readonly:c=!1}=Ge(),d=m.useId(),u=i??l.selectTypePlaceholder,f=e.discriminatorDisplay===gt.Radio,h=e.discriminator;if(h){const y=h.propertyName,I=h.mapping,j=D=>q({$ref:I[D]},o),N=typeof t=="object"&&t!==null?t[y]:void 0,w=N?j(N):void 0,A=D=>{const L=Ie(j(D),o)??{};s({...L,[y]:D})};if(f){const D=e.discriminatorOrientation===Ot.Row,L=T=>r.jsx(ds,{schema:Hd(T,y),value:t,onChange:s,path:n,level:a}),E=r.jsx(Ut,{id:d,ariaLabel:u,value:N,onChange:A,disabled:c,orientation:D?Ae.Row:Ae.Column,items:Object.keys(I).map(T=>{const k=j(T);return{value:T,label:k.title??T,content:D?void 0:L(k)}})});return D?r.jsxs("div",{className:"flex flex-col gap-3",children:[E,w&&L(w)]}):E}return r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx(tt,{ariaLabel:u,options:Object.keys(I).map(D=>({value:D,label:D})),value:N,placeholder:l.selectTypePlaceholder,disabled:c,onChange:D=>{const L=bn(D);L&&A(L)},className:"max-w-[280px]"}),w&&r.jsx("div",{className:"pl-3",children:r.jsx(ds,{schema:w,value:t,onChange:s,path:n,level:a})})]})}const p=e.oneOf??[],b=(()=>{if(typeof t!="object"||t===null||Array.isArray(t))return 0;const y=p.findIndex(I=>q(I,o).required?.every(j=>j in t));return y>=0?y:0})(),x=p[b],v=y=>{const I=Ie(q(p[y],o),o);s(I??null)};return f?r.jsx(Ut,{id:d,ariaLabel:u,value:String(b),onChange:y=>v(Number(y)),disabled:c,items:p.map((y,I)=>({value:String(I),label:Ar(y,o)??`Option ${I+1}`,content:r.jsx(rt,{schema:q(y,o),value:t,onChange:s,path:n,level:a,ariaLabel:i})}))}):r.jsxs("div",{className:"flex flex-col gap-3",children:[r.jsx(tt,{ariaLabel:u,options:p.map((y,I)=>({value:String(I),label:q(y,o).title??`Option ${I+1}`})),value:String(b),disabled:c,onChange:y=>v(Number(bn(y))),className:"max-w-[280px]"}),x&&r.jsx("div",{className:"border-l-2 border-tertiary pl-3",children:r.jsx(rt,{schema:x,value:t,onChange:s,path:n,level:a,ariaLabel:i})})]})},rt=({schema:e,value:t,onChange:s,path:n,level:a,required:i,suppressInlineError:o=!1,fieldId:l,ariaLabel:c})=>{const{rootSchema:d,renderField:u,markTouched:f,touchedPaths:h,skipUntouched:p}=Ge(),g=q(e,d),b=n.join("."),x=I=>{f?.(b),s(I)},v={schema:g,value:t,onChange:x,path:n,level:a};let y;if(g.oneOf)y=r.jsx($d,{...v,ariaLabel:c});else if(g.anyOf&&g.type!==F.Object)y=r.jsx(Sd,{...v,ariaLabel:c});else if(Ze(g)){const I=g.additionalProperties!=null&&g.additionalProperties!==!1,j=!g.properties||Object.keys(g.properties).length===0;I&&j?y=r.jsx(Fd,{...v}):j&&g.additionalProperties!==!1?y=r.jsx(ks,{value:t,onChange:x,id:l,ariaLabel:c}):y=r.jsx(ds,{...v})}else if(g.type===F.Array)y=r.jsx(Ld,{...v});else{const I=Zt(b,h,p)&&!!i&&vt(t),j=!o&&I?er(g.title??c??"Field"):void 0;y=r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx(Za,{schema:g,value:t,onChange:x,invalid:I,id:l,ariaLabel:c}),r.jsx(C.ErrorText,{text:j})]})}return u?u(n,g,y):y},Ua=({schema:e,value:t,onChange:s,path:n,level:a=0,required:i,label:o})=>{const l=m.useId(),{rootSchema:c,defaultExpanded:d=!0,touchedPaths:u,skipUntouched:f}=Ge(),h=q(e,c),p=n.join(".");if(Ze(h)||h.type===F.Array){const b=Ee(t,h,c,p),x=o??h.title??n[n.length-1]??"Section";return r.jsx(Gt,{title:x,description:h.description,level:a,summary:At(t,h,c),errorCount:Zt(p,u,f,!0)?b.length:0,defaultExpanded:d,children:r.jsx(rt,{schema:h,value:t,onChange:s,path:n,level:a+1,required:i,ariaLabel:x})})}const g=Zt(p,u,f)&&i&&vt(t)?er(o??"Field"):void 0;return r.jsxs("div",{className:"flex flex-col gap-2",children:[r.jsx(C.Label,{htmlFor:l,label:o,required:i,caption:h.description}),r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsx(rt,{schema:h,value:t,onChange:s,path:n,level:a,required:i,suppressInlineError:!0,fieldId:l,ariaLabel:o}),r.jsx(C.ErrorText,{text:g})]})]})},vn="dial-small-semi-text text-primary",Vd=({schema:e,defaultValue:t,texts:s,className:n,readonly:a=!1,defaultExpanded:i=!0,inputClassName:o,variant:l=He.Sections,onChange:c,onPropertyChange:d,onDefaultValues:u,renderField:f,skipUntouched:h=!1,acceptableResourceTypes:p})=>{const g=m.useMemo(()=>({...Ea,...s}),[s]),b=m.useMemo(()=>t||(Ie(e,e)??{}),[]),[x,v]=m.useState(b),[y,I]=m.useState(()=>new Set),j=m.useCallback(E=>{I(T=>T.has(E)?T:new Set([...T,E]))},[]);m.useEffect(()=>{u?.(b)},[]);const N=(E,T)=>{const k={...x,[E]:T};v(k),c?.(k),d?.(E,T)},w=new Set(Object.keys(e.properties??{})),A=Object.keys(x).filter(E=>!w.has(E)),D=Or(Object.entries(e.properties??{}).filter(([,E])=>!q(E,e).isHidden)),L=e.required??[];return r.jsx(Fa.Provider,{value:{rootSchema:e,texts:g,readonly:a,defaultExpanded:i,inputClassName:o,acceptableResourceTypes:p,renderField:f,touchedPaths:y,markTouched:j,skipUntouched:h},children:r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-4",n,C.DIAL_KIT_CLASS.schemaRenderer),children:[D.map(([E,T])=>{const k=q(T,e),z=k.title??T.title??xt(E),R=L.includes(E),Z=x[E],H=V=>N(E,V);if(l===He.Flat)return r.jsx(Ua,{schema:T,value:Z,onChange:H,path:[E],level:0,required:R,label:z},E);if(l===He.FlatSections)return r.jsxs("section",{className:"flex flex-col gap-3",children:[r.jsx("h2",{className:vn,children:z}),r.jsx(rt,{schema:T,value:Z,onChange:H,path:[E],level:0,required:R,ariaLabel:z})]},E);const B=Ee(Z,k,e,E),K=R&&vt(Z)?Math.max(B.length,1):B.length;return r.jsx(Gt,{title:z,description:k.description,level:0,defaultExpanded:i,errorCount:Zt(E,y,h,!0)?K:0,children:r.jsx(rt,{schema:T,value:Z,onChange:H,path:[E],level:1,required:R,ariaLabel:z})},E)}),A.map(E=>{const T=xt(E),k=r.jsx(ks,{value:x[E],onChange:z=>N(E,z),ariaLabel:T});return l===He.Sections?r.jsx(Gt,{title:T,level:0,defaultExpanded:i,children:k},E):r.jsxs("section",{className:"flex flex-col gap-3",children:[r.jsx("h2",{className:vn,children:T}),k]},E)})]})})},Kd=e=>({info:r.jsx(_.IconInfoCircleFilled,{size:e.size}),error:r.jsx(_.IconAlertCircleFilled,{size:e.size}),warning:r.jsx(_.IconAlertTriangleFilled,{size:e.size}),success:r.jsx(_.IconCircleCheckFilled,{size:e.size}),loading:r.jsx(Tt,{size:e.size}),general:r.jsx(_.IconCheck,{size:e.size,stroke:e.stroke})}),Wd={[ce.Info]:"bg-info text-info",[ce.Success]:"bg-success text-success",[ce.Warning]:"bg-warning text-warning",[ce.Error]:"bg-error text-error",[ce.Loading]:"bg-layer-raised text-info",[ce.General]:"bg-layer-sunken text-primary"},Zd={[ce.Info]:"status",[ce.Success]:"status",[ce.Warning]:"alert",[ce.Error]:"alert",[ce.Loading]:"status",[ce.General]:"status"},Gd="items-center justify-between rounded-xl relative gap-3 p-3 border flex border-transparent",Ms=({variant:e=ce.Info,type:t=be.Toast,title:s,message:n,action:a,className:i,iconSize:o=24,iconStroke:l=2,closable:c=!1,onClose:d,children:u,textClassName:f,...h})=>{const p=m.useMemo(()=>Kd({size:o,stroke:l})[e],[e,o,l]),g=f??(t===be.SectionMessage?"flex-row flex-wrap items-baseline gap-x-1":"flex-col");return r.jsxs("div",{role:Zd[e],...h,className:S.mergeClasses(Gd,Wd[e],t===be.Toast&&"min-w-[200px] max-w-[600px] shadow-lg",t===be.SectionMessage&&e===ce.Loading&&"border-secondary",i,C.DIAL_KIT_CLASS.notification),children:[r.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[r.jsx("span",{"aria-hidden":"true",className:"flex shrink-0",children:r.jsx(C.DialIcon,{icon:p})}),s?r.jsxs("div",{className:S.mergeClasses("flex min-w-0 text-primary break-words",g),children:[r.jsx("div",{className:"dial-small-paragraph-semi-text min-w-0 break-words",children:s}),r.jsx("div",{className:"dial-small-paragraph-text min-w-0 break-words",children:n})]}):r.jsx("div",{className:"dial-small-paragraph-text min-w-0 text-primary break-words",children:n})]}),a!=null&&r.jsx("div",{className:"flex shrink-0 items-center",children:a}),u,c&&r.jsx(C.CloseButton,{className:"shrink-0 self-start",ariaLabel:"Close notification",onClose:b=>d?.(b)})]})},Ud=({className:e,children:t,...s})=>r.jsx("article",{...s,className:S.mergeClasses("relative flex flex-col gap-3 rounded-[20px] border-2 border-transparent p-5","bg-layer-raised shadow-md transition-[transform,box-shadow] duration-200 ease-out hover:-translate-y-[3px] hover:shadow-lg motion-reduce:transition-none motion-reduce:hover:translate-y-0",e,C.DIAL_KIT_CLASS.cardShell),children:t}),_t=(e,t)=>({type:n,...a})=>r.jsx(Ms,{...a,variant:e,type:n||t}),kt=(e,t)=>({variant:n,...a})=>r.jsx(Ms,{...a,variant:n||t,type:e}),qd=_t(ce.Error,be.Toast),Yd=_t(ce.Info,be.Toast),Xd=_t(ce.Success,be.Toast),Jd=_t(ce.Warning,be.Toast),Qd=_t(ce.Loading,be.Toast),eu=_t(ce.General,be.Toast),tu=kt(be.SectionMessage,ce.Error),ru=kt(be.SectionMessage,ce.Info),su=kt(be.SectionMessage,ce.Success),nu=kt(be.SectionMessage,ce.Warning),au=kt(be.SectionMessage,ce.Loading),iu=kt(be.SectionMessage,ce.General);var Te=(e=>(e.Date="date",e.DateTime="datetime",e.Time="time",e.Weekday="weekday",e))(Te||{});const ou="en-GB",lu={[Te.Date]:"Select date",[Te.DateTime]:"Select date and time",[Te.Time]:"--:--",[Te.Weekday]:"Select day"},qa="flex w-full items-center justify-between gap-2 rounded-xl border border-secondary bg-layer-raised px-4 py-3 dial-small-text text-primary outline-hidden transition-colors hover:border-accent-alpha focus-within:border-accent-focus",Ya="!cursor-not-allowed !border-transparent bg-layer-sunken text-control-disable-primary hover:!border-transparent",Xa="!border-error",cu="z-floating flex w-[248px] flex-col gap-4 rounded-lg bg-layer-raised px-2 py-4 shadow-md",du="flex size-10 items-center justify-center rounded-full dial-small-text text-primary hover:bg-control-accent-alpha-hover hover:text-primary focus:outline-hidden focus-visible:outline focus-visible:outline-focus",uu="bg-control-accent text-control-permanent",fu="text-accent dial-small-semi-text",pu="text-control-disable-primary",Ja="text-secondary",hu=r.jsx(_.IconCalendar,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:Ja}),yn={prev:r.jsx(_.IconChevronLeft,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),next:r.jsx(_.IconChevronRight,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})},mu=(e,t)=>{const n=(new Date(e,t,1).getDay()+6)%7,a=new Date(e,t,1-n);return Array.from({length:42},(i,o)=>{const l=new Date(a);return l.setDate(a.getDate()+o),l})},Sn=(e,t)=>!!e&&!!t&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate(),In=(e,t,s)=>{const n=new Date(e.getFullYear(),e.getMonth(),e.getDate());if(t){const a=new Date(t.getFullYear(),t.getMonth(),t.getDate());if(n<a)return!0}if(s){const a=new Date(s.getFullYear(),s.getMonth(),s.getDate());if(n>a)return!0}return!1},gu=(e,t)=>e.toLocaleDateString(t,{month:"long",year:"numeric"}),Nn=(e,t)=>e.toLocaleDateString(t,{day:"numeric",month:"short",year:"numeric"}),xu=(e,t)=>e.toLocaleDateString(t,{weekday:"long",day:"numeric",month:"long",year:"numeric"}),or=e=>`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`,jn=(e,t)=>{const[s,n]=t.split(":").map(Number),a=new Date(e);return a.setHours(s||0,n||0,0,0),a},Cu=e=>/^([01]\d|2[0-3]):[0-5]\d$/.test(e),bu=e=>{const t=e.replace(/\D/g,"").slice(0,4);let s=t.slice(0,2);const n=t.slice(2,4);if(s.length===2&&(s=String(Math.min(Number(s),23)).padStart(2,"0")),n.length===0)return s;const a=String(Math.min(Number(n),59)).padStart(n.length,"0");return`${s}:${a}`},Qa=5,ei=e=>e.charAt(0).toUpperCase()+e.slice(1),vu=e=>Array.from({length:7},(t,s)=>{const n=new Date(Date.UTC(1970,0,Qa+s));return ei(n.toLocaleDateString(e,{weekday:"short",timeZone:"UTC"}))}),yu=e=>Array.from({length:7},(t,s)=>{const n=new Date(Date.UTC(1970,0,Qa+s));return{value:String(s+1),label:ei(n.toLocaleDateString(e,{weekday:"long",timeZone:"UTC"}))}}),Dn=({id:e,disabled:t,invalid:s,trigger:n,panelClassName:a,fieldClassName:i,panel:o,labelledBy:l,panelLabel:c})=>{const d=C.useThemeScope(),[u,f]=m.useState(!1),{refs:h,floatingStyles:p,context:g}=J.useFloating({open:u,onOpenChange:j=>f(t?!1:j),placement:"bottom-start",whileElementsMounted:J.autoUpdate,middleware:[J.offset(8),J.flip({padding:8}),J.shift({padding:8})]}),b=J.useClick(g,{enabled:!t}),x=J.useDismiss(g),v=J.useRole(g,{role:"dialog"}),{getReferenceProps:y,getFloatingProps:I}=J.useInteractions([b,x,v]);return r.jsxs(r.Fragment,{children:[r.jsx("div",{id:e,ref:h.setReference,role:"button","aria-haspopup":"dialog","aria-expanded":u,"aria-disabled":t,"aria-labelledby":l,tabIndex:t?-1:0,className:S.mergeClasses(qa,"focus-visible:outline focus-visible:outline-focus",s&&Xa,t&&Ya,i),...y(),children:n}),u&&r.jsx(J.FloatingPortal,{children:r.jsx(J.FloatingFocusManager,{context:g,modal:!1,initialFocus:-1,returnFocus:!0,children:r.jsx("div",{ref:h.setFloating,style:p,"aria-label":c,className:S.mergeClasses(cu,d,a),...I(),children:o(()=>f(!1))})})})]})},wn=({id:e,value:t,onChange:s,onBlur:n,disabled:a,invalid:i,className:o,ariaLabel:l,placeholder:c="--:--",timezoneLabel:d,timezoneLabelClassName:u})=>{const[f,h]=m.useState(t);m.useEffect(()=>{h(t)},[t]);const p=r.jsx("input",{id:e,type:"text",inputMode:"numeric",autoComplete:"off","aria-label":l,placeholder:c,disabled:a,value:f,onChange:g=>{const b=bu(g.target.value);h(b),Cu(b)&&s(b)},onBlur:n,className:S.mergeClasses(qa,i&&Xa,a&&Ya,o)});return d?r.jsxs("div",{className:"relative w-full",children:[p,r.jsx("span",{className:S.mergeClasses("dial-small-paragraph-text pointer-events-none absolute end-4 top-1/2 -translate-y-1/2 truncate text-secondary",u),children:d})]}):p},Su=({mode:e=Te.Date,value:t,onChange:s,onBlur:n,labelProps:a,placeholder:i,disabled:o=!1,invalid:l=!1,id:c,className:d,minDate:u,maxDate:f,locale:h=ou,fieldClassName:p,showTimezone:g=!1})=>{const b=i??lu[e],x=t instanceof Date?t:null,v=m.useId(),y=c??v,I=a?.id??`${y}-label`,j=!!a?.label,N=typeof a?.label=="string"?a.label:void 0,w=j?`${I} ${y}`:void 0,A=a?r.jsx(C.Label,{...a,id:I,htmlFor:y}):null,[D,L]=m.useState(()=>x??new Date),E=m.useMemo(()=>new Date,[]),T=m.useMemo(()=>g?La({locale:h}):null,[g,h]),k=m.useMemo(()=>vu(h),[h]),z=m.useMemo(()=>yu(h),[h]),R=m.useMemo(()=>mu(D.getFullYear(),D.getMonth()),[D]),Z=V=>{L(W=>new Date(W.getFullYear(),W.getMonth()+V,1))},H=(V,W)=>{if(In(V,u,f))return;const oe=e===Te.DateTime&&x?jn(V,or(x)):V;s?.(oe),e===Te.Date&&W()},B=V=>{s?.(jn(x??new Date,V))},K=()=>x?e===Te.DateTime?`${Nn(x,h)}, ${or(x)}`:Nn(x,h):b;if(e===Te.Time){const V=typeof t=="string"?t:x?or(x):"";return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-y-3",d,C.DIAL_KIT_CLASS.calendar),children:[A,r.jsx(wn,{id:y,value:V,onChange:W=>s?.(W),onBlur:n,disabled:o,invalid:l,placeholder:b,className:p,timezoneLabel:T})]})}if(e===Te.Weekday){const V=typeof t=="string"?t:void 0,W=z.find(oe=>oe.value===V);return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-y-3",d,C.DIAL_KIT_CLASS.calendar),children:[A,r.jsx(Dn,{id:y,disabled:o,invalid:l,labelledBy:w,panelLabel:N??b,fieldClassName:p,trigger:r.jsxs(r.Fragment,{children:[r.jsx("span",{className:S.mergeClasses("truncate",!W&&"text-secondary"),children:W?.label??b}),r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:Ja})]}),panel:oe=>r.jsx("div",{role:"listbox","aria-label":N??b,className:"flex flex-col gap-0.5",children:z.map(X=>r.jsx("button",{type:"button",role:"option","aria-selected":X.value===V,className:S.mergeClasses("flex w-full items-center rounded-lg px-3 py-2 text-left dial-small-text text-primary hover:bg-control-accent-alpha-hover","focus-visible:outline focus-visible:outline-focus",X.value===V&&"bg-control-accent-alpha-hover"),onClick:()=>{s?.(X.value),oe()},children:X.label},X.value))})})]})}return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-y-3",d,C.DIAL_KIT_CLASS.calendar),children:[A,r.jsx(Dn,{id:y,disabled:o,invalid:l,labelledBy:w,panelLabel:N??b,fieldClassName:p,trigger:r.jsxs(r.Fragment,{children:[r.jsx("span",{className:S.mergeClasses("truncate",!x&&"text-secondary"),children:K()}),hu]}),panel:V=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(C.StaticIconButton,{"aria-label":"Previous month",icon:yn.prev,size:O.ElementSize.Small,onClick:()=>Z(-1)}),r.jsx("div",{className:"dial-small-semi-text text-primary","aria-live":"polite",children:gu(D,h)}),r.jsx(C.StaticIconButton,{"aria-label":"Next month",icon:yn.next,size:O.ElementSize.Small,onClick:()=>Z(1)})]}),r.jsxs("div",{className:"grid grid-cols-7 gap-y-1 text-center",children:[k.map(W=>r.jsx("div",{"aria-hidden":"true",className:"dial-tiny-text py-1 text-secondary",children:W},W)),R.map(W=>{const oe=W.getMonth()!==D.getMonth(),X=Sn(W,x),le=Sn(W,E),G=In(W,u,f);return r.jsx("button",{type:"button",disabled:G,"aria-label":xu(W,h),"aria-pressed":X,"aria-current":le?"date":void 0,className:S.mergeClasses(du,oe&&pu,le&&!X&&fu,X&&uu,G&&"cursor-not-allowed opacity-40 hover:bg-transparent"),onClick:()=>H(W,V),children:W.getDate()},W.toISOString())})]}),e===Te.DateTime&&r.jsxs("div",{className:"flex items-center justify-between gap-3 border-t border-secondary pt-3",children:[r.jsx("span",{className:"dial-small-text text-primary",children:"Time"}),r.jsx(wn,{ariaLabel:"Time",value:x?or(x):"",onChange:B,onBlur:n,className:S.mergeClasses(!T&&"w-[120px]","px-3 py-1.5"),timezoneLabel:T,timezoneLabelClassName:"end-3 max-w-[60%]"})]})]})})]})},Iu=3,Nu=({segments:e,labelClassName:t="dial-small-text",leafClassName:s="dial-small-semi-text",className:n,ariaLabel:a="Folder path"})=>{const i=m.useRef(null),o=m.useRef(null),l=m.useRef(null),[c,d]=m.useState(!1),u=m.useRef(!1),f=m.useRef(0),h=m.useCallback(L=>{u.current=L,d(L)},[]),p=m.useCallback(()=>{const L=i.current;if(!L)return;if(u.current){L.clientWidth>=f.current&&h(!1);return}const E=o.current,T=l.current;if(!E||!T)return;const k=E.scrollWidth-E.clientWidth,z=parseFloat(getComputedStyle(T).minWidth)||0,R=T.clientWidth<=z+1;k>0&&R&&(f.current=L.clientWidth+k,h(!0))},[h]);m.useEffect(()=>{const L=i.current;if(L)return C.observeElementSize(L,p)},[p]);const g=e.join("\0");m.useEffect(()=>{h(!1),C.scheduleMeasure(p)},[g,p,h]),m.useEffect(()=>{c||C.scheduleMeasure(p)},[c,p]);const b=r.jsx(C.DialIcon,{icon:r.jsx(_.IconFolder,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),className:"text-secondary"}),x=r.jsx("span",{className:Ss,children:r.jsx(C.DialIcon,{icon:r.jsx(_.IconChevronRight,{size:14,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:"rtl:scale-x-[-1]"}),className:"text-secondary"})}),v=S.mergeClasses(t,"text-secondary cursor-default"),y=e.length-1,I=e.length>=3?y-1:-1,j=e.length>Iu||c,N=e.slice(1,c?y:y-1),w=L=>{const E=L===y,T=L===I;let k=e[L];return E&&(k=r.jsx("span",{className:s,children:e[L]})),r.jsxs("li",{className:S.mergeClasses(mr,E&&"min-w-0",T&&"shrink-[1000]",!E&&!T&&"shrink-0"),children:[r.jsxs("span",{className:S.mergeClasses(is,ia,"pointer-events-none opacity-75",T&&"min-w-auto"),"aria-current":E?"page":void 0,"aria-disabled":"true",children:[L===0&&b,r.jsx("span",{ref:E&&o||T&&l||void 0,className:S.mergeClasses("truncate",E&&"min-w-0 flex-1",T&&"min-w-[2ch]",v),children:k})]}),!E&&x]},`item-${L}`)},A=()=>r.jsxs("li",{className:S.mergeClasses(mr,"shrink-0"),children:[r.jsxs(C.Tooltip,{tooltip:e.join(" > "),triggerClassName:"inline-flex cursor-default items-center text-secondary",children:[r.jsx(_.IconDots,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}),r.jsx("span",{className:"sr-only",children:N.join(", ")})]}),x]},"ellipsis"),D=[];return j?(D.push(w(0),A()),c||D.push(w(y-1)),D.push(w(y))):e.forEach((L,E)=>D.push(w(E))),r.jsx("nav",{ref:i,"aria-label":a,className:S.mergeClasses(na,n,C.DIAL_KIT_CLASS.folderPath),children:r.jsx("ol",{className:aa,children:D})})};var bt=(e=>(e.Small="small",e.Heading="heading",e))(bt||{});const ju="w-full overflow-hidden",Du="flex min-w-0 flex-nowrap items-center gap-2 whitespace-nowrap",Ln="flex min-w-0 items-center gap-2",Tn={[bt.Small]:"dial-small-text",[bt.Heading]:"dial-h2-text"},wu={[bt.Small]:"dial-small-semi-text",[bt.Heading]:"dial-h2-text"},Lu={first:"shrink-0",middle:"min-w-0 max-w-[30%] shrink",last:"min-w-0 max-w-[51%] shrink"},Tu="flex min-w-0 flex-1 items-center gap-1 rounded-xs transition-colors",Eu="text-secondary hover:text-accent focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-focus",Ou="cursor-default text-primary",Au="cursor-default text-secondary",En="inline-flex flex-none items-center leading-none text-secondary",_u="dial-kit-minimum-target flex shrink-0 items-center rounded-xs text-secondary transition-colors hover:text-accent focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-focus",ku=3,Ru=4,Mu=r.jsx(_.IconChevronRight,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:"rtl:scale-x-[-1]"}),Pu=({items:e,maxVisibleItems:t=Ru,size:s=bt.Small,separator:n=Mu,ariaLabel:a="Breadcrumb",overflowAriaLabel:i="Show hidden path segments",className:o,itemClassName:l})=>{const c=Math.max(t,ku),d=m.useMemo(()=>e.length>c?e.slice(1,-(c-2)):[],[e,c]),u=m.useMemo(()=>d.map((g,b)=>({key:String(b),label:g.label,icon:g.icon})),[d]),f=m.useCallback(({key:g,domEvent:b})=>{const x=d[Number(g)];x&&(x.onClick?.(b),!x.onClick&&x.href&&!b.defaultPrevented&&(window.location.href=x.href))},[d]);if(e.length===0)return null;const h=e.slice(d.length+1),p=(g,{index:b,isFirst:x,isCurrent:v})=>{const y=!v&&(!!g.href||!!g.onClick),I=S.mergeClasses(Tu,y?Eu:v?S.mergeClasses(Ou,wu[s]):Au,l,C.DIAL_KIT_CLASS.breadcrumbsItem),j=r.jsxs(r.Fragment,{children:[g.icon,r.jsx(C.EllipsisTooltip,{text:g.label})]});return r.jsxs("li",{className:S.mergeClasses(Ln,Tn[s],Lu[v?"last":x?"first":"middle"]),children:[y?g.href?r.jsx("a",{href:g.href,onClick:g.onClick,className:I,children:j}):r.jsx("button",{type:"button",onClick:g.onClick,className:I,children:j}):r.jsx("span",{className:I,"aria-current":v?"page":void 0,children:j}),!v&&r.jsx("span",{className:En,"aria-hidden":"true",children:n})]},`segment-${b}`)};return r.jsx("nav",{"aria-label":a,className:S.mergeClasses(ju,o,C.DIAL_KIT_CLASS.breadcrumbs),children:r.jsxs("ol",{className:Du,children:[p(e[0],{index:0,isFirst:!0,isCurrent:e.length===1}),d.length>0&&r.jsxs("li",{className:S.mergeClasses(Ln,Tn[s],"shrink-0"),children:[r.jsx(C.Dropdown,{items:u,onItemClick:f,placement:"bottom-start",matchReferenceWidth:!1,children:r.jsx("button",{type:"button","aria-label":i,className:_u,children:r.jsx(_.IconDots,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})})}),r.jsx("span",{className:En,"aria-hidden":"true",children:n})]}),h.map((g,b)=>p(g,{index:e.length-h.length+b,isFirst:!1,isCurrent:b===h.length-1}))]})})},zu=({className:e,icon:t,tooltipProps:s,type:n="button",...a})=>{const i=S.mergeClasses("flex items-center justify-center rounded-full size-[40px]","dial-kit-enhanced-target","dial-kit-fab-button disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-focus outline-offset-0",e),o=r.jsx("button",{...a,type:n,className:i,"aria-label":O.resolveAccessibleName(a["aria-label"],s?.tooltip),children:t||r.jsx(_.IconArrowNarrowDown,{size:24,stroke:1.5,"aria-hidden":"true"})});return s?r.jsx(O.DialTooltip,{...s,children:o}):o},Bu=e=>r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":!0,className:S.mergeClasses("transition-transform",e&&"rotate-180")}),Fu=({variant:e,appearance:t,items:s,dropdownProps:n,...a})=>{const[i,o]=m.useState(!1),l=m.useMemo(()=>Bu(i),[i]);return r.jsx("div",{className:C.DIAL_KIT_CLASS.buttonDropdown,children:r.jsx(C.Dropdown,{...n,items:s,onOpenChange:c=>o(c),children:r.jsx(yt,{...a,iconAfter:l,variant:e||O.ButtonVariant.Primary,appearance:t||O.ButtonAppearance.Solid,"aria-haspopup":"menu","aria-expanded":i})})})},ti=({label:e,size:t,isOpen:s=!1,labelClassName:n,className:a,"aria-label":i,...o})=>{const l=t===O.ElementSize.Small?"h-[32px]":"h-[40px] dial-kit-enhanced-target";return r.jsxs("button",{type:"button",...o,"aria-haspopup":"menu","aria-expanded":s,"aria-label":i?`${i} ${e}`:void 0,className:S.mergeClasses("dial-small-paragraph-text px-3 focus-visible:outline focus-visible:outline-focus","flex items-center gap-1 rounded-full text-primary disabled:text-control-disable-primary","hover:bg-control-accent-alpha-hover focus-visible:outline-offset-2 active:bg-control-accent-alpha-active",l,a,C.DIAL_KIT_CLASS.inlineSelect),children:[r.jsx("span",{className:n,children:e}),r.jsx(_.IconChevronDown,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":!0,className:S.mergeClasses("transition-transform",s&&"rotate-180")})]})},Hu=({items:e,selectedKey:t,defaultSelectedKey:s,onSelect:n,size:a,disabled:i,placement:o="bottom-end",matchReferenceWidth:l=!1,listClassName:c,listStyle:d,ariaLabel:u,triggerClassName:f,triggerLabelClassName:h,open:p,onOpenChange:g})=>{const[b,x]=m.useState(!1),v=p!==void 0,y=v?p:b,I=m.useCallback(E=>{v||x(E),g?.(E)},[v,g]),[j,N]=m.useState(s??e[0]?.key),w=t!==void 0,A=w?t:j,D=m.useMemo(()=>{const E=e.find(T=>T.key===A);return E?.label?String(E.label):""},[e,A]),L=m.useCallback(({key:E})=>{const T=e.find(k=>k.key===E);T&&(w||N(E),n?.(T))},[e,w,n]);return r.jsx(C.Dropdown,{items:e,placement:o,matchReferenceWidth:l,listClassName:c,listStyle:d,disabled:i,open:v?p:void 0,onOpenChange:I,onItemClick:L,children:r.jsx(ti,{label:D,size:a,isOpen:y,disabled:i,"aria-label":u,className:f,labelClassName:h})})},$u="z-popup flex items-center justify-center bg-backdrop md:p-4 gap-5 p-6",Vu="relative flex w-full max-h-full flex-col rounded-xl bg-layer-raised md:h-auto",Ku="flex flex-row items-center justify-between px-6 py-4",Wu="flex-1 min-w-0 mr-3 truncate dial-h3-text text-primary",Zu="border-b border-tertiary",Gu="flex flex-row items-center gap-2 px-6 py-4",Uu="border-t border-tertiary",es="flex shrink-0 flex-row items-center gap-2",qu="ml-auto mobile:flex-1",vr="mobile:flex-1",Yu={[De.Sm]:"max-w-full md:max-w-[400px]",[De.Md]:"max-w-full md:max-w-[800px]",[De.Lg]:"max-w-full md:max-w-[1200px]"},Ps=({open:e=!1,header:t,ariaLabel:s,portalId:n,className:a,overlayClassName:i,overlayStyle:o,titleClassName:l,headerClassName:c,bodyClassName:d,children:u,footer:f,footerClassName:h,onClose:p,onBack:g,backAriaLabel:b="Back",headerActions:x,headerDivider:v=!1,mainButtons:y,additionalButtons:I,additionalButtonsOnLeft:j=!1,footerDivider:N=!1,size:w=De.Md,hideClose:A=!1,closeAriaLabel:D="Close dialog",closeOnOutsideClick:L=!0,preventKeyboardOnOpen:E=!1})=>{const T=C.useThemeScope(),k=m.useRef(null),z=m.useId(),{refs:R,context:Z}=J.useFloating({open:e,onOpenChange:G=>{G||p?.(null)}}),H=J.useRole(Z,{role:"dialog"}),B=J.useDismiss(Z,{outsidePress:L}),{getFloatingProps:K}=J.useInteractions([H,B]);if(!e)return null;const V=typeof t=="string"?`popup-heading-${z}`:void 0,W=G=>G?typeof G=="string"?r.jsx("h2",{id:V,className:S.mergeClasses(Wu,l),children:r.jsx(C.Tooltip,{tooltip:G,triggerClassName:"truncate",children:G})}):G:r.jsx("span",{}),oe=A?null:r.jsx(C.CloseButton,{ariaLabel:D,onClose:G=>p?.(G)}),X=(G,ee=[],ae)=>ee.map(({variant:de=O.ButtonVariant.Neutral,className:me,...Ne},xe)=>r.jsx(yt,{variant:de,className:S.mergeClasses(ae,me),...Ne},`${G}-${xe}`)),le=()=>{if(f!==void 0)return f;if(!y?.length&&!I?.length)return null;const G=X("additional",I,j?void 0:vr);return r.jsxs("div",{className:S.mergeClasses(Gu,N&&Uu,h),children:[j&&G.length>0&&r.jsx("div",{className:es,children:G}),r.jsxs("div",{className:S.mergeClasses(es,qu),children:[!j&&G,X("main",y,vr)]})]})};return r.jsx(J.FloatingPortal,{id:n,children:r.jsx(J.FloatingOverlay,{style:o,className:S.mergeClasses($u,T,i),children:r.jsx(J.FloatingFocusManager,{context:Z,initialFocus:E?k:R.floating,children:r.jsxs("div",{ref:R.setFloating,...K(),role:"dialog","aria-modal":"true","aria-labelledby":V,"aria-label":V?void 0:s,className:S.mergeClasses(Vu,Yu[w],a,C.DIAL_KIT_CLASS.popup),children:[E&&r.jsx("div",{ref:k,tabIndex:-1,"aria-hidden":!0,className:"absolute size-px -m-px overflow-hidden opacity-0 pointer-events-none"}),r.jsxs("div",{className:S.mergeClasses(Ku,v&&Zu,c),children:[g&&r.jsx(C.GhostIconButton,{"aria-label":b,size:O.ElementSize.Small,className:"mr-2",onClick:g,icon:r.jsx(_.IconChevronLeft,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})}),W(t),x?r.jsxs("div",{className:es,children:[x,oe]}):oe]}),r.jsx("div",{className:S.mergeClasses("grow overflow-auto",d),children:u}),le()]})})})})},Xu="flex justify-end gap-2 px-6 py-4 border-t border-tertiary",Ju="text-secondary dial-small-paragraph-text px-6 pb-4",Qu="px-6 py-4 h-[120px]",ef="Cancel",tf="Ok",On={[Je.Info]:{confirm:{variant:O.ButtonVariant.Primary,appearance:O.ButtonAppearance.Solid}},[Je.Danger]:{confirm:{variant:O.ButtonVariant.Danger,appearance:O.ButtonAppearance.Solid}}},ri=({header:e,description:t,descriptionClassName:s,open:n=!1,confirmLabel:a=tf,cancelLabel:i=ef,isLoading:o=!1,disableConfirmButton:l=!1,className:c,confirmClassName:d,onClose:u,onConfirm:f,onCancel:h,children:p,variant:g=Je.Info,size:b=De.Sm,footer:x,hideClose:v,...y})=>{const I=o?null:r.jsxs("div",{className:Xu,children:[r.jsx(Os,{className:vr,label:i,onClick:()=>h?h():u?.()}),r.jsx(yt,{variant:On[g].confirm.variant,appearance:On[g].confirm.appearance,className:S.mergeClasses(vr,d),label:a,disabled:l,onClick:f})]}),j=m.useCallback(()=>o?r.jsx("div",{className:Qu,children:r.jsx(Tt,{size:40})}):p??(t?r.jsx("div",{className:S.mergeClasses(Ju,s),children:t}):null),[p,t,o,s]);return r.jsx(Ps,{...y,open:n,header:e,className:S.mergeClasses(c,C.DIAL_KIT_CLASS.confirmationPopup),onClose:()=>u?.(),footer:x??I,size:b,hideClose:v??(!o&&x===void 0),children:j()})};var yr=(e=>(e.Start="start",e.End="end",e))(yr||{});const rf=({title:e,description:t,children:s,expanded:n,defaultExpanded:a=!1,disabled:i,nonCollapsible:o,ariaLabel:l,onToggle:c,caretPosition:d=yr.End,className:u,headerClassName:f,contentClassName:h})=>{const p=n!==void 0,[g,b]=m.useState(a),x=o?!0:p?n:g,v=m.useId(),y=`accordion-header-${v}`,I=`accordion-content-${v}`,j=()=>{if(i)return;const L=!x;p||b(L),c?.(L)},N=d===yr.Start,w=o?null:r.jsx(_.IconChevronRight,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:S.mergeClasses("shrink-0 text-secondary transition-transform motion-reduce:transition-none",x?"rotate-90":"rtl:rotate-180")}),A=r.jsxs(r.Fragment,{children:[N&&w,r.jsxs("span",{className:"flex min-w-0 flex-col",children:[r.jsx("span",{className:"truncate dial-body-text text-primary",children:e}),t?r.jsx("span",{className:"truncate dial-tiny-text text-secondary",children:t}):null]}),!N&&w]}),D=N?"justify-start gap-2":"justify-between";return r.jsxs("div",{className:S.mergeClasses("flex flex-col py-3 overflow-hidden bg-transparent",u,C.DIAL_KIT_CLASS.accordion),children:[o?r.jsx("div",{id:y,className:S.mergeClasses("flex w-full px-4 rounded-xl items-center dial-tiny-text",D,f),children:A}):r.jsx("button",{id:y,type:"button","aria-expanded":x,"aria-controls":I,"aria-label":O.resolveAccessibleName(l),disabled:i,onClick:j,className:S.mergeClasses("flex w-full px-4 rounded-xl items-center dial-tiny-text",D,i?"cursor-not-allowed opacity-75":"cursor-pointer hover:bg-control-accent-alpha-hover focus-visible:outline focus-visible:outline-focus",f),children:A}),r.jsx("div",{inert:!x,className:S.mergeClasses("grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",x?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:r.jsx("div",{className:"min-h-0 overflow-hidden",children:r.jsx("div",{className:"pt-3",children:r.jsx("div",{id:I,role:"region","aria-labelledby":y,className:S.mergeClasses("px-4 dial-small-text text-primary",h),children:s})})})})]})},sf="dial-kit-input flex flex-row items-center justify-between gap-x-2 px-3 text-left",nf="min-w-0 flex-1 truncate text-primary",af="min-w-0 flex-1 truncate text-secondary",of="shrink-0 text-secondary",lf="px-6 pb-4",cf="flex justify-end gap-2 px-6 py-4 border-t border-tertiary",df="Cancel",uf="Apply",ff=({items:e,value:t,customValue:s,header:n,onApply:a,id:i,labelProps:o,placeholder:l,selectedValue:c,onSelectionChange:d,onCancel:u,onClose:f,isValid:h=!0,applyButtonLabel:p=uf,cancelButtonLabel:g=df,size:b=De.Md,portalId:x,disabled:v,invalid:y,error:I,caption:j,ariaLabel:N,className:w,fieldClassName:A})=>{const D=m.useId(),L=i??D,E=`${L}-label`,T=`${L}-value`,k=I?`${L}-error`:void 0,z=!I&&j?`${L}-caption`:void 0,[R,Z]=m.useState(!1),H=c!==void 0,[B,K]=m.useState(t),V=H?c:B,W=m.useCallback(()=>{v||(H||K(t),Z(!0))},[v,H,t]),oe=m.useCallback(()=>{Z(!1),f?.()},[f]),X=m.useCallback(()=>{u?.(),oe()},[u,oe]),le=m.useCallback(()=>{a(V),oe()},[a,V,oe]),G=m.useCallback(U=>{H||K(U),d?.(U)},[H,d]),ee=O.resolveAccessibleName(o?.label),ae=ee?void 0:O.resolveAccessibleName(N),de=ee?E:ae&&`${L}-name`,me=O.resolveAccessibleName(n),Ne=e.find(U=>U.value===t)?.label,xe=s??Ne;return r.jsxs("div",{className:S.mergeClasses("flex w-full flex-col gap-2",w,C.DIAL_KIT_CLASS.radioGroupPopupField),children:[o&&r.jsx(C.Label,{...o,id:E,htmlFor:L}),r.jsxs("div",{className:"flex flex-col gap-1",children:[ae&&r.jsx("span",{id:de,className:"sr-only",children:ae}),r.jsxs("button",{type:"button",id:L,disabled:v,"aria-haspopup":"dialog","aria-expanded":R,"aria-labelledby":de?`${de} ${T}`:void 0,"aria-describedby":[k,z].filter(Boolean).join(" ")||void 0,onClick:W,className:S.mergeClasses(sf,y&&"dial-kit-input-error",v&&"dial-kit-input-disable",A),children:[r.jsx("span",{id:T,className:xe==null?af:nf,children:xe??l}),r.jsx(_.IconMaximize,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:of})]}),r.jsx(C.ErrorText,{id:k,text:I}),!I&&r.jsx(C.CaptionText,{id:z,text:j})]}),r.jsx(Ps,{open:R,header:n,ariaLabel:me?void 0:ee,portalId:x,size:b,onClose:X,footer:r.jsxs("div",{className:cf,children:[r.jsx(Os,{label:g,onClick:X}),r.jsx($a,{label:p,disabled:!h,onClick:le})]}),children:r.jsx("div",{className:lf,children:r.jsx(Ut,{id:`${L}-options`,items:e,value:V,onChange:G,orientation:Ae.Column,ariaLabel:ee??me})})})]})},pf=({icon:e,selectedIcon:t,isSelected:s=!1,onToggle:n,onClick:a,tooltipProps:i,size:o=O.ElementSize.Small,className:l,...c})=>{const d=m.useCallback(f=>{a?.(f),n?.(!s)},[a,n,s]),u=r.jsx(C.IconButton,{...c,size:o,variant:O.ButtonVariant.Primary,appearance:O.ButtonAppearance.Ghost,icon:s?t??e:e,"aria-pressed":s,"aria-label":O.resolveAccessibleName(c["aria-label"],i?.tooltip),onClick:d,className:S.mergeClasses("!rounded","[&_svg]:size-4",s&&"!text-accent",l,C.DIAL_KIT_CLASS.toggleIconButton)});return i?r.jsx(C.Tooltip,{asChild:!0,...i,children:u}):u},hf=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End"],mf="inline-flex w-fit items-center gap-1 rounded-full border border-tertiary bg-layer-sunken p-[3px]",gf="flex h-8 min-w-8 grow shrink-0 basis-auto items-center justify-center gap-2 whitespace-nowrap rounded-full px-4 dial-small-text transition-colors duration-200 outline-offset-0 focus-visible:outline focus-visible:outline-focus",xf="bg-layer-raised text-accent shadow-xs",Cf="bg-transparent text-secondary",bf="cursor-pointer hover:bg-control-accent-alpha-hover active:bg-control-accent-alpha-active",vf="cursor-pointer hover:bg-control-accent-alpha-hover hover:text-accent active:bg-control-accent-alpha-active",yf="cursor-not-allowed bg-control-disable-primary text-control-disable-primary shadow-none",Sf="cursor-not-allowed bg-transparent text-control-disable-primary",If=({items:e,value:t,onChange:s,disabled:n,className:a,segmentClassName:i,"aria-label":o})=>{const l=m.useRef({}),c=e.find(f=>f.value===t),d=c&&!c.disabled?c.value:e.find(f=>!f.disabled)?.value,u=m.useCallback(f=>{if(n||!hf.includes(f.key))return;const h=e.filter(v=>!v.disabled);if(h.length===0)return;const p=Math.max(h.findIndex(v=>v.value===t),0),g=h.length-1;let b=p;switch(f.key){case"ArrowRight":case"ArrowDown":b=p===g?0:p+1;break;case"ArrowLeft":case"ArrowUp":b=p===0?g:p-1;break;case"Home":b=0;break;case"End":b=g;break}f.preventDefault();const x=h[b];l.current[x.value]?.focus(),x.value!==t&&s(x.value)},[n,e,t,s]);return r.jsx("div",{role:"radiogroup","aria-label":o,"aria-disabled":n||void 0,onKeyDown:u,className:S.mergeClasses(mf,a,C.DIAL_KIT_CLASS.segmentedControl),children:e.map(f=>{const h=f.value===t,p=n||f.disabled;return r.jsxs("button",{ref:g=>{l.current[f.value]=g},type:"button",role:"radio","aria-checked":h,"aria-label":O.resolveAccessibleName(f["aria-label"],typeof f.label=="string"?f.label:void 0),tabIndex:f.value===d?0:-1,disabled:p,onClick:()=>s(f.value),className:S.mergeClasses(gf,h?xf:Cf,p?h?yf:Sf:h?bf:vf,i,C.DIAL_KIT_CLASS.segmentedControlItem),children:[f.icon,f.label]},f.value)})})},Nf={[at.Horizontal]:{next:"ArrowRight",previous:"ArrowLeft"},[at.Vertical]:{next:"ArrowDown",previous:"ArrowUp"}},jf=({tabs:e,activeTabId:t,onTabChange:s,orientation:n=at.Horizontal,sectionLabel:a,ariaLabel:i,className:o,tabListClassName:l,tabClassName:c,sectionLabelClassName:d})=>{const u=m.useRef({}),f=m.useId(),h=n===at.Vertical,p=e.find(v=>v.id===t),g=p&&!p.disabled?p.id:e.find(v=>!v.disabled)?.id,b=m.useCallback(v=>{const{next:y,previous:I}=Nf[n];if(![y,I,"Home","End"].includes(v.key)||e.length===0)return;const j=e.filter(L=>!L.disabled);if(j.length===0)return;const N=Math.max(j.findIndex(L=>L.id===t),0),w=j.length-1;let A=N;v.key===y?A=N===w?0:N+1:v.key===I?A=N===0?w:N-1:v.key==="Home"?A=0:A=w,v.preventDefault();const D=j[A];u.current[D.id]?.focus(),D.id!==t&&s(D.id)},[e,t,s,n]),x=r.jsx("div",{role:"tablist","aria-orientation":h?"vertical":void 0,"aria-label":i,"aria-labelledby":!i&&a?f:void 0,onKeyDown:b,className:S.mergeClasses(h?"flex flex-col gap-1 px-2":"flex justify-start gap-1",!a&&o,l,C.DIAL_KIT_CLASS.tabList,!a&&C.DIAL_KIT_CLASS.tabs),children:e.map(v=>{const y=t===v.id,I=!!v.disabled;return r.jsxs("button",{ref:j=>{u.current[v.id]=j},type:"button",role:"tab","aria-selected":y,disabled:I,tabIndex:v.id===g?0:-1,onClick:()=>s(v.id),className:S.mergeClasses("dial-kit-enhanced-target flex items-center gap-2 text-start","transition-colors motion-reduce:transition-none","focus-visible:outline focus-visible:outline-focus",h?["h-11 w-full rounded-lg px-3 desktop:h-10","focus-visible:-outline-offset-1",y?"dial-small-semi-text":"dial-small-text text-secondary"]:["dial-small-paragraph-semi-text border-b-2 border-transparent px-3 py-2","focus-visible:outline-offset-2"],I&&(h?"cursor-not-allowed text-control-disable-primary":"cursor-not-allowed border-control-disable-primary text-control-disable-primary"),!I&&(h?y?"bg-control-accent-alpha text-accent hover:bg-control-accent-alpha-hover":"hover:bg-control-accent-alpha-hover":y?"dial-kit-tab-selected-underline text-primary":"border-transparent text-secondary"),c,C.DIAL_KIT_CLASS.tab,y&&C.DIAL_KIT_CLASS.tabSelected),children:[v.icon&&r.jsx("span",{"aria-hidden":"true",className:"flex shrink-0",children:v.icon}),r.jsx("span",{className:S.mergeClasses(h&&!y&&!I&&"text-primary"),children:v.label}),v.count!=null&&r.jsx("span",{className:S.mergeClasses("dial-tiny-semi-text rounded-full px-1.5 py-0.5",h&&"ms-auto",I&&"bg-layer-sunken text-control-disable-primary",!I&&(y?"bg-control-accent-alpha text-accent":"bg-layer-sunken text-secondary")),children:v.count})]},v.id)})});return a?r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-3",o,C.DIAL_KIT_CLASS.tabs),children:[r.jsx("div",{className:S.mergeClasses("flex h-16 shrink-0 items-center",h?"px-4":"px-3"),children:r.jsx("span",{id:f,className:S.mergeClasses("dial-h1-text text-primary",d,C.DIAL_KIT_CLASS.tabsSectionLabel),children:a})}),x]}):x},Df="flex flex-nowrap items-center gap-1",wf="min-w-max flex-1 justify-center",Lf=({items:e,value:t,onChange:s,stretch:n=!1,className:a,chipClassName:i,"aria-label":o,"aria-labelledby":l})=>r.jsx("div",{role:"group","aria-label":o,"aria-labelledby":l,className:S.mergeClasses(Df,a,C.DIAL_KIT_CLASS.filterChips),children:e.map(c=>r.jsx($e,{label:c.label,icon:c.icon,appearance:Ct.Selectable,selected:c.value===t,onClick:()=>s(c.value),className:S.mergeClasses(n&&wf,i)},c.value))}),us=(e,t)=>{const s=(t??"").split(",").map(i=>i.trim().toLowerCase()).filter(Boolean);if(s.length===0)return!0;const n=e.name.toLowerCase(),a=e.type.toLowerCase();return s.some(i=>{if(i.startsWith("."))return n.endsWith(i);if(i.endsWith("/*")){const o=i.slice(0,-1);return a.length>o.length&&a.startsWith(o)}return a===i})},Tf=({labelProps:e,label:t,description:s,onChange:n,onReject:a,accept:i,multiple:o=!1,disabled:l=!1,errorText:c,icon:d,id:u,ariaLabel:f,className:h})=>{const p=m.useId(),g=u??`file-dropzone-${p}`,b=c?`${g}-error`:void 0,[x,v]=m.useState(!1),y=m.useRef(0),I=m.useCallback(E=>{if(E.length===0)return;const T=o?E:E.slice(0,1),k=T.filter(R=>us(R,i)),z=T.filter(R=>!us(R,i));z.length>0&&a?.(z),k.length>0&&n(k)},[i,o,n,a]),j=m.useCallback(E=>{I(Array.from(E.target.files??[])),E.target.value=""},[I]),N=m.useCallback(()=>{y.current=0,v(!1)},[]),w=m.useCallback(E=>{l||(E.preventDefault(),y.current+=1,v(!0))},[l]),A=m.useCallback(E=>{l||(E.preventDefault(),E.dataTransfer.dropEffect="copy")},[l]),D=m.useCallback(()=>{l||(y.current-=1,y.current<=0&&N())},[l,N]),L=m.useCallback(E=>{E.preventDefault(),!l&&(N(),I(Array.from(E.dataTransfer?.files??[])))},[l,N,I]);return r.jsxs("div",{className:"flex flex-col gap-1",children:[e&&r.jsx(C.Label,{...e,htmlFor:g}),r.jsx("input",{id:g,type:"file",accept:i,multiple:o,disabled:l,onChange:j,"aria-label":O.resolveAccessibleName(typeof t!="string"?f:void 0),"aria-describedby":b,"aria-invalid":c?!0:void 0,className:"peer sr-only"}),r.jsxs("label",{htmlFor:g,onDragEnter:w,onDragOver:A,onDragLeave:D,onDrop:L,className:S.mergeClasses("flex flex-col items-center justify-center gap-3 rounded-xl border border-dashed px-6 py-10 text-center","transition-colors motion-reduce:transition-none","peer-focus-visible:outline peer-focus-visible:outline-offset-2 peer-focus-visible:outline-focus",l?"cursor-not-allowed border-secondary bg-layer-sunken":"cursor-pointer bg-layer-base",!l&&x&&"border-accent bg-control-accent-alpha",!l&&!x&&"border-secondary hover:border-accent",c&&!x&&"border-error hover:border-error",h,C.DIAL_KIT_CLASS.fileDropzone),children:[d??r.jsx(_.IconUpload,{size:P.DIAL_ICON_SIZE.LG,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:l?"text-control-disable-primary":"text-secondary"}),r.jsxs("span",{className:"flex flex-col gap-1",children:[r.jsx("span",{className:S.mergeClasses("dial-small-text",l?"text-control-disable-primary":"text-primary"),children:t}),s&&r.jsx("span",{className:S.mergeClasses("dial-tiny-text",l?"text-control-disable-primary":"text-secondary"),children:s})]})]}),r.jsx(C.ErrorText,{id:b,text:c})]})},si=({label:e="Shared",tooltip:t,size:s=12,className:n})=>r.jsx(C.Tooltip,{tooltip:t||"Shared",asChild:!0,children:r.jsx("span",{role:"img","aria-label":e,className:S.mergeClasses("flex shrink-0 rounded-xs bg-layer-raised text-accent",n,C.DIAL_KIT_CLASS.sharedEntityIndicator),children:r.jsx(_.IconArrowUpRight,{size:s,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})})});var Re=(e=>(e.Images="images",e.Video="video",e.Audio="audio",e.Code="code",e.Text="text",e.Pdf="pdf",e.Spreadsheet="spreadsheet",e.Presentation="presentation",e.Archive="archive",e.Dial="dial",e.Other="other",e))(Re||{});const Ef={images:["apng","avif","bmp","gif","heic","heif","ico","jpeg","jpg","png","svg","tif","tiff","webp"],video:["avi","flv","m4v","mkv","mov","mp4","mpeg","mpg","ogv","webm","wmv"],audio:["aac","aiff","flac","m4a","mid","midi","mp3","oga","ogg","opus","wav","wma"],code:["bash","c","cjs","cpp","cs","css","go","h","hpp","htm","html","ini","ipynb","java","js","json","jsx","kt","less","lua","mjs","php","ps1","py","r","rb","rs","sass","scala","scss","sh","sql","svelte","swift","toml","ts","tsx","vue","xml","yaml","yml","zsh"],text:["doc","docx","log","markdown","md","odt","rtf","text","txt"],pdf:["pdf"],spreadsheet:["csv","numbers","ods","tsv","xls","xlsm","xlsx"],presentation:["key","odp","pps","ppsx","ppt","pptx"],archive:["7z","bz2","gz","rar","tar","tgz","xz","zip"],dial:["dial"]},Of=new Map(Object.entries(Ef).flatMap(([e,t])=>t.map(s=>[s,e]))),Af=e=>Of.get(e)??"other",An="var(--text-control-permanent, #FCFCFC)",lr={x1:"20.4167",y1:"-3.33333",x2:"2.5",y2:"20",from:"var(--bg-visual-blue, #D6EDF9)",to:"var(--stroke-gradient-1, #5976E9)"},_f="#1B212D",kf={[Re.Images]:{path:"M11.0002 8.66667H11.0036M7.00024 11.3333L8.66691 9.66667C8.97624 9.369 9.35758 9.369 9.66691 9.66667L11.3336 11.3333M10.6669 10.6667L11.0002 10.3333C11.3096 10.0357 11.6909 10.0357 12.0002 10.3333L13.0002 11.3333M7.00024 8C7.00024 7.73478 7.1056 7.48043 7.29314 7.29289C7.48067 7.10536 7.73503 7 8.00024 7H12.0002C12.2655 7 12.5198 7.10536 12.7074 7.29289C12.8949 7.48043 13.0002 7.73478 13.0002 8V12C13.0002 12.2652 12.8949 12.5196 12.7074 12.7071C12.5198 12.8946 12.2655 13 12.0002 13H8.00024C7.73503 13 7.48067 12.8946 7.29314 12.7071C7.1056 12.5196 7.00024 12.2652 7.00024 12V8Z",sheet:lr},[Re.Code]:{path:"M8.33358 8.66665L7.00024 9.99998L8.33358 11.3333M11.6669 8.66665L13.0002 9.99998L11.6669 11.3333M10.6669 7.33331L9.33358 12.6666",sheet:{x1:"16.6667",y1:"0",x2:"2.08333",y2:"20.4167",from:"var(--bg-control-inverted, #57647A)",to:_f}},[Re.Text]:{path:"M7.3335 8H12.6668M7.3335 10H12.6668M7.3335 12H11.3335",sheet:{x1:"25.8333",y1:"-11.6667",x2:"2.5",y2:"20",from:"var(--bg-visual-violet-1, #DDE3F9)",to:"var(--bg-gradient-1, #1D4ED8)"}},[Re.Spreadsheet]:{path:"M7.33325 10.1667H12.6666M9.99992 7.5V12.8333M7.33325 8.16667C7.33325 7.98986 7.40349 7.82029 7.52851 7.69526C7.65354 7.57024 7.82311 7.5 7.99992 7.5H11.9999C12.1767 7.5 12.3463 7.57024 12.4713 7.69526C12.5963 7.82029 12.6666 7.98986 12.6666 8.16667V12.1667C12.6666 12.3435 12.5963 12.513 12.4713 12.6381C12.3463 12.7631 12.1767 12.8333 11.9999 12.8333H7.99992C7.82311 12.8333 7.65354 12.7631 7.52851 12.6381C7.40349 12.513 7.33325 12.3435 7.33325 12.1667V8.16667Z",sheet:{x1:"20.4167",y1:"-3.75",x2:"2.91667",y2:"20.4167",from:"var(--bg-visual-green-1, #CDE8E5)",to:"var(--text-visual-green-1, #059669)"}},[Re.Pdf]:{fillPath:"M12.5373 10.3151C12.0382 10.3151 11.4137 10.4021 11.2094 10.4328C10.3637 9.54967 10.1231 9.04771 10.069 8.91388C10.1423 8.72544 10.3975 8.0096 10.4338 7.09022C10.4517 6.62991 10.3544 6.28596 10.1447 6.06792C9.93533 5.85024 9.68191 5.83331 9.60924 5.83331C9.35443 5.83331 8.92697 5.96216 8.92697 6.82503C8.92697 7.5737 9.27603 8.36813 9.37252 8.57339C8.86416 10.0536 8.31837 11.0669 8.20248 11.2753C6.15974 12.0444 6 12.788 6 12.9988C6 13.3775 6.26973 13.6036 6.72152 13.6036C7.8192 13.6036 8.8209 11.7607 8.98653 11.4407C9.76614 11.1301 10.8096 10.9377 11.0749 10.8918C11.8357 11.6166 12.7157 11.81 13.0811 11.81C13.3561 11.81 14 11.81 14 11.148C14 10.5332 13.2121 10.3151 12.5373 10.3151ZM12.4844 10.7497C13.0773 10.7497 13.234 10.9458 13.234 11.0494C13.234 11.1145 13.2093 11.3268 12.8915 11.3268C12.6065 11.3268 12.1145 11.1621 11.6303 10.8047C11.8322 10.7782 12.131 10.7497 12.4844 10.7497ZM9.57812 6.25458C9.63218 6.25458 9.66777 6.27195 9.69711 6.31264C9.86764 6.54926 9.73014 7.32242 9.56279 7.92745C9.40124 7.40867 9.28 6.61264 9.45058 6.33259C9.48392 6.27793 9.52204 6.25458 9.57812 6.25458ZM9.29017 10.8856C9.50483 10.452 9.74542 9.81997 9.87646 9.46253C10.1387 9.90147 10.4914 10.309 10.6954 10.53C10.0603 10.6639 9.57969 10.7976 9.29017 10.8856ZM6.4264 13.0566C6.41226 13.0399 6.41017 13.0045 6.42083 12.9621C6.44317 12.8731 6.61396 12.4322 7.84924 11.8796C7.67236 12.1582 7.39585 12.5563 7.09208 12.8537C6.87825 13.0538 6.71174 13.1553 6.59719 13.1553C6.55621 13.1553 6.49974 13.1442 6.4264 13.0566Z",sheet:{x1:"26.25",y1:"-11.6667",x2:"2.5",y2:"20",from:"var(--bg-visual-red, #FCE7F3)",to:"var(--bg-control-error-active, #CC4545)"}},[Re.Audio]:{path:"M9 11.5C9 11.7652 8.89464 12.0195 8.70711 12.2071C8.51957 12.3946 8.26522 12.5 8 12.5C7.73478 12.5 7.48043 12.3946 7.29289 12.2071C7.10536 12.0195 7 11.7652 7 11.5C7 11.2347 7.10536 10.9804 7.29289 10.7929C7.48043 10.6053 7.73478 10.5 8 10.5C8.26522 10.5 8.51957 10.6053 8.70711 10.7929C8.89464 10.9804 9 11.2347 9 11.5ZM9 11.5V7.16663H12.3333V11.5M12.3333 11.5C12.3333 11.7652 12.228 12.0195 12.0404 12.2071C11.8529 12.3946 11.5985 12.5 11.3333 12.5C11.0681 12.5 10.8138 12.3946 10.6262 12.2071C10.4387 12.0195 10.3333 11.7652 10.3333 11.5C10.3333 11.2347 10.4387 10.9804 10.6262 10.7929C10.8138 10.6053 11.0681 10.5 11.3333 10.5C11.5985 10.5 11.8529 10.6053 12.0404 10.7929C12.228 10.9804 12.3333 11.2347 12.3333 11.5ZM9 8.49996H12.3333",sheet:lr},[Re.Video]:{path:"M9.99996 13.1667C11.8409 13.1667 13.3333 11.6743 13.3333 9.83333C13.3333 7.99238 11.8409 6.5 9.99996 6.5C8.15901 6.5 6.66663 7.99238 6.66663 9.83333C6.66663 11.6743 8.15901 13.1667 9.99996 13.1667ZM9.33337 8.5L11.3334 9.83333L9.33337 11.1667V8.5Z",sheet:lr},[Re.Presentation]:{path:"M7 7.33331H13M7.33333 7.33331V10.6666C7.33333 10.8435 7.40357 11.013 7.5286 11.1381C7.65362 11.2631 7.82319 11.3333 8 11.3333H12C12.1768 11.3333 12.3464 11.2631 12.4714 11.1381C12.5964 11.013 12.6667 10.8435 12.6667 10.6666V7.33331M10 11.3333V12.6666M9 12.6666H11M8.66667 9.99998L9.66667 8.99998L10.3333 9.66665L11.3333 8.66665",sheet:{x1:"24.5",y1:"-9.5",x2:"2.5",y2:"20",from:"var(--bg-visual-brown, #FDE8D8)",to:"var(--text-visual-brown-2, #B45309)"}},[Re.Archive]:{path:"M10.0001 6.66669H9.58341M10.8334 7.451H10.4167M10.0001 8.23531H9.58341M10.8334 9.01963H10.4167M10.0001 9.80394H9.58341M10.8334 10.5883H10.4167M10.0001 11.3726C10.2211 11.3726 10.4331 11.4552 10.5893 11.6023C10.7456 11.7494 10.8334 11.9489 10.8334 12.1569V12.9412C10.8334 13.0452 10.7895 13.1449 10.7114 13.2185C10.6332 13.292 10.5273 13.3334 10.4167 13.3334H9.58341C9.47291 13.3334 9.36693 13.292 9.28879 13.2185C9.21065 13.1449 9.16675 13.0452 9.16675 12.9412V12.1569C9.16675 11.9489 9.25455 11.7494 9.41083 11.6023C9.56711 11.4552 9.77907 11.3726 10.0001 11.3726Z",sheet:{x1:"24.5",y1:"-9.5",x2:"2.5",y2:"20",from:"var(--bg-visual-green-1, #CDE8E5)",to:"var(--text-visual-green-3, #065F46)"}},[Re.Dial]:{path:"M8.26392 7.44049C8.80816 7.44049 9.28449 7.50578 9.69653 7.63092L9.69849 7.6319C10.1079 7.75343 10.4556 7.938 10.7463 8.1817L10.7483 8.18365C11.0312 8.41601 11.2537 8.72491 11.4104 9.12115V9.12213C11.5666 9.51456 11.6496 9.98403 11.6497 10.5381C11.6497 11.5957 11.3539 12.3492 10.8108 12.8565C10.2602 13.3708 9.47204 13.6504 8.39868 13.6505H6.71313V7.44049H8.26392Z",fillPath:"M12.7167 12.1008L12.9558 12.3564L12.9558 12.3564L12.7167 12.1008ZM11.4504 6.20825L11.3486 6.54311L11.3507 6.54375L11.4504 6.20825ZM12.637 6.833L12.4119 7.10109L12.4147 7.10334L12.637 6.833ZM13.4108 7.9263L13.0853 8.05488L13.0856 8.05566L13.4108 7.9263ZM11.1666 12.8853L11.0909 12.5436V12.5436L11.1666 12.8853ZM10.4391 12.6553C10.2487 12.689 10.1217 12.8706 10.1553 13.0609C10.189 13.2513 10.3706 13.3783 10.5609 13.3447L10.5 13L10.4391 12.6553ZM13.6781 9.49291H13.3281C13.3281 10.5655 13.0283 11.33 12.4776 11.8451L12.7167 12.1008L12.9558 12.3564C13.687 11.6724 14.0281 10.6984 14.0281 9.49291H13.6781ZM7.9751 6.12805H8.3251C8.3251 6.24476 8.23053 6.35 8.1009 6.35V6V5.65C7.83231 5.65 7.6251 5.86989 7.6251 6.12805H7.9751ZM8.1009 6V6.35H9.89799V6V5.65H8.1009V6ZM9.89799 6V6.35C10.449 6.35 10.9312 6.41618 11.3486 6.54311L11.4504 6.20825L11.5522 5.87339C11.0566 5.72265 10.5039 5.65 9.89799 5.65V6ZM11.4504 6.20825L11.3507 6.54375C11.7654 6.66701 12.1173 6.85376 12.4119 7.10107L12.637 6.833L12.862 6.56492C12.4875 6.2506 12.0484 6.02084 11.5501 5.87275L11.4504 6.20825ZM12.637 6.833L12.4147 7.10334C12.7016 7.33926 12.9264 7.65273 13.0853 8.05488L13.4108 7.9263L13.7363 7.79772C13.5387 7.29746 13.2477 6.88206 12.8593 6.56265L12.637 6.833ZM13.4108 7.9263L13.0856 8.05566C13.2441 8.45409 13.3281 8.93071 13.3281 9.49291H13.6781H14.0281C14.0281 8.86239 13.934 8.29465 13.736 7.79694L13.4108 7.9263ZM7.9751 7.21882H8.3251V6.12805H7.9751H7.6251V7.21882H7.9751ZM12.7167 12.1008L12.4776 11.8451C12.117 12.1824 11.6591 12.4177 11.0909 12.5436L11.1666 12.8853L11.2423 13.227C11.9168 13.0776 12.4923 12.7898 12.9558 12.3564L12.7167 12.1008ZM11.1666 12.8853L11.0909 12.5436C11.091 12.5435 11.0826 12.5452 11.0606 12.5493C11.041 12.5528 11.0155 12.5573 10.9857 12.5625C10.926 12.5729 10.8511 12.5857 10.7756 12.5984C10.6269 12.6236 10.472 12.6495 10.4391 12.6553L10.5 13L10.5609 13.3447C10.6064 13.3366 11.1725 13.2425 11.2423 13.227L11.1666 12.8853Z",sheet:"var(--bg-gradient-2, #885DF2)"},[Re.Other]:{path:"M6.80005 8H13.2M6.80005 10.2222H13.2M6.80005 12.4444H13.2",sheet:lr}},Rf=({size:e,kind:t})=>{const s=`dial-kit-file-gradient-${m.useId().replace(/[^\w-]/g,"")}`,{path:n,fillPath:a,sheet:i}=kf[t],o=typeof i=="string";return r.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[r.jsx("path",{d:"M17.4999 3.97859V16C17.4999 18.2091 15.709 20 13.4999 20H6.5C4.29086 20 2.5 18.2091 2.5 16V4C2.5 1.79086 4.29086 0 6.5 0H13.1683H13.5213C15.7186 0 17.4999 1.78128 17.4999 3.97859Z",fill:o?i:`url(#${s})`}),n&&r.jsx("path",{d:n,stroke:An,strokeWidth:"0.7",strokeLinecap:"round",strokeLinejoin:"round"}),a&&r.jsx("path",{d:a,fill:An}),!o&&r.jsx("defs",{children:r.jsxs("linearGradient",{id:s,x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2,gradientUnits:"userSpaceOnUse",children:[r.jsx("stop",{stopColor:i.from}),r.jsx("stop",{offset:"1",stopColor:i.to})]})})]})},Mf=({size:e})=>{const t=`dial-kit-folder-gradient-${m.useId().replace(/[^\w-]/g,"")}`;return r.jsxs("svg",{width:e,height:e,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[r.jsx("path",{d:"M6.38992 3.75H4.66663C3.00977 3.75 1.66663 5.09315 1.66663 6.75V7.91667H7.16339L10.8333 5.79247L7.85075 4.1297C7.40412 3.8807 6.90127 3.75 6.38992 3.75Z",fill:"var(--stroke-gradient-1, #5976E9)"}),r.jsx("path",{d:"M14.3333 5.41669C16.5424 5.41669 18.3333 7.20755 18.3333 9.41669V12.25C18.3333 14.4592 16.5424 16.25 14.3333 16.25H5.66663C3.45749 16.25 1.66663 14.4592 1.66663 12.25V7.6708C1.66663 7.11851 2.11434 6.6708 2.66663 6.6708H6.89447C7.43998 6.6708 7.97973 6.55922 8.48053 6.34291L9.86582 5.74458C10.3666 5.52827 10.9064 5.41669 11.4519 5.41669H14.3333Z",fill:`url(#${t})`}),r.jsx("defs",{children:r.jsxs("linearGradient",{id:t,x1:"17.0833",y1:"5.83335",x2:"9.38489",y2:"19.6653",gradientUnits:"userSpaceOnUse",children:[r.jsx("stop",{stopColor:"var(--stroke-secondary, #D1DBEA)"}),r.jsx("stop",{offset:"0.91",stopColor:"var(--stroke-gradient-1, #5976E9)"})]})})]})},Pf=(e,t)=>(t??(e.includes(".")?e.split(".").pop():"")??"").trim().replace(/^\./,"").toLowerCase(),zf=(e,t)=>e===Ve.Folder?"Folder":t?`${t.toUpperCase()} file`:"File",Bf=(e,t,s)=>e===Ve.Folder?r.jsx(Mf,{size:s}):r.jsx(Rf,{size:s,kind:Af(t)}),zs=({type:e,name:t,fileExtension:s,shared:n=!1,loading:a=!1,size:i=P.DIAL_ICON_SIZE.MD,className:o,decorative:l=!1,label:c,loadingLabel:d="Loading",sharedIndicatorClassName:u,sharedIndicatorTooltip:f})=>{if(e!==Ve.File&&e!==Ve.Folder)return null;const h=e===Ve.File?Pf(t,s):"",p=zf(e,h),g=c??(n?`${p}, shared`:p),b=l?{"aria-hidden":!0}:a?{}:{role:"img","aria-label":g};return r.jsxs("span",{className:S.mergeClasses("relative inline-flex shrink-0 items-center justify-center text-secondary",o,C.DIAL_KIT_CLASS.fileIcon),...b,children:[a?r.jsx(Tt,{size:i,ariaLabel:d}):Bf(e,h,i),n&&r.jsx(si,{tooltip:f,className:S.mergeClasses("absolute -bottom-0.5 -left-0.5",u)})]})},ni=({name:e,type:t=Ve.File,fileExtension:s,shared:n=!1,loading:a=!1,loadingLabel:i,iconSize:o,details:l,isInvalidName:c=!1,className:d,nameClassName:u,sharedIndicatorClassName:f,sharedIndicatorTooltip:h,sharedLabel:p="Shared",hideTooltip:g=!1,tooltipContent:b})=>r.jsxs("div",{className:S.mergeClasses("flex w-full min-w-0 items-center gap-2",d,C.DIAL_KIT_CLASS.fileName),children:[r.jsx(zs,{name:e,type:t,fileExtension:s,shared:n,loading:a,loadingLabel:i,size:o,sharedIndicatorClassName:f,sharedIndicatorTooltip:h,decorative:!a}),r.jsxs("div",{className:S.mergeClasses("flex min-w-0 flex-1",{"flex-col gap-1":!!l}),children:[r.jsx(C.EllipsisTooltip,{className:S.mergeClasses("dial-small-paragraph-text",c?"text-secondary":"text-primary",u),text:e,hideTooltip:g,customTooltipContent:b}),n&&r.jsx("span",{className:"sr-only",children:p}),l]})]}),Ff=({className:e,...t})=>r.jsx(ni,{...t,type:Ve.Folder,className:S.mergeClasses(e,C.DIAL_KIT_CLASS.folderName)}),Hf=({open:e,onClose:t,title:s,ariaLabel:n,onBack:a,backAriaLabel:i="Back",closeAriaLabel:o="Close",closeOnOutsideClick:l=!0,children:c,className:d,overlayClassName:u,headerClassName:f,style:h,overlayStyle:p,bodyClassName:g,titleClassName:b,portalId:x})=>{const v=C.useThemeScope(),y=`bottom-sheet-title-${m.useId()}`,{refs:I,context:j}=J.useFloating({open:e,onOpenChange:D=>{D||t()}}),N=J.useRole(j,{role:"dialog"}),w=J.useDismiss(j,{outsidePress:l}),{getFloatingProps:A}=J.useInteractions([N,w]);return e?r.jsx(J.FloatingPortal,{id:x,children:r.jsx(J.FloatingOverlay,{lockScroll:!0,style:p,className:S.mergeClasses("z-popup flex items-end bg-backdrop",v,u,C.DIAL_KIT_CLASS.bottomSheetOverlay),children:r.jsx(J.FloatingFocusManager,{context:j,initialFocus:I.floating,children:r.jsxs("div",{ref:I.setFloating,...A(),role:"dialog","aria-modal":"true","aria-labelledby":s?y:void 0,"aria-label":s?void 0:n,style:h,className:S.mergeClasses("flex max-h-[85dvh] w-full flex-col rounded-t-lg bg-layer-raised outline-hidden","animate-slideUp motion-reduce:animate-none",d,C.DIAL_KIT_CLASS.bottomSheet),children:[s&&r.jsxs("div",{className:S.mergeClasses("relative flex h-[60px] shrink-0 items-center justify-center border-b border-tertiary px-14",f),children:[a&&r.jsx(C.GhostIconButton,{"aria-label":i,className:"absolute start-4",onClick:a,icon:r.jsx(_.IconArrowLeft,{size:P.DIAL_ICON_SIZE.LG,stroke:se.DIAL_KIT_ICON_STROKE,className:"rtl:-scale-x-100","aria-hidden":"true"})}),r.jsx("h2",{id:y,className:S.mergeClasses("min-w-0 truncate text-primary",b??"dial-body-semi-text"),children:s}),r.jsx(C.CloseButton,{ariaLabel:o,onClose:t,size:O.ElementSize.Standard,className:"absolute end-4"})]}),r.jsx("div",{className:S.mergeClasses("min-h-0 overflow-y-auto",g),children:c})]})})})}):null};var it=(e=>(e.Outlined="outlined",e.Filled="filled",e))(it||{}),Ye=(e=>(e.Blue="blue",e.Green="green",e.Violet="violet",e.Indigo="indigo",e.Brown="brown",e.Red="red",e))(Ye||{});const $f={[Ye.Blue]:"bg-blue text-blue",[Ye.Green]:"bg-green-2 text-green-1",[Ye.Violet]:"bg-violet-2 text-violet-1",[Ye.Indigo]:"bg-violet-1 text-violet-2",[Ye.Brown]:"bg-brown text-brown-2",[Ye.Red]:"bg-red text-red"},Vf={[it.Outlined]:"rounded-md border border-tertiary bg-layer-sunken text-secondary",[it.Filled]:"rounded-full"},Kf={[it.Outlined]:"dial-tiny-text",[it.Filled]:"dial-caption-lead-semi-text"},Wf=({label:e,variant:t=it.Outlined,color:s=Ye.Blue,icon:n,textClassName:a,className:i,...o})=>r.jsxs("span",{...o,className:S.mergeClasses("inline-flex h-6 w-fit shrink-0 items-center gap-1 whitespace-nowrap px-2",Vf[t],t===it.Filled&&$f[s],i,C.DIAL_KIT_CLASS.badge),children:[n&&r.jsx("span",{className:"flex shrink-0 items-center","aria-hidden":"true",children:n}),r.jsx("span",{className:a??Kf[t],children:e})]});var Lt=(e=>(e.Circle="circle",e.Square="square",e))(Lt||{}),qe=(e=>(e.Green1="green-1",e.Violet2="violet-2",e.Brown="brown",e.Red="red",e.Green2="green-2",e.Blue="blue",e.Violet1="violet-1",e))(qe||{});const ai={[qe.Green1]:{background:"bg-green-1",foreground:"text-green-2"},[qe.Violet2]:{background:"bg-violet-2",foreground:"text-violet-1"},[qe.Brown]:{background:"bg-brown",foreground:"text-brown-2"},[qe.Red]:{background:"bg-red",foreground:"text-red"},[qe.Green2]:{background:"bg-green-2",foreground:"text-green-3"},[qe.Blue]:{background:"bg-blue",foreground:"text-accent"},[qe.Violet1]:{background:"bg-violet-1",foreground:"text-violet-2"}},Zf=e=>{const t=Object.values(ai);let s=0;for(let n=0;n<e.length;n++)s+=e.charCodeAt(n);return t[s%t.length]},_n=e=>e.match(new RegExp("\\p{L}","u"))?.[0]??"",ii=e=>{const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length>=2?(_n(t[0])+_n(t[1])).toUpperCase()||"?":t[0].replace(/[^\p{L}]/gu,"").slice(0,2).toUpperCase()||"?"},Gf={[Lt.Circle]:"rounded-full",[Lt.Square]:"rounded-md"},oi=({name:e,initials:t,src:s,alt:n="",size:a=32,shape:i=Lt.Circle,color:o,className:l,textClassName:c,onImageError:d})=>{const[u,f]=m.useState(),h=!!s&&u!==s,p=n!=="",g=v=>S.mergeClasses("inline-flex shrink-0 select-none items-center justify-center overflow-hidden",Gf[i],v,l,C.DIAL_KIT_CLASS.avatar);if(h)return r.jsx("img",{src:s,alt:n,width:a,height:a,className:S.mergeClasses(g(),"object-cover"),onError:v=>{f(s),d?.(v)}});const{background:b,foreground:x}=o??Zf(e);return r.jsx("span",{role:p?"img":void 0,"aria-label":p?n:void 0,"aria-hidden":p?void 0:!0,className:g(S.mergeClasses(b,x)),style:{width:a,height:a,fontSize:c?void 0:Math.round(a*.4)},children:r.jsx("span",{className:S.mergeClasses("leading-none",c??"font-semibold"),children:t??ii(e)})})};var ye=(e=>(e.Model="model",e.Agent="agent",e.Toolset="toolset",e.Skill="skill",e.Prompt="prompt",e))(ye||{});const Uf={[ye.Model]:"Model",[ye.Agent]:"Agent",[ye.Toolset]:"Toolset",[ye.Skill]:"Skill",[ye.Prompt]:"Prompt"},kn={[ye.Model]:"text-blue",[ye.Agent]:"text-green-1",[ye.Toolset]:"text-brown-2",[ye.Skill]:"text-violet-1",[ye.Prompt]:"text-violet-2"},qf={[ye.Model]:"bg-blue",[ye.Agent]:"bg-green-2",[ye.Toolset]:"bg-brown",[ye.Skill]:"bg-violet-2",[ye.Prompt]:"bg-violet-1"},Yf=["h1","h2","h3","h4","h5","h6"],Xf=e=>Yf[Math.min(6,Math.max(1,Math.round(e)))-1],Jf=({item:e,labels:t,showVersion:s=!0,hasFeaturedTag:n=!0,iconSize:a=48,headingLevel:i=3,query:o,footer:l,statusBadge:c,className:d,nameClassName:u="dial-h3-text",typeClassName:f="dial-caption-lead-semi-text",versionClassName:h="dial-tiny-text",iconClassName:p,featuredChipClassName:g})=>{const b=Xf(i),x=n&&!!e.isFeatured,v=c!=null||x,y=s?e.version:void 0;return r.jsxs("div",{className:S.mergeClasses("flex items-start gap-2",d,C.DIAL_KIT_CLASS.entityIdentity),children:[r.jsx(oi,{name:e.name,src:e.iconUrl,size:a,shape:Lt.Square,className:S.mergeClasses("rounded-[14px]",p)}),r.jsxs("div",{className:S.mergeClasses("flex min-w-0 flex-1 flex-col gap-1",l!=null&&"self-stretch"),children:[r.jsxs("div",{className:"relative flex items-center justify-between",children:[r.jsx("span",{className:S.mergeClasses("uppercase",f,kn[e.type]),children:t?.type??Uf[e.type]}),v&&r.jsxs("div",{className:"absolute end-0 top-[-6px] flex items-center gap-2",children:[c,x&&r.jsx("span",{className:S.mergeClasses("flex h-6 items-center justify-center rounded-2xl px-2","dial-caption-lead-semi-text",qf[e.type],kn[e.type],g),children:t?.featured??"Featured"})]})]}),r.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r.jsx(b,{className:S.mergeClasses("min-w-0 shrink text-primary",u),children:o?r.jsx(C.Highlight,{text:e.name,query:o,maxLines:1}):r.jsx(C.EllipsisTooltip,{text:e.name})}),y!=null&&r.jsx(C.EllipsisTooltip,{className:S.mergeClasses("max-w-[30%] shrink-0 text-secondary",h),text:y})]}),l!=null&&r.jsx("div",{className:"mt-auto pt-1",children:l})]})]})},Qf=({open:e,onClose:t,header:s,ariaLabel:n,headerActions:a,onBack:i,backAriaLabel:o="Back",backDisabled:l=!1,closeAriaLabel:c="Close",closeDisabled:d=!1,hideClose:u=!1,closeOnOutsideClick:f=!0,children:h,className:p,overlayClassName:g,headerClassName:b,style:x,overlayStyle:v,bodyClassName:y,titleClassName:I,portalId:j})=>{const N=C.useThemeScope(),w=`side-drawer-title-${m.useId()}`,A=typeof s=="string",{refs:D,context:L}=J.useFloating({open:e,onOpenChange:R=>{R||t()}}),E=J.useRole(L,{role:"dialog"}),T=J.useDismiss(L,{outsidePress:f}),{getFloatingProps:k}=J.useInteractions([E,T]),z=s!=null||i!=null||!u;return r.jsx(J.FloatingPortal,{id:j,children:r.jsx(J.FloatingOverlay,{lockScroll:e,style:v,className:S.mergeClasses("z-popup bg-backdrop transition-opacity duration-300 motion-reduce:transition-none",e?"opacity-100":"pointer-events-none opacity-0",N,g),children:r.jsx(J.FloatingFocusManager,{context:L,disabled:!e,initialFocus:D.floating,children:r.jsxs("div",{ref:D.setFloating,...k(),role:"dialog","aria-modal":"true","aria-labelledby":A?w:void 0,"aria-label":A?void 0:n,inert:!e,style:x,className:S.mergeClasses("fixed inset-y-0 end-0 flex w-full flex-col overflow-hidden bg-layer-raised outline-hidden","desktop:w-[540px] desktop:rounded-s-xl desktop:border-s desktop:border-secondary","transition-transform duration-300 motion-reduce:transition-none",e?"translate-x-0":"translate-x-full rtl:-translate-x-full",p,C.DIAL_KIT_CLASS.sideDrawer),children:[z&&r.jsxs("div",{className:S.mergeClasses("flex shrink-0 items-center gap-2 border-b border-tertiary px-6 py-3",b),children:[i&&r.jsx(C.GhostIconButton,{"aria-label":o,disabled:l,onClick:i,icon:r.jsx(_.IconChevronLeft,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,className:"rtl:-scale-x-100","aria-hidden":"true"})}),A?r.jsx("h2",{id:w,className:S.mergeClasses("min-w-0 flex-1 truncate text-primary",I??"dial-h2-text"),children:s}):r.jsx("div",{className:"min-w-0 flex-1",children:s}),a,!u&&r.jsx(C.CloseButton,{ariaLabel:c,onClose:t,disabled:d,size:O.ElementSize.Standard})]}),r.jsx("div",{className:S.mergeClasses("min-h-0 flex-1 overflow-y-auto",y),children:h})]})})})})},ep=4,tp=24,Rn=e=>parseFloat(e)||0,rp=e=>{let t=e.length;for(;t>0&&e[t-1]===",";)t--;return e.slice(0,t)},sp=()=>{},np=({id:e,value:t,defaultValue:s,size:n=O.ElementSize.Standard,labelProps:a,placeholder:i,caption:o,error:l,invalid:c,disabled:d=!1,readOnly:u=!1,collapseTagOverflow:f=!1,ariaLabel:h,tagListLabel:p="Tags",className:g,fieldClassName:b,tagClassName:x,onChange:v})=>{const y=m.useId(),I=e||y,j=n===O.ElementSize.Small,N=m.useRef(null),w=m.useRef([]),A=m.useRef(null),D=t!==void 0,[L,E]=m.useState(s??[]),T=D?t:L,k=T.length,[z,R]=m.useState(""),[Z,H]=m.useState(k),B=!u&&!d,K=m.useCallback(U=>{D||E(U),v?.(U)},[D,v]),V=m.useCallback(U=>Q=>{w.current[U]=Q},[]),W=m.useCallback(()=>{const U=N.current;if(!U||U.clientWidth===0){H(T.length);return}const{paddingLeft:Q,paddingRight:_e}=getComputedStyle(U);H(Ha({availableWidth:U.clientWidth-Rn(Q)-Rn(_e)-(u?0:tp),tagWidths:T.map((Be,ve)=>w.current[ve]?.offsetWidth??0),overflowChipWidth:A.current?.offsetWidth??0,gap:ep}))},[u,T]);m.useEffect(()=>{if(!f){H(k);return}const U=N.current;if(!U)return;const Q=new ResizeObserver(()=>W());return Q.observe(U),W(),()=>Q.disconnect()},[f,W,k]);const oe=S.mergeClasses(f?"shrink-0":"min-w-0",x),X=U=>{const Q=rp(U.trim()).trim();!Q||T.includes(Q)||K([...T,Q])},le=U=>{K(T.filter(Q=>Q!==U))},G=()=>{X(z),R("")},ee=U=>{if(B){if(U.key==="Enter"||U.key===","){U.preventDefault(),G();return}U.key==="Backspace"&&!z&&k>0&&(U.preventDefault(),K(T.slice(0,-1)))}},ae=()=>{B&&z.trim()&&G()},de=f?T.slice(0,Z):T,me=f?T.slice(Z):[],Ne=me.join(", "),xe=k>0&&r.jsxs("span",{role:"list","aria-label":p,className:S.mergeClasses("relative flex min-w-0 items-center gap-1",f?"flex-nowrap":"flex-wrap"),children:[de.map(U=>r.jsx($e,{role:"listitem",label:U,className:oe,disabled:d,closable:B,onRemove:B?()=>le(U):void 0},U)),me.length>0&&r.jsx($e,{role:"listitem",label:`+${me.length}`,"aria-label":Ne,title:Ne,className:S.mergeClasses("shrink-0",x),disabled:d}),f&&r.jsxs("span",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 overflow-hidden whitespace-nowrap",children:[T.map((U,Q)=>r.jsx("span",{ref:V(Q),className:"inline-flex",children:r.jsx($e,{label:U,className:x,disabled:d,closable:B,onRemove:B?sp:void 0})},U)),r.jsx("span",{ref:A,className:"inline-flex",children:r.jsx($e,{label:`+${k}`,className:x})})]})]});return r.jsx(C.Input,{id:I,size:n,labelProps:a,caption:o,error:l,invalid:c,disabled:d,readOnly:u,value:z,placeholder:k>0?void 0:i,"aria-label":h,wrapperRef:N,onChange:U=>R(U??""),onKeyDown:ee,onBlur:ae,containerClassName:S.mergeClasses("w-full",g),wrapperClassName:S.mergeClasses(k>0&&["!h-auto",j?"min-h-[24px] py-0.5":"min-h-[40px] py-[3px]",f?"flex-nowrap overflow-hidden":"flex-wrap"],b,C.DIAL_KIT_CLASS.tagInput),className:S.mergeClasses("w-auto flex-1",f?"min-w-[24px]":"min-w-[100px]",u&&"cursor-default"),children:xe})},ap=(e,t,s,n)=>{const a=t.trim().toLowerCase(),i=new Set(s);return e.filter(({value:o,label:l,description:c})=>!i.has(o)&&[l,o,c].some(d=>d?.toLowerCase().includes(a))).slice(0,Math.max(n,0))},ip=5,op=({id:e,value:t,defaultValue:s,suggestions:n,maxSuggestions:a=ip,openOnFocus:i=!1,size:o=O.ElementSize.Standard,labelProps:l,placeholder:c,caption:d,error:u,invalid:f=!1,disabled:h=!1,readOnly:p=!1,ariaLabel:g,tagListLabel:b="Tags",getRemoveTagLabel:x,className:v,fieldClassName:y,tagClassName:I,listClassName:j,onChange:N})=>{const w=m.useId(),A=e||w,D=`${A}-listbox`,L=C.useThemeScope(),E=o===O.ElementSize.Small,T=t!==void 0,[k,z]=m.useState(s??[]),R=T?t:k,Z=R.length>0,H=!p&&!h,[B,K]=m.useState(""),[V,W]=m.useState(!1),[oe,X]=m.useState(0),le=!B.trim(),G=m.useMemo(()=>ap(n,B,R,i&&le?n.length:a),[B,le,a,i,n,R]),ee=V&&H&&G.length>0,ae=Math.min(oe,G.length-1),de=ee&&ae>=0,me=Y=>`${D}-option-${Y}`,{refs:Ne,floatingStyles:xe}=J.useFloating({open:ee,placement:"bottom-start",whileElementsMounted:J.autoUpdate,middleware:[J.offset(C.overlayGap),J.flip({padding:C.overlayGap}),J.size({padding:C.overlayGap,apply({rects:Y,availableHeight:ue,elements:fe}){fe.floating.style.width=`${Math.round(Y.reference.width)}px`,fe.floating.style.maxHeight=`${Math.floor(ue)}px`}})]}),U=m.useCallback(Y=>{T||z(Y),N?.(Y)},[T,N]),Q=()=>{W(!1),X(0)},_e=()=>{!i||!H||(W(!0),X(le?-1:0))},Be=Y=>{const ue=Y.trim();ue&&!R.includes(ue)&&U([...R,ue]),K(""),i?X(-1):Q()},ve=Y=>U(R.filter(ue=>ue!==Y)),Ue=Y=>{const ue=Y??"",fe=!!ue.trim();K(ue),W(fe||i),X(fe?0:-1)},ct=Y=>{if(H)switch(Y.key){case"ArrowDown":case"ArrowUp":{if(Y.preventDefault(),!ee){W(!0),X(0);return}const ue=Y.key==="ArrowDown"?1:-1,fe=ae<0?Math.min(-ue,0):ae;X((fe+ue+G.length)%G.length);return}case"Enter":case",":Y.preventDefault(),Be(de?G[ae].value:B);return;case"Escape":ee&&Y.preventDefault(),Q();return;case"Backspace":!B&&Z&&(Y.preventDefault(),U(R.slice(0,-1)));return}},Ce=Y=>Y.preventDefault();return r.jsxs(r.Fragment,{children:[r.jsx(C.Input,{id:A,role:"combobox","aria-autocomplete":"list","aria-expanded":ee,"aria-controls":D,"aria-activedescendant":de?me(ae):void 0,"aria-invalid":f||void 0,"aria-label":g,size:o,labelProps:l,caption:d,error:u,invalid:f,disabled:h,readOnly:p,value:B,placeholder:Z?void 0:c,wrapperRef:Ne.setReference,onChange:Ue,onKeyDown:ct,onFocus:_e,onClick:_e,onBlur:Q,containerClassName:S.mergeClasses("w-full",v),wrapperClassName:S.mergeClasses(Z&&["!h-auto flex-wrap gap-1 py-2",E?"min-h-[24px]":"min-h-[40px]"],y,C.DIAL_KIT_CLASS.autocompleteTagInput),className:S.mergeClasses("w-auto min-w-[100px] flex-1",p&&"cursor-default"),children:Z&&r.jsx("span",{role:"list","aria-label":b,className:"flex min-w-0 flex-wrap items-center gap-1",children:R.map(Y=>r.jsx($e,{role:"listitem",label:Y,className:S.mergeClasses(br,"min-w-0",I),disabled:h,closable:H,removeLabel:x?.(Y),onRemove:H?()=>ve(Y):void 0},Y))})}),r.jsx(J.FloatingPortal,{children:r.jsx("div",{ref:Ne.setFloating,id:D,role:"listbox","aria-label":b,hidden:!ee,style:xe,className:S.mergeClasses("z-floating overflow-y-auto",C.overlaySurfaceClassName,C.overlayListClassName,!ee&&"hidden",L,j),children:ee&&G.map((Y,ue)=>{const fe=ue===ae;return r.jsx(C.MenuItem,{id:me(ue),role:"option","aria-selected":fe,tabIndex:-1,label:Y.label,description:Y.description,mark:C.MenuItemMark.Tint,selected:fe,onMouseDown:Ce,onMouseEnter:()=>X(ue),onClick:()=>Be(Y.value)},Y.value)})})})]})},lp=(e,t)=>{if(e<=0||t<=0)return[];const s=Math.floor(e/t+1e-9);return Array.from({length:s},(n,a)=>(a+1)*t/e*100)},li=e=>(e.toString().split(".")[1]??"").length,cp=(e,t,s,n)=>{const a=Math.min(s,Math.max(t,e));if(n<=0)return a;const i=Math.round(Number(((a-t)/n).toFixed(9))),o=t+i*n;return Number(Math.min(s,o).toFixed(li(n)))},dp=12,Mn=e=>`calc(${e}% + ${(.5-e/100)*dp}px)`,up=(e,t)=>e&&t?"grid-cols-[auto_minmax(0,1fr)_auto]":e?"grid-cols-[auto_minmax(0,1fr)]":t?"grid-cols-[minmax(0,1fr)_auto]":"grid-cols-[minmax(0,1fr)]",fp=({id:e,value:t,min:s=0,max:n=1,step:a=.1,disabled:i,labelProps:o,labels:l,formatValue:c,showValue:d=!1,showTooltip:u=!1,showTicks:f=!1,leftContent:h,rightContent:p,showValueInput:g=!1,valueInputAriaLabel:b,caption:x,error:v,onChange:y,containerClassName:I,trackClassName:j,fillClassName:N,className:w,...A})=>{const D=m.useId(),L=e??D,E=x&&!v?`${L}-caption`:void 0,T=v?`${L}-error`:void 0,k=n-s,z=k>0?Math.min(100,Math.max(0,(t-s)/k*100)):0,R=Mn(z),Z=f&&!i?lp(k,a):[],H=u&&!i,B=h!=null,K=g||p!=null,V=li(a),[W,oe]=m.useState(null),X=c?c(t):t.toFixed(V),le=m.useCallback(ae=>{y?.(Number(ae.target.value))},[y]),G=m.useCallback(ae=>{const de=ae==null?"":String(ae);oe(de);const me=Number(de);de!==""&&Number.isFinite(me)&&y?.(cp(me,s,n,a))},[n,s,y,a]),ee=m.useCallback(()=>oe(null),[]);return r.jsxs("div",{className:S.mergeClasses("flex flex-col gap-2",I),children:[(o||d)&&r.jsxs("div",{className:"flex items-center gap-2",children:[o&&r.jsx(C.Label,{...o,htmlFor:L}),d&&r.jsx("span",{"aria-hidden":"true",className:S.mergeClasses("dial-small-text ml-auto",i?"text-control-disable-primary":"text-primary"),children:X})]}),r.jsxs("div",{className:"flex flex-col gap-1",children:[r.jsxs("div",{className:S.mergeClasses("grid items-center gap-y-1",g?"gap-x-2":"gap-x-3",up(B,K),H&&"mt-2"),children:[B&&r.jsx("div",{className:"flex items-center",children:h}),r.jsxs("div",{className:"relative flex h-6 items-center",children:[r.jsx("div",{className:S.mergeClasses("pointer-events-none absolute inset-x-0 h-1 rounded-full",i?"bg-control-disable-primary":"bg-control-accent-muted",j)}),Z.map(ae=>r.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute size-0.5 -translate-x-1/2 rounded-full border border-accent-focus",style:{left:Mn(ae)}},ae)),r.jsx("div",{className:S.mergeClasses("pointer-events-none absolute left-0 h-1 rounded-full",i?"bg-control-disable-secondary":"bg-control-accent",N),style:{width:R}}),H&&r.jsxs("span",{"aria-hidden":"true",className:"pointer-events-none absolute bottom-full mb-0.5 flex -translate-x-1/2 flex-col items-center",style:{left:R},children:[r.jsx("span",{className:"whitespace-nowrap rounded-md bg-control-inverted px-2 py-0.5 dial-small-text text-control-inverted shadow-xs",children:X}),r.jsx("svg",{width:"8",height:"4",viewBox:"0 0 8 4",className:"fill-control-inverted",children:r.jsx("path",{d:"M0 0h8L4 4z"})})]}),r.jsx("input",{...A,type:"range",id:L,value:t,min:s,max:n,step:a,disabled:i,onChange:le,"aria-label":O.resolveAccessibleName(typeof o?.label!="string"?A["aria-label"]:void 0),"aria-valuetext":c?X:void 0,"aria-describedby":T??E,className:S.mergeClasses("dial-kit-slider absolute inset-0 h-full w-full",w)})]}),K&&r.jsx("div",{className:"flex items-center",children:g?r.jsx(Rs,{"aria-label":O.resolveAccessibleName(b??(typeof o?.label=="string"?o.label:void 0)),value:W??t.toFixed(V),min:s,max:n,step:a,disabled:i,size:O.ElementSize.Small,containerClassName:"w-12",className:"text-center",onChange:G,onBlur:ee}):p}),l&&r.jsx("div",{className:S.mergeClasses("dial-tiny-text flex text-secondary",B&&"col-start-2"),children:l.length===3?r.jsxs(r.Fragment,{children:[r.jsx("span",{children:l[0]}),r.jsx("span",{className:"flex-1 text-center",children:l[1]}),r.jsx("span",{children:l[2]})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{children:l[0]}),r.jsx("span",{className:"ml-auto",children:l[1]})]})})]}),r.jsx(C.ErrorText,{id:T,text:v}),!v&&r.jsx(C.CaptionText,{id:E,text:x})]})]})},pp=48,hp=({children:e,title:t,width:s=280,collapsedWidth:n=pp,isOpened:a,defaultOpened:i=!0,onToggle:o,additionalButtons:l,ariaLabel:c="Sidebar",collapseLabel:d="Collapse sidebar",expandLabel:u="Expand sidebar",className:f,titleClassName:h,contentClassName:p,footerClassName:g})=>{const b=a!==void 0,[x,v]=m.useState(i),y=b?a:x,I=`collapsible-sidebar-content-${m.useId()}`,j=y?d:u,N=w=>{const A=!y;b||v(A),o?.(A,w)};return r.jsxs("aside",{"aria-label":c,style:{width:`${y?s:n}px`},className:S.mergeClasses("flex flex-col justify-between",f,C.DIAL_KIT_CLASS.collapsibleSidebar),children:[r.jsx("div",{id:I,hidden:!y,className:S.mergeClasses("min-h-0 flex-1 overflow-auto p-4",p),children:e}),r.jsx("div",{hidden:y,className:S.mergeClasses("rotate-180 px-3 py-4 [writing-mode:tb-rl] dial-small-text text-primary",h),children:t}),r.jsxs("div",{className:S.mergeClasses("flex h-12 shrink-0 flex-row items-center gap-2 border-t border-tertiary py-1",y?"justify-end px-2":"justify-center",g),children:[y&&l,r.jsx(C.IconButton,{variant:O.ButtonVariant.Primary,appearance:O.ButtonAppearance.Ghost,size:O.ElementSize.Standard,onClick:N,"aria-label":j,"aria-expanded":y,"aria-controls":I,tooltipProps:{tooltip:j},icon:y?r.jsx(_.IconChevronsLeft,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"}):r.jsx(_.IconChevronsRight,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true"})})]})]})},mp=({side:e,isResizing:t,width:s,minWidth:n,maxWidth:a,step:i,ariaLabel:o,onWidthChange:l,customHandler:c,handlerClassName:d})=>{const u=e===nt.Left,f=u?_.IconChevronLeft:_.IconChevronRight,h=p=>{let g;switch(p.key){case"ArrowLeft":g=s+(u?i:-i);break;case"ArrowRight":g=s+(u?-i:i);break;case"Home":g=n;break;case"End":g=a;break;default:return}p.preventDefault(),l(g)};return r.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":o,"aria-valuenow":s,"aria-valuemin":n,"aria-valuemax":a,tabIndex:0,onKeyDown:h,className:S.mergeClasses("relative h-full w-0.5 cursor-col-resize bg-control-accent text-accent","opacity-0 transition-opacity motion-reduce:transition-none","group-hover:opacity-100 focus-visible:opacity-100","focus-visible:outline focus-visible:outline-offset-2 focus-visible:outline-focus",t&&"opacity-100",d),children:c??r.jsx(f,{size:P.DIAL_ICON_SIZE.MD,stroke:se.DIAL_KIT_ICON_STROKE,"aria-hidden":"true",className:S.mergeClasses("pointer-events-none absolute top-1/2 -translate-y-1/2",u?"right-full":"left-full")})})},gp=16,ci=({children:e,minWidth:t,maxWidth:s,width:n,defaultWidth:a,onResizeStop:i,onResize:o,side:l=nt.Right,keyboardStep:c=gp,ariaLabel:d="Resize panel",className:u,resizeHandlerClassName:f,resizeHandler:h})=>{const[p,g]=m.useState(!1),[b,x]=m.useState(a??t),v=n!==void 0,y=v?n:b,I=m.useRef(null),j=m.useCallback(()=>{g(!0)},[]),N=m.useCallback(()=>{g(!1);const D=I.current?.resizable?.getBoundingClientRect(),L=D?Math.round(D.width):t;v||x(L),i?.(L)},[i,v,t]),w=m.useCallback(D=>{const L=Math.min(s,Math.max(t,D));L!==y&&(v||(x(L),I.current?.updateSize({width:L,height:"100%"})),o?.(L),i?.(L))},[s,t,y,v,o,i]),A=m.useMemo(()=>{const D=l===nt.Left,L=r.jsx(mp,{side:l,isResizing:p,width:y,minWidth:t,maxWidth:s,step:c,ariaLabel:d,onWidthChange:w,customHandler:h,handlerClassName:f});return{size:v?{width:y,height:"100%"}:void 0,defaultSize:v?void 0:{width:y,height:"100%"},minWidth:t,maxWidth:s,enable:{left:D,right:!D},handleClasses:{right:"group",left:"group"},handleStyles:{right:{right:"-8px",zIndex:10},left:{left:0,zIndex:10}},handleComponent:{left:D?L:void 0,right:D?void 0:L},onResizeStart:j,onResize:(E,T,k)=>{o?.(Math.round(k.offsetWidth))},onResizeStop:N}},[l,v,y,t,s,c,d,w,h,f,p,j,N,o]);return r.jsx(ra,{ref:I,...A,children:r.jsx("div",{className:S.mergeClasses("group flex size-full flex-col bg-layer-raised transition-all motion-reduce:transition-none",u,C.DIAL_KIT_CLASS.resizableContainer),children:e})})},xp=({enabled:e=!0,children:t,...s})=>e?r.jsx(ci,{...s,children:t}):t;var Pe=(e=>(e.InProgress="inProgress",e.Success="success",e.Warning="warning",e.Failed="failed",e.Canceled="canceled",e))(Pe||{});const di=8e3,qt="flex size-7 shrink-0 items-center justify-center",ui={cancelItemAriaLabel:e=>`Cancel "${e}"`,itemProgressAriaLabel:e=>`"${e}" in progress`,successLabel:"Completed",canceledLabel:"Canceled",failedMessage:"Failed",warningMessage:"Completed with warnings",queueProgressAriaLabel:"Progress",queueProgressValueText:(e,t)=>`${e} of ${t}`,collapseAriaLabel:"Collapse",expandAriaLabel:"Expand",closeAriaLabel:"Close",closeConfirmHeader:"Close?",closeConfirmDescriptionInProgress:"Some items are still in progress.",closeConfirmDescriptionFailed:"Some items have failed.",closeConfirmDescriptionMixed:"Some items are still in progress, and some have failed.",closeConfirmLabel:"Close",closeCancelLabel:"Cancel"},Cp=({title:e,failedCount:t,isCollapsed:s,itemsId:n,labels:a,onToggleCollapse:i,onClose:o})=>{const l=s?_.IconChevronUp:_.IconChevronDown;return r.jsxs("div",{className:"mx-4 flex items-center justify-between border-b border-tertiary py-3",children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r.jsx("span",{className:"dial-small-paragraph-semi-text truncate text-primary",children:e}),t>0&&r.jsx("span",{className:"dial-small-paragraph-semi-text inline-flex h-4 min-w-4 shrink-0 items-center justify-center rounded-full bg-control-error px-1 text-control-permanent",children:t})]}),r.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[r.jsx(C.GhostIconButton,{"aria-label":s?a.expandAriaLabel:a.collapseAriaLabel,"aria-expanded":!s,"aria-controls":n,size:O.ElementSize.Small,icon:r.jsx(l,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,className:"text-secondary","aria-hidden":!0}),onClick:i,className:qt}),r.jsx(C.GhostIconButton,{"aria-label":a.closeAriaLabel,size:O.ElementSize.Small,icon:r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,className:"text-secondary","aria-hidden":!0}),onClick:o,className:qt})]})]})},Pn=({message:e,isError:t})=>{const s=t?_.IconAlertCircleFilled:_.IconAlertTriangleFilled;return r.jsx(C.Tooltip,{tooltip:e,asChild:!0,children:r.jsx("span",{className:qt,role:"img","aria-label":e,tabIndex:0,children:r.jsx(s,{size:P.DIAL_ICON_SIZE.SM,className:t?"text-error":"text-warning-icon","aria-hidden":!0})})})},bp=({item:e,labels:t,onCancel:s})=>{const n=e.status===Pe.Canceled;return r.jsxs("div",{className:"group flex items-center gap-2 px-4 py-2",children:[r.jsx(zs,{type:Ve.File,name:e.name,size:P.DIAL_ICON_SIZE.MD,className:S.mergeClasses(n&&"opacity-50"),decorative:!0}),r.jsx(C.EllipsisTooltip,{text:e.name,className:S.mergeClasses("dial-small-text",n?"text-secondary":"text-primary")}),e.status===Pe.InProgress&&r.jsxs("div",{className:S.mergeClasses(qt,"grid"),children:[r.jsx(Tt,{size:P.DIAL_ICON_SIZE.SM,ariaLabel:t.itemProgressAriaLabel(e.name),className:S.mergeClasses("pointer-events-none col-start-1 row-start-1 transition-opacity",s&&"group-focus-within:opacity-0 group-hover:opacity-0")}),s&&r.jsx(C.GhostIconButton,{"aria-label":t.cancelItemAriaLabel(e.name),size:O.ElementSize.Small,icon:r.jsx(_.IconX,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,className:"text-secondary","aria-hidden":!0}),onClick:()=>s(e.id),className:"col-start-1 row-start-1 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100"})]}),e.status===Pe.Success&&r.jsx("span",{className:qt,role:"img","aria-label":t.successLabel,children:r.jsx(_.IconCheck,{size:P.DIAL_ICON_SIZE.SM,stroke:se.DIAL_KIT_ICON_STROKE,className:"text-accent","aria-hidden":!0})}),e.status===Pe.Warning&&r.jsx(Pn,{message:e.message||t.warningMessage,isError:!1}),e.status===Pe.Failed&&r.jsx(Pn,{message:e.message||t.failedMessage,isError:!0}),n&&r.jsx("span",{className:"dial-small-text shrink-0 text-secondary",children:t.canceledLabel})]})},vp=e=>Math.round(e.reduce((t,s)=>t+(s.percent??(s.status===Pe.InProgress?0:100)),0)/e.length),yp=(e,t,s)=>e&&t?s.closeConfirmDescriptionMixed:t?s.closeConfirmDescriptionFailed:s.closeConfirmDescriptionInProgress,Sp=({title:e,items:t,onClose:s,onCancelItem:n,labels:a,autoCloseDelay:i=di,className:o,bodyClassName:l})=>{const[c,d]=m.useState(!1),[u,f]=m.useState(!1),h=m.useId(),p={...ui,...a},g=t.filter(w=>w.status===Pe.InProgress).length,b=g>0,x=t.filter(w=>w.status===Pe.Failed).length,v=x>0,y=t.length>0&&t.every(w=>w.status===Pe.Success),I=m.useCallback(()=>{b||v?f(!0):s()},[b,v,s]),j=m.useCallback(()=>{f(!1),s()},[s]),N=m.useCallback(()=>{d(w=>!w)},[]);return m.useEffect(()=>{if(!y||i<=0)return;const w=setTimeout(s,i);return()=>clearTimeout(w)},[y,i,s]),t.length===0?null:r.jsxs("div",{role:"status","aria-live":"polite",className:S.mergeClasses("w-[370px] max-w-[calc(100vw-2rem)] rounded-xl bg-layer-raised shadow-md",o,C.DIAL_KIT_CLASS.transferQueue),children:[r.jsx(Cp,{title:e,failedCount:x,isCollapsed:c,itemsId:h,labels:p,onToggleCollapse:N,onClose:I}),c&&b&&r.jsx($n,{value:vp(t),size:O.ElementSize.Small,"aria-label":p.queueProgressAriaLabel,"aria-valuetext":p.queueProgressValueText(t.length-g,t.length)}),!c&&r.jsx("div",{id:h,className:S.mergeClasses("flex max-h-[40vh] flex-col overflow-y-auto py-1",l),children:t.map(w=>r.jsx(bp,{item:w,labels:p,onCancel:n},w.id))}),r.jsx(ri,{open:u,header:p.closeConfirmHeader,description:yp(b,v,p),confirmLabel:p.closeConfirmLabel,cancelLabel:p.closeCancelLabel,variant:Je.Danger,onConfirm:j,onClose:()=>f(!1)})]})};exports.mergeClasses=S.mergeClasses;exports.CaptionText=C.CaptionText;exports.Checkbox=C.Checkbox;exports.CheckboxBox=C.CheckboxBox;exports.CloseButton=C.CloseButton;exports.DEFAULT_DATE_FORMAT_OPTIONS=C.DEFAULT_DATE_FORMAT_OPTIONS;exports.DEFAULT_DATE_LOCALE=C.DEFAULT_LOCALE;exports.DEFAULT_GRID_DATE_FORMAT_OPTIONS=C.DEFAULT_DATE_FORMAT_OPTIONS$1;exports.DEFAULT_GRID_DATE_LOCALE=C.DEFAULT_LOCALE$1;exports.DIAL_KIT_CLASS=C.DIAL_KIT_CLASS;exports.DangerIconButton=C.DangerIconButton;exports.DateCellRenderer=C.DateCellRenderer;exports.DialCloseButton=C.DialCloseButton;exports.DialDangerIconButton=C.DialDangerIconButton;exports.DialDateCellRenderer=C.DialDateCellRenderer;exports.DialDropdown=C.DialDropdown;exports.DialEllipsisTooltip=C.DialEllipsisTooltip;exports.DialGhostIconButton=C.DialGhostIconButton;exports.DialGrid=C.DialGrid;exports.DialIcon=C.DialIcon;exports.DialNeutralIconButton=C.DialNeutralIconButton;exports.DialNoDataContent=C.DialNoDataContent;exports.DialPrimaryIconButton=C.DialPrimaryIconButton;exports.DialRadioButton=C.DialRadioButton;exports.DialSecondaryIconButton=C.DialSecondaryIconButton;exports.DialSuccessIconButton=C.DialSuccessIconButton;exports.DialTertiaryIconButton=C.DialTertiaryIconButton;exports.Dropdown=C.Dropdown;exports.DropdownItemType=C.DropdownItemType;exports.DropdownTrigger=C.DropdownTrigger;exports.DropdownType=C.DropdownType;exports.EllipsisTooltip=C.EllipsisTooltip;exports.ErrorText=C.ErrorText;exports.GRID_ALIGN_RIGHT_CLASS=C.GRID_ALIGN_RIGHT_CLASS;exports.GRID_ROOT_CLASS=C.GRID_ROOT_CLASS;exports.GRID_ROW_HEIGHT=C.ROW_HEIGHT;exports.GRID_SELECTION_COLUMN_ID=C.GRID_SELECTION_COLUMN_ID;exports.GRID_THEME_PARAMS=C.GRID_THEME_PARAMS;exports.GhostIconButton=C.GhostIconButton;exports.Grid=C.Grid;exports.GridColorScheme=C.GridColorScheme;exports.GridSelectionMode=C.GridSelectionMode;exports.Highlight=C.Highlight;exports.IconButton=C.IconButton;exports.InfoButton=C.InfoButton;exports.Input=C.Input;exports.InteractiveTooltip=C.InteractiveTooltip;exports.InteractiveTooltipTrigger=C.InteractiveTooltipTrigger;exports.Label=C.Label;exports.MenuItem=C.MenuItem;exports.MenuItemMark=C.MenuItemMark;exports.NeutralIconButton=C.NeutralIconButton;exports.NoDataContent=C.NoDataContent;exports.PrimaryIconButton=C.PrimaryIconButton;exports.Radio=C.Radio;exports.Search=C.Search;exports.StaticIconButton=C.StaticIconButton;exports.ThemeScope=C.ThemeScope;exports.Tooltip=C.Tooltip;exports.TooltipContainer=C.TooltipContainer;exports.TooltipContent=C.TooltipContent;exports.TooltipPlacement=C.TooltipPlacement;exports.TooltipTrigger=C.TooltipTrigger;exports.baseColumnComparator=C.baseColumnComparator;exports.checkColDefsChanges=C.checkColDefsChanges;exports.convertGridDateToDate=C.convertToDate;exports.convertToDate=C.convertToDate;exports.useThemeScope=C.useThemeScope;exports.DialLabel=ze.DialLabel;exports.DialSwitch=ze.DialSwitch;exports.BASE_ICON_PROPS=P.BASE_ICON_PROPS;exports.BASE_ICON_SIZE=P.BASE_ICON_SIZE;exports.DIAL_ICON_SIZE=P.DIAL_ICON_SIZE;exports.ButtonAppearance=O.ButtonAppearance;exports.ButtonVariant=O.ButtonVariant;exports.DialIconButton=O.DialIconButton;exports.DialTooltip=O.DialTooltip;exports.DialTooltipContainer=O.DialTooltipContainer;exports.DialTooltipContent=O.DialTooltipContent;exports.DialTooltipTrigger=O.DialTooltipTrigger;exports.ElementSize=O.ElementSize;exports.EditorThemes=Yt.EditorThemes;exports.LazyDialJsonEditor=Yt.LazyDialJsonEditor;exports.LazyDialMarkdownEditor=Yt.LazyDialMarkdownEditor;exports.LazyMarkdownEditor=Yt.LazyMarkdownEditor;exports.DIAL_KIT_ICON_STROKE=se.DIAL_KIT_ICON_STROKE;exports.AVATAR_PALETTE=ai;exports.Accordion=rf;exports.AccordionCaretPosition=yr;exports.AnalyticsCardVariant=Vt;exports.AutocompleteTagInput=op;exports.Avatar=oi;exports.AvatarColor=qe;exports.AvatarShape=Lt;exports.Badge=Wf;exports.BadgeColor=Ye;exports.BadgeVariant=it;exports.BottomSheet=Hf;exports.Breadcrumbs=Pu;exports.BreadcrumbsSize=bt;exports.Button=yt;exports.ButtonDropdown=Fu;exports.Calendar=Su;exports.CalendarMode=Te;exports.CardShell=Ud;exports.CollapsibleSidebar=hp;exports.ConditionalResizableContainer=xp;exports.ConfirmationPopup=ri;exports.ConfirmationPopupVariant=Je;exports.DEFAULT_ANALYTICS_BAR_COLOR_MAP=ps;exports.DEFAULT_TRANSFER_QUEUE_LABELS=ui;exports.DangerButton=Id;exports.DialAccordion=Bn;exports.DialAnalyticsBar=cr;exports.DialAnalyticsBarGroup=Di;exports.DialAnalyticsCard=Ii;exports.DialAnalyticsErrorTag=fs;exports.DialAnalyticsHistogram=Oi;exports.DialAutocompleteInputValue=ua;exports.DialBreadcrumb=Ec;exports.DialBreadcrumbItem=zt;exports.DialButton=ot;exports.DialButtonDropdown=k1;exports.DialCaptionText=Xt;exports.DialCheckbox=ts;exports.DialCollapsibleSidebar=Xi;exports.DialConditionalResizableContainer=Sc;exports.DialConfirmationPopup=Zc;exports.DialDangerButton=ca;exports.DialDraggableItem=rc;exports.DialDropdownIcon=R1;exports.DialErrorText=Se;exports.DialFileIcon=ta;exports.DialFileName=dc;exports.DialFileNodeType=Xe;exports.DialFilePermission=wa;exports.DialFileResourceType=Ds;exports.DialFolderName=uc;exports.DialFormItem=Sr;exports.DialFormPopup=Jc;exports.DialGhostButton=Ns;exports.DialInput=Qe;exports.DialInputPopup=fa;exports.DialItemType=Ve;exports.DialLabelledText=Ji;exports.DialLinkButton=Oc;exports.DialLoadFileArea=ja;exports.DialLoadFileAreaField=O1;exports.DialLoader=lt;exports.DialNeutralButton=Qt;exports.DialNotification=Ri;exports.DialNumberInput=os;exports.DialPagination=Fi;exports.DialPasswordInput=ma;exports.DialPopup=Tr;exports.DialPrimaryButton=Jt;exports.DialRadioGroup=Vn;exports.DialRadioGroupPopupField=Uc;exports.DialRemoveButton=Lr;exports.DialResizableContainer=sa;exports.DialSchemaRenderer=ed;exports.DialSearch=xa;exports.DialSegmentedControl=zc;exports.DialSelect=Ke;exports.DialSelectField=p1;exports.DialSharedEntityIndicator=ys;exports.DialSlider=Yi;exports.DialSteps=Ki;exports.DialTabs=wc;exports.DialTag=pt;exports.DialTagInput=da;exports.DialTextarea=Ac;exports.EDITABLE_CONTAINER_ATTRIBUTE=js;exports.EntityIdentity=Jf;exports.EntityType=ye;exports.ErrorMessageNotification=tu;exports.ErrorToastNotification=qd;exports.FabButton=zu;exports.FileDropzone=Tf;exports.FileIcon=zs;exports.FileName=ni;exports.FilterChips=Lf;exports.FlexibleActionsDirection=Da;exports.FolderName=Ff;exports.FolderPath=Nu;exports.FormItemOrientation=Kt;exports.GeneralMessageNotification=iu;exports.GeneralToastNotification=eu;exports.GhostButton=As;exports.InfoMessageNotification=ru;exports.InfoToastNotification=Yd;exports.InlineSelect=Hu;exports.InlineSelectTrigger=ti;exports.JsonSchemaType=F;exports.LinkButton=Dd;exports.LoadingMessageNotification=au;exports.LoadingToastNotification=Qd;exports.MultiSelectTags=$t;exports.NOT_ALLOWED_SPACES=ws;exports.NOT_ALLOWED_SPACES_REGEXP=Z1;exports.NOT_ALLOWED_SYMBOLS=Ta;exports.NOT_ALLOWED_SYMBOLS_REGEXP=W1;exports.NeutralButton=Os;exports.Notification=Ms;exports.NotificationType=be;exports.NotificationVariant=ce;exports.NumberInput=Rs;exports.OutlinedButton=wd;exports.PasswordInput=Ka;exports.Popup=Ps;exports.PopupSize=De;exports.PrimaryButton=$a;exports.ProgressBar=$n;exports.RadioGroup=Ut;exports.RadioGroupOrientation=Ae;exports.RadioGroupPopupField=ff;exports.ResizableContainer=ci;exports.ResizableContainerSide=nt;exports.SchemaDisplayMode=gt;exports.SchemaOrientation=Ot;exports.SchemaRenderer=Vd;exports.SchemaRendererVariant=He;exports.ScreenResolution=hr;exports.SegmentedControl=If;exports.Select=tt;exports.SelectSize=gr;exports.SelectVariant=xr;exports.SharedEntityIndicator=si;exports.SideDrawer=Qf;exports.Skeleton=Nc;exports.SkeletonAvatarShape=pr;exports.SkeletonAvatarSize=Ft;exports.SkeletonVariant=ft;exports.Slider=fp;exports.Spinner=Tt;exports.StarterButton=jd;exports.StepStatus=Oe;exports.SuccessMessageNotification=su;exports.SuccessToastNotification=Xd;exports.Switch=Wa;exports.TRANSFER_QUEUE_AUTO_CLOSE_DELAY_MS=di;exports.TabOrientation=at;exports.TabView=ht;exports.Tabs=jf;exports.Tag=$e;exports.TagAppearance=Ct;exports.TagInput=np;exports.Textarea=Va;exports.TextareaResize=_s;exports.ToggleIconButton=pf;exports.TransferQueue=Sp;exports.TransferQueueItemStatus=Pe;exports.WarningMessageNotification=nu;exports.WarningToastNotification=Jd;exports.editableContainerProps=M1;exports.extractInitials=ii;exports.getTimezoneLabel=La;exports.matchesAccept=us;exports.useEditableItem=P1;exports.wrapInRootFolder=V1;
|