@npm-questionpro/wick-ui-lib 1.29.3 → 1.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/components/input/WuInput.d.ts +7 -4
- package/dist/src/components/input/WuInput.test.d.ts +0 -1
- package/dist/src/components/typography/iconClasses.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/wick-ui-lib/es/index.js +6164 -5989
- package/dist/wick-ui-lib/umd/index.js +12 -12
- package/package.json +2 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
(function(E,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("@radix-ui/react-avatar"),require("react"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-accordion"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("@radix-ui/react-label"),require("react-day-picker"),require("@radix-ui/react-checkbox"),require("cmdk"),require("@radix-ui/react-popover"),require("@radix-ui/react-tooltip"),require("react-virtuoso"),require("@radix-ui/react-dropdown-menu"),require("@tanstack/react-table"),require("date-fns"),require("@radix-ui/react-dialog"),require("@radix-ui/react-scroll-area"),require("@radix-ui/react-radio-group"),require("@radix-ui/react-separator"),require("react-dom"),require("@radix-ui/react-toggle-group"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tabs"),require("@radix-ui/react-toast"),require("@radix-ui/react-switch")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@radix-ui/react-avatar","react","clsx","tailwind-merge","@radix-ui/react-accordion","@radix-ui/react-slot","class-variance-authority","@radix-ui/react-label","react-day-picker","@radix-ui/react-checkbox","cmdk","@radix-ui/react-popover","@radix-ui/react-tooltip","react-virtuoso","@radix-ui/react-dropdown-menu","@tanstack/react-table","date-fns","@radix-ui/react-dialog","@radix-ui/react-scroll-area","@radix-ui/react-radio-group","@radix-ui/react-separator","react-dom","@radix-ui/react-toggle-group","@radix-ui/react-toggle","@radix-ui/react-tabs","@radix-ui/react-toast","@radix-ui/react-switch"],a):(E=typeof globalThis<"u"?globalThis:E||self,a(E["wick-ui-lib"]={},E["react/jsx-runtime"],E.RadixUIAvatar,E.React,E.clsx,E.tailwindMerge,E.RadixUIAccordion,E.RadixUISlot,E.ClassVarianceAuthority,E.RadixUILabel,E.ReactDayPicker,E.RadixUICheckbox,E.cmdk,E.RadixUIPopover,E.RadixUITooltip,E.ReactVirtuoso,E.RadixUIDropdownMenu,E.TanstackReactTable,E.dateFns,E.RadixUIDialog,E.RadixUIScrollArea,E.RadixUIRadioGroup,E.RadixUISeparator,E.ReactDOM,E.RadixUIToggleGroup,E.RadixUIToggle,E.RadixUITabs,E.RadixUIToast,E.RadixUISwitch))})(this,(function(E,a,yt,h,Uc,jc,Gc,xt,_e,Kc,Ia,Yc,xe,Lt,bs,Xc,Zc,qe,Y,Aa,Jc,Qc,Rc,ed,td,nd,sd,rd,ad){"use strict";var Ly=Object.defineProperty;var Wy=(E,a,yt)=>a in E?Ly(E,a,{enumerable:!0,configurable:!0,writable:!0,value:yt}):E[a]=yt;var Ne=(E,a,yt)=>Wy(E,typeof a!="symbol"?a+"":a,yt);var qc;function fe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const vt=fe(yt),y=fe(h),ot=fe(Gc),Da=fe(Kc),ys=fe(Yc),Wt=fe(Lt),Bt=fe(bs),ee=fe(Zc),R=fe(Aa),it=fe(Jc),qt=fe(Qc),ka=fe(Rc),Pa=fe(ed),Sn=fe(td),_a=fe(nd),ut=fe(sd),Se=fe(rd),xs=fe(ad),od=jc.extendTailwindMerge({prefix:"wu-"});function p(...e){return od(Uc.clsx(e))}const vs=e=>{window.open(e,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600")};function Cn(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function zt(e){switch(e){case"top":return"wu-flex-col-reverse";case"left":return"wu-flex-row-reverse wu-gap-2";case"right":return"wu-flex-row wu-gap-2";default:return""}}const id=e=>e?/\S+@questionpro\.com/.test(e):!1,Va=ot.Root,Ns=y.forwardRef(({className:e,...t},n)=>a.jsx(ot.Item,{ref:n,className:p("wu-border-b",e),...t}));Ns.displayName="AccordionItem";const Ss=y.forwardRef(({className:e,children:t,...n},s)=>a.jsx(ot.Header,{className:"wu-flex",children:a.jsxs(ot.Trigger,{ref:s,className:p("wu-flex wu-flex-1 wu-text-xs wu-items-center wu-justify-between wu-p-2 wu-transition-all","[&[data-state=open]>.wu-arrow-icon]:wu-rotate-180",e),...n,children:[t,a.jsx("span",{className:"wu-arrow-icon wm-keyboard-arrow-down wu-transition-transform wu-duration-200"})]})}));Ss.displayName=ot.Trigger.displayName;const Cs=y.forwardRef(({className:e,children:t,...n},s)=>a.jsx(ot.Content,{ref:s,className:"wu-overflow-hidden wu-text-xs wu-px-2 wu-font-light wu-transition-all data-[state=closed]:wu-animate-accordion-up data-[state=open]:wu-animate-accordion-down",...n,children:a.jsx("div",{className:p("wu-pb-4 wu-pt-0",e),children:t})}));Cs.displayName=ot.Content.displayName;const ud=e=>{const{items:t,className:n,dir:s="ltr"}=e;if(e.type==="multiple"){const{defaultValue:r=[],value:o,onValueChange:i}=e;return a.jsx(Va,{type:"multiple",className:"wu-w-full wu-accordion-container",defaultValue:r,value:o,onValueChange:i,dir:s,children:t.map(({value:u,Summary:l,Details:d,className:c})=>a.jsxs(Ns,{value:u,dir:s,className:p(n,c),children:[a.jsx(Ss,{dir:s,className:"wu-accordion-summary",children:l}),a.jsx(Cs,{dir:s,className:"wu-accordion-details",children:d})]},u))})}else{const{defaultValue:r,value:o,onValueChange:i}=e;return a.jsx(Va,{type:"single",className:"wu-w-full wu-accordion-container",defaultValue:r,value:o,onValueChange:i,dir:s,collapsible:!0,children:t.map(({value:u,Summary:l,Details:d,className:c})=>a.jsxs(Ns,{value:u,dir:s,className:p(n,c),children:[a.jsx(Ss,{dir:s,className:"wu-accordion-summary",children:l}),a.jsx(Cs,{dir:s,className:"wu-accordion-details",children:d})]},u))})}},Ts=y.forwardRef(({className:e,...t},n)=>a.jsx(vt.Root,{ref:n,className:p("wu-relative wu-flex wu-h-10 wu-w-10 wu-shrink-0 wu-overflow-hidden wu-rounded-full",e),...t}));Ts.displayName=vt.Root.displayName;const Es=y.forwardRef(({className:e,...t},n)=>a.jsx(vt.Image,{ref:n,className:p("wu-aspect-square wu-h-full wu-w-full",e),...t}));Es.displayName=vt.Image.displayName;const Ms=y.forwardRef(({className:e,...t},n)=>a.jsx(vt.Fallback,{ref:n,className:p("wu-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-rounded-full wu-bg-muted",e),...t}));Ms.displayName=vt.Fallback.displayName;const ce={timelineContainer:"_timelineContainer_1rtax_1",mainVerticalLine:"_mainVerticalLine_1rtax_5",dateGroup:"_dateGroup_1rtax_9",dateHeader:"_dateHeader_1rtax_13",dateDot:"_dateDot_1rtax_17",dateText:"_dateText_1rtax_21",logList:"_logList_1rtax_25",logItem:"_logItem_1rtax_29",timelineDotSmall:"_timelineDotSmall_1rtax_33",content:"_content_1rtax_37",time:"_time_1rtax_1",tags:"_tags_1rtax_45",tag:"_tag_1rtax_45",tagPrimary:"_tagPrimary_1rtax_53",tagSecondary:"_tagSecondary_1rtax_57",userActionRow:"_userActionRow_1rtax_61",avatar:"_avatar_1rtax_65",actionText:"_actionText_1rtax_69",userName:"_userName_1rtax_73"},Xe=(e,t)=>t.includes(".")?t.split(".").reduce((n,s)=>n==null?void 0:n[s],e):e==null?void 0:e[t],ld=({log:e,accessorKey:t})=>{const n=Xe(e,t.time),s=Xe(e,t.userName),r=Xe(e,t.userInitials),o=Xe(e,t.userImage??""),i=Xe(e,t.tags??""),u=Xe(e,t.description);return a.jsxs("div",{className:ce.logItem,"data-slot":"log-item",children:[a.jsx("div",{className:ce.timelineDotSmall,"data-slot":"timeline-dot-small"}),a.jsxs("div",{className:ce.content,"data-slot":"content",children:[a.jsx("div",{className:ce.time,"data-slot":"time",children:n}),(i==null?void 0:i.length)>0&&a.jsx("div",{className:ce.tags,"data-slot":"tags",children:i.map((l,d)=>a.jsx("span",{className:p(ce.tag,d===0?ce.tagPrimary:ce.tagSecondary),"data-slot":"tag",children:l},l))}),a.jsxs("div",{className:ce.userActionRow,"data-slot":"user-action-row",children:[a.jsxs(Ts,{className:ce.avatar,"data-slot":"avatar",children:[a.jsx(Es,{src:o,alt:s,"data-slot":"log-user-avatar-image"}),a.jsx(Ms,{className:"wu-text-[10px] wu-bg-slate-400 wu-text-white","data-slot":"log-user-avatar-fallback",children:r})]}),a.jsxs("p",{className:ce.actionText,"data-slot":"action-text",children:[a.jsx("span",{className:ce.userName,"data-slot":"log-username",children:s})," ",u]})]})]})]})},cd=h.memo(ld),dd=({logs:e,accessorKey:t,className:n,...s})=>{const r=h.useMemo(()=>e.reduce((o,i)=>{const u=Xe(i,t.date);return u&&(o[u]=o[u]||[],o[u].push(i)),o},{}),[e,t.date]);return a.jsxs("div",{className:p(ce.timelineContainer,n),"data-slot":"timeline-container",...s,children:[a.jsx("div",{className:ce.mainVerticalLine,"data-slot":"main-vertical-line"}),Object.entries(r).map(([o,i])=>a.jsxs("div",{className:ce.dateGroup,"data-slot":"date-group",children:[a.jsxs("div",{className:ce.dateHeader,"data-slot":"date-header",children:[a.jsx("div",{className:ce.dateDot,"data-slot":"date-dot"}),a.jsx("span",{className:ce.dateText,"data-slot":"date-text",children:o})]}),a.jsx("div",{className:ce.logList,"data-slot":"log-list",children:i.map(u=>{const l=Xe(u,t.id);return a.jsx(cd,{log:u,accessorKey:t},l)})})]},o))]})};function Is(e,t){h.useEffect(()=>{const n=s=>{Array.isArray(e)&&e.some(r=>!r.current||r.current.contains(s.target))||!Array.isArray(e)&&(!e.current||e.current.contains(s.target))||t(s)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])}const As={dropdownContainer:"_dropdownContainer_vvlo9_1",open:"_open_vvlo9_1",dropdownMenu:"_dropdownMenu_vvlo9_1"},Oa=({dir:e,Trigger:t,triggerClassName:n,DropdownContent:s,isAllowActiveStyle:r})=>{const[o,i]=h.useState(!1),u=h.useRef(null),l=h.useRef(null);Is([u,l],()=>i(!1));const d=()=>{i(!o)};return a.jsx(a.Fragment,{children:a.jsx("div",{className:As.dropdownContainer,children:a.jsx("ul",{children:a.jsxs("li",{className:p("wu-flex wu-relative",o&&As.open),children:[a.jsx("button",{className:p("wu-w-8 wu-h-8 wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher",n,r&&o&&"wu-bg-white wu-text-blue-switcher"),onClick:c=>{c.preventDefault(),d()},ref:l,"aria-label":"dropdown-trigger",children:t}),a.jsx("div",{className:p(As.dropdownMenu,{open:o},e==="rtl"?"wu-left-[-10px] wu-top-[38px]":"wu-right-[-7px] wu-top-[38px]"),dir:e,ref:u,"aria-label":"user-menu",children:s})]})})})})},Ds=_e.cva(["wu-inline-flex wu-items-center wu-justify-center wu-rounded","wu-whitespace-nowrap wu-text-sm wu-leading-normal wu-font-normal","wu-transition-colors wu-duration-300","focus:wu-outline-none focus-visible:wu-outline-2 focus-visible:wu-outline-offset-2","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle"],{variants:{size:{md:["wu-p-2 wu-h-8 wu-min-w-[104px]","wu-text-sm wu-leading-normal"],sm:["wu-p-1 wu-h-6 wu-min-w-[90px]","wu-text-xs"],mobile:["wu-p-4 wu-h-10 wu-min-w-[104px] wu-rounded-lg","wu-text-base"]},color:{primary:["wu-bg-blue-p hover:wu-bg-blue-pHoverDeep","wu-text-blue-p hover:wu-text-blue-q","wu-ring-1 wu-ring-blue-p hover:wu-ring-blue-pHoverDeep","focus-visible:wu-outline-blue-p/50"],upgrade:["wu-bg-orange-soft hover:wu-bg-orange-deep","wu-text-orange-deep hover:wu-text-orange-deep","wu-ring-1 wu-ring-orange-soft hover:wu-ring-orange-deep","focus-visible:wu-outline-orange-deep/50"],error:["wu-bg-red-deep hover:wu-bg-red-soft","wu-text-red-deep hover:wu-text-red-deep","wu-ring-1 wu-ring-red-deep hover:wu-ring-red-soft","focus-visible:wu-outline-red-deep/50"]},variant:{primary:["wu-text-white hover:wu-text-white","wu-ring-0"],secondary:["wu-bg-transparent hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-ring-0"],outline:["wu-bg-white hover:wu-text-white","disabled:wu-bg-transparent disabled:wu-ring-gray-subtle"],rounded:["wu-text-white hover:wu-text-white","wu-ring-0 wu-rounded-full"],link:["wu-bg-transparent hover:wu-bg-transparent","disabled:wu-bg-transparent","hover:wu-underline wu-underline-offset-2","wu-min-w-[auto] wu-px-2","wu-ring-0","focus-visible:wu-outline-offset-0"],iconOnly:["wu-aspect-square","wu-p-2 wu-h-8 wu-w-8 wu-min-w-[auto]","wu-text-xl wu-leading-5","wu-bg-transparent wu-text-gray-lead","hover:wu-bg-black hover:wu-bg-opacity-[0.04]","focus-visible:wu-bg-black focus-visible:wu-bg-opacity-[0.04]","wu-ring-0","disabled:wu-grayscale disabled:wu-opacity-80"]}},defaultVariants:{variant:"primary",size:"md",color:"primary"},compoundVariants:[]}),Nt=y.forwardRef(({className:e,variant:t,size:n,color:s,asChild:r=!1,...o},i)=>{const u=r?xt.Slot:"button";return a.jsx(u,{className:p(Ds({size:n,color:s,variant:t,className:e})),ref:i,...o})});Nt.displayName="Button";const St=h.forwardRef((e,t)=>wd(e,t)),wd=(e,t)=>{const{size:n="md",color:s="#1B87E6",variant:r="dots",...o}=e,i=p("wu-w-[4em] wu-h-[1em] wu-inline-block wu-text-xs wu-relative wu-loader-dot-container");let u="7px";n==="sm"?u="7px":n==="md"?u="12px":n==="lg"?u="18px":typeof n=="string"&&(u=n);const l={backgroundColor:s,width:u,height:u},d=a.jsxs("div",{...o,ref:t,className:p("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"status","aria-busy":"true",children:[a.jsx("div",{className:"wu-w-12 wu-h-12 wu-border-2 wu-rounded-full wu-animate-spin",style:{width:u,height:u,borderTopColor:s}}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]}),c=a.jsxs("div",{...o,ref:t,className:p("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"alert","aria-busy":"true",children:[a.jsxs("ul",{className:i,style:{fontSize:u},role:"loader",children:[a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l})]}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]});return a.jsx(a.Fragment,{children:r==="spinner"?d:c})};St.displayName="WuLoader";const Ce=h.forwardRef(({disabled:e,loading:t,variant:n="primary",size:s="md",Icon:r,iconPosition:o="left",children:i,floating:u,className:l,color:d="primary",selected:c,...w},f)=>{const m={primary:"#1986e688",upgrade:"#F5A300",error:"#ef444488"};return a.jsxs(Nt,{...w,disabled:e,variant:n,size:s,className:p(u&&"wu-shadow-qp","wu-flex wu-items-center wu-justify-center wu-gap-2",o==="right"&&"wu-flex-row-reverse",t?"wu-cursor-not-allowed wu-ring-0":"",c&&"wu-bg-blue-p wu-bg-opacity-15 wu-text-blue-pHoverDeep wu-ring-0",d==="error"&&"hover:wu-text-maroon",l),color:d,style:{backgroundColor:t?m[d]:"",...w.style},ref:f,children:[!t&&r&&a.jsx(a.Fragment,{children:r}),t&&a.jsx(St,{color:"#fff",size:"sm"}),!t&&i]})});Ce.displayName="WuButton";const fd=({onLogout:e,DataCenter:t})=>a.jsxs("section",{className:"wu-flex wu-justify-between wu-px-4 wu-py-4 wu-text-white wu-bg-gray-lead",children:[a.jsx("div",{className:"wu-flex-1 wu-flex wu-items-start",children:t}),a.jsx(Ce,{variant:"outline",size:"sm",Icon:a.jsx("span",{className:"wm-logout"}),className:"wu-text-white wu-bg-transparent wu-ring-white hover:wu-bg-gray-10 hover:wu-text-gray-lead hover:wu-ring-gray-lead",onClick:e,"aria-label":"logout",children:"LOGOUT"})]}),pd=({user:e,dir:t})=>{const n=[e!=null&&e.usage&&Object.keys(e.usage).length>0?{title:e.usage.title,url:e.usage.url,icon:"wm-bar-chart wu-text-base",node:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-center wu-w-20",children:[a.jsx("code",{className:"wu-font-medium",children:e.usage.collectedResponseCount||"0"}),a.jsx("span",{className:"wu-text-xs wu-font-normal",children:"Responses"})]})}:null,e!=null&&e.invoice&&Object.keys(e.invoice).length>0?{title:e.invoice.title,url:e.invoice.url,icon:"wm-attach-money wu-text-base wu-font-semibold",node:a.jsx("div",{className:"wu-flex wu-justify-center wu-items-center wu-w-20",children:a.jsx("code",{children:e.invoice.size})})}:null].filter(Boolean);return a.jsxs(a.Fragment,{children:[a.jsx("ul",{children:n.map(({title:s,url:r,icon:o,node:i},u)=>a.jsx("li",{className:u<n.length-1?"wu-border-b wu-border-gray-subtle":"",children:a.jsxs("a",{href:r,className:p("wu-flex items-center wu-justify-between wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pl-4":"wu-pr-4"),children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("span",{className:p(o,"wu-w-12 wu-text-center")}),a.jsx("span",{children:s})]}),i]})},u))}),a.jsx("hr",{className:"wu-border-gray-subtle"})]})},hd=({settings:e,dir:t})=>a.jsxs(a.Fragment,{children:[a.jsx("hr",{className:"wu-border-gray-subtle"}),a.jsxs("section",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("span",{className:p("wu-absolute wm-settings wu-text-base",t==="rtl"?"wu-right-4":"wu-left-4")}),a.jsx("ul",{className:"wu-w-full",dir:t,children:e==null?void 0:e.map(n=>a.jsx("li",{tabIndex:-1,dir:t,children:a.jsx("a",{href:n.url,className:p("wu-inline-block wu-w-full wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pr-14 wu-text-right":"wu-pl-14"),children:n.title})},n.title))})]}),a.jsx("hr",{className:"wu-border-gray-subtle"})]}),md=({user:e,dir:t})=>{var n,s,r,o,i,u,l,d,c;return a.jsxs("section",{className:p("wu-flex wu-gap-2 wu-p-4 wu-w-full",t==="rtl"?"wu-pr-0":"wu-pl-0"),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-12",children:a.jsx("span",{className:"wu-text-base wm-person"})}),a.jsxs("div",{className:p("wu-flex wu-flex-col wu-gap-1",t==="rtl"&&"wu-text-right"),children:[a.jsx("p",{children:(n=e==null?void 0:e.profile)==null?void 0:n.title}),a.jsxs("a",{href:(s=e==null?void 0:e.license)==null?void 0:s.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",dir:t,children:[a.jsx("p",{children:(r=e==null?void 0:e.profile)==null?void 0:r.subtitle}),a.jsx("p",{className:"wu-font-light",children:(o=e==null?void 0:e.profile)==null?void 0:o.companyName})]}),(e==null?void 0:e.license)&&Object.keys(e.license).length>0&&a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-between wu-gap-6 wu-mt-3",dir:t,children:[a.jsx("a",{href:(i=e==null?void 0:e.license)==null?void 0:i.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",children:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",children:[a.jsx("p",{className:"wu-font-normal",children:(u=e==null?void 0:e.license)==null?void 0:u.subtitle}),a.jsx("button",{tabIndex:-1,className:"wu-px-3 wu-py-1 wu-border wu-rounded-sm wu-border-gray-subtle group-hover/license:wu-border-blue-p",children:(l=e==null?void 0:e.license)==null?void 0:l.title})]})}),a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",dir:t,children:[a.jsx("p",{className:"wu-font-normal",children:(d=e==null?void 0:e.license)==null?void 0:d.expiryDatePostFixString}),a.jsx("p",{children:(c=e==null?void 0:e.license)==null?void 0:c.expiryDate})]})]})]})]})},Fa=({user:e,onLogout:t,dir:n,DataCenter:s})=>{var r,o;return e?a.jsx(Oa,{Trigger:a.jsxs(Ts,{className:p("wu-group wu-border wu-border-white wu-text-sm wu-font-medium wu-bg-transparent wu-w-8 wu-h-8 wu-ring-white wu-leading-[33px] wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-gray-switcher wu-header-user-avatar"),children:[a.jsx(Es,{className:"hover:wu-opacity-80",src:(r=e==null?void 0:e.profile)==null?void 0:r.profilePicture,alt:"User"}),a.jsx(Ms,{children:(o=e==null?void 0:e.profile)==null?void 0:o.initials})]}),dir:n,triggerClassName:"wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-w-8 wu-h-8 wu-app-user-button",DropdownContent:a.jsxs("div",{className:p("wu-p-0 wu-text-xs wu-font-medium wu-border wu-rounded-none wu-min-w-72 wu-w-max wu-max-w-96 wu-border-gray-subtle wu-text-gray-lead wu-overflow-hidden wu-bg-white"),dir:n,children:[a.jsx(md,{user:e,dir:n}),(e==null?void 0:e.settings)&&e.settings.length>0&&a.jsx(hd,{settings:e.settings,dir:n}),a.jsx(pd,{user:e,dir:n}),a.jsx(fd,{onLogout:t,DataCenter:s})]})}):null},La=({menuList:e,dir:t})=>{const n=[{icon:"wm-help",title:"Help center",subTitle:"Knowledge Base",link:"https://www.questionpro.com/help/"},{icon:"wm-live-tv",title:"Free training",subTitle:"Webinar",link:"https://www.questionpro.com/training"},{icon:"wm-local-fire-department",title:"Updates",subTitle:"What's new!",link:"https://www.questionpro.com/updates/"},{icon:"wm-support-agent",title:"Live support",subTitle:"Support",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"},{icon:"wm-book-2",title:"Org wiki",subTitle:"wiki",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"}];return a.jsx(Oa,{dir:t,Trigger:a.jsx("span",{className:"wm-question-mark wu-text-base"}),triggerClassName:"wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-rounded-full wu-border wu-border-white focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-blue-switcher wu-app-header-help",isAllowActiveStyle:!0,DropdownContent:a.jsx("ul",{children:(e||n).map((s,r)=>a.jsx("li",{className:"wu-p-0 wu-w-[136px]",dir:t,children:s.target==="window"?a.jsx("a",{tabIndex:0,rel:"noopener noreferrer",onClick:()=>vs(s.link),onKeyDown:o=>{o.key==="Enter"&&vs(s.link)},className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[.04] focus-visible:wu-border-none focus-visible:wu-bg-black
|
|
2
|
-
focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0 wu-cursor-pointer`,children:a.jsx(
|
|
1
|
+
(function(E,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("@radix-ui/react-avatar"),require("react"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-accordion"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("react-dom"),require("@radix-ui/react-label"),require("react-day-picker"),require("@radix-ui/react-checkbox"),require("cmdk"),require("@radix-ui/react-popover"),require("@radix-ui/react-tooltip"),require("react-virtuoso"),require("@radix-ui/react-dropdown-menu"),require("@tanstack/react-table"),require("date-fns"),require("@radix-ui/react-dialog"),require("@radix-ui/react-scroll-area"),require("@radix-ui/react-radio-group"),require("@radix-ui/react-separator"),require("@radix-ui/react-toggle-group"),require("@radix-ui/react-toggle"),require("@radix-ui/react-tabs"),require("@radix-ui/react-toast"),require("@radix-ui/react-switch")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@radix-ui/react-avatar","react","clsx","tailwind-merge","@radix-ui/react-accordion","@radix-ui/react-slot","class-variance-authority","react-dom","@radix-ui/react-label","react-day-picker","@radix-ui/react-checkbox","cmdk","@radix-ui/react-popover","@radix-ui/react-tooltip","react-virtuoso","@radix-ui/react-dropdown-menu","@tanstack/react-table","date-fns","@radix-ui/react-dialog","@radix-ui/react-scroll-area","@radix-ui/react-radio-group","@radix-ui/react-separator","@radix-ui/react-toggle-group","@radix-ui/react-toggle","@radix-ui/react-tabs","@radix-ui/react-toast","@radix-ui/react-switch"],a):(E=typeof globalThis<"u"?globalThis:E||self,a(E["wick-ui-lib"]={},E["react/jsx-runtime"],E.RadixUIAvatar,E.React,E.clsx,E.tailwindMerge,E.RadixUIAccordion,E.RadixUISlot,E.ClassVarianceAuthority,E.ReactDOM,E.RadixUILabel,E.ReactDayPicker,E.RadixUICheckbox,E.cmdk,E.RadixUIPopover,E.RadixUITooltip,E.ReactVirtuoso,E.RadixUIDropdownMenu,E.TanstackReactTable,E.dateFns,E.RadixUIDialog,E.RadixUIScrollArea,E.RadixUIRadioGroup,E.RadixUISeparator,E.RadixUIToggleGroup,E.RadixUIToggle,E.RadixUITabs,E.RadixUIToast,E.RadixUISwitch))})(this,(function(E,a,yt,h,Rc,ed,td,vt,Oe,nd,rd,Pa,sd,ve,Wt,vr,ad,od,$e,H,_a,id,ud,ld,cd,dd,wd,fd,pd){"use strict";var Uy=Object.defineProperty;var jy=(E,a,yt)=>a in E?Uy(E,a,{enumerable:!0,configurable:!0,writable:!0,value:yt}):E[a]=yt;var Se=(E,a,yt)=>jy(E,typeof a!="symbol"?a+"":a,yt);var Xc;function fe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const xt=fe(yt),y=fe(h),ot=fe(td),Va=fe(nd),Oa=fe(rd),xr=fe(sd),Bt=fe(Wt),qt=fe(vr),ee=fe(od),R=fe(_a),it=fe(id),$t=fe(ud),Fa=fe(ld),Tn=fe(cd),La=fe(dd),ut=fe(wd),Ce=fe(fd),Nr=fe(pd),hd=ed.extendTailwindMerge({prefix:"wu-"});function p(...e){return hd(Rc.clsx(e))}const Sr=e=>{window.open(e,"_blank","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=800,height=600")};function Cr(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function En(e){switch(e){case"top":return"wu-flex-col-reverse";case"left":return"wu-flex-row-reverse wu-gap-2";case"right":return"wu-flex-row wu-gap-2";default:return""}}const md=e=>e?/\S+@questionpro\.com/.test(e):!1,Wa=ot.Root,Tr=y.forwardRef(({className:e,...t},n)=>a.jsx(ot.Item,{ref:n,className:p("wu-border-b",e),...t}));Tr.displayName="AccordionItem";const Er=y.forwardRef(({className:e,children:t,...n},r)=>a.jsx(ot.Header,{className:"wu-flex",children:a.jsxs(ot.Trigger,{ref:r,className:p("wu-flex wu-flex-1 wu-text-xs wu-items-center wu-justify-between wu-p-2 wu-transition-all","[&[data-state=open]>.wu-arrow-icon]:wu-rotate-180",e),...n,children:[t,a.jsx("span",{className:"wu-arrow-icon wm-keyboard-arrow-down wu-transition-transform wu-duration-200"})]})}));Er.displayName=ot.Trigger.displayName;const Mr=y.forwardRef(({className:e,children:t,...n},r)=>a.jsx(ot.Content,{ref:r,className:"wu-overflow-hidden wu-text-xs wu-px-2 wu-font-light wu-transition-all data-[state=closed]:wu-animate-accordion-up data-[state=open]:wu-animate-accordion-down",...n,children:a.jsx("div",{className:p("wu-pb-4 wu-pt-0",e),children:t})}));Mr.displayName=ot.Content.displayName;const gd=e=>{const{items:t,className:n,dir:r="ltr"}=e;if(e.type==="multiple"){const{defaultValue:s=[],value:o,onValueChange:i}=e;return a.jsx(Wa,{type:"multiple",className:"wu-w-full wu-accordion-container",defaultValue:s,value:o,onValueChange:i,dir:r,children:t.map(({value:u,Summary:l,Details:d,className:c})=>a.jsxs(Tr,{value:u,dir:r,className:p(n,c),children:[a.jsx(Er,{dir:r,className:"wu-accordion-summary",children:l}),a.jsx(Mr,{dir:r,className:"wu-accordion-details",children:d})]},u))})}else{const{defaultValue:s,value:o,onValueChange:i}=e;return a.jsx(Wa,{type:"single",className:"wu-w-full wu-accordion-container",defaultValue:s,value:o,onValueChange:i,dir:r,collapsible:!0,children:t.map(({value:u,Summary:l,Details:d,className:c})=>a.jsxs(Tr,{value:u,dir:r,className:p(n,c),children:[a.jsx(Er,{dir:r,className:"wu-accordion-summary",children:l}),a.jsx(Mr,{dir:r,className:"wu-accordion-details",children:d})]},u))})}},Ir=y.forwardRef(({className:e,...t},n)=>a.jsx(xt.Root,{ref:n,className:p("wu-relative wu-flex wu-h-10 wu-w-10 wu-shrink-0 wu-overflow-hidden wu-rounded-full",e),...t}));Ir.displayName=xt.Root.displayName;const Dr=y.forwardRef(({className:e,...t},n)=>a.jsx(xt.Image,{ref:n,className:p("wu-aspect-square wu-h-full wu-w-full",e),...t}));Dr.displayName=xt.Image.displayName;const Ar=y.forwardRef(({className:e,...t},n)=>a.jsx(xt.Fallback,{ref:n,className:p("wu-flex wu-h-full wu-w-full wu-items-center wu-justify-center wu-rounded-full wu-bg-muted",e),...t}));Ar.displayName=xt.Fallback.displayName;const ce={timelineContainer:"_timelineContainer_1rtax_1",mainVerticalLine:"_mainVerticalLine_1rtax_5",dateGroup:"_dateGroup_1rtax_9",dateHeader:"_dateHeader_1rtax_13",dateDot:"_dateDot_1rtax_17",dateText:"_dateText_1rtax_21",logList:"_logList_1rtax_25",logItem:"_logItem_1rtax_29",timelineDotSmall:"_timelineDotSmall_1rtax_33",content:"_content_1rtax_37",time:"_time_1rtax_1",tags:"_tags_1rtax_45",tag:"_tag_1rtax_45",tagPrimary:"_tagPrimary_1rtax_53",tagSecondary:"_tagSecondary_1rtax_57",userActionRow:"_userActionRow_1rtax_61",avatar:"_avatar_1rtax_65",actionText:"_actionText_1rtax_69",userName:"_userName_1rtax_73"},Ze=(e,t)=>t.includes(".")?t.split(".").reduce((n,r)=>n==null?void 0:n[r],e):e==null?void 0:e[t],bd=({log:e,accessorKey:t})=>{const n=Ze(e,t.time),r=Ze(e,t.userName),s=Ze(e,t.userInitials),o=Ze(e,t.userImage??""),i=Ze(e,t.tags??""),u=Ze(e,t.description);return a.jsxs("div",{className:ce.logItem,"data-slot":"log-item",children:[a.jsx("div",{className:ce.timelineDotSmall,"data-slot":"timeline-dot-small"}),a.jsxs("div",{className:ce.content,"data-slot":"content",children:[a.jsx("div",{className:ce.time,"data-slot":"time",children:n}),(i==null?void 0:i.length)>0&&a.jsx("div",{className:ce.tags,"data-slot":"tags",children:i.map((l,d)=>a.jsx("span",{className:p(ce.tag,d===0?ce.tagPrimary:ce.tagSecondary),"data-slot":"tag",children:l},l))}),a.jsxs("div",{className:ce.userActionRow,"data-slot":"user-action-row",children:[a.jsxs(Ir,{className:ce.avatar,"data-slot":"avatar",children:[a.jsx(Dr,{src:o,alt:r,"data-slot":"log-user-avatar-image"}),a.jsx(Ar,{className:"wu-text-[10px] wu-bg-slate-400 wu-text-white","data-slot":"log-user-avatar-fallback",children:s})]}),a.jsxs("p",{className:ce.actionText,"data-slot":"action-text",children:[a.jsx("span",{className:ce.userName,"data-slot":"log-username",children:r})," ",u]})]})]})]})},yd=h.memo(bd),vd=({logs:e,accessorKey:t,className:n,...r})=>{const s=h.useMemo(()=>e.reduce((o,i)=>{const u=Ze(i,t.date);return u&&(o[u]=o[u]||[],o[u].push(i)),o},{}),[e,t.date]);return a.jsxs("div",{className:p(ce.timelineContainer,n),"data-slot":"timeline-container",...r,children:[a.jsx("div",{className:ce.mainVerticalLine,"data-slot":"main-vertical-line"}),Object.entries(s).map(([o,i])=>a.jsxs("div",{className:ce.dateGroup,"data-slot":"date-group",children:[a.jsxs("div",{className:ce.dateHeader,"data-slot":"date-header",children:[a.jsx("div",{className:ce.dateDot,"data-slot":"date-dot"}),a.jsx("span",{className:ce.dateText,"data-slot":"date-text",children:o})]}),a.jsx("div",{className:ce.logList,"data-slot":"log-list",children:i.map(u=>{const l=Ze(u,t.id);return a.jsx(yd,{log:u,accessorKey:t},l)})})]},o))]})};function kr(e,t){h.useEffect(()=>{const n=r=>{Array.isArray(e)&&e.some(s=>!s.current||s.current.contains(r.target))||!Array.isArray(e)&&(!e.current||e.current.contains(r.target))||t(r)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,t])}const Pr={dropdownContainer:"_dropdownContainer_vvlo9_1",open:"_open_vvlo9_1",dropdownMenu:"_dropdownMenu_vvlo9_1"},Ba=({dir:e,Trigger:t,triggerClassName:n,DropdownContent:r,isAllowActiveStyle:s})=>{const[o,i]=h.useState(!1),u=h.useRef(null),l=h.useRef(null);kr([u,l],()=>i(!1));const d=()=>{i(!o)};return a.jsx(a.Fragment,{children:a.jsx("div",{className:Pr.dropdownContainer,children:a.jsx("ul",{children:a.jsxs("li",{className:p("wu-flex wu-relative",o&&Pr.open),children:[a.jsx("button",{className:p("wu-w-8 wu-h-8 wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher",n,s&&o&&"wu-bg-white wu-text-blue-switcher"),onClick:c=>{c.preventDefault(),d()},ref:l,"aria-label":"dropdown-trigger",children:t}),a.jsx("div",{className:p(Pr.dropdownMenu,{open:o},e==="rtl"?"wu-left-[-10px] wu-top-[38px]":"wu-right-[-7px] wu-top-[38px]"),dir:e,ref:u,"aria-label":"user-menu",children:r})]})})})})},_r=Oe.cva(["wu-inline-flex wu-items-center wu-justify-center wu-rounded","wu-whitespace-nowrap wu-text-sm wu-leading-normal wu-font-normal","wu-transition-colors wu-duration-300","focus:wu-outline-none focus-visible:wu-outline-2 focus-visible:wu-outline-offset-2","disabled:wu-cursor-not-allowed disabled:wu-bg-black/10 disabled:wu-text-gray-subtle disabled:wu-outline-gray-subtle"],{variants:{size:{md:["wu-p-2 wu-h-8 wu-min-w-[104px]","wu-text-sm wu-leading-normal"],sm:["wu-p-1 wu-h-6 wu-min-w-[90px]","wu-text-xs"],mobile:["wu-p-4 wu-h-10 wu-min-w-[104px] wu-rounded-lg","wu-text-base"]},color:{primary:["wu-bg-blue-p hover:wu-bg-blue-pHoverDeep","wu-text-blue-p hover:wu-text-blue-q","wu-ring-1 wu-ring-blue-p hover:wu-ring-blue-pHoverDeep","focus-visible:wu-outline-blue-p/50"],upgrade:["wu-bg-orange-soft hover:wu-bg-orange-deep","wu-text-orange-deep hover:wu-text-orange-deep","wu-ring-1 wu-ring-orange-soft hover:wu-ring-orange-deep","focus-visible:wu-outline-orange-deep/50"],error:["wu-bg-red-deep hover:wu-bg-red-soft","wu-text-red-deep hover:wu-text-red-deep","wu-ring-1 wu-ring-red-deep hover:wu-ring-red-soft","focus-visible:wu-outline-red-deep/50"]},variant:{primary:["wu-text-white hover:wu-text-white","wu-ring-0"],secondary:["wu-bg-transparent hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-ring-0"],outline:["wu-bg-white hover:wu-text-white","disabled:wu-bg-transparent disabled:wu-ring-gray-subtle"],rounded:["wu-text-white hover:wu-text-white","wu-ring-0 wu-rounded-full"],link:["wu-bg-transparent hover:wu-bg-transparent","disabled:wu-bg-transparent","hover:wu-underline wu-underline-offset-2","wu-min-w-[auto] wu-px-2","wu-ring-0","focus-visible:wu-outline-offset-0"],iconOnly:["wu-aspect-square","wu-p-2 wu-h-8 wu-w-8 wu-min-w-[auto]","wu-text-xl wu-leading-5","wu-bg-transparent wu-text-gray-lead","hover:wu-bg-black hover:wu-bg-opacity-[0.04]","focus-visible:wu-bg-black focus-visible:wu-bg-opacity-[0.04]","wu-ring-0","disabled:wu-grayscale disabled:wu-opacity-80"]}},defaultVariants:{variant:"primary",size:"md",color:"primary"},compoundVariants:[]}),Nt=y.forwardRef(({className:e,variant:t,size:n,color:r,asChild:s=!1,...o},i)=>{const u=s?vt.Slot:"button";return a.jsx(u,{className:p(_r({size:n,color:r,variant:t,className:e})),ref:i,...o})});Nt.displayName="Button";const St=h.forwardRef((e,t)=>xd(e,t)),xd=(e,t)=>{const{size:n="md",color:r="#1B87E6",variant:s="dots",...o}=e,i=p("wu-w-[4em] wu-h-[1em] wu-inline-block wu-text-xs wu-relative wu-loader-dot-container");let u="7px";n==="sm"?u="7px":n==="md"?u="12px":n==="lg"?u="18px":typeof n=="string"&&(u=n);const l={backgroundColor:r,width:u,height:u},d=a.jsxs("div",{...o,ref:t,className:p("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"status","aria-busy":"true",children:[a.jsx("div",{className:"wu-w-12 wu-h-12 wu-border-2 wu-rounded-full wu-animate-spin",style:{width:u,height:u,borderTopColor:r}}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]}),c=a.jsxs("div",{...o,ref:t,className:p("wu-flex wu-items-center wu-justify-center wu-gap-2 wu-w-fit",e.className),role:"alert","aria-busy":"true",children:[a.jsxs("ul",{className:i,style:{fontSize:u},role:"loader",children:[a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l}),a.jsx("li",{className:"wu-dot wu-loader-dot",style:l})]}),e.message&&a.jsx("p",{className:"wu-inline-block wu-loader-message",children:e.message})]});return a.jsx(a.Fragment,{children:s==="spinner"?d:c})};St.displayName="WuLoader";const Te=h.forwardRef(({disabled:e,loading:t,variant:n="primary",size:r="md",Icon:s,iconPosition:o="left",children:i,floating:u,className:l,color:d="primary",selected:c,...w},f)=>{const m={primary:"#1986e688",upgrade:"#F5A300",error:"#ef444488"};return a.jsxs(Nt,{...w,disabled:e,variant:n,size:r,className:p(u&&"wu-shadow-qp","wu-flex wu-items-center wu-justify-center wu-gap-2",o==="right"&&"wu-flex-row-reverse",t?"wu-cursor-not-allowed wu-ring-0":"",c&&"wu-bg-blue-p wu-bg-opacity-15 wu-text-blue-pHoverDeep wu-ring-0",d==="error"&&"hover:wu-text-maroon",l),color:d,style:{backgroundColor:t?m[d]:"",...w.style},ref:f,children:[!t&&s&&a.jsx(a.Fragment,{children:s}),t&&a.jsx(St,{color:"#fff",size:"sm"}),!t&&i]})});Te.displayName="WuButton";const Nd=({onLogout:e,DataCenter:t})=>a.jsxs("section",{className:"wu-flex wu-justify-between wu-px-4 wu-py-4 wu-text-white wu-bg-gray-lead",children:[a.jsx("div",{className:"wu-flex-1 wu-flex wu-items-start",children:t}),a.jsx(Te,{variant:"outline",size:"sm",Icon:a.jsx("span",{className:"wm-logout"}),className:"wu-text-white wu-bg-transparent wu-ring-white hover:wu-bg-gray-10 hover:wu-text-gray-lead hover:wu-ring-gray-lead",onClick:e,"aria-label":"logout",children:"LOGOUT"})]}),Sd=({user:e,dir:t})=>{const n=[e!=null&&e.usage&&Object.keys(e.usage).length>0?{title:e.usage.title,url:e.usage.url,icon:"wm-bar-chart wu-text-base",node:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-center wu-w-20",children:[a.jsx("code",{className:"wu-font-medium",children:e.usage.collectedResponseCount||"0"}),a.jsx("span",{className:"wu-text-xs wu-font-normal",children:"Responses"})]})}:null,e!=null&&e.invoice&&Object.keys(e.invoice).length>0?{title:e.invoice.title,url:e.invoice.url,icon:"wm-attach-money wu-text-base wu-font-semibold",node:a.jsx("div",{className:"wu-flex wu-justify-center wu-items-center wu-w-20",children:a.jsx("code",{children:e.invoice.size})})}:null].filter(Boolean);return a.jsxs(a.Fragment,{children:[a.jsx("ul",{children:n.map(({title:r,url:s,icon:o,node:i},u)=>a.jsx("li",{className:u<n.length-1?"wu-border-b wu-border-gray-subtle":"",children:a.jsxs("a",{href:s,className:p("wu-flex items-center wu-justify-between wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pl-4":"wu-pr-4"),children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2",children:[a.jsx("span",{className:p(o,"wu-w-12 wu-text-center")}),a.jsx("span",{children:r})]}),i]})},u))}),a.jsx("hr",{className:"wu-border-gray-subtle"})]})},Cd=({settings:e,dir:t})=>a.jsxs(a.Fragment,{children:[a.jsx("hr",{className:"wu-border-gray-subtle"}),a.jsxs("section",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("span",{className:p("wu-absolute wm-settings wu-text-base",t==="rtl"?"wu-right-4":"wu-left-4")}),a.jsx("ul",{className:"wu-w-full",dir:t,children:e==null?void 0:e.map(n=>a.jsx("li",{tabIndex:-1,dir:t,children:a.jsx("a",{href:n.url,className:p("wu-inline-block wu-w-full wu-py-2 hover:wu-bg-gray-20 focus-within:wu-bg-gray-20 focus:wu-outline-none",t==="rtl"?"wu-pr-14 wu-text-right":"wu-pl-14"),children:n.title})},n.title))})]}),a.jsx("hr",{className:"wu-border-gray-subtle"})]}),Td=({user:e,dir:t})=>{var n,r,s,o,i,u,l,d,c;return a.jsxs("section",{className:p("wu-flex wu-gap-2 wu-p-4 wu-w-full",t==="rtl"?"wu-pr-0":"wu-pl-0"),children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-12",children:a.jsx("span",{className:"wu-text-base wm-person"})}),a.jsxs("div",{className:p("wu-flex wu-flex-col wu-gap-1",t==="rtl"&&"wu-text-right"),children:[a.jsx("p",{children:(n=e==null?void 0:e.profile)==null?void 0:n.title}),a.jsxs("a",{href:(r=e==null?void 0:e.license)==null?void 0:r.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",dir:t,children:[a.jsx("p",{children:(s=e==null?void 0:e.profile)==null?void 0:s.subtitle}),a.jsx("p",{className:"wu-font-light",children:(o=e==null?void 0:e.profile)==null?void 0:o.companyName})]}),(e==null?void 0:e.license)&&Object.keys(e.license).length>0&&a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-between wu-gap-6 wu-mt-3",dir:t,children:[a.jsx("a",{href:(i=e==null?void 0:e.license)==null?void 0:i.url,className:"hover:wu-text-blue-p wu-group/license focus:wu-outline-none focus:wu-text-blue-p",children:a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",children:[a.jsx("p",{className:"wu-font-normal",children:(u=e==null?void 0:e.license)==null?void 0:u.subtitle}),a.jsx("button",{tabIndex:-1,className:"wu-px-3 wu-py-1 wu-border wu-rounded-sm wu-border-gray-subtle group-hover/license:wu-border-blue-p",children:(l=e==null?void 0:e.license)==null?void 0:l.title})]})}),a.jsxs("div",{className:"wu-flex wu-flex-col wu-items-start wu-gap-1",dir:t,children:[a.jsx("p",{className:"wu-font-normal",children:(d=e==null?void 0:e.license)==null?void 0:d.expiryDatePostFixString}),a.jsx("p",{children:(c=e==null?void 0:e.license)==null?void 0:c.expiryDate})]})]})]})]})},qa=({user:e,onLogout:t,dir:n,DataCenter:r})=>{var s,o;return e?a.jsx(Ba,{Trigger:a.jsxs(Ir,{className:p("wu-group wu-border wu-border-white wu-text-sm wu-font-medium wu-bg-transparent wu-w-8 wu-h-8 wu-ring-white wu-leading-[33px] wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-gray-switcher wu-header-user-avatar"),children:[a.jsx(Dr,{className:"hover:wu-opacity-80",src:(s=e==null?void 0:e.profile)==null?void 0:s.profilePicture,alt:"User"}),a.jsx(Ar,{children:(o=e==null?void 0:e.profile)==null?void 0:o.initials})]}),dir:n,triggerClassName:"wu-rounded-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-w-8 wu-h-8 wu-app-user-button",DropdownContent:a.jsxs("div",{className:p("wu-p-0 wu-text-xs wu-font-medium wu-border wu-rounded-none wu-min-w-72 wu-w-max wu-max-w-96 wu-border-gray-subtle wu-text-gray-lead wu-overflow-hidden wu-bg-white"),dir:n,children:[a.jsx(Td,{user:e,dir:n}),(e==null?void 0:e.settings)&&e.settings.length>0&&a.jsx(Cd,{settings:e.settings,dir:n}),a.jsx(Sd,{user:e,dir:n}),a.jsx(Nd,{onLogout:t,DataCenter:r})]})}):null},$a=({menuList:e,dir:t})=>{const n=[{icon:"wm-help",title:"Help center",subTitle:"Knowledge Base",link:"https://www.questionpro.com/help/"},{icon:"wm-live-tv",title:"Free training",subTitle:"Webinar",link:"https://www.questionpro.com/training"},{icon:"wm-local-fire-department",title:"Updates",subTitle:"What's new!",link:"https://www.questionpro.com/updates/"},{icon:"wm-support-agent",title:"Live support",subTitle:"Support",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"},{icon:"wm-book-2",title:"Org wiki",subTitle:"wiki",link:"https://www.questionpro.com/a/liveperson.do?mode=launch&pageMode=quickChat",target:"window"}];return a.jsx(Ba,{dir:t,Trigger:a.jsx("span",{className:"wm-question-mark wu-text-base"}),triggerClassName:"wu-w-8 wu-h-8 wu-flex wu-items-center wu-justify-center wu-rounded-full wu-border wu-border-white focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft focus-visible:wu-ring-offset-2 focus-visible:wu-ring-offset-gray-switcher wu-text-white wu-transition-colors hover:wu-bg-white hover:wu-text-blue-switcher wu-app-header-help",isAllowActiveStyle:!0,DropdownContent:a.jsx("ul",{children:(e||n).map((r,s)=>a.jsx("li",{className:"wu-p-0 wu-w-[136px]",dir:t,children:r.target==="window"?a.jsx("a",{tabIndex:0,rel:"noopener noreferrer",onClick:()=>Sr(r.link),onKeyDown:o=>{o.key==="Enter"&&Sr(r.link)},className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[.04] focus-visible:wu-border-none focus-visible:wu-bg-black
|
|
2
|
+
focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0 wu-cursor-pointer`,children:a.jsx(za,{item:r,dir:t})}):a.jsx("a",{href:r.link,target:"_blank",className:`wu-block wu-w-full wu-h-full wu-px-3 wu-py-2 hover:wu-bg-black hover:wu-bg-opacity-[0.04] focus-visible:wu-border-none
|
|
3
3
|
focus-visible:wu-bg-black
|
|
4
|
-
focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0`,rel:"noreferrer",children:a.jsx(Wa,{item:s,dir:t})})},r))})})},Wa=({item:e,dir:t})=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-[5px]",dir:t,children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6",children:a.jsx("span",{className:p("wu-text-xl wu-text-gray-lead",e.icon)})}),a.jsx("p",{className:"wu-text-sm wu-text-gray-lead",children:e.title})]}),gd=e=>{const[t,n]=h.useState(()=>window.innerWidth<=e);return h.useEffect(()=>{const s=()=>{n(window.innerWidth<=e)};return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[e]),t};function bd({productCategories:e,openCategory:t,setOpenCategory:n}){const s=(u,l)=>{const d=l[u];if(d){d.focus();const c=e[u]||null;n(c)}},r=(u,l,d,c)=>{u.preventDefault();const w=d==="down"?l+1:l-1;s(w,c)},o=(u,l,d,c)=>{t!=null&&t.products&&t.products[t.products.length-1].name===c&&(u.preventDefault(),s(l+1,d))},i=(u,l)=>{u.preventDefault();const d=e[l]===t?null:e[l];n(d)};return function(l,d,c){const w=document.querySelectorAll("[data-product-category]"),{key:f}=l;switch(f){case"ArrowDown":r(l,d,"down",w);break;case"ArrowUp":r(l,d,"up",w);break;case"Tab":o(l,d,w,c);break;case"Enter":case" ":i(l,d);break}}}const yd=e=>{const{size:t="lg",className:n,children:s,...r}=e,o={sm:"wu-text-body-3",md:"wu-text-body-2",lg:"wu-text-body-1"},i=e.as||"div";return a.jsx(i,{...r,className:p(o[t],n),children:s})},xd=e=>{const{size:t="xl",className:n,children:s,...r}=e,o={sm:"h4",md:"h3",lg:"h2",xl:"h1"},i={sm:"wu-text-heading-4",md:"wu-text-heading-3",lg:"wu-text-heading-2",xl:"wu-text-heading-1"},u=o[t];return a.jsx(u,{...r,className:p(i[t],n),children:s})},vd=e=>{const{size:t="lg",className:n,children:s,...r}=e,o={sm:"wu-text-sub-3",md:"wu-text-sub-2",lg:"wu-text-sub-1"},i=e.as||"div";return a.jsx(i,{...r,className:p(o[t],n),children:s})},Nd=e=>{const{size:t="lg",className:n,children:s,...r}=e,o={md:"wu-text-display-2",lg:"wu-text-display-1"},i=e.as||"h1";return a.jsx(i,{...r,className:p(o[t],n),children:s})},Ve=e=>{const{icon:t,className:n,...s}=e;return a.jsx("span",{...s,className:p(t,n),role:"presentation","aria-label":t})},Sd=({buttonRef:e,handleDropdownToggle:t,handleKeyDown:n,isDropdownOpen:s,activeProductName:r,dir:o="ltr",homeLink:i="/"})=>a.jsxs("button",{ref:e,type:"button",className:p("wu-text-base wu-font-normal wu-flex wu-items-center wu-justify-between wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger"),onClick:t,onKeyDown:u=>{s&&u.key==="ArrowDown"&&n(u,-1)},"aria-label":"product-switcher",children:[a.jsx("a",{className:"wu-pl-2 wu-pr-0 wu-aspect-auto focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-logo",tabIndex:-1,href:i,children:a.jsx(Ve,{icon:"wc-logo",className:"wu-text-xl wu-leading-4 wu-relative wu-top-1"})}),r,a.jsx("span",{className:p("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",s&&"wu-rotate-180",o==="rtl"?"wu-mr-auto":"wu-ml-auto")})]}),ne={productDropdownMenu:"_productDropdownMenu_amyba_1",productDropdownMenuOpen:"_productDropdownMenuOpen_amyba_38",rtlDropdownMenu:"_rtlDropdownMenu_amyba_51",productCategory:"_productCategory_amyba_55",open:"_open_amyba_61",productCategoryBorderTop:"_productCategoryBorderTop_amyba_66",productList:"_productList_amyba_93",rtlProductList:"_rtlProductList_amyba_114",productListItem:"_productListItem_amyba_137",productLink:"_productLink_amyba_162",activeProduct:"_activeProduct_amyba_164",topBorder:"_topBorder_amyba_169",topBorderRtl:"_topBorderRtl_amyba_190"},Cd=({category:e,dir:t="ltr",openCategory:n})=>{const s=e.active?"#c5cce0":"#f0c36a",r=(n==null?void 0:n.name)===e.name,o=p("wm-arrow-forward-ios wu-text-xs wu-tracking-widest wu-text-muted-foreground wu-mr-2.5 group-hover:wu-hidden wu-text-blue-q",t==="rtl"&&"wu-rotate-180 wu-ml-2.5 wu-text-blue-q group-hover:wu-hidden",r&&"wu-hidden","wu-relative wu-top-[5px]"),i=p("wm-lock wu-text-orange-soft wu-text-base wu-mr-2.5 group-hover:wu-hidden",t==="rtl"&&"wu-ml-2.5 group-hover:wu-hidden",r&&"wu-hidden","wu-relative wu-top-1");return a.jsxs("div",{className:p("group focus:wu-outline-none focus-visible:wu-outline-none wu-flex wu-items-center wu-w-full wu-bg-white wu-relative wu-justify-between"),dir:t,children:[a.jsx("div",{className:ne.productCategoryBorderTop,style:{backgroundColor:s}}),a.jsxs("div",{className:"wu-flex wu-items-center wu-px-1 wu-relative wu-top-1",children:[a.jsx("div",{className:"wu-w-[56px] wu-h-[56px] wu-flex wu-items-center wu-justify-center",children:a.jsx("img",{src:e.logo,alt:e.name,width:"32px",height:"32px"})}),a.jsx("span",{className:"wu-text-sm wu-leading-5 wu-text-blue-q wu-relative wu-top-[1px]",children:e.name})]}),e.active?a.jsx("span",{className:o}):a.jsx("span",{className:i})]})},Td={e309:"wp-audience",e381:"wp-bi",e329:"wp-closed-loop",e314:"wp-communities",e313:"wp-cx",e352:"wp-digsite",e324:"wp-empower",e317:"wp-insightshub",e380:"wp-instant-answers",e378:"wp-intercept",e311:"wp-livepolls",e316:"wp-reputation",e379:"wp-suite-cx",e382:"wp-suite-cx",e308:"wp-surveys",e315:"wp-workforce"},Ed=({product:e,currentProduct:t,activeProductName:n,dir:s,focusItem:r,setFocusItem:o})=>{const[i,u]=h.useState(e.name===t),l=e.name===n,d=e.name===t,c=!e.active,w="#1b3380",f="#c5cce0",m="#ffcf70",g=p("wu-font-normal wu-text-xs wu-text-gray-lead wu-text-center",d&&"wu-text-blue-q wu-font-normal",!e.active&&"wu-text-gray-subtle",i&&"wu-font-normal",e.active&&i&&"wu-text-blue-q"),b=p("wu-text-blue-p wu-text-base",d&&"wu-text-blue-q",!e.active&&"wu-text-gray-subtle",e.active&&i&&"wu-text-blue-q"),x=i||r===e.name||l?w:f;return a.jsxs("li",{className:p(ne.productListItem,"focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item",(l||i)&&ne.activeProduct,e.name.length>15&&window.innerWidth>768&&"wu-w-[130px] wu-min-w-[130px]",r===e.name&&ne.activeProduct,"wu-product-item"),onMouseOver:()=>u(!0),onMouseOut:()=>u(!1),"aria-label":e.name,"aria-disabled":c,dir:s,onKeyDown:S=>{if(S.key==="Enter"){S.preventDefault();const v=S.currentTarget.querySelector("a");v&&v.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(""),children:[a.jsx("div",{className:p(ne.topBorder,s==="rtl"&&ne.topBorderRtl),style:{backgroundColor:c?m:x}}),a.jsxs("a",{className:p(ne.productLink,"focus:wu-outline-none focus-visible:wu-outline-none"),href:e.link||"#",tabIndex:0,children:[a.jsx("span",{className:p(b,Td[e.icon||""]),"aria-hidden":!0}),a.jsx("span",{className:p(g),children:e.name})]})]},e.name)},Md=({category:e,currentProduct:t,activeProductName:n,dir:s="ltr",focusItem:r,setFocusItem:o,borderColorLocked:i="#f5a300"})=>{const{products:u=[],active:l}=e,d=h.useMemo(()=>u.filter(g=>g.active).sort((g,b)=>(g.order||100)-(b.order||100)),[u]),c=h.useMemo(()=>u.filter(g=>!g.active),[u]),[w,f]=h.useState(i),m=g=>g.map((b,x)=>a.jsx(Ed,{product:b,currentProduct:t,activeProductName:n,dir:s,focusItem:r,setFocusItem:o},x));return l?a.jsxs(a.Fragment,{children:[m(d),c.length>0&&a.jsxs("li",{className:p(ne.productListItem,"focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group"),onMouseOver:()=>f("#f5a300"),onMouseOut:()=>f(i),"aria-label":"Upgrade to unlock",children:[a.jsx("div",{className:p(ne.topBorder,s==="rtl"&&ne.topBorderRtl),style:{backgroundColor:w},"aria-label":"top-border"}),a.jsxs("a",{href:"https://www.questionpro.com/a/showUpgradeUser.do",className:p(ne.productLink,"wu-flex wu-flex-col wu-items-center wu-justify-center wu-py-2 wu-min-w-[88px]"),children:[a.jsx("span",{className:"wu-text-base wu-transition-colors wm-lock !wu-text-orange-soft group-hover:wu-text-orange-deep"}),a.jsxs("span",{className:"wu-text-[10px] wu-leading-[10px] wu-text-center wu-pt-1 !wu-text-orange-deep",children:["Upgrade to ",a.jsx("br",{})," unlock"]})]})]}),m(c)]}):a.jsxs("li",{className:p(ne.productListItem,ne.learnMore,"focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]",r==="learn"&&"activeProduct"),tabIndex:0,onFocus:()=>o("learn"),onBlur:()=>o(""),"aria-label":"Learn More",children:[a.jsx("div",{className:p(ne.topBorder,s==="rtl"&&ne.topBorderRtl),style:{backgroundColor:i}}),a.jsx("a",{className:ne.productLink,href:"https://www.questionpro.com/a/showUpgradeUser.do",tabIndex:-1,children:a.jsx("span",{className:"wu-text-[#f99e03]",children:"Learn More"})})]})},Ba=({dropdownRef:e,dir:t,isDropdownOpen:n,productCategories:s,openCategory:r,setOpenCategory:o,handleKeyDown:i,expandAll:u,activeProductName:l,focusItem:d,setFocusItem:c})=>{const w="#ffcf70",[f,m]=h.useState(window.innerWidth>768);return h.useEffect(()=>{const g=()=>{m(window.innerWidth>375)};return window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[]),a.jsx("ul",{className:p(ne.productDropdownMenu,n&&ne.productDropdownMenuOpen,t==="rtl"&&ne.rtlDropdownMenu,"wu-switcher-container"),ref:e,dir:t,"aria-label":"product-dropdown-menu","data-state":n?"open":"closed",children:s.map((g,b)=>a.jsxs("li",{className:p(ne.productCategory,"focus:wu-outline-none focus-visible:wu-outline-none wu-h-16 wu-category-item",r===g&&ne.open,u&&ne.open),onMouseEnter:()=>f&&o(g),onMouseLeave:()=>f&&o(null),"aria-label":g.name,dir:t,onKeyDown:x=>i(x,b),tabIndex:0,"data-product-category":!0,children:[a.jsx(Cd,{category:g,dir:t,openCategory:r}),a.jsx("ul",{className:p(ne.productList,t==="rtl"&&ne.rtlProductList),dir:t,children:a.jsx(Md,{category:g,dir:t,activeProductName:l,currentProduct:g.name,focusItem:d,setFocusItem:c,borderColorLocked:w})})]},g.name))})},Id=({isProductButtonShow:e,isDropdownOpen:t,activeProductColor:n,activeProductBgColor:s,activeProductName:r,dir:o,smallScreenButtonRef:i,handleDropdownToggle:u,handleKeyDown:l})=>a.jsx("div",{className:p("wu-absolute wu-top-11 wu-transition-all wu-duration-300 wu-ease-in-out wu-transform wu-opacity-100 wu-w-[256px] wu-z-10",e?o==="rtl"?"wu-right-0 wu-overflow-hidden":"wu-translate-x-0 wu-left-0":o==="rtl"?"wu-right-0 wu-w-0":"wu--translate-x-full"),style:{backgroundColor:t?n.hover:s},children:a.jsxs("button",{ref:i,type:"button",className:p("wu-text-base wu-leading-[48px] wu-flex wu-items-center wu-justify-center wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger",e?"wu-flex":o==="rtl"?"wu-hidden":"wu-flex"),onClick:u,onKeyDown:d=>{t&&d.key==="ArrowDown"&&l(d,-1)},"aria-label":"small-screen-product-btn",children:[r,a.jsx("span",{className:p("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",t&&"wu-rotate-180")})]})}),Ad=({dir:e,isProductButtonShow:t,smallScreenToggleButtonRef:n,setIsProductButtonShow:s,setDropdownOpen:r})=>{const o=()=>{s(i=>!i),t&&r(!1)};return a.jsxs("button",{className:p("wu-relative wu-w-10 wu-h-10 wu-flex wu-flex-col wu-justify-center wu-items-center",e==="rtl"?"wu-mr-4":"wu-ml-4"),onClick:o,ref:n,"aria-label":"menu-toggle-btn",children:[a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"wu-rotate-45 wu-translate-y-0":"-wu-translate-y-2.5"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-opacity wu-duration-300 ${t?"wu-opacity-0":"wu-opacity-100"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"-wu-rotate-45 wu-translate-y-0":"wu-translate-y-2.5"}`})]})},qa=({productCategories:e,activeProductName:t,activeProductColor:n={base:"#1b87e6",hover:"#54A5EC"},dir:s,homeLink:r,expandAll:o})=>{const i=h.useRef(null),u=h.useRef(null),l=h.useRef(null),d=h.useRef(null),[c,w]=h.useState(!1),[f,m]=h.useState(null),[g,b]=h.useState(n.base),[x,S]=h.useState(""),[v,T]=h.useState(!1),N=gd(768);Is([u,i],()=>{w(!1),m(null)}),Is([l,d,u],()=>{T(!1),w(!1),m(null)}),h.useEffect(()=>{const M=I=>{I.key==="Escape"&&w(!1)};return document.addEventListener("keydown",M),()=>{document.removeEventListener("keydown",M)}},[c]),h.useEffect(()=>b(n.base),[n.base]);const C=M=>{M.preventDefault(),M.stopPropagation(),w(I=>{const k=!I;return k||m(null),k})},D=(M,I)=>{bd({productCategories:e,openCategory:f,setOpenCategory:m})(M,I,x)};return a.jsx("div",{className:p("wu-inline-flex wu-items-center wu-justify-between wu-relative wu-z-auto wu-h-12 wu-text-white"),children:N?a.jsxs("div",{className:"wu-relative wu-flex",children:[a.jsx(Ad,{dir:s,isProductButtonShow:v,smallScreenToggleButtonRef:d,setDropdownOpen:w,setIsProductButtonShow:T}),a.jsx(Id,{isProductButtonShow:v,isDropdownOpen:c,activeProductColor:n,activeProductBgColor:g,activeProductName:t,handleDropdownToggle:C,smallScreenButtonRef:l,handleKeyDown:D,dir:s}),a.jsx("div",{className:p("wu-absolute wu-top-[92px] wu-left-0 wu-text-[18px]",s==="rtl"&&"wu-right-[256px] wu-left-auto"),children:a.jsx(Ba,{activeProductName:t,focusItem:x,setFocusItem:S,handleKeyDown:D,isDropdownOpen:c,openCategory:f,productCategories:e,setOpenCategory:m,dropdownRef:u,expandAll:o,dir:s})})]}):a.jsxs("div",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-h-full wu-w-[256px]",dir:s,style:{backgroundColor:c?n.hover:g},onMouseOver:()=>b(n.hover),onMouseOut:()=>b(n.base),children:[a.jsx(Sd,{activeProductName:t,dir:s,homeLink:r,buttonRef:i,handleDropdownToggle:C,handleKeyDown:D,isDropdownOpen:c}),a.jsx(Ba,{activeProductName:t,focusItem:x,setFocusItem:S,handleKeyDown:D,isDropdownOpen:c,openCategory:f,productCategories:e,setOpenCategory:m,dropdownRef:u,expandAll:o,dir:s})]})})},za=({children:e,dir:t,className:n})=>a.jsx("section",{className:p("wu-flex wu-items-center wu-flex-1 wu-min-w-0 wu-h-12 wu-gap-2 wu-px-2",t==="rtl"&&"wu-flex-row-reverse",n),children:a.jsx("div",{className:"wu-grow",children:e})}),ks=y.forwardRef(({className:e,type:t,...n},s)=>a.jsx("input",{type:t,className:p("wu-flex wu-h-8 wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","file:wu-border-0 file:wu-bg-gray-40 file:wu-text-gray-notification file:wu-text-sm file:wu-font-normal file:wu-relative file:wu-bottom-[3px]","wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light","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 focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40",e),ref:s,...n}));ks.displayName="Input";const Dd=e=>{const{message:t,className:n,...s}=e;return a.jsx("p",{...s,className:p("wu-text-sub-3 wu-break-words wu-font-light",n),style:{color:"rgb(var(--wu-red-deep))",...s.style},children:t})},kd=e=>{var u,l;const{inputRef:t,maxLength:n=50,className:s,...r}=e,[o,i]=h.useState(!1);return h.useEffect(()=>{var d;(((d=t==null?void 0:t.current)==null?void 0:d.value.length)||0)>.75*n?i(!0):i(!1)},[(u=t==null?void 0:t.current)==null?void 0:u.value,n]),a.jsx("p",{...r,className:p("wu-text-sub-3 wu-font-light",s),style:{color:"rgb(var(--wu-gray-subtle))",...r.style},children:o&&`${(l=t==null?void 0:t.current)==null?void 0:l.value.length}/${n}`})},Pd=_e.cva("wu-text-xs wu-font-normal wu-leading-none peer-disabled:wu-cursor-not-allowed peer-disabled:wu-text-gray-subtle peer-readonly:wu-text-gray-subtle peer-required:after:wu-content-['*'] peer-required:after:wu-ml-[2px] peer-required:after:wu-text-red-deep peer-aria-[required]:after:wu-content-['*'] peer-aria-[required]:after:wu-ml-[2px] peer-aria-[required]:after:wu-text-red-deep"),Tn=y.forwardRef(({className:e,...t},n)=>a.jsx(Da.Root,{ref:n,className:p(Pd(),e),...t}));Tn.displayName=Da.Root.displayName;const Te=e=>a.jsx(Tn,{...e,className:p("wu-text-gray-lead wu-leading-6",e.className)}),_d=({Label:e,Error:t,Hint:n,Input:s,labelPosition:r="top",dir:o="ltr",className:i,...u})=>{const d=p("wu-flex",r==="top"?"wu-flex-col wu-gap-1":"wu-flex-row wu-items-center wu-gap-2",i),c=p("wu-flex wu-flex-col wu-gap-1 wu-relative wu-flex-1 wu-form-group-wrapper"),w=p("wu-absolute -wu-bottom-5",o==="ltr"?"wu-right-0":"wu-left-0","wu-form-group-hint"),f=p("wu-absolute -wu-bottom-5",o==="ltr"?"wu-left-0":"wu-right-0","wu-form-group-error");return a.jsxs("div",{className:d,dir:o,...u,children:[e,a.jsxs("div",{className:c,children:[s,n&&a.jsx("div",{className:w,children:n}),t&&a.jsx("div",{className:f,children:t})]})]})},Ge=h.forwardRef((e,t)=>{const{Label:n,labelPosition:s="top",Icon:r,iconPosition:o,type:i,value:u,variant:l="flat",readonly:d,id:c=Cn(),...w}=e,f=zt(s),m=r?o!=="right"?"wu-pl-8":"wu-pr-8":"",[g,b]=h.useState(!1),x=()=>{b(v=>!v)},S=v=>{w.onChange&&w.onChange(v)};return a.jsx(a.Fragment,{children:i==="submit"?a.jsx(Ce,{type:"submit",className:w.className,id:c,children:n||"Submit"}):a.jsx("div",{className:p("wu-flex wu-flex-col wu-gap-2 wu-input-container"),dir:w.dir,children:a.jsxs("div",{className:p("wu-flex wu-gap-1 wu-relative",f,(s==="right"||s==="left")&&"wu-items-center","wu-input-wrapper"),children:[r&&o!=="right"&&a.jsx("div",{className:"wu-absolute wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-input-icon-container",children:r}),a.jsx(ks,{...w,className:p("wu-peer wu-text-xs wu-rounded-t-sm",l==="outlined"?"wu-border wu-border-gray-subtle":"",m,w.className),type:g?"text":i,ref:t,readOnly:d,onChange:w.onChange&&S,value:u,id:c}),r&&o==="right"&&a.jsx("div",{className:"wu-absolute wu-right-0 wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-input-icon-container",children:r}),i==="password"&&a.jsx("div",{className:"wu-absolute wu-right-0 wu-flex wu-items-center wu-justify-center wu-w-8 wu-h-8 wu-cursor-pointer",onClick:x,children:a.jsx("button",{type:"button",className:"wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6 wu-rounded-sm focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-soft","aria-label":"show-password",children:g?a.jsx("span",{className:"wm-visibility wu-text-gray-subtle"}):a.jsx("span",{className:"wm-visibility-off wu-text-gray-subtle"})})}),n&&a.jsx(Te,{htmlFor:c,className:"wu-flex-none wu-w-fit wu-input-label",children:n})]})})})});Ge.displayName="WuInput";const Vd=({className:e,placeholder:t="Search surveys, folders or tools",defaultCollapsed:n=!0,onSearch:s,...r})=>{const[o,i]=h.useState(n);return h.useEffect(()=>{i(n)},[n]),a.jsx(Ge,{...r,placeholder:t,onChange:u=>s(u.target.value),className:p("wu-rounded-full focus-visible:wu-outline-2 focus-visible:wu-outline-blue-focus -wu-outline-offset-2 wu-bg-white","wu-transition-all wu-duration-300 wu-ease-in-out",o?"wu-w-8 wu-px-2 wu-text-lg wu-rounded-full wu-h-8 wu-border wu-border-white wu-bg-transparent":"wu-w-40 sm:wu-w-60",e),type:"search",Icon:a.jsx(Ve,{"data-testid":"search-icon",icon:"wm-search",className:p("wu-text-gray-lead wu-cursor-pointer",o&&"wu-text-white"),onClick:()=>i(u=>!u)})})},$a=Bt.Provider,Ha=Bt.Root,Ua=Bt.Trigger,Ps=y.forwardRef(({className:e,sideOffset:t=4,...n},s)=>a.jsx(Bt.Content,{ref:s,sideOffset:t,className:p("wu-z-50 wu-overflow-hidden wu-bg-gray-notification wu-text-white wu-px-3 wu-py-1.5 wu-text-sm wu-shadow-md",e),...n}));Ps.displayName=Bt.Content.displayName;const En=h.forwardRef(({content:e,position:t,positionOffset:n,duration:s,children:r,className:o,showArrow:i=!1,open:u,onOpenChange:l,...d},c)=>a.jsx($a,{delayDuration:s||200,children:a.jsxs(Ha,{open:u,onOpenChange:l,children:[a.jsx(Ua,{asChild:!0,children:a.jsx("span",{ref:c,children:r})}),a.jsx(bs.Portal,{children:e&&a.jsxs(Ps,{...d,side:t||"top",sideOffset:n||0,className:p("wu-max-w-sm wu-max-h-96 wu-overflow-y-auto",o),children:[e,i&&a.jsx(bs.Arrow,{className:"wu-fill-gray-notification wu-tooltip-arrow"})]})})]})}));En.displayName="WuTooltip";const Od=({label:e,className:t})=>{const n=h.useRef(null),[s,r]=h.useState(!1);return h.useEffect(()=>{const o=n.current;if(o){const i=o.clientWidth,u=o.scrollWidth,l=u/e.length,d=e.length*l;r(d>i||u>i)}},[e]),a.jsx("p",{ref:n,className:p("wu-w-full wu-truncate",t),children:s?a.jsx(En,{content:e,positionOffset:8,children:e}):e})},Fd=e=>{var w;const{productName:t,categories:n=[],user:s,children:r,onLogout:o,homeLink:i=window.location.origin,brandColor:u,dir:l="ltr",expandAll:d,DataCenter:c}=e;return a.jsx("div",{className:"wu-sticky wu-top-0 wu-z-50 wu-w-full",children:a.jsxs("header",{className:p("wu-h-12 wu-flex wu-items-center wu-justify-between wu-relative wu-bg-blue-switcher wu-text-white",l==="rtl"&&"wu-flex-row-reverse",e.className),style:e.style,children:[id((w=s==null?void 0:s.profile)==null?void 0:w.subtitle)&&window.wickUiVersion&&a.jsxs("p",{className:"wu-text-[10px] wu-text-gray-subtle wu-font-normal wu-absolute wu-top-11 wu-right-1 wu-z-[-1] wu-invisible","aria-label":"wickUiVersion",children:["Wick UI: v",window.wickUiVersion]}),a.jsx("section",{className:"wu-flex wu-items-center wu-gap-2 wu-shrink-0",children:a.jsx(qa,{productCategories:n,activeProductName:t,activeProductColor:u,dir:l,homeLink:i,expandAll:d})}),a.jsx(za,{dir:l,children:r}),a.jsxs("section",{className:p("wu-flex wu-items-center wu-justify-end wu-shrink-0 wu-gap-2",l==="rtl"?"wu-flex-row-reverse wu-pl-4":"wu-flex-row wu-pr-4"),children:[a.jsx(La,{dir:l}),(s==null?void 0:s.profile)&&Object.keys(s.profile).length>0&&a.jsx(Fa,{user:s,onLogout:o,dir:l,DataCenter:c})]})]})})},ze=Wt.Root,lt=Wt.Trigger,Oe=y.forwardRef(({className:e,align:t="center",sideOffset:n=4,...s},r)=>a.jsx(Wt.Portal,{children:a.jsx(Wt.Content,{ref:r,align:t,sideOffset:n,className:p("wu-z-50 wu-w-72 wu-border wu-bg-popover wu-p-4 wu-text-popover-foreground wu-shadow-md wu-outline-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...s})}));Oe.displayName=Wt.Content.displayName;function ja({className:e,classNames:t,dir:n="ltr",...s}){const r=Ia.getDefaultClassNames();return a.jsx(Ia.DayPicker,{showOutsideDays:s.showOutsideDays||!1,className:p("wu-p-3",e),classNames:{root:p(r.root,"wu-relative wu-rounded-none wu-bg-white dark:wu-bg-gray-switcher"),caption_label:p("wu-text-xs",s.captionLayout==="dropdown"?"wu-hidden":""),month_caption:p(r.month_caption,"wu-mb-5"),months:p(r.months,"wu-flex wu-flex-col sm:wu-flex-row wu-gap-4"),dropdowns:p(r.dropdowns,"wu-flex wu-items-center wu-justify-start wu-gap-2",(s.mode==="range","")),dropdown:p(r.dropdown,"wu-px-2 wu-py-1 wu-text-sm wu-text-gray-lead wu-font-medium focus:wu-outline-none wu-bg-white wu-border-b wu-border-gray-subtle focus-visible:wu-border-blue-p"),weekday:p(r.weekday,"wu-text-gray-lead wu-rounded-none wu-w-9 wu-font-normal wu-text-xs wu-bg-gray-10 wu-py-2"),day_button:p(r.day_button,"wu-w-full wu-h-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-2"),day:p(r.day,"wu-text-gray-lead wu-transition-colors wu-duration-300 [&:not([aria-selected])]:hover:wu-bg-gray-25 wu-text-sm wu-w-9 wu-h-9 wu-min-w-0 wu-text-center wu-p-0 wu-rounded-none data-[today=true]:[&:not([aria-selected])]:wu-border data-[today=true]:[&:not([aria-selected])]:wu-border-blue-p data-[today=true]:[&:not([aria-selected])]:wu-text-gray-lead"),selected:p(r.selected,"wu-bg-blue-p [&:not(.rm)]:wu-text-white hover:wu-bg-blue-pHover"),range_middle:p("rm",r.range_middle,"wu-bg-blue-p/10 wu-rounded-none hover:wu-bg-blue-p/20 wu-text-gray-lead hover:wu-text-white data-[today=true]:wu-bg-blue-p/20 hover:data-[today=true]:wu-bg-blue-pHover"),range_end:p(r.range_end,"wu-rounded-none"),range_start:p(r.range_start,"wu-rounded-none wu-bg-blue-p hover:wu-bg-blue-pHover"),month_grid:p(r.month_grid,"[&>thead>tr>th]:wu-pb-2 wu-border-collapse wu-space-y-1"),button_next:p(r.button_next,Ds({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-text-gray-lead"),button_previous:p(r.button_previous,Ds({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-rotate-180 wu-text-gray-lead"),nav:p(r.nav,"wu-absolute wu-top-4 wu-right-3 wu-flex",n==="rtl"&&"wu-right-auto wu-left-3 wu-flex-row-reverse"),chevron:p(r.chevron,"!wu-text-red-500"),outside:p(r.outside,"wu-invisible"),disabled:p(r.disabled,"hover:wu-bg-white wu-text-gray-subtle"),...t},components:{Chevron:()=>a.jsx("span",{className:"wm-chevron-right wu-text-lg wu-leading-5"})},...s})}ja.displayName="Calendar";const _s=e=>a.jsx(ja,{...e}),Ga=e=>{const{handleDateChange:t,disabled:n,onReset:s,showResetButton:r}=e;return a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-end wu-gap-2 wu-mt-2 wu-date-picker-footer",children:[r&&a.jsx(Ce,{variant:"secondary",onClick:s,Icon:a.jsx("span",{className:"wu-text-[20px] wu-leading-5 -wu-mt-[1px] wm-refresh"}),className:"wu-date-picker-footer-reset",children:"Reset"}),a.jsx(Lt.PopoverClose,{asChild:!0,children:a.jsx(Ce,{onClick:t,disabled:n,className:"wu-date-picker-apply",children:"Apply"})})]})},Vs=({formattedString:e,dir:t,placeholder:n="Select Date",className:s,variant:r="primary",color:o,CustomTrigger:i,...u})=>a.jsx(Lt.PopoverTrigger,{asChild:!i,dir:t,children:i?a.jsx(a.Fragment,{children:i(e)}):a.jsx(Ce,{...u,className:p("wu-justify-between wu-w-full wu-gap-2 wu-text-xs wu-border-b wu-rounded-none wu-rounded-t-sm wu-min-w-48 wu-border-gray-subtle wu-text-gray-lead wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light wu-bg-gray-10 hover disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-subtle hover:wu-text-gray-lead hover:wu-bg-gray-10 hover:wu-border-gray-40 wu-datepicker-trigger",r==="outlined"&&"wu-border wu-border-subtle wu-bg-transparent",s),Icon:a.jsx("span",{className:"wm-calendar-month wu-text-sm"}),iconPosition:"right",children:e||n})}),Ka=(e,t,n,s)=>{const r=Y.startOfDay(e).getTime();return!!(t||n&&r<Y.startOfDay(n).getTime()||s&&r>Y.startOfDay(s).getTime())},Mn=e=>e?typeof e=="string"?new Date(e):e:new Date,Os="\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])",Ld=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90},{label:"Last 365 days",value:365}],Wd=({formatString:e="yyyy-MM-dd",value:t,onChange:n,disabled:s,minDate:r=Y.sub(new Date,{years:5}),maxDate:o=Y.add(new Date,{years:1}),dir:i="ltr",Label:u,labelPosition:l="top",onReset:d,showResetButton:c=!1,placeholder:w="Select Date",CustomTrigger:f,...m})=>{const[g,b]=h.useState(),[x,S]=h.useState(""),v=h.useCallback(()=>{const N=Mn(g);S(Y.format(N,e)),n&&n(g)},[g,e,n]),T=h.useCallback(()=>{d?d():(b(void 0),S(""),n&&n(void 0))},[n,d]);return h.useEffect(()=>{const N=Mn(t);b(N),S(Y.format(N,e))},[t,e]),a.jsxs(Te,{className:p("wu-flex wu-gap-1",l==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[u,a.jsxs(ze,{children:[a.jsx(Vs,{formattedString:x,dir:i,placeholder:w,CustomTrigger:f,...m}),a.jsx(Oe,{className:"wu-p-0 wu-w-fit wu-date-picker-content",align:"start",sideOffset:-.5,dir:i,children:a.jsx(_s,{dir:i,mode:"single",captionLayout:"dropdown",selected:g,onSelect:b,disabled:N=>Ka(N,s,r,o),startMonth:r,endMonth:o,required:!0,autoFocus:!0,defaultMonth:g,className:p("wu-border wu-border-blue-p wu-date-picker"),footer:a.jsx(Ga,{handleDateChange:v,disabled:s,onReset:T,showResetButton:c})})})]})]})},Ya="yyyy-MM-dd",Bd=[{label:"Day",value:1},{label:"Week",value:7},{label:"Month",value:30},{label:"Quarter",value:90},{label:"Year",value:365}],qd=({current:e,onSelect:t,presetRanges:n=Ld})=>{const[s,r]=h.useState(),[o,i]=h.useState(!1),[u,l]=h.useState(""),[d,c]=h.useState(""),[w,f]=h.useState(!1),m=h.useMemo(()=>n.map(v=>v.value),[n]),g=p("wu-flex wu-w-full wu-gap-2 wu-px-4 wu-py-2 wu-text-sm wu-text-gray-lead wu-transition-colors","wu-rounded-none hover:wu-bg-gray-10 focus:wu-outline-none focus-visible:wu-ring-2","focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-1 wu-text-start"),b=h.useCallback(v=>{if(v===void 0){r(void 0),i(!0);return}const T=Number(v)-1;r(T),i(!1),t({from:Y.sub(new Date,{days:T}),to:new Date})},[t]),x=h.useCallback((v,T)=>{if(!v||!(e!=null&&e.to)||!(e!=null&&e.from)||!new RegExp(Os).test(v))return!1;const C=new Date(T==="start"?v:e.from),D=new Date(T==="end"?v:e.to);return Y.isBefore(D,C)?(f(!0),!1):(f(!1),!(Y.isSameDay(C,e.from)&&Y.isSameDay(D,e.to)))},[e]),S=h.useCallback((v,T)=>{if((T==="start"?l:c)(v),x(v,T)){const C={from:e==null?void 0:e.from,to:e==null?void 0:e.to};T==="start"&&(C.from=new Date(v)),T==="end"&&(C.to=new Date(v)),t(C)}},[e,t,x]);return h.useEffect(()=>{if(e!=null&&e.to&&(e!=null&&e.from)&&Y.isValid(e.to)&&Y.isValid(e.from)){l(Y.format(e.from,Ya)),c(Y.format(e.to,Ya));const v=Y.differenceInCalendarDays(e.to,e.from);Y.isToday(e.to)&&m.includes(v+1)?(r(v),i(!1)):(r(void 0),i(!0))}},[e,m]),a.jsxs("div",{className:"wu-flex wu-flex-col wu-gap-1 wu-p-2 wu-bg-white wu-w-60 wu-date-picker-sidebar",children:[a.jsx("ul",{className:"wu-flex wu-gap-1 wu-py-2 wu-date-picker-batch-list",children:Bd.map(({label:v,value:T})=>a.jsx(Nt,{variant:"secondary",className:"wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white",disabled:T!==1,children:v},T))}),a.jsxs("ul",{className:"wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges",children:[n.map(({label:v,value:T})=>a.jsx("li",{children:a.jsx("button",{className:p(g,s===T-1&&"wu-bg-blue-p/10"),onClick:()=>b(T),children:v})},T)),a.jsx("li",{children:a.jsx("button",{className:p(g,o&&"wu-bg-blue-p/10"),onClick:()=>b(),children:"Custom Range"})})]}),a.jsxs("div",{className:"wu-relative wu-flex wu-gap-3 wu-pt-2 wu-date-picker-range-footer",children:[a.jsx(Ge,{placeholder:"Start Date",pattern:Os,value:u,onChange:v=>S(v.target.value,"start"),"aria-label":"Start Date"}),a.jsx(Ge,{placeholder:"End Date",pattern:Os,value:d,onChange:v=>S(v.target.value,"end"),"aria-label":"End Date"}),w?a.jsx("small",{className:"wu-absolute wu-text-[10px] wu-leading-[14px] wu-text-red-deep wu-left-0 -wu-bottom-4 wu-text-start",children:"End date must be after start date"}):a.jsx("small",{className:"wu-absolute wu-right-0 wu-leading-[14px] -wu-bottom-4 wu-text-gray-subtle wu-text-end",children:"yyyy-mm-dd"})]})]})},Xa={wuDateRangeNativeSidebar:"_wuDateRangeNativeSidebar_cvfo0_1",customInputs:"_customInputs_cvfo0_26"},zd=({Trigger:e,children:t,className:n,dir:s,open:r,onOpenChange:o,modal:i,...u})=>a.jsxs(ze,{open:r,onOpenChange:o,modal:i,children:[a.jsx(lt,{asChild:!0,dir:s,children:e}),a.jsx(Oe,{className:p("wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher",n),dir:s,...u,children:t})]}),Fs=e=>a.jsx(Lt.PopoverClose,{asChild:!0,children:a.jsx(Ce,{...e})}),$d=[{label:"Last week",value:7},{label:"Last month",value:30},{label:"Last quarter",value:90},{label:"Last year",value:365}],$e=e=>(e?new Date(e):new Date).toISOString().split("T")[0],Za=e=>Y.sub(new Date,{days:e}),Hd=e=>e?Y.sub(new Date,{days:1}):new Date;function Ud({ranges:e=$d,excludeToday:t=!0,current:n,onSelect:s,onReset:r,onApply:o,showResetButton:i=!0,maxDate:u,minDate:l,...d}){const[c,w]=h.useState($e(n==null?void 0:n.from)),[f,m]=h.useState($e(n==null?void 0:n.to)),[g,b]=h.useState(!1),[x,S]=h.useState();h.useEffect(()=>{n!=null&&n.from&&w($e(n.from)),n!=null&&n.to&&m($e(n.to))},[n==null?void 0:n.from,n==null?void 0:n.to]),h.useEffect(()=>{if(n!=null&&n.from&&(n!=null&&n.to)){const D=Y.differenceInCalendarDays(n.to,n.from)+1;S(D);const M=e.find(I=>I.value===D);b(!M)}},[n,e]);const v=h.useCallback(C=>{S(C);const D=Za(C),M=Hd(t);w($e(D)),m($e(M)),s&&s({to:M,from:D})},[t,s]),T=h.useCallback((C,D)=>{const M=new Date(C);if(!isNaN(M.getTime())){if(D==="start"&&f){const I=new Date(f);if(M>I)return}if(D==="end"&&c){const I=new Date(c);if(M<I)return}D==="start"&&w(C),D==="end"&&m(C),s&&s({to:D==="end"?M:new Date(f),from:D==="start"?M:new Date(c)})}},[c,f,s]),N=h.useMemo(()=>e.map(C=>{const D=Za(C.value);return{...C,displayStartDate:Y.format(D,"d MMM yy"),displayEndLabel:t?"Yesterday":"Today"}}),[e,t]);return a.jsxs("div",{className:Xa.wuDateRangeNativeSidebar,...d,children:[a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("button",{onClick:()=>b(!0),"data-selected":g,"aria-pressed":g,"aria-label":"Select custom date range",children:"Custom Range"})}),a.jsxs("li",{className:Xa.customInputs,"data-expanded":g,children:[a.jsx(Ge,{type:"date",value:c,onChange:C=>T(C.target.value,"start"),Label:"Start",min:$e(l),max:$e(u)}),a.jsx(Ge,{type:"date",value:f,onChange:C=>T(C.target.value,"end"),Label:"End",min:c||$e(l),max:$e(u)})]}),N.map(C=>a.jsx("li",{children:a.jsxs("button",{onClick:()=>{b(!1),v(C.value)},"data-selected":!g&&x===C.value,"aria-pressed":!g&&x===C.value,"aria-label":`Select ${C.label}`,children:[C.label," ",a.jsxs("small",{children:["(",C.displayStartDate," - ",C.displayEndLabel,")"]})]})},C.value))]}),a.jsxs("footer",{children:[i&&a.jsx(Fs,{variant:"secondary",Icon:a.jsx(Ve,{icon:"wm-refresh"}),onClick:r,children:"Reset"}),a.jsx(Fs,{onClick:o,children:"Apply"})]})]})}const jd=({formatString:e="yyyy/MM/dd",value:t,onChange:n,disabled:s,minDate:r=Y.sub(new Date,{years:5}),maxDate:o=Y.add(new Date,{years:1}),dir:i="ltr",minDateToSelect:u,maxDateToSelect:l,presetRanges:d,Label:c,labelPosition:w="top",onReset:f,showResetButton:m=!0,placeholder:g="Select Date Range",CustomTrigger:b,native:x,...S})=>{const[v,T]=h.useState(t),[N,C]=h.useState(t),[D,M]=h.useState(""),I=h.useCallback(()=>{if(N){const P=N.from,A=N.to;T({from:P,to:A}),M(`${Y.format(P,e)} - ${Y.format(A,e)}`),n&&n({from:P,to:A})}},[N,e,n]),k=h.useCallback(()=>{C(v)},[v]),F=h.useCallback(()=>{f?f():(T(void 0),C(void 0),M(""),n&&n(void 0))},[f,n]);return h.useEffect(()=>{if(t!=null&&t.from&&(t!=null&&t.to)){const P=Mn(t.from),A=Mn(t.to);T(t),C(t),M(`${Y.format(P,e)} - ${Y.format(A,e)}`)}else T(void 0),C({to:new Date,from:new Date})},[t,e]),a.jsxs(Te,{className:p("wu-flex wu-gap-1",w==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[c,a.jsxs(ze,{onOpenChange:P=>!P&&k(),children:[a.jsx(Vs,{formattedString:D,dir:i,placeholder:g,CustomTrigger:b,...S}),a.jsx(Oe,{className:"wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p wu-bg-white",align:"start",sideOffset:-.5,dir:i,children:x?a.jsx(Ud,{current:N,onSelect:P=>{C(P)},ranges:d,onApply:I,onReset:F,showResetButton:m,minDate:r,maxDate:o}):a.jsxs(a.Fragment,{children:[a.jsx(qd,{current:N,onSelect:C,presetRanges:d}),a.jsx(_s,{dir:i,numberOfMonths:2,mode:"range",captionLayout:"dropdown",selected:N,onSelect:C,disabled:P=>Ka(P,s,r,o),startMonth:r,endMonth:o,required:!0,autoFocus:!0,defaultMonth:v==null?void 0:v.from,className:p("wu-shadow-none wu-date-range-picker"),min:u,max:l,footer:a.jsx(Ga,{handleDateChange:I,disabled:s,onReset:F,showResetButton:m})})]})})]})]})},Ja=h.forwardRef((e,t)=>{const{className:n,rounded:s,...r}=e;return a.jsx("div",{className:p("wu-card wu-p-2 wu-pt-1 hover:wu-shadow-card wu-border wu-border-black/20 hover:wu-border-black/30 wu-transition-colors wu-duration-300",s?"wu-rounded-lg":"wu-rounded-sm",n),ref:t,...r})});Ja.displayName="WuCard";const Qa=h.forwardRef((e,t)=>{const{className:n,...s}=e;return a.jsx("div",{ref:t,...s,className:p("wu-p-2 wu-mb-2 wu-border-b wu-border-gray-40 min-h-12 wu-card-header",n)})});Qa.displayName="WuCardHeader";const Ra=h.forwardRef((e,t)=>{const{className:n,...s}=e;return a.jsx("div",{ref:t,...s,className:p("wu-p-2 wu-mt-2 wu-border-t wu-border-gray-40 min-h-12 wu-card-footer",n)})});Ra.displayName="WuCardHeader";const eo=y.forwardRef(({className:e,partial:t,...n},s)=>a.jsx(ys.Root,{ref:s,className:p("wu-h-4 wu-w-4 wu-shrink-0 wu-rounded-[2px] wu-bg-white wu-border wu-border-gray-subtle wu-ring-offset-background focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[1px] data-[state=checked]:wu-bg-blue-p data-[state=checked]:wu-text-white data-[state=checked]:wu-border-none data-[state=checked]:hover:wu-bg-blue-q hover:wu-bg-gray-20 hover:wu-border-blue-p wu-transition-all data-[state=checked]:disabled:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-opacity-50 disabled:data-[state=unchecked]:wu-bg-gray-20 disabled:hover:wu-border-gray-subtle disabled:wu-border-gray-subtle",e),...n,children:a.jsxs(ys.Indicator,{className:p("wu-flex wu-items-center wu-justify-center wu-text-current"),children:[!t&&a.jsx("span",{className:"wm-check wu-text-base wu-leading-4"}),t&&a.jsx("span",{className:"wm-check-indeterminate-small wu-text-base wu-leading-4"})]})}));eo.displayName=ys.Root.displayName;const Fe=h.forwardRef((e,t)=>{const{disabled:n,checked:s,Label:r,labelPosition:o="right",className:i,id:u=Cn(),partial:l,onChange:d,required:c,readonly:w,...f}=e;return h.useEffect(()=>{f.defaultChecked!==void 0&&s!==void 0&&console.error("WuCheckbox: Both `checked` and `defaultChecked` cannot be used together. Use only one of them.")},[f.defaultChecked,s]),a.jsxs("div",{className:Gd({labelPosition:o,className:"wu-checkbox-container"}),dir:f.dir,children:[a.jsx(eo,{id:u,...f,partial:l,checked:s,disabled:n||w,onCheckedChange:d,className:p("wu-peer wu-checkbox",i),required:c,ref:t}),r&&a.jsx(Te,{htmlFor:u,className:"wu-w-full wu-checkbox-label",children:r})]})}),Gd=_e.cva("wu-flex wu-items-center wu-gap-2 wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row-reverse wu-text-right",right:"wu-flex-row"}}});Fe.displayName="WuCheckbox";const Kd=e=>{const{className:t,children:n,...s}=e;return a.jsx("span",{...s,className:p("wu-flex wu-items-center wu-justify-center wu-truncate wu-max-w-28 wu-w-fit wu-px-2 wu-py-1 wu-text-xs wu-bg-gray-20 wu-rounded-sm hover:wu-bg-gray-40 hover:wu-text-blue-q",t),children:n})},Ls=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command,{ref:n,className:p("wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md",e),...t}));Ls.displayName=xe.Command.displayName;const to=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{className:"wu-flex wu-items-center wu-border-b wu-px-3",children:a.jsx(xe.Command.Input,{ref:n,className:p("wu-flex wu-h-11 wu-w-full wu-rounded-md wu-bg-transparent wu-py-3 wu-text-sm wu-outline-none wu-placeholder:wu-text-muted-foreground disabled:wu-cursor-not-allowed disabled:wu-opacity-50",e),...t})}));to.displayName=xe.Command.Input.displayName;const Ws=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command.List,{ref:n,className:p("",e),...t}));Ws.displayName=xe.Command.List.displayName;const Bs=y.forwardRef((e,t)=>a.jsx(xe.Command.Empty,{ref:t,className:"wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs",...e}));Bs.displayName=xe.Command.Empty.displayName;const $t=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command.Group,{ref:n,className:p("",e),...t}));$t.displayName=xe.Command.Group.displayName;const no=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command.Separator,{ref:n,className:p("wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));no.displayName=xe.Command.Separator.displayName;const Ht=y.forwardRef(({className:e,...t},n)=>a.jsx(xe.Command.Item,{ref:n,className:p("wu-relative wu-flex wu-cursor-default wu-gap-2 wu-select-none wu-items-center wu-rounded-sm wu-px-2 wu-py-3 wu-text-sm wu-outline-none data-[disabled=true]:wu-pointer-events-none data-[disabled=true]:wu-opacity-50 [&_svg]:wu-pointer-events-none [&_svg]:wu-size-4 [&_svg]:wu-shrink-0",e),...t}));Ht.displayName=xe.Command.Item.displayName;const Ct=h.forwardRef(({containerHeight:e=400,list:t,callback:n,dir:s,className:r,style:o},i)=>a.jsx(Xc.Virtuoso,{ref:i,dir:s,className:r,style:{height:e,scrollbarWidth:"thin",scrollbarColor:"#d4d4d4 #f1f1f1",overflowX:"hidden",...o},data:t,itemContent:(u,l)=>n(u,l)}));Ct.displayName="WuVirtualScroll";const Yd=({tags:e,triggerRef:t})=>{const[n,s]=h.useState([]),[r,o]=h.useState([]),i=h.useMemo(()=>a.jsx("ul",{className:"wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none",children:r.map((l,d)=>a.jsx("li",{className:"wu-py-1 wu-text-xs wu-text-left",children:l},d))}),[r]),u=l=>{const d=document.createElement("div");Object.assign(d.style,{display:"inline-block",visibility:"hidden",position:"absolute",whiteSpace:"nowrap"}),d.textContent=l,document.body.appendChild(d);const c=d.offsetWidth;return document.body.removeChild(d),c+8};return h.useEffect(()=>{const l=()=>{if(t.current){const f=t.current.offsetWidth-20-36;let m=0;const g=[],b=[];e.forEach(x=>{const S=u(x);m+S+8<f?(g.push(x),m+=S+8):b.push(x)}),s(g),o(b)}};return l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[e,t]),a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-text-xs",children:[n.map((l,d)=>a.jsx("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:l},d)),r.length>0&&a.jsx(En,{content:i,className:"wu-z-[51] wu-text-left",children:a.jsxs("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:["+",r.length]})})]})},Xd=({placeholder:e="Select...",isEllipse:t=!1,selectedOptions:n,variant:s="flat",dir:r="ltr",accessorKey:o,multiple:i,id:u,disabled:l,selectAll:d,isCheckedAll:c,className:w,...f})=>{const[m,g]=h.useState([]),b=h.useRef(null);h.useEffect(()=>{if(!n||Array.isArray(n)&&n.length===0){g([]);return}if(i){const S=n;g(S==null?void 0:S.map(v=>v[o.label]));return}else g([n[o.label]])},[n]);const x=()=>{var S;return m.length?c&&(d!=null&&d.enable)&&(d!=null&&d.triggerText)?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",children:d.triggerText}):t?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",style:{width:`${(((S=b.current)==null?void 0:S.offsetWidth)||0)-32}px`},children:m.join(", ")}):a.jsx(Yd,{tags:m,triggerRef:b}):a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:e})};return a.jsx(lt,{dir:r,asChild:!0,id:u,disabled:l,children:a.jsxs("button",{...f,ref:b,disabled:l,className:p("focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover wu-bg-white focus-visible:wu-ring-offset-2 wu-flex wu-w-full wu-items-center wu-justify-between wu-border-b wu-border-gray-subtle wu-py-1.5 wu-px-2 placeholder:wu-text-gray-40 focus:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-bg-gray-10 hover:wu-border-blue-p wu-transition-colors focus-visible:wu-bg-gray-20 focus-visible:wu-border-blue-p wu-cursor-pointer wu-text-xs wu-rounded-t-sm wu-gap-2 wu-h-8 wu-group/wuCombobox wu-combobox-trigger",s==="outlined"&&"wu-border wu-border-gray-subtle","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10",w),children:[x(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuCombobox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},so=ee.Root,ro=ee.Trigger,ao=ee.Group,Zd=ee.Portal,Jd=ee.Sub,Qd=ee.RadioGroup,oo=y.forwardRef(({className:e,inset:t,children:n,position:s,...r},o)=>a.jsxs(ee.SubTrigger,{ref:o,className:p("wu-flex wu-cursor-default wu-select-none wu-text-xs wu-items-center wu-p-2 wu-outline-none focus:wu-bg-gray-20 data-[state=open]:wu-bg-gray-20",t&&"wu-pl-8",e),...r,children:[s==="left"&&a.jsx("span",{className:p("wm-chevron-right",r.dir==="rtl"&&"ml-2")}),n,s!=="left"&&a.jsx("span",{className:p("wu-text-base wu-leading-4",r.dir==="rtl"&&"wu-mr-auto wm-chevron-left",r.dir!=="rtl"&&"wu-ml-auto wm-chevron-right")})]}));oo.displayName=ee.SubTrigger.displayName;const io=y.forwardRef(({className:e,...t},n)=>a.jsx(ee.SubContent,{ref:n,className:p("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-lg data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...t}));io.displayName=ee.SubContent.displayName;const qs=y.forwardRef(({className:e,sideOffset:t=4,...n},s)=>a.jsx(ee.Portal,{children:a.jsx(ee.Content,{ref:s,sideOffset:t,className:p("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-md data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...n})}));qs.displayName=ee.Content.displayName;const In=y.forwardRef(({className:e,inset:t,...n},s)=>a.jsx(ee.Item,{ref:s,className:p("wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-p-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",t&&"wu-pl-8",e),...n}));In.displayName=ee.Item.displayName;const uo=y.forwardRef(({className:e,children:t,checked:n,dir:s,...r},o)=>a.jsxs(ee.CheckboxItem,{ref:o,className:p("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",s==="rtl"&&"wu-pr-8 wu-pl-2",s!=="rtl"&&"wu-pl-8 wu-pr-2",e),checked:n,...r,children:[a.jsx("span",{className:p("wu-absolute wu-flex wu-items-center wu-justify-center wu-w-4 wu-h-4 wu-rounded-sm wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-blue-p group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p",s==="rtl"&&"wu-right-2",s!=="rtl"&&"wu-left-2"),children:a.jsx(ee.ItemIndicator,{children:a.jsx("span",{className:"wm-check wu-text-base wu-text-white"})})}),t]}));uo.displayName=ee.CheckboxItem.displayName;const lo=y.forwardRef(({className:e,children:t,...n},s)=>a.jsxs(ee.RadioItem,{ref:s,className:p("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-pl-8 wu-pr-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 focus:wu-text-accent-foreground data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",e),...n,children:[a.jsx("span",{className:"wu-absolute wu-rounded-full wu-left-2 wu-flex wu-h-4 wu-w-4 wu-items-center wu-justify-center wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-white group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p group-hover:group-data-[state=checked]:wu-ring-blue-q",children:a.jsx(ee.ItemIndicator,{className:"wu-w-4 wu-h-4 wu-flex wu-items-center wu-justify-center",children:a.jsx("span",{className:"wm-circle wu-text-blue-p group-hover:group-data-[state=checked]:wu-text-blue-q wu-text-xs"})})}),t]}));lo.displayName=ee.RadioItem.displayName;const Ut=y.forwardRef(({className:e,inset:t,...n},s)=>a.jsx(ee.Label,{ref:s,className:p("wu-p-2 wu-font-medium wu-text-xs",t&&"wu-pl-8",e),...n}));Ut.displayName=ee.Label.displayName;const An=y.forwardRef(({className:e,...t},n)=>a.jsx(ee.Separator,{ref:n,className:p("-wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));An.displayName=ee.Separator.displayName;const co=({option:e,value:t,multiple:n=!1,onSelect:s,accessorKey:r,dir:o})=>{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=()=>{e.disabled||s(e)};return a.jsxs(Ht,{onSelect:d,disabled:e.disabled,className:p("wu-cursor-pointer wu-text-xs wu-items-start wu-leading-4 wu-py-2 wu-combobox-item hover:wu-bg-gray-100",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(Fe,{checked:l}),a.jsx(Rd,{option:e,accessorKey:r})]})},Rd=({option:e,accessorKey:t})=>{const n=e[t.label];return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1",children:[e.icon&&e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wu-text-sm wm-lock wu-text-orange-deep"})]})},wo=e=>{const{option:t,selectAll:n,handleSelectAll:s,isCheckedAll:r,isPartialSelected:o,...i}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Ht,{onSelect:s,className:p("wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item"),dir:i.dir,children:[a.jsx(Fe,{checked:r||o,partial:o,"data-partial":o,"aria-label":(n==null?void 0:n.label)||"Select All"}),a.jsx("span",{"aria-hidden":!0,children:(n==null?void 0:n.label)||"Select All"})]});case"group":return a.jsxs($t,{children:[a.jsx(Ut,{children:t.label}),t.options.map((l,d)=>h.createElement(co,{...i,option:l,key:d}))]});case"divider":return a.jsx(no,{className:"wu-mx-4"});default:return a.jsx(co,{...i,option:t})}},ew=e=>{const t=[],n=[],s=[],r=[];return e.forEach(o=>{o.type==="group"?(t.push(o),s.push(...o.options),r.push(...o.options.filter(i=>!i.disabled))):o.type==="divider"?n.push(o):s.push(o),o!=null&&o.disabled||r.push(o)}),{groups:t,dividers:n,allOptions:s,enabledOptions:r}},tw=h.memo(Ge),nw=({data:e,accessorKey:t,value:n,defaultValue:s,Header:r,virtualizedThreshold:o=100,isEllipse:i,placeholder:u,variant:l,dir:d,onSelect:c,Label:w,maxHeight:f=420,multiple:m=!1,hasGroup:g=!1,selectAll:b,id:x,disabled:S,labelPosition:v="top",className:T,onScroll:N,maxContentWidth:C,enableSearch:D=!0,noDataContent:M,...I})=>{const[k,F]=h.useState(""),[P,A]=h.useState(),[V,W]=h.useState(!1),[_,q]=h.useState(!1),[B,U]=h.useState(!1),$=h.useRef(null),{allOptions:H,enabledOptions:pe}=h.useMemo(()=>g||b&&!b.includeDisabled?ew(e):{allOptions:e,groups:[],dividers:[],enabledOptions:[]},[e,g]),de=h.useMemo(()=>{if(!k)return e;const z=k.toLowerCase();return H.filter(J=>J[t.label].toLowerCase().includes(z))},[k,H,e,t.label]),Ae=h.useMemo(()=>m&&b!=null&&b.enable&&!k&&de.length>0?[{type:"all"},...de]:de,[de,k,m]),ge=h.useCallback(z=>{const J=z[t.value];m?A(ie=>{const De=ie||[],be=De.some(ve=>ve[t.value]===J)?De.filter(ve=>ve[t.value]!==J):[...De,z];return c==null||c(be),be}):(W(!1),A(z),c==null||c(z))},[m,t.value,c]),X=h.useCallback(z=>F(z.target.value),[]),L=h.useCallback(()=>F(""),[]);h.useEffect(()=>{if(n!==void 0&&s!==void 0){console.error("defaultValue and value cannot be used simultaneously");return}else n!==void 0?A(n):s!==void 0&&A(s)},[n,s]),h.useEffect(()=>{if(!m)return;const z=b!=null&&b.includeDisabled?(P==null?void 0:P.length)===H.length:(P==null?void 0:P.length)===pe.length;q(z);const J=(P==null?void 0:P.length)>0&&!z;U(J)},[P,b]);const j=h.useCallback(()=>{const z=_?[]:b!=null&&b.includeDisabled?H:pe;A(z),c==null||c(z)},[_,m,H,pe,c,b]),K=zt(v);return a.jsxs("div",{className:p(K,"wu-flex wu-combobox-container"),ref:$,children:[a.jsxs(ze,{onOpenChange:z=>{z&&L(),W(z)},open:V,modal:!0,children:[a.jsx(Xd,{selectedOptions:P,accessorKey:t,isEllipse:i,placeholder:u,variant:l,dir:d,multiple:m,disabled:S,selectAll:b,isCheckedAll:_,className:T,id:x,...I}),a.jsx(Oe,{className:"wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-p-0 wu-bg-white wu-border wu-border-blue-p wu-combobox-content",align:"start",sideOffset:-1,style:{maxWidth:C},children:a.jsxs(Ls,{id:x,children:[D&&a.jsx("div",{className:"wu-m-2",children:a.jsx(tw,{placeholder:"Search...",Icon:a.jsx("span",{className:"wm-search"}),className:"wu-text-xs wu-combobox-search",onChange:X,name:"Search","aria-label":"Search",dir:d,iconPosition:d==="rtl"?"right":"left"})}),r,a.jsxs(Ws,{children:[a.jsx(Bs,{children:M||"No results found."}),Ae.length>=o?a.jsx(Ct,{className:"wu-combobox-list",containerHeight:f,list:Ae,callback:(z,J)=>a.jsx(wo,{option:J,value:P,onSelect:ge,multiple:m,accessorKey:t,dir:d,selectAll:b,handleSelectAll:j,isCheckedAll:_,isPartialSelected:B},z),dir:d}):a.jsx("div",{style:{height:"fit-content",maxHeight:f,overflow:"auto"},className:"wu-combobox-list",onScroll:N,children:Ae.map((z,J)=>a.jsx(wo,{option:z,value:P,onSelect:ge,multiple:m,accessorKey:t,dir:d,selectAll:b,handleSelectAll:j,isCheckedAll:_,isPartialSelected:B},J))})]})]})})]}),w&&a.jsx(Te,{htmlFor:x,className:"wu-combobox-label",children:w})]})},sw=e=>{const{textToCopy:t,notificationText:n,...s}=e,[r,o]=h.useState(!1),i=async()=>{if(t)try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy:",u)}};return a.jsxs(Ce,{...s,onClick:i,variant:"iconOnly",className:p("wu-relative",e.className),"aria-label":"Copy to clipboard",children:[n&&a.jsx("span",{className:p("wu-absolute wu-text-[6px] wu-leading-3 -wu-top-4 wu-right-0 wu-bg-gray-notification wu-text-white wu-rounded-sm wu-shadow-md wu-px-1 wu-animate-ping-once",r?"wu-block":"wu-hidden"),children:n}),a.jsx(Ve,{icon:"wm-content-copy",className:"wu-text-lg"})]})},fo=R.Root,rw=R.Trigger,aw=R.Close,ow=R.Portal,po=y.forwardRef(({className:e,...t},n)=>a.jsx(R.Overlay,{className:p("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30 data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0","wu-drawer-overlay",e),...t,ref:n}));po.displayName=R.Overlay.displayName;const iw=_e.cva("wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-in-out data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-duration-500 data-[state=open]:wu-duration-500",{variants:{side:{top:"wu-inset-x-0 wu-top-0 wu-border-b data-[state=closed]:wu-slide-out-to-top data-[state=open]:wu-slide-in-from-top",bottom:"wu-inset-x-0 wu-bottom-0 wu-border-t data-[state=closed]:wu-slide-out-to-bottom data-[state=open]:wu-slide-in-from-bottom",left:"wu-inset-y-0 wu-left-0 wu-h-full wu-w-3/4 wu-border-r data-[state=closed]:wu-slide-out-to-left data-[state=open]:wu-slide-in-from-left sm:wu-max-w-sm",right:"wu-inset-y-0 wu-right-0 wu-h-full wu-w-3/4 wu-border-l data-[state=closed]:wu-slide-out-to-right data-[state=open]:wu-slide-in-from-right sm:wu-max-w-sm"}},defaultVariants:{side:"right"}}),zs=y.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:s,overlayClassName:r,closeButtonClassName:o,...i},u)=>a.jsxs(ow,{children:[a.jsx(po,{className:r}),a.jsxs(R.Content,{ref:u,className:p(iw({side:e}),t),...i,children:[n,!s&&a.jsx(R.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Nt,{variant:"iconOnly",className:p("wu-absolute wu-right-4 wu-top-4",o),children:[a.jsx("span",{className:"wm-close"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));zs.displayName=R.Content.displayName;const ho=y.forwardRef(({className:e,...t},n)=>a.jsx(R.Title,{ref:n,className:p("wu-text-lg wu-font-semibold",e),...t}));ho.displayName=R.Title.displayName;const uw=y.forwardRef(({className:e,...t},n)=>a.jsx(R.Description,{ref:n,className:p("wu-text-sm",e),...t}));uw.displayName=R.Description.displayName;const lw=e=>t=>{e&&t.preventDefault()},cw=e=>{const{Trigger:t,children:n,hideCloseButton:s,className:r,side:o="left",open:i,onOpenChange:u,preventClickOutside:l,overlayClassName:d,closeButtonClassName:c,...w}=e;return a.jsxs(fo,{open:i,onOpenChange:u,children:[a.jsx(rw,{asChild:!0,children:t}),a.jsxs(zs,{onInteractOutside:lw(l),side:o,className:p("wu-bg-white wu-text-gray-lead wu-px-0",r),hideCloseButton:s,overlayClassName:d,closeButtonClassName:c,...w,children:[a.jsx("div",{className:"wu-hidden",children:a.jsx(ho,{})}),n]})]})},dw=({children:e,...t})=>a.jsx(aw,{...t,children:e}),mo=h.createContext({});function $s(e){const t=h.useRef(null);return t.current===null&&(t.current=e()),t.current}const go=typeof window<"u",bo=go?h.useLayoutEffect:h.useEffect,Dn=h.createContext(null);function ww(e,t){e.indexOf(t)===-1&&e.push(t)}function fw(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ze=(e,t,n)=>n>t?t:n<e?e:n;function Hs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let jt=()=>{},ct=()=>{};typeof process<"u"&&((qc=process.env)==null?void 0:qc.NODE_ENV)!=="production"&&(jt=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(Hs(t,n))},ct=(e,t,n)=>{if(!e)throw new Error(Hs(t,n))});const Ke={},yo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function pw(e){return typeof e=="object"&&e!==null}const xo=e=>/^0[^.\s]+$/u.test(e);function Us(e){let t;return()=>(t===void 0&&(t=e()),t)}const Tt=e=>e,hw=(e,t)=>n=>t(e(n)),kn=(...e)=>e.reduce(hw),vo=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s};class No{constructor(){this.subscriptions=[]}add(t){return ww(this.subscriptions,t),()=>fw(this.subscriptions,t)}notify(t,n,s){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,s);else for(let o=0;o<r;o++){const i=this.subscriptions[o];i&&i(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const He=e=>e*1e3,Le=e=>e/1e3;function So(e,t){return t?e*(1e3/t):0}const Co=new Set;function To(e,t,n){e||Co.has(t)||(console.warn(Hs(t,n)),Co.add(t))}const Eo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,mw=1e-7,gw=12;function bw(e,t,n,s,r){let o,i,u=0;do i=t+(n-t)/2,o=Eo(i,s,r)-e,o>0?n=i:t=i;while(Math.abs(o)>mw&&++u<gw);return i}function Gt(e,t,n,s){if(e===t&&n===s)return Tt;const r=o=>bw(o,0,1,e,n);return o=>o===0||o===1?o:Eo(r(o),t,s)}const Mo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Io=e=>t=>1-e(1-t),Ao=Gt(.33,1.53,.69,.99),js=Io(Ao),Do=Mo(js),ko=e=>(e*=2)<1?.5*js(e):.5*(2-Math.pow(2,-10*(e-1))),Gs=e=>1-Math.sin(Math.acos(e)),yw=Io(Gs),Po=Mo(Gs),xw=Gt(.42,0,1,1),vw=Gt(0,0,.58,1),_o=Gt(.42,0,.58,1),Nw=e=>Array.isArray(e)&&typeof e[0]!="number",Vo=e=>Array.isArray(e)&&typeof e[0]=="number",Oo={linear:Tt,easeIn:xw,easeInOut:_o,easeOut:vw,circIn:Gs,circInOut:Po,circOut:yw,backIn:js,backInOut:Do,backOut:Ao,anticipate:ko},Sw=e=>typeof e=="string",Fo=e=>{if(Vo(e)){ct(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,s,r]=e;return Gt(t,n,s,r)}else if(Sw(e))return ct(Oo[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Oo[e];return e},Pn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Cw(e,t){let n=new Set,s=new Set,r=!1,o=!1;const i=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function l(c){i.has(c)&&(d.schedule(c),e()),c(u)}const d={schedule:(c,w=!1,f=!1)=>{const g=f&&r?n:s;return w&&i.add(c),g.has(c)||g.add(c),c},cancel:c=>{s.delete(c),i.delete(c)},process:c=>{if(u=c,r){o=!0;return}r=!0,[n,s]=[s,n],n.forEach(l),n.clear(),r=!1,o&&(o=!1,d.process(c))}};return d}const Tw=40;function Lo(e,t){let n=!1,s=!0;const r={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=Pn.reduce((T,N)=>(T[N]=Cw(o),T),{}),{setup:u,read:l,resolveKeyframes:d,preUpdate:c,update:w,preRender:f,render:m,postRender:g}=i,b=()=>{const T=Ke.useManualTiming?r.timestamp:performance.now();n=!1,Ke.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(T-r.timestamp,Tw),1)),r.timestamp=T,r.isProcessing=!0,u.process(r),l.process(r),d.process(r),c.process(r),w.process(r),f.process(r),m.process(r),g.process(r),r.isProcessing=!1,n&&t&&(s=!1,e(b))},x=()=>{n=!0,s=!0,r.isProcessing||e(b)};return{schedule:Pn.reduce((T,N)=>{const C=i[N];return T[N]=(D,M=!1,I=!1)=>(n||x(),C.schedule(D,M,I)),T},{}),cancel:T=>{for(let N=0;N<Pn.length;N++)i[Pn[N]].cancel(T)},state:r,steps:i}}const{schedule:We,cancel:Ks,state:_n}=Lo(typeof requestAnimationFrame<"u"?requestAnimationFrame:Tt,!0);let Vn;function Ew(){Vn=void 0}const Ee={now:()=>(Vn===void 0&&Ee.set(_n.isProcessing||Ke.useManualTiming?_n.timestamp:performance.now()),Vn),set:e=>{Vn=e,queueMicrotask(Ew)}},Wo=e=>t=>typeof t=="string"&&t.startsWith(e),Bo=Wo("--"),Mw=Wo("var(--"),Ys=e=>Mw(e)?Iw.test(e.split("/*")[0].trim()):!1,Iw=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function qo(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Et={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Kt={...Et,transform:e=>Ze(0,1,e)},On={...Et,default:1},Yt=e=>Math.round(e*1e5)/1e5,Xs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Aw(e){return e==null}const Dw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zs=(e,t)=>n=>!!(typeof n=="string"&&Dw.test(n)&&n.startsWith(e)||t&&!Aw(n)&&Object.prototype.hasOwnProperty.call(n,t)),zo=(e,t,n)=>s=>{if(typeof s!="string")return s;const[r,o,i,u]=s.match(Xs);return{[e]:parseFloat(r),[t]:parseFloat(o),[n]:parseFloat(i),alpha:u!==void 0?parseFloat(u):1}},kw=e=>Ze(0,255,e),Js={...Et,transform:e=>Math.round(kw(e))},dt={test:Zs("rgb","red"),parse:zo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+Js.transform(e)+", "+Js.transform(t)+", "+Js.transform(n)+", "+Yt(Kt.transform(s))+")"};function Pw(e){let t="",n="",s="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,s+=s,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:r?parseInt(r,16)/255:1}}const Qs={test:Zs("#"),parse:Pw,transform:dt.transform},Xt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Je=Xt("deg"),Mt=Xt("%"),O=Xt("px"),_w=Xt("vh"),Vw=Xt("vw"),$o={...Mt,parse:e=>Mt.parse(e)/100,transform:e=>Mt.transform(e*100)},It={test:Zs("hsl","hue"),parse:zo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+Mt.transform(Yt(t))+", "+Mt.transform(Yt(n))+", "+Yt(Kt.transform(s))+")"},le={test:e=>dt.test(e)||Qs.test(e)||It.test(e),parse:e=>dt.test(e)?dt.parse(e):It.test(e)?It.parse(e):Qs.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?dt.transform(e):It.transform(e),getAnimatableNone:e=>{const t=le.parse(e);return t.alpha=0,le.transform(t)}},Ow=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fw(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Xs))==null?void 0:t.length)||0)+(((n=e.match(Ow))==null?void 0:n.length)||0)>0}const Ho="number",Uo="color",Lw="var",Ww="var(",jo="${}",Bw=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Zt(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},r=[];let o=0;const u=t.replace(Bw,l=>(le.test(l)?(s.color.push(o),r.push(Uo),n.push(le.parse(l))):l.startsWith(Ww)?(s.var.push(o),r.push(Lw),n.push(l)):(s.number.push(o),r.push(Ho),n.push(parseFloat(l))),++o,jo)).split(jo);return{values:n,split:u,indexes:s,types:r}}function Go(e){return Zt(e).values}function Ko(e){const{split:t,types:n}=Zt(e),s=t.length;return r=>{let o="";for(let i=0;i<s;i++)if(o+=t[i],r[i]!==void 0){const u=n[i];u===Ho?o+=Yt(r[i]):u===Uo?o+=le.transform(r[i]):o+=r[i]}return o}}const qw=e=>typeof e=="number"?0:le.test(e)?le.getAnimatableNone(e):e;function zw(e){const t=Go(e);return Ko(e)(t.map(qw))}const Qe={test:Fw,parse:Go,createTransformer:Ko,getAnimatableNone:zw};function Rs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function $w({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let r=0,o=0,i=0;if(!t)r=o=i=n;else{const u=n<.5?n*(1+t):n+t-n*t,l=2*n-u;r=Rs(l,u,e+1/3),o=Rs(l,u,e),i=Rs(l,u,e-1/3)}return{red:Math.round(r*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:s}}function Fn(e,t){return n=>n>0?t:e}const Jt=(e,t,n)=>e+(t-e)*n,er=(e,t,n)=>{const s=e*e,r=n*(t*t-s)+s;return r<0?0:Math.sqrt(r)},Hw=[Qs,dt,It],Uw=e=>Hw.find(t=>t.test(e));function Yo(e){const t=Uw(e);if(jt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===It&&(n=$w(n)),n}const Xo=(e,t)=>{const n=Yo(e),s=Yo(t);if(!n||!s)return Fn(e,t);const r={...n};return o=>(r.red=er(n.red,s.red,o),r.green=er(n.green,s.green,o),r.blue=er(n.blue,s.blue,o),r.alpha=Jt(n.alpha,s.alpha,o),dt.transform(r))},tr=new Set(["none","hidden"]);function jw(e,t){return tr.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Gw(e,t){return n=>Jt(e,t,n)}function nr(e){return typeof e=="number"?Gw:typeof e=="string"?Ys(e)?Fn:le.test(e)?Xo:Xw:Array.isArray(e)?Zo:typeof e=="object"?le.test(e)?Xo:Kw:Fn}function Zo(e,t){const n=[...e],s=n.length,r=e.map((o,i)=>nr(o)(o,t[i]));return o=>{for(let i=0;i<s;i++)n[i]=r[i](o);return n}}function Kw(e,t){const n={...e,...t},s={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(s[r]=nr(e[r])(e[r],t[r]));return r=>{for(const o in s)n[o]=s[o](r);return n}}function Yw(e,t){const n=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],i=e.indexes[o][s[o]],u=e.values[i]??0;n[r]=u,s[o]++}return n}const Xw=(e,t)=>{const n=Qe.createTransformer(t),s=Zt(e),r=Zt(t);return s.indexes.var.length===r.indexes.var.length&&s.indexes.color.length===r.indexes.color.length&&s.indexes.number.length>=r.indexes.number.length?tr.has(e)&&!r.values.length||tr.has(t)&&!s.values.length?jw(e,t):kn(Zo(Yw(s,r),r.values),n):(jt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Fn(e,t))};function Jo(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Jt(e,t,n):nr(e)(e,t)}const Zw=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>We.update(t,n),stop:()=>Ks(t),now:()=>_n.isProcessing?_n.timestamp:Ee.now()}},Qo=(e,t,n=10)=>{let s="";const r=Math.max(Math.round(t/n),2);for(let o=0;o<r;o++)s+=Math.round(e(o/(r-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Ln=2e4;function sr(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<Ln;)t+=n,s=e.next(t);return t>=Ln?1/0:t}function Jw(e,t=100,n){const s=n({...e,keyframes:[0,t]}),r=Math.min(sr(s),Ln);return{type:"keyframes",ease:o=>s.next(r*o).value/t,duration:Le(r)}}const Qw=5;function Ro(e,t,n){const s=Math.max(t-Qw,0);return So(n-e(s),t-s)}const se={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},rr=.001;function Rw({duration:e=se.duration,bounce:t=se.bounce,velocity:n=se.velocity,mass:s=se.mass}){let r,o;jt(e<=He(se.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Ze(se.minDamping,se.maxDamping,i),e=Ze(se.minDuration,se.maxDuration,Le(e)),i<1?(r=d=>{const c=d*i,w=c*e,f=c-n,m=ar(d,i),g=Math.exp(-w);return rr-f/m*g},o=d=>{const w=d*i*e,f=w*n+n,m=Math.pow(i,2)*Math.pow(d,2)*e,g=Math.exp(-w),b=ar(Math.pow(d,2),i);return(-r(d)+rr>0?-1:1)*((f-m)*g)/b}):(r=d=>{const c=Math.exp(-d*e),w=(d-n)*e+1;return-rr+c*w},o=d=>{const c=Math.exp(-d*e),w=(n-d)*(e*e);return c*w});const u=5/e,l=tf(r,o,u);if(e=He(e),isNaN(l))return{stiffness:se.stiffness,damping:se.damping,duration:e};{const d=Math.pow(l,2)*s;return{stiffness:d,damping:i*2*Math.sqrt(s*d),duration:e}}}const ef=12;function tf(e,t,n){let s=n;for(let r=1;r<ef;r++)s=s-e(s)/t(s);return s}function ar(e,t){return e*Math.sqrt(1-t*t)}const nf=["duration","bounce"],sf=["stiffness","damping","mass"];function ei(e,t){return t.some(n=>e[n]!==void 0)}function rf(e){let t={velocity:se.velocity,stiffness:se.stiffness,damping:se.damping,mass:se.mass,isResolvedFromDuration:!1,...e};if(!ei(e,sf)&&ei(e,nf))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),r=s*s,o=2*Ze(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:se.mass,stiffness:r,damping:o}}else{const n=Rw(e);t={...t,...n,mass:se.mass},t.isResolvedFromDuration=!0}return t}function Wn(e=se.visualDuration,t=se.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:r}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:l,damping:d,mass:c,duration:w,velocity:f,isResolvedFromDuration:m}=rf({...n,velocity:-Le(n.velocity||0)}),g=f||0,b=d/(2*Math.sqrt(l*c)),x=i-o,S=Le(Math.sqrt(l/c)),v=Math.abs(x)<5;s||(s=v?se.restSpeed.granular:se.restSpeed.default),r||(r=v?se.restDelta.granular:se.restDelta.default);let T;if(b<1){const C=ar(S,b);T=D=>{const M=Math.exp(-b*S*D);return i-M*((g+b*S*x)/C*Math.sin(C*D)+x*Math.cos(C*D))}}else if(b===1)T=C=>i-Math.exp(-S*C)*(x+(g+S*x)*C);else{const C=S*Math.sqrt(b*b-1);T=D=>{const M=Math.exp(-b*S*D),I=Math.min(C*D,300);return i-M*((g+b*S*x)*Math.sinh(I)+C*x*Math.cosh(I))/C}}const N={calculatedDuration:m&&w||null,next:C=>{const D=T(C);if(m)u.done=C>=w;else{let M=C===0?g:0;b<1&&(M=C===0?He(g):Ro(T,C,D));const I=Math.abs(M)<=s,k=Math.abs(i-D)<=r;u.done=I&&k}return u.value=u.done?i:D,u},toString:()=>{const C=Math.min(sr(N),Ln),D=Qo(M=>N.next(C*M).value,C,30);return C+"ms "+D},toTransition:()=>{}};return N}Wn.applyToOptions=e=>{const t=Jw(e,100,Wn);return e.ease=t.ease,e.duration=He(t.duration),e.type="keyframes",e};function or({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:r=10,bounceStiffness:o=500,modifyTarget:i,min:u,max:l,restDelta:d=.5,restSpeed:c}){const w=e[0],f={done:!1,value:w},m=I=>u!==void 0&&I<u||l!==void 0&&I>l,g=I=>u===void 0?l:l===void 0||Math.abs(u-I)<Math.abs(l-I)?u:l;let b=n*t;const x=w+b,S=i===void 0?x:i(x);S!==x&&(b=S-w);const v=I=>-b*Math.exp(-I/s),T=I=>S+v(I),N=I=>{const k=v(I),F=T(I);f.done=Math.abs(k)<=d,f.value=f.done?S:F};let C,D;const M=I=>{m(f.value)&&(C=I,D=Wn({keyframes:[f.value,g(f.value)],velocity:Ro(T,I,f.value),damping:r,stiffness:o,restDelta:d,restSpeed:c}))};return M(0),{calculatedDuration:null,next:I=>{let k=!1;return!D&&C===void 0&&(k=!0,N(I),M(I)),C!==void 0&&I>=C?D.next(I-C):(!k&&N(I),f)}}}function af(e,t,n){const s=[],r=n||Ke.mix||Jo,o=e.length-1;for(let i=0;i<o;i++){let u=r(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||Tt:t;u=kn(l,u)}s.push(u)}return s}function of(e,t,{clamp:n=!0,ease:s,mixer:r}={}){const o=e.length;if(ct(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=af(t,s,r),l=u.length,d=c=>{if(i&&c<e[0])return t[0];let w=0;if(l>1)for(;w<e.length-2&&!(c<e[w+1]);w++);const f=vo(e[w],e[w+1],c);return u[w](f)};return n?c=>d(Ze(e[0],e[o-1],c)):d}function uf(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const r=vo(0,t,s);e.push(Jt(n,1,r))}}function lf(e){const t=[0];return uf(t,e.length-1),t}function cf(e,t){return e.map(n=>n*t)}function df(e,t){return e.map(()=>t||_o).splice(0,e.length-1)}function At({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const r=Nw(s)?s.map(Fo):Fo(s),o={done:!1,value:t[0]},i=cf(n&&n.length===t.length?n:lf(t),e),u=of(i,t,{ease:Array.isArray(r)?r:df(t,r)});return{calculatedDuration:e,next:l=>(o.value=u(l),o.done=l>=e,o)}}const wf=e=>e!==null;function ir(e,{repeat:t,repeatType:n="loop"},s,r=1){const o=e.filter(wf),u=r<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||s===void 0?o[u]:s}const ff={decay:or,inertia:or,tween:At,keyframes:At,spring:Wn};function ti(e){typeof e.type=="string"&&(e.type=ff[e.type])}class ur{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const pf=e=>e/100;class lr extends ur{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,r;const{motionValue:n}=this.options;n&&n.updatedAt!==Ee.now()&&this.tick(Ee.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(s=this.options).onStop)==null||r.call(s))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ti(t);const{type:n=At,repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=t;let{keyframes:u}=t;const l=n||At;process.env.NODE_ENV!=="production"&&l!==At&&ct(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==At&&typeof u[0]!="number"&&(this.mixKeyframes=kn(pf,Jo(u[0],u[1])),u=[0,100]);const d=l({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...u].reverse(),velocity:-i})),d.calculatedDuration===null&&(d.calculatedDuration=sr(d));const{calculatedDuration:c}=d;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(s+1)-r,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:s,totalDuration:r,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:u,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:d=0,keyframes:c,repeat:w,repeatType:f,repeatDelay:m,type:g,onUpdate:b,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-r/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const S=this.currentTime-d*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?S<0:S>r;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let T=this.currentTime,N=s;if(w){const I=Math.min(this.currentTime,r)/u;let k=Math.floor(I),F=I%1;!F&&I>=1&&(F=1),F===1&&k--,k=Math.min(k,w+1),!!(k%2)&&(f==="reverse"?(F=1-F,m&&(F-=m/u)):f==="mirror"&&(N=i)),T=Ze(0,1,F)*u}const C=v?{done:!1,value:c[0]}:N.next(T);o&&(C.value=o(C.value));let{done:D}=C;!v&&l!==null&&(D=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return M&&g!==or&&(C.value=ir(c,this.options,x,this.speed)),b&&b(C.value),M&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return Le(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Le(t)}get time(){return Le(this.currentTime)}set time(t){var n;t=He(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ee.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Le(this.currentTime))}play(){var r,o;if(this.isStopped)return;const{driver:t=Zw,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(r=this.options).onPlay)==null||o.call(r);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ee.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function hf(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const wt=e=>e*180/Math.PI,cr=e=>{const t=wt(Math.atan2(e[1],e[0]));return dr(t)},mf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:cr,rotateZ:cr,skewX:e=>wt(Math.atan(e[1])),skewY:e=>wt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},dr=e=>(e=e%360,e<0&&(e+=360),e),ni=cr,si=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ri=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),gf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:si,scaleY:ri,scale:e=>(si(e)+ri(e))/2,rotateX:e=>dr(wt(Math.atan2(e[6],e[5]))),rotateY:e=>dr(wt(Math.atan2(-e[2],e[0]))),rotateZ:ni,rotate:ni,skewX:e=>wt(Math.atan(e[4])),skewY:e=>wt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function wr(e){return e.includes("scale")?1:0}function fr(e,t){if(!e||e==="none")return wr(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,r;if(n)s=gf,r=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=mf,r=u}if(!r)return wr(t);const o=s[t],i=r[1].split(",").map(yf);return typeof o=="function"?o(i):i[o]}const bf=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return fr(n,t)};function yf(e){return parseFloat(e.trim())}const Dt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kt=new Set(Dt),ai=e=>e===Et||e===O,xf=new Set(["x","y","z"]),vf=Dt.filter(e=>!xf.has(e));function Nf(e){const t=[];return vf.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const Re={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>fr(t,"x"),y:(e,{transform:t})=>fr(t,"y")};Re.translateX=Re.x,Re.translateY=Re.y;const ft=new Set;let pr=!1,hr=!1,mr=!1;function oi(){if(hr){const e=Array.from(ft).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const r=Nf(s);r.length&&(n.set(s,r),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const r=n.get(s);r&&r.forEach(([o,i])=>{var u;(u=s.getValue(o))==null||u.set(i)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}hr=!1,pr=!1,ft.forEach(e=>e.complete(mr)),ft.clear()}function ii(){ft.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hr=!0)})}function Sf(){mr=!0,ii(),oi(),mr=!1}class gr{constructor(t,n,s,r,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(ft.add(this),pr||(pr=!0,We.read(ii),We.resolveKeyframes(oi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:r}=this;if(t[0]===null){const o=r==null?void 0:r.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const u=s.readValue(n,i);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=i),r&&o===void 0&&r.set(t[0])}hf(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ft.delete(this)}cancel(){this.state==="scheduled"&&(ft.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Cf=e=>e.startsWith("--");function Tf(e,t,n){Cf(t)?e.style.setProperty(t,n):e.style[t]=n}const Ef=Us(()=>window.ScrollTimeline!==void 0),Mf={};function If(e,t){const n=Us(e);return()=>Mf[t]??n()}const ui=If(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Qt=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,li={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qt([0,.65,.55,1]),circOut:Qt([.55,0,1,.45]),backIn:Qt([.31,.01,.66,-.59]),backOut:Qt([.33,1.53,.69,.99])};function ci(e,t){if(e)return typeof e=="function"?ui()?Qo(e,t):"ease-out":Vo(e)?Qt(e):Array.isArray(e)?e.map(n=>ci(n,t)||li.easeOut):li[e]}function Af(e,t,n,{delay:s=0,duration:r=300,repeat:o=0,repeatType:i="loop",ease:u="easeOut",times:l}={},d=void 0){const c={[t]:n};l&&(c.offset=l);const w=ci(u,r);Array.isArray(w)&&(c.easing=w);const f={delay:s,duration:r,easing:Array.isArray(w)?"linear":w,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return d&&(f.pseudoElement=d),e.animate(c,f)}function di(e){return typeof e=="function"&&"applyToOptions"in e}function Df({type:e,...t}){return di(e)&&ui()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class wi extends ur{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:s,keyframes:r,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:u,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,ct(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=Df(t);this.animation=Af(n,s,r,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=ir(r,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(c):Tf(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,r;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((r=(s=this.animation).commitStyles)==null||r.call(s))}get duration(){var n,s;const t=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return Le(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Le(t)}get time(){return Le(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=He(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Ef()?(this.animation.timeline=t,Tt):n(this)}}const fi={anticipate:ko,backInOut:Do,circInOut:Po};function kf(e){return e in fi}function Pf(e){typeof e.ease=="string"&&kf(e.ease)&&(e.ease=fi[e.ease])}const br=10;class _f extends wi{constructor(t){Pf(t),ti(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:s,onComplete:r,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new lr({...i,autoplay:!1}),l=Math.max(br,Ee.now()-this.startTime),d=Ze(0,br,l-br);n.setWithVelocity(u.sample(Math.max(0,l-d)).value,u.sample(l).value,d),u.stop()}}const pi=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Qe.test(e)||e==="0")&&!e.startsWith("url("));function Vf(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Of(e,t,n,s){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=pi(r,t),u=pi(o,t);return jt(i===u,`You are trying to animate ${t} from "${r}" to "${o}". "${i?o:r}" is not an animatable value.`,"value-not-animatable"),!i||!u?!1:Vf(e)||(n==="spring"||di(n))&&s}function yr(e){e.duration=0,e.type="keyframes"}const Ff=new Set(["opacity","clipPath","filter","transform"]),Lf=Us(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wf(e){var c;const{motionValue:t,name:n,repeatDelay:s,repeatType:r,damping:o,type:i}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:d}=t.owner.getProps();return Lf()&&n&&Ff.has(n)&&(n!=="transform"||!d)&&!l&&!s&&r!=="mirror"&&o!==0&&i!=="inertia"}const Bf=40;class qf extends ur{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",keyframes:u,name:l,motionValue:d,element:c,...w}){var g;super(),this.stop=()=>{var b,x;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=Ee.now();const f={autoplay:t,delay:n,type:s,repeat:r,repeatDelay:o,repeatType:i,name:l,motionValue:d,element:c,...w},m=(c==null?void 0:c.KeyframeResolver)||gr;this.keyframeResolver=new m(u,(b,x,S)=>this.onKeyframesResolved(b,x,f,!S),l,d,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,r){var x,S;this.keyframeResolver=void 0;const{name:o,type:i,velocity:u,delay:l,isHandoff:d,onUpdate:c}=s;this.resolvedAt=Ee.now(),Of(t,o,i,u)||((Ke.instantAnimations||!l)&&(c==null||c(ir(t,s,n))),t[0]=t[t.length-1],yr(s),s.repeat=0);const f={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>Bf?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:t},m=!d&&Wf(f),g=(S=(x=f.motionValue)==null?void 0:x.owner)==null?void 0:S.current,b=m?new _f({...f,element:g}):new lr(f);b.finished.then(()=>{this.notifyFinished()}).catch(Tt),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),Sf()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function hi(e,t,n,s=0,r=1){const o=Array.from(e).sort((d,c)=>d.sortNodePosition(c)).indexOf(t),i=e.size,u=(i-1)*s;return typeof n=="function"?n(o,i):r===1?o*s:u-o*s}const zf=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $f(e){const t=zf.exec(e);if(!t)return[,];const[,n,s,r]=t;return[`--${n??s}`,r]}const Hf=4;function mi(e,t,n=1){ct(n<=Hf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,r]=$f(e);if(!s)return;const o=window.getComputedStyle(t).getPropertyValue(s);if(o){const i=o.trim();return yo(i)?parseFloat(i):i}return Ys(r)?mi(r,t,n+1):r}const Uf={type:"spring",stiffness:500,damping:25,restSpeed:10},jf=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Gf={type:"keyframes",duration:.8},Kf={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yf=(e,{keyframes:t})=>t.length>2?Gf:kt.has(e)?e.startsWith("scale")?jf(t[1]):Uf:Kf,Xf=e=>e!==null;function Zf(e,{repeat:t,repeatType:n="loop"},s){const r=e.filter(Xf),o=t&&n!=="loop"&&t%2===1?0:r.length-1;return r[o]}function gi(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...s}=e;return{...t,...s}}return e}function bi(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?gi(n,e):n}function Jf({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:r,repeat:o,repeatType:i,repeatDelay:u,from:l,elapsed:d,...c}){return!!Object.keys(c).length}const Qf=(e,t,n,s={},r,o)=>i=>{const u=bi(s,e)||{},l=u.delay||s.delay||0;let{elapsed:d=0}=s;d=d-He(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-d,onUpdate:f=>{t.set(f),u.onUpdate&&u.onUpdate(f)},onComplete:()=>{i(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:r};Jf(u)||Object.assign(c,Yf(e,c)),c.duration&&(c.duration=He(c.duration)),c.repeatDelay&&(c.repeatDelay=He(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let w=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(yr(c),c.delay===0&&(w=!0)),(Ke.instantAnimations||Ke.skipAnimations||r!=null&&r.shouldSkipAnimations)&&(w=!0,yr(c),c.delay=0),c.allowFlatten=!u.type&&!u.ease,w&&!o&&t.get()!==void 0){const f=Zf(c.keyframes,u);if(f!==void 0){We.update(()=>{c.onUpdate(f),c.onComplete()});return}}return u.isSync?new lr(c):new qf(c)};function yi(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function xr(e,t,n,s){if(typeof t=="function"){const[r,o]=yi(s);t=t(n!==void 0?n:e.custom,r,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,o]=yi(s);t=t(n!==void 0?n:e.custom,r,o)}return t}function Pt(e,t,n){const s=e.getProps();return xr(s,t,n!==void 0?n:s.custom,e)}const xi=new Set(["width","height","top","left","right","bottom",...Dt]),vi=30,Rf=e=>!isNaN(parseFloat(e));class ep{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var o;const r=Ee.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ee.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Rf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&To(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new No);const s=this.events[t].add(n);return t==="change"?()=>{s(),We.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ee.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vi)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vi);return So(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Bn(e,t){return new ep(e,t)}const vr=e=>Array.isArray(e);function tp(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Bn(n))}function np(e){return vr(e)?e[e.length-1]||0:e}function sp(e,t){const n=Pt(e,t);let{transitionEnd:s={},transition:r={},...o}=n||{};o={...o,...s};for(const i in o){const u=np(o[i]);tp(e,i,u)}}const me=e=>!!(e&&e.getVelocity);function rp(e){return!!(me(e)&&e.add)}function ap(e,t){const n=e.getValue("willChange");if(rp(n))return n.add(t);if(!n&&Ke.WillChange){const s=new Ke.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function Nr(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Ni="data-"+Nr("framerAppearId");function op(e){return e.props[Ni]}function ip({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function Si(e,t,{delay:n=0,transitionOverride:s,type:r}={}){let{transition:o,transitionEnd:i,...u}=t;const l=e.getDefaultTransition();o=o?gi(o,l):l;const d=o==null?void 0:o.reduceMotion;s&&(o=s);const c=[],w=r&&e.animationState&&e.animationState.getState()[r];for(const f in u){const m=e.getValue(f,e.latestValues[f]??null),g=u[f];if(g===void 0||w&&ip(w,f))continue;const b={delay:n,...bi(o||{},f)},x=m.get();if(x!==void 0&&!m.isAnimating&&!Array.isArray(g)&&g===x&&!b.velocity)continue;let S=!1;if(window.MotionHandoffAnimation){const N=op(e);if(N){const C=window.MotionHandoffAnimation(N,f,We);C!==null&&(b.startTime=C,S=!0)}}ap(e,f);const v=d??e.shouldReduceMotion;m.start(Qf(f,m,g,v&&xi.has(f)?{type:!1}:b,e,S));const T=m.animation;T&&c.push(T)}if(i){const f=()=>We.update(()=>{i&&sp(e,i)});c.length?Promise.all(c).then(f):f()}return c}function Sr(e,t,n={}){var l;const s=Pt(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const o=s?()=>Promise.all(Si(e,s,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:c=0,staggerChildren:w,staggerDirection:f}=r;return up(e,t,d,c,w,f,n)}:()=>Promise.resolve(),{when:u}=r;if(u){const[d,c]=u==="beforeChildren"?[o,i]:[i,o];return d().then(()=>c())}else return Promise.all([o(),i(n.delay)])}function up(e,t,n=0,s=0,r=0,o=1,i){const u=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),u.push(Sr(l,t,{...i,delay:n+(typeof s=="function"?0:s)+hi(e.variantChildren,l,s,r,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(u)}function lp(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const r=t.map(o=>Sr(e,o,n));s=Promise.all(r)}else if(typeof t=="string")s=Sr(e,t,n);else{const r=typeof t=="function"?Pt(e,t,n.custom):t;s=Promise.all(Si(e,r,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const cp={test:e=>e==="auto",parse:e=>e},Ci=e=>t=>t.test(e),Ti=[Et,O,Mt,Je,Vw,_w,cp],Ei=e=>Ti.find(Ci(e));function dp(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xo(e):!0}const wp=new Set(["brightness","contrast","saturate","opacity"]);function fp(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(Xs)||[];if(!s)return e;const r=n.replace(s,"");let o=wp.has(t)?1:0;return s!==n&&(o*=100),t+"("+o+r+")"}const pp=/\b([a-z-]*)\(.*?\)/gu,Cr={...Qe,getAnimatableNone:e=>{const t=e.match(pp);return t?t.map(fp).join(" "):e}},Mi={...Et,transform:Math.round},Tr={borderWidth:O,borderTopWidth:O,borderRightWidth:O,borderBottomWidth:O,borderLeftWidth:O,borderRadius:O,borderTopLeftRadius:O,borderTopRightRadius:O,borderBottomRightRadius:O,borderBottomLeftRadius:O,width:O,maxWidth:O,height:O,maxHeight:O,top:O,right:O,bottom:O,left:O,inset:O,insetBlock:O,insetBlockStart:O,insetBlockEnd:O,insetInline:O,insetInlineStart:O,insetInlineEnd:O,padding:O,paddingTop:O,paddingRight:O,paddingBottom:O,paddingLeft:O,paddingBlock:O,paddingBlockStart:O,paddingBlockEnd:O,paddingInline:O,paddingInlineStart:O,paddingInlineEnd:O,margin:O,marginTop:O,marginRight:O,marginBottom:O,marginLeft:O,marginBlock:O,marginBlockStart:O,marginBlockEnd:O,marginInline:O,marginInlineStart:O,marginInlineEnd:O,fontSize:O,backgroundPositionX:O,backgroundPositionY:O,...{rotate:Je,rotateX:Je,rotateY:Je,rotateZ:Je,scale:On,scaleX:On,scaleY:On,scaleZ:On,skew:Je,skewX:Je,skewY:Je,distance:O,translateX:O,translateY:O,translateZ:O,x:O,y:O,z:O,perspective:O,transformPerspective:O,opacity:Kt,originX:$o,originY:$o,originZ:O},zIndex:Mi,fillOpacity:Kt,strokeOpacity:Kt,numOctaves:Mi},hp={...Tr,color:le,backgroundColor:le,outlineColor:le,fill:le,stroke:le,borderColor:le,borderTopColor:le,borderRightColor:le,borderBottomColor:le,borderLeftColor:le,filter:Cr,WebkitFilter:Cr},Ii=e=>hp[e];function Ai(e,t){let n=Ii(e);return n!==Cr&&(n=Qe),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const mp=new Set(["auto","none","0"]);function gp(e,t,n){let s=0,r;for(;s<e.length&&!r;){const o=e[s];typeof o=="string"&&!mp.has(o)&&Zt(o).values.length&&(r=e[s]),s++}if(r&&n)for(const o of t)e[o]=Ai(n,r)}class bp extends gr{constructor(t,n,s,r,o){super(t,n,s,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let w=t[c];if(typeof w=="string"&&(w=w.trim(),Ys(w))){const f=mi(w,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=w)}}if(this.resolveNoneKeyframes(),!xi.has(s)||t.length!==2)return;const[r,o]=t,i=Ei(r),u=Ei(o),l=qo(r),d=qo(o);if(l!==d&&Re[s]){this.needsMeasurement=!0;return}if(i!==u)if(ai(i)&&ai(u))for(let c=0;c<t.length;c++){const w=t[c];typeof w=="string"&&(t[c]=parseFloat(w))}else Re[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let r=0;r<t.length;r++)(t[r]===null||dp(t[r]))&&s.push(r);s.length&&gp(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Re[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(s,r).jump(r,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const o=s.length-1,i=s[o];s[o]=Re[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([l,d])=>{t.getValue(l).set(d)}),this.resolveNoneKeyframes()}}const yp=new Set(["opacity","clipPath","filter","transform"]);function xp(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const r=(n==null?void 0:n[e])??s.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(s=>s!=null)}const Di=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Er(e){return pw(e)&&"offsetHeight"in e}const{schedule:vp}=Lo(queueMicrotask,!1),Np={y:!1};function Sp(){return Np.y}function ki(e,t){const n=xp(e),s=new AbortController,r={passive:!0,...t,signal:s.signal};return[n,r,()=>s.abort()]}function Cp(e){return!(e.pointerType==="touch"||Sp())}function Tp(e,t,n={}){const[s,r,o]=ki(e,n);return s.forEach(i=>{let u=!1,l=!1,d;const c=()=>{i.removeEventListener("pointerleave",g)},w=x=>{d&&(d(x),d=void 0),c()},f=x=>{u=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,w(x))},m=()=>{u=!0,window.addEventListener("pointerup",f,r),window.addEventListener("pointercancel",f,r)},g=x=>{if(x.pointerType!=="touch"){if(u){l=!0;return}w(x)}},b=x=>{if(!Cp(x))return;l=!1;const S=t(i,x);typeof S=="function"&&(d=S,i.addEventListener("pointerleave",g,r))};i.addEventListener("pointerenter",b,r),i.addEventListener("pointerdown",m,r)}),o}const Pi=(e,t)=>t?e===t?!0:Pi(e,t.parentElement):!1,Ep=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Mp=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ip(e){return Mp.has(e.tagName)||e.isContentEditable===!0}const qn=new WeakSet;function _i(e){return t=>{t.key==="Enter"&&e(t)}}function Mr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Ap=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=_i(()=>{if(qn.has(n))return;Mr(n,"down");const r=_i(()=>{Mr(n,"up")}),o=()=>Mr(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function Vi(e){return Ep(e)&&!0}const Oi=new WeakSet;function Dp(e,t,n={}){const[s,r,o]=ki(e,n),i=u=>{const l=u.currentTarget;if(!Vi(u)||Oi.has(u))return;qn.add(l),n.stopPropagation&&Oi.add(u);const d=t(l,u),c=(m,g)=>{window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",f),qn.has(l)&&qn.delete(l),Vi(m)&&typeof d=="function"&&d(m,{success:g})},w=m=>{c(m,l===window||l===document||n.useGlobalTarget||Pi(l,m.target))},f=m=>{c(m,!1)};window.addEventListener("pointerup",w,r),window.addEventListener("pointercancel",f,r)};return s.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",i,r),Er(u)&&(u.addEventListener("focus",d=>Ap(d,r)),!Ip(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}const kp=[...Ti,le,Qe],Pp=e=>kp.find(Ci(e)),Fi=()=>({min:0,max:0}),Li=()=>({x:Fi(),y:Fi()}),_p=new WeakMap;function zn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Rt(e){return typeof e=="string"||Array.isArray(e)}const Ir=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ar=["initial",...Ir];function $n(e){return zn(e.animate)||Ar.some(t=>Rt(e[t]))}function Wi(e){return!!($n(e)||e.variants)}function Vp(e,t,n){for(const s in t){const r=t[s],o=n[s];if(me(r))e.addValue(s,r);else if(me(o))e.addValue(s,Bn(r,{owner:e}));else if(o!==r)if(e.hasValue(s)){const i=e.getValue(s);i.liveStyle===!0?i.jump(r):i.hasAnimated||i.set(r)}else{const i=e.getStaticValue(s);e.addValue(s,Bn(i!==void 0?i:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Dr={current:null},Bi={current:!1},Op=typeof window<"u";function Fp(){if(Bi.current=!0,!!Op)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Dr.current=e.matches;e.addEventListener("change",t),t()}else Dr.current=!1}const qi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Hn={};function zi(e){Hn=e}function Lp(){return Hn}class Wp{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:i,visualState:u},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=gr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Ee.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,We.render(this.render,!1,!0))};const{latestValues:d,renderState:c}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=$n(n),this.isVariantNode=Wi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:w,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];d[m]!==void 0&&me(g)&&g.set(d[m])}}mount(t){var n,s;if(this.hasBeenMounted)for(const r in this.initialValues)(n=this.values.get(r))==null||n.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,_p.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Bi.current||Fp(),this.shouldReduceMotion=Dr.current),process.env.NODE_ENV!=="production"&&To(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Ks(this.notifyUpdate),Ks(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&yp.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:u,times:l,ease:d,duration:c}=n.accelerate,w=new wi({element:this.current,name:t,keyframes:u,times:l,ease:d,duration:He(c)}),f=i(w);this.valueSubscriptions.set(t,()=>{f(),w.cancel()});return}const s=kt.has(t);s&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&We.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Hn){const n=Hn[t];if(!n)continue;const{isEnabled:s,Feature:r}=n;if(!this.features[t]&&r&&s(this.props)&&(this.features[t]=new r(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Li()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<qi.length;s++){const r=qi[s];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const o="on"+r,i=t[o];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=Vp(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=Bn(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(yo(s)||xo(s))?s=parseFloat(s):!Pp(s)&&Qe.test(n)&&(s=Ai(t,n)),this.setBaseTarget(t,me(s)?s.get():s)),me(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const i=xr(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(s=i[t])}if(n&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!me(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new No),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){vp.render(this.render)}}class $i extends Wp{constructor(){super(...arguments),this.KeyframeResolver=bp}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const s=t.style;return s?s[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;me(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class _t{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Bp({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function qp(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function zp(e,t){return Bp(qp(e.getBoundingClientRect(),t))}const $p={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Hp=Dt.length;function Up(e,t,n){let s="",r=!0;for(let o=0;o<Hp;o++){const i=Dt[o],u=e[i];if(u===void 0)continue;let l=!0;if(typeof u=="number")l=u===(i.startsWith("scale")?1:0);else{const d=parseFloat(u);l=i.startsWith("scale")?d===1:d===0}if(!l||n){const d=Di(u,Tr[i]);if(!l){r=!1;const c=$p[i]||i;s+=`${c}(${d}) `}n&&(t[i]=d)}}return s=s.trim(),n?s=n(t,r?"":s):r&&(s="none"),s}function kr(e,t,n){const{style:s,vars:r,transformOrigin:o}=e;let i=!1,u=!1;for(const l in t){const d=t[l];if(kt.has(l)){i=!0;continue}else if(Bo(l)){r[l]=d;continue}else{const c=Di(d,Tr[l]);l.startsWith("origin")?(u=!0,o[l]=c):s[l]=c}}if(t.transform||(i||n?s.transform=Up(t,e.transform,n):s.transform&&(s.transform="none")),u){const{originX:l="50%",originY:d="50%",originZ:c=0}=o;s.transformOrigin=`${l} ${d} ${c}`}}function Hi(e,{style:t,vars:n},s,r){const o=e.style;let i;for(i in t)o[i]=t[i];r==null||r.applyProjectionStyles(o,s);for(i in n)o.setProperty(i,n[i])}function Ui(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const en={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(O.test(e))e=parseFloat(e);else return e;const n=Ui(e,t.target.x),s=Ui(e,t.target.y);return`${n}% ${s}%`}},jp={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,r=Qe.parse(e);if(r.length>5)return s;const o=Qe.createTransformer(e),i=typeof r[0]!="number"?1:0,u=n.x.scale*t.x,l=n.y.scale*t.y;r[0+i]/=u,r[1+i]/=l;const d=Jt(u,l,.5);return typeof r[2+i]=="number"&&(r[2+i]/=d),typeof r[3+i]=="number"&&(r[3+i]/=d),o(r)}},Gp={borderRadius:{...en,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:en,borderTopRightRadius:en,borderBottomLeftRadius:en,borderBottomRightRadius:en,boxShadow:jp};function ji(e,{layout:t,layoutId:n}){return kt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Gp[e]||e==="opacity")}function Pr(e,t,n){var i;const s=e.style,r=t==null?void 0:t.style,o={};if(!s)return o;for(const u in s)(me(s[u])||r&&me(r[u])||ji(u,e)||((i=n==null?void 0:n.getValue(u))==null?void 0:i.liveStyle)!==void 0)&&(o[u]=s[u]);return o}function Kp(e){return window.getComputedStyle(e)}class Yp extends $i{constructor(){super(...arguments),this.type="html",this.renderInstance=Hi}readValueFromInstance(t,n){var s;if(kt.has(n))return(s=this.projection)!=null&&s.isProjecting?wr(n):bf(t,n);{const r=Kp(t),o=(Bo(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return zp(t,n)}build(t,n,s){kr(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return Pr(t,n,s)}}const Xp={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zp={offset:"strokeDashoffset",array:"strokeDasharray"};function Jp(e,t,n=1,s=0,r=!0){e.pathLength=1;const o=r?Xp:Zp;e[o.offset]=`${-s}`,e[o.array]=`${t} ${n}`}const Qp=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Gi(e,{attrX:t,attrY:n,attrScale:s,pathLength:r,pathSpacing:o=1,pathOffset:i=0,...u},l,d,c){if(kr(e,u,d),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:w,style:f}=e;w.transform&&(f.transform=w.transform,delete w.transform),(f.transform||w.transformOrigin)&&(f.transformOrigin=w.transformOrigin??"50% 50%",delete w.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete w.transformBox);for(const m of Qp)w[m]!==void 0&&(f[m]=w[m],delete w[m]);t!==void 0&&(w.x=t),n!==void 0&&(w.y=n),s!==void 0&&(w.scale=s),r!==void 0&&Jp(w,r,o,i,!1)}const Ki=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Yi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Rp(e,t,n,s){Hi(e,t,void 0,s);for(const r in t.attrs)e.setAttribute(Ki.has(r)?r:Nr(r),t.attrs[r])}function Xi(e,t,n){const s=Pr(e,t,n);for(const r in e)if(me(e[r])||me(t[r])){const o=Dt.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;s[o]=e[r]}return s}class eh extends $i{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Li}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(kt.has(n)){const s=Ii(n);return s&&s.default||0}return n=Ki.has(n)?n:Nr(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return Xi(t,n,s)}build(t,n,s){Gi(t,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,n,s,r){Rp(t,n,s,r)}mount(t){this.isSVGTag=Yi(t.tagName),super.mount(t)}}const th=Ar.length;function Zi(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Zi(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<th;n++){const s=Ar[n],r=e.props[s];(Rt(r)||r===!1)&&(t[s]=r)}return t}function Ji(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}const nh=[...Ir].reverse(),sh=Ir.length;function rh(e){return t=>Promise.all(t.map(({animation:n,options:s})=>lp(e,n,s)))}function ah(e){let t=rh(e),n=Qi(),s=!0;const r=l=>(d,c)=>{var f;const w=Pt(e,c,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(w){const{transition:m,transitionEnd:g,...b}=w;d={...d,...b,...g}}return d};function o(l){t=l(e)}function i(l){const{props:d}=e,c=Zi(e.parent)||{},w=[],f=new Set;let m={},g=1/0;for(let x=0;x<sh;x++){const S=nh[x],v=n[S],T=d[S]!==void 0?d[S]:c[S],N=Rt(T),C=S===l?v.isActive:null;C===!1&&(g=x);let D=T===c[S]&&T!==d[S]&&N;if(D&&s&&e.manuallyAnimateOnMount&&(D=!1),v.protectedKeys={...m},!v.isActive&&C===null||!T&&!v.prevProp||zn(T)||typeof T=="boolean")continue;if(S==="exit"&&v.isActive&&C!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const M=oh(v.prevProp,T);let I=M||S===l&&v.isActive&&!D&&N||x>g&&N,k=!1;const F=Array.isArray(T)?T:[T];let P=F.reduce(r(S),{});C===!1&&(P={});const{prevResolvedValues:A={}}=v,V={...A,...P},W=B=>{I=!0,f.has(B)&&(k=!0,f.delete(B)),v.needsAnimating[B]=!0;const U=e.getValue(B);U&&(U.liveStyle=!1)};for(const B in V){const U=P[B],$=A[B];if(m.hasOwnProperty(B))continue;let H=!1;vr(U)&&vr($)?H=!Ji(U,$):H=U!==$,H?U!=null?W(B):f.add(B):U!==void 0&&f.has(B)?W(B):v.protectedKeys[B]=!0}v.prevProp=T,v.prevResolvedValues=P,v.isActive&&(m={...m,...P}),s&&e.blockInitialAnimation&&(I=!1);const _=D&&M;I&&(!_||k)&&w.push(...F.map(B=>{const U={type:S};if(typeof B=="string"&&s&&!_&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,H=Pt($,B);if($.enteringChildren&&H){const{delayChildren:pe}=H.transition||{};U.delay=hi($.enteringChildren,e,pe)}}return{animation:B,options:U}}))}if(f.size){const x={};if(typeof d.initial!="boolean"){const S=Pt(e,Array.isArray(d.initial)?d.initial[0]:d.initial);S&&S.transition&&(x.transition=S.transition)}f.forEach(S=>{const v=e.getBaseTarget(S),T=e.getValue(S);T&&(T.liveStyle=!0),x[S]=v??null}),w.push({animation:x})}let b=!!w.length;return s&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),s=!1,b?t(w):Promise.resolve()}function u(l,d){var w;if(n[l].isActive===d)return Promise.resolve();(w=e.variantChildren)==null||w.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(l,d)}),n[l].isActive=d;const c=i(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:i,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Qi()}}}function oh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ji(t,e):!1}function pt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qi(){return{animate:pt(!0),whileInView:pt(),whileHover:pt(),whileTap:pt(),whileDrag:pt(),whileFocus:pt(),exit:pt()}}function Ri(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function ih(e){return me(e)?e.get():e}const _r=h.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function eu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uh(...e){return t=>{let n=!1;const s=e.map(r=>{const o=eu(r,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<s.length;r++){const o=s[r];typeof o=="function"?o():eu(e[r],null)}}}}function lh(...e){return y.useCallback(uh(...e),e)}class ch extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const s=n.offsetParent,r=Er(s)&&s.offsetWidth||0,o=Er(s)&&s.offsetHeight||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=r-i.width-i.left,i.bottom=o-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function dh({children:e,isPresent:t,anchorX:n,anchorY:s,root:r,pop:o}){var f;const i=h.useId(),u=h.useRef(null),l=h.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=h.useContext(_r),c=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),w=lh(u,c);return h.useInsertionEffect(()=>{const{width:m,height:g,top:b,left:x,right:S,bottom:v}=l.current;if(t||o===!1||!u.current||!m||!g)return;const T=n==="left"?`left: ${x}`:`right: ${S}`,N=s==="bottom"?`bottom: ${v}`:`top: ${b}`;u.current.dataset.motionPopId=i;const C=document.createElement("style");d&&(C.nonce=d);const D=r??document.head;return D.appendChild(C),C.sheet&&C.sheet.insertRule(`
|
|
4
|
+
focus-visible:wu-bg-opacity-[.04] focus-visible:wu-ring-0 focus-visible:wu-outline-none focus-visible:wu-ring-offset-0`,rel:"noreferrer",children:a.jsx(za,{item:r,dir:t})})},s))})})},za=({item:e,dir:t})=>a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-[5px]",dir:t,children:[a.jsx("div",{className:"wu-flex wu-items-center wu-justify-center wu-w-6 wu-h-6",children:a.jsx("span",{className:p("wu-text-xl wu-text-gray-lead",e.icon)})}),a.jsx("p",{className:"wu-text-sm wu-text-gray-lead",children:e.title})]}),Ed=e=>{const[t,n]=h.useState(()=>window.innerWidth<=e);return h.useEffect(()=>{const r=()=>{n(window.innerWidth<=e)};return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r)}},[e]),t};function Md({productCategories:e,openCategory:t,setOpenCategory:n}){const r=(u,l)=>{const d=l[u];if(d){d.focus();const c=e[u]||null;n(c)}},s=(u,l,d,c)=>{u.preventDefault();const w=d==="down"?l+1:l-1;r(w,c)},o=(u,l,d,c)=>{t!=null&&t.products&&t.products[t.products.length-1].name===c&&(u.preventDefault(),r(l+1,d))},i=(u,l)=>{u.preventDefault();const d=e[l]===t?null:e[l];n(d)};return function(l,d,c){const w=document.querySelectorAll("[data-product-category]"),{key:f}=l;switch(f){case"ArrowDown":s(l,d,"down",w);break;case"ArrowUp":s(l,d,"up",w);break;case"Tab":o(l,d,w,c);break;case"Enter":case" ":i(l,d);break}}}const Id=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={sm:"wu-text-body-3",md:"wu-text-body-2",lg:"wu-text-body-1"},i=e.as||"div";return a.jsx(i,{...s,className:p(o[t],n),children:r})},Dd=e=>{const{size:t="xl",className:n,children:r,...s}=e,o={sm:"h4",md:"h3",lg:"h2",xl:"h1"},i={sm:"wu-text-heading-4",md:"wu-text-heading-3",lg:"wu-text-heading-2",xl:"wu-text-heading-1"},u=o[t];return a.jsx(u,{...s,className:p(i[t],n),children:r})},Ad=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={sm:"wu-text-sub-3",md:"wu-text-sub-2",lg:"wu-text-sub-1"},i=e.as||"div";return a.jsx(i,{...s,className:p(o[t],n),children:r})},kd=e=>{const{size:t="lg",className:n,children:r,...s}=e,o={md:"wu-text-display-2",lg:"wu-text-display-1"},i=e.as||"h1";return a.jsx(i,{...s,className:p(o[t],n),children:r})},De=e=>{const{icon:t,className:n,...r}=e;return a.jsx("span",{...r,className:p(t,n),role:"presentation","aria-label":t})},Pd=({buttonRef:e,handleDropdownToggle:t,handleKeyDown:n,isDropdownOpen:r,activeProductName:s,dir:o="ltr",homeLink:i="/"})=>a.jsxs("button",{ref:e,type:"button",className:p("wu-text-base wu-font-normal wu-flex wu-items-center wu-justify-between wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger"),onClick:t,onKeyDown:u=>{r&&u.key==="ArrowDown"&&n(u,-1)},"aria-label":"product-switcher",children:[a.jsx("a",{className:"wu-pl-2 wu-pr-0 wu-aspect-auto focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-logo",tabIndex:-1,href:i,children:a.jsx(De,{icon:"wc-logo",className:"wu-text-xl wu-leading-4 wu-relative wu-top-1"})}),s,a.jsx("span",{className:p("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",r&&"wu-rotate-180",o==="rtl"?"wu-mr-auto":"wu-ml-auto")})]}),re={productDropdownMenu:"_productDropdownMenu_amyba_1",productDropdownMenuOpen:"_productDropdownMenuOpen_amyba_38",rtlDropdownMenu:"_rtlDropdownMenu_amyba_51",productCategory:"_productCategory_amyba_55",open:"_open_amyba_61",productCategoryBorderTop:"_productCategoryBorderTop_amyba_66",productList:"_productList_amyba_93",rtlProductList:"_rtlProductList_amyba_114",productListItem:"_productListItem_amyba_137",productLink:"_productLink_amyba_162",activeProduct:"_activeProduct_amyba_164",topBorder:"_topBorder_amyba_169",topBorderRtl:"_topBorderRtl_amyba_190"},_d=({category:e,dir:t="ltr",openCategory:n})=>{const r=e.active?"#c5cce0":"#f0c36a",s=(n==null?void 0:n.name)===e.name,o=p("wm-arrow-forward-ios wu-text-xs wu-tracking-widest wu-text-muted-foreground wu-mr-2.5 group-hover:wu-hidden wu-text-blue-q",t==="rtl"&&"wu-rotate-180 wu-ml-2.5 wu-text-blue-q group-hover:wu-hidden",s&&"wu-hidden","wu-relative wu-top-[5px]"),i=p("wm-lock wu-text-orange-soft wu-text-base wu-mr-2.5 group-hover:wu-hidden",t==="rtl"&&"wu-ml-2.5 group-hover:wu-hidden",s&&"wu-hidden","wu-relative wu-top-1");return a.jsxs("div",{className:p("group focus:wu-outline-none focus-visible:wu-outline-none wu-flex wu-items-center wu-w-full wu-bg-white wu-relative wu-justify-between"),dir:t,children:[a.jsx("div",{className:re.productCategoryBorderTop,style:{backgroundColor:r}}),a.jsxs("div",{className:"wu-flex wu-items-center wu-px-1 wu-relative wu-top-1",children:[a.jsx("div",{className:"wu-w-[56px] wu-h-[56px] wu-flex wu-items-center wu-justify-center",children:a.jsx("img",{src:e.logo,alt:e.name,width:"32px",height:"32px"})}),a.jsx("span",{className:"wu-text-sm wu-leading-5 wu-text-blue-q wu-relative wu-top-[1px]",children:e.name})]}),e.active?a.jsx("span",{className:o}):a.jsx("span",{className:i})]})},Vd={e309:"wp-audience",e381:"wp-bi",e329:"wp-closed-loop",e314:"wp-communities",e313:"wp-cx",e352:"wp-digsite",e324:"wp-empower",e317:"wp-insightshub",e380:"wp-instant-answers",e378:"wp-intercept",e311:"wp-livepolls",e316:"wp-reputation",e379:"wp-suite-cx",e382:"wp-suite-cx",e308:"wp-surveys",e315:"wp-workforce"},Od=({product:e,currentProduct:t,activeProductName:n,dir:r,focusItem:s,setFocusItem:o})=>{const[i,u]=h.useState(e.name===t),l=e.name===n,d=e.name===t,c=!e.active,w="#1b3380",f="#c5cce0",m="#ffcf70",g=p("wu-font-normal wu-text-xs wu-text-gray-lead wu-text-center",d&&"wu-text-blue-q wu-font-normal",!e.active&&"wu-text-gray-subtle",i&&"wu-font-normal",e.active&&i&&"wu-text-blue-q"),b=p("wu-text-blue-p wu-text-base",d&&"wu-text-blue-q",!e.active&&"wu-text-gray-subtle",e.active&&i&&"wu-text-blue-q"),v=i||s===e.name||l?w:f;return a.jsxs("li",{className:p(re.productListItem,"focus-visible:wu-outline-none focus:wu-outline-none wu-sub-product-list-item",(l||i)&&re.activeProduct,e.name.length>15&&window.innerWidth>768&&"wu-w-[130px] wu-min-w-[130px]",s===e.name&&re.activeProduct,"wu-product-item"),onMouseOver:()=>u(!0),onMouseOut:()=>u(!1),"aria-label":e.name,"aria-disabled":c,dir:r,onKeyDown:S=>{if(S.key==="Enter"){S.preventDefault();const N=S.currentTarget.querySelector("a");N&&N.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(""),children:[a.jsx("div",{className:p(re.topBorder,r==="rtl"&&re.topBorderRtl),style:{backgroundColor:c?m:v}}),a.jsxs("a",{className:p(re.productLink,"focus:wu-outline-none focus-visible:wu-outline-none"),href:e.link||"#",tabIndex:0,children:[a.jsx("span",{className:p(b,Vd[e.icon||""]),"aria-hidden":!0}),a.jsx("span",{className:p(g),children:e.name})]})]},e.name)},Fd=({category:e,currentProduct:t,activeProductName:n,dir:r="ltr",focusItem:s,setFocusItem:o,borderColorLocked:i="#f5a300"})=>{const{products:u=[],active:l}=e,d=h.useMemo(()=>u.filter(g=>g.active).sort((g,b)=>(g.order||100)-(b.order||100)),[u]),c=h.useMemo(()=>u.filter(g=>!g.active),[u]),[w,f]=h.useState(i),m=g=>g.map((b,v)=>a.jsx(Od,{product:b,currentProduct:t,activeProductName:n,dir:r,focusItem:s,setFocusItem:o},v));return l?a.jsxs(a.Fragment,{children:[m(d),c.length>0&&a.jsxs("li",{className:p(re.productListItem,"focus:wu-outline-none focus-visible:wu-outline-none !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee] wu-group"),onMouseOver:()=>f("#f5a300"),onMouseOut:()=>f(i),"aria-label":"Upgrade to unlock",children:[a.jsx("div",{className:p(re.topBorder,r==="rtl"&&re.topBorderRtl),style:{backgroundColor:w},"aria-label":"top-border"}),a.jsxs("a",{href:"https://www.questionpro.com/a/showUpgradeUser.do",className:p(re.productLink,"wu-flex wu-flex-col wu-items-center wu-justify-center wu-py-2 wu-min-w-[88px]"),children:[a.jsx("span",{className:"wu-text-base wu-transition-colors wm-lock !wu-text-orange-soft group-hover:wu-text-orange-deep"}),a.jsxs("span",{className:"wu-text-[10px] wu-leading-[10px] wu-text-center wu-pt-1 !wu-text-orange-deep",children:["Upgrade to ",a.jsx("br",{})," unlock"]})]})]}),m(c)]}):a.jsxs("li",{className:p(re.productListItem,re.learnMore,"focus:wu-outline-none focus-visible:wu-outline-none wu-product-item-inactive !wu-bg-[#f5f5f5] hover:!wu-bg-[#eeeeee]",s==="learn"&&"activeProduct"),tabIndex:0,onFocus:()=>o("learn"),onBlur:()=>o(""),"aria-label":"Learn More",children:[a.jsx("div",{className:p(re.topBorder,r==="rtl"&&re.topBorderRtl),style:{backgroundColor:i}}),a.jsx("a",{className:re.productLink,href:"https://www.questionpro.com/a/showUpgradeUser.do",tabIndex:-1,children:a.jsx("span",{className:"wu-text-[#f99e03]",children:"Learn More"})})]})},Ha=({dropdownRef:e,dir:t,isDropdownOpen:n,productCategories:r,openCategory:s,setOpenCategory:o,handleKeyDown:i,expandAll:u,activeProductName:l,focusItem:d,setFocusItem:c})=>{const w="#ffcf70",[f,m]=h.useState(window.innerWidth>768);return h.useEffect(()=>{const g=()=>{m(window.innerWidth>375)};return window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[]),a.jsx("ul",{className:p(re.productDropdownMenu,n&&re.productDropdownMenuOpen,t==="rtl"&&re.rtlDropdownMenu,"wu-switcher-container"),ref:e,dir:t,"aria-label":"product-dropdown-menu","data-state":n?"open":"closed",children:r.map((g,b)=>a.jsxs("li",{className:p(re.productCategory,"focus:wu-outline-none focus-visible:wu-outline-none wu-h-16 wu-category-item",s===g&&re.open,u&&re.open),onMouseEnter:()=>f&&o(g),onMouseLeave:()=>f&&o(null),"aria-label":g.name,dir:t,onKeyDown:v=>i(v,b),tabIndex:0,"data-product-category":!0,children:[a.jsx(_d,{category:g,dir:t,openCategory:s}),a.jsx("ul",{className:p(re.productList,t==="rtl"&&re.rtlProductList),dir:t,children:a.jsx(Fd,{category:g,dir:t,activeProductName:l,currentProduct:g.name,focusItem:d,setFocusItem:c,borderColorLocked:w})})]},g.name))})},Ld=({isProductButtonShow:e,isDropdownOpen:t,activeProductColor:n,activeProductBgColor:r,activeProductName:s,dir:o,smallScreenButtonRef:i,handleDropdownToggle:u,handleKeyDown:l})=>a.jsx("div",{className:p("wu-absolute wu-top-11 wu-transition-all wu-duration-300 wu-ease-in-out wu-transform wu-opacity-100 wu-w-[256px] wu-z-10",e?o==="rtl"?"wu-right-0 wu-overflow-hidden":"wu-translate-x-0 wu-left-0":o==="rtl"?"wu-right-0 wu-w-0":"wu--translate-x-full"),style:{backgroundColor:t?n.hover:r},children:a.jsxs("button",{ref:i,type:"button",className:p("wu-text-base wu-leading-[48px] wu-flex wu-items-center wu-justify-center wu-px-2 wu-gap-2 wu-w-full focus:wu-outline-none focus-visible:wu-bg-white/10 wu-switcher-trigger",e?"wu-flex":o==="rtl"?"wu-hidden":"wu-flex"),onClick:u,onKeyDown:d=>{t&&d.key==="ArrowDown"&&l(d,-1)},"aria-label":"small-screen-product-btn",children:[s,a.jsx("span",{className:p("wm-arrow-drop-down wu-text-2xl wu-transition-transform wu-duration-300",t&&"wu-rotate-180")})]})}),Wd=({dir:e,isProductButtonShow:t,smallScreenToggleButtonRef:n,setIsProductButtonShow:r,setDropdownOpen:s})=>{const o=()=>{r(i=>!i),t&&s(!1)};return a.jsxs("button",{className:p("wu-relative wu-w-10 wu-h-10 wu-flex wu-flex-col wu-justify-center wu-items-center",e==="rtl"?"wu-mr-4":"wu-ml-4"),onClick:o,ref:n,"aria-label":"menu-toggle-btn",children:[a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"wu-rotate-45 wu-translate-y-0":"-wu-translate-y-2.5"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-opacity wu-duration-300 ${t?"wu-opacity-0":"wu-opacity-100"}`}),a.jsx("span",{className:`wu-absolute wu-w-6 wu-h-[3px] wu-bg-white wu-transition-transform wu-duration-300 ${t?"-wu-rotate-45 wu-translate-y-0":"wu-translate-y-2.5"}`})]})},Ua=({productCategories:e,activeProductName:t,activeProductColor:n={base:"#1b87e6",hover:"#54A5EC"},dir:r,homeLink:s,expandAll:o})=>{const i=h.useRef(null),u=h.useRef(null),l=h.useRef(null),d=h.useRef(null),[c,w]=h.useState(!1),[f,m]=h.useState(null),[g,b]=h.useState(n.base),[v,S]=h.useState(""),[N,C]=h.useState(!1),x=Ed(768);kr([u,i],()=>{w(!1),m(null)}),kr([l,d,u],()=>{C(!1),w(!1),m(null)}),h.useEffect(()=>{const A=M=>{M.key==="Escape"&&w(!1)};return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A)}},[c]),h.useEffect(()=>b(n.base),[n.base]);const T=A=>{A.preventDefault(),A.stopPropagation(),w(M=>{const D=!M;return D||m(null),D})},k=(A,M)=>{Md({productCategories:e,openCategory:f,setOpenCategory:m})(A,M,v)};return a.jsx("div",{className:p("wu-inline-flex wu-items-center wu-justify-between wu-relative wu-z-auto wu-h-12 wu-text-white"),children:x?a.jsxs("div",{className:"wu-relative wu-flex",children:[a.jsx(Wd,{dir:r,isProductButtonShow:N,smallScreenToggleButtonRef:d,setDropdownOpen:w,setIsProductButtonShow:C}),a.jsx(Ld,{isProductButtonShow:N,isDropdownOpen:c,activeProductColor:n,activeProductBgColor:g,activeProductName:t,handleDropdownToggle:T,smallScreenButtonRef:l,handleKeyDown:k,dir:r}),a.jsx("div",{className:p("wu-absolute wu-top-[92px] wu-left-0 wu-text-[18px]",r==="rtl"&&"wu-right-[256px] wu-left-auto"),children:a.jsx(Ha,{activeProductName:t,focusItem:v,setFocusItem:S,handleKeyDown:k,isDropdownOpen:c,openCategory:f,productCategories:e,setOpenCategory:m,dropdownRef:u,expandAll:o,dir:r})})]}):a.jsxs("div",{className:"wu-relative wu-flex wu-items-center wu-justify-start wu-h-full wu-w-[256px]",dir:r,style:{backgroundColor:c?n.hover:g},onMouseOver:()=>b(n.hover),onMouseOut:()=>b(n.base),children:[a.jsx(Pd,{activeProductName:t,dir:r,homeLink:s,buttonRef:i,handleDropdownToggle:T,handleKeyDown:k,isDropdownOpen:c}),a.jsx(Ha,{activeProductName:t,focusItem:v,setFocusItem:S,handleKeyDown:k,isDropdownOpen:c,openCategory:f,productCategories:e,setOpenCategory:m,dropdownRef:u,expandAll:o,dir:r})]})})},ja=({children:e,dir:t,className:n})=>a.jsx("section",{className:p("wu-flex wu-items-center wu-flex-1 wu-min-w-0 wu-h-12 wu-gap-2 wu-px-2",t==="rtl"&&"wu-flex-row-reverse",n),children:a.jsx("div",{className:"wu-grow",children:e})}),Ga={};function Je(e,t){const n=y.useRef(Ga);return n.current===Ga&&(n.current=e(t)),n}const Vr=y[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Bd=Vr&&Vr!==y.useLayoutEffect?Vr:e=>e();function he(e){const t=Je(qd).current;return t.next=e,Bd(t.effect),t.trampoline}function qd(){const e={next:void 0,callback:$d,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function $d(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}function zt(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function Ae(){}const ze=Object.freeze({});let Ka=(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 zd={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},Or={valid(e){return e===null?null:e?{[Ka.valid]:""}:{[Ka.invalid]:""}}},Ya=y.createContext({invalid:void 0,name:void 0,validityData:{state:zd,errors:[],error:"",value:"",initialValue:null},setValidityData:Ae,disabled:void 0,touched:!1,setTouched:Ae,dirty:!1,setDirty:Ae,filled:!1,setFilled:Ae,focused:!1,setFocused:Ae,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=ze)=>e,getInputValidationProps:(e=ze)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(Ya.displayName="FieldRootContext");function Mn(e=!0){const t=y.useContext(Ya);if(t.setValidityData===Ae&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":zt(28));return t}const Xa=y.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Ae,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Xa.displayName="FormContext");function Za(){return y.useContext(Xa)}function Fr(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Ht={};function Ja(e,t,n,r,s){let o={...Lr(e,Ht)};return t&&(o=In(o,t)),n&&(o=In(o,n)),r&&(o=In(o,r)),o}function Hd(e){if(e.length===0)return Ht;if(e.length===1)return Lr(e[0],Ht);let t={...Lr(e[0],Ht)};for(let n=1;n<e.length;n+=1)t=In(t,e[n]);return t}function In(e,t){return Qa(t)?t(e):Ud(e,t)}function Ud(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Fr(e.style,r);break}case"className":{e[n]=Ra(e.className,r);break}default:jd(n,r)?e[n]=Gd(e[n],r):e[n]=r}}return e}function jd(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function Qa(e){return typeof e=="function"}function Lr(e,t){return Qa(e)?e(t):e??Ht}function Gd(e,t){return t?e?n=>{if(Kd(n)){const s=n;Wr(s);const o=t(s);return s.baseUIHandlerPrevented||e==null||e(s),o}const r=t(n);return e==null||e(n),r}:t:e}function Wr(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Ra(e,t){return t?e?t+" "+e:t:e}function Kd(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}const lt={...y};let eo=0;function Yd(e,t="mui"){const[n,r]=y.useState(e),s=e||n;return y.useEffect(()=>{n==null&&(eo+=1,r(`${t}-${eo}`))},[n,t]),s}const to=lt.useId;function Xd(e,t){if(to!==void 0){const n=to();return e??(t?`${t}-${n}`:n)}return Yd(e,t)}function no(e){return Xd(e,"base-ui")}const ro=y.createContext({controlId:void 0,registerControlId:Ae,labelId:void 0,setLabelId:Ae,messageIds:[],setMessageIds:Ae,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(ro.displayName="LabelableContext");function Br(){return y.useContext(ro)}function Dn(e,t,n,r){const s=Je(so).current;return Jd(s,e,t,n,r)&&ao(s,[e,t,n,r]),s.callback}function Zd(e){const t=Je(so).current;return Qd(t,e)&&ao(t,e),t.callback}function so(){return{callback:null,cleanup:null,refs:[]}}function Jd(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function Qd(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function ao(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 r=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const o=t[s];if(o!=null)switch(typeof o){case"function":{const i=o(n);typeof i=="function"&&(r[s]=i);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const o=t[s];if(o!=null)switch(typeof o){case"function":{const i=r[s];typeof i=="function"?i():o(null);break}case"object":{o.current=null;break}}}}}}}const Rd=parseInt(y.version,10);function ew(e){return Rd>=e}function oo(e){if(!y.isValidElement(e))return null;const t=e,n=t.props;return(ew(19)?n==null?void 0:n.ref:t.ref)??null}function tw(e,t){const n={};for(const r in e){const s=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](s);o!=null&&Object.assign(n,o);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function nw(e,t){return typeof e=="function"?e(t):e}function rw(e,t){return typeof e=="function"?e(t):e}function Ge(e,t,n={}){const r=t.render,s=sw(t,n);if(n.enabled===!1)return null;const o=n.state??ze;return ow(e,r,s,o)}function sw(e,t={}){const{className:n,style:r,render:s}=e,{state:o=ze,ref:i,props:u,stateAttributesMapping:l,enabled:d=!0}=t,c=d?nw(n,o):void 0,w=d?rw(r,o):void 0,f=d?tw(o,l):ze,m=d?Fr(f,Array.isArray(u)?Hd(u):u)??ze:ze;return typeof document<"u"&&(d?Array.isArray(i)?m.ref=Zd([m.ref,oo(s),...i]):m.ref=Dn(m.ref,oo(s),i):Dn(null,null)),d?(c!==void 0&&(m.className=Ra(m.className,c)),w!==void 0&&(m.style=Fr(m.style,w)),m):ze}const aw=Symbol.for("react.lazy");function ow(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=Ja(n,t.props);s.ref=n.ref;let o=t;if((o==null?void 0:o.$$typeof)===aw&&(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(`
|
|
5
|
+
`));return y.cloneElement(o,s)}if(e&&typeof e=="string")return iw(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":zt(8))}function iw(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)}const uw=[];function An(e){y.useEffect(e,uw)}const Ut=0;class kn{constructor(){Se(this,"currentId",Ut);Se(this,"clear",()=>{this.currentId!==Ut&&(clearTimeout(this.currentId),this.currentId=Ut)});Se(this,"disposeEffect",()=>this.clear)}static create(){return new kn}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ut,n()},t)}isStarted(){return this.currentId!==Ut}}function io(){const e=Je(kn.create).current;return An(e.disposeEffect),e}function lw(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}let qr;process.env.NODE_ENV!=="production"&&(qr=new Set);function uo(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");qr.has(t)||(qr.add(t),console.error(`Base UI: ${t}`))}}function lo(){return typeof window<"u"}function $r(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function cw(e){return lo()?e instanceof Element||e instanceof $r(e).Element:!1}function dw(e){return lo()?e instanceof HTMLElement||e instanceof $r(e).HTMLElement:!1}const te=typeof document<"u"?y.useLayoutEffect:()=>{};function co(e){return(e==null?void 0:e.ownerDocument)||document}const Pn=typeof navigator<"u",zr=hw(),ww=gw(),fw=mw();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");const pw=zr.platform==="MacIntel"&&zr.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(zr.platform);Pn&&ww.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints,fw.includes("jsdom/");function hw(){if(!Pn)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 mw(){if(!Pn)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function gw(){if(!Pn)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function bw(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function yw(e){e.preventDefault(),e.stopPropagation()}const _n=null;let wo=globalThis.requestAnimationFrame;class vw{constructor(){Se(this,"callbacks",[]);Se(this,"callbacksCount",0);Se(this,"nextId",1);Se(this,"startId",1);Se(this,"isScheduled",!1);Se(this,"tick",t=>{var s;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(s=n[o])==null||s.call(n,t)})}request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&wo!==requestAnimationFrame&&(wo=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(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 Vn=new vw;class oe{constructor(){Se(this,"currentId",_n);Se(this,"cancel",()=>{this.currentId!==_n&&(Vn.cancel(this.currentId),this.currentId=_n)});Se(this,"disposeEffect",()=>this.cancel)}static create(){return new oe}static request(t){return Vn.request(t)}static cancel(t){return Vn.cancel(t)}request(t){this.cancel(),this.currentId=Vn.request(()=>{this.currentId=_n,t()})}}function fo(){const e=Je(oe.create).current;return An(e.disposeEffect),e}function xw(e){return e==null?e:"current"in e?e.current:e}let jt=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Nw={[jt.startingStyle]:""},Sw={[jt.endingStyle]:""},po={transitionStatus(e){return e==="starting"?Nw:e==="ending"?Sw:null}};function ho(e,t=!1,n=!0){const r=fo();return he((s,o=null)=>{r.cancel();function i(){Va.flushSync(s)}const u=xw(e);if(u==null)return;const l=u;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)s();else{let d=function(){const w=jt.startingStyle;if(!l.hasAttribute(w)){r.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}r.request(c)}})}function Cw(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,o=he(s),i=ho(r,n,!1);y.useEffect(()=>{if(!t)return;const u=new AbortController;return i(o,u.signal),()=>{u.abort()}},[t,n,o,i])}function Tw(e,t=!1,n=!1){const[r,s]=y.useState(e&&t?"idle":void 0),[o,i]=y.useState(e);return e&&!o&&(i(!0),s("starting")),!e&&o&&r!=="ending"&&!n&&s("ending"),!e&&!o&&r==="ending"&&s(void 0),te(()=>{if(!e&&o&&r!=="ending"&&n){const u=oe.request(()=>{s("ending")});return()=>{oe.cancel(u)}}},[e,o,r,n]),te(()=>{if(!e||t)return;const u=oe.request(()=>{s(void 0)});return()=>{oe.cancel(u)}},[t,e]),te(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&s("starting");const u=oe.request(()=>{s("idle")});return()=>{oe.cancel(u)}},[t,e,o,s,r]),y.useMemo(()=>({mounted:o,setMounted:i,transitionStatus:r}),[o,r])}function Hr({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=y.useRef(e!==void 0),[o,i]=y.useState(t),u=s?e:o;if(process.env.NODE_ENV!=="production"){y.useEffect(()=>{s!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${s?"":"un"}controlled ${r} state of ${n} to be ${s?"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(`
|
|
6
|
+
`))},[r,n,e]);const{current:d}=y.useRef(t);y.useEffect(()=>{!s&&JSON.stringify(d)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
|
|
7
|
+
`))},[JSON.stringify(t)])}const l=y.useCallback(d=>{s||i(d)},[]);return[u,l]}function mo(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:o}=Br(),i=no(t),u=n?s:void 0,l=Je(()=>Symbol("labelable-control")),d=y.useRef(!1),c=y.useRef(t!=null),w=he(()=>{!d.current||o===Ae||(d.current=!1,o(l.current,void 0))});return te(()=>{if(o===Ae)return;let f;if(n){const m=r==null?void 0:r.current;cw(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,r,u,o,n,i,l,w]),y.useEffect(()=>w,[w]),s??i}function go(e){const{enabled:t=!0,value:n,id:r,name:s,controlRef:o,commit:i}=e,{formRef:u}=Za(),{invalid:l,markedDirtyRef:d,validityData:c,setValidityData:w}=Mn(),f=he(e.getValue);te(()=>{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]),te(()=>{!t||!r||u.current.fields.set(r,{getValue:f,name:s,controlRef:o,validityData:lw(c,l),validate(m=!0){let g=n;g===void 0&&(g=f()),d.current=!0,m?Va.flushSync(()=>i(g)):i(g)}})},[i,o,t,u,f,r,l,d,s,c,n]),te(()=>{const m=u.current.fields;return()=>{r&&m.delete(r)}},[u,r])}const Gt="none",Ew="trigger-press",Ur="input-change",Kt="input-clear",On="input-blur",jr="input-paste",Yt="keyboard";function Ee(e,t,n,r){let s=!1,o=!1;const i=r??ze;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){o=!0},get isCanceled(){return s},get isPropagationAllowed(){return o},trigger:n,...i}}function Xt(e,t,n){const r=ze;return{reason:e,event:t??new Event("base-ui"),...r}}const bo=y.forwardRef(function(t,n){const{render:r,className:s,id:o,name:i,value:u,disabled:l=!1,onValueChange:d,defaultValue:c,autoFocus:w=!1,...f}=t,{state:m,name:g,disabled:b,setTouched:v,setDirty:S,validityData:N,setFocused:C,setFilled:x,validationMode:T,validation:k}=Mn(),A=b||l,M=g??i,D={...m,disabled:A},{labelId:V}=Br(),P=mo({id:o});te(()=>{var z;const F=u!=null;(z=k.inputRef.current)!=null&&z.value||F&&u!==""?x(!0):F&&u===""&&x(!1)},[k.inputRef,x,u]);const I=y.useRef(null);te(()=>{w&&I.current===bw(co(I.current))&&C(!0)},[w,C]);const[_]=Hr({controlled:u,default:c,name:"FieldControl",state:"value"}),L=u!==void 0,O=L?_:void 0;return go({id:P,name:M,commit:k.commit,value:O,getValue:()=>{var F;return(F=k.inputRef.current)==null?void 0:F.value},controlRef:k.inputRef}),Ge("input",t,{ref:[n,I],state:D,props:[{id:P,disabled:A,name:M,ref:k.inputRef,"aria-labelledby":V,autoFocus:w,...L?{value:O}:{defaultValue:c},onChange(F){const z=F.currentTarget.value;d==null||d(z,Ee(Gt,F.nativeEvent)),S(z!==N.initialValue),x(z!=="")},onFocus(){C(!0)},onBlur(F){v(!0),C(!1),T==="onBlur"&&k.commit(F.currentTarget.value)},onKeyDown(F){F.currentTarget.tagName==="INPUT"&&F.key==="Enter"&&(v(!0),k.commit(F.currentTarget.value))}},k.getInputValidationProps(),f],stateAttributesMapping:Or})});process.env.NODE_ENV!=="production"&&(bo.displayName="FieldControl");const yo=y.forwardRef(function(t,n){return a.jsx(bo,{ref:n,...t})});process.env.NODE_ENV!=="production"&&(yo.displayName="Input");const Mw=e=>{const{message:t,className:n,...r}=e;return a.jsx("p",{...r,className:p("wu-text-sub-3 wu-break-words wu-font-light",n),style:{color:"rgb(var(--wu-red-deep))",...r.style},children:t})},Iw=e=>{var u,l;const{inputRef:t,maxLength:n=50,className:r,...s}=e,[o,i]=h.useState(!1);return h.useEffect(()=>{var d;(((d=t==null?void 0:t.current)==null?void 0:d.value.length)||0)>.75*n?i(!0):i(!1)},[(u=t==null?void 0:t.current)==null?void 0:u.value,n]),a.jsx("p",{...s,className:p("wu-text-sub-3 wu-font-light",r),style:{color:"rgb(var(--wu-gray-subtle))",...s.style},children:o&&`${(l=t==null?void 0:t.current)==null?void 0:l.value.length}/${n}`})},Dw=Oe.cva("wu-text-xs wu-font-normal wu-leading-none peer-disabled:wu-cursor-not-allowed peer-disabled:wu-text-gray-subtle peer-readonly:wu-text-gray-subtle peer-required:after:wu-content-['*'] peer-required:after:wu-ml-[2px] peer-required:after:wu-text-red-deep peer-aria-[required]:after:wu-content-['*'] peer-aria-[required]:after:wu-ml-[2px] peer-aria-[required]:after:wu-text-red-deep"),Fn=y.forwardRef(({className:e,...t},n)=>a.jsx(Oa.Root,{ref:n,className:p(Dw(),e),...t}));Fn.displayName=Oa.Root.displayName;const Me=e=>a.jsx(Fn,{...e,className:p("wu-text-gray-lead wu-leading-6",e.className)}),Aw=({Label:e,Error:t,Hint:n,Input:r,labelPosition:s="top",dir:o="ltr",className:i,...u})=>{const d=p("wu-flex",s==="top"?"wu-flex-col wu-gap-1":"wu-flex-row wu-items-center wu-gap-2",i),c=p("wu-flex wu-flex-col wu-gap-1 wu-relative wu-flex-1 wu-form-group-wrapper"),w=p("wu-absolute -wu-bottom-5",o==="ltr"?"wu-right-0":"wu-left-0","wu-form-group-hint"),f=p("wu-absolute -wu-bottom-5",o==="ltr"?"wu-left-0":"wu-right-0","wu-form-group-error");return a.jsxs("div",{className:d,dir:o,...u,children:[e,a.jsxs("div",{className:c,children:[r,n&&a.jsx("div",{className:w,children:n}),t&&a.jsx("div",{className:f,children:t})]})]})},Zt={wuInputGroup:"_wuInputGroup_wkb8f_1",wuInputIcon:"_wuInputIcon_wkb8f_20",wuInput:"_wuInput_wkb8f_1",passwordToggle:"_passwordToggle_wkb8f_89"},vo=h.memo(({showPassword:e,onToggle:t,disabled:n,readOnly:r})=>{const s=h.useCallback(i=>{if(n||r){i.preventDefault(),i.stopPropagation();return}t()},[n,r,t]),o=n||r;return a.jsx("button",{type:"button","data-slot":"wu-input-password-toggle",className:Zt.passwordToggle,onClick:s,disabled:o,"aria-disabled":o||void 0,"aria-label":e?"Hide password":"Show password",children:a.jsx(De,{icon:e?"wm-visibility":"wm-visibility-off"})})});vo.displayName="PasswordToggle";const Ke=h.memo(h.forwardRef(({className:e,Label:t,labelPosition:n="top",Icon:r,iconPosition:s="left",variant:o="flat",type:i,readonly:u,invalid:l,id:d,...c},w)=>{const f=h.useId(),m=d||f;if(i==="submit")return a.jsx(Te,{className:e,id:m,"aria-label":c["aria-label"],type:"submit","data-slot":"wu-input-submit",disabled:c.disabled,children:t||"Submit"});const[g,b]=h.useState(!1),v=h.useCallback(()=>{b(T=>!T)},[]),{finalIcon:S,finalIconPosition:N}=h.useMemo(()=>i==="password"?{finalIcon:a.jsx(vo,{showPassword:g,onToggle:v,readOnly:u,disabled:c.disabled}),finalIconPosition:"right"}:{finalIcon:r,finalIconPosition:s},[i,r,s,g,v]),C=h.useMemo(()=>i==="password"&&g?"text":i,[i,g]),x=h.useMemo(()=>p(Zt.wuInput,"wu-peer",e),[e]);return a.jsxs("div",{"data-slot":"wu-input-group",role:"group",className:Zt.wuInputGroup,"data-label-position":n,"data-icon-position":S&&N,children:[S&&a.jsx("span",{className:Zt.wuInputIcon,children:S}),a.jsx(yo,{ref:w,className:x,"data-variant":o,type:C,readOnly:u,"aria-invalid":l,id:m,...c}),t&&a.jsx(Me,{className:Zt.wuInputLabel,htmlFor:m,children:t})]})}));Ke.displayName="WuInput";const kw=({className:e,placeholder:t="Search surveys, folders or tools",defaultCollapsed:n=!0,onSearch:r,...s})=>{const[o,i]=h.useState(n);return h.useEffect(()=>{i(n)},[n]),a.jsx(Ke,{...s,placeholder:t,onChange:u=>r(u.target.value),className:p("wu-rounded-full focus-visible:wu-outline-2 focus-visible:wu-outline-blue-focus -wu-outline-offset-2 wu-bg-white","wu-transition-all wu-duration-300 wu-ease-in-out",o?"wu-w-8 wu-px-2 wu-text-lg wu-rounded-full wu-h-8 wu-border wu-border-white wu-bg-transparent":"wu-w-40 sm:wu-w-60",e),type:"search",Icon:a.jsx(De,{"data-testid":"search-icon",icon:"wm-search",className:p("wu-text-gray-lead wu-cursor-pointer",o&&"wu-text-white"),onClick:()=>i(u=>!u)})})},xo=qt.Provider,No=qt.Root,So=qt.Trigger,Gr=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(qt.Content,{ref:r,sideOffset:t,className:p("wu-z-50 wu-overflow-hidden wu-bg-gray-notification wu-text-white wu-px-3 wu-py-1.5 wu-text-sm wu-shadow-md",e),...n}));Gr.displayName=qt.Content.displayName;const Ln=h.forwardRef(({content:e,position:t,positionOffset:n,duration:r,children:s,className:o,showArrow:i=!1,open:u,onOpenChange:l,...d},c)=>a.jsx(xo,{delayDuration:r||200,children:a.jsxs(No,{open:u,onOpenChange:l,children:[a.jsx(So,{asChild:!0,children:a.jsx("span",{ref:c,children:s})}),a.jsx(vr.Portal,{children:e&&a.jsxs(Gr,{...d,side:t||"top",sideOffset:n||0,className:p("wu-max-w-sm wu-max-h-96 wu-overflow-y-auto",o),children:[e,i&&a.jsx(vr.Arrow,{className:"wu-fill-gray-notification wu-tooltip-arrow"})]})})]})}));Ln.displayName="WuTooltip";const Pw=({label:e,className:t})=>{const n=h.useRef(null),[r,s]=h.useState(!1);return h.useEffect(()=>{const o=n.current;if(o){const i=o.clientWidth,u=o.scrollWidth,l=u/e.length,d=e.length*l;s(d>i||u>i)}},[e]),a.jsx("p",{ref:n,className:p("wu-w-full wu-truncate",t),children:r?a.jsx(Ln,{content:e,positionOffset:8,children:e}):e})},_w=e=>{var w;const{productName:t,categories:n=[],user:r,children:s,onLogout:o,homeLink:i=window.location.origin,brandColor:u,dir:l="ltr",expandAll:d,DataCenter:c}=e;return a.jsx("div",{className:"wu-sticky wu-top-0 wu-z-50 wu-w-full",children:a.jsxs("header",{className:p("wu-h-12 wu-flex wu-items-center wu-justify-between wu-relative wu-bg-blue-switcher wu-text-white",l==="rtl"&&"wu-flex-row-reverse",e.className),style:e.style,children:[md((w=r==null?void 0:r.profile)==null?void 0:w.subtitle)&&window.wickUiVersion&&a.jsxs("p",{className:"wu-text-[10px] wu-text-gray-subtle wu-font-normal wu-absolute wu-top-11 wu-right-1 wu-z-[-1] wu-invisible","aria-label":"wickUiVersion",children:["Wick UI: v",window.wickUiVersion]}),a.jsx("section",{className:"wu-flex wu-items-center wu-gap-2 wu-shrink-0",children:a.jsx(Ua,{productCategories:n,activeProductName:t,activeProductColor:u,dir:l,homeLink:i,expandAll:d})}),a.jsx(ja,{dir:l,children:s}),a.jsxs("section",{className:p("wu-flex wu-items-center wu-justify-end wu-shrink-0 wu-gap-2",l==="rtl"?"wu-flex-row-reverse wu-pl-4":"wu-flex-row wu-pr-4"),children:[a.jsx($a,{dir:l}),(r==null?void 0:r.profile)&&Object.keys(r.profile).length>0&&a.jsx(qa,{user:r,onLogout:o,dir:l,DataCenter:c})]})]})})},He=Bt.Root,ct=Bt.Trigger,Fe=y.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},s)=>a.jsx(Bt.Portal,{children:a.jsx(Bt.Content,{ref:s,align:t,sideOffset:n,className:p("wu-z-50 wu-w-72 wu-border wu-bg-popover wu-p-4 wu-text-popover-foreground wu-shadow-md wu-outline-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...r})}));Fe.displayName=Bt.Content.displayName;function Co({className:e,classNames:t,dir:n="ltr",...r}){const s=Pa.getDefaultClassNames();return a.jsx(Pa.DayPicker,{showOutsideDays:r.showOutsideDays||!1,className:p("wu-p-3",e),classNames:{root:p(s.root,"wu-relative wu-rounded-none wu-bg-white dark:wu-bg-gray-switcher"),caption_label:p("wu-text-xs",r.captionLayout==="dropdown"?"wu-hidden":""),month_caption:p(s.month_caption,"wu-mb-5"),months:p(s.months,"wu-flex wu-flex-col sm:wu-flex-row wu-gap-4"),dropdowns:p(s.dropdowns,"wu-flex wu-items-center wu-justify-start wu-gap-2",(r.mode==="range","")),dropdown:p(s.dropdown,"wu-px-2 wu-py-1 wu-text-sm wu-text-gray-lead wu-font-medium focus:wu-outline-none wu-bg-white wu-border-b wu-border-gray-subtle focus-visible:wu-border-blue-p"),weekday:p(s.weekday,"wu-text-gray-lead wu-rounded-none wu-w-9 wu-font-normal wu-text-xs wu-bg-gray-10 wu-py-2"),day_button:p(s.day_button,"wu-w-full wu-h-full focus:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-2"),day:p(s.day,"wu-text-gray-lead wu-transition-colors wu-duration-300 [&:not([aria-selected])]:hover:wu-bg-gray-25 wu-text-sm wu-w-9 wu-h-9 wu-min-w-0 wu-text-center wu-p-0 wu-rounded-none data-[today=true]:[&:not([aria-selected])]:wu-border data-[today=true]:[&:not([aria-selected])]:wu-border-blue-p data-[today=true]:[&:not([aria-selected])]:wu-text-gray-lead"),selected:p(s.selected,"wu-bg-blue-p [&:not(.rm)]:wu-text-white hover:wu-bg-blue-pHover"),range_middle:p("rm",s.range_middle,"wu-bg-blue-p/10 wu-rounded-none hover:wu-bg-blue-p/20 wu-text-gray-lead hover:wu-text-white data-[today=true]:wu-bg-blue-p/20 hover:data-[today=true]:wu-bg-blue-pHover"),range_end:p(s.range_end,"wu-rounded-none"),range_start:p(s.range_start,"wu-rounded-none wu-bg-blue-p hover:wu-bg-blue-pHover"),month_grid:p(s.month_grid,"[&>thead>tr>th]:wu-pb-2 wu-border-collapse wu-space-y-1"),button_next:p(s.button_next,_r({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-text-gray-lead"),button_previous:p(s.button_previous,_r({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-rotate-180 wu-text-gray-lead"),nav:p(s.nav,"wu-absolute wu-top-4 wu-right-3 wu-flex",n==="rtl"&&"wu-right-auto wu-left-3 wu-flex-row-reverse"),chevron:p(s.chevron,"!wu-text-red-500"),outside:p(s.outside,"wu-invisible"),disabled:p(s.disabled,"hover:wu-bg-white wu-text-gray-subtle"),...t},components:{Chevron:()=>a.jsx("span",{className:"wm-chevron-right wu-text-lg wu-leading-5"})},...r})}Co.displayName="Calendar";const Kr=e=>a.jsx(Co,{...e}),To=e=>{const{handleDateChange:t,disabled:n,onReset:r,showResetButton:s}=e;return a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-end wu-gap-2 wu-mt-2 wu-date-picker-footer",children:[s&&a.jsx(Te,{variant:"secondary",onClick:r,Icon:a.jsx("span",{className:"wu-text-[20px] wu-leading-5 -wu-mt-[1px] wm-refresh"}),className:"wu-date-picker-footer-reset",children:"Reset"}),a.jsx(Wt.PopoverClose,{asChild:!0,children:a.jsx(Te,{onClick:t,disabled:n,className:"wu-date-picker-apply",children:"Apply"})})]})},Yr=({formattedString:e,dir:t,placeholder:n="Select Date",className:r,variant:s="primary",color:o,CustomTrigger:i,...u})=>a.jsx(Wt.PopoverTrigger,{asChild:!i,dir:t,children:i?a.jsx(a.Fragment,{children:i(e)}):a.jsx(Te,{...u,className:p("wu-justify-between wu-w-full wu-gap-2 wu-text-xs wu-border-b wu-rounded-none wu-rounded-t-sm wu-min-w-48 wu-border-gray-subtle wu-text-gray-lead wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light wu-bg-gray-10 hover disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-subtle hover:wu-text-gray-lead hover:wu-bg-gray-10 hover:wu-border-gray-40 wu-datepicker-trigger",s==="outlined"&&"wu-border wu-border-subtle wu-bg-transparent",r),Icon:a.jsx("span",{className:"wm-calendar-month wu-text-sm"}),iconPosition:"right",children:e||n})}),Eo=(e,t,n,r)=>{const s=H.startOfDay(e).getTime();return!!(t||n&&s<H.startOfDay(n).getTime()||r&&s>H.startOfDay(r).getTime())},Wn=e=>e?typeof e=="string"?new Date(e):e:new Date,Xr="\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])",Vw=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90},{label:"Last 365 days",value:365}],Ow=({formatString:e="yyyy-MM-dd",value:t,onChange:n,disabled:r,minDate:s=H.sub(new Date,{years:5}),maxDate:o=H.add(new Date,{years:1}),dir:i="ltr",Label:u,labelPosition:l="top",onReset:d,showResetButton:c=!1,placeholder:w="Select Date",CustomTrigger:f,...m})=>{const[g,b]=h.useState(),[v,S]=h.useState(""),N=h.useCallback(()=>{const x=Wn(g);S(H.format(x,e)),n&&n(g)},[g,e,n]),C=h.useCallback(()=>{d?d():(b(void 0),S(""),n&&n(void 0))},[n,d]);return h.useEffect(()=>{const x=Wn(t);b(x),S(H.format(x,e))},[t,e]),a.jsxs(Me,{className:p("wu-flex wu-gap-1",l==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[u,a.jsxs(He,{children:[a.jsx(Yr,{formattedString:v,dir:i,placeholder:w,CustomTrigger:f,...m}),a.jsx(Fe,{className:"wu-p-0 wu-w-fit wu-date-picker-content",align:"start",sideOffset:-.5,dir:i,children:a.jsx(Kr,{dir:i,mode:"single",captionLayout:"dropdown",selected:g,onSelect:b,disabled:x=>Eo(x,r,s,o),startMonth:s,endMonth:o,required:!0,autoFocus:!0,defaultMonth:g,className:p("wu-border wu-border-blue-p wu-date-picker"),footer:a.jsx(To,{handleDateChange:N,disabled:r,onReset:C,showResetButton:c})})})]})]})},Mo="yyyy-MM-dd",Fw=[{label:"Day",value:1},{label:"Week",value:7},{label:"Month",value:30},{label:"Quarter",value:90},{label:"Year",value:365}],Lw=({current:e,onSelect:t,presetRanges:n=Vw})=>{const[r,s]=h.useState(),[o,i]=h.useState(!1),[u,l]=h.useState(""),[d,c]=h.useState(""),[w,f]=h.useState(!1),m=h.useMemo(()=>n.map(N=>N.value),[n]),g=p("wu-flex wu-w-full wu-gap-2 wu-px-4 wu-py-2 wu-text-sm wu-text-gray-lead wu-transition-colors","wu-rounded-none hover:wu-bg-gray-10 focus:wu-outline-none focus-visible:wu-ring-2","focus-visible:wu-ring-blue-pHover focus-visible:wu-ring-offset-1 wu-text-start"),b=h.useCallback(N=>{if(N===void 0){s(void 0),i(!0);return}const C=Number(N)-1;s(C),i(!1),t({from:H.sub(new Date,{days:C}),to:new Date})},[t]),v=h.useCallback((N,C)=>{if(!N||!(e!=null&&e.to)||!(e!=null&&e.from)||!new RegExp(Xr).test(N))return!1;const T=new Date(C==="start"?N:e.from),k=new Date(C==="end"?N:e.to);return H.isBefore(k,T)?(f(!0),!1):(f(!1),!(H.isSameDay(T,e.from)&&H.isSameDay(k,e.to)))},[e]),S=h.useCallback((N,C)=>{if((C==="start"?l:c)(N),v(N,C)){const T={from:e==null?void 0:e.from,to:e==null?void 0:e.to};C==="start"&&(T.from=new Date(N)),C==="end"&&(T.to=new Date(N)),t(T)}},[e,t,v]);return h.useEffect(()=>{if(e!=null&&e.to&&(e!=null&&e.from)&&H.isValid(e.to)&&H.isValid(e.from)){l(H.format(e.from,Mo)),c(H.format(e.to,Mo));const N=H.differenceInCalendarDays(e.to,e.from);H.isToday(e.to)&&m.includes(N+1)?(s(N),i(!1)):(s(void 0),i(!0))}},[e,m]),a.jsxs("div",{className:"wu-flex wu-flex-col wu-gap-1 wu-p-2 wu-bg-white wu-w-60 wu-date-picker-sidebar",children:[a.jsx("ul",{className:"wu-flex wu-gap-1 wu-py-2 wu-date-picker-batch-list",children:Fw.map(({label:N,value:C})=>a.jsx(Nt,{variant:"secondary",className:"wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white",disabled:C!==1,children:N},C))}),a.jsxs("ul",{className:"wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges",children:[n.map(({label:N,value:C})=>a.jsx("li",{children:a.jsx("button",{className:p(g,r===C-1&&"wu-bg-blue-p/10"),onClick:()=>b(C),children:N})},C)),a.jsx("li",{children:a.jsx("button",{className:p(g,o&&"wu-bg-blue-p/10"),onClick:()=>b(),children:"Custom Range"})})]}),a.jsxs("div",{className:"wu-relative wu-flex wu-gap-3 wu-pt-2 wu-date-picker-range-footer",children:[a.jsx(Ke,{placeholder:"Start Date",pattern:Xr,value:u,onChange:N=>S(N.target.value,"start"),"aria-label":"Start Date"}),a.jsx(Ke,{placeholder:"End Date",pattern:Xr,value:d,onChange:N=>S(N.target.value,"end"),"aria-label":"End Date"}),w?a.jsx("small",{className:"wu-absolute wu-text-[10px] wu-leading-[14px] wu-text-red-deep wu-left-0 -wu-bottom-4 wu-text-start",children:"End date must be after start date"}):a.jsx("small",{className:"wu-absolute wu-right-0 wu-leading-[14px] -wu-bottom-4 wu-text-gray-subtle wu-text-end",children:"yyyy-mm-dd"})]})]})},Ww=({Trigger:e,children:t,className:n,dir:r,open:s,onOpenChange:o,modal:i,...u})=>a.jsxs(He,{open:s,onOpenChange:o,modal:i,children:[a.jsx(ct,{asChild:!0,dir:r,children:e}),a.jsx(Fe,{className:p("wu-w-80 wu-p-0 wu-border-blue-p wu-bg-white wu-dark:border-gray-switcher",n),dir:r,...u,children:t})]}),Zr=e=>a.jsx(Wt.PopoverClose,{asChild:!0,children:a.jsx(Te,{...e})}),Ct={wuDateRangeNativeSidebar:"_wuDateRangeNativeSidebar_1oiuh_1",customInputs:"_customInputs_1oiuh_26",inputsRow:"_inputsRow_1oiuh_42",errorWrapper:"_errorWrapper_1oiuh_63",errorText:"_errorText_1oiuh_67"},Bw=[{label:"Last week",value:7},{label:"Last month",value:30},{label:"Last quarter",value:90},{label:"Last year",value:365}],xe=e=>{if(!e)return"";try{const t=new Date(e);if(!H.isValid(t))return"";const n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${n}-${r}-${s}`}catch{return""}},Io=e=>{if(!e)return null;try{const t=H.parseISO(e);return H.isValid(t)?H.startOfDay(t):null}catch{return null}},qw=(e,t,n)=>!(t&&e<H.startOfDay(t)||n&&e>H.startOfDay(n)),Do=e=>H.sub(new Date,{days:e}),Ao=e=>e?H.sub(new Date,{days:1}):new Date;function $w({ranges:e=Bw,excludeToday:t=!0,current:n,onSelect:r,onReset:s,onApply:o,showResetButton:i=!0,maxDate:u,minDate:l,...d}){const[c,w]=h.useState(xe(n==null?void 0:n.from)||xe(l)),[f,m]=h.useState(xe(n==null?void 0:n.to)||xe(u)),[g,b]=h.useState(!1),[v,S]=h.useState(""),[N,C]=h.useState("");h.useEffect(()=>{w(xe(n==null?void 0:n.from)||xe(l)),m(xe(n==null?void 0:n.to)||xe(u)),S(""),C("")},[n==null?void 0:n.from,n==null?void 0:n.to,l,u]);const x=h.useMemo(()=>{if(!(n!=null&&n.from)||!(n!=null&&n.to))return null;const D=H.differenceInCalendarDays(n.to,n.from)+1;return e.find(V=>V.value===D)??null},[n==null?void 0:n.from,n==null?void 0:n.to,e]),T=h.useCallback(D=>{const V=Do(D),P=Ao(t);w(xe(V)),m(xe(P)),S(""),C(""),b(!1),r==null||r({from:V,to:P})},[t,r]),k=h.useCallback((D,V)=>{const P=Io(D);if(V==="start"?(w(D),S("")):(m(D),C("")),!P){if(D){const L="Please enter a valid date";V==="start"?S(L):C(L)}return}if(!qw(P,l,u)){const L=l&&P<H.startOfDay(l)?`Date must be on or after ${H.format(l,"MMM d, yyyy")}`:`Date must be on or before ${H.format(u,"MMM d, yyyy")}`;V==="start"?S(L):C(L);return}const _=Io(V==="start"?f:c);V==="start"&&_?P<=_?r==null||r({from:P,to:_}):S("Start date must be before or equal to end date"):V==="end"&&_&&(P>=_?r==null||r({from:_,to:P}):C("End date must be after or equal to start date"))},[c,f,r,l,u]),A=h.useMemo(()=>e.map(D=>{const V=Do(D.value),P=Ao(t);return{...D,displayStartDate:H.format(V,"MMM d, yyyy"),displayEndDate:H.format(P,"MMM d, yyyy")}}),[e,t]),M=g||(n==null?void 0:n.from)&&(n==null?void 0:n.to)&&!x;return a.jsxs("div",{className:Ct.wuDateRangeNativeSidebar,...d,children:[a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("button",{onClick:()=>b(!0),"data-selected":M,"aria-pressed":M,"aria-label":"Select custom date range",children:"Custom Range"})}),a.jsxs("li",{className:Ct.customInputs,"data-expanded":M,children:[a.jsxs("div",{className:Ct.inputsRow,children:[a.jsx(Ke,{type:"date",value:c,onChange:D=>k(D.target.value,"start"),Label:"Start",min:xe(l),max:xe(u),"aria-describedby":v?"start-date-error":void 0}),a.jsx(Ke,{type:"date",value:f,onChange:D=>k(D.target.value,"end"),Label:"End",min:c||xe(l),max:xe(u),"aria-describedby":N?"end-date-error":void 0})]}),(v||N)&&a.jsxs("div",{className:Ct.errorWrapper,role:"alert","aria-live":"polite",children:[v&&a.jsx("p",{id:"start-date-error",className:Ct.errorText,children:v}),N&&a.jsx("p",{id:"end-date-error",className:Ct.errorText,children:N})]})]}),A.map(D=>a.jsx("li",{children:a.jsxs("button",{onClick:()=>T(D.value),"data-selected":!M&&(x==null?void 0:x.value)===D.value,"aria-pressed":!M&&(x==null?void 0:x.value)===D.value,"aria-label":`Select ${D.label}`,children:[D.label," ",a.jsxs("small",{children:["(",D.displayStartDate," - ",D.displayEndDate,")"]})]})},D.value))]}),a.jsxs("footer",{children:[i&&a.jsx(Zr,{variant:"secondary",Icon:a.jsx(De,{icon:"wm-refresh"}),onClick:s,children:"Reset"}),a.jsx(Zr,{onClick:o,disabled:!!(v||N),children:"Apply"})]})]})}const zw=({formatString:e="yyyy/MM/dd",value:t,onChange:n,disabled:r,minDate:s=H.sub(new Date,{years:5}),maxDate:o=H.add(new Date,{years:1}),dir:i="ltr",minDateToSelect:u,maxDateToSelect:l,presetRanges:d,Label:c,labelPosition:w="top",onReset:f,showResetButton:m=!0,placeholder:g="Select Date Range",CustomTrigger:b,native:v,...S})=>{const[N,C]=h.useState(t),[x,T]=h.useState(t),[k,A]=h.useState(""),M=h.useCallback(()=>{if(x){const P=x.from,I=x.to;C({from:P,to:I}),A(`${H.format(P,e)} - ${H.format(I,e)}`),n&&n({from:P,to:I})}},[x,e,n]),D=h.useCallback(()=>{T(N)},[N]),V=h.useCallback(()=>{f?f():(C(void 0),T(void 0),A(""),n&&n(void 0))},[f,n]);return h.useEffect(()=>{if(t!=null&&t.from&&(t!=null&&t.to)){const P=Wn(t.from),I=Wn(t.to);C(t),T(t),A(`${H.format(P,e)} - ${H.format(I,e)}`)}else C(void 0),T({to:new Date,from:new Date})},[t,e]),a.jsxs(Me,{className:p("wu-flex wu-gap-1",w==="left"?"wu-items-center":"wu-flex-col wu-items-start","wu-date-picker-label"),dir:i,children:[c,a.jsxs(He,{onOpenChange:P=>!P&&D(),children:[a.jsx(Yr,{formattedString:k,dir:i,placeholder:g,CustomTrigger:b,...S}),a.jsx(Fe,{className:"wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p wu-bg-white",align:"start",sideOffset:-.5,dir:i,children:v?a.jsx($w,{current:x,onSelect:P=>{T(P)},ranges:d,onApply:M,onReset:V,showResetButton:m,minDate:s,maxDate:o}):a.jsxs(a.Fragment,{children:[a.jsx(Lw,{current:x,onSelect:T,presetRanges:d}),a.jsx(Kr,{dir:i,numberOfMonths:2,mode:"range",captionLayout:"dropdown",selected:x,onSelect:T,disabled:P=>Eo(P,r,s,o),startMonth:s,endMonth:o,required:!0,autoFocus:!0,defaultMonth:N==null?void 0:N.from,className:p("wu-shadow-none wu-date-range-picker"),min:u,max:l,footer:a.jsx(To,{handleDateChange:M,disabled:r,onReset:V,showResetButton:m})})]})})]})]})},ko=h.forwardRef((e,t)=>{const{className:n,rounded:r,...s}=e;return a.jsx("div",{className:p("wu-card wu-p-2 wu-pt-1 hover:wu-shadow-card wu-border wu-border-black/20 hover:wu-border-black/30 wu-transition-colors wu-duration-300",r?"wu-rounded-lg":"wu-rounded-sm",n),ref:t,...s})});ko.displayName="WuCard";const Po=h.forwardRef((e,t)=>{const{className:n,...r}=e;return a.jsx("div",{ref:t,...r,className:p("wu-p-2 wu-mb-2 wu-border-b wu-border-gray-40 min-h-12 wu-card-header",n)})});Po.displayName="WuCardHeader";const _o=h.forwardRef((e,t)=>{const{className:n,...r}=e;return a.jsx("div",{ref:t,...r,className:p("wu-p-2 wu-mt-2 wu-border-t wu-border-gray-40 min-h-12 wu-card-footer",n)})});_o.displayName="WuCardHeader";const Vo=y.forwardRef(({className:e,partial:t,...n},r)=>a.jsx(xr.Root,{ref:r,className:p("wu-h-4 wu-w-4 wu-shrink-0 wu-rounded-[2px] wu-bg-white wu-border wu-border-gray-subtle wu-ring-offset-background focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[1px] data-[state=checked]:wu-bg-blue-p data-[state=checked]:wu-text-white data-[state=checked]:wu-border-none data-[state=checked]:hover:wu-bg-blue-q hover:wu-bg-gray-20 hover:wu-border-blue-p wu-transition-all data-[state=checked]:disabled:wu-bg-gray-20","disabled:wu-cursor-not-allowed disabled:wu-opacity-50 disabled:data-[state=unchecked]:wu-bg-gray-20 disabled:hover:wu-border-gray-subtle disabled:wu-border-gray-subtle",e),...n,children:a.jsxs(xr.Indicator,{className:p("wu-flex wu-items-center wu-justify-center wu-text-current"),children:[!t&&a.jsx("span",{className:"wm-check wu-text-base wu-leading-4"}),t&&a.jsx("span",{className:"wm-check-indeterminate-small wu-text-base wu-leading-4"})]})}));Vo.displayName=xr.Root.displayName;const Le=h.forwardRef((e,t)=>{const{disabled:n,checked:r,Label:s,labelPosition:o="right",className:i,id:u=Cr(),partial:l,onChange:d,required:c,readonly:w,...f}=e;return h.useEffect(()=>{f.defaultChecked!==void 0&&r!==void 0&&console.error("WuCheckbox: Both `checked` and `defaultChecked` cannot be used together. Use only one of them.")},[f.defaultChecked,r]),a.jsxs("div",{className:Hw({labelPosition:o,className:"wu-checkbox-container"}),dir:f.dir,children:[a.jsx(Vo,{id:u,...f,partial:l,checked:r,disabled:n||w,onCheckedChange:d,className:p("wu-peer wu-checkbox",i),required:c,ref:t}),s&&a.jsx(Me,{htmlFor:u,className:"wu-w-full wu-checkbox-label",children:s})]})}),Hw=Oe.cva("wu-flex wu-items-center wu-gap-2 wu-w-fit",{variants:{labelPosition:{left:"wu-flex-row-reverse wu-text-right",right:"wu-flex-row"}}});Le.displayName="WuCheckbox";const Uw=e=>{const{className:t,children:n,...r}=e;return a.jsx("span",{...r,className:p("wu-flex wu-items-center wu-justify-center wu-truncate wu-max-w-28 wu-w-fit wu-px-2 wu-py-1 wu-text-xs wu-bg-gray-20 wu-rounded-sm hover:wu-bg-gray-40 hover:wu-text-blue-q",t),children:n})},Jr=y.forwardRef(({className:e,...t},n)=>a.jsx(ve.Command,{ref:n,className:p("wu-flex wu-h-full wu-w-full wu-flex-col wu-overflow-hidden wu-rounded-md",e),...t}));Jr.displayName=ve.Command.displayName;const Oo=y.forwardRef(({className:e,...t},n)=>a.jsx("div",{className:"wu-flex wu-items-center wu-border-b wu-px-3",children:a.jsx(ve.Command.Input,{ref:n,className:p("wu-flex wu-h-11 wu-w-full wu-rounded-md wu-bg-transparent wu-py-3 wu-text-sm wu-outline-none wu-placeholder:wu-text-muted-foreground disabled:wu-cursor-not-allowed disabled:wu-opacity-50",e),...t})}));Oo.displayName=ve.Command.Input.displayName;const Qr=y.forwardRef(({className:e,...t},n)=>a.jsx(ve.Command.List,{ref:n,className:p("",e),...t}));Qr.displayName=ve.Command.List.displayName;const Rr=y.forwardRef((e,t)=>a.jsx(ve.Command.Empty,{ref:t,className:"wu-text-center wu-p-2 wu-pb-2.5 wu-text-xs",...e}));Rr.displayName=ve.Command.Empty.displayName;const Jt=y.forwardRef(({className:e,...t},n)=>a.jsx(ve.Command.Group,{ref:n,className:p("",e),...t}));Jt.displayName=ve.Command.Group.displayName;const Fo=y.forwardRef(({className:e,...t},n)=>a.jsx(ve.Command.Separator,{ref:n,className:p("wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));Fo.displayName=ve.Command.Separator.displayName;const Qt=y.forwardRef(({className:e,...t},n)=>a.jsx(ve.Command.Item,{ref:n,className:p("wu-relative wu-flex wu-cursor-default wu-gap-2 wu-select-none wu-items-center wu-rounded-sm wu-px-2 wu-py-3 wu-text-sm wu-outline-none data-[disabled=true]:wu-pointer-events-none data-[disabled=true]:wu-opacity-50 [&_svg]:wu-pointer-events-none [&_svg]:wu-size-4 [&_svg]:wu-shrink-0",e),...t}));Qt.displayName=ve.Command.Item.displayName;const Tt=h.forwardRef(({containerHeight:e=400,list:t,callback:n,dir:r,className:s,style:o},i)=>a.jsx(ad.Virtuoso,{ref:i,dir:r,className:s,style:{height:e,scrollbarWidth:"thin",scrollbarColor:"#d4d4d4 #f1f1f1",overflowX:"hidden",...o},data:t,itemContent:(u,l)=>n(u,l)}));Tt.displayName="WuVirtualScroll";const jw=({tags:e,triggerRef:t})=>{const[n,r]=h.useState([]),[s,o]=h.useState([]),i=h.useMemo(()=>a.jsx("ul",{className:"wu-flex wu-flex-col wu-items-start wu-justify-center wu-list-none",children:s.map((l,d)=>a.jsx("li",{className:"wu-py-1 wu-text-xs wu-text-left",children:l},d))}),[s]),u=l=>{const d=document.createElement("div");Object.assign(d.style,{display:"inline-block",visibility:"hidden",position:"absolute",whiteSpace:"nowrap"}),d.textContent=l,document.body.appendChild(d);const c=d.offsetWidth;return document.body.removeChild(d),c+8};return h.useEffect(()=>{const l=()=>{if(t.current){const f=t.current.offsetWidth-20-36;let m=0;const g=[],b=[];e.forEach(v=>{const S=u(v);m+S+8<f?(g.push(v),m+=S+8):b.push(v)}),r(g),o(b)}};return l(),window.addEventListener("resize",l),()=>{window.removeEventListener("resize",l)}},[e,t]),a.jsxs("div",{className:"wu-flex wu-items-center wu-gap-2 wu-text-xs",children:[n.map((l,d)=>a.jsx("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:l},d)),s.length>0&&a.jsx(Ln,{content:i,className:"wu-z-[51] wu-text-left",children:a.jsxs("span",{className:"wu-px-1 wu-py-0.5 wu-text-xs wu-rounded-sm wu-bg-gray-10 wu-combobox-tag",children:["+",s.length]})})]})},Gw=({placeholder:e="Select...",isEllipse:t=!1,selectedOptions:n,variant:r="flat",dir:s="ltr",accessorKey:o,multiple:i,id:u,disabled:l,selectAll:d,isCheckedAll:c,className:w,...f})=>{const[m,g]=h.useState([]),b=h.useRef(null);h.useEffect(()=>{if(!n||Array.isArray(n)&&n.length===0){g([]);return}if(i){const S=n;g(S==null?void 0:S.map(N=>N[o.label]));return}else g([n[o.label]])},[n]);const v=()=>{var S;return m.length?c&&(d!=null&&d.enable)&&(d!=null&&d.triggerText)?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",children:d.triggerText}):t?a.jsx("span",{className:"wu-overflow-hidden wu-text-xs wu-text-start wu-text-ellipsis wu-whitespace-nowrap",style:{width:`${(((S=b.current)==null?void 0:S.offsetWidth)||0)-32}px`},children:m.join(", ")}):a.jsx(jw,{tags:m,triggerRef:b}):a.jsx("p",{className:"wu-text-xs wu-opacity-70",children:e})};return a.jsx(ct,{dir:s,asChild:!0,id:u,disabled:l,children:a.jsxs("button",{...f,ref:b,disabled:l,className:p("focus-visible:wu-ring-2 focus-visible:wu-ring-blue-pHover wu-bg-white focus-visible:wu-ring-offset-2 wu-flex wu-w-full wu-items-center wu-justify-between wu-border-b wu-border-gray-subtle wu-py-1.5 wu-px-2 placeholder:wu-text-gray-40 focus:wu-outline-none disabled:wu-cursor-not-allowed disabled:wu-opacity-50 hover:wu-bg-gray-10 hover:wu-border-blue-p wu-transition-colors focus-visible:wu-bg-gray-20 focus-visible:wu-border-blue-p wu-cursor-pointer wu-text-xs wu-rounded-t-sm wu-gap-2 wu-h-8 wu-group/wuCombobox wu-combobox-trigger",r==="outlined"&&"wu-border wu-border-gray-subtle","disabled:wu-cursor-not-allowed disabled:hover:wu-border-gray-subtle disabled:wu-bg-gray-10",w),children:[v(),a.jsx("span",{className:"wm-arrow-drop-down group-data-[state=open]/wuCombobox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base"})]})})},Lo=ee.Root,Wo=ee.Trigger,Bo=ee.Group,Kw=ee.Portal,Yw=ee.Sub,Xw=ee.RadioGroup,qo=y.forwardRef(({className:e,inset:t,children:n,position:r,...s},o)=>a.jsxs(ee.SubTrigger,{ref:o,className:p("wu-flex wu-cursor-default wu-select-none wu-text-xs wu-items-center wu-p-2 wu-outline-none focus:wu-bg-gray-20 data-[state=open]:wu-bg-gray-20",t&&"wu-pl-8",e),...s,children:[r==="left"&&a.jsx("span",{className:p("wm-chevron-right",s.dir==="rtl"&&"ml-2")}),n,r!=="left"&&a.jsx("span",{className:p("wu-text-base wu-leading-4",s.dir==="rtl"&&"wu-mr-auto wm-chevron-left",s.dir!=="rtl"&&"wu-ml-auto wm-chevron-right")})]}));qo.displayName=ee.SubTrigger.displayName;const $o=y.forwardRef(({className:e,...t},n)=>a.jsx(ee.SubContent,{ref:n,className:p("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-lg data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...t}));$o.displayName=ee.SubContent.displayName;const es=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(ee.Portal,{children:a.jsx(ee.Content,{ref:r,sideOffset:t,className:p("wu-z-50 wu-min-w-[8rem] wu-overflow-hidden wu-border wu-text-xs wu-bg-white wu-text-gray-lead wu-shadow-md data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[side=bottom]:wu-slide-in-from-top-2 data-[side=left]:wu-slide-in-from-right-2 data-[side=right]:wu-slide-in-from-left-2 data-[side=top]:wu-slide-in-from-bottom-2",e),...n})}));es.displayName=ee.Content.displayName;const Bn=y.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(ee.Item,{ref:r,className:p("wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-p-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",t&&"wu-pl-8",e),...n}));Bn.displayName=ee.Item.displayName;const zo=y.forwardRef(({className:e,children:t,checked:n,dir:r,...s},o)=>a.jsxs(ee.CheckboxItem,{ref:o,className:p("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",r==="rtl"&&"wu-pr-8 wu-pl-2",r!=="rtl"&&"wu-pl-8 wu-pr-2",e),checked:n,...s,children:[a.jsx("span",{className:p("wu-absolute wu-flex wu-items-center wu-justify-center wu-w-4 wu-h-4 wu-rounded-sm wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-blue-p group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p",r==="rtl"&&"wu-right-2",r!=="rtl"&&"wu-left-2"),children:a.jsx(ee.ItemIndicator,{children:a.jsx("span",{className:"wm-check wu-text-base wu-text-white"})})}),t]}));zo.displayName=ee.CheckboxItem.displayName;const Ho=y.forwardRef(({className:e,children:t,...n},r)=>a.jsxs(ee.RadioItem,{ref:r,className:p("wu-group wu-relative wu-flex wu-cursor-default wu-select-none wu-items-center wu-text-xs wu-py-3 wu-pl-8 wu-pr-2 wu-outline-none wu-transition-colors focus:wu-bg-gray-20 focus:wu-text-accent-foreground data-[disabled]:wu-cursor-not-allowed data-[disabled]:wu-opacity-50",e),...n,children:[a.jsx("span",{className:"wu-absolute wu-rounded-full wu-left-2 wu-flex wu-h-4 wu-w-4 wu-items-center wu-justify-center wu-ring-1 wu-ring-gray-subtle group-disabled:wu-bg-gray-20 group-data-[state=checked]:wu-bg-white group-hover:wu-bg-gray-20 group-hover:wu-ring-blue-p wu-transition-all group-data-[state=checked]:wu-ring-blue-p group-hover:group-data-[state=checked]:wu-ring-blue-q",children:a.jsx(ee.ItemIndicator,{className:"wu-w-4 wu-h-4 wu-flex wu-items-center wu-justify-center",children:a.jsx("span",{className:"wm-circle wu-text-blue-p group-hover:group-data-[state=checked]:wu-text-blue-q wu-text-xs"})})}),t]}));Ho.displayName=ee.RadioItem.displayName;const Rt=y.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(ee.Label,{ref:r,className:p("wu-p-2 wu-font-medium wu-text-xs",t&&"wu-pl-8",e),...n}));Rt.displayName=ee.Label.displayName;const qn=y.forwardRef(({className:e,...t},n)=>a.jsx(ee.Separator,{ref:n,className:p("-wu-mx-1 wu-my-1 wu-h-px wu-bg-gray-20",e),...t}));qn.displayName=ee.Separator.displayName;const Uo=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:s,dir:o})=>{const[i,u]=h.useState(n?[]:"");h.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[s.value])):JSON.stringify(t[s.value]))},[t,s.value,n]);const l=n?i.includes(JSON.stringify(e[s.value])):i===JSON.stringify(e[s.value]),d=()=>{e.disabled||r(e)};return a.jsxs(Qt,{onSelect:d,disabled:e.disabled,className:p("wu-cursor-pointer wu-text-xs wu-items-start wu-leading-4 wu-py-2 wu-combobox-item hover:wu-bg-gray-100",l&&"wu-bg-gray-10"),dir:o,children:[n&&a.jsx(Le,{checked:l}),a.jsx(Zw,{option:e,accessorKey:s})]})},Zw=({option:e,accessorKey:t})=>{const n=e[t.label];return a.jsxs("div",{className:"wu-flex wu-items-center wu-w-full wu-gap-1",children:[e.icon&&e.icon,n,e.isAdmin&&a.jsx("span",{className:"wu-ml-auto wu-text-sm wm-lock wu-text-orange-deep"})]})},jo=e=>{const{option:t,selectAll:n,handleSelectAll:r,isCheckedAll:s,isPartialSelected:o,...i}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Qt,{onSelect:r,className:p("wu-cursor-pointer wu-text-xs wu-leading-4 wu-py-2 wu-combobox-item"),dir:i.dir,children:[a.jsx(Le,{checked:s||o,partial:o,"data-partial":o,"aria-label":(n==null?void 0:n.label)||"Select All"}),a.jsx("span",{"aria-hidden":!0,children:(n==null?void 0:n.label)||"Select All"})]});case"group":return a.jsxs(Jt,{children:[a.jsx(Rt,{children:t.label}),t.options.map((l,d)=>h.createElement(Uo,{...i,option:l,key:d}))]});case"divider":return a.jsx(Fo,{className:"wu-mx-4"});default:return a.jsx(Uo,{...i,option:t})}},Jw=e=>{const t=[],n=[],r=[],s=[];return e.forEach(o=>{o.type==="group"?(t.push(o),r.push(...o.options),s.push(...o.options.filter(i=>!i.disabled))):o.type==="divider"?n.push(o):r.push(o),o!=null&&o.disabled||s.push(o)}),{groups:t,dividers:n,allOptions:r,enabledOptions:s}},Qw=h.memo(Ke),Rw=({data:e,accessorKey:t,value:n,defaultValue:r,Header:s,virtualizedThreshold:o=100,isEllipse:i,placeholder:u,variant:l,dir:d,onSelect:c,Label:w,maxHeight:f=420,multiple:m=!1,hasGroup:g=!1,selectAll:b,id:v,disabled:S,labelPosition:N="top",className:C,onScroll:x,maxContentWidth:T,enableSearch:k=!0,noDataContent:A,...M})=>{const[D,V]=h.useState(""),[P,I]=h.useState(),[_,L]=h.useState(!1),[O,q]=h.useState(!1),[F,z]=h.useState(!1),U=h.useRef(null),{allOptions:j,enabledOptions:pe}=h.useMemo(()=>g||b&&!b.includeDisabled?Jw(e):{allOptions:e,groups:[],dividers:[],enabledOptions:[]},[e,g]),de=h.useMemo(()=>{if(!D)return e;const $=D.toLowerCase();return j.filter(J=>J[t.label].toLowerCase().includes($))},[D,j,e,t.label]),ke=h.useMemo(()=>m&&b!=null&&b.enable&&!D&&de.length>0?[{type:"all"},...de]:de,[de,D,m]),ge=h.useCallback($=>{const J=$[t.value];m?I(ie=>{const Pe=ie||[],be=Pe.some(Ne=>Ne[t.value]===J)?Pe.filter(Ne=>Ne[t.value]!==J):[...Pe,$];return c==null||c(be),be}):(L(!1),I($),c==null||c($))},[m,t.value,c]),X=h.useCallback($=>V($.target.value),[]),B=h.useCallback(()=>V(""),[]);h.useEffect(()=>{if(n!==void 0&&r!==void 0){console.error("defaultValue and value cannot be used simultaneously");return}else n!==void 0?I(n):r!==void 0&&I(r)},[n,r]),h.useEffect(()=>{if(!m)return;const $=b!=null&&b.includeDisabled?(P==null?void 0:P.length)===j.length:(P==null?void 0:P.length)===pe.length;q($);const J=(P==null?void 0:P.length)>0&&!$;z(J)},[P,b]);const G=h.useCallback(()=>{const $=O?[]:b!=null&&b.includeDisabled?j:pe;I($),c==null||c($)},[O,m,j,pe,c,b]),Y=En(N);return a.jsxs("div",{className:p(Y,"wu-flex wu-combobox-container"),ref:U,children:[a.jsxs(He,{onOpenChange:$=>{$&&B(),L($)},open:_,modal:!0,children:[a.jsx(Gw,{selectedOptions:P,accessorKey:t,isEllipse:i,placeholder:u,variant:l,dir:d,multiple:m,disabled:S,selectAll:b,isCheckedAll:O,className:C,id:v,...M}),a.jsx(Fe,{className:"wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-p-0 wu-bg-white wu-border wu-border-blue-p wu-combobox-content",align:"start",sideOffset:-1,style:{maxWidth:T},children:a.jsxs(Jr,{id:v,children:[k&&a.jsx("div",{className:"wu-m-2",children:a.jsx(Qw,{placeholder:"Search...",Icon:a.jsx("span",{className:"wm-search"}),className:"wu-text-xs wu-combobox-search",onChange:X,name:"Search","aria-label":"Search",dir:d,iconPosition:d==="rtl"?"right":"left"})}),s,a.jsxs(Qr,{children:[a.jsx(Rr,{children:A||"No results found."}),ke.length>=o?a.jsx(Tt,{className:"wu-combobox-list",containerHeight:f,list:ke,callback:($,J)=>a.jsx(jo,{option:J,value:P,onSelect:ge,multiple:m,accessorKey:t,dir:d,selectAll:b,handleSelectAll:G,isCheckedAll:O,isPartialSelected:F},$),dir:d}):a.jsx("div",{style:{height:"fit-content",maxHeight:f,overflow:"auto"},className:"wu-combobox-list",onScroll:x,children:ke.map(($,J)=>a.jsx(jo,{option:$,value:P,onSelect:ge,multiple:m,accessorKey:t,dir:d,selectAll:b,handleSelectAll:G,isCheckedAll:O,isPartialSelected:F},J))})]})]})})]}),w&&a.jsx(Me,{htmlFor:v,className:"wu-combobox-label",children:w})]})},ef=e=>{const{textToCopy:t,notificationText:n,...r}=e,[s,o]=h.useState(!1),i=async()=>{if(t)try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy:",u)}};return a.jsxs(Te,{...r,onClick:i,variant:"iconOnly",className:p("wu-relative",e.className),"aria-label":"Copy to clipboard",children:[n&&a.jsx("span",{className:p("wu-absolute wu-text-[6px] wu-leading-3 -wu-top-4 wu-right-0 wu-bg-gray-notification wu-text-white wu-rounded-sm wu-shadow-md wu-px-1 wu-animate-ping-once",s?"wu-block":"wu-hidden"),children:n}),a.jsx(De,{icon:"wm-content-copy",className:"wu-text-lg"})]})},Go=R.Root,tf=R.Trigger,nf=R.Close,rf=R.Portal,Ko=y.forwardRef(({className:e,...t},n)=>a.jsx(R.Overlay,{className:p("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30 data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0","wu-drawer-overlay",e),...t,ref:n}));Ko.displayName=R.Overlay.displayName;const sf=Oe.cva("wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-in-out data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-duration-500 data-[state=open]:wu-duration-500",{variants:{side:{top:"wu-inset-x-0 wu-top-0 wu-border-b data-[state=closed]:wu-slide-out-to-top data-[state=open]:wu-slide-in-from-top",bottom:"wu-inset-x-0 wu-bottom-0 wu-border-t data-[state=closed]:wu-slide-out-to-bottom data-[state=open]:wu-slide-in-from-bottom",left:"wu-inset-y-0 wu-left-0 wu-h-full wu-w-3/4 wu-border-r data-[state=closed]:wu-slide-out-to-left data-[state=open]:wu-slide-in-from-left sm:wu-max-w-sm",right:"wu-inset-y-0 wu-right-0 wu-h-full wu-w-3/4 wu-border-l data-[state=closed]:wu-slide-out-to-right data-[state=open]:wu-slide-in-from-right sm:wu-max-w-sm"}},defaultVariants:{side:"right"}}),ts=y.forwardRef(({side:e="right",className:t,children:n,hideCloseButton:r,overlayClassName:s,closeButtonClassName:o,...i},u)=>a.jsxs(rf,{children:[a.jsx(Ko,{className:s}),a.jsxs(R.Content,{ref:u,className:p(sf({side:e}),t),...i,children:[n,!r&&a.jsx(R.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Nt,{variant:"iconOnly",className:p("wu-absolute wu-right-4 wu-top-4",o),children:[a.jsx("span",{className:"wm-close"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));ts.displayName=R.Content.displayName;const Yo=y.forwardRef(({className:e,...t},n)=>a.jsx(R.Title,{ref:n,className:p("wu-text-lg wu-font-semibold",e),...t}));Yo.displayName=R.Title.displayName;const af=y.forwardRef(({className:e,...t},n)=>a.jsx(R.Description,{ref:n,className:p("wu-text-sm",e),...t}));af.displayName=R.Description.displayName;const of=e=>t=>{e&&t.preventDefault()},uf=e=>{const{Trigger:t,children:n,hideCloseButton:r,className:s,side:o="left",open:i,onOpenChange:u,preventClickOutside:l,overlayClassName:d,closeButtonClassName:c,...w}=e;return a.jsxs(Go,{open:i,onOpenChange:u,children:[a.jsx(tf,{asChild:!0,children:t}),a.jsxs(ts,{onInteractOutside:of(l),side:o,className:p("wu-bg-white wu-text-gray-lead wu-px-0",s),hideCloseButton:r,overlayClassName:d,closeButtonClassName:c,...w,children:[a.jsx("div",{className:"wu-hidden",children:a.jsx(Yo,{})}),n]})]})},lf=({children:e,...t})=>a.jsx(nf,{...t,children:e}),Xo=h.createContext({});function ns(e){const t=h.useRef(null);return t.current===null&&(t.current=e()),t.current}const Zo=typeof window<"u",Jo=Zo?h.useLayoutEffect:h.useEffect,$n=h.createContext(null);function cf(e,t){e.indexOf(t)===-1&&e.push(t)}function df(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Qe=(e,t,n)=>n>t?t:n<e?e:n;function rs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let en=()=>{},dt=()=>{};typeof process<"u"&&((Xc=process.env)==null?void 0:Xc.NODE_ENV)!=="production"&&(en=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(rs(t,n))},dt=(e,t,n)=>{if(!e)throw new Error(rs(t,n))});const Ye={},Qo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function wf(e){return typeof e=="object"&&e!==null}const Ro=e=>/^0[^.\s]+$/u.test(e);function ss(e){let t;return()=>(t===void 0&&(t=e()),t)}const Et=e=>e,ff=(e,t)=>n=>t(e(n)),zn=(...e)=>e.reduce(ff),ei=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class ti{constructor(){this.subscriptions=[]}add(t){return cf(this.subscriptions,t),()=>df(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ue=e=>e*1e3,We=e=>e/1e3;function ni(e,t){return t?e*(1e3/t):0}const ri=new Set;function si(e,t,n){e||ri.has(t)||(console.warn(rs(t,n)),ri.add(t))}const ai=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,pf=1e-7,hf=12;function mf(e,t,n,r,s){let o,i,u=0;do i=t+(n-t)/2,o=ai(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>pf&&++u<hf);return i}function tn(e,t,n,r){if(e===t&&n===r)return Et;const s=o=>mf(o,0,1,e,n);return o=>o===0||o===1?o:ai(s(o),t,r)}const oi=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ii=e=>t=>1-e(1-t),ui=tn(.33,1.53,.69,.99),as=ii(ui),li=oi(as),ci=e=>(e*=2)<1?.5*as(e):.5*(2-Math.pow(2,-10*(e-1))),os=e=>1-Math.sin(Math.acos(e)),gf=ii(os),di=oi(os),bf=tn(.42,0,1,1),yf=tn(0,0,.58,1),wi=tn(.42,0,.58,1),vf=e=>Array.isArray(e)&&typeof e[0]!="number",fi=e=>Array.isArray(e)&&typeof e[0]=="number",pi={linear:Et,easeIn:bf,easeInOut:wi,easeOut:yf,circIn:os,circInOut:di,circOut:gf,backIn:as,backInOut:li,backOut:ui,anticipate:ci},xf=e=>typeof e=="string",hi=e=>{if(fi(e)){dt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return tn(t,n,r,s)}else if(xf(e))return dt(pi[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),pi[e];return e},Hn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Nf(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let u={delta:0,timestamp:0,isProcessing:!1};function l(c){i.has(c)&&(d.schedule(c),e()),c(u)}const d={schedule:(c,w=!1,f=!1)=>{const g=f&&s?n:r;return w&&i.add(c),g.has(c)||g.add(c),c},cancel:c=>{r.delete(c),i.delete(c)},process:c=>{if(u=c,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(l),n.clear(),s=!1,o&&(o=!1,d.process(c))}};return d}const Sf=40;function mi(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=Hn.reduce((C,x)=>(C[x]=Nf(o),C),{}),{setup:u,read:l,resolveKeyframes:d,preUpdate:c,update:w,preRender:f,render:m,postRender:g}=i,b=()=>{const C=Ye.useManualTiming?s.timestamp:performance.now();n=!1,Ye.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(C-s.timestamp,Sf),1)),s.timestamp=C,s.isProcessing=!0,u.process(s),l.process(s),d.process(s),c.process(s),w.process(s),f.process(s),m.process(s),g.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(b))},v=()=>{n=!0,r=!0,s.isProcessing||e(b)};return{schedule:Hn.reduce((C,x)=>{const T=i[x];return C[x]=(k,A=!1,M=!1)=>(n||v(),T.schedule(k,A,M)),C},{}),cancel:C=>{for(let x=0;x<Hn.length;x++)i[Hn[x]].cancel(C)},state:s,steps:i}}const{schedule:Be,cancel:is,state:Un}=mi(typeof requestAnimationFrame<"u"?requestAnimationFrame:Et,!0);let jn;function Cf(){jn=void 0}const Ie={now:()=>(jn===void 0&&Ie.set(Un.isProcessing||Ye.useManualTiming?Un.timestamp:performance.now()),jn),set:e=>{jn=e,queueMicrotask(Cf)}},gi=e=>t=>typeof t=="string"&&t.startsWith(e),bi=gi("--"),Tf=gi("var(--"),us=e=>Tf(e)?Ef.test(e.split("/*")[0].trim()):!1,Ef=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function yi(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Mt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},nn={...Mt,transform:e=>Qe(0,1,e)},Gn={...Mt,default:1},rn=e=>Math.round(e*1e5)/1e5,ls=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Mf(e){return e==null}const If=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,cs=(e,t)=>n=>!!(typeof n=="string"&&If.test(n)&&n.startsWith(e)||t&&!Mf(n)&&Object.prototype.hasOwnProperty.call(n,t)),vi=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,u]=r.match(ls);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:u!==void 0?parseFloat(u):1}},Df=e=>Qe(0,255,e),ds={...Mt,transform:e=>Math.round(Df(e))},wt={test:cs("rgb","red"),parse:vi("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ds.transform(e)+", "+ds.transform(t)+", "+ds.transform(n)+", "+rn(nn.transform(r))+")"};function Af(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const ws={test:cs("#"),parse:Af,transform:wt.transform},sn=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Re=sn("deg"),It=sn("%"),W=sn("px"),kf=sn("vh"),Pf=sn("vw"),xi={...It,parse:e=>It.parse(e)/100,transform:e=>It.transform(e*100)},Dt={test:cs("hsl","hue"),parse:vi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+It.transform(rn(t))+", "+It.transform(rn(n))+", "+rn(nn.transform(r))+")"},le={test:e=>wt.test(e)||ws.test(e)||Dt.test(e),parse:e=>wt.test(e)?wt.parse(e):Dt.test(e)?Dt.parse(e):ws.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?wt.transform(e):Dt.transform(e),getAnimatableNone:e=>{const t=le.parse(e);return t.alpha=0,le.transform(t)}},_f=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Vf(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ls))==null?void 0:t.length)||0)+(((n=e.match(_f))==null?void 0:n.length)||0)>0}const Ni="number",Si="color",Of="var",Ff="var(",Ci="${}",Lf=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function an(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const u=t.replace(Lf,l=>(le.test(l)?(r.color.push(o),s.push(Si),n.push(le.parse(l))):l.startsWith(Ff)?(r.var.push(o),s.push(Of),n.push(l)):(r.number.push(o),s.push(Ni),n.push(parseFloat(l))),++o,Ci)).split(Ci);return{values:n,split:u,indexes:r,types:s}}function Ti(e){return an(e).values}function Ei(e){const{split:t,types:n}=an(e),r=t.length;return s=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],s[i]!==void 0){const u=n[i];u===Ni?o+=rn(s[i]):u===Si?o+=le.transform(s[i]):o+=s[i]}return o}}const Wf=e=>typeof e=="number"?0:le.test(e)?le.getAnimatableNone(e):e;function Bf(e){const t=Ti(e);return Ei(e)(t.map(Wf))}const et={test:Vf,parse:Ti,createTransformer:Ei,getAnimatableNone:Bf};function fs(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function qf({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const u=n<.5?n*(1+t):n+t-n*t,l=2*n-u;s=fs(l,u,e+1/3),o=fs(l,u,e),i=fs(l,u,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function Kn(e,t){return n=>n>0?t:e}const on=(e,t,n)=>e+(t-e)*n,ps=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},$f=[ws,wt,Dt],zf=e=>$f.find(t=>t.test(e));function Mi(e){const t=zf(e);if(en(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Dt&&(n=qf(n)),n}const Ii=(e,t)=>{const n=Mi(e),r=Mi(t);if(!n||!r)return Kn(e,t);const s={...n};return o=>(s.red=ps(n.red,r.red,o),s.green=ps(n.green,r.green,o),s.blue=ps(n.blue,r.blue,o),s.alpha=on(n.alpha,r.alpha,o),wt.transform(s))},hs=new Set(["none","hidden"]);function Hf(e,t){return hs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Uf(e,t){return n=>on(e,t,n)}function ms(e){return typeof e=="number"?Uf:typeof e=="string"?us(e)?Kn:le.test(e)?Ii:Kf:Array.isArray(e)?Di:typeof e=="object"?le.test(e)?Ii:jf:Kn}function Di(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>ms(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function jf(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=ms(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function Gf(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],i=e.indexes[o][r[o]],u=e.values[i]??0;n[s]=u,r[o]++}return n}const Kf=(e,t)=>{const n=et.createTransformer(t),r=an(e),s=an(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?hs.has(e)&&!s.values.length||hs.has(t)&&!r.values.length?Hf(e,t):zn(Di(Gf(r,s),s.values),n):(en(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Kn(e,t))};function Ai(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?on(e,t,n):ms(e)(e,t)}const Yf=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Be.update(t,n),stop:()=>is(t),now:()=>Un.isProcessing?Un.timestamp:Ie.now()}},ki=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Yn=2e4;function gs(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Yn;)t+=n,r=e.next(t);return t>=Yn?1/0:t}function Xf(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(gs(r),Yn);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:We(s)}}const Zf=5;function Pi(e,t,n){const r=Math.max(t-Zf,0);return ni(n-e(r),t-r)}const se={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},bs=.001;function Jf({duration:e=se.duration,bounce:t=se.bounce,velocity:n=se.velocity,mass:r=se.mass}){let s,o;en(e<=Ue(se.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Qe(se.minDamping,se.maxDamping,i),e=Qe(se.minDuration,se.maxDuration,We(e)),i<1?(s=d=>{const c=d*i,w=c*e,f=c-n,m=ys(d,i),g=Math.exp(-w);return bs-f/m*g},o=d=>{const w=d*i*e,f=w*n+n,m=Math.pow(i,2)*Math.pow(d,2)*e,g=Math.exp(-w),b=ys(Math.pow(d,2),i);return(-s(d)+bs>0?-1:1)*((f-m)*g)/b}):(s=d=>{const c=Math.exp(-d*e),w=(d-n)*e+1;return-bs+c*w},o=d=>{const c=Math.exp(-d*e),w=(n-d)*(e*e);return c*w});const u=5/e,l=Rf(s,o,u);if(e=Ue(e),isNaN(l))return{stiffness:se.stiffness,damping:se.damping,duration:e};{const d=Math.pow(l,2)*r;return{stiffness:d,damping:i*2*Math.sqrt(r*d),duration:e}}}const Qf=12;function Rf(e,t,n){let r=n;for(let s=1;s<Qf;s++)r=r-e(r)/t(r);return r}function ys(e,t){return e*Math.sqrt(1-t*t)}const ep=["duration","bounce"],tp=["stiffness","damping","mass"];function _i(e,t){return t.some(n=>e[n]!==void 0)}function np(e){let t={velocity:se.velocity,stiffness:se.stiffness,damping:se.damping,mass:se.mass,isResolvedFromDuration:!1,...e};if(!_i(e,tp)&&_i(e,ep))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Qe(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:se.mass,stiffness:s,damping:o}}else{const n=Jf(e);t={...t,...n,mass:se.mass},t.isResolvedFromDuration=!0}return t}function Xn(e=se.visualDuration,t=se.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],u={done:!1,value:o},{stiffness:l,damping:d,mass:c,duration:w,velocity:f,isResolvedFromDuration:m}=np({...n,velocity:-We(n.velocity||0)}),g=f||0,b=d/(2*Math.sqrt(l*c)),v=i-o,S=We(Math.sqrt(l/c)),N=Math.abs(v)<5;r||(r=N?se.restSpeed.granular:se.restSpeed.default),s||(s=N?se.restDelta.granular:se.restDelta.default);let C;if(b<1){const T=ys(S,b);C=k=>{const A=Math.exp(-b*S*k);return i-A*((g+b*S*v)/T*Math.sin(T*k)+v*Math.cos(T*k))}}else if(b===1)C=T=>i-Math.exp(-S*T)*(v+(g+S*v)*T);else{const T=S*Math.sqrt(b*b-1);C=k=>{const A=Math.exp(-b*S*k),M=Math.min(T*k,300);return i-A*((g+b*S*v)*Math.sinh(M)+T*v*Math.cosh(M))/T}}const x={calculatedDuration:m&&w||null,next:T=>{const k=C(T);if(m)u.done=T>=w;else{let A=T===0?g:0;b<1&&(A=T===0?Ue(g):Pi(C,T,k));const M=Math.abs(A)<=r,D=Math.abs(i-k)<=s;u.done=M&&D}return u.value=u.done?i:k,u},toString:()=>{const T=Math.min(gs(x),Yn),k=ki(A=>x.next(T*A).value,T,30);return T+"ms "+k},toTransition:()=>{}};return x}Xn.applyToOptions=e=>{const t=Xf(e,100,Xn);return e.ease=t.ease,e.duration=Ue(t.duration),e.type="keyframes",e};function vs({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:u,max:l,restDelta:d=.5,restSpeed:c}){const w=e[0],f={done:!1,value:w},m=M=>u!==void 0&&M<u||l!==void 0&&M>l,g=M=>u===void 0?l:l===void 0||Math.abs(u-M)<Math.abs(l-M)?u:l;let b=n*t;const v=w+b,S=i===void 0?v:i(v);S!==v&&(b=S-w);const N=M=>-b*Math.exp(-M/r),C=M=>S+N(M),x=M=>{const D=N(M),V=C(M);f.done=Math.abs(D)<=d,f.value=f.done?S:V};let T,k;const A=M=>{m(f.value)&&(T=M,k=Xn({keyframes:[f.value,g(f.value)],velocity:Pi(C,M,f.value),damping:s,stiffness:o,restDelta:d,restSpeed:c}))};return A(0),{calculatedDuration:null,next:M=>{let D=!1;return!k&&T===void 0&&(D=!0,x(M),A(M)),T!==void 0&&M>=T?k.next(M-T):(!D&&x(M),f)}}}function rp(e,t,n){const r=[],s=n||Ye.mix||Ai,o=e.length-1;for(let i=0;i<o;i++){let u=s(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||Et:t;u=zn(l,u)}r.push(u)}return r}function sp(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(dt(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const u=rp(t,r,s),l=u.length,d=c=>{if(i&&c<e[0])return t[0];let w=0;if(l>1)for(;w<e.length-2&&!(c<e[w+1]);w++);const f=ei(e[w],e[w+1],c);return u[w](f)};return n?c=>d(Qe(e[0],e[o-1],c)):d}function ap(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=ei(0,t,r);e.push(on(n,1,s))}}function op(e){const t=[0];return ap(t,e.length-1),t}function ip(e,t){return e.map(n=>n*t)}function up(e,t){return e.map(()=>t||wi).splice(0,e.length-1)}function At({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=vf(r)?r.map(hi):hi(r),o={done:!1,value:t[0]},i=ip(n&&n.length===t.length?n:op(t),e),u=sp(i,t,{ease:Array.isArray(s)?s:up(t,s)});return{calculatedDuration:e,next:l=>(o.value=u(l),o.done=l>=e,o)}}const lp=e=>e!==null;function xs(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(lp),u=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!u||r===void 0?o[u]:r}const cp={decay:vs,inertia:vs,tween:At,keyframes:At,spring:Xn};function Vi(e){typeof e.type=="string"&&(e.type=cp[e.type])}class Ns{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const dp=e=>e/100;class Ss extends Ns{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Ie.now()&&this.tick(Ie.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Vi(t);const{type:n=At,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=t;let{keyframes:u}=t;const l=n||At;process.env.NODE_ENV!=="production"&&l!==At&&dt(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==At&&typeof u[0]!="number"&&(this.mixKeyframes=zn(dp,Ai(u[0],u[1])),u=[0,100]);const d=l({...t,keyframes:u});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...u].reverse(),velocity:-i})),d.calculatedDuration===null&&(d.calculatedDuration=gs(d));const{calculatedDuration:c}=d;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=d}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:u,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:d=0,keyframes:c,repeat:w,repeatType:f,repeatDelay:m,type:g,onUpdate:b,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const S=this.currentTime-d*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?S<0:S>s;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let C=this.currentTime,x=r;if(w){const M=Math.min(this.currentTime,s)/u;let D=Math.floor(M),V=M%1;!V&&M>=1&&(V=1),V===1&&D--,D=Math.min(D,w+1),!!(D%2)&&(f==="reverse"?(V=1-V,m&&(V-=m/u)):f==="mirror"&&(x=i)),C=Qe(0,1,V)*u}const T=N?{done:!1,value:c[0]}:x.next(C);o&&(T.value=o(T.value));let{done:k}=T;!N&&l!==null&&(k=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&k);return A&&g!==vs&&(T.value=xs(c,this.options,v,this.speed)),b&&b(T.value),A&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return We(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+We(t)}get time(){return We(this.currentTime)}set time(t){var n;t=Ue(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ie.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=We(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=Yf,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ie.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function wp(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ft=e=>e*180/Math.PI,Cs=e=>{const t=ft(Math.atan2(e[1],e[0]));return Ts(t)},fp={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Cs,rotateZ:Cs,skewX:e=>ft(Math.atan(e[1])),skewY:e=>ft(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ts=e=>(e=e%360,e<0&&(e+=360),e),Oi=Cs,Fi=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Li=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),pp={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fi,scaleY:Li,scale:e=>(Fi(e)+Li(e))/2,rotateX:e=>Ts(ft(Math.atan2(e[6],e[5]))),rotateY:e=>Ts(ft(Math.atan2(-e[2],e[0]))),rotateZ:Oi,rotate:Oi,skewX:e=>ft(Math.atan(e[4])),skewY:e=>ft(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Es(e){return e.includes("scale")?1:0}function Ms(e,t){if(!e||e==="none")return Es(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=pp,s=n;else{const u=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=fp,s=u}if(!s)return Es(t);const o=r[t],i=s[1].split(",").map(mp);return typeof o=="function"?o(i):i[o]}const hp=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Ms(n,t)};function mp(e){return parseFloat(e.trim())}const kt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pt=new Set(kt),Wi=e=>e===Mt||e===W,gp=new Set(["x","y","z"]),bp=kt.filter(e=>!gp.has(e));function yp(e){const t=[];return bp.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const tt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Ms(t,"x"),y:(e,{transform:t})=>Ms(t,"y")};tt.translateX=tt.x,tt.translateY=tt.y;const pt=new Set;let Is=!1,Ds=!1,As=!1;function Bi(){if(Ds){const e=Array.from(pt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=yp(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var u;(u=r.getValue(o))==null||u.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ds=!1,Is=!1,pt.forEach(e=>e.complete(As)),pt.clear()}function qi(){pt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ds=!0)})}function vp(){As=!0,qi(),Bi(),As=!1}class ks{constructor(t,n,r,s,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(pt.add(this),Is||(Is=!0,Be.read(qi),Be.resolveKeyframes(Bi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const u=r.readValue(n,i);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=i),s&&o===void 0&&s.set(t[0])}wp(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),pt.delete(this)}cancel(){this.state==="scheduled"&&(pt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const xp=e=>e.startsWith("--");function Np(e,t,n){xp(t)?e.style.setProperty(t,n):e.style[t]=n}const Sp=ss(()=>window.ScrollTimeline!==void 0),Cp={};function Tp(e,t){const n=ss(e);return()=>Cp[t]??n()}const $i=Tp(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),un=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,zi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:un([0,.65,.55,1]),circOut:un([.55,0,1,.45]),backIn:un([.31,.01,.66,-.59]),backOut:un([.33,1.53,.69,.99])};function Hi(e,t){if(e)return typeof e=="function"?$i()?ki(e,t):"ease-out":fi(e)?un(e):Array.isArray(e)?e.map(n=>Hi(n,t)||zi.easeOut):zi[e]}function Ep(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:u="easeOut",times:l}={},d=void 0){const c={[t]:n};l&&(c.offset=l);const w=Hi(u,s);Array.isArray(w)&&(c.easing=w);const f={delay:r,duration:s,easing:Array.isArray(w)?"linear":w,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return d&&(f.pseudoElement=d),e.animate(c,f)}function Ui(e){return typeof e=="function"&&"applyToOptions"in e}function Mp({type:e,...t}){return Ui(e)&&$i()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ji extends Ns{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:u,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,dt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=Mp(t);this.animation=Ep(n,r,s,d,o),d.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=xs(s,this.options,u,this.speed);this.updateMotionValue?this.updateMotionValue(c):Np(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return We(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+We(t)}get time(){return We(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ue(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&Sp()?(this.animation.timeline=t,Et):n(this)}}const Gi={anticipate:ci,backInOut:li,circInOut:di};function Ip(e){return e in Gi}function Dp(e){typeof e.ease=="string"&&Ip(e.ease)&&(e.ease=Gi[e.ease])}const Ps=10;class Ap extends ji{constructor(t){Dp(t),Vi(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const u=new Ss({...i,autoplay:!1}),l=Math.max(Ps,Ie.now()-this.startTime),d=Qe(0,Ps,l-Ps);n.setWithVelocity(u.sample(Math.max(0,l-d)).value,u.sample(l).value,d),u.stop()}}const Ki=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(et.test(e)||e==="0")&&!e.startsWith("url("));function kp(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Pp(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=Ki(s,t),u=Ki(o,t);return en(i===u,`You are trying to animate ${t} from "${s}" to "${o}". "${i?o:s}" is not an animatable value.`,"value-not-animatable"),!i||!u?!1:kp(e)||(n==="spring"||Ui(n))&&r}function _s(e){e.duration=0,e.type="keyframes"}const _p=new Set(["opacity","clipPath","filter","transform"]),Vp=ss(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Op(e){var c;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:i}=e;if(!(((c=t==null?void 0:t.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:d}=t.owner.getProps();return Vp()&&n&&_p.has(n)&&(n!=="transform"||!d)&&!l&&!r&&s!=="mirror"&&o!==0&&i!=="inertia"}const Fp=40;class Lp extends Ns{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",keyframes:u,name:l,motionValue:d,element:c,...w}){var g;super(),this.stop=()=>{var b,v;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Ie.now();const f={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,name:l,motionValue:d,element:c,...w},m=(c==null?void 0:c.KeyframeResolver)||ks;this.keyframeResolver=new m(u,(b,v,S)=>this.onKeyframesResolved(b,v,f,!S),l,d,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,s){var v,S;this.keyframeResolver=void 0;const{name:o,type:i,velocity:u,delay:l,isHandoff:d,onUpdate:c}=r;this.resolvedAt=Ie.now(),Pp(t,o,i,u)||((Ye.instantAnimations||!l)&&(c==null||c(xs(t,r,n))),t[0]=t[t.length-1],_s(r),r.repeat=0);const f={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Fp?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!d&&Op(f),g=(S=(v=f.motionValue)==null?void 0:v.owner)==null?void 0:S.current,b=m?new Ap({...f,element:g}):new Ss(f);b.finished.then(()=>{this.notifyFinished()}).catch(Et),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),vp()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Yi(e,t,n,r=0,s=1){const o=Array.from(e).sort((d,c)=>d.sortNodePosition(c)).indexOf(t),i=e.size,u=(i-1)*r;return typeof n=="function"?n(o,i):s===1?o*r:u-o*r}const Wp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Bp(e){const t=Wp.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const qp=4;function Xi(e,t,n=1){dt(n<=qp,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=Bp(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return Qo(i)?parseFloat(i):i}return us(s)?Xi(s,t,n+1):s}const $p={type:"spring",stiffness:500,damping:25,restSpeed:10},zp=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Hp={type:"keyframes",duration:.8},Up={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},jp=(e,{keyframes:t})=>t.length>2?Hp:Pt.has(e)?e.startsWith("scale")?zp(t[1]):$p:Up,Gp=e=>e!==null;function Kp(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Gp),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}function Zi(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Ji(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Zi(n,e):n}function Yp({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:u,from:l,elapsed:d,...c}){return!!Object.keys(c).length}const Xp=(e,t,n,r={},s,o)=>i=>{const u=Ji(r,e)||{},l=u.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Ue(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...u,delay:-d,onUpdate:f=>{t.set(f),u.onUpdate&&u.onUpdate(f)},onComplete:()=>{i(),u.onComplete&&u.onComplete()},name:e,motionValue:t,element:o?void 0:s};Yp(u)||Object.assign(c,jp(e,c)),c.duration&&(c.duration=Ue(c.duration)),c.repeatDelay&&(c.repeatDelay=Ue(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let w=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(_s(c),c.delay===0&&(w=!0)),(Ye.instantAnimations||Ye.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(w=!0,_s(c),c.delay=0),c.allowFlatten=!u.type&&!u.ease,w&&!o&&t.get()!==void 0){const f=Kp(c.keyframes,u);if(f!==void 0){Be.update(()=>{c.onUpdate(f),c.onComplete()});return}}return u.isSync?new Ss(c):new Lp(c)};function Qi(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Vs(e,t,n,r){if(typeof t=="function"){const[s,o]=Qi(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Qi(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function _t(e,t,n){const r=e.getProps();return Vs(r,t,n!==void 0?n:r.custom,e)}const Ri=new Set(["width","height","top","left","right","bottom",...kt]),eu=30,Zp=e=>!isNaN(parseFloat(e));class Jp{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=Ie.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ie.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Zp(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&si(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ti);const r=this.events[t].add(n);return t==="change"?()=>{r(),Be.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ie.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>eu)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,eu);return ni(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Zn(e,t){return new Jp(e,t)}const Os=e=>Array.isArray(e);function Qp(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Zn(n))}function Rp(e){return Os(e)?e[e.length-1]||0:e}function eh(e,t){const n=_t(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const u=Rp(o[i]);Qp(e,i,u)}}const me=e=>!!(e&&e.getVelocity);function th(e){return!!(me(e)&&e.add)}function nh(e,t){const n=e.getValue("willChange");if(th(n))return n.add(t);if(!n&&Ye.WillChange){const r=new Ye.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Fs(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const tu="data-"+Fs("framerAppearId");function rh(e){return e.props[tu]}function sh({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function nu(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o,transitionEnd:i,...u}=t;const l=e.getDefaultTransition();o=o?Zi(o,l):l;const d=o==null?void 0:o.reduceMotion;r&&(o=r);const c=[],w=s&&e.animationState&&e.animationState.getState()[s];for(const f in u){const m=e.getValue(f,e.latestValues[f]??null),g=u[f];if(g===void 0||w&&sh(w,f))continue;const b={delay:n,...Ji(o||{},f)},v=m.get();if(v!==void 0&&!m.isAnimating&&!Array.isArray(g)&&g===v&&!b.velocity)continue;let S=!1;if(window.MotionHandoffAnimation){const x=rh(e);if(x){const T=window.MotionHandoffAnimation(x,f,Be);T!==null&&(b.startTime=T,S=!0)}}nh(e,f);const N=d??e.shouldReduceMotion;m.start(Xp(f,m,g,N&&Ri.has(f)?{type:!1}:b,e,S));const C=m.animation;C&&c.push(C)}if(i){const f=()=>Be.update(()=>{i&&eh(e,i)});c.length?Promise.all(c).then(f):f()}return c}function Ls(e,t,n={}){var l;const r=_t(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(nu(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:c=0,staggerChildren:w,staggerDirection:f}=s;return ah(e,t,d,c,w,f,n)}:()=>Promise.resolve(),{when:u}=s;if(u){const[d,c]=u==="beforeChildren"?[o,i]:[i,o];return d().then(()=>c())}else return Promise.all([o(),i(n.delay)])}function ah(e,t,n=0,r=0,s=0,o=1,i){const u=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),u.push(Ls(l,t,{...i,delay:n+(typeof r=="function"?0:r)+Yi(e.variantChildren,l,r,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(u)}function oh(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>Ls(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=Ls(e,t,n);else{const s=typeof t=="function"?_t(e,t,n.custom):t;r=Promise.all(nu(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const ih={test:e=>e==="auto",parse:e=>e},ru=e=>t=>t.test(e),su=[Mt,W,It,Re,Pf,kf,ih],au=e=>su.find(ru(e));function uh(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Ro(e):!0}const lh=new Set(["brightness","contrast","saturate","opacity"]);function ch(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ls)||[];if(!r)return e;const s=n.replace(r,"");let o=lh.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const dh=/\b([a-z-]*)\(.*?\)/gu,Ws={...et,getAnimatableNone:e=>{const t=e.match(dh);return t?t.map(ch).join(" "):e}},ou={...Mt,transform:Math.round},Bs={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,fontSize:W,backgroundPositionX:W,backgroundPositionY:W,...{rotate:Re,rotateX:Re,rotateY:Re,rotateZ:Re,scale:Gn,scaleX:Gn,scaleY:Gn,scaleZ:Gn,skew:Re,skewX:Re,skewY:Re,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:nn,originX:xi,originY:xi,originZ:W},zIndex:ou,fillOpacity:nn,strokeOpacity:nn,numOctaves:ou},wh={...Bs,color:le,backgroundColor:le,outlineColor:le,fill:le,stroke:le,borderColor:le,borderTopColor:le,borderRightColor:le,borderBottomColor:le,borderLeftColor:le,filter:Ws,WebkitFilter:Ws},iu=e=>wh[e];function uu(e,t){let n=iu(e);return n!==Ws&&(n=et),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const fh=new Set(["auto","none","0"]);function ph(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!fh.has(o)&&an(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=uu(n,s)}class hh extends ks{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let w=t[c];if(typeof w=="string"&&(w=w.trim(),us(w))){const f=Xi(w,n.current);f!==void 0&&(t[c]=f),c===t.length-1&&(this.finalKeyframe=w)}}if(this.resolveNoneKeyframes(),!Ri.has(r)||t.length!==2)return;const[s,o]=t,i=au(s),u=au(o),l=yi(s),d=yi(o);if(l!==d&&tt[r]){this.needsMeasurement=!0;return}if(i!==u)if(Wi(i)&&Wi(u))for(let c=0;c<t.length;c++){const w=t[c];typeof w=="string"&&(t[c]=parseFloat(w))}else tt[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||uh(t[s]))&&r.push(s);r.length&&ph(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=tt[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var u;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,i=r[o];r[o]=tt[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(u=this.removedTransforms)!=null&&u.length&&this.removedTransforms.forEach(([l,d])=>{t.getValue(l).set(d)}),this.resolveNoneKeyframes()}}const mh=new Set(["opacity","clipPath","filter","transform"]);function gh(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const lu=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function qs(e){return wf(e)&&"offsetHeight"in e}const{schedule:bh}=mi(queueMicrotask,!1),yh={y:!1};function vh(){return yh.y}function cu(e,t){const n=gh(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function xh(e){return!(e.pointerType==="touch"||vh())}function Nh(e,t,n={}){const[r,s,o]=cu(e,n);return r.forEach(i=>{let u=!1,l=!1,d;const c=()=>{i.removeEventListener("pointerleave",g)},w=v=>{d&&(d(v),d=void 0),c()},f=v=>{u=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,w(v))},m=()=>{u=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},g=v=>{if(v.pointerType!=="touch"){if(u){l=!0;return}w(v)}},b=v=>{if(!xh(v))return;l=!1;const S=t(i,v);typeof S=="function"&&(d=S,i.addEventListener("pointerleave",g,s))};i.addEventListener("pointerenter",b,s),i.addEventListener("pointerdown",m,s)}),o}const du=(e,t)=>t?e===t?!0:du(e,t.parentElement):!1,Sh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Ch=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Th(e){return Ch.has(e.tagName)||e.isContentEditable===!0}const Jn=new WeakSet;function wu(e){return t=>{t.key==="Enter"&&e(t)}}function $s(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Eh=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=wu(()=>{if(Jn.has(n))return;$s(n,"down");const s=wu(()=>{$s(n,"up")}),o=()=>$s(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function fu(e){return Sh(e)&&!0}const pu=new WeakSet;function Mh(e,t,n={}){const[r,s,o]=cu(e,n),i=u=>{const l=u.currentTarget;if(!fu(u)||pu.has(u))return;Jn.add(l),n.stopPropagation&&pu.add(u);const d=t(l,u),c=(m,g)=>{window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",f),Jn.has(l)&&Jn.delete(l),fu(m)&&typeof d=="function"&&d(m,{success:g})},w=m=>{c(m,l===window||l===document||n.useGlobalTarget||du(l,m.target))},f=m=>{c(m,!1)};window.addEventListener("pointerup",w,s),window.addEventListener("pointercancel",f,s)};return r.forEach(u=>{(n.useGlobalTarget?window:u).addEventListener("pointerdown",i,s),qs(u)&&(u.addEventListener("focus",d=>Eh(d,s)),!Th(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}const Ih=[...su,le,et],Dh=e=>Ih.find(ru(e)),hu=()=>({min:0,max:0}),mu=()=>({x:hu(),y:hu()}),Ah=new WeakMap;function Qn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ln(e){return typeof e=="string"||Array.isArray(e)}const zs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hs=["initial",...zs];function Rn(e){return Qn(e.animate)||Hs.some(t=>ln(e[t]))}function gu(e){return!!(Rn(e)||e.variants)}function kh(e,t,n){for(const r in t){const s=t[r],o=n[r];if(me(s))e.addValue(r,s);else if(me(o))e.addValue(r,Zn(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,Zn(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Us={current:null},bu={current:!1},Ph=typeof window<"u";function _h(){if(bu.current=!0,!!Ph)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Us.current=e.matches;e.addEventListener("change",t),t()}else Us.current=!1}const yu=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let er={};function vu(e){er=e}function Vh(){return er}class Oh{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:i,visualState:u},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=ks,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Ie.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Be.render(this.render,!1,!0))};const{latestValues:d,renderState:c}=u;this.latestValues=d,this.baseTarget={...d},this.initialValues=n.initial?{...d}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=Rn(n),this.isVariantNode=gu(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:w,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];d[m]!==void 0&&me(g)&&g.set(d[m])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,Ah.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(bu.current||_h(),this.shouldReduceMotion=Us.current),process.env.NODE_ENV!=="production"&&si(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),is(this.notifyUpdate),is(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&mh.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:u,times:l,ease:d,duration:c}=n.accelerate,w=new ji({element:this.current,name:t,keyframes:u,times:l,ease:d,duration:Ue(c)}),f=i(w);this.valueSubscriptions.set(t,()=>{f(),w.cancel()});return}const r=Pt.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Be.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in er){const n=er[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):mu()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<yu.length;r++){const s=yu[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=kh(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Zn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Qo(r)||Ro(r))?r=parseFloat(r):!Dh(r)&&et.test(n)&&(r=uu(t,n)),this.setBaseTarget(t,me(r)?r.get():r)),me(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Vs(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!me(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ti),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){bh.render(this.render)}}class xu extends Oh{constructor(){super(...arguments),this.KeyframeResolver=hh}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;me(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Vt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Fh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Lh(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Wh(e,t){return Fh(Lh(e.getBoundingClientRect(),t))}const Bh={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},qh=kt.length;function $h(e,t,n){let r="",s=!0;for(let o=0;o<qh;o++){const i=kt[o],u=e[i];if(u===void 0)continue;let l=!0;if(typeof u=="number")l=u===(i.startsWith("scale")?1:0);else{const d=parseFloat(u);l=i.startsWith("scale")?d===1:d===0}if(!l||n){const d=lu(u,Bs[i]);if(!l){s=!1;const c=Bh[i]||i;r+=`${c}(${d}) `}n&&(t[i]=d)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function js(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,u=!1;for(const l in t){const d=t[l];if(Pt.has(l)){i=!0;continue}else if(bi(l)){s[l]=d;continue}else{const c=lu(d,Bs[l]);l.startsWith("origin")?(u=!0,o[l]=c):r[l]=c}}if(t.transform||(i||n?r.transform=$h(t,e.transform,n):r.transform&&(r.transform="none")),u){const{originX:l="50%",originY:d="50%",originZ:c=0}=o;r.transformOrigin=`${l} ${d} ${c}`}}function Nu(e,{style:t,vars:n},r,s){const o=e.style;let i;for(i in t)o[i]=t[i];s==null||s.applyProjectionStyles(o,r);for(i in n)o.setProperty(i,n[i])}function Su(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cn={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(W.test(e))e=parseFloat(e);else return e;const n=Su(e,t.target.x),r=Su(e,t.target.y);return`${n}% ${r}%`}},zh={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=et.parse(e);if(s.length>5)return r;const o=et.createTransformer(e),i=typeof s[0]!="number"?1:0,u=n.x.scale*t.x,l=n.y.scale*t.y;s[0+i]/=u,s[1+i]/=l;const d=on(u,l,.5);return typeof s[2+i]=="number"&&(s[2+i]/=d),typeof s[3+i]=="number"&&(s[3+i]/=d),o(s)}},Hh={borderRadius:{...cn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cn,borderTopRightRadius:cn,borderBottomLeftRadius:cn,borderBottomRightRadius:cn,boxShadow:zh};function Cu(e,{layout:t,layoutId:n}){return Pt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Hh[e]||e==="opacity")}function Gs(e,t,n){var i;const r=e.style,s=t==null?void 0:t.style,o={};if(!r)return o;for(const u in r)(me(r[u])||s&&me(s[u])||Cu(u,e)||((i=n==null?void 0:n.getValue(u))==null?void 0:i.liveStyle)!==void 0)&&(o[u]=r[u]);return o}function Uh(e){return window.getComputedStyle(e)}class jh extends xu{constructor(){super(...arguments),this.type="html",this.renderInstance=Nu}readValueFromInstance(t,n){var r;if(Pt.has(n))return(r=this.projection)!=null&&r.isProjecting?Es(n):hp(t,n);{const s=Uh(t),o=(bi(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Wh(t,n)}build(t,n,r){js(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Gs(t,n,r)}}const Gh={offset:"stroke-dashoffset",array:"stroke-dasharray"},Kh={offset:"strokeDashoffset",array:"strokeDasharray"};function Yh(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?Gh:Kh;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const Xh=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Tu(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...u},l,d,c){if(js(e,u,d),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:w,style:f}=e;w.transform&&(f.transform=w.transform,delete w.transform),(f.transform||w.transformOrigin)&&(f.transformOrigin=w.transformOrigin??"50% 50%",delete w.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete w.transformBox);for(const m of Xh)w[m]!==void 0&&(f[m]=w[m],delete w[m]);t!==void 0&&(w.x=t),n!==void 0&&(w.y=n),r!==void 0&&(w.scale=r),s!==void 0&&Yh(w,s,o,i,!1)}const Eu=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Mu=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Zh(e,t,n,r){Nu(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(Eu.has(s)?s:Fs(s),t.attrs[s])}function Iu(e,t,n){const r=Gs(e,t,n);for(const s in e)if(me(e[s])||me(t[s])){const o=kt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}class Jh extends xu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=mu}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Pt.has(n)){const r=iu(n);return r&&r.default||0}return n=Eu.has(n)?n:Fs(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Iu(t,n,r)}build(t,n,r){Tu(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){Zh(t,n,r,s)}mount(t){this.isSVGTag=Mu(t.tagName),super.mount(t)}}const Qh=Hs.length;function Du(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Du(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Qh;n++){const r=Hs[n],s=e.props[r];(ln(s)||s===!1)&&(t[r]=s)}return t}function Au(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Rh=[...zs].reverse(),em=zs.length;function tm(e){return t=>Promise.all(t.map(({animation:n,options:r})=>oh(e,n,r)))}function nm(e){let t=tm(e),n=ku(),r=!0;const s=l=>(d,c)=>{var f;const w=_t(e,c,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(w){const{transition:m,transitionEnd:g,...b}=w;d={...d,...b,...g}}return d};function o(l){t=l(e)}function i(l){const{props:d}=e,c=Du(e.parent)||{},w=[],f=new Set;let m={},g=1/0;for(let v=0;v<em;v++){const S=Rh[v],N=n[S],C=d[S]!==void 0?d[S]:c[S],x=ln(C),T=S===l?N.isActive:null;T===!1&&(g=v);let k=C===c[S]&&C!==d[S]&&x;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),N.protectedKeys={...m},!N.isActive&&T===null||!C&&!N.prevProp||Qn(C)||typeof C=="boolean")continue;if(S==="exit"&&N.isActive&&T!==!0){N.prevResolvedValues&&(m={...m,...N.prevResolvedValues});continue}const A=rm(N.prevProp,C);let M=A||S===l&&N.isActive&&!k&&x||v>g&&x,D=!1;const V=Array.isArray(C)?C:[C];let P=V.reduce(s(S),{});T===!1&&(P={});const{prevResolvedValues:I={}}=N,_={...I,...P},L=F=>{M=!0,f.has(F)&&(D=!0,f.delete(F)),N.needsAnimating[F]=!0;const z=e.getValue(F);z&&(z.liveStyle=!1)};for(const F in _){const z=P[F],U=I[F];if(m.hasOwnProperty(F))continue;let j=!1;Os(z)&&Os(U)?j=!Au(z,U):j=z!==U,j?z!=null?L(F):f.add(F):z!==void 0&&f.has(F)?L(F):N.protectedKeys[F]=!0}N.prevProp=C,N.prevResolvedValues=P,N.isActive&&(m={...m,...P}),r&&e.blockInitialAnimation&&(M=!1);const O=k&&A;M&&(!O||D)&&w.push(...V.map(F=>{const z={type:S};if(typeof F=="string"&&r&&!O&&e.manuallyAnimateOnMount&&e.parent){const{parent:U}=e,j=_t(U,F);if(U.enteringChildren&&j){const{delayChildren:pe}=j.transition||{};z.delay=Yi(U.enteringChildren,e,pe)}}return{animation:F,options:z}}))}if(f.size){const v={};if(typeof d.initial!="boolean"){const S=_t(e,Array.isArray(d.initial)?d.initial[0]:d.initial);S&&S.transition&&(v.transition=S.transition)}f.forEach(S=>{const N=e.getBaseTarget(S),C=e.getValue(S);C&&(C.liveStyle=!0),v[S]=N??null}),w.push({animation:v})}let b=!!w.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(w):Promise.resolve()}function u(l,d){var w;if(n[l].isActive===d)return Promise.resolve();(w=e.variantChildren)==null||w.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(l,d)}),n[l].isActive=d;const c=i(l);for(const f in n)n[f].protectedKeys={};return c}return{animateChanges:i,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ku()}}}function rm(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Au(t,e):!1}function ht(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ku(){return{animate:ht(!0),whileInView:ht(),whileHover:ht(),whileTap:ht(),whileDrag:ht(),whileFocus:ht(),exit:ht()}}function Pu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function sm(e){return me(e)?e.get():e}const Ks=h.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function _u(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function am(...e){return t=>{let n=!1;const r=e.map(s=>{const o=_u(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():_u(e[s],null)}}}}function om(...e){return y.useCallback(am(...e),e)}class im extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=qs(r)&&r.offsetWidth||0,o=qs(r)&&r.offsetHeight||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=s-i.width-i.left,i.bottom=o-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function um({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:o}){var f;const i=h.useId(),u=h.useRef(null),l=h.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=h.useContext(Ks),c=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),w=om(u,c);return h.useInsertionEffect(()=>{const{width:m,height:g,top:b,left:v,right:S,bottom:N}=l.current;if(t||o===!1||!u.current||!m||!g)return;const C=n==="left"?`left: ${v}`:`right: ${S}`,x=r==="bottom"?`bottom: ${N}`:`top: ${b}`;u.current.dataset.motionPopId=i;const T=document.createElement("style");d&&(T.nonce=d);const k=s??document.head;return k.appendChild(T),T.sheet&&T.sheet.insertRule(`
|
|
5
8
|
[data-motion-pop-id="${i}"] {
|
|
6
9
|
position: absolute !important;
|
|
7
10
|
width: ${m}px !important;
|
|
8
11
|
height: ${g}px !important;
|
|
9
|
-
${
|
|
10
|
-
${
|
|
12
|
+
${C}px !important;
|
|
13
|
+
${x}px !important;
|
|
11
14
|
}
|
|
12
|
-
`),()=>{D.contains(C)&&D.removeChild(C)}},[t]),a.jsx(ch,{isPresent:t,childRef:u,sizeRef:l,pop:o,children:o===!1?e:y.cloneElement(e,{ref:w})})}const wh=({children:e,initial:t,isPresent:n,onExitComplete:s,custom:r,presenceAffectsLayout:o,mode:i,anchorX:u,anchorY:l,root:d})=>{const c=$s(fh),w=h.useId();let f=!0,m=h.useMemo(()=>(f=!1,{id:w,initial:t,isPresent:n,custom:r,onExitComplete:g=>{c.set(g,!0);for(const b of c.values())if(!b)return;s&&s()},register:g=>(c.set(g,!1),()=>c.delete(g))}),[n,c,s]);return o&&f&&(m={...m}),h.useMemo(()=>{c.forEach((g,b)=>c.set(b,!1))},[n]),y.useEffect(()=>{!n&&!c.size&&s&&s()},[n]),e=a.jsx(dh,{pop:i==="popLayout",isPresent:n,anchorX:u,anchorY:l,root:d,children:e}),a.jsx(Dn.Provider,{value:m,children:e})};function fh(){return new Map}function ph(e=!0){const t=h.useContext(Dn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:r}=t,o=h.useId();h.useEffect(()=>{if(e)return r(o)},[e]);const i=h.useCallback(()=>e&&s&&s(o),[o,s,e]);return!n&&s?[!1,i]:[!0]}const Un=e=>e.key||"";function tu(e){const t=[];return h.Children.forEach(e,n=>{h.isValidElement(n)&&t.push(n)}),t}const nu=({children:e,custom:t,initial:n=!0,onExitComplete:s,presenceAffectsLayout:r=!0,mode:o="sync",propagate:i=!1,anchorX:u="left",anchorY:l="top",root:d})=>{const[c,w]=ph(i),f=h.useMemo(()=>tu(e),[e]),m=i&&!c?[]:f.map(Un),g=h.useRef(!0),b=h.useRef(f),x=$s(()=>new Map),S=h.useRef(new Set),[v,T]=h.useState(f),[N,C]=h.useState(f);bo(()=>{g.current=!1,b.current=f;for(let I=0;I<N.length;I++){const k=Un(N[I]);m.includes(k)?(x.delete(k),S.current.delete(k)):x.get(k)!==!0&&x.set(k,!1)}},[N,m.length,m.join("-")]);const D=[];if(f!==v){let I=[...f];for(let k=0;k<N.length;k++){const F=N[k],P=Un(F);m.includes(P)||(I.splice(k,0,F),D.push(F))}return o==="wait"&&D.length&&(I=D),C(tu(I)),T(f),null}process.env.NODE_ENV!=="production"&&o==="wait"&&N.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:M}=h.useContext(mo);return a.jsx(a.Fragment,{children:N.map(I=>{const k=Un(I),F=i&&!c?!1:f===N||m.includes(k),P=()=>{if(S.current.has(k))return;if(S.current.add(k),x.has(k))x.set(k,!0);else return;let A=!0;x.forEach(V=>{V||(A=!1)}),A&&(M==null||M(),C(b.current),i&&(w==null||w()),s&&s())};return a.jsx(wh,{isPresent:F,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:o,root:d,onExitComplete:F?void 0:P,anchorX:u,anchorY:l,children:I},k)})})},Vr=h.createContext({strict:!1}),su={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let ru=!1;function hh(){if(ru)return;const e={};for(const t in su)e[t]={isEnabled:n=>su[t].some(s=>!!n[s])};zi(e),ru=!0}function au(){return hh(),Lp()}function ou(e){const t=au();for(const n in e)t[n]={...t[n],...e[n]};zi(t)}function iu({children:e,features:t,strict:n=!1}){const[,s]=h.useState(!Or(t)),r=h.useRef(void 0);if(!Or(t)){const{renderer:o,...i}=t;r.current=o,ou(i)}return h.useEffect(()=>{Or(t)&&t().then(({renderer:o,...i})=>{ou(i),r.current=o,s(!0)})},[]),a.jsx(Vr.Provider,{value:{renderer:r.current,strict:n},children:e})}function Or(e){return typeof e=="function"}const mh=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function jn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||mh.has(e)}let uu=e=>!jn(e);function gh(e){typeof e=="function"&&(uu=t=>t.startsWith("on")?!jn(t):e(t))}try{gh(require("@emotion/is-prop-valid").default)}catch{}function bh(e,t,n){const s={};for(const r in e)r==="values"&&typeof e.values=="object"||(uu(r)||n===!0&&jn(r)||!t&&!jn(r)||e.draggable&&r.startsWith("onDrag"))&&(s[r]=e[r]);return s}const Gn=h.createContext({});function yh(e,t){if($n(e)){const{initial:n,animate:s}=e;return{initial:n===!1||Rt(n)?n:void 0,animate:Rt(s)?s:void 0}}return e.inherit!==!1?t:{}}function xh(e){const{initial:t,animate:n}=yh(e,h.useContext(Gn));return h.useMemo(()=>({initial:t,animate:n}),[lu(t),lu(n)])}function lu(e){return Array.isArray(e)?e.join(" "):e}const Fr=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cu(e,t,n){for(const s in t)!me(t[s])&&!ji(s,n)&&(e[s]=t[s])}function vh({transformTemplate:e},t){return h.useMemo(()=>{const n=Fr();return kr(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Nh(e,t){const n=e.style||{},s={};return cu(s,n,e),Object.assign(s,vh(e,t)),s}function Sh(e,t){const n={},s=Nh(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}const du=()=>({...Fr(),attrs:{}});function Ch(e,t,n,s){const r=h.useMemo(()=>{const o=du();return Gi(o,t,Yi(s),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};cu(o,e.style,e),r.style={...o,...r.style}}return r}const Th=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Lr(e){return typeof e!="string"||e.includes("-")?!1:!!(Th.indexOf(e)>-1||/[A-Z]/u.test(e))}function Eh(e,t,n,{latestValues:s},r,o=!1,i){const l=(i??Lr(e)?Ch:Sh)(t,s,r,e),d=bh(t,typeof e=="string",o),c=e!==h.Fragment?{...d,...l,ref:n}:{},{children:w}=t,f=h.useMemo(()=>me(w)?w.get():w,[w]);return h.createElement(e,{...c,children:f})}function Mh({scrapeMotionValuesFromProps:e,createRenderState:t},n,s,r){return{latestValues:Ih(n,s,r,e),renderState:t()}}function Ih(e,t,n,s){const r={},o=s(e,{});for(const f in o)r[f]=ih(o[f]);let{initial:i,animate:u}=e;const l=$n(e),d=Wi(e);t&&d&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),u===void 0&&(u=t.animate));let c=n?n.initial===!1:!1;c=c||i===!1;const w=c?u:i;if(w&&typeof w!="boolean"&&!zn(w)){const f=Array.isArray(w)?w:[w];for(let m=0;m<f.length;m++){const g=xr(e,f[m]);if(g){const{transitionEnd:b,transition:x,...S}=g;for(const v in S){let T=S[v];if(Array.isArray(T)){const N=c?T.length-1:0;T=T[N]}T!==null&&(r[v]=T)}for(const v in b)r[v]=b[v]}}}return r}const wu=e=>(t,n)=>{const s=h.useContext(Gn),r=h.useContext(Dn),o=()=>Mh(e,t,s,r);return n?o():$s(o)},Ah=wu({scrapeMotionValuesFromProps:Pr,createRenderState:Fr}),Dh=wu({scrapeMotionValuesFromProps:Xi,createRenderState:du}),kh=Symbol.for("motionComponentSymbol");function Ph(e,t,n){const s=h.useRef(n);h.useInsertionEffect(()=>{s.current=n});const r=h.useRef(null);return h.useCallback(o=>{var u;o&&((u=e.onMount)==null||u.call(e,o)),t&&(o?t.mount(o):t.unmount());const i=s.current;if(typeof i=="function")if(o){const l=i(o);typeof l=="function"&&(r.current=l)}else r.current?(r.current(),r.current=null):i(o);else i&&(i.current=o)},[t])}const _h=h.createContext({});function Vh(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Oh(e,t,n,s,r,o){var T,N;const{visualElement:i}=h.useContext(Gn),u=h.useContext(Vr),l=h.useContext(Dn),d=h.useContext(_r),c=d.reducedMotion,w=d.skipAnimations,f=h.useRef(null),m=h.useRef(!1);s=s||u.renderer,!f.current&&s&&(f.current=s(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:w,isSVG:o}),m.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const g=f.current,b=h.useContext(_h);g&&!g.projection&&r&&(g.type==="html"||g.type==="svg")&&Fh(f.current,n,r,b);const x=h.useRef(!1);h.useInsertionEffect(()=>{g&&x.current&&g.update(n,l)});const S=n[Ni],v=h.useRef(!!S&&!((T=window.MotionHandoffIsComplete)!=null&&T.call(window,S))&&((N=window.MotionHasOptimisedAnimation)==null?void 0:N.call(window,S)));return bo(()=>{m.current=!0,g&&(x.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),v.current&&g.animationState&&g.animationState.animateChanges())}),h.useEffect(()=>{g&&(!v.current&&g.animationState&&g.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,S)}),v.current=!1),g.enteringChildren=void 0)}),g}function Fh(e,t,n,s){const{layoutId:r,layout:o,drag:i,dragConstraints:u,layoutScroll:l,layoutRoot:d,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:fu(e.parent)),e.projection.setOptions({layoutId:r,layout:o,alwaysMeasureLayout:!!i||u&&Vh(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:d})}function fu(e){if(e)return e.options.allowProjection!==!1?e.projection:fu(e.parent)}function Lh(e,{forwardMotionProps:t=!1,type:n}={},s,r){const o=n?n==="svg":Lr(e),i=o?Dh:Ah;function u(d,c){let w;const f={...h.useContext(_r),...d,layoutId:Wh(d)},{isStatic:m}=f,g=xh(d),b=i(d,m);if(!m&&go){Bh(f,s);const x=qh(f);w=x.MeasureLayout,g.visualElement=Oh(e,b,f,r,x.ProjectionNode,o)}return a.jsxs(Gn.Provider,{value:g,children:[w&&g.visualElement?a.jsx(w,{visualElement:g.visualElement,...f}):null,Eh(e,d,Ph(b,g.visualElement,c),b,m,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=h.forwardRef(u);return l[kh]=e,l}function Wh({layoutId:e}){const t=h.useContext(mo).id;return t&&e!==void 0?t+"-"+e:e}function Bh(e,t){h.useContext(Vr).strict,process.env.NODE_ENV}function qh(e){const t=au(),{drag:n,layout:s}=t;if(!n&&!s)return{};const r={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(e)||s!=null&&s.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const zh=(e,t)=>t.isSVG??Lr(e)?new eh(t):new Yp(t,{allowProjection:e!==h.Fragment});class $h extends _t{constructor(t){super(t),t.animationState||(t.animationState=ah(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();zn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let Hh=0;class Uh extends _t{constructor(){super(...arguments),this.id=Hh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const jh={animation:{Feature:$h},exit:{Feature:Uh}};function pu(e){return{point:{x:e.pageX,y:e.pageY}}}function hu(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,o=s[r];o&&We.postRender(()=>o(t,pu(t)))}class Gh extends _t{mount(){const{current:t}=this.node;t&&(this.unmount=Tp(t,(n,s)=>(hu(this.node,s,"Start"),r=>hu(this.node,r,"End"))))}unmount(){}}class Kh extends _t{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=kn(Ri(this.node.current,"focus",()=>this.onFocus()),Ri(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function mu(e,t,n){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),o=s[r];o&&We.postRender(()=>o(t,pu(t)))}class Yh extends _t{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Dp(t,(r,o)=>(mu(this.node,o,"Start"),(i,{success:u})=>mu(this.node,i,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const Wr=new WeakMap,Br=new WeakMap,Xh=e=>{const t=Wr.get(e.target);t&&t(e)},Zh=e=>{e.forEach(Xh)};function Jh({root:e,...t}){const n=e||document;Br.has(n)||Br.set(n,{});const s=Br.get(n),r=JSON.stringify(t);return s[r]||(s[r]=new IntersectionObserver(Zh,{root:e,...t})),s[r]}function Qh(e,t,n){const s=Jh(t);return Wr.set(e,n),s.observe(e),()=>{Wr.delete(e),s.unobserve(e)}}const Rh={some:0,all:1};class em extends _t{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:r="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:s,threshold:typeof r=="number"?r:Rh[r]},u=l=>{const{isIntersecting:d}=l;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:c,onViewportLeave:w}=this.node.getProps(),f=d?c:w;f&&f(l)};return Qh(this.node.current,i,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(tm(t,n))&&this.startObserver()}unmount(){}}function tm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const gu={renderer:zh,...jh,...{inView:{Feature:em},tap:{Feature:Yh},focus:{Feature:Kh},hover:{Feature:Gh}}};function nm(e,t){return Lh(e,t)}const bu=nm("div"),sm=e=>{const{checked:t,onSelect:n,children:s,disabled:r,preventCloseOnSelect:o}=e;return a.jsx(uo,{disabled:r,checked:t,onCheckedChange:n,onSelect:i=>o&&i.preventDefault(),children:s})},Kn=e=>{const{children:t,className:n,Icon:s,iconPosition:r="left",disabled:o,onSelect:i,preventCloseOnSelect:u}=e,l=p("wu-flex wu-items-center wu-gap-2",s&&(r==="left"?"":"wu-justify-between wu-flex-row-reverse"),n),d=c=>{i&&i(c),u&&c.preventDefault()};return a.jsxs(In,{onSelect:d,disabled:o,className:l,children:[s&&a.jsx("div",{className:"wu-text-base",children:s}),t]})},rm=e=>{const{children:t,Label:n,...s}=e;return a.jsxs(ao,{...s,children:[a.jsx(Ut,{children:n||e.label}),t]})},am=e=>{const{options:t,value:n,onSelect:s}=e;return a.jsx(Qd,{value:n,onValueChange:s,children:t.map(r=>a.jsx(lo,{value:r.value,disabled:r.disabled,children:r.Label||r.label},r.value))})},om=e=>{const{className:t,...n}=e,s=p("wu-w-11/12 wu-mx-auto wu-border-gray-40",t);return a.jsx(An,{...n,className:s})},Vt=y.forwardRef(({className:e,children:t,thumbColor:n,railColor:s,...r},o)=>a.jsxs(it.Root,{ref:o,className:p("wu-relative wu-overflow-hidden",e),children:[a.jsx(it.Viewport,{className:"wu-h-full wu-w-full wu-rounded-[inherit]",...r,children:t}),a.jsx(qr,{thumbColor:n,railColor:s}),a.jsx(it.Corner,{})]}));Vt.displayName=it.Root.displayName;const qr=y.forwardRef(({className:e,orientation:t="vertical",thumbColor:n="#d4d4d4",railColor:s="#eeeeee",...r},o)=>a.jsx(it.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("wu-flex wu-touch-none wu-select-none wu-transition-colors",t==="vertical"&&"wu-h-full wu-w-2 wu-border-l wu-border-l-transparent wu-p-[1px]",t==="horizontal"&&"wu-h-2 wu-flex-col wu-border-t wu-border-t-transparent wu-p-[1px]",e),style:{background:s},...r,children:a.jsx(it.ScrollAreaThumb,{className:"wu-relative wu-flex-1 wu-rounded-full",style:{background:n}})}));qr.displayName=it.ScrollAreaScrollbar.displayName;const im=e=>{const{children:t,label:n,Label:s,open:r,onOpenChange:o,height:i,dir:u,...l}=e;return a.jsxs(Jd,{...l,open:r,onOpenChange:o,children:[a.jsx(oo,{dir:u,children:s||n}),a.jsx(Zd,{children:a.jsx(io,{onInteractOutside:d=>d.preventDefault(),children:a.jsx(Vt,{className:"wu-h-fit",style:{height:i},dir:u,children:t})})})]})},um="wu-p-1.5 wu-cursor-pointer hover:wu-bg-gray-20 wu-border-gray-40 wu-transition wu-duration-300 focus:wu-outline-2 focus:wu-outline-offset focus:wu-outline-blue-p/80 focus:wu-bg-gray-20 hover:wu-bg-gray-20 wu-rounded-t-sm",zr=e=>{const{children:t,menuTitle:n,MenuTitle:s,variant:r="flat",name:o,open:i,onOpenChange:u,height:l,preventCloseOnClickOutside:d,dir:c,Trigger:w,align:f="start",sideOffset:m=0,side:g="bottom",alignOffset:b,className:x,disabled:S,...v}=e;return a.jsxs(so,{...v,open:i,onOpenChange:u,dir:c,children:[a.jsx(ro,{asChild:!0,dir:c,disabled:S,className:p("disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent"),children:w??lm(r,o,S)}),a.jsx(qs,{className:p("wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40",x,"wu-menu-content"),align:f,sideOffset:m,side:g,alignOffset:b,onInteractOutside:T=>d&&T.preventDefault(),children:a.jsxs(Vt,{className:"h-fit",style:{height:l},dir:c,children:[(n||s)&&a.jsxs(a.Fragment,{children:[a.jsx(Ut,{dir:c,className:"wu-menu-title",children:s||n}),a.jsx(An,{className:"wu-mt-0 wu-menu-separator",dir:c})]}),t??a.jsx("p",{children:"Menu Is Empty"})]})})]})},lm=(e,t,n)=>{const s=p(um,"wu-flex wu-items-center wu-justify-between wu-gap-2 wu-h-8 wu-text-xs wu-group/wuMenu",e==="outlined"?"wu-border":"wu-border-b","wu-trigger-btn");return a.jsxs("button",{className:s,"aria-label":"menu-trigger",children:[a.jsx("span",{children:t??"Menu"}),a.jsx("span",{className:p("wm-arrow-drop-down wu-text-gray-lead wu-text-base wu-rotate-180 group-data-[state=closed]/wuMenu:wu-rotate-0 wu-transition-transform wu-duration-300 group-hover:wu-text-blue-q",n&&"wu-text-zinc-300 group-hover:wu-text-zinc-300")})]})},cm=({titles:e,dir:t="ltr",handleTitleClick:n})=>{const[s,r]=h.useState(!1);return a.jsx(zr,{open:s,onOpenChange:r,align:t==="rtl"?"end":"start",Trigger:a.jsx(Ce,{variant:"iconOnly",className:"wu-w-6 wu-h-6 wu-shrink-0 wu-p-0",Icon:a.jsx("span",{className:p("wm-arrow-drop-down wu-w-5 wu-h-5 wu-transition-transform wu-duration-300",s&&"wu-rotate-180")})}),children:e.map(o=>a.jsx(Kn,{onSelect:i=>n(i,o.id),children:o.title},o.id))})},dm=({titles:e,currentLevel:t,initial:n,handleTitleClick:s,headerClasses:r,offsetHeight:o,dir:i="ltr"})=>{const u=h.useMemo(()=>i==="rtl"?{initial:{x:8,opacity:0,zIndex:0},animate:{x:0,opacity:1,zIndex:50},exit:{x:-8,opacity:0,zIndex:0}}:{initial:{x:-8,opacity:0,zIndex:0},animate:{x:0,opacity:1,zIndex:50},exit:{x:8,opacity:0,zIndex:0}},[i]);return a.jsxs("div",{className:p("wu-absolute wu-top-0 wu-left-0 wu-flex wu-gap-x-1 wu-px-4 wu-items-center wu-origin-left wu-w-full wu-transition",t!==n?"wu-translate-y-0 wu-opacity-100 wu-z-50 wu-delay-200":"wu-translate-y-1 wu-opacity-0 wu-z-0 wu-delay-0",r),style:{height:t!==n?`${o}px`:"-40px"},dir:i,children:[a.jsx(cm,{titles:e,handleTitleClick:s,dir:i}),a.jsx("div",{className:"wu-w-full wu-relative wu-h-full wu-flex wu-items-center wu-flex-nowrap wu-whitespace-nowrap wu-text-nowrap wu-gap-2 wu-overflow-x-auto wu-no-scrollbar wu-snap-x wu-snap-mandatory wu-scroll-smooth",children:a.jsx(iu,{features:gu,children:a.jsxs(nu,{initial:!1,mode:"popLayout",children:[wm(e).map((l,d)=>a.jsx(bu,{initial:u.initial,animate:u.animate,exit:u.exit,transition:{duration:.4,ease:"easeInOut"},children:a.jsxs("h6",{"data-id":l.id,onClick:s,className:p("wu-flex wu-text-sm wu-font-normal wu-items-center wu-gap-2 wu-h-6",d===2||d===1||l.id==="LEVEL_DOTS"?"wu-cursor-default wu-text-gray-600":"wu-cursor-pointer wu-text-[#1B87E6] wu-hover:text-[#145DBF]/70"),children:[d!==0&&a.jsx("span",{className:p("wm-chevron-right wu-text-[20px] wu-font-light",i==="rtl"&&"wu-rotate-180")}),l.title]})},l.id)),"``"]})})})]})},wm=e=>{const t=e.length;if(t>2){const n=e[0],s=e[t-1];return[n,{id:"LEVEL_DOTS",title:"..."},s]}return e},fm=({items:e,initial:t,baseTitle:n,mode:s="popLayout",headerClasses:r="",offsetHeight:o=40,variant:i="default",dir:u="ltr"})=>{const[l,d]=h.useState(n?[n]:[]),[[c,w],f]=h.useState([t,1]),m=(S,v)=>{v&&d([...l,v]),f([S,1])},g=S=>{const v=l.findIndex(T=>T.id===S);if(v!==-1){const T=l.slice(0,v+1);d(T)}f([S,-1])},b=(S,v)=>{const T=v||S.currentTarget.getAttribute("data-id")||"";if(T&&T!==c){const N=l.findIndex(C=>C.id===T);N!==-1&&(d(l.slice(0,N+1)),g(T))}},x=()=>{const S=e[c]?e[c]:null;if(!S)return a.jsx("div",{className:"wu-absolute wu-inset-0 wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center",children:a.jsx("p",{className:"wu-text-gray-500",children:"No content available."})});const v=typeof S.component=="function"?S.component({goNext:m,goBack:g}):S.component;return a.jsx(bu,{dir:u,custom:w,variants:pm(i),initial:"enter",animate:"center",exit:"exit",transition:{opacity:{duration:.325,ease:"easeInOut"},scale:{duration:.275,ease:"easeInOut"}},className:"wu-w-full wu-h-full",style:{paddingTop:c!==t?`${o}px`:"0px"},children:v},c)};return a.jsxs("div",{dir:u,className:"wu-w-full wu-h-full wu-relative wu-overflow-hidden wu-flex wu-flex-col",children:[a.jsx(dm,{titles:l,currentLevel:c,initial:t,handleTitleClick:b,headerClasses:r,offsetHeight:o,dir:u}),a.jsx(iu,{features:gu,children:a.jsx(nu,{initial:!1,custom:w,mode:s,children:x()})})]})},pm=e=>{switch(e){case"slideRight":return mm;case"slideLeft":return gm;case"fadeZoom":return bm;case"default":default:return hm}},hm={enter:e=>({scale:e>0?.825:1.1,opacity:0,zIndex:0}),center:{scale:1,opacity:1,zIndex:1},exit:e=>({scale:e>0?1.1:.825,opacity:0,zIndex:0})},mm={enter:e=>({x:e>0?-15:15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?15:-15,opacity:0,zIndex:0})},gm={enter:e=>({x:e>0?15:-15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?-15:15,opacity:0,zIndex:0})},bm={enter:e=>({opacity:0,zIndex:0,scale:e>0?.925:1.1}),center:{opacity:1,zIndex:1,scale:1},exit:{opacity:0,zIndex:0,scale:1}},yu=({className:e,isLoading:t,loadingText:n,children:s,...r})=>a.jsxs("footer",{className:p("wu-flex wu-items-center wu-justify-between wu-gap-2 wu-border-t wu-border-gray-10 wu-py-3 wu-px-4 wu-bg-white/80 wu-backdrop-blur-sm wu-text-xs wu-font-normal wu-text-gray-footer wu-sticky wu-bottom-0",e),...r,children:[a.jsx("div",{className:"wu-flex-1",children:s}),t&&a.jsx(St,{size:"16px",variant:"spinner",color:"#a3a3a3",message:n})]});yu.displayName="WuFooter";const xu=h.forwardRef((e,t)=>{const{size:n="sm",idOrSlugOrUrl:s,variant:r="primary",...o}=e,i=n==="sm"?16:18,u=s.includes("http")?s:`/help/${s}.html`,l=r==="primary"?"wu-text-blue-p":"wu-text-gray-lead";return a.jsx("button",{...o,ref:t,onClick:()=>vs(u),children:a.jsx("span",{className:p("wm-help wu-text-gray-subtle",`wu-text-[${i}px]`,l,o.disabled&&"wu-text-neutral-300","wu-help-button-icon")})})});xu.displayName="WuHelpButton";const et=(e,t)=>`wu-listbox-${e}`;function ym(e){const{option:t,accessorKey:n,onSelect:s,multiple:r,dir:o,GroupLabel:i,Item:u,isSelected:l,...d}=e,c=n.group&&Array.isArray(t[n.group]),w=({item:f,className:m})=>h.createElement(Ht,{...d,key:JSON.stringify(f),onSelect:()=>s==null?void 0:s(f),value:t[n.value],className:p("data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",!!(l!=null&&l(f))&&!r&&"wu-bg-blue-p/10",o==="rtl"&&"wu-justify-end",m,et("item")),disabled:f.disabled},r&&a.jsx(Fe,{checked:l==null?void 0:l(f)}),u?u({value:f,isSelected:l==null?void 0:l(f)}):a.jsx(a.Fragment,{children:f[n.label]}));if(c){const f=t[n.group],m=typeof i=="string"?t[i]:i==null?void 0:i(t);return a.jsx($t,{heading:m,children:f==null?void 0:f.map(g=>a.jsx(w,{item:g,className:"wu-pl-6"},JSON.stringify(g)))})}return a.jsx(w,{item:t})}const xm=h.memo(ym),vm=e=>{const{className:t,...n}=e;return a.jsxs("div",{className:"wu-relative",children:[a.jsx(Ve,{icon:"wm-search",className:"wu-absolute wu-top-[14px] wu-left-5"}),a.jsx(to,{...n,"aria-label":"Search",className:p("wu-bg-gray-10 wu-border-b wu-border-gray-subtle wu-rounded-none wu-rounded-t-sm wu-h-8 wu-my-2 wu-pl-8","focus:wu-border-blue-p focus-visible:wu-outline-none;",et("input"),t)})]})},Nm=e=>{const{label:t,onSelectAll:n,data:s,value:r}=e,[o,i]=h.useState(!1),[u,l]=h.useState(!1);return h.useEffect(()=>{!r||!s||(i(r.length>0),l(r.length>0&&r.length<s.length))},[s,r]),a.jsxs(Ht,{className:"data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",onSelect:()=>n==null?void 0:n(!o),children:[a.jsx(Fe,{checked:o,partial:u}),t||"Select All"]})},Sm=e=>{const{CustomTrigger:t,disabled:n,value:s,placeholder:r,accessorKey:o,Chip:i,handleUnselect:u,variant:l,dir:d,className:c,...w}=e,[f,m]=h.useState(),g=h.useRef(null);return h.useEffect(()=>{if(!s){m(null);return}m(Array.isArray(s)?i?s.map((x,S)=>i({value:x,unselect:u,key:S})):s.map(x=>x[o.label]).join(", "):i?i({value:s,unselect:u}):s[o.label])},[s,i,o.label,m]),a.jsx(lt,{asChild:!0,id:e.id,disabled:n,ref:g,children:(t==null?void 0:t(s))||a.jsxs("button",{...w,className:p("wu-group/wuListbox wu-relative wu-min-h-8 wu-text-xs wu-border-gray-subtle wu-bg-gray-10 wu-p-1 wu-pl-2 rtl:wu-pr-2 wu-border-b wu-w-full wu-text-left wu-pr-5 rtl:wu-pl-5","hover:wu-border-blue-p","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","rtl:wu-text-right",l==="outlined"&&"wu-border wu-border-gray-subtle wu-bg-white",c,et("trigger")),children:[a.jsx("div",{className:p("wu-truncate",i&&"wu-flex wu-items-center wu-gap-1 wu-flex-wrap",!f&&"wu-font-light"),children:f||r}),a.jsx(Ve,{icon:"wm-arrow-drop-down",className:p("wu-absolute wu-top-1 wm-arrow-drop-down group-data-[state=open]/wuListbox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base",d==="rtl"?"wu-left-1":"wu-right-1",et("drop-icon"))})]})})},vu=(e,t,n)=>{const s=String(e[n.label]??"").toLowerCase(),r=String(e[n.value]??"").toLowerCase();return s.includes(t)||r.includes(t)},Cm=(e,t,n)=>{const s=t.trim();if(s==="")return e;const r=s.toLowerCase(),o=[];for(const i of e){const u=n.group,l=u?i[u]:void 0;if(Array.isArray(l)){const d=l.filter(c=>vu(c,r,n));d.length>0&&o.push({...i,[u]:d})}else vu(i,r,n)&&o.push(i)}return o},Tm=e=>{const{data:t,accessorKey:n,value:s,Item:r,Label:o,GroupLabel:i,CustomHeader:u,CustomTrigger:l,NoDataContent:d,Chip:c,onSelect:w,onScroll:f,disabled:m,multiple:g,searchable:b,selectAll:x,virtualizedThreshold:S=100,id:v,dir:T,className:N,listClass:C,placeholder:D="Select items...",variant:M,labelPosition:I="top",maxContentWidth:k,maxContentHeight:F,modal:P,...A}=e,[V,W]=h.useState(!1),[_,q]=h.useState(""),[B,U]=h.useState(s),$=h.useMemo(()=>n,[n]),H=h.useMemo(()=>{if(!b||!_)return t;const X=_.toLowerCase().trim();return Cm(t,X,n)},[t,_,n.label,b]),pe=X=>{g?U(L=>{const j=X[n.value],K=Array.isArray(L)?L:[],J=K.some(ie=>ie[n.value]===j)?K.filter(ie=>ie[n.value]!==j):[...K,X];return w&&w(J),J}):(U(X),w&&w(X),W(!1))},de=h.useCallback(X=>{const L=X?t:[];U(L),x!=null&&x.onSelectAll&&x.onSelectAll(X),w&&w(L)},[t,x,w]),Ae=X=>Array.isArray(B)?B.some(L=>L[n.value]===X[n.value]):(B==null?void 0:B[n.value])===X[n.value];h.useEffect(()=>{U(s)},[s]);const ge=X=>{const L=j=>a.jsx(xm,{option:j,accessorKey:$,multiple:g,onSelect:K=>pe(K),dir:T,GroupLabel:i,Item:r,isSelected:K=>Ae(K)},JSON.stringify(j));return X.length>S?a.jsx(Ct,{list:X,callback:(j,K)=>L(K),dir:T}):X.map(L)};return a.jsxs("div",{className:p("wu-flex wu-text-sm wu-gap-2",I==="top"&&"wu-flex-col wu-gap-1",I==="left"&&"wu-flex-row",I==="right"&&"wu-flex-row-reverse",et("container")),dir:T,children:[o&&a.jsx(Te,{htmlFor:v,className:et("label"),children:o}),a.jsxs(ze,{open:V,onOpenChange:X=>{W(X),X||setTimeout(()=>{q("")},100)},modal:P,children:[a.jsx(Sm,{CustomTrigger:l,disabled:m,value:B,accessorKey:n,placeholder:D,Chip:c,className:N,handleUnselect:pe,variant:M,id:v,dir:T,...A}),a.jsx(Oe,{className:p("wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-w-auto wu-p-0 wu-bg-white wu-border wu-border-blue-p",et("content")),align:"start",sideOffset:-1,style:{maxWidth:k},children:a.jsxs(Ls,{id:e.id,shouldFilter:!1,children:[b&&a.jsx(vm,{value:_,onValueChange:q}),u,a.jsxs(Ws,{className:p("wu-overflow-y-auto",et("list"),C),onScroll:f,style:{maxHeight:F||"420px"},children:[a.jsx(Bs,{children:d||"No results found."}),a.jsx($t,{children:g&&(x==null?void 0:x.enabled)&&!_&&a.jsx(Nm,{data:t,value:B,onSelectAll:de,label:x.label})}),a.jsx($t,{children:ge(H)})]})]})})]})]})},$r=h.forwardRef(({showMenu:e=!1,className:t,color:n="#1B3380",...s},r)=>{const o=p("wu-w-full wu-border wu-transition-all wu-duration-300");return a.jsxs("div",{...s,className:p("wu-flex wu-flex-col wu-w-[18px] wu-justify-between wu-aspect-[3/2] wu-transition-all wu-duration-300",t),ref:r,"aria-label":"menu-icon",children:[a.jsx("div",{className:`${o} wu-origin-center ${e?"wu-rotate-45 wu-translate-y-[5px]":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} ${e?"wu-opacity-0":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} wu-origin-center ${e?"-wu-rotate-45 -wu-translate-y-[5px]":""}`,style:{borderColor:n}})]})});$r.displayName="WuMenuIcon";const Nu={overlay:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0",content:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[state=closed]:wu-slide-out-to-left-1/2 data-[state=closed]:wu-slide-out-to-top-[48%] data-[state=open]:wu-slide-in-from-left-1/2 data-[state=open]:wu-slide-in-from-top-[48%]"},Su=R.Root,Cu=R.Trigger,Em=R.Portal,Mm=R.Close,Tu=h.forwardRef(({className:e,...t},n)=>a.jsx(R.Overlay,{ref:n,className:p("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30",Nu.overlay,e),...t}));Tu.displayName=R.Overlay.displayName;const Hr=h.forwardRef(({className:e,children:t,hideCloseButton:n,isStackedCard:s,...r},o)=>a.jsxs(Em,{children:[a.jsx(Tu,{className:s?"wu-bg-transparent":""}),a.jsxs(R.Content,{ref:o,className:p("wu-fixed wu-left-[50%] wu-z-50 wu-top-[50%] wu-flex wu-flex-col wu-w-full wu-max-w-lg wu-translate-x-[-50%] wu-translate-y-[-50%] wu-bg-white wu-shadow-lg wu-duration-200",Nu.content,e),...r,children:[t,!n&&a.jsx(R.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Nt,{variant:"iconOnly",className:p("wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-top-3 wu-right-4 wu-p-1.5","group-data-[variant=action]:wu-text-blue-q","group-data-[variant=upgrade]:wu-text-yellow-deep","group-data-[variant=critical]:wu-text-red-deep"),children:[a.jsx("span",{className:"wm-close wu-text-xl wu-leading-5"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));Hr.displayName=R.Content.displayName;const Ur=({className:e,...t})=>a.jsx("div",{className:p("wu-text-center wu-bg-gray-20 wu-w-full",e),...t});Ur.displayName="DialogHeader";const Eu=({className:e,...t})=>a.jsx("div",{className:p("wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4",e),...t});Eu.displayName="DialogFooter";const jr=h.forwardRef(({className:e,...t},n)=>a.jsx(R.Title,{ref:n,className:p("wu-text-lg wu-font-medium wu-flex wu-items-center wu-justify-center wu-gap-1 wu-h-10 wu-leading-none wu-tracking-tight",e),...t}));jr.displayName=R.Title.displayName;const Im=h.forwardRef(({className:e,...t},n)=>a.jsx(R.Description,{ref:n,className:p("wu-text-sm wu-text-muted-foreground",e),...t}));Im.displayName=R.Description.displayName;const Am={gradientBackground:"_gradientBackground_1uc4j_1"},Mu=e=>{const{colors:t,size:n=.55,children:s,className:r,strokeWidth:o,centerOffset:i={x:0,y:0},...u}=e,l=h.useRef(null);return h.useEffect(()=>{const d=l.current;if(d){d.style.setProperty("--width",`${d.offsetWidth*n}px`),d.style.setProperty("--height",`${d.offsetHeight*n}px`),d.style.setProperty("--colors",t.join(",")),d.style.setProperty("--stroke-width",`-${o||2}px`),d.style.setProperty("--spotlight-background","radial-gradient(100% var(--height) ellipse at 25% 70%, var(--colors))");let w;const f=m=>{w&&cancelAnimationFrame(w),w=requestAnimationFrame(()=>{const g=d.getBoundingClientRect();let b=m.clientX-g.left,x=m.clientY-g.top;b=Math.max(0,Math.min(b+i.x,g.width)),x=Math.max(0,Math.min(x+i.y,g.height));const S=`radial-gradient(
|
|
13
|
-
var(--width) var(--height) ellipse at ${b}px ${
|
|
15
|
+
`),()=>{k.contains(T)&&k.removeChild(T)}},[t]),a.jsx(im,{isPresent:t,childRef:u,sizeRef:l,pop:o,children:o===!1?e:y.cloneElement(e,{ref:w})})}const lm=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:i,anchorX:u,anchorY:l,root:d})=>{const c=ns(cm),w=h.useId();let f=!0,m=h.useMemo(()=>(f=!1,{id:w,initial:t,isPresent:n,custom:s,onExitComplete:g=>{c.set(g,!0);for(const b of c.values())if(!b)return;r&&r()},register:g=>(c.set(g,!1),()=>c.delete(g))}),[n,c,r]);return o&&f&&(m={...m}),h.useMemo(()=>{c.forEach((g,b)=>c.set(b,!1))},[n]),y.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=a.jsx(um,{pop:i==="popLayout",isPresent:n,anchorX:u,anchorY:l,root:d,children:e}),a.jsx($n.Provider,{value:m,children:e})};function cm(){return new Map}function dm(e=!0){const t=h.useContext($n);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=h.useId();h.useEffect(()=>{if(e)return s(o)},[e]);const i=h.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}const tr=e=>e.key||"";function Vu(e){const t=[];return h.Children.forEach(e,n=>{h.isValidElement(n)&&t.push(n)}),t}const Ou=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:i=!1,anchorX:u="left",anchorY:l="top",root:d})=>{const[c,w]=dm(i),f=h.useMemo(()=>Vu(e),[e]),m=i&&!c?[]:f.map(tr),g=h.useRef(!0),b=h.useRef(f),v=ns(()=>new Map),S=h.useRef(new Set),[N,C]=h.useState(f),[x,T]=h.useState(f);Jo(()=>{g.current=!1,b.current=f;for(let M=0;M<x.length;M++){const D=tr(x[M]);m.includes(D)?(v.delete(D),S.current.delete(D)):v.get(D)!==!0&&v.set(D,!1)}},[x,m.length,m.join("-")]);const k=[];if(f!==N){let M=[...f];for(let D=0;D<x.length;D++){const V=x[D],P=tr(V);m.includes(P)||(M.splice(D,0,V),k.push(V))}return o==="wait"&&k.length&&(M=k),T(Vu(M)),C(f),null}process.env.NODE_ENV!=="production"&&o==="wait"&&x.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:A}=h.useContext(Xo);return a.jsx(a.Fragment,{children:x.map(M=>{const D=tr(M),V=i&&!c?!1:f===x||m.includes(D),P=()=>{if(S.current.has(D))return;if(S.current.add(D),v.has(D))v.set(D,!0);else return;let I=!0;v.forEach(_=>{_||(I=!1)}),I&&(A==null||A(),T(b.current),i&&(w==null||w()),r&&r())};return a.jsx(lm,{isPresent:V,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:d,onExitComplete:V?void 0:P,anchorX:u,anchorY:l,children:M},D)})})},Ys=h.createContext({strict:!1}),Fu={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Lu=!1;function wm(){if(Lu)return;const e={};for(const t in Fu)e[t]={isEnabled:n=>Fu[t].some(r=>!!n[r])};vu(e),Lu=!0}function Wu(){return wm(),Vh()}function Bu(e){const t=Wu();for(const n in e)t[n]={...t[n],...e[n]};vu(t)}function qu({children:e,features:t,strict:n=!1}){const[,r]=h.useState(!Xs(t)),s=h.useRef(void 0);if(!Xs(t)){const{renderer:o,...i}=t;s.current=o,Bu(i)}return h.useEffect(()=>{Xs(t)&&t().then(({renderer:o,...i})=>{Bu(i),s.current=o,r(!0)})},[]),a.jsx(Ys.Provider,{value:{renderer:s.current,strict:n},children:e})}function Xs(e){return typeof e=="function"}const fm=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function nr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fm.has(e)}let $u=e=>!nr(e);function pm(e){typeof e=="function"&&($u=t=>t.startsWith("on")?!nr(t):e(t))}try{pm(require("@emotion/is-prop-valid").default)}catch{}function hm(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||($u(s)||n===!0&&nr(s)||!t&&!nr(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const rr=h.createContext({});function mm(e,t){if(Rn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ln(n)?n:void 0,animate:ln(r)?r:void 0}}return e.inherit!==!1?t:{}}function gm(e){const{initial:t,animate:n}=mm(e,h.useContext(rr));return h.useMemo(()=>({initial:t,animate:n}),[zu(t),zu(n)])}function zu(e){return Array.isArray(e)?e.join(" "):e}const Zs=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Hu(e,t,n){for(const r in t)!me(t[r])&&!Cu(r,n)&&(e[r]=t[r])}function bm({transformTemplate:e},t){return h.useMemo(()=>{const n=Zs();return js(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ym(e,t){const n=e.style||{},r={};return Hu(r,n,e),Object.assign(r,bm(e,t)),r}function vm(e,t){const n={},r=ym(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Uu=()=>({...Zs(),attrs:{}});function xm(e,t,n,r){const s=h.useMemo(()=>{const o=Uu();return Tu(o,t,Mu(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Hu(o,e.style,e),s.style={...o,...s.style}}return s}const Nm=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Js(e){return typeof e!="string"||e.includes("-")?!1:!!(Nm.indexOf(e)>-1||/[A-Z]/u.test(e))}function Sm(e,t,n,{latestValues:r},s,o=!1,i){const l=(i??Js(e)?xm:vm)(t,r,s,e),d=hm(t,typeof e=="string",o),c=e!==h.Fragment?{...d,...l,ref:n}:{},{children:w}=t,f=h.useMemo(()=>me(w)?w.get():w,[w]);return h.createElement(e,{...c,children:f})}function Cm({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:Tm(n,r,s,e),renderState:t()}}function Tm(e,t,n,r){const s={},o=r(e,{});for(const f in o)s[f]=sm(o[f]);let{initial:i,animate:u}=e;const l=Rn(e),d=gu(e);t&&d&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),u===void 0&&(u=t.animate));let c=n?n.initial===!1:!1;c=c||i===!1;const w=c?u:i;if(w&&typeof w!="boolean"&&!Qn(w)){const f=Array.isArray(w)?w:[w];for(let m=0;m<f.length;m++){const g=Vs(e,f[m]);if(g){const{transitionEnd:b,transition:v,...S}=g;for(const N in S){let C=S[N];if(Array.isArray(C)){const x=c?C.length-1:0;C=C[x]}C!==null&&(s[N]=C)}for(const N in b)s[N]=b[N]}}}return s}const ju=e=>(t,n)=>{const r=h.useContext(rr),s=h.useContext($n),o=()=>Cm(e,t,r,s);return n?o():ns(o)},Em=ju({scrapeMotionValuesFromProps:Gs,createRenderState:Zs}),Mm=ju({scrapeMotionValuesFromProps:Iu,createRenderState:Uu}),Im=Symbol.for("motionComponentSymbol");function Dm(e,t,n){const r=h.useRef(n);h.useInsertionEffect(()=>{r.current=n});const s=h.useRef(null);return h.useCallback(o=>{var u;o&&((u=e.onMount)==null||u.call(e,o)),t&&(o?t.mount(o):t.unmount());const i=r.current;if(typeof i=="function")if(o){const l=i(o);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):i(o);else i&&(i.current=o)},[t])}const Am=h.createContext({});function km(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Pm(e,t,n,r,s,o){var C,x;const{visualElement:i}=h.useContext(rr),u=h.useContext(Ys),l=h.useContext($n),d=h.useContext(Ks),c=d.reducedMotion,w=d.skipAnimations,f=h.useRef(null),m=h.useRef(!1);r=r||u.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:w,isSVG:o}),m.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const g=f.current,b=h.useContext(Am);g&&!g.projection&&s&&(g.type==="html"||g.type==="svg")&&_m(f.current,n,s,b);const v=h.useRef(!1);h.useInsertionEffect(()=>{g&&v.current&&g.update(n,l)});const S=n[tu],N=h.useRef(!!S&&!((C=window.MotionHandoffIsComplete)!=null&&C.call(window,S))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,S)));return Jo(()=>{m.current=!0,g&&(v.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),N.current&&g.animationState&&g.animationState.animateChanges())}),h.useEffect(()=>{g&&(!N.current&&g.animationState&&g.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{var T;(T=window.MotionHandoffMarkAsComplete)==null||T.call(window,S)}),N.current=!1),g.enteringChildren=void 0)}),g}function _m(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:u,layoutScroll:l,layoutRoot:d,layoutCrossfade:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Gu(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||u&&km(u),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:d})}function Gu(e){if(e)return e.options.allowProjection!==!1?e.projection:Gu(e.parent)}function Vm(e,{forwardMotionProps:t=!1,type:n}={},r,s){const o=n?n==="svg":Js(e),i=o?Mm:Em;function u(d,c){let w;const f={...h.useContext(Ks),...d,layoutId:Om(d)},{isStatic:m}=f,g=gm(d),b=i(d,m);if(!m&&Zo){Fm(f,r);const v=Lm(f);w=v.MeasureLayout,g.visualElement=Pm(e,b,f,s,v.ProjectionNode,o)}return a.jsxs(rr.Provider,{value:g,children:[w&&g.visualElement?a.jsx(w,{visualElement:g.visualElement,...f}):null,Sm(e,d,Dm(b,g.visualElement,c),b,m,t,o)]})}u.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=h.forwardRef(u);return l[Im]=e,l}function Om({layoutId:e}){const t=h.useContext(Xo).id;return t&&e!==void 0?t+"-"+e:e}function Fm(e,t){h.useContext(Ys).strict,process.env.NODE_ENV}function Lm(e){const t=Wu(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const Wm=(e,t)=>t.isSVG??Js(e)?new Jh(t):new jh(t,{allowProjection:e!==h.Fragment});class Bm extends Vt{constructor(t){super(t),t.animationState||(t.animationState=nm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Qn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let qm=0;class $m extends Vt{constructor(){super(...arguments),this.id=qm++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const zm={animation:{Feature:Bm},exit:{Feature:$m}};function Ku(e){return{point:{x:e.pageX,y:e.pageY}}}function Yu(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&Be.postRender(()=>o(t,Ku(t)))}class Hm extends Vt{mount(){const{current:t}=this.node;t&&(this.unmount=Nh(t,(n,r)=>(Yu(this.node,r,"Start"),s=>Yu(this.node,s,"End"))))}unmount(){}}class Um extends Vt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=zn(Pu(this.node.current,"focus",()=>this.onFocus()),Pu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Xu(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&Be.postRender(()=>o(t,Ku(t)))}class jm extends Vt{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=Mh(t,(s,o)=>(Xu(this.node,o,"Start"),(i,{success:u})=>Xu(this.node,i,u?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const Qs=new WeakMap,Rs=new WeakMap,Gm=e=>{const t=Qs.get(e.target);t&&t(e)},Km=e=>{e.forEach(Gm)};function Ym({root:e,...t}){const n=e||document;Rs.has(n)||Rs.set(n,{});const r=Rs.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(Km,{root:e,...t})),r[s]}function Xm(e,t,n){const r=Ym(t);return Qs.set(e,n),r.observe(e),()=>{Qs.delete(e),r.unobserve(e)}}const Zm={some:0,all:1};class Jm extends Vt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:Zm[s]},u=l=>{const{isIntersecting:d}=l;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:c,onViewportLeave:w}=this.node.getProps(),f=d?c:w;f&&f(l)};return Xm(this.node.current,i,u)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Qm(t,n))&&this.startObserver()}unmount(){}}function Qm({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Zu={renderer:Wm,...zm,...{inView:{Feature:Jm},tap:{Feature:jm},focus:{Feature:Um},hover:{Feature:Hm}}};function Rm(e,t){return Vm(e,t)}const Ju=Rm("div"),eg=e=>{const{checked:t,onSelect:n,children:r,disabled:s,preventCloseOnSelect:o}=e;return a.jsx(zo,{disabled:s,checked:t,onCheckedChange:n,onSelect:i=>o&&i.preventDefault(),children:r})},sr=e=>{const{children:t,className:n,Icon:r,iconPosition:s="left",disabled:o,onSelect:i,preventCloseOnSelect:u}=e,l=p("wu-flex wu-items-center wu-gap-2",r&&(s==="left"?"":"wu-justify-between wu-flex-row-reverse"),n),d=c=>{i&&i(c),u&&c.preventDefault()};return a.jsxs(Bn,{onSelect:d,disabled:o,className:l,children:[r&&a.jsx("div",{className:"wu-text-base",children:r}),t]})},tg=e=>{const{children:t,Label:n,...r}=e;return a.jsxs(Bo,{...r,children:[a.jsx(Rt,{children:n||e.label}),t]})},ng=e=>{const{options:t,value:n,onSelect:r}=e;return a.jsx(Xw,{value:n,onValueChange:r,children:t.map(s=>a.jsx(Ho,{value:s.value,disabled:s.disabled,children:s.Label||s.label},s.value))})},rg=e=>{const{className:t,...n}=e,r=p("wu-w-11/12 wu-mx-auto wu-border-gray-40",t);return a.jsx(qn,{...n,className:r})},Ot=y.forwardRef(({className:e,children:t,thumbColor:n,railColor:r,...s},o)=>a.jsxs(it.Root,{ref:o,className:p("wu-relative wu-overflow-hidden",e),children:[a.jsx(it.Viewport,{className:"wu-h-full wu-w-full wu-rounded-[inherit]",...s,children:t}),a.jsx(ea,{thumbColor:n,railColor:r}),a.jsx(it.Corner,{})]}));Ot.displayName=it.Root.displayName;const ea=y.forwardRef(({className:e,orientation:t="vertical",thumbColor:n="#d4d4d4",railColor:r="#eeeeee",...s},o)=>a.jsx(it.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("wu-flex wu-touch-none wu-select-none wu-transition-colors",t==="vertical"&&"wu-h-full wu-w-2 wu-border-l wu-border-l-transparent wu-p-[1px]",t==="horizontal"&&"wu-h-2 wu-flex-col wu-border-t wu-border-t-transparent wu-p-[1px]",e),style:{background:r},...s,children:a.jsx(it.ScrollAreaThumb,{className:"wu-relative wu-flex-1 wu-rounded-full",style:{background:n}})}));ea.displayName=it.ScrollAreaScrollbar.displayName;const sg=e=>{const{children:t,label:n,Label:r,open:s,onOpenChange:o,height:i,dir:u,...l}=e;return a.jsxs(Yw,{...l,open:s,onOpenChange:o,children:[a.jsx(qo,{dir:u,children:r||n}),a.jsx(Kw,{children:a.jsx($o,{onInteractOutside:d=>d.preventDefault(),children:a.jsx(Ot,{className:"wu-h-fit",style:{height:i},dir:u,children:t})})})]})},ag="wu-p-1.5 wu-cursor-pointer hover:wu-bg-gray-20 wu-border-gray-40 wu-transition wu-duration-300 focus:wu-outline-2 focus:wu-outline-offset focus:wu-outline-blue-p/80 focus:wu-bg-gray-20 hover:wu-bg-gray-20 wu-rounded-t-sm",ta=e=>{const{children:t,menuTitle:n,MenuTitle:r,variant:s="flat",name:o,open:i,onOpenChange:u,height:l,preventCloseOnClickOutside:d,dir:c,Trigger:w,align:f="start",sideOffset:m=0,side:g="bottom",alignOffset:b,className:v,disabled:S,...N}=e;return a.jsxs(Lo,{...N,open:i,onOpenChange:u,dir:c,children:[a.jsx(Wo,{asChild:!0,dir:c,disabled:S,className:p("disabled:wu-text-zinc-300 disabled:wu-bg-white disabled:wu-cursor-not-allowed disabled:hover:wu-bg-transparent"),children:w??og(s,o,S)}),a.jsx(es,{className:p("wu-w-56 wu-border wu-border-blue-p disabled:wu-border-gray-40",v,"wu-menu-content"),align:f,sideOffset:m,side:g,alignOffset:b,onInteractOutside:C=>d&&C.preventDefault(),children:a.jsxs(Ot,{className:"h-fit",style:{height:l},dir:c,children:[(n||r)&&a.jsxs(a.Fragment,{children:[a.jsx(Rt,{dir:c,className:"wu-menu-title",children:r||n}),a.jsx(qn,{className:"wu-mt-0 wu-menu-separator",dir:c})]}),t??a.jsx("p",{children:"Menu Is Empty"})]})})]})},og=(e,t,n)=>{const r=p(ag,"wu-flex wu-items-center wu-justify-between wu-gap-2 wu-h-8 wu-text-xs wu-group/wuMenu",e==="outlined"?"wu-border":"wu-border-b","wu-trigger-btn");return a.jsxs("button",{className:r,"aria-label":"menu-trigger",children:[a.jsx("span",{children:t??"Menu"}),a.jsx("span",{className:p("wm-arrow-drop-down wu-text-gray-lead wu-text-base wu-rotate-180 group-data-[state=closed]/wuMenu:wu-rotate-0 wu-transition-transform wu-duration-300 group-hover:wu-text-blue-q",n&&"wu-text-zinc-300 group-hover:wu-text-zinc-300")})]})},ig=({titles:e,dir:t="ltr",handleTitleClick:n})=>{const[r,s]=h.useState(!1);return a.jsx(ta,{open:r,onOpenChange:s,align:t==="rtl"?"end":"start",Trigger:a.jsx(Te,{variant:"iconOnly",className:"wu-w-6 wu-h-6 wu-shrink-0 wu-p-0",Icon:a.jsx("span",{className:p("wm-arrow-drop-down wu-w-5 wu-h-5 wu-transition-transform wu-duration-300",r&&"wu-rotate-180")})}),children:e.map(o=>a.jsx(sr,{onSelect:i=>n(i,o.id),children:o.title},o.id))})},ug=({titles:e,currentLevel:t,initial:n,handleTitleClick:r,headerClasses:s,offsetHeight:o,dir:i="ltr"})=>{const u=h.useMemo(()=>i==="rtl"?{initial:{x:8,opacity:0,zIndex:0},animate:{x:0,opacity:1,zIndex:50},exit:{x:-8,opacity:0,zIndex:0}}:{initial:{x:-8,opacity:0,zIndex:0},animate:{x:0,opacity:1,zIndex:50},exit:{x:8,opacity:0,zIndex:0}},[i]);return a.jsxs("div",{className:p("wu-absolute wu-top-0 wu-left-0 wu-flex wu-gap-x-1 wu-px-4 wu-items-center wu-origin-left wu-w-full wu-transition",t!==n?"wu-translate-y-0 wu-opacity-100 wu-z-50 wu-delay-200":"wu-translate-y-1 wu-opacity-0 wu-z-0 wu-delay-0",s),style:{height:t!==n?`${o}px`:"-40px"},dir:i,children:[a.jsx(ig,{titles:e,handleTitleClick:r,dir:i}),a.jsx("div",{className:"wu-w-full wu-relative wu-h-full wu-flex wu-items-center wu-flex-nowrap wu-whitespace-nowrap wu-text-nowrap wu-gap-2 wu-overflow-x-auto wu-no-scrollbar wu-snap-x wu-snap-mandatory wu-scroll-smooth",children:a.jsx(qu,{features:Zu,children:a.jsxs(Ou,{initial:!1,mode:"popLayout",children:[lg(e).map((l,d)=>a.jsx(Ju,{initial:u.initial,animate:u.animate,exit:u.exit,transition:{duration:.4,ease:"easeInOut"},children:a.jsxs("h6",{"data-id":l.id,onClick:r,className:p("wu-flex wu-text-sm wu-font-normal wu-items-center wu-gap-2 wu-h-6",d===2||d===1||l.id==="LEVEL_DOTS"?"wu-cursor-default wu-text-gray-600":"wu-cursor-pointer wu-text-[#1B87E6] wu-hover:text-[#145DBF]/70"),children:[d!==0&&a.jsx("span",{className:p("wm-chevron-right wu-text-[20px] wu-font-light",i==="rtl"&&"wu-rotate-180")}),l.title]})},l.id)),"``"]})})})]})},lg=e=>{const t=e.length;if(t>2){const n=e[0],r=e[t-1];return[n,{id:"LEVEL_DOTS",title:"..."},r]}return e},cg=({items:e,initial:t,baseTitle:n,mode:r="popLayout",headerClasses:s="",offsetHeight:o=40,variant:i="default",dir:u="ltr"})=>{const[l,d]=h.useState(n?[n]:[]),[[c,w],f]=h.useState([t,1]),m=(S,N)=>{N&&d([...l,N]),f([S,1])},g=S=>{const N=l.findIndex(C=>C.id===S);if(N!==-1){const C=l.slice(0,N+1);d(C)}f([S,-1])},b=(S,N)=>{const C=N||S.currentTarget.getAttribute("data-id")||"";if(C&&C!==c){const x=l.findIndex(T=>T.id===C);x!==-1&&(d(l.slice(0,x+1)),g(C))}},v=()=>{const S=e[c]?e[c]:null;if(!S)return a.jsx("div",{className:"wu-absolute wu-inset-0 wu-w-full wu-h-full wu-flex wu-items-center wu-justify-center",children:a.jsx("p",{className:"wu-text-gray-500",children:"No content available."})});const N=typeof S.component=="function"?S.component({goNext:m,goBack:g}):S.component;return a.jsx(Ju,{dir:u,custom:w,variants:dg(i),initial:"enter",animate:"center",exit:"exit",transition:{opacity:{duration:.325,ease:"easeInOut"},scale:{duration:.275,ease:"easeInOut"}},className:"wu-w-full wu-h-full",style:{paddingTop:c!==t?`${o}px`:"0px"},children:N},c)};return a.jsxs("div",{dir:u,className:"wu-w-full wu-h-full wu-relative wu-overflow-hidden wu-flex wu-flex-col",children:[a.jsx(ug,{titles:l,currentLevel:c,initial:t,handleTitleClick:b,headerClasses:s,offsetHeight:o,dir:u}),a.jsx(qu,{features:Zu,children:a.jsx(Ou,{initial:!1,custom:w,mode:r,children:v()})})]})},dg=e=>{switch(e){case"slideRight":return fg;case"slideLeft":return pg;case"fadeZoom":return hg;case"default":default:return wg}},wg={enter:e=>({scale:e>0?.825:1.1,opacity:0,zIndex:0}),center:{scale:1,opacity:1,zIndex:1},exit:e=>({scale:e>0?1.1:.825,opacity:0,zIndex:0})},fg={enter:e=>({x:e>0?-15:15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?15:-15,opacity:0,zIndex:0})},pg={enter:e=>({x:e>0?15:-15,opacity:0,zIndex:0}),center:{x:0,opacity:1,zIndex:1},exit:e=>({x:e>0?-15:15,opacity:0,zIndex:0})},hg={enter:e=>({opacity:0,zIndex:0,scale:e>0?.925:1.1}),center:{opacity:1,zIndex:1,scale:1},exit:{opacity:0,zIndex:0,scale:1}},Qu=({className:e,isLoading:t,loadingText:n,children:r,...s})=>a.jsxs("footer",{className:p("wu-flex wu-items-center wu-justify-between wu-gap-2 wu-border-t wu-border-gray-10 wu-py-3 wu-px-4 wu-bg-white/80 wu-backdrop-blur-sm wu-text-xs wu-font-normal wu-text-gray-footer wu-sticky wu-bottom-0",e),...s,children:[a.jsx("div",{className:"wu-flex-1",children:r}),t&&a.jsx(St,{size:"16px",variant:"spinner",color:"#a3a3a3",message:n})]});Qu.displayName="WuFooter";const Ru=h.forwardRef((e,t)=>{const{size:n="sm",idOrSlugOrUrl:r,variant:s="primary",...o}=e,i=n==="sm"?16:18,u=r.includes("http")?r:`/help/${r}.html`,l=s==="primary"?"wu-text-blue-p":"wu-text-gray-lead";return a.jsx("button",{...o,ref:t,onClick:()=>Sr(u),children:a.jsx("span",{className:p("wm-help wu-text-gray-subtle",`wu-text-[${i}px]`,l,o.disabled&&"wu-text-neutral-300","wu-help-button-icon")})})});Ru.displayName="WuHelpButton";const nt=(e,t)=>`wu-listbox-${e}`;function mg(e){const{option:t,accessorKey:n,onSelect:r,multiple:s,dir:o,GroupLabel:i,Item:u,isSelected:l,...d}=e,c=n.group&&Array.isArray(t[n.group]),w=({item:f,className:m})=>h.createElement(Qt,{...d,key:JSON.stringify(f),onSelect:()=>r==null?void 0:r(f),value:t[n.value],className:p("data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",!!(l!=null&&l(f))&&!s&&"wu-bg-blue-p/10",o==="rtl"&&"wu-justify-end",m,nt("item")),disabled:f.disabled},s&&a.jsx(Le,{checked:l==null?void 0:l(f)}),u?u({value:f,isSelected:l==null?void 0:l(f)}):a.jsx(a.Fragment,{children:f[n.label]}));if(c){const f=t[n.group],m=typeof i=="string"?t[i]:i==null?void 0:i(t);return a.jsx(Jt,{heading:m,children:f==null?void 0:f.map(g=>a.jsx(w,{item:g,className:"wu-pl-6"},JSON.stringify(g)))})}return a.jsx(w,{item:t})}const gg=h.memo(mg),bg=e=>{const{className:t,...n}=e;return a.jsxs("div",{className:"wu-relative",children:[a.jsx(De,{icon:"wm-search",className:"wu-absolute wu-top-[14px] wu-left-5"}),a.jsx(Oo,{...n,"aria-label":"Search",className:p("wu-bg-gray-10 wu-border-b wu-border-gray-subtle wu-rounded-none wu-rounded-t-sm wu-h-8 wu-my-2 wu-pl-8","focus:wu-border-blue-p focus-visible:wu-outline-none;",nt("input"),t)})]})},yg=e=>{const{label:t,onSelectAll:n,data:r,value:s}=e,[o,i]=h.useState(!1),[u,l]=h.useState(!1);return h.useEffect(()=>{!s||!r||(i(s.length>0),l(s.length>0&&s.length<r.length))},[r,s]),a.jsxs(Qt,{className:"data-[selected='true']:wu-bg-gray-100 wu-cursor-pointer wu-text-xs wu-min-h-8 wu-py-0 hover:wu-bg-gray-100",onSelect:()=>n==null?void 0:n(!o),children:[a.jsx(Le,{checked:o,partial:u}),t||"Select All"]})},vg=e=>{const{CustomTrigger:t,disabled:n,value:r,placeholder:s,accessorKey:o,Chip:i,handleUnselect:u,variant:l,dir:d,className:c,...w}=e,[f,m]=h.useState(),g=h.useRef(null);return h.useEffect(()=>{if(!r){m(null);return}m(Array.isArray(r)?i?r.map((v,S)=>i({value:v,unselect:u,key:S})):r.map(v=>v[o.label]).join(", "):i?i({value:r,unselect:u}):r[o.label])},[r,i,o.label,m]),a.jsx(ct,{asChild:!0,id:e.id,disabled:n,ref:g,children:(t==null?void 0:t(r))||a.jsxs("button",{...w,className:p("wu-group/wuListbox wu-relative wu-min-h-8 wu-text-xs wu-border-gray-subtle wu-bg-gray-10 wu-p-1 wu-pl-2 rtl:wu-pr-2 wu-border-b wu-w-full wu-text-left wu-pr-5 rtl:wu-pl-5","hover:wu-border-blue-p","disabled:wu-cursor-not-allowed disabled:wu-bg-gray-20 disabled:wu-border-gray-40 disabled:wu-text-gray-subtle","rtl:wu-text-right",l==="outlined"&&"wu-border wu-border-gray-subtle wu-bg-white",c,nt("trigger")),children:[a.jsx("div",{className:p("wu-truncate",i&&"wu-flex wu-items-center wu-gap-1 wu-flex-wrap",!f&&"wu-font-light"),children:f||s}),a.jsx(De,{icon:"wm-arrow-drop-down",className:p("wu-absolute wu-top-1 wm-arrow-drop-down group-data-[state=open]/wuListbox:wu-rotate-180 wu-transition-transform wu-duration-300 wu-text-base",d==="rtl"?"wu-left-1":"wu-right-1",nt("drop-icon"))})]})})},el=(e,t,n)=>{const r=String(e[n.label]??"").toLowerCase(),s=String(e[n.value]??"").toLowerCase();return r.includes(t)||s.includes(t)},xg=(e,t,n)=>{const r=t.trim();if(r==="")return e;const s=r.toLowerCase(),o=[];for(const i of e){const u=n.group,l=u?i[u]:void 0;if(Array.isArray(l)){const d=l.filter(c=>el(c,s,n));d.length>0&&o.push({...i,[u]:d})}else el(i,s,n)&&o.push(i)}return o},Ng=e=>{const{data:t,accessorKey:n,value:r,Item:s,Label:o,GroupLabel:i,CustomHeader:u,CustomTrigger:l,NoDataContent:d,Chip:c,onSelect:w,onScroll:f,disabled:m,multiple:g,searchable:b,selectAll:v,virtualizedThreshold:S=100,id:N,dir:C,className:x,listClass:T,placeholder:k="Select items...",variant:A,labelPosition:M="top",maxContentWidth:D,maxContentHeight:V,modal:P,...I}=e,[_,L]=h.useState(!1),[O,q]=h.useState(""),[F,z]=h.useState(r),U=h.useMemo(()=>n,[n]),j=h.useMemo(()=>{if(!b||!O)return t;const X=O.toLowerCase().trim();return xg(t,X,n)},[t,O,n.label,b]),pe=X=>{g?z(B=>{const G=X[n.value],Y=Array.isArray(B)?B:[],J=Y.some(ie=>ie[n.value]===G)?Y.filter(ie=>ie[n.value]!==G):[...Y,X];return w&&w(J),J}):(z(X),w&&w(X),L(!1))},de=h.useCallback(X=>{const B=X?t:[];z(B),v!=null&&v.onSelectAll&&v.onSelectAll(X),w&&w(B)},[t,v,w]),ke=X=>Array.isArray(F)?F.some(B=>B[n.value]===X[n.value]):(F==null?void 0:F[n.value])===X[n.value];h.useEffect(()=>{z(r)},[r]);const ge=X=>{const B=G=>a.jsx(gg,{option:G,accessorKey:U,multiple:g,onSelect:Y=>pe(Y),dir:C,GroupLabel:i,Item:s,isSelected:Y=>ke(Y)},JSON.stringify(G));return X.length>S?a.jsx(Tt,{list:X,callback:(G,Y)=>B(Y),dir:C}):X.map(B)};return a.jsxs("div",{className:p("wu-flex wu-text-sm wu-gap-2",M==="top"&&"wu-flex-col wu-gap-1",M==="left"&&"wu-flex-row",M==="right"&&"wu-flex-row-reverse",nt("container")),dir:C,children:[o&&a.jsx(Me,{htmlFor:N,className:nt("label"),children:o}),a.jsxs(He,{open:_,onOpenChange:X=>{L(X),X||setTimeout(()=>{q("")},100)},modal:P,children:[a.jsx(vg,{CustomTrigger:l,disabled:m,value:F,accessorKey:n,placeholder:k,Chip:c,className:x,handleUnselect:pe,variant:A,id:N,dir:C,...I}),a.jsx(Fe,{className:p("wu-min-w-[--radix-popover-trigger-width] wu-max-w-[calc(100vw-32px)] wu-w-auto wu-p-0 wu-bg-white wu-border wu-border-blue-p",nt("content")),align:"start",sideOffset:-1,style:{maxWidth:D},children:a.jsxs(Jr,{id:e.id,shouldFilter:!1,children:[b&&a.jsx(bg,{value:O,onValueChange:q}),u,a.jsxs(Qr,{className:p("wu-overflow-y-auto",nt("list"),T),onScroll:f,style:{maxHeight:V||"420px"},children:[a.jsx(Rr,{children:d||"No results found."}),a.jsx(Jt,{children:g&&(v==null?void 0:v.enabled)&&!O&&a.jsx(yg,{data:t,value:F,onSelectAll:de,label:v.label})}),a.jsx(Jt,{children:ge(j)})]})]})})]})]})},na=h.forwardRef(({showMenu:e=!1,className:t,color:n="#1B3380",...r},s)=>{const o=p("wu-w-full wu-border wu-transition-all wu-duration-300");return a.jsxs("div",{...r,className:p("wu-flex wu-flex-col wu-w-[18px] wu-justify-between wu-aspect-[3/2] wu-transition-all wu-duration-300",t),ref:s,"aria-label":"menu-icon",children:[a.jsx("div",{className:`${o} wu-origin-center ${e?"wu-rotate-45 wu-translate-y-[5px]":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} ${e?"wu-opacity-0":""}`,style:{borderColor:n}}),a.jsx("div",{className:`${o} wu-origin-center ${e?"-wu-rotate-45 -wu-translate-y-[5px]":""}`,style:{borderColor:n}})]})});na.displayName="WuMenuIcon";const tl={overlay:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0",content:"data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-fade-out-0 data-[state=open]:wu-fade-in-0 data-[state=closed]:wu-zoom-out-95 data-[state=open]:wu-zoom-in-95 data-[state=closed]:wu-slide-out-to-left-1/2 data-[state=closed]:wu-slide-out-to-top-[48%] data-[state=open]:wu-slide-in-from-left-1/2 data-[state=open]:wu-slide-in-from-top-[48%]"},nl=R.Root,rl=R.Trigger,Sg=R.Portal,Cg=R.Close,sl=h.forwardRef(({className:e,...t},n)=>a.jsx(R.Overlay,{ref:n,className:p("wu-fixed wu-inset-0 wu-z-50 wu-bg-black/30",tl.overlay,e),...t}));sl.displayName=R.Overlay.displayName;const ra=h.forwardRef(({className:e,children:t,hideCloseButton:n,isStackedCard:r,...s},o)=>a.jsxs(Sg,{children:[a.jsx(sl,{className:r?"wu-bg-transparent":""}),a.jsxs(R.Content,{ref:o,className:p("wu-fixed wu-left-[50%] wu-z-50 wu-top-[50%] wu-flex wu-flex-col wu-w-full wu-max-w-lg wu-translate-x-[-50%] wu-translate-y-[-50%] wu-bg-white wu-shadow-lg wu-duration-200",tl.content,e),...s,children:[t,!n&&a.jsx(R.Close,{"aria-label":"close",asChild:!0,children:a.jsxs(Nt,{variant:"iconOnly",className:p("wu-absolute wu-right-2 wu-top-1 hover:wu-bg-black hover:wu-bg-opacity-[0.04]","wu-top-3 wu-right-4 wu-p-1.5","group-data-[variant=action]:wu-text-blue-q","group-data-[variant=upgrade]:wu-text-yellow-deep","group-data-[variant=critical]:wu-text-red-deep"),children:[a.jsx("span",{className:"wm-close wu-text-xl wu-leading-5"}),a.jsx("span",{className:"wu-sr-only",children:"Close"})]})})]})]}));ra.displayName=R.Content.displayName;const sa=({className:e,...t})=>a.jsx("div",{className:p("wu-text-center wu-bg-gray-20 wu-w-full",e),...t});sa.displayName="DialogHeader";const al=({className:e,...t})=>a.jsx("div",{className:p("wu-flex wu-flex-col-reverse sm:wu-flex-row sm:wu-justify-end sm:wu-space-x-2 wu-p-4",e),...t});al.displayName="DialogFooter";const aa=h.forwardRef(({className:e,...t},n)=>a.jsx(R.Title,{ref:n,className:p("wu-text-lg wu-font-medium wu-flex wu-items-center wu-justify-center wu-gap-1 wu-h-10 wu-leading-none wu-tracking-tight",e),...t}));aa.displayName=R.Title.displayName;const Tg=h.forwardRef(({className:e,...t},n)=>a.jsx(R.Description,{ref:n,className:p("wu-text-sm wu-text-muted-foreground",e),...t}));Tg.displayName=R.Description.displayName;const Eg={gradientBackground:"_gradientBackground_1uc4j_1"},ol=e=>{const{colors:t,size:n=.55,children:r,className:s,strokeWidth:o,centerOffset:i={x:0,y:0},...u}=e,l=h.useRef(null);return h.useEffect(()=>{const d=l.current;if(d){d.style.setProperty("--width",`${d.offsetWidth*n}px`),d.style.setProperty("--height",`${d.offsetHeight*n}px`),d.style.setProperty("--colors",t.join(",")),d.style.setProperty("--stroke-width",`-${o||2}px`),d.style.setProperty("--spotlight-background","radial-gradient(100% var(--height) ellipse at 25% 70%, var(--colors))");let w;const f=m=>{w&&cancelAnimationFrame(w),w=requestAnimationFrame(()=>{const g=d.getBoundingClientRect();let b=m.clientX-g.left,v=m.clientY-g.top;b=Math.max(0,Math.min(b+i.x,g.width)),v=Math.max(0,Math.min(v+i.y,g.height));const S=`radial-gradient(
|
|
16
|
+
var(--width) var(--height) ellipse at ${b}px ${v}px,
|
|
14
17
|
var(--colors)
|
|
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
|
-
`));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
|
-
`))},[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,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:`
|
|
18
|
+
)`;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(Eg.gradientBackground,"wu-transform-gpu",s),...u,children:r})},ar={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"},il="calc(100vh - 64px)",Mg={sm:"400px",md:"600px",lg:"1200px"},Ig=({Trigger:e,children:t,size:n="md",hideCloseButton:r,preventClickOutside:s,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(nl,{modal:!0,onOpenChange:o,open:i,children:[e&&a.jsx(rl,{asChild:!0,children:e}),a.jsx(ra,{style:{width:"calc(100% - 64px)",maxWidth:l||Mg[n],maxHeight:d||il,...w},hideCloseButton:r,onInteractOutside:b=>s&&b.preventDefault(),dir:u,"aria-describedby":void 0,"data-variant":f,className:p("wu-group wu-rounded-[1.1rem]",ar.wuModalBodyWrapper,c),...m,children:a.jsx(ol,{colors:g[f],strokeWidth:4,className:p("wu-rounded-[1.1rem] wu-transform-gpu wu-flex wu-flex-col",c),style:{maxHeight:d||il},children:t})})]})},Dg=({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",ar["wu-modal-content"],t),...n,children:e}),Ag=({children:e,className:t,...n})=>a.jsx(sa,{...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",ar["wu-modal-header"],t),children:a.jsx(aa,{className:"wu-font-normal wu-justify-start wu-text-2xl wu-h-14",children:e})}),kg=({children:e,className:t,...n})=>a.jsx(al,{...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]",ar["wu-modal-footer"],t),children:e}),Pg=({children:e,className:t,...n})=>{const r=h.useRef(null);return a.jsx(Cg,{asChild:!0,children:a.jsx(Te,{className:t,ref:r,...n,children:e})})},_g=({placeholder:e="Select...",value:t,multiple:n=!1,accessorKey:r,variant:s="flat",dir:o="ltr",customTriggerChildren:i,id:u,disabled:l,selectAll:d,isCheckedAll:c,width:w,...f})=>{const[m,g]=h.useState(""),[b,v]=h.useState(e);h.useEffect(()=>{if(!t||Array.isArray(t)&&t.length===0){v(e),g("");return}const N=r.label;if(n&&Array.isArray(t)){const C=t.map(x=>x[N]).join(", ");g(C)}else!n&&!Array.isArray(t)&&g(t[N])},[t,r.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(Wo,{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",s==="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"})]})})},ul=({option:e,value:t,multiple:n=!1,onSelect:r,accessorKey:s,dir:o="ltr"})=>{const[i,u]=h.useState(n?[]:"");h.useEffect(()=>{t&&u(n?t.map(w=>JSON.stringify(w[s.value])):JSON.stringify(t[s.value]))},[t,s.value,n]);const l=n?i.includes(JSON.stringify(e[s.value])):i===JSON.stringify(e[s.value]),d=c=>{e.disabled||(r(e),n&&c.preventDefault())};return a.jsxs(Bn,{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(Le,{checked:l}),a.jsx(ll,{option:e,accessorKey:s})]})},ll=({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"})]})},cl=e=>{const{option:t,handleSelectAll:n,isCheckedAll:r,isPartialSelected:s,...o}=e;switch("type"in t?t.type:"option"){case"all":return a.jsxs(Bn,{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(Le,{"data-partial":s,checked:r||s,partial:s}),a.jsx(ll,{option:t,accessorKey:o.accessorKey})]});case"group":return a.jsxs(Bo,{dir:o.dir,children:[a.jsx(Rt,{className:"wu-text-xs",children:t.label}),t.options.map((u,l)=>h.createElement(ul,{...o,option:u,key:l}))]});case"divider":return a.jsx(qn,{className:"wu-mx-4"});default:return a.jsx(ul,{...o,option:t})}},Vg=e=>{let t=0,n=0;const r=[],s=[],o=i=>{i.type==="divider"?t++:i.type==="group"?(n++,i.options.forEach(u=>{o(u)})):(r.push(i),i.disabled||s.push(i))};return e.forEach(i=>{o(i)}),{separators:t,groups:n,enabledOptions:s,totalData:r.length,cleanData:r}},Og=100,Fg=400,dl=({data:e,onSelect:t,multiple:n=!1,defaultValue:r,value:s,accessorKey:o,variant:i="flat",dir:u="ltr",placeholder:l,Label:d,virtualizedThreshold:c=Og,maxHeight:w=Fg,hasGroup:f=!1,Header:m,CustomTrigger:g,selectAll:b,disabled:v,labelPosition:S="top",onScroll:N,maxContentWidth:C,...x})=>{const[T,k]=h.useState(),A=h.useRef(null),[M,D]=h.useState(!1),[V,P]=h.useState(!1),{cleanData:I,enabledOptions:_}=f||b!=null&&b.enable?Vg(e):{cleanData:e,enabledOptions:[]},L=h.useMemo(()=>n&&b!=null&&b.enable&&e.length>0?[{type:"all",[o.label]:b.label||"Select All"},...e]:e,[e,b,n]),O=h.useCallback(U=>{const j=U[o.value];if(n)k((pe=[])=>{const de=pe,ge=de.some(X=>X[o.value]===j)?de.filter(X=>X[o.value]!==j):[...de,U];return t==null||t(ge),ge});else{const pe=U;k(pe),t==null||t(pe)}},[n,o.value,t]);h.useEffect(()=>{if(r&&s){console.error("defaultValue and value cannot be used simultaneously");return}!r&&!s&&k(void 0),r!==void 0&&k(r),s!==void 0&&k(s)},[r,s]);const q=L.length>c;h.useEffect(()=>{if(!n)return;const U=b!=null&&b.includeDisabled?(T==null?void 0:T.length)===e.length:(T==null?void 0:T.length)===_.length;D(U);const j=(T==null?void 0:T.length)>0&&!U;P(j)},[T,b]);const F=h.useCallback(()=>{const U=M?[]:b!=null&&b.includeDisabled?f?I:e:_;k(U),t==null||t(U)},[M,n,e,_,t,b]),z=En(S);return a.jsxs("div",{className:p(z,"wu-flex wu-select-container"),ref:A,dir:u,children:[a.jsxs(Lo,{children:[a.jsx(_g,{...x,value:T,multiple:n,variant:i,dir:u,placeholder:l,accessorKey:o,customTriggerChildren:g,id:x.id,disabled:v,selectAll:b,isCheckedAll:M}),a.jsxs(es,{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:x.id,style:{maxWidth:C},children:[m,q?a.jsx(Tt,{list:L,containerHeight:w,callback:(U,j)=>a.jsx(cl,{option:j,accessorKey:o,multiple:n,onSelect:O,value:T,dir:u,handleSelectAll:F,isCheckedAll:M,isPartialSelected:V}),dir:u}):a.jsx("div",{onScroll:N,style:{maxHeight:w,height:"fit-content",overflow:"auto"},className:"wu-select-list",children:L.map((U,j)=>a.jsx(cl,{option:U,accessorKey:o,multiple:n,onSelect:O,value:T,handleSelectAll:F,isCheckedAll:M,dir:u,isPartialSelected:V},`${j}`))})]})]}),d&&a.jsx(Me,{htmlFor:x.id,className:"wu-select-label",children:d})]})},or=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Lg=({value:e,onChange:t,min:n=H.sub(new Date,{years:5}),max:r=H.add(new Date,{years:1}),placeholder:s="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(""),[v,S]=h.useState({value:Math.min(new Date().getFullYear(),new Date(r).getFullYear()),label:Math.min(new Date().getFullYear(),new Date(r).getFullYear())}),N=h.useMemo(()=>{const x=new Date(n).getFullYear(),T=new Date(r).getFullYear();return Array.from({length:T-x+1},(k,A)=>({value:T-A,label:T-A}))},[n,r]);h.useEffect(()=>{if(e){const x=new Date(e),T=x.getFullYear(),k=x.getMonth();m({year:T,month:k}),b(`${or[k]} ${T}`),S({value:T,label:T})}},[e]);const C=()=>{f&&t&&(t(new Date(f.year,f.month,15)),b(`${or[f.month]} ${f.year}`))};return a.jsxs("div",{className:p("wu-flex wu-flex-col wu-items-center",En(i),i==="top"&&"wu-items-start"),children:[a.jsxs(He,{children:[a.jsx(Yr,{...w,disabled:u||d,id:l,dir:"ltr",placeholder:s,formattedString:g}),a.jsxs(Fe,{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(dl,{data:N,accessorKey:{value:"value",label:"label"},value:v,onSelect:x=>S(x),multiple:!1,maxHeight:224})}),a.jsx(Wg,{year:v==null?void 0:v.value,selectedMonth:f==null?void 0:f.month,selectedYear:f==null?void 0:f.year,onClick:(x,T)=>m({year:T,month:x}),disabledMonths:c}),a.jsx("div",{className:"wu-flex wu-justify-end wu-px-0.5",children:a.jsx(Wt.PopoverClose,{asChild:!0,children:a.jsx(Te,{onClick:C,children:"Apply"})})})]})]}),o&&a.jsx(Me,{className:"wu-truncate wu-max-w-[120px] wu-min-w-fit wu-select-label",children:o})]})},Wg=({year:e,selectedMonth:t,selectedYear:n,onClick:r,disabledMonths:s=[]})=>{const o=new Date,i=o.getFullYear(),u=o.getMonth(),l=h.useMemo(()=>{const d=new Set;return s.forEach(c=>{const w=typeof c=="string"?new Date(c):c;d.add(`${w.getFullYear()}-${w.getMonth()}`)}),d},[s]);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:or.map((d,c)=>{const w=e===i&&c===u,f=t===c&&n===e;return a.jsx("button",{disabled:l.has(`${e}-${c}`),onClick:()=>r(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":`${or[c]} ${e}`,"data-month":c,"data-year":e,children:d},d)})})},wl=(e,t,n,r=96)=>{if(e.length===0||r<=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/r);i(e.slice(0,m)),l(e.slice(m))};return d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d)}},[e,r]),[o,u]},fl={wuPrimaryLink:"_wuPrimaryLink_1sy3v_1",wuPrimaryPopoverContent:"_wuPrimaryPopoverContent_1sy3v_8"},Bg=e=>{const{Links:t,children:n,className:r,...s}=e,o=h.useMemo(()=>t.map((c,w)=>h.cloneElement(c,{className:p(fl.wuPrimaryLink,c.props.className,"wu-primary-nav-link"),key:w})),[t]),i=h.useRef(null),u=h.useRef(null),[l,d]=wl(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",r),...s,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(He,{children:[a.jsx(ct,{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(Fe,{className:p(fl.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(He,{children:[a.jsx(ct,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Fe,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-primary-nav-popover-right",align:"end",sideOffset:4,children:n})]})]})]})})},oa={wuSecondaryLink:"_wuSecondaryLink_1edl1_1",wuSecondaryNav:"_wuSecondaryNav_1edl1_6"},qg=e=>{const{Links:t,children:n,className:r,...s}=e,o=h.useMemo(()=>t.map((w,f)=>h.cloneElement(w.link,{key:f,className:p(oa.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]=wl(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]",r),...s,ref:i,children:[a.jsxs("div",{className:"wu-flex wu-items-center wu-justify-start wu-gap-2",children:[a.jsx("nav",{className:p(oa.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(He,{children:[a.jsx(ct,{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(Fe,{className:p(oa.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(He,{children:[a.jsx(ct,{className:"sm:wu-hidden",children:a.jsx("span",{className:"wu-text-lg wm-menu"})}),a.jsx(Fe,{className:"wu-bg-white wu-border wu-border-blue-p wu-w-fit wu-secondary-nav-popover-right",align:"end",sideOffset:12,children:n})]})]})]})})},pl=h.forwardRef(({totalRows:e,initialPage:t=0,initialPageSize:n=100,onPageChange:r,className:s,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},(N,C)=>C),v=h.useCallback(N=>{N>=0&&N<f&&(d(N),r==null||r(N))},[f,r]),S=224;return a.jsxs("div",{className:p("wu-flex wu-items-center wu-gap-[2px]",s,"wu-pagination"),...i,role:"navigation",children:[a.jsx(hl,{label:"Previous page",onClick:()=>v(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(ta,{name:`${m} - ${g}`,className:"wu-w-[96px] wu-min-w-[96px] wu-pagination-menu",align:"end",disabled:o,children:a.jsx(Ot,{style:{maxHeight:S+"px"},dir:i.dir,children:b.length>100?a.jsx(Tt,{className:"wu-pagination-list",containerHeight:S,list:b,callback:(N,C)=>a.jsxs(sr,{onSelect:()=>v(C),className:p("wu-py-2",C===l&&"wu-bg-gray-20","wu-pagination-item"),children:[C*c+1," -"," ",Math.min((C+1)*c,e)]},N)}):b.map(N=>a.jsxs(sr,{onSelect:()=>v(N),className:p(N===l&&"wu-bg-gray-20","wu-py-2 hover:wu-bg-gray-20","wu-pagination-item"),children:[N*c+1," -"," ",Math.min((N+1)*c,e)]},N))})}),a.jsx(hl,{label:"Next page",onClick:()=>v(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"})]})});pl.displayName="WuPagination";const hl=({label:e,onClick:t,disabled:n,icon:r,className:s})=>a.jsx(Te,{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",s),"aria-label":e,children:a.jsx("span",{className:p("wu-text-sm",r)})}),ml=y.forwardRef(({className:e,...t},n)=>a.jsx($t.Root,{className:p("wu-grid wu-gap-2",e),...t,ref:n}));ml.displayName=$t.Root.displayName;const gl=y.forwardRef(({className:e,...t},n)=>a.jsx($t.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($t.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"})})}));gl.displayName=$t.Item.displayName;const bl=h.forwardRef((e,t)=>{const{options:n,defaultValue:r,onChange:s,label:o,dir:i,...u}=e;return a.jsxs(ml,{defaultValue:r,required:u.required,disabled:u.disabled,onValueChange:s,id:u.id,dir:i,name:u.name,className:p("w-fit",u.className),ref:t,style:u.style,children:[a.jsx(Fn,{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(gl,{value:l.value,id:l.value,disabled:l.disabled,required:l.required,"aria-label":l.value,className:"wu-peer wu-radio-item"}),a.jsx(Fn,{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))]})});bl.displayName="WuRadioGroup";const $g=e=>{const{children:t,...n}=e;return a.jsxs(Ot,{...n,role:"complementary","aria-label":"ScrollArea",children:[t,a.jsx(ea,{orientation:"horizontal"})]})},yl=y.forwardRef(({className:e,type:t,...n},r)=>a.jsx("input",{type:t,className:p("wu-flex wu-h-8 wu-w-full wu-border-b wu-border-gray-subtle wu-bg-gray-10 wu-p-2 wu-text-sm wu-font-normal wu-text-gray-lead","file:wu-border-0 file:wu-bg-gray-40 file:wu-text-gray-notification file:wu-text-sm file:wu-font-normal file:wu-relative file:wu-bottom-[3px]","wu-placeholder:wu-text-gray-subtle wu-placeholder:wu-font-light","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 focus-visible:wu-outline-none wu-transition-colors hover:wu-border-gray-40",e),ref:r,...n}));yl.displayName="Input";const vl=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},s)=>a.jsx(Fa.Root,{ref:s,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),...r}));vl.displayName=Fa.Root.displayName;function xl({className:e,...t}){return a.jsx("div",{className:p("animate-pulse rounded-md bg-muted",e),...t})}const ia=768;function ua(){const[e,t]=y.useState(void 0);return y.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ia-1}px)`),r=()=>{t(window.innerWidth<ia)};return n.addEventListener("change",r),t(window.innerWidth<ia),()=>n.removeEventListener("change",r)},[]),!!e}const zg="sidebar_state",Hg=3600*24*7,Ug="256px",jg="256px",Gg="3rem",Kg="b",Nl=y.createContext(null);function rt(){const e=y.useContext(Nl);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Sl=y.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:s,children:o,...i},u)=>{const l=ua(),[d,c]=y.useState(!1),[w,f]=y.useState(l?!0:e),m=t??w,g=y.useCallback(N=>{const C=typeof N=="function"?N(m):N;n?n(C):f(C),document.cookie=`${zg}=${C}; path=/; max-age=${Hg}`},[n,m]),b=y.useCallback(()=>l?c(N=>!N):g(N=>!N),[l,g,c]);y.useEffect(()=>{const N=C=>{C.key===Kg&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),b())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[b]);const v=m?"expanded":"collapsed",S=y.useMemo(()=>({state:v,open:m,setOpen:g,isMobile:l,openMobile:d,setOpenMobile:c,toggleSidebar:b}),[v,m,g,l,d,c,b]);return a.jsx(Nl.Provider,{value:S,children:a.jsx(xo,{delayDuration:0,children:a.jsx("div",{style:{"--sidebar-width":Ug,"--sidebar-width-icon":Gg,...s},className:p("wu-group/sidebar-wrapper wu-flex wu-min-h-[calc(100svh-48px)] wu-w-full",r),ref:u,...i,children:o})})})});Sl.displayName="SidebarProvider";const Cl=y.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:s,...o},i)=>{const{isMobile:u,state:l,openMobile:d,setOpenMobile:c}=rt();return n==="none"?a.jsx("div",{className:p("wu-flex wu-h-full wu-w-[--sidebar-width] wu-flex-col",r),ref:i,...o,children:s}):u?a.jsx(Go,{open:d,onOpenChange:c,...o,children:a.jsx(ts,{"data-sidebar":"sidebar","data-mobile":"true",className:"wu-w-[--sidebar-width] wu-bg-blue-sidebar wu-p-0 [&>button]:wu-hidden",style:{"--sidebar-width":jg},side:e,children:a.jsx("div",{className:"wu-flex wu-flex-col wu-w-full wu-h-full",children:s})})}):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",r),...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:s})})]})});Cl.displayName="Sidebar";const Tl=y.forwardRef(({className:e,onClick:t,children:n,...r},s)=>{const{toggleSidebar:o}=rt();return a.jsxs(Nt,{ref:s,"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()},...r,children:[n,a.jsx("span",{className:"wu-sr-only",children:"Toggle Sidebar"})]})});Tl.displayName="SidebarTrigger";const Yg=y.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=rt();return a.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,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})});Yg.displayName="SidebarRail";const El=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}));El.displayName="SidebarInset";const Xg=y.forwardRef(({className:e,...t},n)=>a.jsx(yl,{ref:n,"data-sidebar":"input",className:p("wu-h-8 wu-w-full wu-shadow-none focus-visible:wu-ring-2",e),...t}));Xg.displayName="SidebarInput";const Ml=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}));Ml.displayName="SidebarHeader";const Il=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}));Il.displayName="SidebarFooter";const Zg=y.forwardRef(({className:e,...t},n)=>a.jsx(vl,{ref:n,"data-sidebar":"separator",className:p("wu-mx-2 wu-w-auto",e),...t}));Zg.displayName="SidebarSeparator";const Dl=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}));Dl.displayName="SidebarContent";const Al=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}));Al.displayName="SidebarGroup";const kl=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?vt.Slot:"div";return a.jsx(s,{ref:r,"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})});kl.displayName="SidebarGroupLabel";const Jg=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const s=t?vt.Slot:"button";return a.jsx(s,{ref:r,"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})});Jg.displayName="SidebarGroupAction";const Pl=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}));Pl.displayName="SidebarGroupContent";const la=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}));la.displayName="SidebarMenu";const _l=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}));_l.displayName="SidebarMenuItem";const Qg=Oe.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"}}),Vl=y.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:s,className:o,...i},u)=>{const l=e?vt.Slot:"button",{isMobile:d,state:c}=rt(),w=a.jsx(l,{ref:u,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:p(Qg({variant:n,size:r}),o),...i});return s?(typeof s=="string"&&(s={children:s}),a.jsxs(No,{children:[a.jsx(So,{asChild:!0,children:w}),a.jsx(Gr,{side:"right",align:"center",hidden:c!=="collapsed"||d,...s})]})):w});Vl.displayName="SidebarMenuButton";const Rg=y.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},s)=>{const o=t?vt.Slot:"button";return a.jsx(o,{ref:s,"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),...r})});Rg.displayName="SidebarMenuAction";const eb=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}));eb.displayName="SidebarMenuBadge";const tb=y.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const s=y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return a.jsxs("div",{ref:r,"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(xl,{className:"wu-rounded-md wu-size-4","data-sidebar":"menu-skeleton-icon"}),a.jsx(xl,{className:"wu-h-4 wu-max-w-[--skeleton-width] wu-flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});tb.displayName="SidebarMenuSkeleton";const nb=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}));nb.displayName="SidebarMenuSub";const rb=y.forwardRef(({...e},t)=>a.jsx("li",{ref:t,...e}));rb.displayName="SidebarMenuSubItem";const sb=y.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...s},o)=>{const i=e?vt.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",r),...s})});sb.displayName="SidebarMenuSubButton";function ab(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,o=t!==void 0,[i,u]=Hr({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:l,setMounted:d,transitionStatus:c}=Tw(i,!0,!0),[w,f]=y.useState(i),[{height:m,width:g},b]=y.useState({height:void 0,width:void 0}),v=no(),[S,N]=y.useState(),C=S??v,[x,T]=y.useState(!1),[k,A]=y.useState(!1),M=y.useRef(null),D=y.useRef(null),V=y.useRef(null),P=y.useRef(null),I=ho(P,!1),_=he(L=>{const O=!i,q=Ee(Ew,L.nativeEvent);if(r(O,q),q.isCanceled)return;const F=P.current;D.current==="css-animation"&&F!=null&&F.style.removeProperty("animation-name"),!x&&!k&&(D.current!=null&&D.current!=="css-animation"&&!l&&O&&d(!0),D.current==="css-animation"&&(!w&&O&&f(!0),!l&&O&&d(!0))),u(O),D.current==="none"&&l&&!O&&d(!1)});return te(()=>{o&&D.current==="none"&&!k&&!i&&d(!1)},[o,k,i,t,d]),y.useMemo(()=>({abortControllerRef:M,animationTypeRef:D,disabled:s,handleTrigger:_,height:m,mounted:l,open:i,panelId:C,panelRef:P,runOnceAnimationsFinish:I,setDimensions:b,setHiddenUntilFound:T,setKeepMounted:A,setMounted:d,setOpen:u,setPanelIdState:N,setVisible:f,transitionDimensionRef:V,transitionStatus:c,visible:w,width:g}),[M,D,s,_,m,l,i,C,P,I,b,T,A,d,u,f,V,c,w,g])}const ca=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(ca.displayName="CollapsibleRootContext");function Ol(){const e=y.useContext(ca);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>.":zt(15));return e}let dn=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=jt.startingStyle]="startingStyle",e[e.endingStyle=jt.endingStyle]="endingStyle",e})({}),ob=(function(e){return e.panelOpen="data-panel-open",e})({});const ib={[dn.open]:""},ub={[dn.closed]:""},lb={open(e){return e?{[ob.panelOpen]:""}:null}},Fl={...{open(e){return e?ib:ub}},...po},Ll=y.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:o=!1,disabled:i=!1,onOpenChange:u,open:l,...d}=t,c=he(u),w=ab({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=Ge("div",t,{state:f,ref:n,props:d,stateAttributesMapping:Fl});return a.jsx(ca.Provider,{value:m,children:g})});process.env.NODE_ENV!=="production"&&(Ll.displayName="CollapsibleRoot");const Wl=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(Wl.displayName="CompositeRootContext");function cb(e=!1){const t=y.useContext(Wl);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>.":zt(16));return t}function db(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:o}=e,i=r&&t!==!1,u=r&&t===!1;return{props:y.useMemo(()=>{const d={onKeyDown(c){n&&t&&c.key!=="Tab"&&c.preventDefault()}};return r||(d.tabIndex=s,!o&&n&&(d.tabIndex=t?s:-1)),(o&&(t||i)||!o&&n)&&(d["aria-disabled"]=n),o&&(!t||u)&&(d.disabled=n),d},[r,n,t,i,u,o,s])}}function da(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0}=e,o=y.useRef(null),i=cb(!0)!==void 0,u=he(()=>{const f=o.current;return!!((f==null?void 0:f.tagName)==="A"&&(f!=null&&f.href))}),{props:l}=db({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:r,isNativeButton:s});process.env.NODE_ENV!=="production"&&y.useEffect(()=>{var m,g;if(!o.current)return;const f=o.current.tagName==="BUTTON";if(s){if(!f){const b=((m=lt.captureOwnerStack)==null?void 0:m.call(lt))||"";uo(`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=lt.captureOwnerStack)==null?void 0:g.call(lt))||"";uo(`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}`)}},[s]);const d=y.useCallback(()=>{const f=o.current;wb(f)&&i&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,i]);te(d,[d]);const c=y.useCallback((f={})=>{const{onClick:m,onMouseDown:g,onKeyUp:b,onKeyDown:v,onPointerDown:S,...N}=f;return Ja({type:s?"button":void 0,onClick(x){if(t){x.preventDefault();return}m==null||m(x)},onMouseDown(x){t||g==null||g(x)},onKeyDown(x){if(t||(Wr(x),v==null||v(x)),x.baseUIHandlerPrevented)return;const T=x.target===x.currentTarget&&!s&&!u()&&!t,k=x.key==="Enter",A=x.key===" ";T&&((A||k)&&x.preventDefault(),k&&(m==null||m(x)))},onKeyUp(x){t||(Wr(x),b==null||b(x)),!x.baseUIHandlerPrevented&&x.target===x.currentTarget&&!s&&!t&&x.key===" "&&(m==null||m(x))},onPointerDown(x){if(t){x.preventDefault();return}S==null||S(x)}},s?void 0:{role:"button"},l,N)},[t,l,s,u]),w=he(f=>{o.current=f,d()});return{getButtonProps:c,buttonRef:w}}function wb(e){return dw(e)&&e.tagName==="BUTTON"}const fb={...lb,...po},Bl=y.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:o,state:i,disabled:u}=Ol(),{className:l,disabled:d=u,id:c,render:w,nativeButton:f=!0,...m}=t,{getButtonProps:g,buttonRef:b}=da({disabled:d,focusableWhenDisabled:!0,native:f}),v=y.useMemo(()=>({"aria-controls":s?r:void 0,"aria-expanded":s,onClick:o}),[r,s,o]);return Ge("button",t,{state:i,ref:[n,b],props:[v,m,g],stateAttributesMapping:fb})});process.env.NODE_ENV!=="production"&&(Bl.displayName="CollapsibleTrigger");let wa;process.env.NODE_ENV!=="production"&&(wa=new Set);function ql(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");wa.has(t)||(wa.add(t),console.warn(`Base UI: ${t}`))}}let pb=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function hb(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:s,hiddenUntilFound:o,keepMounted:i,id:u,mounted:l,onOpenChange:d,open:c,panelRef:w,runOnceAnimationsFinish:f,setDimensions:m,setMounted:g,setOpen:b,setVisible:v,transitionDimensionRef:S,visible:N,width:C}=e,x=y.useRef(!1),T=y.useRef(null),k=y.useRef(c),A=y.useRef(c),M=fo(),D=y.useMemo(()=>n.current==="css-animation"?!N:!c&&!l,[c,l,N,n]),V=he(I=>{if(!I)return;if(n.current==null||S.current==null){const O=getComputedStyle(I),q=O.animationName!=="none"&&O.animationName!=="",F=O.transitionDuration!=="0s"&&O.transitionDuration!=="";q&&F?process.env.NODE_ENV!=="production"&&ql("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.","Only one of either animation type should be used."):O.animationName==="none"&&O.transitionDuration!=="0s"?n.current="css-transition":O.animationName!=="none"&&O.transitionDuration==="0s"?n.current="css-animation":n.current="none",I.getAttribute(pb.orientation)==="horizontal"||O.transitionProperty.indexOf("width")>-1?S.current="width":S.current="height"}if(n.current!=="css-transition")return;(s===void 0||C===void 0)&&(m({height:I.scrollHeight,width:I.scrollWidth}),A.current&&I.style.setProperty("transition-duration","0s"));let _=-1,L=-1;return _=oe.request(()=>{A.current=!1,L=oe.request(()=>{setTimeout(()=>{I.style.removeProperty("transition-duration")})})}),()=>{oe.cancel(_),oe.cancel(L)}}),P=Dn(r,w,V);return te(()=>{if(n.current!=="css-transition")return;const I=w.current;if(!I)return;let _=-1;if(t.current!=null&&(t.current.abort(),t.current=null),c){const L={"justify-content":I.style.justifyContent,"align-items":I.style.alignItems,"align-content":I.style.alignContent,"justify-items":I.style.justifyItems};Object.keys(L).forEach(O=>{I.style.setProperty(O,"initial","important")}),!A.current&&!i&&I.setAttribute(dn.startingStyle,""),m({height:I.scrollHeight,width:I.scrollWidth}),_=oe.request(()=>{Object.entries(L).forEach(([O,q])=>{q===""?I.style.removeProperty(O):I.style.setProperty(O,q)})})}else{if(I.scrollHeight===0&&I.scrollWidth===0)return;m({height:I.scrollHeight,width:I.scrollWidth});const L=new AbortController;t.current=L;const O=L.signal;let q=null;const F=dn.endingStyle;return q=new MutationObserver(z=>{z.some(j=>j.type==="attributes"&&j.attributeName===F)&&(q==null||q.disconnect(),q=null,f(()=>{m({height:0,width:0}),I.style.removeProperty("content-visibility"),g(!1),t.current===L&&(t.current=null)},O))}),q.observe(I,{attributes:!0,attributeFilter:[F]}),()=>{q==null||q.disconnect(),M.cancel(),t.current===L&&(L.abort(),t.current=null)}}return()=>{oe.cancel(_)}},[t,n,M,o,i,l,c,w,f,m,g]),te(()=>{if(n.current!=="css-animation")return;const I=w.current;I&&(T.current=I.style.animationName||T.current,I.style.setProperty("animation-name","none"),m({height:I.scrollHeight,width:I.scrollWidth}),!k.current&&!x.current&&I.style.removeProperty("animation-name"),c?(t.current!=null&&(t.current.abort(),t.current=null),g(!0),v(!0)):(t.current=new AbortController,f(()=>{g(!1),v(!1),t.current=null},t.current.signal)))},[t,n,c,w,f,m,g,v,N]),An(()=>{const I=oe.request(()=>{k.current=!1});return()=>oe.cancel(I)}),te(()=>{if(!o)return;const I=w.current;if(!I)return;let _=-1,L=-1;return c&&x.current&&(I.style.transitionDuration="0s",m({height:I.scrollHeight,width:I.scrollWidth}),_=oe.request(()=>{x.current=!1,L=oe.request(()=>{setTimeout(()=>{I.style.removeProperty("transition-duration")})})})),()=>{oe.cancel(_),oe.cancel(L)}},[o,c,w,m]),te(()=>{const I=w.current;I&&o&&D&&(I.setAttribute("hidden","until-found"),n.current==="css-transition"&&I.setAttribute(dn.startingStyle,""))},[o,D,n,w]),y.useEffect(function(){const _=w.current;if(!_)return;function L(O){x.current=!0,b(!0),d(!0,Ee(Gt,O))}return _.addEventListener("beforematch",L),()=>{_.removeEventListener("beforematch",L)}},[d,w,b]),y.useMemo(()=>({props:{hidden:D,id:u,ref:P}}),[D,u,P])}let $l=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const zl=y.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:o,render:i,id:u,...l}=t;process.env.NODE_ENV!=="production"&&te(()=>{s&&o===!1&&ql("The `keepMounted={false}` prop on a Collapsible will be ignored when using `hiddenUntilFound` since it requires the Panel to remain mounted even when closed.")},[s,o]);const{abortControllerRef:d,animationTypeRef:c,height:w,mounted:f,onOpenChange:m,open:g,panelId:b,panelRef:v,runOnceAnimationsFinish:S,setDimensions:N,setHiddenUntilFound:C,setKeepMounted:x,setMounted:T,setPanelIdState:k,setOpen:A,setVisible:M,state:D,transitionDimensionRef:V,visible:P,width:I,transitionStatus:_}=Ol(),L=s??!1,O=o??!1;te(()=>{if(u)return k(u),()=>{k(void 0)}},[u,k]),te(()=>{C(L)},[C,L]),te(()=>{x(O)},[x,O]);const{props:q}=hb({abortControllerRef:d,animationTypeRef:c,externalRef:n,height:w,hiddenUntilFound:L,id:b,keepMounted:O,mounted:f,onOpenChange:m,open:g,panelRef:v,runOnceAnimationsFinish:S,setDimensions:N,setMounted:T,setOpen:A,setVisible:M,transitionDimensionRef:V,visible:P,width:I});Cw({open:g&&_==="idle",ref:v,onComplete(){g&&N({height:void 0,width:void 0})}});const F=y.useMemo(()=>({...D,transitionStatus:_}),[D,_]),z=Ge("div",t,{state:F,ref:[n,v],props:[q,{style:{[$l.collapsiblePanelHeight]:w===void 0?"auto":`${w}px`,[$l.collapsiblePanelWidth]:I===void 0?"auto":`${I}px`}},l],stateAttributesMapping:Fl});return O||L||!O&&f?z:null});process.env.NODE_ENV!=="production"&&(zl.displayName="CollapsiblePanel");const mb=({children:e,Sidebar:t,className:n,defaultOpen:r=!0,open:s,onOpenChange:o,style:i})=>a.jsxs(Sl,{defaultOpen:r,open:s,onOpenChange:o,children:[a.jsxs(Cl,{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(Ml,{className:"wu-py-2",children:a.jsx(Hl,{})}),t]}),a.jsx(El,{className:"wu-contain-inline-size",children:e})]}),Hl=e=>{const{state:t,isMobile:n,openMobile:r}=rt();return a.jsx(Tl,{...e,children:a.jsx(na,{showMenu:n?r:t==="expanded"})})},gb=({className:e,children:t,...n})=>{const r=h.useRef(null),s=h.useRef(null),o=({currentTarget:u})=>{const{scrollTop:l,clientHeight:d,scrollHeight:c}=u;r.current&&r.current.classList.toggle("wu-border-[#1b338014]",l!==0),s.current&&s.current.classList.toggle("wu-border-[#1b338014]",l+d!==c)},i="wu-w-[calc(100%-16px)] wu-mx-auto wu-border-transparent";return a.jsxs(Dl,{...n,className:p("wu-overflow-hidden wu-gap-0",e),children:[a.jsx("hr",{className:i,ref:r}),a.jsx(Ot,{onScroll:o,className:"wu-gap-2",thumbColor:"#b9c3dc",railColor:"#00000000","data-testid":"scroll-area",children:t}),a.jsx("hr",{className:i,ref:s})]})},bb=e=>a.jsx(Il,{...e,children:e.children}),yb=({label:e,children:t,...n})=>a.jsxs(Al,{...n,className:"wu-p-0",children:[a.jsx("div",{className:"wu-h-8",children:a.jsx(kl,{className:"wu-items-end wu-px-4 wu-text-xs wu-font-normal wu-leading-4 wu-text-blue-q",children:e})}),a.jsx(Pl,{children:a.jsx(la,{children:t})})]}),vb=e=>a.jsx(la,{...e}),Ul=({Icon:e,children:t,className:n,isActive:r,...s})=>{var w;const{state:o}=rt(),[i,u]=h.useState(),l=ua(),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(_l,{...s,className:"wu-flex wu-items-center wu-gap-2 wu-px-2",children:a.jsx(Vl,{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,r&&"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:r,tooltip:i,asChild:h.isValidElement(t),ref:c,children:d})})},xb=({Title:e,Icon:t,children:n,className:r,...s})=>{const{state:o}=rt(),i=ua();return a.jsxs(Ll,{children:[a.jsx(Bl,{render:u=>{const l="data-panel-open"in u;return a.jsxs(Ul,{Icon:t,...u,children:[e,(o==="expanded"||i)&&a.jsx(De,{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(zl,{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',r),...s,children:n})]})},Nb=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"}]]),fa=(e,t,n=1)=>{const r=e.match(/hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*([\d.]+)\s*)?\)/);if(!r)throw new Error("Invalid HSL color format");const s=parseFloat(r[1]),o=parseFloat(r[2]),i=Math.max(0,parseFloat(r[3])+t);return`hsl(${s} ${o}% ${i}% / ${n})`},Sb=({index:e,viewIndex:t,length:n,itemHeight:r})=>{const s=(e-t+n)%n;let o;s===0?o=0:s===n-1&&n>=2?o=-1:s===n-2&&n>=3?o=-2:s===1?o=1:s===2?o=2:s===n-3&&n>=4?o=-3:o=3;const i=Nb.get(o)||{},u=o>0?r+28+(o-1)*20:i.top;return{position:o,styles:{...i,...o>0&&{top:`${u}px`},height:o>0?"32px":r}}},wn={LIGHTNESS_STEP:8,BORDER_LIGHTNESS:10,CONTENT_HEIGHT:"calc(100% - 2rem)",FONT_SIZE_ACTIVE:"14px",FONT_SIZE_INACTIVE:"12px"},Cb=({children:e,className:t,header:n,baseColor:r,position:s=0,style:o,...i})=>{const u=s<=0,l=s===0,d={border:l?`4px solid ${fa(r,wn.BORDER_LIGHTNESS)}`:"",...o},c={backgroundColor:fa(r,s*wn.LIGHTNESS_STEP),fontSize:l?wn.FONT_SIZE_ACTIVE:wn.FONT_SIZE_INACTIVE,transition:"all 0.3s ease",position:"relative",bottom:s<0?"4px":"0px",height:"32px",padding:"4px 8px"},w={backgroundColor:fa(r,45+s*6),height:wn.CONTENT_HEIGHT,position:"relative",bottom:s<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})]})},Tb=({children:e,Trigger:t,Header:n,styles:r={},classNames:s={},open:o,onOpenChange:i,itemHeight:u})=>{const l={height:u,...r.Trigger};return a.jsxs(nl,{open:o,onOpenChange:i,children:[a.jsx(rl,{className:p("wu-bg-gray-25 wu-z-0 wu-w-full wu-rounded-lg wu-rounded-tl-none wu-relative",s.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(ra,{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",s.Content),hideCloseButton:!0,isStackedCard:!0,style:r.Content,children:[a.jsx(aa,{}),a.jsx(_a.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",s.CloseButton),style:r.CloseButton,"aria-label":"Close dialog",children:a.jsx(De,{icon:"wm-close",className:"wu-text-lg wu-m-4 wu-cursor-pointer"})}),n&&a.jsx(sa,{className:p("wu-h-12 wu-p-2 wu-pl-4 wu-bg-white/25 wu-backdrop-blur-[24px]",s.Header),style:r.Header,children:n}),e]})]})},jl=0;class pa extends kn{constructor(){super(...arguments);Se(this,"clear",()=>{this.currentId!==jl&&(clearInterval(this.currentId),this.currentId=jl)})}static create(){return new pa}start(n,r){this.clear(),this.currentId=setInterval(()=>{r()},n)}}function Eb(){const e=Je(pa.create).current;return An(e.disposeEffect),e}function Gl(e){const t=Je(Mb,e).current;return t.next=e,te(t.effect),t}function Mb(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Ib(){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},Db={...Kl,position:"fixed",top:0,left:0},Ab={...Kl,position:"absolute"},ha=y.createContext(void 0);process.env.NODE_ENV!=="production"&&(ha.displayName="NumberFieldRootContext");function ir(){const e=y.useContext(ha);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>.":zt(43));return e}const fn={inputValue:()=>null,value:()=>null,...Or},Yl=new Map;function pn(e,t){const n=JSON.stringify({locale:e,options:t}),r=Yl.get(n);if(r)return r;const s=new Intl.NumberFormat(e,t);return Yl.set(n,s),s}function Ft(e,t,n){return e==null?"":pn(t,n).format(e)}function Xl(e,t,n){return Ft(e,t,{...n,maximumFractionDigits:20})}const kb=["零","〇","一","二","三","四","五","六","七","八","九"],Pb={零:"0","〇":"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},Zl=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"],Jl=["۰","۱","۲","۳","۴","۵","۶","۷","۸","۹"],ma=["0","1","2","3","4","5","6","7","8","9"],Ql=["%","٪","%","﹪"],Rl=["‰","؉"],ec=["−","-","‒","–","—","﹣"],tc=["+","﹢"],_b=".",Vb=",",Ob=new RegExp(`[${Zl.join("")}]`,"g"),Fb=new RegExp(`[${Jl.join("")}]`,"g"),Lb=new RegExp(`[${ma.join("")}]`,"g"),Wb=new RegExp(`[${kb.join("")}]`,"g"),Bb=new RegExp(`[${Ql.join("")}]`),qb=new RegExp(`[${Rl.join("")}]`),ga=/[٠١٢٣٤٥٦٧٨٩]/,nc=/[۰۱۲۳۴۵۶۷۸۹]/,ba=/[零〇一二三四五六七八九]/,rc=new RegExp(`[${ma.join("")}]`),$b=[".",",",_b,Vb,"٫","٬"],sc=new RegExp("\\p{Zs}","u"),zb=["+",...tc],Hb=["-",...ec],ur=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ub=e=>e.replace(/[-\\\]^]/g,t=>`\\${t}`),ac=e=>`[${e.map(Ub).join("")}]`,oc=ac(["-"].concat(ec)),ic=ac(["+"].concat(tc)),uc=new RegExp(oc,"gu"),lc=new RegExp(ic,"gu"),hn=new RegExp(oc),lr=new RegExp(ic);function ya(e,t){const n=pn(e,t).formatToParts(11111.1),r={};return n.forEach(s=>{r[s.type]=s.value}),pn(e).formatToParts(.1).forEach(s=>{s.type==="decimal"&&(r[s.type]=s.value)}),r}function mn(e,t,n){if(e==null)return null;let r=String(e).replace(new RegExp("\\p{Cf}","gu"),"").trim();r=r.replace(uc,"-").replace(lc,"+");let s=!1;const o=r.match(/([+-])\s*$/);o&&(o[1]==="-"&&(s=!0),r=r.replace(/([+-])\s*$/,""));const i=r.match(/^\s*([+-])/);i&&(i[1]==="-"&&(s=!0),r=r.replace(/^\s*[+-]/,""));let u=t;u===void 0&&(ga.test(r)||nc.test(r)?u="ar":ba.test(r)&&(u="zh"));const{group:l,decimal:d,currency:c}=ya(u,n),w=pn(u,n).formatToParts(1).filter(A=>A.type==="unit").map(A=>ur(A.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(ur(l),"g"));let b=[{regex:l?m:null,replacement:""},{regex:d?new RegExp(ur(d),"g"):null,replacement:"."},{regex:/./g,replacement:"."},{regex:/,/g,replacement:""},{regex:/٫/g,replacement:"."},{regex:/٬/g,replacement:""},{regex:c?new RegExp(ur(c),"g"):null,replacement:""},{regex:f,replacement:""},{regex:Ob,replacement:A=>String(Zl.indexOf(A))},{regex:Fb,replacement:A=>String(Jl.indexOf(A))},{regex:Lb,replacement:A=>String(ma.indexOf(A))},{regex:Wb,replacement:A=>Pb[A]}].reduce((A,{regex:M,replacement:D})=>M?A.replace(M,D):A,r);const v=b.lastIndexOf(".");if(v!==-1&&(b=`${b.slice(0,v).replace(/\./g,"")}.${b.slice(v+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(r)||/[∞]/.test(r))return null;const S=(s?"-":"")+b;let N=parseFloat(S);const C=n==null?void 0:n.style,x=C==="unit"&&(n==null?void 0:n.unit)==="percent",T=Bb.test(e)||C==="percent";return qb.test(e)?N/=1e3:!x&&T&&(N/=100),Number.isNaN(N)?null:N}const jb=60,Gb=400,Kb=50,Yb=3,Xb=8,cr=1;function Zb(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const Jb=1e-10;function Qb(e){const t=pn("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 Rb(e,t){if(!Number.isFinite(e))return e;const n=Math.min(Math.max(t,0),20);return Number(e.toFixed(n))}function va(e,t){const{maximumFractionDigits:n}=Qb(t);return Rb(e,n)}function ey(e,t,n,r="directional"){if(n===0)return e;const s=Math.abs(n),o=Math.sign(n),i=s*Jb*o,u=r==="nearest"?n:s,l=(e-t+i)/u;let d;return r==="nearest"?d=Math.round(l):o>0?d=Math.floor(l):d=Math.ceil(l),t+d*(r==="nearest"?n:s)}function ty(e,{step:t,minWithDefault:n,maxWithDefault:r,minWithZeroDefault:s,format:o,snapOnStep:i,small:u,clamp:l}){if(e===null)return e;const d=l?Zb(e,n,r):e;if(t!=null&&i){if(t===0)return va(d,o);let c=s;!u&&n!==Number.MIN_SAFE_INTEGER&&(c=n);const w=ey(d,c,t,u?"nearest":"directional");return va(w,o)}return va(d,o)}const cc=y.forwardRef(function(t,n){const{id:r,min:s,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:v,allowWheelScrub:S=!1,snapOnStep:N=!1,allowOutOfRange:C=!1,format:x,locale:T,render:k,className:A,inputRef:M,...D}=t,{setDirty:V,validityData:P,disabled:I,setFilled:_,invalid:L,name:O,state:q,validation:F,shouldValidateOnChange:z}=Mn(),U=I||c,j=O??f,pe=u==="any"?1:u,[de,ke]=y.useState(!1),ge=s??Number.MIN_SAFE_INTEGER,X=o??Number.MAX_SAFE_INTEGER,B=s??0,G=x==null?void 0:x.style,Y=y.useRef(null),$=Dn(M,F.inputRef),J=mo({id:r}),[ie,Pe]=Hr({controlled:g,default:m,name:"NumberField",state:"value"}),Q=ie??null,be=Gl(Q);te(()=>{_(Q!==null)},[_,Q]);const Ne=Ib(),qe=Gl(x),je=y.useRef(!1),gt=he((Z,K)=>{je.current=!1,v==null||v(Z,K)}),vn=io(),gr=Eb(),xn=io(),Nn=y.useRef(!1),Sn=y.useRef(0),Xe=y.useRef(!0),ae=y.useRef(null),st=y.useRef(()=>{}),[bt,br]=y.useState(()=>g!==void 0?dc(Q,T,x):Ft(Q,T,x)),[Zc,$y]=y.useState("numeric"),Jc=he(()=>{const{decimal:Z,group:K,currency:ue,literal:we}=ya(T,x),ne=new Set;$b.forEach(ye=>ne.add(ye)),Z&&ne.add(Z),K&&(ne.add(K),sc.test(K)&&ne.add(" "));const _e=G==="percent"||G==="unit"&&(x==null?void 0:x.unit)==="percent",Ve=G==="percent"||G==="unit"&&(x==null?void 0:x.unit)==="permille";return _e&&Ql.forEach(ye=>ne.add(ye)),Ve&&Rl.forEach(ye=>ne.add(ye)),G==="currency"&&ue&&ne.add(ue),we&&(Array.from(we).forEach(ye=>ne.add(ye)),sc.test(we)&&ne.add(" ")),zb.forEach(ye=>ne.add(ye)),ge<0&&Hb.forEach(ye=>ne.add(ye)),ne}),Lt=he(Z=>Z!=null&&Z.altKey?i:Z!=null&&Z.shiftKey?l:pe),yr=he((Z,K)=>{const ue=K.event,we=K.direction,ne=K.reason,_e=!C||!(ne===Ur||ne===On||ne===jr||ne===Kt||ne===Gt),Ve=ty(Z,{step:we?Lt(ue)*we:void 0,format:qe.current,minWithDefault:ge,maxWithDefault:X,minWithZeroDefault:B,snapOnStep:N,small:(ue==null?void 0:ue.altKey)??!1,clamp:_e}),ye=K.reason===Ur||K.reason===Kt||K.reason===On||K.reason===jr||K.reason===Gt,ka=Ve!==Q||ye&&(Z!==Q||Xe.current===!1);if(ka){if(ae.current=Ve,b==null||b(Ve,K),K.isCanceled)return ka;Pe(Ve),V(Ve!==P.initialValue),je.current=!0}return Xe.current&&br(Ft(Ve,T,x)),Ne(),ka}),Cn=he((Z,{direction:K,currentValue:ue,event:we,reason:ne})=>{const _e=ue??be.current,Ve=typeof _e=="number"?_e+Z*K:Math.max(0,s??0);return yr(Ve,Ee(ne,we,void 0,{direction:K}))}),at=he(()=>{xn.clear(),vn.clear(),gr.clear(),st.current(),Sn.current=0}),Qc=he((Z,K)=>{if(at(),!Y.current)return;const ue=$r(Y.current);function we(_e){_e.preventDefault()}ue.addEventListener("contextmenu",we),st.current=()=>{ue.removeEventListener("contextmenu",we)},ue.addEventListener("pointerup",_e=>{Nn.current=!1,at();const Ve=ae.current??be.current;gt(Ve,Xt(Z?"increment":"decrement",_e))},{once:!0});function ne(){const _e=Lt(K)??cr;return Cn(_e,{direction:Z?1:-1,event:K,reason:Z?"increment-press":"decrement-press"})}if(!ne()){at();return}vn.start(Gb,()=>{gr.start(jb,()=>{ne()||at()})})});te(function(){if(!Xe.current)return;const K=g!==void 0?dc(Q,T,x):Ft(Q,T,x);K!==bt&&br(K)}),te(function(){if(!pw)return;let K="text";ge>=0&&(K="decimal"),$y(K)},[ge,G]),y.useEffect(()=>()=>at(),[at]),y.useEffect(function(){const K=Y.current;if(U||w||!S||!K)return;function ue(we){if(we.ctrlKey||co(Y.current).activeElement!==Y.current)return;we.preventDefault();const ne=Lt(we)??cr;Cn(ne,{direction:we.deltaY>0?-1:1,event:we,reason:"wheel"})}return K.addEventListener("wheel",ue),()=>{K.removeEventListener("wheel",ue)}},[S,Cn,U,w,l,pe,Lt]);const Aa=y.useMemo(()=>({...q,disabled:U,readOnly:w,required:d,value:Q,inputValue:bt,scrubbing:de}),[q,U,w,d,Q,bt,de]),zy=y.useMemo(()=>({inputRef:Y,inputValue:bt,value:Q,startAutoChange:Qc,stopAutoChange:at,minWithDefault:ge,maxWithDefault:X,disabled:U,readOnly:w,id:J,setValue:yr,incrementValue:Cn,getStepAmount:Lt,allowInputSyncRef:Xe,formatOptionsRef:qe,valueRef:be,lastChangedValueRef:ae,hasPendingCommitRef:je,isPressedRef:Nn,intentionalTouchCheckTimeout:xn,movesAfterTouchRef:Sn,name:j,required:d,invalid:L,inputMode:Zc,getAllowedNonNumericKeys:Jc,min:s,max:o,setInputValue:br,locale:T,isScrubbing:de,setIsScrubbing:ke,state:Aa,onValueCommitted:gt}),[Y,bt,Q,Qc,at,ge,X,U,w,J,yr,Cn,Lt,qe,be,xn,j,d,L,Zc,Jc,s,o,br,T,de,Aa,gt]),Hy=Ge("div",t,{ref:n,state:Aa,props:D,stateAttributesMapping:fn});return a.jsxs(ha.Provider,{value:zy,children:[Hy,a.jsx("input",{...F.getInputValidationProps({onFocus(){var Z;(Z=Y.current)==null||Z.focus()},onChange(Z){if(Z.nativeEvent.defaultPrevented)return;const K=Z.currentTarget.valueAsNumber,ue=Number.isNaN(K)?null:K,we=Ee(Gt,Z.nativeEvent);V(ue!==P.initialValue),yr(ue,we),z()&&F.commit(ue)}}),ref:$,type:"number",name:j,value:Q??"",min:s,max:o,step:u,disabled:U,required:d,"aria-hidden":!0,tabIndex:-1,style:j?Ab:Db})]})});process.env.NODE_ENV!=="production"&&(cc.displayName="NumberFieldRoot");function dc(e,t,n){return(n==null?void 0:n.maximumFractionDigits)!=null||(n==null?void 0:n.minimumFractionDigits)!=null?Ft(e,t,n):Xl(e,t,n)}const wc=y.forwardRef(function(t,n){const{render:r,className:s,...o}=t,{state:i}=ir();return Ge("div",t,{ref:n,state:i,props:[{role:"group"},o],stateAttributesMapping:fn})});process.env.NODE_ENV!=="production"&&(wc.displayName="NumberFieldGroup");function gn(e){return e==="touch"||e==="pen"}function fc(e){const{allowInputSyncRef:t,disabled:n,formatOptionsRef:r,getStepAmount:s,id:o,incrementValue:i,inputRef:u,inputValue:l,intentionalTouchCheckTimeout:d,isIncrement:c,isPressedRef:w,locale:f,movesAfterTouchRef:m,readOnly:g,setValue:b,startAutoChange:v,stopAutoChange:S,valueRef:N,lastChangedValueRef:C,onValueCommitted:x}=e,T=y.useRef({x:0,y:0}),k=y.useRef(!1),A=y.useRef(!1),M=y.useRef(""),D=c?"increment-press":"decrement-press";function V(I){t.current=!0;const _=mn(l,f,r.current);_!==null&&(N.current=_,b(_,Ee(D,I,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(){k.current=!0},onTouchEnd(){k.current=!1},onClick(I){const _=n||g;if(I.defaultPrevented||_||(gn(M.current)?A.current:I.detail!==0))return;V(I.nativeEvent);const L=s(I)??cr,O=N.current;i(L,{direction:c?1:-1,event:I.nativeEvent,reason:D});const q=C.current??N.current;q!==O&&x(q,Xt(D,I.nativeEvent))},onPointerDown(I){var O;const _=!I.button||I.button===0;if(I.defaultPrevented||g||!_||n)return;M.current=I.pointerType,A.current=!1,w.current=!0,T.current={x:I.clientX,y:I.clientY},V(I.nativeEvent),gn(I.pointerType)?d.start(Kb,()=>{const q=m.current;m.current=0,w.current&&q!=null&&q<Yb?(v(c,I),A.current=!0):(A.current=!1,S())}):(I.preventDefault(),(O=u.current)==null||O.focus(),v(c,I))},onPointerUp(I){gn(I.pointerType)&&(w.current=!1)},onPointerMove(I){if(n||g||!gn(I.pointerType)||!w.current)return;m.current!=null&&(m.current+=1);const{x:L,y:O}=T.current,q=L-I.clientX,F=O-I.clientY;q**2+F**2>Xb**2&&S()},onMouseEnter(I){const _=n||g;I.defaultPrevented||_||!w.current||k.current||gn(M.current)||v(c,I)},onMouseLeave(){k.current||S()},onMouseUp(){k.current||S()}}}const pc=y.forwardRef(function(t,n){const{render:r,className:s,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:v,isPressedRef:S,locale:N,maxWithDefault:C,movesAfterTouchRef:x,readOnly:T,setValue:k,startAutoChange:A,state:M,stopAutoChange:D,value:V,valueRef:P,lastChangedValueRef:I,onValueCommitted:_}=ir(),L=V!=null&&V>=C,O=o||d||L,q=fc({isIncrement:!0,inputRef:g,startAutoChange:A,stopAutoChange:D,inputValue:b,disabled:O,readOnly:T,id:f,setValue:k,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:c,valueRef:P,isPressedRef:S,intentionalTouchCheckTimeout:v,movesAfterTouchRef:x,locale:N,lastChangedValueRef:I,onValueCommitted:_}),{getButtonProps:F,buttonRef:z}=da({disabled:O,native:i,focusableWhenDisabled:!0}),U=y.useMemo(()=>({...M,disabled:O}),[M,O]);return Ge("button",t,{ref:[n,z],state:U,props:[q,u,F],stateAttributesMapping:fn})});process.env.NODE_ENV!=="production"&&(pc.displayName="NumberFieldIncrement");const hc=y.forwardRef(function(t,n){const{render:r,className:s,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:v,isPressedRef:S,minWithDefault:N,movesAfterTouchRef:C,readOnly:x,setValue:T,startAutoChange:k,state:A,stopAutoChange:M,value:D,valueRef:V,locale:P,lastChangedValueRef:I,onValueCommitted:_}=ir(),L=D!=null&&D<=N,O=o||d||L,q=fc({isIncrement:!1,inputRef:g,startAutoChange:k,stopAutoChange:M,inputValue:b,disabled:O,readOnly:x,id:f,setValue:T,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:c,valueRef:V,isPressedRef:S,intentionalTouchCheckTimeout:v,movesAfterTouchRef:C,locale:P,lastChangedValueRef:I,onValueCommitted:_}),{getButtonProps:F,buttonRef:z}=da({disabled:O,native:i,focusableWhenDisabled:!0}),U=y.useMemo(()=>({...A,disabled:O}),[A,O]);return Ge("button",t,{ref:[n,z],state:U,props:[q,u,F],stateAttributesMapping:fn})});process.env.NODE_ENV!=="production"&&(hc.displayName="NumberFieldDecrement");function ny(e,t){const n=y.useRef(e),r=he(t);te(()=>{n.current!==e&&r(n.current)},[e,r]),te(()=>{n.current=e},[e])}const ry={...Or,...fn},sy=new Set(["Backspace","Delete","ArrowLeft","ArrowRight","Tab","Enter","Escape"]),mc=y.forwardRef(function(t,n){const{render:r,className:s,...o}=t,{allowInputSyncRef:i,disabled:u,formatOptionsRef:l,getAllowedNonNumericKeys:d,getStepAmount:c,id:w,incrementValue:f,inputMode:m,inputValue:g,max:b,min:v,name:S,readOnly:N,required:C,setValue:x,state:T,setInputValue:k,locale:A,inputRef:M,value:D,onValueCommitted:V,lastChangedValueRef:P,hasPendingCommitRef:I,valueRef:_}=ir(),{clearErrors:L}=Za(),{validationMode:O,setTouched:q,setFocused:F,invalid:z,shouldValidateOnChange:U,validation:j}=Mn(),{labelId:pe}=Br(),de=y.useRef(!1),ke=y.useRef(!1);return go({id:w,commit:j.commit,value:D,controlRef:M,name:S,getValue:()=>D??null}),ny(D,B=>{const G=U();if(L(S),G&&j.commit(D),!(B===D||G)){if(ke.current){ke.current=!1;return}j.commit(D,!0)}}),Ge("input",t,{ref:[n,M],state:T,props:[{id:w,required:C,disabled:u,readOnly:N,inputMode:m,value:g,type:"text",autoComplete:"off",autoCorrect:"off",spellCheck:"false","aria-roledescription":"Number field","aria-invalid":z||void 0,"aria-labelledby":pe,suppressHydrationWarning:!0,onFocus(B){if(B.defaultPrevented||N||u||(F(!0),de.current))return;de.current=!0;const G=B.currentTarget,Y=G.value.length;G.setSelectionRange(Y,Y)},onBlur(B){if(B.defaultPrevented||N||u)return;q(!0),F(!1);const G=!i.current,Y=I.current;if(i.current=!0,g.trim()===""){x(null,Ee(Kt,B.nativeEvent)),O==="onBlur"&&j.commit(null),V(null,Xt(Kt,B.nativeEvent));return}const $=l.current,J=mn(g,A,$);if(J===null)return;const ie=($==null?void 0:$.maximumFractionDigits)!=null||($==null?void 0:$.minimumFractionDigits)!=null,Pe=$==null?void 0:$.maximumFractionDigits,Q=ie&&typeof Pe=="number"?Number(J.toFixed(Pe)):J,be=Xt(On,B.nativeEvent),Ne=D!==Q,qe=G||Ne||Y;O==="onBlur"&&j.commit(Q),Ne&&(ke.current=!0,x(Q,Ee(On,B.nativeEvent))),qe&&V(Q,be);const je=Ft(Q,A,$),gt=Xl(J,A,$);!(!ie&&J===D&&g===gt)&&g!==je&&k(je)},onChange(B){if(B.nativeEvent.defaultPrevented)return;i.current=!1;const G=B.target.value;if(G.trim()===""){k(G),x(null,Ee(Kt,B.nativeEvent));return}const Y=d();if(!Array.from(G).every(ie=>{const Pe=ie>="0"&&ie<="9",Q=ga.test(ie),be=ba.test(ie),Ne=nc.test(ie),qe=rc.test(ie),je=hn.test(ie);return Pe||Q||be||Ne||qe||je||Y.has(ie)}))return;const J=mn(G,A,l.current);k(G),J!==null&&x(J,Ee(Ur,B.nativeEvent))},onKeyDown(B){if(B.defaultPrevented||N||u)return;const G=B.nativeEvent;i.current=!0;const Y=d();let $=Y.has(B.key);const{decimal:J,currency:ie,percentSign:Pe}=ya(A,l.current),Q=B.currentTarget.selectionStart,be=B.currentTarget.selectionEnd,Ne=Q===0&&be===g.length,qe=ae=>Q!=null&&be!=null&&ae>=Q&&ae<be;if(hn.test(B.key)&&Array.from(Y).some(ae=>hn.test(ae||""))){const ae=g.search(uc),st=ae!=null&&ae!==-1&&qe(ae);$=!(hn.test(g)||lr.test(g))||Ne||st}if(lr.test(B.key)&&Array.from(Y).some(ae=>lr.test(ae||""))){const ae=g.search(lc),st=ae!=null&&ae!==-1&&qe(ae);$=!(hn.test(g)||lr.test(g))||Ne||st}[J,ie,Pe].forEach(ae=>{if(B.key===ae){const st=g.indexOf(ae),bt=qe(st);$=!g.includes(ae)||Ne||bt}});const je=B.key>="0"&&B.key<="9",gt=ga.test(B.key),vn=ba.test(B.key),gr=rc.test(B.key),xn=sy.has(B.key);if(B.which===229||B.altKey||B.ctrlKey||B.metaKey||$||je||gt||gr||vn||xn)return;const Nn=mn(g,A,l.current),Sn=c(B)??cr;yw(B);const Xe=Xt(Yt,G);B.key==="ArrowUp"?(f(Sn,{direction:1,currentValue:Nn,event:G,reason:Yt}),V(P.current??_.current,Xe)):B.key==="ArrowDown"?(f(Sn,{direction:-1,currentValue:Nn,event:G,reason:Yt}),V(P.current??_.current,Xe)):B.key==="Home"&&v!=null?(x(v,Ee(Yt,G)),V(P.current??_.current,Xe)):B.key==="End"&&b!=null&&(x(b,Ee(Yt,G)),V(P.current??_.current,Xe))},onPaste(B){if(B.defaultPrevented||N||u)return;B.preventDefault();const Y=(B.clipboardData||window.Clipboard).getData("text/plain"),$=mn(Y,A,l.current);$!==null&&(i.current=!1,x($,Ee(jr,B.nativeEvent)),k(Y))}},j.getValidationProps(),o],stateAttributesMapping:ry})});process.env.NODE_ENV!=="production"&&(mc.displayName="NumberFieldInput");const ay={wuStepper:"_wuStepper_apbnq_1"},oy=({onChange:e,Label:t,defaultValue:n=0,readonly:r,dir:s,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,v]=y.useState(l!==void 0?Number(l):n||0);y.useEffect(()=>{l!==void 0&&v(Number(l))},[l]);const S=A=>{v(A),e==null||e(A)},N=A=>{const M=Number(A.target.value);Number.isNaN(M)||v(M)},C=()=>{f&&(i!==void 0&&b<i?(v(i),e==null||e(i)):u!==void 0&&b>u&&(v(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 x={inc:r||u!==void 0&&b>=u||w,dec:r||i!==void 0&&b<=i||w},T=i!==void 0&&b<i||u!==void 0&&b>u,k=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(cc,{id:g,value:b,step:o,readOnly:r,onValueChange:A=>typeof A=="number"&&S(A),dir:s,className:p("wu-flex wu-stepper",s==="rtl"&&c!=="top"&&"wu-gap-2",ay.wuStepper,iy({labelPosition:c}),d),children:[t&&a.jsx(Me,{htmlFor:g,className:"wu-input-label",children:t}),a.jsxs(wc,{className:"wu-flex wu-max-w-[97px] wu-relative",children:[a.jsx(hc,{"aria-label":"decrement",className:p(k,s==="rtl"?"wu-right-0":"wu-left-0","wu-stepper-button"),disabled:x.dec,children:a.jsx("span",{className:"wu-text-base wm-minimize"})}),a.jsx(mc,{"aria-label":"stepper",role:"spinbutton",type:"text","aria-invalid":T||void 0,dir:s,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",T&&"wu-border-red-deep focus:wu-border-red-deep","wu-stepper-input"),readOnly:r,onChange:N,onBlur:C,disabled:w,min:i,max:u,step:o,value:b,...m}),a.jsx(pc,{"aria-label":"increment",className:p(k,s==="rtl"?"wu-left-0":"wu-right-0","wu-stepper-button"),disabled:x.inc,children:a.jsx("span",{className:"wu-text-base wm-add"})})]})]})},iy=Oe.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"}}}),gc=Oe.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"}}),uy=y.forwardRef(({className:e,variant:t,size:n,...r},s)=>a.jsx(La.Root,{ref:s,className:p(gc({variant:t,size:n,className:e})),...r}));uy.displayName=La.Root.displayName;const bc=y.createContext({size:"default",variant:"default"}),dr=y.forwardRef(({className:e,variant:t,size:n,children:r,...s},o)=>a.jsx(Tn.Root,{ref:o,className:p("wu-flex wu-items-center wu-justify-center wu-gap-1",e),...s,children:a.jsx(bc.Provider,{value:{variant:t,size:n},children:r})}));dr.displayName=Tn.Root.displayName;const mt=y.forwardRef(({className:e,children:t,variant:n,size:r,...s},o)=>{const i=y.useContext(bc);return a.jsx(Tn.Item,{ref:o,className:p(gc({variant:i.variant||n,size:i.size||r}),e),...s,children:t})});mt.displayName=Tn.Item.displayName;const yc=h.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,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",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-lead",l===r&&"wu-text-white",s&&r===l&&"wu-text-gray-lead","wu-switcher-icon-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(dr,{ref:t,type:"single",value:r,onValueChange:i,disabled:s,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",s&&"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",r==="opt1"&&"",r==="opt2"&&o!=="rtl"&&"wu-translate-x-full",r==="opt2"&&o==="rtl"&&"-wu-translate-x-full",s&&"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})]})})});yc.displayName="_IconTab";const vc=h.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,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",s&&"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===r&&"wu-text-white wu-font-medium",s&&r===d&&"wu-text-gray-lead","wu-switcher-tab-item");return a.jsx(a.Fragment,{children:a.jsxs(dr,{ref:t,type:"single",value:r,onValueChange:u,disabled:s,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",s&&"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",r==="opt1"&&"",r==="opt2"&&o!=="rtl"&&"wu-translate-x-full",r==="opt2"&&o==="rtl"&&"-wu-translate-x-full",s&&"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})})]})})});vc.displayName="_Tab";const xc=h.forwardRef((e,t)=>{const{options:n,value:r,disabled:s,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",s&&"wu-cursor-not-allowed data-[state=on]:wu-text-gray-subtle wu-text-gray-subtle",w===r&&"wu-text-primary wu-font-medium",s&&r===w&&"wu-text-gray-lead","wu-switcher-toggle-item"),l=p("wu-w-fit wu-gap-2",s&&"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",s&&"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",r==="opt1"&&o!=="rtl"&&"-wu-translate-x-[10px]",r==="opt1"&&o==="rtl"&&"wu-translate-x-[10px]",r==="opt2"&&o!=="rtl"&&"wu-translate-x-[10px]",r==="opt2"&&o==="rtl"&&"-wu-translate-x-[10px]",s&&"wu-hidden","wu-switcher-toggle-knob");return a.jsx(a.Fragment,{children:a.jsxs(dr,{ref:t,type:"single",value:r,disabled:s,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(r==="opt1"?"opt2":"opt1"),className:d,disabled:s,"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})})]})})});xc.displayName="_Toggle";const Nc=h.forwardRef((e,t)=>{const{type:n,options:r,value:s,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 v=b==="opt1"?r[0].value:r[1].value;l&&l(v),f(b)};if(h.useEffect(()=>{if(!Array.isArray(r)||r.length<2)throw new Error("Options are not sufficient");f(s===r[0].value?"opt1":"opt2")},[r,s]),!Array.isArray(r)||r.length<2)return a.jsx(a.Fragment,{});switch(n){case"toggle":return a.jsx(xc,{...c,ref:t,options:r,value:w||"opt1",onChange:m,disabled:o,dir:i});case"iconTab":return a.jsx(yc,{ref:t,options:r,value:w||"opt1",onChange:m,disabled:o,dir:i});default:return a.jsx(vc,{ref:t,options:r,value:w||"opt1",onChange:m,disabled:o,dir:i,size:u})}});Nc.displayName="WuSwitcher";const Sc=ut.Root,xa=y.forwardRef(({className:e,children:t,...n},r)=>a.jsx(ut.List,{className:p("wu-relative wu-flex",e),...n,ref:r,children:t}));xa.displayName=ut.List.displayName;const Na=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}));Na.displayName=ut.Trigger.displayName;const Cc=y.forwardRef(({className:e,...t},n)=>a.jsx(ut.Content,{ref:n,className:e,...t}));Cc.displayName=ut.Content.displayName;const Tc=({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(r=>a.jsx(Cc,{value:r.value,forceMount:t||void 0,className:p("wu-w-full wu-h-full wu-overflow-y-auto",t&&n,"wu-tab-content"),children:r.Content},r.value))})},ly=e=>{const[t,n]=h.useState(!1),[r,s]=h.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollLeft>0),s(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:r,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="right"?l.clientWidth:-l.clientWidth)*.8;l.scrollBy({left:d,behavior:"smooth"})}}}},Ec=(e,t)=>{const[n,r]=h.useState({width:0,left:0,height:0,top:0}),s=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:s?2:l.offsetWidth,left:s?0:l.offsetLeft,height:s?l.offsetHeight:1,top:s?l.offsetTop:0};r(d)}},u=new MutationObserver(i);return u.observe(o,{attributes:!0,subtree:!0}),i(),()=>{u.disconnect()}}},[e,s]),n},cy=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:s=!1,className:o,dir:i="ltr",position:u="top"})=>{var C;const l=h.useRef(null),d=Ec(l,"horizontal"),{showLeftArrow:c,showRightArrow:w,scrollByTab:f}=ly(l),[m,g]=h.useState(!1),b=()=>f("left"),v=()=>f("right"),S=x=>a.jsx("div",{"data-testid":`gradient-overlay-${x}`,className:p("wu-absolute wu-top-0 wu-h-full wu-w-20 wu-z-10 wu-pointer-events-none",x==="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")}),N=(x,T,k)=>{const A=T==="left";return a.jsx("button",{onClick:x,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",A?"wu-left-0":"wu-right-0",k&&"wu-translate-x-0 wu-opacity-100",!k&&[A?"-wu-translate-x-full":"wu-translate-x-full","wu-opacity-0"]),"aria-label":A?"scroll-left":"scroll-right",children:a.jsx("span",{className:p("wu-text-blue-p wu-text-lg",A?"wm-keyboard-arrow-left":"wm-keyboard-arrow-right")})})};return a.jsxs(Sc,{defaultValue:n||((C=e[0])==null?void 0:C.value),value:t,onValueChange:r,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"),N(b,"left",c&&m),a.jsxs(xa,{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(x=>a.jsx(Na,{value:x.value,children:x.Trigger},x.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"),N(v,"right",w&&m)]}),a.jsx(Tc,{items:e,enableAnimation:s})]})},dy=e=>{const[t,n]=h.useState(!1),[r,s]=h.useState(!1),o=()=>{const u=e.current;u&&(n(u.scrollTop>0),s(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:r,scrollByTab:u=>{const l=e.current;if(l){const d=(u==="down"?l.clientHeight:-l.clientHeight)*.8;l.scrollBy({top:d,behavior:"smooth"})}}}},wy=({items:e,value:t,defaultValue:n,onValueChange:r,enableAnimation:s=!1,className:o,dir:i="ltr",position:u="left"})=>{var C;const l=h.useRef(null),d=Ec(l,"vertical"),{showTopArrow:c,showBottomArrow:w,scrollByTab:f}=dy(l),[m,g]=h.useState(!1),b=()=>f("up"),v=()=>f("down"),S=x=>a.jsx("div",{className:p("wu-absolute wu-left-0 wu-w-full wu-h-12 wu-z-10 wu-pointer-events-none",x==="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")}),N=(x,T,k)=>{const A=T==="up";return a.jsx("button",{onClick:x,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",A?"-wu-top-1":"-wu-bottom-1",k&&"wu-translate-y-0 wu-opacity-100",!k&&[A?"-wu-translate-y-full":"wu-translate-y-full","wu-opacity-0"]),"aria-label":A?"scroll-up":"scroll-down",children:a.jsx("span",{className:p("wu-text-blue-p wu-text-lg",A?"wm-keyboard-arrow-up":"wm-keyboard-arrow-down")})})};return a.jsxs(Sc,{defaultValue:n||((C=e[0])==null?void 0:C.value),value:t,onValueChange:r,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"),N(b,"up",c&&m),a.jsxs(xa,{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(x=>a.jsx(Na,{value:x.value,children:x.Trigger},x.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"),N(v,"down",w&&m)]}),a.jsx(Tc,{items:e,enableAnimation:s})]})},fy=({...e})=>e.orientation==="vertical"?a.jsx(wy,{...e}):a.jsx(cy,{...e}),Sa=y.forwardRef(({className:e,...t},n)=>a.jsx("table",{ref:n,className:p("wu-w-full wu-caption-bottom wu-text-sm",e),...t}));Sa.displayName="Table";const Mc=y.forwardRef(({className:e,...t},n)=>a.jsx("thead",{ref:n,className:p("[&_tr]:wu-border-b",e),...t}));Mc.displayName="TableHeader";const Ic=y.forwardRef(({className:e,...t},n)=>a.jsx("tbody",{ref:n,className:p("",e),...t}));Ic.displayName="TableBody";const py=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}));py.displayName="TableFooter";const bn=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}));bn.displayName="TableRow";const Ca=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}));Ca.displayName="TableHead";const wr=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}));wr.displayName="TableCell";const Ta=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}));Ta.displayName="TableCaption";const hy=({columns:e,rowSelection:t})=>{const n=(t==null?void 0:t.isEnabled)??!1,r=(t==null?void 0:t.size)??48,{onRowSelect:s,rowUniqueKey:o,isRowDisabled:i,hideSelectAll:u}=t||{},l=h.useCallback(c=>w=>{s==null||s(w?c:[])},[s]);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(Le,{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(Le,{checked:c.getIsSelected(),disabled:w,onChange:f=>{w||c.toggleSelected(!!f)},"aria-label":String(c.original[o])})},filterable:!1,accessorKey:"select",size:r},...e]:e,[e,n,l,i,u])}};function Dc({data:e,columns:t,rowSelection:n}){const{finalColumns:r}=hy({columns:t,rowSelection:n}),s=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:r,rowSelectionState:s}}const Ac=({table:e,size:t,NoDataContent:n,isLoading:r,CustomLoader:s,isRowDisabled:o})=>{var i;return a.jsx(Ic,{children:r?a.jsx(bn,{children:a.jsx(wr,{colSpan:e.getAllColumns().length,className:"wu-text-center wu-h-[35vh] wu-loader-container",children:s||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(bn,{"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(wr,{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:$e.flexRender(c.column.columnDef.cell,c.getContext())},`${c.id}-${w}`))},`${u.id}-${l}`)}):a.jsx(bn,{children:a.jsx(wr,{colSpan:e.getAllColumns().length,children:n})})})},kc=({table:e,sortableColumns:t,manual:n=!1,onSort:r,size:s,isRowSelected:o,HeaderAction:i,isStickyHeader:u})=>{const l=s==="compact"?"wu-h-8":"wu-h-10",d=c=>{const{id:w,columnDef:f,getIsSorted:m,toggleSorting:g}=c,{header:b}=f,v=f.headerAlign;if(!t.includes(w))return b;const S=m(),N=S==="asc",C=S==="desc",x=()=>{n?(g(!C),r==null||r({id:w,desc:C})):g(c.getIsSorted()==="asc")};return a.jsxs("button",{onClick:x,"aria-label":`Sort by ${b}`,className:p("wu-flex wu-items-center wu-gap-1 wu-w-full",v==="right"&&"wu-justify-end",v==="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",N&&"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",C&&"wu-hidden",!S&&"-wu-bottom-[10px]")})]})]})};return a.jsxs(Mc,{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(bn,{className:"wu-relative",children:c.headers.map(w=>w.column.id==="actions"?a.jsx(Ca,{colSpan:w.colSpan,className:"wu-text-xs wu-font-medium",style:{width:`${w.getSize()}px`}},w.id):a.jsx(Ca,{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:$e.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(Le,{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})]})]})},Pc=Oe.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"}}}),my=({data:e,columns:t,isLoading:n=!1,variant:r="unstyled",sort:s,size:o,rowSelection:i,HeaderAction:u,NoDataContent:l,stickyHeader:d=!1,CustomLoader:c,caption:w,...f})=>{var C;const{finalColumns:m,rowSelectionState:g}=Dc({data:e,columns:t,rowSelection:i}),b=h.useMemo(()=>m.filter(x=>x.enableSorting).map(x=>x.accessorKey),[m]),v=((C=i==null?void 0:i.selectedRows)==null?void 0:C.length)??0,S=x=>{if(typeof x=="function"){const T=x(g),k=Object.keys(T).filter(A=>T[Number(A)]).map(A=>e[Number(A)]);i==null||i.onRowSelect(k)}},N=$e.useReactTable({data:e,columns:m,getCoreRowModel:$e.getCoreRowModel(),getPaginationRowModel:$e.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(Ta,{className:"wu-font-light",children:w}),a.jsxs(Sa,{...f,className:p(Pc({variant:r}),f.className),children:[a.jsx(kc,{table:N,sortableColumns:b,manual:!0,onSort:s==null?void 0:s.onSort,size:o,HeaderAction:u,isRowSelected:v>0,isStickyHeader:d}),!n&&a.jsx(Ac,{table:N,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,{})})]})},gy=({data:e,columns:t,variant:n="unstyled",size:r="default",sort:s,filterText:o,pagination:i,stickyHeader:u,HeaderAction:l,CustomLoader:d,NoDataContent:c,isLoading:w,caption:f,rowSelection:m,...g})=>{var I;const[b,v]=h.useState((s==null?void 0:s.initial)||[]),[S,N]=h.useState([]),[C,x]=h.useState((i==null?void 0:i.pageIndex)??0),{finalColumns:T,rowSelectionState:k}=Dc({data:e,columns:t,rowSelection:m}),A=h.useMemo(()=>T.filter(_=>_.enableSorting).map(_=>_.accessorKey),[T]),M=h.useMemo(()=>T.filter(_=>_.filterable).map(_=>_.accessorKey),[T]),D=((I=m==null?void 0:m.selectedRows)==null?void 0:I.length)??0,V=_=>{const L=typeof _=="function"?_(k):_,O=[],q=m==null?void 0:m.isRowDisabled;for(const F in L){if(!L[F])continue;const z=e[Number(F)];z&&(q!=null&&q(z)||O.push(z))}m==null||m.onRowSelect(O)},P=$e.useReactTable({data:e,columns:T,getCoreRowModel:$e.getCoreRowModel(),getFilteredRowModel:$e.getFilteredRowModel(),getSortedRowModel:$e.getSortedRowModel(),getPaginationRowModel:i?$e.getPaginationRowModel():void 0,enableRowSelection:m!=null&&m.isRowDisabled?_=>!m.isRowDisabled(_.original):!0,state:{sorting:b,columnFilters:S,...i?{pagination:i}:{},...m!=null&&m.isEnabled?{rowSelection:k}:{}},onSortingChange:v,onColumnFiltersChange:N,onRowSelectionChange:V});return h.useEffect(()=>{M.forEach(_=>{var L;(L=P.getColumn(_))==null||L.setFilterValue(o)})},[o,M,P]),h.useEffect(()=>{i&&(i==null?void 0:i.pageIndex)!==C&&(m==null||m.onRowSelect(()=>[]),P.resetRowSelection(),x(i.pageIndex))},[i==null?void 0:i.pageIndex]),a.jsx("div",{className:"wu-text-gray-lead wu-table-container wu-relative",children:a.jsxs(Sa,{...g,className:p("wu-overflow-x-auto wu-w-full",Pc({variant:n}),"wu-table-fixed",g.className),children:[f&&a.jsx(Ta,{children:f}),a.jsx(kc,{table:P,sortableColumns:A,size:r,HeaderAction:l,isRowSelected:D>0,isStickyHeader:u}),a.jsx(Ac,{table:P,size:r,NoDataContent:c,CustomLoader:d,isLoading:w,isRowDisabled:m==null?void 0:m.isRowDisabled})]})})},_c=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}));_c.displayName="Textarea";const Vc=h.forwardRef((e,t)=>{const{Label:n,id:r=Cr(),variant:s="flat",readonly:o,maxLength:i,labelPosition:u="top",...l}=e,d=w=>{l.onChange&&l.onChange(w)},c=En(u);return a.jsxs("div",{className:p(c,"wu-flex wu-textarea-container"),dir:l.dir,children:[a.jsx(_c,{...l,ref:t,id:r,className:p("wu-peer wu-rounded-t-sm",s==="outlined"?"wu-border wu-border-gray-subtle":"",l.className),onChange:d,readOnly:o,maxLength:i}),n&&a.jsx(Me,{htmlFor:r,className:"wu-textarea-label",children:n})]})});Vc.displayName="WuTextarea";function by(e){if(typeof e=="string"&&e.includes("T")){const t=H.parseISO(e);return H.format(t,"HH:mm")}if(typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)){const t=H.parse(e,"HH:mm:ss",new Date);return H.format(t,"HH:mm")}return typeof e=="string"&&/^\d{2}:\d{2}$/.test(e)?e:"00:00"}const Oc=["12",...Array.from({length:11},(e,t)=>String(t+1).padStart(2,"0"))],Fc=Array.from({length:60},(e,t)=>String(t).padStart(2,"0")),Lc=["am","pm"],fr=50;function yy(e){return Array(fr).fill(e).flat()}function Ea(e,t){const n=e.indexOf(t);return[...e.slice(n),...e.slice(0,n)]}function vy(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 Wc(e){const t=Number(e),n=t>=12?"pm":"am",r=t%12===0?12:t%12;return{hour:String(r),meridiem:n}}const xy=({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}),Ma=({values:e,selectedValue:t,scrollRef:n,onSelect:r,repeatItems:s=!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:(s?yy(e):e).map((i,u)=>a.jsx(xy,{value:i,isSelected:i===t,onClick:()=>r(i)},`${i}-${u}`))});function Ny(e,t,n,r){const s=h.useMemo(()=>e?Ea(Oc,t.padStart(2,"0")):Oc,[e]),o=h.useMemo(()=>e?Ea(Fc,n.padStart(2,"0")):Fc,[e]),i=h.useMemo(()=>e?Ea(Lc,r):Lc,[e]);return{rotatedHours:s,rotatedMinutes:o,rotatedMeridiem:i}}function Sy(e,t,n){h.useEffect(()=>{function r(i){if(i){const u=i.scrollHeight/fr,l=Math.floor(fr/2);i.scrollTop=l*u;const d=()=>{const{scrollTop:c}=i,w=Math.round(c/u);(w<=1||w>=fr-2)&&(i.scrollTop=l*u)};return i.addEventListener("scroll",d),()=>{i.removeEventListener("scroll",d)}}}if(!e)return;const s=r(t.current),o=r(n.current);return()=>{s==null||s(),o==null||o()}},[e,t,n])}const Bc=({className:e,time:t,Label:n,labelPosition:r,dir:s,...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"),[v,S]=h.useState("00"),[N,C]=h.useState("am");h.useEffect(()=>{if(!t){d(""),b("12"),S("00"),C("am"),c.current&&(c.current.value="");return}const M=by(t);d(M);const[D,V]=M.split(":"),{hour:P,meridiem:I}=Wc(D);b(P),S(V),C(I),c.current&&(c.current.value=M)},[t]),h.useEffect(()=>{const M=D=>{w.current&&!w.current.contains(D.target)&&u(!1)};return document.addEventListener("mousedown",M),()=>{document.removeEventListener("mousedown",M)}},[]),Sy(i,f,m);const{rotatedHours:x,rotatedMinutes:T,rotatedMeridiem:k}=Ny(i,g,v,N),A=h.useCallback((M,D,V)=>{const P=M??g,I=D??v,_=V??N;b(P),S(I),C(_);const L=`${vy(P,_)}:${I}`;d(L)},[g,v,N]);return a.jsxs("div",{className:p("wu-flex wu-gap-1 wu-relative wu-w-fit wu-flex-col",(r==="right"||r==="left")&&"wu-items-center",r==="left"&&"wu-flex-row",r==="right"&&"wu-flex-row-reverse","wu-input-wrapper"),dir:s,children:[n&&a.jsx(Me,{htmlFor:"time-picker",className:"wu-timepicker-label",children:n}),a.jsxs("div",{className:p("relative inline-block"),ref:w,dir:s,children:[a.jsx(Ke,{ref:c,type:"time",value:l,variant:"flat",role:"textbox",onChange:M=>{d(M.target.value);const[D,V]=M.target.value.split(":"),{hour:P,meridiem:I}=Wc(D);b(P),S(V),C(I)},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(De,{icon:"wm-schedule",className:p("wu-text-base",o.disabled&&"wu-text-lead/50 wu-pointer-events-none wu-opacity-50"),onClick:()=>u(M=>!M),"data-testid":"wu-timepicker-icon"}),iconPosition:"right",dir:s,...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.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"})}));
|
|
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(Ma,{values:x,selectedValue:g.padStart(2,"0"),scrollRef:f,onSelect:M=>A(M,v),className:"wu-time-hour-picker"}),a.jsx(Ma,{values:T,selectedValue:v.padStart(2,"0"),scrollRef:m,onSelect:M=>A(g,M),className:"wu-time-minute-picker"}),a.jsx(Ma,{values:k,selectedValue:N,onSelect:M=>A(void 0,void 0,M),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};Bc.displayName="WuTimePicker";const Cy=1,Ty=1e6;let Ia=0;function Ey(){return Ia=(Ia+1)%Number.MAX_SAFE_INTEGER,Ia.toString()}const Da=new Map,qc=e=>{if(Da.has(e))return;const t=setTimeout(()=>{Da.delete(e),yn({type:"REMOVE_TOAST",toastId:e})},Ty);Da.set(e,t)},My=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Cy)};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?qc(n):e.toasts.forEach(r=>{qc(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},pr=[];let hr={toasts:[]};function yn(e){hr=My(hr,e),pr.forEach(t=>{t(hr)})}function $c({...e}){const t=Ey(),n=s=>yn({type:"UPDATE_TOAST",toast:{...s,id:t}}),r=()=>yn({type:"DISMISS_TOAST",toastId:t});return yn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||r()}}}),{id:t,dismiss:r,update:n}}function Iy(){const[e,t]=h.useState(hr);return h.useEffect(()=>(pr.push(t),()=>{const n=pr.indexOf(t);n>-1&&pr.splice(n,1)}),[e]),{...e,toast:$c,dismiss:n=>yn({type:"DISMISS_TOAST",toastId:n})}}const Dy=()=>({showToast:({message:t,variant:n,duration:r,position:s})=>$c({description:t,variant:n,duration:r,position:s})}),Ay=Ce.Provider,ky=Oe.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"}}),zc=y.forwardRef(({className:e,position:t,...n},r)=>a.jsx(Ce.Viewport,{ref:r,className:p(ky({position:t}),e),...n}));zc.displayName=Ce.Viewport.displayName;const Py=Oe.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"}}),Hc=y.forwardRef(({className:e,variant:t,position:n,...r},s)=>a.jsx(Ce.Root,{ref:s,className:p(Py({variant:t,position:n}),e),...r}));Hc.displayName=Ce.Root.displayName;const _y=y.forwardRef(({className:e,...t},n)=>a.jsx(Ce.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}));_y.displayName=Ce.Action.displayName;const Uc=y.forwardRef(({className:e,...t},n)=>a.jsx(Ce.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"})}));Uc.displayName=Ce.Close.displayName;const jc=y.forwardRef(({className:e,...t},n)=>a.jsx(Ce.Title,{ref:n,className:p("wu-text-sm wu-font-semibold",e),...t}));jc.displayName=Ce.Title.displayName;const Gc=y.forwardRef(({className:e,...t},n)=>a.jsx(Ce.Description,{ref:n,className:p("wu-text-sm wu-opacity-90",e),...t}));Gc.displayName=Ce.Description.displayName;function Vy(){const{toasts:e}=Iy(),t=e.reduce((n,r)=>{const s=r.position||"top";return n[s]||(n[s]=[]),n[s].push(r),n},{});return a.jsx(Ay,{children:Object.entries(t).map(([n,r])=>a.jsx(zc,{position:n,children:r.map(function({id:s,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(Hc,{variant:l||"success",position:d,...c,children:[a.jsxs("div",{className:"wu-grid wu-gap-1",children:[o&&a.jsx(jc,{children:o}),i&&a.jsxs(Gc,{className:"wu-flex wu-items-center wu-gap-3 wu-pr-6",children:[a.jsx(De,{icon:w[l||"success"],className:"wu-text-xl"}),i]})]}),u,a.jsx(Uc,{})]},s)})},n))})}const Oy=()=>a.jsx(Vy,{}),Kc=y.forwardRef(({className:e,dir:t,...n},r)=>a.jsx(Nr.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:r,children:a.jsx(Nr.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")})}));Kc.displayName=Nr.Root.displayName;const Yc=h.forwardRef((e,t)=>{const{Label:n,labelPosition:r="right",onChange:s,className:o,dir:i,disabled:u,id:l=Cr(),...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(Fy({labelPosition:r}),"wu-toggle-container"),dir:i,children:[a.jsx(Kc,{...d,id:l,disabled:u,ref:t,onCheckedChange:s,className:p("wu-peer",o),dir:i}),a.jsx(Me,{htmlFor:l,className:"wu-toggle-label",children:n})]})});Yc.displayName="WuToggle";const Fy=Oe.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"}}}),mr=h.createContext(null),Ly=()=>{const e=h.useContext(mr);if(!e)throw new Error("useTranslation must be used within a WuTranslationProvider");return e.useTranslation()},Wy=()=>{const e=h.useContext(mr);if(!e)throw new Error("useLoadTranslationsFunction must be used within a WuTranslationProvider");return e},By=({children:e})=>{const[t,n]=h.useState({}),[r,s]=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&&s(c)},[]),i=h.useCallback(d=>{s(d)},[]),u=h.useCallback(()=>({t:(c,w)=>t[c]?t[c]:r[c]?r[c]:w||c}),[t,r]),l={loadTranslations:o,setFallbackTranslations:i,useTranslation:u};return a.jsx(mr.Provider,{value:l,children:e})},qy={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.30.0",Object.defineProperty(E,"useContext",{enumerable:!0,get:()=>h.useContext}),E.CHART_COLOR_SYSTEM=qy,E.WuAccordion=gd,E.WuActivityLog=vd,E.WuAppHeader=_w,E.WuAppHeaderAccount=qa,E.WuAppHeaderBar=ja,E.WuAppHeaderHelp=$a,E.WuAppHeaderMenu=Ua,E.WuAppHeaderSearch=kw,E.WuButton=Te,E.WuCalender=Kr,E.WuCard=ko,E.WuCardFooter=_o,E.WuCardHeader=Po,E.WuCheckbox=Le,E.WuChip=Uw,E.WuCombobox=Rw,E.WuCopyToClipboard=ef,E.WuDataTable=my,E.WuDatePicker=Ow,E.WuDateRangePicker=zw,E.WuDisplay=kd,E.WuDrawer=uf,E.WuDrawerClose=lf,E.WuDrilldown=cg,E.WuFooter=Qu,E.WuFormGroup=Aw,E.WuHeading=Dd,E.WuHelpButton=Ru,E.WuIcon=De,E.WuInput=Ke,E.WuInputError=Mw,E.WuInputHint=Iw,E.WuLabel=Me,E.WuListbox=Ng,E.WuLoader=St,E.WuMenu=ta,E.WuMenuCheckboxItem=eg,E.WuMenuIcon=na,E.WuMenuItem=sr,E.WuMenuItemGroup=tg,E.WuMenuRadioItem=ng,E.WuMenuSeparatorItem=rg,E.WuModal=Ig,E.WuModalClose=Pg,E.WuModalContent=Dg,E.WuModalFooter=kg,E.WuModalHeader=Ag,E.WuMonthPicker=Lg,E.WuPagination=pl,E.WuPopover=Ww,E.WuPopoverClose=Zr,E.WuPrimaryNavbar=Bg,E.WuRadioGroup=bl,E.WuScrollArea=$g,E.WuSecondaryNavbar=qg,E.WuSelect=dl,E.WuSidebar=mb,E.WuSidebarCollapsibleMenu=xb,E.WuSidebarContent=gb,E.WuSidebarFooter=bb,E.WuSidebarGroup=yb,E.WuSidebarItem=Ul,E.WuSidebarMenu=vb,E.WuSidebarTrigger=Hl,E.WuSpotlight=ol,E.WuStackedCard=Cb,E.WuStackedCardOverlay=Tb,E.WuStepper=oy,E.WuSubMenu=sg,E.WuSubtext=Ad,E.WuSwitcher=Nc,E.WuTab=fy,E.WuTable=gy,E.WuText=Id,E.WuTextarea=Vc,E.WuTimePicker=Bc,E.WuToast=Oy,E.WuToggle=Yc,E.WuTooltip=Ln,E.WuTranslationContext=mr,E.WuTranslationProvider=By,E.WuTruncatedLabel=Pw,E.WuVirtualScroll=Tt,E.calculatePosition=Sb,E.useTranslation=Ly,E.useTranslationsContext=Wy,E.useWuShowToast=Dy,E.useWuSidebar=rt,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
|
|
21
21
|
//# sourceMappingURL=index.js.map
|