@ahrowe/ui 0.1.5 → 0.1.7

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.
Files changed (38) hide show
  1. package/dist/index.cjs +4 -4
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.mjs +1831 -1164
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/style.css +1 -1
  6. package/dist/types/package/common/iconPicker/iconPicker.d.ts +2 -21
  7. package/dist/types/package/common/iconPicker/iconPicker.types.d.ts +23 -0
  8. package/dist/types/package/common/iconPicker/index.d.ts +1 -2
  9. package/dist/types/package/common/inputDropdown/index.d.ts +1 -0
  10. package/dist/types/package/common/inputDropdown/inputDropdown.d.ts +2 -0
  11. package/dist/types/package/common/inputDropdown/inputDropdown.types.d.ts +21 -0
  12. package/dist/types/package/common/stepper/index.d.ts +1 -2
  13. package/dist/types/package/common/stepper/stepper.d.ts +2 -25
  14. package/dist/types/package/common/stepper/stepper.types.d.ts +21 -0
  15. package/dist/types/package/common/virtualList/index.d.ts +2 -0
  16. package/dist/types/package/common/virtualList/virtualList.d.ts +14 -0
  17. package/dist/types/package/common/virtualList/virtualList.types.d.ts +71 -0
  18. package/dist/types/package/common/wizard/index.d.ts +1 -2
  19. package/dist/types/package/common/wizard/wizard.d.ts +2 -27
  20. package/dist/types/package/common/wizard/wizard.types.d.ts +12 -0
  21. package/dist/types/package/index.d.ts +53 -37
  22. package/docs/CLAUDE.md +7 -1
  23. package/docs/DatePicker.md +77 -0
  24. package/docs/IconPicker.md +55 -0
  25. package/docs/InputDropdown.md +52 -0
  26. package/docs/RoomViewer.md +39 -0
  27. package/docs/ThemeProvider.md +82 -0
  28. package/docs/Toast.md +67 -0
  29. package/docs/VirtualList.md +108 -0
  30. package/package.json +10 -2
  31. package/dist/types/package/common/icon/Icon.d.ts +0 -10
  32. package/dist/types/package/common/icon/index.d.ts +0 -2
  33. package/dist/types/package/common/icon/svg/can.d.ts +0 -2
  34. package/dist/types/package/common/inputDropdownModern/index.d.ts +0 -2
  35. package/dist/types/package/common/inputDropdownModern/inputDropdownModern.d.ts +0 -35
  36. package/dist/types/package/common/roleManager/index.d.ts +0 -2
  37. package/dist/types/package/common/roleManager/roleManager.container.d.ts +0 -2
  38. package/dist/types/package/common/roleManager/roleManager.d.ts +0 -22
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
- 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,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,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("downshift");m=s(m,1);let h=require("@mona-health/react-input-mask");h=s(h,1);let g=require("prop-types");g=s(g,1);let _=require("@dnd-kit/core"),v=require("@dnd-kit/sortable"),y=require("@dnd-kit/utilities"),b=require("react-number-format");var x=function(e){return e.Default=`default`,e.Primary=`primary`,e.Plain=`plain`,e}({}),S={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`},C={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`},w={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`},T={[x.Default]:S,[x.Primary]:C,[x.Plain]:w};function E({id:e=``,title:t=``,children:n=null,expanded:r=null,onHeaderClicked:i=()=>{},styleType:a=x.Default,startOpen:o=!1,hideHeader:s=!1,className:p,style:m,classNames:h,styles:g,..._}){let v=T[a],y=(0,c.useRef)(null),[b,S]=(0,c.useState)(r??o),[C,w]=(0,c.useState)(null);(0,c.useEffect)(()=>{r!==null&&S(r)},[r]),(0,c.useEffect)(()=>{let e=y.current;if(!e)return;let t=new ResizeObserver(()=>w(e.offsetHeight));return t.observe(e),()=>t.unobserve(e)},[]);function E(){let t=!b;i(e,t),r===null&&S(t)}let D={height:`${b?32:24}px`},O={height:b?C??`auto`:`0px`};return(0,f.jsxs)(`div`,{..._,id:e||void 0,className:(0,l.default)(v.accordion,b&&v.accordionActive,p,h?.root),style:{...m,...g?.root},children:[!s&&(0,f.jsxs)(`div`,{className:(0,l.default)(v.accordionHeader,b&&v.accordionHeaderActive,h?.header),style:{...D,...g?.header},onClick:E,role:`button`,tabIndex:0,onKeyDown:({key:e})=>{e===`Enter`&&E()},children:[(0,f.jsx)(`div`,{className:(0,l.default)(v.accordionTitle,h?.title),style:g?.title,children:t}),(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronDown,className:(0,l.default)(v.accordionIcon,b&&v.accordionIconActive,h?.icon),style:g?.icon})]}),(0,f.jsx)(`div`,{className:(0,l.default)(v.accordionBody,b&&v.accordionBodyActive,h?.body),style:{...O,...g?.body},children:(0,f.jsx)(`div`,{className:(0,l.default)(v.accordionBodyInner,h?.bodyInner),style:g?.bodyInner,ref:y,children:n})})]})}var D={actionButtons:`actionButtons_7GybR`,"actionButtons-margin":`actionButtons-margin_-XoFP`,actionButtonsMargin:`actionButtons-margin_-XoFP`},O={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-small-background":`button-size-small-background_KILXc`,buttonSizeSmallBackground:`button-size-small-background_KILXc`,"button-size-medium":`button-size-medium_gNVDM`,buttonSizeMedium:`button-size-medium_gNVDM`,"button-size-large":`button-size-large_xSIcS`,buttonSizeLarge:`button-size-large_xSIcS`},k={"spinner-loading":`spinner-loading_qbxX-`,spinnerLoading:`spinner-loading_qbxX-`,"animate-spinner":`animate-spinner_6HoVF`,animateSpinner:`animate-spinner_6HoVF`,spin:`spin_axdh6`};function A({className:e}){return(0,f.jsx)(`svg`,{"data-testid":`spinner`,className:(0,l.default)(k.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`})})}A.defaultProps={className:void 0};var j=A,M=function(e){return e.Primary=`primary`,e.Default=`default`,e.Delete=`delete`,e}({}),N=function(e){return e.Default=`default`,e.Small=`small`,e.Medium=`medium`,e.Large=`large`,e}({}),P=function(e){return e.Button=`button`,e.Reset=`reset`,e.Submit=`submit`,e}({}),F={ripple:`ripple_TsvyF`,"ripple-container":`ripple-container_QzHdC`,rippleContainer:`ripple-container_QzHdC`},I=(0,c.forwardRef)(function({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,...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(F.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)(u,()=>({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=e=>p.current?.(e);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:F.rippleContainer,ref:d,style:{overflow:i?`hidden`:`visible`,...g}}):(0,f.jsxs)(`div`,{...l,className:n,onClick:s?void 0:e=>h(e),style:{position:`relative`,overflow:i?`hidden`:`visible`,...r},children:[t,(0,f.jsx)(`div`,{className:F.rippleContainer,ref:d,style:g})]})}),ee={default:O.buttonStyleDefault,primary:O.buttonStylePrimary,delete:O.buttonStyleDelete},te={default:O.buttonSizeDefault,small:O.buttonSizeSmall,medium:O.buttonSizeMedium,large:O.buttonSizeLarge};function L({className:e,style:t,type:n=P.Button,styleType:r=M.Default,size:i=N.Default,onClick:a=()=>{},children:o,icon:s,isLoading:c=!1,disabled:d=!1,title:p=void 0,ref:m,classNames:h,styles:g,..._}){return(0,f.jsx)(`button`,{..._,className:(0,l.default)(O.button,ee[r],te[i],{[O.buttonNotAllowed]:c||d},e),style:t,type:n,onClick:a,disabled:d||c,title:p,ref:m,children:(0,f.jsx)(I,{disabled:c||d,children:(0,f.jsx)(`div`,{className:(0,l.default)(O.buttonBackground,h?.background),style:g?.background,children:(0,f.jsxs)(`div`,{className:(0,l.default)(O.buttonContent,h?.content),style:g?.content,children:[c?(0,f.jsx)(`div`,{className:(0,l.default)(O.buttonLoadingContainer,h?.loadingContainer),style:g?.loadingContainer,children:(0,f.jsx)(j,{className:O.buttonLoadingIcon})}):null,(0,f.jsxs)(`div`,{className:(0,l.default)(h?.label,{[O.buttonLoading]:c,[O.buttonWithIcon]:!!s}),style:g?.label,children:[s?(0,f.jsx)(u.FontAwesomeIcon,{icon:s}):null,o]})]})})})})}L.StyleType=M,L.Size=N,L.Type=P;function ne({onSubmit:e=()=>null,onClose:t=()=>null,submitLabel:n=`Save`,cancelLabel:r=`Cancel`,submitButtonStyle:i=M.Primary,isSubmitButtonLoading:a=!1,isSubmitButtonDisabled:o=!1,isCancelButtonLoading:s=!1,isCancelButtonDisabled:c=!1,hidePrimaryButton:u=!1,hideSecondaryButton:d=!1,noMargin:p=!1,className:m,style:h,classNames:g,styles:_,...v}){return(0,f.jsxs)(`div`,{...v,className:(0,l.default)(D.actionButtons,!p&&D.actionButtonsMargin,m,g?.root),style:{...h,..._?.root},children:[!u&&(0,f.jsx)(L,{isLoading:a,disabled:o,styleType:i,type:P.Submit,onClick:e,className:g?.submitButton,style:_?.submitButton,children:n}),!d&&(0,f.jsx)(L,{isLoading:s,disabled:c,onClick:t,styleType:M.Default,className:g?.cancelButton,style:_?.cancelButton,children:r})]})}var R={interactableDiv:`interactableDiv_Ej8Fi`},re=c.default.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,tabIndex:i=0,title:a,...o},s)=>{let u=(0,c.useCallback)(e=>{e.key===`Enter`&&n?.(e),r?.(e)},[n,r]);return(0,f.jsx)(`div`,{className:(0,l.default)(R.interactableDiv,e),onClick:n,tabIndex:i??0,role:`button`,onKeyDown:u,ref:s,title:a,...o,children:t})});re.displayName=`InteractableDiv`;var z=re,ie={actionIcon:`actionIcon_ganSq`};function ae({icon:e,className:t=``,style:n,title:r=``,onClick:i=()=>{},classNames:a,styles:o,...s}){return(0,f.jsx)(z,{...s,className:(0,l.default)(ie.actionIcon,t,a?.root),style:{...n,...o?.root},title:r,onClick:i,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:e,className:a?.icon,style:o?.icon})})}function B({children:e=null}){let t=document.getElementById(`bodyEnd`);return t?(0,p.createPortal)(e,t):(typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.error(`[BodyEnd] No element with id="bodyEnd" found. Add <div id="bodyEnd"></div> to your app root.`),null)}var V={card:`card_w-6Ki`,"card-padding":`card-padding_X2-q-`,cardPadding:`card-padding_X2-q-`,"card-shadow":`card-shadow_xCSZ9`,cardShadow:`card-shadow_xCSZ9`,"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-titles":`cardHeader-titles_CAUU3`,cardHeaderTitles:`cardHeader-titles_CAUU3`,"cardHeader-titles-main":`cardHeader-titles-main_Z834V`,cardHeaderTitlesMain:`cardHeader-titles-main_Z834V`,"cardHeader-titles-sub":`cardHeader-titles-sub_2X08b`,cardHeaderTitlesSub:`cardHeader-titles-sub_2X08b`,cardMedia:`cardMedia_GZJQF`,cardActions:`cardActions_uYu-0`};function oe({className:e=void 0,children:t=null,onClick:n=void 0,tabIndex:r=null,hoverEffect:i=void 0,style:a=void 0,...o}){let s=!!n;return(0,f.jsx)(z,{...o,className:(0,l.default)(V.card,V.cardPadding,V.cardShadow,s&&V.cardInteractable,(s&&i!==!1||i)&&V.cardHover,e),onClick:n,tabIndex:r??(s?0:null),style:a,children:(0,f.jsx)(I,{disabled:!s,overflowHidden:!1,children:t})})}function se({className:e=``,title:t=``,subTitle:n=``,thumbnail:r=``}){let i=typeof r==`string`&&r.startsWith(`http`)?r:void 0;return(0,f.jsxs)(`div`,{className:(0,l.default)(V.cardHeader,e),children:[r&&(0,f.jsx)(`div`,{className:V.cardHeaderThumbnail,style:i?{backgroundImage:`url(${i})`}:{},children:!i&&r}),(0,f.jsxs)(`div`,{className:V.cardHeaderTitles,children:[(0,f.jsx)(`div`,{className:V.cardHeaderTitlesMain,children:t}),(0,f.jsx)(`div`,{className:V.cardHeaderTitlesSub,children:n})]})]})}function ce({src:e=``,alt:t=``}){return(0,f.jsx)(`img`,{className:V.cardMedia,src:e,alt:t})}function le({children:e=null}){return(0,f.jsx)(f.Fragment,{children:e})}function H({className:e=``,actions:t=[],children:n=null}){return(0,f.jsxs)(`div`,{className:(0,l.default)(V.cardActions,e),children:[t.map(({id:e,onClick:t,label:n,styleType:r=M.Default})=>(0,f.jsx)(`div`,{children:(0,f.jsx)(L,{onClick:t,styleType:r,children:n})},e??n)),n]})}var U={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-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 ue({label:e=``,selected:t=!1,onToggle:n=()=>{},className:r=``,style:i,disabled:a=!1,lineHeight:o=``,title:s=``,tabIndex:u=0,cursorDefault:d=!1,width:p=`17px`,height:m=`17px`,formValidator:h=null,children:g=null,background:_=null,isLoading:v=!1,classNames:y,styles:b,...x}){let S=(0,c.useRef)(null),[,C]=(0,c.useState)(0);(0,c.useEffect)(()=>{if(!h)return;let e=()=>C(e=>e+1);return h.registerOnUpdateListener(e),()=>h.removeOnUpdateListener(e)},[h]);function w(e){a||v||(S.current?.addRipple(),h&&h.set(!h.value),n(!t,e))}let T=h?h.value:t;return(0,f.jsxs)(`div`,{...x,className:(0,l.default)(U.checkbox,{[U.checkboxDisabled]:a,[U.checkboxPointer]:!d},r),style:i,onClick:w,onKeyPress:e=>{e.key===`Enter`&&w(e)},role:`checkbox`,"aria-checked":T,tabIndex:u,children:[(0,f.jsx)(`div`,{title:s,className:(0,l.default)(U.checkboxIcon,v?U.checkboxLoading:null,y?.icon),style:b?.icon,children:v?(0,f.jsx)(`div`,{style:{width:p,height:m},children:(0,f.jsx)(j,{className:U.checkboxLoadingSpinner})}):(0,f.jsxs)(`div`,{style:{width:p,height:m,...b?.checkmark},className:(0,l.default)(U.checkboxCheckmark,T&&U.checkboxCheckmarkChecked,y?.checkmark),children:[(0,f.jsx)(I,{ref:S,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`,width:`calc(${p} + 1px)`,height:`calc(${m} + 1px)`,..._?{style:{background:_}}:{},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:y?.label,style:{lineHeight:o||`100%`,...b?.label},children:g||e})]})}var W={chip:`chip_rCTMl`,"chip-clickable":`chip-clickable_WTVjG`,chipClickable:`chip-clickable_WTVjG`,"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`};function de({className:e=``,thumbnail:t=``,text:n=``,showRemoveIcon:r=!1,onClick:i,onRemove:a,...o}){let s=(0,c.useMemo)(()=>{if(typeof t==`string`&&t.startsWith(`http`))return t},[t]);return(0,f.jsx)(`div`,{...o,className:(0,l.default)(W.chip,i&&W.chipClickable,e),onClick:i,children:(0,f.jsx)(I,{disabled:!i,style:{borderRadius:`inherit`},children:(0,f.jsxs)(`div`,{className:W.chipInner,children:[t&&(0,f.jsx)(`div`,{className:W.chipThumbnail,style:s?{backgroundImage:`url(${s})`}:{},children:!s&&t}),(0,f.jsx)(`div`,{className:W.chipText,children:n}),r&&(0,f.jsx)(ae,{icon:d.faXmarkCircle,onClick:e=>{e.stopPropagation(),a?.()}})]})})})}function fe({className:e=void 0,children:t=null,inline:n=!1,...r}){return(0,f.jsx)(`div`,{...r,className:(0,l.default)(W.chipContainer,n&&W.chipContainerInline,e),children:t})}var pe={floatingMenu:`floatingMenu_E1XCy`,"floatingMenu-content":`floatingMenu-content_AmxkA`,floatingMenuContent:`floatingMenu-content_AmxkA`,"floatingMenu-container":`floatingMenu-container_w7k-Y`,floatingMenuContainer:`floatingMenu-container_w7k-Y`,"floatingMenu-container-align-left":`floatingMenu-container-align-left_InKnZ`,floatingMenuContainerAlignLeft:`floatingMenu-container-align-left_InKnZ`,"floatingMenu-container-align-right":`floatingMenu-container-align-right_a9OoS`,floatingMenuContainerAlignRight:`floatingMenu-container-align-right_a9OoS`,"floatingMenu-container-align-center":`floatingMenu-container-align-center_-8bGT`,floatingMenuContainerAlignCenter:`floatingMenu-container-align-center_-8bGT`,"floatingMenu-container-flag":`floatingMenu-container-flag_VdKHr`,floatingMenuContainerFlag:`floatingMenu-container-flag_VdKHr`,"floatingMenu-container-flag-align-right":`floatingMenu-container-flag-align-right_vxrRN`,floatingMenuContainerFlagAlignRight:`floatingMenu-container-flag-align-right_vxrRN`,"floatingMenu-container-flag-align-left":`floatingMenu-container-flag-align-left_a2Vv-`,floatingMenuContainerFlagAlignLeft:`floatingMenu-container-flag-align-left_a2Vv-`,"floatingMenu-container-flag-align-center":`floatingMenu-container-flag-align-center_SmaaY`,floatingMenuContainerFlagAlignCenter:`floatingMenu-container-flag-align-center_SmaaY`,"floatingMenu-anim":`floatingMenu-anim_5KB-f`,floatingMenuAnim:`floatingMenu-anim_5KB-f`,showMenu:`showMenu_AprCh`},me=function(e){return e.Left=`left`,e.Right=`right`,e.Center=`center`,e}({});function he(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ge({align:e=me.Left,children:t=null,content:n=null,isOpen:r=!1,onOpenChange:i=()=>{},dontCloseOnChildClick:a=!1,className:o,style:s,classNames:u,styles:d,...p}){let m=(0,c.useRef)(null),h=(0,c.useRef)(null),g=(0,c.useRef)(i),[_,v]=(0,c.useState)(10),[y,b]=(0,c.useState)(null);(0,c.useEffect)(()=>{g.current=i});function x(){if(!r){let e=h.current?.getBoundingClientRect();v(e?.width??10),b(e?{top:e.bottom,left:e.left}:null),i(!0)}}return(0,c.useEffect)(()=>{if(!r)return;function e(){let e=h.current?.getBoundingClientRect();e&&b({top:e.bottom,left:e.left})}return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[r]),(0,c.useEffect)(()=>{if(!r)return;function e(e){let t=m.current,n=h.current;if(!t||!n)return;let r=t===e.target||t.contains(e.target),i=a&&(n===e.target||n.contains(e.target));!r&&!i&&setTimeout(()=>g.current(!1),1)}return window.addEventListener(`mouseup`,e),()=>window.removeEventListener(`mouseup`,e)},[r,a]),(0,f.jsxs)(`div`,{...p,className:(0,l.default)(pe.floatingMenu,o,u?.root),style:{...s,...d?.root},children:[(0,f.jsx)(`div`,{className:(0,l.default)(pe.floatingMenuContent,u?.trigger),style:d?.trigger,ref:h,onClick:x,children:t}),r&&(0,f.jsxs)(`div`,{className:(0,l.default)(pe.floatingMenuAnim,u?.menu),style:{width:`${_}px`,...y&&{top:y.top,left:y.left},...d?.menu},children:[(0,f.jsx)(`div`,{className:(0,l.default)(pe.floatingMenuContainerFlag,pe[`floatingMenuContainerFlagAlign${he(e)}`])}),(0,f.jsx)(`div`,{ref:m,className:(0,l.default)(pe.floatingMenuContainer,pe[`floatingMenuContainerAlign${he(e)}`],u?.menuContainer),style:d?.menuContainer,children:n})]})]})}var _e={tooltipBubble:`tooltipBubble_uyev0`,tooltipDetails:`tooltipDetails_R7N16`,"tooltipDetails-icon":`tooltipDetails-icon_rsjns`,tooltipDetailsIcon:`tooltipDetails-icon_rsjns`,tooltipError:`tooltipError_gUBut`};function ve({variant:e,message:t=``,isVisible:n=!0,tooltipPosition:r,onClick:i}){let[a,o]=(0,c.useState)(!1);return e===`info`?n?(0,f.jsx)(`div`,{className:(0,l.default)(_e.tooltipBubble,r),onClick:i,children:t}):null:e===`details`?(0,f.jsxs)(`div`,{className:_e.tooltipDetails,children:[(0,f.jsx)(`span`,{className:_e.tooltipDetailsIcon,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:`?`}),a&&(0,f.jsx)(`div`,{className:(0,l.default)(_e.tooltipBubble,r),children:t})]}):e===`error`&&n?(0,f.jsx)(`div`,{className:(0,l.default)(_e.tooltipError,r),onClick:i,children:t}):null}var G={"required-mark":`required-mark_xGJdX`,requiredMark:`required-mark_xGJdX`,isRequired:`isRequired_Jkn3h`,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-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`,"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-field":`input-field-field_u6UjZ`,inputFieldField:`input-field-field_u6UjZ`,"input-field-field-default":`input-field-field-default_huHVO`,inputFieldFieldDefault:`input-field-field-default_huHVO`,"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-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`},K=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}({});function ye({name:e=``,label:t=``,errorMessage:n=``,isValid:r=!0,className:i=``,style:a,value:o=``,icon:s=null,onChange:p=()=>{},onFocus:m=null,onBlur:h=null,onMouseEnter:g=null,onMouseLeave:_=null,isUppercase:v=!1,isRequired:y=!1,tabIndex:b=0,type:x=void 0,isRow:S=!1,onIconClick:C=null,parse:w=null,formValidator:T=null,autoFocus:E=!1,suffix:D=null,upperRightLabel:O=null,labelInBorder:k=!1,showCancel:A=!1,onClearClicked:j,min:M=null,max:N=null,placeholder:P=``,useMatLabelStyle:F=!0,autoComplete:I=null,onClick:ee=()=>null,readOnly:te=!1,customInput:L,alwaysShowCancel:ne=!1,multiline:R=!1,rows:re,autoResize:z=!1,classNames:ie,styles:ae}){let[B,V]=(0,c.useState)(!1),[oe,se]=(0,c.useState)(!1),[ce,le]=(0,c.useState)(!1),[,H]=(0,c.useState)(0),U=(0,c.useRef)(null),ue=(0,c.useRef)(T),W=(0,c.useCallback)(()=>{let e=U.current;!e||!z||(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[z]);(0,c.useEffect)(()=>{setTimeout(()=>{V(!1),se(!1)},1),W()},[]),(0,c.useEffect)(()=>{E&&U.current&&setTimeout(()=>{U.current?.focus()},1)},[E]),(0,c.useEffect)(()=>{ue.current=T;let e=ue.current;if(!e)return;e.label=t??``,e.validate();let n=()=>H(e=>e+1);return e.registerOnUpdateListener(n),()=>{e.removeOnUpdateListener(n)}},[T,t]);let de=()=>T?T.touched&&T.hasError():!r||!!n,fe=()=>!!(y||T&&T.validators.find(e=>e.validatorId===`required`)),pe=e=>{se(!0),g&&g(e)},me=e=>{se(!1),_&&_(e)},he=e=>{V(!0),m&&m(e)},ge=e=>{ue.current&&(ue.current.touched=!0),V(!1),h&&h(e)},_e=e=>{let t,n;typeof e==`string`?n=e:(t=e,n=e.target.value),w&&(n=w(n)),T&&T.set(n),p&&p(n,t),W()},ye=()=>{if(x!==`email`)return x===`password`&&ce?`text`:x},q=x&&x!==K.Date&&x!==K.Iban&&x!==K.HasNoIcon,be=q&&!F&&(x===K.Email||x===K.Phone||x===K.Search),xe={className:(0,l.default)(G.inputFieldIcon,{[G.inputFieldIconNotClickable]:!C,[G.inputFieldIconLeft]:be}),onClick:C??void 0},Se={className:(0,l.default)(G.inputFieldIcon,G.inputFieldIconPassword),onClick:()=>le(!ce)},Ce=de(),we=t;we&&fe()&&(we=`${we} *`);let Te=T?T.value:o,Ee=F&&(B||Te||x===K.Date);return(0,f.jsxs)(`div`,{className:(0,l.default)(G.input,i),style:a,children:[(0,f.jsxs)(`label`,{htmlFor:e,className:(0,l.default)(G.inputLabel,ie?.label,{[G.inputLabelColumn]:!S,[G.inputLabelInBorder]:k}),style:ae?.label,children:[we&&!F?(0,f.jsxs)(`span`,{className:G.inputLabelText,children:[`${we} `,fe()?(0,f.jsx)(`span`,{className:(0,l.default)(G.isRequired),children:`\xA0 *`}):null]}):null,O&&(0,f.jsx)(`div`,{className:(0,l.default)(G.inputUpperRightLabel,ie?.upperRightLabel),style:ae?.upperRightLabel,children:O}),(0,f.jsxs)(`div`,{className:(0,l.default)(G.inputContainer,{[G.inputContainerMultiline]:R},ie?.container),style:ae?.container,onMouseEnter:pe,onMouseLeave:me,children:[s,c.default.cloneElement(L||(R?(0,f.jsx)(`textarea`,{}):(0,f.jsx)(`input`,{})),{className:(0,l.default)(G.inputField,{[G.inputFieldUppercase]:v,[G.inputFieldDate]:x===K.Date,[G.inputFieldDefault]:x!==K.Date,[G.inputFieldWithIcon]:q,[G.inputFieldWithIconLeft]:be,[G.inputFieldMultiline]:R,[G.inputFieldMultilineAutoResize]:R&&z},ie?.input),name:e,id:e,value:T?T.value:o,tabIndex:b,ref:L?void 0:U,onChange:_e,onFocus:he,onBlur:ge,placeholder:F?``:P,autoComplete:I,onClick:ee,readOnly:te,...!R&&{type:ye(),min:M,max:N},...R&&re!==void 0&&{rows:re}}),D&&(0,f.jsx)(`div`,{className:(0,l.default)(G.inputFieldSuffix,ie?.suffix),style:ae?.suffix,children:D})]}),(0,f.jsx)(`fieldset`,{className:(0,l.default)(G.inputFieldset,ie?.fieldset,{[G.inputContainerBorderFocused]:B,[G.inputContainerBorderSearchFocused]:x===K.Search&&(B||o),[G.inputContainerBorderInvalid]:Ce,[G.inputContainerBorderError]:Ce}),style:ae?.fieldset,children:(0,f.jsx)(`legend`,{className:(0,l.default)(G.inputFieldsetLegend,{[G.inputFieldsetLegendActive]:Ee}),children:(0,f.jsx)(`span`,{children:we})})}),F&&t&&(0,f.jsx)(`div`,{className:(0,l.default)(G.inputMatLabel,{[G.inputMatLabelFloating]:Ee,[G.inputMatLabelMultiline]:R&&!Ee}),children:we}),F&&P&&(0,f.jsx)(`div`,{className:(0,l.default)(G.inputPlaceholder,B&&!Te&&G.inputPlaceholderShown,R&&G.inputPlaceholderMultiline),children:P}),(0,f.jsx)(ve,{variant:`error`,message:T?T.getCurrentErrorMessage():n||``,isVisible:Ce&&(B||oe)})]}),x===K.Phone&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faPhone,...xe}),x===K.Email&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faEnvelope,...xe}),x===K.Edit&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faPen,...xe}),x===K.Search&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faSearch,...xe}),x===K.Password&&(0,f.jsx)(u.FontAwesomeIcon,{icon:ce?d.faEyeSlash:d.faEye,...Se}),(A&&o&&(B||oe)||ne)&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faXmark,className:G.inputFieldIcon,onClick:j??void 0,onMouseEnter:()=>se(!0),onMouseLeave:()=>se(!1)})]})}var q={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`,hexInput:`hexInput_zQw4s`};function be(e){return/^#[0-9a-fA-F]{6}$/.test(e)||/^#[0-9a-fA-F]{8}$/.test(e)}function xe(e){return/^#[0-9a-fA-F]{8}$/.test(e)?{hex6:e.slice(0,7),alpha:Math.round(parseInt(e.slice(7,9),16)/255*100)}:{hex6:e.slice(0,7),alpha:100}}function Se(e,t,n){return!n||t>=100?e:`${e}${Math.round(t/100*255).toString(16).padStart(2,`0`)}`}function Ce(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 we(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=Math.round(o*60),o<0&&(o+=360));let s=i===0?0:Math.round(a/i*100),c=Math.round(i*100);return{h:o,s,v:c}}function Te(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 Ee({hex:e,onChange:t,useInputComponent:n=!1}){let[r,i]=(0,c.useState)(e);(0,c.useEffect)(()=>{i(e)},[e]);function a(e){i(e);let n=e.startsWith(`#`)?e:`#${e}`;be(n)&&t(n)}function o(){be(r.startsWith(`#`)?r:`#${r}`)||i(e)}return n?(0,f.jsx)(ye,{value:r,onChange:e=>a(e),onBlur:o}):(0,f.jsx)(`input`,{type:`text`,value:r,onChange:e=>a(e.target.value),onBlur:o,className:q.hexInput,spellCheck:!1})}function De({hue:e,sat:t,val:n,alpha:r,onHueChange:i,onSVChange:a,onAlphaChange:o,showInput:s=!0,showAlpha:l=!1}){let u=(0,c.useRef)(null);function d(e){let t=u.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 p(e){let{s:t,v:n}=d(e.nativeEvent);a(t,n);let r=e=>{let{s:t,v:n}=d(e);a(t,n)},i=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i)};window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i)}function m(e){let{hex6:t,alpha:n}=xe(e),{h:r,s,v:c}=we(t);i(r),a(s,c),l&&o(n)}let h=Te(e,t,n),g=l?Se(h,r,!0):h;return(0,f.jsxs)(`div`,{className:q.panel,children:[(0,f.jsxs)(`div`,{ref:u,className:q.gradientArea,style:{"--hue":e},onMouseDown:p,children:[(0,f.jsx)(`div`,{className:q.gradientOverlay}),(0,f.jsx)(`div`,{className:q.cursor,style:{left:`${t}%`,top:`${100-n}%`}})]}),(0,f.jsx)(`input`,{type:`range`,min:0,max:359,value:e,onChange:e=>i(Number(e.target.value)),className:q.hueSlider}),l&&(0,f.jsx)(`input`,{type:`range`,min:0,max:100,value:r,onChange:e=>o(Number(e.target.value)),className:q.alphaSlider,style:{"--alpha-color":h}}),s&&(0,f.jsx)(Ee,{hex:g,onChange:m})]})}var Oe=`#3b82f6`;function ke({className:e,value:t=Oe,onChange:n,showInput:r=!1,showAlpha:i=!1,inline:a=!1,...o}){let[s,u]=(0,c.useState)(!1),{hex6:d,alpha:p}=xe(be(t)?t:Oe),m=we(d),[h,g]=(0,c.useState)({h:m.h,s:m.s,v:m.v,a:p}),_=(0,c.useRef)(h),[v,y]=(0,c.useState)(t);if(t!==v){y(t);let{hex6:e,alpha:n}=xe(be(t)?t:Oe);if(e!==Te(h.h,h.s,h.v)||n!==h.a){let t=we(e);g({h:t.h,s:t.s,v:t.v,a:n})}}let{h:b,s:x,v:S,a:C}=h;function w(e,t,r,a){n?.(Se(Te(e,t,r),a,i))}function T(e){_.current.h=e,g(t=>({...t,h:e})),w(e,_.current.s,_.current.v,_.current.a)}function E(e,t){_.current.s=e,_.current.v=t,g(n=>({...n,s:e,v:t})),w(_.current.h,e,t,_.current.a)}function D(e){_.current.a=e,g(t=>({...t,a:e})),w(_.current.h,_.current.s,_.current.v,e)}let O=Te(b,x,S),k=i?Ce(O,C):O,A=Se(O,C,i),j={hue:b,sat:x,val:S,alpha:C,onHueChange:T,onSVChange:E,onAlphaChange:D,showAlpha:i};return a?(0,f.jsx)(`div`,{...o,className:(0,l.default)(q.colorPicker,e),children:(0,f.jsx)(De,{...j,showInput:r})}):(0,f.jsxs)(`div`,{...o,className:(0,l.default)(q.colorPicker,e),children:[(0,f.jsx)(ge,{isOpen:s,onOpenChange:u,dontCloseOnChildClick:!0,align:me.Left,content:(0,f.jsx)(De,{...j}),children:(0,f.jsxs)(z,{className:q.swatch,children:[(0,f.jsx)(`div`,{className:q.swatchFill,style:{background:k}}),(0,f.jsx)(`span`,{className:q.swatchHex,children:A})]})}),r&&(0,f.jsx)(Ee,{hex:A,onChange:e=>n?.(e),useInputComponent:!0})]})}var Ae={modal:`modal_L-Fkd`,slideIn:`slideIn_RVIHR`,fadeIn:`fadeIn_XSuIE`,"modal-container":`modal-container_qwKIm`,modalContainer:`modal-container_qwKIm`,"modal-header":`modal-header_DhsRr`,modalHeader:`modal-header_DhsRr`,"modal-wrapper":`modal-wrapper_r5wzq`,modalWrapper:`modal-wrapper_r5wzq`,"modal-wrapper-shown":`modal-wrapper-shown_F0BgK`,modalWrapperShown:`modal-wrapper-shown_F0BgK`};function je({children:e=null,title:t=``,isOpen:n=!1,onClose:r=()=>null,className:i=``,style:a,hideHeader:o=!1,classNames:s,styles:p}){let[m,h]=(0,c.useState)(n),[g,_]=(0,c.useState)(n);return(0,c.useEffect)(()=>{n?(h(n),setTimeout(()=>_(!0),1)):(_(!1),setTimeout(()=>h(n),300))},[n]),m?(0,f.jsx)(B,{children:(0,f.jsxs)(`div`,{className:(0,l.default)(Ae.modalContainer,s?.container),style:p?.container,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Ae.modalWrapper,g&&Ae.modalWrapperShown,s?.backdrop),style:p?.backdrop,onClick:r}),g&&(0,f.jsxs)(`div`,{className:(0,l.default)(Ae.modal,g&&Ae.modalShown,i,s?.modal),style:{...a,...p?.modal},onClick:e=>e.stopPropagation(),children:[!o&&(0,f.jsxs)(`div`,{className:(0,l.default)(Ae.modalHeader,s?.header),style:p?.header,children:[(0,f.jsx)(`div`,{className:s?.title,style:p?.title,children:t}),(0,f.jsx)(u.FontAwesomeIcon,{onClick:r,icon:d.faXmark,className:s?.closeButton,style:p?.closeButton})]}),e]})]})}):null}function Me({children:e=null,className:t=``,onClose:n=()=>{},onConfirm:r=()=>{},title:i=``,content:a=null,isOpen:o=void 0}){let[s,l]=(0,c.useState)(!1),[u,d]=(0,c.useState)(!1);function p(e=!1){l(!1),n(e)}async function m(){d(!0);try{await r(),p(!0)}finally{d(!1)}}return(0,f.jsxs)(`div`,{className:t,children:[(0,f.jsx)(`span`,{onClick:()=>l(!0),children:e}),(0,f.jsxs)(je,{title:i,isOpen:o===void 0?s:o,onClose:()=>p(),children:[a,(0,f.jsx)(ne,{onClose:()=>p(),onSubmit:m,submitLabel:`Confirm`,isSubmitButtonLoading:u})]})]})}var J={"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`},Ne=[`de_AT`,`de_CH`,`de_DE`,`en_US`,`en_GB`,`de`,`en`],Pe=`en_US`,Fe=()=>{let e=navigator.languages[0]?.replace(`-`,`_`)||Pe;return Ne.includes(e)?e===`en_GB`||e===`en`?`en_US`:e===`de`?`de_DE`:e:Pe},Ie=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`}},Le=Fe();async function Re(e){Le=e}function ze(e=`_`){return Le.replace(`_`,e)}function Be(e,t){return new Date(t,e,0).getDate()}function Ve(e,t,n){return new Date(Date.UTC(n,t-1,e))}function He(e,t,n,r,i=!1){return new Date(Date.UTC(t,n-1,r)).toLocaleDateString(e,{month:i?`short`:`long`})}function Ue(e=ze(`-`)){return Array.from(Array(12).keys()).map(t=>He(e,2023,t+1,1))}function We(e,t=!0){let n=new Date(Date.UTC(2023,3,10)),r=[];for(let i=0;i<7;i++)r.push(n.toLocaleDateString(e,{weekday:t?`short`:`long`})),n.setDate(n.getDate()+1);return r}function Ge(e,t){return new Date(Date.UTC(t,e-1,1)).getDay()||7}function Ke(e){return{day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()}}function qe(e){let t=e.getDate(),n=e.getMonth()+1,r=e.getFullYear();return`${t<10?`0${t}`:t}.${n<10?`0${n}`:n}.${r}`}function Je(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 Ye(e,t,n,r,i){let{day:a,month:o,year:s}=r?Ke(r):{day:void 0,month:void 0,year:void 0},{day:c,month:l,year:u}=i?Ke(i):{day:void 0,month:void 0,year:void 0},d=Ve(e,t,n),f=e===a&&t===o&&n===s,p=e===c&&t===l&&n===u,m=!1;if(a!==void 0&&o!==void 0&&s!==void 0&&c!==void 0&&l!==void 0&&u!==void 0){let e=Ve(a,o,s),t=Ve(c,l,u);m=d.getTime()>=e.getTime()&&d.getTime()<=t.getTime()}return{isStartDate:f,isInRange:m,isEndDate:p}}function Xe(e,t,n,r,i){let a=Ve(e,t,n);if(r){let{day:e,month:t,year:n}=Ke(r);if(a<Ve(e,t,n))return!0}if(i){let{day:e,month:t,year:n}=Ke(i);if(a>Ve(e,t,n))return!0}return!1}function Ze(e,t,n){let{day:r,month:i,year:a}=Ke(new Date);return e===r&&t===i&&n===a}function Qe({className:e=``,month:t=new Date().getMonth()+1,year:n=new Date().getFullYear(),onSelect:r=()=>null,selectionStart:i,selectionEnd:a,minDate:o=null,maxDate:s=null}){let c=ze(`-`),u=Be(t,n),d=Ge(t,n);return(0,f.jsx)(`div`,{className:(0,l.default)(J.datePickerMonth,e),children:(0,f.jsxs)(`div`,{className:(0,l.default)(J.datePickerMonthContent),children:[We(c).map((e,t)=>(0,f.jsx)(`div`,{children:e},t)),Array.from(Array(d-1).keys()).map(e=>(0,f.jsx)(`div`,{className:(0,l.default)(J.datePickerMonthItem,J.datePickerMonthPlaceholder)},e)),Array.from(Array(u).keys()).map(e=>{let c=e+1,u=Ye(c,t,n,i,a),d=Xe(c,t,n,o,s),p=Ze(c,t,n);return(0,f.jsx)(z,{onClick:()=>d?null:r(Ve(c,t,n)),className:(0,l.default)(J.datePickerMonthDay,J.datePickerMonthItem,{[J.datePickerMonthDaySelected]:u.isInRange,[J.datePickerMonthDaySelectedStart]:u.isStartDate,[J.datePickerMonthDaySelectedEnd]:u.isEndDate,[J.datePickerMonthDayDisabled]:d,[J.datePickerMonthDayToday]:p}),children:c},c)}),Array.from(Array(42-(d+u-1)).keys()).map(e=>(0,f.jsx)(`div`,{className:(0,l.default)(J.datePickerMonthItem,J.datePickerMonthPlaceholder),children:`\xA0`},e))]})})}var $e={infiniteBlock:`infiniteBlock_dFv-h`};function et(e,t){let n=e;for(;n.props.children!==null&&typeof n.props.children==`object`&&!Array.isArray(n.props.children);)n=n.props.children;let r=n.props.children;if(Array.isArray(r)){let e=r;if(!e[0]?.props?.children){for(let n of e)if(typeof n==`string`&&n.trim().length>0)return n.toLowerCase().startsWith(t)}return String(e[0].props.children).toLowerCase().startsWith(t)}return String(r).toLowerCase().startsWith(t)}function tt(e,t,n){let r=e+t;return r===n?0:r<-1?n-1:r}function nt({children:e,onScroll:t,className:n=``,isDataLoading:r=!1,setHighlightedIndex:i=()=>null}){let a=(0,c.useRef)(null),o=(0,c.useRef)(!1),[s,u]=(0,c.useState)(!1),d=(0,c.useRef)(-1),p=(0,c.useRef)(null),m=(0,c.useCallback)(()=>{let e=a.current;if(!e)return;let{scrollTop:n,offsetHeight:r,scrollHeight:i}=e;Math.abs(n+r-i)>5||o.current||(o.current=!0,u(!0),t().then(()=>{o.current=!1,u(!1)}))},[t]),h=(0,c.useCallback)(t=>{let n=a.current;if(!n)return;let r=c.default.Children.toArray(e),{scrollHeight:o,childElementCount:s}=n,l=o/s,u=d.current;switch(t.key){case`ArrowDown`:u=tt(u,1,r.length);break;case`ArrowUp`:u=tt(u,-1,r.length);break;default:for(let e=0;e<r.length;e++)if(et(r[e],t.key)){if(u>=e&&p.current===t.key)continue;u=e;break}}d.current=u,p.current=t.key,u>=0&&(n.scrollTop=u*l,i(u))},[e,i]);return(0,c.useEffect)(()=>(document.addEventListener(`keydown`,h),()=>document.removeEventListener(`keydown`,h)),[h]),(0,f.jsxs)(`div`,{className:(0,l.default)($e.infiniteBlock,n),onScroll:m,ref:a,children:[r?(0,f.jsx)(j,{}):e,s&&(0,f.jsx)(j,{})]})}var Y={"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-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-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":`dropdown-input-list_JnMbA`,dropdownInputList:`dropdown-input-list_JnMbA`,"dropdown-input-list-on-top":`dropdown-input-list-on-top_RpQ9v`,dropdownInputListOnTop:`dropdown-input-list-on-top_RpQ9v`,"dropdown-input-list-wider":`dropdown-input-list-wider_0rbTN`,dropdownInputListWider:`dropdown-input-list-wider_0rbTN`,"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-hidden":`dropdown-input-list-hidden_huNc5`,dropdownInputListHidden:`dropdown-input-list-hidden_huNc5`,"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":`dropdown-border_9Oaex`,dropdownBorder:`dropdown-border_9Oaex`,"dropdown-border-focused":`dropdown-border-focused_Te-ER`,dropdownBorderFocused:`dropdown-border-focused_Te-ER`,"dropdown-border-searchFocused":`dropdown-border-searchFocused_AH67N`,dropdownBorderSearchFocused:`dropdown-border-searchFocused_AH67N`,"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`};function rt({errorMessage:e=``,className:t=``,label:n=``,value:r=``,isValid:i=!0,tabIndex:a=0,isRequired:o=!1,customProps:s={},isRow:p=!1,disabled:h=!1,onScroll:g=()=>Promise.resolve(),isListOnTop:_=!1,onClick:v,onChange:y,onFocus:b=null,onBlur:x=null,onMouseEnter:S=null,onMouseLeave:C=null,dropdownLabel:w,isDropdownListWider:T=!1,inputClassName:E=``,dropDownIconClassName:D=``,dropDownClassName:O=``,formValidator:k=null,labelClassName:A=``,dropDownInputClassName:j=``,items:M=[],useMatLabelStyle:N=!0,placeholder:P=``,plainStyle:F=!1,scrollToSelected:I=!1,reactRef:ee}){let[te,L]=(0,c.useState)(!1),[ne,R]=(0,c.useState)(!1),[,re]=(0,c.useState)(0),z=(0,c.useRef)(k);(0,c.useEffect)(()=>{if(z.current=k,!z.current)return;z.current.label=n??``,z.current.validate();let e=()=>re(e=>e+1);return z.current.registerOnUpdateListener(e),()=>z.current?.removeOnUpdateListener(e)},[k,n]);let ie=e=>{R(!0),S?.(e)},ae=e=>{R(!1),C?.(e)},B=e=>{L(!0),b?.(e)},V=e=>{z.current&&(z.current.touched=!0),L(!1),x?.(e)},oe=()=>k?k.touched&&k.hasError():!i||!!e,se=()=>!!(o||k?.validators.find(e=>e.validatorId===`required`)),ce=e=>{k?(k.set(e),y?.(k.value,s)):y?.(e,s)},le=w,H=k?k.value:r,U=oe();return M.forEach(e=>{e.key===H&&(le=e.label)}),(0,f.jsxs)(`div`,{className:(0,l.default)(t,Y.dropdownLabel,Y.dropdown,{[Y.dropdownLabelColumn]:!p}),onMouseEnter:ie,onMouseLeave:ae,children:[(0,f.jsx)(m.default,{onChange:e=>ce((e||{key:``}).key),itemToString:e=>e?String(e.key):``,selectedItem:M.find(e=>e.key===H)??null,stateReducer:(e,t)=>I&&Object.prototype.hasOwnProperty.call(t,`isOpen`)?{...t,highlightedIndex:t.isOpen?M.indexOf(e.selectedItem):null}:t,children:({getItemProps:e,getToggleButtonProps:t,isOpen:r,selectedItem:i,highlightedIndex:o,setHighlightedIndex:s})=>(0,f.jsx)(`div`,{children:(0,f.jsxs)(`div`,{onFocus:B,onBlur:V,className:(0,l.default)(Y.dropdownInput,{[Y.dropdownInputPlain]:F,[Y.dropdownInputButtonDisabled]:h},j),children:[(0,f.jsx)(`button`,{tabIndex:a,type:`button`,style:T?{padding:`6px`,border:`none`}:{},className:(0,l.default)(Y.dropdownInputButton,E),...t(),onClick:e=>{t().onClick?.(e),v?.(e)},ref:ee,children:le||H||(0,f.jsx)(`div`,{children:`\xA0`})}),(0,f.jsx)(`button`,{type:`button`,tabIndex:-1,className:(0,l.default)(Y.dropdownInputButtonIcon,D),...t(),onClick:e=>{t().onClick?.(e),v?.(e)},children:!h&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronDown,className:(0,l.default)(Y.dropdownInputButtonIconArrow,{[Y.dropdownInputButtonIconArrowOpen]:r})})}),!h&&r?(0,f.jsx)(nt,{onScroll:g,className:(0,l.default)(Y.dropdownInputList,{[Y.dropdownInputListOnTop]:_,[Y.dropdownInputListWider]:T}),setHighlightedIndex:s,children:M.map((t,n)=>(0,f.jsx)(`div`,{...e({index:n,item:t,disabled:!!t.disabled}),className:(0,l.default)(Y.dropdownInputListItem,O,{[Y.dropdownInputListItemActive]:o===n,[Y.dropdownInputListItemSelected]:i===t}),children:t.label},t.key))}):null,(0,f.jsx)(`fieldset`,{className:(0,l.default)(Y.dropdownFieldset,{[Y.dropdownBorderPlain]:F,[Y.dropdownBorderFocused]:te,[Y.dropdownBorderInvalid]:U,[Y.dropdownBorderError]:U}),children:(0,f.jsx)(`legend`,{className:(0,l.default)(Y.dropdownFieldsetLegend,{[Y.dropdownFieldsetLegendActive]:N&&(te||H)}),children:(0,f.jsx)(`span`,{children:n})})}),N&&n&&(0,f.jsx)(`div`,{className:(0,l.default)(Y.dropdownMatLabel,{[Y.dropdownMatLabelFloating]:te||H}),children:n}),N&&P&&(0,f.jsx)(`div`,{className:(0,l.default)(Y.dropdownPlaceholder,te&&!le&&Y.dropdownPlaceholderShown),children:P})]})})}),n&&!N&&(0,f.jsxs)(`div`,{className:(0,l.default)(Y.dropdownLabelText,A),children:[n,se()?(0,f.jsx)(`div`,{className:Y.requiredMark,children:`*`}):null]}),(0,f.jsx)(ve,{variant:`error`,message:k?k.getCurrentErrorMessage():e||``,isVisible:U&&(te||ne)})]})}var it={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`};function at({className:e=``,selected:t,onSelect:n=()=>null,formValidator:r=null,noInput:i=!1,noHeader:a=!1,isModal:o=!1,isInline:s=!1,onChange:u=()=>null,minDate:p=null,maxDate:m=null,children:g=null,showClearButton:_=!1,label:v=``,isValid:y=!0,errorMessage:b=``,isRequired:x=!1,startDate:S,endDate:C}){let w=()=>r?r.value:t,T=w()??new Date,[E,D]=(0,c.useState)(T.getMonth()+1),[O,k]=(0,c.useState)(T.getFullYear()),[A,j]=(0,c.useState)(!1),[M,N]=(0,c.useState)(()=>w()?qe(T):``),[P,F]=(0,c.useState)(!1),[I,ee]=(0,c.useState)(!1),[,te]=(0,c.useState)(0),[ne,R]=(0,c.useState)(t),re=(0,c.useRef)(r);if(ne!==t){R(t);let e=t??new Date;D(e.getMonth()+1),k(e.getFullYear()),N(t?qe(t):``)}(0,c.useEffect)(()=>{if(re.current=r,!r)return;let e=()=>{let e=r.value;e?(D(e.getMonth()+1),k(e.getFullYear()),N(qe(e))):N(``),te(e=>e+1)};return r.registerOnUpdateListener(e),()=>r.removeOnUpdateListener(e)},[r]);let z=()=>r?r.touched&&r.hasError():!y||!!b,ie=()=>!!(x||r?.validators.find(e=>e.validatorId===`required`)),B=e=>{N(e?qe(e):``),r&&r.set(e),u(e)},V=e=>{B(e),n(e),j(!1)},oe=e=>{D(t=>{let n=t+e;return n<1?(n=12,k(e=>e-1)):n>12&&(n=1,k(e=>e+1)),n})},se=e=>{if(e.match(/\d{2}\.\d{2}\.\d{4}/gi)){let[t,n,r]=e.split(`.`),i=Ve(Number(t),Number(n),Number(r));if(i&&i.toString()!==`Invalid Date`&&(!m||i<=m)&&(!p||i>=p))return i}return null},ce=({previousState:e,nextState:t})=>{if(!e||t.value===e.value)return t;let n=Je(t.value,e.value,t.selection??null),r=se(n.value);return r&&B(r),n},le=()=>{let e=400,t=new Date().getFullYear()-200;return p&&(t=p.getFullYear()),m&&(e=m.getFullYear()-t+1),Array.from(Array(e).keys()).map(e=>({key:e+t,label:e+t}))},H=w(),U=z(),ue=(0,f.jsxs)(f.Fragment,{children:[a?null:(0,f.jsxs)(`div`,{className:it.datePickerHeader,children:[(0,f.jsx)(ae,{icon:d.faChevronLeft,onClick:()=>oe(-1)}),(0,f.jsx)(`div`,{className:it.datePickerHeaderMonthAndYearContainer,children:(0,f.jsxs)(`div`,{className:it.datePickerHeaderMonthAndYear,children:[(0,f.jsx)(rt,{plainStyle:!0,scrollToSelected:!0,onChange:e=>D(e),className:it.datePickerHeaderMonth,value:He(ze(`-`),O,E,1),items:Ue().map((e,t)=>({key:t+1,label:e}))}),(0,f.jsx)(rt,{plainStyle:!0,scrollToSelected:!0,useMatLabelStyle:!1,className:it.datePickerHeaderYear,onChange:e=>k(e),value:O,items:le()})]})}),(0,f.jsx)(ae,{icon:d.faChevronRight,onClick:()=>oe(1)})]}),(0,f.jsx)(Qe,{className:it.datePickerMonth,month:E,year:O,onSelect:V,selectionStart:S??H,selectionEnd:C??H,minDate:p,maxDate:m}),_&&(0,f.jsx)(L,{onClick:()=>V(null),children:`Clear`}),g]}),W=i?null:(0,f.jsx)(ye,{readOnly:o,label:`${v}${ie()?` *`:``}`,value:M,onChange:e=>N(e),onClick:()=>j(!0),customInput:(0,f.jsx)(h.default,{mask:`99.99.9999`,maskPlaceholder:`_`,beforeMaskedStateChange:ce}),onBlur:()=>{re.current&&(re.current.touched=!0),F(!1),B(se(M))},onFocus:()=>F(!0),onMouseEnter:()=>ee(!0),onMouseLeave:()=>ee(!1),isValid:!U}),de=s?ue:o?(0,f.jsx)(je,{hideHeader:!0,isOpen:A,onClose:()=>j(!1),children:ue}):(0,f.jsx)(ge,{isOpen:A,onOpenChange:e=>j(e),content:ue,align:me.Left,dontCloseOnChildClick:!0,children:W});return(0,f.jsxs)(`div`,{className:(0,l.default)(it.datePicker,e),children:[(o||s)&&W,de,(0,f.jsx)(ve,{variant:`error`,message:r?r.getCurrentErrorMessage():b||``,isVisible:U&&(P||I)})]})}var ot={emptyState:`emptyState_KXOIx`};function st({className:e,icon:t,children:n,...r}){return(0,f.jsxs)(`div`,{...r,className:(0,l.default)(ot.emptyState,e),children:[t&&(0,f.jsx)(u.FontAwesomeIcon,{icon:t}),(0,f.jsx)(`div`,{children:n??`No entries available`})]})}var ct={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`},lt={default:null,mini:ct.fabSizeMini};function ut({children:e=null,size:t=`default`,className:n=``,styleType:r=M.Primary,onClick:i=()=>{}}){return(0,f.jsx)(L,{styleType:r,className:(0,l.default)(ct.fab,lt[t],n),onClick:i,children:(0,f.jsx)(`div`,{className:ct.fabContentContainer,children:(0,f.jsx)(`div`,{className:ct.fabContent,children:e})})})}var X={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 dt({children:e=null,size:t=`default`,menuEntries:n=[],onMenuEntryClicked:r=()=>{},onClick:i=()=>{},closeMenuOnEntryClicked:a=!0,...o}){let[s,p]=(0,c.useState)(!1);function m(){n.length>0&&p(e=>!e),i()}function h(e,t){e.stopPropagation(),a&&p(!1),r(t)}return(0,f.jsxs)(`div`,{...o,className:X.fabContainer,children:[(0,f.jsx)(`div`,{className:(0,l.default)(X.fabMenuBackdrop,s&&X.fabMenuBackdropOpen),onClick:e=>{e.stopPropagation(),p(!1)}}),(0,f.jsx)(`div`,{onClick:e=>e.stopPropagation(),children:(0,f.jsx)(ut,{className:X.fab,size:t,onClick:m,children:(0,f.jsxs)(`div`,{className:(0,l.default)(X.fabIcon,s&&X.fabIconMenuOpen),children:[(0,f.jsx)(`div`,{className:(0,l.default)(X.fabIconContent,!s&&X.fabIconContentShown),children:e}),(0,f.jsx)(`div`,{className:(0,l.default)(X.fabIconContent,s&&X.fabIconContentShown),children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faPlus})})]})})}),(0,f.jsx)(`div`,{className:X.fabMenu,children:n.map(({id:e,label:t,icon:n})=>(0,f.jsxs)(`div`,{className:(0,l.default)(X.fabMenuEntry,s&&X.fabMenuEntryShown),onClick:t=>h(t,e),children:[t&&(0,f.jsx)(`div`,{className:X.fabMenuEntryLabelContainer,children:(0,f.jsx)(`div`,{className:X.fabMenuEntryLabel,children:t})}),(0,f.jsx)(ut,{size:`mini`,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:n})})]},e))})]})}var ft=e=>(0,f.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`-1.02083 -3.15 21.04 17.65`,...e,children:(0,f.jsx)(`path`,{d:`M 0 0 L 0 11 Q 9 16 19 11 l 0 -11 M 3 12 l 0 -7 Q 9 7 16 5 l 0 7 M 6 -2 q -8.5 1 -5 3 q 8 3 17 0 q 3.5 -2 -5 -3 q -3.5 -0.3 -7 0 z`,strokeWidth:`1`,fill:`none`})}),pt=({type:e,...t})=>{switch(e){case`can`:return(0,f.jsx)(ft,{...t});default:return null}};pt.propTypes={type:g.default.string.isRequired};var mt=pt,ht=[`click`,`mousemove`,`keydown`,`scroll`,`touchstart`];function gt({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),i(!1),a.current=setTimeout(()=>{i(!0)},t*1e3)},[t]);return(0,c.useEffect)(()=>{o()},[o]),(0,c.useEffect)(()=>{for(let e of ht)document.addEventListener(e,o);return()=>{for(let e of ht)document.removeEventListener(e,o);a.current!==null&&clearTimeout(a.current)}},[o]),(0,f.jsx)(f.Fragment,{children:n&&r&&e})}var _t={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-header":`column-header_PLeKG`,columnHeader:`column-header_PLeKG`,"column-items":`column-items_xY5er`,columnItems:`column-items_xY5er`,item:`item_T8CJK`,"item-dragging":`item-dragging_iWurw`,itemDragging:`item-dragging_iWurw`,dragOverlay:`dragOverlay_DSyKz`};function vt({id:e,children:t}){let{attributes:n,listeners:r,setNodeRef:i,transform:a,transition:o,isDragging:s}=(0,v.useSortable)({id:e});return(0,f.jsx)(`div`,{ref:i,style:{transform:y.CSS.Transform.toString(a),transition:o},className:(0,l.default)(_t.item,s&&_t.itemDragging),...n,...r,children:t})}function yt({id:e,title:t,itemIds:n,items:r,renderItem:i,className:a,classNames:o,styles:s}){let{setNodeRef:c,isOver:u}=(0,_.useDroppable)({id:`column-${e}`});return(0,f.jsxs)(`div`,{className:(0,l.default)(_t.column,u&&_t.columnOver,n.length===0&&_t.columnEmpty,a),children:[(0,f.jsx)(`div`,{className:(0,l.default)(_t.columnHeader,o?.header),style:s?.header,children:t}),(0,f.jsx)(v.SortableContext,{items:n,strategy:v.verticalListSortingStrategy,children:(0,f.jsx)(`div`,{ref:c,className:(0,l.default)(_t.columnItems,o?.items),style:s?.items,children:n.map(e=>(0,f.jsx)(vt,{id:e,children:r[e]===void 0?null:i(r[e],e)},e))})})]})}function bt({columns:e,items:t,renderItem:n,onChange:r,className:i,style:a,classNames:o,styles:s}){let[u,d]=(0,c.useState)(null),[p,m]=(0,c.useState)(null),h=(0,_.useSensors)((0,_.useSensor)(_.PointerSensor,{activationConstraint:{distance:8}})),g=p??e;function y(e,t){return e.findIndex(e=>e.itemIds.includes(t))}function b({active:t}){d(String(t.id)),m(e.map(e=>({...e,itemIds:[...e.itemIds]})))}function x({active:t,over:n}){if(!n)return;let r=String(t.id),i=String(n.id);m(t=>{let n=(t??e.map(e=>({...e,itemIds:[...e.itemIds]}))).map(e=>({...e,itemIds:[...e.itemIds]})),a=y(n,r);if(a===-1)return t;let o;if(i.startsWith(`column-`)){let e=i.slice(7);o=n.findIndex(t=>t.id===e)}else o=y(n,i);if(o===-1)return t;if(a===o){let e=n[a],t=e.itemIds.indexOf(r),o=e.itemIds.indexOf(i);t!==-1&&o!==-1&&t!==o&&(n[a]={...e,itemIds:(0,v.arrayMove)(e.itemIds,t,o)})}else{n[a].itemIds=n[a].itemIds.filter(e=>e!==r);let e=n[o].itemIds.indexOf(i),t=e===-1?n[o].itemIds.length:e;n[o].itemIds.splice(t,0,r)}return n})}function S({active:e,over:t}){if(d(null),!t||!p){m(null);return}r(p),m(null)}return(0,f.jsxs)(_.DndContext,{sensors:h,collisionDetection:_.closestCorners,onDragStart:b,onDragOver:x,onDragEnd:S,children:[(0,f.jsx)(`div`,{className:(0,l.default)(_t.board,i),style:a,children:g.map(e=>(0,f.jsx)(yt,{id:e.id,title:e.title,itemIds:e.itemIds,items:t,renderItem:n},e.id))}),(0,f.jsx)(_.DragOverlay,{children:u&&t[u]!==void 0?(0,f.jsx)(`div`,{className:(0,l.default)(_t.dragOverlay,o?.dragOverlay),style:s?.dragOverlay,children:n(t[u],u)}):null})]})}var xt={iconLoading:`iconLoading_wovj4`,"spin-to-oblivion":`spin-to-oblivion_0tZtm`,spinToOblivion:`spin-to-oblivion_0tZtm`,"iconLoading-first":`iconLoading-first_SBwP3`,iconLoadingFirst:`iconLoading-first_SBwP3`,"draw-line":`draw-line_1NiWA`,drawLine:`draw-line_1NiWA`,"iconLoading-second":`iconLoading-second_nHrW3`,iconLoadingSecond:`iconLoading-second_nHrW3`,"draw-line-two":`draw-line-two_HmaHl`,drawLineTwo:`draw-line-two_HmaHl`};function St({className:e=``}){return(0,f.jsx)(`div`,{className:(0,l.default)(xt.iconLoading,e),children:(0,f.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`-8 -1 16 14`,children:[(0,f.jsx)(`path`,{className:xt.iconLoadingFirst,d:`M 0 0 C 3 5 6 5 6 12`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:xt.iconLoadingFirst,d:`M 0 0 C -3 5 -6 5 -6 12`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:xt.iconLoadingFirst,d:`M 0 0 L 0 10`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:xt.iconLoadingSecond,d:`M 0.1 10 C -3 10 -4 10 -6 12`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:xt.iconLoadingSecond,d:`M -0.1 10 C 3 10 4 10 6 12`,strokeWidth:`1.7`,fill:`none`})]})})}var Ct=St,wt={numberInput:`numberInput_7p2O3`};function Tt({value:e,onChange:t,formValidator:n,label:r,error:i,className:a,allowNegative:o=!1,decimalSeparator:s,thousandSeparator:c,prefix:u,suffix:d,decimalScale:p,placeholder:m,sign:h,...g}){let _=n==null?e:n.value,v=h!=null&&_!=null?Math.abs(Number(_)):_,y=v==null?``:String(v);function x(e){let r=e;r!==void 0&&(h===`-`&&(r=-Math.abs(r)),h===`+`&&(r=Math.abs(r))),n?.set(r??null),t?.(r)}let S=h===`-`?`-`:h===`+`?`+`:u;return(0,f.jsx)(ye,{label:r,className:(0,l.default)(wt.numberInput,a),value:y,onChange:()=>{},formValidator:null,isValid:n?n.touched?!n.hasError():!0:!i,errorMessage:n?n.getCurrentErrorMessage()??``:i??``,placeholder:m,customInput:(0,f.jsx)(b.NumericFormat,{onValueChange:e=>x(e.floatValue),allowNegative:h==null?o:!1,decimalSeparator:s,thousandSeparator:c,decimalScale:p,fixedDecimalScale:!0,prefix:S,suffix:d,...g})})}var Et=Tt,Dt={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 Ot({className:e=void 0,options:t,onChange:n,value:r,...i}){let a=t.findIndex(e=>e.key===r)*100/t.length;return(0,f.jsxs)(`div`,{...i,className:(0,l.default)(Dt.optionPicker,e),children:[(0,f.jsx)(`div`,{className:Dt.optionPickerChip,style:{left:`${a}%`,width:`${100/t.length}%`}}),t.map(e=>(0,f.jsx)(z,{onClick:t=>n(e.key,t),className:(0,l.default)(Dt.optionPickerOption,e.key===r&&Dt.optionPickerOptionActive),tabIndex:e.key===r?-1:0,children:e.label},e.key))]})}var kt=768;function At(){let[e,t]=(0,c.useState)(()=>({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<kt}));return(0,c.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<kt})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}var jt={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 Mt({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}=At(),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);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:jt.overscroll,ref:g,onScroll:D,children:[(0,f.jsx)(`div`,{className:jt.overscrollHeaderContainer,style:{height:`${a}${s}`},ref:v,children:(0,f.jsx)(`div`,{className:(0,l.default)(jt.overscrollHeader,r&&jt.overscrollHeaderCentered),ref:_,children:t})}),(0,f.jsx)(`div`,{style:{minHeight:O},children:e})]})}var Nt={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`,"progressBar-label-custom":`progressBar-label-custom_sSump`,progressBarLabelCustom:`progressBar-label-custom_sSump`};function Pt(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 Ft({className:e=void 0,total:t=100,progress:n=0,style:r=void 0,...i}){function a(){let e=[];return Array.isArray(n)?e.push(...n):typeof n==`object`?e.push(n):e.push({amount:n}),e.map((n,i)=>{let a=t?n.amount/t*100:0;return(0,f.jsx)(`div`,{className:(0,l.default)(Nt.progressBarFill,i===e.length-1&&Nt.progressBarFillEnd,n.class),style:{width:`${a}%`,background:n.color||void 0,...r||{}},title:n.label?`${n.label}: ${n.amount}`:void 0,children:n.label&&(0,f.jsx)(`div`,{className:Nt.progressBarLabel,style:n.color?{color:Pt(n.color)}:{},children:n.label})},i)})}return(0,f.jsx)(`div`,{...i,className:(0,l.default)(Nt.progressBar,e),style:r,children:a()})}function It(e){return Math.round(e/5)*5}function Lt(e){return{x:It(e.x),y:It(e.y)}}function Rt(e,t,n){let r=n.createSVGPoint();r.x=e,r.y=t;let i=n.getScreenCTM();if(!i)return{x:0,y:0};let a=r.matrixTransform(i.inverse());return Lt({x:a.x,y:a.y})}function zt(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Bt(e,t,n){let r=n.x-t.x,i=n.y-t.y,a=r*r+i*i;if(a===0)return{dist:zt(e,t),t:0};let o=Math.max(0,Math.min(1,((e.x-t.x)*r+(e.y-t.y)*i)/a)),s=t.x+o*r,c=t.y+o*i;return{dist:Math.sqrt((e.x-s)**2+(e.y-c)**2),t:o}}function Vt(e,t){let n=null;for(let r of t){let t=r.points;for(let i=0;i<t.length;i++){let a=t[i],o=t[(i+1)%t.length],{dist:s,t:c}=Bt(e,a,o);s<=8&&(!n||s<n.dist)&&(n={roomId:r.id,wallIndex:i,t:c,dist:s})}}return n}function Ht(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 Ut(e){return{x:e.reduce((e,t)=>e+t.x,0)/e.length,y:e.reduce((e,t)=>e+t.y,0)/e.length}}function Wt(e,t,n,r){return[{x:e,y:t},{x:e+n,y:t},{x:e+n,y:t+r},{x:e,y:t+r}]}function Gt(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=Math.sqrt(i*i+a*a);if(o<.001)return null;let s=i/o,c=a/o,l=e.x+i*n,u=e.y+a*n,d=Math.min(r/2,o/2-.001);return{p1:{x:l-s*d,y:u-c*d},p2:{x:l+s*d,y:u+c*d},perp:{x:-c,y:s}}}function Kt(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function qt(e){return e.map((e,t)=>`${t===0?`M`:`L`} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(` `)+` Z`}function Jt(e,t){if(e.length<2)return[];if(t.length===0)return[e.map((e,t)=>`${t===0?`M`:`L`} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(` `)+` Z`];let n=e.length,r=[],i=[`M ${e[0].x.toFixed(2)},${e[0].y.toFixed(2)}`];for(let a=0;a<n;a++){let o=e[a],s=e[(a+1)%n],c=s.x-o.x,l=s.y-o.y,u=Math.sqrt(c*c+l*l),d=t.filter(e=>e.wallIndex===a).sort((e,t)=>e.t-t.t);if(d.length===0)i.push(`L ${s.x.toFixed(2)},${s.y.toFixed(2)}`);else{for(let e of d){let t=e.width/2,n=Math.max(0,e.t-t/u),a=Math.min(1,e.t+t/u),s={x:o.x+c*n,y:o.y+l*n},d={x:o.x+c*a,y:o.y+l*a};i.push(`L ${s.x.toFixed(2)},${s.y.toFixed(2)}`),r.push(i),i=[`M ${d.x.toFixed(2)},${d.y.toFixed(2)}`]}i.push(`L ${s.x.toFixed(2)},${s.y.toFixed(2)}`)}}return r[0]=[...i,...r[0].slice(1)],r.map(e=>e.join(` `))}function Yt(e,t,n){let r=Gt(e,t,n.t,n.width);if(!r)return``;let{p1:i,p2:a,perp:o}=r,s={x:i.x+o.x*n.width,y:i.y+o.y*n.width};return[`M ${i.x.toFixed(2)},${i.y.toFixed(2)} L ${a.x.toFixed(2)},${a.y.toFixed(2)}`,`M ${i.x.toFixed(2)},${i.y.toFixed(2)} A ${n.width},${n.width} 0 0,1 ${s.x.toFixed(2)},${s.y.toFixed(2)}`].join(` `)}function Xt(e,t){let n=1/0,r=1/0,i=-1/0,a=-1/0;for(let t of e)for(let e of t.points)e.x<n&&(n=e.x),e.y<r&&(r=e.y),e.x>i&&(i=e.x),e.y>a&&(a=e.y);isFinite(n)||(n=0,r=0,i=400,a=300);let o=[(n-5).toFixed(2),(r-5).toFixed(2),(i-n+10).toFixed(2),(a-r+10).toFixed(2)].join(` `),s=e.map(e=>{let n=t.filter(t=>t.roomId===e.id),r=Jt(e.points,n),i=qt(e.points),a=Ut(e.points),o=r.map(e=>` <path d="${e}" />`).join(`
2
- `),s=n.map(t=>{let n=e.points[t.wallIndex],r=e.points[(t.wallIndex+1)%e.points.length],i=Yt(n,r,t);return i?` <path d="${i}" fill="none" />`:``}).filter(Boolean).join(`
3
- `),c=e.name?` <text fontSize="5" x="${a.x.toFixed(1)}" y="${a.y.toFixed(1)}">${Kt(e.name)}</text>`:``;return[` <g id="${e.id}">`,o,` <path id="background" d="${i}" />`,s,c,` </g>`].filter(Boolean).join(`
1
+ 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,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,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("downshift");m=s(m,1);let h=require("@mona-health/react-input-mask");h=s(h,1);let g=require("@dnd-kit/core"),_=require("@dnd-kit/sortable"),v=require("@dnd-kit/utilities"),y=require("react-number-format");var b=function(e){return e.Default=`default`,e.Primary=`primary`,e.Plain=`plain`,e}({}),x={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`},S={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`},C={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`},w={[b.Default]:x,[b.Primary]:S,[b.Plain]:C};function T({id:e=``,title:t=``,children:n=null,expanded:r=null,onHeaderClicked:i=()=>{},styleType:a=b.Default,startOpen:o=!1,hideHeader:s=!1,className:p,style:m,classNames:h,styles:g,..._}){let v=w[a],y=(0,c.useRef)(null),[x,S]=(0,c.useState)(r??o),[C,T]=(0,c.useState)(null);(0,c.useEffect)(()=>{r!==null&&S(r)},[r]),(0,c.useEffect)(()=>{let e=y.current;if(!e)return;let t=new ResizeObserver(()=>T(e.offsetHeight));return t.observe(e),()=>t.unobserve(e)},[]);function E(){let t=!x;i(e,t),r===null&&S(t)}let D={height:`${x?32:24}px`},O={height:x?C??`auto`:`0px`};return(0,f.jsxs)(`div`,{..._,id:e||void 0,className:(0,l.default)(v.accordion,x&&v.accordionActive,p,h?.root),style:{...m,...g?.root},children:[!s&&(0,f.jsxs)(`div`,{className:(0,l.default)(v.accordionHeader,x&&v.accordionHeaderActive,h?.header),style:{...D,...g?.header},onClick:E,role:`button`,tabIndex:0,onKeyDown:({key:e})=>{e===`Enter`&&E()},children:[(0,f.jsx)(`div`,{className:(0,l.default)(v.accordionTitle,h?.title),style:g?.title,children:t}),(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronDown,className:(0,l.default)(v.accordionIcon,x&&v.accordionIconActive,h?.icon),style:g?.icon})]}),(0,f.jsx)(`div`,{className:(0,l.default)(v.accordionBody,x&&v.accordionBodyActive,h?.body),style:{...O,...g?.body},children:(0,f.jsx)(`div`,{className:(0,l.default)(v.accordionBodyInner,h?.bodyInner),style:g?.bodyInner,ref:y,children:n})})]})}var E={actionButtons:`actionButtons_7GybR`,"actionButtons-margin":`actionButtons-margin_-XoFP`,actionButtonsMargin:`actionButtons-margin_-XoFP`},D={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-small-background":`button-size-small-background_KILXc`,buttonSizeSmallBackground:`button-size-small-background_KILXc`,"button-size-medium":`button-size-medium_gNVDM`,buttonSizeMedium:`button-size-medium_gNVDM`,"button-size-large":`button-size-large_xSIcS`,buttonSizeLarge:`button-size-large_xSIcS`},O={"spinner-loading":`spinner-loading_qbxX-`,spinnerLoading:`spinner-loading_qbxX-`,"animate-spinner":`animate-spinner_6HoVF`,animateSpinner:`animate-spinner_6HoVF`,spin:`spin_axdh6`};function k({className:e}){return(0,f.jsx)(`svg`,{"data-testid":`spinner`,className:(0,l.default)(O.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`})})}k.defaultProps={className:void 0};var A=k,j=function(e){return e.Primary=`primary`,e.Default=`default`,e.Delete=`delete`,e}({}),ee=function(e){return e.Default=`default`,e.Small=`small`,e.Medium=`medium`,e.Large=`large`,e}({}),M=function(e){return e.Button=`button`,e.Reset=`reset`,e.Submit=`submit`,e}({}),te={ripple:`ripple_TsvyF`,"ripple-container":`ripple-container_QzHdC`,rippleContainer:`ripple-container_QzHdC`},N=(0,c.forwardRef)(function({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,...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(te.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)(u,()=>({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=e=>p.current?.(e);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:te.rippleContainer,ref:d,style:{overflow:i?`hidden`:`visible`,...g}}):(0,f.jsxs)(`div`,{...l,className:n,onClick:s?void 0:e=>h(e),style:{position:`relative`,overflow:i?`hidden`:`visible`,...r},children:[t,(0,f.jsx)(`div`,{className:te.rippleContainer,ref:d,style:g})]})}),ne={default:D.buttonStyleDefault,primary:D.buttonStylePrimary,delete:D.buttonStyleDelete},re={default:D.buttonSizeDefault,small:D.buttonSizeSmall,medium:D.buttonSizeMedium,large:D.buttonSizeLarge};function P({className:e,style:t,type:n=M.Button,styleType:r=j.Default,size:i=ee.Default,onClick:a=()=>{},children:o,icon:s,isLoading:c=!1,disabled:d=!1,title:p=void 0,ref:m,classNames:h,styles:g,..._}){return(0,f.jsx)(`button`,{..._,className:(0,l.default)(D.button,ne[r],re[i],{[D.buttonNotAllowed]:c||d},e),style:t,type:n,onClick:a,disabled:d||c,title:p,ref:m,children:(0,f.jsx)(N,{disabled:c||d,children:(0,f.jsx)(`div`,{className:(0,l.default)(D.buttonBackground,h?.background),style:g?.background,children:(0,f.jsxs)(`div`,{className:(0,l.default)(D.buttonContent,h?.content),style:g?.content,children:[c?(0,f.jsx)(`div`,{className:(0,l.default)(D.buttonLoadingContainer,h?.loadingContainer),style:g?.loadingContainer,children:(0,f.jsx)(A,{className:D.buttonLoadingIcon})}):null,(0,f.jsxs)(`div`,{className:(0,l.default)(h?.label,{[D.buttonLoading]:c,[D.buttonWithIcon]:!!s}),style:g?.label,children:[s?(0,f.jsx)(u.FontAwesomeIcon,{icon:s}):null,o]})]})})})})}P.StyleType=j,P.Size=ee,P.Type=M;function ie({onSubmit:e=()=>null,onClose:t=()=>null,submitLabel:n=`Save`,cancelLabel:r=`Cancel`,submitButtonStyle:i=j.Primary,isSubmitButtonLoading:a=!1,isSubmitButtonDisabled:o=!1,isCancelButtonLoading:s=!1,isCancelButtonDisabled:c=!1,hidePrimaryButton:u=!1,hideSecondaryButton:d=!1,noMargin:p=!1,className:m,style:h,classNames:g,styles:_,...v}){return(0,f.jsxs)(`div`,{...v,className:(0,l.default)(E.actionButtons,!p&&E.actionButtonsMargin,m,g?.root),style:{...h,..._?.root},children:[!u&&(0,f.jsx)(P,{isLoading:a,disabled:o,styleType:i,type:M.Submit,onClick:e,className:g?.submitButton,style:_?.submitButton,children:n}),!d&&(0,f.jsx)(P,{isLoading:s,disabled:c,onClick:t,styleType:j.Default,className:g?.cancelButton,style:_?.cancelButton,children:r})]})}var ae={interactableDiv:`interactableDiv_Ej8Fi`},F=c.default.forwardRef(({className:e,children:t,onClick:n,onKeyDown:r,tabIndex:i=0,title:a,...o},s)=>{let u=(0,c.useCallback)(e=>{e.key===`Enter`&&n?.(e),r?.(e)},[n,r]);return(0,f.jsx)(`div`,{className:(0,l.default)(ae.interactableDiv,e),onClick:n,tabIndex:i??0,role:`button`,onKeyDown:u,ref:s,title:a,...o,children:t})});F.displayName=`InteractableDiv`;var I=F,L={actionIcon:`actionIcon_ganSq`};function R({icon:e,className:t=``,style:n,title:r=``,onClick:i=()=>{},classNames:a,styles:o,...s}){return(0,f.jsx)(I,{...s,className:(0,l.default)(L.actionIcon,t,a?.root),style:{...n,...o?.root},title:r,onClick:i,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:e,className:a?.icon,style:o?.icon})})}function z({children:e=null}){let t=document.getElementById(`bodyEnd`);return t?(0,p.createPortal)(e,t):(typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.error(`[BodyEnd] No element with id="bodyEnd" found. Add <div id="bodyEnd"></div> to your app root.`),null)}var B={card:`card_w-6Ki`,"card-padding":`card-padding_X2-q-`,cardPadding:`card-padding_X2-q-`,"card-shadow":`card-shadow_xCSZ9`,cardShadow:`card-shadow_xCSZ9`,"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-titles":`cardHeader-titles_CAUU3`,cardHeaderTitles:`cardHeader-titles_CAUU3`,"cardHeader-titles-main":`cardHeader-titles-main_Z834V`,cardHeaderTitlesMain:`cardHeader-titles-main_Z834V`,"cardHeader-titles-sub":`cardHeader-titles-sub_2X08b`,cardHeaderTitlesSub:`cardHeader-titles-sub_2X08b`,cardMedia:`cardMedia_GZJQF`,cardActions:`cardActions_uYu-0`};function oe({className:e=void 0,children:t=null,onClick:n=void 0,tabIndex:r=null,hoverEffect:i=void 0,style:a=void 0,...o}){let s=!!n;return(0,f.jsx)(I,{...o,className:(0,l.default)(B.card,B.cardPadding,B.cardShadow,s&&B.cardInteractable,(s&&i!==!1||i)&&B.cardHover,e),onClick:n,tabIndex:r??(s?0:null),style:a,children:(0,f.jsx)(N,{disabled:!s,overflowHidden:!1,children:t})})}function se({className:e=``,title:t=``,subTitle:n=``,thumbnail:r=``}){let i=typeof r==`string`&&r.startsWith(`http`)?r:void 0;return(0,f.jsxs)(`div`,{className:(0,l.default)(B.cardHeader,e),children:[r&&(0,f.jsx)(`div`,{className:B.cardHeaderThumbnail,style:i?{backgroundImage:`url(${i})`}:{},children:!i&&r}),(0,f.jsxs)(`div`,{className:B.cardHeaderTitles,children:[(0,f.jsx)(`div`,{className:B.cardHeaderTitlesMain,children:t}),(0,f.jsx)(`div`,{className:B.cardHeaderTitlesSub,children:n})]})]})}function ce({src:e=``,alt:t=``}){return(0,f.jsx)(`img`,{className:B.cardMedia,src:e,alt:t})}function le({children:e=null}){return(0,f.jsx)(f.Fragment,{children:e})}function V({className:e=``,actions:t=[],children:n=null}){return(0,f.jsxs)(`div`,{className:(0,l.default)(B.cardActions,e),children:[t.map(({id:e,onClick:t,label:n,styleType:r=j.Default})=>(0,f.jsx)(`div`,{children:(0,f.jsx)(P,{onClick:t,styleType:r,children:n})},e??n)),n]})}var H={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-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 U({label:e=``,selected:t=!1,onToggle:n=()=>{},className:r=``,style:i,disabled:a=!1,lineHeight:o=``,title:s=``,tabIndex:u=0,cursorDefault:d=!1,width:p=`17px`,height:m=`17px`,formValidator:h=null,children:g=null,background:_=null,isLoading:v=!1,classNames:y,styles:b,...x}){let S=(0,c.useRef)(null),[,C]=(0,c.useState)(0);(0,c.useEffect)(()=>{if(!h)return;let e=()=>C(e=>e+1);return h.registerOnUpdateListener(e),()=>h.removeOnUpdateListener(e)},[h]);function w(e){a||v||(S.current?.addRipple(),h&&h.set(!h.value),n(!t,e))}let T=h?h.value:t;return(0,f.jsxs)(`div`,{...x,className:(0,l.default)(H.checkbox,{[H.checkboxDisabled]:a,[H.checkboxPointer]:!d},r),style:i,onClick:w,onKeyPress:e=>{e.key===`Enter`&&w(e)},role:`checkbox`,"aria-checked":T,tabIndex:u,children:[(0,f.jsx)(`div`,{title:s,className:(0,l.default)(H.checkboxIcon,v?H.checkboxLoading:null,y?.icon),style:b?.icon,children:v?(0,f.jsx)(`div`,{style:{width:p,height:m},children:(0,f.jsx)(A,{className:H.checkboxLoadingSpinner})}):(0,f.jsxs)(`div`,{style:{width:p,height:m,...b?.checkmark},className:(0,l.default)(H.checkboxCheckmark,T&&H.checkboxCheckmarkChecked,y?.checkmark),children:[(0,f.jsx)(N,{ref:S,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`,width:`calc(${p} + 1px)`,height:`calc(${m} + 1px)`,..._?{style:{background:_}}:{},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:y?.label,style:{lineHeight:o||`100%`,...b?.label},children:g||e})]})}var W={chip:`chip_rCTMl`,"chip-clickable":`chip-clickable_WTVjG`,chipClickable:`chip-clickable_WTVjG`,"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`};function ue({className:e=``,thumbnail:t=``,text:n=``,showRemoveIcon:r=!1,onClick:i,onRemove:a,...o}){let s=(0,c.useMemo)(()=>{if(typeof t==`string`&&t.startsWith(`http`))return t},[t]);return(0,f.jsx)(`div`,{...o,className:(0,l.default)(W.chip,i&&W.chipClickable,e),onClick:i,children:(0,f.jsx)(N,{disabled:!i,style:{borderRadius:`inherit`},children:(0,f.jsxs)(`div`,{className:W.chipInner,children:[t&&(0,f.jsx)(`div`,{className:W.chipThumbnail,style:s?{backgroundImage:`url(${s})`}:{},children:!s&&t}),(0,f.jsx)(`div`,{className:W.chipText,children:n}),r&&(0,f.jsx)(R,{icon:d.faXmarkCircle,onClick:e=>{e.stopPropagation(),a?.()}})]})})})}function de({className:e=void 0,children:t=null,inline:n=!1,...r}){return(0,f.jsx)(`div`,{...r,className:(0,l.default)(W.chipContainer,n&&W.chipContainerInline,e),children:t})}var G={floatingMenu:`floatingMenu_E1XCy`,"floatingMenu-content":`floatingMenu-content_AmxkA`,floatingMenuContent:`floatingMenu-content_AmxkA`,"floatingMenu-container":`floatingMenu-container_w7k-Y`,floatingMenuContainer:`floatingMenu-container_w7k-Y`,"floatingMenu-container-align-left":`floatingMenu-container-align-left_InKnZ`,floatingMenuContainerAlignLeft:`floatingMenu-container-align-left_InKnZ`,"floatingMenu-container-align-right":`floatingMenu-container-align-right_a9OoS`,floatingMenuContainerAlignRight:`floatingMenu-container-align-right_a9OoS`,"floatingMenu-container-align-center":`floatingMenu-container-align-center_-8bGT`,floatingMenuContainerAlignCenter:`floatingMenu-container-align-center_-8bGT`,"floatingMenu-container-flag":`floatingMenu-container-flag_VdKHr`,floatingMenuContainerFlag:`floatingMenu-container-flag_VdKHr`,"floatingMenu-container-flag-align-right":`floatingMenu-container-flag-align-right_vxrRN`,floatingMenuContainerFlagAlignRight:`floatingMenu-container-flag-align-right_vxrRN`,"floatingMenu-container-flag-align-left":`floatingMenu-container-flag-align-left_a2Vv-`,floatingMenuContainerFlagAlignLeft:`floatingMenu-container-flag-align-left_a2Vv-`,"floatingMenu-container-flag-align-center":`floatingMenu-container-flag-align-center_SmaaY`,floatingMenuContainerFlagAlignCenter:`floatingMenu-container-flag-align-center_SmaaY`,"floatingMenu-anim":`floatingMenu-anim_5KB-f`,floatingMenuAnim:`floatingMenu-anim_5KB-f`,showMenu:`showMenu_AprCh`},fe=function(e){return e.Left=`left`,e.Right=`right`,e.Center=`center`,e}({});function pe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function me({align:e=fe.Left,children:t=null,content:n=null,isOpen:r=!1,onOpenChange:i=()=>{},dontCloseOnChildClick:a=!1,className:o,style:s,classNames:u,styles:d,...p}){let m=(0,c.useRef)(null),h=(0,c.useRef)(null),g=(0,c.useRef)(i),[_,v]=(0,c.useState)(10),[y,b]=(0,c.useState)(null);(0,c.useEffect)(()=>{g.current=i});function x(){if(!r){let e=h.current?.getBoundingClientRect();v(e?.width??10),b(e?{top:e.bottom,left:e.left}:null),i(!0)}}return(0,c.useEffect)(()=>{if(!r)return;function e(){let e=h.current?.getBoundingClientRect();e&&b({top:e.bottom,left:e.left})}return window.addEventListener(`scroll`,e,!0),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`scroll`,e,!0),window.removeEventListener(`resize`,e)}},[r]),(0,c.useEffect)(()=>{if(!r)return;function e(e){let t=m.current,n=h.current;if(!t||!n)return;let r=t===e.target||t.contains(e.target),i=a&&(n===e.target||n.contains(e.target));!r&&!i&&setTimeout(()=>g.current(!1),1)}return window.addEventListener(`mouseup`,e),()=>window.removeEventListener(`mouseup`,e)},[r,a]),(0,f.jsxs)(`div`,{...p,className:(0,l.default)(G.floatingMenu,o,u?.root),style:{...s,...d?.root},children:[(0,f.jsx)(`div`,{className:(0,l.default)(G.floatingMenuContent,u?.trigger),style:d?.trigger,ref:h,onClick:x,children:t}),r&&(0,f.jsxs)(`div`,{className:(0,l.default)(G.floatingMenuAnim,u?.menu),style:{width:`${_}px`,...y&&{top:y.top,left:y.left},...d?.menu},children:[(0,f.jsx)(`div`,{className:(0,l.default)(G.floatingMenuContainerFlag,G[`floatingMenuContainerFlagAlign${pe(e)}`])}),(0,f.jsx)(`div`,{ref:m,className:(0,l.default)(G.floatingMenuContainer,G[`floatingMenuContainerAlign${pe(e)}`],u?.menuContainer),style:d?.menuContainer,children:n})]})]})}var he={tooltipBubble:`tooltipBubble_uyev0`,tooltipDetails:`tooltipDetails_R7N16`,"tooltipDetails-icon":`tooltipDetails-icon_rsjns`,tooltipDetailsIcon:`tooltipDetails-icon_rsjns`,tooltipError:`tooltipError_gUBut`};function ge({variant:e,message:t=``,isVisible:n=!0,tooltipPosition:r,onClick:i}){let[a,o]=(0,c.useState)(!1);return e===`info`?n?(0,f.jsx)(`div`,{className:(0,l.default)(he.tooltipBubble,r),onClick:i,children:t}):null:e===`details`?(0,f.jsxs)(`div`,{className:he.tooltipDetails,children:[(0,f.jsx)(`span`,{className:he.tooltipDetailsIcon,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:`?`}),a&&(0,f.jsx)(`div`,{className:(0,l.default)(he.tooltipBubble,r),children:t})]}):e===`error`&&n?(0,f.jsx)(`div`,{className:(0,l.default)(he.tooltipError,r),onClick:i,children:t}):null}var K={"required-mark":`required-mark_xGJdX`,requiredMark:`required-mark_xGJdX`,isRequired:`isRequired_Jkn3h`,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-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`,"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-field":`input-field-field_u6UjZ`,inputFieldField:`input-field-field_u6UjZ`,"input-field-field-default":`input-field-field-default_huHVO`,inputFieldFieldDefault:`input-field-field-default_huHVO`,"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-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`},q=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}({});function _e({name:e=``,label:t=``,errorMessage:n=``,isValid:r=!0,className:i=``,style:a,value:o=``,icon:s=null,onChange:p=()=>{},onFocus:m=null,onBlur:h=null,onMouseEnter:g=null,onMouseLeave:_=null,isUppercase:v=!1,isRequired:y=!1,tabIndex:b=0,type:x=void 0,isRow:S=!1,onIconClick:C=null,parse:w=null,formValidator:T=null,autoFocus:E=!1,suffix:D=null,upperRightLabel:O=null,labelInBorder:k=!1,showCancel:A=!1,onClearClicked:j,min:ee=null,max:M=null,placeholder:te=``,useMatLabelStyle:N=!0,autoComplete:ne=null,onClick:re=()=>null,readOnly:P=!1,customInput:ie,alwaysShowCancel:ae=!1,multiline:F=!1,rows:I,autoResize:L=!1,classNames:R,styles:z}){let[B,oe]=(0,c.useState)(!1),[se,ce]=(0,c.useState)(!1),[le,V]=(0,c.useState)(!1),[,H]=(0,c.useState)(0),U=(0,c.useRef)(null),W=(0,c.useRef)(T),ue=(0,c.useCallback)(()=>{let e=U.current;!e||!L||(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[L]);(0,c.useEffect)(()=>{setTimeout(()=>{oe(!1),ce(!1)},1),ue()},[]),(0,c.useEffect)(()=>{E&&U.current&&setTimeout(()=>{U.current?.focus()},1)},[E]),(0,c.useEffect)(()=>{W.current=T;let e=W.current;if(!e)return;e.label=t??``,e.validate();let n=()=>H(e=>e+1);return e.registerOnUpdateListener(n),()=>{e.removeOnUpdateListener(n)}},[T,t]);let de=()=>T?T.touched&&T.hasError():!r||!!n,G=()=>!!(y||T&&T.validators.find(e=>e.validatorId===`required`)),fe=e=>{ce(!0),g&&g(e)},pe=e=>{ce(!1),_&&_(e)},me=e=>{oe(!0),m&&m(e)},he=e=>{W.current&&(W.current.touched=!0),oe(!1),h&&h(e)},_e=e=>{let t,n;typeof e==`string`?n=e:(t=e,n=e.target.value),w&&(n=w(n)),T&&T.set(n),p&&p(n,t),ue()},J=()=>{if(x!==`email`)return x===`password`&&le?`text`:x},ve=x&&x!==q.Date&&x!==q.Iban&&x!==q.HasNoIcon,ye=ve&&!N&&(x===q.Email||x===q.Phone||x===q.Search),be={className:(0,l.default)(K.inputFieldIcon,{[K.inputFieldIconNotClickable]:!C,[K.inputFieldIconLeft]:ye}),onClick:C??void 0},xe={className:(0,l.default)(K.inputFieldIcon,K.inputFieldIconPassword),onClick:()=>V(!le)},Se=de(),Ce=t;Ce&&G()&&(Ce=`${Ce} *`);let we=T?T.value:o,Te=N&&(B||we||x===q.Date);return(0,f.jsxs)(`div`,{className:(0,l.default)(K.input,i),style:a,children:[(0,f.jsxs)(`label`,{htmlFor:e,className:(0,l.default)(K.inputLabel,R?.label,{[K.inputLabelColumn]:!S,[K.inputLabelInBorder]:k}),style:z?.label,children:[Ce&&!N?(0,f.jsxs)(`span`,{className:K.inputLabelText,children:[`${Ce} `,G()?(0,f.jsx)(`span`,{className:(0,l.default)(K.isRequired),children:`\xA0 *`}):null]}):null,O&&(0,f.jsx)(`div`,{className:(0,l.default)(K.inputUpperRightLabel,R?.upperRightLabel),style:z?.upperRightLabel,children:O}),(0,f.jsxs)(`div`,{className:(0,l.default)(K.inputContainer,{[K.inputContainerMultiline]:F},R?.container),style:z?.container,onMouseEnter:fe,onMouseLeave:pe,children:[s,c.default.cloneElement(ie||(F?(0,f.jsx)(`textarea`,{}):(0,f.jsx)(`input`,{})),{className:(0,l.default)(K.inputField,{[K.inputFieldUppercase]:v,[K.inputFieldDate]:x===q.Date,[K.inputFieldDefault]:x!==q.Date,[K.inputFieldWithIcon]:ve,[K.inputFieldWithIconLeft]:ye,[K.inputFieldMultiline]:F,[K.inputFieldMultilineAutoResize]:F&&L},R?.input),name:e,id:e,value:T?T.value:o,tabIndex:b,ref:ie?void 0:U,onChange:_e,onFocus:me,onBlur:he,placeholder:N?``:te,autoComplete:ne,onClick:re,readOnly:P,...!F&&{type:J(),min:ee,max:M},...F&&I!==void 0&&{rows:I}}),D&&(0,f.jsx)(`div`,{className:(0,l.default)(K.inputFieldSuffix,R?.suffix),style:z?.suffix,children:D})]}),(0,f.jsx)(`fieldset`,{className:(0,l.default)(K.inputFieldset,R?.fieldset,{[K.inputContainerBorderFocused]:B,[K.inputContainerBorderSearchFocused]:x===q.Search&&(B||o),[K.inputContainerBorderInvalid]:Se,[K.inputContainerBorderError]:Se}),style:z?.fieldset,children:(0,f.jsx)(`legend`,{className:(0,l.default)(K.inputFieldsetLegend,{[K.inputFieldsetLegendActive]:Te}),children:(0,f.jsx)(`span`,{children:Ce})})}),N&&t&&(0,f.jsx)(`div`,{className:(0,l.default)(K.inputMatLabel,{[K.inputMatLabelFloating]:Te,[K.inputMatLabelMultiline]:F&&!Te}),children:Ce}),N&&te&&(0,f.jsx)(`div`,{className:(0,l.default)(K.inputPlaceholder,B&&!we&&K.inputPlaceholderShown,F&&K.inputPlaceholderMultiline),children:te}),(0,f.jsx)(ge,{variant:`error`,message:T?T.getCurrentErrorMessage():n||``,isVisible:Se&&(B||se)})]}),x===q.Phone&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faPhone,...be}),x===q.Email&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faEnvelope,...be}),x===q.Edit&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faPen,...be}),x===q.Search&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faSearch,...be}),x===q.Password&&(0,f.jsx)(u.FontAwesomeIcon,{icon:le?d.faEyeSlash:d.faEye,...xe}),(A&&o&&(B||se)||ae)&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faXmark,className:K.inputFieldIcon,onClick:j??void 0,onMouseEnter:()=>ce(!0),onMouseLeave:()=>ce(!1)})]})}var J={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`,hexInput:`hexInput_zQw4s`};function ve(e){return/^#[0-9a-fA-F]{6}$/.test(e)||/^#[0-9a-fA-F]{8}$/.test(e)}function ye(e){return/^#[0-9a-fA-F]{8}$/.test(e)?{hex6:e.slice(0,7),alpha:Math.round(parseInt(e.slice(7,9),16)/255*100)}:{hex6:e.slice(0,7),alpha:100}}function be(e,t,n){return!n||t>=100?e:`${e}${Math.round(t/100*255).toString(16).padStart(2,`0`)}`}function xe(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 Se(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=Math.round(o*60),o<0&&(o+=360));let s=i===0?0:Math.round(a/i*100),c=Math.round(i*100);return{h:o,s,v:c}}function Ce(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 we({hex:e,onChange:t,useInputComponent:n=!1}){let[r,i]=(0,c.useState)(e);(0,c.useEffect)(()=>{i(e)},[e]);function a(e){i(e);let n=e.startsWith(`#`)?e:`#${e}`;ve(n)&&t(n)}function o(){ve(r.startsWith(`#`)?r:`#${r}`)||i(e)}return n?(0,f.jsx)(_e,{value:r,onChange:e=>a(e),onBlur:o}):(0,f.jsx)(`input`,{type:`text`,value:r,onChange:e=>a(e.target.value),onBlur:o,className:J.hexInput,spellCheck:!1})}function Te({hue:e,sat:t,val:n,alpha:r,onHueChange:i,onSVChange:a,onAlphaChange:o,showInput:s=!0,showAlpha:l=!1}){let u=(0,c.useRef)(null);function d(e){let t=u.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 p(e){let{s:t,v:n}=d(e.nativeEvent);a(t,n);let r=e=>{let{s:t,v:n}=d(e);a(t,n)},i=()=>{window.removeEventListener(`mousemove`,r),window.removeEventListener(`mouseup`,i)};window.addEventListener(`mousemove`,r),window.addEventListener(`mouseup`,i)}function m(e){let{hex6:t,alpha:n}=ye(e),{h:r,s,v:c}=Se(t);i(r),a(s,c),l&&o(n)}let h=Ce(e,t,n),g=l?be(h,r,!0):h;return(0,f.jsxs)(`div`,{className:J.panel,children:[(0,f.jsxs)(`div`,{ref:u,className:J.gradientArea,style:{"--hue":e},onMouseDown:p,children:[(0,f.jsx)(`div`,{className:J.gradientOverlay}),(0,f.jsx)(`div`,{className:J.cursor,style:{left:`${t}%`,top:`${100-n}%`}})]}),(0,f.jsx)(`input`,{type:`range`,min:0,max:359,value:e,onChange:e=>i(Number(e.target.value)),className:J.hueSlider}),l&&(0,f.jsx)(`input`,{type:`range`,min:0,max:100,value:r,onChange:e=>o(Number(e.target.value)),className:J.alphaSlider,style:{"--alpha-color":h}}),s&&(0,f.jsx)(we,{hex:g,onChange:m})]})}var Ee=`#3b82f6`;function De({className:e,value:t=Ee,onChange:n,showInput:r=!1,showAlpha:i=!1,inline:a=!1,...o}){let[s,u]=(0,c.useState)(!1),{hex6:d,alpha:p}=ye(ve(t)?t:Ee),m=Se(d),[h,g]=(0,c.useState)({h:m.h,s:m.s,v:m.v,a:p}),_=(0,c.useRef)(h),[v,y]=(0,c.useState)(t);if(t!==v){y(t);let{hex6:e,alpha:n}=ye(ve(t)?t:Ee);if(e!==Ce(h.h,h.s,h.v)||n!==h.a){let t=Se(e);g({h:t.h,s:t.s,v:t.v,a:n})}}let{h:b,s:x,v:S,a:C}=h;function w(e,t,r,a){n?.(be(Ce(e,t,r),a,i))}function T(e){_.current.h=e,g(t=>({...t,h:e})),w(e,_.current.s,_.current.v,_.current.a)}function E(e,t){_.current.s=e,_.current.v=t,g(n=>({...n,s:e,v:t})),w(_.current.h,e,t,_.current.a)}function D(e){_.current.a=e,g(t=>({...t,a:e})),w(_.current.h,_.current.s,_.current.v,e)}let O=Ce(b,x,S),k=i?xe(O,C):O,A=be(O,C,i),j={hue:b,sat:x,val:S,alpha:C,onHueChange:T,onSVChange:E,onAlphaChange:D,showAlpha:i};return a?(0,f.jsx)(`div`,{...o,className:(0,l.default)(J.colorPicker,e),children:(0,f.jsx)(Te,{...j,showInput:r})}):(0,f.jsxs)(`div`,{...o,className:(0,l.default)(J.colorPicker,e),children:[(0,f.jsx)(me,{isOpen:s,onOpenChange:u,dontCloseOnChildClick:!0,align:fe.Left,content:(0,f.jsx)(Te,{...j}),children:(0,f.jsxs)(I,{className:J.swatch,children:[(0,f.jsx)(`div`,{className:J.swatchFill,style:{background:k}}),(0,f.jsx)(`span`,{className:J.swatchHex,children:A})]})}),r&&(0,f.jsx)(we,{hex:A,onChange:e=>n?.(e),useInputComponent:!0})]})}var Oe={modal:`modal_L-Fkd`,slideIn:`slideIn_RVIHR`,fadeIn:`fadeIn_XSuIE`,"modal-container":`modal-container_qwKIm`,modalContainer:`modal-container_qwKIm`,"modal-header":`modal-header_DhsRr`,modalHeader:`modal-header_DhsRr`,"modal-wrapper":`modal-wrapper_r5wzq`,modalWrapper:`modal-wrapper_r5wzq`,"modal-wrapper-shown":`modal-wrapper-shown_F0BgK`,modalWrapperShown:`modal-wrapper-shown_F0BgK`};function ke({children:e=null,title:t=``,isOpen:n=!1,onClose:r=()=>null,className:i=``,style:a,hideHeader:o=!1,classNames:s,styles:p}){let[m,h]=(0,c.useState)(n),[g,_]=(0,c.useState)(n);return(0,c.useEffect)(()=>{n?(h(n),setTimeout(()=>_(!0),1)):(_(!1),setTimeout(()=>h(n),300))},[n]),m?(0,f.jsx)(z,{children:(0,f.jsxs)(`div`,{className:(0,l.default)(Oe.modalContainer,s?.container),style:p?.container,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Oe.modalWrapper,g&&Oe.modalWrapperShown,s?.backdrop),style:p?.backdrop,onClick:r}),g&&(0,f.jsxs)(`div`,{className:(0,l.default)(Oe.modal,g&&Oe.modalShown,i,s?.modal),style:{...a,...p?.modal},onClick:e=>e.stopPropagation(),children:[!o&&(0,f.jsxs)(`div`,{className:(0,l.default)(Oe.modalHeader,s?.header),style:p?.header,children:[(0,f.jsx)(`div`,{className:s?.title,style:p?.title,children:t}),(0,f.jsx)(u.FontAwesomeIcon,{onClick:r,icon:d.faXmark,className:s?.closeButton,style:p?.closeButton})]}),e]})]})}):null}function Ae({children:e=null,className:t=``,onClose:n=()=>{},onConfirm:r=()=>{},title:i=``,content:a=null,isOpen:o=void 0}){let[s,l]=(0,c.useState)(!1),[u,d]=(0,c.useState)(!1);function p(e=!1){l(!1),n(e)}async function m(){d(!0);try{await r(),p(!0)}finally{d(!1)}}return(0,f.jsxs)(`div`,{className:t,children:[(0,f.jsx)(`span`,{onClick:()=>l(!0),children:e}),(0,f.jsxs)(ke,{title:i,isOpen:o===void 0?s:o,onClose:()=>p(),children:[a,(0,f.jsx)(ie,{onClose:()=>p(),onSubmit:m,submitLabel:`Confirm`,isSubmitButtonLoading:u})]})]})}var je={"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`},Me=[`de_AT`,`de_CH`,`de_DE`,`en_US`,`en_GB`,`de`,`en`],Ne=`en_US`,Pe=()=>{let e=navigator.languages[0]?.replace(`-`,`_`)||Ne;return Me.includes(e)?e===`en_GB`||e===`en`?`en_US`:e===`de`?`de_DE`:e:Ne},Fe=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`}},Ie=Pe();async function Le(e){Ie=e}function Re(e=`_`){return Ie.replace(`_`,e)}function ze(e,t){return new Date(t,e,0).getDate()}function Be(e,t,n){return new Date(Date.UTC(n,t-1,e))}function Ve(e,t,n,r,i=!1){return new Date(Date.UTC(t,n-1,r)).toLocaleDateString(e,{month:i?`short`:`long`})}function He(e=Re(`-`)){return Array.from(Array(12).keys()).map(t=>Ve(e,2023,t+1,1))}function Ue(e,t=!0){let n=new Date(Date.UTC(2023,3,10)),r=[];for(let i=0;i<7;i++)r.push(n.toLocaleDateString(e,{weekday:t?`short`:`long`})),n.setDate(n.getDate()+1);return r}function We(e,t){return new Date(Date.UTC(t,e-1,1)).getDay()||7}function Ge(e){return{day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()}}function Ke(e){let t=e.getDate(),n=e.getMonth()+1,r=e.getFullYear();return`${t<10?`0${t}`:t}.${n<10?`0${n}`:n}.${r}`}function qe(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 Je(e,t,n,r,i){let{day:a,month:o,year:s}=r?Ge(r):{day:void 0,month:void 0,year:void 0},{day:c,month:l,year:u}=i?Ge(i):{day:void 0,month:void 0,year:void 0},d=Be(e,t,n),f=e===a&&t===o&&n===s,p=e===c&&t===l&&n===u,m=!1;if(a!==void 0&&o!==void 0&&s!==void 0&&c!==void 0&&l!==void 0&&u!==void 0){let e=Be(a,o,s),t=Be(c,l,u);m=d.getTime()>=e.getTime()&&d.getTime()<=t.getTime()}return{isStartDate:f,isInRange:m,isEndDate:p}}function Ye(e,t,n,r,i){let a=Be(e,t,n);if(r){let{day:e,month:t,year:n}=Ge(r);if(a<Be(e,t,n))return!0}if(i){let{day:e,month:t,year:n}=Ge(i);if(a>Be(e,t,n))return!0}return!1}function Xe(e,t,n){let{day:r,month:i,year:a}=Ge(new Date);return e===r&&t===i&&n===a}function Ze({className:e=``,month:t=new Date().getMonth()+1,year:n=new Date().getFullYear(),onSelect:r=()=>null,selectionStart:i,selectionEnd:a,minDate:o=null,maxDate:s=null}){let c=Re(`-`),u=ze(t,n),d=We(t,n);return(0,f.jsx)(`div`,{className:(0,l.default)(je.datePickerMonth,e),children:(0,f.jsxs)(`div`,{className:(0,l.default)(je.datePickerMonthContent),children:[Ue(c).map((e,t)=>(0,f.jsx)(`div`,{children:e},t)),Array.from(Array(d-1).keys()).map(e=>(0,f.jsx)(`div`,{className:(0,l.default)(je.datePickerMonthItem,je.datePickerMonthPlaceholder)},e)),Array.from(Array(u).keys()).map(e=>{let c=e+1,u=Je(c,t,n,i,a),d=Ye(c,t,n,o,s),p=Xe(c,t,n);return(0,f.jsx)(I,{onClick:()=>d?null:r(Be(c,t,n)),className:(0,l.default)(je.datePickerMonthDay,je.datePickerMonthItem,{[je.datePickerMonthDaySelected]:u.isInRange,[je.datePickerMonthDaySelectedStart]:u.isStartDate,[je.datePickerMonthDaySelectedEnd]:u.isEndDate,[je.datePickerMonthDayDisabled]:d,[je.datePickerMonthDayToday]:p}),children:c},c)}),Array.from(Array(42-(d+u-1)).keys()).map(e=>(0,f.jsx)(`div`,{className:(0,l.default)(je.datePickerMonthItem,je.datePickerMonthPlaceholder),children:`\xA0`},e))]})})}var Qe={infiniteBlock:`infiniteBlock_dFv-h`,"spinner-wrapper":`spinner-wrapper_hsgWz`,spinnerWrapper:`spinner-wrapper_hsgWz`,spinner:`spinner_VjUS2`};function $e(e,t){let n=e;for(;n.props.children!==null&&typeof n.props.children==`object`&&!Array.isArray(n.props.children);)n=n.props.children;let r=n.props.children;if(Array.isArray(r)){let e=r;if(!e[0]?.props?.children){for(let n of e)if(typeof n==`string`&&n.trim().length>0)return n.toLowerCase().startsWith(t)}return String(e[0].props.children).toLowerCase().startsWith(t)}return String(r).toLowerCase().startsWith(t)}function et(e,t,n){let r=e+t;return r===n?0:r<-1?n-1:r}function tt({children:e,onScroll:t,className:n=``,isDataLoading:r=!1,setHighlightedIndex:i=()=>null}){let a=(0,c.useRef)(null),o=(0,c.useRef)(!1),[s,u]=(0,c.useState)(!1),d=(0,c.useRef)(-1),p=(0,c.useRef)(null),m=(0,c.useCallback)(()=>{let e=a.current;if(!e)return;let{scrollTop:n,offsetHeight:r,scrollHeight:i}=e;Math.abs(n+r-i)>5||o.current||(o.current=!0,u(!0),t().then(()=>{o.current=!1,u(!1)}))},[t]),h=(0,c.useCallback)(t=>{let n=a.current;if(!n)return;let r=c.default.Children.toArray(e),o=d.current;switch(t.key){case`ArrowDown`:o=et(o,1,r.length);break;case`ArrowUp`:o=et(o,-1,r.length);break;default:for(let e=0;e<r.length;e++)if($e(r[e],t.key)){if(o>=e&&p.current===t.key)continue;o=e;break}}if(d.current=o,p.current=t.key,o>=0){let e=n.children[o];if(e){let t=e.offsetTop,r=t+e.offsetHeight;t<n.scrollTop?n.scrollTop=t:r>n.scrollTop+n.clientHeight&&(n.scrollTop=r-n.clientHeight)}i(o)}},[e,i]);return(0,f.jsxs)(`div`,{className:(0,l.default)(Qe.infiniteBlock,n),onScroll:m,onKeyDown:h,tabIndex:0,ref:a,children:[r?(0,f.jsx)(`div`,{className:Qe.spinnerWrapper,children:(0,f.jsx)(A,{className:Qe.spinner})}):e,s&&(0,f.jsx)(`div`,{className:Qe.spinnerWrapper,children:(0,f.jsx)(A,{className:Qe.spinner})})]})}var Y={"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-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-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":`dropdown-input-list_JnMbA`,dropdownInputList:`dropdown-input-list_JnMbA`,"dropdown-input-list-on-top":`dropdown-input-list-on-top_RpQ9v`,dropdownInputListOnTop:`dropdown-input-list-on-top_RpQ9v`,"dropdown-input-list-wider":`dropdown-input-list-wider_0rbTN`,dropdownInputListWider:`dropdown-input-list-wider_0rbTN`,"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-hidden":`dropdown-input-list-hidden_huNc5`,dropdownInputListHidden:`dropdown-input-list-hidden_huNc5`,"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":`dropdown-border_9Oaex`,dropdownBorder:`dropdown-border_9Oaex`,"dropdown-border-focused":`dropdown-border-focused_Te-ER`,dropdownBorderFocused:`dropdown-border-focused_Te-ER`,"dropdown-border-searchFocused":`dropdown-border-searchFocused_AH67N`,dropdownBorderSearchFocused:`dropdown-border-searchFocused_AH67N`,"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`};function nt({errorMessage:e=``,className:t=``,label:n=``,value:r=``,isValid:i=!0,tabIndex:a=0,isRequired:o=!1,customProps:s={},isRow:p=!1,disabled:h=!1,onScroll:g=()=>Promise.resolve(),isListOnTop:_=!1,onClick:v,onChange:y,onFocus:b=null,onBlur:x=null,onMouseEnter:S=null,onMouseLeave:C=null,dropdownLabel:w,isDropdownListWider:T=!1,inputClassName:E=``,dropDownIconClassName:D=``,dropDownClassName:O=``,formValidator:k=null,labelClassName:A=``,dropDownInputClassName:j=``,items:ee=[],useMatLabelStyle:M=!0,placeholder:te=``,plainStyle:N=!1,scrollToSelected:ne=!1,reactRef:re}){let[P,ie]=(0,c.useState)(!1),[ae,F]=(0,c.useState)(!1),[,I]=(0,c.useState)(0),L=(0,c.useRef)(k);(0,c.useEffect)(()=>{if(L.current=k,!L.current)return;L.current.label=n??``,L.current.validate();let e=()=>I(e=>e+1);return L.current.registerOnUpdateListener(e),()=>L.current?.removeOnUpdateListener(e)},[k,n]);let R=e=>{F(!0),S?.(e)},z=e=>{F(!1),C?.(e)},B=e=>{ie(!0),b?.(e)},oe=e=>{L.current&&(L.current.touched=!0),ie(!1),x?.(e)},se=()=>k?k.touched&&k.hasError():!i||!!e,ce=()=>!!(o||k?.validators.find(e=>e.validatorId===`required`)),le=e=>{k?(k.set(e),y?.(k.value,s)):y?.(e,s)},V=w,H=k?k.value:r,U=se();return ee.forEach(e=>{e.key===H&&(V=e.label)}),(0,f.jsxs)(`div`,{className:(0,l.default)(t,Y.dropdownLabel,Y.dropdown,{[Y.dropdownLabelColumn]:!p}),onMouseEnter:R,onMouseLeave:z,children:[(0,f.jsx)(m.default,{onChange:e=>le((e||{key:``}).key),itemToString:e=>e?String(e.key):``,selectedItem:ee.find(e=>e.key===H)??null,stateReducer:(e,t)=>ne&&Object.prototype.hasOwnProperty.call(t,`isOpen`)?{...t,highlightedIndex:t.isOpen?ee.indexOf(e.selectedItem):null}:t,children:({getItemProps:e,getToggleButtonProps:t,isOpen:r,selectedItem:i,highlightedIndex:o,setHighlightedIndex:s})=>(0,f.jsx)(`div`,{children:(0,f.jsxs)(`div`,{onFocus:B,onBlur:oe,className:(0,l.default)(Y.dropdownInput,{[Y.dropdownInputPlain]:N,[Y.dropdownInputButtonDisabled]:h},j),children:[(0,f.jsx)(`button`,{tabIndex:a,type:`button`,style:T?{padding:`6px`,border:`none`}:{},className:(0,l.default)(Y.dropdownInputButton,E),...t(),onClick:e=>{t().onClick?.(e),v?.(e)},ref:re,children:V||H||(0,f.jsx)(`div`,{children:`\xA0`})}),(0,f.jsx)(`button`,{type:`button`,tabIndex:-1,className:(0,l.default)(Y.dropdownInputButtonIcon,D),...t(),onClick:e=>{t().onClick?.(e),v?.(e)},children:!h&&(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronDown,className:(0,l.default)(Y.dropdownInputButtonIconArrow,{[Y.dropdownInputButtonIconArrowOpen]:r})})}),!h&&r?(0,f.jsx)(tt,{onScroll:g,className:(0,l.default)(Y.dropdownInputList,{[Y.dropdownInputListOnTop]:_,[Y.dropdownInputListWider]:T}),setHighlightedIndex:s,children:ee.map((t,n)=>(0,f.jsx)(`div`,{...e({index:n,item:t,disabled:!!t.disabled}),className:(0,l.default)(Y.dropdownInputListItem,O,{[Y.dropdownInputListItemActive]:o===n,[Y.dropdownInputListItemSelected]:i===t}),children:t.label},t.key))}):null,(0,f.jsx)(`fieldset`,{className:(0,l.default)(Y.dropdownFieldset,{[Y.dropdownBorderPlain]:N,[Y.dropdownBorderFocused]:P,[Y.dropdownBorderInvalid]:U,[Y.dropdownBorderError]:U}),children:(0,f.jsx)(`legend`,{className:(0,l.default)(Y.dropdownFieldsetLegend,{[Y.dropdownFieldsetLegendActive]:M&&(P||H)}),children:(0,f.jsx)(`span`,{children:n})})}),M&&n&&(0,f.jsx)(`div`,{className:(0,l.default)(Y.dropdownMatLabel,{[Y.dropdownMatLabelFloating]:P||H}),children:n}),M&&te&&(0,f.jsx)(`div`,{className:(0,l.default)(Y.dropdownPlaceholder,P&&!V&&Y.dropdownPlaceholderShown),children:te})]})})}),n&&!M&&(0,f.jsxs)(`div`,{className:(0,l.default)(Y.dropdownLabelText,A),children:[n,ce()?(0,f.jsx)(`div`,{className:Y.requiredMark,children:`*`}):null]}),(0,f.jsx)(ge,{variant:`error`,message:k?k.getCurrentErrorMessage():e||``,isVisible:U&&(P||ae)})]})}var rt={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`};function it({className:e=``,selected:t,onSelect:n=()=>null,formValidator:r=null,noInput:i=!1,noHeader:a=!1,isModal:o=!1,isInline:s=!1,onChange:u=()=>null,minDate:p=null,maxDate:m=null,children:g=null,showClearButton:_=!1,label:v=``,isValid:y=!0,errorMessage:b=``,isRequired:x=!1,startDate:S,endDate:C}){let w=()=>r?r.value:t,T=w()??new Date,[E,D]=(0,c.useState)(T.getMonth()+1),[O,k]=(0,c.useState)(T.getFullYear()),[A,j]=(0,c.useState)(!1),[ee,M]=(0,c.useState)(()=>w()?Ke(T):``),[te,N]=(0,c.useState)(!1),[ne,re]=(0,c.useState)(!1),[,ie]=(0,c.useState)(0),[ae,F]=(0,c.useState)(t),I=(0,c.useRef)(r);if(ae!==t){F(t);let e=t??new Date;D(e.getMonth()+1),k(e.getFullYear()),M(t?Ke(t):``)}(0,c.useEffect)(()=>{if(I.current=r,!r)return;let e=()=>{let e=r.value;e?(D(e.getMonth()+1),k(e.getFullYear()),M(Ke(e))):M(``),ie(e=>e+1)};return r.registerOnUpdateListener(e),()=>r.removeOnUpdateListener(e)},[r]);let L=()=>r?r.touched&&r.hasError():!y||!!b,z=()=>!!(x||r?.validators.find(e=>e.validatorId===`required`)),B=e=>{M(e?Ke(e):``),r&&r.set(e),u(e)},oe=e=>{B(e),n(e),j(!1)},se=e=>{D(t=>{let n=t+e;return n<1?(n=12,k(e=>e-1)):n>12&&(n=1,k(e=>e+1)),n})},ce=e=>{if(e.match(/\d{2}\.\d{2}\.\d{4}/gi)){let[t,n,r]=e.split(`.`),i=Be(Number(t),Number(n),Number(r));if(i&&i.toString()!==`Invalid Date`&&(!m||i<=m)&&(!p||i>=p))return i}return null},le=({previousState:e,nextState:t})=>{if(!e||t.value===e.value)return t;let n=qe(t.value,e.value,t.selection??null),r=ce(n.value);return r&&B(r),n},V=()=>{let e=400,t=new Date().getFullYear()-200;return p&&(t=p.getFullYear()),m&&(e=m.getFullYear()-t+1),Array.from(Array(e).keys()).map(e=>({key:e+t,label:e+t}))},H=w(),U=L(),W=(0,f.jsxs)(f.Fragment,{children:[a?null:(0,f.jsxs)(`div`,{className:rt.datePickerHeader,children:[(0,f.jsx)(R,{icon:d.faChevronLeft,onClick:()=>se(-1)}),(0,f.jsx)(`div`,{className:rt.datePickerHeaderMonthAndYearContainer,children:(0,f.jsxs)(`div`,{className:rt.datePickerHeaderMonthAndYear,children:[(0,f.jsx)(nt,{plainStyle:!0,scrollToSelected:!0,onChange:e=>D(e),className:rt.datePickerHeaderMonth,value:Ve(Re(`-`),O,E,1),items:He().map((e,t)=>({key:t+1,label:e}))}),(0,f.jsx)(nt,{plainStyle:!0,scrollToSelected:!0,useMatLabelStyle:!1,className:rt.datePickerHeaderYear,onChange:e=>k(e),value:O,items:V()})]})}),(0,f.jsx)(R,{icon:d.faChevronRight,onClick:()=>se(1)})]}),(0,f.jsx)(Ze,{className:rt.datePickerMonth,month:E,year:O,onSelect:oe,selectionStart:S??H,selectionEnd:C??H,minDate:p,maxDate:m}),_&&(0,f.jsx)(P,{onClick:()=>oe(null),children:`Clear`}),g]}),ue=i?null:(0,f.jsx)(_e,{readOnly:o,label:`${v}${z()?` *`:``}`,value:ee,onChange:e=>M(e),onClick:()=>j(!0),customInput:(0,f.jsx)(h.default,{mask:`99.99.9999`,maskPlaceholder:`_`,beforeMaskedStateChange:le}),onBlur:()=>{I.current&&(I.current.touched=!0),N(!1),B(ce(ee))},onFocus:()=>N(!0),onMouseEnter:()=>re(!0),onMouseLeave:()=>re(!1),isValid:!U}),de=s?W:o?(0,f.jsx)(ke,{hideHeader:!0,isOpen:A,onClose:()=>j(!1),children:W}):(0,f.jsx)(me,{isOpen:A,onOpenChange:e=>j(e),content:W,align:fe.Left,dontCloseOnChildClick:!0,children:ue});return(0,f.jsxs)(`div`,{className:(0,l.default)(rt.datePicker,e),children:[(o||s)&&ue,de,(0,f.jsx)(ge,{variant:`error`,message:r?r.getCurrentErrorMessage():b||``,isVisible:U&&(te||ne)})]})}var at={emptyState:`emptyState_KXOIx`};function ot({className:e,icon:t,children:n,...r}){return(0,f.jsxs)(`div`,{...r,className:(0,l.default)(at.emptyState,e),children:[t&&(0,f.jsx)(u.FontAwesomeIcon,{icon:t}),(0,f.jsx)(`div`,{children:n??`No entries available`})]})}var st={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`},ct={default:null,mini:st.fabSizeMini};function lt({children:e=null,size:t=`default`,className:n=``,styleType:r=j.Primary,onClick:i=()=>{}}){return(0,f.jsx)(P,{styleType:r,className:(0,l.default)(st.fab,ct[t],n),onClick:i,children:(0,f.jsx)(`div`,{className:st.fabContentContainer,children:(0,f.jsx)(`div`,{className:st.fabContent,children:e})})})}var X={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 ut({children:e=null,size:t=`default`,menuEntries:n=[],onMenuEntryClicked:r=()=>{},onClick:i=()=>{},closeMenuOnEntryClicked:a=!0,...o}){let[s,p]=(0,c.useState)(!1);function m(){n.length>0&&p(e=>!e),i()}function h(e,t){e.stopPropagation(),a&&p(!1),r(t)}return(0,f.jsxs)(`div`,{...o,className:X.fabContainer,children:[(0,f.jsx)(`div`,{className:(0,l.default)(X.fabMenuBackdrop,s&&X.fabMenuBackdropOpen),onClick:e=>{e.stopPropagation(),p(!1)}}),(0,f.jsx)(`div`,{onClick:e=>e.stopPropagation(),children:(0,f.jsx)(lt,{className:X.fab,size:t,onClick:m,children:(0,f.jsxs)(`div`,{className:(0,l.default)(X.fabIcon,s&&X.fabIconMenuOpen),children:[(0,f.jsx)(`div`,{className:(0,l.default)(X.fabIconContent,!s&&X.fabIconContentShown),children:e}),(0,f.jsx)(`div`,{className:(0,l.default)(X.fabIconContent,s&&X.fabIconContentShown),children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faPlus})})]})})}),(0,f.jsx)(`div`,{className:X.fabMenu,children:n.map(({id:e,label:t,icon:n})=>(0,f.jsxs)(`div`,{className:(0,l.default)(X.fabMenuEntry,s&&X.fabMenuEntryShown),onClick:t=>h(t,e),children:[t&&(0,f.jsx)(`div`,{className:X.fabMenuEntryLabelContainer,children:(0,f.jsx)(`div`,{className:X.fabMenuEntryLabel,children:t})}),(0,f.jsx)(lt,{size:`mini`,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:n})})]},e))})]})}var dt={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 ft(e){let{formValidator:t}=e;return t?t.touched&&t.hasError():!1}function pt(e){let{isRequired:t,formValidator:n}=e;return!!(t||n?.validators.find(e=>e.validatorId===`required`))}function mt({data:e=[],selectedId:t=null,label:n=``,onChange:r,formValidator:i=null,isRequired:a,className:o,style:s,classNames:c,styles:d,...p}){let m=i?i.value??null:t,h=ft({formValidator:i,isRequired:a}),g=pt({formValidator:i,isRequired:a});function _(e){i&&i.set(e),r?.(e)}return(0,f.jsxs)(`div`,{...p,className:(0,l.default)(dt.iconPicker,{[dt.iconPickerError]:h},c?.root,o),style:{...d?.root,...s},children:[n&&(0,f.jsxs)(`div`,{className:(0,l.default)(dt.iconPickerLabel,c?.label),style:d?.label,children:[n,g&&` *`]}),(0,f.jsx)(`div`,{className:(0,l.default)(dt.iconPickerItemContainer,c?.itemContainer),style:d?.itemContainer,children:e.map(({id:e,label:t,icon:n,customIcon:r})=>(0,f.jsxs)(`div`,{className:(0,l.default)(dt.iconPickerItem,{[dt.iconPickerItemSelected]:m===e},c?.item),style:d?.item,title:t,tabIndex:0,role:`button`,onClick:()=>_(e),onKeyDown:({key:t})=>{t===`Enter`&&_(e)},children:[n&&(0,f.jsx)(u.FontAwesomeIcon,{icon:n}),r??null,(0,f.jsx)(N,{})]},e))})]})}var ht=[`click`,`mousemove`,`keydown`,`scroll`,`touchstart`];function gt({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),i(!1),a.current=setTimeout(()=>{i(!0)},t*1e3)},[t]);return(0,c.useEffect)(()=>{o()},[o]),(0,c.useEffect)(()=>{for(let e of ht)document.addEventListener(e,o);return()=>{for(let e of ht)document.removeEventListener(e,o);a.current!==null&&clearTimeout(a.current)}},[o]),(0,f.jsx)(f.Fragment,{children:n&&r&&e})}var _t={inputDropdown:`inputDropdown_UdYMa`,dropdown:`dropdown_-M5-x`,"dropdown-shown":`dropdown-shown_H2rFU`,dropdownShown:`dropdown-shown_H2rFU`,"dropdown-item":`dropdown-item_JRgbt`,dropdownItem:`dropdown-item_JRgbt`,"dropdown-item-highlighted":`dropdown-item-highlighted_1ZENP`,dropdownItemHighlighted:`dropdown-item-highlighted_1ZENP`,"dropdown-category":`dropdown-category_OMT0E`,dropdownCategory:`dropdown-category_OMT0E`};function vt(e,t){return t?t.value??``:e??``}function yt(e,t){let n=t.find(t=>t.value===e);return n?n.label??n.value:e}function bt({label:e=``,value:t=``,formValidator:n=null,items:r=[],className:i,style:a,classNames:o,styles:s,onSelect:u=()=>null,onChange:d,placeholder:p=``,...m}){let h=vt(t,n),[g,_]=(0,c.useState)(()=>yt(h,r)),[v,y]=(0,c.useState)(h),[b,x]=(0,c.useState)(!1),[S,C]=(0,c.useState)(null),w=(0,c.useRef)(null);if(h!==v){y(h);let e=r.find(e=>e.value===h);e&&_(e.label??e.value)}let T=r.filter(e=>(e.label??e.value).toLowerCase().includes(g.toLowerCase())),E=()=>{w.current&&=(clearTimeout(w.current),null),x(!0)},D=()=>{w.current=setTimeout(()=>{x(!1),w.current=null},100)},O=(0,c.useCallback)(e=>{_(e.label??e.value),n&&n.set(e.value),d&&d(e.value),u(e.value)},[n,d,u]),k=(0,c.useCallback)(e=>{e.key===`ArrowUp`?(e.preventDefault(),C(e=>e?e-1:null)):e.key===`ArrowDown`?(e.preventDefault(),C(e=>e===null?0:Math.min(e+1,T.length-1))):e.key===`Enter`&&S!==null&&T[S]&&O(T[S])},[T,S,O]);return(0,f.jsxs)(`div`,{...m,className:(0,l.default)(_t.inputDropdown,o?.root,i),style:{...s?.root,...a},onFocus:E,onBlur:D,onKeyDown:k,children:[(0,f.jsx)(_e,{label:e,value:g,onChange:e=>{_(e),C(null)},placeholder:p}),(0,f.jsx)(`div`,{className:(0,l.default)(_t.dropdown,{[_t.dropdownShown]:b},o?.dropdown),style:s?.dropdown,children:b&&T.map((e,t)=>(0,f.jsx)(`div`,{className:(0,l.default)(_t.dropdownItem,S===t&&_t.dropdownItemHighlighted,o?.item),style:s?.item,onClick:()=>O(e),children:e.label??e.value},`${t}_${e.label}_${e.value}`))})]})}var xt={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-header":`column-header_PLeKG`,columnHeader:`column-header_PLeKG`,"column-items":`column-items_xY5er`,columnItems:`column-items_xY5er`,item:`item_T8CJK`,"item-dragging":`item-dragging_iWurw`,itemDragging:`item-dragging_iWurw`,dragOverlay:`dragOverlay_DSyKz`};function St({id:e,children:t}){let{attributes:n,listeners:r,setNodeRef:i,transform:a,transition:o,isDragging:s}=(0,_.useSortable)({id:e});return(0,f.jsx)(`div`,{ref:i,style:{transform:v.CSS.Transform.toString(a),transition:o},className:(0,l.default)(xt.item,s&&xt.itemDragging),...n,...r,children:t})}function Ct({id:e,title:t,itemIds:n,items:r,renderItem:i,className:a,classNames:o,styles:s}){let{setNodeRef:c,isOver:u}=(0,g.useDroppable)({id:`column-${e}`});return(0,f.jsxs)(`div`,{className:(0,l.default)(xt.column,u&&xt.columnOver,n.length===0&&xt.columnEmpty,a),children:[(0,f.jsx)(`div`,{className:(0,l.default)(xt.columnHeader,o?.header),style:s?.header,children:t}),(0,f.jsx)(_.SortableContext,{items:n,strategy:_.verticalListSortingStrategy,children:(0,f.jsx)(`div`,{ref:c,className:(0,l.default)(xt.columnItems,o?.items),style:s?.items,children:n.map(e=>(0,f.jsx)(St,{id:e,children:r[e]===void 0?null:i(r[e],e)},e))})})]})}function wt({columns:e,items:t,renderItem:n,onChange:r,className:i,style:a,classNames:o,styles:s}){let[u,d]=(0,c.useState)(null),[p,m]=(0,c.useState)(null),h=(0,g.useSensors)((0,g.useSensor)(g.PointerSensor,{activationConstraint:{distance:8}})),v=p??e;function y(e,t){return e.findIndex(e=>e.itemIds.includes(t))}function b({active:t}){d(String(t.id)),m(e.map(e=>({...e,itemIds:[...e.itemIds]})))}function x({active:t,over:n}){if(!n)return;let r=String(t.id),i=String(n.id);m(t=>{let n=(t??e.map(e=>({...e,itemIds:[...e.itemIds]}))).map(e=>({...e,itemIds:[...e.itemIds]})),a=y(n,r);if(a===-1)return t;let o;if(i.startsWith(`column-`)){let e=i.slice(7);o=n.findIndex(t=>t.id===e)}else o=y(n,i);if(o===-1)return t;if(a===o){let e=n[a],t=e.itemIds.indexOf(r),o=e.itemIds.indexOf(i);t!==-1&&o!==-1&&t!==o&&(n[a]={...e,itemIds:(0,_.arrayMove)(e.itemIds,t,o)})}else{n[a].itemIds=n[a].itemIds.filter(e=>e!==r);let e=n[o].itemIds.indexOf(i),t=e===-1?n[o].itemIds.length:e;n[o].itemIds.splice(t,0,r)}return n})}function S({active:e,over:t}){if(d(null),!t||!p){m(null);return}r(p),m(null)}return(0,f.jsxs)(g.DndContext,{sensors:h,collisionDetection:g.closestCorners,onDragStart:b,onDragOver:x,onDragEnd:S,children:[(0,f.jsx)(`div`,{className:(0,l.default)(xt.board,i),style:a,children:v.map(e=>(0,f.jsx)(Ct,{id:e.id,title:e.title,itemIds:e.itemIds,items:t,renderItem:n},e.id))}),(0,f.jsx)(g.DragOverlay,{children:u&&t[u]!==void 0?(0,f.jsx)(`div`,{className:(0,l.default)(xt.dragOverlay,o?.dragOverlay),style:s?.dragOverlay,children:n(t[u],u)}):null})]})}var Tt={iconLoading:`iconLoading_wovj4`,"spin-to-oblivion":`spin-to-oblivion_0tZtm`,spinToOblivion:`spin-to-oblivion_0tZtm`,"iconLoading-first":`iconLoading-first_SBwP3`,iconLoadingFirst:`iconLoading-first_SBwP3`,"draw-line":`draw-line_1NiWA`,drawLine:`draw-line_1NiWA`,"iconLoading-second":`iconLoading-second_nHrW3`,iconLoadingSecond:`iconLoading-second_nHrW3`,"draw-line-two":`draw-line-two_HmaHl`,drawLineTwo:`draw-line-two_HmaHl`};function Et({className:e=``}){return(0,f.jsx)(`div`,{className:(0,l.default)(Tt.iconLoading,e),children:(0,f.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`-8 -1 16 14`,children:[(0,f.jsx)(`path`,{className:Tt.iconLoadingFirst,d:`M 0 0 C 3 5 6 5 6 12`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:Tt.iconLoadingFirst,d:`M 0 0 C -3 5 -6 5 -6 12`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:Tt.iconLoadingFirst,d:`M 0 0 L 0 10`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:Tt.iconLoadingSecond,d:`M 0.1 10 C -3 10 -4 10 -6 12`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:Tt.iconLoadingSecond,d:`M -0.1 10 C 3 10 4 10 6 12`,strokeWidth:`1.7`,fill:`none`})]})})}var Dt=Et,Ot={numberInput:`numberInput_7p2O3`};function kt({value:e,onChange:t,formValidator:n,label:r,error:i,className:a,allowNegative:o=!1,decimalSeparator:s,thousandSeparator:c,prefix:u,suffix:d,decimalScale:p,placeholder:m,sign:h,...g}){let _=n==null?e:n.value,v=h!=null&&_!=null?Math.abs(Number(_)):_,b=v==null?``:String(v);function x(e){let r=e;r!==void 0&&(h===`-`&&(r=-Math.abs(r)),h===`+`&&(r=Math.abs(r))),n?.set(r??null),t?.(r)}let S=h===`-`?`-`:h===`+`?`+`:u;return(0,f.jsx)(_e,{label:r,className:(0,l.default)(Ot.numberInput,a),value:b,onChange:()=>{},formValidator:null,isValid:n?n.touched?!n.hasError():!0:!i,errorMessage:n?n.getCurrentErrorMessage()??``:i??``,placeholder:m,customInput:(0,f.jsx)(y.NumericFormat,{onValueChange:e=>x(e.floatValue),allowNegative:h==null?o:!1,decimalSeparator:s,thousandSeparator:c,decimalScale:p,fixedDecimalScale:!0,prefix:S,suffix:d,...g})})}var At=kt,jt={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 Mt({className:e=void 0,options:t,onChange:n,value:r,...i}){let a=t.findIndex(e=>e.key===r)*100/t.length;return(0,f.jsxs)(`div`,{...i,className:(0,l.default)(jt.optionPicker,e),children:[(0,f.jsx)(`div`,{className:jt.optionPickerChip,style:{left:`${a}%`,width:`${100/t.length}%`}}),t.map(e=>(0,f.jsx)(I,{onClick:t=>n(e.key,t),className:(0,l.default)(jt.optionPickerOption,e.key===r&&jt.optionPickerOptionActive),tabIndex:e.key===r?-1:0,children:e.label},e.key))]})}var Nt=768;function Pt(){let[e,t]=(0,c.useState)(()=>({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<Nt}));return(0,c.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<Nt})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}var Ft={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 It({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}=Pt(),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);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:Ft.overscroll,ref:g,onScroll:D,children:[(0,f.jsx)(`div`,{className:Ft.overscrollHeaderContainer,style:{height:`${a}${s}`},ref:v,children:(0,f.jsx)(`div`,{className:(0,l.default)(Ft.overscrollHeader,r&&Ft.overscrollHeaderCentered),ref:_,children:t})}),(0,f.jsx)(`div`,{style:{minHeight:O},children:e})]})}var Lt={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`,"progressBar-label-custom":`progressBar-label-custom_sSump`,progressBarLabelCustom:`progressBar-label-custom_sSump`};function Rt(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 zt({className:e=void 0,total:t=100,progress:n=0,style:r=void 0,...i}){function a(){let e=[];return Array.isArray(n)?e.push(...n):typeof n==`object`?e.push(n):e.push({amount:n}),e.map((n,i)=>{let a=t?n.amount/t*100:0;return(0,f.jsx)(`div`,{className:(0,l.default)(Lt.progressBarFill,i===e.length-1&&Lt.progressBarFillEnd,n.class),style:{width:`${a}%`,background:n.color||void 0,...r||{}},title:n.label?`${n.label}: ${n.amount}`:void 0,children:n.label&&(0,f.jsx)(`div`,{className:Lt.progressBarLabel,style:n.color?{color:Rt(n.color)}:{},children:n.label})},i)})}return(0,f.jsx)(`div`,{...i,className:(0,l.default)(Lt.progressBar,e),style:r,children:a()})}function Bt(e){return Math.round(e/5)*5}function Vt(e){return{x:Bt(e.x),y:Bt(e.y)}}function Ht(e,t,n){let r=n.createSVGPoint();r.x=e,r.y=t;let i=n.getScreenCTM();if(!i)return{x:0,y:0};let a=r.matrixTransform(i.inverse());return Vt({x:a.x,y:a.y})}function Ut(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Wt(e,t,n){let r=n.x-t.x,i=n.y-t.y,a=r*r+i*i;if(a===0)return{dist:Ut(e,t),t:0};let o=Math.max(0,Math.min(1,((e.x-t.x)*r+(e.y-t.y)*i)/a)),s=t.x+o*r,c=t.y+o*i;return{dist:Math.sqrt((e.x-s)**2+(e.y-c)**2),t:o}}function Gt(e,t){let n=null;for(let r of t){let t=r.points;for(let i=0;i<t.length;i++){let a=t[i],o=t[(i+1)%t.length],{dist:s,t:c}=Wt(e,a,o);s<=8&&(!n||s<n.dist)&&(n={roomId:r.id,wallIndex:i,t:c,dist:s})}}return n}function Kt(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 qt(e){return{x:e.reduce((e,t)=>e+t.x,0)/e.length,y:e.reduce((e,t)=>e+t.y,0)/e.length}}function Jt(e,t,n,r){return[{x:e,y:t},{x:e+n,y:t},{x:e+n,y:t+r},{x:e,y:t+r}]}function Yt(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=Math.sqrt(i*i+a*a);if(o<.001)return null;let s=i/o,c=a/o,l=e.x+i*n,u=e.y+a*n,d=Math.min(r/2,o/2-.001);return{p1:{x:l-s*d,y:u-c*d},p2:{x:l+s*d,y:u+c*d},perp:{x:-c,y:s}}}function Xt(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function Zt(e){return e.map((e,t)=>`${t===0?`M`:`L`} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(` `)+` Z`}function Qt(e,t){if(e.length<2)return[];if(t.length===0)return[e.map((e,t)=>`${t===0?`M`:`L`} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(` `)+` Z`];let n=e.length,r=[],i=[`M ${e[0].x.toFixed(2)},${e[0].y.toFixed(2)}`];for(let a=0;a<n;a++){let o=e[a],s=e[(a+1)%n],c=s.x-o.x,l=s.y-o.y,u=Math.sqrt(c*c+l*l),d=t.filter(e=>e.wallIndex===a).sort((e,t)=>e.t-t.t);if(d.length===0)i.push(`L ${s.x.toFixed(2)},${s.y.toFixed(2)}`);else{for(let e of d){let t=e.width/2,n=Math.max(0,e.t-t/u),a=Math.min(1,e.t+t/u),s={x:o.x+c*n,y:o.y+l*n},d={x:o.x+c*a,y:o.y+l*a};i.push(`L ${s.x.toFixed(2)},${s.y.toFixed(2)}`),r.push(i),i=[`M ${d.x.toFixed(2)},${d.y.toFixed(2)}`]}i.push(`L ${s.x.toFixed(2)},${s.y.toFixed(2)}`)}}return r[0]=[...i,...r[0].slice(1)],r.map(e=>e.join(` `))}function $t(e,t,n){let r=Yt(e,t,n.t,n.width);if(!r)return``;let{p1:i,p2:a,perp:o}=r,s={x:i.x+o.x*n.width,y:i.y+o.y*n.width};return[`M ${i.x.toFixed(2)},${i.y.toFixed(2)} L ${a.x.toFixed(2)},${a.y.toFixed(2)}`,`M ${i.x.toFixed(2)},${i.y.toFixed(2)} A ${n.width},${n.width} 0 0,1 ${s.x.toFixed(2)},${s.y.toFixed(2)}`].join(` `)}function en(e,t){let n=1/0,r=1/0,i=-1/0,a=-1/0;for(let t of e)for(let e of t.points)e.x<n&&(n=e.x),e.y<r&&(r=e.y),e.x>i&&(i=e.x),e.y>a&&(a=e.y);isFinite(n)||(n=0,r=0,i=400,a=300);let o=[(n-5).toFixed(2),(r-5).toFixed(2),(i-n+10).toFixed(2),(a-r+10).toFixed(2)].join(` `),s=e.map(e=>{let n=t.filter(t=>t.roomId===e.id),r=Qt(e.points,n),i=Zt(e.points),a=qt(e.points),o=r.map(e=>` <path d="${e}" />`).join(`
2
+ `),s=n.map(t=>{let n=e.points[t.wallIndex],r=e.points[(t.wallIndex+1)%e.points.length],i=$t(n,r,t);return i?` <path d="${i}" fill="none" />`:``}).filter(Boolean).join(`
3
+ `),c=e.name?` <text fontSize="5" x="${a.x.toFixed(1)}" y="${a.y.toFixed(1)}">${Xt(e.name)}</text>`:``;return[` <g id="${e.id}">`,o,` <path id="background" d="${i}" />`,s,c,` </g>`].filter(Boolean).join(`
4
4
  `)});return[`<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="${o}">`,` <g id="layer1">`,...s,` </g>`,` <use id="use" href="" />`,`</svg>`].join(`
5
- `)}function Zt(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 Qt(e){let t=new DOMParser().parseFromString(e,`image/svg+xml`),n=[];return t.querySelectorAll(`[id^="room"]`).forEach(e=>{let t=e.querySelector(`[id="background"]`);if(!t)return;let r=t.getAttribute(`d`);if(!r)return;let i=Zt(r);if(i.length<3)return;let a=e.querySelector(`text`)?.textContent?.trim()??``;n.push({id:e.id,name:a,points:i})}),n}function $t(e,t){let n=Xt(e,t),r=new Blob([n],{type:`image/svg+xml`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`room-plan.svg`,a.click(),URL.revokeObjectURL(i)}var Z={roomDrawer:`roomDrawer_SJj4-`,"roomDrawer-toolbar":`roomDrawer-toolbar_55H5p`,roomDrawerToolbar:`roomDrawer-toolbar_55H5p`,"roomDrawer-toolbar-sep":`roomDrawer-toolbar-sep_nJeh8`,roomDrawerToolbarSep:`roomDrawer-toolbar-sep_nJeh8`,"roomDrawer-toolbar-btn":`roomDrawer-toolbar-btn_2qinY`,roomDrawerToolbarBtn:`roomDrawer-toolbar-btn_2qinY`,"roomDrawer-toolbar-btn-active":`roomDrawer-toolbar-btn-active_4XX25`,roomDrawerToolbarBtnActive:`roomDrawer-toolbar-btn-active_4XX25`,"roomDrawer-toolbar-zoomLabel":`roomDrawer-toolbar-zoomLabel_HMkb5`,roomDrawerToolbarZoomLabel:`roomDrawer-toolbar-zoomLabel_HMkb5`,"roomDrawer-canvas":`roomDrawer-canvas_Y18uD`,roomDrawerCanvas:`roomDrawer-canvas_Y18uD`,"roomDrawer-canvas-select":`roomDrawer-canvas-select_M43-x`,roomDrawerCanvasSelect:`roomDrawer-canvas-select_M43-x`,"roomDrawer-info":`roomDrawer-info_qwC6L`,roomDrawerInfo:`roomDrawer-info_qwC6L`,"roomDrawer-info-label":`roomDrawer-info-label_8I9hB`,roomDrawerInfoLabel:`roomDrawer-info-label_8I9hB`,"roomDrawer-info-input":`roomDrawer-info-input_YAl-K`,roomDrawerInfoInput:`roomDrawer-info-input_YAl-K`,"roomDrawer-info-spacer":`roomDrawer-info-spacer_cOj96`,roomDrawerInfoSpacer:`roomDrawer-info-spacer_cOj96`,"roomDrawer-info-delete":`roomDrawer-info-delete_TSBUN`,roomDrawerInfoDelete:`roomDrawer-info-delete_TSBUN`,"roomDrawer-hint":`roomDrawer-hint_3WTFa`,roomDrawerHint:`roomDrawer-hint_3WTFa`,"roomDrawer-info-doorsBtn":`roomDrawer-info-doorsBtn_oK5Uf`,roomDrawerInfoDoorsBtn:`roomDrawer-info-doorsBtn_oK5Uf`,"roomDrawer-doorPanel":`roomDrawer-doorPanel_e-Tl9`,roomDrawerDoorPanel:`roomDrawer-doorPanel_e-Tl9`,"roomDrawer-doorPanel-header":`roomDrawer-doorPanel-header_--iXz`,roomDrawerDoorPanelHeader:`roomDrawer-doorPanel-header_--iXz`,"roomDrawer-doorPanel-icon":`roomDrawer-doorPanel-icon_KxaVY`,roomDrawerDoorPanelIcon:`roomDrawer-doorPanel-icon_KxaVY`,"roomDrawer-doorPanel-title":`roomDrawer-doorPanel-title_8nOZS`,roomDrawerDoorPanelTitle:`roomDrawer-doorPanel-title_8nOZS`,"roomDrawer-doorPanel-done":`roomDrawer-doorPanel-done_ejQkx`,roomDrawerDoorPanelDone:`roomDrawer-doorPanel-done_ejQkx`,"roomDrawer-doorPanel-list":`roomDrawer-doorPanel-list_rDou7`,roomDrawerDoorPanelList:`roomDrawer-doorPanel-list_rDou7`,"roomDrawer-doorPanel-item":`roomDrawer-doorPanel-item_U-3-B`,roomDrawerDoorPanelItem:`roomDrawer-doorPanel-item_U-3-B`,"roomDrawer-doorPanel-label":`roomDrawer-doorPanel-label_qSYqY`,roomDrawerDoorPanelLabel:`roomDrawer-doorPanel-label_qSYqY`,"roomDrawer-doorPanel-widthLabel":`roomDrawer-doorPanel-widthLabel_jXv7D`,roomDrawerDoorPanelWidthLabel:`roomDrawer-doorPanel-widthLabel_jXv7D`,"roomDrawer-doorPanel-empty":`roomDrawer-doorPanel-empty_LcDw0`,roomDrawerDoorPanelEmpty:`roomDrawer-doorPanel-empty_LcDw0`,"roomDrawer-canvas-door":`roomDrawer-canvas-door_qzCIa`,roomDrawerCanvasDoor:`roomDrawer-canvas-door_qzCIa`,doorGap:`doorGap_KrIuB`,doorMarker:`doorMarker_-N63z`,gridLine:`gridLine_V-rxw`,roomFill:`roomFill_JnJ0J`,"roomFill-selected":`roomFill-selected_IfIRr`,roomFillSelected:`roomFill-selected_IfIRr`,roomStroke:`roomStroke_S18UH`,"roomStroke-selected":`roomStroke-selected_fm19u`,roomStrokeSelected:`roomStroke-selected_fm19u`,roomText:`roomText_6fIeU`,doorPanel:`doorPanel_raCv0`,"doorPanel-selected":`doorPanel-selected_5DG7g`,doorPanelSelected:`doorPanel-selected_5DG7g`,doorSwing:`doorSwing_Tbt9D`,"doorSwing-selected":`doorSwing-selected_fFte5`,doorSwingSelected:`doorSwing-selected_fFte5`,preview:`preview_seIZY`,polyCloseTarget:`polyCloseTarget_snjYx`,polyVertex:`polyVertex_fw0nX`,vertexHandle:`vertexHandle_-z7g5`},en=6,tn=5,nn=1.25,rn=.25,an=12,on=0;function sn(e){return on+=1,`${e}${on}`}var cn={select:`Drag inside to move · Drag corner to reshape · Click wall to add corner · Dbl-click corner to remove · Delete to erase`,rect:`Drag to draw a rectangular room`,polygon:`Click to place corners · Click first point or Enter to close · Esc to cancel`};function ln({className:e}){let[t,n]=(0,c.useState)([]),[r,i]=(0,c.useState)([]),[a,o]=(0,c.useState)(`rect`),[s,p]=(0,c.useState)(null),[m,h]=(0,c.useState)(null),[g,_]=(0,c.useState)(null),[v,y]=(0,c.useState)(null),[b,x]=(0,c.useState)([]),[S,C]=(0,c.useState)(null),[w,T]=(0,c.useState)(1),[E,D]=(0,c.useState)({x:0,y:0}),O=(0,c.useRef)(null),k=(0,c.useRef)(null),A=(0,c.useRef)(null),j=(0,c.useRef)(null),M=(0,c.useRef)(null),N=(0,c.useRef)({rooms:t,doors:r,tool:a,selectedId:s,editingDoorsForRoomId:m,polyPoints:b,zoom:w,pan:E});(0,c.useLayoutEffect)(()=>{N.current={rooms:t,doors:r,tool:a,selectedId:s,editingDoorsForRoomId:m,polyPoints:b,zoom:w,pan:E}});function P(e){e.length<3||(n(t=>[...t,{id:sn(`room`),name:`Room ${t.length+1}`,points:e}]),x([]),C(null))}(0,c.useEffect)(()=>{let e=j.current;if(!e)return;function t(e){e.preventDefault();let{zoom:t,pan:n}=N.current,r=Rt(e.clientX,e.clientY,j.current);if(!r)return;let i=e.deltaY<0?nn:1/nn,a=Math.max(rn,Math.min(an,t*i));D({x:r.x-(r.x-n.x)*(t/a),y:r.y-(r.y-n.y)*(t/a)}),T(a)}return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[]),(0,c.useEffect)(()=>{function e(e){let{tool:t,selectedId:r,editingDoorsForRoomId:a,polyPoints:o,zoom:s,pan:c}=N.current;if(e.key===`Escape`){if(a){h(null);return}t===`polygon`&&(x([]),C(null)),p(null);return}if(e.key===`Enter`&&t===`polygon`&&o.length>=3){P(o);return}if((e.key===`+`||e.key===`=`)&&!(e.target instanceof HTMLInputElement)){let e=Math.max(rn,Math.min(an,s*nn)),t=c.x+400/s/2,n=c.y+300/s/2;T(e),D({x:t-400/e/2,y:n-300/e/2});return}if(e.key===`-`&&!(e.target instanceof HTMLInputElement)){let e=Math.max(rn,Math.min(an,s/nn)),t=c.x+400/s/2,n=c.y+300/s/2;T(e),D({x:t-400/e/2,y:n-300/e/2});return}if(e.key===`0`&&!(e.target instanceof HTMLInputElement)){T(1),D({x:0,y:0});return}(e.key===`Delete`||e.key===`Backspace`)&&r&&!a&&!(e.target instanceof HTMLInputElement)&&(n(e=>e.filter(e=>e.id!==r)),i(e=>e.filter(e=>e.roomId!==r)),p(null))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);function F(e,t=w,n=E){let r=Math.max(rn,Math.min(an,t*e)),i=n.x+400/t/2,a=n.y+300/t/2;D({x:i-400/r/2,y:a-300/r/2}),T(r)}function I(e){return j.current?Rt(e.clientX,e.clientY,j.current):null}function ee(e,t){let n=null;for(let r=0;r<t.points.length;r++){let i=zt(e,t.points[r]);i<=en&&(!n||i<n.d)&&(n={index:r,d:i})}return n}function te(e,t){let n=null;for(let r=0;r<t.points.length;r++){let i=t.points[r],a=t.points[(r+1)%t.points.length],{dist:o,t:s}=Bt(e,i,a);o<=tn&&(!n||o<n.d)&&(n={index:r,t:s,d:o})}return n}function L(e,t,r,a){return n(n=>n.map(n=>{if(n.id!==e)return n;let r=[...n.points];return r.splice(t+1,0,a),{...n,points:r}})),i(n=>n.map(n=>n.roomId===e?n.wallIndex===t?n.t<=r?{...n,t:r>0?n.t/r:0}:{...n,wallIndex:t+1,t:(n.t-r)/(1-r)}:n.wallIndex>t?{...n,wallIndex:n.wallIndex+1}:n:n)),t+1}function ne(e,r){let a=t.find(t=>t.id===e);if(!a||a.points.length<=3)return;let o=a.points.length;n(t=>t.map(t=>t.id===e?{...t,points:t.points.filter((e,t)=>t!==r)}:t)),i(t=>t.map(t=>{if(t.roomId!==e)return t;let n=(r-1+o)%o;return t.wallIndex===n||t.wallIndex===r?{...t,wallIndex:-1}:t.wallIndex>r?{...t,wallIndex:t.wallIndex-1}:t}).filter(e=>e.wallIndex!==-1))}function R(e){if(e.button===1){e.preventDefault();let t=j.current;if(t){let n=t.getBoundingClientRect();A.current={startClient:{x:e.clientX,y:e.clientY},origPan:{...E},scaleX:400/w/n.width,scaleY:300/w/n.height}}return}if(e.button!==0)return;e.preventDefault();let n=I(e);if(n){if(m){let e=t.find(e=>e.id===m);if(e){let t=Vt(n,[e]);t&&i(e=>[...e,{id:sn(`door`),roomId:t.roomId,wallIndex:t.wallIndex,t:t.t,width:12}])}return}if(a===`rect`){_(n),y(n);return}if(a===`polygon`){b.length>=3&&zt(n,b[0])<=8?P(b):x(e=>[...e,n]);return}if(a===`select`){let e=t.find(e=>e.id===s)??null;if(e){let t=ee(n,e);if(t){O.current={type:`vertex`,roomId:e.id,index:t.index,start:n,origPt:e.points[t.index]};return}}if(e){let t=te(n,e);if(t){let r=e.points[t.index],i=e.points[(t.index+1)%e.points.length],a=Lt({x:r.x+(i.x-r.x)*t.t,y:r.y+(i.y-r.y)*t.t}),o=L(e.id,t.index,t.t,a);O.current={type:`vertex`,roomId:e.id,index:o,start:n,origPt:a};return}}let r=t.find(e=>Ht(n,e.points));if(r){p(r.id),O.current={type:`room`,roomId:r.id,start:n,origPoints:[...r.points]};return}p(null)}}}function re(e){if(a!==`select`||m)return;let n=I(e);if(!n)return;let r=t.find(e=>e.id===s);if(!r)return;let i=ee(n,r);i&&(e.preventDefault(),ne(r.id,i.index))}function z(e){if(A.current){let{startClient:t,origPan:n,scaleX:r,scaleY:i}=A.current;D({x:n.x-(e.clientX-t.x)*r,y:n.y-(e.clientY-t.y)*i});return}let r=I(e);if(r){if(k.current&&m){let e=t.find(e=>e.id===m);if(e){let t=Vt(r,[e]);t&&i(e=>e.map(e=>e.id===k.current?{...e,wallIndex:t.wallIndex,t:t.t}:e))}return}if(a===`rect`&&g){y(r);return}if(a===`polygon`){C(r);return}if(a===`select`&&!m&&O.current){let e=O.current;if(e.type===`vertex`){let t=r.x-e.start.x,i=r.y-e.start.y,a=Lt({x:e.origPt.x+t,y:e.origPt.y+i});n(t=>t.map(t=>{if(t.id!==e.roomId)return t;let n=[...t.points];return n[e.index]=a,{...t,points:n}}))}else{let t=r.x-e.start.x,i=r.y-e.start.y;n(n=>n.map(n=>n.id===e.roomId?{...n,points:e.origPoints.map(e=>({x:e.x+t,y:e.y+i}))}:n))}}}}function ie(e){if(A.current){A.current=null;return}let t=I(e);if(t){if(a===`rect`&&g){let e=Math.min(g.x,t.x),r=Math.min(g.y,t.y),i=Math.abs(t.x-g.x),a=Math.abs(t.y-g.y);i>=10&&a>=10&&n(t=>[...t,{id:sn(`room`),name:`Room ${t.length+1}`,points:Wt(e,r,i,a)}]),_(null),y(null)}k.current=null,O.current=null}}function ae(e){s&&n(t=>t.map(t=>t.id===s?{...t,name:e}:t))}function B(e,t){let n=parseFloat(t);isNaN(n)||n<=0||i(t=>t.map(t=>t.id===e?{...t,width:n}:t))}function V(){s&&(n(e=>e.filter(e=>e.id!==s)),i(e=>e.filter(e=>e.roomId!==s)),h(null),p(null))}function oe(e){i(t=>t.filter(t=>t.id!==e))}function se(e){o(e),h(null),x([]),C(null),_(null),y(null)}function ce(e){let t=e.target.files?.[0];if(!t)return;e.target.value=``;let r=new FileReader;r.onload=e=>{let t=e.target?.result;if(typeof t!=`string`)return;let r=Qt(t);r.length!==0&&(n(r.map(e=>({...e,id:sn(`room`)}))),i([]),p(null),h(null),T(1),D({x:0,y:0}))},r.readAsText(t)}let le=a===`rect`&&g&&v?{x:Math.min(g.x,v.x),y:Math.min(g.y,v.y),w:Math.abs(v.x-g.x),h:Math.abs(v.y-g.y)}:null,H=s?t.find(e=>e.id===s)??null:null,U=m?t.find(e=>e.id===m)??null:null,ue=m?r.filter(e=>e.roomId===m):[],W=[{t:`select`,icon:d.faHandPointer,label:`Select & edit`},{t:`rect`,icon:d.faSquare,label:`Rectangle room`},{t:`polygon`,icon:d.faDrawPolygon,label:`Polygon room`}],de=400/w,fe=300/w,pe=m?Z.roomDrawerCanvasDoor:a===`select`?Z.roomDrawerCanvasSelect:void 0;return(0,f.jsxs)(`div`,{className:(0,l.default)(Z.roomDrawer,e),children:[(0,f.jsxs)(`div`,{className:Z.roomDrawerToolbar,children:[W.map(({t:e,icon:t,label:n})=>(0,f.jsx)(`button`,{title:n,className:(0,l.default)(Z.roomDrawerToolbarBtn,e===a&&!m&&Z.roomDrawerToolbarBtnActive),onClick:()=>se(e),children:(0,f.jsx)(u.FontAwesomeIcon,{icon:t})},e)),(0,f.jsx)(`div`,{className:Z.roomDrawerToolbarSep}),(0,f.jsx)(`button`,{title:`Zoom in (+)`,className:Z.roomDrawerToolbarBtn,onClick:()=>F(nn),disabled:w>=an,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faMagnifyingGlassPlus})}),(0,f.jsxs)(`button`,{title:`Reset zoom (0) — ${Math.round(w*100)}%`,className:Z.roomDrawerToolbarZoomLabel,onClick:()=>{T(1),D({x:0,y:0})},children:[Math.round(w*100),`%`]}),(0,f.jsx)(`button`,{title:`Zoom out (−)`,className:Z.roomDrawerToolbarBtn,onClick:()=>F(1/nn),disabled:w<=rn,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faMagnifyingGlassMinus})}),(0,f.jsx)(`div`,{className:Z.roomDrawerToolbarSep}),(0,f.jsx)(`button`,{title:`Upload SVG`,className:Z.roomDrawerToolbarBtn,onClick:()=>M.current?.click(),children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faUpload})}),(0,f.jsx)(`button`,{title:`Download SVG`,className:Z.roomDrawerToolbarBtn,onClick:()=>$t(t,r),disabled:t.length===0,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faDownload})}),(0,f.jsx)(`input`,{ref:M,type:`file`,accept:`.svg,image/svg+xml`,style:{display:`none`},onChange:ce})]}),(0,f.jsxs)(`svg`,{ref:j,className:(0,l.default)(Z.roomDrawerCanvas,pe),viewBox:`${E.x} ${E.y} ${de} ${fe}`,onMouseDown:R,onMouseMove:z,onMouseUp:ie,onDoubleClick:re,children:[(0,f.jsx)(`defs`,{children:(0,f.jsx)(`pattern`,{id:`rd-grid`,width:5,height:5,patternUnits:`userSpaceOnUse`,children:(0,f.jsx)(`path`,{d:`M 5 0 L 0 0 0 5`,fill:`none`,className:Z.gridLine})})}),(0,f.jsx)(`rect`,{x:E.x,y:E.y,width:de,height:fe,fill:`url(#rd-grid)`}),t.map(e=>{let t=e.points,n=t.map((e,t)=>`${t===0?`M`:`L`} ${e.x},${e.y}`).join(` `)+` Z`,i=Jt(t,r.filter(t=>t.roomId===e.id)),a=Ut(t),o=s===e.id,c=m===e.id;return(0,f.jsxs)(`g`,{children:[(0,f.jsx)(`path`,{d:n,className:(0,l.default)(Z.roomFill,(o||c)&&Z.roomFillSelected)}),i.map((e,t)=>(0,f.jsx)(`path`,{d:e,className:(0,l.default)(Z.roomStroke,(o||c)&&Z.roomStrokeSelected)},t)),e.name&&(0,f.jsx)(`text`,{x:a.x,y:a.y,className:Z.roomText,textAnchor:`middle`,dominantBaseline:`middle`,children:e.name})]},e.id)}),r.map(e=>{let n=t.find(t=>t.id===e.roomId);if(!n)return null;let r=n.points[e.wallIndex],i=n.points[(e.wallIndex+1)%n.points.length],a=Gt(r,i,e.t,e.width);return a?(0,f.jsx)(`line`,{x1:a.p1.x,y1:a.p1.y,x2:a.p2.x,y2:a.p2.y,className:Z.doorGap},e.id):null}),m&&ue.map(e=>{let n=t.find(t=>t.id===e.roomId);if(!n)return null;let r=n.points[e.wallIndex],i=n.points[(e.wallIndex+1)%n.points.length],a=Gt(r,i,e.t,e.width);if(!a)return null;let o={x:(a.p1.x+a.p2.x)/2,y:(a.p1.y+a.p2.y)/2};return(0,f.jsx)(`circle`,{cx:o.x,cy:o.y,r:2.5,className:Z.doorMarker,onMouseDown:t=>{t.button===0&&(t.preventDefault(),t.stopPropagation(),k.current=e.id)}},e.id)}),a===`select`&&!m&&H&&H.points.map((e,t)=>(0,f.jsx)(`circle`,{cx:e.x,cy:e.y,r:3.5,className:Z.vertexHandle},t)),le&&(0,f.jsx)(`rect`,{x:le.x,y:le.y,width:le.w,height:le.h,className:Z.preview}),a===`polygon`&&b.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`polyline`,{points:[...b,S??b[b.length-1]].map(e=>`${e.x},${e.y}`).join(` `),className:Z.preview}),b.length>=3&&(0,f.jsx)(`circle`,{cx:b[0].x,cy:b[0].y,r:8/2,className:Z.polyCloseTarget}),b.map((e,t)=>(0,f.jsx)(`circle`,{cx:e.x,cy:e.y,r:2,className:Z.polyVertex},t))]})]}),H&&!m&&(0,f.jsxs)(`div`,{className:Z.roomDrawerInfo,children:[(0,f.jsx)(`span`,{className:Z.roomDrawerInfoLabel,children:`Name`}),(0,f.jsx)(`input`,{className:Z.roomDrawerInfoInput,value:H.name,onChange:e=>ae(e.target.value),placeholder:`Room name`}),(0,f.jsxs)(`button`,{className:Z.roomDrawerInfoDoorsBtn,onClick:()=>h(H.id),title:`Edit doors`,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faDoorOpen}),(0,f.jsx)(`span`,{children:r.filter(e=>e.roomId===H.id).length})]}),(0,f.jsx)(`button`,{className:Z.roomDrawerInfoDelete,onClick:V,title:`Delete room`,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faTrash})})]}),m&&U&&(0,f.jsxs)(`div`,{className:Z.roomDrawerDoorPanel,children:[(0,f.jsxs)(`div`,{className:Z.roomDrawerDoorPanelHeader,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faDoorOpen,className:Z.roomDrawerDoorPanelIcon}),(0,f.jsx)(`span`,{className:Z.roomDrawerDoorPanelTitle,children:U.name?`Doors · ${U.name}`:`Doors`}),(0,f.jsxs)(`button`,{className:Z.roomDrawerDoorPanelDone,onClick:()=>h(null),title:`Done (Esc)`,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faCheck}),`Done`]})]}),(0,f.jsxs)(`div`,{className:Z.roomDrawerDoorPanelList,children:[ue.length===0&&(0,f.jsx)(`span`,{className:Z.roomDrawerDoorPanelEmpty,children:`Click on a wall to add a door`}),ue.map((e,t)=>(0,f.jsxs)(`div`,{className:Z.roomDrawerDoorPanelItem,children:[(0,f.jsxs)(`span`,{className:Z.roomDrawerDoorPanelLabel,children:[`Door `,t+1]}),(0,f.jsx)(`span`,{className:Z.roomDrawerDoorPanelWidthLabel,children:`Width`}),(0,f.jsx)(`input`,{className:Z.roomDrawerInfoInput,type:`number`,min:1,value:e.width,onChange:t=>B(e.id,t.target.value)}),(0,f.jsx)(`button`,{className:Z.roomDrawerInfoDelete,onClick:()=>oe(e.id),title:`Delete door`,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faTrash})})]},e.id))]})]}),(0,f.jsx)(`div`,{className:Z.roomDrawerHint,children:m?`Click a wall to add a door · Adjust width or delete from the list · Done or Esc to finish`:`${cn[a]} · Scroll to zoom · Middle-drag to pan · 0 to reset`})]})}var un={scrollbarProvider:`scrollbarProvider_IMBFu`};function dn({className:e=void 0,children:t=void 0}){return(0,f.jsx)(`div`,{className:(0,l.default)(un.scrollbarProvider,e),children:t})}var fn=dn,pn={resultCount:`resultCount_Sn48Q`};function mn({value:e,onChange:t,onDebounce:n,placeholder:r,label:i,debounceMs:a=500,totalAmount:o,showAmount:s=!0,className:l,width:u,...d}){let p=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>{p.current!==null&&clearTimeout(p.current)},[]);function m(e){let r=e==null?``:String(e),i=r.trim()===``?``:r;t(i),p.current!==null&&clearTimeout(p.current),p.current=setTimeout(()=>{n?.(i)},a)}let h=s&&typeof o==`number`&&!Number.isNaN(o);return(0,f.jsxs)(`div`,{...d,className:l,style:u==null?void 0:{width:u},children:[(0,f.jsx)(ye,{type:K.Search,label:i,placeholder:r,value:e,onChange:m}),h&&(0,f.jsxs)(`p`,{className:pn.resultCount,children:[o,` `,o===1?`result`:`results`]})]})}var Q={stepper:`stepper_kiS2A`,"stepper-clickable":`stepper-clickable_Nm6fP`,stepperClickable:`stepper-clickable_Nm6fP`,"stepper-vertical":`stepper-vertical_2y9rg`,stepperVertical:`stepper-vertical_2y9rg`,"stepper-connector":`stepper-connector_J2FwZ`,stepperConnector:`stepper-connector_J2FwZ`,"stepper-connector-vertical":`stepper-connector-vertical_vwY38`,stepperConnectorVertical:`stepper-connector-vertical_vwY38`,"stepper-connector-filled":`stepper-connector-filled_W8UZS`,stepperConnectorFilled:`stepper-connector-filled_W8UZS`,"stepper-entry":`stepper-entry_KD4JJ`,stepperEntry:`stepper-entry_KD4JJ`,"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-number":`stepper-entry-number_J168Q`,stepperEntryNumber:`stepper-entry-number_J168Q`,"stepper-entry-number-done":`stepper-entry-number-done_-m7sD`,stepperEntryNumberDone:`stepper-entry-number-done_-m7sD`,showCheckmark:`showCheckmark_Rd0oW`,"stepper-entry-label":`stepper-entry-label_b94eg`,stepperEntryLabel:`stepper-entry-label_b94eg`,"stepper-entry-label-vertical":`stepper-entry-label-vertical_Zm8i4`,stepperEntryLabelVertical:`stepper-entry-label-vertical_Zm8i4`},hn=class e extends c.Component{static alignments={VERTICAL:`vertical`,HORIZONTAL:`horizontal`};static propTypes={steps:g.default.arrayOf(g.default.shape({})),currentStep:g.default.number,alignment:g.default.oneOf([e.alignments.HORIZONTAL,e.alignments.VERTICAL]),onStepClicked:g.default.func};static defaultProps={steps:[],currentStep:0,alignment:e.alignments.HORIZONTAL,onStepClicked:null};constructor(e){super(e)}state={};renderCheckmark=()=>(0,f.jsx)(`svg`,{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`,stroke:`white`,strokeWidth:`0.4`,fill:`none`})});renderStep=(t,n)=>{let{steps:r,currentStep:i,alignment:a,onStepClicked:o}=this.props;return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:(0,l.default)(Q.stepperEntry,{[Q.stepperEntryActive]:n<=i,[Q.stepperEntryDone]:n<i,[Q.stepperClickable]:n<i&&o}),onClick:()=>o?o(n):null,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Q.stepperEntryNumber,{[Q.stepperEntryNumberDone]:n<i}),children:n>=i?n+1:this.renderCheckmark()}),(0,f.jsx)(`div`,{className:(0,l.default)(Q.stepperEntryLabel,{[Q.stepperEntryLabelVertical]:a===e.alignments.VERTICAL}),children:t.label})]}),r.length-1>n&&(0,f.jsx)(`div`,{className:(0,l.default)(Q.stepperConnector,{[Q.stepperConnectorFilled]:n<i,[Q.stepperConnectorVertical]:a===e.alignments.VERTICAL})})]})};render(){let{steps:t,alignment:n}=this.props;return(0,f.jsx)(`div`,{className:(0,l.default)(Q.stepper,{[Q.stepperVertical]:n===e.alignments.VERTICAL}),children:t.map(this.renderStep)})}},gn=`https://tenor.googleapis.com/v2`,_n=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(`${gn}/search?${n}`)).json()}async searchSuggestions(e){let t=new URLSearchParams({q:e,key:this.key});return(await fetch(`${gn}/search_suggestions?${t}`)).json()}registerShare(e,t){let n=new URLSearchParams({id:t,q:e,key:this.key});fetch(`${gn}/registershare?${n}`).catch(()=>null)}},vn={gifPreview:`gifPreview_-ECUZ`,"gifPreview-image":`gifPreview-image_Aq7-a`,gifPreviewImage:`gifPreview-image_Aq7-a`,"gifPreview-image-container":`gifPreview-image-container_ycypL`,gifPreviewImageContainer:`gifPreview-image-container_ycypL`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_wo6HB`};function yn({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)(vn.gifPreview,e),onScroll:i,children:t.map((e,t)=>(0,f.jsx)(z,{className:vn.gifPreviewImageContainer,onClick:()=>n?.(e),children:(0,f.jsx)(`div`,{className:vn.gifPreviewImage,style:{backgroundImage:`url(${e.media_formats.tinygif.url})`}})},`${e.id}_${t}`))})})}var bn={gifView:`gifView_Fa2zj`,"gifView-loading":`gifView-loading_LfNJr`,gifViewLoading:`gifView-loading_LfNJr`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_JR6aS`};function xn({className:e,src:t=``}){let[n,r]=(0,c.useState)(!0);return(0,c.useEffect)(()=>{r(!0)},[t]),(0,f.jsxs)(`div`,{className:(0,l.default)(bn.gifView,e),children:[(0,f.jsx)(`img`,{className:bn.tenorPickerSelected,src:t,onLoad:()=>r(!1)}),n&&(0,f.jsx)(`div`,{className:bn.gifViewLoading})]})}var Sn={"tenorPicker-selected":`tenorPicker-selected_IfR2z`,tenorPickerSelected:`tenorPicker-selected_IfR2z`,"tenorPicker-modal-content":`tenorPicker-modal-content_Vkolf`,tenorPickerModalContent:`tenorPicker-modal-content_Vkolf`,"tenorPicker-suggestions-container":`tenorPicker-suggestions-container_kJCj5`,tenorPickerSuggestionsContainer:`tenorPicker-suggestions-container_kJCj5`,"tenorPicker-suggestions-item":`tenorPicker-suggestions-item_Rl99M`,tenorPickerSuggestionsItem:`tenorPicker-suggestions-item_Rl99M`};function Cn({className:e,token:t=``,isModal:n=!1,onSelect:r=()=>void 0,selected:i=null}){let a=(0,c.useMemo)(()=>new _n(t),[t]),[o,s]=(0,c.useState)(``),[u,d]=(0,c.useState)([]),[p,m]=(0,c.useState)([]),[h,g]=(0,c.useState)(null),[_,v]=(0,c.useState)(!1);async function y(e){if(s(e),!e.trim()){d([]),m([]),g(null);return}let[{results:t=[],next:n=null},{results:r=[]}]=await Promise.all([a.search(e,{limit:18,contentfilter:`medium`}),a.searchSuggestions(e)]);d(t),g(n),m(r)}async function b(){let{results:e=[],next:t=null}=await a.search(o,{limit:36,pos:h??void 0,contentfilter:`medium`});g(t),d(t=>[...t,...e])}async function x(e){await r(e),v(!1),e&&a.registerShare(o,e.id)}function S(){return(0,f.jsx)(fe,{inline:!0,className:Sn.tenorPickerSuggestionsContainer,children:p.map(e=>(0,f.jsx)(de,{className:Sn.tenorPickerSuggestionsItem,text:e,onClick:()=>y(e)},e))})}function C(){return(0,f.jsx)(yn,{previewItems:u,onSelect:x,onLoadAdditional:b})}function w(){return(0,f.jsx)(mn,{label:`Pick gif`,value:o,onDebounce:y,onChange:s})}return n?(0,f.jsxs)(`div`,{className:(0,l.default)(Sn.tenorPicker,e),children:[(0,f.jsxs)(`div`,{className:D.actionButtons,children:[(0,f.jsx)(L,{onClick:()=>v(!0),children:`Pick gif`}),i&&(0,f.jsx)(L,{styleType:M.Delete,onClick:()=>x(null),children:`Remove gif`})]}),i&&(0,f.jsx)(xn,{className:Sn.tenorPickerSelected,src:i}),(0,f.jsx)(je,{isOpen:_,onClose:()=>v(!1),children:(0,f.jsxs)(`div`,{className:Sn.tenorPickerModalContent,children:[w(),S(),C()]})})]}):(0,f.jsxs)(`div`,{className:(0,l.default)(Sn.tenorPicker,e),children:[(0,f.jsx)(ge,{align:me.Left,isOpen:u.length>0&&_,onOpenChange:v,content:(0,f.jsxs)(f.Fragment,{children:[S(),C()]}),children:w()}),i&&(0,f.jsx)(L,{styleType:M.Delete,onClick:()=>x(null),children:`Remove gif`}),i&&(0,f.jsx)(xn,{className:Sn.tenorPickerSelected,src:i})]})}function wn(e){return(0,f.jsx)(ye,{...e,multiline:!0})}var Tn={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`,"--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)`,"--info-color":`var(--blue)`,"--info-lighter":`var(--lighter-blue)`,"--warn-color":`var(--orange)`,"--warn-lighter":`var(--lighter-orange)`,"--default-font-size":`14px`,"--text-small-font-size":`12px`,"--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)`,"--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%)`,"--spacing-s":`4px`,"--spacing-m":`8px`,"--spacing-l":`16px`}},En={colorFade:`colorFade_eLv2g`},Dn=class extends c.Component{constructor(...e){super(...e),this.state={resolvedVariables:{},colorFadeActive:!1,currentThemeColor:null},this.colorFadeTimeout=null,this.wrapperRef=c.default.createRef(),this.themeColorMeta=null,this.createdThemeColorMeta=!1,this.applyTheme=e=>{let t=this.props.themes??[Tn],n=t.find(e=>!e.baseThemeId)??t[0],r=n?n.variables:{},i=t.find(t=>t.id===e),a=i?this.resolveChain(i.id):[],o=Object.assign({},r,...a);this.setState({resolvedVariables:o,colorFadeActive:!0}),this.colorFadeTimeout&&clearTimeout(this.colorFadeTimeout),this.colorFadeTimeout=setTimeout(()=>{this.setState({colorFadeActive:!1}),this.colorFadeTimeout=null},500),setTimeout(()=>{this.wrapperRef.current&&this.setState({currentThemeColor:getComputedStyle(this.wrapperRef.current).getPropertyValue(`--primary-color`).trim()})},1)}}componentDidMount(){this.applyTheme(this.props.currentThemeId),this.syncThemeColorMeta(this.state.currentThemeColor??``)}componentDidUpdate(e,t){t.currentThemeColor!==this.state.currentThemeColor&&this.syncThemeColorMeta(this.state.currentThemeColor??``),(e.currentThemeId!==this.props.currentThemeId||e.themes!==this.props.themes)&&this.applyTheme(this.props.currentThemeId)}componentWillUnmount(){this.colorFadeTimeout&&clearTimeout(this.colorFadeTimeout),this.createdThemeColorMeta&&this.themeColorMeta?.remove()}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)}}resolveChain(e){let t=(this.props.themes??[Tn]).find(t=>t.id===e);return t?[...t.baseThemeId?this.resolveChain(t.baseThemeId):[],t.variables]:[]}render(){let{children:e}=this.props,{resolvedVariables:t,colorFadeActive:n}=this.state;return(0,f.jsx)(`div`,{ref:this.wrapperRef,id:`themeProvider`,className:n?En.colorFade:void 0,style:t,children:e})}};function On(e=`default`){let[t,n]=(0,c.useState)(localStorage.getItem(`theme`)||e);return{currentThemeId:t,setCurrentThemeId:e=>{n(e),localStorage.setItem(`theme`,e)}}}var kn={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`},An=class extends c.Component{static propTypes={currentStep:g.default.number,stepCount:g.default.number,renderStep:g.default.func,className:g.default.string};static defaultProps={currentStep:0,stepCount:0,renderStep:()=>null,className:``};constructor(e){super(e)}state={height:void 0,showOtherContent:!1,minRenderStep:0,maxRenderStep:0};componentDidUpdate(e){let{currentStep:t}=this.props,{currentStep:n}=e;t!==n&&(this.hideContentTimeout&&clearTimeout(this.hideContentTimeout),this.setState({showOtherContent:!0}),this.hideContentTimeout=setTimeout(()=>{this.setState({showOtherContent:!1}),this.hideContentTimeout=null},400))}updateCurrentRef=(e,t)=>{let{currentStep:n}=this.props,{height:r}=this.state;e&&n===t&&r!==e.clientHeight&&this.setState({height:e.clientHeight})};render(){let{renderStep:e,currentStep:t,stepCount:n,className:r}=this.props,{height:i,showOtherContent:a}=this.state,o=i===void 0?{}:{height:`${i}px`};return(0,f.jsx)(`div`,{className:(0,l.default)((0,l.default)(kn.wizard,r)),style:o,children:(0,f.jsx)(`div`,{className:kn.wizardContentContainer,style:{width:`${n*100}%`,marginLeft:`-${t*100}%`},children:Array.from(Array(n),()=>null).map((r,i)=>(0,f.jsx)(`div`,{ref:e=>this.updateCurrentRef(e,i),className:kn.wizardContent,style:{width:`${100/n}%`,marginLeft:`${100/n*i}%`},children:(0,f.jsx)(`div`,{className:(0,l.default)({[kn.wizardContentOutOfFrame]:t!==i&&!a}),children:e(i)})},`wizardContent${i}`))})})}},jn=null;function Mn(e,t){if(!jn){console.error(`[Toast] No ToastProvider found. Wrap your app with <ToastProvider>.`);return}jn(e,t)}function Nn(e){let t=e;return t?.errors&&Array.isArray(t.errors)?t.errors.flatMap(e=>Object.entries(e).map(([e,t])=>({id:e,message:t}))):[]}var Pn=class{#e;#t;#n;#r;#i;constructor(e,t=null,{initialValues:n,onSubmit:r=()=>void 0,onValidate:i=()=>void 0,errorParser:a=Nn,onSubmitError:o=()=>void 0}={}){this.#t=!1,this.#i=[],this.getFormError=()=>{let e=Object.keys(this.group);for(let t=0;t<e.length;t+=1){let n=e[t];if(this.group[n].errors.length>0)return this.group[n].errors[0]}return null},this.set=(e,t)=>(this.group[e].set(t),this),this.reset=(e={})=>{this.submitCount=0;let t=Object.keys(e);Object.keys(this.group).forEach(n=>{this.group[n].set(t.includes(n)?e[n]:this.#r[n],!1)}),this.resetDirtyAndTouched(),this.onReset&&this.onReset(this,this.#r,this.#e)},this.resetDirtyAndTouched=()=>{Object.keys(this.group).forEach(e=>{this.group[e].dirty=!1,this.group[e].touched=!1})},this.parseError=(e,t=!1)=>{let n=this.errorParser(e);n.length>0?(n.forEach(({id:e,message:t})=>{this.group[e]&&this.group[e].addError({id:e,message:t})}),t&&this.onSubmitError(n)):this.onSubmitError([{id:`generic`,message:`An error occurred`}])},this.#a=()=>{this.component&&this.component.forceUpdate(),this.#i.forEach(e=>e())},this.registerOnUpdateListener=e=>{this.#i.push(e)},this.removeOnUpdateListener=e=>{this.#i.splice(this.#i.indexOf(e),1)},this.setSubmitting=e=>{this.#t!==e&&(this.#t=e,this.#a())},this.submit=async e=>{e&&(e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()),this.setSubmitting(!0);let t=null;this.submitCount===0?t=await Promise.resolve(this.validate()):this.onValidateCallback&&(t=await Promise.resolve(this.onValidateCallback(this)));let n=this.getFormError()||t;if(n){this.setSubmitting(!1),this.submitCount>-1&&this.onSubmitError([n]),this.submitCount+=1,this.#a();return}try{await this.onSubmitCallback(this.getValues(),this),this.resetDirtyAndTouched()}catch(e){this.parseError(e,!0)}this.setSubmitting(!1),this.#a(),this.submitCount+=1},this.getValues=()=>{let e={};return Object.keys(this.group).forEach(t=>{e[t]=this.group[t].value}),{...this.#e,...e}},this.validate=()=>{if(Object.keys(this.group).forEach(e=>{this.group[e].validate(),this.group[e].touched=!0}),this.onValidateCallback)return this.onValidateCallback(this)},this.setValidator=(e,t)=>(this.group[e]=t,this),this.group=e,this.#e=n??{},this.#r={},this.submitCount=0,this.onDebounce=()=>{},this.onReset=()=>{},Object.keys(this.group).forEach(e=>{let t=this.group[e],n=this.#e;n[e]!==void 0&&t.set(n[e]),this.#r[e]=t.value,this.group[e].registerOnUpdateListener(()=>{this.#a(),this.submitCount=0,this.#n&&clearTimeout(this.#n),this.#n=setTimeout(()=>this.onDebounce(this.getValues()),500)})}),this.component=t,this.onSubmitCallback=r,this.onValidateCallback=i,this.errorParser=a,this.onSubmitError=o,this.setSubmitting(!1)}get isSubmitting(){return this.#t}get wasTouched(){return Object.keys(this.group).some(e=>this.group[e].touched)}get isDirty(){return Object.keys(this.group).some(e=>this.group[e].dirty)}get hasErrors(){return Object.keys(this.group).some(e=>this.group[e].errors.length>0)}get initialValues(){return{...this.#e}}#a};function Fn(e){return function({children:t,...n}){return(0,f.jsx)(`form`,{onSubmit:e.submit,noValidate:!0,...n,children:t})}}var In=e=>{Mn(e[0].message,{type:`error`})},Ln=class extends Pn{constructor(e,t=null,n){super(e,t,{...n,onSubmitError:n?.onSubmitError??In}),this.Form=Fn(this)}},Rn=class{#e;#t;#n;#r;#i;constructor(e,t){this.addError=e=>{this.#r.push(e),this.onUpdate()},this.removeErrors=e=>{this.#r=this.#r.filter(t=>!e.includes(t.id)),this.onUpdate()},this.clearErrors=()=>{this.#r=[],this.onUpdate()},this.hasError=e=>!e&&this.errors.length>0?!0:!!this.errors.find(t=>t.id===e),this.getCurrentErrorMessage=()=>this.errors.length===0?null:this.errors[0].message,this.validate=()=>{this.clearErrors(),this.validators.forEach(e=>{let t=e(this.value,this.label);t&&this.addError(t)})},this.onUpdate=()=>{this.onUpdateCallbacks.forEach(e=>e(this))},this.registerOnUpdateListener=e=>{this.onUpdateCallbacks.push(e)},this.removeOnUpdateListener=e=>{this.onUpdateCallbacks.splice(this.onUpdateCallbacks.indexOf(e),1)},this.set=(e,t=!0)=>(this.value=e,t&&!this.dirty&&(this.dirty=!0),this.validate(),this),this.#e=e,this.validators=t??[],this.#t=!1,this.#n=!1,this.#r=[],this.#i=``,this.onUpdateCallbacks=[],this.validate()}get touched(){return this.#t}set touched(e){this.#t=e,this.onUpdate()}get label(){return this.#i}set label(e){this.#i=e}get dirty(){return this.#n}set dirty(e){this.#n=e,this.onUpdate()}get value(){return this.#e}set value(e){this.#e=e,this.onUpdate()}get errors(){return this.#r}};Rn.prototype.toString=function(){return`${this.value}`};function zn(e){return/^[0-9]+$/.test(e)}function Bn(e){return/^[0-9]{2}.[0-9]{2}.[0-9]{4}$/.test(e)}function Vn(e){return/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z$/.test(e)}function Hn(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-ZöäüÜÖÄß\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function Un(e){return/^[A-Z]{6}[A-Z\d]{2}([A-Z\d]{3})?$/.test(e)}function Wn(e){return/[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}(\/[-a-zA-Z0-9@:%_+.~#?&//=]*)?$/.test(e)}function Gn(e){return/^[\w!@#$%^&*?±§~`'"/\\[\]{}\-,.();:><+=|öäüÖÄÜß €μ]{8,}$/.test(e)}function Kn(e){return/^(?=.*[a-zöäüA-ZÖÄÜß])/.test(e)}function qn(e){return/^(?=.*\d)/.test(e)}function Jn(e){return Gn(e)&&Kn(e)&&qn(e)}var $={t:(e,t)=>({"formValidators.minLength":`Must be at least ${t?.min} characters long`,"formValidators.maxLength":`Must be at most ${t?.max} characters long`,"formValidators.email":`Must be a valid email address`,"formValidators.required":`${t?.label||`Value`} is required`,"formValidators.value":`Value`,"formValidators.mustBeNumber":`Must be a number`,"formValidators.oneOf":`Must be one of the following values: ${t?.allowedValues}`,"formValidators.typeOf":`Must have type of ${t?.allowedTypes}`,"formValidators.multiEmail":`Must be a comma or semicolon separated list of valid email addresses`,"formValidators.date":`Must be a valid date`,"garages.errors.website":`Must be a valid URL`,"garages.errors.bic":`Must be a valid BIC`,"formValidators.minLetters":`Must contain at least ${t?.smart_count} letters`,"formValidators.minDigits":`Must contain at least ${t?.smart_count} digits`})[e]||e},Yn=class e{static{this.minLength=(e,t)=>n=>!n||n.length<e?{id:`minLength`,message:t||$.t(`formValidators.minLength`,{min:e})}:null}static{this.maxLength=(e,t)=>n=>n&&n.length>e?{id:`maxLength`,message:t||$.t(`formValidators.maxLength`,{max:e})}:null}static{this.email=e=>t=>t&&!Hn(t)?{id:`email`,message:e||$.t(`formValidators.email`)}:null}static{this.required=e=>{function t(t,n){return!t&&t!==0?{id:`required`,message:e||$.t(`formValidators.required`,{label:n||$.t(`formValidators.value`)})}:null}return t.validatorId=`required`,t}}static{this.mustBeNumber=e=>t=>t&&Number.isNaN(+t)?{id:`mustBeNumber`,message:e||$.t(`formValidators.mustBeNumber`)}:null}static{this.oneOf=(e,t)=>n=>n&&!e.includes(n)?{id:`oneOf`,message:t||$.t(`formValidators.oneOf`,{allowedValues:e})}:null}static{this.typeOf=(e,t)=>n=>{if(Array.isArray(e)){for(let t=0;t<e.length;t+=1)if(typeof n===e[t])return null}else if(typeof n===e)return null;return{id:`typeOf`,message:t||`Must have type of ${e}`}}}static{this.multiEmail=e=>t=>{if(t){let n=t.replace(/ /g,``).replace(/,/g,`;`).split(`;`);for(let t=0;t<n.length;t+=1)if(!Hn(n[t]))return{id:`multiEmail`,message:e||$.t(`formValidators.multiEmail`)}}return null}}static{this.date=e=>t=>t&&!Bn(t)&&!Vn(t)?{id:`date`,message:e||$.t(`formValidators.date`)}:null}static{this.dateObject=e=>t=>t&&!t.isValid?{id:`date`,message:e||$.t(`formValidators.date`)}:null}static{this.website=e=>t=>t&&!Wn(t)?{id:`website`,message:e||$.t(`garages.errors.website`)}:null}static{this.bic=e=>t=>t&&!Un(t)?{id:`bic`,message:e||$.t(`garages.errors.bic`)}:null}static{this.minLetters=(e,t)=>n=>n&&n.replace(/[^a-zöäüA-ZÖÄÜß]/g,``).length<e?{id:`minLetters`,message:t||$.t(`formValidators.minLetters`,{smart_count:e})}:null}static{this.minDigits=(e,t)=>n=>n&&n.replace(/[\D]/g,``).length<e?{id:`minDigits`,message:t||$.t(`formValidators.minDigits`,{smart_count:e})}:null}static{this.password=t=>n=>{let r=e.minLength(8)(n)||e.minLetters(1)(n)||e.minDigits(1)(n);return r?t?{id:`password`,message:t}:r:null}}},Xn=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)(ve,{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 Zn(e){let[,t]=(0,c.useReducer)(e=>e+1,0);return(0,c.useEffect)(()=>{if(e)return e.registerOnUpdateListener(t),()=>e.removeOnUpdateListener(t)},[e]),e}function Qn(e,{initialValues:t,onSubmit:n,onValidate:r,errorParser:i,onSubmitError:a}={}){let[,o]=(0,c.useReducer)(e=>e+1,0),s=(0,c.useRef)(null);s.current||=new Ln(e,null,{initialValues:t,errorParser:i,onSubmitError:a});let l=s.current,u=(0,c.useRef)(n),d=(0,c.useRef)(r);return u.current=n,d.current=r,(0,c.useEffect)(()=>(n!==void 0&&(l.onSubmitCallback=(...e)=>u.current?.(...e)),r!==void 0&&(l.onValidateCallback=(...e)=>d.current?.(...e)),l.registerOnUpdateListener(o),()=>l.removeOnUpdateListener(o)),[]),l}exports.Accordion=E,exports.AccordionStyleType=x,exports.ActionButtons=ne,exports.ActionIcon=ae,exports.Align=me,exports.BodyEnd=B,exports.Button=L,exports.ButtonSize=N,exports.ButtonStyleType=M,exports.ButtonType=P,exports.Card=oe,exports.CardActions=H,exports.CardContent=le,exports.CardHeader=se,exports.CardMedia=ce,exports.Checkbox=ue,exports.Chip=de,exports.ChipContainer=fe,exports.ColorPicker=ke,exports.ConfirmModal=Me,exports.DatePicker=at,exports.Dropdown=rt,exports.EmptyState=st,exports.Fab=dt,exports.FloatingMenu=ge,exports.FormValidator=Rn,exports.FormValidatorGroup=Ln,exports.Icon=mt,exports.IconLoading=Ct,exports.IdleManager=gt,exports.InfiniteBlock=nt,exports.Input=ye,exports.InputType=K,exports.InteractableDiv=z,exports.KanbanBoard=bt,exports.KanbanColumn=yt,exports.Modal=je,exports.NumberInput=Et,exports.OptionPicker=Ot,exports.Overscroll=Mt,exports.ProgressBar=Ft,exports.Ripple=I,exports.RoomDrawer=ln,exports.ScrollbarProvider=fn,exports.SearchInput=mn,exports.SpinnerLoading=j,exports.Stepper=hn,exports.TenorPicker=Cn,exports.Textarea=wn,exports.ThemeProvider=Dn,exports.Tooltip=ve,exports.ValidatableComponent=Xn,exports.Validators=Yn,exports.Wizard=An,exports.getLocale=ze,exports.hasEightPasswordChars=Gn,exports.hasOnePasswordDigit=qn,exports.hasOnePasswordLetter=Kn,exports.isBic=Un,exports.isDate=Bn,exports.isEmail=Hn,exports.isISODate=Vn,exports.isNumber=zn,exports.isPassword=Jn,exports.isURL=Wn,exports.mapLocale=Ie,exports.setLocale=Re,exports.useFormValidator=Zn,exports.useFormValidatorGroup=Qn,exports.useTheme=On;
5
+ `)}function tn(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 nn(e){let t=new DOMParser().parseFromString(e,`image/svg+xml`),n=[];return t.querySelectorAll(`[id^="room"]`).forEach(e=>{let t=e.querySelector(`[id="background"]`);if(!t)return;let r=t.getAttribute(`d`);if(!r)return;let i=tn(r);if(i.length<3)return;let a=e.querySelector(`text`)?.textContent?.trim()??``;n.push({id:e.id,name:a,points:i})}),n}function rn(e,t){let n=en(e,t),r=new Blob([n],{type:`image/svg+xml`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`room-plan.svg`,a.click(),URL.revokeObjectURL(i)}var Z={roomDrawer:`roomDrawer_SJj4-`,"roomDrawer-toolbar":`roomDrawer-toolbar_55H5p`,roomDrawerToolbar:`roomDrawer-toolbar_55H5p`,"roomDrawer-toolbar-sep":`roomDrawer-toolbar-sep_nJeh8`,roomDrawerToolbarSep:`roomDrawer-toolbar-sep_nJeh8`,"roomDrawer-toolbar-btn":`roomDrawer-toolbar-btn_2qinY`,roomDrawerToolbarBtn:`roomDrawer-toolbar-btn_2qinY`,"roomDrawer-toolbar-btn-active":`roomDrawer-toolbar-btn-active_4XX25`,roomDrawerToolbarBtnActive:`roomDrawer-toolbar-btn-active_4XX25`,"roomDrawer-toolbar-zoomLabel":`roomDrawer-toolbar-zoomLabel_HMkb5`,roomDrawerToolbarZoomLabel:`roomDrawer-toolbar-zoomLabel_HMkb5`,"roomDrawer-canvas":`roomDrawer-canvas_Y18uD`,roomDrawerCanvas:`roomDrawer-canvas_Y18uD`,"roomDrawer-canvas-select":`roomDrawer-canvas-select_M43-x`,roomDrawerCanvasSelect:`roomDrawer-canvas-select_M43-x`,"roomDrawer-info":`roomDrawer-info_qwC6L`,roomDrawerInfo:`roomDrawer-info_qwC6L`,"roomDrawer-info-label":`roomDrawer-info-label_8I9hB`,roomDrawerInfoLabel:`roomDrawer-info-label_8I9hB`,"roomDrawer-info-input":`roomDrawer-info-input_YAl-K`,roomDrawerInfoInput:`roomDrawer-info-input_YAl-K`,"roomDrawer-info-spacer":`roomDrawer-info-spacer_cOj96`,roomDrawerInfoSpacer:`roomDrawer-info-spacer_cOj96`,"roomDrawer-info-delete":`roomDrawer-info-delete_TSBUN`,roomDrawerInfoDelete:`roomDrawer-info-delete_TSBUN`,"roomDrawer-hint":`roomDrawer-hint_3WTFa`,roomDrawerHint:`roomDrawer-hint_3WTFa`,"roomDrawer-info-doorsBtn":`roomDrawer-info-doorsBtn_oK5Uf`,roomDrawerInfoDoorsBtn:`roomDrawer-info-doorsBtn_oK5Uf`,"roomDrawer-doorPanel":`roomDrawer-doorPanel_e-Tl9`,roomDrawerDoorPanel:`roomDrawer-doorPanel_e-Tl9`,"roomDrawer-doorPanel-header":`roomDrawer-doorPanel-header_--iXz`,roomDrawerDoorPanelHeader:`roomDrawer-doorPanel-header_--iXz`,"roomDrawer-doorPanel-icon":`roomDrawer-doorPanel-icon_KxaVY`,roomDrawerDoorPanelIcon:`roomDrawer-doorPanel-icon_KxaVY`,"roomDrawer-doorPanel-title":`roomDrawer-doorPanel-title_8nOZS`,roomDrawerDoorPanelTitle:`roomDrawer-doorPanel-title_8nOZS`,"roomDrawer-doorPanel-done":`roomDrawer-doorPanel-done_ejQkx`,roomDrawerDoorPanelDone:`roomDrawer-doorPanel-done_ejQkx`,"roomDrawer-doorPanel-list":`roomDrawer-doorPanel-list_rDou7`,roomDrawerDoorPanelList:`roomDrawer-doorPanel-list_rDou7`,"roomDrawer-doorPanel-item":`roomDrawer-doorPanel-item_U-3-B`,roomDrawerDoorPanelItem:`roomDrawer-doorPanel-item_U-3-B`,"roomDrawer-doorPanel-label":`roomDrawer-doorPanel-label_qSYqY`,roomDrawerDoorPanelLabel:`roomDrawer-doorPanel-label_qSYqY`,"roomDrawer-doorPanel-widthLabel":`roomDrawer-doorPanel-widthLabel_jXv7D`,roomDrawerDoorPanelWidthLabel:`roomDrawer-doorPanel-widthLabel_jXv7D`,"roomDrawer-doorPanel-empty":`roomDrawer-doorPanel-empty_LcDw0`,roomDrawerDoorPanelEmpty:`roomDrawer-doorPanel-empty_LcDw0`,"roomDrawer-canvas-door":`roomDrawer-canvas-door_qzCIa`,roomDrawerCanvasDoor:`roomDrawer-canvas-door_qzCIa`,doorGap:`doorGap_KrIuB`,doorMarker:`doorMarker_-N63z`,gridLine:`gridLine_V-rxw`,roomFill:`roomFill_JnJ0J`,"roomFill-selected":`roomFill-selected_IfIRr`,roomFillSelected:`roomFill-selected_IfIRr`,roomStroke:`roomStroke_S18UH`,"roomStroke-selected":`roomStroke-selected_fm19u`,roomStrokeSelected:`roomStroke-selected_fm19u`,roomText:`roomText_6fIeU`,doorPanel:`doorPanel_raCv0`,"doorPanel-selected":`doorPanel-selected_5DG7g`,doorPanelSelected:`doorPanel-selected_5DG7g`,doorSwing:`doorSwing_Tbt9D`,"doorSwing-selected":`doorSwing-selected_fFte5`,doorSwingSelected:`doorSwing-selected_fFte5`,preview:`preview_seIZY`,polyCloseTarget:`polyCloseTarget_snjYx`,polyVertex:`polyVertex_fw0nX`,vertexHandle:`vertexHandle_-z7g5`},an=6,on=5,sn=1.25,cn=.25,ln=12,un=0;function dn(e){return un+=1,`${e}${un}`}var fn={select:`Drag inside to move · Drag corner to reshape · Click wall to add corner · Dbl-click corner to remove · Delete to erase`,rect:`Drag to draw a rectangular room`,polygon:`Click to place corners · Click first point or Enter to close · Esc to cancel`};function pn({className:e}){let[t,n]=(0,c.useState)([]),[r,i]=(0,c.useState)([]),[a,o]=(0,c.useState)(`rect`),[s,p]=(0,c.useState)(null),[m,h]=(0,c.useState)(null),[g,_]=(0,c.useState)(null),[v,y]=(0,c.useState)(null),[b,x]=(0,c.useState)([]),[S,C]=(0,c.useState)(null),[w,T]=(0,c.useState)(1),[E,D]=(0,c.useState)({x:0,y:0}),O=(0,c.useRef)(null),k=(0,c.useRef)(null),A=(0,c.useRef)(null),j=(0,c.useRef)(null),ee=(0,c.useRef)(null),M=(0,c.useRef)({rooms:t,doors:r,tool:a,selectedId:s,editingDoorsForRoomId:m,polyPoints:b,zoom:w,pan:E});(0,c.useLayoutEffect)(()=>{M.current={rooms:t,doors:r,tool:a,selectedId:s,editingDoorsForRoomId:m,polyPoints:b,zoom:w,pan:E}});function te(e){e.length<3||(n(t=>[...t,{id:dn(`room`),name:`Room ${t.length+1}`,points:e}]),x([]),C(null))}(0,c.useEffect)(()=>{let e=j.current;if(!e)return;function t(e){e.preventDefault();let{zoom:t,pan:n}=M.current,r=Ht(e.clientX,e.clientY,j.current);if(!r)return;let i=e.deltaY<0?sn:1/sn,a=Math.max(cn,Math.min(ln,t*i));D({x:r.x-(r.x-n.x)*(t/a),y:r.y-(r.y-n.y)*(t/a)}),T(a)}return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[]),(0,c.useEffect)(()=>{function e(e){let{tool:t,selectedId:r,editingDoorsForRoomId:a,polyPoints:o,zoom:s,pan:c}=M.current;if(e.key===`Escape`){if(a){h(null);return}t===`polygon`&&(x([]),C(null)),p(null);return}if(e.key===`Enter`&&t===`polygon`&&o.length>=3){te(o);return}if((e.key===`+`||e.key===`=`)&&!(e.target instanceof HTMLInputElement)){let e=Math.max(cn,Math.min(ln,s*sn)),t=c.x+400/s/2,n=c.y+300/s/2;T(e),D({x:t-400/e/2,y:n-300/e/2});return}if(e.key===`-`&&!(e.target instanceof HTMLInputElement)){let e=Math.max(cn,Math.min(ln,s/sn)),t=c.x+400/s/2,n=c.y+300/s/2;T(e),D({x:t-400/e/2,y:n-300/e/2});return}if(e.key===`0`&&!(e.target instanceof HTMLInputElement)){T(1),D({x:0,y:0});return}(e.key===`Delete`||e.key===`Backspace`)&&r&&!a&&!(e.target instanceof HTMLInputElement)&&(n(e=>e.filter(e=>e.id!==r)),i(e=>e.filter(e=>e.roomId!==r)),p(null))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);function N(e,t=w,n=E){let r=Math.max(cn,Math.min(ln,t*e)),i=n.x+400/t/2,a=n.y+300/t/2;D({x:i-400/r/2,y:a-300/r/2}),T(r)}function ne(e){return j.current?Ht(e.clientX,e.clientY,j.current):null}function re(e,t){let n=null;for(let r=0;r<t.points.length;r++){let i=Ut(e,t.points[r]);i<=an&&(!n||i<n.d)&&(n={index:r,d:i})}return n}function P(e,t){let n=null;for(let r=0;r<t.points.length;r++){let i=t.points[r],a=t.points[(r+1)%t.points.length],{dist:o,t:s}=Wt(e,i,a);o<=on&&(!n||o<n.d)&&(n={index:r,t:s,d:o})}return n}function ie(e,t,r,a){return n(n=>n.map(n=>{if(n.id!==e)return n;let r=[...n.points];return r.splice(t+1,0,a),{...n,points:r}})),i(n=>n.map(n=>n.roomId===e?n.wallIndex===t?n.t<=r?{...n,t:r>0?n.t/r:0}:{...n,wallIndex:t+1,t:(n.t-r)/(1-r)}:n.wallIndex>t?{...n,wallIndex:n.wallIndex+1}:n:n)),t+1}function ae(e,r){let a=t.find(t=>t.id===e);if(!a||a.points.length<=3)return;let o=a.points.length;n(t=>t.map(t=>t.id===e?{...t,points:t.points.filter((e,t)=>t!==r)}:t)),i(t=>t.map(t=>{if(t.roomId!==e)return t;let n=(r-1+o)%o;return t.wallIndex===n||t.wallIndex===r?{...t,wallIndex:-1}:t.wallIndex>r?{...t,wallIndex:t.wallIndex-1}:t}).filter(e=>e.wallIndex!==-1))}function F(e){if(e.button===1){e.preventDefault();let t=j.current;if(t){let n=t.getBoundingClientRect();A.current={startClient:{x:e.clientX,y:e.clientY},origPan:{...E},scaleX:400/w/n.width,scaleY:300/w/n.height}}return}if(e.button!==0)return;e.preventDefault();let n=ne(e);if(n){if(m){let e=t.find(e=>e.id===m);if(e){let t=Gt(n,[e]);t&&i(e=>[...e,{id:dn(`door`),roomId:t.roomId,wallIndex:t.wallIndex,t:t.t,width:12}])}return}if(a===`rect`){_(n),y(n);return}if(a===`polygon`){b.length>=3&&Ut(n,b[0])<=8?te(b):x(e=>[...e,n]);return}if(a===`select`){let e=t.find(e=>e.id===s)??null;if(e){let t=re(n,e);if(t){O.current={type:`vertex`,roomId:e.id,index:t.index,start:n,origPt:e.points[t.index]};return}}if(e){let t=P(n,e);if(t){let r=e.points[t.index],i=e.points[(t.index+1)%e.points.length],a=Vt({x:r.x+(i.x-r.x)*t.t,y:r.y+(i.y-r.y)*t.t}),o=ie(e.id,t.index,t.t,a);O.current={type:`vertex`,roomId:e.id,index:o,start:n,origPt:a};return}}let r=t.find(e=>Kt(n,e.points));if(r){p(r.id),O.current={type:`room`,roomId:r.id,start:n,origPoints:[...r.points]};return}p(null)}}}function I(e){if(a!==`select`||m)return;let n=ne(e);if(!n)return;let r=t.find(e=>e.id===s);if(!r)return;let i=re(n,r);i&&(e.preventDefault(),ae(r.id,i.index))}function L(e){if(A.current){let{startClient:t,origPan:n,scaleX:r,scaleY:i}=A.current;D({x:n.x-(e.clientX-t.x)*r,y:n.y-(e.clientY-t.y)*i});return}let r=ne(e);if(r){if(k.current&&m){let e=t.find(e=>e.id===m);if(e){let t=Gt(r,[e]);t&&i(e=>e.map(e=>e.id===k.current?{...e,wallIndex:t.wallIndex,t:t.t}:e))}return}if(a===`rect`&&g){y(r);return}if(a===`polygon`){C(r);return}if(a===`select`&&!m&&O.current){let e=O.current;if(e.type===`vertex`){let t=r.x-e.start.x,i=r.y-e.start.y,a=Vt({x:e.origPt.x+t,y:e.origPt.y+i});n(t=>t.map(t=>{if(t.id!==e.roomId)return t;let n=[...t.points];return n[e.index]=a,{...t,points:n}}))}else{let t=r.x-e.start.x,i=r.y-e.start.y;n(n=>n.map(n=>n.id===e.roomId?{...n,points:e.origPoints.map(e=>({x:e.x+t,y:e.y+i}))}:n))}}}}function R(e){if(A.current){A.current=null;return}let t=ne(e);if(t){if(a===`rect`&&g){let e=Math.min(g.x,t.x),r=Math.min(g.y,t.y),i=Math.abs(t.x-g.x),a=Math.abs(t.y-g.y);i>=10&&a>=10&&n(t=>[...t,{id:dn(`room`),name:`Room ${t.length+1}`,points:Jt(e,r,i,a)}]),_(null),y(null)}k.current=null,O.current=null}}function z(e){s&&n(t=>t.map(t=>t.id===s?{...t,name:e}:t))}function B(e,t){let n=parseFloat(t);isNaN(n)||n<=0||i(t=>t.map(t=>t.id===e?{...t,width:n}:t))}function oe(){s&&(n(e=>e.filter(e=>e.id!==s)),i(e=>e.filter(e=>e.roomId!==s)),h(null),p(null))}function se(e){i(t=>t.filter(t=>t.id!==e))}function ce(e){o(e),h(null),x([]),C(null),_(null),y(null)}function le(e){let t=e.target.files?.[0];if(!t)return;e.target.value=``;let r=new FileReader;r.onload=e=>{let t=e.target?.result;if(typeof t!=`string`)return;let r=nn(t);r.length!==0&&(n(r.map(e=>({...e,id:dn(`room`)}))),i([]),p(null),h(null),T(1),D({x:0,y:0}))},r.readAsText(t)}let V=a===`rect`&&g&&v?{x:Math.min(g.x,v.x),y:Math.min(g.y,v.y),w:Math.abs(v.x-g.x),h:Math.abs(v.y-g.y)}:null,H=s?t.find(e=>e.id===s)??null:null,U=m?t.find(e=>e.id===m)??null:null,W=m?r.filter(e=>e.roomId===m):[],ue=[{t:`select`,icon:d.faHandPointer,label:`Select & edit`},{t:`rect`,icon:d.faSquare,label:`Rectangle room`},{t:`polygon`,icon:d.faDrawPolygon,label:`Polygon room`}],de=400/w,G=300/w,fe=m?Z.roomDrawerCanvasDoor:a===`select`?Z.roomDrawerCanvasSelect:void 0;return(0,f.jsxs)(`div`,{className:(0,l.default)(Z.roomDrawer,e),children:[(0,f.jsxs)(`div`,{className:Z.roomDrawerToolbar,children:[ue.map(({t:e,icon:t,label:n})=>(0,f.jsx)(`button`,{title:n,className:(0,l.default)(Z.roomDrawerToolbarBtn,e===a&&!m&&Z.roomDrawerToolbarBtnActive),onClick:()=>ce(e),children:(0,f.jsx)(u.FontAwesomeIcon,{icon:t})},e)),(0,f.jsx)(`div`,{className:Z.roomDrawerToolbarSep}),(0,f.jsx)(`button`,{title:`Zoom in (+)`,className:Z.roomDrawerToolbarBtn,onClick:()=>N(sn),disabled:w>=ln,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faMagnifyingGlassPlus})}),(0,f.jsxs)(`button`,{title:`Reset zoom (0) — ${Math.round(w*100)}%`,className:Z.roomDrawerToolbarZoomLabel,onClick:()=>{T(1),D({x:0,y:0})},children:[Math.round(w*100),`%`]}),(0,f.jsx)(`button`,{title:`Zoom out (−)`,className:Z.roomDrawerToolbarBtn,onClick:()=>N(1/sn),disabled:w<=cn,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faMagnifyingGlassMinus})}),(0,f.jsx)(`div`,{className:Z.roomDrawerToolbarSep}),(0,f.jsx)(`button`,{title:`Upload SVG`,className:Z.roomDrawerToolbarBtn,onClick:()=>ee.current?.click(),children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faUpload})}),(0,f.jsx)(`button`,{title:`Download SVG`,className:Z.roomDrawerToolbarBtn,onClick:()=>rn(t,r),disabled:t.length===0,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faDownload})}),(0,f.jsx)(`input`,{ref:ee,type:`file`,accept:`.svg,image/svg+xml`,style:{display:`none`},onChange:le})]}),(0,f.jsxs)(`svg`,{ref:j,className:(0,l.default)(Z.roomDrawerCanvas,fe),viewBox:`${E.x} ${E.y} ${de} ${G}`,onMouseDown:F,onMouseMove:L,onMouseUp:R,onDoubleClick:I,children:[(0,f.jsx)(`defs`,{children:(0,f.jsx)(`pattern`,{id:`rd-grid`,width:5,height:5,patternUnits:`userSpaceOnUse`,children:(0,f.jsx)(`path`,{d:`M 5 0 L 0 0 0 5`,fill:`none`,className:Z.gridLine})})}),(0,f.jsx)(`rect`,{x:E.x,y:E.y,width:de,height:G,fill:`url(#rd-grid)`}),t.map(e=>{let t=e.points,n=t.map((e,t)=>`${t===0?`M`:`L`} ${e.x},${e.y}`).join(` `)+` Z`,i=Qt(t,r.filter(t=>t.roomId===e.id)),a=qt(t),o=s===e.id,c=m===e.id;return(0,f.jsxs)(`g`,{children:[(0,f.jsx)(`path`,{d:n,className:(0,l.default)(Z.roomFill,(o||c)&&Z.roomFillSelected)}),i.map((e,t)=>(0,f.jsx)(`path`,{d:e,className:(0,l.default)(Z.roomStroke,(o||c)&&Z.roomStrokeSelected)},t)),e.name&&(0,f.jsx)(`text`,{x:a.x,y:a.y,className:Z.roomText,textAnchor:`middle`,dominantBaseline:`middle`,children:e.name})]},e.id)}),r.map(e=>{let n=t.find(t=>t.id===e.roomId);if(!n)return null;let r=n.points[e.wallIndex],i=n.points[(e.wallIndex+1)%n.points.length],a=Yt(r,i,e.t,e.width);return a?(0,f.jsx)(`line`,{x1:a.p1.x,y1:a.p1.y,x2:a.p2.x,y2:a.p2.y,className:Z.doorGap},e.id):null}),m&&W.map(e=>{let n=t.find(t=>t.id===e.roomId);if(!n)return null;let r=n.points[e.wallIndex],i=n.points[(e.wallIndex+1)%n.points.length],a=Yt(r,i,e.t,e.width);if(!a)return null;let o={x:(a.p1.x+a.p2.x)/2,y:(a.p1.y+a.p2.y)/2};return(0,f.jsx)(`circle`,{cx:o.x,cy:o.y,r:2.5,className:Z.doorMarker,onMouseDown:t=>{t.button===0&&(t.preventDefault(),t.stopPropagation(),k.current=e.id)}},e.id)}),a===`select`&&!m&&H&&H.points.map((e,t)=>(0,f.jsx)(`circle`,{cx:e.x,cy:e.y,r:3.5,className:Z.vertexHandle},t)),V&&(0,f.jsx)(`rect`,{x:V.x,y:V.y,width:V.w,height:V.h,className:Z.preview}),a===`polygon`&&b.length>0&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`polyline`,{points:[...b,S??b[b.length-1]].map(e=>`${e.x},${e.y}`).join(` `),className:Z.preview}),b.length>=3&&(0,f.jsx)(`circle`,{cx:b[0].x,cy:b[0].y,r:8/2,className:Z.polyCloseTarget}),b.map((e,t)=>(0,f.jsx)(`circle`,{cx:e.x,cy:e.y,r:2,className:Z.polyVertex},t))]})]}),H&&!m&&(0,f.jsxs)(`div`,{className:Z.roomDrawerInfo,children:[(0,f.jsx)(`span`,{className:Z.roomDrawerInfoLabel,children:`Name`}),(0,f.jsx)(`input`,{className:Z.roomDrawerInfoInput,value:H.name,onChange:e=>z(e.target.value),placeholder:`Room name`}),(0,f.jsxs)(`button`,{className:Z.roomDrawerInfoDoorsBtn,onClick:()=>h(H.id),title:`Edit doors`,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faDoorOpen}),(0,f.jsx)(`span`,{children:r.filter(e=>e.roomId===H.id).length})]}),(0,f.jsx)(`button`,{className:Z.roomDrawerInfoDelete,onClick:oe,title:`Delete room`,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faTrash})})]}),m&&U&&(0,f.jsxs)(`div`,{className:Z.roomDrawerDoorPanel,children:[(0,f.jsxs)(`div`,{className:Z.roomDrawerDoorPanelHeader,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faDoorOpen,className:Z.roomDrawerDoorPanelIcon}),(0,f.jsx)(`span`,{className:Z.roomDrawerDoorPanelTitle,children:U.name?`Doors · ${U.name}`:`Doors`}),(0,f.jsxs)(`button`,{className:Z.roomDrawerDoorPanelDone,onClick:()=>h(null),title:`Done (Esc)`,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faCheck}),`Done`]})]}),(0,f.jsxs)(`div`,{className:Z.roomDrawerDoorPanelList,children:[W.length===0&&(0,f.jsx)(`span`,{className:Z.roomDrawerDoorPanelEmpty,children:`Click on a wall to add a door`}),W.map((e,t)=>(0,f.jsxs)(`div`,{className:Z.roomDrawerDoorPanelItem,children:[(0,f.jsxs)(`span`,{className:Z.roomDrawerDoorPanelLabel,children:[`Door `,t+1]}),(0,f.jsx)(`span`,{className:Z.roomDrawerDoorPanelWidthLabel,children:`Width`}),(0,f.jsx)(`input`,{className:Z.roomDrawerInfoInput,type:`number`,min:1,value:e.width,onChange:t=>B(e.id,t.target.value)}),(0,f.jsx)(`button`,{className:Z.roomDrawerInfoDelete,onClick:()=>se(e.id),title:`Delete door`,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faTrash})})]},e.id))]})]}),(0,f.jsx)(`div`,{className:Z.roomDrawerHint,children:m?`Click a wall to add a door · Adjust width or delete from the list · Done or Esc to finish`:`${fn[a]} · Scroll to zoom · Middle-drag to pan · 0 to reset`})]})}var mn={"roomViewer-containerLoading":`roomViewer-containerLoading_BL3M-`,roomViewerContainerLoading:`roomViewer-containerLoading_BL3M-`,"roomViewer-container":`roomViewer-container_YlmB8`,roomViewerContainer:`roomViewer-container_YlmB8`,"roomViewer-active":`roomViewer-active_gG6wf`,roomViewerActive:`roomViewer-active_gG6wf`,"roomViewer-selected":`roomViewer-selected_CpdMj`,roomViewerSelected:`roomViewer-selected_CpdMj`,"roomViewer-tint":`roomViewer-tint_O9JrM`,roomViewerTint:`roomViewer-tint_O9JrM`,"roomViewer-actions":`roomViewer-actions_4cA74`,roomViewerActions:`roomViewer-actions_4cA74`,"roomViewer-header":`roomViewer-header_XEHCO`,roomViewerHeader:`roomViewer-header_XEHCO`};function hn({data:e=[]}){let t=(0,c.useRef)(null),[,n]=(0,c.useState)(null),[r,i]=(0,c.useState)(0),[a,o]=(0,c.useState)(!0);(0,c.useEffect)(()=>{let i=new AbortController;n(null);let a=t.current;return r>e.length-1||!a?(o(!1),()=>i.abort()):(a.querySelectorAll(`[id^="room"]`).forEach(e=>{e.addEventListener(`click`,()=>s(e.id,a),{signal:i.signal})}),o(!1),()=>i.abort())},[e,r]);function s(e,t){let r=e.substring(4);n(n=>{if(r===n)return n;let[i]=t.querySelectorAll(`[id="use"]`);i?.setAttribute(`href`,`#${e}`);let[a]=t.querySelectorAll(`[id="${e}"]`);if(n){let[e]=t.querySelectorAll(`[id="room${n}"]`);if(e){e.classList.remove(mn.roomViewerSelected,mn.roomViewerTint);let[t]=e.querySelectorAll(`[id="background"]`);t&&t.classList.remove(mn.roomViewerTint)}}if(a){a.classList.add(mn.roomViewerSelected);let[e]=a.querySelectorAll(`[id="background"]`);(e??a).classList.add(mn.roomViewerTint)}return r})}function p(t){i(n=>{let r=n+t;return r<0||r>e.length-1?n:r})}let m=e[r]?.data??null;return(0,f.jsxs)(`div`,{className:mn.roomViewer,ref:t,children:[(0,f.jsx)(`h3`,{className:mn.roomViewerHeader,children:e[r]?.label??``}),(0,f.jsx)(`div`,{className:(0,l.default)(mn.roomViewerContainer,a&&mn.roomViewerContainerLoading),children:m},r),e.length>1&&(0,f.jsxs)(`div`,{className:mn.roomViewerActions,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronLeft,onClick:()=>p(-1)}),(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faLayerGroup}),(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronRight,onClick:()=>p(1)})]})]})}var gn={scrollbarProvider:`scrollbarProvider_IMBFu`};function _n({className:e=void 0,children:t=void 0}){return(0,f.jsx)(`div`,{className:(0,l.default)(gn.scrollbarProvider,e),children:t})}var vn=_n,yn={resultCount:`resultCount_Sn48Q`};function bn({value:e,onChange:t,onDebounce:n,placeholder:r,label:i,debounceMs:a=500,totalAmount:o,showAmount:s=!0,className:l,width:u,...d}){let p=(0,c.useRef)(null);(0,c.useEffect)(()=>()=>{p.current!==null&&clearTimeout(p.current)},[]);function m(e){let r=e==null?``:String(e),i=r.trim()===``?``:r;t(i),p.current!==null&&clearTimeout(p.current),p.current=setTimeout(()=>{n?.(i)},a)}let h=s&&typeof o==`number`&&!Number.isNaN(o);return(0,f.jsxs)(`div`,{...d,className:l,style:u==null?void 0:{width:u},children:[(0,f.jsx)(_e,{type:q.Search,label:i,placeholder:r,value:e,onChange:m}),h&&(0,f.jsxs)(`p`,{className:yn.resultCount,children:[o,` `,o===1?`result`:`results`]})]})}var xn={stepper:`stepper_kiS2A`,"stepper-clickable":`stepper-clickable_Nm6fP`,stepperClickable:`stepper-clickable_Nm6fP`,"stepper-vertical":`stepper-vertical_2y9rg`,stepperVertical:`stepper-vertical_2y9rg`,"stepper-connector":`stepper-connector_J2FwZ`,stepperConnector:`stepper-connector_J2FwZ`,"stepper-connector-vertical":`stepper-connector-vertical_vwY38`,stepperConnectorVertical:`stepper-connector-vertical_vwY38`,"stepper-connector-filled":`stepper-connector-filled_W8UZS`,stepperConnectorFilled:`stepper-connector-filled_W8UZS`,"stepper-entry":`stepper-entry_KD4JJ`,stepperEntry:`stepper-entry_KD4JJ`,"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-number":`stepper-entry-number_J168Q`,stepperEntryNumber:`stepper-entry-number_J168Q`,"stepper-entry-number-done":`stepper-entry-number-done_-m7sD`,stepperEntryNumberDone:`stepper-entry-number-done_-m7sD`,showCheckmark:`showCheckmark_Rd0oW`,"stepper-entry-label":`stepper-entry-label_b94eg`,stepperEntryLabel:`stepper-entry-label_b94eg`,"stepper-entry-label-vertical":`stepper-entry-label-vertical_Zm8i4`,stepperEntryLabelVertical:`stepper-entry-label-vertical_Zm8i4`};function Sn(){return(0,f.jsx)(`svg`,{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`,stroke:`white`,strokeWidth:`0.4`,fill:`none`})})}function Cn({steps:e=[],currentStep:t=0,alignment:n=`horizontal`,onStepClicked:r=null,nonLinear:i=!1,hideLabels:a=!1,className:o,style:s,classNames:u,styles:d,...p}){let m=n===`vertical`;return(0,f.jsx)(`div`,{...p,className:(0,l.default)(xn.stepper,{[xn.stepperVertical]:m},u?.root,o),style:{...d?.root,...s},children:e.map((n,o)=>{let s=o<t,p=o<=t,h=!!r&&(i?o!==t:s),g=(0,l.default)(xn.stepperEntry,{[xn.stepperEntryActive]:p},{[xn.stepperEntryDone]:s},{[xn.stepperClickable]:h},u?.entry),_=(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:(0,l.default)(xn.stepperEntryNumber,{[xn.stepperEntryNumberDone]:s},u?.entryNumber),style:d?.entryNumber,children:s?(0,f.jsx)(Sn,{}):o+1}),!a&&(0,f.jsx)(`div`,{className:(0,l.default)(xn.stepperEntryLabel,{[xn.stepperEntryLabelVertical]:m},u?.entryLabel),style:d?.entryLabel,children:n.label})]});return(0,f.jsxs)(c.default.Fragment,{children:[h?(0,f.jsx)(I,{className:g,style:d?.entry,onClick:()=>r(o),"aria-current":o===t?`step`:void 0,children:_}):(0,f.jsx)(`div`,{className:g,style:d?.entry,"aria-current":o===t?`step`:void 0,children:_}),o<e.length-1&&(0,f.jsx)(`div`,{className:(0,l.default)(xn.stepperConnector,{[xn.stepperConnectorFilled]:s},{[xn.stepperConnectorVertical]:m},u?.connector),style:d?.connector})]},o)})})}var wn=`https://tenor.googleapis.com/v2`,Tn=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(`${wn}/search?${n}`)).json()}async searchSuggestions(e){let t=new URLSearchParams({q:e,key:this.key});return(await fetch(`${wn}/search_suggestions?${t}`)).json()}registerShare(e,t){let n=new URLSearchParams({id:t,q:e,key:this.key});fetch(`${wn}/registershare?${n}`).catch(()=>null)}},En={gifPreview:`gifPreview_-ECUZ`,"gifPreview-image":`gifPreview-image_Aq7-a`,gifPreviewImage:`gifPreview-image_Aq7-a`,"gifPreview-image-container":`gifPreview-image-container_ycypL`,gifPreviewImageContainer:`gifPreview-image-container_ycypL`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_wo6HB`};function Dn({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)(En.gifPreview,e),onScroll:i,children:t.map((e,t)=>(0,f.jsx)(I,{className:En.gifPreviewImageContainer,onClick:()=>n?.(e),children:(0,f.jsx)(`div`,{className:En.gifPreviewImage,style:{backgroundImage:`url(${e.media_formats.tinygif.url})`}})},`${e.id}_${t}`))})})}var On={gifView:`gifView_Fa2zj`,"gifView-loading":`gifView-loading_LfNJr`,gifViewLoading:`gifView-loading_LfNJr`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_JR6aS`};function kn({className:e,src:t=``}){let[n,r]=(0,c.useState)(!0);return(0,c.useEffect)(()=>{r(!0)},[t]),(0,f.jsxs)(`div`,{className:(0,l.default)(On.gifView,e),children:[(0,f.jsx)(`img`,{className:On.tenorPickerSelected,src:t,onLoad:()=>r(!1)}),n&&(0,f.jsx)(`div`,{className:On.gifViewLoading})]})}var An={"tenorPicker-selected":`tenorPicker-selected_IfR2z`,tenorPickerSelected:`tenorPicker-selected_IfR2z`,"tenorPicker-modal-content":`tenorPicker-modal-content_Vkolf`,tenorPickerModalContent:`tenorPicker-modal-content_Vkolf`,"tenorPicker-suggestions-container":`tenorPicker-suggestions-container_kJCj5`,tenorPickerSuggestionsContainer:`tenorPicker-suggestions-container_kJCj5`,"tenorPicker-suggestions-item":`tenorPicker-suggestions-item_Rl99M`,tenorPickerSuggestionsItem:`tenorPicker-suggestions-item_Rl99M`};function jn({className:e,token:t=``,isModal:n=!1,onSelect:r=()=>void 0,selected:i=null}){let a=(0,c.useMemo)(()=>new Tn(t),[t]),[o,s]=(0,c.useState)(``),[u,d]=(0,c.useState)([]),[p,m]=(0,c.useState)([]),[h,g]=(0,c.useState)(null),[_,v]=(0,c.useState)(!1);async function y(e){if(s(e),!e.trim()){d([]),m([]),g(null);return}let[{results:t=[],next:n=null},{results:r=[]}]=await Promise.all([a.search(e,{limit:18,contentfilter:`medium`}),a.searchSuggestions(e)]);d(t),g(n),m(r)}async function b(){let{results:e=[],next:t=null}=await a.search(o,{limit:36,pos:h??void 0,contentfilter:`medium`});g(t),d(t=>[...t,...e])}async function x(e){await r(e),v(!1),e&&a.registerShare(o,e.id)}function S(){return(0,f.jsx)(de,{inline:!0,className:An.tenorPickerSuggestionsContainer,children:p.map(e=>(0,f.jsx)(ue,{className:An.tenorPickerSuggestionsItem,text:e,onClick:()=>y(e)},e))})}function C(){return(0,f.jsx)(Dn,{previewItems:u,onSelect:x,onLoadAdditional:b})}function w(){return(0,f.jsx)(bn,{label:`Pick gif`,value:o,onDebounce:y,onChange:s})}return n?(0,f.jsxs)(`div`,{className:(0,l.default)(An.tenorPicker,e),children:[(0,f.jsxs)(`div`,{className:E.actionButtons,children:[(0,f.jsx)(P,{onClick:()=>v(!0),children:`Pick gif`}),i&&(0,f.jsx)(P,{styleType:j.Delete,onClick:()=>x(null),children:`Remove gif`})]}),i&&(0,f.jsx)(kn,{className:An.tenorPickerSelected,src:i}),(0,f.jsx)(ke,{isOpen:_,onClose:()=>v(!1),children:(0,f.jsxs)(`div`,{className:An.tenorPickerModalContent,children:[w(),S(),C()]})})]}):(0,f.jsxs)(`div`,{className:(0,l.default)(An.tenorPicker,e),children:[(0,f.jsx)(me,{align:fe.Left,isOpen:u.length>0&&_,onOpenChange:v,content:(0,f.jsxs)(f.Fragment,{children:[S(),C()]}),children:w()}),i&&(0,f.jsx)(P,{styleType:j.Delete,onClick:()=>x(null),children:`Remove gif`}),i&&(0,f.jsx)(kn,{className:An.tenorPickerSelected,src:i})]})}function Mn(e){return(0,f.jsx)(_e,{...e,multiline:!0})}var Nn={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`,"--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)`,"--info-color":`var(--blue)`,"--info-lighter":`var(--lighter-blue)`,"--warn-color":`var(--orange)`,"--warn-lighter":`var(--lighter-orange)`,"--default-font-size":`14px`,"--text-small-font-size":`12px`,"--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)`,"--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%)`,"--spacing-s":`4px`,"--spacing-m":`8px`,"--spacing-l":`16px`}},Pn={colorFade:`colorFade_eLv2g`},Fn=class extends c.Component{constructor(...e){super(...e),this.state={resolvedVariables:{},colorFadeActive:!1,currentThemeColor:null},this.colorFadeTimeout=null,this.wrapperRef=c.default.createRef(),this.themeColorMeta=null,this.createdThemeColorMeta=!1,this.applyTheme=e=>{let t=this.props.themes??[Nn],n=t.find(e=>!e.baseThemeId)??t[0],r=n?n.variables:{},i=t.find(t=>t.id===e),a=i?this.resolveChain(i.id):[],o=Object.assign({},r,...a);this.setState({resolvedVariables:o,colorFadeActive:!0}),this.colorFadeTimeout&&clearTimeout(this.colorFadeTimeout),this.colorFadeTimeout=setTimeout(()=>{this.setState({colorFadeActive:!1}),this.colorFadeTimeout=null},500),setTimeout(()=>{this.wrapperRef.current&&this.setState({currentThemeColor:getComputedStyle(this.wrapperRef.current).getPropertyValue(`--primary-color`).trim()})},1)}}componentDidMount(){this.applyTheme(this.props.currentThemeId),this.syncThemeColorMeta(this.state.currentThemeColor??``)}componentDidUpdate(e,t){t.currentThemeColor!==this.state.currentThemeColor&&this.syncThemeColorMeta(this.state.currentThemeColor??``),(e.currentThemeId!==this.props.currentThemeId||e.themes!==this.props.themes)&&this.applyTheme(this.props.currentThemeId)}componentWillUnmount(){this.colorFadeTimeout&&clearTimeout(this.colorFadeTimeout),this.createdThemeColorMeta&&this.themeColorMeta?.remove()}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)}}resolveChain(e){let t=(this.props.themes??[Nn]).find(t=>t.id===e);return t?[...t.baseThemeId?this.resolveChain(t.baseThemeId):[],t.variables]:[]}render(){let{children:e}=this.props,{resolvedVariables:t,colorFadeActive:n}=this.state;return(0,f.jsx)(`div`,{ref:this.wrapperRef,id:`themeProvider`,className:n?Pn.colorFade:void 0,style:t,children:e})}};function In(e=`default`){let[t,n]=(0,c.useState)(localStorage.getItem(`theme`)||e);return{currentThemeId:t,setCurrentThemeId:e=>{n(e),localStorage.setItem(`theme`,e)}}}var Ln={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-info":`toast-info_RlLli`,toastInfo:`toast-info_RlLli`,toastIcon:`toastIcon_xU1nA`,"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`,toastProgressBar:`toastProgressBar_6vBs6`,toastShrink:`toastShrink_h89HS`},Rn={info:d.faCircleInfo,error:d.faCircleXmark,warn:d.faTriangleExclamation,default:d.faBell};function zn({item:e,isBottom:t,onDismiss:n}){let{id:r,content:i,options:a,dismissing:o}=e,{duration:s,showRemainingTime:p,showCloseButton:m,type:h,classNames:g,styles:_}=a;return(0,c.useEffect)(()=>{if(s===0)return;let e=setTimeout(()=>n(r),s);return()=>clearTimeout(e)},[r,s,n]),(0,f.jsxs)(`div`,{className:(0,l.default)(Ln.toast,t?Ln.toastBottom:null,Ln[`toast-${h}`],o&&Ln.toastDismissing,g?.root),style:_?.root,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:Rn[h],className:(0,l.default)(Ln.toastIcon,g?.icon),style:_?.icon}),(0,f.jsx)(`div`,{className:(0,l.default)(Ln.toastContent,g?.content),style:_?.content,children:i}),m&&(0,f.jsx)(R,{icon:d.faXmark,onClick:()=>n(r),className:(0,l.default)(Ln.toastCloseButton,g?.closeButton),style:_?.closeButton,"aria-label":`Close`}),p&&s>0&&(0,f.jsx)(`div`,{className:(0,l.default)(Ln.toastProgressBar,g?.progressBar),style:{"--toast-duration":`${s}ms`,..._?.progressBar}})]})}var Bn=null;function Vn(e){Bn=e}function Hn(){Bn=null}function Un(e,t){if(!Bn){console.error(`[Toast] No ToastProvider found. Wrap your app with <ToastProvider>.`);return}Bn(e,t)}var Wn={position:`top-right`,duration:4e3,showRemainingTime:!0,showCloseButton:!0,allowStacking:!0},Gn=220;function Kn(e){return Ln[`container-${e}`]}function qn({children:e,position:t=Wn.position,duration:n=Wn.duration,showRemainingTime:r=Wn.showRemainingTime,showCloseButton:i=Wn.showCloseButton,allowStacking:a=Wn.allowStacking}){let[o,s]=(0,c.useState)([]),u=(0,c.useRef)(0),d=(0,c.useCallback)(e=>{s(t=>t.map(t=>t.id===e?{...t,dismissing:!0}:t)),setTimeout(()=>{s(t=>t.filter(t=>t.id!==e))},Gn)},[]),p=(0,c.useCallback)((e,o)=>{let c={position:o?.position??t,duration:o?.duration??n,showRemainingTime:o?.showRemainingTime??r,showCloseButton:o?.showCloseButton??i,type:o?.type??`default`,classNames:o?.classNames,styles:o?.styles};u.current+=1;let l={id:`toast-${u.current}`,content:e,options:c,dismissing:!1};s(e=>!a&&e.length>0?(setTimeout(()=>{s([l])},Gn),e.map(e=>({...e,dismissing:!0}))):[...e,l])},[t,n,r,i,a]);(0,c.useEffect)(()=>(Vn(p),()=>Hn()),[p]);let m=o.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)(z,{children:Object.entries(m).map(([e,t])=>(0,f.jsx)(`div`,{className:(0,l.default)(Ln.container,Kn(e)),children:t.map(t=>(0,f.jsx)(zn,{item:t,isBottom:e.startsWith(`bottom`),onDismiss:d},t.id))},e))})]})}var Q={virtualList:`virtualList_qBPNc`,"virtualList-header":`virtualList-header_0Ellb`,virtualListHeader:`virtualList-header_0Ellb`,"virtualList-header-cell":`virtualList-header-cell_c8NGV`,virtualListHeaderCell:`virtualList-header-cell_c8NGV`,"virtualList-header-toggle":`virtualList-header-toggle_pYFxD`,virtualListHeaderToggle:`virtualList-header-toggle_pYFxD`,"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-select-cell":`virtualList-select-cell_s9kAy`,virtualListSelectCell:`virtualList-select-cell_s9kAy`,"virtualList-body":`virtualList-body_k-fRr`,virtualListBody:`virtualList-body_k-fRr`,"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-selected":`virtualList-row-selected_hwEN-`,virtualListRowSelected:`virtualList-row-selected_hwEN-`,"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`};function Jn(e,t,n,r=0){let i=Array(e+1);i[0]=0;for(let a=0;a<e;a++){let o=a<e-1?r:0;i[a+1]=i[a]+(t.get(a)??n)+o}return{offsets:i,totalHeight:i[e]}}function Yn(e,t,n,r,i){if(i===0)return{startIndex:0,endIndex:-1};let a=0,o=i-1;for(;a<o;){let n=a+o>>1;e[n+1]<=t?a=n+1:o=n}let s=a;for(;s<i&&e[s]<t+n;)s++;return{startIndex:Math.max(0,a-r),endIndex:Math.min(i-1,s+r-1)}}function Xn(e){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`:return`fit-content(100%)`}}).join(` `)}function Zn({index:e,top:t,columnTemplate:n,isSelected:r,showDivider:i,onClick:a,onHeightChange:o,rowClassName:s,rowStyle:u,children:d}){let p=(0,c.useRef)(null);return(0,c.useEffect)(()=>{let t=p.current;if(!t)return;let n=new ResizeObserver(()=>o(e,t.offsetHeight));return n.observe(t),()=>n.unobserve(t)},[e,o]),(0,f.jsx)(`div`,{ref:p,className:(0,l.default)(Q.virtualListRow,r&&Q.virtualListRowSelected,!i&&Q.virtualListRowNoDivider,s),style:{position:`absolute`,top:t,left:0,right:0,...n?{display:`grid`,gridTemplateColumns:n}:{},...u},onClick:a,"aria-selected":r,role:`row`,children:d})}function Qn({items:e,renderRow:t,columns:n,height:r=`100%`,estimatedRowHeight:i=40,overscan:a=3,rowGap:o=0,selectedKey:s,getItemKey:p,onRowClick:m,visibleColumnKeys:h,onVisibleColumnsChange:g,showColumnToggle:_,onLoadMore:v,loadMoreThreshold:y=100,isLoading:b=!1,multiSelect:x=!1,selectedKeys:S,onSelectionChange:C,showDivider:w=!0,className:T,style:E,classNames:D,styles:O,...k}){let[j,ee]=(0,c.useState)(0),[M,te]=(0,c.useState)(0),[N,ne]=(0,c.useState)(new Map),[re,P]=(0,c.useState)(!1),[ie,ae]=(0,c.useState)(!1),F=(0,c.useRef)(!1),I=S!==void 0,[L,R]=(0,c.useState)(new Set),z=I?S:L,B=h!==void 0,[oe,se]=(0,c.useState)(()=>new Set((n??[]).filter(e=>!e.defaultHidden).map(e=>e.key))),ce=B?new Set(h):oe,le=(0,c.useRef)(null),V=(0,c.useRef)(null),H=(0,c.useRef)(new Map),W=(0,c.useRef)([]);(0,c.useEffect)(()=>{let e=le.current;if(!e)return;let t=new ResizeObserver(()=>te(e.clientHeight));return t.observe(e),()=>t.unobserve(e)},[]),(0,c.useEffect)(()=>{if(!re)return;function e(e){V.current&&!V.current.contains(e.target)&&P(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[re]);let ue=(0,c.useCallback)(e=>{let t=e.currentTarget;ee(t.scrollTop),v&&!F.current&&t.scrollTop+t.clientHeight>=t.scrollHeight-y&&(F.current=!0,ae(!0),v().finally(()=>{F.current=!1,ae(!1)}))},[v,y]),de=(0,c.useCallback)((e,t)=>{ne(n=>{if(n.get(e)===t)return n;let r=new Map(n);return r.set(e,t),r})},[]),{offsets:G,totalHeight:fe}=(0,c.useMemo)(()=>Jn(e.length,N,i,o),[e.length,N,i,o]);(0,c.useLayoutEffect)(()=>{let e=le.current,t=W.current;if(W.current=G,!e||e.scrollTop===0||t.length===0){H.current=N;return}let n=0;for(let[r,a]of N){let o=H.current.get(r)??i;a!==o&&t[r+1]!==void 0&&t[r+1]<=e.scrollTop&&(n+=a-o)}H.current=N,n!==0&&(e.scrollTop+=n)},[G,N,i]);let{startIndex:pe,endIndex:me}=(0,c.useMemo)(()=>Yn(G,j,M,a,e.length),[G,j,M,a,e.length]),he=!!n?.length,ge=he?n.filter(e=>ce.has(e.key)):[],K=he?`${x&&he?`40px `:``}${Xn(ge)}`:void 0,q=_!==!1&&he;function _e(e){let t=new Set(ce);if(t.has(e)){if(t.size<=1)return;t.delete(e)}else t.add(e);let n=[...t];B||se(t),g?.(n)}function J(e,t){return p?p(e,t):t}function ve(e){I||R(e),C?.(e)}function ye(e){let t=new Set(z);t.has(e)?t.delete(e):t.add(e),ve(t)}function be(){let t=e.map((e,t)=>J(e,t));ve(t.every(e=>z.has(e))?new Set:new Set(t))}let xe=e.length>0&&e.every((e,t)=>z.has(J(e,t))),Se=!xe&&e.some((e,t)=>z.has(J(e,t))),Ce=[];for(let n=pe;n<=me;n++){let r=e[n],i=J(r,n),a=s!=null&&i===s||z.has(i);Ce.push((0,f.jsx)(Zn,{index:n,top:G[n],columnTemplate:K,isSelected:a,showDivider:w,onClick:()=>m?.(r,n),onHeightChange:de,rowClassName:D?.row,rowStyle:O?.row,children:he?(0,f.jsxs)(f.Fragment,{children:[x&&(0,f.jsx)(`div`,{className:(0,l.default)(Q.virtualListSelectCell,D?.selectCell),style:O?.selectCell,role:`gridcell`,onClick:e=>e.stopPropagation(),children:(0,f.jsx)(U,{selected:z.has(i),onToggle:()=>ye(i),"aria-label":`Select row`})}),ge.map(e=>(0,f.jsx)(`div`,{className:(0,l.default)(Q.virtualListCell,D?.cell),style:O?.cell,role:`gridcell`,children:e.renderCell(r,n)},e.key))]}):t?.(r,n)},i))}return(0,f.jsxs)(`div`,{...k,ref:le,className:(0,l.default)(Q.virtualList,T,D?.root),style:{height:r,...E,...O?.root},onScroll:ue,role:he?`grid`:`list`,children:[he&&(0,f.jsxs)(`div`,{className:(0,l.default)(Q.virtualListHeader,D?.header),style:{gridTemplateColumns:K,...q?{paddingRight:32}:{},...O?.header},role:`row`,children:[x&&(0,f.jsx)(`div`,{className:(0,l.default)(Q.virtualListSelectCell,D?.selectCell),style:O?.selectCell,role:`columnheader`,children:(0,f.jsx)(U,{selected:xe||Se,onToggle:be,"aria-label":`Select all rows`})}),ge.map(e=>(0,f.jsx)(`div`,{className:(0,l.default)(Q.virtualListHeaderCell,D?.headerCell),style:O?.headerCell,role:`columnheader`,children:e.label},e.key)),q&&(0,f.jsxs)(`div`,{ref:V,className:Q.virtualListToggleWrapper,children:[(0,f.jsx)(`button`,{type:`button`,className:(0,l.default)(Q.virtualListHeaderToggle,D?.headerToggle),style:O?.headerToggle,onClick:()=>P(e=>!e),"aria-label":`Toggle column visibility`,children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faGear,style:O?.headerToggle})}),re&&(0,f.jsx)(`div`,{className:(0,l.default)(Q.virtualListTogglePopover,D?.togglePopover),style:O?.togglePopover,children:n.map(e=>(0,f.jsx)(U,{className:(0,l.default)(Q.virtualListToggleItem,D?.toggleItem),style:O?.toggleItem,selected:ce.has(e.key),onToggle:()=>_e(e.key),cursorDefault:!1,children:e.label},e.key))})]})]}),b?(0,f.jsx)(`div`,{className:Q.virtualListLoadingFull,children:(0,f.jsx)(A,{className:Q.virtualListSpinner})}):(0,f.jsx)(`div`,{className:(0,l.default)(Q.virtualListBody,D?.body),style:{height:fe,...O?.body},children:Ce}),ie&&(0,f.jsx)(`div`,{className:(0,l.default)(Q.virtualListLoadingIndicator,D?.loadingIndicator),style:O?.loadingIndicator,children:(0,f.jsx)(A,{className:Q.virtualListSpinner})})]})}var $n={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 er({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)($n.wizard,a?.root,r),style:y,children:(0,f.jsx)(`div`,{className:(0,l.default)($n.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)($n.wizardContent,a?.step),style:{width:`${100/t}%`,marginLeft:`${100/t*i}%`,...o?.step},children:(0,f.jsx)(`div`,{className:(0,l.default)({[$n.wizardContentOutOfFrame]:e!==i&&!p},a?.stepContent),style:o?.stepContent,inert:e===i?void 0:!0,children:n(i)})},`wizardStep${i}`))})})}function tr(e){let t=e;return t?.errors&&Array.isArray(t.errors)?t.errors.flatMap(e=>Object.entries(e).map(([e,t])=>({id:e,message:t}))):[]}var nr=class{#e;#t;#n;#r;#i;constructor(e,t=null,{initialValues:n,onSubmit:r=()=>void 0,onValidate:i=()=>void 0,errorParser:a=tr,onSubmitError:o=()=>void 0}={}){this.#t=!1,this.#i=[],this.getFormError=()=>{let e=Object.keys(this.group);for(let t=0;t<e.length;t+=1){let n=e[t];if(this.group[n].errors.length>0)return this.group[n].errors[0]}return null},this.set=(e,t)=>(this.group[e].set(t),this),this.reset=(e={})=>{this.submitCount=0;let t=Object.keys(e);Object.keys(this.group).forEach(n=>{this.group[n].set(t.includes(n)?e[n]:this.#r[n],!1)}),this.resetDirtyAndTouched(),this.onReset&&this.onReset(this,this.#r,this.#e)},this.resetDirtyAndTouched=()=>{Object.keys(this.group).forEach(e=>{this.group[e].dirty=!1,this.group[e].touched=!1})},this.parseError=(e,t=!1)=>{let n=this.errorParser(e);n.length>0?(n.forEach(({id:e,message:t})=>{this.group[e]&&this.group[e].addError({id:e,message:t})}),t&&this.onSubmitError(n)):this.onSubmitError([{id:`generic`,message:`An error occurred`}])},this.#a=()=>{this.component&&this.component.forceUpdate(),this.#i.forEach(e=>e())},this.registerOnUpdateListener=e=>{this.#i.push(e)},this.removeOnUpdateListener=e=>{this.#i.splice(this.#i.indexOf(e),1)},this.setSubmitting=e=>{this.#t!==e&&(this.#t=e,this.#a())},this.submit=async e=>{e&&(e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()),this.setSubmitting(!0);let t=null;this.submitCount===0?t=await Promise.resolve(this.validate()):this.onValidateCallback&&(t=await Promise.resolve(this.onValidateCallback(this)));let n=this.getFormError()||t;if(n){this.setSubmitting(!1),this.submitCount>-1&&this.onSubmitError([n]),this.submitCount+=1,this.#a();return}try{await this.onSubmitCallback(this.getValues(),this),this.resetDirtyAndTouched()}catch(e){this.parseError(e,!0)}this.setSubmitting(!1),this.#a(),this.submitCount+=1},this.getValues=()=>{let e={};return Object.keys(this.group).forEach(t=>{e[t]=this.group[t].value}),{...this.#e,...e}},this.validate=()=>{if(Object.keys(this.group).forEach(e=>{this.group[e].validate(),this.group[e].touched=!0}),this.onValidateCallback)return this.onValidateCallback(this)},this.setValidator=(e,t)=>(this.group[e]=t,this),this.group=e,this.#e=n??{},this.#r={},this.submitCount=0,this.onDebounce=()=>{},this.onReset=()=>{},Object.keys(this.group).forEach(e=>{let t=this.group[e],n=this.#e;n[e]!==void 0&&t.set(n[e]),this.#r[e]=t.value,this.group[e].registerOnUpdateListener(()=>{this.#a(),this.submitCount=0,this.#n&&clearTimeout(this.#n),this.#n=setTimeout(()=>this.onDebounce(this.getValues()),500)})}),this.component=t,this.onSubmitCallback=r,this.onValidateCallback=i,this.errorParser=a,this.onSubmitError=o,this.setSubmitting(!1)}get isSubmitting(){return this.#t}get wasTouched(){return Object.keys(this.group).some(e=>this.group[e].touched)}get isDirty(){return Object.keys(this.group).some(e=>this.group[e].dirty)}get hasErrors(){return Object.keys(this.group).some(e=>this.group[e].errors.length>0)}get initialValues(){return{...this.#e}}#a};function rr(e){return function({children:t,...n}){return(0,f.jsx)(`form`,{onSubmit:e.submit,noValidate:!0,...n,children:t})}}var ir=e=>{Un(e[0].message,{type:`error`})},ar=class extends nr{constructor(e,t=null,n){super(e,t,{...n,onSubmitError:n?.onSubmitError??ir}),this.Form=rr(this)}},or=class{#e;#t;#n;#r;#i;constructor(e,t){this.addError=e=>{this.#r.push(e),this.onUpdate()},this.removeErrors=e=>{this.#r=this.#r.filter(t=>!e.includes(t.id)),this.onUpdate()},this.clearErrors=()=>{this.#r=[],this.onUpdate()},this.hasError=e=>!e&&this.errors.length>0?!0:!!this.errors.find(t=>t.id===e),this.getCurrentErrorMessage=()=>this.errors.length===0?null:this.errors[0].message,this.validate=()=>{this.clearErrors(),this.validators.forEach(e=>{let t=e(this.value,this.label);t&&this.addError(t)})},this.onUpdate=()=>{this.onUpdateCallbacks.forEach(e=>e(this))},this.registerOnUpdateListener=e=>{this.onUpdateCallbacks.push(e)},this.removeOnUpdateListener=e=>{this.onUpdateCallbacks.splice(this.onUpdateCallbacks.indexOf(e),1)},this.set=(e,t=!0)=>(this.value=e,t&&!this.dirty&&(this.dirty=!0),this.validate(),this),this.#e=e,this.validators=t??[],this.#t=!1,this.#n=!1,this.#r=[],this.#i=``,this.onUpdateCallbacks=[],this.validate()}get touched(){return this.#t}set touched(e){this.#t=e,this.onUpdate()}get label(){return this.#i}set label(e){this.#i=e}get dirty(){return this.#n}set dirty(e){this.#n=e,this.onUpdate()}get value(){return this.#e}set value(e){this.#e=e,this.onUpdate()}get errors(){return this.#r}};or.prototype.toString=function(){return`${this.value}`};function sr(e){return/^[0-9]+$/.test(e)}function cr(e){return/^[0-9]{2}.[0-9]{2}.[0-9]{4}$/.test(e)}function lr(e){return/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}Z$/.test(e)}function ur(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-ZöäüÜÖÄß\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function dr(e){return/^[A-Z]{6}[A-Z\d]{2}([A-Z\d]{3})?$/.test(e)}function fr(e){return/[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}(\/[-a-zA-Z0-9@:%_+.~#?&//=]*)?$/.test(e)}function pr(e){return/^[\w!@#$%^&*?±§~`'"/\\[\]{}\-,.();:><+=|öäüÖÄÜß €μ]{8,}$/.test(e)}function mr(e){return/^(?=.*[a-zöäüA-ZÖÄÜß])/.test(e)}function hr(e){return/^(?=.*\d)/.test(e)}function gr(e){return pr(e)&&mr(e)&&hr(e)}var $={t:(e,t)=>({"formValidators.minLength":`Must be at least ${t?.min} characters long`,"formValidators.maxLength":`Must be at most ${t?.max} characters long`,"formValidators.email":`Must be a valid email address`,"formValidators.required":`${t?.label||`Value`} is required`,"formValidators.value":`Value`,"formValidators.mustBeNumber":`Must be a number`,"formValidators.oneOf":`Must be one of the following values: ${t?.allowedValues}`,"formValidators.typeOf":`Must have type of ${t?.allowedTypes}`,"formValidators.multiEmail":`Must be a comma or semicolon separated list of valid email addresses`,"formValidators.date":`Must be a valid date`,"garages.errors.website":`Must be a valid URL`,"garages.errors.bic":`Must be a valid BIC`,"formValidators.minLetters":`Must contain at least ${t?.smart_count} letters`,"formValidators.minDigits":`Must contain at least ${t?.smart_count} digits`})[e]||e},_r=class e{static{this.minLength=(e,t)=>n=>!n||n.length<e?{id:`minLength`,message:t||$.t(`formValidators.minLength`,{min:e})}:null}static{this.maxLength=(e,t)=>n=>n&&n.length>e?{id:`maxLength`,message:t||$.t(`formValidators.maxLength`,{max:e})}:null}static{this.email=e=>t=>t&&!ur(t)?{id:`email`,message:e||$.t(`formValidators.email`)}:null}static{this.required=e=>{function t(t,n){return!t&&t!==0?{id:`required`,message:e||$.t(`formValidators.required`,{label:n||$.t(`formValidators.value`)})}:null}return t.validatorId=`required`,t}}static{this.mustBeNumber=e=>t=>t&&Number.isNaN(+t)?{id:`mustBeNumber`,message:e||$.t(`formValidators.mustBeNumber`)}:null}static{this.oneOf=(e,t)=>n=>n&&!e.includes(n)?{id:`oneOf`,message:t||$.t(`formValidators.oneOf`,{allowedValues:e})}:null}static{this.typeOf=(e,t)=>n=>{if(Array.isArray(e)){for(let t=0;t<e.length;t+=1)if(typeof n===e[t])return null}else if(typeof n===e)return null;return{id:`typeOf`,message:t||`Must have type of ${e}`}}}static{this.multiEmail=e=>t=>{if(t){let n=t.replace(/ /g,``).replace(/,/g,`;`).split(`;`);for(let t=0;t<n.length;t+=1)if(!ur(n[t]))return{id:`multiEmail`,message:e||$.t(`formValidators.multiEmail`)}}return null}}static{this.date=e=>t=>t&&!cr(t)&&!lr(t)?{id:`date`,message:e||$.t(`formValidators.date`)}:null}static{this.dateObject=e=>t=>t&&!t.isValid?{id:`date`,message:e||$.t(`formValidators.date`)}:null}static{this.website=e=>t=>t&&!fr(t)?{id:`website`,message:e||$.t(`garages.errors.website`)}:null}static{this.bic=e=>t=>t&&!dr(t)?{id:`bic`,message:e||$.t(`garages.errors.bic`)}:null}static{this.minLetters=(e,t)=>n=>n&&n.replace(/[^a-zöäüA-ZÖÄÜß]/g,``).length<e?{id:`minLetters`,message:t||$.t(`formValidators.minLetters`,{smart_count:e})}:null}static{this.minDigits=(e,t)=>n=>n&&n.replace(/[\D]/g,``).length<e?{id:`minDigits`,message:t||$.t(`formValidators.minDigits`,{smart_count:e})}:null}static{this.password=t=>n=>{let r=e.minLength(8)(n)||e.minLetters(1)(n)||e.minDigits(1)(n);return r?t?{id:`password`,message:t}:r:null}}},vr=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)(ge,{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 yr(e){let[,t]=(0,c.useReducer)(e=>e+1,0);return(0,c.useEffect)(()=>{if(e)return e.registerOnUpdateListener(t),()=>e.removeOnUpdateListener(t)},[e]),e}function br(e,{initialValues:t,onSubmit:n,onValidate:r,errorParser:i,onSubmitError:a}={}){let[,o]=(0,c.useReducer)(e=>e+1,0),s=(0,c.useRef)(null);s.current||=new ar(e,null,{initialValues:t,errorParser:i,onSubmitError:a});let l=s.current,u=(0,c.useRef)(n),d=(0,c.useRef)(r);return u.current=n,d.current=r,(0,c.useEffect)(()=>(n!==void 0&&(l.onSubmitCallback=(...e)=>u.current?.(...e)),r!==void 0&&(l.onValidateCallback=(...e)=>d.current?.(...e)),l.registerOnUpdateListener(o),()=>l.removeOnUpdateListener(o)),[]),l}exports.Accordion=T,exports.AccordionStyleType=b,exports.ActionButtons=ie,exports.ActionIcon=R,exports.Align=fe,exports.BodyEnd=z,exports.Button=P,exports.ButtonSize=ee,exports.ButtonStyleType=j,exports.ButtonType=M,exports.Card=oe,exports.CardActions=V,exports.CardContent=le,exports.CardHeader=se,exports.CardMedia=ce,exports.Checkbox=U,exports.Chip=ue,exports.ChipContainer=de,exports.ColorPicker=De,exports.ConfirmModal=Ae,exports.DatePicker=it,exports.Dropdown=nt,exports.EmptyState=ot,exports.Fab=ut,exports.FloatingMenu=me,exports.FormValidator=or,exports.FormValidatorGroup=ar,exports.IconLoading=Dt,exports.IconPicker=mt,exports.IdleManager=gt,exports.InfiniteBlock=tt,exports.Input=_e,exports.InputDropdown=bt,exports.InputType=q,exports.InteractableDiv=I,exports.KanbanBoard=wt,exports.KanbanColumn=Ct,exports.Modal=ke,exports.NumberInput=At,exports.OptionPicker=Mt,exports.Overscroll=It,exports.ProgressBar=zt,exports.Ripple=N,exports.RoomDrawer=pn,exports.RoomViewer=hn,exports.ScrollbarProvider=vn,exports.SearchInput=bn,exports.SpinnerLoading=A,exports.Stepper=Cn,exports.TenorPicker=jn,exports.Textarea=Mn,exports.ThemeProvider=Fn,exports.ToastProvider=qn,exports.Tooltip=ge,exports.ValidatableComponent=vr,exports.Validators=_r,exports.VirtualList=Qn,exports.Wizard=er,exports.defaultTheme=Nn,exports.getLocale=Re,exports.hasEightPasswordChars=pr,exports.hasOnePasswordDigit=hr,exports.hasOnePasswordLetter=mr,exports.isBic=dr,exports.isDate=cr,exports.isEmail=ur,exports.isISODate=lr,exports.isNumber=sr,exports.isPassword=gr,exports.isURL=fr,exports.mapLocale=Fe,exports.setLocale=Le,exports.showToast=Un,exports.useFormValidator=yr,exports.useFormValidatorGroup=br,exports.useTheme=In;
6
6
  //# sourceMappingURL=index.cjs.map