@maxio-com/react-ui-components 9.29.1 → 9.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1 +1 @@
1
- import*as e from"react";import a,{useRef as t,useEffect as l,useState as n,forwardRef as i,cloneElement as r,isValidElement as o,useId as s,createContext as c,useContext as m,Children as d,useLayoutEffect as u,useCallback as p,useMemo as x,useImperativeHandle as g}from"react";import b from"classnames";import{useId as f,useLink as h,useButton as E,VisuallyHidden as v,usePress as _,useFocusRing as N,mergeProps as w,useCheckboxGroupItem as y,useCheckbox as I,useCheckboxGroup as k,useRadio as C,useRadioGroup as R,useTextField as S,useProgressBar as D,useToggleButton as P}from"react-aria";import{useObjectRef as $,useResizeObserver as T}from"@react-aria/utils";import{Popover as M,OverlayArrow as O,TooltipTrigger as z,Tooltip as L,MenuTrigger as A,Menu as B,MenuItem as F,Button as V,ModalOverlay as W,Modal as H,Dialog as j,ListBox as U,composeRenderProps as K,Collection as q,ListBoxLoadMoreItem as G,Header as Z,ListBoxSection as Y,ListBoxItem as X,ComboBox as Q,Label as J,Input as ee,Text as ae,FieldError as te,SearchField as le,TextField as ne,NumberField as ie,Separator as re,TextArea as oe,DateInput as se,DateSegment as ce,DateField as me,Calendar as de,Heading as ue,CalendarGrid as pe,CalendarGridHeader as xe,CalendarHeaderCell as ge,CalendarGridBody as be,CalendarCell as fe,Group as he,DatePicker as Ee,useLocale as ve,RangeCalendar as _e,DateRangePicker as Ne,ToggleButtonGroup as we,ToggleButton as ye,SelectionIndicator as Ie,Tab as ke,Tabs as Ce,TabPanel as Re,TabPanels as Se,TabListStateContext as De,TabList as Pe}from"react-aria-components";export{DialogTrigger,Pressable}from"react-aria-components";import{useToggleState as $e}from"@react-stately/toggle";import{useCheckboxGroupState as Te}from"@react-stately/checkbox";import{AnimatePresence as Me,motion as Oe}from"framer-motion";import{useDismiss as ze,useFocus as Le,useClick as Ae,useHover as Be,useFloating as Fe,autoUpdate as Ve,offset as We,useInteractions as He,useRole as je,FloatingPortal as Ue}from"@floating-ui/react-dom-interactions";import{flexRender as Ke,useReactTable as qe,getSortedRowModel as Ge,getExpandedRowModel as Ze,getCoreRowModel as Ye}from"@tanstack/react-table";export{createColumnHelper}from"@tanstack/react-table";import{dropTargetForElements as Xe,draggable as Qe,monitorForElements as Je}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/element/adapter.js";import{attachInstruction as ea,extractInstruction as aa}from"@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/tree-item.js";import{toCalendarDate as ta}from"@internationalized/date";import{useRadioGroupState as la}from"@react-stately/radio";import{useToastState as na,useToastQueue as ia,ToastQueue as ra}from"@react-stately/toast";import{useToast as oa,useToastRegion as sa}from"@react-aria/toast";function ca(){return ca=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},ca.apply(null,arguments)}const ma=["address-card","arrow-down","arrow-down-left","arrow-down-left-long","arrow-down-long","arrow-down-right","arrow-down-right-long","arrow-down-up","arrow-left","arrow-left-long","arrow-left-right","arrow-right","arrow-right-long","arrow-turn-down-right","arrow-up","arrow-up-left","arrow-up-left-long","arrow-up-long","arrow-up-right","arrow-up-right-long","bank","bar-chart","briefcase","building","business-intelligence","calendar","caret-down","caret-left","caret-right","caret-up","chat","check","check-box","check-box-checked","check-box-checked-fill","check-box-indeterminate-fill","check-circle","check-circle-fill","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle","circle-half-stroke-small","circle-small-dash","circle-small-fill","circle-small-stroke","clipboard","cog","copy-file","credit-card","cross","cross-circle","cross-circle-fill","dashboard","diamond-small-fill","document","document-blank","dollar","dot-circle-fill","dot-fill","error","error-fill","error-small-fill","graph","home","info-circle","info-circle-fill","line-vertical","list","login","logout","megaphone","menu","menu-chevron-left","menu-chevron-right","notification","notification-unread","pen","plus","plus-circle","plus-circle-fill","question-circle","question-circle-fill","recently-viewed","search","square-small-fill","trash","triangle-small-fill","user","warning-circle","warning-circle-fill"],da=["anrok","dropbox","hubspot","numeral","oracle","quotapath","sage","sphere","taxjar"],ua=["avalara","pipedrive","quickbooks","salesforce","xero"],pa=({variant:e,color:t,className:l,size:n})=>{const i=(e,a)=>a.includes(e),r=i(e,ma)||i(e,da),o=i(e,ua),s=b({"fa-kit":r,"fa-kit-duotone":o,"fa-sharp fa-regular":!r&&!o,[`fa-${e}`]:!0,[`fa-${n}`]:n,[`maxio-icon--${t}`]:t&&!i(e,da)&&!i(e,ua)},l);return a.createElement("i",{className:s})},xa=({item:e,isSelected:n,truncateLabel:i=!1,role:r="option",small:o=!1})=>{const s=t(null),c=t(!1),m=f();if(l(()=>{n&&c.current&&s.current?.focus()},[n]),l(()=>{c.current=!0},[]),"divider"===e.type)return a.createElement("div",{className:"maxio-action-list__divider",role:"separator","aria-hidden":"true"});const{leadingIconName:d,leadingIconClassName:u,trailingIconName:p,label:x,description:g,link:h}=e,E=b("maxio-action-list__label",{"maxio-truncate":i});return a.createElement("a",ca({"aria-labelledby":m},h,{className:b("maxio-action-list__content",h.className,{"maxio-action-list__content--size-small":o}),tabIndex:n?0:-1,ref:s,role:r}),d&&a.createElement(pa,{variant:d,className:b("maxio-action-list__leading-icon",u)}),a.createElement("span",{className:E,id:m},x),g&&a.createElement("span",{className:"maxio-action-list__description"},g),p&&a.createElement(pa,{variant:p,className:"maxio-action-list__trailing-icon"}))},ga=(e,a,t)=>0===e?e:1===e&&"divider"===a[e-1].type?t||e:"divider"===a[e-1].type?ga(e-1,a,t||e):e-1,ba=({items:e,isShadowed:t=!0,itemProps:l={},className:i,truncateLabels:r=!1,small:o=!1,...s})=>{const c=b("maxio-action-list",i,{"maxio-action-list--shadow":t}),[m,d]=n(()=>e.findIndex(e=>"divider"!==e.type));return 0===e.length?null:a.createElement("div",ca({className:c,onKeyDown:a=>{if("Space"===a.code||"Enter"===a.code){const a=e[m];a&&"divider"!==a.type&&window.open(a.link.href,a.link.target||"_self")}"ArrowUp"===a.code&&(a.preventDefault(),d(a=>ga(a,e))),"ArrowDown"===a.code&&(a.preventDefault(),d(a=>((e,a)=>{const t=a.findIndex((a,t)=>"divider"!==a.type&&t>e);return-1===t?e:t})(a,e)))},role:"listbox"},s),e.map((e,t)=>a.createElement(xa,ca({item:e,truncateLabel:r,key:`listbox-${e.id}`,isSelected:t===m,small:o},l))))},fa=({className:e,children:t,disabled:l,external:n,icon:i,size:r="sm",underline:o,variant:s,...c})=>{const m=b("maxio-link",{[`maxio-link--${r}`]:r,"maxio-link--disabled":l,[`maxio-link--${s}`]:s,"maxio-link--underline":o},e),d=n?"_blank":"_self";return a.createElement("a",ca({className:m,target:d},c),t,i&&a.createElement(pa,{variant:i,className:"maxio-link__icon"}))},ha=({size:e="md",white:t=!1,className:l})=>{const n=b("maxio-loading-spinner",l,`maxio-loading-spinner--${e}`,{"maxio-loading-spinner--white":t});return a.createElement("div",{className:n,role:"status","aria-label":"loading"})},Ea=i(({fullWidth:e=!1,leadingElement:t,trailingElement:l,icon:n,variant:i="primary",size:s,...c},m)=>{const d=$(m),{linkProps:u}=h({...c},d),p=b("maxio-button",c.className,{[`maxio-button--${s}`]:s,[`maxio-button--${i}`]:i,"maxio-button--full-width":e});return a.createElement("a",ca({},u,{ref:d,className:p,href:c.href}),t&&r(t,{...o(t)&&{className:"maxio-button__leading-element"}}),c.children,(l||n)&&r(l||n,{...o(l||n)&&{className:"maxio-button__trailing-element"}}))}),va=i(({disabled:e,loading:t=!1,fullWidth:l=!1,leadingElement:n,trailingElement:i,icon:s,variant:c="primary",size:m,...d},u)=>{const p=$(u),{buttonProps:x}=E({...d,isDisabled:e,formAction:"string"==typeof d.formAction?d.formAction:void 0},p),g=["primary","danger"].includes(c),f=b("maxio-button",d.className,{[`maxio-button--${m}`]:m,[`maxio-button--${c}`]:c,"maxio-button--loading":t,"maxio-button--full-width":l});return a.createElement("button",ca({},x,{className:f,ref:p}),n&&r(n,{...o(n)&&{className:"maxio-button__leading-element"}}),d.children,!t&&(i||s)&&r(i||s,{...o(i||s)&&{className:"maxio-button__trailing-element"}}),t&&a.createElement(ha,{className:"maxio-button__trailing-element",size:"md",white:g}))}),_a=i((e,t)=>(e=>"href"in e)(e)?a.createElement(Ea,ca({},e,{ref:t})):a.createElement(va,ca({},e,{ref:t}))),Na=({"aria-label":e,className:t,...l})=>a.createElement(_a,ca({"aria-label":e,className:b("maxio-button--icon",t)},l),null),wa=({children:e,title:t,linkText:l,linkExternal:n,href:i,display:r="inline",sentiment:o="info",onDismiss:s,className:c})=>{if(!e&&!t)return console.warn("Alert component requires either children or title prop to be rendered"),null;const m=b("maxio-alert",{[`maxio-alert--${o}`]:"info"!==o&&o},c),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[o],u=b("maxio-alert__content",{"maxio-alert__content--block":"block"===r});return a.createElement("div",{className:m},a.createElement(pa,{variant:d,className:"maxio-alert__icon","aria-hidden":"true"}),a.createElement("section",{className:"maxio-alert__container"},a.createElement("div",{className:u},t&&a.createElement("span",{className:"maxio-alert__title"},t),e&&a.createElement("span",{className:"maxio-alert__message"},e),l&&i&&a.createElement(fa,ca({className:"maxio-alert__link",href:i,variant:"high-contrast",underline:!0},n?{external:!0}:{}),l))),s&&a.createElement(Na,{icon:a.createElement(pa,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-alert__dismiss"}))},ya=c({}),Ia=({children:e})=>{const[t,l]=n(!1),i=s(),r=s();return a.createElement(ya.Provider,{value:{controlsId:i,buttonId:r,isOpen:t,onClose:()=>l(!1),onOpen:()=>l(!0),onToggle:()=>l(e=>!e)}},e)};function ka(){const e=m(ya);if(!e||"object"==typeof e&&0===Object.keys(e).length)throw new Error("useMenu hook must be used within a MenuProvider");return e}const Ca=({children:e})=>{const{isOpen:t,onToggle:l,onClose:n}=ka();return a.createElement("details",{open:t,onToggle:l,className:"maxio-action-menu"},"function"==typeof e?e({isOpen:t,onClose:n}):e)},Ra=({children:e})=>a.createElement(Ia,null,a.createElement(Ca,null,e)),Sa=({items:e,alignItemsEnd:t=!1})=>{const l=b("maxio-action-menu__content",{"maxio-action-menu__content--align-end":t}),{controlsId:n,buttonId:i}=ka();return a.createElement("div",{className:l,role:"presentation"},a.createElement(ba,{role:"menu",itemProps:{role:"menuitem"},id:n,"aria-labelledby":i,items:e}))},Da=({children:e,iconName:t="chevron-down","aria-label":l,size:n="md",variant:i="secondary"})=>{const r=b({"maxio-action-menu__chevron":"chevron-down"===t}),o=b("maxio-button",`maxio-button--${i}`,`maxio-button--${n}`,{"maxio-button--icon":t&&!e}),{isOpen:s,buttonId:c,controlsId:m}=ka();return a.createElement("summary",{className:o,"aria-haspopup":"true","aria-label":l,"aria-expanded":s,"aria-controls":m,id:c},e&&a.createElement("span",null,e),t&&a.createElement(pa,{variant:t,className:`${r} maxio-button__trailing-element`}))},Pa=({className:e,src:t,alt:l="avatar"})=>a.createElement("img",{className:b("maxio-avatar",e),alt:l,src:t}),$a=({children:e,title:t,linkText:l,linkExternal:n,href:i,display:r="inline",sentiment:o="info",onDismiss:s,className:c})=>{if(!e&&!t)return console.warn("Banner component requires either children or title prop to be rendered"),null;const m=b("maxio-banner",{[`maxio-banner--${o}`]:"info"!==o&&o,className:c}),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[o],u=b("maxio-banner__content",{"maxio-banner__content--block":"block"===r});return a.createElement("div",{className:m,"aria-live":"assertive"},a.createElement(pa,{variant:d,className:"maxio-banner__icon","aria-hidden":"true"}),a.createElement("section",{className:"maxio-banner__container"},a.createElement("div",{className:u},t&&a.createElement("span",{className:"maxio-banner__title"},t),e&&a.createElement("span",{className:"maxio-banner__message"},e),l&&i&&a.createElement(fa,ca({href:i},"warning"!==o&&{variant:"inverse"},{underline:!0},n?{external:!0}:{}),l))),s&&a.createElement(Na,{icon:a.createElement(pa,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-banner__dismiss"}))},Ta=({children:e,className:t,href:l,...n})=>{const i=l?a.createElement(fa,{size:"sm",href:l},e):e;return a.createElement("li",ca({className:b("maxio-breadcrumbs__item",t)},n),i)},Ma="Breadcrumbs requires at least one BreadcrumbsItem as children",Oa='Last BreadcrumbsItem should not have "href" prop. It is the current page.',za="Breadcrumbs only accepts BreadcrumbsItem as children",La=({className:e,children:t,...l})=>{const n=d.count(t);if(0===n)throw new Error(Ma);const i=d.map(t,(e,a)=>{if(o(e)&&e.type===Ta){if(a===n-1&&e.props.href)throw new Error(Oa);return r(e,{"aria-current":a===n-1?"page":void 0})}throw new Error(za)});return a.createElement("nav",ca({"aria-label":"Breadcrumb"},l),a.createElement("ol",{className:b("maxio-breadcrumbs",e)},i))},Aa=({children:e,arrowPosition:t,size:l="regular",maxWidth:n=160})=>a.createElement("div",{"data-testid":"tooltip",className:b("maxio-tooltip",`maxio-tooltip--${l}`,{[`maxio-tooltip--arrow-${t}`]:t})},a.createElement("div",{className:"maxio-tooltip__content",style:{maxWidth:n}},e)),Ba={click:Ae,hover:e=>Be(e,{delay:100}),focus:Le,dismiss:ze},Fa=(e,a)=>a.map(a=>Ba[a](e)),Va=({placement:e="top",isActive:a=!1,interactions:n=["hover"],floatingElementOffset:i=0,onOverlayUpdate:r,autoHideMs:o})=>{const s=t(null),{strategy:c,x:m,y:d,context:u,floating:p,reference:x}=Fe({placement:e,open:a,onOpenChange:e=>r(e),middleware:[We(i)],whileElementsMounted:Ve}),{getReferenceProps:g,getFloatingProps:b}=He([...Fa(u,n),je(u,{role:"tooltip"})]);l(()=>{s.current&&clearTimeout(s.current),a&&o&&(s.current=window.setTimeout(()=>r(!1),o))},[a,o]);return{isActive:a,refs:{floating:p,reference:x},floatingElementCSSPosition:{position:c,top:d??0,left:m??0},getReferenceProps:g,getFloatingProps:b}};function Wa(e,a=0){const i=t((new Date).getTime()),r=t((new Date).getTime()),[o,s]=n(!1);return l(()=>{const t=()=>{i.current=(new Date).getTime(),s(!0)},l=()=>{r.current=(new Date).getTime(),window.setTimeout(()=>{i.current-r.current<=0&&s(!1)},a)},n=e&&e.current;return n&&(n.addEventListener("mouseenter",t),n.addEventListener("mouseleave",l)),()=>{n&&(n.removeEventListener("mouseenter",t),n.removeEventListener("mouseleave",l))}},[e]),o}function Ha(e=500){const[a,i]=n(()=>{if("undefined"==typeof window)return{windowWitdh:0,windowHeight:0};const{innerWidth:e,innerHeight:a}=window;return{windowWitdh:e,windowHeight:a}}),r=t(null);return l(()=>{if("undefined"==typeof window)return;const a=()=>{const{innerWidth:a,innerHeight:t}=window;window.clearTimeout(r.current??void 0),r.current=window.setTimeout(()=>{i({windowWitdh:a,windowHeight:t})},e)};return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[e]),a}function ja(e){const[a,t]=n(()=>e.current?.clientWidth??0),l=()=>{const a=e.current?.clientWidth??0;t(e=>0===a&&e>0?e:a)};return u(l,[e]),T({ref:e,onResize:l}),a}const Ua=({children:e,usePortal:t=!1,isActive:l=!1,placement:n="top",interactions:i=["hover"],role:r="tooltip",renderOverlay:o,floatingElementOffset:s,motionSettings:c={},autoHideMs:m,onOverlayUpdate:d,className:u})=>{const{getReferenceProps:p,getFloatingProps:x,refs:{floating:g,reference:f},floatingElementCSSPosition:h}=Va({isActive:l,onOverlayUpdate:d,autoHideMs:m,floatingElementOffset:s,interactions:i,placement:n}),E=a.createElement(Me,null,l&&a.createElement(Oe.div,ca({ref:g,style:h},c,x()),o()));return a.createElement(a.Fragment,null,a.createElement("div",ca({ref:f,className:b("maxio-inline-flex",u)},p(),{"data-testid":"overlay-trigger"}),e),t?a.createElement(Ue,{id:"maxio-ui-portal"},E):E)},Ka={top:"bottom",right:"left",bottom:"top",left:"right","top-start":"bottom-left","top-end":"bottom-right","right-start":"left-top","right-end":"left-bottom","bottom-start":"top-left","bottom-end":"top-right","left-start":"right-top","left-end":"right-bottom"},qa=({children:e,interactions:i=["hover"],placement:r="right",maxWidth:o=160,size:s="regular",renderContent:c,autoHideMs:m,isVisible:d,usePortal:u,className:g,onVisibilityUpdate:b,floatingElementOffset:f=5})=>{const[h,E]=n(!1),v=void 0!==d,_=t(null),N=p(e=>{_.current&&clearTimeout(_.current),_.current=window.setTimeout(()=>{v||E(e),b&&b(e)},50)},[v,b]),w=x(()=>(e=>{const a=e.startsWith("top")||e.startsWith("bottom")?"Y":"X",t=`translate${a}(${e.startsWith("bottom")||e.startsWith("right")?"-":""}10px)`;return{initial:{opacity:0,visibility:"hidden",transform:t},animate:{opacity:1,visibility:"visible",transform:`translate${a}(0px)`},exit:{opacity:0,visibility:"hidden",transform:t},transition:{ease:[.4,0,.5,1],duration:.2}}})(r),[r]);return l(()=>()=>{_.current&&clearTimeout(_.current)},[]),a.createElement(Ua,{role:"tooltip",className:g,floatingElementOffset:f,motionSettings:w,isActive:v?d:h,onOverlayUpdate:N,autoHideMs:m,usePortal:u,placement:r,interactions:i,renderOverlay:()=>a.createElement(Aa,{size:s,arrowPosition:Ka[r],maxWidth:o},c())},e)},Ga="maxio-copy-to-clipboard--subtle",Za="maxio-copy-to-clipboard--xs",Ya={idle:"copy-file",copied:"check",error:"error"},Xa=({value:e,copyLabel:i="Copy",copiedLabel:r="Copied!",copyErrorLabel:o="Copy failed",size:s="md",variant:c="ghost",disabled:m,resetAfterMs:d=2e3,tooltipPlacement:u="top",onCopy:x,onCopyError:g,onClick:f,className:h,...E})=>{const{feedbackState:_,feedbackLabel:N,announcement:w,handleCopy:y}=((e,{copyLabel:a,copiedLabel:i,copyErrorLabel:r,resetAfterMs:o,onCopy:s,onCopyError:c,onClick:m})=>{const[d,u]=n(null),x=t(null),g=t(0),b=t(!0),f=t(0),h=t(e),E=p(()=>{null!==x.current&&(clearTimeout(x.current),x.current=null)},[]),v=p(()=>{E(),u(null)},[E]),_=p((e,a)=>{E(),u({state:e,value:a,announceId:++g.current}),x.current=window.setTimeout(v,o)},[E,o,v]);l(()=>{h.current=e,v()},[v,e]),l(()=>(b.current=!0,()=>{b.current=!1,E()}),[E]);const N=p(async a=>{m?.(a);const t=++f.current,l=e,n=()=>!b.current||t!==f.current||l!==h.current;try{await navigator.clipboard.writeText(l)}catch(e){return n()||_("error",l),void c?.(e)}n()||_("copied",l),s?.(l)},[m,s,c,_,e]),w=d?.value===e?d.state:"idle",y={idle:a,copied:i,error:r}[w];return{feedbackState:w,feedbackLabel:y,announcement:"idle"!==w&&d?{id:d.announceId,message:y}:null,handleCopy:N}})(e,{copyLabel:i,copiedLabel:r,copyErrorLabel:o,resetAfterMs:d,onCopy:x,onCopyError:g,onClick:f});return a.createElement(a.Fragment,null,a.createElement(qa,{interactions:["hover","focus"],placement:u,size:"small",renderContent:()=>N},a.createElement(Na,ca({},E,{"aria-label":i,className:b(h,{[Ga]:"subtle"===c,[Za]:"xs"===s}),variant:"subtle"===c?"ghost":c,size:"xs"===s?void 0:s,disabled:m,onClick:y,trailingElement:a.createElement(pa,{variant:Ya[_]})}))),a.createElement(v,null,a.createElement("span",{role:"status","aria-live":"polite","aria-atomic":"true"},w&&a.createElement("span",{key:w.id},w.message))))},Qa="row-controls",Ja="row-actions",et=({children:e,pattern:t,size:l,isExpandable:i,isUsingCustomRow:r})=>{const[o,s]=n(!1),[c,m]=n(!1),d=t&&r&&i,u=b("maxio-data-table",{"maxio-data-table--pattern":t&&!d,"maxio-data-table--expanded-child-pattern":d,"maxio-data-table--with-custom-row":r,[`maxio-data-table--${l}`]:l,"maxio-data-table--with-pinned-left-border":o,"maxio-data-table--with-pinned-right-border":c});return a.createElement("div",{className:"maxio-data-table-wrapper",onScroll:e=>{const a=e.target;s(a.scrollLeft>0),m(a.scrollWidth-a.clientWidth-a.scrollLeft>0)}},a.createElement("table",{className:u},e))},at=({children:e})=>a.createElement("thead",null,e),tt=({children:e})=>a.createElement("tbody",null,e),lt=({children:e,table:t,header:l,className:n,enableExpanding:i,...r})=>{const o=l?.column,s=o?.getCanSort?.(),c=o?.getToggleSortingHandler?.(),m=l?.isPlaceholder,d=o?.columnDef?.meta?.align,u=o?.columnDef?.meta?.width,p=o?.columnDef?.meta?.controls,x=o?.columnDef?.meta?.actions,g=o?.getIsPinned(),f=o?.getIsSorted(),h="asc"===f,E=b("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${g}`]:g,"maxio-data-table__cell--sortable":s,"maxio-data-table__cell--active":f,[`maxio-data-table__cell--${d}`]:d,"maxio-data-table__cell--controls":p,"maxio-data-table__cell--actions":x}),v={...u?{width:u}:{},..."left"===g?{left:o?.getStart("left")}:"right"===g?{right:o?.getAfter("right")}:{}},_=((e,a)=>e&&a?"arrow-up":e&&!a?"arrow-down":"arrow-down-up")(!!f,h),N=t?.getToggleAllRowsExpandedHandler(),w=t?.getIsAllRowsExpanded?.(),y=l?.headerGroup.headers[0].id===Qa?1:0,I=i&&l?.index===y;return m?null:a.createElement("th",ca({scope:"col",role:"columnheader","aria-sort":f?h?"ascending":"descending":"none",className:E,onClick:c,colSpan:l?.colSpan,style:v},r),a.createElement("div",{className:"maxio-data-table__cell-flex"},!0===i&&I&&a.createElement(Na,{size:"sm",variant:"ghost",icon:a.createElement(pa,{size:"xs",variant:w?"chevron-down":"chevron-right"}),onClick:N,"aria-label":w?"Collapse all rows":"Expand all rows","data-open":w,className:"maxio-data-table__expand-button"}),e,s&&a.createElement(pa,{variant:_,className:"maxio-data-table__sort-icon"})))},nt=e=>e.subRows??[],it=(e,a)=>Object.assign({},e,{subRows:a}),rt=(e,a,t=[])=>{for(let l=0;l<e.length;l+=1){const n=e[l],i=[...t,l];if(n===a)return i;const r=rt(nt(n),a,i);if(r)return r}return null},ot=(e,a)=>{const[t,...l]=a,n=e[t];if(!n)return null;const i=[...e];if(0===l.length)return i.splice(t,1),{data:i,item:n};const r=ot(nt(n),l);return r?(i[t]=it(n,r.data),{data:i,item:r.item}):null},st=(e,a,t,l)=>{const n=[...e];if(0===a.length)return n.splice(t,0,l),n;const[i,...r]=a,o=e[i];if(!o)return null;const s=st(nt(o),r,t,l);return s?(n[i]=it(o,s),n):null},ct=(e,a)=>{let t,l=e;for(const e of a){if(t=l[e],!t)return;l=nt(t)}return t},mt="maxio-data-table-row",dt=c(null),ut=()=>m(dt),pt=e=>e.type===mt&&"string"==typeof e.instanceId&&"string"==typeof e.rowId,xt=e=>{const a=(e=>{const a=aa(e);return a&&"instruction-blocked"!==a.type?"reorder-above"===a.type?"before":"reorder-below"===a.type?"after":"make-child"===a.type?"inside":null:null})(e);return"string"==typeof e.rowId&&a?{rowId:e.rowId,position:a}:null},gt=({availability:e,children:i,data:r,enableExpanding:o,getRowReorderLabel:c,onRowReorder:m,rowReorderMode:d,table:u})=>{const g=`maxio-data-table-${s()}`,[b,f]=n(""),[h,E]=n(null),[v,_]=n(null),N=t(null),w=p(e=>u.getCoreRowModel().rowsById[e],[u]),y=p(e=>c?.(e)??e.id,[c]),I=p((e,a)=>{const t=w(e),l=w(a.rowId);if(!t||!l)return null;const n=((e,a,t,l,n)=>{if(a.id===t.id||!((e,a,t,l)=>"all"===l||("siblings"===l?"inside"!==t&&(e.parentId??null)===(a.parentId??null):"inside"===t?e.depth===a.depth+1:e.depth===a.depth))(a,t,l,n))return null;const i=rt(e,a.original),r=rt(e,t.original);if(!i||!r||(s=r,(o=i).length<s.length&&o.every((e,a)=>s[a]===e)))return null;var o,s;const c=ot(e,i);if(!c)return null;const m=((e,a)=>{const t=[...e],l=a.length-1;return l>=0&&e.length>l&&a.slice(0,l).every((a,t)=>e[t]===a)&&a[l]<e[l]&&(t[l]-=1),t})(r,i),d=m[m.length-1];if(void 0===d)return null;const u="inside"===l?m:m.slice(0,-1),p=ct(c.data,m);if(!p)return null;const x="inside"===l?nt(p).length:d+("after"===l?1:0),g={parentRowId:"inside"===l?t.id:t.parentId??null,index:x},b={parentRowId:a.parentId??null,index:a.index};if(b.parentRowId===g.parentRowId&&b.index===g.index)return null;const f=st(c.data,u,x,c.item);return f?{data:f,source:b,destination:g}:null})(r,t,l,a.position,d);return n&&!o&&null!==n.destination.parentRowId&&n.destination.parentRowId!==n.source.parentRowId?null:n},[r,o,w,d]),k=p(e=>{N.current=e,E(e)},[]),C=p((e,a)=>{const t=w(e),l=w(a.rowId),n=I(e,a);return t&&l&&n?(m({...n,row:t,rowId:t.id,targetRow:l,targetRowId:l.id,position:a.position}),f(`${y(t)} moved ${i=y(l),r=a.position,"inside"===r?`inside ${i}`:`${r} ${i}`}.`),!0):(f("That row cannot be moved to this position."),!1);var i,r},[y,I,w,m]),R=p((e,{input:a,element:t,source:l})=>{const n={rowId:e.id,instanceId:g},i=ea(n,{element:t,input:a,currentLevel:e.depth,indentPerLevel:24,mode:"standard"}),r=xt(i),o=pt(l.data)&&l.data.instanceId===g&&Boolean(r&&I(l.data.rowId,r));return{...i,isValid:o}},[I,g]),S=p((a,t)=>{if(!e.available)return()=>{};const l=e=>{const a=e.isValid?xt(e):null;k(a)};return Xe({element:t,canDrop:({source:e})=>pt(e.data)&&e.data.instanceId===g&&e.data.rowId!==a.id&&!a.getParentRows().some(a=>a.id===e.data.rowId),getData:e=>R(a,e),onDragEnter:({self:e})=>l(e.data),onDrag:({self:e})=>l(e.data),onDragLeave:()=>{N.current?.rowId===a.id&&k(null)}})},[e,R,g,k]),D=p((a,t)=>{const l=t.closest("tr");return e.available&&l instanceof HTMLElement?Qe({element:l,dragHandle:t,getInitialData:()=>({type:mt,instanceId:g,rowId:a.id})}):()=>{}},[e,g]);l(()=>{if(e.available)return Je({canMonitor:({source:e})=>pt(e.data)&&e.data.instanceId===g,onDragStart:({source:e})=>{if(!pt(e.data))return;const a=w(e.data.rowId);_(e.data.rowId),a&&f(`${y(a)} grabbed. Choose a destination.`)},onDrop:({source:e,location:a})=>{if(pt(e.data)){const t=a.current.dropTargets[0]?.data,l=!0===t?.isValid?xt(t):null;l?C(e.data.rowId,l):f("Row move cancelled.")}_(null),k(null)}})},[C,e,y,w,g,k]),l(()=>{if("inside"!==h?.position)return;const e=w(h.rowId);if(!e?.getCanExpand()||e.getIsExpanded())return;const a=window.setTimeout(()=>e.toggleExpanded(!0),500);return()=>window.clearTimeout(a)},[h,w]);const P=p(a=>{if(!e.available)return[];const t=a.parentId?w(a.parentId):null,l=t?.subRows??u.getCoreRowModel().rows,n=l.findIndex(e=>e.id===a.id);if(-1===n)return[];const i=l[n-1],r=l[n+1],o=l[0],s=l[l.length-1],c=[];if(n>1&&o&&c.push({id:"top",label:"Move to top",target:{rowId:o.id,position:"before"}}),i&&c.push({id:"up",label:"Move up",target:{rowId:i.id,position:"before"}}),r&&c.push({id:"down",label:"Move down",target:{rowId:r.id,position:"after"}}),n<l.length-2&&s&&c.push({id:"bottom",label:"Move to bottom",target:{rowId:s.id,position:"after"}}),t){let e=t;for(;e.parentId;){const a=w(e.parentId);if(!a)break;e=a}c.push({id:"move-to-root",label:"Move to root",target:{rowId:e.id,position:"after"}})}return u.getCoreRowModel().flatRows.forEach(e=>{e.id!==a.parentId&&c.push({id:`move-to:${e.id}`,label:`Move to ${y(e)}`,target:{rowId:e.id,position:"inside"}})}),c.filter(e=>Boolean(I(a.id,e.target)))},[e,y,I,w,u]),$=p(a=>{if(!e.available)return!1;const t=a.parentId?w(a.parentId):null;return(t?.subRows??u.getCoreRowModel().rows).length>1||"siblings"!==d&&("all"===d?Boolean(t):!(!o||0===a.depth)&&u.getCoreRowModel().flatRows.some(e=>e.depth===a.depth-1&&e.id!==a.parentId))},[e,o,w,d,u]),T=x(()=>({activeTarget:h,availability:e,draggingRowId:v,getActions:P,getLabel:y,hasActions:$,moveRow:C,registerHandle:D,registerRow:S}),[h,e,C,v,P,y,$,D,S]);return a.createElement(dt.Provider,{value:T},i,a.createElement("span",{className:"maxio-data-table__live-region",role:"status","aria-live":"polite","aria-atomic":"true"},b))},bt=({children:e,row:t,isChild:l,isHeader:n,className:i,onRowAction:r,...o})=>{const s=t?.getIsSelected?.(),c=t?.getCanExpand?.()&&t?.getIsExpanded?.(),m=Boolean(t&&r&&!n&&!l),d=a.useRef(null),u=ut(),p=u?.registerRow,x=a.useRef(null),g=e=>{x.current=e.target},{pressProps:f}=_({isDisabled:!m,onPress:e=>{const a=x.current??e.target;x.current=null,t&&r&&!(e=>e instanceof Element&&Boolean(e.closest("a,button,input,select,textarea,label,.maxio-data-table__cell--controls,.maxio-data-table__cell--actions")))(a)&&r(t)}}),{focusProps:h,isFocused:E}=N(),v=b({"maxio-data-table__row":!n,"maxio-data-table__header-row":n,"maxio-data-table__row--active":s||E,"maxio-data-table__row--expanded":c,"maxio-data-table__row--expanded-child":l,"maxio-data-table__row--actionable":m,"maxio-data-table__row--dragging":Boolean(t)&&u?.draggingRowId===t?.id,[`maxio-data-table__row--drop-${u?.activeTarget?.position}`]:Boolean(t)&&u?.activeTarget?.rowId===t?.id},i);a.useEffect(()=>{if(t&&p&&d.current&&!n&&!l)return p(t,d.current)},[l,n,p,t]);const y=m?w({onClickCapture:g,onKeyDownCapture:g,tabIndex:0},f,h,o):o;return a.createElement("tr",ca({},y,{ref:d,className:v,tabIndex:m?y.tabIndex:o.tabIndex}),e)},ft=c({}),ht=i(({checked:e,disabled:t,invalid:l,indeterminate:n,className:i,inputProps:r,error:o,label:s},c)=>{const m=b("maxio-checkbox",{"maxio-checkbox--checked":e,"maxio-checkbox--disabled":t,"maxio-checkbox--error":l,"maxio-checkbox--indeterminate":n},i);return a.createElement("label",{className:m},a.createElement("input",ca({type:"checkbox",role:"checkbox",className:"maxio-checkbox__input",ref:c},r)),a.createElement("span",{className:"maxio-checkbox__control"},o&&a.createElement("span",{className:"maxio-checkbox__control-error"})),s&&a.createElement("span",{className:"maxio-checkbox__label"},s))});ht.displayName="InnerCheckbox";const Et=({label:e,error:l=!1,className:n,indeterminate:i,value:r="",disabled:o,readOnly:s,defaultChecked:c,checked:d,...u})=>{const p=t(null),x=m(ft),{inputProps:g,isDisabled:b,isInvalid:f,isSelected:h}=x&&Object.keys(x).length>0?y({value:r,"aria-label":e??u["aria-label"],isDisabled:o,isInvalid:l,isIndeterminate:i,isReadOnly:s,...u},x,p):I({"aria-label":e??u["aria-label"],isDisabled:o,isInvalid:l,isIndeterminate:i,isReadOnly:s,value:r,...u},$e({...u,isSelected:d,defaultSelected:c}),p);return a.createElement(ht,ca({inputProps:g,checked:h,disabled:b,invalid:f,indeterminate:i,className:n,error:l,label:e,ref:p},u))},vt=({children:e,className:t,...l})=>a.createElement("div",ca({className:b("maxio-form-helper-text",t)},l),e),_t=({children:e,className:t,...l})=>a.createElement("div",ca({className:b("maxio-form-error",t)},l),a.createElement(pa,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},e)),Nt=({helperText:e,className:t,errorMessage:l,children:n,disabled:i,label:r,defaultValue:o,name:s,...c})=>{const m=Te({defaultValue:o,name:s,errorMessage:l,description:e,label:r,isDisabled:i,isInvalid:!!l,...c}),{groupProps:d,labelProps:u,descriptionProps:p,errorMessageProps:x,isInvalid:g}=k({"aria-label":(r??c["aria-label"])?.toString(),isDisabled:i,isInvalid:!!l,...c},m),f=b("maxio-checkbox-group",{"maxio-checkbox-group--disabled":i},t),h=e&&!l;return a.createElement("div",ca({className:f},d),r&&a.createElement("label",ca({className:"maxio-checkbox-group__label"},u),r),a.createElement(ft.Provider,{value:m},n),h&&a.createElement(vt,p,e),l&&g&&a.createElement(_t,x,l))},wt=({table:e,enableRowSelection:t,enableRowReordering:l})=>{const n=e?.getToggleAllPageRowsSelectedHandler?.(),i=e?.getIsAllPageRowsSelected?.()||e?.getIsAllRowsSelected?.(),r=e?.getIsSomePageRowsSelected?.();return t?a.createElement(a.Fragment,null,l&&a.createElement("span",{className:"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon","aria-hidden":"true",style:{visibility:"hidden"}}),a.createElement(Et,{"aria-label":"Select all rows",onChange:e=>{n("boolean"==typeof e?{target:{checked:e}}:e)},checked:i,indeterminate:!i&&r})):null},yt=({className:e,hideArrow:t=!1,children:l,offset:n=4,...i})=>a.createElement(M,ca({},i,{className:b("maxio-popover",e),offset:n}),a.createElement(a.Fragment,null,!t&&a.createElement(O,{className:"maxio-popover__arrow"},a.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12","aria-hidden":!0},a.createElement("path",{d:"M0 0 L6 6 L12 0"}))),l)),It=({row:e})=>{const t=ut(),l=t?.registerHandle,n=t?.getActions,i=t?.hasActions,r=a.useRef(null),[o,s]=a.useState(!1),c=t?.draggingRowId===e.id,m=t?.getLabel(e)??e.id,d=a.useMemo(()=>i?.(e)??!1,[i,e]),u=a.useMemo(()=>o?n?.(e)??[]:[],[n,o,e]),p=(t&&!t.availability.available?t.availability.message:void 0)??(d?void 0:`No moves are available for ${m}.`);a.useEffect(()=>{if(l&&r.current&&!p)return l(e,r.current)},[l,e,p]),a.useEffect(()=>{p&&s(!1)},[p]);const x=a.createElement(V,{ref:r,type:"button",className:"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon maxio-data-table__drag-handle","aria-label":`Reorder ${m}`,"aria-pressed":c,"aria-disabled":!!p||void 0,onPress:()=>{p||s(!0)}},a.createElement("i",{className:"fa-sharp fa-solid fa-grip-dots-vertical "+(p?"maxio-icon--disabled":"maxio-icon--secondary")}));return p?a.createElement(z,{delay:0,closeDelay:0},x,a.createElement(L,{placement:"bottom start",offset:8,className:"maxio-tooltip maxio-tooltip--arrow-top-left"},a.createElement("div",{className:"maxio-tooltip__content"},p))):a.createElement(A,{trigger:"longPress",isOpen:o,onOpenChange:s},x,a.createElement(yt,{placement:"bottom start",hideArrow:!0},a.createElement(B,{autoFocus:"first",className:"maxio-data-table__reorder-menu",items:u,onAction:a=>{const l=u.find(e=>e.id===a);l&&(t?.moveRow(e.id,l.target),requestAnimationFrame(()=>r.current?.focus()))}},e=>a.createElement(F,{id:e.id,textValue:e.label,className:"maxio-data-table__reorder-menu-item"},e.label))))},kt=({row:e,enableRowSelection:t,enableRowReordering:l})=>{const n=e?.getToggleSelectedHandler?.(),i=e?.getIsSelected?.()||e?.getIsAllSubRowsSelected?.(),r=e?.getIsSomeSelected?.(),o=e.id||e.index;return a.createElement(a.Fragment,null,l&&a.createElement(It,{row:e}),t&&a.createElement(Et,{"aria-label":`Select row ${o}`,onChange:n,checked:i,indeterminate:r}))},Ct=({children:e})=>a.createElement("div",{className:"maxio-data-table__cell-flex"},e),Rt=({row:e,cell:t,children:l,className:n,...i})=>{const r=t?.column,o=r?.columnDef?.meta?.align,s=r?.columnDef?.meta?.controls,c=r?.columnDef?.meta?.actions,m=r?.getIsPinned(),d=b("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${m}`]:m,[`maxio-data-table__cell--${o}`]:o,"maxio-data-table__cell--controls":s,"maxio-data-table__cell--actions":c}),u="left"===m?{left:r?.getStart("left")}:"right"===m?{right:r?.getAfter("right")}:{};return a.createElement("td",ca({className:d,style:u},i),l)},St=({row:e,SubRowComponent:t,pattern:l,enableExpanding:n,onRowAction:i})=>{const r=t&&e.getParentRow()&&e.getParentRow().getIsExpanded(),o=r&&e.getVisibleCells()[0].column.columnDef.id===Qa,s=r&&e.getVisibleCells()[e.getVisibleCells().length-1].column.columnDef.id===Ja,c=[s,o].filter(Boolean).length,m=e.getVisibleCells().length-c,d=e.getParentRow()?.index??e.index,u=l&&t&&d%2==1?"maxio-data-table__row--with-pattern":void 0,p=e.getCanExpand?.(),x=e?.getToggleExpandedHandler?.(),g=e?.getIsExpanded?.(),b=p&&n?0:1.75,f=e.getVisibleCells()[0].column.columnDef.id===Qa?1:0,h=e.getVisibleCells().find(({column:e})=>{const{actions:a,controls:t}=e.columnDef.meta??{};return!a&&!t}),E=i&&h?h.id:void 0;return a.createElement(a.Fragment,{key:e.id},r?a.createElement(bt,{key:`${e.id}-sub`,row:e,isChild:!0,className:u},o&&a.createElement(Rt,{className:"maxio-data-table__cell--pinned-left"}),a.createElement(Rt,{colSpan:m},t(e)),s&&a.createElement(Rt,{className:"maxio-data-table__cell--pinned-right"})):a.createElement(bt,{key:`${e.id}-parent`,row:e,className:u,onRowAction:i,"aria-labelledby":E},e.getVisibleCells().map(t=>{const l=n&&t.column.getIndex()===f;return a.createElement(Rt,{key:t.id,row:e,cell:t,id:t.id},a.createElement("div",{className:"maxio-data-table__cell-flex",style:n&&l?{paddingLeft:`${e?.depth+b}rem`}:void 0},n&&p&&l&&a.createElement(Na,{size:"sm",variant:"ghost",icon:a.createElement(pa,{size:"xs",variant:g?"chevron-down":"chevron-right"}),onClick:x,"aria-label":g?"Collapse row":"Expand row","data-open":g,className:"maxio-data-table__expand-button"}),Ke(t.column.columnDef.cell,t.getContext())))})))},Dt={available:!0},Pt={available:!1,reason:"filtering",message:"Reordering is unavailable while the table is filtered."},$t={available:!1,reason:"grouping",message:"Reordering is unavailable while the table is grouped."},Tt={available:!1,reason:"pagination",message:"Reordering is unavailable while the table is paginated."},Mt=(e=[])=>e.filter(e=>e!==Qa&&e!==Ja),Ot=[],zt=e=>e.subRows,Lt=({pattern:e,size:t="md",SubRowComponent:n,onExpand:i,onSelect:r,onSort:o,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:m,columns:d,actions:u,actionsColumnSize:p,onRowAction:g,enableRowReordering:b=!1,getRowReorderLabel:f,onRowReorder:h,rowReorderMode:E="siblings",getRowId:v,getSubRows:_,state:N,...w})=>{const y=b?void 0:n,I=!b&&s,k=(({columns:e,HeaderControls:t,RowControls:l,RowActions:n,actions:i,actionsColumnSize:r,enableExpanding:o,enableRowSelection:s,enableRowReordering:c})=>x(()=>{const m={id:Qa,size:s&&c?72:40,header:e=>a.createElement(t,ca({},e,{enableExpanding:o,enableRowSelection:s,enableRowReordering:c})),cell:e=>a.createElement(l,ca({},e,{enableExpanding:o,enableRowSelection:s,enableRowReordering:c})),meta:{controls:!0,width:(s&&c?72:40)+"px"}},d=i&&n?{id:Ja,size:r??40,header:"",cell:e=>a.createElement(n,null,i(e.row,e.table)),meta:{actions:!0}}:null;let u=[...e];return(s||c)&&(u=[m,...u]),d&&(u=[...u,d]),u},[i,r,n,o,s,c,e,t,l]))({columns:d,HeaderControls:wt,RowControls:kt,RowActions:Ct,actions:u,actionsColumnSize:p,enableRowSelection:c,enableRowReordering:b,enableExpanding:Boolean(m)}),C=qe({state:{...N,...b&&{sorting:Ot},columnPinning:{left:[...c||b?[Qa]:[],...Mt(N?.columnPinning?.left)],right:[...Mt(N?.columnPinning?.right),...u?[Ja]:[]]}},getCoreRowModel:Ye(),enableRowSelection:c,enableExpanding:Boolean(m),...!w.manualExpanding&&{getExpandedRowModel:Ze()},...!w.manualSorting&&!b&&{getSortedRowModel:Ge()},columns:k,getRowId:v,...w,getSubRows:b?zt:_??zt,enableSorting:I,...b&&{getSortedRowModel:void 0}}),R=C.getCanSomeRowsExpand(),S=C.getState(),D=(({columnFilters:e,globalFilter:a,grouping:t,hasPagination:l})=>e.length>0||null!=a&&""!==a?Pt:t.length>0?$t:l?Tt:Dt)({columnFilters:S.columnFilters,globalFilter:S.globalFilter,grouping:S.grouping,hasPagination:Boolean(w.getPaginationRowModel||w.manualPagination)});l(()=>{i?.(S.expanded)},[i,S.expanded]),l(()=>{r?.(S.rowSelection)},[r,S.rowSelection]),l(()=>{b||o?.(S.sorting)},[b,o,S.sorting]);const P=a.createElement(et,{pattern:e,size:t,isExpandable:R,isUsingCustomRow:Boolean(y)},a.createElement(at,null,C.getHeaderGroups().map(e=>a.createElement(bt,{key:e.id,table:C,isHeader:!0},e.headers.map(e=>a.createElement(lt,{key:e.id,table:C,header:e,enableExpanding:m},Ke(e.column.columnDef.header,e.getContext())))))),a.createElement(tt,null,C.getRowModel().rows.map(t=>a.createElement(St,{key:t.id,row:t,pattern:e,SubRowComponent:y,enableExpanding:m,onRowAction:g}))));return b&&v&&h?a.createElement(gt,{availability:D,data:w.data,enableExpanding:Boolean(m),getRowReorderLabel:f,onRowReorder:h,rowReorderMode:E,table:C},P):P},At={sm:"h3",md:"h2",lg:"h1"},Bt=({children:e,size:t="sm",className:l,...n})=>{const i=At[t],r=b(`maxio-heading-${t}`,l);return a.createElement(i,ca({className:r},n),e)},Ft=({open:e,onOpenChange:t,placement:l="right",backdrop:n="dim",size:i="md",className:r,title:o,description:s,children:c,footer:m})=>{const d=a.useId(),u={"data-placement":l,"data-size":i};return a.createElement(W,{isOpen:e,onOpenChange:t,isDismissable:!0,className:b("maxio-drawer__backdrop",{"maxio-drawer__backdrop--dim":"dim"===n})},a.createElement(H,ca({className:b("maxio-drawer",r)},u),a.createElement(j,{className:"maxio-drawer__dialog","aria-labelledby":d},({close:e})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-drawer__header"},a.createElement("div",{className:"maxio-drawer__title-group"},a.createElement(Bt,{id:d,size:"md",className:"maxio-drawer__title"},o),s&&a.createElement("p",{className:"maxio-drawer__description"},s)),a.createElement(Na,{"aria-label":"Close",onClick:e,icon:a.createElement(pa,{variant:"cross"}),variant:"ghost",size:"sm",className:"maxio-drawer__close"})),a.createElement("div",{className:"maxio-drawer__body"},c),null!=m&&a.createElement("div",{className:"maxio-drawer__footer"},m)))))},Vt=({as:e="div",children:t,compact:l=!1,size:n="md",className:i,...r})=>{const o=e,s=b({[`maxio-body-${n}`]:!l,[`maxio-body-${n}-compact`]:l},i);return a.createElement(o,ca({className:s},r),t)},Wt=({as:e="div",children:t,size:l="md",className:n,...i})=>{const r=e,o=b(`maxio-display-${l}`,n);return a.createElement(r,ca({className:o},i),t)},Ht=({as:e="div",children:t,className:l,...n})=>{const i=e,r=b("maxio-code",l);return a.createElement(i,ca({className:r},n),t)},jt=({as:e="div",children:t,size:l="sm",className:n,...i})=>{const r=e,o=b(`maxio-label-${l}`,n);return a.createElement(r,ca({className:o},i),t)},Ut=({basis:e,flex:t,flexDirection:l,wrap:n,grow:i,shrink:r,gap:o,gapX:s,gapY:c,className:m,children:d,alignItems:u,justifyContent:p,...x})=>{const g=b("maxio-flex",{[`maxio-flex-${t}`]:t,[`maxio-basis-${e}`]:void 0!==e,[`maxio-flex-${l}`]:l,[`maxio-flex-${n}`]:n,"maxio-grow":i,"maxio-grow-0":!1===i,"maxio-shrink":r,"maxio-shrink-0":!1===r,[`maxio-gap-${o}`]:void 0!==o,[`maxio-gap-x-${s}`]:void 0!==s,[`maxio-gap-y-${c}`]:void 0!==c,[`maxio-items-${u}`]:u,[`maxio-justify-${p}`]:p},m);return a.createElement("div",ca({className:g},x),d)},Kt=({hasActiveFilters:e=!1,title:t,headingLevel:l="h2",description:n,actions:i,className:r,...o})=>{const s=b("maxio-empty-state",r),c=l,m=!t&&!n?e?"We couldn't find any items matching your criteria. Try adjusting your search or filters to see more results.":"There is no data to display yet.":n;return a.createElement("div",ca({className:s},o),a.createElement(Ut,{flexDirection:"col",alignItems:"center",gap:4,className:"maxio-empty-state__content"},a.createElement(Ut,{flexDirection:"col",alignItems:"center",gap:2,className:"maxio-empty-state__copy"},t&&a.createElement(c,{className:"maxio-heading-lg"},t),m&&a.createElement(Vt,{size:"sm",className:"maxio-empty-state__description"},m)),i&&a.createElement(Ut,{alignItems:"center",gap:2},i)))},qt=({className:e,children:t,items:l,render:n,renderEmptyState:i,isLoading:r=!1,onLoadMore:o,scrollOffset:s,showSelectAll:c=!1,...m})=>a.createElement(U,ca({},m,{items:l,renderEmptyState:r?void 0:i,className:K(e,e=>b("maxio-listbox",e)),render:(e,t)=>{const{selectionManager:l}=t.state,i=n?n(e,t):a.createElement("div",e);if("multiple"!==l.selectionMode||!c)return i;if(0===[...l.collection.getKeys()].filter(e=>{const a=l.collection.getItem(e);return"item"===a?.type&&l.canSelectItem(e)}).length)return i;const r=l.isSelectAll,o=r&&l.disallowEmptySelection;return a.createElement("div",null,a.createElement("div",{className:"maxio-listbox__select-all"},a.createElement(_a,{type:"button",variant:"ghost",trailingElement:a.createElement(pa,{variant:r?"check":""}),fullWidth:!0,"aria-pressed":r,disabled:o,onClick:()=>l.toggleSelectAll()},"Select all")),i)}}),o||r?a.createElement(a.Fragment,null,a.createElement(q,{items:l,dependencies:m.dependencies},t),a.createElement(G,{className:"maxio-listbox__load-more",isLoading:r,onLoadMore:r?void 0:o,scrollOffset:s},a.createElement(ha,null))):t);qt.displayName="ListBox";const Gt=({className:e,...t})=>{const l=t.textValue||("string"==typeof t.children?t.children:void 0);return a.createElement(X,ca({},t,{textValue:l,className:b("maxio-listbox__item",e)}),K(t.children,(e,{isSelected:t})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-listbox__content"},"string"==typeof e?a.createElement(Vt,{size:"sm"},e):e),t&&a.createElement(pa,{variant:"check"}))))};Gt.displayName="ListBox.Item";const Zt=({className:e,...t})=>a.createElement(Y,ca({},t,{className:b("maxio-listbox__section",e)}));Zt.displayName="ListBox.Section";const Yt=({className:e,...t})=>a.createElement(Z,ca({},t,{className:b("maxio-listbox__header",e)}));Yt.displayName="ListBox.Header";const Xt=Object.assign(qt,{Item:Gt,Section:Zt,Header:Yt}),Qt=({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:r,errorMessage:o,leadingElement:s=null,fullWidth:c,className:m,placeholder:d,renderEmptyState:u,isLoading:p=!1,onLoadMore:x,scrollOffset:g,allowsEmptyCollection:f=Boolean(p||x||u),selectionMode:h,children:E,...v})=>{const _=a.useRef(null),N=a.useRef(null),[w,y]=a.useState(),[I,k]=a.useState(0),C=!!o,R=t||C,S=E,D=a.useCallback(()=>{const e=_.current;if(!e)return;const a=N.current,t=a?a.getBoundingClientRect().left-e.getBoundingClientRect().left:0;k(e=>e===-t?e:-t),y(a=>{const t=`${e.offsetWidth}px`;return a?.["--trigger-width"]===t?a:{"--trigger-width":t}})},[]);a.useEffect(()=>{const e=_.current;if(!e)return;if(D(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(D);return a.observe(e),()=>a.disconnect()},[D]);const P=b("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":R,"maxio-text-field--readonly":l,"maxio-text-field--full-width":c},m);return a.createElement(Q,ca({},v,{isDisabled:e,isInvalid:R,isReadOnly:l,selectionMode:h,allowsEmptyCollection:f,className:P}),i&&a.createElement(J,{className:"maxio-text-field__label"},i),a.createElement("div",{ref:_,className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(ee,{ref:N,className:"maxio-text-field__input",placeholder:d}),a.createElement("div",{className:"maxio-text-field__trailing-element"},a.createElement(V,{className:b("maxio-button","maxio-button--ghost","maxio-button--icon","maxio-button--sm")},a.createElement(pa,{variant:"chevron-up-down"})))),r&&!C&&a.createElement(ae,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),o&&a.createElement(te,{className:"maxio-form-error"},e=>a.createElement(a.Fragment,null,a.createElement(pa,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},"function"==typeof o?o(e):o))),a.createElement(yt,{hideArrow:!0,className:"maxio-combobox__popover",crossOffset:I,style:w},a.createElement(Xt,{items:v.items??v.defaultItems,renderEmptyState:u,isLoading:p,onLoadMore:x,scrollOffset:g},S)))};Qt.displayName="ComboBox";const Jt=e=>a.createElement(Xt.Item,e);Jt.displayName="ComboBox.Item";const el=e=>a.createElement(Xt.Section,e);el.displayName="ComboBox.Section";const al=e=>a.createElement(Xt.Header,e);al.displayName="ComboBox.Header";const tl=Object.assign(Qt,{Item:Jt,Section:el,Header:al}),ll=c({}),nl=({indent:e=!1,disabled:l=!1,invalid:n=!1,label:i,...r})=>{const o=t(null),s=m(ll),{inputProps:c,isDisabled:d}=C({...r,value:(r.value||"").toString(),"aria-label":r["aria-label"]||i,isDisabled:l},s,o),u=b("maxio-radio",{"maxio-radio--indent":e,"maxio-radio--disabled":d||s.isDisabled,"maxio-radio--error":n||s.isInvalid});return a.createElement("label",{className:u},a.createElement("input",ca({ref:o,role:"radio",type:"radio",className:"maxio-radio__input"},c,{name:s.name||c.name})),a.createElement("span",{className:"maxio-radio__control"}),a.createElement("span",{className:"maxio-radio__label"},i))},il=({children:e,label:t,errorMessage:l,helperText:n,disabled:i=!1,invalid:r=!1,name:o,defaultValue:s,...c})=>{const m=la({isDisabled:i,isInvalid:r,description:n,name:o,label:t,errorMessage:l,defaultValue:s,...c}),{radioGroupProps:d,labelProps:u,descriptionProps:p,errorMessageProps:x}=R({"aria-label":c["aria-label"]||t,...c},m);return a.createElement(a.Fragment,null,a.createElement("div",ca({className:"maxio-radio-group"},d),t&&a.createElement("label",ca({className:"maxio-radio-group__label"},u),t),a.createElement(ll.Provider,{value:m},e),r&&l&&a.createElement(_t,x,l),n&&!r&&a.createElement(vt,p,n)))},rl=i(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:r,errorMessage:o,leadingElement:s=a.createElement(pa,{variant:"search"}),clearButtonLabel:c="Clear search",fullWidth:m,className:d,...u},p)=>{const x=b("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":t,"maxio-text-field--readonly":l,"maxio-text-field--full-width":m},d);return a.createElement(le,ca({},u,{isDisabled:e,isReadOnly:l,isInvalid:t,className:x}),i&&a.createElement(J,{className:"maxio-text-field__label"},i),a.createElement("div",{className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(ee,{ref:p,className:"maxio-text-field__input"}),a.createElement("div",{className:"maxio-text-field__trailing-element maxio-search-field__clear-button"},a.createElement(V,{"aria-label":c,className:"maxio-button maxio-button--icon maxio-button--sm maxio-button--ghost"},a.createElement(pa,{variant:"cross",className:"maxio-button__trailing-element"})))),r&&!(t&&o)&&a.createElement(ae,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),o&&a.createElement(te,{className:"maxio-form-error"},a.createElement(pa,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},o)))});rl.displayName="SearchField";const ol=i(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:r,errorMessage:o,leadingElement:s=null,trailingElement:c=null,fullWidth:m,className:d,...u},p)=>{const x=b("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":t,"maxio-text-field--readonly":l,"maxio-text-field--full-width":m},d);return a.createElement(ne,ca({},u,{isDisabled:e,isReadOnly:l,isInvalid:t,className:x}),i&&a.createElement(J,{className:"maxio-text-field__label"},i),a.createElement("div",{className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(ee,{ref:p,className:"maxio-text-field__input"}),c&&a.createElement("div",{className:"maxio-text-field__trailing-element"},c)),r&&!(t&&o)&&a.createElement(ae,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),o&&a.createElement(te,{className:"maxio-form-error"},a.createElement(pa,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},o)))});ol.displayName="TextField";const sl=i(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:r,errorMessage:o,leadingElement:s=null,trailingElement:c=null,showStepper:m=!1,fullWidth:d,className:u,...p},x)=>{const g=b("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":t,"maxio-text-field--readonly":l,"maxio-text-field--full-width":d},u);return a.createElement(ie,ca({},p,{isDisabled:e,isReadOnly:l,isInvalid:t,className:g}),i&&a.createElement(J,{className:"maxio-text-field__label"},i),a.createElement("div",{className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(ee,{ref:x,className:"maxio-text-field__input"}),c&&a.createElement("div",{className:"maxio-text-field__trailing-element"},c),m&&a.createElement("div",{className:"maxio-text-field__trailing-element maxio-number-field__stepper"},a.createElement(V,{slot:"decrement","aria-label":"Decrement",className:"maxio-button maxio-button--icon maxio-button--sm maxio-button--ghost"},a.createElement(pa,{variant:"minus",size:"xs",className:"maxio-button__trailing-element"})),a.createElement(re,{orientation:"vertical",className:"maxio-number-field__stepper-separator"}),a.createElement(V,{slot:"increment","aria-label":"Increment",className:"maxio-button maxio-button--icon maxio-button--sm maxio-button--ghost"},a.createElement(pa,{variant:"plus",size:"xs",className:"maxio-button__trailing-element"})))),r&&!(t&&o)&&a.createElement(ae,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),o&&a.createElement(te,{className:"maxio-form-error"},a.createElement(pa,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},o)))});sl.displayName="NumberField";const cl=i(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:r,errorMessage:o,fullWidth:s,className:c,...m},d)=>{const u=b("maxio-text-area",`maxio-text-area--${n}`,{"maxio-text-area--disabled":e,"maxio-text-area--error":t,"maxio-text-area--readonly":l,"maxio-text-area--full-width":s},c);return a.createElement(ne,ca({},m,{isDisabled:e,isReadOnly:l,isInvalid:t,className:u}),i&&a.createElement(J,{className:"maxio-form-label"},i),a.createElement(oe,{ref:d,className:"maxio-text-area__input"}),r&&!(t&&o)&&a.createElement(ae,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),o&&a.createElement(te,{className:"maxio-form-error"},a.createElement(pa,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},o)))});cl.displayName="TextArea";const ml=i(({disabled:e=!1,invalid:n=!1,readOnly:i=!1,size:r="md",label:o,helperText:s,showErrorMessage:c=!0,errorMessage:m,leadingElement:d=null,trailingElement:u=null,fullWidth:p,className:x,...f},h)=>{const E=t(null);g(h,()=>E.current),l(()=>{console.warn("TextInput is deprecated. Please use TextField instead.")},[]);const{spellCheck:v,..._}=f,N={..._,label:o,description:s,errorMessage:m,defaultValue:f.defaultValue?.toString(),value:f.value?.toString(),isDisabled:e,isReadOnly:i,isInvalid:n},{labelProps:w,inputProps:y,descriptionProps:I,errorMessageProps:k}=S(N,E),C=b("maxio-text-field",`maxio-text-field--${r}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":n,"maxio-text-field--readonly":i,"maxio-text-field--full-width":p},x),R=n&&m&&c;return a.createElement("div",{className:C},o&&a.createElement("label",ca({className:"maxio-text-field__label"},w),o),a.createElement("div",{className:"maxio-text-field__items"},d&&a.createElement("div",{className:"maxio-text-field__leading-element"},d),a.createElement("input",ca({ref:E,type:"text",className:"maxio-text-field__input"},y,{spellCheck:v})),u&&a.createElement("div",{className:"maxio-text-field__trailing-element"},u)),s&&!R&&a.createElement("div",ca({className:"maxio-form-helper-text"},I),s),R&&a.createElement(_t,k,m))});ml.displayName="TextInput";const dl=({options:e,label:t,size:l="md",inline:n=!1,disabled:i=!1,helperText:r,errorMessage:o,fullWidth:s=!1,...c})=>{const m=b("maxio-select",`maxio-select--${l}`,{"maxio-select--disabled":i,"maxio-select--inline":n,"maxio-select--error":!!o,"maxio-select--full-width":s}),d=f();return a.createElement("div",{className:m},t&&a.createElement("label",{htmlFor:d,className:"maxio-select__label"},t),a.createElement("div",{className:"maxio-select__input-container"},a.createElement("select",ca({id:d,className:"maxio-select__input",disabled:i},c),e.map(e=>a.createElement("option",{key:`option-${e.value}`,value:e.value,disabled:e.disabled},e.label))),a.createElement(pa,{variant:"chevron-up-down"})),!!o&&a.createElement(_t,null,o),r&&!o&&a.createElement("div",{className:"maxio-form-helper-text"},r))},ul=({slot:e,displayValue:t})=>{const l=a.createElement(se,{slot:e,className:"maxio-date-field__input"},e=>a.createElement(ce,{segment:e,className:"maxio-date-field__segment"}));return null==t?l:a.createElement("div",{className:"maxio-date-field__endpoint"},a.createElement("div",{hidden:!0},l),a.createElement("span",{className:"maxio-date-field__endpoint-value"},t))},pl=({label:e,description:t,errorMessage:l,className:n,...i})=>a.createElement(me,ca({},i,{className:K(n,(e,a)=>b("maxio-text-field","maxio-date-field",{"maxio-text-field--disabled":a.isDisabled,"maxio-text-field--error":a.isInvalid,"maxio-text-field--readonly":a.isReadOnly},e))}),null!=e&&a.createElement(J,{className:"maxio-text-field__label"},e),a.createElement("div",{className:"maxio-text-field__items"},a.createElement("div",{className:"maxio-text-field__input"},a.createElement(ul,null))),null!=t&&a.createElement(ae,{slot:"description",className:"maxio-form-helper-text"},t),a.createElement(te,{className:"maxio-form-error"},l)),xl=({className:e,errorMessage:t,...l})=>a.createElement(de,ca({},l,{visibleDuration:{months:1},className:K(e,e=>b("maxio-calendar",e))}),a.createElement("header",{className:"maxio-calendar__header"},a.createElement(ue,{className:"maxio-calendar__heading"}),a.createElement(V,{slot:"previous",className:"maxio-button maxio-button--ghost maxio-button--icon"},a.createElement(pa,{variant:"chevron-left"})),a.createElement(V,{slot:"next",className:"maxio-button maxio-button--ghost maxio-button--icon"},a.createElement(pa,{variant:"chevron-right"}))),a.createElement(pe,{className:"maxio-calendar__grid"},a.createElement(xe,null,e=>a.createElement(ge,{className:"maxio-calendar__weekday"},e)),a.createElement(be,null,e=>a.createElement(fe,{date:e,className:"maxio-calendar__cell"}))),t&&a.createElement(ae,{slot:"errorMessage",className:"maxio-calendar__error"},t)),gl=({presets:e,label:t="Presets",isDisabled:l,isPresetDisabled:n,onSelect:i})=>e?.length?a.createElement(he,{"aria-label":t,className:"maxio-date-field__presets"},e.map((e,t)=>a.createElement(V,{key:t,className:"maxio-button maxio-button--ghost",isDisabled:l||e.isDisabled||null!==e.value&&n(e.value),onPress:()=>i(e.value)},e.label))):null,bl=(e,a)=>!!(a.minValue&&e.compare(a.minValue)<0||a.maxValue&&e.compare(a.maxValue)>0||a.isDateUnavailable?.(e)),fl=({label:e,description:t,errorMessage:l,className:n,presets:i,presetsLabel:r,...o})=>{const s=i?.find(e=>null===e.value)?.label;return a.createElement(Ee,ca({},o,{className:K(n,(e,a)=>b("maxio-text-field","maxio-date-field",{"maxio-text-field--disabled":a.isDisabled,"maxio-text-field--error":a.isInvalid,"maxio-text-field--readonly":a.isReadOnly},e))}),({state:n,isDisabled:c,isReadOnly:m})=>a.createElement(a.Fragment,null,null!=e&&a.createElement(J,{className:"maxio-text-field__label"},e),a.createElement(he,{className:"maxio-text-field__items"},a.createElement("div",{className:"maxio-text-field__input"},a.createElement(ul,{displayValue:null===n.value?s:void 0})),a.createElement("div",{className:"maxio-text-field__trailing-element"},a.createElement(V,{className:"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon"},a.createElement(pa,{variant:"calendar"})))),null!=t&&a.createElement(ae,{slot:"description",className:"maxio-form-helper-text"},t),a.createElement(te,{className:"maxio-form-error"},l),a.createElement(yt,{hideArrow:!0,className:"maxio-date-field__popover"},a.createElement(j,{className:"maxio-date-field__dialog"},a.createElement(xl,null),a.createElement(gl,{presets:i,label:r,isDisabled:c||m,isPresetDisabled:e=>bl(e,o),onSelect:e=>{n.setValue(e),n.setOpen(!1)}})))))},hl=({className:e,errorMessage:t,...l})=>{const{direction:n}=ve();return a.createElement(_e,ca({},l,{visibleDuration:{months:1},className:K(e,e=>b("maxio-calendar","maxio-calendar--range",e))}),a.createElement("header",{className:"maxio-calendar__header"},a.createElement(ue,{className:"maxio-calendar__heading"}),a.createElement(V,{slot:"previous",className:"maxio-button maxio-button--ghost maxio-button--icon"},a.createElement(pa,{variant:"rtl"===n?"chevron-right":"chevron-left"})),a.createElement(V,{slot:"next",className:"maxio-button maxio-button--ghost maxio-button--icon"},a.createElement(pa,{variant:"rtl"===n?"chevron-left":"chevron-right"}))),a.createElement(pe,{className:"maxio-calendar__grid"},a.createElement(xe,null,e=>a.createElement(ge,{className:"maxio-calendar__weekday"},e)),a.createElement(be,null,e=>a.createElement(fe,{date:e,className:"maxio-calendar__cell"}))),t&&a.createElement(ae,{slot:"errorMessage",className:"maxio-calendar__error"},t))},El=(e,a)=>null==e?null==a:null!=a&&0===e.compare(a),vl=({label:e,description:t,errorMessage:l,className:n,presets:i,presetsLabel:r,...o})=>a.createElement(Ne,ca({},o,{className:K(n,(e,a)=>b("maxio-text-field","maxio-date-field",{"maxio-text-field--disabled":a.isDisabled,"maxio-text-field--error":a.isInvalid,"maxio-text-field--readonly":a.isReadOnly},e))}),({state:n,isDisabled:s,isReadOnly:c})=>{const m=((e,a)=>{if(null==e?.start||null==e?.end)return a?.find(a=>El(a.value?.start,e?.start)&&El(a.value?.end,e?.end))?.label})(n.value,i);return a.createElement(a.Fragment,null,null!=e&&a.createElement(J,{className:"maxio-text-field__label"},e),a.createElement(he,{className:"maxio-text-field__items"},a.createElement("div",{className:"maxio-text-field__input"},a.createElement(ul,{slot:"start",displayValue:null==n.value?.start?m:void 0}),a.createElement("span",{"aria-hidden":"true",className:"maxio-body-sm"},"→"),a.createElement(ul,{slot:"end",displayValue:null==n.value?.end?m:void 0})),a.createElement("div",{className:"maxio-text-field__trailing-element"},a.createElement(V,{className:"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon"},a.createElement(pa,{variant:"calendar"})))),null!=t&&a.createElement(ae,{slot:"description",className:"maxio-form-helper-text"},t),a.createElement(te,{className:"maxio-form-error"},l),a.createElement(yt,{hideArrow:!0,className:"maxio-date-field__popover"},a.createElement(j,{className:"maxio-date-field__dialog"},a.createElement(hl,null),a.createElement(gl,{presets:i,label:r,isDisabled:s||c,isPresetDisabled:e=>((e,a)=>{const t=e.start?ta(e.start):null,l={...a,isDateUnavailable:e=>a.isDateUnavailable?.(e,t)??!1};if(null!=e.start&&null!=e.end&&e.start.compare(e.end)>0||null!=e.start&&bl(e.start,{...a,isDateUnavailable:e=>a.isDateUnavailable?.(e,null)??!1})||null!=e.end&&bl(e.end,l))return!0;if(e.start&&e.end&&a.isDateUnavailable&&!a.allowsNonContiguousRanges){const l=ta(e.end);for(let n=ta(e.start).add({days:1});n.compare(l)<0;n=n.add({days:1}))if(a.isDateUnavailable(n,t))return!0}return!1})(e,o),onSelect:e=>((e,a)=>{!a||null!=a.start&&null!=a.end?a?.start&&a.end?e.setValue({start:a.start,end:a.end}):e.setValue(null):(e.setValue(null),e.setDateTime("start",a.start),e.setDateTime("end",a.end)),e.setOpen(!1)})(n,e)}))))}),_l=({size:e="md",onChange:t,totalItems:i=0,itemsPerPage:r=30,currentPage:o=1,pageSizeOptions:s,manualPageInput:c=!1})=>{const[m,d]=n(o),[u,p]=n(r),[x,g]=n(o.toString());l(()=>{g(m.toString())},[m]);const b=Math.ceil(i/u),f=m<b,h=m>1,E=u*(m-1)+1,v=Math.min(u*m,i),_=s.map(e=>({label:e.toString(),value:e.toString()})),N=Array.from({length:b},(e,a)=>a+1).map(e=>({label:e.toString(),value:e.toString()})),w=e=>{d(e),t?.({currentPage:e,itemsPerPage:u})},y=e=>{const a=parseInt(e,10);if(isNaN(a))return void g(m.toString());const t=Math.max(1,Math.min(a,b));g(t.toString()),w(t)};return a.createElement("div",{className:"maxio-pagination"},a.createElement("div",{className:"maxio-pagination__items-per-page"},a.createElement("label",{htmlFor:"items-per-page-large",className:"maxio-pagination__label"},"Items per page"),a.createElement(dl,{inline:!0,size:e,options:_,onChange:e=>{return a=Number(e.target.value),p(a),d(1),void t?.({currentPage:1,itemsPerPage:a});var a},value:u,id:"items-per-page-large"})),a.createElement("div",{className:"maxio-pagination__total-items"},a.createElement("span",null,E,"–",v," of ",i," items")),a.createElement("div",{className:"maxio-pagination__current-page"},c?a.createElement(ml,{className:"maxio-pagination__page-input",value:x,min:1,max:b,onChange:e=>(e=>{g(e)})(e),onBlur:e=>{y(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(y(e.currentTarget.value),e.currentTarget.blur())},"aria-label":"Page number",size:e,type:"number",onWheel:e=>e.preventDefault()}):a.createElement(dl,{inline:!0,size:e,"aria-label":"Select page",onChange:e=>w(Number(e.target.value)),value:m,options:N,id:"page-index-large"}),a.createElement("div",{className:"maxio-pagination__label"},"of ",b," pages")),a.createElement("div",{className:"maxio-pagination__controls"},a.createElement(qa,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},a.createElement(Na,{icon:a.createElement(pa,{variant:"chevron-left"}),size:e,variant:"ghost",onClick:()=>w(m-1),"aria-label":"Previous",disabled:!h})),a.createElement(qa,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},a.createElement(Na,{icon:a.createElement(pa,{variant:"chevron-right"}),size:e,variant:"ghost",onClick:()=>w(m+1),"aria-label":"Next",disabled:!f}))))},Nl=({label:e,helperText:t,size:l="md",variant:n="default",status:i,value:r,maxValue:o=100})=>{const s=f(),c=f(),m=i&&!!e&&!!r&&!("inline"===n),d=t&&!("inline"===n),u=t&&"inline"===n,{progressBarProps:p,labelProps:x}=D({maxValue:o,value:r,label:e}),g=b("maxio-progress-bar",{"maxio-progress-bar--lg":"lg"===l,"maxio-progress-bar--success":r&&!("inline"===n)&&"success"===i,"maxio-progress-bar--error":r&&!("inline"===n)&&"error"===i,"maxio-progress-bar--indent":"indent"===n,"maxio-progress-bar--inline":"inline"===n,"maxio-progress-bar--indeterminate":void 0===r});return a.createElement("div",ca({className:g},p),a.createElement("div",ca({id:s,className:"maxio-progress-bar__label"},x),e),u&&a.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t),a.createElement("div",{className:"maxio-progress-bar__track"},a.createElement("div",{className:"maxio-progress-bar__progress",style:{"--tw-scale-x":`${r}%`}})),m&&a.createElement("div",{className:`maxio-progress-bar__${i}-icon`}),d&&a.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t))},wl=({className:e,size:t="md",fullWidth:l=!1,selectionMode:n="single",orientation:i="horizontal",disallowEmptySelection:r=!0,...o})=>a.createElement(we,ca({},o,{selectionMode:n,orientation:i,disallowEmptySelection:r,className:K(e,e=>b("maxio-segmented-control",`maxio-segmented-control--${t}`,{"maxio-segmented-control--full-width":l},e))}));wl.displayName="SegmentedControl";const yl=({className:e,children:t,...l})=>a.createElement(ye,ca({},l,{className:K(e,e=>b("maxio-segmented-control__item",e))}),K(t,e=>a.createElement(a.Fragment,null,a.createElement(Ie,{className:"maxio-segmented-control__selection-indicator","data-selected":!0}),e)));yl.displayName="SegmentedControl.Item";const Il=Object.assign(wl,{Item:yl}),kl=({leadingIcon:e,trailingIcon:t,type:l="menu",children:n,leadingIconClassName:i,isTooltipVisible:r=!1})=>a.createElement(a.Fragment,null,e&&a.createElement(qa,{usePortal:!0,isVisible:r,renderContent:()=>n,floatingElementOffset:12},a.createElement("span",{className:"maxio-side-nav__icon"},a.createElement(pa,{variant:e,className:i}))),a.createElement("span",{className:`maxio-side-nav__${l}-title`,"data-testid":"maxio-sidebar-section-name"},n),t&&a.createElement("span",{className:"maxio-side-nav__menu-chevron"},a.createElement(pa,{variant:t}))),Cl=e=>"heading"!==e.type,Rl=e=>{const a=(e=>e.flat().filter(Cl).map(e=>e.items).flat().find(e=>e?.isCurrent))(e);return a?e.map(e=>e.map(e=>Cl(e)&&e.items?.includes(a)?{...e,isOpen:!0}:e)):e},Sl=c({}),Dl=()=>m(Sl),Pl=({children:e,isOpen:i,onChange:r,withIcons:o=!0,sections:s,shouldToggleSidebar:c=!0,topDropdownItems:m,collapseBreakpoint:d=800})=>{const u=t(!1),[p,x]=n(()=>!c||("boolean"==typeof i?i:"undefined"==typeof window||window.innerWidth>d)),[g,b]=n(()=>Rl(s)),{windowWitdh:f}=Ha(200);l(()=>{u.current&&r?.(p)},[p,r]),l(()=>{u.current=!0},[]),l(()=>{!function(e){if(!c)return;e<d&&p&&h()}(f)},[f]),l(()=>{"boolean"==typeof i&&x(i)},[i]);const h=()=>{x(!1)};return a.createElement(Sl.Provider,{value:{sections:g,topDropdownItems:m,onSectionOpen:e=>{b(a=>a.map(a=>a.map(a=>Cl(a)?{...a,isOpen:a?.name===e&&!a.isOpen}:a)))},isOpen:p,onOpen:()=>{x(!0)},onClose:h,withIcons:o,shouldToggleSidebar:c}},e)},$l=()=>{const{onOpen:e,topDropdownItems:l,isOpen:n}=Dl(),{mainItem:i,otherItems:r,actions:o}=l,s=t(null),c=Wa(s),m=({id:e,title:a,icon:t,iconClass:l,url:n,...i})=>({id:e,label:a,leadingIconName:t,leadingIconClassName:l,link:{href:n,...i}}),{items:d,itemsCount:u}=x(()=>({itemsCount:r.length+o.length,items:[...r.map(m),r?.length>0&&o?.length>0?{type:"divider",id:"item-divider"}:null,...o.map(m)].filter(e=>null!=e)}),[o,r]);return a.createElement(a.Fragment,null,0===u?a.createElement("a",{className:"maxio-side-nav__menu-button maxio-side-nav__menu-button--large",href:i.url,onClick:e},a.createElement("span",{className:"maxio-side-nav__menu-title"},i.title)):a.createElement("details",{className:"maxio-action-menu maxio-side-nav--action-menu"},a.createElement("summary",{onClick:e,className:"maxio-side-nav__menu-button","aria-haspopup":"true",ref:s},i.url?a.createElement(a.Fragment,null,a.createElement(kl,{type:"menu",isTooltipVisible:!n&&c,leadingIcon:i.icon,trailingIcon:"chevron-up-down",leadingIconClassName:i.iconClass},i.title)):a.createElement(kl,{type:"menu",trailingIcon:"chevron-up-down"},i.title)),a.createElement(ba,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:d,small:!0})))},Tl=({section:e})=>{const{isOpen:l,withIcons:n}=Dl(),i=t(null),r=Wa(i);return a.createElement("li",{className:"maxio-side-nav__item","data-key":e.key,"data-testid":"maxio-sidebar-section"},a.createElement("a",{className:"maxio-side-nav__link","aria-current":e.isCurrent?"page":void 0,role:"button",href:e.href,ref:i},a.createElement(kl,{isTooltipVisible:r&&!l,type:"menu",leadingIcon:n?e.icon:void 0},e.name)))},Ml=({section:e})=>{const{onOpen:l,onSectionOpen:n,isOpen:i,withIcons:r}=Dl(),o=t(null),s=Wa(o);if(!Cl(e))return a.createElement("li",{className:"maxio-side-nav__item-header"},e.title);return e.Component?a.createElement(e.Component,{section:e}):e.href?a.createElement(Tl,{section:e}):a.createElement("li",{className:b("maxio-side-nav__item",{"maxio-side-nav__item--icon":r}),"data-testid":"maxio-sidebar-section"},a.createElement("button",{className:"maxio-side-nav__menu-button",ref:o,"aria-expanded":e.isOpen?"true":"false",type:"button",onClick:()=>{n(e.name),l()}},a.createElement(kl,{type:"menu",isTooltipVisible:!i&&s,leadingIcon:r?e.icon:void 0,trailingIcon:e.items?.length?"chevron-down":void 0},e.name)),a.createElement("ul",{className:"maxio-side-nav__menu"},e.items?.map(e=>a.createElement("li",{key:`section-sub-item-${e.name}`,className:"maxio-side-nav__item","data-testid":"maxio-section-item"},a.createElement("a",{className:"maxio-side-nav__link",href:e.href,"aria-current":e.isCurrent?"page":void 0},a.createElement("span",{className:"maxio-side-nav__link-title"},e.name))))))},Ol=()=>{const{sections:e}=Dl();return a.createElement(a.Fragment,null,e.map((e,t)=>a.createElement("ul",{role:"list",className:"maxio-side-nav__items",key:`section-list-${t}`},e.map((e,l)=>a.createElement(Ml,{key:`section-list-item-${e.type}-${t}-${l}`,section:e})))))},zl=()=>{const{onClose:e,shouldToggleSidebar:t}=Dl();return a.createElement("div",{className:"maxio-side-nav__logo-container"},a.createElement("a",{className:"maxio-side-nav__brand",href:"/","aria-label":"Maxio"}),t&&a.createElement("button",{className:"maxio-side-nav__menu-toggle","aria-label":"toggle sidebar",onClick:e},a.createElement(pa,{variant:"sidebar"})))},Ll=()=>{const{isOpen:e}=Dl();return a.createElement("nav",{className:b("maxio-side-nav",{"maxio-side-nav--collapsed":!e})},a.createElement(zl,null),a.createElement($l,null),a.createElement("div",{className:"maxio-side-nav__items-container"},a.createElement(Ol,null)))},Al=({withIcons:e=!0,shouldToggleSidebar:t=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:r,onChange:o})=>a.createElement(Pl,{isOpen:r,onChange:o,collapseBreakpoint:i,withIcons:e,shouldToggleSidebar:t,topDropdownItems:l,sections:n},a.createElement(Ll,null)),Bl=({disabled:e=!1,value:t=0,className:l,id:n,isCurrent:i,...r})=>{const o="icon"===r.type,s=({isSelected:a})=>b("maxio-tabs__tab",l,{"maxio-tabs__tab--active":a,"maxio-tabs__tab--disabled":e,"maxio-tabs__tab--icon":o});if("icon"===r.type){const{icon:l,...n}=r;return a.createElement(ke,ca({id:t,isDisabled:e},n,{className:s}),a.createElement("div",{className:"maxio-tabs__tab__content"},l))}const{children:c,rightIcon:m,...d}=r;return a.createElement(ke,ca({id:t,isDisabled:e},d,{className:s}),a.createElement("div",{className:"maxio-tabs__tab__content"},c,m||null))},Fl=c({variant:"line",withDivider:!1}),Vl=({children:e,variant:t="line",withDivider:l=!1})=>a.createElement(Fl.Provider,{value:{variant:t,withDivider:l}},e),Wl=({children:e,variant:t="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:r})=>a.createElement(Ce,{className:"maxio-tabs-container",selectedKey:i,defaultSelectedKey:n,onSelectionChange:e=>r?.(Number(e))},a.createElement(Vl,{variant:t,withDivider:l},e)),Hl=({children:e,value:t,className:l,id:n,...i})=>a.createElement(Re,ca({id:t,className:b("maxio-tabs__panel",l)},i),e),jl=({children:e})=>{const t=d.map(e,(e,a)=>{if(!o(e)||e.type!==Hl)throw new Error("You can only pass <TabPanel /> component as children");return r(e,{key:a,value:a})});return a.createElement(Se,{className:"maxio-tabs__panels"},t)},Ul=({children:e,className:l,ariaLabel:i,overflow:c="none",moreLabel:p="More",...x})=>{const{variant:g,withDivider:f}=m(Fl),h=m(De),E=s(),[v,_]=n(!1),N=b("maxio-tabs",l,{"maxio-tabs--contained":"contained"===g,"maxio-tabs--divider":f}),w=d.map(e,e=>e);(w??[]).forEach(e=>{if(!o(e)||e.type!==Bl)throw new Error("You can only pass <Tab /> component as children")});const y="auto"===c&&!!w?.length,{ref:I,moreButtonRef:k,overflowIndexes:C,handleKeyDownCapture:R}=(({overflowEnabled:e,childrenArray:a})=>{const l=t(null),i=t(null),r=t(null),[o,s]=n(null),c=ja(l),d=m(De),p=null!=d?.selectedKey?Number(d.selectedKey):null,[x,g]=n([]);u(()=>{if(!e||!o)return void g((a??[]).map((e,a)=>a));const{visibleIndexes:t}=((e,a,t,l)=>{const n=e.map((e,a)=>a);if(e.reduce((e,a)=>e+a,0)<=a)return{visibleIndexes:n,overflowIndexes:[]};const i=[];let r=t;for(const t of n){if(r+e[t]>a)break;r+=e[t],i.push(t)}if(null!==l&&!i.includes(l)){for(r+=e[l];r>a&&i.length>0;)r-=e[i.pop()];i.push(l)}i.sort((e,a)=>e-a);const o=n.filter(e=>!i.includes(e));return{visibleIndexes:i,overflowIndexes:o}})(o.tabWidths,c,o.moreButtonWidth,r.current??p);t.length===(a??[]).length&&(r.current=null),g(t)},[e,o,c]),u(()=>{e&&o&&null!==p&&g(e=>(e.includes(p)||(r.current=p),((e,a,t,l,n)=>{if(e.includes(n))return e;const i=[...e,n].sort((e,a)=>e-a);let r=l+i.reduce((e,t)=>e+a[t],0);for(;r>t&&i.length>1;){const e=i.length-1,t=i[e]===n?e-1:e,[l]=i.splice(t,1);r-=a[l]}return i})(e,o.tabWidths,c,o.moreButtonWidth,p)))},[p]);const b=e?(a??[]).map((e,a)=>a).filter(e=>!x.includes(e)):[],f=((e,a)=>e.filter(e=>!a?.[e]?.props.disabled))(x,a);u(()=>{if(!e||!l.current)return void s(e=>null===e?e:null);const t=Array.from(l.current.querySelectorAll('[role="tab"]')),n=i.current?.getBoundingClientRect().width??0;s(e=>{const l=(a??[]).map((a,l)=>{const n=t[l]?.getBoundingClientRect().width??0;return n>0?n:e?.tabWidths[l]??0}),i=n>0?n:e?.moreButtonWidth??0,r=e?.tabWidths.length===l.length&&e.tabWidths.every((e,a)=>e===l[a]);return e&&r&&e.moreButtonWidth===i?e:{tabWidths:l,moreButtonWidth:i}})},[a,e]);const h=e=>{void 0!==e&&(d?.selectionManager.setFocused(!0),d?.selectionManager.setFocusedKey(e),d?.setSelectedKey(e),l.current?.querySelector(`[role="tab"][data-key="${e}"]`)?.focus())};return{ref:l,moreButtonRef:i,visibleIndexes:x,overflowIndexes:b,handleKeyDownCapture:e=>{if(0===b.length)return;const a=document.activeElement===i.current,t=d?.selectionManager.focusedKey,l=a?-1:f.indexOf(Number(t));if(a||-1!==l)switch(e.key){case"ArrowRight":if(a)return;return e.preventDefault(),e.stopPropagation(),void(l<f.length-1?h(f[l+1]):i.current?.focus());case"ArrowLeft":return e.preventDefault(),e.stopPropagation(),void(a?h(f[f.length-1]):l>0&&h(f[l-1]));case"Home":if(a)return;return e.preventDefault(),e.stopPropagation(),void h(f[0]);case"End":if(a)return;return e.preventDefault(),e.stopPropagation(),void h(f[f.length-1])}}}})({overflowEnabled:y,childrenArray:w}),S=a.createElement("span",{className:"maxio-tabs__tab__content"},p,a.createElement(pa,{variant:"chevron-down",className:"maxio-tabs__more__chevron"})),D=C.map(e=>{return`#${a=E,"undefined"!=typeof CSS&&"function"==typeof CSS.escape?CSS.escape(a):a.replace(/[^a-zA-Z0-9_-]/g,"\\$&")} [role="tablist"] > .maxio-tabs__tab:nth-child(${e+1})`;var a});return a.createElement("div",{id:E,className:N,ref:I,onKeyDownCapture:R},D.length>0&&a.createElement("style",null,`${D.join(", ")} { display: none; }`),a.createElement(Pe,ca({"aria-label":i,className:"maxio-contents"},x),(w??[]).map((e,a)=>r(e,{key:a,value:a}))),y&&C.length>0&&a.createElement(A,{isOpen:v,onOpenChange:_},a.createElement(V,{ref:k,className:"maxio-tabs__tab maxio-tabs__more__trigger","aria-label":p},S),v&&a.createElement(yt,{hideArrow:!0,placement:"bottom end",className:"maxio-tabs__more__menu"},a.createElement(B,{"aria-label":`${p} tabs`,onAction:e=>{h?.setSelectedKey(e),requestAnimationFrame(()=>{I.current?.querySelector(`[role="tab"][data-key="${e}"]`)?.focus()})}},C.map(e=>{const t=w[e],{disabled:l,type:n,"aria-label":i,"aria-labelledby":r}=t.props,o="icon"===n?t.props.icon:t.props.children;return a.createElement(F,{key:e,id:e,isDisabled:!!l,"aria-label":i,"aria-labelledby":r,className:"maxio-tabs__more__item"},o)})))))},Kl=({children:e,size:t,sentiment:l,kind:n="primary",leadingIcon:i,trailingIcon:r})=>{const o=b("maxio-tag",`maxio-tag--${n}`,!!l&&`maxio-tag--${l}`,!!t&&`maxio-tag--${t}`);return a.createElement("div",{className:o},i&&a.createElement(pa,{variant:i,className:"maxio-tag__icon"}),a.createElement("span",{className:"maxio-tag__label"},e),r&&a.createElement(pa,{variant:r,className:"maxio-tag__icon"}))},ql=({children:e,className:t,...l})=>a.createElement("div",ca({className:b("maxio-card__header",t)},l),e);ql.displayName="Card.Header";const Gl=({children:e,className:t,...l})=>a.createElement("div",ca({className:b("maxio-card__body",t)},l),e);Gl.displayName="Card.Body";const Zl=({children:e,className:t,...l})=>a.createElement("div",ca({className:b("maxio-card__footer",t)},l),e);Zl.displayName="Card.Footer";const Yl=({children:e,className:t,variant:l="primary",...n})=>a.createElement("div",ca({className:b("maxio-card",`maxio-card--${l}`,t)},n),e);Yl.displayName="Card";const Xl=Object.assign(Yl,{Header:ql,Body:Gl,Footer:Zl}),Ql=({children:e,className:t,href:l,onClick:n,target:i,disabled:r})=>{const o=l||n;if(!o)return a.createElement("div",{className:"maxio-tile"},e);const s=b("maxio-tile",t,{"maxio-tile--clickable":o,"maxio-tile--disabled":r});return a.createElement("a",{className:s,href:l,target:i,onClick:e=>{r&&l&&e.preventDefault(),!r&&n&&n()}},e)};var Jl,en,an,tn;function ln(){return ln=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},ln.apply(null,arguments)}const nn=a=>e.createElement("svg",ln({xmlns:"http://www.w3.org/2000/svg","data-name":"Maxio Logo SVG",viewBox:"0 0 1036 240"},a),Jl||(Jl=e.createElement("path",{d:"M59.32 11.3 70.64 0l40.74 40.35v70.99H40.89L0 70.52l11.15-11.14 36.2 36.15h30.07l3.07-3.39-50.91-51.15 10.99-10.97 51.24 50.83 3.72-3.38V47.13zM180.68 11.3 169.36 0l-40.73 40.35v70.99h70.48L240 70.51l-11.15-11.14-36.2 36.15h-30.06l-3.07-3.39 50.91-51.15-10.99-10.97-51.24 50.83-3.72-3.38V47.12l36.2-35.83ZM59.32 228.7l11.31 11.29 40.74-40.35v-70.99H40.89L0 169.48l11.15 11.14 36.2-36.15h30.07l3.07 3.39-50.92 51.15 10.99 10.97 51.24-50.83 3.72 3.38v30.34zM180.68 228.7l-11.32 11.29-40.73-40.35v-70.99h70.48L240 169.48l-11.15 11.14-36.2-36.15h-30.06l-3.07 3.39 50.91 51.15-10.99 10.97-51.24-50.83-3.72 3.38v30.34zM1015.27 139.55c0-29.94-23.74-53.46-52.11-53.46s-52.11 23.52-52.11 53.46 23.74 53.46 52.11 53.46 52.11-23.52 52.11-53.46m20.32.95c-.5 40.27-32.73 72.76-72.43 72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71 72.44-73.71h.94c39.57.52 71.5 33.32 71.5 73.71v.95Z"})),en||(en=e.createElement("path",{fillRule:"evenodd",d:"M870.39 24h-20.33v20.33h20.33zm0 40.67h-20.33v148.59h20.33z"})),an||(an=e.createElement("path",{fillRule:"evenodd",d:"M850.05 24h20.33v20.33h-20.33zM695.01 82.85l50.83 56.28v6.53l-50.28 55.67 15.23 13.2 49.22-54.49h4.71l49.22 54.49 15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15 55.52h-3.96l-50.15-55.52L695 82.85ZM660.49 78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13 0-52.44 18.93-58.09 44.86l-.28 1.27 19.33 3.72.31-1.14c2.39-8.91 6.66-16.54 13.04-21.94 6.36-5.39 14.91-8.63 26.02-8.63s19.12 3.25 24.76 8.96c5.64 5.72 8.73 14.06 8.73 24.53v6.11L616.62 130l-3.26.68c-16.14 3.47-29.79 7.84-39.59 14.45-10.54 7.11-16.64 16.83-16.64 30.62 0 12.51 4.51 22.62 12.5 29.59 7.96 6.95 19.25 10.67 32.63 10.67 22.27 0 41.87-12.03 51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58Zm-40.09 68.13c-12.86 2.77-23.05 5.42-30.03 9.63-3.46 2.09-6.08 4.54-7.84 7.54s-2.71 6.62-2.71 11.15c0 6.38 2.1 12.12 6.32 16.27 4.22 4.14 10.7 6.82 19.7 6.82 26.85 0 47.46-20.48 47.46-51.36v-7.2l-32.9 7.14Z"})),tn||(tn=e.createElement("path",{d:"M434.8 188.74h4.54l61.73-164.33.15-.41h35.57v189.35H515.9V55.37h-4.33l-59.7 157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98H336V24h35.57z"}))),rn=e=>{const{size:t="sm",className:l,variant:n="lockup",alt:i="maxio logo"}=e,r="mark"===n,o="number"==typeof t;return a.createElement(nn,{role:"img",viewBox:r?"0 0 240 240":"0 0 1036 240","aria-label":i,height:o?t:void 0,className:b("maxio-logo",!o&&`maxio-logo--${t}`,r&&"maxio-logo--mark",l)})},on=({state:e,...l})=>{const n=t(null),{toastProps:i,contentProps:r,titleProps:o,closeButtonProps:s}=oa(l,e,n),{closable:c=!0,underline:m=!0,external:d=!1}=l.toast.content,u=b("maxio-toast",{[`maxio-toast--${l.toast.content.sentiment}`]:l.toast.content.sentiment}),p={default:"info-circle-fill",success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[l.toast.content.sentiment||"default"];return a.createElement("div",ca({className:u,"data-maxio-mode":"dark"},i,{ref:n}),a.createElement(pa,{variant:p,className:"maxio-toast__icon"}),a.createElement("div",ca({className:"maxio-toast__container"},r),a.createElement("div",ca({className:"maxio-toast__content"},o),l.toast.content.title&&a.createElement("span",{className:"maxio-toast__title"},l.toast.content.title),l.toast.content.message&&a.createElement("span",{className:"maxio-toast__message"},l.toast.content.message),l.toast.content.link?.text&&l.toast.content.link?.href&&a.createElement(fa,{href:l.toast.content.link.href,underline:m,external:d},l.toast.content.link.text))),c&&a.createElement(Na,ca({variant:"ghost",icon:a.createElement(pa,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss"},s)))},sn=({state:e,...t})=>{const l=a.useRef(null),{regionProps:n}=sa(t,e,l);return a.createElement("div",ca({},n,{ref:l,className:t.className,style:{display:"flex",flexDirection:"column",gap:"10px"}}),e.visibleToasts.map(t=>a.createElement(on,{key:t.key,toast:t,state:e})))},cn=({children:e,...t})=>{const{maxVisibleToasts:l=5,...n}=t,i=na({maxVisibleToasts:l,...n});return a.useEffect(()=>{console.warn("ToastProvider is deprecated. Please use the global toast API instead.")},[]),a.createElement(a.Fragment,null,e(i),i.visibleToasts.length>0&&a.createElement(sn,ca({},t,{state:i})))},mn=c(null),dn=({children:e,toastQueue:t,...l})=>{const n=ia(t),i=p(()=>{n.visibleToasts.forEach(e=>{t.close(e.key)})},[n.visibleToasts,t]),r=x(()=>({addToast:t.add.bind(t),removeToast:t.clear.bind(t),removeAllToasts:i,state:n}),[t,i,n]);return a.createElement(mn.Provider,{value:r},e,n.visibleToasts.length>0&&a.createElement(sn,ca({},l,{state:n})))},un=()=>{const e=m(mn);if(!e)throw new Error("useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.");return e};class pn extends ra{}const xn=({defaultChecked:e,checked:t,onChange:l,disabled:n,valueDescription:i,valueDescriptionPosition:r,className:o,name:c,id:m,...d})=>{const u=s(),x="boolean"==typeof e,g=m||u,f="left"===r?"row":"row-reverse",h=i&&r,E=p(e=>{if("Enter"===e.code||"Space"===e.code){e.preventDefault();const a=e.currentTarget.checked;x&&(e.currentTarget.checked=!a),l&&l(!a,e)}},[x,l]),v=d["aria-label"]||(h?void 0:i);return a.createElement("div",{className:b("maxio-toggle",o,{"maxio-toggle--disabled":n}),style:{display:"inline-flex",flexDirection:f},"data-testid":"toggle-container"},h?a.createElement("label",{className:"maxio-toggle__label",htmlFor:g},i):null,a.createElement("div",{className:"maxio-toggle__container"},a.createElement("input",{type:"checkbox",defaultChecked:e,checked:t,onChange:e=>{l&&l(e.target.checked,e)},onKeyDown:E,disabled:n,className:"maxio-toggle__checkbox",id:g,name:c,"aria-label":v}),a.createElement("div",{className:"maxio-toggle__track",role:"switch","aria-checked":t,"aria-hidden":"true"},a.createElement("div",{className:"maxio-toggle__handle"}),a.createElement("span",{className:"maxio-toggle__icon"},a.createElement("i",{className:"maxio-toggle__icon-on"})),a.createElement("span",{className:"maxio-toggle__icon"},a.createElement("i",{className:"maxio-toggle__icon-off"})))))},gn=({children:e,actions:t,sideNavIsClosed:l,openSideNav:n})=>a.createElement("nav",{className:"maxio-top-bar"},l&&a.createElement(Na,{"aria-label":"Open Side Navigation",variant:"ghost",icon:a.createElement(pa,{variant:"sidebar"}),onClick:n}),a.createElement(Ut,{grow:!0,justifyContent:"end"},e),t),bn=({...e})=>{const l=t(null),{buttonProps:n}=E(e,l);return a.createElement("button",ca({},n,{className:"maxio-chip__dismiss-button"}),a.createElement(pa,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},fn=({label:e,onDismiss:l,dismissLabel:n,leadingIcon:i,trailingIcon:r,title:o,...s})=>{const c=t(null),m=$e(s),{buttonProps:d}=P(s,m,c),u=b("maxio-chip",{"maxio-chip--selected":m?.isSelected}),p=b("maxio-chip__button",{"maxio-chip--dismissible":l});return a.createElement("div",{className:u},a.createElement("button",ca({className:p,ref:c},d,{title:o}),i&&a.createElement(pa,{variant:i,className:"maxio-chip__icon"}),a.createElement("span",{className:"maxio-chip__label"},e),r&&!l&&a.createElement(pa,{variant:r,className:"maxio-chip__icon"})),l&&a.createElement(bn,{onPress:l,"aria-label":n}))},hn=({children:e,templateColumns:t,templateRows:l,autoColumns:n,autoRows:i,inline:r,column:o,columnStart:s,columnEnd:c,row:m,rowStart:d,rowEnd:u,gap:p,gapX:x,gapY:g,className:f,justifyContent:h,alignItems:E,...v})=>{const _=b(f,{"maxio-grid":!r,"maxio-inline-grid":r,[`maxio-grid-cols-${t}`]:t,[`maxio-grid-rows-${l}`]:l,[`maxio-auto-cols-${n}`]:n,[`maxio-auto-rows-${i}`]:i,["maxio-col-"+("auto"===o?"auto":`span-${o}`)]:o,[`maxio-col-start-${s}`]:s,[`maxio-col-end-${c}`]:c,["maxio-row-"+("auto"===m?"auto":`span-${m}`)]:m,[`maxio-row-start-${d}`]:d,[`maxio-row-end-${u}`]:u,[`maxio-gap-${p}`]:void 0!==p,[`maxio-gap-x-${x}`]:void 0!==x,[`maxio-gap-y-${g}`]:void 0!==g,[`maxio-justify-${h}`]:h,[`maxio-items-${E}`]:E});return a.createElement("div",ca({className:_||void 0},v),e)},En={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"},vn=({children:e,heading:t,description:l,sentiment:n="success",leadingElement:i=null,alert:r,topAddon:o=null,footer:s})=>a.createElement("div",{className:"maxio-auth-layout"},a.createElement(Ut,{alignItems:"center",justifyContent:"between"},a.createElement(rn,{size:"md"}),o),r&&a.createElement(wa,{display:"block",title:r.title,sentiment:r.sentiment},r.children),a.createElement(Xl,{variant:"secondary"},a.createElement(Xl.Body,null,a.createElement(Ut,{flexDirection:"col",gap:6},a.createElement(Ut,{flexDirection:"col",gap:2},a.createElement(Ut,{alignItems:"center",gap:2},i,a.createElement(Bt,{size:"lg",className:b("maxio-auth-layout__heading",En[n])},t)),l&&a.createElement(Ut,{style:{color:"var(--maxio-color-text-tertiary)"}},a.createElement(Vt,{size:"sm",className:"maxio-auth-layout__description"},l))),e)),s&&a.createElement(Xl.Footer,null,s)));export{ba as ActionList,wa as Alert,vn as AuthLayout,Pa as Avatar,$a as Banner,Vt as Body,La as Breadcrumbs,Ta as BreadcrumbsItem,_a as Button,xl as Calendar,Xl as Card,Et as Checkbox,Nt as CheckboxGroup,fn as Chip,Ht as Code,tl as ComboBox,Xa as CopyToClipboard,Lt as DataTable,pl as DateField,fl as DatePicker,vl as DateRangePicker,Wt as Display,Ft as Drawer,Kt as EmptyState,Ut as Flex,_t as FormErrorMessage,vt as FormHelperText,dn as GlobalToastProvider,hn as Grid,Bt as Heading,pa as Icon,Na as IconButton,jt as Label,fa as Link,Xt as ListBox,ha as LoadingSpinner,rn as Logo,Ra as Menu,Da as MenuButton,Sa as MenuList,sl as NumberField,Ua as OverlayTrigger,_l as Pagination,yt as Popover,Nl as ProgressBar,nl as Radio,il as RadioGroup,hl as RangeCalendar,rl as SearchField,Il as SegmentedControl,dl as Select,Al as SideNav,Bl as Tab,Ul as TabList,Hl as TabPanel,jl as TabPanels,Wl as Tabs,Kl as Tag,cl as TextArea,ol as TextField,ml as TextInput,Ql as Tile,cn as ToastProvider,pn as ToastQueue,xn as Toggle,Aa as Tooltip,qa as TooltipTrigger,gn as TopBar,ja as useElementResizeObserver,Wa as useHover,Va as useOverlayTrigger,un as useToast,Ha as useWindowSize};
1
+ import*as e from"react";import a,{useRef as t,useEffect as l,useState as n,forwardRef as i,cloneElement as r,isValidElement as o,useId as s,createContext as c,useContext as m,Children as d,useLayoutEffect as u,useCallback as p,useMemo as x,useImperativeHandle as g}from"react";import b from"classnames";import{useId as f,useLink as h,useButton as E,VisuallyHidden as v,usePress as _,useFocusRing as N,mergeProps as w,useCheckboxGroupItem as y,useCheckbox as I,useCheckboxGroup as k,useRadio as C,useRadioGroup as R,useTextField as S,useProgressBar as D,useToggleButton as P}from"react-aria";import{useObjectRef as $,useResizeObserver as T}from"@react-aria/utils";import{Popover as M,OverlayArrow as O,TooltipTrigger as z,Tooltip as L,MenuTrigger as A,Menu as B,MenuItem as F,Button as V,ModalOverlay as W,Modal as H,Dialog as j,ListBox as U,composeRenderProps as K,Collection as q,ListBoxLoadMoreItem as G,Header as Z,ListBoxSection as Y,ListBoxItem as X,ComboBox as Q,Label as J,Input as ee,Text as ae,FieldError as te,SearchField as le,TextField as ne,NumberField as ie,Separator as re,TextArea as oe,DateInput as se,DateSegment as ce,DateField as me,Calendar as de,Heading as ue,CalendarGrid as pe,CalendarGridHeader as xe,CalendarHeaderCell as ge,CalendarGridBody as be,CalendarCell as fe,Group as he,DatePicker as Ee,useLocale as ve,RangeCalendar as _e,DateRangePicker as Ne,ToggleButtonGroup as we,ToggleButton as ye,SelectionIndicator as Ie,Tab as ke,Tabs as Ce,TabPanel as Re,TabPanels as Se,TabListStateContext as De,TabList as Pe}from"react-aria-components";export{DialogTrigger,Pressable}from"react-aria-components";import{useToggleState as $e}from"@react-stately/toggle";import{useCheckboxGroupState as Te}from"@react-stately/checkbox";import{AnimatePresence as Me,motion as Oe}from"framer-motion";import{useDismiss as ze,useFocus as Le,useClick as Ae,useHover as Be,useFloating as Fe,autoUpdate as Ve,offset as We,useInteractions as He,useRole as je,FloatingPortal as Ue}from"@floating-ui/react-dom-interactions";import{flexRender as Ke,useReactTable as qe,getSortedRowModel as Ge,getExpandedRowModel as Ze,getCoreRowModel as Ye}from"@tanstack/react-table";export{createColumnHelper}from"@tanstack/react-table";import{dropTargetForElements as Xe,draggable as Qe,monitorForElements as Je}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/element/adapter.js";import{attachInstruction as ea,extractInstruction as aa}from"@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/tree-item.js";import{setCustomNativeDragPreview as ta}from"@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview";import{toCalendarDate as la}from"@internationalized/date";import{useRadioGroupState as na}from"@react-stately/radio";import{useToastState as ia,useToastQueue as ra,ToastQueue as oa}from"@react-stately/toast";import{useToast as sa,useToastRegion as ca}from"@react-aria/toast";function ma(){return ma=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},ma.apply(null,arguments)}const da=["address-card","arrow-down","arrow-down-left","arrow-down-left-long","arrow-down-long","arrow-down-right","arrow-down-right-long","arrow-down-up","arrow-left","arrow-left-long","arrow-left-right","arrow-right","arrow-right-long","arrow-turn-down-right","arrow-up","arrow-up-left","arrow-up-left-long","arrow-up-long","arrow-up-right","arrow-up-right-long","bank","bar-chart","briefcase","building","business-intelligence","calendar","caret-down","caret-left","caret-right","caret-up","chat","check","check-box","check-box-checked","check-box-checked-fill","check-box-indeterminate-fill","check-circle","check-circle-fill","chevron-down","chevron-left","chevron-right","chevron-up","chevron-up-down","circle","circle-half-stroke-small","circle-small-dash","circle-small-fill","circle-small-stroke","clipboard","cog","copy-file","credit-card","cross","cross-circle","cross-circle-fill","dashboard","diamond-small-fill","document","document-blank","dollar","dot-circle-fill","dot-fill","error","error-fill","error-small-fill","graph","home","info-circle","info-circle-fill","line-vertical","list","login","logout","megaphone","menu","menu-chevron-left","menu-chevron-right","notification","notification-unread","pen","plus","plus-circle","plus-circle-fill","question-circle","question-circle-fill","recently-viewed","search","square-small-fill","trash","triangle-small-fill","user","warning-circle","warning-circle-fill"],ua=["anrok","dropbox","hubspot","numeral","oracle","quotapath","sage","sphere","taxjar"],pa=["avalara","pipedrive","quickbooks","salesforce","xero"],xa=({variant:e,color:t,className:l,size:n})=>{const i=(e,a)=>a.includes(e),r=i(e,da)||i(e,ua),o=i(e,pa),s=b({"fa-kit":r,"fa-kit-duotone":o,"fa-sharp fa-regular":!r&&!o,[`fa-${e}`]:!0,[`fa-${n}`]:n,[`maxio-icon--${t}`]:t&&!i(e,ua)&&!i(e,pa)},l);return a.createElement("i",{className:s})},ga=({item:e,isSelected:n,truncateLabel:i=!1,role:r="option",small:o=!1})=>{const s=t(null),c=t(!1),m=f();if(l(()=>{n&&c.current&&s.current?.focus()},[n]),l(()=>{c.current=!0},[]),"divider"===e.type)return a.createElement("div",{className:"maxio-action-list__divider",role:"separator","aria-hidden":"true"});const{leadingIconName:d,leadingIconClassName:u,trailingIconName:p,label:x,description:g,link:h}=e,E=b("maxio-action-list__label",{"maxio-truncate":i});return a.createElement("a",ma({"aria-labelledby":m},h,{className:b("maxio-action-list__content",h.className,{"maxio-action-list__content--size-small":o}),tabIndex:n?0:-1,ref:s,role:r}),d&&a.createElement(xa,{variant:d,className:b("maxio-action-list__leading-icon",u)}),a.createElement("span",{className:E,id:m},x),g&&a.createElement("span",{className:"maxio-action-list__description"},g),p&&a.createElement(xa,{variant:p,className:"maxio-action-list__trailing-icon"}))},ba=(e,a,t)=>0===e?e:1===e&&"divider"===a[e-1].type?t||e:"divider"===a[e-1].type?ba(e-1,a,t||e):e-1,fa=({items:e,isShadowed:t=!0,itemProps:l={},className:i,truncateLabels:r=!1,small:o=!1,...s})=>{const c=b("maxio-action-list",i,{"maxio-action-list--shadow":t}),[m,d]=n(()=>e.findIndex(e=>"divider"!==e.type));return 0===e.length?null:a.createElement("div",ma({className:c,onKeyDown:a=>{if("Space"===a.code||"Enter"===a.code){const a=e[m];a&&"divider"!==a.type&&window.open(a.link.href,a.link.target||"_self")}"ArrowUp"===a.code&&(a.preventDefault(),d(a=>ba(a,e))),"ArrowDown"===a.code&&(a.preventDefault(),d(a=>((e,a)=>{const t=a.findIndex((a,t)=>"divider"!==a.type&&t>e);return-1===t?e:t})(a,e)))},role:"listbox"},s),e.map((e,t)=>a.createElement(ga,ma({item:e,truncateLabel:r,key:`listbox-${e.id}`,isSelected:t===m,small:o},l))))},ha=({className:e,children:t,disabled:l,external:n,icon:i,size:r="sm",underline:o,variant:s,...c})=>{const m=b("maxio-link",{[`maxio-link--${r}`]:r,"maxio-link--disabled":l,[`maxio-link--${s}`]:s,"maxio-link--underline":o},e),d=n?"_blank":"_self";return a.createElement("a",ma({className:m,target:d},c),t,i&&a.createElement(xa,{variant:i,className:"maxio-link__icon"}))},Ea=({size:e="md",white:t=!1,className:l})=>{const n=b("maxio-loading-spinner",l,`maxio-loading-spinner--${e}`,{"maxio-loading-spinner--white":t});return a.createElement("div",{className:n,role:"status","aria-label":"loading"})},va=i(({fullWidth:e=!1,leadingElement:t,trailingElement:l,icon:n,variant:i="primary",size:s,...c},m)=>{const d=$(m),{linkProps:u}=h({...c},d),p=b("maxio-button",c.className,{[`maxio-button--${s}`]:s,[`maxio-button--${i}`]:i,"maxio-button--full-width":e});return a.createElement("a",ma({},u,{ref:d,className:p,href:c.href}),t&&r(t,{...o(t)&&{className:"maxio-button__leading-element"}}),c.children,(l||n)&&r(l||n,{...o(l||n)&&{className:"maxio-button__trailing-element"}}))}),_a=i(({disabled:e,loading:t=!1,fullWidth:l=!1,leadingElement:n,trailingElement:i,icon:s,variant:c="primary",size:m,...d},u)=>{const p=$(u),{buttonProps:x}=E({...d,isDisabled:e,formAction:"string"==typeof d.formAction?d.formAction:void 0},p),g=["primary","danger"].includes(c),f=b("maxio-button",d.className,{[`maxio-button--${m}`]:m,[`maxio-button--${c}`]:c,"maxio-button--loading":t,"maxio-button--full-width":l});return a.createElement("button",ma({},x,{className:f,ref:p}),n&&r(n,{...o(n)&&{className:"maxio-button__leading-element"}}),d.children,!t&&(i||s)&&r(i||s,{...o(i||s)&&{className:"maxio-button__trailing-element"}}),t&&a.createElement(Ea,{className:"maxio-button__trailing-element",size:"md",white:g}))}),Na=i((e,t)=>(e=>"href"in e)(e)?a.createElement(va,ma({},e,{ref:t})):a.createElement(_a,ma({},e,{ref:t}))),wa=({"aria-label":e,className:t,...l})=>a.createElement(Na,ma({"aria-label":e,className:b("maxio-button--icon",t)},l),null),ya=({children:e,title:t,linkText:l,linkExternal:n,href:i,display:r="inline",sentiment:o="info",onDismiss:s,className:c})=>{if(!e&&!t)return console.warn("Alert component requires either children or title prop to be rendered"),null;const m=b("maxio-alert",{[`maxio-alert--${o}`]:"info"!==o&&o},c),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[o],u=b("maxio-alert__content",{"maxio-alert__content--block":"block"===r});return a.createElement("div",{className:m},a.createElement(xa,{variant:d,className:"maxio-alert__icon","aria-hidden":"true"}),a.createElement("section",{className:"maxio-alert__container"},a.createElement("div",{className:u},t&&a.createElement("span",{className:"maxio-alert__title"},t),e&&a.createElement("span",{className:"maxio-alert__message"},e),l&&i&&a.createElement(ha,ma({className:"maxio-alert__link",href:i,variant:"high-contrast",underline:!0},n?{external:!0}:{}),l))),s&&a.createElement(wa,{icon:a.createElement(xa,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-alert__dismiss"}))},Ia=c({}),ka=({children:e})=>{const[t,l]=n(!1),i=s(),r=s();return a.createElement(Ia.Provider,{value:{controlsId:i,buttonId:r,isOpen:t,onClose:()=>l(!1),onOpen:()=>l(!0),onToggle:()=>l(e=>!e)}},e)};function Ca(){const e=m(Ia);if(!e||"object"==typeof e&&0===Object.keys(e).length)throw new Error("useMenu hook must be used within a MenuProvider");return e}const Ra=({children:e})=>{const{isOpen:t,onToggle:l,onClose:n}=Ca();return a.createElement("details",{open:t,onToggle:l,className:"maxio-action-menu"},"function"==typeof e?e({isOpen:t,onClose:n}):e)},Sa=({children:e})=>a.createElement(ka,null,a.createElement(Ra,null,e)),Da=({items:e,alignItemsEnd:t=!1})=>{const l=b("maxio-action-menu__content",{"maxio-action-menu__content--align-end":t}),{controlsId:n,buttonId:i}=Ca();return a.createElement("div",{className:l,role:"presentation"},a.createElement(fa,{role:"menu",itemProps:{role:"menuitem"},id:n,"aria-labelledby":i,items:e}))},Pa=({children:e,iconName:t="chevron-down","aria-label":l,size:n="md",variant:i="secondary"})=>{const r=b({"maxio-action-menu__chevron":"chevron-down"===t}),o=b("maxio-button",`maxio-button--${i}`,`maxio-button--${n}`,{"maxio-button--icon":t&&!e}),{isOpen:s,buttonId:c,controlsId:m}=Ca();return a.createElement("summary",{className:o,"aria-haspopup":"true","aria-label":l,"aria-expanded":s,"aria-controls":m,id:c},e&&a.createElement("span",null,e),t&&a.createElement(xa,{variant:t,className:`${r} maxio-button__trailing-element`}))},$a=({className:e,src:t,alt:l="avatar"})=>a.createElement("img",{className:b("maxio-avatar",e),alt:l,src:t}),Ta=({children:e,title:t,linkText:l,linkExternal:n,href:i,display:r="inline",sentiment:o="info",onDismiss:s,className:c})=>{if(!e&&!t)return console.warn("Banner component requires either children or title prop to be rendered"),null;const m=b("maxio-banner",{[`maxio-banner--${o}`]:"info"!==o&&o,className:c}),d={success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[o],u=b("maxio-banner__content",{"maxio-banner__content--block":"block"===r});return a.createElement("div",{className:m,"aria-live":"assertive"},a.createElement(xa,{variant:d,className:"maxio-banner__icon","aria-hidden":"true"}),a.createElement("section",{className:"maxio-banner__container"},a.createElement("div",{className:u},t&&a.createElement("span",{className:"maxio-banner__title"},t),e&&a.createElement("span",{className:"maxio-banner__message"},e),l&&i&&a.createElement(ha,ma({href:i},"warning"!==o&&{variant:"inverse"},{underline:!0},n?{external:!0}:{}),l))),s&&a.createElement(wa,{icon:a.createElement(xa,{variant:"cross"}),"aria-label":"Dismiss Notification",variant:"ghost",onClick:s,className:"maxio-banner__dismiss"}))},Ma=({children:e,className:t,href:l,...n})=>{const i=l?a.createElement(ha,{size:"sm",href:l},e):e;return a.createElement("li",ma({className:b("maxio-breadcrumbs__item",t)},n),i)},Oa="Breadcrumbs requires at least one BreadcrumbsItem as children",za='Last BreadcrumbsItem should not have "href" prop. It is the current page.',La="Breadcrumbs only accepts BreadcrumbsItem as children",Aa=({className:e,children:t,...l})=>{const n=d.count(t);if(0===n)throw new Error(Oa);const i=d.map(t,(e,a)=>{if(o(e)&&e.type===Ma){if(a===n-1&&e.props.href)throw new Error(za);return r(e,{"aria-current":a===n-1?"page":void 0})}throw new Error(La)});return a.createElement("nav",ma({"aria-label":"Breadcrumb"},l),a.createElement("ol",{className:b("maxio-breadcrumbs",e)},i))},Ba=({children:e,arrowPosition:t,size:l="regular",maxWidth:n=160})=>a.createElement("div",{"data-testid":"tooltip",className:b("maxio-tooltip",`maxio-tooltip--${l}`,{[`maxio-tooltip--arrow-${t}`]:t})},a.createElement("div",{className:"maxio-tooltip__content",style:{maxWidth:n}},e)),Fa={click:Ae,hover:e=>Be(e,{delay:100}),focus:Le,dismiss:ze},Va=(e,a)=>a.map(a=>Fa[a](e)),Wa=({placement:e="top",isActive:a=!1,interactions:n=["hover"],floatingElementOffset:i=0,onOverlayUpdate:r,autoHideMs:o})=>{const s=t(null),{strategy:c,x:m,y:d,context:u,floating:p,reference:x}=Fe({placement:e,open:a,onOpenChange:e=>r(e),middleware:[We(i)],whileElementsMounted:Ve}),{getReferenceProps:g,getFloatingProps:b}=He([...Va(u,n),je(u,{role:"tooltip"})]);l(()=>{s.current&&clearTimeout(s.current),a&&o&&(s.current=window.setTimeout(()=>r(!1),o))},[a,o]);return{isActive:a,refs:{floating:p,reference:x},floatingElementCSSPosition:{position:c,top:d??0,left:m??0},getReferenceProps:g,getFloatingProps:b}};function Ha(e,a=0){const i=t((new Date).getTime()),r=t((new Date).getTime()),[o,s]=n(!1);return l(()=>{const t=()=>{i.current=(new Date).getTime(),s(!0)},l=()=>{r.current=(new Date).getTime(),window.setTimeout(()=>{i.current-r.current<=0&&s(!1)},a)},n=e&&e.current;return n&&(n.addEventListener("mouseenter",t),n.addEventListener("mouseleave",l)),()=>{n&&(n.removeEventListener("mouseenter",t),n.removeEventListener("mouseleave",l))}},[e]),o}function ja(e=500){const[a,i]=n(()=>{if("undefined"==typeof window)return{windowWitdh:0,windowHeight:0};const{innerWidth:e,innerHeight:a}=window;return{windowWitdh:e,windowHeight:a}}),r=t(null);return l(()=>{if("undefined"==typeof window)return;const a=()=>{const{innerWidth:a,innerHeight:t}=window;window.clearTimeout(r.current??void 0),r.current=window.setTimeout(()=>{i({windowWitdh:a,windowHeight:t})},e)};return window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[e]),a}function Ua(e){const[a,t]=n(()=>e.current?.clientWidth??0),l=()=>{const a=e.current?.clientWidth??0;t(e=>0===a&&e>0?e:a)};return u(l,[e]),T({ref:e,onResize:l}),a}const Ka=({children:e,usePortal:t=!1,isActive:l=!1,placement:n="top",interactions:i=["hover"],role:r="tooltip",renderOverlay:o,floatingElementOffset:s,motionSettings:c={},autoHideMs:m,onOverlayUpdate:d,className:u})=>{const{getReferenceProps:p,getFloatingProps:x,refs:{floating:g,reference:f},floatingElementCSSPosition:h}=Wa({isActive:l,onOverlayUpdate:d,autoHideMs:m,floatingElementOffset:s,interactions:i,placement:n}),E=a.createElement(Me,null,l&&a.createElement(Oe.div,ma({ref:g,style:h},c,x()),o()));return a.createElement(a.Fragment,null,a.createElement("div",ma({ref:f,className:b("maxio-inline-flex",u)},p(),{"data-testid":"overlay-trigger"}),e),t?a.createElement(Ue,{id:"maxio-ui-portal"},E):E)},qa={top:"bottom",right:"left",bottom:"top",left:"right","top-start":"bottom-left","top-end":"bottom-right","right-start":"left-top","right-end":"left-bottom","bottom-start":"top-left","bottom-end":"top-right","left-start":"right-top","left-end":"right-bottom"},Ga=({children:e,interactions:i=["hover"],placement:r="right",maxWidth:o=160,size:s="regular",renderContent:c,autoHideMs:m,isVisible:d,usePortal:u,className:g,onVisibilityUpdate:b,floatingElementOffset:f=5})=>{const[h,E]=n(!1),v=void 0!==d,_=t(null),N=p(e=>{_.current&&clearTimeout(_.current),_.current=window.setTimeout(()=>{v||E(e),b&&b(e)},50)},[v,b]),w=x(()=>(e=>{const a=e.startsWith("top")||e.startsWith("bottom")?"Y":"X",t=`translate${a}(${e.startsWith("bottom")||e.startsWith("right")?"-":""}10px)`;return{initial:{opacity:0,visibility:"hidden",transform:t},animate:{opacity:1,visibility:"visible",transform:`translate${a}(0px)`},exit:{opacity:0,visibility:"hidden",transform:t},transition:{ease:[.4,0,.5,1],duration:.2}}})(r),[r]);return l(()=>()=>{_.current&&clearTimeout(_.current)},[]),a.createElement(Ka,{role:"tooltip",className:g,floatingElementOffset:f,motionSettings:w,isActive:v?d:h,onOverlayUpdate:N,autoHideMs:m,usePortal:u,placement:r,interactions:i,renderOverlay:()=>a.createElement(Ba,{size:s,arrowPosition:qa[r],maxWidth:o},c())},e)},Za="maxio-copy-to-clipboard--subtle",Ya="maxio-copy-to-clipboard--xs",Xa={idle:"copy-file",copied:"check",error:"error"},Qa=({value:e,copyLabel:i="Copy",copiedLabel:r="Copied!",copyErrorLabel:o="Copy failed",size:s="md",variant:c="ghost",disabled:m,resetAfterMs:d=2e3,tooltipPlacement:u="top",onCopy:x,onCopyError:g,onClick:f,className:h,...E})=>{const{feedbackState:_,feedbackLabel:N,announcement:w,handleCopy:y}=((e,{copyLabel:a,copiedLabel:i,copyErrorLabel:r,resetAfterMs:o,onCopy:s,onCopyError:c,onClick:m})=>{const[d,u]=n(null),x=t(null),g=t(0),b=t(!0),f=t(0),h=t(e),E=p(()=>{null!==x.current&&(clearTimeout(x.current),x.current=null)},[]),v=p(()=>{E(),u(null)},[E]),_=p((e,a)=>{E(),u({state:e,value:a,announceId:++g.current}),x.current=window.setTimeout(v,o)},[E,o,v]);l(()=>{h.current=e,v()},[v,e]),l(()=>(b.current=!0,()=>{b.current=!1,E()}),[E]);const N=p(async a=>{m?.(a);const t=++f.current,l=e,n=()=>!b.current||t!==f.current||l!==h.current;try{await navigator.clipboard.writeText(l)}catch(e){return n()||_("error",l),void c?.(e)}n()||_("copied",l),s?.(l)},[m,s,c,_,e]),w=d?.value===e?d.state:"idle",y={idle:a,copied:i,error:r}[w];return{feedbackState:w,feedbackLabel:y,announcement:"idle"!==w&&d?{id:d.announceId,message:y}:null,handleCopy:N}})(e,{copyLabel:i,copiedLabel:r,copyErrorLabel:o,resetAfterMs:d,onCopy:x,onCopyError:g,onClick:f});return a.createElement(a.Fragment,null,a.createElement(Ga,{interactions:["hover","focus"],placement:u,size:"small",renderContent:()=>N},a.createElement(wa,ma({},E,{"aria-label":i,className:b(h,{[Za]:"subtle"===c,[Ya]:"xs"===s}),variant:"subtle"===c?"ghost":c,size:"xs"===s?void 0:s,disabled:m,onClick:y,trailingElement:a.createElement(xa,{variant:Xa[_]})}))),a.createElement(v,null,a.createElement("span",{role:"status","aria-live":"polite","aria-atomic":"true"},w&&a.createElement("span",{key:w.id},w.message))))},Ja="row-controls",et="row-actions",at=({children:e,pattern:t,size:l,isExpandable:i,isUsingCustomRow:r})=>{const[o,s]=n(!1),[c,m]=n(!1),d=t&&r&&i,u=b("maxio-data-table",{"maxio-data-table--pattern":t&&!d,"maxio-data-table--expanded-child-pattern":d,"maxio-data-table--with-custom-row":r,[`maxio-data-table--${l}`]:l,"maxio-data-table--with-pinned-left-border":o,"maxio-data-table--with-pinned-right-border":c});return a.createElement("div",{className:"maxio-data-table-wrapper",onScroll:e=>{const a=e.target;s(a.scrollLeft>0),m(a.scrollWidth-a.clientWidth-a.scrollLeft>0)}},a.createElement("table",{className:u},e))},tt=({children:e})=>a.createElement("thead",null,e),lt=({children:e})=>a.createElement("tbody",null,e),nt=({children:e,table:t,header:l,className:n,enableExpanding:i,...r})=>{const o=l?.column,s=o?.getCanSort?.(),c=o?.getToggleSortingHandler?.(),m=l?.isPlaceholder,d=o?.columnDef?.meta?.align,u=o?.columnDef?.meta?.width,p=o?.columnDef?.meta?.controls,x=o?.columnDef?.meta?.actions,g=o?.getIsPinned(),f=o?.getIsSorted(),h="asc"===f,E=b("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${g}`]:g,"maxio-data-table__cell--sortable":s,"maxio-data-table__cell--active":f,[`maxio-data-table__cell--${d}`]:d,"maxio-data-table__cell--controls":p,"maxio-data-table__cell--actions":x}),v={...u?{width:u}:{},..."left"===g?{left:o?.getStart("left")}:"right"===g?{right:o?.getAfter("right")}:{}},_=((e,a)=>e&&a?"arrow-up":e&&!a?"arrow-down":"arrow-down-up")(!!f,h),N=t?.getToggleAllRowsExpandedHandler(),w=t?.getIsAllRowsExpanded?.(),y=l?.headerGroup.headers[0].id===Ja?1:0,I=i&&l?.index===y;return m?null:a.createElement("th",ma({scope:"col",role:"columnheader","aria-sort":f?h?"ascending":"descending":"none",className:E,onClick:c,colSpan:l?.colSpan,style:v},r),a.createElement("div",{className:"maxio-data-table__cell-flex"},!0===i&&I&&a.createElement(wa,{size:"sm",variant:"ghost",icon:a.createElement(xa,{size:"xs",variant:w?"chevron-down":"chevron-right"}),onClick:N,"aria-label":w?"Collapse all rows":"Expand all rows","data-open":w,className:"maxio-data-table__expand-button"}),e,s&&a.createElement(xa,{variant:_,className:"maxio-data-table__sort-icon"})))},it=e=>e.subRows??[],rt=(e,a)=>Object.assign({},e,{subRows:a}),ot=(e,a,t=[])=>{for(let l=0;l<e.length;l+=1){const n=e[l],i=[...t,l];if(n===a)return i;const r=ot(it(n),a,i);if(r)return r}return null},st=(e,a)=>{const[t,...l]=a,n=e[t];if(!n)return null;const i=[...e];if(0===l.length)return i.splice(t,1),{data:i,item:n};const r=st(it(n),l);return r?(i[t]=rt(n,r.data),{data:i,item:r.item}):null},ct=(e,a,t,l)=>{const n=[...e];if(0===a.length)return n.splice(t,0,l),n;const[i,...r]=a,o=e[i];if(!o)return null;const s=ct(it(o),r,t,l);return s?(n[i]=rt(o,s),n):null},mt=(e,a)=>{let t,l=e;for(const e of a){if(t=l[e],!t)return;l=it(t)}return t},dt="maxio-data-table-row",ut=c(null),pt=()=>m(ut),xt=e=>e.type===dt&&"string"==typeof e.instanceId&&"string"==typeof e.rowId,gt=e=>{const a=(e=>{const a=aa(e);return a&&"instruction-blocked"!==a.type?"reorder-above"===a.type?"before":"reorder-below"===a.type?"after":"make-child"===a.type?"inside":null:null})(e);return"string"==typeof e.rowId&&a?{rowId:e.rowId,position:a}:null},bt=({availability:e,children:i,data:r,enableExpanding:o,getRowReorderLabel:c,onRowReorder:m,rowReorderMode:d,table:u})=>{const g=`maxio-data-table-${s()}`,[b,f]=n(""),[h,E]=n(null),[v,_]=n(null),N=t(null),w=p(e=>u.getCoreRowModel().rowsById[e],[u]),y=p(e=>c?.(e)??e.id,[c]),I=p((e,a)=>{const t=w(e),l=w(a.rowId);if(!t||!l)return null;const n=((e,a,t,l,n)=>{if(a.id===t.id||!((e,a,t,l)=>"all"===l||("siblings"===l?"inside"!==t&&(e.parentId??null)===(a.parentId??null):"inside"===t?e.depth===a.depth+1:e.depth===a.depth))(a,t,l,n))return null;const i=ot(e,a.original),r=ot(e,t.original);if(!i||!r||(s=r,(o=i).length<s.length&&o.every((e,a)=>s[a]===e)))return null;var o,s;const c=st(e,i);if(!c)return null;const m=((e,a)=>{const t=[...e],l=a.length-1;return l>=0&&e.length>l&&a.slice(0,l).every((a,t)=>e[t]===a)&&a[l]<e[l]&&(t[l]-=1),t})(r,i),d=m[m.length-1];if(void 0===d)return null;const u="inside"===l?m:m.slice(0,-1),p=mt(c.data,m);if(!p)return null;const x="inside"===l?it(p).length:d+("after"===l?1:0),g={parentRowId:"inside"===l?t.id:t.parentId??null,index:x},b={parentRowId:a.parentId??null,index:a.index};if(b.parentRowId===g.parentRowId&&b.index===g.index)return null;const f=ct(c.data,u,x,c.item);return f?{data:f,source:b,destination:g}:null})(r,t,l,a.position,d);return n&&!o&&null!==n.destination.parentRowId&&n.destination.parentRowId!==n.source.parentRowId?null:n},[r,o,w,d]),k=p(e=>{N.current=e,E(e)},[]),C=p((e,a)=>{const t=w(e),l=w(a.rowId),n=I(e,a);return t&&l&&n?(m({...n,row:t,rowId:t.id,targetRow:l,targetRowId:l.id,position:a.position}),f(`${y(t)} moved ${i=y(l),r=a.position,"inside"===r?`inside ${i}`:`${r} ${i}`}.`),!0):(f("That row cannot be moved to this position."),!1);var i,r},[y,I,w,m]),R=p((e,{input:a,element:t,source:l})=>{const n={rowId:e.id,instanceId:g},i=ea(n,{element:t,input:a,currentLevel:e.depth,indentPerLevel:24,mode:"standard"}),r=gt(i),o=xt(l.data)&&l.data.instanceId===g&&Boolean(r&&I(l.data.rowId,r));return{...i,isValid:o}},[I,g]),S=p((a,t)=>{if(!e.available)return()=>{};const l=e=>{const a=e.isValid?gt(e):null;k(a)};return Xe({element:t,canDrop:({source:e})=>xt(e.data)&&e.data.instanceId===g&&e.data.rowId!==a.id&&!a.getParentRows().some(a=>a.id===e.data.rowId),getData:e=>R(a,e),onDragEnter:({self:e})=>l(e.data),onDrag:({self:e})=>l(e.data),onDragLeave:()=>{N.current?.rowId===a.id&&k(null)}})},[e,R,g,k]),D=p((a,t)=>{const l=t.closest("tr");return e.available&&l instanceof HTMLElement?Qe({element:l,dragHandle:t,getInitialData:()=>({type:dt,instanceId:g,rowId:a.id}),onGenerateDragPreview:({nativeSetDragImage:e})=>{ta({nativeSetDragImage:e,render:({container:e})=>{const t=document.createElement("div");return t.className="maxio-data-table__drag-preview",t.textContent=y(a),t.setAttribute("aria-hidden","true"),e.append(t),()=>t.remove()}})}}):()=>{}},[e,y,g]);l(()=>{if(e.available)return Je({canMonitor:({source:e})=>xt(e.data)&&e.data.instanceId===g,onDragStart:({source:e})=>{if(!xt(e.data))return;const a=w(e.data.rowId);_(e.data.rowId),a&&f(`${y(a)} grabbed. Choose a destination.`)},onDrop:({source:e,location:a})=>{if(xt(e.data)){const t=a.current.dropTargets[0]?.data,l=!0===t?.isValid?gt(t):null;l?C(e.data.rowId,l):f("Row move cancelled.")}_(null),k(null)}})},[C,e,y,w,g,k]),l(()=>{if("inside"!==h?.position)return;const e=w(h.rowId);if(!e?.getCanExpand()||e.getIsExpanded())return;const a=window.setTimeout(()=>e.toggleExpanded(!0),500);return()=>window.clearTimeout(a)},[h,w]);const P=p(a=>{if(!e.available)return[];const t=a.parentId?w(a.parentId):null,l=t?.subRows??u.getCoreRowModel().rows,n=l.findIndex(e=>e.id===a.id);if(-1===n)return[];const i=l[n-1],r=l[n+1],o=l[0],s=l[l.length-1],c=[];if(n>1&&o&&c.push({id:"top",label:"Move to top",target:{rowId:o.id,position:"before"}}),i&&c.push({id:"up",label:"Move up",target:{rowId:i.id,position:"before"}}),r&&c.push({id:"down",label:"Move down",target:{rowId:r.id,position:"after"}}),n<l.length-2&&s&&c.push({id:"bottom",label:"Move to bottom",target:{rowId:s.id,position:"after"}}),t){let e=t;for(;e.parentId;){const a=w(e.parentId);if(!a)break;e=a}c.push({id:"move-to-root",label:"Move to root",target:{rowId:e.id,position:"after"}})}return u.getCoreRowModel().flatRows.forEach(e=>{e.id!==a.parentId&&c.push({id:`move-to:${e.id}`,label:`Move to ${y(e)}`,target:{rowId:e.id,position:"inside"}})}),c.filter(e=>Boolean(I(a.id,e.target)))},[e,y,I,w,u]),$=p(a=>{if(!e.available)return!1;const t=a.parentId?w(a.parentId):null;return(t?.subRows??u.getCoreRowModel().rows).length>1||"siblings"!==d&&("all"===d?Boolean(t):!(!o||0===a.depth)&&u.getCoreRowModel().flatRows.some(e=>e.depth===a.depth-1&&e.id!==a.parentId))},[e,o,w,d,u]),T=x(()=>({activeTarget:h,availability:e,draggingRowId:v,getActions:P,getLabel:y,hasActions:$,moveRow:C,registerHandle:D,registerRow:S}),[h,e,C,v,P,y,$,D,S]);return a.createElement(ut.Provider,{value:T},i,a.createElement("span",{className:"maxio-data-table__live-region",role:"status","aria-live":"polite","aria-atomic":"true"},b))},ft=({children:e,row:t,isChild:l,isHeader:n,className:i,onRowAction:r,...o})=>{const s=t?.getIsSelected?.(),c=t?.getCanExpand?.()&&t?.getIsExpanded?.(),m=Boolean(t&&r&&!n&&!l),d=a.useRef(null),u=pt(),p=u?.registerRow,x=a.useRef(null),g=e=>{x.current=e.target},{pressProps:f}=_({isDisabled:!m,onPress:e=>{const a=x.current??e.target;x.current=null,t&&r&&!(e=>e instanceof Element&&Boolean(e.closest("a,button,input,select,textarea,label,.maxio-data-table__cell--controls,.maxio-data-table__cell--actions")))(a)&&r(t)}}),{focusProps:h,isFocused:E}=N(),v=b({"maxio-data-table__row":!n,"maxio-data-table__header-row":n,"maxio-data-table__row--active":s||E,"maxio-data-table__row--expanded":c,"maxio-data-table__row--expanded-child":l,"maxio-data-table__row--actionable":m,"maxio-data-table__row--dragging":Boolean(t)&&u?.draggingRowId===t?.id,[`maxio-data-table__row--drop-${u?.activeTarget?.position}`]:Boolean(t)&&u?.activeTarget?.rowId===t?.id},i);a.useEffect(()=>{if(t&&p&&d.current&&!n&&!l)return p(t,d.current)},[l,n,p,t]);const y=m?w({onClickCapture:g,onKeyDownCapture:g,tabIndex:0},f,h,o):o;return a.createElement("tr",ma({},y,{ref:d,className:v,tabIndex:m?y.tabIndex:o.tabIndex}),e)},ht=c({}),Et=i(({checked:e,disabled:t,invalid:l,indeterminate:n,className:i,inputProps:r,error:o,label:s},c)=>{const m=b("maxio-checkbox",{"maxio-checkbox--checked":e,"maxio-checkbox--disabled":t,"maxio-checkbox--error":l,"maxio-checkbox--indeterminate":n},i);return a.createElement("label",{className:m},a.createElement("input",ma({type:"checkbox",role:"checkbox",className:"maxio-checkbox__input",ref:c},r)),a.createElement("span",{className:"maxio-checkbox__control"},o&&a.createElement("span",{className:"maxio-checkbox__control-error"})),s&&a.createElement("span",{className:"maxio-checkbox__label"},s))});Et.displayName="InnerCheckbox";const vt=({label:e,error:l=!1,className:n,indeterminate:i,value:r="",disabled:o,readOnly:s,defaultChecked:c,checked:d,...u})=>{const p=t(null),x=m(ht),{inputProps:g,isDisabled:b,isInvalid:f,isSelected:h}=x&&Object.keys(x).length>0?y({value:r,"aria-label":e??u["aria-label"],isDisabled:o,isInvalid:l,isIndeterminate:i,isReadOnly:s,...u},x,p):I({"aria-label":e??u["aria-label"],isDisabled:o,isInvalid:l,isIndeterminate:i,isReadOnly:s,value:r,...u},$e({...u,isSelected:d,defaultSelected:c}),p);return a.createElement(Et,ma({inputProps:g,checked:h,disabled:b,invalid:f,indeterminate:i,className:n,error:l,label:e,ref:p},u))},_t=({children:e,className:t,...l})=>a.createElement("div",ma({className:b("maxio-form-helper-text",t)},l),e),Nt=({children:e,className:t,...l})=>a.createElement("div",ma({className:b("maxio-form-error",t)},l),a.createElement(xa,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},e)),wt=({helperText:e,className:t,errorMessage:l,children:n,disabled:i,label:r,defaultValue:o,name:s,...c})=>{const m=Te({defaultValue:o,name:s,errorMessage:l,description:e,label:r,isDisabled:i,isInvalid:!!l,...c}),{groupProps:d,labelProps:u,descriptionProps:p,errorMessageProps:x,isInvalid:g}=k({"aria-label":(r??c["aria-label"])?.toString(),isDisabled:i,isInvalid:!!l,...c},m),f=b("maxio-checkbox-group",{"maxio-checkbox-group--disabled":i},t),h=e&&!l;return a.createElement("div",ma({className:f},d),r&&a.createElement("label",ma({className:"maxio-checkbox-group__label"},u),r),a.createElement(ht.Provider,{value:m},n),h&&a.createElement(_t,p,e),l&&g&&a.createElement(Nt,x,l))},yt=({table:e,enableRowSelection:t,enableRowReordering:l})=>{const n=e?.getToggleAllPageRowsSelectedHandler?.(),i=e?.getIsAllPageRowsSelected?.()||e?.getIsAllRowsSelected?.(),r=e?.getIsSomePageRowsSelected?.();return t?a.createElement(a.Fragment,null,l&&a.createElement("span",{className:"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon","aria-hidden":"true",style:{visibility:"hidden"}}),a.createElement(vt,{"aria-label":"Select all rows",onChange:e=>{n("boolean"==typeof e?{target:{checked:e}}:e)},checked:i,indeterminate:!i&&r})):null},It=({className:e,hideArrow:t=!1,children:l,offset:n=4,...i})=>a.createElement(M,ma({},i,{className:b("maxio-popover",e),offset:n}),a.createElement(a.Fragment,null,!t&&a.createElement(O,{className:"maxio-popover__arrow"},a.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12","aria-hidden":!0},a.createElement("path",{d:"M0 0 L6 6 L12 0"}))),l)),kt=({row:e})=>{const t=pt(),l=t?.registerHandle,n=t?.getActions,i=t?.hasActions,r=a.useRef(null),[o,s]=a.useState(!1),c=t?.draggingRowId===e.id,m=t?.getLabel(e)??e.id,d=a.useMemo(()=>i?.(e)??!1,[i,e]),u=a.useMemo(()=>o?n?.(e)??[]:[],[n,o,e]),p=(t&&!t.availability.available?t.availability.message:void 0)??(d?void 0:`No moves are available for ${m}.`);a.useEffect(()=>{if(l&&r.current&&!p)return l(e,r.current)},[l,e,p]),a.useEffect(()=>{p&&s(!1)},[p]);const x=a.createElement(V,{ref:r,type:"button",className:"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon maxio-data-table__drag-handle","aria-label":`Reorder ${m}`,"aria-pressed":c,"aria-disabled":!!p||void 0,onPress:()=>{p||s(!0)}},a.createElement("i",{className:"fa-sharp fa-solid fa-grip-dots-vertical "+(p?"maxio-icon--disabled":"maxio-icon--secondary")}));return p?a.createElement(z,{delay:0,closeDelay:0},x,a.createElement(L,{placement:"bottom start",offset:8,className:"maxio-tooltip maxio-tooltip--arrow-top-left"},a.createElement("div",{className:"maxio-tooltip__content"},p))):a.createElement(A,{trigger:"longPress",isOpen:o,onOpenChange:s},x,a.createElement(It,{placement:"bottom start",hideArrow:!0},a.createElement(B,{autoFocus:"first",className:"maxio-data-table__reorder-menu",items:u,onAction:a=>{const l=u.find(e=>e.id===a);l&&(t?.moveRow(e.id,l.target),requestAnimationFrame(()=>r.current?.focus()))}},e=>a.createElement(F,{id:e.id,textValue:e.label,className:"maxio-data-table__reorder-menu-item"},e.label))))},Ct=({row:e,enableRowSelection:t,enableRowReordering:l})=>{const n=e?.getToggleSelectedHandler?.(),i=e?.getIsSelected?.()||e?.getIsAllSubRowsSelected?.(),r=e?.getIsSomeSelected?.(),o=e.id||e.index;return a.createElement(a.Fragment,null,l&&a.createElement(kt,{row:e}),t&&a.createElement(vt,{"aria-label":`Select row ${o}`,onChange:n,checked:i,indeterminate:r}))},Rt=({children:e})=>a.createElement("div",{className:"maxio-data-table__cell-flex"},e),St=({row:e,cell:t,children:l,className:n,...i})=>{const r=t?.column,o=r?.columnDef?.meta?.align,s=r?.columnDef?.meta?.controls,c=r?.columnDef?.meta?.actions,m=r?.getIsPinned(),d=b("maxio-data-table__cell",n,{[`maxio-data-table__cell--pinned-${m}`]:m,[`maxio-data-table__cell--${o}`]:o,"maxio-data-table__cell--controls":s,"maxio-data-table__cell--actions":c}),u="left"===m?{left:r?.getStart("left")}:"right"===m?{right:r?.getAfter("right")}:{};return a.createElement("td",ma({className:d,style:u},i),l)},Dt=({row:e,SubRowComponent:t,pattern:l,enableExpanding:n,onRowAction:i})=>{const r=t&&e.getParentRow()&&e.getParentRow().getIsExpanded(),o=r&&e.getVisibleCells()[0].column.columnDef.id===Ja,s=r&&e.getVisibleCells()[e.getVisibleCells().length-1].column.columnDef.id===et,c=[s,o].filter(Boolean).length,m=e.getVisibleCells().length-c,d=e.getParentRow()?.index??e.index,u=l&&t&&d%2==1?"maxio-data-table__row--with-pattern":void 0,p=e.getCanExpand?.(),x=e?.getToggleExpandedHandler?.(),g=e?.getIsExpanded?.(),b=p&&n?0:1.75,f=e.getVisibleCells()[0].column.columnDef.id===Ja?1:0,h=e.getVisibleCells().find(({column:e})=>{const{actions:a,controls:t}=e.columnDef.meta??{};return!a&&!t}),E=i&&h?h.id:void 0;return a.createElement(a.Fragment,{key:e.id},r?a.createElement(ft,{key:`${e.id}-sub`,row:e,isChild:!0,className:u},o&&a.createElement(St,{className:"maxio-data-table__cell--pinned-left"}),a.createElement(St,{colSpan:m},t(e)),s&&a.createElement(St,{className:"maxio-data-table__cell--pinned-right"})):a.createElement(ft,{key:`${e.id}-parent`,row:e,className:u,onRowAction:i,"aria-labelledby":E},e.getVisibleCells().map(t=>{const l=n&&t.column.getIndex()===f;return a.createElement(St,{key:t.id,row:e,cell:t,id:t.id},a.createElement("div",{className:"maxio-data-table__cell-flex",style:n&&l?{paddingLeft:`${e?.depth+b}rem`}:void 0},n&&p&&l&&a.createElement(wa,{size:"sm",variant:"ghost",icon:a.createElement(xa,{size:"xs",variant:g?"chevron-down":"chevron-right"}),onClick:x,"aria-label":g?"Collapse row":"Expand row","data-open":g,className:"maxio-data-table__expand-button"}),Ke(t.column.columnDef.cell,t.getContext())))})))},Pt={available:!0},$t={available:!1,reason:"filtering",message:"Reordering is unavailable while the table is filtered."},Tt={available:!1,reason:"grouping",message:"Reordering is unavailable while the table is grouped."},Mt={available:!1,reason:"pagination",message:"Reordering is unavailable while the table is paginated."},Ot=(e=[])=>e.filter(e=>e!==Ja&&e!==et),zt=[],Lt=e=>e.subRows,At=({pattern:e,size:t="md",SubRowComponent:n,onExpand:i,onSelect:r,onSort:o,enableSorting:s=!1,enableRowSelection:c=!1,enableExpanding:m,columns:d,actions:u,actionsColumnSize:p,onRowAction:g,enableRowReordering:b=!1,getRowReorderLabel:f,onRowReorder:h,rowReorderMode:E="siblings",getRowId:v,getSubRows:_,state:N,...w})=>{const y=b?void 0:n,I=!b&&s,k=(({columns:e,HeaderControls:t,RowControls:l,RowActions:n,actions:i,actionsColumnSize:r,enableExpanding:o,enableRowSelection:s,enableRowReordering:c})=>x(()=>{const m={id:Ja,size:s&&c?72:40,header:e=>a.createElement(t,ma({},e,{enableExpanding:o,enableRowSelection:s,enableRowReordering:c})),cell:e=>a.createElement(l,ma({},e,{enableExpanding:o,enableRowSelection:s,enableRowReordering:c})),meta:{controls:!0,width:(s&&c?72:40)+"px"}},d=i&&n?{id:et,size:r??40,header:"",cell:e=>a.createElement(n,null,i(e.row,e.table)),meta:{actions:!0}}:null;let u=[...e];return(s||c)&&(u=[m,...u]),d&&(u=[...u,d]),u},[i,r,n,o,s,c,e,t,l]))({columns:d,HeaderControls:yt,RowControls:Ct,RowActions:Rt,actions:u,actionsColumnSize:p,enableRowSelection:c,enableRowReordering:b,enableExpanding:Boolean(m)}),C=qe({state:{...N,...b&&{sorting:zt},columnPinning:{left:[...c||b?[Ja]:[],...Ot(N?.columnPinning?.left)],right:[...Ot(N?.columnPinning?.right),...u?[et]:[]]}},getCoreRowModel:Ye(),enableRowSelection:c,enableExpanding:Boolean(m),...!w.manualExpanding&&{getExpandedRowModel:Ze()},...!w.manualSorting&&!b&&{getSortedRowModel:Ge()},columns:k,getRowId:v,...w,getSubRows:b?Lt:_??Lt,enableSorting:I,...b&&{getSortedRowModel:void 0}}),R=C.getCanSomeRowsExpand(),S=C.getState(),D=(({columnFilters:e,globalFilter:a,grouping:t,hasPagination:l})=>e.length>0||null!=a&&""!==a?$t:t.length>0?Tt:l?Mt:Pt)({columnFilters:S.columnFilters,globalFilter:S.globalFilter,grouping:S.grouping,hasPagination:Boolean(w.getPaginationRowModel||w.manualPagination)});l(()=>{i?.(S.expanded)},[i,S.expanded]),l(()=>{r?.(S.rowSelection)},[r,S.rowSelection]),l(()=>{b||o?.(S.sorting)},[b,o,S.sorting]);const P=a.createElement(at,{pattern:e,size:t,isExpandable:R,isUsingCustomRow:Boolean(y)},a.createElement(tt,null,C.getHeaderGroups().map(e=>a.createElement(ft,{key:e.id,table:C,isHeader:!0},e.headers.map(e=>a.createElement(nt,{key:e.id,table:C,header:e,enableExpanding:m},Ke(e.column.columnDef.header,e.getContext())))))),a.createElement(lt,null,C.getRowModel().rows.map(t=>a.createElement(Dt,{key:t.id,row:t,pattern:e,SubRowComponent:y,enableExpanding:m,onRowAction:g}))));return b&&v&&h?a.createElement(bt,{availability:D,data:w.data,enableExpanding:Boolean(m),getRowReorderLabel:f,onRowReorder:h,rowReorderMode:E,table:C},P):P},Bt={sm:"h3",md:"h2",lg:"h1"},Ft=({children:e,size:t="sm",className:l,...n})=>{const i=Bt[t],r=b(`maxio-heading-${t}`,l);return a.createElement(i,ma({className:r},n),e)},Vt=({open:e,onOpenChange:t,placement:l="right",backdrop:n="dim",size:i="md",className:r,title:o,description:s,children:c,footer:m})=>{const d=a.useId(),u={"data-placement":l,"data-size":i};return a.createElement(W,{isOpen:e,onOpenChange:t,isDismissable:!0,className:b("maxio-drawer__backdrop",{"maxio-drawer__backdrop--dim":"dim"===n})},a.createElement(H,ma({className:b("maxio-drawer",r)},u),a.createElement(j,{className:"maxio-drawer__dialog","aria-labelledby":d},({close:e})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-drawer__header"},a.createElement("div",{className:"maxio-drawer__title-group"},a.createElement(Ft,{id:d,size:"md",className:"maxio-drawer__title"},o),s&&a.createElement("p",{className:"maxio-drawer__description"},s)),a.createElement(wa,{"aria-label":"Close",onClick:e,icon:a.createElement(xa,{variant:"cross"}),variant:"ghost",size:"sm",className:"maxio-drawer__close"})),a.createElement("div",{className:"maxio-drawer__body"},c),null!=m&&a.createElement("div",{className:"maxio-drawer__footer"},m)))))},Wt=({as:e="div",children:t,compact:l=!1,size:n="md",className:i,...r})=>{const o=e,s=b({[`maxio-body-${n}`]:!l,[`maxio-body-${n}-compact`]:l},i);return a.createElement(o,ma({className:s},r),t)},Ht=({as:e="div",children:t,size:l="md",className:n,...i})=>{const r=e,o=b(`maxio-display-${l}`,n);return a.createElement(r,ma({className:o},i),t)},jt=({as:e="div",children:t,className:l,...n})=>{const i=e,r=b("maxio-code",l);return a.createElement(i,ma({className:r},n),t)},Ut=({as:e="div",children:t,size:l="sm",className:n,...i})=>{const r=e,o=b(`maxio-label-${l}`,n);return a.createElement(r,ma({className:o},i),t)},Kt=({basis:e,flex:t,flexDirection:l,wrap:n,grow:i,shrink:r,gap:o,gapX:s,gapY:c,className:m,children:d,alignItems:u,justifyContent:p,...x})=>{const g=b("maxio-flex",{[`maxio-flex-${t}`]:t,[`maxio-basis-${e}`]:void 0!==e,[`maxio-flex-${l}`]:l,[`maxio-flex-${n}`]:n,"maxio-grow":i,"maxio-grow-0":!1===i,"maxio-shrink":r,"maxio-shrink-0":!1===r,[`maxio-gap-${o}`]:void 0!==o,[`maxio-gap-x-${s}`]:void 0!==s,[`maxio-gap-y-${c}`]:void 0!==c,[`maxio-items-${u}`]:u,[`maxio-justify-${p}`]:p},m);return a.createElement("div",ma({className:g},x),d)},qt=({hasActiveFilters:e=!1,title:t,headingLevel:l="h2",description:n,actions:i,className:r,...o})=>{const s=b("maxio-empty-state",r),c=l,m=!t&&!n?e?"We couldn't find any items matching your criteria. Try adjusting your search or filters to see more results.":"There is no data to display yet.":n;return a.createElement("div",ma({className:s},o),a.createElement(Kt,{flexDirection:"col",alignItems:"center",gap:4,className:"maxio-empty-state__content"},a.createElement(Kt,{flexDirection:"col",alignItems:"center",gap:2,className:"maxio-empty-state__copy"},t&&a.createElement(c,{className:"maxio-heading-lg"},t),m&&a.createElement(Wt,{size:"sm",className:"maxio-empty-state__description"},m)),i&&a.createElement(Kt,{alignItems:"center",gap:2},i)))},Gt=({className:e,children:t,items:l,render:n,renderEmptyState:i,isLoading:r=!1,onLoadMore:o,scrollOffset:s,showSelectAll:c=!1,...m})=>a.createElement(U,ma({},m,{items:l,renderEmptyState:r?void 0:i,className:K(e,e=>b("maxio-listbox",e)),render:(e,t)=>{const{selectionManager:l}=t.state,i=n?n(e,t):a.createElement("div",e);if("multiple"!==l.selectionMode||!c)return i;if(0===[...l.collection.getKeys()].filter(e=>{const a=l.collection.getItem(e);return"item"===a?.type&&l.canSelectItem(e)}).length)return i;const r=l.isSelectAll,o=r&&l.disallowEmptySelection;return a.createElement("div",null,a.createElement("div",{className:"maxio-listbox__select-all"},a.createElement(Na,{type:"button",variant:"ghost",trailingElement:a.createElement(xa,{variant:r?"check":""}),fullWidth:!0,"aria-pressed":r,disabled:o,onClick:()=>l.toggleSelectAll()},"Select all")),i)}}),o||r?a.createElement(a.Fragment,null,a.createElement(q,{items:l,dependencies:m.dependencies},t),a.createElement(G,{className:"maxio-listbox__load-more",isLoading:r,onLoadMore:r?void 0:o,scrollOffset:s},a.createElement(Ea,null))):t);Gt.displayName="ListBox";const Zt=({className:e,...t})=>{const l=t.textValue||("string"==typeof t.children?t.children:void 0);return a.createElement(X,ma({},t,{textValue:l,className:b("maxio-listbox__item",e)}),K(t.children,(e,{isSelected:t})=>a.createElement(a.Fragment,null,a.createElement("div",{className:"maxio-listbox__content"},"string"==typeof e?a.createElement(Wt,{size:"sm"},e):e),t&&a.createElement(xa,{variant:"check"}))))};Zt.displayName="ListBox.Item";const Yt=({className:e,...t})=>a.createElement(Y,ma({},t,{className:b("maxio-listbox__section",e)}));Yt.displayName="ListBox.Section";const Xt=({className:e,...t})=>a.createElement(Z,ma({},t,{className:b("maxio-listbox__header",e)}));Xt.displayName="ListBox.Header";const Qt=Object.assign(Gt,{Item:Zt,Section:Yt,Header:Xt}),Jt=({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:r,errorMessage:o,leadingElement:s=null,fullWidth:c,className:m,placeholder:d,renderEmptyState:u,isLoading:p=!1,onLoadMore:x,scrollOffset:g,allowsEmptyCollection:f=Boolean(p||x||u),selectionMode:h,children:E,...v})=>{const _=a.useRef(null),N=a.useRef(null),[w,y]=a.useState(),[I,k]=a.useState(0),C=!!o,R=t||C,S=E,D=a.useCallback(()=>{const e=_.current;if(!e)return;const a=N.current,t=a?a.getBoundingClientRect().left-e.getBoundingClientRect().left:0;k(e=>e===-t?e:-t),y(a=>{const t=`${e.offsetWidth}px`;return a?.["--trigger-width"]===t?a:{"--trigger-width":t}})},[]);a.useEffect(()=>{const e=_.current;if(!e)return;if(D(),"undefined"==typeof ResizeObserver)return;const a=new ResizeObserver(D);return a.observe(e),()=>a.disconnect()},[D]);const P=b("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":R,"maxio-text-field--readonly":l,"maxio-text-field--full-width":c},m);return a.createElement(Q,ma({},v,{isDisabled:e,isInvalid:R,isReadOnly:l,selectionMode:h,allowsEmptyCollection:f,className:P}),i&&a.createElement(J,{className:"maxio-text-field__label"},i),a.createElement("div",{ref:_,className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(ee,{ref:N,className:"maxio-text-field__input",placeholder:d}),a.createElement("div",{className:"maxio-text-field__trailing-element"},a.createElement(V,{className:b("maxio-button","maxio-button--ghost","maxio-button--icon","maxio-button--sm")},a.createElement(xa,{variant:"chevron-up-down"})))),r&&!C&&a.createElement(ae,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),o&&a.createElement(te,{className:"maxio-form-error"},e=>a.createElement(a.Fragment,null,a.createElement(xa,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},"function"==typeof o?o(e):o))),a.createElement(It,{hideArrow:!0,className:"maxio-combobox__popover",crossOffset:I,style:w},a.createElement(Qt,{items:v.items??v.defaultItems,renderEmptyState:u,isLoading:p,onLoadMore:x,scrollOffset:g},S)))};Jt.displayName="ComboBox";const el=e=>a.createElement(Qt.Item,e);el.displayName="ComboBox.Item";const al=e=>a.createElement(Qt.Section,e);al.displayName="ComboBox.Section";const tl=e=>a.createElement(Qt.Header,e);tl.displayName="ComboBox.Header";const ll=Object.assign(Jt,{Item:el,Section:al,Header:tl}),nl=c({}),il=({indent:e=!1,disabled:l=!1,invalid:n=!1,label:i,...r})=>{const o=t(null),s=m(nl),{inputProps:c,isDisabled:d}=C({...r,value:(r.value||"").toString(),"aria-label":r["aria-label"]||i,isDisabled:l},s,o),u=b("maxio-radio",{"maxio-radio--indent":e,"maxio-radio--disabled":d||s.isDisabled,"maxio-radio--error":n||s.isInvalid});return a.createElement("label",{className:u},a.createElement("input",ma({ref:o,role:"radio",type:"radio",className:"maxio-radio__input"},c,{name:s.name||c.name})),a.createElement("span",{className:"maxio-radio__control"}),a.createElement("span",{className:"maxio-radio__label"},i))},rl=({children:e,label:t,errorMessage:l,helperText:n,disabled:i=!1,invalid:r=!1,name:o,defaultValue:s,...c})=>{const m=na({isDisabled:i,isInvalid:r,description:n,name:o,label:t,errorMessage:l,defaultValue:s,...c}),{radioGroupProps:d,labelProps:u,descriptionProps:p,errorMessageProps:x}=R({"aria-label":c["aria-label"]||t,...c},m);return a.createElement(a.Fragment,null,a.createElement("div",ma({className:"maxio-radio-group"},d),t&&a.createElement("label",ma({className:"maxio-radio-group__label"},u),t),a.createElement(nl.Provider,{value:m},e),r&&l&&a.createElement(Nt,x,l),n&&!r&&a.createElement(_t,p,n)))},ol=i(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:r,errorMessage:o,leadingElement:s=a.createElement(xa,{variant:"search"}),clearButtonLabel:c="Clear search",fullWidth:m,className:d,...u},p)=>{const x=b("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":t,"maxio-text-field--readonly":l,"maxio-text-field--full-width":m},d);return a.createElement(le,ma({},u,{isDisabled:e,isReadOnly:l,isInvalid:t,className:x}),i&&a.createElement(J,{className:"maxio-text-field__label"},i),a.createElement("div",{className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(ee,{ref:p,className:"maxio-text-field__input"}),a.createElement("div",{className:"maxio-text-field__trailing-element maxio-search-field__clear-button"},a.createElement(V,{"aria-label":c,className:"maxio-button maxio-button--icon maxio-button--sm maxio-button--ghost"},a.createElement(xa,{variant:"cross",className:"maxio-button__trailing-element"})))),r&&!(t&&o)&&a.createElement(ae,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),o&&a.createElement(te,{className:"maxio-form-error"},a.createElement(xa,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},o)))});ol.displayName="SearchField";const sl=i(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:r,errorMessage:o,leadingElement:s=null,trailingElement:c=null,fullWidth:m,className:d,...u},p)=>{const x=b("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":t,"maxio-text-field--readonly":l,"maxio-text-field--full-width":m},d);return a.createElement(ne,ma({},u,{isDisabled:e,isReadOnly:l,isInvalid:t,className:x}),i&&a.createElement(J,{className:"maxio-text-field__label"},i),a.createElement("div",{className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(ee,{ref:p,className:"maxio-text-field__input"}),c&&a.createElement("div",{className:"maxio-text-field__trailing-element"},c)),r&&!(t&&o)&&a.createElement(ae,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),o&&a.createElement(te,{className:"maxio-form-error"},a.createElement(xa,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},o)))});sl.displayName="TextField";const cl=i(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:r,errorMessage:o,leadingElement:s=null,trailingElement:c=null,showStepper:m=!1,fullWidth:d,className:u,...p},x)=>{const g=b("maxio-text-field",`maxio-text-field--${n}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":t,"maxio-text-field--readonly":l,"maxio-text-field--full-width":d},u);return a.createElement(ie,ma({},p,{isDisabled:e,isReadOnly:l,isInvalid:t,className:g}),i&&a.createElement(J,{className:"maxio-text-field__label"},i),a.createElement("div",{className:"maxio-text-field__items"},s&&a.createElement("div",{className:"maxio-text-field__leading-element"},s),a.createElement(ee,{ref:x,className:"maxio-text-field__input"}),c&&a.createElement("div",{className:"maxio-text-field__trailing-element"},c),m&&a.createElement("div",{className:"maxio-text-field__trailing-element maxio-number-field__stepper"},a.createElement(V,{slot:"decrement","aria-label":"Decrement",className:"maxio-button maxio-button--icon maxio-button--sm maxio-button--ghost"},a.createElement(xa,{variant:"minus",size:"xs",className:"maxio-button__trailing-element"})),a.createElement(re,{orientation:"vertical",className:"maxio-number-field__stepper-separator"}),a.createElement(V,{slot:"increment","aria-label":"Increment",className:"maxio-button maxio-button--icon maxio-button--sm maxio-button--ghost"},a.createElement(xa,{variant:"plus",size:"xs",className:"maxio-button__trailing-element"})))),r&&!(t&&o)&&a.createElement(ae,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),o&&a.createElement(te,{className:"maxio-form-error"},a.createElement(xa,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},o)))});cl.displayName="NumberField";const ml=i(({isDisabled:e=!1,isInvalid:t=!1,isReadOnly:l=!1,size:n="md",label:i,description:r,errorMessage:o,fullWidth:s,className:c,...m},d)=>{const u=b("maxio-text-area",`maxio-text-area--${n}`,{"maxio-text-area--disabled":e,"maxio-text-area--error":t,"maxio-text-area--readonly":l,"maxio-text-area--full-width":s},c);return a.createElement(ne,ma({},m,{isDisabled:e,isReadOnly:l,isInvalid:t,className:u}),i&&a.createElement(J,{className:"maxio-form-label"},i),a.createElement(oe,{ref:d,className:"maxio-text-area__input"}),r&&!(t&&o)&&a.createElement(ae,{slot:"description",elementType:"div",className:"maxio-form-helper-text"},r),o&&a.createElement(te,{className:"maxio-form-error"},a.createElement(xa,{variant:"warning-circle-fill",className:"maxio-form-error__icon"}),a.createElement("div",{className:"maxio-form-error__text"},o)))});ml.displayName="TextArea";const dl=i(({disabled:e=!1,invalid:n=!1,readOnly:i=!1,size:r="md",label:o,helperText:s,showErrorMessage:c=!0,errorMessage:m,leadingElement:d=null,trailingElement:u=null,fullWidth:p,className:x,...f},h)=>{const E=t(null);g(h,()=>E.current),l(()=>{console.warn("TextInput is deprecated. Please use TextField instead.")},[]);const{spellCheck:v,..._}=f,N={..._,label:o,description:s,errorMessage:m,defaultValue:f.defaultValue?.toString(),value:f.value?.toString(),isDisabled:e,isReadOnly:i,isInvalid:n},{labelProps:w,inputProps:y,descriptionProps:I,errorMessageProps:k}=S(N,E),C=b("maxio-text-field",`maxio-text-field--${r}`,{"maxio-text-field--disabled":e,"maxio-text-field--error":n,"maxio-text-field--readonly":i,"maxio-text-field--full-width":p},x),R=n&&m&&c;return a.createElement("div",{className:C},o&&a.createElement("label",ma({className:"maxio-text-field__label"},w),o),a.createElement("div",{className:"maxio-text-field__items"},d&&a.createElement("div",{className:"maxio-text-field__leading-element"},d),a.createElement("input",ma({ref:E,type:"text",className:"maxio-text-field__input"},y,{spellCheck:v})),u&&a.createElement("div",{className:"maxio-text-field__trailing-element"},u)),s&&!R&&a.createElement("div",ma({className:"maxio-form-helper-text"},I),s),R&&a.createElement(Nt,k,m))});dl.displayName="TextInput";const ul=({options:e,label:t,size:l="md",inline:n=!1,disabled:i=!1,helperText:r,errorMessage:o,fullWidth:s=!1,...c})=>{const m=b("maxio-select",`maxio-select--${l}`,{"maxio-select--disabled":i,"maxio-select--inline":n,"maxio-select--error":!!o,"maxio-select--full-width":s}),d=f();return a.createElement("div",{className:m},t&&a.createElement("label",{htmlFor:d,className:"maxio-select__label"},t),a.createElement("div",{className:"maxio-select__input-container"},a.createElement("select",ma({id:d,className:"maxio-select__input",disabled:i},c),e.map(e=>a.createElement("option",{key:`option-${e.value}`,value:e.value,disabled:e.disabled},e.label))),a.createElement(xa,{variant:"chevron-up-down"})),!!o&&a.createElement(Nt,null,o),r&&!o&&a.createElement("div",{className:"maxio-form-helper-text"},r))},pl=({slot:e,displayValue:t})=>{const l=a.createElement(se,{slot:e,className:"maxio-date-field__input"},e=>a.createElement(ce,{segment:e,className:"maxio-date-field__segment"}));return null==t?l:a.createElement("div",{className:"maxio-date-field__endpoint"},a.createElement("div",{hidden:!0},l),a.createElement("span",{className:"maxio-date-field__endpoint-value"},t))},xl=({label:e,description:t,errorMessage:l,className:n,...i})=>a.createElement(me,ma({},i,{className:K(n,(e,a)=>b("maxio-text-field","maxio-date-field",{"maxio-text-field--disabled":a.isDisabled,"maxio-text-field--error":a.isInvalid,"maxio-text-field--readonly":a.isReadOnly},e))}),null!=e&&a.createElement(J,{className:"maxio-text-field__label"},e),a.createElement("div",{className:"maxio-text-field__items"},a.createElement("div",{className:"maxio-text-field__input"},a.createElement(pl,null))),null!=t&&a.createElement(ae,{slot:"description",className:"maxio-form-helper-text"},t),a.createElement(te,{className:"maxio-form-error"},l)),gl=({className:e,errorMessage:t,...l})=>a.createElement(de,ma({},l,{visibleDuration:{months:1},className:K(e,e=>b("maxio-calendar",e))}),a.createElement("header",{className:"maxio-calendar__header"},a.createElement(ue,{className:"maxio-calendar__heading"}),a.createElement(V,{slot:"previous",className:"maxio-button maxio-button--ghost maxio-button--icon"},a.createElement(xa,{variant:"chevron-left"})),a.createElement(V,{slot:"next",className:"maxio-button maxio-button--ghost maxio-button--icon"},a.createElement(xa,{variant:"chevron-right"}))),a.createElement(pe,{className:"maxio-calendar__grid"},a.createElement(xe,null,e=>a.createElement(ge,{className:"maxio-calendar__weekday"},e)),a.createElement(be,null,e=>a.createElement(fe,{date:e,className:"maxio-calendar__cell"}))),t&&a.createElement(ae,{slot:"errorMessage",className:"maxio-calendar__error"},t)),bl=({presets:e,label:t="Presets",isDisabled:l,isPresetDisabled:n,onSelect:i})=>e?.length?a.createElement(he,{"aria-label":t,className:"maxio-date-field__presets"},e.map((e,t)=>a.createElement(V,{key:t,className:"maxio-button maxio-button--ghost",isDisabled:l||e.isDisabled||null!==e.value&&n(e.value),onPress:()=>i(e.value)},e.label))):null,fl=(e,a)=>!!(a.minValue&&e.compare(a.minValue)<0||a.maxValue&&e.compare(a.maxValue)>0||a.isDateUnavailable?.(e)),hl=({label:e,description:t,errorMessage:l,className:n,presets:i,presetsLabel:r,...o})=>{const s=i?.find(e=>null===e.value)?.label;return a.createElement(Ee,ma({},o,{className:K(n,(e,a)=>b("maxio-text-field","maxio-date-field",{"maxio-text-field--disabled":a.isDisabled,"maxio-text-field--error":a.isInvalid,"maxio-text-field--readonly":a.isReadOnly},e))}),({state:n,isDisabled:c,isReadOnly:m})=>a.createElement(a.Fragment,null,null!=e&&a.createElement(J,{className:"maxio-text-field__label"},e),a.createElement(he,{className:"maxio-text-field__items"},a.createElement("div",{className:"maxio-text-field__input"},a.createElement(pl,{displayValue:null===n.value?s:void 0})),a.createElement("div",{className:"maxio-text-field__trailing-element"},a.createElement(V,{className:"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon"},a.createElement(xa,{variant:"calendar"})))),null!=t&&a.createElement(ae,{slot:"description",className:"maxio-form-helper-text"},t),a.createElement(te,{className:"maxio-form-error"},l),a.createElement(It,{hideArrow:!0,className:"maxio-date-field__popover"},a.createElement(j,{className:"maxio-date-field__dialog"},a.createElement(gl,null),a.createElement(bl,{presets:i,label:r,isDisabled:c||m,isPresetDisabled:e=>fl(e,o),onSelect:e=>{n.setValue(e),n.setOpen(!1)}})))))},El=({className:e,errorMessage:t,...l})=>{const{direction:n}=ve();return a.createElement(_e,ma({},l,{visibleDuration:{months:1},className:K(e,e=>b("maxio-calendar","maxio-calendar--range",e))}),a.createElement("header",{className:"maxio-calendar__header"},a.createElement(ue,{className:"maxio-calendar__heading"}),a.createElement(V,{slot:"previous",className:"maxio-button maxio-button--ghost maxio-button--icon"},a.createElement(xa,{variant:"rtl"===n?"chevron-right":"chevron-left"})),a.createElement(V,{slot:"next",className:"maxio-button maxio-button--ghost maxio-button--icon"},a.createElement(xa,{variant:"rtl"===n?"chevron-left":"chevron-right"}))),a.createElement(pe,{className:"maxio-calendar__grid"},a.createElement(xe,null,e=>a.createElement(ge,{className:"maxio-calendar__weekday"},e)),a.createElement(be,null,e=>a.createElement(fe,{date:e,className:"maxio-calendar__cell"}))),t&&a.createElement(ae,{slot:"errorMessage",className:"maxio-calendar__error"},t))},vl=(e,a)=>null==e?null==a:null!=a&&0===e.compare(a),_l=({label:e,description:t,errorMessage:l,className:n,presets:i,presetsLabel:r,...o})=>a.createElement(Ne,ma({},o,{className:K(n,(e,a)=>b("maxio-text-field","maxio-date-field",{"maxio-text-field--disabled":a.isDisabled,"maxio-text-field--error":a.isInvalid,"maxio-text-field--readonly":a.isReadOnly},e))}),({state:n,isDisabled:s,isReadOnly:c})=>{const m=((e,a)=>{if(null==e?.start||null==e?.end)return a?.find(a=>vl(a.value?.start,e?.start)&&vl(a.value?.end,e?.end))?.label})(n.value,i);return a.createElement(a.Fragment,null,null!=e&&a.createElement(J,{className:"maxio-text-field__label"},e),a.createElement(he,{className:"maxio-text-field__items"},a.createElement("div",{className:"maxio-text-field__input"},a.createElement(pl,{slot:"start",displayValue:null==n.value?.start?m:void 0}),a.createElement("span",{"aria-hidden":"true",className:"maxio-body-sm"},"→"),a.createElement(pl,{slot:"end",displayValue:null==n.value?.end?m:void 0})),a.createElement("div",{className:"maxio-text-field__trailing-element"},a.createElement(V,{className:"maxio-button maxio-button--sm maxio-button--ghost maxio-button--icon"},a.createElement(xa,{variant:"calendar"})))),null!=t&&a.createElement(ae,{slot:"description",className:"maxio-form-helper-text"},t),a.createElement(te,{className:"maxio-form-error"},l),a.createElement(It,{hideArrow:!0,className:"maxio-date-field__popover"},a.createElement(j,{className:"maxio-date-field__dialog"},a.createElement(El,null),a.createElement(bl,{presets:i,label:r,isDisabled:s||c,isPresetDisabled:e=>((e,a)=>{const t=e.start?la(e.start):null,l={...a,isDateUnavailable:e=>a.isDateUnavailable?.(e,t)??!1};if(null!=e.start&&null!=e.end&&e.start.compare(e.end)>0||null!=e.start&&fl(e.start,{...a,isDateUnavailable:e=>a.isDateUnavailable?.(e,null)??!1})||null!=e.end&&fl(e.end,l))return!0;if(e.start&&e.end&&a.isDateUnavailable&&!a.allowsNonContiguousRanges){const l=la(e.end);for(let n=la(e.start).add({days:1});n.compare(l)<0;n=n.add({days:1}))if(a.isDateUnavailable(n,t))return!0}return!1})(e,o),onSelect:e=>((e,a)=>{!a||null!=a.start&&null!=a.end?a?.start&&a.end?e.setValue({start:a.start,end:a.end}):e.setValue(null):(e.setValue(null),e.setDateTime("start",a.start),e.setDateTime("end",a.end)),e.setOpen(!1)})(n,e)}))))}),Nl=({size:e="md",onChange:t,totalItems:i=0,itemsPerPage:r=30,currentPage:o=1,pageSizeOptions:s,manualPageInput:c=!1})=>{const[m,d]=n(o),[u,p]=n(r),[x,g]=n(o.toString());l(()=>{g(m.toString())},[m]);const b=Math.ceil(i/u),f=m<b,h=m>1,E=u*(m-1)+1,v=Math.min(u*m,i),_=s.map(e=>({label:e.toString(),value:e.toString()})),N=Array.from({length:b},(e,a)=>a+1).map(e=>({label:e.toString(),value:e.toString()})),w=e=>{d(e),t?.({currentPage:e,itemsPerPage:u})},y=e=>{const a=parseInt(e,10);if(isNaN(a))return void g(m.toString());const t=Math.max(1,Math.min(a,b));g(t.toString()),w(t)};return a.createElement("div",{className:"maxio-pagination"},a.createElement("div",{className:"maxio-pagination__items-per-page"},a.createElement("label",{htmlFor:"items-per-page-large",className:"maxio-pagination__label"},"Items per page"),a.createElement(ul,{inline:!0,size:e,options:_,onChange:e=>{return a=Number(e.target.value),p(a),d(1),void t?.({currentPage:1,itemsPerPage:a});var a},value:u,id:"items-per-page-large"})),a.createElement("div",{className:"maxio-pagination__total-items"},a.createElement("span",null,E,"–",v," of ",i," items")),a.createElement("div",{className:"maxio-pagination__current-page"},c?a.createElement(dl,{className:"maxio-pagination__page-input",value:x,min:1,max:b,onChange:e=>(e=>{g(e)})(e),onBlur:e=>{y(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&(y(e.currentTarget.value),e.currentTarget.blur())},"aria-label":"Page number",size:e,type:"number",onWheel:e=>e.preventDefault()}):a.createElement(ul,{inline:!0,size:e,"aria-label":"Select page",onChange:e=>w(Number(e.target.value)),value:m,options:N,id:"page-index-large"}),a.createElement("div",{className:"maxio-pagination__label"},"of ",b," pages")),a.createElement("div",{className:"maxio-pagination__controls"},a.createElement(Ga,{onVisibilityUpdate:()=>{},renderContent:()=>"Previous",floatingElementOffset:9,placement:"top",size:"small"},a.createElement(wa,{icon:a.createElement(xa,{variant:"chevron-left"}),size:e,variant:"ghost",onClick:()=>w(m-1),"aria-label":"Previous",disabled:!h})),a.createElement(Ga,{onVisibilityUpdate:()=>{},renderContent:()=>"Next",floatingElementOffset:9,placement:"top",size:"small"},a.createElement(wa,{icon:a.createElement(xa,{variant:"chevron-right"}),size:e,variant:"ghost",onClick:()=>w(m+1),"aria-label":"Next",disabled:!f}))))},wl=({label:e,helperText:t,size:l="md",variant:n="default",status:i,value:r,maxValue:o=100})=>{const s=f(),c=f(),m=i&&!!e&&!!r&&!("inline"===n),d=t&&!("inline"===n),u=t&&"inline"===n,{progressBarProps:p,labelProps:x}=D({maxValue:o,value:r,label:e}),g=b("maxio-progress-bar",{"maxio-progress-bar--lg":"lg"===l,"maxio-progress-bar--success":r&&!("inline"===n)&&"success"===i,"maxio-progress-bar--error":r&&!("inline"===n)&&"error"===i,"maxio-progress-bar--indent":"indent"===n,"maxio-progress-bar--inline":"inline"===n,"maxio-progress-bar--indeterminate":void 0===r});return a.createElement("div",ma({className:g},p),a.createElement("div",ma({id:s,className:"maxio-progress-bar__label"},x),e),u&&a.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t),a.createElement("div",{className:"maxio-progress-bar__track"},a.createElement("div",{className:"maxio-progress-bar__progress",style:{"--tw-scale-x":`${r}%`}})),m&&a.createElement("div",{className:`maxio-progress-bar__${i}-icon`}),d&&a.createElement("div",{id:c,className:"maxio-progress-bar__helper-text"},t))},yl=({className:e,size:t="md",fullWidth:l=!1,selectionMode:n="single",orientation:i="horizontal",disallowEmptySelection:r=!0,...o})=>a.createElement(we,ma({},o,{selectionMode:n,orientation:i,disallowEmptySelection:r,className:K(e,e=>b("maxio-segmented-control",`maxio-segmented-control--${t}`,{"maxio-segmented-control--full-width":l},e))}));yl.displayName="SegmentedControl";const Il=({className:e,children:t,...l})=>a.createElement(ye,ma({},l,{className:K(e,e=>b("maxio-segmented-control__item",e))}),K(t,e=>a.createElement(a.Fragment,null,a.createElement(Ie,{className:"maxio-segmented-control__selection-indicator","data-selected":!0}),e)));Il.displayName="SegmentedControl.Item";const kl=Object.assign(yl,{Item:Il}),Cl=({leadingIcon:e,trailingIcon:t,type:l="menu",children:n,leadingIconClassName:i,isTooltipVisible:r=!1})=>a.createElement(a.Fragment,null,e&&a.createElement(Ga,{usePortal:!0,isVisible:r,renderContent:()=>n,floatingElementOffset:12},a.createElement("span",{className:"maxio-side-nav__icon"},a.createElement(xa,{variant:e,className:i}))),a.createElement("span",{className:`maxio-side-nav__${l}-title`,"data-testid":"maxio-sidebar-section-name"},n),t&&a.createElement("span",{className:"maxio-side-nav__menu-chevron"},a.createElement(xa,{variant:t}))),Rl=e=>"heading"!==e.type,Sl=e=>{const a=(e=>e.flat().filter(Rl).map(e=>e.items).flat().find(e=>e?.isCurrent))(e);return a?e.map(e=>e.map(e=>Rl(e)&&e.items?.includes(a)?{...e,isOpen:!0}:e)):e},Dl=c({}),Pl=()=>m(Dl),$l=({children:e,isOpen:i,onChange:r,withIcons:o=!0,sections:s,shouldToggleSidebar:c=!0,topDropdownItems:m,collapseBreakpoint:d=800})=>{const u=t(!1),[p,x]=n(()=>!c||("boolean"==typeof i?i:"undefined"==typeof window||window.innerWidth>d)),[g,b]=n(()=>Sl(s)),{windowWitdh:f}=ja(200);l(()=>{u.current&&r?.(p)},[p,r]),l(()=>{u.current=!0},[]),l(()=>{!function(e){if(!c)return;e<d&&p&&h()}(f)},[f]),l(()=>{"boolean"==typeof i&&x(i)},[i]);const h=()=>{x(!1)};return a.createElement(Dl.Provider,{value:{sections:g,topDropdownItems:m,onSectionOpen:e=>{b(a=>a.map(a=>a.map(a=>Rl(a)?{...a,isOpen:a?.name===e&&!a.isOpen}:a)))},isOpen:p,onOpen:()=>{x(!0)},onClose:h,withIcons:o,shouldToggleSidebar:c}},e)},Tl=()=>{const{onOpen:e,topDropdownItems:l,isOpen:n}=Pl(),{mainItem:i,otherItems:r,actions:o}=l,s=t(null),c=Ha(s),m=({id:e,title:a,icon:t,iconClass:l,url:n,...i})=>({id:e,label:a,leadingIconName:t,leadingIconClassName:l,link:{href:n,...i}}),{items:d,itemsCount:u}=x(()=>({itemsCount:r.length+o.length,items:[...r.map(m),r?.length>0&&o?.length>0?{type:"divider",id:"item-divider"}:null,...o.map(m)].filter(e=>null!=e)}),[o,r]);return a.createElement(a.Fragment,null,0===u?a.createElement("a",{className:"maxio-side-nav__menu-button maxio-side-nav__menu-button--large",href:i.url,onClick:e},a.createElement("span",{className:"maxio-side-nav__menu-title"},i.title)):a.createElement("details",{className:"maxio-action-menu maxio-side-nav--action-menu"},a.createElement("summary",{onClick:e,className:"maxio-side-nav__menu-button","aria-haspopup":"true",ref:s},i.url?a.createElement(a.Fragment,null,a.createElement(Cl,{type:"menu",isTooltipVisible:!n&&c,leadingIcon:i.icon,trailingIcon:"chevron-up-down",leadingIconClassName:i.iconClass},i.title)):a.createElement(Cl,{type:"menu",trailingIcon:"chevron-up-down"},i.title)),a.createElement(fa,{truncateLabels:!0,className:"maxio-action-menu__content","aria-label":"Action list",items:d,small:!0})))},Ml=({section:e})=>{const{isOpen:l,withIcons:n}=Pl(),i=t(null),r=Ha(i);return a.createElement("li",{className:"maxio-side-nav__item","data-key":e.key,"data-testid":"maxio-sidebar-section"},a.createElement("a",{className:"maxio-side-nav__link","aria-current":e.isCurrent?"page":void 0,role:"button",href:e.href,ref:i},a.createElement(Cl,{isTooltipVisible:r&&!l,type:"menu",leadingIcon:n?e.icon:void 0},e.name)))},Ol=({section:e})=>{const{onOpen:l,onSectionOpen:n,isOpen:i,withIcons:r}=Pl(),o=t(null),s=Ha(o);if(!Rl(e))return a.createElement("li",{className:"maxio-side-nav__item-header"},e.title);return e.Component?a.createElement(e.Component,{section:e}):e.href?a.createElement(Ml,{section:e}):a.createElement("li",{className:b("maxio-side-nav__item",{"maxio-side-nav__item--icon":r}),"data-testid":"maxio-sidebar-section"},a.createElement("button",{className:"maxio-side-nav__menu-button",ref:o,"aria-expanded":e.isOpen?"true":"false",type:"button",onClick:()=>{n(e.name),l()}},a.createElement(Cl,{type:"menu",isTooltipVisible:!i&&s,leadingIcon:r?e.icon:void 0,trailingIcon:e.items?.length?"chevron-down":void 0},e.name)),a.createElement("ul",{className:"maxio-side-nav__menu"},e.items?.map(e=>a.createElement("li",{key:`section-sub-item-${e.name}`,className:"maxio-side-nav__item","data-testid":"maxio-section-item"},a.createElement("a",{className:"maxio-side-nav__link",href:e.href,"aria-current":e.isCurrent?"page":void 0},a.createElement("span",{className:"maxio-side-nav__link-title"},e.name))))))},zl=()=>{const{sections:e}=Pl();return a.createElement(a.Fragment,null,e.map((e,t)=>a.createElement("ul",{role:"list",className:"maxio-side-nav__items",key:`section-list-${t}`},e.map((e,l)=>a.createElement(Ol,{key:`section-list-item-${e.type}-${t}-${l}`,section:e})))))},Ll=()=>{const{onClose:e,shouldToggleSidebar:t}=Pl();return a.createElement("div",{className:"maxio-side-nav__logo-container"},a.createElement("a",{className:"maxio-side-nav__brand",href:"/","aria-label":"Maxio"}),t&&a.createElement("button",{className:"maxio-side-nav__menu-toggle","aria-label":"toggle sidebar",onClick:e},a.createElement(xa,{variant:"sidebar"})))},Al=()=>{const{isOpen:e}=Pl();return a.createElement("nav",{className:b("maxio-side-nav",{"maxio-side-nav--collapsed":!e})},a.createElement(Ll,null),a.createElement(Tl,null),a.createElement("div",{className:"maxio-side-nav__items-container"},a.createElement(zl,null)))},Bl=({withIcons:e=!0,shouldToggleSidebar:t=!1,topDropdownItems:l,sections:n=[],collapseBreakpoint:i=800,isOpen:r,onChange:o})=>a.createElement($l,{isOpen:r,onChange:o,collapseBreakpoint:i,withIcons:e,shouldToggleSidebar:t,topDropdownItems:l,sections:n},a.createElement(Al,null)),Fl=({disabled:e=!1,value:t=0,className:l,id:n,isCurrent:i,...r})=>{const o="icon"===r.type,s=({isSelected:a})=>b("maxio-tabs__tab",l,{"maxio-tabs__tab--active":a,"maxio-tabs__tab--disabled":e,"maxio-tabs__tab--icon":o});if("icon"===r.type){const{icon:l,...n}=r;return a.createElement(ke,ma({id:t,isDisabled:e},n,{className:s}),a.createElement("div",{className:"maxio-tabs__tab__content"},l))}const{children:c,rightIcon:m,...d}=r;return a.createElement(ke,ma({id:t,isDisabled:e},d,{className:s}),a.createElement("div",{className:"maxio-tabs__tab__content"},c,m||null))},Vl=c({variant:"line",withDivider:!1}),Wl=({children:e,variant:t="line",withDivider:l=!1})=>a.createElement(Vl.Provider,{value:{variant:t,withDivider:l}},e),Hl=({children:e,variant:t="line",withDivider:l=!1,defaultIndex:n=0,index:i,onChange:r})=>a.createElement(Ce,{className:"maxio-tabs-container",selectedKey:i,defaultSelectedKey:n,onSelectionChange:e=>r?.(Number(e))},a.createElement(Wl,{variant:t,withDivider:l},e)),jl=({children:e,value:t,className:l,id:n,...i})=>a.createElement(Re,ma({id:t,className:b("maxio-tabs__panel",l)},i),e),Ul=({children:e})=>{const t=d.map(e,(e,a)=>{if(!o(e)||e.type!==jl)throw new Error("You can only pass <TabPanel /> component as children");return r(e,{key:a,value:a})});return a.createElement(Se,{className:"maxio-tabs__panels"},t)},Kl=({children:e,className:l,ariaLabel:i,overflow:c="none",moreLabel:p="More",...x})=>{const{variant:g,withDivider:f}=m(Vl),h=m(De),E=s(),[v,_]=n(!1),N=b("maxio-tabs",l,{"maxio-tabs--contained":"contained"===g,"maxio-tabs--divider":f}),w=d.map(e,e=>e);(w??[]).forEach(e=>{if(!o(e)||e.type!==Fl)throw new Error("You can only pass <Tab /> component as children")});const y="auto"===c&&!!w?.length,{ref:I,moreButtonRef:k,overflowIndexes:C,handleKeyDownCapture:R}=(({overflowEnabled:e,childrenArray:a})=>{const l=t(null),i=t(null),r=t(null),[o,s]=n(null),c=Ua(l),d=m(De),p=null!=d?.selectedKey?Number(d.selectedKey):null,[x,g]=n([]);u(()=>{if(!e||!o)return void g((a??[]).map((e,a)=>a));const{visibleIndexes:t}=((e,a,t,l)=>{const n=e.map((e,a)=>a);if(e.reduce((e,a)=>e+a,0)<=a)return{visibleIndexes:n,overflowIndexes:[]};const i=[];let r=t;for(const t of n){if(r+e[t]>a)break;r+=e[t],i.push(t)}if(null!==l&&!i.includes(l)){for(r+=e[l];r>a&&i.length>0;)r-=e[i.pop()];i.push(l)}i.sort((e,a)=>e-a);const o=n.filter(e=>!i.includes(e));return{visibleIndexes:i,overflowIndexes:o}})(o.tabWidths,c,o.moreButtonWidth,r.current??p);t.length===(a??[]).length&&(r.current=null),g(t)},[e,o,c]),u(()=>{e&&o&&null!==p&&g(e=>(e.includes(p)||(r.current=p),((e,a,t,l,n)=>{if(e.includes(n))return e;const i=[...e,n].sort((e,a)=>e-a);let r=l+i.reduce((e,t)=>e+a[t],0);for(;r>t&&i.length>1;){const e=i.length-1,t=i[e]===n?e-1:e,[l]=i.splice(t,1);r-=a[l]}return i})(e,o.tabWidths,c,o.moreButtonWidth,p)))},[p]);const b=e?(a??[]).map((e,a)=>a).filter(e=>!x.includes(e)):[],f=((e,a)=>e.filter(e=>!a?.[e]?.props.disabled))(x,a);u(()=>{if(!e||!l.current)return void s(e=>null===e?e:null);const t=Array.from(l.current.querySelectorAll('[role="tab"]')),n=i.current?.getBoundingClientRect().width??0;s(e=>{const l=(a??[]).map((a,l)=>{const n=t[l]?.getBoundingClientRect().width??0;return n>0?n:e?.tabWidths[l]??0}),i=n>0?n:e?.moreButtonWidth??0,r=e?.tabWidths.length===l.length&&e.tabWidths.every((e,a)=>e===l[a]);return e&&r&&e.moreButtonWidth===i?e:{tabWidths:l,moreButtonWidth:i}})},[a,e]);const h=e=>{void 0!==e&&(d?.selectionManager.setFocused(!0),d?.selectionManager.setFocusedKey(e),d?.setSelectedKey(e),l.current?.querySelector(`[role="tab"][data-key="${e}"]`)?.focus())};return{ref:l,moreButtonRef:i,visibleIndexes:x,overflowIndexes:b,handleKeyDownCapture:e=>{if(0===b.length)return;const a=document.activeElement===i.current,t=d?.selectionManager.focusedKey,l=a?-1:f.indexOf(Number(t));if(a||-1!==l)switch(e.key){case"ArrowRight":if(a)return;return e.preventDefault(),e.stopPropagation(),void(l<f.length-1?h(f[l+1]):i.current?.focus());case"ArrowLeft":return e.preventDefault(),e.stopPropagation(),void(a?h(f[f.length-1]):l>0&&h(f[l-1]));case"Home":if(a)return;return e.preventDefault(),e.stopPropagation(),void h(f[0]);case"End":if(a)return;return e.preventDefault(),e.stopPropagation(),void h(f[f.length-1])}}}})({overflowEnabled:y,childrenArray:w}),S=a.createElement("span",{className:"maxio-tabs__tab__content"},p,a.createElement(xa,{variant:"chevron-down",className:"maxio-tabs__more__chevron"})),D=C.map(e=>{return`#${a=E,"undefined"!=typeof CSS&&"function"==typeof CSS.escape?CSS.escape(a):a.replace(/[^a-zA-Z0-9_-]/g,"\\$&")} [role="tablist"] > .maxio-tabs__tab:nth-child(${e+1})`;var a});return a.createElement("div",{id:E,className:N,ref:I,onKeyDownCapture:R},D.length>0&&a.createElement("style",null,`${D.join(", ")} { display: none; }`),a.createElement(Pe,ma({"aria-label":i,className:"maxio-contents"},x),(w??[]).map((e,a)=>r(e,{key:a,value:a}))),y&&C.length>0&&a.createElement(A,{isOpen:v,onOpenChange:_},a.createElement(V,{ref:k,className:"maxio-tabs__tab maxio-tabs__more__trigger","aria-label":p},S),v&&a.createElement(It,{hideArrow:!0,placement:"bottom end",className:"maxio-tabs__more__menu"},a.createElement(B,{"aria-label":`${p} tabs`,onAction:e=>{h?.setSelectedKey(e),requestAnimationFrame(()=>{I.current?.querySelector(`[role="tab"][data-key="${e}"]`)?.focus()})}},C.map(e=>{const t=w[e],{disabled:l,type:n,"aria-label":i,"aria-labelledby":r}=t.props,o="icon"===n?t.props.icon:t.props.children;return a.createElement(F,{key:e,id:e,isDisabled:!!l,"aria-label":i,"aria-labelledby":r,className:"maxio-tabs__more__item"},o)})))))},ql=({children:e,size:t,sentiment:l,kind:n="primary",leadingIcon:i,trailingIcon:r})=>{const o=b("maxio-tag",`maxio-tag--${n}`,!!l&&`maxio-tag--${l}`,!!t&&`maxio-tag--${t}`);return a.createElement("div",{className:o},i&&a.createElement(xa,{variant:i,className:"maxio-tag__icon"}),a.createElement("span",{className:"maxio-tag__label"},e),r&&a.createElement(xa,{variant:r,className:"maxio-tag__icon"}))},Gl=({children:e,className:t,...l})=>a.createElement("div",ma({className:b("maxio-card__header",t)},l),e);Gl.displayName="Card.Header";const Zl=({children:e,className:t,...l})=>a.createElement("div",ma({className:b("maxio-card__body",t)},l),e);Zl.displayName="Card.Body";const Yl=({children:e,className:t,...l})=>a.createElement("div",ma({className:b("maxio-card__footer",t)},l),e);Yl.displayName="Card.Footer";const Xl=({children:e,className:t,variant:l="primary",...n})=>a.createElement("div",ma({className:b("maxio-card",`maxio-card--${l}`,t)},n),e);Xl.displayName="Card";const Ql=Object.assign(Xl,{Header:Gl,Body:Zl,Footer:Yl}),Jl=({children:e,className:t,href:l,onClick:n,target:i,disabled:r})=>{const o=l||n;if(!o)return a.createElement("div",{className:"maxio-tile"},e);const s=b("maxio-tile",t,{"maxio-tile--clickable":o,"maxio-tile--disabled":r});return a.createElement("a",{className:s,href:l,target:i,onClick:e=>{r&&l&&e.preventDefault(),!r&&n&&n()}},e)};var en,an,tn,ln;function nn(){return nn=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var l in t)({}).hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},nn.apply(null,arguments)}const rn=a=>e.createElement("svg",nn({xmlns:"http://www.w3.org/2000/svg","data-name":"Maxio Logo SVG",viewBox:"0 0 1036 240"},a),en||(en=e.createElement("path",{d:"M59.32 11.3 70.64 0l40.74 40.35v70.99H40.89L0 70.52l11.15-11.14 36.2 36.15h30.07l3.07-3.39-50.91-51.15 10.99-10.97 51.24 50.83 3.72-3.38V47.13zM180.68 11.3 169.36 0l-40.73 40.35v70.99h70.48L240 70.51l-11.15-11.14-36.2 36.15h-30.06l-3.07-3.39 50.91-51.15-10.99-10.97-51.24 50.83-3.72-3.38V47.12l36.2-35.83ZM59.32 228.7l11.31 11.29 40.74-40.35v-70.99H40.89L0 169.48l11.15 11.14 36.2-36.15h30.07l3.07 3.39-50.92 51.15 10.99 10.97 51.24-50.83 3.72 3.38v30.34zM180.68 228.7l-11.32 11.29-40.73-40.35v-70.99h70.48L240 169.48l-11.15 11.14-36.2-36.15h-30.06l-3.07 3.39 50.91 51.15-10.99 10.97-51.24-50.83-3.72 3.38v30.34zM1015.27 139.55c0-29.94-23.74-53.46-52.11-53.46s-52.11 23.52-52.11 53.46 23.74 53.46 52.11 53.46 52.11-23.52 52.11-53.46m20.32.95c-.5 40.27-32.73 72.76-72.43 72.76h-.94c-39.58-.52-71.5-33.32-71.5-73.71s32.43-73.71 72.44-73.71h.94c39.57.52 71.5 33.32 71.5 73.71v.95Z"})),an||(an=e.createElement("path",{fillRule:"evenodd",d:"M870.39 24h-20.33v20.33h20.33zm0 40.67h-20.33v148.59h20.33z"})),tn||(tn=e.createElement("path",{fillRule:"evenodd",d:"M850.05 24h20.33v20.33h-20.33zM695.01 82.85l50.83 56.28v6.53l-50.28 55.67 15.23 13.2 49.22-54.49h4.71l49.22 54.49 15.23-13.2-50.28-55.67v-6.53l50.83-56.28-15.23-13.2-50.15 55.52h-3.96l-50.15-55.52L695 82.85ZM660.49 78.64c-9.41-9.28-23.26-13.97-41.02-13.97-31.13 0-52.44 18.93-58.09 44.86l-.28 1.27 19.33 3.72.31-1.14c2.39-8.91 6.66-16.54 13.04-21.94 6.36-5.39 14.91-8.63 26.02-8.63s19.12 3.25 24.76 8.96c5.64 5.72 8.73 14.06 8.73 24.53v6.11L616.62 130l-3.26.68c-16.14 3.47-29.79 7.84-39.59 14.45-10.54 7.11-16.64 16.83-16.64 30.62 0 12.51 4.51 22.62 12.5 29.59 7.96 6.95 19.25 10.67 32.63 10.67 22.27 0 41.87-12.03 51.04-27.03v25.55h21.39v-95.3c0-17.6-4.77-31.3-14.19-40.58Zm-40.09 68.13c-12.86 2.77-23.05 5.42-30.03 9.63-3.46 2.09-6.08 4.54-7.84 7.54s-2.71 6.62-2.71 11.15c0 6.38 2.1 12.12 6.32 16.27 4.22 4.14 10.7 6.82 19.7 6.82 26.85 0 47.46-20.48 47.46-51.36v-7.2l-32.9 7.14Z"})),ln||(ln=e.createElement("path",{d:"M434.8 188.74h4.54l61.73-164.33.15-.41h35.57v189.35H515.9V55.37h-4.33l-59.7 157.57-.15.41h-29.29l-61.2-157.98h-4.35v157.98H336V24h35.57z"}))),on=e=>{const{size:t="sm",className:l,variant:n="lockup",alt:i="maxio logo"}=e,r="mark"===n,o="number"==typeof t;return a.createElement(rn,{role:"img",viewBox:r?"0 0 240 240":"0 0 1036 240","aria-label":i,height:o?t:void 0,className:b("maxio-logo",!o&&`maxio-logo--${t}`,r&&"maxio-logo--mark",l)})},sn=({state:e,...l})=>{const n=t(null),{toastProps:i,contentProps:r,titleProps:o,closeButtonProps:s}=sa(l,e,n),{closable:c=!0,underline:m=!0,external:d=!1}=l.toast.content,u=b("maxio-toast",{[`maxio-toast--${l.toast.content.sentiment}`]:l.toast.content.sentiment}),p={default:"info-circle-fill",success:"check-circle-fill",warning:"warning-circle-fill",danger:"error-fill",info:"info-circle-fill"}[l.toast.content.sentiment||"default"];return a.createElement("div",ma({className:u,"data-maxio-mode":"dark"},i,{ref:n}),a.createElement(xa,{variant:p,className:"maxio-toast__icon"}),a.createElement("div",ma({className:"maxio-toast__container"},r),a.createElement("div",ma({className:"maxio-toast__content"},o),l.toast.content.title&&a.createElement("span",{className:"maxio-toast__title"},l.toast.content.title),l.toast.content.message&&a.createElement("span",{className:"maxio-toast__message"},l.toast.content.message),l.toast.content.link?.text&&l.toast.content.link?.href&&a.createElement(ha,{href:l.toast.content.link.href,underline:m,external:d},l.toast.content.link.text))),c&&a.createElement(wa,ma({variant:"ghost",icon:a.createElement(xa,{variant:"cross"}),"aria-label":"Dismiss Notification",className:"maxio-toast__dismiss"},s)))},cn=({state:e,...t})=>{const l=a.useRef(null),{regionProps:n}=ca(t,e,l);return a.createElement("div",ma({},n,{ref:l,className:t.className,style:{display:"flex",flexDirection:"column",gap:"10px"}}),e.visibleToasts.map(t=>a.createElement(sn,{key:t.key,toast:t,state:e})))},mn=({children:e,...t})=>{const{maxVisibleToasts:l=5,...n}=t,i=ia({maxVisibleToasts:l,...n});return a.useEffect(()=>{console.warn("ToastProvider is deprecated. Please use the global toast API instead.")},[]),a.createElement(a.Fragment,null,e(i),i.visibleToasts.length>0&&a.createElement(cn,ma({},t,{state:i})))},dn=c(null),un=({children:e,toastQueue:t,...l})=>{const n=ra(t),i=p(()=>{n.visibleToasts.forEach(e=>{t.close(e.key)})},[n.visibleToasts,t]),r=x(()=>({addToast:t.add.bind(t),removeToast:t.clear.bind(t),removeAllToasts:i,state:n}),[t,i,n]);return a.createElement(dn.Provider,{value:r},e,n.visibleToasts.length>0&&a.createElement(cn,ma({},l,{state:n})))},pn=()=>{const e=m(dn);if(!e)throw new Error("useToast must be used within a GlobalToastProvider. Please wrap your app with <GlobalToastProvider> to use the global toast API.");return e};class xn extends oa{}const gn=({defaultChecked:e,checked:t,onChange:l,disabled:n,valueDescription:i,valueDescriptionPosition:r,className:o,name:c,id:m,...d})=>{const u=s(),x="boolean"==typeof e,g=m||u,f="left"===r?"row":"row-reverse",h=i&&r,E=p(e=>{if("Enter"===e.code||"Space"===e.code){e.preventDefault();const a=e.currentTarget.checked;x&&(e.currentTarget.checked=!a),l&&l(!a,e)}},[x,l]),v=d["aria-label"]||(h?void 0:i);return a.createElement("div",{className:b("maxio-toggle",o,{"maxio-toggle--disabled":n}),style:{display:"inline-flex",flexDirection:f},"data-testid":"toggle-container"},h?a.createElement("label",{className:"maxio-toggle__label",htmlFor:g},i):null,a.createElement("div",{className:"maxio-toggle__container"},a.createElement("input",{type:"checkbox",defaultChecked:e,checked:t,onChange:e=>{l&&l(e.target.checked,e)},onKeyDown:E,disabled:n,className:"maxio-toggle__checkbox",id:g,name:c,"aria-label":v}),a.createElement("div",{className:"maxio-toggle__track",role:"switch","aria-checked":t,"aria-hidden":"true"},a.createElement("div",{className:"maxio-toggle__handle"}),a.createElement("span",{className:"maxio-toggle__icon"},a.createElement("i",{className:"maxio-toggle__icon-on"})),a.createElement("span",{className:"maxio-toggle__icon"},a.createElement("i",{className:"maxio-toggle__icon-off"})))))},bn=({children:e,actions:t,sideNavIsClosed:l,openSideNav:n})=>a.createElement("nav",{className:"maxio-top-bar"},l&&a.createElement(wa,{"aria-label":"Open Side Navigation",variant:"ghost",icon:a.createElement(xa,{variant:"sidebar"}),onClick:n}),a.createElement(Kt,{grow:!0,justifyContent:"end"},e),t),fn=({...e})=>{const l=t(null),{buttonProps:n}=E(e,l);return a.createElement("button",ma({},n,{className:"maxio-chip__dismiss-button"}),a.createElement(xa,{variant:"cross-circle-fill",className:"maxio-chip__icon"}))},hn=({label:e,onDismiss:l,dismissLabel:n,leadingIcon:i,trailingIcon:r,title:o,...s})=>{const c=t(null),m=$e(s),{buttonProps:d}=P(s,m,c),u=b("maxio-chip",{"maxio-chip--selected":m?.isSelected}),p=b("maxio-chip__button",{"maxio-chip--dismissible":l});return a.createElement("div",{className:u},a.createElement("button",ma({className:p,ref:c},d,{title:o}),i&&a.createElement(xa,{variant:i,className:"maxio-chip__icon"}),a.createElement("span",{className:"maxio-chip__label"},e),r&&!l&&a.createElement(xa,{variant:r,className:"maxio-chip__icon"})),l&&a.createElement(fn,{onPress:l,"aria-label":n}))},En=({children:e,templateColumns:t,templateRows:l,autoColumns:n,autoRows:i,inline:r,column:o,columnStart:s,columnEnd:c,row:m,rowStart:d,rowEnd:u,gap:p,gapX:x,gapY:g,className:f,justifyContent:h,alignItems:E,...v})=>{const _=b(f,{"maxio-grid":!r,"maxio-inline-grid":r,[`maxio-grid-cols-${t}`]:t,[`maxio-grid-rows-${l}`]:l,[`maxio-auto-cols-${n}`]:n,[`maxio-auto-rows-${i}`]:i,["maxio-col-"+("auto"===o?"auto":`span-${o}`)]:o,[`maxio-col-start-${s}`]:s,[`maxio-col-end-${c}`]:c,["maxio-row-"+("auto"===m?"auto":`span-${m}`)]:m,[`maxio-row-start-${d}`]:d,[`maxio-row-end-${u}`]:u,[`maxio-gap-${p}`]:void 0!==p,[`maxio-gap-x-${x}`]:void 0!==x,[`maxio-gap-y-${g}`]:void 0!==g,[`maxio-justify-${h}`]:h,[`maxio-items-${E}`]:E});return a.createElement("div",ma({className:_||void 0},v),e)},vn={success:"maxio-auth-layout__heading--success",danger:"maxio-auth-layout__heading--danger"},_n=({children:e,heading:t,description:l,sentiment:n="success",leadingElement:i=null,alert:r,topAddon:o=null,footer:s})=>a.createElement("div",{className:"maxio-auth-layout"},a.createElement(Kt,{alignItems:"center",justifyContent:"between"},a.createElement(on,{size:"md"}),o),r&&a.createElement(ya,{display:"block",title:r.title,sentiment:r.sentiment},r.children),a.createElement(Ql,{variant:"secondary"},a.createElement(Ql.Body,null,a.createElement(Kt,{flexDirection:"col",gap:6},a.createElement(Kt,{flexDirection:"col",gap:2},a.createElement(Kt,{alignItems:"center",gap:2},i,a.createElement(Ft,{size:"lg",className:b("maxio-auth-layout__heading",vn[n])},t)),l&&a.createElement(Kt,{style:{color:"var(--maxio-color-text-tertiary)"}},a.createElement(Wt,{size:"sm",className:"maxio-auth-layout__description"},l))),e)),s&&a.createElement(Ql.Footer,null,s)));export{fa as ActionList,ya as Alert,_n as AuthLayout,$a as Avatar,Ta as Banner,Wt as Body,Aa as Breadcrumbs,Ma as BreadcrumbsItem,Na as Button,gl as Calendar,Ql as Card,vt as Checkbox,wt as CheckboxGroup,hn as Chip,jt as Code,ll as ComboBox,Qa as CopyToClipboard,At as DataTable,xl as DateField,hl as DatePicker,_l as DateRangePicker,Ht as Display,Vt as Drawer,qt as EmptyState,Kt as Flex,Nt as FormErrorMessage,_t as FormHelperText,un as GlobalToastProvider,En as Grid,Ft as Heading,xa as Icon,wa as IconButton,Ut as Label,ha as Link,Qt as ListBox,Ea as LoadingSpinner,on as Logo,Sa as Menu,Pa as MenuButton,Da as MenuList,cl as NumberField,Ka as OverlayTrigger,Nl as Pagination,It as Popover,wl as ProgressBar,il as Radio,rl as RadioGroup,El as RangeCalendar,ol as SearchField,kl as SegmentedControl,ul as Select,Bl as SideNav,Fl as Tab,Kl as TabList,jl as TabPanel,Ul as TabPanels,Hl as Tabs,ql as Tag,ml as TextArea,sl as TextField,dl as TextInput,Jl as Tile,mn as ToastProvider,xn as ToastQueue,gn as Toggle,Ba as Tooltip,Ga as TooltipTrigger,bn as TopBar,Ua as useElementResizeObserver,Ha as useHover,Wa as useOverlayTrigger,pn as useToast,ja as useWindowSize};