@ahrowe/ui 0.41.1 → 0.41.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.cjs CHANGED
@@ -1,9 +1,9 @@
1
- "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("react");c=s(c,1);let l=require("classnames");l=s(l,1);let u=require("@fortawesome/react-fontawesome"),d=require("@fortawesome/free-solid-svg-icons"),f=require("react/jsx-runtime"),p=require("react-dom"),m=require("@dnd-kit/core"),h=require("@dnd-kit/sortable"),g=require("@dnd-kit/utilities"),_=require("react-number-format"),v=require("@ahrowe/form-validation");var y=function(e){return e.Default=`default`,e.Primary=`primary`,e.Plain=`plain`,e}({}),b={accordion:`accordion_YZt8B`,"accordion-title":`accordion-title_CGYKY`,accordionTitle:`accordion-title_CGYKY`,"accordion-active":`accordion-active_mocpj`,accordionActive:`accordion-active_mocpj`,"accordion-header":`accordion-header_OEjXM`,accordionHeader:`accordion-header_OEjXM`,"accordion-header-active":`accordion-header-active_6KvnM`,accordionHeaderActive:`accordion-header-active_6KvnM`,"accordion-body":`accordion-body_2o-mY`,accordionBody:`accordion-body_2o-mY`,"accordion-body-inner":`accordion-body-inner_JI9nJ`,accordionBodyInner:`accordion-body-inner_JI9nJ`,"accordion-body-active":`accordion-body-active_sb2-U`,accordionBodyActive:`accordion-body-active_sb2-U`,"accordion-icon":`accordion-icon_kLqp-`,accordionIcon:`accordion-icon_kLqp-`,"accordion-icon-active":`accordion-icon-active_lJwG8`,accordionIconActive:`accordion-icon-active_lJwG8`},x={accordion:`accordion_X64Nz`,"accordion-title":`accordion-title_2q-FF`,accordionTitle:`accordion-title_2q-FF`,"accordion-active":`accordion-active_72VwY`,accordionActive:`accordion-active_72VwY`,"accordion-header":`accordion-header_XuGF6`,accordionHeader:`accordion-header_XuGF6`,"accordion-header-active":`accordion-header-active_xf8Ch`,accordionHeaderActive:`accordion-header-active_xf8Ch`,"accordion-body":`accordion-body_0Jsco`,accordionBody:`accordion-body_0Jsco`,"accordion-body-inner":`accordion-body-inner_0UBPf`,accordionBodyInner:`accordion-body-inner_0UBPf`,"accordion-body-active":`accordion-body-active_XFSy1`,accordionBodyActive:`accordion-body-active_XFSy1`,"accordion-icon":`accordion-icon_W1mz5`,accordionIcon:`accordion-icon_W1mz5`,"accordion-icon-active":`accordion-icon-active_LI98q`,accordionIconActive:`accordion-icon-active_LI98q`},S={accordion:`accordion_wkZJf`,"accordion-title":`accordion-title_-qwNy`,accordionTitle:`accordion-title_-qwNy`,"accordion-active":`accordion-active_t9-a2`,accordionActive:`accordion-active_t9-a2`,"accordion-header":`accordion-header_-oST6`,accordionHeader:`accordion-header_-oST6`,"accordion-header-active":`accordion-header-active_UvKis`,accordionHeaderActive:`accordion-header-active_UvKis`,"accordion-body":`accordion-body_ZagrJ`,accordionBody:`accordion-body_ZagrJ`,"accordion-body-inner":`accordion-body-inner_HE7PL`,accordionBodyInner:`accordion-body-inner_HE7PL`,"accordion-icon":`accordion-icon_kHxym`,accordionIcon:`accordion-icon_kHxym`,"accordion-icon-active":`accordion-icon-active_-L8BH`,accordionIconActive:`accordion-icon-active_-L8BH`},C=(0,c.createContext)(null),w=(0,c.createContext)(void 0);function T(e,t){if(!e)return t??{};if(!t)return e;let n={...e};for(let r in t)n[r]={...e[r],...t[r]};return n}function E({children:e,defaultProps:t,presentation:n}){let r=(0,c.useContext)(C),i=(0,c.useMemo)(()=>T(r,t),[r,t]),a=(0,c.useContext)(w),o=n??a;return(0,f.jsx)(C.Provider,{value:i,children:(0,f.jsx)(w.Provider,{value:o,children:e})})}function D(e,t){let n=(0,c.useContext)(C)?.[e];if(!n)return t;let r={...n};for(let e in t){let n=t[e];n!==void 0&&(r[e]=n)}return r}function O(e,t,n){let r=(0,c.useContext)(C)?.[e]?.labels;return{...n,...r,...t}}function k(){return(0,c.useContext)(w)}var A=function(e){return e.Default=`default`,e.Sheet=`sheet`,e.Auto=`auto`,e}({});function j(e){return e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)}var M={[y.Default]:b,[y.Primary]:x,[y.Plain]:S};function N(e){let{id:t=``,title:n=``,children:r=null,expanded:i=null,onHeaderClicked:a=()=>{},styleType:o=y.Default,startOpen:s=!1,hideHeader:p=!1,className:m,style:h,classNames:g,styles:_,...v}=D(`Accordion`,e),b=M[o],x=(0,c.useId)(),S=`${x}-header`,C=`${x}-body`,w=(0,c.useRef)(null),T=(0,c.useRef)(null),[E,O]=(0,c.useState)(i??s),[k,A]=(0,c.useState)(null);(0,c.useEffect)(()=>{i!==null&&O(i)},[i]),(0,c.useEffect)(()=>{let e=w.current;e&&(e.inert=!E)},[E]),(0,c.useEffect)(()=>{let e=T.current;if(!e)return;let t=new ResizeObserver(()=>A(e.offsetHeight));return t.observe(e),()=>t.unobserve(e)},[]);function N(){let e=!E;a(t,e),i===null&&O(e)}let P={height:E?k??`auto`:`0px`};return(0,f.jsxs)(`div`,{...v,id:t||void 0,className:(0,l.default)(b.accordion,E&&b.accordionActive,m,g?.root),style:{...h,..._?.root},children:[!p&&(0,f.jsxs)(`div`,{className:(0,l.default)(b.accordionHeader,E&&b.accordionHeaderActive,g?.header),style:_?.header,onClick:N,role:`button`,tabIndex:0,id:S,"aria-expanded":E,"aria-controls":C,onKeyDown:e=>{j(e)&&(e.preventDefault(),N())},children:[(0,f.jsx)(`div`,{className:(0,l.default)(b.accordionTitle,g?.title),style:_?.title,children:n}),(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronDown,className:(0,l.default)(b.accordionIcon,E&&b.accordionIconActive,g?.icon),style:_?.icon})]}),(0,f.jsx)(`div`,{ref:w,id:C,role:`region`,"aria-labelledby":p?void 0:S,className:(0,l.default)(b.accordionBody,E&&b.accordionBodyActive,g?.body),style:{...P,..._?.body},children:(0,f.jsx)(`div`,{className:(0,l.default)(b.accordionBodyInner,g?.bodyInner),style:_?.bodyInner,ref:T,children:r})})]})}var P={actionButtons:`actionButtons_7GybR`,"actionButtons-margin":`actionButtons-margin_-XoFP`,actionButtonsMargin:`actionButtons-margin_-XoFP`,"actionButtons-stacked":`actionButtons-stacked_ZGpUN`,actionButtonsStacked:`actionButtons-stacked_ZGpUN`},F={button:`button_wYLPJ`,"button-notAllowed":`button-notAllowed_xGT-E`,buttonNotAllowed:`button-notAllowed_xGT-E`,"button-loading-icon":`button-loading-icon_1pTTz`,buttonLoadingIcon:`button-loading-icon_1pTTz`,"button-content":`button-content_Q-0-4`,buttonContent:`button-content_Q-0-4`,"button-loading":`button-loading_TY6y7`,buttonLoading:`button-loading_TY6y7`,"button-loading-container":`button-loading-container_pMSta`,buttonLoadingContainer:`button-loading-container_pMSta`,"button-withIcon":`button-withIcon_IXEKA`,buttonWithIcon:`button-withIcon_IXEKA`,"button-style-default":`button-style-default_JmAqD`,buttonStyleDefault:`button-style-default_JmAqD`,"button-style-primary":`button-style-primary_Ra5i-`,buttonStylePrimary:`button-style-primary_Ra5i-`,"button-style-delete":`button-style-delete_jpTCf`,buttonStyleDelete:`button-style-delete_jpTCf`,"button-background":`button-background_9Vfo5`,buttonBackground:`button-background_9Vfo5`,"button-size-default":`button-size-default_N4HG9`,buttonSizeDefault:`button-size-default_N4HG9`,"button-size-small":`button-size-small_mn6jE`,buttonSizeSmall:`button-size-small_mn6jE`,"button-size-medium":`button-size-medium_gNVDM`,buttonSizeMedium:`button-size-medium_gNVDM`,"button-size-large":`button-size-large_xSIcS`,buttonSizeLarge:`button-size-large_xSIcS`,"button-size-icon":`button-size-icon_pkqwl`,buttonSizeIcon:`button-size-icon_pkqwl`,"button-ripple":`button-ripple_UGtt8`,buttonRipple:`button-ripple_UGtt8`},I={"spinner-loading":`spinner-loading_qbxX-`,spinnerLoading:`spinner-loading_qbxX-`,"animate-spinner":`animate-spinner_6HoVF`,animateSpinner:`animate-spinner_6HoVF`,spin:`spin_axdh6`};function L({className:e}){return(0,f.jsx)(`svg`,{"data-testid":`spinner`,className:(0,l.default)(I.spinnerLoading,e),xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 100 100`,fill:`none`,stroke:`var(--primary-color)`,children:(0,f.jsx)(`circle`,{cx:`50`,cy:`50`,r:`45`,strokeWidth:`10`})})}var R=L,z=function(e){return e.Primary=`primary`,e.Default=`default`,e.Delete=`delete`,e}({}),B=function(e){return e.Default=`default`,e.Small=`small`,e.Medium=`medium`,e.Large=`large`,e.Icon=`icon`,e}({}),V=function(e){return e.Button=`button`,e.Reset=`reset`,e.Submit=`submit`,e}({}),H={ripple:`ripple_TsvyF`,"ripple-container":`ripple-container_QzHdC`,rippleContainer:`ripple-container_QzHdC`},U=[`a[href]`,`button`,`input`,`select`,`textarea`,`label`,`[contenteditable=""]`,`[contenteditable="true"]`,`[role="button"]`,`[role="link"]`,`[role="checkbox"]`,`[role="combobox"]`,`[role="menuitem"]`,`[role="menuitemcheckbox"]`,`[role="menuitemradio"]`,`[role="option"]`,`[role="radio"]`,`[role="searchbox"]`,`[role="slider"]`,`[role="spinbutton"]`,`[role="switch"]`,`[role="tab"]`,`[role="textbox"]`,`[role="treeitem"]`].join(`, `);function W(e,t){if(!t||!(e instanceof Element))return!1;let n=e.closest(U);return!!n&&n!==t&&t.contains(n)}function G({disabled:e=!1,children:t,className:n,style:r,overflowHidden:i=!0,rippleAnimationLength:a=.6,rippleBackground:o=`rgba(255, 255, 255, 0.2)`,manualOnly:s=!1,ref:l,...u}){let d=(0,c.useRef)(null),p=(0,c.useRef)(null);function m(t,n){if(e)return;let r=document.createElement(`div`);r.style.left=`${t}px`,r.style.top=`${n}px`,r.style.background=o,r.classList.add(H.ripple),d.current?.appendChild(r),setTimeout(()=>{d.current?.removeChild(r)},a*1e3+50)}function h(e){if(!d.current)return;let t=d.current.getBoundingClientRect();m(e.clientX-t.x,e.clientY-t.y)}(0,c.useImperativeHandle)(l,()=>({addRipple(){let e=d.current;e&&m(e.offsetWidth/2,e.offsetHeight/2)}})),(0,c.useEffect)(()=>{p.current=h}),(0,c.useEffect)(()=>{if(t!==void 0||s)return;let e=d.current?.parentElement;if(!e)return;let n=t=>{W(t.target,e)||p.current?.(t)};return e.addEventListener(`click`,n),()=>e.removeEventListener(`click`,n)},[t,s]);let g={"--ripple-animation-length":`${a}s`};return t===void 0?(0,f.jsx)(`div`,{className:H.rippleContainer,ref:d,style:{overflow:i?`hidden`:`visible`,...g}}):(0,f.jsxs)(`div`,{...u,className:n,onClick:s?void 0:e=>{W(e.target,e.currentTarget)||h(e)},style:{position:`relative`,...r},children:[t,(0,f.jsx)(`div`,{className:H.rippleContainer,ref:d,style:{overflow:i?`hidden`:`visible`,...g}})]})}function ee(e){return typeof e==`object`&&!!e&&`prefix`in e&&`iconName`in e&&`icon`in e}function K(e,t={}){let{className:n,style:r}=t;return e==null?null:ee(e)?(0,f.jsx)(u.FontAwesomeIcon,{icon:e,className:n,style:r}):n||r?(0,f.jsx)(`span`,{className:n,style:r,children:e}):e}var te={default:F.buttonStyleDefault,primary:F.buttonStylePrimary,delete:F.buttonStyleDelete},q={default:F.buttonSizeDefault,small:F.buttonSizeSmall,medium:F.buttonSizeMedium,large:F.buttonSizeLarge,icon:F.buttonSizeIcon};function ne(e){let{className:t,style:n,type:r=V.Button,styleType:i=z.Default,size:a=B.Default,onClick:o=()=>{},children:s,icon:u,isLoading:d=!1,disabled:p=!1,title:m=void 0,ref:h,classNames:g,styles:_,...v}=D(`Button`,e),y=(0,c.useRef)(null);function b(e){return e.detail===0&&y.current?.addRipple(),o(e)}return(0,f.jsx)(`button`,{...v,className:(0,l.default)(F.button,te[i],q[a],{[F.buttonNotAllowed]:d||p},t),style:n,type:r,onClick:b,disabled:p||d,title:m,ref:h,children:(0,f.jsx)(G,{ref:y,className:F.buttonRipple,disabled:d||p,children:(0,f.jsx)(`div`,{className:(0,l.default)(F.buttonBackground,g?.background),style:_?.background,children:(0,f.jsxs)(`div`,{className:(0,l.default)(F.buttonContent,g?.content),style:_?.content,children:[d?(0,f.jsx)(`div`,{className:(0,l.default)(F.buttonLoadingContainer,g?.loadingContainer),style:_?.loadingContainer,children:(0,f.jsx)(R,{className:F.buttonLoadingIcon})}):null,(0,f.jsxs)(`div`,{className:(0,l.default)(g?.label,{[F.buttonLoading]:d,[F.buttonWithIcon]:!!u}),style:_?.label,children:[u?K(u):null,s]})]})})})})}ne.StyleType=z,ne.Size=B,ne.Type=V;var J={submit:`Save`,cancel:`Cancel`};function re(e){let{onSubmit:t=()=>null,onClose:n=()=>null,labels:r,submitButtonStyle:i=z.Primary,isSubmitButtonLoading:a=!1,isSubmitButtonDisabled:o=!1,submitButtonIcon:s=void 0,cancelButtonStyle:c=z.Default,isCancelButtonLoading:u=!1,isCancelButtonDisabled:d=!1,cancelButtonIcon:p=void 0,hidePrimaryButton:m=!1,hideSecondaryButton:h=!1,noMargin:g=!1,stackButtons:_=!1,className:v,style:y,classNames:b,styles:x,...S}=D(`ActionButtons`,e),C=O(`ActionButtons`,r,J);return(0,f.jsxs)(`div`,{...S,className:(0,l.default)(P.actionButtons,!g&&P.actionButtonsMargin,_&&P.actionButtonsStacked,v,b?.root),style:{...y,...x?.root},children:[!m&&(0,f.jsx)(ne,{isLoading:a,disabled:o,styleType:i,type:V.Submit,onClick:t,className:b?.submitButton,style:x?.submitButton,icon:s,children:C.submit}),!h&&(0,f.jsx)(ne,{isLoading:u,disabled:d,onClick:n,styleType:c,className:b?.cancelButton,style:x?.cancelButton,icon:p,children:C.cancel})]})}var ie={interactableDiv:`interactableDiv_Ej8Fi`};function ae({className:e,children:t,onClick:n,onKeyDown:r,tabIndex:i,ref:a,...o}){let s=(0,c.useCallback)(e=>{W(e.target,e.currentTarget)||n?.(e)},[n]),u=(0,c.useCallback)(e=>{j(e)&&(e.key===` `&&e.preventDefault(),e.currentTarget.click()),r?.(e)},[r]);return(0,f.jsx)(`div`,{className:(0,l.default)(ie.interactableDiv,e),onClick:n?s:void 0,tabIndex:i===void 0?n?0:void 0:i??void 0,role:n?`button`:void 0,onKeyDown:u,ref:a,...o,children:t})}var oe=ae,se={actionIcon:`actionIcon_ganSq`};function ce({icon:e,className:t=``,style:n,title:r=``,onClick:i=()=>{},classNames:a,styles:o,...s}){return(0,f.jsx)(oe,{...s,className:(0,l.default)(se.actionIcon,t,a?.root),style:{...n,...o?.root},title:r,onClick:i,children:K(e,{className:a?.icon,style:o?.icon})})}var le={scrollbarProvider:`scrollbarProvider_IMBFu`};function ue({className:e=void 0,children:t=void 0}){return(0,f.jsx)(`div`,{className:(0,l.default)(le.scrollbarProvider,e),children:t})}var Y=ue,de={id:`default`,variables:{"--grey":`#8A8A8A`,"--lightgrey":`#e0e0e0`,"--lightergrey":`#B1B1B1`,"--white":`#FFFFFF`,"--red":`#D6002A`,"--lighter-red":`#ffeae9`,"--green":`#287626`,"--lighter-green":`#C4FFC9`,"--blue":`#5873d5`,"--lighter-blue":`#C6DBFF`,"--black":`black`,"--orange":`#ff7f50`,"--lighter-orange":`#ffe5d9`,"--primary-color":`#8184d6`,"--primary-accent":`#90CAF9`,"--primary-lighter":`#9a9ce4`,"--accent-color":`var(--grey)`,"--accent-color-light":`var(--lightgrey)`,"--text-color":`var(--white)`,"--text-dark":`var(--lightergrey)`,"--text-light":`var(--lightergrey)`,"--text-on-primary":`var(--white)`,"--text-on-delete":`var(--white)`,"--border-color":`#656574`,"--focus-border-color":`var(--primary-color)`,"--background":`#393945`,"--background-accent":`#33333c`,"--background-accent-dark":`var(--grey)`,"--background-accent-light":`#484856`,"--background-modal":`#484856`,"--success-color":`var(--green)`,"--success-lighter":`var(--lighter-green)`,"--error-color":`var(--red)`,"--error-lighter":`var(--lighter-red)`,"--required-mark-color":`var(--error-color)`,"--info-color":`var(--blue)`,"--info-lighter":`var(--lighter-blue)`,"--warn-color":`var(--orange)`,"--warn-lighter":`var(--lighter-orange)`,"--default-font-size":`16px`,"--text-small-font-size":`14px`,"--header-font-size":`24px`,"--header-medium-font-size":`18px`,"--header-small-font-size":`16px`,"--default-font-weight":`400`,"--header-font-weight":`600`,"--input-background":`transparent`,"--input-icon-color":`var(--text-color)`,"--error-border-color":`var(--red)`,"--button-default-color":`var(--primary-color)`,"--button-default-border":`1px solid var(--primary-color)`,"--default-border-radius":`8px`,"--padding-sides":`15px`,"--margin-top":`10px`,"--default-font":`'Inter', sans-serif`,"--themed-font":`'Inter', sans-serif`,"--card-shadow":`0 3px 1px -2px rgb(0 0 0 / 20%), 0 2px 2px 0 rgb(0 0 0 / 14%), 0 1px 5px 0 rgb(0 0 0 / 12%)`,"--background-card-elevated":`var(--background-accent-light)`,"--background-card-outlined":`transparent`,"--background-card-filled":`var(--background-accent)`,"--spacing-s":`4px`,"--spacing-m":`8px`,"--spacing-l":`16px`}},fe=(0,c.createContext)(null),pe={themeRoot:`themeRoot_oegLp`,colorFade:`colorFade_eLv2g`};function me(e,t){let n=e.find(e=>e.id===t);return n?[...n.baseThemeId?me(e,n.baseThemeId):[],n.variables]:[]}function X({themes:e=[de],currentThemeId:t}){let n=e.find(e=>!e.baseThemeId)??e[0],r=n?n.variables:{},i=t?me(e,t):[];return Object.assign({},r,...i)}var Z=class extends c.Component{constructor(...e){super(...e),this.state={resolvedVariables:X(this.props),colorFadeActive:!1,currentThemeColor:null,resolvedFrom:{themes:this.props.themes,currentThemeId:this.props.currentThemeId}},this.colorFadeTimeout=null,this.wrapperRef=c.default.createRef(),this.themeColorMeta=null,this.createdThemeColorMeta=!1}static{this.contextType=fe}static getDerivedStateFromProps(e,t){let{themes:n,currentThemeId:r}=t.resolvedFrom;return e.themes===n&&e.currentThemeId===r?null:{resolvedVariables:X(e),colorFadeActive:!0,resolvedFrom:{themes:e.themes,currentThemeId:e.currentThemeId}}}componentDidMount(){this.readThemeColor()}componentDidUpdate(e,t){t.resolvedVariables!==this.state.resolvedVariables&&(this.readThemeColor(),this.colorFadeTimeout&&clearTimeout(this.colorFadeTimeout),this.colorFadeTimeout=setTimeout(()=>{this.setState({colorFadeActive:!1}),this.colorFadeTimeout=null},500)),t.currentThemeColor!==this.state.currentThemeColor&&this.syncThemeColorMeta(this.state.currentThemeColor??``)}componentWillUnmount(){this.colorFadeTimeout&&clearTimeout(this.colorFadeTimeout),this.createdThemeColorMeta&&=(this.themeColorMeta?.remove(),this.themeColorMeta=null,!1)}syncThemeColorMeta(e){if(typeof document<`u`){if(!this.themeColorMeta){let e=document.head.querySelector(`meta[name="theme-color"]`);if(e)this.themeColorMeta=e;else{let e=document.createElement(`meta`);e.setAttribute(`name`,`theme-color`),document.head.appendChild(e),this.themeColorMeta=e,this.createdThemeColorMeta=!0}}this.themeColorMeta.setAttribute(`content`,e)}}readThemeColor(){if(this.context||!this.wrapperRef.current)return;let e=getComputedStyle(this.wrapperRef.current).getPropertyValue(`--primary-color`).trim();e!==this.state.currentThemeColor&&this.setState({currentThemeColor:e})}render(){let{children:e}=this.props,{resolvedVariables:t,colorFadeActive:n}=this.state;return(0,f.jsx)(`div`,{ref:this.wrapperRef,id:`themeProvider`,className:(0,l.default)(pe.themeRoot,n&&pe.colorFade),style:t,children:(0,f.jsx)(fe.Provider,{value:t,children:e})})}},he={id:`light`,baseThemeId:`default`,variables:{"--background":`#FFFFFF`,"--background-accent":`#F4F4F8`,"--background-accent-light":`#FAFAFD`,"--background-accent-dark":`#D4D4E0`,"--background-modal":`#FFFFFF`,"--text-color":`#1E1E2E`,"--text-dark":`#55556E`,"--text-light":`#75758C`,"--border-color":`#DCDCE8`,"--lighter-green":`#DFF5E1`,"--lighter-red":`#FCE4E6`,"--lighter-blue":`#E1EBFF`,"--lighter-orange":`#FFEADF`,"--accent-color":`#6E6E80`,"--input-background":`#F4F4F8`,"--card-shadow":`0 1px 3px rgb(0 0 0 / 8%), 0 1px 2px rgb(0 0 0 / 6%)`}},ge=(0,c.createContext)(void 0);function _e({children:e=null}){let t=(0,c.useContext)(fe),n=(0,c.useContext)(ge),r=n===void 0?document.getElementById(`bodyEnd`):n;return r?t?(0,p.createPortal)((0,f.jsx)(`div`,{className:pe.themeRoot,style:{display:`contents`,...t},children:e}),r):(0,p.createPortal)(e,r):null}var ve={container:`container_krdsW`,"container-top-left":`container-top-left_zfDTO`,containerTopLeft:`container-top-left_zfDTO`,"container-top-center":`container-top-center_CUIGc`,containerTopCenter:`container-top-center_CUIGc`,"container-top-right":`container-top-right_sB0KU`,containerTopRight:`container-top-right_sB0KU`,"container-bottom-left":`container-bottom-left_toJdF`,containerBottomLeft:`container-bottom-left_toJdF`,"container-bottom-center":`container-bottom-center_Bkf9m`,containerBottomCenter:`container-bottom-center_Bkf9m`,"container-bottom-right":`container-bottom-right_oRSMc`,containerBottomRight:`container-bottom-right_oRSMc`,toast:`toast_qBi4o`,toastSlideDown:`toastSlideDown_4lKWq`,"toast-bottom":`toast-bottom_X8ZIe`,toastBottom:`toast-bottom_X8ZIe`,toastSlideUp:`toastSlideUp_SGR5X`,"toast-dismissing":`toast-dismissing_xKmB-`,toastDismissing:`toast-dismissing_xKmB-`,toastFadeOut:`toastFadeOut_cvHYp`,"toast-paused":`toast-paused_NPmT4`,toastPaused:`toast-paused_NPmT4`,toastProgressBar:`toastProgressBar_6vBs6`,"toast-info":`toast-info_RlLli`,toastInfo:`toast-info_RlLli`,toastIcon:`toastIcon_xU1nA`,"toast-success":`toast-success_I1g1B`,toastSuccess:`toast-success_I1g1B`,"toast-error":`toast-error_MloFO`,toastError:`toast-error_MloFO`,"toast-warn":`toast-warn_pP6HB`,toastWarn:`toast-warn_pP6HB`,"toast-default":`toast-default_RTt2L`,toastDefault:`toast-default_RTt2L`,toastContent:`toastContent_gvyIv`,toastCloseButton:`toastCloseButton_n-YST`,toastShrink:`toastShrink_h89HS`};function ye(){return typeof window<`u`&&typeof window.matchMedia==`function`}function be(e){let t=(0,c.useCallback)(t=>{if(!ye())return()=>{};let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},[e]),n=(0,c.useCallback)(()=>ye()&&window.matchMedia(e).matches,[e]),r=(0,c.useCallback)(()=>!1,[]);return(0,c.useSyncExternalStore)(t,n,r)}function xe(){return be(`(pointer: coarse)`)}var Se=180,Ce=10;function we({onDismiss:e,axis:t=`x`,distanceThreshold:n=80,velocityThreshold:r=.5,disabled:i=!1,mobileOnly:a=!0}){let[o,s]=(0,c.useState)(null),l=(0,c.useCallback)(e=>s(e),[]),[u,d]=(0,c.useState)(!1),f=xe(),p=i||a&&!f,m=(0,c.useRef)(null),h=(0,c.useRef)(e);return(0,c.useEffect)(()=>{h.current=e}),(0,c.useEffect)(()=>{let e=o;if(!e||p)return;function i(r,i){if(!e)return;i!==`none`&&e.offsetHeight;let a=t===`x`?`translateX(${r}px)`:`translateY(${r}px)`;e.style.transition=i,e.style.transform=a;let o=Math.max(0,1-Math.abs(r)/(n*2.5));e.style.opacity=String(o)}function a(e){let n=m.current;if(!n||e.pointerId!==n.pointerId)return;let r=e.clientX-n.startX,a=e.clientY-n.startY;if(!n.axisLocked){let e=t===`x`?r:a,i=t===`x`?a:r;if(Math.abs(e)<Ce&&Math.abs(i)<Ce)return;if(Math.abs(i)>Math.abs(e)){n.active=!1;return}n.axisLocked=!0,d(!0)}n.active&&(e.preventDefault(),n.offset=t===`x`?r:a,i(n.offset,`none`))}function s(){let t=m.current;if(m.current=null,window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,s),!t||!t.active||!t.axisLocked){d(!1);return}let o=Math.max(1,Date.now()-t.startTime),c=t.offset/o;if(Math.abs(t.offset)>=n||Math.abs(c)>=r){let n=e?.getBoundingClientRect().width??0;i(Math.sign(t.offset||1)*(n+40),`transform ${Se}ms ease-out, opacity ${Se}ms ease-out`),setTimeout(()=>h.current(),Se)}else i(0,`transform ${Se}ms ease-out, opacity ${Se}ms ease-out`);d(!1)}function c(t){!m.current&&e&&(e.style.animation=`none`,m.current={pointerId:t.pointerId,startX:t.clientX,startY:t.clientY,startTime:Date.now(),offset:0,axisLocked:!1,active:!0},window.addEventListener(`pointermove`,a,{passive:!1}),window.addEventListener(`pointerup`,s),window.addEventListener(`pointercancel`,s))}return e.addEventListener(`pointerdown`,c),()=>{e.removeEventListener(`pointerdown`,c),window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,s)}},[o,t,n,r,p]),{ref:l,isDragging:u}}var Te={info:d.faCircleInfo,success:d.faCircleCheck,error:d.faCircleXmark,warn:d.faTriangleExclamation,default:d.faBell};function Ee({item:e,isBottom:t,onDismiss:n,labels:r}){let{id:i,content:a,options:o,dismissing:s}=e,{duration:p,showRemainingTime:m,showCloseButton:h,pauseOnHover:g,type:_,classNames:v,styles:y}=o,[b,x]=(0,c.useState)(!1),[S,C]=(0,c.useState)(!1),[w,T]=(0,c.useState)(!1),{ref:E,isDragging:D}=we({onDismiss:()=>{T(!0),n(i)}}),O=g&&(b||S)||D,k=(0,c.useRef)(p);return(0,c.useEffect)(()=>{if(p===0||O)return;let e=Date.now(),t=setTimeout(()=>n(i),k.current);return()=>{clearTimeout(t),k.current-=Date.now()-e}},[i,p,n,O]),(0,f.jsxs)(`div`,{ref:E,className:(0,l.default)(ve.toast,t?ve.toastBottom:null,ve[`toast-${_}`],s&&!w&&ve.toastDismissing,O&&ve.toastPaused,v?.root),style:y?.root,onMouseEnter:g?()=>x(!0):void 0,onMouseLeave:g?()=>x(!1):void 0,onFocus:g?()=>C(!0):void 0,onBlur:g?()=>C(!1):void 0,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:Te[_],className:(0,l.default)(ve.toastIcon,v?.icon),style:y?.icon}),(0,f.jsx)(`div`,{className:(0,l.default)(ve.toastContent,v?.content),style:y?.content,children:a}),h&&(0,f.jsx)(ce,{icon:d.faXmark,onClick:()=>n(i),className:(0,l.default)(ve.toastCloseButton,v?.closeButton),style:y?.closeButton,"aria-label":r.close}),m&&p>0&&(0,f.jsx)(`div`,{className:(0,l.default)(ve.toastProgressBar,v?.progressBar),style:{"--toast-duration":`${p}ms`,...y?.progressBar}})]})}var De=[];function Oe(e){De.length>0&&console.warn(`[Toast] More than one outermost AhroweProvider is mounted, and toasts show in only one of them. Keep one at the root and nest any other inside it.`),De.push(e)}function ke(e){let t=De.indexOf(e);t!==-1&&De.splice(t,1)}function Ae(e,t){let n=De[De.length-1];if(!n){console.error(`[Toast] No AhroweProvider found. Wrap your app in <AhroweProvider>.`);return}n(e,t)}var je={position:`top-right`,duration:4e3,showRemainingTime:!0,showCloseButton:!0,allowStacking:!0,pauseOnHover:!0,labels:{close:`Close`}},Me=220;function Ne(e){return ve[`container-${e}`]}function Pe({children:e,position:t=je.position,duration:n=je.duration,showRemainingTime:r=je.showRemainingTime,showCloseButton:i=je.showCloseButton,allowStacking:a=je.allowStacking,pauseOnHover:o=je.pauseOnHover,labels:s}){let[u,d]=(0,c.useState)([]),p=(0,c.useRef)(0),m=(0,c.useCallback)(e=>{d(t=>t.map(t=>t.id===e?{...t,dismissing:!0}:t)),setTimeout(()=>{d(t=>t.filter(t=>t.id!==e))},Me)},[]),h=(0,c.useCallback)((e,s)=>{let c={position:s?.position??t,duration:s?.duration??n,showRemainingTime:s?.showRemainingTime??r,showCloseButton:s?.showCloseButton??i,pauseOnHover:s?.pauseOnHover??o,type:s?.type??`default`,classNames:s?.classNames,styles:s?.styles};p.current+=1;let l={id:`toast-${p.current}`,content:e,options:c,dismissing:!1,labels:s?.labels};d(e=>!a&&e.length>0?(setTimeout(()=>{d([l])},Me),e.map(e=>({...e,dismissing:!0}))):[...e,l])},[t,n,r,i,a,o]),g=(0,c.useRef)(h);(0,c.useInsertionEffect)(()=>{g.current=h},[h]),(0,c.useInsertionEffect)(()=>{let e=(e,t)=>g.current(e,t);return Oe(e),()=>ke(e)},[]);let _=u.reduce((e,t)=>{let n=t.options.position;return e[n]||(e[n]=[]),e[n].push(t),e},{});return(0,f.jsxs)(f.Fragment,{children:[e,(0,f.jsx)(_e,{children:Object.entries(_).map(([e,t])=>(0,f.jsx)(`div`,{className:(0,l.default)(ve.container,Ne(e)),children:t.map(t=>(0,f.jsx)(Ee,{item:t,isBottom:e.startsWith(`bottom`),onDismiss:m,labels:{...je.labels,...s,...t.labels}},t.id))},e))})]})}var Q=()=>()=>{};function Fe({children:e,themes:t,currentThemeId:n,defaultProps:r,presentation:i,toast:a,scrollbars:o}){let s=(0,c.useContext)(ge)!==void 0,l=(0,c.useSyncExternalStore)(Q,()=>!0,()=>!1),[u]=(0,c.useState)(()=>typeof document>`u`?null:document.createElement(`div`)),d=(0,c.useCallback)(e=>{let t=e?.parentElement?.lastElementChild;t&&u&&u.parentNode!==t&&t.appendChild(u)},[u]),p=!s&&o!==!1;(0,c.useLayoutEffect)(()=>{if(!p||!u)return;let e=getComputedStyle(u).getPropertyValue(`--background-accent-light`).trim(),t=document.documentElement.style;return t.setProperty(`--ahrowe-page-scrollbar-thumb`,e),()=>{t.removeProperty(`--ahrowe-page-scrollbar-thumb`)}},[p,u,t,n]);let m=s&&(a!==void 0||o!==void 0);(0,c.useEffect)(()=>{m&&console.warn("[AhroweProvider] `toast` and `scrollbars` are read by the outermost AhroweProvider only. Set them there.")},[m]);let h=(0,f.jsxs)(ge.Provider,{value:l?u:null,children:[(0,f.jsx)(`template`,{ref:d}),(0,f.jsx)(Pe,{...a,children:e}),(0,f.jsx)(`div`,{})]});return(0,f.jsx)(E,{defaultProps:r,presentation:i,children:(0,f.jsx)(Z,{themes:t,currentThemeId:n,children:s?e:o===!1?h:(0,f.jsx)(Y,{children:h})})})}var Ie=function(e){return e.Default=`default`,e.Info=`info`,e.Success=`success`,e.Warn=`warn`,e.Error=`error`,e}({}),Le={alert:`alert_nX-Fv`,"alert-icon":`alert-icon_mzjuj`,alertIcon:`alert-icon_mzjuj`,"alert-content":`alert-content_-94Ey`,alertContent:`alert-content_-94Ey`,"alert-title":`alert-title_TqdRL`,alertTitle:`alert-title_TqdRL`,"alert-description":`alert-description_N5LkS`,alertDescription:`alert-description_N5LkS`,"alert-closeButton":`alert-closeButton_RQvYS`,alertCloseButton:`alert-closeButton_RQvYS`,"alert-style-default":`alert-style-default_KFyzb`,alertStyleDefault:`alert-style-default_KFyzb`,"alert-style-info":`alert-style-info_P-XG-`,alertStyleInfo:`alert-style-info_P-XG-`,"alert-style-success":`alert-style-success_zomWm`,alertStyleSuccess:`alert-style-success_zomWm`,"alert-style-warn":`alert-style-warn_jRYe5`,alertStyleWarn:`alert-style-warn_jRYe5`,"alert-style-error":`alert-style-error_Nk4As`,alertStyleError:`alert-style-error_Nk4As`},Re={[Ie.Default]:d.faBell,[Ie.Info]:d.faCircleInfo,[Ie.Success]:d.faCircleCheck,[Ie.Warn]:d.faTriangleExclamation,[Ie.Error]:d.faCircleXmark},ze={[Ie.Default]:Le.alertStyleDefault,[Ie.Info]:Le.alertStyleInfo,[Ie.Success]:Le.alertStyleSuccess,[Ie.Warn]:Le.alertStyleWarn,[Ie.Error]:Le.alertStyleError},Be={dismiss:`Dismiss`};function Ve(e){let{title:t,children:n=null,styleType:r=Ie.Default,icon:i,hideIcon:a=!1,onClose:o,className:s,style:c,classNames:u,styles:p,labels:m,...h}=D(`Alert`,e),g=O(`Alert`,m,Be);return(0,f.jsxs)(`div`,{...h,role:`alert`,className:(0,l.default)(Le.alert,ze[r],u?.root,s),style:{...c,...p?.root},children:[!a&&K(i??Re[r],{className:(0,l.default)(Le.alertIcon,u?.icon),style:p?.icon}),(0,f.jsxs)(`div`,{className:(0,l.default)(Le.alertContent,u?.content),style:p?.content,children:[t&&(0,f.jsx)(`div`,{className:(0,l.default)(Le.alertTitle,u?.title),style:p?.title,children:t}),n&&(0,f.jsx)(`div`,{className:(0,l.default)(Le.alertDescription,u?.description),style:p?.description,children:n})]}),o&&(0,f.jsx)(ce,{icon:d.faXmark,onClick:o,className:(0,l.default)(Le.alertCloseButton,u?.closeButton),style:p?.closeButton,"aria-label":g.dismiss})]})}var He={animatedLogo:`animatedLogo_7zZx1`,"animatedLogo-path":`animatedLogo-path_pP1g2`,animatedLogoPath:`animatedLogo-path_pP1g2`,"animatedLogo-pathLoop":`animatedLogo-pathLoop_i83B-`,animatedLogoPathLoop:`animatedLogo-pathLoop_i83B-`,animatedLogoRevealLoop:`animatedLogoRevealLoop_lH4zm`,"animatedLogo-pathOnce":`animatedLogo-pathOnce_gEYxA`,animatedLogoPathOnce:`animatedLogo-pathOnce_gEYxA`,animatedLogoRevealOnce:`animatedLogoRevealOnce_NEt2W`,"animatedLogo-pathLoopNoFill":`animatedLogo-pathLoopNoFill_M3ewW`,animatedLogoPathLoopNoFill:`animatedLogo-pathLoopNoFill_M3ewW`,animatedLogoRevealLoopNoFill:`animatedLogoRevealLoopNoFill_mfZJo`,"animatedLogo-pathOnceNoFill":`animatedLogo-pathOnceNoFill_hiqiK`,animatedLogoPathOnceNoFill:`animatedLogo-pathOnceNoFill_hiqiK`,animatedLogoRevealOnceNoFill:`animatedLogoRevealOnceNoFill_sdu0s`,"animatedLogo-spinLoop":`animatedLogo-spinLoop_Lfz9H`,animatedLogoSpinLoop:`animatedLogo-spinLoop_Lfz9H`,"animatedLogo-spinOnce":`animatedLogo-spinOnce_pXZUX`,animatedLogoSpinOnce:`animatedLogo-spinOnce_pXZUX`,"animatedLogo-scaleLoop":`animatedLogo-scaleLoop_yox9X`,animatedLogoScaleLoop:`animatedLogo-scaleLoop_yox9X`,"animatedLogo-scaleOnce":`animatedLogo-scaleOnce_ZNKV7`,animatedLogoScaleOnce:`animatedLogo-scaleOnce_ZNKV7`,animatedLogoRotateLoop:`animatedLogoRotateLoop_oPtfw`,animatedLogoRotateOnce:`animatedLogoRotateOnce_Ia1H1`,animatedLogoGrowLoop:`animatedLogoGrowLoop_lZjug`,animatedLogoGrowOnce:`animatedLogoGrowOnce_xHfCV`},Ue=`M 1.292 0.278 C -0.41 4.855 3.185 6.433 0.344 8.916 Q 3.923 10.712 5.361 14.001 Q 6.128 14.398 6.876 14.003 Q 8.439 10.632 11.86 8.912 C 8.893 6.387 12.578 5.159 10.86 0.255 Q 8.655 1.166 7.391 3.377 Q 6.092 2.93 4.843 3.38 Q 3.246 0.883 1.292 0.278 Z M 1.663 1.28 Q 2.413 1.635 3.195 2.718 Q 2.083 2.778 1.595 3.884 Q 1.309 2.7 1.663 1.28 M 3.802 7.908 Q 4.426 8.069 3.284 9.003 Q 3.824 9.32 4.557 10.141 Q 4.812 10.869 4.849 11.671 Q 4.371 10.09 2.642 9.144 Q 2.438 9.033 2.609 8.922 Q 3.229 8.537 3.802 7.908 M 8.469 7.927 Q 8.955 8.469 9.646 8.926 Q 9.791 9.032 9.647 9.136 Q 7.821 10.157 7.389 11.702 Q 7.464 10.869 7.709 10.119 Q 8.219 9.53 8.956 9.025 Q 7.81 7.927 8.469 7.927`,We=`0.244 0.155 11.72 14.25`;function Ge(e){let{path:t=Ue,viewBox:n=We,size:r=96,color:i,duration:a=4.2,loop:o=!0,fill:s=!0,spin:u=!1,scale:d=!1,className:p,style:m,classNames:h,styles:g,..._}=e,v=(0,c.useRef)(null),[y,b]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let e=v.current;if(!e)return;b(!1);let t=e.getTotalLength();e.style.setProperty(`--animated-logo-length`,String(t)),e.style.strokeDasharray=String(t),e.style.strokeDashoffset=String(t);let n=requestAnimationFrame(()=>b(!0));return()=>cancelAnimationFrame(n)},[t]);let x={animationDuration:`${a}s`,...i?{stroke:i,fill:i}:void 0,...g?.path};return(0,f.jsx)(`svg`,{..._,className:(0,l.default)(He.animatedLogo,p),style:{width:r,height:r,...m},viewBox:n,xmlns:`http://www.w3.org/2000/svg`,children:(0,f.jsx)(`g`,{className:(0,l.default)(y&&d&&(o?He.animatedLogoScaleLoop:He.animatedLogoScaleOnce)),style:{animationDuration:`${a}s`},children:(0,f.jsx)(`g`,{className:(0,l.default)(y&&u&&(o?He.animatedLogoSpinLoop:He.animatedLogoSpinOnce)),style:{animationDuration:`${a}s`},children:(0,f.jsx)(`path`,{ref:v,className:(0,l.default)(He.animatedLogoPath,y&&(o?s?He.animatedLogoPathLoop:He.animatedLogoPathLoopNoFill:s?He.animatedLogoPathOnce:He.animatedLogoPathOnceNoFill),h?.path),style:x,strokeWidth:.1,strokeLinejoin:`round`,strokeLinecap:`round`,d:t})})})})}var Ke=function(e){return e.RiseUp=`rise-up`,e.BlurIn=`blur-in`,e.Bounce=`bounce`,e.Typewriter=`typewriter`,e.Scramble=`scramble`,e.Glitch=`glitch`,e.Wave=`wave`,e.Shine=`shine`,e.Highlight=`highlight`,e}({}),qe=function(e){return e.Letter=`letter`,e.Word=`word`,e}({}),Je={animatedText:`animatedText_xkLRE`,"animatedText-visually-hidden":`animatedText-visually-hidden_N-uxP`,animatedTextVisuallyHidden:`animatedText-visually-hidden_N-uxP`,"animatedText-letter":`animatedText-letter_HBpbr`,animatedTextLetter:`animatedText-letter_HBpbr`,"animatedText-variant-rise-up":`animatedText-variant-rise-up_iZl7w`,animatedTextVariantRiseUp:`animatedText-variant-rise-up_iZl7w`,animatedTextRiseUp:`animatedTextRiseUp_4tb02`,"animatedText-variant-blur-in":`animatedText-variant-blur-in_TaxXd`,animatedTextVariantBlurIn:`animatedText-variant-blur-in_TaxXd`,animatedTextBlurIn:`animatedTextBlurIn_OPXmX`,"animatedText-variant-bounce":`animatedText-variant-bounce_1EWqT`,animatedTextVariantBounce:`animatedText-variant-bounce_1EWqT`,animatedTextBounceIn:`animatedTextBounceIn_R8l6K`,"animatedText-variant-glitch":`animatedText-variant-glitch_A-F8k`,animatedTextVariantGlitch:`animatedText-variant-glitch_A-F8k`,animatedTextGlitch:`animatedTextGlitch_tM2K9`,"animatedText-variant-wave":`animatedText-variant-wave_Wiv27`,animatedTextVariantWave:`animatedText-variant-wave_Wiv27`,animatedTextWave:`animatedTextWave_ztd68`,"animatedText-typewriter-letter":`animatedText-typewriter-letter_gAdNb`,animatedTextTypewriterLetter:`animatedText-typewriter-letter_gAdNb`,"animatedText-scramble-letter":`animatedText-scramble-letter_18T2z`,animatedTextScrambleLetter:`animatedText-scramble-letter_18T2z`,"animatedText-cursor":`animatedText-cursor_ns0l7`,animatedTextCursor:`animatedText-cursor_ns0l7`,"animatedText-cursor-blinking":`animatedText-cursor-blinking_IdVo3`,animatedTextCursorBlinking:`animatedText-cursor-blinking_IdVo3`,animatedTextCursorBlink:`animatedTextCursorBlink_MTiee`,"animatedText-shine":`animatedText-shine_VmmS9`,animatedTextShine:`animatedText-shine_VmmS9`,animatedTextShineSweep:`animatedTextShineSweep_-A864`,"animatedText-highlight":`animatedText-highlight_Bu-rP`,animatedTextHighlight:`animatedText-highlight_Bu-rP`,animatedTextHighlightSweep:`animatedTextHighlightSweep_e4-hF`};function Ye(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}var Xe={[Ke.RiseUp]:Je.animatedTextVariantRiseUp,[Ke.BlurIn]:Je.animatedTextVariantBlurIn,[Ke.Bounce]:Je.animatedTextVariantBounce,[Ke.Glitch]:Je.animatedTextVariantGlitch};function Ze(e,t){return t===qe.Word?e.split(` `).filter(Boolean):Array.from(e)}function Qe({units:e,unit:t,staggerDelay:n,classNames:r,slotStyles:i}){let[a,o]=(0,c.useState)(()=>e.length===0?0:Ye()?e.length:1);(0,c.useEffect)(()=>{if(e.length<=1||Ye())return;let t=1,r=setInterval(()=>{t+=1,o(t),t>=e.length&&clearInterval(r)},n);return()=>clearInterval(r)},[e,n]);let s=a>=e.length;return(0,f.jsxs)(f.Fragment,{children:[e.slice(0,a).map((e,n)=>(0,f.jsxs)(c.Fragment,{children:[(0,f.jsx)(`span`,{className:(0,l.default)(Je.animatedTextTypewriterLetter,r?.letter),style:i?.letter,children:e}),t===qe.Word&&n<a-1?` `:null]},n)),(0,f.jsx)(`span`,{className:(0,l.default)(Je.animatedTextCursor,s&&Je.animatedTextCursorBlinking,r?.cursor),style:i?.cursor})]})}var $e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%&*`,et=35;function tt(e){return Array.from({length:e},()=>$e[Math.floor(Math.random()*69)]).join(``)}function nt({units:e,unit:t,staggerDelay:n,classNames:r,slotStyles:i}){let[a]=(0,c.useState)(Ye),[o,s]=(0,c.useState)(0);(0,c.useEffect)(()=>{if(e.length===0||a)return;let t=0,r=Math.ceil(e.length*n/et)+1,i=setInterval(()=>{t+=1,s(t),t>=r&&clearInterval(i)},et);return()=>clearInterval(i)},[e,n,a]);let u=Math.min(e.length,Math.floor(o*et/n));return(0,f.jsx)(f.Fragment,{children:e.map((n,o)=>{let s=a||o<u;return(0,f.jsxs)(c.Fragment,{children:[(0,f.jsx)(`span`,{className:(0,l.default)(Je.animatedTextScrambleLetter,r?.letter),style:i?.letter,children:n===` `?` `:s?n:tt(n.length)}),t===qe.Word&&o<e.length-1?` `:null]},o)})})}function rt({text:e,variant:t=Ke.RiseUp,unit:n=qe.Letter,staggerDelay:r=40,duration:i,triggerOnView:a=!0,className:o,style:s,classNames:u,styles:d,...p}){let m=(0,c.useMemo)(()=>Ze(e,n),[e,n]),h=(0,c.useRef)(null),[g,_]=(0,c.useState)(()=>!a||typeof IntersectionObserver>`u`);(0,c.useEffect)(()=>{if(g)return;let e=h.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e?.isIntersecting&&(_(!0),t.disconnect())});return t.observe(e),()=>t.disconnect()},[g]);let v=`${t} ${e} ${n} ${r} ${i??``}`,y;if(!g)y=(0,f.jsx)(`span`,{"aria-hidden":`true`,style:{opacity:0},children:e});else if(t===Ke.Shine)y=(0,f.jsx)(`span`,{"aria-hidden":`true`,className:(0,l.default)(Je.animatedTextShine,u?.letter),style:{animationDuration:`${i??2e3}ms`,...d?.letter},children:e},v);else if(t===Ke.Highlight)y=(0,f.jsx)(`span`,{"aria-hidden":`true`,className:(0,l.default)(Je.animatedTextHighlight,u?.letter),style:{animationDuration:`${i??600}ms`,...d?.letter},children:e},v);else if(t===Ke.Typewriter)y=(0,f.jsx)(`span`,{"aria-hidden":`true`,children:(0,f.jsx)(Qe,{units:m,unit:n,staggerDelay:r,classNames:u,slotStyles:d})},v);else if(t===Ke.Scramble)y=(0,f.jsx)(`span`,{"aria-hidden":`true`,children:(0,f.jsx)(nt,{units:m,unit:n,staggerDelay:r,classNames:u,slotStyles:d})},v);else if(t===Ke.Wave)y=(0,f.jsx)(`span`,{"aria-hidden":`true`,children:m.map((e,t)=>(0,f.jsxs)(c.Fragment,{children:[(0,f.jsx)(`span`,{className:(0,l.default)(Je.animatedTextLetter,Je.animatedTextVariantWave,u?.letter),style:{animationDelay:`-${t*r}ms`,animationDuration:`${i??1200}ms`,...d?.letter},children:e===` `?` `:e}),n===qe.Word&&t<m.length-1?` `:null]},t))},v);else{let e=Xe[t]??Je.animatedTextVariantRiseUp;y=(0,f.jsx)(`span`,{"aria-hidden":`true`,children:m.map((t,a)=>(0,f.jsxs)(c.Fragment,{children:[(0,f.jsx)(`span`,{className:(0,l.default)(Je.animatedTextLetter,e,u?.letter),style:{animationDelay:`${a*r}ms`,animationDuration:`${i??500}ms`,...d?.letter},children:t===` `?` `:t}),n===qe.Word&&a<m.length-1?` `:null]},a))},v)}return(0,f.jsxs)(`span`,{...p,ref:h,className:(0,l.default)(Je.animatedText,o),style:s,children:[(0,f.jsx)(`span`,{className:Je.animatedTextVisuallyHidden,children:e}),y]})}var it=function(e){return e.Default=`default`,e.Primary=`primary`,e.Success=`success`,e.Info=`info`,e.Warn=`warn`,e.Error=`error`,e}({}),at=function(e){return e.TopRight=`top-right`,e.TopLeft=`top-left`,e.BottomRight=`bottom-right`,e.BottomLeft=`bottom-left`,e}({}),ot={wrapper:`wrapper_bcGTc`,badge:`badge_mj0fB`,"badge-dot":`badge-dot_TFLNc`,badgeDot:`badge-dot_TFLNc`,"badge-position-top-right":`badge-position-top-right_ZqWIX`,badgePositionTopRight:`badge-position-top-right_ZqWIX`,"badge-position-top-left":`badge-position-top-left_c-tJc`,badgePositionTopLeft:`badge-position-top-left_c-tJc`,"badge-position-bottom-right":`badge-position-bottom-right_7JuZ-`,badgePositionBottomRight:`badge-position-bottom-right_7JuZ-`,"badge-position-bottom-left":`badge-position-bottom-left_nsuJP`,badgePositionBottomLeft:`badge-position-bottom-left_nsuJP`,"badge-overlay":`badge-overlay_Xs19S`,badgeOverlay:`badge-overlay_Xs19S`,"badge-style-default":`badge-style-default_E32XE`,badgeStyleDefault:`badge-style-default_E32XE`,"badge-style-primary":`badge-style-primary_x1J3r`,badgeStylePrimary:`badge-style-primary_x1J3r`,"badge-style-success":`badge-style-success_LK3u0`,badgeStyleSuccess:`badge-style-success_LK3u0`,"badge-style-info":`badge-style-info_48nNP`,badgeStyleInfo:`badge-style-info_48nNP`,"badge-style-warn":`badge-style-warn_0PIRu`,badgeStyleWarn:`badge-style-warn_0PIRu`,"badge-style-error":`badge-style-error_5RoOd`,badgeStyleError:`badge-style-error_5RoOd`},st={[it.Default]:ot.badgeStyleDefault,[it.Primary]:ot.badgeStylePrimary,[it.Success]:ot.badgeStyleSuccess,[it.Info]:ot.badgeStyleInfo,[it.Warn]:ot.badgeStyleWarn,[it.Error]:ot.badgeStyleError},ct={[at.TopRight]:ot.badgePositionTopRight,[at.TopLeft]:ot.badgePositionTopLeft,[at.BottomRight]:ot.badgePositionBottomRight,[at.BottomLeft]:ot.badgePositionBottomLeft};function lt(e){let{count:t,max:n=99,content:r,dot:i=!1,showZero:a=!1,styleType:o=it.Primary,position:s=at.TopRight,children:c=null,className:u,style:d,classNames:p,styles:m,...h}=D(`Badge`,e),g=typeof t==`number`,_=r!=null,v=(i||_||g)&&!(!i&&!_&&g&&t===0&&!a),y=_?r:g?t>n?`${n}+`:t:null,b=c!=null;return(0,f.jsxs)(`span`,{...h,className:(0,l.default)(ot.wrapper,u),style:d,children:[c,v&&(0,f.jsx)(`span`,{className:(0,l.default)(ot.badge,st[o],i&&ot.badgeDot,b&&ot.badgeOverlay,b&&ct[s],p?.badge),style:m?.badge,children:!i&&y})]})}var ut={avatar:`avatar_lCAOD`,"avatar-image":`avatar-image_RMyzx`,avatarImage:`avatar-image_RMyzx`,"avatar-fallback":`avatar-fallback_RaZB6`,avatarFallback:`avatar-fallback_RaZB6`,"avatar-status-badge":`avatar-status-badge_eKMvH`,avatarStatusBadge:`avatar-status-badge_eKMvH`,avatarGroup:`avatarGroup_xkRyd`,"avatarGroup-item":`avatarGroup-item_8DIPO`,avatarGroupItem:`avatarGroup-item_8DIPO`},dt={online:it.Success,away:it.Warn,busy:it.Error,offline:it.Default};function ft(e){if(!e)return``;let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?``:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}function pt({src:e,alt:t,name:n,icon:r=d.faUser,content:i,status:a,className:o,style:s,classNames:u,styles:p,...m}){let[h,g]=(0,c.useState)(!1),[_,v]=(0,c.useState)(e);e!==_&&(v(e),g(!1));let y=ft(n),b=e&&!h?(0,f.jsx)(`img`,{className:(0,l.default)(ut.avatarImage,u?.image),style:p?.image,src:e,alt:t??n??``,onError:()=>g(!0)}):(0,f.jsx)(`span`,{className:(0,l.default)(ut.avatarFallback,u?.fallback),style:p?.fallback,children:i??(y||K(r))});return a?(0,f.jsx)(lt,{...m,dot:!0,position:at.BottomRight,styleType:dt[a],className:o,style:s,classNames:{badge:(0,l.default)(ut.avatarStatusBadge,u?.status)},styles:{badge:p?.status},children:(0,f.jsx)(`span`,{className:ut.avatar,children:b})}):(0,f.jsx)(`span`,{...m,className:(0,l.default)(ut.avatar,o),style:s,children:b})}function mt({children:e,max:t,className:n,style:r,classNames:i,styles:a,...o}){let s=c.Children.toArray(e),u=t==null?s:s.slice(0,t),d=t==null?0:s.length-t;return(0,f.jsxs)(`span`,{...o,className:(0,l.default)(ut.avatarGroup,n),style:r,children:[u.map((e,t)=>(0,f.jsx)(`span`,{className:(0,l.default)(ut.avatarGroupItem,i?.item),style:a?.item,children:e},t)),d>0&&(0,f.jsx)(`span`,{className:(0,l.default)(ut.avatarGroupItem,i?.overflow),style:a?.overflow,children:(0,f.jsx)(pt,{content:`+${d}`})})]})}var ht={popover:`popover_hhmvN`,"popover-trigger":`popover-trigger_R4ckf`,popoverTrigger:`popover-trigger_R4ckf`,"popover-floating":`popover-floating_mhXrQ`,popoverFloating:`popover-floating_mhXrQ`,"popover-panel":`popover-panel_tVB2k`,popoverPanel:`popover-panel_tVB2k`,"popover-panel-constrained":`popover-panel-constrained_DFXWP`,popoverPanelConstrained:`popover-panel-constrained_DFXWP`,popoverIn:`popoverIn_nKOqX`,"popover-arrow":`popover-arrow_B8kB-`,popoverArrow:`popover-arrow_B8kB-`},gt={sheet:`sheet_cfS92`,sheetSlideIn:`sheetSlideIn_wF6l0`,"sheet-surface":`sheet-surface_-vvdd`,sheetSurface:`sheet-surface_-vvdd`,"sheet-panel":`sheet-panel_HPJjL sheet-surface_-vvdd`,sheetPanel:`sheet-panel_HPJjL sheet-surface_-vvdd`,"sheet-scroll":`sheet-scroll_nda2p`,sheetScroll:`sheet-scroll_nda2p`,"sheet-backdrop":`sheet-backdrop_B-S70`,sheetBackdrop:`sheet-backdrop_B-S70`,sheetBackdropFadeIn:`sheetBackdropFadeIn_MJUJq`},_t=[`pointerdown`,`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`];function vt({onClose:e,className:t,style:n}){let r=(0,c.useRef)(null);return(0,c.useEffect)(()=>{let e=r.current;if(!e)return;let t=e=>e.stopPropagation();return _t.forEach(n=>e.addEventListener(n,t)),()=>_t.forEach(n=>e.removeEventListener(n,t))},[]),(0,f.jsx)(`div`,{ref:r,className:(0,l.default)(gt.sheetBackdrop,t),style:n,onClick:t=>{t.stopPropagation(),e()}})}function yt(e){let t=[],n=e.parentElement;for(;n&&n!==document.body&&n!==document.documentElement;){let e=getComputedStyle(n);(e.overflowX!==`visible`||e.overflowY!==`visible`)&&t.push(n),n=n.parentElement}return t}function bt(e,t){return t.some(t=>{let n=t.getBoundingClientRect();return e.bottom<=n.top||e.top>=n.bottom||e.right<=n.left||e.left>=n.right})}function xt(e){let t=e?.parentElement??null;for(;t&&t!==document.body;){let{overflowY:e}=getComputedStyle(t);if(e===`auto`||e===`scroll`||e===`overlay`)return t;t=t.parentElement}return null}function St(){let e=typeof window<`u`?window.visualViewport:null;return e?{left:e.offsetLeft,top:e.offsetTop,width:e.width,height:e.height}:{left:0,top:0,width:typeof window<`u`?window.innerWidth:0,height:typeof window<`u`?window.innerHeight:0}}function Ct({isOpen:e,triggerRef:t,elementRefs:n,update:r,resizeRefs:i,teardown:a,deps:o=[]}){let s=(0,c.useRef)({elementRefs:n,update:r,resizeRefs:i,teardown:a});s.current={elementRefs:n,update:r,resizeRefs:i,teardown:a},(0,c.useLayoutEffect)(()=>{if(!e)return;let n,r;function i(){let e=t.current,a=s.current.elementRefs;if(!e||a.some(e=>!e.current)){n=requestAnimationFrame(i);return}let o=yt(e),c=new ResizeObserver(()=>u()),l=new Set;function u(){s.current.update(e,o),s.current.resizeRefs?.forEach(({current:e})=>{e&&!l.has(e)&&(l.add(e),c.observe(e))})}u();let d=[window,...o];d.forEach(e=>e.addEventListener(`scroll`,u,{passive:!0})),window.addEventListener(`resize`,u),window.visualViewport?.addEventListener(`resize`,u),window.visualViewport?.addEventListener(`scroll`,u),r=()=>{d.forEach(e=>e.removeEventListener(`scroll`,u)),window.removeEventListener(`resize`,u),window.visualViewport?.removeEventListener(`resize`,u),window.visualViewport?.removeEventListener(`scroll`,u),c.disconnect(),s.current.teardown?.()}}return i(),()=>{n!==void 0&&cancelAnimationFrame(n),r?.()}},[e,t,...o])}var wt=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({}),Tt=function(e){return e.Start=`start`,e.Center=`center`,e.End=`end`,e}({}),Et=function(e){return e.Click=`click`,e.Hover=`hover`,e.Focus=`focus`,e}({}),Dt={[wt.Top]:`bottom`,[wt.Bottom]:`top`,[wt.Left]:`right`,[wt.Right]:`left`},Ot=8,kt=160,At=3;function jt(e){let t=e;for(let e=0;e<=At;e++){let e=t.getBoundingClientRect();if(e.width>0||e.height>0)return{element:t,rect:e};let n=t.firstElementChild;if(!n)break;t=n}return{element:null,rect:e.getBoundingClientRect()}}var Mt;function Nt(){if(Mt!==void 0)return Mt;if(typeof CSS>`u`||!CSS.supports?.(`top: anchor(top, 0px)`))return Mt=!1;let e=document.createElement(`div`);e.style.cssText=`position: fixed; top: 0; left: 0; transform: translateY(100px); visibility: hidden`;let t=document.createElement(`div`);t.style.cssText=`anchor-name: --popover-probe; width: 1px; height: 1px`;let n=document.createElement(`div`);return n.style.cssText=`position: fixed; position-anchor: --popover-probe; top: anchor(top, 0px); left: 0; visibility: hidden`,e.append(t),document.body.append(e,n),Mt=Math.abs(n.getBoundingClientRect().top-t.getBoundingClientRect().top)<1,e.remove(),n.remove(),Mt}function Pt(e){return e.style.getPropertyValue(`anchor-name`).split(`,`).map(e=>e.trim()).filter(e=>e&&e!==`none`)}function Ft(e,t){let n=Pt(e);n.includes(t)||e.style.setProperty(`anchor-name`,[...n,t].join(`, `))}function It(e,t){let n=Pt(e).filter(e=>e!==t);n.length>0?e.style.setProperty(`anchor-name`,n.join(`, `)):e.style.removeProperty(`anchor-name`)}function Lt(e,t,n,r){return r?`calc(anchor(${e}, ${n}px) + ${t-n}px)`:`${t}px`}function Rt({isOpen:e,placement:t,align:n,offset:r,triggerRef:i,floatingRef:a,panelRef:o,arrowRef:s,matchTriggerWidth:l=!1,shrinkToFit:u=!1}){let d=`--popover-${(0,c.useId)().replace(/[^\w-]/g,``)}`,f=(0,c.useRef)(null);function p(e){f.current!==e&&(f.current&&It(f.current,d),e&&Ft(e,d),f.current=e)}Ct({isOpen:e,triggerRef:i,elementRefs:[a,o],resizeRefs:[o],deps:[t,n,r,a,o,s,l,u],update:(e,i)=>{let c=a.current,f=o.current;if(!c||!f)return;let{element:m,rect:h}=jt(e),g=m!==null&&Nt();p(g?m:null),g?c.style.setProperty(`position-anchor`,d):c.style.removeProperty(`position-anchor`),l?f.style.minWidth=`${h.width}px`:f.style.removeProperty(`min-width`),u&&f.style.removeProperty(`max-width`);let{width:_,height:v}=c.getBoundingClientRect(),y=St(),b=t===wt.Top||t===wt.Bottom;if(u&&b){let e=n===Tt.End?h.right-(y.left+Ot):n===Tt.Start?y.left+y.width-Ot-h.left:y.width-16,t=Math.min(e,y.width-16);_>t&&t>=kt&&(f.style.maxWidth=`${t}px`,{width:_,height:v}=c.getBoundingClientRect())}let x={top:h.top-y.top,bottom:y.top+y.height-h.bottom,left:h.left-y.left,right:y.left+y.width-h.right},S=t===wt.Top||t===wt.Bottom?v:_,C=t,w=Dt[t];x[C]<S+r&&x[w]>x[C]&&(C=w);let T=C===`top`||C===`bottom`,E,D;C===`bottom`?E=h.bottom+r:C===`top`?E=h.top-r-v:D=C===`right`?h.right+r:h.left-r-_;let O=!1,k=!1;if(T){D=n===Tt.Start?h.left:n===Tt.End?h.right-_:h.left+h.width/2-_/2;let e=Math.max(y.left+Ot,Math.min(D,y.left+y.width-_-Ot));O=e!==D,D=e}else{E=n===Tt.Start?h.top:n===Tt.End?h.bottom-v:h.top+h.height/2-v/2;let e=Math.max(y.top+Ot,Math.min(E,y.top+y.height-v-Ot));k=e!==E,E=e}c.style.top=Lt(`top`,E,h.top,g&&!k),c.style.left=Lt(`left`,D,h.left,g&&!O),c.style.visibility=bt(h,i)?`hidden`:`visible`,c.dataset.placement=C;let A=s.current;if(A){let e=A.offsetWidth/2||5;if(T){let t=h.left+h.width/2-D;A.style.setProperty(`--arrow-x`,`${Math.max(e+2,Math.min(t,_-e-2))}px`),A.style.removeProperty(`--arrow-y`)}else{let t=h.top+h.height/2-E;A.style.setProperty(`--arrow-y`,`${Math.max(e+2,Math.min(t,v-e-2))}px`),A.style.removeProperty(`--arrow-x`)}}},teardown:()=>{p(null);let e=a.current;if(!e)return;e.style.top=``,e.style.left=``,e.style.visibility=``,e.style.removeProperty(`position-anchor`);let t=o.current;t?.style.removeProperty(`min-width`),t?.style.removeProperty(`max-width`)}})}var zt=[`a[href]`,`area[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`,`[contenteditable="true"]`].join(`,`);function Bt(e){return e?Array.from(e.querySelectorAll(zt)).filter(e=>e.getAttribute(`tabindex`)!==`-1`):[]}function Vt(e){return e.matches(zt)&&e.getAttribute(`tabindex`)!==`-1`}function Ht({triggerRef:e,contentRef:t}){function n(){let t=e.current;return t&&Vt(t)?t:Bt(t)[0]??t}function r(){n()?.focus()}function i(){let e=Bt(document.body).filter(e=>!t.current?.contains(e)),r=n(),i=r?e.indexOf(r):-1;i>=0&&e[i+1]?.focus()}return{firstTriggerFocusable:n,restoreFocusToTrigger:r,focusAfterTrigger:i}}function Ut(){let[e,t]=(0,c.useState)(()=>{let e=St();return{height:e.height,offsetTop:e.top}});return(0,c.useEffect)(()=>{let e=window.visualViewport;if(!e)return;function n(){let e=St();t({height:e.height,offsetTop:e.top})}return n(),e.addEventListener(`resize`,n),e.addEventListener(`scroll`,n),()=>{e.removeEventListener(`resize`,n),e.removeEventListener(`scroll`,n)}},[]),e}var Wt=`(max-width: 767px)`,Gt=8;function Kt(e=A.Default){let t=xe(),n=be(Wt),{height:r,offsetTop:i}=Ut();return e===A.Sheet||e===A.Auto&&t&&n?{isSheet:!0,sheetStyle:{bottom:typeof window>`u`?0:Math.max(0,window.innerHeight-(i+r)),"--sheet-available-height":`${Math.max(0,r-Gt)}px`}}:{isSheet:!1,sheetStyle:void 0}}function qt({isActive:e,containerRef:t,onEscape:n,trapFocus:r=!0,lockScroll:i=!0}){let a=(0,c.useRef)(n);(0,c.useEffect)(()=>{a.current=n});let o=(0,c.useRef)(0);e&&o.current===0&&(o.current=Jt++),!e&&o.current!==0&&(o.current=0),(0,c.useEffect)(()=>{if(!e)return;let n=o.current;Yt.add(n);let s=()=>n===Math.max(...Yt),c=document.activeElement;if(r){let e=t.current;(Bt(e)[0]??e)?.focus()}function l(e){if(!s())return;if(e.key===`Escape`&&a.current){e.preventDefault(),a.current();return}if(e.key!==`Tab`||!r)return;let n=Bt(t.current);if(n.length===0){e.preventDefault();return}let i=n[0],o=n[n.length-1],c=document.activeElement;t.current?.contains(c)?!e.shiftKey&&c===o?(e.preventDefault(),i.focus()):e.shiftKey&&c===i&&(e.preventDefault(),o.focus()):(e.preventDefault(),i.focus())}let u=new Set,d=e=>e.code||e.key;function f(e){e.repeat?!u.has(d(e))&&t.current?.contains(e.target)&&(e.preventDefault(),e.stopPropagation()):u.add(d(e))}function p(e){u.delete(d(e))}return window.addEventListener(`keydown`,l),window.addEventListener(`keydown`,f,!0),window.addEventListener(`keyup`,p,!0),i&&$t(),()=>{window.removeEventListener(`keydown`,l),window.removeEventListener(`keydown`,f,!0),window.removeEventListener(`keyup`,p,!0),i&&en(),Yt.delete(n);let e=[...Yt].some(e=>e>n);r&&!e&&c?.focus()}},[e,r,i,t])}var Jt=1,Yt=new Set,Xt=0,Zt=``,Qt=``;function $t(){let{body:e}=document;if(Xt===0){Zt=e.style.overflow,Qt=e.style.paddingRight;let t=window.innerWidth-document.documentElement.clientWidth;if(t>0){let n=parseFloat(window.getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${n+t}px`}e.style.overflow=`hidden`}Xt+=1}function en(){--Xt,!(Xt>0)&&(Xt=0,document.body.style.overflow=Zt,document.body.style.paddingRight=Qt)}var tn=1e3;function nn(e,t){return e?{current:e}:t}function rn(e){let{children:t=null,anchor:n,content:r=null,placement:i=wt.Bottom,align:a=Tt.Center,trigger:o=Et.Click,isOpen:s,defaultOpen:u=!1,onOpenChange:d=()=>{},offset:p=10,withArrow:m=!0,closeOnOutsideClick:h=!0,closeOnEscape:g=!0,openDelay:_=100,closeDelay:v=120,disabled:y=!1,focusOnOpen:b=`keyboard`,closeOnTriggerClick:x=!0,width:S=`auto`,constrainWidth:C=!0,presentation:w,className:T,style:E,classNames:O,styles:j,...M}=D(`Popover`,e),N=(0,c.useRef)(null),P=(0,c.useRef)(null),F=(0,c.useRef)(null),I=(0,c.useRef)(null),L=(0,c.useRef)(void 0),R=(0,c.useRef)(!1),z=(0,c.useRef)(!1),B=(0,c.useRef)(!1),V=(0,c.useRef)(null);function H(){R.current=!0}function U(e){H(),V.current=e.target}let[W,G]=(0,c.useState)(()=>({anchor:n,ref:nn(n,N)}));W.anchor!==n&&G({anchor:n,ref:nn(n,N)});let ee=W.ref,K=(0,c.useRef)(null),te=n!==void 0;(0,c.useEffect)(()=>{if(!te)return;function e(e){K.current={target:e.target,keyboard:e.detail===0,time:performance.now()}}return document.addEventListener(`click`,e,!0),()=>document.removeEventListener(`click`,e,!0)},[te]);let q=s!==void 0,[ne,J]=(0,c.useState)(u),re=q?s:ne,ie=(0,c.useRef)(d);(0,c.useEffect)(()=>{ie.current=d});let ae=(0,c.useCallback)((e,t=!1)=>{y&&e||(e&&(B.current=t),q||J(e),ie.current(e,{fromKeyboard:t}))},[y,q]),oe=k(),{isSheet:se,sheetStyle:ce}=Kt(w??oe??A.Default),le=se&&o===Et.Click;Rt({isOpen:!!re&&!le,placement:i,align:a,offset:p,triggerRef:ee,floatingRef:P,panelRef:F,arrowRef:m?I:{current:null},matchTriggerWidth:S===`trigger`});let{restoreFocusToTrigger:ue,focusAfterTrigger:Y}=Ht({triggerRef:ee,contentRef:P}),de=(0,c.useRef)(ue);(0,c.useEffect)(()=>{de.current=ue});let fe=(0,c.useRef)(!1),pe=(0,c.useCallback)(e=>{if(P.current=e,fe.current=!1,e)return()=>{P.current=null;let t=document.activeElement;fe.current=!!t&&(e.contains(t)||t===V.current)}},[]);(0,c.useEffect)(()=>{if(re||!fe.current)return;fe.current=!1;let e=document.activeElement;(!e||e===document.body)&&de.current()},[re]),qt({isActive:!!re,containerRef:F,onEscape:g?()=>{P.current?.contains(document.activeElement)&&ue(),ae(!1,!0)}:void 0,trapFocus:!1,lockScroll:le}),(0,c.useEffect)(()=>{if(!re){B.current=!1;return}let e=K.current;K.current=null;let t=!!n&&!!e?.keyboard&&n.contains(e.target)&&performance.now()-e.time<tn;if(!(b===!0||b===`keyboard`&&(B.current||t))||o!==Et.Click)return;let r=Bt(F.current);r.length!==0&&(P.current?.setAttribute(`role`,`dialog`),r[0].focus())},[re,o,b,n]);function me(e){if(e.key!==`Tab`||o!==Et.Click)return;let t=Bt(F.current);if(t.length===0)return;let n=document.activeElement;!e.shiftKey&&n===t[t.length-1]?(e.preventDefault(),Y(),ae(!1,!0)):e.shiftKey&&n===t[0]&&(e.preventDefault(),ue(),ae(!1,!0))}(0,c.useEffect)(()=>{if(!re)return;R.current=!1,z.current=!1;function e(e){return!!(P.current?.contains(e)||N.current?.contains(e)||ee.current?.contains(e))}function t(t){let n=R.current;return R.current=!1,n||e(t.target)}function n(e){z.current=!t(e)}function r(e){let n=z.current;z.current=!1,!t(e)&&n&&ae(!1)}function i(n){if(t(n))return;let r=n.relatedTarget;r&&(r===V.current||e(r))&&ae(!1,!z.current)}return h&&o!==Et.Hover&&(window.addEventListener(`mousedown`,n),window.addEventListener(`mouseup`,r),document.addEventListener(`focusin`,i)),()=>{window.removeEventListener(`mousedown`,n),window.removeEventListener(`mouseup`,r),document.removeEventListener(`focusin`,i)}},[re,h,o,ae,ee]),(0,c.useEffect)(()=>()=>clearTimeout(L.current),[]);function X(e){clearTimeout(L.current),L.current=setTimeout(()=>ae(e),e?_:v)}function Z(e){re||e.key!==`ArrowDown`&&e.key!==`ArrowUp`||(e.preventDefault(),ae(!0,!0))}let he=o===Et.Click?{onClick:e=>{(!re||x)&&ae(!re,e.detail===0)},onKeyDown:Z}:o===Et.Hover?{onMouseEnter:()=>X(!0),onMouseLeave:()=>X(!1)}:{onFocus:()=>ae(!0),onBlur:()=>ae(!1)},ge=o===Et.Hover?{onMouseEnter:()=>X(!0),onMouseLeave:()=>X(!1)}:{};return(0,f.jsxs)(`div`,{...M,className:(0,l.default)(ht.popover,T,O?.root),style:{...E,...j?.root},children:[(0,f.jsx)(`div`,{ref:N,className:(0,l.default)(ht.popoverTrigger,O?.trigger),style:j?.trigger,...he,children:t}),re&&(0,f.jsxs)(_e,{children:[le&&(0,f.jsx)(vt,{onClose:()=>{h&&ae(!1)},className:O?.backdrop,style:j?.backdrop}),(0,f.jsxs)(`div`,{ref:pe,className:(0,l.default)(le?gt.sheet:ht.popoverFloating,O?.floating),style:{...le?ce:void 0,...j?.floating},"data-placement":i,onKeyDown:me,onMouseDownCapture:H,onMouseUpCapture:H,onFocusCapture:U,...ge,children:[(0,f.jsx)(`div`,{ref:F,className:(0,l.default)(ht.popoverPanel,C&&ht.popoverPanelConstrained,le&&gt.sheetPanel,O?.panel),style:j?.panel,children:r}),m&&!le&&(0,f.jsx)(`div`,{ref:I,className:(0,l.default)(ht.popoverArrow,O?.arrow),style:j?.arrow})]})]})]})}var an={breadcrumb:`breadcrumb_yQM0Q`,"breadcrumb-list":`breadcrumb-list_2ah0w`,breadcrumbList:`breadcrumb-list_2ah0w`,"breadcrumb-item":`breadcrumb-item_gBLc-`,breadcrumbItem:`breadcrumb-item_gBLc-`,"breadcrumb-icon":`breadcrumb-icon_wFm8s`,breadcrumbIcon:`breadcrumb-icon_wFm8s`,"breadcrumb-link":`breadcrumb-link_eBWl3`,breadcrumbLink:`breadcrumb-link_eBWl3`,"breadcrumb-link-disabled":`breadcrumb-link-disabled_Ca-E6`,breadcrumbLinkDisabled:`breadcrumb-link-disabled_Ca-E6`,"breadcrumb-current":`breadcrumb-current_8tlun`,breadcrumbCurrent:`breadcrumb-current_8tlun`,"breadcrumb-separator":`breadcrumb-separator_akfqn`,breadcrumbSeparator:`breadcrumb-separator_akfqn`,"breadcrumb-ellipsis":`breadcrumb-ellipsis_6fvn8`,breadcrumbEllipsis:`breadcrumb-ellipsis_6fvn8`,"breadcrumb-hiddenPanel":`breadcrumb-hiddenPanel_mb7xd`,breadcrumbHiddenPanel:`breadcrumb-hiddenPanel_mb7xd`,"breadcrumb-hiddenList":`breadcrumb-hiddenList_5reEH`,breadcrumbHiddenList:`breadcrumb-hiddenList_5reEH`,"breadcrumb-hiddenItem":`breadcrumb-hiddenItem_ZGRnB`,breadcrumbHiddenItem:`breadcrumb-hiddenItem_ZGRnB`},on={showHidden:`Show hidden breadcrumbs`};function sn(e,t){let n=e.map((e,t)=>({item:e,index:t}));if(!t||e.length<=t)return{leading:n,hidden:[],trailing:[]};let r=Math.max(1,t-2),i=e.length-1-r;return i<=0?{leading:n,hidden:[],trailing:[]}:{leading:n.slice(0,1),hidden:n.slice(1,1+i),trailing:n.slice(1+i)}}function cn(e){let{items:t=[],separator:n,maxItems:r,"aria-label":i=`Breadcrumb`,className:a,style:o,classNames:s,styles:p,labels:m,...h}=D(`Breadcrumb`,e),g=O(`Breadcrumb`,m,on),[_,v]=(0,c.useState)(!1),{leading:y,hidden:b,trailing:x}=sn(t,r),S=t.length-1;function C(e){return e===S?null:(0,f.jsx)(`span`,{className:(0,l.default)(an.breadcrumbSeparator,s?.separator),style:p?.separator,children:n??(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronRight})})}function w({item:e,index:t}){return(0,f.jsxs)(`li`,{className:(0,l.default)(an.breadcrumbItem,s?.item),style:p?.item,children:[ln(e,t===S,an,s,p),C(t)]},e.id??t)}return(0,f.jsx)(`nav`,{...h,"aria-label":i,className:(0,l.default)(an.breadcrumb,s?.root,a),style:{...o,...p?.root},children:(0,f.jsxs)(`ol`,{className:(0,l.default)(an.breadcrumbList,s?.list),style:p?.list,children:[y.map(w),b.length>0&&(0,f.jsxs)(`li`,{className:(0,l.default)(an.breadcrumbItem,s?.item),style:p?.item,children:[(0,f.jsx)(rn,{isOpen:_,onOpenChange:v,placement:wt.Bottom,align:Tt.Start,constrainWidth:!1,classNames:{panel:an.breadcrumbHiddenPanel},content:(0,f.jsx)(`ul`,{className:(0,l.default)(an.breadcrumbHiddenList,s?.hiddenList),style:p?.hiddenList,children:b.map(({item:e,index:t})=>(0,f.jsx)(`li`,{className:(0,l.default)(an.breadcrumbHiddenItem,s?.hiddenItem),style:p?.hiddenItem,children:ln({...e,onClick:t=>{e.onClick?.(t),v(!1)}},!1,an,s,p)},e.id??t))}),children:(0,f.jsx)(ce,{icon:d.faEllipsis,title:g.showHidden,"aria-label":g.showHidden,"aria-expanded":_,className:(0,l.default)(an.breadcrumbEllipsis,s?.ellipsis),style:p?.ellipsis})}),C(b[b.length-1].index)]}),x.map(w)]})})}function ln(e,t,n,r,i){let a=(0,f.jsxs)(f.Fragment,{children:[e.icon?K(e.icon,{className:(0,l.default)(n.breadcrumbIcon,r?.icon),style:i?.icon}):null,e.label]});return t?(0,f.jsx)(`span`,{"aria-current":`page`,className:(0,l.default)(n.breadcrumbCurrent,r?.current),style:i?.current,children:a}):e.disabled?(0,f.jsx)(`span`,{className:(0,l.default)(n.breadcrumbLink,n.breadcrumbLinkDisabled,r?.link),style:i?.link,children:a}):e.href?(0,f.jsx)(`a`,{href:e.href,onClick:e.onClick,className:(0,l.default)(n.breadcrumbLink,r?.link),style:i?.link,children:a}):e.onClick?(0,f.jsx)(oe,{onClick:e.onClick,className:(0,l.default)(n.breadcrumbLink,r?.link),style:i?.link,children:a}):(0,f.jsx)(`span`,{className:(0,l.default)(n.breadcrumbLink,n.breadcrumbLinkDisabled,r?.link),style:i?.link,children:a})}var un=function(e){return e.Horizontal=`horizontal`,e.Vertical=`vertical`,e}({}),dn={buttonGroup:`buttonGroup_ZZ6sy`,"buttonGroup-vertical":`buttonGroup-vertical_XMx2u`,buttonGroupVertical:`buttonGroup-vertical_XMx2u`};function fn({children:e,orientation:t=un.Horizontal,className:n,style:r,...i}){return(0,f.jsx)(`div`,{...i,role:`group`,className:(0,l.default)(dn.buttonGroup,{[dn.buttonGroupVertical]:t===un.Vertical},n),style:r,children:e})}function pn(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n&&(n.current=t)}}var mn=/^(\d{4})-(\d{2})-(\d{2})$/;function hn({year:e,month:t}){let n=new Date(0);return n.setUTCFullYear(e,t,0),n.getUTCDate()}function gn(e){if(typeof e!=`string`)return null;let t=mn.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]);return r<1||r>12||i<1||i>hn({year:n,month:r})?null:{year:n,month:r,day:i}}function _n(e){return gn(e)?e:null}function vn({year:e,month:t,day:n}){return`${String(e).padStart(4,`0`)}-${String(t).padStart(2,`0`)}-${String(n).padStart(2,`0`)}`}function yn(e){return Number.isNaN(e.getTime())?``:vn({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()})}function bn(e){let t=gn(e);if(!t)return new Date(NaN);let n=new Date(2e3,0,1);return n.setFullYear(t.year,t.month-1,t.day),n}var xn=/^(\d{2}):(\d{2})$/;function Sn(e){return Number.isNaN(e.getTime())?``:`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`}function Cn(e,t){let n=bn(e),r=xn.exec(t),i=r?Number(r[1]):NaN,a=r?Number(r[2]):NaN;return Number.isNaN(n.getTime())||!(i<=23&&a<=59)?new Date(NaN):(n.setHours(i,a,0,0),n)}var wn=function(e){return e.Month=`month`,e.Week=`week`,e.Day=`day`,e.Agenda=`agenda`,e}({}),Tn=1440;function En(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function Dn(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function On(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function kn(e,t){return new Date(e,t+1,0).getDate()}function An(e,t){let n=new Date(e.getFullYear(),e.getMonth()+t,1),r=Math.min(e.getDate(),kn(n.getFullYear(),n.getMonth()));return new Date(n.getFullYear(),n.getMonth(),r)}function jn(e){return new Date(e.getFullYear(),e.getMonth(),1)}function Mn(e,t){return Dn(e,-((e.getDay()-t+7)%7))}function Nn(e,t){let n=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((r-n)/864e5)}function Pn(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Fn(e){return e.getHours()*60+e.getMinutes()}function In(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,t)}function Ln(e,t,n){return t>e?t:new Date(e.getTime()+n*6e4)}function Rn(e,t,n){switch(e){case wn.Week:return Mn(t,n);case wn.Day:return En(t);default:return jn(t)}}function zn(e,t,n){let r=Rn(e,t,n);switch(e){case wn.Month:{let e=Mn(r,n);return{start:e,end:Dn(e,42)}}case wn.Week:return{start:r,end:Dn(r,7)};case wn.Day:return{start:r,end:Dn(r,1)};default:return{start:r,end:An(r,1)}}}var Bn=new Set;function Vn(e){let t=new Set(e);return t.size===0||[0,1,2,3,4,5,6].every(e=>t.has(e))?Bn:t}function Hn(e,t,n=1){let r=En(e);for(;t.has(r.getDay());)r=Dn(r,n);return r}function Un(e,t,n,r=Bn){switch(e){case wn.Week:return Dn(t,7*n);case wn.Day:{let e=n<0?-1:1,i=t;for(let t=0;t<Math.abs(n);t++)i=Hn(Dn(i,e),r,e);return i}default:return An(t,n)}}function Wn(e,t,n,r=Bn){return{start:zn(e,Un(e,t,-1,r),n).start,end:zn(e,Un(e,t,1,r),n).end}}function Gn(e,t){return Array.from({length:t},(t,n)=>Dn(e,n))}function Kn(e,t,n=Bn){return Gn(e,t).filter(e=>!n.has(e.getDay()))}var qn={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};function Jn(e,t,n){return e in qn?Dn(t,qn[e]):e===`Home`?Mn(t,n):e===`End`?Dn(Mn(t,n),6):e===`PageUp`?An(t,-1):e===`PageDown`?An(t,1):null}function Yn(e,t,n,r=Bn){let i=Jn(e,t,n);return i&&Hn(i,r,e===`ArrowLeft`||e===`End`?-1:1)}var Xn=new Map,Zn;function Qn(){return Zn===void 0&&(Zn=new Intl.DateTimeFormat().resolvedOptions().timeZone,queueMicrotask(()=>{Zn=void 0})),Zn}function $n(e,t){let n=`${Qn()}|${e??``}|${JSON.stringify(t)}`,r=Xn.get(n);return r||(r=new Intl.DateTimeFormat(e,t),Xn.set(n,r)),r}function er(e,t,n){return e.formatRange(t,n)}var tr=new Map;function nr(e){let t=e??``,n=tr.get(t);if(n!==void 0)return n;let r=1;try{let t=e??new Intl.DateTimeFormat().resolvedOptions().locale,n=new Intl.Locale(t),i=n.getWeekInfo?.()??n.weekInfo;i&&(r=i.firstDay%7)}catch{}return tr.set(t,r),r}function rr(e){let t=$n(e,{hour:`numeric`}).resolvedOptions().hourCycle;return t===`h11`||t===`h12`}function ir(e,t){return $n(t,{hour:`numeric`,minute:`2-digit`}).format(e)}function ar(e,t,n){return er($n(n,{hour:`numeric`,minute:`2-digit`}),e,t)}function or(e,t,n){let r=new Date(2e3,0,1,e.getHours(),e.getMinutes()),i=new Date(2e3,0,1,t.getHours(),t.getMinutes());try{return er($n(n,{hour:`numeric`,minute:`2-digit`}),r,i)}catch{return ir(e,n)}}function sr(e,t){let n=new Date(2e3,0,1,e);return rr(t)?$n(t,{hour:`numeric`}).format(n):$n(t,{hour:`2-digit`,minute:`2-digit`}).format(n)}function cr(e,t,n){return $n(t,{weekday:n}).format(e)}function lr(e,t){return $n(t,{day:`numeric`}).format(e)}function ur(e,t){return $n(t,{weekday:`long`,day:`numeric`,month:`long`,year:`numeric`}).format(e)}function dr(e,t){return $n(t,{month:`long`,year:`numeric`}).format(e)}function fr(e,t,n,r){switch(e){case wn.Week:return er($n(r,{day:`numeric`,month:`short`,year:`numeric`}),n.start,Dn(n.end,-1));case wn.Day:return ur(t,r);default:return dr(t,r)}}var pr=864e5,mr=20;function hr(e){return e.end<e.start?e.start:e.end}function gr(e){return!!e.allDay||hr(e).getTime()-e.start.getTime()>=pr}function _r(e){let t=En(e.start),n=hr(e);if(e.allDay){let e=En(n);return{first:t,last:Nn(t,e)>=1?Dn(e,-1):t}}return{first:t,last:n>e.start?En(new Date(n.getTime()-1)):t}}function vr(e,t){let n=Number(gr(t))-Number(gr(e));if(n!==0)return n;let r=e.start.getTime()-t.start.getTime();if(r!==0)return r;let i=hr(t).getTime()-hr(e).getTime();return i===0?e.title.localeCompare(t.title):i}function yr(e,t){let n=t.map(()=>[]);for(let r of e){let{first:e,last:i}=_r(r);t.forEach((t,a)=>{Nn(e,t)>=0&&Nn(t,i)>=0&&n[a].push(r)})}for(let e of n)e.sort(vr);return n}function br(e,t){let n=En(t),r=Dn(n,1),i=[];for(let t of e){if(gr(t))continue;let{start:e}=t,a=hr(t);if(e>=r||a<=n&&e<n)continue;let o=e<n,s=a>r,c=o?0:Fn(e),l=Math.max(a>=r?Tn:Fn(a),c),u=l-c<15?Math.min(l+mr,Tn):l;i.push({event:t,top:c,bottom:l,reach:u,column:0,columns:1,span:1,continuesBefore:o,continuesAfter:s})}i.sort((e,t)=>e.top-t.top||t.reach-e.reach);let a=[],o=-1;for(let e of i)a.length>0&&e.top>=o&&(xr(a),a=[]),a.push(e),o=Math.max(o,e.reach);return a.length>0&&xr(a),i}function xr(e){let t=[];for(let n of e){let e=t.findIndex(e=>e<=n.top);e===-1&&(e=t.push(0)-1),n.column=e,t[e]=n.reach}let n=t.length;for(let t of e){t.columns=n;let r=1;for(let i=t.column+1;i<n&&!e.some(e=>e.column===i&&e.top<t.reach&&e.reach>t.top);i++)r++;t.span=r}}function Sr(e,t,n=()=>!0){let r=[];for(let i of e){if(!n(i))continue;let{first:e,last:a}=_r(i),o=t.findIndex(t=>Nn(e,t)>=0&&Nn(t,a)>=0);if(o===-1)continue;let s=o;for(;s+1<t.length&&Nn(t[s+1],a)>=0;)s++;r.push({event:i,start:o,span:s-o+1,lane:0,continuesBefore:Nn(e,t[o])>0,continuesAfter:Nn(t[s],a)>0})}r.sort((e,t)=>e.start-t.start||t.span-e.span||vr(e.event,t.event));let i=[];for(let e of r){let t=i.findIndex(t=>t<=e.start);t===-1&&(t=i.push(0)-1),e.lane=t,i[t]=e.start+e.span}return r}function Cr(e,t,n){let r=Math.max(n-1,0),i=Array.from({length:t},()=>0);for(let t of e)for(let e=t.start;e<t.start+t.span;e++)i[e]=Math.max(i[e],t.lane+1);let a=Array.from({length:t},()=>0),o=[];for(let t of e){let e=t.lane<r;if(!e&&t.lane===r){e=!0;for(let r=t.start;r<t.start+t.span;r++)i[r]>n&&(e=!1)}if(e){o.push(t);continue}for(let e=t.start;e<t.start+t.span;e++)a[e]++}return{visible:o,moreLane:r,hidden:a}}var wr={agendaList:`agendaList_C00ZD`,"agendaList-empty":`agendaList-empty_X742J`,agendaListEmpty:`agendaList-empty_X742J`,"agendaList-day":`agendaList-day_S13Dn`,agendaListDay:`agendaList-day_S13Dn`,"agendaList-day-withHeader":`agendaList-day-withHeader_DiXSD`,agendaListDayWithHeader:`agendaList-day-withHeader_DiXSD`,"agendaList-day-header":`agendaList-day-header_X9tfZ`,agendaListDayHeader:`agendaList-day-header_X9tfZ`,"agendaList-day-number":`agendaList-day-number_QfwoV`,agendaListDayNumber:`agendaList-day-number_QfwoV`,"agendaList-day-number-today":`agendaList-day-number-today_v-2hj`,agendaListDayNumberToday:`agendaList-day-number-today_v-2hj`,"agendaList-day-name":`agendaList-day-name_wqrBS`,agendaListDayName:`agendaList-day-name_wqrBS`,"agendaList-events":`agendaList-events_PYc6m`,agendaListEvents:`agendaList-events_PYc6m`,"agendaList-event":`agendaList-event_73lKv`,agendaListEvent:`agendaList-event_73lKv`,"agendaList-time":`agendaList-time_YyZCE`,agendaListTime:`agendaList-time_YyZCE`,"agendaList-time-end":`agendaList-time-end_zz3Xc`,agendaListTimeEnd:`agendaList-time-end_zz3Xc`,"agendaList-accent":`agendaList-accent_wCj9l`,agendaListAccent:`agendaList-accent_wCj9l`,"agendaList-title":`agendaList-title_0jQBA`,agendaListTitle:`agendaList-title_0jQBA`};function Tr({events:e,start:t,days:n,hidden:r,scrollTo:i,showDayHeaders:a,locale:o,text:s,onEventClick:u,renderEvent:d,className:p,classNames:m,slotStyles:h}){let g=(0,c.useId)(),_=(0,c.useRef)(null),v=Kn(t,n,r),y=yr(e,v),b=new Date,x=i?yn(i):null;(0,c.useLayoutEffect)(()=>{let e=_.current;if(!e||x===null)return;let t=[...e.querySelectorAll(`[data-cal-day]`)].find(e=>(e.dataset.calDay??``)>=x);e.scrollTop=t?t.offsetTop:0},[x]);let S=y.flatMap((e,t)=>e.length>0||!a?[{day:v[t],dayEvents:e}]:[]);return(0,f.jsxs)(`div`,{ref:_,className:(0,l.default)(wr.agendaList,p),children:[S.every(({dayEvents:e})=>e.length===0)&&(0,f.jsx)(`p`,{className:wr.agendaListEmpty,children:s.noEvents}),S.map(({day:e,dayEvents:t})=>{if(t.length===0)return null;let n=`${g}-${yn(e)}`,r=Pn(e,b),i=Dn(e,1);return(0,f.jsxs)(`div`,{role:`group`,"aria-labelledby":a?n:void 0,className:(0,l.default)(wr.agendaListDay,a&&wr.agendaListDayWithHeader),"data-cal-day":yn(e),children:[a&&(0,f.jsxs)(`div`,{id:n,className:(0,l.default)(wr.agendaListDayHeader,m?.dayHeader),style:h?.dayHeader,"aria-label":ur(e,o),children:[(0,f.jsx)(`span`,{className:(0,l.default)(wr.agendaListDayNumber,r&&wr.agendaListDayNumberToday),"aria-hidden":!0,children:lr(e,o)}),(0,f.jsx)(`span`,{className:wr.agendaListDayName,"aria-hidden":!0,children:cr(e,o,`short`)})]}),(0,f.jsx)(`ul`,{className:wr.agendaListEvents,children:t.map(t=>{let n=hr(t),r=t.start<e?e:t.start,a=n>i?i:n,c=gr(t)||t.start<=e&&n>=i,p=c?s.allDay:ar(t.start,n,o);return(0,f.jsx)(`li`,{children:(0,f.jsxs)(`button`,{type:`button`,className:(0,l.default)(wr.agendaListEvent,m?.event),style:{"--event-color":t.color,...h?.event},"aria-label":`${t.title}, ${p}`,"data-cal-event":String(t.id),onClick:e=>u?.(t,e.currentTarget),children:[(0,f.jsx)(`span`,{className:wr.agendaListTime,"aria-hidden":!0,children:c?s.allDay:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`span`,{children:ir(r,o)}),(0,f.jsx)(`span`,{className:wr.agendaListTimeEnd,children:ir(a,o)})]})}),(0,f.jsx)(`span`,{className:wr.agendaListAccent,"aria-hidden":!0}),(0,f.jsx)(`span`,{className:wr.agendaListTitle,"aria-hidden":!0,children:d?d(t,{singleLine:!1}):t.title})]})},t.id)})})]},yn(e))})]})}var Er={optionPicker:`optionPicker_Yx82s`,"optionPicker-chip":`optionPicker-chip_ywtvr`,optionPickerChip:`optionPicker-chip_ywtvr`,"optionPicker-option":`optionPicker-option_uq0vK`,optionPickerOption:`optionPicker-option_uq0vK`,"optionPicker-option-active":`optionPicker-option-active_yUECW`,optionPickerOptionActive:`optionPicker-option-active_yUECW`};function Dr(e){let{className:t=void 0,style:n,classNames:r,styles:i,options:a,onChange:o,value:s,...u}=D(`OptionPicker`,e),d=a.findIndex(e=>e.key===s)*100/a.length,p=(0,c.useRef)([]),m=a.findIndex(e=>e.key===s),h=m>=0?m:0;function g(e,t,n){if(a.length===0)return;let r=(t+e+a.length)%a.length;p.current[r]?.focus(),o(a[r].key,n)}function _(e,t){switch(e.key){case`ArrowRight`:case`ArrowDown`:e.preventDefault(),g(1,t,e);break;case`ArrowLeft`:case`ArrowUp`:e.preventDefault(),g(-1,t,e)}}return(0,f.jsxs)(`div`,{...u,role:`radiogroup`,className:(0,l.default)(Er.optionPicker,t,r?.root),style:{...n,...i?.root},children:[(0,f.jsx)(`div`,{className:(0,l.default)(Er.optionPickerChip,r?.chip),style:{left:`${d}%`,width:`${100/a.length}%`,...i?.chip}}),a.map((e,t)=>{let n=e.key===s;return(0,f.jsx)(oe,{ref:e=>{p.current[t]=e},onClick:t=>o(e.key,t),onKeyDown:e=>_(e,t),role:`radio`,"aria-checked":n,className:(0,l.default)(Er.optionPickerOption,n&&Er.optionPickerOptionActive,r?.option),style:i?.option,tabIndex:t===h?0:-1,children:e.label},e.key)})]})}var Or={calendarHeader:`calendarHeader_2y0rN`,"calendarHeader-title":`calendarHeader-title_oxE5q`,calendarHeaderTitle:`calendarHeader-title_oxE5q`,"calendarHeader-title-text":`calendarHeader-title-text_-Tc6u`,calendarHeaderTitleText:`calendarHeader-title-text_-Tc6u`,calendarTitleIn:`calendarTitleIn_GgigY`,"calendarHeader-nav":`calendarHeader-nav_vtXFu`,calendarHeaderNav:`calendarHeader-nav_vtXFu`,"calendarHeader-today":`calendarHeader-today_-IWRl`,calendarHeaderToday:`calendarHeader-today_-IWRl`,"calendarHeader-step":`calendarHeader-step_cZkOq`,calendarHeaderStep:`calendarHeader-step_cZkOq`,"calendarHeader-views":`calendarHeader-views_-ftrl`,calendarHeaderViews:`calendarHeader-views_-ftrl`,"calendarHeader-compact":`calendarHeader-compact_4jGIE`,calendarHeaderCompact:`calendarHeader-compact_4jGIE`};function kr({title:e,compact:t,direction:n,view:r,views:i,text:a,onStep:o,onToday:s,onViewChange:c,className:u,style:p}){return(0,f.jsxs)(`div`,{className:(0,l.default)(Or.calendarHeader,t&&Or.calendarHeaderCompact,u),style:p,children:[(0,f.jsx)(`div`,{className:Or.calendarHeaderTitle,"aria-live":`polite`,children:(0,f.jsx)(`span`,{className:Or.calendarHeaderTitleText,style:{"--title-from":n},children:e},e)}),(0,f.jsxs)(`div`,{className:Or.calendarHeaderNav,children:[(0,f.jsx)(ne,{className:Or.calendarHeaderToday,size:B.Small,onClick:s,children:a.today}),(0,f.jsx)(ce,{className:Or.calendarHeaderStep,icon:d.faChevronLeft,title:a.previous,"aria-label":a.previous,onClick:()=>o(-1)}),(0,f.jsx)(ce,{className:Or.calendarHeaderStep,icon:d.faChevronRight,title:a.next,"aria-label":a.next,onClick:()=>o(1)})]}),i.length>1&&(0,f.jsx)(Dr,{className:Or.calendarHeaderViews,"aria-label":a.viewSwitcher,value:r,onChange:e=>c(e),options:i.map(e=>({key:e,label:a[e]}))})]})}function Ar(e,t,n){return e===0||!(Math.abs(e)>=t*.2)&&!(Math.abs(n)>=.5&&Math.sign(n)===Math.sign(e))?0:e<0?1:-1}function jr(e,t,n){return e<t+48?-18*Math.min(1,(t+48-e)/48):e>n-48?18*Math.min(1,(e-(n-48))/48):0}function Mr(e,t){return Math.round(e/t)*t}function Nr(e,t,n){return Math.min(Math.max(e,t),n)}function Pr(e,t){let n=e.filter(e=>t-e.time<=100);if(n.length<2)return 0;let r=n[0],i=n[n.length-1],a=i.time-r.time;return a>0?(i.x-r.x)/a:0}function Fr(e,t){let n=(0,c.useRef)(t);(0,c.useLayoutEffect)(()=>{n.current=t}),(0,c.useEffect)(()=>{let t=e.current;if(!t)return;let r=()=>n.current,i=`idle`,a=-1,o=``,s={x:0,y:0},c={x:0,y:0},l=[],u=null,d,f=0,p=-1/0,m=0,h=new Map;function g(e){try{t.setPointerCapture(e)}catch{}}function _(){clearTimeout(d),d=void 0}function v(){_(),cancelAnimationFrame(f),f=0,u=null,i=`passive`,m=performance.now()+350}function y(){let[e,t]=[...h.values()];return{center:{x:(e.x+t.x)/2,y:(e.y+t.y)/2},distance:Math.hypot(e.x-t.x,e.y-t.y)}}function b(){if(i!==`dragging`)return;let e=r().autoScroll?.();if(e){let t=jr(c.y,e.top,e.bottom),n=e.element.scrollTop;t!==0&&(e.element.scrollTop+=t),e.element.scrollTop!==n&&r().onDragMove?.(c)}f=requestAnimationFrame(b)}function x(){d=void 0,u!==null&&i===`pressed`&&(i=`dragging`,g(a),o!==`mouse`&&`vibrate`in navigator&&navigator.vibrate(10),r().onDragStart?.(u,c),f=requestAnimationFrame(b))}function S(e){if(e.isPrimary&&i!==`idle`&&(i===`dragging`?r().onDragCancel?.():i===`swiping`?r().onSwipeEnd?.(0,0):i===`pinching`&&r().onPinchEnd?.(),_(),cancelAnimationFrame(f),u=null,i=`idle`),i===`idle`){if(e.pointerType===`mouse`&&e.button!==0)return;r().onPress?.(),a=e.pointerId,o=e.pointerType,s=c={x:e.clientX,y:e.clientY},h.clear(),h.set(e.pointerId,s),l=[{time:e.timeStamp,x:e.clientX}],u=e.target instanceof Element?r().dragFrom?.(e.target,s)??null:null,i=`pressed`;let t=performance.now()-p<150;u!==null&&o!==`mouse`&&!t&&(d=setTimeout(x,400));return}if(e.pointerType!==`mouse`&&(h.set(e.pointerId,{x:e.clientX,y:e.clientY}),i===`pressed`&&h.size===2&&r().onPinchStart)){_(),i=`pinching`,g(a),g(e.pointerId);let{center:t,distance:n}=y();r().onPinchStart?.(t,n)}}function C(e){if(!h.has(e.pointerId))return;let t={x:e.clientX,y:e.clientY};if(h.set(e.pointerId,t),i===`pinching`){if(h.size<2)return;let{center:e,distance:t}=y();r().onPinchMove?.(e,t);return}if(e.pointerId!==a)return;c=t;let n=t.x-s.x,d=t.y-s.y;if(i===`pressed`){let e=Math.hypot(n,d);if(o===`mouse`){if(e<=4)return;if(u===null){i=`passive`;return}x()}else{if(e<=10)return;if(_(),Math.abs(n)<=Math.abs(d)||!r().canSwipe?.()){i=`passive`;return}i=`swiping`,g(a)}}i===`swiping`?(l.push({time:e.timeStamp,x:t.x}),l.length>20&&l.shift(),r().onSwipeMove?.(n)):i===`dragging`&&r().onDragMove?.(t)}function w(e){h.delete(e),h.size===0&&(_(),u=null,i=`idle`)}function T(e){h.has(e.pointerId)&&(i===`pinching`?(r().onPinchEnd?.(),v()):e.pointerId===a&&(i===`swiping`?(l.push({time:e.timeStamp,x:e.clientX}),r().onSwipeEnd?.(e.clientX-s.x,Pr(l,e.timeStamp)),v()):i===`dragging`?(c={x:e.clientX,y:e.clientY},r().onDragEnd?.(c),v()):i===`pressed`&&(_(),i=`passive`)),w(e.pointerId))}function E(e){h.has(e.pointerId)&&(i===`swiping`?(r().onSwipeEnd?.(0,0),v()):i===`dragging`?(r().onDragCancel?.(),v()):i===`pinching`?(r().onPinchEnd?.(),v()):(_(),i=`passive`),w(e.pointerId))}function D(e){(i===`swiping`||i===`dragging`||i===`pinching`)&&e.cancelable&&e.preventDefault()}function O(e){(i===`dragging`||i===`pressed`&&o!==`mouse`&&u!==null)&&e.preventDefault()}function k(e){e.preventDefault()}function A(e){performance.now()<m&&(e.stopPropagation(),e.preventDefault(),m=0)}function j(){p=performance.now()}function M(e){e.key===`Escape`&&i===`dragging`&&(e.preventDefault(),r().onDragCancel?.(),v())}return t.addEventListener(`pointerdown`,S),t.addEventListener(`pointermove`,C),t.addEventListener(`pointerup`,T),t.addEventListener(`pointercancel`,E),t.addEventListener(`touchmove`,D,{passive:!1}),t.addEventListener(`contextmenu`,O),t.addEventListener(`dragstart`,k),t.addEventListener(`click`,A,!0),t.addEventListener(`scroll`,j,{capture:!0,passive:!0}),window.addEventListener(`scroll`,j,{passive:!0}),window.addEventListener(`keydown`,M),()=>{_(),cancelAnimationFrame(f),t.removeEventListener(`pointerdown`,S),t.removeEventListener(`pointermove`,C),t.removeEventListener(`pointerup`,T),t.removeEventListener(`pointercancel`,E),t.removeEventListener(`touchmove`,D),t.removeEventListener(`contextmenu`,O),t.removeEventListener(`dragstart`,k),t.removeEventListener(`click`,A,!0),t.removeEventListener(`scroll`,j,{capture:!0}),window.removeEventListener(`scroll`,j),window.removeEventListener(`keydown`,M)}},[e])}var Ir=240;function Lr(e,t,n){let r=(0,c.useRef)(new Set),i=(0,c.useRef)(0),a=(0,c.useRef)([]),o=(0,c.useRef)(0),s=(0,c.useRef)(e),l=be(`(prefers-reduced-motion: reduce)`),u=(0,c.useRef)({onPage:t,focusFallback:n,reducedMotion:l});(0,c.useLayoutEffect)(()=>{u.current={onPage:t,focusFallback:n,reducedMotion:l}});let d=(0,c.useCallback)(e=>{i.current=e;for(let t of r.current)t.style.transform=e===0?``:`translateX(${e}px)`},[]);(0,c.useLayoutEffect)(()=>{s.current=e,d(0);let t=document.activeElement;t instanceof HTMLElement&&t.closest(`[inert]`)&&[...r.current].some(e=>e.contains(t))&&u.current.focusFallback()?.focus()},[e,d]);let f=(0,c.useCallback)(e=>{if(e)return r.current.add(e),()=>{r.current.delete(e)}},[]),m=(0,c.useCallback)(()=>{let[e]=r.current;return e?.parentElement?.clientWidth??0},[]),h=(0,c.useCallback)(e=>{if(a.current=[],e===0){d(0);return}let t=s.current;(0,p.flushSync)(()=>u.current.onPage(e)),s.current===t&&d(0)},[d]),g=(0,c.useCallback)(e=>{let t=m(),n=i.current,s=e===0?0:-e*t,c=[...r.current];d(s);let l=typeof c[0]?.animate==`function`;if(u.current.reducedMotion||n===s||!l){h(e);return}let f=Math.max(120,Ir*Math.min(1,Math.abs(s-n)/Math.max(t,1))),p=[{transform:`translateX(${n}px)`},{transform:`translateX(${s}px)`}];o.current=e,a.current=c.map(e=>e.animate(p,{duration:f,easing:`cubic-bezier(0.25, 1, 0.5, 1)`})),a.current[0].onfinish=()=>h(e)},[h,m,d]),_=(0,c.useCallback)(()=>{if(a.current.length!==0){for(let e of a.current)e.onfinish=null,e.cancel();h(o.current)}},[h]);return(0,c.useEffect)(()=>{let e=a;return()=>{for(let t of e.current)t.onfinish=null,t.cancel()}},[]),{trackRef:f,width:m,move:(0,c.useCallback)(e=>d(e),[d]),settle:g,finish:_}}var Rr={"pager-viewport":`pager-viewport_Mq7zC`,pagerViewport:`pager-viewport_Mq7zC`,"pager-track":`pager-track_MTNN6`,pagerTrack:`pager-track_MTNN6`,"pager-pane":`pager-pane_b38-h`,pagerPane:`pager-pane_b38-h`,"pager-pane-prev":`pager-pane-prev_PEY3n`,pagerPanePrev:`pager-pane-prev_PEY3n`,"pager-pane-next":`pager-pane-next_B62PQ`,pagerPaneNext:`pager-pane-next_B62PQ`},zr={compactMonth:`compactMonth_FqyT2`,"compactMonth-sticky":`compactMonth-sticky_jvXmc`,compactMonthSticky:`compactMonth-sticky_jvXmc`,"compactMonth-weekdays":`compactMonth-weekdays_Pqo-f`,compactMonthWeekdays:`compactMonth-weekdays_Pqo-f`,"compactMonth-weekday":`compactMonth-weekday_D7FA1`,compactMonthWeekday:`compactMonth-weekday_D7FA1`,"compactMonth-viewport":`compactMonth-viewport_Ala2B`,compactMonthViewport:`compactMonth-viewport_Ala2B`,"compactMonth-pane":`compactMonth-pane_MnQpH`,compactMonthPane:`compactMonth-pane_MnQpH`,"compactMonth-rows":`compactMonth-rows_s7t79`,compactMonthRows:`compactMonth-rows_s7t79`,"compactMonth-week":`compactMonth-week_aU0xC`,compactMonthWeek:`compactMonth-week_aU0xC`,"compactMonth-week-folding":`compactMonth-week-folding_enQnk`,compactMonthWeekFolding:`compactMonth-week-folding_enQnk`,"compactMonth-cell":`compactMonth-cell_cerzg`,compactMonthCell:`compactMonth-cell_cerzg`,"compactMonth-cell-outside":`compactMonth-cell-outside_90ht-`,compactMonthCellOutside:`compactMonth-cell-outside_90ht-`,"compactMonth-number":`compactMonth-number_EpPAy`,compactMonthNumber:`compactMonth-number_EpPAy`,"compactMonth-number-today":`compactMonth-number-today_xZAeN`,compactMonthNumberToday:`compactMonth-number-today_xZAeN`,"compactMonth-number-selected":`compactMonth-number-selected_r3RiE`,compactMonthNumberSelected:`compactMonth-number-selected_r3RiE`,"compactMonth-dots":`compactMonth-dots_0UvHH`,compactMonthDots:`compactMonth-dots_0UvHH`,"compactMonth-dot":`compactMonth-dot_-UfnO`,compactMonthDot:`compactMonth-dot_-UfnO`,"compactMonth-list":`compactMonth-list_laIa8`,compactMonthList:`compactMonth-list_laIa8`,"compactMonth-list-header":`compactMonth-list-header_Zo7PB`,compactMonthListHeader:`compactMonth-list-header_Zo7PB`,"compactMonth-list-title":`compactMonth-list-title_iT4MI`,compactMonthListTitle:`compactMonth-list-title_iT4MI`,"compactMonth-agenda":`compactMonth-agenda_F0LqZ`,compactMonthAgenda:`compactMonth-agenda_F0LqZ`},Br=[-1,0,1],Vr=3,Hr=150;function Ur({events:e,date:t,locale:n,weekStartsOn:r,hidden:i,text:a,onDateChange:o,onEventClick:s,onSlotCreate:u,renderEvent:d,classNames:p,slotStyles:m}){let h=(0,c.useRef)(null),g=(0,c.useRef)(null),_=(0,c.useRef)(null),v=(0,c.useRef)(null),y=(0,c.useRef)(null),b=(0,c.useRef)(0),[x,S]=(0,c.useState)(!1),C=be(`(prefers-reduced-motion: reduce)`),w=new Date,T=jn(t),E=Mn(t,r),D=Kn(Mn(w,r),7,i),O=Lr(yn(x?E:T),e=>o(x?Dn(t,7*e):An(t,e)),()=>v.current?.querySelector(`[tabindex="0"]`)??null);(0,c.useLayoutEffect)(()=>{let e=h.current;if(!e)return;let t,n=!1;function r(){return(_.current?.clientHeight??0)*5/6}function i(){let t=r(),n=t>0?Math.min(e.scrollTop/t,1):0;C&&(n=+(n>.99)),b.current=n,e.style.setProperty(`--collapse`,String(n)),S(n>=1)}function a(){if(n)return;let t=r(),i=e.scrollTop;i<=0||i>=t||e.scrollTo({top:i<t/2?0:t,behavior:C?`auto`:`smooth`})}function o(){clearTimeout(t),t=setTimeout(a,Hr)}function s(){i(),o()}function c(){n=!0}function l(){n=!1,o()}return i(),e.addEventListener(`scroll`,s,{passive:!0}),e.addEventListener(`touchstart`,c,{passive:!0}),e.addEventListener(`touchend`,l,{passive:!0}),e.addEventListener(`touchcancel`,l,{passive:!0}),()=>{clearTimeout(t),e.removeEventListener(`scroll`,s),e.removeEventListener(`touchstart`,c),e.removeEventListener(`touchend`,l),e.removeEventListener(`touchcancel`,l)}},[C]),(0,c.useLayoutEffect)(()=>{let e=y.current;e!==null&&(y.current=null,v.current?.querySelector(`[data-cal-day="${e}"]`)?.focus())}),Fr(g,{onPress:O.finish,canSwipe:()=>b.current<.01||b.current>.99,onSwipeMove:O.move,onSwipeEnd:(e,t)=>O.settle(Ar(e,O.width(),t))});function k(e,t){let n=Yn(e.key,t,r,i);n&&(e.preventDefault(),y.current=yn(n),o(n))}function A(e,r,i,s){let c=Pn(e,t),u=Pn(e,w),d=ur(e,n);return(0,f.jsxs)(`div`,{role:`gridcell`,"data-cal-day":yn(e),tabIndex:i&&c?0:-1,"aria-selected":c,"aria-current":u?`date`:void 0,"aria-label":s.length>0?`${d}, ${a.eventCount(s.length)}`:d,className:(0,l.default)(zr.compactMonthCell,r&&zr.compactMonthCellOutside,p?.cell),style:m?.cell,onClick:()=>o(e),onKeyDown:t=>k(t,e),children:[(0,f.jsx)(`span`,{"aria-hidden":!0,className:(0,l.default)(zr.compactMonthNumber,u&&zr.compactMonthNumberToday,c&&zr.compactMonthNumberSelected),children:lr(e,n)}),(0,f.jsx)(`span`,{"aria-hidden":!0,className:zr.compactMonthDots,children:s.slice(0,Vr).map(e=>(0,f.jsx)(`span`,{className:zr.compactMonthDot,style:{"--event-color":e.color}},e.id))})]},yn(e))}function j(n){let a=n===0,o=(0,l.default)(Rr.pagerPane,n===-1&&Rr.pagerPanePrev,n===1&&Rr.pagerPaneNext,zr.compactMonthPane);if(x){let t=Dn(E,7*n),r=Kn(t,7,i),s=yr(e,r);return(0,f.jsx)(`div`,{ref:a?v:void 0,className:o,inert:!a,"aria-hidden":!a||void 0,children:(0,f.jsx)(`div`,{role:`row`,className:zr.compactMonthWeek,children:r.map((e,t)=>A(e,!1,a,s[t]))})},yn(t))}let s=An(T,n),c=zn(wn.Month,s,r).start,u=a?Math.floor(Nn(c,t)/7):0;return(0,f.jsx)(`div`,{ref:a?v:void 0,className:o,inert:!a,"aria-hidden":!a||void 0,style:{"--selected-row":u},children:(0,f.jsx)(`div`,{className:zr.compactMonthRows,children:Array.from({length:6},(t,n)=>{let r=Dn(c,n*7),o=Kn(r,7,i),d=yr(e,o);return(0,f.jsx)(`div`,{role:`row`,className:(0,l.default)(zr.compactMonthWeek,n!==u&&zr.compactMonthWeekFolding),children:o.map((e,t)=>A(e,e.getMonth()!==s.getMonth(),a,d[t]))},yn(r))})})},yn(s))}return(0,f.jsxs)(`div`,{ref:h,className:zr.compactMonth,style:{"--days":D.length},children:[(0,f.jsx)(`div`,{ref:g,className:zr.compactMonthSticky,children:(0,f.jsxs)(`div`,{role:`grid`,"aria-label":dr(t,n),children:[(0,f.jsx)(`div`,{role:`row`,className:zr.compactMonthWeekdays,children:D.map(e=>(0,f.jsx)(`div`,{role:`columnheader`,"aria-label":cr(e,n,`long`),className:(0,l.default)(zr.compactMonthWeekday,p?.dayHeader),style:m?.dayHeader,children:cr(e,n,`narrow`)},e.getDay()))}),(0,f.jsx)(`div`,{ref:_,className:(0,l.default)(Rr.pagerViewport,zr.compactMonthViewport),children:(0,f.jsx)(`div`,{ref:O.trackRef,className:Rr.pagerTrack,children:Br.map(j)})})]})}),(0,f.jsxs)(`div`,{className:zr.compactMonthList,children:[(0,f.jsxs)(`div`,{className:zr.compactMonthListHeader,children:[(0,f.jsx)(`div`,{className:zr.compactMonthListTitle,children:ur(t,n)}),u&&(0,f.jsx)(ne,{size:B.Small,onClick:e=>u({start:t,end:Dn(t,1),allDay:!0},e.currentTarget),children:a.newEvent})]}),(0,f.jsx)(Tr,{className:zr.compactMonthAgenda,events:e,start:t,days:1,showDayHeaders:!1,locale:n,text:a,onEventClick:s,renderEvent:d,classNames:p,slotStyles:m})]})]})}var Wr={monthView:`monthView_COWAp`,"monthView-grid":`monthView-grid_MG0UZ`,monthViewGrid:`monthView-grid_MG0UZ`,"monthView-weekdays":`monthView-weekdays_BHTuU`,monthViewWeekdays:`monthView-weekdays_BHTuU`,"monthView-weekday":`monthView-weekday_ycA-L`,monthViewWeekday:`monthView-weekday_ycA-L`,"monthView-viewport":`monthView-viewport_LpCe1`,monthViewViewport:`monthView-viewport_LpCe1`,"monthView-pane":`monthView-pane_bHUbv`,monthViewPane:`monthView-pane_bHUbv`,"monthView-week":`monthView-week_gnh6Y`,monthViewWeek:`monthView-week_gnh6Y`,"monthView-cell":`monthView-cell_ypx-s`,monthViewCell:`monthView-cell_ypx-s`,"monthView-cell-outside":`monthView-cell-outside_1Mr0V`,monthViewCellOutside:`monthView-cell-outside_1Mr0V`,"monthView-cell-creatable":`monthView-cell-creatable_BxZde`,monthViewCellCreatable:`monthView-cell-creatable_BxZde`,"monthView-cell-target":`monthView-cell-target_-oYgU`,monthViewCellTarget:`monthView-cell-target_-oYgU`,"monthView-dayNumber":`monthView-dayNumber_voxGS`,monthViewDayNumber:`monthView-dayNumber_voxGS`,"monthView-dayNumber-today":`monthView-dayNumber-today_G7coa`,monthViewDayNumberToday:`monthView-dayNumber-today_G7coa`,"monthView-dayNumber-link":`monthView-dayNumber-link_5k317`,monthViewDayNumberLink:`monthView-dayNumber-link_5k317`,"monthView-bars":`monthView-bars_DW4bv`,monthViewBars:`monthView-bars_DW4bv`,"monthView-bar":`monthView-bar_9zcHJ`,monthViewBar:`monthView-bar_9zcHJ`,"monthView-bar-filled":`monthView-bar-filled_Mq2Ca`,monthViewBarFilled:`monthView-bar-filled_Mq2Ca`,"monthView-bar-timed":`monthView-bar-timed_C8Xwi`,monthViewBarTimed:`monthView-bar-timed_C8Xwi`,"monthView-bar-continuesBefore":`monthView-bar-continuesBefore_DBSlE`,monthViewBarContinuesBefore:`monthView-bar-continuesBefore_DBSlE`,"monthView-bar-continuesAfter":`monthView-bar-continuesAfter_cEvZo`,monthViewBarContinuesAfter:`monthView-bar-continuesAfter_cEvZo`,"monthView-bar-interactive":`monthView-bar-interactive_FGu9C`,monthViewBarInteractive:`monthView-bar-interactive_FGu9C`,"monthView-bar-dragging":`monthView-bar-dragging_sxndr`,monthViewBarDragging:`monthView-bar-dragging_sxndr`,"monthView-bar-title":`monthView-bar-title_-X5yZ`,monthViewBarTitle:`monthView-bar-title_-X5yZ`,"monthView-dot":`monthView-dot_81QmI`,monthViewDot:`monthView-dot_81QmI`,"monthView-time":`monthView-time_W-u-E`,monthViewTime:`monthView-time_W-u-E`,"monthView-more":`monthView-more_m2PXd`,monthViewMore:`monthView-more_m2PXd`,"monthView-list":`monthView-list_4pG-Y`,monthViewList:`monthView-list_4pG-Y`,"monthView-list-title":`monthView-list-title_oM-3e`,monthViewListTitle:`monthView-list-title_oM-3e`,"monthView-list-events":`monthView-list-events_RsMQ6`,monthViewListEvents:`monthView-list-events_RsMQ6`,"monthView-list-create":`monthView-list-create_e7EdY`,monthViewListCreate:`monthView-list-create_e7EdY`},Gr=[-1,0,1];function Kr({events:e,date:t,locale:n,weekStartsOn:r,hidden:i,text:a,onDateChange:o,onOpenDay:s,onEventClick:u,onEventChange:d,onSlotCreate:p,renderEvent:m,classNames:h,slotStyles:g}){let _=(0,c.useRef)(null),v=(0,c.useRef)(null),y=(0,c.useRef)(null),b=(0,c.useRef)(null),[x,S]=(0,c.useState)(1/0),[C,w]=(0,c.useState)(null),[T,E]=(0,c.useState)(null),D=jn(t),O=new Date,k=Kn(Mn(O,r),7,i),A=zn(wn.Month,D,r).start,M=(e,t)=>Kn(Dn(e,t*7),7,i),N=Lr(yn(D),e=>o(An(t,e)),()=>y.current?.querySelector(`[tabindex="0"]`)??null);(0,c.useLayoutEffect)(()=>{let e=v.current;if(!e)return;function t(){let t=e.querySelector(`[data-cal-bars]`);if(!t||t.clientHeight===0){S(1/0);return}let n=getComputedStyle(t),r=parseFloat(n.gridAutoRows),i=parseFloat(n.rowGap)||0,a=parseFloat(n.paddingTop)||0;S(r>0?Math.max(1,Math.floor((t.clientHeight-a+i)/(r+i))):1/0)}t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,c.useLayoutEffect)(()=>{let e=b.current;e!==null&&(b.current=null,y.current?.querySelector(`[data-cal-day="${e}"]`)?.focus())});function P(e){let t=y.current;if(!t)return null;let n=t.getBoundingClientRect();if(n.width===0||n.height===0)return null;let r=k.length,i=Nr(Math.floor((e.x-n.left)/n.width*r),0,r-1),a=Nr(Math.floor((e.y-n.top)/n.height*6),0,5);return M(A,a)[i]}function F(e){return y.current?.querySelector(`[data-cal-day="${yn(e)}"]`)??null}Fr(_,{onPress:N.finish,canSwipe:()=>!0,onSwipeMove:N.move,onSwipeEnd:(e,t)=>N.settle(Ar(e,N.width(),t)),dragFrom:(t,n)=>{if(!d)return null;let r=t.closest(`[data-cal-event]`);if(!r||!y.current?.contains(r))return null;let i=e.find(e=>String(e.id)===r.dataset.calEvent),a=P(n);return!i||i.readOnly||a===null?null:{event:i,grabbed:a,offset:0}},onDragStart:E,onDragMove:e=>{let t=P(e);t!==null&&E(e=>{if(!e)return e;let n=Nn(e.grabbed,t);return n===e.offset?e:{...e,offset:n}})},onDragEnd:e=>{E(null);let t=P(e);if(!T||t===null)return;let n=Nn(T.grabbed,t);if(n===0)return;let r=On(T.event.start,n),i=(hr(T.event).getTime()-T.event.start.getTime())/6e4;d?.({event:T.event,start:r,end:Ln(r,On(T.event.end,n),i)})},onDragCancel:()=>E(null)});function I(e,t){let n=F(e);n&&w({day:e,anchor:n,fromKeyboard:t})}function L(e,t){if(s&&e.target.closest(`[data-cal-day-number]`)){s(t);return}p?.({start:t,end:Dn(t,1),allDay:!0},e.currentTarget)}function R(e,t){let n=Yn(e.key,t,r,i);if(!n){j(e)&&(e.preventDefault(),I(t,!0));return}e.preventDefault(),b.current=yn(n),o(n)}function z(e){let{event:t}=e,r=gr(t)||e.span>1||e.continuesBefore||e.continuesAfter,i=!!u||!!d&&!t.readOnly;return(0,f.jsxs)(`div`,{"data-cal-event":String(t.id),className:(0,l.default)(Wr.monthViewBar,r?Wr.monthViewBarFilled:Wr.monthViewBarTimed,e.continuesBefore&&Wr.monthViewBarContinuesBefore,e.continuesAfter&&Wr.monthViewBarContinuesAfter,i&&Wr.monthViewBarInteractive,T?.event===t&&Wr.monthViewBarDragging,h?.event),style:{"--event-color":t.color,gridColumn:`${e.start+1} / span ${e.span}`,gridRow:e.lane+1,...g?.event},onClick:e=>u?.(t,e.currentTarget),children:[!r&&(0,f.jsx)(`span`,{className:Wr.monthViewDot}),!r&&(0,f.jsx)(`span`,{className:Wr.monthViewTime,children:ir(t.start,n)}),(0,f.jsx)(`span`,{className:Wr.monthViewBarTitle,children:m?m(t,{singleLine:!0}):t.title})]},t.id)}function B(i){let o=An(D,i),c=i===0,u=zn(wn.Month,o,r).start,d=null;if(c&&T&&T.offset!==0){let{first:e,last:t}=_r(T.event);d={from:Dn(e,T.offset),to:Dn(t,T.offset)}}return(0,f.jsx)(`div`,{ref:c?y:void 0,className:(0,l.default)(Rr.pagerPane,i===-1&&Rr.pagerPanePrev,i===1&&Rr.pagerPaneNext,Wr.monthViewPane),inert:!c,"aria-hidden":!c||void 0,children:Array.from({length:6},(r,i)=>{let m=M(u,i),_=yr(e,m),v=Cr(Sr(e,m),m.length,x);return(0,f.jsxs)(`div`,{role:`row`,className:Wr.monthViewWeek,children:[m.map((e,r)=>{let i=_[r].length,u=Pn(e,O),m=ur(e,n);return(0,f.jsx)(`div`,{role:`gridcell`,"data-cal-day":yn(e),tabIndex:c&&Pn(e,t)?0:-1,"aria-current":u?`date`:void 0,"aria-label":i>0?`${m}, ${a.eventCount(i)}`:m,className:(0,l.default)(Wr.monthViewCell,e.getMonth()!==o.getMonth()&&Wr.monthViewCellOutside,p&&Wr.monthViewCellCreatable,d&&Nn(d.from,e)>=0&&Nn(e,d.to)>=0&&Wr.monthViewCellTarget,h?.cell),style:g?.cell,onClick:t=>L(t,e),onKeyDown:t=>R(t,e),children:(0,f.jsx)(`span`,{"data-cal-day-number":!0,"aria-hidden":!0,className:(0,l.default)(Wr.monthViewDayNumber,u&&Wr.monthViewDayNumberToday,s&&Wr.monthViewDayNumberLink),children:lr(e,n)})},yn(e))}),(0,f.jsxs)(`div`,{"data-cal-bars":!0,"aria-hidden":!0,className:Wr.monthViewBars,children:[v.visible.map(z),v.hidden.map((e,t)=>e>0&&(0,f.jsx)(`div`,{className:Wr.monthViewMore,style:{gridColumn:t+1,gridRow:v.moreLane+1},onClick:()=>I(m[t],!1),children:a.more(e)},`more-${t}`))]})]},yn(m[0]))})},yn(o))}return(0,f.jsxs)(`div`,{ref:_,className:Wr.monthView,style:{"--days":k.length},children:[(0,f.jsxs)(`div`,{role:`grid`,"aria-label":dr(t,n),className:Wr.monthViewGrid,children:[(0,f.jsx)(`div`,{role:`row`,className:Wr.monthViewWeekdays,children:k.map(e=>(0,f.jsx)(`div`,{role:`columnheader`,"aria-label":cr(e,n,`long`),className:(0,l.default)(Wr.monthViewWeekday,h?.dayHeader),style:g?.dayHeader,children:cr(e,n,`short`)},e.getDay()))}),(0,f.jsx)(`div`,{ref:v,className:(0,l.default)(Rr.pagerViewport,Wr.monthViewViewport),children:(0,f.jsx)(`div`,{ref:N.trackRef,className:Rr.pagerTrack,children:Gr.map(B)})})]}),(0,f.jsx)(rn,{anchor:C?.anchor??null,isOpen:C!==null,onOpenChange:e=>!e&&w(null),focusOnOpen:C?.fromKeyboard??!1,placement:wt.Bottom,align:Tt.Start,content:C&&(0,f.jsxs)(`div`,{className:Wr.monthViewList,children:[(0,f.jsx)(`div`,{className:Wr.monthViewListTitle,children:ur(C.day,n)}),(0,f.jsx)(Tr,{className:Wr.monthViewListEvents,events:e,start:C.day,days:1,showDayHeaders:!1,locale:n,text:a,onEventClick:e=>{w(null),u?.(e,C.anchor)},renderEvent:m,classNames:h,slotStyles:g}),p&&(0,f.jsx)(ne,{className:Wr.monthViewListCreate,onClick:()=>{w(null),p({start:C.day,end:Dn(C.day,1),allDay:!0},C.anchor)},children:a.newEvent})]})})]})}var qr={timeGrid:`timeGrid_eQt1f`,"timeGrid-head":`timeGrid-head_QeMAH`,timeGridHead:`timeGrid-head_QeMAH`,"timeGrid-corner":`timeGrid-corner_ass6Y`,timeGridCorner:`timeGrid-corner_ass6Y`,"timeGrid-toggle":`timeGrid-toggle_q0Oh4`,timeGridToggle:`timeGrid-toggle_q0Oh4`,"timeGrid-toggle-open":`timeGrid-toggle-open_CkMZf`,timeGridToggleOpen:`timeGrid-toggle-open_CkMZf`,"timeGrid-headPane":`timeGrid-headPane_KOqbR`,timeGridHeadPane:`timeGrid-headPane_KOqbR`,"timeGrid-dayHeader":`timeGrid-dayHeader_nyugU`,timeGridDayHeader:`timeGrid-dayHeader_nyugU`,"timeGrid-dayHeader-link":`timeGrid-dayHeader-link_vE861`,timeGridDayHeaderLink:`timeGrid-dayHeader-link_vE861`,"timeGrid-dayNumber":`timeGrid-dayNumber_3xDPg`,timeGridDayNumber:`timeGrid-dayNumber_3xDPg`,"timeGrid-dayNumber-today":`timeGrid-dayNumber-today_em4ho`,timeGridDayNumberToday:`timeGrid-dayNumber-today_em4ho`,"timeGrid-weekday":`timeGrid-weekday_BEOk2`,timeGridWeekday:`timeGrid-weekday_BEOk2`,"timeGrid-allDay":`timeGrid-allDay_sBaRg`,timeGridAllDay:`timeGrid-allDay_sBaRg`,"timeGrid-bar":`timeGrid-bar_bGt1p`,timeGridBar:`timeGrid-bar_bGt1p`,"timeGrid-bar-continuesBefore":`timeGrid-bar-continuesBefore_XRW1T`,timeGridBarContinuesBefore:`timeGrid-bar-continuesBefore_XRW1T`,"timeGrid-bar-continuesAfter":`timeGrid-bar-continuesAfter_BsjNh`,timeGridBarContinuesAfter:`timeGrid-bar-continuesAfter_BsjNh`,"timeGrid-bar-title":`timeGrid-bar-title_iVZsx`,timeGridBarTitle:`timeGrid-bar-title_iVZsx`,"timeGrid-more":`timeGrid-more_Fo6hf`,timeGridMore:`timeGrid-more_Fo6hf`,"timeGrid-body":`timeGrid-body_Vzvbo`,timeGridBody:`timeGrid-body_Vzvbo`,"timeGrid-gutter":`timeGrid-gutter_OuCf-`,timeGridGutter:`timeGrid-gutter_OuCf-`,"timeGrid-hour":`timeGrid-hour_wVF05`,timeGridHour:`timeGrid-hour_wVF05`,"timeGrid-bodyPane":`timeGrid-bodyPane_Ji1lF`,timeGridBodyPane:`timeGrid-bodyPane_Ji1lF`,"timeGrid-column":`timeGrid-column_mEJNy`,timeGridColumn:`timeGrid-column_mEJNy`,"timeGrid-column-today":`timeGrid-column-today_goKa0`,timeGridColumnToday:`timeGrid-column-today_goKa0`,"timeGrid-column-creatable":`timeGrid-column-creatable_5MQ8P`,timeGridColumnCreatable:`timeGrid-column-creatable_5MQ8P`,"timeGrid-event":`timeGrid-event_qLWLI`,timeGridEvent:`timeGrid-event_qLWLI`,"timeGrid-event-short":`timeGrid-event-short_akp1j`,timeGridEventShort:`timeGrid-event-short_akp1j`,"timeGrid-event-brief":`timeGrid-event-brief_AX4PC`,timeGridEventBrief:`timeGrid-event-brief_AX4PC`,"timeGrid-resize":`timeGrid-resize_LdiRH`,timeGridResize:`timeGrid-resize_LdiRH`,"timeGrid-event-continuesBefore":`timeGrid-event-continuesBefore_uGyO5`,timeGridEventContinuesBefore:`timeGrid-event-continuesBefore_uGyO5`,"timeGrid-event-continuesAfter":`timeGrid-event-continuesAfter_p-hcM`,timeGridEventContinuesAfter:`timeGrid-event-continuesAfter_p-hcM`,"timeGrid-event-interactive":`timeGrid-event-interactive_TXdJ8`,timeGridEventInteractive:`timeGrid-event-interactive_TXdJ8`,"timeGrid-event-dragged":`timeGrid-event-dragged_UrxXL`,timeGridEventDragged:`timeGrid-event-dragged_UrxXL`,"timeGrid-event-title":`timeGrid-event-title_uDvkI`,timeGridEventTitle:`timeGrid-event-title_uDvkI`,"timeGrid-event-time":`timeGrid-event-time_O5W3b`,timeGridEventTime:`timeGrid-event-time_O5W3b`,"timeGrid-preview":`timeGrid-preview_nfmke`,timeGridPreview:`timeGrid-preview_nfmke`,"timeGrid-preview-time":`timeGrid-preview-time_8hmVF`,timeGridPreviewTime:`timeGrid-preview-time_8hmVF`,"timeGrid-slot":`timeGrid-slot_s7iMI`,timeGridSlot:`timeGrid-slot_s7iMI`,"timeGrid-now":`timeGrid-now_Rs5aE`,timeGridNow:`timeGrid-now_Rs5aE`,calendarNowPulse:`calendarNowPulse_DDoyI`},Jr=[-1,0,1],Yr=Array.from({length:23},(e,t)=>t+1),Xr=3,Zr=45,Qr=7,$r=4;function ei(){let[e,t]=(0,c.useState)(()=>new Date);return(0,c.useEffect)(()=>{let e;function n(){e=setTimeout(()=>{t(new Date),n()},6e4-Date.now()%6e4)}return n(),()=>clearTimeout(e)},[]),e}function ti({scroller:e,head:t,body:n},r,i,a,o){let s=r.current?.base??n.getBoundingClientRect().height/24;if(!s)return;let c=Math.max((e.clientHeight-t.offsetHeight)/24,1),l=Nr(i,Math.min(c,s),s*$r);r.current={hour:l,base:s},e.style.setProperty(`--custom-calendar-hour-height`,`${l}px`);let u=e.getBoundingClientRect().top;e.scrollTop=n.offsetTop+a*l-(o-u)}function ni({events:e,date:t,view:n,locale:r,weekStartsOn:i,slotMinutes:a,hidden:o,scrollToHour:s,text:u,onDateChange:p,onOpenDay:m,onEventClick:h,onEventChange:g,onSlotCreate:_,renderEvent:v,classNames:y,slotStyles:b,zoomRef:x}){let S=(0,c.useRef)(null),C=(0,c.useRef)(null),w=(0,c.useRef)(null),T=(0,c.useRef)(null),E=(0,c.useRef)(null),D=(0,c.useRef)(null),O=(0,c.useRef)(e),k=(0,c.useRef)(null),[A,j]=(0,c.useState)(null),[M,N]=(0,c.useState)(!1),P=ei(),F=n===wn.Day?1:7,I=zn(n,t,i).start,L=Kn(I,F,o),R=A?O.current:e,z=Lr(yn(I),e=>p(Un(n,t,e,o)),()=>S.current);function B(){let e=S.current,t=C.current,n=w.current;return e&&t&&n?{scroller:e,head:t,body:n}:null}(0,c.useLayoutEffect)(()=>{let e=S.current,t=w.current;if(!e||!t)return;let n=t.offsetHeight/24;if(!n)return;let r=new Date,i=L.some(e=>Pn(e,r));e.scrollTop=Nr(s??(i?Math.max(0,Fn(r)/60-1):Qr),0,24)*n},[]),(0,c.useEffect)(()=>{let e=S.current;if(!e)return;function t(e){if(!e.ctrlKey)return;let t=B();if(!t)return;e.preventDefault();let n=t.body.getBoundingClientRect(),r=n.height/24;r&&ti(t,x,r*Math.exp(-e.deltaY*.01),(e.clientY-n.top)/r,e.clientY)}return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[x]);function V(e){let t=T.current;if(!t)return null;let n=t.getBoundingClientRect();if(!n.width||!n.height)return null;let r=Nr(Math.floor((e.x-n.left)/n.width*L.length),0,L.length-1);return{day:Nn(I,L[r]),minutes:Nr((e.y-n.top)/n.height*Tn,0,Tn)}}function H(e){return Nn(I,e)*Tn+Fn(e)}function U(e,t){let n=V(t);if(!n)return null;let r=F*Tn;if(e.kind===`create`){let t=Math.floor(e.anchor/a)*a,[r,i]=n.minutes>=t?[t,Math.max(Math.ceil(n.minutes/a)*a,t+a)]:[Math.floor(n.minutes/a)*a,t+a],o=Dn(I,e.day),s=In(o,r);return{start:s,end:Ln(s,In(o,Math.min(i,Tn)),i-r)}}let i=n.day*Tn+n.minutes,o=H(e.event.start);if(e.kind===`move`){let t=Nr(Mr(i-e.grab,a),Math.min(o,0),r-a),n=In(I,t),s=hr(e.event).getTime()-e.event.start.getTime();return{start:n,end:new Date(n.getTime()+s)}}let s=Nr(Mr(i,a),o+a,Math.max(r,o+a)),c=e.event.start;return{start:c,end:Ln(c,In(I,s),s-o)}}function W(e){E.current=e,j(e)}function G(t){return e.find(e=>String(e.id)===t.dataset.calEvent)}Fr(S,{onPress:z.finish,canSwipe:()=>!0,onSwipeMove:z.move,onSwipeEnd:(e,t)=>z.settle(Ar(e,z.width(),t)),dragFrom:(e,t)=>{if(!T.current?.contains(e))return null;let n=V(t);if(!n)return null;let r=e.closest(`[data-cal-event]`);if(r){let t=g?G(r):void 0;if(!t||t.readOnly)return null;let i={start:t.start,end:hr(t)};return e.closest(`[data-cal-resize]`)?{kind:`resize`,event:t,...i}:{kind:`move`,event:t,grab:n.day*Tn+n.minutes-H(t.start),...i}}if(!_)return null;let i=Dn(I,n.day);return{kind:`create`,day:n.day,anchor:n.minutes,start:i,end:i}},onDragStart:(t,n)=>{O.current=e,W({...t,...U(t,n)})},onDragMove:e=>{let t=E.current,n=t&&U(t,e);t&&n&&(n.start.getTime()!==t.start.getTime()||n.end.getTime()!==t.end.getTime())&&W({...t,...n})},onDragEnd:e=>{let t=E.current;if(W(null),!t)return;let{start:n,end:r}=U(t,e)??t;if(t.kind===`create`){_?.({start:n,end:r,allDay:!1},te(t.day,n,r));return}(n.getTime()!==t.event.start.getTime()||r.getTime()!==hr(t.event).getTime())&&g?.({event:t.event,start:n,end:r})},onDragCancel:()=>W(null),onPinchStart:(e,t)=>{let n=w.current;if(!n)return;let r=n.getBoundingClientRect(),i=r.height/24;i&&(k.current={hour:i,anchorHour:(e.y-r.top)/i,distance:t})},onPinchMove:(e,t)=>{let n=k.current,r=B();n&&r&&n.distance&&ti(r,x,n.hour*t/n.distance,n.anchorHour,e.y)},onPinchEnd:()=>{k.current=null},autoScroll:()=>{let e=S.current,t=C.current;if(!e||!t)return null;let n=e.getBoundingClientRect();return{element:e,top:n.top+t.offsetHeight,bottom:n.bottom}}});function ee(e,t){if(!_||e.target.closest(`[data-cal-event]`))return;let n=e.currentTarget.getBoundingClientRect();if(!n.height)return;let r=(e.clientY-n.top)/n.height*Tn,i=In(t,Nr(Math.floor(r/a)*a,0,Tn-a)),o=new Date(i.getTime()+Math.max(60,a)*6e4),s=In(t,Tn),c={start:i,end:o<s?o:s,allDay:!1};_(c,te(Nn(I,t),c.start,c.end))}function te(e,t,n){let r=D.current;if(!r)return S.current;let i=Dn(I,e+1),a=Fn(t),o=n>=i?Tn:Fn(n),s=Math.max(L.findIndex(t=>Nn(I,t)===e),0);return r.style.left=`${s/L.length*100}%`,r.style.width=`${100/L.length}%`,r.style.top=`${a/Tn*100}%`,r.style.height=`${Math.max(o-a,0)/Tn*100}%`,r}function q(e){let{event:t}=e;return(0,f.jsx)(`button`,{type:`button`,"data-cal-event":String(t.id),className:(0,l.default)(qr.timeGridBar,e.continuesBefore&&qr.timeGridBarContinuesBefore,e.continuesAfter&&qr.timeGridBarContinuesAfter,y?.event),style:{"--event-color":t.color,gridColumn:`${e.start+1} / span ${e.span}`,gridRow:e.lane+1,...b?.event},"aria-label":`${t.title}, ${u.allDay}`,onClick:e=>h?.(t,e.currentTarget),children:(0,f.jsx)(`span`,{className:qr.timeGridBarTitle,"aria-hidden":!0,children:v?v(t,{singleLine:!0}):t.title})},t.id)}function ne(e){let{event:t}=e,n=e.bottom-e.top,i=n<Zr,a=ar(t.start,hr(t),r),o=!!g&&!t.readOnly&&!e.continuesAfter,s=A&&A.kind!==`create`&&A.event===t;return(0,f.jsxs)(`button`,{type:`button`,"data-cal-event":String(t.id),"aria-label":`${t.title}, ${a}`,className:(0,l.default)(qr.timeGridEvent,i&&qr.timeGridEventShort,n<15&&qr.timeGridEventBrief,e.continuesBefore&&qr.timeGridEventContinuesBefore,e.continuesAfter&&qr.timeGridEventContinuesAfter,(h||o)&&qr.timeGridEventInteractive,s&&qr.timeGridEventDragged,y?.event),style:{"--event-color":t.color,top:`${e.top/Tn*100}%`,"--span":`${n/Tn*100}%`,left:`calc(var(--column-width) * ${e.column/e.columns})`,width:`calc(var(--column-width) * ${e.span/e.columns})`,...b?.event},onClick:e=>h?.(t,e.currentTarget),children:[(0,f.jsx)(`span`,{className:qr.timeGridEventTitle,"aria-hidden":!0,children:v?v(t,{singleLine:i}):t.title}),(0,f.jsx)(`span`,{className:qr.timeGridEventTime,"aria-hidden":!0,children:or(t.start,hr(t),r)}),o&&(0,f.jsx)(`span`,{"data-cal-resize":!0,className:qr.timeGridResize,"aria-hidden":!0})]},t.id)}function J(e){if(!A)return null;let t=e,n=Dn(e,1);if(A.end<=t&&A.start<t||A.start>=n)return null;let i=A.start<t?0:Fn(A.start),a=A.end>=n?Tn:Fn(A.end),o=A.kind===`create`?void 0:A.event.color,s=A.kind===`create`?null:A.event.title;return(0,f.jsxs)(`div`,{className:qr.timeGridPreview,style:{"--event-color":o,top:`${i/Tn*100}%`,height:`${Math.max(a-i,15)/Tn*100}%`},"aria-hidden":!0,children:[s&&(0,f.jsx)(`span`,{className:qr.timeGridEventTitle,children:s}),(0,f.jsx)(`span`,{className:qr.timeGridPreviewTime,children:or(A.start,A.end,r)})]})}let re=Jr.map(e=>{let r=zn(n,Un(n,t,e,o),i).start,a=Kn(r,F,o),s=Sr(R,a,gr);return{step:e,start:r,dates:a,lanes:M?{visible:s,moreLane:0,hidden:a.map(()=>0)}:Cr(s,a.length,Xr)}}),ie=re[1].lanes.hidden.some(e=>e>0),ae=e=>(0,l.default)(Rr.pagerPane,e===-1&&Rr.pagerPanePrev,e===1&&Rr.pagerPaneNext);return(0,f.jsxs)(`div`,{ref:S,tabIndex:-1,className:qr.timeGrid,style:{"--days":L.length,"--custom-calendar-hour-height":x.current?`${x.current.hour}px`:void 0},children:[(0,f.jsxs)(`div`,{ref:C,className:qr.timeGridHead,children:[(0,f.jsx)(`div`,{className:qr.timeGridCorner,children:(ie||M)&&(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(qr.timeGridToggle,M&&qr.timeGridToggleOpen),"aria-label":u.allDay,"aria-expanded":M,onClick:()=>N(e=>!e),children:K(d.faChevronDown)})}),(0,f.jsx)(`div`,{className:Rr.pagerViewport,children:(0,f.jsx)(`div`,{ref:z.trackRef,className:Rr.pagerTrack,children:re.map(({step:e,start:t,dates:n,lanes:i})=>(0,f.jsxs)(`div`,{className:(0,l.default)(ae(e),qr.timeGridHeadPane),inert:e!==0,"aria-hidden":e!==0||void 0,children:[n.map(e=>{let t=Pn(e,P),n=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`span`,{className:qr.timeGridWeekday,children:cr(e,r,`short`)}),(0,f.jsx)(`span`,{className:(0,l.default)(qr.timeGridDayNumber,t&&qr.timeGridDayNumberToday),children:lr(e,r)})]}),i={className:(0,l.default)(qr.timeGridDayHeader,y?.dayHeader),style:b?.dayHeader,"aria-current":t?`date`:void 0};return F>1&&m?(0,f.jsx)(`button`,{type:`button`,...i,className:(0,l.default)(i.className,qr.timeGridDayHeaderLink),"aria-label":ur(e,r),onClick:()=>m(e),children:n},yn(e)):(0,f.jsx)(`div`,{...i,children:n},yn(e))}),(0,f.jsxs)(`div`,{className:qr.timeGridAllDay,"aria-label":u.allDay,role:`group`,children:[i.visible.map(q),i.hidden.map((e,t)=>e>0&&(0,f.jsx)(`div`,{"aria-hidden":!0,className:qr.timeGridMore,style:{gridColumn:t+1,gridRow:i.moreLane+1},onClick:()=>N(!0),children:u.more(e)},`more-${t}`))]})]},yn(t)))})})]}),(0,f.jsxs)(`div`,{ref:w,className:qr.timeGridBody,children:[(0,f.jsx)(`div`,{className:qr.timeGridGutter,"aria-hidden":!0,children:Yr.map(e=>(0,f.jsx)(`span`,{className:qr.timeGridHour,style:{top:`${e/24*100}%`},children:sr(e,r)},e))}),(0,f.jsx)(`div`,{className:Rr.pagerViewport,children:(0,f.jsx)(`div`,{ref:z.trackRef,className:Rr.pagerTrack,children:re.map(({step:e,start:t,dates:n})=>(0,f.jsxs)(`div`,{ref:e===0?T:void 0,className:(0,l.default)(ae(e),qr.timeGridBodyPane),inert:e!==0,"aria-hidden":e!==0||void 0,children:[n.map(t=>{let n=Pn(t,P);return(0,f.jsxs)(`div`,{role:`group`,"aria-label":ur(t,r),"data-cal-column":yn(t),className:(0,l.default)(qr.timeGridColumn,n&&qr.timeGridColumnToday,_&&qr.timeGridColumnCreatable,y?.cell),style:b?.cell,onClick:e=>ee(e,t),children:[br(R,t).map(ne),n&&(0,f.jsx)(`div`,{className:qr.timeGridNow,style:{top:`${Fn(P)/1440*100}%`},"aria-hidden":!0}),e===0&&J(t)]},yn(t))}),e===0&&(0,f.jsx)(`div`,{ref:D,className:qr.timeGridSlot,"aria-hidden":!0})]},yn(t)))})})]})]})}var ri={calendar:`calendar_ykrCR`},ii=[wn.Month,wn.Week,wn.Day,wn.Agenda],ai=600,oi={previous:`Previous`,next:`Next`,today:`Today`,viewSwitcher:`Calendar view`,month:`Month`,week:`Week`,day:`Day`,agenda:`Agenda`,allDay:`All day`,more:e=>`+${e} more`,eventCount:e=>e===1?`1 event`:`${e} events`,noEvents:`No events`,newEvent:`New event`};function si(e){let{events:t,date:n,defaultDate:r,onDateChange:i,view:a,defaultView:o=wn.Month,onViewChange:s,views:u=ii,locale:d,weekStartsOn:p,slotMinutes:m=15,hiddenDays:h,scrollToHour:g,onRangeChange:_,onEventClick:v,onEventChange:y,onSlotCreate:b,renderEvent:x,labels:S,ref:C,className:w,style:T,classNames:E,styles:k,...A}=D(`Calendar`,e),j=O(`Calendar`,S,oi),M=p??nr(d),N=Vn(h),P=(0,c.useRef)(null),F=(0,c.useRef)(null),[I,L]=(0,c.useState)(0),[R,z]=(0,c.useState)(1),[B,V]=(0,c.useState)(()=>{let e=_n(r);return e?bn(e):En(new Date)}),H=_n(n),U=Hn(H?bn(H):B,N),[W,G]=(0,c.useState)(o),ee=a??W;(0,c.useLayoutEffect)(()=>{let e=P.current;if(!e)return;let t=()=>L(e.getBoundingClientRect().width);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let K=I>0&&I<ai,te=Wn(ee,U,M,N),q=`${yn(te.start)}/${yn(te.end)}`,ne=(0,c.useRef)({range:te,onRangeChange:_}),J=(0,c.useRef)(null);(0,c.useLayoutEffect)(()=>{ne.current={range:te,onRangeChange:_}}),(0,c.useEffect)(()=>{J.current!==q&&(J.current=q,ne.current.onRangeChange?.(ne.current.range))},[q]);function re(e){let t=En(e);yn(t)!==yn(U)&&(z(t>U?1:-1),n===void 0&&V(t),i?.(yn(t)))}function ie(e){e!==ee&&(a===void 0&&G(e),s?.(e))}let[ae,oe]=(0,c.useState)(()=>new Map);function se(e){let t=y?.(e);if(typeof t?.then!=`function`)return;let n=String(e.event.id),r={start:e.start,end:e.end};oe(e=>new Map(e).set(n,r));let i=()=>oe(e=>{if(e.get(n)!==r)return e;let t=new Map(e);return t.delete(n),t});t.then(i,i)}let ce=ae.size===0?t:t.map(e=>{let t=ae.get(String(e.id));return t?{...e,...t}:e}),le={events:ce,date:U,view:ee,locale:d,weekStartsOn:M,slotMinutes:m,hidden:N,scrollToHour:g,text:j,onDateChange:re,onOpenDay:u.includes(wn.Day)?e=>{re(e),ie(wn.Day)}:void 0,onEventClick:v,onEventChange:y&&se,onSlotCreate:b,renderEvent:x,classNames:E,slotStyles:k},ue=zn(ee,U,M),Y=Kn(ue.start,Nn(ue.start,ue.end),N),de={start:Y[0],end:Dn(Y[Y.length-1],1)};function fe(){switch(ee){case wn.Week:case wn.Day:return(0,f.jsx)(ni,{...le,zoomRef:F});case wn.Agenda:return(0,f.jsx)(Tr,{events:ce,start:ue.start,days:Nn(ue.start,ue.end),hidden:N,scrollTo:U,showDayHeaders:!0,locale:d,text:j,onEventClick:v,renderEvent:x,classNames:E,slotStyles:k});default:return K?(0,f.jsx)(Ur,{...le}):(0,f.jsx)(Kr,{...le})}}return(0,f.jsxs)(`div`,{...A,ref:pn(P,C),className:(0,l.default)(ri.calendar,w,E?.root),style:{...T,...k?.root},children:[(0,f.jsx)(kr,{className:E?.header,style:k?.header,compact:K,title:fr(ee,U,de,d),direction:R,view:ee,views:u,text:j,onStep:e=>re(Un(ee,U,e,N)),onToday:()=>re(new Date),onViewChange:ie}),fe()]})}var ci=function(e){return e.Elevated=`elevated`,e.Outlined=`outlined`,e.Filled=`filled`,e}({}),li={card:`card_w-6Ki`,"card-clip":`card-clip_eZ8-1`,cardClip:`card-clip_eZ8-1`,"card-padding":`card-padding_X2-q-`,cardPadding:`card-padding_X2-q-`,"card-gaps":`card-gaps_jhYkx`,cardGaps:`card-gaps_jhYkx`,"card-style-elevated":`card-style-elevated_exvMB`,cardStyleElevated:`card-style-elevated_exvMB`,"card-style-outlined":`card-style-outlined_PxZZA`,cardStyleOutlined:`card-style-outlined_PxZZA`,"card-style-filled":`card-style-filled_2nhAY`,cardStyleFilled:`card-style-filled_2nhAY`,"card-interactable":`card-interactable_az2lE`,cardInteractable:`card-interactable_az2lE`,"card-hover":`card-hover_fdS-X`,cardHover:`card-hover_fdS-X`,cardHeader:`cardHeader_HfIlm`,"cardHeader-thumbnail":`cardHeader-thumbnail_rFw-N`,cardHeaderThumbnail:`cardHeader-thumbnail_rFw-N`,"cardHeader-actions":`cardHeader-actions_awD46`,cardHeaderActions:`cardHeader-actions_awD46`,"cardHeader-titles":`cardHeader-titles_CAUU3`,cardHeaderTitles:`cardHeader-titles_CAUU3`,"cardHeader-titles-main":`cardHeader-titles-main_Z834V`,cardHeaderTitlesMain:`cardHeader-titles-main_Z834V`,"cardHeader-titles-main-container":`cardHeader-titles-main-container_1j-od`,cardHeaderTitlesMainContainer:`cardHeader-titles-main-container_1j-od`,"cardHeader-titles-sub":`cardHeader-titles-sub_2X08b`,cardHeaderTitlesSub:`cardHeader-titles-sub_2X08b`,cardMedia:`cardMedia_GZJQF`,cardActions:`cardActions_uYu-0`},ui={elevated:li.cardStyleElevated,outlined:li.cardStyleOutlined,filled:li.cardStyleFilled};function di(e){let{className:t=void 0,children:n=null,styleType:r=ci.Elevated,onClick:i=void 0,tabIndex:a=null,hoverEffect:o=void 0,style:s=void 0,autoGap:u=!0,clip:d=!1,onKeyDown:p,classNames:m,styles:h,...g}=D(`Card`,e),_=!!i,v=(0,c.useRef)(null);function y(e){_&&j(e)&&v.current?.addRipple(),p?.(e)}return(0,f.jsx)(oe,{...g,className:(0,l.default)(li.card,ui[r],d&&li.cardClip,_&&li.cardInteractable,(_&&o!==!1||o)&&li.cardHover,t,m?.root),onClick:i,onKeyDown:y,tabIndex:a??(_?0:null),style:{...s,...h?.root},children:(0,f.jsx)(G,{ref:v,disabled:!_,className:(0,l.default)(li.cardPadding,u&&li.cardGaps,m?.content),style:{borderRadius:`inherit`,...h?.content},children:n})})}function fi({className:e=``,title:t=``,subTitle:n=``,thumbnail:r=``,actions:i=void 0}){let a=typeof r==`string`&&r.startsWith(`http`)?r:void 0;return(0,f.jsxs)(`div`,{className:(0,l.default)(li.cardHeader,e),children:[r&&(0,f.jsx)(`div`,{className:li.cardHeaderThumbnail,style:a?{backgroundImage:`url(${a})`}:{},children:!a&&r}),(0,f.jsxs)(`div`,{className:li.cardHeaderTitles,children:[(0,f.jsxs)(`div`,{className:li.cardHeaderTitlesMainContainer,children:[(0,f.jsx)(`div`,{className:li.cardHeaderTitlesMain,children:t}),(0,f.jsx)(`div`,{className:li.cardHeaderActions,children:Array.isArray(i)?i.map((e,t)=>(0,f.jsx)(ce,{title:e.title,onClick:e.onClick?t=>{t.stopPropagation(),e.onClick?.(t)}:void 0,icon:e.icon},t)):i})]}),(0,f.jsx)(`div`,{className:li.cardHeaderTitlesSub,children:n})]})]})}function pi({src:e=``,alt:t=``}){return(0,f.jsx)(`img`,{className:li.cardMedia,src:e,alt:t})}function mi({children:e=null}){return(0,f.jsx)(f.Fragment,{children:e})}function hi({className:e=``,actions:t=[],children:n=null}){return(0,f.jsxs)(`div`,{className:(0,l.default)(li.cardActions,e),children:[t.map(({id:e,onClick:t,label:n,styleType:r=z.Default})=>(0,f.jsx)(`div`,{children:(0,f.jsx)(ne,{onClick:t,styleType:r,children:n})},e??n)),n]})}var gi={carousel:`carousel_-oOBA`,"carousel-adaptive":`carousel-adaptive_i4I4U`,carouselAdaptive:`carousel-adaptive_i4I4U`,"carousel-track":`carousel-track_tmtQz`,carouselTrack:`carousel-track_tmtQz`,"carousel-trackAdaptive":`carousel-trackAdaptive_Qzc0j`,carouselTrackAdaptive:`carousel-trackAdaptive_Qzc0j`,"carousel-slide":`carousel-slide_Qpgjn`,carouselSlide:`carousel-slide_Qpgjn`,"carousel-prevButton":`carousel-prevButton_P9QsH`,carouselPrevButton:`carousel-prevButton_P9QsH`,"carousel-nextButton":`carousel-nextButton_FgVo7`,carouselNextButton:`carousel-nextButton_FgVo7`,"carousel-buttonDisabled":`carousel-buttonDisabled_rGyW-`,carouselButtonDisabled:`carousel-buttonDisabled_rGyW-`,"carousel-dots":`carousel-dots_xyfSx`,carouselDots:`carousel-dots_xyfSx`,"carousel-dot":`carousel-dot_kPnww`,carouselDot:`carousel-dot_kPnww`,"carousel-dot-active":`carousel-dot-active_f9EJ1`,carouselDotActive:`carousel-dot-active_f9EJ1`},_i={"scroll-fade":`scroll-fade_owdg4`,scrollFade:`scroll-fade_owdg4`,"scroll-fade-y":`scroll-fade-y_wJ1fr`,scrollFadeY:`scroll-fade-y_wJ1fr`,"scroll-fade-x":`scroll-fade-x_WoTqS`,scrollFadeX:`scroll-fade-x_WoTqS`,"scroll-fade-faded-start":`scroll-fade-faded-start_x28G6`,scrollFadeFadedStart:`scroll-fade-faded-start_x28G6`,"scroll-fade-faded-end":`scroll-fade-faded-end_buuWg`,scrollFadeFadedEnd:`scroll-fade-faded-end_buuWg`},vi=10,yi=.2,bi={previous:`Previous slide`,next:`Next slide`,slides:`Slides`,goToSlide:e=>`Go to slide ${e}`};function xi(e){let{children:t,currentIndex:n,defaultIndex:r=0,onChange:i=()=>{},loop:a=!0,autoPlay:o=!1,autoPlayInterval:s=4e3,pauseOnHover:u=!0,showArrows:p=!0,showDots:m=!0,swipeable:h=!0,lazyRender:g=!1,adaptiveHeight:_=!1,className:v,style:y,classNames:b,styles:x,labels:S,...C}=D(`Carousel`,e),w=O(`Carousel`,S,bi),T=c.default.useId(),E=c.default.Children.toArray(t),k=E.length,A=a&&k>1,j=+!!A,M=A?[E[k-1],...E,E[0]]:E,N=n!==void 0,[P,F]=(0,c.useState)(()=>Ci(r,k,A)),I=Ci(N?n:P,k,A),[L,R]=(0,c.useState)(I+j),[z,B]=(0,c.useState)(!0),V=(0,c.useRef)(I),[H,U]=(0,c.useState)(!1),[W,G]=(0,c.useState)(!1),[ee,K]=(0,c.useState)(!1),te=(0,c.useRef)(null),q=(0,c.useRef)(null),ne=(0,c.useRef)(null),J=M.length>0?100/M.length:100;(0,c.useLayoutEffect)(()=>{let e=V.current;if(V.current=I,e===I)return;let t=M.length-1,n=L;A&&L===0?n=k:A&&L===t&&(n=1);let r=A&&e===k-1&&I===0,i=A&&e===0&&I===k-1,a;a=r?n+1:i?n-1:I+j;let o=q.current;n!==L&&o&&(o.style.transition=`none`,o.style.transform=Si(n,0,J),o.offsetWidth,o.style.transition=``),B(!0),R(a)},[I]);let[re,ie]=(0,c.useState)(()=>({min:I+j-1,max:I+j+1})),ae=Math.min(re.min,L-1),se=Math.max(re.max,L+1),[le,ue]=(0,c.useState)(void 0);(0,c.useLayoutEffect)(()=>{if(!_)return;let e=q.current?.children[L];if(!e)return;let t=()=>ue(e.offsetHeight);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[_,L,k]),(0,c.useLayoutEffect)(()=>{let e=ne.current,t=e?.children[I];e&&t&&(e.scrollLeft=t.offsetLeft-(e.clientWidth-t.offsetWidth)/2)},[I,k]);function Y(e){let t=Ci(e,k,A);N||F(t),i(t)}function de(){!A&&I>=k-1||Y(I+1)}function fe(){!A&&I<=0||Y(I-1)}function pe(e){e.target===e.currentTarget&&(ie({min:L-1,max:L+1}),A&&(L===0?(B(!1),R(k)):L===M.length-1&&(B(!1),R(1))))}let me=o&&u,X=H||W||ee;(0,c.useEffect)(()=>{if(!o||k<=1||X)return;let e=setInterval(de,s);return()=>clearInterval(e)},[o,s,X,I,k]);let Z=(0,c.useRef)(null);function he(e){!h||k<=1||(Z.current={startX:e.clientX,startY:e.clientY,width:te.current?.getBoundingClientRect().width||1,axisLocked:!1,active:!0,offsetPercent:0})}function ge(e){let t=Z.current;if(!t||!t.active)return;let n=e.clientX-t.startX,r=e.clientY-t.startY;if(!t.axisLocked){if(Math.abs(n)<vi&&Math.abs(r)<vi)return;if(Math.abs(r)>Math.abs(n)){t.active=!1;return}t.axisLocked=!0,e.currentTarget.setPointerCapture?.(e.pointerId),K(!0),B(!1)}t.offsetPercent=n/t.width*100,q.current&&(q.current.style.transform=Si(L,t.offsetPercent,J))}function _e(){let e=Z.current;if(Z.current=null,!e||!e.axisLocked){K(!1);return}B(!0),K(!1),q.current&&(q.current.style.transition=``,q.current.style.transform=Si(L,0,J)),Math.abs(e.offsetPercent)>=yi*100&&(e.offsetPercent<0?de():fe())}function ve(e){e.defaultPrevented||q.current?.contains(e.target)||(e.key===`ArrowLeft`?(e.preventDefault(),fe()):e.key===`ArrowRight`&&(e.preventDefault(),de()))}function ye(e){let t=null;if(e.key===`ArrowLeft`?t=I-1:e.key===`ArrowRight`?t=I+1:e.key===`Home`?t=0:e.key===`End`&&(t=k-1),t===null)return;e.preventDefault();let n=Ci(t,k,A);Y(n),(ne.current?.children[n])?.focus()}let be=m&&k>1,xe=e=>`${T}-dot-${e}`,Se=e=>`${T}-slide-${e}`,Ce=C[`aria-label`]!==void 0||C[`aria-labelledby`]!==void 0;function we(e){return be?{id:Se(e),role:`tabpanel`,"aria-labelledby":xe(e)}:{id:Se(e),role:`group`,"aria-roledescription":`slide`,"aria-label":`${e+1} of ${k}`}}let Te=!A&&I<=0,Ee=!A&&I>=k-1,De=Si(L,0,J);return(0,f.jsxs)(`div`,{...C,ref:te,role:Ce?`region`:`group`,"aria-roledescription":`carousel`,className:(0,l.default)(gi.carousel,_&&gi.carouselAdaptive,b?.root,v),style:{height:_?le:void 0,...y,...x?.root},onMouseEnter:me?()=>U(!0):void 0,onMouseLeave:me?()=>U(!1):void 0,onFocus:me?()=>G(!0):void 0,onBlur:me?()=>G(!1):void 0,onKeyDown:ve,children:[(0,f.jsx)(`div`,{ref:q,className:(0,l.default)(gi.carouselTrack,_&&gi.carouselTrackAdaptive,b?.track),style:{width:`${M.length*100}%`,transform:De,transition:z?void 0:`none`,...x?.track},"aria-live":o?`off`:`polite`,onTransitionEnd:pe,onPointerDown:he,onPointerMove:ge,onPointerUp:_e,onPointerCancel:_e,children:M.map((e,t)=>{let n=A&&(t===0||t===M.length-1),r=t-j,i=!n&&r===I,a=!g||t>=ae&&t<=se;return(0,f.jsx)(`div`,{...n?{}:we(r),className:(0,l.default)(gi.carouselSlide,b?.slide),style:{width:`${100/M.length}%`,...x?.slide},inert:!i||void 0,children:a?e:null},`carousel-slide-${t}`)})}),p&&k>1&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(ce,{icon:d.faChevronLeft,title:w.previous,"aria-label":w.previous,"aria-disabled":Te||void 0,onClick:()=>!Te&&fe(),className:(0,l.default)(gi.carouselPrevButton,Te&&gi.carouselButtonDisabled,b?.prevButton),style:x?.prevButton}),(0,f.jsx)(ce,{icon:d.faChevronRight,title:w.next,"aria-label":w.next,"aria-disabled":Ee||void 0,onClick:()=>!Ee&&de(),className:(0,l.default)(gi.carouselNextButton,Ee&&gi.carouselButtonDisabled,b?.nextButton),style:x?.nextButton})]}),be&&(0,f.jsx)(`div`,{ref:ne,role:`tablist`,"aria-label":w.slides,className:(0,l.default)(gi.carouselDots,_i.scrollFade,_i.scrollFadeX,_i.scrollFadeFadedStart,_i.scrollFadeFadedEnd,b?.dots),style:x?.dots,onKeyDown:ye,children:E.map((e,t)=>(0,f.jsx)(oe,{id:xe(t),role:`tab`,"aria-label":w.goToSlide(t+1),"aria-selected":t===I,"aria-controls":Se(t),tabIndex:t===I?0:-1,onClick:()=>Y(t),className:(0,l.default)(gi.carouselDot,t===I&&gi.carouselDotActive,b?.dot),style:x?.dot},`carousel-dot-${t}`))})]})}function Si(e,t,n){return`translateX(calc(${-e*n}% + ${n/100*t}%))`}function Ci(e,t,n){return t===0?0:n?(e%t+t)%t:Math.max(0,Math.min(t-1,e))}var wi={checkbox:`checkbox_VO3c2`,"checkbox-icon":`checkbox-icon_7O0Hm`,checkboxIcon:`checkbox-icon_7O0Hm`,"checkbox-loading":`checkbox-loading_4t2-w`,checkboxLoading:`checkbox-loading_4t2-w`,"checkbox-loading-box":`checkbox-loading-box_XBIHw`,checkboxLoadingBox:`checkbox-loading-box_XBIHw`,"checkbox-loading-spinner":`checkbox-loading-spinner_XzXt4`,checkboxLoadingSpinner:`checkbox-loading-spinner_XzXt4`,"checkbox-pointer":`checkbox-pointer_XnO8e`,checkboxPointer:`checkbox-pointer_XnO8e`,"checkbox-disabled":`checkbox-disabled_ML2rR`,checkboxDisabled:`checkbox-disabled_ML2rR`,"checkbox-checkmark":`checkbox-checkmark_Xclv9`,checkboxCheckmark:`checkbox-checkmark_Xclv9`,"checkbox-checkmark-checked":`checkbox-checkmark-checked_mD4FI`,checkboxCheckmarkChecked:`checkbox-checkmark-checked_mD4FI`};function Ti(e){let{label:t=``,selected:n=!1,onToggle:r=()=>{},className:i=``,style:a,disabled:o=!1,lineHeight:s=``,title:u=``,tabIndex:d=0,cursorDefault:p=!1,width:m,height:h,formValidator:g=null,children:_=null,background:v=null,isLoading:y=!1,classNames:b,styles:x,...S}=D(`Checkbox`,e),C=(0,c.useRef)(null),[,w]=(0,c.useState)(0);(0,c.useEffect)(()=>{if(!g)return;let e=()=>w(e=>e+1);return g.registerOnUpdateListener(e),()=>g.removeOnUpdateListener(e)},[g]);function T(e){o||y||(C.current?.addRipple(),g&&g.set(!g.value),r(!n,e))}let E=g?g.value:n;return(0,f.jsxs)(`div`,{...S,className:(0,l.default)(wi.checkbox,{[wi.checkboxDisabled]:o,[wi.checkboxPointer]:!p},i),style:{...m?{"--checkbox-size":m}:null,...a},onClick:T,onKeyPress:e=>{e.key===`Enter`&&T(e)},role:`checkbox`,"aria-checked":E,"aria-disabled":o||void 0,tabIndex:d,children:[(0,f.jsx)(`div`,{title:u,className:(0,l.default)(wi.checkboxIcon,y?wi.checkboxLoading:null,b?.icon),style:x?.icon,children:y?(0,f.jsx)(`div`,{className:wi.checkboxLoadingBox,style:{width:m,height:h},children:(0,f.jsx)(R,{className:wi.checkboxLoadingSpinner})}):(0,f.jsxs)(`div`,{style:{width:m,height:h,...v?{"--checkbox-fill":v}:null,...x?.checkmark},className:(0,l.default)(wi.checkboxCheckmark,E&&wi.checkboxCheckmarkChecked,b?.checkmark),children:[(0,f.jsx)(G,{ref:C,manualOnly:!0,overflowHidden:!1,rippleAnimationLength:.3,rippleBackground:`radial-gradient(transparent, var(--primary-color))`}),(0,f.jsx)(`svg`,{strokeLinejoin:`round`,strokeLinecap:`round`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`-0.5 -1.5 4 2.6`,children:(0,f.jsx)(`path`,{d:`M 0 0 l 1 1 l 2 -2`,strokeWidth:`0.4`,fill:`none`})})]})}),(0,f.jsx)(`div`,{className:b?.label,style:{lineHeight:s||`100%`,...x?.label},children:_||t})]})}var Ei=function(e){return e.Default=`default`,e.Primary=`primary`,e.Info=`info`,e.Warn=`warn`,e.Error=`error`,e}({}),Di={chip:`chip_rCTMl`,"chip-clickable":`chip-clickable_WTVjG`,chipClickable:`chip-clickable_WTVjG`,"chip-style-default":`chip-style-default_ppCDx`,chipStyleDefault:`chip-style-default_ppCDx`,"chip-style-primary":`chip-style-primary_oyE85`,chipStylePrimary:`chip-style-primary_oyE85`,"chip-style-info":`chip-style-info_GNJrm`,chipStyleInfo:`chip-style-info_GNJrm`,"chip-style-warn":`chip-style-warn_Jx3LU`,chipStyleWarn:`chip-style-warn_Jx3LU`,"chip-style-error":`chip-style-error_-Npvg`,chipStyleError:`chip-style-error_-Npvg`,"chip-inner":`chip-inner_mfo-w`,chipInner:`chip-inner_mfo-w`,"chip-text":`chip-text_d1juf`,chipText:`chip-text_d1juf`,"chip-thumbnail":`chip-thumbnail_-A7eU`,chipThumbnail:`chip-thumbnail_-A7eU`,"chip-container":`chip-container_oNNmF`,chipContainer:`chip-container_oNNmF`,"chip-container-inline":`chip-container-inline_11QHw`,chipContainerInline:`chip-container-inline_11QHw`},Oi={default:Di.chipStyleDefault,primary:Di.chipStylePrimary,info:Di.chipStyleInfo,warn:Di.chipStyleWarn,error:Di.chipStyleError},ki={remove:`Remove`};function Ai(e){let{className:t=``,thumbnail:n=``,text:r=``,styleType:i=Ei.Default,showRemoveIcon:a=!1,labels:o,onClick:s,onRemove:u,style:p,classNames:m,styles:h,...g}=D(`Chip`,e),_=O(`Chip`,o,ki),v=(0,c.useRef)(null);function y(e){s&&j(e)&&v.current?.addRipple()}let b=(0,c.useMemo)(()=>{if(typeof n==`string`&&n.startsWith(`http`))return n},[n]);return(0,f.jsx)(oe,{...g,className:(0,l.default)(Di.chip,Oi[i],s&&Di.chipClickable,t,m?.root),style:{...p,...h?.root},onClick:s,onKeyDown:y,children:(0,f.jsx)(G,{ref:v,disabled:!s,style:{borderRadius:`inherit`},children:(0,f.jsxs)(`div`,{className:(0,l.default)(Di.chipInner,m?.inner),style:h?.inner,children:[n&&(0,f.jsx)(`div`,{className:(0,l.default)(Di.chipThumbnail,m?.thumbnail),style:{...b?{backgroundImage:`url(${b})`}:{},...h?.thumbnail},children:!b&&n}),(0,f.jsx)(`div`,{className:(0,l.default)(Di.chipText,m?.text),style:h?.text,children:r}),a&&(0,f.jsx)(ce,{icon:d.faXmarkCircle,className:m?.removeIcon,style:h?.removeIcon,"aria-label":_.remove,onClick:e=>{e.stopPropagation(),u?.()}})]})})})}function ji({className:e=void 0,children:t=null,inline:n=!1,...r}){return(0,f.jsx)(`div`,{...r,className:(0,l.default)(Di.chipContainer,n&&Di.chipContainerInline,e),children:t})}var Mi={tooltipBubble:`tooltipBubble_uyev0`,tooltipError:`tooltipError_gUBut`,tooltipDetails:`tooltipDetails_R7N16`,"tooltipDetails-icon":`tooltipDetails-icon_rsjns`,tooltipDetailsIcon:`tooltipDetails-icon_rsjns`},Ni=6,Pi={details:`More information`};function Fi({variant:e,message:t=``,isVisible:n=!0,tooltipPosition:r,onClick:i,labels:a}){let[o,s]=(0,c.useState)(!1),u=O(`Tooltip`,a,Pi),d=(0,c.useRef)(null),p=(0,c.useRef)(null),m=(0,c.useRef)(null),h=(0,c.useRef)(null),g=(0,c.useRef)(null),[_,v]=(0,c.useState)(10),y=(0,c.useId)(),b=e===`details`?o:n;(0,c.useLayoutEffect)(()=>{m.current=e===`details`?p.current:d.current?.parentElement??null}),(0,c.useEffect)(()=>{let e=m.current;if(e&&b)return e.setAttribute(`aria-describedby`,y),()=>e.removeAttribute(`aria-describedby`)},[b,y]),(0,c.useLayoutEffect)(()=>{if(b){let e=m.current?.getBoundingClientRect();v(e?.width??10)}},[b]),Rt({isOpen:b,placement:wt.Top,align:e===`error`?Tt.End:Tt.Start,offset:Ni,triggerRef:m,floatingRef:h,panelRef:h,arrowRef:g,shrinkToFit:!0});let x=b&&(0,f.jsx)(_e,{children:(0,f.jsx)(`div`,{ref:h,id:y,role:e===`error`?`alert`:`tooltip`,className:(0,l.default)(e===`error`?Mi.tooltipError:Mi.tooltipBubble,r),style:{"--tooltip-trigger-width":`${_}px`},onClick:i,children:t})});return e===`details`?(0,f.jsxs)(`div`,{ref:p,className:Mi.tooltipDetails,children:[(0,f.jsx)(`span`,{className:Mi.tooltipDetailsIcon,role:`button`,tabIndex:0,"aria-label":u.details,"aria-expanded":o,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onFocus:()=>s(!0),onBlur:()=>s(!1),onKeyDown:e=>{j(e)&&(e.preventDefault(),s(e=>!e))},children:`?`}),x]}):e===`info`||e===`error`?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`span`,{ref:d,style:{display:`none`}}),x]}):null}var Ii={animatedIcon:`animatedIcon_vyzvJ`,"animatedIcon-spin":`animatedIcon-spin_B9YzP`,animatedIconSpin:`animatedIcon-spin_B9YzP`,"animatedIcon-layer":`animatedIcon-layer_-9A1a`,animatedIconLayer:`animatedIcon-layer_-9A1a`,"animatedIcon-layer-front":`animatedIcon-layer-front_q9UVU`,animatedIconLayerFront:`animatedIcon-layer-front_q9UVU`};function Li(e){return`${e.prefix}:${e.iconName}`}var Ri=360;function zi({icon:e,duration:t=200,spin:n=!1,className:r,style:i,onClick:a,onMouseEnter:o,onMouseLeave:s,classNames:d,styles:p,...m}){let[h,g]=(0,c.useState)([e,e]),[_,v]=(0,c.useState)(0),[y,b]=(0,c.useState)(0);if(Li(e)!==Li(h[_])){let t=+(_===0),r=[...h];r[t]=e,g(r),v(t),n&&b(e=>e+1)}return(0,f.jsxs)(`span`,{...m,className:(0,l.default)(Ii.animatedIcon,{[Ii.animatedIconSpin]:n},d?.root,r),style:{...i,...p?.root,"--animated-icon-duration":`${t}ms`,"--animated-icon-spin-rotation":`${y*Ri}deg`},onClick:a,onMouseEnter:o,onMouseLeave:s,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:h[0],className:(0,l.default)(Ii.animatedIconLayer,{[Ii.animatedIconLayerFront]:_===0},d?.icon),style:p?.icon}),(0,f.jsx)(u.FontAwesomeIcon,{icon:h[1],className:(0,l.default)(Ii.animatedIconLayer,{[Ii.animatedIconLayerFront]:_===1},d?.icon),style:p?.icon})]})}var Bi={"required-mark":`required-mark_xGJdX`,requiredMark:`required-mark_xGJdX`,input:`input_VKNCE`,"input-placeholder":`input-placeholder_IZH-l`,inputPlaceholder:`input-placeholder_IZH-l`,"input-placeholder-shown":`input-placeholder-shown_mm35e`,inputPlaceholderShown:`input-placeholder-shown_mm35e`,fadeIn:`fadeIn_kmX3i`,"input-placeholder-multiline":`input-placeholder-multiline_tLHAl`,inputPlaceholderMultiline:`input-placeholder-multiline_tLHAl`,"input-matLabel":`input-matLabel_-05ey`,inputMatLabel:`input-matLabel_-05ey`,"input-matLabel-floating":`input-matLabel-floating_1P2YE`,inputMatLabelFloating:`input-matLabel-floating_1P2YE`,"input-matLabel-multiline":`input-matLabel-multiline_miIZJ`,inputMatLabelMultiline:`input-matLabel-multiline_miIZJ`,"input-fieldset":`input-fieldset_XCibg`,inputFieldset:`input-fieldset_XCibg`,"input-fieldset-legend":`input-fieldset-legend_X23zp`,inputFieldsetLegend:`input-fieldset-legend_X23zp`,"input-fieldset-legend-active":`input-fieldset-legend-active_t-9hu`,inputFieldsetLegendActive:`input-fieldset-legend-active_t-9hu`,"input-iconLeft":`input-iconLeft_itIuo`,inputIconLeft:`input-iconLeft_itIuo`,"input-container":`input-container_M1RoG`,inputContainer:`input-container_M1RoG`,"input-container-multiline":`input-container-multiline_eLw7h`,inputContainerMultiline:`input-container-multiline_eLw7h`,"input-container-border":`input-container-border_l131I`,inputContainerBorder:`input-container-border_l131I`,"input-container-border-focused":`input-container-border-focused_ct6oY`,inputContainerBorderFocused:`input-container-border-focused_ct6oY`,"input-container-border-searchFocused":`input-container-border-searchFocused_lq088`,inputContainerBorderSearchFocused:`input-container-border-searchFocused_lq088`,"input-container-border-invalid":`input-container-border-invalid_Wdbq2`,inputContainerBorderInvalid:`input-container-border-invalid_Wdbq2`,"input-container-border-error":`input-container-border-error_gzfPG`,inputContainerBorderError:`input-container-border-error_gzfPG`,"input-label":`input-label_w1hMR`,inputLabel:`input-label_w1hMR`,"input-label-column":`input-label-column_qBFPC`,inputLabelColumn:`input-label-column_qBFPC`,"input-label-text":`input-label-text_-J5qQ`,inputLabelText:`input-label-text_-J5qQ`,"input-upper-right-label":`input-upper-right-label_I-WG3`,inputUpperRightLabel:`input-upper-right-label_I-WG3`,"input-field":`input-field_pmDvZ`,inputField:`input-field_pmDvZ`,inputAutofillStart:`inputAutofillStart_tOifY`,inputAutofillEnd:`inputAutofillEnd_KLDQQ`,"input-field-withIcon":`input-field-withIcon_VpfmK`,inputFieldWithIcon:`input-field-withIcon_VpfmK`,"input-field-withIcon-left":`input-field-withIcon-left_Io7lU`,inputFieldWithIconLeft:`input-field-withIcon-left_Io7lU`,"input-field-suffix":`input-field-suffix_NZpXp`,inputFieldSuffix:`input-field-suffix_NZpXp`,"input-field-date":`input-field-date_UHJEZ`,inputFieldDate:`input-field-date_UHJEZ`,"input-field-default":`input-field-default_TKipA`,inputFieldDefault:`input-field-default_TKipA`,"input-field-readOnly":`input-field-readOnly_Eut34`,inputFieldReadOnly:`input-field-readOnly_Eut34`,"input-field-uppercase":`input-field-uppercase_UV6f1`,inputFieldUppercase:`input-field-uppercase_UV6f1`,"input-field-multiline":`input-field-multiline_al3V1`,inputFieldMultiline:`input-field-multiline_al3V1`,"input-field-multiline-autoResize":`input-field-multiline-autoResize_nK33P`,inputFieldMultilineAutoResize:`input-field-multiline-autoResize_nK33P`,"input-field-icon":`input-field-icon_YyJIr`,inputFieldIcon:`input-field-icon_YyJIr`,"input-field-icon-left":`input-field-icon-left_m2XB1`,inputFieldIconLeft:`input-field-icon-left_m2XB1`,"input-field-icon-notClickable":`input-field-icon-notClickable_7j24I`,inputFieldIconNotClickable:`input-field-icon-notClickable_7j24I`,"input-error":`input-error_LIG23`,inputError:`input-error_LIG23`},Vi=function(e){return e.Edit=`edit`,e.Phone=`phone`,e.Email=`email`,e.Iban=`iban`,e.Date=`date`,e.HasNoIcon=`hasNoIcon`,e.Search=`searchInput`,e.Password=`password`,e}({}),Hi=function(e){return e.Left=`left`,e.Right=`right`,e}({}),Ui={clear:`Clear`,showPassword:`Show password`,hidePassword:`Hide password`,clearSearch:`Clear search`};function Wi(e){if(e)return{role:`button`,tabIndex:0,onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(t))}}}function Gi(e){let{name:t=``,id:n,label:r=``,errorMessage:i=``,isValid:a=!0,className:o=``,style:s,value:p=``,icon:m=null,iconPosition:h,onChange:g=()=>{},onFocus:_=null,onBlur:v=null,onMouseEnter:y=null,onMouseLeave:b=null,isUppercase:x=!1,isRequired:S=!1,tabIndex:C=0,type:w=void 0,isRow:T=!1,onIconClick:E=null,parse:k=null,formValidator:A=null,autoFocus:j=!1,suffix:M=null,upperRightLabel:N=null,labelInBorder:P=!1,showCancel:F=!1,onClearClicked:I,min:L=null,max:R=null,placeholder:z=``,useMatLabelStyle:B=!0,alwaysFloatLabel:V=!1,autoComplete:H=null,onClick:U=()=>null,readOnly:W=!1,customInput:G,alwaysShowCancel:ee=!1,multiline:K=!1,rows:te,autoResize:q=!1,classNames:ne,styles:J,disabled:re=!1,labels:ie,ref:ae,...oe}=D(`Input`,e),se=O(`Input`,ie,Ui),[ce,le]=(0,c.useState)(!1),[ue,Y]=(0,c.useState)(!1),[de,fe]=(0,c.useState)(!1),[pe,me]=(0,c.useState)(!1),[,X]=(0,c.useState)(0),Z=(0,c.useRef)(null),he=(0,c.useRef)(A),ge=(0,c.useId)(),_e=n||t||ge,ve=A?A.value:p,ye=(0,c.useRef)(!1),be=(0,c.useCallback)(()=>{let e=Z.current;if(e){if(!q){ye.current&&=(e.style.height=``,!1);return}e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`,ye.current=!0}},[q]);(0,c.useEffect)(()=>{be()},[be,ve]),(0,c.useEffect)(()=>{j&&Z.current&&setTimeout(()=>{Z.current?.focus()},1)},[j]),(0,c.useEffect)(()=>{he.current=A;let e=he.current;if(!e)return;e.label=r??``,e.validate();let t=()=>X(e=>e+1);return e.registerOnUpdateListener(t),()=>{e.removeOnUpdateListener(t)}},[A,r]);let xe=()=>A?A.touched&&A.hasError():!a||!!i,Se=()=>!!(S||A&&A.validators.find(e=>e.validatorId===`required`)),Ce=e=>{fe(!0),y&&y(e)},we=e=>{fe(!1),b&&b(e)},Te=e=>{le(!0),_&&_(e)},Ee=e=>{he.current&&(he.current.touched=!0),le(!1),v&&v(e)},De=e=>{let t,n;typeof e==`string`?n=e:(t=e,n=e.target.value),k&&(n=k(n)),A&&A.set(n),g&&g(n,t),be()},Oe=()=>{if(w!==Vi.Email)return w===Vi.Phone?`tel`:w===Vi.Search?`search`:w===`password`&&pe?`text`:w},ke=()=>{if(w===Vi.Email)return`email`;if(w===Vi.Phone)return`tel`;if(w===Vi.Search)return`search`},Ae=w&&w!==Vi.Date&&w!==Vi.Iban&&w!==Vi.HasNoIcon,je=w===Vi.Search||w===Vi.Password,Me=!!m,Ne=Me&&!je,Pe=w===Vi.Email||w===Vi.Phone||w===Vi.Search,Q=(h??(!B&&Pe?Hi.Left:Hi.Right))===Hi.Left,Fe={className:(0,l.default)(Bi.inputFieldIcon,{[Bi.inputFieldIconNotClickable]:!E,[Bi.inputFieldIconLeft]:Q}),onClick:E??void 0,...Wi(E)},Ie=m,Le=E??Ie?.props.onClick,Re=Ne&&Ie?c.default.cloneElement(Ie,{className:(0,l.default)(Bi.inputFieldIcon,{[Bi.inputFieldIconNotClickable]:!Le,[Bi.inputFieldIconLeft]:Q},Ie.props.className),onClick:Le,...Wi(Le)}):null,ze=(Ae||Me)&&Q,Be={className:(0,l.default)(Bi.inputFieldIcon,Bi.inputFieldIconPassword,{[Bi.inputFieldIconLeft]:Q}),onClick:()=>me(!pe),...Wi(()=>me(!pe)),"aria-label":pe?se.hidePassword:se.showPassword},Ve=xe(),He=r;He&&Se()&&(He=`${He} *`);let Ue=Se()?(0,f.jsx)(`span`,{className:Bi.requiredMark,children:`*`}):null,We=ce&&!W,Ge=B&&(V||We||ve||ue||w===Vi.Date),Ke=e=>{let{animationName:t}=e;if(t===Bi.inputAutofillStart){Y(!0);let t=e.currentTarget.value;t&&t!==String(ve??``)&&De(t);return}if(t===Bi.inputAutofillEnd){Y(!1);return}oe.onAnimationStart?.(e)},qe=w===Vi.Search&&!!ve,Je=G?.props;function Ye(){A&&A.set(``),g?.(``),I?.()}return(0,f.jsxs)(`div`,{className:(0,l.default)(Bi.input,{[Bi.inputIconLeft]:ze},o),style:s,children:[(0,f.jsxs)(`label`,{htmlFor:_e,className:(0,l.default)(Bi.inputLabel,ne?.label,{[Bi.inputLabelColumn]:!T,[Bi.inputLabelInBorder]:P}),style:J?.label,children:[r&&!B?(0,f.jsxs)(`span`,{className:Bi.inputLabelText,children:[r,Ue]}):null,N&&(0,f.jsx)(`div`,{className:(0,l.default)(Bi.inputUpperRightLabel,ne?.upperRightLabel),style:J?.upperRightLabel,children:N}),(0,f.jsxs)(`div`,{className:(0,l.default)(Bi.inputContainer,{[Bi.inputContainerMultiline]:K},ne?.container),style:J?.container,onMouseEnter:Ce,onMouseLeave:we,children:[Re,c.default.cloneElement(G||(K?(0,f.jsx)(`textarea`,{}):(0,f.jsx)(`input`,{})),{...oe,className:(0,l.default)(Bi.inputField,{[Bi.inputFieldUppercase]:x,[Bi.inputFieldDate]:w===Vi.Date,[Bi.inputFieldDefault]:w!==Vi.Date,[Bi.inputFieldWithIcon]:Ae||Me,[Bi.inputFieldWithIconLeft]:ze,[Bi.inputFieldMultiline]:K,[Bi.inputFieldMultilineAutoResize]:K&&q,[Bi.inputFieldReadOnly]:W&&!re},ne?.input,Je?.className),style:Je?.style||J?.input?{...Je?.style,...J?.input}:void 0,name:t,id:_e,value:ve,tabIndex:C,ref:G?void 0:pn(Z,ae),onChange:De,onAnimationStart:Ke,onFocus:Te,onBlur:Ee,placeholder:B?``:z,autoComplete:H,onClick:U,readOnly:W,disabled:re,...!K&&{type:Oe(),inputMode:oe.inputMode??ke(),min:L,max:R},...K&&te!==void 0&&{rows:te}}),M&&(0,f.jsx)(`div`,{className:(0,l.default)(Bi.inputFieldSuffix,ne?.suffix),style:J?.suffix,children:M})]}),(0,f.jsx)(`fieldset`,{className:(0,l.default)(Bi.inputFieldset,ne?.fieldset,{[Bi.inputContainerBorderFocused]:We,[Bi.inputContainerBorderSearchFocused]:w===Vi.Search&&(We||!!ve),[Bi.inputContainerBorderInvalid]:Ve,[Bi.inputContainerBorderError]:Ve}),style:J?.fieldset,children:(0,f.jsx)(`legend`,{className:(0,l.default)(Bi.inputFieldsetLegend,{[Bi.inputFieldsetLegendActive]:Ge}),children:(0,f.jsx)(`span`,{children:He})})}),B&&r&&(0,f.jsxs)(`div`,{className:(0,l.default)(Bi.inputMatLabel,{[Bi.inputMatLabelFloating]:Ge,[Bi.inputMatLabelMultiline]:K&&!Ge}),children:[r,Ue]}),B&&z&&(0,f.jsx)(`div`,{className:(0,l.default)(Bi.inputPlaceholder,We&&!ve&&!ue&&Bi.inputPlaceholderShown,K&&Bi.inputPlaceholderMultiline),children:z}),(0,f.jsx)(Fi,{variant:`error`,message:A?A.getCurrentErrorMessage():i||``,isVisible:Ve&&(ce||de)})]}),w===Vi.Phone&&!Me&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faPhone,...Fe}),w===Vi.Email&&!Me&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faEnvelope,...Fe}),w===Vi.Edit&&!Me&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faPen,...Fe}),w===Vi.Search&&(0,f.jsx)(zi,{icon:qe?d.faXmark:d.faSearch,className:(0,l.default)(Bi.inputFieldIcon,{[Bi.inputFieldIconNotClickable]:!qe,[Bi.inputFieldIconLeft]:Q}),onClick:qe?Ye:void 0,...Wi(qe?Ye:void 0),"aria-label":qe?se.clearSearch:void 0}),w===Vi.Password&&(0,f.jsx)(u.FontAwesomeIcon,{icon:pe?d.faEyeSlash:d.faEye,...Be}),(F&&ve&&(ce||de)||ee)&&w!==Vi.Search&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faXmark,className:Bi.inputFieldIcon,onClick:Ye,onMouseEnter:()=>fe(!0),onMouseLeave:()=>fe(!1),...Wi(Ye),"aria-label":se.clear})]})}var Ki,qi=/^#([0-9a-f]{6}|[0-9a-f]{8})$/i,Ji=`#010203`,Yi=`#040506`;function Xi(e){return Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`)}function Zi(e,t,n,r){let i=Math.round(r);return`#${Xi(e)}${Xi(t)}${Xi(n)}${i===255?``:Xi(i)}`}function Qi(e){let t=e?.trim();if(!t)return;if(qi.test(t))return t;if(Ki===void 0&&(Ki=document.createElement(`canvas`).getContext(`2d`)),!Ki)return;Ki.fillStyle=Ji,Ki.fillStyle=t;let n=Ki.fillStyle;if(Ki.fillStyle=Yi,Ki.fillStyle=t,Ki.fillStyle!==n)return;if(n.startsWith(`#`))return n;let r=/^rgba?\(([^)]+)\)$/i.exec(n);if(r){let[e,t,n,i=`1`]=r[1].split(`,`).map(e=>e.trim());return Zi(Number(e),Number(t),Number(n),Number(i)*255)}Ki.clearRect(0,0,1,1),Ki.fillRect(0,0,1,1);let[i,a,o,s]=Ki.getImageData(0,0,1,1).data;return Zi(i,a,o,s)}var $i={colorPicker:`colorPicker_Ts3an`,swatch:`swatch_NW78g`,swatchHex:`swatchHex_j7-i5`,swatchFill:`swatchFill_oNtHf`,panel:`panel_WXEvY`,gradientArea:`gradientArea_qEZim`,gradientOverlay:`gradientOverlay_ZQybe`,cursor:`cursor_m67Lm`,hueSlider:`hueSlider_k3Knb`,alphaSlider:`alphaSlider_OT2sD`,hexRow:`hexRow_L4bZU`,hexInput:`hexInput_zQw4s`,eyeDropperButton:`eyeDropperButton_dOyRX`},ea=typeof window<`u`&&`EyeDropper`in window;async function ta(){let e=window.EyeDropper;if(!e)return null;try{return(await new e().open()).sRGBHex}catch{return null}}function na(e){return Math.max(0,Math.min(100,e))}function ra(e){return/^#[0-9a-fA-F]{6}$/.test(e)||/^#[0-9a-fA-F]{8}$/.test(e)}function ia(e){return/^#[0-9a-fA-F]{8}$/.test(e)?{hex6:e.slice(0,7),alpha:parseInt(e.slice(7,9),16)/255*100}:{hex6:e.slice(0,7),alpha:100}}function aa(e,t,n){return!n||t>=100?e:`${e}${Math.round(t/100*255).toString(16).padStart(2,`0`)}`}function oa(e,t){return`rgba(${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}, ${t/100})`}function sa(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=i-Math.min(t,n,r),o=0;a!==0&&(o=i===t?(n-r)/a%6:i===n?(r-t)/a+2:(t-n)/a+4,o*=60,o<0&&(o+=360));let s=i===0?0:a/i*100,c=i*100;return{h:o,s,v:c}}function ca(e,t,n){let r=t/100,i=n/100,a=i*r,o=a*(1-Math.abs(e/60%2-1)),s=i-a,c=0,l=0,u=0;e<60?(c=a,l=o,u=0):e<120?(c=o,l=a,u=0):e<180?(c=0,l=a,u=o):e<240?(c=0,l=o,u=a):e<300?(c=o,l=0,u=a):(c=a,l=0,u=o);let d=e=>Math.round((e+s)*255).toString(16).padStart(2,`0`);return`#${d(c)}${d(l)}${d(u)}`}function la({hex:e,onChange:t,useInputComponent:n=!1,className:r,style:i}){let[a,o]=(0,c.useState)(e),[s,u]=(0,c.useState)(e);e!==s&&(u(e),o(e));function d(e){o(e);let n=e.startsWith(`#`)?e:`#${e}`;ra(n)&&t(n)}function p(){ra(a.startsWith(`#`)?a:`#${a}`)||o(e)}return n?(0,f.jsx)(Gi,{value:a,onChange:e=>d(e),onBlur:p}):(0,f.jsx)(`input`,{type:`text`,value:a,onChange:e=>d(e.target.value),onBlur:p,className:(0,l.default)($i.hexInput,r),style:i,spellCheck:!1})}function ua({hue:e,sat:t,val:n,alpha:r,onHueChange:i,onSVChange:a,onAlphaChange:o,showInput:s=!0,showAlpha:p=!1,labels:m,classNames:h,styles:g}){let _=(0,c.useRef)(null);function v(e){let t=_.current.getBoundingClientRect(),n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width)),r=Math.max(0,Math.min(1,(e.clientY-t.top)/t.height));return{s:n*100,v:(1-r)*100}}function y(e){let r=e.shiftKey?10:1,i=t,o=n;switch(e.key){case`ArrowLeft`:i-=r;break;case`ArrowRight`:i+=r;break;case`ArrowUp`:o+=r;break;case`ArrowDown`:o-=r;break;case`Home`:i=0;break;case`End`:i=100;break;case`PageUp`:o=100;break;case`PageDown`:o=0;break;default:return}e.preventDefault(),a(na(i),na(o))}function b(e){e.currentTarget.setPointerCapture(e.pointerId);let{s:t,v:n}=v(e);a(t,n);let r=e=>{let{s:t,v:n}=v(e);a(t,n)},i=()=>{window.removeEventListener(`pointermove`,r),window.removeEventListener(`pointerup`,i)};window.addEventListener(`pointermove`,r),window.addEventListener(`pointerup`,i)}function x(e){let{hex6:t,alpha:n}=ia(e),{h:r,s,v:c}=sa(t);i(r),a(s,c),p&&o(n)}let S=ca(e,t,n),C=p?aa(S,r,!0):S;return(0,f.jsxs)(`div`,{className:(0,l.default)($i.panel,h?.panel),style:g?.panel,children:[(0,f.jsxs)(`div`,{ref:_,role:`slider`,tabIndex:0,"aria-label":m.saturationAndBrightness,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(t),"aria-valuetext":m.saturationAndBrightnessValue(Math.round(t),Math.round(n)),className:(0,l.default)($i.gradientArea,h?.gradient),style:{"--hue":e,...g?.gradient},onPointerDown:b,onKeyDown:y,children:[(0,f.jsx)(`div`,{className:$i.gradientOverlay}),(0,f.jsx)(`div`,{className:$i.cursor,style:{left:`${t}%`,top:`${100-n}%`}})]}),(0,f.jsx)(`input`,{type:`range`,min:0,max:359,value:Math.round(e),onChange:e=>i(Number(e.target.value)),className:(0,l.default)($i.hueSlider,h?.hueSlider),style:g?.hueSlider}),p&&(0,f.jsx)(`input`,{type:`range`,min:0,max:100,value:Math.round(r),onChange:e=>o(Number(e.target.value)),className:(0,l.default)($i.alphaSlider,h?.alphaSlider),style:{"--alpha-color":S,...g?.alphaSlider}}),(s||ea)&&(0,f.jsxs)(`div`,{className:$i.hexRow,children:[s&&(0,f.jsx)(la,{hex:C,onChange:x,className:h?.hexInput,style:g?.hexInput}),ea&&(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($i.eyeDropperButton,h?.eyeDropper),style:g?.eyeDropper,onClick:async()=>{let e=await ta();e&&x(e)},"aria-label":m.pickFromScreen,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faEyeDropper})})]})]})}var da=`#3b82f6`,fa={pickFromScreen:`Pick color from screen`,saturationAndBrightness:`Saturation and brightness`,saturationAndBrightnessValue:(e,t)=>`${e}% saturation, ${t}% brightness`};function pa({className:e,value:t=da,onChange:n,showInput:r=!1,showAlpha:i=!1,inline:a=!1,labels:o,style:s,classNames:u,styles:d,...p}){let m=O(`ColorPicker`,o,fa),[h,g]=(0,c.useState)(!1),{hex6:_,alpha:v}=ia(Qi(t)??da),y=sa(_),[b,x]=(0,c.useState)({h:y.h,s:y.s,v:y.v,a:v}),S=(0,c.useRef)(b),[C,w]=(0,c.useState)(t);if(t!==C){w(t);let{hex6:e,alpha:n}=ia(Qi(t)??da);if(e!==ca(b.h,b.s,b.v)||n!==b.a){let t=sa(e);x({h:t.h,s:t.s,v:t.v,a:n})}}let{h:T,s:E,v:D,a:k}=b;function A(e,t,r,a){n?.(aa(ca(e,t,r),a,i))}function j(e){S.current.h=e,x(t=>({...t,h:e})),A(e,S.current.s,S.current.v,S.current.a)}function M(e,t){S.current.s=e,S.current.v=t,x(n=>({...n,s:e,v:t})),A(S.current.h,e,t,S.current.a)}function N(e){S.current.a=e,x(t=>({...t,a:e})),A(S.current.h,S.current.s,S.current.v,e)}let P=ca(T,E,D),F=i?oa(P,k):P,I=aa(P,k,i),L={hue:T,sat:E,val:D,alpha:k,onHueChange:j,onSVChange:M,onAlphaChange:N,showAlpha:i,labels:m,classNames:u,styles:d};return a?(0,f.jsx)(`div`,{...p,className:(0,l.default)($i.colorPicker,e,u?.root),style:{...s,...d?.root},children:(0,f.jsx)(ua,{...L,showInput:r})}):(0,f.jsxs)(`div`,{...p,className:(0,l.default)($i.colorPicker,e),children:[(0,f.jsx)(rn,{isOpen:h,onOpenChange:g,placement:wt.Bottom,align:Tt.Start,constrainWidth:!1,content:(0,f.jsx)(ua,{...L}),children:(0,f.jsxs)(oe,{role:`button`,tabIndex:0,"aria-haspopup":`dialog`,"aria-expanded":h,className:(0,l.default)($i.swatch,u?.swatch),style:d?.swatch,children:[(0,f.jsx)(`div`,{className:$i.swatchFill,style:{background:F}}),(0,f.jsx)(`span`,{className:$i.swatchHex,children:I})]})}),r&&(0,f.jsx)(la,{hex:I,onChange:e=>n?.(e),useInputComponent:!0})]})}var ma={modal:`modal_L-Fkd`,slideIn:`slideIn_RVIHR`,fadeIn:`fadeIn_XSuIE`,"modal-sheet":`modal-sheet_WkXR4`,modalSheet:`modal-sheet_WkXR4`,"modal-container":`modal-container_qwKIm`,modalContainer:`modal-container_qwKIm`,"modal-header":`modal-header_DhsRr`,modalHeader:`modal-header_DhsRr`,"modal-body":`modal-body_Mmn0-`,modalBody:`modal-body_Mmn0-`,"modal-footer":`modal-footer_idArP`,modalFooter:`modal-footer_idArP`,"modal-close-button":`modal-close-button_UMZjq`,modalCloseButton:`modal-close-button_UMZjq`,"modal-wrapper":`modal-wrapper_r5wzq`,modalWrapper:`modal-wrapper_r5wzq`,"modal-wrapper-shown":`modal-wrapper-shown_F0BgK`,modalWrapperShown:`modal-wrapper-shown_F0BgK`},ha={hasStart:!1,hasEnd:!1};function ga(e,t={}){let{axis:n=`vertical`,isEnabled:r=!0}=t,[i,a]=(0,c.useState)(ha);return(0,c.useEffect)(()=>{let t=e.current;if(!r||!t){a(e=>e===ha?e:ha);return}let i=n===`vertical`,o=getComputedStyle(t),s=i?o.overflowY:o.overflowX,c=s===`hidden`||s===`clip`,l=()=>{let e=i?t.scrollTop:t.scrollLeft,n=i?t.scrollHeight:t.scrollWidth,r=i?t.clientHeight:t.clientWidth,o=!c&&e>1,s=!c&&n-r-e>1;a(e=>e.hasStart===o&&e.hasEnd===s?e:{hasStart:o,hasEnd:s})},u=new ResizeObserver(l),d=()=>{u.disconnect(),u.observe(t);for(let e of Array.from(t.children))u.observe(e)},f=new MutationObserver(()=>{d(),l()});return l(),d(),f.observe(t,{childList:!0,subtree:!0,characterData:!0}),t.addEventListener(`scroll`,l,{passive:!0}),()=>{t.removeEventListener(`scroll`,l),f.disconnect(),u.disconnect()}},[e,n,r]),i}var _a={close:`Close`};function va(e){let{children:t=null,title:n,isOpen:r=!1,onClose:i=()=>null,footer:a=null,className:o=``,style:s,hideHeader:p=!1,closeOnEscape:m=!0,presentation:h,classNames:g,styles:_,labels:v,...y}=D(`Modal`,e),b=O(`Modal`,v,_a),[x,S]=(0,c.useState)(r),[C,w]=(0,c.useState)(r),T=(0,c.useRef)(null),E=(0,c.useRef)(null),A=(0,c.useId)(),{height:j,offsetTop:M}=Ut(),N=k(),{isSheet:P,sheetStyle:F}=Kt(h??N);(0,c.useEffect)(()=>{if(r){S(!0);let e=setTimeout(()=>w(!0),1);return()=>clearTimeout(e)}w(!1);let e=setTimeout(()=>S(!1),300);return()=>clearTimeout(e)},[r]),qt({isActive:x&&C,containerRef:T,onEscape:m?i:void 0});let{hasStart:I,hasEnd:L}=ga(E,{isEnabled:x&&C});if(!x)return null;let R=!p&&!!n;return(0,f.jsx)(_e,{children:(0,f.jsxs)(`div`,{className:(0,l.default)(ma.modalContainer,g?.container),style:{height:j,top:M,..._?.container},children:[(0,f.jsx)(`div`,{className:(0,l.default)(ma.modalWrapper,C&&ma.modalWrapperShown,g?.backdrop),style:_?.backdrop,onClick:i}),C&&(0,f.jsxs)(`div`,{...y,ref:T,role:`dialog`,"aria-modal":`true`,"aria-labelledby":R&&!y[`aria-label`]?A:void 0,tabIndex:-1,className:(0,l.default)(ma.modal,C&&ma.modalShown,P&&[gt.sheet,gt.sheetSurface,ma.modalSheet],o,g?.modal),style:{...P?F:void 0,...s,..._?.modal},onClick:e=>e.stopPropagation(),children:[!p&&(0,f.jsxs)(`div`,{className:(0,l.default)(ma.modalHeader,g?.header),style:_?.header,children:[(0,f.jsx)(`div`,{id:A,className:g?.title,style:_?.title,children:n}),(0,f.jsx)(`button`,{type:`button`,onClick:i,"aria-label":b.close,className:(0,l.default)(ma.modalCloseButton,g?.closeButton),style:_?.closeButton,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faXmark})})]}),(0,f.jsx)(`div`,{ref:E,className:(0,l.default)(ma.modalBody,_i.scrollFade,_i.scrollFadeY,I&&_i.scrollFadeFadedStart,L&&_i.scrollFadeFadedEnd,g?.body),style:_?.body,children:t}),a&&(0,f.jsx)(`div`,{className:(0,l.default)(ma.modalFooter,g?.footer),style:_?.footer,children:a})]})]})})}var ya=`input, textarea, select, [contenteditable=""], [contenteditable="true"]`,ba={esc:`escape`,space:` `,spacebar:` `,plus:`+`,up:`arrowup`,down:`arrowdown`,left:`arrowleft`,right:`arrowright`};function xa(){return typeof navigator<`u`&&/Mac|iPhone|iPad|iPod/i.test(navigator.userAgent)}function Sa(e){let t=e.split(`+`).map(e=>e.trim().toLowerCase()).filter(Boolean);if(t.length===0)return null;let n={key:``,ctrl:!1,meta:!1,alt:!1,shift:!1,shiftNamed:!1},r=xa();for(let e of t)switch(e){case`mod`:r?n.meta=!0:n.ctrl=!0;break;case`ctrl`:case`control`:n.ctrl=!0;break;case`meta`:case`cmd`:case`command`:n.meta=!0;break;case`alt`:case`option`:n.alt=!0;break;case`shift`:n.shift=!0,n.shiftNamed=!0;break;default:n.key=ba[e]??e}return n.key?n:null}function Ca(e){let t=[e.key.toLowerCase()],n=/^(?:Key|Digit)(.)$/.exec(e.code);return n&&t.push(n[1].toLowerCase()),t}function wa(e,t){return e.ctrl!==t.ctrlKey||e.meta!==t.metaKey||e.alt!==t.altKey||e.shiftNamed&&e.shift!==t.shiftKey?!1:Ca(t).includes(e.key)}function Ta(e){return e instanceof Element&&!!e.closest(ya)}var Ea=new Set([`arrowup`,`arrowdown`,`arrowleft`,`arrowright`,`home`,`end`,`pageup`,`pagedown`,`backspace`,`delete`,`enter`,`tab`]);function Da(e){return e.ctrl||e.meta||e.alt?!1:e.key.length===1||Ea.has(e.key)}var Oa={" ":`Space`,arrowup:`↑`,arrowdown:`↓`,arrowleft:`←`,arrowright:`→`,escape:`Esc`,enter:`↵`,backspace:`⌫`,delete:`Del`,pageup:`PgUp`,pagedown:`PgDn`};function ka(e){let t=Sa(e);if(!t)return e;let n=Oa[t.key]??(t.key.length===1?t.key.toUpperCase():Aa(t.key));return xa()?[t.ctrl&&`⌃`,t.alt&&`⌥`,t.shift&&`⇧`,t.meta&&`⌘`].filter(Boolean).join(``)+n:[...[t.ctrl&&`Ctrl`,t.meta&&`Win`,t.alt&&`Alt`,t.shift&&`Shift`].filter(Boolean),n].join(`+`)}function Aa(e){return e[0].toUpperCase()+e.slice(1)}function ja(e,t={}){let{enabled:n=!0,target:r,enableInFields:i=!1,preventDefault:a=!0}=t,o=(0,c.useRef)(e);(0,c.useEffect)(()=>{o.current=e}),(0,c.useEffect)(()=>{if(!n)return;let e=r?r.current:window;if(!e)return;function t(e){let t=e;if(!t.isComposing)for(let[e,n]of Object.entries(o.current)){let r=Sa(e);if(r&&wa(r,t)&&!(Da(r)&&!i&&Ta(t.target))){a&&t.preventDefault(),n(t);return}}}return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)},[n,r,i,a])}function Ma(e,t,n,{isDisabled:r,wrap:i=!0}={}){if(n===0)return null;let a=e=>!r?.(e),o=e??(t===1?-1:n);for(let e=1;e<=n;e++){let r=o+t*e;if(!i&&(r<0||r>=n))break;let s=(r%n+n)%n;if(a(s))return s}return e!==null&&a(e)?e:null}function Na(e,t,n={}){return e===`first`?Ma(null,1,t,{...n,wrap:!1}):Ma(null,-1,t,{...n,wrap:!1})}function Pa(e,t){if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height>0?e.offsetHeight/n.height:1,a=r.top-n.top,o=r.bottom-n.bottom;a<0?e.scrollTop+=a*i:o>0&&(e.scrollTop+=o*i)}function Fa(e){return`separator`in e}function Ia(e){return`heading`in e}function La(e){return!Fa(e)&&!Ia(e)}function Ra(e){return e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase()}function za(e){let t=[],n={separated:!1,actions:[]},r=()=>{(n.heading!==void 0||n.actions.length>0)&&t.push(n)};for(let t of e){if(La(t)){n.actions.push(t);continue}r(),n=Ia(t)?{heading:t.heading,separated:n.separated&&n.actions.length===0,actions:[]}:{separated:!0,actions:[]}}return r(),t.filter(e=>e.actions.length>0)}function Ba(e,t,n){let r=typeof e.label==`string`?Ra(e.label):``,i=(e.keywords??[]).map(Ra),a=[r,...i].join(` `);if(!t.every(e=>a.includes(e)))return null;if(r.startsWith(n))return 0;let o=e=>e.split(/\s+/).some(e=>e.startsWith(t[0]));return o(r)||i.some(o)?1:2}function Va(e,t){let n=Ra(t.trim());if(!n)return e;let r=n.split(/\s+/);return e.map(e=>{let t=e.actions.map(e=>({action:e,rank:Ba(e,r,n)})).filter(e=>e.rank!==null).sort((e,t)=>e.rank-t.rank);return t.length===0?null:{group:{...e,separated:!1,actions:t.map(e=>e.action)},best:t[0].rank}}).filter(e=>e!==null).sort((e,t)=>e.best-t.best).map(e=>e.group)}var Ha={commandPalette:`commandPalette_YtQdV`,"commandPalette-search":`commandPalette-search_FII6k`,commandPaletteSearch:`commandPalette-search_FII6k`,"commandPalette-search-icon":`commandPalette-search-icon_acfcm`,commandPaletteSearchIcon:`commandPalette-search-icon_acfcm`,"commandPalette-input":`commandPalette-input_Vb3da`,commandPaletteInput:`commandPalette-input_Vb3da`,"commandPalette-list":`commandPalette-list_93yGm`,commandPaletteList:`commandPalette-list_93yGm`,"commandPalette-item":`commandPalette-item_oa2PX`,commandPaletteItem:`commandPalette-item_oa2PX`,"commandPalette-item-active":`commandPalette-item-active_9KaV-`,commandPaletteItemActive:`commandPalette-item-active_9KaV-`,"commandPalette-item-danger":`commandPalette-item-danger_VP4If`,commandPaletteItemDanger:`commandPalette-item-danger_VP4If`,"commandPalette-item-disabled":`commandPalette-item-disabled_hiHzA`,commandPaletteItemDisabled:`commandPalette-item-disabled_hiHzA`,"commandPalette-item-icon":`commandPalette-item-icon_N4L26`,commandPaletteItemIcon:`commandPalette-item-icon_N4L26`,"commandPalette-item-label":`commandPalette-item-label_cy-ke`,commandPaletteItemLabel:`commandPalette-item-label_cy-ke`,"commandPalette-item-shortcut":`commandPalette-item-shortcut_G2KPh`,commandPaletteItemShortcut:`commandPalette-item-shortcut_G2KPh`,"commandPalette-heading":`commandPalette-heading_ONebI`,commandPaletteHeading:`commandPalette-heading_ONebI`,"commandPalette-separator":`commandPalette-separator_Yu8TJ`,commandPaletteSeparator:`commandPalette-separator_Yu8TJ`,"commandPalette-empty":`commandPalette-empty_LqVAt`,commandPaletteEmpty:`commandPalette-empty_LqVAt`,"commandPalette-status":`commandPalette-status_rft-N`,commandPaletteStatus:`commandPalette-status_rft-N`},Ua={label:`Search commands`,placeholder:`Type a command or search…`,empty:`No results`,loading:`Searching…`,results:e=>e===1?`1 result`:`${e} results`};function Wa(e){let{items:t,isOpen:n,onClose:r,onAction:i,onQueryChange:a,filter:o=!0,isLoading:s=!1,presentation:u,labels:p,className:m,style:h,classNames:g,styles:_,...v}=D(`CommandPalette`,e),y=O(`CommandPalette`,p,Ua),b=(0,c.useId)(),x=(0,c.useRef)(null),[S,C]=(0,c.useState)(``),[w,T]=(0,c.useState)(null),[E,k]=(0,c.useState)(n);n!==E&&(k(n),n&&(C(``),T(null)));let A=(0,c.useRef)(a);(0,c.useEffect)(()=>{A.current=a}),(0,c.useEffect)(()=>{n&&A.current?.(``)},[n]);let j=o?Va(za(t),S):za(t),M=j.flatMap(e=>e.actions),N=e=>!!M[e]?.disabled,P=M.findIndex(e=>e.id===w&&!e.disabled),F=P>=0?P:Na(`first`,M.length,{isDisabled:N}),I=e=>`${b}-${encodeURIComponent(e.id)}`,L=F===null?void 0:I(M[F]);(0,c.useEffect)(()=>{L&&Pa(x.current,document.getElementById(L))},[L]);function R(e){e&&!e.disabled&&(e.onClick?.(),i?.(e.id),r())}function z(e){if(!e.nativeEvent.isComposing){if(e.key===`ArrowDown`||e.key===`ArrowUp`){let t=Ma(F,e.key===`ArrowDown`?1:-1,M.length,{isDisabled:N});T(t===null?null:M[t].id)}else if(e.key===`Enter`)R(F===null?void 0:M[F]);else return;e.preventDefault()}}let B=S.trim()!==``,V=s?y.loading:y.empty,H=-1;return(0,f.jsxs)(va,{...v,"aria-label":y.label,isOpen:n,onClose:r,hideHeader:!0,presentation:u,className:(0,l.default)(Ha.commandPalette,m,g?.root),style:{...h,..._?.root},children:[(0,f.jsxs)(`div`,{className:(0,l.default)(Ha.commandPaletteSearch,g?.search),style:_?.search,children:[K(d.faMagnifyingGlass,{className:Ha.commandPaletteSearchIcon}),(0,f.jsx)(`input`,{type:`text`,role:`combobox`,"aria-label":y.label,"aria-expanded":`true`,"aria-controls":b,"aria-autocomplete":`list`,"aria-activedescendant":L,autoComplete:`off`,spellCheck:!1,placeholder:y.placeholder,value:S,onChange:e=>{C(e.target.value),T(null),a?.(e.target.value)},onKeyDown:z,className:(0,l.default)(Ha.commandPaletteInput,g?.input),style:_?.input})]}),(0,f.jsx)(`div`,{ref:x,id:b,role:`listbox`,"aria-label":y.label,className:(0,l.default)(Ha.commandPaletteList,g?.list),style:_?.list,children:j.map((e,t)=>{let n=`${b}-heading-${t}`;return(0,f.jsxs)(`div`,{role:e.heading===void 0?`presentation`:`group`,"aria-labelledby":e.heading===void 0?void 0:n,children:[e.separated&&t>0&&(0,f.jsx)(`div`,{"aria-hidden":!0,className:(0,l.default)(Ha.commandPaletteSeparator,g?.separator),style:_?.separator}),e.heading!==void 0&&(0,f.jsx)(`div`,{id:n,role:`presentation`,className:(0,l.default)(Ha.commandPaletteHeading,g?.heading),style:_?.heading,children:e.heading}),e.actions.map(e=>{H+=1;let t=H;return(0,f.jsxs)(`div`,{id:I(e),role:`option`,"aria-selected":t===F,"aria-disabled":e.disabled||void 0,className:(0,l.default)(Ha.commandPaletteItem,t===F&&Ha.commandPaletteItemActive,e.danger&&Ha.commandPaletteItemDanger,e.disabled&&Ha.commandPaletteItemDisabled,g?.item),style:_?.item,onMouseDown:e=>e.preventDefault(),onMouseMove:()=>!e.disabled&&T(e.id),onClick:()=>R(e),children:[e.icon!=null&&K(e.icon,{className:(0,l.default)(Ha.commandPaletteItemIcon,g?.itemIcon),style:_?.itemIcon}),(0,f.jsx)(`span`,{className:(0,l.default)(Ha.commandPaletteItemLabel,g?.itemLabel),style:_?.itemLabel,children:e.label}),e.shortcut!=null&&(0,f.jsx)(`span`,{className:(0,l.default)(Ha.commandPaletteItemShortcut,g?.itemShortcut),style:_?.itemShortcut,children:ka(e.shortcut)})]},e.id)})]},t)})}),B&&M.length===0&&(0,f.jsx)(`div`,{className:(0,l.default)(Ha.commandPaletteEmpty,g?.empty),style:_?.empty,children:V}),(0,f.jsx)(`span`,{className:Ha.commandPaletteStatus,role:`status`,"aria-live":`polite`,children:B?M.length>0?y.results(M.length):V:``})]})}var Ga={submit:`Confirm`,cancel:`Cancel`};function Ka(e){let{children:t=null,className:n=``,onClose:r=()=>{},onConfirm:i=()=>{},title:a,content:o=null,isOpen:s=void 0,labels:l,isDelete:u=!1,actionButtonsProps:d={},style:p,...m}=D(`ConfirmModal`,e),h=O(`ConfirmModal`,l,Ga),[g,_]=(0,c.useState)(!1),[v,y]=(0,c.useState)(!1);function b(e=!1){_(!1),r(e)}async function x(){y(!0);try{await i(),b(!0)}catch{}finally{y(!1)}}let S=(0,f.jsx)(va,{title:a,isOpen:s===void 0?g:s,onClose:()=>b(),className:t?void 0:n,footer:(0,f.jsx)(re,{onClose:()=>b(),onSubmit:x,labels:{submit:h.submit,cancel:h.cancel},submitButtonStyle:u?z.Delete:void 0,isSubmitButtonLoading:v,noMargin:!0,...d}),children:o});return t?(0,f.jsxs)(`div`,{...m,className:n,style:p,children:[(0,f.jsx)(`span`,{onClick:()=>_(!0),children:t}),S]}):S}function qa({timeout:e=2e3}={}){let[t,n]=(0,c.useState)(!1),[r,i]=(0,c.useState)(null),a=(0,c.useRef)(null),o=(0,c.useCallback)(()=>{a.current&&clearTimeout(a.current),a.current=null},[]);(0,c.useEffect)(()=>o,[o]);let s=(0,c.useCallback)(()=>{o(),n(!1),i(null)},[o]);return{copy:(0,c.useCallback)(async t=>{o();try{if(!navigator.clipboard?.writeText)throw Error(`Clipboard API unavailable`);return await navigator.clipboard.writeText(t),i(null),n(!0),a.current=setTimeout(()=>n(!1),e),!0}catch(e){return n(!1),i(e instanceof Error?e:Error(String(e))),!1}},[o,e]),copied:t,error:r,reset:s}}var Ja={copyButton:`copyButton_HEd1K`,"copyButton-copied":`copyButton-copied_HL1zN`,copyButtonCopied:`copyButton-copied_HL1zN`,"copyButton-status":`copyButton-status_QdwYf`,copyButtonStatus:`copyButton-status_QdwYf`},Ya={copy:`Copy`,copied:`Copied`,failed:`Could not copy`};function Xa(e){let{value:t,timeout:n=2e3,icon:r=d.faCopy,copiedIcon:i=d.faCheck,onCopy:a,onError:o,onClick:s,labels:c,className:u,style:p,classNames:m,styles:h,...g}=D(`CopyButton`,e),_=O(`CopyButton`,c,Ya),{copy:v,copied:y,error:b}=qa({timeout:n}),x=y?_.copied:_.copy,S=y?i:r,C=ee(r)&&ee(i)?(0,f.jsx)(zi,{icon:y?i:r,classNames:{icon:m?.icon},styles:{icon:h?.icon}}):K(S,{className:m?.icon,style:h?.icon});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(ce,{...g,icon:(0,f.jsx)(f.Fragment,{children:C}),title:x,"aria-label":x,className:(0,l.default)(Ja.copyButton,y&&Ja.copyButtonCopied,u),style:p,classNames:{root:m?.root},styles:{root:h?.root},onClick:async e=>{s?.(e),await v(t)?a?.(t):o?.()}}),(0,f.jsx)(`span`,{className:Ja.copyButtonStatus,role:`status`,"aria-live":`polite`,children:y?_.copied:b?_.failed:``})]})}var Za={"datePickerMonth-item":`datePickerMonth-item_30WWy`,datePickerMonthItem:`datePickerMonth-item_30WWy`,"datePickerMonth-content":`datePickerMonth-content_9bbSs`,datePickerMonthContent:`datePickerMonth-content_9bbSs`,"datePickerMonth-day":`datePickerMonth-day_SaASA`,datePickerMonthDay:`datePickerMonth-day_SaASA`,"datePickerMonth-day-today":`datePickerMonth-day-today_RXOIr`,datePickerMonthDayToday:`datePickerMonth-day-today_RXOIr`,"datePickerMonth-day-selected":`datePickerMonth-day-selected_yMF-v`,datePickerMonthDaySelected:`datePickerMonth-day-selected_yMF-v`,"datePickerMonth-day-selected-start":`datePickerMonth-day-selected-start_ftVeI`,datePickerMonthDaySelectedStart:`datePickerMonth-day-selected-start_ftVeI`,"datePickerMonth-day-selected-end":`datePickerMonth-day-selected-end_MZ2qy`,datePickerMonthDaySelectedEnd:`datePickerMonth-day-selected-end_MZ2qy`,"datePickerMonth-day-disabled":`datePickerMonth-day-disabled_4t0Ci`,datePickerMonthDayDisabled:`datePickerMonth-day-disabled_4t0Ci`,"datePickerMonth-placeholder":`datePickerMonth-placeholder_gy1Yx`,datePickerMonthPlaceholder:`datePickerMonth-placeholder_gy1Yx`},Qa=[`de_AT`,`de_CH`,`de_DE`,`en_US`,`en_GB`,`de`,`en`],$a=`en_US`,eo=()=>{let e=navigator.languages[0]?.replace(`-`,`_`)||$a;return Qa.includes(e)?e===`en_GB`||e===`en`?`en_US`:e===`de`?`de_DE`:e:$a},to=e=>{switch(e){case`en_US`:case`en_GB`:return`en`;case`de_DE`:case`de_CH`:case`de_AT`:return`de`;default:return`de`}},no=eo();async function ro(e){no=e}function io(e=`_`){return no.replace(`_`,e)}function ao(e,t,n){let r=new Date(0);return r.setUTCFullYear(e,t-1,n),r}function oo(e,t,n,r,i=!1){return ao(t,n,r).toLocaleDateString(e,{month:i?`short`:`long`,timeZone:`UTC`})}function so(e=io(`-`)){return Array.from(Array(12).keys()).map(t=>oo(e,2023,t+1,1))}function co(e,t=!0){return Array.from(Array(7).keys()).map(n=>ao(2023,4,10+n).toLocaleDateString(e,{weekday:t?`short`:`long`,timeZone:`UTC`}))}function lo(e,t){return ao(t,e,1).getUTCDay()||7}function uo(e,t,n,r){let i=e+r,a=t,o=n;for(;i<1;)--a,a<1&&(a=12,--o),i+=hn({year:o,month:a});for(;i>hn({year:o,month:a});)i-=hn({year:o,month:a}),a+=1,a>12&&(a=1,o+=1);return{day:i,month:a,year:o}}function fo(){return gn(yn(new Date))}function po(e){let t=gn(e);return t?`${String(t.day).padStart(2,`0`)}.${String(t.month).padStart(2,`0`)}.${String(t.year).padStart(4,`0`)}`:``}function mo(e){let t=/^(\d{2})\.(\d{2})\.(\d{4})$/.exec(e);if(!t)return null;let n=vn({day:Number(t[1]),month:Number(t[2]),year:Number(t[3])});return gn(n)?n:null}function ho(e,t,n){let r=e,i=n;return r[0]!==`_`&&(r[0]>`3`?(r=`0${r[0]}${t.substring(2)}`,i={start:3,end:3}):r[0]===`3`&&r[1]!==`_`&&r[1]>`1`&&(r=`0${r[1]}${t.substring(2)}`,i={start:3,end:3})),r[3]!==`_`&&r[3]>`1`&&(r=`${r.substring(0,3)}0${r[3]}${t.substring(5)}`,i={start:6,end:6}),r[3]===`1`&&r[4]!==`_`&&r[4]>`2`&&(r=`${r.substring(0,3)}${r[3]}2${t.substring(5)}`),{value:r,selection:i}}function go(e,t,n){let r=gn(n);if(r&&r.month===e&&r.year===t)return r.day;let i=fo();return i.month===e&&i.year===t?i.day:1}function _o(e,t,n){return{isStartDate:e===t,isEndDate:e===n,isInRange:!!t&&!!n&&e>=t&&e<=n}}function vo(e,t,n){return!!t&&e<t||!!n&&e>n}function yo({style:e,className:t=``,month:n=fo().month,year:r=fo().year,onSelect:i=()=>null,selectionStart:a,selectionEnd:o,minDate:s=null,maxDate:u=null,onNavigateMonth:d}){let p=io(`-`),m=hn({year:r,month:n}),h=lo(n,r),g=yn(new Date),_=(0,c.useRef)({}),[v,y]=(0,c.useState)(()=>go(n,r,a)),b=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(b.current!=null){let e=b.current;b.current=null,y(e),_.current[e]?.focus()}else y(go(n,r,a))},[n,r]);function x(e,t){let i=0;if(e.key===`ArrowRight`)i=1;else if(e.key===`ArrowLeft`)i=-1;else if(e.key===`ArrowDown`)i=7;else if(e.key===`ArrowUp`)i=-7;else return;e.preventDefault();let a=uo(t,n,r,i);a.month!==n||a.year!==r?(b.current=a.day,d?.(a.month>n||a.year>r?1:-1)):(y(a.day),_.current[a.day]?.focus())}return(0,f.jsx)(`div`,{className:(0,l.default)(Za.datePickerMonth,t),style:e,children:(0,f.jsxs)(`div`,{className:(0,l.default)(Za.datePickerMonthContent),children:[co(p).map((e,t)=>(0,f.jsx)(`div`,{children:e},t)),Array.from(Array(h-1).keys()).map(e=>(0,f.jsx)(`div`,{className:(0,l.default)(Za.datePickerMonthItem,Za.datePickerMonthPlaceholder)},e)),Array.from(Array(m).keys()).map(e=>{let t=e+1,c=vn({day:t,month:n,year:r}),d=_o(c,a,o),p=vo(c,s,u),m=c===g;return(0,f.jsx)(oe,{ref:e=>{_.current[t]=e},tabIndex:t===v?0:-1,onKeyDown:e=>x(e,t),onClick:()=>p?null:i(c),className:(0,l.default)(Za.datePickerMonthDay,Za.datePickerMonthItem,{[Za.datePickerMonthDaySelected]:d.isInRange,[Za.datePickerMonthDaySelectedStart]:d.isStartDate,[Za.datePickerMonthDaySelectedEnd]:d.isEndDate,[Za.datePickerMonthDayDisabled]:p,[Za.datePickerMonthDayToday]:m}),children:t},t)}),Array.from(Array(42-(h+m-1)).keys()).map(e=>(0,f.jsx)(`div`,{className:(0,l.default)(Za.datePickerMonthItem,Za.datePickerMonthPlaceholder),children:`\xA0`},e))]})})}function bo(e,t,n){let[r,i]=(0,c.useState)(!1),a=(0,c.useRef)(!1),o=(0,c.useRef)(null),s=(0,c.useRef)(t);return(0,c.useEffect)(()=>{s.current=t}),(0,c.useEffect)(()=>{let t=e.current,r=o.current;if(n||!t||!r)return;let c=!1,l=()=>{a.current||(a.current=!0,i(!0),s.current().catch(()=>null).finally(()=>{c||(a.current=!1,i(!1),u.unobserve(r),u.observe(r))}))},u=new IntersectionObserver(([e])=>{e.isIntersecting&&l()},{root:t});return u.observe(r),()=>{c=!0,u.disconnect()}},[e,n]),{isLoading:r,sentinelRef:o}}var xo={"required-mark":`required-mark_fy7Fm`,requiredMark:`required-mark_fy7Fm`,dropdown:`dropdown_XTshY`,"dropdown-label":`dropdown-label_TIpeK`,dropdownLabel:`dropdown-label_TIpeK`,"dropdown-label-column":`dropdown-label-column_cMCBc`,dropdownLabelColumn:`dropdown-label-column_cMCBc`,"dropdown-label-text":`dropdown-label-text_u-UKq`,dropdownLabelText:`dropdown-label-text_u-UKq`,"dropdown-input":`dropdown-input_WiPcb`,dropdownInput:`dropdown-input_WiPcb`,"dropdown-input-plain":`dropdown-input-plain_Ap12N`,dropdownInputPlain:`dropdown-input-plain_Ap12N`,"dropdown-input-readOnly":`dropdown-input-readOnly_3GWSO`,dropdownInputReadOnly:`dropdown-input-readOnly_3GWSO`,"dropdown-input-button":`dropdown-input-button_ziKKi`,dropdownInputButton:`dropdown-input-button_ziKKi`,"dropdown-input-button-disabled":`dropdown-input-button-disabled_JEaO-`,dropdownInputButtonDisabled:`dropdown-input-button-disabled_JEaO-`,"dropdown-input-button-readOnly":`dropdown-input-button-readOnly_QhBYY`,dropdownInputButtonReadOnly:`dropdown-input-button-readOnly_QhBYY`,"dropdown-input-button-icon":`dropdown-input-button-icon_jl7EY`,dropdownInputButtonIcon:`dropdown-input-button-icon_jl7EY`,"dropdown-input-button-icon-arrow":`dropdown-input-button-icon-arrow_SFJbx`,dropdownInputButtonIconArrow:`dropdown-input-button-icon-arrow_SFJbx`,"dropdown-input-button-icon-arrow-open":`dropdown-input-button-icon-arrow-open_8yQbZ`,dropdownInputButtonIconArrowOpen:`dropdown-input-button-icon-arrow-open_8yQbZ`,"dropdown-input-list-anim":`dropdown-input-list-anim_knSMT`,dropdownInputListAnim:`dropdown-input-list-anim_knSMT`,"dropdown-input-list-anim-wider":`dropdown-input-list-anim-wider_-YyLJ`,dropdownInputListAnimWider:`dropdown-input-list-anim-wider_-YyLJ`,"dropdown-input-list":`dropdown-input-list_JnMbA`,dropdownInputList:`dropdown-input-list_JnMbA`,"dropdown-input-list-item":`dropdown-input-list-item_EAy5L`,dropdownInputListItem:`dropdown-input-list-item_EAy5L`,"dropdown-input-list-item-active":`dropdown-input-list-item-active_0dhia`,dropdownInputListItemActive:`dropdown-input-list-item-active_0dhia`,"dropdown-input-list-item-selected":`dropdown-input-list-item-selected_hShJf`,dropdownInputListItemSelected:`dropdown-input-list-item-selected_hShJf`,"dropdown-input-list-item-disabled":`dropdown-input-list-item-disabled_3r-Yn`,dropdownInputListItemDisabled:`dropdown-input-list-item-disabled_3r-Yn`,"dropdown-fieldset":`dropdown-fieldset_wQwTf`,dropdownFieldset:`dropdown-fieldset_wQwTf`,"dropdown-fieldset-legend":`dropdown-fieldset-legend_a1M4L`,dropdownFieldsetLegend:`dropdown-fieldset-legend_a1M4L`,"dropdown-fieldset-legend-active":`dropdown-fieldset-legend-active_bnR5F`,dropdownFieldsetLegendActive:`dropdown-fieldset-legend-active_bnR5F`,"dropdown-placeholder":`dropdown-placeholder_QYMPZ`,dropdownPlaceholder:`dropdown-placeholder_QYMPZ`,"dropdown-placeholder-shown":`dropdown-placeholder-shown_-IkNH`,dropdownPlaceholderShown:`dropdown-placeholder-shown_-IkNH`,fadeIn:`fadeIn_oMJZj`,"dropdown-matLabel":`dropdown-matLabel_iHQnt`,dropdownMatLabel:`dropdown-matLabel_iHQnt`,"dropdown-matLabel-floating":`dropdown-matLabel-floating_zY51S`,dropdownMatLabelFloating:`dropdown-matLabel-floating_zY51S`,"dropdown-border-focused":`dropdown-border-focused_Te-ER`,dropdownBorderFocused:`dropdown-border-focused_Te-ER`,"dropdown-border-plain":`dropdown-border-plain_Bbh-3`,dropdownBorderPlain:`dropdown-border-plain_Bbh-3`,"dropdown-border-invalid":`dropdown-border-invalid_ySVaS`,dropdownBorderInvalid:`dropdown-border-invalid_ySVaS`,"dropdown-border-error":`dropdown-border-error_-JB33`,dropdownBorderError:`dropdown-border-error_-JB33`,dropdownPanel:`dropdownPanel_RYxpN`,"dropdown-sentinel":`dropdown-sentinel_TVDF9`,dropdownSentinel:`dropdown-sentinel_TVDF9`,"dropdown-load-more":`dropdown-load-more_UQvzV`,dropdownLoadMore:`dropdown-load-more_UQvzV`,"dropdown-load-more-spinner":`dropdown-load-more-spinner_SOMz7`,dropdownLoadMoreSpinner:`dropdown-load-more-spinner_SOMz7`},So=500;function Co(e){let{errorMessage:t=``,className:n=``,style:r,label:i=``,value:a=``,isValid:o=!0,tabIndex:s=0,isRequired:p=!1,customProps:m={},isRow:h=!1,disabled:g=!1,readOnly:_=!1,onScroll:v=()=>Promise.resolve(),onClick:y,onChange:b,onFocus:x=null,onBlur:S=null,onMouseEnter:C=null,onMouseLeave:w=null,dropdownLabel:T,isDropdownListWider:E=!1,formValidator:O=null,classNames:j,styles:M,items:N=[],useMatLabelStyle:P=!0,alwaysFloatLabel:F=!1,placeholder:I=``,plainStyle:L=!1,scrollToSelected:z=!1,presentation:B,reactRef:V,...H}=D(`Dropdown`,e),[U,W]=(0,c.useState)(!1),[G,ee]=(0,c.useState)(!1),[,K]=(0,c.useState)(0),te=(0,c.useRef)(O),q=(0,c.useRef)(null),ne=(0,c.useRef)(null),J=(0,c.useRef)(null),[re,ie]=(0,c.useState)(!1),[ae,oe]=(0,c.useState)(null),se=(0,c.useRef)({buffer:``,at:0}),ce=(0,c.useId)(),le=`${ce}-listbox`,ue=`${ce}-label`,Y=e=>`${ce}-option-${e}`,de=!g&&!_,fe=re&&de,{isLoading:pe,sentinelRef:me}=bo(J,v,!1),X=k(),Z=B??X??A.Default,{isSheet:he}=Kt(Z);(0,c.useLayoutEffect)(()=>{let e=q.current,t=ne.current;fe&&!he&&e&&t&&(t.style.fontSize=window.getComputedStyle(e).fontSize)},[fe,he]),(0,c.useEffect)(()=>{if(te.current=O,!te.current)return;te.current.label=i??``,te.current.validate();let e=()=>K(e=>e+1);return te.current.registerOnUpdateListener(e),()=>te.current?.removeOnUpdateListener(e)},[O,i]);let ge=O?O.value:a,_e=N.findIndex(e=>e.key===ge);(0,c.useEffect)(()=>{fe&&ae!==null&&Pa(J.current,document.getElementById(Y(ae)))},[fe,ae]);let ve=e=>{ee(!0),C?.(e)},ye=e=>{ee(!1),w?.(e)},be=e=>{W(!0),x?.(e)},xe=e=>{te.current&&(te.current.touched=!0),W(!1),S?.(e)},Se=()=>O?O.touched&&O.hasError():!o||!!t,Ce=()=>!!(p||O?.validators.find(e=>e.validatorId===`required`)),we=e=>{O?(O.set(e),b?.(O.value,m)):b?.(e,m)};function Te(e){(!e||de)&&(ie(e),e?oe(z&&_e>=0?_e:null):se.current={buffer:``,at:0})}function Ee(e){e.disabled||(we(e.key),Te(!1))}let De={isDisabled:e=>!!N[e].disabled};function Oe(e){let t=Date.now(),n=t-se.current.at>So?e:se.current.buffer+e;se.current={buffer:n,at:t};let r=n.toLowerCase(),i=N.findIndex(e=>!e.disabled&&typeof e.label==`string`&&e.label.toLowerCase().startsWith(r));i!==-1&&(fe?oe(i):Ee(N[i]))}function ke(e){if(de){if(!fe){e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`Enter`||e.key===` `?(e.preventDefault(),Te(!0)):e.key.length===1&&Oe(e.key);return}if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),oe(Ma(ae,e.key===`ArrowDown`?1:-1,N.length,De));else if(e.key===`Home`||e.key===`End`)e.preventDefault(),oe(Na(e.key===`Home`?`first`:`last`,N.length,De));else if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=ae===null?void 0:N[ae];t?Ee(t):Te(!1)}else e.key===`Escape`||e.key===`Tab`?Te(!1):e.key.length===1&&Oe(e.key)}}let Ae=T,je=Se();N.forEach(e=>{e.key===ge&&(Ae=e.label)});let Me=Ae||ge,Ne=Me==null||typeof Me==`string`&&Me.trim()===``,Pe=Ce()?(0,f.jsx)(`span`,{className:xo.requiredMark,children:`*`}):null,Q=i&&Ce()?`${i} *`:i,Fe=U&&!_;return(0,f.jsxs)(`div`,{...H,className:(0,l.default)(n,j?.root,xo.dropdownLabel,xo.dropdown,{[xo.dropdownLabelColumn]:!h}),style:{...r,...M?.root},onMouseEnter:ve,onMouseLeave:ye,children:[(0,f.jsx)(`div`,{children:(0,f.jsx)(rn,{isOpen:fe,onOpenChange:Te,disabled:!de,placement:wt.Bottom,align:Tt.Start,offset:0,withArrow:!1,constrainWidth:!1,width:`trigger`,focusOnOpen:!1,presentation:Z,classNames:{panel:xo.dropdownPanel},content:(0,f.jsx)(`div`,{ref:ne,className:(0,l.default)(!he&&xo.dropdownInputListAnim,{[xo.dropdownInputListAnimWider]:E&&!he}),children:(0,f.jsxs)(`div`,{ref:J,id:le,role:`listbox`,"aria-label":i||I||void 0,className:(0,l.default)(xo.dropdownInputList,he&&gt.sheetScroll,j?.list),style:M?.list,children:[N.map((e,t)=>(0,f.jsx)(`div`,{id:Y(t),role:`option`,"aria-selected":e.key===ge,"aria-disabled":e.disabled||void 0,style:M?.option,className:(0,l.default)(xo.dropdownInputListItem,j?.option,{[xo.dropdownInputListItemActive]:ae===t,[xo.dropdownInputListItemSelected]:e.key===ge,[xo.dropdownInputListItemDisabled]:!!e.disabled}),onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>oe(t),onClick:()=>Ee(e),children:e.label},e.key)),(0,f.jsx)(`div`,{ref:me,className:xo.dropdownSentinel,"aria-hidden":`true`}),pe&&(0,f.jsx)(`div`,{className:xo.dropdownLoadMore,"aria-hidden":`true`,children:(0,f.jsx)(R,{className:xo.dropdownLoadMoreSpinner})})]})}),children:(0,f.jsxs)(`div`,{ref:q,onFocus:be,onBlur:xe,className:(0,l.default)(xo.dropdownInput,{[xo.dropdownInputPlain]:L,[xo.dropdownInputReadOnly]:_&&!g},j?.field),style:M?.field,children:[(0,f.jsx)(`button`,{tabIndex:s,type:`button`,disabled:g,role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":fe,"aria-controls":le,"aria-activedescendant":fe&&ae!==null?Y(ae):void 0,"aria-labelledby":i?ue:void 0,"aria-label":i?void 0:I||void 0,"aria-readonly":_||void 0,className:(0,l.default)(xo.dropdownInputButton,{[xo.dropdownInputButtonDisabled]:g,[xo.dropdownInputButtonReadOnly]:_&&!g},j?.control),style:{...E?{padding:`6px`,border:`none`}:{},...M?.control},onKeyDown:ke,onClick:y,ref:V,children:Ne?`\xA0`:Me}),(0,f.jsx)(`button`,{type:`button`,tabIndex:-1,disabled:g,"aria-hidden":`true`,className:(0,l.default)(xo.dropdownInputButtonIcon,j?.icon),style:M?.icon,onMouseDown:e=>e.preventDefault(),onClick:y,children:!g&&!_&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronDown,className:(0,l.default)(xo.dropdownInputButtonIconArrow,{[xo.dropdownInputButtonIconArrowOpen]:fe})})}),(0,f.jsx)(`fieldset`,{className:(0,l.default)(xo.dropdownFieldset,{[xo.dropdownBorderPlain]:L,[xo.dropdownBorderFocused]:Fe,[xo.dropdownBorderInvalid]:je,[xo.dropdownBorderError]:je}),children:(0,f.jsx)(`legend`,{className:(0,l.default)(xo.dropdownFieldsetLegend,{[xo.dropdownFieldsetLegendActive]:P&&(F||Fe||!Ne)}),children:(0,f.jsx)(`span`,{children:Q})})}),P&&i&&(0,f.jsxs)(`div`,{id:ue,className:(0,l.default)(xo.dropdownMatLabel,{[xo.dropdownMatLabelFloating]:F||Fe||!Ne},j?.label),style:M?.label,children:[i,Pe]}),P&&I&&(0,f.jsx)(`div`,{className:(0,l.default)(xo.dropdownPlaceholder,Fe&&!Ae&&xo.dropdownPlaceholderShown),children:I})]})})}),i&&!P&&(0,f.jsxs)(`div`,{id:ue,className:(0,l.default)(xo.dropdownLabelText,j?.label),style:M?.label,children:[i,Pe]}),(0,f.jsx)(Fi,{variant:`error`,message:O?O.getCurrentErrorMessage():t||``,isVisible:je&&(U||G)})]})}var wo=`9`,To=e=>e!==void 0&&e>=`0`&&e<=`9`;function Eo(e){let t=[];for(let n=0;n<e.length;n++)e[n]===wo&&t.push(n);return t}function Do(e,t,n){return[...t].map((t,r)=>t===wo?To(e[r])?e[r]:n:t).join(``)}function Oo(e,t,n){return e>=t.length?n.length:t[e]}function ko(e,t){let n=t.findIndex(t=>t>=e);return n===-1?t.length:n}function Ao(e,t){for(let n=t.length-1;n>=0;n--)if(t[n]<e)return n;return-1}function jo(e,t,n){let r=Eo(t),i=Do(e,t,n),a=r.findIndex(e=>!To(i[e]));return a===-1?t.length:r[a]}function Mo(e,t,n){let r=Math.max(0,Math.min(e.length,e.length-(t.length-n))),i=0;for(;i<r&&i<n&&e[i]===t[i];)i++;return{from:i,to:r,inserted:t.slice(i,n)}}function No(e,t,n,r,i){let a=Eo(r),o=[...Do(e,r,i)],s=e=>Oo(e,a,r),c=(e,t)=>a.filter(n=>n>=e&&n<t),{from:l,to:u,inserted:d}=Mo(e,t,n),f=[...d].filter(To);if(d.length>0&&f.length===0){let e=ko(l,a);return{value:o.join(``),selection:{start:s(e),end:s(e)}}}if(d.length===0){let e=c(l,u),t=Ao(l,a),n=e.length>0?e:t===-1?[]:[a[t]];for(let e of n)o[e]=i;let r=e.length>0?ko(l,a):Math.max(t,0);return{value:o.join(``),selection:{start:s(r),end:s(r)}}}for(let e of c(l,u))o[e]=i;let p=ko(l,a);if(p>=a.length){let e=a.findIndex(e=>!To(o[e]));e!==-1&&(p=e)}for(let e of f){if(p>=a.length)break;o[a[p]]=e,p++}return{value:o.join(``),selection:{start:s(p),end:s(p)}}}function Po(e,t){return!Eo(t).some(t=>To(e[t]))}function Fo(e){let{mask:t,maskPlaceholder:n=`_`,value:r=``,onChange:i,beforeMaskedStateChange:a,onFocus:o,onBlur:s,onClick:l,ref:u,...d}=e,p=(0,c.useRef)(null),[m,h]=(0,c.useState)(!1),g=(0,c.useRef)(null);(0,c.useLayoutEffect)(()=>{g.current!==null&&(p.current?.setSelectionRange(g.current,g.current),g.current=null)});let _=Po(r,t),v=_?m?Do(``,t,n):``:Do(r,t,n),y=e=>{g.current=e,p.current?.setSelectionRange(e,e)},b=e=>{let r=e.target,o=r.value,s=No(v,o,r.selectionStart??o.length,t,n),c=a?a({previousState:{value:v,selection:null},nextState:s}):s,l=Do(c.value,t,n),u=c.selection?.start??jo(l,t,n);if(l===v){r.value=v,y(u);return}g.current=u,i?.(Po(l,t)?``:l)},x=e=>{h(!0),_&&(g.current=0),o?.(e)},S=e=>{let r=e.currentTarget,i=jo(v,t,n);r.selectionStart===r.selectionEnd&&(r.selectionStart??0)>i&&r.setSelectionRange(i,i),l?.(e)},C=e=>{h(!1),s?.(e)};return(0,f.jsx)(`input`,{...d,ref:pn(p,u),value:v,onChange:b,onFocus:x,onBlur:C,onClick:S,inputMode:`numeric`})}var Io={datePicker:`datePicker_ZohTp`,"datePicker-header":`datePicker-header_YmSWE`,datePickerHeader:`datePicker-header_YmSWE`,"datePicker-header-monthAndYear":`datePicker-header-monthAndYear_b5ntO`,datePickerHeaderMonthAndYear:`datePicker-header-monthAndYear_b5ntO`,"datePicker-header-monthAndYear-container":`datePicker-header-monthAndYear-container_Hcgks`,datePickerHeaderMonthAndYearContainer:`datePicker-header-monthAndYear-container_Hcgks`,"datePicker-header-month":`datePicker-header-month_jqFHl`,datePickerHeaderMonth:`datePicker-header-month_jqFHl`,"datePicker-header-year":`datePicker-header-year_4egHF`,datePickerHeaderYear:`datePicker-header-year_4egHF`,"datePicker-month":`datePicker-month_7iosT`,datePickerMonth:`datePicker-month_7iosT`,"datePicker-modalInput":`datePicker-modalInput_E2Vig`,datePickerModalInput:`datePicker-modalInput_E2Vig`};function Lo(e){return e==null||e===``||_n(e)?null:Object.prototype.toString.call(e)===`[object Date]`?`a Date. Convert it with dateToDay()`:`${JSON.stringify(e)}, which is not a day`}function Ro(e){let{className:t=``,selected:n,onSelect:r=()=>null,formValidator:i=null,noInput:a=!1,noHeader:o=!1,isModal:s=!1,isInline:u=!1,onChange:p=()=>null,minDate:m=null,maxDate:h=null,children:g=null,showClearButton:_=!1,label:v=``,isValid:y=!0,errorMessage:b=``,isRequired:x=!1,startDate:S,endDate:C,style:w,classNames:T,styles:E,...O}=D(`DatePicker`,e),k=()=>_n(i?i.value:n),A=_n(m),j=_n(h),M=k(),N=gn(M)??fo(),[P,F]=(0,c.useState)(N.month),[I,L]=(0,c.useState)(N.year),[R,z]=(0,c.useState)(!1),[B,V]=(0,c.useState)(()=>po(M)),[H,U]=(0,c.useState)(!1),[W,G]=(0,c.useState)(!1),[,ee]=(0,c.useState)(0),[K,te]=(0,c.useState)(n),q=(0,c.useRef)(i);if(K!==n){te(n);let e=gn(n)??fo();F(e.month),L(e.year),V(po(n))}let J=(0,c.useRef)(new Set),re=i?.value;(0,c.useEffect)(()=>{let e={selected:n,formValidator:re,minDate:m,maxDate:h,startDate:S,endDate:C};for(let[t,n]of Object.entries(e)){let e=Lo(n);e&&!J.current.has(t)&&(J.current.add(t),console.warn(`DatePicker: \`${t}\` takes a day as a 'YYYY-MM-DD' string, and got ${e}. See "Migration from Date values" in docs/DatePicker.md.`))}},[n,re,m,h,S,C]),(0,c.useEffect)(()=>{if(q.current=i,!i)return;i.label=v,i.validate();let e=()=>{let e=gn(i.value);e&&(F(e.month),L(e.year)),V(po(i.value)),ee(e=>e+1)};return i.registerOnUpdateListener(e),()=>i.removeOnUpdateListener(e)},[i,v]);let ie=()=>i?i.touched&&i.hasError():!y||!!b,ae=()=>!!(x||i?.validators.find(e=>e.validatorId===`required`)),oe=e=>{V(po(e)),i&&i.set(e),p(e)},se=e=>{oe(e),r(e),z(!1)},le=e=>{let t=I*12+P-1+e,n=Math.floor(t/12);n<0||n>9999||(L(n),F(t%12+1))},ue=e=>{let t=mo(e);return!t||A&&t<A||j&&t>j?null:t},Y=({previousState:e,nextState:t})=>{if(t.value===e.value)return t;let n=ho(t.value,e.value,t.selection??null),r=ue(n.value);return r&&oe(r),n},de=()=>{let e=400,t=fo().year-200,n=gn(A),r=gn(j);return n&&(t=n.year),r&&(e=Math.max(0,r.year-t+1)),Array.from(Array(e).keys()).map(e=>({key:e+t,label:e+t}))},fe=k(),pe=ie(),me=o?null:(0,f.jsxs)(`div`,{className:(0,l.default)(Io.datePickerHeader,T?.header),style:E?.header,children:[(0,f.jsx)(ce,{icon:d.faChevronLeft,onClick:()=>le(-1)}),(0,f.jsx)(`div`,{className:Io.datePickerHeaderMonthAndYearContainer,children:(0,f.jsxs)(`div`,{className:Io.datePickerHeaderMonthAndYear,children:[(0,f.jsx)(Co,{plainStyle:!0,scrollToSelected:!0,onChange:e=>F(e),className:(0,l.default)(Io.datePickerHeaderMonth,T?.monthDropdown),style:E?.monthDropdown,value:oo(io(`-`),I,P,1),items:so().map((e,t)=>({key:t+1,label:e}))}),(0,f.jsx)(Co,{plainStyle:!0,scrollToSelected:!0,useMatLabelStyle:!1,className:(0,l.default)(Io.datePickerHeaderYear,T?.yearDropdown),style:E?.yearDropdown,onChange:e=>L(e),value:I,items:de()})]})}),(0,f.jsx)(ce,{icon:d.faChevronRight,onClick:()=>le(1)})]}),X=(0,f.jsxs)(f.Fragment,{children:[me,(0,f.jsx)(yo,{className:(0,l.default)(Io.datePickerMonth,T?.calendar),style:E?.calendar,month:P,year:I,onSelect:se,selectionStart:_n(S)??fe,selectionEnd:_n(C)??fe,minDate:A,maxDate:j,onNavigateMonth:le}),_&&(0,f.jsx)(ne,{onClick:()=>se(null),className:T?.clearButton,style:E?.clearButton,children:`Clear`}),g]}),Z=a?null:(0,f.jsx)(Gi,{autoComplete:`off`,className:T?.input,style:E?.input,readOnly:s,classNames:s?{input:Io.datePickerModalInput}:void 0,label:`${v}${ae()?` *`:``}`,value:B,onChange:e=>V(e),onClick:()=>z(!0),customInput:(0,f.jsx)(Fo,{mask:`99.99.9999`,beforeMaskedStateChange:Y}),onBlur:()=>{q.current&&(q.current.touched=!0),U(!1),B!==po(k())&&oe(ue(B))},onFocus:()=>U(!0),onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),isValid:!pe}),he=u?X:s?(0,f.jsx)(va,{hideHeader:!0,isOpen:R,onClose:()=>z(!1),children:X}):(0,f.jsx)(rn,{isOpen:R,onOpenChange:e=>z(e),content:X,placement:wt.Bottom,align:Tt.Start,closeOnTriggerClick:!1,constrainWidth:!1,children:Z});return(0,f.jsxs)(`div`,{...O,className:(0,l.default)(Io.datePicker,t,T?.root),style:{...w,...E?.root},children:[(s||u)&&Z,he,(0,f.jsx)(Fi,{variant:`error`,message:i?i.getCurrentErrorMessage():b||``,isVisible:pe&&(H||W)})]})}var zo=function(e){return e.Left=`left`,e.Center=`center`,e.Right=`right`,e}({}),Bo=function(e){return e.Horizontal=`horizontal`,e.Vertical=`vertical`,e}({}),Vo={divider:`divider_OO203`,"divider-line":`divider-line_nVep8`,dividerLine:`divider-line_nVep8`,"divider-content":`divider-content_-y7ou`,dividerContent:`divider-content_-y7ou`,"divider-text-left":`divider-text-left_HYmeQ`,dividerTextLeft:`divider-text-left_HYmeQ`,"divider-text-right":`divider-text-right_RH5sH`,dividerTextRight:`divider-text-right_RH5sH`,"divider-vertical":`divider-vertical_CasA6`,dividerVertical:`divider-vertical_CasA6`},Ho={[zo.Left]:Vo.dividerTextLeft,[zo.Center]:Vo.dividerTextCenter,[zo.Right]:Vo.dividerTextRight};function Uo(e){let{text:t,textPosition:n=zo.Center,orientation:r=Bo.Horizontal,className:i,style:a,classNames:o,styles:s,...c}=D(`Divider`,e),u=t!=null&&t!==``,d=r===Bo.Vertical;return(0,f.jsxs)(`div`,{...c,role:`separator`,"aria-orientation":d?`vertical`:void 0,className:(0,l.default)(Vo.divider,d&&Vo.dividerVertical,u&&Ho[n],i,o?.root),style:{...a,...s?.root},children:[(0,f.jsx)(`span`,{className:(0,l.default)(Vo.dividerLine,o?.line),style:s?.line}),u&&(0,f.jsx)(`span`,{className:(0,l.default)(Vo.dividerContent,o?.content),style:s?.content,children:t}),u&&(0,f.jsx)(`span`,{className:(0,l.default)(Vo.dividerLine,o?.line),style:s?.line})]})}var Wo={drawer:`drawer_5SRoc`,"drawer-open":`drawer-open_-YQ8n`,drawerOpen:`drawer-open_-YQ8n`,"drawer-content":`drawer-content_sHIAP`,drawerContent:`drawer-content_sHIAP`,"drawer-content-inner":`drawer-content-inner_f-IDz`,drawerContentInner:`drawer-content-inner_f-IDz`};function Go({className:e,isOpen:t=!1,closedWidth:n,openedWidth:r,children:i,style:a,classNames:o,styles:s,...u}){let d=(0,c.useRef)(null),p=(0,c.useRef)(null);return(0,c.useEffect)(()=>{let e=new ResizeObserver(()=>{d.current&&p.current&&d.current.style.setProperty(`--drawer-content-width`,`${p.current.scrollWidth}px`)});return p.current&&e.observe(p.current),()=>e.disconnect()},[]),(0,f.jsx)(`div`,{...u,ref:d,className:(0,l.default)(Wo.drawer,t&&Wo.drawerOpen,e,o?.root),style:{...n!==void 0&&{"--drawer-closed-width":n},...r!==void 0&&{"--drawer-opened-width":r},...a,...s?.root},children:(0,f.jsx)(`div`,{ref:p,className:(0,l.default)(Wo.drawerContent,o?.content),style:s?.content,children:(0,f.jsx)(`div`,{className:(0,l.default)(Wo.drawerContentInner,o?.inner),style:s?.inner,children:i})})})}var Ko=function(e){return e.Idle=`idle`,e.Dragging=`dragging`,e.Active=`active`,e.Error=`error`,e}({}),qo=function(e){return e.File=`file`,e.Base64=`base64`,e.Text=`text`,e}({}),Jo={dropZone:`dropZone_9iJZy`,"dropZone-clickable":`dropZone-clickable_pcRhf`,dropZoneClickable:`dropZone-clickable_pcRhf`,"dropZone-disabled":`dropZone-disabled_YWcMp`,dropZoneDisabled:`dropZone-disabled_YWcMp`,"dropZone-default":`dropZone-default_5dSsT`,dropZoneDefault:`dropZone-default_5dSsT`,"dropZone-dragging":`dropZone-dragging_nGSL3`,dropZoneDragging:`dropZone-dragging_nGSL3`,"dropZone-active":`dropZone-active_Rov1w`,dropZoneActive:`dropZone-active_Rov1w`,"dropZone-error":`dropZone-error_hlnmB`,dropZoneError:`dropZone-error_hlnmB`,"dropZone-content":`dropZone-content_1QDk7`,dropZoneContent:`dropZone-content_1QDk7`,"dropZone-content-dragging":`dropZone-content-dragging_ettwl`,dropZoneContentDragging:`dropZone-content-dragging_ettwl`,"dropZone-fileList":`dropZone-fileList_si3X1`,dropZoneFileList:`dropZone-fileList_si3X1`,"dropZone-fileItem":`dropZone-fileItem_fES6y`,dropZoneFileItem:`dropZone-fileItem_fES6y`,"dropZone-input":`dropZone-input_4DGty`,dropZoneInput:`dropZone-input_4DGty`};function Yo(e,t){if(!t.length)return!0;let n=e.name.toLowerCase(),r=e.type.toLowerCase();return t.some(e=>{let t=e.trim().toLowerCase();return t?t.startsWith(`.`)?n.endsWith(t):t.endsWith(`/*`)?r.startsWith(t.slice(0,-1)):r===t:!1})}function Xo(e,t){return t===qo.File?Promise.resolve({ok:!0,value:e}):new Promise(n=>{let r=new FileReader;r.onload=t=>{let r=t.target?.result;if(typeof r!=`string`){n({ok:!1});return}n({ok:!0,value:{name:e.name,size:e.size,type:e.type,lastModified:e.lastModified,data:r}})},r.onerror=()=>n({ok:!1}),t===qo.Base64?r.readAsDataURL(e):r.readAsText(e)})}function Zo(e){return new Promise(t=>{if(e.isFile)e.file(e=>t([e]),()=>t([]));else if(e.isDirectory){let n=e.createReader(),r=[],i=()=>{n.readEntries(e=>{e.length?(r.push(...e),i()):Promise.all(r.map(Zo)).then(e=>t(e.flat()))},()=>t([]))};i()}else t([])})}function Qo(e,t){let n=e.items;if(n&&n.length){if(t&&typeof n[0].webkitGetAsEntry==`function`){let e=[];for(let t=0;t<n.length;t+=1)if(n[t].kind===`file`){let r=n[t].webkitGetAsEntry();r&&e.push(r)}if(e.length)return Promise.all(e.map(Zo)).then(e=>e.flat())}let e=[];for(let t=0;t<n.length;t+=1)if(n[t].kind===`file`){let r=n[t].getAsFile();r&&e.push(r)}return Promise.resolve(e)}return Promise.resolve(Array.from(e.files||[]))}function $o({children:e,acceptedTypes:t=[],returnType:n=qo.File,openPickerOnClick:r=!1,multiple:i=!0,maxFiles:a,maxSize:o,enablePaste:s=!1,allowDirectories:u=!0,capture:d,disabled:p=!1,unstyled:m=!1,showFileNames:h=!1,files:g,onFilesChanged:_,onReject:v,onStatusChanged:y,className:b,style:x,classNames:S,styles:C,...w}){let[T,E]=(0,c.useState)(Ko.Idle),D=(0,c.useRef)(null),O=(0,c.useId)(),k=(0,c.useRef)(T),A=(0,c.useRef)(0),M=(0,c.useRef)(0),N=(0,c.useRef)({acceptedTypes:t,returnType:n,multiple:i,maxFiles:a,maxSize:o,allowDirectories:u,disabled:p,onFilesChanged:_,onReject:v,onStatusChanged:y});(0,c.useEffect)(()=>{N.current={acceptedTypes:t,returnType:n,multiple:i,maxFiles:a,maxSize:o,allowDirectories:u,disabled:p,onFilesChanged:_,onReject:v,onStatusChanged:y}});let P=(0,c.useCallback)(e=>{k.current!==e&&(k.current=e,E(e),N.current.onStatusChanged?.(e))},[]),F=(0,c.useCallback)(async e=>{let t=N.current,n=[],r=[];for(let i of e)Yo(i,t.acceptedTypes)?t.maxSize!=null&&i.size>t.maxSize?n.push({file:i,reason:`tooLarge`}):r.push(i):n.push({file:i,reason:`unacceptedType`});t.multiple||(r=r.slice(0,1)),t.maxFiles!=null&&r.length>t.maxFiles&&(r.slice(t.maxFiles).forEach(e=>n.push({file:e,reason:`tooMany`})),r=r.slice(0,t.maxFiles));let i=await Promise.all(r.map(e=>Xo(e,t.returnType))),a=[];i.forEach((e,t)=>{e.ok?a.push(e.value):n.push({file:r[t],reason:`readError`})}),n.length&&t.onReject?.(n),P(n.length&&!a.length?Ko.Error:Ko.Idle),a.length&&t.onFilesChanged?.(a)},[P]);(0,c.useEffect)(()=>{let e=e=>!e||Array.from(e.types||[]).includes(`Files`),t=t=>{!N.current.disabled&&e(t.dataTransfer)&&(A.current+=1,(k.current===Ko.Idle||k.current===Ko.Error)&&P(Ko.Dragging))},n=()=>{A.current=Math.max(0,A.current-1),A.current===0&&k.current===Ko.Dragging&&P(Ko.Idle)},r=()=>{A.current=0,M.current=0,k.current===Ko.Dragging&&P(Ko.Idle)};return window.addEventListener(`dragenter`,t),window.addEventListener(`dragleave`,n),window.addEventListener(`drop`,r),()=>{window.removeEventListener(`dragenter`,t),window.removeEventListener(`dragleave`,n),window.removeEventListener(`drop`,r)}},[P]);let I=(0,c.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.dropEffect=p?`none`:`copy`)},[p]),L=(0,c.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),!p&&(M.current+=1,P(Ko.Active))},[p,P]),R=(0,c.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),M.current=Math.max(0,M.current-1),M.current===0&&P(A.current>0?Ko.Dragging:Ko.Idle)},[P]),z=(0,c.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),M.current=0,A.current=0,p||!e.dataTransfer){P(Ko.Idle);return}P(Ko.Idle),Qo(e.dataTransfer,N.current.allowDirectories).then(e=>{e.length&&F(e)})},[p,P,F]),B=(0,c.useCallback)(()=>{!p&&r&&D.current?.click()},[p,r]),V=(0,c.useCallback)(e=>{let t=Array.from(e.target.files||[]);e.target.value=``,t.length&&F(t)},[F]),H=(0,c.useCallback)(e=>{if(!s||p)return;let t=Array.from(e.clipboardData?.files||[]);t.length&&(e.preventDefault(),F(t))},[s,p,F]),U=(0,c.useCallback)(e=>{r&&!p&&j(e)&&(e.preventDefault(),B())},[r,p,B]),W=T===Ko.Dragging||T===Ko.Active,G={status:T,isDragging:W,isActive:T===Ko.Active,disabled:p},ee=t.length?t.join(`,`):void 0;return(0,f.jsxs)(`div`,{...w,className:(0,l.default)(Jo.dropZone,r&&Jo.dropZoneClickable,p&&Jo.dropZoneDisabled,!m&&Jo.dropZoneDefault,!m&&T===Ko.Dragging&&Jo.dropZoneDragging,!m&&T===Ko.Active&&Jo.dropZoneActive,!m&&T===Ko.Error&&Jo.dropZoneError,S?.root,b),style:{...C?.root,...x},onDragEnter:L,onDragLeave:R,onDragOver:I,onDrop:z,onClick:B,onKeyDown:U,onPaste:s?H:void 0,role:r?`button`:void 0,tabIndex:r&&!p?0:void 0,"aria-disabled":p||void 0,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Jo.dropZoneContent,W&&Jo.dropZoneContentDragging,S?.content),style:C?.content,children:typeof e==`function`?e(G):e}),h&&g&&g.length>0&&(0,f.jsx)(`div`,{className:(0,l.default)(Jo.dropZoneFileList,S?.fileList),style:C?.fileList,children:g.map((e,t)=>(0,f.jsx)(`div`,{className:(0,l.default)(Jo.dropZoneFileItem,S?.fileItem),style:C?.fileItem,children:e.name},`${e.name}-${t}`))}),(0,f.jsx)(`input`,{ref:D,id:O,type:`file`,className:(0,l.default)(Jo.dropZoneInput,S?.input),style:C?.input,accept:ee,multiple:i,capture:d,disabled:p,onChange:V,tabIndex:-1,"aria-hidden":`true`})]})}var es={emptyState:`emptyState_KXOIx`},ts={empty:`No entries available`};function ns({className:e,icon:t,children:n,labels:r,style:i,classNames:a,styles:o,...s}){let c=O(`EmptyState`,r,ts);return(0,f.jsxs)(`div`,{...s,className:(0,l.default)(es.emptyState,e,a?.root),style:{...i,...o?.root},children:[t?K(t,{className:a?.icon,style:o?.icon}):null,(0,f.jsx)(`div`,{className:a?.text,style:o?.text,children:n??c.empty})]})}var rs={errorBoundary:`errorBoundary_XdPM0`,errorBoundaryHeader:`errorBoundaryHeader_2PdRz`,errorBoundaryBadge:`errorBoundaryBadge_TyXdO`,errorBoundaryBadgeIn:`errorBoundaryBadgeIn_Q-MMB`,errorBoundaryIcon:`errorBoundaryIcon_PcZ4H`,errorBoundaryTitle:`errorBoundaryTitle_X9tEE`,errorBoundaryFadeUp:`errorBoundaryFadeUp_2qx5d`,errorBoundaryDescription:`errorBoundaryDescription_NELdD`,errorBoundaryStack:`errorBoundaryStack_BUkBD`,errorBoundaryStackHeader:`errorBoundaryStackHeader_uimLH`,errorBoundaryStackLabel:`errorBoundaryStackLabel_D-19W`,errorBoundaryCopyButton:`errorBoundaryCopyButton_e09KC`,errorBoundaryStackTrace:`errorBoundaryStackTrace_DskzG`,errorBoundaryActions:`errorBoundaryActions_h3GMQ`},is={stackTrace:`Stack trace`,copy:`Copy`,copied:`Copied`,reset:`Try again`,copySuccessToast:`Stack trace copied to clipboard`,copyErrorToast:`Could not copy stack trace`};function as(e,t){let n=[e.stack??`${e.name}: ${e.message}`];return t?.componentStack&&n.push(`Component stack:${t.componentStack}`),n.join(`
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));let c=require("react");c=s(c,1);let l=require("classnames");l=s(l,1);let u=require("@fortawesome/react-fontawesome"),d=require("@fortawesome/free-solid-svg-icons"),f=require("react/jsx-runtime"),p=require("react-dom"),m=require("@dnd-kit/core"),h=require("@dnd-kit/sortable"),g=require("@dnd-kit/utilities"),_=require("react-number-format"),v=require("@ahrowe/form-validation");var y=function(e){return e.Default=`default`,e.Primary=`primary`,e.Plain=`plain`,e}({}),b={accordion:`accordion_YZt8B`,"accordion-title":`accordion-title_CGYKY`,accordionTitle:`accordion-title_CGYKY`,"accordion-active":`accordion-active_mocpj`,accordionActive:`accordion-active_mocpj`,"accordion-header":`accordion-header_OEjXM`,accordionHeader:`accordion-header_OEjXM`,"accordion-header-active":`accordion-header-active_6KvnM`,accordionHeaderActive:`accordion-header-active_6KvnM`,"accordion-body":`accordion-body_2o-mY`,accordionBody:`accordion-body_2o-mY`,"accordion-body-inner":`accordion-body-inner_JI9nJ`,accordionBodyInner:`accordion-body-inner_JI9nJ`,"accordion-body-active":`accordion-body-active_sb2-U`,accordionBodyActive:`accordion-body-active_sb2-U`,"accordion-icon":`accordion-icon_kLqp-`,accordionIcon:`accordion-icon_kLqp-`,"accordion-icon-active":`accordion-icon-active_lJwG8`,accordionIconActive:`accordion-icon-active_lJwG8`},x={accordion:`accordion_X64Nz`,"accordion-title":`accordion-title_2q-FF`,accordionTitle:`accordion-title_2q-FF`,"accordion-active":`accordion-active_72VwY`,accordionActive:`accordion-active_72VwY`,"accordion-header":`accordion-header_XuGF6`,accordionHeader:`accordion-header_XuGF6`,"accordion-header-active":`accordion-header-active_xf8Ch`,accordionHeaderActive:`accordion-header-active_xf8Ch`,"accordion-body":`accordion-body_0Jsco`,accordionBody:`accordion-body_0Jsco`,"accordion-body-inner":`accordion-body-inner_0UBPf`,accordionBodyInner:`accordion-body-inner_0UBPf`,"accordion-body-active":`accordion-body-active_XFSy1`,accordionBodyActive:`accordion-body-active_XFSy1`,"accordion-icon":`accordion-icon_W1mz5`,accordionIcon:`accordion-icon_W1mz5`,"accordion-icon-active":`accordion-icon-active_LI98q`,accordionIconActive:`accordion-icon-active_LI98q`},S={accordion:`accordion_wkZJf`,"accordion-title":`accordion-title_-qwNy`,accordionTitle:`accordion-title_-qwNy`,"accordion-active":`accordion-active_t9-a2`,accordionActive:`accordion-active_t9-a2`,"accordion-header":`accordion-header_-oST6`,accordionHeader:`accordion-header_-oST6`,"accordion-header-active":`accordion-header-active_UvKis`,accordionHeaderActive:`accordion-header-active_UvKis`,"accordion-body":`accordion-body_ZagrJ`,accordionBody:`accordion-body_ZagrJ`,"accordion-body-inner":`accordion-body-inner_HE7PL`,accordionBodyInner:`accordion-body-inner_HE7PL`,"accordion-icon":`accordion-icon_kHxym`,accordionIcon:`accordion-icon_kHxym`,"accordion-icon-active":`accordion-icon-active_-L8BH`,accordionIconActive:`accordion-icon-active_-L8BH`},C=(0,c.createContext)(null),w=(0,c.createContext)(void 0);function T(e,t){if(!e)return t??{};if(!t)return e;let n={...e};for(let r in t)n[r]={...e[r],...t[r]};return n}function E({children:e,defaultProps:t,presentation:n}){let r=(0,c.useContext)(C),i=(0,c.useMemo)(()=>T(r,t),[r,t]),a=(0,c.useContext)(w),o=n??a;return(0,f.jsx)(C.Provider,{value:i,children:(0,f.jsx)(w.Provider,{value:o,children:e})})}function D(e,t){let n=(0,c.useContext)(C)?.[e];if(!n)return t;let r={...n};for(let e in t){let n=t[e];n!==void 0&&(r[e]=n)}return r}function O(e,t,n){let r=(0,c.useContext)(C)?.[e]?.labels;return{...n,...r,...t}}function k(){return(0,c.useContext)(w)}var A=function(e){return e.Default=`default`,e.Sheet=`sheet`,e.Auto=`auto`,e}({});function j(e){return e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)}var M={[y.Default]:b,[y.Primary]:x,[y.Plain]:S};function N(e){let{id:t=``,title:n=``,children:r=null,expanded:i=null,onHeaderClicked:a=()=>{},styleType:o=y.Default,startOpen:s=!1,hideHeader:p=!1,className:m,style:h,classNames:g,styles:_,...v}=D(`Accordion`,e),b=M[o],x=(0,c.useId)(),S=`${x}-header`,C=`${x}-body`,w=(0,c.useRef)(null),T=(0,c.useRef)(null),[E,O]=(0,c.useState)(i??s),[k,A]=(0,c.useState)(null);(0,c.useEffect)(()=>{i!==null&&O(i)},[i]),(0,c.useEffect)(()=>{let e=w.current;e&&(e.inert=!E)},[E]),(0,c.useEffect)(()=>{let e=T.current;if(!e)return;let t=new ResizeObserver(()=>A(e.offsetHeight));return t.observe(e),()=>t.unobserve(e)},[]);function N(){let e=!E;a(t,e),i===null&&O(e)}let P={height:E?k??`auto`:`0px`};return(0,f.jsxs)(`div`,{...v,id:t||void 0,className:(0,l.default)(b.accordion,E&&b.accordionActive,m,g?.root),style:{...h,..._?.root},children:[!p&&(0,f.jsxs)(`div`,{className:(0,l.default)(b.accordionHeader,E&&b.accordionHeaderActive,g?.header),style:_?.header,onClick:N,role:`button`,tabIndex:0,id:S,"aria-expanded":E,"aria-controls":C,onKeyDown:e=>{j(e)&&(e.preventDefault(),N())},children:[(0,f.jsx)(`div`,{className:(0,l.default)(b.accordionTitle,g?.title),style:_?.title,children:n}),(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronDown,className:(0,l.default)(b.accordionIcon,E&&b.accordionIconActive,g?.icon),style:_?.icon})]}),(0,f.jsx)(`div`,{ref:w,id:C,role:`region`,"aria-labelledby":p?void 0:S,className:(0,l.default)(b.accordionBody,E&&b.accordionBodyActive,g?.body),style:{...P,..._?.body},children:(0,f.jsx)(`div`,{className:(0,l.default)(b.accordionBodyInner,g?.bodyInner),style:_?.bodyInner,ref:T,children:r})})]})}var P={actionButtons:`actionButtons_7GybR`,"actionButtons-margin":`actionButtons-margin_-XoFP`,actionButtonsMargin:`actionButtons-margin_-XoFP`,"actionButtons-stacked":`actionButtons-stacked_ZGpUN`,actionButtonsStacked:`actionButtons-stacked_ZGpUN`},F={button:`button_wYLPJ`,"button-notAllowed":`button-notAllowed_xGT-E`,buttonNotAllowed:`button-notAllowed_xGT-E`,"button-loading-icon":`button-loading-icon_1pTTz`,buttonLoadingIcon:`button-loading-icon_1pTTz`,"button-content":`button-content_Q-0-4`,buttonContent:`button-content_Q-0-4`,"button-loading":`button-loading_TY6y7`,buttonLoading:`button-loading_TY6y7`,"button-loading-container":`button-loading-container_pMSta`,buttonLoadingContainer:`button-loading-container_pMSta`,"button-withIcon":`button-withIcon_IXEKA`,buttonWithIcon:`button-withIcon_IXEKA`,"button-style-default":`button-style-default_JmAqD`,buttonStyleDefault:`button-style-default_JmAqD`,"button-style-primary":`button-style-primary_Ra5i-`,buttonStylePrimary:`button-style-primary_Ra5i-`,"button-style-delete":`button-style-delete_jpTCf`,buttonStyleDelete:`button-style-delete_jpTCf`,"button-background":`button-background_9Vfo5`,buttonBackground:`button-background_9Vfo5`,"button-size-default":`button-size-default_N4HG9`,buttonSizeDefault:`button-size-default_N4HG9`,"button-size-small":`button-size-small_mn6jE`,buttonSizeSmall:`button-size-small_mn6jE`,"button-size-medium":`button-size-medium_gNVDM`,buttonSizeMedium:`button-size-medium_gNVDM`,"button-size-large":`button-size-large_xSIcS`,buttonSizeLarge:`button-size-large_xSIcS`,"button-size-icon":`button-size-icon_pkqwl`,buttonSizeIcon:`button-size-icon_pkqwl`,"button-ripple":`button-ripple_UGtt8`,buttonRipple:`button-ripple_UGtt8`},I={"spinner-loading":`spinner-loading_qbxX-`,spinnerLoading:`spinner-loading_qbxX-`,"animate-spinner":`animate-spinner_6HoVF`,animateSpinner:`animate-spinner_6HoVF`,spin:`spin_axdh6`};function L({className:e}){return(0,f.jsx)(`svg`,{"data-testid":`spinner`,className:(0,l.default)(I.spinnerLoading,e),xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 100 100`,fill:`none`,stroke:`var(--primary-color)`,children:(0,f.jsx)(`circle`,{cx:`50`,cy:`50`,r:`45`,strokeWidth:`10`})})}var R=L,z=function(e){return e.Primary=`primary`,e.Default=`default`,e.Delete=`delete`,e}({}),B=function(e){return e.Default=`default`,e.Small=`small`,e.Medium=`medium`,e.Large=`large`,e.Icon=`icon`,e}({}),V=function(e){return e.Button=`button`,e.Reset=`reset`,e.Submit=`submit`,e}({}),H={ripple:`ripple_TsvyF`,"ripple-container":`ripple-container_QzHdC`,rippleContainer:`ripple-container_QzHdC`},U=[`a[href]`,`button`,`input`,`select`,`textarea`,`label`,`[contenteditable=""]`,`[contenteditable="true"]`,`[role="button"]`,`[role="link"]`,`[role="checkbox"]`,`[role="combobox"]`,`[role="menuitem"]`,`[role="menuitemcheckbox"]`,`[role="menuitemradio"]`,`[role="option"]`,`[role="radio"]`,`[role="searchbox"]`,`[role="slider"]`,`[role="spinbutton"]`,`[role="switch"]`,`[role="tab"]`,`[role="textbox"]`,`[role="treeitem"]`].join(`, `);function W(e,t){if(!t||!(e instanceof Element))return!1;let n=e.closest(U);return!!n&&n!==t&&t.contains(n)}function G({disabled:e=!1,children:t,className:n,style:r,overflowHidden:i=!0,rippleAnimationLength:a=.6,rippleBackground:o=`rgba(255, 255, 255, 0.2)`,manualOnly:s=!1,ref:l,...u}){let d=(0,c.useRef)(null),p=(0,c.useRef)(null);function m(t,n){if(e)return;let r=document.createElement(`div`);r.style.left=`${t}px`,r.style.top=`${n}px`,r.style.background=o,r.classList.add(H.ripple),d.current?.appendChild(r),setTimeout(()=>{d.current?.removeChild(r)},a*1e3+50)}function h(e){if(!d.current)return;let t=d.current.getBoundingClientRect();m(e.clientX-t.x,e.clientY-t.y)}(0,c.useImperativeHandle)(l,()=>({addRipple(){let e=d.current;e&&m(e.offsetWidth/2,e.offsetHeight/2)}})),(0,c.useEffect)(()=>{p.current=h}),(0,c.useEffect)(()=>{if(t!==void 0||s)return;let e=d.current?.parentElement;if(!e)return;let n=t=>{W(t.target,e)||p.current?.(t)};return e.addEventListener(`click`,n),()=>e.removeEventListener(`click`,n)},[t,s]);let g={"--ripple-animation-length":`${a}s`};return t===void 0?(0,f.jsx)(`div`,{className:H.rippleContainer,ref:d,style:{overflow:i?`hidden`:`visible`,...g}}):(0,f.jsxs)(`div`,{...u,className:n,onClick:s?void 0:e=>{W(e.target,e.currentTarget)||h(e)},style:{position:`relative`,...r},children:[t,(0,f.jsx)(`div`,{className:H.rippleContainer,ref:d,style:{overflow:i?`hidden`:`visible`,...g}})]})}function ee(e){return typeof e==`object`&&!!e&&`prefix`in e&&`iconName`in e&&`icon`in e}function K(e,t={}){let{className:n,style:r}=t;return e==null?null:ee(e)?(0,f.jsx)(u.FontAwesomeIcon,{icon:e,className:n,style:r}):n||r?(0,f.jsx)(`span`,{className:n,style:r,children:e}):e}var te={default:F.buttonStyleDefault,primary:F.buttonStylePrimary,delete:F.buttonStyleDelete},q={default:F.buttonSizeDefault,small:F.buttonSizeSmall,medium:F.buttonSizeMedium,large:F.buttonSizeLarge,icon:F.buttonSizeIcon};function ne(e){let{className:t,style:n,type:r=V.Button,styleType:i=z.Default,size:a=B.Default,onClick:o=()=>{},children:s,icon:u,isLoading:d=!1,disabled:p=!1,title:m=void 0,ref:h,classNames:g,styles:_,...v}=D(`Button`,e),y=(0,c.useRef)(null);function b(e){return e.detail===0&&y.current?.addRipple(),o(e)}return(0,f.jsx)(`button`,{...v,className:(0,l.default)(F.button,te[i],q[a],{[F.buttonNotAllowed]:d||p},t),style:n,type:r,onClick:b,disabled:p||d,title:m,ref:h,children:(0,f.jsx)(G,{ref:y,className:F.buttonRipple,disabled:d||p,children:(0,f.jsx)(`div`,{className:(0,l.default)(F.buttonBackground,g?.background),style:_?.background,children:(0,f.jsxs)(`div`,{className:(0,l.default)(F.buttonContent,g?.content),style:_?.content,children:[d?(0,f.jsx)(`div`,{className:(0,l.default)(F.buttonLoadingContainer,g?.loadingContainer),style:_?.loadingContainer,children:(0,f.jsx)(R,{className:F.buttonLoadingIcon})}):null,(0,f.jsxs)(`div`,{className:(0,l.default)(g?.label,{[F.buttonLoading]:d,[F.buttonWithIcon]:!!u}),style:_?.label,children:[u?K(u):null,s]})]})})})})}ne.StyleType=z,ne.Size=B,ne.Type=V;var J={submit:`Save`,cancel:`Cancel`};function re(e){let{onSubmit:t=()=>null,onClose:n=()=>null,labels:r,submitButtonStyle:i=z.Primary,isSubmitButtonLoading:a=!1,isSubmitButtonDisabled:o=!1,submitButtonIcon:s=void 0,cancelButtonStyle:c=z.Default,isCancelButtonLoading:u=!1,isCancelButtonDisabled:d=!1,cancelButtonIcon:p=void 0,hidePrimaryButton:m=!1,hideSecondaryButton:h=!1,noMargin:g=!1,stackButtons:_=!1,className:v,style:y,classNames:b,styles:x,...S}=D(`ActionButtons`,e),C=O(`ActionButtons`,r,J);return(0,f.jsxs)(`div`,{...S,className:(0,l.default)(P.actionButtons,!g&&P.actionButtonsMargin,_&&P.actionButtonsStacked,v,b?.root),style:{...y,...x?.root},children:[!m&&(0,f.jsx)(ne,{isLoading:a,disabled:o,styleType:i,type:V.Submit,onClick:t,className:b?.submitButton,style:x?.submitButton,icon:s,children:C.submit}),!h&&(0,f.jsx)(ne,{isLoading:u,disabled:d,onClick:n,styleType:c,className:b?.cancelButton,style:x?.cancelButton,icon:p,children:C.cancel})]})}var ie={interactableDiv:`interactableDiv_Ej8Fi`};function ae({className:e,children:t,onClick:n,onKeyDown:r,tabIndex:i,ref:a,...o}){let s=(0,c.useCallback)(e=>{W(e.target,e.currentTarget)||n?.(e)},[n]),u=(0,c.useCallback)(e=>{j(e)&&(e.key===` `&&e.preventDefault(),e.currentTarget.click()),r?.(e)},[r]);return(0,f.jsx)(`div`,{className:(0,l.default)(ie.interactableDiv,e),onClick:n?s:void 0,tabIndex:i===void 0?n?0:void 0:i??void 0,role:n?`button`:void 0,onKeyDown:u,ref:a,...o,children:t})}var oe=ae,se={actionIcon:`actionIcon_ganSq`};function ce({icon:e,className:t=``,style:n,title:r=``,onClick:i=()=>{},classNames:a,styles:o,...s}){return(0,f.jsx)(oe,{...s,className:(0,l.default)(se.actionIcon,t,a?.root),style:{...n,...o?.root},title:r,onClick:i,children:K(e,{className:a?.icon,style:o?.icon})})}var le={scrollbarProvider:`scrollbarProvider_IMBFu`};function ue({className:e=void 0,children:t=void 0}){return(0,f.jsx)(`div`,{className:(0,l.default)(le.scrollbarProvider,e),children:t})}var Y=ue,de={id:`default`,variables:{"--grey":`#8A8A8A`,"--lightgrey":`#e0e0e0`,"--lightergrey":`#B1B1B1`,"--white":`#FFFFFF`,"--red":`#D6002A`,"--lighter-red":`#ffeae9`,"--green":`#287626`,"--lighter-green":`#C4FFC9`,"--blue":`#5873d5`,"--lighter-blue":`#C6DBFF`,"--black":`black`,"--orange":`#ff7f50`,"--lighter-orange":`#ffe5d9`,"--primary-color":`#8184d6`,"--primary-accent":`#90CAF9`,"--primary-lighter":`#9a9ce4`,"--accent-color":`var(--grey)`,"--accent-color-light":`var(--lightgrey)`,"--text-color":`var(--white)`,"--text-dark":`var(--lightergrey)`,"--text-light":`var(--lightergrey)`,"--text-on-primary":`var(--white)`,"--text-on-delete":`var(--white)`,"--border-color":`#656574`,"--focus-border-color":`var(--primary-color)`,"--background":`#393945`,"--background-accent":`#33333c`,"--background-accent-dark":`var(--grey)`,"--background-accent-light":`#484856`,"--background-modal":`#484856`,"--success-color":`var(--green)`,"--success-lighter":`var(--lighter-green)`,"--error-color":`var(--red)`,"--error-lighter":`var(--lighter-red)`,"--required-mark-color":`var(--error-color)`,"--info-color":`var(--blue)`,"--info-lighter":`var(--lighter-blue)`,"--warn-color":`var(--orange)`,"--warn-lighter":`var(--lighter-orange)`,"--default-font-size":`16px`,"--text-small-font-size":`14px`,"--header-font-size":`24px`,"--header-medium-font-size":`18px`,"--header-small-font-size":`16px`,"--default-font-weight":`400`,"--header-font-weight":`600`,"--input-background":`transparent`,"--input-icon-color":`var(--text-color)`,"--error-border-color":`var(--red)`,"--button-default-color":`var(--primary-color)`,"--button-default-border":`1px solid var(--primary-color)`,"--default-border-radius":`8px`,"--padding-sides":`15px`,"--margin-top":`10px`,"--default-font":`'Inter', sans-serif`,"--themed-font":`'Inter', sans-serif`,"--card-shadow":`0 3px 1px -2px rgb(0 0 0 / 20%), 0 2px 2px 0 rgb(0 0 0 / 14%), 0 1px 5px 0 rgb(0 0 0 / 12%)`,"--background-card-elevated":`var(--background-accent-light)`,"--background-card-outlined":`transparent`,"--background-card-filled":`var(--background-accent)`,"--spacing-s":`4px`,"--spacing-m":`8px`,"--spacing-l":`16px`}},fe=(0,c.createContext)(null),pe={themeRoot:`themeRoot_oegLp`,colorFade:`colorFade_eLv2g`};function me(e,t){let n=e.find(e=>e.id===t);return n?[...n.baseThemeId?me(e,n.baseThemeId):[],n.variables]:[]}function X({themes:e=[de],currentThemeId:t}){let n=e.find(e=>!e.baseThemeId)??e[0],r=n?n.variables:{},i=t?me(e,t):[];return Object.assign({},r,...i)}var Z=class extends c.Component{constructor(...e){super(...e),this.state={resolvedVariables:X(this.props),colorFadeActive:!1,currentThemeColor:null,resolvedFrom:{themes:this.props.themes,currentThemeId:this.props.currentThemeId}},this.colorFadeTimeout=null,this.wrapperRef=c.default.createRef(),this.themeColorMeta=null,this.createdThemeColorMeta=!1}static{this.contextType=fe}static getDerivedStateFromProps(e,t){let{themes:n,currentThemeId:r}=t.resolvedFrom;return e.themes===n&&e.currentThemeId===r?null:{resolvedVariables:X(e),colorFadeActive:!0,resolvedFrom:{themes:e.themes,currentThemeId:e.currentThemeId}}}componentDidMount(){this.readThemeColor()}componentDidUpdate(e,t){t.resolvedVariables!==this.state.resolvedVariables&&(this.readThemeColor(),this.colorFadeTimeout&&clearTimeout(this.colorFadeTimeout),this.colorFadeTimeout=setTimeout(()=>{this.setState({colorFadeActive:!1}),this.colorFadeTimeout=null},500)),t.currentThemeColor!==this.state.currentThemeColor&&this.syncThemeColorMeta(this.state.currentThemeColor??``)}componentWillUnmount(){this.colorFadeTimeout&&clearTimeout(this.colorFadeTimeout),this.createdThemeColorMeta&&=(this.themeColorMeta?.remove(),this.themeColorMeta=null,!1)}syncThemeColorMeta(e){if(typeof document<`u`){if(!this.themeColorMeta){let e=document.head.querySelector(`meta[name="theme-color"]`);if(e)this.themeColorMeta=e;else{let e=document.createElement(`meta`);e.setAttribute(`name`,`theme-color`),document.head.appendChild(e),this.themeColorMeta=e,this.createdThemeColorMeta=!0}}this.themeColorMeta.setAttribute(`content`,e)}}readThemeColor(){if(this.context||!this.wrapperRef.current)return;let e=getComputedStyle(this.wrapperRef.current).getPropertyValue(`--primary-color`).trim();e!==this.state.currentThemeColor&&this.setState({currentThemeColor:e})}render(){let{children:e}=this.props,{resolvedVariables:t,colorFadeActive:n}=this.state;return(0,f.jsx)(`div`,{ref:this.wrapperRef,id:`themeProvider`,className:(0,l.default)(pe.themeRoot,n&&pe.colorFade),style:t,children:(0,f.jsx)(fe.Provider,{value:t,children:e})})}},he={id:`light`,baseThemeId:`default`,variables:{"--background":`#FFFFFF`,"--background-accent":`#F4F4F8`,"--background-accent-light":`#FAFAFD`,"--background-accent-dark":`#D4D4E0`,"--background-modal":`#FFFFFF`,"--text-color":`#1E1E2E`,"--text-dark":`#55556E`,"--text-light":`#75758C`,"--border-color":`#DCDCE8`,"--lighter-green":`#DFF5E1`,"--lighter-red":`#FCE4E6`,"--lighter-blue":`#E1EBFF`,"--lighter-orange":`#FFEADF`,"--accent-color":`#6E6E80`,"--input-background":`#F4F4F8`,"--card-shadow":`0 1px 3px rgb(0 0 0 / 8%), 0 1px 2px rgb(0 0 0 / 6%)`}},ge=(0,c.createContext)(void 0);function _e({children:e=null}){let t=(0,c.useContext)(fe),n=(0,c.useContext)(ge),r=n===void 0?document.getElementById(`bodyEnd`):n;return r?t?(0,p.createPortal)((0,f.jsx)(`div`,{className:pe.themeRoot,style:{display:`contents`,...t},children:e}),r):(0,p.createPortal)(e,r):null}var ve={container:`container_krdsW`,"container-top-left":`container-top-left_zfDTO`,containerTopLeft:`container-top-left_zfDTO`,"container-top-center":`container-top-center_CUIGc`,containerTopCenter:`container-top-center_CUIGc`,"container-top-right":`container-top-right_sB0KU`,containerTopRight:`container-top-right_sB0KU`,"container-bottom-left":`container-bottom-left_toJdF`,containerBottomLeft:`container-bottom-left_toJdF`,"container-bottom-center":`container-bottom-center_Bkf9m`,containerBottomCenter:`container-bottom-center_Bkf9m`,"container-bottom-right":`container-bottom-right_oRSMc`,containerBottomRight:`container-bottom-right_oRSMc`,toast:`toast_qBi4o`,toastSlideDown:`toastSlideDown_4lKWq`,"toast-bottom":`toast-bottom_X8ZIe`,toastBottom:`toast-bottom_X8ZIe`,toastSlideUp:`toastSlideUp_SGR5X`,"toast-dismissing":`toast-dismissing_xKmB-`,toastDismissing:`toast-dismissing_xKmB-`,toastFadeOut:`toastFadeOut_cvHYp`,"toast-paused":`toast-paused_NPmT4`,toastPaused:`toast-paused_NPmT4`,toastProgressBar:`toastProgressBar_6vBs6`,"toast-info":`toast-info_RlLli`,toastInfo:`toast-info_RlLli`,toastIcon:`toastIcon_xU1nA`,"toast-success":`toast-success_I1g1B`,toastSuccess:`toast-success_I1g1B`,"toast-error":`toast-error_MloFO`,toastError:`toast-error_MloFO`,"toast-warn":`toast-warn_pP6HB`,toastWarn:`toast-warn_pP6HB`,"toast-default":`toast-default_RTt2L`,toastDefault:`toast-default_RTt2L`,toastContent:`toastContent_gvyIv`,toastCloseButton:`toastCloseButton_n-YST`,toastShrink:`toastShrink_h89HS`};function ye(){return typeof window<`u`&&typeof window.matchMedia==`function`}function be(e){let t=(0,c.useCallback)(t=>{if(!ye())return()=>{};let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},[e]),n=(0,c.useCallback)(()=>ye()&&window.matchMedia(e).matches,[e]),r=(0,c.useCallback)(()=>!1,[]);return(0,c.useSyncExternalStore)(t,n,r)}function xe(){return be(`(pointer: coarse)`)}var Se=180,Ce=10;function we({onDismiss:e,axis:t=`x`,distanceThreshold:n=80,velocityThreshold:r=.5,disabled:i=!1,mobileOnly:a=!0}){let[o,s]=(0,c.useState)(null),l=(0,c.useCallback)(e=>s(e),[]),[u,d]=(0,c.useState)(!1),f=xe(),p=i||a&&!f,m=(0,c.useRef)(null),h=(0,c.useRef)(e);return(0,c.useEffect)(()=>{h.current=e}),(0,c.useEffect)(()=>{let e=o;if(!e||p)return;function i(r,i){if(!e)return;i!==`none`&&e.offsetHeight;let a=t===`x`?`translateX(${r}px)`:`translateY(${r}px)`;e.style.transition=i,e.style.transform=a;let o=Math.max(0,1-Math.abs(r)/(n*2.5));e.style.opacity=String(o)}function a(e){let n=m.current;if(!n||e.pointerId!==n.pointerId)return;let r=e.clientX-n.startX,a=e.clientY-n.startY;if(!n.axisLocked){let e=t===`x`?r:a,i=t===`x`?a:r;if(Math.abs(e)<Ce&&Math.abs(i)<Ce)return;if(Math.abs(i)>Math.abs(e)){n.active=!1;return}n.axisLocked=!0,d(!0)}n.active&&(e.preventDefault(),n.offset=t===`x`?r:a,i(n.offset,`none`))}function s(){let t=m.current;if(m.current=null,window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,s),!t||!t.active||!t.axisLocked){d(!1);return}let o=Math.max(1,Date.now()-t.startTime),c=t.offset/o;if(Math.abs(t.offset)>=n||Math.abs(c)>=r){let n=e?.getBoundingClientRect().width??0;i(Math.sign(t.offset||1)*(n+40),`transform ${Se}ms ease-out, opacity ${Se}ms ease-out`),setTimeout(()=>h.current(),Se)}else i(0,`transform ${Se}ms ease-out, opacity ${Se}ms ease-out`);d(!1)}function c(t){!m.current&&e&&(e.style.animation=`none`,m.current={pointerId:t.pointerId,startX:t.clientX,startY:t.clientY,startTime:Date.now(),offset:0,axisLocked:!1,active:!0},window.addEventListener(`pointermove`,a,{passive:!1}),window.addEventListener(`pointerup`,s),window.addEventListener(`pointercancel`,s))}return e.addEventListener(`pointerdown`,c),()=>{e.removeEventListener(`pointerdown`,c),window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,s)}},[o,t,n,r,p]),{ref:l,isDragging:u}}var Te={info:d.faCircleInfo,success:d.faCircleCheck,error:d.faCircleXmark,warn:d.faTriangleExclamation,default:d.faBell};function Ee({item:e,isBottom:t,onDismiss:n,labels:r}){let{id:i,content:a,options:o,dismissing:s}=e,{duration:p,showRemainingTime:m,showCloseButton:h,pauseOnHover:g,type:_,classNames:v,styles:y}=o,[b,x]=(0,c.useState)(!1),[S,C]=(0,c.useState)(!1),[w,T]=(0,c.useState)(!1),{ref:E,isDragging:D}=we({onDismiss:()=>{T(!0),n(i)}}),O=g&&(b||S)||D,k=(0,c.useRef)(p);return(0,c.useEffect)(()=>{if(p===0||O)return;let e=Date.now(),t=setTimeout(()=>n(i),k.current);return()=>{clearTimeout(t),k.current-=Date.now()-e}},[i,p,n,O]),(0,f.jsxs)(`div`,{ref:E,className:(0,l.default)(ve.toast,t?ve.toastBottom:null,ve[`toast-${_}`],s&&!w&&ve.toastDismissing,O&&ve.toastPaused,v?.root),style:y?.root,onMouseEnter:g?()=>x(!0):void 0,onMouseLeave:g?()=>x(!1):void 0,onFocus:g?()=>C(!0):void 0,onBlur:g?()=>C(!1):void 0,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:Te[_],className:(0,l.default)(ve.toastIcon,v?.icon),style:y?.icon}),(0,f.jsx)(`div`,{className:(0,l.default)(ve.toastContent,v?.content),style:y?.content,children:a}),h&&(0,f.jsx)(ce,{icon:d.faXmark,onClick:()=>n(i),className:(0,l.default)(ve.toastCloseButton,v?.closeButton),style:y?.closeButton,"aria-label":r.close}),m&&p>0&&(0,f.jsx)(`div`,{className:(0,l.default)(ve.toastProgressBar,v?.progressBar),style:{"--toast-duration":`${p}ms`,...y?.progressBar}})]})}var De=[];function Oe(e){De.length>0&&console.warn(`[Toast] More than one outermost AhroweProvider is mounted, and toasts show in only one of them. Keep one at the root and nest any other inside it.`),De.push(e)}function ke(e){let t=De.indexOf(e);t!==-1&&De.splice(t,1)}function Ae(e,t){let n=De[De.length-1];if(!n){console.error(`[Toast] No AhroweProvider found. Wrap your app in <AhroweProvider>.`);return}n(e,t)}var je={position:`top-right`,duration:4e3,showRemainingTime:!0,showCloseButton:!0,allowStacking:!0,pauseOnHover:!0,labels:{close:`Close`}},Me=220;function Ne(e){return ve[`container-${e}`]}function Pe({children:e,position:t=je.position,duration:n=je.duration,showRemainingTime:r=je.showRemainingTime,showCloseButton:i=je.showCloseButton,allowStacking:a=je.allowStacking,pauseOnHover:o=je.pauseOnHover,labels:s}){let[u,d]=(0,c.useState)([]),p=(0,c.useRef)(0),m=(0,c.useCallback)(e=>{d(t=>t.map(t=>t.id===e?{...t,dismissing:!0}:t)),setTimeout(()=>{d(t=>t.filter(t=>t.id!==e))},Me)},[]),h=(0,c.useCallback)((e,s)=>{let c={position:s?.position??t,duration:s?.duration??n,showRemainingTime:s?.showRemainingTime??r,showCloseButton:s?.showCloseButton??i,pauseOnHover:s?.pauseOnHover??o,type:s?.type??`default`,classNames:s?.classNames,styles:s?.styles};p.current+=1;let l={id:`toast-${p.current}`,content:e,options:c,dismissing:!1,labels:s?.labels};d(e=>!a&&e.length>0?(setTimeout(()=>{d([l])},Me),e.map(e=>({...e,dismissing:!0}))):[...e,l])},[t,n,r,i,a,o]),g=(0,c.useRef)(h);(0,c.useInsertionEffect)(()=>{g.current=h},[h]),(0,c.useInsertionEffect)(()=>{let e=(e,t)=>g.current(e,t);return Oe(e),()=>ke(e)},[]);let _=u.reduce((e,t)=>{let n=t.options.position;return e[n]||(e[n]=[]),e[n].push(t),e},{});return(0,f.jsxs)(f.Fragment,{children:[e,(0,f.jsx)(_e,{children:Object.entries(_).map(([e,t])=>(0,f.jsx)(`div`,{className:(0,l.default)(ve.container,Ne(e)),children:t.map(t=>(0,f.jsx)(Ee,{item:t,isBottom:e.startsWith(`bottom`),onDismiss:m,labels:{...je.labels,...s,...t.labels}},t.id))},e))})]})}var Q=()=>()=>{};function Fe({children:e,themes:t,currentThemeId:n,defaultProps:r,presentation:i,toast:a,scrollbars:o}){let s=(0,c.useContext)(ge)!==void 0,l=(0,c.useSyncExternalStore)(Q,()=>!0,()=>!1),[u]=(0,c.useState)(()=>typeof document>`u`?null:document.createElement(`div`)),d=(0,c.useCallback)(e=>{let t=e?.parentElement?.lastElementChild;t&&u&&u.parentNode!==t&&t.appendChild(u)},[u]),p=!s&&o!==!1;(0,c.useLayoutEffect)(()=>{if(!p||!u)return;let e=getComputedStyle(u).getPropertyValue(`--background-accent-light`).trim(),t=document.documentElement.style;return t.setProperty(`--ahrowe-page-scrollbar-thumb`,e),()=>{t.removeProperty(`--ahrowe-page-scrollbar-thumb`)}},[p,u,t,n]);let m=s&&(a!==void 0||o!==void 0);(0,c.useEffect)(()=>{m&&console.warn("[AhroweProvider] `toast` and `scrollbars` are read by the outermost AhroweProvider only. Set them there.")},[m]);let h=(0,f.jsxs)(ge.Provider,{value:l?u:null,children:[(0,f.jsx)(`template`,{ref:d}),(0,f.jsx)(Pe,{...a,children:e}),(0,f.jsx)(`div`,{})]});return(0,f.jsx)(E,{defaultProps:r,presentation:i,children:(0,f.jsx)(Z,{themes:t,currentThemeId:n,children:s?e:o===!1?h:(0,f.jsx)(Y,{children:h})})})}var Ie=function(e){return e.Default=`default`,e.Info=`info`,e.Success=`success`,e.Warn=`warn`,e.Error=`error`,e}({}),Le={alert:`alert_nX-Fv`,"alert-icon":`alert-icon_mzjuj`,alertIcon:`alert-icon_mzjuj`,"alert-content":`alert-content_-94Ey`,alertContent:`alert-content_-94Ey`,"alert-title":`alert-title_TqdRL`,alertTitle:`alert-title_TqdRL`,"alert-description":`alert-description_N5LkS`,alertDescription:`alert-description_N5LkS`,"alert-closeButton":`alert-closeButton_RQvYS`,alertCloseButton:`alert-closeButton_RQvYS`,"alert-style-default":`alert-style-default_KFyzb`,alertStyleDefault:`alert-style-default_KFyzb`,"alert-style-info":`alert-style-info_P-XG-`,alertStyleInfo:`alert-style-info_P-XG-`,"alert-style-success":`alert-style-success_zomWm`,alertStyleSuccess:`alert-style-success_zomWm`,"alert-style-warn":`alert-style-warn_jRYe5`,alertStyleWarn:`alert-style-warn_jRYe5`,"alert-style-error":`alert-style-error_Nk4As`,alertStyleError:`alert-style-error_Nk4As`},Re={[Ie.Default]:d.faBell,[Ie.Info]:d.faCircleInfo,[Ie.Success]:d.faCircleCheck,[Ie.Warn]:d.faTriangleExclamation,[Ie.Error]:d.faCircleXmark},ze={[Ie.Default]:Le.alertStyleDefault,[Ie.Info]:Le.alertStyleInfo,[Ie.Success]:Le.alertStyleSuccess,[Ie.Warn]:Le.alertStyleWarn,[Ie.Error]:Le.alertStyleError},Be={dismiss:`Dismiss`};function Ve(e){let{title:t,children:n=null,styleType:r=Ie.Default,icon:i,hideIcon:a=!1,onClose:o,className:s,style:c,classNames:u,styles:p,labels:m,...h}=D(`Alert`,e),g=O(`Alert`,m,Be);return(0,f.jsxs)(`div`,{...h,role:`alert`,className:(0,l.default)(Le.alert,ze[r],u?.root,s),style:{...c,...p?.root},children:[!a&&K(i??Re[r],{className:(0,l.default)(Le.alertIcon,u?.icon),style:p?.icon}),(0,f.jsxs)(`div`,{className:(0,l.default)(Le.alertContent,u?.content),style:p?.content,children:[t&&(0,f.jsx)(`div`,{className:(0,l.default)(Le.alertTitle,u?.title),style:p?.title,children:t}),n&&(0,f.jsx)(`div`,{className:(0,l.default)(Le.alertDescription,u?.description),style:p?.description,children:n})]}),o&&(0,f.jsx)(ce,{icon:d.faXmark,onClick:o,className:(0,l.default)(Le.alertCloseButton,u?.closeButton),style:p?.closeButton,"aria-label":g.dismiss})]})}var He={animatedLogo:`animatedLogo_7zZx1`,"animatedLogo-path":`animatedLogo-path_pP1g2`,animatedLogoPath:`animatedLogo-path_pP1g2`,"animatedLogo-pathLoop":`animatedLogo-pathLoop_i83B-`,animatedLogoPathLoop:`animatedLogo-pathLoop_i83B-`,animatedLogoRevealLoop:`animatedLogoRevealLoop_lH4zm`,"animatedLogo-pathOnce":`animatedLogo-pathOnce_gEYxA`,animatedLogoPathOnce:`animatedLogo-pathOnce_gEYxA`,animatedLogoRevealOnce:`animatedLogoRevealOnce_NEt2W`,"animatedLogo-pathLoopNoFill":`animatedLogo-pathLoopNoFill_M3ewW`,animatedLogoPathLoopNoFill:`animatedLogo-pathLoopNoFill_M3ewW`,animatedLogoRevealLoopNoFill:`animatedLogoRevealLoopNoFill_mfZJo`,"animatedLogo-pathOnceNoFill":`animatedLogo-pathOnceNoFill_hiqiK`,animatedLogoPathOnceNoFill:`animatedLogo-pathOnceNoFill_hiqiK`,animatedLogoRevealOnceNoFill:`animatedLogoRevealOnceNoFill_sdu0s`,"animatedLogo-spinLoop":`animatedLogo-spinLoop_Lfz9H`,animatedLogoSpinLoop:`animatedLogo-spinLoop_Lfz9H`,"animatedLogo-spinOnce":`animatedLogo-spinOnce_pXZUX`,animatedLogoSpinOnce:`animatedLogo-spinOnce_pXZUX`,"animatedLogo-scaleLoop":`animatedLogo-scaleLoop_yox9X`,animatedLogoScaleLoop:`animatedLogo-scaleLoop_yox9X`,"animatedLogo-scaleOnce":`animatedLogo-scaleOnce_ZNKV7`,animatedLogoScaleOnce:`animatedLogo-scaleOnce_ZNKV7`,animatedLogoRotateLoop:`animatedLogoRotateLoop_oPtfw`,animatedLogoRotateOnce:`animatedLogoRotateOnce_Ia1H1`,animatedLogoGrowLoop:`animatedLogoGrowLoop_lZjug`,animatedLogoGrowOnce:`animatedLogoGrowOnce_xHfCV`},Ue=`M 1.292 0.278 C -0.41 4.855 3.185 6.433 0.344 8.916 Q 3.923 10.712 5.361 14.001 Q 6.128 14.398 6.876 14.003 Q 8.439 10.632 11.86 8.912 C 8.893 6.387 12.578 5.159 10.86 0.255 Q 8.655 1.166 7.391 3.377 Q 6.092 2.93 4.843 3.38 Q 3.246 0.883 1.292 0.278 Z M 1.663 1.28 Q 2.413 1.635 3.195 2.718 Q 2.083 2.778 1.595 3.884 Q 1.309 2.7 1.663 1.28 M 3.802 7.908 Q 4.426 8.069 3.284 9.003 Q 3.824 9.32 4.557 10.141 Q 4.812 10.869 4.849 11.671 Q 4.371 10.09 2.642 9.144 Q 2.438 9.033 2.609 8.922 Q 3.229 8.537 3.802 7.908 M 8.469 7.927 Q 8.955 8.469 9.646 8.926 Q 9.791 9.032 9.647 9.136 Q 7.821 10.157 7.389 11.702 Q 7.464 10.869 7.709 10.119 Q 8.219 9.53 8.956 9.025 Q 7.81 7.927 8.469 7.927`,We=`0.244 0.155 11.72 14.25`;function Ge(e){let{path:t=Ue,viewBox:n=We,size:r=96,color:i,duration:a=4.2,loop:o=!0,fill:s=!0,spin:u=!1,scale:d=!1,className:p,style:m,classNames:h,styles:g,..._}=e,v=(0,c.useRef)(null),[y,b]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let e=v.current;if(!e)return;b(!1);let t=e.getTotalLength();e.style.setProperty(`--animated-logo-length`,String(t)),e.style.strokeDasharray=String(t),e.style.strokeDashoffset=String(t);let n=requestAnimationFrame(()=>b(!0));return()=>cancelAnimationFrame(n)},[t]);let x={animationDuration:`${a}s`,...i?{stroke:i,fill:i}:void 0,...g?.path};return(0,f.jsx)(`svg`,{..._,className:(0,l.default)(He.animatedLogo,p),style:{width:r,height:r,...m},viewBox:n,xmlns:`http://www.w3.org/2000/svg`,children:(0,f.jsx)(`g`,{className:(0,l.default)(y&&d&&(o?He.animatedLogoScaleLoop:He.animatedLogoScaleOnce)),style:{animationDuration:`${a}s`},children:(0,f.jsx)(`g`,{className:(0,l.default)(y&&u&&(o?He.animatedLogoSpinLoop:He.animatedLogoSpinOnce)),style:{animationDuration:`${a}s`},children:(0,f.jsx)(`path`,{ref:v,className:(0,l.default)(He.animatedLogoPath,y&&(o?s?He.animatedLogoPathLoop:He.animatedLogoPathLoopNoFill:s?He.animatedLogoPathOnce:He.animatedLogoPathOnceNoFill),h?.path),style:x,strokeWidth:.1,strokeLinejoin:`round`,strokeLinecap:`round`,d:t})})})})}var Ke=function(e){return e.RiseUp=`rise-up`,e.BlurIn=`blur-in`,e.Bounce=`bounce`,e.Typewriter=`typewriter`,e.Scramble=`scramble`,e.Glitch=`glitch`,e.Wave=`wave`,e.Shine=`shine`,e.Highlight=`highlight`,e}({}),qe=function(e){return e.Letter=`letter`,e.Word=`word`,e}({}),Je={animatedText:`animatedText_xkLRE`,"animatedText-visually-hidden":`animatedText-visually-hidden_N-uxP`,animatedTextVisuallyHidden:`animatedText-visually-hidden_N-uxP`,"animatedText-letter":`animatedText-letter_HBpbr`,animatedTextLetter:`animatedText-letter_HBpbr`,"animatedText-variant-rise-up":`animatedText-variant-rise-up_iZl7w`,animatedTextVariantRiseUp:`animatedText-variant-rise-up_iZl7w`,animatedTextRiseUp:`animatedTextRiseUp_4tb02`,"animatedText-variant-blur-in":`animatedText-variant-blur-in_TaxXd`,animatedTextVariantBlurIn:`animatedText-variant-blur-in_TaxXd`,animatedTextBlurIn:`animatedTextBlurIn_OPXmX`,"animatedText-variant-bounce":`animatedText-variant-bounce_1EWqT`,animatedTextVariantBounce:`animatedText-variant-bounce_1EWqT`,animatedTextBounceIn:`animatedTextBounceIn_R8l6K`,"animatedText-variant-glitch":`animatedText-variant-glitch_A-F8k`,animatedTextVariantGlitch:`animatedText-variant-glitch_A-F8k`,animatedTextGlitch:`animatedTextGlitch_tM2K9`,"animatedText-variant-wave":`animatedText-variant-wave_Wiv27`,animatedTextVariantWave:`animatedText-variant-wave_Wiv27`,animatedTextWave:`animatedTextWave_ztd68`,"animatedText-typewriter-letter":`animatedText-typewriter-letter_gAdNb`,animatedTextTypewriterLetter:`animatedText-typewriter-letter_gAdNb`,"animatedText-scramble-letter":`animatedText-scramble-letter_18T2z`,animatedTextScrambleLetter:`animatedText-scramble-letter_18T2z`,"animatedText-cursor":`animatedText-cursor_ns0l7`,animatedTextCursor:`animatedText-cursor_ns0l7`,"animatedText-cursor-blinking":`animatedText-cursor-blinking_IdVo3`,animatedTextCursorBlinking:`animatedText-cursor-blinking_IdVo3`,animatedTextCursorBlink:`animatedTextCursorBlink_MTiee`,"animatedText-shine":`animatedText-shine_VmmS9`,animatedTextShine:`animatedText-shine_VmmS9`,animatedTextShineSweep:`animatedTextShineSweep_-A864`,"animatedText-highlight":`animatedText-highlight_Bu-rP`,animatedTextHighlight:`animatedText-highlight_Bu-rP`,animatedTextHighlightSweep:`animatedTextHighlightSweep_e4-hF`};function Ye(){return typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}var Xe={[Ke.RiseUp]:Je.animatedTextVariantRiseUp,[Ke.BlurIn]:Je.animatedTextVariantBlurIn,[Ke.Bounce]:Je.animatedTextVariantBounce,[Ke.Glitch]:Je.animatedTextVariantGlitch};function Ze(e,t){return t===qe.Word?e.split(` `).filter(Boolean):Array.from(e)}function Qe({units:e,unit:t,staggerDelay:n,classNames:r,slotStyles:i}){let[a,o]=(0,c.useState)(()=>e.length===0?0:Ye()?e.length:1);(0,c.useEffect)(()=>{if(e.length<=1||Ye())return;let t=1,r=setInterval(()=>{t+=1,o(t),t>=e.length&&clearInterval(r)},n);return()=>clearInterval(r)},[e,n]);let s=a>=e.length;return(0,f.jsxs)(f.Fragment,{children:[e.slice(0,a).map((e,n)=>(0,f.jsxs)(c.Fragment,{children:[(0,f.jsx)(`span`,{className:(0,l.default)(Je.animatedTextTypewriterLetter,r?.letter),style:i?.letter,children:e}),t===qe.Word&&n<a-1?` `:null]},n)),(0,f.jsx)(`span`,{className:(0,l.default)(Je.animatedTextCursor,s&&Je.animatedTextCursorBlinking,r?.cursor),style:i?.cursor})]})}var $e=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%&*`,et=35;function tt(e){return Array.from({length:e},()=>$e[Math.floor(Math.random()*69)]).join(``)}function nt({units:e,unit:t,staggerDelay:n,classNames:r,slotStyles:i}){let[a]=(0,c.useState)(Ye),[o,s]=(0,c.useState)(0);(0,c.useEffect)(()=>{if(e.length===0||a)return;let t=0,r=Math.ceil(e.length*n/et)+1,i=setInterval(()=>{t+=1,s(t),t>=r&&clearInterval(i)},et);return()=>clearInterval(i)},[e,n,a]);let u=Math.min(e.length,Math.floor(o*et/n));return(0,f.jsx)(f.Fragment,{children:e.map((n,o)=>{let s=a||o<u;return(0,f.jsxs)(c.Fragment,{children:[(0,f.jsx)(`span`,{className:(0,l.default)(Je.animatedTextScrambleLetter,r?.letter),style:i?.letter,children:n===` `?` `:s?n:tt(n.length)}),t===qe.Word&&o<e.length-1?` `:null]},o)})})}function rt({text:e,variant:t=Ke.RiseUp,unit:n=qe.Letter,staggerDelay:r=40,duration:i,triggerOnView:a=!0,className:o,style:s,classNames:u,styles:d,...p}){let m=(0,c.useMemo)(()=>Ze(e,n),[e,n]),h=(0,c.useRef)(null),[g,_]=(0,c.useState)(()=>!a||typeof IntersectionObserver>`u`);(0,c.useEffect)(()=>{if(g)return;let e=h.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e?.isIntersecting&&(_(!0),t.disconnect())});return t.observe(e),()=>t.disconnect()},[g]);let v=`${t} ${e} ${n} ${r} ${i??``}`,y;if(!g)y=(0,f.jsx)(`span`,{"aria-hidden":`true`,style:{opacity:0},children:e});else if(t===Ke.Shine)y=(0,f.jsx)(`span`,{"aria-hidden":`true`,className:(0,l.default)(Je.animatedTextShine,u?.letter),style:{animationDuration:`${i??2e3}ms`,...d?.letter},children:e},v);else if(t===Ke.Highlight)y=(0,f.jsx)(`span`,{"aria-hidden":`true`,className:(0,l.default)(Je.animatedTextHighlight,u?.letter),style:{animationDuration:`${i??600}ms`,...d?.letter},children:e},v);else if(t===Ke.Typewriter)y=(0,f.jsx)(`span`,{"aria-hidden":`true`,children:(0,f.jsx)(Qe,{units:m,unit:n,staggerDelay:r,classNames:u,slotStyles:d})},v);else if(t===Ke.Scramble)y=(0,f.jsx)(`span`,{"aria-hidden":`true`,children:(0,f.jsx)(nt,{units:m,unit:n,staggerDelay:r,classNames:u,slotStyles:d})},v);else if(t===Ke.Wave)y=(0,f.jsx)(`span`,{"aria-hidden":`true`,children:m.map((e,t)=>(0,f.jsxs)(c.Fragment,{children:[(0,f.jsx)(`span`,{className:(0,l.default)(Je.animatedTextLetter,Je.animatedTextVariantWave,u?.letter),style:{animationDelay:`-${t*r}ms`,animationDuration:`${i??1200}ms`,...d?.letter},children:e===` `?` `:e}),n===qe.Word&&t<m.length-1?` `:null]},t))},v);else{let e=Xe[t]??Je.animatedTextVariantRiseUp;y=(0,f.jsx)(`span`,{"aria-hidden":`true`,children:m.map((t,a)=>(0,f.jsxs)(c.Fragment,{children:[(0,f.jsx)(`span`,{className:(0,l.default)(Je.animatedTextLetter,e,u?.letter),style:{animationDelay:`${a*r}ms`,animationDuration:`${i??500}ms`,...d?.letter},children:t===` `?` `:t}),n===qe.Word&&a<m.length-1?` `:null]},a))},v)}return(0,f.jsxs)(`span`,{...p,ref:h,className:(0,l.default)(Je.animatedText,o),style:s,children:[(0,f.jsx)(`span`,{className:Je.animatedTextVisuallyHidden,children:e}),y]})}var it=function(e){return e.Default=`default`,e.Primary=`primary`,e.Success=`success`,e.Info=`info`,e.Warn=`warn`,e.Error=`error`,e}({}),at=function(e){return e.TopRight=`top-right`,e.TopLeft=`top-left`,e.BottomRight=`bottom-right`,e.BottomLeft=`bottom-left`,e}({}),ot={wrapper:`wrapper_bcGTc`,badge:`badge_mj0fB`,"badge-dot":`badge-dot_TFLNc`,badgeDot:`badge-dot_TFLNc`,"badge-position-top-right":`badge-position-top-right_ZqWIX`,badgePositionTopRight:`badge-position-top-right_ZqWIX`,"badge-position-top-left":`badge-position-top-left_c-tJc`,badgePositionTopLeft:`badge-position-top-left_c-tJc`,"badge-position-bottom-right":`badge-position-bottom-right_7JuZ-`,badgePositionBottomRight:`badge-position-bottom-right_7JuZ-`,"badge-position-bottom-left":`badge-position-bottom-left_nsuJP`,badgePositionBottomLeft:`badge-position-bottom-left_nsuJP`,"badge-overlay":`badge-overlay_Xs19S`,badgeOverlay:`badge-overlay_Xs19S`,"badge-style-default":`badge-style-default_E32XE`,badgeStyleDefault:`badge-style-default_E32XE`,"badge-style-primary":`badge-style-primary_x1J3r`,badgeStylePrimary:`badge-style-primary_x1J3r`,"badge-style-success":`badge-style-success_LK3u0`,badgeStyleSuccess:`badge-style-success_LK3u0`,"badge-style-info":`badge-style-info_48nNP`,badgeStyleInfo:`badge-style-info_48nNP`,"badge-style-warn":`badge-style-warn_0PIRu`,badgeStyleWarn:`badge-style-warn_0PIRu`,"badge-style-error":`badge-style-error_5RoOd`,badgeStyleError:`badge-style-error_5RoOd`},st={[it.Default]:ot.badgeStyleDefault,[it.Primary]:ot.badgeStylePrimary,[it.Success]:ot.badgeStyleSuccess,[it.Info]:ot.badgeStyleInfo,[it.Warn]:ot.badgeStyleWarn,[it.Error]:ot.badgeStyleError},ct={[at.TopRight]:ot.badgePositionTopRight,[at.TopLeft]:ot.badgePositionTopLeft,[at.BottomRight]:ot.badgePositionBottomRight,[at.BottomLeft]:ot.badgePositionBottomLeft};function lt(e){let{count:t,max:n=99,content:r,dot:i=!1,showZero:a=!1,styleType:o=it.Primary,position:s=at.TopRight,children:c=null,className:u,style:d,classNames:p,styles:m,...h}=D(`Badge`,e),g=typeof t==`number`,_=r!=null,v=(i||_||g)&&!(!i&&!_&&g&&t===0&&!a),y=_?r:g?t>n?`${n}+`:t:null,b=c!=null;return(0,f.jsxs)(`span`,{...h,className:(0,l.default)(ot.wrapper,u),style:d,children:[c,v&&(0,f.jsx)(`span`,{className:(0,l.default)(ot.badge,st[o],i&&ot.badgeDot,b&&ot.badgeOverlay,b&&ct[s],p?.badge),style:m?.badge,children:!i&&y})]})}var ut={avatar:`avatar_lCAOD`,"avatar-image":`avatar-image_RMyzx`,avatarImage:`avatar-image_RMyzx`,"avatar-fallback":`avatar-fallback_RaZB6`,avatarFallback:`avatar-fallback_RaZB6`,"avatar-status-badge":`avatar-status-badge_eKMvH`,avatarStatusBadge:`avatar-status-badge_eKMvH`,avatarGroup:`avatarGroup_xkRyd`,"avatarGroup-item":`avatarGroup-item_8DIPO`,avatarGroupItem:`avatarGroup-item_8DIPO`},dt={online:it.Success,away:it.Warn,busy:it.Error,offline:it.Default};function ft(e){if(!e)return``;let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?``:t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()}function pt({src:e,alt:t,name:n,icon:r=d.faUser,content:i,status:a,className:o,style:s,classNames:u,styles:p,...m}){let[h,g]=(0,c.useState)(!1),[_,v]=(0,c.useState)(e);e!==_&&(v(e),g(!1));let y=ft(n),b=e&&!h?(0,f.jsx)(`img`,{className:(0,l.default)(ut.avatarImage,u?.image),style:p?.image,src:e,alt:t??n??``,onError:()=>g(!0)}):(0,f.jsx)(`span`,{className:(0,l.default)(ut.avatarFallback,u?.fallback),style:p?.fallback,children:i??(y||K(r))});return a?(0,f.jsx)(lt,{...m,dot:!0,position:at.BottomRight,styleType:dt[a],className:o,style:s,classNames:{badge:(0,l.default)(ut.avatarStatusBadge,u?.status)},styles:{badge:p?.status},children:(0,f.jsx)(`span`,{className:ut.avatar,children:b})}):(0,f.jsx)(`span`,{...m,className:(0,l.default)(ut.avatar,o),style:s,children:b})}function mt({children:e,max:t,className:n,style:r,classNames:i,styles:a,...o}){let s=c.Children.toArray(e),u=t==null?s:s.slice(0,t),d=t==null?0:s.length-t;return(0,f.jsxs)(`span`,{...o,className:(0,l.default)(ut.avatarGroup,n),style:r,children:[u.map((e,t)=>(0,f.jsx)(`span`,{className:(0,l.default)(ut.avatarGroupItem,i?.item),style:a?.item,children:e},t)),d>0&&(0,f.jsx)(`span`,{className:(0,l.default)(ut.avatarGroupItem,i?.overflow),style:a?.overflow,children:(0,f.jsx)(pt,{content:`+${d}`})})]})}var ht={popover:`popover_hhmvN`,"popover-trigger":`popover-trigger_R4ckf`,popoverTrigger:`popover-trigger_R4ckf`,"popover-floating":`popover-floating_mhXrQ`,popoverFloating:`popover-floating_mhXrQ`,"popover-panel":`popover-panel_tVB2k`,popoverPanel:`popover-panel_tVB2k`,"popover-panel-constrained":`popover-panel-constrained_DFXWP`,popoverPanelConstrained:`popover-panel-constrained_DFXWP`,popoverIn:`popoverIn_nKOqX`,"popover-arrow":`popover-arrow_B8kB-`,popoverArrow:`popover-arrow_B8kB-`},gt={sheet:`sheet_cfS92`,sheetSlideIn:`sheetSlideIn_wF6l0`,"sheet-surface":`sheet-surface_-vvdd`,sheetSurface:`sheet-surface_-vvdd`,"sheet-panel":`sheet-panel_HPJjL sheet-surface_-vvdd`,sheetPanel:`sheet-panel_HPJjL sheet-surface_-vvdd`,"sheet-scroll":`sheet-scroll_nda2p`,sheetScroll:`sheet-scroll_nda2p`,"sheet-backdrop":`sheet-backdrop_B-S70`,sheetBackdrop:`sheet-backdrop_B-S70`,sheetBackdropFadeIn:`sheetBackdropFadeIn_MJUJq`},_t=[`pointerdown`,`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`];function vt({onClose:e,className:t,style:n}){let r=(0,c.useRef)(null);return(0,c.useEffect)(()=>{let e=r.current;if(!e)return;let t=e=>e.stopPropagation();return _t.forEach(n=>e.addEventListener(n,t)),()=>_t.forEach(n=>e.removeEventListener(n,t))},[]),(0,f.jsx)(`div`,{ref:r,className:(0,l.default)(gt.sheetBackdrop,t),style:n,onClick:t=>{t.stopPropagation(),e()}})}function yt(e){let t=[],n=e.parentElement;for(;n&&n!==document.body&&n!==document.documentElement;){let e=getComputedStyle(n);(e.overflowX!==`visible`||e.overflowY!==`visible`)&&t.push(n),n=n.parentElement}return t}function bt(e,t){return t.some(t=>{let n=t.getBoundingClientRect();return e.bottom<=n.top||e.top>=n.bottom||e.right<=n.left||e.left>=n.right})}function xt(e){let t=e?.parentElement??null;for(;t&&t!==document.body;){let{overflowY:e}=getComputedStyle(t);if(e===`auto`||e===`scroll`||e===`overlay`)return t;t=t.parentElement}return null}function St(){let e=typeof window<`u`?window.visualViewport:null;return e?{left:e.offsetLeft,top:e.offsetTop,width:e.width,height:e.height}:{left:0,top:0,width:typeof window<`u`?window.innerWidth:0,height:typeof window<`u`?window.innerHeight:0}}function Ct({isOpen:e,triggerRef:t,elementRefs:n,update:r,resizeRefs:i,teardown:a,deps:o=[]}){let s=(0,c.useRef)({elementRefs:n,update:r,resizeRefs:i,teardown:a});s.current={elementRefs:n,update:r,resizeRefs:i,teardown:a},(0,c.useLayoutEffect)(()=>{if(!e)return;let n,r;function i(){let e=t.current,a=s.current.elementRefs;if(!e||a.some(e=>!e.current)){n=requestAnimationFrame(i);return}let o=yt(e),c=new ResizeObserver(()=>d()),l=new Set,u=!0;function d(){u&&(s.current.update(e,o,d),s.current.resizeRefs?.forEach(({current:e})=>{e&&!l.has(e)&&(l.add(e),c.observe(e))}))}d();let f=[window,...o];f.forEach(e=>e.addEventListener(`scroll`,d,{passive:!0})),window.addEventListener(`resize`,d),window.visualViewport?.addEventListener(`resize`,d),window.visualViewport?.addEventListener(`scroll`,d);function p(t){t.target.contains(e)&&d()}document.addEventListener(`transitionend`,p,!0),document.addEventListener(`animationend`,p,!0),r=()=>{u=!1,f.forEach(e=>e.removeEventListener(`scroll`,d)),window.removeEventListener(`resize`,d),window.visualViewport?.removeEventListener(`resize`,d),window.visualViewport?.removeEventListener(`scroll`,d),document.removeEventListener(`transitionend`,p,!0),document.removeEventListener(`animationend`,p,!0),c.disconnect(),s.current.teardown?.()}}return i(),()=>{n!==void 0&&cancelAnimationFrame(n),r?.()}},[e,t,...o])}var wt=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({}),Tt=function(e){return e.Start=`start`,e.Center=`center`,e.End=`end`,e}({}),Et=function(e){return e.Click=`click`,e.Hover=`hover`,e.Focus=`focus`,e}({}),Dt={[wt.Top]:`bottom`,[wt.Bottom]:`top`,[wt.Left]:`right`,[wt.Right]:`left`},Ot=8,kt=160,At=3;function jt(e){let t=e;for(let e=0;e<=At;e++){let e=t.getBoundingClientRect();if(e.width>0||e.height>0)return{element:t,rect:e};let n=t.firstElementChild;if(!n)break;t=n}return{element:null,rect:e.getBoundingClientRect()}}var Mt;function Nt(){if(Mt!==void 0)return Mt;if(typeof CSS>`u`||!CSS.supports?.(`top: anchor(top, 0px)`))return Mt=!1;let e=document.createElement(`div`);e.style.cssText=`position: fixed; top: 0; left: 0; transform: translateY(100px); visibility: hidden`;let t=document.createElement(`div`);t.style.cssText=`anchor-name: --popover-probe; width: 1px; height: 1px`;let n=document.createElement(`div`);return n.style.cssText=`position: fixed; position-anchor: --popover-probe; top: anchor(top, 0px); left: 0; visibility: hidden`,e.append(t),document.body.append(e,n),Mt=Math.abs(n.getBoundingClientRect().top-t.getBoundingClientRect().top)<1,e.remove(),n.remove(),Mt}function Pt(e){return e.style.getPropertyValue(`anchor-name`).split(`,`).map(e=>e.trim()).filter(e=>e&&e!==`none`)}function Ft(e,t){let n=Pt(e);n.includes(t)||e.style.setProperty(`anchor-name`,[...n,t].join(`, `))}function It(e,t){let n=Pt(e).filter(e=>e!==t);n.length>0?e.style.setProperty(`anchor-name`,n.join(`, `)):e.style.removeProperty(`anchor-name`)}var Lt=[`transform`,`translate`,`scale`,`rotate`],Rt=1e3;function zt(e){return(document.getAnimations?.()??[]).filter(t=>{if(t.playState!==`running`||!(t.effect instanceof KeyframeEffect))return!1;let{target:n,pseudoElement:r}=t.effect;if(!n||r||n===e||!n.contains(e))return!1;let{endTime:i,localTime:a}=t.effect.getComputedTiming();return Number(i)-Number(a)>Rt?!1:t.effect.getKeyframes().some(e=>Lt.some(t=>t in e))})}function Bt(e,t,n,r){return r?`calc(anchor(${e}, ${n}px) + ${t-n}px)`:`${t}px`}function Vt({isOpen:e,placement:t,align:n,offset:r,triggerRef:i,floatingRef:a,panelRef:o,arrowRef:s,matchTriggerWidth:l=!1,shrinkToFit:u=!1,onShown:d}){let f=`--popover-${(0,c.useId)().replace(/[^\w-]/g,``)}`,p=(0,c.useRef)(null),m=(0,c.useRef)(null),h=(0,c.useRef)(new WeakMap);function g(e){p.current!==e&&(p.current&&It(p.current,f),e&&Ft(e,f),p.current=e)}Ct({isOpen:e,triggerRef:i,elementRefs:[a,o],resizeRefs:[o],deps:[t,n,r,a,o,s,l,u],update:(e,i,c)=>{let p=a.current,_=o.current;if(!p||!_)return;let{element:v,rect:y}=jt(e),b=v!==null&&Nt();g(b?v:null),b?p.style.setProperty(`position-anchor`,f):p.style.removeProperty(`position-anchor`),l?_.style.minWidth=`${y.width}px`:_.style.removeProperty(`min-width`),u&&_.style.removeProperty(`max-width`);let{width:x,height:S}=p.getBoundingClientRect(),C=St(),w=t===wt.Top||t===wt.Bottom;if(u&&w){let e=n===Tt.End?y.right-(C.left+Ot):n===Tt.Start?C.left+C.width-Ot-y.left:C.width-16,t=Math.min(e,C.width-16);x>t&&t>=kt&&(_.style.maxWidth=`${t}px`,{width:x,height:S}=p.getBoundingClientRect())}let T={top:y.top-C.top,bottom:C.top+C.height-y.bottom,left:y.left-C.left,right:C.left+C.width-y.right},E=t===wt.Top||t===wt.Bottom?S:x,D=t,O=Dt[t];T[D]<E+r&&T[O]>T[D]&&(D=O);let k=D===`top`||D===`bottom`,A,j;D===`bottom`?A=y.bottom+r:D===`top`?A=y.top-r-S:j=D===`right`?y.right+r:y.left-r-x;let M=!1,N=!1;if(k){j=n===Tt.Start?y.left:n===Tt.End?y.right-x:y.left+y.width/2-x/2;let e=Math.max(C.left+Ot,Math.min(j,C.left+C.width-x-Ot));M=e!==j,j=e}else{A=n===Tt.Start?y.top:n===Tt.End?y.bottom-S:y.top+y.height/2-S/2;let e=Math.max(C.top+Ot,Math.min(A,C.top+C.height-S-Ot));N=e!==A,A=e}p.style.top=Bt(`top`,A,y.top,b&&!N),p.style.left=Bt(`left`,j,y.left,b&&!M);let P=m.current!==_,F=P?zt(e):[];F.forEach(e=>{h.current.get(e)!==c&&(h.current.set(e,c),e.finished.then(c,c))});let I=bt(y,i)||F.length>0;p.style.visibility=I?`hidden`:`visible`,!I&&P&&(m.current=_,_.getAnimations?.().forEach(e=>{e.currentTime=0}),d?.()),p.dataset.placement=D;let L=s.current;if(L){let e=L.offsetWidth/2||5;if(k){let t=y.left+y.width/2-j;L.style.setProperty(`--arrow-x`,`${Math.max(e+2,Math.min(t,x-e-2))}px`),L.style.removeProperty(`--arrow-y`)}else{let t=y.top+y.height/2-A;L.style.setProperty(`--arrow-y`,`${Math.max(e+2,Math.min(t,S-e-2))}px`),L.style.removeProperty(`--arrow-x`)}}},teardown:()=>{g(null);let e=a.current;if(!e)return;e.style.top=``,e.style.left=``,e.style.visibility=``,e.style.removeProperty(`position-anchor`);let t=o.current;t?.style.removeProperty(`min-width`),t?.style.removeProperty(`max-width`)}})}var Ht=[`a[href]`,`area[href]`,`button:not([disabled])`,`input:not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`,`[contenteditable="true"]`].join(`,`);function Ut(e){return e?Array.from(e.querySelectorAll(Ht)).filter(e=>e.getAttribute(`tabindex`)!==`-1`):[]}function Wt(e){return e.matches(Ht)&&e.getAttribute(`tabindex`)!==`-1`}function Gt({triggerRef:e,contentRef:t}){function n(){let t=e.current;return t&&Wt(t)?t:Ut(t)[0]??t}function r(){n()?.focus()}function i(){let e=n(),r=e?.closest(`[aria-modal="true"]`),i=Ut(r??document.body).filter(e=>!t.current?.contains(e)),a=e?i.indexOf(e):-1;a<0||(i[a+1]??(r?i[0]:void 0))?.focus()}return{firstTriggerFocusable:n,restoreFocusToTrigger:r,focusAfterTrigger:i}}function Kt(){let[e,t]=(0,c.useState)(()=>{let e=St();return{height:e.height,offsetTop:e.top}});return(0,c.useEffect)(()=>{let e=window.visualViewport;if(!e)return;function n(){let e=St();t({height:e.height,offsetTop:e.top})}return n(),e.addEventListener(`resize`,n),e.addEventListener(`scroll`,n),()=>{e.removeEventListener(`resize`,n),e.removeEventListener(`scroll`,n)}},[]),e}var qt=`(max-width: 767px)`,Jt=8;function Yt(e=A.Default){let t=xe(),n=be(qt),{height:r,offsetTop:i}=Kt();return e===A.Sheet||e===A.Auto&&t&&n?{isSheet:!0,sheetStyle:{bottom:typeof window>`u`?0:Math.max(0,window.innerHeight-(i+r)),"--sheet-available-height":`${Math.max(0,r-Jt)}px`}}:{isSheet:!1,sheetStyle:void 0}}function Xt({isActive:e,containerRef:t,onEscape:n,trapFocus:r=!0,lockScroll:i=!0}){let a=(0,c.useRef)(n);(0,c.useEffect)(()=>{a.current=n});let o=(0,c.useRef)(0);e&&o.current===0&&(o.current=Zt++),!e&&o.current!==0&&(o.current=0),(0,c.useEffect)(()=>{if(!e)return;let n=o.current;Qt.set(n,{trapFocus:r,containerRef:t});let s=()=>n===Math.max(...Qt.keys()),c=()=>[...Qt].filter(([e])=>e>n).map(([,e])=>e),l=document.activeElement;if(r){let e=t.current;(Ut(e)[0]??e)?.focus()}function u(e){if(e.key===`Escape`&&a.current&&s()){e.preventDefault(),a.current();return}if(e.key!==`Tab`||!r||e.defaultPrevented)return;let n=c();if(n.some(e=>e.trapFocus)||n.some(e=>e.containerRef.current?.contains(document.activeElement)))return;let i=Ut(t.current);if(i.length===0){e.preventDefault();return}let o=i[0],l=i[i.length-1],u=document.activeElement;t.current?.contains(u)?!e.shiftKey&&u===l?(e.preventDefault(),o.focus()):e.shiftKey&&u===o&&(e.preventDefault(),l.focus()):(e.preventDefault(),o.focus())}let d=new Set,f=e=>e.code||e.key;function p(e){e.repeat?!d.has(f(e))&&t.current?.contains(e.target)&&(e.preventDefault(),e.stopPropagation()):d.add(f(e))}function m(e){d.delete(f(e))}return window.addEventListener(`keydown`,u),window.addEventListener(`keydown`,p,!0),window.addEventListener(`keyup`,m,!0),i&&nn(),()=>{window.removeEventListener(`keydown`,u),window.removeEventListener(`keydown`,p,!0),window.removeEventListener(`keyup`,m,!0),i&&rn();let e=c().length>0;Qt.delete(n),r&&!e&&l?.focus()}},[e,r,i,t])}var Zt=1,Qt=new Map,$t=0,en=``,tn=``;function nn(){let{body:e}=document;if($t===0){en=e.style.overflow,tn=e.style.paddingRight;let t=window.innerWidth-document.documentElement.clientWidth;if(t>0){let n=parseFloat(window.getComputedStyle(e).paddingRight)||0;e.style.paddingRight=`${n+t}px`}e.style.overflow=`hidden`}$t+=1}function rn(){--$t,!($t>0)&&($t=0,document.body.style.overflow=en,document.body.style.paddingRight=tn)}var an=1e3;function on(e,t){return e?{current:e}:t}function sn(e){let{children:t=null,anchor:n,content:r=null,placement:i=wt.Bottom,align:a=Tt.Center,trigger:o=Et.Click,isOpen:s,defaultOpen:u=!1,onOpenChange:d=()=>{},offset:p=10,withArrow:m=!0,closeOnOutsideClick:h=!0,closeOnEscape:g=!0,openDelay:_=100,closeDelay:v=120,disabled:y=!1,focusOnOpen:b=`keyboard`,closeOnTriggerClick:x=!0,width:S=`auto`,constrainWidth:C=!0,presentation:w,className:T,style:E,classNames:O,styles:j,...M}=D(`Popover`,e),N=(0,c.useRef)(null),P=(0,c.useRef)(null),F=(0,c.useRef)(null),I=(0,c.useRef)(null),L=(0,c.useRef)(void 0),R=(0,c.useRef)(!1),z=(0,c.useRef)(!1),B=(0,c.useRef)(!1),V=(0,c.useRef)(null);function H(){R.current=!0}function U(e){H(),V.current=e.target}let[W,G]=(0,c.useState)(()=>({anchor:n,ref:on(n,N)}));W.anchor!==n&&G({anchor:n,ref:on(n,N)});let ee=W.ref,K=(0,c.useRef)(null),te=n!==void 0;(0,c.useEffect)(()=>{if(!te)return;function e(e){K.current={target:e.target,keyboard:e.detail===0,time:performance.now()}}return document.addEventListener(`click`,e,!0),()=>document.removeEventListener(`click`,e,!0)},[te]);let q=s!==void 0,[ne,J]=(0,c.useState)(u),re=q?s:ne,ie=(0,c.useRef)(d);(0,c.useEffect)(()=>{ie.current=d});let ae=(0,c.useCallback)((e,t=!1)=>{y&&e||(e&&(B.current=t),q||J(e),ie.current(e,{fromKeyboard:t}))},[y,q]),oe=k(),{isSheet:se,sheetStyle:ce}=Yt(w??oe??A.Default),le=se&&o===Et.Click,ue=(0,c.useRef)(!1),Y=(0,c.useRef)(!1);function de(){Y.current=!1;let e=Ut(F.current);e.length!==0&&(P.current?.setAttribute(`role`,`dialog`),e[0].focus())}Vt({isOpen:!!re&&!le,placement:i,align:a,offset:p,triggerRef:ee,floatingRef:P,panelRef:F,arrowRef:m?I:{current:null},matchTriggerWidth:S===`trigger`,onShown:()=>{ue.current=!0,Y.current&&de()}});let{restoreFocusToTrigger:fe,focusAfterTrigger:pe}=Gt({triggerRef:ee,contentRef:P}),me=(0,c.useRef)(fe);(0,c.useEffect)(()=>{me.current=fe});let X=(0,c.useRef)(!1),Z=(0,c.useCallback)(e=>{if(P.current=e,X.current=!1,e)return()=>{P.current=null;let t=document.activeElement;X.current=!!t&&(e.contains(t)||t===V.current)}},[]);(0,c.useEffect)(()=>{if(re||!X.current)return;X.current=!1;let e=document.activeElement;(!e||e===document.body)&&me.current()},[re]),Xt({isActive:!!re,containerRef:F,onEscape:g?()=>{P.current?.contains(document.activeElement)&&fe(),ae(!1,!0)}:void 0,trapFocus:!1,lockScroll:le}),(0,c.useEffect)(()=>{if(!re){B.current=!1,ue.current=!1,Y.current=!1;return}let e=K.current;K.current=null;let t=!!n&&!!e?.keyboard&&n.contains(e.target)&&performance.now()-e.time<an;(b===!0||b===`keyboard`&&(B.current||t))&&o===Et.Click&&(ue.current?de():Y.current=!0)},[re,o,b,n]);function he(e){if(e.key!==`Tab`||o!==Et.Click)return;let t=Ut(F.current);if(t.length===0)return;let n=document.activeElement;!e.shiftKey&&n===t[t.length-1]?(e.preventDefault(),pe(),ae(!1,!0)):e.shiftKey&&n===t[0]&&(e.preventDefault(),fe(),ae(!1,!0))}(0,c.useEffect)(()=>{if(!re)return;R.current=!1,z.current=!1;function e(e){return!!(P.current?.contains(e)||N.current?.contains(e)||ee.current?.contains(e))}function t(t){let n=R.current;return R.current=!1,n||e(t.target)}function n(e){z.current=!t(e)}function r(e){let n=z.current;z.current=!1,!t(e)&&n&&ae(!1)}function i(n){if(t(n))return;let r=n.relatedTarget;r&&(r===V.current||e(r))&&ae(!1,!z.current)}return h&&o!==Et.Hover&&(window.addEventListener(`mousedown`,n),window.addEventListener(`mouseup`,r),document.addEventListener(`focusin`,i)),()=>{window.removeEventListener(`mousedown`,n),window.removeEventListener(`mouseup`,r),document.removeEventListener(`focusin`,i)}},[re,h,o,ae,ee]),(0,c.useEffect)(()=>()=>clearTimeout(L.current),[]);function ge(e){clearTimeout(L.current),L.current=setTimeout(()=>ae(e),e?_:v)}function ve(e){re||e.key!==`ArrowDown`&&e.key!==`ArrowUp`||(e.preventDefault(),ae(!0,!0))}let ye=o===Et.Click?{onClick:e=>{(!re||x)&&ae(!re,e.detail===0)},onKeyDown:ve}:o===Et.Hover?{onMouseEnter:()=>ge(!0),onMouseLeave:()=>ge(!1)}:{onFocus:()=>ae(!0),onBlur:()=>ae(!1)},be=o===Et.Hover?{onMouseEnter:()=>ge(!0),onMouseLeave:()=>ge(!1)}:{};return(0,f.jsxs)(`div`,{...M,className:(0,l.default)(ht.popover,T,O?.root),style:{...E,...j?.root},children:[(0,f.jsx)(`div`,{ref:N,className:(0,l.default)(ht.popoverTrigger,O?.trigger),style:j?.trigger,...ye,children:t}),re&&(0,f.jsxs)(_e,{children:[le&&(0,f.jsx)(vt,{onClose:()=>{h&&ae(!1)},className:O?.backdrop,style:j?.backdrop}),(0,f.jsxs)(`div`,{ref:Z,className:(0,l.default)(le?gt.sheet:ht.popoverFloating,O?.floating),style:{...le?ce:void 0,...j?.floating},"data-placement":i,onKeyDown:he,onMouseDownCapture:H,onMouseUpCapture:H,onFocusCapture:U,...be,children:[(0,f.jsx)(`div`,{ref:F,className:(0,l.default)(ht.popoverPanel,C&&ht.popoverPanelConstrained,le&&gt.sheetPanel,O?.panel),style:j?.panel,children:r}),m&&!le&&(0,f.jsx)(`div`,{ref:I,className:(0,l.default)(ht.popoverArrow,O?.arrow),style:j?.arrow})]})]})]})}var cn={breadcrumb:`breadcrumb_yQM0Q`,"breadcrumb-list":`breadcrumb-list_2ah0w`,breadcrumbList:`breadcrumb-list_2ah0w`,"breadcrumb-item":`breadcrumb-item_gBLc-`,breadcrumbItem:`breadcrumb-item_gBLc-`,"breadcrumb-icon":`breadcrumb-icon_wFm8s`,breadcrumbIcon:`breadcrumb-icon_wFm8s`,"breadcrumb-link":`breadcrumb-link_eBWl3`,breadcrumbLink:`breadcrumb-link_eBWl3`,"breadcrumb-link-disabled":`breadcrumb-link-disabled_Ca-E6`,breadcrumbLinkDisabled:`breadcrumb-link-disabled_Ca-E6`,"breadcrumb-current":`breadcrumb-current_8tlun`,breadcrumbCurrent:`breadcrumb-current_8tlun`,"breadcrumb-separator":`breadcrumb-separator_akfqn`,breadcrumbSeparator:`breadcrumb-separator_akfqn`,"breadcrumb-ellipsis":`breadcrumb-ellipsis_6fvn8`,breadcrumbEllipsis:`breadcrumb-ellipsis_6fvn8`,"breadcrumb-hiddenPanel":`breadcrumb-hiddenPanel_mb7xd`,breadcrumbHiddenPanel:`breadcrumb-hiddenPanel_mb7xd`,"breadcrumb-hiddenList":`breadcrumb-hiddenList_5reEH`,breadcrumbHiddenList:`breadcrumb-hiddenList_5reEH`,"breadcrumb-hiddenItem":`breadcrumb-hiddenItem_ZGRnB`,breadcrumbHiddenItem:`breadcrumb-hiddenItem_ZGRnB`},ln={showHidden:`Show hidden breadcrumbs`};function un(e,t){let n=e.map((e,t)=>({item:e,index:t}));if(!t||e.length<=t)return{leading:n,hidden:[],trailing:[]};let r=Math.max(1,t-2),i=e.length-1-r;return i<=0?{leading:n,hidden:[],trailing:[]}:{leading:n.slice(0,1),hidden:n.slice(1,1+i),trailing:n.slice(1+i)}}function dn(e){let{items:t=[],separator:n,maxItems:r,"aria-label":i=`Breadcrumb`,className:a,style:o,classNames:s,styles:p,labels:m,...h}=D(`Breadcrumb`,e),g=O(`Breadcrumb`,m,ln),[_,v]=(0,c.useState)(!1),{leading:y,hidden:b,trailing:x}=un(t,r),S=t.length-1;function C(e){return e===S?null:(0,f.jsx)(`span`,{className:(0,l.default)(cn.breadcrumbSeparator,s?.separator),style:p?.separator,children:n??(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronRight})})}function w({item:e,index:t}){return(0,f.jsxs)(`li`,{className:(0,l.default)(cn.breadcrumbItem,s?.item),style:p?.item,children:[fn(e,t===S,cn,s,p),C(t)]},e.id??t)}return(0,f.jsx)(`nav`,{...h,"aria-label":i,className:(0,l.default)(cn.breadcrumb,s?.root,a),style:{...o,...p?.root},children:(0,f.jsxs)(`ol`,{className:(0,l.default)(cn.breadcrumbList,s?.list),style:p?.list,children:[y.map(w),b.length>0&&(0,f.jsxs)(`li`,{className:(0,l.default)(cn.breadcrumbItem,s?.item),style:p?.item,children:[(0,f.jsx)(sn,{isOpen:_,onOpenChange:v,placement:wt.Bottom,align:Tt.Start,constrainWidth:!1,classNames:{panel:cn.breadcrumbHiddenPanel},content:(0,f.jsx)(`ul`,{className:(0,l.default)(cn.breadcrumbHiddenList,s?.hiddenList),style:p?.hiddenList,children:b.map(({item:e,index:t})=>(0,f.jsx)(`li`,{className:(0,l.default)(cn.breadcrumbHiddenItem,s?.hiddenItem),style:p?.hiddenItem,children:fn({...e,onClick:t=>{e.onClick?.(t),v(!1)}},!1,cn,s,p)},e.id??t))}),children:(0,f.jsx)(ce,{icon:d.faEllipsis,title:g.showHidden,"aria-label":g.showHidden,"aria-expanded":_,className:(0,l.default)(cn.breadcrumbEllipsis,s?.ellipsis),style:p?.ellipsis})}),C(b[b.length-1].index)]}),x.map(w)]})})}function fn(e,t,n,r,i){let a=(0,f.jsxs)(f.Fragment,{children:[e.icon?K(e.icon,{className:(0,l.default)(n.breadcrumbIcon,r?.icon),style:i?.icon}):null,e.label]});return t?(0,f.jsx)(`span`,{"aria-current":`page`,className:(0,l.default)(n.breadcrumbCurrent,r?.current),style:i?.current,children:a}):e.disabled?(0,f.jsx)(`span`,{className:(0,l.default)(n.breadcrumbLink,n.breadcrumbLinkDisabled,r?.link),style:i?.link,children:a}):e.href?(0,f.jsx)(`a`,{href:e.href,onClick:e.onClick,className:(0,l.default)(n.breadcrumbLink,r?.link),style:i?.link,children:a}):e.onClick?(0,f.jsx)(oe,{onClick:e.onClick,className:(0,l.default)(n.breadcrumbLink,r?.link),style:i?.link,children:a}):(0,f.jsx)(`span`,{className:(0,l.default)(n.breadcrumbLink,n.breadcrumbLinkDisabled,r?.link),style:i?.link,children:a})}var pn=function(e){return e.Horizontal=`horizontal`,e.Vertical=`vertical`,e}({}),mn={buttonGroup:`buttonGroup_ZZ6sy`,"buttonGroup-vertical":`buttonGroup-vertical_XMx2u`,buttonGroupVertical:`buttonGroup-vertical_XMx2u`};function hn({children:e,orientation:t=pn.Horizontal,className:n,style:r,...i}){return(0,f.jsx)(`div`,{...i,role:`group`,className:(0,l.default)(mn.buttonGroup,{[mn.buttonGroupVertical]:t===pn.Vertical},n),style:r,children:e})}function gn(...e){return t=>{for(let n of e)typeof n==`function`?n(t):n&&(n.current=t)}}var _n=/^(\d{4})-(\d{2})-(\d{2})$/;function vn({year:e,month:t}){let n=new Date(0);return n.setUTCFullYear(e,t,0),n.getUTCDate()}function yn(e){if(typeof e!=`string`)return null;let t=_n.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]);return r<1||r>12||i<1||i>vn({year:n,month:r})?null:{year:n,month:r,day:i}}function bn(e){return yn(e)?e:null}function xn({year:e,month:t,day:n}){return`${String(e).padStart(4,`0`)}-${String(t).padStart(2,`0`)}-${String(n).padStart(2,`0`)}`}function Sn(e){return Number.isNaN(e.getTime())?``:xn({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()})}function Cn(e){let t=yn(e);if(!t)return new Date(NaN);let n=new Date(2e3,0,1);return n.setFullYear(t.year,t.month-1,t.day),n}var wn=/^(\d{2}):(\d{2})$/;function Tn(e){return Number.isNaN(e.getTime())?``:`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`}function En(e,t){let n=Cn(e),r=wn.exec(t),i=r?Number(r[1]):NaN,a=r?Number(r[2]):NaN;return Number.isNaN(n.getTime())||!(i<=23&&a<=59)?new Date(NaN):(n.setHours(i,a,0,0),n)}var Dn=function(e){return e.Month=`month`,e.Week=`week`,e.Day=`day`,e.Agenda=`agenda`,e}({}),On=1440;function kn(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function An(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function jn(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function Mn(e,t){return new Date(e,t+1,0).getDate()}function Nn(e,t){let n=new Date(e.getFullYear(),e.getMonth()+t,1),r=Math.min(e.getDate(),Mn(n.getFullYear(),n.getMonth()));return new Date(n.getFullYear(),n.getMonth(),r)}function Pn(e){return new Date(e.getFullYear(),e.getMonth(),1)}function Fn(e,t){return An(e,-((e.getDay()-t+7)%7))}function In(e,t){let n=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((r-n)/864e5)}function Ln(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Rn(e){return e.getHours()*60+e.getMinutes()}function zn(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,t)}function Bn(e,t,n){return t>e?t:new Date(e.getTime()+n*6e4)}function Vn(e,t,n){switch(e){case Dn.Week:return Fn(t,n);case Dn.Day:return kn(t);default:return Pn(t)}}function Hn(e,t,n){let r=Vn(e,t,n);switch(e){case Dn.Month:{let e=Fn(r,n);return{start:e,end:An(e,42)}}case Dn.Week:return{start:r,end:An(r,7)};case Dn.Day:return{start:r,end:An(r,1)};default:return{start:r,end:Nn(r,1)}}}var Un=new Set;function Wn(e){let t=new Set(e);return t.size===0||[0,1,2,3,4,5,6].every(e=>t.has(e))?Un:t}function Gn(e,t,n=1){let r=kn(e);for(;t.has(r.getDay());)r=An(r,n);return r}function Kn(e,t,n,r=Un){switch(e){case Dn.Week:return An(t,7*n);case Dn.Day:{let e=n<0?-1:1,i=t;for(let t=0;t<Math.abs(n);t++)i=Gn(An(i,e),r,e);return i}default:return Nn(t,n)}}function qn(e,t,n,r=Un){return{start:Hn(e,Kn(e,t,-1,r),n).start,end:Hn(e,Kn(e,t,1,r),n).end}}function Jn(e,t){return Array.from({length:t},(t,n)=>An(e,n))}function Yn(e,t,n=Un){return Jn(e,t).filter(e=>!n.has(e.getDay()))}var Xn={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};function Zn(e,t,n){return e in Xn?An(t,Xn[e]):e===`Home`?Fn(t,n):e===`End`?An(Fn(t,n),6):e===`PageUp`?Nn(t,-1):e===`PageDown`?Nn(t,1):null}function Qn(e,t,n,r=Un){let i=Zn(e,t,n);return i&&Gn(i,r,e===`ArrowLeft`||e===`End`?-1:1)}var $n=new Map,er;function tr(){return er===void 0&&(er=new Intl.DateTimeFormat().resolvedOptions().timeZone,queueMicrotask(()=>{er=void 0})),er}function nr(e,t){let n=`${tr()}|${e??``}|${JSON.stringify(t)}`,r=$n.get(n);return r||(r=new Intl.DateTimeFormat(e,t),$n.set(n,r)),r}function rr(e,t,n){return e.formatRange(t,n)}var ir=new Map;function ar(e){let t=e??``,n=ir.get(t);if(n!==void 0)return n;let r=1;try{let t=e??new Intl.DateTimeFormat().resolvedOptions().locale,n=new Intl.Locale(t),i=n.getWeekInfo?.()??n.weekInfo;i&&(r=i.firstDay%7)}catch{}return ir.set(t,r),r}function or(e){let t=nr(e,{hour:`numeric`}).resolvedOptions().hourCycle;return t===`h11`||t===`h12`}function sr(e,t){return nr(t,{hour:`numeric`,minute:`2-digit`}).format(e)}function cr(e,t,n){return rr(nr(n,{hour:`numeric`,minute:`2-digit`}),e,t)}function lr(e,t,n){let r=new Date(2e3,0,1,e.getHours(),e.getMinutes()),i=new Date(2e3,0,1,t.getHours(),t.getMinutes());try{return rr(nr(n,{hour:`numeric`,minute:`2-digit`}),r,i)}catch{return sr(e,n)}}function ur(e,t){let n=new Date(2e3,0,1,e);return or(t)?nr(t,{hour:`numeric`}).format(n):nr(t,{hour:`2-digit`,minute:`2-digit`}).format(n)}function dr(e,t,n){return nr(t,{weekday:n}).format(e)}function fr(e,t){return nr(t,{day:`numeric`}).format(e)}function pr(e,t){return nr(t,{weekday:`long`,day:`numeric`,month:`long`,year:`numeric`}).format(e)}function mr(e,t){return nr(t,{month:`long`,year:`numeric`}).format(e)}function hr(e,t,n,r){switch(e){case Dn.Week:return rr(nr(r,{day:`numeric`,month:`short`,year:`numeric`}),n.start,An(n.end,-1));case Dn.Day:return pr(t,r);default:return mr(t,r)}}var gr=864e5,_r=20;function vr(e){return e.end<e.start?e.start:e.end}function yr(e){return!!e.allDay||vr(e).getTime()-e.start.getTime()>=gr}function br(e){let t=kn(e.start),n=vr(e);if(e.allDay){let e=kn(n);return{first:t,last:In(t,e)>=1?An(e,-1):t}}return{first:t,last:n>e.start?kn(new Date(n.getTime()-1)):t}}function xr(e,t){let n=Number(yr(t))-Number(yr(e));if(n!==0)return n;let r=e.start.getTime()-t.start.getTime();if(r!==0)return r;let i=vr(t).getTime()-vr(e).getTime();return i===0?e.title.localeCompare(t.title):i}function Sr(e,t){let n=t.map(()=>[]);for(let r of e){let{first:e,last:i}=br(r);t.forEach((t,a)=>{In(e,t)>=0&&In(t,i)>=0&&n[a].push(r)})}for(let e of n)e.sort(xr);return n}function Cr(e,t){let n=kn(t),r=An(n,1),i=[];for(let t of e){if(yr(t))continue;let{start:e}=t,a=vr(t);if(e>=r||a<=n&&e<n)continue;let o=e<n,s=a>r,c=o?0:Rn(e),l=Math.max(a>=r?On:Rn(a),c),u=l-c<15?Math.min(l+_r,On):l;i.push({event:t,top:c,bottom:l,reach:u,column:0,columns:1,span:1,continuesBefore:o,continuesAfter:s})}i.sort((e,t)=>e.top-t.top||t.reach-e.reach);let a=[],o=-1;for(let e of i)a.length>0&&e.top>=o&&(wr(a),a=[]),a.push(e),o=Math.max(o,e.reach);return a.length>0&&wr(a),i}function wr(e){let t=[];for(let n of e){let e=t.findIndex(e=>e<=n.top);e===-1&&(e=t.push(0)-1),n.column=e,t[e]=n.reach}let n=t.length;for(let t of e){t.columns=n;let r=1;for(let i=t.column+1;i<n&&!e.some(e=>e.column===i&&e.top<t.reach&&e.reach>t.top);i++)r++;t.span=r}}function Tr(e,t,n=()=>!0){let r=[];for(let i of e){if(!n(i))continue;let{first:e,last:a}=br(i),o=t.findIndex(t=>In(e,t)>=0&&In(t,a)>=0);if(o===-1)continue;let s=o;for(;s+1<t.length&&In(t[s+1],a)>=0;)s++;r.push({event:i,start:o,span:s-o+1,lane:0,continuesBefore:In(e,t[o])>0,continuesAfter:In(t[s],a)>0})}r.sort((e,t)=>e.start-t.start||t.span-e.span||xr(e.event,t.event));let i=[];for(let e of r){let t=i.findIndex(t=>t<=e.start);t===-1&&(t=i.push(0)-1),e.lane=t,i[t]=e.start+e.span}return r}function Er(e,t,n){let r=Math.max(n-1,0),i=Array.from({length:t},()=>0);for(let t of e)for(let e=t.start;e<t.start+t.span;e++)i[e]=Math.max(i[e],t.lane+1);let a=Array.from({length:t},()=>0),o=[];for(let t of e){let e=t.lane<r;if(!e&&t.lane===r){e=!0;for(let r=t.start;r<t.start+t.span;r++)i[r]>n&&(e=!1)}if(e){o.push(t);continue}for(let e=t.start;e<t.start+t.span;e++)a[e]++}return{visible:o,moreLane:r,hidden:a}}var Dr={agendaList:`agendaList_C00ZD`,"agendaList-empty":`agendaList-empty_X742J`,agendaListEmpty:`agendaList-empty_X742J`,"agendaList-day":`agendaList-day_S13Dn`,agendaListDay:`agendaList-day_S13Dn`,"agendaList-day-withHeader":`agendaList-day-withHeader_DiXSD`,agendaListDayWithHeader:`agendaList-day-withHeader_DiXSD`,"agendaList-day-header":`agendaList-day-header_X9tfZ`,agendaListDayHeader:`agendaList-day-header_X9tfZ`,"agendaList-day-number":`agendaList-day-number_QfwoV`,agendaListDayNumber:`agendaList-day-number_QfwoV`,"agendaList-day-number-today":`agendaList-day-number-today_v-2hj`,agendaListDayNumberToday:`agendaList-day-number-today_v-2hj`,"agendaList-day-name":`agendaList-day-name_wqrBS`,agendaListDayName:`agendaList-day-name_wqrBS`,"agendaList-events":`agendaList-events_PYc6m`,agendaListEvents:`agendaList-events_PYc6m`,"agendaList-event":`agendaList-event_73lKv`,agendaListEvent:`agendaList-event_73lKv`,"agendaList-time":`agendaList-time_YyZCE`,agendaListTime:`agendaList-time_YyZCE`,"agendaList-time-end":`agendaList-time-end_zz3Xc`,agendaListTimeEnd:`agendaList-time-end_zz3Xc`,"agendaList-accent":`agendaList-accent_wCj9l`,agendaListAccent:`agendaList-accent_wCj9l`,"agendaList-title":`agendaList-title_0jQBA`,agendaListTitle:`agendaList-title_0jQBA`};function Or({events:e,start:t,days:n,hidden:r,scrollTo:i,showDayHeaders:a,locale:o,text:s,onEventClick:u,renderEvent:d,className:p,classNames:m,slotStyles:h}){let g=(0,c.useId)(),_=(0,c.useRef)(null),v=Yn(t,n,r),y=Sr(e,v),b=new Date,x=i?Sn(i):null;(0,c.useLayoutEffect)(()=>{let e=_.current;if(!e||x===null)return;let t=[...e.querySelectorAll(`[data-cal-day]`)].find(e=>(e.dataset.calDay??``)>=x);e.scrollTop=t?t.offsetTop:0},[x]);let S=y.flatMap((e,t)=>e.length>0||!a?[{day:v[t],dayEvents:e}]:[]);return(0,f.jsxs)(`div`,{ref:_,className:(0,l.default)(Dr.agendaList,p),children:[S.every(({dayEvents:e})=>e.length===0)&&(0,f.jsx)(`p`,{className:Dr.agendaListEmpty,children:s.noEvents}),S.map(({day:e,dayEvents:t})=>{if(t.length===0)return null;let n=`${g}-${Sn(e)}`,r=Ln(e,b),i=An(e,1);return(0,f.jsxs)(`div`,{role:`group`,"aria-labelledby":a?n:void 0,className:(0,l.default)(Dr.agendaListDay,a&&Dr.agendaListDayWithHeader),"data-cal-day":Sn(e),children:[a&&(0,f.jsxs)(`div`,{id:n,className:(0,l.default)(Dr.agendaListDayHeader,m?.dayHeader),style:h?.dayHeader,"aria-label":pr(e,o),children:[(0,f.jsx)(`span`,{className:(0,l.default)(Dr.agendaListDayNumber,r&&Dr.agendaListDayNumberToday),"aria-hidden":!0,children:fr(e,o)}),(0,f.jsx)(`span`,{className:Dr.agendaListDayName,"aria-hidden":!0,children:dr(e,o,`short`)})]}),(0,f.jsx)(`ul`,{className:Dr.agendaListEvents,children:t.map(t=>{let n=vr(t),r=t.start<e?e:t.start,a=n>i?i:n,c=yr(t)||t.start<=e&&n>=i,p=c?s.allDay:cr(t.start,n,o);return(0,f.jsx)(`li`,{children:(0,f.jsxs)(`button`,{type:`button`,className:(0,l.default)(Dr.agendaListEvent,m?.event),style:{"--event-color":t.color,...h?.event},"aria-label":`${t.title}, ${p}`,"data-cal-event":String(t.id),onClick:e=>u?.(t,e.currentTarget),children:[(0,f.jsx)(`span`,{className:Dr.agendaListTime,"aria-hidden":!0,children:c?s.allDay:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`span`,{children:sr(r,o)}),(0,f.jsx)(`span`,{className:Dr.agendaListTimeEnd,children:sr(a,o)})]})}),(0,f.jsx)(`span`,{className:Dr.agendaListAccent,"aria-hidden":!0}),(0,f.jsx)(`span`,{className:Dr.agendaListTitle,"aria-hidden":!0,children:d?d(t,{singleLine:!1}):t.title})]})},t.id)})})]},Sn(e))})]})}var kr={optionPicker:`optionPicker_Yx82s`,"optionPicker-chip":`optionPicker-chip_ywtvr`,optionPickerChip:`optionPicker-chip_ywtvr`,"optionPicker-option":`optionPicker-option_uq0vK`,optionPickerOption:`optionPicker-option_uq0vK`,"optionPicker-option-active":`optionPicker-option-active_yUECW`,optionPickerOptionActive:`optionPicker-option-active_yUECW`};function Ar(e){let{className:t=void 0,style:n,classNames:r,styles:i,options:a,onChange:o,value:s,...u}=D(`OptionPicker`,e),d=a.findIndex(e=>e.key===s)*100/a.length,p=(0,c.useRef)([]),m=a.findIndex(e=>e.key===s),h=m>=0?m:0;function g(e,t,n){if(a.length===0)return;let r=(t+e+a.length)%a.length;p.current[r]?.focus(),o(a[r].key,n)}function _(e,t){switch(e.key){case`ArrowRight`:case`ArrowDown`:e.preventDefault(),g(1,t,e);break;case`ArrowLeft`:case`ArrowUp`:e.preventDefault(),g(-1,t,e)}}return(0,f.jsxs)(`div`,{...u,role:`radiogroup`,className:(0,l.default)(kr.optionPicker,t,r?.root),style:{...n,...i?.root},children:[(0,f.jsx)(`div`,{className:(0,l.default)(kr.optionPickerChip,r?.chip),style:{left:`${d}%`,width:`${100/a.length}%`,...i?.chip}}),a.map((e,t)=>{let n=e.key===s;return(0,f.jsx)(oe,{ref:e=>{p.current[t]=e},onClick:t=>o(e.key,t),onKeyDown:e=>_(e,t),role:`radio`,"aria-checked":n,className:(0,l.default)(kr.optionPickerOption,n&&kr.optionPickerOptionActive,r?.option),style:i?.option,tabIndex:t===h?0:-1,children:e.label},e.key)})]})}var jr={calendarHeader:`calendarHeader_2y0rN`,"calendarHeader-title":`calendarHeader-title_oxE5q`,calendarHeaderTitle:`calendarHeader-title_oxE5q`,"calendarHeader-title-text":`calendarHeader-title-text_-Tc6u`,calendarHeaderTitleText:`calendarHeader-title-text_-Tc6u`,calendarTitleIn:`calendarTitleIn_GgigY`,"calendarHeader-nav":`calendarHeader-nav_vtXFu`,calendarHeaderNav:`calendarHeader-nav_vtXFu`,"calendarHeader-today":`calendarHeader-today_-IWRl`,calendarHeaderToday:`calendarHeader-today_-IWRl`,"calendarHeader-step":`calendarHeader-step_cZkOq`,calendarHeaderStep:`calendarHeader-step_cZkOq`,"calendarHeader-views":`calendarHeader-views_-ftrl`,calendarHeaderViews:`calendarHeader-views_-ftrl`,"calendarHeader-compact":`calendarHeader-compact_4jGIE`,calendarHeaderCompact:`calendarHeader-compact_4jGIE`};function Mr({title:e,compact:t,direction:n,view:r,views:i,text:a,onStep:o,onToday:s,onViewChange:c,className:u,style:p}){return(0,f.jsxs)(`div`,{className:(0,l.default)(jr.calendarHeader,t&&jr.calendarHeaderCompact,u),style:p,children:[(0,f.jsx)(`div`,{className:jr.calendarHeaderTitle,"aria-live":`polite`,children:(0,f.jsx)(`span`,{className:jr.calendarHeaderTitleText,style:{"--title-from":n},children:e},e)}),(0,f.jsxs)(`div`,{className:jr.calendarHeaderNav,children:[(0,f.jsx)(ne,{className:jr.calendarHeaderToday,size:B.Small,onClick:s,children:a.today}),(0,f.jsx)(ce,{className:jr.calendarHeaderStep,icon:d.faChevronLeft,title:a.previous,"aria-label":a.previous,onClick:()=>o(-1)}),(0,f.jsx)(ce,{className:jr.calendarHeaderStep,icon:d.faChevronRight,title:a.next,"aria-label":a.next,onClick:()=>o(1)})]}),i.length>1&&(0,f.jsx)(Ar,{className:jr.calendarHeaderViews,"aria-label":a.viewSwitcher,value:r,onChange:e=>c(e),options:i.map(e=>({key:e,label:a[e]}))})]})}function Nr(e,t,n){return e===0||!(Math.abs(e)>=t*.2)&&!(Math.abs(n)>=.5&&Math.sign(n)===Math.sign(e))?0:e<0?1:-1}function Pr(e,t,n){return e<t+48?-18*Math.min(1,(t+48-e)/48):e>n-48?18*Math.min(1,(e-(n-48))/48):0}function Fr(e,t){return Math.round(e/t)*t}function Ir(e,t,n){return Math.min(Math.max(e,t),n)}function Lr(e,t){let n=e.filter(e=>t-e.time<=100);if(n.length<2)return 0;let r=n[0],i=n[n.length-1],a=i.time-r.time;return a>0?(i.x-r.x)/a:0}function Rr(e,t){let n=(0,c.useRef)(t);(0,c.useLayoutEffect)(()=>{n.current=t}),(0,c.useEffect)(()=>{let t=e.current;if(!t)return;let r=()=>n.current,i=`idle`,a=-1,o=``,s={x:0,y:0},c={x:0,y:0},l=[],u=null,d,f=0,p=-1/0,m=0,h=new Map;function g(e){try{t.setPointerCapture(e)}catch{}}function _(){clearTimeout(d),d=void 0}function v(){_(),cancelAnimationFrame(f),f=0,u=null,i=`passive`,m=performance.now()+350}function y(){let[e,t]=[...h.values()];return{center:{x:(e.x+t.x)/2,y:(e.y+t.y)/2},distance:Math.hypot(e.x-t.x,e.y-t.y)}}function b(){if(i!==`dragging`)return;let e=r().autoScroll?.();if(e){let t=Pr(c.y,e.top,e.bottom),n=e.element.scrollTop;t!==0&&(e.element.scrollTop+=t),e.element.scrollTop!==n&&r().onDragMove?.(c)}f=requestAnimationFrame(b)}function x(){d=void 0,u!==null&&i===`pressed`&&(i=`dragging`,g(a),o!==`mouse`&&`vibrate`in navigator&&navigator.vibrate(10),r().onDragStart?.(u,c),f=requestAnimationFrame(b))}function S(e){if(e.isPrimary&&i!==`idle`&&(i===`dragging`?r().onDragCancel?.():i===`swiping`?r().onSwipeEnd?.(0,0):i===`pinching`&&r().onPinchEnd?.(),_(),cancelAnimationFrame(f),u=null,i=`idle`),i===`idle`){if(e.pointerType===`mouse`&&e.button!==0)return;r().onPress?.(),a=e.pointerId,o=e.pointerType,s=c={x:e.clientX,y:e.clientY},h.clear(),h.set(e.pointerId,s),l=[{time:e.timeStamp,x:e.clientX}],u=e.target instanceof Element?r().dragFrom?.(e.target,s)??null:null,i=`pressed`;let t=performance.now()-p<150;u!==null&&o!==`mouse`&&!t&&(d=setTimeout(x,400));return}if(e.pointerType!==`mouse`&&(h.set(e.pointerId,{x:e.clientX,y:e.clientY}),i===`pressed`&&h.size===2&&r().onPinchStart)){_(),i=`pinching`,g(a),g(e.pointerId);let{center:t,distance:n}=y();r().onPinchStart?.(t,n)}}function C(e){if(!h.has(e.pointerId))return;let t={x:e.clientX,y:e.clientY};if(h.set(e.pointerId,t),i===`pinching`){if(h.size<2)return;let{center:e,distance:t}=y();r().onPinchMove?.(e,t);return}if(e.pointerId!==a)return;c=t;let n=t.x-s.x,d=t.y-s.y;if(i===`pressed`){let e=Math.hypot(n,d);if(o===`mouse`){if(e<=4)return;if(u===null){i=`passive`;return}x()}else{if(e<=10)return;if(_(),Math.abs(n)<=Math.abs(d)||!r().canSwipe?.()){i=`passive`;return}i=`swiping`,g(a)}}i===`swiping`?(l.push({time:e.timeStamp,x:t.x}),l.length>20&&l.shift(),r().onSwipeMove?.(n)):i===`dragging`&&r().onDragMove?.(t)}function w(e){h.delete(e),h.size===0&&(_(),u=null,i=`idle`)}function T(e){h.has(e.pointerId)&&(i===`pinching`?(r().onPinchEnd?.(),v()):e.pointerId===a&&(i===`swiping`?(l.push({time:e.timeStamp,x:e.clientX}),r().onSwipeEnd?.(e.clientX-s.x,Lr(l,e.timeStamp)),v()):i===`dragging`?(c={x:e.clientX,y:e.clientY},r().onDragEnd?.(c),v()):i===`pressed`&&(_(),i=`passive`)),w(e.pointerId))}function E(e){h.has(e.pointerId)&&(i===`swiping`?(r().onSwipeEnd?.(0,0),v()):i===`dragging`?(r().onDragCancel?.(),v()):i===`pinching`?(r().onPinchEnd?.(),v()):(_(),i=`passive`),w(e.pointerId))}function D(e){(i===`swiping`||i===`dragging`||i===`pinching`)&&e.cancelable&&e.preventDefault()}function O(e){(i===`dragging`||i===`pressed`&&o!==`mouse`&&u!==null)&&e.preventDefault()}function k(e){e.preventDefault()}function A(e){performance.now()<m&&(e.stopPropagation(),e.preventDefault(),m=0)}function j(){p=performance.now()}function M(e){e.key===`Escape`&&i===`dragging`&&(e.preventDefault(),r().onDragCancel?.(),v())}return t.addEventListener(`pointerdown`,S),t.addEventListener(`pointermove`,C),t.addEventListener(`pointerup`,T),t.addEventListener(`pointercancel`,E),t.addEventListener(`touchmove`,D,{passive:!1}),t.addEventListener(`contextmenu`,O),t.addEventListener(`dragstart`,k),t.addEventListener(`click`,A,!0),t.addEventListener(`scroll`,j,{capture:!0,passive:!0}),window.addEventListener(`scroll`,j,{passive:!0}),window.addEventListener(`keydown`,M),()=>{_(),cancelAnimationFrame(f),t.removeEventListener(`pointerdown`,S),t.removeEventListener(`pointermove`,C),t.removeEventListener(`pointerup`,T),t.removeEventListener(`pointercancel`,E),t.removeEventListener(`touchmove`,D),t.removeEventListener(`contextmenu`,O),t.removeEventListener(`dragstart`,k),t.removeEventListener(`click`,A,!0),t.removeEventListener(`scroll`,j,{capture:!0}),window.removeEventListener(`scroll`,j),window.removeEventListener(`keydown`,M)}},[e])}var zr=240;function Br(e,t,n){let r=(0,c.useRef)(new Set),i=(0,c.useRef)(0),a=(0,c.useRef)([]),o=(0,c.useRef)(0),s=(0,c.useRef)(e),l=be(`(prefers-reduced-motion: reduce)`),u=(0,c.useRef)({onPage:t,focusFallback:n,reducedMotion:l});(0,c.useLayoutEffect)(()=>{u.current={onPage:t,focusFallback:n,reducedMotion:l}});let d=(0,c.useCallback)(e=>{i.current=e;for(let t of r.current)t.style.transform=e===0?``:`translateX(${e}px)`},[]);(0,c.useLayoutEffect)(()=>{s.current=e,d(0);let t=document.activeElement;t instanceof HTMLElement&&t.closest(`[inert]`)&&[...r.current].some(e=>e.contains(t))&&u.current.focusFallback()?.focus()},[e,d]);let f=(0,c.useCallback)(e=>{if(e)return r.current.add(e),()=>{r.current.delete(e)}},[]),m=(0,c.useCallback)(()=>{let[e]=r.current;return e?.parentElement?.clientWidth??0},[]),h=(0,c.useCallback)(e=>{if(a.current=[],e===0){d(0);return}let t=s.current;(0,p.flushSync)(()=>u.current.onPage(e)),s.current===t&&d(0)},[d]),g=(0,c.useCallback)(e=>{let t=m(),n=i.current,s=e===0?0:-e*t,c=[...r.current];d(s);let l=typeof c[0]?.animate==`function`;if(u.current.reducedMotion||n===s||!l){h(e);return}let f=Math.max(120,zr*Math.min(1,Math.abs(s-n)/Math.max(t,1))),p=[{transform:`translateX(${n}px)`},{transform:`translateX(${s}px)`}];o.current=e,a.current=c.map(e=>e.animate(p,{duration:f,easing:`cubic-bezier(0.25, 1, 0.5, 1)`})),a.current[0].onfinish=()=>h(e)},[h,m,d]),_=(0,c.useCallback)(()=>{if(a.current.length!==0){for(let e of a.current)e.onfinish=null,e.cancel();h(o.current)}},[h]);return(0,c.useEffect)(()=>{let e=a;return()=>{for(let t of e.current)t.onfinish=null,t.cancel()}},[]),{trackRef:f,width:m,move:(0,c.useCallback)(e=>d(e),[d]),settle:g,finish:_}}var Vr={"pager-viewport":`pager-viewport_Mq7zC`,pagerViewport:`pager-viewport_Mq7zC`,"pager-track":`pager-track_MTNN6`,pagerTrack:`pager-track_MTNN6`,"pager-pane":`pager-pane_b38-h`,pagerPane:`pager-pane_b38-h`,"pager-pane-prev":`pager-pane-prev_PEY3n`,pagerPanePrev:`pager-pane-prev_PEY3n`,"pager-pane-next":`pager-pane-next_B62PQ`,pagerPaneNext:`pager-pane-next_B62PQ`},Hr={compactMonth:`compactMonth_FqyT2`,"compactMonth-sticky":`compactMonth-sticky_jvXmc`,compactMonthSticky:`compactMonth-sticky_jvXmc`,"compactMonth-weekdays":`compactMonth-weekdays_Pqo-f`,compactMonthWeekdays:`compactMonth-weekdays_Pqo-f`,"compactMonth-weekday":`compactMonth-weekday_D7FA1`,compactMonthWeekday:`compactMonth-weekday_D7FA1`,"compactMonth-viewport":`compactMonth-viewport_Ala2B`,compactMonthViewport:`compactMonth-viewport_Ala2B`,"compactMonth-pane":`compactMonth-pane_MnQpH`,compactMonthPane:`compactMonth-pane_MnQpH`,"compactMonth-rows":`compactMonth-rows_s7t79`,compactMonthRows:`compactMonth-rows_s7t79`,"compactMonth-week":`compactMonth-week_aU0xC`,compactMonthWeek:`compactMonth-week_aU0xC`,"compactMonth-week-folding":`compactMonth-week-folding_enQnk`,compactMonthWeekFolding:`compactMonth-week-folding_enQnk`,"compactMonth-cell":`compactMonth-cell_cerzg`,compactMonthCell:`compactMonth-cell_cerzg`,"compactMonth-cell-outside":`compactMonth-cell-outside_90ht-`,compactMonthCellOutside:`compactMonth-cell-outside_90ht-`,"compactMonth-number":`compactMonth-number_EpPAy`,compactMonthNumber:`compactMonth-number_EpPAy`,"compactMonth-number-today":`compactMonth-number-today_xZAeN`,compactMonthNumberToday:`compactMonth-number-today_xZAeN`,"compactMonth-number-selected":`compactMonth-number-selected_r3RiE`,compactMonthNumberSelected:`compactMonth-number-selected_r3RiE`,"compactMonth-dots":`compactMonth-dots_0UvHH`,compactMonthDots:`compactMonth-dots_0UvHH`,"compactMonth-dot":`compactMonth-dot_-UfnO`,compactMonthDot:`compactMonth-dot_-UfnO`,"compactMonth-list":`compactMonth-list_laIa8`,compactMonthList:`compactMonth-list_laIa8`,"compactMonth-list-header":`compactMonth-list-header_Zo7PB`,compactMonthListHeader:`compactMonth-list-header_Zo7PB`,"compactMonth-list-title":`compactMonth-list-title_iT4MI`,compactMonthListTitle:`compactMonth-list-title_iT4MI`,"compactMonth-agenda":`compactMonth-agenda_F0LqZ`,compactMonthAgenda:`compactMonth-agenda_F0LqZ`},Ur=[-1,0,1],Wr=3,Gr=150;function Kr({events:e,date:t,locale:n,weekStartsOn:r,hidden:i,text:a,onDateChange:o,onEventClick:s,onSlotCreate:u,renderEvent:d,classNames:p,slotStyles:m}){let h=(0,c.useRef)(null),g=(0,c.useRef)(null),_=(0,c.useRef)(null),v=(0,c.useRef)(null),y=(0,c.useRef)(null),b=(0,c.useRef)(0),[x,S]=(0,c.useState)(!1),C=be(`(prefers-reduced-motion: reduce)`),w=new Date,T=Pn(t),E=Fn(t,r),D=Yn(Fn(w,r),7,i),O=Br(Sn(x?E:T),e=>o(x?An(t,7*e):Nn(t,e)),()=>v.current?.querySelector(`[tabindex="0"]`)??null);(0,c.useLayoutEffect)(()=>{let e=h.current;if(!e)return;let t,n=!1;function r(){return(_.current?.clientHeight??0)*5/6}function i(){let t=r(),n=t>0?Math.min(e.scrollTop/t,1):0;C&&(n=+(n>.99)),b.current=n,e.style.setProperty(`--collapse`,String(n)),S(n>=1)}function a(){if(n)return;let t=r(),i=e.scrollTop;i<=0||i>=t||e.scrollTo({top:i<t/2?0:t,behavior:C?`auto`:`smooth`})}function o(){clearTimeout(t),t=setTimeout(a,Gr)}function s(){i(),o()}function c(){n=!0}function l(){n=!1,o()}return i(),e.addEventListener(`scroll`,s,{passive:!0}),e.addEventListener(`touchstart`,c,{passive:!0}),e.addEventListener(`touchend`,l,{passive:!0}),e.addEventListener(`touchcancel`,l,{passive:!0}),()=>{clearTimeout(t),e.removeEventListener(`scroll`,s),e.removeEventListener(`touchstart`,c),e.removeEventListener(`touchend`,l),e.removeEventListener(`touchcancel`,l)}},[C]),(0,c.useLayoutEffect)(()=>{let e=y.current;e!==null&&(y.current=null,v.current?.querySelector(`[data-cal-day="${e}"]`)?.focus())}),Rr(g,{onPress:O.finish,canSwipe:()=>b.current<.01||b.current>.99,onSwipeMove:O.move,onSwipeEnd:(e,t)=>O.settle(Nr(e,O.width(),t))});function k(e,t){let n=Qn(e.key,t,r,i);n&&(e.preventDefault(),y.current=Sn(n),o(n))}function A(e,r,i,s){let c=Ln(e,t),u=Ln(e,w),d=pr(e,n);return(0,f.jsxs)(`div`,{role:`gridcell`,"data-cal-day":Sn(e),tabIndex:i&&c?0:-1,"aria-selected":c,"aria-current":u?`date`:void 0,"aria-label":s.length>0?`${d}, ${a.eventCount(s.length)}`:d,className:(0,l.default)(Hr.compactMonthCell,r&&Hr.compactMonthCellOutside,p?.cell),style:m?.cell,onClick:()=>o(e),onKeyDown:t=>k(t,e),children:[(0,f.jsx)(`span`,{"aria-hidden":!0,className:(0,l.default)(Hr.compactMonthNumber,u&&Hr.compactMonthNumberToday,c&&Hr.compactMonthNumberSelected),children:fr(e,n)}),(0,f.jsx)(`span`,{"aria-hidden":!0,className:Hr.compactMonthDots,children:s.slice(0,Wr).map(e=>(0,f.jsx)(`span`,{className:Hr.compactMonthDot,style:{"--event-color":e.color}},e.id))})]},Sn(e))}function j(n){let a=n===0,o=(0,l.default)(Vr.pagerPane,n===-1&&Vr.pagerPanePrev,n===1&&Vr.pagerPaneNext,Hr.compactMonthPane);if(x){let t=An(E,7*n),r=Yn(t,7,i),s=Sr(e,r);return(0,f.jsx)(`div`,{ref:a?v:void 0,className:o,inert:!a,"aria-hidden":!a||void 0,children:(0,f.jsx)(`div`,{role:`row`,className:Hr.compactMonthWeek,children:r.map((e,t)=>A(e,!1,a,s[t]))})},Sn(t))}let s=Nn(T,n),c=Hn(Dn.Month,s,r).start,u=a?Math.floor(In(c,t)/7):0;return(0,f.jsx)(`div`,{ref:a?v:void 0,className:o,inert:!a,"aria-hidden":!a||void 0,style:{"--selected-row":u},children:(0,f.jsx)(`div`,{className:Hr.compactMonthRows,children:Array.from({length:6},(t,n)=>{let r=An(c,n*7),o=Yn(r,7,i),d=Sr(e,o);return(0,f.jsx)(`div`,{role:`row`,className:(0,l.default)(Hr.compactMonthWeek,n!==u&&Hr.compactMonthWeekFolding),children:o.map((e,t)=>A(e,e.getMonth()!==s.getMonth(),a,d[t]))},Sn(r))})})},Sn(s))}return(0,f.jsxs)(`div`,{ref:h,className:Hr.compactMonth,style:{"--days":D.length},children:[(0,f.jsx)(`div`,{ref:g,className:Hr.compactMonthSticky,children:(0,f.jsxs)(`div`,{role:`grid`,"aria-label":mr(t,n),children:[(0,f.jsx)(`div`,{role:`row`,className:Hr.compactMonthWeekdays,children:D.map(e=>(0,f.jsx)(`div`,{role:`columnheader`,"aria-label":dr(e,n,`long`),className:(0,l.default)(Hr.compactMonthWeekday,p?.dayHeader),style:m?.dayHeader,children:dr(e,n,`narrow`)},e.getDay()))}),(0,f.jsx)(`div`,{ref:_,className:(0,l.default)(Vr.pagerViewport,Hr.compactMonthViewport),children:(0,f.jsx)(`div`,{ref:O.trackRef,className:Vr.pagerTrack,children:Ur.map(j)})})]})}),(0,f.jsxs)(`div`,{className:Hr.compactMonthList,children:[(0,f.jsxs)(`div`,{className:Hr.compactMonthListHeader,children:[(0,f.jsx)(`div`,{className:Hr.compactMonthListTitle,children:pr(t,n)}),u&&(0,f.jsx)(ne,{size:B.Small,onClick:e=>u({start:t,end:An(t,1),allDay:!0},e.currentTarget),children:a.newEvent})]}),(0,f.jsx)(Or,{className:Hr.compactMonthAgenda,events:e,start:t,days:1,showDayHeaders:!1,locale:n,text:a,onEventClick:s,renderEvent:d,classNames:p,slotStyles:m})]})]})}var qr={monthView:`monthView_COWAp`,"monthView-grid":`monthView-grid_MG0UZ`,monthViewGrid:`monthView-grid_MG0UZ`,"monthView-weekdays":`monthView-weekdays_BHTuU`,monthViewWeekdays:`monthView-weekdays_BHTuU`,"monthView-weekday":`monthView-weekday_ycA-L`,monthViewWeekday:`monthView-weekday_ycA-L`,"monthView-viewport":`monthView-viewport_LpCe1`,monthViewViewport:`monthView-viewport_LpCe1`,"monthView-pane":`monthView-pane_bHUbv`,monthViewPane:`monthView-pane_bHUbv`,"monthView-week":`monthView-week_gnh6Y`,monthViewWeek:`monthView-week_gnh6Y`,"monthView-cell":`monthView-cell_ypx-s`,monthViewCell:`monthView-cell_ypx-s`,"monthView-cell-outside":`monthView-cell-outside_1Mr0V`,monthViewCellOutside:`monthView-cell-outside_1Mr0V`,"monthView-cell-creatable":`monthView-cell-creatable_BxZde`,monthViewCellCreatable:`monthView-cell-creatable_BxZde`,"monthView-cell-target":`monthView-cell-target_-oYgU`,monthViewCellTarget:`monthView-cell-target_-oYgU`,"monthView-dayNumber":`monthView-dayNumber_voxGS`,monthViewDayNumber:`monthView-dayNumber_voxGS`,"monthView-dayNumber-today":`monthView-dayNumber-today_G7coa`,monthViewDayNumberToday:`monthView-dayNumber-today_G7coa`,"monthView-dayNumber-link":`monthView-dayNumber-link_5k317`,monthViewDayNumberLink:`monthView-dayNumber-link_5k317`,"monthView-bars":`monthView-bars_DW4bv`,monthViewBars:`monthView-bars_DW4bv`,"monthView-bar":`monthView-bar_9zcHJ`,monthViewBar:`monthView-bar_9zcHJ`,"monthView-bar-filled":`monthView-bar-filled_Mq2Ca`,monthViewBarFilled:`monthView-bar-filled_Mq2Ca`,"monthView-bar-timed":`monthView-bar-timed_C8Xwi`,monthViewBarTimed:`monthView-bar-timed_C8Xwi`,"monthView-bar-continuesBefore":`monthView-bar-continuesBefore_DBSlE`,monthViewBarContinuesBefore:`monthView-bar-continuesBefore_DBSlE`,"monthView-bar-continuesAfter":`monthView-bar-continuesAfter_cEvZo`,monthViewBarContinuesAfter:`monthView-bar-continuesAfter_cEvZo`,"monthView-bar-interactive":`monthView-bar-interactive_FGu9C`,monthViewBarInteractive:`monthView-bar-interactive_FGu9C`,"monthView-bar-dragging":`monthView-bar-dragging_sxndr`,monthViewBarDragging:`monthView-bar-dragging_sxndr`,"monthView-bar-title":`monthView-bar-title_-X5yZ`,monthViewBarTitle:`monthView-bar-title_-X5yZ`,"monthView-dot":`monthView-dot_81QmI`,monthViewDot:`monthView-dot_81QmI`,"monthView-time":`monthView-time_W-u-E`,monthViewTime:`monthView-time_W-u-E`,"monthView-more":`monthView-more_m2PXd`,monthViewMore:`monthView-more_m2PXd`,"monthView-list":`monthView-list_4pG-Y`,monthViewList:`monthView-list_4pG-Y`,"monthView-list-title":`monthView-list-title_oM-3e`,monthViewListTitle:`monthView-list-title_oM-3e`,"monthView-list-events":`monthView-list-events_RsMQ6`,monthViewListEvents:`monthView-list-events_RsMQ6`,"monthView-list-create":`monthView-list-create_e7EdY`,monthViewListCreate:`monthView-list-create_e7EdY`},Jr=[-1,0,1];function Yr({events:e,date:t,locale:n,weekStartsOn:r,hidden:i,text:a,onDateChange:o,onOpenDay:s,onEventClick:u,onEventChange:d,onSlotCreate:p,renderEvent:m,classNames:h,slotStyles:g}){let _=(0,c.useRef)(null),v=(0,c.useRef)(null),y=(0,c.useRef)(null),b=(0,c.useRef)(null),[x,S]=(0,c.useState)(1/0),[C,w]=(0,c.useState)(null),[T,E]=(0,c.useState)(null),D=Pn(t),O=new Date,k=Yn(Fn(O,r),7,i),A=Hn(Dn.Month,D,r).start,M=(e,t)=>Yn(An(e,t*7),7,i),N=Br(Sn(D),e=>o(Nn(t,e)),()=>y.current?.querySelector(`[tabindex="0"]`)??null);(0,c.useLayoutEffect)(()=>{let e=v.current;if(!e)return;function t(){let t=e.querySelector(`[data-cal-bars]`);if(!t||t.clientHeight===0){S(1/0);return}let n=getComputedStyle(t),r=parseFloat(n.gridAutoRows),i=parseFloat(n.rowGap)||0,a=parseFloat(n.paddingTop)||0;S(r>0?Math.max(1,Math.floor((t.clientHeight-a+i)/(r+i))):1/0)}t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]),(0,c.useLayoutEffect)(()=>{let e=b.current;e!==null&&(b.current=null,y.current?.querySelector(`[data-cal-day="${e}"]`)?.focus())});function P(e){let t=y.current;if(!t)return null;let n=t.getBoundingClientRect();if(n.width===0||n.height===0)return null;let r=k.length,i=Ir(Math.floor((e.x-n.left)/n.width*r),0,r-1),a=Ir(Math.floor((e.y-n.top)/n.height*6),0,5);return M(A,a)[i]}function F(e){return y.current?.querySelector(`[data-cal-day="${Sn(e)}"]`)??null}Rr(_,{onPress:N.finish,canSwipe:()=>!0,onSwipeMove:N.move,onSwipeEnd:(e,t)=>N.settle(Nr(e,N.width(),t)),dragFrom:(t,n)=>{if(!d)return null;let r=t.closest(`[data-cal-event]`);if(!r||!y.current?.contains(r))return null;let i=e.find(e=>String(e.id)===r.dataset.calEvent),a=P(n);return!i||i.readOnly||a===null?null:{event:i,grabbed:a,offset:0}},onDragStart:E,onDragMove:e=>{let t=P(e);t!==null&&E(e=>{if(!e)return e;let n=In(e.grabbed,t);return n===e.offset?e:{...e,offset:n}})},onDragEnd:e=>{E(null);let t=P(e);if(!T||t===null)return;let n=In(T.grabbed,t);if(n===0)return;let r=jn(T.event.start,n),i=(vr(T.event).getTime()-T.event.start.getTime())/6e4;d?.({event:T.event,start:r,end:Bn(r,jn(T.event.end,n),i)})},onDragCancel:()=>E(null)});function I(e,t){let n=F(e);n&&w({day:e,anchor:n,fromKeyboard:t})}function L(e,t){if(s&&e.target.closest(`[data-cal-day-number]`)){s(t);return}p?.({start:t,end:An(t,1),allDay:!0},e.currentTarget)}function R(e,t){let n=Qn(e.key,t,r,i);if(!n){j(e)&&(e.preventDefault(),I(t,!0));return}e.preventDefault(),b.current=Sn(n),o(n)}function z(e){let{event:t}=e,r=yr(t)||e.span>1||e.continuesBefore||e.continuesAfter,i=!!u||!!d&&!t.readOnly;return(0,f.jsxs)(`div`,{"data-cal-event":String(t.id),className:(0,l.default)(qr.monthViewBar,r?qr.monthViewBarFilled:qr.monthViewBarTimed,e.continuesBefore&&qr.monthViewBarContinuesBefore,e.continuesAfter&&qr.monthViewBarContinuesAfter,i&&qr.monthViewBarInteractive,T?.event===t&&qr.monthViewBarDragging,h?.event),style:{"--event-color":t.color,gridColumn:`${e.start+1} / span ${e.span}`,gridRow:e.lane+1,...g?.event},onClick:e=>u?.(t,e.currentTarget),children:[!r&&(0,f.jsx)(`span`,{className:qr.monthViewDot}),!r&&(0,f.jsx)(`span`,{className:qr.monthViewTime,children:sr(t.start,n)}),(0,f.jsx)(`span`,{className:qr.monthViewBarTitle,children:m?m(t,{singleLine:!0}):t.title})]},t.id)}function B(i){let o=Nn(D,i),c=i===0,u=Hn(Dn.Month,o,r).start,d=null;if(c&&T&&T.offset!==0){let{first:e,last:t}=br(T.event);d={from:An(e,T.offset),to:An(t,T.offset)}}return(0,f.jsx)(`div`,{ref:c?y:void 0,className:(0,l.default)(Vr.pagerPane,i===-1&&Vr.pagerPanePrev,i===1&&Vr.pagerPaneNext,qr.monthViewPane),inert:!c,"aria-hidden":!c||void 0,children:Array.from({length:6},(r,i)=>{let m=M(u,i),_=Sr(e,m),v=Er(Tr(e,m),m.length,x);return(0,f.jsxs)(`div`,{role:`row`,className:qr.monthViewWeek,children:[m.map((e,r)=>{let i=_[r].length,u=Ln(e,O),m=pr(e,n);return(0,f.jsx)(`div`,{role:`gridcell`,"data-cal-day":Sn(e),tabIndex:c&&Ln(e,t)?0:-1,"aria-current":u?`date`:void 0,"aria-label":i>0?`${m}, ${a.eventCount(i)}`:m,className:(0,l.default)(qr.monthViewCell,e.getMonth()!==o.getMonth()&&qr.monthViewCellOutside,p&&qr.monthViewCellCreatable,d&&In(d.from,e)>=0&&In(e,d.to)>=0&&qr.monthViewCellTarget,h?.cell),style:g?.cell,onClick:t=>L(t,e),onKeyDown:t=>R(t,e),children:(0,f.jsx)(`span`,{"data-cal-day-number":!0,"aria-hidden":!0,className:(0,l.default)(qr.monthViewDayNumber,u&&qr.monthViewDayNumberToday,s&&qr.monthViewDayNumberLink),children:fr(e,n)})},Sn(e))}),(0,f.jsxs)(`div`,{"data-cal-bars":!0,"aria-hidden":!0,className:qr.monthViewBars,children:[v.visible.map(z),v.hidden.map((e,t)=>e>0&&(0,f.jsx)(`div`,{className:qr.monthViewMore,style:{gridColumn:t+1,gridRow:v.moreLane+1},onClick:()=>I(m[t],!1),children:a.more(e)},`more-${t}`))]})]},Sn(m[0]))})},Sn(o))}return(0,f.jsxs)(`div`,{ref:_,className:qr.monthView,style:{"--days":k.length},children:[(0,f.jsxs)(`div`,{role:`grid`,"aria-label":mr(t,n),className:qr.monthViewGrid,children:[(0,f.jsx)(`div`,{role:`row`,className:qr.monthViewWeekdays,children:k.map(e=>(0,f.jsx)(`div`,{role:`columnheader`,"aria-label":dr(e,n,`long`),className:(0,l.default)(qr.monthViewWeekday,h?.dayHeader),style:g?.dayHeader,children:dr(e,n,`short`)},e.getDay()))}),(0,f.jsx)(`div`,{ref:v,className:(0,l.default)(Vr.pagerViewport,qr.monthViewViewport),children:(0,f.jsx)(`div`,{ref:N.trackRef,className:Vr.pagerTrack,children:Jr.map(B)})})]}),(0,f.jsx)(sn,{anchor:C?.anchor??null,isOpen:C!==null,onOpenChange:e=>!e&&w(null),focusOnOpen:C?.fromKeyboard??!1,placement:wt.Bottom,align:Tt.Start,content:C&&(0,f.jsxs)(`div`,{className:qr.monthViewList,children:[(0,f.jsx)(`div`,{className:qr.monthViewListTitle,children:pr(C.day,n)}),(0,f.jsx)(Or,{className:qr.monthViewListEvents,events:e,start:C.day,days:1,showDayHeaders:!1,locale:n,text:a,onEventClick:e=>{w(null),u?.(e,C.anchor)},renderEvent:m,classNames:h,slotStyles:g}),p&&(0,f.jsx)(ne,{className:qr.monthViewListCreate,onClick:()=>{w(null),p({start:C.day,end:An(C.day,1),allDay:!0},C.anchor)},children:a.newEvent})]})})]})}var Xr={timeGrid:`timeGrid_eQt1f`,"timeGrid-head":`timeGrid-head_QeMAH`,timeGridHead:`timeGrid-head_QeMAH`,"timeGrid-corner":`timeGrid-corner_ass6Y`,timeGridCorner:`timeGrid-corner_ass6Y`,"timeGrid-toggle":`timeGrid-toggle_q0Oh4`,timeGridToggle:`timeGrid-toggle_q0Oh4`,"timeGrid-toggle-open":`timeGrid-toggle-open_CkMZf`,timeGridToggleOpen:`timeGrid-toggle-open_CkMZf`,"timeGrid-headPane":`timeGrid-headPane_KOqbR`,timeGridHeadPane:`timeGrid-headPane_KOqbR`,"timeGrid-dayHeader":`timeGrid-dayHeader_nyugU`,timeGridDayHeader:`timeGrid-dayHeader_nyugU`,"timeGrid-dayHeader-link":`timeGrid-dayHeader-link_vE861`,timeGridDayHeaderLink:`timeGrid-dayHeader-link_vE861`,"timeGrid-dayNumber":`timeGrid-dayNumber_3xDPg`,timeGridDayNumber:`timeGrid-dayNumber_3xDPg`,"timeGrid-dayNumber-today":`timeGrid-dayNumber-today_em4ho`,timeGridDayNumberToday:`timeGrid-dayNumber-today_em4ho`,"timeGrid-weekday":`timeGrid-weekday_BEOk2`,timeGridWeekday:`timeGrid-weekday_BEOk2`,"timeGrid-allDay":`timeGrid-allDay_sBaRg`,timeGridAllDay:`timeGrid-allDay_sBaRg`,"timeGrid-bar":`timeGrid-bar_bGt1p`,timeGridBar:`timeGrid-bar_bGt1p`,"timeGrid-bar-continuesBefore":`timeGrid-bar-continuesBefore_XRW1T`,timeGridBarContinuesBefore:`timeGrid-bar-continuesBefore_XRW1T`,"timeGrid-bar-continuesAfter":`timeGrid-bar-continuesAfter_BsjNh`,timeGridBarContinuesAfter:`timeGrid-bar-continuesAfter_BsjNh`,"timeGrid-bar-title":`timeGrid-bar-title_iVZsx`,timeGridBarTitle:`timeGrid-bar-title_iVZsx`,"timeGrid-more":`timeGrid-more_Fo6hf`,timeGridMore:`timeGrid-more_Fo6hf`,"timeGrid-body":`timeGrid-body_Vzvbo`,timeGridBody:`timeGrid-body_Vzvbo`,"timeGrid-gutter":`timeGrid-gutter_OuCf-`,timeGridGutter:`timeGrid-gutter_OuCf-`,"timeGrid-hour":`timeGrid-hour_wVF05`,timeGridHour:`timeGrid-hour_wVF05`,"timeGrid-bodyPane":`timeGrid-bodyPane_Ji1lF`,timeGridBodyPane:`timeGrid-bodyPane_Ji1lF`,"timeGrid-column":`timeGrid-column_mEJNy`,timeGridColumn:`timeGrid-column_mEJNy`,"timeGrid-column-today":`timeGrid-column-today_goKa0`,timeGridColumnToday:`timeGrid-column-today_goKa0`,"timeGrid-column-creatable":`timeGrid-column-creatable_5MQ8P`,timeGridColumnCreatable:`timeGrid-column-creatable_5MQ8P`,"timeGrid-event":`timeGrid-event_qLWLI`,timeGridEvent:`timeGrid-event_qLWLI`,"timeGrid-event-short":`timeGrid-event-short_akp1j`,timeGridEventShort:`timeGrid-event-short_akp1j`,"timeGrid-event-brief":`timeGrid-event-brief_AX4PC`,timeGridEventBrief:`timeGrid-event-brief_AX4PC`,"timeGrid-resize":`timeGrid-resize_LdiRH`,timeGridResize:`timeGrid-resize_LdiRH`,"timeGrid-event-continuesBefore":`timeGrid-event-continuesBefore_uGyO5`,timeGridEventContinuesBefore:`timeGrid-event-continuesBefore_uGyO5`,"timeGrid-event-continuesAfter":`timeGrid-event-continuesAfter_p-hcM`,timeGridEventContinuesAfter:`timeGrid-event-continuesAfter_p-hcM`,"timeGrid-event-interactive":`timeGrid-event-interactive_TXdJ8`,timeGridEventInteractive:`timeGrid-event-interactive_TXdJ8`,"timeGrid-event-dragged":`timeGrid-event-dragged_UrxXL`,timeGridEventDragged:`timeGrid-event-dragged_UrxXL`,"timeGrid-event-title":`timeGrid-event-title_uDvkI`,timeGridEventTitle:`timeGrid-event-title_uDvkI`,"timeGrid-event-time":`timeGrid-event-time_O5W3b`,timeGridEventTime:`timeGrid-event-time_O5W3b`,"timeGrid-preview":`timeGrid-preview_nfmke`,timeGridPreview:`timeGrid-preview_nfmke`,"timeGrid-preview-time":`timeGrid-preview-time_8hmVF`,timeGridPreviewTime:`timeGrid-preview-time_8hmVF`,"timeGrid-slot":`timeGrid-slot_s7iMI`,timeGridSlot:`timeGrid-slot_s7iMI`,"timeGrid-now":`timeGrid-now_Rs5aE`,timeGridNow:`timeGrid-now_Rs5aE`,calendarNowPulse:`calendarNowPulse_DDoyI`},Zr=[-1,0,1],Qr=Array.from({length:23},(e,t)=>t+1),$r=3,ei=45,ti=7,ni=4;function ri(){let[e,t]=(0,c.useState)(()=>new Date);return(0,c.useEffect)(()=>{let e;function n(){e=setTimeout(()=>{t(new Date),n()},6e4-Date.now()%6e4)}return n(),()=>clearTimeout(e)},[]),e}function ii({scroller:e,head:t,body:n},r,i,a,o){let s=r.current?.base??n.getBoundingClientRect().height/24;if(!s)return;let c=Math.max((e.clientHeight-t.offsetHeight)/24,1),l=Ir(i,Math.min(c,s),s*ni);r.current={hour:l,base:s},e.style.setProperty(`--custom-calendar-hour-height`,`${l}px`);let u=e.getBoundingClientRect().top;e.scrollTop=n.offsetTop+a*l-(o-u)}function ai({events:e,date:t,view:n,locale:r,weekStartsOn:i,slotMinutes:a,hidden:o,scrollToHour:s,text:u,onDateChange:p,onOpenDay:m,onEventClick:h,onEventChange:g,onSlotCreate:_,renderEvent:v,classNames:y,slotStyles:b,zoomRef:x}){let S=(0,c.useRef)(null),C=(0,c.useRef)(null),w=(0,c.useRef)(null),T=(0,c.useRef)(null),E=(0,c.useRef)(null),D=(0,c.useRef)(null),O=(0,c.useRef)(e),k=(0,c.useRef)(null),[A,j]=(0,c.useState)(null),[M,N]=(0,c.useState)(!1),P=ri(),F=n===Dn.Day?1:7,I=Hn(n,t,i).start,L=Yn(I,F,o),R=A?O.current:e,z=Br(Sn(I),e=>p(Kn(n,t,e,o)),()=>S.current);function B(){let e=S.current,t=C.current,n=w.current;return e&&t&&n?{scroller:e,head:t,body:n}:null}(0,c.useLayoutEffect)(()=>{let e=S.current,t=w.current;if(!e||!t)return;let n=t.offsetHeight/24;if(!n)return;let r=new Date,i=L.some(e=>Ln(e,r));e.scrollTop=Ir(s??(i?Math.max(0,Rn(r)/60-1):ti),0,24)*n},[]),(0,c.useEffect)(()=>{let e=S.current;if(!e)return;function t(e){if(!e.ctrlKey)return;let t=B();if(!t)return;e.preventDefault();let n=t.body.getBoundingClientRect(),r=n.height/24;r&&ii(t,x,r*Math.exp(-e.deltaY*.01),(e.clientY-n.top)/r,e.clientY)}return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[x]);function V(e){let t=T.current;if(!t)return null;let n=t.getBoundingClientRect();if(!n.width||!n.height)return null;let r=Ir(Math.floor((e.x-n.left)/n.width*L.length),0,L.length-1);return{day:In(I,L[r]),minutes:Ir((e.y-n.top)/n.height*On,0,On)}}function H(e){return In(I,e)*On+Rn(e)}function U(e,t){let n=V(t);if(!n)return null;let r=F*On;if(e.kind===`create`){let t=Math.floor(e.anchor/a)*a,[r,i]=n.minutes>=t?[t,Math.max(Math.ceil(n.minutes/a)*a,t+a)]:[Math.floor(n.minutes/a)*a,t+a],o=An(I,e.day),s=zn(o,r);return{start:s,end:Bn(s,zn(o,Math.min(i,On)),i-r)}}let i=n.day*On+n.minutes,o=H(e.event.start);if(e.kind===`move`){let t=Ir(Fr(i-e.grab,a),Math.min(o,0),r-a),n=zn(I,t),s=vr(e.event).getTime()-e.event.start.getTime();return{start:n,end:new Date(n.getTime()+s)}}let s=Ir(Fr(i,a),o+a,Math.max(r,o+a)),c=e.event.start;return{start:c,end:Bn(c,zn(I,s),s-o)}}function W(e){E.current=e,j(e)}function G(t){return e.find(e=>String(e.id)===t.dataset.calEvent)}Rr(S,{onPress:z.finish,canSwipe:()=>!0,onSwipeMove:z.move,onSwipeEnd:(e,t)=>z.settle(Nr(e,z.width(),t)),dragFrom:(e,t)=>{if(!T.current?.contains(e))return null;let n=V(t);if(!n)return null;let r=e.closest(`[data-cal-event]`);if(r){let t=g?G(r):void 0;if(!t||t.readOnly)return null;let i={start:t.start,end:vr(t)};return e.closest(`[data-cal-resize]`)?{kind:`resize`,event:t,...i}:{kind:`move`,event:t,grab:n.day*On+n.minutes-H(t.start),...i}}if(!_)return null;let i=An(I,n.day);return{kind:`create`,day:n.day,anchor:n.minutes,start:i,end:i}},onDragStart:(t,n)=>{O.current=e,W({...t,...U(t,n)})},onDragMove:e=>{let t=E.current,n=t&&U(t,e);t&&n&&(n.start.getTime()!==t.start.getTime()||n.end.getTime()!==t.end.getTime())&&W({...t,...n})},onDragEnd:e=>{let t=E.current;if(W(null),!t)return;let{start:n,end:r}=U(t,e)??t;if(t.kind===`create`){_?.({start:n,end:r,allDay:!1},te(t.day,n,r));return}(n.getTime()!==t.event.start.getTime()||r.getTime()!==vr(t.event).getTime())&&g?.({event:t.event,start:n,end:r})},onDragCancel:()=>W(null),onPinchStart:(e,t)=>{let n=w.current;if(!n)return;let r=n.getBoundingClientRect(),i=r.height/24;i&&(k.current={hour:i,anchorHour:(e.y-r.top)/i,distance:t})},onPinchMove:(e,t)=>{let n=k.current,r=B();n&&r&&n.distance&&ii(r,x,n.hour*t/n.distance,n.anchorHour,e.y)},onPinchEnd:()=>{k.current=null},autoScroll:()=>{let e=S.current,t=C.current;if(!e||!t)return null;let n=e.getBoundingClientRect();return{element:e,top:n.top+t.offsetHeight,bottom:n.bottom}}});function ee(e,t){if(!_||e.target.closest(`[data-cal-event]`))return;let n=e.currentTarget.getBoundingClientRect();if(!n.height)return;let r=(e.clientY-n.top)/n.height*On,i=zn(t,Ir(Math.floor(r/a)*a,0,On-a)),o=new Date(i.getTime()+Math.max(60,a)*6e4),s=zn(t,On),c={start:i,end:o<s?o:s,allDay:!1};_(c,te(In(I,t),c.start,c.end))}function te(e,t,n){let r=D.current;if(!r)return S.current;let i=An(I,e+1),a=Rn(t),o=n>=i?On:Rn(n),s=Math.max(L.findIndex(t=>In(I,t)===e),0);return r.style.left=`${s/L.length*100}%`,r.style.width=`${100/L.length}%`,r.style.top=`${a/On*100}%`,r.style.height=`${Math.max(o-a,0)/On*100}%`,r}function q(e){let{event:t}=e;return(0,f.jsx)(`button`,{type:`button`,"data-cal-event":String(t.id),className:(0,l.default)(Xr.timeGridBar,e.continuesBefore&&Xr.timeGridBarContinuesBefore,e.continuesAfter&&Xr.timeGridBarContinuesAfter,y?.event),style:{"--event-color":t.color,gridColumn:`${e.start+1} / span ${e.span}`,gridRow:e.lane+1,...b?.event},"aria-label":`${t.title}, ${u.allDay}`,onClick:e=>h?.(t,e.currentTarget),children:(0,f.jsx)(`span`,{className:Xr.timeGridBarTitle,"aria-hidden":!0,children:v?v(t,{singleLine:!0}):t.title})},t.id)}function ne(e){let{event:t}=e,n=e.bottom-e.top,i=n<ei,a=cr(t.start,vr(t),r),o=!!g&&!t.readOnly&&!e.continuesAfter,s=A&&A.kind!==`create`&&A.event===t;return(0,f.jsxs)(`button`,{type:`button`,"data-cal-event":String(t.id),"aria-label":`${t.title}, ${a}`,className:(0,l.default)(Xr.timeGridEvent,i&&Xr.timeGridEventShort,n<15&&Xr.timeGridEventBrief,e.continuesBefore&&Xr.timeGridEventContinuesBefore,e.continuesAfter&&Xr.timeGridEventContinuesAfter,(h||o)&&Xr.timeGridEventInteractive,s&&Xr.timeGridEventDragged,y?.event),style:{"--event-color":t.color,top:`${e.top/On*100}%`,"--span":`${n/On*100}%`,left:`calc(var(--column-width) * ${e.column/e.columns})`,width:`calc(var(--column-width) * ${e.span/e.columns})`,...b?.event},onClick:e=>h?.(t,e.currentTarget),children:[(0,f.jsx)(`span`,{className:Xr.timeGridEventTitle,"aria-hidden":!0,children:v?v(t,{singleLine:i}):t.title}),(0,f.jsx)(`span`,{className:Xr.timeGridEventTime,"aria-hidden":!0,children:lr(t.start,vr(t),r)}),o&&(0,f.jsx)(`span`,{"data-cal-resize":!0,className:Xr.timeGridResize,"aria-hidden":!0})]},t.id)}function J(e){if(!A)return null;let t=e,n=An(e,1);if(A.end<=t&&A.start<t||A.start>=n)return null;let i=A.start<t?0:Rn(A.start),a=A.end>=n?On:Rn(A.end),o=A.kind===`create`?void 0:A.event.color,s=A.kind===`create`?null:A.event.title;return(0,f.jsxs)(`div`,{className:Xr.timeGridPreview,style:{"--event-color":o,top:`${i/On*100}%`,height:`${Math.max(a-i,15)/On*100}%`},"aria-hidden":!0,children:[s&&(0,f.jsx)(`span`,{className:Xr.timeGridEventTitle,children:s}),(0,f.jsx)(`span`,{className:Xr.timeGridPreviewTime,children:lr(A.start,A.end,r)})]})}let re=Zr.map(e=>{let r=Hn(n,Kn(n,t,e,o),i).start,a=Yn(r,F,o),s=Tr(R,a,yr);return{step:e,start:r,dates:a,lanes:M?{visible:s,moreLane:0,hidden:a.map(()=>0)}:Er(s,a.length,$r)}}),ie=re[1].lanes.hidden.some(e=>e>0),ae=e=>(0,l.default)(Vr.pagerPane,e===-1&&Vr.pagerPanePrev,e===1&&Vr.pagerPaneNext);return(0,f.jsxs)(`div`,{ref:S,tabIndex:-1,className:Xr.timeGrid,style:{"--days":L.length,"--custom-calendar-hour-height":x.current?`${x.current.hour}px`:void 0},children:[(0,f.jsxs)(`div`,{ref:C,className:Xr.timeGridHead,children:[(0,f.jsx)(`div`,{className:Xr.timeGridCorner,children:(ie||M)&&(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(Xr.timeGridToggle,M&&Xr.timeGridToggleOpen),"aria-label":u.allDay,"aria-expanded":M,onClick:()=>N(e=>!e),children:K(d.faChevronDown)})}),(0,f.jsx)(`div`,{className:Vr.pagerViewport,children:(0,f.jsx)(`div`,{ref:z.trackRef,className:Vr.pagerTrack,children:re.map(({step:e,start:t,dates:n,lanes:i})=>(0,f.jsxs)(`div`,{className:(0,l.default)(ae(e),Xr.timeGridHeadPane),inert:e!==0,"aria-hidden":e!==0||void 0,children:[n.map(e=>{let t=Ln(e,P),n=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`span`,{className:Xr.timeGridWeekday,children:dr(e,r,`short`)}),(0,f.jsx)(`span`,{className:(0,l.default)(Xr.timeGridDayNumber,t&&Xr.timeGridDayNumberToday),children:fr(e,r)})]}),i={className:(0,l.default)(Xr.timeGridDayHeader,y?.dayHeader),style:b?.dayHeader,"aria-current":t?`date`:void 0};return F>1&&m?(0,f.jsx)(`button`,{type:`button`,...i,className:(0,l.default)(i.className,Xr.timeGridDayHeaderLink),"aria-label":pr(e,r),onClick:()=>m(e),children:n},Sn(e)):(0,f.jsx)(`div`,{...i,children:n},Sn(e))}),(0,f.jsxs)(`div`,{className:Xr.timeGridAllDay,"aria-label":u.allDay,role:`group`,children:[i.visible.map(q),i.hidden.map((e,t)=>e>0&&(0,f.jsx)(`div`,{"aria-hidden":!0,className:Xr.timeGridMore,style:{gridColumn:t+1,gridRow:i.moreLane+1},onClick:()=>N(!0),children:u.more(e)},`more-${t}`))]})]},Sn(t)))})})]}),(0,f.jsxs)(`div`,{ref:w,className:Xr.timeGridBody,children:[(0,f.jsx)(`div`,{className:Xr.timeGridGutter,"aria-hidden":!0,children:Qr.map(e=>(0,f.jsx)(`span`,{className:Xr.timeGridHour,style:{top:`${e/24*100}%`},children:ur(e,r)},e))}),(0,f.jsx)(`div`,{className:Vr.pagerViewport,children:(0,f.jsx)(`div`,{ref:z.trackRef,className:Vr.pagerTrack,children:re.map(({step:e,start:t,dates:n})=>(0,f.jsxs)(`div`,{ref:e===0?T:void 0,className:(0,l.default)(ae(e),Xr.timeGridBodyPane),inert:e!==0,"aria-hidden":e!==0||void 0,children:[n.map(t=>{let n=Ln(t,P);return(0,f.jsxs)(`div`,{role:`group`,"aria-label":pr(t,r),"data-cal-column":Sn(t),className:(0,l.default)(Xr.timeGridColumn,n&&Xr.timeGridColumnToday,_&&Xr.timeGridColumnCreatable,y?.cell),style:b?.cell,onClick:e=>ee(e,t),children:[Cr(R,t).map(ne),n&&(0,f.jsx)(`div`,{className:Xr.timeGridNow,style:{top:`${Rn(P)/1440*100}%`},"aria-hidden":!0}),e===0&&J(t)]},Sn(t))}),e===0&&(0,f.jsx)(`div`,{ref:D,className:Xr.timeGridSlot,"aria-hidden":!0})]},Sn(t)))})})]})]})}var oi={calendar:`calendar_ykrCR`},si=[Dn.Month,Dn.Week,Dn.Day,Dn.Agenda],ci=600,li={previous:`Previous`,next:`Next`,today:`Today`,viewSwitcher:`Calendar view`,month:`Month`,week:`Week`,day:`Day`,agenda:`Agenda`,allDay:`All day`,more:e=>`+${e} more`,eventCount:e=>e===1?`1 event`:`${e} events`,noEvents:`No events`,newEvent:`New event`};function ui(e){let{events:t,date:n,defaultDate:r,onDateChange:i,view:a,defaultView:o=Dn.Month,onViewChange:s,views:u=si,locale:d,weekStartsOn:p,slotMinutes:m=15,hiddenDays:h,scrollToHour:g,onRangeChange:_,onEventClick:v,onEventChange:y,onSlotCreate:b,renderEvent:x,labels:S,ref:C,className:w,style:T,classNames:E,styles:k,...A}=D(`Calendar`,e),j=O(`Calendar`,S,li),M=p??ar(d),N=Wn(h),P=(0,c.useRef)(null),F=(0,c.useRef)(null),[I,L]=(0,c.useState)(0),[R,z]=(0,c.useState)(1),[B,V]=(0,c.useState)(()=>{let e=bn(r);return e?Cn(e):kn(new Date)}),H=bn(n),U=Gn(H?Cn(H):B,N),[W,G]=(0,c.useState)(o),ee=a??W;(0,c.useLayoutEffect)(()=>{let e=P.current;if(!e)return;let t=()=>L(e.getBoundingClientRect().width);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let K=I>0&&I<ci,te=qn(ee,U,M,N),q=`${Sn(te.start)}/${Sn(te.end)}`,ne=(0,c.useRef)({range:te,onRangeChange:_}),J=(0,c.useRef)(null);(0,c.useLayoutEffect)(()=>{ne.current={range:te,onRangeChange:_}}),(0,c.useEffect)(()=>{J.current!==q&&(J.current=q,ne.current.onRangeChange?.(ne.current.range))},[q]);function re(e){let t=kn(e);Sn(t)!==Sn(U)&&(z(t>U?1:-1),n===void 0&&V(t),i?.(Sn(t)))}function ie(e){e!==ee&&(a===void 0&&G(e),s?.(e))}let[ae,oe]=(0,c.useState)(()=>new Map);function se(e){let t=y?.(e);if(typeof t?.then!=`function`)return;let n=String(e.event.id),r={start:e.start,end:e.end};oe(e=>new Map(e).set(n,r));let i=()=>oe(e=>{if(e.get(n)!==r)return e;let t=new Map(e);return t.delete(n),t});t.then(i,i)}let ce=ae.size===0?t:t.map(e=>{let t=ae.get(String(e.id));return t?{...e,...t}:e}),le={events:ce,date:U,view:ee,locale:d,weekStartsOn:M,slotMinutes:m,hidden:N,scrollToHour:g,text:j,onDateChange:re,onOpenDay:u.includes(Dn.Day)?e=>{re(e),ie(Dn.Day)}:void 0,onEventClick:v,onEventChange:y&&se,onSlotCreate:b,renderEvent:x,classNames:E,slotStyles:k},ue=Hn(ee,U,M),Y=Yn(ue.start,In(ue.start,ue.end),N),de={start:Y[0],end:An(Y[Y.length-1],1)};function fe(){switch(ee){case Dn.Week:case Dn.Day:return(0,f.jsx)(ai,{...le,zoomRef:F});case Dn.Agenda:return(0,f.jsx)(Or,{events:ce,start:ue.start,days:In(ue.start,ue.end),hidden:N,scrollTo:U,showDayHeaders:!0,locale:d,text:j,onEventClick:v,renderEvent:x,classNames:E,slotStyles:k});default:return K?(0,f.jsx)(Kr,{...le}):(0,f.jsx)(Yr,{...le})}}return(0,f.jsxs)(`div`,{...A,ref:gn(P,C),className:(0,l.default)(oi.calendar,w,E?.root),style:{...T,...k?.root},children:[(0,f.jsx)(Mr,{className:E?.header,style:k?.header,compact:K,title:hr(ee,U,de,d),direction:R,view:ee,views:u,text:j,onStep:e=>re(Kn(ee,U,e,N)),onToday:()=>re(new Date),onViewChange:ie}),fe()]})}var di=function(e){return e.Elevated=`elevated`,e.Outlined=`outlined`,e.Filled=`filled`,e}({}),fi={card:`card_w-6Ki`,"card-clip":`card-clip_eZ8-1`,cardClip:`card-clip_eZ8-1`,"card-padding":`card-padding_X2-q-`,cardPadding:`card-padding_X2-q-`,"card-gaps":`card-gaps_jhYkx`,cardGaps:`card-gaps_jhYkx`,"card-style-elevated":`card-style-elevated_exvMB`,cardStyleElevated:`card-style-elevated_exvMB`,"card-style-outlined":`card-style-outlined_PxZZA`,cardStyleOutlined:`card-style-outlined_PxZZA`,"card-style-filled":`card-style-filled_2nhAY`,cardStyleFilled:`card-style-filled_2nhAY`,"card-interactable":`card-interactable_az2lE`,cardInteractable:`card-interactable_az2lE`,"card-hover":`card-hover_fdS-X`,cardHover:`card-hover_fdS-X`,cardHeader:`cardHeader_HfIlm`,"cardHeader-thumbnail":`cardHeader-thumbnail_rFw-N`,cardHeaderThumbnail:`cardHeader-thumbnail_rFw-N`,"cardHeader-actions":`cardHeader-actions_awD46`,cardHeaderActions:`cardHeader-actions_awD46`,"cardHeader-titles":`cardHeader-titles_CAUU3`,cardHeaderTitles:`cardHeader-titles_CAUU3`,"cardHeader-titles-main":`cardHeader-titles-main_Z834V`,cardHeaderTitlesMain:`cardHeader-titles-main_Z834V`,"cardHeader-titles-main-container":`cardHeader-titles-main-container_1j-od`,cardHeaderTitlesMainContainer:`cardHeader-titles-main-container_1j-od`,"cardHeader-titles-sub":`cardHeader-titles-sub_2X08b`,cardHeaderTitlesSub:`cardHeader-titles-sub_2X08b`,cardMedia:`cardMedia_GZJQF`,cardActions:`cardActions_uYu-0`},pi={elevated:fi.cardStyleElevated,outlined:fi.cardStyleOutlined,filled:fi.cardStyleFilled};function mi(e){let{className:t=void 0,children:n=null,styleType:r=di.Elevated,onClick:i=void 0,tabIndex:a=null,hoverEffect:o=void 0,style:s=void 0,autoGap:u=!0,clip:d=!1,onKeyDown:p,classNames:m,styles:h,...g}=D(`Card`,e),_=!!i,v=(0,c.useRef)(null);function y(e){_&&j(e)&&v.current?.addRipple(),p?.(e)}return(0,f.jsx)(oe,{...g,className:(0,l.default)(fi.card,pi[r],d&&fi.cardClip,_&&fi.cardInteractable,(_&&o!==!1||o)&&fi.cardHover,t,m?.root),onClick:i,onKeyDown:y,tabIndex:a??(_?0:null),style:{...s,...h?.root},children:(0,f.jsx)(G,{ref:v,disabled:!_,className:(0,l.default)(fi.cardPadding,u&&fi.cardGaps,m?.content),style:{borderRadius:`inherit`,...h?.content},children:n})})}function hi({className:e=``,title:t=``,subTitle:n=``,thumbnail:r=``,actions:i=void 0}){let a=typeof r==`string`&&r.startsWith(`http`)?r:void 0;return(0,f.jsxs)(`div`,{className:(0,l.default)(fi.cardHeader,e),children:[r&&(0,f.jsx)(`div`,{className:fi.cardHeaderThumbnail,style:a?{backgroundImage:`url(${a})`}:{},children:!a&&r}),(0,f.jsxs)(`div`,{className:fi.cardHeaderTitles,children:[(0,f.jsxs)(`div`,{className:fi.cardHeaderTitlesMainContainer,children:[(0,f.jsx)(`div`,{className:fi.cardHeaderTitlesMain,children:t}),(0,f.jsx)(`div`,{className:fi.cardHeaderActions,children:Array.isArray(i)?i.map((e,t)=>(0,f.jsx)(ce,{title:e.title,onClick:e.onClick?t=>{t.stopPropagation(),e.onClick?.(t)}:void 0,icon:e.icon},t)):i})]}),(0,f.jsx)(`div`,{className:fi.cardHeaderTitlesSub,children:n})]})]})}function gi({src:e=``,alt:t=``}){return(0,f.jsx)(`img`,{className:fi.cardMedia,src:e,alt:t})}function _i({children:e=null}){return(0,f.jsx)(f.Fragment,{children:e})}function vi({className:e=``,actions:t=[],children:n=null}){return(0,f.jsxs)(`div`,{className:(0,l.default)(fi.cardActions,e),children:[t.map(({id:e,onClick:t,label:n,styleType:r=z.Default})=>(0,f.jsx)(`div`,{children:(0,f.jsx)(ne,{onClick:t,styleType:r,children:n})},e??n)),n]})}var yi={carousel:`carousel_-oOBA`,"carousel-adaptive":`carousel-adaptive_i4I4U`,carouselAdaptive:`carousel-adaptive_i4I4U`,"carousel-track":`carousel-track_tmtQz`,carouselTrack:`carousel-track_tmtQz`,"carousel-trackAdaptive":`carousel-trackAdaptive_Qzc0j`,carouselTrackAdaptive:`carousel-trackAdaptive_Qzc0j`,"carousel-slide":`carousel-slide_Qpgjn`,carouselSlide:`carousel-slide_Qpgjn`,"carousel-prevButton":`carousel-prevButton_P9QsH`,carouselPrevButton:`carousel-prevButton_P9QsH`,"carousel-nextButton":`carousel-nextButton_FgVo7`,carouselNextButton:`carousel-nextButton_FgVo7`,"carousel-buttonDisabled":`carousel-buttonDisabled_rGyW-`,carouselButtonDisabled:`carousel-buttonDisabled_rGyW-`,"carousel-dots":`carousel-dots_xyfSx`,carouselDots:`carousel-dots_xyfSx`,"carousel-dot":`carousel-dot_kPnww`,carouselDot:`carousel-dot_kPnww`,"carousel-dot-active":`carousel-dot-active_f9EJ1`,carouselDotActive:`carousel-dot-active_f9EJ1`},bi={"scroll-fade":`scroll-fade_owdg4`,scrollFade:`scroll-fade_owdg4`,"scroll-fade-y":`scroll-fade-y_wJ1fr`,scrollFadeY:`scroll-fade-y_wJ1fr`,"scroll-fade-x":`scroll-fade-x_WoTqS`,scrollFadeX:`scroll-fade-x_WoTqS`,"scroll-fade-faded-start":`scroll-fade-faded-start_x28G6`,scrollFadeFadedStart:`scroll-fade-faded-start_x28G6`,"scroll-fade-faded-end":`scroll-fade-faded-end_buuWg`,scrollFadeFadedEnd:`scroll-fade-faded-end_buuWg`},xi=10,Si=.2,Ci={previous:`Previous slide`,next:`Next slide`,slides:`Slides`,goToSlide:e=>`Go to slide ${e}`};function wi(e){let{children:t,currentIndex:n,defaultIndex:r=0,onChange:i=()=>{},loop:a=!0,autoPlay:o=!1,autoPlayInterval:s=4e3,pauseOnHover:u=!0,showArrows:p=!0,showDots:m=!0,swipeable:h=!0,lazyRender:g=!1,adaptiveHeight:_=!1,className:v,style:y,classNames:b,styles:x,labels:S,...C}=D(`Carousel`,e),w=O(`Carousel`,S,Ci),T=c.default.useId(),E=c.default.Children.toArray(t),k=E.length,A=a&&k>1,j=+!!A,M=A?[E[k-1],...E,E[0]]:E,N=n!==void 0,[P,F]=(0,c.useState)(()=>Ei(r,k,A)),I=Ei(N?n:P,k,A),[L,R]=(0,c.useState)(I+j),[z,B]=(0,c.useState)(!0),V=(0,c.useRef)(I),[H,U]=(0,c.useState)(!1),[W,G]=(0,c.useState)(!1),[ee,K]=(0,c.useState)(!1),te=(0,c.useRef)(null),q=(0,c.useRef)(null),ne=(0,c.useRef)(null),J=M.length>0?100/M.length:100;(0,c.useLayoutEffect)(()=>{let e=V.current;if(V.current=I,e===I)return;let t=M.length-1,n=L;A&&L===0?n=k:A&&L===t&&(n=1);let r=A&&e===k-1&&I===0,i=A&&e===0&&I===k-1,a;a=r?n+1:i?n-1:I+j;let o=q.current;n!==L&&o&&(o.style.transition=`none`,o.style.transform=Ti(n,0,J),o.offsetWidth,o.style.transition=``),B(!0),R(a)},[I]);let[re,ie]=(0,c.useState)(()=>({min:I+j-1,max:I+j+1})),ae=Math.min(re.min,L-1),se=Math.max(re.max,L+1),[le,ue]=(0,c.useState)(void 0);(0,c.useLayoutEffect)(()=>{if(!_)return;let e=q.current?.children[L];if(!e)return;let t=()=>ue(e.offsetHeight);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[_,L,k]),(0,c.useLayoutEffect)(()=>{let e=ne.current,t=e?.children[I];e&&t&&(e.scrollLeft=t.offsetLeft-(e.clientWidth-t.offsetWidth)/2)},[I,k]);function Y(e){let t=Ei(e,k,A);N||F(t),i(t)}function de(){!A&&I>=k-1||Y(I+1)}function fe(){!A&&I<=0||Y(I-1)}function pe(e){e.target===e.currentTarget&&(ie({min:L-1,max:L+1}),A&&(L===0?(B(!1),R(k)):L===M.length-1&&(B(!1),R(1))))}let me=o&&u,X=H||W||ee;(0,c.useEffect)(()=>{if(!o||k<=1||X)return;let e=setInterval(de,s);return()=>clearInterval(e)},[o,s,X,I,k]);let Z=(0,c.useRef)(null);function he(e){!h||k<=1||(Z.current={startX:e.clientX,startY:e.clientY,width:te.current?.getBoundingClientRect().width||1,axisLocked:!1,active:!0,offsetPercent:0})}function ge(e){let t=Z.current;if(!t||!t.active)return;let n=e.clientX-t.startX,r=e.clientY-t.startY;if(!t.axisLocked){if(Math.abs(n)<xi&&Math.abs(r)<xi)return;if(Math.abs(r)>Math.abs(n)){t.active=!1;return}t.axisLocked=!0,e.currentTarget.setPointerCapture?.(e.pointerId),K(!0),B(!1)}t.offsetPercent=n/t.width*100,q.current&&(q.current.style.transform=Ti(L,t.offsetPercent,J))}function _e(){let e=Z.current;if(Z.current=null,!e||!e.axisLocked){K(!1);return}B(!0),K(!1),q.current&&(q.current.style.transition=``,q.current.style.transform=Ti(L,0,J)),Math.abs(e.offsetPercent)>=Si*100&&(e.offsetPercent<0?de():fe())}function ve(e){e.defaultPrevented||q.current?.contains(e.target)||(e.key===`ArrowLeft`?(e.preventDefault(),fe()):e.key===`ArrowRight`&&(e.preventDefault(),de()))}function ye(e){let t=null;if(e.key===`ArrowLeft`?t=I-1:e.key===`ArrowRight`?t=I+1:e.key===`Home`?t=0:e.key===`End`&&(t=k-1),t===null)return;e.preventDefault();let n=Ei(t,k,A);Y(n),(ne.current?.children[n])?.focus()}let be=m&&k>1,xe=e=>`${T}-dot-${e}`,Se=e=>`${T}-slide-${e}`,Ce=C[`aria-label`]!==void 0||C[`aria-labelledby`]!==void 0;function we(e){return be?{id:Se(e),role:`tabpanel`,"aria-labelledby":xe(e)}:{id:Se(e),role:`group`,"aria-roledescription":`slide`,"aria-label":`${e+1} of ${k}`}}let Te=!A&&I<=0,Ee=!A&&I>=k-1,De=Ti(L,0,J);return(0,f.jsxs)(`div`,{...C,ref:te,role:Ce?`region`:`group`,"aria-roledescription":`carousel`,className:(0,l.default)(yi.carousel,_&&yi.carouselAdaptive,b?.root,v),style:{height:_?le:void 0,...y,...x?.root},onMouseEnter:me?()=>U(!0):void 0,onMouseLeave:me?()=>U(!1):void 0,onFocus:me?()=>G(!0):void 0,onBlur:me?()=>G(!1):void 0,onKeyDown:ve,children:[(0,f.jsx)(`div`,{ref:q,className:(0,l.default)(yi.carouselTrack,_&&yi.carouselTrackAdaptive,b?.track),style:{width:`${M.length*100}%`,transform:De,transition:z?void 0:`none`,...x?.track},"aria-live":o?`off`:`polite`,onTransitionEnd:pe,onPointerDown:he,onPointerMove:ge,onPointerUp:_e,onPointerCancel:_e,children:M.map((e,t)=>{let n=A&&(t===0||t===M.length-1),r=t-j,i=!n&&r===I,a=!g||t>=ae&&t<=se;return(0,f.jsx)(`div`,{...n?{}:we(r),className:(0,l.default)(yi.carouselSlide,b?.slide),style:{width:`${100/M.length}%`,...x?.slide},inert:!i||void 0,children:a?e:null},`carousel-slide-${t}`)})}),p&&k>1&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(ce,{icon:d.faChevronLeft,title:w.previous,"aria-label":w.previous,"aria-disabled":Te||void 0,onClick:()=>!Te&&fe(),className:(0,l.default)(yi.carouselPrevButton,Te&&yi.carouselButtonDisabled,b?.prevButton),style:x?.prevButton}),(0,f.jsx)(ce,{icon:d.faChevronRight,title:w.next,"aria-label":w.next,"aria-disabled":Ee||void 0,onClick:()=>!Ee&&de(),className:(0,l.default)(yi.carouselNextButton,Ee&&yi.carouselButtonDisabled,b?.nextButton),style:x?.nextButton})]}),be&&(0,f.jsx)(`div`,{ref:ne,role:`tablist`,"aria-label":w.slides,className:(0,l.default)(yi.carouselDots,bi.scrollFade,bi.scrollFadeX,bi.scrollFadeFadedStart,bi.scrollFadeFadedEnd,b?.dots),style:x?.dots,onKeyDown:ye,children:E.map((e,t)=>(0,f.jsx)(oe,{id:xe(t),role:`tab`,"aria-label":w.goToSlide(t+1),"aria-selected":t===I,"aria-controls":Se(t),tabIndex:t===I?0:-1,onClick:()=>Y(t),className:(0,l.default)(yi.carouselDot,t===I&&yi.carouselDotActive,b?.dot),style:x?.dot},`carousel-dot-${t}`))})]})}function Ti(e,t,n){return`translateX(calc(${-e*n}% + ${n/100*t}%))`}function Ei(e,t,n){return t===0?0:n?(e%t+t)%t:Math.max(0,Math.min(t-1,e))}var Di={checkbox:`checkbox_VO3c2`,"checkbox-icon":`checkbox-icon_7O0Hm`,checkboxIcon:`checkbox-icon_7O0Hm`,"checkbox-loading":`checkbox-loading_4t2-w`,checkboxLoading:`checkbox-loading_4t2-w`,"checkbox-loading-box":`checkbox-loading-box_XBIHw`,checkboxLoadingBox:`checkbox-loading-box_XBIHw`,"checkbox-loading-spinner":`checkbox-loading-spinner_XzXt4`,checkboxLoadingSpinner:`checkbox-loading-spinner_XzXt4`,"checkbox-pointer":`checkbox-pointer_XnO8e`,checkboxPointer:`checkbox-pointer_XnO8e`,"checkbox-disabled":`checkbox-disabled_ML2rR`,checkboxDisabled:`checkbox-disabled_ML2rR`,"checkbox-checkmark":`checkbox-checkmark_Xclv9`,checkboxCheckmark:`checkbox-checkmark_Xclv9`,"checkbox-checkmark-checked":`checkbox-checkmark-checked_mD4FI`,checkboxCheckmarkChecked:`checkbox-checkmark-checked_mD4FI`};function Oi(e){let{label:t=``,selected:n=!1,onToggle:r=()=>{},className:i=``,style:a,disabled:o=!1,lineHeight:s=``,title:u=``,tabIndex:d=0,cursorDefault:p=!1,width:m,height:h,formValidator:g=null,children:_=null,background:v=null,isLoading:y=!1,classNames:b,styles:x,...S}=D(`Checkbox`,e),C=(0,c.useRef)(null),[,w]=(0,c.useState)(0);(0,c.useEffect)(()=>{if(!g)return;let e=()=>w(e=>e+1);return g.registerOnUpdateListener(e),()=>g.removeOnUpdateListener(e)},[g]);function T(e){o||y||(C.current?.addRipple(),g&&g.set(!g.value),r(!n,e))}let E=g?g.value:n;return(0,f.jsxs)(`div`,{...S,className:(0,l.default)(Di.checkbox,{[Di.checkboxDisabled]:o,[Di.checkboxPointer]:!p},i),style:{...m?{"--checkbox-size":m}:null,...a},onClick:T,onKeyPress:e=>{e.key===`Enter`&&T(e)},role:`checkbox`,"aria-checked":E,"aria-disabled":o||void 0,tabIndex:d,children:[(0,f.jsx)(`div`,{title:u,className:(0,l.default)(Di.checkboxIcon,y?Di.checkboxLoading:null,b?.icon),style:x?.icon,children:y?(0,f.jsx)(`div`,{className:Di.checkboxLoadingBox,style:{width:m,height:h},children:(0,f.jsx)(R,{className:Di.checkboxLoadingSpinner})}):(0,f.jsxs)(`div`,{style:{width:m,height:h,...v?{"--checkbox-fill":v}:null,...x?.checkmark},className:(0,l.default)(Di.checkboxCheckmark,E&&Di.checkboxCheckmarkChecked,b?.checkmark),children:[(0,f.jsx)(G,{ref:C,manualOnly:!0,overflowHidden:!1,rippleAnimationLength:.3,rippleBackground:`radial-gradient(transparent, var(--primary-color))`}),(0,f.jsx)(`svg`,{strokeLinejoin:`round`,strokeLinecap:`round`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`-0.5 -1.5 4 2.6`,children:(0,f.jsx)(`path`,{d:`M 0 0 l 1 1 l 2 -2`,strokeWidth:`0.4`,fill:`none`})})]})}),(0,f.jsx)(`div`,{className:b?.label,style:{lineHeight:s||`100%`,...x?.label},children:_||t})]})}var ki=function(e){return e.Default=`default`,e.Primary=`primary`,e.Info=`info`,e.Warn=`warn`,e.Error=`error`,e}({}),Ai={chip:`chip_rCTMl`,"chip-clickable":`chip-clickable_WTVjG`,chipClickable:`chip-clickable_WTVjG`,"chip-style-default":`chip-style-default_ppCDx`,chipStyleDefault:`chip-style-default_ppCDx`,"chip-style-primary":`chip-style-primary_oyE85`,chipStylePrimary:`chip-style-primary_oyE85`,"chip-style-info":`chip-style-info_GNJrm`,chipStyleInfo:`chip-style-info_GNJrm`,"chip-style-warn":`chip-style-warn_Jx3LU`,chipStyleWarn:`chip-style-warn_Jx3LU`,"chip-style-error":`chip-style-error_-Npvg`,chipStyleError:`chip-style-error_-Npvg`,"chip-inner":`chip-inner_mfo-w`,chipInner:`chip-inner_mfo-w`,"chip-text":`chip-text_d1juf`,chipText:`chip-text_d1juf`,"chip-thumbnail":`chip-thumbnail_-A7eU`,chipThumbnail:`chip-thumbnail_-A7eU`,"chip-container":`chip-container_oNNmF`,chipContainer:`chip-container_oNNmF`,"chip-container-inline":`chip-container-inline_11QHw`,chipContainerInline:`chip-container-inline_11QHw`},ji={default:Ai.chipStyleDefault,primary:Ai.chipStylePrimary,info:Ai.chipStyleInfo,warn:Ai.chipStyleWarn,error:Ai.chipStyleError},Mi={remove:`Remove`};function Ni(e){let{className:t=``,thumbnail:n=``,text:r=``,styleType:i=ki.Default,showRemoveIcon:a=!1,labels:o,onClick:s,onRemove:u,style:p,classNames:m,styles:h,...g}=D(`Chip`,e),_=O(`Chip`,o,Mi),v=(0,c.useRef)(null);function y(e){s&&j(e)&&v.current?.addRipple()}let b=(0,c.useMemo)(()=>{if(typeof n==`string`&&n.startsWith(`http`))return n},[n]);return(0,f.jsx)(oe,{...g,className:(0,l.default)(Ai.chip,ji[i],s&&Ai.chipClickable,t,m?.root),style:{...p,...h?.root},onClick:s,onKeyDown:y,children:(0,f.jsx)(G,{ref:v,disabled:!s,style:{borderRadius:`inherit`},children:(0,f.jsxs)(`div`,{className:(0,l.default)(Ai.chipInner,m?.inner),style:h?.inner,children:[n&&(0,f.jsx)(`div`,{className:(0,l.default)(Ai.chipThumbnail,m?.thumbnail),style:{...b?{backgroundImage:`url(${b})`}:{},...h?.thumbnail},children:!b&&n}),(0,f.jsx)(`div`,{className:(0,l.default)(Ai.chipText,m?.text),style:h?.text,children:r}),a&&(0,f.jsx)(ce,{icon:d.faXmarkCircle,className:m?.removeIcon,style:h?.removeIcon,"aria-label":_.remove,onClick:e=>{e.stopPropagation(),u?.()}})]})})})}function Pi({className:e=void 0,children:t=null,inline:n=!1,...r}){return(0,f.jsx)(`div`,{...r,className:(0,l.default)(Ai.chipContainer,n&&Ai.chipContainerInline,e),children:t})}var Fi={tooltipBubble:`tooltipBubble_uyev0`,tooltipError:`tooltipError_gUBut`,tooltipDetails:`tooltipDetails_R7N16`,"tooltipDetails-icon":`tooltipDetails-icon_rsjns`,tooltipDetailsIcon:`tooltipDetails-icon_rsjns`},Ii=6,Li={details:`More information`};function Ri({variant:e,message:t=``,isVisible:n=!0,tooltipPosition:r,onClick:i,labels:a}){let[o,s]=(0,c.useState)(!1),u=O(`Tooltip`,a,Li),d=(0,c.useRef)(null),p=(0,c.useRef)(null),m=(0,c.useRef)(null),h=(0,c.useRef)(null),g=(0,c.useRef)(null),[_,v]=(0,c.useState)(10),y=(0,c.useId)(),b=e===`details`?o:n;(0,c.useLayoutEffect)(()=>{m.current=e===`details`?p.current:d.current?.parentElement??null}),(0,c.useEffect)(()=>{let e=m.current;if(e&&b)return e.setAttribute(`aria-describedby`,y),()=>e.removeAttribute(`aria-describedby`)},[b,y]),(0,c.useLayoutEffect)(()=>{if(b){let e=m.current?.getBoundingClientRect();v(e?.width??10)}},[b]),Vt({isOpen:b,placement:wt.Top,align:e===`error`?Tt.End:Tt.Start,offset:Ii,triggerRef:m,floatingRef:h,panelRef:h,arrowRef:g,shrinkToFit:!0});let x=b&&(0,f.jsx)(_e,{children:(0,f.jsx)(`div`,{ref:h,id:y,role:e===`error`?`alert`:`tooltip`,className:(0,l.default)(e===`error`?Fi.tooltipError:Fi.tooltipBubble,r),style:{"--tooltip-trigger-width":`${_}px`},onClick:i,children:t})});return e===`details`?(0,f.jsxs)(`div`,{ref:p,className:Fi.tooltipDetails,children:[(0,f.jsx)(`span`,{className:Fi.tooltipDetailsIcon,role:`button`,tabIndex:0,"aria-label":u.details,"aria-expanded":o,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onFocus:()=>s(!0),onBlur:()=>s(!1),onKeyDown:e=>{j(e)&&(e.preventDefault(),s(e=>!e))},children:`?`}),x]}):e===`info`||e===`error`?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`span`,{ref:d,style:{display:`none`}}),x]}):null}var zi={animatedIcon:`animatedIcon_vyzvJ`,"animatedIcon-spin":`animatedIcon-spin_B9YzP`,animatedIconSpin:`animatedIcon-spin_B9YzP`,"animatedIcon-layer":`animatedIcon-layer_-9A1a`,animatedIconLayer:`animatedIcon-layer_-9A1a`,"animatedIcon-layer-front":`animatedIcon-layer-front_q9UVU`,animatedIconLayerFront:`animatedIcon-layer-front_q9UVU`};function Bi(e){return`${e.prefix}:${e.iconName}`}var Vi=360;function Hi({icon:e,duration:t=200,spin:n=!1,className:r,style:i,onClick:a,onMouseEnter:o,onMouseLeave:s,classNames:d,styles:p,...m}){let[h,g]=(0,c.useState)([e,e]),[_,v]=(0,c.useState)(0),[y,b]=(0,c.useState)(0);if(Bi(e)!==Bi(h[_])){let t=+(_===0),r=[...h];r[t]=e,g(r),v(t),n&&b(e=>e+1)}return(0,f.jsxs)(`span`,{...m,className:(0,l.default)(zi.animatedIcon,{[zi.animatedIconSpin]:n},d?.root,r),style:{...i,...p?.root,"--animated-icon-duration":`${t}ms`,"--animated-icon-spin-rotation":`${y*Vi}deg`},onClick:a,onMouseEnter:o,onMouseLeave:s,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:h[0],className:(0,l.default)(zi.animatedIconLayer,{[zi.animatedIconLayerFront]:_===0},d?.icon),style:p?.icon}),(0,f.jsx)(u.FontAwesomeIcon,{icon:h[1],className:(0,l.default)(zi.animatedIconLayer,{[zi.animatedIconLayerFront]:_===1},d?.icon),style:p?.icon})]})}var Ui={"required-mark":`required-mark_xGJdX`,requiredMark:`required-mark_xGJdX`,input:`input_VKNCE`,"input-placeholder":`input-placeholder_IZH-l`,inputPlaceholder:`input-placeholder_IZH-l`,"input-placeholder-shown":`input-placeholder-shown_mm35e`,inputPlaceholderShown:`input-placeholder-shown_mm35e`,fadeIn:`fadeIn_kmX3i`,"input-placeholder-multiline":`input-placeholder-multiline_tLHAl`,inputPlaceholderMultiline:`input-placeholder-multiline_tLHAl`,"input-matLabel":`input-matLabel_-05ey`,inputMatLabel:`input-matLabel_-05ey`,"input-matLabel-floating":`input-matLabel-floating_1P2YE`,inputMatLabelFloating:`input-matLabel-floating_1P2YE`,"input-matLabel-multiline":`input-matLabel-multiline_miIZJ`,inputMatLabelMultiline:`input-matLabel-multiline_miIZJ`,"input-fieldset":`input-fieldset_XCibg`,inputFieldset:`input-fieldset_XCibg`,"input-fieldset-legend":`input-fieldset-legend_X23zp`,inputFieldsetLegend:`input-fieldset-legend_X23zp`,"input-fieldset-legend-active":`input-fieldset-legend-active_t-9hu`,inputFieldsetLegendActive:`input-fieldset-legend-active_t-9hu`,"input-iconLeft":`input-iconLeft_itIuo`,inputIconLeft:`input-iconLeft_itIuo`,"input-container":`input-container_M1RoG`,inputContainer:`input-container_M1RoG`,"input-container-multiline":`input-container-multiline_eLw7h`,inputContainerMultiline:`input-container-multiline_eLw7h`,"input-container-border":`input-container-border_l131I`,inputContainerBorder:`input-container-border_l131I`,"input-container-border-focused":`input-container-border-focused_ct6oY`,inputContainerBorderFocused:`input-container-border-focused_ct6oY`,"input-container-border-searchFocused":`input-container-border-searchFocused_lq088`,inputContainerBorderSearchFocused:`input-container-border-searchFocused_lq088`,"input-container-border-invalid":`input-container-border-invalid_Wdbq2`,inputContainerBorderInvalid:`input-container-border-invalid_Wdbq2`,"input-container-border-error":`input-container-border-error_gzfPG`,inputContainerBorderError:`input-container-border-error_gzfPG`,"input-label":`input-label_w1hMR`,inputLabel:`input-label_w1hMR`,"input-label-column":`input-label-column_qBFPC`,inputLabelColumn:`input-label-column_qBFPC`,"input-label-text":`input-label-text_-J5qQ`,inputLabelText:`input-label-text_-J5qQ`,"input-upper-right-label":`input-upper-right-label_I-WG3`,inputUpperRightLabel:`input-upper-right-label_I-WG3`,"input-field":`input-field_pmDvZ`,inputField:`input-field_pmDvZ`,inputAutofillStart:`inputAutofillStart_tOifY`,inputAutofillEnd:`inputAutofillEnd_KLDQQ`,"input-field-withIcon":`input-field-withIcon_VpfmK`,inputFieldWithIcon:`input-field-withIcon_VpfmK`,"input-field-withIcon-left":`input-field-withIcon-left_Io7lU`,inputFieldWithIconLeft:`input-field-withIcon-left_Io7lU`,"input-field-suffix":`input-field-suffix_NZpXp`,inputFieldSuffix:`input-field-suffix_NZpXp`,"input-field-date":`input-field-date_UHJEZ`,inputFieldDate:`input-field-date_UHJEZ`,"input-field-default":`input-field-default_TKipA`,inputFieldDefault:`input-field-default_TKipA`,"input-field-readOnly":`input-field-readOnly_Eut34`,inputFieldReadOnly:`input-field-readOnly_Eut34`,"input-field-uppercase":`input-field-uppercase_UV6f1`,inputFieldUppercase:`input-field-uppercase_UV6f1`,"input-field-multiline":`input-field-multiline_al3V1`,inputFieldMultiline:`input-field-multiline_al3V1`,"input-field-multiline-autoResize":`input-field-multiline-autoResize_nK33P`,inputFieldMultilineAutoResize:`input-field-multiline-autoResize_nK33P`,"input-field-icon":`input-field-icon_YyJIr`,inputFieldIcon:`input-field-icon_YyJIr`,"input-field-icon-left":`input-field-icon-left_m2XB1`,inputFieldIconLeft:`input-field-icon-left_m2XB1`,"input-field-icon-notClickable":`input-field-icon-notClickable_7j24I`,inputFieldIconNotClickable:`input-field-icon-notClickable_7j24I`,"input-error":`input-error_LIG23`,inputError:`input-error_LIG23`},Wi=function(e){return e.Edit=`edit`,e.Phone=`phone`,e.Email=`email`,e.Iban=`iban`,e.Date=`date`,e.HasNoIcon=`hasNoIcon`,e.Search=`searchInput`,e.Password=`password`,e}({}),Gi=function(e){return e.Left=`left`,e.Right=`right`,e}({}),Ki={clear:`Clear`,showPassword:`Show password`,hidePassword:`Hide password`,clearSearch:`Clear search`};function qi(e){if(e)return{role:`button`,tabIndex:0,onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),e(t))}}}function Ji(e){let{name:t=``,id:n,label:r=``,errorMessage:i=``,isValid:a=!0,className:o=``,style:s,value:p=``,icon:m=null,iconPosition:h,onChange:g=()=>{},onFocus:_=null,onBlur:v=null,onMouseEnter:y=null,onMouseLeave:b=null,isUppercase:x=!1,isRequired:S=!1,tabIndex:C=0,type:w=void 0,isRow:T=!1,onIconClick:E=null,parse:k=null,formValidator:A=null,autoFocus:j=!1,suffix:M=null,upperRightLabel:N=null,labelInBorder:P=!1,showCancel:F=!1,onClearClicked:I,min:L=null,max:R=null,placeholder:z=``,useMatLabelStyle:B=!0,alwaysFloatLabel:V=!1,autoComplete:H=null,onClick:U=()=>null,readOnly:W=!1,customInput:G,alwaysShowCancel:ee=!1,multiline:K=!1,rows:te,autoResize:q=!1,classNames:ne,styles:J,disabled:re=!1,labels:ie,ref:ae,...oe}=D(`Input`,e),se=O(`Input`,ie,Ki),[ce,le]=(0,c.useState)(!1),[ue,Y]=(0,c.useState)(!1),[de,fe]=(0,c.useState)(!1),[pe,me]=(0,c.useState)(!1),[,X]=(0,c.useState)(0),Z=(0,c.useRef)(null),he=(0,c.useRef)(A),ge=(0,c.useId)(),_e=n||t||ge,ve=A?A.value:p,ye=(0,c.useRef)(!1),be=(0,c.useCallback)(()=>{let e=Z.current;if(e){if(!q){ye.current&&=(e.style.height=``,!1);return}e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`,ye.current=!0}},[q]);(0,c.useEffect)(()=>{be()},[be,ve]),(0,c.useEffect)(()=>{j&&Z.current&&setTimeout(()=>{Z.current?.focus()},1)},[j]),(0,c.useEffect)(()=>{he.current=A;let e=he.current;if(!e)return;e.label=r??``,e.validate();let t=()=>X(e=>e+1);return e.registerOnUpdateListener(t),()=>{e.removeOnUpdateListener(t)}},[A,r]);let xe=()=>A?A.touched&&A.hasError():!a||!!i,Se=()=>!!(S||A&&A.validators.find(e=>e.validatorId===`required`)),Ce=e=>{fe(!0),y&&y(e)},we=e=>{fe(!1),b&&b(e)},Te=e=>{le(!0),_&&_(e)},Ee=e=>{he.current&&(he.current.touched=!0),le(!1),v&&v(e)},De=e=>{let t,n;typeof e==`string`?n=e:(t=e,n=e.target.value),k&&(n=k(n)),A&&A.set(n),g&&g(n,t),be()},Oe=()=>{if(w!==Wi.Email)return w===Wi.Phone?`tel`:w===Wi.Search?`search`:w===`password`&&pe?`text`:w},ke=()=>{if(w===Wi.Email)return`email`;if(w===Wi.Phone)return`tel`;if(w===Wi.Search)return`search`},Ae=w&&w!==Wi.Date&&w!==Wi.Iban&&w!==Wi.HasNoIcon,je=w===Wi.Search||w===Wi.Password,Me=!!m,Ne=Me&&!je,Pe=w===Wi.Email||w===Wi.Phone||w===Wi.Search,Q=(h??(!B&&Pe?Gi.Left:Gi.Right))===Gi.Left,Fe={className:(0,l.default)(Ui.inputFieldIcon,{[Ui.inputFieldIconNotClickable]:!E,[Ui.inputFieldIconLeft]:Q}),onClick:E??void 0,...qi(E)},Ie=m,Le=E??Ie?.props.onClick,Re=Ne&&Ie?c.default.cloneElement(Ie,{className:(0,l.default)(Ui.inputFieldIcon,{[Ui.inputFieldIconNotClickable]:!Le,[Ui.inputFieldIconLeft]:Q},Ie.props.className),onClick:Le,...qi(Le)}):null,ze=(Ae||Me)&&Q,Be={className:(0,l.default)(Ui.inputFieldIcon,Ui.inputFieldIconPassword,{[Ui.inputFieldIconLeft]:Q}),onClick:()=>me(!pe),...qi(()=>me(!pe)),"aria-label":pe?se.hidePassword:se.showPassword},Ve=xe(),He=r;He&&Se()&&(He=`${He} *`);let Ue=Se()?(0,f.jsx)(`span`,{className:Ui.requiredMark,children:`*`}):null,We=ce&&!W,Ge=B&&(V||We||ve||ue||w===Wi.Date),Ke=e=>{let{animationName:t}=e;if(t===Ui.inputAutofillStart){Y(!0);let t=e.currentTarget.value;t&&t!==String(ve??``)&&De(t);return}if(t===Ui.inputAutofillEnd){Y(!1);return}oe.onAnimationStart?.(e)},qe=w===Wi.Search&&!!ve,Je=G?.props;function Ye(){A&&A.set(``),g?.(``),I?.()}return(0,f.jsxs)(`div`,{className:(0,l.default)(Ui.input,{[Ui.inputIconLeft]:ze},o),style:s,children:[(0,f.jsxs)(`label`,{htmlFor:_e,className:(0,l.default)(Ui.inputLabel,ne?.label,{[Ui.inputLabelColumn]:!T,[Ui.inputLabelInBorder]:P}),style:J?.label,children:[r&&!B?(0,f.jsxs)(`span`,{className:Ui.inputLabelText,children:[r,Ue]}):null,N&&(0,f.jsx)(`div`,{className:(0,l.default)(Ui.inputUpperRightLabel,ne?.upperRightLabel),style:J?.upperRightLabel,children:N}),(0,f.jsxs)(`div`,{className:(0,l.default)(Ui.inputContainer,{[Ui.inputContainerMultiline]:K},ne?.container),style:J?.container,onMouseEnter:Ce,onMouseLeave:we,children:[Re,c.default.cloneElement(G||(K?(0,f.jsx)(`textarea`,{}):(0,f.jsx)(`input`,{})),{...oe,className:(0,l.default)(Ui.inputField,{[Ui.inputFieldUppercase]:x,[Ui.inputFieldDate]:w===Wi.Date,[Ui.inputFieldDefault]:w!==Wi.Date,[Ui.inputFieldWithIcon]:Ae||Me,[Ui.inputFieldWithIconLeft]:ze,[Ui.inputFieldMultiline]:K,[Ui.inputFieldMultilineAutoResize]:K&&q,[Ui.inputFieldReadOnly]:W&&!re},ne?.input,Je?.className),style:Je?.style||J?.input?{...Je?.style,...J?.input}:void 0,name:t,id:_e,value:ve,tabIndex:C,ref:G?void 0:gn(Z,ae),onChange:De,onAnimationStart:Ke,onFocus:Te,onBlur:Ee,placeholder:B?``:z,autoComplete:H,onClick:U,readOnly:W,disabled:re,...!K&&{type:Oe(),inputMode:oe.inputMode??ke(),min:L,max:R},...K&&te!==void 0&&{rows:te}}),M&&(0,f.jsx)(`div`,{className:(0,l.default)(Ui.inputFieldSuffix,ne?.suffix),style:J?.suffix,children:M})]}),(0,f.jsx)(`fieldset`,{className:(0,l.default)(Ui.inputFieldset,ne?.fieldset,{[Ui.inputContainerBorderFocused]:We,[Ui.inputContainerBorderSearchFocused]:w===Wi.Search&&(We||!!ve),[Ui.inputContainerBorderInvalid]:Ve,[Ui.inputContainerBorderError]:Ve}),style:J?.fieldset,children:(0,f.jsx)(`legend`,{className:(0,l.default)(Ui.inputFieldsetLegend,{[Ui.inputFieldsetLegendActive]:Ge}),children:(0,f.jsx)(`span`,{children:He})})}),B&&r&&(0,f.jsxs)(`div`,{className:(0,l.default)(Ui.inputMatLabel,{[Ui.inputMatLabelFloating]:Ge,[Ui.inputMatLabelMultiline]:K&&!Ge}),children:[r,Ue]}),B&&z&&(0,f.jsx)(`div`,{className:(0,l.default)(Ui.inputPlaceholder,We&&!ve&&!ue&&Ui.inputPlaceholderShown,K&&Ui.inputPlaceholderMultiline),children:z}),(0,f.jsx)(Ri,{variant:`error`,message:A?A.getCurrentErrorMessage():i||``,isVisible:Ve&&(ce||de)})]}),w===Wi.Phone&&!Me&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faPhone,...Fe}),w===Wi.Email&&!Me&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faEnvelope,...Fe}),w===Wi.Edit&&!Me&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faPen,...Fe}),w===Wi.Search&&(0,f.jsx)(Hi,{icon:qe?d.faXmark:d.faSearch,className:(0,l.default)(Ui.inputFieldIcon,{[Ui.inputFieldIconNotClickable]:!qe,[Ui.inputFieldIconLeft]:Q}),onClick:qe?Ye:void 0,...qi(qe?Ye:void 0),"aria-label":qe?se.clearSearch:void 0}),w===Wi.Password&&(0,f.jsx)(u.FontAwesomeIcon,{icon:pe?d.faEyeSlash:d.faEye,...Be}),(F&&ve&&(ce||de)||ee)&&w!==Wi.Search&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faXmark,className:Ui.inputFieldIcon,onClick:Ye,onMouseEnter:()=>fe(!0),onMouseLeave:()=>fe(!1),...qi(Ye),"aria-label":se.clear})]})}var Yi,Xi=/^#([0-9a-f]{6}|[0-9a-f]{8})$/i,Zi=`#010203`,Qi=`#040506`;function $i(e){return Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`)}function ea(e,t,n,r){let i=Math.round(r);return`#${$i(e)}${$i(t)}${$i(n)}${i===255?``:$i(i)}`}function ta(e){let t=e?.trim();if(!t)return;if(Xi.test(t))return t;if(Yi===void 0&&(Yi=document.createElement(`canvas`).getContext(`2d`)),!Yi)return;Yi.fillStyle=Zi,Yi.fillStyle=t;let n=Yi.fillStyle;if(Yi.fillStyle=Qi,Yi.fillStyle=t,Yi.fillStyle!==n)return;if(n.startsWith(`#`))return n;let r=/^rgba?\(([^)]+)\)$/i.exec(n);if(r){let[e,t,n,i=`1`]=r[1].split(`,`).map(e=>e.trim());return ea(Number(e),Number(t),Number(n),Number(i)*255)}Yi.clearRect(0,0,1,1),Yi.fillRect(0,0,1,1);let[i,a,o,s]=Yi.getImageData(0,0,1,1).data;return ea(i,a,o,s)}var na={colorPicker:`colorPicker_Ts3an`,swatch:`swatch_NW78g`,swatchHex:`swatchHex_j7-i5`,swatchFill:`swatchFill_oNtHf`,panel:`panel_WXEvY`,gradientArea:`gradientArea_qEZim`,gradientOverlay:`gradientOverlay_ZQybe`,cursor:`cursor_m67Lm`,hueSlider:`hueSlider_k3Knb`,alphaSlider:`alphaSlider_OT2sD`,hexRow:`hexRow_L4bZU`,hexInput:`hexInput_zQw4s`,eyeDropperButton:`eyeDropperButton_dOyRX`},ra=typeof window<`u`&&`EyeDropper`in window;async function ia(){let e=window.EyeDropper;if(!e)return null;try{return(await new e().open()).sRGBHex}catch{return null}}function aa(e){return Math.max(0,Math.min(100,e))}function oa(e){return/^#[0-9a-fA-F]{6}$/.test(e)||/^#[0-9a-fA-F]{8}$/.test(e)}function sa(e){return/^#[0-9a-fA-F]{8}$/.test(e)?{hex6:e.slice(0,7),alpha:parseInt(e.slice(7,9),16)/255*100}:{hex6:e.slice(0,7),alpha:100}}function ca(e,t,n){return!n||t>=100?e:`${e}${Math.round(t/100*255).toString(16).padStart(2,`0`)}`}function la(e,t){return`rgba(${parseInt(e.slice(1,3),16)}, ${parseInt(e.slice(3,5),16)}, ${parseInt(e.slice(5,7),16)}, ${t/100})`}function ua(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=i-Math.min(t,n,r),o=0;a!==0&&(o=i===t?(n-r)/a%6:i===n?(r-t)/a+2:(t-n)/a+4,o*=60,o<0&&(o+=360));let s=i===0?0:a/i*100,c=i*100;return{h:o,s,v:c}}function da(e,t,n){let r=t/100,i=n/100,a=i*r,o=a*(1-Math.abs(e/60%2-1)),s=i-a,c=0,l=0,u=0;e<60?(c=a,l=o,u=0):e<120?(c=o,l=a,u=0):e<180?(c=0,l=a,u=o):e<240?(c=0,l=o,u=a):e<300?(c=o,l=0,u=a):(c=a,l=0,u=o);let d=e=>Math.round((e+s)*255).toString(16).padStart(2,`0`);return`#${d(c)}${d(l)}${d(u)}`}function fa({hex:e,onChange:t,useInputComponent:n=!1,className:r,style:i}){let[a,o]=(0,c.useState)(e),[s,u]=(0,c.useState)(e);e!==s&&(u(e),o(e));function d(e){o(e);let n=e.startsWith(`#`)?e:`#${e}`;oa(n)&&t(n)}function p(){oa(a.startsWith(`#`)?a:`#${a}`)||o(e)}return n?(0,f.jsx)(Ji,{value:a,onChange:e=>d(e),onBlur:p}):(0,f.jsx)(`input`,{type:`text`,value:a,onChange:e=>d(e.target.value),onBlur:p,className:(0,l.default)(na.hexInput,r),style:i,spellCheck:!1})}function pa({hue:e,sat:t,val:n,alpha:r,onHueChange:i,onSVChange:a,onAlphaChange:o,showInput:s=!0,showAlpha:p=!1,labels:m,classNames:h,styles:g}){let _=(0,c.useRef)(null);function v(e){let t=_.current.getBoundingClientRect(),n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width)),r=Math.max(0,Math.min(1,(e.clientY-t.top)/t.height));return{s:n*100,v:(1-r)*100}}function y(e){let r=e.shiftKey?10:1,i=t,o=n;switch(e.key){case`ArrowLeft`:i-=r;break;case`ArrowRight`:i+=r;break;case`ArrowUp`:o+=r;break;case`ArrowDown`:o-=r;break;case`Home`:i=0;break;case`End`:i=100;break;case`PageUp`:o=100;break;case`PageDown`:o=0;break;default:return}e.preventDefault(),a(aa(i),aa(o))}function b(e){e.currentTarget.setPointerCapture(e.pointerId);let{s:t,v:n}=v(e);a(t,n);let r=e=>{let{s:t,v:n}=v(e);a(t,n)},i=()=>{window.removeEventListener(`pointermove`,r),window.removeEventListener(`pointerup`,i)};window.addEventListener(`pointermove`,r),window.addEventListener(`pointerup`,i)}function x(e){let{hex6:t,alpha:n}=sa(e),{h:r,s,v:c}=ua(t);i(r),a(s,c),p&&o(n)}let S=da(e,t,n),C=p?ca(S,r,!0):S;return(0,f.jsxs)(`div`,{className:(0,l.default)(na.panel,h?.panel),style:g?.panel,children:[(0,f.jsxs)(`div`,{ref:_,role:`slider`,tabIndex:0,"aria-label":m.saturationAndBrightness,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(t),"aria-valuetext":m.saturationAndBrightnessValue(Math.round(t),Math.round(n)),className:(0,l.default)(na.gradientArea,h?.gradient),style:{"--hue":e,...g?.gradient},onPointerDown:b,onKeyDown:y,children:[(0,f.jsx)(`div`,{className:na.gradientOverlay}),(0,f.jsx)(`div`,{className:na.cursor,style:{left:`${t}%`,top:`${100-n}%`}})]}),(0,f.jsx)(`input`,{type:`range`,min:0,max:359,value:Math.round(e),onChange:e=>i(Number(e.target.value)),className:(0,l.default)(na.hueSlider,h?.hueSlider),style:g?.hueSlider}),p&&(0,f.jsx)(`input`,{type:`range`,min:0,max:100,value:Math.round(r),onChange:e=>o(Number(e.target.value)),className:(0,l.default)(na.alphaSlider,h?.alphaSlider),style:{"--alpha-color":S,...g?.alphaSlider}}),(s||ra)&&(0,f.jsxs)(`div`,{className:na.hexRow,children:[s&&(0,f.jsx)(fa,{hex:C,onChange:x,className:h?.hexInput,style:g?.hexInput}),ra&&(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(na.eyeDropperButton,h?.eyeDropper),style:g?.eyeDropper,onClick:async()=>{let e=await ia();e&&x(e)},"aria-label":m.pickFromScreen,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faEyeDropper})})]})]})}var ma=`#3b82f6`,ha={pickFromScreen:`Pick color from screen`,saturationAndBrightness:`Saturation and brightness`,saturationAndBrightnessValue:(e,t)=>`${e}% saturation, ${t}% brightness`};function ga({className:e,value:t=ma,onChange:n,showInput:r=!1,showAlpha:i=!1,inline:a=!1,labels:o,style:s,classNames:u,styles:d,...p}){let m=O(`ColorPicker`,o,ha),[h,g]=(0,c.useState)(!1),{hex6:_,alpha:v}=sa(ta(t)??ma),y=ua(_),[b,x]=(0,c.useState)({h:y.h,s:y.s,v:y.v,a:v}),S=(0,c.useRef)(b),[C,w]=(0,c.useState)(t);if(t!==C){w(t);let{hex6:e,alpha:n}=sa(ta(t)??ma);if(e!==da(b.h,b.s,b.v)||n!==b.a){let t=ua(e);x({h:t.h,s:t.s,v:t.v,a:n})}}let{h:T,s:E,v:D,a:k}=b;function A(e,t,r,a){n?.(ca(da(e,t,r),a,i))}function j(e){S.current.h=e,x(t=>({...t,h:e})),A(e,S.current.s,S.current.v,S.current.a)}function M(e,t){S.current.s=e,S.current.v=t,x(n=>({...n,s:e,v:t})),A(S.current.h,e,t,S.current.a)}function N(e){S.current.a=e,x(t=>({...t,a:e})),A(S.current.h,S.current.s,S.current.v,e)}let P=da(T,E,D),F=i?la(P,k):P,I=ca(P,k,i),L={hue:T,sat:E,val:D,alpha:k,onHueChange:j,onSVChange:M,onAlphaChange:N,showAlpha:i,labels:m,classNames:u,styles:d};return a?(0,f.jsx)(`div`,{...p,className:(0,l.default)(na.colorPicker,e,u?.root),style:{...s,...d?.root},children:(0,f.jsx)(pa,{...L,showInput:r})}):(0,f.jsxs)(`div`,{...p,className:(0,l.default)(na.colorPicker,e),children:[(0,f.jsx)(sn,{isOpen:h,onOpenChange:g,placement:wt.Bottom,align:Tt.Start,constrainWidth:!1,content:(0,f.jsx)(pa,{...L}),children:(0,f.jsxs)(oe,{role:`button`,tabIndex:0,"aria-haspopup":`dialog`,"aria-expanded":h,className:(0,l.default)(na.swatch,u?.swatch),style:d?.swatch,children:[(0,f.jsx)(`div`,{className:na.swatchFill,style:{background:F}}),(0,f.jsx)(`span`,{className:na.swatchHex,children:I})]})}),r&&(0,f.jsx)(fa,{hex:I,onChange:e=>n?.(e),useInputComponent:!0})]})}var _a={modal:`modal_L-Fkd`,slideIn:`slideIn_RVIHR`,fadeIn:`fadeIn_XSuIE`,"modal-sheet":`modal-sheet_WkXR4`,modalSheet:`modal-sheet_WkXR4`,"modal-container":`modal-container_qwKIm`,modalContainer:`modal-container_qwKIm`,"modal-header":`modal-header_DhsRr`,modalHeader:`modal-header_DhsRr`,"modal-body":`modal-body_Mmn0-`,modalBody:`modal-body_Mmn0-`,"modal-footer":`modal-footer_idArP`,modalFooter:`modal-footer_idArP`,"modal-close-button":`modal-close-button_UMZjq`,modalCloseButton:`modal-close-button_UMZjq`,"modal-wrapper":`modal-wrapper_r5wzq`,modalWrapper:`modal-wrapper_r5wzq`,"modal-wrapper-shown":`modal-wrapper-shown_F0BgK`,modalWrapperShown:`modal-wrapper-shown_F0BgK`},va={hasStart:!1,hasEnd:!1};function ya(e,t={}){let{axis:n=`vertical`,isEnabled:r=!0}=t,[i,a]=(0,c.useState)(va);return(0,c.useEffect)(()=>{let t=e.current;if(!r||!t){a(e=>e===va?e:va);return}let i=n===`vertical`,o=getComputedStyle(t),s=i?o.overflowY:o.overflowX,c=s===`hidden`||s===`clip`,l=()=>{let e=i?t.scrollTop:t.scrollLeft,n=i?t.scrollHeight:t.scrollWidth,r=i?t.clientHeight:t.clientWidth,o=!c&&e>1,s=!c&&n-r-e>1;a(e=>e.hasStart===o&&e.hasEnd===s?e:{hasStart:o,hasEnd:s})},u=new ResizeObserver(l),d=()=>{u.disconnect(),u.observe(t);for(let e of Array.from(t.children))u.observe(e)},f=new MutationObserver(()=>{d(),l()});return l(),d(),f.observe(t,{childList:!0,subtree:!0,characterData:!0}),t.addEventListener(`scroll`,l,{passive:!0}),()=>{t.removeEventListener(`scroll`,l),f.disconnect(),u.disconnect()}},[e,n,r]),i}var ba={close:`Close`};function xa(e){let{children:t=null,title:n,isOpen:r=!1,onClose:i=()=>null,footer:a=null,className:o=``,style:s,hideHeader:p=!1,closeOnEscape:m=!0,presentation:h,classNames:g,styles:_,labels:v,...y}=D(`Modal`,e),b=O(`Modal`,v,ba),[x,S]=(0,c.useState)(r),[C,w]=(0,c.useState)(r),T=(0,c.useRef)(null),E=(0,c.useRef)(null),A=(0,c.useId)(),{height:j,offsetTop:M}=Kt(),N=k(),{isSheet:P,sheetStyle:F}=Yt(h??N);(0,c.useEffect)(()=>{if(r){S(!0);let e=setTimeout(()=>w(!0),1);return()=>clearTimeout(e)}w(!1);let e=setTimeout(()=>S(!1),300);return()=>clearTimeout(e)},[r]),Xt({isActive:x&&C,containerRef:T,onEscape:m?i:void 0});let{hasStart:I,hasEnd:L}=ya(E,{isEnabled:x&&C});if(!x)return null;let R=!p&&!!n;return(0,f.jsx)(_e,{children:(0,f.jsxs)(`div`,{className:(0,l.default)(_a.modalContainer,g?.container),style:{height:j,top:M,..._?.container},children:[(0,f.jsx)(`div`,{className:(0,l.default)(_a.modalWrapper,C&&_a.modalWrapperShown,g?.backdrop),style:_?.backdrop,onClick:i}),C&&(0,f.jsxs)(`div`,{...y,ref:T,role:`dialog`,"aria-modal":`true`,"aria-labelledby":R&&!y[`aria-label`]?A:void 0,tabIndex:-1,className:(0,l.default)(_a.modal,C&&_a.modalShown,P&&[gt.sheet,gt.sheetSurface,_a.modalSheet],o,g?.modal),style:{...P?F:void 0,...s,..._?.modal},onClick:e=>e.stopPropagation(),children:[!p&&(0,f.jsxs)(`div`,{className:(0,l.default)(_a.modalHeader,g?.header),style:_?.header,children:[(0,f.jsx)(`div`,{id:A,className:g?.title,style:_?.title,children:n}),(0,f.jsx)(`button`,{type:`button`,onClick:i,"aria-label":b.close,className:(0,l.default)(_a.modalCloseButton,g?.closeButton),style:_?.closeButton,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faXmark})})]}),(0,f.jsx)(`div`,{ref:E,className:(0,l.default)(_a.modalBody,bi.scrollFade,bi.scrollFadeY,I&&bi.scrollFadeFadedStart,L&&bi.scrollFadeFadedEnd,g?.body),style:_?.body,children:t}),a&&(0,f.jsx)(`div`,{className:(0,l.default)(_a.modalFooter,g?.footer),style:_?.footer,children:a})]})]})})}var Sa=`input, textarea, select, [contenteditable=""], [contenteditable="true"]`,Ca={esc:`escape`,space:` `,spacebar:` `,plus:`+`,up:`arrowup`,down:`arrowdown`,left:`arrowleft`,right:`arrowright`};function wa(){return typeof navigator<`u`&&/Mac|iPhone|iPad|iPod/i.test(navigator.userAgent)}function Ta(e){let t=e.split(`+`).map(e=>e.trim().toLowerCase()).filter(Boolean);if(t.length===0)return null;let n={key:``,ctrl:!1,meta:!1,alt:!1,shift:!1,shiftNamed:!1},r=wa();for(let e of t)switch(e){case`mod`:r?n.meta=!0:n.ctrl=!0;break;case`ctrl`:case`control`:n.ctrl=!0;break;case`meta`:case`cmd`:case`command`:n.meta=!0;break;case`alt`:case`option`:n.alt=!0;break;case`shift`:n.shift=!0,n.shiftNamed=!0;break;default:n.key=Ca[e]??e}return n.key?n:null}function Ea(e){let t=[e.key.toLowerCase()],n=/^(?:Key|Digit)(.)$/.exec(e.code);return n&&t.push(n[1].toLowerCase()),t}function Da(e,t){return e.ctrl!==t.ctrlKey||e.meta!==t.metaKey||e.alt!==t.altKey||e.shiftNamed&&e.shift!==t.shiftKey?!1:Ea(t).includes(e.key)}function Oa(e){return e instanceof Element&&!!e.closest(Sa)}var ka=new Set([`arrowup`,`arrowdown`,`arrowleft`,`arrowright`,`home`,`end`,`pageup`,`pagedown`,`backspace`,`delete`,`enter`,`tab`]);function Aa(e){return e.ctrl||e.meta||e.alt?!1:e.key.length===1||ka.has(e.key)}var ja={" ":`Space`,arrowup:`↑`,arrowdown:`↓`,arrowleft:`←`,arrowright:`→`,escape:`Esc`,enter:`↵`,backspace:`⌫`,delete:`Del`,pageup:`PgUp`,pagedown:`PgDn`};function Ma(e){let t=Ta(e);if(!t)return e;let n=ja[t.key]??(t.key.length===1?t.key.toUpperCase():Na(t.key));return wa()?[t.ctrl&&`⌃`,t.alt&&`⌥`,t.shift&&`⇧`,t.meta&&`⌘`].filter(Boolean).join(``)+n:[...[t.ctrl&&`Ctrl`,t.meta&&`Win`,t.alt&&`Alt`,t.shift&&`Shift`].filter(Boolean),n].join(`+`)}function Na(e){return e[0].toUpperCase()+e.slice(1)}function Pa(e,t={}){let{enabled:n=!0,target:r,enableInFields:i=!1,preventDefault:a=!0}=t,o=(0,c.useRef)(e);(0,c.useEffect)(()=>{o.current=e}),(0,c.useEffect)(()=>{if(!n)return;let e=r?r.current:window;if(!e)return;function t(e){let t=e;if(!t.isComposing)for(let[e,n]of Object.entries(o.current)){let r=Ta(e);if(r&&Da(r,t)&&!(Aa(r)&&!i&&Oa(t.target))){a&&t.preventDefault(),n(t);return}}}return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)},[n,r,i,a])}function Fa(e,t,n,{isDisabled:r,wrap:i=!0}={}){if(n===0)return null;let a=e=>!r?.(e),o=e??(t===1?-1:n);for(let e=1;e<=n;e++){let r=o+t*e;if(!i&&(r<0||r>=n))break;let s=(r%n+n)%n;if(a(s))return s}return e!==null&&a(e)?e:null}function Ia(e,t,n={}){return e===`first`?Fa(null,1,t,{...n,wrap:!1}):Fa(null,-1,t,{...n,wrap:!1})}function La(e,t){if(!e||!t)return;let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height>0?e.offsetHeight/n.height:1,a=r.top-n.top,o=r.bottom-n.bottom;a<0?e.scrollTop+=a*i:o>0&&(e.scrollTop+=o*i)}function Ra(e){return`separator`in e}function za(e){return`heading`in e}function Ba(e){return!Ra(e)&&!za(e)}function Va(e){return e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase()}function Ha(e){let t=[],n={separated:!1,actions:[]},r=()=>{(n.heading!==void 0||n.actions.length>0)&&t.push(n)};for(let t of e){if(Ba(t)){n.actions.push(t);continue}r(),n=za(t)?{heading:t.heading,separated:n.separated&&n.actions.length===0,actions:[]}:{separated:!0,actions:[]}}return r(),t.filter(e=>e.actions.length>0)}function Ua(e,t,n){let r=typeof e.label==`string`?Va(e.label):``,i=(e.keywords??[]).map(Va),a=[r,...i].join(` `);if(!t.every(e=>a.includes(e)))return null;if(r.startsWith(n))return 0;let o=e=>e.split(/\s+/).some(e=>e.startsWith(t[0]));return o(r)||i.some(o)?1:2}function Wa(e,t){let n=Va(t.trim());if(!n)return e;let r=n.split(/\s+/);return e.map(e=>{let t=e.actions.map(e=>({action:e,rank:Ua(e,r,n)})).filter(e=>e.rank!==null).sort((e,t)=>e.rank-t.rank);return t.length===0?null:{group:{...e,separated:!1,actions:t.map(e=>e.action)},best:t[0].rank}}).filter(e=>e!==null).sort((e,t)=>e.best-t.best).map(e=>e.group)}var Ga={commandPalette:`commandPalette_YtQdV`,"commandPalette-search":`commandPalette-search_FII6k`,commandPaletteSearch:`commandPalette-search_FII6k`,"commandPalette-search-icon":`commandPalette-search-icon_acfcm`,commandPaletteSearchIcon:`commandPalette-search-icon_acfcm`,"commandPalette-input":`commandPalette-input_Vb3da`,commandPaletteInput:`commandPalette-input_Vb3da`,"commandPalette-list":`commandPalette-list_93yGm`,commandPaletteList:`commandPalette-list_93yGm`,"commandPalette-item":`commandPalette-item_oa2PX`,commandPaletteItem:`commandPalette-item_oa2PX`,"commandPalette-item-active":`commandPalette-item-active_9KaV-`,commandPaletteItemActive:`commandPalette-item-active_9KaV-`,"commandPalette-item-danger":`commandPalette-item-danger_VP4If`,commandPaletteItemDanger:`commandPalette-item-danger_VP4If`,"commandPalette-item-disabled":`commandPalette-item-disabled_hiHzA`,commandPaletteItemDisabled:`commandPalette-item-disabled_hiHzA`,"commandPalette-item-icon":`commandPalette-item-icon_N4L26`,commandPaletteItemIcon:`commandPalette-item-icon_N4L26`,"commandPalette-item-label":`commandPalette-item-label_cy-ke`,commandPaletteItemLabel:`commandPalette-item-label_cy-ke`,"commandPalette-item-shortcut":`commandPalette-item-shortcut_G2KPh`,commandPaletteItemShortcut:`commandPalette-item-shortcut_G2KPh`,"commandPalette-heading":`commandPalette-heading_ONebI`,commandPaletteHeading:`commandPalette-heading_ONebI`,"commandPalette-separator":`commandPalette-separator_Yu8TJ`,commandPaletteSeparator:`commandPalette-separator_Yu8TJ`,"commandPalette-empty":`commandPalette-empty_LqVAt`,commandPaletteEmpty:`commandPalette-empty_LqVAt`,"commandPalette-status":`commandPalette-status_rft-N`,commandPaletteStatus:`commandPalette-status_rft-N`},Ka={label:`Search commands`,placeholder:`Type a command or search…`,empty:`No results`,loading:`Searching…`,results:e=>e===1?`1 result`:`${e} results`};function qa(e){let{items:t,isOpen:n,onClose:r,onAction:i,onQueryChange:a,filter:o=!0,isLoading:s=!1,presentation:u,labels:p,className:m,style:h,classNames:g,styles:_,...v}=D(`CommandPalette`,e),y=O(`CommandPalette`,p,Ka),b=(0,c.useId)(),x=(0,c.useRef)(null),[S,C]=(0,c.useState)(``),[w,T]=(0,c.useState)(null),[E,k]=(0,c.useState)(n);n!==E&&(k(n),n&&(C(``),T(null)));let A=(0,c.useRef)(a);(0,c.useEffect)(()=>{A.current=a}),(0,c.useEffect)(()=>{n&&A.current?.(``)},[n]);let j=o?Wa(Ha(t),S):Ha(t),M=j.flatMap(e=>e.actions),N=e=>!!M[e]?.disabled,P=M.findIndex(e=>e.id===w&&!e.disabled),F=P>=0?P:Ia(`first`,M.length,{isDisabled:N}),I=e=>`${b}-${encodeURIComponent(e.id)}`,L=F===null?void 0:I(M[F]);(0,c.useEffect)(()=>{L&&La(x.current,document.getElementById(L))},[L]);function R(e){e&&!e.disabled&&(e.onClick?.(),i?.(e.id),r())}function z(e){if(!e.nativeEvent.isComposing){if(e.key===`ArrowDown`||e.key===`ArrowUp`){let t=Fa(F,e.key===`ArrowDown`?1:-1,M.length,{isDisabled:N});T(t===null?null:M[t].id)}else if(e.key===`Enter`)R(F===null?void 0:M[F]);else return;e.preventDefault()}}let B=S.trim()!==``,V=s?y.loading:y.empty,H=-1;return(0,f.jsxs)(xa,{...v,"aria-label":y.label,isOpen:n,onClose:r,hideHeader:!0,presentation:u,className:(0,l.default)(Ga.commandPalette,m,g?.root),style:{...h,..._?.root},children:[(0,f.jsxs)(`div`,{className:(0,l.default)(Ga.commandPaletteSearch,g?.search),style:_?.search,children:[K(d.faMagnifyingGlass,{className:Ga.commandPaletteSearchIcon}),(0,f.jsx)(`input`,{type:`text`,role:`combobox`,"aria-label":y.label,"aria-expanded":`true`,"aria-controls":b,"aria-autocomplete":`list`,"aria-activedescendant":L,autoComplete:`off`,spellCheck:!1,placeholder:y.placeholder,value:S,onChange:e=>{C(e.target.value),T(null),a?.(e.target.value)},onKeyDown:z,className:(0,l.default)(Ga.commandPaletteInput,g?.input),style:_?.input})]}),(0,f.jsx)(`div`,{ref:x,id:b,role:`listbox`,"aria-label":y.label,className:(0,l.default)(Ga.commandPaletteList,g?.list),style:_?.list,children:j.map((e,t)=>{let n=`${b}-heading-${t}`;return(0,f.jsxs)(`div`,{role:e.heading===void 0?`presentation`:`group`,"aria-labelledby":e.heading===void 0?void 0:n,children:[e.separated&&t>0&&(0,f.jsx)(`div`,{"aria-hidden":!0,className:(0,l.default)(Ga.commandPaletteSeparator,g?.separator),style:_?.separator}),e.heading!==void 0&&(0,f.jsx)(`div`,{id:n,role:`presentation`,className:(0,l.default)(Ga.commandPaletteHeading,g?.heading),style:_?.heading,children:e.heading}),e.actions.map(e=>{H+=1;let t=H;return(0,f.jsxs)(`div`,{id:I(e),role:`option`,"aria-selected":t===F,"aria-disabled":e.disabled||void 0,className:(0,l.default)(Ga.commandPaletteItem,t===F&&Ga.commandPaletteItemActive,e.danger&&Ga.commandPaletteItemDanger,e.disabled&&Ga.commandPaletteItemDisabled,g?.item),style:_?.item,onMouseDown:e=>e.preventDefault(),onMouseMove:()=>!e.disabled&&T(e.id),onClick:()=>R(e),children:[e.icon!=null&&K(e.icon,{className:(0,l.default)(Ga.commandPaletteItemIcon,g?.itemIcon),style:_?.itemIcon}),(0,f.jsx)(`span`,{className:(0,l.default)(Ga.commandPaletteItemLabel,g?.itemLabel),style:_?.itemLabel,children:e.label}),e.shortcut!=null&&(0,f.jsx)(`span`,{className:(0,l.default)(Ga.commandPaletteItemShortcut,g?.itemShortcut),style:_?.itemShortcut,children:Ma(e.shortcut)})]},e.id)})]},t)})}),B&&M.length===0&&(0,f.jsx)(`div`,{className:(0,l.default)(Ga.commandPaletteEmpty,g?.empty),style:_?.empty,children:V}),(0,f.jsx)(`span`,{className:Ga.commandPaletteStatus,role:`status`,"aria-live":`polite`,children:B?M.length>0?y.results(M.length):V:``})]})}var Ja={submit:`Confirm`,cancel:`Cancel`};function Ya(e){let{children:t=null,className:n=``,onClose:r=()=>{},onConfirm:i=()=>{},title:a,content:o=null,isOpen:s=void 0,labels:l,isDelete:u=!1,actionButtonsProps:d={},style:p,...m}=D(`ConfirmModal`,e),h=O(`ConfirmModal`,l,Ja),[g,_]=(0,c.useState)(!1),[v,y]=(0,c.useState)(!1);function b(e=!1){_(!1),r(e)}async function x(){y(!0);try{await i(),b(!0)}catch{}finally{y(!1)}}let S=(0,f.jsx)(xa,{title:a,isOpen:s===void 0?g:s,onClose:()=>b(),className:t?void 0:n,footer:(0,f.jsx)(re,{onClose:()=>b(),onSubmit:x,labels:{submit:h.submit,cancel:h.cancel},submitButtonStyle:u?z.Delete:void 0,isSubmitButtonLoading:v,noMargin:!0,...d}),children:o});return t?(0,f.jsxs)(`div`,{...m,className:n,style:p,children:[(0,f.jsx)(`span`,{onClick:()=>_(!0),children:t}),S]}):S}function Xa({timeout:e=2e3}={}){let[t,n]=(0,c.useState)(!1),[r,i]=(0,c.useState)(null),a=(0,c.useRef)(null),o=(0,c.useCallback)(()=>{a.current&&clearTimeout(a.current),a.current=null},[]);(0,c.useEffect)(()=>o,[o]);let s=(0,c.useCallback)(()=>{o(),n(!1),i(null)},[o]);return{copy:(0,c.useCallback)(async t=>{o();try{if(!navigator.clipboard?.writeText)throw Error(`Clipboard API unavailable`);return await navigator.clipboard.writeText(t),i(null),n(!0),a.current=setTimeout(()=>n(!1),e),!0}catch(e){return n(!1),i(e instanceof Error?e:Error(String(e))),!1}},[o,e]),copied:t,error:r,reset:s}}var Za={copyButton:`copyButton_HEd1K`,"copyButton-copied":`copyButton-copied_HL1zN`,copyButtonCopied:`copyButton-copied_HL1zN`,"copyButton-status":`copyButton-status_QdwYf`,copyButtonStatus:`copyButton-status_QdwYf`},Qa={copy:`Copy`,copied:`Copied`,failed:`Could not copy`};function $a(e){let{value:t,timeout:n=2e3,icon:r=d.faCopy,copiedIcon:i=d.faCheck,onCopy:a,onError:o,onClick:s,labels:c,className:u,style:p,classNames:m,styles:h,...g}=D(`CopyButton`,e),_=O(`CopyButton`,c,Qa),{copy:v,copied:y,error:b}=Xa({timeout:n}),x=y?_.copied:_.copy,S=y?i:r,C=ee(r)&&ee(i)?(0,f.jsx)(Hi,{icon:y?i:r,classNames:{icon:m?.icon},styles:{icon:h?.icon}}):K(S,{className:m?.icon,style:h?.icon});return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(ce,{...g,icon:(0,f.jsx)(f.Fragment,{children:C}),title:x,"aria-label":x,className:(0,l.default)(Za.copyButton,y&&Za.copyButtonCopied,u),style:p,classNames:{root:m?.root},styles:{root:h?.root},onClick:async e=>{s?.(e),await v(t)?a?.(t):o?.()}}),(0,f.jsx)(`span`,{className:Za.copyButtonStatus,role:`status`,"aria-live":`polite`,children:y?_.copied:b?_.failed:``})]})}var eo={"datePickerMonth-item":`datePickerMonth-item_30WWy`,datePickerMonthItem:`datePickerMonth-item_30WWy`,"datePickerMonth-content":`datePickerMonth-content_9bbSs`,datePickerMonthContent:`datePickerMonth-content_9bbSs`,"datePickerMonth-day":`datePickerMonth-day_SaASA`,datePickerMonthDay:`datePickerMonth-day_SaASA`,"datePickerMonth-day-today":`datePickerMonth-day-today_RXOIr`,datePickerMonthDayToday:`datePickerMonth-day-today_RXOIr`,"datePickerMonth-day-selected":`datePickerMonth-day-selected_yMF-v`,datePickerMonthDaySelected:`datePickerMonth-day-selected_yMF-v`,"datePickerMonth-day-selected-start":`datePickerMonth-day-selected-start_ftVeI`,datePickerMonthDaySelectedStart:`datePickerMonth-day-selected-start_ftVeI`,"datePickerMonth-day-selected-end":`datePickerMonth-day-selected-end_MZ2qy`,datePickerMonthDaySelectedEnd:`datePickerMonth-day-selected-end_MZ2qy`,"datePickerMonth-day-disabled":`datePickerMonth-day-disabled_4t0Ci`,datePickerMonthDayDisabled:`datePickerMonth-day-disabled_4t0Ci`,"datePickerMonth-placeholder":`datePickerMonth-placeholder_gy1Yx`,datePickerMonthPlaceholder:`datePickerMonth-placeholder_gy1Yx`},to=[`de_AT`,`de_CH`,`de_DE`,`en_US`,`en_GB`,`de`,`en`],no=`en_US`,ro=()=>{let e=navigator.languages[0]?.replace(`-`,`_`)||no;return to.includes(e)?e===`en_GB`||e===`en`?`en_US`:e===`de`?`de_DE`:e:no},io=e=>{switch(e){case`en_US`:case`en_GB`:return`en`;case`de_DE`:case`de_CH`:case`de_AT`:return`de`;default:return`de`}},ao=ro();async function oo(e){ao=e}function so(e=`_`){return ao.replace(`_`,e)}function co(e,t,n){let r=new Date(0);return r.setUTCFullYear(e,t-1,n),r}function lo(e,t,n,r,i=!1){return co(t,n,r).toLocaleDateString(e,{month:i?`short`:`long`,timeZone:`UTC`})}function uo(e=so(`-`)){return Array.from(Array(12).keys()).map(t=>lo(e,2023,t+1,1))}function fo(e,t=!0){return Array.from(Array(7).keys()).map(n=>co(2023,4,10+n).toLocaleDateString(e,{weekday:t?`short`:`long`,timeZone:`UTC`}))}function po(e,t){return co(t,e,1).getUTCDay()||7}function mo(e,t,n,r){let i=e+r,a=t,o=n;for(;i<1;)--a,a<1&&(a=12,--o),i+=vn({year:o,month:a});for(;i>vn({year:o,month:a});)i-=vn({year:o,month:a}),a+=1,a>12&&(a=1,o+=1);return{day:i,month:a,year:o}}function ho(){return yn(Sn(new Date))}function go(e){let t=yn(e);return t?`${String(t.day).padStart(2,`0`)}.${String(t.month).padStart(2,`0`)}.${String(t.year).padStart(4,`0`)}`:``}function _o(e){let t=/^(\d{2})\.(\d{2})\.(\d{4})$/.exec(e);if(!t)return null;let n=xn({day:Number(t[1]),month:Number(t[2]),year:Number(t[3])});return yn(n)?n:null}function vo(e,t,n){let r=e,i=n;return r[0]!==`_`&&(r[0]>`3`?(r=`0${r[0]}${t.substring(2)}`,i={start:3,end:3}):r[0]===`3`&&r[1]!==`_`&&r[1]>`1`&&(r=`0${r[1]}${t.substring(2)}`,i={start:3,end:3})),r[3]!==`_`&&r[3]>`1`&&(r=`${r.substring(0,3)}0${r[3]}${t.substring(5)}`,i={start:6,end:6}),r[3]===`1`&&r[4]!==`_`&&r[4]>`2`&&(r=`${r.substring(0,3)}${r[3]}2${t.substring(5)}`),{value:r,selection:i}}function yo(e,t,n){let r=yn(n);if(r&&r.month===e&&r.year===t)return r.day;let i=ho();return i.month===e&&i.year===t?i.day:1}function bo(e,t,n){return{isStartDate:e===t,isEndDate:e===n,isInRange:!!t&&!!n&&e>=t&&e<=n}}function xo(e,t,n){return!!t&&e<t||!!n&&e>n}function So({style:e,className:t=``,month:n=ho().month,year:r=ho().year,onSelect:i=()=>null,selectionStart:a,selectionEnd:o,minDate:s=null,maxDate:u=null,onNavigateMonth:d}){let p=so(`-`),m=vn({year:r,month:n}),h=po(n,r),g=Sn(new Date),_=(0,c.useRef)({}),[v,y]=(0,c.useState)(()=>yo(n,r,a)),b=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(b.current!=null){let e=b.current;b.current=null,y(e),_.current[e]?.focus()}else y(yo(n,r,a))},[n,r]);function x(e,t){let i=0;if(e.key===`ArrowRight`)i=1;else if(e.key===`ArrowLeft`)i=-1;else if(e.key===`ArrowDown`)i=7;else if(e.key===`ArrowUp`)i=-7;else return;e.preventDefault();let a=mo(t,n,r,i);a.month!==n||a.year!==r?(b.current=a.day,d?.(a.month>n||a.year>r?1:-1)):(y(a.day),_.current[a.day]?.focus())}return(0,f.jsx)(`div`,{className:(0,l.default)(eo.datePickerMonth,t),style:e,children:(0,f.jsxs)(`div`,{className:(0,l.default)(eo.datePickerMonthContent),children:[fo(p).map((e,t)=>(0,f.jsx)(`div`,{children:e},t)),Array.from(Array(h-1).keys()).map(e=>(0,f.jsx)(`div`,{className:(0,l.default)(eo.datePickerMonthItem,eo.datePickerMonthPlaceholder)},e)),Array.from(Array(m).keys()).map(e=>{let t=e+1,c=xn({day:t,month:n,year:r}),d=bo(c,a,o),p=xo(c,s,u),m=c===g;return(0,f.jsx)(oe,{ref:e=>{_.current[t]=e},tabIndex:t===v?0:-1,onKeyDown:e=>x(e,t),onClick:()=>p?null:i(c),className:(0,l.default)(eo.datePickerMonthDay,eo.datePickerMonthItem,{[eo.datePickerMonthDaySelected]:d.isInRange,[eo.datePickerMonthDaySelectedStart]:d.isStartDate,[eo.datePickerMonthDaySelectedEnd]:d.isEndDate,[eo.datePickerMonthDayDisabled]:p,[eo.datePickerMonthDayToday]:m}),children:t},t)}),Array.from(Array(42-(h+m-1)).keys()).map(e=>(0,f.jsx)(`div`,{className:(0,l.default)(eo.datePickerMonthItem,eo.datePickerMonthPlaceholder),children:`\xA0`},e))]})})}function Co(e,t,n){let[r,i]=(0,c.useState)(!1),a=(0,c.useRef)(!1),o=(0,c.useRef)(null),s=(0,c.useRef)(t);return(0,c.useEffect)(()=>{s.current=t}),(0,c.useEffect)(()=>{let t=e.current,r=o.current;if(n||!t||!r)return;let c=!1,l=()=>{a.current||(a.current=!0,i(!0),s.current().catch(()=>null).finally(()=>{c||(a.current=!1,i(!1),u.unobserve(r),u.observe(r))}))},u=new IntersectionObserver(([e])=>{e.isIntersecting&&l()},{root:t});return u.observe(r),()=>{c=!0,u.disconnect()}},[e,n]),{isLoading:r,sentinelRef:o}}var wo={"required-mark":`required-mark_fy7Fm`,requiredMark:`required-mark_fy7Fm`,dropdown:`dropdown_XTshY`,"dropdown-label":`dropdown-label_TIpeK`,dropdownLabel:`dropdown-label_TIpeK`,"dropdown-label-column":`dropdown-label-column_cMCBc`,dropdownLabelColumn:`dropdown-label-column_cMCBc`,"dropdown-label-text":`dropdown-label-text_u-UKq`,dropdownLabelText:`dropdown-label-text_u-UKq`,"dropdown-input":`dropdown-input_WiPcb`,dropdownInput:`dropdown-input_WiPcb`,"dropdown-input-plain":`dropdown-input-plain_Ap12N`,dropdownInputPlain:`dropdown-input-plain_Ap12N`,"dropdown-input-readOnly":`dropdown-input-readOnly_3GWSO`,dropdownInputReadOnly:`dropdown-input-readOnly_3GWSO`,"dropdown-input-button":`dropdown-input-button_ziKKi`,dropdownInputButton:`dropdown-input-button_ziKKi`,"dropdown-input-button-disabled":`dropdown-input-button-disabled_JEaO-`,dropdownInputButtonDisabled:`dropdown-input-button-disabled_JEaO-`,"dropdown-input-button-readOnly":`dropdown-input-button-readOnly_QhBYY`,dropdownInputButtonReadOnly:`dropdown-input-button-readOnly_QhBYY`,"dropdown-input-button-icon":`dropdown-input-button-icon_jl7EY`,dropdownInputButtonIcon:`dropdown-input-button-icon_jl7EY`,"dropdown-input-button-icon-arrow":`dropdown-input-button-icon-arrow_SFJbx`,dropdownInputButtonIconArrow:`dropdown-input-button-icon-arrow_SFJbx`,"dropdown-input-button-icon-arrow-open":`dropdown-input-button-icon-arrow-open_8yQbZ`,dropdownInputButtonIconArrowOpen:`dropdown-input-button-icon-arrow-open_8yQbZ`,"dropdown-input-list-anim":`dropdown-input-list-anim_knSMT`,dropdownInputListAnim:`dropdown-input-list-anim_knSMT`,"dropdown-input-list-anim-wider":`dropdown-input-list-anim-wider_-YyLJ`,dropdownInputListAnimWider:`dropdown-input-list-anim-wider_-YyLJ`,"dropdown-input-list":`dropdown-input-list_JnMbA`,dropdownInputList:`dropdown-input-list_JnMbA`,"dropdown-input-list-item":`dropdown-input-list-item_EAy5L`,dropdownInputListItem:`dropdown-input-list-item_EAy5L`,"dropdown-input-list-item-active":`dropdown-input-list-item-active_0dhia`,dropdownInputListItemActive:`dropdown-input-list-item-active_0dhia`,"dropdown-input-list-item-selected":`dropdown-input-list-item-selected_hShJf`,dropdownInputListItemSelected:`dropdown-input-list-item-selected_hShJf`,"dropdown-input-list-item-disabled":`dropdown-input-list-item-disabled_3r-Yn`,dropdownInputListItemDisabled:`dropdown-input-list-item-disabled_3r-Yn`,"dropdown-fieldset":`dropdown-fieldset_wQwTf`,dropdownFieldset:`dropdown-fieldset_wQwTf`,"dropdown-fieldset-legend":`dropdown-fieldset-legend_a1M4L`,dropdownFieldsetLegend:`dropdown-fieldset-legend_a1M4L`,"dropdown-fieldset-legend-active":`dropdown-fieldset-legend-active_bnR5F`,dropdownFieldsetLegendActive:`dropdown-fieldset-legend-active_bnR5F`,"dropdown-placeholder":`dropdown-placeholder_QYMPZ`,dropdownPlaceholder:`dropdown-placeholder_QYMPZ`,"dropdown-placeholder-shown":`dropdown-placeholder-shown_-IkNH`,dropdownPlaceholderShown:`dropdown-placeholder-shown_-IkNH`,fadeIn:`fadeIn_oMJZj`,"dropdown-matLabel":`dropdown-matLabel_iHQnt`,dropdownMatLabel:`dropdown-matLabel_iHQnt`,"dropdown-matLabel-floating":`dropdown-matLabel-floating_zY51S`,dropdownMatLabelFloating:`dropdown-matLabel-floating_zY51S`,"dropdown-border-focused":`dropdown-border-focused_Te-ER`,dropdownBorderFocused:`dropdown-border-focused_Te-ER`,"dropdown-border-plain":`dropdown-border-plain_Bbh-3`,dropdownBorderPlain:`dropdown-border-plain_Bbh-3`,"dropdown-border-invalid":`dropdown-border-invalid_ySVaS`,dropdownBorderInvalid:`dropdown-border-invalid_ySVaS`,"dropdown-border-error":`dropdown-border-error_-JB33`,dropdownBorderError:`dropdown-border-error_-JB33`,dropdownPanel:`dropdownPanel_RYxpN`,"dropdown-sentinel":`dropdown-sentinel_TVDF9`,dropdownSentinel:`dropdown-sentinel_TVDF9`,"dropdown-load-more":`dropdown-load-more_UQvzV`,dropdownLoadMore:`dropdown-load-more_UQvzV`,"dropdown-load-more-spinner":`dropdown-load-more-spinner_SOMz7`,dropdownLoadMoreSpinner:`dropdown-load-more-spinner_SOMz7`},To=500;function Eo(e){let{errorMessage:t=``,className:n=``,style:r,label:i=``,value:a=``,isValid:o=!0,tabIndex:s=0,isRequired:p=!1,customProps:m={},isRow:h=!1,disabled:g=!1,readOnly:_=!1,onScroll:v=()=>Promise.resolve(),onClick:y,onChange:b,onFocus:x=null,onBlur:S=null,onMouseEnter:C=null,onMouseLeave:w=null,dropdownLabel:T,isDropdownListWider:E=!1,formValidator:O=null,classNames:j,styles:M,items:N=[],useMatLabelStyle:P=!0,alwaysFloatLabel:F=!1,placeholder:I=``,plainStyle:L=!1,scrollToSelected:z=!1,presentation:B,reactRef:V,...H}=D(`Dropdown`,e),[U,W]=(0,c.useState)(!1),[G,ee]=(0,c.useState)(!1),[,K]=(0,c.useState)(0),te=(0,c.useRef)(O),q=(0,c.useRef)(null),ne=(0,c.useRef)(null),J=(0,c.useRef)(null),[re,ie]=(0,c.useState)(!1),[ae,oe]=(0,c.useState)(null),se=(0,c.useRef)({buffer:``,at:0}),ce=(0,c.useId)(),le=`${ce}-listbox`,ue=`${ce}-label`,Y=e=>`${ce}-option-${e}`,de=!g&&!_,fe=re&&de,{isLoading:pe,sentinelRef:me}=Co(J,v,!1),X=k(),Z=B??X??A.Default,{isSheet:he}=Yt(Z);(0,c.useLayoutEffect)(()=>{let e=q.current,t=ne.current;fe&&!he&&e&&t&&(t.style.fontSize=window.getComputedStyle(e).fontSize)},[fe,he]),(0,c.useEffect)(()=>{if(te.current=O,!te.current)return;te.current.label=i??``,te.current.validate();let e=()=>K(e=>e+1);return te.current.registerOnUpdateListener(e),()=>te.current?.removeOnUpdateListener(e)},[O,i]);let ge=O?O.value:a,_e=N.findIndex(e=>e.key===ge);(0,c.useEffect)(()=>{fe&&ae!==null&&La(J.current,document.getElementById(Y(ae)))},[fe,ae]);let ve=e=>{ee(!0),C?.(e)},ye=e=>{ee(!1),w?.(e)},be=e=>{W(!0),x?.(e)},xe=e=>{te.current&&(te.current.touched=!0),W(!1),S?.(e)},Se=()=>O?O.touched&&O.hasError():!o||!!t,Ce=()=>!!(p||O?.validators.find(e=>e.validatorId===`required`)),we=e=>{O?(O.set(e),b?.(O.value,m)):b?.(e,m)};function Te(e){(!e||de)&&(ie(e),e?oe(z&&_e>=0?_e:null):se.current={buffer:``,at:0})}function Ee(e){e.disabled||(we(e.key),Te(!1))}let De={isDisabled:e=>!!N[e].disabled};function Oe(e){let t=Date.now(),n=t-se.current.at>To?e:se.current.buffer+e;se.current={buffer:n,at:t};let r=n.toLowerCase(),i=N.findIndex(e=>!e.disabled&&typeof e.label==`string`&&e.label.toLowerCase().startsWith(r));i!==-1&&(fe?oe(i):Ee(N[i]))}function ke(e){if(de){if(!fe){e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`Enter`||e.key===` `?(e.preventDefault(),Te(!0)):e.key.length===1&&Oe(e.key);return}if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),oe(Fa(ae,e.key===`ArrowDown`?1:-1,N.length,De));else if(e.key===`Home`||e.key===`End`)e.preventDefault(),oe(Ia(e.key===`Home`?`first`:`last`,N.length,De));else if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=ae===null?void 0:N[ae];t?Ee(t):Te(!1)}else e.key===`Escape`||e.key===`Tab`?Te(!1):e.key.length===1&&Oe(e.key)}}let Ae=T,je=Se();N.forEach(e=>{e.key===ge&&(Ae=e.label)});let Me=Ae||ge,Ne=Me==null||typeof Me==`string`&&Me.trim()===``,Pe=Ce()?(0,f.jsx)(`span`,{className:wo.requiredMark,children:`*`}):null,Q=i&&Ce()?`${i} *`:i,Fe=U&&!_;return(0,f.jsxs)(`div`,{...H,className:(0,l.default)(n,j?.root,wo.dropdownLabel,wo.dropdown,{[wo.dropdownLabelColumn]:!h}),style:{...r,...M?.root},onMouseEnter:ve,onMouseLeave:ye,children:[(0,f.jsx)(`div`,{children:(0,f.jsx)(sn,{isOpen:fe,onOpenChange:Te,disabled:!de,placement:wt.Bottom,align:Tt.Start,offset:0,withArrow:!1,constrainWidth:!1,width:`trigger`,focusOnOpen:!1,presentation:Z,classNames:{panel:wo.dropdownPanel},content:(0,f.jsx)(`div`,{ref:ne,className:(0,l.default)(!he&&wo.dropdownInputListAnim,{[wo.dropdownInputListAnimWider]:E&&!he}),children:(0,f.jsxs)(`div`,{ref:J,id:le,role:`listbox`,"aria-label":i||I||void 0,className:(0,l.default)(wo.dropdownInputList,he&&gt.sheetScroll,j?.list),style:M?.list,children:[N.map((e,t)=>(0,f.jsx)(`div`,{id:Y(t),role:`option`,"aria-selected":e.key===ge,"aria-disabled":e.disabled||void 0,style:M?.option,className:(0,l.default)(wo.dropdownInputListItem,j?.option,{[wo.dropdownInputListItemActive]:ae===t,[wo.dropdownInputListItemSelected]:e.key===ge,[wo.dropdownInputListItemDisabled]:!!e.disabled}),onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>oe(t),onClick:()=>Ee(e),children:e.label},e.key)),(0,f.jsx)(`div`,{ref:me,className:wo.dropdownSentinel,"aria-hidden":`true`}),pe&&(0,f.jsx)(`div`,{className:wo.dropdownLoadMore,"aria-hidden":`true`,children:(0,f.jsx)(R,{className:wo.dropdownLoadMoreSpinner})})]})}),children:(0,f.jsxs)(`div`,{ref:q,onFocus:be,onBlur:xe,className:(0,l.default)(wo.dropdownInput,{[wo.dropdownInputPlain]:L,[wo.dropdownInputReadOnly]:_&&!g},j?.field),style:M?.field,children:[(0,f.jsx)(`button`,{tabIndex:s,type:`button`,disabled:g,role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":fe,"aria-controls":le,"aria-activedescendant":fe&&ae!==null?Y(ae):void 0,"aria-labelledby":i?ue:void 0,"aria-label":i?void 0:I||void 0,"aria-readonly":_||void 0,className:(0,l.default)(wo.dropdownInputButton,{[wo.dropdownInputButtonDisabled]:g,[wo.dropdownInputButtonReadOnly]:_&&!g},j?.control),style:{...E?{padding:`6px`,border:`none`}:{},...M?.control},onKeyDown:ke,onClick:y,ref:V,children:Ne?`\xA0`:Me}),(0,f.jsx)(`button`,{type:`button`,tabIndex:-1,disabled:g,"aria-hidden":`true`,className:(0,l.default)(wo.dropdownInputButtonIcon,j?.icon),style:M?.icon,onMouseDown:e=>e.preventDefault(),onClick:y,children:!g&&!_&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronDown,className:(0,l.default)(wo.dropdownInputButtonIconArrow,{[wo.dropdownInputButtonIconArrowOpen]:fe})})}),(0,f.jsx)(`fieldset`,{className:(0,l.default)(wo.dropdownFieldset,{[wo.dropdownBorderPlain]:L,[wo.dropdownBorderFocused]:Fe,[wo.dropdownBorderInvalid]:je,[wo.dropdownBorderError]:je}),children:(0,f.jsx)(`legend`,{className:(0,l.default)(wo.dropdownFieldsetLegend,{[wo.dropdownFieldsetLegendActive]:P&&(F||Fe||!Ne)}),children:(0,f.jsx)(`span`,{children:Q})})}),P&&i&&(0,f.jsxs)(`div`,{id:ue,className:(0,l.default)(wo.dropdownMatLabel,{[wo.dropdownMatLabelFloating]:F||Fe||!Ne},j?.label),style:M?.label,children:[i,Pe]}),P&&I&&(0,f.jsx)(`div`,{className:(0,l.default)(wo.dropdownPlaceholder,Fe&&!Ae&&wo.dropdownPlaceholderShown),children:I})]})})}),i&&!P&&(0,f.jsxs)(`div`,{id:ue,className:(0,l.default)(wo.dropdownLabelText,j?.label),style:M?.label,children:[i,Pe]}),(0,f.jsx)(Ri,{variant:`error`,message:O?O.getCurrentErrorMessage():t||``,isVisible:je&&(U||G)})]})}var Do=`9`,Oo=e=>e!==void 0&&e>=`0`&&e<=`9`;function ko(e){let t=[];for(let n=0;n<e.length;n++)e[n]===Do&&t.push(n);return t}function Ao(e,t,n){return[...t].map((t,r)=>t===Do?Oo(e[r])?e[r]:n:t).join(``)}function jo(e,t,n){return e>=t.length?n.length:t[e]}function Mo(e,t){let n=t.findIndex(t=>t>=e);return n===-1?t.length:n}function No(e,t){for(let n=t.length-1;n>=0;n--)if(t[n]<e)return n;return-1}function Po(e,t,n){let r=ko(t),i=Ao(e,t,n),a=r.findIndex(e=>!Oo(i[e]));return a===-1?t.length:r[a]}function Fo(e,t,n){let r=Math.max(0,Math.min(e.length,e.length-(t.length-n))),i=0;for(;i<r&&i<n&&e[i]===t[i];)i++;return{from:i,to:r,inserted:t.slice(i,n)}}function Io(e,t,n,r,i){let a=ko(r),o=[...Ao(e,r,i)],s=e=>jo(e,a,r),c=(e,t)=>a.filter(n=>n>=e&&n<t),{from:l,to:u,inserted:d}=Fo(e,t,n),f=[...d].filter(Oo);if(d.length>0&&f.length===0){let e=Mo(l,a);return{value:o.join(``),selection:{start:s(e),end:s(e)}}}if(d.length===0){let e=c(l,u),t=No(l,a),n=e.length>0?e:t===-1?[]:[a[t]];for(let e of n)o[e]=i;let r=e.length>0?Mo(l,a):Math.max(t,0);return{value:o.join(``),selection:{start:s(r),end:s(r)}}}for(let e of c(l,u))o[e]=i;let p=Mo(l,a);if(p>=a.length){let e=a.findIndex(e=>!Oo(o[e]));e!==-1&&(p=e)}for(let e of f){if(p>=a.length)break;o[a[p]]=e,p++}return{value:o.join(``),selection:{start:s(p),end:s(p)}}}function Lo(e,t){return!ko(t).some(t=>Oo(e[t]))}function Ro(e){let{mask:t,maskPlaceholder:n=`_`,value:r=``,onChange:i,beforeMaskedStateChange:a,onFocus:o,onBlur:s,onClick:l,ref:u,...d}=e,p=(0,c.useRef)(null),[m,h]=(0,c.useState)(!1),g=(0,c.useRef)(null);(0,c.useLayoutEffect)(()=>{g.current!==null&&(p.current?.setSelectionRange(g.current,g.current),g.current=null)});let _=Lo(r,t),v=_?m?Ao(``,t,n):``:Ao(r,t,n),y=e=>{g.current=e,p.current?.setSelectionRange(e,e)},b=e=>{let r=e.target,o=r.value,s=Io(v,o,r.selectionStart??o.length,t,n),c=a?a({previousState:{value:v,selection:null},nextState:s}):s,l=Ao(c.value,t,n),u=c.selection?.start??Po(l,t,n);if(l===v){r.value=v,y(u);return}g.current=u,i?.(Lo(l,t)?``:l)},x=e=>{h(!0),_&&(g.current=0),o?.(e)},S=e=>{let r=e.currentTarget,i=Po(v,t,n);r.selectionStart===r.selectionEnd&&(r.selectionStart??0)>i&&r.setSelectionRange(i,i),l?.(e)},C=e=>{h(!1),s?.(e)};return(0,f.jsx)(`input`,{...d,ref:gn(p,u),value:v,onChange:b,onFocus:x,onBlur:C,onClick:S,inputMode:`numeric`})}var zo={datePicker:`datePicker_ZohTp`,"datePicker-header":`datePicker-header_YmSWE`,datePickerHeader:`datePicker-header_YmSWE`,"datePicker-header-monthAndYear":`datePicker-header-monthAndYear_b5ntO`,datePickerHeaderMonthAndYear:`datePicker-header-monthAndYear_b5ntO`,"datePicker-header-monthAndYear-container":`datePicker-header-monthAndYear-container_Hcgks`,datePickerHeaderMonthAndYearContainer:`datePicker-header-monthAndYear-container_Hcgks`,"datePicker-header-month":`datePicker-header-month_jqFHl`,datePickerHeaderMonth:`datePicker-header-month_jqFHl`,"datePicker-header-year":`datePicker-header-year_4egHF`,datePickerHeaderYear:`datePicker-header-year_4egHF`,"datePicker-month":`datePicker-month_7iosT`,datePickerMonth:`datePicker-month_7iosT`,"datePicker-modalInput":`datePicker-modalInput_E2Vig`,datePickerModalInput:`datePicker-modalInput_E2Vig`};function Bo(e){return e==null||e===``||bn(e)?null:Object.prototype.toString.call(e)===`[object Date]`?`a Date. Convert it with dateToDay()`:`${JSON.stringify(e)}, which is not a day`}function Vo(e){let{className:t=``,selected:n,onSelect:r=()=>null,formValidator:i=null,noInput:a=!1,noHeader:o=!1,isModal:s=!1,isInline:u=!1,onChange:p=()=>null,minDate:m=null,maxDate:h=null,children:g=null,showClearButton:_=!1,label:v=``,isValid:y=!0,errorMessage:b=``,isRequired:x=!1,startDate:S,endDate:C,style:w,classNames:T,styles:E,...O}=D(`DatePicker`,e),k=()=>bn(i?i.value:n),A=bn(m),j=bn(h),M=k(),N=yn(M)??ho(),[P,F]=(0,c.useState)(N.month),[I,L]=(0,c.useState)(N.year),[R,z]=(0,c.useState)(!1),[B,V]=(0,c.useState)(()=>go(M)),[H,U]=(0,c.useState)(!1),[W,G]=(0,c.useState)(!1),[,ee]=(0,c.useState)(0),[K,te]=(0,c.useState)(n),q=(0,c.useRef)(i);if(K!==n){te(n);let e=yn(n)??ho();F(e.month),L(e.year),V(go(n))}let J=(0,c.useRef)(new Set),re=i?.value;(0,c.useEffect)(()=>{let e={selected:n,formValidator:re,minDate:m,maxDate:h,startDate:S,endDate:C};for(let[t,n]of Object.entries(e)){let e=Bo(n);e&&!J.current.has(t)&&(J.current.add(t),console.warn(`DatePicker: \`${t}\` takes a day as a 'YYYY-MM-DD' string, and got ${e}. See "Migration from Date values" in docs/DatePicker.md.`))}},[n,re,m,h,S,C]),(0,c.useEffect)(()=>{if(q.current=i,!i)return;i.label=v,i.validate();let e=()=>{let e=yn(i.value);e&&(F(e.month),L(e.year)),V(go(i.value)),ee(e=>e+1)};return i.registerOnUpdateListener(e),()=>i.removeOnUpdateListener(e)},[i,v]);let ie=()=>i?i.touched&&i.hasError():!y||!!b,ae=()=>!!(x||i?.validators.find(e=>e.validatorId===`required`)),oe=e=>{V(go(e)),i&&i.set(e),p(e)},se=e=>{oe(e),r(e),z(!1)},le=e=>{let t=I*12+P-1+e,n=Math.floor(t/12);n<0||n>9999||(L(n),F(t%12+1))},ue=e=>{let t=_o(e);return!t||A&&t<A||j&&t>j?null:t},Y=({previousState:e,nextState:t})=>{if(t.value===e.value)return t;let n=vo(t.value,e.value,t.selection??null),r=ue(n.value);return r&&oe(r),n},de=()=>{let e=400,t=ho().year-200,n=yn(A),r=yn(j);return n&&(t=n.year),r&&(e=Math.max(0,r.year-t+1)),Array.from(Array(e).keys()).map(e=>({key:e+t,label:e+t}))},fe=k(),pe=ie(),me=o?null:(0,f.jsxs)(`div`,{className:(0,l.default)(zo.datePickerHeader,T?.header),style:E?.header,children:[(0,f.jsx)(ce,{icon:d.faChevronLeft,onClick:()=>le(-1)}),(0,f.jsx)(`div`,{className:zo.datePickerHeaderMonthAndYearContainer,children:(0,f.jsxs)(`div`,{className:zo.datePickerHeaderMonthAndYear,children:[(0,f.jsx)(Eo,{plainStyle:!0,scrollToSelected:!0,onChange:e=>F(e),className:(0,l.default)(zo.datePickerHeaderMonth,T?.monthDropdown),style:E?.monthDropdown,value:lo(so(`-`),I,P,1),items:uo().map((e,t)=>({key:t+1,label:e}))}),(0,f.jsx)(Eo,{plainStyle:!0,scrollToSelected:!0,useMatLabelStyle:!1,className:(0,l.default)(zo.datePickerHeaderYear,T?.yearDropdown),style:E?.yearDropdown,onChange:e=>L(e),value:I,items:de()})]})}),(0,f.jsx)(ce,{icon:d.faChevronRight,onClick:()=>le(1)})]}),X=(0,f.jsxs)(f.Fragment,{children:[me,(0,f.jsx)(So,{className:(0,l.default)(zo.datePickerMonth,T?.calendar),style:E?.calendar,month:P,year:I,onSelect:se,selectionStart:bn(S)??fe,selectionEnd:bn(C)??fe,minDate:A,maxDate:j,onNavigateMonth:le}),_&&(0,f.jsx)(ne,{onClick:()=>se(null),className:T?.clearButton,style:E?.clearButton,children:`Clear`}),g]}),Z=a?null:(0,f.jsx)(Ji,{autoComplete:`off`,className:T?.input,style:E?.input,readOnly:s,classNames:s?{input:zo.datePickerModalInput}:void 0,label:`${v}${ae()?` *`:``}`,value:B,onChange:e=>V(e),onClick:()=>z(!0),customInput:(0,f.jsx)(Ro,{mask:`99.99.9999`,beforeMaskedStateChange:Y}),onBlur:()=>{q.current&&(q.current.touched=!0),U(!1),B!==go(k())&&oe(ue(B))},onFocus:()=>U(!0),onMouseEnter:()=>G(!0),onMouseLeave:()=>G(!1),isValid:!pe}),he=u?X:s?(0,f.jsx)(xa,{hideHeader:!0,isOpen:R,onClose:()=>z(!1),children:X}):(0,f.jsx)(sn,{isOpen:R,onOpenChange:e=>z(e),content:X,placement:wt.Bottom,align:Tt.Start,closeOnTriggerClick:!1,constrainWidth:!1,children:Z});return(0,f.jsxs)(`div`,{...O,className:(0,l.default)(zo.datePicker,t,T?.root),style:{...w,...E?.root},children:[(s||u)&&Z,he,(0,f.jsx)(Ri,{variant:`error`,message:i?i.getCurrentErrorMessage():b||``,isVisible:pe&&(H||W)})]})}var Ho=function(e){return e.Left=`left`,e.Center=`center`,e.Right=`right`,e}({}),Uo=function(e){return e.Horizontal=`horizontal`,e.Vertical=`vertical`,e}({}),Wo={divider:`divider_OO203`,"divider-line":`divider-line_nVep8`,dividerLine:`divider-line_nVep8`,"divider-content":`divider-content_-y7ou`,dividerContent:`divider-content_-y7ou`,"divider-text-left":`divider-text-left_HYmeQ`,dividerTextLeft:`divider-text-left_HYmeQ`,"divider-text-right":`divider-text-right_RH5sH`,dividerTextRight:`divider-text-right_RH5sH`,"divider-vertical":`divider-vertical_CasA6`,dividerVertical:`divider-vertical_CasA6`},Go={[Ho.Left]:Wo.dividerTextLeft,[Ho.Center]:Wo.dividerTextCenter,[Ho.Right]:Wo.dividerTextRight};function Ko(e){let{text:t,textPosition:n=Ho.Center,orientation:r=Uo.Horizontal,className:i,style:a,classNames:o,styles:s,...c}=D(`Divider`,e),u=t!=null&&t!==``,d=r===Uo.Vertical;return(0,f.jsxs)(`div`,{...c,role:`separator`,"aria-orientation":d?`vertical`:void 0,className:(0,l.default)(Wo.divider,d&&Wo.dividerVertical,u&&Go[n],i,o?.root),style:{...a,...s?.root},children:[(0,f.jsx)(`span`,{className:(0,l.default)(Wo.dividerLine,o?.line),style:s?.line}),u&&(0,f.jsx)(`span`,{className:(0,l.default)(Wo.dividerContent,o?.content),style:s?.content,children:t}),u&&(0,f.jsx)(`span`,{className:(0,l.default)(Wo.dividerLine,o?.line),style:s?.line})]})}var qo={drawer:`drawer_5SRoc`,"drawer-open":`drawer-open_-YQ8n`,drawerOpen:`drawer-open_-YQ8n`,"drawer-content":`drawer-content_sHIAP`,drawerContent:`drawer-content_sHIAP`,"drawer-content-inner":`drawer-content-inner_f-IDz`,drawerContentInner:`drawer-content-inner_f-IDz`};function Jo({className:e,isOpen:t=!1,closedWidth:n,openedWidth:r,children:i,style:a,classNames:o,styles:s,...u}){let d=(0,c.useRef)(null),p=(0,c.useRef)(null);return(0,c.useEffect)(()=>{let e=new ResizeObserver(()=>{d.current&&p.current&&d.current.style.setProperty(`--drawer-content-width`,`${p.current.scrollWidth}px`)});return p.current&&e.observe(p.current),()=>e.disconnect()},[]),(0,f.jsx)(`div`,{...u,ref:d,className:(0,l.default)(qo.drawer,t&&qo.drawerOpen,e,o?.root),style:{...n!==void 0&&{"--drawer-closed-width":n},...r!==void 0&&{"--drawer-opened-width":r},...a,...s?.root},children:(0,f.jsx)(`div`,{ref:p,className:(0,l.default)(qo.drawerContent,o?.content),style:s?.content,children:(0,f.jsx)(`div`,{className:(0,l.default)(qo.drawerContentInner,o?.inner),style:s?.inner,children:i})})})}var Yo=function(e){return e.Idle=`idle`,e.Dragging=`dragging`,e.Active=`active`,e.Error=`error`,e}({}),Xo=function(e){return e.File=`file`,e.Base64=`base64`,e.Text=`text`,e}({}),Zo={dropZone:`dropZone_9iJZy`,"dropZone-clickable":`dropZone-clickable_pcRhf`,dropZoneClickable:`dropZone-clickable_pcRhf`,"dropZone-disabled":`dropZone-disabled_YWcMp`,dropZoneDisabled:`dropZone-disabled_YWcMp`,"dropZone-default":`dropZone-default_5dSsT`,dropZoneDefault:`dropZone-default_5dSsT`,"dropZone-dragging":`dropZone-dragging_nGSL3`,dropZoneDragging:`dropZone-dragging_nGSL3`,"dropZone-active":`dropZone-active_Rov1w`,dropZoneActive:`dropZone-active_Rov1w`,"dropZone-error":`dropZone-error_hlnmB`,dropZoneError:`dropZone-error_hlnmB`,"dropZone-content":`dropZone-content_1QDk7`,dropZoneContent:`dropZone-content_1QDk7`,"dropZone-content-dragging":`dropZone-content-dragging_ettwl`,dropZoneContentDragging:`dropZone-content-dragging_ettwl`,"dropZone-fileList":`dropZone-fileList_si3X1`,dropZoneFileList:`dropZone-fileList_si3X1`,"dropZone-fileItem":`dropZone-fileItem_fES6y`,dropZoneFileItem:`dropZone-fileItem_fES6y`,"dropZone-input":`dropZone-input_4DGty`,dropZoneInput:`dropZone-input_4DGty`};function Qo(e,t){if(!t.length)return!0;let n=e.name.toLowerCase(),r=e.type.toLowerCase();return t.some(e=>{let t=e.trim().toLowerCase();return t?t.startsWith(`.`)?n.endsWith(t):t.endsWith(`/*`)?r.startsWith(t.slice(0,-1)):r===t:!1})}function $o(e,t){return t===Xo.File?Promise.resolve({ok:!0,value:e}):new Promise(n=>{let r=new FileReader;r.onload=t=>{let r=t.target?.result;if(typeof r!=`string`){n({ok:!1});return}n({ok:!0,value:{name:e.name,size:e.size,type:e.type,lastModified:e.lastModified,data:r}})},r.onerror=()=>n({ok:!1}),t===Xo.Base64?r.readAsDataURL(e):r.readAsText(e)})}function es(e){return new Promise(t=>{if(e.isFile)e.file(e=>t([e]),()=>t([]));else if(e.isDirectory){let n=e.createReader(),r=[],i=()=>{n.readEntries(e=>{e.length?(r.push(...e),i()):Promise.all(r.map(es)).then(e=>t(e.flat()))},()=>t([]))};i()}else t([])})}function ts(e,t){let n=e.items;if(n&&n.length){if(t&&typeof n[0].webkitGetAsEntry==`function`){let e=[];for(let t=0;t<n.length;t+=1)if(n[t].kind===`file`){let r=n[t].webkitGetAsEntry();r&&e.push(r)}if(e.length)return Promise.all(e.map(es)).then(e=>e.flat())}let e=[];for(let t=0;t<n.length;t+=1)if(n[t].kind===`file`){let r=n[t].getAsFile();r&&e.push(r)}return Promise.resolve(e)}return Promise.resolve(Array.from(e.files||[]))}function ns({children:e,acceptedTypes:t=[],returnType:n=Xo.File,openPickerOnClick:r=!1,multiple:i=!0,maxFiles:a,maxSize:o,enablePaste:s=!1,allowDirectories:u=!0,capture:d,disabled:p=!1,unstyled:m=!1,showFileNames:h=!1,files:g,onFilesChanged:_,onReject:v,onStatusChanged:y,className:b,style:x,classNames:S,styles:C,...w}){let[T,E]=(0,c.useState)(Yo.Idle),D=(0,c.useRef)(null),O=(0,c.useId)(),k=(0,c.useRef)(T),A=(0,c.useRef)(0),M=(0,c.useRef)(0),N=(0,c.useRef)({acceptedTypes:t,returnType:n,multiple:i,maxFiles:a,maxSize:o,allowDirectories:u,disabled:p,onFilesChanged:_,onReject:v,onStatusChanged:y});(0,c.useEffect)(()=>{N.current={acceptedTypes:t,returnType:n,multiple:i,maxFiles:a,maxSize:o,allowDirectories:u,disabled:p,onFilesChanged:_,onReject:v,onStatusChanged:y}});let P=(0,c.useCallback)(e=>{k.current!==e&&(k.current=e,E(e),N.current.onStatusChanged?.(e))},[]),F=(0,c.useCallback)(async e=>{let t=N.current,n=[],r=[];for(let i of e)Qo(i,t.acceptedTypes)?t.maxSize!=null&&i.size>t.maxSize?n.push({file:i,reason:`tooLarge`}):r.push(i):n.push({file:i,reason:`unacceptedType`});t.multiple||(r=r.slice(0,1)),t.maxFiles!=null&&r.length>t.maxFiles&&(r.slice(t.maxFiles).forEach(e=>n.push({file:e,reason:`tooMany`})),r=r.slice(0,t.maxFiles));let i=await Promise.all(r.map(e=>$o(e,t.returnType))),a=[];i.forEach((e,t)=>{e.ok?a.push(e.value):n.push({file:r[t],reason:`readError`})}),n.length&&t.onReject?.(n),P(n.length&&!a.length?Yo.Error:Yo.Idle),a.length&&t.onFilesChanged?.(a)},[P]);(0,c.useEffect)(()=>{let e=e=>!e||Array.from(e.types||[]).includes(`Files`),t=t=>{!N.current.disabled&&e(t.dataTransfer)&&(A.current+=1,(k.current===Yo.Idle||k.current===Yo.Error)&&P(Yo.Dragging))},n=()=>{A.current=Math.max(0,A.current-1),A.current===0&&k.current===Yo.Dragging&&P(Yo.Idle)},r=()=>{A.current=0,M.current=0,k.current===Yo.Dragging&&P(Yo.Idle)};return window.addEventListener(`dragenter`,t),window.addEventListener(`dragleave`,n),window.addEventListener(`drop`,r),()=>{window.removeEventListener(`dragenter`,t),window.removeEventListener(`dragleave`,n),window.removeEventListener(`drop`,r)}},[P]);let I=(0,c.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),e.dataTransfer&&(e.dataTransfer.dropEffect=p?`none`:`copy`)},[p]),L=(0,c.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),!p&&(M.current+=1,P(Yo.Active))},[p,P]),R=(0,c.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),M.current=Math.max(0,M.current-1),M.current===0&&P(A.current>0?Yo.Dragging:Yo.Idle)},[P]),z=(0,c.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),M.current=0,A.current=0,p||!e.dataTransfer){P(Yo.Idle);return}P(Yo.Idle),ts(e.dataTransfer,N.current.allowDirectories).then(e=>{e.length&&F(e)})},[p,P,F]),B=(0,c.useCallback)(()=>{!p&&r&&D.current?.click()},[p,r]),V=(0,c.useCallback)(e=>{let t=Array.from(e.target.files||[]);e.target.value=``,t.length&&F(t)},[F]),H=(0,c.useCallback)(e=>{if(!s||p)return;let t=Array.from(e.clipboardData?.files||[]);t.length&&(e.preventDefault(),F(t))},[s,p,F]),U=(0,c.useCallback)(e=>{r&&!p&&j(e)&&(e.preventDefault(),B())},[r,p,B]),W=T===Yo.Dragging||T===Yo.Active,G={status:T,isDragging:W,isActive:T===Yo.Active,disabled:p},ee=t.length?t.join(`,`):void 0;return(0,f.jsxs)(`div`,{...w,className:(0,l.default)(Zo.dropZone,r&&Zo.dropZoneClickable,p&&Zo.dropZoneDisabled,!m&&Zo.dropZoneDefault,!m&&T===Yo.Dragging&&Zo.dropZoneDragging,!m&&T===Yo.Active&&Zo.dropZoneActive,!m&&T===Yo.Error&&Zo.dropZoneError,S?.root,b),style:{...C?.root,...x},onDragEnter:L,onDragLeave:R,onDragOver:I,onDrop:z,onClick:B,onKeyDown:U,onPaste:s?H:void 0,role:r?`button`:void 0,tabIndex:r&&!p?0:void 0,"aria-disabled":p||void 0,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Zo.dropZoneContent,W&&Zo.dropZoneContentDragging,S?.content),style:C?.content,children:typeof e==`function`?e(G):e}),h&&g&&g.length>0&&(0,f.jsx)(`div`,{className:(0,l.default)(Zo.dropZoneFileList,S?.fileList),style:C?.fileList,children:g.map((e,t)=>(0,f.jsx)(`div`,{className:(0,l.default)(Zo.dropZoneFileItem,S?.fileItem),style:C?.fileItem,children:e.name},`${e.name}-${t}`))}),(0,f.jsx)(`input`,{ref:D,id:O,type:`file`,className:(0,l.default)(Zo.dropZoneInput,S?.input),style:C?.input,accept:ee,multiple:i,capture:d,disabled:p,onChange:V,tabIndex:-1,"aria-hidden":`true`})]})}var rs={emptyState:`emptyState_KXOIx`},is={empty:`No entries available`};function as({className:e,icon:t,children:n,labels:r,style:i,classNames:a,styles:o,...s}){let c=O(`EmptyState`,r,is);return(0,f.jsxs)(`div`,{...s,className:(0,l.default)(rs.emptyState,e,a?.root),style:{...i,...o?.root},children:[t?K(t,{className:a?.icon,style:o?.icon}):null,(0,f.jsx)(`div`,{className:a?.text,style:o?.text,children:n??c.empty})]})}var os={errorBoundary:`errorBoundary_XdPM0`,errorBoundaryHeader:`errorBoundaryHeader_2PdRz`,errorBoundaryBadge:`errorBoundaryBadge_TyXdO`,errorBoundaryBadgeIn:`errorBoundaryBadgeIn_Q-MMB`,errorBoundaryIcon:`errorBoundaryIcon_PcZ4H`,errorBoundaryTitle:`errorBoundaryTitle_X9tEE`,errorBoundaryFadeUp:`errorBoundaryFadeUp_2qx5d`,errorBoundaryDescription:`errorBoundaryDescription_NELdD`,errorBoundaryStack:`errorBoundaryStack_BUkBD`,errorBoundaryStackHeader:`errorBoundaryStackHeader_uimLH`,errorBoundaryStackLabel:`errorBoundaryStackLabel_D-19W`,errorBoundaryCopyButton:`errorBoundaryCopyButton_e09KC`,errorBoundaryStackTrace:`errorBoundaryStackTrace_DskzG`,errorBoundaryActions:`errorBoundaryActions_h3GMQ`},ss={stackTrace:`Stack trace`,copy:`Copy`,copied:`Copied`,reset:`Try again`,copySuccessToast:`Stack trace copied to clipboard`,copyErrorToast:`Could not copy stack trace`};function cs(e,t){let n=[e.stack??`${e.name}: ${e.message}`];return t?.componentStack&&n.push(`Component stack:${t.componentStack}`),n.join(`
2
2
 
3
- `)}var os=class extends c.default.Component{constructor(...e){super(...e),this.state={error:null,errorInfo:null},this.reset=()=>{this.setState({error:null,errorInfo:null}),this.props.onReset?.()}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.setState({errorInfo:t}),this.props.onError?.(e,t)}componentDidUpdate(e){if(!this.state.error)return;let t=e.resetKeys??[],n=this.props.resetKeys??[];(n.length!==t.length||n.some((e,n)=>e!==t[n]))&&this.reset()}render(){let{error:e,errorInfo:t}=this.state,{children:n=null,title:r=`Something went wrong`,description:i,labels:a,fallback:o,hideStack:s=!1,className:c,style:p,classNames:m,styles:h,onError:g,onReset:_,resetKeys:v,role:y=`alert`,...b}=this.props;if(!e)return n;let x={...is,...a};return o?typeof o==`function`?o({error:e,errorInfo:t,resetErrorBoundary:this.reset}):o:(0,f.jsxs)(`div`,{...b,role:y,className:(0,l.default)(rs.errorBoundary,c,m?.root),style:{...p,...h?.root},children:[(0,f.jsxs)(`div`,{className:(0,l.default)(rs.errorBoundaryHeader,m?.header),style:h?.header,children:[(0,f.jsx)(`div`,{className:(0,l.default)(rs.errorBoundaryBadge,m?.badge),style:h?.badge,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faTriangleExclamation,className:(0,l.default)(rs.errorBoundaryIcon,m?.icon),style:h?.icon})}),(0,f.jsx)(`div`,{className:(0,l.default)(rs.errorBoundaryTitle,m?.title),style:h?.title,children:r}),(0,f.jsx)(`div`,{className:(0,l.default)(rs.errorBoundaryDescription,m?.description),style:h?.description,children:i??e.message})]}),!s&&(0,f.jsxs)(N,{title:x.stackTrace,className:(0,l.default)(rs.errorBoundaryStack,m?.stack),style:h?.stack,children:[(0,f.jsxs)(`div`,{className:(0,l.default)(rs.errorBoundaryStackHeader,m?.stackHeader),style:h?.stackHeader,children:[(0,f.jsx)(`span`,{className:(0,l.default)(rs.errorBoundaryStackLabel,m?.stackLabel),style:h?.stackLabel,children:e.name||`Error`}),(0,f.jsx)(Xa,{value:as(e,t),labels:{copy:x.copy,copied:x.copied},onCopy:()=>Ae(x.copySuccessToast,{type:`success`}),onError:()=>Ae(x.copyErrorToast,{type:`error`}),className:(0,l.default)(rs.errorBoundaryCopyButton,m?.copyButton),style:h?.copyButton})]}),(0,f.jsx)(`pre`,{className:(0,l.default)(rs.errorBoundaryStackTrace,m?.stackTrace),style:h?.stackTrace,children:as(e,t)})]}),(0,f.jsx)(`div`,{className:(0,l.default)(rs.errorBoundaryActions,m?.actions),style:h?.actions,children:(0,f.jsx)(ne,{onClick:this.reset,icon:d.faArrowRotateRight,className:(0,l.default)(rs.errorBoundaryResetButton,m?.resetButton),style:h?.resetButton,children:x.reset})})]})}},ss={fab:`fab_hyAAa`,"fab-content":`fab-content_IBiXm`,fabContent:`fab-content_IBiXm`,"fab-content-container":`fab-content-container_FQD1x`,fabContentContainer:`fab-content-container_FQD1x`,"fab-size-mini":`fab-size-mini_KP9BD`,fabSizeMini:`fab-size-mini_KP9BD`},cs={default:null,mini:ss.fabSizeMini};function ls({style:e,children:t=null,size:n=`default`,className:r=``,styleType:i=z.Primary,onClick:a=()=>{}}){return(0,f.jsx)(ne,{styleType:i,size:B.Icon,className:(0,l.default)(ss.fab,cs[n],r),style:e,onClick:a,children:(0,f.jsx)(`div`,{className:ss.fabContentContainer,children:(0,f.jsx)(`div`,{className:ss.fabContent,children:t})})})}var us={fab:`fab_YI34X`,appear:`appear_DL0wm`,"fab-container":`fab-container_8uoYo`,fabContainer:`fab-container_8uoYo`,"fab-menu":`fab-menu_O1WO9`,fabMenu:`fab-menu_O1WO9`,"fab-menu-backdrop":`fab-menu-backdrop_m9T6a`,fabMenuBackdrop:`fab-menu-backdrop_m9T6a`,"fab-menu-backdrop-open":`fab-menu-backdrop-open_35mlH`,fabMenuBackdropOpen:`fab-menu-backdrop-open_35mlH`,"fab-menu-entry":`fab-menu-entry_rIgXr`,fabMenuEntry:`fab-menu-entry_rIgXr`,"fab-menu-entry-shown":`fab-menu-entry-shown_066HC`,fabMenuEntryShown:`fab-menu-entry-shown_066HC`,"fab-menu-entry-label":`fab-menu-entry-label_pXdDf`,fabMenuEntryLabel:`fab-menu-entry-label_pXdDf`,"fab-menu-entry-label-container":`fab-menu-entry-label-container_oeKI5`,fabMenuEntryLabelContainer:`fab-menu-entry-label-container_oeKI5`,"fab-icon":`fab-icon_5Fp-6`,fabIcon:`fab-icon_5Fp-6`,"fab-icon-menuOpen":`fab-icon-menuOpen_Jp8Qb`,fabIconMenuOpen:`fab-icon-menuOpen_Jp8Qb`,"fab-icon-content":`fab-icon-content_o0VDx`,fabIconContent:`fab-icon-content_o0VDx`,"fab-icon-content-shown":`fab-icon-content-shown_oY19H`,fabIconContentShown:`fab-icon-content-shown_oY19H`};function ds({children:e=null,size:t=`default`,menuEntries:n=[],onMenuEntryClicked:r=()=>{},onClick:i=()=>{},closeMenuOnEntryClicked:a=!0,className:o,style:s,classNames:p,styles:m,...h}){let[g,_]=(0,c.useState)(!1);function v(){n.length>0&&_(e=>!e),i()}function y(e,t){e.stopPropagation(),a&&_(!1),r(t)}return(0,f.jsxs)(`div`,{...h,className:(0,l.default)(us.fabContainer,o,p?.root),style:{...s,...m?.root},children:[(0,f.jsx)(`div`,{className:(0,l.default)(us.fabMenuBackdrop,g&&us.fabMenuBackdropOpen,p?.backdrop),style:m?.backdrop,onClick:e=>{e.stopPropagation(),_(!1)}}),(0,f.jsx)(`div`,{onClick:e=>e.stopPropagation(),children:(0,f.jsx)(ls,{className:(0,l.default)(us.fab,p?.button),style:m?.button,size:t,onClick:v,children:(0,f.jsxs)(`div`,{className:(0,l.default)(us.fabIcon,g&&us.fabIconMenuOpen,p?.icon),style:m?.icon,children:[(0,f.jsx)(`div`,{className:(0,l.default)(us.fabIconContent,!g&&us.fabIconContentShown),children:e}),(0,f.jsx)(`div`,{className:(0,l.default)(us.fabIconContent,g&&us.fabIconContentShown),children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faPlus})})]})})}),(0,f.jsx)(`div`,{className:(0,l.default)(us.fabMenu,p?.menu),style:m?.menu,children:n.map(({id:e,label:t,icon:n})=>(0,f.jsxs)(`div`,{className:(0,l.default)(us.fabMenuEntry,g&&us.fabMenuEntryShown,p?.menuEntry),style:m?.menuEntry,onClick:t=>y(t,e),children:[t&&(0,f.jsx)(`div`,{className:us.fabMenuEntryLabelContainer,children:(0,f.jsx)(`div`,{className:(0,l.default)(us.fabMenuEntryLabel,p?.menuEntryLabel),style:m?.menuEntryLabel,children:t})}),(0,f.jsx)(ls,{size:`mini`,styleType:z.Default,children:K(n)})]},e))})]})}var fs={flip:`flip_bL-UK`,"flip-clickable":`flip-clickable_YcfaN`,flipClickable:`flip-clickable_YcfaN`,"flip-perspective":`flip-perspective_i9Km7`,flipPerspective:`flip-perspective_i9Km7`,"flip-surface":`flip-surface_wu3Rt`,flipSurface:`flip-surface_wu3Rt`,"flip-front":`flip-front_2kwDN`,flipFront:`flip-front_2kwDN`,"flip-back":`flip-back_4eqrK`,flipBack:`flip-back_4eqrK`};function ps(){return typeof process<`u`&&!1}function ms(){return typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}function hs(e){let{ref:t,front:n,back:r,flipped:i,defaultFlipped:a=!1,flipOnClick:o=!1,flipAxis:s=`y`,reverse:u=!1,flipDuration:d=600,perspective:p=800,disabled:m=!1,onFlip:h,onFlipEnd:g,className:_,style:v,classNames:y,styles:b,...x}=D(`Flip`,e),S=i!==void 0,[C,w]=(0,c.useState)(a),T=S?i:C;function E(e){S||w(e),h?.(e)}let O=()=>{o&&!m&&E(!T)},k=e=>{o&&!m&&j(e)&&(e.preventDefault(),E(!T))},A=(0,c.useRef)(!1);(0,c.useEffect)(()=>{if(!A.current){A.current=!0;return}ms()&&g?.(T)},[T]);let M=e=>{e.target===e.currentTarget&&e.propertyName===`transform`&&g?.(T)};(0,c.useImperativeHandle)(t,()=>({flip(){if(S){ps()&&console.warn("Flip: flip() called on a controlled instance, update the `flipped` prop instead.");return}E(!T)},setFlipped(e){if(S){ps()&&console.warn("Flip: setFlipped() called on a controlled instance, update the `flipped` prop instead.");return}E(e)},reset(){S||w(!1)}}));let N=u?-180:180,P=s===`x`&&T?N:0,F=s===`y`&&T?N:0,I=s===`x`?N:0,L=s===`y`?N:0;return(0,f.jsx)(`div`,{...x,className:(0,l.default)(fs.flip,o&&fs.flipClickable,_,y?.root),style:{...v,...b?.root},onClick:O,onKeyDown:o?k:void 0,role:o?`button`:void 0,tabIndex:o?0:void 0,"aria-pressed":o?T:void 0,children:(0,f.jsx)(`div`,{className:(0,l.default)(fs.flipPerspective,y?.perspective),style:{perspective:p===`none`?`none`:`${p}px`,...b?.perspective},children:(0,f.jsxs)(`div`,{className:(0,l.default)(fs.flipSurface,y?.surface),style:{transform:`rotateX(${P}deg) rotateY(${F}deg)`,"--flip-duration":`${d}ms`,...b?.surface},"data-flipped":T,onTransitionEnd:M,children:[(0,f.jsx)(`div`,{className:(0,l.default)(fs.flipFront,y?.front),style:b?.front,children:n}),(0,f.jsx)(`div`,{className:(0,l.default)(fs.flipBack,y?.back),style:{transform:`rotateX(${I}deg) rotateY(${L}deg)`,...b?.back},children:r})]})})})}var gs=function(e){return e.Metric=`metric`,e.Imperial=`imperial`,e}({}),_s=function(e){return e.Exterior=`exterior`,e.Interior=`interior`,e.Partition=`partition`,e.Virtual=`virtual`,e}({}),vs=function(e){return e.Door=`door`,e.Window=`window`,e.Archway=`archway`,e.Gap=`gap`,e}({}),ys=function(e){return e.None=`none`,e.StartLeft=`startLeft`,e.StartRight=`startRight`,e.EndLeft=`endLeft`,e.EndRight=`endRight`,e.Double=`double`,e.Sliding=`sliding`,e}({}),bs=function(e){return e.ZeroLengthWall=`zeroLengthWall`,e.SelfLoopWall=`selfLoopWall`,e.DuplicateWall=`duplicateWall`,e.CoincidentNodes=`coincidentNodes`,e.UnsplitCrossing=`unsplitCrossing`,e.UnsplitNodeOnWall=`unsplitNodeOnWall`,e.OverlappingWalls=`overlappingWalls`,e.OrphanNode=`orphanNode`,e.DanglingOpening=`danglingOpening`,e.UnmatchedRoom=`unmatchedRoom`,e.OpeningDropped=`openingDropped`,e}({}),xs=10,Ss=100;function Cs(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function ws(e,t,n){return(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x)}function Ts(e,t,n){let r=n.x-t.x,i=n.y-t.y,a=r*r+i*i;if(a===0)return{dist:Cs(e,t),t:0,point:{x:t.x,y:t.y}};let o=((e.x-t.x)*r+(e.y-t.y)*i)/a,s=o<0?0:o>1?1:o,c={x:t.x+s*r,y:t.y+s*i};return{dist:Cs(e,c),t:s,point:c}}function Es(e,t,n){return Ts(e,t,n).point}function Ds(e,t,n,r,i=1){let a=Cs(e,t),o=Cs(n,r);if(a<1e-9||o<1e-9)return{kind:`none`};let s=t.x-e.x,c=t.y-e.y,l=r.x-n.x,u=r.y-n.y,d=s*u-c*l,f=Math.abs(ws(e,t,n))/a,p=Math.abs(ws(e,t,r))/a;if(Math.abs(d)<1e-12||f<i&&p<i){if(f>=i||p>=i)return{kind:`none`};let t=s*s+c*c,o=((n.x-e.x)*s+(n.y-e.y)*c)/t,l=((r.x-e.x)*s+(r.y-e.y)*c)/t,u=Math.min(o,l),d=Math.max(o,l),m=i/a;return d<m||u>1-m||Math.min(d,1)-Math.max(u,0)<m?{kind:`collinearDisjoint`}:{kind:`collinearOverlap`}}let m=((n.x-e.x)*u-(n.y-e.y)*l)/d,h=((n.x-e.x)*c-(n.y-e.y)*s)/d,g=i/a,_=i/o;if(m<-g||m>1+g||h<-_||h>1+_)return{kind:`none`};let v={x:e.x+m*s,y:e.y+m*c},y=m<=g||m>=1-g,b=h<=_||h>=1-_;return y||b?{kind:`touch`,t:m,s:h,point:v}:{kind:`proper`,t:m,s:h,point:v}}function Os(e){let t=e.length;if(t<3)return 0;let n=0;for(let r=0,i=t-1;r<t;i=r++)n+=e[i].x*e[r].y-e[r].x*e[i].y;return n/2}function ks(e){let t=e.length;if(t<2)return 0;let n=0;for(let r=0,i=t-1;r<t;i=r++)n+=Cs(e[i],e[r]);return n}function As(e){let t=e.length;if(t===0)return{x:0,y:0};if(t<3)return{x:e.reduce((e,t)=>e+t.x,0)/t,y:e.reduce((e,t)=>e+t.y,0)/t};let n=0,r=0,i=0;for(let a=0,o=t-1;a<t;o=a++){let t=e[o].x*e[a].y-e[a].x*e[o].y;n+=t,r+=(e[o].x+e[a].x)*t,i+=(e[o].y+e[a].y)*t}return Math.abs(n)<1e-9?{x:e.reduce((e,t)=>e+t.x,0)/t,y:e.reduce((e,t)=>e+t.y,0)/t}:{x:r/(3*n),y:i/(3*n)}}function js(e,t){let n=!1;for(let r=0,i=t.length-1;r<t.length;i=r++){let a=t[r].x,o=t[r].y,s=t[i].x,c=t[i].y;o>e.y!=c>e.y&&e.x<(s-a)*(e.y-o)/(c-o)+a&&(n=!n)}return n}function Ms(e,t,n=[]){if(!js(e,t))return!1;for(let t of n)if(js(e,t))return!1;return!0}function Ns(e,t=[]){if(e.length===0)return{x:0,y:0};let n=As(e);if(Ms(n,e,t))return n;let r=1/0,i=-1/0;for(let t of e)t.y<r&&(r=t.y),t.y>i&&(i=t.y);if(!Number.isFinite(r)||i-r<1e-9)return n;let a=[e,...t],o=null;for(let e=1;e<=7;e++){let t=r+(i-r)*e/8,n=[];for(let e of a)for(let r=0,i=e.length-1;r<e.length;i=r++){let a=e[i],o=e[r];a.y>t!=o.y>t&&n.push(a.x+(t-a.y)*(o.x-a.x)/(o.y-a.y))}n.sort((e,t)=>e-t);for(let e=0;e+1<n.length;e+=2){let r=n[e+1]-n[e];r>2&&(!o||r>o.width)&&(o={point:{x:(n[e]+n[e+1])/2,y:t},width:r})}}return o?o.point:n}function Ps(e){let t=e.slice(),n=!0;for(;n&&t.length>3;){n=!1;let e=[],r=t.length;for(let i=0;i<r;i++){let a=t[(i-1+r)%r],o=t[(i+1)%r];if(Cs(a,o)<1){n=!0;continue}e.push(t[i])}n&&(t=e.filter((t,n)=>Cs(t,e[(n+1)%e.length])>=1))}return t}function Fs(e){if(e.length===0)return null;let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e)a.x<t&&(t=a.x),a.y<n&&(n=a.y),a.x>r&&(r=a.x),a.y>i&&(i=a.y);return{minX:t,minY:n,maxX:r,maxY:i}}var Is=0;function Ls(e){return Is+=1,`${e}_${typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10)}${Is.toString(36)}`}function Rs(e){return{...e,nodes:{...e.nodes},walls:{...e.walls},openings:{...e.openings},rooms:{...e.rooms}}}function zs(e,t,n={}){return{kind:e,message:t,...n}}function Bs(e,t){let n=e.nodes[t.a],r=e.nodes[t.b];return!n||!r?0:Cs(n,r)}function Vs(e,t){return Object.values(e.walls).filter(e=>e.a===t||e.b===t)}function Hs(e,t,n){for(let r of Object.values(e.walls))if(r.a===t&&r.b===n||r.a===n&&r.b===t)return r;return null}var Us=250;function Ws(e,t){return`${Math.round(e/Us)}|${Math.round(t/Us)}`}function Gs(e){let t=new Map;for(let n of Object.values(e.nodes)){let e=Ws(n.x,n.y),r=t.get(e);r?r.push(n):t.set(e,[n])}return t}function Ks(e,t,n){let r=Gs(e),i=Math.round(t.x/Us),a=Math.round(t.y/Us),o=null,s=n,c=Math.max(1,Math.ceil(n/Us));for(let e=-c;e<=c;e++)for(let n=-c;n<=c;n++)for(let c of r.get(`${i+e}|${a+n}`)??[]){let e=Cs(t,c);e<=s&&(o=c,s=e)}return o}function qs(e,t,n,r){let i=null;for(let a of Object.values(e.walls)){if(r?.has(a.id))continue;let o=e.nodes[a.a],s=e.nodes[a.b];if(!o||!s)continue;let c=Ts(t,o,s);c.dist<=n&&(!i||c.dist<i.dist)&&(i={wall:a,t:c.t,point:c.point,dist:c.dist})}return i}function Js(e,t,n){let r=e.walls[t];if(!r)return{floor:e,result:{nodeId:``,wallIds:null,droppedOpeningIds:[]},issues:[]};let i=e.nodes[r.a],a=e.nodes[r.b];if(!i||!a)return{floor:e,result:{nodeId:``,wallIds:null,droppedOpeningIds:[]},issues:[]};let o=Cs(i,a),s=Es(typeof n==`number`?{x:i.x+(a.x-i.x)*n,y:i.y+(a.y-i.y)*n}:n,i,a),c=Cs(i,s);if(c<10)return{floor:e,result:{nodeId:r.a,wallIds:null,droppedOpeningIds:[]},issues:[]};if(o-c<10)return{floor:e,result:{nodeId:r.b,wallIds:null,droppedOpeningIds:[]},issues:[]};let l=Rs(e),u=Ls(`n`);l.nodes[u]={id:u,x:s.x,y:s.y};let d=Ls(`w`),f=Ls(`w`),p={thickness:r.thickness,type:r.type,height:r.height,baseHeight:r.baseHeight};l.walls[d]={...p,id:d,a:r.a,b:u},l.walls[f]={...p,id:f,a:u,b:r.b},delete l.walls[t];let m=[],h=[];for(let n of Object.values(e.openings)){if(n.wallId!==t)continue;let e=n.offset<=c,r=e?d:f,i=e?c:o-c,a=e?n.offset:n.offset-c,s=Math.min(n.width,i-2,a*2,(i-a)*2);if(s<100){delete l.openings[n.id],m.push(n.id),h.push(zs(bs.OpeningDropped,`An opening was removed: the wall it sat on became too short for it.`,{openingIds:[n.id],wallIds:[t]}));continue}l.openings[n.id]={...n,wallId:r,offset:a,width:s}}return{floor:l,result:{nodeId:u,wallIds:[d,f],droppedOpeningIds:m},issues:h}}function Ys(e,t,n){let r=Ks(e,t,n);if(r)return{floor:e,result:{nodeId:r.id,createdNode:!1,splitWallId:null},issues:[]};let i=qs(e,t,n);if(i){let t=Js(e,i.wall.id,i.point);if(t.result.nodeId)return{floor:t.floor,result:{nodeId:t.result.nodeId,createdNode:t.result.wallIds!==null,splitWallId:t.result.wallIds?i.wall.id:null},issues:t.issues}}let a=Rs(e),o=Ls(`n`);return a.nodes[o]={id:o,x:t.x,y:t.y},{floor:a,result:{nodeId:o,createdNode:!0,splitWallId:null},issues:[]}}var Xs={thickness:200,type:_s.Interior};function Zs(e,t,n,r=Xs,i=1){let a=[];if(Cs(t,n)<10)return{floor:e,result:{wallIds:[],nodeIds:[]},issues:a};let o=Ys(e,t,i),s=o.floor;a.push(...o.issues);let c=Ys(s,n,i);s=c.floor,a.push(...c.issues);let l=o.result.nodeId,u=c.result.nodeId;if(l===u)return{floor:e,result:{wallIds:[],nodeIds:[]},issues:a};let d=s.nodes[l],f=s.nodes[u],p=Cs(d,f);if(p<10)return{floor:e,result:{wallIds:[],nodeIds:[]},issues:a};let m=[{t:0,nodeId:l},{t:1,nodeId:u}],h=new Map,g=[],_=e=>Ts(e,d,f).t;for(let e of Object.values(s.walls)){let t=s.nodes[e.a],n=s.nodes[e.b];if(!t||!n)continue;let r=Ds(d,f,t,n,i);if(r.kind===`collinearOverlap`){let e=_(t),r=_(n);g.push([Math.min(e,r),Math.max(e,r)]);for(let[i,a]of[[t,e],[n,r]])a*p>10&&(1-a)*p>10&&m.push({t:a,nodeId:i.id});continue}if(r.kind===`proper`&&r.t!==void 0&&r.s!==void 0){let t=h.get(e.id);t?t.push(r.s):h.set(e.id,[r.s]),m.push({t:r.t,nodeId:null,pending:{wallId:e.id,s:r.s}});continue}if(r.kind===`touch`&&r.t!==void 0&&r.s!==void 0){let e=r.s<=.5?t:n,a=_(e);Ts(e,d,f).dist<=i&&a*p>10&&(1-a)*p>10&&m.push({t:a,nodeId:e.id})}}for(let e of Object.values(s.nodes)){if(e.id===l||e.id===u)continue;let t=Ts(e,d,f);t.dist>i||t.t*p<=10||(1-t.t)*p<=10||m.push({t:t.t,nodeId:e.id})}for(let[t,n]of h){let r=[...n].sort((e,t)=>t-e),i=t,o=new Set(r);for(let n of r){let r=s.walls[i];if(!r)break;let c=s.nodes[r.a],l=s.nodes[r.b];if(!c||!l)break;let u=e.walls[t],d=s.nodes[u?.a??r.a]??c,f=s.nodes[u?.b??r.b]??l,p={x:d.x+(f.x-d.x)*n,y:d.y+(f.y-d.y)*n},h=Js(s,i,p);s=h.floor,a.push(...h.issues),o.delete(n);for(let e of m)e.pending&&e.pending.wallId===t&&e.pending.s===n&&(e.nodeId=h.result.nodeId,e.pending=void 0);if(h.result.wallIds){let[e,t]=h.result.wallIds,r=Math.max(...o,-1);i=r>=0&&r>n?t:e}}}let v=m.filter(e=>!!e.nodeId);v.sort((e,t)=>e.t-t.t);let y=[];for(let e of v){let t=y[y.length-1];if(!t){y.push(e);continue}if(t.nodeId!==e.nodeId){if((e.t-t.t)*p<10){e.t>=1-1e-9&&(y[y.length-1]=e);continue}y.push(e)}}let b=[];for(let e=0;e+1<y.length;e++){let t=y[e],n=y[e+1],i=(t.t+n.t)/2;if(g.some(([e,t])=>i>e+1e-9&&i<t-1e-9)||Hs(s,t.nodeId,n.nodeId))continue;let a=s.nodes[t.nodeId],o=s.nodes[n.nodeId];if(!a||!o||Cs(a,o)<10)continue;let c=Ls(`w`);s={...s,walls:{...s.walls,[c]:{...r,id:c,a:t.nodeId,b:n.nodeId}}},b.push(c)}return b.length===0&&g.length>0&&a.push(zs(bs.DuplicateWall,`A wall already covers that span, so nothing was added.`)),{floor:s,result:{wallIds:b,nodeIds:y.map(e=>e.nodeId)},issues:a}}function Qs(e,t,n,r=Xs,i=1){let a=Math.min(t.x,n.x),o=Math.max(t.x,n.x),s=Math.min(t.y,n.y),c=Math.max(t.y,n.y);if(o-a<10||c-s<10)return{floor:e,result:{wallIds:[]},issues:[]};let l=[{x:a,y:s},{x:o,y:s},{x:o,y:c},{x:a,y:c}],u=e,d=[],f=[];for(let e=0;e<4;e++){let t=Zs(u,l[e],l[(e+1)%4],r,i);u=t.floor,d.push(...t.result.wallIds),f.push(...t.issues)}return{floor:u,result:{wallIds:d},issues:f}}function $s(e,t,n){if(t===n||!e.nodes[t]||!e.nodes[n])return{floor:e,result:{removedWallIds:[]},issues:[]};let r=Rs(e),i=[],a=[];for(let e of Object.values(r.walls))e.a===n&&(r.walls[e.id]={...r.walls[e.id],a:t}),e.b===n&&(r.walls[e.id]={...r.walls[e.id],b:t});for(let e of Object.values(r.walls))if(e.a===e.b){delete r.walls[e.id],i.push(e.id);for(let t of Object.values(r.openings))t.wallId===e.id&&delete r.openings[t.id]}let o=new Map;for(let e of Object.values(r.walls)){let t=e.a<e.b?`${e.a}|${e.b}`:`${e.b}|${e.a}`,n=o.get(t);if(!n){o.set(t,e);continue}let s=e.thickness>=n.thickness?e:n,c=s===e?n:e;for(let e of Object.values(r.openings))e.wallId===c.id&&(r.openings[e.id]={...e,wallId:s.id});delete r.walls[c.id],i.push(c.id),o.set(t,s),a.push(zs(bs.DuplicateWall,`Two walls became the same wall and were merged.`,{wallIds:[s.id,c.id]}))}return delete r.nodes[n],{floor:r,result:{removedWallIds:i},issues:a}}function ec(e,t,n={}){let{force:r=!1}=n,i=e.nodes[t];if(!i)return{floor:e,result:null,issues:[]};let a=Vs(e,t);if(a.length!==2)return{floor:e,result:null,issues:[]};let[o,s]=a,c=o.thickness===s.thickness&&o.type===s.type&&o.height===s.height&&o.baseHeight===s.baseHeight;if(!c&&!r)return{floor:e,result:null,issues:[]};let l=o.a===t?o.b:o.a,u=s.a===t?s.b:s.a;if(l===u)return{floor:e,result:null,issues:[]};let d=e.nodes[l],f=e.nodes[u];if(!d||!f)return{floor:e,result:null,issues:[]};let p=Cs(d,f);if(p<10||!r&&Math.abs(ws(d,f,i))/p>Math.max(1,p*1e-4))return{floor:e,result:null,issues:[]};let m=!c&&o.thickness<s.thickness?s:o,h=Rs(e),g=Ls(`w`);h.walls[g]={id:g,a:l,b:u,thickness:m.thickness,type:m.type,height:m.height,baseHeight:m.baseHeight};let _=Cs(d,i),v=Cs(i,f),y=_+v>0?p/(_+v):1,b=[];for(let n of Object.values(e.openings)){if(n.wallId!==o.id&&n.wallId!==s.id)continue;let r=n.wallId===o.id,i=r?o:s,a=i.a===t,c=Bs(e,i),l=a?n.offset:c-n.offset,u=(r?_-l:_+l)*y,d=Math.min(n.width*y,p-2);if(d<100){b.push(zs(bs.OpeningDropped,`An opening was removed: the wall it sat on became too short for it.`,{openingIds:[n.id],wallIds:[i.id]})),delete h.openings[n.id];continue}h.openings[n.id]={...n,wallId:g,width:d,offset:Math.min(Math.max(u,d/2),p-d/2)}}return delete h.walls[o.id],delete h.walls[s.id],delete h.nodes[t],{floor:h,result:{wallId:g},issues:b}}function tc(e,t,n){let r=e.walls[t];if(!r||r.a===r.b||Math.hypot(n.x,n.y)<10)return{floor:e,result:null,issues:[]};let i=[r.a,r.b],a=[r.a,r.b],o=[null,null],s=[],c=[],l=e;i.forEach((i,s)=>{let c=e.nodes[i];if(!c)return;let u={x:c.x+n.x,y:c.y+n.y},d=Vs(e,i).filter(e=>e.id!==t);if(d.length===0){let e=Rs(l);e.nodes[i]={...e.nodes[i],x:u.x,y:u.y},l=e;return}let f=Ys(l,u,1);l=f.floor,a[s]=f.result.nodeId,o[s]=d.length===1?d[0]:r});let u=Rs(l);u.walls[t]={...u.walls[t],a:a[0],b:a[1]},l=u,i.forEach((e,t)=>{let n=o[t],r=l.nodes[e],i=l.nodes[a[t]];if(!n||!r||!i)return;let u=Zs(l,r,i,{thickness:n.thickness,type:n.type,height:n.height,baseHeight:n.baseHeight});l=u.floor,s.push(...u.result.wallIds),c.push(...u.issues)});let d=[];return i.forEach((e,t)=>{if(a[t]===e)return;let n=ec(l,e);n.result&&(l=n.floor,d.push(e),c.push(...n.issues))}),{floor:l,result:{nodeIds:a,connectorIds:s,dissolvedNodeIds:d},issues:c}}function nc(e,t=10){let n=e,r=[],i=[];for(let a=Object.keys(e.walls).length;a>0;a--){let e=Object.values(n.walls).find(e=>{if(e.a===e.b)return!1;let r=n.nodes[e.a],i=n.nodes[e.b];return r&&i&&Cs(r,i)<t});if(!e)break;let a=Vs(n,e.b).length>Vs(n,e.a).length?e.b:e.a,o=$s(n,a,a===e.a?e.b:e.a);if(o.floor===n)break;n=o.floor,r.push(e.id),i.push(...o.issues)}return{floor:n,result:{weldedWallIds:r},issues:i}}function rc(e,t,n={}){let{pruneOrphanNodes:r=!0,dissolveCollinear:i=!0}=n,a=e.walls[t];if(!a)return{floor:e,result:{removedNodeIds:[],dissolvedWallIds:[]},issues:[]};let o=Rs(e);delete o.walls[t];for(let e of Object.values(o.openings))e.wallId===t&&delete o.openings[e.id];let s=[],c=[],l=[];for(let e of[a.a,a.b]){let t=Vs(o,e).length;if(t===0&&r)delete o.nodes[e],s.push(e);else if(t===2&&i){let t=ec(o,e);t.result&&(o=t.floor,c.push(t.result.wallId),s.push(e),l.push(...t.issues))}}return{floor:o,result:{removedNodeIds:s,dissolvedWallIds:c},issues:l}}function ic(e,t,n){let r=e.nodes[t];if(!r)return{floor:e,result:void 0,issues:[]};let i=Rs(e);return i.nodes[t]={...r,x:n.x,y:n.y},{floor:i,result:void 0,issues:[]}}function ac(e,t,n){let r=Rs(e);for(let i of Object.values(e.nodes))r.nodes[i.id]={...i,x:i.x+t,y:i.y+n};for(let i of Object.values(e.rooms))r.rooms[i.id]={...i,anchor:{x:i.anchor.x+t,y:i.anchor.y+n}};return r}function oc(e,t){let n=Rs(e);for(let r of Object.values(e.nodes))n.nodes[r.id]={...r,x:r.x*t,y:r.y*t};for(let r of Object.values(e.walls))n.walls[r.id]={...r,thickness:r.thickness*t,height:r.height===void 0?void 0:r.height*t,baseHeight:r.baseHeight===void 0?void 0:r.baseHeight*t};for(let r of Object.values(e.openings))n.openings[r.id]={...r,offset:r.offset*t,width:r.width*t,sill:r.sill*t,head:r.head*t};for(let r of Object.values(e.rooms))n.rooms[r.id]={...r,anchor:{x:r.anchor.x*t,y:r.anchor.y*t},area:r.area*t*t};return n}function sc(e,t){let n=e.walls[t.wallId];if(!n)return{floor:e,result:{openingId:null},issues:[]};let r=Bs(e,n),i=Math.min(t.width,r-2);if(i<100)return{floor:e,result:{openingId:null},issues:[zs(bs.OpeningDropped,`That wall is too short for an opening.`,{wallIds:[n.id]})]};let a=Math.min(Math.max(t.offset,i/2),r-i/2),o=Rs(e),s=Ls(`o`);return o.openings[s]={...t,id:s,offset:a,width:i},{floor:o,result:{openingId:s},issues:[]}}function cc(e,t,n){let r=e.openings[t];if(!r)return{floor:e,result:void 0,issues:[]};let i=e.walls[r.wallId];if(!i)return{floor:e,result:void 0,issues:[]};let a=Bs(e,i),o={...r,...n},s=Math.min(Math.max(o.width,100),Math.max(a-2,100)),c=Math.min(Math.max(o.offset,s/2),Math.max(a-s/2,s/2)),l=Rs(e);return l.openings[t]={...o,width:s,offset:c},{floor:l,result:void 0,issues:[]}}function lc(e,t){if(!e.openings[t])return{floor:e,result:void 0,issues:[]};let n=Rs(e);return delete n.openings[t],{floor:n,result:void 0,issues:[]}}function uc(e){let t=[],n=Object.values(e.walls);for(let r of n){let n=e.nodes[r.a],i=e.nodes[r.b];if(r.a===r.b){t.push(zs(bs.SelfLoopWall,`A wall starts and ends at the same node.`,{wallIds:[r.id]}));continue}if(!n||!i){t.push(zs(bs.ZeroLengthWall,`A wall references a missing node.`,{wallIds:[r.id]}));continue}Cs(n,i)<10&&t.push(zs(bs.ZeroLengthWall,`A wall is shorter than the minimum length.`,{wallIds:[r.id]}))}let r=new Map;for(let e of n){let n=e.a<e.b?`${e.a}|${e.b}`:`${e.b}|${e.a}`,i=r.get(n);i?t.push(zs(bs.DuplicateWall,`Two walls connect the same pair of nodes.`,{wallIds:[i,e.id]})):r.set(n,e.id)}let i=Object.values(e.nodes);for(let e=0;e<i.length;e++)for(let n=e+1;n<i.length;n++)Cs(i[e],i[n])<1&&t.push(zs(bs.CoincidentNodes,`Two nodes occupy the same position.`,{nodeIds:[i[e].id,i[n].id]}));for(let r=0;r<n.length;r++)for(let i=r+1;i<n.length;i++){let a=n[r],o=n[i],s=e.nodes[a.a],c=e.nodes[a.b],l=e.nodes[o.a],u=e.nodes[o.b];if(!s||!c||!l||!u)continue;let d=Ds(s,c,l,u);d.kind===`proper`?t.push(zs(bs.UnsplitCrossing,`Two walls cross with no node at the intersection.`,{wallIds:[a.id,o.id]})):d.kind===`collinearOverlap`&&t.push(zs(bs.OverlappingWalls,`Two walls overlap along the same line.`,{wallIds:[a.id,o.id]}))}for(let r of n){let n=e.nodes[r.a],a=e.nodes[r.b];if(n&&a)for(let e of i){if(e.id===r.a||e.id===r.b)continue;let i=Ts(e,n,a);i.dist<1&&i.t>0&&i.t<1&&t.push(zs(bs.UnsplitNodeOnWall,`A node sits on a wall that was never split there.`,{wallIds:[r.id],nodeIds:[e.id]}))}}for(let n of Object.values(e.openings))e.walls[n.wallId]||t.push(zs(bs.DanglingOpening,`An opening references a wall that no longer exists.`,{openingIds:[n.id]}));let a=new Set;for(let e of n)a.add(e.a),a.add(e.b);for(let e of i)a.has(e.id)||t.push(zs(bs.OrphanNode,`A node has no walls.`,{nodeIds:[e.id]}));return t}function dc(e){let t=[],n=nc(e),r=Rs(n.floor);for(let e of n.result.weldedWallIds)t.push(zs(bs.ZeroLengthWall,`Welded the two ends of a wall with no length.`,{wallIds:[e]}));for(let e of Object.values(r.walls)){let n=r.nodes[e.a],i=r.nodes[e.b];(e.a===e.b||!n||!i||Cs(n,i)<10)&&(delete r.walls[e.id],t.push(zs(bs.ZeroLengthWall,`Removed a degenerate wall.`,{wallIds:[e.id]})))}let i=new Map;for(let e of Object.values(r.walls)){let n=e.a<e.b?`${e.a}|${e.b}`:`${e.b}|${e.a}`,a=i.get(n);if(!a){i.set(n,e);continue}let o=e.thickness>=a.thickness?e:a,s=o===e?a:e;for(let e of Object.values(r.openings))e.wallId===s.id&&(r.openings[e.id]={...e,wallId:o.id});delete r.walls[s.id],i.set(n,o),t.push(zs(bs.DuplicateWall,`Removed a duplicate wall.`,{wallIds:[s.id]}))}for(let e of Object.values(r.openings))r.walls[e.wallId]||(delete r.openings[e.id],t.push(zs(bs.DanglingOpening,`Removed an opening with no wall.`,{openingIds:[e.id]})));let a=new Set;for(let e of Object.values(r.walls))a.add(e.a),a.add(e.b);for(let e of Object.values(r.nodes))a.has(e.id)||(delete r.nodes[e.id],t.push(zs(bs.OrphanNode,`Removed a node with no walls.`,{nodeIds:[e.id]})));return{floor:r,result:t,issues:t}}function fc(e={}){return{id:e.floorId??Ls(`f`),label:e.floorLabel??`Ground floor`,elevation:0,height:e.height??2500,nodes:{},walls:{},openings:{},rooms:{}}}function pc(e={}){return{id:e.id??Ls(`plan`),name:e.name,version:1,unitSystem:e.unitSystem??gs.Metric,floors:[fc(e)],revision:0}}function mc(e,t){return t?e.floors.find(e=>e.id===t)??null:e.floors[0]??null}function hc(e,t,n){let r=mc(e,t);if(!r)return{plan:e,floor:fc(),result:void 0,issues:[]};let i=n(r);return i.floor===r?{...i,plan:e}:{...i,plan:{...e,floors:e.floors.map(e=>e.id===r.id?i.floor:e),revision:e.revision+1}}}function gc(e,t){let n=e.floors.some(e=>e.id===t.id);return{...e,floors:n?e.floors.map(e=>e.id===t.id?t:e):[...e.floors,t],revision:e.revision+1}}function _c(e,t){return e.floors.findIndex(e=>e.id===t)}function vc(e,t){let n=_c(e,t);return n>0?e.floors[n-1]:null}function yc(e,t={}){let n=e.floors[0]?.elevation??0,r=Math.max(0,Math.min(t.index??e.floors.length,e.floors.length)),i=e.floors[r-1],a={...fc({height:t.height??i?.height??2500}),id:t.id??Ls(`f`),label:t.label??Dc(e),elevation:i?i.elevation+i.height:0},o=[...e.floors.slice(0,r),a,...e.floors.slice(r)];return{plan:{...e,floors:Ec(o,n),revision:e.revision+1},floor:a}}function bc(e,t){if(e.floors.length<=1)return e;let n=e.floors[0].elevation,r=e.floors.filter(e=>e.id!==t);return r.length===e.floors.length?e:{...e,floors:Ec(r,n),revision:e.revision+1}}function xc(e,t,n={}){let r=mc(e,t);if(!r)return{plan:e,floor:null};let i=new Map(Object.keys(r.nodes).map(e=>[e,Ls(`n`)])),a=new Map(Object.keys(r.walls).map(e=>[e,Ls(`w`)])),o={...r,id:Ls(`f`),label:n.label??`${r.label} copy`,nodes:{},walls:{},openings:{},rooms:{}};for(let e of Object.values(r.nodes)){let t=i.get(e.id);o.nodes[t]={...e,id:t}}for(let e of Object.values(r.walls)){let t=a.get(e.id);o.walls[t]={...e,id:t,a:i.get(e.a),b:i.get(e.b)}}for(let e of Object.values(r.openings)){let t=a.get(e.wallId);if(!t)continue;let n=Ls(`o`);o.openings[n]={...e,id:n,wallId:t}}for(let e of Object.values(r.rooms)){let t=Ls(`r`);o.rooms[t]={...e,id:t,anchor:{...e.anchor},wallIds:e.wallIds.map(e=>a.get(e)).filter(e=>!!e)}}let s=e.floors[0].elevation,c=_c(e,t)+1,l=[...e.floors.slice(0,c),o,...e.floors.slice(c)];return{plan:{...e,floors:Ec(l,s),revision:e.revision+1},floor:o}}var Sc=500;function Cc(e,t,n){let r=mc(e,t),i=Math.max(500,Math.round(n));if(!r||r.height===i)return e;let a=e.floors[0].elevation,o=e.floors.map(e=>e.id===r.id?{...e,height:i}:e);return{...e,floors:Ec(o,a),revision:e.revision+1}}function wc(e,t,n){let r=mc(e,t);return!r||r.label===n?e:gc(e,{...r,label:n})}function Tc(e,t,n){let r=_c(e,t),i=Math.max(0,Math.min(n,e.floors.length-1));if(r<0||r===i)return e;let a=e.floors[0].elevation,o=[...e.floors],[s]=o.splice(r,1);return o.splice(i,0,s),{...e,floors:Ec(o,a),revision:e.revision+1}}function Ec(e,t){let n=t;return e.map(e=>{let t=e.elevation===n?e:{...e,elevation:n};return n+=e.height,t})}function Dc(e){let t=new Set(e.floors.map(e=>e.label));for(let n=e.floors.length+1;;n++){let e=`Floor ${n}`;if(!t.has(e))return e}}function Oc(e){let t=Fs(Object.values(e.nodes).map(e=>({x:e.x,y:e.y})));if(!t)return null;let n=0;for(let t of Object.values(e.walls))t.thickness>n&&(n=t.thickness);let r=n/2,i=t.minX-r,a=t.minY-r,o=t.maxX+r,s=t.maxY+r;return{minX:i,minY:a,maxX:o,maxY:s,width:o-i,height:s-a}}function kc(e){return Object.values(e.walls).filter(t=>{if(t.a===t.b)return!1;let n=e.nodes[t.a],r=e.nodes[t.b];return!n||!r?!1:Cs(n,r)>=10})}function Ac(e){let t=kc(e),n=Array(t.length*2);for(let e=0;e<t.length;e++){let r=t[e];n[2*e]={wallId:r.id,from:r.a,to:r.b},n[2*e+1]={wallId:r.id,from:r.b,to:r.a}}let r=t=>e.nodes[t],i=new Map;for(let e=0;e<n.length;e++){let t=i.get(n[e].from);t?t.push(e):i.set(n[e].from,[e])}let a=e=>{let t=r(n[e].from),i=r(n[e].to);return Math.atan2(i.y-t.y,i.x-t.x)};for(let e of i.values())e.sort((e,t)=>{let r=a(e),i=a(t);if(r!==i)return r-i;let o=n[e].wallId,s=n[t].wallId;return o===s?e-t:o<s?-1:1});let o=new Int32Array(n.length);for(let e of i.values())for(let t=0;t<e.length;t++)o[e[t]]=t;return{darts:n,outgoing:i,ringIndex:o,nodeOf:r}}function jc(e,t){let n=e.outgoing.get(e.darts[t].to);return!n||n.length===0?t^1:n[(e.ringIndex[t^1]-1+n.length)%n.length]}function Mc(e){let t=new Uint8Array(e.darts.length),n=[];for(let r=0;r<e.darts.length;r++){if(t[r])continue;let i=[],a=r,o=0;do if(t[a]=1,i.push(a),a=jc(e,a),++o>e.darts.length+1)break;while(a!==r&&!t[a]);n.push(i)}return n}function Nc(e){let t=new Map,n=e=>{let n=e;for(;t.get(n)!==n;)n=t.get(n)??n;let r=e;for(;t.get(r)!==n;){let e=t.get(r)??n;t.set(r,n),r=e}return n};for(let n of e.outgoing.keys())t.set(n,n);for(let r=0;r<e.darts.length;r+=2){let i=n(e.darts[r].from),a=n(e.darts[r].to);i!==a&&t.set(i,a)}let r=new Map;for(let t of e.outgoing.keys())r.set(t,n(t));return r}function Pc(e,t){return t.map(t=>{let n=e.nodeOf(e.darts[t].from);return{x:n.x,y:n.y}})}function Fc(e,t){let n=``;for(let r of t){let t=`${e.darts[r].wallId}>${e.darts[r].from}`;(n===``||t<n)&&(n=t)}return`f:${n}`}function Ic(e){let t=Ac(e);if(t.darts.length===0)return[];let n=Nc(t),r=Mc(t),i=[],a=new Map;for(let e of r){let r=Pc(t,e),o=Os(r),s=n.get(t.darts[e[0]].from)??``;o>100?i.push({face:{id:Fc(t,e),outer:r,holes:[],area:o,perimeter:ks(r),wallIds:e.map(e=>t.darts[e].wallId),nodeIds:e.map(e=>t.darts[e].from)},component:s,outerArea:o}):o<-100&&a.set(s,r)}for(let[e,t]of a){let n=Math.abs(Os(t));if(n<=100)continue;let r=Ns(t),a=null;for(let t of i)t.component!==e&&(t.outerArea<=n||js(r,t.face.outer)&&(!a||t.outerArea<a.outerArea)&&(a=t));a&&a.face.holes.push(t)}for(let e of i){let t=e.outerArea;for(let n of e.face.holes)t-=Math.abs(Os(n));e.face.area=t}return i.map(e=>e.face)}function Lc(e){let t=new Map;for(let n of kc(e))t.set(n.a,(t.get(n.a)??0)+1),t.set(n.b,(t.get(n.b)??0)+1);return t}var Rc={boundary:2,anchor:1,area:.25};function zc(e,t){if(e.size===0&&t.size===0)return 0;let n=0;for(let r of e)t.has(r)&&(n+=1);let r=e.size+t.size-n;return r===0?0:n/r}function Bc(e,t,n){let r=zc(new Set(e.wallIds),n),i=+!!Ms(e.anchor,t.outer,t.holes),a=e.area>0&&t.area>0?Math.min(e.area,t.area)/Math.max(e.area,t.area):0;return Rc.boundary*r+Rc.anchor*i+Rc.area*a}function Vc(e){let t=Ic(e),n=[],r=Object.values(e.rooms),i=t.map(e=>new Set(e.wallIds)),a=[];for(let e=0;e<r.length;e++)for(let n=0;n<t.length;n++){let o=Bc(r[e],t[n],i[n]);o>.15&&a.push({roomIndex:e,faceIndex:n,score:o})}a.sort((e,n)=>{if(n.score!==e.score)return n.score-e.score;let i=r[e.roomIndex].seq-r[n.roomIndex].seq;return i===0?t[e.faceIndex].id<t[n.faceIndex].id?-1:1:i});let o=Array(r.length).fill(!1),s=Array(t.length).fill(-1);for(let e of a)o[e.roomIndex]||s[e.faceIndex]===-1&&(o[e.roomIndex]=!0,s[e.faceIndex]=e.roomIndex);let c={...e.rooms},l=t.map((e,t)=>{let n=Ns(e.outer,e.holes),i=s[t];if(i===-1)return{...e,roomId:null,meta:null,anchor:n};let a=r[i],o=a.anchorPinned?a.anchor:n,l={...a,anchor:o,wallIds:[...new Set(e.wallIds)],area:e.area};return c[a.id]=l,{...e,roomId:a.id,meta:l,anchor:o}});for(let e=0;e<r.length;e++)o[e]||n.push({kind:bs.UnmatchedRoom,message:`"${r[e].name}" is not currently enclosed by any walls.`,roomIds:[r[e].id]});return{floor:{...e,rooms:c},rooms:l,issues:n}}var Hc=0;function Uc(e,t={}){let{rooms:n,floor:r}=Vc(e),i={...r.rooms},a=[],o=0,s=new Set(Object.values(i).map(e=>e.name));for(let e of n){if(e.roomId)continue;o+=1,Hc+=1;let n=t.nameFor?.(o,e);if(!n){let e=Object.keys(i).length+1;for(n=`Room ${e}`;s.has(n);)e+=1,n=`Room ${e}`}s.add(n);let r={id:Ls(`r`),name:n,anchor:e.anchor,anchorPinned:!1,seq:Hc,wallIds:[...new Set(e.wallIds)],area:e.area};i[r.id]=r,a.push(r)}return{floor:{...r,rooms:i},created:a}}function Wc(e){let{rooms:t}=Vc(e),n=new Set(t.map(e=>e.roomId).filter(Boolean)),r={},i=[];for(let t of Object.values(e.rooms))n.has(t.id)?r[t.id]=t:i.push(t.id);return{floor:{...e,rooms:r},removed:i}}function Gc(e,t){let n=null;for(let r of e)Ms(t,r.outer,r.holes)&&(!n||r.area<n.area)&&(n=r);return n}var Kc=1e-6;function qc(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function Jc(e){return Number.isInteger(e)?String(e):e.toFixed(3).replace(/\.?0+$/,``)}function Yc(e,t){return Math.abs(e.x-t.x)<.001&&Math.abs(e.y-t.y)<.001}function Xc(e,t){let n=e.nodes[t.a],r=e.nodes[t.b];if(!n||!r)return[];let i=Cs(n,r);if(i<Kc)return[];let a=[];for(let n of Object.values(e.openings)){if(n.wallId!==t.id)continue;let e=n.width/2,r=Math.max(0,n.offset-e),o=Math.min(i,n.offset+e);o>r&&a.push([r,o])}if(a.length===0)return[[0,i]];a.sort((e,t)=>e[0]-t[0]);let o=[a[0]];for(let e=1;e<a.length;e++){let t=o[o.length-1];a[e][0]<=t[1]?t[1]=Math.max(t[1],a[e][1]):o.push(a[e])}let s=[],c=0;for(let[e,t]of o)e-c>Kc&&s.push([c,e]),c=t;return i-c>Kc&&s.push([c,i]),s}function Zc(e,t){let n=e.walls[t.wallId];if(!n)return null;let r=e.nodes[n.a],i=e.nodes[n.b];if(!r||!i)return null;let a=Cs(r,i);if(a<Kc)return null;let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a},s={x:-o.y,y:o.x},c=Math.min(t.width/2,a/2),l=Math.min(Math.max(t.offset,c),a-c),u={x:r.x+o.x*l,y:r.y+o.y*l};return{centre:u,dir:o,normal:s,p1:{x:u.x-o.x*c,y:u.y-o.y*c},p2:{x:u.x+o.x*c,y:u.y+o.y*c}}}function Qc(e,t,n){let r=new Map(t.map(e=>[e.id,e])),i=new Map;for(let e of t)for(let t of[e.a,e.b]){let n=i.get(t);n?n.push(e):i.set(t,[e])}let a=e=>{if((n.get(e)??0)!==2)return null;let t=i.get(e);return!t||t.length!==2?null:t},o=new Set,s=[],c=(e,t)=>e.a===t?e.b:e.a;for(let e of t){if(o.has(e.id))continue;let t=e,n=e.a,i=new Set([e.id]);for(;;){let e=a(n);if(!e)break;let r=e[0].id===t.id?e[1]:e[0];if(i.has(r.id))break;i.add(r.id),t=r,n=c(r,n)}let l=[],u=t,d=n;for(;!o.has(u.id);){o.add(u.id);let e=c(u,d);l.push({wall:u,from:d,to:e});let t=a(e);if(!t)break;let n=t[0].id===u.id?t[1]:t[0];if(o.has(n.id)||(u=n,d=e,!r.has(u.id)))break}l.length>0&&s.push(l)}return s}function $c(e,t,n){let r=new Map,i=(e,t)=>{let n=r.get(e);n?n.push(t):r.set(e,[t])};for(let n of t){let t=e.nodes[n.a],r=e.nodes[n.b],a=Cs(t,r);if(a<Kc)continue;let o=Xc(e,n);if(o.length===0)continue;let s={x:(r.x-t.x)/a,y:(r.y-t.y)/a},c=o[0],l=o[o.length-1];i(n.a,{wall:n,dir:s,angle:Math.atan2(s.y,s.x),reach:c[0]<Kc?c[1]:0}),i(n.b,{wall:n,dir:{x:-s.x,y:-s.y},angle:Math.atan2(-s.y,-s.x),reach:l[1]>a-Kc?a-l[0]:0})}let a=[],o=Math.PI*2;for(let[t,i]of r){if(i.length<2||(n.get(t)??0)===2&&i.length===2&&i[0].wall.thickness===i[1].wall.thickness)continue;i.sort((e,t)=>e.angle-t.angle);let r=0,s=-1;for(let e=0;e<i.length;e++){let t=i[(e+1)%i.length],n=e===i.length-1?t.angle+o-i[e].angle:t.angle-i[e].angle;n>s&&(s=n,r=e)}if(s<=Math.PI+Kc)continue;let c=i[r],l=i[(r+1)%i.length],u=Math.min(c.wall.thickness,l.wall.thickness),d=Math.min(u/2,c.reach),f=Math.min(u/2,l.reach);if(d<Kc||f<Kc)continue;let p=e.nodes[t];a.push({thickness:u,d:`M ${Jc(p.x+c.dir.x*d)},${Jc(p.y+c.dir.y*d)} L ${Jc(p.x)},${Jc(p.y)} L ${Jc(p.x+l.dir.x*f)},${Jc(p.y+l.dir.y*f)}`})}return a}function el(e,t={}){let{wallIds:n,capFreeEnds:r=!0,capThicknessSteps:i=!0}=t,a=Object.values(e.walls).filter(t=>{if(n&&!n.has(t.id))return!1;let r=e.nodes[t.a],i=e.nodes[t.b];return r&&i&&Cs(r,i)>Kc&&t.a!==t.b});if(a.length===0)return{groups:[],caps:[]};let o=Lc(e),s=[],c=new Map;for(let e of a){let t=c.get(e.thickness);t?t.push(e):c.set(e.thickness,[e])}let l=new Map,u=(e,t)=>{let n=l.get(e);n?n.push(t):l.set(e,[t])};for(let[t,n]of c)for(let r of Qc(e,n,o)){let n=[],i=()=>{n.length>=2&&u(t,n.map((e,t)=>`${t===0?`M`:`L`} ${Jc(e.x)},${Jc(e.y)}`).join(` `)),n=[]};for(let t of r){let r=e.nodes[t.from],a=e.nodes[t.to],o=Cs(r,a);if(o<Kc)continue;let s=Xc(e,t.wall);t.from!==t.wall.a&&(s=s.map(([e,t])=>[o-t,o-e]).reverse());for(let[e,t]of s){let s=qc(r,a,e/o),c=qc(r,a,t/o);n.length>0&&Yc(n[n.length-1],s)?n.push(c):(i(),n=[s,c])}(s.length===0||s[s.length-1][1]<o-Kc)&&i()}let a=r[0],o=r[r.length-1];a.from===o.to&&n.length>=3&&Yc(n[0],n[n.length-1])?(u(t,`${n.slice(0,-1).map((e,t)=>`${t===0?`M`:`L`} ${Jc(e.x)},${Jc(e.y)}`).join(` `)} Z`),n=[]):i()}for(let t of $c(e,a,o))u(t.thickness,t.d);let d=(t,n,r)=>{let i=e.nodes[t.a],a=e.nodes[t.b],o=Cs(i,a);if(o<Kc)return;let c={x:(a.x-i.x)/o,y:(a.y-i.y)/o},l={x:-c.y,y:c.x},u={x:i.x+c.x*n,y:i.y+c.y*n},d=t.thickness/2;s.push({a:{x:u.x-l.x*d,y:u.y-l.y*d},b:{x:u.x+l.x*d,y:u.y+l.y*d},reason:r,wallId:t.id})};for(let t of a){let n=e.nodes[t.a],i=e.nodes[t.b],a=Cs(n,i);for(let[n,i]of Xc(e,t))n>Kc?d(t,n,`jamb`):r&&(o.get(t.a)??0)===1&&d(t,0,`freeEnd`),i<a-Kc?d(t,i,`jamb`):r&&(o.get(t.b)??0)===1&&d(t,a,`freeEnd`)}if(i){let t=new Map;for(let e of a)for(let n of[e.a,e.b]){let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let[n,r]of t){if(r.length!==2)continue;let[t,i]=r;if(t.thickness===i.thickness)continue;let a=t.thickness>=i.thickness?t:i;d(a,a.a===n?0:Cs(e.nodes[a.a],e.nodes[a.b]),`thicknessStep`)}}return{groups:[...l.entries()].sort((e,t)=>e[0]-t[0]).map(([e,t])=>({thickness:e,d:t.join(` `)})),caps:s}}var tl={node:10,opening:9,wall:8},nl={node:18,opening:16,wall:14};function rl(e,t){let n=t>0?t:1;return{node:e.node/n,opening:e.opening/n,wall:e.wall/n}}function il(e,t,n,r,i={}){let a=e=>!i.accept||i.accept.includes(e),o=e=>i.excludeIds?.has(e)??!1;if(a(`node`)){let t=null;for(let i of Object.values(e.nodes)){if(o(i.id))continue;let e=Cs(n,i);e<=r.node&&(!t||e<t.d)&&(t={id:i.id,d:e})}if(t)return{type:`node`,id:t.id}}if(a(`opening`)){let t=null;for(let i of Object.values(e.openings)){if(o(i.id))continue;let a=Zc(e,i);if(!a)continue;let s=Ts(n,a.p1,a.p2).dist;s<=r.opening&&(!t||s<t.d)&&(t={id:i.id,d:s})}if(t)return{type:`opening`,id:t.id}}if(a(`wall`)){let t=null;for(let i of Object.values(e.walls)){if(o(i.id))continue;let a=e.nodes[i.a],s=e.nodes[i.b];if(!a||!s)continue;let c=Math.max(r.wall,i.thickness/2),l=Ts(n,a,s).dist;l<=c&&(!t||l<t.d)&&(t={id:i.id,d:l})}if(t)return{type:`wall`,id:t.id}}if(a(`room`)){let e=Gc(t,n);if(e?.roomId&&!o(e.roomId))return{type:`room`,id:e.roomId}}return null}function al(e,t){return e===t?!0:!e||!t?!1:e.type===t.type&&e.id===t.id}var ol=function(e){return e.None=`none`,e.Node=`node`,e.Wall=`wall`,e.Intersection=`intersection`,e.Extension=`extension`,e.Alignment=`alignment`,e.Angle=`angle`,e.Grid=`grid`,e}({}),sl={enabled:[`node`,`intersection`,`wall`,`angle`,`extension`,`alignment`,`grid`],gridSize:100,angleStepDeg:0,toleranceScreenPx:10,nodeToleranceScreenPx:12};function cl(e){let t=e.getScreenCTM();if(!t)return 1;let n=Math.hypot(t.a,t.b);return n===0?1:1/n}function ll(e,t,n,r){return{x:r.x+(e-n.left)/r.zoom,y:r.y+(t-n.top)/r.zoom}}function ul(e,t){let n=e.x-t.point.x,r=e.y-t.point.y;return Math.abs(n*t.dir.y-r*t.dir.x)}function dl(e,t){let n=e.x-t.point.x,r=e.y-t.point.y,i=n*t.dir.x+r*t.dir.y;return{x:t.point.x+t.dir.x*i,y:t.point.y+t.dir.y*i}}function fl(e,t){let n=e.dir.x*t.dir.y-e.dir.y*t.dir.x;if(Math.abs(n)<1e-9)return null;let r=t.point.x-e.point.x,i=t.point.y-e.point.y,a=(r*t.dir.y-i*t.dir.x)/n;return{x:e.point.x+e.dir.x*a,y:e.point.y+e.dir.y*a}}function pl(e,t){let n=Math.abs(e.dir.x*t.dir.x+e.dir.y*t.dir.y);return Math.acos(Math.min(1,n))}function ml(e,t){return t>0?Math.round(e/t)*t:e}function hl(e,t){let n={...sl,...t.options},r=new Set(n.enabled),i=e=>{if(!t.origin)return e;let n=e.point.x-t.origin.x,r=e.point.y-t.origin.y;return{...e,angle:Math.atan2(r,n),distance:Math.hypot(n,r)}};if(r.size===0)return i({point:e,kind:`none`,guides:[]});let a=n.toleranceScreenPx*t.pxToWorld,o=(n.nodeToleranceScreenPx??n.toleranceScreenPx)*t.pxToWorld,{floor:s}=t,c=(()=>{if(!r.has(`angle`)||!t.origin||n.angleStepDeg<=0)return null;let i=n.angleStepDeg*Math.PI/180,a=Math.atan2(e.y-t.origin.y,e.x-t.origin.x),o=[{angle:0,relativeTo:`world`}];t.referenceAngle!==void 0&&o.push({angle:t.referenceAngle,relativeTo:`reference`});let s=null;for(let n of o){let r=n.angle+Math.round((a-n.angle)/i)*i,o={x:Math.cos(r),y:Math.sin(r)},c={kind:`angle`,point:t.origin,dir:o,residual:0,relativeTo:n.relativeTo};c.residual=ul(e,c),(!s||c.residual<s.residual)&&(s=c)}return s})(),l=e=>!c||ul(e,c)<=a;if(r.has(`node`)){let n=null;for(let r of Object.values(s.nodes)){if(t.excludeNodeIds?.has(r.id))continue;let i=Cs(e,r);i<=o&&l(r)&&(!n||i<n.d)&&(n={id:r.id,point:{x:r.x,y:r.y},d:i})}if(n)return i({point:n.point,kind:`node`,nodeId:n.id,guides:[]})}let u=Object.values(s.walls).filter(e=>!t.excludeWallIds?.has(e.id));if(r.has(`intersection`)){let t=null;for(let n=0;n<u.length;n++)for(let r=n+1;r<u.length;r++){let i=s.nodes[u[n].a],o=s.nodes[u[n].b],c=s.nodes[u[r].a],d=s.nodes[u[r].b];if(!i||!o||!c||!d)continue;let f=Ds(i,o,c,d);if(!f.point)continue;let p=Cs(e,f.point);p<=a&&l(f.point)&&(!t||p<t.d)&&(t={point:f.point,d:p})}if(t)return i({point:t.point,kind:`intersection`,guides:[]})}if(r.has(`wall`)){let t=null;for(let n of u){let r=s.nodes[n.a],i=s.nodes[n.b];if(!r||!i)continue;let o=Ts(e,r,i);o.dist<=a&&l(o.point)&&(!t||o.dist<t.d)&&(t={wallId:n.id,point:Es(e,r,i),t:o.t,d:o.dist})}if(t)return i({point:t.point,kind:`wall`,wallId:t.wallId,t:t.t,guides:[]})}let d=[];if(r.has(`extension`)){let t=null;for(let n of u){let r=s.nodes[n.a],i=s.nodes[n.b];if(!r||!i)continue;let o=Cs(r,i);if(o<1e-6)continue;let c={x:(i.x-r.x)/o,y:(i.y-r.y)/o},l={kind:`extension`,point:{x:r.x,y:r.y},dir:c,residual:0};l.residual=ul(e,l);let u=Ts(e,r,i).dist<=a;l.residual<=a&&!u&&(!t||l.residual<t.residual)&&(t=l)}t&&d.push(t)}if(r.has(`alignment`)){let n=null,r=null;for(let i of Object.values(s.nodes)){if(t.excludeNodeIds?.has(i.id))continue;let o=Math.abs(e.x-i.x);o<=a&&(!n||o<n.residual)&&(n={kind:`alignment`,point:{x:i.x,y:i.y},dir:{x:0,y:1},residual:o});let s=Math.abs(e.y-i.y);s<=a&&(!r||s<r.residual)&&(r={kind:`alignment`,point:{x:i.x,y:i.y},dir:{x:1,y:0},residual:s})}n&&d.push(n),r&&d.push(r)}let f=(e,t)=>({kind:e.kind,a:{x:t.x-e.dir.x*1e5,y:t.y-e.dir.y*1e5},b:{x:t.x+e.dir.x*1e5,y:t.y+e.dir.y*1e5},infinite:!0});if(c){let t=d.filter(e=>e.residual<=a&&pl(c,e)>15*Math.PI/180).sort((e,t)=>e.residual-t.residual)[0];if(t){let n=fl(c,t);if(n&&Cs(n,e)<=a*4)return i({point:n,kind:`angle`,guides:[f(c,n),f(t,n)],angleRelativeTo:c.relativeTo})}let o=dl(e,c);if(r.has(`grid`)&&n.gridSize>0){let e=ml((o.x-c.point.x)*c.dir.x+(o.y-c.point.y)*c.dir.y,n.gridSize);o={x:c.point.x+c.dir.x*e,y:c.point.y+c.dir.y*e}}return i({point:o,kind:`angle`,guides:[f(c,o)],angleRelativeTo:c.relativeTo})}if(d.length>=2){let[t,n]=[...d].sort((e,t)=>e.residual-t.residual),r=fl(t,n);if(r&&pl(t,n)>15*Math.PI/180&&Cs(r,e)<=a*2)return i({point:r,kind:`intersection`,guides:[f(t,r),f(n,r)]})}if(d.length>=1){let t=[...d].sort((e,t)=>e.residual-t.residual)[0],a=dl(e,t);if(r.has(`grid`)&&n.gridSize>0){let e=ml((a.x-t.point.x)*t.dir.x+(a.y-t.point.y)*t.dir.y,n.gridSize);a={x:t.point.x+t.dir.x*e,y:t.point.y+t.dir.y*e}}return i({point:a,kind:t.kind,guides:[f(t,a)],angleRelativeTo:t.relativeTo})}return r.has(`grid`)&&n.gridSize>0?i({point:{x:ml(e.x,n.gridSize),y:ml(e.y,n.gridSize)},kind:`grid`,guides:[]}):i({point:e,kind:`none`,guides:[]})}var gl=1;function _l(e,t={}){return JSON.stringify(e,null,t.pretty===!1?void 0:2)}function vl(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function yl(e,t){let n=typeof e==`string`?Number(e):e;return typeof n==`number`&&Number.isFinite(n)?n:t}function bl(e,t){return typeof e==`string`?e:t}function xl(e,t){return typeof e==`boolean`?e:t}function Sl(e,t,n){return typeof e==`string`&&t.includes(e)?e:n}function Cl(e,t){return vl(e)?{x:yl(e.x,t.x),y:yl(e.y,t.y)}:t}function wl(e){return Array.isArray(e)?e:vl(e)?Object.values(e):[]}function Tl(e){let t={};for(let n of e)t[n.id]=n;return t}function El(e,t,n){let r=`floor ${t+1}`,i=vl(e)?e:{};vl(e)||n.push(`${r} was not an object, so it was read as empty`);let a=fc();a.id=bl(i.id,a.id),a.label=bl(i.label,a.label),a.elevation=yl(i.elevation,0),a.height=yl(i.height,a.height);let o=[];for(let e of wl(i.nodes))vl(e)&&typeof e.id==`string`&&o.push({id:e.id,x:yl(e.x,0),y:yl(e.y,0)});a.nodes=Tl(o);let s=[],c=0;for(let e of wl(i.walls)){if(!vl(e)||typeof e.id!=`string`)continue;let t=bl(e.a,``),n=bl(e.b,``);if(!a.nodes[t]||!a.nodes[n]||t===n){c+=1;continue}s.push({id:e.id,a:t,b:n,thickness:Math.max(1,yl(e.thickness,100)),height:e.height===void 0?void 0:yl(e.height,0),baseHeight:e.baseHeight===void 0?void 0:yl(e.baseHeight,0),type:Sl(e.type,Object.values(_s),_s.Interior)})}a.walls=Tl(s),c>0&&n.push(`${r}: dropped ${c} wall(s) whose corners were missing`);let l=[],u=0;for(let e of wl(i.openings)){if(!vl(e)||typeof e.id!=`string`)continue;let t=bl(e.wallId,``);if(!a.walls[t]){u+=1;continue}l.push({id:e.id,wallId:t,kind:Sl(e.kind,Object.values(vs),vs.Door),offset:yl(e.offset,0),width:Math.max(1,yl(e.width,800)),sill:yl(e.sill,0),head:yl(e.head,2100),swing:e.swing===void 0?void 0:Sl(e.swing,Object.values(ys),ys.StartLeft)})}a.openings=Tl(l),u>0&&n.push(`${r}: dropped ${u} opening(s) with no wall to sit in`);let d=[];for(let e of wl(i.rooms))vl(e)&&typeof e.id==`string`&&d.push({id:e.id,name:bl(e.name,``),colour:typeof e.colour==`string`?e.colour:void 0,usage:typeof e.usage==`string`?e.usage:void 0,anchor:Cl(e.anchor,{x:0,y:0}),anchorPinned:xl(e.anchorPinned,!1),seq:yl(e.seq,d.length),wallIds:Array.isArray(e.wallIds)?e.wallIds.filter(e=>typeof e==`string`&&!!a.walls[e]):[],area:yl(e.area,0)});a.rooms=Tl(d);let f=dc(a);return f.result.length>0&&n.push(`${r}: repaired ${f.result.length} inconsistency(ies) in the geometry`),f.floor}function Dl(e){let t=[],n;try{n=JSON.parse(e)}catch(e){return{plan:null,issues:[`Not valid JSON: ${e.message}`]}}if(!vl(n))return{plan:null,issues:[`Not a floor plan: expected an object`]};if(n.version!==void 0&&n.version!==1)return{plan:null,issues:[`Plan format version ${String(n.version)} is not supported (this build reads version 1)`]};n.version===void 0&&t.push(`No format version, read as version 1`);let r=Array.isArray(n.floors)?n.floors:[];if(r.length===0){if(n.floors!==void 0)t.push(`No floors in the file, started an empty one`);else return{plan:null,issues:["Not a floor plan: no `floors`"]}}let i=(r.length>0?r:[void 0]).map((e,n)=>El(e,n,t));return{plan:{id:bl(n.id,Ls(`plan`)),name:typeof n.name==`string`?n.name:void 0,version:1,unitSystem:Sl(n.unitSystem,Object.values(gs),gs.Metric),floors:i,revision:yl(n.revision,0)+1},issues:t}}var Ol=1e-9;function kl(e,t,n){return(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x)}function Al(e,t){return Math.abs(e.x-t.x)<Ol&&Math.abs(e.y-t.y)<Ol}function jl(e,t,n,r){let i=kl(e,t,n),a=kl(e,n,r),o=kl(e,r,t);return!((i<-1e-9||a<-1e-9||o<-1e-9)&&(i>Ol||a>Ol||o>Ol))}function Ml(e,t){let n=e.slice(),r=t.filter(e=>e.length>=3).map(e=>({ring:e,index:e.reduce((t,n,r)=>n.x>e[t].x?r:t,0)})).sort((e,t)=>t.ring[t.index].x-e.ring[e.index].x);for(let e of r){let t=e.ring[e.index],r=-1,i=1/0;for(let a=0;a<n.length;a++){if(n[a].x<t.x)continue;let o=(n[a].x-t.x)**2+(n[a].y-t.y)**2;o<i&&Nl(t,n[a],n,e.ring)&&(i=o,r=a)}if(r<0)for(let e=0;e<n.length;e++){let a=(n[e].x-t.x)**2+(n[e].y-t.y)**2;a<i&&(i=a,r=e)}let a=[];for(let t=0;t<=e.ring.length;t++)a.push(e.ring[(e.index+t)%e.ring.length]);n=[...n.slice(0,r+1),...a,...n.slice(r)]}return n}function Nl(e,t,n,r){for(let i of[n,r])for(let n=0;n<i.length;n++){let r=i[n],a=i[(n+1)%i.length];if(r===e||a===e||r===t||a===t)continue;let o=kl(e,t,r),s=kl(e,t,a),c=kl(r,a,e),l=kl(r,a,t);if(o*s<0&&c*l<0)return!1}return!0}function Pl(e,t=[]){let n=Ps(e);if(n.length<3)return{vertices:[],indices:[]};let r=Ml(n,t.map(e=>Ps(e)).filter(e=>e.length>=3)),i=Os(r)<0?r.slice().reverse():r.slice(),a=i.map((e,t)=>t),o=[],s=a.length*a.length;for(;a.length>3&&s-->0;){let e=!1;for(let t=0;t<a.length;t++){let n=a[(t+a.length-1)%a.length],r=a[t],s=a[(t+1)%a.length],c=i[n],l=i[r],u=i[s];if(kl(c,l,u)<=Ol)continue;let d=!1;for(let e of a){if(e===n||e===r||e===s)continue;let t=i[e];if(!(Al(t,c)||Al(t,l)||Al(t,u))&&jl(t,c,l,u)){d=!0;break}}if(!d){o.push(n,r,s),a.splice(t,1),e=!0;break}}if(!e)break}return a.length===3&&o.push(a[0],a[1],a[2]),{vertices:i,indices:o}}var Fl=1e-6,Il=1,Ll=class{constructor(){this.positions=[],this.normals=[],this.indices=[]}triangle(e,t,n){let r=t[0]-e[0],i=t[1]-e[1],a=t[2]-e[2],o=n[0]-e[0],s=n[1]-e[1],c=n[2]-e[2],l=i*c-a*s,u=a*o-r*c,d=r*s-i*o,f=Math.hypot(l,u,d);if(f<Fl)return;l/=f,u/=f,d/=f;let p=this.positions.length/3;for(let r of[e,t,n])this.positions.push(r[0],r[1],r[2]);for(let e=0;e<3;e++)this.normals.push(l,u,d);this.indices.push(p,p+1,p+2)}quad(e,t,n,r){this.triangle(e,t,n),this.triangle(e,n,r)}};function Rl(e){let t=new Map;for(let n of Object.values(e.walls))for(let e of[n.a,n.b]){let r=t.get(e);r?r.push(n):t.set(e,[n])}return t}var zl=4;function Bl(e,t,n,r){let i=r.get(n);if(!i||i.length!==2)return null;let a=i[0].id===t.id?i[1]:i[0];if(a.thickness!==t.thickness)return null;let o=e.nodes[n],s=e.nodes[t.a===n?t.b:t.a],c=e.nodes[a.a===n?a.b:a.a];if(!o||!s||!c)return null;let l=Vl(s,o),u=Vl(o,c);if(!l||!u)return null;let d=l.x*u.x+l.y*u.y;if(d<-.999999)return null;let f={x:-l.y,y:l.x},p={x:-u.y,y:u.x},m=1+d,h={x:(f.x+p.x)/m,y:(f.y+p.y)/m};return Math.hypot(h.x,h.y)>zl?null:t.b===n?h:{x:-h.x,y:-h.y}}function Vl(e,t){let n=Cs(e,t);return n<Fl?null:{x:(t.x-e.x)/n,y:(t.y-e.y)/n}}function Hl(e,t,n,r,i){let a=e.nodes[t.a],o=e.nodes[t.b];if(!a||!o)return null;let s=Cs(a,o);if(s<Fl||r-n<Fl)return null;let c=Vl(a,o),l=t.thickness/2,u={x:-c.y*l,y:c.x*l},d={x:a.x+c.x*n,y:a.y+c.y*n},f={x:a.x+c.x*r,y:a.y+c.y*r},p=n<Fl?Bl(e,t,t.a,i):null,m=r>s-Fl?Bl(e,t,t.b,i):null,h=(e,t,n)=>t?{x:e.x+t.x*l*n,y:e.y+t.y*l*n}:{x:e.x+u.x*n,y:e.y+u.y*n};return[h(d,p,1),h(f,m,1),h(f,m,-1),h(d,p,-1)]}function Ul(e,t,n,r){if(r-n<Fl)return;let i=t.map(e=>[e.x,n,e.y]),a=t.map(e=>[e.x,r,e.y]),o=0;for(let e=0;e<t.length;e++){let n=t[e],r=t[(e+1)%t.length];o+=n.x*r.y-r.x*n.y}let s=o<0;for(let n=0;n<t.length;n++){let r=(n+1)%t.length;s?e.quad(i[n],i[r],a[r],a[n]):e.quad(i[r],i[n],a[n],a[r])}for(let n=1;n+1<t.length;n++)s?(e.triangle(a[0],a[n],a[n+1]),e.triangle(i[0],i[n+1],i[n])):(e.triangle(a[0],a[n+1],a[n]),e.triangle(i[0],i[n],i[n+1]))}function Wl(e,t,n){return Object.values(e.openings).filter(e=>e.wallId===t.id).filter(e=>e.offset+e.width/2>Fl&&e.offset-e.width/2<n-Fl).sort((e,t)=>e.offset-t.offset)}function Gl(e,t={}){let{wallHeight:n,includeFloorSlab:r=!0,slabThickness:i=200,applyElevation:a=!0}=t,o=new Ll,s=[],c=a?e.elevation:0,l=r?i+Il:0,u=Rl(e),d=o.indices.length;for(let t of Object.values(e.walls)){let r=e.nodes[t.a],i=e.nodes[t.b];if(!r||!i)continue;let a=Cs(r,i);if(a<Fl)continue;let s=c+(t.baseHeight??0)-l,d=s+(t.height??n??e.height);if(d-s<Fl)continue;let f=Wl(e,t,a);if(f.length===0){let n=Hl(e,t,0,a,u);n&&Ul(o,n,s,d);continue}for(let[n,r]of Xc(e,t)){let i=Hl(e,t,n,r,u);i&&Ul(o,i,s,d)}for(let n of f){let r=Hl(e,t,Math.max(0,n.offset-n.width/2),Math.min(a,n.offset+n.width/2),u);if(!r)continue;let i=s+Math.max(0,n.sill),c=s+Math.max(0,n.head);i>s+Fl&&Ul(o,r,s,Math.min(i,d)),c<d-Fl&&Ul(o,r,Math.max(c,s),d)}}if(o.indices.length>d&&s.push({part:`wall`,start:d,count:o.indices.length-d}),r){let t=o.indices.length;for(let t of Vc(e).rooms){let{vertices:e,indices:n}=Pl(t.outer,t.holes);if(n.length===0)continue;let r=c,a=c-i;for(let t=0;t<n.length;t+=3){let i=[e[n[t]],e[n[t+1]],e[n[t+2]]],s=i.map(e=>[e.x,r,e.y]),c=i.map(e=>[e.x,a,e.y]);o.triangle(s[0],s[2],s[1]),o.triangle(c[0],c[1],c[2])}for(let e of[t.outer,...t.holes])for(let t=0;t<e.length;t++){let n=e[t],i=e[(t+1)%e.length];o.quad([n.x,a,n.y],[n.x,r,n.y],[i.x,r,i.y],[i.x,a,i.y])}}o.indices.length>t&&s.push({part:`floor`,start:t,count:o.indices.length-t})}return{positions:new Float32Array(o.positions),normals:new Float32Array(o.normals),indices:new Uint32Array(o.indices),groups:s}}function Kl(e){let t=[];for(let n of e.matchAll(/[ML]\s*(-?[\d.]+)[,\s]+(-?[\d.]+)/gi))t.push({x:parseFloat(n[1]),y:parseFloat(n[2])});return t}function ql(e){let t=e.match(/^\s*M\s*(-?[\d.]+),(-?[\d.]+)\s*L\s*(-?[\d.]+),(-?[\d.]+)\s*M\s*(-?[\d.]+),(-?[\d.]+)\s*A\s/i);return t?{p1:{x:parseFloat(t[1]),y:parseFloat(t[2])},p2:{x:parseFloat(t[3]),y:parseFloat(t[4])}}:null}function Jl(e){let t=new DOMParser().parseFromString(e,`image/svg+xml`),n=[],r=[];return t.querySelectorAll(`[id^="room"]`).forEach(e=>{let t=e.querySelector(`[id="background"]`),i=t?.getAttribute(`d`);if(!i)return;let a=Kl(i);a.length<3||(n.push({name:e.querySelector(`text`)?.textContent?.trim()??``,points:a}),e.querySelectorAll(`path`).forEach(e=>{if(e===t)return;let n=ql(e.getAttribute(`d`)??``);n&&r.push(n)}))}),{rooms:n,doors:r}}function Yl(e,t={}){let{scale:n=1,thickness:r=Xs.thickness,weldTolerance:i,label:a}=t,{rooms:o,doors:s}=Jl(e),c=pc({floorLabel:a}),l=c.floors[0],u=i??Math.max(1,n*2);for(let e of o){let t=e.points.map(e=>({x:e.x*n,y:e.y*n}));for(let e=0;e<t.length;e++){let n=t[e],i=t[(e+1)%t.length];l=Zs(l,n,i,{thickness:r,type:_s.Interior},u).floor}}for(let e of s){let t={x:e.p1.x*n,y:e.p1.y*n},r={x:e.p2.x*n,y:e.p2.y*n},i={x:(t.x+r.x)/2,y:(t.y+r.y)/2},a=Math.hypot(r.x-t.x,r.y-t.y);if(a<=0)continue;let o=null;for(let e of Object.values(l.walls)){let t=l.nodes[e.a],n=l.nodes[e.b];if(!t||!n)continue;let r=Math.hypot(n.x-t.x,n.y-t.y);if(r<1e-6)continue;let a=((i.x-t.x)*(n.x-t.x)+(i.y-t.y)*(n.y-t.y))/(r*r),s=Math.min(1,Math.max(0,a)),c=t.x+(n.x-t.x)*s,d=t.y+(n.y-t.y)*s,f=Math.hypot(i.x-c,i.y-d);f<=u&&(!o||f<o.dist)&&(o={wallId:e.id,offset:s*r,dist:f})}o&&(l=sc(l,{wallId:o.wallId,kind:vs.Door,offset:o.offset,width:a,sill:0,head:2100}).floor)}l=Uc(l).floor;let d=Vc(l).rooms;for(let e of o){if(!e.name)continue;let t={x:e.points.reduce((e,t)=>e+t.x,0)/e.points.length*n,y:e.points.reduce((e,t)=>e+t.y,0)/e.points.length*n},r=d.find(e=>e.roomId&&e.outer.length>2&&Xl(t,e.outer)&&l.rooms[e.roomId]?.name.startsWith(`Room `));r?.roomId&&(l={...l,rooms:{...l.rooms,[r.roomId]:{...l.rooms[r.roomId],name:e.name}}})}return{...c,floors:[l]}}function Xl(e,t){let n=!1;for(let r=0,i=t.length-1;r<t.length;i=r++){let a=t[r].x,o=t[r].y,s=t[i].x,c=t[i].y;o>e.y!=c>e.y&&e.x<(s-a)*(e.y-o)/(c-o)+a&&(n=!n)}return n}var Zl={iconPicker:`iconPicker_xJJmG`,"iconPicker-label":`iconPicker-label_VEB2X`,iconPickerLabel:`iconPicker-label_VEB2X`,"iconPicker-item":`iconPicker-item_iJWDN`,iconPickerItem:`iconPicker-item_iJWDN`,"iconPicker-item-container":`iconPicker-item-container_-1WT5`,iconPickerItemContainer:`iconPicker-item-container_-1WT5`,"iconPicker-item-selected":`iconPicker-item-selected_GQ-I1`,iconPickerItemSelected:`iconPicker-item-selected_GQ-I1`,"iconPicker-error":`iconPicker-error_23m9v`,iconPickerError:`iconPicker-error_23m9v`};function Ql(e){let{formValidator:t}=e;return t?t.touched&&t.hasError():!1}function $l(e){let{isRequired:t,formValidator:n}=e;return!!(t||n?.validators.find(e=>e.validatorId===`required`))}function eu({data:e=[],selectedId:t=null,label:n=``,onChange:r,formValidator:i=null,isRequired:a,className:o,style:s,classNames:d,styles:p,...m}){let h=i?i.value??null:t,g=Ql({formValidator:i,isRequired:a}),_=$l({formValidator:i,isRequired:a}),v=(0,c.useRef)([]),y=(0,c.useRef)([]),b=e.findIndex(e=>e.id===h),x=b>=0?b:0;function S(e){i&&i.set(e),r?.(e)}function C(t,n){if(e.length===0)return;let r=(n+t+e.length)%e.length;v.current[r]?.focus(),S(e[r].id)}function w(e,t,n){switch(e.key){case`ArrowDown`:case`ArrowRight`:e.preventDefault(),C(1,t);break;case`ArrowUp`:case`ArrowLeft`:e.preventDefault(),C(-1,t);break;case` `:case`Enter`:e.preventDefault(),y.current[t]?.addRipple(),S(n)}}return(0,f.jsxs)(`div`,{...m,className:(0,l.default)(Zl.iconPicker,{[Zl.iconPickerError]:g},d?.root,o),style:{...p?.root,...s},children:[n&&(0,f.jsxs)(`div`,{className:(0,l.default)(Zl.iconPickerLabel,d?.label),style:p?.label,children:[n,_&&` *`]}),(0,f.jsx)(`div`,{role:`radiogroup`,"aria-label":n||void 0,className:(0,l.default)(Zl.iconPickerItemContainer,d?.itemContainer),style:p?.itemContainer,children:e.map(({id:e,label:t,icon:n,customIcon:r},i)=>{let a=h===e;return(0,f.jsxs)(`div`,{ref:e=>{v.current[i]=e},className:(0,l.default)(Zl.iconPickerItem,{[Zl.iconPickerItemSelected]:a},d?.item),style:p?.item,title:t,tabIndex:i===x?0:-1,role:`radio`,"aria-checked":a,onClick:()=>S(e),onKeyDown:t=>w(t,i,e),children:[n&&(0,f.jsx)(u.FontAwesomeIcon,{icon:n}),r??null,(0,f.jsx)(G,{ref:e=>{y.current[i]=e}})]},e)})})]})}var tu=[`click`,`mousemove`,`keydown`,`scroll`,`touchstart`];function nu({children:e=null,idleAfterSeconds:t=600,renderCondition:n=!0}){let[r,i]=(0,c.useState)(!1),a=(0,c.useRef)(null),o=(0,c.useCallback)(()=>{a.current!==null&&clearTimeout(a.current),a.current=setTimeout(()=>{i(!0)},t*1e3)},[t]),s=(0,c.useCallback)(()=>{i(!1),o()},[o]);return(0,c.useEffect)(()=>{o()},[o]),(0,c.useEffect)(()=>{for(let e of tu)document.addEventListener(e,s);return()=>{for(let e of tu)document.removeEventListener(e,s);a.current!==null&&clearTimeout(a.current)}},[s]),(0,f.jsx)(f.Fragment,{children:n&&r&&e})}var ru={inputDropdown:`inputDropdown_UdYMa`,inputDropdownStatus:`inputDropdownStatus_ORHlt`,inputDropdownPanel:`inputDropdownPanel_TAURL`,dropdown:`dropdown_-M5-x`,"dropdown-scroll":`dropdown-scroll_XMZs-`,dropdownScroll:`dropdown-scroll_XMZs-`,"dropdown-empty":`dropdown-empty_Kx---`,dropdownEmpty:`dropdown-empty_Kx---`,"dropdown-item":`dropdown-item_JRgbt`,dropdownItem:`dropdown-item_JRgbt`,"dropdown-item-highlighted":`dropdown-item-highlighted_1ZENP`,dropdownItemHighlighted:`dropdown-item-highlighted_1ZENP`};function iu(e,t){return t?t.value??``:e??``}function au(e,t){let n=t.find(t=>t.value===e);return n?n.label??n.value:e}var ou={wrap:!1},su={empty:`No matches`};function cu(e){let{label:t=``,value:n=``,formValidator:r=null,error:i,isRequired:a=!1,items:o=[],allowCustomValue:s=!1,maxItems:u=100,className:d,style:p,classNames:m,styles:h,onSelect:g=()=>null,onChange:_,placeholder:v=``,readOnly:y=!1,labels:b,...x}=D(`InputDropdown`,e),S=O(`InputDropdown`,b,su),C=iu(n,r),[,w]=(0,c.useState)(0),T=(0,c.useRef)(r);(0,c.useEffect)(()=>{if(T.current=r,!r)return;let e=()=>w(e=>e+1);return r.registerOnUpdateListener(e),()=>{r.removeOnUpdateListener(e)}},[r]);let E=a||!!r?.validators.find(e=>e.validatorId===`required`),[k,j]=(0,c.useState)(()=>au(C,o)),[M,N]=(0,c.useState)(C),[P,F]=(0,c.useState)(!1),[I,L]=(0,c.useState)(null),R=(0,c.useRef)(null),z=(0,c.useRef)(null),B=(0,c.useRef)(null);if(C!==M){N(C);let e=o.find(e=>e.value===C);e?j(e.label??e.value):s&&j(C)}if(!P&&!s&&k===C){let e=au(C,o);e!==k&&j(e)}let V=(0,c.useMemo)(()=>{let e=k.toLowerCase(),t=[];for(let n of o)if((n.label??n.value).toLowerCase().includes(e)&&(t.push(n),u>0&&t.length>=u))break;return t},[o,k,u]),H=!s&&k!==``&&k!==au(C,o),U=V.length===0&&H,W=P&&!y&&(V.length>0||U),G=h?.dropdown?.fontSize,ee=(0,c.useCallback)(e=>{let t=z.current;e&&t&&G==null&&(e.style.fontSize=window.getComputedStyle(t).fontSize)},[G]),K=()=>{y||(R.current&&=(clearTimeout(R.current),null),F(!0))},te=()=>{T.current&&(T.current.touched=!0),R.current=setTimeout(()=>{F(!1),L(null),R.current=null,s||j(au(C,o))},100)};(0,c.useEffect)(()=>{W&&I!==null&&Pa(B.current,B.current?.children[I])},[W,I]);let q=(0,c.useCallback)(e=>{j(e.label??e.value),F(!1),L(null),r&&r.set(e.value),_&&_(e.value),g(e.value)},[r,_,g]),ne=(0,c.useCallback)(e=>{if(y)return;let t=e.key===`ArrowUp`||e.key===`ArrowDown`;if(!W){t&&(e.preventDefault(),F(!0));return}if(t){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;L(e=>e!==null&&e===(t===1?V.length-1:0)?null:Ma(e,t,V.length,ou))}else e.key===`Enter`&&(I!==null&&V[I]?(e.preventDefault(),q(V[I])):s&&(F(!1),L(null)))},[V,I,q,s,y,W]),J=(0,f.jsxs)(`div`,{ref:ee,className:(0,l.default)(ru.dropdown,m?.dropdown),style:h?.dropdown,children:[U&&(0,f.jsx)(`div`,{className:(0,l.default)(ru.dropdownEmpty,m?.empty),style:h?.empty,onMouseDown:e=>e.preventDefault(),children:S.empty}),(0,f.jsx)(`div`,{ref:B,className:ru.dropdownScroll,children:V.map((e,t)=>(0,f.jsx)(`div`,{className:(0,l.default)(ru.dropdownItem,I===t&&ru.dropdownItemHighlighted,m?.item),style:h?.item,onMouseDown:e=>e.preventDefault(),onClick:()=>q(e),children:e.label??e.value},`${t}_${e.label}_${e.value}`))})]});return(0,f.jsxs)(`div`,{...x,ref:z,className:(0,l.default)(ru.inputDropdown,m?.root,d),style:{...h?.root,...p},onFocus:K,onBlur:te,onKeyDown:ne,children:[(0,f.jsx)(rn,{isOpen:W,onOpenChange:e=>{e||(F(!1),L(null))},presentation:A.Default,placement:wt.Bottom,align:Tt.Start,offset:0,withArrow:!1,constrainWidth:!1,closeOnTriggerClick:!1,focusOnOpen:!1,classNames:{panel:ru.inputDropdownPanel},content:J,children:(0,f.jsx)(Gi,{autoComplete:`off`,label:t,value:k,readOnly:y,formValidator:null,isRequired:E,isValid:r?!r.touched||!r.hasError():!i,errorMessage:r?r.touched?r.getCurrentErrorMessage()??``:``:i??``,onChange:e=>{if(j(e),L(null),F(!0),s)r&&r.set(e),_&&_(e);else if(e===``)r&&r.set(``),_&&_(``),g(``);else{let t=o.find(t=>(t.label??t.value).toLowerCase()===e.toLowerCase());t&&(r&&r.set(t.value),_&&_(t.value),g(t.value))}},placeholder:v})}),(0,f.jsx)(`span`,{className:ru.inputDropdownStatus,role:`status`,"aria-live":`polite`,children:W&&U?S.empty:``})]})}var lu={board:`board_6KRdw`,column:`column_NrNeF`,"column-empty":`column-empty_5KYsJ`,columnEmpty:`column-empty_5KYsJ`,"column-over":`column-over_sO7oD`,columnOver:`column-over_sO7oD`,"column-over-limit":`column-over-limit_QmeZF`,columnOverLimit:`column-over-limit_QmeZF`,"column-drop-target":`column-drop-target_mznmc`,columnDropTarget:`column-drop-target_mznmc`,"column-disabled":`column-disabled_ehcz3`,columnDisabled:`column-disabled_ehcz3`,"column-items":`column-items_xY5er`,columnItems:`column-items_xY5er`,"column-dragging":`column-dragging_6F5TK`,columnDragging:`column-dragging_6F5TK`,"column-drag-overlay":`column-drag-overlay_ctehQ`,columnDragOverlay:`column-drag-overlay_ctehQ`,"column-header":`column-header_PLeKG`,columnHeader:`column-header_PLeKG`,"column-header-reorderable":`column-header-reorderable_Jtgii`,columnHeaderReorderable:`column-header-reorderable_Jtgii`,"column-header-title":`column-header-title_FQhHQ`,columnHeaderTitle:`column-header-title_FQhHQ`,"column-header-count":`column-header-count_3t83e`,columnHeaderCount:`column-header-count_3t83e`,"column-header-count-over":`column-header-count-over_AkAdo`,columnHeaderCountOver:`column-header-count-over_AkAdo`,"column-header-trailing":`column-header-trailing_6625D`,columnHeaderTrailing:`column-header-trailing_6625D`,"column-header-actions":`column-header-actions_XKY3t`,columnHeaderActions:`column-header-actions_XKY3t`,"column-placeholder":`column-placeholder_WGyF-`,columnPlaceholder:`column-placeholder_WGyF-`,"column-loading-indicator":`column-loading-indicator_2Q70t`,columnLoadingIndicator:`column-loading-indicator_2Q70t`,"column-loading-spinner":`column-loading-spinner_4ca6l`,columnLoadingSpinner:`column-loading-spinner_4ca6l`,item:`item_T8CJK`,"item-dragging":`item-dragging_iWurw`,itemDragging:`item-dragging_iWurw`,"item-handled":`item-handled_l28gq`,itemHandled:`item-handled_l28gq`,"item-disabled":`item-disabled_n8Nuq`,itemDisabled:`item-disabled_n8Nuq`,dragOverlay:`dragOverlay_DSyKz`},uu={draggable:!0,droppable:!0},du={draggable:!0,droppable:!1};function fu({id:e,dragHandle:t,disabled:n,preventAsDropTarget:r,children:i}){let{attributes:a,listeners:o,setNodeRef:s,transform:c,transition:u,isDragging:d}=(0,h.useSortable)({id:e,disabled:n?r?uu:du:void 0});function p(e){e.target.closest(`[data-drag-handle]`)&&o?.onPointerDown?.(e)}return(0,f.jsx)(`div`,{ref:s,style:{transform:g.CSS.Transform.toString(c),transition:u},className:(0,l.default)(lu.item,t&&lu.itemHandled,d&&lu.itemDragging,n&&lu.itemDisabled),...a,...o,onPointerDown:t?p:o?.onPointerDown,children:i})}var pu={type:`column`},mu={draggable:!0,droppable:!0};function hu({id:e,title:t,itemIds:n,items:r,renderItem:i,dragHandle:a,preserveSizeWhileEmpty:o,collapseEmptyColumns:s=!0,maxItems:u,disabled:d,getItemDisabled:p,emptyPlaceholder:_,actions:v,reorderable:y,activeIsColumn:b,columnMaxHeight:x,hasMore:S,onLoadMore:C,loadMoreThreshold:w=100,className:T,style:E,classNames:D,styles:O,...k}){let A=`column-${e}`,{setNodeRef:j,isOver:M}=(0,m.useDroppable)({id:A,disabled:d}),N=s&&n.length===0&&!o,P=u!=null&&n.length>u,F=(0,c.useRef)(null),I=(0,c.useCallback)(e=>{F.current=e,j(e)},[j]),L=(0,c.useRef)(!1),[z,B]=(0,c.useState)(!1),V=(0,c.useCallback)(()=>{C&&!L.current&&(L.current=!0,B(!0),Promise.resolve(C()).finally(()=>{L.current=!1,B(!1)}))},[C]),H=(0,c.useCallback)(e=>{if(!S)return;let t=e.currentTarget;t.scrollTop+t.clientHeight>=t.scrollHeight-w&&V()},[S,w,V]),U=(0,c.useRef)(``);(0,c.useEffect)(()=>{if(!S||!x||z)return;let e=F.current;if(!e||e.clientHeight===0||e.scrollHeight>e.clientHeight)return;let t=`${n.length}:${e.clientHeight}`;U.current!==t&&(U.current=t,V())},[S,x,z,n.length,V]);let{attributes:W,listeners:G,setNodeRef:ee,transform:K,transition:te,isDragging:q,isOver:ne}=(0,h.useSortable)({id:e,data:pu,disabled:!y&&mu});return(0,f.jsxs)(`div`,{...k,ref:ee,id:e,className:(0,l.default)(lu.column,M&&!b&&lu.columnOver,ne&&lu.columnDropTarget,N&&lu.columnEmpty,P&&lu.columnOverLimit,d&&lu.columnDisabled,q&&lu.columnDragging,T),style:{transform:g.CSS.Transform.toString(K),transition:te,...E},children:[(0,f.jsxs)(`div`,{className:(0,l.default)(lu.columnHeader,y&&lu.columnHeaderReorderable,D?.header),style:O?.header,...y?W:void 0,...y?G:void 0,children:[(0,f.jsx)(`span`,{className:lu.columnHeaderTitle,children:t}),(0,f.jsxs)(`div`,{className:lu.columnHeaderTrailing,children:[u!=null&&(0,f.jsxs)(`span`,{className:(0,l.default)(lu.columnHeaderCount,P&&lu.columnHeaderCountOver,D?.count),style:O?.count,children:[n.length,`/`,u]}),v!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(lu.columnHeaderActions,D?.actions),style:O?.actions,children:v})]})]}),(0,f.jsx)(h.SortableContext,{id:e,items:n,strategy:h.verticalListSortingStrategy,children:(0,f.jsxs)(`div`,{ref:I,className:(0,l.default)(lu.columnItems,D?.items),style:{maxHeight:x,overflowY:x?`auto`:void 0,...O?.items},onScroll:x?H:void 0,children:[n.length===0&&_!=null?(0,f.jsx)(`div`,{className:(0,l.default)(lu.columnPlaceholder,D?.placeholder),style:O?.placeholder,children:_}):null,n.map(e=>(0,f.jsx)(fu,{id:e,dragHandle:a,disabled:d||r[e]!==void 0&&(p?.(r[e],e)??!1),preventAsDropTarget:d,children:r[e]===void 0?null:i(r[e],e)},e)),z&&(0,f.jsx)(`div`,{className:(0,l.default)(lu.columnLoadingIndicator,D?.loadingIndicator),style:O?.loadingIndicator,children:(0,f.jsx)(R,{className:lu.columnLoadingSpinner})})]})})]})}function gu(e,t){return e.length===t.length&&e.every((e,n)=>{let r=t[n];return e.id===r.id&&e.itemIds.length===r.itemIds.length&&e.itemIds.every((e,t)=>e===r.itemIds[t])})}function _u(e,t){return e.findIndex(e=>e.itemIds.includes(t))}function vu(e){return!!(e&&typeof e==`object`&&e.type===`column`)}function yu(e,t,n){let r=e.findIndex(e=>e.id===t),i=e.findIndex(e=>e.id===n);return r===-1||i===-1||r===i?e:(0,h.arrayMove)(e,r,i)}var bu=e=>{let t=vu(e.active.data.current),n=e.droppableContainers.filter(e=>t?vu(e.data.current):!vu(e.data.current));return(0,m.closestCorners)({...e,droppableContainers:n})};function xu(e){return e.startsWith(`column-`)?e.slice(7):null}function Su(e,t,n,r){let i=_u(e,t);if(i===-1)return e;let a=xu(n),o=a===null?_u(e,n):e.findIndex(e=>e.id===a);if(o===-1)return e;if(i===o){let o=e[i],s=o.itemIds.indexOf(t);if(s===-1)return e;if(a!==null){let{activeRect:t,overRect:n}=r,a=t&&t.top+t.height/2>n.top+n.height/2?o.itemIds.length-1:0;if(a===s)return e;let c=[...e];return c[i]={...o,itemIds:(0,h.arrayMove)(o.itemIds,s,a)},c}let c=o.itemIds.indexOf(n);if(c===-1||s===c)return e;let l=[...e];return l[i]={...o,itemIds:(0,h.arrayMove)(o.itemIds,s,c)},l}let s=e[i],c=e[o],l=[...c.itemIds],{activeRect:u,overRect:d}=r,f;if(a!==null)f=u&&u.top+u.height/2>d.top+d.height/2?l.length:0;else{let e=l.indexOf(n),t=e!==-1&&e===l.length-1,r=!!(u&&u.top+u.height/2>d.top+d.height);f=e===-1?l.length:t&&r?e+1:e}l.splice(f,0,t);let p=[...e];return p[i]={...s,itemIds:s.itemIds.filter(e=>e!==t)},p[o]={...c,itemIds:l},p}function Cu(e,t,n){function r(e){let r=t[e];return r===void 0?e:n(r,e)}function i(t){let n=xu(t);if(n!==null){let t=e.find(e=>e.id===n);return t?`the ${t.title} column`:`a column`}let i=e.find(e=>e.itemIds.includes(t));return i?`${r(t)}, in the ${i.title} column`:r(t)}function a(t){return e.find(e=>e.id===t)?.title??t}return{onDragStart({active:e}){return vu(e.data.current)?`Picked up column ${a(String(e.id))}.`:`Picked up card ${r(String(e.id))}.`},onDragOver({active:e,over:t}){return vu(e.data.current)?t?`Column ${a(String(e.id))} is over column ${a(String(t.id))}.`:`Column ${a(String(e.id))} is no longer over a droppable area.`:t?`Card ${r(String(e.id))} is over ${i(String(t.id))}.`:`Card ${r(String(e.id))} is no longer over a droppable area.`},onDragEnd({active:e,over:t}){return vu(e.data.current)?t?`Column ${a(String(e.id))} was dropped over column ${a(String(t.id))}.`:`Column ${a(String(e.id))} was dropped.`:t?`Card ${r(String(e.id))} was dropped over ${i(String(t.id))}.`:`Card ${r(String(e.id))} was dropped.`},onDragCancel({active:e}){return vu(e.data.current)?`Dragging cancelled. Column ${a(String(e.id))} was returned to its original position.`:`Dragging cancelled. Card ${r(String(e.id))} was returned to its original position.`}}}function wu(e,t,n){let r=[];for(let i of e){if(!(0,h.hasSortableData)(i)||i.data.current.sortable.containerId!==n)continue;let e=t.get(i.id);e&&r.push({container:i,rect:e})}return r.sort((e,t)=>e.rect.top-t.rect.top)}var Tu=(e,{context:t})=>{let{active:n,collisionRect:r,droppableRects:i,droppableContainers:a}=t;if(!n||!r||!(0,h.hasSortableData)(n))return;let o=e.code===m.KeyboardCode.Down||e.code===m.KeyboardCode.Up,s=e.code===m.KeyboardCode.Left||e.code===m.KeyboardCode.Right;if(!o&&!s)return;e.preventDefault();let c=n.data.current.sortable.containerId,l=a.getEnabled();if(vu(n.data.current)){if(!s)return;let t=e.code===m.KeyboardCode.Right?1:-1,a=wu(l,i,c).sort((e,t)=>e.rect.left-t.rect.left),o=a.findIndex(e=>e.container.id===n.id);if(o===-1)return;let u=a[o+t];return u?{x:u.rect.left,y:r.top}:void 0}if(o){let t=e.code===m.KeyboardCode.Down?1:-1,a=wu(l,i,c),o=a.findIndex(e=>e.container.id===n.id);if(o===-1)return;let s=a[o+t];return s?{x:r.left,y:s.rect.top}:void 0}let u=e.code===m.KeyboardCode.Right?1:-1,d=[];for(let e of l){if(xu(String(e.id))===null)continue;let t=i.get(e.id);t&&d.push({container:e,rect:t})}d.sort((e,t)=>e.rect.left-t.rect.left);let f=d.findIndex(e=>xu(String(e.container.id))===c);if(f===-1)return;let p=d[f+u];if(!p)return;let g=wu(l,i,xu(String(p.container.id))),_=p.rect;return g.length>0&&(_=g.reduce((e,t)=>Math.abs(t.rect.top-r.top)<Math.abs(e.rect.top-r.top)?t:e).rect),{x:_.left,y:_.top}},Eu=(e,t)=>t,Du={activationConstraint:{distance:8}},Ou={activationConstraint:{delay:250,tolerance:5}},ku={coordinateGetter:Tu},Au={draggable:`
3
+ `)}var ls=class extends c.default.Component{constructor(...e){super(...e),this.state={error:null,errorInfo:null},this.reset=()=>{this.setState({error:null,errorInfo:null}),this.props.onReset?.()}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.setState({errorInfo:t}),this.props.onError?.(e,t)}componentDidUpdate(e){if(!this.state.error)return;let t=e.resetKeys??[],n=this.props.resetKeys??[];(n.length!==t.length||n.some((e,n)=>e!==t[n]))&&this.reset()}render(){let{error:e,errorInfo:t}=this.state,{children:n=null,title:r=`Something went wrong`,description:i,labels:a,fallback:o,hideStack:s=!1,className:c,style:p,classNames:m,styles:h,onError:g,onReset:_,resetKeys:v,role:y=`alert`,...b}=this.props;if(!e)return n;let x={...ss,...a};return o?typeof o==`function`?o({error:e,errorInfo:t,resetErrorBoundary:this.reset}):o:(0,f.jsxs)(`div`,{...b,role:y,className:(0,l.default)(os.errorBoundary,c,m?.root),style:{...p,...h?.root},children:[(0,f.jsxs)(`div`,{className:(0,l.default)(os.errorBoundaryHeader,m?.header),style:h?.header,children:[(0,f.jsx)(`div`,{className:(0,l.default)(os.errorBoundaryBadge,m?.badge),style:h?.badge,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faTriangleExclamation,className:(0,l.default)(os.errorBoundaryIcon,m?.icon),style:h?.icon})}),(0,f.jsx)(`div`,{className:(0,l.default)(os.errorBoundaryTitle,m?.title),style:h?.title,children:r}),(0,f.jsx)(`div`,{className:(0,l.default)(os.errorBoundaryDescription,m?.description),style:h?.description,children:i??e.message})]}),!s&&(0,f.jsxs)(N,{title:x.stackTrace,className:(0,l.default)(os.errorBoundaryStack,m?.stack),style:h?.stack,children:[(0,f.jsxs)(`div`,{className:(0,l.default)(os.errorBoundaryStackHeader,m?.stackHeader),style:h?.stackHeader,children:[(0,f.jsx)(`span`,{className:(0,l.default)(os.errorBoundaryStackLabel,m?.stackLabel),style:h?.stackLabel,children:e.name||`Error`}),(0,f.jsx)($a,{value:cs(e,t),labels:{copy:x.copy,copied:x.copied},onCopy:()=>Ae(x.copySuccessToast,{type:`success`}),onError:()=>Ae(x.copyErrorToast,{type:`error`}),className:(0,l.default)(os.errorBoundaryCopyButton,m?.copyButton),style:h?.copyButton})]}),(0,f.jsx)(`pre`,{className:(0,l.default)(os.errorBoundaryStackTrace,m?.stackTrace),style:h?.stackTrace,children:cs(e,t)})]}),(0,f.jsx)(`div`,{className:(0,l.default)(os.errorBoundaryActions,m?.actions),style:h?.actions,children:(0,f.jsx)(ne,{onClick:this.reset,icon:d.faArrowRotateRight,className:(0,l.default)(os.errorBoundaryResetButton,m?.resetButton),style:h?.resetButton,children:x.reset})})]})}},us={fab:`fab_hyAAa`,"fab-content":`fab-content_IBiXm`,fabContent:`fab-content_IBiXm`,"fab-content-container":`fab-content-container_FQD1x`,fabContentContainer:`fab-content-container_FQD1x`,"fab-size-mini":`fab-size-mini_KP9BD`,fabSizeMini:`fab-size-mini_KP9BD`},ds={default:null,mini:us.fabSizeMini};function fs({style:e,children:t=null,size:n=`default`,className:r=``,styleType:i=z.Primary,onClick:a=()=>{}}){return(0,f.jsx)(ne,{styleType:i,size:B.Icon,className:(0,l.default)(us.fab,ds[n],r),style:e,onClick:a,children:(0,f.jsx)(`div`,{className:us.fabContentContainer,children:(0,f.jsx)(`div`,{className:us.fabContent,children:t})})})}var ps={fab:`fab_YI34X`,appear:`appear_DL0wm`,"fab-container":`fab-container_8uoYo`,fabContainer:`fab-container_8uoYo`,"fab-menu":`fab-menu_O1WO9`,fabMenu:`fab-menu_O1WO9`,"fab-menu-backdrop":`fab-menu-backdrop_m9T6a`,fabMenuBackdrop:`fab-menu-backdrop_m9T6a`,"fab-menu-backdrop-open":`fab-menu-backdrop-open_35mlH`,fabMenuBackdropOpen:`fab-menu-backdrop-open_35mlH`,"fab-menu-entry":`fab-menu-entry_rIgXr`,fabMenuEntry:`fab-menu-entry_rIgXr`,"fab-menu-entry-shown":`fab-menu-entry-shown_066HC`,fabMenuEntryShown:`fab-menu-entry-shown_066HC`,"fab-menu-entry-label":`fab-menu-entry-label_pXdDf`,fabMenuEntryLabel:`fab-menu-entry-label_pXdDf`,"fab-menu-entry-label-container":`fab-menu-entry-label-container_oeKI5`,fabMenuEntryLabelContainer:`fab-menu-entry-label-container_oeKI5`,"fab-icon":`fab-icon_5Fp-6`,fabIcon:`fab-icon_5Fp-6`,"fab-icon-menuOpen":`fab-icon-menuOpen_Jp8Qb`,fabIconMenuOpen:`fab-icon-menuOpen_Jp8Qb`,"fab-icon-content":`fab-icon-content_o0VDx`,fabIconContent:`fab-icon-content_o0VDx`,"fab-icon-content-shown":`fab-icon-content-shown_oY19H`,fabIconContentShown:`fab-icon-content-shown_oY19H`};function ms({children:e=null,size:t=`default`,menuEntries:n=[],onMenuEntryClicked:r=()=>{},onClick:i=()=>{},closeMenuOnEntryClicked:a=!0,className:o,style:s,classNames:p,styles:m,...h}){let[g,_]=(0,c.useState)(!1);function v(){n.length>0&&_(e=>!e),i()}function y(e,t){e.stopPropagation(),a&&_(!1),r(t)}return(0,f.jsxs)(`div`,{...h,className:(0,l.default)(ps.fabContainer,o,p?.root),style:{...s,...m?.root},children:[(0,f.jsx)(`div`,{className:(0,l.default)(ps.fabMenuBackdrop,g&&ps.fabMenuBackdropOpen,p?.backdrop),style:m?.backdrop,onClick:e=>{e.stopPropagation(),_(!1)}}),(0,f.jsx)(`div`,{onClick:e=>e.stopPropagation(),children:(0,f.jsx)(fs,{className:(0,l.default)(ps.fab,p?.button),style:m?.button,size:t,onClick:v,children:(0,f.jsxs)(`div`,{className:(0,l.default)(ps.fabIcon,g&&ps.fabIconMenuOpen,p?.icon),style:m?.icon,children:[(0,f.jsx)(`div`,{className:(0,l.default)(ps.fabIconContent,!g&&ps.fabIconContentShown),children:e}),(0,f.jsx)(`div`,{className:(0,l.default)(ps.fabIconContent,g&&ps.fabIconContentShown),children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faPlus})})]})})}),(0,f.jsx)(`div`,{className:(0,l.default)(ps.fabMenu,p?.menu),style:m?.menu,children:n.map(({id:e,label:t,icon:n})=>(0,f.jsxs)(`div`,{className:(0,l.default)(ps.fabMenuEntry,g&&ps.fabMenuEntryShown,p?.menuEntry),style:m?.menuEntry,onClick:t=>y(t,e),children:[t&&(0,f.jsx)(`div`,{className:ps.fabMenuEntryLabelContainer,children:(0,f.jsx)(`div`,{className:(0,l.default)(ps.fabMenuEntryLabel,p?.menuEntryLabel),style:m?.menuEntryLabel,children:t})}),(0,f.jsx)(fs,{size:`mini`,styleType:z.Default,children:K(n)})]},e))})]})}var hs={flip:`flip_bL-UK`,"flip-clickable":`flip-clickable_YcfaN`,flipClickable:`flip-clickable_YcfaN`,"flip-perspective":`flip-perspective_i9Km7`,flipPerspective:`flip-perspective_i9Km7`,"flip-surface":`flip-surface_wu3Rt`,flipSurface:`flip-surface_wu3Rt`,"flip-front":`flip-front_2kwDN`,flipFront:`flip-front_2kwDN`,"flip-back":`flip-back_4eqrK`,flipBack:`flip-back_4eqrK`};function gs(){return typeof process<`u`&&!1}function _s(){return typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}function vs(e){let{ref:t,front:n,back:r,flipped:i,defaultFlipped:a=!1,flipOnClick:o=!1,flipAxis:s=`y`,reverse:u=!1,flipDuration:d=600,perspective:p=800,disabled:m=!1,onFlip:h,onFlipEnd:g,className:_,style:v,classNames:y,styles:b,...x}=D(`Flip`,e),S=i!==void 0,[C,w]=(0,c.useState)(a),T=S?i:C;function E(e){S||w(e),h?.(e)}let O=()=>{o&&!m&&E(!T)},k=e=>{o&&!m&&j(e)&&(e.preventDefault(),E(!T))},A=(0,c.useRef)(!1);(0,c.useEffect)(()=>{if(!A.current){A.current=!0;return}_s()&&g?.(T)},[T]);let M=e=>{e.target===e.currentTarget&&e.propertyName===`transform`&&g?.(T)};(0,c.useImperativeHandle)(t,()=>({flip(){if(S){gs()&&console.warn("Flip: flip() called on a controlled instance, update the `flipped` prop instead.");return}E(!T)},setFlipped(e){if(S){gs()&&console.warn("Flip: setFlipped() called on a controlled instance, update the `flipped` prop instead.");return}E(e)},reset(){S||w(!1)}}));let N=u?-180:180,P=s===`x`&&T?N:0,F=s===`y`&&T?N:0,I=s===`x`?N:0,L=s===`y`?N:0;return(0,f.jsx)(`div`,{...x,className:(0,l.default)(hs.flip,o&&hs.flipClickable,_,y?.root),style:{...v,...b?.root},onClick:O,onKeyDown:o?k:void 0,role:o?`button`:void 0,tabIndex:o?0:void 0,"aria-pressed":o?T:void 0,children:(0,f.jsx)(`div`,{className:(0,l.default)(hs.flipPerspective,y?.perspective),style:{perspective:p===`none`?`none`:`${p}px`,...b?.perspective},children:(0,f.jsxs)(`div`,{className:(0,l.default)(hs.flipSurface,y?.surface),style:{transform:`rotateX(${P}deg) rotateY(${F}deg)`,"--flip-duration":`${d}ms`,...b?.surface},"data-flipped":T,onTransitionEnd:M,children:[(0,f.jsx)(`div`,{className:(0,l.default)(hs.flipFront,y?.front),style:b?.front,children:n}),(0,f.jsx)(`div`,{className:(0,l.default)(hs.flipBack,y?.back),style:{transform:`rotateX(${I}deg) rotateY(${L}deg)`,...b?.back},children:r})]})})})}var ys=function(e){return e.Metric=`metric`,e.Imperial=`imperial`,e}({}),bs=function(e){return e.Exterior=`exterior`,e.Interior=`interior`,e.Partition=`partition`,e.Virtual=`virtual`,e}({}),xs=function(e){return e.Door=`door`,e.Window=`window`,e.Archway=`archway`,e.Gap=`gap`,e}({}),Ss=function(e){return e.None=`none`,e.StartLeft=`startLeft`,e.StartRight=`startRight`,e.EndLeft=`endLeft`,e.EndRight=`endRight`,e.Double=`double`,e.Sliding=`sliding`,e}({}),Cs=function(e){return e.ZeroLengthWall=`zeroLengthWall`,e.SelfLoopWall=`selfLoopWall`,e.DuplicateWall=`duplicateWall`,e.CoincidentNodes=`coincidentNodes`,e.UnsplitCrossing=`unsplitCrossing`,e.UnsplitNodeOnWall=`unsplitNodeOnWall`,e.OverlappingWalls=`overlappingWalls`,e.OrphanNode=`orphanNode`,e.DanglingOpening=`danglingOpening`,e.UnmatchedRoom=`unmatchedRoom`,e.OpeningDropped=`openingDropped`,e}({}),ws=10,Ts=100;function Es(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}function Ds(e,t,n){return(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x)}function Os(e,t,n){let r=n.x-t.x,i=n.y-t.y,a=r*r+i*i;if(a===0)return{dist:Es(e,t),t:0,point:{x:t.x,y:t.y}};let o=((e.x-t.x)*r+(e.y-t.y)*i)/a,s=o<0?0:o>1?1:o,c={x:t.x+s*r,y:t.y+s*i};return{dist:Es(e,c),t:s,point:c}}function ks(e,t,n){return Os(e,t,n).point}function As(e,t,n,r,i=1){let a=Es(e,t),o=Es(n,r);if(a<1e-9||o<1e-9)return{kind:`none`};let s=t.x-e.x,c=t.y-e.y,l=r.x-n.x,u=r.y-n.y,d=s*u-c*l,f=Math.abs(Ds(e,t,n))/a,p=Math.abs(Ds(e,t,r))/a;if(Math.abs(d)<1e-12||f<i&&p<i){if(f>=i||p>=i)return{kind:`none`};let t=s*s+c*c,o=((n.x-e.x)*s+(n.y-e.y)*c)/t,l=((r.x-e.x)*s+(r.y-e.y)*c)/t,u=Math.min(o,l),d=Math.max(o,l),m=i/a;return d<m||u>1-m||Math.min(d,1)-Math.max(u,0)<m?{kind:`collinearDisjoint`}:{kind:`collinearOverlap`}}let m=((n.x-e.x)*u-(n.y-e.y)*l)/d,h=((n.x-e.x)*c-(n.y-e.y)*s)/d,g=i/a,_=i/o;if(m<-g||m>1+g||h<-_||h>1+_)return{kind:`none`};let v={x:e.x+m*s,y:e.y+m*c},y=m<=g||m>=1-g,b=h<=_||h>=1-_;return y||b?{kind:`touch`,t:m,s:h,point:v}:{kind:`proper`,t:m,s:h,point:v}}function js(e){let t=e.length;if(t<3)return 0;let n=0;for(let r=0,i=t-1;r<t;i=r++)n+=e[i].x*e[r].y-e[r].x*e[i].y;return n/2}function Ms(e){let t=e.length;if(t<2)return 0;let n=0;for(let r=0,i=t-1;r<t;i=r++)n+=Es(e[i],e[r]);return n}function Ns(e){let t=e.length;if(t===0)return{x:0,y:0};if(t<3)return{x:e.reduce((e,t)=>e+t.x,0)/t,y:e.reduce((e,t)=>e+t.y,0)/t};let n=0,r=0,i=0;for(let a=0,o=t-1;a<t;o=a++){let t=e[o].x*e[a].y-e[a].x*e[o].y;n+=t,r+=(e[o].x+e[a].x)*t,i+=(e[o].y+e[a].y)*t}return Math.abs(n)<1e-9?{x:e.reduce((e,t)=>e+t.x,0)/t,y:e.reduce((e,t)=>e+t.y,0)/t}:{x:r/(3*n),y:i/(3*n)}}function Ps(e,t){let n=!1;for(let r=0,i=t.length-1;r<t.length;i=r++){let a=t[r].x,o=t[r].y,s=t[i].x,c=t[i].y;o>e.y!=c>e.y&&e.x<(s-a)*(e.y-o)/(c-o)+a&&(n=!n)}return n}function Fs(e,t,n=[]){if(!Ps(e,t))return!1;for(let t of n)if(Ps(e,t))return!1;return!0}function Is(e,t=[]){if(e.length===0)return{x:0,y:0};let n=Ns(e);if(Fs(n,e,t))return n;let r=1/0,i=-1/0;for(let t of e)t.y<r&&(r=t.y),t.y>i&&(i=t.y);if(!Number.isFinite(r)||i-r<1e-9)return n;let a=[e,...t],o=null;for(let e=1;e<=7;e++){let t=r+(i-r)*e/8,n=[];for(let e of a)for(let r=0,i=e.length-1;r<e.length;i=r++){let a=e[i],o=e[r];a.y>t!=o.y>t&&n.push(a.x+(t-a.y)*(o.x-a.x)/(o.y-a.y))}n.sort((e,t)=>e-t);for(let e=0;e+1<n.length;e+=2){let r=n[e+1]-n[e];r>2&&(!o||r>o.width)&&(o={point:{x:(n[e]+n[e+1])/2,y:t},width:r})}}return o?o.point:n}function Ls(e){let t=e.slice(),n=!0;for(;n&&t.length>3;){n=!1;let e=[],r=t.length;for(let i=0;i<r;i++){let a=t[(i-1+r)%r],o=t[(i+1)%r];if(Es(a,o)<1){n=!0;continue}e.push(t[i])}n&&(t=e.filter((t,n)=>Es(t,e[(n+1)%e.length])>=1))}return t}function Rs(e){if(e.length===0)return null;let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e)a.x<t&&(t=a.x),a.y<n&&(n=a.y),a.x>r&&(r=a.x),a.y>i&&(i=a.y);return{minX:t,minY:n,maxX:r,maxY:i}}var zs=0;function Bs(e){return zs+=1,`${e}_${typeof crypto<`u`&&typeof crypto.randomUUID==`function`?crypto.randomUUID().slice(0,8):Math.random().toString(36).slice(2,10)}${zs.toString(36)}`}function Vs(e){return{...e,nodes:{...e.nodes},walls:{...e.walls},openings:{...e.openings},rooms:{...e.rooms}}}function Hs(e,t,n={}){return{kind:e,message:t,...n}}function Us(e,t){let n=e.nodes[t.a],r=e.nodes[t.b];return!n||!r?0:Es(n,r)}function Ws(e,t){return Object.values(e.walls).filter(e=>e.a===t||e.b===t)}function Gs(e,t,n){for(let r of Object.values(e.walls))if(r.a===t&&r.b===n||r.a===n&&r.b===t)return r;return null}var Ks=250;function qs(e,t){return`${Math.round(e/Ks)}|${Math.round(t/Ks)}`}function Js(e){let t=new Map;for(let n of Object.values(e.nodes)){let e=qs(n.x,n.y),r=t.get(e);r?r.push(n):t.set(e,[n])}return t}function Ys(e,t,n){let r=Js(e),i=Math.round(t.x/Ks),a=Math.round(t.y/Ks),o=null,s=n,c=Math.max(1,Math.ceil(n/Ks));for(let e=-c;e<=c;e++)for(let n=-c;n<=c;n++)for(let c of r.get(`${i+e}|${a+n}`)??[]){let e=Es(t,c);e<=s&&(o=c,s=e)}return o}function Xs(e,t,n,r){let i=null;for(let a of Object.values(e.walls)){if(r?.has(a.id))continue;let o=e.nodes[a.a],s=e.nodes[a.b];if(!o||!s)continue;let c=Os(t,o,s);c.dist<=n&&(!i||c.dist<i.dist)&&(i={wall:a,t:c.t,point:c.point,dist:c.dist})}return i}function Zs(e,t,n){let r=e.walls[t];if(!r)return{floor:e,result:{nodeId:``,wallIds:null,droppedOpeningIds:[]},issues:[]};let i=e.nodes[r.a],a=e.nodes[r.b];if(!i||!a)return{floor:e,result:{nodeId:``,wallIds:null,droppedOpeningIds:[]},issues:[]};let o=Es(i,a),s=ks(typeof n==`number`?{x:i.x+(a.x-i.x)*n,y:i.y+(a.y-i.y)*n}:n,i,a),c=Es(i,s);if(c<10)return{floor:e,result:{nodeId:r.a,wallIds:null,droppedOpeningIds:[]},issues:[]};if(o-c<10)return{floor:e,result:{nodeId:r.b,wallIds:null,droppedOpeningIds:[]},issues:[]};let l=Vs(e),u=Bs(`n`);l.nodes[u]={id:u,x:s.x,y:s.y};let d=Bs(`w`),f=Bs(`w`),p={thickness:r.thickness,type:r.type,height:r.height,baseHeight:r.baseHeight};l.walls[d]={...p,id:d,a:r.a,b:u},l.walls[f]={...p,id:f,a:u,b:r.b},delete l.walls[t];let m=[],h=[];for(let n of Object.values(e.openings)){if(n.wallId!==t)continue;let e=n.offset<=c,r=e?d:f,i=e?c:o-c,a=e?n.offset:n.offset-c,s=Math.min(n.width,i-2,a*2,(i-a)*2);if(s<100){delete l.openings[n.id],m.push(n.id),h.push(Hs(Cs.OpeningDropped,`An opening was removed: the wall it sat on became too short for it.`,{openingIds:[n.id],wallIds:[t]}));continue}l.openings[n.id]={...n,wallId:r,offset:a,width:s}}return{floor:l,result:{nodeId:u,wallIds:[d,f],droppedOpeningIds:m},issues:h}}function Qs(e,t,n){let r=Ys(e,t,n);if(r)return{floor:e,result:{nodeId:r.id,createdNode:!1,splitWallId:null},issues:[]};let i=Xs(e,t,n);if(i){let t=Zs(e,i.wall.id,i.point);if(t.result.nodeId)return{floor:t.floor,result:{nodeId:t.result.nodeId,createdNode:t.result.wallIds!==null,splitWallId:t.result.wallIds?i.wall.id:null},issues:t.issues}}let a=Vs(e),o=Bs(`n`);return a.nodes[o]={id:o,x:t.x,y:t.y},{floor:a,result:{nodeId:o,createdNode:!0,splitWallId:null},issues:[]}}var $s={thickness:200,type:bs.Interior};function ec(e,t,n,r=$s,i=1){let a=[];if(Es(t,n)<10)return{floor:e,result:{wallIds:[],nodeIds:[]},issues:a};let o=Qs(e,t,i),s=o.floor;a.push(...o.issues);let c=Qs(s,n,i);s=c.floor,a.push(...c.issues);let l=o.result.nodeId,u=c.result.nodeId;if(l===u)return{floor:e,result:{wallIds:[],nodeIds:[]},issues:a};let d=s.nodes[l],f=s.nodes[u],p=Es(d,f);if(p<10)return{floor:e,result:{wallIds:[],nodeIds:[]},issues:a};let m=[{t:0,nodeId:l},{t:1,nodeId:u}],h=new Map,g=[],_=e=>Os(e,d,f).t;for(let e of Object.values(s.walls)){let t=s.nodes[e.a],n=s.nodes[e.b];if(!t||!n)continue;let r=As(d,f,t,n,i);if(r.kind===`collinearOverlap`){let e=_(t),r=_(n);g.push([Math.min(e,r),Math.max(e,r)]);for(let[i,a]of[[t,e],[n,r]])a*p>10&&(1-a)*p>10&&m.push({t:a,nodeId:i.id});continue}if(r.kind===`proper`&&r.t!==void 0&&r.s!==void 0){let t=h.get(e.id);t?t.push(r.s):h.set(e.id,[r.s]),m.push({t:r.t,nodeId:null,pending:{wallId:e.id,s:r.s}});continue}if(r.kind===`touch`&&r.t!==void 0&&r.s!==void 0){let e=r.s<=.5?t:n,a=_(e);Os(e,d,f).dist<=i&&a*p>10&&(1-a)*p>10&&m.push({t:a,nodeId:e.id})}}for(let e of Object.values(s.nodes)){if(e.id===l||e.id===u)continue;let t=Os(e,d,f);t.dist>i||t.t*p<=10||(1-t.t)*p<=10||m.push({t:t.t,nodeId:e.id})}for(let[t,n]of h){let r=[...n].sort((e,t)=>t-e),i=t,o=new Set(r);for(let n of r){let r=s.walls[i];if(!r)break;let c=s.nodes[r.a],l=s.nodes[r.b];if(!c||!l)break;let u=e.walls[t],d=s.nodes[u?.a??r.a]??c,f=s.nodes[u?.b??r.b]??l,p={x:d.x+(f.x-d.x)*n,y:d.y+(f.y-d.y)*n},h=Zs(s,i,p);s=h.floor,a.push(...h.issues),o.delete(n);for(let e of m)e.pending&&e.pending.wallId===t&&e.pending.s===n&&(e.nodeId=h.result.nodeId,e.pending=void 0);if(h.result.wallIds){let[e,t]=h.result.wallIds,r=Math.max(...o,-1);i=r>=0&&r>n?t:e}}}let v=m.filter(e=>!!e.nodeId);v.sort((e,t)=>e.t-t.t);let y=[];for(let e of v){let t=y[y.length-1];if(!t){y.push(e);continue}if(t.nodeId!==e.nodeId){if((e.t-t.t)*p<10){e.t>=1-1e-9&&(y[y.length-1]=e);continue}y.push(e)}}let b=[];for(let e=0;e+1<y.length;e++){let t=y[e],n=y[e+1],i=(t.t+n.t)/2;if(g.some(([e,t])=>i>e+1e-9&&i<t-1e-9)||Gs(s,t.nodeId,n.nodeId))continue;let a=s.nodes[t.nodeId],o=s.nodes[n.nodeId];if(!a||!o||Es(a,o)<10)continue;let c=Bs(`w`);s={...s,walls:{...s.walls,[c]:{...r,id:c,a:t.nodeId,b:n.nodeId}}},b.push(c)}return b.length===0&&g.length>0&&a.push(Hs(Cs.DuplicateWall,`A wall already covers that span, so nothing was added.`)),{floor:s,result:{wallIds:b,nodeIds:y.map(e=>e.nodeId)},issues:a}}function tc(e,t,n,r=$s,i=1){let a=Math.min(t.x,n.x),o=Math.max(t.x,n.x),s=Math.min(t.y,n.y),c=Math.max(t.y,n.y);if(o-a<10||c-s<10)return{floor:e,result:{wallIds:[]},issues:[]};let l=[{x:a,y:s},{x:o,y:s},{x:o,y:c},{x:a,y:c}],u=e,d=[],f=[];for(let e=0;e<4;e++){let t=ec(u,l[e],l[(e+1)%4],r,i);u=t.floor,d.push(...t.result.wallIds),f.push(...t.issues)}return{floor:u,result:{wallIds:d},issues:f}}function nc(e,t,n){if(t===n||!e.nodes[t]||!e.nodes[n])return{floor:e,result:{removedWallIds:[]},issues:[]};let r=Vs(e),i=[],a=[];for(let e of Object.values(r.walls))e.a===n&&(r.walls[e.id]={...r.walls[e.id],a:t}),e.b===n&&(r.walls[e.id]={...r.walls[e.id],b:t});for(let e of Object.values(r.walls))if(e.a===e.b){delete r.walls[e.id],i.push(e.id);for(let t of Object.values(r.openings))t.wallId===e.id&&delete r.openings[t.id]}let o=new Map;for(let e of Object.values(r.walls)){let t=e.a<e.b?`${e.a}|${e.b}`:`${e.b}|${e.a}`,n=o.get(t);if(!n){o.set(t,e);continue}let s=e.thickness>=n.thickness?e:n,c=s===e?n:e;for(let e of Object.values(r.openings))e.wallId===c.id&&(r.openings[e.id]={...e,wallId:s.id});delete r.walls[c.id],i.push(c.id),o.set(t,s),a.push(Hs(Cs.DuplicateWall,`Two walls became the same wall and were merged.`,{wallIds:[s.id,c.id]}))}return delete r.nodes[n],{floor:r,result:{removedWallIds:i},issues:a}}function rc(e,t,n={}){let{force:r=!1}=n,i=e.nodes[t];if(!i)return{floor:e,result:null,issues:[]};let a=Ws(e,t);if(a.length!==2)return{floor:e,result:null,issues:[]};let[o,s]=a,c=o.thickness===s.thickness&&o.type===s.type&&o.height===s.height&&o.baseHeight===s.baseHeight;if(!c&&!r)return{floor:e,result:null,issues:[]};let l=o.a===t?o.b:o.a,u=s.a===t?s.b:s.a;if(l===u)return{floor:e,result:null,issues:[]};let d=e.nodes[l],f=e.nodes[u];if(!d||!f)return{floor:e,result:null,issues:[]};let p=Es(d,f);if(p<10||!r&&Math.abs(Ds(d,f,i))/p>Math.max(1,p*1e-4))return{floor:e,result:null,issues:[]};let m=!c&&o.thickness<s.thickness?s:o,h=Vs(e),g=Bs(`w`);h.walls[g]={id:g,a:l,b:u,thickness:m.thickness,type:m.type,height:m.height,baseHeight:m.baseHeight};let _=Es(d,i),v=Es(i,f),y=_+v>0?p/(_+v):1,b=[];for(let n of Object.values(e.openings)){if(n.wallId!==o.id&&n.wallId!==s.id)continue;let r=n.wallId===o.id,i=r?o:s,a=i.a===t,c=Us(e,i),l=a?n.offset:c-n.offset,u=(r?_-l:_+l)*y,d=Math.min(n.width*y,p-2);if(d<100){b.push(Hs(Cs.OpeningDropped,`An opening was removed: the wall it sat on became too short for it.`,{openingIds:[n.id],wallIds:[i.id]})),delete h.openings[n.id];continue}h.openings[n.id]={...n,wallId:g,width:d,offset:Math.min(Math.max(u,d/2),p-d/2)}}return delete h.walls[o.id],delete h.walls[s.id],delete h.nodes[t],{floor:h,result:{wallId:g},issues:b}}function ic(e,t,n){let r=e.walls[t];if(!r||r.a===r.b||Math.hypot(n.x,n.y)<10)return{floor:e,result:null,issues:[]};let i=[r.a,r.b],a=[r.a,r.b],o=[null,null],s=[],c=[],l=e;i.forEach((i,s)=>{let c=e.nodes[i];if(!c)return;let u={x:c.x+n.x,y:c.y+n.y},d=Ws(e,i).filter(e=>e.id!==t);if(d.length===0){let e=Vs(l);e.nodes[i]={...e.nodes[i],x:u.x,y:u.y},l=e;return}let f=Qs(l,u,1);l=f.floor,a[s]=f.result.nodeId,o[s]=d.length===1?d[0]:r});let u=Vs(l);u.walls[t]={...u.walls[t],a:a[0],b:a[1]},l=u,i.forEach((e,t)=>{let n=o[t],r=l.nodes[e],i=l.nodes[a[t]];if(!n||!r||!i)return;let u=ec(l,r,i,{thickness:n.thickness,type:n.type,height:n.height,baseHeight:n.baseHeight});l=u.floor,s.push(...u.result.wallIds),c.push(...u.issues)});let d=[];return i.forEach((e,t)=>{if(a[t]===e)return;let n=rc(l,e);n.result&&(l=n.floor,d.push(e),c.push(...n.issues))}),{floor:l,result:{nodeIds:a,connectorIds:s,dissolvedNodeIds:d},issues:c}}function ac(e,t=10){let n=e,r=[],i=[];for(let a=Object.keys(e.walls).length;a>0;a--){let e=Object.values(n.walls).find(e=>{if(e.a===e.b)return!1;let r=n.nodes[e.a],i=n.nodes[e.b];return r&&i&&Es(r,i)<t});if(!e)break;let a=Ws(n,e.b).length>Ws(n,e.a).length?e.b:e.a,o=nc(n,a,a===e.a?e.b:e.a);if(o.floor===n)break;n=o.floor,r.push(e.id),i.push(...o.issues)}return{floor:n,result:{weldedWallIds:r},issues:i}}function oc(e,t,n={}){let{pruneOrphanNodes:r=!0,dissolveCollinear:i=!0}=n,a=e.walls[t];if(!a)return{floor:e,result:{removedNodeIds:[],dissolvedWallIds:[]},issues:[]};let o=Vs(e);delete o.walls[t];for(let e of Object.values(o.openings))e.wallId===t&&delete o.openings[e.id];let s=[],c=[],l=[];for(let e of[a.a,a.b]){let t=Ws(o,e).length;if(t===0&&r)delete o.nodes[e],s.push(e);else if(t===2&&i){let t=rc(o,e);t.result&&(o=t.floor,c.push(t.result.wallId),s.push(e),l.push(...t.issues))}}return{floor:o,result:{removedNodeIds:s,dissolvedWallIds:c},issues:l}}function sc(e,t,n){let r=e.nodes[t];if(!r)return{floor:e,result:void 0,issues:[]};let i=Vs(e);return i.nodes[t]={...r,x:n.x,y:n.y},{floor:i,result:void 0,issues:[]}}function cc(e,t,n){let r=Vs(e);for(let i of Object.values(e.nodes))r.nodes[i.id]={...i,x:i.x+t,y:i.y+n};for(let i of Object.values(e.rooms))r.rooms[i.id]={...i,anchor:{x:i.anchor.x+t,y:i.anchor.y+n}};return r}function lc(e,t){let n=Vs(e);for(let r of Object.values(e.nodes))n.nodes[r.id]={...r,x:r.x*t,y:r.y*t};for(let r of Object.values(e.walls))n.walls[r.id]={...r,thickness:r.thickness*t,height:r.height===void 0?void 0:r.height*t,baseHeight:r.baseHeight===void 0?void 0:r.baseHeight*t};for(let r of Object.values(e.openings))n.openings[r.id]={...r,offset:r.offset*t,width:r.width*t,sill:r.sill*t,head:r.head*t};for(let r of Object.values(e.rooms))n.rooms[r.id]={...r,anchor:{x:r.anchor.x*t,y:r.anchor.y*t},area:r.area*t*t};return n}function uc(e,t){let n=e.walls[t.wallId];if(!n)return{floor:e,result:{openingId:null},issues:[]};let r=Us(e,n),i=Math.min(t.width,r-2);if(i<100)return{floor:e,result:{openingId:null},issues:[Hs(Cs.OpeningDropped,`That wall is too short for an opening.`,{wallIds:[n.id]})]};let a=Math.min(Math.max(t.offset,i/2),r-i/2),o=Vs(e),s=Bs(`o`);return o.openings[s]={...t,id:s,offset:a,width:i},{floor:o,result:{openingId:s},issues:[]}}function dc(e,t,n){let r=e.openings[t];if(!r)return{floor:e,result:void 0,issues:[]};let i=e.walls[r.wallId];if(!i)return{floor:e,result:void 0,issues:[]};let a=Us(e,i),o={...r,...n},s=Math.min(Math.max(o.width,100),Math.max(a-2,100)),c=Math.min(Math.max(o.offset,s/2),Math.max(a-s/2,s/2)),l=Vs(e);return l.openings[t]={...o,width:s,offset:c},{floor:l,result:void 0,issues:[]}}function fc(e,t){if(!e.openings[t])return{floor:e,result:void 0,issues:[]};let n=Vs(e);return delete n.openings[t],{floor:n,result:void 0,issues:[]}}function pc(e){let t=[],n=Object.values(e.walls);for(let r of n){let n=e.nodes[r.a],i=e.nodes[r.b];if(r.a===r.b){t.push(Hs(Cs.SelfLoopWall,`A wall starts and ends at the same node.`,{wallIds:[r.id]}));continue}if(!n||!i){t.push(Hs(Cs.ZeroLengthWall,`A wall references a missing node.`,{wallIds:[r.id]}));continue}Es(n,i)<10&&t.push(Hs(Cs.ZeroLengthWall,`A wall is shorter than the minimum length.`,{wallIds:[r.id]}))}let r=new Map;for(let e of n){let n=e.a<e.b?`${e.a}|${e.b}`:`${e.b}|${e.a}`,i=r.get(n);i?t.push(Hs(Cs.DuplicateWall,`Two walls connect the same pair of nodes.`,{wallIds:[i,e.id]})):r.set(n,e.id)}let i=Object.values(e.nodes);for(let e=0;e<i.length;e++)for(let n=e+1;n<i.length;n++)Es(i[e],i[n])<1&&t.push(Hs(Cs.CoincidentNodes,`Two nodes occupy the same position.`,{nodeIds:[i[e].id,i[n].id]}));for(let r=0;r<n.length;r++)for(let i=r+1;i<n.length;i++){let a=n[r],o=n[i],s=e.nodes[a.a],c=e.nodes[a.b],l=e.nodes[o.a],u=e.nodes[o.b];if(!s||!c||!l||!u)continue;let d=As(s,c,l,u);d.kind===`proper`?t.push(Hs(Cs.UnsplitCrossing,`Two walls cross with no node at the intersection.`,{wallIds:[a.id,o.id]})):d.kind===`collinearOverlap`&&t.push(Hs(Cs.OverlappingWalls,`Two walls overlap along the same line.`,{wallIds:[a.id,o.id]}))}for(let r of n){let n=e.nodes[r.a],a=e.nodes[r.b];if(n&&a)for(let e of i){if(e.id===r.a||e.id===r.b)continue;let i=Os(e,n,a);i.dist<1&&i.t>0&&i.t<1&&t.push(Hs(Cs.UnsplitNodeOnWall,`A node sits on a wall that was never split there.`,{wallIds:[r.id],nodeIds:[e.id]}))}}for(let n of Object.values(e.openings))e.walls[n.wallId]||t.push(Hs(Cs.DanglingOpening,`An opening references a wall that no longer exists.`,{openingIds:[n.id]}));let a=new Set;for(let e of n)a.add(e.a),a.add(e.b);for(let e of i)a.has(e.id)||t.push(Hs(Cs.OrphanNode,`A node has no walls.`,{nodeIds:[e.id]}));return t}function mc(e){let t=[],n=ac(e),r=Vs(n.floor);for(let e of n.result.weldedWallIds)t.push(Hs(Cs.ZeroLengthWall,`Welded the two ends of a wall with no length.`,{wallIds:[e]}));for(let e of Object.values(r.walls)){let n=r.nodes[e.a],i=r.nodes[e.b];(e.a===e.b||!n||!i||Es(n,i)<10)&&(delete r.walls[e.id],t.push(Hs(Cs.ZeroLengthWall,`Removed a degenerate wall.`,{wallIds:[e.id]})))}let i=new Map;for(let e of Object.values(r.walls)){let n=e.a<e.b?`${e.a}|${e.b}`:`${e.b}|${e.a}`,a=i.get(n);if(!a){i.set(n,e);continue}let o=e.thickness>=a.thickness?e:a,s=o===e?a:e;for(let e of Object.values(r.openings))e.wallId===s.id&&(r.openings[e.id]={...e,wallId:o.id});delete r.walls[s.id],i.set(n,o),t.push(Hs(Cs.DuplicateWall,`Removed a duplicate wall.`,{wallIds:[s.id]}))}for(let e of Object.values(r.openings))r.walls[e.wallId]||(delete r.openings[e.id],t.push(Hs(Cs.DanglingOpening,`Removed an opening with no wall.`,{openingIds:[e.id]})));let a=new Set;for(let e of Object.values(r.walls))a.add(e.a),a.add(e.b);for(let e of Object.values(r.nodes))a.has(e.id)||(delete r.nodes[e.id],t.push(Hs(Cs.OrphanNode,`Removed a node with no walls.`,{nodeIds:[e.id]})));return{floor:r,result:t,issues:t}}function hc(e={}){return{id:e.floorId??Bs(`f`),label:e.floorLabel??`Ground floor`,elevation:0,height:e.height??2500,nodes:{},walls:{},openings:{},rooms:{}}}function gc(e={}){return{id:e.id??Bs(`plan`),name:e.name,version:1,unitSystem:e.unitSystem??ys.Metric,floors:[hc(e)],revision:0}}function _c(e,t){return t?e.floors.find(e=>e.id===t)??null:e.floors[0]??null}function vc(e,t,n){let r=_c(e,t);if(!r)return{plan:e,floor:hc(),result:void 0,issues:[]};let i=n(r);return i.floor===r?{...i,plan:e}:{...i,plan:{...e,floors:e.floors.map(e=>e.id===r.id?i.floor:e),revision:e.revision+1}}}function yc(e,t){let n=e.floors.some(e=>e.id===t.id);return{...e,floors:n?e.floors.map(e=>e.id===t.id?t:e):[...e.floors,t],revision:e.revision+1}}function bc(e,t){return e.floors.findIndex(e=>e.id===t)}function xc(e,t){let n=bc(e,t);return n>0?e.floors[n-1]:null}function Sc(e,t={}){let n=e.floors[0]?.elevation??0,r=Math.max(0,Math.min(t.index??e.floors.length,e.floors.length)),i=e.floors[r-1],a={...hc({height:t.height??i?.height??2500}),id:t.id??Bs(`f`),label:t.label??Ac(e),elevation:i?i.elevation+i.height:0},o=[...e.floors.slice(0,r),a,...e.floors.slice(r)];return{plan:{...e,floors:kc(o,n),revision:e.revision+1},floor:a}}function Cc(e,t){if(e.floors.length<=1)return e;let n=e.floors[0].elevation,r=e.floors.filter(e=>e.id!==t);return r.length===e.floors.length?e:{...e,floors:kc(r,n),revision:e.revision+1}}function wc(e,t,n={}){let r=_c(e,t);if(!r)return{plan:e,floor:null};let i=new Map(Object.keys(r.nodes).map(e=>[e,Bs(`n`)])),a=new Map(Object.keys(r.walls).map(e=>[e,Bs(`w`)])),o={...r,id:Bs(`f`),label:n.label??`${r.label} copy`,nodes:{},walls:{},openings:{},rooms:{}};for(let e of Object.values(r.nodes)){let t=i.get(e.id);o.nodes[t]={...e,id:t}}for(let e of Object.values(r.walls)){let t=a.get(e.id);o.walls[t]={...e,id:t,a:i.get(e.a),b:i.get(e.b)}}for(let e of Object.values(r.openings)){let t=a.get(e.wallId);if(!t)continue;let n=Bs(`o`);o.openings[n]={...e,id:n,wallId:t}}for(let e of Object.values(r.rooms)){let t=Bs(`r`);o.rooms[t]={...e,id:t,anchor:{...e.anchor},wallIds:e.wallIds.map(e=>a.get(e)).filter(e=>!!e)}}let s=e.floors[0].elevation,c=bc(e,t)+1,l=[...e.floors.slice(0,c),o,...e.floors.slice(c)];return{plan:{...e,floors:kc(l,s),revision:e.revision+1},floor:o}}var Tc=500;function Ec(e,t,n){let r=_c(e,t),i=Math.max(500,Math.round(n));if(!r||r.height===i)return e;let a=e.floors[0].elevation,o=e.floors.map(e=>e.id===r.id?{...e,height:i}:e);return{...e,floors:kc(o,a),revision:e.revision+1}}function Dc(e,t,n){let r=_c(e,t);return!r||r.label===n?e:yc(e,{...r,label:n})}function Oc(e,t,n){let r=bc(e,t),i=Math.max(0,Math.min(n,e.floors.length-1));if(r<0||r===i)return e;let a=e.floors[0].elevation,o=[...e.floors],[s]=o.splice(r,1);return o.splice(i,0,s),{...e,floors:kc(o,a),revision:e.revision+1}}function kc(e,t){let n=t;return e.map(e=>{let t=e.elevation===n?e:{...e,elevation:n};return n+=e.height,t})}function Ac(e){let t=new Set(e.floors.map(e=>e.label));for(let n=e.floors.length+1;;n++){let e=`Floor ${n}`;if(!t.has(e))return e}}function jc(e){let t=Rs(Object.values(e.nodes).map(e=>({x:e.x,y:e.y})));if(!t)return null;let n=0;for(let t of Object.values(e.walls))t.thickness>n&&(n=t.thickness);let r=n/2,i=t.minX-r,a=t.minY-r,o=t.maxX+r,s=t.maxY+r;return{minX:i,minY:a,maxX:o,maxY:s,width:o-i,height:s-a}}function Mc(e){return Object.values(e.walls).filter(t=>{if(t.a===t.b)return!1;let n=e.nodes[t.a],r=e.nodes[t.b];return!n||!r?!1:Es(n,r)>=10})}function Nc(e){let t=Mc(e),n=Array(t.length*2);for(let e=0;e<t.length;e++){let r=t[e];n[2*e]={wallId:r.id,from:r.a,to:r.b},n[2*e+1]={wallId:r.id,from:r.b,to:r.a}}let r=t=>e.nodes[t],i=new Map;for(let e=0;e<n.length;e++){let t=i.get(n[e].from);t?t.push(e):i.set(n[e].from,[e])}let a=e=>{let t=r(n[e].from),i=r(n[e].to);return Math.atan2(i.y-t.y,i.x-t.x)};for(let e of i.values())e.sort((e,t)=>{let r=a(e),i=a(t);if(r!==i)return r-i;let o=n[e].wallId,s=n[t].wallId;return o===s?e-t:o<s?-1:1});let o=new Int32Array(n.length);for(let e of i.values())for(let t=0;t<e.length;t++)o[e[t]]=t;return{darts:n,outgoing:i,ringIndex:o,nodeOf:r}}function Pc(e,t){let n=e.outgoing.get(e.darts[t].to);return!n||n.length===0?t^1:n[(e.ringIndex[t^1]-1+n.length)%n.length]}function Fc(e){let t=new Uint8Array(e.darts.length),n=[];for(let r=0;r<e.darts.length;r++){if(t[r])continue;let i=[],a=r,o=0;do if(t[a]=1,i.push(a),a=Pc(e,a),++o>e.darts.length+1)break;while(a!==r&&!t[a]);n.push(i)}return n}function Ic(e){let t=new Map,n=e=>{let n=e;for(;t.get(n)!==n;)n=t.get(n)??n;let r=e;for(;t.get(r)!==n;){let e=t.get(r)??n;t.set(r,n),r=e}return n};for(let n of e.outgoing.keys())t.set(n,n);for(let r=0;r<e.darts.length;r+=2){let i=n(e.darts[r].from),a=n(e.darts[r].to);i!==a&&t.set(i,a)}let r=new Map;for(let t of e.outgoing.keys())r.set(t,n(t));return r}function Lc(e,t){return t.map(t=>{let n=e.nodeOf(e.darts[t].from);return{x:n.x,y:n.y}})}function Rc(e,t){let n=``;for(let r of t){let t=`${e.darts[r].wallId}>${e.darts[r].from}`;(n===``||t<n)&&(n=t)}return`f:${n}`}function zc(e){let t=Nc(e);if(t.darts.length===0)return[];let n=Ic(t),r=Fc(t),i=[],a=new Map;for(let e of r){let r=Lc(t,e),o=js(r),s=n.get(t.darts[e[0]].from)??``;o>100?i.push({face:{id:Rc(t,e),outer:r,holes:[],area:o,perimeter:Ms(r),wallIds:e.map(e=>t.darts[e].wallId),nodeIds:e.map(e=>t.darts[e].from)},component:s,outerArea:o}):o<-100&&a.set(s,r)}for(let[e,t]of a){let n=Math.abs(js(t));if(n<=100)continue;let r=Is(t),a=null;for(let t of i)t.component!==e&&(t.outerArea<=n||Ps(r,t.face.outer)&&(!a||t.outerArea<a.outerArea)&&(a=t));a&&a.face.holes.push(t)}for(let e of i){let t=e.outerArea;for(let n of e.face.holes)t-=Math.abs(js(n));e.face.area=t}return i.map(e=>e.face)}function Bc(e){let t=new Map;for(let n of Mc(e))t.set(n.a,(t.get(n.a)??0)+1),t.set(n.b,(t.get(n.b)??0)+1);return t}var Vc={boundary:2,anchor:1,area:.25};function Hc(e,t){if(e.size===0&&t.size===0)return 0;let n=0;for(let r of e)t.has(r)&&(n+=1);let r=e.size+t.size-n;return r===0?0:n/r}function Uc(e,t,n){let r=Hc(new Set(e.wallIds),n),i=+!!Fs(e.anchor,t.outer,t.holes),a=e.area>0&&t.area>0?Math.min(e.area,t.area)/Math.max(e.area,t.area):0;return Vc.boundary*r+Vc.anchor*i+Vc.area*a}function Wc(e){let t=zc(e),n=[],r=Object.values(e.rooms),i=t.map(e=>new Set(e.wallIds)),a=[];for(let e=0;e<r.length;e++)for(let n=0;n<t.length;n++){let o=Uc(r[e],t[n],i[n]);o>.15&&a.push({roomIndex:e,faceIndex:n,score:o})}a.sort((e,n)=>{if(n.score!==e.score)return n.score-e.score;let i=r[e.roomIndex].seq-r[n.roomIndex].seq;return i===0?t[e.faceIndex].id<t[n.faceIndex].id?-1:1:i});let o=Array(r.length).fill(!1),s=Array(t.length).fill(-1);for(let e of a)o[e.roomIndex]||s[e.faceIndex]===-1&&(o[e.roomIndex]=!0,s[e.faceIndex]=e.roomIndex);let c={...e.rooms},l=t.map((e,t)=>{let n=Is(e.outer,e.holes),i=s[t];if(i===-1)return{...e,roomId:null,meta:null,anchor:n};let a=r[i],o=a.anchorPinned?a.anchor:n,l={...a,anchor:o,wallIds:[...new Set(e.wallIds)],area:e.area};return c[a.id]=l,{...e,roomId:a.id,meta:l,anchor:o}});for(let e=0;e<r.length;e++)o[e]||n.push({kind:Cs.UnmatchedRoom,message:`"${r[e].name}" is not currently enclosed by any walls.`,roomIds:[r[e].id]});return{floor:{...e,rooms:c},rooms:l,issues:n}}var Gc=0;function Kc(e,t={}){let{rooms:n,floor:r}=Wc(e),i={...r.rooms},a=[],o=0,s=new Set(Object.values(i).map(e=>e.name));for(let e of n){if(e.roomId)continue;o+=1,Gc+=1;let n=t.nameFor?.(o,e);if(!n){let e=Object.keys(i).length+1;for(n=`Room ${e}`;s.has(n);)e+=1,n=`Room ${e}`}s.add(n);let r={id:Bs(`r`),name:n,anchor:e.anchor,anchorPinned:!1,seq:Gc,wallIds:[...new Set(e.wallIds)],area:e.area};i[r.id]=r,a.push(r)}return{floor:{...r,rooms:i},created:a}}function qc(e){let{rooms:t}=Wc(e),n=new Set(t.map(e=>e.roomId).filter(Boolean)),r={},i=[];for(let t of Object.values(e.rooms))n.has(t.id)?r[t.id]=t:i.push(t.id);return{floor:{...e,rooms:r},removed:i}}function Jc(e,t){let n=null;for(let r of e)Fs(t,r.outer,r.holes)&&(!n||r.area<n.area)&&(n=r);return n}var Yc=1e-6;function Xc(e,t,n){return{x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}}function Zc(e){return Number.isInteger(e)?String(e):e.toFixed(3).replace(/\.?0+$/,``)}function Qc(e,t){return Math.abs(e.x-t.x)<.001&&Math.abs(e.y-t.y)<.001}function $c(e,t){let n=e.nodes[t.a],r=e.nodes[t.b];if(!n||!r)return[];let i=Es(n,r);if(i<Yc)return[];let a=[];for(let n of Object.values(e.openings)){if(n.wallId!==t.id)continue;let e=n.width/2,r=Math.max(0,n.offset-e),o=Math.min(i,n.offset+e);o>r&&a.push([r,o])}if(a.length===0)return[[0,i]];a.sort((e,t)=>e[0]-t[0]);let o=[a[0]];for(let e=1;e<a.length;e++){let t=o[o.length-1];a[e][0]<=t[1]?t[1]=Math.max(t[1],a[e][1]):o.push(a[e])}let s=[],c=0;for(let[e,t]of o)e-c>Yc&&s.push([c,e]),c=t;return i-c>Yc&&s.push([c,i]),s}function el(e,t){let n=e.walls[t.wallId];if(!n)return null;let r=e.nodes[n.a],i=e.nodes[n.b];if(!r||!i)return null;let a=Es(r,i);if(a<Yc)return null;let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a},s={x:-o.y,y:o.x},c=Math.min(t.width/2,a/2),l=Math.min(Math.max(t.offset,c),a-c),u={x:r.x+o.x*l,y:r.y+o.y*l};return{centre:u,dir:o,normal:s,p1:{x:u.x-o.x*c,y:u.y-o.y*c},p2:{x:u.x+o.x*c,y:u.y+o.y*c}}}function tl(e,t,n){let r=new Map(t.map(e=>[e.id,e])),i=new Map;for(let e of t)for(let t of[e.a,e.b]){let n=i.get(t);n?n.push(e):i.set(t,[e])}let a=e=>{if((n.get(e)??0)!==2)return null;let t=i.get(e);return!t||t.length!==2?null:t},o=new Set,s=[],c=(e,t)=>e.a===t?e.b:e.a;for(let e of t){if(o.has(e.id))continue;let t=e,n=e.a,i=new Set([e.id]);for(;;){let e=a(n);if(!e)break;let r=e[0].id===t.id?e[1]:e[0];if(i.has(r.id))break;i.add(r.id),t=r,n=c(r,n)}let l=[],u=t,d=n;for(;!o.has(u.id);){o.add(u.id);let e=c(u,d);l.push({wall:u,from:d,to:e});let t=a(e);if(!t)break;let n=t[0].id===u.id?t[1]:t[0];if(o.has(n.id)||(u=n,d=e,!r.has(u.id)))break}l.length>0&&s.push(l)}return s}function nl(e,t,n){let r=new Map,i=(e,t)=>{let n=r.get(e);n?n.push(t):r.set(e,[t])};for(let n of t){let t=e.nodes[n.a],r=e.nodes[n.b],a=Es(t,r);if(a<Yc)continue;let o=$c(e,n);if(o.length===0)continue;let s={x:(r.x-t.x)/a,y:(r.y-t.y)/a},c=o[0],l=o[o.length-1];i(n.a,{wall:n,dir:s,angle:Math.atan2(s.y,s.x),reach:c[0]<Yc?c[1]:0}),i(n.b,{wall:n,dir:{x:-s.x,y:-s.y},angle:Math.atan2(-s.y,-s.x),reach:l[1]>a-Yc?a-l[0]:0})}let a=[],o=Math.PI*2;for(let[t,i]of r){if(i.length<2||(n.get(t)??0)===2&&i.length===2&&i[0].wall.thickness===i[1].wall.thickness)continue;i.sort((e,t)=>e.angle-t.angle);let r=0,s=-1;for(let e=0;e<i.length;e++){let t=i[(e+1)%i.length],n=e===i.length-1?t.angle+o-i[e].angle:t.angle-i[e].angle;n>s&&(s=n,r=e)}if(s<=Math.PI+Yc)continue;let c=i[r],l=i[(r+1)%i.length],u=Math.min(c.wall.thickness,l.wall.thickness),d=Math.min(u/2,c.reach),f=Math.min(u/2,l.reach);if(d<Yc||f<Yc)continue;let p=e.nodes[t];a.push({thickness:u,d:`M ${Zc(p.x+c.dir.x*d)},${Zc(p.y+c.dir.y*d)} L ${Zc(p.x)},${Zc(p.y)} L ${Zc(p.x+l.dir.x*f)},${Zc(p.y+l.dir.y*f)}`})}return a}function rl(e,t={}){let{wallIds:n,capFreeEnds:r=!0,capThicknessSteps:i=!0}=t,a=Object.values(e.walls).filter(t=>{if(n&&!n.has(t.id))return!1;let r=e.nodes[t.a],i=e.nodes[t.b];return r&&i&&Es(r,i)>Yc&&t.a!==t.b});if(a.length===0)return{groups:[],caps:[]};let o=Bc(e),s=[],c=new Map;for(let e of a){let t=c.get(e.thickness);t?t.push(e):c.set(e.thickness,[e])}let l=new Map,u=(e,t)=>{let n=l.get(e);n?n.push(t):l.set(e,[t])};for(let[t,n]of c)for(let r of tl(e,n,o)){let n=[],i=()=>{n.length>=2&&u(t,n.map((e,t)=>`${t===0?`M`:`L`} ${Zc(e.x)},${Zc(e.y)}`).join(` `)),n=[]};for(let t of r){let r=e.nodes[t.from],a=e.nodes[t.to],o=Es(r,a);if(o<Yc)continue;let s=$c(e,t.wall);t.from!==t.wall.a&&(s=s.map(([e,t])=>[o-t,o-e]).reverse());for(let[e,t]of s){let s=Xc(r,a,e/o),c=Xc(r,a,t/o);n.length>0&&Qc(n[n.length-1],s)?n.push(c):(i(),n=[s,c])}(s.length===0||s[s.length-1][1]<o-Yc)&&i()}let a=r[0],o=r[r.length-1];a.from===o.to&&n.length>=3&&Qc(n[0],n[n.length-1])?(u(t,`${n.slice(0,-1).map((e,t)=>`${t===0?`M`:`L`} ${Zc(e.x)},${Zc(e.y)}`).join(` `)} Z`),n=[]):i()}for(let t of nl(e,a,o))u(t.thickness,t.d);let d=(t,n,r)=>{let i=e.nodes[t.a],a=e.nodes[t.b],o=Es(i,a);if(o<Yc)return;let c={x:(a.x-i.x)/o,y:(a.y-i.y)/o},l={x:-c.y,y:c.x},u={x:i.x+c.x*n,y:i.y+c.y*n},d=t.thickness/2;s.push({a:{x:u.x-l.x*d,y:u.y-l.y*d},b:{x:u.x+l.x*d,y:u.y+l.y*d},reason:r,wallId:t.id})};for(let t of a){let n=e.nodes[t.a],i=e.nodes[t.b],a=Es(n,i);for(let[n,i]of $c(e,t))n>Yc?d(t,n,`jamb`):r&&(o.get(t.a)??0)===1&&d(t,0,`freeEnd`),i<a-Yc?d(t,i,`jamb`):r&&(o.get(t.b)??0)===1&&d(t,a,`freeEnd`)}if(i){let t=new Map;for(let e of a)for(let n of[e.a,e.b]){let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let[n,r]of t){if(r.length!==2)continue;let[t,i]=r;if(t.thickness===i.thickness)continue;let a=t.thickness>=i.thickness?t:i;d(a,a.a===n?0:Es(e.nodes[a.a],e.nodes[a.b]),`thicknessStep`)}}return{groups:[...l.entries()].sort((e,t)=>e[0]-t[0]).map(([e,t])=>({thickness:e,d:t.join(` `)})),caps:s}}var il={node:10,opening:9,wall:8},al={node:18,opening:16,wall:14};function ol(e,t){let n=t>0?t:1;return{node:e.node/n,opening:e.opening/n,wall:e.wall/n}}function sl(e,t,n,r,i={}){let a=e=>!i.accept||i.accept.includes(e),o=e=>i.excludeIds?.has(e)??!1;if(a(`node`)){let t=null;for(let i of Object.values(e.nodes)){if(o(i.id))continue;let e=Es(n,i);e<=r.node&&(!t||e<t.d)&&(t={id:i.id,d:e})}if(t)return{type:`node`,id:t.id}}if(a(`opening`)){let t=null;for(let i of Object.values(e.openings)){if(o(i.id))continue;let a=el(e,i);if(!a)continue;let s=Os(n,a.p1,a.p2).dist;s<=r.opening&&(!t||s<t.d)&&(t={id:i.id,d:s})}if(t)return{type:`opening`,id:t.id}}if(a(`wall`)){let t=null;for(let i of Object.values(e.walls)){if(o(i.id))continue;let a=e.nodes[i.a],s=e.nodes[i.b];if(!a||!s)continue;let c=Math.max(r.wall,i.thickness/2),l=Os(n,a,s).dist;l<=c&&(!t||l<t.d)&&(t={id:i.id,d:l})}if(t)return{type:`wall`,id:t.id}}if(a(`room`)){let e=Jc(t,n);if(e?.roomId&&!o(e.roomId))return{type:`room`,id:e.roomId}}return null}function cl(e,t){return e===t?!0:!e||!t?!1:e.type===t.type&&e.id===t.id}var ll=function(e){return e.None=`none`,e.Node=`node`,e.Wall=`wall`,e.Intersection=`intersection`,e.Extension=`extension`,e.Alignment=`alignment`,e.Angle=`angle`,e.Grid=`grid`,e}({}),ul={enabled:[`node`,`intersection`,`wall`,`angle`,`extension`,`alignment`,`grid`],gridSize:100,angleStepDeg:0,toleranceScreenPx:10,nodeToleranceScreenPx:12};function dl(e){let t=e.getScreenCTM();if(!t)return 1;let n=Math.hypot(t.a,t.b);return n===0?1:1/n}function fl(e,t,n,r){return{x:r.x+(e-n.left)/r.zoom,y:r.y+(t-n.top)/r.zoom}}function pl(e,t){let n=e.x-t.point.x,r=e.y-t.point.y;return Math.abs(n*t.dir.y-r*t.dir.x)}function ml(e,t){let n=e.x-t.point.x,r=e.y-t.point.y,i=n*t.dir.x+r*t.dir.y;return{x:t.point.x+t.dir.x*i,y:t.point.y+t.dir.y*i}}function hl(e,t){let n=e.dir.x*t.dir.y-e.dir.y*t.dir.x;if(Math.abs(n)<1e-9)return null;let r=t.point.x-e.point.x,i=t.point.y-e.point.y,a=(r*t.dir.y-i*t.dir.x)/n;return{x:e.point.x+e.dir.x*a,y:e.point.y+e.dir.y*a}}function gl(e,t){let n=Math.abs(e.dir.x*t.dir.x+e.dir.y*t.dir.y);return Math.acos(Math.min(1,n))}function _l(e,t){return t>0?Math.round(e/t)*t:e}function vl(e,t){let n={...ul,...t.options},r=new Set(n.enabled),i=e=>{if(!t.origin)return e;let n=e.point.x-t.origin.x,r=e.point.y-t.origin.y;return{...e,angle:Math.atan2(r,n),distance:Math.hypot(n,r)}};if(r.size===0)return i({point:e,kind:`none`,guides:[]});let a=n.toleranceScreenPx*t.pxToWorld,o=(n.nodeToleranceScreenPx??n.toleranceScreenPx)*t.pxToWorld,{floor:s}=t,c=(()=>{if(!r.has(`angle`)||!t.origin||n.angleStepDeg<=0)return null;let i=n.angleStepDeg*Math.PI/180,a=Math.atan2(e.y-t.origin.y,e.x-t.origin.x),o=[{angle:0,relativeTo:`world`}];t.referenceAngle!==void 0&&o.push({angle:t.referenceAngle,relativeTo:`reference`});let s=null;for(let n of o){let r=n.angle+Math.round((a-n.angle)/i)*i,o={x:Math.cos(r),y:Math.sin(r)},c={kind:`angle`,point:t.origin,dir:o,residual:0,relativeTo:n.relativeTo};c.residual=pl(e,c),(!s||c.residual<s.residual)&&(s=c)}return s})(),l=e=>!c||pl(e,c)<=a;if(r.has(`node`)){let n=null;for(let r of Object.values(s.nodes)){if(t.excludeNodeIds?.has(r.id))continue;let i=Es(e,r);i<=o&&l(r)&&(!n||i<n.d)&&(n={id:r.id,point:{x:r.x,y:r.y},d:i})}if(n)return i({point:n.point,kind:`node`,nodeId:n.id,guides:[]})}let u=Object.values(s.walls).filter(e=>!t.excludeWallIds?.has(e.id));if(r.has(`intersection`)){let t=null;for(let n=0;n<u.length;n++)for(let r=n+1;r<u.length;r++){let i=s.nodes[u[n].a],o=s.nodes[u[n].b],c=s.nodes[u[r].a],d=s.nodes[u[r].b];if(!i||!o||!c||!d)continue;let f=As(i,o,c,d);if(!f.point)continue;let p=Es(e,f.point);p<=a&&l(f.point)&&(!t||p<t.d)&&(t={point:f.point,d:p})}if(t)return i({point:t.point,kind:`intersection`,guides:[]})}if(r.has(`wall`)){let t=null;for(let n of u){let r=s.nodes[n.a],i=s.nodes[n.b];if(!r||!i)continue;let o=Os(e,r,i);o.dist<=a&&l(o.point)&&(!t||o.dist<t.d)&&(t={wallId:n.id,point:ks(e,r,i),t:o.t,d:o.dist})}if(t)return i({point:t.point,kind:`wall`,wallId:t.wallId,t:t.t,guides:[]})}let d=[];if(r.has(`extension`)){let t=null;for(let n of u){let r=s.nodes[n.a],i=s.nodes[n.b];if(!r||!i)continue;let o=Es(r,i);if(o<1e-6)continue;let c={x:(i.x-r.x)/o,y:(i.y-r.y)/o},l={kind:`extension`,point:{x:r.x,y:r.y},dir:c,residual:0};l.residual=pl(e,l);let u=Os(e,r,i).dist<=a;l.residual<=a&&!u&&(!t||l.residual<t.residual)&&(t=l)}t&&d.push(t)}if(r.has(`alignment`)){let n=null,r=null;for(let i of Object.values(s.nodes)){if(t.excludeNodeIds?.has(i.id))continue;let o=Math.abs(e.x-i.x);o<=a&&(!n||o<n.residual)&&(n={kind:`alignment`,point:{x:i.x,y:i.y},dir:{x:0,y:1},residual:o});let s=Math.abs(e.y-i.y);s<=a&&(!r||s<r.residual)&&(r={kind:`alignment`,point:{x:i.x,y:i.y},dir:{x:1,y:0},residual:s})}n&&d.push(n),r&&d.push(r)}let f=(e,t)=>({kind:e.kind,a:{x:t.x-e.dir.x*1e5,y:t.y-e.dir.y*1e5},b:{x:t.x+e.dir.x*1e5,y:t.y+e.dir.y*1e5},infinite:!0});if(c){let t=d.filter(e=>e.residual<=a&&gl(c,e)>15*Math.PI/180).sort((e,t)=>e.residual-t.residual)[0];if(t){let n=hl(c,t);if(n&&Es(n,e)<=a*4)return i({point:n,kind:`angle`,guides:[f(c,n),f(t,n)],angleRelativeTo:c.relativeTo})}let o=ml(e,c);if(r.has(`grid`)&&n.gridSize>0){let e=_l((o.x-c.point.x)*c.dir.x+(o.y-c.point.y)*c.dir.y,n.gridSize);o={x:c.point.x+c.dir.x*e,y:c.point.y+c.dir.y*e}}return i({point:o,kind:`angle`,guides:[f(c,o)],angleRelativeTo:c.relativeTo})}if(d.length>=2){let[t,n]=[...d].sort((e,t)=>e.residual-t.residual),r=hl(t,n);if(r&&gl(t,n)>15*Math.PI/180&&Es(r,e)<=a*2)return i({point:r,kind:`intersection`,guides:[f(t,r),f(n,r)]})}if(d.length>=1){let t=[...d].sort((e,t)=>e.residual-t.residual)[0],a=ml(e,t);if(r.has(`grid`)&&n.gridSize>0){let e=_l((a.x-t.point.x)*t.dir.x+(a.y-t.point.y)*t.dir.y,n.gridSize);a={x:t.point.x+t.dir.x*e,y:t.point.y+t.dir.y*e}}return i({point:a,kind:t.kind,guides:[f(t,a)],angleRelativeTo:t.relativeTo})}return r.has(`grid`)&&n.gridSize>0?i({point:{x:_l(e.x,n.gridSize),y:_l(e.y,n.gridSize)},kind:`grid`,guides:[]}):i({point:e,kind:`none`,guides:[]})}var yl=1;function bl(e,t={}){return JSON.stringify(e,null,t.pretty===!1?void 0:2)}function xl(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Sl(e,t){let n=typeof e==`string`?Number(e):e;return typeof n==`number`&&Number.isFinite(n)?n:t}function Cl(e,t){return typeof e==`string`?e:t}function wl(e,t){return typeof e==`boolean`?e:t}function Tl(e,t,n){return typeof e==`string`&&t.includes(e)?e:n}function El(e,t){return xl(e)?{x:Sl(e.x,t.x),y:Sl(e.y,t.y)}:t}function Dl(e){return Array.isArray(e)?e:xl(e)?Object.values(e):[]}function Ol(e){let t={};for(let n of e)t[n.id]=n;return t}function kl(e,t,n){let r=`floor ${t+1}`,i=xl(e)?e:{};xl(e)||n.push(`${r} was not an object, so it was read as empty`);let a=hc();a.id=Cl(i.id,a.id),a.label=Cl(i.label,a.label),a.elevation=Sl(i.elevation,0),a.height=Sl(i.height,a.height);let o=[];for(let e of Dl(i.nodes))xl(e)&&typeof e.id==`string`&&o.push({id:e.id,x:Sl(e.x,0),y:Sl(e.y,0)});a.nodes=Ol(o);let s=[],c=0;for(let e of Dl(i.walls)){if(!xl(e)||typeof e.id!=`string`)continue;let t=Cl(e.a,``),n=Cl(e.b,``);if(!a.nodes[t]||!a.nodes[n]||t===n){c+=1;continue}s.push({id:e.id,a:t,b:n,thickness:Math.max(1,Sl(e.thickness,100)),height:e.height===void 0?void 0:Sl(e.height,0),baseHeight:e.baseHeight===void 0?void 0:Sl(e.baseHeight,0),type:Tl(e.type,Object.values(bs),bs.Interior)})}a.walls=Ol(s),c>0&&n.push(`${r}: dropped ${c} wall(s) whose corners were missing`);let l=[],u=0;for(let e of Dl(i.openings)){if(!xl(e)||typeof e.id!=`string`)continue;let t=Cl(e.wallId,``);if(!a.walls[t]){u+=1;continue}l.push({id:e.id,wallId:t,kind:Tl(e.kind,Object.values(xs),xs.Door),offset:Sl(e.offset,0),width:Math.max(1,Sl(e.width,800)),sill:Sl(e.sill,0),head:Sl(e.head,2100),swing:e.swing===void 0?void 0:Tl(e.swing,Object.values(Ss),Ss.StartLeft)})}a.openings=Ol(l),u>0&&n.push(`${r}: dropped ${u} opening(s) with no wall to sit in`);let d=[];for(let e of Dl(i.rooms))xl(e)&&typeof e.id==`string`&&d.push({id:e.id,name:Cl(e.name,``),colour:typeof e.colour==`string`?e.colour:void 0,usage:typeof e.usage==`string`?e.usage:void 0,anchor:El(e.anchor,{x:0,y:0}),anchorPinned:wl(e.anchorPinned,!1),seq:Sl(e.seq,d.length),wallIds:Array.isArray(e.wallIds)?e.wallIds.filter(e=>typeof e==`string`&&!!a.walls[e]):[],area:Sl(e.area,0)});a.rooms=Ol(d);let f=mc(a);return f.result.length>0&&n.push(`${r}: repaired ${f.result.length} inconsistency(ies) in the geometry`),f.floor}function Al(e){let t=[],n;try{n=JSON.parse(e)}catch(e){return{plan:null,issues:[`Not valid JSON: ${e.message}`]}}if(!xl(n))return{plan:null,issues:[`Not a floor plan: expected an object`]};if(n.version!==void 0&&n.version!==1)return{plan:null,issues:[`Plan format version ${String(n.version)} is not supported (this build reads version 1)`]};n.version===void 0&&t.push(`No format version, read as version 1`);let r=Array.isArray(n.floors)?n.floors:[];if(r.length===0){if(n.floors!==void 0)t.push(`No floors in the file, started an empty one`);else return{plan:null,issues:["Not a floor plan: no `floors`"]}}let i=(r.length>0?r:[void 0]).map((e,n)=>kl(e,n,t));return{plan:{id:Cl(n.id,Bs(`plan`)),name:typeof n.name==`string`?n.name:void 0,version:1,unitSystem:Tl(n.unitSystem,Object.values(ys),ys.Metric),floors:i,revision:Sl(n.revision,0)+1},issues:t}}var jl=1e-9;function Ml(e,t,n){return(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x)}function Nl(e,t){return Math.abs(e.x-t.x)<jl&&Math.abs(e.y-t.y)<jl}function Pl(e,t,n,r){let i=Ml(e,t,n),a=Ml(e,n,r),o=Ml(e,r,t);return!((i<-1e-9||a<-1e-9||o<-1e-9)&&(i>jl||a>jl||o>jl))}function Fl(e,t){let n=e.slice(),r=t.filter(e=>e.length>=3).map(e=>({ring:e,index:e.reduce((t,n,r)=>n.x>e[t].x?r:t,0)})).sort((e,t)=>t.ring[t.index].x-e.ring[e.index].x);for(let e of r){let t=e.ring[e.index],r=-1,i=1/0;for(let a=0;a<n.length;a++){if(n[a].x<t.x)continue;let o=(n[a].x-t.x)**2+(n[a].y-t.y)**2;o<i&&Il(t,n[a],n,e.ring)&&(i=o,r=a)}if(r<0)for(let e=0;e<n.length;e++){let a=(n[e].x-t.x)**2+(n[e].y-t.y)**2;a<i&&(i=a,r=e)}let a=[];for(let t=0;t<=e.ring.length;t++)a.push(e.ring[(e.index+t)%e.ring.length]);n=[...n.slice(0,r+1),...a,...n.slice(r)]}return n}function Il(e,t,n,r){for(let i of[n,r])for(let n=0;n<i.length;n++){let r=i[n],a=i[(n+1)%i.length];if(r===e||a===e||r===t||a===t)continue;let o=Ml(e,t,r),s=Ml(e,t,a),c=Ml(r,a,e),l=Ml(r,a,t);if(o*s<0&&c*l<0)return!1}return!0}function Ll(e,t=[]){let n=Ls(e);if(n.length<3)return{vertices:[],indices:[]};let r=Fl(n,t.map(e=>Ls(e)).filter(e=>e.length>=3)),i=js(r)<0?r.slice().reverse():r.slice(),a=i.map((e,t)=>t),o=[],s=a.length*a.length;for(;a.length>3&&s-->0;){let e=!1;for(let t=0;t<a.length;t++){let n=a[(t+a.length-1)%a.length],r=a[t],s=a[(t+1)%a.length],c=i[n],l=i[r],u=i[s];if(Ml(c,l,u)<=jl)continue;let d=!1;for(let e of a){if(e===n||e===r||e===s)continue;let t=i[e];if(!(Nl(t,c)||Nl(t,l)||Nl(t,u))&&Pl(t,c,l,u)){d=!0;break}}if(!d){o.push(n,r,s),a.splice(t,1),e=!0;break}}if(!e)break}return a.length===3&&o.push(a[0],a[1],a[2]),{vertices:i,indices:o}}var Rl=1e-6,zl=1,Bl=class{constructor(){this.positions=[],this.normals=[],this.indices=[]}triangle(e,t,n){let r=t[0]-e[0],i=t[1]-e[1],a=t[2]-e[2],o=n[0]-e[0],s=n[1]-e[1],c=n[2]-e[2],l=i*c-a*s,u=a*o-r*c,d=r*s-i*o,f=Math.hypot(l,u,d);if(f<Rl)return;l/=f,u/=f,d/=f;let p=this.positions.length/3;for(let r of[e,t,n])this.positions.push(r[0],r[1],r[2]);for(let e=0;e<3;e++)this.normals.push(l,u,d);this.indices.push(p,p+1,p+2)}quad(e,t,n,r){this.triangle(e,t,n),this.triangle(e,n,r)}};function Vl(e){let t=new Map;for(let n of Object.values(e.walls))for(let e of[n.a,n.b]){let r=t.get(e);r?r.push(n):t.set(e,[n])}return t}var Hl=4;function Ul(e,t,n,r){let i=r.get(n);if(!i||i.length!==2)return null;let a=i[0].id===t.id?i[1]:i[0];if(a.thickness!==t.thickness)return null;let o=e.nodes[n],s=e.nodes[t.a===n?t.b:t.a],c=e.nodes[a.a===n?a.b:a.a];if(!o||!s||!c)return null;let l=Wl(s,o),u=Wl(o,c);if(!l||!u)return null;let d=l.x*u.x+l.y*u.y;if(d<-.999999)return null;let f={x:-l.y,y:l.x},p={x:-u.y,y:u.x},m=1+d,h={x:(f.x+p.x)/m,y:(f.y+p.y)/m};return Math.hypot(h.x,h.y)>Hl?null:t.b===n?h:{x:-h.x,y:-h.y}}function Wl(e,t){let n=Es(e,t);return n<Rl?null:{x:(t.x-e.x)/n,y:(t.y-e.y)/n}}function Gl(e,t,n,r,i){let a=e.nodes[t.a],o=e.nodes[t.b];if(!a||!o)return null;let s=Es(a,o);if(s<Rl||r-n<Rl)return null;let c=Wl(a,o),l=t.thickness/2,u={x:-c.y*l,y:c.x*l},d={x:a.x+c.x*n,y:a.y+c.y*n},f={x:a.x+c.x*r,y:a.y+c.y*r},p=n<Rl?Ul(e,t,t.a,i):null,m=r>s-Rl?Ul(e,t,t.b,i):null,h=(e,t,n)=>t?{x:e.x+t.x*l*n,y:e.y+t.y*l*n}:{x:e.x+u.x*n,y:e.y+u.y*n};return[h(d,p,1),h(f,m,1),h(f,m,-1),h(d,p,-1)]}function Kl(e,t,n,r){if(r-n<Rl)return;let i=t.map(e=>[e.x,n,e.y]),a=t.map(e=>[e.x,r,e.y]),o=0;for(let e=0;e<t.length;e++){let n=t[e],r=t[(e+1)%t.length];o+=n.x*r.y-r.x*n.y}let s=o<0;for(let n=0;n<t.length;n++){let r=(n+1)%t.length;s?e.quad(i[n],i[r],a[r],a[n]):e.quad(i[r],i[n],a[n],a[r])}for(let n=1;n+1<t.length;n++)s?(e.triangle(a[0],a[n],a[n+1]),e.triangle(i[0],i[n+1],i[n])):(e.triangle(a[0],a[n+1],a[n]),e.triangle(i[0],i[n],i[n+1]))}function ql(e,t,n){return Object.values(e.openings).filter(e=>e.wallId===t.id).filter(e=>e.offset+e.width/2>Rl&&e.offset-e.width/2<n-Rl).sort((e,t)=>e.offset-t.offset)}function Jl(e,t={}){let{wallHeight:n,includeFloorSlab:r=!0,slabThickness:i=200,applyElevation:a=!0}=t,o=new Bl,s=[],c=a?e.elevation:0,l=r?i+zl:0,u=Vl(e),d=o.indices.length;for(let t of Object.values(e.walls)){let r=e.nodes[t.a],i=e.nodes[t.b];if(!r||!i)continue;let a=Es(r,i);if(a<Rl)continue;let s=c+(t.baseHeight??0)-l,d=s+(t.height??n??e.height);if(d-s<Rl)continue;let f=ql(e,t,a);if(f.length===0){let n=Gl(e,t,0,a,u);n&&Kl(o,n,s,d);continue}for(let[n,r]of $c(e,t)){let i=Gl(e,t,n,r,u);i&&Kl(o,i,s,d)}for(let n of f){let r=Gl(e,t,Math.max(0,n.offset-n.width/2),Math.min(a,n.offset+n.width/2),u);if(!r)continue;let i=s+Math.max(0,n.sill),c=s+Math.max(0,n.head);i>s+Rl&&Kl(o,r,s,Math.min(i,d)),c<d-Rl&&Kl(o,r,Math.max(c,s),d)}}if(o.indices.length>d&&s.push({part:`wall`,start:d,count:o.indices.length-d}),r){let t=o.indices.length;for(let t of Wc(e).rooms){let{vertices:e,indices:n}=Ll(t.outer,t.holes);if(n.length===0)continue;let r=c,a=c-i;for(let t=0;t<n.length;t+=3){let i=[e[n[t]],e[n[t+1]],e[n[t+2]]],s=i.map(e=>[e.x,r,e.y]),c=i.map(e=>[e.x,a,e.y]);o.triangle(s[0],s[2],s[1]),o.triangle(c[0],c[1],c[2])}for(let e of[t.outer,...t.holes])for(let t=0;t<e.length;t++){let n=e[t],i=e[(t+1)%e.length];o.quad([n.x,a,n.y],[n.x,r,n.y],[i.x,r,i.y],[i.x,a,i.y])}}o.indices.length>t&&s.push({part:`floor`,start:t,count:o.indices.length-t})}return{positions:new Float32Array(o.positions),normals:new Float32Array(o.normals),indices:new Uint32Array(o.indices),groups:s}}function Yl(e){let t=[];for(let n of e.matchAll(/[ML]\s*(-?[\d.]+)[,\s]+(-?[\d.]+)/gi))t.push({x:parseFloat(n[1]),y:parseFloat(n[2])});return t}function Xl(e){let t=e.match(/^\s*M\s*(-?[\d.]+),(-?[\d.]+)\s*L\s*(-?[\d.]+),(-?[\d.]+)\s*M\s*(-?[\d.]+),(-?[\d.]+)\s*A\s/i);return t?{p1:{x:parseFloat(t[1]),y:parseFloat(t[2])},p2:{x:parseFloat(t[3]),y:parseFloat(t[4])}}:null}function Zl(e){let t=new DOMParser().parseFromString(e,`image/svg+xml`),n=[],r=[];return t.querySelectorAll(`[id^="room"]`).forEach(e=>{let t=e.querySelector(`[id="background"]`),i=t?.getAttribute(`d`);if(!i)return;let a=Yl(i);a.length<3||(n.push({name:e.querySelector(`text`)?.textContent?.trim()??``,points:a}),e.querySelectorAll(`path`).forEach(e=>{if(e===t)return;let n=Xl(e.getAttribute(`d`)??``);n&&r.push(n)}))}),{rooms:n,doors:r}}function Ql(e,t={}){let{scale:n=1,thickness:r=$s.thickness,weldTolerance:i,label:a}=t,{rooms:o,doors:s}=Zl(e),c=gc({floorLabel:a}),l=c.floors[0],u=i??Math.max(1,n*2);for(let e of o){let t=e.points.map(e=>({x:e.x*n,y:e.y*n}));for(let e=0;e<t.length;e++){let n=t[e],i=t[(e+1)%t.length];l=ec(l,n,i,{thickness:r,type:bs.Interior},u).floor}}for(let e of s){let t={x:e.p1.x*n,y:e.p1.y*n},r={x:e.p2.x*n,y:e.p2.y*n},i={x:(t.x+r.x)/2,y:(t.y+r.y)/2},a=Math.hypot(r.x-t.x,r.y-t.y);if(a<=0)continue;let o=null;for(let e of Object.values(l.walls)){let t=l.nodes[e.a],n=l.nodes[e.b];if(!t||!n)continue;let r=Math.hypot(n.x-t.x,n.y-t.y);if(r<1e-6)continue;let a=((i.x-t.x)*(n.x-t.x)+(i.y-t.y)*(n.y-t.y))/(r*r),s=Math.min(1,Math.max(0,a)),c=t.x+(n.x-t.x)*s,d=t.y+(n.y-t.y)*s,f=Math.hypot(i.x-c,i.y-d);f<=u&&(!o||f<o.dist)&&(o={wallId:e.id,offset:s*r,dist:f})}o&&(l=uc(l,{wallId:o.wallId,kind:xs.Door,offset:o.offset,width:a,sill:0,head:2100}).floor)}l=Kc(l).floor;let d=Wc(l).rooms;for(let e of o){if(!e.name)continue;let t={x:e.points.reduce((e,t)=>e+t.x,0)/e.points.length*n,y:e.points.reduce((e,t)=>e+t.y,0)/e.points.length*n},r=d.find(e=>e.roomId&&e.outer.length>2&&$l(t,e.outer)&&l.rooms[e.roomId]?.name.startsWith(`Room `));r?.roomId&&(l={...l,rooms:{...l.rooms,[r.roomId]:{...l.rooms[r.roomId],name:e.name}}})}return{...c,floors:[l]}}function $l(e,t){let n=!1;for(let r=0,i=t.length-1;r<t.length;i=r++){let a=t[r].x,o=t[r].y,s=t[i].x,c=t[i].y;o>e.y!=c>e.y&&e.x<(s-a)*(e.y-o)/(c-o)+a&&(n=!n)}return n}var eu={iconPicker:`iconPicker_xJJmG`,"iconPicker-label":`iconPicker-label_VEB2X`,iconPickerLabel:`iconPicker-label_VEB2X`,"iconPicker-item":`iconPicker-item_iJWDN`,iconPickerItem:`iconPicker-item_iJWDN`,"iconPicker-item-container":`iconPicker-item-container_-1WT5`,iconPickerItemContainer:`iconPicker-item-container_-1WT5`,"iconPicker-item-selected":`iconPicker-item-selected_GQ-I1`,iconPickerItemSelected:`iconPicker-item-selected_GQ-I1`,"iconPicker-error":`iconPicker-error_23m9v`,iconPickerError:`iconPicker-error_23m9v`};function tu(e){let{formValidator:t}=e;return t?t.touched&&t.hasError():!1}function nu(e){let{isRequired:t,formValidator:n}=e;return!!(t||n?.validators.find(e=>e.validatorId===`required`))}function ru({data:e=[],selectedId:t=null,label:n=``,onChange:r,formValidator:i=null,isRequired:a,className:o,style:s,classNames:d,styles:p,...m}){let h=i?i.value??null:t,g=tu({formValidator:i,isRequired:a}),_=nu({formValidator:i,isRequired:a}),v=(0,c.useRef)([]),y=(0,c.useRef)([]),b=e.findIndex(e=>e.id===h),x=b>=0?b:0;function S(e){i&&i.set(e),r?.(e)}function C(t,n){if(e.length===0)return;let r=(n+t+e.length)%e.length;v.current[r]?.focus(),S(e[r].id)}function w(e,t,n){switch(e.key){case`ArrowDown`:case`ArrowRight`:e.preventDefault(),C(1,t);break;case`ArrowUp`:case`ArrowLeft`:e.preventDefault(),C(-1,t);break;case` `:case`Enter`:e.preventDefault(),y.current[t]?.addRipple(),S(n)}}return(0,f.jsxs)(`div`,{...m,className:(0,l.default)(eu.iconPicker,{[eu.iconPickerError]:g},d?.root,o),style:{...p?.root,...s},children:[n&&(0,f.jsxs)(`div`,{className:(0,l.default)(eu.iconPickerLabel,d?.label),style:p?.label,children:[n,_&&` *`]}),(0,f.jsx)(`div`,{role:`radiogroup`,"aria-label":n||void 0,className:(0,l.default)(eu.iconPickerItemContainer,d?.itemContainer),style:p?.itemContainer,children:e.map(({id:e,label:t,icon:n,customIcon:r},i)=>{let a=h===e;return(0,f.jsxs)(`div`,{ref:e=>{v.current[i]=e},className:(0,l.default)(eu.iconPickerItem,{[eu.iconPickerItemSelected]:a},d?.item),style:p?.item,title:t,tabIndex:i===x?0:-1,role:`radio`,"aria-checked":a,onClick:()=>S(e),onKeyDown:t=>w(t,i,e),children:[n&&(0,f.jsx)(u.FontAwesomeIcon,{icon:n}),r??null,(0,f.jsx)(G,{ref:e=>{y.current[i]=e}})]},e)})})]})}var iu=[`click`,`mousemove`,`keydown`,`scroll`,`touchstart`];function au({children:e=null,idleAfterSeconds:t=600,renderCondition:n=!0}){let[r,i]=(0,c.useState)(!1),a=(0,c.useRef)(null),o=(0,c.useCallback)(()=>{a.current!==null&&clearTimeout(a.current),a.current=setTimeout(()=>{i(!0)},t*1e3)},[t]),s=(0,c.useCallback)(()=>{i(!1),o()},[o]);return(0,c.useEffect)(()=>{o()},[o]),(0,c.useEffect)(()=>{for(let e of iu)document.addEventListener(e,s);return()=>{for(let e of iu)document.removeEventListener(e,s);a.current!==null&&clearTimeout(a.current)}},[s]),(0,f.jsx)(f.Fragment,{children:n&&r&&e})}var ou={inputDropdown:`inputDropdown_UdYMa`,inputDropdownStatus:`inputDropdownStatus_ORHlt`,inputDropdownPanel:`inputDropdownPanel_TAURL`,dropdown:`dropdown_-M5-x`,"dropdown-scroll":`dropdown-scroll_XMZs-`,dropdownScroll:`dropdown-scroll_XMZs-`,"dropdown-empty":`dropdown-empty_Kx---`,dropdownEmpty:`dropdown-empty_Kx---`,"dropdown-item":`dropdown-item_JRgbt`,dropdownItem:`dropdown-item_JRgbt`,"dropdown-item-highlighted":`dropdown-item-highlighted_1ZENP`,dropdownItemHighlighted:`dropdown-item-highlighted_1ZENP`};function su(e,t){return t?t.value??``:e??``}function cu(e,t){let n=t.find(t=>t.value===e);return n?n.label??n.value:e}var lu={wrap:!1},uu={empty:`No matches`};function du(e){let{label:t=``,value:n=``,formValidator:r=null,error:i,isRequired:a=!1,items:o=[],allowCustomValue:s=!1,maxItems:u=100,className:d,style:p,classNames:m,styles:h,onSelect:g=()=>null,onChange:_,placeholder:v=``,readOnly:y=!1,labels:b,...x}=D(`InputDropdown`,e),S=O(`InputDropdown`,b,uu),C=su(n,r),[,w]=(0,c.useState)(0),T=(0,c.useRef)(r);(0,c.useEffect)(()=>{if(T.current=r,!r)return;let e=()=>w(e=>e+1);return r.registerOnUpdateListener(e),()=>{r.removeOnUpdateListener(e)}},[r]);let E=a||!!r?.validators.find(e=>e.validatorId===`required`),[k,j]=(0,c.useState)(()=>cu(C,o)),[M,N]=(0,c.useState)(C),[P,F]=(0,c.useState)(!1),[I,L]=(0,c.useState)(null),R=(0,c.useRef)(null),z=(0,c.useRef)(null),B=(0,c.useRef)(null);if(C!==M){N(C);let e=o.find(e=>e.value===C);e?j(e.label??e.value):s&&j(C)}if(!P&&!s&&k===C){let e=cu(C,o);e!==k&&j(e)}let V=(0,c.useMemo)(()=>{let e=k.toLowerCase(),t=[];for(let n of o)if((n.label??n.value).toLowerCase().includes(e)&&(t.push(n),u>0&&t.length>=u))break;return t},[o,k,u]),H=!s&&k!==``&&k!==cu(C,o),U=V.length===0&&H,W=P&&!y&&(V.length>0||U),G=h?.dropdown?.fontSize,ee=(0,c.useCallback)(e=>{let t=z.current;e&&t&&G==null&&(e.style.fontSize=window.getComputedStyle(t).fontSize)},[G]),K=()=>{y||(R.current&&=(clearTimeout(R.current),null),F(!0))},te=()=>{T.current&&(T.current.touched=!0),R.current=setTimeout(()=>{F(!1),L(null),R.current=null,s||j(cu(C,o))},100)};(0,c.useEffect)(()=>{W&&I!==null&&La(B.current,B.current?.children[I])},[W,I]);let q=(0,c.useCallback)(e=>{j(e.label??e.value),F(!1),L(null),r&&r.set(e.value),_&&_(e.value),g(e.value)},[r,_,g]),ne=(0,c.useCallback)(e=>{if(y)return;let t=e.key===`ArrowUp`||e.key===`ArrowDown`;if(!W){t&&(e.preventDefault(),F(!0));return}if(t){e.preventDefault();let t=e.key===`ArrowDown`?1:-1;L(e=>e!==null&&e===(t===1?V.length-1:0)?null:Fa(e,t,V.length,lu))}else e.key===`Enter`&&(I!==null&&V[I]?(e.preventDefault(),q(V[I])):s&&(F(!1),L(null)))},[V,I,q,s,y,W]),J=(0,f.jsxs)(`div`,{ref:ee,className:(0,l.default)(ou.dropdown,m?.dropdown),style:h?.dropdown,children:[U&&(0,f.jsx)(`div`,{className:(0,l.default)(ou.dropdownEmpty,m?.empty),style:h?.empty,onMouseDown:e=>e.preventDefault(),children:S.empty}),(0,f.jsx)(`div`,{ref:B,className:ou.dropdownScroll,children:V.map((e,t)=>(0,f.jsx)(`div`,{className:(0,l.default)(ou.dropdownItem,I===t&&ou.dropdownItemHighlighted,m?.item),style:h?.item,onMouseDown:e=>e.preventDefault(),onClick:()=>q(e),children:e.label??e.value},`${t}_${e.label}_${e.value}`))})]});return(0,f.jsxs)(`div`,{...x,ref:z,className:(0,l.default)(ou.inputDropdown,m?.root,d),style:{...h?.root,...p},onFocus:K,onBlur:te,onKeyDown:ne,children:[(0,f.jsx)(sn,{isOpen:W,onOpenChange:e=>{e||(F(!1),L(null))},presentation:A.Default,placement:wt.Bottom,align:Tt.Start,offset:0,withArrow:!1,constrainWidth:!1,closeOnTriggerClick:!1,focusOnOpen:!1,classNames:{panel:ou.inputDropdownPanel},content:J,children:(0,f.jsx)(Ji,{autoComplete:`off`,label:t,value:k,readOnly:y,formValidator:null,isRequired:E,isValid:r?!r.touched||!r.hasError():!i,errorMessage:r?r.touched?r.getCurrentErrorMessage()??``:``:i??``,onChange:e=>{if(j(e),L(null),F(!0),s)r&&r.set(e),_&&_(e);else if(e===``)r&&r.set(``),_&&_(``),g(``);else{let t=o.find(t=>(t.label??t.value).toLowerCase()===e.toLowerCase());t&&(r&&r.set(t.value),_&&_(t.value),g(t.value))}},placeholder:v})}),(0,f.jsx)(`span`,{className:ou.inputDropdownStatus,role:`status`,"aria-live":`polite`,children:W&&U?S.empty:``})]})}var fu={board:`board_6KRdw`,column:`column_NrNeF`,"column-empty":`column-empty_5KYsJ`,columnEmpty:`column-empty_5KYsJ`,"column-over":`column-over_sO7oD`,columnOver:`column-over_sO7oD`,"column-over-limit":`column-over-limit_QmeZF`,columnOverLimit:`column-over-limit_QmeZF`,"column-drop-target":`column-drop-target_mznmc`,columnDropTarget:`column-drop-target_mznmc`,"column-disabled":`column-disabled_ehcz3`,columnDisabled:`column-disabled_ehcz3`,"column-items":`column-items_xY5er`,columnItems:`column-items_xY5er`,"column-dragging":`column-dragging_6F5TK`,columnDragging:`column-dragging_6F5TK`,"column-drag-overlay":`column-drag-overlay_ctehQ`,columnDragOverlay:`column-drag-overlay_ctehQ`,"column-header":`column-header_PLeKG`,columnHeader:`column-header_PLeKG`,"column-header-reorderable":`column-header-reorderable_Jtgii`,columnHeaderReorderable:`column-header-reorderable_Jtgii`,"column-header-title":`column-header-title_FQhHQ`,columnHeaderTitle:`column-header-title_FQhHQ`,"column-header-count":`column-header-count_3t83e`,columnHeaderCount:`column-header-count_3t83e`,"column-header-count-over":`column-header-count-over_AkAdo`,columnHeaderCountOver:`column-header-count-over_AkAdo`,"column-header-trailing":`column-header-trailing_6625D`,columnHeaderTrailing:`column-header-trailing_6625D`,"column-header-actions":`column-header-actions_XKY3t`,columnHeaderActions:`column-header-actions_XKY3t`,"column-placeholder":`column-placeholder_WGyF-`,columnPlaceholder:`column-placeholder_WGyF-`,"column-loading-indicator":`column-loading-indicator_2Q70t`,columnLoadingIndicator:`column-loading-indicator_2Q70t`,"column-loading-spinner":`column-loading-spinner_4ca6l`,columnLoadingSpinner:`column-loading-spinner_4ca6l`,item:`item_T8CJK`,"item-dragging":`item-dragging_iWurw`,itemDragging:`item-dragging_iWurw`,"item-handled":`item-handled_l28gq`,itemHandled:`item-handled_l28gq`,"item-disabled":`item-disabled_n8Nuq`,itemDisabled:`item-disabled_n8Nuq`,dragOverlay:`dragOverlay_DSyKz`},pu={draggable:!0,droppable:!0},mu={draggable:!0,droppable:!1};function hu({id:e,dragHandle:t,disabled:n,preventAsDropTarget:r,children:i}){let{attributes:a,listeners:o,setNodeRef:s,transform:c,transition:u,isDragging:d}=(0,h.useSortable)({id:e,disabled:n?r?pu:mu:void 0});function p(e){e.target.closest(`[data-drag-handle]`)&&o?.onPointerDown?.(e)}return(0,f.jsx)(`div`,{ref:s,style:{transform:g.CSS.Transform.toString(c),transition:u},className:(0,l.default)(fu.item,t&&fu.itemHandled,d&&fu.itemDragging,n&&fu.itemDisabled),...a,...o,onPointerDown:t?p:o?.onPointerDown,children:i})}var gu={type:`column`},_u={draggable:!0,droppable:!0};function vu({id:e,title:t,itemIds:n,items:r,renderItem:i,dragHandle:a,preserveSizeWhileEmpty:o,collapseEmptyColumns:s=!0,maxItems:u,disabled:d,getItemDisabled:p,emptyPlaceholder:_,actions:v,reorderable:y,activeIsColumn:b,columnMaxHeight:x,hasMore:S,onLoadMore:C,loadMoreThreshold:w=100,className:T,style:E,classNames:D,styles:O,...k}){let A=`column-${e}`,{setNodeRef:j,isOver:M}=(0,m.useDroppable)({id:A,disabled:d}),N=s&&n.length===0&&!o,P=u!=null&&n.length>u,F=(0,c.useRef)(null),I=(0,c.useCallback)(e=>{F.current=e,j(e)},[j]),L=(0,c.useRef)(!1),[z,B]=(0,c.useState)(!1),V=(0,c.useCallback)(()=>{C&&!L.current&&(L.current=!0,B(!0),Promise.resolve(C()).finally(()=>{L.current=!1,B(!1)}))},[C]),H=(0,c.useCallback)(e=>{if(!S)return;let t=e.currentTarget;t.scrollTop+t.clientHeight>=t.scrollHeight-w&&V()},[S,w,V]),U=(0,c.useRef)(``);(0,c.useEffect)(()=>{if(!S||!x||z)return;let e=F.current;if(!e||e.clientHeight===0||e.scrollHeight>e.clientHeight)return;let t=`${n.length}:${e.clientHeight}`;U.current!==t&&(U.current=t,V())},[S,x,z,n.length,V]);let{attributes:W,listeners:G,setNodeRef:ee,transform:K,transition:te,isDragging:q,isOver:ne}=(0,h.useSortable)({id:e,data:gu,disabled:!y&&_u});return(0,f.jsxs)(`div`,{...k,ref:ee,id:e,className:(0,l.default)(fu.column,M&&!b&&fu.columnOver,ne&&fu.columnDropTarget,N&&fu.columnEmpty,P&&fu.columnOverLimit,d&&fu.columnDisabled,q&&fu.columnDragging,T),style:{transform:g.CSS.Transform.toString(K),transition:te,...E},children:[(0,f.jsxs)(`div`,{className:(0,l.default)(fu.columnHeader,y&&fu.columnHeaderReorderable,D?.header),style:O?.header,...y?W:void 0,...y?G:void 0,children:[(0,f.jsx)(`span`,{className:fu.columnHeaderTitle,children:t}),(0,f.jsxs)(`div`,{className:fu.columnHeaderTrailing,children:[u!=null&&(0,f.jsxs)(`span`,{className:(0,l.default)(fu.columnHeaderCount,P&&fu.columnHeaderCountOver,D?.count),style:O?.count,children:[n.length,`/`,u]}),v!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(fu.columnHeaderActions,D?.actions),style:O?.actions,children:v})]})]}),(0,f.jsx)(h.SortableContext,{id:e,items:n,strategy:h.verticalListSortingStrategy,children:(0,f.jsxs)(`div`,{ref:I,className:(0,l.default)(fu.columnItems,D?.items),style:{maxHeight:x,overflowY:x?`auto`:void 0,...O?.items},onScroll:x?H:void 0,children:[n.length===0&&_!=null?(0,f.jsx)(`div`,{className:(0,l.default)(fu.columnPlaceholder,D?.placeholder),style:O?.placeholder,children:_}):null,n.map(e=>(0,f.jsx)(hu,{id:e,dragHandle:a,disabled:d||r[e]!==void 0&&(p?.(r[e],e)??!1),preventAsDropTarget:d,children:r[e]===void 0?null:i(r[e],e)},e)),z&&(0,f.jsx)(`div`,{className:(0,l.default)(fu.columnLoadingIndicator,D?.loadingIndicator),style:O?.loadingIndicator,children:(0,f.jsx)(R,{className:fu.columnLoadingSpinner})})]})})]})}function yu(e,t){return e.length===t.length&&e.every((e,n)=>{let r=t[n];return e.id===r.id&&e.itemIds.length===r.itemIds.length&&e.itemIds.every((e,t)=>e===r.itemIds[t])})}function bu(e,t){return e.findIndex(e=>e.itemIds.includes(t))}function xu(e){return!!(e&&typeof e==`object`&&e.type===`column`)}function Su(e,t,n){let r=e.findIndex(e=>e.id===t),i=e.findIndex(e=>e.id===n);return r===-1||i===-1||r===i?e:(0,h.arrayMove)(e,r,i)}var Cu=e=>{let t=xu(e.active.data.current),n=e.droppableContainers.filter(e=>t?xu(e.data.current):!xu(e.data.current));return(0,m.closestCorners)({...e,droppableContainers:n})};function wu(e){return e.startsWith(`column-`)?e.slice(7):null}function Tu(e,t,n,r){let i=bu(e,t);if(i===-1)return e;let a=wu(n),o=a===null?bu(e,n):e.findIndex(e=>e.id===a);if(o===-1)return e;if(i===o){let o=e[i],s=o.itemIds.indexOf(t);if(s===-1)return e;if(a!==null){let{activeRect:t,overRect:n}=r,a=t&&t.top+t.height/2>n.top+n.height/2?o.itemIds.length-1:0;if(a===s)return e;let c=[...e];return c[i]={...o,itemIds:(0,h.arrayMove)(o.itemIds,s,a)},c}let c=o.itemIds.indexOf(n);if(c===-1||s===c)return e;let l=[...e];return l[i]={...o,itemIds:(0,h.arrayMove)(o.itemIds,s,c)},l}let s=e[i],c=e[o],l=[...c.itemIds],{activeRect:u,overRect:d}=r,f;if(a!==null)f=u&&u.top+u.height/2>d.top+d.height/2?l.length:0;else{let e=l.indexOf(n),t=e!==-1&&e===l.length-1,r=!!(u&&u.top+u.height/2>d.top+d.height);f=e===-1?l.length:t&&r?e+1:e}l.splice(f,0,t);let p=[...e];return p[i]={...s,itemIds:s.itemIds.filter(e=>e!==t)},p[o]={...c,itemIds:l},p}function Eu(e,t,n){function r(e){let r=t[e];return r===void 0?e:n(r,e)}function i(t){let n=wu(t);if(n!==null){let t=e.find(e=>e.id===n);return t?`the ${t.title} column`:`a column`}let i=e.find(e=>e.itemIds.includes(t));return i?`${r(t)}, in the ${i.title} column`:r(t)}function a(t){return e.find(e=>e.id===t)?.title??t}return{onDragStart({active:e}){return xu(e.data.current)?`Picked up column ${a(String(e.id))}.`:`Picked up card ${r(String(e.id))}.`},onDragOver({active:e,over:t}){return xu(e.data.current)?t?`Column ${a(String(e.id))} is over column ${a(String(t.id))}.`:`Column ${a(String(e.id))} is no longer over a droppable area.`:t?`Card ${r(String(e.id))} is over ${i(String(t.id))}.`:`Card ${r(String(e.id))} is no longer over a droppable area.`},onDragEnd({active:e,over:t}){return xu(e.data.current)?t?`Column ${a(String(e.id))} was dropped over column ${a(String(t.id))}.`:`Column ${a(String(e.id))} was dropped.`:t?`Card ${r(String(e.id))} was dropped over ${i(String(t.id))}.`:`Card ${r(String(e.id))} was dropped.`},onDragCancel({active:e}){return xu(e.data.current)?`Dragging cancelled. Column ${a(String(e.id))} was returned to its original position.`:`Dragging cancelled. Card ${r(String(e.id))} was returned to its original position.`}}}function Du(e,t,n){let r=[];for(let i of e){if(!(0,h.hasSortableData)(i)||i.data.current.sortable.containerId!==n)continue;let e=t.get(i.id);e&&r.push({container:i,rect:e})}return r.sort((e,t)=>e.rect.top-t.rect.top)}var Ou=(e,{context:t})=>{let{active:n,collisionRect:r,droppableRects:i,droppableContainers:a}=t;if(!n||!r||!(0,h.hasSortableData)(n))return;let o=e.code===m.KeyboardCode.Down||e.code===m.KeyboardCode.Up,s=e.code===m.KeyboardCode.Left||e.code===m.KeyboardCode.Right;if(!o&&!s)return;e.preventDefault();let c=n.data.current.sortable.containerId,l=a.getEnabled();if(xu(n.data.current)){if(!s)return;let t=e.code===m.KeyboardCode.Right?1:-1,a=Du(l,i,c).sort((e,t)=>e.rect.left-t.rect.left),o=a.findIndex(e=>e.container.id===n.id);if(o===-1)return;let u=a[o+t];return u?{x:u.rect.left,y:r.top}:void 0}if(o){let t=e.code===m.KeyboardCode.Down?1:-1,a=Du(l,i,c),o=a.findIndex(e=>e.container.id===n.id);if(o===-1)return;let s=a[o+t];return s?{x:r.left,y:s.rect.top}:void 0}let u=e.code===m.KeyboardCode.Right?1:-1,d=[];for(let e of l){if(wu(String(e.id))===null)continue;let t=i.get(e.id);t&&d.push({container:e,rect:t})}d.sort((e,t)=>e.rect.left-t.rect.left);let f=d.findIndex(e=>wu(String(e.container.id))===c);if(f===-1)return;let p=d[f+u];if(!p)return;let g=Du(l,i,wu(String(p.container.id))),_=p.rect;return g.length>0&&(_=g.reduce((e,t)=>Math.abs(t.rect.top-r.top)<Math.abs(e.rect.top-r.top)?t:e).rect),{x:_.left,y:_.top}},ku=(e,t)=>t,Au={activationConstraint:{distance:8}},ju={activationConstraint:{delay:250,tolerance:5}},Mu={coordinateGetter:Ou},Nu={draggable:`
4
4
  To pick up a card or column, press space or enter.
5
5
  While dragging, use the arrow keys to move it — for a card, between positions and columns;
6
6
  for a column, left/right to reorder it.
7
7
  Press space or enter again to drop it, or press escape to cancel.
8
- `};function ju({columns:e,items:t,renderItem:n,onChange:r,dragHandle:i,getItemLabel:a=Eu,getItemDisabled:o,renderEmptyColumn:s,renderColumnActions:u,reorderableColumns:d,collapseEmptyColumns:p,columnMaxHeight:g,onLoadMore:_,loadMoreThreshold:v,className:y,style:b,classNames:x,styles:S,...C}){let[w,T]=(0,c.useState)(null),[E,D]=(0,c.useState)(!1),[O,k]=(0,c.useState)(null),A=(0,c.useRef)(null),j=(0,m.useSensors)((0,m.useSensor)(m.MouseSensor,Du),(0,m.useSensor)(m.TouchSensor,Ou),(0,m.useSensor)(m.KeyboardSensor,ku)),M=O??e,N=(0,c.useMemo)(()=>M.map(e=>e.id),[M]),P=(0,c.useMemo)(()=>Cu(M,t,a),[M,t,a]),F=(0,c.useMemo)(()=>({announcements:P,screenReaderInstructions:Au}),[P]);function I({active:t}){T(String(t.id)),D(vu(t.data.current)),k(e),A.current=null}function L({active:t,over:n}){if(!n)return;if(vu(t.data.current)){let r=String(t.id),i=String(n.id);k(t=>{let n=t??e,a=yu(n,r,i);return a===n?t:a});return}let r=String(t.id),i=String(n.id),a=t.rect.current.translated??t.rect.current.initial,o=a?`${a.top}:${a.left}`:null;(o===null||o!==A.current)&&(A.current=o,k(t=>{let o=t??e,s=Su(o,r,i,{activeRect:a,overRect:n.rect});return s===o?t:s}))}function R({over:t}){if(T(null),D(!1),!t||!O){k(null);return}gu(O,e)||r(O),k(null)}function z(){T(null),D(!1),k(null)}let B=w&&E?M.find(e=>e.id===w):void 0;return(0,f.jsxs)(m.DndContext,{sensors:j,collisionDetection:bu,onDragStart:I,onDragOver:L,onDragEnd:R,onDragCancel:z,accessibility:F,children:[(0,f.jsx)(h.SortableContext,{id:`kanban-columns`,items:N,strategy:h.horizontalListSortingStrategy,children:(0,f.jsx)(`div`,{...C,className:(0,l.default)(lu.board,y),style:b,children:M.map(e=>(0,f.jsx)(hu,{id:e.id,title:e.title,itemIds:e.itemIds,maxItems:e.maxItems,disabled:e.disabled,getItemDisabled:o,emptyPlaceholder:s?.(e),actions:u?.(e),reorderable:d,activeIsColumn:w!==null&&E,collapseEmptyColumns:p,columnMaxHeight:g,hasMore:e.hasMore,onLoadMore:_?()=>_(e.id):void 0,loadMoreThreshold:v,items:t,renderItem:n,dragHandle:i,preserveSizeWhileEmpty:w!==null},e.id))})}),(0,f.jsx)(m.DragOverlay,{children:B?(0,f.jsx)(`div`,{className:(0,l.default)(lu.column,lu.columnDragOverlay),children:(0,f.jsx)(`div`,{className:lu.columnHeader,children:(0,f.jsx)(`span`,{className:lu.columnHeaderTitle,children:B.title})})}):w&&!E&&t[w]!==void 0?(0,f.jsx)(`div`,{className:(0,l.default)(lu.dragOverlay,x?.dragOverlay),style:S?.dragOverlay,children:n(t[w],w)}):null})]})}var Mu=`https://api.klipy.com/v2`,Nu=class{constructor(e){this.key=e}async search(e,t={}){let n=new URLSearchParams({q:e,key:this.key});return t.limit!=null&&n.set(`limit`,String(t.limit)),t.contentfilter!=null&&n.set(`contentfilter`,t.contentfilter),t.pos!=null&&n.set(`pos`,t.pos),(await fetch(`${Mu}/search?${n}`)).json()}async searchSuggestions(e){let t=new URLSearchParams({q:e,key:this.key});return(await fetch(`${Mu}/search_suggestions?${t}`)).json()}registerShare(e,t){let n=new URLSearchParams({id:t,q:e,key:this.key});fetch(`${Mu}/registershare?${n}`).catch(()=>null)}},Pu={resultCount:`resultCount_Sn48Q`},Fu={results:e=>`${e} ${e===1?`result`:`results`}`};function Iu({value:e,onChange:t,onDebounce:n,placeholder:r,label:i,debounceMs:a=500,totalAmount:o,showAmount:s=!0,className:u,width:d,style:p,classNames:m,styles:h,labels:g,ref:_,...v}){let y=O(`SearchInput`,g,Fu),b=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>{b.current!==null&&clearTimeout(b.current)},[]);function x(e){let r=e==null?``:String(e),i=r.trim()===``?``:r;t(i),b.current!==null&&clearTimeout(b.current),b.current=setTimeout(()=>{n?.(i)},a)}let S=s&&typeof o==`number`&&!Number.isNaN(o);return(0,f.jsxs)(`div`,{...v,className:(0,l.default)(u,m?.root),style:{...d==null?void 0:{width:d},...p,...h?.root},children:[(0,f.jsx)(Gi,{ref:_,autoComplete:`off`,className:m?.input,style:h?.input,type:Vi.Search,label:i,placeholder:r,value:e,onChange:x}),S&&(0,f.jsx)(`p`,{className:(0,l.default)(Pu.resultCount,m?.resultCount),style:h?.resultCount,children:y.results(o)})]})}var Lu={gifPreview:`gifPreview_jAXT2`,"gifPreview-image":`gifPreview-image_41bwm`,gifPreviewImage:`gifPreview-image_41bwm`,"gifPreview-image-container":`gifPreview-image-container_5hAjJ`,gifPreviewImageContainer:`gifPreview-image-container_5hAjJ`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_9EI0A`};function Ru({className:e,previewItems:t=[],onSelect:n,onLoadAdditional:r}){function i(e){let t=e.currentTarget,n=t.scrollHeight-t.clientHeight*1.5;t.scrollTop>=n&&r?.()}return(0,f.jsx)(f.Fragment,{children:t.length>0&&(0,f.jsx)(`div`,{className:(0,l.default)(Lu.gifPreview,e),onScroll:i,children:t.map((e,t)=>(0,f.jsx)(oe,{className:Lu.gifPreviewImageContainer,onClick:()=>n?.(e),children:(0,f.jsx)(`div`,{className:Lu.gifPreviewImage,style:{backgroundImage:`url(${e.media_formats.tinygif.url})`}})},`${e.id}_${t}`))})})}var zu={gifView:`gifView_YUeLK`,"gifView-loading":`gifView-loading_N1Lzx`,gifViewLoading:`gifView-loading_N1Lzx`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_OmJUc`};function Bu({className:e,src:t=``}){let[n,r]=(0,c.useState)(null),i=n!==t;return(0,f.jsxs)(`div`,{className:(0,l.default)(zu.gifView,e),children:[(0,f.jsx)(`img`,{className:zu.klipyPickerSelected,src:t,onLoad:()=>r(t)}),i&&(0,f.jsx)(`div`,{className:zu.gifViewLoading})]})}var Vu={"klipyPicker-selected":`klipyPicker-selected_Watxl`,klipyPickerSelected:`klipyPicker-selected_Watxl`,"klipyPicker-modal-content":`klipyPicker-modal-content_3CBV9`,klipyPickerModalContent:`klipyPicker-modal-content_3CBV9`,"klipyPicker-suggestions-container":`klipyPicker-suggestions-container_-csDI`,klipyPickerSuggestionsContainer:`klipyPicker-suggestions-container_-csDI`,"klipyPicker-suggestions-item":`klipyPicker-suggestions-item_nHHSA`,klipyPickerSuggestionsItem:`klipyPicker-suggestions-item_nHHSA`},Hu={search:`Pick gif`};function Uu({className:e,token:t=``,isModal:n=!1,onSelect:r=()=>void 0,selected:i=null,labels:a}){let o=O(`KlipyPicker`,a,Hu),s=(0,c.useMemo)(()=>new Nu(t),[t]),[u,d]=(0,c.useState)(``),[p,m]=(0,c.useState)([]),[h,g]=(0,c.useState)([]),[_,v]=(0,c.useState)(null),[y,b]=(0,c.useState)(!1);async function x(e){if(d(e),!e.trim()){m([]),g([]),v(null);return}let[{results:t=[],next:n=null},{results:r=[]}]=await Promise.all([s.search(e,{limit:18,contentfilter:`medium`}),s.searchSuggestions(e)]);m(t),v(n),g(r)}async function S(){let{results:e=[],next:t=null}=await s.search(u,{limit:36,pos:_??void 0,contentfilter:`medium`});v(t),m(t=>[...t,...e])}async function C(e){await r(e),b(!1),e&&s.registerShare(u,e.id)}function w(){return(0,f.jsx)(ji,{inline:!0,className:Vu.klipyPickerSuggestionsContainer,children:h.map(e=>(0,f.jsx)(Ai,{className:Vu.klipyPickerSuggestionsItem,text:e,onClick:()=>x(e)},e))})}function T(){return(0,f.jsx)(Ru,{previewItems:p,onSelect:C,onLoadAdditional:S})}function E(){return(0,f.jsx)(Iu,{label:o.search,value:u,onDebounce:x,onChange:d})}return n?(0,f.jsxs)(`div`,{className:(0,l.default)(Vu.klipyPicker,e),children:[(0,f.jsxs)(`div`,{className:P.actionButtons,children:[(0,f.jsx)(ne,{onClick:()=>b(!0),children:`Pick gif`}),i&&(0,f.jsx)(ne,{styleType:z.Delete,onClick:()=>C(null),children:`Remove gif`})]}),i&&(0,f.jsx)(Bu,{className:Vu.klipyPickerSelected,src:i}),(0,f.jsx)(va,{isOpen:y,onClose:()=>b(!1),children:(0,f.jsxs)(`div`,{className:Vu.klipyPickerModalContent,children:[E(),w(),T()]})})]}):(0,f.jsxs)(`div`,{className:(0,l.default)(Vu.klipyPicker,e),children:[(0,f.jsx)(rn,{placement:wt.Bottom,align:Tt.Start,isOpen:p.length>0&&y,onOpenChange:b,closeOnTriggerClick:!1,constrainWidth:!1,content:(0,f.jsxs)(f.Fragment,{children:[w(),T()]}),children:E()}),i&&(0,f.jsx)(ne,{styleType:z.Delete,onClick:()=>C(null),children:`Remove gif`}),i&&(0,f.jsx)(Bu,{className:Vu.klipyPickerSelected,src:i})]})}var Wu={menuPanel:`menuPanel_ldsja`,menu:`menu_QNY8D`,"menu-trigger":`menu-trigger_YbVFX`,menuTrigger:`menu-trigger_YbVFX`,"menu-item":`menu-item_-dxHx`,menuItem:`menu-item_-dxHx`,"menu-item-danger":`menu-item-danger_sztTU`,menuItemDanger:`menu-item-danger_sztTU`,"menu-item-icon":`menu-item-icon_BM1Ks`,menuItemIcon:`menu-item-icon_BM1Ks`,"menu-item-label":`menu-item-label_sK5Z5`,menuItemLabel:`menu-item-label_sK5Z5`,"menu-item-shortcut":`menu-item-shortcut_lRTZF`,menuItemShortcut:`menu-item-shortcut_lRTZF`,"menu-separator":`menu-separator_HfNOp`,menuSeparator:`menu-separator_HfNOp`,"menu-heading":`menu-heading_QSu4U`,menuHeading:`menu-heading_QSu4U`},Gu=600;function Ku(e,t,n){for(let r=1;r<=e.length;r++){let i=(t+n*r+e.length*r)%e.length,a=e[i];if(La(a)&&!a.disabled)return i}return-1}function qu(e){return e.findIndex(e=>La(e)&&!e.disabled)}function Ju(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(La(n)&&!n.disabled)return t}return-1}function Yu({items:e,children:t,onAction:n,isOpen:r,onOpenChange:i,placement:a=wt.Bottom,align:o=Tt.Start,presentation:s,className:u,style:d,classNames:p,styles:m,...h}){let g=r!==void 0,[_,v]=(0,c.useState)(!1),y=g?r:_,[b,x]=(0,c.useState)(-1),S=(0,c.useRef)([]),C=(0,c.useRef)(null),w=(0,c.useRef)(null),{restoreFocusToTrigger:T,focusAfterTrigger:E}=Ht({triggerRef:C,contentRef:w}),D=(0,c.useId)(),O=(0,c.useRef)(`first`),k=(0,c.useRef)({query:``,timer:void 0}),A=(0,c.useRef)(!1);function j(e,t=!1){e&&(A.current=t),g||v(e),i?.(e)}let M=(0,c.useRef)(e);(0,c.useEffect)(()=>{M.current=e}),(0,c.useEffect)(()=>{if(!y)return;if(!A.current){x(-1);return}let e=M.current,t=O.current===`last`?Ju(e):qu(e);x(t);let n=requestAnimationFrame(()=>{S.current[t]?.focus()});return()=>{cancelAnimationFrame(n),O.current=`first`}},[y]),(0,c.useEffect)(()=>()=>clearTimeout(k.current.timer),[]);function N(e){e<0||(x(e),S.current[e]?.focus())}function P(e){j(!1),e&&T()}function F(t){if(t.length!==1||!t.trim())return!1;clearTimeout(k.current.timer),k.current.query+=t.toLowerCase(),k.current.timer=setTimeout(()=>{k.current.query=``},Gu);let n=k.current.query,r=n.length>1&&[...n].every(e=>e===n[0]),i=r?n[0]:n,a=r||n.length===1?b:b-1;for(let t=1;t<=e.length;t++){let n=(a+t+e.length)%e.length,r=e[n];if(La(r)&&!r.disabled&&(S.current[n]?.textContent?.trim().toLowerCase()??``).startsWith(i))return N(n),!0}return!1}function I(t){if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(t.preventDefault(),t.stopPropagation(),y){N(t.key===`ArrowUp`?Ju(e):qu(e));return}O.current=t.key===`ArrowUp`?`last`:`first`,j(!0,!0)}}function L(t){switch(t.key){case`ArrowDown`:N(Ku(e,b,1));break;case`ArrowUp`:N(b<0?Ju(e):Ku(e,b,-1));break;case`Home`:N(qu(e));break;case`End`:N(Ju(e));break;case`Escape`:P(!0);break;case`Tab`:P(!1),t.shiftKey?T():E();break;default:if(!F(t.key))return}t.preventDefault(),t.stopPropagation()}function R(t){let r=e[t];La(r)&&!r.disabled&&(r.onClick?.(),n?.(r.id),P(!0))}let z=(0,c.isValidElement)(t)?(0,c.cloneElement)(t,{"aria-haspopup":t.props[`aria-haspopup`]??`menu`,"aria-expanded":t.props[`aria-expanded`]??y,"aria-controls":y?t.props[`aria-controls`]??D:t.props[`aria-controls`]}):t,B=(0,f.jsx)(`div`,{ref:w,id:D,role:`menu`,className:(0,l.default)(Wu.menu,p?.menu),style:m?.menu,onKeyDown:L,children:e.map((e,t)=>Fa(e)?(0,f.jsx)(`div`,{role:`separator`,className:(0,l.default)(Wu.menuSeparator,p?.separator),style:m?.separator},`separator-${t}`):Ia(e)?(0,f.jsx)(`div`,{role:`presentation`,className:(0,l.default)(Wu.menuHeading,p?.heading),style:m?.heading,children:e.heading},`heading-${t}`):(0,f.jsxs)(`button`,{ref:e=>{S.current[t]=e},type:`button`,role:`menuitem`,disabled:e.disabled,tabIndex:t===b?0:-1,className:(0,l.default)(Wu.menuItem,e.danger&&Wu.menuItemDanger,p?.item),style:m?.item,onClick:()=>R(t),onMouseEnter:()=>x(t),children:[e.icon!=null&&K(e.icon,{className:(0,l.default)(Wu.menuItemIcon,p?.itemIcon),style:m?.itemIcon}),(0,f.jsx)(`span`,{className:(0,l.default)(Wu.menuItemLabel,p?.itemLabel),style:m?.itemLabel,children:e.label}),e.shortcut!=null&&(0,f.jsx)(`span`,{className:(0,l.default)(Wu.menuItemShortcut,p?.itemShortcut),style:m?.itemShortcut,children:ka(e.shortcut)})]},e.id))});return(0,f.jsx)(rn,{...h,isOpen:y,onOpenChange:(e,{fromKeyboard:t})=>j(e,t),placement:a,align:o,presentation:s,content:B,focusOnOpen:!1,constrainWidth:!1,classNames:{panel:Wu.menuPanel},className:(0,l.default)(u,p?.root),style:{...d,...m?.root},children:(0,f.jsx)(`span`,{ref:C,className:(0,l.default)(Wu.menuTrigger,p?.trigger),style:m?.trigger,onKeyDown:I,children:z})})}function Xu(e,t){let n={};for(let r of e)La(r)&&!r.disabled&&r.shortcut&&(n[r.shortcut]=()=>{r.onClick?.(),t?.(r.id)});return n}var Zu={multiSelect:`multiSelect_fmViY`,"multiSelect-label":`multiSelect-label_asHZ1`,multiSelectLabel:`multiSelect-label_asHZ1`,"multiSelect-label-floating":`multiSelect-label-floating_d4-Om`,multiSelectLabelFloating:`multiSelect-label-floating_d4-Om`,"multiSelect-fieldset":`multiSelect-fieldset_Eo29l`,multiSelectFieldset:`multiSelect-fieldset_Eo29l`,"multiSelect-fieldset-focused":`multiSelect-fieldset-focused_ZC2P6`,multiSelectFieldsetFocused:`multiSelect-fieldset-focused_ZC2P6`,"multiSelect-fieldset-error":`multiSelect-fieldset-error_CWzEo`,multiSelectFieldsetError:`multiSelect-fieldset-error_CWzEo`,"multiSelect-fieldset-legend":`multiSelect-fieldset-legend_p-6nh`,multiSelectFieldsetLegend:`multiSelect-fieldset-legend_p-6nh`,"multiSelect-fieldset-legend-active":`multiSelect-fieldset-legend-active_M0L7g`,multiSelectFieldsetLegendActive:`multiSelect-fieldset-legend-active_M0L7g`,"multiSelect-control":`multiSelect-control_zLb7t`,multiSelectControl:`multiSelect-control_zLb7t`,"multiSelect-values":`multiSelect-values_k1Q8x`,multiSelectValues:`multiSelect-values_k1Q8x`,"multiSelect-chip":`multiSelect-chip_xqe8Q`,multiSelectChip:`multiSelect-chip_xqe8Q`,"multiSelect-placeholder":`multiSelect-placeholder_Tjrmh`,multiSelectPlaceholder:`multiSelect-placeholder_Tjrmh`,"multiSelect-placeholder-shown":`multiSelect-placeholder-shown_8v36t`,multiSelectPlaceholderShown:`multiSelect-placeholder-shown_8v36t`,multiSelectFadeIn:`multiSelectFadeIn_rOplX`,"multiSelect-placeholder-instant":`multiSelect-placeholder-instant_r9-TD`,multiSelectPlaceholderInstant:`multiSelect-placeholder-instant_r9-TD`,"multiSelect-clearButton":`multiSelect-clearButton_FKs0m`,multiSelectClearButton:`multiSelect-clearButton_FKs0m`,"multiSelect-icon":`multiSelect-icon_ovLu-`,multiSelectIcon:`multiSelect-icon_ovLu-`,"multiSelect-icon-open":`multiSelect-icon-open_h8VAu`,multiSelectIconOpen:`multiSelect-icon-open_h8VAu`,"multiSelect-disabled":`multiSelect-disabled_Hm8mv`,multiSelectDisabled:`multiSelect-disabled_Hm8mv`,"multiSelect-panel":`multiSelect-panel_VX7gU`,multiSelectPanel:`multiSelect-panel_VX7gU`,"multiSelect-search":`multiSelect-search_g4OHX`,multiSelectSearch:`multiSelect-search_g4OHX`,"multiSelect-options":`multiSelect-options_MGZCv`,multiSelectOptions:`multiSelect-options_MGZCv`,"multiSelect-option":`multiSelect-option_hbvPY`,multiSelectOption:`multiSelect-option_hbvPY`,"multiSelect-option-active":`multiSelect-option-active_mSWFG`,multiSelectOptionActive:`multiSelect-option-active_mSWFG`,"multiSelect-option-selected":`multiSelect-option-selected_mjPq-`,multiSelectOptionSelected:`multiSelect-option-selected_mjPq-`,"multiSelect-option-disabled":`multiSelect-option-disabled_qSgYz`,multiSelectOptionDisabled:`multiSelect-option-disabled_qSgYz`,"multiSelect-optionCheck":`multiSelect-optionCheck_-YKoj`,multiSelectOptionCheck:`multiSelect-optionCheck_-YKoj`,"multiSelect-optionLabel":`multiSelect-optionLabel_CFZke`,multiSelectOptionLabel:`multiSelect-optionLabel_CFZke`,"multiSelect-empty":`multiSelect-empty_MjABY`,multiSelectEmpty:`multiSelect-empty_MjABY`},Qu=[],$u={clearSelection:`Clear selection`,create:e=>`Add "${e}"`,searchPlaceholder:`Search…`,empty:`No matches`};function ed(e){let{items:t,value:n,defaultValue:r=[],onChange:i=()=>{},label:a=``,alwaysFloatLabel:o=!1,placeholder:s=``,searchable:p=!1,allowCustomValues:m=!1,maxSelected:h,clearable:g=!0,disabled:_=!1,readOnly:v=!1,presentation:y,formValidator:b=null,errorMessage:x=``,isValid:S=!0,className:C,style:w,classNames:T,styles:E,onMouseEnter:k,onMouseLeave:A,onFocus:j,onBlur:M,labels:N,...P}=D(`MultiSelect`,e),F=O(`MultiSelect`,N,$u),I=(0,c.useRef)(null),L=(0,c.useRef)(null),R=(0,c.useRef)(null),z=(0,c.useRef)(null),B=(0,c.useId)(),[V,H]=(0,c.useState)(r),[U,W]=(0,c.useState)(!1),[G,ee]=(0,c.useState)(``),[K,te]=(0,c.useState)(0),[q,ne]=(0,c.useState)(!1),[J,re]=(0,c.useState)(!1),[ie,ae]=(0,c.useState)(),oe=(0,c.useRef)(b),[,se]=(0,c.useState)(0);(0,c.useEffect)(()=>{oe.current=b;let e=oe.current;if(!e)return;e.label=a,e.validate();let t=()=>se(e=>e+1);return e.registerOnUpdateListener(t),()=>{e.removeOnUpdateListener(t)}},[b,a]);let ce=n!==void 0&&!b,le=b?b.value:ce?n:V,ue=Array.isArray(le)?le:Qu,Y=b?b.touched&&b.hasError():!S||!!x,de=b?b.getCurrentErrorMessage():x||``,fe=!_&&!v,pe=h!==void 0&&ue.length>=h,me=o||U||q||ue.length>0,X=p||m,Z=G.trim(),he=X?Z.toLowerCase():``,ge=he?t.filter(e=>e.label.toLowerCase().includes(he)):t,_e=m&&Z.length>0&&!pe&&!t.some(e=>e.label.toLowerCase()===he||String(e.key).toLowerCase()===he)&&!ue.some(e=>String(e).toLowerCase()===he),ve=_e?[...ge,{key:Z,label:F.create(Z)}]:ge,ye=ue.map(e=>t.find(t=>t.key===e)??(m?{key:e,label:String(e)}:void 0)).filter(e=>e!==void 0);function be(e){b?b.set(e):ce||H(e),i(e)}function xe(e){fe&&!e.disabled&&(ue.includes(e.key)?be(ue.filter(t=>t!==e.key)):pe||be([...ue,e.key]),_e&&e.key===Z&&ee(``))}function Se(){I.current?.contains(document.activeElement)&&L.current?.focus()}function Ce(e){(!e||fe)&&(W(e),e?(ae(L.current?.offsetWidth),te(0)):(ee(``),oe.current&&(oe.current.touched=!0)))}(0,c.useEffect)(()=>{U&&X&&R.current?.querySelector(`input`)?.focus()},[U,X]),(0,c.useEffect)(()=>{U&&Pa(z.current,document.getElementById(`${B}-${K}`))},[U,K,B]);let we={isDisabled:e=>{let t=ve[e];return!!t.disabled||pe&&!ue.includes(t.key)}};function Te(e){if(fe){if(!U){e.key===`ArrowDown`||e.key===`Enter`||e.key===` `?(e.preventDefault(),Ce(!0)):e.key===`Backspace`&&ue.length>0&&be(ue.slice(0,-1));return}if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),te(Ma(K,e.key===`ArrowDown`?1:-1,ve.length,we)??0);else if(e.key===`Home`||e.key===`End`)e.preventDefault(),te(Na(e.key===`Home`?`first`:`last`,ve.length,we)??0);else if(e.key===`Enter`){e.preventDefault();let t=ve[K];t&&xe(t)}else e.key===`Backspace`&&!G&&ue.length>0&&be(ue.slice(0,-1))}}let Ee=(0,f.jsxs)(`div`,{className:(0,l.default)(Zu.multiSelectPanel,T?.panel),style:E?.panel,children:[X&&(0,f.jsx)(`div`,{ref:R,className:(0,l.default)(Zu.multiSelectSearch,T?.search),style:E?.search,children:(0,f.jsx)(Iu,{value:G,onChange:e=>{ee(e),te(0)},placeholder:F.searchPlaceholder,onKeyDown:Te})}),(0,f.jsx)(`div`,{ref:z,id:B,role:`listbox`,"aria-multiselectable":`true`,"aria-label":a||void 0,className:(0,l.default)(Zu.multiSelectOptions,T?.options),style:E?.options,children:ve.length===0?(0,f.jsx)(`div`,{className:(0,l.default)(Zu.multiSelectEmpty,T?.empty),style:E?.empty,children:F.empty}):ve.map((e,t)=>{let n=ue.includes(e.key),r=e.disabled||pe&&!n;return(0,f.jsxs)(`div`,{id:`${B}-${t}`,role:`option`,"aria-selected":n,"aria-disabled":r||void 0,className:(0,l.default)(Zu.multiSelectOption,t===K&&Zu.multiSelectOptionActive,n&&Zu.multiSelectOptionSelected,r&&Zu.multiSelectOptionDisabled,T?.option),style:E?.option,onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>te(t),onClick:()=>xe(e),children:[(0,f.jsx)(`span`,{className:(0,l.default)(Zu.multiSelectOptionCheck,T?.optionCheck),style:E?.optionCheck,children:n&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faCheck})}),(0,f.jsx)(`span`,{className:(0,l.default)(Zu.multiSelectOptionLabel,T?.optionLabel),style:E?.optionLabel,children:e.label})]},e.key)})})]});return(0,f.jsxs)(`div`,{...P,ref:I,className:(0,l.default)(Zu.multiSelect,_&&Zu.multiSelectDisabled,T?.root,C),style:{...w,...E?.root},onMouseEnter:e=>{re(!0),k?.(e)},onMouseLeave:e=>{re(!1),A?.(e)},onFocus:e=>{ne(!0),j?.(e)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(ne(!1),M?.(e))},children:[(0,f.jsx)(rn,{isOpen:U,onOpenChange:Ce,trigger:Et.Click,placement:wt.Bottom,align:Tt.Start,offset:4,withArrow:!1,focusOnOpen:X,constrainWidth:!1,width:`trigger`,disabled:!fe,presentation:y,content:Ee,styles:{panel:ie?{minWidth:ie}:void 0},children:(0,f.jsxs)(`div`,{ref:L,role:`combobox`,tabIndex:_?-1:0,"aria-expanded":U,"aria-haspopup":`listbox`,"aria-controls":B,"aria-activedescendant":U&&ve.length>0?`${B}-${K}`:void 0,"aria-disabled":_||void 0,"aria-readonly":v||void 0,className:(0,l.default)(Zu.multiSelectControl,T?.control),style:E?.control,onKeyDown:Te,children:[s&&ye.length===0&&(0,f.jsx)(`span`,{className:(0,l.default)(Zu.multiSelectPlaceholder,(!a||me)&&Zu.multiSelectPlaceholderShown,!a&&Zu.multiSelectPlaceholderInstant,T?.placeholder),style:E?.placeholder,children:s}),(0,f.jsx)(`div`,{className:(0,l.default)(Zu.multiSelectValues,T?.values),style:E?.values,children:ye.map(e=>(0,f.jsx)(Ai,{text:e.label,showRemoveIcon:fe,labels:{remove:`Remove ${e.label}`},onMouseDown:e=>e.preventDefault(),onRemove:()=>{xe(e),Se()},className:(0,l.default)(Zu.multiSelectChip,T?.chip),style:E?.chip},e.key))}),g&&fe&&ue.length>0&&(0,f.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":F.clearSelection,className:(0,l.default)(Zu.multiSelectClearButton,T?.clearButton),style:E?.clearButton,onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),be([]),Se()},children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faXmark})}),(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronDown,className:(0,l.default)(Zu.multiSelectIcon,U&&Zu.multiSelectIconOpen,T?.icon),style:E?.icon}),a&&(0,f.jsx)(`div`,{className:(0,l.default)(Zu.multiSelectLabel,me&&Zu.multiSelectLabelFloating,T?.label),style:E?.label,children:a}),(0,f.jsx)(`fieldset`,{className:(0,l.default)(Zu.multiSelectFieldset,(q||U)&&Zu.multiSelectFieldsetFocused,Y&&Zu.multiSelectFieldsetError,T?.fieldset),style:E?.fieldset,children:(0,f.jsx)(`legend`,{className:(0,l.default)(Zu.multiSelectFieldsetLegend,me&&Zu.multiSelectFieldsetLegendActive),children:(0,f.jsx)(`span`,{children:a})})})]})}),(0,f.jsx)(Fi,{variant:`error`,message:de,isVisible:Y&&(q||J)})]})}var td={"numberInput-split":`numberInput-split_1kFLr`,numberInputSplit:`numberInput-split_1kFLr`,arrowSuffix:`arrowSuffix_QECPG`,arrows:`arrows_yjRlc`,arrowBtn:`arrowBtn_DbJoa`,split:`split_FYvfQ`,splitBtn:`splitBtn_MquuB`,"split-invalid":`split-invalid_F94dA`,splitInvalid:`split-invalid_F94dA`},nd=400,rd=120,id=50,ad=1e3;function od(e){let t=(0,c.useRef)(null),n=(0,c.useRef)(null),r=(0,c.useRef)(e);r.current=e;let i=(0,c.useRef)(null),a=(0,c.useCallback)(()=>{if(t.current!==null&&(clearTimeout(t.current),t.current=null),n.current!==null&&(clearInterval(n.current),n.current=null),typeof window>`u`)return;let{onEndEvent:e}=i.current;window.removeEventListener(`pointerup`,e),window.removeEventListener(`pointercancel`,e),window.removeEventListener(`pointermove`,e),window.removeEventListener(`blur`,e),document.removeEventListener(`visibilitychange`,e)},[]);i.current={stop:a,onEndEvent:e=>{(e.type!==`pointermove`||e.buttons===0)&&(e.type!==`visibilitychange`||document.hidden)&&i.current.stop()}};let o=(0,c.useCallback)((e,o)=>{a();let{onEndEvent:s}=i.current;window.addEventListener(`pointerup`,s),window.addEventListener(`pointercancel`,s),window.addEventListener(`pointermove`,s),window.addEventListener(`blur`,s),document.addEventListener(`visibilitychange`,s);let c=()=>{r.current(e*o)||a()};c(),t.current=setTimeout(()=>{t.current=null;let e=Date.now(),r=!1,i=()=>{c(),n.current!==null&&!r&&Date.now()-e>=ad&&(r=!0,n.current!==null&&clearInterval(n.current),n.current=setInterval(i,id))};n.current=setInterval(i,rd)},nd)},[a]);return(0,c.useEffect)(()=>a,[a]),{start:o,stop:a}}var sd={increase:`Increase`,decrease:`Decrease`};function cd({label:e,disabled:t,direction:n,onStart:r,onStop:i}){return{tabIndex:-1,disabled:t,"aria-label":e,onPointerDown:e=>{(e.button===0||e.pointerType!==`mouse`)&&(e.preventDefault(),r(n,e.shiftKey?10:1))},onPointerUp:i,onPointerCancel:i,onContextMenu:e=>e.preventDefault()}}function ld(e){return(0,f.jsx)(`button`,{type:`button`,...cd(e),className:(0,l.default)(td.arrowBtn,e.className),style:e.style,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:e.icon,"aria-hidden":`true`})})}function ud(e){let{disabled:t,...n}=cd(e);return(0,f.jsx)(ne,{...n,className:(0,l.default)(td.splitBtn,e.className),style:e.style,size:B.Icon,disabled:t,icon:e.icon})}function dd(e){let t=c.default.useRef(void 0),{value:n,onChange:r,formValidator:i,label:a,error:o,className:s,style:u,classNames:p,styles:m,allowNegative:h=!1,decimalSeparator:g,thousandSeparator:v,prefix:y,suffix:b,decimalScale:x,fixedDecimalScale:S=!0,placeholder:C,sign:w,showArrows:T=!1,step:E=1,min:k,max:A,arrowsLayout:j=`auto`,labels:M,readOnly:N=!1,disabled:P=!1,isRequired:F=!1,onKeyDown:I,ref:L,...R}=D(`NumberInput`,e),z=O(`NumberInput`,M,sd),[,B]=c.default.useState(0);c.default.useEffect(()=>{if(t.current=i,!i)return;let e=()=>B(e=>e+1);return i.registerOnUpdateListener(e),()=>{i.removeOnUpdateListener(e)}},[i]);let V=F||!!i?.validators.find(e=>e.validatorId===`required`),H=i==null?n:i.value,U=w!=null&&H!=null?Math.abs(Number(H)):H,W=U==null?``:String(U);function G(e){let t=e;t!==void 0&&(w===`-`&&(t=-Math.abs(t)),w===`+`&&(t=Math.abs(t))),i?.set(t??null),r?.(t)}function ee(e){let t=e;return!h&&w!==`-`&&(t=Math.max(0,t)),w===`-`&&(t=Math.min(0,t)),k!==void 0&&(t=Math.max(k,t)),A!==void 0&&(t=Math.min(A,t)),t}let K=H!=null&&H!==``?Number(H):0;function te(){if(N||P||H==null||H===``)return;let e=Number(H);if(!Number.isFinite(e))return;let t=ee(e);t!==e&&G(t)}function q(e){if(N||P)return!1;let t=ee(K+e);return t!==K&&(G(t),!0)}let{start:ne,stop:J}=od(e=>q(e*E));function re(e){if(e.key===`Enter`){te(),I?.(e);return}if(!oe){I?.(e);return}if(e.key===`ArrowUp`){e.preventDefault(),q(e.shiftKey?E*10:E);return}if(e.key===`ArrowDown`){e.preventDefault(),q(e.shiftKey?-E*10:-E);return}I?.(e)}let ie=w===`-`?`-`:w===`+`?`+`:y,ae=xe(),oe=T&&!N&&!P,se=j===`split`||j===`auto`&&ae,ce=ee(K+E)!==K,le=ee(K-E)!==K,ue={onStart:ne,onStop:J},Y=oe&&!se?(0,f.jsxs)(`div`,{className:(0,l.default)(td.arrows,p?.arrows),style:m?.arrows,children:[(0,f.jsx)(ld,{className:p?.increaseButton,style:m?.increaseButton,label:z.increase,icon:d.faChevronUp,disabled:!ce,direction:1,...ue}),(0,f.jsx)(ld,{className:p?.decreaseButton,style:m?.decreaseButton,label:z.decrease,icon:d.faChevronDown,disabled:!le,direction:-1,...ue})]}):null,de=oe?{role:`spinbutton`,"aria-valuenow":Number.isFinite(K)?K:void 0,"aria-valuemin":k,"aria-valuemax":A,"aria-valuetext":W||void 0}:{},fe=i?!i.touched||!i.hasError():!o,pe=oe&&se,me=(0,f.jsx)(Gi,{label:a,className:(0,l.default)(td.numberInput,{[td.numberInputSplit]:pe},pe?void 0:s,pe?void 0:p?.root,p?.input),style:{...pe?void 0:u,...pe?void 0:m?.root,...m?.input},value:W,onChange:()=>{},formValidator:null,isRequired:V,onBlur:()=>{te(),t.current&&(t.current.touched=!0)},isValid:fe,errorMessage:i?i.touched?i.getCurrentErrorMessage()??``:``:o??``,placeholder:C,readOnly:N,disabled:P,suffix:Y,classNames:Y?{suffix:td.arrowSuffix}:void 0,inputMode:x===0?`numeric`:`decimal`,customInput:(0,f.jsx)(_.NumericFormat,{onValueChange:e=>G(e.floatValue),allowNegative:w==null&&h,decimalSeparator:g,thousandSeparator:v,decimalScale:x,fixedDecimalScale:S,prefix:ie,suffix:b,onKeyDown:re,getInputRef:L,...de,...R})});return pe?(0,f.jsxs)(fn,{className:(0,l.default)(td.split,{[td.splitInvalid]:!fe},s,p?.root),style:{...u,...m?.root},children:[(0,f.jsx)(ud,{className:p?.decreaseButton,style:m?.decreaseButton,label:z.decrease,icon:d.faMinus,disabled:!le,direction:-1,...ue}),me,(0,f.jsx)(ud,{className:p?.increaseButton,style:m?.increaseButton,label:z.increase,icon:d.faPlus,disabled:!ce,direction:1,...ue})]}):me}var fd=dd,pd=function(e){return e.Numeric=`numeric`,e.Alphanumeric=`alphanumeric`,e}({}),md={otpInput:`otpInput_5-tug`,"otpInput-label":`otpInput-label_T9X7O`,otpInputLabel:`otpInput-label_T9X7O`,"otpInput-requiredMark":`otpInput-requiredMark_FNY2c`,otpInputRequiredMark:`otpInput-requiredMark_FNY2c`,"otpInput-boxes":`otpInput-boxes_FhhIF`,otpInputBoxes:`otpInput-boxes_FhhIF`,"otpInput-boxes-shake":`otpInput-boxes-shake_c50KX`,otpInputBoxesShake:`otpInput-boxes-shake_c50KX`,otpInputShake:`otpInputShake_TljCu`,"otpInput-boxWrapper":`otpInput-boxWrapper_ezHbo`,otpInputBoxWrapper:`otpInput-boxWrapper_ezHbo`,"otpInput-box":`otpInput-box_AB6Kx`,otpInputBox:`otpInput-box_AB6Kx`,"otpInput-box-filled":`otpInput-box-filled_npNOF`,otpInputBoxFilled:`otpInput-box-filled_npNOF`,"otpInput-box-error":`otpInput-box-error_8kLDb`,otpInputBoxError:`otpInput-box-error_8kLDb`,"otpInput-separator":`otpInput-separator_SArCq`,otpInputSeparator:`otpInput-separator_SArCq`,"otpInput-disabled":`otpInput-disabled_bzwE9`,otpInputDisabled:`otpInput-disabled_bzwE9`},hd=/[0-9]/g,gd=/[a-zA-Z0-9]/g,_d={field:`One-time code`,digit:(e,t)=>`Digit ${e} of ${t}`};function vd(e,t){let n=t===pd.Alphanumeric?gd:hd;return(e.match(n)||[]).join(``)}function yd(e){let{length:t=6,value:n,onChange:r=()=>{},onComplete:i=()=>{},formValidator:a=null,charset:o=pd.Numeric,masked:s=!1,groupAfter:u=[],label:d=``,isValid:p=!0,errorMessage:m=``,isRequired:h=!1,clearOnError:g=!1,clearErrorDelay:_=900,disabled:v=!1,autoFocus:y=!1,className:b=``,style:x,classNames:S,styles:C,labels:w,...T}=D(`OtpInput`,e),E=O(`OtpInput`,w,_d),k=(a?a.value:n)??``,[,A]=(0,c.useState)(0),[j,M]=(0,c.useState)(!1),[N,P]=(0,c.useState)(!1),[F,I]=(0,c.useState)(!1),[L,R]=(0,c.useState)(!1),[z,B]=(0,c.useState)(!1),V=(0,c.useRef)([]);(0,c.useEffect)(()=>{if(!a)return;a.validate();let e=()=>A(e=>e+1);return a.registerOnUpdateListener(e),()=>a.removeOnUpdateListener(e)},[a]),(0,c.useEffect)(()=>{if(!y)return;let e=Math.min(k.length,t-1);V.current[e]?.focus()},[]);let H=a?a.touched&&a.hasError():!p||!!m,U=a?a.getCurrentErrorMessage():m||``;H!==z&&(B(H),H&&M(!0),R(H&&g)),(0,c.useEffect)(()=>{if(!j)return;let e=window.setTimeout(()=>M(!1),400);return()=>window.clearTimeout(e)},[j]),(0,c.useEffect)(()=>{if(!L||!g)return;let e=window.setTimeout(()=>{R(!1),W(``),V.current[0]?.focus()},_);return()=>window.clearTimeout(e)},[L,g,_]);function W(e){let n=k.length===t,s=vd(e,o).slice(0,t);a&&a.set(s),r?.(s),s.length===t&&!n&&i?.(s)}function G(e,t){let n=k.split(``);n[e]=t,W(n.join(``))}function ee(e,n){if(v)return;if(n===``){G(e,``);return}let r=vd(n,o);if(!r)return;let i=Math.min(e,k.length);if(n.length>1){K(i,r);return}G(i,r),i<t-1?V.current[i+1]?.focus():V.current[i]?.blur()}function K(e,n){let r=vd(n,o);if(!r)return;let i=k.padEnd(t,` `).split(``),a=e;for(let e of r){if(a>=t)break;i[a]=e,a+=1}W(i.join(``).trimEnd());let s=Math.min(a,t-1);V.current[s]?.focus(),a>=t&&V.current[t-1]?.blur()}function te(e,t){if(v)return;let n=t.clipboardData.getData(`text`);n&&(t.preventDefault(),K(Math.min(e,k.length),n))}function q(e,n){if(!v){if(n.key.length===1&&!n.ctrlKey&&!n.metaKey&&!n.altKey){let r=vd(n.key,o);if(r&&k[e]===r){n.preventDefault(),G(e,r),e<t-1?V.current[e+1]?.focus():V.current[e]?.blur();return}}if(n.key===`Backspace`){if(k[e]){G(e,``);return}e>0&&(n.preventDefault(),G(e-1,``),V.current[e-1]?.focus());return}if(n.key===`Delete`){k[e]&&G(e,``);return}if(n.key===`ArrowLeft`&&e>0){n.preventDefault(),V.current[e-1]?.focus();return}n.key===`ArrowRight`&&e<t-1&&(n.preventDefault(),V.current[e+1]?.focus())}}function ne(e){e.target.select()}function J(){P(!0)}function re(e){e.currentTarget.contains(e.relatedTarget)||(P(!1),a&&(a.touched=!0))}return(0,f.jsxs)(`div`,{...T,className:(0,l.default)(md.otpInput,v&&md.otpInputDisabled,b),style:x,children:[d&&(0,f.jsxs)(`div`,{className:(0,l.default)(md.otpInputLabel,S?.label),style:C?.label,children:[d,h&&(0,f.jsx)(`span`,{className:md.otpInputRequiredMark,children:` *`})]}),(0,f.jsx)(`div`,{role:`group`,"aria-label":d||E.field,className:(0,l.default)(md.otpInputBoxes,j&&md.otpInputBoxesShake,S?.inputs),style:C?.inputs,onFocus:J,onBlur:re,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),children:Array.from({length:t},(e,n)=>{let r=k[n]||``;return(0,f.jsxs)(`div`,{className:md.otpInputBoxWrapper,children:[(0,f.jsx)(`input`,{ref:e=>{V.current[n]=e},type:s?`password`:`text`,inputMode:o===pd.Numeric?`numeric`:`text`,pattern:o===pd.Numeric?`[0-9]*`:void 0,autoComplete:n===0?`one-time-code`:`off`,maxLength:1,disabled:v,value:r,"aria-label":E.digit(n+1,t),"aria-invalid":H||void 0,className:(0,l.default)(md.otpInputBox,H&&md.otpInputBoxError,r&&md.otpInputBoxFilled,S?.input),style:C?.input,onChange:e=>ee(n,e.target.value),onKeyDown:e=>q(n,e),onPaste:e=>te(n,e),onFocus:ne}),u.includes(n+1)&&n<t-1&&(0,f.jsx)(`span`,{className:(0,l.default)(md.otpInputSeparator,S?.separator),style:C?.separator})]},n)})}),(0,f.jsx)(Fi,{variant:`error`,message:U,isVisible:H&&(N||F)})]})}var bd=768;function xd(){let[e,t]=(0,c.useState)(()=>({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<bd}));return(0,c.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<bd})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}var Sd={overscroll:`overscroll_Ij750`,"overscroll-header":`overscroll-header_S6vYc`,overscrollHeader:`overscroll-header_S6vYc`,"overscroll-header-centered":`overscroll-header-centered_8VlsP`,overscrollHeaderCentered:`overscroll-header-centered_8VlsP`,"overscroll-header-container":`overscroll-header-container_iignp`,overscrollHeaderContainer:`overscroll-header-container_iignp`};function Cd({children:e=null,overscrollContent:t=null,overscrollContentDesktop:n=null,centerHeader:r=!0,min:i=10,max:a=80,start:o=30,unit:s=`%`,mobileOnly:u=!0,onScrollChange:d=()=>{},scrollDisabled:p=!1}){let{isMobileSize:m,height:h}=xd(),g=(0,c.useRef)(null),_=(0,c.useRef)(null),v=(0,c.useRef)(null),y=(0,c.useRef)(!1),b=(0,c.useRef)(null),x=(0,c.useRef)(d);(0,c.useEffect)(()=>{x.current=d});let S=(0,c.useCallback)(e=>{let t;if(s===`%`){if(!v.current)return;let n=v.current.clientHeight;t=Math.max(n*i/100,n-e)}else t=Math.max(i,a-e);_.current&&(_.current.style.height=`${t}px`)},[i,a,s]),C=(0,c.useCallback)(()=>{let e;if(s===`%`){if(!v.current)return;let t=v.current.clientHeight/a*100;e=v.current.clientHeight-o/100*t}else e=a-o;g.current&&(g.current.scrollTop=e,S(e))},[a,o,s,S]);(0,c.useEffect)(()=>{let e=setTimeout(C,100);return()=>clearTimeout(e)},[C]),(0,c.useEffect)(()=>{g.current&&(g.current.style.overflow=p?`hidden`:`auto`)},[p]);let w=(0,c.useRef)(m);(0,c.useEffect)(()=>{m&&!w.current&&C(),w.current=m},[m,C]);let T=(0,c.useRef)(u);(0,c.useEffect)(()=>{!u&&T.current&&C(),T.current=u},[u,C]);let E=(0,c.useRef)(h);(0,c.useEffect)(()=>{m&&h!==E.current&&g.current&&S(g.current.scrollTop),E.current=h},[h,m,S]);function D(e){S(e.currentTarget.scrollTop),y.current||(y.current=!0,x.current(!0)),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{b.current=null,y.current=!1,x.current(!1)},500)}if(u&&!m)return n?(0,f.jsxs)(`div`,{children:[n,e]}):(0,f.jsx)(f.Fragment,{children:e});let O=s===`%`?`${100-i}%`:`calc(100% - ${i}px)`;return(0,f.jsxs)(`div`,{className:Sd.overscroll,ref:g,onScroll:D,children:[(0,f.jsx)(`div`,{className:Sd.overscrollHeaderContainer,style:{height:`${a}${s}`},ref:v,children:(0,f.jsx)(`div`,{className:(0,l.default)(Sd.overscrollHeader,r&&Sd.overscrollHeaderCentered),ref:_,children:t})}),(0,f.jsx)(`div`,{style:{minHeight:O},children:e})]})}var wd={pagination:`pagination_Pbz1I`,"pagination-item":`pagination-item_2SyYK`,paginationItem:`pagination-item_2SyYK`,"pagination-control":`pagination-control_T0gUc`,paginationControl:`pagination-control_T0gUc`,"pagination-item-active":`pagination-item-active_MgtgT`,paginationItemActive:`pagination-item-active_MgtgT`,"pagination-ellipsis":`pagination-ellipsis_jU--t`,paginationEllipsis:`pagination-ellipsis_jU--t`},Td=`dots`,Ed={goToPage:e=>`Go to page ${e}`,first:`Go to first page`,previous:`Go to previous page`,next:`Go to next page`,last:`Go to last page`};function Dd(e,t){return t<e?[]:Array.from({length:t-e+1},(t,n)=>e+n)}function Od(e,t){return Math.max(1,Math.min(t,Math.round(e)))}function kd(e,t,n,r){if(n*2+r*2+3>=t)return Dd(1,t);let i=Dd(1,r),a=Dd(t-r+1,t),o=i.length>0?[Td]:[],s=a.length>0?[Td]:[],c=Math.max(e-n,r+1),l=Math.min(e+n,t-r),u=c>r+2,d=l<t-r-1;return!u&&d?[...Dd(1,r+n*2+2),...s,...a]:u&&!d?[...i,...o,...Dd(t-r-n*2-1,t)]:[...i,...o,...Dd(c,l),...s,...a]}function Ad(e){let{total:t,page:n,defaultPage:r=1,onChange:i=()=>{},siblings:a=1,boundaries:o=1,showControls:s=!0,showEdges:u=!1,disabled:p=!1,previousIcon:m=d.faChevronLeft,nextIcon:h=d.faChevronRight,firstIcon:g=d.faAnglesLeft,lastIcon:_=d.faAnglesRight,"aria-label":v=`Pagination`,className:y,style:b,classNames:x,styles:S,labels:C,...w}=D(`Pagination`,e),T=O(`Pagination`,C,Ed),E=n!==void 0,[k,A]=(0,c.useState)(r),j=Od(E?n:k,t);if(t<1)return null;function M(e){let n=Od(e,t);n!==j&&(E||A(n),i(n))}let N=(0,l.default)(wd.paginationControl,x?.control);function P(e,t,n,r,i){return(0,f.jsx)(`button`,{type:`button`,className:N,style:S?.control,"aria-label":t,disabled:p||i,onClick:()=>M(r),children:K(n)},e)}let F=j<=1,I=j>=t;return(0,f.jsxs)(`nav`,{...w,"aria-label":v,className:(0,l.default)(wd.pagination,x?.root,y),style:{...b,...S?.root},children:[u&&P(`first`,T.first,g,1,F),s&&P(`previous`,T.previous,m,j-1,F),kd(j,t,a,o).map((e,t)=>e===Td?(0,f.jsx)(`span`,{"aria-hidden":`true`,className:(0,l.default)(wd.paginationEllipsis,x?.ellipsis),style:S?.ellipsis,children:`…`},`dots-${t}`):(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(wd.paginationItem,e===j&&wd.paginationItemActive,x?.item),style:S?.item,"aria-label":T.goToPage(e),"aria-current":e===j?`page`:void 0,disabled:p,onClick:()=>M(e),children:e},e)),s&&P(`next`,T.next,h,j+1,I),u&&P(`last`,T.last,_,t,I)]})}var jd={progressBar:`progressBar_LO0sX`,"progressBar-fill":`progressBar-fill_rt32j`,progressBarFill:`progressBar-fill_rt32j`,"progressBar-fill-end":`progressBar-fill-end_71wL3`,progressBarFillEnd:`progressBar-fill-end_71wL3`,"progressBar-label":`progressBar-label_jWud2`,progressBarLabel:`progressBar-label_jWud2`};function Md(e){let t=e.replace(`#`,``),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16);return(.299*n+.587*r+.114*i)/255>.5?`#000000`:`#ffffff`}function Nd({className:e=void 0,total:t=100,progress:n=0,style:r=void 0,classNames:i,styles:a,...o}){function s(){let e=[];return Array.isArray(n)?e.push(...n):typeof n==`object`?e.push(n):e.push({amount:n}),e.map((n,r)=>{let o=t?n.amount/t*100:0;return(0,f.jsx)(`div`,{className:(0,l.default)(jd.progressBarFill,r===e.length-1&&jd.progressBarFillEnd,n.class,i?.fill),style:{width:`${o}%`,background:n.color||void 0,...a?.fill},title:n.label?`${n.label}: ${n.amount}`:void 0,children:n.label&&(0,f.jsx)(`div`,{className:(0,l.default)(jd.progressBarLabel,i?.label),style:{...n.color?{color:Md(n.color)}:{},...a?.label},children:n.label})},r)})}return(0,f.jsx)(`div`,{...o,className:(0,l.default)(jd.progressBar,e,i?.root),style:{...r,...a?.root},children:s()})}var Pd=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),Fd={radioGroup:`radioGroup_5PUYO`,"radioGroup-horizontal":`radioGroup-horizontal_cfCch`,radioGroupHorizontal:`radioGroup-horizontal_cfCch`,"radioGroup-disabled":`radioGroup-disabled_O2hKy`,radioGroupDisabled:`radioGroup-disabled_O2hKy`,"radioGroup-error":`radioGroup-error_HVUcn`,radioGroupError:`radioGroup-error_HVUcn`,"radioGroup-radio":`radioGroup-radio_XLU2j`,radioGroupRadio:`radioGroup-radio_XLU2j`,"radioGroup-radio-checked":`radioGroup-radio-checked_AOEJu`,radioGroupRadioChecked:`radioGroup-radio-checked_AOEJu`,"radioGroup-option":`radioGroup-option_QxMeW`,radioGroupOption:`radioGroup-option_QxMeW`,"radioGroup-option-disabled":`radioGroup-option-disabled_Q0y35`,radioGroupOptionDisabled:`radioGroup-option-disabled_Q0y35`,"radioGroup-dot":`radioGroup-dot_Q-4Ge`,radioGroupDot:`radioGroup-dot_Q-4Ge`,"radioGroup-dot-checked":`radioGroup-dot-checked_7djgv`,radioGroupDotChecked:`radioGroup-dot-checked_7djgv`,"radioGroup-text":`radioGroup-text_8ekBs`,radioGroupText:`radioGroup-text_8ekBs`,"radioGroup-label":`radioGroup-label_hJD2S`,radioGroupLabel:`radioGroup-label_hJD2S`,"radioGroup-description":`radioGroup-description_xZSLE`,radioGroupDescription:`radioGroup-description_xZSLE`};function Id(e){let{options:t=[],value:n,defaultValue:r,onChange:i=()=>{},orientation:a=Pd.Vertical,disabled:o=!1,size:s,tabIndex:u=0,formValidator:d=null,errorMessage:p=``,isValid:m=!0,className:h,style:g,classNames:_,styles:v,...y}=D(`RadioGroup`,e),b=(0,c.useRef)([]),x=(0,c.useRef)(d);(0,c.useEffect)(()=>{x.current=d});let[,S]=(0,c.useState)(0),[C,w]=(0,c.useState)(r),[T,E]=(0,c.useState)(!1),[O,k]=(0,c.useState)(!1);(0,c.useEffect)(()=>{if(!d)return;d.validate();let e=()=>S(e=>e+1);return d.registerOnUpdateListener(e),()=>d.removeOnUpdateListener(e)},[d]);let A=d?d.touched&&d.hasError():!m||!!p,j=d?d.getCurrentErrorMessage():p||``,M=n!==void 0&&!d,N=d?d.value:M?n:C;function P(e,t){d?d.set(e):M||w(e),i(e,t)}function F(e){e.currentTarget.contains(e.relatedTarget)||(E(!1),x.current&&(x.current.touched=!0))}let I=t.findIndex(e=>e.value===N),L=t.findIndex(e=>!e.disabled),R=I>=0?I:L;function z(e){b.current[e]?.focus()}function B(e,n,r){if(o||t.length===0)return;let i=n;for(let n=0;n<t.length;n++)if(i=(i+e+t.length)%t.length,!t[i].disabled){z(i),P(t[i].value,r);return}}function V(e,n){let r=t[n];switch(e.key){case`ArrowDown`:case`ArrowRight`:e.preventDefault(),B(1,n,e);break;case`ArrowUp`:case`ArrowLeft`:e.preventDefault(),B(-1,n,e);break;case` `:case`Enter`:e.preventDefault(),!o&&!r.disabled&&P(r.value,e)}}return(0,f.jsxs)(`div`,{...y,role:`radiogroup`,"aria-orientation":a,"aria-disabled":o||void 0,"aria-invalid":A||void 0,className:(0,l.default)(Fd.radioGroup,a===Pd.Horizontal&&Fd.radioGroupHorizontal,o&&Fd.radioGroupDisabled,A&&Fd.radioGroupError,h,_?.root),style:{...s?{"--radio-size":s}:null,...g,...v?.root},onFocus:()=>E(!0),onBlur:F,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),children:[t.map((e,t)=>{let n=e.value===N,r=o||!!e.disabled;return(0,f.jsxs)(`div`,{ref:e=>{b.current[t]=e},role:`radio`,"aria-checked":n,"aria-disabled":r||void 0,tabIndex:r?-1:t===R?u:-1,className:(0,l.default)(Fd.radioGroupOption,n&&Fd.radioGroupOptionChecked,r&&Fd.radioGroupOptionDisabled,_?.option),style:v?.option,onClick:()=>{r||P(e.value)},onKeyDown:e=>V(e,t),children:[(0,f.jsx)(`div`,{className:(0,l.default)(Fd.radioGroupRadio,n&&Fd.radioGroupRadioChecked,_?.radio),style:v?.radio,children:(0,f.jsx)(`div`,{className:(0,l.default)(Fd.radioGroupDot,n&&Fd.radioGroupDotChecked,_?.dot),style:v?.dot})}),(e.label??e.value)!==``&&(0,f.jsxs)(`div`,{className:Fd.radioGroupText,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Fd.radioGroupLabel,_?.label),style:v?.label,children:e.label??e.value}),e.description!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(Fd.radioGroupDescription,_?.description),style:v?.description,children:e.description})]})]},String(e.value))}),(0,f.jsx)(Fi,{variant:`error`,message:j,isVisible:A&&(T||O)})]})}var Ld={rating:`rating_eDKeX`,"rating-disabled":`rating-disabled_Xk0cI`,ratingDisabled:`rating-disabled_Xk0cI`,"rating-readOnly":`rating-readOnly_o8Kx1`,ratingReadOnly:`rating-readOnly_o8Kx1`,"rating-item":`rating-item_4tqx2`,ratingItem:`rating-item_4tqx2`,"rating-iconEmpty":`rating-iconEmpty_3uk2A`,ratingIconEmpty:`rating-iconEmpty_3uk2A`,"rating-iconFilledClip":`rating-iconFilledClip_4aNxG`,ratingIconFilledClip:`rating-iconFilledClip_4aNxG`,"rating-iconFilled":`rating-iconFilled_-rQ58`,ratingIconFilled:`rating-iconFilled_-rQ58`},Rd=4;function zd(e,t){return Math.max(0,Math.min(t,e))}function Bd(e){let{value:t,defaultValue:n=0,onChange:r=()=>{},max:i=5,allowHalf:a=!1,allowClear:o=!0,readOnly:s=!1,disabled:u=!1,icon:p=d.faStar,"aria-label":m=`Rating`,className:h,style:g,classNames:_,styles:v,...y}=D(`Rating`,e),b=t!==void 0,[x,S]=(0,c.useState)(n),C=zd(b?t:x,i),[w,T]=(0,c.useState)(null),E=!s&&!u,O=w??C,k=(0,c.useRef)(null),A=(0,c.useRef)(C),j=(0,c.useRef)(!1),M=(0,c.useRef)(0),N=(0,c.useRef)(!1);function P(e){let t=zd(e,i);b||S(t),r(t)}function F(e){let t=k.current?.getBoundingClientRect();if(!t||t.width===0)return null;let n=zd((e-t.left)/t.width,1)*i;return a?Math.round(n*2)/2:Math.ceil(n)}function I(e){if(!E)return;e.currentTarget.setPointerCapture?.(e.pointerId),j.current=!0,N.current=!1,M.current=e.clientX,A.current=C;let t=F(e.clientX);t!==null&&T(t)}function L(e){if(!E)return;let t=F(e.clientX);t!==null&&(j.current&&(e.preventDefault(),Math.abs(e.clientX-M.current)>Rd&&(N.current=!0)),T(t))}function R(e){if(!E||!j.current)return;e.currentTarget.releasePointerCapture?.(e.pointerId),j.current=!1;let t=F(e.clientX)??w;t!==null&&P(!N.current&&o&&t===A.current?0:t),T(null)}function z(){E&&!j.current&&T(null)}function B(e){let t=a?.5:1;e.key===`ArrowRight`||e.key===`ArrowUp`?(e.preventDefault(),P(C+t)):e.key===`ArrowLeft`||e.key===`ArrowDown`?(e.preventDefault(),P(C-t)):e.key===`Home`?(e.preventDefault(),P(0)):e.key===`End`&&(e.preventDefault(),P(i))}return(0,f.jsx)(`div`,{...y,ref:k,role:`slider`,"aria-label":m,"aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":C,"aria-valuetext":`${C} out of ${i}`,"aria-readonly":s||void 0,"aria-disabled":u||void 0,tabIndex:E?0:-1,className:(0,l.default)(Ld.rating,u&&Ld.ratingDisabled,s&&Ld.ratingReadOnly,_?.root,h),style:{...g,...v?.root},onKeyDown:E?B:void 0,onPointerDown:E?I:void 0,onPointerMove:E?L:void 0,onPointerUp:E?R:void 0,onPointerCancel:E?R:void 0,onPointerLeave:E?z:void 0,children:Array.from({length:i},(e,t)=>{let n=Math.round(Math.max(0,Math.min(1,O-t))*100);return(0,f.jsxs)(`div`,{className:(0,l.default)(Ld.ratingItem,_?.item),style:v?.item,children:[K(p,{className:(0,l.default)(Ld.ratingIconEmpty,_?.iconEmpty),style:v?.iconEmpty}),(0,f.jsx)(`div`,{className:Ld.ratingIconFilledClip,style:{width:`${n}%`},children:K(p,{className:(0,l.default)(Ld.ratingIconFilled,_?.iconFilled),style:v?.iconFilled})})]},t)})})}var Vd={revealLens:`revealLens_V3Kkk`,"revealLens-background":`revealLens-background_pQyK9`,revealLensBackground:`revealLens-background_pQyK9`,"revealLens-overlay":`revealLens-overlay_NOUoj`,revealLensOverlay:`revealLens-overlay_NOUoj`,"revealLens-overlay-transitioning":`revealLens-overlay-transitioning_-co2e`,revealLensOverlayTransitioning:`revealLens-overlay-transitioning_-co2e`};function Hd(e,t,n,r){let i=Math.max(n-r,0);return`radial-gradient(circle ${n}px at ${e}px ${t}px, transparent ${i}px, transparent ${i}px, white ${n}px)`}function Ud(e,t){e.style.setProperty(`mask-image`,t),e.style.setProperty(`-webkit-mask-image`,t)}function Wd(e){e.style.removeProperty(`mask-image`),e.style.removeProperty(`-webkit-mask-image`)}function Gd(e){let{background:t,overlay:n,radius:r=120,feather:i=24,shape:a=`circle`,maskImage:o,disabled:s=!1,className:u,style:d,classNames:p,styles:m,...h}=D(`RevealLens`,e),g=(0,c.useRef)(null),_=(0,c.useRef)(null),v=(e,t)=>{let n=g.current,a=_.current;if(!n||!a)return;let s=n.getBoundingClientRect(),c=e-s.left,l=t-s.top;a.classList.remove(Vd.revealLensOverlayTransitioning),Ud(a,o??Hd(c,l,r,i))},y=()=>{let e=_.current;e&&(e.classList.add(Vd.revealLensOverlayTransitioning),Wd(e))},b=e=>{s||(e.currentTarget.setPointerCapture?.(e.pointerId),v(e.clientX,e.clientY))},x=e=>{s||v(e.clientX,e.clientY)},S=e=>{s||e.pointerType===`mouse`||y()},C=e=>{if(s)return;let t=g.current;if(t){let n=t.getBoundingClientRect();if(e.clientX>=n.left&&e.clientX<=n.right&&e.clientY>=n.top&&e.clientY<=n.bottom)return;if(typeof document.elementFromPoint==`function`){let n=document.elementFromPoint(e.clientX,e.clientY);if(n&&t.contains(n))return}}y()};return(0,f.jsxs)(`div`,{...h,ref:g,className:(0,l.default)(Vd.revealLens,u,p?.root),style:{...d,...m?.root},"data-reveal-shape":a,onPointerDown:b,onPointerMove:x,onPointerUp:S,onPointerCancel:C,onPointerLeave:C,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Vd.revealLensBackground,p?.background),style:m?.background,children:t}),(0,f.jsx)(`div`,{ref:_,className:(0,l.default)(Vd.revealLensOverlay,p?.overlay),style:m?.overlay,children:n})]})}var Kd={planCanvas:`planCanvas_7XTdG`,"planCanvas-screen":`planCanvas-screen_lk83X`,planCanvasScreen:`planCanvas-screen_lk83X`,"planCanvas-underlay":`planCanvas-underlay_rpzSl`,planCanvasUnderlay:`planCanvas-underlay_rpzSl`,"planCanvas-grid":`planCanvas-grid_49CmH`,planCanvasGrid:`planCanvas-grid_49CmH`,"planCanvas-rooms":`planCanvas-rooms_UyjEC`,planCanvasRooms:`planCanvas-rooms_UyjEC`,"planCanvas-roomFill":`planCanvas-roomFill_LXlOf`,planCanvasRoomFill:`planCanvas-roomFill_LXlOf`,"planCanvas-roomFill-interactive":`planCanvas-roomFill-interactive_JSU1E`,planCanvasRoomFillInteractive:`planCanvas-roomFill-interactive_JSU1E`,"planCanvas-roomFill-hovered":`planCanvas-roomFill-hovered_7ZXgf`,planCanvasRoomFillHovered:`planCanvas-roomFill-hovered_7ZXgf`,"planCanvas-roomLabel":`planCanvas-roomLabel_GrzE3`,planCanvasRoomLabel:`planCanvas-roomLabel_GrzE3`,"planCanvas-roomName":`planCanvas-roomName_kHAtD`,planCanvasRoomName:`planCanvas-roomName_kHAtD`,"planCanvas-roomArea":`planCanvas-roomArea_X1Tal`,planCanvasRoomArea:`planCanvas-roomArea_X1Tal`,"planCanvas-walls":`planCanvas-walls_G9vXB`,planCanvasWalls:`planCanvas-walls_G9vXB`,"planCanvas-wallOutline":`planCanvas-wallOutline_eWEN-`,planCanvasWallOutline:`planCanvas-wallOutline_eWEN-`,"planCanvas-wallFill":`planCanvas-wallFill_iKHyE`,planCanvasWallFill:`planCanvas-wallFill_iKHyE`,"planCanvas-roomEdgeSelected":`planCanvas-roomEdgeSelected_wQk6B`,planCanvasRoomEdgeSelected:`planCanvas-roomEdgeSelected_wQk6B`,"planCanvas-wallCaps":`planCanvas-wallCaps_ZpLG4`,planCanvasWallCaps:`planCanvas-wallCaps_ZpLG4`,"planCanvas-roomEdgeCaps":`planCanvas-roomEdgeCaps_5Y7lq`,planCanvasRoomEdgeCaps:`planCanvas-roomEdgeCaps_5Y7lq`,"planCanvas-roomEdgeOutline":`planCanvas-roomEdgeOutline_Y1ZwL`,planCanvasRoomEdgeOutline:`planCanvas-roomEdgeOutline_Y1ZwL`,"planCanvas-roomEdgeFill":`planCanvas-roomEdgeFill_Qr9p-`,planCanvasRoomEdgeFill:`planCanvas-roomEdgeFill_Qr9p-`,"planCanvas-wallSelected":`planCanvas-wallSelected_vFNw8`,planCanvasWallSelected:`planCanvas-wallSelected_vFNw8`,"planCanvas-wallHovered":`planCanvas-wallHovered_CFIAR`,planCanvasWallHovered:`planCanvas-wallHovered_CFIAR`,"planCanvas-openings":`planCanvas-openings_1fyX4`,planCanvasOpenings:`planCanvas-openings_1fyX4`,"planCanvas-opening-selected":`planCanvas-opening-selected_Wgl4r`,planCanvasOpeningSelected:`planCanvas-opening-selected_Wgl4r`,"planCanvas-doorLeaf":`planCanvas-doorLeaf_1BEkI`,planCanvasDoorLeaf:`planCanvas-doorLeaf_1BEkI`,"planCanvas-doorSwing":`planCanvas-doorSwing_QCc5i`,planCanvasDoorSwing:`planCanvas-doorSwing_QCc5i`,"planCanvas-windowPane":`planCanvas-windowPane_5q9oQ`,planCanvasWindowPane:`planCanvas-windowPane_5q9oQ`,"planCanvas-opening-hovered":`planCanvas-opening-hovered_NGK0O`,planCanvasOpeningHovered:`planCanvas-opening-hovered_NGK0O`,"planCanvas-opening-hit":`planCanvas-opening-hit_frRch`,planCanvasOpeningHit:`planCanvas-opening-hit_frRch`,"planCanvas-opening-hit-interactive":`planCanvas-opening-hit-interactive_D4ZUY`,planCanvasOpeningHitInteractive:`planCanvas-opening-hit-interactive_D4ZUY`,"planCanvas-opening-outline":`planCanvas-opening-outline_HS2wY`,planCanvasOpeningOutline:`planCanvas-opening-outline_HS2wY`,"planCanvas-jamb":`planCanvas-jamb_e-I9r`,planCanvasJamb:`planCanvas-jamb_e-I9r`,"planCanvas-jamb-highlighted":`planCanvas-jamb-highlighted_rWYxZ`,planCanvasJambHighlighted:`planCanvas-jamb-highlighted_rWYxZ`,"planCanvas-selection":`planCanvas-selection_0a31R`,planCanvasSelection:`planCanvas-selection_0a31R`},qd=1,Jd=[];function Yd(e){let t=e/1e6;return`${t.toFixed(+(t<10))} m²`}function Xd(e){return e.length===0?``:`${e.map((e,t)=>`${t===0?`M`:`L`} ${e.x},${e.y}`).join(` `)} Z`}function Zd(e){return[Xd(e.outer),...e.holes.map(Xd)].filter(Boolean).join(` `)}function Qd(e){let{ref:t,floor:n,underlay:r,rooms:i,view:a,selection:o=Jd,hovered:s=null,interactiveRooms:u=!1,interactiveOpenings:d=!1,showGrid:p=!1,gridSize:m=100,showRoomLabels:h=!0,showOpeningSymbols:g=!0,getRoomColor:_,renderRoomLabel:v,getRoomLabel:y,formatArea:b=Yd,onRoomActivate:x,onOpeningActivate:S,onBackgroundActivate:C,onHoverChange:w,overlay:T,worldOverlay:E,size:D,className:O,style:k,classNames:A,styles:j,"aria-label":M}=e,N=a.zoom>0?1/a.zoom:1,P=qd*N,F=(0,c.useMemo)(()=>el(n),[n]),I=(0,c.useMemo)(()=>r?Object.values(r.walls).flatMap(e=>{let t=r.nodes[e.a],n=r.nodes[e.b];return t&&n?[{id:e.id,x1:t.x,y1:t.y,x2:n.x,y2:n.y}]:[]}):[],[r]),L=e=>({x:(e.x-a.x)*a.zoom,y:(e.y-a.y)*a.zoom}),R=(0,c.useMemo)(()=>{if(!p||m<=0)return null;let e=D.width*N,t=D.height*N,n=m*Math.max(1,10**Math.ceil(Math.log10(e/m/60))),r=Math.floor(a.x/n)*n,i=Math.floor(a.y/n)*n,o=[],s=[];for(let t=r;t<=a.x+e;t+=n)o.push(t);for(let e=i;e<=a.y+t;e+=n)s.push(e);return{verticals:o,horizontals:s,step:n,worldW:e,worldH:t}},[p,m,D.width,D.height,N,a.x,a.y]),z=(e,t)=>o.some(n=>n.type===e&&n.id===t),B=(e,t)=>s?.type===e&&s.id===t,V=(0,c.useMemo)(()=>{let e=new Set(o.filter(e=>e.type===`room`).map(e=>e.id)),t=new Set;for(let n of i)if(n.roomId&&e.has(n.roomId))for(let e of n.wallIds)t.add(e);return t},[i,o]),H=(0,c.useMemo)(()=>V.size>0?el(n,{wallIds:V}):{groups:[],caps:[]},[n,V]);function U(e){let t=Zc(n,e);if(!t)return null;let r=n.walls[e.wallId],i=r?r.thickness/2:50,{p1:a,p2:o,normal:s,dir:c,centre:u}=t,p=z(`opening`,e.id),m=B(`opening`,e.id),h=Math.hypot(o.x-a.x,o.y-a.y),_=[];if(g&&e.kind===vs.Door){let t=e.swing!==`endLeft`&&e.swing!==`endRight`,n=t?a:o,r=t?1:-1,i={x:n.x+s.x*h,y:n.y+s.y*h},l={x:n.x+c.x*h*r,y:n.y+c.y*h*r};_.push((0,f.jsx)(`path`,{className:Kd.planCanvasDoorLeaf,d:`M ${n.x},${n.y} L ${i.x},${i.y}`,strokeWidth:P},`leaf`),(0,f.jsx)(`path`,{className:Kd.planCanvasDoorSwing,d:`M ${i.x},${i.y} A ${h},${h} 0 0,${+!t} ${l.x},${l.y}`,strokeWidth:P},`swing`))}g&&e.kind===vs.Window&&_.push((0,f.jsx)(`path`,{className:Kd.planCanvasWindowPane,d:`M ${a.x},${a.y} L ${o.x},${o.y}`,strokeWidth:P*2},`pane`));let v=`M ${a.x+s.x*i},${a.y+s.y*i} L ${o.x+s.x*i},${o.y+s.y*i} L ${o.x-s.x*i},${o.y-s.y*i} L ${a.x-s.x*i},${a.y-s.y*i} Z`;return(0,f.jsxs)(`g`,{className:(0,l.default)(p&&Kd.planCanvasOpeningSelected,m&&Kd.planCanvasOpeningHovered,A?.opening),style:j?.opening,"data-opening-kind":e.kind,children:[_,(0,f.jsx)(`path`,{className:(0,l.default)(Kd.planCanvasOpeningHit,d&&Kd.planCanvasOpeningHitInteractive),d:v,onClick:d&&S?t=>{t.stopPropagation(),S(e.id)}:void 0,onPointerEnter:w?()=>w({type:`opening`,id:e.id}):void 0,children:d&&(0,f.jsx)(`title`,{children:e.kind})}),(p||m)&&(0,f.jsx)(`path`,{className:Kd.planCanvasOpeningOutline,d:v,vectorEffect:`non-scaling-stroke`}),(0,f.jsx)(`path`,{className:(0,l.default)(Kd.planCanvasJamb,V.has(e.wallId)&&Kd.planCanvasJambHighlighted),d:`M ${a.x-s.x*i},${a.y-s.y*i} L ${a.x+s.x*i},${a.y+s.y*i} M ${o.x-s.x*i},${o.y-s.y*i} L ${o.x+s.x*i},${o.y+s.y*i}`,strokeWidth:P}),u&&null]},e.id)}return(0,f.jsxs)(`svg`,{ref:t,className:(0,l.default)(Kd.planCanvas,O,A?.canvas),style:{...k,...j?.canvas},viewBox:`0 0 ${Math.max(1,D.width)} ${Math.max(1,D.height)}`,width:D.width,height:D.height,role:`img`,"aria-label":M,onClick:C?()=>C():void 0,onPointerLeave:w?()=>w(null):void 0,children:[(0,f.jsxs)(`g`,{transform:`translate(${-a.x*a.zoom} ${-a.y*a.zoom}) scale(${a.zoom})`,children:[R&&(0,f.jsxs)(`g`,{className:(0,l.default)(Kd.planCanvasGrid,A?.grid),style:j?.grid,"aria-hidden":`true`,children:[R.verticals.map(e=>(0,f.jsx)(`line`,{x1:e,y1:a.y,x2:e,y2:a.y+R.worldH,strokeWidth:N},`v${e}`)),R.horizontals.map(e=>(0,f.jsx)(`line`,{x1:a.x,y1:e,x2:a.x+R.worldW,y2:e,strokeWidth:N},`h${e}`))]}),I.length>0&&(0,f.jsx)(`g`,{className:(0,l.default)(Kd.planCanvasUnderlay,A?.underlay),style:j?.underlay,"aria-hidden":`true`,children:I.map(e=>(0,f.jsx)(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,strokeWidth:1.5},e.id))}),(0,f.jsx)(`g`,{className:(0,l.default)(Kd.planCanvasRooms,A?.rooms),style:j?.rooms,children:i.map(e=>{let t=e.roomId?z(`room`,e.roomId):!1,n=e.roomId?B(`room`,e.roomId):!1,r=e.meta?_?.(e.meta,e.area):void 0,i=y?.(e.meta,{area:e.area})??`${e.meta?.name??`Unnamed room`}, ${b(e.area)}`;return(0,f.jsx)(`path`,{className:(0,l.default)(Kd.planCanvasRoomFill,n&&Kd.planCanvasRoomFillHovered,u&&Kd.planCanvasRoomFillInteractive,A?.roomFill),"data-state":t?`selected`:n?`hovered`:void 0,style:{...j?.roomFill,...r?{fill:r}:null},d:Zd(e),fillRule:`evenodd`,tabIndex:u?0:void 0,role:u?`button`:void 0,"aria-pressed":u?t:void 0,onClick:u&&x&&e.roomId?t=>{t.stopPropagation(),x(e.roomId)}:void 0,onKeyDown:u&&x&&e.roomId?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),x(e.roomId))}:void 0,onPointerEnter:w&&e.roomId?()=>w({type:`room`,id:e.roomId}):void 0,children:u&&(0,f.jsx)(`title`,{children:i})},e.id)})}),(0,f.jsxs)(`g`,{className:(0,l.default)(Kd.planCanvasWalls,A?.walls),style:j?.walls,"aria-hidden":`true`,children:[(0,f.jsx)(`g`,{className:Kd.planCanvasWallOutline,children:F.groups.map(e=>(0,f.jsx)(`path`,{className:A?.wallBody,style:j?.wallBody,d:e.d,strokeWidth:e.thickness},`o${e.thickness}`))}),(0,f.jsx)(`g`,{className:Kd.planCanvasWallFill,children:F.groups.map(e=>{let t=e.thickness-2*P;return t<=0?null:(0,f.jsx)(`path`,{d:e.d,strokeWidth:t},`f${e.thickness}`)})}),(0,f.jsxs)(`g`,{className:Kd.planCanvasRoomEdgeSelected,children:[H.groups.map(e=>(0,f.jsx)(`path`,{className:Kd.planCanvasRoomEdgeOutline,d:e.d,strokeWidth:e.thickness},`o${e.thickness}`)),H.groups.map(e=>{let t=e.thickness-2*P;return t<=0?null:(0,f.jsx)(`path`,{className:Kd.planCanvasRoomEdgeFill,d:e.d,strokeWidth:t},`f${e.thickness}`)})]}),(0,f.jsx)(`g`,{className:Kd.planCanvasWallCaps,children:F.caps.filter(e=>!V.has(e.wallId)).map((e,t)=>(0,f.jsx)(`line`,{x1:e.a.x,y1:e.a.y,x2:e.b.x,y2:e.b.y,strokeWidth:P},`${e.wallId}-${e.reason}-${t}`))}),(0,f.jsx)(`g`,{className:Kd.planCanvasRoomEdgeCaps,children:H.caps.map((e,t)=>(0,f.jsx)(`line`,{x1:e.a.x,y1:e.a.y,x2:e.b.x,y2:e.b.y,strokeWidth:P},`${e.wallId}-${e.reason}-${t}`))})]}),(0,f.jsx)(`g`,{className:(0,l.default)(Kd.planCanvasOpenings,A?.openings),style:j?.openings,children:Object.values(n.openings).map(U)}),(0,f.jsxs)(`g`,{className:Kd.planCanvasSelection,"aria-hidden":`true`,children:[o.filter(e=>e.type===`wall`).map(e=>{let t=n.walls[e.id];if(!t)return null;let r=n.nodes[t.a],i=n.nodes[t.b];return!r||!i?null:(0,f.jsx)(`line`,{x1:r.x,y1:r.y,x2:i.x,y2:i.y,strokeWidth:t.thickness,className:Kd.planCanvasWallSelected},e.id)}),s?.type===`wall`&&!z(`wall`,s.id)&&(()=>{let e=n.walls[s.id];if(!e)return null;let t=n.nodes[e.a],r=n.nodes[e.b];return!t||!r?null:(0,f.jsx)(`line`,{x1:t.x,y1:t.y,x2:r.x,y2:r.y,strokeWidth:e.thickness,className:Kd.planCanvasWallHovered})})()]}),E]}),(0,f.jsxs)(`g`,{className:(0,l.default)(Kd.planCanvasScreen,A?.overlay),style:j?.overlay,children:[h&&i.map(e=>{let t=L(e.anchor);if(t.x<-200||t.y<-200||t.x>D.width+200||t.y>D.height+200)return null;let n=v?.(e.meta,{area:e.area,faceId:e.id});return n===null?null:(0,f.jsx)(`g`,{className:(0,l.default)(Kd.planCanvasRoomLabel,A?.roomLabel),style:j?.roomLabel,transform:`translate(${t.x} ${t.y})`,"aria-hidden":`true`,children:n===void 0?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`text`,{className:Kd.planCanvasRoomName,textAnchor:`middle`,children:e.meta?.name??``}),(0,f.jsx)(`text`,{className:Kd.planCanvasRoomArea,textAnchor:`middle`,dy:`1.2em`,children:b(e.area)})]}):n},e.id)}),T]})]})}var $d=500;function ef(e,t=50){let[n,r]=(0,c.useState)(e),i=(0,c.useRef)([]),a=(0,c.useRef)([]),o=(0,c.useRef)(null),s=(0,c.useRef)(e),l=(0,c.useRef)(null),[,u]=(0,c.useState)(0),d=(0,c.useCallback)(e=>{s.current=e,r(e)},[]),f=(0,c.useCallback)(e=>{i.current=[...i.current,e].slice(-t),a.current=[]},[t]),p=(0,c.useCallback)(()=>{o.current=s.current},[]),m=(0,c.useCallback)(e=>{d(e)},[d]),h=(0,c.useCallback)(()=>{let e=o.current;return o.current=null,!e||e===s.current?!1:(f(e),l.current=null,u(e=>e+1),!0)},[f]),g=(0,c.useCallback)(()=>{let e=o.current;return o.current=null,e?(d(e),e):null},[d]),_=(0,c.useCallback)((e,t,n=[])=>{if(e===s.current)return;let r=n.join(`,`),o=Date.now(),c=l.current;c!==null&&c.reason===t&&c.targets===r&&o-c.at<$d&&i.current.length>0?a.current=[]:f(s.current),l.current={reason:t,targets:r,at:o},d(e),u(e=>e+1)},[f,d]),v=(0,c.useCallback)(e=>{d(e)},[d]),y=(0,c.useCallback)(()=>{let e=i.current;if(e.length===0)return null;let t=e[e.length-1];return i.current=e.slice(0,-1),a.current=[s.current,...a.current],l.current=null,d(t),u(e=>e+1),t},[d]),b=(0,c.useCallback)(()=>{let e=a.current;if(e.length===0)return null;let n=e[0];return a.current=e.slice(1),i.current=[...i.current,s.current].slice(-t),l.current=null,d(n),u(e=>e+1),n},[t,d]),x=(0,c.useCallback)(()=>{i.current=[],a.current=[],l.current=null,u(e=>e+1)},[]),S=(0,c.useCallback)(()=>o.current!==null,[]);return{present:n,canUndo:i.current.length>0,canRedo:a.current.length>0,beginGesture:p,updateGesture:m,endGesture:h,cancelGesture:g,commit:_,replace:v,undo:y,redo:b,clearHistory:x,isGestureActive:S}}var $={roomDrawer:`roomDrawer_SJj4-`,"roomDrawer-disabled":`roomDrawer-disabled_VRaTX`,roomDrawerDisabled:`roomDrawer-disabled_VRaTX`,"roomDrawer-toolbar":`roomDrawer-toolbar_55H5p`,roomDrawerToolbar:`roomDrawer-toolbar_55H5p`,"roomDrawer-toolbar-separator":`roomDrawer-toolbar-separator_z-eRp`,roomDrawerToolbarSeparator:`roomDrawer-toolbar-separator_z-eRp`,"roomDrawer-toolButton":`roomDrawer-toolButton_4GtjR`,roomDrawerToolButton:`roomDrawer-toolButton_4GtjR`,"roomDrawer-viewButton":`roomDrawer-viewButton_OnZR6`,roomDrawerViewButton:`roomDrawer-viewButton_OnZR6`,"roomDrawer-toolButtonActive":`roomDrawer-toolButtonActive_-BXua`,roomDrawerToolButtonActive:`roomDrawer-toolButtonActive_-BXua`,"roomDrawer-toolIcon":`roomDrawer-toolIcon_mJ0vT`,roomDrawerToolIcon:`roomDrawer-toolIcon_mJ0vT`,"roomDrawer-viewControls":`roomDrawer-viewControls_TKUQ1`,roomDrawerViewControls:`roomDrawer-viewControls_TKUQ1`,"roomDrawer-zoomLabel":`roomDrawer-zoomLabel_xGvgk`,roomDrawerZoomLabel:`roomDrawer-zoomLabel_xGvgk`,"roomDrawer-floorBar":`roomDrawer-floorBar_PMWOg`,roomDrawerFloorBar:`roomDrawer-floorBar_PMWOg`,"roomDrawer-floorTab":`roomDrawer-floorTab_lvLY-`,roomDrawerFloorTab:`roomDrawer-floorTab_lvLY-`,"roomDrawer-floorTab-active":`roomDrawer-floorTab-active_pB7Oz`,roomDrawerFloorTabActive:`roomDrawer-floorTab-active_pB7Oz`,"roomDrawer-floorTab-add":`roomDrawer-floorTab-add_F46eU`,roomDrawerFloorTabAdd:`roomDrawer-floorTab-add_F46eU`,"roomDrawer-canvasWrapper":`roomDrawer-canvasWrapper_ctjFw`,roomDrawerCanvasWrapper:`roomDrawer-canvasWrapper_ctjFw`,"roomDrawer-canvasWrapper-drawing":`roomDrawer-canvasWrapper-drawing_8kVH2`,roomDrawerCanvasWrapperDrawing:`roomDrawer-canvasWrapper-drawing_8kVH2`,"roomDrawer-preview":`roomDrawer-preview_vqJGn`,roomDrawerPreview:`roomDrawer-preview_vqJGn`,"roomDrawer-marquee":`roomDrawer-marquee_Vbm28`,roomDrawerMarquee:`roomDrawer-marquee_Vbm28`,"roomDrawer-handle":`roomDrawer-handle_AFyj0`,roomDrawerHandle:`roomDrawer-handle_AFyj0`,"roomDrawer-handle-active":`roomDrawer-handle-active_rfh4M`,roomDrawerHandleActive:`roomDrawer-handle-active_rfh4M`,"roomDrawer-toolButtonOn":`roomDrawer-toolButtonOn_et-K9`,roomDrawerToolButtonOn:`roomDrawer-toolButtonOn_et-K9`,"roomDrawer-guide":`roomDrawer-guide_cg7gP`,roomDrawerGuide:`roomDrawer-guide_cg7gP`,"roomDrawer-guide-angle":`roomDrawer-guide-angle_3SLun`,roomDrawerGuideAngle:`roomDrawer-guide-angle_3SLun`,"roomDrawer-snapMarker":`roomDrawer-snapMarker_2SDhf`,roomDrawerSnapMarker:`roomDrawer-snapMarker_2SDhf`,"roomDrawer-measureLine":`roomDrawer-measureLine_Htenn`,roomDrawerMeasureLine:`roomDrawer-measureLine_Htenn`,"roomDrawer-measureLine-hovered":`roomDrawer-measureLine-hovered_f6U9P`,roomDrawerMeasureLineHovered:`roomDrawer-measureLine-hovered_f6U9P`,"roomDrawer-measureGrip":`roomDrawer-measureGrip_OGY0c`,roomDrawerMeasureGrip:`roomDrawer-measureGrip_OGY0c`,"roomDrawer-midHandle":`roomDrawer-midHandle_rJVzW`,roomDrawerMidHandle:`roomDrawer-midHandle_rJVzW`,"roomDrawer-measure":`roomDrawer-measure_N-cse`,roomDrawerMeasure:`roomDrawer-measure_N-cse`,"roomDrawer-measure-locked":`roomDrawer-measure-locked_FiNSg`,roomDrawerMeasureLocked:`roomDrawer-measure-locked_FiNSg`,"roomDrawer-measure-offset":`roomDrawer-measure-offset_IdBYD`,roomDrawerMeasureOffset:`roomDrawer-measure-offset_IdBYD`,"roomDrawer-measure-secondary":`roomDrawer-measure-secondary_DgNzz`,roomDrawerMeasureSecondary:`roomDrawer-measure-secondary_DgNzz`,"roomDrawer-inspector":`roomDrawer-inspector_hOVUl`,roomDrawerInspector:`roomDrawer-inspector_hOVUl`,"roomDrawer-inspector-action":`roomDrawer-inspector-action_zMwML`,roomDrawerInspectorAction:`roomDrawer-inspector-action_zMwML`,"roomDrawer-inspector-label":`roomDrawer-inspector-label_yA6NE`,roomDrawerInspectorLabel:`roomDrawer-inspector-label_yA6NE`,"roomDrawer-inspector-kind":`roomDrawer-inspector-kind_ebNzr`,roomDrawerInspectorKind:`roomDrawer-inspector-kind_ebNzr`,"roomDrawer-inspector-kindEmpty":`roomDrawer-inspector-kindEmpty_JIx7s`,roomDrawerInspectorKindEmpty:`roomDrawer-inspector-kindEmpty_JIx7s`,"roomDrawer-inspector-field":`roomDrawer-inspector-field_-c8za`,roomDrawerInspectorField:`roomDrawer-inspector-field_-c8za`,"roomDrawer-inspector-name":`roomDrawer-inspector-name_3xHLm`,roomDrawerInspectorName:`roomDrawer-inspector-name_3xHLm`,"roomDrawer-inspector-delete":`roomDrawer-inspector-delete_MzEl2`,roomDrawerInspectorDelete:`roomDrawer-inspector-delete_MzEl2`,"roomDrawer-hint":`roomDrawer-hint_3WTFa`,roomDrawerHint:`roomDrawer-hint_3WTFa`,"roomDrawer-hint-report":`roomDrawer-hint-report_oFtGt`,roomDrawerHintReport:`roomDrawer-hint-report_oFtGt`,"roomDrawer-fileInput":`roomDrawer-fileInput_EAZw-`,roomDrawerFileInput:`roomDrawer-fileInput_EAZw-`},tf=[`select`,`wall`,`rect`,`door`,`window`,`archway`,`measure`],nf={v:`select`,w:`wall`,r:`rect`,d:`door`,n:`window`,a:`archway`,m:`measure`},rf={door:vs.Door,window:vs.Window,archway:vs.Archway},af={[vs.Door]:`Door`,[vs.Window]:`Window`,[vs.Archway]:`Archway`,[vs.Gap]:`Gap`},of={[vs.Door]:{width:900,sill:0,head:2100},[vs.Window]:{width:1200,sill:900,head:2100},[vs.Archway]:{width:1200,sill:0,head:2100},[vs.Gap]:{width:1e3,sill:0,head:2500}},sf=1,cf=4,lf=[];function uf(e){return e>=1e3?`${(e/1e3).toFixed(2)} m`:`${Math.round(e)} mm`}function df(e){let t=e/1e6;return`${t.toFixed(+(t<10))} m²`}function ff(e){let t=e*180/Math.PI;return t=(t%360+360)%360,t>180&&(t-=360),`${Math.abs(t)<.05?0:Math.round(t*10)/10}°`}function pf(e){let{ref:t,value:n,defaultValue:r,onChange:i,onChangeEnd:a,floorId:o,defaultFloorId:s,onFloorChange:u,showFloorBar:p=!0,showUnderlay:m=!0,tool:h,defaultTool:g=`select`,onToolChange:_,tools:v=tf,selection:y,defaultSelection:b,onSelectionChange:x,multiSelect:S=!0,onHoverChange:C,view:w,defaultView:T,onViewChange:E,minZoom:O=.005,maxZoom:k=2,fitOnMount:A=!0,gridSize:j=100,showGrid:M=!0,snap:N=!0,angleLock:P=!1,constrainAngle:F=45,showSnapGuides:I=!0,wallThickness:L=Xs.thickness,wallHeight:R,openingDefaults:z,showMeasurements:B=!0,formatLength:V=uf,formatArea:H=df,showToolbar:U=!0,showInspector:W=!0,showHint:G=!0,showHistoryControls:ee=!0,showFileControls:te=!0,fileName:q,onImport:ne,historyMode:J=`internal`,historyLimit:re=50,onHistoryChange:ie,readOnly:ae=!1,disabled:oe=!1,canvasHeight:se=`420px`,getRoomColor:le,renderRoomLabel:ue,labels:Y,icons:de,"aria-label":fe,className:pe,style:me,classNames:X,styles:Z,...he}=D(`RoomDrawer`,e),ge=xe(),_e=ge?nl:tl,ve=(0,c.useRef)(null),ye=(0,c.useRef)(null),be=(0,c.useRef)(null),Se=(0,c.useRef)(null),Ce=(0,c.useRef)({kind:`none`}),we=(0,c.useRef)(new Map),Te=(0,c.useRef)(null),Ee=(0,c.useRef)(!1),De=(0,c.useRef)(!1),Oe=(0,c.useRef)(!1),ke=ef((0,c.useMemo)(()=>r??n??pc(),[]),re),Ae=n!==void 0,je=Ae?n:ke.present;(0,c.useEffect)(()=>{if(Ae&&n){if(n===Se.current){ke.replace(n);return}ke.commit(n,`external`)}},[n,Ae]);let[Me,Ne]=(0,c.useState)(s),Pe=o??Me??je.floors[0]?.id,Q=(0,c.useMemo)(()=>mc(je,Pe)??mc(je)??pc().floors[0],[je,Pe]),[Fe,Ie]=(0,c.useState)(m);(0,c.useEffect)(()=>Ie(m),[m]);let Le=(0,c.useMemo)(()=>Fe?vc(je,Q.id):null,[Fe,je,Q.id]),Re=(0,c.useCallback)(e=>{e!==Q.id&&(o===void 0&&Ne(e),u?.(e))},[Q.id,o,u]),ze=(0,c.useMemo)(()=>Vc(Q),[Q]).rooms,[Be,Ve]=(0,c.useState)(g),He=h??Be,Ue=(0,c.useCallback)(e=>{h===void 0&&Ve(e),_?.(e)},[h,_]),[We,Ge]=(0,c.useState)(b??lf),Ke=y===void 0?We:y,qe=(0,c.useRef)(Ke);qe.current=Ke;let Je=(0,c.useCallback)(e=>{let t=e===null?lf:Array.isArray(e)?e:[e];qe.current=t,y===void 0&&Ge(t),x?.([...t])},[y,x]),Ye=(0,c.useCallback)(e=>{let t=qe.current,n=t.filter(t=>t.type!==e.type||t.id!==e.id);Je(n.length===t.length?[...t,e]:n)},[Je]),Xe=Ke.length===1?Ke[0]:null,Ze=(0,c.useCallback)(e=>{let t=new Set;for(let n of e)if(n.type===`node`)t.add(n.id);else if(n.type===`wall`){let e=Q.walls[n.id];e&&(t.add(e.a),t.add(e.b))}else if(n.type===`room`){let e=ze.find(e=>e.roomId===n.id);for(let n of e?.nodeIds??[])t.add(n)}return t},[Q.walls,ze]),Qe=(0,c.useMemo)(()=>Ze(Ke),[Ze,Ke]),[$e,et]=(0,c.useState)(null),[tt,nt]=(0,c.useState)(T??{x:0,y:0,zoom:.05}),rt=w??tt,it=(0,c.useCallback)(e=>{w===void 0&&nt(e),E?.(e)},[w,E]),[at,ot]=(0,c.useState)({width:800,height:420}),[st,ct]=(0,c.useState)([]),[lt,ut]=(0,c.useState)(null),[dt,ft]=(0,c.useState)(N),[pt,mt]=(0,c.useState)(P);(0,c.useEffect)(()=>ft(N),[N]),(0,c.useEffect)(()=>mt(P),[P]);let[ht,gt]=(0,c.useState)(M);(0,c.useEffect)(()=>gt(M),[M]);let _t=(0,c.useRef)(null),[vt,yt]=(0,c.useState)(null),[bt,xt]=(0,c.useState)([]),St=(0,c.useRef)(0),[Ct,wt]=(0,c.useState)(null),Tt=(0,c.useRef)(null),Et=(0,c.useCallback)(e=>{let t=rl(_e,rt.zoom);for(let n=bt.length-1;n>=0;n--){let r=bt[n];if(Math.hypot(e.x-r.a.x,e.y-r.a.y)<=t.node)return{id:r.id,end:`a`};if(Math.hypot(e.x-r.b.x,e.y-r.b.y)<=t.node)return{id:r.id,end:`b`}}for(let n=bt.length-1;n>=0;n--){let r=bt[n];if(Ts(e,r.a,r.b).dist<=t.wall)return{id:r.id}}return null},[bt,_e,rt.zoom]),[Dt,Ot]=(0,c.useState)(null),kt=!ae&&!oe,At=(0,c.useMemo)(()=>{if(st.length<2)return;let e=st[st.length-2],t=st[st.length-1];return Math.atan2(t.y-e.y,t.x-e.x)},[st]);(0,c.useEffect)(()=>{let e=ye.current;if(!e)return;let t=new ResizeObserver(()=>{let t=e.getBoundingClientRect();t.width>0&&t.height>0&&ot({width:Math.round(t.width),height:Math.round(t.height)})});t.observe(e);let n=e.getBoundingClientRect();return n.width>0&&n.height>0&&ot({width:Math.round(n.width),height:Math.round(n.height)}),()=>t.disconnect()},[]);let jt=(0,c.useCallback)((e,t)=>ll(e,t,ye.current?.getBoundingClientRect()??{left:0,top:0},rt),[rt]),Mt=(0,c.useCallback)(e=>({x:(e.x-rt.x)*rt.zoom,y:(e.y-rt.y)*rt.zoom}),[rt]),Nt=(0,c.useCallback)((e,t,n,r,i)=>{let a=dt!==De.current,o=pt!==Oe.current,s=hl(e,{floor:Q,pxToWorld:rt.zoom>0?1/rt.zoom:1,origin:t,referenceAngle:r,excludeNodeIds:n,excludeWallIds:i,options:{enabled:a?[ol.Node,ol.Intersection,ol.Wall,ol.Angle,ol.Extension,ol.Alignment,ol.Grid]:[],gridSize:j,angleStepDeg:o?F:0,toleranceScreenPx:ge?16:10}});return _t.current=s,s},[Q,rt.zoom,dt,pt,j,F,ge]),Pt=(0,c.useCallback)(e=>{let t=Object.values(Q.walls).filter(t=>t.a===e||t.b===e),n=new Set(t.map(e=>e.id)),r=Q.nodes[e];if(!r)return{excludeWallIds:n};let i={x:r.x,y:r.y},a,o=t[0];if(o){let t=o.a===e?o.b:o.a,n=Q.nodes[t];n&&(a=Math.atan2(n.y-r.y,n.x-r.x))}return{origin:i,referenceAngle:a,excludeWallIds:n}},[Q]),Ft=(0,c.useCallback)((e={})=>{let t=e.padding??24,n=Oc(Q);if(!n||n.width<=0||n.height<=0){it({x:-1e3,y:-1e3,zoom:.05});return}let r=Math.min((at.width-t*2)/n.width,(at.height-t*2)/n.height),i=Math.max(O,Math.min(k,r));it({x:n.minX-(at.width/i-n.width)/2,y:n.minY-(at.height/i-n.height)/2,zoom:i})},[Q,at.width,at.height,O,k,it]),It=(0,c.useRef)(!1);(0,c.useEffect)(()=>{A&&!It.current&&Object.keys(Q.nodes).length!==0&&(at.width<=1||(It.current=!0,Ft()))},[A,Q,at.width,Ft]);let Lt=(0,c.useCallback)((e,t,n,r=[],o={})=>{if(e===Q)return je;let s=gc(je,e);Se.current=s,n?o.push===!1?ke.replace(s):ke.commit(s,t,r):ke.updateGesture(s);let c={reason:t,committed:n,targetIds:r};return i?.(s,c),n&&a?.(s,c),s},[Q,je,ke,i,a]),Rt=(0,c.useCallback)((e,t,n=[],r={})=>{let i=Uc(nc(e).floor).floor;return Lt(i,t,!0,n,r)},[Lt]);(0,c.useEffect)(()=>{ie?.({canUndo:ke.canUndo,canRedo:ke.canRedo})},[ke.canUndo,ke.canRedo,ie]);let zt=(0,c.useMemo)(()=>Xe?.type===`room`?ze.find(e=>e.roomId===Xe.id)??null:null,[Xe,ze]),Bt=Xe?.type===`wall`?Q.walls[Xe.id]:void 0,Vt=Xe?.type===`opening`?Q.openings[Xe.id]:void 0,Ht=(0,c.useMemo)(()=>{if(!Bt)return null;let e=Q.nodes[Bt.a],t=Q.nodes[Bt.b];return!e||!t?null:{x:(e.x+t.x)/2,y:(e.y+t.y)/2}},[Bt,Q.nodes]),Ut=(0,c.useCallback)(()=>{if(!kt||!Bt)return;let e=Js(Q,Bt.id,.5);e.result.wallIds&&(Rt(e.floor,`edit-wall`,[e.result.nodeId]),Je({type:`node`,id:e.result.nodeId}))},[kt,Bt,Q,Rt,Je]),Wt=(0,c.useCallback)((e,t,n=new Set)=>{if(e.type===`wall`)return{floor:rc(t,e.id).floor};if(e.type===`opening`)return{floor:lc(t,e.id).floor};if(e.type===`node`){let n=ec(t,e.id,{force:!0});if(n.result)return{floor:n.floor,reselect:{type:`wall`,id:n.result.wallId}};let r=t;for(let n of Object.values(t.walls))(n.a===e.id||n.b===e.id)&&(r=rc(r,n.id,{dissolveCollinear:!1}).floor);return{floor:r}}let r=ze.find(t=>t.roomId===e.id);if(!r)return{floor:t};let i=new Set;for(let t of ze)if(t.roomId!==e.id&&!(t.roomId&&n.has(t.roomId)))for(let e of t.wallIds)i.add(e);let a=t;for(let e of new Set(r.wallIds))i.has(e)||(a=rc(a,e,{dissolveCollinear:!1}).floor);let o={...a.rooms};return delete o[e.id],{floor:{...a,rooms:o}}},[ze]),Gt=(0,c.useCallback)(()=>{let e=qe.current;if(!kt||e.length===0)return;let t={room:0,opening:1,wall:2,node:3},n=[...e].sort((e,n)=>t[e.type]-t[n.type]),r=new Set(n.filter(e=>e.type===`room`).map(e=>e.id)),i=Q,a;for(let e of n){let t=Wt(e,i,r);i=t.floor,n.length===1&&(a=t.reselect)}i!==Q&&(Rt(i,`delete`,n.map(e=>e.id)),Je(a??null))},[kt,Q,Wt,Rt,Je]),Kt=(0,c.useCallback)(()=>{ct(e=>e.length===0?e:[]),yt(null)},[]);(0,c.useEffect)(()=>{Kt()},[He,Kt]);let qt=(0,c.useCallback)(e=>{if(oe)return;if(ve.current?.focus(),Ot(null),we.current.set(e.pointerId,{x:e.clientX,y:e.clientY}),e.currentTarget.setPointerCapture?.(e.pointerId),we.current.size===2){let[e,t]=[...we.current.values()];Ce.current.kind!==`none`&&Ce.current.kind!==`pan`&&ke.cancelGesture(),Ce.current={kind:`pinch`,startDist:Math.hypot(t.x-e.x,t.y-e.y),startView:rt,startMid:{x:(e.x+t.x)/2,y:(e.y+t.y)/2}};return}if(we.current.size>2)return;if(Te.current={client:{x:e.clientX,y:e.clientY},moved:!1},e.button===1||Ee.current){Ce.current={kind:`pan`,startClient:{x:e.clientX,y:e.clientY},startView:rt};return}if(e.button!==0)return;let t=jt(e.clientX,e.clientY);if(!kt){let e=il(Q,ze,t,rl(_e,rt.zoom));Je(e);return}if(He===`rect`){let e=Nt(t).point;Ce.current={kind:`rect`,start:e,current:e},ke.beginGesture();return}if(He===`measure`){let e=Et(t);if(e){let n=bt.find(t=>t.id===e.id);Ce.current=e.end?{kind:`measureEnd`,id:e.id,end:e.end}:{kind:`measureMove`,id:e.id,startWorld:t,origA:n.a,origB:n.b};return}let n=Nt(t).point;Ce.current={kind:`measure`,start:n,current:n};return}if(He===`wall`){let e=st[st.length-1],n=Nt(t,e,void 0,At).point;if(st.length===0){ct([n]);return}let r=st[st.length-1],i=Zs(Q,r,n,{thickness:L,type:_s.Interior,height:R},rl(_e,rt.zoom).node);i.result.wallIds.length>0&&Rt(i.floor,`draw-wall`,i.result.wallIds),st.length>=2&&Math.hypot(n.x-st[0].x,n.y-st[0].y)<rl(_e,rt.zoom).node?Kt():ct(e=>[...e,n]);return}let n=rf[He];if(n){let e=rl(_e,rt.zoom),r=il(Q,ze,t,e,{accept:[`wall`]});if(r?.type!==`wall`)return;let i=Q.walls[r.id],a=Q.nodes[i.a],o=Q.nodes[i.b],s=Math.hypot(o.x-a.x,o.y-a.y),c=((t.x-a.x)*(o.x-a.x)+(t.y-a.y)*(o.y-a.y))/(s*s||1),l={...of[n],...z?.[n]},u=sc(Q,{wallId:i.id,kind:n,offset:Math.min(Math.max(c,0),1)*s,width:l.width,sill:l.sill,head:l.head});u.result.openingId&&(Rt(u.floor,`add-opening`,[u.result.openingId]),Je({type:`opening`,id:u.result.openingId}));return}let r=rl(_e,rt.zoom);if(Ht&&Xe?.type===`wall`&&Math.hypot(t.x-Ht.x,t.y-Ht.y)<=r.node){ke.beginGesture(),Ce.current={kind:`wallSplit`,wallId:Xe.id,at:Ht};return}let i=il(Q,ze,t,r),a=S&&(e.ctrlKey||e.metaKey);if(!i){a||Je(null),Ce.current=S?{kind:`marquee`,start:t,current:t,additive:a,base:qe.current}:{kind:`none`};return}if((e.ctrlKey||e.metaKey)&&i.type===`wall`&&Q.walls[i.id]){let e=Q.walls[i.id];a||Je(i),ke.beginGesture(),Ce.current={kind:`wall`,wallId:i.id,startWorld:t,origA:{...Q.nodes[e.a]},origB:{...Q.nodes[e.b]},moved:!1,detach:!0,toggle:a};return}if(a){Ye(i),Ce.current={kind:`none`};return}if(qe.current.some(e=>e.type===i.type&&e.id===i.id)||Je(i),ke.beginGesture(),qe.current.length>1){let e=[...Ze(qe.current)],n={};for(let t of e){let e=Q.nodes[t];e&&(n[t]={x:e.x,y:e.y})}Ce.current={kind:`room`,nodeIds:e,startWorld:t,orig:n,moved:!1};return}if(i.type===`node`)Ce.current={kind:`node`,nodeId:i.id,moved:!1,...Pt(i.id)};else if(i.type===`wall`){let e=Q.walls[i.id];Ce.current={kind:`wall`,wallId:i.id,startWorld:t,origA:{...Q.nodes[e.a]},origB:{...Q.nodes[e.b]},moved:!1}}else if(i.type===`opening`)Ce.current={kind:`opening`,openingId:i.id,moved:!1};else{let e=ze.find(e=>e.roomId===i.id),n=e?[...new Set(e.nodeIds)]:[],r={};for(let e of n){let t=Q.nodes[e];t&&(r[e]={x:t.x,y:t.y})}Ce.current={kind:`room`,nodeIds:n,startWorld:t,orig:r,moved:!1}}},[oe,kt,rt,He,Q,ze,_e,jt,Nt,st,L,R,z,Rt,Je,Ht,Xe,At,Pt,Ze,S,Ye,ke,Kt,Et,bt]),Jt=(0,c.useCallback)(e=>{if(oe)return;we.current.has(e.pointerId)&&we.current.set(e.pointerId,{x:e.clientX,y:e.clientY});let t=Ce.current;if(t.kind===`pinch`&&we.current.size>=2){let[e,n]=[...we.current.values()],r=Math.hypot(n.x-e.x,n.y-e.y);if(t.startDist<=0)return;let i=Math.max(O,Math.min(k,t.startView.zoom*(r/t.startDist))),a=ye.current?.getBoundingClientRect()??{left:0,top:0},o={x:(e.x+n.x)/2,y:(e.y+n.y)/2},s=ll(t.startMid.x,t.startMid.y,a,t.startView);it({x:s.x-(o.x-a.left)/i,y:s.y-(o.y-a.top)/i,zoom:i});return}if(Te.current){let t=e.clientX-Te.current.client.x,n=e.clientY-Te.current.client.y;Math.hypot(t,n)>cf&&(Te.current.moved=!0)}if(t.kind===`pan`){it({x:t.startView.x-(e.clientX-t.startClient.x)/t.startView.zoom,y:t.startView.y-(e.clientY-t.startClient.y)/t.startView.zoom,zoom:t.startView.zoom});return}let n=jt(e.clientX,e.clientY);if(ut(n),t.kind===`none`){if(!kt)return;if(He===`wall`&&st.length>0){let e=Nt(n,st[st.length-1],void 0,At);ut(e.point),yt(e);return}if(He===`select`){let e=il(Q,ze,n,rl(_e,rt.zoom));al(e,$e)||(et(e),C?.(e))}He===`measure`&&wt(Et(n)?.id??null);return}if(Te.current?.moved){if(t.kind===`measureEnd`){let e=Nt(n).point;xt(n=>n.map(n=>n.id===t.id?{...n,[t.end]:e}:n)),ut(e);return}if(t.kind===`measureMove`){let e=n.x-t.startWorld.x,r=n.y-t.startWorld.y;xt(n=>n.map(n=>n.id===t.id?{...n,a:{x:t.origA.x+e,y:t.origA.y+r},b:{x:t.origB.x+e,y:t.origB.y+r}}:n));return}if(t.kind===`rect`||t.kind===`measure`){Ce.current={...t,current:Nt(n).point},ut(Nt(n).point);return}if(t.kind===`marquee`){Ce.current={...t,current:n},ut(n);return}if(t.kind===`wallSplit`){let e=Js(Q,t.wallId,t.at);if(!e.result.wallIds){Ce.current={kind:`none`};return}let r=e.result.nodeId,i=Q.walls[t.wallId],a=i?e.floor.nodes[i.a]:void 0,o=i?e.floor.nodes[i.b]:void 0,s={origin:a?{x:a.x,y:a.y}:void 0,referenceAngle:a&&o?Math.atan2(o.y-a.y,o.x-a.x):void 0,excludeWallIds:new Set(e.result.wallIds)},c=Nt(n,s.origin,new Set([r]),s.referenceAngle,s.excludeWallIds).point;Ce.current={kind:`node`,nodeId:r,moved:!0,...s},Je({type:`node`,id:r}),yt(_t.current),Lt(ic(e.floor,r,c).floor,`move-node`,!1,[r]);return}if(t.kind===`node`){let e=Nt(n,t.origin,new Set([t.nodeId]),t.referenceAngle,t.excludeWallIds).point;yt(_t.current),Ce.current={...t,moved:!0},Lt(ic(Q,t.nodeId,e).floor,`move-node`,!1,[t.nodeId]);return}if(t.kind===`wall`){let e=Q.walls[t.wallId];if(!e)return;let r=t.origB.x-t.origA.x,i=t.origB.y-t.origA.y,a=Math.hypot(r,i);if(a<1e-6)return;let o={x:-i/a,y:r/a},s=(n.x-t.startWorld.x)*o.x+(n.y-t.startWorld.y)*o.y,c=N!==De.current&&j>0?j:1,l=Math.round(s/c)*c,u=Math.max(c,10);if(t.detach){if(Math.abs(l)<u)return;let e=tc(Q,t.wallId,{x:o.x*l,y:o.y*l});if(!e.result)return;Ce.current={...t,detach:!1,toggle:!1,detachedSign:Math.sign(l),moved:!0},Je({type:`wall`,id:t.wallId}),Lt(e.floor,`move-wall`,!1,[t.wallId]);return}let d=ic(Q,e.a,{x:t.origA.x+o.x*l,y:t.origA.y+o.y*l}).floor;d=ic(d,e.b,{x:t.origB.x+o.x*l,y:t.origB.y+o.y*l}).floor,t.detachedSign&&Math.abs(l)<10?(d=nc(d).floor,Ce.current={...t,detachedSign:void 0,moved:!0}):Ce.current={...t,moved:!0},Lt(d,`move-wall`,!1,[t.wallId]);return}if(t.kind===`opening`){let e=Q.openings[t.openingId];if(!e)return;let r=Q.walls[e.wallId],i=Q.nodes[r.a],a=Q.nodes[r.b],o=Math.hypot(a.x-i.x,a.y-i.y),s=((n.x-i.x)*(a.x-i.x)+(n.y-i.y)*(a.y-i.y))/(o*o||1);Ce.current={...t,moved:!0},Lt(cc(Q,t.openingId,{offset:Math.min(Math.max(s,0),1)*o}).floor,`move-opening`,!1,[t.openingId]);return}if(t.kind===`room`){let e=n.x-t.startWorld.x,r=n.y-t.startWorld.y,i=N!==De.current&&j>0?j:1,a=Math.round(e/i)*i,o=Math.round(r/i)*i,s=Q;for(let e of t.nodeIds){let n=t.orig[e];n&&(s=ic(s,e,{x:n.x+a,y:n.y+o}).floor)}Ce.current={...t,moved:!0},Lt(s,`move-room`,!1,t.nodeIds)}}},[oe,kt,He,Q,ze,$e,_e,rt.zoom,O,k,j,N,jt,Nt,Lt,it,Je,st,At,C,Et]),Yt=(0,c.useCallback)((e,t)=>{we.current.delete(e.pointerId);let n=Ce.current;Ce.current={kind:`none`};let r=Te.current?.moved??!1;if(Te.current=null,yt(null),n.kind===`none`||n.kind===`pan`||n.kind===`pinch`)return;if(n.kind===`marquee`){if(t||!r){t&&Je([...n.base]);return}let e=Math.min(n.start.x,n.current.x),i=Math.max(n.start.x,n.current.x),a=Math.min(n.start.y,n.current.y),o=Math.max(n.start.y,n.current.y),s=[];for(let t of Object.values(Q.nodes))t.x>=e&&t.x<=i&&t.y>=a&&t.y<=o&&s.push({type:`node`,id:t.id});if(n.additive){let e=new Set(n.base.map(e=>`${e.type}:${e.id}`));Je([...n.base,...s.filter(t=>!e.has(`${t.type}:${t.id}`))])}else Je(s);return}if(t){let e=ke.cancelGesture();e&&i?.(e,{reason:`external`,committed:!1,targetIds:[]});return}if(n.kind===`measureEnd`||n.kind===`measureMove`)return;if(n.kind===`measure`){let e=Math.hypot(n.current.x-n.start.x,n.current.y-n.start.y);r&&e>sf&&(St.current+=1,xt(e=>[...e,{id:St.current,a:n.start,b:n.current}]));return}if(n.kind===`rect`){if(!r){ke.cancelGesture();return}let e=Qs(Q,n.start,n.current,{thickness:L,type:_s.Interior,height:R},rl(_e,rt.zoom).node);if(e.result.wallIds.length===0){ke.cancelGesture();return}let t=ke.endGesture();Rt(e.floor,`draw-rect`,e.result.wallIds,{push:!t});return}if(!r){ke.cancelGesture(),n.kind===`wall`&&n.toggle&&Ye({type:`wall`,id:n.wallId});return}if(n.kind===`node`){let e=Q.nodes[n.nodeId];if(e){let t=rl(_e,rt.zoom).node,r=Object.values(Q.nodes).find(r=>r.id!==n.nodeId&&Math.hypot(r.x-e.x,r.y-e.y)<=t);if(r){let e=ke.endGesture();Rt($s(Q,r.id,n.nodeId).floor,`move-node`,[r.id],{push:!e}),Je({type:`node`,id:r.id});return}}}let a=ke.endGesture(),o=n.kind===`wall`?`move-wall`:n.kind===`opening`?`move-opening`:n.kind===`room`?`move-room`:`move-node`;Rt(Q,o,[],{push:!a})},[Q,ke,_e,rt.zoom,L,R,Rt,Je,Ye,i]);(0,c.useEffect)(()=>{let e=ye.current;if(!e||oe)return;function t(t){t.preventDefault();let n=e.getBoundingClientRect(),r=Math.exp(-t.deltaY*.002);it((()=>{let e=Xt.current,i=Math.max(O,Math.min(k,e.zoom*r)),a=ll(t.clientX,t.clientY,n,e);return{x:a.x-(t.clientX-n.left)/i,y:a.y-(t.clientY-n.top)/i,zoom:i}})())}return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[oe,O,k,it]);let Xt=(0,c.useRef)(rt);Xt.current=rt;let Zt=(0,c.useCallback)(e=>{let t=Math.max(O,Math.min(k,rt.zoom*e)),n={x:rt.x+at.width/2/rt.zoom,y:rt.y+at.height/2/rt.zoom};it({x:n.x-at.width/2/t,y:n.y-at.height/2/t,zoom:t})},[rt,at,O,k,it]),Qt=(0,c.useCallback)(()=>{if(J===`none`)return;let e=ke.undo();e&&(Se.current=e,i?.(e,{reason:`undo`,committed:!0,targetIds:[]}),a?.(e,{reason:`undo`,committed:!0,targetIds:[]}))},[J,ke,i,a]),$t=(0,c.useCallback)(()=>{if(J===`none`)return;let e=ke.redo();e&&(Se.current=e,i?.(e,{reason:`redo`,committed:!0,targetIds:[]}),a?.(e,{reason:`redo`,committed:!0,targetIds:[]}))},[J,ke,i,a]),en=(0,c.useCallback)(()=>{let e=ze.filter(e=>e.roomId).map(e=>({type:`room`,id:e.roomId}));if(e.length>0){Je(e);return}Je(Object.keys(Q.nodes).map(e=>({type:`node`,id:e})))},[ze,Q.nodes,Je]),tn=(0,c.useCallback)((e,t)=>{if(!kt||Qe.size===0)return;let n=j>0?j:100,r=Oe.current?n*10:n,i=Q;for(let n of Qe){let a=i.nodes[n];a&&(i=ic(i,n,{x:a.x+e*r,y:a.y+t*r}).floor)}Rt(i,`nudge`,[...Qe])},[kt,Qe,Q,j,Rt]),nn=(0,c.useCallback)(e=>{if(oe)return;let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){e.key===`Escape`&&t.blur();return}if(e.key===`Shift`&&(Oe.current=!0),e.key===`Alt`&&(De.current=!0),e.key===` `&&!Ee.current){Ee.current=!0,e.preventDefault();return}let n=e.metaKey||e.ctrlKey;if(n&&e.key.toLowerCase()===`z`){e.preventDefault(),e.shiftKey?$t():Qt();return}if(n&&e.key.toLowerCase()===`a`){e.preventDefault(),S&&en();return}if(n&&e.key.toLowerCase()===`y`){e.preventDefault(),$t();return}if(e.key===`Escape`){st.length>0?Kt():bt.length>0?xt([]):Je(null);return}if(e.key===`Enter`&&He===`wall`){Kt();return}if(e.key===`Delete`||e.key===`Backspace`){if(e.preventDefault(),He===`measure`){Ct!==null&&(xt(e=>e.filter(e=>e.id!==Ct)),wt(null));return}Gt();return}if(e.key===`+`||e.key===`=`){Zt(1.25);return}if(e.key===`-`){Zt(1/1.25);return}if(e.key===`0`){Ft();return}if(e.key.startsWith(`Arrow`)){e.preventDefault();let t={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[e.key];t&&tn(t[0],t[1]);return}let r=e.key.toLowerCase();if(r===`s`){ft(e=>!e);return}if(r===`l`){mt(e=>!e);return}if(r===`g`){gt(e=>!e);return}let i=nf[e.key.toLowerCase()];i&&kt&&v.includes(i)&&(Ue(i),Kt())},[oe,kt,v,He,st,bt.length,Ct,$t,Qt,Je,Kt,Gt,Zt,Ft,tn,Ue,S,en]),rn=(0,c.useCallback)((e,t,n)=>{Se.current=e,n?.resetHistory?(ke.clearHistory(),ke.replace(e)):ke.commit(e,t);let r={reason:t,committed:!0,targetIds:[]};i?.(e,r),a?.(e,r)},[ke,i,a]),an=(0,c.useCallback)((e={})=>{let{plan:t,floor:n}=yc(je,{...e,index:_c(je,Q.id)+1});return rn(t,`add-floor`),Re(n.id),n.id},[je,Q.id,rn,Re]),on=(0,c.useCallback)(()=>{let{plan:e,floor:t}=xc(je,Q.id);return t?(rn(e,`duplicate-floor`),Re(t.id),t.id):null},[je,Q.id,rn,Re]),sn=(0,c.useCallback)(e=>{let t=e??Q.id,n=bc(je,t);if(n!==je&&(rn(n,`remove-floor`),t===Q.id)){let e=_c(je,t);Re(n.floors[Math.max(0,e-1)].id)}},[je,Q.id,rn,Re]),cn=(0,c.useCallback)((e,t)=>{let n=Tc(je,e,t);n!==je&&rn(n,`move-floor`)},[je,rn]),ln=(0,c.useCallback)((e,t)=>{let n=Cc(je,e,t);n!==je&&rn(n,`edit-floor`)},[je,rn]),un=(0,c.useCallback)((e,t)=>{let n=wc(je,e,t);n!==je&&rn(n,`rename-floor`)},[je,rn]),dn=(0,c.useCallback)(e=>{let t=(e??q??je.name??``).trim()||`floor-plan`,n=URL.createObjectURL(new Blob([_l(je)],{type:`application/json`})),r=document.createElement(`a`);r.href=n,r.download=t.endsWith(`.json`)?t:`${t}.json`,r.click(),setTimeout(()=>URL.revokeObjectURL(n),0)},[q,je]),fn=(0,c.useCallback)(e=>{let t=Dl(e);return t.plan&&rn(t.plan,`import`),Ot(t.plan&&t.issues.length===0?null:t.issues),ne?.(t),t},[ne,rn]),pn=(0,c.useCallback)(e=>{e.text().then(e=>fn(e)).catch(e=>{let t=[`Could not read that file: ${e.message}`];Ot(t),ne?.({plan:null,issues:t})})},[fn,ne]),mn=(0,c.useCallback)(()=>xt([]),[]),hn=(0,c.useCallback)(e=>{e.key===`Shift`&&(Oe.current=!1),e.key===`Alt`&&(De.current=!1),e.key===` `&&(Ee.current=!1)},[]);(0,c.useImperativeHandle)(t,()=>({getPlan:()=>je,setPlan:(e,t)=>rn(e,`import`,t),clear:()=>rn(pc(),`clear`),getFloorId:()=>Q.id,setFloorId:Re,addFloor:e=>an(e),duplicateFloor:on,removeFloor:sn,renameFloor:un,moveFloor:cn,setFloorHeight:ln,clearMeasurements:mn,download:dn,loadJson:fn,undo:Qt,redo:$t,canUndo:()=>J!==`none`&&ke.canUndo,canRedo:()=>J!==`none`&&ke.canRedo,clearHistory:ke.clearHistory,getSelection:()=>[...qe.current],select:Je,addToSelection:e=>{let t=Array.isArray(e)?e:[e],n=new Set(qe.current.map(e=>`${e.type}:${e.id}`));Je([...qe.current,...t.filter(e=>!n.has(`${e.type}:${e.id}`))])},toggleSelection:Ye,selectAll:en,deleteSelection:Gt,getView:()=>rt,setView:it,zoomBy:Zt,fitToContent:Ft,toWorld:jt,toScreen:Mt,getSvgElement:()=>be.current}),[je,ke,rn,Q,Re,an,on,sn,un,cn,ln,mn,dn,fn,Qt,$t,J,Je,Ye,en,Gt,rt,it,Zt,Ft,jt,Mt]);let gn=Ce.current,_n=(0,c.useMemo)(()=>{if(!kt)return null;let e=[],t=[...bt,...gn.kind===`measure`?[{id:-1,a:gn.start,b:gn.current}]:[]];for(let n of t){let t=Mt(n.a),r=Mt(n.b),i=Math.hypot(n.b.x-n.a.x,n.b.y-n.a.y);if(i<sf)continue;let a=Math.atan2(n.b.y-n.a.y,n.b.x-n.a.x),o=-Math.sin(a)*5,s=Math.cos(a)*5,c={x:(t.x+r.x)/2,y:(t.y+r.y)/2};if(e.push((0,f.jsxs)(`g`,{className:(0,l.default)($.roomDrawerMeasureLine,Ct===n.id&&$.roomDrawerMeasureLineHovered,X?.measureLine),children:[(0,f.jsx)(`line`,{x1:t.x,y1:t.y,x2:r.x,y2:r.y}),(0,f.jsx)(`line`,{x1:t.x-o,y1:t.y-s,x2:t.x+o,y2:t.y+s}),(0,f.jsx)(`line`,{x1:r.x-o,y1:r.y-s,x2:r.x+o,y2:r.y+s})]},`measure-${n.id}`)),He===`measure`&&n.id>=0)for(let[i,a]of[[`a`,t],[`b`,r]])e.push((0,f.jsx)(`circle`,{className:$.roomDrawerMeasureGrip,cx:a.x,cy:a.y,r:4},`measure-grip-${n.id}-${i}`));e.push((0,f.jsx)(`text`,{className:(0,l.default)($.roomDrawerMeasure,X?.measureLine),x:c.x,y:c.y-8,textAnchor:`middle`,children:`${V(i)} · ${ff(a)}`},`measure-label-${n.id}`))}if(I&&vt&&(vt.guides.forEach((t,n)=>{let r=Mt(t.a),i=Mt(t.b);e.push((0,f.jsx)(`line`,{className:(0,l.default)($.roomDrawerGuide,t.kind===ol.Angle&&$.roomDrawerGuideAngle),x1:r.x,y1:r.y,x2:i.x,y2:i.y},`guide-${n}`))}),vt.kind!==ol.None&&vt.kind!==ol.Grid)){let t=Mt(vt.point);e.push((0,f.jsx)(`rect`,{className:$.roomDrawerSnapMarker,x:t.x-4,y:t.y-4,width:8,height:8},`snap-marker`))}if(gn.kind===`rect`){let t=Mt(gn.start),n=Mt(gn.current),r=Math.min(t.x,n.x),i=Math.min(t.y,n.y),a=Math.max(t.x,n.x),o=Math.max(t.y,n.y);e.push((0,f.jsx)(`rect`,{className:$.roomDrawerPreview,x:r,y:i,width:a-r,height:o-i},`rect-preview`));let s=Math.abs(gn.current.x-gn.start.x),c=Math.abs(gn.current.y-gn.start.y);B&&(s>0||c>0)&&(e.push((0,f.jsx)(`text`,{className:$.roomDrawerMeasure,x:(r+a)/2,y:i-8,textAnchor:`middle`,children:V(s)},`rect-width`),(0,f.jsx)(`text`,{className:$.roomDrawerMeasure,x:r-8,y:(i+o)/2,textAnchor:`end`,dominantBaseline:`central`,children:V(c)},`rect-height`)),s>0&&c>0&&e.push((0,f.jsx)(`text`,{className:(0,l.default)($.roomDrawerMeasure,$.roomDrawerMeasureSecondary),x:(r+a)/2,y:(i+o)/2,textAnchor:`middle`,dominantBaseline:`central`,children:H(s*c)},`rect-area`)))}if(He===`wall`&&st.length>0){let t=[...st,lt].filter(Boolean).map(Mt);if(e.push((0,f.jsx)(`polyline`,{className:$.roomDrawerPreview,points:t.map(e=>`${e.x},${e.y}`).join(` `),fill:`none`},`chain`)),t.forEach((t,n)=>{e.push((0,f.jsx)(`circle`,{className:$.roomDrawerHandle,cx:t.x,cy:t.y,r:4},`chain-dot-${n}`))}),B&&lt&&st.length>0){let t=st[st.length-1],n=Math.hypot(lt.x-t.x,lt.y-t.y),r=Mt({x:(t.x+lt.x)/2,y:(t.y+lt.y)/2}),i=vt?.kind===ol.Angle;e.push((0,f.jsx)(`text`,{className:(0,l.default)($.roomDrawerMeasure,i&&$.roomDrawerMeasureLocked),x:r.x,y:r.y-8,textAnchor:`middle`,children:`${V(n)} · ${ff(vt?.angleRelativeTo===`reference`&&At!==void 0?Math.atan2(lt.y-t.y,lt.x-t.x)-At:Math.atan2(lt.y-t.y,lt.x-t.x))}${vt?.angleRelativeTo===`reference`?` rel`:``}`},`chain-len`))}}let n=new Set(Ke.filter(e=>e.type===`node`).map(e=>e.id));for(let t of Qe){let r=Q.nodes[t];if(!r)continue;let i=Mt(r);e.push((0,f.jsx)(`circle`,{className:(0,l.default)($.roomDrawerHandle,n.has(t)&&$.roomDrawerHandleActive),cx:i.x,cy:i.y,r:5},`handle-${t}`))}if(gn.kind===`marquee`&&Te.current?.moved){let t=Mt(gn.start),n=Mt(gn.current);e.push((0,f.jsx)(`rect`,{className:$.roomDrawerMarquee,x:Math.min(t.x,n.x),y:Math.min(t.y,n.y),width:Math.abs(n.x-t.x),height:Math.abs(n.y-t.y)},`marquee`))}if(Ht&&gn.kind!==`node`){let t=Mt(Ht);e.push((0,f.jsx)(`circle`,{className:$.roomDrawerMidHandle,cx:t.x,cy:t.y,r:4},`midpoint`))}if(B&&gn.kind===`room`&&gn.moved){let t=new Set(gn.nodeIds),n=gn.nodeIds.find(e=>Q.nodes[e]&&gn.orig[e]);if(n){let t=Q.nodes[n],r=gn.orig[n],i=t.x-r.x,a=t.y-r.y,o=Xe?.type===`room`?ze.find(e=>e.roomId===Xe.id):void 0,s=Mt(o?o.anchor:t);e.push((0,f.jsx)(`text`,{className:(0,l.default)($.roomDrawerMeasure,$.roomDrawerMeasureOffset),x:s.x,y:s.y-26,textAnchor:`middle`,children:`${V(Math.hypot(i,a))} · ${ff(Math.atan2(a,i))}`},`room-offset`))}for(let n of Object.values(Q.walls)){if(t.has(n.a)===t.has(n.b))continue;let r=Q.nodes[n.a],i=Q.nodes[n.b];if(!r||!i)continue;let a=t.has(n.a)?r:i,o=t.has(n.a)?i:r,s=Mt({x:(r.x+i.x)/2,y:(r.y+i.y)/2});e.push((0,f.jsx)(`text`,{className:(0,l.default)($.roomDrawerMeasure,$.roomDrawerMeasureSecondary),x:s.x,y:s.y-8,textAnchor:`middle`,children:`${V(Math.hypot(o.x-a.x,o.y-a.y))} · ${ff(Math.atan2(o.y-a.y,o.x-a.x))}`},`room-stretch-${n.id}`))}}if(B&&(Xe?.type===`node`||Xe?.type===`wall`)){let t=[],n=new Set,r=(e,r,i)=>{if(n.has(e))return;let a=Q.walls[e];a&&(n.add(e),t.push({wall:a,from:r,primary:i}))};if(Xe.type===`node`)for(let e of Object.values(Q.walls))(e.a===Xe.id||e.b===Xe.id)&&r(e.id,Xe.id,!0);else{let e=Q.walls[Xe.id];if(e){r(e.id,e.a,!0);for(let t of Object.values(Q.walls))if(t.id!==e.id)for(let n of[e.a,e.b])(t.a===n||t.b===n)&&r(t.id,n,!1)}}let i=vt?.kind===ol.Angle&&gn.kind!==`none`;for(let{wall:n,from:r,primary:a}of t){let t=Q.nodes[n.a],o=Q.nodes[n.b];if(!t||!o)continue;let s=n.a===r?t:o,c=n.a===r?o:t,u=Mt({x:(t.x+o.x)/2,y:(t.y+o.y)/2});e.push((0,f.jsx)(`text`,{className:(0,l.default)($.roomDrawerMeasure,!a&&$.roomDrawerMeasureSecondary,a&&i&&$.roomDrawerMeasureLocked),x:u.x,y:u.y-8,textAnchor:`middle`,children:`${V(Math.hypot(c.x-s.x,c.y-s.y))} · ${ff(Math.atan2(c.y-s.y,c.x-s.x))}`},`measure-${n.id}`))}}return(0,f.jsx)(f.Fragment,{children:e})},[kt,gn,He,st,lt,Ke,Q,ze,Xe,Qe,Ht,B,I,vt,At,V,H,bt,Ct,X?.measureLine,Mt]),vn={select:{icon:d.faArrowPointer,label:Y?.select??`Select and edit`,key:`V`},wall:{icon:d.faMinus,label:Y?.wall??`Draw walls`,key:`W`},rect:{icon:d.faSquare,label:Y?.rect??`Draw a room`,key:`R`},door:{icon:d.faDoorOpen,label:Y?.door??`Add a door`,key:`D`},window:{icon:d.faWindowMaximize,label:Y?.window??`Add a window`,key:`N`},archway:{icon:d.faExpand,label:Y?.archway??`Add an archway`,key:`A`},measure:{icon:d.faRulerCombined,label:Y?.measure??`Measure`,key:`M`}},yn=kt?He===`wall`?Y?.hintWall??`Click to place corners · Shift for a fixed angle, L to latch it · Click the first corner or press Enter to close`:He===`rect`?Y?.hintRect??`Drag to draw a room`:He===`measure`?Y?.hintMeasure??`Drag to measure · Drag an end or the line to adjust it · Delete removes one, Escape clears them`:rf[He]?Y?.hintOpening??`Click a wall to cut an opening into it`:Y?.hintSelect??(S?`Drag a corner to reshape · Drag a wall to push it, and the room next door moves with it · Ctrl-click or drag a box to select several · Delete to remove`:`Drag a corner to reshape · Drag a wall to push it, and the room next door moves with it · Drag the dot on a selected wall to add a corner · Delete to remove`):``,bn=Ke.length===0?Y?.selectedFloor??`Floor`:Ke.length>1?(Y?.selectedCount??`{count} selected`).replace(`{count}`,String(Ke.length)):Vt?Y?.selectedOpening??af[Vt.kind]:Bt?Y?.selectedWall??`Wall`:Xe?.type===`room`?Y?.selectedRoom??`Room`:Y?.selectedCorner??`Corner`,xn=kt?v:[];return(0,f.jsxs)(`div`,{...he,ref:ve,className:(0,l.default)($.roomDrawer,oe&&$.roomDrawerDisabled,pe,X?.root),style:{...me,...Z?.root},role:`application`,"aria-label":fe??`Floor plan editor`,tabIndex:oe?-1:0,onKeyDown:nn,onKeyUp:hn,children:[U&&(0,f.jsxs)(`div`,{className:(0,l.default)($.roomDrawerToolbar,X?.toolbar),style:Z?.toolbar,role:`toolbar`,"aria-label":Y?.tools??`Drawing tools`,children:[xn.map(e=>{let t=vn[e];return(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerToolButton,e===He&&$.roomDrawerToolButtonActive,X?.toolButton),style:Z?.toolButton,title:`${t.label} (${t.key})`,"aria-label":t.label,"aria-pressed":e===He,onClick:()=>{Ue(e),Kt()},children:K(de?.[e]??t.icon,{className:(0,l.default)($.roomDrawerToolIcon,X?.toolIcon),style:Z?.toolIcon})},e)}),xn.length>0&&(0,f.jsx)(`span`,{className:$.roomDrawerToolbarSeparator}),kt&&(0,f.jsxs)(f.Fragment,{children:[[{on:dt,toggle:()=>ft(e=>!e),icon:de?.snap??d.faMagnet,label:Y?.snap??`Snap to grid and geometry`,key:`S`},{on:pt,toggle:()=>mt(e=>!e),icon:de?.angleLock??d.faDraftingCompass,label:Y?.angleLock??`Lock to ${F}° angles`,key:`L`},{on:ht,toggle:()=>gt(e=>!e),icon:de?.grid??d.faBorderAll,label:Y?.grid??`Show grid`,key:`G`},...vc(je,Q.id)?[{on:Fe,toggle:()=>Ie(e=>!e),icon:de?.underlay??d.faLayerGroup,label:Y?.underlay??`Show the floor below`,key:`B`}]:[]].map(e=>(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerToolButton,e.on&&$.roomDrawerToolButtonOn,X?.toolButton),style:Z?.toolButton,title:`${e.label} (${e.key})`,"aria-label":e.label,"aria-pressed":e.on,onClick:e.toggle,children:K(e.icon,{className:(0,l.default)($.roomDrawerToolIcon,X?.toolIcon),style:Z?.toolIcon})},e.key)),(0,f.jsx)(`span`,{className:$.roomDrawerToolbarSeparator})]}),ee&&J!==`none`&&kt&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerViewButton,X?.viewButton),style:Z?.viewButton,title:Y?.undo??`Undo`,"aria-label":Y?.undo??`Undo`,disabled:!ke.canUndo,onClick:Qt,children:K(de?.undo??d.faArrowRotateLeft)}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerViewButton,X?.viewButton),style:Z?.viewButton,title:Y?.redo??`Redo`,"aria-label":Y?.redo??`Redo`,disabled:!ke.canRedo,onClick:$t,children:K(de?.redo??d.faArrowRotateRight)}),(0,f.jsx)(`span`,{className:$.roomDrawerToolbarSeparator})]}),te&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerViewButton,X?.viewButton),style:Z?.viewButton,title:Y?.download??`Download plan`,"aria-label":Y?.download??`Download plan`,onClick:()=>dn(),children:K(de?.download??d.faDownload)}),kt&&(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerViewButton,X?.viewButton),style:Z?.viewButton,title:Y?.upload??`Open a plan file`,"aria-label":Y?.upload??`Open a plan file`,onClick:()=>Tt.current?.click(),children:K(de?.upload??d.faUpload)}),(0,f.jsx)(`span`,{className:$.roomDrawerToolbarSeparator})]}),(0,f.jsxs)(`div`,{className:(0,l.default)($.roomDrawerViewControls,X?.viewControls),style:Z?.viewControls,children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerViewButton,X?.viewButton),style:Z?.viewButton,title:Y?.zoomOut??`Zoom out`,"aria-label":Y?.zoomOut??`Zoom out`,onClick:()=>Zt(1/1.25),children:K(de?.zoomOut??d.faMagnifyingGlassMinus)}),(0,f.jsxs)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerZoomLabel,X?.zoomLabel),style:Z?.zoomLabel,title:Y?.fit??`Fit to content`,onClick:()=>Ft(),children:[Math.round(rt.zoom*1e3)/10,`%`]}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerViewButton,X?.viewButton),style:Z?.viewButton,title:Y?.zoomIn??`Zoom in`,"aria-label":Y?.zoomIn??`Zoom in`,onClick:()=>Zt(1.25),children:K(de?.zoomIn??d.faMagnifyingGlassPlus)})]})]}),p&&je.floors.length>0&&(0,f.jsxs)(`div`,{className:(0,l.default)($.roomDrawerFloorBar,X?.floorBar),style:Z?.floorBar,role:`tablist`,"aria-label":Y?.selectedFloor??`Floor`,children:[[...je.floors].reverse().map(e=>(0,f.jsx)(`button`,{type:`button`,role:`tab`,className:(0,l.default)($.roomDrawerFloorTab,e.id===Q.id&&$.roomDrawerFloorTabActive,X?.floorTab),style:Z?.floorTab,"aria-selected":e.id===Q.id,onClick:()=>Re(e.id),children:e.label},e.id)),kt&&(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerFloorTab,$.roomDrawerFloorTabAdd),title:Y?.addFloor??`Add a floor above`,"aria-label":Y?.addFloor??`Add a floor above`,onClick:()=>an(),children:K(de?.addFloor??d.faPlus)})]}),(0,f.jsx)(`div`,{ref:ye,className:(0,l.default)($.roomDrawerCanvasWrapper,kt&&He!==`select`&&$.roomDrawerCanvasWrapperDrawing,X?.canvasWrapper),style:{height:se,...Z?.canvasWrapper},onPointerDown:qt,onPointerMove:Jt,onPointerUp:e=>Yt(e,!1),onPointerCancel:e=>Yt(e,!0),children:(0,f.jsx)(Qd,{ref:be,floor:Q,underlay:Le,rooms:ze,view:rt,size:at,selection:Ke,hovered:$e,interactiveRooms:!1,showGrid:ht,gridSize:j,showRoomLabels:!0,formatArea:H,getRoomColor:le,renderRoomLabel:ue,overlay:_n,classNames:X,styles:Z})}),W&&kt&&(0,f.jsxs)(`div`,{className:(0,l.default)($.roomDrawerInspector,X?.inspector),style:Z?.inspector,children:[(0,f.jsx)(`span`,{className:(0,l.default)($.roomDrawerInspectorKind,Ke.length===0&&$.roomDrawerInspectorKindEmpty,X?.inspectorLabel),children:bn}),Ke.length===0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Gi,{className:(0,l.default)($.roomDrawerInspectorName,X?.inspectorField),style:Z?.inspectorField,label:Y?.floorName??`Floor name`,value:Q.label,onChange:e=>un(Q.id,e)}),(0,f.jsx)(fd,{className:(0,l.default)($.roomDrawerInspectorField,X?.inspectorField),style:Z?.inspectorField,label:Y?.floorHeight??`Height (mm)`,title:Y?.storeyHeightHint??`Storey height. The floors above move to sit on top of it.`,value:Q.height,decimalScale:0,min:500,step:100,showArrows:!0,onChange:e=>{e!==void 0&&ln(Q.id,e)}}),je.floors.length>1&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerInspectorAction,X?.inspectorField),style:Z?.inspectorField,title:Y?.moveFloorUp??`Move this floor up`,"aria-label":Y?.moveFloorUp??`Move this floor up`,disabled:_c(je,Q.id)>=je.floors.length-1,onClick:()=>cn(Q.id,_c(je,Q.id)+1),children:K(de?.moveFloorUp??d.faAngleUp)}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerInspectorAction,X?.inspectorField),style:Z?.inspectorField,title:Y?.moveFloorDown??`Move this floor down`,"aria-label":Y?.moveFloorDown??`Move this floor down`,disabled:_c(je,Q.id)<=0,onClick:()=>cn(Q.id,_c(je,Q.id)-1),children:K(de?.moveFloorDown??d.faAngleDown)})]}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerInspectorAction,X?.inspectorField),style:Z?.inspectorField,title:Y?.duplicateFloor??`Copy this floor to a new one above`,onClick:()=>on(),children:K(de?.duplicateFloor??d.faClone)}),je.floors.length>1&&(0,f.jsx)(ce,{className:$.roomDrawerInspectorDelete,icon:de?.delete??d.faTrash,title:Y?.deleteFloor??`Delete this floor`,onClick:()=>sn()})]}),zt?.meta&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Gi,{className:(0,l.default)($.roomDrawerInspectorName,X?.inspectorField),style:Z?.inspectorField,label:Y?.roomName??`Room name`,value:zt.meta.name,onChange:e=>{let t=zt.meta;Rt({...Q,rooms:{...Q.rooms,[t.id]:{...t,name:e}}},`edit-room`,[t.id])}}),(0,f.jsx)(`span`,{className:(0,l.default)($.roomDrawerInspectorLabel,X?.inspectorLabel),children:H(zt.area)})]}),Bt&&(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerInspectorAction,X?.inspectorField),style:Z?.inspectorField,onClick:Ut,title:Y?.addCorner??`Add a corner to this wall`,children:Y?.addCorner??`Add corner`}),Bt&&(0,f.jsx)(fd,{className:(0,l.default)($.roomDrawerInspectorField,X?.inspectorField),style:Z?.inspectorField,label:Y?.thickness??`Thickness (mm)`,value:Bt.thickness,decimalScale:0,min:10,showArrows:!0,step:10,onChange:e=>{e!==void 0&&Rt({...Q,walls:{...Q.walls,[Bt.id]:{...Bt,thickness:e}}},`edit-wall`,[Bt.id])}}),Vt&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(fd,{className:(0,l.default)($.roomDrawerInspectorField,X?.inspectorField),style:Z?.inspectorField,label:Y?.width??`Width (mm)`,value:Vt.width,decimalScale:0,min:100,step:50,showArrows:!0,onChange:e=>{e!==void 0&&Rt(cc(Q,Vt.id,{width:e}).floor,`edit-opening`,[Vt.id])}}),(0,f.jsx)(fd,{className:(0,l.default)($.roomDrawerInspectorField,X?.inspectorField),style:Z?.inspectorField,label:Y?.sill??`Sill (mm)`,title:Y?.sillHeightHint??`How far above the floor the opening starts. Stored for a 3D view; it does not change the plan.`,showArrows:!0,value:Vt.sill,decimalScale:0,min:0,step:50,onChange:e=>{e!==void 0&&Rt(cc(Q,Vt.id,{sill:e}).floor,`edit-opening`,[Vt.id])}})]}),Ke.length>0&&(0,f.jsx)(ce,{className:$.roomDrawerInspectorDelete,icon:de?.delete??d.faTrash,title:Y?.deleteSelection??`Delete selection`,onClick:Gt})]}),te&&kt&&(0,f.jsx)(`input`,{ref:Tt,type:`file`,accept:`application/json,.json`,className:$.roomDrawerFileInput,tabIndex:-1,"aria-hidden":`true`,onChange:e=>{let t=e.target.files?.[0];e.target.value=``,t&&pn(t)}}),G&&(Dt!==null||yn)&&(0,f.jsx)(`div`,{className:(0,l.default)($.roomDrawerHint,Dt!==null&&$.roomDrawerHintReport,X?.hint),style:Z?.hint,role:Dt===null?void 0:`status`,children:Dt===null?yn:Dt.length===0?Y?.importFailed??`That file could not be read as a floor plan`:Dt.join(` · `)})]})}var mf={roomViewer:`roomViewer_JtBDo`,"roomViewer-floorBar":`roomViewer-floorBar_Svfsf`,roomViewerFloorBar:`roomViewer-floorBar_Svfsf`,"roomViewer-floorTab":`roomViewer-floorTab_eH3Nl`,roomViewerFloorTab:`roomViewer-floorTab_eH3Nl`,"roomViewer-floorTab-active":`roomViewer-floorTab-active_3ZQv9`,roomViewerFloorTabActive:`roomViewer-floorTab-active_3ZQv9`,"roomViewer-canvasWrapper":`roomViewer-canvasWrapper_UopaD`,roomViewerCanvasWrapper:`roomViewer-canvasWrapper_UopaD`,"roomViewer-canvasWrapper-pannable":`roomViewer-canvasWrapper-pannable_-Knr7`,roomViewerCanvasWrapperPannable:`roomViewer-canvasWrapper-pannable_-Knr7`,"roomViewer-viewControls":`roomViewer-viewControls_XNVTI`,roomViewerViewControls:`roomViewer-viewControls_XNVTI`,"roomViewer-viewButton":`roomViewer-viewButton_Q-o9G`,roomViewerViewButton:`roomViewer-viewButton_Q-o9G`,"roomViewer-empty":`roomViewer-empty_LL-4L`,roomViewerEmpty:`roomViewer-empty_LL-4L`,"roomViewer-live":`roomViewer-live_WSwUx`,roomViewerLive:`roomViewer-live_WSwUx`},hf=.002,gf=4,_f=4;function vf(e){let t=e/1e6;return`${t<10?t.toFixed(1):Math.round(t)} m²`}function yf(e){let{ref:t,plan:n,activeFloorId:r,defaultActiveFloorId:i,onFloorChange:a,selectedRoomId:o,defaultSelectedRoomId:s=null,onSelect:u,hoveredRoomId:p,onHoverChange:m,view:h,defaultView:g,onViewChange:_,interactive:v=!0,pannable:y=!0,fitOnMount:b=!0,showFloorBar:x=!0,showViewControls:S=!0,showGrid:C=!1,showRoomLabels:w=!0,showOpeningSymbols:T=!0,getRoomColor:E,renderRoomLabel:O,getRoomLabel:k,formatArea:A=vf,height:j=360,emptyState:M,labels:N,icons:P,className:F,style:I,classNames:L,styles:R,"aria-label":z,...B}=D(`RoomViewer`,e),V=(0,c.useRef)(null),H=(0,c.useRef)(null),U=(0,c.useId)().replace(/:/g,``),W=n?.floors??[],[G,ee]=(0,c.useState)(i),te=r??G??W[0]?.id,q=(0,c.useMemo)(()=>n?mc(n,te)??mc(n):null,[n,te]),ne=(0,c.useCallback)(e=>{r===void 0&&ee(e),a?.(e)},[r,a]),J=(0,c.useMemo)(()=>q?Vc(q).rooms:[],[q]),[re,ie]=(0,c.useState)(s),ae=o===void 0?re:o,[oe,se]=(0,c.useState)(null),ce=p===void 0?oe:p,le=(0,c.useCallback)(e=>{o===void 0&&ie(e);let t=e?J.find(t=>t.roomId===e)??null:null;u?.(e,t,q?.id??``)},[o,J,u,q?.id]),ue=(0,c.useCallback)(e=>{p===void 0&&se(e),m?.(e)},[p,m]),Y=(()=>{let e=ae?J.find(e=>e.roomId===ae):void 0;if(!e)return N?.noRoomSelected??`No room selected`;let t=e.meta?.name||`Unnamed room`;return(N?.selectedRoom??`{name} selected, {area}`).replace(`{name}`,t).replace(`{area}`,A(e.area))})(),[de,fe]=(0,c.useState)(g??{x:0,y:0,zoom:.05}),pe=h??de,me=(0,c.useRef)(pe);me.current=pe;let X=(0,c.useCallback)(e=>{h===void 0&&fe(e),_?.(e)},[h,_]),Z=(0,c.useRef)(!1),[he,ge]=(0,c.useState)({width:800,height:360});(0,c.useEffect)(()=>{let e=V.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();t.width>0&&t.height>0&&ge({width:Math.round(t.width),height:Math.round(t.height)})},n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[]);let _e=(0,c.useCallback)((e={})=>{let t=e.padding??24,n=q?Oc(q):null;if(!n||n.width<=0||n.height<=0){X({x:-1e3,y:-1e3,zoom:.05});return}let r=Math.max(hf,Math.min(gf,Math.min((he.width-t*2)/n.width,(he.height-t*2)/n.height)));X({x:n.minX-(he.width/r-n.width)/2,y:n.minY-(he.height/r-n.height)/2,zoom:r})},[q,he.width,he.height,X]);(0,c.useEffect)(()=>{b&&!Z.current&&(!q||he.width<=0||Object.keys(q.nodes).length===0||_e())},[b,q,he.width,he.height,_e]);let ve=(0,c.useCallback)((e,t)=>{Z.current=!0;let n=me.current,r=Math.max(hf,Math.min(gf,n.zoom*e));if(r===n.zoom)return;let i=t?.x??he.width/2,a=t?.y??he.height/2;X({x:n.x+i/n.zoom-i/r,y:n.y+a/n.zoom-a/r,zoom:r})},[X,he.width,he.height]),ye=(0,c.useRef)(new Map),be=(0,c.useRef)(null),xe=(0,c.useRef)(null),Se=(0,c.useCallback)(e=>{if(y){if(ye.current.set(e.pointerId,{x:e.clientX,y:e.clientY}),ye.current.size===2){let[e,t]=[...ye.current.values()];xe.current={dist:Math.hypot(t.x-e.x,t.y-e.y),view:me.current,mid:{x:(e.x+t.x)/2,y:(e.y+t.y)/2}},be.current=null;return}be.current={startClient:{x:e.clientX,y:e.clientY},startView:me.current,moved:!1}}},[y]),Ce=(0,c.useCallback)(e=>{ye.current.has(e.pointerId)&&ye.current.set(e.pointerId,{x:e.clientX,y:e.clientY});let t=xe.current;if(t&&ye.current.size>=2){let[e,n]=[...ye.current.values()],r=Math.hypot(n.x-e.x,n.y-e.y);if(t.dist<=0)return;let i=Math.max(hf,Math.min(gf,t.view.zoom*(r/t.dist))),a=V.current?.getBoundingClientRect()??{left:0,top:0},o={x:(e.x+n.x)/2,y:(e.y+n.y)/2};Z.current=!0;let s=ll(t.mid.x,t.mid.y,a,t.view);X({x:s.x-(o.x-a.left)/i,y:s.y-(o.y-a.top)/i,zoom:i});return}let n=be.current;if(!n)return;let r=e.clientX-n.startClient.x,i=e.clientY-n.startClient.y;!n.moved&&Math.hypot(r,i)<=_f||(n.moved||e.currentTarget.setPointerCapture?.(e.pointerId),n.moved=!0,Z.current=!0,X({x:n.startView.x-r/n.startView.zoom,y:n.startView.y-i/n.startView.zoom,zoom:n.startView.zoom}))},[X]),we=(0,c.useCallback)(e=>{ye.current.delete(e.pointerId),ye.current.size<2&&(xe.current=null),be.current=null},[]);(0,c.useEffect)(()=>{let e=V.current;if(!e||!y)return;let t=t=>{t.preventDefault();let n=e.getBoundingClientRect();ve(t.deltaY<0?1.1:1/1.1,{x:t.clientX-n.left,y:t.clientY-n.top})};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[y,ve]),(0,c.useImperativeHandle)(t,()=>({fitToContent:_e,getView:()=>me.current,setView:X,zoomBy:e=>ve(e),select:le,getFloorId:()=>q?.id??null,setFloorId:ne,getSvgElement:()=>H.current}),[_e,X,ve,le,q?.id,ne]);let Te=(0,c.useMemo)(()=>ae?[{type:`room`,id:ae}]:[],[ae]),Ee=(0,c.useMemo)(()=>ce?{type:`room`,id:ce}:null,[ce]),De=!q||Object.keys(q.walls).length===0;return(0,f.jsxs)(`div`,{...B,className:(0,l.default)(mf.roomViewer,F,L?.root),style:{...I,...R?.root},"aria-label":z??`Floor plan`,children:[x&&W.length>1&&(0,f.jsx)(`div`,{className:(0,l.default)(mf.roomViewerFloorBar,L?.floorBar),style:R?.floorBar,role:`tablist`,"aria-label":N?.floors??`Floors`,children:[...W].reverse().map(e=>(0,f.jsx)(`button`,{type:`button`,role:`tab`,className:(0,l.default)(mf.roomViewerFloorTab,e.id===q?.id&&mf.roomViewerFloorTabActive,L?.floorTab),style:R?.floorTab,"aria-selected":e.id===q?.id,onClick:()=>ne(e.id),children:e.label},e.id))}),(0,f.jsxs)(`div`,{ref:V,className:(0,l.default)(mf.roomViewerCanvasWrapper,y&&mf.roomViewerCanvasWrapperPannable,L?.canvasWrapper),style:{height:j,...R?.canvasWrapper},onPointerDown:Se,onPointerMove:Ce,onPointerUp:we,onPointerCancel:we,children:[De?(0,f.jsx)(`div`,{className:(0,l.default)(mf.roomViewerEmpty,L?.empty),style:R?.empty,children:M??N?.empty??`Nothing to show`}):(0,f.jsx)(Qd,{ref:H,floor:q,rooms:J,view:pe,size:he,selection:Te,hovered:Ee,interactiveRooms:v,showGrid:C,showRoomLabels:w,showOpeningSymbols:T,getRoomColor:E,renderRoomLabel:O,getRoomLabel:k,formatArea:A,onRoomActivate:v?e=>le(e):void 0,onBackgroundActivate:v?()=>le(null):void 0,onHoverChange:v?e=>ue(e?.type===`room`?e.id:null):void 0,classNames:{canvas:L?.canvas,grid:L?.grid,rooms:L?.rooms,roomFill:L?.roomFill,roomLabel:L?.roomLabel,walls:L?.walls,wallBody:L?.wallBody,openings:L?.openings,opening:L?.opening},styles:{canvas:R?.canvas,grid:R?.grid,rooms:R?.rooms,roomFill:R?.roomFill,roomLabel:R?.roomLabel,walls:R?.walls,wallBody:R?.wallBody,openings:R?.openings,opening:R?.opening},"aria-label":z??`Floor plan`}),S&&!De&&(0,f.jsxs)(`div`,{className:(0,l.default)(mf.roomViewerViewControls,L?.viewControls),style:R?.viewControls,children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(mf.roomViewerViewButton,L?.viewButton),style:R?.viewButton,title:N?.zoomOut??`Zoom out`,"aria-label":N?.zoomOut??`Zoom out`,onClick:()=>ve(1/1.2),children:K(P?.zoomOut??d.faMagnifyingGlassMinus)}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(mf.roomViewerViewButton,L?.viewButton),style:R?.viewButton,title:N?.fit??`Fit to view`,"aria-label":N?.fit??`Fit to view`,onClick:()=>{Z.current=!1,_e()},children:K(P?.fit??d.faExpand)}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(mf.roomViewerViewButton,L?.viewButton),style:R?.viewButton,title:N?.zoomIn??`Zoom in`,"aria-label":N?.zoomIn??`Zoom in`,onClick:()=>ve(1.2),children:K(P?.zoomIn??d.faMagnifyingGlassPlus)})]})]}),(0,f.jsx)(`div`,{id:U,className:mf.roomViewerLive,role:`status`,"aria-live":`polite`,children:Y})]})}var bf=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),xf={"scrollFade-vertical":`scrollFade-vertical_48p38`,scrollFadeVertical:`scrollFade-vertical_48p38`,"scrollFade-horizontal":`scrollFade-horizontal_nX2dg`,scrollFadeHorizontal:`scrollFade-horizontal_nX2dg`};function Sf({children:e=null,axis:t=bf.Vertical,fadeLength:n,isAlwaysFaded:r=!1,className:i,style:a,ref:o,...s}){let u=(0,c.useRef)(null),d=t===bf.Horizontal,{hasStart:p,hasEnd:m}=ga(u,{axis:t,isEnabled:!r});return(0,f.jsx)(`div`,{...s,ref:pn(u,o),className:(0,l.default)(d?xf.scrollFadeHorizontal:xf.scrollFadeVertical,_i.scrollFade,d?_i.scrollFadeX:_i.scrollFadeY,(r||p)&&_i.scrollFadeFadedStart,(r||m)&&_i.scrollFadeFadedEnd,i),style:{...n?{"--custom-scroll-fade-length":n}:void 0,...a},children:e})}var Cf=function(e){return e.Small=`small`,e.Medium=`medium`,e.Large=`large`,e}({}),wf={sectionHeader:`sectionHeader_X3bNj`,"sectionHeader-leading":`sectionHeader-leading_d6opV`,sectionHeaderLeading:`sectionHeader-leading_d6opV`,"sectionHeader-identity":`sectionHeader-identity_Qmlpt`,sectionHeaderIdentity:`sectionHeader-identity_Qmlpt`,"sectionHeader-titles":`sectionHeader-titles_iN9dT`,sectionHeaderTitles:`sectionHeader-titles_iN9dT`,"sectionHeader-title":`sectionHeader-title_wH--S`,sectionHeaderTitle:`sectionHeader-title_wH--S`,"sectionHeader-subtitle":`sectionHeader-subtitle_WRK3Y`,sectionHeaderSubtitle:`sectionHeader-subtitle_WRK3Y`,"sectionHeader-trailing":`sectionHeader-trailing_ewWDV`,sectionHeaderTrailing:`sectionHeader-trailing_ewWDV`,"sectionHeader-left":`sectionHeader-left_ZUuWs`,sectionHeaderLeft:`sectionHeader-left_ZUuWs`,"sectionHeader-center":`sectionHeader-center_MzSev`,sectionHeaderCenter:`sectionHeader-center_MzSev`,"sectionHeader-actions":`sectionHeader-actions_E40ZS`,sectionHeaderActions:`sectionHeader-actions_E40ZS`,"sectionHeader-divider":`sectionHeader-divider_Ovpev`,sectionHeaderDivider:`sectionHeader-divider_Ovpev`,"sectionHeader-size-small":`sectionHeader-size-small_6OVWE`,sectionHeaderSizeSmall:`sectionHeader-size-small_6OVWE`,"sectionHeader-size-medium":`sectionHeader-size-medium_BVSe6`,sectionHeaderSizeMedium:`sectionHeader-size-medium_BVSe6`,"sectionHeader-size-large":`sectionHeader-size-large_bOZDP`,sectionHeaderSizeLarge:`sectionHeader-size-large_bOZDP`},Tf={[Cf.Small]:wf.sectionHeaderSizeSmall,[Cf.Medium]:wf.sectionHeaderSizeMedium,[Cf.Large]:wf.sectionHeaderSizeLarge};function Ef(e){let{title:t,subtitle:n,icon:r,thumbnail:i,left:a,center:o,actions:s,level:c=2,size:u=Cf.Medium,divider:d=!1,className:p,style:m,classNames:h,styles:g,..._}=D(`SectionHeader`,e),v=typeof i==`string`&&i.startsWith(`http`)?i:void 0,y=i!=null&&i!==``,b=y||r!=null,x=`h${c}`;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{..._,className:(0,l.default)(wf.sectionHeader,Tf[u],p,h?.root),style:{...m,...g?.root},children:[(0,f.jsxs)(`div`,{className:(0,l.default)(wf.sectionHeaderIdentity,h?.identity),style:g?.identity,children:[b&&(0,f.jsx)(`div`,{className:(0,l.default)(wf.sectionHeaderLeading,h?.leading),style:{...v?{backgroundImage:`url(${v})`}:{},...g?.leading},children:y?!v&&i:r?K(r):null}),(0,f.jsxs)(`div`,{className:(0,l.default)(wf.sectionHeaderTitles,h?.titles),style:g?.titles,children:[(0,f.jsx)(x,{className:(0,l.default)(wf.sectionHeaderTitle,h?.title),style:g?.title,title:typeof t==`string`?t:void 0,children:t}),n!=null&&n!==``&&(0,f.jsx)(`div`,{className:(0,l.default)(wf.sectionHeaderSubtitle,h?.subtitle),style:g?.subtitle,children:n})]})]}),(0,f.jsxs)(`div`,{className:(0,l.default)(wf.sectionHeaderTrailing,h?.trailing),style:g?.trailing,children:[(0,f.jsx)(`div`,{className:(0,l.default)(wf.sectionHeaderLeft,h?.left),style:g?.left,children:a}),(0,f.jsx)(`div`,{className:(0,l.default)(wf.sectionHeaderCenter,h?.center),style:g?.center,children:o}),(0,f.jsx)(`div`,{className:(0,l.default)(wf.sectionHeaderActions,h?.actions),style:g?.actions,children:Array.isArray(s)?s.map((e,t)=>(0,f.jsx)(ce,{title:e.title,onClick:e.onClick?t=>{t.stopPropagation(),e.onClick?.(t)}:void 0,icon:e.icon},t)):s})]})]}),d&&(0,f.jsx)(Uo,{className:wf.sectionHeaderDivider})]})}var Df=function(e){return e.Text=`text`,e.Circle=`circle`,e.Rectangular=`rectangular`,e}({}),Of=function(e){return e.Shimmer=`shimmer`,e.Pulse=`pulse`,e.None=`none`,e}({}),kf={skeleton:`skeleton_TSg1y`,"skeleton-lines":`skeleton-lines_-Z-gf`,skeletonLines:`skeleton-lines_-Z-gf`,"skeleton-line-last":`skeleton-line-last_UFw21`,skeletonLineLast:`skeleton-line-last_UFw21`,"skeleton-text":`skeleton-text_Jlefj`,skeletonText:`skeleton-text_Jlefj`,"skeleton-circle":`skeleton-circle_t0bbj`,skeletonCircle:`skeleton-circle_t0bbj`,"skeleton-rectangular":`skeleton-rectangular_UtIyN`,skeletonRectangular:`skeleton-rectangular_UtIyN`,"skeleton-animation-pulse":`skeleton-animation-pulse_wGbPg`,skeletonAnimationPulse:`skeleton-animation-pulse_wGbPg`,skeletonPulse:`skeletonPulse_06yjn`,"skeleton-animation-shimmer":`skeleton-animation-shimmer_a0nwc`,skeletonAnimationShimmer:`skeleton-animation-shimmer_a0nwc`,skeletonShimmer:`skeletonShimmer_wLPXR`},Af={[Df.Text]:kf.skeletonText,[Df.Circle]:kf.skeletonCircle,[Df.Rectangular]:kf.skeletonRectangular},jf={[Of.Shimmer]:kf.skeletonAnimationShimmer,[Of.Pulse]:kf.skeletonAnimationPulse,[Of.None]:void 0};function Mf(e){let{variant:t=Df.Text,animation:n=Of.Shimmer,lines:r=1,className:i,style:a,classNames:o,styles:s,...c}=D(`Skeleton`,e),u=Af[t],d=jf[n];return t!==Df.Text||r<=1?(0,f.jsx)(`span`,{...c,className:(0,l.default)(kf.skeleton,u,d,i),style:a}):(0,f.jsx)(`span`,{...c,className:(0,l.default)(kf.skeletonLines,i),style:a,children:Array.from({length:r},(e,t)=>(0,f.jsx)(`span`,{className:(0,l.default)(kf.skeleton,u,d,t===r-1&&kf.skeletonLineLast,o?.line),style:s?.line},t))})}var Nf={slider:`slider_qmg2W`,"slider-thumb":`slider-thumb_CHuJN`,sliderThumb:`slider-thumb_CHuJN`,"slider-disabled":`slider-disabled_T0o2S`,sliderDisabled:`slider-disabled_T0o2S`,"slider-has-mark-labels":`slider-has-mark-labels_Xw6ZJ`,sliderHasMarkLabels:`slider-has-mark-labels_Xw6ZJ`,"slider-track":`slider-track_UyKYc`,sliderTrack:`slider-track_UyKYc`,"slider-range":`slider-range_exAs9`,sliderRange:`slider-range_exAs9`,"slider-dragging":`slider-dragging_htPFH`,sliderDragging:`slider-dragging_htPFH`,"slider-mark":`slider-mark_fvw-n`,sliderMark:`slider-mark_fvw-n`,"slider-mark-label":`slider-mark-label_iDtU2`,sliderMarkLabel:`slider-mark-label_iDtU2`,"slider-value":`slider-value_3rQgd`,sliderValue:`slider-value_3rQgd`};function Pf(e){let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1}function Ff(e){let{min:t=0,max:n=100,step:r=1,disabled:i=!1,marks:a,showValue:o=!1,formatValue:s,size:u,tabIndex:d=0,className:p,style:m,classNames:h,styles:g,"aria-label":_,range:v,value:y,defaultValue:b,onChange:x,onChangeEnd:S,minRange:C=0,thumbLabels:w,...T}=e,E=x,D=S,O=v===!0,k=(0,c.useRef)(null),A=(0,c.useRef)(null),j=(0,c.useRef)([]),M=(0,c.useRef)(null),[N,P]=(0,c.useState)(!1),F=Pf(r);function I(e){return Math.min(n,Math.max(t,e))}function L(e){let n=Math.round((e-t)/r)*r+t;return Number(I(n).toFixed(F))}function R(e){if(O){let r=e??[t,n];return[I(r[0]),I(r[1])]}return[I(e??t)]}function z(e){let t=O?2:1;return e.length===t?e:O?[e[0],n]:[e[0]]}let B=y!==void 0,[V,H]=(0,c.useState)(()=>R(b)),U=B?R(y):z(V),W=(0,c.useRef)(U);(0,c.useEffect)(()=>{W.current=U},[U]);function G(e){return O?[e[0],e[1]]:e[0]}function ee(e,r){return O?e===0?[t,r[1]-C]:[r[0]+C,n]:[t,n]}function K(e,r,i){let a=W.current,[o,s]=ee(e,a),c=L(r);if(c<o&&(c=Number(Math.max(t,o).toFixed(F))),c>s&&(c=Number(Math.min(n,s).toFixed(F))),c===a[e]){i&&D?.(G(a));return}let l=[...a];l[e]=c,W.current=l,B||H(l),E?.(G(l)),i&&D?.(G(l))}function te(e){let r=k.current;if(!r)return W.current[0];let i=r.getBoundingClientRect(),a=i.width?(e-i.left)/i.width:0;return t+Math.min(1,Math.max(0,a))*(n-t)}function q(e){if(!O)return 0;let[t,n]=W.current,r=Math.abs(e-t),i=Math.abs(e-n);return r===i?+(e>n):r<i?0:1}function ne(e){if(i)return;e.preventDefault();let t=te(e.clientX),n=q(t);(O?j.current[n]:A.current)?.focus(),A.current?.setPointerCapture?.(e.pointerId),M.current=n,P(!0),K(n,t,!1)}function J(e){let t=M.current;t!==null&&K(t,te(e.clientX),!1)}function re(e){M.current!==null&&(M.current=null,P(!1),A.current?.releasePointerCapture?.(e.pointerId),D?.(G(W.current)))}function ie(e,a){if(i)return;let o=r*10,s=U[a],c=null;switch(e.key){case`ArrowRight`:case`ArrowUp`:c=s+r;break;case`ArrowLeft`:case`ArrowDown`:c=s-r;break;case`PageUp`:c=s+o;break;case`PageDown`:c=s-o;break;case`Home`:c=t;break;case`End`:c=n;break;default:return}e.preventDefault(),K(a,c,!0)}let ae=e=>n>t?(I(e)-t)/(n-t):0,oe=e=>`${ae(e)*100}%`,se=O?{left:oe(U[0]),width:`${(ae(U[1])-ae(U[0]))*100}%`}:{width:oe(U[0])},ce=!!a?.some(e=>e.label!=null),le=e=>s?s(e):e;function ue(e){let r=U[e],a=le(r),[o,s]=ee(e,U);return{role:`slider`,"aria-valuemin":Number(Math.max(t,o).toFixed(F)),"aria-valuemax":Number(Math.min(n,s).toFixed(F)),"aria-valuenow":r,"aria-valuetext":typeof a==`string`||typeof a==`number`?String(a):void 0,"aria-orientation":`horizontal`,"aria-disabled":i||void 0}}let Y=O?{role:`group`,"aria-label":_,"aria-disabled":i||void 0}:{...ue(0),"aria-label":_,tabIndex:i?-1:d};return(0,f.jsx)(`div`,{...T,...Y,ref:A,className:(0,l.default)(Nf.slider,i&&Nf.sliderDisabled,N&&Nf.sliderDragging,ce&&Nf.sliderHasMarkLabels,p,h?.root),style:{...u?{"--slider-thumb-size":u}:null,...m,...g?.root},onPointerDown:ne,onPointerMove:J,onPointerUp:re,onKeyDown:O?void 0:e=>ie(e,0),children:(0,f.jsxs)(`div`,{ref:k,className:(0,l.default)(Nf.sliderTrack,h?.track),style:g?.track,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Nf.sliderRange,h?.range),style:{...se,...g?.range}}),a?.map(e=>{let t=oe(e.value);return(0,f.jsxs)(c.default.Fragment,{children:[(0,f.jsx)(`span`,{className:(0,l.default)(Nf.sliderMark,h?.mark),style:{left:t,...g?.mark}}),e.label!=null&&(0,f.jsx)(`span`,{className:(0,l.default)(Nf.sliderMarkLabel,h?.markLabel),style:{left:t,...g?.markLabel},children:e.label})]},e.value)}),U.map((e,t)=>(0,f.jsx)(`div`,{ref:e=>{j.current[t]=e},className:(0,l.default)(Nf.sliderThumb,h?.thumb),style:{left:oe(e),...g?.thumb},...O?{...ue(t),"aria-label":w?.[t]??(t===0?`From`:`To`),tabIndex:i?-1:d,onKeyDown:e=>ie(e,t)}:{},children:o&&(0,f.jsx)(`span`,{className:(0,l.default)(Nf.sliderValue,h?.value),style:g?.value,children:le(e)})},t))]})})}var If={splitButton:`splitButton_5ak5W`,splitButtonPrimary:`splitButtonPrimary_4mVy8`,splitButtonTrigger:`splitButtonTrigger_32cQA`},Lf={moreActions:`More actions`};function Rf(e){let{children:t,onClick:n=()=>{},actions:r=[],styleType:i=z.Primary,size:a=B.Default,disabled:o=!1,isLoading:s=!1,align:u=Tt.End,className:p,style:m,classNames:h,styles:g,labels:_,...v}=D(`SplitButton`,e),y=O(`SplitButton`,_,Lf),[b,x]=(0,c.useState)(!1),[S,C]=(0,c.useState)(o);return o!==S&&(C(o),o&&x(!1)),(0,f.jsxs)(fn,{...v,className:(0,l.default)(If.splitButton,h?.root,p),style:{...m,...g?.root},children:[(0,f.jsx)(ne,{styleType:i,size:a,disabled:o,isLoading:s,onClick:n,className:(0,l.default)(If.splitButtonPrimary,h?.primaryButton),style:g?.primaryButton,children:t}),(0,f.jsx)(Yu,{items:r,isOpen:b,onOpenChange:x,placement:wt.Bottom,align:u,classNames:{menu:h?.menu,item:h?.menuItem},styles:{menu:g?.menu,item:g?.menuItem},children:(0,f.jsx)(ne,{styleType:i,size:a,disabled:o,icon:d.faChevronDown,"aria-label":y.moreActions,className:(0,l.default)(If.splitButtonTrigger,h?.triggerButton),style:g?.triggerButton})})]})}var zf={stepper:`stepper_kiS2A`,"stepper-vertical":`stepper-vertical_2y9rg`,stepperVertical:`stepper-vertical_2y9rg`,"stepper-label-bottom":`stepper-label-bottom_lDfhy`,stepperLabelBottom:`stepper-label-bottom_lDfhy`,"stepper-label-top":`stepper-label-top_sBw4-`,stepperLabelTop:`stepper-label-top_sBw4-`,"stepper-entry":`stepper-entry_KD4JJ`,stepperEntry:`stepper-entry_KD4JJ`,"stepper-clickable":`stepper-clickable_Nm6fP`,stepperClickable:`stepper-clickable_Nm6fP`,"stepper-entry-disabled":`stepper-entry-disabled_T9S5R`,stepperEntryDisabled:`stepper-entry-disabled_T9S5R`,"stepper-entry-number":`stepper-entry-number_J168Q`,stepperEntryNumber:`stepper-entry-number_J168Q`,"stepper-entry-active":`stepper-entry-active_V1aRt`,stepperEntryActive:`stepper-entry-active_V1aRt`,"stepper-entry-done":`stepper-entry-done_M3wb5`,stepperEntryDone:`stepper-entry-done_M3wb5`,"stepper-entry-error":`stepper-entry-error_xjGSr`,stepperEntryError:`stepper-entry-error_xjGSr`,"stepper-checkmark":`stepper-checkmark_iKCap`,stepperCheckmark:`stepper-checkmark_iKCap`,showCheckmark:`showCheckmark_Rd0oW`,"stepper-marker-cell":`stepper-marker-cell_reOS7`,stepperMarkerCell:`stepper-marker-cell_reOS7`,"stepper-rail-segment":`stepper-rail-segment_U-ZgF`,stepperRailSegment:`stepper-rail-segment_U-ZgF`,"stepper-rail-filled":`stepper-rail-filled_wCImi`,stepperRailFilled:`stepper-rail-filled_wCImi`,"stepper-rail-hidden":`stepper-rail-hidden_l17t6`,stepperRailHidden:`stepper-rail-hidden_l17t6`,"stepper-entry-labels":`stepper-entry-labels_nQT8D`,stepperEntryLabels:`stepper-entry-labels_nQT8D`,"stepper-entry-label":`stepper-entry-label_b94eg`,stepperEntryLabel:`stepper-entry-label_b94eg`,"stepper-description":`stepper-description_5Q0YP`,stepperDescription:`stepper-description_5Q0YP`,"stepper-optional":`stepper-optional_N8mkW`,stepperOptional:`stepper-optional_N8mkW`,"stepper-connector":`stepper-connector_J2FwZ`,stepperConnector:`stepper-connector_J2FwZ`,"stepper-connector-filled":`stepper-connector-filled_W8UZS`,stepperConnectorFilled:`stepper-connector-filled_W8UZS`,"stepper-step":`stepper-step_nUfsV`,stepperStep:`stepper-step_nUfsV`,"stepper-content":`stepper-content_yjlFH`,stepperContent:`stepper-content_yjlFH`,"stepper-label-left":`stepper-label-left_yGbjC`,stepperLabelLeft:`stepper-label-left_yGbjC`,"stepper-content-inner":`stepper-content-inner_0w2wP`,stepperContentInner:`stepper-content-inner_0w2wP`,"stepper-outlined":`stepper-outlined_V7UjP`,stepperOutlined:`stepper-outlined_V7UjP`,"stepper-dots":`stepper-dots_s4cgN`,stepperDots:`stepper-dots_s4cgN`},Bf=function(e){return e.Horizontal=`horizontal`,e.Vertical=`vertical`,e}({}),Vf=function(e){return e.Default=`default`,e.Outlined=`outlined`,e.Dots=`dots`,e}({}),Hf=function(e){return e.None=`none`,e.ActiveOnly=`activeOnly`,e.Completed=`completed`,e}({}),Uf=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({}),Wf={[Vf.Default]:zf.stepperDefault,[Vf.Outlined]:zf.stepperOutlined,[Vf.Dots]:zf.stepperDots},Gf={[Uf.Top]:zf.stepperLabelTop,[Uf.Bottom]:zf.stepperLabelBottom,[Uf.Left]:zf.stepperLabelLeft,[Uf.Right]:zf.stepperLabelRight};function Kf(){return(0,f.jsx)(`svg`,{className:zf.stepperCheckmark,strokeLinejoin:`round`,strokeLinecap:`round`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`-0.2 -1.2 3.4 2`,height:`20px`,width:`20px`,children:(0,f.jsx)(`path`,{d:`M 0 0 l 1 1 l 2 -2`,strokeWidth:`0.4`,fill:`none`})})}function qf({open:e,className:t,style:n,children:r}){let i=(0,c.useRef)(null),[a,o]=(0,c.useState)(null);return(0,c.useEffect)(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(()=>o(e.offsetHeight));return t.observe(e),()=>t.disconnect()},[]),(0,f.jsx)(`div`,{className:(0,l.default)(zf.stepperContent,t),style:{...n,height:e?a??`auto`:0},"aria-hidden":!e,children:(0,f.jsx)(`div`,{ref:i,className:zf.stepperContentInner,children:r})})}function Jf(e,t){let n=[Uf.Left,Uf.Right];return t?e&&n.includes(e)?e:Uf.Right:e&&!n.includes(e)?e:Uf.Bottom}function Yf({steps:e=[],currentStep:t=0,alignment:n=Bf.Horizontal,onStepClicked:r=null,nonLinear:i=!1,hideLabels:a=!1,styleType:o=Vf.Default,collapse:s=Hf.None,labelPlacement:u,className:d,style:p,classNames:m,styles:h,...g}){let _=n===Bf.Vertical,v=Jf(u,_);return(0,f.jsx)(`div`,{...g,className:(0,l.default)(zf.stepper,Wf[o],Gf[v],{[zf.stepperVertical]:_},m?.root,d),style:{...h?.root,...p},children:e.map((n,o)=>{let u=o<t,d=o<=t,p=!!n.error,g=!!r&&!n.disabled&&(i?o!==t:u),v=(0,l.default)(zf.stepperEntry,{[zf.stepperEntryActive]:d},{[zf.stepperEntryDone]:u&&!p},{[zf.stepperEntryError]:p},{[zf.stepperEntryDisabled]:n.disabled},{[zf.stepperClickable]:g},m?.entry),y=n.icon?K(n.icon,{className:m?.icon,style:h?.icon}):u&&!p?(0,f.jsx)(Kf,{}):o+1,b=(0,f.jsx)(`div`,{className:(0,l.default)(zf.stepperEntryNumber,{[zf.stepperEntryNumberDone]:u&&!p},m?.entryNumber),style:h?.entryNumber,children:y}),x=n.optional===!0?`Optional`:n.optional===!1?null:n.optional,S=!a&&(0,f.jsxs)(`div`,{className:zf.stepperEntryLabels,children:[(0,f.jsx)(`div`,{className:(0,l.default)(zf.stepperEntryLabel,m?.entryLabel),style:h?.entryLabel,children:n.label}),n.description!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(zf.stepperDescription,m?.description),style:h?.description,children:n.description}),x!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(zf.stepperOptional,m?.optional),style:h?.optional,children:x})]}),C=g?{role:`button`,tabIndex:0,onClick:()=>r?.(o),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r?.(o))}}:{},w=e=>(0,f.jsx)(`div`,{className:v,style:h?.entry,"aria-current":o===t?`step`:void 0,"aria-invalid":p||void 0,...C,children:e}),T=o<e.length-1&&(0,f.jsx)(`div`,{className:(0,l.default)(zf.stepperConnector,{[zf.stepperConnectorFilled]:u},m?.connector),style:h?.connector});if(_){let r=o===0,i=o===e.length-1,c=s===Hf.None?!0:s===Hf.ActiveOnly?o===t:!u,p=e=>{let t=e===`lead`?r:i,n=e===`lead`?d:u;return(0,f.jsx)(`div`,{className:(0,l.default)(zf.stepperRailSegment,{[zf.stepperRailFilled]:!t&&n,[zf.stepperRailHidden]:t})})},g=(0,f.jsxs)(`div`,{className:zf.stepperMarkerCell,children:[p(`lead`),b,p(`trail`)]});return(0,f.jsxs)(`div`,{className:zf.stepperStep,children:[w((0,f.jsxs)(f.Fragment,{children:[g,S]})),T,n.content!=null&&!a&&(0,f.jsx)(qf,{open:c,className:m?.content,style:h?.content,children:n.content})]},o)}return(0,f.jsxs)(c.default.Fragment,{children:[w((0,f.jsxs)(f.Fragment,{children:[b,S]})),T]},o)})})}function Xf(e,t,n,r){return e<r&&n<t}function Zf(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0}var Qf=new class{constructor(){this.entries=new Map,this.listeners=new Map,this.results=new Map,this.rafId=0,this.listenerCount=0,this.schedule=()=>{cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(this.recompute)},this.recompute=()=>{let e=[...this.entries.entries()].sort(([,e],[,t])=>Zf(e.node,t.node)),t=new Map,n=[];for(let[r,i]of e){let e=i.getMetrics();if(!e)continue;let a=t.get(e.container);a||(a=[],t.set(e.container,a));let o=a.filter(t=>Xf(t.left,t.right,e.left,e.left+e.width)).reduce((e,t)=>Math.max(e,t.bottom),i.offsetTop),s=!i.disabled&&e.top<=o;if(s){let t=o+e.contentHeight;a.push({left:e.left,right:e.left+e.width,bottom:e.boundaryBottom==null?t:Math.min(t,e.boundaryBottom)})}n.push({id:r,metrics:e,baseTop:s?o:i.offsetTop,isStuck:s})}let r=new Map;for(let{metrics:e,baseTop:t,isStuck:i}of n){let{boundary:n,boundaryBottom:a,contentHeight:o}=e;if(!i||n==null||a==null)continue;let s=Math.min(0,a-(t+o)),c=r.get(n);(c==null||s<c)&&r.set(n,s)}for(let{id:e,metrics:t,baseTop:i,isStuck:a}of n){let n={isStuck:a,top:i+(a&&t.boundary?r.get(t.boundary)??0:0)},o=this.results.get(e);o&&o.isStuck===n.isStuck&&o.top===n.top||(this.results.set(e,n),this.listeners.get(e)?.(n))}}}register(e,t){let n=Symbol(`sticky`);return this.entries.set(n,e),this.listeners.set(n,t),this.startListening(),n}updateEntry(e,t){let n=this.entries.get(e);n&&Object.assign(n,t)}unregister(e){this.entries.has(e)&&(this.entries.delete(e),this.listeners.delete(e),this.results.delete(e),this.stopListening())}startListening(){this.listenerCount===0&&(window.addEventListener(`scroll`,this.schedule,{passive:!0,capture:!0}),window.addEventListener(`resize`,this.schedule)),this.listenerCount++}stopListening(){this.listenerCount--,this.listenerCount===0&&(window.removeEventListener(`scroll`,this.schedule,{capture:!0}),window.removeEventListener(`resize`,this.schedule))}},$f={sticky:`sticky_L6zO2`,"sticky-content":`sticky-content_ZaXTD`,stickyContent:`sticky-content_ZaXTD`,"sticky-content-stuck":`sticky-content-stuck_w-gRW`,stickyContentStuck:`sticky-content-stuck_w-gRW`,"sticky-placeholder":`sticky-placeholder_aJ3Sb`,stickyPlaceholder:`sticky-placeholder_aJ3Sb`};function ep({children:e,offsetTop:t=0,offsetElement:n,stickToScrollParent:r=!1,boundary:i,boundaryInset:a=0,zIndex:o=20,disabled:s=!1,onStuckChange:u,className:d,style:p,classNames:m,styles:h,...g}){let _=(0,c.useRef)(null),v=(0,c.useRef)(null),y=(0,c.useRef)(null),b=(0,c.useRef)(null),[x,S]=(0,c.useState)({width:0,left:0,height:0}),[C,w]=(0,c.useState)(null),[T,E]=(0,c.useState)(0),D=n?.current?C??n.current.offsetHeight:t,[O,k]=(0,c.useState)({isStuck:!1,top:D}),A=(0,c.useRef)(u);(0,c.useEffect)(()=>{A.current=u},[u]);let j=(0,c.useRef)(i),M=(0,c.useRef)(a);(0,c.useLayoutEffect)(()=>{j.current=i,M.current=a});let N=(0,c.useCallback)(()=>{let e=_.current,t=v.current;if(!e||!t)return;let n=e.getBoundingClientRect();S({width:e.clientWidth,left:n.left,height:t.offsetHeight}),Qf.schedule()},[]);(0,c.useEffect)(()=>{let e=n?.current;if(!e)return;let t=()=>w(e.offsetHeight);t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[n]),(0,c.useLayoutEffect)(()=>{b.current=r?xt(_.current):null},[r]),(0,c.useLayoutEffect)(()=>{let e=Qf.register({node:_.current,offsetTop:D,disabled:s,getMetrics:()=>{let e=_.current,t=v.current;if(!e||!t)return null;let n=e.getBoundingClientRect(),r=b.current?.getBoundingClientRect(),i=r?.top??0;E(e=>e===i?e:i);let a=r?n.top-r.top:n.top,o=r?n.left-r.left:n.left,s=j.current?.current??null,c=s?.getBoundingClientRect();return{top:a,left:o,width:e.clientWidth,contentHeight:t.offsetHeight,container:b.current,boundary:s,boundaryBottom:c?c.bottom-i-M.current:null}}},k);return y.current=e,()=>{Qf.unregister(e),y.current=null}},[]),(0,c.useEffect)(()=>{y.current&&Qf.updateEntry(y.current,{offsetTop:D,disabled:s}),Qf.schedule()},[D,s]),(0,c.useLayoutEffect)(()=>{N()},[N,e]),(0,c.useEffect)(()=>{let e=new ResizeObserver(N);return _.current&&e.observe(_.current),v.current&&e.observe(v.current),b.current&&e.observe(b.current),()=>e.disconnect()},[N,r]);let P=(0,c.useRef)(!0);(0,c.useEffect)(()=>{if(P.current){P.current=!1;return}A.current?.(O.isStuck)},[O.isStuck]);let F=O.isStuck?{position:`fixed`,top:T+O.top,left:x.left,width:x.width,zIndex:o,...h?.content}:h?.content;return(0,f.jsxs)(`div`,{ref:_,className:(0,l.default)($f.sticky,d,m?.root),style:{...h?.root,...p},...g,children:[O.isStuck&&(0,f.jsx)(`div`,{"aria-hidden":!0,className:(0,l.default)($f.stickyPlaceholder,m?.placeholder),style:{height:x.height,...h?.placeholder}}),(0,f.jsx)(`div`,{ref:v,className:(0,l.default)($f.stickyContent,O.isStuck&&$f.stickyContentStuck,m?.content),style:F,children:e})]})}var tp={switch:`switch_9TG2Y`,"switch-disabled":`switch-disabled_UL-F-`,switchDisabled:`switch-disabled_UL-F-`,"switch-track":`switch-track_awA-t`,switchTrack:`switch-track_awA-t`,"switch-track-checked":`switch-track-checked_boZKe`,switchTrackChecked:`switch-track-checked_boZKe`,"switch-thumb":`switch-thumb_4fUTo`,switchThumb:`switch-thumb_4fUTo`,"switch-thumb-checked":`switch-thumb-checked_GU--w`,switchThumbChecked:`switch-thumb-checked_GU--w`,"switch-label":`switch-label_3pLBQ`,switchLabel:`switch-label_3pLBQ`};function np(e){let{label:t=``,selected:n=!1,onToggle:r=()=>{},className:i=``,style:a,disabled:o=!1,title:s=``,tabIndex:u=0,formValidator:d=null,children:p=null,classNames:m,styles:h,...g}=D(`Switch`,e),[,_]=(0,c.useState)(0);(0,c.useEffect)(()=>{if(!d)return;let e=()=>_(e=>e+1);return d.registerOnUpdateListener(e),()=>d.removeOnUpdateListener(e)},[d]);function v(e){o||(d&&d.set(!d.value),r(!y,e))}let y=d?d.value:n;return(0,f.jsxs)(`div`,{...g,title:s,className:(0,l.default)(tp.switch,{[tp.switchDisabled]:o},i),style:a,onClick:v,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(e))},role:`switch`,"aria-checked":y,tabIndex:o?-1:u,children:[(0,f.jsx)(`div`,{className:(0,l.default)(tp.switchTrack,y&&tp.switchTrackChecked,m?.track),style:h?.track,children:(0,f.jsx)(`div`,{className:(0,l.default)(tp.switchThumb,y&&tp.switchThumbChecked,m?.thumb),style:h?.thumb})}),(p||t)&&(0,f.jsx)(`div`,{className:(0,l.default)(tp.switchLabel,m?.label),style:h?.label,children:p||t})]})}var rp={tabHeader:`tabHeader_C-b9d`,"tabHeader-tab":`tabHeader-tab_Wbyt-`,tabHeaderTab:`tabHeader-tab_Wbyt-`,"tabHeader-tab-active":`tabHeader-tab-active_IExSo`,tabHeaderTabActive:`tabHeader-tab-active_IExSo`,"tabHeader-tab-disabled":`tabHeader-tab-disabled_yWJxS`,tabHeaderTabDisabled:`tabHeader-tab-disabled_yWJxS`,"tabHeader-icon":`tabHeader-icon_ryEHB`,tabHeaderIcon:`tabHeader-icon_ryEHB`,"tabHeader-labels":`tabHeader-labels_q5Af5`,tabHeaderLabels:`tabHeader-labels_q5Af5`,"tabHeader-title":`tabHeader-title_Jq2Vy`,tabHeaderTitle:`tabHeader-title_Jq2Vy`,"tabHeader-subtitle":`tabHeader-subtitle_4lhSa`,tabHeaderSubtitle:`tabHeader-subtitle_4lhSa`};function ip({tabs:e=[],currentTab:t,onChange:n,className:r,style:i,classNames:a,styles:o,...s}){return(0,f.jsx)(`div`,{...s,role:`tablist`,className:(0,l.default)(rp.tabHeader,a?.root,r),style:{...o?.root,...i},children:e.map(e=>{let r=e.id===t,i=!!e.title||!!e.subtitle;return(0,f.jsxs)(oe,{role:`tab`,"aria-selected":r,"aria-disabled":e.disabled||void 0,tabIndex:e.disabled?-1:0,className:(0,l.default)(rp.tabHeaderTab,{[rp.tabHeaderTabActive]:r},{[rp.tabHeaderTabDisabled]:e.disabled},a?.tab),style:o?.tab,onClick:()=>{e.disabled||r||n(e.id)},children:[K(e.icon,{className:(0,l.default)(rp.tabHeaderIcon,a?.icon),style:o?.icon}),i&&(0,f.jsxs)(`div`,{className:(0,l.default)(rp.tabHeaderLabels,a?.labels),style:o?.labels,children:[e.title&&(0,f.jsx)(`span`,{className:(0,l.default)(rp.tabHeaderTitle,a?.title),style:o?.title,children:e.title}),e.subtitle&&(0,f.jsx)(`span`,{className:(0,l.default)(rp.tabHeaderSubtitle,a?.subtitle),style:o?.subtitle,children:e.subtitle})]})]},e.id)})})}function ap(e){return(0,f.jsx)(Gi,{...D(`Textarea`,e),multiline:!0})}function op(e=`default`){let[t,n]=(0,c.useState)(localStorage.getItem(`theme`)||e);return{currentThemeId:t,setCurrentThemeId:e=>{n(e),localStorage.setItem(`theme`,e)}}}var sp=(0,c.createContext)(null);function cp(){return(0,c.useContext)(sp)}function lp({children:e,className:t,style:n,...r}){let i=(0,c.useRef)(null),a=(0,c.useRef)(void 0),o=(0,c.useRef)(!1),s=(0,c.useRef)(null),[l,u]=(0,c.useState)({pointer:null,rect:null}),d=()=>{o.current||(o.current=!0,a.current=requestAnimationFrame(()=>{o.current=!1,a.current=void 0;let e=i.current,t=s.current;if(!e||!t)return;let n=e.getBoundingClientRect();u({pointer:{x:t.x-n.left,y:t.y-n.top},rect:n})}))},p=e=>{s.current={x:e.clientX,y:e.clientY},d()},m=()=>{s.current=null,o.current&&a.current!==void 0&&(cancelAnimationFrame(a.current),o.current=!1,a.current=void 0),u({pointer:null,rect:null})};return(0,f.jsx)(`div`,{...r,ref:i,className:t,style:n,onPointerMove:p,onPointerLeave:m,children:(0,f.jsx)(sp.Provider,{value:l,children:e})})}function up(e){let t=Math.max(-1,Math.min(1,e));return Math.sign(t)*Math.abs(t)**1.6}function dp(e,t){return Math.max(-t,Math.min(t,e))}function fp(e,t,n,{maxTiltX:r,maxTiltY:i,easing:a,lockAxis:o}){let s=n.width>0?e/n.width*2-1:0,c=n.height>0?t/n.height*2-1:0;return{rotateX:o===`x`?0:dp(-a(c)*r,r),rotateY:o===`y`?0:dp(a(s)*i,i)}}var pp={tilt:`tilt_gbX2b`,"tilt-perspective":`tilt-perspective_CFdP6`,tiltPerspective:`tilt-perspective_CFdP6`,"tilt-surface":`tilt-surface_Jyzwe`,tiltSurface:`tilt-surface_Jyzwe`};function mp(){return typeof process<`u`&&!1}function hp(){return typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}var gp=.3,_p=.05;function vp(e){let{ref:t,children:n,maxTilt:r=15,maxTiltX:i,maxTiltY:a,perspective:o=800,easing:s=up,lockAxis:u=`none`,scaleOnHover:d=1,trackingMode:p=`self`,disabled:m=!1,onTiltChange:h,className:g,style:_,classNames:v,styles:y,...b}=D(`Tilt`,e),x=(0,c.useRef)(null),S=(0,c.useRef)(null),C=(0,c.useRef)(void 0),w=(0,c.useRef)(!1),T=(0,c.useRef)(!1),E=(0,c.useRef)(!1),O=(0,c.useRef)(null),k=(0,c.useRef)({rotateX:0,rotateY:0}),A=cp(),j=p===`group`,M=j&&A!==null;(0,c.useEffect)(()=>{j&&A===null&&mp()&&console.warn(`Tilt: trackingMode="group" was set with no ancestor TiltGroup, falling back to self tracking.`)},[j,A===null]);let N=i??r,P=a??r;function F(e,t,n){let r=S.current;r&&(r.style.transform=`rotateX(${e}deg) rotateY(${t}deg)`+(n===1?``:` scale(${n})`))}function I(){C.current!==void 0&&(cancelAnimationFrame(C.current),C.current=void 0),w.current=!1}function L(){if(C.current=void 0,!S.current){w.current=!1;return}let e=T.current&&!m&&!hp(),t=0,n=0;if(e){let e=O.current,r=x.current?.getBoundingClientRect();if(e&&r){let i=fp(e.x-r.left,e.y-r.top,r,{maxTiltX:N,maxTiltY:P,easing:s,lockAxis:u});t=i.rotateX,n=i.rotateY}}let r=k.current,i,a;if(E.current?(i=r.rotateX+(t-r.rotateX)*gp,a=r.rotateY+(n-r.rotateY)*gp,Math.abs(t-i)<_p&&Math.abs(n-a)<_p&&(i=t,a=n,E.current=!1)):(i=t,a=n),k.current={rotateX:i,rotateY:a},F(i,a,e?d:1),h?.(i,a),!E.current){w.current=!1;return}C.current=requestAnimationFrame(L)}function R(){w.current||(w.current=!0,C.current=requestAnimationFrame(L))}function z(e){T.current!==e&&(E.current=!0),T.current=e,R()}let B=e=>{m||M||hp()||(O.current={x:e.clientX,y:e.clientY},z(!0))},V=()=>{M||z(!1)};return(0,c.useEffect)(()=>{if(M){if(m||hp()){z(!1);return}A?.pointer&&A.rect?(O.current={x:A.rect.left+A.pointer.x,y:A.rect.top+A.pointer.y},z(!0)):z(!1)}},[M,m,A?.pointer,A?.rect]),(0,c.useEffect)(()=>()=>{I()},[]),(0,c.useImperativeHandle)(t,()=>({setTilt(e,t){let n={rotateX:Math.max(-N,Math.min(N,e)),rotateY:Math.max(-P,Math.min(P,t))};I(),T.current=!1,E.current=!1,k.current=n,F(n.rotateX,n.rotateY,d),h?.(n.rotateX,n.rotateY)},reset(){I(),T.current=!1,E.current=!1,k.current={rotateX:0,rotateY:0},F(0,0,1)}})),(0,f.jsx)(`div`,{...b,ref:x,className:(0,l.default)(pp.tilt,g,v?.root),style:{..._,...y?.root},onPointerMove:B,onPointerLeave:V,onPointerCancel:V,children:(0,f.jsx)(`div`,{className:(0,l.default)(pp.tiltPerspective,v?.perspective),style:{perspective:`${o}px`,...y?.perspective},children:(0,f.jsx)(`div`,{ref:S,className:(0,l.default)(pp.tiltSurface,v?.surface),style:y?.surface,children:n})})})}var yp=e=>(Math.trunc(e)%24+24)%24,bp=e=>(Math.trunc(e)%60+60)%60;function xp(e){if(!e)return null;let t=e.match(/^(\d{1,2}):(\d{1,2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return n>23||r>59?null:{hours:n,minutes:r}}function Sp(e){return e?`${String(yp(e.hours)).padStart(2,`0`)}:${String(bp(e.minutes)).padStart(2,`0`)}`:``}function Cp(e,t){return bp(!t||t<=1?e:Math.round(bp(e)/t)*t)}var wp=e=>e.hours*60+e.minutes;function Tp(e,t,n){let r=wp(e),i=xp(t),a=xp(n);return i&&(r=Math.max(r,wp(i))),a&&(r=Math.min(r,wp(a))),{hours:Math.floor(r/60),minutes:r%60}}function Ep(e,t,n,r,i){let a=r*i*Math.PI/180;return{x:e+n*Math.sin(a),y:t-n*Math.cos(a)}}function Dp(e,t){return(Math.atan2(e,-t)*180/Math.PI+360)%360}var Op=(e,t)=>Math.sqrt(e*e+t*t),kp={clockFace:`clockFace_LbXIa`,clockHand:`clockHand_E9nTw`,"clockHand-line":`clockHand-line_iOipC`,clockHandLine:`clockHand-line_iOipC`,"clockHand-center":`clockHand-center_VElxx`,clockHandCenter:`clockHand-center_VElxx`,"clockHand-knob":`clockHand-knob_Mb2Fx`,clockHandKnob:`clockHand-knob_Mb2Fx`,clockNumber:`clockNumber_qHDO8`,"clockNumber-inner":`clockNumber-inner_x2XR1`,clockNumberInner:`clockNumber-inner_x2XR1`,"clockNumber-selected":`clockNumber-selected_rPVlV`,clockNumberSelected:`clockNumber-selected_rPVlV`},Ap=50,jp=40,Mp=25.5,Np=65.5/2,Pp=30,Fp=6,Ip=e=>(e+11)%12+1;function Lp(e,t){if(e===`minutes`)return Array.from({length:12},(e,t)=>{let n=t*5;return{label:String(n).padStart(2,`0`),slot:t,value:n,ring:`outer`}});if(!t)return Array.from({length:12},(e,t)=>{let n=t===0?12:t;return{label:String(n),slot:t,value:n,ring:`outer`}});let n=Array.from({length:12},(e,t)=>{let n=t===0?12:t;return{label:String(n),slot:t,value:n,ring:`outer`}}),r=Array.from({length:12},(e,t)=>{let n=t===0?0:t+12;return{label:String(n).padStart(2,`0`),slot:t,value:n,ring:`inner`}});return[...n,...r]}function Rp({time:e,mode:t,use24Hour:n,minuteStep:r,onChange:i,onCommit:a,classNames:o,styles:s}){let u=(0,c.useRef)(null),d=(0,c.useRef)(!1),p=Lp(t,n),m=e.hours>=12,h=Ip(e.hours),g=t===`minutes`?{slot:e.minutes,radius:jp}:n?e.hours===0?{slot:0,radius:Mp}:e.hours<=12?{slot:e.hours%12,radius:jp}:{slot:(e.hours-12)%12,radius:Mp}:{slot:h%12,radius:jp},_=Ep(Ap,Ap,g.radius,g.slot,t===`minutes`?Fp:Pp),v=i=>t===`minutes`?Cp(e.minutes,r)===i.value||e.minutes===i.value:n?e.hours===i.value:h===i.value,y=(i,a)=>{let o=u.current?.getBoundingClientRect();if(!o)return e;let s=i-(o.left+o.width/2),c=a-(o.top+o.height/2),l=Dp(s,c);if(t===`minutes`){let t=Cp(Math.round(l/Fp),r);return{hours:e.hours,minutes:t}}let d=Math.round(l/Pp)%12;if(!n){let t=d===0?12:d;return{hours:yp(m?t%12+12:t%12),minutes:e.minutes}}return{hours:yp(Op(s,c)/(o.width/2)*Ap<Np?d===0?0:d+12:d===0?12:d),minutes:e.minutes}};return(0,f.jsxs)(`div`,{ref:u,className:(0,l.default)(kp.clockFace,o?.clockFace),style:s?.clockFace,onPointerDown:e=>{d.current=!0,e.currentTarget.setPointerCapture?.(e.pointerId),i(y(e.clientX,e.clientY))},onPointerMove:e=>{d.current&&i(y(e.clientX,e.clientY))},onPointerUp:e=>{d.current&&(d.current=!1,a(y(e.clientX,e.clientY)))},role:`slider`,"aria-label":t===`minutes`?`Minutes`:`Hours`,"aria-valuetext":t===`minutes`?`${e.minutes} minutes`:`${e.hours} hours`,children:[(0,f.jsxs)(`svg`,{className:kp.clockHand,viewBox:`0 0 100 100`,"aria-hidden":!0,children:[(0,f.jsx)(`circle`,{cx:Ap,cy:Ap,r:1.8,className:kp.clockHandCenter}),(0,f.jsx)(`line`,{x1:Ap,y1:Ap,x2:_.x,y2:_.y,className:kp.clockHandLine}),(0,f.jsx)(`circle`,{cx:_.x,cy:_.y,r:7,className:(0,l.default)(kp.clockHandKnob,o?.clockHand),style:s?.clockHand})]}),p.map(e=>{let t=Ep(Ap,Ap,e.ring===`inner`?Mp:jp,e.slot,Pp),n=v(e);return(0,f.jsx)(`div`,{className:(0,l.default)(kp.clockNumber,e.ring===`inner`&&kp.clockNumberInner,n&&kp.clockNumberSelected,o?.clockNumber),style:{left:`${t.x}%`,top:`${t.y}%`,...s?.clockNumber},children:e.label},`${e.ring}-${e.value}`)})]})}var zp={timeInput:`timeInput_EbsZN`,"timeInput-clock":`timeInput-clock_D1-dk`,timeInputClock:`timeInput-clock_D1-dk`,"timeInput-clockHeader":`timeInput-clockHeader_bsYNW`,timeInputClockHeader:`timeInput-clockHeader_bsYNW`,"timeInput-headerSegment":`timeInput-headerSegment_Oiu7e`,timeInputHeaderSegment:`timeInput-headerSegment_Oiu7e`,"timeInput-headerSegment-active":`timeInput-headerSegment-active_-Funz`,timeInputHeaderSegmentActive:`timeInput-headerSegment-active_-Funz`,"timeInput-headerColon":`timeInput-headerColon_LwyQH`,timeInputHeaderColon:`timeInput-headerColon_LwyQH`,"timeInput-meridiem":`timeInput-meridiem_tk9km`,timeInputMeridiem:`timeInput-meridiem_tk9km`,"timeInput-meridiem-active":`timeInput-meridiem-active_40uHm`,timeInputMeridiemActive:`timeInput-meridiem-active_40uHm`,"timeInput-footer":`timeInput-footer_NCXsB`,timeInputFooter:`timeInput-footer_NCXsB`};function Bp({value:e,selected:t,onChange:n=()=>null,onSelect:r=()=>null,formValidator:i=null,isInline:a=!1,isModal:o=!1,noInput:s=!1,noHeader:p=!1,showClearButton:m=!1,showNowButton:h=!1,minuteStep:g=1,use24Hour:_=!0,minTime:v=null,maxTime:y=null,label:b=``,isValid:x=!0,errorMessage:S=``,isRequired:C=!1,disabled:w=!1,className:T=``,style:E,classNames:D,styles:O,...k}){let A=()=>i?i.value||``:e??t??``,[j,M]=(0,c.useState)(A),[N,P]=(0,c.useState)(!1),[F,I]=(0,c.useState)(`hours`),[L,R]=(0,c.useState)(!1),[B,V]=(0,c.useState)(!1),[,H]=(0,c.useState)(0),U=A(),[W,G]=(0,c.useState)(U),ee=(0,c.useRef)(i);!i&&W!==U&&(G(U),M(U)),(0,c.useEffect)(()=>{if(ee.current=i,!i)return;let e=()=>{M(i.value||``),H(e=>e+1)};return i.registerOnUpdateListener(e),()=>i.removeOnUpdateListener(e)},[i]);let K=()=>i?i.touched&&i.hasError():!x||!!S,te=()=>!!(C||i?.validators.find(e=>e.validatorId===`required`)),q=e=>{let t=e?Sp(e):null;i&&i.set(t),n?.(t)},J=e=>{M(e?Sp(e):``),q(e)},re=xp(j),ie=re??{hours:12,minutes:0},ae=e=>{let t={hours:e.hours,minutes:Cp(e.minutes,g)};J(Tp(t,v,y))},oe=e=>{let t=Tp({hours:e.hours,minutes:Cp(e.minutes,g)},v,y);if(J(t),F===`hours`){I(`minutes`);return}r?.(Sp(t)),a||P(!1)},se=()=>{w||(I(`hours`),P(!0))},ce=({previousState:e,nextState:t})=>{if(t.value===e.value)return t;let n=t.value,r=n.slice(0,2);/^\d\d$/.test(r)&&Number(r)>23&&(n=`23${n.slice(2)}`);let i=n.slice(3,5);return/^\d\d$/.test(i)&&Number(i)>59&&(n=`${n.slice(0,3)}59`),n===t.value?t:{...t,value:n}},le=e=>{M(e);let t=xp(e);t&&q(t)},ue=()=>{ee.current&&(ee.current.touched=!0),R(!1),q(xp(j))},Y=e=>{e!==ie.hours>=12&&J({hours:yp(ie.hours+(e?12:-12)),minutes:ie.minutes})},de=K(),fe=re?String(_?re.hours:(re.hours+11)%12+1).padStart(2,`0`):`--`,pe=re?String(re.minutes).padStart(2,`0`):`--`,me=p?null:(0,f.jsxs)(`div`,{className:(0,l.default)(zp.timeInputClockHeader,D?.clockHeader),style:O?.clockHeader,children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(zp.timeInputHeaderSegment,F===`hours`&&zp.timeInputHeaderSegmentActive,D?.headerSegment),style:O?.headerSegment,onClick:()=>I(`hours`),children:fe}),(0,f.jsx)(`span`,{className:zp.timeInputHeaderColon,children:`:`}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(zp.timeInputHeaderSegment,F===`minutes`&&zp.timeInputHeaderSegmentActive,D?.headerSegment),style:O?.headerSegment,onClick:()=>I(`minutes`),children:pe}),!_&&(0,f.jsxs)(`div`,{className:(0,l.default)(zp.timeInputMeridiem,D?.meridiem),style:O?.meridiem,children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(ie.hours<12&&zp.timeInputMeridiemActive),onClick:()=>Y(!1),children:`AM`}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(ie.hours>=12&&zp.timeInputMeridiemActive),onClick:()=>Y(!0),children:`PM`})]})]}),X=m||h?(0,f.jsxs)(`div`,{className:(0,l.default)(zp.timeInputFooter,D?.footer),style:O?.footer,children:[h&&(0,f.jsx)(ne,{styleType:z.Default,onClick:()=>{let e=new Date;ae({hours:e.getHours(),minutes:e.getMinutes()})},children:`Now`}),m&&(0,f.jsx)(ne,{styleType:z.Default,onClick:()=>{J(null),r?.(null)},children:`Clear`})]}):null,Z=(0,f.jsxs)(`div`,{className:(0,l.default)(zp.timeInputClock,D?.clock),style:O?.clock,children:[me,(0,f.jsx)(Rp,{time:ie,mode:F,use24Hour:_,minuteStep:g,onChange:ae,onCommit:oe,classNames:D,styles:O}),X]}),he=s?null:(0,f.jsx)(Gi,{autoComplete:`off`,label:`${b}${te()?` *`:``}`,value:j,icon:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faClock}),onIconClick:se,onClick:se,readOnly:o,disabled:w,isValid:!de,customInput:(0,f.jsx)(Fo,{mask:`99:99`,beforeMaskedStateChange:ce}),onChange:e=>le(e),onBlur:ue,onFocus:()=>R(!0),onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1)}),ge=a?Z:o?(0,f.jsx)(va,{hideHeader:!0,isOpen:N,onClose:()=>P(!1),children:Z}):(0,f.jsx)(rn,{isOpen:N,onOpenChange:P,content:Z,placement:wt.Bottom,align:Tt.Start,closeOnTriggerClick:!1,constrainWidth:!1,children:he});return(0,f.jsxs)(`div`,{className:(0,l.default)(zp.timeInput,D?.root,T),style:{...O?.root,...E},...k,children:[(o||a)&&he,ge,(0,f.jsx)(Fi,{variant:`error`,message:i?i.getCurrentErrorMessage()??``:S||``,isVisible:de&&(L||B)})]})}var Vp={timeline:`timeline_VtQdt`,"timeline-item":`timeline-item_s8-U2`,timelineItem:`timeline-item_s8-U2`,"timeline-item-connector":`timeline-item-connector_06FQ0`,timelineItemConnector:`timeline-item-connector_06FQ0`,"timeline-item-clickable":`timeline-item-clickable_0w8zK`,timelineItemClickable:`timeline-item-clickable_0w8zK`,"timeline-item-disabled":`timeline-item-disabled_EkWVA`,timelineItemDisabled:`timeline-item-disabled_EkWVA`,"timeline-marker":`timeline-marker_u6jDA`,timelineMarker:`timeline-marker_u6jDA`,"timeline-dot":`timeline-dot_l-s7C`,timelineDot:`timeline-dot_l-s7C`,"timeline-dot-with-icon":`timeline-dot-with-icon_6JK7D`,timelineDotWithIcon:`timeline-dot-with-icon_6JK7D`,"timeline-dot-primary":`timeline-dot-primary_5Uk-e`,timelineDotPrimary:`timeline-dot-primary_5Uk-e`,"timeline-dot-success":`timeline-dot-success_iEoLv`,timelineDotSuccess:`timeline-dot-success_iEoLv`,"timeline-dot-warn":`timeline-dot-warn_-6G8K`,timelineDotWarn:`timeline-dot-warn_-6G8K`,"timeline-dot-error":`timeline-dot-error_-10M7`,timelineDotError:`timeline-dot-error_-10M7`,"timeline-with-icons":`timeline-with-icons_ylDAw`,timelineWithIcons:`timeline-with-icons_ylDAw`,"timeline-connector":`timeline-connector_VuXnH`,timelineConnector:`timeline-connector_VuXnH`,"timeline-content":`timeline-content_K4Ztg`,timelineContent:`timeline-content_K4Ztg`,"timeline-header":`timeline-header_xr4Tw`,timelineHeader:`timeline-header_xr4Tw`,"timeline-title":`timeline-title_MZ26k`,timelineTitle:`timeline-title_MZ26k`,"timeline-timestamp":`timeline-timestamp_-0w-N`,timelineTimestamp:`timeline-timestamp_-0w-N`,"timeline-description":`timeline-description_WcWIu`,timelineDescription:`timeline-description_WcWIu`,"timeline-right":`timeline-right_fZEKn`,timelineRight:`timeline-right_fZEKn`,"timeline-alternate":`timeline-alternate_Kv9LY`,timelineAlternate:`timeline-alternate_Kv9LY`,"timeline-item-right":`timeline-item-right_s5ELB`,timelineItemRight:`timeline-item-right_s5ELB`},Hp=function(e){return e.Left=`left`,e.Right=`right`,e.Alternate=`alternate`,e}({}),Up=function(e){return e.Default=`default`,e.Primary=`primary`,e.Success=`success`,e.Warn=`warn`,e.Error=`error`,e}({}),Wp={[Up.Primary]:Vp.timelineDotPrimary,[Up.Success]:Vp.timelineDotSuccess,[Up.Warn]:Vp.timelineDotWarn,[Up.Error]:Vp.timelineDotError};function Gp({items:e=[],alignment:t=Hp.Left,className:n,style:r,classNames:i,styles:a,...o}){let s=e.some(e=>!!e.icon);return(0,f.jsx)(`div`,{...o,className:(0,l.default)(Vp.timeline,{[Vp.timelineRight]:t===Hp.Right,[Vp.timelineAlternate]:t===Hp.Alternate,[Vp.timelineWithIcons]:s},i?.root,n),style:{...a?.root,...r},children:e.map((n,r)=>{let o=n.id??r,s=r===e.length-1,c=t===Hp.Alternate&&r%2==1,u=!!n.onClick&&!n.disabled,d=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:(0,l.default)(Vp.timelineMarker,i?.marker),style:a?.marker,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Vp.timelineDot,{[Vp.timelineDotWithIcon]:!!n.icon},Wp[n.status??Up.Default],i?.dot),style:a?.dot,children:n.icon?K(n.icon):null}),!s&&(0,f.jsx)(`div`,{className:(0,l.default)(Vp.timelineConnector,i?.connector),style:a?.connector})]}),(0,f.jsxs)(`div`,{className:(0,l.default)(Vp.timelineContent,i?.content),style:a?.content,children:[(0,f.jsxs)(`div`,{className:Vp.timelineHeader,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Vp.timelineTitle,i?.title),style:a?.title,children:n.title}),n.timestamp!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(Vp.timelineTimestamp,i?.timestamp),style:a?.timestamp,children:n.timestamp})]}),n.description!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(Vp.timelineDescription,i?.description),style:a?.description,children:n.description}),n.content]})]}),p=(0,l.default)(Vp.timelineItem,{[Vp.timelineItemRight]:c},{[Vp.timelineItemClickable]:u},{[Vp.timelineItemDisabled]:n.disabled},i?.item);return u?(0,f.jsx)(oe,{className:p,style:a?.item,onClick:n.onClick,children:d},o):(0,f.jsx)(`div`,{className:p,style:a?.item,"aria-disabled":n.disabled||void 0,children:d},o)})})}var Kp={timer:`timer_cqe3R`,"timer-ringWrapper":`timer-ringWrapper_OydlE`,timerRingWrapper:`timer-ringWrapper_OydlE`,"timer-ringSvg":`timer-ringSvg_qsV1X`,timerRingSvg:`timer-ringSvg_qsV1X`,"timer-ripples":`timer-ripples_2Slkv`,timerRipples:`timer-ripples_2Slkv`,"timer-ripple":`timer-ripple_TLdSx`,timerRipple:`timer-ripple_TLdSx`,timerRippleHalo:`timerRippleHalo_oEcXJ`,"timer-ringTrack":`timer-ringTrack_pGGs1`,timerRingTrack:`timer-ringTrack_pGGs1`,"timer-ringProgress":`timer-ringProgress_LL8uQ`,timerRingProgress:`timer-ringProgress_LL8uQ`,"timer-ringProgress-urgent":`timer-ringProgress-urgent_MwwU2`,timerRingProgressUrgent:`timer-ringProgress-urgent_MwwU2`,"timer-display":`timer-display_es2IX`,timerDisplay:`timer-display_es2IX`,"timer-time":`timer-time_oMZ5O`,timerTime:`timer-time_oMZ5O`,"timer-label":`timer-label_GknS-`,timerLabel:`timer-label_GknS-`,"timer-controls":`timer-controls_LHM4q`,timerControls:`timer-controls_LHM4q`,"timer-controlsRow":`timer-controlsRow_42JyZ`,timerControlsRow:`timer-controlsRow_42JyZ`,"timer-adjustButton":`timer-adjustButton_QMxrI`,timerAdjustButton:`timer-adjustButton_QMxrI`,"timer-cancelButton":`timer-cancelButton_ObL4-`,timerCancelButton:`timer-cancelButton_ObL4-`,"timer-pulsing":`timer-pulsing_795m4`,timerPulsing:`timer-pulsing_795m4`,timerHeartbeat:`timerHeartbeat_N40Zt`,"timer-critical":`timer-critical_q-JzB`,timerCritical:`timer-critical_q-JzB`},qp=200,Jp=1e3,Yp={cancel:`Cancel timer`};function Xp(){return typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}function Zp(e){let t=Math.ceil(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=String(r).padStart(2,`0`),o=String(i).padStart(2,`0`);return n>0?`${n}:${a}:${o}`:`${a}:${o}`}function Qp(e){let{ref:t,durationSeconds:n,autoStart:r=!0,resetOnDurationChange:i=!0,onTick:a,onComplete:o,onStart:s,onPause:u,onResume:p,onCancel:m,onAddTime:h,onRemoveTime:g,showControls:_=!0,hideAddButton:v=!1,hideRemoveButton:y=!1,hidePauseButton:b=!1,hideCancelButton:x=!1,adjustSeconds:S=30,maxSeconds:C,label:w,formatTime:T=Zp,size:E,strokeWidth:k=10,counterClockwise:A=!1,urgentThreshold:j=.1,urgentMinSeconds:M=3,pulseOnUrgent:N=!0,showRunningRipples:P=!1,playSoundOnComplete:F=!1,soundUrl:I,soundVolume:L=.5,notifyOnComplete:R=!1,notificationTitle:z,notificationBody:V,className:H,style:U,classNames:W,styles:G,labels:ee,...K}=D(`Timer`,e),te=O(`Timer`,ee,Yp),q=n*1e3,[J,re]=(0,c.useState)(r?`running`:`idle`),[ie,ae]=(0,c.useState)(q),[oe,se]=(0,c.useState)(0),[le,ue]=(0,c.useState)([]),Y=(0,c.useRef)(ie),de=(0,c.useRef)(J),fe=(0,c.useRef)(q),pe=(0,c.useRef)(!1),me=(0,c.useRef)(!1),X=(0,c.useRef)(!1),Z=(0,c.useRef)(0);function he(e){Y.current=e,ae(e)}function ge(e){de.current=e,re(e)}function _e(){se(e=>e+1)}(0,c.useEffect)(()=>{if(J!==`running`)return;let e=Date.now(),t=Y.current,n=setInterval(()=>{let n=Math.max(0,t-(Date.now()-e));he(n),a?.(n),n<=0&&ge(`completed`)},qp);return()=>clearInterval(n)},[J,oe]),(0,c.useEffect)(()=>{if(J===`completed`&&!pe.current){if(pe.current=!0,o?.(),F)try{let e=new Audio(I||`data:audio/wav;base64,UklGRkYeAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YSIeAAAAAAkAIAA4AEQANwAPANH/jv9b/07/cf/F/zkAsAAJAScB+QCCANv/K/+h/mX+j/4d//P/3QChAQkC8QFZAV0AOP80/pb9i/0g/jj/kgDaAbsC9gJzAkwBwv82/gz9k/zz/Bz+y/+ZARMD1QOoA44CxQC6/u782PvD+778kv7SAO8CYQTGBPwDLALE/1j9hfvD+kz7Bf2J/zwCcgSbBWUF1QNGAVX+vPsk+vj5TPvU/fYA7QP6BZYGkAUjA+D/k/wP+vj4nPna+y3/xQK+BVkHKActBeABC/6h+nz4LPjN+QD9AAHTBIQHYggvBy4EFgDn+6v4NPfm9576uP4zA/YGDAnsCJUGkgLc/Zz54vZh9kL4FfzvAKAF/AgqCtYITQVmAFX7W/d49Sv2Ufkq/ocDFgizCrIKCQhaA8f9sPhY9Zr0rfYW+8QAUwZiCuoLgwp9BtAA3voh9sjzb/T194T9wAMgCUwMdQyJCTgEzv3d9+Dz2fIR9QT6fwDsBrMLoQ00DL4HUgGC+v30JPKy8o32yPzeAxAK1A01DhILKwXu/ST3evIf8W/z4PghAGsH7wxMD+YNDQnrAUH68fOP8PjwGfX2++ED6ApKD+4PowwxBin+hfYq8W/vyfGs96r/zgcTDusQmQ9pCpwCGvr+8gvvQu+d8xD7ygOkC60QoBE5DkcHff4C9u/vy+0i8Gr2HP8WCCAPeRJIEc8LYgMP+iXyme2S7RnyF/qYA0YM+hFHE9IPbgjp/pn1zO407HzuHPV3/kIIEhD3E/MSPg07BB/6ZvE87OvrkPAN+U4DzQwxE+EUbBGjCW3/TfXC7a7q2ezD87z9UwjrEGEVlhS0DigFSfrD8PTqT+oF7/P36gI4DVAUbhYEE+QKCAAc9dLsOek862Hy7vxKCKkRuBYxFi8QJgaM+jzww+nA6Hnty/ZvAocNVhXqF5kULwy5AAf1/OvY56Xp+vAM/CYISxL4F8AXrBE0B+j60O+r6EDn7+uY9d0Bug1BFlQZKRaDDX0BDPVB64vmGOiN7xr76AfREiAZQxkpE08IXPuB76zn0OVo6lr0NQHSDRIXqhqxF90OVAIs9aPqVeWX5h/uGPqSBzsTMBq2GqUUdgnn+07vx+Zy5OfoFPN6AM4NxxfrGzAZOxA8A2b1Ieo35CPlsOwI+SMHiBMmGxgcHRanCof8Nu/+5SnjbufH8av/sA1gGBUdohqbETQEufW76TLjvuND6+z3nga5EwEcaB2OF+ELPP0671Hl9eH/5XfwzP53DdwYJx4HHPsSOgUk9nLpR+Jr4tvpx/YDBs4TwRyjHvcYIA0D/lnvwOTY4J3kJe/d/SYNOxkgH1wdWRRLBqb2Rul34SvheeiZ9VMFxxNkHcgfVhpjDtz+ku9N5NTfSOPT7eD8vAx9Gf4fnx6yFWYHPvc26cPg/98f52b0kQSlE+od1SCpG6gPxP/l7/bj6t4D4oPs1/s7DKMZwSDPHwUXiQjr90HpLODq3tDlL/O9A2kTVB7KIe0c7RC6AFDwveMa3tHgOOvF+qMLrBlnIeogTxiyCar4aemy3+3djeT18doCExOfHqUiIh4vErsB0/Cg42bdsd/06ar5+AqZGfEh7iGPGd8Ke/mr6VXfCN1Z473w6QGkEs4eZCNEH20TxwJr8aHjz9yn3rjoivg5CmoZXSLbIsIaDgxb+gbqFt8+3DXih+/sAB4S3x4IJFIgpBTbAxnyvuNV3LTdh+dm92kJIBmrIq4j5xs8DUr7e+r03o/bJOFV7uX/ghHTHpAkSyHSFfQE2fL24/jb2Nxj5kD2iQi8GNwiZyT7HGgORPwH6/De/Nom4Crt1v7QEKoe+SQuIvUWEgar80rkudsW3E3lG/WbB0AY7yIFJfwdjw9I/anrCd+G2j3fCOzC/QwQZh5GJfgiDBgxB430uOSY22/bSOT486EGqxfkIoYl6h6vEFX+Yew/3y3abN7x6qn8Ng8HHnQlqCMTGU8IffU+5ZXb49pW49nynQUBF7wi6yXCH8YRZ/8s7ZHf8tmz3efpjvtQDo0dhCU+JAsabAl59t3lsNtz2nfiwvGQBEEWeCIyJoQg0xJ+AAju/t/W2RPd7Oh0+lwN+hx2Jbkk8BqDCn/3kubo2yHaruGz8H4DbhUXIlsmLSHSE5YB9e6G4NfZjtwB6Fz5WwxPHEslFyXAG5QLjvhc5z3c7Nn84K/vaAKJFJshZia8IcMUrgLv7ybh9tkl3CjnSfhRC44bAiVYJXwcnAyi+TrortzU2WLguO5QAZMTBCFTJjEipBXDA/bw3+E02tjbY+Y99z4KtxqcJHslIB2ZDbv6Kuk63dvZ4t/Q7TgAkBJUICEmiiJyFtQECPKu4o7aqNu05Tn2JQnNGRokgSWsHYoO1fsp6uHdANp83/jsIv+AEY0f0iXHIiwX3gUh85LjBtuV2xzlQPUHCNEYfCNpJR8ebA/v/DfroN5D2jHfMuwR/mYQrh5mJeci0RfgBkH0iuSZ26DbnORU9OgGxRfFIjIldx49EAf+Uux436TaA9+B6wf9RA+7Hd0k6iJfGNcHZfWU5Ujcyds15HbzyQWrFvQh3iS0Hv0QG/927WfgItvy3uTqBfwcDrQcOCTPItUYwQiL9q7mEd0Q3OnjqfKtBIUVCyFsJNUeqREoAKPuauG92/7eXuoO++8Mmxt3I5YiMhmdCbD31efz3XXcuOPt8ZUDVBQMIN0j2R4/EiwB1u+B4nPcJ9/w6SP6wAtzGp0iPyJ0GWkK1PgK6e3e+Nyi40bxgwIbE/geMiPAHr8SJgIN8anjRd1v35vpRvmSCjwZqiHLIZwZIwvz+Ujq/d+X3arjs/B6AdwR0R1qIooeJxMUA0by4uQw3tPfYel6+GYJ+RefIDohpxnJCwv7j+si4VLezuM28HsAmBCYHIghNh52E/MDf/Mo5jTfVeBB6cD3PgisFn4fjCCXGVoMG/zb7FniKd8P5NLviP9TD1AbjSDFHawTwgS29HrnT+D04DzpGPcdB1cVSR7BH2oZ1Qwh/Szuo+Mb4G3khu+k/g4O+Rl5HzcdxhN/Bej11+iB4bDhVOmG9gQG/BMAHdweHxk5DRr+fu/75Cbh6eRT79D9zAyXGE0ejBzGEyoGFPc76sbih+KI6Qr29gSeEqcb3R24GIQNBf/Q8GLmSeKB5TzvDv2OCysXDR3EG6kTvwY3+KXrHuR549nppfX0Az0RPhrEHDUYtg3h/x/y1OeC4zbmP+9e/FcKuBW4G+IacRM/B0/5Eu2H5YXkRupZ9QAD3Q/IGJMblBfNDaoAavNP6dHkB+de78T7KAk/FFEa5RkcE6cHXPqB7v/mquXQ6ib1HAKADkcXTBrYFskNYQGu9NLqNObz55nvP/sECMIS2RjOGKoS9wda++/vhOjn5nbrDfVKASgNvRXwGAAWqg0DAur1Wuyp5/no8O/R+uwGRRFTF58XHRIuCEj8W/EU6jnoOOwO9YoA1gsrFIEXDRVvDY8CG/fl7S7pGOpj8Hv64gXID8AVWRZzEUsIJf3B8q3roOkV7Sv14P+NCpUSARYAFBkNBAM/+HHvwepP6/LwP/rpBE4OIxT9FK4QTQju/SH0TO0a6w3uZPVL/08J+xBwFNsSpwxhA1X5/PBg7J3snPEc+gEE2gx9Eo0Tzw80CKP+d/Xw7qXsHe+39c3+HghhD9ISnhEZDKUDW/qD8gnuAO5i8hT6LANtC9EQCxLVDgEIQv/C9pfwP+5H8Cf2Z/77BskNKBFLEG8LzwNP+wX0u+9370LzJvpsAgkKIQ94EMINsgfK/wH4PfLm74fxsfYZ/ukFNAx0D+MOqwrgAzD8gPVy8f/wO/RT+sEBsAhuDdYOlwxHBzsAMfni85nx3vJX9+b96ASmCrkNZw3NCdUD/Pzx9i3zmPJO9Zz6LgFlB7wLJw1WC8IGkgBQ+oP1VfNI9Bf4zP37Ax4J+AvaC9YIsAOy/Vb46vRA9Hj2//qyACgGDAptC/8JIgbRAF37HvcZ9cb18fjN/SIDoQc0Cj4KxgdwA1L+rvmn9vT1uPd9+08A/ARgCKsJlAhnBfUAV/yw+OH2VPfk+ej9XwIwBm4IkwifBhUD2f73+mD4svcO+Rb8BgDjA7sG4gcWB5ME/gA8/Tj6rfjy+O/6H/60Ac0EqgbdBmMFoAJI/y/8Ffp4+Xb6yfzX/90CHwUUBogFpwPtAAv+tPt4+p36Efxw/iABeQPoBB0FEQQQAp3/VP3D+0X78fuV/cH/7AGNA0QE7AOjAsIAwv4i/UP8VPxI/dv+pgA2Ai0DVQOtAmYB2P9l/mf9Fv18/Xn+x/8RAQgCdAJCAogBfABi/4D+Cv4U/pP+Yf9FAAYBeAGHATcBpAD5/2H/Af/o/hX/dP/n/04AkQClAI4AWQAbAOj/zf/L/9v/8v8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANACUAKwAKAMr/kv+R/9n/TwCxALwAVwCs/xb/8/5p/0YAFgFfAeYA3f/N/lP+wP7s/zwB9QGiAV4Azv7O/ff9Rf8RAWACcQImASb/g/0s/WH+jACEAjADIALY/4v9gfxZ/bD/TAK/AzAD2gD2/Rb8S/yN/q4B/wMyBBkCyP4H/F77Ov2qANgDAgV3A/r/aPyz+tr7Tf87A34F0AR7AUH9bfqS+rD9JQKJBfsFLAOQ/qP6jPn1+6EADgXSBucERQBk++74RvrE/gYEMQeABkECs/zW+M74svx1AvwGygdeBIH+Wvm795b6bwAmBpwIbQa2AIP6NPeg+BX+rATSCD0IKgNK/FX3A/eU+50CVQibCawFmv4w+O71HvkWABwHXAoHCE0Bx/mJ9ez2Q/0sBWAKAgo0BAr87PU19Vj6nQKRCWkLFAfa/ib3KfSR95f/7gcQDLEJCQIv+fDzLfVO/IUF1wvNC1wF8fuf9GbzAPl2Aq8KMg2TCEH/PvZv8vL18v6cCLMNaAvoAr/4bPJn8zn7tgUzDZoNogYA/HDznPGR9ycCqwvxDiUKzv979cTwRfQq/iQJQg8oDegDdvgB8ZzxBvq/BXQOZg8BCDf8YfLY7wz2sQGDDKQQyAuBANz0Ku+M8j79hAm6EO4OCAVU+LDv0u+4+KEFlQ8rEXgJlfx08SDudfQWATgNRxJ5DVYBZfSm7cvwM/y+CRkStxBEBlv4fu4L7lH3WgWWEOgSAgsZ/avwduzO8lYAxg3WEzIPTQIU9DnsBu8J+88JXBN9EpsHifhr7Uvs1PXuBHMRmRSdDML9B/Dd6hzxdP8tDk8V8hBkA+zz5+pB7cT5uAmAFD8UCQnf+HrslepF9FsELBI6FkYOjv6J71npYu9y/mwOrha1EpcE6/Oz6X/rZfh6CYQV+RWLClv5revu6KbypAO/EsgX+Q99/zPv7eek7VH9hA7yF3cU5QUS9J7ow+nx9hUJZBamFx8M/PkF61fn/PDKAisTQBmzEYsABe+b5uTrE/x0DhcZNBZLB2H0q+cR6Gn1iQggF0QZwA3A+oTq1eVI79ABbxOeGm8TtgH/7mblJ+q9+jwOGxroF8YI1vTc5m3m0vPaB7YXzxpsD6f7Kupq5JDttwCME+EbKxX9AiDvUeRw6FD53Q39GpEZUgpw9TLm2uQv8gcHJRhEHB8Rrvz36Rrj1+uB/4ETBh3iFlsEae9e48Pm0PdYDbsbLBvsCy72ruVb44LwFAZtGKEd1RLS/e3p5+Ef6jL+TRMKHpIYzgXZ747iJOVA9q4MUhyzHJEND/dR5fPh0O4BBY0Y4h6LFBL/CurT4G7ozPzzEuweNxpTB27w4+GV46P04QvDHCUePQ8P+BzlpeAd7dIDhRgFID0WagBP6uDfxuZS+3MSqR/MG+cIJ/Fe4Rni/fLzCg0dfx/uEC75EOV032vriQJVGAgh5xfXAbvqEd8r5cj5zRFBIFAdhgoD8gHhteBR8eYJLh29IJ4SaPor5WLev+koAf4X6SGHGVYDTetm3qDjMfgFEbMgvh4tDP/yy+Bq36PvuwgoHd4hSxS6+23lcd0c6LT/gBelIhgb5QQC7OLdKeKR9hoQ/CAUINgNGfS94Dze9+13B/oc3yLwFSP91+Wj3IXmL/7dFjwjlxx/BtvshN3I4Or0EA8eIVAhgw9P9dfgLN1P7BsGpBy9I4sXnv5m5vrb/+Sd/BcWrCMCHiEI1O1P3YHfQPPpDRghbSIrEZ72GeE+3LHqqwQoHHgkGBkoABrnd9uL4wD7LxX1I1Ufxwnr7kHdVd6Y8agM6iBrI80SA/iC4XLbHukpA4YbDSWUGr4B8ecb2y7iXfknFBYkjSBvCx/wXN1J3fTvTwuUIEckZBR7+RHiy9qb55oBwRp8JfsbXQPp6Ofa6uC39wITDySoIRQNbPGe3V3cWe7hCRggACXuFQP7xOJK2ivmAADaGcMlSx0BBf/p2trB3xL2whHgI6Misg7P8gfelNvK7GEIdx+TJWcXl/yb4/DZ0ORf/tMY4iWAHqYGMuv22rfecfRqEIojfCNHEEb0l97v2knr0waxHv8lyxg0/pLkvdmP47v8rhfaJZgfSQh+7Drbzt3Y8v0ODSMyJM4RzfVL33Da2+k7BckdRSYZGtb/qeWz2WniGPttFqklkSDlCeHtpdsH3Urxfg1qIsMkRRNg9yPgGNqD6JsDwRxiJkwbegHc5tDZYeF4+RUVUSVpIXkLWO823GTcy+/wC6MhLiWoFP34HOHn2UPn9wGbG1gmYhwcAyroFtp54N/3pxPSJB0i/wzg8Ozc59te7lcKuSBxJfQVn/o04t/ZHuZUAFoaJSZaHbkEjumD2rTfUvYnEi0krCJ2DnTyxd2R2wbttgivH40lJhdE/Gnj/9kX5bP+/xjLJTAeTAYH6xbbE9/T9JgQZCMVI9gPEvTA3mLbx+sSB4cegCU8GOf9uORG2jHkGv2PF0kl4x7UB5DsztuX3mbz/Q54IlcjJRG29dvfXNui6mwFQx1MJTMZhf8f5rXabOOM+w0WoiRxH0sJJ+6q3ELeDfJaDWwhcSNXEl33E+F925vpygPmG+8kCRobAZvnStvL4gv6exTXI9kfrwrI76jdFN7N8LILQSBjI24TA/ll4sbbtOguAnMabCS8GqQCJ+kF3FDinPjdEugiGyD9C2/xxd4P3qfvCgr6Hi0jZhSk+s/jN9zv550A7RjDI0sbHgTB6uTc++FB9zYR2SE0IDINGfMA4DHenu5kCJkdzyI9FT38TuXO3E3nGf9YF/UitBuFBWbs5N3N4f71iw+rICYgSw7D9Fbhe9617cUGIxxLIvIVyv3e5ovd0eam/bUVBCL1G9YGEu4E38jh1fTeDWEf7x9FD2j2xOLt3u3sLwWZGqAhghZI/33obN575kj8ChTyIBAcDwjB70Pg6uHJ8zQM/R2RHx8QBvhH5IbfSeynA/4Y0CDtFrMAJupv30zmAPtaEsEfAhwrCW/xnOE04tzyjwqCHAsf1xCY+dzlRODL6y8CVxfdHzAXCQLX65LgRebT+agQdB7MGyoKGvMO46biEfL0CPMaYB5rERv7f+cm4XLrywCnFckeTBdHA4zt0+Fm5sL4+A4MHW4bCQu+9JXkP+Np8WYHVRmPHdgRjfwu6SriQOt+//ETlR1BF2kEQO8v46/m0PdNDY0b6RrFC1b2Lub94+bw5wWpF5scIBLp/eTqT+M260r+ORJFHA0XbgXx8KTkH+cA96sL+xk+Gl0M4PfW59/kifB9BPMVhhs/Ei3/nuyS5FXrM/2DENsasRZSBpvyL+a351L2FgpYGG4Z0AxY+Yrp5OVT8CkDNxRRGjcSVgBZ7vHlm+s7/NEOWRkuFhUHO/TM53ToyvWRCKcWehgdDbz6ResK50Xw7gF5Ev8YBxJiARHwaecI7GT7KQ3DF4UVswfM9XnpVeln9R8H7BRlF0INCPwG7U7oXvDPALwQkxevEU4CwvH26J3sr/qMCxwWtxQtCEz3MetZ6iv1wwUrEzAWPw05/cfurumg8M//BA8PFjARGANp85fqV+0f+v8JZxTFE4AIuPjy7H7rFvWABGcR3RQUDUz+hfAn6wnx8P5UDXYUihC+AwL1R+w27rX5hQioErESrAgM+rjuwuwq9VkDpA9wE8IMQf898rfsmfEz/rALzBLAD0AEivYD7jjvcvkgB+IQfRGwCEb7f/Ai7mX1UALlDesRSAwUAOzzWe5P8pv9GwoUEdEOmwT+98jvW/BW+dQFGA8sEIwIYvxD8pvvyfVoAS4MUhCnC8MAjPUM8CrzKP2YCFEPwA3PBFv5k/Gc8WL5pARPDcAOQAhg/QL0K/FT9qIAggqmDuEKTQEd98vxKPTc/CsHhw2PDNsEnvpf8/rylvmSA4oLPA3NBzz+t/XO8gP3AADlCOwM+AmxAZn4k/NH9bf81gW6C0ELvwTE+yj1cvTx+aACzQmiCzMH9f5f94H02PeE/1sHJwvsCO4B//lh9YX2u/ydBOwJ1wl8BMv87fYA9nT60QEbCPYJdAaJ//f4QvbQ+C7/5QVaCb8HBAJK+zH33/fm/IIDIghVCBEEsf2o+KP3HPslAXcGPAiRBff/e/oM+On5AP+IBIoHdQbyAXr8//hU+Tj9hgJgBr0GfwN0/lb6Vvnq+58A5QR2BosEPgDp+9z5Ivv5/kYDuQUQBbcBiv3H+t/6sv2tAagEEwXIAhL/9fsW+9v8PwBoA6kEZQNeAD39rvt3/Bv/IQLsA5EDVgF6/of8f/xS/vcA/gJaA+0Biv+A/eD87f0HAAMC1wIhAlUAdf5+/ef9ZP8cASUC/QHNAEb/O/4w/hf/ZwBlAZUB7wDb//X+sP4f//b/uAAEAcEAJQCO/0r/bv/U/zkAaQBXAB8A7v/f/+7/`);e.volume=L,e.play()?.catch(()=>{})}catch{}if(R&&typeof Notification<`u`&&Notification.permission===`granted`)try{new Notification(z??`Timer done`,{body:V??(typeof w==`string`?w:void 0)})}catch{}}J!==`completed`&&(pe.current=!1)},[J]),(0,c.useEffect)(()=>{if(!X.current){X.current=!0;return}let e=n*1e3;fe.current=e,he(e),pe.current=!1,_e(),i&&ge(r?`running`:`idle`)},[n]),(0,c.useEffect)(()=>{if(!P||J!==`running`||Xp())return;function e(){let e=++Z.current;ue(t=>[...t,e])}let t=setTimeout(e,0),n=setInterval(e,Jp);return()=>{clearTimeout(t),clearInterval(n)}},[P,J]);function ve(e){ue(t=>t.filter(t=>t!==e))}function ye(){R&&!me.current&&typeof Notification<`u`&&Notification.permission==="default"&&(me.current=!0,Notification.requestPermission().catch(()=>{}))}function be(){ye(),(de.current===`completed`||de.current===`cancelled`)&&(he(fe.current),pe.current=!1),_e(),ge(`running`),s?.()}function xe(){de.current===`running`&&(ge(`paused`),u?.())}function Se(){de.current===`paused`&&(_e(),ge(`running`),p?.())}function Ce(e){let t=C==null?1/0:C*1e3,n=Math.min(Y.current+e*1e3,t);he(n),_e(),h?.(e,Math.round(n/1e3)),de.current===`completed`&&n>0&&(pe.current=!1,ge(`running`))}function we(e){let t=Math.max(0,Y.current-e*1e3);he(t),_e(),g?.(e,Math.round(t/1e3)),t<=0&&de.current===`running`&&ge(`completed`)}function Te(){he(fe.current),ge(`cancelled`),m?.()}function Ee(){he(fe.current),pe.current=!1,ge(`idle`)}(0,c.useImperativeHandle)(t,()=>({start:be,pause:xe,resume:Se,addTime:Ce,removeTime:we,cancel:Te,reset:Ee,getStatus:()=>de.current,getRemainingMs:()=>Y.current}));let De=50-k/2,Oe=(0,c.useMemo)(()=>2*Math.PI*De,[De]),ke=Oe*(1-(fe.current>0?Math.min(1,ie/fe.current):0)),Ae=Math.max(fe.current*j,M*1e3),je=J===`running`&&ie<=Ae,Me=je&&ie<=Math.min(5e3,Ae),Ne=J===`paused`,Pe=_&&!v,Q=_&&!y,Fe=_&&!b,Ie=J===`running`?d.faPause:d.faPlay,Le=J===`running`?`Pause`:Ne?`Resume`:J===`idle`?`Start`:`Restart`,Re=J===`running`?xe:Ne?Se:be,ze=_&&!x;return(0,f.jsxs)(`div`,{...K,className:(0,l.default)(Kp.timer,N&&je&&Kp.timerPulsing,Me&&Kp.timerCritical,H,W?.root),style:{...E?{"--timer-size":E}:null,"--timer-stroke-width":`${k}px`,...U,...G?.root},children:[(0,f.jsxs)(`div`,{className:(0,l.default)(Kp.timerRingWrapper,W?.ringWrapper),style:G?.ringWrapper,children:[le.length>0&&(0,f.jsx)(`div`,{className:(0,l.default)(Kp.timerRipples,W?.ripples),style:G?.ripples,children:le.map(e=>(0,f.jsx)(`span`,{className:(0,l.default)(Kp.timerRipple,W?.ripple),style:G?.ripple,onAnimationEnd:()=>ve(e)},e))}),(0,f.jsxs)(`svg`,{className:(0,l.default)(Kp.timerRingSvg,W?.ringSvg),viewBox:`0 0 100 100`,style:G?.ringSvg,children:[(0,f.jsx)(`circle`,{className:(0,l.default)(Kp.timerRingTrack,W?.ringTrack),cx:`50`,cy:`50`,r:De,style:G?.ringTrack}),(0,f.jsx)(`circle`,{className:(0,l.default)(Kp.timerRingProgress,je&&Kp.timerRingProgressUrgent,W?.ringProgress),cx:`50`,cy:`50`,r:De,strokeDasharray:Oe,strokeDashoffset:ke,style:{transition:Ne?`none`:void 0,transform:A?`rotate(-90deg)`:void 0,...G?.ringProgress}})]}),(0,f.jsxs)(`div`,{className:(0,l.default)(Kp.timerDisplay,W?.display),style:G?.display,children:[(0,f.jsx)(`span`,{className:(0,l.default)(Kp.timerTime,W?.time),style:G?.time,children:T(ie)}),w&&(0,f.jsx)(`span`,{className:(0,l.default)(Kp.timerLabel,W?.label),style:G?.label,children:w})]})]}),_&&(0,f.jsxs)(`div`,{className:(0,l.default)(Kp.timerControls,W?.controls),style:G?.controls,children:[(0,f.jsxs)(`div`,{className:Kp.timerControlsRow,children:[Q&&(0,f.jsx)(ce,{icon:d.faMinus,title:`Remove ${S}s`,onClick:()=>we(S),className:(0,l.default)(Kp.timerAdjustButton,W?.removeButton),style:G?.removeButton}),Fe&&(0,f.jsx)(ne,{size:B.Small,icon:Ie,title:Le,onClick:Re,className:W?.pauseButton,style:G?.pauseButton}),Pe&&(0,f.jsx)(ce,{icon:d.faPlus,title:`Add ${S}s`,onClick:()=>Ce(S),className:(0,l.default)(Kp.timerAdjustButton,W?.addButton),style:G?.addButton})]}),ze&&(0,f.jsx)(ce,{icon:d.faXmark,title:te.cancel,onClick:Te,className:(0,l.default)(Kp.timerCancelButton,W?.cancelButton),style:G?.cancelButton})]})]})}var $p={virtualList:`virtualList_qBPNc`,"virtualList-drag-clone":`virtualList-drag-clone_artnC`,virtualListDragClone:`virtualList-drag-clone_artnC`,"virtualList-header":`virtualList-header_0Ellb`,virtualListHeader:`virtualList-header_0Ellb`,"virtualList-header-cell":`virtualList-header-cell_c8NGV`,virtualListHeaderCell:`virtualList-header-cell_c8NGV`,"virtualList-header-resize":`virtualList-header-resize_cbYFc`,virtualListHeaderResize:`virtualList-header-resize_cbYFc`,"virtualList-header-sort":`virtualList-header-sort_Cdpe3`,virtualListHeaderSort:`virtualList-header-sort_Cdpe3`,"virtualList-header-sort-label":`virtualList-header-sort-label_6MaZ3`,virtualListHeaderSortLabel:`virtualList-header-sort-label_6MaZ3`,"virtualList-header-sort-icon":`virtualList-header-sort-icon_Z-Nrd`,virtualListHeaderSortIcon:`virtualList-header-sort-icon_Z-Nrd`,"virtualList-header-sort-icon-active":`virtualList-header-sort-icon-active_g7qrb`,virtualListHeaderSortIconActive:`virtualList-header-sort-icon-active_g7qrb`,"virtualList-header-toggle":`virtualList-header-toggle_pYFxD`,virtualListHeaderToggle:`virtualList-header-toggle_pYFxD`,"virtualList-toggle-panel":`virtualList-toggle-panel_Uksmk`,virtualListTogglePanel:`virtualList-toggle-panel_Uksmk`,"virtualList-toggle-wrapper":`virtualList-toggle-wrapper_JP32M`,virtualListToggleWrapper:`virtualList-toggle-wrapper_JP32M`,"virtualList-toggle-popover":`virtualList-toggle-popover_gbpd7`,virtualListTogglePopover:`virtualList-toggle-popover_gbpd7`,"virtualList-toggle-item":`virtualList-toggle-item_5gu5d`,virtualListToggleItem:`virtualList-toggle-item_5gu5d`,"virtualList-toggle-reset":`virtualList-toggle-reset_3UANJ`,virtualListToggleReset:`virtualList-toggle-reset_3UANJ`,"virtualList-column-chip":`virtualList-column-chip_nOqr6`,virtualListColumnChip:`virtualList-column-chip_nOqr6`,"virtualList-select-cell":`virtualList-select-cell_s9kAy`,virtualListSelectCell:`virtualList-select-cell_s9kAy`,"virtualList-body":`virtualList-body_k-fRr`,virtualListBody:`virtualList-body_k-fRr`,"virtualList-row-active":`virtualList-row-active_H5r5-`,virtualListRowActive:`virtualList-row-active_H5r5-`,"virtualList-resizing":`virtualList-resizing_28Mn4`,virtualListResizing:`virtualList-resizing_28Mn4`,"virtualList-row":`virtualList-row_TTY50`,virtualListRow:`virtualList-row_TTY50`,"virtualList-row-no-divider":`virtualList-row-no-divider_Ct0gV`,virtualListRowNoDivider:`virtualList-row-no-divider_Ct0gV`,"virtualList-row-no-hover":`virtualList-row-no-hover_2d3mH`,virtualListRowNoHover:`virtualList-row-no-hover_2d3mH`,"virtualList-row-selected":`virtualList-row-selected_hwEN-`,virtualListRowSelected:`virtualList-row-selected_hwEN-`,"virtualList-row-draggable":`virtualList-row-draggable_I86ha`,virtualListRowDraggable:`virtualList-row-draggable_I86ha`,"virtualList-row-dragging":`virtualList-row-dragging_6T5tQ`,virtualListRowDragging:`virtualList-row-dragging_6T5tQ`,"virtualList-row-drop-inside":`virtualList-row-drop-inside_Uhi9n`,virtualListRowDropInside:`virtualList-row-drop-inside_Uhi9n`,"virtualList-drop-line":`virtualList-drop-line_EM-g4`,virtualListDropLine:`virtualList-drop-line_EM-g4`,"virtualList-drop-line-before":`virtualList-drop-line-before_n-0iZ`,virtualListDropLineBefore:`virtualList-drop-line-before_n-0iZ`,"virtualList-drop-line-after":`virtualList-drop-line-after_2dld-`,virtualListDropLineAfter:`virtualList-drop-line-after_2dld-`,"virtualList-reordering":`virtualList-reordering_Rt9E3`,virtualListReordering:`virtualList-reordering_Rt9E3`,"virtualList-cell":`virtualList-cell_H0zBv`,virtualListCell:`virtualList-cell_H0zBv`,"virtualList-loading-full":`virtualList-loading-full_wzZNM`,virtualListLoadingFull:`virtualList-loading-full_wzZNM`,"virtualList-loading-indicator":`virtualList-loading-indicator_EJced`,virtualListLoadingIndicator:`virtualList-loading-indicator_EJced`,"virtualList-spinner":`virtualList-spinner_apClW`,virtualListSpinner:`virtualList-spinner_apClW`,"virtualList-windowed":`virtualList-windowed_riUyT`,virtualListWindowed:`virtualList-windowed_riUyT`};function em(e,t,n,r=0){let i=e.length,a=Array(i+1);a[0]=0;for(let o=0;o<i;o++){let s=o<i-1?r:0;a[o+1]=a[o]+(t.get(e[o])??n)+s}return{offsets:a,totalHeight:a[i]}}function tm(e,t,n){if(n<=0)return 0;let r=0,i=n-1;for(;r<i;){let n=r+i>>1;e[n+1]<=t?r=n+1:i=n}return r}function nm(e,t,n,r,i){if(i===0)return{startIndex:0,endIndex:-1};let a=tm(e,t,i),o=a;for(;o<i&&e[o]<t+n;)o++;return{startIndex:Math.max(0,a-r),endIndex:Math.min(i-1,o+r-1)}}function rm(e,t,n,r,i){if(e===-1||e===t)return null;let a=r+i/2;return(t>e?n>=a:n<=a)?t:null}function im(e,t,n,r){if(n<=0)return`before`;let i=(e-t)/n;return r?i<1/3?`before`:i>2/3?`after`:`inside`:i<.5?`before`:`after`}function am(e,t){let n=t[e],r=e+1;for(;r<t.length&&t[r]>n;)r++;return r-1}function om(e,t){return e.length===0?`1fr`:e.map(e=>{switch(e.width.type){case`fixed`:return`${e.width.px}px`;case`flex`:return`${e.width.weight??1}fr`;case`fit`:{let n=t?.[e.key];return n==null?`fit-content(100%)`:`${n}px`}}}).join(` `)}var sm=`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`,cm=`data-vl-parked`,lm=`${sm}, [${cm}]`;function um(e){let t=e.scrollWidth>e.clientWidth,n=e.scrollWidth;if(!t&&!e.firstElementChild)return n;let r=getComputedStyle(e),i=parseFloat(r.paddingLeft)||0,a=parseFloat(r.paddingRight)||0;if(t&&(n+=a),e.firstElementChild&&!t&&e.scrollWidth<=i+a+1){let t=1/0,r=-1/0;if(e.querySelectorAll(`*`).forEach(e=>{let n=e.getBoundingClientRect();n.left<t&&(t=n.left),n.right>r&&(r=n.right)}),r>t){let e=Math.ceil(r-t)+i+a;e>n&&(n=e)}}return n}function dm(e){return`[data-col-key="${e.replace(/["\\]/g,`\\$&`)}"]`}function fm(e){return`--vl-col-${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}`}function pm(e){return e.width.type===`fixed`?e.width.px:e.width.type===`fit`?160:160*(e.width.weight??1)}function mm(e){return e.length===0?`1fr`:e.map(e=>`var(${fm(e.key)}, 160px)`).join(` `)}var hm=`ahroweui:virtuallist:columns:`;function gm(e){if(!e||typeof window>`u`)return null;try{let t=window.localStorage.getItem(hm+e);if(!t)return null;let n=JSON.parse(t);if(n&&Array.isArray(n.visible)&&Array.isArray(n.known)){let e={};if(n.widths&&typeof n.widths==`object`)for(let[t,r]of Object.entries(n.widths))typeof r==`number`&&Number.isFinite(r)&&r>0&&(e[t]=r);return{visible:n.visible.filter(e=>typeof e==`string`),known:n.known.filter(e=>typeof e==`string`),widths:e}}}catch{}return null}function _m(e,t){return e.lockVisible?!0:t&&t.known.includes(e.key)?t.visible.includes(e.key):!e.defaultHidden}var vm;function ym(){return vm??=new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`}),vm}function bm(e){return e==null||typeof e==`number`&&Number.isNaN(e)}function xm(e,t){let n=e instanceof Date?e.getTime():typeof e==`boolean`?Number(e):e,r=t instanceof Date?t.getTime():typeof t==`boolean`?Number(t):t;return typeof n==`string`||typeof r==`string`?ym().compare(String(n),String(r)):n<r?-1:+(n>r)}function Sm(e){return e.sortValue!=null||e.compare!=null||e.sortable===!0}function Cm(e,t){return!e||e.key!==t?{key:t,direction:`asc`}:e.direction===`asc`?{key:t,direction:`desc`}:null}function wm(e,t,n){if(!t||!n)return e;let r=n.find(e=>e.key===t.key);if(!r||r.compare==null&&r.sortValue==null)return e;let i=t.direction===`asc`?1:-1,{compare:a,sortValue:o}=r,s=e.map((e,t)=>({item:e,index:t}));return s.sort((e,t)=>{let n;if(a)n=i*a(e.item,t.item);else{let r=o(e.item),a=o(t.item),s=bm(r),c=bm(a);n=s||c?s===c?0:s?1:-1:i*xm(r,a)}return n===0?e.index-t.index:n}),s.map(e=>e.item)}function Tm({index:e,id:t,top:n,padding:r,columnTemplate:i,isSelected:a,isActive:o,manageTabStops:s,isEntered:u,activeClassName:d,activeStyle:p,showDivider:m,hover:h,onClick:g,observer:_,ariaRowIndex:v,ariaPosInSet:y,ariaSetSize:b,rowRole:x,reorderable:S,mouseDragEnabled:C,draggable:w,isDragging:T,reserveToggleGutter:E,onMouseDown:D,onMouseOver:O,onMouseLeave:k,onDragStart:A,onDragOver:j,onDragEnd:M,onDrop:N,onTouchStart:P,dropPosition:F,dropIndentPx:I,dropIndicatorClassName:L,dropIndicatorStyle:R,rowClassName:z,rowStyle:B,children:V}){let H=(0,c.useRef)(null);return(0,c.useLayoutEffect)(()=>{let e=H.current;if(e&&_)return _.observe(e),()=>_.unobserve(e)},[_]),(0,c.useLayoutEffect)(()=>{let e=H.current;if(!e||!s||u)return;let t=[];return e.querySelectorAll(sm).forEach(e=>{t.push([e,e.getAttribute(`tabindex`)]),e.setAttribute(`tabindex`,`-1`),e.setAttribute(cm,``)}),()=>{for(let[e,n]of t)n===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,n),e.removeAttribute(cm)}}),(0,f.jsxs)(`div`,{ref:H,id:t,"data-index":e,className:(0,l.default)($p.virtualListRow,a&&$p.virtualListRowSelected,o&&$p.virtualListRowActive,o&&d,!m&&$p.virtualListRowNoDivider,!h&&$p.virtualListRowNoHover,S&&$p.virtualListRowDraggable,T&&$p.virtualListRowDragging,F===`inside`&&$p.virtualListRowDropInside,z),style:{position:`absolute`,top:0,left:0,right:0,transform:`translateY(${n}px)`,...r==null?{}:{padding:r},...i?{display:`grid`,gridTemplateColumns:i}:{},...E?{paddingRight:32}:{},...B,...o?p:void 0},onClick:g,draggable:w,onMouseDown:D,onMouseOver:O,onMouseLeave:k,onDragStart:A,onDragOver:j,onDragEnd:M,onDrop:N??(C?e=>e.preventDefault():void 0),onTouchStart:P,onContextMenu:C?e=>e.preventDefault():void 0,"aria-selected":a,"aria-rowindex":v,"aria-posinset":y,"aria-setsize":b,role:x,children:[(F===`before`||F===`after`)&&(0,f.jsx)(`div`,{"data-drop-line":F,"aria-hidden":!0,className:(0,l.default)($p.virtualListDropLine,F===`before`?$p.virtualListDropLineBefore:$p.virtualListDropLineAfter,L),style:{left:I??0,...R}}),V]})}function Em(e){let[t,n]=(0,c.useState)(0),r=(0,c.useRef)([]),i=Math.min(t,Math.max(0,e-1));i!==t&&n(i);function a(t){let i=Math.max(0,Math.min(t,e-1));n(i),r.current[i]?.focus()}function o(e){return{tabIndex:e===i?0:-1,ref:t=>{r.current[e]=t},onFocus:()=>n(e)}}function s(t,n){if(t.altKey||t.ctrlKey||t.metaKey)return!1;switch(t.key){case`ArrowRight`:a(n+1);break;case`ArrowLeft`:a(n-1);break;case`Home`:a(0);break;case`End`:a(e-1);break;default:return!1}return t.preventDefault(),t.stopPropagation(),!0}return{getStationProps:o,handleNavigationKey:s}}var Dm=10;function Om({headerRef:e,columns:t,cols:n,resize:r,sort:i,onSort:a,multiSelect:o,allSelected:s,someSelected:c,onSelectAll:p,labels:m,classNames:h,styles:g}){let _=+!!o,v=_+n.visibleColumns.length+ +!!n.shouldShowToggle,y=Em(v);return(0,f.jsxs)(`div`,{ref:e,className:(0,l.default)($p.virtualListHeader,h?.header),style:{gridTemplateColumns:n.columnTemplate,...n.shouldShowToggle?{paddingRight:32}:{},...g?.header},role:`row`,"aria-rowindex":1,children:[o&&(0,f.jsx)(`div`,{...y.getStationProps(0),className:(0,l.default)($p.virtualListSelectCell,h?.selectCell),style:g?.selectCell,role:`columnheader`,onKeyDown:e=>{y.handleNavigationKey(e,0)||e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),p())},children:(0,f.jsx)(Ti,{selected:s||c,onToggle:p,"aria-label":m.selectAllRows,tabIndex:-1})}),n.visibleColumns.map((e,t)=>{let n=Sm(e),o=i&&i.key===e.key?i.direction:null,s=r.getHandleProps(e),c=_+t;return(0,f.jsxs)(`div`,{...y.getStationProps(c),onKeyDown:t=>{if(!y.handleNavigationKey(t,c)){if(t.altKey&&r.isResizable(e)){let n=t.shiftKey?1:Dm;if(t.key===`ArrowRight`)r.resizeBy(e.key,n);else if(t.key===`ArrowLeft`)r.resizeBy(e.key,-n);else if(t.key===`Home`)r.resizeToMin(e.key);else if(t.key===`End`)r.autoFit(e.key);else return;t.preventDefault();return}n&&t.target===t.currentTarget&&(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),a(e.key))}},className:(0,l.default)($p.virtualListHeaderCell,h?.headerCell),style:g?.headerCell,role:`columnheader`,"data-col-key":e.key,"aria-sort":n?o===`asc`?`ascending`:o===`desc`?`descending`:`none`:void 0,"data-fit-key":e.width.type===`fit`?e.key:void 0,children:[n?(0,f.jsxs)(`button`,{type:`button`,className:(0,l.default)($p.virtualListHeaderSort,h?.headerSort),style:g?.headerSort,onClick:()=>a(e.key),tabIndex:-1,children:[(0,f.jsx)(`span`,{className:$p.virtualListHeaderSortLabel,children:e.label}),(0,f.jsx)(u.FontAwesomeIcon,{className:(0,l.default)($p.virtualListHeaderSortIcon,o&&$p.virtualListHeaderSortIconActive,h?.sortIcon),style:g?.sortIcon,icon:o===`asc`?d.faSortUp:o===`desc`?d.faSortDown:d.faSort})]}):e.label,s&&(0,f.jsx)(`div`,{...s,className:(0,l.default)($p.virtualListHeaderResize,h?.resizeHandle),style:g?.resizeHandle})]},e.key)}),n.shouldShowToggle&&(0,f.jsx)(km,{station:v-1,nav:y,columns:t,cols:n,resize:r,labels:m,classNames:h,styles:g})]})}function km({station:e,nav:t,columns:n,cols:r,resize:i,labels:a,classNames:o,styles:s}){return(0,f.jsxs)(`div`,{className:$p.virtualListToggleWrapper,children:[(0,f.jsx)(rn,{isOpen:r.toggleOpen,onOpenChange:r.setToggleOpen,placement:wt.Bottom,align:Tt.End,constrainWidth:!1,classNames:{panel:$p.virtualListTogglePanel},content:(0,f.jsxs)(`div`,{className:(0,l.default)($p.virtualListTogglePopover,o?.togglePopover),style:s?.togglePopover,children:[n.filter(e=>!e.hideFromToggle).map(e=>(0,f.jsx)(Ti,{className:(0,l.default)($p.virtualListToggleItem,o?.toggleItem),style:s?.toggleItem,selected:r.effectiveVisible.has(e.key),onToggle:()=>r.handleToggleColumn(e.key),disabled:e.lockVisible,cursorDefault:!1,children:e.toggleLabel??e.label},e.key)),i.isFrozen&&(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($p.virtualListToggleReset,o?.toggleReset),style:s?.toggleReset,onClick:()=>{i.reset(),r.setToggleOpen(!1)},children:a.resetColumnWidths})]}),children:(0,f.jsx)(`button`,{...t.getStationProps(e),type:`button`,className:(0,l.default)($p.virtualListHeaderToggle,o?.headerToggle),style:s?.headerToggle,"aria-label":a.toggleColumns,onKeyDown:n=>t.handleNavigationKey(n,e),children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faGear,style:s?.headerToggle})})}),r.manuallyHiddenCount>0&&(0,f.jsx)(`span`,{className:(0,l.default)($p.virtualListColumnChip,o?.columnChip),style:s?.columnChip,"data-column-hidden-count":r.manuallyHiddenCount,"aria-label":a.columnsHidden(r.manuallyHiddenCount),children:r.manuallyHiddenCount})]})}function Am(e){return!(`nodeType`in e)}function jm(e){return e==null||typeof window>`u`?null:e===`window`?window:typeof e==`function`?e()??window:e}function Mm(e){return Am(e)?{top:0,height:e.innerHeight}:{top:e.getBoundingClientRect().top+e.clientTop,height:e.clientHeight}}function Nm(e,t){let n=e.clientWidth;if(!t){let t=e.clientHeight;return{rel:e.scrollTop,visibleHeight:t,viewportHeight:t,distanceToEnd:e.scrollHeight-e.scrollTop-t,width:n}}let r=e.getBoundingClientRect(),{top:i,height:a}=Mm(t),o=i+a;return{rel:i-r.top,visibleHeight:Math.max(0,Math.min(o,r.bottom)-Math.max(i,r.top)),viewportHeight:a,distanceToEnd:r.bottom-o,width:n}}function Pm(e,t){if(typeof e==`number`)return e;let n=e.trim();if(n===``)return 0;let r=Number(n);if(!Number.isNaN(r))return r;let i=/^(-?\d*\.?\d+)px$/.exec(n);if(i)return parseFloat(i[1]);if(typeof document>`u`||!t)return 0;let a=document.createElement(`div`);a.style.cssText=`position:absolute;visibility:hidden;height:${n};`,t.appendChild(a);let o=a.getBoundingClientRect().height;return t.removeChild(a),Number.isFinite(o)?o:0}var Fm=100,Im=20;function Lm({items:e,keys:t,getItemKey:n,estimatedRowHeight:r,rowGap:i,overscan:a,onLoadMore:o,loadMoreThreshold:s,isLoading:l,scrollParent:u}){let[d,f]=(0,c.useState)(0),[p,m]=(0,c.useState)(0),[h,g]=(0,c.useState)(0),[_,v]=(0,c.useState)(0),[y,b]=(0,c.useState)(()=>Pm(i,null)),[x,S]=(0,c.useState)(new Map),[C,w]=(0,c.useState)(!1),T=(0,c.useRef)(!1),E=(0,c.useRef)(null),D=(0,c.useRef)(null),O=(0,c.useRef)([]),k=(0,c.useRef)(null),A=(0,c.useRef)([]),j=u!=null,M=(0,c.useRef)(null),N=(0,c.useRef)(null),[P,F]=(0,c.useState)(null);(0,c.useLayoutEffect)(()=>{let e;if(u===`nearest`){let t=N.current;(!t||!Am(t)&&!t.isConnected)&&(N.current=E.current?xt(E.current)??window:null),e=N.current}else e=jm(u);M.current=e,F(t=>t===e?t:e)});let[I]=(0,c.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(e=>{S(t=>{let n=null;for(let r of e){let e=r.target,i=Number(e.dataset.index);if(Number.isNaN(i))continue;let a=A.current[i];if(a===void 0)continue;let o=r.borderBoxSize?.[0],s=o?Math.round(o.blockSize):e.offsetHeight;t.get(a)!==s&&(n||=new Map(t),n.set(a,s))}return n??t})}));(0,c.useEffect)(()=>()=>I?.disconnect(),[I]);let L=(0,c.useCallback)(e=>{let t=Math.max(0,e.rel);f(e=>e===t?e:t),m(t=>t===e.visibleHeight?t:e.visibleHeight),g(t=>t===e.viewportHeight?t:e.viewportHeight),v(t=>t===e.width?t:e.width)},[]),R=(0,c.useCallback)(()=>{let e=E.current;e&&L(Nm(e,M.current))},[L]),z=(0,c.useCallback)(()=>{let e=E.current;if(!e)return{top:0,height:0};let t=Nm(e,M.current);return{top:Math.max(0,t.rel),height:t.visibleHeight}},[]),B=(0,c.useCallback)(()=>{let e=E.current;if(!e)return null;let t=e.getBoundingClientRect(),n=M.current;if(!n)return{top:t.top,bottom:t.bottom,left:t.left,right:t.right};let{top:r,height:i}=Mm(n);return{top:Math.max(t.top,r),bottom:Math.min(t.bottom,r+i),left:t.left,right:t.right}},[]),V=(0,c.useCallback)(e=>{let t=E.current;if(!t)return;let n=M.current;n?Am(n)?n.scrollBy(0,e):n.scrollTop+=e:t.scrollTop+=e},[]);(0,c.useLayoutEffect)(()=>{let e=E.current;if(!e)return;R();let t=typeof ResizeObserver>`u`?null:new ResizeObserver(()=>R());return t?.observe(e),P?(t?.observe(Am(P)?document.documentElement:P),window.addEventListener(`resize`,R),()=>{t?.disconnect(),window.removeEventListener(`resize`,R)}):()=>t?.disconnect()},[P,R]);let H=(0,c.useRef)(o);(0,c.useLayoutEffect)(()=>{H.current=o});let U=(0,c.useCallback)(()=>{let e=H.current;e&&!T.current&&(T.current=!0,w(!0),e().finally(()=>{T.current=!1,w(!1)}))},[]),W=(0,c.useRef)(-1),G=(0,c.useCallback)(()=>{let e=E.current;if(!e)return;let t=Nm(e,M.current);k.current??=requestAnimationFrame(()=>{k.current=null,R()}),t.distanceToEnd<=s&&W.current!==A.current.length&&(W.current=A.current.length,U())},[R,s,U]);(0,c.useEffect)(()=>{let e=P??E.current;if(e)return e.addEventListener(`scroll`,G,{passive:!0}),()=>e.removeEventListener(`scroll`,G)},[P,G]),(0,c.useEffect)(()=>()=>{k.current!=null&&cancelAnimationFrame(k.current)},[]),(0,c.useLayoutEffect)(()=>{A.current=t}),(0,c.useLayoutEffect)(()=>{let e=Pm(i,E.current);b(t=>t===e?t:e)},[i,_,p]);let ee=(0,c.useMemo)(()=>{if(x.size===0)return r;let e=0;for(let t of x.values())e+=t;return e/x.size},[x,r]),{offsets:K,totalHeight:te}=(0,c.useMemo)(()=>em(t,x,ee,y),[t,x,ee,y]),q=(0,c.useRef)(``),ne=j?h:p;(0,c.useEffect)(()=>{if(!o||l||C||ne===0)return;let t=D.current?.offsetHeight??0;if(te>=ne-t)return;let n=`${e.length}:${ne}`;q.current!==n&&(q.current=n,U())},[o,l,C,e.length,te,ne,U]);let J=(0,c.useCallback)((e,t)=>{let n=E.current;if(!n)return;let r=M.current;if(!r){let r=Math.max(0,e);t&&typeof n.scrollTo==`function`?n.scrollTo({top:r,behavior:t}):n.scrollTop=r;return}let{rel:i}=Nm(n,r);if(Am(r)){r.scrollTo({top:Math.max(0,r.scrollY+e-i),behavior:t??`auto`});return}let a=Math.max(0,r.scrollTop+e-i);t&&typeof r.scrollTo==`function`?r.scrollTo({top:a,behavior:t}):r.scrollTop=a},[]);(0,c.useLayoutEffect)(()=>{let t=E.current,n=O.current;if(O.current=K,!t||n.length===0||ie.current)return;let r=z().top;if(r<=0)return;let i=tm(n,r,n.length-1);if(i>=e.length)return;let a=r-n[i],o=K[i]+a;Math.abs(o-r)>.5&&(J(o),f(o))},[K,e.length,z,J]);let re=(0,c.useCallback)((t,n)=>{let r=E.current;if(!r||e.length===0)return null;let i=Math.max(0,Math.min(t,e.length-1)),a=K[i]??0,o=(K[i+1]??a)-a,s=D.current?.offsetHeight??0,c=Math.max(0,Nm(r,M.current).viewportHeight-s),l=n?.align??`start`,u=a;return l===`center`?u-=(c-o)/2:l===`end`&&(u-=c-o),u},[e.length,K]),ie=(0,c.useRef)(null);(0,c.useLayoutEffect)(()=>{let t=ie.current,n=E.current;if(!t)return;let r=t.items===e&&n?re(t.index,t.options):null;if(r==null){ie.current=null;return}let i=Math.abs(r-t.lastTarget)<=1;if(i&&Math.abs(z().top-r)<=1||t.attempts>=Im){ie.current=null;return}i||(t.lastTarget=r,t.attempts+=1,J(r,t.options?.behavior))}),(0,c.useEffect)(()=>{let e=E.current;if(!e)return;let t=()=>{ie.current=null},n=P??e;return n.addEventListener(`wheel`,t,{passive:!0}),n.addEventListener(`touchstart`,t,{passive:!0}),e.addEventListener(`keydown`,t),()=>{n.removeEventListener(`wheel`,t),n.removeEventListener(`touchstart`,t),e.removeEventListener(`keydown`,t)}},[P]);let ae=(0,c.useMemo)(()=>{function t(t,n){let r=re(t,n);r!=null&&(ie.current={index:t,options:n,lastTarget:r,attempts:0,items:e},J(r,n?.behavior))}return{scrollToIndex:t,scrollToKey(r,i){let a=e.findIndex((e,t)=>(n?n(e,t):t)===r);a>=0&&t(a,i)},scrollToTop(e){ie.current=null,J(0,e?.behavior)},getScrollElement:()=>{let e=M.current;return e?Am(e)?null:e:E.current},remeasure:R}},[e,n,re,J,R]),{startIndex:oe,endIndex:se}=(0,c.useMemo)(()=>nm(K,d,p,a,e.length),[K,d,p,a,e.length]),ce=(0,c.useRef)(!1);return(0,c.useEffect)(()=>{ce.current||p===0||e.length<Fm||se-oe+1<e.length||(ce.current=!0,console.warn(`VirtualList: rendering all ${e.length} rows, so nothing is being virtualized. Its viewport is as tall as its content. Give the list a definite height, or pass scrollParent to have it ride a scrollport it does not own.`))},[p,e.length,oe,se]),{rootRef:E,headerRef:D,rowObserver:I,keysRef:A,offsets:K,totalHeight:te,containerHeight:p,viewportHeight:h,containerWidth:_,startIndex:oe,endIndex:se,showLoadMoreSpinner:C,isWindowed:j,getVisibleSlice:z,getVisibleRect:B,scrollBy:V,scrollApi:ae}}function Rm({items:e,getKey:t,multiSelect:n,selectedKeys:r,onSelectionChange:i}){let a=r!==void 0,[o,s]=(0,c.useState)(new Set),l=a?r:o;function u(e){a||s(e),i?.(e)}function d(e){let t=new Set(l);t.has(e)?t.delete(e):t.add(e),u(t)}function f(){let n=e.map((e,n)=>t(e,n));u(n.every(e=>l.has(e))?new Set:new Set(n))}let{allSelected:p,someSelected:m}=(0,c.useMemo)(()=>{if(!n||e.length===0)return{allSelected:!1,someSelected:!1};let r=e.every((e,n)=>l.has(t(e,n)));return{allSelected:r,someSelected:!r&&e.some((e,n)=>l.has(t(e,n)))}},[n,e,l,t]);return{effectiveSelectedKeys:l,handleRowSelect:d,handleSelectAll:f,allSelected:p,someSelected:m}}function zm({columns:e,items:t,multiSelect:n,visibleColumnKeys:r,onVisibleColumnsChange:i,persistColumnsKey:a,showColumnToggle:o,userWidths:s,isFrozen:l,rootRef:u,startIndex:d,endIndex:f,containerHeight:p,containerWidth:m,isLoading:h}){let g=r!==void 0,[_,v]=(0,c.useState)(!1),[y,b]=(0,c.useState)({}),[x,S]=(0,c.useState)(()=>{let t=gm(a);return new Set((e??[]).filter(e=>_m(e,t)).map(e=>e.key))}),C=(0,c.useRef)(new Set((e??[]).map(e=>e.key)));(0,c.useEffect)(()=>{if(g)return;let t=e??[],n=new Set(t.map(e=>e.key)),r=C.current,i=n.size===r.size;if(i){for(let e of n)if(!r.has(e)){i=!1;break}}if(i)return;C.current=n;let o=gm(a);S(e=>{let n=new Set;for(let i of t)r.has(i.key)?e.has(i.key)&&n.add(i.key):_m(i,o)&&n.add(i.key);return n})},[e,g,a]),(0,c.useEffect)(()=>{if(g||!a||typeof window>`u`)return;let t=e??[];if(t.length!==0&&x.size!==0)try{window.localStorage.setItem(hm+a,JSON.stringify({visible:[...x],known:t.map(e=>e.key),widths:s}))}catch{}},[x,e,g,a,s]);let w=g?new Set(r):x,T=(e??[]).filter(e=>e.lockVisible).map(e=>e.key),E=T.some(e=>!w.has(e))?new Set([...w,...T]):w,D=!!e?.length,O=D?e.filter(e=>E.has(e.key)):[],k=D?e.filter(e=>!e.defaultHidden&&!E.has(e.key)).length:0,A=D?`${n&&D?`40px `:``}${l?mm(O):om(O,y)}`:void 0,j=o!==!1&&D&&e.some(e=>!e.hideFromToggle),M={};if(l&&D){let e=O.map(e=>`var(${fm(e.key)}, 160px)`);n&&e.unshift(`40px`),j&&e.push(`32px`),M[`--vl-total`]=`calc(${e.join(` + `)})`}let N=O.filter(e=>e.width.type===`fit`),P=!l&&N.length>0,F=N.map(e=>e.key).join(`|`),[I,L]=(0,c.useState)({key:F,items:t});(I.key!==F||I.items!==t)&&(L({key:F,items:t}),Object.keys(y).length>0&&b({}));let R=(0,c.useCallback)(()=>{let e=u.current;if(!e)return;let t=new Map;e.querySelectorAll(`[data-fit-key]`).forEach(e=>{let n=e,r=n.getAttribute(`data-fit-key`);if(!r)return;let i=um(n);i>(t.get(r)??0)&&t.set(r,i)}),t.size!==0&&b(n=>{let r=!1,i={...n};for(let[a,o]of t){if(o<=0)continue;let t=Math.min(Math.ceil(o),e.clientWidth);t>(n[a]??0)&&(i[a]=t,r=!0)}return r?i:n})},[u]),[z]=(0,c.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(()=>R())),B=(0,c.useRef)(new Set);(0,c.useEffect)(()=>()=>{z?.disconnect(),B.current.clear()},[z]),(0,c.useLayoutEffect)(()=>{if(!P)return;let e=u.current;if(!e||(R(),!z))return;let t=new Set(e.querySelectorAll(`[data-fit-key]`)),n=B.current;for(let e of n)t.has(e)||(z.unobserve(e),n.delete(e));for(let e of t)n.has(e)||(z.observe(e),n.add(e))},[u,P,F,y,d,f,p,m,t,h,R,z]),(0,c.useEffect)(()=>{if(!P)return;let e=0,t=requestAnimationFrame(()=>{R(),e=requestAnimationFrame(()=>R())});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}},[P,F,t,h,R]);let V=(0,c.useCallback)(()=>b({}),[]);function H(t){if(e?.find(e=>e.key===t)?.lockVisible)return;let n=new Set(E);if(n.has(t)){if(n.size<=1)return;n.delete(t)}else n.add(t);let r=[...n];g||S(n),i?.(r)}return{hasColumns:D,visibleColumns:O,columnTemplate:A,widthVars:M,shouldShowToggle:j,effectiveVisible:E,manuallyHiddenCount:k,toggleOpen:_,setToggleOpen:v,handleToggleColumn:H,recalculateColumns:V}}function Bm({reorderable:e,treeReorder:t,onReorder:n,onTreeDrop:r,longPressDelay:i,dragHandle:a,treeIndentPx:o,keys:s,depths:l,isGroupAt:u,rootRef:d,keysRef:f,getVisibleRect:p,scrollBy:m}){let h=(0,c.useRef)(null),[g,_]=(0,c.useState)(null),[v,y]=(0,c.useState)(null),b=(0,c.useRef)(null),x=(0,c.useRef)(n),S=(0,c.useRef)(r),C=(0,c.useRef)(t),w=(0,c.useRef)(l),T=(0,c.useRef)(u),E=(0,c.useRef)(!0),D=(0,c.useRef)(null),[O,k]=(0,c.useState)(null),A=(0,c.useRef)(null),j=(0,c.useRef)(!1),M=(0,c.useRef)(null),N=(0,c.useRef)(0),P=(0,c.useRef)(0),F=(0,c.useRef)(null),I=(0,c.useRef)(!1),L=(0,c.useRef)(null),R=(0,c.useRef)(0),z=(0,c.useRef)(0),B=(0,c.useRef)(0),[V]=(0,c.useState)(()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(pointer: coarse)`).matches);(0,c.useLayoutEffect)(()=>{x.current=n,S.current=r,C.current=t,w.current=l,b.current=v,T.current=u});function H(e){V||D.current!==e&&(D.current=e,k(e))}function U(e,t){t.buttons===0&&H(t.target.closest(`[data-drag-handle]`)?e:null)}function W(e){e.buttons===0&&H(null)}function G(e,t){if(t.button!==0)return;let n=!!t.target.closest(`[data-drag-handle]`);E.current=n,n&&H(e)}function ee(e,n){if(a&&!E.current){n.preventDefault();return}h.current=e,_(e),t&&y(null)}function K(e,t,n){let r=h.current;if(r==null)return null;let i=s.indexOf(r);if(i!==-1&&e>=i&&e<=am(i,l))return null;let a=im(t,n.top,n.height,u(e));return{key:s[e],position:a}}function te(e,t){t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=K(e,t.clientY,n);y(e=>e?.key===r?.key&&e?.position===r?.position?e:r)}function q(){let e=h.current,t=b.current;e!=null&&t&&t.key!==e&&r?.(e,t)}function ne(e){e.preventDefault(),q(),y(null),h.current=null,_(null),H(null)}function J(){y(null),h.current=null,_(null),H(null)}function re(e,t){t.preventDefault();let r=h.current;if(r==null)return;let i=s.indexOf(r),a=t.currentTarget.getBoundingClientRect(),o=rm(i,e,t.clientY,a.top,a.height);o!=null&&n?.(i,o)}function ie(){h.current=null,_(null),H(null)}let ae=(0,c.useCallback)(e=>{let t=h.current,n=d.current;if(t==null||!n)return;let r=L.current?P.current-R.current+B.current/2:P.current,i=document.elementFromPoint(e,r),a=i&&n.contains(i)?i.closest(`[data-index]`):null;if(!a)return;let o=Number(a.dataset.index);if(Number.isNaN(o))return;let s=f.current.indexOf(t),c=a.getBoundingClientRect();if(C.current){let e=f.current,t=w.current;if(s!==-1&&o>=s&&o<=am(s,t)){y(null);return}let n=im(r,c.top,c.height,T.current(o)),i={key:e[o],position:n};y(e=>e?.key===i.key&&e?.position===i.position?e:i);return}let l=rm(s,o,r,c.top,c.height);l!=null&&x.current?.(s,l)},[d,f]),oe=(0,c.useCallback)(()=>{let e=L.current;e&&(e.style.transform=`translate(${z.current}px, ${P.current-R.current}px)`)},[]),se=(0,c.useCallback)(()=>{let e=j.current?p():null;if(!e){F.current=null;return}let t=N.current,n=P.current,r=0;t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom&&(n<e.top+48?r=-Math.min(18,Math.ceil((e.top+48-n)/3)):n>e.bottom-48&&(r=Math.min(18,Math.ceil((n-(e.bottom-48))/3)))),r!==0&&(m(r),ae(t)),F.current=requestAnimationFrame(se)},[ae,p,m]),ce=(0,c.useCallback)(()=>{if(A.current!=null&&(clearTimeout(A.current),A.current=null),window.removeEventListener(`touchmove`,le),window.removeEventListener(`touchend`,ce),window.removeEventListener(`touchcancel`,ce),F.current!=null&&(cancelAnimationFrame(F.current),F.current=null),L.current&&=(L.current.remove(),null),document.body.style.touchAction=``,document.body.style.overscrollBehavior=``,j.current&&(I.current=!0,setTimeout(()=>{I.current=!1},350),C.current)){let e=h.current,t=b.current;e!=null&&t&&t.key!==e&&S.current?.(e,t)}y(null),j.current=!1,M.current=null,h.current=null,_(null)},[]),le=(0,c.useCallback)(e=>{let t=e.touches[0];if(t){if(N.current=t.clientX,P.current=t.clientY,!j.current){let e=M.current;e!=null&&Math.abs(t.clientY-e)>10&&A.current!=null&&(clearTimeout(A.current),A.current=null);return}e.cancelable&&e.preventDefault(),oe(),ae(t.clientX)}},[ae,oe]);function ue(n,r){if(!e&&!t||a&&!r.target.closest(`[data-drag-handle]`)||A.current!=null||j.current)return;let o=r.touches[0];o&&(M.current=o.clientY,N.current=o.clientX,P.current=o.clientY,window.addEventListener(`touchmove`,le,{passive:!1}),window.addEventListener(`touchend`,ce),window.addEventListener(`touchcancel`,ce),A.current=window.setTimeout(()=>{A.current=null,j.current=!0,h.current=n,_(n),navigator.vibrate?.(10),document.body.style.touchAction=`none`,document.body.style.overscrollBehavior=`none`,Y(n),F.current??=requestAnimationFrame(se)},i))}function Y(e){let t=d.current;if(!t)return;let n=f.current.indexOf(e),r=t.querySelector(`[data-index="${n}"]`);if(!r)return;let i=r.getBoundingClientRect();R.current=P.current-i.top,z.current=i.left,B.current=i.height;let a=r.cloneNode(!0);a.removeAttribute(`data-index`),a.setAttribute(`data-drag-clone`,`true`),a.setAttribute(`aria-hidden`,`true`),a.classList.add($p.virtualListDragClone),Object.assign(a.style,{position:`fixed`,left:`0`,top:`0`,width:`${i.width}px`,height:`${i.height}px`,margin:`0`,opacity:`1`,pointerEvents:`none`,zIndex:`3`,background:`var(--background)`,boxShadow:`var(--card-shadow)`,borderRadius:`var(--default-border-radius)`}),t.appendChild(a),L.current=a,oe()}(0,c.useEffect)(()=>ce,[ce]);let de=e||t,fe=de&&!V;function pe(n,r){let i=t&&v?.key===r?v.position:void 0;return{reorderable:de&&!a,mouseDragEnabled:fe,draggable:fe&&(!a||r===O)||void 0,isDragging:de&&r===g,onMouseDown:de&&a?e=>G(r,e):void 0,onMouseOver:de&&a?e=>U(r,e):void 0,onMouseLeave:de&&a?W:void 0,onDragStart:de?e=>ee(r,e):void 0,onDragOver:t?e=>te(n,e):e?e=>re(n,e):void 0,onDragEnd:t?J:e?ie:void 0,onDrop:t?ne:void 0,onTouchStart:de?e=>ue(r,e):void 0,dropPosition:i,dropIndentPx:i?(l[n]??0)*o:void 0}}function me(){return I.current?(I.current=!1,!0):!1}return{draggingKey:g,dragEnabled:de,getRowDragProps:pe,consumeSuppressedClick:me}}function Vm({items:e,columns:t,sort:n,defaultSort:r=null,onSortChange:i}){let a=n!==void 0,[o,s]=(0,c.useState)(r),l=a?n:o,u=(0,c.useMemo)(()=>wm(e,l,t),[e,l,t]);function d(e){let t=Cm(l,e);a||s(t),i?.(t)}return{rows:u,effectiveSort:l,isSorted:u!==e,handleHeaderSort:d}}function Hm(e){return Math.max(1,e?.minWidth??48)}function Um({columns:e,visibleColumnsRef:t,resizableColumns:n,columnWidths:r,onColumnWidthsChange:i,persistColumnsKey:a,rootRef:o}){let s=r!==void 0,[l,u]=(0,c.useState)(()=>gm(a)?.widths??{}),[d,f]=(0,c.useState)(!1),p=s?r:l,m=(0,c.useRef)(p);m.current=p;let h=(0,c.useCallback)(e=>{s||u(e),i?.(e)},[s,i]),g=(0,c.useCallback)(()=>{let e=o.current,n={...m.current};for(let r of t.current){if(n[r.key]!=null)continue;let t=e?.querySelector(`[aria-rowindex="1"] ${dm(r.key)}`),i=t?Math.round(t.getBoundingClientRect().width):0;n[r.key]=i>0?i:pm(r)}return n},[o,t]);(0,c.useLayoutEffect)(()=>{let e=o.current;if(e)for(let[t,n]of Object.entries(p))e.style.setProperty(fm(t),`${n}px`)},[p,o]);let _=(0,c.useCallback)((e,t)=>{o.current?.style.setProperty(fm(e),`${t}px`)},[o]),v=(0,c.useCallback)(()=>{s&&requestAnimationFrame(()=>{for(let[e,t]of Object.entries(m.current))_(e,t)})},[_,s]),y=(0,c.useCallback)((t,n)=>{let r=g(),i=Hm(e?.find(e=>e.key===t)),a={...r,[t]:Math.max(i,Math.round(n(r[t])))};_(t,a[t]),h(a),v()},[_,e,h,g,v]),b=(0,c.useCallback)((t,n)=>{if(t.button!==0)return;t.preventDefault(),t.stopPropagation();let r=t.currentTarget,i=g(),a=i[n],o=t.clientX,s=Hm(e?.find(e=>e.key===n)),c=a,l=0,u=()=>{l=0,_(n,c)};function d(e){if(l&&cancelAnimationFrame(l),r.releasePointerCapture?.(t.pointerId),r.removeEventListener(`pointermove`,p),r.removeEventListener(`pointerup`,y),r.removeEventListener(`pointercancel`,b),r.removeEventListener(`lostpointercapture`,b),window.removeEventListener(`keydown`,x,!0),document.body.style.cursor=``,document.body.style.userSelect=``,f(!1),e==null){_(n,a);return}e!==a&&h({...i,[n]:e}),v()}function p(e){c=Math.max(s,Math.round(a+e.clientX-o)),l||=requestAnimationFrame(u)}function y(){d(c)}function b(){d(null)}function x(e){e.key===`Escape`&&(e.preventDefault(),d(null))}r.setPointerCapture?.(t.pointerId),r.addEventListener(`pointermove`,p),r.addEventListener(`pointerup`,y),r.addEventListener(`pointercancel`,b),r.addEventListener(`lostpointercapture`,b),window.addEventListener(`keydown`,x,!0),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,f(!0),Object.keys(m.current).length===0&&h(i)},[_,e,h,g,v]),x=(0,c.useCallback)(e=>{let t=o.current;if(!t)return 0;let n=fm(e),r=t.style.getPropertyValue(n),i=t.style.getPropertyValue(`--vl-total`);t.style.setProperty(n,`max-content`),t.style.removeProperty(`--vl-total`);let a=0;return t.querySelectorAll(dm(e)).forEach(e=>{let t=Math.ceil(e.getBoundingClientRect().width);t>a&&(a=t)}),t.style.setProperty(n,r),i&&t.style.setProperty(`--vl-total`,i),Math.min(a,t.clientWidth)},[o]),S=(0,c.useCallback)(e=>{let t=()=>{let t=x(e);t>0&&y(e,()=>t)};Object.keys(m.current).length>0?t():(h(g()),requestAnimationFrame(t))},[h,g,x,y]),C=(0,c.useCallback)(()=>{let e=o.current;if(e)for(let t of Object.keys(m.current))e.style.removeProperty(fm(t));h({})},[h,o]),w=(0,c.useCallback)(e=>n&&e.resizable!==!1,[n]),T=(0,c.useCallback)((e,t)=>y(e,e=>e+t),[y]),E=(0,c.useCallback)(t=>y(t,()=>Hm(e?.find(e=>e.key===t))),[e,y]),D=(0,c.useCallback)(e=>w(e)?{"aria-hidden":!0,onPointerDown:t=>b(t,e.key),onDoubleClick:t=>{t.stopPropagation(),S(e.key)},onClick:e=>e.stopPropagation()}:null,[S,b,w]);return{widths:p,isFrozen:Object.keys(p).length>0,isResizing:d,reset:C,isResizable:w,resizeBy:T,resizeToMin:E,autoFit:S,getHandleProps:D}}function Wm({enabled:e,tabAcrossRows:t,rowCount:n,offsets:r,rootRef:i,headerRef:a,getVisibleSlice:o,viewportHeight:s,scrollToIndex:l,initialIndex:u,multiSelect:d,onActivate:f,onToggleSelect:p}){let[m,h]=(0,c.useState)(u),[g,_]=(0,c.useState)(-1),v=(0,c.useRef)(r);v.current=r;let y=e&&n>0?Math.min(Math.max(m,0),n-1):-1;y>=0&&y!==m&&h(y);let b=y>=0;function x(e){let t=a.current?.offsetHeight??0,n=v.current[e]??0,r=v.current[e+1]??n,{top:i,height:s}=o();n<i+t?l(e,{align:`start`}):r>i+s&&l(e,{align:`end`})}function S(e){let t=Math.max(0,Math.min(e,n-1));h(t),x(t)}function C(e){let t=Math.max(0,s-(a.current?.offsetHeight??0)),r=tm(v.current,(v.current[e]??0)+t,n);return Math.max(1,r-e)}function w(e){return i.current?.querySelector(`[data-index="${e}"]`)??null}function T(e){let t=w(e)?.querySelector(lm);return t?(_(e),t.focus(),!0):!1}let E=(0,c.useRef)(null),D=(0,c.useRef)(!1);(0,c.useLayoutEffect)(()=>{let e=E.current;if(!e)return;E.current=null;let t=w(e.index)?.querySelectorAll(lm);if(t?.length){(e.edge===`first`?t[0]:t[t.length-1]).focus();return}let r=e.index+(e.edge===`first`?1:-1);if(r>=0&&r<n){E.current={index:r,edge:e.edge},_(r),x(r);return}_(-1),D.current=b&&e.edge===`first`,b&&i.current?.focus()});function O(e){let t=e?.closest?.(`[data-index]`),n=Number(t?.dataset.index);return Number.isFinite(n)?n:-1}function k(e){if(e.target===e.currentTarget)return;let t=O(e.target);t<0||(_(t),h(t))}function A(e){e.currentTarget.contains(e.relatedTarget)||(D.current=!1),O(e.relatedTarget)!==g&&_(-1)}function j(e){if(e.key!==`Escape`||e.defaultPrevented||!b)return;let t=O(e.target);t>=0&&h(t),_(-1),i.current?.focus(),e.preventDefault()}function M(e){if(!t||e.key!==`Tab`||e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey)return;let r=O(e.target);if(r<0)return;let i=w(r)?.querySelectorAll(sm);if(!i?.length)return;let a=Array.prototype.indexOf.call(i,e.target);if(a<0)return;let o=e.shiftKey;if(o?a>0:a<i.length-1)return;let s=o?r-1:r+1;s<0||s>=n||(e.preventDefault(),_(s),x(s),E.current={index:s,edge:o?`last`:`first`})}function N(e){if(e.target!==e.currentTarget){M(e),j(e);return}if(!b||e.defaultPrevented)return;let r=D.current;switch(D.current=!1,e.key){case`ArrowDown`:S(y+1);break;case`ArrowUp`:S(y-1);break;case`Home`:S(0);break;case`End`:S(n-1);break;case`PageDown`:S(y+C(y));break;case`PageUp`:S(y-C(Math.max(0,y-1)));break;case`Enter`:if(f)f(y);else if(!T(y))return;break;case`F2`:if(!T(y))return;break;case`Tab`:if(!t||e.shiftKey||r||!T(y))return;break;case` `:if(!d)return;p(y);break;default:return}e.preventDefault()}if(!b&&!t)return{activeIndex:y,enteredIndex:-1,setActiveIndex:h,containerProps:{}};let P={onKeyDown:N,onFocus:k,onBlur:A};return b&&(P.tabIndex=0),{activeIndex:y,enteredIndex:g,setActiveIndex:h,containerProps:P}}var Gm={selectRow:`Select row`,selectAllRows:`Select all rows`,toggleColumns:`Toggle column visibility`,columnsHidden:e=>`${e} columns hidden`,resetColumnWidths:`Reset column widths`};function Km(e,t){return!e||!t?e??t:n=>{e(n),t(n)}}function qm(e){let{ref:t,items:n,renderRow:r,ariaRoles:i,columns:a,height:o=`100%`,estimatedRowHeight:s=40,overscan:u=3,rowGap:d=0,rowPadding:p,selectedKey:m,getItemKey:h,onRowClick:g,keyboardNavigation:_=!0,tabAcrossRows:v=!1,scrollParent:y,visibleColumnKeys:b,onVisibleColumnsChange:x,persistColumnsKey:S,resizableColumns:C=!1,columnWidths:w,onColumnWidthsChange:T,labels:E,sort:D,defaultSort:k,onSortChange:A,showColumnToggle:j,onLoadMore:M,loadMoreThreshold:N=100,isLoading:P=!1,multiSelect:F=!1,selectedKeys:I,onSelectionChange:L,reorderable:z=!1,onReorder:B,longPressDelay:V=400,treeReorder:H=!1,getItemDepth:U,isGroup:W,onTreeDrop:G,treeIndentPx:ee=24,dragHandle:K=!1,showDivider:te=!0,rowHover:q=!0,className:ne,style:J,classNames:re,styles:ie,...ae}=e,oe=e.scrollParent!=null&&e.height!==void 0,se=(0,c.useRef)(!1);(0,c.useEffect)(()=>{oe&&!se.current&&(se.current=!0,console.warn("VirtualList: `height` is ignored alongside `scrollParent`, which leaves the list no viewport to size."))},[oe]);let ce=O(`VirtualList`,E,Gm),{rows:le,effectiveSort:ue,isSorted:Y,handleHeaderSort:de}=Vm({items:n,columns:a,sort:D,defaultSort:k,onSortChange:A}),fe=(0,c.useCallback)((e,t)=>h?h(e,t):t,[h]),pe=(0,c.useMemo)(()=>le.map((e,t)=>fe(e,t)),[le,fe]),me=(0,c.useMemo)(()=>U?le.map((e,t)=>U(e,t)):[],[le,U]),X=(0,c.useCallback)(e=>W?W(le[e],e):!1,[W,le]),Z=Lm({items:le,keys:pe,getItemKey:h,estimatedRowHeight:s,rowGap:d,overscan:u,onLoadMore:M,loadMoreThreshold:N,isLoading:P,scrollParent:y}),{rootRef:he,headerRef:ge,rowObserver:_e,keysRef:ve,offsets:ye,totalHeight:be,startIndex:xe,endIndex:Se}=Z,Ce=(0,c.useRef)([]),we=Um({columns:a,visibleColumnsRef:Ce,resizableColumns:C,columnWidths:w,onColumnWidthsChange:T,persistColumnsKey:S,rootRef:he}),Te=Rm({items:le,getKey:fe,multiSelect:F,selectedKeys:I,onSelectionChange:L}),{effectiveSelectedKeys:Ee}=Te,De=zm({columns:a,items:le,multiSelect:F,visibleColumnKeys:b,onVisibleColumnsChange:x,persistColumnsKey:S,showColumnToggle:j,userWidths:we.widths,isFrozen:we.isFrozen,rootRef:he,startIndex:xe,endIndex:Se,containerHeight:Z.containerHeight,containerWidth:Z.containerWidth,isLoading:P}),{hasColumns:Oe,visibleColumns:ke,columnTemplate:Ae,widthVars:je,shouldShowToggle:Me,recalculateColumns:Ne}=De;Ce.current=ke,(0,c.useImperativeHandle)(t,()=>({...Z.scrollApi,recalculateColumns:Ne,resetColumnWidths:we.reset}),[Z.scrollApi,Ne,we.reset]);let Pe=Y&&(z||H),Q=(0,c.useRef)(!1);(0,c.useEffect)(()=>{Pe&&!Q.current&&(Q.current=!0,console.warn(`VirtualList: row reordering is disabled while the list is sorted. Clear the sort to drag rows.`))},[Pe]);let Fe=Bm({reorderable:z&&!Y,treeReorder:H&&!Y,onReorder:B,onTreeDrop:G,longPressDelay:V,dragHandle:K,treeIndentPx:ee,keys:pe,depths:me,isGroupAt:X,rootRef:he,keysRef:ve,getVisibleRect:Z.getVisibleRect,scrollBy:Z.scrollBy}),Ie=(0,c.useId)(),Le=e=>`${Ie}-row-${e}`,Re=Wm({enabled:_,tabAcrossRows:v,rowCount:le.length,offsets:ye,rootRef:he,headerRef:ge,getVisibleSlice:Z.getVisibleSlice,viewportHeight:Z.viewportHeight,scrollToIndex:Z.scrollApi.scrollToIndex,initialIndex:m==null?0:Math.max(0,pe.indexOf(m)),multiSelect:F,onActivate:g&&(e=>g(le[e],e)),onToggleSelect:e=>Te.handleRowSelect(pe[e])}),ze=typeof p==`number`?`${p}px`:p,Be=e=>{let t=le[e],n=fe(t,e),a=m!=null&&n===m||Ee.has(n),o=Fe.getRowDragProps(e,n);return(0,f.jsx)(Tm,{id:Le(e),index:e,top:ye[e],padding:ze,columnTemplate:Ae,isSelected:a,isActive:e===Re.activeIndex,manageTabStops:_,isEntered:e===Re.enteredIndex,activeClassName:re?.activeRow,activeStyle:ie?.activeRow,showDivider:te,hover:q,onClick:()=>{Fe.consumeSuppressedClick()||(Re.setActiveIndex(e),g?.(t,e))},observer:_e,ariaRowIndex:Oe?e+2:void 0,ariaPosInSet:Oe?void 0:e+1,ariaSetSize:Oe?void 0:le.length,rowRole:i?.row??(Oe?`row`:`listitem`),reserveToggleGutter:Me,...o,dropIndicatorClassName:re?.dropIndicator,dropIndicatorStyle:ie?.dropIndicator,rowClassName:re?.row,rowStyle:ie?.row,children:Oe?(0,f.jsxs)(f.Fragment,{children:[F&&(0,f.jsx)(`div`,{className:(0,l.default)($p.virtualListSelectCell,re?.selectCell),style:ie?.selectCell,role:`gridcell`,onClick:e=>e.stopPropagation(),children:(0,f.jsx)(Ti,{selected:Ee.has(n),onToggle:()=>Te.handleRowSelect(n),"aria-label":ce.selectRow,tabIndex:-1})}),ke.map(n=>(0,f.jsx)(`div`,{className:(0,l.default)($p.virtualListCell,re?.cell),style:ie?.cell,role:`gridcell`,"data-col-key":n.key,"data-fit-key":n.width.type===`fit`?n.key:void 0,children:n.renderCell(t,e)},n.key))]}):r?.(t,e)},n)},Ve=[];for(let e=xe;e<=Se;e++)Ve.push(Be(e));let He=Fe.draggingKey==null?-1:pe.indexOf(Fe.draggingKey);He>=0&&(He<xe||He>Se)&&Ve.push(Be(He)),Re.enteredIndex>=0&&(Re.enteredIndex<xe||Re.enteredIndex>Se)&&Ve.push(Be(Re.enteredIndex));let Ue={...Re.containerProps,onKeyDown:Km(ae.onKeyDown,Re.containerProps.onKeyDown),onFocus:Km(ae.onFocus,Re.containerProps.onFocus),onBlur:Km(ae.onBlur,Re.containerProps.onBlur)};return(0,f.jsxs)(`div`,{...ae,...Ue,ref:he,className:(0,l.default)($p.virtualList,Z.isWindowed&&$p.virtualListWindowed,Fe.draggingKey!=null&&$p.virtualListReordering,we.isResizing&&$p.virtualListResizing,ne,re?.root),style:{...Z.isWindowed?null:{height:o},...je,...J,...ie?.root},role:i?.container??(Oe?`grid`:`list`),"aria-rowcount":Oe?le.length+1:void 0,"aria-activedescendant":Re.activeIndex>=0&&(i?.container??(Oe?`grid`:`list`))!==`list`?Le(Re.activeIndex):void 0,children:[Oe&&(0,f.jsx)(Om,{headerRef:ge,columns:a,cols:De,resize:we,sort:ue,onSort:de,multiSelect:F,allSelected:Te.allSelected,someSelected:Te.someSelected,onSelectAll:Te.handleSelectAll,labels:ce,classNames:re,styles:ie}),P?(0,f.jsx)(`div`,{className:$p.virtualListLoadingFull,children:(0,f.jsx)(R,{className:$p.virtualListSpinner})}):(0,f.jsx)(`div`,{className:(0,l.default)($p.virtualListBody,re?.body),style:{height:be,...ie?.body},children:Ve}),Z.showLoadMoreSpinner&&(0,f.jsx)(`div`,{className:(0,l.default)($p.virtualListLoadingIndicator,re?.loadingIndicator),style:ie?.loadingIndicator,children:(0,f.jsx)(R,{className:$p.virtualListSpinner})})]})}function Jm(e,t,n=0,r=null){return e.flatMap((i,a)=>{let o=i.children!==void 0,s=o&&t.includes(i.key),c={node:i,level:n,parentKey:r,isBranch:o,isExpanded:s,setSize:e.length,posInSet:a+1};return!s||!i.children?.length?[c]:[c,...Jm(i.children,t,n+1,i.key)]})}var Ym={tree:`tree_bHT4K`,"tree-disabled":`tree-disabled_bIFfs`,treeDisabled:`tree-disabled_bIFfs`,"tree-node":`tree-node_XUWMs`,treeNode:`tree-node_XUWMs`,"tree-node-selected":`tree-node-selected_j05ku`,treeNodeSelected:`tree-node-selected_j05ku`,"tree-node-disabled":`tree-node-disabled_FMox6`,treeNodeDisabled:`tree-node-disabled_FMox6`,"tree-toggle":`tree-toggle_hmqtx`,treeToggle:`tree-toggle_hmqtx`,"tree-toggle-open":`tree-toggle-open_gTfYS`,treeToggleOpen:`tree-toggle-open_gTfYS`,"tree-toggle-hidden":`tree-toggle-hidden_nYrlV`,treeToggleHidden:`tree-toggle-hidden_nYrlV`,"tree-icon":`tree-icon_0dxsy`,treeIcon:`tree-icon_0dxsy`,"tree-label":`tree-label_BOShA`,treeLabel:`tree-label_BOShA`,"tree-empty":`tree-empty_Eb3vv`,treeEmpty:`tree-empty_Eb3vv`},Xm=[],Zm={empty:`Nothing here`};function Qm(e){let{nodes:t,expandedKeys:n,defaultExpandedKeys:r=Xm,onExpandedChange:i=()=>{},selectedKey:a,defaultSelectedKey:o,onSelect:s=()=>{},expandOnSelect:u=!0,indent:p=20,toggleIcon:m=d.faChevronRight,height:h,estimatedRowHeight:g=32,labels:_,disabled:v=!1,"aria-label":y=`Tree`,className:b,style:x,classNames:S,styles:C,...w}=D(`Tree`,e),T=O(`Tree`,_,Zm),E=(0,c.useRef)(new Map),k=(0,c.useRef)(null),A=(0,c.useRef)(null),j=h!==void 0,M=n!==void 0,[N,P]=(0,c.useState)(r),F=M?n:N,I=a!==void 0,[L,R]=(0,c.useState)(o??null),z=I?a:L,B=Jm(t,F),V=Math.max(0,B.findIndex(e=>e.node.key===z)),H=B[V]?.node.key;function U(e){M||P(e),i(e)}function W(e){U(F.includes(e)?F.filter(t=>t!==e):[...F,e])}function G(e){v||e.node.disabled||(I||R(e.node.key),s(e.node.key,e.node),u&&e.isBranch&&W(e.node.key))}function ee(e){let t=B[e]?.node.key;if(t===void 0)return;let n=E.current.get(t);if(n){n.focus();return}A.current=t,k.current?.scrollToIndex(e,{align:`center`})}(0,c.useEffect)(()=>{let e=A.current;if(e===null)return;let t=E.current.get(e);t&&(t.focus(),A.current=null)});function te(e,t,n){if(!v)switch(e.key){case`ArrowDown`:e.preventDefault(),ee(Math.min(n+1,B.length-1));break;case`ArrowUp`:e.preventDefault(),ee(Math.max(n-1,0));break;case`ArrowRight`:if(e.preventDefault(),!t.isBranch)break;t.isExpanded?ee(n+1):W(t.node.key);break;case`ArrowLeft`:{if(e.preventDefault(),t.isBranch&&t.isExpanded){W(t.node.key);break}let n=B.findIndex(e=>e.node.key===t.parentKey);n>=0&&ee(n);break}case`Home`:e.preventDefault(),ee(0);break;case`End`:e.preventDefault(),ee(B.length-1);break;case`Enter`:case` `:e.preventDefault(),G(t)}}function q(e,t){let{node:n,level:r,isBranch:i,isExpanded:a}=e,o=n.key===z,s=v||n.disabled;return(0,f.jsxs)(`div`,{ref:e=>{e?E.current.set(n.key,e):E.current.delete(n.key)},role:`treeitem`,"aria-level":r+1,"aria-setsize":e.setSize,"aria-posinset":e.posInSet,"aria-expanded":i?a:void 0,"aria-selected":o,"aria-disabled":s||void 0,tabIndex:n.key===H&&!s?0:-1,className:(0,l.default)(Ym.treeNode,o&&Ym.treeNodeSelected,s&&Ym.treeNodeDisabled,S?.node),style:{paddingLeft:r*p,...C?.node},onClick:()=>G(e),onKeyDown:n=>te(n,e,t),children:[(0,f.jsx)(`span`,{className:(0,l.default)(Ym.treeToggle,a&&Ym.treeToggleOpen,!i&&Ym.treeToggleHidden,S?.toggle),style:C?.toggle,"aria-hidden":`true`,onClick:e=>{e.stopPropagation(),!s&&i&&W(n.key)},children:i&&K(m)}),n.icon&&K(n.icon,{className:(0,l.default)(Ym.treeIcon,S?.icon),style:C?.icon}),(0,f.jsx)(`span`,{className:(0,l.default)(Ym.treeLabel,S?.label),style:C?.label,children:n.label})]},n.key)}return(0,f.jsx)(`div`,{...w,role:`tree`,"aria-label":y,"aria-disabled":v||void 0,tabIndex:j&&!v?0:void 0,onFocus:e=>{e.target===e.currentTarget&&ee(V)},className:(0,l.default)(Ym.tree,v&&Ym.treeDisabled,S?.root,b),style:{...x,...C?.root},children:B.length===0?(0,f.jsx)(`div`,{className:(0,l.default)(Ym.treeEmpty,S?.empty),style:C?.empty,children:T.empty}):j?(0,f.jsx)(qm,{ref:k,items:B,height:h,estimatedRowHeight:g,getItemKey:e=>e.node.key,getItemDepth:e=>e.level,ariaRoles:{container:`none`,row:`none`},keyboardNavigation:!1,renderRow:q}):B.map(q)})}var $m=function(e){return e.Sunny=`sunny`,e.ClearNight=`clearNight`,e.Cloudy=`cloudy`,e.PartlyCloudy=`partlyCloudy`,e.PartlyCloudyNight=`partlyCloudyNight`,e.RainyLight=`rainyLight`,e.Rainy=`rainy`,e.RainyHeavy=`rainyHeavy`,e.Snowy=`snowy`,e.Hail=`hail`,e.Foggy=`foggy`,e.Thunderstorm=`thunderstorm`,e}({}),eh={weatherIcon:`weatherIcon_FrcJF`,"weatherIcon-behind":`weatherIcon-behind_e2VOz`,weatherIconBehind:`weatherIcon-behind_e2VOz`,"weatherIcon-cloudBehind":`weatherIcon-cloudBehind_MZlmZ`,weatherIconCloudBehind:`weatherIcon-cloudBehind_MZlmZ`,"weatherIcon-cloud":`weatherIcon-cloud_KW-i7`,weatherIconCloud:`weatherIcon-cloud_KW-i7`,weatherIconCloudDrift:`weatherIconCloudDrift_0thIg`,"weatherIcon-cloudDelayed":`weatherIcon-cloudDelayed_bI1iH`,weatherIconCloudDelayed:`weatherIcon-cloudDelayed_bI1iH`,"weatherIcon-sunRays":`weatherIcon-sunRays_PBW93`,weatherIconSunRays:`weatherIcon-sunRays_PBW93`,weatherIconRotate:`weatherIconRotate_Hp9YK`,"weatherIcon-sunRay":`weatherIcon-sunRay_ODCJR`,weatherIconSunRay:`weatherIcon-sunRay_ODCJR`,weatherIconRayPulse:`weatherIconRayPulse_57eG4`,"weatherIcon-sunCore":`weatherIcon-sunCore_Ucxlh`,weatherIconSunCore:`weatherIcon-sunCore_Ucxlh`,"weatherIcon-moonCore":`weatherIcon-moonCore_USwOg`,weatherIconMoonCore:`weatherIcon-moonCore_USwOg`,weatherIconGlow:`weatherIconGlow_W2Qxf`,"weatherIcon-star":`weatherIcon-star_3CMD1`,weatherIconStar:`weatherIcon-star_3CMD1`,weatherIconTwinkle:`weatherIconTwinkle_8DkMV`,"weatherIcon-rain":`weatherIcon-rain_A9qFe`,weatherIconRain:`weatherIcon-rain_A9qFe`,"weatherIcon-drop":`weatherIcon-drop_SdkW9`,weatherIconDrop:`weatherIcon-drop_SdkW9`,weatherIconFall:`weatherIconFall_NlqDE`,"weatherIcon-splash":`weatherIcon-splash_DF4Wc`,weatherIconSplash:`weatherIcon-splash_DF4Wc`,weatherIconRing:`weatherIconRing_kr1SP`,"weatherIcon-snow":`weatherIcon-snow_95z-c`,weatherIconSnow:`weatherIcon-snow_95z-c`,"weatherIcon-flake":`weatherIcon-flake_LGzkw`,weatherIconFlake:`weatherIcon-flake_LGzkw`,weatherIconSnowFall:`weatherIconSnowFall_I2EGa`,"weatherIcon-stone":`weatherIcon-stone_U0daF`,weatherIconStone:`weatherIcon-stone_U0daF`,weatherIconHailFall:`weatherIconHailFall_U-AE4`,"weatherIcon-impact":`weatherIcon-impact_kCHtC`,weatherIconImpact:`weatherIcon-impact_kCHtC`,"weatherIcon-fog":`weatherIcon-fog_GC8wj`,weatherIconFog:`weatherIcon-fog_GC8wj`,weatherIconSway:`weatherIconSway_-CD1q`,"weatherIcon-bolt":`weatherIcon-bolt_S9sie`,weatherIconBolt:`weatherIcon-bolt_S9sie`,weatherIconFlash:`weatherIconFlash_GIecz`,"weatherIcon-still":`weatherIcon-still_lr-Nl`,weatherIconStill:`weatherIcon-still_lr-Nl`},th=`M 26.3 62.9 C 15.4 65.0 15.0 48.5 27.8 49.8 C 23.9 43.9 34.2 34.0 43.0 39.6 C 46.0 26.2 73.9 32.0 68.9 46.3 C 85.0 44.3 84.6 64.2 72.4 62.5 Z`;function nh(e,t,n,r){return{animationDuration:`${t}s`,animationDelay:`${e?n:-r*t}s`}}function rh({className:e,delayed:t=!1}){return(0,f.jsx)(`path`,{className:(0,l.default)(eh.weatherIconCloud,t&&eh.weatherIconCloudDelayed,e),d:th})}var ih=12;function ah({className:e}){return(0,f.jsxs)(`g`,{className:e,children:[(0,f.jsx)(`g`,{className:eh.weatherIconSunRays,children:Array.from({length:ih},(e,t)=>(0,f.jsx)(`g`,{transform:`rotate(${t/ih*360} 50 50)`,children:(0,f.jsx)(`line`,{className:eh.weatherIconSunRay,x1:50,y1:23,x2:50,y2:t%2==0?16:11})},t))}),(0,f.jsx)(`circle`,{className:eh.weatherIconSunCore,cx:50,cy:50,r:18})]})}var oh=[{x:74,y:32,size:2.2,duration:2.4,delay:0},{x:28,y:30,size:2.6,duration:3.1,delay:.4},{x:80,y:60,size:1.8,duration:2.7,delay:.9},{x:22,y:66,size:2.4,duration:3.6,delay:.2},{x:58,y:82,size:2,duration:2.9,delay:1.3},{x:34,y:80,size:2.5,duration:3.3,delay:.6}];function sh({className:e}){return(0,f.jsxs)(`g`,{className:e,children:[oh.map(e=>(0,f.jsx)(`g`,{transform:`translate(${e.x}, ${e.y})`,children:(0,f.jsx)(`g`,{className:eh.weatherIconStar,style:{animationDuration:`${e.duration}s`,animationDelay:`${e.delay}s`},children:(0,f.jsx)(`path`,{d:`M 0 ${-e.size} L 0 ${e.size} M ${-e.size} 0 L ${e.size} 0`})})},`${e.x}-${e.y}`)),(0,f.jsx)(`circle`,{className:eh.weatherIconMoonCore,cx:50,cy:50,r:18})]})}var ch=function(e){return e.Light=`light`,e.Medium=`medium`,e.Heavy=`heavy`,e}({}),lh={light:{lanes:4,duration:1.5},medium:{lanes:6,duration:.95},heavy:{lanes:10,duration:.55}},uh=[.85,1.1,.95,1.2,.9,1.05,1.15,.8,1,1.08],dh=[.05,.62,.31,.85,.18,.5,.74,.1,.43,.95],fh=2,ph=.65;function mh(e,t=dh,n=.8){return .1+n*t[e%t.length]}function hh({animated:e,intensity:t=`medium`}){let{lanes:n,duration:r}=lh[t];return(0,f.jsx)(`g`,{className:eh.weatherIconRain,children:Array.from({length:n},(t,i)=>{let a=26+50*i/(n-1),o=r*uh[i],s=o*dh[i];return Array.from({length:fh},(t,n)=>{let r=nh(e,o,s+n*o/fh,mh(i*fh+n,dh,ph));return(0,f.jsxs)(`g`,{children:[(0,f.jsx)(`line`,{className:eh.weatherIconDrop,style:r,x1:a,y1:68,x2:a-2.4,y2:92}),(0,f.jsx)(`ellipse`,{className:eh.weatherIconSplash,style:r,cx:a-2.4,cy:92,rx:`1.4`,ry:`0.7`})]},`${i}-${n}`)})})})}var gh=[.65,1.5,.85,1.25,1.65,.75,1.1],_h=[.15,.7,.35,.9,.05,.55,.8],vh=7;function yh({animated:e}){return(0,f.jsx)(`g`,{className:eh.weatherIconSnow,children:Array.from({length:vh},(t,n)=>{let r=24+54*n/6,i=7*gh[n],a=i*_h[n];return Array.from({length:fh},(t,o)=>(0,f.jsx)(`g`,{transform:`translate(${r}, 68)`,children:(0,f.jsx)(`g`,{className:eh.weatherIconFlake,style:nh(e,i,a+o*i*.7,mh(n*fh+o,_h)),children:(0,f.jsx)(`path`,{d:`M 0 -2 L 0 2 M -1.7 -1 L 1.7 1 M -1.7 1 L 1.7 -1`})})},`${n}-${o}`))})})}var bh=[{x:34,y:66,dx:-1,dy:18,duration:.6,delay:.05},{x:47,y:68,dx:-2,dy:17,duration:.7,delay:.3},{x:58,y:65,dx:1,dy:18,duration:.55,delay:.15},{x:40,y:70,dx:-1,dy:16,duration:.75,delay:.45},{x:65,y:67,dx:-2,dy:17,duration:.65,delay:0},{x:52,y:71,dx:1,dy:16,duration:.7,delay:.35}];function xh({animated:e}){let t=bh.length*fh;return(0,f.jsx)(`g`,{className:eh.weatherIconHail,children:bh.flatMap((n,r)=>Array.from({length:fh},(i,a)=>{let o=r*fh+a,s=nh(e,n.duration,n.delay+a*n.duration/fh,.1+.8*(o+.5)/t);return(0,f.jsxs)(`g`,{children:[(0,f.jsx)(`g`,{transform:`translate(${n.x}, ${n.y})`,children:(0,f.jsx)(`g`,{className:eh.weatherIconStone,style:{...s,"--weather-icon-dx":n.dx,"--weather-icon-dy":n.dy},children:(0,f.jsx)(`circle`,{r:`2`})})}),(0,f.jsx)(`ellipse`,{className:eh.weatherIconImpact,style:s,cx:n.x+n.dx,cy:n.y+n.dy,rx:`1.8`,ry:`0.9`})]},o)}))})}function Sh(){return(0,f.jsxs)(`g`,{className:eh.weatherIconFog,children:[(0,f.jsx)(`line`,{x1:`32`,y1:`40`,x2:`68`,y2:`40`}),(0,f.jsx)(`line`,{x1:`20`,y1:`52`,x2:`80`,y2:`52`}),(0,f.jsx)(`line`,{x1:`26`,y1:`64`,x2:`74`,y2:`64`}),(0,f.jsx)(`line`,{x1:`34`,y1:`76`,x2:`66`,y2:`76`})]})}function Ch(){return(0,f.jsx)(`path`,{className:eh.weatherIconBolt,d:`M 54 52 L 44 72 H 52 L 46 90 L 62 66 H 54 L 60 52 Z`})}var wh={[$m.Sunny]:`Sunny`,[$m.ClearNight]:`Clear night`,[$m.Cloudy]:`Cloudy`,[$m.PartlyCloudy]:`Partly cloudy`,[$m.PartlyCloudyNight]:`Partly cloudy night`,[$m.RainyLight]:`Light rain`,[$m.Rainy]:`Rain`,[$m.RainyHeavy]:`Heavy rain`,[$m.Snowy]:`Snow`,[$m.Hail]:`Hail`,[$m.Foggy]:`Fog`,[$m.Thunderstorm]:`Thunderstorm`};function Th(e){let{type:t,size:n=64,animated:r=!0,labels:i,className:a,style:o,...s}=D(`WeatherIcon`,e),u=O(`WeatherIcon`,i,wh),d=r&&!be(`(prefers-reduced-motion: reduce)`),p=`weather-icon-clip-${(0,c.useId)().replace(/[^\w-]/g,``)}`,m=e=>(0,f.jsx)(`g`,{clipPath:`url(#${p})`,children:e});function h(){switch(t){case $m.ClearNight:return(0,f.jsx)(sh,{});case $m.Cloudy:return(0,f.jsxs)(f.Fragment,{children:[m((0,f.jsx)(`g`,{className:eh.weatherIconCloudBehind,children:(0,f.jsx)(rh,{delayed:!0})})),(0,f.jsx)(rh,{})]});case $m.PartlyCloudy:return(0,f.jsxs)(f.Fragment,{children:[m((0,f.jsx)(ah,{className:eh.weatherIconBehind})),(0,f.jsx)(rh,{})]});case $m.PartlyCloudyNight:return(0,f.jsxs)(f.Fragment,{children:[m((0,f.jsx)(sh,{className:eh.weatherIconBehind})),(0,f.jsx)(rh,{})]});case $m.RainyLight:case $m.Rainy:case $m.RainyHeavy:return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(rh,{}),(0,f.jsx)(hh,{animated:d,intensity:t===$m.RainyLight?ch.Light:t===$m.RainyHeavy?ch.Heavy:ch.Medium})]});case $m.Snowy:return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(rh,{}),(0,f.jsx)(yh,{animated:d})]});case $m.Hail:return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(rh,{}),(0,f.jsx)(xh,{animated:d})]});case $m.Foggy:return(0,f.jsx)(Sh,{});case $m.Thunderstorm:return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(rh,{}),m((0,f.jsx)(Ch,{}))]});default:return(0,f.jsx)(ah,{})}}return(0,f.jsxs)(`svg`,{...s,role:`img`,"aria-label":u[t]??u[$m.Sunny],className:(0,l.default)(eh.weatherIcon,!d&&eh.weatherIconStill,a),style:{width:n,height:n,...o},viewBox:`0 0 100 100`,children:[(0,f.jsx)(`defs`,{children:(0,f.jsx)(`clipPath`,{id:p,clipRule:`evenodd`,children:(0,f.jsx)(`path`,{d:`M -20 -20 H 120 V 120 H -20 Z ${th}`})})}),h()]})}var Eh={wizard:`wizard_uRBAN`,"wizard-content":`wizard-content_lcl4C`,wizardContent:`wizard-content_lcl4C`,"wizard-content-outOfFrame":`wizard-content-outOfFrame_Eks4Y`,wizardContentOutOfFrame:`wizard-content-outOfFrame_Eks4Y`,"wizard-content-container":`wizard-content-container_yxbCJ`,wizardContentContainer:`wizard-content-container_yxbCJ`};function Dh({currentStep:e=0,stepCount:t=0,renderStep:n=()=>null,className:r,style:i,classNames:a,styles:o,...s}){let[u,d]=(0,c.useState)(void 0),[p,m]=(0,c.useState)(!1),[h,g]=(0,c.useState)(e),_=(0,c.useRef)([]),v=(0,c.useRef)(null);e!==h&&(g(e),m(!0)),(0,c.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>m(!1),400);return()=>clearTimeout(e)},[p]),(0,c.useEffect)(()=>{v.current?.disconnect();let t=_.current[e];if(t)return d(t.clientHeight),v.current=new ResizeObserver(()=>{d(t.clientHeight)}),v.current.observe(t),()=>v.current?.disconnect()},[e,t]);let y={...u===void 0?{}:{height:`${u}px`},...o?.root,...i};return(0,f.jsx)(`div`,{...s,className:(0,l.default)(Eh.wizard,a?.root,r),style:y,children:(0,f.jsx)(`div`,{className:(0,l.default)(Eh.wizardContentContainer,a?.container),style:{width:`${t*100}%`,marginLeft:`-${e*100}%`,...o?.container},children:Array.from({length:t},(r,i)=>(0,f.jsx)(`div`,{ref:e=>{_.current[i]=e},className:(0,l.default)(Eh.wizardContent,a?.step),style:{width:`${100/t}%`,marginLeft:`${100/t*i}%`,...o?.step},children:(0,f.jsx)(`div`,{className:(0,l.default)({[Eh.wizardContentOutOfFrame]:e!==i&&!p},a?.stepContent),style:o?.stepContent,inert:e!==i||void 0,children:n(i)})},`wizardStep${i}`))})})}var Oh=e=>{Ae(e[0].message,{type:`error`})},kh=class extends v.FormValidatorGroup{constructor(e,t=null,n){super(e,t,{...n,onSubmitError:n?.onSubmitError??Oh}),this.Form=(0,v.createFormComponent)(this)}},Ah=class extends c.PureComponent{static{this.defaultProps={formValidator:null,onMouseEnter:null,onMouseLeave:null,onFocus:null,onBlur:null,onChange:null,errorMessage:``,isValid:!1,isRequired:!1,label:``}}constructor(e){super(e);let{formValidator:t}=e;t&&(t.label=e.label??``,t.validate(),t.registerOnUpdateListener(()=>{this.forceUpdate()})),this.state={isFocused:!1,isHovered:!1},this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.hasError=this.hasError.bind(this),this.renderTooltip=this.renderTooltip.bind(this),this.onChange=this.onChange.bind(this)}componentDidMount(){setTimeout(()=>this.setState({isFocused:!1,isHovered:!1}),1)}componentDidUpdate(e){let{formValidator:t}=this.props;e.formValidator&&t&&e.formValidator!==t&&t.registerOnUpdateListener(()=>{this.forceUpdate()})}onMouseEnter(e){let{onMouseEnter:t}=this.props;this.setState({isHovered:!0}),t&&t(e)}onMouseLeave(e){let{onMouseLeave:t}=this.props;this.setState({isHovered:!1}),t&&t(e)}onFocus(e){let{onFocus:t}=this.props;this.setState({isFocused:!0}),t&&t(e)}onBlur(e){let{formValidator:t,onBlur:n}=this.props;t&&(t.touched=!0),this.setState({isFocused:!1}),n&&n(e)}hasError(){let{errorMessage:e,isValid:t,formValidator:n}=this.props;return n?n.touched&&n.hasError():!t||!!e}isRequired(){let{isRequired:e,formValidator:t}=this.props;return!!(e||t&&t.validators.find(e=>e.validatorId===`required`))}renderTooltip(){let{errorMessage:e,formValidator:t}=this.props,{isHovered:n,isFocused:r}=this.state;return(0,f.jsx)(Fi,{variant:`error`,message:t?t.getCurrentErrorMessage():e||``,isVisible:this.hasError()&&(r||n)})}onChange(e){let{onChange:t,formValidator:n}=this.props;if(n){let t=e;e&&e.target&&(t=e.target.value),n.set(t)}t&&t(e)}};function jh(e,{initialValues:t,onSubmit:n,onValidate:r,errorParser:i,onSubmitError:a}={}){return(0,v.useFormValidatorGroupInstance)(()=>new kh(e,null,{initialValues:t,errorParser:i,onSubmitError:a}),n,r)}exports.Accordion=N,exports.AccordionStyleType=y,exports.ActionButtons=re,exports.ActionIcon=ce,exports.AhroweProvider=Fe,exports.Alert=Ve,exports.AlertStyleType=Ie,exports.AnimatedLogo=Ge,exports.AnimatedText=rt,exports.AnimatedTextUnit=qe,exports.AnimatedTextVariant=Ke,exports.Avatar=pt,exports.AvatarGroup=mt,exports.Badge=lt,exports.BadgePosition=at,exports.BadgeStyleType=it,exports.BodyEnd=_e,exports.Breadcrumb=cn,exports.Button=ne,exports.ButtonGroup=fn,exports.ButtonGroupOrientation=un,exports.ButtonSize=B,exports.ButtonStyleType=z,exports.ButtonType=V,exports.Calendar=si,exports.CalendarView=wn,exports.Card=di,exports.CardActions=hi,exports.CardContent=mi,exports.CardHeader=fi,exports.CardMedia=pi,exports.CardStyleType=ci,exports.Carousel=xi,exports.Checkbox=Ti,exports.Chip=Ai,exports.ChipContainer=ji,exports.ChipStyleType=Ei,exports.ColorPicker=pa,exports.CommandPalette=Wa,exports.ConfigProvider=E,exports.ConfirmModal=Ka,exports.CopyButton=Xa,exports.DEFAULT_SNAP_OPTIONS=sl,exports.DEFAULT_WALL_ATTRS=Xs,exports.DatePicker=Ro,exports.Divider=Uo,exports.DividerOrientation=Bo,exports.DividerTextPosition=zo,exports.DoorSwing=ys,exports.Drawer=Go,exports.DropZone=$o,exports.DropZoneReturnType=qo,exports.DropZoneStatus=Ko,exports.Dropdown=Co,exports.EmptyState=ns,exports.ErrorBoundary=os,exports.Fab=ds,exports.Flip=hs,Object.defineProperty(exports,"FormValidator",{enumerable:!0,get:function(){return v.FormValidator}}),exports.FormValidatorGroup=kh,exports.HIT_PX=tl,exports.HIT_PX_COARSE=nl,exports.IconPicker=eu,exports.IdleManager=nu,exports.Input=Gi,exports.InputDropdown=cu,exports.InputIconPosition=Hi,exports.InputType=Vi,exports.InteractableDiv=oe,exports.KanbanBoard=ju,exports.KanbanColumn=hu,exports.KlipyPicker=Uu,exports.MIN_FLOOR_HEIGHT=Sc,exports.MIN_OPENING_WIDTH=Ss,exports.MIN_WALL_LENGTH=xs,exports.Menu=Yu,exports.Modal=va,exports.MultiSelect=ed,exports.NumberInput=fd,exports.OpeningKind=vs,exports.OptionPicker=Dr,exports.OtpInput=yd,exports.OtpInputCharset=pd,exports.Overscroll=Cd,exports.PLAN_FORMAT_VERSION=gl,exports.Pagination=Ad,exports.PlanIssueKind=bs,exports.PlanUnitSystem=gs,exports.Popover=rn,exports.PopoverAlign=Tt,exports.PopoverPlacement=wt,exports.PopoverTrigger=Et,exports.Presentation=A,exports.ProgressBar=Nd,exports.RadioGroup=Id,exports.RadioGroupOrientation=Pd,exports.Rating=Bd,exports.RevealLens=Gd,exports.Ripple=G,exports.RoomDrawer=pf,exports.RoomViewer=yf,exports.ScrollFade=Sf,exports.ScrollFadeAxis=bf,exports.ScrollbarProvider=Y,exports.SearchInput=Iu,exports.SectionHeader=Ef,exports.SectionHeaderSize=Cf,exports.Skeleton=Mf,exports.SkeletonAnimation=Of,exports.SkeletonVariant=Df,exports.Slider=Ff,exports.SnapKind=ol,exports.SpinnerLoading=R,exports.SplitButton=Rf,exports.Stepper=Yf,exports.StepperAlignment=Bf,exports.StepperCollapse=Hf,exports.StepperLabelPlacement=Uf,exports.StepperStyleType=Vf,exports.Sticky=ep,exports.Switch=np,exports.TabHeader=ip,exports.Textarea=ap,exports.ThemeProvider=Z,exports.Tilt=vp,exports.TiltGroup=lp,exports.TiltGroupContext=sp,exports.TimeInput=Bp,exports.Timeline=Gp,exports.TimelineAlignment=Hp,exports.TimelineItemStatus=Up,exports.Timer=Qp,exports.Tooltip=Fi,exports.Tree=Qm,exports.ValidatableComponent=Ah,Object.defineProperty(exports,"Validators",{enumerable:!0,get:function(){return v.Validators}}),exports.VirtualList=qm,exports.WallType=_s,exports.WeatherIcon=Th,exports.WeatherType=$m,exports.Wizard=Dh,exports.addFloor=yc,exports.addOpening=sc,exports.addRect=Qs,exports.addWall=Zs,exports.buildPlanMesh=Gl,exports.buildWallPaths=el,exports.cleanupPlan=dc,exports.clientToWorld=ll,exports.commitDerivation=Uc,exports.dateToDay=yn,exports.dateToTime=Sn,exports.dayTimeToDate=Cn,exports.dayToDate=bn,exports.defaultTheme=de,exports.defaultTiltEasing=up,exports.deriveFaces=Ic,exports.derivePlan=Vc,exports.detachWall=tc,exports.dissolveNode=ec,exports.duplicateFloor=xc,exports.emptyFloor=fc,exports.emptyFloorPlan=pc,exports.flattenTree=Jm,exports.floorBelow=vc,exports.floorBounds=Oc,exports.floorIndex=_c,exports.formatHotkey=ka,exports.getFloor=mc,exports.getLocale=io,Object.defineProperty(exports,"hasEightPasswordChars",{enumerable:!0,get:function(){return v.hasEightPasswordChars}}),Object.defineProperty(exports,"hasOnePasswordDigit",{enumerable:!0,get:function(){return v.hasOnePasswordDigit}}),Object.defineProperty(exports,"hasOnePasswordLetter",{enumerable:!0,get:function(){return v.hasOnePasswordLetter}}),exports.hitTest=il,Object.defineProperty(exports,"isBic",{enumerable:!0,get:function(){return v.isBic}}),Object.defineProperty(exports,"isDate",{enumerable:!0,get:function(){return v.isDate}}),Object.defineProperty(exports,"isDay",{enumerable:!0,get:function(){return v.isDay}}),Object.defineProperty(exports,"isEmail",{enumerable:!0,get:function(){return v.isEmail}}),Object.defineProperty(exports,"isISODate",{enumerable:!0,get:function(){return v.isISODate}}),exports.isMenuAction=La,exports.isMenuHeading=Ia,exports.isMenuSeparator=Fa,Object.defineProperty(exports,"isNumber",{enumerable:!0,get:function(){return v.isNumber}}),Object.defineProperty(exports,"isPassword",{enumerable:!0,get:function(){return v.isPassword}}),Object.defineProperty(exports,"isURL",{enumerable:!0,get:function(){return v.isURL}}),exports.lightTheme=he,exports.mapLocale=to,exports.menuHotkeys=Xu,exports.mergeNodes=$s,exports.moveFloor=Tc,exports.moveNode=ic,exports.nodeDegrees=Lc,exports.openingGeometry=Zc,exports.planFromJson=Dl,exports.planFromLegacySvg=Yl,exports.planToJson=_l,exports.pruneUnmatchedRooms=Wc,exports.removeFloor=bc,exports.removeOpening=lc,exports.removeWall=rc,exports.renameFloor=wc,exports.resolveSnap=hl,exports.roomAtPoint=Gc,exports.scalePlan=oc,exports.screenScale=cl,exports.selectionsEqual=al,exports.setFloor=gc,exports.setFloorHeight=Cc,exports.setLocale=ro,exports.showToast=Ae,exports.splitWall=Js,exports.tabbablesIn=Bt,exports.transformPlan=ac,exports.updateFloor=hc,exports.updateOpening=cc,exports.useClipboard=qa,exports.useCoarsePointer=xe,exports.useComponentDefaults=D,Object.defineProperty(exports,"useFormValidator",{enumerable:!0,get:function(){return v.useFormValidator}}),exports.useFormValidatorGroup=jh,exports.useHotkeys=ja,exports.useLabels=O,exports.useMediaQuery=be,exports.useOverlay=qt,exports.usePresentationDefault=k,exports.useScrollEdges=ga,exports.useSwipeDismiss=we,exports.useTheme=op,exports.useTiltGroup=cp,exports.useVisualViewportSize=Ut,exports.validatePlan=uc,exports.wallCentrelineSpans=Xc,exports.wallLength=Bs,exports.weldShortWalls=nc,exports.worldTolerances=rl;
8
+ `};function Pu({columns:e,items:t,renderItem:n,onChange:r,dragHandle:i,getItemLabel:a=ku,getItemDisabled:o,renderEmptyColumn:s,renderColumnActions:u,reorderableColumns:d,collapseEmptyColumns:p,columnMaxHeight:g,onLoadMore:_,loadMoreThreshold:v,className:y,style:b,classNames:x,styles:S,...C}){let[w,T]=(0,c.useState)(null),[E,D]=(0,c.useState)(!1),[O,k]=(0,c.useState)(null),A=(0,c.useRef)(null),j=(0,m.useSensors)((0,m.useSensor)(m.MouseSensor,Au),(0,m.useSensor)(m.TouchSensor,ju),(0,m.useSensor)(m.KeyboardSensor,Mu)),M=O??e,N=(0,c.useMemo)(()=>M.map(e=>e.id),[M]),P=(0,c.useMemo)(()=>Eu(M,t,a),[M,t,a]),F=(0,c.useMemo)(()=>({announcements:P,screenReaderInstructions:Nu}),[P]);function I({active:t}){T(String(t.id)),D(xu(t.data.current)),k(e),A.current=null}function L({active:t,over:n}){if(!n)return;if(xu(t.data.current)){let r=String(t.id),i=String(n.id);k(t=>{let n=t??e,a=Su(n,r,i);return a===n?t:a});return}let r=String(t.id),i=String(n.id),a=t.rect.current.translated??t.rect.current.initial,o=a?`${a.top}:${a.left}`:null;(o===null||o!==A.current)&&(A.current=o,k(t=>{let o=t??e,s=Tu(o,r,i,{activeRect:a,overRect:n.rect});return s===o?t:s}))}function R({over:t}){if(T(null),D(!1),!t||!O){k(null);return}yu(O,e)||r(O),k(null)}function z(){T(null),D(!1),k(null)}let B=w&&E?M.find(e=>e.id===w):void 0;return(0,f.jsxs)(m.DndContext,{sensors:j,collisionDetection:Cu,onDragStart:I,onDragOver:L,onDragEnd:R,onDragCancel:z,accessibility:F,children:[(0,f.jsx)(h.SortableContext,{id:`kanban-columns`,items:N,strategy:h.horizontalListSortingStrategy,children:(0,f.jsx)(`div`,{...C,className:(0,l.default)(fu.board,y),style:b,children:M.map(e=>(0,f.jsx)(vu,{id:e.id,title:e.title,itemIds:e.itemIds,maxItems:e.maxItems,disabled:e.disabled,getItemDisabled:o,emptyPlaceholder:s?.(e),actions:u?.(e),reorderable:d,activeIsColumn:w!==null&&E,collapseEmptyColumns:p,columnMaxHeight:g,hasMore:e.hasMore,onLoadMore:_?()=>_(e.id):void 0,loadMoreThreshold:v,items:t,renderItem:n,dragHandle:i,preserveSizeWhileEmpty:w!==null},e.id))})}),(0,f.jsx)(m.DragOverlay,{children:B?(0,f.jsx)(`div`,{className:(0,l.default)(fu.column,fu.columnDragOverlay),children:(0,f.jsx)(`div`,{className:fu.columnHeader,children:(0,f.jsx)(`span`,{className:fu.columnHeaderTitle,children:B.title})})}):w&&!E&&t[w]!==void 0?(0,f.jsx)(`div`,{className:(0,l.default)(fu.dragOverlay,x?.dragOverlay),style:S?.dragOverlay,children:n(t[w],w)}):null})]})}var Fu=`https://api.klipy.com/v2`,Iu=class{constructor(e){this.key=e}async search(e,t={}){let n=new URLSearchParams({q:e,key:this.key});return t.limit!=null&&n.set(`limit`,String(t.limit)),t.contentfilter!=null&&n.set(`contentfilter`,t.contentfilter),t.pos!=null&&n.set(`pos`,t.pos),(await fetch(`${Fu}/search?${n}`)).json()}async searchSuggestions(e){let t=new URLSearchParams({q:e,key:this.key});return(await fetch(`${Fu}/search_suggestions?${t}`)).json()}registerShare(e,t){let n=new URLSearchParams({id:t,q:e,key:this.key});fetch(`${Fu}/registershare?${n}`).catch(()=>null)}},Lu={resultCount:`resultCount_Sn48Q`},Ru={results:e=>`${e} ${e===1?`result`:`results`}`};function zu({value:e,onChange:t,onDebounce:n,placeholder:r,label:i,debounceMs:a=500,totalAmount:o,showAmount:s=!0,className:u,width:d,style:p,classNames:m,styles:h,labels:g,ref:_,...v}){let y=O(`SearchInput`,g,Ru),b=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>{b.current!==null&&clearTimeout(b.current)},[]);function x(e){let r=e==null?``:String(e),i=r.trim()===``?``:r;t(i),b.current!==null&&clearTimeout(b.current),b.current=setTimeout(()=>{n?.(i)},a)}let S=s&&typeof o==`number`&&!Number.isNaN(o);return(0,f.jsxs)(`div`,{...v,className:(0,l.default)(u,m?.root),style:{...d==null?void 0:{width:d},...p,...h?.root},children:[(0,f.jsx)(Ji,{ref:_,autoComplete:`off`,className:m?.input,style:h?.input,type:Wi.Search,label:i,placeholder:r,value:e,onChange:x}),S&&(0,f.jsx)(`p`,{className:(0,l.default)(Lu.resultCount,m?.resultCount),style:h?.resultCount,children:y.results(o)})]})}var Bu={gifPreview:`gifPreview_jAXT2`,"gifPreview-image":`gifPreview-image_41bwm`,gifPreviewImage:`gifPreview-image_41bwm`,"gifPreview-image-container":`gifPreview-image-container_5hAjJ`,gifPreviewImageContainer:`gifPreview-image-container_5hAjJ`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_9EI0A`};function Vu({className:e,previewItems:t=[],onSelect:n,onLoadAdditional:r}){function i(e){let t=e.currentTarget,n=t.scrollHeight-t.clientHeight*1.5;t.scrollTop>=n&&r?.()}return(0,f.jsx)(f.Fragment,{children:t.length>0&&(0,f.jsx)(`div`,{className:(0,l.default)(Bu.gifPreview,e),onScroll:i,children:t.map((e,t)=>(0,f.jsx)(oe,{className:Bu.gifPreviewImageContainer,onClick:()=>n?.(e),children:(0,f.jsx)(`div`,{className:Bu.gifPreviewImage,style:{backgroundImage:`url(${e.media_formats.tinygif.url})`}})},`${e.id}_${t}`))})})}var Hu={gifView:`gifView_YUeLK`,"gifView-loading":`gifView-loading_N1Lzx`,gifViewLoading:`gifView-loading_N1Lzx`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_OmJUc`};function Uu({className:e,src:t=``}){let[n,r]=(0,c.useState)(null),i=n!==t;return(0,f.jsxs)(`div`,{className:(0,l.default)(Hu.gifView,e),children:[(0,f.jsx)(`img`,{className:Hu.klipyPickerSelected,src:t,onLoad:()=>r(t)}),i&&(0,f.jsx)(`div`,{className:Hu.gifViewLoading})]})}var Wu={"klipyPicker-selected":`klipyPicker-selected_Watxl`,klipyPickerSelected:`klipyPicker-selected_Watxl`,"klipyPicker-modal-content":`klipyPicker-modal-content_3CBV9`,klipyPickerModalContent:`klipyPicker-modal-content_3CBV9`,"klipyPicker-suggestions-container":`klipyPicker-suggestions-container_-csDI`,klipyPickerSuggestionsContainer:`klipyPicker-suggestions-container_-csDI`,"klipyPicker-suggestions-item":`klipyPicker-suggestions-item_nHHSA`,klipyPickerSuggestionsItem:`klipyPicker-suggestions-item_nHHSA`},Gu={search:`Pick gif`};function Ku({className:e,token:t=``,isModal:n=!1,onSelect:r=()=>void 0,selected:i=null,labels:a}){let o=O(`KlipyPicker`,a,Gu),s=(0,c.useMemo)(()=>new Iu(t),[t]),[u,d]=(0,c.useState)(``),[p,m]=(0,c.useState)([]),[h,g]=(0,c.useState)([]),[_,v]=(0,c.useState)(null),[y,b]=(0,c.useState)(!1);async function x(e){if(d(e),!e.trim()){m([]),g([]),v(null);return}let[{results:t=[],next:n=null},{results:r=[]}]=await Promise.all([s.search(e,{limit:18,contentfilter:`medium`}),s.searchSuggestions(e)]);m(t),v(n),g(r)}async function S(){let{results:e=[],next:t=null}=await s.search(u,{limit:36,pos:_??void 0,contentfilter:`medium`});v(t),m(t=>[...t,...e])}async function C(e){await r(e),b(!1),e&&s.registerShare(u,e.id)}function w(){return(0,f.jsx)(Pi,{inline:!0,className:Wu.klipyPickerSuggestionsContainer,children:h.map(e=>(0,f.jsx)(Ni,{className:Wu.klipyPickerSuggestionsItem,text:e,onClick:()=>x(e)},e))})}function T(){return(0,f.jsx)(Vu,{previewItems:p,onSelect:C,onLoadAdditional:S})}function E(){return(0,f.jsx)(zu,{label:o.search,value:u,onDebounce:x,onChange:d})}return n?(0,f.jsxs)(`div`,{className:(0,l.default)(Wu.klipyPicker,e),children:[(0,f.jsxs)(`div`,{className:P.actionButtons,children:[(0,f.jsx)(ne,{onClick:()=>b(!0),children:`Pick gif`}),i&&(0,f.jsx)(ne,{styleType:z.Delete,onClick:()=>C(null),children:`Remove gif`})]}),i&&(0,f.jsx)(Uu,{className:Wu.klipyPickerSelected,src:i}),(0,f.jsx)(xa,{isOpen:y,onClose:()=>b(!1),children:(0,f.jsxs)(`div`,{className:Wu.klipyPickerModalContent,children:[E(),w(),T()]})})]}):(0,f.jsxs)(`div`,{className:(0,l.default)(Wu.klipyPicker,e),children:[(0,f.jsx)(sn,{placement:wt.Bottom,align:Tt.Start,isOpen:p.length>0&&y,onOpenChange:b,closeOnTriggerClick:!1,constrainWidth:!1,content:(0,f.jsxs)(f.Fragment,{children:[w(),T()]}),children:E()}),i&&(0,f.jsx)(ne,{styleType:z.Delete,onClick:()=>C(null),children:`Remove gif`}),i&&(0,f.jsx)(Uu,{className:Wu.klipyPickerSelected,src:i})]})}var qu={menuPanel:`menuPanel_ldsja`,menu:`menu_QNY8D`,"menu-trigger":`menu-trigger_YbVFX`,menuTrigger:`menu-trigger_YbVFX`,"menu-item":`menu-item_-dxHx`,menuItem:`menu-item_-dxHx`,"menu-item-danger":`menu-item-danger_sztTU`,menuItemDanger:`menu-item-danger_sztTU`,"menu-item-icon":`menu-item-icon_BM1Ks`,menuItemIcon:`menu-item-icon_BM1Ks`,"menu-item-label":`menu-item-label_sK5Z5`,menuItemLabel:`menu-item-label_sK5Z5`,"menu-item-shortcut":`menu-item-shortcut_lRTZF`,menuItemShortcut:`menu-item-shortcut_lRTZF`,"menu-separator":`menu-separator_HfNOp`,menuSeparator:`menu-separator_HfNOp`,"menu-heading":`menu-heading_QSu4U`,menuHeading:`menu-heading_QSu4U`},Ju=600;function Yu(e,t,n){for(let r=1;r<=e.length;r++){let i=(t+n*r+e.length*r)%e.length,a=e[i];if(Ba(a)&&!a.disabled)return i}return-1}function Xu(e){return e.findIndex(e=>Ba(e)&&!e.disabled)}function Zu(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Ba(n)&&!n.disabled)return t}return-1}function Qu({items:e,children:t,onAction:n,isOpen:r,onOpenChange:i,placement:a=wt.Bottom,align:o=Tt.Start,presentation:s,className:u,style:d,classNames:p,styles:m,...h}){let g=r!==void 0,[_,v]=(0,c.useState)(!1),y=g?r:_,[b,x]=(0,c.useState)(-1),S=(0,c.useRef)([]),C=(0,c.useRef)(null),w=(0,c.useRef)(null),{restoreFocusToTrigger:T,focusAfterTrigger:E}=Gt({triggerRef:C,contentRef:w}),D=(0,c.useId)(),O=(0,c.useRef)(`first`),k=(0,c.useRef)({query:``,timer:void 0}),A=(0,c.useRef)(!1);function j(e,t=!1){e&&(A.current=t),g||v(e),i?.(e)}let M=(0,c.useRef)(e);(0,c.useEffect)(()=>{M.current=e}),(0,c.useEffect)(()=>{if(!y)return;if(!A.current){x(-1);return}let e=M.current,t=O.current===`last`?Zu(e):Xu(e);x(t);let n=requestAnimationFrame(()=>{S.current[t]?.focus()});return()=>{cancelAnimationFrame(n),O.current=`first`}},[y]),(0,c.useEffect)(()=>()=>clearTimeout(k.current.timer),[]);function N(e){e<0||(x(e),S.current[e]?.focus())}function P(e){j(!1),e&&T()}function F(t){if(t.length!==1||!t.trim())return!1;clearTimeout(k.current.timer),k.current.query+=t.toLowerCase(),k.current.timer=setTimeout(()=>{k.current.query=``},Ju);let n=k.current.query,r=n.length>1&&[...n].every(e=>e===n[0]),i=r?n[0]:n,a=r||n.length===1?b:b-1;for(let t=1;t<=e.length;t++){let n=(a+t+e.length)%e.length,r=e[n];if(Ba(r)&&!r.disabled&&(S.current[n]?.textContent?.trim().toLowerCase()??``).startsWith(i))return N(n),!0}return!1}function I(t){if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(t.preventDefault(),t.stopPropagation(),y){N(t.key===`ArrowUp`?Zu(e):Xu(e));return}O.current=t.key===`ArrowUp`?`last`:`first`,j(!0,!0)}}function L(t){switch(t.key){case`ArrowDown`:N(Yu(e,b,1));break;case`ArrowUp`:N(b<0?Zu(e):Yu(e,b,-1));break;case`Home`:N(Xu(e));break;case`End`:N(Zu(e));break;case`Escape`:P(!0);break;case`Tab`:P(!1),t.shiftKey?T():E();break;default:if(!F(t.key))return}t.preventDefault(),t.stopPropagation()}function R(t){let r=e[t];Ba(r)&&!r.disabled&&(r.onClick?.(),n?.(r.id),P(!0))}let z=(0,c.isValidElement)(t)?(0,c.cloneElement)(t,{"aria-haspopup":t.props[`aria-haspopup`]??`menu`,"aria-expanded":t.props[`aria-expanded`]??y,"aria-controls":y?t.props[`aria-controls`]??D:t.props[`aria-controls`]}):t,B=(0,f.jsx)(`div`,{ref:w,id:D,role:`menu`,className:(0,l.default)(qu.menu,p?.menu),style:m?.menu,onKeyDown:L,children:e.map((e,t)=>Ra(e)?(0,f.jsx)(`div`,{role:`separator`,className:(0,l.default)(qu.menuSeparator,p?.separator),style:m?.separator},`separator-${t}`):za(e)?(0,f.jsx)(`div`,{role:`presentation`,className:(0,l.default)(qu.menuHeading,p?.heading),style:m?.heading,children:e.heading},`heading-${t}`):(0,f.jsxs)(`button`,{ref:e=>{S.current[t]=e},type:`button`,role:`menuitem`,disabled:e.disabled,tabIndex:t===b?0:-1,className:(0,l.default)(qu.menuItem,e.danger&&qu.menuItemDanger,p?.item),style:m?.item,onClick:()=>R(t),onMouseEnter:()=>x(t),children:[e.icon!=null&&K(e.icon,{className:(0,l.default)(qu.menuItemIcon,p?.itemIcon),style:m?.itemIcon}),(0,f.jsx)(`span`,{className:(0,l.default)(qu.menuItemLabel,p?.itemLabel),style:m?.itemLabel,children:e.label}),e.shortcut!=null&&(0,f.jsx)(`span`,{className:(0,l.default)(qu.menuItemShortcut,p?.itemShortcut),style:m?.itemShortcut,children:Ma(e.shortcut)})]},e.id))});return(0,f.jsx)(sn,{...h,isOpen:y,onOpenChange:(e,{fromKeyboard:t})=>j(e,t),placement:a,align:o,presentation:s,content:B,focusOnOpen:!1,constrainWidth:!1,classNames:{panel:qu.menuPanel},className:(0,l.default)(u,p?.root),style:{...d,...m?.root},children:(0,f.jsx)(`span`,{ref:C,className:(0,l.default)(qu.menuTrigger,p?.trigger),style:m?.trigger,onKeyDown:I,children:z})})}function $u(e,t){let n={};for(let r of e)Ba(r)&&!r.disabled&&r.shortcut&&(n[r.shortcut]=()=>{r.onClick?.(),t?.(r.id)});return n}var ed={multiSelect:`multiSelect_fmViY`,"multiSelect-label":`multiSelect-label_asHZ1`,multiSelectLabel:`multiSelect-label_asHZ1`,"multiSelect-label-floating":`multiSelect-label-floating_d4-Om`,multiSelectLabelFloating:`multiSelect-label-floating_d4-Om`,"multiSelect-fieldset":`multiSelect-fieldset_Eo29l`,multiSelectFieldset:`multiSelect-fieldset_Eo29l`,"multiSelect-fieldset-focused":`multiSelect-fieldset-focused_ZC2P6`,multiSelectFieldsetFocused:`multiSelect-fieldset-focused_ZC2P6`,"multiSelect-fieldset-error":`multiSelect-fieldset-error_CWzEo`,multiSelectFieldsetError:`multiSelect-fieldset-error_CWzEo`,"multiSelect-fieldset-legend":`multiSelect-fieldset-legend_p-6nh`,multiSelectFieldsetLegend:`multiSelect-fieldset-legend_p-6nh`,"multiSelect-fieldset-legend-active":`multiSelect-fieldset-legend-active_M0L7g`,multiSelectFieldsetLegendActive:`multiSelect-fieldset-legend-active_M0L7g`,"multiSelect-control":`multiSelect-control_zLb7t`,multiSelectControl:`multiSelect-control_zLb7t`,"multiSelect-values":`multiSelect-values_k1Q8x`,multiSelectValues:`multiSelect-values_k1Q8x`,"multiSelect-chip":`multiSelect-chip_xqe8Q`,multiSelectChip:`multiSelect-chip_xqe8Q`,"multiSelect-placeholder":`multiSelect-placeholder_Tjrmh`,multiSelectPlaceholder:`multiSelect-placeholder_Tjrmh`,"multiSelect-placeholder-shown":`multiSelect-placeholder-shown_8v36t`,multiSelectPlaceholderShown:`multiSelect-placeholder-shown_8v36t`,multiSelectFadeIn:`multiSelectFadeIn_rOplX`,"multiSelect-placeholder-instant":`multiSelect-placeholder-instant_r9-TD`,multiSelectPlaceholderInstant:`multiSelect-placeholder-instant_r9-TD`,"multiSelect-clearButton":`multiSelect-clearButton_FKs0m`,multiSelectClearButton:`multiSelect-clearButton_FKs0m`,"multiSelect-icon":`multiSelect-icon_ovLu-`,multiSelectIcon:`multiSelect-icon_ovLu-`,"multiSelect-icon-open":`multiSelect-icon-open_h8VAu`,multiSelectIconOpen:`multiSelect-icon-open_h8VAu`,"multiSelect-disabled":`multiSelect-disabled_Hm8mv`,multiSelectDisabled:`multiSelect-disabled_Hm8mv`,"multiSelect-panel":`multiSelect-panel_VX7gU`,multiSelectPanel:`multiSelect-panel_VX7gU`,"multiSelect-search":`multiSelect-search_g4OHX`,multiSelectSearch:`multiSelect-search_g4OHX`,"multiSelect-options":`multiSelect-options_MGZCv`,multiSelectOptions:`multiSelect-options_MGZCv`,"multiSelect-option":`multiSelect-option_hbvPY`,multiSelectOption:`multiSelect-option_hbvPY`,"multiSelect-option-active":`multiSelect-option-active_mSWFG`,multiSelectOptionActive:`multiSelect-option-active_mSWFG`,"multiSelect-option-selected":`multiSelect-option-selected_mjPq-`,multiSelectOptionSelected:`multiSelect-option-selected_mjPq-`,"multiSelect-option-disabled":`multiSelect-option-disabled_qSgYz`,multiSelectOptionDisabled:`multiSelect-option-disabled_qSgYz`,"multiSelect-optionCheck":`multiSelect-optionCheck_-YKoj`,multiSelectOptionCheck:`multiSelect-optionCheck_-YKoj`,"multiSelect-optionLabel":`multiSelect-optionLabel_CFZke`,multiSelectOptionLabel:`multiSelect-optionLabel_CFZke`,"multiSelect-empty":`multiSelect-empty_MjABY`,multiSelectEmpty:`multiSelect-empty_MjABY`},td=[],nd={clearSelection:`Clear selection`,create:e=>`Add "${e}"`,searchPlaceholder:`Search…`,empty:`No matches`};function rd(e){let{items:t,value:n,defaultValue:r=[],onChange:i=()=>{},label:a=``,alwaysFloatLabel:o=!1,placeholder:s=``,searchable:p=!1,allowCustomValues:m=!1,maxSelected:h,clearable:g=!0,disabled:_=!1,readOnly:v=!1,presentation:y,formValidator:b=null,errorMessage:x=``,isValid:S=!0,className:C,style:w,classNames:T,styles:E,onMouseEnter:k,onMouseLeave:A,onFocus:j,onBlur:M,labels:N,...P}=D(`MultiSelect`,e),F=O(`MultiSelect`,N,nd),I=(0,c.useRef)(null),L=(0,c.useRef)(null),R=(0,c.useRef)(null),z=(0,c.useRef)(null),B=(0,c.useId)(),[V,H]=(0,c.useState)(r),[U,W]=(0,c.useState)(!1),[G,ee]=(0,c.useState)(``),[K,te]=(0,c.useState)(0),[q,ne]=(0,c.useState)(!1),[J,re]=(0,c.useState)(!1),[ie,ae]=(0,c.useState)(),oe=(0,c.useRef)(b),[,se]=(0,c.useState)(0);(0,c.useEffect)(()=>{oe.current=b;let e=oe.current;if(!e)return;e.label=a,e.validate();let t=()=>se(e=>e+1);return e.registerOnUpdateListener(t),()=>{e.removeOnUpdateListener(t)}},[b,a]);let ce=n!==void 0&&!b,le=b?b.value:ce?n:V,ue=Array.isArray(le)?le:td,Y=b?b.touched&&b.hasError():!S||!!x,de=b?b.getCurrentErrorMessage():x||``,fe=!_&&!v,pe=h!==void 0&&ue.length>=h,me=o||U||q||ue.length>0,X=p||m,Z=G.trim(),he=X?Z.toLowerCase():``,ge=he?t.filter(e=>e.label.toLowerCase().includes(he)):t,_e=m&&Z.length>0&&!pe&&!t.some(e=>e.label.toLowerCase()===he||String(e.key).toLowerCase()===he)&&!ue.some(e=>String(e).toLowerCase()===he),ve=_e?[...ge,{key:Z,label:F.create(Z)}]:ge,ye=ue.map(e=>t.find(t=>t.key===e)??(m?{key:e,label:String(e)}:void 0)).filter(e=>e!==void 0);function be(e){b?b.set(e):ce||H(e),i(e)}function xe(e){fe&&!e.disabled&&(ue.includes(e.key)?be(ue.filter(t=>t!==e.key)):pe||be([...ue,e.key]),_e&&e.key===Z&&ee(``))}function Se(){I.current?.contains(document.activeElement)&&L.current?.focus()}function Ce(e){(!e||fe)&&(W(e),e?(ae(L.current?.offsetWidth),te(0)):(ee(``),oe.current&&(oe.current.touched=!0)))}(0,c.useEffect)(()=>{U&&X&&R.current?.querySelector(`input`)?.focus()},[U,X]),(0,c.useEffect)(()=>{U&&La(z.current,document.getElementById(`${B}-${K}`))},[U,K,B]);let we={isDisabled:e=>{let t=ve[e];return!!t.disabled||pe&&!ue.includes(t.key)}};function Te(e){if(fe){if(!U){e.key===`ArrowDown`||e.key===`Enter`||e.key===` `?(e.preventDefault(),Ce(!0)):e.key===`Backspace`&&ue.length>0&&be(ue.slice(0,-1));return}if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),te(Fa(K,e.key===`ArrowDown`?1:-1,ve.length,we)??0);else if(e.key===`Home`||e.key===`End`)e.preventDefault(),te(Ia(e.key===`Home`?`first`:`last`,ve.length,we)??0);else if(e.key===`Enter`){e.preventDefault();let t=ve[K];t&&xe(t)}else e.key===`Backspace`&&!G&&ue.length>0&&be(ue.slice(0,-1))}}let Ee=(0,f.jsxs)(`div`,{className:(0,l.default)(ed.multiSelectPanel,T?.panel),style:E?.panel,children:[X&&(0,f.jsx)(`div`,{ref:R,className:(0,l.default)(ed.multiSelectSearch,T?.search),style:E?.search,children:(0,f.jsx)(zu,{value:G,onChange:e=>{ee(e),te(0)},placeholder:F.searchPlaceholder,onKeyDown:Te})}),(0,f.jsx)(`div`,{ref:z,id:B,role:`listbox`,"aria-multiselectable":`true`,"aria-label":a||void 0,className:(0,l.default)(ed.multiSelectOptions,T?.options),style:E?.options,children:ve.length===0?(0,f.jsx)(`div`,{className:(0,l.default)(ed.multiSelectEmpty,T?.empty),style:E?.empty,children:F.empty}):ve.map((e,t)=>{let n=ue.includes(e.key),r=e.disabled||pe&&!n;return(0,f.jsxs)(`div`,{id:`${B}-${t}`,role:`option`,"aria-selected":n,"aria-disabled":r||void 0,className:(0,l.default)(ed.multiSelectOption,t===K&&ed.multiSelectOptionActive,n&&ed.multiSelectOptionSelected,r&&ed.multiSelectOptionDisabled,T?.option),style:E?.option,onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>te(t),onClick:()=>xe(e),children:[(0,f.jsx)(`span`,{className:(0,l.default)(ed.multiSelectOptionCheck,T?.optionCheck),style:E?.optionCheck,children:n&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faCheck})}),(0,f.jsx)(`span`,{className:(0,l.default)(ed.multiSelectOptionLabel,T?.optionLabel),style:E?.optionLabel,children:e.label})]},e.key)})})]});return(0,f.jsxs)(`div`,{...P,ref:I,className:(0,l.default)(ed.multiSelect,_&&ed.multiSelectDisabled,T?.root,C),style:{...w,...E?.root},onMouseEnter:e=>{re(!0),k?.(e)},onMouseLeave:e=>{re(!1),A?.(e)},onFocus:e=>{ne(!0),j?.(e)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(ne(!1),M?.(e))},children:[(0,f.jsx)(sn,{isOpen:U,onOpenChange:Ce,trigger:Et.Click,placement:wt.Bottom,align:Tt.Start,offset:4,withArrow:!1,focusOnOpen:X,constrainWidth:!1,width:`trigger`,disabled:!fe,presentation:y,content:Ee,styles:{panel:ie?{minWidth:ie}:void 0},children:(0,f.jsxs)(`div`,{ref:L,role:`combobox`,tabIndex:_?-1:0,"aria-expanded":U,"aria-haspopup":`listbox`,"aria-controls":B,"aria-activedescendant":U&&ve.length>0?`${B}-${K}`:void 0,"aria-disabled":_||void 0,"aria-readonly":v||void 0,className:(0,l.default)(ed.multiSelectControl,T?.control),style:E?.control,onKeyDown:Te,children:[s&&ye.length===0&&(0,f.jsx)(`span`,{className:(0,l.default)(ed.multiSelectPlaceholder,(!a||me)&&ed.multiSelectPlaceholderShown,!a&&ed.multiSelectPlaceholderInstant,T?.placeholder),style:E?.placeholder,children:s}),(0,f.jsx)(`div`,{className:(0,l.default)(ed.multiSelectValues,T?.values),style:E?.values,children:ye.map(e=>(0,f.jsx)(Ni,{text:e.label,showRemoveIcon:fe,labels:{remove:`Remove ${e.label}`},onMouseDown:e=>e.preventDefault(),onRemove:()=>{xe(e),Se()},className:(0,l.default)(ed.multiSelectChip,T?.chip),style:E?.chip},e.key))}),g&&fe&&ue.length>0&&(0,f.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":F.clearSelection,className:(0,l.default)(ed.multiSelectClearButton,T?.clearButton),style:E?.clearButton,onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),be([]),Se()},children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faXmark})}),(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronDown,className:(0,l.default)(ed.multiSelectIcon,U&&ed.multiSelectIconOpen,T?.icon),style:E?.icon}),a&&(0,f.jsx)(`div`,{className:(0,l.default)(ed.multiSelectLabel,me&&ed.multiSelectLabelFloating,T?.label),style:E?.label,children:a}),(0,f.jsx)(`fieldset`,{className:(0,l.default)(ed.multiSelectFieldset,(q||U)&&ed.multiSelectFieldsetFocused,Y&&ed.multiSelectFieldsetError,T?.fieldset),style:E?.fieldset,children:(0,f.jsx)(`legend`,{className:(0,l.default)(ed.multiSelectFieldsetLegend,me&&ed.multiSelectFieldsetLegendActive),children:(0,f.jsx)(`span`,{children:a})})})]})}),(0,f.jsx)(Ri,{variant:`error`,message:de,isVisible:Y&&(q||J)})]})}var id={"numberInput-split":`numberInput-split_1kFLr`,numberInputSplit:`numberInput-split_1kFLr`,arrowSuffix:`arrowSuffix_QECPG`,arrows:`arrows_yjRlc`,arrowBtn:`arrowBtn_DbJoa`,split:`split_FYvfQ`,splitBtn:`splitBtn_MquuB`,"split-invalid":`split-invalid_F94dA`,splitInvalid:`split-invalid_F94dA`},ad=400,od=120,sd=50,cd=1e3;function ld(e){let t=(0,c.useRef)(null),n=(0,c.useRef)(null),r=(0,c.useRef)(e);r.current=e;let i=(0,c.useRef)(null),a=(0,c.useCallback)(()=>{if(t.current!==null&&(clearTimeout(t.current),t.current=null),n.current!==null&&(clearInterval(n.current),n.current=null),typeof window>`u`)return;let{onEndEvent:e}=i.current;window.removeEventListener(`pointerup`,e),window.removeEventListener(`pointercancel`,e),window.removeEventListener(`pointermove`,e),window.removeEventListener(`blur`,e),document.removeEventListener(`visibilitychange`,e)},[]);i.current={stop:a,onEndEvent:e=>{(e.type!==`pointermove`||e.buttons===0)&&(e.type!==`visibilitychange`||document.hidden)&&i.current.stop()}};let o=(0,c.useCallback)((e,o)=>{a();let{onEndEvent:s}=i.current;window.addEventListener(`pointerup`,s),window.addEventListener(`pointercancel`,s),window.addEventListener(`pointermove`,s),window.addEventListener(`blur`,s),document.addEventListener(`visibilitychange`,s);let c=()=>{r.current(e*o)||a()};c(),t.current=setTimeout(()=>{t.current=null;let e=Date.now(),r=!1,i=()=>{c(),n.current!==null&&!r&&Date.now()-e>=cd&&(r=!0,n.current!==null&&clearInterval(n.current),n.current=setInterval(i,sd))};n.current=setInterval(i,od)},ad)},[a]);return(0,c.useEffect)(()=>a,[a]),{start:o,stop:a}}var ud={increase:`Increase`,decrease:`Decrease`};function dd({label:e,disabled:t,direction:n,onStart:r,onStop:i}){return{tabIndex:-1,disabled:t,"aria-label":e,onPointerDown:e=>{(e.button===0||e.pointerType!==`mouse`)&&(e.preventDefault(),r(n,e.shiftKey?10:1))},onPointerUp:i,onPointerCancel:i,onContextMenu:e=>e.preventDefault()}}function fd(e){return(0,f.jsx)(`button`,{type:`button`,...dd(e),className:(0,l.default)(id.arrowBtn,e.className),style:e.style,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:e.icon,"aria-hidden":`true`})})}function pd(e){let{disabled:t,...n}=dd(e);return(0,f.jsx)(ne,{...n,className:(0,l.default)(id.splitBtn,e.className),style:e.style,size:B.Icon,disabled:t,icon:e.icon})}function md(e){let t=c.default.useRef(void 0),{value:n,onChange:r,formValidator:i,label:a,error:o,className:s,style:u,classNames:p,styles:m,allowNegative:h=!1,decimalSeparator:g,thousandSeparator:v,prefix:y,suffix:b,decimalScale:x,fixedDecimalScale:S=!0,placeholder:C,sign:w,showArrows:T=!1,step:E=1,min:k,max:A,arrowsLayout:j=`auto`,labels:M,readOnly:N=!1,disabled:P=!1,isRequired:F=!1,onKeyDown:I,ref:L,...R}=D(`NumberInput`,e),z=O(`NumberInput`,M,ud),[,B]=c.default.useState(0);c.default.useEffect(()=>{if(t.current=i,!i)return;let e=()=>B(e=>e+1);return i.registerOnUpdateListener(e),()=>{i.removeOnUpdateListener(e)}},[i]);let V=F||!!i?.validators.find(e=>e.validatorId===`required`),H=i==null?n:i.value,U=w!=null&&H!=null?Math.abs(Number(H)):H,W=U==null?``:String(U);function G(e){let t=e;t!==void 0&&(w===`-`&&(t=-Math.abs(t)),w===`+`&&(t=Math.abs(t))),i?.set(t??null),r?.(t)}function ee(e){let t=e;return!h&&w!==`-`&&(t=Math.max(0,t)),w===`-`&&(t=Math.min(0,t)),k!==void 0&&(t=Math.max(k,t)),A!==void 0&&(t=Math.min(A,t)),t}let K=H!=null&&H!==``?Number(H):0;function te(){if(N||P||H==null||H===``)return;let e=Number(H);if(!Number.isFinite(e))return;let t=ee(e);t!==e&&G(t)}function q(e){if(N||P)return!1;let t=ee(K+e);return t!==K&&(G(t),!0)}let{start:ne,stop:J}=ld(e=>q(e*E));function re(e){if(e.key===`Enter`){te(),I?.(e);return}if(!oe){I?.(e);return}if(e.key===`ArrowUp`){e.preventDefault(),q(e.shiftKey?E*10:E);return}if(e.key===`ArrowDown`){e.preventDefault(),q(e.shiftKey?-E*10:-E);return}I?.(e)}let ie=w===`-`?`-`:w===`+`?`+`:y,ae=xe(),oe=T&&!N&&!P,se=j===`split`||j===`auto`&&ae,ce=ee(K+E)!==K,le=ee(K-E)!==K,ue={onStart:ne,onStop:J},Y=oe&&!se?(0,f.jsxs)(`div`,{className:(0,l.default)(id.arrows,p?.arrows),style:m?.arrows,children:[(0,f.jsx)(fd,{className:p?.increaseButton,style:m?.increaseButton,label:z.increase,icon:d.faChevronUp,disabled:!ce,direction:1,...ue}),(0,f.jsx)(fd,{className:p?.decreaseButton,style:m?.decreaseButton,label:z.decrease,icon:d.faChevronDown,disabled:!le,direction:-1,...ue})]}):null,de=oe?{role:`spinbutton`,"aria-valuenow":Number.isFinite(K)?K:void 0,"aria-valuemin":k,"aria-valuemax":A,"aria-valuetext":W||void 0}:{},fe=i?!i.touched||!i.hasError():!o,pe=oe&&se,me=(0,f.jsx)(Ji,{label:a,className:(0,l.default)(id.numberInput,{[id.numberInputSplit]:pe},pe?void 0:s,pe?void 0:p?.root,p?.input),style:{...pe?void 0:u,...pe?void 0:m?.root,...m?.input},value:W,onChange:()=>{},formValidator:null,isRequired:V,onBlur:()=>{te(),t.current&&(t.current.touched=!0)},isValid:fe,errorMessage:i?i.touched?i.getCurrentErrorMessage()??``:``:o??``,placeholder:C,readOnly:N,disabled:P,suffix:Y,classNames:Y?{suffix:id.arrowSuffix}:void 0,inputMode:x===0?`numeric`:`decimal`,customInput:(0,f.jsx)(_.NumericFormat,{onValueChange:e=>G(e.floatValue),allowNegative:w==null&&h,decimalSeparator:g,thousandSeparator:v,decimalScale:x,fixedDecimalScale:S,prefix:ie,suffix:b,onKeyDown:re,getInputRef:L,...de,...R})});return pe?(0,f.jsxs)(hn,{className:(0,l.default)(id.split,{[id.splitInvalid]:!fe},s,p?.root),style:{...u,...m?.root},children:[(0,f.jsx)(pd,{className:p?.decreaseButton,style:m?.decreaseButton,label:z.decrease,icon:d.faMinus,disabled:!le,direction:-1,...ue}),me,(0,f.jsx)(pd,{className:p?.increaseButton,style:m?.increaseButton,label:z.increase,icon:d.faPlus,disabled:!ce,direction:1,...ue})]}):me}var hd=md,gd=function(e){return e.Numeric=`numeric`,e.Alphanumeric=`alphanumeric`,e}({}),_d={otpInput:`otpInput_5-tug`,"otpInput-label":`otpInput-label_T9X7O`,otpInputLabel:`otpInput-label_T9X7O`,"otpInput-requiredMark":`otpInput-requiredMark_FNY2c`,otpInputRequiredMark:`otpInput-requiredMark_FNY2c`,"otpInput-boxes":`otpInput-boxes_FhhIF`,otpInputBoxes:`otpInput-boxes_FhhIF`,"otpInput-boxes-shake":`otpInput-boxes-shake_c50KX`,otpInputBoxesShake:`otpInput-boxes-shake_c50KX`,otpInputShake:`otpInputShake_TljCu`,"otpInput-boxWrapper":`otpInput-boxWrapper_ezHbo`,otpInputBoxWrapper:`otpInput-boxWrapper_ezHbo`,"otpInput-box":`otpInput-box_AB6Kx`,otpInputBox:`otpInput-box_AB6Kx`,"otpInput-box-filled":`otpInput-box-filled_npNOF`,otpInputBoxFilled:`otpInput-box-filled_npNOF`,"otpInput-box-error":`otpInput-box-error_8kLDb`,otpInputBoxError:`otpInput-box-error_8kLDb`,"otpInput-separator":`otpInput-separator_SArCq`,otpInputSeparator:`otpInput-separator_SArCq`,"otpInput-disabled":`otpInput-disabled_bzwE9`,otpInputDisabled:`otpInput-disabled_bzwE9`},vd=/[0-9]/g,yd=/[a-zA-Z0-9]/g,bd={field:`One-time code`,digit:(e,t)=>`Digit ${e} of ${t}`};function xd(e,t){let n=t===gd.Alphanumeric?yd:vd;return(e.match(n)||[]).join(``)}function Sd(e){let{length:t=6,value:n,onChange:r=()=>{},onComplete:i=()=>{},formValidator:a=null,charset:o=gd.Numeric,masked:s=!1,groupAfter:u=[],label:d=``,isValid:p=!0,errorMessage:m=``,isRequired:h=!1,clearOnError:g=!1,clearErrorDelay:_=900,disabled:v=!1,autoFocus:y=!1,className:b=``,style:x,classNames:S,styles:C,labels:w,...T}=D(`OtpInput`,e),E=O(`OtpInput`,w,bd),k=(a?a.value:n)??``,[,A]=(0,c.useState)(0),[j,M]=(0,c.useState)(!1),[N,P]=(0,c.useState)(!1),[F,I]=(0,c.useState)(!1),[L,R]=(0,c.useState)(!1),[z,B]=(0,c.useState)(!1),V=(0,c.useRef)([]);(0,c.useEffect)(()=>{if(!a)return;a.validate();let e=()=>A(e=>e+1);return a.registerOnUpdateListener(e),()=>a.removeOnUpdateListener(e)},[a]),(0,c.useEffect)(()=>{if(!y)return;let e=Math.min(k.length,t-1);V.current[e]?.focus()},[]);let H=a?a.touched&&a.hasError():!p||!!m,U=a?a.getCurrentErrorMessage():m||``;H!==z&&(B(H),H&&M(!0),R(H&&g)),(0,c.useEffect)(()=>{if(!j)return;let e=window.setTimeout(()=>M(!1),400);return()=>window.clearTimeout(e)},[j]),(0,c.useEffect)(()=>{if(!L||!g)return;let e=window.setTimeout(()=>{R(!1),W(``),V.current[0]?.focus()},_);return()=>window.clearTimeout(e)},[L,g,_]);function W(e){let n=k.length===t,s=xd(e,o).slice(0,t);a&&a.set(s),r?.(s),s.length===t&&!n&&i?.(s)}function G(e,t){let n=k.split(``);n[e]=t,W(n.join(``))}function ee(e,n){if(v)return;if(n===``){G(e,``);return}let r=xd(n,o);if(!r)return;let i=Math.min(e,k.length);if(n.length>1){K(i,r);return}G(i,r),i<t-1?V.current[i+1]?.focus():V.current[i]?.blur()}function K(e,n){let r=xd(n,o);if(!r)return;let i=k.padEnd(t,` `).split(``),a=e;for(let e of r){if(a>=t)break;i[a]=e,a+=1}W(i.join(``).trimEnd());let s=Math.min(a,t-1);V.current[s]?.focus(),a>=t&&V.current[t-1]?.blur()}function te(e,t){if(v)return;let n=t.clipboardData.getData(`text`);n&&(t.preventDefault(),K(Math.min(e,k.length),n))}function q(e,n){if(!v){if(n.key.length===1&&!n.ctrlKey&&!n.metaKey&&!n.altKey){let r=xd(n.key,o);if(r&&k[e]===r){n.preventDefault(),G(e,r),e<t-1?V.current[e+1]?.focus():V.current[e]?.blur();return}}if(n.key===`Backspace`){if(k[e]){G(e,``);return}e>0&&(n.preventDefault(),G(e-1,``),V.current[e-1]?.focus());return}if(n.key===`Delete`){k[e]&&G(e,``);return}if(n.key===`ArrowLeft`&&e>0){n.preventDefault(),V.current[e-1]?.focus();return}n.key===`ArrowRight`&&e<t-1&&(n.preventDefault(),V.current[e+1]?.focus())}}function ne(e){e.target.select()}function J(){P(!0)}function re(e){e.currentTarget.contains(e.relatedTarget)||(P(!1),a&&(a.touched=!0))}return(0,f.jsxs)(`div`,{...T,className:(0,l.default)(_d.otpInput,v&&_d.otpInputDisabled,b),style:x,children:[d&&(0,f.jsxs)(`div`,{className:(0,l.default)(_d.otpInputLabel,S?.label),style:C?.label,children:[d,h&&(0,f.jsx)(`span`,{className:_d.otpInputRequiredMark,children:` *`})]}),(0,f.jsx)(`div`,{role:`group`,"aria-label":d||E.field,className:(0,l.default)(_d.otpInputBoxes,j&&_d.otpInputBoxesShake,S?.inputs),style:C?.inputs,onFocus:J,onBlur:re,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),children:Array.from({length:t},(e,n)=>{let r=k[n]||``;return(0,f.jsxs)(`div`,{className:_d.otpInputBoxWrapper,children:[(0,f.jsx)(`input`,{ref:e=>{V.current[n]=e},type:s?`password`:`text`,inputMode:o===gd.Numeric?`numeric`:`text`,pattern:o===gd.Numeric?`[0-9]*`:void 0,autoComplete:n===0?`one-time-code`:`off`,maxLength:1,disabled:v,value:r,"aria-label":E.digit(n+1,t),"aria-invalid":H||void 0,className:(0,l.default)(_d.otpInputBox,H&&_d.otpInputBoxError,r&&_d.otpInputBoxFilled,S?.input),style:C?.input,onChange:e=>ee(n,e.target.value),onKeyDown:e=>q(n,e),onPaste:e=>te(n,e),onFocus:ne}),u.includes(n+1)&&n<t-1&&(0,f.jsx)(`span`,{className:(0,l.default)(_d.otpInputSeparator,S?.separator),style:C?.separator})]},n)})}),(0,f.jsx)(Ri,{variant:`error`,message:U,isVisible:H&&(N||F)})]})}var Cd=768;function wd(){let[e,t]=(0,c.useState)(()=>({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<Cd}));return(0,c.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<Cd})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}var Td={overscroll:`overscroll_Ij750`,"overscroll-header":`overscroll-header_S6vYc`,overscrollHeader:`overscroll-header_S6vYc`,"overscroll-header-centered":`overscroll-header-centered_8VlsP`,overscrollHeaderCentered:`overscroll-header-centered_8VlsP`,"overscroll-header-container":`overscroll-header-container_iignp`,overscrollHeaderContainer:`overscroll-header-container_iignp`};function Ed({children:e=null,overscrollContent:t=null,overscrollContentDesktop:n=null,centerHeader:r=!0,min:i=10,max:a=80,start:o=30,unit:s=`%`,mobileOnly:u=!0,onScrollChange:d=()=>{},scrollDisabled:p=!1}){let{isMobileSize:m,height:h}=wd(),g=(0,c.useRef)(null),_=(0,c.useRef)(null),v=(0,c.useRef)(null),y=(0,c.useRef)(!1),b=(0,c.useRef)(null),x=(0,c.useRef)(d);(0,c.useEffect)(()=>{x.current=d});let S=(0,c.useCallback)(e=>{let t;if(s===`%`){if(!v.current)return;let n=v.current.clientHeight;t=Math.max(n*i/100,n-e)}else t=Math.max(i,a-e);_.current&&(_.current.style.height=`${t}px`)},[i,a,s]),C=(0,c.useCallback)(()=>{let e;if(s===`%`){if(!v.current)return;let t=v.current.clientHeight/a*100;e=v.current.clientHeight-o/100*t}else e=a-o;g.current&&(g.current.scrollTop=e,S(e))},[a,o,s,S]);(0,c.useEffect)(()=>{let e=setTimeout(C,100);return()=>clearTimeout(e)},[C]),(0,c.useEffect)(()=>{g.current&&(g.current.style.overflow=p?`hidden`:`auto`)},[p]);let w=(0,c.useRef)(m);(0,c.useEffect)(()=>{m&&!w.current&&C(),w.current=m},[m,C]);let T=(0,c.useRef)(u);(0,c.useEffect)(()=>{!u&&T.current&&C(),T.current=u},[u,C]);let E=(0,c.useRef)(h);(0,c.useEffect)(()=>{m&&h!==E.current&&g.current&&S(g.current.scrollTop),E.current=h},[h,m,S]);function D(e){S(e.currentTarget.scrollTop),y.current||(y.current=!0,x.current(!0)),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{b.current=null,y.current=!1,x.current(!1)},500)}if(u&&!m)return n?(0,f.jsxs)(`div`,{children:[n,e]}):(0,f.jsx)(f.Fragment,{children:e});let O=s===`%`?`${100-i}%`:`calc(100% - ${i}px)`;return(0,f.jsxs)(`div`,{className:Td.overscroll,ref:g,onScroll:D,children:[(0,f.jsx)(`div`,{className:Td.overscrollHeaderContainer,style:{height:`${a}${s}`},ref:v,children:(0,f.jsx)(`div`,{className:(0,l.default)(Td.overscrollHeader,r&&Td.overscrollHeaderCentered),ref:_,children:t})}),(0,f.jsx)(`div`,{style:{minHeight:O},children:e})]})}var Dd={pagination:`pagination_Pbz1I`,"pagination-item":`pagination-item_2SyYK`,paginationItem:`pagination-item_2SyYK`,"pagination-control":`pagination-control_T0gUc`,paginationControl:`pagination-control_T0gUc`,"pagination-item-active":`pagination-item-active_MgtgT`,paginationItemActive:`pagination-item-active_MgtgT`,"pagination-ellipsis":`pagination-ellipsis_jU--t`,paginationEllipsis:`pagination-ellipsis_jU--t`},Od=`dots`,kd={goToPage:e=>`Go to page ${e}`,first:`Go to first page`,previous:`Go to previous page`,next:`Go to next page`,last:`Go to last page`};function Ad(e,t){return t<e?[]:Array.from({length:t-e+1},(t,n)=>e+n)}function jd(e,t){return Math.max(1,Math.min(t,Math.round(e)))}function Md(e,t,n,r){if(n*2+r*2+3>=t)return Ad(1,t);let i=Ad(1,r),a=Ad(t-r+1,t),o=i.length>0?[Od]:[],s=a.length>0?[Od]:[],c=Math.max(e-n,r+1),l=Math.min(e+n,t-r),u=c>r+2,d=l<t-r-1;return!u&&d?[...Ad(1,r+n*2+2),...s,...a]:u&&!d?[...i,...o,...Ad(t-r-n*2-1,t)]:[...i,...o,...Ad(c,l),...s,...a]}function Nd(e){let{total:t,page:n,defaultPage:r=1,onChange:i=()=>{},siblings:a=1,boundaries:o=1,showControls:s=!0,showEdges:u=!1,disabled:p=!1,previousIcon:m=d.faChevronLeft,nextIcon:h=d.faChevronRight,firstIcon:g=d.faAnglesLeft,lastIcon:_=d.faAnglesRight,"aria-label":v=`Pagination`,className:y,style:b,classNames:x,styles:S,labels:C,...w}=D(`Pagination`,e),T=O(`Pagination`,C,kd),E=n!==void 0,[k,A]=(0,c.useState)(r),j=jd(E?n:k,t);if(t<1)return null;function M(e){let n=jd(e,t);n!==j&&(E||A(n),i(n))}let N=(0,l.default)(Dd.paginationControl,x?.control);function P(e,t,n,r,i){return(0,f.jsx)(`button`,{type:`button`,className:N,style:S?.control,"aria-label":t,disabled:p||i,onClick:()=>M(r),children:K(n)},e)}let F=j<=1,I=j>=t;return(0,f.jsxs)(`nav`,{...w,"aria-label":v,className:(0,l.default)(Dd.pagination,x?.root,y),style:{...b,...S?.root},children:[u&&P(`first`,T.first,g,1,F),s&&P(`previous`,T.previous,m,j-1,F),Md(j,t,a,o).map((e,t)=>e===Od?(0,f.jsx)(`span`,{"aria-hidden":`true`,className:(0,l.default)(Dd.paginationEllipsis,x?.ellipsis),style:S?.ellipsis,children:`…`},`dots-${t}`):(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(Dd.paginationItem,e===j&&Dd.paginationItemActive,x?.item),style:S?.item,"aria-label":T.goToPage(e),"aria-current":e===j?`page`:void 0,disabled:p,onClick:()=>M(e),children:e},e)),s&&P(`next`,T.next,h,j+1,I),u&&P(`last`,T.last,_,t,I)]})}var Pd={progressBar:`progressBar_LO0sX`,"progressBar-fill":`progressBar-fill_rt32j`,progressBarFill:`progressBar-fill_rt32j`,"progressBar-fill-end":`progressBar-fill-end_71wL3`,progressBarFillEnd:`progressBar-fill-end_71wL3`,"progressBar-label":`progressBar-label_jWud2`,progressBarLabel:`progressBar-label_jWud2`};function Fd(e){let t=e.replace(`#`,``),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),i=parseInt(t.substring(4,6),16);return(.299*n+.587*r+.114*i)/255>.5?`#000000`:`#ffffff`}function Id({className:e=void 0,total:t=100,progress:n=0,style:r=void 0,classNames:i,styles:a,...o}){function s(){let e=[];return Array.isArray(n)?e.push(...n):typeof n==`object`?e.push(n):e.push({amount:n}),e.map((n,r)=>{let o=t?n.amount/t*100:0;return(0,f.jsx)(`div`,{className:(0,l.default)(Pd.progressBarFill,r===e.length-1&&Pd.progressBarFillEnd,n.class,i?.fill),style:{width:`${o}%`,background:n.color||void 0,...a?.fill},title:n.label?`${n.label}: ${n.amount}`:void 0,children:n.label&&(0,f.jsx)(`div`,{className:(0,l.default)(Pd.progressBarLabel,i?.label),style:{...n.color?{color:Fd(n.color)}:{},...a?.label},children:n.label})},r)})}return(0,f.jsx)(`div`,{...o,className:(0,l.default)(Pd.progressBar,e,i?.root),style:{...r,...a?.root},children:s()})}var Ld=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),Rd={radioGroup:`radioGroup_5PUYO`,"radioGroup-horizontal":`radioGroup-horizontal_cfCch`,radioGroupHorizontal:`radioGroup-horizontal_cfCch`,"radioGroup-disabled":`radioGroup-disabled_O2hKy`,radioGroupDisabled:`radioGroup-disabled_O2hKy`,"radioGroup-error":`radioGroup-error_HVUcn`,radioGroupError:`radioGroup-error_HVUcn`,"radioGroup-radio":`radioGroup-radio_XLU2j`,radioGroupRadio:`radioGroup-radio_XLU2j`,"radioGroup-radio-checked":`radioGroup-radio-checked_AOEJu`,radioGroupRadioChecked:`radioGroup-radio-checked_AOEJu`,"radioGroup-option":`radioGroup-option_QxMeW`,radioGroupOption:`radioGroup-option_QxMeW`,"radioGroup-option-disabled":`radioGroup-option-disabled_Q0y35`,radioGroupOptionDisabled:`radioGroup-option-disabled_Q0y35`,"radioGroup-dot":`radioGroup-dot_Q-4Ge`,radioGroupDot:`radioGroup-dot_Q-4Ge`,"radioGroup-dot-checked":`radioGroup-dot-checked_7djgv`,radioGroupDotChecked:`radioGroup-dot-checked_7djgv`,"radioGroup-text":`radioGroup-text_8ekBs`,radioGroupText:`radioGroup-text_8ekBs`,"radioGroup-label":`radioGroup-label_hJD2S`,radioGroupLabel:`radioGroup-label_hJD2S`,"radioGroup-description":`radioGroup-description_xZSLE`,radioGroupDescription:`radioGroup-description_xZSLE`};function zd(e){let{options:t=[],value:n,defaultValue:r,onChange:i=()=>{},orientation:a=Ld.Vertical,disabled:o=!1,size:s,tabIndex:u=0,formValidator:d=null,errorMessage:p=``,isValid:m=!0,className:h,style:g,classNames:_,styles:v,...y}=D(`RadioGroup`,e),b=(0,c.useRef)([]),x=(0,c.useRef)(d);(0,c.useEffect)(()=>{x.current=d});let[,S]=(0,c.useState)(0),[C,w]=(0,c.useState)(r),[T,E]=(0,c.useState)(!1),[O,k]=(0,c.useState)(!1);(0,c.useEffect)(()=>{if(!d)return;d.validate();let e=()=>S(e=>e+1);return d.registerOnUpdateListener(e),()=>d.removeOnUpdateListener(e)},[d]);let A=d?d.touched&&d.hasError():!m||!!p,j=d?d.getCurrentErrorMessage():p||``,M=n!==void 0&&!d,N=d?d.value:M?n:C;function P(e,t){d?d.set(e):M||w(e),i(e,t)}function F(e){e.currentTarget.contains(e.relatedTarget)||(E(!1),x.current&&(x.current.touched=!0))}let I=t.findIndex(e=>e.value===N),L=t.findIndex(e=>!e.disabled),R=I>=0?I:L;function z(e){b.current[e]?.focus()}function B(e,n,r){if(o||t.length===0)return;let i=n;for(let n=0;n<t.length;n++)if(i=(i+e+t.length)%t.length,!t[i].disabled){z(i),P(t[i].value,r);return}}function V(e,n){let r=t[n];switch(e.key){case`ArrowDown`:case`ArrowRight`:e.preventDefault(),B(1,n,e);break;case`ArrowUp`:case`ArrowLeft`:e.preventDefault(),B(-1,n,e);break;case` `:case`Enter`:e.preventDefault(),!o&&!r.disabled&&P(r.value,e)}}return(0,f.jsxs)(`div`,{...y,role:`radiogroup`,"aria-orientation":a,"aria-disabled":o||void 0,"aria-invalid":A||void 0,className:(0,l.default)(Rd.radioGroup,a===Ld.Horizontal&&Rd.radioGroupHorizontal,o&&Rd.radioGroupDisabled,A&&Rd.radioGroupError,h,_?.root),style:{...s?{"--radio-size":s}:null,...g,...v?.root},onFocus:()=>E(!0),onBlur:F,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),children:[t.map((e,t)=>{let n=e.value===N,r=o||!!e.disabled;return(0,f.jsxs)(`div`,{ref:e=>{b.current[t]=e},role:`radio`,"aria-checked":n,"aria-disabled":r||void 0,tabIndex:r?-1:t===R?u:-1,className:(0,l.default)(Rd.radioGroupOption,n&&Rd.radioGroupOptionChecked,r&&Rd.radioGroupOptionDisabled,_?.option),style:v?.option,onClick:()=>{r||P(e.value)},onKeyDown:e=>V(e,t),children:[(0,f.jsx)(`div`,{className:(0,l.default)(Rd.radioGroupRadio,n&&Rd.radioGroupRadioChecked,_?.radio),style:v?.radio,children:(0,f.jsx)(`div`,{className:(0,l.default)(Rd.radioGroupDot,n&&Rd.radioGroupDotChecked,_?.dot),style:v?.dot})}),(e.label??e.value)!==``&&(0,f.jsxs)(`div`,{className:Rd.radioGroupText,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Rd.radioGroupLabel,_?.label),style:v?.label,children:e.label??e.value}),e.description!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(Rd.radioGroupDescription,_?.description),style:v?.description,children:e.description})]})]},String(e.value))}),(0,f.jsx)(Ri,{variant:`error`,message:j,isVisible:A&&(T||O)})]})}var Bd={rating:`rating_eDKeX`,"rating-disabled":`rating-disabled_Xk0cI`,ratingDisabled:`rating-disabled_Xk0cI`,"rating-readOnly":`rating-readOnly_o8Kx1`,ratingReadOnly:`rating-readOnly_o8Kx1`,"rating-item":`rating-item_4tqx2`,ratingItem:`rating-item_4tqx2`,"rating-iconEmpty":`rating-iconEmpty_3uk2A`,ratingIconEmpty:`rating-iconEmpty_3uk2A`,"rating-iconFilledClip":`rating-iconFilledClip_4aNxG`,ratingIconFilledClip:`rating-iconFilledClip_4aNxG`,"rating-iconFilled":`rating-iconFilled_-rQ58`,ratingIconFilled:`rating-iconFilled_-rQ58`},Vd=4;function Hd(e,t){return Math.max(0,Math.min(t,e))}function Ud(e){let{value:t,defaultValue:n=0,onChange:r=()=>{},max:i=5,allowHalf:a=!1,allowClear:o=!0,readOnly:s=!1,disabled:u=!1,icon:p=d.faStar,"aria-label":m=`Rating`,className:h,style:g,classNames:_,styles:v,...y}=D(`Rating`,e),b=t!==void 0,[x,S]=(0,c.useState)(n),C=Hd(b?t:x,i),[w,T]=(0,c.useState)(null),E=!s&&!u,O=w??C,k=(0,c.useRef)(null),A=(0,c.useRef)(C),j=(0,c.useRef)(!1),M=(0,c.useRef)(0),N=(0,c.useRef)(!1);function P(e){let t=Hd(e,i);b||S(t),r(t)}function F(e){let t=k.current?.getBoundingClientRect();if(!t||t.width===0)return null;let n=Hd((e-t.left)/t.width,1)*i;return a?Math.round(n*2)/2:Math.ceil(n)}function I(e){if(!E)return;e.currentTarget.setPointerCapture?.(e.pointerId),j.current=!0,N.current=!1,M.current=e.clientX,A.current=C;let t=F(e.clientX);t!==null&&T(t)}function L(e){if(!E)return;let t=F(e.clientX);t!==null&&(j.current&&(e.preventDefault(),Math.abs(e.clientX-M.current)>Vd&&(N.current=!0)),T(t))}function R(e){if(!E||!j.current)return;e.currentTarget.releasePointerCapture?.(e.pointerId),j.current=!1;let t=F(e.clientX)??w;t!==null&&P(!N.current&&o&&t===A.current?0:t),T(null)}function z(){E&&!j.current&&T(null)}function B(e){let t=a?.5:1;e.key===`ArrowRight`||e.key===`ArrowUp`?(e.preventDefault(),P(C+t)):e.key===`ArrowLeft`||e.key===`ArrowDown`?(e.preventDefault(),P(C-t)):e.key===`Home`?(e.preventDefault(),P(0)):e.key===`End`&&(e.preventDefault(),P(i))}return(0,f.jsx)(`div`,{...y,ref:k,role:`slider`,"aria-label":m,"aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":C,"aria-valuetext":`${C} out of ${i}`,"aria-readonly":s||void 0,"aria-disabled":u||void 0,tabIndex:E?0:-1,className:(0,l.default)(Bd.rating,u&&Bd.ratingDisabled,s&&Bd.ratingReadOnly,_?.root,h),style:{...g,...v?.root},onKeyDown:E?B:void 0,onPointerDown:E?I:void 0,onPointerMove:E?L:void 0,onPointerUp:E?R:void 0,onPointerCancel:E?R:void 0,onPointerLeave:E?z:void 0,children:Array.from({length:i},(e,t)=>{let n=Math.round(Math.max(0,Math.min(1,O-t))*100);return(0,f.jsxs)(`div`,{className:(0,l.default)(Bd.ratingItem,_?.item),style:v?.item,children:[K(p,{className:(0,l.default)(Bd.ratingIconEmpty,_?.iconEmpty),style:v?.iconEmpty}),(0,f.jsx)(`div`,{className:Bd.ratingIconFilledClip,style:{width:`${n}%`},children:K(p,{className:(0,l.default)(Bd.ratingIconFilled,_?.iconFilled),style:v?.iconFilled})})]},t)})})}var Wd={revealLens:`revealLens_V3Kkk`,"revealLens-background":`revealLens-background_pQyK9`,revealLensBackground:`revealLens-background_pQyK9`,"revealLens-overlay":`revealLens-overlay_NOUoj`,revealLensOverlay:`revealLens-overlay_NOUoj`,"revealLens-overlay-transitioning":`revealLens-overlay-transitioning_-co2e`,revealLensOverlayTransitioning:`revealLens-overlay-transitioning_-co2e`};function Gd(e,t,n,r){let i=Math.max(n-r,0);return`radial-gradient(circle ${n}px at ${e}px ${t}px, transparent ${i}px, transparent ${i}px, white ${n}px)`}function Kd(e,t){e.style.setProperty(`mask-image`,t),e.style.setProperty(`-webkit-mask-image`,t)}function qd(e){e.style.removeProperty(`mask-image`),e.style.removeProperty(`-webkit-mask-image`)}function Jd(e){let{background:t,overlay:n,radius:r=120,feather:i=24,shape:a=`circle`,maskImage:o,disabled:s=!1,className:u,style:d,classNames:p,styles:m,...h}=D(`RevealLens`,e),g=(0,c.useRef)(null),_=(0,c.useRef)(null),v=(e,t)=>{let n=g.current,a=_.current;if(!n||!a)return;let s=n.getBoundingClientRect(),c=e-s.left,l=t-s.top;a.classList.remove(Wd.revealLensOverlayTransitioning),Kd(a,o??Gd(c,l,r,i))},y=()=>{let e=_.current;e&&(e.classList.add(Wd.revealLensOverlayTransitioning),qd(e))},b=e=>{s||(e.currentTarget.setPointerCapture?.(e.pointerId),v(e.clientX,e.clientY))},x=e=>{s||v(e.clientX,e.clientY)},S=e=>{s||e.pointerType===`mouse`||y()},C=e=>{if(s)return;let t=g.current;if(t){let n=t.getBoundingClientRect();if(e.clientX>=n.left&&e.clientX<=n.right&&e.clientY>=n.top&&e.clientY<=n.bottom)return;if(typeof document.elementFromPoint==`function`){let n=document.elementFromPoint(e.clientX,e.clientY);if(n&&t.contains(n))return}}y()};return(0,f.jsxs)(`div`,{...h,ref:g,className:(0,l.default)(Wd.revealLens,u,p?.root),style:{...d,...m?.root},"data-reveal-shape":a,onPointerDown:b,onPointerMove:x,onPointerUp:S,onPointerCancel:C,onPointerLeave:C,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Wd.revealLensBackground,p?.background),style:m?.background,children:t}),(0,f.jsx)(`div`,{ref:_,className:(0,l.default)(Wd.revealLensOverlay,p?.overlay),style:m?.overlay,children:n})]})}var Yd={planCanvas:`planCanvas_7XTdG`,"planCanvas-screen":`planCanvas-screen_lk83X`,planCanvasScreen:`planCanvas-screen_lk83X`,"planCanvas-underlay":`planCanvas-underlay_rpzSl`,planCanvasUnderlay:`planCanvas-underlay_rpzSl`,"planCanvas-grid":`planCanvas-grid_49CmH`,planCanvasGrid:`planCanvas-grid_49CmH`,"planCanvas-rooms":`planCanvas-rooms_UyjEC`,planCanvasRooms:`planCanvas-rooms_UyjEC`,"planCanvas-roomFill":`planCanvas-roomFill_LXlOf`,planCanvasRoomFill:`planCanvas-roomFill_LXlOf`,"planCanvas-roomFill-interactive":`planCanvas-roomFill-interactive_JSU1E`,planCanvasRoomFillInteractive:`planCanvas-roomFill-interactive_JSU1E`,"planCanvas-roomFill-hovered":`planCanvas-roomFill-hovered_7ZXgf`,planCanvasRoomFillHovered:`planCanvas-roomFill-hovered_7ZXgf`,"planCanvas-roomLabel":`planCanvas-roomLabel_GrzE3`,planCanvasRoomLabel:`planCanvas-roomLabel_GrzE3`,"planCanvas-roomName":`planCanvas-roomName_kHAtD`,planCanvasRoomName:`planCanvas-roomName_kHAtD`,"planCanvas-roomArea":`planCanvas-roomArea_X1Tal`,planCanvasRoomArea:`planCanvas-roomArea_X1Tal`,"planCanvas-walls":`planCanvas-walls_G9vXB`,planCanvasWalls:`planCanvas-walls_G9vXB`,"planCanvas-wallOutline":`planCanvas-wallOutline_eWEN-`,planCanvasWallOutline:`planCanvas-wallOutline_eWEN-`,"planCanvas-wallFill":`planCanvas-wallFill_iKHyE`,planCanvasWallFill:`planCanvas-wallFill_iKHyE`,"planCanvas-roomEdgeSelected":`planCanvas-roomEdgeSelected_wQk6B`,planCanvasRoomEdgeSelected:`planCanvas-roomEdgeSelected_wQk6B`,"planCanvas-wallCaps":`planCanvas-wallCaps_ZpLG4`,planCanvasWallCaps:`planCanvas-wallCaps_ZpLG4`,"planCanvas-roomEdgeCaps":`planCanvas-roomEdgeCaps_5Y7lq`,planCanvasRoomEdgeCaps:`planCanvas-roomEdgeCaps_5Y7lq`,"planCanvas-roomEdgeOutline":`planCanvas-roomEdgeOutline_Y1ZwL`,planCanvasRoomEdgeOutline:`planCanvas-roomEdgeOutline_Y1ZwL`,"planCanvas-roomEdgeFill":`planCanvas-roomEdgeFill_Qr9p-`,planCanvasRoomEdgeFill:`planCanvas-roomEdgeFill_Qr9p-`,"planCanvas-wallSelected":`planCanvas-wallSelected_vFNw8`,planCanvasWallSelected:`planCanvas-wallSelected_vFNw8`,"planCanvas-wallHovered":`planCanvas-wallHovered_CFIAR`,planCanvasWallHovered:`planCanvas-wallHovered_CFIAR`,"planCanvas-openings":`planCanvas-openings_1fyX4`,planCanvasOpenings:`planCanvas-openings_1fyX4`,"planCanvas-opening-selected":`planCanvas-opening-selected_Wgl4r`,planCanvasOpeningSelected:`planCanvas-opening-selected_Wgl4r`,"planCanvas-doorLeaf":`planCanvas-doorLeaf_1BEkI`,planCanvasDoorLeaf:`planCanvas-doorLeaf_1BEkI`,"planCanvas-doorSwing":`planCanvas-doorSwing_QCc5i`,planCanvasDoorSwing:`planCanvas-doorSwing_QCc5i`,"planCanvas-windowPane":`planCanvas-windowPane_5q9oQ`,planCanvasWindowPane:`planCanvas-windowPane_5q9oQ`,"planCanvas-opening-hovered":`planCanvas-opening-hovered_NGK0O`,planCanvasOpeningHovered:`planCanvas-opening-hovered_NGK0O`,"planCanvas-opening-hit":`planCanvas-opening-hit_frRch`,planCanvasOpeningHit:`planCanvas-opening-hit_frRch`,"planCanvas-opening-hit-interactive":`planCanvas-opening-hit-interactive_D4ZUY`,planCanvasOpeningHitInteractive:`planCanvas-opening-hit-interactive_D4ZUY`,"planCanvas-opening-outline":`planCanvas-opening-outline_HS2wY`,planCanvasOpeningOutline:`planCanvas-opening-outline_HS2wY`,"planCanvas-jamb":`planCanvas-jamb_e-I9r`,planCanvasJamb:`planCanvas-jamb_e-I9r`,"planCanvas-jamb-highlighted":`planCanvas-jamb-highlighted_rWYxZ`,planCanvasJambHighlighted:`planCanvas-jamb-highlighted_rWYxZ`,"planCanvas-selection":`planCanvas-selection_0a31R`,planCanvasSelection:`planCanvas-selection_0a31R`},Xd=1,Zd=[];function Qd(e){let t=e/1e6;return`${t.toFixed(+(t<10))} m²`}function $d(e){return e.length===0?``:`${e.map((e,t)=>`${t===0?`M`:`L`} ${e.x},${e.y}`).join(` `)} Z`}function ef(e){return[$d(e.outer),...e.holes.map($d)].filter(Boolean).join(` `)}function tf(e){let{ref:t,floor:n,underlay:r,rooms:i,view:a,selection:o=Zd,hovered:s=null,interactiveRooms:u=!1,interactiveOpenings:d=!1,showGrid:p=!1,gridSize:m=100,showRoomLabels:h=!0,showOpeningSymbols:g=!0,getRoomColor:_,renderRoomLabel:v,getRoomLabel:y,formatArea:b=Qd,onRoomActivate:x,onOpeningActivate:S,onBackgroundActivate:C,onHoverChange:w,overlay:T,worldOverlay:E,size:D,className:O,style:k,classNames:A,styles:j,"aria-label":M}=e,N=a.zoom>0?1/a.zoom:1,P=Xd*N,F=(0,c.useMemo)(()=>rl(n),[n]),I=(0,c.useMemo)(()=>r?Object.values(r.walls).flatMap(e=>{let t=r.nodes[e.a],n=r.nodes[e.b];return t&&n?[{id:e.id,x1:t.x,y1:t.y,x2:n.x,y2:n.y}]:[]}):[],[r]),L=e=>({x:(e.x-a.x)*a.zoom,y:(e.y-a.y)*a.zoom}),R=(0,c.useMemo)(()=>{if(!p||m<=0)return null;let e=D.width*N,t=D.height*N,n=m*Math.max(1,10**Math.ceil(Math.log10(e/m/60))),r=Math.floor(a.x/n)*n,i=Math.floor(a.y/n)*n,o=[],s=[];for(let t=r;t<=a.x+e;t+=n)o.push(t);for(let e=i;e<=a.y+t;e+=n)s.push(e);return{verticals:o,horizontals:s,step:n,worldW:e,worldH:t}},[p,m,D.width,D.height,N,a.x,a.y]),z=(e,t)=>o.some(n=>n.type===e&&n.id===t),B=(e,t)=>s?.type===e&&s.id===t,V=(0,c.useMemo)(()=>{let e=new Set(o.filter(e=>e.type===`room`).map(e=>e.id)),t=new Set;for(let n of i)if(n.roomId&&e.has(n.roomId))for(let e of n.wallIds)t.add(e);return t},[i,o]),H=(0,c.useMemo)(()=>V.size>0?rl(n,{wallIds:V}):{groups:[],caps:[]},[n,V]);function U(e){let t=el(n,e);if(!t)return null;let r=n.walls[e.wallId],i=r?r.thickness/2:50,{p1:a,p2:o,normal:s,dir:c,centre:u}=t,p=z(`opening`,e.id),m=B(`opening`,e.id),h=Math.hypot(o.x-a.x,o.y-a.y),_=[];if(g&&e.kind===xs.Door){let t=e.swing!==`endLeft`&&e.swing!==`endRight`,n=t?a:o,r=t?1:-1,i={x:n.x+s.x*h,y:n.y+s.y*h},l={x:n.x+c.x*h*r,y:n.y+c.y*h*r};_.push((0,f.jsx)(`path`,{className:Yd.planCanvasDoorLeaf,d:`M ${n.x},${n.y} L ${i.x},${i.y}`,strokeWidth:P},`leaf`),(0,f.jsx)(`path`,{className:Yd.planCanvasDoorSwing,d:`M ${i.x},${i.y} A ${h},${h} 0 0,${+!t} ${l.x},${l.y}`,strokeWidth:P},`swing`))}g&&e.kind===xs.Window&&_.push((0,f.jsx)(`path`,{className:Yd.planCanvasWindowPane,d:`M ${a.x},${a.y} L ${o.x},${o.y}`,strokeWidth:P*2},`pane`));let v=`M ${a.x+s.x*i},${a.y+s.y*i} L ${o.x+s.x*i},${o.y+s.y*i} L ${o.x-s.x*i},${o.y-s.y*i} L ${a.x-s.x*i},${a.y-s.y*i} Z`;return(0,f.jsxs)(`g`,{className:(0,l.default)(p&&Yd.planCanvasOpeningSelected,m&&Yd.planCanvasOpeningHovered,A?.opening),style:j?.opening,"data-opening-kind":e.kind,children:[_,(0,f.jsx)(`path`,{className:(0,l.default)(Yd.planCanvasOpeningHit,d&&Yd.planCanvasOpeningHitInteractive),d:v,onClick:d&&S?t=>{t.stopPropagation(),S(e.id)}:void 0,onPointerEnter:w?()=>w({type:`opening`,id:e.id}):void 0,children:d&&(0,f.jsx)(`title`,{children:e.kind})}),(p||m)&&(0,f.jsx)(`path`,{className:Yd.planCanvasOpeningOutline,d:v,vectorEffect:`non-scaling-stroke`}),(0,f.jsx)(`path`,{className:(0,l.default)(Yd.planCanvasJamb,V.has(e.wallId)&&Yd.planCanvasJambHighlighted),d:`M ${a.x-s.x*i},${a.y-s.y*i} L ${a.x+s.x*i},${a.y+s.y*i} M ${o.x-s.x*i},${o.y-s.y*i} L ${o.x+s.x*i},${o.y+s.y*i}`,strokeWidth:P}),u&&null]},e.id)}return(0,f.jsxs)(`svg`,{ref:t,className:(0,l.default)(Yd.planCanvas,O,A?.canvas),style:{...k,...j?.canvas},viewBox:`0 0 ${Math.max(1,D.width)} ${Math.max(1,D.height)}`,width:D.width,height:D.height,role:`img`,"aria-label":M,onClick:C?()=>C():void 0,onPointerLeave:w?()=>w(null):void 0,children:[(0,f.jsxs)(`g`,{transform:`translate(${-a.x*a.zoom} ${-a.y*a.zoom}) scale(${a.zoom})`,children:[R&&(0,f.jsxs)(`g`,{className:(0,l.default)(Yd.planCanvasGrid,A?.grid),style:j?.grid,"aria-hidden":`true`,children:[R.verticals.map(e=>(0,f.jsx)(`line`,{x1:e,y1:a.y,x2:e,y2:a.y+R.worldH,strokeWidth:N},`v${e}`)),R.horizontals.map(e=>(0,f.jsx)(`line`,{x1:a.x,y1:e,x2:a.x+R.worldW,y2:e,strokeWidth:N},`h${e}`))]}),I.length>0&&(0,f.jsx)(`g`,{className:(0,l.default)(Yd.planCanvasUnderlay,A?.underlay),style:j?.underlay,"aria-hidden":`true`,children:I.map(e=>(0,f.jsx)(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,strokeWidth:1.5},e.id))}),(0,f.jsx)(`g`,{className:(0,l.default)(Yd.planCanvasRooms,A?.rooms),style:j?.rooms,children:i.map(e=>{let t=e.roomId?z(`room`,e.roomId):!1,n=e.roomId?B(`room`,e.roomId):!1,r=e.meta?_?.(e.meta,e.area):void 0,i=y?.(e.meta,{area:e.area})??`${e.meta?.name??`Unnamed room`}, ${b(e.area)}`;return(0,f.jsx)(`path`,{className:(0,l.default)(Yd.planCanvasRoomFill,n&&Yd.planCanvasRoomFillHovered,u&&Yd.planCanvasRoomFillInteractive,A?.roomFill),"data-state":t?`selected`:n?`hovered`:void 0,style:{...j?.roomFill,...r?{fill:r}:null},d:ef(e),fillRule:`evenodd`,tabIndex:u?0:void 0,role:u?`button`:void 0,"aria-pressed":u?t:void 0,onClick:u&&x&&e.roomId?t=>{t.stopPropagation(),x(e.roomId)}:void 0,onKeyDown:u&&x&&e.roomId?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),x(e.roomId))}:void 0,onPointerEnter:w&&e.roomId?()=>w({type:`room`,id:e.roomId}):void 0,children:u&&(0,f.jsx)(`title`,{children:i})},e.id)})}),(0,f.jsxs)(`g`,{className:(0,l.default)(Yd.planCanvasWalls,A?.walls),style:j?.walls,"aria-hidden":`true`,children:[(0,f.jsx)(`g`,{className:Yd.planCanvasWallOutline,children:F.groups.map(e=>(0,f.jsx)(`path`,{className:A?.wallBody,style:j?.wallBody,d:e.d,strokeWidth:e.thickness},`o${e.thickness}`))}),(0,f.jsx)(`g`,{className:Yd.planCanvasWallFill,children:F.groups.map(e=>{let t=e.thickness-2*P;return t<=0?null:(0,f.jsx)(`path`,{d:e.d,strokeWidth:t},`f${e.thickness}`)})}),(0,f.jsxs)(`g`,{className:Yd.planCanvasRoomEdgeSelected,children:[H.groups.map(e=>(0,f.jsx)(`path`,{className:Yd.planCanvasRoomEdgeOutline,d:e.d,strokeWidth:e.thickness},`o${e.thickness}`)),H.groups.map(e=>{let t=e.thickness-2*P;return t<=0?null:(0,f.jsx)(`path`,{className:Yd.planCanvasRoomEdgeFill,d:e.d,strokeWidth:t},`f${e.thickness}`)})]}),(0,f.jsx)(`g`,{className:Yd.planCanvasWallCaps,children:F.caps.filter(e=>!V.has(e.wallId)).map((e,t)=>(0,f.jsx)(`line`,{x1:e.a.x,y1:e.a.y,x2:e.b.x,y2:e.b.y,strokeWidth:P},`${e.wallId}-${e.reason}-${t}`))}),(0,f.jsx)(`g`,{className:Yd.planCanvasRoomEdgeCaps,children:H.caps.map((e,t)=>(0,f.jsx)(`line`,{x1:e.a.x,y1:e.a.y,x2:e.b.x,y2:e.b.y,strokeWidth:P},`${e.wallId}-${e.reason}-${t}`))})]}),(0,f.jsx)(`g`,{className:(0,l.default)(Yd.planCanvasOpenings,A?.openings),style:j?.openings,children:Object.values(n.openings).map(U)}),(0,f.jsxs)(`g`,{className:Yd.planCanvasSelection,"aria-hidden":`true`,children:[o.filter(e=>e.type===`wall`).map(e=>{let t=n.walls[e.id];if(!t)return null;let r=n.nodes[t.a],i=n.nodes[t.b];return!r||!i?null:(0,f.jsx)(`line`,{x1:r.x,y1:r.y,x2:i.x,y2:i.y,strokeWidth:t.thickness,className:Yd.planCanvasWallSelected},e.id)}),s?.type===`wall`&&!z(`wall`,s.id)&&(()=>{let e=n.walls[s.id];if(!e)return null;let t=n.nodes[e.a],r=n.nodes[e.b];return!t||!r?null:(0,f.jsx)(`line`,{x1:t.x,y1:t.y,x2:r.x,y2:r.y,strokeWidth:e.thickness,className:Yd.planCanvasWallHovered})})()]}),E]}),(0,f.jsxs)(`g`,{className:(0,l.default)(Yd.planCanvasScreen,A?.overlay),style:j?.overlay,children:[h&&i.map(e=>{let t=L(e.anchor);if(t.x<-200||t.y<-200||t.x>D.width+200||t.y>D.height+200)return null;let n=v?.(e.meta,{area:e.area,faceId:e.id});return n===null?null:(0,f.jsx)(`g`,{className:(0,l.default)(Yd.planCanvasRoomLabel,A?.roomLabel),style:j?.roomLabel,transform:`translate(${t.x} ${t.y})`,"aria-hidden":`true`,children:n===void 0?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`text`,{className:Yd.planCanvasRoomName,textAnchor:`middle`,children:e.meta?.name??``}),(0,f.jsx)(`text`,{className:Yd.planCanvasRoomArea,textAnchor:`middle`,dy:`1.2em`,children:b(e.area)})]}):n},e.id)}),T]})]})}var nf=500;function rf(e,t=50){let[n,r]=(0,c.useState)(e),i=(0,c.useRef)([]),a=(0,c.useRef)([]),o=(0,c.useRef)(null),s=(0,c.useRef)(e),l=(0,c.useRef)(null),[,u]=(0,c.useState)(0),d=(0,c.useCallback)(e=>{s.current=e,r(e)},[]),f=(0,c.useCallback)(e=>{i.current=[...i.current,e].slice(-t),a.current=[]},[t]),p=(0,c.useCallback)(()=>{o.current=s.current},[]),m=(0,c.useCallback)(e=>{d(e)},[d]),h=(0,c.useCallback)(()=>{let e=o.current;return o.current=null,!e||e===s.current?!1:(f(e),l.current=null,u(e=>e+1),!0)},[f]),g=(0,c.useCallback)(()=>{let e=o.current;return o.current=null,e?(d(e),e):null},[d]),_=(0,c.useCallback)((e,t,n=[])=>{if(e===s.current)return;let r=n.join(`,`),o=Date.now(),c=l.current;c!==null&&c.reason===t&&c.targets===r&&o-c.at<nf&&i.current.length>0?a.current=[]:f(s.current),l.current={reason:t,targets:r,at:o},d(e),u(e=>e+1)},[f,d]),v=(0,c.useCallback)(e=>{d(e)},[d]),y=(0,c.useCallback)(()=>{let e=i.current;if(e.length===0)return null;let t=e[e.length-1];return i.current=e.slice(0,-1),a.current=[s.current,...a.current],l.current=null,d(t),u(e=>e+1),t},[d]),b=(0,c.useCallback)(()=>{let e=a.current;if(e.length===0)return null;let n=e[0];return a.current=e.slice(1),i.current=[...i.current,s.current].slice(-t),l.current=null,d(n),u(e=>e+1),n},[t,d]),x=(0,c.useCallback)(()=>{i.current=[],a.current=[],l.current=null,u(e=>e+1)},[]),S=(0,c.useCallback)(()=>o.current!==null,[]);return{present:n,canUndo:i.current.length>0,canRedo:a.current.length>0,beginGesture:p,updateGesture:m,endGesture:h,cancelGesture:g,commit:_,replace:v,undo:y,redo:b,clearHistory:x,isGestureActive:S}}var $={roomDrawer:`roomDrawer_SJj4-`,"roomDrawer-disabled":`roomDrawer-disabled_VRaTX`,roomDrawerDisabled:`roomDrawer-disabled_VRaTX`,"roomDrawer-toolbar":`roomDrawer-toolbar_55H5p`,roomDrawerToolbar:`roomDrawer-toolbar_55H5p`,"roomDrawer-toolbar-separator":`roomDrawer-toolbar-separator_z-eRp`,roomDrawerToolbarSeparator:`roomDrawer-toolbar-separator_z-eRp`,"roomDrawer-toolButton":`roomDrawer-toolButton_4GtjR`,roomDrawerToolButton:`roomDrawer-toolButton_4GtjR`,"roomDrawer-viewButton":`roomDrawer-viewButton_OnZR6`,roomDrawerViewButton:`roomDrawer-viewButton_OnZR6`,"roomDrawer-toolButtonActive":`roomDrawer-toolButtonActive_-BXua`,roomDrawerToolButtonActive:`roomDrawer-toolButtonActive_-BXua`,"roomDrawer-toolIcon":`roomDrawer-toolIcon_mJ0vT`,roomDrawerToolIcon:`roomDrawer-toolIcon_mJ0vT`,"roomDrawer-viewControls":`roomDrawer-viewControls_TKUQ1`,roomDrawerViewControls:`roomDrawer-viewControls_TKUQ1`,"roomDrawer-zoomLabel":`roomDrawer-zoomLabel_xGvgk`,roomDrawerZoomLabel:`roomDrawer-zoomLabel_xGvgk`,"roomDrawer-floorBar":`roomDrawer-floorBar_PMWOg`,roomDrawerFloorBar:`roomDrawer-floorBar_PMWOg`,"roomDrawer-floorTab":`roomDrawer-floorTab_lvLY-`,roomDrawerFloorTab:`roomDrawer-floorTab_lvLY-`,"roomDrawer-floorTab-active":`roomDrawer-floorTab-active_pB7Oz`,roomDrawerFloorTabActive:`roomDrawer-floorTab-active_pB7Oz`,"roomDrawer-floorTab-add":`roomDrawer-floorTab-add_F46eU`,roomDrawerFloorTabAdd:`roomDrawer-floorTab-add_F46eU`,"roomDrawer-canvasWrapper":`roomDrawer-canvasWrapper_ctjFw`,roomDrawerCanvasWrapper:`roomDrawer-canvasWrapper_ctjFw`,"roomDrawer-canvasWrapper-drawing":`roomDrawer-canvasWrapper-drawing_8kVH2`,roomDrawerCanvasWrapperDrawing:`roomDrawer-canvasWrapper-drawing_8kVH2`,"roomDrawer-preview":`roomDrawer-preview_vqJGn`,roomDrawerPreview:`roomDrawer-preview_vqJGn`,"roomDrawer-marquee":`roomDrawer-marquee_Vbm28`,roomDrawerMarquee:`roomDrawer-marquee_Vbm28`,"roomDrawer-handle":`roomDrawer-handle_AFyj0`,roomDrawerHandle:`roomDrawer-handle_AFyj0`,"roomDrawer-handle-active":`roomDrawer-handle-active_rfh4M`,roomDrawerHandleActive:`roomDrawer-handle-active_rfh4M`,"roomDrawer-toolButtonOn":`roomDrawer-toolButtonOn_et-K9`,roomDrawerToolButtonOn:`roomDrawer-toolButtonOn_et-K9`,"roomDrawer-guide":`roomDrawer-guide_cg7gP`,roomDrawerGuide:`roomDrawer-guide_cg7gP`,"roomDrawer-guide-angle":`roomDrawer-guide-angle_3SLun`,roomDrawerGuideAngle:`roomDrawer-guide-angle_3SLun`,"roomDrawer-snapMarker":`roomDrawer-snapMarker_2SDhf`,roomDrawerSnapMarker:`roomDrawer-snapMarker_2SDhf`,"roomDrawer-measureLine":`roomDrawer-measureLine_Htenn`,roomDrawerMeasureLine:`roomDrawer-measureLine_Htenn`,"roomDrawer-measureLine-hovered":`roomDrawer-measureLine-hovered_f6U9P`,roomDrawerMeasureLineHovered:`roomDrawer-measureLine-hovered_f6U9P`,"roomDrawer-measureGrip":`roomDrawer-measureGrip_OGY0c`,roomDrawerMeasureGrip:`roomDrawer-measureGrip_OGY0c`,"roomDrawer-midHandle":`roomDrawer-midHandle_rJVzW`,roomDrawerMidHandle:`roomDrawer-midHandle_rJVzW`,"roomDrawer-measure":`roomDrawer-measure_N-cse`,roomDrawerMeasure:`roomDrawer-measure_N-cse`,"roomDrawer-measure-locked":`roomDrawer-measure-locked_FiNSg`,roomDrawerMeasureLocked:`roomDrawer-measure-locked_FiNSg`,"roomDrawer-measure-offset":`roomDrawer-measure-offset_IdBYD`,roomDrawerMeasureOffset:`roomDrawer-measure-offset_IdBYD`,"roomDrawer-measure-secondary":`roomDrawer-measure-secondary_DgNzz`,roomDrawerMeasureSecondary:`roomDrawer-measure-secondary_DgNzz`,"roomDrawer-inspector":`roomDrawer-inspector_hOVUl`,roomDrawerInspector:`roomDrawer-inspector_hOVUl`,"roomDrawer-inspector-action":`roomDrawer-inspector-action_zMwML`,roomDrawerInspectorAction:`roomDrawer-inspector-action_zMwML`,"roomDrawer-inspector-label":`roomDrawer-inspector-label_yA6NE`,roomDrawerInspectorLabel:`roomDrawer-inspector-label_yA6NE`,"roomDrawer-inspector-kind":`roomDrawer-inspector-kind_ebNzr`,roomDrawerInspectorKind:`roomDrawer-inspector-kind_ebNzr`,"roomDrawer-inspector-kindEmpty":`roomDrawer-inspector-kindEmpty_JIx7s`,roomDrawerInspectorKindEmpty:`roomDrawer-inspector-kindEmpty_JIx7s`,"roomDrawer-inspector-field":`roomDrawer-inspector-field_-c8za`,roomDrawerInspectorField:`roomDrawer-inspector-field_-c8za`,"roomDrawer-inspector-name":`roomDrawer-inspector-name_3xHLm`,roomDrawerInspectorName:`roomDrawer-inspector-name_3xHLm`,"roomDrawer-inspector-delete":`roomDrawer-inspector-delete_MzEl2`,roomDrawerInspectorDelete:`roomDrawer-inspector-delete_MzEl2`,"roomDrawer-hint":`roomDrawer-hint_3WTFa`,roomDrawerHint:`roomDrawer-hint_3WTFa`,"roomDrawer-hint-report":`roomDrawer-hint-report_oFtGt`,roomDrawerHintReport:`roomDrawer-hint-report_oFtGt`,"roomDrawer-fileInput":`roomDrawer-fileInput_EAZw-`,roomDrawerFileInput:`roomDrawer-fileInput_EAZw-`},af=[`select`,`wall`,`rect`,`door`,`window`,`archway`,`measure`],of={v:`select`,w:`wall`,r:`rect`,d:`door`,n:`window`,a:`archway`,m:`measure`},sf={door:xs.Door,window:xs.Window,archway:xs.Archway},cf={[xs.Door]:`Door`,[xs.Window]:`Window`,[xs.Archway]:`Archway`,[xs.Gap]:`Gap`},lf={[xs.Door]:{width:900,sill:0,head:2100},[xs.Window]:{width:1200,sill:900,head:2100},[xs.Archway]:{width:1200,sill:0,head:2100},[xs.Gap]:{width:1e3,sill:0,head:2500}},uf=1,df=4,ff=[];function pf(e){return e>=1e3?`${(e/1e3).toFixed(2)} m`:`${Math.round(e)} mm`}function mf(e){let t=e/1e6;return`${t.toFixed(+(t<10))} m²`}function hf(e){let t=e*180/Math.PI;return t=(t%360+360)%360,t>180&&(t-=360),`${Math.abs(t)<.05?0:Math.round(t*10)/10}°`}function gf(e){let{ref:t,value:n,defaultValue:r,onChange:i,onChangeEnd:a,floorId:o,defaultFloorId:s,onFloorChange:u,showFloorBar:p=!0,showUnderlay:m=!0,tool:h,defaultTool:g=`select`,onToolChange:_,tools:v=af,selection:y,defaultSelection:b,onSelectionChange:x,multiSelect:S=!0,onHoverChange:C,view:w,defaultView:T,onViewChange:E,minZoom:O=.005,maxZoom:k=2,fitOnMount:A=!0,gridSize:j=100,showGrid:M=!0,snap:N=!0,angleLock:P=!1,constrainAngle:F=45,showSnapGuides:I=!0,wallThickness:L=$s.thickness,wallHeight:R,openingDefaults:z,showMeasurements:B=!0,formatLength:V=pf,formatArea:H=mf,showToolbar:U=!0,showInspector:W=!0,showHint:G=!0,showHistoryControls:ee=!0,showFileControls:te=!0,fileName:q,onImport:ne,historyMode:J=`internal`,historyLimit:re=50,onHistoryChange:ie,readOnly:ae=!1,disabled:oe=!1,canvasHeight:se=`420px`,getRoomColor:le,renderRoomLabel:ue,labels:Y,icons:de,"aria-label":fe,className:pe,style:me,classNames:X,styles:Z,...he}=D(`RoomDrawer`,e),ge=xe(),_e=ge?al:il,ve=(0,c.useRef)(null),ye=(0,c.useRef)(null),be=(0,c.useRef)(null),Se=(0,c.useRef)(null),Ce=(0,c.useRef)({kind:`none`}),we=(0,c.useRef)(new Map),Te=(0,c.useRef)(null),Ee=(0,c.useRef)(!1),De=(0,c.useRef)(!1),Oe=(0,c.useRef)(!1),ke=rf((0,c.useMemo)(()=>r??n??gc(),[]),re),Ae=n!==void 0,je=Ae?n:ke.present;(0,c.useEffect)(()=>{if(Ae&&n){if(n===Se.current){ke.replace(n);return}ke.commit(n,`external`)}},[n,Ae]);let[Me,Ne]=(0,c.useState)(s),Pe=o??Me??je.floors[0]?.id,Q=(0,c.useMemo)(()=>_c(je,Pe)??_c(je)??gc().floors[0],[je,Pe]),[Fe,Ie]=(0,c.useState)(m);(0,c.useEffect)(()=>Ie(m),[m]);let Le=(0,c.useMemo)(()=>Fe?xc(je,Q.id):null,[Fe,je,Q.id]),Re=(0,c.useCallback)(e=>{e!==Q.id&&(o===void 0&&Ne(e),u?.(e))},[Q.id,o,u]),ze=(0,c.useMemo)(()=>Wc(Q),[Q]).rooms,[Be,Ve]=(0,c.useState)(g),He=h??Be,Ue=(0,c.useCallback)(e=>{h===void 0&&Ve(e),_?.(e)},[h,_]),[We,Ge]=(0,c.useState)(b??ff),Ke=y===void 0?We:y,qe=(0,c.useRef)(Ke);qe.current=Ke;let Je=(0,c.useCallback)(e=>{let t=e===null?ff:Array.isArray(e)?e:[e];qe.current=t,y===void 0&&Ge(t),x?.([...t])},[y,x]),Ye=(0,c.useCallback)(e=>{let t=qe.current,n=t.filter(t=>t.type!==e.type||t.id!==e.id);Je(n.length===t.length?[...t,e]:n)},[Je]),Xe=Ke.length===1?Ke[0]:null,Ze=(0,c.useCallback)(e=>{let t=new Set;for(let n of e)if(n.type===`node`)t.add(n.id);else if(n.type===`wall`){let e=Q.walls[n.id];e&&(t.add(e.a),t.add(e.b))}else if(n.type===`room`){let e=ze.find(e=>e.roomId===n.id);for(let n of e?.nodeIds??[])t.add(n)}return t},[Q.walls,ze]),Qe=(0,c.useMemo)(()=>Ze(Ke),[Ze,Ke]),[$e,et]=(0,c.useState)(null),[tt,nt]=(0,c.useState)(T??{x:0,y:0,zoom:.05}),rt=w??tt,it=(0,c.useCallback)(e=>{w===void 0&&nt(e),E?.(e)},[w,E]),[at,ot]=(0,c.useState)({width:800,height:420}),[st,ct]=(0,c.useState)([]),[lt,ut]=(0,c.useState)(null),[dt,ft]=(0,c.useState)(N),[pt,mt]=(0,c.useState)(P);(0,c.useEffect)(()=>ft(N),[N]),(0,c.useEffect)(()=>mt(P),[P]);let[ht,gt]=(0,c.useState)(M);(0,c.useEffect)(()=>gt(M),[M]);let _t=(0,c.useRef)(null),[vt,yt]=(0,c.useState)(null),[bt,xt]=(0,c.useState)([]),St=(0,c.useRef)(0),[Ct,wt]=(0,c.useState)(null),Tt=(0,c.useRef)(null),Et=(0,c.useCallback)(e=>{let t=ol(_e,rt.zoom);for(let n=bt.length-1;n>=0;n--){let r=bt[n];if(Math.hypot(e.x-r.a.x,e.y-r.a.y)<=t.node)return{id:r.id,end:`a`};if(Math.hypot(e.x-r.b.x,e.y-r.b.y)<=t.node)return{id:r.id,end:`b`}}for(let n=bt.length-1;n>=0;n--){let r=bt[n];if(Os(e,r.a,r.b).dist<=t.wall)return{id:r.id}}return null},[bt,_e,rt.zoom]),[Dt,Ot]=(0,c.useState)(null),kt=!ae&&!oe,At=(0,c.useMemo)(()=>{if(st.length<2)return;let e=st[st.length-2],t=st[st.length-1];return Math.atan2(t.y-e.y,t.x-e.x)},[st]);(0,c.useEffect)(()=>{let e=ye.current;if(!e)return;let t=new ResizeObserver(()=>{let t=e.getBoundingClientRect();t.width>0&&t.height>0&&ot({width:Math.round(t.width),height:Math.round(t.height)})});t.observe(e);let n=e.getBoundingClientRect();return n.width>0&&n.height>0&&ot({width:Math.round(n.width),height:Math.round(n.height)}),()=>t.disconnect()},[]);let jt=(0,c.useCallback)((e,t)=>fl(e,t,ye.current?.getBoundingClientRect()??{left:0,top:0},rt),[rt]),Mt=(0,c.useCallback)(e=>({x:(e.x-rt.x)*rt.zoom,y:(e.y-rt.y)*rt.zoom}),[rt]),Nt=(0,c.useCallback)((e,t,n,r,i)=>{let a=dt!==De.current,o=pt!==Oe.current,s=vl(e,{floor:Q,pxToWorld:rt.zoom>0?1/rt.zoom:1,origin:t,referenceAngle:r,excludeNodeIds:n,excludeWallIds:i,options:{enabled:a?[ll.Node,ll.Intersection,ll.Wall,ll.Angle,ll.Extension,ll.Alignment,ll.Grid]:[],gridSize:j,angleStepDeg:o?F:0,toleranceScreenPx:ge?16:10}});return _t.current=s,s},[Q,rt.zoom,dt,pt,j,F,ge]),Pt=(0,c.useCallback)(e=>{let t=Object.values(Q.walls).filter(t=>t.a===e||t.b===e),n=new Set(t.map(e=>e.id)),r=Q.nodes[e];if(!r)return{excludeWallIds:n};let i={x:r.x,y:r.y},a,o=t[0];if(o){let t=o.a===e?o.b:o.a,n=Q.nodes[t];n&&(a=Math.atan2(n.y-r.y,n.x-r.x))}return{origin:i,referenceAngle:a,excludeWallIds:n}},[Q]),Ft=(0,c.useCallback)((e={})=>{let t=e.padding??24,n=jc(Q);if(!n||n.width<=0||n.height<=0){it({x:-1e3,y:-1e3,zoom:.05});return}let r=Math.min((at.width-t*2)/n.width,(at.height-t*2)/n.height),i=Math.max(O,Math.min(k,r));it({x:n.minX-(at.width/i-n.width)/2,y:n.minY-(at.height/i-n.height)/2,zoom:i})},[Q,at.width,at.height,O,k,it]),It=(0,c.useRef)(!1);(0,c.useEffect)(()=>{A&&!It.current&&Object.keys(Q.nodes).length!==0&&(at.width<=1||(It.current=!0,Ft()))},[A,Q,at.width,Ft]);let Lt=(0,c.useCallback)((e,t,n,r=[],o={})=>{if(e===Q)return je;let s=yc(je,e);Se.current=s,n?o.push===!1?ke.replace(s):ke.commit(s,t,r):ke.updateGesture(s);let c={reason:t,committed:n,targetIds:r};return i?.(s,c),n&&a?.(s,c),s},[Q,je,ke,i,a]),Rt=(0,c.useCallback)((e,t,n=[],r={})=>{let i=Kc(ac(e).floor).floor;return Lt(i,t,!0,n,r)},[Lt]);(0,c.useEffect)(()=>{ie?.({canUndo:ke.canUndo,canRedo:ke.canRedo})},[ke.canUndo,ke.canRedo,ie]);let zt=(0,c.useMemo)(()=>Xe?.type===`room`?ze.find(e=>e.roomId===Xe.id)??null:null,[Xe,ze]),Bt=Xe?.type===`wall`?Q.walls[Xe.id]:void 0,Vt=Xe?.type===`opening`?Q.openings[Xe.id]:void 0,Ht=(0,c.useMemo)(()=>{if(!Bt)return null;let e=Q.nodes[Bt.a],t=Q.nodes[Bt.b];return!e||!t?null:{x:(e.x+t.x)/2,y:(e.y+t.y)/2}},[Bt,Q.nodes]),Ut=(0,c.useCallback)(()=>{if(!kt||!Bt)return;let e=Zs(Q,Bt.id,.5);e.result.wallIds&&(Rt(e.floor,`edit-wall`,[e.result.nodeId]),Je({type:`node`,id:e.result.nodeId}))},[kt,Bt,Q,Rt,Je]),Wt=(0,c.useCallback)((e,t,n=new Set)=>{if(e.type===`wall`)return{floor:oc(t,e.id).floor};if(e.type===`opening`)return{floor:fc(t,e.id).floor};if(e.type===`node`){let n=rc(t,e.id,{force:!0});if(n.result)return{floor:n.floor,reselect:{type:`wall`,id:n.result.wallId}};let r=t;for(let n of Object.values(t.walls))(n.a===e.id||n.b===e.id)&&(r=oc(r,n.id,{dissolveCollinear:!1}).floor);return{floor:r}}let r=ze.find(t=>t.roomId===e.id);if(!r)return{floor:t};let i=new Set;for(let t of ze)if(t.roomId!==e.id&&!(t.roomId&&n.has(t.roomId)))for(let e of t.wallIds)i.add(e);let a=t;for(let e of new Set(r.wallIds))i.has(e)||(a=oc(a,e,{dissolveCollinear:!1}).floor);let o={...a.rooms};return delete o[e.id],{floor:{...a,rooms:o}}},[ze]),Gt=(0,c.useCallback)(()=>{let e=qe.current;if(!kt||e.length===0)return;let t={room:0,opening:1,wall:2,node:3},n=[...e].sort((e,n)=>t[e.type]-t[n.type]),r=new Set(n.filter(e=>e.type===`room`).map(e=>e.id)),i=Q,a;for(let e of n){let t=Wt(e,i,r);i=t.floor,n.length===1&&(a=t.reselect)}i!==Q&&(Rt(i,`delete`,n.map(e=>e.id)),Je(a??null))},[kt,Q,Wt,Rt,Je]),Kt=(0,c.useCallback)(()=>{ct(e=>e.length===0?e:[]),yt(null)},[]);(0,c.useEffect)(()=>{Kt()},[He,Kt]);let qt=(0,c.useCallback)(e=>{if(oe)return;if(ve.current?.focus(),Ot(null),we.current.set(e.pointerId,{x:e.clientX,y:e.clientY}),e.currentTarget.setPointerCapture?.(e.pointerId),we.current.size===2){let[e,t]=[...we.current.values()];Ce.current.kind!==`none`&&Ce.current.kind!==`pan`&&ke.cancelGesture(),Ce.current={kind:`pinch`,startDist:Math.hypot(t.x-e.x,t.y-e.y),startView:rt,startMid:{x:(e.x+t.x)/2,y:(e.y+t.y)/2}};return}if(we.current.size>2)return;if(Te.current={client:{x:e.clientX,y:e.clientY},moved:!1},e.button===1||Ee.current){Ce.current={kind:`pan`,startClient:{x:e.clientX,y:e.clientY},startView:rt};return}if(e.button!==0)return;let t=jt(e.clientX,e.clientY);if(!kt){let e=sl(Q,ze,t,ol(_e,rt.zoom));Je(e);return}if(He===`rect`){let e=Nt(t).point;Ce.current={kind:`rect`,start:e,current:e},ke.beginGesture();return}if(He===`measure`){let e=Et(t);if(e){let n=bt.find(t=>t.id===e.id);Ce.current=e.end?{kind:`measureEnd`,id:e.id,end:e.end}:{kind:`measureMove`,id:e.id,startWorld:t,origA:n.a,origB:n.b};return}let n=Nt(t).point;Ce.current={kind:`measure`,start:n,current:n};return}if(He===`wall`){let e=st[st.length-1],n=Nt(t,e,void 0,At).point;if(st.length===0){ct([n]);return}let r=st[st.length-1],i=ec(Q,r,n,{thickness:L,type:bs.Interior,height:R},ol(_e,rt.zoom).node);i.result.wallIds.length>0&&Rt(i.floor,`draw-wall`,i.result.wallIds),st.length>=2&&Math.hypot(n.x-st[0].x,n.y-st[0].y)<ol(_e,rt.zoom).node?Kt():ct(e=>[...e,n]);return}let n=sf[He];if(n){let e=ol(_e,rt.zoom),r=sl(Q,ze,t,e,{accept:[`wall`]});if(r?.type!==`wall`)return;let i=Q.walls[r.id],a=Q.nodes[i.a],o=Q.nodes[i.b],s=Math.hypot(o.x-a.x,o.y-a.y),c=((t.x-a.x)*(o.x-a.x)+(t.y-a.y)*(o.y-a.y))/(s*s||1),l={...lf[n],...z?.[n]},u=uc(Q,{wallId:i.id,kind:n,offset:Math.min(Math.max(c,0),1)*s,width:l.width,sill:l.sill,head:l.head});u.result.openingId&&(Rt(u.floor,`add-opening`,[u.result.openingId]),Je({type:`opening`,id:u.result.openingId}));return}let r=ol(_e,rt.zoom);if(Ht&&Xe?.type===`wall`&&Math.hypot(t.x-Ht.x,t.y-Ht.y)<=r.node){ke.beginGesture(),Ce.current={kind:`wallSplit`,wallId:Xe.id,at:Ht};return}let i=sl(Q,ze,t,r),a=S&&(e.ctrlKey||e.metaKey);if(!i){a||Je(null),Ce.current=S?{kind:`marquee`,start:t,current:t,additive:a,base:qe.current}:{kind:`none`};return}if((e.ctrlKey||e.metaKey)&&i.type===`wall`&&Q.walls[i.id]){let e=Q.walls[i.id];a||Je(i),ke.beginGesture(),Ce.current={kind:`wall`,wallId:i.id,startWorld:t,origA:{...Q.nodes[e.a]},origB:{...Q.nodes[e.b]},moved:!1,detach:!0,toggle:a};return}if(a){Ye(i),Ce.current={kind:`none`};return}if(qe.current.some(e=>e.type===i.type&&e.id===i.id)||Je(i),ke.beginGesture(),qe.current.length>1){let e=[...Ze(qe.current)],n={};for(let t of e){let e=Q.nodes[t];e&&(n[t]={x:e.x,y:e.y})}Ce.current={kind:`room`,nodeIds:e,startWorld:t,orig:n,moved:!1};return}if(i.type===`node`)Ce.current={kind:`node`,nodeId:i.id,moved:!1,...Pt(i.id)};else if(i.type===`wall`){let e=Q.walls[i.id];Ce.current={kind:`wall`,wallId:i.id,startWorld:t,origA:{...Q.nodes[e.a]},origB:{...Q.nodes[e.b]},moved:!1}}else if(i.type===`opening`)Ce.current={kind:`opening`,openingId:i.id,moved:!1};else{let e=ze.find(e=>e.roomId===i.id),n=e?[...new Set(e.nodeIds)]:[],r={};for(let e of n){let t=Q.nodes[e];t&&(r[e]={x:t.x,y:t.y})}Ce.current={kind:`room`,nodeIds:n,startWorld:t,orig:r,moved:!1}}},[oe,kt,rt,He,Q,ze,_e,jt,Nt,st,L,R,z,Rt,Je,Ht,Xe,At,Pt,Ze,S,Ye,ke,Kt,Et,bt]),Jt=(0,c.useCallback)(e=>{if(oe)return;we.current.has(e.pointerId)&&we.current.set(e.pointerId,{x:e.clientX,y:e.clientY});let t=Ce.current;if(t.kind===`pinch`&&we.current.size>=2){let[e,n]=[...we.current.values()],r=Math.hypot(n.x-e.x,n.y-e.y);if(t.startDist<=0)return;let i=Math.max(O,Math.min(k,t.startView.zoom*(r/t.startDist))),a=ye.current?.getBoundingClientRect()??{left:0,top:0},o={x:(e.x+n.x)/2,y:(e.y+n.y)/2},s=fl(t.startMid.x,t.startMid.y,a,t.startView);it({x:s.x-(o.x-a.left)/i,y:s.y-(o.y-a.top)/i,zoom:i});return}if(Te.current){let t=e.clientX-Te.current.client.x,n=e.clientY-Te.current.client.y;Math.hypot(t,n)>df&&(Te.current.moved=!0)}if(t.kind===`pan`){it({x:t.startView.x-(e.clientX-t.startClient.x)/t.startView.zoom,y:t.startView.y-(e.clientY-t.startClient.y)/t.startView.zoom,zoom:t.startView.zoom});return}let n=jt(e.clientX,e.clientY);if(ut(n),t.kind===`none`){if(!kt)return;if(He===`wall`&&st.length>0){let e=Nt(n,st[st.length-1],void 0,At);ut(e.point),yt(e);return}if(He===`select`){let e=sl(Q,ze,n,ol(_e,rt.zoom));cl(e,$e)||(et(e),C?.(e))}He===`measure`&&wt(Et(n)?.id??null);return}if(Te.current?.moved){if(t.kind===`measureEnd`){let e=Nt(n).point;xt(n=>n.map(n=>n.id===t.id?{...n,[t.end]:e}:n)),ut(e);return}if(t.kind===`measureMove`){let e=n.x-t.startWorld.x,r=n.y-t.startWorld.y;xt(n=>n.map(n=>n.id===t.id?{...n,a:{x:t.origA.x+e,y:t.origA.y+r},b:{x:t.origB.x+e,y:t.origB.y+r}}:n));return}if(t.kind===`rect`||t.kind===`measure`){Ce.current={...t,current:Nt(n).point},ut(Nt(n).point);return}if(t.kind===`marquee`){Ce.current={...t,current:n},ut(n);return}if(t.kind===`wallSplit`){let e=Zs(Q,t.wallId,t.at);if(!e.result.wallIds){Ce.current={kind:`none`};return}let r=e.result.nodeId,i=Q.walls[t.wallId],a=i?e.floor.nodes[i.a]:void 0,o=i?e.floor.nodes[i.b]:void 0,s={origin:a?{x:a.x,y:a.y}:void 0,referenceAngle:a&&o?Math.atan2(o.y-a.y,o.x-a.x):void 0,excludeWallIds:new Set(e.result.wallIds)},c=Nt(n,s.origin,new Set([r]),s.referenceAngle,s.excludeWallIds).point;Ce.current={kind:`node`,nodeId:r,moved:!0,...s},Je({type:`node`,id:r}),yt(_t.current),Lt(sc(e.floor,r,c).floor,`move-node`,!1,[r]);return}if(t.kind===`node`){let e=Nt(n,t.origin,new Set([t.nodeId]),t.referenceAngle,t.excludeWallIds).point;yt(_t.current),Ce.current={...t,moved:!0},Lt(sc(Q,t.nodeId,e).floor,`move-node`,!1,[t.nodeId]);return}if(t.kind===`wall`){let e=Q.walls[t.wallId];if(!e)return;let r=t.origB.x-t.origA.x,i=t.origB.y-t.origA.y,a=Math.hypot(r,i);if(a<1e-6)return;let o={x:-i/a,y:r/a},s=(n.x-t.startWorld.x)*o.x+(n.y-t.startWorld.y)*o.y,c=N!==De.current&&j>0?j:1,l=Math.round(s/c)*c,u=Math.max(c,10);if(t.detach){if(Math.abs(l)<u)return;let e=ic(Q,t.wallId,{x:o.x*l,y:o.y*l});if(!e.result)return;Ce.current={...t,detach:!1,toggle:!1,detachedSign:Math.sign(l),moved:!0},Je({type:`wall`,id:t.wallId}),Lt(e.floor,`move-wall`,!1,[t.wallId]);return}let d=sc(Q,e.a,{x:t.origA.x+o.x*l,y:t.origA.y+o.y*l}).floor;d=sc(d,e.b,{x:t.origB.x+o.x*l,y:t.origB.y+o.y*l}).floor,t.detachedSign&&Math.abs(l)<10?(d=ac(d).floor,Ce.current={...t,detachedSign:void 0,moved:!0}):Ce.current={...t,moved:!0},Lt(d,`move-wall`,!1,[t.wallId]);return}if(t.kind===`opening`){let e=Q.openings[t.openingId];if(!e)return;let r=Q.walls[e.wallId],i=Q.nodes[r.a],a=Q.nodes[r.b],o=Math.hypot(a.x-i.x,a.y-i.y),s=((n.x-i.x)*(a.x-i.x)+(n.y-i.y)*(a.y-i.y))/(o*o||1);Ce.current={...t,moved:!0},Lt(dc(Q,t.openingId,{offset:Math.min(Math.max(s,0),1)*o}).floor,`move-opening`,!1,[t.openingId]);return}if(t.kind===`room`){let e=n.x-t.startWorld.x,r=n.y-t.startWorld.y,i=N!==De.current&&j>0?j:1,a=Math.round(e/i)*i,o=Math.round(r/i)*i,s=Q;for(let e of t.nodeIds){let n=t.orig[e];n&&(s=sc(s,e,{x:n.x+a,y:n.y+o}).floor)}Ce.current={...t,moved:!0},Lt(s,`move-room`,!1,t.nodeIds)}}},[oe,kt,He,Q,ze,$e,_e,rt.zoom,O,k,j,N,jt,Nt,Lt,it,Je,st,At,C,Et]),Yt=(0,c.useCallback)((e,t)=>{we.current.delete(e.pointerId);let n=Ce.current;Ce.current={kind:`none`};let r=Te.current?.moved??!1;if(Te.current=null,yt(null),n.kind===`none`||n.kind===`pan`||n.kind===`pinch`)return;if(n.kind===`marquee`){if(t||!r){t&&Je([...n.base]);return}let e=Math.min(n.start.x,n.current.x),i=Math.max(n.start.x,n.current.x),a=Math.min(n.start.y,n.current.y),o=Math.max(n.start.y,n.current.y),s=[];for(let t of Object.values(Q.nodes))t.x>=e&&t.x<=i&&t.y>=a&&t.y<=o&&s.push({type:`node`,id:t.id});if(n.additive){let e=new Set(n.base.map(e=>`${e.type}:${e.id}`));Je([...n.base,...s.filter(t=>!e.has(`${t.type}:${t.id}`))])}else Je(s);return}if(t){let e=ke.cancelGesture();e&&i?.(e,{reason:`external`,committed:!1,targetIds:[]});return}if(n.kind===`measureEnd`||n.kind===`measureMove`)return;if(n.kind===`measure`){let e=Math.hypot(n.current.x-n.start.x,n.current.y-n.start.y);r&&e>uf&&(St.current+=1,xt(e=>[...e,{id:St.current,a:n.start,b:n.current}]));return}if(n.kind===`rect`){if(!r){ke.cancelGesture();return}let e=tc(Q,n.start,n.current,{thickness:L,type:bs.Interior,height:R},ol(_e,rt.zoom).node);if(e.result.wallIds.length===0){ke.cancelGesture();return}let t=ke.endGesture();Rt(e.floor,`draw-rect`,e.result.wallIds,{push:!t});return}if(!r){ke.cancelGesture(),n.kind===`wall`&&n.toggle&&Ye({type:`wall`,id:n.wallId});return}if(n.kind===`node`){let e=Q.nodes[n.nodeId];if(e){let t=ol(_e,rt.zoom).node,r=Object.values(Q.nodes).find(r=>r.id!==n.nodeId&&Math.hypot(r.x-e.x,r.y-e.y)<=t);if(r){let e=ke.endGesture();Rt(nc(Q,r.id,n.nodeId).floor,`move-node`,[r.id],{push:!e}),Je({type:`node`,id:r.id});return}}}let a=ke.endGesture(),o=n.kind===`wall`?`move-wall`:n.kind===`opening`?`move-opening`:n.kind===`room`?`move-room`:`move-node`;Rt(Q,o,[],{push:!a})},[Q,ke,_e,rt.zoom,L,R,Rt,Je,Ye,i]);(0,c.useEffect)(()=>{let e=ye.current;if(!e||oe)return;function t(t){t.preventDefault();let n=e.getBoundingClientRect(),r=Math.exp(-t.deltaY*.002);it((()=>{let e=Xt.current,i=Math.max(O,Math.min(k,e.zoom*r)),a=fl(t.clientX,t.clientY,n,e);return{x:a.x-(t.clientX-n.left)/i,y:a.y-(t.clientY-n.top)/i,zoom:i}})())}return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[oe,O,k,it]);let Xt=(0,c.useRef)(rt);Xt.current=rt;let Zt=(0,c.useCallback)(e=>{let t=Math.max(O,Math.min(k,rt.zoom*e)),n={x:rt.x+at.width/2/rt.zoom,y:rt.y+at.height/2/rt.zoom};it({x:n.x-at.width/2/t,y:n.y-at.height/2/t,zoom:t})},[rt,at,O,k,it]),Qt=(0,c.useCallback)(()=>{if(J===`none`)return;let e=ke.undo();e&&(Se.current=e,i?.(e,{reason:`undo`,committed:!0,targetIds:[]}),a?.(e,{reason:`undo`,committed:!0,targetIds:[]}))},[J,ke,i,a]),$t=(0,c.useCallback)(()=>{if(J===`none`)return;let e=ke.redo();e&&(Se.current=e,i?.(e,{reason:`redo`,committed:!0,targetIds:[]}),a?.(e,{reason:`redo`,committed:!0,targetIds:[]}))},[J,ke,i,a]),en=(0,c.useCallback)(()=>{let e=ze.filter(e=>e.roomId).map(e=>({type:`room`,id:e.roomId}));if(e.length>0){Je(e);return}Je(Object.keys(Q.nodes).map(e=>({type:`node`,id:e})))},[ze,Q.nodes,Je]),tn=(0,c.useCallback)((e,t)=>{if(!kt||Qe.size===0)return;let n=j>0?j:100,r=Oe.current?n*10:n,i=Q;for(let n of Qe){let a=i.nodes[n];a&&(i=sc(i,n,{x:a.x+e*r,y:a.y+t*r}).floor)}Rt(i,`nudge`,[...Qe])},[kt,Qe,Q,j,Rt]),nn=(0,c.useCallback)(e=>{if(oe)return;let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){e.key===`Escape`&&t.blur();return}if(e.key===`Shift`&&(Oe.current=!0),e.key===`Alt`&&(De.current=!0),e.key===` `&&!Ee.current){Ee.current=!0,e.preventDefault();return}let n=e.metaKey||e.ctrlKey;if(n&&e.key.toLowerCase()===`z`){e.preventDefault(),e.shiftKey?$t():Qt();return}if(n&&e.key.toLowerCase()===`a`){e.preventDefault(),S&&en();return}if(n&&e.key.toLowerCase()===`y`){e.preventDefault(),$t();return}if(e.key===`Escape`){st.length>0?Kt():bt.length>0?xt([]):Je(null);return}if(e.key===`Enter`&&He===`wall`){Kt();return}if(e.key===`Delete`||e.key===`Backspace`){if(e.preventDefault(),He===`measure`){Ct!==null&&(xt(e=>e.filter(e=>e.id!==Ct)),wt(null));return}Gt();return}if(e.key===`+`||e.key===`=`){Zt(1.25);return}if(e.key===`-`){Zt(1/1.25);return}if(e.key===`0`){Ft();return}if(e.key.startsWith(`Arrow`)){e.preventDefault();let t={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[e.key];t&&tn(t[0],t[1]);return}let r=e.key.toLowerCase();if(r===`s`){ft(e=>!e);return}if(r===`l`){mt(e=>!e);return}if(r===`g`){gt(e=>!e);return}let i=of[e.key.toLowerCase()];i&&kt&&v.includes(i)&&(Ue(i),Kt())},[oe,kt,v,He,st,bt.length,Ct,$t,Qt,Je,Kt,Gt,Zt,Ft,tn,Ue,S,en]),rn=(0,c.useCallback)((e,t,n)=>{Se.current=e,n?.resetHistory?(ke.clearHistory(),ke.replace(e)):ke.commit(e,t);let r={reason:t,committed:!0,targetIds:[]};i?.(e,r),a?.(e,r)},[ke,i,a]),an=(0,c.useCallback)((e={})=>{let{plan:t,floor:n}=Sc(je,{...e,index:bc(je,Q.id)+1});return rn(t,`add-floor`),Re(n.id),n.id},[je,Q.id,rn,Re]),on=(0,c.useCallback)(()=>{let{plan:e,floor:t}=wc(je,Q.id);return t?(rn(e,`duplicate-floor`),Re(t.id),t.id):null},[je,Q.id,rn,Re]),sn=(0,c.useCallback)(e=>{let t=e??Q.id,n=Cc(je,t);if(n!==je&&(rn(n,`remove-floor`),t===Q.id)){let e=bc(je,t);Re(n.floors[Math.max(0,e-1)].id)}},[je,Q.id,rn,Re]),cn=(0,c.useCallback)((e,t)=>{let n=Oc(je,e,t);n!==je&&rn(n,`move-floor`)},[je,rn]),ln=(0,c.useCallback)((e,t)=>{let n=Ec(je,e,t);n!==je&&rn(n,`edit-floor`)},[je,rn]),un=(0,c.useCallback)((e,t)=>{let n=Dc(je,e,t);n!==je&&rn(n,`rename-floor`)},[je,rn]),dn=(0,c.useCallback)(e=>{let t=(e??q??je.name??``).trim()||`floor-plan`,n=URL.createObjectURL(new Blob([bl(je)],{type:`application/json`})),r=document.createElement(`a`);r.href=n,r.download=t.endsWith(`.json`)?t:`${t}.json`,r.click(),setTimeout(()=>URL.revokeObjectURL(n),0)},[q,je]),fn=(0,c.useCallback)(e=>{let t=Al(e);return t.plan&&rn(t.plan,`import`),Ot(t.plan&&t.issues.length===0?null:t.issues),ne?.(t),t},[ne,rn]),pn=(0,c.useCallback)(e=>{e.text().then(e=>fn(e)).catch(e=>{let t=[`Could not read that file: ${e.message}`];Ot(t),ne?.({plan:null,issues:t})})},[fn,ne]),mn=(0,c.useCallback)(()=>xt([]),[]),hn=(0,c.useCallback)(e=>{e.key===`Shift`&&(Oe.current=!1),e.key===`Alt`&&(De.current=!1),e.key===` `&&(Ee.current=!1)},[]);(0,c.useImperativeHandle)(t,()=>({getPlan:()=>je,setPlan:(e,t)=>rn(e,`import`,t),clear:()=>rn(gc(),`clear`),getFloorId:()=>Q.id,setFloorId:Re,addFloor:e=>an(e),duplicateFloor:on,removeFloor:sn,renameFloor:un,moveFloor:cn,setFloorHeight:ln,clearMeasurements:mn,download:dn,loadJson:fn,undo:Qt,redo:$t,canUndo:()=>J!==`none`&&ke.canUndo,canRedo:()=>J!==`none`&&ke.canRedo,clearHistory:ke.clearHistory,getSelection:()=>[...qe.current],select:Je,addToSelection:e=>{let t=Array.isArray(e)?e:[e],n=new Set(qe.current.map(e=>`${e.type}:${e.id}`));Je([...qe.current,...t.filter(e=>!n.has(`${e.type}:${e.id}`))])},toggleSelection:Ye,selectAll:en,deleteSelection:Gt,getView:()=>rt,setView:it,zoomBy:Zt,fitToContent:Ft,toWorld:jt,toScreen:Mt,getSvgElement:()=>be.current}),[je,ke,rn,Q,Re,an,on,sn,un,cn,ln,mn,dn,fn,Qt,$t,J,Je,Ye,en,Gt,rt,it,Zt,Ft,jt,Mt]);let gn=Ce.current,_n=(0,c.useMemo)(()=>{if(!kt)return null;let e=[],t=[...bt,...gn.kind===`measure`?[{id:-1,a:gn.start,b:gn.current}]:[]];for(let n of t){let t=Mt(n.a),r=Mt(n.b),i=Math.hypot(n.b.x-n.a.x,n.b.y-n.a.y);if(i<uf)continue;let a=Math.atan2(n.b.y-n.a.y,n.b.x-n.a.x),o=-Math.sin(a)*5,s=Math.cos(a)*5,c={x:(t.x+r.x)/2,y:(t.y+r.y)/2};if(e.push((0,f.jsxs)(`g`,{className:(0,l.default)($.roomDrawerMeasureLine,Ct===n.id&&$.roomDrawerMeasureLineHovered,X?.measureLine),children:[(0,f.jsx)(`line`,{x1:t.x,y1:t.y,x2:r.x,y2:r.y}),(0,f.jsx)(`line`,{x1:t.x-o,y1:t.y-s,x2:t.x+o,y2:t.y+s}),(0,f.jsx)(`line`,{x1:r.x-o,y1:r.y-s,x2:r.x+o,y2:r.y+s})]},`measure-${n.id}`)),He===`measure`&&n.id>=0)for(let[i,a]of[[`a`,t],[`b`,r]])e.push((0,f.jsx)(`circle`,{className:$.roomDrawerMeasureGrip,cx:a.x,cy:a.y,r:4},`measure-grip-${n.id}-${i}`));e.push((0,f.jsx)(`text`,{className:(0,l.default)($.roomDrawerMeasure,X?.measureLine),x:c.x,y:c.y-8,textAnchor:`middle`,children:`${V(i)} · ${hf(a)}`},`measure-label-${n.id}`))}if(I&&vt&&(vt.guides.forEach((t,n)=>{let r=Mt(t.a),i=Mt(t.b);e.push((0,f.jsx)(`line`,{className:(0,l.default)($.roomDrawerGuide,t.kind===ll.Angle&&$.roomDrawerGuideAngle),x1:r.x,y1:r.y,x2:i.x,y2:i.y},`guide-${n}`))}),vt.kind!==ll.None&&vt.kind!==ll.Grid)){let t=Mt(vt.point);e.push((0,f.jsx)(`rect`,{className:$.roomDrawerSnapMarker,x:t.x-4,y:t.y-4,width:8,height:8},`snap-marker`))}if(gn.kind===`rect`){let t=Mt(gn.start),n=Mt(gn.current),r=Math.min(t.x,n.x),i=Math.min(t.y,n.y),a=Math.max(t.x,n.x),o=Math.max(t.y,n.y);e.push((0,f.jsx)(`rect`,{className:$.roomDrawerPreview,x:r,y:i,width:a-r,height:o-i},`rect-preview`));let s=Math.abs(gn.current.x-gn.start.x),c=Math.abs(gn.current.y-gn.start.y);B&&(s>0||c>0)&&(e.push((0,f.jsx)(`text`,{className:$.roomDrawerMeasure,x:(r+a)/2,y:i-8,textAnchor:`middle`,children:V(s)},`rect-width`),(0,f.jsx)(`text`,{className:$.roomDrawerMeasure,x:r-8,y:(i+o)/2,textAnchor:`end`,dominantBaseline:`central`,children:V(c)},`rect-height`)),s>0&&c>0&&e.push((0,f.jsx)(`text`,{className:(0,l.default)($.roomDrawerMeasure,$.roomDrawerMeasureSecondary),x:(r+a)/2,y:(i+o)/2,textAnchor:`middle`,dominantBaseline:`central`,children:H(s*c)},`rect-area`)))}if(He===`wall`&&st.length>0){let t=[...st,lt].filter(Boolean).map(Mt);if(e.push((0,f.jsx)(`polyline`,{className:$.roomDrawerPreview,points:t.map(e=>`${e.x},${e.y}`).join(` `),fill:`none`},`chain`)),t.forEach((t,n)=>{e.push((0,f.jsx)(`circle`,{className:$.roomDrawerHandle,cx:t.x,cy:t.y,r:4},`chain-dot-${n}`))}),B&&lt&&st.length>0){let t=st[st.length-1],n=Math.hypot(lt.x-t.x,lt.y-t.y),r=Mt({x:(t.x+lt.x)/2,y:(t.y+lt.y)/2}),i=vt?.kind===ll.Angle;e.push((0,f.jsx)(`text`,{className:(0,l.default)($.roomDrawerMeasure,i&&$.roomDrawerMeasureLocked),x:r.x,y:r.y-8,textAnchor:`middle`,children:`${V(n)} · ${hf(vt?.angleRelativeTo===`reference`&&At!==void 0?Math.atan2(lt.y-t.y,lt.x-t.x)-At:Math.atan2(lt.y-t.y,lt.x-t.x))}${vt?.angleRelativeTo===`reference`?` rel`:``}`},`chain-len`))}}let n=new Set(Ke.filter(e=>e.type===`node`).map(e=>e.id));for(let t of Qe){let r=Q.nodes[t];if(!r)continue;let i=Mt(r);e.push((0,f.jsx)(`circle`,{className:(0,l.default)($.roomDrawerHandle,n.has(t)&&$.roomDrawerHandleActive),cx:i.x,cy:i.y,r:5},`handle-${t}`))}if(gn.kind===`marquee`&&Te.current?.moved){let t=Mt(gn.start),n=Mt(gn.current);e.push((0,f.jsx)(`rect`,{className:$.roomDrawerMarquee,x:Math.min(t.x,n.x),y:Math.min(t.y,n.y),width:Math.abs(n.x-t.x),height:Math.abs(n.y-t.y)},`marquee`))}if(Ht&&gn.kind!==`node`){let t=Mt(Ht);e.push((0,f.jsx)(`circle`,{className:$.roomDrawerMidHandle,cx:t.x,cy:t.y,r:4},`midpoint`))}if(B&&gn.kind===`room`&&gn.moved){let t=new Set(gn.nodeIds),n=gn.nodeIds.find(e=>Q.nodes[e]&&gn.orig[e]);if(n){let t=Q.nodes[n],r=gn.orig[n],i=t.x-r.x,a=t.y-r.y,o=Xe?.type===`room`?ze.find(e=>e.roomId===Xe.id):void 0,s=Mt(o?o.anchor:t);e.push((0,f.jsx)(`text`,{className:(0,l.default)($.roomDrawerMeasure,$.roomDrawerMeasureOffset),x:s.x,y:s.y-26,textAnchor:`middle`,children:`${V(Math.hypot(i,a))} · ${hf(Math.atan2(a,i))}`},`room-offset`))}for(let n of Object.values(Q.walls)){if(t.has(n.a)===t.has(n.b))continue;let r=Q.nodes[n.a],i=Q.nodes[n.b];if(!r||!i)continue;let a=t.has(n.a)?r:i,o=t.has(n.a)?i:r,s=Mt({x:(r.x+i.x)/2,y:(r.y+i.y)/2});e.push((0,f.jsx)(`text`,{className:(0,l.default)($.roomDrawerMeasure,$.roomDrawerMeasureSecondary),x:s.x,y:s.y-8,textAnchor:`middle`,children:`${V(Math.hypot(o.x-a.x,o.y-a.y))} · ${hf(Math.atan2(o.y-a.y,o.x-a.x))}`},`room-stretch-${n.id}`))}}if(B&&(Xe?.type===`node`||Xe?.type===`wall`)){let t=[],n=new Set,r=(e,r,i)=>{if(n.has(e))return;let a=Q.walls[e];a&&(n.add(e),t.push({wall:a,from:r,primary:i}))};if(Xe.type===`node`)for(let e of Object.values(Q.walls))(e.a===Xe.id||e.b===Xe.id)&&r(e.id,Xe.id,!0);else{let e=Q.walls[Xe.id];if(e){r(e.id,e.a,!0);for(let t of Object.values(Q.walls))if(t.id!==e.id)for(let n of[e.a,e.b])(t.a===n||t.b===n)&&r(t.id,n,!1)}}let i=vt?.kind===ll.Angle&&gn.kind!==`none`;for(let{wall:n,from:r,primary:a}of t){let t=Q.nodes[n.a],o=Q.nodes[n.b];if(!t||!o)continue;let s=n.a===r?t:o,c=n.a===r?o:t,u=Mt({x:(t.x+o.x)/2,y:(t.y+o.y)/2});e.push((0,f.jsx)(`text`,{className:(0,l.default)($.roomDrawerMeasure,!a&&$.roomDrawerMeasureSecondary,a&&i&&$.roomDrawerMeasureLocked),x:u.x,y:u.y-8,textAnchor:`middle`,children:`${V(Math.hypot(c.x-s.x,c.y-s.y))} · ${hf(Math.atan2(c.y-s.y,c.x-s.x))}`},`measure-${n.id}`))}}return(0,f.jsx)(f.Fragment,{children:e})},[kt,gn,He,st,lt,Ke,Q,ze,Xe,Qe,Ht,B,I,vt,At,V,H,bt,Ct,X?.measureLine,Mt]),vn={select:{icon:d.faArrowPointer,label:Y?.select??`Select and edit`,key:`V`},wall:{icon:d.faMinus,label:Y?.wall??`Draw walls`,key:`W`},rect:{icon:d.faSquare,label:Y?.rect??`Draw a room`,key:`R`},door:{icon:d.faDoorOpen,label:Y?.door??`Add a door`,key:`D`},window:{icon:d.faWindowMaximize,label:Y?.window??`Add a window`,key:`N`},archway:{icon:d.faExpand,label:Y?.archway??`Add an archway`,key:`A`},measure:{icon:d.faRulerCombined,label:Y?.measure??`Measure`,key:`M`}},yn=kt?He===`wall`?Y?.hintWall??`Click to place corners · Shift for a fixed angle, L to latch it · Click the first corner or press Enter to close`:He===`rect`?Y?.hintRect??`Drag to draw a room`:He===`measure`?Y?.hintMeasure??`Drag to measure · Drag an end or the line to adjust it · Delete removes one, Escape clears them`:sf[He]?Y?.hintOpening??`Click a wall to cut an opening into it`:Y?.hintSelect??(S?`Drag a corner to reshape · Drag a wall to push it, and the room next door moves with it · Ctrl-click or drag a box to select several · Delete to remove`:`Drag a corner to reshape · Drag a wall to push it, and the room next door moves with it · Drag the dot on a selected wall to add a corner · Delete to remove`):``,bn=Ke.length===0?Y?.selectedFloor??`Floor`:Ke.length>1?(Y?.selectedCount??`{count} selected`).replace(`{count}`,String(Ke.length)):Vt?Y?.selectedOpening??cf[Vt.kind]:Bt?Y?.selectedWall??`Wall`:Xe?.type===`room`?Y?.selectedRoom??`Room`:Y?.selectedCorner??`Corner`,xn=kt?v:[];return(0,f.jsxs)(`div`,{...he,ref:ve,className:(0,l.default)($.roomDrawer,oe&&$.roomDrawerDisabled,pe,X?.root),style:{...me,...Z?.root},role:`application`,"aria-label":fe??`Floor plan editor`,tabIndex:oe?-1:0,onKeyDown:nn,onKeyUp:hn,children:[U&&(0,f.jsxs)(`div`,{className:(0,l.default)($.roomDrawerToolbar,X?.toolbar),style:Z?.toolbar,role:`toolbar`,"aria-label":Y?.tools??`Drawing tools`,children:[xn.map(e=>{let t=vn[e];return(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerToolButton,e===He&&$.roomDrawerToolButtonActive,X?.toolButton),style:Z?.toolButton,title:`${t.label} (${t.key})`,"aria-label":t.label,"aria-pressed":e===He,onClick:()=>{Ue(e),Kt()},children:K(de?.[e]??t.icon,{className:(0,l.default)($.roomDrawerToolIcon,X?.toolIcon),style:Z?.toolIcon})},e)}),xn.length>0&&(0,f.jsx)(`span`,{className:$.roomDrawerToolbarSeparator}),kt&&(0,f.jsxs)(f.Fragment,{children:[[{on:dt,toggle:()=>ft(e=>!e),icon:de?.snap??d.faMagnet,label:Y?.snap??`Snap to grid and geometry`,key:`S`},{on:pt,toggle:()=>mt(e=>!e),icon:de?.angleLock??d.faDraftingCompass,label:Y?.angleLock??`Lock to ${F}° angles`,key:`L`},{on:ht,toggle:()=>gt(e=>!e),icon:de?.grid??d.faBorderAll,label:Y?.grid??`Show grid`,key:`G`},...xc(je,Q.id)?[{on:Fe,toggle:()=>Ie(e=>!e),icon:de?.underlay??d.faLayerGroup,label:Y?.underlay??`Show the floor below`,key:`B`}]:[]].map(e=>(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerToolButton,e.on&&$.roomDrawerToolButtonOn,X?.toolButton),style:Z?.toolButton,title:`${e.label} (${e.key})`,"aria-label":e.label,"aria-pressed":e.on,onClick:e.toggle,children:K(e.icon,{className:(0,l.default)($.roomDrawerToolIcon,X?.toolIcon),style:Z?.toolIcon})},e.key)),(0,f.jsx)(`span`,{className:$.roomDrawerToolbarSeparator})]}),ee&&J!==`none`&&kt&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerViewButton,X?.viewButton),style:Z?.viewButton,title:Y?.undo??`Undo`,"aria-label":Y?.undo??`Undo`,disabled:!ke.canUndo,onClick:Qt,children:K(de?.undo??d.faArrowRotateLeft)}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerViewButton,X?.viewButton),style:Z?.viewButton,title:Y?.redo??`Redo`,"aria-label":Y?.redo??`Redo`,disabled:!ke.canRedo,onClick:$t,children:K(de?.redo??d.faArrowRotateRight)}),(0,f.jsx)(`span`,{className:$.roomDrawerToolbarSeparator})]}),te&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerViewButton,X?.viewButton),style:Z?.viewButton,title:Y?.download??`Download plan`,"aria-label":Y?.download??`Download plan`,onClick:()=>dn(),children:K(de?.download??d.faDownload)}),kt&&(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerViewButton,X?.viewButton),style:Z?.viewButton,title:Y?.upload??`Open a plan file`,"aria-label":Y?.upload??`Open a plan file`,onClick:()=>Tt.current?.click(),children:K(de?.upload??d.faUpload)}),(0,f.jsx)(`span`,{className:$.roomDrawerToolbarSeparator})]}),(0,f.jsxs)(`div`,{className:(0,l.default)($.roomDrawerViewControls,X?.viewControls),style:Z?.viewControls,children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerViewButton,X?.viewButton),style:Z?.viewButton,title:Y?.zoomOut??`Zoom out`,"aria-label":Y?.zoomOut??`Zoom out`,onClick:()=>Zt(1/1.25),children:K(de?.zoomOut??d.faMagnifyingGlassMinus)}),(0,f.jsxs)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerZoomLabel,X?.zoomLabel),style:Z?.zoomLabel,title:Y?.fit??`Fit to content`,onClick:()=>Ft(),children:[Math.round(rt.zoom*1e3)/10,`%`]}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerViewButton,X?.viewButton),style:Z?.viewButton,title:Y?.zoomIn??`Zoom in`,"aria-label":Y?.zoomIn??`Zoom in`,onClick:()=>Zt(1.25),children:K(de?.zoomIn??d.faMagnifyingGlassPlus)})]})]}),p&&je.floors.length>0&&(0,f.jsxs)(`div`,{className:(0,l.default)($.roomDrawerFloorBar,X?.floorBar),style:Z?.floorBar,role:`tablist`,"aria-label":Y?.selectedFloor??`Floor`,children:[[...je.floors].reverse().map(e=>(0,f.jsx)(`button`,{type:`button`,role:`tab`,className:(0,l.default)($.roomDrawerFloorTab,e.id===Q.id&&$.roomDrawerFloorTabActive,X?.floorTab),style:Z?.floorTab,"aria-selected":e.id===Q.id,onClick:()=>Re(e.id),children:e.label},e.id)),kt&&(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerFloorTab,$.roomDrawerFloorTabAdd),title:Y?.addFloor??`Add a floor above`,"aria-label":Y?.addFloor??`Add a floor above`,onClick:()=>an(),children:K(de?.addFloor??d.faPlus)})]}),(0,f.jsx)(`div`,{ref:ye,className:(0,l.default)($.roomDrawerCanvasWrapper,kt&&He!==`select`&&$.roomDrawerCanvasWrapperDrawing,X?.canvasWrapper),style:{height:se,...Z?.canvasWrapper},onPointerDown:qt,onPointerMove:Jt,onPointerUp:e=>Yt(e,!1),onPointerCancel:e=>Yt(e,!0),children:(0,f.jsx)(tf,{ref:be,floor:Q,underlay:Le,rooms:ze,view:rt,size:at,selection:Ke,hovered:$e,interactiveRooms:!1,showGrid:ht,gridSize:j,showRoomLabels:!0,formatArea:H,getRoomColor:le,renderRoomLabel:ue,overlay:_n,classNames:X,styles:Z})}),W&&kt&&(0,f.jsxs)(`div`,{className:(0,l.default)($.roomDrawerInspector,X?.inspector),style:Z?.inspector,children:[(0,f.jsx)(`span`,{className:(0,l.default)($.roomDrawerInspectorKind,Ke.length===0&&$.roomDrawerInspectorKindEmpty,X?.inspectorLabel),children:bn}),Ke.length===0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Ji,{className:(0,l.default)($.roomDrawerInspectorName,X?.inspectorField),style:Z?.inspectorField,label:Y?.floorName??`Floor name`,value:Q.label,onChange:e=>un(Q.id,e)}),(0,f.jsx)(hd,{className:(0,l.default)($.roomDrawerInspectorField,X?.inspectorField),style:Z?.inspectorField,label:Y?.floorHeight??`Height (mm)`,title:Y?.storeyHeightHint??`Storey height. The floors above move to sit on top of it.`,value:Q.height,decimalScale:0,min:500,step:100,showArrows:!0,onChange:e=>{e!==void 0&&ln(Q.id,e)}}),je.floors.length>1&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerInspectorAction,X?.inspectorField),style:Z?.inspectorField,title:Y?.moveFloorUp??`Move this floor up`,"aria-label":Y?.moveFloorUp??`Move this floor up`,disabled:bc(je,Q.id)>=je.floors.length-1,onClick:()=>cn(Q.id,bc(je,Q.id)+1),children:K(de?.moveFloorUp??d.faAngleUp)}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerInspectorAction,X?.inspectorField),style:Z?.inspectorField,title:Y?.moveFloorDown??`Move this floor down`,"aria-label":Y?.moveFloorDown??`Move this floor down`,disabled:bc(je,Q.id)<=0,onClick:()=>cn(Q.id,bc(je,Q.id)-1),children:K(de?.moveFloorDown??d.faAngleDown)})]}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerInspectorAction,X?.inspectorField),style:Z?.inspectorField,title:Y?.duplicateFloor??`Copy this floor to a new one above`,onClick:()=>on(),children:K(de?.duplicateFloor??d.faClone)}),je.floors.length>1&&(0,f.jsx)(ce,{className:$.roomDrawerInspectorDelete,icon:de?.delete??d.faTrash,title:Y?.deleteFloor??`Delete this floor`,onClick:()=>sn()})]}),zt?.meta&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Ji,{className:(0,l.default)($.roomDrawerInspectorName,X?.inspectorField),style:Z?.inspectorField,label:Y?.roomName??`Room name`,value:zt.meta.name,onChange:e=>{let t=zt.meta;Rt({...Q,rooms:{...Q.rooms,[t.id]:{...t,name:e}}},`edit-room`,[t.id])}}),(0,f.jsx)(`span`,{className:(0,l.default)($.roomDrawerInspectorLabel,X?.inspectorLabel),children:H(zt.area)})]}),Bt&&(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)($.roomDrawerInspectorAction,X?.inspectorField),style:Z?.inspectorField,onClick:Ut,title:Y?.addCorner??`Add a corner to this wall`,children:Y?.addCorner??`Add corner`}),Bt&&(0,f.jsx)(hd,{className:(0,l.default)($.roomDrawerInspectorField,X?.inspectorField),style:Z?.inspectorField,label:Y?.thickness??`Thickness (mm)`,value:Bt.thickness,decimalScale:0,min:10,showArrows:!0,step:10,onChange:e=>{e!==void 0&&Rt({...Q,walls:{...Q.walls,[Bt.id]:{...Bt,thickness:e}}},`edit-wall`,[Bt.id])}}),Vt&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(hd,{className:(0,l.default)($.roomDrawerInspectorField,X?.inspectorField),style:Z?.inspectorField,label:Y?.width??`Width (mm)`,value:Vt.width,decimalScale:0,min:100,step:50,showArrows:!0,onChange:e=>{e!==void 0&&Rt(dc(Q,Vt.id,{width:e}).floor,`edit-opening`,[Vt.id])}}),(0,f.jsx)(hd,{className:(0,l.default)($.roomDrawerInspectorField,X?.inspectorField),style:Z?.inspectorField,label:Y?.sill??`Sill (mm)`,title:Y?.sillHeightHint??`How far above the floor the opening starts. Stored for a 3D view; it does not change the plan.`,showArrows:!0,value:Vt.sill,decimalScale:0,min:0,step:50,onChange:e=>{e!==void 0&&Rt(dc(Q,Vt.id,{sill:e}).floor,`edit-opening`,[Vt.id])}})]}),Ke.length>0&&(0,f.jsx)(ce,{className:$.roomDrawerInspectorDelete,icon:de?.delete??d.faTrash,title:Y?.deleteSelection??`Delete selection`,onClick:Gt})]}),te&&kt&&(0,f.jsx)(`input`,{ref:Tt,type:`file`,accept:`application/json,.json`,className:$.roomDrawerFileInput,tabIndex:-1,"aria-hidden":`true`,onChange:e=>{let t=e.target.files?.[0];e.target.value=``,t&&pn(t)}}),G&&(Dt!==null||yn)&&(0,f.jsx)(`div`,{className:(0,l.default)($.roomDrawerHint,Dt!==null&&$.roomDrawerHintReport,X?.hint),style:Z?.hint,role:Dt===null?void 0:`status`,children:Dt===null?yn:Dt.length===0?Y?.importFailed??`That file could not be read as a floor plan`:Dt.join(` · `)})]})}var _f={roomViewer:`roomViewer_JtBDo`,"roomViewer-floorBar":`roomViewer-floorBar_Svfsf`,roomViewerFloorBar:`roomViewer-floorBar_Svfsf`,"roomViewer-floorTab":`roomViewer-floorTab_eH3Nl`,roomViewerFloorTab:`roomViewer-floorTab_eH3Nl`,"roomViewer-floorTab-active":`roomViewer-floorTab-active_3ZQv9`,roomViewerFloorTabActive:`roomViewer-floorTab-active_3ZQv9`,"roomViewer-canvasWrapper":`roomViewer-canvasWrapper_UopaD`,roomViewerCanvasWrapper:`roomViewer-canvasWrapper_UopaD`,"roomViewer-canvasWrapper-pannable":`roomViewer-canvasWrapper-pannable_-Knr7`,roomViewerCanvasWrapperPannable:`roomViewer-canvasWrapper-pannable_-Knr7`,"roomViewer-viewControls":`roomViewer-viewControls_XNVTI`,roomViewerViewControls:`roomViewer-viewControls_XNVTI`,"roomViewer-viewButton":`roomViewer-viewButton_Q-o9G`,roomViewerViewButton:`roomViewer-viewButton_Q-o9G`,"roomViewer-empty":`roomViewer-empty_LL-4L`,roomViewerEmpty:`roomViewer-empty_LL-4L`,"roomViewer-live":`roomViewer-live_WSwUx`,roomViewerLive:`roomViewer-live_WSwUx`},vf=.002,yf=4,bf=4;function xf(e){let t=e/1e6;return`${t<10?t.toFixed(1):Math.round(t)} m²`}function Sf(e){let{ref:t,plan:n,activeFloorId:r,defaultActiveFloorId:i,onFloorChange:a,selectedRoomId:o,defaultSelectedRoomId:s=null,onSelect:u,hoveredRoomId:p,onHoverChange:m,view:h,defaultView:g,onViewChange:_,interactive:v=!0,pannable:y=!0,fitOnMount:b=!0,showFloorBar:x=!0,showViewControls:S=!0,showGrid:C=!1,showRoomLabels:w=!0,showOpeningSymbols:T=!0,getRoomColor:E,renderRoomLabel:O,getRoomLabel:k,formatArea:A=xf,height:j=360,emptyState:M,labels:N,icons:P,className:F,style:I,classNames:L,styles:R,"aria-label":z,...B}=D(`RoomViewer`,e),V=(0,c.useRef)(null),H=(0,c.useRef)(null),U=(0,c.useId)().replace(/:/g,``),W=n?.floors??[],[G,ee]=(0,c.useState)(i),te=r??G??W[0]?.id,q=(0,c.useMemo)(()=>n?_c(n,te)??_c(n):null,[n,te]),ne=(0,c.useCallback)(e=>{r===void 0&&ee(e),a?.(e)},[r,a]),J=(0,c.useMemo)(()=>q?Wc(q).rooms:[],[q]),[re,ie]=(0,c.useState)(s),ae=o===void 0?re:o,[oe,se]=(0,c.useState)(null),ce=p===void 0?oe:p,le=(0,c.useCallback)(e=>{o===void 0&&ie(e);let t=e?J.find(t=>t.roomId===e)??null:null;u?.(e,t,q?.id??``)},[o,J,u,q?.id]),ue=(0,c.useCallback)(e=>{p===void 0&&se(e),m?.(e)},[p,m]),Y=(()=>{let e=ae?J.find(e=>e.roomId===ae):void 0;if(!e)return N?.noRoomSelected??`No room selected`;let t=e.meta?.name||`Unnamed room`;return(N?.selectedRoom??`{name} selected, {area}`).replace(`{name}`,t).replace(`{area}`,A(e.area))})(),[de,fe]=(0,c.useState)(g??{x:0,y:0,zoom:.05}),pe=h??de,me=(0,c.useRef)(pe);me.current=pe;let X=(0,c.useCallback)(e=>{h===void 0&&fe(e),_?.(e)},[h,_]),Z=(0,c.useRef)(!1),[he,ge]=(0,c.useState)({width:800,height:360});(0,c.useEffect)(()=>{let e=V.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();t.width>0&&t.height>0&&ge({width:Math.round(t.width),height:Math.round(t.height)})},n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[]);let _e=(0,c.useCallback)((e={})=>{let t=e.padding??24,n=q?jc(q):null;if(!n||n.width<=0||n.height<=0){X({x:-1e3,y:-1e3,zoom:.05});return}let r=Math.max(vf,Math.min(yf,Math.min((he.width-t*2)/n.width,(he.height-t*2)/n.height)));X({x:n.minX-(he.width/r-n.width)/2,y:n.minY-(he.height/r-n.height)/2,zoom:r})},[q,he.width,he.height,X]);(0,c.useEffect)(()=>{b&&!Z.current&&(!q||he.width<=0||Object.keys(q.nodes).length===0||_e())},[b,q,he.width,he.height,_e]);let ve=(0,c.useCallback)((e,t)=>{Z.current=!0;let n=me.current,r=Math.max(vf,Math.min(yf,n.zoom*e));if(r===n.zoom)return;let i=t?.x??he.width/2,a=t?.y??he.height/2;X({x:n.x+i/n.zoom-i/r,y:n.y+a/n.zoom-a/r,zoom:r})},[X,he.width,he.height]),ye=(0,c.useRef)(new Map),be=(0,c.useRef)(null),xe=(0,c.useRef)(null),Se=(0,c.useCallback)(e=>{if(y){if(ye.current.set(e.pointerId,{x:e.clientX,y:e.clientY}),ye.current.size===2){let[e,t]=[...ye.current.values()];xe.current={dist:Math.hypot(t.x-e.x,t.y-e.y),view:me.current,mid:{x:(e.x+t.x)/2,y:(e.y+t.y)/2}},be.current=null;return}be.current={startClient:{x:e.clientX,y:e.clientY},startView:me.current,moved:!1}}},[y]),Ce=(0,c.useCallback)(e=>{ye.current.has(e.pointerId)&&ye.current.set(e.pointerId,{x:e.clientX,y:e.clientY});let t=xe.current;if(t&&ye.current.size>=2){let[e,n]=[...ye.current.values()],r=Math.hypot(n.x-e.x,n.y-e.y);if(t.dist<=0)return;let i=Math.max(vf,Math.min(yf,t.view.zoom*(r/t.dist))),a=V.current?.getBoundingClientRect()??{left:0,top:0},o={x:(e.x+n.x)/2,y:(e.y+n.y)/2};Z.current=!0;let s=fl(t.mid.x,t.mid.y,a,t.view);X({x:s.x-(o.x-a.left)/i,y:s.y-(o.y-a.top)/i,zoom:i});return}let n=be.current;if(!n)return;let r=e.clientX-n.startClient.x,i=e.clientY-n.startClient.y;!n.moved&&Math.hypot(r,i)<=bf||(n.moved||e.currentTarget.setPointerCapture?.(e.pointerId),n.moved=!0,Z.current=!0,X({x:n.startView.x-r/n.startView.zoom,y:n.startView.y-i/n.startView.zoom,zoom:n.startView.zoom}))},[X]),we=(0,c.useCallback)(e=>{ye.current.delete(e.pointerId),ye.current.size<2&&(xe.current=null),be.current=null},[]);(0,c.useEffect)(()=>{let e=V.current;if(!e||!y)return;let t=t=>{t.preventDefault();let n=e.getBoundingClientRect();ve(t.deltaY<0?1.1:1/1.1,{x:t.clientX-n.left,y:t.clientY-n.top})};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[y,ve]),(0,c.useImperativeHandle)(t,()=>({fitToContent:_e,getView:()=>me.current,setView:X,zoomBy:e=>ve(e),select:le,getFloorId:()=>q?.id??null,setFloorId:ne,getSvgElement:()=>H.current}),[_e,X,ve,le,q?.id,ne]);let Te=(0,c.useMemo)(()=>ae?[{type:`room`,id:ae}]:[],[ae]),Ee=(0,c.useMemo)(()=>ce?{type:`room`,id:ce}:null,[ce]),De=!q||Object.keys(q.walls).length===0;return(0,f.jsxs)(`div`,{...B,className:(0,l.default)(_f.roomViewer,F,L?.root),style:{...I,...R?.root},"aria-label":z??`Floor plan`,children:[x&&W.length>1&&(0,f.jsx)(`div`,{className:(0,l.default)(_f.roomViewerFloorBar,L?.floorBar),style:R?.floorBar,role:`tablist`,"aria-label":N?.floors??`Floors`,children:[...W].reverse().map(e=>(0,f.jsx)(`button`,{type:`button`,role:`tab`,className:(0,l.default)(_f.roomViewerFloorTab,e.id===q?.id&&_f.roomViewerFloorTabActive,L?.floorTab),style:R?.floorTab,"aria-selected":e.id===q?.id,onClick:()=>ne(e.id),children:e.label},e.id))}),(0,f.jsxs)(`div`,{ref:V,className:(0,l.default)(_f.roomViewerCanvasWrapper,y&&_f.roomViewerCanvasWrapperPannable,L?.canvasWrapper),style:{height:j,...R?.canvasWrapper},onPointerDown:Se,onPointerMove:Ce,onPointerUp:we,onPointerCancel:we,children:[De?(0,f.jsx)(`div`,{className:(0,l.default)(_f.roomViewerEmpty,L?.empty),style:R?.empty,children:M??N?.empty??`Nothing to show`}):(0,f.jsx)(tf,{ref:H,floor:q,rooms:J,view:pe,size:he,selection:Te,hovered:Ee,interactiveRooms:v,showGrid:C,showRoomLabels:w,showOpeningSymbols:T,getRoomColor:E,renderRoomLabel:O,getRoomLabel:k,formatArea:A,onRoomActivate:v?e=>le(e):void 0,onBackgroundActivate:v?()=>le(null):void 0,onHoverChange:v?e=>ue(e?.type===`room`?e.id:null):void 0,classNames:{canvas:L?.canvas,grid:L?.grid,rooms:L?.rooms,roomFill:L?.roomFill,roomLabel:L?.roomLabel,walls:L?.walls,wallBody:L?.wallBody,openings:L?.openings,opening:L?.opening},styles:{canvas:R?.canvas,grid:R?.grid,rooms:R?.rooms,roomFill:R?.roomFill,roomLabel:R?.roomLabel,walls:R?.walls,wallBody:R?.wallBody,openings:R?.openings,opening:R?.opening},"aria-label":z??`Floor plan`}),S&&!De&&(0,f.jsxs)(`div`,{className:(0,l.default)(_f.roomViewerViewControls,L?.viewControls),style:R?.viewControls,children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(_f.roomViewerViewButton,L?.viewButton),style:R?.viewButton,title:N?.zoomOut??`Zoom out`,"aria-label":N?.zoomOut??`Zoom out`,onClick:()=>ve(1/1.2),children:K(P?.zoomOut??d.faMagnifyingGlassMinus)}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(_f.roomViewerViewButton,L?.viewButton),style:R?.viewButton,title:N?.fit??`Fit to view`,"aria-label":N?.fit??`Fit to view`,onClick:()=>{Z.current=!1,_e()},children:K(P?.fit??d.faExpand)}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(_f.roomViewerViewButton,L?.viewButton),style:R?.viewButton,title:N?.zoomIn??`Zoom in`,"aria-label":N?.zoomIn??`Zoom in`,onClick:()=>ve(1.2),children:K(P?.zoomIn??d.faMagnifyingGlassPlus)})]})]}),(0,f.jsx)(`div`,{id:U,className:_f.roomViewerLive,role:`status`,"aria-live":`polite`,children:Y})]})}var Cf=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),wf={"scrollFade-vertical":`scrollFade-vertical_48p38`,scrollFadeVertical:`scrollFade-vertical_48p38`,"scrollFade-horizontal":`scrollFade-horizontal_nX2dg`,scrollFadeHorizontal:`scrollFade-horizontal_nX2dg`};function Tf({children:e=null,axis:t=Cf.Vertical,fadeLength:n,isAlwaysFaded:r=!1,className:i,style:a,ref:o,...s}){let u=(0,c.useRef)(null),d=t===Cf.Horizontal,{hasStart:p,hasEnd:m}=ya(u,{axis:t,isEnabled:!r});return(0,f.jsx)(`div`,{...s,ref:gn(u,o),className:(0,l.default)(d?wf.scrollFadeHorizontal:wf.scrollFadeVertical,bi.scrollFade,d?bi.scrollFadeX:bi.scrollFadeY,(r||p)&&bi.scrollFadeFadedStart,(r||m)&&bi.scrollFadeFadedEnd,i),style:{...n?{"--custom-scroll-fade-length":n}:void 0,...a},children:e})}var Ef=function(e){return e.Small=`small`,e.Medium=`medium`,e.Large=`large`,e}({}),Df={sectionHeader:`sectionHeader_X3bNj`,"sectionHeader-leading":`sectionHeader-leading_d6opV`,sectionHeaderLeading:`sectionHeader-leading_d6opV`,"sectionHeader-identity":`sectionHeader-identity_Qmlpt`,sectionHeaderIdentity:`sectionHeader-identity_Qmlpt`,"sectionHeader-titles":`sectionHeader-titles_iN9dT`,sectionHeaderTitles:`sectionHeader-titles_iN9dT`,"sectionHeader-title":`sectionHeader-title_wH--S`,sectionHeaderTitle:`sectionHeader-title_wH--S`,"sectionHeader-subtitle":`sectionHeader-subtitle_WRK3Y`,sectionHeaderSubtitle:`sectionHeader-subtitle_WRK3Y`,"sectionHeader-trailing":`sectionHeader-trailing_ewWDV`,sectionHeaderTrailing:`sectionHeader-trailing_ewWDV`,"sectionHeader-left":`sectionHeader-left_ZUuWs`,sectionHeaderLeft:`sectionHeader-left_ZUuWs`,"sectionHeader-center":`sectionHeader-center_MzSev`,sectionHeaderCenter:`sectionHeader-center_MzSev`,"sectionHeader-actions":`sectionHeader-actions_E40ZS`,sectionHeaderActions:`sectionHeader-actions_E40ZS`,"sectionHeader-divider":`sectionHeader-divider_Ovpev`,sectionHeaderDivider:`sectionHeader-divider_Ovpev`,"sectionHeader-size-small":`sectionHeader-size-small_6OVWE`,sectionHeaderSizeSmall:`sectionHeader-size-small_6OVWE`,"sectionHeader-size-medium":`sectionHeader-size-medium_BVSe6`,sectionHeaderSizeMedium:`sectionHeader-size-medium_BVSe6`,"sectionHeader-size-large":`sectionHeader-size-large_bOZDP`,sectionHeaderSizeLarge:`sectionHeader-size-large_bOZDP`},Of={[Ef.Small]:Df.sectionHeaderSizeSmall,[Ef.Medium]:Df.sectionHeaderSizeMedium,[Ef.Large]:Df.sectionHeaderSizeLarge};function kf(e){let{title:t,subtitle:n,icon:r,thumbnail:i,left:a,center:o,actions:s,level:c=2,size:u=Ef.Medium,divider:d=!1,className:p,style:m,classNames:h,styles:g,..._}=D(`SectionHeader`,e),v=typeof i==`string`&&i.startsWith(`http`)?i:void 0,y=i!=null&&i!==``,b=y||r!=null,x=`h${c}`;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{..._,className:(0,l.default)(Df.sectionHeader,Of[u],p,h?.root),style:{...m,...g?.root},children:[(0,f.jsxs)(`div`,{className:(0,l.default)(Df.sectionHeaderIdentity,h?.identity),style:g?.identity,children:[b&&(0,f.jsx)(`div`,{className:(0,l.default)(Df.sectionHeaderLeading,h?.leading),style:{...v?{backgroundImage:`url(${v})`}:{},...g?.leading},children:y?!v&&i:r?K(r):null}),(0,f.jsxs)(`div`,{className:(0,l.default)(Df.sectionHeaderTitles,h?.titles),style:g?.titles,children:[(0,f.jsx)(x,{className:(0,l.default)(Df.sectionHeaderTitle,h?.title),style:g?.title,title:typeof t==`string`?t:void 0,children:t}),n!=null&&n!==``&&(0,f.jsx)(`div`,{className:(0,l.default)(Df.sectionHeaderSubtitle,h?.subtitle),style:g?.subtitle,children:n})]})]}),(0,f.jsxs)(`div`,{className:(0,l.default)(Df.sectionHeaderTrailing,h?.trailing),style:g?.trailing,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Df.sectionHeaderLeft,h?.left),style:g?.left,children:a}),(0,f.jsx)(`div`,{className:(0,l.default)(Df.sectionHeaderCenter,h?.center),style:g?.center,children:o}),(0,f.jsx)(`div`,{className:(0,l.default)(Df.sectionHeaderActions,h?.actions),style:g?.actions,children:Array.isArray(s)?s.map((e,t)=>(0,f.jsx)(ce,{title:e.title,onClick:e.onClick?t=>{t.stopPropagation(),e.onClick?.(t)}:void 0,icon:e.icon},t)):s})]})]}),d&&(0,f.jsx)(Ko,{className:Df.sectionHeaderDivider})]})}var Af=function(e){return e.Text=`text`,e.Circle=`circle`,e.Rectangular=`rectangular`,e}({}),jf=function(e){return e.Shimmer=`shimmer`,e.Pulse=`pulse`,e.None=`none`,e}({}),Mf={skeleton:`skeleton_TSg1y`,"skeleton-lines":`skeleton-lines_-Z-gf`,skeletonLines:`skeleton-lines_-Z-gf`,"skeleton-line-last":`skeleton-line-last_UFw21`,skeletonLineLast:`skeleton-line-last_UFw21`,"skeleton-text":`skeleton-text_Jlefj`,skeletonText:`skeleton-text_Jlefj`,"skeleton-circle":`skeleton-circle_t0bbj`,skeletonCircle:`skeleton-circle_t0bbj`,"skeleton-rectangular":`skeleton-rectangular_UtIyN`,skeletonRectangular:`skeleton-rectangular_UtIyN`,"skeleton-animation-pulse":`skeleton-animation-pulse_wGbPg`,skeletonAnimationPulse:`skeleton-animation-pulse_wGbPg`,skeletonPulse:`skeletonPulse_06yjn`,"skeleton-animation-shimmer":`skeleton-animation-shimmer_a0nwc`,skeletonAnimationShimmer:`skeleton-animation-shimmer_a0nwc`,skeletonShimmer:`skeletonShimmer_wLPXR`},Nf={[Af.Text]:Mf.skeletonText,[Af.Circle]:Mf.skeletonCircle,[Af.Rectangular]:Mf.skeletonRectangular},Pf={[jf.Shimmer]:Mf.skeletonAnimationShimmer,[jf.Pulse]:Mf.skeletonAnimationPulse,[jf.None]:void 0};function Ff(e){let{variant:t=Af.Text,animation:n=jf.Shimmer,lines:r=1,className:i,style:a,classNames:o,styles:s,...c}=D(`Skeleton`,e),u=Nf[t],d=Pf[n];return t!==Af.Text||r<=1?(0,f.jsx)(`span`,{...c,className:(0,l.default)(Mf.skeleton,u,d,i),style:a}):(0,f.jsx)(`span`,{...c,className:(0,l.default)(Mf.skeletonLines,i),style:a,children:Array.from({length:r},(e,t)=>(0,f.jsx)(`span`,{className:(0,l.default)(Mf.skeleton,u,d,t===r-1&&Mf.skeletonLineLast,o?.line),style:s?.line},t))})}var If={slider:`slider_qmg2W`,"slider-thumb":`slider-thumb_CHuJN`,sliderThumb:`slider-thumb_CHuJN`,"slider-disabled":`slider-disabled_T0o2S`,sliderDisabled:`slider-disabled_T0o2S`,"slider-has-mark-labels":`slider-has-mark-labels_Xw6ZJ`,sliderHasMarkLabels:`slider-has-mark-labels_Xw6ZJ`,"slider-track":`slider-track_UyKYc`,sliderTrack:`slider-track_UyKYc`,"slider-range":`slider-range_exAs9`,sliderRange:`slider-range_exAs9`,"slider-dragging":`slider-dragging_htPFH`,sliderDragging:`slider-dragging_htPFH`,"slider-mark":`slider-mark_fvw-n`,sliderMark:`slider-mark_fvw-n`,"slider-mark-label":`slider-mark-label_iDtU2`,sliderMarkLabel:`slider-mark-label_iDtU2`,"slider-value":`slider-value_3rQgd`,sliderValue:`slider-value_3rQgd`};function Lf(e){let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1}function Rf(e){let{min:t=0,max:n=100,step:r=1,disabled:i=!1,marks:a,showValue:o=!1,formatValue:s,size:u,tabIndex:d=0,className:p,style:m,classNames:h,styles:g,"aria-label":_,range:v,value:y,defaultValue:b,onChange:x,onChangeEnd:S,minRange:C=0,thumbLabels:w,...T}=e,E=x,D=S,O=v===!0,k=(0,c.useRef)(null),A=(0,c.useRef)(null),j=(0,c.useRef)([]),M=(0,c.useRef)(null),[N,P]=(0,c.useState)(!1),F=Lf(r);function I(e){return Math.min(n,Math.max(t,e))}function L(e){let n=Math.round((e-t)/r)*r+t;return Number(I(n).toFixed(F))}function R(e){if(O){let r=e??[t,n];return[I(r[0]),I(r[1])]}return[I(e??t)]}function z(e){let t=O?2:1;return e.length===t?e:O?[e[0],n]:[e[0]]}let B=y!==void 0,[V,H]=(0,c.useState)(()=>R(b)),U=B?R(y):z(V),W=(0,c.useRef)(U);(0,c.useEffect)(()=>{W.current=U},[U]);function G(e){return O?[e[0],e[1]]:e[0]}function ee(e,r){return O?e===0?[t,r[1]-C]:[r[0]+C,n]:[t,n]}function K(e,r,i){let a=W.current,[o,s]=ee(e,a),c=L(r);if(c<o&&(c=Number(Math.max(t,o).toFixed(F))),c>s&&(c=Number(Math.min(n,s).toFixed(F))),c===a[e]){i&&D?.(G(a));return}let l=[...a];l[e]=c,W.current=l,B||H(l),E?.(G(l)),i&&D?.(G(l))}function te(e){let r=k.current;if(!r)return W.current[0];let i=r.getBoundingClientRect(),a=i.width?(e-i.left)/i.width:0;return t+Math.min(1,Math.max(0,a))*(n-t)}function q(e){if(!O)return 0;let[t,n]=W.current,r=Math.abs(e-t),i=Math.abs(e-n);return r===i?+(e>n):r<i?0:1}function ne(e){if(i)return;e.preventDefault();let t=te(e.clientX),n=q(t);(O?j.current[n]:A.current)?.focus(),A.current?.setPointerCapture?.(e.pointerId),M.current=n,P(!0),K(n,t,!1)}function J(e){let t=M.current;t!==null&&K(t,te(e.clientX),!1)}function re(e){M.current!==null&&(M.current=null,P(!1),A.current?.releasePointerCapture?.(e.pointerId),D?.(G(W.current)))}function ie(e,a){if(i)return;let o=r*10,s=U[a],c=null;switch(e.key){case`ArrowRight`:case`ArrowUp`:c=s+r;break;case`ArrowLeft`:case`ArrowDown`:c=s-r;break;case`PageUp`:c=s+o;break;case`PageDown`:c=s-o;break;case`Home`:c=t;break;case`End`:c=n;break;default:return}e.preventDefault(),K(a,c,!0)}let ae=e=>n>t?(I(e)-t)/(n-t):0,oe=e=>`${ae(e)*100}%`,se=O?{left:oe(U[0]),width:`${(ae(U[1])-ae(U[0]))*100}%`}:{width:oe(U[0])},ce=!!a?.some(e=>e.label!=null),le=e=>s?s(e):e;function ue(e){let r=U[e],a=le(r),[o,s]=ee(e,U);return{role:`slider`,"aria-valuemin":Number(Math.max(t,o).toFixed(F)),"aria-valuemax":Number(Math.min(n,s).toFixed(F)),"aria-valuenow":r,"aria-valuetext":typeof a==`string`||typeof a==`number`?String(a):void 0,"aria-orientation":`horizontal`,"aria-disabled":i||void 0}}let Y=O?{role:`group`,"aria-label":_,"aria-disabled":i||void 0}:{...ue(0),"aria-label":_,tabIndex:i?-1:d};return(0,f.jsx)(`div`,{...T,...Y,ref:A,className:(0,l.default)(If.slider,i&&If.sliderDisabled,N&&If.sliderDragging,ce&&If.sliderHasMarkLabels,p,h?.root),style:{...u?{"--slider-thumb-size":u}:null,...m,...g?.root},onPointerDown:ne,onPointerMove:J,onPointerUp:re,onKeyDown:O?void 0:e=>ie(e,0),children:(0,f.jsxs)(`div`,{ref:k,className:(0,l.default)(If.sliderTrack,h?.track),style:g?.track,children:[(0,f.jsx)(`div`,{className:(0,l.default)(If.sliderRange,h?.range),style:{...se,...g?.range}}),a?.map(e=>{let t=oe(e.value);return(0,f.jsxs)(c.default.Fragment,{children:[(0,f.jsx)(`span`,{className:(0,l.default)(If.sliderMark,h?.mark),style:{left:t,...g?.mark}}),e.label!=null&&(0,f.jsx)(`span`,{className:(0,l.default)(If.sliderMarkLabel,h?.markLabel),style:{left:t,...g?.markLabel},children:e.label})]},e.value)}),U.map((e,t)=>(0,f.jsx)(`div`,{ref:e=>{j.current[t]=e},className:(0,l.default)(If.sliderThumb,h?.thumb),style:{left:oe(e),...g?.thumb},...O?{...ue(t),"aria-label":w?.[t]??(t===0?`From`:`To`),tabIndex:i?-1:d,onKeyDown:e=>ie(e,t)}:{},children:o&&(0,f.jsx)(`span`,{className:(0,l.default)(If.sliderValue,h?.value),style:g?.value,children:le(e)})},t))]})})}var zf={splitButton:`splitButton_5ak5W`,splitButtonPrimary:`splitButtonPrimary_4mVy8`,splitButtonTrigger:`splitButtonTrigger_32cQA`},Bf={moreActions:`More actions`};function Vf(e){let{children:t,onClick:n=()=>{},actions:r=[],styleType:i=z.Primary,size:a=B.Default,disabled:o=!1,isLoading:s=!1,align:u=Tt.End,className:p,style:m,classNames:h,styles:g,labels:_,...v}=D(`SplitButton`,e),y=O(`SplitButton`,_,Bf),[b,x]=(0,c.useState)(!1),[S,C]=(0,c.useState)(o);return o!==S&&(C(o),o&&x(!1)),(0,f.jsxs)(hn,{...v,className:(0,l.default)(zf.splitButton,h?.root,p),style:{...m,...g?.root},children:[(0,f.jsx)(ne,{styleType:i,size:a,disabled:o,isLoading:s,onClick:n,className:(0,l.default)(zf.splitButtonPrimary,h?.primaryButton),style:g?.primaryButton,children:t}),(0,f.jsx)(Qu,{items:r,isOpen:b,onOpenChange:x,placement:wt.Bottom,align:u,classNames:{menu:h?.menu,item:h?.menuItem},styles:{menu:g?.menu,item:g?.menuItem},children:(0,f.jsx)(ne,{styleType:i,size:a,disabled:o,icon:d.faChevronDown,"aria-label":y.moreActions,className:(0,l.default)(zf.splitButtonTrigger,h?.triggerButton),style:g?.triggerButton})})]})}var Hf={stepper:`stepper_kiS2A`,"stepper-vertical":`stepper-vertical_2y9rg`,stepperVertical:`stepper-vertical_2y9rg`,"stepper-label-bottom":`stepper-label-bottom_lDfhy`,stepperLabelBottom:`stepper-label-bottom_lDfhy`,"stepper-label-top":`stepper-label-top_sBw4-`,stepperLabelTop:`stepper-label-top_sBw4-`,"stepper-entry":`stepper-entry_KD4JJ`,stepperEntry:`stepper-entry_KD4JJ`,"stepper-clickable":`stepper-clickable_Nm6fP`,stepperClickable:`stepper-clickable_Nm6fP`,"stepper-entry-disabled":`stepper-entry-disabled_T9S5R`,stepperEntryDisabled:`stepper-entry-disabled_T9S5R`,"stepper-entry-number":`stepper-entry-number_J168Q`,stepperEntryNumber:`stepper-entry-number_J168Q`,"stepper-entry-active":`stepper-entry-active_V1aRt`,stepperEntryActive:`stepper-entry-active_V1aRt`,"stepper-entry-done":`stepper-entry-done_M3wb5`,stepperEntryDone:`stepper-entry-done_M3wb5`,"stepper-entry-error":`stepper-entry-error_xjGSr`,stepperEntryError:`stepper-entry-error_xjGSr`,"stepper-checkmark":`stepper-checkmark_iKCap`,stepperCheckmark:`stepper-checkmark_iKCap`,showCheckmark:`showCheckmark_Rd0oW`,"stepper-marker-cell":`stepper-marker-cell_reOS7`,stepperMarkerCell:`stepper-marker-cell_reOS7`,"stepper-rail-segment":`stepper-rail-segment_U-ZgF`,stepperRailSegment:`stepper-rail-segment_U-ZgF`,"stepper-rail-filled":`stepper-rail-filled_wCImi`,stepperRailFilled:`stepper-rail-filled_wCImi`,"stepper-rail-hidden":`stepper-rail-hidden_l17t6`,stepperRailHidden:`stepper-rail-hidden_l17t6`,"stepper-entry-labels":`stepper-entry-labels_nQT8D`,stepperEntryLabels:`stepper-entry-labels_nQT8D`,"stepper-entry-label":`stepper-entry-label_b94eg`,stepperEntryLabel:`stepper-entry-label_b94eg`,"stepper-description":`stepper-description_5Q0YP`,stepperDescription:`stepper-description_5Q0YP`,"stepper-optional":`stepper-optional_N8mkW`,stepperOptional:`stepper-optional_N8mkW`,"stepper-connector":`stepper-connector_J2FwZ`,stepperConnector:`stepper-connector_J2FwZ`,"stepper-connector-filled":`stepper-connector-filled_W8UZS`,stepperConnectorFilled:`stepper-connector-filled_W8UZS`,"stepper-step":`stepper-step_nUfsV`,stepperStep:`stepper-step_nUfsV`,"stepper-content":`stepper-content_yjlFH`,stepperContent:`stepper-content_yjlFH`,"stepper-label-left":`stepper-label-left_yGbjC`,stepperLabelLeft:`stepper-label-left_yGbjC`,"stepper-content-inner":`stepper-content-inner_0w2wP`,stepperContentInner:`stepper-content-inner_0w2wP`,"stepper-outlined":`stepper-outlined_V7UjP`,stepperOutlined:`stepper-outlined_V7UjP`,"stepper-dots":`stepper-dots_s4cgN`,stepperDots:`stepper-dots_s4cgN`},Uf=function(e){return e.Horizontal=`horizontal`,e.Vertical=`vertical`,e}({}),Wf=function(e){return e.Default=`default`,e.Outlined=`outlined`,e.Dots=`dots`,e}({}),Gf=function(e){return e.None=`none`,e.ActiveOnly=`activeOnly`,e.Completed=`completed`,e}({}),Kf=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({}),qf={[Wf.Default]:Hf.stepperDefault,[Wf.Outlined]:Hf.stepperOutlined,[Wf.Dots]:Hf.stepperDots},Jf={[Kf.Top]:Hf.stepperLabelTop,[Kf.Bottom]:Hf.stepperLabelBottom,[Kf.Left]:Hf.stepperLabelLeft,[Kf.Right]:Hf.stepperLabelRight};function Yf(){return(0,f.jsx)(`svg`,{className:Hf.stepperCheckmark,strokeLinejoin:`round`,strokeLinecap:`round`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`-0.2 -1.2 3.4 2`,height:`20px`,width:`20px`,children:(0,f.jsx)(`path`,{d:`M 0 0 l 1 1 l 2 -2`,strokeWidth:`0.4`,fill:`none`})})}function Xf({open:e,className:t,style:n,children:r}){let i=(0,c.useRef)(null),[a,o]=(0,c.useState)(null);return(0,c.useEffect)(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(()=>o(e.offsetHeight));return t.observe(e),()=>t.disconnect()},[]),(0,f.jsx)(`div`,{className:(0,l.default)(Hf.stepperContent,t),style:{...n,height:e?a??`auto`:0},"aria-hidden":!e,children:(0,f.jsx)(`div`,{ref:i,className:Hf.stepperContentInner,children:r})})}function Zf(e,t){let n=[Kf.Left,Kf.Right];return t?e&&n.includes(e)?e:Kf.Right:e&&!n.includes(e)?e:Kf.Bottom}function Qf({steps:e=[],currentStep:t=0,alignment:n=Uf.Horizontal,onStepClicked:r=null,nonLinear:i=!1,hideLabels:a=!1,styleType:o=Wf.Default,collapse:s=Gf.None,labelPlacement:u,className:d,style:p,classNames:m,styles:h,...g}){let _=n===Uf.Vertical,v=Zf(u,_);return(0,f.jsx)(`div`,{...g,className:(0,l.default)(Hf.stepper,qf[o],Jf[v],{[Hf.stepperVertical]:_},m?.root,d),style:{...h?.root,...p},children:e.map((n,o)=>{let u=o<t,d=o<=t,p=!!n.error,g=!!r&&!n.disabled&&(i?o!==t:u),v=(0,l.default)(Hf.stepperEntry,{[Hf.stepperEntryActive]:d},{[Hf.stepperEntryDone]:u&&!p},{[Hf.stepperEntryError]:p},{[Hf.stepperEntryDisabled]:n.disabled},{[Hf.stepperClickable]:g},m?.entry),y=n.icon?K(n.icon,{className:m?.icon,style:h?.icon}):u&&!p?(0,f.jsx)(Yf,{}):o+1,b=(0,f.jsx)(`div`,{className:(0,l.default)(Hf.stepperEntryNumber,{[Hf.stepperEntryNumberDone]:u&&!p},m?.entryNumber),style:h?.entryNumber,children:y}),x=n.optional===!0?`Optional`:n.optional===!1?null:n.optional,S=!a&&(0,f.jsxs)(`div`,{className:Hf.stepperEntryLabels,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Hf.stepperEntryLabel,m?.entryLabel),style:h?.entryLabel,children:n.label}),n.description!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(Hf.stepperDescription,m?.description),style:h?.description,children:n.description}),x!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(Hf.stepperOptional,m?.optional),style:h?.optional,children:x})]}),C=g?{role:`button`,tabIndex:0,onClick:()=>r?.(o),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r?.(o))}}:{},w=e=>(0,f.jsx)(`div`,{className:v,style:h?.entry,"aria-current":o===t?`step`:void 0,"aria-invalid":p||void 0,...C,children:e}),T=o<e.length-1&&(0,f.jsx)(`div`,{className:(0,l.default)(Hf.stepperConnector,{[Hf.stepperConnectorFilled]:u},m?.connector),style:h?.connector});if(_){let r=o===0,i=o===e.length-1,c=s===Gf.None?!0:s===Gf.ActiveOnly?o===t:!u,p=e=>{let t=e===`lead`?r:i,n=e===`lead`?d:u;return(0,f.jsx)(`div`,{className:(0,l.default)(Hf.stepperRailSegment,{[Hf.stepperRailFilled]:!t&&n,[Hf.stepperRailHidden]:t})})},g=(0,f.jsxs)(`div`,{className:Hf.stepperMarkerCell,children:[p(`lead`),b,p(`trail`)]});return(0,f.jsxs)(`div`,{className:Hf.stepperStep,children:[w((0,f.jsxs)(f.Fragment,{children:[g,S]})),T,n.content!=null&&!a&&(0,f.jsx)(Xf,{open:c,className:m?.content,style:h?.content,children:n.content})]},o)}return(0,f.jsxs)(c.default.Fragment,{children:[w((0,f.jsxs)(f.Fragment,{children:[b,S]})),T]},o)})})}function $f(e,t,n,r){return e<r&&n<t}function ep(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0}var tp=new class{constructor(){this.entries=new Map,this.listeners=new Map,this.results=new Map,this.rafId=0,this.listenerCount=0,this.schedule=()=>{cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(this.recompute)},this.recompute=()=>{let e=[...this.entries.entries()].sort(([,e],[,t])=>ep(e.node,t.node)),t=new Map,n=[];for(let[r,i]of e){let e=i.getMetrics();if(!e)continue;let a=t.get(e.container);a||(a=[],t.set(e.container,a));let o=a.filter(t=>$f(t.left,t.right,e.left,e.left+e.width)).reduce((e,t)=>Math.max(e,t.bottom),i.offsetTop),s=!i.disabled&&e.top<=o;if(s){let t=o+e.contentHeight;a.push({left:e.left,right:e.left+e.width,bottom:e.boundaryBottom==null?t:Math.min(t,e.boundaryBottom)})}n.push({id:r,metrics:e,baseTop:s?o:i.offsetTop,isStuck:s})}let r=new Map;for(let{metrics:e,baseTop:t,isStuck:i}of n){let{boundary:n,boundaryBottom:a,contentHeight:o}=e;if(!i||n==null||a==null)continue;let s=Math.min(0,a-(t+o)),c=r.get(n);(c==null||s<c)&&r.set(n,s)}for(let{id:e,metrics:t,baseTop:i,isStuck:a}of n){let n={isStuck:a,top:i+(a&&t.boundary?r.get(t.boundary)??0:0)},o=this.results.get(e);o&&o.isStuck===n.isStuck&&o.top===n.top||(this.results.set(e,n),this.listeners.get(e)?.(n))}}}register(e,t){let n=Symbol(`sticky`);return this.entries.set(n,e),this.listeners.set(n,t),this.startListening(),n}updateEntry(e,t){let n=this.entries.get(e);n&&Object.assign(n,t)}unregister(e){this.entries.has(e)&&(this.entries.delete(e),this.listeners.delete(e),this.results.delete(e),this.stopListening())}startListening(){this.listenerCount===0&&(window.addEventListener(`scroll`,this.schedule,{passive:!0,capture:!0}),window.addEventListener(`resize`,this.schedule)),this.listenerCount++}stopListening(){this.listenerCount--,this.listenerCount===0&&(window.removeEventListener(`scroll`,this.schedule,{capture:!0}),window.removeEventListener(`resize`,this.schedule))}},np={sticky:`sticky_L6zO2`,"sticky-content":`sticky-content_ZaXTD`,stickyContent:`sticky-content_ZaXTD`,"sticky-content-stuck":`sticky-content-stuck_w-gRW`,stickyContentStuck:`sticky-content-stuck_w-gRW`,"sticky-placeholder":`sticky-placeholder_aJ3Sb`,stickyPlaceholder:`sticky-placeholder_aJ3Sb`};function rp({children:e,offsetTop:t=0,offsetElement:n,stickToScrollParent:r=!1,boundary:i,boundaryInset:a=0,zIndex:o=20,disabled:s=!1,onStuckChange:u,className:d,style:p,classNames:m,styles:h,...g}){let _=(0,c.useRef)(null),v=(0,c.useRef)(null),y=(0,c.useRef)(null),b=(0,c.useRef)(null),[x,S]=(0,c.useState)({width:0,left:0,height:0}),[C,w]=(0,c.useState)(null),[T,E]=(0,c.useState)(0),D=n?.current?C??n.current.offsetHeight:t,[O,k]=(0,c.useState)({isStuck:!1,top:D}),A=(0,c.useRef)(u);(0,c.useEffect)(()=>{A.current=u},[u]);let j=(0,c.useRef)(i),M=(0,c.useRef)(a);(0,c.useLayoutEffect)(()=>{j.current=i,M.current=a});let N=(0,c.useCallback)(()=>{let e=_.current,t=v.current;if(!e||!t)return;let n=e.getBoundingClientRect();S({width:e.clientWidth,left:n.left,height:t.offsetHeight}),tp.schedule()},[]);(0,c.useEffect)(()=>{let e=n?.current;if(!e)return;let t=()=>w(e.offsetHeight);t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[n]),(0,c.useLayoutEffect)(()=>{b.current=r?xt(_.current):null},[r]),(0,c.useLayoutEffect)(()=>{let e=tp.register({node:_.current,offsetTop:D,disabled:s,getMetrics:()=>{let e=_.current,t=v.current;if(!e||!t)return null;let n=e.getBoundingClientRect(),r=b.current?.getBoundingClientRect(),i=r?.top??0;E(e=>e===i?e:i);let a=r?n.top-r.top:n.top,o=r?n.left-r.left:n.left,s=j.current?.current??null,c=s?.getBoundingClientRect();return{top:a,left:o,width:e.clientWidth,contentHeight:t.offsetHeight,container:b.current,boundary:s,boundaryBottom:c?c.bottom-i-M.current:null}}},k);return y.current=e,()=>{tp.unregister(e),y.current=null}},[]),(0,c.useEffect)(()=>{y.current&&tp.updateEntry(y.current,{offsetTop:D,disabled:s}),tp.schedule()},[D,s]),(0,c.useLayoutEffect)(()=>{N()},[N,e]),(0,c.useEffect)(()=>{let e=new ResizeObserver(N);return _.current&&e.observe(_.current),v.current&&e.observe(v.current),b.current&&e.observe(b.current),()=>e.disconnect()},[N,r]);let P=(0,c.useRef)(!0);(0,c.useEffect)(()=>{if(P.current){P.current=!1;return}A.current?.(O.isStuck)},[O.isStuck]);let F=O.isStuck?{position:`fixed`,top:T+O.top,left:x.left,width:x.width,zIndex:o,...h?.content}:h?.content;return(0,f.jsxs)(`div`,{ref:_,className:(0,l.default)(np.sticky,d,m?.root),style:{...h?.root,...p},...g,children:[O.isStuck&&(0,f.jsx)(`div`,{"aria-hidden":!0,className:(0,l.default)(np.stickyPlaceholder,m?.placeholder),style:{height:x.height,...h?.placeholder}}),(0,f.jsx)(`div`,{ref:v,className:(0,l.default)(np.stickyContent,O.isStuck&&np.stickyContentStuck,m?.content),style:F,children:e})]})}var ip={switch:`switch_9TG2Y`,"switch-disabled":`switch-disabled_UL-F-`,switchDisabled:`switch-disabled_UL-F-`,"switch-track":`switch-track_awA-t`,switchTrack:`switch-track_awA-t`,"switch-track-checked":`switch-track-checked_boZKe`,switchTrackChecked:`switch-track-checked_boZKe`,"switch-thumb":`switch-thumb_4fUTo`,switchThumb:`switch-thumb_4fUTo`,"switch-thumb-checked":`switch-thumb-checked_GU--w`,switchThumbChecked:`switch-thumb-checked_GU--w`,"switch-label":`switch-label_3pLBQ`,switchLabel:`switch-label_3pLBQ`};function ap(e){let{label:t=``,selected:n=!1,onToggle:r=()=>{},className:i=``,style:a,disabled:o=!1,title:s=``,tabIndex:u=0,formValidator:d=null,children:p=null,classNames:m,styles:h,...g}=D(`Switch`,e),[,_]=(0,c.useState)(0);(0,c.useEffect)(()=>{if(!d)return;let e=()=>_(e=>e+1);return d.registerOnUpdateListener(e),()=>d.removeOnUpdateListener(e)},[d]);function v(e){o||(d&&d.set(!d.value),r(!y,e))}let y=d?d.value:n;return(0,f.jsxs)(`div`,{...g,title:s,className:(0,l.default)(ip.switch,{[ip.switchDisabled]:o},i),style:a,onClick:v,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(e))},role:`switch`,"aria-checked":y,tabIndex:o?-1:u,children:[(0,f.jsx)(`div`,{className:(0,l.default)(ip.switchTrack,y&&ip.switchTrackChecked,m?.track),style:h?.track,children:(0,f.jsx)(`div`,{className:(0,l.default)(ip.switchThumb,y&&ip.switchThumbChecked,m?.thumb),style:h?.thumb})}),(p||t)&&(0,f.jsx)(`div`,{className:(0,l.default)(ip.switchLabel,m?.label),style:h?.label,children:p||t})]})}var op={tabHeader:`tabHeader_C-b9d`,"tabHeader-tab":`tabHeader-tab_Wbyt-`,tabHeaderTab:`tabHeader-tab_Wbyt-`,"tabHeader-tab-active":`tabHeader-tab-active_IExSo`,tabHeaderTabActive:`tabHeader-tab-active_IExSo`,"tabHeader-tab-disabled":`tabHeader-tab-disabled_yWJxS`,tabHeaderTabDisabled:`tabHeader-tab-disabled_yWJxS`,"tabHeader-icon":`tabHeader-icon_ryEHB`,tabHeaderIcon:`tabHeader-icon_ryEHB`,"tabHeader-labels":`tabHeader-labels_q5Af5`,tabHeaderLabels:`tabHeader-labels_q5Af5`,"tabHeader-title":`tabHeader-title_Jq2Vy`,tabHeaderTitle:`tabHeader-title_Jq2Vy`,"tabHeader-subtitle":`tabHeader-subtitle_4lhSa`,tabHeaderSubtitle:`tabHeader-subtitle_4lhSa`};function sp({tabs:e=[],currentTab:t,onChange:n,className:r,style:i,classNames:a,styles:o,...s}){return(0,f.jsx)(`div`,{...s,role:`tablist`,className:(0,l.default)(op.tabHeader,a?.root,r),style:{...o?.root,...i},children:e.map(e=>{let r=e.id===t,i=!!e.title||!!e.subtitle;return(0,f.jsxs)(oe,{role:`tab`,"aria-selected":r,"aria-disabled":e.disabled||void 0,tabIndex:e.disabled?-1:0,className:(0,l.default)(op.tabHeaderTab,{[op.tabHeaderTabActive]:r},{[op.tabHeaderTabDisabled]:e.disabled},a?.tab),style:o?.tab,onClick:()=>{e.disabled||r||n(e.id)},children:[K(e.icon,{className:(0,l.default)(op.tabHeaderIcon,a?.icon),style:o?.icon}),i&&(0,f.jsxs)(`div`,{className:(0,l.default)(op.tabHeaderLabels,a?.labels),style:o?.labels,children:[e.title&&(0,f.jsx)(`span`,{className:(0,l.default)(op.tabHeaderTitle,a?.title),style:o?.title,children:e.title}),e.subtitle&&(0,f.jsx)(`span`,{className:(0,l.default)(op.tabHeaderSubtitle,a?.subtitle),style:o?.subtitle,children:e.subtitle})]})]},e.id)})})}function cp(e){return(0,f.jsx)(Ji,{...D(`Textarea`,e),multiline:!0})}function lp(e=`default`){let[t,n]=(0,c.useState)(localStorage.getItem(`theme`)||e);return{currentThemeId:t,setCurrentThemeId:e=>{n(e),localStorage.setItem(`theme`,e)}}}var up=(0,c.createContext)(null);function dp(){return(0,c.useContext)(up)}function fp({children:e,className:t,style:n,...r}){let i=(0,c.useRef)(null),a=(0,c.useRef)(void 0),o=(0,c.useRef)(!1),s=(0,c.useRef)(null),[l,u]=(0,c.useState)({pointer:null,rect:null}),d=()=>{o.current||(o.current=!0,a.current=requestAnimationFrame(()=>{o.current=!1,a.current=void 0;let e=i.current,t=s.current;if(!e||!t)return;let n=e.getBoundingClientRect();u({pointer:{x:t.x-n.left,y:t.y-n.top},rect:n})}))},p=e=>{s.current={x:e.clientX,y:e.clientY},d()},m=()=>{s.current=null,o.current&&a.current!==void 0&&(cancelAnimationFrame(a.current),o.current=!1,a.current=void 0),u({pointer:null,rect:null})};return(0,f.jsx)(`div`,{...r,ref:i,className:t,style:n,onPointerMove:p,onPointerLeave:m,children:(0,f.jsx)(up.Provider,{value:l,children:e})})}function pp(e){let t=Math.max(-1,Math.min(1,e));return Math.sign(t)*Math.abs(t)**1.6}function mp(e,t){return Math.max(-t,Math.min(t,e))}function hp(e,t,n,{maxTiltX:r,maxTiltY:i,easing:a,lockAxis:o}){let s=n.width>0?e/n.width*2-1:0,c=n.height>0?t/n.height*2-1:0;return{rotateX:o===`x`?0:mp(-a(c)*r,r),rotateY:o===`y`?0:mp(a(s)*i,i)}}var gp={tilt:`tilt_gbX2b`,"tilt-perspective":`tilt-perspective_CFdP6`,tiltPerspective:`tilt-perspective_CFdP6`,"tilt-surface":`tilt-surface_Jyzwe`,tiltSurface:`tilt-surface_Jyzwe`};function _p(){return typeof process<`u`&&!1}function vp(){return typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}var yp=.3,bp=.05;function xp(e){let{ref:t,children:n,maxTilt:r=15,maxTiltX:i,maxTiltY:a,perspective:o=800,easing:s=pp,lockAxis:u=`none`,scaleOnHover:d=1,trackingMode:p=`self`,disabled:m=!1,onTiltChange:h,className:g,style:_,classNames:v,styles:y,...b}=D(`Tilt`,e),x=(0,c.useRef)(null),S=(0,c.useRef)(null),C=(0,c.useRef)(void 0),w=(0,c.useRef)(!1),T=(0,c.useRef)(!1),E=(0,c.useRef)(!1),O=(0,c.useRef)(null),k=(0,c.useRef)({rotateX:0,rotateY:0}),A=dp(),j=p===`group`,M=j&&A!==null;(0,c.useEffect)(()=>{j&&A===null&&_p()&&console.warn(`Tilt: trackingMode="group" was set with no ancestor TiltGroup, falling back to self tracking.`)},[j,A===null]);let N=i??r,P=a??r;function F(e,t,n){let r=S.current;r&&(r.style.transform=`rotateX(${e}deg) rotateY(${t}deg)`+(n===1?``:` scale(${n})`))}function I(){C.current!==void 0&&(cancelAnimationFrame(C.current),C.current=void 0),w.current=!1}function L(){if(C.current=void 0,!S.current){w.current=!1;return}let e=T.current&&!m&&!vp(),t=0,n=0;if(e){let e=O.current,r=x.current?.getBoundingClientRect();if(e&&r){let i=hp(e.x-r.left,e.y-r.top,r,{maxTiltX:N,maxTiltY:P,easing:s,lockAxis:u});t=i.rotateX,n=i.rotateY}}let r=k.current,i,a;if(E.current?(i=r.rotateX+(t-r.rotateX)*yp,a=r.rotateY+(n-r.rotateY)*yp,Math.abs(t-i)<bp&&Math.abs(n-a)<bp&&(i=t,a=n,E.current=!1)):(i=t,a=n),k.current={rotateX:i,rotateY:a},F(i,a,e?d:1),h?.(i,a),!E.current){w.current=!1;return}C.current=requestAnimationFrame(L)}function R(){w.current||(w.current=!0,C.current=requestAnimationFrame(L))}function z(e){T.current!==e&&(E.current=!0),T.current=e,R()}let B=e=>{m||M||vp()||(O.current={x:e.clientX,y:e.clientY},z(!0))},V=()=>{M||z(!1)};return(0,c.useEffect)(()=>{if(M){if(m||vp()){z(!1);return}A?.pointer&&A.rect?(O.current={x:A.rect.left+A.pointer.x,y:A.rect.top+A.pointer.y},z(!0)):z(!1)}},[M,m,A?.pointer,A?.rect]),(0,c.useEffect)(()=>()=>{I()},[]),(0,c.useImperativeHandle)(t,()=>({setTilt(e,t){let n={rotateX:Math.max(-N,Math.min(N,e)),rotateY:Math.max(-P,Math.min(P,t))};I(),T.current=!1,E.current=!1,k.current=n,F(n.rotateX,n.rotateY,d),h?.(n.rotateX,n.rotateY)},reset(){I(),T.current=!1,E.current=!1,k.current={rotateX:0,rotateY:0},F(0,0,1)}})),(0,f.jsx)(`div`,{...b,ref:x,className:(0,l.default)(gp.tilt,g,v?.root),style:{..._,...y?.root},onPointerMove:B,onPointerLeave:V,onPointerCancel:V,children:(0,f.jsx)(`div`,{className:(0,l.default)(gp.tiltPerspective,v?.perspective),style:{perspective:`${o}px`,...y?.perspective},children:(0,f.jsx)(`div`,{ref:S,className:(0,l.default)(gp.tiltSurface,v?.surface),style:y?.surface,children:n})})})}var Sp=e=>(Math.trunc(e)%24+24)%24,Cp=e=>(Math.trunc(e)%60+60)%60;function wp(e){if(!e)return null;let t=e.match(/^(\d{1,2}):(\d{1,2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return n>23||r>59?null:{hours:n,minutes:r}}function Tp(e){return e?`${String(Sp(e.hours)).padStart(2,`0`)}:${String(Cp(e.minutes)).padStart(2,`0`)}`:``}function Ep(e,t){return Cp(!t||t<=1?e:Math.round(Cp(e)/t)*t)}var Dp=e=>e.hours*60+e.minutes;function Op(e,t,n){let r=Dp(e),i=wp(t),a=wp(n);return i&&(r=Math.max(r,Dp(i))),a&&(r=Math.min(r,Dp(a))),{hours:Math.floor(r/60),minutes:r%60}}function kp(e,t,n,r,i){let a=r*i*Math.PI/180;return{x:e+n*Math.sin(a),y:t-n*Math.cos(a)}}function Ap(e,t){return(Math.atan2(e,-t)*180/Math.PI+360)%360}var jp=(e,t)=>Math.sqrt(e*e+t*t),Mp={clockFace:`clockFace_LbXIa`,clockHand:`clockHand_E9nTw`,"clockHand-line":`clockHand-line_iOipC`,clockHandLine:`clockHand-line_iOipC`,"clockHand-center":`clockHand-center_VElxx`,clockHandCenter:`clockHand-center_VElxx`,"clockHand-knob":`clockHand-knob_Mb2Fx`,clockHandKnob:`clockHand-knob_Mb2Fx`,clockNumber:`clockNumber_qHDO8`,"clockNumber-inner":`clockNumber-inner_x2XR1`,clockNumberInner:`clockNumber-inner_x2XR1`,"clockNumber-selected":`clockNumber-selected_rPVlV`,clockNumberSelected:`clockNumber-selected_rPVlV`},Np=50,Pp=40,Fp=25.5,Ip=65.5/2,Lp=30,Rp=6,zp=e=>(e+11)%12+1;function Bp(e,t){if(e===`minutes`)return Array.from({length:12},(e,t)=>{let n=t*5;return{label:String(n).padStart(2,`0`),slot:t,value:n,ring:`outer`}});if(!t)return Array.from({length:12},(e,t)=>{let n=t===0?12:t;return{label:String(n),slot:t,value:n,ring:`outer`}});let n=Array.from({length:12},(e,t)=>{let n=t===0?12:t;return{label:String(n),slot:t,value:n,ring:`outer`}}),r=Array.from({length:12},(e,t)=>{let n=t===0?0:t+12;return{label:String(n).padStart(2,`0`),slot:t,value:n,ring:`inner`}});return[...n,...r]}function Vp({time:e,mode:t,use24Hour:n,minuteStep:r,onChange:i,onCommit:a,classNames:o,styles:s}){let u=(0,c.useRef)(null),d=(0,c.useRef)(!1),p=Bp(t,n),m=e.hours>=12,h=zp(e.hours),g=t===`minutes`?{slot:e.minutes,radius:Pp}:n?e.hours===0?{slot:0,radius:Fp}:e.hours<=12?{slot:e.hours%12,radius:Pp}:{slot:(e.hours-12)%12,radius:Fp}:{slot:h%12,radius:Pp},_=kp(Np,Np,g.radius,g.slot,t===`minutes`?Rp:Lp),v=i=>t===`minutes`?Ep(e.minutes,r)===i.value||e.minutes===i.value:n?e.hours===i.value:h===i.value,y=(i,a)=>{let o=u.current?.getBoundingClientRect();if(!o)return e;let s=i-(o.left+o.width/2),c=a-(o.top+o.height/2),l=Ap(s,c);if(t===`minutes`){let t=Ep(Math.round(l/Rp),r);return{hours:e.hours,minutes:t}}let d=Math.round(l/Lp)%12;if(!n){let t=d===0?12:d;return{hours:Sp(m?t%12+12:t%12),minutes:e.minutes}}return{hours:Sp(jp(s,c)/(o.width/2)*Np<Ip?d===0?0:d+12:d===0?12:d),minutes:e.minutes}};return(0,f.jsxs)(`div`,{ref:u,className:(0,l.default)(Mp.clockFace,o?.clockFace),style:s?.clockFace,onPointerDown:e=>{d.current=!0,e.currentTarget.setPointerCapture?.(e.pointerId),i(y(e.clientX,e.clientY))},onPointerMove:e=>{d.current&&i(y(e.clientX,e.clientY))},onPointerUp:e=>{d.current&&(d.current=!1,a(y(e.clientX,e.clientY)))},role:`slider`,"aria-label":t===`minutes`?`Minutes`:`Hours`,"aria-valuetext":t===`minutes`?`${e.minutes} minutes`:`${e.hours} hours`,children:[(0,f.jsxs)(`svg`,{className:Mp.clockHand,viewBox:`0 0 100 100`,"aria-hidden":!0,children:[(0,f.jsx)(`circle`,{cx:Np,cy:Np,r:1.8,className:Mp.clockHandCenter}),(0,f.jsx)(`line`,{x1:Np,y1:Np,x2:_.x,y2:_.y,className:Mp.clockHandLine}),(0,f.jsx)(`circle`,{cx:_.x,cy:_.y,r:7,className:(0,l.default)(Mp.clockHandKnob,o?.clockHand),style:s?.clockHand})]}),p.map(e=>{let t=kp(Np,Np,e.ring===`inner`?Fp:Pp,e.slot,Lp),n=v(e);return(0,f.jsx)(`div`,{className:(0,l.default)(Mp.clockNumber,e.ring===`inner`&&Mp.clockNumberInner,n&&Mp.clockNumberSelected,o?.clockNumber),style:{left:`${t.x}%`,top:`${t.y}%`,...s?.clockNumber},children:e.label},`${e.ring}-${e.value}`)})]})}var Hp={timeInput:`timeInput_EbsZN`,"timeInput-clock":`timeInput-clock_D1-dk`,timeInputClock:`timeInput-clock_D1-dk`,"timeInput-clockHeader":`timeInput-clockHeader_bsYNW`,timeInputClockHeader:`timeInput-clockHeader_bsYNW`,"timeInput-headerSegment":`timeInput-headerSegment_Oiu7e`,timeInputHeaderSegment:`timeInput-headerSegment_Oiu7e`,"timeInput-headerSegment-active":`timeInput-headerSegment-active_-Funz`,timeInputHeaderSegmentActive:`timeInput-headerSegment-active_-Funz`,"timeInput-headerColon":`timeInput-headerColon_LwyQH`,timeInputHeaderColon:`timeInput-headerColon_LwyQH`,"timeInput-meridiem":`timeInput-meridiem_tk9km`,timeInputMeridiem:`timeInput-meridiem_tk9km`,"timeInput-meridiem-active":`timeInput-meridiem-active_40uHm`,timeInputMeridiemActive:`timeInput-meridiem-active_40uHm`,"timeInput-footer":`timeInput-footer_NCXsB`,timeInputFooter:`timeInput-footer_NCXsB`};function Up({value:e,selected:t,onChange:n=()=>null,onSelect:r=()=>null,formValidator:i=null,isInline:a=!1,isModal:o=!1,noInput:s=!1,noHeader:p=!1,showClearButton:m=!1,showNowButton:h=!1,minuteStep:g=1,use24Hour:_=!0,minTime:v=null,maxTime:y=null,label:b=``,isValid:x=!0,errorMessage:S=``,isRequired:C=!1,disabled:w=!1,className:T=``,style:E,classNames:D,styles:O,...k}){let A=()=>i?i.value||``:e??t??``,[j,M]=(0,c.useState)(A),[N,P]=(0,c.useState)(!1),[F,I]=(0,c.useState)(`hours`),[L,R]=(0,c.useState)(!1),[B,V]=(0,c.useState)(!1),[,H]=(0,c.useState)(0),U=A(),[W,G]=(0,c.useState)(U),ee=(0,c.useRef)(i);!i&&W!==U&&(G(U),M(U)),(0,c.useEffect)(()=>{if(ee.current=i,!i)return;let e=()=>{M(i.value||``),H(e=>e+1)};return i.registerOnUpdateListener(e),()=>i.removeOnUpdateListener(e)},[i]);let K=()=>i?i.touched&&i.hasError():!x||!!S,te=()=>!!(C||i?.validators.find(e=>e.validatorId===`required`)),q=e=>{let t=e?Tp(e):null;i&&i.set(t),n?.(t)},J=e=>{M(e?Tp(e):``),q(e)},re=wp(j),ie=re??{hours:12,minutes:0},ae=e=>{let t={hours:e.hours,minutes:Ep(e.minutes,g)};J(Op(t,v,y))},oe=e=>{let t=Op({hours:e.hours,minutes:Ep(e.minutes,g)},v,y);if(J(t),F===`hours`){I(`minutes`);return}r?.(Tp(t)),a||P(!1)},se=()=>{w||(I(`hours`),P(!0))},ce=({previousState:e,nextState:t})=>{if(t.value===e.value)return t;let n=t.value,r=n.slice(0,2);/^\d\d$/.test(r)&&Number(r)>23&&(n=`23${n.slice(2)}`);let i=n.slice(3,5);return/^\d\d$/.test(i)&&Number(i)>59&&(n=`${n.slice(0,3)}59`),n===t.value?t:{...t,value:n}},le=e=>{M(e);let t=wp(e);t&&q(t)},ue=()=>{ee.current&&(ee.current.touched=!0),R(!1),q(wp(j))},Y=e=>{e!==ie.hours>=12&&J({hours:Sp(ie.hours+(e?12:-12)),minutes:ie.minutes})},de=K(),fe=re?String(_?re.hours:(re.hours+11)%12+1).padStart(2,`0`):`--`,pe=re?String(re.minutes).padStart(2,`0`):`--`,me=p?null:(0,f.jsxs)(`div`,{className:(0,l.default)(Hp.timeInputClockHeader,D?.clockHeader),style:O?.clockHeader,children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(Hp.timeInputHeaderSegment,F===`hours`&&Hp.timeInputHeaderSegmentActive,D?.headerSegment),style:O?.headerSegment,onClick:()=>I(`hours`),children:fe}),(0,f.jsx)(`span`,{className:Hp.timeInputHeaderColon,children:`:`}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(Hp.timeInputHeaderSegment,F===`minutes`&&Hp.timeInputHeaderSegmentActive,D?.headerSegment),style:O?.headerSegment,onClick:()=>I(`minutes`),children:pe}),!_&&(0,f.jsxs)(`div`,{className:(0,l.default)(Hp.timeInputMeridiem,D?.meridiem),style:O?.meridiem,children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(ie.hours<12&&Hp.timeInputMeridiemActive),onClick:()=>Y(!1),children:`AM`}),(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(ie.hours>=12&&Hp.timeInputMeridiemActive),onClick:()=>Y(!0),children:`PM`})]})]}),X=m||h?(0,f.jsxs)(`div`,{className:(0,l.default)(Hp.timeInputFooter,D?.footer),style:O?.footer,children:[h&&(0,f.jsx)(ne,{styleType:z.Default,onClick:()=>{let e=new Date;ae({hours:e.getHours(),minutes:e.getMinutes()})},children:`Now`}),m&&(0,f.jsx)(ne,{styleType:z.Default,onClick:()=>{J(null),r?.(null)},children:`Clear`})]}):null,Z=(0,f.jsxs)(`div`,{className:(0,l.default)(Hp.timeInputClock,D?.clock),style:O?.clock,children:[me,(0,f.jsx)(Vp,{time:ie,mode:F,use24Hour:_,minuteStep:g,onChange:ae,onCommit:oe,classNames:D,styles:O}),X]}),he=s?null:(0,f.jsx)(Ji,{autoComplete:`off`,label:`${b}${te()?` *`:``}`,value:j,icon:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faClock}),onIconClick:se,onClick:se,readOnly:o,disabled:w,isValid:!de,customInput:(0,f.jsx)(Ro,{mask:`99:99`,beforeMaskedStateChange:ce}),onChange:e=>le(e),onBlur:ue,onFocus:()=>R(!0),onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1)}),ge=a?Z:o?(0,f.jsx)(xa,{hideHeader:!0,isOpen:N,onClose:()=>P(!1),children:Z}):(0,f.jsx)(sn,{isOpen:N,onOpenChange:P,content:Z,placement:wt.Bottom,align:Tt.Start,closeOnTriggerClick:!1,constrainWidth:!1,children:he});return(0,f.jsxs)(`div`,{className:(0,l.default)(Hp.timeInput,D?.root,T),style:{...O?.root,...E},...k,children:[(o||a)&&he,ge,(0,f.jsx)(Ri,{variant:`error`,message:i?i.getCurrentErrorMessage()??``:S||``,isVisible:de&&(L||B)})]})}var Wp={timeline:`timeline_VtQdt`,"timeline-item":`timeline-item_s8-U2`,timelineItem:`timeline-item_s8-U2`,"timeline-item-connector":`timeline-item-connector_06FQ0`,timelineItemConnector:`timeline-item-connector_06FQ0`,"timeline-item-clickable":`timeline-item-clickable_0w8zK`,timelineItemClickable:`timeline-item-clickable_0w8zK`,"timeline-item-disabled":`timeline-item-disabled_EkWVA`,timelineItemDisabled:`timeline-item-disabled_EkWVA`,"timeline-marker":`timeline-marker_u6jDA`,timelineMarker:`timeline-marker_u6jDA`,"timeline-dot":`timeline-dot_l-s7C`,timelineDot:`timeline-dot_l-s7C`,"timeline-dot-with-icon":`timeline-dot-with-icon_6JK7D`,timelineDotWithIcon:`timeline-dot-with-icon_6JK7D`,"timeline-dot-primary":`timeline-dot-primary_5Uk-e`,timelineDotPrimary:`timeline-dot-primary_5Uk-e`,"timeline-dot-success":`timeline-dot-success_iEoLv`,timelineDotSuccess:`timeline-dot-success_iEoLv`,"timeline-dot-warn":`timeline-dot-warn_-6G8K`,timelineDotWarn:`timeline-dot-warn_-6G8K`,"timeline-dot-error":`timeline-dot-error_-10M7`,timelineDotError:`timeline-dot-error_-10M7`,"timeline-with-icons":`timeline-with-icons_ylDAw`,timelineWithIcons:`timeline-with-icons_ylDAw`,"timeline-connector":`timeline-connector_VuXnH`,timelineConnector:`timeline-connector_VuXnH`,"timeline-content":`timeline-content_K4Ztg`,timelineContent:`timeline-content_K4Ztg`,"timeline-header":`timeline-header_xr4Tw`,timelineHeader:`timeline-header_xr4Tw`,"timeline-title":`timeline-title_MZ26k`,timelineTitle:`timeline-title_MZ26k`,"timeline-timestamp":`timeline-timestamp_-0w-N`,timelineTimestamp:`timeline-timestamp_-0w-N`,"timeline-description":`timeline-description_WcWIu`,timelineDescription:`timeline-description_WcWIu`,"timeline-right":`timeline-right_fZEKn`,timelineRight:`timeline-right_fZEKn`,"timeline-alternate":`timeline-alternate_Kv9LY`,timelineAlternate:`timeline-alternate_Kv9LY`,"timeline-item-right":`timeline-item-right_s5ELB`,timelineItemRight:`timeline-item-right_s5ELB`},Gp=function(e){return e.Left=`left`,e.Right=`right`,e.Alternate=`alternate`,e}({}),Kp=function(e){return e.Default=`default`,e.Primary=`primary`,e.Success=`success`,e.Warn=`warn`,e.Error=`error`,e}({}),qp={[Kp.Primary]:Wp.timelineDotPrimary,[Kp.Success]:Wp.timelineDotSuccess,[Kp.Warn]:Wp.timelineDotWarn,[Kp.Error]:Wp.timelineDotError};function Jp({items:e=[],alignment:t=Gp.Left,className:n,style:r,classNames:i,styles:a,...o}){let s=e.some(e=>!!e.icon);return(0,f.jsx)(`div`,{...o,className:(0,l.default)(Wp.timeline,{[Wp.timelineRight]:t===Gp.Right,[Wp.timelineAlternate]:t===Gp.Alternate,[Wp.timelineWithIcons]:s},i?.root,n),style:{...a?.root,...r},children:e.map((n,r)=>{let o=n.id??r,s=r===e.length-1,c=t===Gp.Alternate&&r%2==1,u=!!n.onClick&&!n.disabled,d=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:(0,l.default)(Wp.timelineMarker,i?.marker),style:a?.marker,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Wp.timelineDot,{[Wp.timelineDotWithIcon]:!!n.icon},qp[n.status??Kp.Default],i?.dot),style:a?.dot,children:n.icon?K(n.icon):null}),!s&&(0,f.jsx)(`div`,{className:(0,l.default)(Wp.timelineConnector,i?.connector),style:a?.connector})]}),(0,f.jsxs)(`div`,{className:(0,l.default)(Wp.timelineContent,i?.content),style:a?.content,children:[(0,f.jsxs)(`div`,{className:Wp.timelineHeader,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Wp.timelineTitle,i?.title),style:a?.title,children:n.title}),n.timestamp!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(Wp.timelineTimestamp,i?.timestamp),style:a?.timestamp,children:n.timestamp})]}),n.description!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(Wp.timelineDescription,i?.description),style:a?.description,children:n.description}),n.content]})]}),p=(0,l.default)(Wp.timelineItem,{[Wp.timelineItemRight]:c},{[Wp.timelineItemClickable]:u},{[Wp.timelineItemDisabled]:n.disabled},i?.item);return u?(0,f.jsx)(oe,{className:p,style:a?.item,onClick:n.onClick,children:d},o):(0,f.jsx)(`div`,{className:p,style:a?.item,"aria-disabled":n.disabled||void 0,children:d},o)})})}var Yp={timer:`timer_cqe3R`,"timer-ringWrapper":`timer-ringWrapper_OydlE`,timerRingWrapper:`timer-ringWrapper_OydlE`,"timer-ringSvg":`timer-ringSvg_qsV1X`,timerRingSvg:`timer-ringSvg_qsV1X`,"timer-ripples":`timer-ripples_2Slkv`,timerRipples:`timer-ripples_2Slkv`,"timer-ripple":`timer-ripple_TLdSx`,timerRipple:`timer-ripple_TLdSx`,timerRippleHalo:`timerRippleHalo_oEcXJ`,"timer-ringTrack":`timer-ringTrack_pGGs1`,timerRingTrack:`timer-ringTrack_pGGs1`,"timer-ringProgress":`timer-ringProgress_LL8uQ`,timerRingProgress:`timer-ringProgress_LL8uQ`,"timer-ringProgress-urgent":`timer-ringProgress-urgent_MwwU2`,timerRingProgressUrgent:`timer-ringProgress-urgent_MwwU2`,"timer-display":`timer-display_es2IX`,timerDisplay:`timer-display_es2IX`,"timer-time":`timer-time_oMZ5O`,timerTime:`timer-time_oMZ5O`,"timer-label":`timer-label_GknS-`,timerLabel:`timer-label_GknS-`,"timer-controls":`timer-controls_LHM4q`,timerControls:`timer-controls_LHM4q`,"timer-controlsRow":`timer-controlsRow_42JyZ`,timerControlsRow:`timer-controlsRow_42JyZ`,"timer-adjustButton":`timer-adjustButton_QMxrI`,timerAdjustButton:`timer-adjustButton_QMxrI`,"timer-cancelButton":`timer-cancelButton_ObL4-`,timerCancelButton:`timer-cancelButton_ObL4-`,"timer-pulsing":`timer-pulsing_795m4`,timerPulsing:`timer-pulsing_795m4`,timerHeartbeat:`timerHeartbeat_N40Zt`,"timer-critical":`timer-critical_q-JzB`,timerCritical:`timer-critical_q-JzB`},Xp=200,Zp=1e3,Qp={cancel:`Cancel timer`};function $p(){return typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}function em(e){let t=Math.ceil(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=String(r).padStart(2,`0`),o=String(i).padStart(2,`0`);return n>0?`${n}:${a}:${o}`:`${a}:${o}`}function tm(e){let{ref:t,durationSeconds:n,autoStart:r=!0,resetOnDurationChange:i=!0,onTick:a,onComplete:o,onStart:s,onPause:u,onResume:p,onCancel:m,onAddTime:h,onRemoveTime:g,showControls:_=!0,hideAddButton:v=!1,hideRemoveButton:y=!1,hidePauseButton:b=!1,hideCancelButton:x=!1,adjustSeconds:S=30,maxSeconds:C,label:w,formatTime:T=em,size:E,strokeWidth:k=10,counterClockwise:A=!1,urgentThreshold:j=.1,urgentMinSeconds:M=3,pulseOnUrgent:N=!0,showRunningRipples:P=!1,playSoundOnComplete:F=!1,soundUrl:I,soundVolume:L=.5,notifyOnComplete:R=!1,notificationTitle:z,notificationBody:V,className:H,style:U,classNames:W,styles:G,labels:ee,...K}=D(`Timer`,e),te=O(`Timer`,ee,Qp),q=n*1e3,[J,re]=(0,c.useState)(r?`running`:`idle`),[ie,ae]=(0,c.useState)(q),[oe,se]=(0,c.useState)(0),[le,ue]=(0,c.useState)([]),Y=(0,c.useRef)(ie),de=(0,c.useRef)(J),fe=(0,c.useRef)(q),pe=(0,c.useRef)(!1),me=(0,c.useRef)(!1),X=(0,c.useRef)(!1),Z=(0,c.useRef)(0);function he(e){Y.current=e,ae(e)}function ge(e){de.current=e,re(e)}function _e(){se(e=>e+1)}(0,c.useEffect)(()=>{if(J!==`running`)return;let e=Date.now(),t=Y.current,n=setInterval(()=>{let n=Math.max(0,t-(Date.now()-e));he(n),a?.(n),n<=0&&ge(`completed`)},Xp);return()=>clearInterval(n)},[J,oe]),(0,c.useEffect)(()=>{if(J===`completed`&&!pe.current){if(pe.current=!0,o?.(),F)try{let e=new Audio(I||`data:audio/wav;base64,UklGRkYeAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YSIeAAAAAAkAIAA4AEQANwAPANH/jv9b/07/cf/F/zkAsAAJAScB+QCCANv/K/+h/mX+j/4d//P/3QChAQkC8QFZAV0AOP80/pb9i/0g/jj/kgDaAbsC9gJzAkwBwv82/gz9k/zz/Bz+y/+ZARMD1QOoA44CxQC6/u782PvD+778kv7SAO8CYQTGBPwDLALE/1j9hfvD+kz7Bf2J/zwCcgSbBWUF1QNGAVX+vPsk+vj5TPvU/fYA7QP6BZYGkAUjA+D/k/wP+vj4nPna+y3/xQK+BVkHKActBeABC/6h+nz4LPjN+QD9AAHTBIQHYggvBy4EFgDn+6v4NPfm9576uP4zA/YGDAnsCJUGkgLc/Zz54vZh9kL4FfzvAKAF/AgqCtYITQVmAFX7W/d49Sv2Ufkq/ocDFgizCrIKCQhaA8f9sPhY9Zr0rfYW+8QAUwZiCuoLgwp9BtAA3voh9sjzb/T194T9wAMgCUwMdQyJCTgEzv3d9+Dz2fIR9QT6fwDsBrMLoQ00DL4HUgGC+v30JPKy8o32yPzeAxAK1A01DhILKwXu/ST3evIf8W/z4PghAGsH7wxMD+YNDQnrAUH68fOP8PjwGfX2++ED6ApKD+4PowwxBin+hfYq8W/vyfGs96r/zgcTDusQmQ9pCpwCGvr+8gvvQu+d8xD7ygOkC60QoBE5DkcHff4C9u/vy+0i8Gr2HP8WCCAPeRJIEc8LYgMP+iXyme2S7RnyF/qYA0YM+hFHE9IPbgjp/pn1zO407HzuHPV3/kIIEhD3E/MSPg07BB/6ZvE87OvrkPAN+U4DzQwxE+EUbBGjCW3/TfXC7a7q2ezD87z9UwjrEGEVlhS0DigFSfrD8PTqT+oF7/P36gI4DVAUbhYEE+QKCAAc9dLsOek862Hy7vxKCKkRuBYxFi8QJgaM+jzww+nA6Hnty/ZvAocNVhXqF5kULwy5AAf1/OvY56Xp+vAM/CYISxL4F8AXrBE0B+j60O+r6EDn7+uY9d0Bug1BFlQZKRaDDX0BDPVB64vmGOiN7xr76AfREiAZQxkpE08IXPuB76zn0OVo6lr0NQHSDRIXqhqxF90OVAIs9aPqVeWX5h/uGPqSBzsTMBq2GqUUdgnn+07vx+Zy5OfoFPN6AM4NxxfrGzAZOxA8A2b1Ieo35CPlsOwI+SMHiBMmGxgcHRanCof8Nu/+5SnjbufH8av/sA1gGBUdohqbETQEufW76TLjvuND6+z3nga5EwEcaB2OF+ELPP0671Hl9eH/5XfwzP53DdwYJx4HHPsSOgUk9nLpR+Jr4tvpx/YDBs4TwRyjHvcYIA0D/lnvwOTY4J3kJe/d/SYNOxkgH1wdWRRLBqb2Rul34SvheeiZ9VMFxxNkHcgfVhpjDtz+ku9N5NTfSOPT7eD8vAx9Gf4fnx6yFWYHPvc26cPg/98f52b0kQSlE+od1SCpG6gPxP/l7/bj6t4D4oPs1/s7DKMZwSDPHwUXiQjr90HpLODq3tDlL/O9A2kTVB7KIe0c7RC6AFDwveMa3tHgOOvF+qMLrBlnIeogTxiyCar4aemy3+3djeT18doCExOfHqUiIh4vErsB0/Cg42bdsd/06ar5+AqZGfEh7iGPGd8Ke/mr6VXfCN1Z473w6QGkEs4eZCNEH20TxwJr8aHjz9yn3rjoivg5CmoZXSLbIsIaDgxb+gbqFt8+3DXih+/sAB4S3x4IJFIgpBTbAxnyvuNV3LTdh+dm92kJIBmrIq4j5xs8DUr7e+r03o/bJOFV7uX/ghHTHpAkSyHSFfQE2fL24/jb2Nxj5kD2iQi8GNwiZyT7HGgORPwH6/De/Nom4Crt1v7QEKoe+SQuIvUWEgar80rkudsW3E3lG/WbB0AY7yIFJfwdjw9I/anrCd+G2j3fCOzC/QwQZh5GJfgiDBgxB430uOSY22/bSOT486EGqxfkIoYl6h6vEFX+Yew/3y3abN7x6qn8Ng8HHnQlqCMTGU8IffU+5ZXb49pW49nynQUBF7wi6yXCH8YRZ/8s7ZHf8tmz3efpjvtQDo0dhCU+JAsabAl59t3lsNtz2nfiwvGQBEEWeCIyJoQg0xJ+AAju/t/W2RPd7Oh0+lwN+hx2Jbkk8BqDCn/3kubo2yHaruGz8H4DbhUXIlsmLSHSE5YB9e6G4NfZjtwB6Fz5WwxPHEslFyXAG5QLjvhc5z3c7Nn84K/vaAKJFJshZia8IcMUrgLv7ybh9tkl3CjnSfhRC44bAiVYJXwcnAyi+TrortzU2WLguO5QAZMTBCFTJjEipBXDA/bw3+E02tjbY+Y99z4KtxqcJHslIB2ZDbv6Kuk63dvZ4t/Q7TgAkBJUICEmiiJyFtQECPKu4o7aqNu05Tn2JQnNGRokgSWsHYoO1fsp6uHdANp83/jsIv+AEY0f0iXHIiwX3gUh85LjBtuV2xzlQPUHCNEYfCNpJR8ebA/v/DfroN5D2jHfMuwR/mYQrh5mJeci0RfgBkH0iuSZ26DbnORU9OgGxRfFIjIldx49EAf+Uux436TaA9+B6wf9RA+7Hd0k6iJfGNcHZfWU5Ujcyds15HbzyQWrFvQh3iS0Hv0QG/927WfgItvy3uTqBfwcDrQcOCTPItUYwQiL9q7mEd0Q3OnjqfKtBIUVCyFsJNUeqREoAKPuauG92/7eXuoO++8Mmxt3I5YiMhmdCbD31efz3XXcuOPt8ZUDVBQMIN0j2R4/EiwB1u+B4nPcJ9/w6SP6wAtzGp0iPyJ0GWkK1PgK6e3e+Nyi40bxgwIbE/geMiPAHr8SJgIN8anjRd1v35vpRvmSCjwZqiHLIZwZIwvz+Ujq/d+X3arjs/B6AdwR0R1qIooeJxMUA0by4uQw3tPfYel6+GYJ+RefIDohpxnJCwv7j+si4VLezuM28HsAmBCYHIghNh52E/MDf/Mo5jTfVeBB6cD3PgisFn4fjCCXGVoMG/zb7FniKd8P5NLviP9TD1AbjSDFHawTwgS29HrnT+D04DzpGPcdB1cVSR7BH2oZ1Qwh/Szuo+Mb4G3khu+k/g4O+Rl5HzcdxhN/Bej11+iB4bDhVOmG9gQG/BMAHdweHxk5DRr+fu/75Cbh6eRT79D9zAyXGE0ejBzGEyoGFPc76sbih+KI6Qr29gSeEqcb3R24GIQNBf/Q8GLmSeKB5TzvDv2OCysXDR3EG6kTvwY3+KXrHuR549nppfX0Az0RPhrEHDUYtg3h/x/y1OeC4zbmP+9e/FcKuBW4G+IacRM/B0/5Eu2H5YXkRupZ9QAD3Q/IGJMblBfNDaoAavNP6dHkB+de78T7KAk/FFEa5RkcE6cHXPqB7v/mquXQ6ib1HAKADkcXTBrYFskNYQGu9NLqNObz55nvP/sECMIS2RjOGKoS9wda++/vhOjn5nbrDfVKASgNvRXwGAAWqg0DAur1Wuyp5/no8O/R+uwGRRFTF58XHRIuCEj8W/EU6jnoOOwO9YoA1gsrFIEXDRVvDY8CG/fl7S7pGOpj8Hv64gXID8AVWRZzEUsIJf3B8q3roOkV7Sv14P+NCpUSARYAFBkNBAM/+HHvwepP6/LwP/rpBE4OIxT9FK4QTQju/SH0TO0a6w3uZPVL/08J+xBwFNsSpwxhA1X5/PBg7J3snPEc+gEE2gx9Eo0Tzw80CKP+d/Xw7qXsHe+39c3+HghhD9ISnhEZDKUDW/qD8gnuAO5i8hT6LANtC9EQCxLVDgEIQv/C9pfwP+5H8Cf2Z/77BskNKBFLEG8LzwNP+wX0u+9370LzJvpsAgkKIQ94EMINsgfK/wH4PfLm74fxsfYZ/ukFNAx0D+MOqwrgAzD8gPVy8f/wO/RT+sEBsAhuDdYOlwxHBzsAMfni85nx3vJX9+b96ASmCrkNZw3NCdUD/Pzx9i3zmPJO9Zz6LgFlB7wLJw1WC8IGkgBQ+oP1VfNI9Bf4zP37Ax4J+AvaC9YIsAOy/Vb46vRA9Hj2//qyACgGDAptC/8JIgbRAF37HvcZ9cb18fjN/SIDoQc0Cj4KxgdwA1L+rvmn9vT1uPd9+08A/ARgCKsJlAhnBfUAV/yw+OH2VPfk+ej9XwIwBm4IkwifBhUD2f73+mD4svcO+Rb8BgDjA7sG4gcWB5ME/gA8/Tj6rfjy+O/6H/60Ac0EqgbdBmMFoAJI/y/8Ffp4+Xb6yfzX/90CHwUUBogFpwPtAAv+tPt4+p36Efxw/iABeQPoBB0FEQQQAp3/VP3D+0X78fuV/cH/7AGNA0QE7AOjAsIAwv4i/UP8VPxI/dv+pgA2Ai0DVQOtAmYB2P9l/mf9Fv18/Xn+x/8RAQgCdAJCAogBfABi/4D+Cv4U/pP+Yf9FAAYBeAGHATcBpAD5/2H/Af/o/hX/dP/n/04AkQClAI4AWQAbAOj/zf/L/9v/8v8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANACUAKwAKAMr/kv+R/9n/TwCxALwAVwCs/xb/8/5p/0YAFgFfAeYA3f/N/lP+wP7s/zwB9QGiAV4Azv7O/ff9Rf8RAWACcQImASb/g/0s/WH+jACEAjADIALY/4v9gfxZ/bD/TAK/AzAD2gD2/Rb8S/yN/q4B/wMyBBkCyP4H/F77Ov2qANgDAgV3A/r/aPyz+tr7Tf87A34F0AR7AUH9bfqS+rD9JQKJBfsFLAOQ/qP6jPn1+6EADgXSBucERQBk++74RvrE/gYEMQeABkECs/zW+M74svx1AvwGygdeBIH+Wvm795b6bwAmBpwIbQa2AIP6NPeg+BX+rATSCD0IKgNK/FX3A/eU+50CVQibCawFmv4w+O71HvkWABwHXAoHCE0Bx/mJ9ez2Q/0sBWAKAgo0BAr87PU19Vj6nQKRCWkLFAfa/ib3KfSR95f/7gcQDLEJCQIv+fDzLfVO/IUF1wvNC1wF8fuf9GbzAPl2Aq8KMg2TCEH/PvZv8vL18v6cCLMNaAvoAr/4bPJn8zn7tgUzDZoNogYA/HDznPGR9ycCqwvxDiUKzv979cTwRfQq/iQJQg8oDegDdvgB8ZzxBvq/BXQOZg8BCDf8YfLY7wz2sQGDDKQQyAuBANz0Ku+M8j79hAm6EO4OCAVU+LDv0u+4+KEFlQ8rEXgJlfx08SDudfQWATgNRxJ5DVYBZfSm7cvwM/y+CRkStxBEBlv4fu4L7lH3WgWWEOgSAgsZ/avwduzO8lYAxg3WEzIPTQIU9DnsBu8J+88JXBN9EpsHifhr7Uvs1PXuBHMRmRSdDML9B/Dd6hzxdP8tDk8V8hBkA+zz5+pB7cT5uAmAFD8UCQnf+HrslepF9FsELBI6FkYOjv6J71npYu9y/mwOrha1EpcE6/Oz6X/rZfh6CYQV+RWLClv5revu6KbypAO/EsgX+Q99/zPv7eek7VH9hA7yF3cU5QUS9J7ow+nx9hUJZBamFx8M/PkF61fn/PDKAisTQBmzEYsABe+b5uTrE/x0DhcZNBZLB2H0q+cR6Gn1iQggF0QZwA3A+oTq1eVI79ABbxOeGm8TtgH/7mblJ+q9+jwOGxroF8YI1vTc5m3m0vPaB7YXzxpsD6f7Kupq5JDttwCME+EbKxX9AiDvUeRw6FD53Q39GpEZUgpw9TLm2uQv8gcHJRhEHB8Rrvz36Rrj1+uB/4ETBh3iFlsEae9e48Pm0PdYDbsbLBvsCy72ruVb44LwFAZtGKEd1RLS/e3p5+Ef6jL+TRMKHpIYzgXZ747iJOVA9q4MUhyzHJEND/dR5fPh0O4BBY0Y4h6LFBL/CurT4G7ozPzzEuweNxpTB27w4+GV46P04QvDHCUePQ8P+BzlpeAd7dIDhRgFID0WagBP6uDfxuZS+3MSqR/MG+cIJ/Fe4Rni/fLzCg0dfx/uEC75EOV032vriQJVGAgh5xfXAbvqEd8r5cj5zRFBIFAdhgoD8gHhteBR8eYJLh29IJ4SaPor5WLev+koAf4X6SGHGVYDTetm3qDjMfgFEbMgvh4tDP/yy+Bq36PvuwgoHd4hSxS6+23lcd0c6LT/gBelIhgb5QQC7OLdKeKR9hoQ/CAUINgNGfS94Dze9+13B/oc3yLwFSP91+Wj3IXmL/7dFjwjlxx/BtvshN3I4Or0EA8eIVAhgw9P9dfgLN1P7BsGpBy9I4sXnv5m5vrb/+Sd/BcWrCMCHiEI1O1P3YHfQPPpDRghbSIrEZ72GeE+3LHqqwQoHHgkGBkoABrnd9uL4wD7LxX1I1Ufxwnr7kHdVd6Y8agM6iBrI80SA/iC4XLbHukpA4YbDSWUGr4B8ecb2y7iXfknFBYkjSBvCx/wXN1J3fTvTwuUIEckZBR7+RHiy9qb55oBwRp8JfsbXQPp6Ofa6uC39wITDySoIRQNbPGe3V3cWe7hCRggACXuFQP7xOJK2ivmAADaGcMlSx0BBf/p2trB3xL2whHgI6Misg7P8gfelNvK7GEIdx+TJWcXl/yb4/DZ0ORf/tMY4iWAHqYGMuv22rfecfRqEIojfCNHEEb0l97v2knr0waxHv8lyxg0/pLkvdmP47v8rhfaJZgfSQh+7Drbzt3Y8v0ODSMyJM4RzfVL33Da2+k7BckdRSYZGtb/qeWz2WniGPttFqklkSDlCeHtpdsH3Urxfg1qIsMkRRNg9yPgGNqD6JsDwRxiJkwbegHc5tDZYeF4+RUVUSVpIXkLWO823GTcy+/wC6MhLiWoFP34HOHn2UPn9wGbG1gmYhwcAyroFtp54N/3pxPSJB0i/wzg8Ozc59te7lcKuSBxJfQVn/o04t/ZHuZUAFoaJSZaHbkEjumD2rTfUvYnEi0krCJ2DnTyxd2R2wbttgivH40lJhdE/Gnj/9kX5bP+/xjLJTAeTAYH6xbbE9/T9JgQZCMVI9gPEvTA3mLbx+sSB4cegCU8GOf9uORG2jHkGv2PF0kl4x7UB5DsztuX3mbz/Q54IlcjJRG29dvfXNui6mwFQx1MJTMZhf8f5rXabOOM+w0WoiRxH0sJJ+6q3ELeDfJaDWwhcSNXEl33E+F925vpygPmG+8kCRobAZvnStvL4gv6exTXI9kfrwrI76jdFN7N8LILQSBjI24TA/ll4sbbtOguAnMabCS8GqQCJ+kF3FDinPjdEugiGyD9C2/xxd4P3qfvCgr6Hi0jZhSk+s/jN9zv550A7RjDI0sbHgTB6uTc++FB9zYR2SE0IDINGfMA4DHenu5kCJkdzyI9FT38TuXO3E3nGf9YF/UitBuFBWbs5N3N4f71iw+rICYgSw7D9Fbhe9617cUGIxxLIvIVyv3e5ovd0eam/bUVBCL1G9YGEu4E38jh1fTeDWEf7x9FD2j2xOLt3u3sLwWZGqAhghZI/33obN575kj8ChTyIBAcDwjB70Pg6uHJ8zQM/R2RHx8QBvhH5IbfSeynA/4Y0CDtFrMAJupv30zmAPtaEsEfAhwrCW/xnOE04tzyjwqCHAsf1xCY+dzlRODL6y8CVxfdHzAXCQLX65LgRebT+agQdB7MGyoKGvMO46biEfL0CPMaYB5rERv7f+cm4XLrywCnFckeTBdHA4zt0+Fm5sL4+A4MHW4bCQu+9JXkP+Np8WYHVRmPHdgRjfwu6SriQOt+//ETlR1BF2kEQO8v46/m0PdNDY0b6RrFC1b2Lub94+bw5wWpF5scIBLp/eTqT+M260r+ORJFHA0XbgXx8KTkH+cA96sL+xk+Gl0M4PfW59/kifB9BPMVhhs/Ei3/nuyS5FXrM/2DENsasRZSBpvyL+a351L2FgpYGG4Z0AxY+Yrp5OVT8CkDNxRRGjcSVgBZ7vHlm+s7/NEOWRkuFhUHO/TM53ToyvWRCKcWehgdDbz6ResK50Xw7gF5Ev8YBxJiARHwaecI7GT7KQ3DF4UVswfM9XnpVeln9R8H7BRlF0INCPwG7U7oXvDPALwQkxevEU4CwvH26J3sr/qMCxwWtxQtCEz3MetZ6iv1wwUrEzAWPw05/cfurumg8M//BA8PFjARGANp85fqV+0f+v8JZxTFE4AIuPjy7H7rFvWABGcR3RQUDUz+hfAn6wnx8P5UDXYUihC+AwL1R+w27rX5hQioErESrAgM+rjuwuwq9VkDpA9wE8IMQf898rfsmfEz/rALzBLAD0AEivYD7jjvcvkgB+IQfRGwCEb7f/Ai7mX1UALlDesRSAwUAOzzWe5P8pv9GwoUEdEOmwT+98jvW/BW+dQFGA8sEIwIYvxD8pvvyfVoAS4MUhCnC8MAjPUM8CrzKP2YCFEPwA3PBFv5k/Gc8WL5pARPDcAOQAhg/QL0K/FT9qIAggqmDuEKTQEd98vxKPTc/CsHhw2PDNsEnvpf8/rylvmSA4oLPA3NBzz+t/XO8gP3AADlCOwM+AmxAZn4k/NH9bf81gW6C0ELvwTE+yj1cvTx+aACzQmiCzMH9f5f94H02PeE/1sHJwvsCO4B//lh9YX2u/ydBOwJ1wl8BMv87fYA9nT60QEbCPYJdAaJ//f4QvbQ+C7/5QVaCb8HBAJK+zH33/fm/IIDIghVCBEEsf2o+KP3HPslAXcGPAiRBff/e/oM+On5AP+IBIoHdQbyAXr8//hU+Tj9hgJgBr0GfwN0/lb6Vvnq+58A5QR2BosEPgDp+9z5Ivv5/kYDuQUQBbcBiv3H+t/6sv2tAagEEwXIAhL/9fsW+9v8PwBoA6kEZQNeAD39rvt3/Bv/IQLsA5EDVgF6/of8f/xS/vcA/gJaA+0Biv+A/eD87f0HAAMC1wIhAlUAdf5+/ef9ZP8cASUC/QHNAEb/O/4w/hf/ZwBlAZUB7wDb//X+sP4f//b/uAAEAcEAJQCO/0r/bv/U/zkAaQBXAB8A7v/f/+7/`);e.volume=L,e.play()?.catch(()=>{})}catch{}if(R&&typeof Notification<`u`&&Notification.permission===`granted`)try{new Notification(z??`Timer done`,{body:V??(typeof w==`string`?w:void 0)})}catch{}}J!==`completed`&&(pe.current=!1)},[J]),(0,c.useEffect)(()=>{if(!X.current){X.current=!0;return}let e=n*1e3;fe.current=e,he(e),pe.current=!1,_e(),i&&ge(r?`running`:`idle`)},[n]),(0,c.useEffect)(()=>{if(!P||J!==`running`||$p())return;function e(){let e=++Z.current;ue(t=>[...t,e])}let t=setTimeout(e,0),n=setInterval(e,Zp);return()=>{clearTimeout(t),clearInterval(n)}},[P,J]);function ve(e){ue(t=>t.filter(t=>t!==e))}function ye(){R&&!me.current&&typeof Notification<`u`&&Notification.permission==="default"&&(me.current=!0,Notification.requestPermission().catch(()=>{}))}function be(){ye(),(de.current===`completed`||de.current===`cancelled`)&&(he(fe.current),pe.current=!1),_e(),ge(`running`),s?.()}function xe(){de.current===`running`&&(ge(`paused`),u?.())}function Se(){de.current===`paused`&&(_e(),ge(`running`),p?.())}function Ce(e){let t=C==null?1/0:C*1e3,n=Math.min(Y.current+e*1e3,t);he(n),_e(),h?.(e,Math.round(n/1e3)),de.current===`completed`&&n>0&&(pe.current=!1,ge(`running`))}function we(e){let t=Math.max(0,Y.current-e*1e3);he(t),_e(),g?.(e,Math.round(t/1e3)),t<=0&&de.current===`running`&&ge(`completed`)}function Te(){he(fe.current),ge(`cancelled`),m?.()}function Ee(){he(fe.current),pe.current=!1,ge(`idle`)}(0,c.useImperativeHandle)(t,()=>({start:be,pause:xe,resume:Se,addTime:Ce,removeTime:we,cancel:Te,reset:Ee,getStatus:()=>de.current,getRemainingMs:()=>Y.current}));let De=50-k/2,Oe=(0,c.useMemo)(()=>2*Math.PI*De,[De]),ke=Oe*(1-(fe.current>0?Math.min(1,ie/fe.current):0)),Ae=Math.max(fe.current*j,M*1e3),je=J===`running`&&ie<=Ae,Me=je&&ie<=Math.min(5e3,Ae),Ne=J===`paused`,Pe=_&&!v,Q=_&&!y,Fe=_&&!b,Ie=J===`running`?d.faPause:d.faPlay,Le=J===`running`?`Pause`:Ne?`Resume`:J===`idle`?`Start`:`Restart`,Re=J===`running`?xe:Ne?Se:be,ze=_&&!x;return(0,f.jsxs)(`div`,{...K,className:(0,l.default)(Yp.timer,N&&je&&Yp.timerPulsing,Me&&Yp.timerCritical,H,W?.root),style:{...E?{"--timer-size":E}:null,"--timer-stroke-width":`${k}px`,...U,...G?.root},children:[(0,f.jsxs)(`div`,{className:(0,l.default)(Yp.timerRingWrapper,W?.ringWrapper),style:G?.ringWrapper,children:[le.length>0&&(0,f.jsx)(`div`,{className:(0,l.default)(Yp.timerRipples,W?.ripples),style:G?.ripples,children:le.map(e=>(0,f.jsx)(`span`,{className:(0,l.default)(Yp.timerRipple,W?.ripple),style:G?.ripple,onAnimationEnd:()=>ve(e)},e))}),(0,f.jsxs)(`svg`,{className:(0,l.default)(Yp.timerRingSvg,W?.ringSvg),viewBox:`0 0 100 100`,style:G?.ringSvg,children:[(0,f.jsx)(`circle`,{className:(0,l.default)(Yp.timerRingTrack,W?.ringTrack),cx:`50`,cy:`50`,r:De,style:G?.ringTrack}),(0,f.jsx)(`circle`,{className:(0,l.default)(Yp.timerRingProgress,je&&Yp.timerRingProgressUrgent,W?.ringProgress),cx:`50`,cy:`50`,r:De,strokeDasharray:Oe,strokeDashoffset:ke,style:{transition:Ne?`none`:void 0,transform:A?`rotate(-90deg)`:void 0,...G?.ringProgress}})]}),(0,f.jsxs)(`div`,{className:(0,l.default)(Yp.timerDisplay,W?.display),style:G?.display,children:[(0,f.jsx)(`span`,{className:(0,l.default)(Yp.timerTime,W?.time),style:G?.time,children:T(ie)}),w&&(0,f.jsx)(`span`,{className:(0,l.default)(Yp.timerLabel,W?.label),style:G?.label,children:w})]})]}),_&&(0,f.jsxs)(`div`,{className:(0,l.default)(Yp.timerControls,W?.controls),style:G?.controls,children:[(0,f.jsxs)(`div`,{className:Yp.timerControlsRow,children:[Q&&(0,f.jsx)(ce,{icon:d.faMinus,title:`Remove ${S}s`,onClick:()=>we(S),className:(0,l.default)(Yp.timerAdjustButton,W?.removeButton),style:G?.removeButton}),Fe&&(0,f.jsx)(ne,{size:B.Small,icon:Ie,title:Le,onClick:Re,className:W?.pauseButton,style:G?.pauseButton}),Pe&&(0,f.jsx)(ce,{icon:d.faPlus,title:`Add ${S}s`,onClick:()=>Ce(S),className:(0,l.default)(Yp.timerAdjustButton,W?.addButton),style:G?.addButton})]}),ze&&(0,f.jsx)(ce,{icon:d.faXmark,title:te.cancel,onClick:Te,className:(0,l.default)(Yp.timerCancelButton,W?.cancelButton),style:G?.cancelButton})]})]})}var nm={virtualList:`virtualList_qBPNc`,"virtualList-drag-clone":`virtualList-drag-clone_artnC`,virtualListDragClone:`virtualList-drag-clone_artnC`,"virtualList-header":`virtualList-header_0Ellb`,virtualListHeader:`virtualList-header_0Ellb`,"virtualList-header-cell":`virtualList-header-cell_c8NGV`,virtualListHeaderCell:`virtualList-header-cell_c8NGV`,"virtualList-header-resize":`virtualList-header-resize_cbYFc`,virtualListHeaderResize:`virtualList-header-resize_cbYFc`,"virtualList-header-sort":`virtualList-header-sort_Cdpe3`,virtualListHeaderSort:`virtualList-header-sort_Cdpe3`,"virtualList-header-sort-label":`virtualList-header-sort-label_6MaZ3`,virtualListHeaderSortLabel:`virtualList-header-sort-label_6MaZ3`,"virtualList-header-sort-icon":`virtualList-header-sort-icon_Z-Nrd`,virtualListHeaderSortIcon:`virtualList-header-sort-icon_Z-Nrd`,"virtualList-header-sort-icon-active":`virtualList-header-sort-icon-active_g7qrb`,virtualListHeaderSortIconActive:`virtualList-header-sort-icon-active_g7qrb`,"virtualList-header-toggle":`virtualList-header-toggle_pYFxD`,virtualListHeaderToggle:`virtualList-header-toggle_pYFxD`,"virtualList-toggle-panel":`virtualList-toggle-panel_Uksmk`,virtualListTogglePanel:`virtualList-toggle-panel_Uksmk`,"virtualList-toggle-wrapper":`virtualList-toggle-wrapper_JP32M`,virtualListToggleWrapper:`virtualList-toggle-wrapper_JP32M`,"virtualList-toggle-popover":`virtualList-toggle-popover_gbpd7`,virtualListTogglePopover:`virtualList-toggle-popover_gbpd7`,"virtualList-toggle-item":`virtualList-toggle-item_5gu5d`,virtualListToggleItem:`virtualList-toggle-item_5gu5d`,"virtualList-toggle-reset":`virtualList-toggle-reset_3UANJ`,virtualListToggleReset:`virtualList-toggle-reset_3UANJ`,"virtualList-column-chip":`virtualList-column-chip_nOqr6`,virtualListColumnChip:`virtualList-column-chip_nOqr6`,"virtualList-select-cell":`virtualList-select-cell_s9kAy`,virtualListSelectCell:`virtualList-select-cell_s9kAy`,"virtualList-body":`virtualList-body_k-fRr`,virtualListBody:`virtualList-body_k-fRr`,"virtualList-row-active":`virtualList-row-active_H5r5-`,virtualListRowActive:`virtualList-row-active_H5r5-`,"virtualList-resizing":`virtualList-resizing_28Mn4`,virtualListResizing:`virtualList-resizing_28Mn4`,"virtualList-row":`virtualList-row_TTY50`,virtualListRow:`virtualList-row_TTY50`,"virtualList-row-no-divider":`virtualList-row-no-divider_Ct0gV`,virtualListRowNoDivider:`virtualList-row-no-divider_Ct0gV`,"virtualList-row-no-hover":`virtualList-row-no-hover_2d3mH`,virtualListRowNoHover:`virtualList-row-no-hover_2d3mH`,"virtualList-row-selected":`virtualList-row-selected_hwEN-`,virtualListRowSelected:`virtualList-row-selected_hwEN-`,"virtualList-row-draggable":`virtualList-row-draggable_I86ha`,virtualListRowDraggable:`virtualList-row-draggable_I86ha`,"virtualList-row-dragging":`virtualList-row-dragging_6T5tQ`,virtualListRowDragging:`virtualList-row-dragging_6T5tQ`,"virtualList-row-drop-inside":`virtualList-row-drop-inside_Uhi9n`,virtualListRowDropInside:`virtualList-row-drop-inside_Uhi9n`,"virtualList-drop-line":`virtualList-drop-line_EM-g4`,virtualListDropLine:`virtualList-drop-line_EM-g4`,"virtualList-drop-line-before":`virtualList-drop-line-before_n-0iZ`,virtualListDropLineBefore:`virtualList-drop-line-before_n-0iZ`,"virtualList-drop-line-after":`virtualList-drop-line-after_2dld-`,virtualListDropLineAfter:`virtualList-drop-line-after_2dld-`,"virtualList-reordering":`virtualList-reordering_Rt9E3`,virtualListReordering:`virtualList-reordering_Rt9E3`,"virtualList-cell":`virtualList-cell_H0zBv`,virtualListCell:`virtualList-cell_H0zBv`,"virtualList-loading-full":`virtualList-loading-full_wzZNM`,virtualListLoadingFull:`virtualList-loading-full_wzZNM`,"virtualList-loading-indicator":`virtualList-loading-indicator_EJced`,virtualListLoadingIndicator:`virtualList-loading-indicator_EJced`,"virtualList-spinner":`virtualList-spinner_apClW`,virtualListSpinner:`virtualList-spinner_apClW`,"virtualList-windowed":`virtualList-windowed_riUyT`,virtualListWindowed:`virtualList-windowed_riUyT`};function rm(e,t,n,r=0){let i=e.length,a=Array(i+1);a[0]=0;for(let o=0;o<i;o++){let s=o<i-1?r:0;a[o+1]=a[o]+(t.get(e[o])??n)+s}return{offsets:a,totalHeight:a[i]}}function im(e,t,n){if(n<=0)return 0;let r=0,i=n-1;for(;r<i;){let n=r+i>>1;e[n+1]<=t?r=n+1:i=n}return r}function am(e,t,n,r,i){if(i===0)return{startIndex:0,endIndex:-1};let a=im(e,t,i),o=a;for(;o<i&&e[o]<t+n;)o++;return{startIndex:Math.max(0,a-r),endIndex:Math.min(i-1,o+r-1)}}function om(e,t,n,r,i){if(e===-1||e===t)return null;let a=r+i/2;return(t>e?n>=a:n<=a)?t:null}function sm(e,t,n,r){if(n<=0)return`before`;let i=(e-t)/n;return r?i<1/3?`before`:i>2/3?`after`:`inside`:i<.5?`before`:`after`}function cm(e,t){let n=t[e],r=e+1;for(;r<t.length&&t[r]>n;)r++;return r-1}function lm(e,t){return e.length===0?`1fr`:e.map(e=>{switch(e.width.type){case`fixed`:return`${e.width.px}px`;case`flex`:return`${e.width.weight??1}fr`;case`fit`:{let n=t?.[e.key];return n==null?`fit-content(100%)`:`${n}px`}}}).join(` `)}var um=`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`,dm=`data-vl-parked`,fm=`${um}, [${dm}]`;function pm(e){let t=e.scrollWidth>e.clientWidth,n=e.scrollWidth;if(!t&&!e.firstElementChild)return n;let r=getComputedStyle(e),i=parseFloat(r.paddingLeft)||0,a=parseFloat(r.paddingRight)||0;if(t&&(n+=a),e.firstElementChild&&!t&&e.scrollWidth<=i+a+1){let t=1/0,r=-1/0;if(e.querySelectorAll(`*`).forEach(e=>{let n=e.getBoundingClientRect();n.left<t&&(t=n.left),n.right>r&&(r=n.right)}),r>t){let e=Math.ceil(r-t)+i+a;e>n&&(n=e)}}return n}function mm(e){return`[data-col-key="${e.replace(/["\\]/g,`\\$&`)}"]`}function hm(e){return`--vl-col-${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}`}function gm(e){return e.width.type===`fixed`?e.width.px:e.width.type===`fit`?160:160*(e.width.weight??1)}function _m(e){return e.length===0?`1fr`:e.map(e=>`var(${hm(e.key)}, 160px)`).join(` `)}var vm=`ahroweui:virtuallist:columns:`;function ym(e){if(!e||typeof window>`u`)return null;try{let t=window.localStorage.getItem(vm+e);if(!t)return null;let n=JSON.parse(t);if(n&&Array.isArray(n.visible)&&Array.isArray(n.known)){let e={};if(n.widths&&typeof n.widths==`object`)for(let[t,r]of Object.entries(n.widths))typeof r==`number`&&Number.isFinite(r)&&r>0&&(e[t]=r);return{visible:n.visible.filter(e=>typeof e==`string`),known:n.known.filter(e=>typeof e==`string`),widths:e}}}catch{}return null}function bm(e,t){return e.lockVisible?!0:t&&t.known.includes(e.key)?t.visible.includes(e.key):!e.defaultHidden}var xm;function Sm(){return xm??=new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`}),xm}function Cm(e){return e==null||typeof e==`number`&&Number.isNaN(e)}function wm(e,t){let n=e instanceof Date?e.getTime():typeof e==`boolean`?Number(e):e,r=t instanceof Date?t.getTime():typeof t==`boolean`?Number(t):t;return typeof n==`string`||typeof r==`string`?Sm().compare(String(n),String(r)):n<r?-1:+(n>r)}function Tm(e){return e.sortValue!=null||e.compare!=null||e.sortable===!0}function Em(e,t){return!e||e.key!==t?{key:t,direction:`asc`}:e.direction===`asc`?{key:t,direction:`desc`}:null}function Dm(e,t,n){if(!t||!n)return e;let r=n.find(e=>e.key===t.key);if(!r||r.compare==null&&r.sortValue==null)return e;let i=t.direction===`asc`?1:-1,{compare:a,sortValue:o}=r,s=e.map((e,t)=>({item:e,index:t}));return s.sort((e,t)=>{let n;if(a)n=i*a(e.item,t.item);else{let r=o(e.item),a=o(t.item),s=Cm(r),c=Cm(a);n=s||c?s===c?0:s?1:-1:i*wm(r,a)}return n===0?e.index-t.index:n}),s.map(e=>e.item)}function Om({index:e,id:t,top:n,padding:r,columnTemplate:i,isSelected:a,isActive:o,manageTabStops:s,isEntered:u,activeClassName:d,activeStyle:p,showDivider:m,hover:h,onClick:g,observer:_,ariaRowIndex:v,ariaPosInSet:y,ariaSetSize:b,rowRole:x,reorderable:S,mouseDragEnabled:C,draggable:w,isDragging:T,reserveToggleGutter:E,onMouseDown:D,onMouseOver:O,onMouseLeave:k,onDragStart:A,onDragOver:j,onDragEnd:M,onDrop:N,onTouchStart:P,dropPosition:F,dropIndentPx:I,dropIndicatorClassName:L,dropIndicatorStyle:R,rowClassName:z,rowStyle:B,children:V}){let H=(0,c.useRef)(null);return(0,c.useLayoutEffect)(()=>{let e=H.current;if(e&&_)return _.observe(e),()=>_.unobserve(e)},[_]),(0,c.useLayoutEffect)(()=>{let e=H.current;if(!e||!s||u)return;let t=[];return e.querySelectorAll(um).forEach(e=>{t.push([e,e.getAttribute(`tabindex`)]),e.setAttribute(`tabindex`,`-1`),e.setAttribute(dm,``)}),()=>{for(let[e,n]of t)n===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,n),e.removeAttribute(dm)}}),(0,f.jsxs)(`div`,{ref:H,id:t,"data-index":e,className:(0,l.default)(nm.virtualListRow,a&&nm.virtualListRowSelected,o&&nm.virtualListRowActive,o&&d,!m&&nm.virtualListRowNoDivider,!h&&nm.virtualListRowNoHover,S&&nm.virtualListRowDraggable,T&&nm.virtualListRowDragging,F===`inside`&&nm.virtualListRowDropInside,z),style:{position:`absolute`,top:0,left:0,right:0,transform:`translateY(${n}px)`,...r==null?{}:{padding:r},...i?{display:`grid`,gridTemplateColumns:i}:{},...E?{paddingRight:32}:{},...B,...o?p:void 0},onClick:g,draggable:w,onMouseDown:D,onMouseOver:O,onMouseLeave:k,onDragStart:A,onDragOver:j,onDragEnd:M,onDrop:N??(C?e=>e.preventDefault():void 0),onTouchStart:P,onContextMenu:C?e=>e.preventDefault():void 0,"aria-selected":a,"aria-rowindex":v,"aria-posinset":y,"aria-setsize":b,role:x,children:[(F===`before`||F===`after`)&&(0,f.jsx)(`div`,{"data-drop-line":F,"aria-hidden":!0,className:(0,l.default)(nm.virtualListDropLine,F===`before`?nm.virtualListDropLineBefore:nm.virtualListDropLineAfter,L),style:{left:I??0,...R}}),V]})}function km(e){let[t,n]=(0,c.useState)(0),r=(0,c.useRef)([]),i=Math.min(t,Math.max(0,e-1));i!==t&&n(i);function a(t){let i=Math.max(0,Math.min(t,e-1));n(i),r.current[i]?.focus()}function o(e){return{tabIndex:e===i?0:-1,ref:t=>{r.current[e]=t},onFocus:()=>n(e)}}function s(t,n){if(t.altKey||t.ctrlKey||t.metaKey)return!1;switch(t.key){case`ArrowRight`:a(n+1);break;case`ArrowLeft`:a(n-1);break;case`Home`:a(0);break;case`End`:a(e-1);break;default:return!1}return t.preventDefault(),t.stopPropagation(),!0}return{getStationProps:o,handleNavigationKey:s}}var Am=10;function jm({headerRef:e,columns:t,cols:n,resize:r,sort:i,onSort:a,multiSelect:o,allSelected:s,someSelected:c,onSelectAll:p,labels:m,classNames:h,styles:g}){let _=+!!o,v=_+n.visibleColumns.length+ +!!n.shouldShowToggle,y=km(v);return(0,f.jsxs)(`div`,{ref:e,className:(0,l.default)(nm.virtualListHeader,h?.header),style:{gridTemplateColumns:n.columnTemplate,...n.shouldShowToggle?{paddingRight:32}:{},...g?.header},role:`row`,"aria-rowindex":1,children:[o&&(0,f.jsx)(`div`,{...y.getStationProps(0),className:(0,l.default)(nm.virtualListSelectCell,h?.selectCell),style:g?.selectCell,role:`columnheader`,onKeyDown:e=>{y.handleNavigationKey(e,0)||e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),p())},children:(0,f.jsx)(Oi,{selected:s||c,onToggle:p,"aria-label":m.selectAllRows,tabIndex:-1})}),n.visibleColumns.map((e,t)=>{let n=Tm(e),o=i&&i.key===e.key?i.direction:null,s=r.getHandleProps(e),c=_+t;return(0,f.jsxs)(`div`,{...y.getStationProps(c),onKeyDown:t=>{if(!y.handleNavigationKey(t,c)){if(t.altKey&&r.isResizable(e)){let n=t.shiftKey?1:Am;if(t.key===`ArrowRight`)r.resizeBy(e.key,n);else if(t.key===`ArrowLeft`)r.resizeBy(e.key,-n);else if(t.key===`Home`)r.resizeToMin(e.key);else if(t.key===`End`)r.autoFit(e.key);else return;t.preventDefault();return}n&&t.target===t.currentTarget&&(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),a(e.key))}},className:(0,l.default)(nm.virtualListHeaderCell,h?.headerCell),style:g?.headerCell,role:`columnheader`,"data-col-key":e.key,"aria-sort":n?o===`asc`?`ascending`:o===`desc`?`descending`:`none`:void 0,"data-fit-key":e.width.type===`fit`?e.key:void 0,children:[n?(0,f.jsxs)(`button`,{type:`button`,className:(0,l.default)(nm.virtualListHeaderSort,h?.headerSort),style:g?.headerSort,onClick:()=>a(e.key),tabIndex:-1,children:[(0,f.jsx)(`span`,{className:nm.virtualListHeaderSortLabel,children:e.label}),(0,f.jsx)(u.FontAwesomeIcon,{className:(0,l.default)(nm.virtualListHeaderSortIcon,o&&nm.virtualListHeaderSortIconActive,h?.sortIcon),style:g?.sortIcon,icon:o===`asc`?d.faSortUp:o===`desc`?d.faSortDown:d.faSort})]}):e.label,s&&(0,f.jsx)(`div`,{...s,className:(0,l.default)(nm.virtualListHeaderResize,h?.resizeHandle),style:g?.resizeHandle})]},e.key)}),n.shouldShowToggle&&(0,f.jsx)(Mm,{station:v-1,nav:y,columns:t,cols:n,resize:r,labels:m,classNames:h,styles:g})]})}function Mm({station:e,nav:t,columns:n,cols:r,resize:i,labels:a,classNames:o,styles:s}){return(0,f.jsxs)(`div`,{className:nm.virtualListToggleWrapper,children:[(0,f.jsx)(sn,{isOpen:r.toggleOpen,onOpenChange:r.setToggleOpen,placement:wt.Bottom,align:Tt.End,constrainWidth:!1,classNames:{panel:nm.virtualListTogglePanel},content:(0,f.jsxs)(`div`,{className:(0,l.default)(nm.virtualListTogglePopover,o?.togglePopover),style:s?.togglePopover,children:[n.filter(e=>!e.hideFromToggle).map(e=>(0,f.jsx)(Oi,{className:(0,l.default)(nm.virtualListToggleItem,o?.toggleItem),style:s?.toggleItem,selected:r.effectiveVisible.has(e.key),onToggle:()=>r.handleToggleColumn(e.key),disabled:e.lockVisible,cursorDefault:!1,children:e.toggleLabel??e.label},e.key)),i.isFrozen&&(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(nm.virtualListToggleReset,o?.toggleReset),style:s?.toggleReset,onClick:()=>{i.reset(),r.setToggleOpen(!1)},children:a.resetColumnWidths})]}),children:(0,f.jsx)(`button`,{...t.getStationProps(e),type:`button`,className:(0,l.default)(nm.virtualListHeaderToggle,o?.headerToggle),style:s?.headerToggle,"aria-label":a.toggleColumns,onKeyDown:n=>t.handleNavigationKey(n,e),children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faGear,style:s?.headerToggle})})}),r.manuallyHiddenCount>0&&(0,f.jsx)(`span`,{className:(0,l.default)(nm.virtualListColumnChip,o?.columnChip),style:s?.columnChip,"data-column-hidden-count":r.manuallyHiddenCount,"aria-label":a.columnsHidden(r.manuallyHiddenCount),children:r.manuallyHiddenCount})]})}function Nm(e){return!(`nodeType`in e)}function Pm(e){return e==null||typeof window>`u`?null:e===`window`?window:typeof e==`function`?e()??window:e}function Fm(e){return Nm(e)?{top:0,height:e.innerHeight}:{top:e.getBoundingClientRect().top+e.clientTop,height:e.clientHeight}}function Im(e,t){let n=e.clientWidth;if(!t){let t=e.clientHeight;return{rel:e.scrollTop,visibleHeight:t,viewportHeight:t,distanceToEnd:e.scrollHeight-e.scrollTop-t,width:n}}let r=e.getBoundingClientRect(),{top:i,height:a}=Fm(t),o=i+a;return{rel:i-r.top,visibleHeight:Math.max(0,Math.min(o,r.bottom)-Math.max(i,r.top)),viewportHeight:a,distanceToEnd:r.bottom-o,width:n}}function Lm(e,t){if(typeof e==`number`)return e;let n=e.trim();if(n===``)return 0;let r=Number(n);if(!Number.isNaN(r))return r;let i=/^(-?\d*\.?\d+)px$/.exec(n);if(i)return parseFloat(i[1]);if(typeof document>`u`||!t)return 0;let a=document.createElement(`div`);a.style.cssText=`position:absolute;visibility:hidden;height:${n};`,t.appendChild(a);let o=a.getBoundingClientRect().height;return t.removeChild(a),Number.isFinite(o)?o:0}var Rm=100,zm=20;function Bm({items:e,keys:t,getItemKey:n,estimatedRowHeight:r,rowGap:i,overscan:a,onLoadMore:o,loadMoreThreshold:s,isLoading:l,scrollParent:u}){let[d,f]=(0,c.useState)(0),[p,m]=(0,c.useState)(0),[h,g]=(0,c.useState)(0),[_,v]=(0,c.useState)(0),[y,b]=(0,c.useState)(()=>Lm(i,null)),[x,S]=(0,c.useState)(new Map),[C,w]=(0,c.useState)(!1),T=(0,c.useRef)(!1),E=(0,c.useRef)(null),D=(0,c.useRef)(null),O=(0,c.useRef)([]),k=(0,c.useRef)(null),A=(0,c.useRef)([]),j=u!=null,M=(0,c.useRef)(null),N=(0,c.useRef)(null),[P,F]=(0,c.useState)(null);(0,c.useLayoutEffect)(()=>{let e;if(u===`nearest`){let t=N.current;(!t||!Nm(t)&&!t.isConnected)&&(N.current=E.current?xt(E.current)??window:null),e=N.current}else e=Pm(u);M.current=e,F(t=>t===e?t:e)});let[I]=(0,c.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(e=>{S(t=>{let n=null;for(let r of e){let e=r.target,i=Number(e.dataset.index);if(Number.isNaN(i))continue;let a=A.current[i];if(a===void 0)continue;let o=r.borderBoxSize?.[0],s=o?Math.round(o.blockSize):e.offsetHeight;t.get(a)!==s&&(n||=new Map(t),n.set(a,s))}return n??t})}));(0,c.useEffect)(()=>()=>I?.disconnect(),[I]);let L=(0,c.useCallback)(e=>{let t=Math.max(0,e.rel);f(e=>e===t?e:t),m(t=>t===e.visibleHeight?t:e.visibleHeight),g(t=>t===e.viewportHeight?t:e.viewportHeight),v(t=>t===e.width?t:e.width)},[]),R=(0,c.useCallback)(()=>{let e=E.current;e&&L(Im(e,M.current))},[L]),z=(0,c.useCallback)(()=>{let e=E.current;if(!e)return{top:0,height:0};let t=Im(e,M.current);return{top:Math.max(0,t.rel),height:t.visibleHeight}},[]),B=(0,c.useCallback)(()=>{let e=E.current;if(!e)return null;let t=e.getBoundingClientRect(),n=M.current;if(!n)return{top:t.top,bottom:t.bottom,left:t.left,right:t.right};let{top:r,height:i}=Fm(n);return{top:Math.max(t.top,r),bottom:Math.min(t.bottom,r+i),left:t.left,right:t.right}},[]),V=(0,c.useCallback)(e=>{let t=E.current;if(!t)return;let n=M.current;n?Nm(n)?n.scrollBy(0,e):n.scrollTop+=e:t.scrollTop+=e},[]);(0,c.useLayoutEffect)(()=>{let e=E.current;if(!e)return;R();let t=typeof ResizeObserver>`u`?null:new ResizeObserver(()=>R());return t?.observe(e),P?(t?.observe(Nm(P)?document.documentElement:P),window.addEventListener(`resize`,R),()=>{t?.disconnect(),window.removeEventListener(`resize`,R)}):()=>t?.disconnect()},[P,R]);let H=(0,c.useRef)(o);(0,c.useLayoutEffect)(()=>{H.current=o});let U=(0,c.useCallback)(()=>{let e=H.current;e&&!T.current&&(T.current=!0,w(!0),e().finally(()=>{T.current=!1,w(!1)}))},[]),W=(0,c.useRef)(-1),G=(0,c.useCallback)(()=>{let e=E.current;if(!e)return;let t=Im(e,M.current);k.current??=requestAnimationFrame(()=>{k.current=null,R()}),t.distanceToEnd<=s&&W.current!==A.current.length&&(W.current=A.current.length,U())},[R,s,U]);(0,c.useEffect)(()=>{let e=P??E.current;if(e)return e.addEventListener(`scroll`,G,{passive:!0}),()=>e.removeEventListener(`scroll`,G)},[P,G]),(0,c.useEffect)(()=>()=>{k.current!=null&&cancelAnimationFrame(k.current)},[]),(0,c.useLayoutEffect)(()=>{A.current=t}),(0,c.useLayoutEffect)(()=>{let e=Lm(i,E.current);b(t=>t===e?t:e)},[i,_,p]);let ee=(0,c.useMemo)(()=>{if(x.size===0)return r;let e=0;for(let t of x.values())e+=t;return e/x.size},[x,r]),{offsets:K,totalHeight:te}=(0,c.useMemo)(()=>rm(t,x,ee,y),[t,x,ee,y]),q=(0,c.useRef)(``),ne=j?h:p;(0,c.useEffect)(()=>{if(!o||l||C||ne===0)return;let t=D.current?.offsetHeight??0;if(te>=ne-t)return;let n=`${e.length}:${ne}`;q.current!==n&&(q.current=n,U())},[o,l,C,e.length,te,ne,U]);let J=(0,c.useCallback)((e,t)=>{let n=E.current;if(!n)return;let r=M.current;if(!r){let r=Math.max(0,e);t&&typeof n.scrollTo==`function`?n.scrollTo({top:r,behavior:t}):n.scrollTop=r;return}let{rel:i}=Im(n,r);if(Nm(r)){r.scrollTo({top:Math.max(0,r.scrollY+e-i),behavior:t??`auto`});return}let a=Math.max(0,r.scrollTop+e-i);t&&typeof r.scrollTo==`function`?r.scrollTo({top:a,behavior:t}):r.scrollTop=a},[]);(0,c.useLayoutEffect)(()=>{let t=E.current,n=O.current;if(O.current=K,!t||n.length===0||ie.current)return;let r=z().top;if(r<=0)return;let i=im(n,r,n.length-1);if(i>=e.length)return;let a=r-n[i],o=K[i]+a;Math.abs(o-r)>.5&&(J(o),f(o))},[K,e.length,z,J]);let re=(0,c.useCallback)((t,n)=>{let r=E.current;if(!r||e.length===0)return null;let i=Math.max(0,Math.min(t,e.length-1)),a=K[i]??0,o=(K[i+1]??a)-a,s=D.current?.offsetHeight??0,c=Math.max(0,Im(r,M.current).viewportHeight-s),l=n?.align??`start`,u=a;return l===`center`?u-=(c-o)/2:l===`end`&&(u-=c-o),u},[e.length,K]),ie=(0,c.useRef)(null);(0,c.useLayoutEffect)(()=>{let t=ie.current,n=E.current;if(!t)return;let r=t.items===e&&n?re(t.index,t.options):null;if(r==null){ie.current=null;return}let i=Math.abs(r-t.lastTarget)<=1;if(i&&Math.abs(z().top-r)<=1||t.attempts>=zm){ie.current=null;return}i||(t.lastTarget=r,t.attempts+=1,J(r,t.options?.behavior))}),(0,c.useEffect)(()=>{let e=E.current;if(!e)return;let t=()=>{ie.current=null},n=P??e;return n.addEventListener(`wheel`,t,{passive:!0}),n.addEventListener(`touchstart`,t,{passive:!0}),e.addEventListener(`keydown`,t),()=>{n.removeEventListener(`wheel`,t),n.removeEventListener(`touchstart`,t),e.removeEventListener(`keydown`,t)}},[P]);let ae=(0,c.useMemo)(()=>{function t(t,n){let r=re(t,n);r!=null&&(ie.current={index:t,options:n,lastTarget:r,attempts:0,items:e},J(r,n?.behavior))}return{scrollToIndex:t,scrollToKey(r,i){let a=e.findIndex((e,t)=>(n?n(e,t):t)===r);a>=0&&t(a,i)},scrollToTop(e){ie.current=null,J(0,e?.behavior)},getScrollElement:()=>{let e=M.current;return e?Nm(e)?null:e:E.current},remeasure:R}},[e,n,re,J,R]),{startIndex:oe,endIndex:se}=(0,c.useMemo)(()=>am(K,d,p,a,e.length),[K,d,p,a,e.length]),ce=(0,c.useRef)(!1);return(0,c.useEffect)(()=>{ce.current||p===0||e.length<Rm||se-oe+1<e.length||(ce.current=!0,console.warn(`VirtualList: rendering all ${e.length} rows, so nothing is being virtualized. Its viewport is as tall as its content. Give the list a definite height, or pass scrollParent to have it ride a scrollport it does not own.`))},[p,e.length,oe,se]),{rootRef:E,headerRef:D,rowObserver:I,keysRef:A,offsets:K,totalHeight:te,containerHeight:p,viewportHeight:h,containerWidth:_,startIndex:oe,endIndex:se,showLoadMoreSpinner:C,isWindowed:j,getVisibleSlice:z,getVisibleRect:B,scrollBy:V,scrollApi:ae}}function Vm({items:e,getKey:t,multiSelect:n,selectedKeys:r,onSelectionChange:i}){let a=r!==void 0,[o,s]=(0,c.useState)(new Set),l=a?r:o;function u(e){a||s(e),i?.(e)}function d(e){let t=new Set(l);t.has(e)?t.delete(e):t.add(e),u(t)}function f(){let n=e.map((e,n)=>t(e,n));u(n.every(e=>l.has(e))?new Set:new Set(n))}let{allSelected:p,someSelected:m}=(0,c.useMemo)(()=>{if(!n||e.length===0)return{allSelected:!1,someSelected:!1};let r=e.every((e,n)=>l.has(t(e,n)));return{allSelected:r,someSelected:!r&&e.some((e,n)=>l.has(t(e,n)))}},[n,e,l,t]);return{effectiveSelectedKeys:l,handleRowSelect:d,handleSelectAll:f,allSelected:p,someSelected:m}}function Hm({columns:e,items:t,multiSelect:n,visibleColumnKeys:r,onVisibleColumnsChange:i,persistColumnsKey:a,showColumnToggle:o,userWidths:s,isFrozen:l,rootRef:u,startIndex:d,endIndex:f,containerHeight:p,containerWidth:m,isLoading:h}){let g=r!==void 0,[_,v]=(0,c.useState)(!1),[y,b]=(0,c.useState)({}),[x,S]=(0,c.useState)(()=>{let t=ym(a);return new Set((e??[]).filter(e=>bm(e,t)).map(e=>e.key))}),C=(0,c.useRef)(new Set((e??[]).map(e=>e.key)));(0,c.useEffect)(()=>{if(g)return;let t=e??[],n=new Set(t.map(e=>e.key)),r=C.current,i=n.size===r.size;if(i){for(let e of n)if(!r.has(e)){i=!1;break}}if(i)return;C.current=n;let o=ym(a);S(e=>{let n=new Set;for(let i of t)r.has(i.key)?e.has(i.key)&&n.add(i.key):bm(i,o)&&n.add(i.key);return n})},[e,g,a]),(0,c.useEffect)(()=>{if(g||!a||typeof window>`u`)return;let t=e??[];if(t.length!==0&&x.size!==0)try{window.localStorage.setItem(vm+a,JSON.stringify({visible:[...x],known:t.map(e=>e.key),widths:s}))}catch{}},[x,e,g,a,s]);let w=g?new Set(r):x,T=(e??[]).filter(e=>e.lockVisible).map(e=>e.key),E=T.some(e=>!w.has(e))?new Set([...w,...T]):w,D=!!e?.length,O=D?e.filter(e=>E.has(e.key)):[],k=D?e.filter(e=>!e.defaultHidden&&!E.has(e.key)).length:0,A=D?`${n&&D?`40px `:``}${l?_m(O):lm(O,y)}`:void 0,j=o!==!1&&D&&e.some(e=>!e.hideFromToggle),M={};if(l&&D){let e=O.map(e=>`var(${hm(e.key)}, 160px)`);n&&e.unshift(`40px`),j&&e.push(`32px`),M[`--vl-total`]=`calc(${e.join(` + `)})`}let N=O.filter(e=>e.width.type===`fit`),P=!l&&N.length>0,F=N.map(e=>e.key).join(`|`),[I,L]=(0,c.useState)({key:F,items:t});(I.key!==F||I.items!==t)&&(L({key:F,items:t}),Object.keys(y).length>0&&b({}));let R=(0,c.useCallback)(()=>{let e=u.current;if(!e)return;let t=new Map;e.querySelectorAll(`[data-fit-key]`).forEach(e=>{let n=e,r=n.getAttribute(`data-fit-key`);if(!r)return;let i=pm(n);i>(t.get(r)??0)&&t.set(r,i)}),t.size!==0&&b(n=>{let r=!1,i={...n};for(let[a,o]of t){if(o<=0)continue;let t=Math.min(Math.ceil(o),e.clientWidth);t>(n[a]??0)&&(i[a]=t,r=!0)}return r?i:n})},[u]),[z]=(0,c.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(()=>R())),B=(0,c.useRef)(new Set);(0,c.useEffect)(()=>()=>{z?.disconnect(),B.current.clear()},[z]),(0,c.useLayoutEffect)(()=>{if(!P)return;let e=u.current;if(!e||(R(),!z))return;let t=new Set(e.querySelectorAll(`[data-fit-key]`)),n=B.current;for(let e of n)t.has(e)||(z.unobserve(e),n.delete(e));for(let e of t)n.has(e)||(z.observe(e),n.add(e))},[u,P,F,y,d,f,p,m,t,h,R,z]),(0,c.useEffect)(()=>{if(!P)return;let e=0,t=requestAnimationFrame(()=>{R(),e=requestAnimationFrame(()=>R())});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}},[P,F,t,h,R]);let V=(0,c.useCallback)(()=>b({}),[]);function H(t){if(e?.find(e=>e.key===t)?.lockVisible)return;let n=new Set(E);if(n.has(t)){if(n.size<=1)return;n.delete(t)}else n.add(t);let r=[...n];g||S(n),i?.(r)}return{hasColumns:D,visibleColumns:O,columnTemplate:A,widthVars:M,shouldShowToggle:j,effectiveVisible:E,manuallyHiddenCount:k,toggleOpen:_,setToggleOpen:v,handleToggleColumn:H,recalculateColumns:V}}function Um({reorderable:e,treeReorder:t,onReorder:n,onTreeDrop:r,longPressDelay:i,dragHandle:a,treeIndentPx:o,keys:s,depths:l,isGroupAt:u,rootRef:d,keysRef:f,getVisibleRect:p,scrollBy:m}){let h=(0,c.useRef)(null),[g,_]=(0,c.useState)(null),[v,y]=(0,c.useState)(null),b=(0,c.useRef)(null),x=(0,c.useRef)(n),S=(0,c.useRef)(r),C=(0,c.useRef)(t),w=(0,c.useRef)(l),T=(0,c.useRef)(u),E=(0,c.useRef)(!0),D=(0,c.useRef)(null),[O,k]=(0,c.useState)(null),A=(0,c.useRef)(null),j=(0,c.useRef)(!1),M=(0,c.useRef)(null),N=(0,c.useRef)(0),P=(0,c.useRef)(0),F=(0,c.useRef)(null),I=(0,c.useRef)(!1),L=(0,c.useRef)(null),R=(0,c.useRef)(0),z=(0,c.useRef)(0),B=(0,c.useRef)(0),[V]=(0,c.useState)(()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(pointer: coarse)`).matches);(0,c.useLayoutEffect)(()=>{x.current=n,S.current=r,C.current=t,w.current=l,b.current=v,T.current=u});function H(e){V||D.current!==e&&(D.current=e,k(e))}function U(e,t){t.buttons===0&&H(t.target.closest(`[data-drag-handle]`)?e:null)}function W(e){e.buttons===0&&H(null)}function G(e,t){if(t.button!==0)return;let n=!!t.target.closest(`[data-drag-handle]`);E.current=n,n&&H(e)}function ee(e,n){if(a&&!E.current){n.preventDefault();return}h.current=e,_(e),t&&y(null)}function K(e,t,n){let r=h.current;if(r==null)return null;let i=s.indexOf(r);if(i!==-1&&e>=i&&e<=cm(i,l))return null;let a=sm(t,n.top,n.height,u(e));return{key:s[e],position:a}}function te(e,t){t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=K(e,t.clientY,n);y(e=>e?.key===r?.key&&e?.position===r?.position?e:r)}function q(){let e=h.current,t=b.current;e!=null&&t&&t.key!==e&&r?.(e,t)}function ne(e){e.preventDefault(),q(),y(null),h.current=null,_(null),H(null)}function J(){y(null),h.current=null,_(null),H(null)}function re(e,t){t.preventDefault();let r=h.current;if(r==null)return;let i=s.indexOf(r),a=t.currentTarget.getBoundingClientRect(),o=om(i,e,t.clientY,a.top,a.height);o!=null&&n?.(i,o)}function ie(){h.current=null,_(null),H(null)}let ae=(0,c.useCallback)(e=>{let t=h.current,n=d.current;if(t==null||!n)return;let r=L.current?P.current-R.current+B.current/2:P.current,i=document.elementFromPoint(e,r),a=i&&n.contains(i)?i.closest(`[data-index]`):null;if(!a)return;let o=Number(a.dataset.index);if(Number.isNaN(o))return;let s=f.current.indexOf(t),c=a.getBoundingClientRect();if(C.current){let e=f.current,t=w.current;if(s!==-1&&o>=s&&o<=cm(s,t)){y(null);return}let n=sm(r,c.top,c.height,T.current(o)),i={key:e[o],position:n};y(e=>e?.key===i.key&&e?.position===i.position?e:i);return}let l=om(s,o,r,c.top,c.height);l!=null&&x.current?.(s,l)},[d,f]),oe=(0,c.useCallback)(()=>{let e=L.current;e&&(e.style.transform=`translate(${z.current}px, ${P.current-R.current}px)`)},[]),se=(0,c.useCallback)(()=>{let e=j.current?p():null;if(!e){F.current=null;return}let t=N.current,n=P.current,r=0;t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom&&(n<e.top+48?r=-Math.min(18,Math.ceil((e.top+48-n)/3)):n>e.bottom-48&&(r=Math.min(18,Math.ceil((n-(e.bottom-48))/3)))),r!==0&&(m(r),ae(t)),F.current=requestAnimationFrame(se)},[ae,p,m]),ce=(0,c.useCallback)(()=>{if(A.current!=null&&(clearTimeout(A.current),A.current=null),window.removeEventListener(`touchmove`,le),window.removeEventListener(`touchend`,ce),window.removeEventListener(`touchcancel`,ce),F.current!=null&&(cancelAnimationFrame(F.current),F.current=null),L.current&&=(L.current.remove(),null),document.body.style.touchAction=``,document.body.style.overscrollBehavior=``,j.current&&(I.current=!0,setTimeout(()=>{I.current=!1},350),C.current)){let e=h.current,t=b.current;e!=null&&t&&t.key!==e&&S.current?.(e,t)}y(null),j.current=!1,M.current=null,h.current=null,_(null)},[]),le=(0,c.useCallback)(e=>{let t=e.touches[0];if(t){if(N.current=t.clientX,P.current=t.clientY,!j.current){let e=M.current;e!=null&&Math.abs(t.clientY-e)>10&&A.current!=null&&(clearTimeout(A.current),A.current=null);return}e.cancelable&&e.preventDefault(),oe(),ae(t.clientX)}},[ae,oe]);function ue(n,r){if(!e&&!t||a&&!r.target.closest(`[data-drag-handle]`)||A.current!=null||j.current)return;let o=r.touches[0];o&&(M.current=o.clientY,N.current=o.clientX,P.current=o.clientY,window.addEventListener(`touchmove`,le,{passive:!1}),window.addEventListener(`touchend`,ce),window.addEventListener(`touchcancel`,ce),A.current=window.setTimeout(()=>{A.current=null,j.current=!0,h.current=n,_(n),navigator.vibrate?.(10),document.body.style.touchAction=`none`,document.body.style.overscrollBehavior=`none`,Y(n),F.current??=requestAnimationFrame(se)},i))}function Y(e){let t=d.current;if(!t)return;let n=f.current.indexOf(e),r=t.querySelector(`[data-index="${n}"]`);if(!r)return;let i=r.getBoundingClientRect();R.current=P.current-i.top,z.current=i.left,B.current=i.height;let a=r.cloneNode(!0);a.removeAttribute(`data-index`),a.setAttribute(`data-drag-clone`,`true`),a.setAttribute(`aria-hidden`,`true`),a.classList.add(nm.virtualListDragClone),Object.assign(a.style,{position:`fixed`,left:`0`,top:`0`,width:`${i.width}px`,height:`${i.height}px`,margin:`0`,opacity:`1`,pointerEvents:`none`,zIndex:`3`,background:`var(--background)`,boxShadow:`var(--card-shadow)`,borderRadius:`var(--default-border-radius)`}),t.appendChild(a),L.current=a,oe()}(0,c.useEffect)(()=>ce,[ce]);let de=e||t,fe=de&&!V;function pe(n,r){let i=t&&v?.key===r?v.position:void 0;return{reorderable:de&&!a,mouseDragEnabled:fe,draggable:fe&&(!a||r===O)||void 0,isDragging:de&&r===g,onMouseDown:de&&a?e=>G(r,e):void 0,onMouseOver:de&&a?e=>U(r,e):void 0,onMouseLeave:de&&a?W:void 0,onDragStart:de?e=>ee(r,e):void 0,onDragOver:t?e=>te(n,e):e?e=>re(n,e):void 0,onDragEnd:t?J:e?ie:void 0,onDrop:t?ne:void 0,onTouchStart:de?e=>ue(r,e):void 0,dropPosition:i,dropIndentPx:i?(l[n]??0)*o:void 0}}function me(){return I.current?(I.current=!1,!0):!1}return{draggingKey:g,dragEnabled:de,getRowDragProps:pe,consumeSuppressedClick:me}}function Wm({items:e,columns:t,sort:n,defaultSort:r=null,onSortChange:i}){let a=n!==void 0,[o,s]=(0,c.useState)(r),l=a?n:o,u=(0,c.useMemo)(()=>Dm(e,l,t),[e,l,t]);function d(e){let t=Em(l,e);a||s(t),i?.(t)}return{rows:u,effectiveSort:l,isSorted:u!==e,handleHeaderSort:d}}function Gm(e){return Math.max(1,e?.minWidth??48)}function Km({columns:e,visibleColumnsRef:t,resizableColumns:n,columnWidths:r,onColumnWidthsChange:i,persistColumnsKey:a,rootRef:o}){let s=r!==void 0,[l,u]=(0,c.useState)(()=>ym(a)?.widths??{}),[d,f]=(0,c.useState)(!1),p=s?r:l,m=(0,c.useRef)(p);m.current=p;let h=(0,c.useCallback)(e=>{s||u(e),i?.(e)},[s,i]),g=(0,c.useCallback)(()=>{let e=o.current,n={...m.current};for(let r of t.current){if(n[r.key]!=null)continue;let t=e?.querySelector(`[aria-rowindex="1"] ${mm(r.key)}`),i=t?Math.round(t.getBoundingClientRect().width):0;n[r.key]=i>0?i:gm(r)}return n},[o,t]);(0,c.useLayoutEffect)(()=>{let e=o.current;if(e)for(let[t,n]of Object.entries(p))e.style.setProperty(hm(t),`${n}px`)},[p,o]);let _=(0,c.useCallback)((e,t)=>{o.current?.style.setProperty(hm(e),`${t}px`)},[o]),v=(0,c.useCallback)(()=>{s&&requestAnimationFrame(()=>{for(let[e,t]of Object.entries(m.current))_(e,t)})},[_,s]),y=(0,c.useCallback)((t,n)=>{let r=g(),i=Gm(e?.find(e=>e.key===t)),a={...r,[t]:Math.max(i,Math.round(n(r[t])))};_(t,a[t]),h(a),v()},[_,e,h,g,v]),b=(0,c.useCallback)((t,n)=>{if(t.button!==0)return;t.preventDefault(),t.stopPropagation();let r=t.currentTarget,i=g(),a=i[n],o=t.clientX,s=Gm(e?.find(e=>e.key===n)),c=a,l=0,u=()=>{l=0,_(n,c)};function d(e){if(l&&cancelAnimationFrame(l),r.releasePointerCapture?.(t.pointerId),r.removeEventListener(`pointermove`,p),r.removeEventListener(`pointerup`,y),r.removeEventListener(`pointercancel`,b),r.removeEventListener(`lostpointercapture`,b),window.removeEventListener(`keydown`,x,!0),document.body.style.cursor=``,document.body.style.userSelect=``,f(!1),e==null){_(n,a);return}e!==a&&h({...i,[n]:e}),v()}function p(e){c=Math.max(s,Math.round(a+e.clientX-o)),l||=requestAnimationFrame(u)}function y(){d(c)}function b(){d(null)}function x(e){e.key===`Escape`&&(e.preventDefault(),d(null))}r.setPointerCapture?.(t.pointerId),r.addEventListener(`pointermove`,p),r.addEventListener(`pointerup`,y),r.addEventListener(`pointercancel`,b),r.addEventListener(`lostpointercapture`,b),window.addEventListener(`keydown`,x,!0),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,f(!0),Object.keys(m.current).length===0&&h(i)},[_,e,h,g,v]),x=(0,c.useCallback)(e=>{let t=o.current;if(!t)return 0;let n=hm(e),r=t.style.getPropertyValue(n),i=t.style.getPropertyValue(`--vl-total`);t.style.setProperty(n,`max-content`),t.style.removeProperty(`--vl-total`);let a=0;return t.querySelectorAll(mm(e)).forEach(e=>{let t=Math.ceil(e.getBoundingClientRect().width);t>a&&(a=t)}),t.style.setProperty(n,r),i&&t.style.setProperty(`--vl-total`,i),Math.min(a,t.clientWidth)},[o]),S=(0,c.useCallback)(e=>{let t=()=>{let t=x(e);t>0&&y(e,()=>t)};Object.keys(m.current).length>0?t():(h(g()),requestAnimationFrame(t))},[h,g,x,y]),C=(0,c.useCallback)(()=>{let e=o.current;if(e)for(let t of Object.keys(m.current))e.style.removeProperty(hm(t));h({})},[h,o]),w=(0,c.useCallback)(e=>n&&e.resizable!==!1,[n]),T=(0,c.useCallback)((e,t)=>y(e,e=>e+t),[y]),E=(0,c.useCallback)(t=>y(t,()=>Gm(e?.find(e=>e.key===t))),[e,y]),D=(0,c.useCallback)(e=>w(e)?{"aria-hidden":!0,onPointerDown:t=>b(t,e.key),onDoubleClick:t=>{t.stopPropagation(),S(e.key)},onClick:e=>e.stopPropagation()}:null,[S,b,w]);return{widths:p,isFrozen:Object.keys(p).length>0,isResizing:d,reset:C,isResizable:w,resizeBy:T,resizeToMin:E,autoFit:S,getHandleProps:D}}function qm({enabled:e,tabAcrossRows:t,rowCount:n,offsets:r,rootRef:i,headerRef:a,getVisibleSlice:o,viewportHeight:s,scrollToIndex:l,initialIndex:u,multiSelect:d,onActivate:f,onToggleSelect:p}){let[m,h]=(0,c.useState)(u),[g,_]=(0,c.useState)(-1),v=(0,c.useRef)(r);v.current=r;let y=e&&n>0?Math.min(Math.max(m,0),n-1):-1;y>=0&&y!==m&&h(y);let b=y>=0;function x(e){let t=a.current?.offsetHeight??0,n=v.current[e]??0,r=v.current[e+1]??n,{top:i,height:s}=o();n<i+t?l(e,{align:`start`}):r>i+s&&l(e,{align:`end`})}function S(e){let t=Math.max(0,Math.min(e,n-1));h(t),x(t)}function C(e){let t=Math.max(0,s-(a.current?.offsetHeight??0)),r=im(v.current,(v.current[e]??0)+t,n);return Math.max(1,r-e)}function w(e){return i.current?.querySelector(`[data-index="${e}"]`)??null}function T(e){let t=w(e)?.querySelector(fm);return t?(_(e),t.focus(),!0):!1}let E=(0,c.useRef)(null),D=(0,c.useRef)(!1);(0,c.useLayoutEffect)(()=>{let e=E.current;if(!e)return;E.current=null;let t=w(e.index)?.querySelectorAll(fm);if(t?.length){(e.edge===`first`?t[0]:t[t.length-1]).focus();return}let r=e.index+(e.edge===`first`?1:-1);if(r>=0&&r<n){E.current={index:r,edge:e.edge},_(r),x(r);return}_(-1),D.current=b&&e.edge===`first`,b&&i.current?.focus()});function O(e){let t=e?.closest?.(`[data-index]`),n=Number(t?.dataset.index);return Number.isFinite(n)?n:-1}function k(e){if(e.target===e.currentTarget)return;let t=O(e.target);t<0||(_(t),h(t))}function A(e){e.currentTarget.contains(e.relatedTarget)||(D.current=!1),O(e.relatedTarget)!==g&&_(-1)}function j(e){if(e.key!==`Escape`||e.defaultPrevented||!b)return;let t=O(e.target);t>=0&&h(t),_(-1),i.current?.focus(),e.preventDefault()}function M(e){if(!t||e.key!==`Tab`||e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey)return;let r=O(e.target);if(r<0)return;let i=w(r)?.querySelectorAll(um);if(!i?.length)return;let a=Array.prototype.indexOf.call(i,e.target);if(a<0)return;let o=e.shiftKey;if(o?a>0:a<i.length-1)return;let s=o?r-1:r+1;s<0||s>=n||(e.preventDefault(),_(s),x(s),E.current={index:s,edge:o?`last`:`first`})}function N(e){if(e.target!==e.currentTarget){M(e),j(e);return}if(!b||e.defaultPrevented)return;let r=D.current;switch(D.current=!1,e.key){case`ArrowDown`:S(y+1);break;case`ArrowUp`:S(y-1);break;case`Home`:S(0);break;case`End`:S(n-1);break;case`PageDown`:S(y+C(y));break;case`PageUp`:S(y-C(Math.max(0,y-1)));break;case`Enter`:if(f)f(y);else if(!T(y))return;break;case`F2`:if(!T(y))return;break;case`Tab`:if(!t||e.shiftKey||r||!T(y))return;break;case` `:if(!d)return;p(y);break;default:return}e.preventDefault()}if(!b&&!t)return{activeIndex:y,enteredIndex:-1,setActiveIndex:h,containerProps:{}};let P={onKeyDown:N,onFocus:k,onBlur:A};return b&&(P.tabIndex=0),{activeIndex:y,enteredIndex:g,setActiveIndex:h,containerProps:P}}var Jm={selectRow:`Select row`,selectAllRows:`Select all rows`,toggleColumns:`Toggle column visibility`,columnsHidden:e=>`${e} columns hidden`,resetColumnWidths:`Reset column widths`};function Ym(e,t){return!e||!t?e??t:n=>{e(n),t(n)}}function Xm(e){let{ref:t,items:n,renderRow:r,ariaRoles:i,columns:a,height:o=`100%`,estimatedRowHeight:s=40,overscan:u=3,rowGap:d=0,rowPadding:p,selectedKey:m,getItemKey:h,onRowClick:g,keyboardNavigation:_=!0,tabAcrossRows:v=!1,scrollParent:y,visibleColumnKeys:b,onVisibleColumnsChange:x,persistColumnsKey:S,resizableColumns:C=!1,columnWidths:w,onColumnWidthsChange:T,labels:E,sort:D,defaultSort:k,onSortChange:A,showColumnToggle:j,onLoadMore:M,loadMoreThreshold:N=100,isLoading:P=!1,multiSelect:F=!1,selectedKeys:I,onSelectionChange:L,reorderable:z=!1,onReorder:B,longPressDelay:V=400,treeReorder:H=!1,getItemDepth:U,isGroup:W,onTreeDrop:G,treeIndentPx:ee=24,dragHandle:K=!1,showDivider:te=!0,rowHover:q=!0,className:ne,style:J,classNames:re,styles:ie,...ae}=e,oe=e.scrollParent!=null&&e.height!==void 0,se=(0,c.useRef)(!1);(0,c.useEffect)(()=>{oe&&!se.current&&(se.current=!0,console.warn("VirtualList: `height` is ignored alongside `scrollParent`, which leaves the list no viewport to size."))},[oe]);let ce=O(`VirtualList`,E,Jm),{rows:le,effectiveSort:ue,isSorted:Y,handleHeaderSort:de}=Wm({items:n,columns:a,sort:D,defaultSort:k,onSortChange:A}),fe=(0,c.useCallback)((e,t)=>h?h(e,t):t,[h]),pe=(0,c.useMemo)(()=>le.map((e,t)=>fe(e,t)),[le,fe]),me=(0,c.useMemo)(()=>U?le.map((e,t)=>U(e,t)):[],[le,U]),X=(0,c.useCallback)(e=>W?W(le[e],e):!1,[W,le]),Z=Bm({items:le,keys:pe,getItemKey:h,estimatedRowHeight:s,rowGap:d,overscan:u,onLoadMore:M,loadMoreThreshold:N,isLoading:P,scrollParent:y}),{rootRef:he,headerRef:ge,rowObserver:_e,keysRef:ve,offsets:ye,totalHeight:be,startIndex:xe,endIndex:Se}=Z,Ce=(0,c.useRef)([]),we=Km({columns:a,visibleColumnsRef:Ce,resizableColumns:C,columnWidths:w,onColumnWidthsChange:T,persistColumnsKey:S,rootRef:he}),Te=Vm({items:le,getKey:fe,multiSelect:F,selectedKeys:I,onSelectionChange:L}),{effectiveSelectedKeys:Ee}=Te,De=Hm({columns:a,items:le,multiSelect:F,visibleColumnKeys:b,onVisibleColumnsChange:x,persistColumnsKey:S,showColumnToggle:j,userWidths:we.widths,isFrozen:we.isFrozen,rootRef:he,startIndex:xe,endIndex:Se,containerHeight:Z.containerHeight,containerWidth:Z.containerWidth,isLoading:P}),{hasColumns:Oe,visibleColumns:ke,columnTemplate:Ae,widthVars:je,shouldShowToggle:Me,recalculateColumns:Ne}=De;Ce.current=ke,(0,c.useImperativeHandle)(t,()=>({...Z.scrollApi,recalculateColumns:Ne,resetColumnWidths:we.reset}),[Z.scrollApi,Ne,we.reset]);let Pe=Y&&(z||H),Q=(0,c.useRef)(!1);(0,c.useEffect)(()=>{Pe&&!Q.current&&(Q.current=!0,console.warn(`VirtualList: row reordering is disabled while the list is sorted. Clear the sort to drag rows.`))},[Pe]);let Fe=Um({reorderable:z&&!Y,treeReorder:H&&!Y,onReorder:B,onTreeDrop:G,longPressDelay:V,dragHandle:K,treeIndentPx:ee,keys:pe,depths:me,isGroupAt:X,rootRef:he,keysRef:ve,getVisibleRect:Z.getVisibleRect,scrollBy:Z.scrollBy}),Ie=(0,c.useId)(),Le=e=>`${Ie}-row-${e}`,Re=qm({enabled:_,tabAcrossRows:v,rowCount:le.length,offsets:ye,rootRef:he,headerRef:ge,getVisibleSlice:Z.getVisibleSlice,viewportHeight:Z.viewportHeight,scrollToIndex:Z.scrollApi.scrollToIndex,initialIndex:m==null?0:Math.max(0,pe.indexOf(m)),multiSelect:F,onActivate:g&&(e=>g(le[e],e)),onToggleSelect:e=>Te.handleRowSelect(pe[e])}),ze=typeof p==`number`?`${p}px`:p,Be=e=>{let t=le[e],n=fe(t,e),a=m!=null&&n===m||Ee.has(n),o=Fe.getRowDragProps(e,n);return(0,f.jsx)(Om,{id:Le(e),index:e,top:ye[e],padding:ze,columnTemplate:Ae,isSelected:a,isActive:e===Re.activeIndex,manageTabStops:_,isEntered:e===Re.enteredIndex,activeClassName:re?.activeRow,activeStyle:ie?.activeRow,showDivider:te,hover:q,onClick:()=>{Fe.consumeSuppressedClick()||(Re.setActiveIndex(e),g?.(t,e))},observer:_e,ariaRowIndex:Oe?e+2:void 0,ariaPosInSet:Oe?void 0:e+1,ariaSetSize:Oe?void 0:le.length,rowRole:i?.row??(Oe?`row`:`listitem`),reserveToggleGutter:Me,...o,dropIndicatorClassName:re?.dropIndicator,dropIndicatorStyle:ie?.dropIndicator,rowClassName:re?.row,rowStyle:ie?.row,children:Oe?(0,f.jsxs)(f.Fragment,{children:[F&&(0,f.jsx)(`div`,{className:(0,l.default)(nm.virtualListSelectCell,re?.selectCell),style:ie?.selectCell,role:`gridcell`,onClick:e=>e.stopPropagation(),children:(0,f.jsx)(Oi,{selected:Ee.has(n),onToggle:()=>Te.handleRowSelect(n),"aria-label":ce.selectRow,tabIndex:-1})}),ke.map(n=>(0,f.jsx)(`div`,{className:(0,l.default)(nm.virtualListCell,re?.cell),style:ie?.cell,role:`gridcell`,"data-col-key":n.key,"data-fit-key":n.width.type===`fit`?n.key:void 0,children:n.renderCell(t,e)},n.key))]}):r?.(t,e)},n)},Ve=[];for(let e=xe;e<=Se;e++)Ve.push(Be(e));let He=Fe.draggingKey==null?-1:pe.indexOf(Fe.draggingKey);He>=0&&(He<xe||He>Se)&&Ve.push(Be(He)),Re.enteredIndex>=0&&(Re.enteredIndex<xe||Re.enteredIndex>Se)&&Ve.push(Be(Re.enteredIndex));let Ue={...Re.containerProps,onKeyDown:Ym(ae.onKeyDown,Re.containerProps.onKeyDown),onFocus:Ym(ae.onFocus,Re.containerProps.onFocus),onBlur:Ym(ae.onBlur,Re.containerProps.onBlur)};return(0,f.jsxs)(`div`,{...ae,...Ue,ref:he,className:(0,l.default)(nm.virtualList,Z.isWindowed&&nm.virtualListWindowed,Fe.draggingKey!=null&&nm.virtualListReordering,we.isResizing&&nm.virtualListResizing,ne,re?.root),style:{...Z.isWindowed?null:{height:o},...je,...J,...ie?.root},role:i?.container??(Oe?`grid`:`list`),"aria-rowcount":Oe?le.length+1:void 0,"aria-activedescendant":Re.activeIndex>=0&&(i?.container??(Oe?`grid`:`list`))!==`list`?Le(Re.activeIndex):void 0,children:[Oe&&(0,f.jsx)(jm,{headerRef:ge,columns:a,cols:De,resize:we,sort:ue,onSort:de,multiSelect:F,allSelected:Te.allSelected,someSelected:Te.someSelected,onSelectAll:Te.handleSelectAll,labels:ce,classNames:re,styles:ie}),P?(0,f.jsx)(`div`,{className:nm.virtualListLoadingFull,children:(0,f.jsx)(R,{className:nm.virtualListSpinner})}):(0,f.jsx)(`div`,{className:(0,l.default)(nm.virtualListBody,re?.body),style:{height:be,...ie?.body},children:Ve}),Z.showLoadMoreSpinner&&(0,f.jsx)(`div`,{className:(0,l.default)(nm.virtualListLoadingIndicator,re?.loadingIndicator),style:ie?.loadingIndicator,children:(0,f.jsx)(R,{className:nm.virtualListSpinner})})]})}function Zm(e,t,n=0,r=null){return e.flatMap((i,a)=>{let o=i.children!==void 0,s=o&&t.includes(i.key),c={node:i,level:n,parentKey:r,isBranch:o,isExpanded:s,setSize:e.length,posInSet:a+1};return!s||!i.children?.length?[c]:[c,...Zm(i.children,t,n+1,i.key)]})}var Qm={tree:`tree_bHT4K`,"tree-disabled":`tree-disabled_bIFfs`,treeDisabled:`tree-disabled_bIFfs`,"tree-node":`tree-node_XUWMs`,treeNode:`tree-node_XUWMs`,"tree-node-selected":`tree-node-selected_j05ku`,treeNodeSelected:`tree-node-selected_j05ku`,"tree-node-disabled":`tree-node-disabled_FMox6`,treeNodeDisabled:`tree-node-disabled_FMox6`,"tree-toggle":`tree-toggle_hmqtx`,treeToggle:`tree-toggle_hmqtx`,"tree-toggle-open":`tree-toggle-open_gTfYS`,treeToggleOpen:`tree-toggle-open_gTfYS`,"tree-toggle-hidden":`tree-toggle-hidden_nYrlV`,treeToggleHidden:`tree-toggle-hidden_nYrlV`,"tree-icon":`tree-icon_0dxsy`,treeIcon:`tree-icon_0dxsy`,"tree-label":`tree-label_BOShA`,treeLabel:`tree-label_BOShA`,"tree-empty":`tree-empty_Eb3vv`,treeEmpty:`tree-empty_Eb3vv`},$m=[],eh={empty:`Nothing here`};function th(e){let{nodes:t,expandedKeys:n,defaultExpandedKeys:r=$m,onExpandedChange:i=()=>{},selectedKey:a,defaultSelectedKey:o,onSelect:s=()=>{},expandOnSelect:u=!0,indent:p=20,toggleIcon:m=d.faChevronRight,height:h,estimatedRowHeight:g=32,labels:_,disabled:v=!1,"aria-label":y=`Tree`,className:b,style:x,classNames:S,styles:C,...w}=D(`Tree`,e),T=O(`Tree`,_,eh),E=(0,c.useRef)(new Map),k=(0,c.useRef)(null),A=(0,c.useRef)(null),j=h!==void 0,M=n!==void 0,[N,P]=(0,c.useState)(r),F=M?n:N,I=a!==void 0,[L,R]=(0,c.useState)(o??null),z=I?a:L,B=Zm(t,F),V=Math.max(0,B.findIndex(e=>e.node.key===z)),H=B[V]?.node.key;function U(e){M||P(e),i(e)}function W(e){U(F.includes(e)?F.filter(t=>t!==e):[...F,e])}function G(e){v||e.node.disabled||(I||R(e.node.key),s(e.node.key,e.node),u&&e.isBranch&&W(e.node.key))}function ee(e){let t=B[e]?.node.key;if(t===void 0)return;let n=E.current.get(t);if(n){n.focus();return}A.current=t,k.current?.scrollToIndex(e,{align:`center`})}(0,c.useEffect)(()=>{let e=A.current;if(e===null)return;let t=E.current.get(e);t&&(t.focus(),A.current=null)});function te(e,t,n){if(!v)switch(e.key){case`ArrowDown`:e.preventDefault(),ee(Math.min(n+1,B.length-1));break;case`ArrowUp`:e.preventDefault(),ee(Math.max(n-1,0));break;case`ArrowRight`:if(e.preventDefault(),!t.isBranch)break;t.isExpanded?ee(n+1):W(t.node.key);break;case`ArrowLeft`:{if(e.preventDefault(),t.isBranch&&t.isExpanded){W(t.node.key);break}let n=B.findIndex(e=>e.node.key===t.parentKey);n>=0&&ee(n);break}case`Home`:e.preventDefault(),ee(0);break;case`End`:e.preventDefault(),ee(B.length-1);break;case`Enter`:case` `:e.preventDefault(),G(t)}}function q(e,t){let{node:n,level:r,isBranch:i,isExpanded:a}=e,o=n.key===z,s=v||n.disabled;return(0,f.jsxs)(`div`,{ref:e=>{e?E.current.set(n.key,e):E.current.delete(n.key)},role:`treeitem`,"aria-level":r+1,"aria-setsize":e.setSize,"aria-posinset":e.posInSet,"aria-expanded":i?a:void 0,"aria-selected":o,"aria-disabled":s||void 0,tabIndex:n.key===H&&!s?0:-1,className:(0,l.default)(Qm.treeNode,o&&Qm.treeNodeSelected,s&&Qm.treeNodeDisabled,S?.node),style:{paddingLeft:r*p,...C?.node},onClick:()=>G(e),onKeyDown:n=>te(n,e,t),children:[(0,f.jsx)(`span`,{className:(0,l.default)(Qm.treeToggle,a&&Qm.treeToggleOpen,!i&&Qm.treeToggleHidden,S?.toggle),style:C?.toggle,"aria-hidden":`true`,onClick:e=>{e.stopPropagation(),!s&&i&&W(n.key)},children:i&&K(m)}),n.icon&&K(n.icon,{className:(0,l.default)(Qm.treeIcon,S?.icon),style:C?.icon}),(0,f.jsx)(`span`,{className:(0,l.default)(Qm.treeLabel,S?.label),style:C?.label,children:n.label})]},n.key)}return(0,f.jsx)(`div`,{...w,role:`tree`,"aria-label":y,"aria-disabled":v||void 0,tabIndex:j&&!v?0:void 0,onFocus:e=>{e.target===e.currentTarget&&ee(V)},className:(0,l.default)(Qm.tree,v&&Qm.treeDisabled,S?.root,b),style:{...x,...C?.root},children:B.length===0?(0,f.jsx)(`div`,{className:(0,l.default)(Qm.treeEmpty,S?.empty),style:C?.empty,children:T.empty}):j?(0,f.jsx)(Xm,{ref:k,items:B,height:h,estimatedRowHeight:g,getItemKey:e=>e.node.key,getItemDepth:e=>e.level,ariaRoles:{container:`none`,row:`none`},keyboardNavigation:!1,renderRow:q}):B.map(q)})}var nh=function(e){return e.Sunny=`sunny`,e.ClearNight=`clearNight`,e.Cloudy=`cloudy`,e.PartlyCloudy=`partlyCloudy`,e.PartlyCloudyNight=`partlyCloudyNight`,e.RainyLight=`rainyLight`,e.Rainy=`rainy`,e.RainyHeavy=`rainyHeavy`,e.Snowy=`snowy`,e.Hail=`hail`,e.Foggy=`foggy`,e.Thunderstorm=`thunderstorm`,e}({}),rh={weatherIcon:`weatherIcon_FrcJF`,"weatherIcon-behind":`weatherIcon-behind_e2VOz`,weatherIconBehind:`weatherIcon-behind_e2VOz`,"weatherIcon-cloudBehind":`weatherIcon-cloudBehind_MZlmZ`,weatherIconCloudBehind:`weatherIcon-cloudBehind_MZlmZ`,"weatherIcon-cloud":`weatherIcon-cloud_KW-i7`,weatherIconCloud:`weatherIcon-cloud_KW-i7`,weatherIconCloudDrift:`weatherIconCloudDrift_0thIg`,"weatherIcon-cloudDelayed":`weatherIcon-cloudDelayed_bI1iH`,weatherIconCloudDelayed:`weatherIcon-cloudDelayed_bI1iH`,"weatherIcon-sunRays":`weatherIcon-sunRays_PBW93`,weatherIconSunRays:`weatherIcon-sunRays_PBW93`,weatherIconRotate:`weatherIconRotate_Hp9YK`,"weatherIcon-sunRay":`weatherIcon-sunRay_ODCJR`,weatherIconSunRay:`weatherIcon-sunRay_ODCJR`,weatherIconRayPulse:`weatherIconRayPulse_57eG4`,"weatherIcon-sunCore":`weatherIcon-sunCore_Ucxlh`,weatherIconSunCore:`weatherIcon-sunCore_Ucxlh`,"weatherIcon-moonCore":`weatherIcon-moonCore_USwOg`,weatherIconMoonCore:`weatherIcon-moonCore_USwOg`,weatherIconGlow:`weatherIconGlow_W2Qxf`,"weatherIcon-star":`weatherIcon-star_3CMD1`,weatherIconStar:`weatherIcon-star_3CMD1`,weatherIconTwinkle:`weatherIconTwinkle_8DkMV`,"weatherIcon-rain":`weatherIcon-rain_A9qFe`,weatherIconRain:`weatherIcon-rain_A9qFe`,"weatherIcon-drop":`weatherIcon-drop_SdkW9`,weatherIconDrop:`weatherIcon-drop_SdkW9`,weatherIconFall:`weatherIconFall_NlqDE`,"weatherIcon-splash":`weatherIcon-splash_DF4Wc`,weatherIconSplash:`weatherIcon-splash_DF4Wc`,weatherIconRing:`weatherIconRing_kr1SP`,"weatherIcon-snow":`weatherIcon-snow_95z-c`,weatherIconSnow:`weatherIcon-snow_95z-c`,"weatherIcon-flake":`weatherIcon-flake_LGzkw`,weatherIconFlake:`weatherIcon-flake_LGzkw`,weatherIconSnowFall:`weatherIconSnowFall_I2EGa`,"weatherIcon-stone":`weatherIcon-stone_U0daF`,weatherIconStone:`weatherIcon-stone_U0daF`,weatherIconHailFall:`weatherIconHailFall_U-AE4`,"weatherIcon-impact":`weatherIcon-impact_kCHtC`,weatherIconImpact:`weatherIcon-impact_kCHtC`,"weatherIcon-fog":`weatherIcon-fog_GC8wj`,weatherIconFog:`weatherIcon-fog_GC8wj`,weatherIconSway:`weatherIconSway_-CD1q`,"weatherIcon-bolt":`weatherIcon-bolt_S9sie`,weatherIconBolt:`weatherIcon-bolt_S9sie`,weatherIconFlash:`weatherIconFlash_GIecz`,"weatherIcon-still":`weatherIcon-still_lr-Nl`,weatherIconStill:`weatherIcon-still_lr-Nl`},ih=`M 26.3 62.9 C 15.4 65.0 15.0 48.5 27.8 49.8 C 23.9 43.9 34.2 34.0 43.0 39.6 C 46.0 26.2 73.9 32.0 68.9 46.3 C 85.0 44.3 84.6 64.2 72.4 62.5 Z`;function ah(e,t,n,r){return{animationDuration:`${t}s`,animationDelay:`${e?n:-r*t}s`}}function oh({className:e,delayed:t=!1}){return(0,f.jsx)(`path`,{className:(0,l.default)(rh.weatherIconCloud,t&&rh.weatherIconCloudDelayed,e),d:ih})}var sh=12;function ch({className:e}){return(0,f.jsxs)(`g`,{className:e,children:[(0,f.jsx)(`g`,{className:rh.weatherIconSunRays,children:Array.from({length:sh},(e,t)=>(0,f.jsx)(`g`,{transform:`rotate(${t/sh*360} 50 50)`,children:(0,f.jsx)(`line`,{className:rh.weatherIconSunRay,x1:50,y1:23,x2:50,y2:t%2==0?16:11})},t))}),(0,f.jsx)(`circle`,{className:rh.weatherIconSunCore,cx:50,cy:50,r:18})]})}var lh=[{x:74,y:32,size:2.2,duration:2.4,delay:0},{x:28,y:30,size:2.6,duration:3.1,delay:.4},{x:80,y:60,size:1.8,duration:2.7,delay:.9},{x:22,y:66,size:2.4,duration:3.6,delay:.2},{x:58,y:82,size:2,duration:2.9,delay:1.3},{x:34,y:80,size:2.5,duration:3.3,delay:.6}];function uh({className:e}){return(0,f.jsxs)(`g`,{className:e,children:[lh.map(e=>(0,f.jsx)(`g`,{transform:`translate(${e.x}, ${e.y})`,children:(0,f.jsx)(`g`,{className:rh.weatherIconStar,style:{animationDuration:`${e.duration}s`,animationDelay:`${e.delay}s`},children:(0,f.jsx)(`path`,{d:`M 0 ${-e.size} L 0 ${e.size} M ${-e.size} 0 L ${e.size} 0`})})},`${e.x}-${e.y}`)),(0,f.jsx)(`circle`,{className:rh.weatherIconMoonCore,cx:50,cy:50,r:18})]})}var dh=function(e){return e.Light=`light`,e.Medium=`medium`,e.Heavy=`heavy`,e}({}),fh={light:{lanes:4,duration:1.5},medium:{lanes:6,duration:.95},heavy:{lanes:10,duration:.55}},ph=[.85,1.1,.95,1.2,.9,1.05,1.15,.8,1,1.08],mh=[.05,.62,.31,.85,.18,.5,.74,.1,.43,.95],hh=2,gh=.65;function _h(e,t=mh,n=.8){return .1+n*t[e%t.length]}function vh({animated:e,intensity:t=`medium`}){let{lanes:n,duration:r}=fh[t];return(0,f.jsx)(`g`,{className:rh.weatherIconRain,children:Array.from({length:n},(t,i)=>{let a=26+50*i/(n-1),o=r*ph[i],s=o*mh[i];return Array.from({length:hh},(t,n)=>{let r=ah(e,o,s+n*o/hh,_h(i*hh+n,mh,gh));return(0,f.jsxs)(`g`,{children:[(0,f.jsx)(`line`,{className:rh.weatherIconDrop,style:r,x1:a,y1:68,x2:a-2.4,y2:92}),(0,f.jsx)(`ellipse`,{className:rh.weatherIconSplash,style:r,cx:a-2.4,cy:92,rx:`1.4`,ry:`0.7`})]},`${i}-${n}`)})})})}var yh=[.65,1.5,.85,1.25,1.65,.75,1.1],bh=[.15,.7,.35,.9,.05,.55,.8],xh=7;function Sh({animated:e}){return(0,f.jsx)(`g`,{className:rh.weatherIconSnow,children:Array.from({length:xh},(t,n)=>{let r=24+54*n/6,i=7*yh[n],a=i*bh[n];return Array.from({length:hh},(t,o)=>(0,f.jsx)(`g`,{transform:`translate(${r}, 68)`,children:(0,f.jsx)(`g`,{className:rh.weatherIconFlake,style:ah(e,i,a+o*i*.7,_h(n*hh+o,bh)),children:(0,f.jsx)(`path`,{d:`M 0 -2 L 0 2 M -1.7 -1 L 1.7 1 M -1.7 1 L 1.7 -1`})})},`${n}-${o}`))})})}var Ch=[{x:34,y:66,dx:-1,dy:18,duration:.6,delay:.05},{x:47,y:68,dx:-2,dy:17,duration:.7,delay:.3},{x:58,y:65,dx:1,dy:18,duration:.55,delay:.15},{x:40,y:70,dx:-1,dy:16,duration:.75,delay:.45},{x:65,y:67,dx:-2,dy:17,duration:.65,delay:0},{x:52,y:71,dx:1,dy:16,duration:.7,delay:.35}];function wh({animated:e}){let t=Ch.length*hh;return(0,f.jsx)(`g`,{className:rh.weatherIconHail,children:Ch.flatMap((n,r)=>Array.from({length:hh},(i,a)=>{let o=r*hh+a,s=ah(e,n.duration,n.delay+a*n.duration/hh,.1+.8*(o+.5)/t);return(0,f.jsxs)(`g`,{children:[(0,f.jsx)(`g`,{transform:`translate(${n.x}, ${n.y})`,children:(0,f.jsx)(`g`,{className:rh.weatherIconStone,style:{...s,"--weather-icon-dx":n.dx,"--weather-icon-dy":n.dy},children:(0,f.jsx)(`circle`,{r:`2`})})}),(0,f.jsx)(`ellipse`,{className:rh.weatherIconImpact,style:s,cx:n.x+n.dx,cy:n.y+n.dy,rx:`1.8`,ry:`0.9`})]},o)}))})}function Th(){return(0,f.jsxs)(`g`,{className:rh.weatherIconFog,children:[(0,f.jsx)(`line`,{x1:`32`,y1:`40`,x2:`68`,y2:`40`}),(0,f.jsx)(`line`,{x1:`20`,y1:`52`,x2:`80`,y2:`52`}),(0,f.jsx)(`line`,{x1:`26`,y1:`64`,x2:`74`,y2:`64`}),(0,f.jsx)(`line`,{x1:`34`,y1:`76`,x2:`66`,y2:`76`})]})}function Eh(){return(0,f.jsx)(`path`,{className:rh.weatherIconBolt,d:`M 54 52 L 44 72 H 52 L 46 90 L 62 66 H 54 L 60 52 Z`})}var Dh={[nh.Sunny]:`Sunny`,[nh.ClearNight]:`Clear night`,[nh.Cloudy]:`Cloudy`,[nh.PartlyCloudy]:`Partly cloudy`,[nh.PartlyCloudyNight]:`Partly cloudy night`,[nh.RainyLight]:`Light rain`,[nh.Rainy]:`Rain`,[nh.RainyHeavy]:`Heavy rain`,[nh.Snowy]:`Snow`,[nh.Hail]:`Hail`,[nh.Foggy]:`Fog`,[nh.Thunderstorm]:`Thunderstorm`};function Oh(e){let{type:t,size:n=64,animated:r=!0,labels:i,className:a,style:o,...s}=D(`WeatherIcon`,e),u=O(`WeatherIcon`,i,Dh),d=r&&!be(`(prefers-reduced-motion: reduce)`),p=`weather-icon-clip-${(0,c.useId)().replace(/[^\w-]/g,``)}`,m=e=>(0,f.jsx)(`g`,{clipPath:`url(#${p})`,children:e});function h(){switch(t){case nh.ClearNight:return(0,f.jsx)(uh,{});case nh.Cloudy:return(0,f.jsxs)(f.Fragment,{children:[m((0,f.jsx)(`g`,{className:rh.weatherIconCloudBehind,children:(0,f.jsx)(oh,{delayed:!0})})),(0,f.jsx)(oh,{})]});case nh.PartlyCloudy:return(0,f.jsxs)(f.Fragment,{children:[m((0,f.jsx)(ch,{className:rh.weatherIconBehind})),(0,f.jsx)(oh,{})]});case nh.PartlyCloudyNight:return(0,f.jsxs)(f.Fragment,{children:[m((0,f.jsx)(uh,{className:rh.weatherIconBehind})),(0,f.jsx)(oh,{})]});case nh.RainyLight:case nh.Rainy:case nh.RainyHeavy:return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(oh,{}),(0,f.jsx)(vh,{animated:d,intensity:t===nh.RainyLight?dh.Light:t===nh.RainyHeavy?dh.Heavy:dh.Medium})]});case nh.Snowy:return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(oh,{}),(0,f.jsx)(Sh,{animated:d})]});case nh.Hail:return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(oh,{}),(0,f.jsx)(wh,{animated:d})]});case nh.Foggy:return(0,f.jsx)(Th,{});case nh.Thunderstorm:return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(oh,{}),m((0,f.jsx)(Eh,{}))]});default:return(0,f.jsx)(ch,{})}}return(0,f.jsxs)(`svg`,{...s,role:`img`,"aria-label":u[t]??u[nh.Sunny],className:(0,l.default)(rh.weatherIcon,!d&&rh.weatherIconStill,a),style:{width:n,height:n,...o},viewBox:`0 0 100 100`,children:[(0,f.jsx)(`defs`,{children:(0,f.jsx)(`clipPath`,{id:p,clipRule:`evenodd`,children:(0,f.jsx)(`path`,{d:`M -20 -20 H 120 V 120 H -20 Z ${ih}`})})}),h()]})}var kh={wizard:`wizard_uRBAN`,"wizard-content":`wizard-content_lcl4C`,wizardContent:`wizard-content_lcl4C`,"wizard-content-outOfFrame":`wizard-content-outOfFrame_Eks4Y`,wizardContentOutOfFrame:`wizard-content-outOfFrame_Eks4Y`,"wizard-content-container":`wizard-content-container_yxbCJ`,wizardContentContainer:`wizard-content-container_yxbCJ`};function Ah({currentStep:e=0,stepCount:t=0,renderStep:n=()=>null,className:r,style:i,classNames:a,styles:o,...s}){let[u,d]=(0,c.useState)(void 0),[p,m]=(0,c.useState)(!1),[h,g]=(0,c.useState)(e),_=(0,c.useRef)([]),v=(0,c.useRef)(null);e!==h&&(g(e),m(!0)),(0,c.useEffect)(()=>{if(!p)return;let e=setTimeout(()=>m(!1),400);return()=>clearTimeout(e)},[p]),(0,c.useEffect)(()=>{v.current?.disconnect();let t=_.current[e];if(t)return d(t.clientHeight),v.current=new ResizeObserver(()=>{d(t.clientHeight)}),v.current.observe(t),()=>v.current?.disconnect()},[e,t]);let y={...u===void 0?{}:{height:`${u}px`},...o?.root,...i};return(0,f.jsx)(`div`,{...s,className:(0,l.default)(kh.wizard,a?.root,r),style:y,children:(0,f.jsx)(`div`,{className:(0,l.default)(kh.wizardContentContainer,a?.container),style:{width:`${t*100}%`,marginLeft:`-${e*100}%`,...o?.container},children:Array.from({length:t},(r,i)=>(0,f.jsx)(`div`,{ref:e=>{_.current[i]=e},className:(0,l.default)(kh.wizardContent,a?.step),style:{width:`${100/t}%`,marginLeft:`${100/t*i}%`,...o?.step},children:(0,f.jsx)(`div`,{className:(0,l.default)({[kh.wizardContentOutOfFrame]:e!==i&&!p},a?.stepContent),style:o?.stepContent,inert:e!==i||void 0,children:n(i)})},`wizardStep${i}`))})})}var jh=e=>{Ae(e[0].message,{type:`error`})},Mh=class extends v.FormValidatorGroup{constructor(e,t=null,n){super(e,t,{...n,onSubmitError:n?.onSubmitError??jh}),this.Form=(0,v.createFormComponent)(this)}},Nh=class extends c.PureComponent{static{this.defaultProps={formValidator:null,onMouseEnter:null,onMouseLeave:null,onFocus:null,onBlur:null,onChange:null,errorMessage:``,isValid:!1,isRequired:!1,label:``}}constructor(e){super(e);let{formValidator:t}=e;t&&(t.label=e.label??``,t.validate(),t.registerOnUpdateListener(()=>{this.forceUpdate()})),this.state={isFocused:!1,isHovered:!1},this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.hasError=this.hasError.bind(this),this.renderTooltip=this.renderTooltip.bind(this),this.onChange=this.onChange.bind(this)}componentDidMount(){setTimeout(()=>this.setState({isFocused:!1,isHovered:!1}),1)}componentDidUpdate(e){let{formValidator:t}=this.props;e.formValidator&&t&&e.formValidator!==t&&t.registerOnUpdateListener(()=>{this.forceUpdate()})}onMouseEnter(e){let{onMouseEnter:t}=this.props;this.setState({isHovered:!0}),t&&t(e)}onMouseLeave(e){let{onMouseLeave:t}=this.props;this.setState({isHovered:!1}),t&&t(e)}onFocus(e){let{onFocus:t}=this.props;this.setState({isFocused:!0}),t&&t(e)}onBlur(e){let{formValidator:t,onBlur:n}=this.props;t&&(t.touched=!0),this.setState({isFocused:!1}),n&&n(e)}hasError(){let{errorMessage:e,isValid:t,formValidator:n}=this.props;return n?n.touched&&n.hasError():!t||!!e}isRequired(){let{isRequired:e,formValidator:t}=this.props;return!!(e||t&&t.validators.find(e=>e.validatorId===`required`))}renderTooltip(){let{errorMessage:e,formValidator:t}=this.props,{isHovered:n,isFocused:r}=this.state;return(0,f.jsx)(Ri,{variant:`error`,message:t?t.getCurrentErrorMessage():e||``,isVisible:this.hasError()&&(r||n)})}onChange(e){let{onChange:t,formValidator:n}=this.props;if(n){let t=e;e&&e.target&&(t=e.target.value),n.set(t)}t&&t(e)}};function Ph(e,{initialValues:t,onSubmit:n,onValidate:r,errorParser:i,onSubmitError:a}={}){return(0,v.useFormValidatorGroupInstance)(()=>new Mh(e,null,{initialValues:t,errorParser:i,onSubmitError:a}),n,r)}exports.Accordion=N,exports.AccordionStyleType=y,exports.ActionButtons=re,exports.ActionIcon=ce,exports.AhroweProvider=Fe,exports.Alert=Ve,exports.AlertStyleType=Ie,exports.AnimatedLogo=Ge,exports.AnimatedText=rt,exports.AnimatedTextUnit=qe,exports.AnimatedTextVariant=Ke,exports.Avatar=pt,exports.AvatarGroup=mt,exports.Badge=lt,exports.BadgePosition=at,exports.BadgeStyleType=it,exports.BodyEnd=_e,exports.Breadcrumb=dn,exports.Button=ne,exports.ButtonGroup=hn,exports.ButtonGroupOrientation=pn,exports.ButtonSize=B,exports.ButtonStyleType=z,exports.ButtonType=V,exports.Calendar=ui,exports.CalendarView=Dn,exports.Card=mi,exports.CardActions=vi,exports.CardContent=_i,exports.CardHeader=hi,exports.CardMedia=gi,exports.CardStyleType=di,exports.Carousel=wi,exports.Checkbox=Oi,exports.Chip=Ni,exports.ChipContainer=Pi,exports.ChipStyleType=ki,exports.ColorPicker=ga,exports.CommandPalette=qa,exports.ConfigProvider=E,exports.ConfirmModal=Ya,exports.CopyButton=$a,exports.DEFAULT_SNAP_OPTIONS=ul,exports.DEFAULT_WALL_ATTRS=$s,exports.DatePicker=Vo,exports.Divider=Ko,exports.DividerOrientation=Uo,exports.DividerTextPosition=Ho,exports.DoorSwing=Ss,exports.Drawer=Jo,exports.DropZone=ns,exports.DropZoneReturnType=Xo,exports.DropZoneStatus=Yo,exports.Dropdown=Eo,exports.EmptyState=as,exports.ErrorBoundary=ls,exports.Fab=ms,exports.Flip=vs,Object.defineProperty(exports,"FormValidator",{enumerable:!0,get:function(){return v.FormValidator}}),exports.FormValidatorGroup=Mh,exports.HIT_PX=il,exports.HIT_PX_COARSE=al,exports.IconPicker=ru,exports.IdleManager=au,exports.Input=Ji,exports.InputDropdown=du,exports.InputIconPosition=Gi,exports.InputType=Wi,exports.InteractableDiv=oe,exports.KanbanBoard=Pu,exports.KanbanColumn=vu,exports.KlipyPicker=Ku,exports.MIN_FLOOR_HEIGHT=Tc,exports.MIN_OPENING_WIDTH=Ts,exports.MIN_WALL_LENGTH=ws,exports.Menu=Qu,exports.Modal=xa,exports.MultiSelect=rd,exports.NumberInput=hd,exports.OpeningKind=xs,exports.OptionPicker=Ar,exports.OtpInput=Sd,exports.OtpInputCharset=gd,exports.Overscroll=Ed,exports.PLAN_FORMAT_VERSION=yl,exports.Pagination=Nd,exports.PlanIssueKind=Cs,exports.PlanUnitSystem=ys,exports.Popover=sn,exports.PopoverAlign=Tt,exports.PopoverPlacement=wt,exports.PopoverTrigger=Et,exports.Presentation=A,exports.ProgressBar=Id,exports.RadioGroup=zd,exports.RadioGroupOrientation=Ld,exports.Rating=Ud,exports.RevealLens=Jd,exports.Ripple=G,exports.RoomDrawer=gf,exports.RoomViewer=Sf,exports.ScrollFade=Tf,exports.ScrollFadeAxis=Cf,exports.ScrollbarProvider=Y,exports.SearchInput=zu,exports.SectionHeader=kf,exports.SectionHeaderSize=Ef,exports.Skeleton=Ff,exports.SkeletonAnimation=jf,exports.SkeletonVariant=Af,exports.Slider=Rf,exports.SnapKind=ll,exports.SpinnerLoading=R,exports.SplitButton=Vf,exports.Stepper=Qf,exports.StepperAlignment=Uf,exports.StepperCollapse=Gf,exports.StepperLabelPlacement=Kf,exports.StepperStyleType=Wf,exports.Sticky=rp,exports.Switch=ap,exports.TabHeader=sp,exports.Textarea=cp,exports.ThemeProvider=Z,exports.Tilt=xp,exports.TiltGroup=fp,exports.TiltGroupContext=up,exports.TimeInput=Up,exports.Timeline=Jp,exports.TimelineAlignment=Gp,exports.TimelineItemStatus=Kp,exports.Timer=tm,exports.Tooltip=Ri,exports.Tree=th,exports.ValidatableComponent=Nh,Object.defineProperty(exports,"Validators",{enumerable:!0,get:function(){return v.Validators}}),exports.VirtualList=Xm,exports.WallType=bs,exports.WeatherIcon=Oh,exports.WeatherType=nh,exports.Wizard=Ah,exports.addFloor=Sc,exports.addOpening=uc,exports.addRect=tc,exports.addWall=ec,exports.buildPlanMesh=Jl,exports.buildWallPaths=rl,exports.cleanupPlan=mc,exports.clientToWorld=fl,exports.commitDerivation=Kc,exports.dateToDay=Sn,exports.dateToTime=Tn,exports.dayTimeToDate=En,exports.dayToDate=Cn,exports.defaultTheme=de,exports.defaultTiltEasing=pp,exports.deriveFaces=zc,exports.derivePlan=Wc,exports.detachWall=ic,exports.dissolveNode=rc,exports.duplicateFloor=wc,exports.emptyFloor=hc,exports.emptyFloorPlan=gc,exports.flattenTree=Zm,exports.floorBelow=xc,exports.floorBounds=jc,exports.floorIndex=bc,exports.formatHotkey=Ma,exports.getFloor=_c,exports.getLocale=so,Object.defineProperty(exports,"hasEightPasswordChars",{enumerable:!0,get:function(){return v.hasEightPasswordChars}}),Object.defineProperty(exports,"hasOnePasswordDigit",{enumerable:!0,get:function(){return v.hasOnePasswordDigit}}),Object.defineProperty(exports,"hasOnePasswordLetter",{enumerable:!0,get:function(){return v.hasOnePasswordLetter}}),exports.hitTest=sl,Object.defineProperty(exports,"isBic",{enumerable:!0,get:function(){return v.isBic}}),Object.defineProperty(exports,"isDate",{enumerable:!0,get:function(){return v.isDate}}),Object.defineProperty(exports,"isDay",{enumerable:!0,get:function(){return v.isDay}}),Object.defineProperty(exports,"isEmail",{enumerable:!0,get:function(){return v.isEmail}}),Object.defineProperty(exports,"isISODate",{enumerable:!0,get:function(){return v.isISODate}}),exports.isMenuAction=Ba,exports.isMenuHeading=za,exports.isMenuSeparator=Ra,Object.defineProperty(exports,"isNumber",{enumerable:!0,get:function(){return v.isNumber}}),Object.defineProperty(exports,"isPassword",{enumerable:!0,get:function(){return v.isPassword}}),Object.defineProperty(exports,"isURL",{enumerable:!0,get:function(){return v.isURL}}),exports.lightTheme=he,exports.mapLocale=io,exports.menuHotkeys=$u,exports.mergeNodes=nc,exports.moveFloor=Oc,exports.moveNode=sc,exports.nodeDegrees=Bc,exports.openingGeometry=el,exports.planFromJson=Al,exports.planFromLegacySvg=Ql,exports.planToJson=bl,exports.pruneUnmatchedRooms=qc,exports.removeFloor=Cc,exports.removeOpening=fc,exports.removeWall=oc,exports.renameFloor=Dc,exports.resolveSnap=vl,exports.roomAtPoint=Jc,exports.scalePlan=lc,exports.screenScale=dl,exports.selectionsEqual=cl,exports.setFloor=yc,exports.setFloorHeight=Ec,exports.setLocale=oo,exports.showToast=Ae,exports.splitWall=Zs,exports.tabbablesIn=Ut,exports.transformPlan=cc,exports.updateFloor=vc,exports.updateOpening=dc,exports.useClipboard=Xa,exports.useCoarsePointer=xe,exports.useComponentDefaults=D,Object.defineProperty(exports,"useFormValidator",{enumerable:!0,get:function(){return v.useFormValidator}}),exports.useFormValidatorGroup=Ph,exports.useHotkeys=Pa,exports.useLabels=O,exports.useMediaQuery=be,exports.useOverlay=Xt,exports.usePresentationDefault=k,exports.useScrollEdges=ya,exports.useSwipeDismiss=we,exports.useTheme=lp,exports.useTiltGroup=dp,exports.useVisualViewportSize=Kt,exports.validatePlan=pc,exports.wallCentrelineSpans=$c,exports.wallLength=Us,exports.weldShortWalls=ac,exports.worldTolerances=ol;
9
9
  //# sourceMappingURL=index.cjs.map