@npm-questionpro/wick-ui-lib 1.29.0 → 1.29.1

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.
@@ -1,7 +1,7 @@
1
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,bt,h,Uc,jc,Gc,yt,_e,Kc,Ia,Yc,xe,Lt,bs,Xc,Zc,qe,Y,Da,Jc,Qc,Rc,ed,td,nd,sd,rd,ad){"use strict";var Ly=Object.defineProperty;var Wy=(E,a,bt)=>a in E?Ly(E,a,{enumerable:!0,configurable:!0,writable:!0,value:bt}):E[a]=bt;var Ne=(E,a,bt)=>Wy(E,typeof a!="symbol"?a+"":a,bt);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 xt=fe(bt),y=fe(h),at=fe(Gc),Aa=fe(Kc),ys=fe(Yc),Wt=fe(Lt),Bt=fe(bs),ee=fe(Zc),R=fe(Da),ot=fe(Jc),qt=fe(Qc),ka=fe(Rc),Pa=fe(ed),Sn=fe(td),_a=fe(nd),it=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=at.Root,Ns=y.forwardRef(({className:e,...t},n)=>a.jsx(at.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(at.Header,{className:"wu-flex",children:a.jsxs(at.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=at.Trigger.displayName;const Cs=y.forwardRef(({className:e,children:t,...n},s)=>a.jsx(at.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=at.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(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}));Ts.displayName=xt.Root.displayName;const Es=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}));Es.displayName=xt.Image.displayName;const Ms=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}));Ms.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"},Ye=(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=Ye(e,t.time),s=Ye(e,t.userName),r=Ye(e,t.userInitials),o=Ye(e,t.userImage??""),i=Ye(e,t.tags??""),u=Ye(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=Ye(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=Ye(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 Ds={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:Ds.dropdownContainer,children:a.jsx("ul",{children:a.jsxs("li",{className:p("wu-flex wu-relative",o&&Ds.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(Ds.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})]})})})})},As=_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:[]}),vt=y.forwardRef(({className:e,variant:t,size:n,color:s,asChild:r=!1,...o},i)=>{const u=r?yt.Slot:"button";return a.jsx(u,{className:p(As({size:n,color:s,variant:t,className:e})),ref:i,...o})});vt.displayName="Button";const Nt=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})};Nt.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(vt,{...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(Nt,{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
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(Wa,{item:s,dir:t})}):a.jsx("a",{href:s.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"),v=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:C=>{if(C.key==="Enter"){C.preventDefault();const N=C.currentTarget.querySelector("a");N&&N.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(""),children:[a.jsx("div",{className:p(ne.topBorder,s==="rtl"&&ne.topBorderRtl),style:{backgroundColor:c?m:v}}),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,v)=>a.jsx(Ed,{product:b,currentProduct:t,activeProductName:n,dir:s,focusItem:r,setFocusItem:o},v));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:v=>i(v,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")})]})}),Dd=({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),[v,C]=h.useState(""),[N,S]=h.useState(!1),x=gd(768);Is([u,i],()=>{w(!1),m(null)}),Is([l,d,u],()=>{S(!1),w(!1),m(null)}),h.useEffect(()=>{const D=I=>{I.key==="Escape"&&w(!1)};return document.addEventListener("keydown",D),()=>{document.removeEventListener("keydown",D)}},[c]),h.useEffect(()=>b(n.base),[n.base]);const T=D=>{D.preventDefault(),D.stopPropagation(),w(I=>{const k=!I;return k||m(null),k})},A=(D,I)=>{bd({productCategories:e,openCategory:f,setOpenCategory:m})(D,I,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(Dd,{dir:s,isProductButtonShow:N,smallScreenToggleButtonRef:d,setDropdownOpen:w,setIsProductButtonShow:S}),a.jsx(Id,{isProductButtonShow:N,isDropdownOpen:c,activeProductColor:n,activeProductBgColor:g,activeProductName:t,handleDropdownToggle:T,smallScreenButtonRef:l,handleKeyDown:A,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:v,setFocusItem:C,handleKeyDown:A,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:T,handleKeyDown:A,isDropdownOpen:c}),a.jsx(Ba,{activeProductName:t,focusItem:v,setFocusItem:C,handleKeyDown:A,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 Ad=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(Aa.Root,{ref:n,className:p(Pd(),e),...t}));Tn.displayName=Aa.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})]})]})},je=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),v=()=>{b(N=>!N)},C=N=>{w.onChange&&w.onChange(N)};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&&C,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:v,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})]})})})});je.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(je,{...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,ut=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,As({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-text-gray-lead"),button_previous:p(r.button_previous,As({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(),[v,C]=h.useState(""),N=h.useCallback(()=>{const x=Mn(g);C(Y.format(x,e)),n&&n(g)},[g,e,n]),S=h.useCallback(()=>{d?d():(b(void 0),C(""),n&&n(void 0))},[n,d]);return h.useEffect(()=>{const x=Mn(t);b(x),C(Y.format(x,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:v,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:x=>Ka(x,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:N,disabled:s,onReset:S,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(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){r(void 0),i(!0);return}const S=Number(N)-1;r(S),i(!1),t({from:Y.sub(new Date,{days:S}),to:new Date})},[t]),v=h.useCallback((N,S)=>{if(!N||!(e!=null&&e.to)||!(e!=null&&e.from)||!new RegExp(Os).test(N))return!1;const T=new Date(S==="start"?N:e.from),A=new Date(S==="end"?N:e.to);return Y.isBefore(A,T)?(f(!0),!1):(f(!1),!(Y.isSameDay(T,e.from)&&Y.isSameDay(A,e.to)))},[e]),C=h.useCallback((N,S)=>{if((S==="start"?l:c)(N),v(N,S)){const T={from:e==null?void 0:e.from,to:e==null?void 0:e.to};S==="start"&&(T.from=new Date(N)),S==="end"&&(T.to=new Date(N)),t(T)}},[e,t,v]);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 N=Y.differenceInCalendarDays(e.to,e.from);Y.isToday(e.to)&&m.includes(N+1)?(r(N),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:N,value:S})=>a.jsx(vt,{variant:"secondary",className:"wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white",disabled:S!==1,children:N},S))}),a.jsxs("ul",{className:"wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges",children:[n.map(({label:N,value:S})=>a.jsx("li",{children:a.jsx("button",{className:p(g,s===S-1&&"wu-bg-blue-p/10"),onClick:()=>b(S),children:N})},S)),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(je,{placeholder:"Start Date",pattern:Os,value:u,onChange:N=>C(N.target.value,"start"),"aria-label":"Start Date"}),a.jsx(je,{placeholder:"End Date",pattern:Os,value:d,onChange:N=>C(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"})]})]})},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(ut,{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}],St=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,...u}){const[l,d]=h.useState(St(n==null?void 0:n.from)),[c,w]=h.useState(St(n==null?void 0:n.to)),[f,m]=h.useState(!1),[g,b]=h.useState();h.useEffect(()=>{n!=null&&n.from&&d(St(n.from)),n!=null&&n.to&&w(St(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 x=Y.differenceInCalendarDays(n.to,n.from)+1;b(x);const T=e.find(A=>A.value===x);m(!T)}},[n,e]);const v=h.useCallback(S=>{b(S);const x=Za(S),T=Hd(t);d(St(x)),w(St(T)),s&&s({to:T,from:x})},[t,s]),C=h.useCallback((S,x)=>{const T=new Date(S);if(!isNaN(T.getTime())){if(x==="start"&&c){const A=new Date(c);if(T>A)return}if(x==="end"&&l){const A=new Date(l);if(T<A)return}x==="start"&&d(S),x==="end"&&w(S),s&&s({to:x==="end"?T:new Date(c),from:x==="start"?T:new Date(l)})}},[l,c,s]),N=h.useMemo(()=>e.map(S=>{const x=Za(S.value);return{...S,displayStartDate:Y.format(x,"d MMM yy"),displayEndLabel:t?"Yesterday":"Today"}}),[e,t]);return a.jsxs("div",{className:Xa.wuDateRangeNativeSidebar,...u,children:[a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("button",{onClick:()=>m(!0),"data-selected":f,"aria-pressed":f,"aria-label":"Select custom date range",children:"Custom Range"})}),a.jsxs("li",{className:Xa.customInputs,"data-expanded":f,children:[a.jsx(je,{type:"date",value:l,onChange:S=>C(S.target.value,"start"),Label:"Start"}),a.jsx(je,{type:"date",value:c,onChange:S=>C(S.target.value,"end"),Label:"End",min:l})]}),N.map(S=>a.jsx("li",{children:a.jsxs("button",{onClick:()=>{m(!1),v(S.value)},"data-selected":!f&&g===S.value,"aria-pressed":!f&&g===S.value,"aria-label":`Select ${S.label}`,children:[S.label," ",a.jsxs("small",{children:["(",S.displayStartDate," - ",S.displayEndLabel,")"]})]})},S.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:v,...C})=>{const[N,S]=h.useState(t),[x,T]=h.useState(t),[A,D]=h.useState(""),I=h.useCallback(()=>{if(x){const P=x.from,M=x.to;S({from:P,to:M}),D(`${Y.format(P,e)} - ${Y.format(M,e)}`),n&&n({from:P,to:M})}},[x,e,n]),k=h.useCallback(()=>{T(N)},[N]),F=h.useCallback(()=>{f?f():(S(void 0),T(void 0),D(""),n&&n(void 0))},[f,n]);return h.useEffect(()=>{if(t!=null&&t.from&&(t!=null&&t.to)){const P=Mn(t.from),M=Mn(t.to);S(t),T(t),D(`${Y.format(P,e)} - ${Y.format(M,e)}`)}else S(void 0),T({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:A,dir:i,placeholder:g,CustomTrigger:b,...C}),a.jsx(Oe,{className:"wu-flex wu-p-0 wu-border wu-w-fit wu-border-blue-p",align:"start",sideOffset:-.5,dir:i,children:v?a.jsx(Ud,{current:x,onSelect:P=>{T(P)},ranges:d,onApply:I,onReset:F,showResetButton:m}):a.jsxs(a.Fragment,{children:[a.jsx(qd,{current:x,onSelect:T,presetRanges:d}),a.jsx(_s,{dir:i,numberOfMonths:2,mode:"range",captionLayout:"dropdown",selected:x,onSelect:T,disabled:P=>Ka(P,s,r,o),startMonth:r,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(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(v=>{const C=u(v);m+C+8<f?(g.push(v),m+=C+8):b.push(v)}),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 C=n;g(C==null?void 0:C.map(N=>N[o.label]));return}else g([n[o.label]])},[n]);const v=()=>{var C;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:`${(((C=b.current)==null?void 0:C.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(ut,{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:[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"})]})})},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 Dn=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}));Dn.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(je),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:v,disabled:C,labelPosition:N="top",className:S,onScroll:x,maxContentWidth:T,enableSearch:A=!0,noDataContent:D,...I})=>{const[k,F]=h.useState(""),[P,M]=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]),De=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?M(ie=>{const Ae=ie||[],be=Ae.some(ve=>ve[t.value]===J)?Ae.filter(ve=>ve[t.value]!==J):[...Ae,z];return c==null||c(be),be}):(W(!1),M(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?M(n):s!==void 0&&M(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;M(z),c==null||c(z)},[_,m,H,pe,c,b]),K=zt(N);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:C,selectAll:b,isCheckedAll:_,className:S,id:v,...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:T},children:a.jsxs(Ls,{id:v,children:[A&&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:D||"No results found."}),De.length>=o?a.jsx(Ct,{className:"wu-combobox-list",containerHeight:f,list:De,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:x,children:De.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:v,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(vt,{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,An=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 Xe=(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=()=>{},lt=()=>{};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))},lt=(e,t,n)=>{if(!e)throw new Error(Hs(t,n))});const Ge={},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 $e=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),Do=Gt(.33,1.53,.69,.99),js=Io(Do),Ao=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:Ao,backOut:Do,anticipate:ko},Sw=e=>typeof e=="string",Fo=e=>{if(Vo(e)){lt(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 lt(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((S,x)=>(S[x]=Cw(o),S),{}),{setup:u,read:l,resolveKeyframes:d,preUpdate:c,update:w,preRender:f,render:m,postRender:g}=i,b=()=>{const S=Ge.useManualTiming?r.timestamp:performance.now();n=!1,Ge.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(S-r.timestamp,Tw),1)),r.timestamp=S,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))},v=()=>{n=!0,s=!0,r.isProcessing||e(b)};return{schedule:Pn.reduce((S,x)=>{const T=i[x];return S[x]=(A,D=!1,I=!1)=>(n||v(),T.schedule(A,D,I)),S},{}),cancel:S=>{for(let x=0;x<Pn.length;x++)i[Pn[x]].cancel(S)},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||Ge.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=>Xe(0,1,e)},On={...Et,default:1},Yt=e=>Math.round(e*1e5)/1e5,Xs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Dw(e){return e==null}const Aw=/^(?:#[\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"&&Aw.test(n)&&n.startsWith(e)||t&&!Dw(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=>Xe(0,255,e),Js={...Et,transform:e=>Math.round(kw(e))},ct={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:ct.transform},Xt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ze=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=>ct.test(e)||Qs.test(e)||It.test(e),parse:e=>ct.test(e)?ct.parse(e):It.test(e)?It.parse(e):Qs.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ct.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 Je={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,ct,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),ct.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=Je.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<=$e(se.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Xe(se.minDamping,se.maxDamping,i),e=Xe(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=$e(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*Xe(.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)),v=i-o,C=Le(Math.sqrt(l/c)),N=Math.abs(v)<5;s||(s=N?se.restSpeed.granular:se.restSpeed.default),r||(r=N?se.restDelta.granular:se.restDelta.default);let S;if(b<1){const T=ar(C,b);S=A=>{const D=Math.exp(-b*C*A);return i-D*((g+b*C*v)/T*Math.sin(T*A)+v*Math.cos(T*A))}}else if(b===1)S=T=>i-Math.exp(-C*T)*(v+(g+C*v)*T);else{const T=C*Math.sqrt(b*b-1);S=A=>{const D=Math.exp(-b*C*A),I=Math.min(T*A,300);return i-D*((g+b*C*v)*Math.sinh(I)+T*v*Math.cosh(I))/T}}const x={calculatedDuration:m&&w||null,next:T=>{const A=S(T);if(m)u.done=T>=w;else{let D=T===0?g:0;b<1&&(D=T===0?$e(g):Ro(S,T,A));const I=Math.abs(D)<=s,k=Math.abs(i-A)<=r;u.done=I&&k}return u.value=u.done?i:A,u},toString:()=>{const T=Math.min(sr(x),Ln),A=Qo(D=>x.next(T*D).value,T,30);return T+"ms "+A},toTransition:()=>{}};return x}Wn.applyToOptions=e=>{const t=Jw(e,100,Wn);return e.ease=t.ease,e.duration=$e(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 v=w+b,C=i===void 0?v:i(v);C!==v&&(b=C-w);const N=I=>-b*Math.exp(-I/s),S=I=>C+N(I),x=I=>{const k=N(I),F=S(I);f.done=Math.abs(k)<=d,f.value=f.done?C:F};let T,A;const D=I=>{m(f.value)&&(T=I,A=Wn({keyframes:[f.value,g(f.value)],velocity:Ro(S,I,f.value),damping:r,stiffness:o,restDelta:d,restSpeed:c}))};return D(0),{calculatedDuration:null,next:I=>{let k=!1;return!A&&T===void 0&&(k=!0,x(I),D(I)),T!==void 0&&I>=T?A.next(I-T):(!k&&x(I),f)}}}function af(e,t,n){const s=[],r=n||Ge.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(lt(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(Xe(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 Dt({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:Dt,keyframes:Dt,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=Dt,repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=t;let{keyframes:u}=t;const l=n||Dt;process.env.NODE_ENV!=="production"&&l!==Dt&&lt(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==Dt&&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:v}=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 C=this.currentTime-d*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?C<0:C>r;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let S=this.currentTime,x=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"&&(x=i)),S=Xe(0,1,F)*u}const T=N?{done:!1,value:c[0]}:x.next(S);o&&(T.value=o(T.value));let{done:A}=T;!N&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return D&&g!==or&&(T.value=ir(c,this.options,v,this.speed)),b&&b(T.value),D&&this.finish(),T}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=$e(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 dt=e=>e*180/Math.PI,cr=e=>{const t=dt(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=>dt(Math.atan(e[1])),skewY:e=>dt(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(dt(Math.atan2(e[6],e[5]))),rotateY:e=>dr(dt(Math.atan2(-e[2],e[0]))),rotateZ:ni,rotate:ni,skewX:e=>dt(Math.atan(e[4])),skewY:e=>dt(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 At=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kt=new Set(At),ai=e=>e===Et||e===O,xf=new Set(["x","y","z"]),vf=At.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 Qe={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")};Qe.translateX=Qe.x,Qe.translateY=Qe.y;const wt=new Set;let pr=!1,hr=!1,mr=!1;function oi(){if(hr){const e=Array.from(wt).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,wt.forEach(e=>e.complete(mr)),wt.clear()}function ii(){wt.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?(wt.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),wt.delete(this)}cancel(){this.state==="scheduled"&&(wt.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 Df(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 Af({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,lt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=Af(t);this.animation=Df(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=$e(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:Ao,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=Xe(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"&&(Je.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,v;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(v=this.keyframeResolver)==null||v.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,v,C)=>this.onKeyframesResolved(b,v,f,!C),l,d,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,r){var v,C;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)||((Ge.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=(C=(v=f.motionValue)==null?void 0:v.owner)==null?void 0:C.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){lt(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-$e(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=$e(c.duration)),c.repeatDelay&&(c.repeatDelay=$e(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)),(Ge.instantAnimations||Ge.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",...At]),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&&Ge.WillChange){const s=new Ge.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)},v=m.get();if(v!==void 0&&!m.isAnimating&&!Array.isArray(g)&&g===v&&!b.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const x=op(e);if(x){const T=window.MotionHandoffAnimation(x,f,We);T!==null&&(b.startTime=T,C=!0)}}ap(e,f);const N=d??e.shouldReduceMotion;m.start(Qf(f,m,g,N&&xi.has(f)?{type:!1}:b,e,C));const S=m.animation;S&&c.push(S)}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,Ze,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={...Je,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:Ze,rotateX:Ze,rotateY:Ze,rotateZ:Ze,scale:On,scaleX:On,scaleY:On,scaleZ:On,skew:Ze,skewX:Ze,skewY:Ze,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 Di(e,t){let n=Ii(e);return n!==Cr&&(n=Je),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]=Di(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&&Qe[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 Qe[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=Qe[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]=Qe[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 Ai=(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=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,r),window.addEventListener("pointercancel",f,r)},g=v=>{if(v.pointerType!=="touch"){if(u){l=!0;return}w(v)}},b=v=>{if(!Cp(v))return;l=!1;const C=t(i,v);typeof C=="function"&&(d=C,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 Dp=(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 Ap(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=>Dp(d,r)),!Ip(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}const kp=[...Ti,le,Je],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"],Dr=["initial",...Ir];function $n(e){return zn(e.animate)||Dr.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 Ar={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=()=>Ar.current=e.matches;e.addEventListener("change",t),t()}else Ar.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=Ar.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:$e(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)&&Je.test(n)&&(s=Di(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=At.length;function Up(e,t,n){let s="",r=!0;for(let o=0;o<Hp;o++){const i=At[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=Ai(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=Ai(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=Je.parse(e);if(r.length>5)return s;const o=Je.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=At.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=Dr.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=Dr[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 v=0;v<sh;v++){const C=nh[v],N=n[C],S=d[C]!==void 0?d[C]:c[C],x=Rt(S),T=C===l?N.isActive:null;T===!1&&(g=v);let A=S===c[C]&&S!==d[C]&&x;if(A&&s&&e.manuallyAnimateOnMount&&(A=!1),N.protectedKeys={...m},!N.isActive&&T===null||!S&&!N.prevProp||zn(S)||typeof S=="boolean")continue;if(C==="exit"&&N.isActive&&T!==!0){N.prevResolvedValues&&(m={...m,...N.prevResolvedValues});continue}const D=oh(N.prevProp,S);let I=D||C===l&&N.isActive&&!A&&x||v>g&&x,k=!1;const F=Array.isArray(S)?S:[S];let P=F.reduce(r(C),{});T===!1&&(P={});const{prevResolvedValues:M={}}=N,V={...M,...P},W=B=>{I=!0,f.has(B)&&(k=!0,f.delete(B)),N.needsAnimating[B]=!0;const U=e.getValue(B);U&&(U.liveStyle=!1)};for(const B in V){const U=P[B],$=M[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):N.protectedKeys[B]=!0}N.prevProp=S,N.prevResolvedValues=P,N.isActive&&(m={...m,...P}),s&&e.blockInitialAnimation&&(I=!1);const _=A&&D;I&&(!_||k)&&w.push(...F.map(B=>{const U={type:C};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 v={};if(typeof d.initial!="boolean"){const C=Pt(e,Array.isArray(d.initial)?d.initial[0]:d.initial);C&&C.transition&&(v.transition=C.transition)}f.forEach(C=>{const N=e.getBaseTarget(C),S=e.getValue(C);S&&(S.liveStyle=!0),v[C]=N??null}),w.push({animation:v})}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 ft(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qi(){return{animate:ft(!0),whileInView:ft(),whileHover:ft(),whileTap:ft(),whileDrag:ft(),whileFocus:ft(),exit:ft()}}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:v,right:C,bottom:N}=l.current;if(t||o===!1||!u.current||!m||!g)return;const S=n==="left"?`left: ${v}`:`right: ${C}`,x=s==="bottom"?`bottom: ${N}`:`top: ${b}`;u.current.dataset.motionPopId=i;const T=document.createElement("style");d&&(T.nonce=d);const A=r??document.head;return A.appendChild(T),T.sheet&&T.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(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"),v=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:C=>{if(C.key==="Enter"){C.preventDefault();const N=C.currentTarget.querySelector("a");N&&N.click()}},onFocus:()=>{o(e.name)},onBlur:()=>o(""),children:[a.jsx("div",{className:p(ne.topBorder,s==="rtl"&&ne.topBorderRtl),style:{backgroundColor:c?m:v}}),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,v)=>a.jsx(Ed,{product:b,currentProduct:t,activeProductName:n,dir:s,focusItem:r,setFocusItem:o},v));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:v=>i(v,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")})]})}),Dd=({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),[v,C]=h.useState(""),[N,S]=h.useState(!1),x=gd(768);Is([u,i],()=>{w(!1),m(null)}),Is([l,d,u],()=>{S(!1),w(!1),m(null)}),h.useEffect(()=>{const D=I=>{I.key==="Escape"&&w(!1)};return document.addEventListener("keydown",D),()=>{document.removeEventListener("keydown",D)}},[c]),h.useEffect(()=>b(n.base),[n.base]);const T=D=>{D.preventDefault(),D.stopPropagation(),w(I=>{const k=!I;return k||m(null),k})},A=(D,I)=>{bd({productCategories:e,openCategory:f,setOpenCategory:m})(D,I,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(Dd,{dir:s,isProductButtonShow:N,smallScreenToggleButtonRef:d,setDropdownOpen:w,setIsProductButtonShow:S}),a.jsx(Id,{isProductButtonShow:N,isDropdownOpen:c,activeProductColor:n,activeProductBgColor:g,activeProductName:t,handleDropdownToggle:T,smallScreenButtonRef:l,handleKeyDown:A,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:v,setFocusItem:C,handleKeyDown:A,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:T,handleKeyDown:A,isDropdownOpen:c}),a.jsx(Ba,{activeProductName:t,focusItem:v,setFocusItem:C,handleKeyDown:A,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 Ad=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(Aa.Root,{ref:n,className:p(Pd(),e),...t}));Tn.displayName=Aa.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})]})]})},je=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),v=()=>{b(N=>!N)},C=N=>{w.onChange&&w.onChange(N)};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&&C,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:v,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})]})})})});je.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(je,{...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,ut=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,As({variant:"iconOnly"}),"wu-h-6 wu-w-6 wu-text-gray-lead"),button_previous:p(r.button_previous,As({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(),[v,C]=h.useState(""),N=h.useCallback(()=>{const x=Mn(g);C(Y.format(x,e)),n&&n(g)},[g,e,n]),S=h.useCallback(()=>{d?d():(b(void 0),C(""),n&&n(void 0))},[n,d]);return h.useEffect(()=>{const x=Mn(t);b(x),C(Y.format(x,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:v,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:x=>Ka(x,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:N,disabled:s,onReset:S,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(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){r(void 0),i(!0);return}const S=Number(N)-1;r(S),i(!1),t({from:Y.sub(new Date,{days:S}),to:new Date})},[t]),v=h.useCallback((N,S)=>{if(!N||!(e!=null&&e.to)||!(e!=null&&e.from)||!new RegExp(Os).test(N))return!1;const T=new Date(S==="start"?N:e.from),A=new Date(S==="end"?N:e.to);return Y.isBefore(A,T)?(f(!0),!1):(f(!1),!(Y.isSameDay(T,e.from)&&Y.isSameDay(A,e.to)))},[e]),C=h.useCallback((N,S)=>{if((S==="start"?l:c)(N),v(N,S)){const T={from:e==null?void 0:e.from,to:e==null?void 0:e.to};S==="start"&&(T.from=new Date(N)),S==="end"&&(T.to=new Date(N)),t(T)}},[e,t,v]);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 N=Y.differenceInCalendarDays(e.to,e.from);Y.isToday(e.to)&&m.includes(N+1)?(r(N),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:N,value:S})=>a.jsx(vt,{variant:"secondary",className:"wu-px-1 wu-py-1 wu-text-xs wu-h-fit wu-min-w-fit disabled:wu-bg-white",disabled:S!==1,children:N},S))}),a.jsxs("ul",{className:"wu-flex wu-flex-col wu-gap-1 wu-date-picker-ranges",children:[n.map(({label:N,value:S})=>a.jsx("li",{children:a.jsx("button",{className:p(g,s===S-1&&"wu-bg-blue-p/10"),onClick:()=>b(S),children:N})},S)),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(je,{placeholder:"Start Date",pattern:Os,value:u,onChange:N=>C(N.target.value,"start"),"aria-label":"Start Date"}),a.jsx(je,{placeholder:"End Date",pattern:Os,value:d,onChange:N=>C(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"})]})]})},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(ut,{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}],St=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,...u}){const[l,d]=h.useState(St(n==null?void 0:n.from)),[c,w]=h.useState(St(n==null?void 0:n.to)),[f,m]=h.useState(!1),[g,b]=h.useState();h.useEffect(()=>{n!=null&&n.from&&d(St(n.from)),n!=null&&n.to&&w(St(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 x=Y.differenceInCalendarDays(n.to,n.from)+1;b(x);const T=e.find(A=>A.value===x);m(!T)}},[n,e]);const v=h.useCallback(S=>{b(S);const x=Za(S),T=Hd(t);d(St(x)),w(St(T)),s&&s({to:T,from:x})},[t,s]),C=h.useCallback((S,x)=>{const T=new Date(S);if(!isNaN(T.getTime())){if(x==="start"&&c){const A=new Date(c);if(T>A)return}if(x==="end"&&l){const A=new Date(l);if(T<A)return}x==="start"&&d(S),x==="end"&&w(S),s&&s({to:x==="end"?T:new Date(c),from:x==="start"?T:new Date(l)})}},[l,c,s]),N=h.useMemo(()=>e.map(S=>{const x=Za(S.value);return{...S,displayStartDate:Y.format(x,"d MMM yy"),displayEndLabel:t?"Yesterday":"Today"}}),[e,t]);return a.jsxs("div",{className:Xa.wuDateRangeNativeSidebar,...u,children:[a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx("button",{onClick:()=>m(!0),"data-selected":f,"aria-pressed":f,"aria-label":"Select custom date range",children:"Custom Range"})}),a.jsxs("li",{className:Xa.customInputs,"data-expanded":f,children:[a.jsx(je,{type:"date",value:l,onChange:S=>C(S.target.value,"start"),Label:"Start"}),a.jsx(je,{type:"date",value:c,onChange:S=>C(S.target.value,"end"),Label:"End",min:l})]}),N.map(S=>a.jsx("li",{children:a.jsxs("button",{onClick:()=>{m(!1),v(S.value)},"data-selected":!f&&g===S.value,"aria-pressed":!f&&g===S.value,"aria-label":`Select ${S.label}`,children:[S.label," ",a.jsxs("small",{children:["(",S.displayStartDate," - ",S.displayEndLabel,")"]})]})},S.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:v,...C})=>{const[N,S]=h.useState(t),[x,T]=h.useState(t),[A,D]=h.useState(""),I=h.useCallback(()=>{if(x){const P=x.from,M=x.to;S({from:P,to:M}),D(`${Y.format(P,e)} - ${Y.format(M,e)}`),n&&n({from:P,to:M})}},[x,e,n]),k=h.useCallback(()=>{T(N)},[N]),F=h.useCallback(()=>{f?f():(S(void 0),T(void 0),D(""),n&&n(void 0))},[f,n]);return h.useEffect(()=>{if(t!=null&&t.from&&(t!=null&&t.to)){const P=Mn(t.from),M=Mn(t.to);S(t),T(t),D(`${Y.format(P,e)} - ${Y.format(M,e)}`)}else S(void 0),T({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:A,dir:i,placeholder:g,CustomTrigger:b,...C}),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:v?a.jsx(Ud,{current:x,onSelect:P=>{T(P)},ranges:d,onApply:I,onReset:F,showResetButton:m}):a.jsxs(a.Fragment,{children:[a.jsx(qd,{current:x,onSelect:T,presetRanges:d}),a.jsx(_s,{dir:i,numberOfMonths:2,mode:"range",captionLayout:"dropdown",selected:x,onSelect:T,disabled:P=>Ka(P,s,r,o),startMonth:r,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(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(v=>{const C=u(v);m+C+8<f?(g.push(v),m+=C+8):b.push(v)}),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 C=n;g(C==null?void 0:C.map(N=>N[o.label]));return}else g([n[o.label]])},[n]);const v=()=>{var C;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:`${(((C=b.current)==null?void 0:C.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(ut,{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:[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"})]})})},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 Dn=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}));Dn.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(je),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:v,disabled:C,labelPosition:N="top",className:S,onScroll:x,maxContentWidth:T,enableSearch:A=!0,noDataContent:D,...I})=>{const[k,F]=h.useState(""),[P,M]=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]),De=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?M(ie=>{const Ae=ie||[],be=Ae.some(ve=>ve[t.value]===J)?Ae.filter(ve=>ve[t.value]!==J):[...Ae,z];return c==null||c(be),be}):(W(!1),M(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?M(n):s!==void 0&&M(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;M(z),c==null||c(z)},[_,m,H,pe,c,b]),K=zt(N);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:C,selectAll:b,isCheckedAll:_,className:S,id:v,...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:T},children:a.jsxs(Ls,{id:v,children:[A&&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:D||"No results found."}),De.length>=o?a.jsx(Ct,{className:"wu-combobox-list",containerHeight:f,list:De,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:x,children:De.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:v,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(vt,{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,An=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 Xe=(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=()=>{},lt=()=>{};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))},lt=(e,t,n)=>{if(!e)throw new Error(Hs(t,n))});const Ge={},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 $e=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),Do=Gt(.33,1.53,.69,.99),js=Io(Do),Ao=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:Ao,backOut:Do,anticipate:ko},Sw=e=>typeof e=="string",Fo=e=>{if(Vo(e)){lt(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 lt(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((S,x)=>(S[x]=Cw(o),S),{}),{setup:u,read:l,resolveKeyframes:d,preUpdate:c,update:w,preRender:f,render:m,postRender:g}=i,b=()=>{const S=Ge.useManualTiming?r.timestamp:performance.now();n=!1,Ge.useManualTiming||(r.delta=s?1e3/60:Math.max(Math.min(S-r.timestamp,Tw),1)),r.timestamp=S,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))},v=()=>{n=!0,s=!0,r.isProcessing||e(b)};return{schedule:Pn.reduce((S,x)=>{const T=i[x];return S[x]=(A,D=!1,I=!1)=>(n||v(),T.schedule(A,D,I)),S},{}),cancel:S=>{for(let x=0;x<Pn.length;x++)i[Pn[x]].cancel(S)},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||Ge.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=>Xe(0,1,e)},On={...Et,default:1},Yt=e=>Math.round(e*1e5)/1e5,Xs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Dw(e){return e==null}const Aw=/^(?:#[\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"&&Aw.test(n)&&n.startsWith(e)||t&&!Dw(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=>Xe(0,255,e),Js={...Et,transform:e=>Math.round(kw(e))},ct={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:ct.transform},Xt=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ze=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=>ct.test(e)||Qs.test(e)||It.test(e),parse:e=>ct.test(e)?ct.parse(e):It.test(e)?It.parse(e):Qs.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ct.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 Je={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,ct,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),ct.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=Je.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<=$e(se.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Xe(se.minDamping,se.maxDamping,i),e=Xe(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=$e(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*Xe(.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)),v=i-o,C=Le(Math.sqrt(l/c)),N=Math.abs(v)<5;s||(s=N?se.restSpeed.granular:se.restSpeed.default),r||(r=N?se.restDelta.granular:se.restDelta.default);let S;if(b<1){const T=ar(C,b);S=A=>{const D=Math.exp(-b*C*A);return i-D*((g+b*C*v)/T*Math.sin(T*A)+v*Math.cos(T*A))}}else if(b===1)S=T=>i-Math.exp(-C*T)*(v+(g+C*v)*T);else{const T=C*Math.sqrt(b*b-1);S=A=>{const D=Math.exp(-b*C*A),I=Math.min(T*A,300);return i-D*((g+b*C*v)*Math.sinh(I)+T*v*Math.cosh(I))/T}}const x={calculatedDuration:m&&w||null,next:T=>{const A=S(T);if(m)u.done=T>=w;else{let D=T===0?g:0;b<1&&(D=T===0?$e(g):Ro(S,T,A));const I=Math.abs(D)<=s,k=Math.abs(i-A)<=r;u.done=I&&k}return u.value=u.done?i:A,u},toString:()=>{const T=Math.min(sr(x),Ln),A=Qo(D=>x.next(T*D).value,T,30);return T+"ms "+A},toTransition:()=>{}};return x}Wn.applyToOptions=e=>{const t=Jw(e,100,Wn);return e.ease=t.ease,e.duration=$e(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 v=w+b,C=i===void 0?v:i(v);C!==v&&(b=C-w);const N=I=>-b*Math.exp(-I/s),S=I=>C+N(I),x=I=>{const k=N(I),F=S(I);f.done=Math.abs(k)<=d,f.value=f.done?C:F};let T,A;const D=I=>{m(f.value)&&(T=I,A=Wn({keyframes:[f.value,g(f.value)],velocity:Ro(S,I,f.value),damping:r,stiffness:o,restDelta:d,restSpeed:c}))};return D(0),{calculatedDuration:null,next:I=>{let k=!1;return!A&&T===void 0&&(k=!0,x(I),D(I)),T!==void 0&&I>=T?A.next(I-T):(!k&&x(I),f)}}}function af(e,t,n){const s=[],r=n||Ge.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(lt(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(Xe(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 Dt({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:Dt,keyframes:Dt,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=Dt,repeat:s=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=t;let{keyframes:u}=t;const l=n||Dt;process.env.NODE_ENV!=="production"&&l!==Dt&&lt(u.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${u}`,"spring-two-frames"),l!==Dt&&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:v}=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 C=this.currentTime-d*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?C<0:C>r;this.currentTime=Math.max(C,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let S=this.currentTime,x=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"&&(x=i)),S=Xe(0,1,F)*u}const T=N?{done:!1,value:c[0]}:x.next(S);o&&(T.value=o(T.value));let{done:A}=T;!N&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return D&&g!==or&&(T.value=ir(c,this.options,v,this.speed)),b&&b(T.value),D&&this.finish(),T}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=$e(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 dt=e=>e*180/Math.PI,cr=e=>{const t=dt(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=>dt(Math.atan(e[1])),skewY:e=>dt(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(dt(Math.atan2(e[6],e[5]))),rotateY:e=>dr(dt(Math.atan2(-e[2],e[0]))),rotateZ:ni,rotate:ni,skewX:e=>dt(Math.atan(e[4])),skewY:e=>dt(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 At=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],kt=new Set(At),ai=e=>e===Et||e===O,xf=new Set(["x","y","z"]),vf=At.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 Qe={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")};Qe.translateX=Qe.x,Qe.translateY=Qe.y;const wt=new Set;let pr=!1,hr=!1,mr=!1;function oi(){if(hr){const e=Array.from(wt).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,wt.forEach(e=>e.complete(mr)),wt.clear()}function ii(){wt.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?(wt.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),wt.delete(this)}cancel(){this.state==="scheduled"&&(wt.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 Df(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 Af({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,lt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const d=Af(t);this.animation=Df(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=$e(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:Ao,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=Xe(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"&&(Je.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,v;this._animation&&(this._animation.stop(),(b=this.stopTimeline)==null||b.call(this)),(v=this.keyframeResolver)==null||v.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,v,C)=>this.onKeyframesResolved(b,v,f,!C),l,d,c),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,s,r){var v,C;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)||((Ge.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=(C=(v=f.motionValue)==null?void 0:v.owner)==null?void 0:C.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){lt(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-$e(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=$e(c.duration)),c.repeatDelay&&(c.repeatDelay=$e(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)),(Ge.instantAnimations||Ge.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",...At]),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&&Ge.WillChange){const s=new Ge.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)},v=m.get();if(v!==void 0&&!m.isAnimating&&!Array.isArray(g)&&g===v&&!b.velocity)continue;let C=!1;if(window.MotionHandoffAnimation){const x=op(e);if(x){const T=window.MotionHandoffAnimation(x,f,We);T!==null&&(b.startTime=T,C=!0)}}ap(e,f);const N=d??e.shouldReduceMotion;m.start(Qf(f,m,g,N&&xi.has(f)?{type:!1}:b,e,C));const S=m.animation;S&&c.push(S)}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,Ze,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={...Je,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:Ze,rotateX:Ze,rotateY:Ze,rotateZ:Ze,scale:On,scaleX:On,scaleY:On,scaleZ:On,skew:Ze,skewX:Ze,skewY:Ze,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 Di(e,t){let n=Ii(e);return n!==Cr&&(n=Je),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]=Di(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&&Qe[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 Qe[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=Qe[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]=Qe[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 Ai=(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=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,r),window.addEventListener("pointercancel",f,r)},g=v=>{if(v.pointerType!=="touch"){if(u){l=!0;return}w(v)}},b=v=>{if(!Cp(v))return;l=!1;const C=t(i,v);typeof C=="function"&&(d=C,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 Dp=(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 Ap(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=>Dp(d,r)),!Ip(u)&&!u.hasAttribute("tabindex")&&(u.tabIndex=0))}),o}const kp=[...Ti,le,Je],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"],Dr=["initial",...Ir];function $n(e){return zn(e.animate)||Dr.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 Ar={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=()=>Ar.current=e.matches;e.addEventListener("change",t),t()}else Ar.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=Ar.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:$e(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)&&Je.test(n)&&(s=Di(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=At.length;function Up(e,t,n){let s="",r=!0;for(let o=0;o<Hp;o++){const i=At[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=Ai(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=Ai(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=Je.parse(e);if(r.length>5)return s;const o=Je.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=At.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=Dr.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=Dr[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 v=0;v<sh;v++){const C=nh[v],N=n[C],S=d[C]!==void 0?d[C]:c[C],x=Rt(S),T=C===l?N.isActive:null;T===!1&&(g=v);let A=S===c[C]&&S!==d[C]&&x;if(A&&s&&e.manuallyAnimateOnMount&&(A=!1),N.protectedKeys={...m},!N.isActive&&T===null||!S&&!N.prevProp||zn(S)||typeof S=="boolean")continue;if(C==="exit"&&N.isActive&&T!==!0){N.prevResolvedValues&&(m={...m,...N.prevResolvedValues});continue}const D=oh(N.prevProp,S);let I=D||C===l&&N.isActive&&!A&&x||v>g&&x,k=!1;const F=Array.isArray(S)?S:[S];let P=F.reduce(r(C),{});T===!1&&(P={});const{prevResolvedValues:M={}}=N,V={...M,...P},W=B=>{I=!0,f.has(B)&&(k=!0,f.delete(B)),N.needsAnimating[B]=!0;const U=e.getValue(B);U&&(U.liveStyle=!1)};for(const B in V){const U=P[B],$=M[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):N.protectedKeys[B]=!0}N.prevProp=S,N.prevResolvedValues=P,N.isActive&&(m={...m,...P}),s&&e.blockInitialAnimation&&(I=!1);const _=A&&D;I&&(!_||k)&&w.push(...F.map(B=>{const U={type:C};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 v={};if(typeof d.initial!="boolean"){const C=Pt(e,Array.isArray(d.initial)?d.initial[0]:d.initial);C&&C.transition&&(v.transition=C.transition)}f.forEach(C=>{const N=e.getBaseTarget(C),S=e.getValue(C);S&&(S.liveStyle=!0),v[C]=N??null}),w.push({animation:v})}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 ft(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qi(){return{animate:ft(!0),whileInView:ft(),whileHover:ft(),whileTap:ft(),whileDrag:ft(),whileFocus:ft(),exit:ft()}}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:v,right:C,bottom:N}=l.current;if(t||o===!1||!u.current||!m||!g)return;const S=n==="left"?`left: ${v}`:`right: ${C}`,x=s==="bottom"?`bottom: ${N}`:`top: ${b}`;u.current.dataset.motionPopId=i;const T=document.createElement("style");d&&(T.nonce=d);const A=r??document.head;return A.appendChild(T),T.sheet&&T.sheet.insertRule(`
5
5
  [data-motion-pop-id="${i}"] {
6
6
  position: absolute !important;
7
7
  width: ${m}px !important;
@@ -17,5 +17,5 @@
17
17
  `))},[s,n,e]);const{current:d}=y.useRef(t);y.useEffect(()=>{!r&&JSON.stringify(d)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${s} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
18
18
  `))},[JSON.stringify(t)])}const l=y.useCallback(d=>{r||i(d)},[]);return[u,l]}const re=typeof document<"u"?y.useLayoutEffect:()=>{},pt={...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=pt.useId;function Dg(e,t){if(cl!==void 0){const n=cl();return e??(t?`${t}-${n}`:n)}return Ig(e,t)}function dl(e){return Dg(e,"base-ui")}const Qn="none",Ag="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??He;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=He;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=tt(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}),v=dl(),[C,N]=y.useState(),S=C??v,[x,T]=y.useState(!1),[A,D]=y.useState(!1),I=y.useRef(null),k=y.useRef(null),F=y.useRef(null),P=y.useRef(null),M=hl(P,!1),V=he(W=>{const _=!i,q=Ie(Ag,W.nativeEvent);if(s(_,q),q.isCanceled)return;const B=P.current;k.current==="css-animation"&&B!=null&&B.style.removeProperty("animation-name"),!x&&!A&&(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"&&!A&&!i&&d(!1)},[o,A,i,t,d]),y.useMemo(()=>({abortControllerRef:I,animationTypeRef:k,disabled:r,handleTrigger:V,height:m,mounted:l,open:i,panelId:S,panelRef:P,runOnceAnimationsFinish:M,setDimensions:b,setHiddenUntilFound:T,setKeepMounted:D,setMounted:d,setOpen:u,setPanelIdState:N,setVisible:f,transitionDimensionRef:F,transitionStatus:c,visible:w,width:g}),[I,k,r,V,m,l,i,S,P,M,b,T,D,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=nt("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=pt.captureOwnerStack)==null?void 0:m.call(pt))||"";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=pt.captureOwnerStack)==null?void 0:g.call(pt))||"";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:v,onPointerDown:C,...N}=f;return al({type:r?"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||(Rr(x),v==null||v(x)),x.baseUIHandlerPrevented)return;const T=x.target===x.currentTarget&&!r&&!u()&&!t,A=x.key==="Enter",D=x.key===" ";T&&((D||A)&&x.preventDefault(),A&&(m==null||m(x)))},onKeyUp(x){t||(Rr(x),b==null||b(x)),!x.baseUIHandlerPrevented&&x.target===x.currentTarget&&!r&&!t&&x.key===" "&&(m==null||m(x))},onPointerDown(x){if(t){x.preventDefault();return}C==null||C(x)}},r?void 0:{role:"button"},l,N)},[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}),v=y.useMemo(()=>({"aria-controls":r?s:void 0,"aria-expanded":r,onClick:o}),[s,r,o]);return nt("button",t,{state:i,ref:[n,b],props:[v,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:v,transitionDimensionRef:C,visible:N,width:S}=e,x=y.useRef(!1),T=y.useRef(null),A=y.useRef(c),D=y.useRef(c),I=fl(),k=y.useMemo(()=>n.current==="css-animation"?!N:!c&&!l,[c,l,N,n]),F=he(M=>{if(!M)return;if(n.current==null||C.current==null){const _=getComputedStyle(M),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",M.getAttribute(Yg.orientation)==="horizontal"||_.transitionProperty.indexOf("width")>-1?C.current="width":C.current="height"}if(n.current!=="css-transition")return;(r===void 0||S===void 0)&&(m({height:M.scrollHeight,width:M.scrollWidth}),D.current&&M.style.setProperty("transition-duration","0s"));let V=-1,W=-1;return V=oe.request(()=>{D.current=!1,W=oe.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})}),()=>{oe.cancel(V),oe.cancel(W)}}),P=Zn(s,w,F);return re(()=>{if(n.current!=="css-transition")return;const M=w.current;if(!M)return;let V=-1;if(t.current!=null&&(t.current.abort(),t.current=null),c){const W={"justify-content":M.style.justifyContent,"align-items":M.style.alignItems,"align-content":M.style.alignContent,"justify-items":M.style.justifyItems};Object.keys(W).forEach(_=>{M.style.setProperty(_,"initial","important")}),!D.current&&!i&&M.setAttribute(un.startingStyle,""),m({height:M.scrollHeight,width:M.scrollWidth}),V=oe.request(()=>{Object.entries(W).forEach(([_,q])=>{q===""?M.style.removeProperty(_):M.style.setProperty(_,q)})})}else{if(M.scrollHeight===0&&M.scrollWidth===0)return;m({height:M.scrollHeight,width:M.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}),M.style.removeProperty("content-visibility"),g(!1),t.current===W&&(t.current=null)},_))}),q.observe(M,{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 M=w.current;M&&(T.current=M.style.animationName||T.current,M.style.setProperty("animation-name","none"),m({height:M.scrollHeight,width:M.scrollWidth}),!A.current&&!x.current&&M.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]),es(()=>{const M=oe.request(()=>{A.current=!1});return()=>oe.cancel(M)}),re(()=>{if(!o)return;const M=w.current;if(!M)return;let V=-1,W=-1;return c&&x.current&&(M.style.transitionDuration="0s",m({height:M.scrollHeight,width:M.scrollWidth}),V=oe.request(()=>{x.current=!1,W=oe.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})})),()=>{oe.cancel(V),oe.cancel(W)}},[o,c,w,m]),re(()=>{const M=w.current;M&&o&&k&&(M.setAttribute("hidden","until-found"),n.current==="css-transition"&&M.setAttribute(un.startingStyle,""))},[o,k,n,w]),y.useEffect(function(){const V=w.current;if(!V)return;function W(_){x.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:v,runOnceAnimationsFinish:C,setDimensions:N,setHiddenUntilFound:S,setKeepMounted:x,setMounted:T,setPanelIdState:A,setOpen:D,setVisible:I,state:k,transitionDimensionRef:F,visible:P,width:M,transitionStatus:V}=ml(),W=r??!1,_=o??!1;re(()=>{if(u)return A(u),()=>{A(void 0)}},[u,A]),re(()=>{S(W)},[S,W]),re(()=>{x(_)},[x,_]);const{props:q}=Xg({abortControllerRef:d,animationTypeRef:c,externalRef:n,height:w,hiddenUntilFound:W,id:b,keepMounted:_,mounted:f,onOpenChange:m,open:g,panelRef:v,runOnceAnimationsFinish:C,setDimensions:N,setMounted:T,setOpen:D,setVisible:I,transitionDimensionRef:F,visible:P,width:M});Zg({open:g&&V==="idle",ref:v,onComplete(){g&&N({height:void 0,width:void 0})}});const B=y.useMemo(()=>({...k,transitionStatus:V}),[k,V]),U=nt("div",t,{state:B,ref:[n,v],props:[q,{style:{[Cl.collapsiblePanelHeight]:w===void 0?"auto":`${w}px`,[Cl.collapsiblePanelWidth]:M===void 0?"auto":`${M}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}=et();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}=et(),[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}=et(),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(Da.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=tt(ss.create).current;return es(e.disposeEffect),e}const Dl=0;class ua extends ss{constructor(){super(...arguments);Ne(this,"clear",()=>{this.currentId!==Dl&&(clearInterval(this.currentId),this.currentId=Dl)})}static create(){return new ua}start(n,s){this.clear(),this.currentId=setInterval(()=>{s()},n)}}function ib(){const e=tt(ua.create).current;return es(e.disposeEffect),e}function Al(e){const t=tt(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=He)=>e,getInputValidationProps:(e=He)=>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=tt(()=>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"),Db=new RegExp(`[${zl.join("")}]`),Ab=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(D=>D.type==="unit").map(D=>os(D.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:D=>String(Bl.indexOf(D))},{regex:Eb,replacement:D=>String(ql.indexOf(D))},{regex:Mb,replacement:D=>String(wa.indexOf(D))},{regex:Ib,replacement:D=>Nb[D]}].reduce((D,{regex:I,replacement:k})=>I?D.replace(I,k):D,s);const v=b.lastIndexOf(".");if(v!==-1&&(b=`${b.slice(0,v).replace(/\./g,"")}.${b.slice(v+1).replace(/\./g,"")}`),/^[-+]?Infinity$/i.test(s)||/[∞]/.test(s))return null;const C=(r?"-":"")+b;let N=parseFloat(C);const S=n==null?void 0:n.style,x=S==="unit"&&(n==null?void 0:n.unit)==="percent",T=Db.test(e)||S==="percent";return Ab.test(e)?N/=1e3:!x&&T&&(N/=100),Number.isNaN(N)?null:N}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:v,allowWheelScrub:C=!1,snapOnStep:N=!1,allowOutOfRange:S=!1,format:x,locale:T,render:A,className:D,inputRef:I,...k}=t,{setDirty:F,validityData:P,disabled:M,setFilled:V,invalid:W,name:_,state:q,validation:B,shouldValidateOnChange:U}=da(),$=M||c,H=_??f,pe=u==="any"?1:u,[de,De]=y.useState(!1),ge=r??Number.MIN_SAFE_INTEGER,X=o??Number.MAX_SAFE_INTEGER,L=r??0,j=x==null?void 0:x.style,K=y.useRef(null),z=Zn(I,B.inputRef),J=xb({id:s}),[ie,Ae]=ul({controlled:g,default:m,name:"NumberField",state:"value"}),Q=ie??null,be=Al(Q);re(()=>{V(Q!==null)},[V,Q]);const ve=lb(),Be=Al(x),Ue=y.useRef(!1),mt=he((Z,G)=>{Ue.current=!1,v==null||v(Z,G)}),bn=Il(),hs=ib(),yn=Il(),xn=y.useRef(!1),vn=y.useRef(0),Ke=y.useRef(!0),ae=y.useRef(null),st=y.useRef(()=>{}),[gt,ms]=y.useState(()=>g!==void 0?ec(Q,T,x):Ot(Q,T,x)),[zc,Vy]=y.useState("numeric"),$c=he(()=>{const{decimal:Z,group:G,currency:ue,literal:we}=ha(T,x),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"&&(x==null?void 0:x.unit)==="percent",Pe=j==="percent"||j==="unit"&&(x==null?void 0:x.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=!S||!(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:N,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||Ke.current===!1);if(Ma){if(ae.current=Pe,b==null||b(Pe,G),G.isCanceled)return Ma;Ae(Pe),F(Pe!==P.initialValue),Ue.current=!0}return Ke.current&&ms(Ot(Pe,T,x)),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}))}),rt=he(()=>{yn.clear(),bn.clear(),hs.clear(),st.current(),vn.current=0}),Hc=he((Z,G)=>{if(rt(),!K.current)return;const ue=sa(K.current);function we(ke){ke.preventDefault()}ue.addEventListener("contextmenu",we),st.current=()=>{ue.removeEventListener("contextmenu",we)},ue.addEventListener("pointerup",ke=>{xn.current=!1,rt();const Pe=ae.current??be.current;mt(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()){rt();return}bn.start(Fb,()=>{hs.start(Ob,()=>{te()||rt()})})});re(function(){if(!Ke.current)return;const G=g!==void 0?ec(Q,T,x):Ot(Q,T,x);G!==gt&&ms(G)}),re(function(){if(!hb)return;let G="text";ge>=0&&(G="decimal"),Vy(G)},[ge,j]),y.useEffect(()=>()=>rt(),[rt]),y.useEffect(function(){const G=K.current;if($||w||!C||!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)}},[C,Nn,$,w,l,pe,Ft]);const Ea=y.useMemo(()=>({...q,disabled:$,readOnly:w,required:d,value:Q,inputValue:gt,scrubbing:de}),[q,$,w,d,Q,gt,de]),Oy=y.useMemo(()=>({inputRef:K,inputValue:gt,value:Q,startAutoChange:Hc,stopAutoChange:rt,minWithDefault:ge,maxWithDefault:X,disabled:$,readOnly:w,id:J,setValue:gs,incrementValue:Nn,getStepAmount:Ft,allowInputSyncRef:Ke,formatOptionsRef:Be,valueRef:be,lastChangedValueRef:ae,hasPendingCommitRef:Ue,isPressedRef:xn,intentionalTouchCheckTimeout:yn,movesAfterTouchRef:vn,name:H,required:d,invalid:W,inputMode:zc,getAllowedNonNumericKeys:$c,min:r,max:o,setInputValue:ms,locale:T,isScrubbing:de,setIsScrubbing:De,state:Ea,onValueCommitted:mt}),[K,gt,Q,Hc,rt,ge,X,$,w,J,gs,Nn,Ft,Be,be,yn,H,d,W,zc,$c,r,o,ms,T,de,Ea,mt]),Fy=nt("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 nt("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:v,stopAutoChange:C,valueRef:N,lastChangedValueRef:S,onValueCommitted:x}=e,T=y.useRef({x:0,y:0}),A=y.useRef(!1),D=y.useRef(!1),I=y.useRef(""),k=c?"increment-press":"decrement-press";function F(M){t.current=!0;const V=pn(l,f,s.current);V!==null&&(N.current=V,b(V,Ie(k,M,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(){A.current=!0},onTouchEnd(){A.current=!1},onClick(M){const V=n||g;if(M.defaultPrevented||V||(hn(I.current)?D.current:M.detail!==0))return;F(M.nativeEvent);const W=r(M)??us,_=N.current;i(W,{direction:c?1:-1,event:M.nativeEvent,reason:k});const q=S.current??N.current;q!==_&&x(q,an(k,M.nativeEvent))},onPointerDown(M){var _;const V=!M.button||M.button===0;if(M.defaultPrevented||g||!V||n)return;I.current=M.pointerType,D.current=!1,w.current=!0,T.current={x:M.clientX,y:M.clientY},F(M.nativeEvent),hn(M.pointerType)?d.start(Lb,()=>{const q=m.current;m.current=0,w.current&&q!=null&&q<Wb?(v(c,M),D.current=!0):(D.current=!1,C())}):(M.preventDefault(),(_=u.current)==null||_.focus(),v(c,M))},onPointerUp(M){hn(M.pointerType)&&(w.current=!1)},onPointerMove(M){if(n||g||!hn(M.pointerType)||!w.current)return;m.current!=null&&(m.current+=1);const{x:W,y:_}=T.current,q=W-M.clientX,B=_-M.clientY;q**2+B**2>Bb**2&&C()},onMouseEnter(M){const V=n||g;M.defaultPrevented||V||!w.current||A.current||hn(I.current)||v(c,M)},onMouseLeave(){A.current||C()},onMouseUp(){A.current||C()}}}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:v,isPressedRef:C,locale:N,maxWithDefault:S,movesAfterTouchRef:x,readOnly:T,setValue:A,startAutoChange:D,state:I,stopAutoChange:k,value:F,valueRef:P,lastChangedValueRef:M,onValueCommitted:V}=as(),W=F!=null&&F>=S,_=o||d||W,q=nc({isIncrement:!0,inputRef:g,startAutoChange:D,stopAutoChange:k,inputValue:b,disabled:_,readOnly:T,id:f,setValue:A,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:c,valueRef:P,isPressedRef:C,intentionalTouchCheckTimeout:v,movesAfterTouchRef:x,locale:N,lastChangedValueRef:M,onValueCommitted:V}),{getButtonProps:B,buttonRef:U}=aa({disabled:_,native:i,focusableWhenDisabled:!0}),$=y.useMemo(()=>({...I,disabled:_}),[I,_]);return nt("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:v,isPressedRef:C,minWithDefault:N,movesAfterTouchRef:S,readOnly:x,setValue:T,startAutoChange:A,state:D,stopAutoChange:I,value:k,valueRef:F,locale:P,lastChangedValueRef:M,onValueCommitted:V}=as(),W=k!=null&&k<=N,_=o||d||W,q=nc({isIncrement:!1,inputRef:g,startAutoChange:A,stopAutoChange:I,inputValue:b,disabled:_,readOnly:x,id:f,setValue:T,getStepAmount:w,incrementValue:m,allowInputSyncRef:l,formatOptionsRef:c,valueRef:F,isPressedRef:C,intentionalTouchCheckTimeout:v,movesAfterTouchRef:S,locale:P,lastChangedValueRef:M,onValueCommitted:V}),{getButtonProps:B,buttonRef:U}=aa({disabled:_,native:i,focusableWhenDisabled:!0}),$=y.useMemo(()=>({...D,disabled:_}),[D,_]);return nt("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:v,name:C,readOnly:N,required:S,setValue:x,state:T,setInputValue:A,locale:D,inputRef:I,value:k,onValueCommitted:F,lastChangedValueRef:P,hasPendingCommitRef:M,valueRef:V}=as(),{clearErrors:W}=oc(),{validationMode:_,setTouched:q,setFocused:B,invalid:U,shouldValidateOnChange:$,validation:H}=da(),{labelId:pe}=Fl(),de=y.useRef(!1),De=y.useRef(!1);return Yb({id:w,commit:H.commit,value:k,controlRef:I,name:C,getValue:()=>k??null}),Xb(k,L=>{const j=$();if(W(C),j&&H.commit(k),!(L===k||j)){if(De.current){De.current=!1;return}H.commit(k,!0)}}),nt("input",t,{ref:[n,I],state:T,props:[{id:w,required:S,disabled:u,readOnly:N,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||N||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||N||u)return;q(!0),B(!1);const j=!i.current,K=M.current;if(i.current=!0,g.trim()===""){x(null,Ie(sn,L.nativeEvent)),_==="onBlur"&&H.commit(null),F(null,an(sn,L.nativeEvent));return}const z=l.current,J=pn(g,D,z);if(J===null)return;const ie=(z==null?void 0:z.maximumFractionDigits)!=null||(z==null?void 0:z.minimumFractionDigits)!=null,Ae=z==null?void 0:z.maximumFractionDigits,Q=ie&&typeof Ae=="number"?Number(J.toFixed(Ae)):J,be=an(Rn,L.nativeEvent),ve=k!==Q,Be=j||ve||K;_==="onBlur"&&H.commit(Q),ve&&(De.current=!0,x(Q,Ie(Rn,L.nativeEvent))),Be&&F(Q,be);const Ue=Ot(Q,D,z),mt=Wl(J,D,z);!(!ie&&J===k&&g===mt)&&g!==Ue&&A(Ue)},onChange(L){if(L.nativeEvent.defaultPrevented)return;i.current=!1;const j=L.target.value;if(j.trim()===""){A(j),x(null,Ie(sn,L.nativeEvent));return}const K=d();if(!Array.from(j).every(ie=>{const Ae=ie>="0"&&ie<="9",Q=fa.test(ie),be=pa.test(ie),ve=jl.test(ie),Be=Gl.test(ie),Ue=fn.test(ie);return Ae||Q||be||ve||Be||Ue||K.has(ie)}))return;const J=pn(j,D,l.current);A(j),J!==null&&x(J,Ie(ea,L.nativeEvent))},onKeyDown(L){if(L.defaultPrevented||N||u)return;const j=L.nativeEvent;i.current=!0;const K=d();let z=K.has(L.key);const{decimal:J,currency:ie,percentSign:Ae}=ha(D,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),st=ae!=null&&ae!==-1&&Be(ae);z=!(fn.test(g)||is.test(g))||ve||st}if(is.test(L.key)&&Array.from(K).some(ae=>is.test(ae||""))){const ae=g.search(Ql),st=ae!=null&&ae!==-1&&Be(ae);z=!(fn.test(g)||is.test(g))||ve||st}[J,ie,Ae].forEach(ae=>{if(L.key===ae){const st=g.indexOf(ae),gt=Be(st);z=!g.includes(ae)||ve||gt}});const Ue=L.key>="0"&&L.key<="9",mt=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||Ue||mt||hs||bn||yn)return;const xn=pn(g,D,l.current),vn=c(L)??us;Gb(L);const Ke=an(rn,j);L.key==="ArrowUp"?(f(vn,{direction:1,currentValue:xn,event:j,reason:rn}),F(P.current??V.current,Ke)):L.key==="ArrowDown"?(f(vn,{direction:-1,currentValue:xn,event:j,reason:rn}),F(P.current??V.current,Ke)):L.key==="Home"&&v!=null?(x(v,Ie(rn,j)),F(P.current??V.current,Ke)):L.key==="End"&&b!=null&&(x(b,Ie(rn,j)),F(P.current??V.current,Ke))},onPaste(L){if(L.defaultPrevented||N||u)return;L.preventDefault();const K=(L.clipboardData||window.Clipboard).getData("text/plain"),z=pn(K,D,l.current);z!==null&&(i.current=!1,x(z,Ie(ta,L.nativeEvent)),A(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,v]=y.useState(l!==void 0?Number(l):n||0);y.useEffect(()=>{l!==void 0&&v(Number(l))},[l]);const C=D=>{v(D),e==null||e(D)},N=D=>{const I=Number(D.target.value);Number.isNaN(I)||v(I)},S=()=>{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:s||u!==void 0&&b>=u||w,dec:s||i!==void 0&&b<=i||w},T=i!==void 0&&b<i||u!==void 0&&b>u,A=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:D=>typeof D=="number"&&C(D),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(A,r==="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(ic,{"aria-label":"stepper",role:"spinbutton",type:"text","aria-invalid":T||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",T&&"wu-border-red-deep focus:wu-border-red-deep","wu-stepper-input"),readOnly:s,onChange:N,onBlur:S,disabled:w,min:i,max:u,step:o,value:b,...m}),a.jsx(sc,{"aria-label":"increment",className:p(A,r==="rtl"?"wu-left-0":"wu-right-0","wu-stepper-button"),disabled:x.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 ht=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})});ht.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(ht,{value:"opt1",className:u("opt1"),children:n[0].label}),a.jsx(ht,{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(ht,{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(ht,{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(ht,{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(ht,{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 v=b==="opt1"?s[0].value:s[1].value;l&&l(v),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=it.Root,ga=y.forwardRef(({className:e,children:t,...n},s)=>a.jsx(it.List,{className:p("wu-relative wu-flex",e),...n,ref:s,children:t}));ga.displayName=it.List.displayName;const ba=y.forwardRef(({className:e,...t},n)=>a.jsx(it.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=it.Trigger.displayName;const hc=y.forwardRef(({className:e,...t},n)=>a.jsx(it.Content,{ref:n,className:e,...t}));hc.displayName=it.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 S;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"),v=()=>f("right"),C=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,A)=>{const D=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",D?"wu-left-0":"wu-right-0",A&&"wu-translate-x-0 wu-opacity-100",!A&&[D?"-wu-translate-x-full":"wu-translate-x-full","wu-opacity-0"]),"aria-label":D?"scroll-left":"scroll-right",children:a.jsx("span",{className:p("wu-text-blue-p wu-text-lg",D?"wm-keyboard-arrow-left":"wm-keyboard-arrow-right")})})};return a.jsxs(pc,{defaultValue:n||((S=e[0])==null?void 0:S.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&&C("left"),N(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(x=>a.jsx(ba,{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&&C("right"),N(v,"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 S;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"),v=()=>f("down"),C=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,A)=>{const D=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",D?"-wu-top-1":"-wu-bottom-1",A&&"wu-translate-y-0 wu-opacity-100",!A&&[D?"-wu-translate-y-full":"wu-translate-y-full","wu-opacity-0"]),"aria-label":D?"scroll-up":"scroll-down",children:a.jsx("span",{className:p("wu-text-blue-p wu-text-lg",D?"wm-keyboard-arrow-up":"wm-keyboard-arrow-down")})})};return a.jsxs(pc,{defaultValue:n||((S=e[0])==null?void 0:S.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&&C("top"),N(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(x=>a.jsx(ba,{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&&C("bottom"),N(v,"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(Nt,{className:"wu-w-full"})})}):(i=e.getRowModel().rows)!=null&&i.length?e.getRowModel().rows.map((u,l)=>{const d=(o==null?void 0:o(u.original))??!1;return a.jsx(mn,{"data-disabled":d,"data-state":u.getIsSelected()&&"selected",className:p("wu-group wu-transition-colors wu-border-b wu-border-black/[12%]",u.getIsSelected()&&"wu-bg-blue-p/[8%]",!d&&(u.getIsSelected()?"hover:wu-bg-blue-p/[16%]":"hover:wu-bg-black/[2%]")),children:u.getVisibleCells().map((c,w)=>a.jsx(cs,{className:p("wu-py-0 wu-font-light wu-text-xs",t==="compact"?"wu-h-8":"wu-h-10",c.column.id==="actions"?"wu-opacity-0 wu-transition-opacity wu-duration-150 wu-ease-in-out group-hover:wu-opacity-100":"",c.column.columnDef.cellAlign==="right"&&"wu-text-right",c.column.columnDef.cellAlign==="center"&&"wu-text-center",c.column.columnDef.cellAlign==="left"&&"wu-text-left"),children:qe.flexRender(c.column.columnDef.cell,c.getContext())},`${c.id}-${w}`))},`${u.id}-${l}`)}):a.jsx(mn,{children:a.jsx(cs,{colSpan:e.getAllColumns().length,children:n})})})},Nc=({table:e,sortableColumns:t,manual:n=!1,onSort:s,size:r,isRowSelected:o,HeaderAction:i,isStickyHeader:u})=>{const l=r==="compact"?"wu-h-8":"wu-h-10",d=c=>{const{id:w,columnDef:f,getIsSorted:m,toggleSorting:g}=c,{header:b}=f;if(!t.includes(w))return b;const v=m(),C=v==="asc",N=v==="desc",S=()=>{n?(g(!N),s==null||s({id:w,desc:N})):g(c.getIsSorted()==="asc")};return a.jsxs("button",{onClick:S,"aria-label":`Sort by ${b}`,className:"wu-flex wu-items-center wu-gap-4",children:[b,a.jsxs("div",{className:"wu-relative",children:[a.jsx("span",{className:p("wu-absolute -wu-top-[15px] wm-arrow-drop-down wu-text-xl",C&&"wu-hidden",!v&&"-wu-top-[11px]")}),a.jsx("span",{className:p("wu-absolute -wu-bottom-[13px] wm-arrow-drop-up wu-text-xl",N&&"wu-hidden",!v&&"-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 S;const{finalColumns:m,rowSelectionState:g}=xc({data:e,columns:t,rowSelection:i}),b=h.useMemo(()=>m.filter(x=>x.enableSorting).map(x=>x.accessorKey),[m]),v=((S=i==null?void 0:i.selectedRows)==null?void 0:S.length)??0,C=x=>{if(typeof x=="function"){const T=x(g),A=Object.keys(T).filter(D=>T[Number(D)]).map(D=>e[Number(D)]);i==null||i.onRowSelect(A)}},N=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:C});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:N,sortableColumns:b,manual:!0,onSort:r==null?void 0:r.onSort,size:o,HeaderAction:u,isRowSelected:v>0,isStickyHeader:d}),!n&&a.jsx(vc,{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(Nt,{})})]})},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 M;const[b,v]=h.useState((r==null?void 0:r.initial)||[]),[C,N]=h.useState([]),[S,x]=h.useState((i==null?void 0:i.pageIndex)??0),{finalColumns:T,rowSelectionState:A}=xc({data:e,columns:t,rowSelection:m}),D=h.useMemo(()=>T.filter(V=>V.enableSorting).map(V=>V.accessorKey),[T]),I=h.useMemo(()=>T.filter(V=>V.filterable).map(V=>V.accessorKey),[T]),k=((M=m==null?void 0:m.selectedRows)==null?void 0:M.length)??0,F=V=>{const W=typeof V=="function"?V(A):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:T,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:C,...i?{pagination:i}:{},...m!=null&&m.isEnabled?{rowSelection:A}:{}},onSortingChange:v,onColumnFiltersChange:N,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)!==S&&(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(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:D,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 Dc(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 Ac=({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"),[v,C]=h.useState("00"),[N,S]=h.useState("am");h.useEffect(()=>{if(!t){d(""),b("12"),C("00"),S("am"),c.current&&(c.current.value="");return}const I=dy(t);d(I);const[k,F]=I.split(":"),{hour:P,meridiem:M}=Dc(k);b(P),C(F),S(M),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:x,rotatedMinutes:T,rotatedMeridiem:A}=hy(i,g,v,N),D=h.useCallback((I,k,F)=>{const P=I??g,M=k??v,V=F??N;b(P),C(M),S(V);const W=`${fy(P,V)}:${M}`;d(W)},[g,v,N]);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(je,{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:M}=Dc(k);b(P),C(F),S(M)},className:"wu-w-[136px] wu-h-8 wu-pr-6 wu-border wu-border-lead/40 wu-text-gray-lead wu-timepicker-input",style:{WebkitAppearance:"none",MozAppearance:"textfield"},Icon:a.jsx(Ve,{icon:"wm-schedule",className:p("wu-text-base",o.disabled&&"wu-text-lead/50 wu-pointer-events-none wu-opacity-50"),onClick:()=>u(I=>!I),"data-testid":"wu-timepicker-icon"}),iconPosition:"right",dir:r,...o}),a.jsx("style",{children:`
19
19
  input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
20
- `}),i&&a.jsxs("div",{className:p("wu-absolute wu-w-[136px] wu-h-[228px] wu-flex wu-bg-white wu-border wu-shadow wu-z-50 wu-text-xs wu-gap-1 wu-p-1 wu-border-blue-p wu-text-lead",e),children:[a.jsx(Sa,{values:x,selectedValue:g.padStart(2,"0"),scrollRef:f,onSelect:I=>D(I,v),className:"wu-time-hour-picker"}),a.jsx(Sa,{values:T,selectedValue:v.padStart(2,"0"),scrollRef:m,onSelect:I=>D(g,I),className:"wu-time-minute-picker"}),a.jsx(Sa,{values:A,selectedValue:N,onSelect:I=>D(void 0,void 0,I),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};Ac.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(Dy({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 Dy=_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),Ay=()=>{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.0",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=je,E.WuInputError=Ad,E.WuInputHint=kd,E.WuLabel=Te,E.WuListbox=Tm,E.WuLoader=Nt,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=Ac,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=Ay,E.useTranslationsContext=ky,E.useWuShowToast=Ny,E.useWuSidebar=et,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
20
+ `}),i&&a.jsxs("div",{className:p("wu-absolute wu-w-[136px] wu-h-[228px] wu-flex wu-bg-white wu-border wu-shadow wu-z-50 wu-text-xs wu-gap-1 wu-p-1 wu-border-blue-p wu-text-lead",e),children:[a.jsx(Sa,{values:x,selectedValue:g.padStart(2,"0"),scrollRef:f,onSelect:I=>D(I,v),className:"wu-time-hour-picker"}),a.jsx(Sa,{values:T,selectedValue:v.padStart(2,"0"),scrollRef:m,onSelect:I=>D(g,I),className:"wu-time-minute-picker"}),a.jsx(Sa,{values:A,selectedValue:N,onSelect:I=>D(void 0,void 0,I),className:"wu-time-meridiem-picker",repeatItems:!1})]})]})]})};Ac.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(Dy({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 Dy=_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),Ay=()=>{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.1",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=je,E.WuInputError=Ad,E.WuInputHint=kd,E.WuLabel=Te,E.WuListbox=Tm,E.WuLoader=Nt,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=Ac,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=Ay,E.useTranslationsContext=ky,E.useWuShowToast=Ny,E.useWuSidebar=et,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
21
21
  //# sourceMappingURL=index.js.map