@npm-questionpro/wick-ui-lib 1.29.2 → 1.29.3
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/style.css +1 -1
- package/dist/wick-ui-lib/es/index.js +16 -12
- package/dist/wick-ui-lib/umd/index.js +2 -2
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
)`;d.style.setProperty("--spotlight-background",S)})};return window.addEventListener("mousemove",f),()=>{window.removeEventListener("mousemove",f),w&&cancelAnimationFrame(w)}}},[t,n,o,i]),a.jsx("div",{ref:l,className:p(Am.gradientBackground,"wu-transform-gpu",r),...u,children:s})},Yn={wuModalBodyWrapper:"_wuModalBodyWrapper_10o33_1","wu-modal-footer":"_wu-modal-footer_10o33_5","wu-modal-content":"_wu-modal-content_10o33_5","wu-modal-header":"_wu-modal-header_10o33_9"},Iu="calc(100vh - 64px)",Dm={sm:"400px",md:"600px",lg:"1200px"},km=({Trigger:e,children:t,size:n="md",hideCloseButton:s,preventClickOutside:r,onOpenChange:o,open:i,dir:u,maxWidth:l,maxHeight:d,className:c,style:w,variant:f="action",...m})=>{const g={action:["#EEF3FBcc 32%","#1D50F4cc"],upgrade:["#FDEDCCcc 32%","#FF9F00cc"],critical:["#FFB6B6cc 32%","#CC0000cc"]};return a.jsxs(Su,{modal:!0,onOpenChange:o,open:i,children:[e&&a.jsx(Cu,{asChild:!0,children:e}),a.jsx(Hr,{style:{width:"calc(100% - 64px)",maxWidth:l||Dm[n],maxHeight:d||Iu,...w},hideCloseButton:s,onInteractOutside:b=>r&&b.preventDefault(),dir:u,"aria-describedby":void 0,"data-variant":f,className:p("wu-group wu-rounded-[1.1rem]",Yn.wuModalBodyWrapper,c),...m,children:a.jsx(Mu,{colors:g[f],strokeWidth:4,className:p("wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col",c),style:{maxHeight:d||Iu},children:t})})]})},Pm=({children:e,className:t,...n})=>a.jsx("div",{className:p("wu-flex wu-flex-col wu-gap-4 wu-p-4 rtl:wu-text-right wu-overflow-auto wu-bg-white","wu-p-8 wu-text-gray-lead",Yn["wu-modal-content"],t),...n,children:e}),_m=({children:e,className:t,...n})=>a.jsx(Ur,{...n,"data-variant":"action",className:p("wu-text-lg wu-text-gray-lead wu-font-medium","wu-rounded-t-xl wu-px-4","group-data-[variant=action]:wu-bg-blue-sidebar group-data-[variant=action]:wu-text-blue-q","group-data-[variant=critical]:wu-bg-[#F9E0E0] group-data-[variant=critical]:wu-text-red-deep","group-data-[variant=upgrade]:wu-bg-[#FEF1D9] group-data-[variant=upgrade]:wu-text-yellow-deep",Yn["wu-modal-header"],t),children:a.jsx(jr,{className:"wu-font-normal wu-justify-start wu-text-2xl wu-h-14",children:e})}),Vm=({children:e,className:t,...n})=>a.jsx(Eu,{...n,className:p("wu-border-t wu-border-gray-40 wu-bg-white wu-min-h-16 wu-mx-4 wu-px-0","wu-mx-0 wu-rounded-b-xl wu-min-h-16 wu-p-4","group-data-[variant=upgrade]:wu-border-[#EED6A8]","group-data-[variant=action]:wu-border-[#BAC9F8]","group-data-[variant=critical]:wu-border-[#F0B3B3]",Yn["wu-modal-footer"],t),children:e}),Om=({children:e,className:t,...n})=>{const s=h.useRef(null);return a.jsx(Mm,{asChild:!0,children:a.jsx(Ce,{className:t,ref:s,...n,children:e})})},Fm=({placeholder:e="Select...",value:t,multiple:n=!1,accessorKey:s,variant:r="flat",dir:o="ltr",customTriggerChildren:i,id:u,disabled:l,selectAll:d,isCheckedAll:c,width:w,...f})=>{const[m,g]=h.useState(""),[b,x]=h.useState(e);h.useEffect(()=>{if(!t||Array.isArray(t)&&t.length===0){x(e),g("");return}const v=s.label;if(n&&Array.isArray(t)){const T=t.map(N=>N[v]).join(", ");g(T)}else!n&&!Array.isArray(t)&&g(t[v])},[t,s.label,n,e]);const S=()=>e&&!m?a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:b}):a.jsx("span",{className:p("wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap"),style:{width:`${(w||0)-32}px`},children:c?(d==null?void 0:d.triggerText)??m:m});return a.jsx(ro,{asChild:!0,dir:o,id:u,disabled:l,children:a.jsxs("button",{...f,disabled:l,className:p("wu-flex wu-gap-2 wu-w-full wu-items-center wu-justify-between wu-py-1.5 wu-px-2 wu-text-xs wu-transition-colors wu-cursor-pointer wu-border-b wu-bg-white wu-border-gray-subtle wu-h-8","focus:wu-outline-none focus-visible:wu-border-blue-p/80 wu-rounded-t-sm","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10 disabled:wu-opacity-50","hover:wu-bg-gray-10 hover:wu-border-blue-p",r==="outlined"&&"wu-border wu-border-gray-subtle","wu-group/wuSelect wu-select-trigger",f.className),children:[i??S(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuSelect:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},Au=({option:e,value:t,multiple:n=!1,onSelect:s,accessorKey:r,dir:o="ltr"})=>{const[i,u]=h.useState(n?[]:"");h.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[r.value])):JSON.stringify(t[r.value]))},[t,r.value,n]);const l=n?i.includes(JSON.stringify(e[r.value])):i===JSON.stringify(e[r.value]),d=c=>{e.disabled||(s(e),n&&c.preventDefault())};return a.jsxs(In,{onClick:d,disabled:e.disabled,className:p("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item wu-items-start",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(Fe,{checked:l}),a.jsx(Du,{option:e,accessorKey:r})]})},Du=({option:e,accessorKey:t})=>{const n=String(e[t.label]);return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1 wu-text-xs wu-pl-2",children:[e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wm-lock wu-text-sm wu-text-orange-deep"})]})},ku=e=>{const{option:t,handleSelectAll:n,isCheckedAll:s,isPartialSelected:r,...o}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(In,{onSelect:u=>{u.stopPropagation(),u.preventDefault(),n==null||n()},className:p("wu-cursor-pointer wu-text-xs wu-py-2 wu-leading-4 wu-select-item"),dir:o.dir,children:[a.jsx(Fe,{"data-partial":r,checked:s||r,partial:r}),a.jsx(Du,{option:t,accessorKey:o.accessorKey})]});case"group":return a.jsxs(ao,{dir:o.dir,children:[a.jsx(Ut,{className:"wu-text-xs",children:t.label}),t.options.map((u,l)=>h.createElement(Au,{...o,option:u,key:l}))]});case"divider":return a.jsx(An,{className:"wu-mx-4"});default:return a.jsx(Au,{...o,option:t})}},Lm=e=>{let t=0,n=0;const s=[],r=[],o=i=>{i.type==="divider"?t++:i.type==="group"?(n++,i.options.forEach(u=>{o(u)})):(s.push(i),i.disabled||r.push(i))};return e.forEach(i=>{o(i)}),{separators:t,groups:n,enabledOptions:r,totalData:s.length,cleanData:s}},Wm=100,Bm=400,Pu=({data:e,onSelect:t,multiple:n=!1,defaultValue:s,value:r,accessorKey:o,variant:i="flat",dir:u="ltr",placeholder:l,Label:d,virtualizedThreshold:c=Wm,maxHeight:w=Bm,hasGroup:f=!1,Header:m,CustomTrigger:g,selectAll:b,disabled:x,labelPosition:S="top",onScroll:v,maxContentWidth:T,...N})=>{const[C,D]=h.useState(),M=h.useRef(null),[I,k]=h.useState(!1),[F,P]=h.useState(!1),{cleanData:A,enabledOptions:V}=f||b!=null&&b.enable?Lm(e):{cleanData:e,enabledOptions:[]},W=h.useMemo(()=>n&&b!=null&&b.enable&&e.length>0?[{type:"all",[o.label]:b.label||"Select All"},...e]:e,[e,b,n]),_=h.useCallback($=>{const H=$[o.value];if(n)D((pe=[])=>{const de=pe,ge=de.some(X=>X[o.value]===H)?de.filter(X=>X[o.value]!==H):[...de,$];return t==null||t(ge),ge});else{const pe=$;D(pe),t==null||t(pe)}},[n,o.value,t]);h.useEffect(()=>{if(s&&r){console.error("defaultValue and value cannot be used simultaneously");return}!s&&!r&&D(void 0),s!==void 0&&D(s),r!==void 0&&D(r)},[s,r]);const q=W.length>c;h.useEffect(()=>{if(!n)return;const $=b!=null&&b.includeDisabled?(C==null?void 0:C.length)===e.length:(C==null?void 0:C.length)===V.length;k($);const H=(C==null?void 0:C.length)>0&&!$;P(H)},[C,b]);const B=h.useCallback(()=>{const $=I?[]:b!=null&&b.includeDisabled?f?A:e:V;D($),t==null||t($)},[I,n,e,V,t,b]),U=zt(S);return a.jsxs("div",{className:p(U,"wu-flex wu-select-container"),ref:M,dir:u,children:[a.jsxs(so,{children:[a.jsx(Fm,{...N,value:C,multiple:n,variant:i,dir:u,placeholder:l,accessorKey:o,customTriggerChildren:g,id:N.id,disabled:x,selectAll:b,isCheckedAll:I}),a.jsxs(qs,{className:"wu-min-w-[--radix-dropdown-menu-trigger-width] wu-max-w-[calc(100vw-32px)] wu-border-blue-p wu-select-content",role:"listbox",sideOffset:-1,align:"start",id:N.id,style:{maxWidth:T},children:[m,q?a.jsx(Ct,{list:W,containerHeight:w,callback:($,H)=>a.jsx(ku,{option:H,accessorKey:o,multiple:n,onSelect:_,value:C,dir:u,handleSelectAll:B,isCheckedAll:I,isPartialSelected:F}),dir:u}):a.jsx("div",{onScroll:v,style:{maxHeight:w,height:"fit-content",overflow:"auto"},className:"wu-select-list",children:W.map(($,H)=>a.jsx(ku,{option:$,accessorKey:o,multiple:n,onSelect:_,value:C,handleSelectAll:B,isCheckedAll:I,dir:u,isPartialSelected:F},`${H}`))})]})]}),d&&a.jsx(Te,{htmlFor:N.id,className:"wu-select-label",children:d})]})},Xn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],qm=({value:e,onChange:t,min:n=Y.sub(new Date,{years:5}),max:s=Y.add(new Date,{years:1}),placeholder:r="Select a month",Label:o,labelPosition:i="top",disabled:u,id:l,readonly:d,disabledMonths:c=[],...w})=>{const[f,m]=h.useState(null),[g,b]=h.useState(""),[x,S]=h.useState({value:Math.min(new Date().getFullYear(),new Date(s).getFullYear()),label:Math.min(new Date().getFullYear(),new Date(s).getFullYear())}),v=h.useMemo(()=>{const N=new Date(n).getFullYear(),C=new Date(s).getFullYear();return Array.from({length:C-N+1},(D,M)=>({value:C-M,label:C-M}))},[n,s]);h.useEffect(()=>{if(e){const N=new Date(e),C=N.getFullYear(),D=N.getMonth();m({year:C,month:D}),b(`${Xn[D]} ${C}`),S({value:C,label:C})}},[e]);const T=()=>{f&&t&&(t(new Date(f.year,f.month,15)),b(`${Xn[f.month]} ${f.year}`))};return a.jsxs("div",{className:p("wu-flex wu-flex-col wu-items-center",zt(i),i==="top"&&"wu-items-start"),children:[a.jsxs(ze,{children:[a.jsx(Vs,{...w,disabled:u||d,id:l,dir:"ltr",placeholder:r,formattedString:g}),a.jsxs(Oe,{className:"wu-flex wu-flex-col wu-gap-4 wu-p-4 wu-bg-white wu-border-blue-p wu-month-picker-content",align:"start",sideOffset:-1,children:[a.jsx("div",{className:"wu-px-1 wu-mx-auto wu-w-full",children:a.jsx(Pu,{data:v,accessorKey:{value:"value",label:"label"},value:x,onSelect:N=>S(N),multiple:!1,maxHeight:224})}),a.jsx(zm,{year:x==null?void 0:x.value,selectedMonth:f==null?void 0:f.month,selectedYear:f==null?void 0:f.year,onClick:(N,C)=>m({year:C,month:N}),disabledMonths:c}),a.jsx("div",{className:"wu-flex wu-justify-end wu-px-0.5",children:a.jsx(Lt.PopoverClose,{asChild:!0,children:a.jsx(Ce,{onClick:T,children:"Apply"})})})]})]}),o&&a.jsx(Te,{className:"wu-truncate wu-max-w-[120px] wu-min-w-fit wu-select-label",children:o})]})},zm=({year:e,selectedMonth:t,selectedYear:n,onClick:s,disabledMonths:r=[]})=>{const o=new Date,i=o.getFullYear(),u=o.getMonth(),l=h.useMemo(()=>{const d=new Set;return r.forEach(c=>{const w=typeof c=="string"?new Date(c):c;d.add(`${w.getFullYear()}-${w.getMonth()}`)}),d},[r]);return a.jsx("div",{className:"wu-grid wu-grid-cols-3 wu-grid-rows-4 wu-w-fit wu-gap-[1px] wu-bg-[#d9d9d9] wu-border wu-border-[#d9d9d9] wu-month-picker-grid",children:Xn.map((d,c)=>{const w=e===i&&c===u,f=t===c&&n===e;return a.jsx("button",{disabled:l.has(`${e}-${c}`),onClick:()=>s(c,e),className:p("wu-bg-white wu-flex wu-items-center wu-justify-center wu-w-[83px] wu-h-[53px] wu-text-xs wu-transition-colors","hover:wu-bg-gray-25 hover:wu-text-blue-q hover:wu-font-medium","focus:wu-outline-none focus-visible:wu-border focus-visible:wu-border-blue-p/50",w&&"wu-border wu-border-blue-p",f&&"wu-bg-blue-p wu-text-white hover:wu-bg-blue-p/80 hover:wu-text-white wu-font-medium","disabled:wu-bg-gray-20 disabled:wu-text-gray-subtle disabled:hover:wu-bg-gray-20 disabled:hover:wu-text-gray-subtle disabled:hover:wu-font-normal","wu-month-picker-month"),"data-value":`${Xn[c]} ${e}`,"data-month":c,"data-year":e,children:d},d)})})},_u=(e,t,n,s=96)=>{if(e.length===0||s<=0)return[[],[]];const[o,i]=h.useState([]),[u,l]=h.useState([]);return h.useEffect(()=>{const d=()=>{var g,b;const c=((g=t.current)==null?void 0:g.clientWidth)||0,w=((b=n.current)==null?void 0:b.clientWidth)||0,f=c-w,m=Math.floor(f/s);i(e.slice(0,m)),l(e.slice(m))};return d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)}},[e,s]),[o,u]},Vu={wuPrimaryLink:"_wuPrimaryLink_1sy3v_1",wuPrimaryPopoverContent:"_wuPrimaryPopoverContent_1sy3v_8"},$m=e=>{const{Links:t,children:n,className:s,...r}=e,o=h.useMemo(()=>t.map((c,w)=>h.cloneElement(c,{className:p(Vu.wuPrimaryLink,c.props.className,"wu-primary-nav-link"),key:w})),[t]),i=h.useRef(null),u=h.useRef(null),[l,d]=_u(o,i,u);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:p("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-px-2 wu-py-1 wu-bg-white wu-border-b",s),...r,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("nav",{className:"wu-flex wu-items-center wu-justify-start wu-gap-4 wu-primary-nav-left",children:l}),d.length>0&&a.jsxs(ze,{children:[a.jsx(lt,{className:"wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25","aria-label":"more",children:a.jsx("span",{className:"wm-more-vert"})}),a.jsx(Oe,{className:p(Vu.wuPrimaryPopoverContent,"wu-primary-nav-popover-left"),align:"start",sideOffset:12,children:d})]})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("section",{className:"wu-items-center wu-justify-end wu-hidden wu-gap-4 sm:wu-flex wu-primary-nav-right",ref:u,children:n}),a.jsxs(ze,{children:[a.jsx(lt,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Oe,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right",align:"end",sideOffset:4,children:n})]})]})]})})},Gr={wuSecondaryLink:"_wuSecondaryLink_1edl1_1",wuSecondaryNav:"_wuSecondaryNav_1edl1_6"},Hm=e=>{const{Links:t,children:n,className:s,...r}=e,o=h.useMemo(()=>t.map((w,f)=>h.cloneElement(w.link,{key:f,className:p(Gr.wuSecondaryLink,w.link.props.className,"wu-secondary-nav-link-container"),children:a.jsxs(a.Fragment,{children:[h.cloneElement(w.imgOrIcon,{className:p("wu-w-5 wu-h-5 wu-flex wu-items-center wu-justify-center wu-text-lg wu-leading-5",w.imgOrIcon.props.className)}),a.jsx("div",{className:"wu-secondary-nav-link",children:w.link.props.children})]})})),[t]),i=h.useRef(null),u=h.useRef(null),l=h.useRef(null),[d,c]=_u(o,i,l);return a.jsx(a.Fragment,{children:a.jsxs("header",{className:p("wu-flex wu-items-center wu-justify-between wu-gap-4 wu-border-y wu-border-gray-25 wu-h-[50px]",s),...r,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("nav",{className:p(Gr.wuSecondaryNav,"wu-flex wu-items-center wu-justify-start wu-w-full wu-h-full wu-secondary-nav-left"),ref:u,children:d}),c.length>0&&a.jsxs(ze,{children:[a.jsx(lt,{className:"wu-p-1 wu-pb-0 wu-rounded-sm focus:wu-outline-none focus:wu-bg-gray-25","aria-label":"more",children:a.jsx("span",{className:"wm-more-vert"})}),a.jsx(Oe,{className:p(Gr.wuSecondaryNavPopover,"wu-secondary-nav-popover-left"),align:"start",sideOffset:12,children:c})]})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"wu-items-center wu-justify-end wu-hidden sm:wu-flex",ref:l,children:n}),a.jsxs(ze,{children:[a.jsx(lt,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Oe,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right",align:"end",sideOffset:12,children:n})]})]})]})})},Ou=h.forwardRef(({totalRows:e,initialPage:t=0,initialPageSize:n=100,onPageChange:s,className:r,disabled:o=!1,...i},u)=>{const[l,d]=h.useState(t),[c,w]=h.useState(n);h.useEffect(()=>{d(t),w(n)},[t,n]);const f=Math.ceil(e/c),m=l*c+1,g=Math.min((l+1)*c,e),b=Array.from({length:f},(v,T)=>T),x=h.useCallback(v=>{v>=0&&v<f&&(d(v),s==null||s(v))},[f,s]),S=224;return a.jsxs("div",{className:p("wu-flex wu-items-center wu-gap-[2px]",r,"wu-pagination"),...i,role:"navigation",children:[a.jsx(Fu,{label:"Previous page",onClick:()=>x(l-1),disabled:l===0||o,icon:"wm-arrow-back-ios-new",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-prev-btn"}),a.jsx(zr,{name:`${m} - ${g}`,className:"wu-w-[96px] wu-min-w-[96px] wu-pagination-menu",align:"end",disabled:o,children:a.jsx(Vt,{style:{maxHeight:S+"px"},dir:i.dir,children:b.length>100?a.jsx(Ct,{className:"wu-pagination-list",containerHeight:S,list:b,callback:(v,T)=>a.jsxs(Kn,{onSelect:()=>x(T),className:p("wu-py-2",T===l&&"wu-bg-gray-20","wu-pagination-item"),children:[T*c+1," -"," ",Math.min((T+1)*c,e)]},v)}):b.map(v=>a.jsxs(Kn,{onSelect:()=>x(v),className:p(v===l&&"wu-bg-gray-20","wu-py-2 hover:wu-bg-gray-20","wu-pagination-item"),children:[v*c+1," -"," ",Math.min((v+1)*c,e)]},v))})}),a.jsx(Fu,{label:"Next page",onClick:()=>x(l+1),disabled:l===f-1||o,icon:"wm-arrow-forward-ios",className:"hover:wu-bg-gray-20 rtl:wu-rotate-180 wu-next-btn"})]})});Ou.displayName="WuPagination";const Fu=({label:e,onClick:t,disabled:n,icon:s,className:r})=>a.jsx(Ce,{variant:"iconOnly",onClick:t,disabled:n,className:p("wu-w-8 wu-h-8 wu-rounded-xs wu-group disabled:wu-text-zinc-300 disabled:wu-bg-white wu-text-gray-lead focus:wu-bg-color-none",r),"aria-label":e,children:a.jsx("span",{className:p("wu-text-sm",s)})}),Lu=y.forwardRef(({className:e,...t},n)=>a.jsx(qt.Root,{className:p("wu-grid wu-gap-2",e),...t,ref:n}));Lu.displayName=qt.Root.displayName;const Wu=y.forwardRef(({className:e,...t},n)=>a.jsx(qt.Item,{ref:n,className:p("wu-group wu-aspect-square wu-h-4 wu-w-4 wu-rounded-full wu-border wu-border-gray-subtle wu-text-blue-p wu-ring-offset-white disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-border-blue-p hover:wu-bg-gray-20 data-[state=checked]:wu-border-blue-p hover:data-[state=checked]:wu-border-blue-q hover:data-[state=checked]:wu-bg-inherit focus:wu-outline-2 focus:wu-outline-offset-4 focus:wu-outline-blue-soft disabled:hover:wu-border-gray-subtle disabled:wu-hover:bg-gray-20 disabled:wu-bg-gray-20",e),...t,children:a.jsx(qt.Indicator,{className:"wu-flex wu-items-center wu-justify-center",children:a.jsx("div",{className:"wu-w-2 wu-h-2 wu-rounded-full wu-bg-blue-p group-hover:group-data-[state=checked]:wu-bg-blue-q"})})}));Wu.displayName=qt.Item.displayName;const Bu=h.forwardRef((e,t)=>{const{options:n,defaultValue:s,onChange:r,label:o,dir:i,...u}=e;return a.jsxs(Lu,{defaultValue:s,required:u.required,disabled:u.disabled,onValueChange:r,id:u.id,dir:i,name:u.name,className:p("w-fit",u.className),ref:t,style:u.style,children:[a.jsx(Tn,{htmlFor:u.id,className:"wu-text-sm wu-font-normal wu-text-gray-lead wu-leading-6 wu-radio-group-label",children:o}),n.map(l=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-radio-item-container",children:[a.jsx(Wu,{value:l.value,id:l.value,disabled:l.disabled,required:l.required,"aria-label":l.value,className:"wu-peer wu-radio-item"}),a.jsx(Tn,{htmlFor:l.value,className:p(l.required&&"after:wu-content-['*'] after:wu-mx-[2px] after:wu-text-rose-500","wu-radio-item-label"),children:l.label})]},l.value))]})});Bu.displayName="WuRadioGroup";const Um=e=>{const{children:t,...n}=e;return a.jsxs(Vt,{...n,role:"complementary","aria-label":"ScrollArea",children:[t,a.jsx(qr,{orientation:"horizontal"})]})},qu=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...s},r)=>a.jsx(ka.Root,{ref:r,decorative:n,orientation:t,className:p("wu-shrink-0 wu-bg-gray-40",t==="horizontal"?"wu-h-[1px] wu-w-full":"wu-h-full wu-w-[1px]",e),...s}));qu.displayName=ka.Root.displayName;function zu({className:e,...t}){return a.jsx("div",{className:p("animate-pulse rounded-md bg-muted",e),...t})}const Kr=768;function Yr(){const[e,t]=y.useState(void 0);return y.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Kr-1}px)`),s=()=>{t(window.innerWidth<Kr)};return n.addEventListener("change",s),t(window.innerWidth<Kr),()=>n.removeEventListener("change",s)},[]),!!e}const jm="sidebar_state",Gm=3600*24*7,Km="256px",Ym="256px",Xm="3rem",Zm="b",$u=y.createContext(null);function tt(){const e=y.useContext($u);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Hu=y.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:s,style:r,children:o,...i},u)=>{const l=Yr(),[d,c]=y.useState(!1),[w,f]=y.useState(l?!0:e),m=t??w,g=y.useCallback(v=>{const T=typeof v=="function"?v(m):v;n?n(T):f(T),document.cookie=`${jm}=${T}; path=/; max-age=${Gm}`},[n,m]),b=y.useCallback(()=>l?c(v=>!v):g(v=>!v),[l,g,c]);y.useEffect(()=>{const v=T=>{T.key===Zm&&(T.metaKey||T.ctrlKey)&&(T.preventDefault(),b())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[b]);const x=m?"expanded":"collapsed",S=y.useMemo(()=>({state:x,open:m,setOpen:g,isMobile:l,openMobile:d,setOpenMobile:c,toggleSidebar:b}),[x,m,g,l,d,c,b]);return a.jsx($u.Provider,{value:S,children:a.jsx($a,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":Km,"--sidebar-width-icon":Xm,...r},className:p("wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full",s),ref:u,...i,children:o})})})});Hu.displayName="SidebarProvider";const Uu=y.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:s,children:r,...o},i)=>{const{isMobile:u,state:l,openMobile:d,setOpenMobile:c}=tt();return n==="none"?a.jsx("div",{className:p("wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col",s),ref:i,...o,children:r}):u?a.jsx(fo,{open:d,onOpenChange:c,...o,children:a.jsx(zs,{"data-sidebar":"sidebar","data-mobile":"true",className:"wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden",style:{"--sidebar-width":Ym},side:e,children:a.jsx("div",{className:"wu-flex wu-flex-col wu-w-full wu-h-full",children:r})})}):a.jsxs("div",{ref:i,className:"wu-hidden wu-group wu-peer md:wu-block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[a.jsx("div",{className:p("wu-relative wu-w-[--sidebar-width] wu-bg-transparent wu-transition-[width] wu-duration-150 wu-ease-linear","group-data-[collapsible=offcanvas]:wu-w-0","group-data-[side=right]:wu-rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon]")}),a.jsx("div",{className:p("wu-fixed wu-inset-y-0 wu-z-20 wu-hidden wu-h-svh wu-w-[--sidebar-width] wu-transition-[left,right,width] wu-duration-150 wu-ease-linear md:wu-flex",e==="left"?"wu-left-0 group-data-[collapsible=offcanvas]:wu-left-[calc(var(--sidebar-width)*-1)]":"wu-right-0 group-data-[collapsible=offcanvas]:wu-right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"wu-p-2 group-data-[collapsible=icon]:wu-w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:wu-w-[--sidebar-width-icon] group-data-[side=left]:wu-border-r group-data-[side=right]:wu-border-l",s),...o,children:a.jsx("div",{"data-sidebar":"sidebar",className:"wu-flex wu-h-full wu-w-full wu-flex-col wu-bg-[#eef3fb] group-data-[variant=floating]:wu-rounded-lg group-data-[variant=floating]:wu-border group-data-[variant=floating]:wu-border-sidebar-border group-data-[variant=floating]:wu-shadow",children:r})})]})});Uu.displayName="Sidebar";const ju=y.forwardRef(({className:e,onClick:t,children:n,...s},r)=>{const{toggleSidebar:o}=tt();return a.jsxs(Nt,{ref:r,"data-sidebar":"trigger",variant:"secondary",className:p("wu-h-8 wu-w-8 wu-min-w-0 wu-p-0 wu-text-2xl wu-font-light hover:wu-bg-blue-sidebarHover wu-text-blue-q",e),onClick:i=>{t==null||t(i),o()},...s,children:[n,a.jsx("span",{className:"wu-sr-only",children:"Toggle Sidebar"})]})});ju.displayName="SidebarTrigger";const Jm=y.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:s}=tt();return a.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:p("wu-absolute wu-inset-y-0 wu-z-20 wu-hidden wu-w-4 wu-translate-x-1/2 wu-transition-all wu-ease-linear after:wu-absolute after:wu-inset-y-0 after:wu-left-1/2 after:wu-w-[2px] group-data-[side=left]:wu-right-4 group-data-[side=right]:wu-left-0 sm:wu-flex","[[data-side=left]_&]:wu-cursor-w-resize [[data-side=right]_&]:wu-cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:wu-cursor-e-resize [[data-side=right][data-state=collapsed]_&]:wu-cursor-w-resize","group-data-[collapsible=offcanvas]:wu-translate-x-0 group-data-[collapsible=offcanvas]:after:wu-left-full","[[data-side=left][data-collapsible=offcanvas]_&]:wu-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:wu-left-2",e),...t})});Jm.displayName="SidebarRail";const Gu=y.forwardRef(({className:e,...t},n)=>a.jsx("main",{ref:n,className:p("wu-relative wu-flex wu-w-full wu-flex-1 wu-flex-col","md:peer-data-[variant=inset]:wu-m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:wu-ml-2 md:peer-data-[variant=inset]:wu-ml-0 md:peer-data-[variant=inset]:wu-rounded-xl md:peer-data-[variant=inset]:wu-shadow",e),...t}));Gu.displayName="SidebarInset";const Qm=y.forwardRef(({className:e,...t},n)=>a.jsx(ks,{ref:n,"data-sidebar":"input",className:p("wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2",e),...t}));Qm.displayName="SidebarInput";const Ku=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"header",className:p("wu-flex wu-flex-col wu-gap-2 wu-p-2",e),...t}));Ku.displayName="SidebarHeader";const Yu=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"footer",className:p("wu-flex wu-flex-col wu-gap-2 wu-pb-2",e),...t}));Yu.displayName="SidebarFooter";const Rm=y.forwardRef(({className:e,...t},n)=>a.jsx(qu,{ref:n,"data-sidebar":"separator",className:p("wu-mx-2 wu-w-auto",e),...t}));Rm.displayName="SidebarSeparator";const Xu=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"content",className:p("wu-flex wu-min-h-0 wu-flex-1 wu-flex-col wu-gap-2 wu-overflow-auto group-data-[collapsible=icon]:wu-overflow-hidden",e),...t}));Xu.displayName="SidebarContent";const Zu=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group",className:p("wu-relative wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-p-2",e),...t}));Zu.displayName="SidebarGroup";const Ju=y.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const r=t?xt.Slot:"div";return a.jsx(r,{ref:s,"data-sidebar":"group-label",className:p("wu-flex wu-h-8 wu-shrink-0 wu-items-center wu-rounded-md wu-px-2 wu-text-xs wu-font-medium wu-outline-none wu-transition-[margin,opacity] wu-duration-150 wu-ease-linear focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","group-data-[collapsible=icon]:wu-opacity-0",e),...n})});Ju.displayName="SidebarGroupLabel";const eg=y.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const r=t?xt.Slot:"button";return a.jsx(r,{ref:s,"data-sidebar":"group-action",className:p("wu-absolute wu-right-3 wu-top-3.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","after:wu-absolute after:wu-inset-2 after:md:wu-hidden","group-data-[collapsible=icon]:wu-hidden",e),...n})});eg.displayName="SidebarGroupAction";const Qu=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"group-content",className:p("wu-w-full wu-text-sm",e),...t}));Qu.displayName="SidebarGroupContent";const Xr=y.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu",className:p("wu-flex wu-w-full wu-min-w-0 wu-flex-col wu-gap-1",e),...t}));Xr.displayName="SidebarMenu";const Ru=y.forwardRef(({className:e,...t},n)=>a.jsx("li",{ref:n,"data-sidebar":"menu-item",className:p("wu-group/menu-item wu-relative",e),...t}));Ru.displayName="SidebarMenuItem";const tg=_e.cva("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-p-2 wu-text-left wu-text-sm wu-outline-none wu-transition-[width,height,padding] focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:wu-pr-8 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 data-[active=true]:wu-font-medium group-data-[collapsible=icon]:!wu-size-8 group-data-[collapsible=icon]:!wu-p-2 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0",{variants:{variant:{default:"",outline:""},size:{default:"wu-h-8 wu-text-sm",sm:"wu-h-7 wu-text-xs",lg:"wu-h-12 wu-text-sm group-data-[collapsible=icon]:!wu-p-0"}},defaultVariants:{variant:"default",size:"default"}}),el=y.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:s="default",tooltip:r,className:o,...i},u)=>{const l=e?xt.Slot:"button",{isMobile:d,state:c}=tt(),w=a.jsx(l,{ref:u,"data-sidebar":"menu-button","data-size":s,"data-active":t,className:p(tg({variant:n,size:s}),o),...i});return r?(typeof r=="string"&&(r={children:r}),a.jsxs(Ha,{children:[a.jsx(Ua,{asChild:!0,children:w}),a.jsx(Ps,{side:"right",align:"center",hidden:c!=="collapsed"||d,...r})]})):w});el.displayName="SidebarMenuButton";const ng=y.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...s},r)=>{const o=t?xt.Slot:"button";return a.jsx(o,{ref:r,"data-sidebar":"menu-action",className:p("wu-absolute wu-right-1 wu-top-1.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","after:wu-absolute after:wu-inset-2 after:md:wu-hidden","peer-data-[size=sm]/menu-button:wu-top-1","peer-data-[size=default]/menu-button:wu-top-1.5","peer-data-[size=lg]/menu-button:wu-top-2.5","group-data-[collapsible=icon]:wu-hidden",n&&"group-focus-within/menu-item:wu-opacity-100 group-hover/menu-item:wu-opacity-100 data-[state=open]:wu-opacity-100 md:wu-opacity-0",e),...s})});ng.displayName="SidebarMenuAction";const sg=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:p("wu-pointer-events-none wu-absolute wu-right-1 wu-flex wu-h-5 wu-min-w-5 wu-select-none wu-items-center wu-justify-center wu-rounded-md wu-px-1 wu-text-xs wu-font-medium wu-tabular-nums","","peer-data-[size=sm]/menu-button:wu-top-1","peer-data-[size=default]/menu-button:wu-top-1.5","peer-data-[size=lg]/menu-button:wu-top-2.5","group-data-[collapsible=icon]:wu-hidden",e),...t}));sg.displayName="SidebarMenuBadge";const rg=y.forwardRef(({className:e,showIcon:t=!1,...n},s)=>{const r=y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.jsxs("div",{ref:s,"data-sidebar":"menu-skeleton",className:p("wu-flex wu-h-8 wu-items-center wu-gap-2 wu-rounded-md wu-px-2",e),...n,children:[t&&a.jsx(zu,{className:"wu-rounded-md wu-size-4","data-sidebar":"menu-skeleton-icon"}),a.jsx(zu,{className:"wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});rg.displayName="SidebarMenuSkeleton";const ag=y.forwardRef(({className:e,...t},n)=>a.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:p("wu-mx-3.5 wu-flex wu-min-w-0 wu-translate-x-px wu-flex-col wu-gap-1 wu-border-l wu-px-2.5 wu-py-0.5","group-data-[collapsible=icon]:wu-hidden",e),...t}));ag.displayName="SidebarMenuSub";const og=y.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));og.displayName="SidebarMenuSubItem";const ig=y.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:s,...r},o)=>{const i=e?xt.Slot:"a";return a.jsx(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:p("wu-flex wu-h-7 wu-min-w-0 wu-translate-x-px wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-px-2 wu-outline-none focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0","data-[active=true]:wu-bg-sidebar-accent data-[active=true]:wu-text-sidebar-accent-foreground",t==="sm"&&"wu-text-xs",t==="md"&&"wu-text-sm","group-data-[collapsible=icon]:wu-hidden",s),...r})});ig.displayName="SidebarMenuSubButton";const tl={};function nt(e,t){const n=y.useRef(tl);return n.current===tl&&(n.current=e(t)),n}const Zr=y[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],ug=Zr&&Zr!==y.useLayoutEffect?Zr:e=>e();function he(e){const t=nt(lg).current;return t.next=e,ug(t.effect),t.trampoline}function lg(){const e={next:void 0,callback:cg,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function cg(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}function tn(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(s=>n.searchParams.append("args[]",s)),`Base UI error #${e}; visit ${n} for the full message.`}function Zn(e,t,n,s){const r=nt(nl).current;return wg(r,e,t,n,s)&&sl(r,[e,t,n,s]),r.callback}function dg(e){const t=nt(nl).current;return fg(t,e)&&sl(t,e),t.callback}function nl(){return{callback:null,cleanup:null,refs:[]}}function wg(e,t,n,s,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==s||e.refs[3]!==r}function fg(e,t){return e.refs.length!==t.length||e.refs.some((n,s)=>n!==t[s])}function sl(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const s=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const o=t[r];if(o!=null)switch(typeof o){case"function":{const i=o(n);typeof i=="function"&&(s[r]=i);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const o=t[r];if(o!=null)switch(typeof o){case"function":{const i=s[r];typeof i=="function"?i():o(null);break}case"object":{o.current=null;break}}}}}}}const pg=parseInt(y.version,10);function hg(e){return pg>=e}function rl(e){if(!y.isValidElement(e))return null;const t=e,n=t.props;return(hg(19)?n==null?void 0:n.ref:t.ref)??null}function Jr(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function mg(e,t){const n={};for(const s in e){const r=e[s];if(t!=null&&t.hasOwnProperty(s)){const o=t[s](r);o!=null&&Object.assign(n,o);continue}r===!0?n[`data-${s.toLowerCase()}`]="":r&&(n[`data-${s.toLowerCase()}`]=r.toString())}return n}function gg(e,t){return typeof e=="function"?e(t):e}function bg(e,t){return typeof e=="function"?e(t):e}const nn={};function al(e,t,n,s,r){let o={...Qr(e,nn)};return t&&(o=Jn(o,t)),n&&(o=Jn(o,n)),s&&(o=Jn(o,s)),o}function yg(e){if(e.length===0)return nn;if(e.length===1)return Qr(e[0],nn);let t={...Qr(e[0],nn)};for(let n=1;n<e.length;n+=1)t=Jn(t,e[n]);return t}function Jn(e,t){return ol(t)?t(e):xg(e,t)}function xg(e,t){if(!t)return e;for(const n in t){const s=t[n];switch(n){case"style":{e[n]=Jr(e.style,s);break}case"className":{e[n]=il(e.className,s);break}default:vg(n,s)?e[n]=Ng(e[n],s):e[n]=s}}return e}function vg(e,t){const n=e.charCodeAt(0),s=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&s===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function ol(e){return typeof e=="function"}function Qr(e,t){return ol(e)?e(t):e??nn}function Ng(e,t){return t?e?n=>{if(Sg(n)){const r=n;Rr(r);const o=t(r);return r.baseUIHandlerPrevented||e==null||e(r),o}const s=t(n);return e==null||e(n),s}:t:e}function Rr(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function il(e,t){return t?e?t+" "+e:t:e}function Sg(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Me(){}const Ue=Object.freeze({});function st(e,t,n={}){const s=t.render,r=Cg(t,n);if(n.enabled===!1)return null;const o=n.state??Ue;return Eg(e,s,r,o)}function Cg(e,t={}){const{className:n,style:s,render:r}=e,{state:o=Ue,ref:i,props:u,stateAttributesMapping:l,enabled:d=!0}=t,c=d?gg(n,o):void 0,w=d?bg(s,o):void 0,f=d?mg(o,l):Ue,m=d?Jr(f,Array.isArray(u)?yg(u):u)??Ue:Ue;return typeof document<"u"&&(d?Array.isArray(i)?m.ref=dg([m.ref,rl(r),...i]):m.ref=Zn(m.ref,rl(r),i):Zn(null,null)),d?(c!==void 0&&(m.className=il(m.className,c)),w!==void 0&&(m.style=Jr(m.style,w)),m):Ue}const Tg=Symbol.for("react.lazy");function Eg(e,t,n,s){if(t){if(typeof t=="function")return t(n,s);const r=al(n,t.props);r.ref=n.ref;let o=t;if((o==null?void 0:o.$$typeof)===Tg&&(o=y.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!y.isValidElement(o))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
|
|
16
16
|
`));return y.cloneElement(o,r)}if(e&&typeof e=="string")return Mg(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":tn(8))}function Mg(e,t){return e==="button"?h.createElement("button",{type:"button",...t,key:t.key}):e==="img"?h.createElement("img",{alt:"",...t,key:t.key}):y.createElement(e,t)}function ul({controlled:e,default:t,name:n,state:s="value"}){const{current:r}=y.useRef(e!==void 0),[o,i]=y.useState(t),u=r?e:o;if(process.env.NODE_ENV!=="production"){y.useEffect(()=>{r!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${r?"":"un"}controlled ${s} state of ${n} to be ${r?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
17
17
|
`))},[s,n,e]);const{current:d}=y.useRef(t);y.useEffect(()=>{!r&&JSON.stringify(d)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${s} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
18
|
-
`))},[JSON.stringify(t)])}const l=y.useCallback(d=>{r||i(d)},[]);return[u,l]}const re=typeof document<"u"?y.useLayoutEffect:()=>{},ht={...y};let ll=0;function Ig(e,t="mui"){const[n,s]=y.useState(e),r=e||n;return y.useEffect(()=>{n==null&&(ll+=1,s(`${t}-${ll}`))},[n,t]),r}const cl=ht.useId;function Ag(e,t){if(cl!==void 0){const n=cl();return e??(t?`${t}-${n}`:n)}return Ig(e,t)}function dl(e){return Ag(e,"base-ui")}const Qn="none",Dg="trigger-press",ea="input-change",sn="input-clear",Rn="input-blur",ta="input-paste",rn="keyboard";function Ie(e,t,n,s){let r=!1,o=!1;const i=s??Ue;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){o=!0},get isCanceled(){return r},get isPropagationAllowed(){return o},trigger:n,...i}}function an(e,t,n){const s=Ue;return{reason:e,event:t??new Event("base-ui"),...s}}const kg=[];function es(e){y.useEffect(e,kg)}const ts=null;let wl=globalThis.requestAnimationFrame;class Pg{constructor(){Ne(this,"callbacks",[]);Ne(this,"callbacksCount",0);Ne(this,"nextId",1);Ne(this,"startId",1);Ne(this,"isScheduled",!1);Ne(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,s=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,s>0)for(let o=0;o<n.length;o+=1)(r=n[o])==null||r.call(n,t)})}request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const s=process.env.NODE_ENV!=="production"&&wl!==requestAnimationFrame&&(wl=requestAnimationFrame,!0);return(!this.isScheduled||s)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const ns=new Pg;class oe{constructor(){Ne(this,"currentId",ts);Ne(this,"cancel",()=>{this.currentId!==ts&&(ns.cancel(this.currentId),this.currentId=ts)});Ne(this,"disposeEffect",()=>this.cancel)}static create(){return new oe}static request(t){return ns.request(t)}static cancel(t){return ns.cancel(t)}request(t){this.cancel(),this.currentId=ns.request(()=>{this.currentId=ts,t()})}}function fl(){const e=nt(oe.create).current;return es(e.disposeEffect),e}function _g(e){return e==null?e:"current"in e?e.current:e}let on=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Vg={[on.startingStyle]:""},Og={[on.endingStyle]:""},pl={transitionStatus(e){return e==="starting"?Vg:e==="ending"?Og:null}};function hl(e,t=!1,n=!0){const s=fl();return he((r,o=null)=>{s.cancel();function i(){Pa.flushSync(r)}const u=_g(e);if(u==null)return;const l=u;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)r();else{let d=function(){const w=on.startingStyle;if(!l.hasAttribute(w)){s.request(c);return}const f=new MutationObserver(()=>{l.hasAttribute(w)||(f.disconnect(),c())});f.observe(l,{attributes:!0,attributeFilter:[w]}),o==null||o.addEventListener("abort",()=>f.disconnect(),{once:!0})},c=function(){Promise.all(l.getAnimations().map(w=>w.finished)).then(()=>{o!=null&&o.aborted||i()}).catch(()=>{const w=l.getAnimations();if(n){if(o!=null&&o.aborted)return;i()}else w.length>0&&w.some(f=>f.pending||f.playState!=="finished")&&c()})};if(t){d();return}s.request(c)}})}function Fg(e,t=!1,n=!1){const[s,r]=y.useState(e&&t?"idle":void 0),[o,i]=y.useState(e);return e&&!o&&(i(!0),r("starting")),!e&&o&&s!=="ending"&&!n&&r("ending"),!e&&!o&&s==="ending"&&r(void 0),re(()=>{if(!e&&o&&s!=="ending"&&n){const u=oe.request(()=>{r("ending")});return()=>{oe.cancel(u)}}},[e,o,s,n]),re(()=>{if(!e||t)return;const u=oe.request(()=>{r(void 0)});return()=>{oe.cancel(u)}},[t,e]),re(()=>{if(!e||!t)return;e&&o&&s!=="idle"&&r("starting");const u=oe.request(()=>{r("idle")});return()=>{oe.cancel(u)}},[t,e,o,r,s]),y.useMemo(()=>({mounted:o,setMounted:i,transitionStatus:s}),[o,s])}function Lg(e){const{open:t,defaultOpen:n,onOpenChange:s,disabled:r}=e,o=t!==void 0,[i,u]=ul({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:l,setMounted:d,transitionStatus:c}=Fg(i,!0,!0),[w,f]=y.useState(i),[{height:m,width:g},b]=y.useState({height:void 0,width:void 0}),x=dl(),[S,v]=y.useState(),T=S??x,[N,C]=y.useState(!1),[D,M]=y.useState(!1),I=y.useRef(null),k=y.useRef(null),F=y.useRef(null),P=y.useRef(null),A=hl(P,!1),V=he(W=>{const _=!i,q=Ie(Dg,W.nativeEvent);if(s(_,q),q.isCanceled)return;const B=P.current;k.current==="css-animation"&&B!=null&&B.style.removeProperty("animation-name"),!N&&!D&&(k.current!=null&&k.current!=="css-animation"&&!l&&_&&d(!0),k.current==="css-animation"&&(!w&&_&&f(!0),!l&&_&&d(!0))),u(_),k.current==="none"&&l&&!_&&d(!1)});return re(()=>{o&&k.current==="none"&&!D&&!i&&d(!1)},[o,D,i,t,d]),y.useMemo(()=>({abortControllerRef:I,animationTypeRef:k,disabled:r,handleTrigger:V,height:m,mounted:l,open:i,panelId:T,panelRef:P,runOnceAnimationsFinish:A,setDimensions:b,setHiddenUntilFound:C,setKeepMounted:M,setMounted:d,setOpen:u,setPanelIdState:v,setVisible:f,transitionDimensionRef:F,transitionStatus:c,visible:w,width:g}),[I,k,r,V,m,l,i,T,P,A,b,C,M,d,u,f,F,c,w,g])}const na=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(na.displayName="CollapsibleRootContext");function ml(){const e=y.useContext(na);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.":tn(15));return e}let un=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=on.startingStyle]="startingStyle",e[e.endingStyle=on.endingStyle]="endingStyle",e})({}),Wg=(function(e){return e.panelOpen="data-panel-open",e})({});const Bg={[un.open]:""},qg={[un.closed]:""},zg={open(e){return e?{[Wg.panelOpen]:""}:null}},gl={...{open(e){return e?Bg:qg}},...pl},bl=y.forwardRef(function(t,n){const{render:s,className:r,defaultOpen:o=!1,disabled:i=!1,onOpenChange:u,open:l,...d}=t,c=he(u),w=Lg({open:l,defaultOpen:o,onOpenChange:c,disabled:i}),f=y.useMemo(()=>({open:w.open,disabled:w.disabled,transitionStatus:w.transitionStatus}),[w.open,w.disabled,w.transitionStatus]),m=y.useMemo(()=>({...w,onOpenChange:c,state:f}),[w,c,f]),g=st("div",t,{state:f,ref:n,props:d,stateAttributesMapping:gl});return a.jsx(na.Provider,{value:m,children:g})});process.env.NODE_ENV!=="production"&&(bl.displayName="CollapsibleRoot");function yl(){return typeof window<"u"}function sa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $g(e){return yl()?e instanceof Element||e instanceof sa(e).Element:!1}function Hg(e){return yl()?e instanceof HTMLElement||e instanceof sa(e).HTMLElement:!1}let ra;process.env.NODE_ENV!=="production"&&(ra=new Set);function xl(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ra.has(t)||(ra.add(t),console.error(`Base UI: ${t}`))}}const vl=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(vl.displayName="CompositeRootContext");function Ug(e=!1){const t=y.useContext(vl);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":tn(16));return t}function jg(e){const{focusableWhenDisabled:t,disabled:n,composite:s=!1,tabIndex:r=0,isNativeButton:o}=e,i=s&&t!==!1,u=s&&t===!1;return{props:y.useMemo(()=>{const d={onKeyDown(c){n&&t&&c.key!=="Tab"&&c.preventDefault()}};return s||(d.tabIndex=r,!o&&n&&(d.tabIndex=t?r:-1)),(o&&(t||i)||!o&&n)&&(d["aria-disabled"]=n),o&&(!t||u)&&(d.disabled=n),d},[s,n,t,i,u,o,r])}}function aa(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:s=0,native:r=!0}=e,o=y.useRef(null),i=Ug(!0)!==void 0,u=he(()=>{const f=o.current;return!!((f==null?void 0:f.tagName)==="A"&&(f!=null&&f.href))}),{props:l}=jg({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:s,isNativeButton:r});process.env.NODE_ENV!=="production"&&y.useEffect(()=>{var m,g;if(!o.current)return;const f=o.current.tagName==="BUTTON";if(r){if(!f){const b=((m=ht.captureOwnerStack)==null?void 0:m.call(ht))||"";xl(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${b}`)}}else if(f){const b=((g=ht.captureOwnerStack)==null?void 0:g.call(ht))||"";xl(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${b}`)}},[r]);const d=y.useCallback(()=>{const f=o.current;Gg(f)&&i&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,i]);re(d,[d]);const c=y.useCallback((f={})=>{const{onClick:m,onMouseDown:g,onKeyUp:b,onKeyDown:x,onPointerDown:S,...v}=f;return al({type:r?"button":void 0,onClick(N){if(t){N.preventDefault();return}m==null||m(N)},onMouseDown(N){t||g==null||g(N)},onKeyDown(N){if(t||(Rr(N),x==null||x(N)),N.baseUIHandlerPrevented)return;const C=N.target===N.currentTarget&&!r&&!u()&&!t,D=N.key==="Enter",M=N.key===" ";C&&((M||D)&&N.preventDefault(),D&&(m==null||m(N)))},onKeyUp(N){t||(Rr(N),b==null||b(N)),!N.baseUIHandlerPrevented&&N.target===N.currentTarget&&!r&&!t&&N.key===" "&&(m==null||m(N))},onPointerDown(N){if(t){N.preventDefault();return}S==null||S(N)}},r?void 0:{role:"button"},l,v)},[t,l,r,u]),w=he(f=>{o.current=f,d()});return{getButtonProps:c,buttonRef:w}}function Gg(e){return Hg(e)&&e.tagName==="BUTTON"}const Kg={...zg,...pl},Nl=y.forwardRef(function(t,n){const{panelId:s,open:r,handleTrigger:o,state:i,disabled:u}=ml(),{className:l,disabled:d=u,id:c,render:w,nativeButton:f=!0,...m}=t,{getButtonProps:g,buttonRef:b}=aa({disabled:d,focusableWhenDisabled:!0,native:f}),x=y.useMemo(()=>({"aria-controls":r?s:void 0,"aria-expanded":r,onClick:o}),[s,r,o]);return st("button",t,{state:i,ref:[n,b],props:[x,m,g],stateAttributesMapping:Kg})});process.env.NODE_ENV!=="production"&&(Nl.displayName="CollapsibleTrigger");let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function Sl(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");oa.has(t)||(oa.add(t),console.warn(`Base UI: ${t}`))}}let Yg=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function Xg(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:s,height:r,hiddenUntilFound:o,keepMounted:i,id:u,mounted:l,onOpenChange:d,open:c,panelRef:w,runOnceAnimationsFinish:f,setDimensions:m,setMounted:g,setOpen:b,setVisible:x,transitionDimensionRef:S,visible:v,width:T}=e,N=y.useRef(!1),C=y.useRef(null),D=y.useRef(c),M=y.useRef(c),I=fl(),k=y.useMemo(()=>n.current==="css-animation"?!v:!c&&!l,[c,l,v,n]),F=he(A=>{if(!A)return;if(n.current==null||S.current==null){const _=getComputedStyle(A),q=_.animationName!=="none"&&_.animationName!=="",B=_.transitionDuration!=="0s"&&_.transitionDuration!=="";q&&B?process.env.NODE_ENV!=="production"&&Sl("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.","Only one of either animation type should be used."):_.animationName==="none"&&_.transitionDuration!=="0s"?n.current="css-transition":_.animationName!=="none"&&_.transitionDuration==="0s"?n.current="css-animation":n.current="none",A.getAttribute(Yg.orientation)==="horizontal"||_.transitionProperty.indexOf("width")>-1?S.current="width":S.current="height"}if(n.current!=="css-transition")return;(r===void 0||T===void 0)&&(m({height:A.scrollHeight,width:A.scrollWidth}),M.current&&A.style.setProperty("transition-duration","0s"));let V=-1,W=-1;return V=oe.request(()=>{M.current=!1,W=oe.request(()=>{setTimeout(()=>{A.style.removeProperty("transition-duration")})})}),()=>{oe.cancel(V),oe.cancel(W)}}),P=Zn(s,w,F);return re(()=>{if(n.current!=="css-transition")return;const A=w.current;if(!A)return;let V=-1;if(t.current!=null&&(t.current.abort(),t.current=null),c){const W={"justify-content":A.style.justifyContent,"align-items":A.style.alignItems,"align-content":A.style.alignContent,"justify-items":A.style.justifyItems};Object.keys(W).forEach(_=>{A.style.setProperty(_,"initial","important")}),!M.current&&!i&&A.setAttribute(un.startingStyle,""),m({height:A.scrollHeight,width:A.scrollWidth}),V=oe.request(()=>{Object.entries(W).forEach(([_,q])=>{q===""?A.style.removeProperty(_):A.style.setProperty(_,q)})})}else{if(A.scrollHeight===0&&A.scrollWidth===0)return;m({height:A.scrollHeight,width:A.scrollWidth});const W=new AbortController;t.current=W;const _=W.signal;let q=null;const B=un.endingStyle;return q=new MutationObserver(U=>{U.some(H=>H.type==="attributes"&&H.attributeName===B)&&(q==null||q.disconnect(),q=null,f(()=>{m({height:0,width:0}),A.style.removeProperty("content-visibility"),g(!1),t.current===W&&(t.current=null)},_))}),q.observe(A,{attributes:!0,attributeFilter:[B]}),()=>{q==null||q.disconnect(),I.cancel(),t.current===W&&(W.abort(),t.current=null)}}return()=>{oe.cancel(V)}},[t,n,I,o,i,l,c,w,f,m,g]),re(()=>{if(n.current!=="css-animation")return;const A=w.current;A&&(C.current=A.style.animationName||C.current,A.style.setProperty("animation-name","none"),m({height:A.scrollHeight,width:A.scrollWidth}),!D.current&&!N.current&&A.style.removeProperty("animation-name"),c?(t.current!=null&&(t.current.abort(),t.current=null),g(!0),x(!0)):(t.current=new AbortController,f(()=>{g(!1),x(!1),t.current=null},t.current.signal)))},[t,n,c,w,f,m,g,x,v]),es(()=>{const A=oe.request(()=>{D.current=!1});return()=>oe.cancel(A)}),re(()=>{if(!o)return;const A=w.current;if(!A)return;let V=-1,W=-1;return c&&N.current&&(A.style.transitionDuration="0s",m({height:A.scrollHeight,width:A.scrollWidth}),V=oe.request(()=>{N.current=!1,W=oe.request(()=>{setTimeout(()=>{A.style.removeProperty("transition-duration")})})})),()=>{oe.cancel(V),oe.cancel(W)}},[o,c,w,m]),re(()=>{const A=w.current;A&&o&&k&&(A.setAttribute("hidden","until-found"),n.current==="css-transition"&&A.setAttribute(un.startingStyle,""))},[o,k,n,w]),y.useEffect(function(){const V=w.current;if(!V)return;function W(_){N.current=!0,b(!0),d(!0,Ie(Qn,_))}return V.addEventListener("beforematch",W),()=>{V.removeEventListener("beforematch",W)}},[d,w,b]),y.useMemo(()=>({props:{hidden:k,id:u,ref:P}}),[k,u,P])}let Cl=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});function Zg(e){const{enabled:t=!0,open:n,ref:s,onComplete:r}=e,o=he(r),i=hl(s,n,!1);y.useEffect(()=>{if(!t)return;const u=new AbortController;return i(o,u.signal),()=>{u.abort()}},[t,n,o,i])}const Tl=y.forwardRef(function(t,n){const{className:s,hiddenUntilFound:r,keepMounted:o,render:i,id:u,...l}=t;process.env.NODE_ENV!=="production"&&re(()=>{r&&o===!1&&Sl("The `keepMounted={false}` prop on a Collapsible will be ignored when using `hiddenUntilFound` since it requires the Panel to remain mounted even when closed.")},[r,o]);const{abortControllerRef:d,animationTypeRef:c,height:w,mounted:f,onOpenChange:m,open:g,panelId:b,panelRef:x,runOnceAnimationsFinish:S,setDimensions:v,setHiddenUntilFound:T,setKeepMounted:N,setMounted:C,setPanelIdState:D,setOpen:M,setVisible:I,state:k,transitionDimensionRef:F,visible:P,width:A,transitionStatus:V}=ml(),W=r??!1,_=o??!1;re(()=>{if(u)return D(u),()=>{D(void 0)}},[u,D]),re(()=>{T(W)},[T,W]),re(()=>{N(_)},[N,_]);const{props:q}=Xg({abortControllerRef:d,animationTypeRef:c,externalRef:n,height:w,hiddenUntilFound:W,id:b,keepMounted:_,mounted:f,onOpenChange:m,open:g,panelRef:x,runOnceAnimationsFinish:S,setDimensions:v,setMounted:C,setOpen:M,setVisible:I,transitionDimensionRef:F,visible:P,width:A});Zg({open:g&&V==="idle",ref:x,onComplete(){g&&v({height:void 0,width:void 0})}});const B=y.useMemo(()=>({...k,transitionStatus:V}),[k,V]),U=st("div",t,{state:B,ref:[n,x],props:[q,{style:{[Cl.collapsiblePanelHeight]:w===void 0?"auto":`${w}px`,[Cl.collapsiblePanelWidth]:A===void 0?"auto":`${A}px`}},l],stateAttributesMapping:gl});return _||W||!_&&f?U:null});process.env.NODE_ENV!=="production"&&(Tl.displayName="CollapsiblePanel");const Jg=({children:e,Sidebar:t,className:n,defaultOpen:s=!0,open:r,onOpenChange:o,style:i})=>a.jsxs(Hu,{defaultOpen:s,open:r,onOpenChange:o,children:[a.jsxs(Uu,{variant:"sidebar",collapsible:"icon",className:p("wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none",n),style:i,role:"complementary",children:[a.jsx(Ku,{className:"wu-py-2",children:a.jsx(El,{})}),t]}),a.jsx(Gu,{className:"wu-contain-inline-size",children:e})]}),El=e=>{const{state:t,isMobile:n,openMobile:s}=tt();return a.jsx(ju,{...e,children:a.jsx($r,{showMenu:n?s:t==="expanded"})})},Qg=({className:e,children:t,...n})=>{const s=h.useRef(null),r=h.useRef(null),o=({currentTarget:u})=>{const{scrollTop:l,clientHeight:d,scrollHeight:c}=u;s.current&&s.current.classList.toggle("wu-border-[#1b338014]",l!==0),r.current&&r.current.classList.toggle("wu-border-[#1b338014]",l+d!==c)},i="wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent";return a.jsxs(Xu,{...n,className:p("wu-overflow-hidden wu-gap-0",e),children:[a.jsx("hr",{className:i,ref:s}),a.jsx(Vt,{onScroll:o,className:"wu-gap-2",thumbColor:"#b9c3dc",railColor:"#00000000","data-testid":"scroll-area",children:t}),a.jsx("hr",{className:i,ref:r})]})},Rg=e=>a.jsx(Yu,{...e,children:e.children}),eb=({label:e,children:t,...n})=>a.jsxs(Zu,{...n,className:"wu-p-0",children:[a.jsx("div",{className:"wu-h-8",children:a.jsx(Ju,{className:"wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q",children:e})}),a.jsx(Qu,{children:a.jsx(Xr,{children:t})})]}),tb=e=>a.jsx(Xr,{...e}),Ml=({Icon:e,children:t,className:n,isActive:s,...r})=>{var w;const{state:o}=tt(),[i,u]=h.useState(),l=Yr(),d=h.isValidElement(t)?h.cloneElement(t,{children:a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[e,a.jsx("span",{className:p("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:(w=t.props)==null?void 0:w.children})]})}):t&&a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[e,a.jsx("span",{className:p("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:t})]}),c=h.useRef(null);return h.useEffect(()=>{var f;u(((f=c.current)==null?void 0:f.textContent)||"")},[]),a.jsx(Ru,{...r,className:"wu-flex wu-items-center wu-gap-2 wu-px-2",children:a.jsx(el,{className:p("wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm",n,s&&"wu-bg-white wu-shadow-[4px_4px_16px_0_#1B338014] wu-font-medium wu-text-blue-p hover:wu-bg-white wu-cursor-default"),isActive:s,tooltip:i,asChild:h.isValidElement(t),ref:c,children:d})})},nb=({Title:e,Icon:t,children:n,className:s,...r})=>{const{state:o}=tt(),i=Yr();return a.jsxs(bl,{children:[a.jsx(Nl,{render:u=>{const l="data-panel-open"in u;return a.jsxs(Ml,{Icon:t,...u,children:[e,(o==="expanded"||i)&&a.jsx(Ve,{icon:"wm-arrow-forward-ios",className:p("wu-absolute wu-right-4 wu-transition-transform wu-duration-300",l&&"wu-rotate-90","wu-scale-75")})]})}}),a.jsx(Tl,{className:p(o==="collapsed"?"":"wu-pl-2","wu-h-[var(--collapsible-panel-height)] wu-overflow-hidden","wu-transition-all wu-duration-300 wu-ease-in-out","data-[starting-style]:wu-h-0 data-[ending-style]:wu-h-0",'[&[hidden]:not([hidden="until-found"])]:wu-hidden',s),...r,children:n})]})},sb=new Map([[-3,{top:-20,left:-4,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-2,{top:0,left:0,zIndex:1,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-1,{top:20,left:4,zIndex:2,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[0,{top:40,left:8,zIndex:3,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.10s",position:"absolute"}],[1,{left:12,zIndex:4,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[2,{left:16,zIndex:5,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[3,{left:20,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}]]),ia=(e,t,n=1)=>{const s=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!s)throw new Error("Invalid HSL color format");const r=parseFloat(s[1]),o=parseFloat(s[2]),i=Math.max(0,parseFloat(s[3])+t);return`hsl(${r} ${o}% ${i}% / ${n})`},rb=({index:e,viewIndex:t,length:n,itemHeight:s})=>{const r=(e-t+n)%n;let o;r===0?o=0:r===n-1&&n>=2?o=-1:r===n-2&&n>=3?o=-2:r===1?o=1:r===2?o=2:r===n-3&&n>=4?o=-3:o=3;const i=sb.get(o)||{},u=o>0?s+28+(o-1)*20:i.top;return{position:o,styles:{...i,...o>0&&{top:`${u}px`},height:o>0?"32px":s}}},ln={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_HEIGHT:"calc(100% - 2rem)",FONT_SIZE_ACTIVE:"14px",FONT_SIZE_INACTIVE:"12px"},ab=({children:e,className:t,header:n,baseColor:s,position:r=0,style:o,...i})=>{const u=r<=0,l=r===0,d={border:l?`4px solid ${ia(s,ln.BORDER_LIGHTNESS)}`:"",...o},c={backgroundColor:ia(s,r*ln.LIGHTNESS_STEP),fontSize:l?ln.FONT_SIZE_ACTIVE:ln.FONT_SIZE_INACTIVE,transition:"all 0.3s ease",position:"relative",bottom:r<0?"4px":"0px",height:"32px",padding:"4px 8px"},w={backgroundColor:ia(s,45+r*6),height:ln.CONTENT_HEIGHT,position:"relative",bottom:r<0?"4px":"0px"};return a.jsxs("div",{className:p("wu-font-normal wu-transition-all wu-rounded-lg wu-overflow-hidden wu-w-full wu-cursor-pointer hover:-wu-translate-y-2",t),style:d,...i,children:[a.jsx("div",{style:c,className:"wu-text-white",children:n}),u&&a.jsx("div",{className:"wu-p-2 wu-overflow-y-auto wu-text-sm",style:w,children:e})]})},ob=({children:e,Trigger:t,Header:n,styles:s={},classNames:r={},open:o,onOpenChange:i,itemHeight:u})=>{const l={height:u,...s.Trigger};return a.jsxs(Su,{open:o,onOpenChange:i,children:[a.jsx(Cu,{className:p("wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative",r.Trigger),style:l,children:a.jsx("span",{className:"wu-absolute wu-text-xs wu-font-medium wu-bg-gray-25 -wu-top-6 wu-left-0 wu-p-1 wu-rounded-t-lg",children:t})}),a.jsxs(Hr,{className:p("wu-top-[50%] wu-left-[50%] wu-bg-black/75 wu-backdrop-blur-[4px] wu-min-h-full wu-overflow-auto wu-shadow-none wu-max-w-none wu-border-none wu-text-white",r.Content),hideCloseButton:!0,isStackedCard:!0,style:s.Content,children:[a.jsx(jr,{}),a.jsx(Aa.DialogClose,{className:p("wu-absolute wu-right-2 wu-top-2 wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-z-10",r.CloseButton),style:s.CloseButton,"aria-label":"Close dialog",children:a.jsx(Ve,{icon:"wm-close",className:"wu-text-lg wu-m-4 wu-cursor-pointer"})}),n&&a.jsx(Ur,{className:p("wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]",r.Header),style:s.Header,children:n}),e]})]})},cn=0;class ss{constructor(){Ne(this,"currentId",cn);Ne(this,"clear",()=>{this.currentId!==cn&&(clearTimeout(this.currentId),this.currentId=cn)});Ne(this,"disposeEffect",()=>this.clear)}static create(){return new ss}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=cn,n()},t)}isStarted(){return this.currentId!==cn}}function Il(){const e=nt(ss.create).current;return es(e.disposeEffect),e}const Al=0;class ua extends ss{constructor(){super(...arguments);Ne(this,"clear",()=>{this.currentId!==Al&&(clearInterval(this.currentId),this.currentId=Al)})}static create(){return new ua}start(n,s){this.clear(),this.currentId=setInterval(()=>{s()},n)}}function ib(){const e=nt(ua.create).current;return es(e.disposeEffect),e}function Dl(e){const t=nt(ub,e).current;return t.next=e,re(t.effect),t}function ub(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function lb(){const[,e]=y.useState({});return y.useCallback(()=>{e({})},[])}const kl={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},cb={...kl,position:"fixed",top:0,left:0},db={...kl,position:"absolute"};function wb(e){return(e==null?void 0:e.ownerDocument)||document}const rs=typeof navigator<"u",la=mb(),fb=bb(),pb=gb();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");const hb=la.platform==="MacIntel"&&la.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(la.platform);rs&&fb.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints,pb.includes("jsdom/");function mb(){if(!rs)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function gb(){if(!rs)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function bb(){if(!rs)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const ca=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(ca.displayName="NumberFieldRootContext");function as(){const e=y.useContext(ca);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.":tn(43));return e}let Pl=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const yb={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},_l={valid(e){return e===null?null:e?{[Pl.valid]:""}:{[Pl.invalid]:""}}},Vl=y.createContext({invalid:void 0,name:void 0,validityData:{state:yb,errors:[],error:"",value:"",initialValue:null},setValidityData:Me,disabled:void 0,touched:!1,setTouched:Me,dirty:!1,setDirty:Me,filled:!1,setFilled:Me,focused:!1,setFocused:Me,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Ue)=>e,getInputValidationProps:(e=Ue)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Vl.displayName="FieldRootContext");function da(e=!0){const t=y.useContext(Vl);if(t.setValidityData===Me&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":tn(28));return t}const Ol=y.createContext({controlId:void 0,registerControlId:Me,labelId:void 0,setLabelId:Me,messageIds:[],setMessageIds:Me,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Ol.displayName="LabelableContext");function Fl(){return y.useContext(Ol)}function xb(e={}){const{id:t,implicit:n=!1,controlRef:s}=e,{controlId:r,registerControlId:o}=Fl(),i=dl(t),u=n?r:void 0,l=nt(()=>Symbol("labelable-control")),d=y.useRef(!1),c=y.useRef(t!=null),w=he(()=>{!d.current||o===Me||(d.current=!1,o(l.current,void 0))});return re(()=>{if(o===Me)return;let f;if(n){const m=s==null?void 0:s.current;$g(m)&&m.closest("label")!=null?f=t??null:f=u??i}else if(t!=null)c.current=!0,f=t;else if(c.current)f=i;else{w();return}if(f===void 0){w();return}d.current=!0,o(l.current,f)},[t,s,u,o,n,i,l,w]),y.useEffect(()=>w,[w]),r??i}const dn={inputValue:()=>null,value:()=>null,..._l},Ll=new Map;function wn(e,t){const n=JSON.stringify({locale:e,options:t}),s=Ll.get(n);if(s)return s;const r=new Intl.NumberFormat(e,t);return Ll.set(n,r),r}function Ot(e,t,n){return e==null?"":wn(t,n).format(e)}function Wl(e,t,n){return Ot(e,t,{...n,maximumFractionDigits:20})}const vb=["零","〇","一","二","三","四","五","六","七","八","九"],Nb={零:"0","〇":"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},Bl=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],ql=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],wa=["0","1","2","3","4","5","6","7","8","9"],zl=["%","٪","%","﹪"],$l=["‰","؉"],Hl=["−","-","‒","–","—","﹣"],Ul=["+","﹢"],Sb=".",Cb=",",Tb=new RegExp(`[${Bl.join("")}]`,"g"),Eb=new RegExp(`[${ql.join("")}]`,"g"),Mb=new RegExp(`[${wa.join("")}]`,"g"),Ib=new RegExp(`[${vb.join("")}]`,"g"),Ab=new RegExp(`[${zl.join("")}]`),Db=new RegExp(`[${$l.join("")}]`),fa=/[٠١٢٣٤٥٦٧٨٩]/,jl=/[۰۱۲۳۴۵۶۷۸۹]/,pa=/[零〇一二三四五六七八九]/,Gl=new RegExp(`[${wa.join("")}]`),kb=[".",",",Sb,Cb,"٫","٬"],Kl=new RegExp("\\p{Zs}","u"),Pb=["+",...Ul],_b=["-",...Hl],os=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Vb=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),Yl=e=>`[${e.map(Vb).join("")}]`,Xl=Yl(["-"].concat(Hl)),Zl=Yl(["+"].concat(Ul)),Jl=new RegExp(Xl,"gu"),Ql=new RegExp(Zl,"gu"),fn=new RegExp(Xl),is=new RegExp(Zl);function ha(e,t){const n=wn(e,t).formatToParts(11111.1),s={};return n.forEach(r=>{s[r.type]=r.value}),wn(e).formatToParts(.1).forEach(r=>{r.type==="decimal"&&(s[r.type]=r.value)}),s}function pn(e,t,n){if(e==null)return null;let s=String(e).replace(new RegExp("\\p{Cf}","gu"),"").trim();s=s.replace(Jl,"-").replace(Ql,"+");let r=!1;const o=s.match(/([+-])\s*$/);o&&(o[1]==="-"&&(r=!0),s=s.replace(/([+-])\s*$/,""));const i=s.match(/^\s*([+-])/);i&&(i[1]==="-"&&(r=!0),s=s.replace(/^\s*[+-]/,""));let u=t;u===void 0&&(fa.test(s)||jl.test(s)?u="ar":pa.test(s)&&(u="zh"));const{group:l,decimal:d,currency:c}=ha(u,n),w=wn(u,n).formatToParts(1).filter(M=>M.type==="unit").map(M=>os(M.value)),f=w.length?new RegExp(w.join("|"),"g"):null;let m=null;l&&(new RegExp("\\p{Zs}","u").test(l)?m=new RegExp("\\p{Zs}","gu"):l==="'"||l==="’"?m=/['’]/g:m=new RegExp(os(l),"g"));let b=[{regex:l?m:null,replacement:""},{regex:d?new RegExp(os(d),"g"):null,replacement:"."},{regex:/./g,replacement:"."},{regex:/,/g,replacement:""},{regex:/٫/g,replacement:"."},{regex:/٬/g,replacement:""},{regex:c?new RegExp(os(c),"g"):null,replacement:""},{regex:f,replacement:""},{regex:Tb,replacement:M=>String(Bl.indexOf(M))},{regex:Eb,replacement:M=>String(ql.indexOf(M))},{regex:Mb,replacement:M=>String(wa.indexOf(M))},{regex:Ib,replacement:M=>Nb[M]}].reduce((M,{regex:I,replacement:k})=>I?M.replace(I,k):M,s);const x=b.lastIndexOf(".");if(x!==-1&&(b=`${b.slice(0,x).replace(/\./g,"")}.${b.slice(x+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(s)||/[∞]/.test(s))return null;const S=(r?"-":"")+b;let v=parseFloat(S);const T=n==null?void 0:n.style,N=T==="unit"&&(n==null?void 0:n.unit)==="percent",C=Ab.test(e)||T==="percent";return Db.test(e)?v/=1e3:!N&&C&&(v/=100),Number.isNaN(v)?null:v}const Ob=60,Fb=400,Lb=50,Wb=3,Bb=8,us=1;function qb(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const zb=1e-10;function $b(e){const t=wn("en-US").resolvedOptions(),n=(e==null?void 0:e.minimumFractionDigits)??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max((e==null?void 0:e.maximumFractionDigits)??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function Hb(e,t){if(!Number.isFinite(e))return e;const n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function ma(e,t){const{maximumFractionDigits:n}=$b(t);return Hb(e,n)}function Ub(e,t,n,s="directional"){if(n===0)return e;const r=Math.abs(n),o=Math.sign(n),i=r*zb*o,u=s==="nearest"?n:r,l=(e-t+i)/u;let d;return s==="nearest"?d=Math.round(l):o>0?d=Math.floor(l):d=Math.ceil(l),t+d*(s==="nearest"?n:r)}function jb(e,{step:t,minWithDefault:n,maxWithDefault:s,minWithZeroDefault:r,format:o,snapOnStep:i,small:u,clamp:l}){if(e===null)return e;const d=l?qb(e,n,s):e;if(t!=null&&i){if(t===0)return ma(d,o);let c=r;!u&&n!==Number.MIN_SAFE_INTEGER&&(c=n);const w=Ub(d,c,t,u?"nearest":"directional");return ma(w,o)}return ma(d,o)}const Rl=y.forwardRef(function(t,n){const{id:s,min:r,max:o,smallStep:i=.1,step:u=1,largeStep:l=10,required:d=!1,disabled:c=!1,readOnly:w=!1,name:f,defaultValue:m,value:g,onValueChange:b,onValueCommitted:x,allowWheelScrub:S=!1,snapOnStep:v=!1,allowOutOfRange:T=!1,format:N,locale:C,render:D,className:M,inputRef:I,...k}=t,{setDirty:F,validityData:P,disabled:A,setFilled:V,invalid:W,name:_,state:q,validation:B,shouldValidateOnChange:U}=da(),$=A||c,H=_??f,pe=u==="any"?1:u,[de,Ae]=y.useState(!1),ge=r??Number.MIN_SAFE_INTEGER,X=o??Number.MAX_SAFE_INTEGER,L=r??0,j=N==null?void 0:N.style,K=y.useRef(null),z=Zn(I,B.inputRef),J=xb({id:s}),[ie,De]=ul({controlled:g,default:m,name:"NumberField",state:"value"}),Q=ie??null,be=Dl(Q);re(()=>{V(Q!==null)},[V,Q]);const ve=lb(),Be=Dl(N),je=y.useRef(!1),gt=he((Z,G)=>{je.current=!1,x==null||x(Z,G)}),bn=Il(),hs=ib(),yn=Il(),xn=y.useRef(!1),vn=y.useRef(0),Ye=y.useRef(!0),ae=y.useRef(null),rt=y.useRef(()=>{}),[bt,ms]=y.useState(()=>g!==void 0?ec(Q,C,N):Ot(Q,C,N)),[zc,Vy]=y.useState("numeric"),$c=he(()=>{const{decimal:Z,group:G,currency:ue,literal:we}=ha(C,N),te=new Set;kb.forEach(ye=>te.add(ye)),Z&&te.add(Z),G&&(te.add(G),Kl.test(G)&&te.add(" "));const ke=j==="percent"||j==="unit"&&(N==null?void 0:N.unit)==="percent",Pe=j==="percent"||j==="unit"&&(N==null?void 0:N.unit)==="permille";return ke&&zl.forEach(ye=>te.add(ye)),Pe&&$l.forEach(ye=>te.add(ye)),j==="currency"&&ue&&te.add(ue),we&&(Array.from(we).forEach(ye=>te.add(ye)),Kl.test(we)&&te.add(" ")),Pb.forEach(ye=>te.add(ye)),ge<0&&_b.forEach(ye=>te.add(ye)),te}),Ft=he(Z=>Z!=null&&Z.altKey?i:Z!=null&&Z.shiftKey?l:pe),gs=he((Z,G)=>{const ue=G.event,we=G.direction,te=G.reason,ke=!T||!(te===ea||te===Rn||te===ta||te===sn||te===Qn),Pe=jb(Z,{step:we?Ft(ue)*we:void 0,format:Be.current,minWithDefault:ge,maxWithDefault:X,minWithZeroDefault:L,snapOnStep:v,small:(ue==null?void 0:ue.altKey)??!1,clamp:ke}),ye=G.reason===ea||G.reason===sn||G.reason===Rn||G.reason===ta||G.reason===Qn,Ma=Pe!==Q||ye&&(Z!==Q||Ye.current===!1);if(Ma){if(ae.current=Pe,b==null||b(Pe,G),G.isCanceled)return Ma;De(Pe),F(Pe!==P.initialValue),je.current=!0}return Ye.current&&ms(Ot(Pe,C,N)),ve(),Ma}),Nn=he((Z,{direction:G,currentValue:ue,event:we,reason:te})=>{const ke=ue??be.current,Pe=typeof ke=="number"?ke+Z*G:Math.max(0,r??0);return gs(Pe,Ie(te,we,void 0,{direction:G}))}),at=he(()=>{yn.clear(),bn.clear(),hs.clear(),rt.current(),vn.current=0}),Hc=he((Z,G)=>{if(at(),!K.current)return;const ue=sa(K.current);function we(ke){ke.preventDefault()}ue.addEventListener("contextmenu",we),rt.current=()=>{ue.removeEventListener("contextmenu",we)},ue.addEventListener("pointerup",ke=>{xn.current=!1,at();const Pe=ae.current??be.current;gt(Pe,an(Z?"increment":"decrement",ke))},{once:!0});function te(){const ke=Ft(G)??us;return Nn(ke,{direction:Z?1:-1,event:G,reason:Z?"increment-press":"decrement-press"})}if(!te()){at();return}bn.start(Fb,()=>{hs.start(Ob,()=>{te()||at()})})});re(function(){if(!Ye.current)return;const G=g!==void 0?ec(Q,C,N):Ot(Q,C,N);G!==bt&&ms(G)}),re(function(){if(!hb)return;let G="text";ge>=0&&(G="decimal"),Vy(G)},[ge,j]),y.useEffect(()=>()=>at(),[at]),y.useEffect(function(){const G=K.current;if($||w||!S||!G)return;function ue(we){if(we.ctrlKey||wb(K.current).activeElement!==K.current)return;we.preventDefault();const te=Ft(we)??us;Nn(te,{direction:we.deltaY>0?-1:1,event:we,reason:"wheel"})}return G.addEventListener("wheel",ue),()=>{G.removeEventListener("wheel",ue)}},[S,Nn,$,w,l,pe,Ft]);const Ea=y.useMemo(()=>({...q,disabled:$,readOnly:w,required:d,value:Q,inputValue:bt,scrubbing:de}),[q,$,w,d,Q,bt,de]),Oy=y.useMemo(()=>({inputRef:K,inputValue:bt,value:Q,startAutoChange:Hc,stopAutoChange:at,minWithDefault:ge,maxWithDefault:X,disabled:$,readOnly:w,id:J,setValue:gs,incrementValue:Nn,getStepAmount:Ft,allowInputSyncRef:Ye,formatOptionsRef:Be,valueRef:be,lastChangedValueRef:ae,hasPendingCommitRef:je,isPressedRef:xn,intentionalTouchCheckTimeout:yn,movesAfterTouchRef:vn,name:H,required:d,invalid:W,inputMode:zc,getAllowedNonNumericKeys:$c,min:r,max:o,setInputValue:ms,locale:C,isScrubbing:de,setIsScrubbing:Ae,state:Ea,onValueCommitted:gt}),[K,bt,Q,Hc,at,ge,X,$,w,J,gs,Nn,Ft,Be,be,yn,H,d,W,zc,$c,r,o,ms,C,de,Ea,gt]),Fy=st("div",t,{ref:n,state:Ea,props:k,stateAttributesMapping:dn});return a.jsxs(ca.Provider,{value:Oy,children:[Fy,a.jsx("input",{...B.getInputValidationProps({onFocus(){var Z;(Z=K.current)==null||Z.focus()},onChange(Z){if(Z.nativeEvent.defaultPrevented)return;const G=Z.currentTarget.valueAsNumber,ue=Number.isNaN(G)?null:G,we=Ie(Qn,Z.nativeEvent);F(ue!==P.initialValue),gs(ue,we),U()&&B.commit(ue)}}),ref:z,type:"number",name:H,value:Q??"",min:r,max:o,step:u,disabled:$,required:d,"aria-hidden":!0,tabIndex:-1,style:H?db:cb})]})});process.env.NODE_ENV!=="production"&&(Rl.displayName="NumberFieldRoot");function ec(e,t,n){return(n==null?void 0:n.maximumFractionDigits)!=null||(n==null?void 0:n.minimumFractionDigits)!=null?Ot(e,t,n):Wl(e,t,n)}const tc=y.forwardRef(function(t,n){const{render:s,className:r,...o}=t,{state:i}=as();return st("div",t,{ref:n,state:i,props:[{role:"group"},o],stateAttributesMapping:dn})});process.env.NODE_ENV!=="production"&&(tc.displayName="NumberFieldGroup");function hn(e){return e==="touch"||e==="pen"}function nc(e){const{allowInputSyncRef:t,disabled:n,formatOptionsRef:s,getStepAmount:r,id:o,incrementValue:i,inputRef:u,inputValue:l,intentionalTouchCheckTimeout:d,isIncrement:c,isPressedRef:w,locale:f,movesAfterTouchRef:m,readOnly:g,setValue:b,startAutoChange:x,stopAutoChange:S,valueRef:v,lastChangedValueRef:T,onValueCommitted:N}=e,C=y.useRef({x:0,y:0}),D=y.useRef(!1),M=y.useRef(!1),I=y.useRef(""),k=c?"increment-press":"decrement-press";function F(A){t.current=!0;const V=pn(l,f,s.current);V!==null&&(v.current=V,b(V,Ie(k,A,void 0,{direction:c?1:-1})))}return{disabled:n,"aria-readonly":g||void 0,"aria-label":c?"Increase":"Decrease","aria-controls":o,tabIndex:-1,style:{WebkitUserSelect:"none",userSelect:"none"},onTouchStart(){D.current=!0},onTouchEnd(){D.current=!1},onClick(A){const V=n||g;if(A.defaultPrevented||V||(hn(I.current)?M.current:A.detail!==0))return;F(A.nativeEvent);const W=r(A)??us,_=v.current;i(W,{direction:c?1:-1,event:A.nativeEvent,reason:k});const q=T.current??v.current;q!==_&&N(q,an(k,A.nativeEvent))},onPointerDown(A){var _;const V=!A.button||A.button===0;if(A.defaultPrevented||g||!V||n)return;I.current=A.pointerType,M.current=!1,w.current=!0,C.current={x:A.clientX,y:A.clientY},F(A.nativeEvent),hn(A.pointerType)?d.start(Lb,()=>{const q=m.current;m.current=0,w.current&&q!=null&&q<Wb?(x(c,A),M.current=!0):(M.current=!1,S())}):(A.preventDefault(),(_=u.current)==null||_.focus(),x(c,A))},onPointerUp(A){hn(A.pointerType)&&(w.current=!1)},onPointerMove(A){if(n||g||!hn(A.pointerType)||!w.current)return;m.current!=null&&(m.current+=1);const{x:W,y:_}=C.current,q=W-A.clientX,B=_-A.clientY;q**2+B**2>Bb**2&&S()},onMouseEnter(A){const V=n||g;A.defaultPrevented||V||!w.current||D.current||hn(I.current)||x(c,A)},onMouseLeave(){D.current||S()},onMouseUp(){D.current||S()}}}const sc=y.forwardRef(function(t,n){const{render:s,className:r,disabled:o=!1,nativeButton:i=!0,...u}=t,{allowInputSyncRef:l,disabled:d,formatOptionsRef:c,getStepAmount:w,id:f,incrementValue:m,inputRef:g,inputValue:b,intentionalTouchCheckTimeout:x,isPressedRef:S,locale:v,maxWithDefault:T,movesAfterTouchRef:N,readOnly:C,setValue:D,startAutoChange:M,state:I,stopAutoChange:k,value:F,valueRef:P,lastChangedValueRef:A,onValueCommitted:V}=as(),W=F!=null&&F>=T,_=o||d||W,q=nc({isIncrement:!0,inputRef:g,startAutoChange:M,stopAutoChange:k,inputValue:b,disabled:_,readOnly:C,id:f,setValue:D,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:c,valueRef:P,isPressedRef:S,intentionalTouchCheckTimeout:x,movesAfterTouchRef:N,locale:v,lastChangedValueRef:A,onValueCommitted:V}),{getButtonProps:B,buttonRef:U}=aa({disabled:_,native:i,focusableWhenDisabled:!0}),$=y.useMemo(()=>({...I,disabled:_}),[I,_]);return st("button",t,{ref:[n,U],state:$,props:[q,u,B],stateAttributesMapping:dn})});process.env.NODE_ENV!=="production"&&(sc.displayName="NumberFieldIncrement");const rc=y.forwardRef(function(t,n){const{render:s,className:r,disabled:o=!1,nativeButton:i=!0,...u}=t,{allowInputSyncRef:l,disabled:d,formatOptionsRef:c,getStepAmount:w,id:f,incrementValue:m,inputRef:g,inputValue:b,intentionalTouchCheckTimeout:x,isPressedRef:S,minWithDefault:v,movesAfterTouchRef:T,readOnly:N,setValue:C,startAutoChange:D,state:M,stopAutoChange:I,value:k,valueRef:F,locale:P,lastChangedValueRef:A,onValueCommitted:V}=as(),W=k!=null&&k<=v,_=o||d||W,q=nc({isIncrement:!1,inputRef:g,startAutoChange:D,stopAutoChange:I,inputValue:b,disabled:_,readOnly:N,id:f,setValue:C,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:c,valueRef:F,isPressedRef:S,intentionalTouchCheckTimeout:x,movesAfterTouchRef:T,locale:P,lastChangedValueRef:A,onValueCommitted:V}),{getButtonProps:B,buttonRef:U}=aa({disabled:_,native:i,focusableWhenDisabled:!0}),$=y.useMemo(()=>({...M,disabled:_}),[M,_]);return st("button",t,{ref:[n,U],state:$,props:[q,u,B],stateAttributesMapping:dn})});process.env.NODE_ENV!=="production"&&(rc.displayName="NumberFieldDecrement");function Gb(e){e.preventDefault(),e.stopPropagation()}function Kb(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const ac=y.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Me,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(ac.displayName="FormContext");function oc(){return y.useContext(ac)}function Yb(e){const{enabled:t=!0,value:n,id:s,name:r,controlRef:o,commit:i}=e,{formRef:u}=oc(),{invalid:l,markedDirtyRef:d,validityData:c,setValidityData:w}=da(),f=he(e.getValue);re(()=>{if(!t)return;let m=n;m===void 0&&(m=f()),c.initialValue===null&&m!==null&&w(g=>({...g,initialValue:m}))},[t,w,n,c.initialValue,f]),re(()=>{!t||!s||u.current.fields.set(s,{getValue:f,name:r,controlRef:o,validityData:Kb(c,l),validate(m=!0){let g=n;g===void 0&&(g=f()),d.current=!0,m?Pa.flushSync(()=>i(g)):i(g)}})},[i,o,t,u,f,s,l,d,r,c,n]),re(()=>{const m=u.current.fields;return()=>{s&&m.delete(s)}},[u,s])}function Xb(e,t){const n=y.useRef(e),s=he(t);re(()=>{n.current!==e&&s(n.current)},[e,s]),re(()=>{n.current=e},[e])}const Zb={..._l,...dn},Jb=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),ic=y.forwardRef(function(t,n){const{render:s,className:r,...o}=t,{allowInputSyncRef:i,disabled:u,formatOptionsRef:l,getAllowedNonNumericKeys:d,getStepAmount:c,id:w,incrementValue:f,inputMode:m,inputValue:g,max:b,min:x,name:S,readOnly:v,required:T,setValue:N,state:C,setInputValue:D,locale:M,inputRef:I,value:k,onValueCommitted:F,lastChangedValueRef:P,hasPendingCommitRef:A,valueRef:V}=as(),{clearErrors:W}=oc(),{validationMode:_,setTouched:q,setFocused:B,invalid:U,shouldValidateOnChange:$,validation:H}=da(),{labelId:pe}=Fl(),de=y.useRef(!1),Ae=y.useRef(!1);return Yb({id:w,commit:H.commit,value:k,controlRef:I,name:S,getValue:()=>k??null}),Xb(k,L=>{const j=$();if(W(S),j&&H.commit(k),!(L===k||j)){if(Ae.current){Ae.current=!1;return}H.commit(k,!0)}}),st("input",t,{ref:[n,I],state:C,props:[{id:w,required:T,disabled:u,readOnly:v,inputMode:m,value:g,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":U||void 0,"aria-labelledby":pe,suppressHydrationWarning:!0,onFocus(L){if(L.defaultPrevented||v||u||(B(!0),de.current))return;de.current=!0;const j=L.currentTarget,K=j.value.length;j.setSelectionRange(K,K)},onBlur(L){if(L.defaultPrevented||v||u)return;q(!0),B(!1);const j=!i.current,K=A.current;if(i.current=!0,g.trim()===""){N(null,Ie(sn,L.nativeEvent)),_==="onBlur"&&H.commit(null),F(null,an(sn,L.nativeEvent));return}const z=l.current,J=pn(g,M,z);if(J===null)return;const ie=(z==null?void 0:z.maximumFractionDigits)!=null||(z==null?void 0:z.minimumFractionDigits)!=null,De=z==null?void 0:z.maximumFractionDigits,Q=ie&&typeof De=="number"?Number(J.toFixed(De)):J,be=an(Rn,L.nativeEvent),ve=k!==Q,Be=j||ve||K;_==="onBlur"&&H.commit(Q),ve&&(Ae.current=!0,N(Q,Ie(Rn,L.nativeEvent))),Be&&F(Q,be);const je=Ot(Q,M,z),gt=Wl(J,M,z);!(!ie&&J===k&&g===gt)&&g!==je&&D(je)},onChange(L){if(L.nativeEvent.defaultPrevented)return;i.current=!1;const j=L.target.value;if(j.trim()===""){D(j),N(null,Ie(sn,L.nativeEvent));return}const K=d();if(!Array.from(j).every(ie=>{const De=ie>="0"&&ie<="9",Q=fa.test(ie),be=pa.test(ie),ve=jl.test(ie),Be=Gl.test(ie),je=fn.test(ie);return De||Q||be||ve||Be||je||K.has(ie)}))return;const J=pn(j,M,l.current);D(j),J!==null&&N(J,Ie(ea,L.nativeEvent))},onKeyDown(L){if(L.defaultPrevented||v||u)return;const j=L.nativeEvent;i.current=!0;const K=d();let z=K.has(L.key);const{decimal:J,currency:ie,percentSign:De}=ha(M,l.current),Q=L.currentTarget.selectionStart,be=L.currentTarget.selectionEnd,ve=Q===0&&be===g.length,Be=ae=>Q!=null&&be!=null&&ae>=Q&&ae<be;if(fn.test(L.key)&&Array.from(K).some(ae=>fn.test(ae||""))){const ae=g.search(Jl),rt=ae!=null&&ae!==-1&&Be(ae);z=!(fn.test(g)||is.test(g))||ve||rt}if(is.test(L.key)&&Array.from(K).some(ae=>is.test(ae||""))){const ae=g.search(Ql),rt=ae!=null&&ae!==-1&&Be(ae);z=!(fn.test(g)||is.test(g))||ve||rt}[J,ie,De].forEach(ae=>{if(L.key===ae){const rt=g.indexOf(ae),bt=Be(rt);z=!g.includes(ae)||ve||bt}});const je=L.key>="0"&&L.key<="9",gt=fa.test(L.key),bn=pa.test(L.key),hs=Gl.test(L.key),yn=Jb.has(L.key);if(L.which===229||L.altKey||L.ctrlKey||L.metaKey||z||je||gt||hs||bn||yn)return;const xn=pn(g,M,l.current),vn=c(L)??us;Gb(L);const Ye=an(rn,j);L.key==="ArrowUp"?(f(vn,{direction:1,currentValue:xn,event:j,reason:rn}),F(P.current??V.current,Ye)):L.key==="ArrowDown"?(f(vn,{direction:-1,currentValue:xn,event:j,reason:rn}),F(P.current??V.current,Ye)):L.key==="Home"&&x!=null?(N(x,Ie(rn,j)),F(P.current??V.current,Ye)):L.key==="End"&&b!=null&&(N(b,Ie(rn,j)),F(P.current??V.current,Ye))},onPaste(L){if(L.defaultPrevented||v||u)return;L.preventDefault();const K=(L.clipboardData||window.Clipboard).getData("text/plain"),z=pn(K,M,l.current);z!==null&&(i.current=!1,N(z,Ie(ta,L.nativeEvent)),D(K))}},H.getValidationProps(),o],stateAttributesMapping:Zb})});process.env.NODE_ENV!=="production"&&(ic.displayName="NumberFieldInput");const Qb={wuStepper:"_wuStepper_apbnq_1"},Rb=({onChange:e,Label:t,defaultValue:n=0,readonly:s,dir:r,step:o=1,min:i,max:u,value:l,className:d,labelPosition:c="left",disabled:w,resetInvalidValueOnBlur:f=!0,...m})=>{const g=y.useId(),[b,x]=y.useState(l!==void 0?Number(l):n||0);y.useEffect(()=>{l!==void 0&&x(Number(l))},[l]);const S=M=>{x(M),e==null||e(M)},v=M=>{const I=Number(M.target.value);Number.isNaN(I)||x(I)},T=()=>{f&&(i!==void 0&&b<i?(x(i),e==null||e(i)):u!==void 0&&b>u&&(x(u),e==null||e(u)))};y.useEffect(()=>{l&&n&&console.warn("As both value and defaultValue are passed, value will be used")},[l,n]);const N={inc:s||u!==void 0&&b>=u||w,dec:s||i!==void 0&&b<=i||w},C=i!==void 0&&b<i||u!==void 0&&b>u,D=p("wu-flex wu-items-center wu-justify-center wu-rounded-none wu-bg-gray-10 wu-w-8 wu-h-8 wu-text-blue-q wu-p-2 wu-absolute wu-top-0 hover:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle");return a.jsxs(Rl,{id:g,value:b,step:o,readOnly:s,onValueChange:M=>typeof M=="number"&&S(M),dir:r,className:p("wu-flex wu-stepper",r==="rtl"&&c!=="top"&&"wu-gap-2",Qb.wuStepper,ey({labelPosition:c}),d),children:[t&&a.jsx(Te,{htmlFor:g,className:"wu-input-label",children:t}),a.jsxs(tc,{className:"wu-flex wu-max-w-[97px] wu-relative",children:[a.jsx(rc,{"aria-label":"decrement",className:p(D,r==="rtl"?"wu-right-0":"wu-left-0","wu-stepper-button"),disabled:N.dec,children:a.jsx("span",{className:"wu-text-base wm-minimize"})}),a.jsx(ic,{"aria-label":"stepper",role:"spinbutton",type:"text","aria-invalid":C||void 0,dir:r,className:p("wu-flex wu-w-[97px] wu-h-8 wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","wu-h-[33px] wu-text-center wu-text-blue-q wu-text-xs wu-rounded-t-sm ","focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle",C&&"wu-border-red-deep focus:wu-border-red-deep","wu-stepper-input"),readOnly:s,onChange:v,onBlur:T,disabled:w,min:i,max:u,step:o,value:b,...m}),a.jsx(sc,{"aria-label":"increment",className:p(D,r==="rtl"?"wu-left-0":"wu-right-0","wu-stepper-button"),disabled:N.inc,children:a.jsx("span",{className:"wu-text-base wm-add"})})]})]})},ey=_e.cva("wu-flex wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row wu-text-right wu-gap-2 wu-items-center",top:"wu-flex-col"}}}),uc=_e.cva("wu-inline-flex wu-items-center wu-justify-center wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-muted hover:wu-text-muted-foreground focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-80",{variants:{variant:{default:"wu-bg-transparent",outline:"wu-border wu-border-input wu-bg-transparent hover:wu-bg-accent hover:wu-text-accent-foreground"},size:{default:"wu-h-10 wu-px-3",sm:"wu-h-9 wu-px-2.5",lg:"wu-h-11 wu-px-5"}},defaultVariants:{variant:"default",size:"default"}}),ty=y.forwardRef(({className:e,variant:t,size:n,...s},r)=>a.jsx(_a.Root,{ref:r,className:p(uc({variant:t,size:n,className:e})),...s}));ty.displayName=_a.Root.displayName;const lc=y.createContext({size:"default",variant:"default"}),ls=y.forwardRef(({className:e,variant:t,size:n,children:s,...r},o)=>a.jsx(Sn.Root,{ref:o,className:p("wu-flex wu-items-center wu-justify-center wu-gap-1",e),...r,children:a.jsx(lc.Provider,{value:{variant:t,size:n},children:s})}));ls.displayName=Sn.Root.displayName;const mt=y.forwardRef(({className:e,children:t,variant:n,size:s,...r},o)=>{const i=y.useContext(lc);return a.jsx(Sn.Item,{ref:o,className:p(uc({variant:i.variant||n,size:i.size||s}),e),...r,children:t})});mt.displayName=Sn.Item.displayName;const cc=h.forwardRef((e,t)=>{const{options:n,value:s,disabled:r,dir:o,onChange:i}=e,u=l=>p("wu-w-8 wu-h-8 wu-text-xl wu-leading-5 wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-p-0 wu-flex wu-items-center wu-justify-center",r&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",l===s&&"wu-text-white",r&&s===l&&"wu-text-gray-lead","wu-switcher-icon-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(ls,{ref:t,type:"single",value:s,onValueChange:i,disabled:r,dir:o,className:p("wu-relative wu-group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-16 wu-bg-gray-25 wu-rounded-full",r&&"wu-cursor-not-allowed","wu-switcher-icon-tab-group"),children:[a.jsx("div",{role:"slider",className:p("wu-absolute wu-z-0 wu-w-8 wu-h-8 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",s==="opt1"&&"",s==="opt2"&&o!=="rtl"&&"wu-translate-x-full",s==="opt2"&&o==="rtl"&&"-wu-translate-x-full",r&&"wu-bg-gray-40","wu-switcher-icon-tab-slider")}),a.jsx(mt,{value:"opt1",className:u("opt1"),children:n[0].label}),a.jsx(mt,{value:"opt2",className:u("opt2"),children:n[1].label})]})})});cc.displayName="_IconTab";const dc=h.forwardRef((e,t)=>{const{options:n,value:s,disabled:r,dir:o,size:i="md",onChange:u}=e,l=d=>p("wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal",r&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",d===s&&"wu-text-white wu-font-medium",r&&s===d&&"wu-text-gray-lead","wu-switcher-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(ls,{ref:t,type:"single",value:s,onValueChange:u,disabled:r,dir:o,className:p("wu-relative group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-fit wu-bg-gray-25 wu-rounded-full",r&&"wu-cursor-not-allowed","wu-switcher-tab-group"),children:[a.jsx("div",{role:"slider",className:p("wu-absolute wu-z-0 wu-w-1/2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out ",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",s==="opt1"&&"",s==="opt2"&&o!=="rtl"&&"wu-translate-x-full",s==="opt2"&&o==="rtl"&&"-wu-translate-x-full",r&&"wu-bg-gray-40","wu-switcher-tab-slider")}),a.jsx(mt,{value:"opt1",className:l("opt1"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[0].label})}),a.jsx(mt,{value:"opt2",className:l("opt2"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[1].label})})]})})});dc.displayName="_Tab";const wc=h.forwardRef((e,t)=>{const{options:n,value:s,disabled:r,dir:o,onChange:i}=e,u=w=>p("wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal",r&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle",w===s&&"wu-text-primary wu-font-medium",r&&s===w&&"wu-text-gray-lead","wu-switcher-toggle-item"),l=p("wu-w-fit wu-gap-2",r&&"wu-cursor-not-allowed","wu-switcher-toggle-group"),d=p("wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-3 wu-p-0 wu-border wu-rounded-full wu-cursor-pointer wu-border-blue-p focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2",r&&"wu-border-gray-subtle wu-cursor-not-allowed","wu-switcher-toggle-button"),c=p("wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",s==="opt1"&&o!=="rtl"&&"-wu-translate-x-[10px]",s==="opt1"&&o==="rtl"&&"wu-translate-x-[10px]",s==="opt2"&&o!=="rtl"&&"wu-translate-x-[10px]",s==="opt2"&&o==="rtl"&&"-wu-translate-x-[10px]",r&&"wu-hidden","wu-switcher-toggle-knob");return a.jsx(a.Fragment,{children:a.jsxs(ls,{ref:t,type:"single",value:s,disabled:r,dir:o,className:l,onValueChange:i,children:[a.jsx(mt,{value:"opt1",className:u("opt1"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-text-right wu-switcher-toggle-item-label",children:n[0].label})}),a.jsx("button",{onClick:()=>i(s==="opt1"?"opt2":"opt1"),className:d,disabled:r,"aria-label":"knob",dir:o,children:a.jsx("div",{className:c,role:"knob",dir:o})}),a.jsx(mt,{value:"opt2",className:u("opt2"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-switcher-toggle-item-label",children:n[1].label})})]})})});wc.displayName="_Toggle";const fc=h.forwardRef((e,t)=>{const{type:n,options:s,value:r,disabled:o,dir:i,size:u,onChange:l,toggle:d=!0,...c}=e,[w,f]=h.useState(),m=g=>{let b=w;g!==""?b=g:d&&(b=w==="opt1"?"opt2":"opt1");const x=b==="opt1"?s[0].value:s[1].value;l&&l(x),f(b)};if(h.useEffect(()=>{if(!Array.isArray(s)||s.length<2)throw new Error("Options are not sufficient");f(r===s[0].value?"opt1":"opt2")},[s,r]),!Array.isArray(s)||s.length<2)return a.jsx(a.Fragment,{});switch(n){case"toggle":return a.jsx(wc,{...c,ref:t,options:s,value:w||"opt1",onChange:m,disabled:o,dir:i});case"iconTab":return a.jsx(cc,{ref:t,options:s,value:w||"opt1",onChange:m,disabled:o,dir:i});default:return a.jsx(dc,{ref:t,options:s,value:w||"opt1",onChange:m,disabled:o,dir:i,size:u})}});fc.displayName="WuSwitcher";const pc=ut.Root,ga=y.forwardRef(({className:e,children:t,...n},s)=>a.jsx(ut.List,{className:p("wu-relative wu-flex",e),...n,ref:s,children:t}));ga.displayName=ut.List.displayName;const ba=y.forwardRef(({className:e,...t},n)=>a.jsx(ut.Trigger,{ref:n,className:p("wu-relative wu-inline-flex wu-items-center wu-whitespace-nowrap wu-text-xs wu-px-4 wu-py-2 wu-text-gray-600 wu-transition-colors wu-duration-200 data-[state=active]:wu-text-blue-p","data-[orientation=horizontal]:wu-justify-center",e),...t}));ba.displayName=ut.Trigger.displayName;const hc=y.forwardRef(({className:e,...t},n)=>a.jsx(ut.Content,{ref:n,className:e,...t}));hc.displayName=ut.Content.displayName;const mc=({items:e,enableAnimation:t})=>{const n="wu-duration-700 wu-ease-in-out wu-transition-all data-[state=inactive]:wu-absolute data-[state=inactive]:wu-inset-0 data-[state=inactive]:wu-opacity-0 data-[state=inactive]:wu-z-0 data-[state=active]:wu-relative data-[state=active]:wu-opacity-100 data-[state=active]:wu-z-10";return a.jsx("div",{className:p("wu-w-full wu-h-full wu-flex-1 wu-overflow-auto",t&&"wu-relative wu-overflow-hidden","wu-tab-content-container"),children:e.map(s=>a.jsx(hc,{value:s.value,forceMount:t||void 0,className:p("wu-w-full wu-h-full wu-overflow-y-auto",t&&n,"wu-tab-content"),children:s.Content},s.value))})},ny=e=>{const[t,n]=h.useState(!1),[s,r]=h.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollLeft>0),r(u.scrollLeft+u.clientWidth<u.scrollWidth))};return h.useEffect(()=>{const u=e.current;return o(),u&&u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u&&u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showLeftArrow:t,showRightArrow:s,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="right"?l.clientWidth:-l.clientWidth)*.8;l.scrollBy({left:d,behavior:"smooth"})}}}},gc=(e,t)=>{const[n,s]=h.useState({width:0,left:0,height:0,top:0}),r=t==="vertical";return h.useEffect(()=>{const o=e.current;if(o){const i=()=>{const l=o.querySelector('[data-state="active"]');if(l){const d={width:r?2:l.offsetWidth,left:r?0:l.offsetLeft,height:r?l.offsetHeight:1,top:r?l.offsetTop:0};s(d)}},u=new MutationObserver(i);return u.observe(o,{attributes:!0,subtree:!0}),i(),()=>{u.disconnect()}}},[e,r]),n},sy=({items:e,value:t,defaultValue:n,onValueChange:s,enableAnimation:r=!1,className:o,dir:i="ltr",position:u="top"})=>{var T;const l=h.useRef(null),d=gc(l,"horizontal"),{showLeftArrow:c,showRightArrow:w,scrollByTab:f}=ny(l),[m,g]=h.useState(!1),b=()=>f("left"),x=()=>f("right"),S=N=>a.jsx("div",{"data-testid":`gradient-overlay-${N}`,className:p("wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none",N==="left"?"wu-left-0 wu-bg-gradient-to-r wu-from-white wu-to-transparent":"wu-right-0 wu-bg-gradient-to-l wu-from-white wu-to-transparent")}),v=(N,C,D)=>{const M=C==="left";return a.jsx("button",{onClick:N,className:p("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-h-8",M?"wu-left-0":"wu-right-0",D&&"wu-translate-x-0 wu-opacity-100",!D&&[M?"-wu-translate-x-full":"wu-translate-x-full","wu-opacity-0"]),"aria-label":M?"scroll-left":"scroll-right",children:a.jsx("span",{className:p("wu-text-blue-p wu-text-lg",M?"wm-keyboard-arrow-left":"wm-keyboard-arrow-right")})})};return a.jsxs(pc,{defaultValue:n||((T=e[0])==null?void 0:T.value),value:t,onValueChange:s,orientation:"horizontal",dir:i,className:p("wu-relative wu-flex wu-flex-col wu-w-full wu-h-full",u==="bottom"?"wu-flex-col-reverse":"wu-flex-col",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0 wu-border-b wu-border-gray-200",onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"tablistWrapper",children:[c&&m&&S("left"),v(b,"left",c&&m),a.jsxs(ga,{ref:l,className:p("wu-relative wu-flex wu-w-full wu-overflow-x-auto wu-flex-row","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(N=>a.jsx(ba,{value:N.value,children:N.Trigger},N.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator wu-bottom-0",style:{width:d.width,left:d.left,height:1.25,bottom:u==="bottom"?void 0:0,top:u==="bottom"?0:void 0}})]}),w&&m&&S("right"),v(x,"right",w&&m)]}),a.jsx(mc,{items:e,enableAnimation:r})]})},ry=e=>{const[t,n]=h.useState(!1),[s,r]=h.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollTop>0),r(u.scrollTop+u.clientHeight<u.scrollHeight))};return h.useEffect(()=>{const u=e.current;if(u)return o(),u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showTopArrow:t,showBottomArrow:s,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="down"?l.clientHeight:-l.clientHeight)*.8;l.scrollBy({top:d,behavior:"smooth"})}}}},ay=({items:e,value:t,defaultValue:n,onValueChange:s,enableAnimation:r=!1,className:o,dir:i="ltr",position:u="left"})=>{var T;const l=h.useRef(null),d=gc(l,"vertical"),{showTopArrow:c,showBottomArrow:w,scrollByTab:f}=ry(l),[m,g]=h.useState(!1),b=()=>f("up"),x=()=>f("down"),S=N=>a.jsx("div",{className:p("wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none",N==="top"?"wu-top-0 wu-bg-gradient-to-b wu-from-white wu-to-transparent":"wu-bottom-0 wu-bg-gradient-to-t wu-from-white wu-to-transparent")}),v=(N,C,D)=>{const M=C==="up";return a.jsx("button",{onClick:N,className:p("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-w-full",M?"-wu-top-1":"-wu-bottom-1",D&&"wu-translate-y-0 wu-opacity-100",!D&&[M?"-wu-translate-y-full":"wu-translate-y-full","wu-opacity-0"]),"aria-label":M?"scroll-up":"scroll-down",children:a.jsx("span",{className:p("wu-text-blue-p wu-text-lg",M?"wm-keyboard-arrow-up":"wm-keyboard-arrow-down")})})};return a.jsxs(pc,{defaultValue:n||((T=e[0])==null?void 0:T.value),value:t,onValueChange:s,orientation:"vertical",dir:i,className:p("wu-relative wu-h-full wu-w-full wu-flex",u==="left"?"wu-flex-row":"wu-flex-row-reverse",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0",onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"tablistWrapper",children:[c&&m&&S("top"),v(b,"up",c&&m),a.jsxs(ga,{ref:l,className:p("wu-relative wu-flex wu-h-full wu-overflow-y-auto wu-flex-col","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(N=>a.jsx(ba,{value:N.value,children:N.Trigger},N.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator",style:{width:2,left:u==="left"?0:void 0,right:u==="right"?0:void 0,height:d.height,top:d.top}})]}),w&&m&&S("bottom"),v(x,"down",w&&m)]}),a.jsx(mc,{items:e,enableAnimation:r})]})},oy=({...e})=>e.orientation==="vertical"?a.jsx(ay,{...e}):a.jsx(sy,{...e}),ya=y.forwardRef(({className:e,...t},n)=>a.jsx("table",{ref:n,className:p("wu-w-full wu-caption-bottom wu-text-sm",e),...t}));ya.displayName="Table";const bc=y.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:p("[&_tr]:wu-border-b",e),...t}));bc.displayName="TableHeader";const yc=y.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:p("",e),...t}));yc.displayName="TableBody";const iy=y.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:p("wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0",e),...t}));iy.displayName="TableFooter";const mn=y.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:p("wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted",e),...t}));mn.displayName="TableRow";const xa=y.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:p("wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0",e),...t}));xa.displayName="TableHead";const cs=y.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:p("wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0",e),...t}));cs.displayName="TableCell";const va=y.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:p("wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal",e),...t}));va.displayName="TableCaption";const uy=({columns:e,rowSelection:t})=>{const n=(t==null?void 0:t.isEnabled)??!1,s=(t==null?void 0:t.size)??48,{onRowSelect:r,rowUniqueKey:o,isRowDisabled:i,hideSelectAll:u}=t||{},l=h.useCallback(c=>w=>{r==null||r(w?c:[])},[r]);return{finalColumns:h.useMemo(()=>n?[{id:"select",header:({table:c})=>{const w=c.getRowModel().rows.map(m=>m.original).filter(m=>!(i!=null&&i(m))),f=l(w);return u?a.jsx("div",{}):a.jsx(Fe,{checked:c.getIsSomeRowsSelected()||c.getIsAllRowsSelected(),partial:c.getIsSomeRowsSelected()&&!c.getIsAllRowsSelected(),onChange:m=>{c.toggleAllRowsSelected(!!m),f(!!m)},"aria-label":"Select all","data-testid":c.getIsSomeRowsSelected()&&!c.getIsAllRowsSelected()?"select-partial":"select-all"})},cell:({row:c})=>{const w=(i==null?void 0:i(c.original))??!1;return a.jsx(Fe,{checked:c.getIsSelected(),disabled:w,onChange:f=>{w||c.toggleSelected(!!f)},"aria-label":String(c.original[o])})},filterable:!1,accessorKey:"select",size:s},...e]:e,[e,n,l,i,u])}};function xc({data:e,columns:t,rowSelection:n}){const{finalColumns:s}=uy({columns:t,rowSelection:n}),r=h.useMemo(()=>{if(!(n!=null&&n.isEnabled))return{};const o={};for(const i of n.selectedRows){const u=e.findIndex(l=>l[n.rowUniqueKey]===i[n.rowUniqueKey]);u!==-1&&(o[u]=!0)}return o},[e,n]);return{finalColumns:s,rowSelectionState:r}}const vc=({table:e,size:t,NoDataContent:n,isLoading:s,CustomLoader:r,isRowDisabled:o})=>{var i;return a.jsx(yc,{children:s?a.jsx(mn,{children:a.jsx(cs,{colSpan:e.getAllColumns().length,className:"wu-text-center wu-h-[35vh] wu-loader-container",children:r||a.jsx(St,{className:"wu-w-full"})})}):(i=e.getRowModel().rows)!=null&&i.length?e.getRowModel().rows.map((u,l)=>{const d=(o==null?void 0:o(u.original))??!1;return a.jsx(mn,{"data-disabled":d,"data-state":u.getIsSelected()&&"selected",className:p("wu-group wu-transition-colors wu-border-b wu-border-black/[12%]",u.getIsSelected()&&"wu-bg-blue-p/[8%]",!d&&(u.getIsSelected()?"hover:wu-bg-blue-p/[16%]":"hover:wu-bg-black/[2%]")),children:u.getVisibleCells().map((c,w)=>a.jsx(cs,{className:p("wu-py-0 wu-font-light wu-text-xs",t==="compact"?"wu-h-8":"wu-h-10",c.column.id==="actions"?"wu-opacity-0 wu-transition-opacity wu-duration-150 wu-ease-in-out group-hover:wu-opacity-100":"",c.column.columnDef.cellAlign==="right"&&"wu-text-right",c.column.columnDef.cellAlign==="center"&&"wu-text-center",c.column.columnDef.cellAlign==="left"&&"wu-text-left"),children:qe.flexRender(c.column.columnDef.cell,c.getContext())},`${c.id}-${w}`))},`${u.id}-${l}`)}):a.jsx(mn,{children:a.jsx(cs,{colSpan:e.getAllColumns().length,children:n})})})},Nc=({table:e,sortableColumns:t,manual:n=!1,onSort:s,size:r,isRowSelected:o,HeaderAction:i,isStickyHeader:u})=>{const l=r==="compact"?"wu-h-8":"wu-h-10",d=c=>{const{id:w,columnDef:f,getIsSorted:m,toggleSorting:g}=c,{header:b}=f;if(!t.includes(w))return b;const x=m(),S=x==="asc",v=x==="desc",T=()=>{n?(g(!v),s==null||s({id:w,desc:v})):g(c.getIsSorted()==="asc")};return a.jsxs("button",{onClick:T,"aria-label":`Sort by ${b}`,className:"wu-flex wu-items-center wu-gap-4",children:[b,a.jsxs("div",{className:"wu-relative",children:[a.jsx("span",{className:p("wu-absolute -wu-top-[15px] wm-arrow-drop-down wu-text-xl",S&&"wu-hidden",!x&&"-wu-top-[11px]")}),a.jsx("span",{className:p("wu-absolute -wu-bottom-[13px] wm-arrow-drop-up wu-text-xl",v&&"wu-hidden",!x&&"-wu-bottom-[10px]")})]})]})};return a.jsxs(bc,{className:p("wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative",u&&"wu-sticky wu-top-[-.5px] wu-z-10",l),children:[e.getHeaderGroups().map(c=>a.jsx(mn,{className:"wu-relative",children:c.headers.map(w=>w.column.id==="actions"?a.jsx(xa,{colSpan:w.colSpan,className:"wu-text-xs wu-font-medium",style:{width:`${w.getSize()}px`}},w.id):a.jsx(xa,{colSpan:w.colSpan,className:p("wu-text-xs wu-font-medium wu-bg-[#EEEEEE]","wu-relative wu-z-0",w.column.columnDef.headerAlign==="right"&&"wu-text-right",w.column.columnDef.headerAlign==="center"&&"wu-text-center",w.column.columnDef.headerAlign==="left"&&"wu-text-left"),style:{width:`${w.getSize()}px`},children:qe.flexRender(d(w.column),w.getContext())},w.id))},c.id)),o&&i&&a.jsxs("div",{className:p("wu-absolute wu-top-[-1px] wu-left-0 wu-right-0 wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20 wu-z-10",l),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-px-4",style:{width:e.getVisibleLeafColumns()[0].getSize()},children:a.jsx(Fe,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:c=>{e.toggleAllRowsSelected(!!c)},"aria-label":"Select all","data-testid":"select-all-header-checkbox"})}),a.jsx("div",{className:"wu-flex-1 wu-flex wu-pr-4",children:i})]})]})},Sc=_e.cva("",{variants:{variant:{striped:"[&_tr:nth-child(even)]:wu-bg-zinc-50",unstyled:"",bordered:"wu-border-collapse wu-border [&_th]:wu-border [&_td]:wu-border"}}}),ly=({data:e,columns:t,isLoading:n=!1,variant:s="unstyled",sort:r,size:o,rowSelection:i,HeaderAction:u,NoDataContent:l,stickyHeader:d=!1,CustomLoader:c,caption:w,...f})=>{var T;const{finalColumns:m,rowSelectionState:g}=xc({data:e,columns:t,rowSelection:i}),b=h.useMemo(()=>m.filter(N=>N.enableSorting).map(N=>N.accessorKey),[m]),x=((T=i==null?void 0:i.selectedRows)==null?void 0:T.length)??0,S=N=>{if(typeof N=="function"){const C=N(g),D=Object.keys(C).filter(M=>C[Number(M)]).map(M=>e[Number(M)]);i==null||i.onRowSelect(D)}},v=qe.useReactTable({data:e,columns:m,getCoreRowModel:qe.getCoreRowModel(),getPaginationRowModel:qe.getPaginationRowModel(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:i==null?void 0:i.isEnabled,state:{...i!=null&&i.isEnabled?{rowSelection:g}:{}},onRowSelectionChange:S});return a.jsxs("div",{className:p("wu-text-gray-lead wu-table-container wu-relative"),children:[w&&a.jsx(va,{className:"wu-font-light",children:w}),a.jsxs(ya,{...f,className:p(Sc({variant:s}),f.className),children:[a.jsx(Nc,{table:v,sortableColumns:b,manual:!0,onSort:r==null?void 0:r.onSort,size:o,HeaderAction:u,isRowSelected:x>0,isStickyHeader:d}),!n&&a.jsx(vc,{table:v,size:o,NoDataContent:l,CustomLoader:c})]}),n&&a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-h-96",children:a.jsx(St,{})})]})},cy=({data:e,columns:t,variant:n="unstyled",size:s="default",sort:r,filterText:o,pagination:i,stickyHeader:u,HeaderAction:l,CustomLoader:d,NoDataContent:c,isLoading:w,caption:f,rowSelection:m,...g})=>{var A;const[b,x]=h.useState((r==null?void 0:r.initial)||[]),[S,v]=h.useState([]),[T,N]=h.useState((i==null?void 0:i.pageIndex)??0),{finalColumns:C,rowSelectionState:D}=xc({data:e,columns:t,rowSelection:m}),M=h.useMemo(()=>C.filter(V=>V.enableSorting).map(V=>V.accessorKey),[C]),I=h.useMemo(()=>C.filter(V=>V.filterable).map(V=>V.accessorKey),[C]),k=((A=m==null?void 0:m.selectedRows)==null?void 0:A.length)??0,F=V=>{const W=typeof V=="function"?V(D):V,_=[],q=m==null?void 0:m.isRowDisabled;for(const B in W){if(!W[B])continue;const U=e[Number(B)];U&&(q!=null&&q(U)||_.push(U))}m==null||m.onRowSelect(_)},P=qe.useReactTable({data:e,columns:C,getCoreRowModel:qe.getCoreRowModel(),getFilteredRowModel:qe.getFilteredRowModel(),getSortedRowModel:qe.getSortedRowModel(),getPaginationRowModel:i?qe.getPaginationRowModel():void 0,enableRowSelection:m!=null&&m.isRowDisabled?V=>!m.isRowDisabled(V.original):!0,state:{sorting:b,columnFilters:S,...i?{pagination:i}:{},...m!=null&&m.isEnabled?{rowSelection:D}:{}},onSortingChange:x,onColumnFiltersChange:v,onRowSelectionChange:F});return h.useEffect(()=>{I.forEach(V=>{var W;(W=P.getColumn(V))==null||W.setFilterValue(o)})},[o,I,P]),h.useEffect(()=>{i&&(i==null?void 0:i.pageIndex)!==T&&(m==null||m.onRowSelect(()=>[]),P.resetRowSelection(),N(i.pageIndex))},[i==null?void 0:i.pageIndex]),a.jsx("div",{className:"wu-text-gray-lead wu-table-container wu-relative",children:a.jsxs(ya,{...g,className:p("wu-overflow-x-auto wu-w-full",Sc({variant:n}),"wu-table-fixed",g.className),children:[f&&a.jsx(va,{children:f}),a.jsx(Nc,{table:P,sortableColumns:M,size:s,HeaderAction:l,isRowSelected:k>0,isStickyHeader:u}),a.jsx(vc,{table:P,size:s,NoDataContent:c,CustomLoader:d,isLoading:w,isRowDisabled:m==null?void 0:m.isRowDisabled})]})})},Cc=y.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:p("wu-flex wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-text-gray-lead wu-p-2 wu-text-sm wu-font-normal wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light focus-visible:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle focus:wu-border-blue-p wu-transition-colors hover:wu-border-gray-40 ",e),ref:n,...t}));Cc.displayName="Textarea";const Tc=h.forwardRef((e,t)=>{const{Label:n,id:s=Cn(),variant:r="flat",readonly:o,maxLength:i,labelPosition:u="top",...l}=e,d=w=>{l.onChange&&l.onChange(w)},c=zt(u);return a.jsxs("div",{className:p(c,"wu-flex wu-textarea-container"),dir:l.dir,children:[a.jsx(Cc,{...l,ref:t,id:s,className:p("wu-peer wu-rounded-t-sm",r==="outlined"?"wu-border wu-border-gray-subtle":"",l.className),onChange:d,readOnly:o,maxLength:i}),n&&a.jsx(Te,{htmlFor:s,className:"wu-textarea-label",children:n})]})});Tc.displayName="WuTextarea";function dy(e){if(typeof e=="string"&&e.includes("T")){const t=Y.parseISO(e);return Y.format(t,"HH:mm")}if(typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)){const t=Y.parse(e,"HH:mm:ss",new Date);return Y.format(t,"HH:mm")}return typeof e=="string"&&/^\d{2}:\d{2}$/.test(e)?e:"00:00"}const Ec=["12",...Array.from({length:11},(e,t)=>String(t+1).padStart(2,"0"))],Mc=Array.from({length:60},(e,t)=>String(t).padStart(2,"0")),Ic=["am","pm"],ds=50;function wy(e){return Array(ds).fill(e).flat()}function Na(e,t){const n=e.indexOf(t);return[...e.slice(n),...e.slice(0,n)]}function fy(e,t){let n=Number(e);return t==="pm"&&n<12&&(n+=12),t==="am"&&n===12&&(n=0),String(n).padStart(2,"0")}function Ac(e){const t=Number(e),n=t>=12?"pm":"am",s=t%12===0?12:t%12;return{hour:String(s),meridiem:n}}const py=({value:e,isSelected:t,onClick:n})=>a.jsx("div",{onClick:n,className:p("wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-text-center wu-snap-start wu-rounded-[2px] wu-cursor-pointer hover:wu-bg-blue-p hover:wu-text-white",t&&"wu-bg-blue-p/15 wu-text-blue-p"),children:e}),Sa=({values:e,selectedValue:t,scrollRef:n,onSelect:s,repeatItems:r=!0,className:o})=>a.jsx("div",{ref:n,className:p("wu-overflow-y-scroll wu-w-8 wu-snap-y wu-snap-mandatory [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",o),role:"presentation",children:(r?wy(e):e).map((i,u)=>a.jsx(py,{value:i,isSelected:i===t,onClick:()=>s(i)},`${i}-${u}`))});function hy(e,t,n,s){const r=h.useMemo(()=>e?Na(Ec,t.padStart(2,"0")):Ec,[e]),o=h.useMemo(()=>e?Na(Mc,n.padStart(2,"0")):Mc,[e]),i=h.useMemo(()=>e?Na(Ic,s):Ic,[e]);return{rotatedHours:r,rotatedMinutes:o,rotatedMeridiem:i}}function my(e,t,n){h.useEffect(()=>{function s(i){if(i){const u=i.scrollHeight/ds,l=Math.floor(ds/2);i.scrollTop=l*u;const d=()=>{const{scrollTop:c}=i,w=Math.round(c/u);(w<=1||w>=ds-2)&&(i.scrollTop=l*u)};return i.addEventListener("scroll",d),()=>{i.removeEventListener("scroll",d)}}}if(!e)return;const r=s(t.current),o=s(n.current);return()=>{r==null||r(),o==null||o()}},[e,t,n])}const Dc=({className:e,time:t,Label:n,labelPosition:s,dir:r,...o})=>{const[i,u]=h.useState(!1),[l,d]=h.useState(""),c=h.useRef(null),w=h.useRef(null),f=h.useRef(null),m=h.useRef(null),[g,b]=h.useState("12"),[x,S]=h.useState("00"),[v,T]=h.useState("am");h.useEffect(()=>{if(!t){d(""),b("12"),S("00"),T("am"),c.current&&(c.current.value="");return}const I=dy(t);d(I);const[k,F]=I.split(":"),{hour:P,meridiem:A}=Ac(k);b(P),S(F),T(A),c.current&&(c.current.value=I)},[t]),h.useEffect(()=>{const I=k=>{w.current&&!w.current.contains(k.target)&&u(!1)};return document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[]),my(i,f,m);const{rotatedHours:N,rotatedMinutes:C,rotatedMeridiem:D}=hy(i,g,x,v),M=h.useCallback((I,k,F)=>{const P=I??g,A=k??x,V=F??v;b(P),S(A),T(V);const W=`${fy(P,V)}:${A}`;d(W)},[g,x,v]);return a.jsxs("div",{className:p("wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col",(s==="right"||s==="left")&&"wu-items-center",s==="left"&&"wu-flex-row",s==="right"&&"wu-flex-row-reverse","wu-input-wrapper"),dir:r,children:[n&&a.jsx(Te,{htmlFor:"time-picker",className:"wu-timepicker-label",children:n}),a.jsxs("div",{className:p("relative inline-block"),ref:w,dir:r,children:[a.jsx(Ge,{ref:c,type:"time",value:l,variant:"flat",role:"textbox",onChange:I=>{d(I.target.value);const[k,F]=I.target.value.split(":"),{hour:P,meridiem:A}=Ac(k);b(P),S(F),T(A)},className:"wu-w-[136px] wu-h-8 wu-pr-6 wu-border wu-border-lead/40 wu-text-gray-lead wu-timepicker-input",style:{WebkitAppearance:"none",MozAppearance:"textfield"},Icon:a.jsx(Ve,{icon:"wm-schedule",className:p("wu-text-base",o.disabled&&"wu-text-lead/50 wu-pointer-events-none wu-opacity-50"),onClick:()=>u(I=>!I),"data-testid":"wu-timepicker-icon"}),iconPosition:"right",dir:r,...o}),a.jsx("style",{children:`
|
|
18
|
+
`))},[JSON.stringify(t)])}const l=y.useCallback(d=>{r||i(d)},[]);return[u,l]}const re=typeof document<"u"?y.useLayoutEffect:()=>{},ht={...y};let ll=0;function Ig(e,t="mui"){const[n,s]=y.useState(e),r=e||n;return y.useEffect(()=>{n==null&&(ll+=1,s(`${t}-${ll}`))},[n,t]),r}const cl=ht.useId;function Ag(e,t){if(cl!==void 0){const n=cl();return e??(t?`${t}-${n}`:n)}return Ig(e,t)}function dl(e){return Ag(e,"base-ui")}const Qn="none",Dg="trigger-press",ea="input-change",sn="input-clear",Rn="input-blur",ta="input-paste",rn="keyboard";function Ie(e,t,n,s){let r=!1,o=!1;const i=s??Ue;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){o=!0},get isCanceled(){return r},get isPropagationAllowed(){return o},trigger:n,...i}}function an(e,t,n){const s=Ue;return{reason:e,event:t??new Event("base-ui"),...s}}const kg=[];function es(e){y.useEffect(e,kg)}const ts=null;let wl=globalThis.requestAnimationFrame;class Pg{constructor(){Ne(this,"callbacks",[]);Ne(this,"callbacksCount",0);Ne(this,"nextId",1);Ne(this,"startId",1);Ne(this,"isScheduled",!1);Ne(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,s=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,s>0)for(let o=0;o<n.length;o+=1)(r=n[o])==null||r.call(n,t)})}request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const s=process.env.NODE_ENV!=="production"&&wl!==requestAnimationFrame&&(wl=requestAnimationFrame,!0);return(!this.isScheduled||s)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const ns=new Pg;class oe{constructor(){Ne(this,"currentId",ts);Ne(this,"cancel",()=>{this.currentId!==ts&&(ns.cancel(this.currentId),this.currentId=ts)});Ne(this,"disposeEffect",()=>this.cancel)}static create(){return new oe}static request(t){return ns.request(t)}static cancel(t){return ns.cancel(t)}request(t){this.cancel(),this.currentId=ns.request(()=>{this.currentId=ts,t()})}}function fl(){const e=nt(oe.create).current;return es(e.disposeEffect),e}function _g(e){return e==null?e:"current"in e?e.current:e}let on=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Vg={[on.startingStyle]:""},Og={[on.endingStyle]:""},pl={transitionStatus(e){return e==="starting"?Vg:e==="ending"?Og:null}};function hl(e,t=!1,n=!0){const s=fl();return he((r,o=null)=>{s.cancel();function i(){Pa.flushSync(r)}const u=_g(e);if(u==null)return;const l=u;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)r();else{let d=function(){const w=on.startingStyle;if(!l.hasAttribute(w)){s.request(c);return}const f=new MutationObserver(()=>{l.hasAttribute(w)||(f.disconnect(),c())});f.observe(l,{attributes:!0,attributeFilter:[w]}),o==null||o.addEventListener("abort",()=>f.disconnect(),{once:!0})},c=function(){Promise.all(l.getAnimations().map(w=>w.finished)).then(()=>{o!=null&&o.aborted||i()}).catch(()=>{const w=l.getAnimations();if(n){if(o!=null&&o.aborted)return;i()}else w.length>0&&w.some(f=>f.pending||f.playState!=="finished")&&c()})};if(t){d();return}s.request(c)}})}function Fg(e,t=!1,n=!1){const[s,r]=y.useState(e&&t?"idle":void 0),[o,i]=y.useState(e);return e&&!o&&(i(!0),r("starting")),!e&&o&&s!=="ending"&&!n&&r("ending"),!e&&!o&&s==="ending"&&r(void 0),re(()=>{if(!e&&o&&s!=="ending"&&n){const u=oe.request(()=>{r("ending")});return()=>{oe.cancel(u)}}},[e,o,s,n]),re(()=>{if(!e||t)return;const u=oe.request(()=>{r(void 0)});return()=>{oe.cancel(u)}},[t,e]),re(()=>{if(!e||!t)return;e&&o&&s!=="idle"&&r("starting");const u=oe.request(()=>{r("idle")});return()=>{oe.cancel(u)}},[t,e,o,r,s]),y.useMemo(()=>({mounted:o,setMounted:i,transitionStatus:s}),[o,s])}function Lg(e){const{open:t,defaultOpen:n,onOpenChange:s,disabled:r}=e,o=t!==void 0,[i,u]=ul({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:l,setMounted:d,transitionStatus:c}=Fg(i,!0,!0),[w,f]=y.useState(i),[{height:m,width:g},b]=y.useState({height:void 0,width:void 0}),x=dl(),[S,v]=y.useState(),T=S??x,[N,C]=y.useState(!1),[D,M]=y.useState(!1),I=y.useRef(null),k=y.useRef(null),F=y.useRef(null),P=y.useRef(null),A=hl(P,!1),V=he(W=>{const _=!i,q=Ie(Dg,W.nativeEvent);if(s(_,q),q.isCanceled)return;const B=P.current;k.current==="css-animation"&&B!=null&&B.style.removeProperty("animation-name"),!N&&!D&&(k.current!=null&&k.current!=="css-animation"&&!l&&_&&d(!0),k.current==="css-animation"&&(!w&&_&&f(!0),!l&&_&&d(!0))),u(_),k.current==="none"&&l&&!_&&d(!1)});return re(()=>{o&&k.current==="none"&&!D&&!i&&d(!1)},[o,D,i,t,d]),y.useMemo(()=>({abortControllerRef:I,animationTypeRef:k,disabled:r,handleTrigger:V,height:m,mounted:l,open:i,panelId:T,panelRef:P,runOnceAnimationsFinish:A,setDimensions:b,setHiddenUntilFound:C,setKeepMounted:M,setMounted:d,setOpen:u,setPanelIdState:v,setVisible:f,transitionDimensionRef:F,transitionStatus:c,visible:w,width:g}),[I,k,r,V,m,l,i,T,P,A,b,C,M,d,u,f,F,c,w,g])}const na=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(na.displayName="CollapsibleRootContext");function ml(){const e=y.useContext(na);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.":tn(15));return e}let un=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=on.startingStyle]="startingStyle",e[e.endingStyle=on.endingStyle]="endingStyle",e})({}),Wg=(function(e){return e.panelOpen="data-panel-open",e})({});const Bg={[un.open]:""},qg={[un.closed]:""},zg={open(e){return e?{[Wg.panelOpen]:""}:null}},gl={...{open(e){return e?Bg:qg}},...pl},bl=y.forwardRef(function(t,n){const{render:s,className:r,defaultOpen:o=!1,disabled:i=!1,onOpenChange:u,open:l,...d}=t,c=he(u),w=Lg({open:l,defaultOpen:o,onOpenChange:c,disabled:i}),f=y.useMemo(()=>({open:w.open,disabled:w.disabled,transitionStatus:w.transitionStatus}),[w.open,w.disabled,w.transitionStatus]),m=y.useMemo(()=>({...w,onOpenChange:c,state:f}),[w,c,f]),g=st("div",t,{state:f,ref:n,props:d,stateAttributesMapping:gl});return a.jsx(na.Provider,{value:m,children:g})});process.env.NODE_ENV!=="production"&&(bl.displayName="CollapsibleRoot");function yl(){return typeof window<"u"}function sa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $g(e){return yl()?e instanceof Element||e instanceof sa(e).Element:!1}function Hg(e){return yl()?e instanceof HTMLElement||e instanceof sa(e).HTMLElement:!1}let ra;process.env.NODE_ENV!=="production"&&(ra=new Set);function xl(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ra.has(t)||(ra.add(t),console.error(`Base UI: ${t}`))}}const vl=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(vl.displayName="CompositeRootContext");function Ug(e=!1){const t=y.useContext(vl);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":tn(16));return t}function jg(e){const{focusableWhenDisabled:t,disabled:n,composite:s=!1,tabIndex:r=0,isNativeButton:o}=e,i=s&&t!==!1,u=s&&t===!1;return{props:y.useMemo(()=>{const d={onKeyDown(c){n&&t&&c.key!=="Tab"&&c.preventDefault()}};return s||(d.tabIndex=r,!o&&n&&(d.tabIndex=t?r:-1)),(o&&(t||i)||!o&&n)&&(d["aria-disabled"]=n),o&&(!t||u)&&(d.disabled=n),d},[s,n,t,i,u,o,r])}}function aa(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:s=0,native:r=!0}=e,o=y.useRef(null),i=Ug(!0)!==void 0,u=he(()=>{const f=o.current;return!!((f==null?void 0:f.tagName)==="A"&&(f!=null&&f.href))}),{props:l}=jg({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:s,isNativeButton:r});process.env.NODE_ENV!=="production"&&y.useEffect(()=>{var m,g;if(!o.current)return;const f=o.current.tagName==="BUTTON";if(r){if(!f){const b=((m=ht.captureOwnerStack)==null?void 0:m.call(ht))||"";xl(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${b}`)}}else if(f){const b=((g=ht.captureOwnerStack)==null?void 0:g.call(ht))||"";xl(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${b}`)}},[r]);const d=y.useCallback(()=>{const f=o.current;Gg(f)&&i&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,i]);re(d,[d]);const c=y.useCallback((f={})=>{const{onClick:m,onMouseDown:g,onKeyUp:b,onKeyDown:x,onPointerDown:S,...v}=f;return al({type:r?"button":void 0,onClick(N){if(t){N.preventDefault();return}m==null||m(N)},onMouseDown(N){t||g==null||g(N)},onKeyDown(N){if(t||(Rr(N),x==null||x(N)),N.baseUIHandlerPrevented)return;const C=N.target===N.currentTarget&&!r&&!u()&&!t,D=N.key==="Enter",M=N.key===" ";C&&((M||D)&&N.preventDefault(),D&&(m==null||m(N)))},onKeyUp(N){t||(Rr(N),b==null||b(N)),!N.baseUIHandlerPrevented&&N.target===N.currentTarget&&!r&&!t&&N.key===" "&&(m==null||m(N))},onPointerDown(N){if(t){N.preventDefault();return}S==null||S(N)}},r?void 0:{role:"button"},l,v)},[t,l,r,u]),w=he(f=>{o.current=f,d()});return{getButtonProps:c,buttonRef:w}}function Gg(e){return Hg(e)&&e.tagName==="BUTTON"}const Kg={...zg,...pl},Nl=y.forwardRef(function(t,n){const{panelId:s,open:r,handleTrigger:o,state:i,disabled:u}=ml(),{className:l,disabled:d=u,id:c,render:w,nativeButton:f=!0,...m}=t,{getButtonProps:g,buttonRef:b}=aa({disabled:d,focusableWhenDisabled:!0,native:f}),x=y.useMemo(()=>({"aria-controls":r?s:void 0,"aria-expanded":r,onClick:o}),[s,r,o]);return st("button",t,{state:i,ref:[n,b],props:[x,m,g],stateAttributesMapping:Kg})});process.env.NODE_ENV!=="production"&&(Nl.displayName="CollapsibleTrigger");let oa;process.env.NODE_ENV!=="production"&&(oa=new Set);function Sl(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");oa.has(t)||(oa.add(t),console.warn(`Base UI: ${t}`))}}let Yg=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function Xg(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:s,height:r,hiddenUntilFound:o,keepMounted:i,id:u,mounted:l,onOpenChange:d,open:c,panelRef:w,runOnceAnimationsFinish:f,setDimensions:m,setMounted:g,setOpen:b,setVisible:x,transitionDimensionRef:S,visible:v,width:T}=e,N=y.useRef(!1),C=y.useRef(null),D=y.useRef(c),M=y.useRef(c),I=fl(),k=y.useMemo(()=>n.current==="css-animation"?!v:!c&&!l,[c,l,v,n]),F=he(A=>{if(!A)return;if(n.current==null||S.current==null){const _=getComputedStyle(A),q=_.animationName!=="none"&&_.animationName!=="",B=_.transitionDuration!=="0s"&&_.transitionDuration!=="";q&&B?process.env.NODE_ENV!=="production"&&Sl("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.","Only one of either animation type should be used."):_.animationName==="none"&&_.transitionDuration!=="0s"?n.current="css-transition":_.animationName!=="none"&&_.transitionDuration==="0s"?n.current="css-animation":n.current="none",A.getAttribute(Yg.orientation)==="horizontal"||_.transitionProperty.indexOf("width")>-1?S.current="width":S.current="height"}if(n.current!=="css-transition")return;(r===void 0||T===void 0)&&(m({height:A.scrollHeight,width:A.scrollWidth}),M.current&&A.style.setProperty("transition-duration","0s"));let V=-1,W=-1;return V=oe.request(()=>{M.current=!1,W=oe.request(()=>{setTimeout(()=>{A.style.removeProperty("transition-duration")})})}),()=>{oe.cancel(V),oe.cancel(W)}}),P=Zn(s,w,F);return re(()=>{if(n.current!=="css-transition")return;const A=w.current;if(!A)return;let V=-1;if(t.current!=null&&(t.current.abort(),t.current=null),c){const W={"justify-content":A.style.justifyContent,"align-items":A.style.alignItems,"align-content":A.style.alignContent,"justify-items":A.style.justifyItems};Object.keys(W).forEach(_=>{A.style.setProperty(_,"initial","important")}),!M.current&&!i&&A.setAttribute(un.startingStyle,""),m({height:A.scrollHeight,width:A.scrollWidth}),V=oe.request(()=>{Object.entries(W).forEach(([_,q])=>{q===""?A.style.removeProperty(_):A.style.setProperty(_,q)})})}else{if(A.scrollHeight===0&&A.scrollWidth===0)return;m({height:A.scrollHeight,width:A.scrollWidth});const W=new AbortController;t.current=W;const _=W.signal;let q=null;const B=un.endingStyle;return q=new MutationObserver(U=>{U.some(H=>H.type==="attributes"&&H.attributeName===B)&&(q==null||q.disconnect(),q=null,f(()=>{m({height:0,width:0}),A.style.removeProperty("content-visibility"),g(!1),t.current===W&&(t.current=null)},_))}),q.observe(A,{attributes:!0,attributeFilter:[B]}),()=>{q==null||q.disconnect(),I.cancel(),t.current===W&&(W.abort(),t.current=null)}}return()=>{oe.cancel(V)}},[t,n,I,o,i,l,c,w,f,m,g]),re(()=>{if(n.current!=="css-animation")return;const A=w.current;A&&(C.current=A.style.animationName||C.current,A.style.setProperty("animation-name","none"),m({height:A.scrollHeight,width:A.scrollWidth}),!D.current&&!N.current&&A.style.removeProperty("animation-name"),c?(t.current!=null&&(t.current.abort(),t.current=null),g(!0),x(!0)):(t.current=new AbortController,f(()=>{g(!1),x(!1),t.current=null},t.current.signal)))},[t,n,c,w,f,m,g,x,v]),es(()=>{const A=oe.request(()=>{D.current=!1});return()=>oe.cancel(A)}),re(()=>{if(!o)return;const A=w.current;if(!A)return;let V=-1,W=-1;return c&&N.current&&(A.style.transitionDuration="0s",m({height:A.scrollHeight,width:A.scrollWidth}),V=oe.request(()=>{N.current=!1,W=oe.request(()=>{setTimeout(()=>{A.style.removeProperty("transition-duration")})})})),()=>{oe.cancel(V),oe.cancel(W)}},[o,c,w,m]),re(()=>{const A=w.current;A&&o&&k&&(A.setAttribute("hidden","until-found"),n.current==="css-transition"&&A.setAttribute(un.startingStyle,""))},[o,k,n,w]),y.useEffect(function(){const V=w.current;if(!V)return;function W(_){N.current=!0,b(!0),d(!0,Ie(Qn,_))}return V.addEventListener("beforematch",W),()=>{V.removeEventListener("beforematch",W)}},[d,w,b]),y.useMemo(()=>({props:{hidden:k,id:u,ref:P}}),[k,u,P])}let Cl=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});function Zg(e){const{enabled:t=!0,open:n,ref:s,onComplete:r}=e,o=he(r),i=hl(s,n,!1);y.useEffect(()=>{if(!t)return;const u=new AbortController;return i(o,u.signal),()=>{u.abort()}},[t,n,o,i])}const Tl=y.forwardRef(function(t,n){const{className:s,hiddenUntilFound:r,keepMounted:o,render:i,id:u,...l}=t;process.env.NODE_ENV!=="production"&&re(()=>{r&&o===!1&&Sl("The `keepMounted={false}` prop on a Collapsible will be ignored when using `hiddenUntilFound` since it requires the Panel to remain mounted even when closed.")},[r,o]);const{abortControllerRef:d,animationTypeRef:c,height:w,mounted:f,onOpenChange:m,open:g,panelId:b,panelRef:x,runOnceAnimationsFinish:S,setDimensions:v,setHiddenUntilFound:T,setKeepMounted:N,setMounted:C,setPanelIdState:D,setOpen:M,setVisible:I,state:k,transitionDimensionRef:F,visible:P,width:A,transitionStatus:V}=ml(),W=r??!1,_=o??!1;re(()=>{if(u)return D(u),()=>{D(void 0)}},[u,D]),re(()=>{T(W)},[T,W]),re(()=>{N(_)},[N,_]);const{props:q}=Xg({abortControllerRef:d,animationTypeRef:c,externalRef:n,height:w,hiddenUntilFound:W,id:b,keepMounted:_,mounted:f,onOpenChange:m,open:g,panelRef:x,runOnceAnimationsFinish:S,setDimensions:v,setMounted:C,setOpen:M,setVisible:I,transitionDimensionRef:F,visible:P,width:A});Zg({open:g&&V==="idle",ref:x,onComplete(){g&&v({height:void 0,width:void 0})}});const B=y.useMemo(()=>({...k,transitionStatus:V}),[k,V]),U=st("div",t,{state:B,ref:[n,x],props:[q,{style:{[Cl.collapsiblePanelHeight]:w===void 0?"auto":`${w}px`,[Cl.collapsiblePanelWidth]:A===void 0?"auto":`${A}px`}},l],stateAttributesMapping:gl});return _||W||!_&&f?U:null});process.env.NODE_ENV!=="production"&&(Tl.displayName="CollapsiblePanel");const Jg=({children:e,Sidebar:t,className:n,defaultOpen:s=!0,open:r,onOpenChange:o,style:i})=>a.jsxs(Hu,{defaultOpen:s,open:r,onOpenChange:o,children:[a.jsxs(Uu,{variant:"sidebar",collapsible:"icon",className:p("wu-top-12 wu-h-[calc(100%-48px)] wu-shadow-sidebar wu-border-none",n),style:i,role:"complementary",children:[a.jsx(Ku,{className:"wu-py-2",children:a.jsx(El,{})}),t]}),a.jsx(Gu,{className:"wu-contain-inline-size",children:e})]}),El=e=>{const{state:t,isMobile:n,openMobile:s}=tt();return a.jsx(ju,{...e,children:a.jsx($r,{showMenu:n?s:t==="expanded"})})},Qg=({className:e,children:t,...n})=>{const s=h.useRef(null),r=h.useRef(null),o=({currentTarget:u})=>{const{scrollTop:l,clientHeight:d,scrollHeight:c}=u;s.current&&s.current.classList.toggle("wu-border-[#1b338014]",l!==0),r.current&&r.current.classList.toggle("wu-border-[#1b338014]",l+d!==c)},i="wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent";return a.jsxs(Xu,{...n,className:p("wu-overflow-hidden wu-gap-0",e),children:[a.jsx("hr",{className:i,ref:s}),a.jsx(Vt,{onScroll:o,className:"wu-gap-2",thumbColor:"#b9c3dc",railColor:"#00000000","data-testid":"scroll-area",children:t}),a.jsx("hr",{className:i,ref:r})]})},Rg=e=>a.jsx(Yu,{...e,children:e.children}),eb=({label:e,children:t,...n})=>a.jsxs(Zu,{...n,className:"wu-p-0",children:[a.jsx("div",{className:"wu-h-8",children:a.jsx(Ju,{className:"wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q",children:e})}),a.jsx(Qu,{children:a.jsx(Xr,{children:t})})]}),tb=e=>a.jsx(Xr,{...e}),Ml=({Icon:e,children:t,className:n,isActive:s,...r})=>{var w;const{state:o}=tt(),[i,u]=h.useState(),l=Yr(),d=h.isValidElement(t)?h.cloneElement(t,{children:a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[e,a.jsx("span",{className:p("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:(w=t.props)==null?void 0:w.children})]})}):t&&a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-overflow-hidden wu-text-base wu-truncate wu-text-ellipsis",children:[e,a.jsx("span",{className:p("wu-text-sm wu-leading-4 wu-transition-opacity wu-duration-150",o==="collapsed"&&!l&&"wu-opacity-0"),children:t})]}),c=h.useRef(null);return h.useEffect(()=>{var f;u(((f=c.current)==null?void 0:f.textContent)||"")},[]),a.jsx(Ru,{...r,className:"wu-flex wu-items-center wu-gap-2 wu-px-2",children:a.jsx(el,{className:p("wu-flex wu-items-center wu-text-blue-q hover:wu-bg-blue-sidebarHover wu-cursor-pointer wu-h-8 wu-rounded-sm",n,s&&"wu-bg-white wu-shadow-[4px_4px_16px_0_#1B338014] wu-font-medium wu-text-blue-p hover:wu-bg-white wu-cursor-default"),isActive:s,tooltip:i,asChild:h.isValidElement(t),ref:c,children:d})})},nb=({Title:e,Icon:t,children:n,className:s,...r})=>{const{state:o}=tt(),i=Yr();return a.jsxs(bl,{children:[a.jsx(Nl,{render:u=>{const l="data-panel-open"in u;return a.jsxs(Ml,{Icon:t,...u,children:[e,(o==="expanded"||i)&&a.jsx(Ve,{icon:"wm-arrow-forward-ios",className:p("wu-absolute wu-right-4 wu-transition-transform wu-duration-300",l&&"wu-rotate-90","wu-scale-75")})]})}}),a.jsx(Tl,{className:p(o==="collapsed"?"":"wu-pl-2","wu-h-[var(--collapsible-panel-height)] wu-overflow-hidden","wu-transition-all wu-duration-300 wu-ease-in-out","data-[starting-style]:wu-h-0 data-[ending-style]:wu-h-0",'[&[hidden]:not([hidden="until-found"])]:wu-hidden',s),...r,children:n})]})},sb=new Map([[-3,{top:-20,left:-4,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-2,{top:0,left:0,zIndex:1,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[-1,{top:20,left:4,zIndex:2,opacity:1,transition:"all 0.3s ease-in-out, z-index 0s",position:"absolute"}],[0,{top:40,left:8,zIndex:3,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.10s",position:"absolute"}],[1,{left:12,zIndex:4,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[2,{left:16,zIndex:5,opacity:1,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}],[3,{left:20,zIndex:-1,opacity:0,transition:"all 0.3s ease-in-out, z-index 0.3s 0.10s",position:"absolute"}]]),ia=(e,t,n=1)=>{const s=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!s)throw new Error("Invalid HSL color format");const r=parseFloat(s[1]),o=parseFloat(s[2]),i=Math.max(0,parseFloat(s[3])+t);return`hsl(${r} ${o}% ${i}% / ${n})`},rb=({index:e,viewIndex:t,length:n,itemHeight:s})=>{const r=(e-t+n)%n;let o;r===0?o=0:r===n-1&&n>=2?o=-1:r===n-2&&n>=3?o=-2:r===1?o=1:r===2?o=2:r===n-3&&n>=4?o=-3:o=3;const i=sb.get(o)||{},u=o>0?s+28+(o-1)*20:i.top;return{position:o,styles:{...i,...o>0&&{top:`${u}px`},height:o>0?"32px":s}}},ln={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_HEIGHT:"calc(100% - 2rem)",FONT_SIZE_ACTIVE:"14px",FONT_SIZE_INACTIVE:"12px"},ab=({children:e,className:t,header:n,baseColor:s,position:r=0,style:o,...i})=>{const u=r<=0,l=r===0,d={border:l?`4px solid ${ia(s,ln.BORDER_LIGHTNESS)}`:"",...o},c={backgroundColor:ia(s,r*ln.LIGHTNESS_STEP),fontSize:l?ln.FONT_SIZE_ACTIVE:ln.FONT_SIZE_INACTIVE,transition:"all 0.3s ease",position:"relative",bottom:r<0?"4px":"0px",height:"32px",padding:"4px 8px"},w={backgroundColor:ia(s,45+r*6),height:ln.CONTENT_HEIGHT,position:"relative",bottom:r<0?"4px":"0px"};return a.jsxs("div",{className:p("wu-font-normal wu-transition-all wu-rounded-lg wu-overflow-hidden wu-w-full wu-cursor-pointer hover:-wu-translate-y-2",t),style:d,...i,children:[a.jsx("div",{style:c,className:"wu-text-white",children:n}),u&&a.jsx("div",{className:"wu-p-2 wu-overflow-y-auto wu-text-sm",style:w,children:e})]})},ob=({children:e,Trigger:t,Header:n,styles:s={},classNames:r={},open:o,onOpenChange:i,itemHeight:u})=>{const l={height:u,...s.Trigger};return a.jsxs(Su,{open:o,onOpenChange:i,children:[a.jsx(Cu,{className:p("wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative",r.Trigger),style:l,children:a.jsx("span",{className:"wu-absolute wu-text-xs wu-font-medium wu-bg-gray-25 -wu-top-6 wu-left-0 wu-p-1 wu-rounded-t-lg",children:t})}),a.jsxs(Hr,{className:p("wu-top-[50%] wu-left-[50%] wu-bg-black/75 wu-backdrop-blur-[4px] wu-min-h-full wu-overflow-auto wu-shadow-none wu-max-w-none wu-border-none wu-text-white",r.Content),hideCloseButton:!0,isStackedCard:!0,style:s.Content,children:[a.jsx(jr,{}),a.jsx(Aa.DialogClose,{className:p("wu-absolute wu-right-2 wu-top-2 wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-z-10",r.CloseButton),style:s.CloseButton,"aria-label":"Close dialog",children:a.jsx(Ve,{icon:"wm-close",className:"wu-text-lg wu-m-4 wu-cursor-pointer"})}),n&&a.jsx(Ur,{className:p("wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]",r.Header),style:s.Header,children:n}),e]})]})},cn=0;class ss{constructor(){Ne(this,"currentId",cn);Ne(this,"clear",()=>{this.currentId!==cn&&(clearTimeout(this.currentId),this.currentId=cn)});Ne(this,"disposeEffect",()=>this.clear)}static create(){return new ss}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=cn,n()},t)}isStarted(){return this.currentId!==cn}}function Il(){const e=nt(ss.create).current;return es(e.disposeEffect),e}const Al=0;class ua extends ss{constructor(){super(...arguments);Ne(this,"clear",()=>{this.currentId!==Al&&(clearInterval(this.currentId),this.currentId=Al)})}static create(){return new ua}start(n,s){this.clear(),this.currentId=setInterval(()=>{s()},n)}}function ib(){const e=nt(ua.create).current;return es(e.disposeEffect),e}function Dl(e){const t=nt(ub,e).current;return t.next=e,re(t.effect),t}function ub(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function lb(){const[,e]=y.useState({});return y.useCallback(()=>{e({})},[])}const kl={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},cb={...kl,position:"fixed",top:0,left:0},db={...kl,position:"absolute"};function wb(e){return(e==null?void 0:e.ownerDocument)||document}const rs=typeof navigator<"u",la=mb(),fb=bb(),pb=gb();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");const hb=la.platform==="MacIntel"&&la.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(la.platform);rs&&fb.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints,pb.includes("jsdom/");function mb(){if(!rs)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function gb(){if(!rs)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function bb(){if(!rs)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const ca=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(ca.displayName="NumberFieldRootContext");function as(){const e=y.useContext(ca);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.":tn(43));return e}let Pl=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const yb={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},_l={valid(e){return e===null?null:e?{[Pl.valid]:""}:{[Pl.invalid]:""}}},Vl=y.createContext({invalid:void 0,name:void 0,validityData:{state:yb,errors:[],error:"",value:"",initialValue:null},setValidityData:Me,disabled:void 0,touched:!1,setTouched:Me,dirty:!1,setDirty:Me,filled:!1,setFilled:Me,focused:!1,setFocused:Me,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Ue)=>e,getInputValidationProps:(e=Ue)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Vl.displayName="FieldRootContext");function da(e=!0){const t=y.useContext(Vl);if(t.setValidityData===Me&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":tn(28));return t}const Ol=y.createContext({controlId:void 0,registerControlId:Me,labelId:void 0,setLabelId:Me,messageIds:[],setMessageIds:Me,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Ol.displayName="LabelableContext");function Fl(){return y.useContext(Ol)}function xb(e={}){const{id:t,implicit:n=!1,controlRef:s}=e,{controlId:r,registerControlId:o}=Fl(),i=dl(t),u=n?r:void 0,l=nt(()=>Symbol("labelable-control")),d=y.useRef(!1),c=y.useRef(t!=null),w=he(()=>{!d.current||o===Me||(d.current=!1,o(l.current,void 0))});return re(()=>{if(o===Me)return;let f;if(n){const m=s==null?void 0:s.current;$g(m)&&m.closest("label")!=null?f=t??null:f=u??i}else if(t!=null)c.current=!0,f=t;else if(c.current)f=i;else{w();return}if(f===void 0){w();return}d.current=!0,o(l.current,f)},[t,s,u,o,n,i,l,w]),y.useEffect(()=>w,[w]),r??i}const dn={inputValue:()=>null,value:()=>null,..._l},Ll=new Map;function wn(e,t){const n=JSON.stringify({locale:e,options:t}),s=Ll.get(n);if(s)return s;const r=new Intl.NumberFormat(e,t);return Ll.set(n,r),r}function Ot(e,t,n){return e==null?"":wn(t,n).format(e)}function Wl(e,t,n){return Ot(e,t,{...n,maximumFractionDigits:20})}const vb=["零","〇","一","二","三","四","五","六","七","八","九"],Nb={零:"0","〇":"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},Bl=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],ql=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],wa=["0","1","2","3","4","5","6","7","8","9"],zl=["%","٪","%","﹪"],$l=["‰","؉"],Hl=["−","-","‒","–","—","﹣"],Ul=["+","﹢"],Sb=".",Cb=",",Tb=new RegExp(`[${Bl.join("")}]`,"g"),Eb=new RegExp(`[${ql.join("")}]`,"g"),Mb=new RegExp(`[${wa.join("")}]`,"g"),Ib=new RegExp(`[${vb.join("")}]`,"g"),Ab=new RegExp(`[${zl.join("")}]`),Db=new RegExp(`[${$l.join("")}]`),fa=/[٠١٢٣٤٥٦٧٨٩]/,jl=/[۰۱۲۳۴۵۶۷۸۹]/,pa=/[零〇一二三四五六七八九]/,Gl=new RegExp(`[${wa.join("")}]`),kb=[".",",",Sb,Cb,"٫","٬"],Kl=new RegExp("\\p{Zs}","u"),Pb=["+",...Ul],_b=["-",...Hl],os=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Vb=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),Yl=e=>`[${e.map(Vb).join("")}]`,Xl=Yl(["-"].concat(Hl)),Zl=Yl(["+"].concat(Ul)),Jl=new RegExp(Xl,"gu"),Ql=new RegExp(Zl,"gu"),fn=new RegExp(Xl),is=new RegExp(Zl);function ha(e,t){const n=wn(e,t).formatToParts(11111.1),s={};return n.forEach(r=>{s[r.type]=r.value}),wn(e).formatToParts(.1).forEach(r=>{r.type==="decimal"&&(s[r.type]=r.value)}),s}function pn(e,t,n){if(e==null)return null;let s=String(e).replace(new RegExp("\\p{Cf}","gu"),"").trim();s=s.replace(Jl,"-").replace(Ql,"+");let r=!1;const o=s.match(/([+-])\s*$/);o&&(o[1]==="-"&&(r=!0),s=s.replace(/([+-])\s*$/,""));const i=s.match(/^\s*([+-])/);i&&(i[1]==="-"&&(r=!0),s=s.replace(/^\s*[+-]/,""));let u=t;u===void 0&&(fa.test(s)||jl.test(s)?u="ar":pa.test(s)&&(u="zh"));const{group:l,decimal:d,currency:c}=ha(u,n),w=wn(u,n).formatToParts(1).filter(M=>M.type==="unit").map(M=>os(M.value)),f=w.length?new RegExp(w.join("|"),"g"):null;let m=null;l&&(new RegExp("\\p{Zs}","u").test(l)?m=new RegExp("\\p{Zs}","gu"):l==="'"||l==="’"?m=/['’]/g:m=new RegExp(os(l),"g"));let b=[{regex:l?m:null,replacement:""},{regex:d?new RegExp(os(d),"g"):null,replacement:"."},{regex:/./g,replacement:"."},{regex:/,/g,replacement:""},{regex:/٫/g,replacement:"."},{regex:/٬/g,replacement:""},{regex:c?new RegExp(os(c),"g"):null,replacement:""},{regex:f,replacement:""},{regex:Tb,replacement:M=>String(Bl.indexOf(M))},{regex:Eb,replacement:M=>String(ql.indexOf(M))},{regex:Mb,replacement:M=>String(wa.indexOf(M))},{regex:Ib,replacement:M=>Nb[M]}].reduce((M,{regex:I,replacement:k})=>I?M.replace(I,k):M,s);const x=b.lastIndexOf(".");if(x!==-1&&(b=`${b.slice(0,x).replace(/\./g,"")}.${b.slice(x+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(s)||/[∞]/.test(s))return null;const S=(r?"-":"")+b;let v=parseFloat(S);const T=n==null?void 0:n.style,N=T==="unit"&&(n==null?void 0:n.unit)==="percent",C=Ab.test(e)||T==="percent";return Db.test(e)?v/=1e3:!N&&C&&(v/=100),Number.isNaN(v)?null:v}const Ob=60,Fb=400,Lb=50,Wb=3,Bb=8,us=1;function qb(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const zb=1e-10;function $b(e){const t=wn("en-US").resolvedOptions(),n=(e==null?void 0:e.minimumFractionDigits)??t.minimumFractionDigits??0;return{maximumFractionDigits:Math.max((e==null?void 0:e.maximumFractionDigits)??t.maximumFractionDigits??20,n),minimumFractionDigits:n}}function Hb(e,t){if(!Number.isFinite(e))return e;const n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function ma(e,t){const{maximumFractionDigits:n}=$b(t);return Hb(e,n)}function Ub(e,t,n,s="directional"){if(n===0)return e;const r=Math.abs(n),o=Math.sign(n),i=r*zb*o,u=s==="nearest"?n:r,l=(e-t+i)/u;let d;return s==="nearest"?d=Math.round(l):o>0?d=Math.floor(l):d=Math.ceil(l),t+d*(s==="nearest"?n:r)}function jb(e,{step:t,minWithDefault:n,maxWithDefault:s,minWithZeroDefault:r,format:o,snapOnStep:i,small:u,clamp:l}){if(e===null)return e;const d=l?qb(e,n,s):e;if(t!=null&&i){if(t===0)return ma(d,o);let c=r;!u&&n!==Number.MIN_SAFE_INTEGER&&(c=n);const w=Ub(d,c,t,u?"nearest":"directional");return ma(w,o)}return ma(d,o)}const Rl=y.forwardRef(function(t,n){const{id:s,min:r,max:o,smallStep:i=.1,step:u=1,largeStep:l=10,required:d=!1,disabled:c=!1,readOnly:w=!1,name:f,defaultValue:m,value:g,onValueChange:b,onValueCommitted:x,allowWheelScrub:S=!1,snapOnStep:v=!1,allowOutOfRange:T=!1,format:N,locale:C,render:D,className:M,inputRef:I,...k}=t,{setDirty:F,validityData:P,disabled:A,setFilled:V,invalid:W,name:_,state:q,validation:B,shouldValidateOnChange:U}=da(),$=A||c,H=_??f,pe=u==="any"?1:u,[de,Ae]=y.useState(!1),ge=r??Number.MIN_SAFE_INTEGER,X=o??Number.MAX_SAFE_INTEGER,L=r??0,j=N==null?void 0:N.style,K=y.useRef(null),z=Zn(I,B.inputRef),J=xb({id:s}),[ie,De]=ul({controlled:g,default:m,name:"NumberField",state:"value"}),Q=ie??null,be=Dl(Q);re(()=>{V(Q!==null)},[V,Q]);const ve=lb(),Be=Dl(N),je=y.useRef(!1),gt=he((Z,G)=>{je.current=!1,x==null||x(Z,G)}),bn=Il(),hs=ib(),yn=Il(),xn=y.useRef(!1),vn=y.useRef(0),Ye=y.useRef(!0),ae=y.useRef(null),rt=y.useRef(()=>{}),[bt,ms]=y.useState(()=>g!==void 0?ec(Q,C,N):Ot(Q,C,N)),[zc,Vy]=y.useState("numeric"),$c=he(()=>{const{decimal:Z,group:G,currency:ue,literal:we}=ha(C,N),te=new Set;kb.forEach(ye=>te.add(ye)),Z&&te.add(Z),G&&(te.add(G),Kl.test(G)&&te.add(" "));const ke=j==="percent"||j==="unit"&&(N==null?void 0:N.unit)==="percent",Pe=j==="percent"||j==="unit"&&(N==null?void 0:N.unit)==="permille";return ke&&zl.forEach(ye=>te.add(ye)),Pe&&$l.forEach(ye=>te.add(ye)),j==="currency"&&ue&&te.add(ue),we&&(Array.from(we).forEach(ye=>te.add(ye)),Kl.test(we)&&te.add(" ")),Pb.forEach(ye=>te.add(ye)),ge<0&&_b.forEach(ye=>te.add(ye)),te}),Ft=he(Z=>Z!=null&&Z.altKey?i:Z!=null&&Z.shiftKey?l:pe),gs=he((Z,G)=>{const ue=G.event,we=G.direction,te=G.reason,ke=!T||!(te===ea||te===Rn||te===ta||te===sn||te===Qn),Pe=jb(Z,{step:we?Ft(ue)*we:void 0,format:Be.current,minWithDefault:ge,maxWithDefault:X,minWithZeroDefault:L,snapOnStep:v,small:(ue==null?void 0:ue.altKey)??!1,clamp:ke}),ye=G.reason===ea||G.reason===sn||G.reason===Rn||G.reason===ta||G.reason===Qn,Ma=Pe!==Q||ye&&(Z!==Q||Ye.current===!1);if(Ma){if(ae.current=Pe,b==null||b(Pe,G),G.isCanceled)return Ma;De(Pe),F(Pe!==P.initialValue),je.current=!0}return Ye.current&&ms(Ot(Pe,C,N)),ve(),Ma}),Nn=he((Z,{direction:G,currentValue:ue,event:we,reason:te})=>{const ke=ue??be.current,Pe=typeof ke=="number"?ke+Z*G:Math.max(0,r??0);return gs(Pe,Ie(te,we,void 0,{direction:G}))}),at=he(()=>{yn.clear(),bn.clear(),hs.clear(),rt.current(),vn.current=0}),Hc=he((Z,G)=>{if(at(),!K.current)return;const ue=sa(K.current);function we(ke){ke.preventDefault()}ue.addEventListener("contextmenu",we),rt.current=()=>{ue.removeEventListener("contextmenu",we)},ue.addEventListener("pointerup",ke=>{xn.current=!1,at();const Pe=ae.current??be.current;gt(Pe,an(Z?"increment":"decrement",ke))},{once:!0});function te(){const ke=Ft(G)??us;return Nn(ke,{direction:Z?1:-1,event:G,reason:Z?"increment-press":"decrement-press"})}if(!te()){at();return}bn.start(Fb,()=>{hs.start(Ob,()=>{te()||at()})})});re(function(){if(!Ye.current)return;const G=g!==void 0?ec(Q,C,N):Ot(Q,C,N);G!==bt&&ms(G)}),re(function(){if(!hb)return;let G="text";ge>=0&&(G="decimal"),Vy(G)},[ge,j]),y.useEffect(()=>()=>at(),[at]),y.useEffect(function(){const G=K.current;if($||w||!S||!G)return;function ue(we){if(we.ctrlKey||wb(K.current).activeElement!==K.current)return;we.preventDefault();const te=Ft(we)??us;Nn(te,{direction:we.deltaY>0?-1:1,event:we,reason:"wheel"})}return G.addEventListener("wheel",ue),()=>{G.removeEventListener("wheel",ue)}},[S,Nn,$,w,l,pe,Ft]);const Ea=y.useMemo(()=>({...q,disabled:$,readOnly:w,required:d,value:Q,inputValue:bt,scrubbing:de}),[q,$,w,d,Q,bt,de]),Oy=y.useMemo(()=>({inputRef:K,inputValue:bt,value:Q,startAutoChange:Hc,stopAutoChange:at,minWithDefault:ge,maxWithDefault:X,disabled:$,readOnly:w,id:J,setValue:gs,incrementValue:Nn,getStepAmount:Ft,allowInputSyncRef:Ye,formatOptionsRef:Be,valueRef:be,lastChangedValueRef:ae,hasPendingCommitRef:je,isPressedRef:xn,intentionalTouchCheckTimeout:yn,movesAfterTouchRef:vn,name:H,required:d,invalid:W,inputMode:zc,getAllowedNonNumericKeys:$c,min:r,max:o,setInputValue:ms,locale:C,isScrubbing:de,setIsScrubbing:Ae,state:Ea,onValueCommitted:gt}),[K,bt,Q,Hc,at,ge,X,$,w,J,gs,Nn,Ft,Be,be,yn,H,d,W,zc,$c,r,o,ms,C,de,Ea,gt]),Fy=st("div",t,{ref:n,state:Ea,props:k,stateAttributesMapping:dn});return a.jsxs(ca.Provider,{value:Oy,children:[Fy,a.jsx("input",{...B.getInputValidationProps({onFocus(){var Z;(Z=K.current)==null||Z.focus()},onChange(Z){if(Z.nativeEvent.defaultPrevented)return;const G=Z.currentTarget.valueAsNumber,ue=Number.isNaN(G)?null:G,we=Ie(Qn,Z.nativeEvent);F(ue!==P.initialValue),gs(ue,we),U()&&B.commit(ue)}}),ref:z,type:"number",name:H,value:Q??"",min:r,max:o,step:u,disabled:$,required:d,"aria-hidden":!0,tabIndex:-1,style:H?db:cb})]})});process.env.NODE_ENV!=="production"&&(Rl.displayName="NumberFieldRoot");function ec(e,t,n){return(n==null?void 0:n.maximumFractionDigits)!=null||(n==null?void 0:n.minimumFractionDigits)!=null?Ot(e,t,n):Wl(e,t,n)}const tc=y.forwardRef(function(t,n){const{render:s,className:r,...o}=t,{state:i}=as();return st("div",t,{ref:n,state:i,props:[{role:"group"},o],stateAttributesMapping:dn})});process.env.NODE_ENV!=="production"&&(tc.displayName="NumberFieldGroup");function hn(e){return e==="touch"||e==="pen"}function nc(e){const{allowInputSyncRef:t,disabled:n,formatOptionsRef:s,getStepAmount:r,id:o,incrementValue:i,inputRef:u,inputValue:l,intentionalTouchCheckTimeout:d,isIncrement:c,isPressedRef:w,locale:f,movesAfterTouchRef:m,readOnly:g,setValue:b,startAutoChange:x,stopAutoChange:S,valueRef:v,lastChangedValueRef:T,onValueCommitted:N}=e,C=y.useRef({x:0,y:0}),D=y.useRef(!1),M=y.useRef(!1),I=y.useRef(""),k=c?"increment-press":"decrement-press";function F(A){t.current=!0;const V=pn(l,f,s.current);V!==null&&(v.current=V,b(V,Ie(k,A,void 0,{direction:c?1:-1})))}return{disabled:n,"aria-readonly":g||void 0,"aria-label":c?"Increase":"Decrease","aria-controls":o,tabIndex:-1,style:{WebkitUserSelect:"none",userSelect:"none"},onTouchStart(){D.current=!0},onTouchEnd(){D.current=!1},onClick(A){const V=n||g;if(A.defaultPrevented||V||(hn(I.current)?M.current:A.detail!==0))return;F(A.nativeEvent);const W=r(A)??us,_=v.current;i(W,{direction:c?1:-1,event:A.nativeEvent,reason:k});const q=T.current??v.current;q!==_&&N(q,an(k,A.nativeEvent))},onPointerDown(A){var _;const V=!A.button||A.button===0;if(A.defaultPrevented||g||!V||n)return;I.current=A.pointerType,M.current=!1,w.current=!0,C.current={x:A.clientX,y:A.clientY},F(A.nativeEvent),hn(A.pointerType)?d.start(Lb,()=>{const q=m.current;m.current=0,w.current&&q!=null&&q<Wb?(x(c,A),M.current=!0):(M.current=!1,S())}):(A.preventDefault(),(_=u.current)==null||_.focus(),x(c,A))},onPointerUp(A){hn(A.pointerType)&&(w.current=!1)},onPointerMove(A){if(n||g||!hn(A.pointerType)||!w.current)return;m.current!=null&&(m.current+=1);const{x:W,y:_}=C.current,q=W-A.clientX,B=_-A.clientY;q**2+B**2>Bb**2&&S()},onMouseEnter(A){const V=n||g;A.defaultPrevented||V||!w.current||D.current||hn(I.current)||x(c,A)},onMouseLeave(){D.current||S()},onMouseUp(){D.current||S()}}}const sc=y.forwardRef(function(t,n){const{render:s,className:r,disabled:o=!1,nativeButton:i=!0,...u}=t,{allowInputSyncRef:l,disabled:d,formatOptionsRef:c,getStepAmount:w,id:f,incrementValue:m,inputRef:g,inputValue:b,intentionalTouchCheckTimeout:x,isPressedRef:S,locale:v,maxWithDefault:T,movesAfterTouchRef:N,readOnly:C,setValue:D,startAutoChange:M,state:I,stopAutoChange:k,value:F,valueRef:P,lastChangedValueRef:A,onValueCommitted:V}=as(),W=F!=null&&F>=T,_=o||d||W,q=nc({isIncrement:!0,inputRef:g,startAutoChange:M,stopAutoChange:k,inputValue:b,disabled:_,readOnly:C,id:f,setValue:D,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:c,valueRef:P,isPressedRef:S,intentionalTouchCheckTimeout:x,movesAfterTouchRef:N,locale:v,lastChangedValueRef:A,onValueCommitted:V}),{getButtonProps:B,buttonRef:U}=aa({disabled:_,native:i,focusableWhenDisabled:!0}),$=y.useMemo(()=>({...I,disabled:_}),[I,_]);return st("button",t,{ref:[n,U],state:$,props:[q,u,B],stateAttributesMapping:dn})});process.env.NODE_ENV!=="production"&&(sc.displayName="NumberFieldIncrement");const rc=y.forwardRef(function(t,n){const{render:s,className:r,disabled:o=!1,nativeButton:i=!0,...u}=t,{allowInputSyncRef:l,disabled:d,formatOptionsRef:c,getStepAmount:w,id:f,incrementValue:m,inputRef:g,inputValue:b,intentionalTouchCheckTimeout:x,isPressedRef:S,minWithDefault:v,movesAfterTouchRef:T,readOnly:N,setValue:C,startAutoChange:D,state:M,stopAutoChange:I,value:k,valueRef:F,locale:P,lastChangedValueRef:A,onValueCommitted:V}=as(),W=k!=null&&k<=v,_=o||d||W,q=nc({isIncrement:!1,inputRef:g,startAutoChange:D,stopAutoChange:I,inputValue:b,disabled:_,readOnly:N,id:f,setValue:C,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:c,valueRef:F,isPressedRef:S,intentionalTouchCheckTimeout:x,movesAfterTouchRef:T,locale:P,lastChangedValueRef:A,onValueCommitted:V}),{getButtonProps:B,buttonRef:U}=aa({disabled:_,native:i,focusableWhenDisabled:!0}),$=y.useMemo(()=>({...M,disabled:_}),[M,_]);return st("button",t,{ref:[n,U],state:$,props:[q,u,B],stateAttributesMapping:dn})});process.env.NODE_ENV!=="production"&&(rc.displayName="NumberFieldDecrement");function Gb(e){e.preventDefault(),e.stopPropagation()}function Kb(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const ac=y.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Me,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(ac.displayName="FormContext");function oc(){return y.useContext(ac)}function Yb(e){const{enabled:t=!0,value:n,id:s,name:r,controlRef:o,commit:i}=e,{formRef:u}=oc(),{invalid:l,markedDirtyRef:d,validityData:c,setValidityData:w}=da(),f=he(e.getValue);re(()=>{if(!t)return;let m=n;m===void 0&&(m=f()),c.initialValue===null&&m!==null&&w(g=>({...g,initialValue:m}))},[t,w,n,c.initialValue,f]),re(()=>{!t||!s||u.current.fields.set(s,{getValue:f,name:r,controlRef:o,validityData:Kb(c,l),validate(m=!0){let g=n;g===void 0&&(g=f()),d.current=!0,m?Pa.flushSync(()=>i(g)):i(g)}})},[i,o,t,u,f,s,l,d,r,c,n]),re(()=>{const m=u.current.fields;return()=>{s&&m.delete(s)}},[u,s])}function Xb(e,t){const n=y.useRef(e),s=he(t);re(()=>{n.current!==e&&s(n.current)},[e,s]),re(()=>{n.current=e},[e])}const Zb={..._l,...dn},Jb=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),ic=y.forwardRef(function(t,n){const{render:s,className:r,...o}=t,{allowInputSyncRef:i,disabled:u,formatOptionsRef:l,getAllowedNonNumericKeys:d,getStepAmount:c,id:w,incrementValue:f,inputMode:m,inputValue:g,max:b,min:x,name:S,readOnly:v,required:T,setValue:N,state:C,setInputValue:D,locale:M,inputRef:I,value:k,onValueCommitted:F,lastChangedValueRef:P,hasPendingCommitRef:A,valueRef:V}=as(),{clearErrors:W}=oc(),{validationMode:_,setTouched:q,setFocused:B,invalid:U,shouldValidateOnChange:$,validation:H}=da(),{labelId:pe}=Fl(),de=y.useRef(!1),Ae=y.useRef(!1);return Yb({id:w,commit:H.commit,value:k,controlRef:I,name:S,getValue:()=>k??null}),Xb(k,L=>{const j=$();if(W(S),j&&H.commit(k),!(L===k||j)){if(Ae.current){Ae.current=!1;return}H.commit(k,!0)}}),st("input",t,{ref:[n,I],state:C,props:[{id:w,required:T,disabled:u,readOnly:v,inputMode:m,value:g,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":U||void 0,"aria-labelledby":pe,suppressHydrationWarning:!0,onFocus(L){if(L.defaultPrevented||v||u||(B(!0),de.current))return;de.current=!0;const j=L.currentTarget,K=j.value.length;j.setSelectionRange(K,K)},onBlur(L){if(L.defaultPrevented||v||u)return;q(!0),B(!1);const j=!i.current,K=A.current;if(i.current=!0,g.trim()===""){N(null,Ie(sn,L.nativeEvent)),_==="onBlur"&&H.commit(null),F(null,an(sn,L.nativeEvent));return}const z=l.current,J=pn(g,M,z);if(J===null)return;const ie=(z==null?void 0:z.maximumFractionDigits)!=null||(z==null?void 0:z.minimumFractionDigits)!=null,De=z==null?void 0:z.maximumFractionDigits,Q=ie&&typeof De=="number"?Number(J.toFixed(De)):J,be=an(Rn,L.nativeEvent),ve=k!==Q,Be=j||ve||K;_==="onBlur"&&H.commit(Q),ve&&(Ae.current=!0,N(Q,Ie(Rn,L.nativeEvent))),Be&&F(Q,be);const je=Ot(Q,M,z),gt=Wl(J,M,z);!(!ie&&J===k&&g===gt)&&g!==je&&D(je)},onChange(L){if(L.nativeEvent.defaultPrevented)return;i.current=!1;const j=L.target.value;if(j.trim()===""){D(j),N(null,Ie(sn,L.nativeEvent));return}const K=d();if(!Array.from(j).every(ie=>{const De=ie>="0"&&ie<="9",Q=fa.test(ie),be=pa.test(ie),ve=jl.test(ie),Be=Gl.test(ie),je=fn.test(ie);return De||Q||be||ve||Be||je||K.has(ie)}))return;const J=pn(j,M,l.current);D(j),J!==null&&N(J,Ie(ea,L.nativeEvent))},onKeyDown(L){if(L.defaultPrevented||v||u)return;const j=L.nativeEvent;i.current=!0;const K=d();let z=K.has(L.key);const{decimal:J,currency:ie,percentSign:De}=ha(M,l.current),Q=L.currentTarget.selectionStart,be=L.currentTarget.selectionEnd,ve=Q===0&&be===g.length,Be=ae=>Q!=null&&be!=null&&ae>=Q&&ae<be;if(fn.test(L.key)&&Array.from(K).some(ae=>fn.test(ae||""))){const ae=g.search(Jl),rt=ae!=null&&ae!==-1&&Be(ae);z=!(fn.test(g)||is.test(g))||ve||rt}if(is.test(L.key)&&Array.from(K).some(ae=>is.test(ae||""))){const ae=g.search(Ql),rt=ae!=null&&ae!==-1&&Be(ae);z=!(fn.test(g)||is.test(g))||ve||rt}[J,ie,De].forEach(ae=>{if(L.key===ae){const rt=g.indexOf(ae),bt=Be(rt);z=!g.includes(ae)||ve||bt}});const je=L.key>="0"&&L.key<="9",gt=fa.test(L.key),bn=pa.test(L.key),hs=Gl.test(L.key),yn=Jb.has(L.key);if(L.which===229||L.altKey||L.ctrlKey||L.metaKey||z||je||gt||hs||bn||yn)return;const xn=pn(g,M,l.current),vn=c(L)??us;Gb(L);const Ye=an(rn,j);L.key==="ArrowUp"?(f(vn,{direction:1,currentValue:xn,event:j,reason:rn}),F(P.current??V.current,Ye)):L.key==="ArrowDown"?(f(vn,{direction:-1,currentValue:xn,event:j,reason:rn}),F(P.current??V.current,Ye)):L.key==="Home"&&x!=null?(N(x,Ie(rn,j)),F(P.current??V.current,Ye)):L.key==="End"&&b!=null&&(N(b,Ie(rn,j)),F(P.current??V.current,Ye))},onPaste(L){if(L.defaultPrevented||v||u)return;L.preventDefault();const K=(L.clipboardData||window.Clipboard).getData("text/plain"),z=pn(K,M,l.current);z!==null&&(i.current=!1,N(z,Ie(ta,L.nativeEvent)),D(K))}},H.getValidationProps(),o],stateAttributesMapping:Zb})});process.env.NODE_ENV!=="production"&&(ic.displayName="NumberFieldInput");const Qb={wuStepper:"_wuStepper_apbnq_1"},Rb=({onChange:e,Label:t,defaultValue:n=0,readonly:s,dir:r,step:o=1,min:i,max:u,value:l,className:d,labelPosition:c="left",disabled:w,resetInvalidValueOnBlur:f=!0,...m})=>{const g=y.useId(),[b,x]=y.useState(l!==void 0?Number(l):n||0);y.useEffect(()=>{l!==void 0&&x(Number(l))},[l]);const S=M=>{x(M),e==null||e(M)},v=M=>{const I=Number(M.target.value);Number.isNaN(I)||x(I)},T=()=>{f&&(i!==void 0&&b<i?(x(i),e==null||e(i)):u!==void 0&&b>u&&(x(u),e==null||e(u)))};y.useEffect(()=>{l&&n&&console.warn("As both value and defaultValue are passed, value will be used")},[l,n]);const N={inc:s||u!==void 0&&b>=u||w,dec:s||i!==void 0&&b<=i||w},C=i!==void 0&&b<i||u!==void 0&&b>u,D=p("wu-flex wu-items-center wu-justify-center wu-rounded-none wu-bg-gray-10 wu-w-8 wu-h-8 wu-text-blue-q wu-p-2 wu-absolute wu-top-0 hover:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle");return a.jsxs(Rl,{id:g,value:b,step:o,readOnly:s,onValueChange:M=>typeof M=="number"&&S(M),dir:r,className:p("wu-flex wu-stepper",r==="rtl"&&c!=="top"&&"wu-gap-2",Qb.wuStepper,ey({labelPosition:c}),d),children:[t&&a.jsx(Te,{htmlFor:g,className:"wu-input-label",children:t}),a.jsxs(tc,{className:"wu-flex wu-max-w-[97px] wu-relative",children:[a.jsx(rc,{"aria-label":"decrement",className:p(D,r==="rtl"?"wu-right-0":"wu-left-0","wu-stepper-button"),disabled:N.dec,children:a.jsx("span",{className:"wu-text-base wm-minimize"})}),a.jsx(ic,{"aria-label":"stepper",role:"spinbutton",type:"text","aria-invalid":C||void 0,dir:r,className:p("wu-flex wu-w-[97px] wu-h-8 wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","wu-h-[33px] wu-text-center wu-text-blue-q wu-text-xs wu-rounded-t-sm ","focus:wu-border-blue-p focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle",C&&"wu-border-red-deep focus:wu-border-red-deep","wu-stepper-input"),readOnly:s,onChange:v,onBlur:T,disabled:w,min:i,max:u,step:o,value:b,...m}),a.jsx(sc,{"aria-label":"increment",className:p(D,r==="rtl"?"wu-left-0":"wu-right-0","wu-stepper-button"),disabled:N.inc,children:a.jsx("span",{className:"wu-text-base wm-add"})})]})]})},ey=_e.cva("wu-flex wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row wu-text-right wu-gap-2 wu-items-center",top:"wu-flex-col"}}}),uc=_e.cva("wu-inline-flex wu-items-center wu-justify-center wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-muted hover:wu-text-muted-foreground focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-80",{variants:{variant:{default:"wu-bg-transparent",outline:"wu-border wu-border-input wu-bg-transparent hover:wu-bg-accent hover:wu-text-accent-foreground"},size:{default:"wu-h-10 wu-px-3",sm:"wu-h-9 wu-px-2.5",lg:"wu-h-11 wu-px-5"}},defaultVariants:{variant:"default",size:"default"}}),ty=y.forwardRef(({className:e,variant:t,size:n,...s},r)=>a.jsx(_a.Root,{ref:r,className:p(uc({variant:t,size:n,className:e})),...s}));ty.displayName=_a.Root.displayName;const lc=y.createContext({size:"default",variant:"default"}),ls=y.forwardRef(({className:e,variant:t,size:n,children:s,...r},o)=>a.jsx(Sn.Root,{ref:o,className:p("wu-flex wu-items-center wu-justify-center wu-gap-1",e),...r,children:a.jsx(lc.Provider,{value:{variant:t,size:n},children:s})}));ls.displayName=Sn.Root.displayName;const mt=y.forwardRef(({className:e,children:t,variant:n,size:s,...r},o)=>{const i=y.useContext(lc);return a.jsx(Sn.Item,{ref:o,className:p(uc({variant:i.variant||n,size:i.size||s}),e),...r,children:t})});mt.displayName=Sn.Item.displayName;const cc=h.forwardRef((e,t)=>{const{options:n,value:s,disabled:r,dir:o,onChange:i}=e,u=l=>p("wu-w-8 wu-h-8 wu-text-xl wu-leading-5 wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-p-0 wu-flex wu-items-center wu-justify-center",r&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",l===s&&"wu-text-white",r&&s===l&&"wu-text-gray-lead","wu-switcher-icon-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(ls,{ref:t,type:"single",value:s,onValueChange:i,disabled:r,dir:o,className:p("wu-relative wu-group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-16 wu-bg-gray-25 wu-rounded-full",r&&"wu-cursor-not-allowed","wu-switcher-icon-tab-group"),children:[a.jsx("div",{role:"slider",className:p("wu-absolute wu-z-0 wu-w-8 wu-h-8 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",s==="opt1"&&"",s==="opt2"&&o!=="rtl"&&"wu-translate-x-full",s==="opt2"&&o==="rtl"&&"-wu-translate-x-full",r&&"wu-bg-gray-40","wu-switcher-icon-tab-slider")}),a.jsx(mt,{value:"opt1",className:u("opt1"),children:n[0].label}),a.jsx(mt,{value:"opt2",className:u("opt2"),children:n[1].label})]})})});cc.displayName="_IconTab";const dc=h.forwardRef((e,t)=>{const{options:n,value:s,disabled:r,dir:o,size:i="md",onChange:u}=e,l=d=>p("wu-w-1/2 wu-text-xs wu-rounded-full wu-text-gray-lead wu-relative wu-z-10 wu-font-normal",r&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",d===s&&"wu-text-white wu-font-medium",r&&s===d&&"wu-text-gray-lead","wu-switcher-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(ls,{ref:t,type:"single",value:s,onValueChange:u,disabled:r,dir:o,className:p("wu-relative group wu-flex wu-flex-row wu-items-start wu-justify-start wu-gap-0 wu-w-fit wu-bg-gray-25 wu-rounded-full",r&&"wu-cursor-not-allowed","wu-switcher-tab-group"),children:[a.jsx("div",{role:"slider",className:p("wu-absolute wu-z-0 wu-w-1/2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out ",i==="sm"&&"wu-h-6 wu-min-w-20",i==="md"&&"wu-h-8 wu-min-w-28",i==="lg"&&"wu-h-10 wu-min-w-36",s==="opt1"&&"",s==="opt2"&&o!=="rtl"&&"wu-translate-x-full",s==="opt2"&&o==="rtl"&&"-wu-translate-x-full",r&&"wu-bg-gray-40","wu-switcher-tab-slider")}),a.jsx(mt,{value:"opt1",className:l("opt1"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[0].label})}),a.jsx(mt,{value:"opt2",className:l("opt2"),children:a.jsx("div",{className:"wu-min-w-16 wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap",children:n[1].label})})]})})});dc.displayName="_Tab";const wc=h.forwardRef((e,t)=>{const{options:n,value:s,disabled:r,dir:o,onChange:i}=e,u=w=>p("wu-p-0 wu-w-fit wu-text-xs wu-text-gray-lead wu-h-fit wu-font-normal",r&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle",w===s&&"wu-text-primary wu-font-medium",r&&s===w&&"wu-text-gray-lead","wu-switcher-toggle-item"),l=p("wu-w-fit wu-gap-2",r&&"wu-cursor-not-allowed","wu-switcher-toggle-group"),d=p("wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-3 wu-p-0 wu-border wu-rounded-full wu-cursor-pointer wu-border-blue-p focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2",r&&"wu-border-gray-subtle wu-cursor-not-allowed","wu-switcher-toggle-button"),c=p("wu-w-2 wu-h-2 wu-bg-blue-p wu-rounded-full wu-transition-transform wu-duration-300 wu-ease-in-out",s==="opt1"&&o!=="rtl"&&"-wu-translate-x-[10px]",s==="opt1"&&o==="rtl"&&"wu-translate-x-[10px]",s==="opt2"&&o!=="rtl"&&"wu-translate-x-[10px]",s==="opt2"&&o==="rtl"&&"-wu-translate-x-[10px]",r&&"wu-hidden","wu-switcher-toggle-knob");return a.jsx(a.Fragment,{children:a.jsxs(ls,{ref:t,type:"single",value:s,disabled:r,dir:o,className:l,onValueChange:i,children:[a.jsx(mt,{value:"opt1",className:u("opt1"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-text-right wu-switcher-toggle-item-label",children:n[0].label})}),a.jsx("button",{onClick:()=>i(s==="opt1"?"opt2":"opt1"),className:d,disabled:r,"aria-label":"knob",dir:o,children:a.jsx("div",{className:c,role:"knob",dir:o})}),a.jsx(mt,{value:"opt2",className:u("opt2"),children:a.jsx("div",{className:"wu-max-w-[136px] wu-overflow-hidden wu-text-ellipsis wu-text-nowrap wu-switcher-toggle-item-label",children:n[1].label})})]})})});wc.displayName="_Toggle";const fc=h.forwardRef((e,t)=>{const{type:n,options:s,value:r,disabled:o,dir:i,size:u,onChange:l,toggle:d=!0,...c}=e,[w,f]=h.useState(),m=g=>{let b=w;g!==""?b=g:d&&(b=w==="opt1"?"opt2":"opt1");const x=b==="opt1"?s[0].value:s[1].value;l&&l(x),f(b)};if(h.useEffect(()=>{if(!Array.isArray(s)||s.length<2)throw new Error("Options are not sufficient");f(r===s[0].value?"opt1":"opt2")},[s,r]),!Array.isArray(s)||s.length<2)return a.jsx(a.Fragment,{});switch(n){case"toggle":return a.jsx(wc,{...c,ref:t,options:s,value:w||"opt1",onChange:m,disabled:o,dir:i});case"iconTab":return a.jsx(cc,{ref:t,options:s,value:w||"opt1",onChange:m,disabled:o,dir:i});default:return a.jsx(dc,{ref:t,options:s,value:w||"opt1",onChange:m,disabled:o,dir:i,size:u})}});fc.displayName="WuSwitcher";const pc=ut.Root,ga=y.forwardRef(({className:e,children:t,...n},s)=>a.jsx(ut.List,{className:p("wu-relative wu-flex",e),...n,ref:s,children:t}));ga.displayName=ut.List.displayName;const ba=y.forwardRef(({className:e,...t},n)=>a.jsx(ut.Trigger,{ref:n,className:p("wu-relative wu-inline-flex wu-items-center wu-whitespace-nowrap wu-text-xs wu-px-4 wu-py-2 wu-text-gray-600 wu-transition-colors wu-duration-200 data-[state=active]:wu-text-blue-p","data-[orientation=horizontal]:wu-justify-center",e),...t}));ba.displayName=ut.Trigger.displayName;const hc=y.forwardRef(({className:e,...t},n)=>a.jsx(ut.Content,{ref:n,className:e,...t}));hc.displayName=ut.Content.displayName;const mc=({items:e,enableAnimation:t})=>{const n="wu-duration-700 wu-ease-in-out wu-transition-all data-[state=inactive]:wu-absolute data-[state=inactive]:wu-inset-0 data-[state=inactive]:wu-opacity-0 data-[state=inactive]:wu-z-0 data-[state=active]:wu-relative data-[state=active]:wu-opacity-100 data-[state=active]:wu-z-10";return a.jsx("div",{className:p("wu-w-full wu-h-full wu-flex-1 wu-overflow-auto",t&&"wu-relative wu-overflow-hidden","wu-tab-content-container"),children:e.map(s=>a.jsx(hc,{value:s.value,forceMount:t||void 0,className:p("wu-w-full wu-h-full wu-overflow-y-auto",t&&n,"wu-tab-content"),children:s.Content},s.value))})},ny=e=>{const[t,n]=h.useState(!1),[s,r]=h.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollLeft>0),r(u.scrollLeft+u.clientWidth<u.scrollWidth))};return h.useEffect(()=>{const u=e.current;return o(),u&&u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u&&u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showLeftArrow:t,showRightArrow:s,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="right"?l.clientWidth:-l.clientWidth)*.8;l.scrollBy({left:d,behavior:"smooth"})}}}},gc=(e,t)=>{const[n,s]=h.useState({width:0,left:0,height:0,top:0}),r=t==="vertical";return h.useEffect(()=>{const o=e.current;if(o){const i=()=>{const l=o.querySelector('[data-state="active"]');if(l){const d={width:r?2:l.offsetWidth,left:r?0:l.offsetLeft,height:r?l.offsetHeight:1,top:r?l.offsetTop:0};s(d)}},u=new MutationObserver(i);return u.observe(o,{attributes:!0,subtree:!0}),i(),()=>{u.disconnect()}}},[e,r]),n},sy=({items:e,value:t,defaultValue:n,onValueChange:s,enableAnimation:r=!1,className:o,dir:i="ltr",position:u="top"})=>{var T;const l=h.useRef(null),d=gc(l,"horizontal"),{showLeftArrow:c,showRightArrow:w,scrollByTab:f}=ny(l),[m,g]=h.useState(!1),b=()=>f("left"),x=()=>f("right"),S=N=>a.jsx("div",{"data-testid":`gradient-overlay-${N}`,className:p("wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none",N==="left"?"wu-left-0 wu-bg-gradient-to-r wu-from-white wu-to-transparent":"wu-right-0 wu-bg-gradient-to-l wu-from-white wu-to-transparent")}),v=(N,C,D)=>{const M=C==="left";return a.jsx("button",{onClick:N,className:p("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-h-8",M?"wu-left-0":"wu-right-0",D&&"wu-translate-x-0 wu-opacity-100",!D&&[M?"-wu-translate-x-full":"wu-translate-x-full","wu-opacity-0"]),"aria-label":M?"scroll-left":"scroll-right",children:a.jsx("span",{className:p("wu-text-blue-p wu-text-lg",M?"wm-keyboard-arrow-left":"wm-keyboard-arrow-right")})})};return a.jsxs(pc,{defaultValue:n||((T=e[0])==null?void 0:T.value),value:t,onValueChange:s,orientation:"horizontal",dir:i,className:p("wu-relative wu-flex wu-flex-col wu-w-full wu-h-full",u==="bottom"?"wu-flex-col-reverse":"wu-flex-col",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0 wu-border-b wu-border-gray-200",onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"tablistWrapper",children:[c&&m&&S("left"),v(b,"left",c&&m),a.jsxs(ga,{ref:l,className:p("wu-relative wu-flex wu-w-full wu-overflow-x-auto wu-flex-row","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(N=>a.jsx(ba,{value:N.value,children:N.Trigger},N.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator wu-bottom-0",style:{width:d.width,left:d.left,height:1.25,bottom:u==="bottom"?void 0:0,top:u==="bottom"?0:void 0}})]}),w&&m&&S("right"),v(x,"right",w&&m)]}),a.jsx(mc,{items:e,enableAnimation:r})]})},ry=e=>{const[t,n]=h.useState(!1),[s,r]=h.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollTop>0),r(u.scrollTop+u.clientHeight<u.scrollHeight))};return h.useEffect(()=>{const u=e.current;if(u)return o(),u.addEventListener("scroll",o),window.addEventListener("resize",o),()=>{u.removeEventListener("scroll",o),window.removeEventListener("resize",o)}},[e]),{showTopArrow:t,showBottomArrow:s,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="down"?l.clientHeight:-l.clientHeight)*.8;l.scrollBy({top:d,behavior:"smooth"})}}}},ay=({items:e,value:t,defaultValue:n,onValueChange:s,enableAnimation:r=!1,className:o,dir:i="ltr",position:u="left"})=>{var T;const l=h.useRef(null),d=gc(l,"vertical"),{showTopArrow:c,showBottomArrow:w,scrollByTab:f}=ry(l),[m,g]=h.useState(!1),b=()=>f("up"),x=()=>f("down"),S=N=>a.jsx("div",{className:p("wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none",N==="top"?"wu-top-0 wu-bg-gradient-to-b wu-from-white wu-to-transparent":"wu-bottom-0 wu-bg-gradient-to-t wu-from-white wu-to-transparent")}),v=(N,C,D)=>{const M=C==="up";return a.jsx("button",{onClick:N,className:p("wu-absolute wu-z-20 wu-flex wu-items-center wu-justify-center wu-px-1 wu-py-1 wu-transition-all wu-duration-300 wu-w-full",M?"-wu-top-1":"-wu-bottom-1",D&&"wu-translate-y-0 wu-opacity-100",!D&&[M?"-wu-translate-y-full":"wu-translate-y-full","wu-opacity-0"]),"aria-label":M?"scroll-up":"scroll-down",children:a.jsx("span",{className:p("wu-text-blue-p wu-text-lg",M?"wm-keyboard-arrow-up":"wm-keyboard-arrow-down")})})};return a.jsxs(pc,{defaultValue:n||((T=e[0])==null?void 0:T.value),value:t,onValueChange:s,orientation:"vertical",dir:i,className:p("wu-relative wu-h-full wu-w-full wu-flex",u==="left"?"wu-flex-row":"wu-flex-row-reverse",o),role:"tabs",children:[a.jsxs("div",{className:"wu-relative wu-flex wu-overflow-hidden wu-shrink-0",onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),"aria-label":"tablistWrapper",children:[c&&m&&S("top"),v(b,"up",c&&m),a.jsxs(ga,{ref:l,className:p("wu-relative wu-flex wu-h-full wu-overflow-y-auto wu-flex-col","[&::-webkit-scrollbar]:wu-hidden [-ms-overflow-style:none] [scrollbar-width:none]","wu-tablist"),children:[e.map(N=>a.jsx(ba,{value:N.value,children:N.Trigger},N.value)),a.jsx("span",{className:"wu-absolute wu-bg-blue-p wu-transition-all wu-duration-300 wu-indicator",style:{width:2,left:u==="left"?0:void 0,right:u==="right"?0:void 0,height:d.height,top:d.top}})]}),w&&m&&S("bottom"),v(x,"down",w&&m)]}),a.jsx(mc,{items:e,enableAnimation:r})]})},oy=({...e})=>e.orientation==="vertical"?a.jsx(ay,{...e}):a.jsx(sy,{...e}),ya=y.forwardRef(({className:e,...t},n)=>a.jsx("table",{ref:n,className:p("wu-w-full wu-caption-bottom wu-text-sm",e),...t}));ya.displayName="Table";const bc=y.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:p("[&_tr]:wu-border-b",e),...t}));bc.displayName="TableHeader";const yc=y.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:p("",e),...t}));yc.displayName="TableBody";const iy=y.forwardRef(({className:e,...t},n)=>a.jsx("tfoot",{ref:n,className:p("wu-border-t wu-bg-muted/50 wu-font-medium [&>tr]:last:wu-border-b-0",e),...t}));iy.displayName="TableFooter";const mn=y.forwardRef(({className:e,...t},n)=>a.jsx("tr",{ref:n,className:p("wu-border-b wu-transition-colors wu-hover:wu-bg-muted/50 data-[state=selected]:wu-bg-muted",e),...t}));mn.displayName="TableRow";const xa=y.forwardRef(({className:e,...t},n)=>a.jsx("th",{ref:n,className:p("wu-px-4 wu-text-left wu-align-middle wu-font-medium wu-text-muted-foreground [&:has([role=checkbox])]:wu-pr-0",e),...t}));xa.displayName="TableHead";const cs=y.forwardRef(({className:e,...t},n)=>a.jsx("td",{ref:n,className:p("wu-p-4 wu-align-middle [&:has([role=checkbox])]:wu-pr-0",e),...t}));cs.displayName="TableCell";const va=y.forwardRef(({className:e,...t},n)=>a.jsx("caption",{ref:n,className:p("wu-mt-4 wu-text-sm wu-text-gray-subtle wu-font-normal",e),...t}));va.displayName="TableCaption";const uy=({columns:e,rowSelection:t})=>{const n=(t==null?void 0:t.isEnabled)??!1,s=(t==null?void 0:t.size)??48,{onRowSelect:r,rowUniqueKey:o,isRowDisabled:i,hideSelectAll:u}=t||{},l=h.useCallback(c=>w=>{r==null||r(w?c:[])},[r]);return{finalColumns:h.useMemo(()=>n?[{id:"select",header:({table:c})=>{const w=c.getRowModel().rows.map(m=>m.original).filter(m=>!(i!=null&&i(m))),f=l(w);return u?a.jsx("div",{}):a.jsx(Fe,{checked:c.getIsSomeRowsSelected()||c.getIsAllRowsSelected(),partial:c.getIsSomeRowsSelected()&&!c.getIsAllRowsSelected(),onChange:m=>{c.toggleAllRowsSelected(!!m),f(!!m)},"aria-label":"Select all","data-testid":c.getIsSomeRowsSelected()&&!c.getIsAllRowsSelected()?"select-partial":"select-all"})},cell:({row:c})=>{const w=(i==null?void 0:i(c.original))??!1;return a.jsx(Fe,{checked:c.getIsSelected(),disabled:w,onChange:f=>{w||c.toggleSelected(!!f)},"aria-label":String(c.original[o])})},filterable:!1,accessorKey:"select",size:s},...e]:e,[e,n,l,i,u])}};function xc({data:e,columns:t,rowSelection:n}){const{finalColumns:s}=uy({columns:t,rowSelection:n}),r=h.useMemo(()=>{if(!(n!=null&&n.isEnabled))return{};const o={};for(const i of n.selectedRows){const u=e.findIndex(l=>l[n.rowUniqueKey]===i[n.rowUniqueKey]);u!==-1&&(o[u]=!0)}return o},[e,n]);return{finalColumns:s,rowSelectionState:r}}const vc=({table:e,size:t,NoDataContent:n,isLoading:s,CustomLoader:r,isRowDisabled:o})=>{var i;return a.jsx(yc,{children:s?a.jsx(mn,{children:a.jsx(cs,{colSpan:e.getAllColumns().length,className:"wu-text-center wu-h-[35vh] wu-loader-container",children:r||a.jsx(St,{className:"wu-w-full"})})}):(i=e.getRowModel().rows)!=null&&i.length?e.getRowModel().rows.map((u,l)=>{const d=(o==null?void 0:o(u.original))??!1;return a.jsx(mn,{"data-disabled":d,"data-state":u.getIsSelected()&&"selected",className:p("wu-group wu-transition-colors wu-border-b wu-border-black/[12%]",u.getIsSelected()&&"wu-bg-blue-p/[8%]",!d&&(u.getIsSelected()?"hover:wu-bg-blue-p/[16%]":"hover:wu-bg-black/[2%]")),children:u.getVisibleCells().map((c,w)=>a.jsx(cs,{className:p("wu-py-0 wu-font-light wu-text-xs",t==="compact"?"wu-h-8":"wu-h-10",c.column.id==="actions"?"wu-opacity-0 wu-transition-opacity wu-duration-150 wu-ease-in-out group-hover:wu-opacity-100":"",c.column.columnDef.cellAlign==="right"&&"wu-text-right",c.column.columnDef.cellAlign==="center"&&"wu-text-center",c.column.columnDef.cellAlign==="left"&&"wu-text-left"),children:qe.flexRender(c.column.columnDef.cell,c.getContext())},`${c.id}-${w}`))},`${u.id}-${l}`)}):a.jsx(mn,{children:a.jsx(cs,{colSpan:e.getAllColumns().length,children:n})})})},Nc=({table:e,sortableColumns:t,manual:n=!1,onSort:s,size:r,isRowSelected:o,HeaderAction:i,isStickyHeader:u})=>{const l=r==="compact"?"wu-h-8":"wu-h-10",d=c=>{const{id:w,columnDef:f,getIsSorted:m,toggleSorting:g}=c,{header:b}=f,x=f.headerAlign;if(!t.includes(w))return b;const S=m(),v=S==="asc",T=S==="desc",N=()=>{n?(g(!T),s==null||s({id:w,desc:T})):g(c.getIsSorted()==="asc")};return a.jsxs("button",{onClick:N,"aria-label":`Sort by ${b}`,className:p("wu-flex wu-items-center wu-gap-1 wu-w-full",x==="right"&&"wu-justify-end",x==="center"&&"wu-justify-center"),children:[b,a.jsxs("div",{className:"wu-relative wu-flex-shrink-0 wu-w-4",children:[a.jsx("span",{className:p("wu-absolute -wu-top-[15px] wu-left-0 wm-arrow-drop-down wu-text-xl",v&&"wu-hidden",!S&&"-wu-top-[11px]")}),a.jsx("span",{className:p("wu-absolute -wu-bottom-[13px] wu-left-0 wm-arrow-drop-up wu-text-xl",T&&"wu-hidden",!S&&"-wu-bottom-[10px]")})]})]})};return a.jsxs(bc,{className:p("wu-border-t wu-border-black/[12%] wu-bg-gray-20 wu-relative",u&&"wu-sticky wu-top-[-.5px] wu-z-10",l),children:[e.getHeaderGroups().map(c=>a.jsx(mn,{className:"wu-relative",children:c.headers.map(w=>w.column.id==="actions"?a.jsx(xa,{colSpan:w.colSpan,className:"wu-text-xs wu-font-medium",style:{width:`${w.getSize()}px`}},w.id):a.jsx(xa,{colSpan:w.colSpan,className:p("wu-text-xs wu-font-medium wu-bg-[#EEEEEE]","wu-relative wu-z-0",w.column.columnDef.headerAlign==="right"&&"wu-text-right",w.column.columnDef.headerAlign==="center"&&"wu-text-center",w.column.columnDef.headerAlign==="left"&&"wu-text-left"),style:{width:`${w.getSize()}px`},children:qe.flexRender(d(w.column),w.getContext())},w.id))},c.id)),o&&i&&a.jsxs("div",{className:p("wu-absolute wu-top-[-1px] wu-left-0 wu-right-0 wu-flex wu-items-center wu-border-b wu-border-t wu-bg-gray-20 wu-z-10",l),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-px-4",style:{width:e.getVisibleLeafColumns()[0].getSize()},children:a.jsx(Fe,{checked:e.getIsSomeRowsSelected()||e.getIsAllRowsSelected(),partial:e.getIsSomeRowsSelected()&&!e.getIsAllRowsSelected(),onChange:c=>{e.toggleAllRowsSelected(!!c)},"aria-label":"Select all","data-testid":"select-all-header-checkbox"})}),a.jsx("div",{className:"wu-flex-1 wu-flex wu-pr-4",children:i})]})]})},Sc=_e.cva("",{variants:{variant:{striped:"[&_tr:nth-child(even)]:wu-bg-zinc-50",unstyled:"",bordered:"wu-border-collapse wu-border [&_th]:wu-border [&_td]:wu-border"}}}),ly=({data:e,columns:t,isLoading:n=!1,variant:s="unstyled",sort:r,size:o,rowSelection:i,HeaderAction:u,NoDataContent:l,stickyHeader:d=!1,CustomLoader:c,caption:w,...f})=>{var T;const{finalColumns:m,rowSelectionState:g}=xc({data:e,columns:t,rowSelection:i}),b=h.useMemo(()=>m.filter(N=>N.enableSorting).map(N=>N.accessorKey),[m]),x=((T=i==null?void 0:i.selectedRows)==null?void 0:T.length)??0,S=N=>{if(typeof N=="function"){const C=N(g),D=Object.keys(C).filter(M=>C[Number(M)]).map(M=>e[Number(M)]);i==null||i.onRowSelect(D)}},v=qe.useReactTable({data:e,columns:m,getCoreRowModel:qe.getCoreRowModel(),getPaginationRowModel:qe.getPaginationRowModel(),manualPagination:!0,manualSorting:!0,manualFiltering:!0,enableRowSelection:i==null?void 0:i.isEnabled,state:{...i!=null&&i.isEnabled?{rowSelection:g}:{}},onRowSelectionChange:S});return a.jsxs("div",{className:p("wu-text-gray-lead wu-table-container wu-relative"),children:[w&&a.jsx(va,{className:"wu-font-light",children:w}),a.jsxs(ya,{...f,className:p(Sc({variant:s}),f.className),children:[a.jsx(Nc,{table:v,sortableColumns:b,manual:!0,onSort:r==null?void 0:r.onSort,size:o,HeaderAction:u,isRowSelected:x>0,isStickyHeader:d}),!n&&a.jsx(vc,{table:v,size:o,NoDataContent:l,CustomLoader:c})]}),n&&a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-h-96",children:a.jsx(St,{})})]})},cy=({data:e,columns:t,variant:n="unstyled",size:s="default",sort:r,filterText:o,pagination:i,stickyHeader:u,HeaderAction:l,CustomLoader:d,NoDataContent:c,isLoading:w,caption:f,rowSelection:m,...g})=>{var A;const[b,x]=h.useState((r==null?void 0:r.initial)||[]),[S,v]=h.useState([]),[T,N]=h.useState((i==null?void 0:i.pageIndex)??0),{finalColumns:C,rowSelectionState:D}=xc({data:e,columns:t,rowSelection:m}),M=h.useMemo(()=>C.filter(V=>V.enableSorting).map(V=>V.accessorKey),[C]),I=h.useMemo(()=>C.filter(V=>V.filterable).map(V=>V.accessorKey),[C]),k=((A=m==null?void 0:m.selectedRows)==null?void 0:A.length)??0,F=V=>{const W=typeof V=="function"?V(D):V,_=[],q=m==null?void 0:m.isRowDisabled;for(const B in W){if(!W[B])continue;const U=e[Number(B)];U&&(q!=null&&q(U)||_.push(U))}m==null||m.onRowSelect(_)},P=qe.useReactTable({data:e,columns:C,getCoreRowModel:qe.getCoreRowModel(),getFilteredRowModel:qe.getFilteredRowModel(),getSortedRowModel:qe.getSortedRowModel(),getPaginationRowModel:i?qe.getPaginationRowModel():void 0,enableRowSelection:m!=null&&m.isRowDisabled?V=>!m.isRowDisabled(V.original):!0,state:{sorting:b,columnFilters:S,...i?{pagination:i}:{},...m!=null&&m.isEnabled?{rowSelection:D}:{}},onSortingChange:x,onColumnFiltersChange:v,onRowSelectionChange:F});return h.useEffect(()=>{I.forEach(V=>{var W;(W=P.getColumn(V))==null||W.setFilterValue(o)})},[o,I,P]),h.useEffect(()=>{i&&(i==null?void 0:i.pageIndex)!==T&&(m==null||m.onRowSelect(()=>[]),P.resetRowSelection(),N(i.pageIndex))},[i==null?void 0:i.pageIndex]),a.jsx("div",{className:"wu-text-gray-lead wu-table-container wu-relative",children:a.jsxs(ya,{...g,className:p("wu-overflow-x-auto wu-w-full",Sc({variant:n}),"wu-table-fixed",g.className),children:[f&&a.jsx(va,{children:f}),a.jsx(Nc,{table:P,sortableColumns:M,size:s,HeaderAction:l,isRowSelected:k>0,isStickyHeader:u}),a.jsx(vc,{table:P,size:s,NoDataContent:c,CustomLoader:d,isLoading:w,isRowDisabled:m==null?void 0:m.isRowDisabled})]})})},Cc=y.forwardRef(({className:e,...t},n)=>a.jsx("textarea",{className:p("wu-flex wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-text-gray-lead wu-p-2 wu-text-sm wu-font-normal wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light focus-visible:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle read-only:wu-cursor-not-allowed read-only:wu-bg-gray-20 read-only:wu-border-gray-40 read-only:wu-text-gray-subtle focus:wu-border-blue-p wu-transition-colors hover:wu-border-gray-40 ",e),ref:n,...t}));Cc.displayName="Textarea";const Tc=h.forwardRef((e,t)=>{const{Label:n,id:s=Cn(),variant:r="flat",readonly:o,maxLength:i,labelPosition:u="top",...l}=e,d=w=>{l.onChange&&l.onChange(w)},c=zt(u);return a.jsxs("div",{className:p(c,"wu-flex wu-textarea-container"),dir:l.dir,children:[a.jsx(Cc,{...l,ref:t,id:s,className:p("wu-peer wu-rounded-t-sm",r==="outlined"?"wu-border wu-border-gray-subtle":"",l.className),onChange:d,readOnly:o,maxLength:i}),n&&a.jsx(Te,{htmlFor:s,className:"wu-textarea-label",children:n})]})});Tc.displayName="WuTextarea";function dy(e){if(typeof e=="string"&&e.includes("T")){const t=Y.parseISO(e);return Y.format(t,"HH:mm")}if(typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)){const t=Y.parse(e,"HH:mm:ss",new Date);return Y.format(t,"HH:mm")}return typeof e=="string"&&/^\d{2}:\d{2}$/.test(e)?e:"00:00"}const Ec=["12",...Array.from({length:11},(e,t)=>String(t+1).padStart(2,"0"))],Mc=Array.from({length:60},(e,t)=>String(t).padStart(2,"0")),Ic=["am","pm"],ds=50;function wy(e){return Array(ds).fill(e).flat()}function Na(e,t){const n=e.indexOf(t);return[...e.slice(n),...e.slice(0,n)]}function fy(e,t){let n=Number(e);return t==="pm"&&n<12&&(n+=12),t==="am"&&n===12&&(n=0),String(n).padStart(2,"0")}function Ac(e){const t=Number(e),n=t>=12?"pm":"am",s=t%12===0?12:t%12;return{hour:String(s),meridiem:n}}const py=({value:e,isSelected:t,onClick:n})=>a.jsx("div",{onClick:n,className:p("wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-text-center wu-snap-start wu-rounded-[2px] wu-cursor-pointer hover:wu-bg-blue-p hover:wu-text-white",t&&"wu-bg-blue-p/15 wu-text-blue-p"),children:e}),Sa=({values:e,selectedValue:t,scrollRef:n,onSelect:s,repeatItems:r=!0,className:o})=>a.jsx("div",{ref:n,className:p("wu-overflow-y-scroll wu-w-8 wu-snap-y wu-snap-mandatory [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]",o),role:"presentation",children:(r?wy(e):e).map((i,u)=>a.jsx(py,{value:i,isSelected:i===t,onClick:()=>s(i)},`${i}-${u}`))});function hy(e,t,n,s){const r=h.useMemo(()=>e?Na(Ec,t.padStart(2,"0")):Ec,[e]),o=h.useMemo(()=>e?Na(Mc,n.padStart(2,"0")):Mc,[e]),i=h.useMemo(()=>e?Na(Ic,s):Ic,[e]);return{rotatedHours:r,rotatedMinutes:o,rotatedMeridiem:i}}function my(e,t,n){h.useEffect(()=>{function s(i){if(i){const u=i.scrollHeight/ds,l=Math.floor(ds/2);i.scrollTop=l*u;const d=()=>{const{scrollTop:c}=i,w=Math.round(c/u);(w<=1||w>=ds-2)&&(i.scrollTop=l*u)};return i.addEventListener("scroll",d),()=>{i.removeEventListener("scroll",d)}}}if(!e)return;const r=s(t.current),o=s(n.current);return()=>{r==null||r(),o==null||o()}},[e,t,n])}const Dc=({className:e,time:t,Label:n,labelPosition:s,dir:r,...o})=>{const[i,u]=h.useState(!1),[l,d]=h.useState(""),c=h.useRef(null),w=h.useRef(null),f=h.useRef(null),m=h.useRef(null),[g,b]=h.useState("12"),[x,S]=h.useState("00"),[v,T]=h.useState("am");h.useEffect(()=>{if(!t){d(""),b("12"),S("00"),T("am"),c.current&&(c.current.value="");return}const I=dy(t);d(I);const[k,F]=I.split(":"),{hour:P,meridiem:A}=Ac(k);b(P),S(F),T(A),c.current&&(c.current.value=I)},[t]),h.useEffect(()=>{const I=k=>{w.current&&!w.current.contains(k.target)&&u(!1)};return document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)}},[]),my(i,f,m);const{rotatedHours:N,rotatedMinutes:C,rotatedMeridiem:D}=hy(i,g,x,v),M=h.useCallback((I,k,F)=>{const P=I??g,A=k??x,V=F??v;b(P),S(A),T(V);const W=`${fy(P,V)}:${A}`;d(W)},[g,x,v]);return a.jsxs("div",{className:p("wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col",(s==="right"||s==="left")&&"wu-items-center",s==="left"&&"wu-flex-row",s==="right"&&"wu-flex-row-reverse","wu-input-wrapper"),dir:r,children:[n&&a.jsx(Te,{htmlFor:"time-picker",className:"wu-timepicker-label",children:n}),a.jsxs("div",{className:p("relative inline-block"),ref:w,dir:r,children:[a.jsx(Ge,{ref:c,type:"time",value:l,variant:"flat",role:"textbox",onChange:I=>{d(I.target.value);const[k,F]=I.target.value.split(":"),{hour:P,meridiem:A}=Ac(k);b(P),S(F),T(A)},className:"wu-w-[136px] wu-h-8 wu-pr-6 wu-border wu-border-lead/40 wu-text-gray-lead wu-timepicker-input",style:{WebkitAppearance:"none",MozAppearance:"textfield"},Icon:a.jsx(Ve,{icon:"wm-schedule",className:p("wu-text-base",o.disabled&&"wu-text-lead/50 wu-pointer-events-none wu-opacity-50"),onClick:()=>u(I=>!I),"data-testid":"wu-timepicker-icon"}),iconPosition:"right",dir:r,...o}),a.jsx("style",{children:`
|
|
19
19
|
input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
|
|
20
|
-
`}),i&&a.jsxs("div",{className:p("wu-absolute wu-w-[136px] wu-h-[228px] wu-flex wu-bg-white wu-border wu-shadow wu-z-50 wu-text-xs wu-gap-1 wu-p-1 wu-border-blue-p wu-text-lead",e),children:[a.jsx(Sa,{values:N,selectedValue:g.padStart(2,"0"),scrollRef:f,onSelect:I=>M(I,x),className:"wu-time-hour-picker"}),a.jsx(Sa,{values:C,selectedValue:x.padStart(2,"0"),scrollRef:m,onSelect:I=>M(g,I),className:"wu-time-minute-picker"}),a.jsx(Sa,{values:D,selectedValue:v,onSelect:I=>M(void 0,void 0,I),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};Dc.displayName="WuTimePicker";const gy=1,by=1e6;let Ca=0;function yy(){return Ca=(Ca+1)%Number.MAX_SAFE_INTEGER,Ca.toString()}const Ta=new Map,kc=e=>{if(Ta.has(e))return;const t=setTimeout(()=>{Ta.delete(e),gn({type:"REMOVE_TOAST",toastId:e})},by);Ta.set(e,t)},xy=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,gy)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?kc(n):e.toasts.forEach(s=>{kc(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},ws=[];let fs={toasts:[]};function gn(e){fs=xy(fs,e),ws.forEach(t=>{t(fs)})}function Pc({...e}){const t=yy(),n=r=>gn({type:"UPDATE_TOAST",toast:{...r,id:t}}),s=()=>gn({type:"DISMISS_TOAST",toastId:t});return gn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||s()}}}),{id:t,dismiss:s,update:n}}function vy(){const[e,t]=h.useState(fs);return h.useEffect(()=>(ws.push(t),()=>{const n=ws.indexOf(t);n>-1&&ws.splice(n,1)}),[e]),{...e,toast:Pc,dismiss:n=>gn({type:"DISMISS_TOAST",toastId:n})}}const Ny=()=>({showToast:({message:t,variant:n,duration:s,position:r})=>Pc({description:t,variant:n,duration:s,position:r})}),Sy=Se.Provider,Cy=_e.cva("wu-fixed wu-z-[100] wu-flex wu-max-h-screen wu-w-full wu-flex-col-reverse wu-px-4 wu-py-2 sm:wu-flex-col md:wu-max-w-[720px] wu-w-fit wu-toast-container",{variants:{position:{topRight:"wu-right-0 wu-top-0",top:"wu-top-0 wu-left-1/2 wu--translate-x-1/2",topLeft:"wu-left-0 wu-top-0",bottom:"wu-bottom-0 wu-left-1/2 wu--translate-x-1/2",bottomRight:"wu-right-0 wu-bottom-0",bottomLeft:"wu-left-0 wu-bottom-0"}},defaultVariants:{position:"top"}}),_c=y.forwardRef(({className:e,position:t,...n},s)=>a.jsx(Se.Viewport,{ref:s,className:p(Cy({position:t}),e),...n}));_c.displayName=Se.Viewport.displayName;const Ty=_e.cva("group wu-pointer-events-auto wu-text-xs wu-font-normal wu-relative wu-flex wu-w-full wu-min-h-12 wu-items-center wu-justify-between wu-overflow-hidden wu-px-4 wu-pr-0 wu-py-2 wu-shadow-sm wu-transition-all data-[swipe=cancel]:wu-translate-y-0 data-[swipe=end]:wu-translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:wu-translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:wu-transition-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[swipe=end]:wu-animate-out data-[state=closed]:wu-fade-out-80",{variants:{variant:{default:"wu-border wu-bg-white wu-text-text",success:"wu-text-green-deep wu-bg-green-soft",error:"wu-text-red-deep wu-bg-red-soft",warning:"wu-text-yellow-deep wu-bg-yellow-soft",info:"wu-text-blue-deep wu-bg-blue-soft"},position:{topRight:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",top:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",topLeft:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",bottom:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomRight:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomLeft:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full"}},defaultVariants:{variant:"success",position:"top"}}),Vc=y.forwardRef(({className:e,variant:t,position:n,...s},r)=>a.jsx(Se.Root,{ref:r,className:p(Ty({variant:t,position:n}),e),...s}));Vc.displayName=Se.Root.displayName;const Ey=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Action,{ref:n,className:p("wu-inline-flex wu-h-8 wu-shrink-0 wu-items-center wu-justify-center wu-border wu-bg-transparent wu-px-3 wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-secondary focus:wu-outline-none focus:wu-ring-2 focus:wu-ring-ring focus:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-50 group-[.destructive]:wu-border-muted/40 group-[.destructive]:hover:wu-border-destructive/30 group-[.destructive]:hover:wu-bg-destructive group-[.destructive]:hover:wu-text-destructive-foreground group-[.destructive]:focus:wu-ring-destructive",e),...t}));Ey.displayName=Se.Action.displayName;const Oc=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Close,{ref:n,className:p("wu-relative wu-right-4 wu-bottom-2 wu-rounded-sm wu-w-4 wu-h-4 wu-p-1 wu-text-foreground/50 wu-opacity-100 wu-transition-opacity hover:wu-text-foreground focus:wu-opacity-100 focus:wu-outline-none group-hover:wu-opacity-100 group-[.destructive]:wu-text-red-300 group-[.destructive]:hover:wu-text-red-50 group-[.destructive]:focus:wu-ring-red-400 group-[.destructive]:focus:wu-ring-offset-red-600",e),"toast-close":"","aria-label":"Close toast",...t,children:a.jsx("span",{className:"wm-close wu-text-base"})}));Oc.displayName=Se.Close.displayName;const Fc=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Title,{ref:n,className:p("wu-text-sm wu-font-semibold",e),...t}));Fc.displayName=Se.Title.displayName;const Lc=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Description,{ref:n,className:p("wu-text-sm wu-opacity-90",e),...t}));Lc.displayName=Se.Description.displayName;function My(){const{toasts:e}=vy(),t=e.reduce((n,s)=>{const r=s.position||"top";return n[r]||(n[r]=[]),n[r].push(s),n},{});return a.jsx(Sy,{children:Object.entries(t).map(([n,s])=>a.jsx(_c,{position:n,children:s.map(function({id:r,title:o,description:i,action:u,variant:l,position:d,...c}){const w={success:"wm-check-circle",info:"wm-info",warning:"wm-error",error:"wm-cancel"};return a.jsxs(Vc,{variant:l||"success",position:d,...c,children:[a.jsxs("div",{className:"wu-grid wu-gap-1",children:[o&&a.jsx(Fc,{children:o}),i&&a.jsxs(Lc,{className:"wu-flex wu-items-center wu-gap-3 wu-pr-6",children:[a.jsx(Ve,{icon:w[l||"success"],className:"wu-text-xl"}),i]})]}),u,a.jsx(Oc,{})]},r)})},n))})}const Iy=()=>a.jsx(My,{}),Wc=y.forwardRef(({className:e,dir:t,...n},s)=>a.jsx(xs.Root,{className:p("wu-bg-gray-40 wu-inline-flex wu-h-2 wu-w-8 wu-shrink-0 wu-cursor-pointer wu-items-center wu-rounded-full wu-transition-colors focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[5px] focus-visible:wu-ring-offset-background disabled:wu-cursor-not-allowed disabled:wu-opacity-50 data-[state=unchecked]:wu-bg-gray-25 wu-group","hover:wu-bg-gray-subtle hover:data-[state=unchecked]:wu-bg-gray-subtle",e),...n,ref:s,children:a.jsx(xs.Thumb,{className:p("wu-block wu-h-4 wu-w-4 wu-rounded-full wu-bg-gray-subtle wu-shadow-lg wu-ring-0 wu-transition-all data-[state=checked]:wu-bg-blue-p","group-hover:data-[state=unchecked]:wu-bg-gray-lead",t==="rtl"&&"-wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0",t!=="rtl"&&"wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0","wu-toggle-thumb")})}));Wc.displayName=xs.Root.displayName;const Bc=h.forwardRef((e,t)=>{const{Label:n,labelPosition:s="right",onChange:r,className:o,dir:i,disabled:u,id:l=Cn(),...d}=e;return h.useEffect(()=>{const{checked:c,defaultChecked:w}=d;c!==void 0&&w!==void 0&&console.error("WuToggle: Both `checked` and `defaultChecked` props are set. Use only one of them.")},[d.checked,d.defaultChecked]),a.jsxs("div",{className:p(Ay({labelPosition:s}),"wu-toggle-container"),dir:i,children:[a.jsx(Wc,{...d,id:l,disabled:u,ref:t,onCheckedChange:r,className:p("wu-peer",o),dir:i}),a.jsx(Te,{htmlFor:l,className:"wu-toggle-label",children:n})]})});Bc.displayName="WuToggle";const Ay=_e.cva("wu-flex wu-items-center wu-gap-3 wu-w-fit",{variants:{labelPosition:{right:"wu-flex-row",left:"wu-flex-row-reverse",top:"wu-flex-col-reverse wu-items-baseline"}}}),ps=h.createContext(null),Dy=()=>{const e=h.useContext(ps);if(!e)throw new Error("useTranslation must be used within a WuTranslationProvider");return e.useTranslation()},ky=()=>{const e=h.useContext(ps);if(!e)throw new Error("useLoadTranslationsFunction must be used within a WuTranslationProvider");return e},Py=({children:e})=>{const[t,n]=h.useState({}),[s,r]=h.useState({}),o=h.useCallback(async(d,c)=>{try{const f=await(await fetch(d)).json();n(f)}catch(w){console.error("Failed to load translations:",w),c&&n(c)}c&&r(c)},[]),i=h.useCallback(d=>{r(d)},[]),u=h.useCallback(()=>({t:(c,w)=>t[c]?t[c]:s[c]?s[c]:w||c}),[t,s]),l={loadTranslations:o,setFallbackTranslations:i,useTranslation:u};return a.jsx(ps.Provider,{value:l,children:e})},_y={qualitative:{"--wu-qualitative-1":"#4C5B94","--wu-qualitative-2":"#5B7AAE","--wu-qualitative-3":"#409EB5","--wu-qualitative-4":"#40B59E","--wu-qualitative-5":"#60C790","--wu-qualitative-6":"#9AD69A","--wu-qualitative-7":"#B3BD56","--wu-qualitative-8":"#DD8F40","--wu-qualitative-9":"#CE6550","--wu-qualitative-10":"#AE4C3D","--wu-qualitative-11":"#8F3328","--wu-qualitative-12":"#985D75","--wu-qualitative-13":"#B181A8","--wu-qualitative-14":"#C5A0C2","--wu-qualitative-15":"#DAC2E0","--wu-qualitative-16":"#E3D9E8"},blueSequential:{"--wu-blue-sequential-1":"#EBF8FF","--wu-blue-sequential-2":"#D7EFFF","--wu-blue-sequential-3":"#C2DEFF","--wu-blue-sequential-4":"#AAD0FF","--wu-blue-sequential-5":"#94C1F3","--wu-blue-sequential-6":"#7DB2E7","--wu-blue-sequential-7":"#67A3DB","--wu-blue-sequential-8":"#5194CF","--wu-blue-sequential-9":"#3B85C3","--wu-blue-sequential-10":"#2576B7","--wu-blue-sequential-11":"#256CAC","--wu-blue-sequential-12":"#1A60A6","--wu-blue-sequential-13":"#184994","--wu-blue-sequential-14":"#1C337F","--wu-blue-sequential-15":"#0D2163","--wu-blue-sequential-16":"#00083D"},greenSequential:{"--wu-green-sequential-1":"#E0F9ED","--wu-green-sequential-2":"#C4F3DC","--wu-green-sequential-3":"#A8ECCC","--wu-green-sequential-4":"#8DE5BD","--wu-green-sequential-5":"#78DDB1","--wu-green-sequential-6":"#62D3A3","--wu-green-sequential-7":"#4CC996","--wu-green-sequential-8":"#3ABF8A","--wu-green-sequential-9":"#35AF7F","--wu-green-sequential-10":"#329D75","--wu-green-sequential-11":"#308A6A","--wu-green-sequential-12":"#2D7A60","--wu-green-sequential-13":"#286A55","--wu-green-sequential-14":"#255C4B","--wu-green-sequential-15":"#1F4B3E","--wu-green-sequential-16":"#1B3D34"},redSequential:{"--wu-red-sequential-1":"#FEE9EC","--wu-red-sequential-2":"#FFD2D8","--wu-red-sequential-3":"#FFBBC4","--wu-red-sequential-4":"#FFA6B3","--wu-red-sequential-5":"#FB97A5","--wu-red-sequential-6":"#F78998","--wu-red-sequential-7":"#F37C8C","--wu-red-sequential-8":"#EE6F80","--wu-red-sequential-9":"#E76172","--wu-red-sequential-10":"#E15466","--wu-red-sequential-11":"#DA465B","--wu-red-sequential-12":"#D33B50","--wu-red-sequential-13":"#BC3548","--wu-red-sequential-14":"#A73343","--wu-red-sequential-15":"#91313E","--wu-red-sequential-16":"#7D2D38"},orangeSequential:{"--wu-orange-sequential-1":"#FDEDE5","--wu-orange-sequential-2":"#FCDFCF","--wu-orange-sequential-3":"#FBCFBA","--wu-orange-sequential-4":"#FAC5AB","--wu-orange-sequential-5":"#F7B694","--wu-orange-sequential-6":"#F6AB85","--wu-orange-sequential-7":"#F79D70","--wu-orange-sequential-8":"#F6915F","--wu-orange-sequential-9":"#EF8450","--wu-orange-sequential-10":"#E37944","--wu-orange-sequential-11":"#DB713C","--wu-orange-sequential-12":"#D06530","--wu-orange-sequential-13":"#C95E29","--wu-orange-sequential-14":"#BD521C","--wu-orange-sequential-15":"#B24610","--wu-orange-sequential-16":"#AA3F08"},divergent:{"--wu-red-divergent-1":"#661200","--wu-red-divergent-2":"#A11C00","--wu-red-divergent-3":"#D2300E","--wu-red-divergent-4":"#DF4828","--wu-red-divergent-5":"#EB6A4A","--wu-red-divergent-6":"#F4896C","--wu-red-divergent-7":"#FFC4B3","--wu-red-divergent-8":"#FFE2D9","--wu-divergent-neutral":"#F5F5F5","--wu-blue-divergent-1":"#DBD9E9","--wu-blue-divergent-2":"#B7B5D4","--wu-blue-divergent-3":"#9392BF","--wu-blue-divergent-4":"#7070AA","--wu-blue-divergent-5":"#4A5195","--wu-blue-divergent-6":"#1B3380","--wu-blue-divergent-7":"#182D72","--wu-blue-divergent-8":"#122254"},nps:{"--wu-nps-detractor":"#F85271","--wu-nps-passive":"#F1DA7E","--wu-nps-promoter":"#42BD84"},sentiment:{"--wu-sentiment-negative":"#F85271","--wu-sentiment-slightly-negative":"#F69A79","--wu-sentiment-neutral":"#F1DA7E","--wu-sentiment-slightly-positive":"#94D08B","--wu-sentiment-positive":"#42BD84","--wu-sentiment-no-sentiment":"#E0E0E0"}};window.wickUiVersion="1.29.2",Object.defineProperty(E,"useContext",{enumerable:!0,get:()=>h.useContext}),E.CHART_COLOR_SYSTEM=_y,E.WuAccordion=ud,E.WuActivityLog=dd,E.WuAppHeader=Fd,E.WuAppHeaderAccount=Fa,E.WuAppHeaderBar=za,E.WuAppHeaderHelp=La,E.WuAppHeaderMenu=qa,E.WuAppHeaderSearch=Vd,E.WuButton=Ce,E.WuCalender=_s,E.WuCard=Ja,E.WuCardFooter=Ra,E.WuCardHeader=Qa,E.WuCheckbox=Fe,E.WuChip=Kd,E.WuCombobox=nw,E.WuCopyToClipboard=sw,E.WuDataTable=ly,E.WuDatePicker=Wd,E.WuDateRangePicker=jd,E.WuDisplay=Nd,E.WuDrawer=cw,E.WuDrawerClose=dw,E.WuDrilldown=fm,E.WuFooter=yu,E.WuFormGroup=_d,E.WuHeading=xd,E.WuHelpButton=xu,E.WuIcon=Ve,E.WuInput=Ge,E.WuInputError=Dd,E.WuInputHint=kd,E.WuLabel=Te,E.WuListbox=Tm,E.WuLoader=St,E.WuMenu=zr,E.WuMenuCheckboxItem=sm,E.WuMenuIcon=$r,E.WuMenuItem=Kn,E.WuMenuItemGroup=rm,E.WuMenuRadioItem=am,E.WuMenuSeparatorItem=om,E.WuModal=km,E.WuModalClose=Om,E.WuModalContent=Pm,E.WuModalFooter=Vm,E.WuModalHeader=_m,E.WuMonthPicker=qm,E.WuPagination=Ou,E.WuPopover=zd,E.WuPopoverClose=Fs,E.WuPrimaryNavbar=$m,E.WuRadioGroup=Bu,E.WuScrollArea=Um,E.WuSecondaryNavbar=Hm,E.WuSelect=Pu,E.WuSidebar=Jg,E.WuSidebarCollapsibleMenu=nb,E.WuSidebarContent=Qg,E.WuSidebarFooter=Rg,E.WuSidebarGroup=eb,E.WuSidebarItem=Ml,E.WuSidebarMenu=tb,E.WuSidebarTrigger=El,E.WuSpotlight=Mu,E.WuStackedCard=ab,E.WuStackedCardOverlay=ob,E.WuStepper=Rb,E.WuSubMenu=im,E.WuSubtext=vd,E.WuSwitcher=fc,E.WuTab=oy,E.WuTable=cy,E.WuText=yd,E.WuTextarea=Tc,E.WuTimePicker=Dc,E.WuToast=Iy,E.WuToggle=Bc,E.WuTooltip=En,E.WuTranslationContext=ps,E.WuTranslationProvider=Py,E.WuTruncatedLabel=Od,E.WuVirtualScroll=Ct,E.calculatePosition=rb,E.useTranslation=Dy,E.useTranslationsContext=ky,E.useWuShowToast=Ny,E.useWuSidebar=tt,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
|
|
20
|
+
`}),i&&a.jsxs("div",{className:p("wu-absolute wu-w-[136px] wu-h-[228px] wu-flex wu-bg-white wu-border wu-shadow wu-z-50 wu-text-xs wu-gap-1 wu-p-1 wu-border-blue-p wu-text-lead",e),children:[a.jsx(Sa,{values:N,selectedValue:g.padStart(2,"0"),scrollRef:f,onSelect:I=>M(I,x),className:"wu-time-hour-picker"}),a.jsx(Sa,{values:C,selectedValue:x.padStart(2,"0"),scrollRef:m,onSelect:I=>M(g,I),className:"wu-time-minute-picker"}),a.jsx(Sa,{values:D,selectedValue:v,onSelect:I=>M(void 0,void 0,I),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};Dc.displayName="WuTimePicker";const gy=1,by=1e6;let Ca=0;function yy(){return Ca=(Ca+1)%Number.MAX_SAFE_INTEGER,Ca.toString()}const Ta=new Map,kc=e=>{if(Ta.has(e))return;const t=setTimeout(()=>{Ta.delete(e),gn({type:"REMOVE_TOAST",toastId:e})},by);Ta.set(e,t)},xy=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,gy)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?kc(n):e.toasts.forEach(s=>{kc(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},ws=[];let fs={toasts:[]};function gn(e){fs=xy(fs,e),ws.forEach(t=>{t(fs)})}function Pc({...e}){const t=yy(),n=r=>gn({type:"UPDATE_TOAST",toast:{...r,id:t}}),s=()=>gn({type:"DISMISS_TOAST",toastId:t});return gn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||s()}}}),{id:t,dismiss:s,update:n}}function vy(){const[e,t]=h.useState(fs);return h.useEffect(()=>(ws.push(t),()=>{const n=ws.indexOf(t);n>-1&&ws.splice(n,1)}),[e]),{...e,toast:Pc,dismiss:n=>gn({type:"DISMISS_TOAST",toastId:n})}}const Ny=()=>({showToast:({message:t,variant:n,duration:s,position:r})=>Pc({description:t,variant:n,duration:s,position:r})}),Sy=Se.Provider,Cy=_e.cva("wu-fixed wu-z-[100] wu-flex wu-max-h-screen wu-w-full wu-flex-col-reverse wu-px-4 wu-py-2 sm:wu-flex-col md:wu-max-w-[720px] wu-w-fit wu-toast-container",{variants:{position:{topRight:"wu-right-0 wu-top-0",top:"wu-top-0 wu-left-1/2 wu--translate-x-1/2",topLeft:"wu-left-0 wu-top-0",bottom:"wu-bottom-0 wu-left-1/2 wu--translate-x-1/2",bottomRight:"wu-right-0 wu-bottom-0",bottomLeft:"wu-left-0 wu-bottom-0"}},defaultVariants:{position:"top"}}),_c=y.forwardRef(({className:e,position:t,...n},s)=>a.jsx(Se.Viewport,{ref:s,className:p(Cy({position:t}),e),...n}));_c.displayName=Se.Viewport.displayName;const Ty=_e.cva("group wu-pointer-events-auto wu-text-xs wu-font-normal wu-relative wu-flex wu-w-full wu-min-h-12 wu-items-center wu-justify-between wu-overflow-hidden wu-px-4 wu-pr-0 wu-py-2 wu-shadow-sm wu-transition-all data-[swipe=cancel]:wu-translate-y-0 data-[swipe=end]:wu-translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:wu-translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:wu-transition-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[swipe=end]:wu-animate-out data-[state=closed]:wu-fade-out-80",{variants:{variant:{default:"wu-border wu-bg-white wu-text-text",success:"wu-text-green-deep wu-bg-green-soft",error:"wu-text-red-deep wu-bg-red-soft",warning:"wu-text-yellow-deep wu-bg-yellow-soft",info:"wu-text-blue-deep wu-bg-blue-soft"},position:{topRight:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",top:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",topLeft:"data-[state=closed]:wu-slide-out-to-top-full data-[state=open]:wu-slide-in-from-top-full",bottom:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomRight:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full",bottomLeft:"data-[state=closed]:wu-slide-out-to-bottom-full data-[state=open]:wu-slide-in-from-bottom-full"}},defaultVariants:{variant:"success",position:"top"}}),Vc=y.forwardRef(({className:e,variant:t,position:n,...s},r)=>a.jsx(Se.Root,{ref:r,className:p(Ty({variant:t,position:n}),e),...s}));Vc.displayName=Se.Root.displayName;const Ey=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Action,{ref:n,className:p("wu-inline-flex wu-h-8 wu-shrink-0 wu-items-center wu-justify-center wu-border wu-bg-transparent wu-px-3 wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-secondary focus:wu-outline-none focus:wu-ring-2 focus:wu-ring-ring focus:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-50 group-[.destructive]:wu-border-muted/40 group-[.destructive]:hover:wu-border-destructive/30 group-[.destructive]:hover:wu-bg-destructive group-[.destructive]:hover:wu-text-destructive-foreground group-[.destructive]:focus:wu-ring-destructive",e),...t}));Ey.displayName=Se.Action.displayName;const Oc=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Close,{ref:n,className:p("wu-relative wu-right-4 wu-bottom-2 wu-rounded-sm wu-w-4 wu-h-4 wu-p-1 wu-text-foreground/50 wu-opacity-100 wu-transition-opacity hover:wu-text-foreground focus:wu-opacity-100 focus:wu-outline-none group-hover:wu-opacity-100 group-[.destructive]:wu-text-red-300 group-[.destructive]:hover:wu-text-red-50 group-[.destructive]:focus:wu-ring-red-400 group-[.destructive]:focus:wu-ring-offset-red-600",e),"toast-close":"","aria-label":"Close toast",...t,children:a.jsx("span",{className:"wm-close wu-text-base"})}));Oc.displayName=Se.Close.displayName;const Fc=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Title,{ref:n,className:p("wu-text-sm wu-font-semibold",e),...t}));Fc.displayName=Se.Title.displayName;const Lc=y.forwardRef(({className:e,...t},n)=>a.jsx(Se.Description,{ref:n,className:p("wu-text-sm wu-opacity-90",e),...t}));Lc.displayName=Se.Description.displayName;function My(){const{toasts:e}=vy(),t=e.reduce((n,s)=>{const r=s.position||"top";return n[r]||(n[r]=[]),n[r].push(s),n},{});return a.jsx(Sy,{children:Object.entries(t).map(([n,s])=>a.jsx(_c,{position:n,children:s.map(function({id:r,title:o,description:i,action:u,variant:l,position:d,...c}){const w={success:"wm-check-circle",info:"wm-info",warning:"wm-error",error:"wm-cancel"};return a.jsxs(Vc,{variant:l||"success",position:d,...c,children:[a.jsxs("div",{className:"wu-grid wu-gap-1",children:[o&&a.jsx(Fc,{children:o}),i&&a.jsxs(Lc,{className:"wu-flex wu-items-center wu-gap-3 wu-pr-6",children:[a.jsx(Ve,{icon:w[l||"success"],className:"wu-text-xl"}),i]})]}),u,a.jsx(Oc,{})]},r)})},n))})}const Iy=()=>a.jsx(My,{}),Wc=y.forwardRef(({className:e,dir:t,...n},s)=>a.jsx(xs.Root,{className:p("wu-bg-gray-40 wu-inline-flex wu-h-2 wu-w-8 wu-shrink-0 wu-cursor-pointer wu-items-center wu-rounded-full wu-transition-colors focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[5px] focus-visible:wu-ring-offset-background disabled:wu-cursor-not-allowed disabled:wu-opacity-50 data-[state=unchecked]:wu-bg-gray-25 wu-group","hover:wu-bg-gray-subtle hover:data-[state=unchecked]:wu-bg-gray-subtle",e),...n,ref:s,children:a.jsx(xs.Thumb,{className:p("wu-block wu-h-4 wu-w-4 wu-rounded-full wu-bg-gray-subtle wu-shadow-lg wu-ring-0 wu-transition-all data-[state=checked]:wu-bg-blue-p","group-hover:data-[state=unchecked]:wu-bg-gray-lead",t==="rtl"&&"-wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0",t!=="rtl"&&"wu-translate-x-4 data-[state=unchecked]:wu-translate-x-0","wu-toggle-thumb")})}));Wc.displayName=xs.Root.displayName;const Bc=h.forwardRef((e,t)=>{const{Label:n,labelPosition:s="right",onChange:r,className:o,dir:i,disabled:u,id:l=Cn(),...d}=e;return h.useEffect(()=>{const{checked:c,defaultChecked:w}=d;c!==void 0&&w!==void 0&&console.error("WuToggle: Both `checked` and `defaultChecked` props are set. Use only one of them.")},[d.checked,d.defaultChecked]),a.jsxs("div",{className:p(Ay({labelPosition:s}),"wu-toggle-container"),dir:i,children:[a.jsx(Wc,{...d,id:l,disabled:u,ref:t,onCheckedChange:r,className:p("wu-peer",o),dir:i}),a.jsx(Te,{htmlFor:l,className:"wu-toggle-label",children:n})]})});Bc.displayName="WuToggle";const Ay=_e.cva("wu-flex wu-items-center wu-gap-3 wu-w-fit",{variants:{labelPosition:{right:"wu-flex-row",left:"wu-flex-row-reverse",top:"wu-flex-col-reverse wu-items-baseline"}}}),ps=h.createContext(null),Dy=()=>{const e=h.useContext(ps);if(!e)throw new Error("useTranslation must be used within a WuTranslationProvider");return e.useTranslation()},ky=()=>{const e=h.useContext(ps);if(!e)throw new Error("useLoadTranslationsFunction must be used within a WuTranslationProvider");return e},Py=({children:e})=>{const[t,n]=h.useState({}),[s,r]=h.useState({}),o=h.useCallback(async(d,c)=>{try{const f=await(await fetch(d)).json();n(f)}catch(w){console.error("Failed to load translations:",w),c&&n(c)}c&&r(c)},[]),i=h.useCallback(d=>{r(d)},[]),u=h.useCallback(()=>({t:(c,w)=>t[c]?t[c]:s[c]?s[c]:w||c}),[t,s]),l={loadTranslations:o,setFallbackTranslations:i,useTranslation:u};return a.jsx(ps.Provider,{value:l,children:e})},_y={qualitative:{"--wu-qualitative-1":"#4C5B94","--wu-qualitative-2":"#5B7AAE","--wu-qualitative-3":"#409EB5","--wu-qualitative-4":"#40B59E","--wu-qualitative-5":"#60C790","--wu-qualitative-6":"#9AD69A","--wu-qualitative-7":"#B3BD56","--wu-qualitative-8":"#DD8F40","--wu-qualitative-9":"#CE6550","--wu-qualitative-10":"#AE4C3D","--wu-qualitative-11":"#8F3328","--wu-qualitative-12":"#985D75","--wu-qualitative-13":"#B181A8","--wu-qualitative-14":"#C5A0C2","--wu-qualitative-15":"#DAC2E0","--wu-qualitative-16":"#E3D9E8"},blueSequential:{"--wu-blue-sequential-1":"#EBF8FF","--wu-blue-sequential-2":"#D7EFFF","--wu-blue-sequential-3":"#C2DEFF","--wu-blue-sequential-4":"#AAD0FF","--wu-blue-sequential-5":"#94C1F3","--wu-blue-sequential-6":"#7DB2E7","--wu-blue-sequential-7":"#67A3DB","--wu-blue-sequential-8":"#5194CF","--wu-blue-sequential-9":"#3B85C3","--wu-blue-sequential-10":"#2576B7","--wu-blue-sequential-11":"#256CAC","--wu-blue-sequential-12":"#1A60A6","--wu-blue-sequential-13":"#184994","--wu-blue-sequential-14":"#1C337F","--wu-blue-sequential-15":"#0D2163","--wu-blue-sequential-16":"#00083D"},greenSequential:{"--wu-green-sequential-1":"#E0F9ED","--wu-green-sequential-2":"#C4F3DC","--wu-green-sequential-3":"#A8ECCC","--wu-green-sequential-4":"#8DE5BD","--wu-green-sequential-5":"#78DDB1","--wu-green-sequential-6":"#62D3A3","--wu-green-sequential-7":"#4CC996","--wu-green-sequential-8":"#3ABF8A","--wu-green-sequential-9":"#35AF7F","--wu-green-sequential-10":"#329D75","--wu-green-sequential-11":"#308A6A","--wu-green-sequential-12":"#2D7A60","--wu-green-sequential-13":"#286A55","--wu-green-sequential-14":"#255C4B","--wu-green-sequential-15":"#1F4B3E","--wu-green-sequential-16":"#1B3D34"},redSequential:{"--wu-red-sequential-1":"#FEE9EC","--wu-red-sequential-2":"#FFD2D8","--wu-red-sequential-3":"#FFBBC4","--wu-red-sequential-4":"#FFA6B3","--wu-red-sequential-5":"#FB97A5","--wu-red-sequential-6":"#F78998","--wu-red-sequential-7":"#F37C8C","--wu-red-sequential-8":"#EE6F80","--wu-red-sequential-9":"#E76172","--wu-red-sequential-10":"#E15466","--wu-red-sequential-11":"#DA465B","--wu-red-sequential-12":"#D33B50","--wu-red-sequential-13":"#BC3548","--wu-red-sequential-14":"#A73343","--wu-red-sequential-15":"#91313E","--wu-red-sequential-16":"#7D2D38"},orangeSequential:{"--wu-orange-sequential-1":"#FDEDE5","--wu-orange-sequential-2":"#FCDFCF","--wu-orange-sequential-3":"#FBCFBA","--wu-orange-sequential-4":"#FAC5AB","--wu-orange-sequential-5":"#F7B694","--wu-orange-sequential-6":"#F6AB85","--wu-orange-sequential-7":"#F79D70","--wu-orange-sequential-8":"#F6915F","--wu-orange-sequential-9":"#EF8450","--wu-orange-sequential-10":"#E37944","--wu-orange-sequential-11":"#DB713C","--wu-orange-sequential-12":"#D06530","--wu-orange-sequential-13":"#C95E29","--wu-orange-sequential-14":"#BD521C","--wu-orange-sequential-15":"#B24610","--wu-orange-sequential-16":"#AA3F08"},divergent:{"--wu-red-divergent-1":"#661200","--wu-red-divergent-2":"#A11C00","--wu-red-divergent-3":"#D2300E","--wu-red-divergent-4":"#DF4828","--wu-red-divergent-5":"#EB6A4A","--wu-red-divergent-6":"#F4896C","--wu-red-divergent-7":"#FFC4B3","--wu-red-divergent-8":"#FFE2D9","--wu-divergent-neutral":"#F5F5F5","--wu-blue-divergent-1":"#DBD9E9","--wu-blue-divergent-2":"#B7B5D4","--wu-blue-divergent-3":"#9392BF","--wu-blue-divergent-4":"#7070AA","--wu-blue-divergent-5":"#4A5195","--wu-blue-divergent-6":"#1B3380","--wu-blue-divergent-7":"#182D72","--wu-blue-divergent-8":"#122254"},nps:{"--wu-nps-detractor":"#F85271","--wu-nps-passive":"#F1DA7E","--wu-nps-promoter":"#42BD84"},sentiment:{"--wu-sentiment-negative":"#F85271","--wu-sentiment-slightly-negative":"#F69A79","--wu-sentiment-neutral":"#F1DA7E","--wu-sentiment-slightly-positive":"#94D08B","--wu-sentiment-positive":"#42BD84","--wu-sentiment-no-sentiment":"#E0E0E0"}};window.wickUiVersion="1.29.3",Object.defineProperty(E,"useContext",{enumerable:!0,get:()=>h.useContext}),E.CHART_COLOR_SYSTEM=_y,E.WuAccordion=ud,E.WuActivityLog=dd,E.WuAppHeader=Fd,E.WuAppHeaderAccount=Fa,E.WuAppHeaderBar=za,E.WuAppHeaderHelp=La,E.WuAppHeaderMenu=qa,E.WuAppHeaderSearch=Vd,E.WuButton=Ce,E.WuCalender=_s,E.WuCard=Ja,E.WuCardFooter=Ra,E.WuCardHeader=Qa,E.WuCheckbox=Fe,E.WuChip=Kd,E.WuCombobox=nw,E.WuCopyToClipboard=sw,E.WuDataTable=ly,E.WuDatePicker=Wd,E.WuDateRangePicker=jd,E.WuDisplay=Nd,E.WuDrawer=cw,E.WuDrawerClose=dw,E.WuDrilldown=fm,E.WuFooter=yu,E.WuFormGroup=_d,E.WuHeading=xd,E.WuHelpButton=xu,E.WuIcon=Ve,E.WuInput=Ge,E.WuInputError=Dd,E.WuInputHint=kd,E.WuLabel=Te,E.WuListbox=Tm,E.WuLoader=St,E.WuMenu=zr,E.WuMenuCheckboxItem=sm,E.WuMenuIcon=$r,E.WuMenuItem=Kn,E.WuMenuItemGroup=rm,E.WuMenuRadioItem=am,E.WuMenuSeparatorItem=om,E.WuModal=km,E.WuModalClose=Om,E.WuModalContent=Pm,E.WuModalFooter=Vm,E.WuModalHeader=_m,E.WuMonthPicker=qm,E.WuPagination=Ou,E.WuPopover=zd,E.WuPopoverClose=Fs,E.WuPrimaryNavbar=$m,E.WuRadioGroup=Bu,E.WuScrollArea=Um,E.WuSecondaryNavbar=Hm,E.WuSelect=Pu,E.WuSidebar=Jg,E.WuSidebarCollapsibleMenu=nb,E.WuSidebarContent=Qg,E.WuSidebarFooter=Rg,E.WuSidebarGroup=eb,E.WuSidebarItem=Ml,E.WuSidebarMenu=tb,E.WuSidebarTrigger=El,E.WuSpotlight=Mu,E.WuStackedCard=ab,E.WuStackedCardOverlay=ob,E.WuStepper=Rb,E.WuSubMenu=im,E.WuSubtext=vd,E.WuSwitcher=fc,E.WuTab=oy,E.WuTable=cy,E.WuText=yd,E.WuTextarea=Tc,E.WuTimePicker=Dc,E.WuToast=Iy,E.WuToggle=Bc,E.WuTooltip=En,E.WuTranslationContext=ps,E.WuTranslationProvider=Py,E.WuTruncatedLabel=Od,E.WuVirtualScroll=Ct,E.calculatePosition=rb,E.useTranslation=Dy,E.useTranslationsContext=ky,E.useWuShowToast=Ny,E.useWuSidebar=tt,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
|
|
21
21
|
//# sourceMappingURL=index.js.map
|