@ahrowe/ui 0.17.3 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/common/optionPicker/optionPicker.mjs +1 -1
- package/dist/esm/common/optionPicker/optionPicker.mjs.map +1 -1
- package/dist/esm/common/optionPicker/optionPicker.module.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/package/common/configProvider/configProvider.types.d.ts +2 -0
- package/dist/types/package/common/optionPicker/optionPicker.d.ts +1 -1
- package/dist/types/package/common/optionPicker/optionPicker.types.d.ts +5 -1
- package/docs/ConfigProvider.md +1 -1
- package/docs/OptionPicker.md +4 -0
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"../interactableDiv/index.mjs";import
|
|
1
|
+
import{useComponentDefaults as e}from"../configProvider/useComponentDefaults.mjs";import t from"../interactableDiv/index.mjs";import n from"./optionPicker.module.mjs";import r from"classnames";import{jsx as i,jsxs as a}from"react/jsx-runtime";function o(o){let{className:s=void 0,style:c,classNames:l,styles:u,options:d,onChange:f,value:p,...m}=e(`OptionPicker`,o),h=d.findIndex(e=>e.key===p)*100/d.length;return a(`div`,{...m,className:r(n.optionPicker,s,l?.root),style:{...c,...u?.root},children:[i(`div`,{className:r(n.optionPickerChip,l?.chip),style:{left:`${h}%`,width:`${100/d.length}%`,...u?.chip}}),d.map(e=>i(t,{onClick:t=>f(e.key,t),className:r(n.optionPickerOption,e.key===p&&n.optionPickerOptionActive,l?.option),style:u?.option,tabIndex:e.key===p?-1:0,children:e.label},e.key))]})}export{o as default};
|
|
2
2
|
//# sourceMappingURL=optionPicker.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionPicker.mjs","names":[],"sources":["../../../../package/common/optionPicker/optionPicker.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { OptionPickerProps } from './optionPicker.types';\nimport cx from 'classnames';\n\nimport styles from './optionPicker.module.pcss';\nimport InteractableDiv from '../interactableDiv';\n\n\nfunction OptionPicker({\n className = undefined,\n
|
|
1
|
+
{"version":3,"file":"optionPicker.mjs","names":[],"sources":["../../../../package/common/optionPicker/optionPicker.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { OptionPickerProps } from './optionPicker.types';\nimport cx from 'classnames';\n\nimport styles from './optionPicker.module.pcss';\nimport InteractableDiv from '../interactableDiv';\nimport { useComponentDefaults } from '../configProvider';\n\n\nfunction OptionPicker(props: OptionPickerProps): ReactElement {\n const {\n className = undefined,\n style,\n classNames,\n styles: slotStyles,\n options,\n onChange,\n value,\n ...rest\n } = useComponentDefaults('OptionPicker', props);\n\n const optionPickerLeft = options.findIndex((option) => option.key === value) * 100 / options.length;\n\n return (\n <div {...rest} className={cx(styles.optionPicker, className, classNames?.root)} style={{ ...style, ...slotStyles?.root }}>\n <div\n className={cx(styles.optionPickerChip, classNames?.chip)}\n style={{ left: `${optionPickerLeft}%`, width: `${100 / options.length}%`, ...slotStyles?.chip }}\n />\n {options.map((option) => (\n <InteractableDiv\n onClick={(e) => onChange(option.key, e)}\n key={option.key}\n className={cx(\n styles.optionPickerOption,\n option.key === value && styles.optionPickerOptionActive,\n classNames?.option\n )}\n style={slotStyles?.option}\n tabIndex={option.key === value ? -1 : 0}\n >\n {option.label}\n </InteractableDiv>\n ))}\n </div>\n );\n}\n\nexport default OptionPicker;\n"],"mappings":"mPASA,SAAS,EAAa,EAAwC,CAC5D,GAAM,CACJ,YAAY,IAAA,GACZ,QACA,aACA,OAAQ,EACR,UACA,WACA,QACA,GAAG,GACD,EAAqB,eAAgB,CAAK,EAExC,EAAmB,EAAQ,UAAW,GAAW,EAAO,MAAQ,CAAK,EAAI,IAAM,EAAQ,OAE7F,OACE,EAAC,MAAD,CAAK,GAAI,EAAM,UAAW,EAAG,EAAO,aAAc,EAAW,GAAY,IAAI,EAAG,MAAO,CAAE,GAAG,EAAO,GAAG,GAAY,IAAK,WAAvH,CACE,EAAC,MAAD,CACE,UAAW,EAAG,EAAO,iBAAkB,GAAY,IAAI,EACvD,MAAO,CAAE,KAAM,GAAG,EAAiB,GAAI,MAAO,GAAG,IAAM,EAAQ,OAAO,GAAI,GAAG,GAAY,IAAK,CAC/F,CAAA,EACA,EAAQ,IAAK,GACZ,EAAC,EAAD,CACE,QAAU,GAAM,EAAS,EAAO,IAAK,CAAC,EAEtC,UAAW,EACT,EAAO,mBACP,EAAO,MAAQ,GAAS,EAAO,yBAC/B,GAAY,MACd,EACA,MAAO,GAAY,OACnB,SAAU,EAAO,MAAQ,EAAQ,GAAK,WAErC,EAAO,KACO,EAVV,EAAO,GAUG,CAClB,CACE,GAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionPicker.module.mjs","names":[],"sources":["../../../../package/common/optionPicker/optionPicker.module.pcss"],"sourcesContent":[".optionPicker{\n display: flex;\n width: 100%;\n
|
|
1
|
+
{"version":3,"file":"optionPicker.module.mjs","names":[],"sources":["../../../../package/common/optionPicker/optionPicker.module.pcss"],"sourcesContent":[".optionPicker{\n display: flex;\n width: 100%;\n border-radius: var(--default-border-radius);\n border: 1px solid var(--border-color);\n justify-content: space-around;\n position: relative;\n overflow: hidden;\n\n &-chip {\n position: absolute;\n height: 100%;\n top: 0;\n left: 0;\n background: var(--primary-color);\n border-radius: var(--default-border-radius);\n transition: left 0.25s ease-in-out, width 0.25s ease-in-out;\n }\n\n &-option {\n position: relative;\n width: 100%;\n height: 100%;\n display: block;\n text-align: center;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n padding: var(--spacing-m);\n overflow: hidden;\n text-overflow: ellipsis;\n border-radius: var(--default-border-radius);\n transition: color 0.25s;\n\n &:focus {\n outline: var(--primary-color) solid 2px;\n outline-offset: -2px;\n }\n\n &-active {\n color: var(--text-on-primary);\n }\n }\n}\n"],"mappings":""}
|
package/dist/index.cjs
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.
|
|
|
5
5
|
While dragging, use the arrow keys to move it — for a card, between positions and columns;
|
|
6
6
|
for a column, left/right to reorder it.
|
|
7
7
|
Press space or enter again to drop it, or press escape to cancel.
|
|
8
|
-
`};function Vr({columns:e,items:t,renderItem:n,onChange:r,dragHandle:i,getItemLabel:a=Ir,getItemDisabled:o,renderEmptyColumn:s,renderColumnActions:u,reorderableColumns:d,collapseEmptyColumns:p,columnMaxHeight:m,onLoadMore:h,loadMoreThreshold:v,className:y,style:b,classNames:x,styles:S,...C}){let[w,T]=(0,c.useState)(null),[E,D]=(0,c.useState)(!1),[O,k]=(0,c.useState)(null),A=(0,c.useRef)(null),j=(0,g.useSensors)((0,g.useSensor)(g.MouseSensor,Lr),(0,g.useSensor)(g.TouchSensor,Rr),(0,g.useSensor)(g.KeyboardSensor,zr)),M=O??e,N=(0,c.useMemo)(()=>M.map(e=>e.id),[M]),P=(0,c.useMemo)(()=>Nr(M,t,a),[M,t,a]),F=(0,c.useMemo)(()=>({announcements:P,screenReaderInstructions:Br}),[P]);function I({active:t}){T(String(t.id)),D(Or(t.data.current)),k(e),A.current=null}function L({active:t,over:n}){if(!n)return;if(Or(t.data.current)){let r=String(t.id),i=String(n.id);k(t=>{let n=t??e,a=kr(n,r,i);return a===n?t:a});return}let r=String(t.id),i=String(n.id),a=t.rect.current.translated??t.rect.current.initial,o=a?`${a.top}:${a.left}`:null;o!==null&&o===A.current||(A.current=o,k(t=>{let o=t??e,s=Mr(o,r,i,{activeRect:a,overRect:n.rect});return s===o?t:s}))}function R({over:t}){if(T(null),D(!1),!t||!O){k(null);return}Er(O,e)||r(O),k(null)}function z(){T(null),D(!1),k(null)}let B=w&&E?M.find(e=>e.id===w):void 0;return(0,f.jsxs)(g.DndContext,{sensors:j,collisionDetection:Ar,onDragStart:I,onDragOver:L,onDragEnd:R,onDragCancel:z,accessibility:F,children:[(0,f.jsx)(_.SortableContext,{id:`kanban-columns`,items:N,strategy:_.horizontalListSortingStrategy,children:(0,f.jsx)(`div`,{...C,className:(0,l.default)(Z.board,y),style:b,children:M.map(e=>(0,f.jsx)(Tr,{id:e.id,title:e.title,itemIds:e.itemIds,maxItems:e.maxItems,disabled:e.disabled,getItemDisabled:o,emptyPlaceholder:s?.(e),actions:u?.(e),reorderable:d,activeIsColumn:w!==null&&E,collapseEmptyColumns:p,columnMaxHeight:m,hasMore:e.hasMore,onLoadMore:h?()=>h(e.id):void 0,loadMoreThreshold:v,items:t,renderItem:n,dragHandle:i,preserveSizeWhileEmpty:w!==null},e.id))})}),(0,f.jsx)(g.DragOverlay,{children:B?(0,f.jsx)(`div`,{className:(0,l.default)(Z.column,Z.columnDragOverlay),children:(0,f.jsx)(`div`,{className:Z.columnHeader,children:(0,f.jsx)(`span`,{className:Z.columnHeaderTitle,children:B.title})})}):w&&!E&&t[w]!==void 0?(0,f.jsx)(`div`,{className:(0,l.default)(Z.dragOverlay,x?.dragOverlay),style:S?.dragOverlay,children:n(t[w],w)}):null})]})}var Hr=`https://api.klipy.com/v2`,Ur=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(`${Hr}/search?${n}`)).json()}async searchSuggestions(e){let t=new URLSearchParams({q:e,key:this.key});return(await fetch(`${Hr}/search_suggestions?${t}`)).json()}registerShare(e,t){let n=new URLSearchParams({id:t,q:e,key:this.key});fetch(`${Hr}/registershare?${n}`).catch(()=>null)}},Wr={resultCount:`resultCount_Sn48Q`};function Gr({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)(Dt,{type:wt.Search,label:i,placeholder:r,value:e,onChange:m}),h&&(0,f.jsxs)(`p`,{className:Wr.resultCount,children:[o,` `,o===1?`result`:`results`]})]})}var Kr={gifPreview:`gifPreview_jAXT2`,"gifPreview-image":`gifPreview-image_41bwm`,gifPreviewImage:`gifPreview-image_41bwm`,"gifPreview-image-container":`gifPreview-image-container_5hAjJ`,gifPreviewImageContainer:`gifPreview-image-container_5hAjJ`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_9EI0A`};function qr({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)(Kr.gifPreview,e),onScroll:i,children:t.map((e,t)=>(0,f.jsx)(U,{className:Kr.gifPreviewImageContainer,onClick:()=>n?.(e),children:(0,f.jsx)(`div`,{className:Kr.gifPreviewImage,style:{backgroundImage:`url(${e.media_formats.tinygif.url})`}})},`${e.id}_${t}`))})})}var Jr={gifView:`gifView_YUeLK`,"gifView-loading":`gifView-loading_N1Lzx`,gifViewLoading:`gifView-loading_N1Lzx`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_OmJUc`};function Yr({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)(Jr.gifView,e),children:[(0,f.jsx)(`img`,{className:Jr.klipyPickerSelected,src:t,onLoad:()=>r(!1)}),n&&(0,f.jsx)(`div`,{className:Jr.gifViewLoading})]})}var Xr={"klipyPicker-selected":`klipyPicker-selected_Watxl`,klipyPickerSelected:`klipyPicker-selected_Watxl`,"klipyPicker-modal-content":`klipyPicker-modal-content_3CBV9`,klipyPickerModalContent:`klipyPicker-modal-content_3CBV9`,"klipyPicker-suggestions-container":`klipyPicker-suggestions-container_-csDI`,klipyPickerSuggestionsContainer:`klipyPicker-suggestions-container_-csDI`,"klipyPicker-suggestions-item":`klipyPicker-suggestions-item_nHHSA`,klipyPickerSuggestionsItem:`klipyPicker-suggestions-item_nHHSA`};function Zr({className:e,token:t=``,isModal:n=!1,onSelect:r=()=>void 0,selected:i=null}){let a=(0,c.useMemo)(()=>new Ur(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)(_t,{inline:!0,className:Xr.klipyPickerSuggestionsContainer,children:p.map(e=>(0,f.jsx)(gt,{className:Xr.klipyPickerSuggestionsItem,text:e,onClick:()=>y(e)},e))})}function C(){return(0,f.jsx)(qr,{previewItems:u,onSelect:x,onLoadAdditional:b})}function w(){return(0,f.jsx)(Gr,{label:`Pick gif`,value:o,onDebounce:y,onChange:s})}return n?(0,f.jsxs)(`div`,{className:(0,l.default)(Xr.klipyPicker,e),children:[(0,f.jsxs)(`div`,{className:j.actionButtons,children:[(0,f.jsx)(H,{onClick:()=>v(!0),children:`Pick gif`}),i&&(0,f.jsx)(H,{styleType:I.Delete,onClick:()=>x(null),children:`Remove gif`})]}),i&&(0,f.jsx)(Yr,{className:Xr.klipyPickerSelected,src:i}),(0,f.jsx)(Ht,{isOpen:_,onClose:()=>v(!1),children:(0,f.jsxs)(`div`,{className:Xr.klipyPickerModalContent,children:[w(),S(),C()]})})]}):(0,f.jsxs)(`div`,{className:(0,l.default)(Xr.klipyPicker,e),children:[(0,f.jsx)(We,{align:He.Left,isOpen:u.length>0&&_,onOpenChange:v,dontCloseOnChildClick:!0,content:(0,f.jsxs)(f.Fragment,{children:[S(),C()]}),children:w()}),i&&(0,f.jsx)(H,{styleType:I.Delete,onClick:()=>x(null),children:`Remove gif`}),i&&(0,f.jsx)(Yr,{className:Xr.klipyPickerSelected,src:i})]})}var Qr={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 $r({className:e=``}){return(0,f.jsx)(`div`,{className:(0,l.default)(Qr.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:Qr.iconLoadingFirst,d:`M 0 0 C 3 5 6 5 6 12`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:Qr.iconLoadingFirst,d:`M 0 0 C -3 5 -6 5 -6 12`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:Qr.iconLoadingFirst,d:`M 0 0 L 0 10`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:Qr.iconLoadingSecond,d:`M 0.1 10 C -3 10 -4 10 -6 12`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:Qr.iconLoadingSecond,d:`M -0.1 10 C 3 10 4 10 6 12`,strokeWidth:`1.7`,fill:`none`})]})})}var ei=$r,ti={numberInput:`numberInput_7p2O3`,arrows:`arrows_yjRlc`,arrowBtn:`arrowBtn_DbJoa`};function ni(e){let t=c.default.useRef(void 0),{value:n,onChange:r,formValidator:i,label:a,error:o,className:s,style:p,allowNegative:m=!1,decimalSeparator:h,thousandSeparator:g,prefix:_,suffix:v,decimalScale:b,fixedDecimalScale:x=!0,placeholder:S,sign:C,showArrows:w=!1,step:T=1,readOnly:E=!1,isRequired:D=!1,onKeyDown:k,...A}=O(`NumberInput`,e),[,j]=c.default.useState(0);c.default.useEffect(()=>{if(t.current=i,!i)return;let e=()=>j(e=>e+1);return i.registerOnUpdateListener(e),()=>{i.removeOnUpdateListener(e)}},[i]);let M=D||!!i?.validators.find(e=>e.validatorId===`required`),N=i==null?n:i.value,P=C!=null&&N!=null?Math.abs(Number(N)):N,F=P==null?``:String(P);function I(e){let t=e;t!==void 0&&(C===`-`&&(t=-Math.abs(t)),C===`+`&&(t=Math.abs(t))),i?.set(t??null),r?.(t)}function L(e){if(E)return;let t=(N!=null&&N!==``?Number(N):0)+e;!m&&C!==`-`&&(t=Math.max(0,t)),C===`-`&&(t=Math.min(0,t)),I(t)}function R(e){if(E){k?.(e);return}if(e.key===`ArrowUp`){e.preventDefault(),L(e.shiftKey?T*10:T);return}if(e.key===`ArrowDown`){e.preventDefault(),L(e.shiftKey?-T*10:-T);return}k?.(e)}let z=C===`-`?`-`:C===`+`?`+`:_,B=w&&!E?(0,f.jsxs)(`div`,{className:ti.arrows,children:[(0,f.jsx)(U,{className:ti.arrowBtn,tabIndex:-1,onMouseDown:e=>{e.preventDefault(),L(e.shiftKey?T*10:T)},children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronUp})}),(0,f.jsx)(U,{className:ti.arrowBtn,tabIndex:-1,onMouseDown:e=>{e.preventDefault(),L(e.shiftKey?-T*10:-T)},children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronDown})})]}):null;return(0,f.jsx)(Dt,{label:a,className:(0,l.default)(ti.numberInput,s),style:p,value:F,onChange:()=>{},formValidator:null,isRequired:M,onBlur:()=>{t.current&&(t.current.touched=!0)},isValid:i?i.touched?!i.hasError():!0:!o,errorMessage:i?i.touched?i.getCurrentErrorMessage()??``:``:o??``,placeholder:S,readOnly:E,suffix:B,inputMode:b===0?`numeric`:`decimal`,customInput:(0,f.jsx)(y.NumericFormat,{onValueChange:e=>I(e.floatValue),allowNegative:C==null?m:!1,decimalSeparator:h,thousandSeparator:g,decimalScale:b,fixedDecimalScale:x,prefix:z,suffix:v,onKeyDown:w?R:k,...A})})}var ri=ni,ii={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 ai({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)(ii.optionPicker,e),children:[(0,f.jsx)(`div`,{className:ii.optionPickerChip,style:{left:`${a}%`,width:`${100/t.length}%`}}),t.map(e=>(0,f.jsx)(U,{onClick:t=>n(e.key,t),className:(0,l.default)(ii.optionPickerOption,e.key===r&&ii.optionPickerOptionActive),tabIndex:e.key===r?-1:0,children:e.label},e.key))]})}var oi=768;function si(){let[e,t]=(0,c.useState)(()=>({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<oi}));return(0,c.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<oi})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}var ci={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 li({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}=si(),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:ci.overscroll,ref:g,onScroll:D,children:[(0,f.jsx)(`div`,{className:ci.overscrollHeaderContainer,style:{height:`${a}${s}`},ref:v,children:(0,f.jsx)(`div`,{className:(0,l.default)(ci.overscrollHeader,r&&ci.overscrollHeaderCentered),ref:_,children:t})}),(0,f.jsx)(`div`,{style:{minHeight:O},children:e})]})}var ui={popover:`popover_hhmvN`,"popover-trigger":`popover-trigger_R4ckf`,popoverTrigger:`popover-trigger_R4ckf`,"popover-floating":`popover-floating_mhXrQ`,popoverFloating:`popover-floating_mhXrQ`,"popover-panel":`popover-panel_tVB2k`,popoverPanel:`popover-panel_tVB2k`,popoverIn:`popoverIn_nKOqX`,"popover-arrow":`popover-arrow_B8kB-`,popoverArrow:`popover-arrow_B8kB-`},di=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({}),fi=function(e){return e.Start=`start`,e.Center=`center`,e.End=`end`,e}({}),pi=function(e){return e.Click=`click`,e.Hover=`hover`,e.Focus=`focus`,e}({}),mi={[di.Top]:`bottom`,[di.Bottom]:`top`,[di.Left]:`right`,[di.Right]:`left`},hi=8;function gi({isOpen:e,placement:t,align:n,offset:r,triggerRef:i,floatingRef:a,panelRef:o,arrowRef:s}){(0,c.useLayoutEffect)(()=>{if(!e)return;let c,l;function u(){let e=i.current,d=a.current,f=o.current;if(!e||!d||!f){c=requestAnimationFrame(u);return}let p=Fe(e);function m(){let i=e.getBoundingClientRect(),a=f.offsetWidth,o=f.offsetHeight,c=window.innerWidth,l=window.innerHeight,u={top:i.top,bottom:l-i.bottom,left:i.left,right:c-i.right},m=t===di.Top||t===di.Bottom?o:a,h=t,g=mi[t];u[h]<m+r&&u[g]>u[h]&&(h=g);let _=h===`top`||h===`bottom`,v,y;h===`bottom`?v=i.bottom+r:h===`top`?v=i.top-r-o:y=h===`right`?i.right+r:i.left-r-a,_?(y=n===fi.Start?i.left:n===fi.End?i.right-a:i.left+i.width/2-a/2,y=Math.max(hi,Math.min(y,c-a-hi))):(v=n===fi.Start?i.top:n===fi.End?i.bottom-o:i.top+i.height/2-o/2,v=Math.max(hi,Math.min(v,l-o-hi))),d.style.top=`${v}px`,d.style.left=`${y}px`,d.style.visibility=Ie(i,p)?`hidden`:`visible`,d.dataset.placement=h;let b=s.current;if(b){let e=b.offsetWidth/2||5;if(_){let t=i.left+i.width/2-y;b.style.setProperty(`--arrow-x`,`${Math.max(e+2,Math.min(t,a-e-2))}px`),b.style.removeProperty(`--arrow-y`)}else{let t=i.top+i.height/2-v;b.style.setProperty(`--arrow-y`,`${Math.max(e+2,Math.min(t,o-e-2))}px`),b.style.removeProperty(`--arrow-x`)}}}m();let h=[window,...p];h.forEach(e=>e.addEventListener(`scroll`,m,{passive:!0})),window.addEventListener(`resize`,m),l=()=>{h.forEach(e=>e.removeEventListener(`scroll`,m)),window.removeEventListener(`resize`,m)}}return u(),()=>{c!==void 0&&cancelAnimationFrame(c),l?.()}},[e,t,n,r,i,a,o,s])}function _i({children:e=null,content:t=null,placement:n=di.Bottom,align:r=fi.Center,trigger:i=pi.Click,isOpen:a,defaultOpen:o=!1,onOpenChange:s=()=>{},offset:u=10,withArrow:d=!0,closeOnOutsideClick:p=!0,closeOnEscape:m=!0,openDelay:h=100,closeDelay:g=120,disabled:_=!1,className:v,style:y,classNames:b,styles:x,...S}){let C=(0,c.useRef)(null),w=(0,c.useRef)(null),T=(0,c.useRef)(null),E=(0,c.useRef)(null),D=(0,c.useRef)(void 0),O=a!==void 0,[k,A]=(0,c.useState)(o),j=O?a:k,M=(0,c.useRef)(s);(0,c.useEffect)(()=>{M.current=s});let N=(0,c.useCallback)(e=>{_&&e||(O||A(e),M.current(e))},[_,O]);gi({isOpen:!!j,placement:n,align:r,offset:u,triggerRef:C,floatingRef:w,panelRef:T,arrowRef:d?E:{current:null}});let{restoreFocusToTrigger:P,focusAfterTrigger:F}=Ve({triggerRef:C,contentRef:w});(0,c.useEffect)(()=>{if(!j||i!==pi.Click)return;let e=Be(T.current);e.length!==0&&(w.current?.setAttribute(`role`,`dialog`),e[0].focus())},[j,i]);function I(e){if(e.key!==`Tab`||i!==pi.Click)return;let t=Be(T.current);if(t.length===0)return;let n=document.activeElement;!e.shiftKey&&n===t[t.length-1]?(e.preventDefault(),F(),N(!1)):e.shiftKey&&n===t[0]&&(e.preventDefault(),P(),N(!1))}(0,c.useEffect)(()=>{if(!j)return;function e(e){let t=e.target,n=w.current?.contains(t),r=C.current?.contains(t);!n&&!r&&N(!1)}function t(e){e.key===`Escape`&&(w.current?.contains(document.activeElement)&&(Be(C.current)[0]??C.current)?.focus(),N(!1))}function n(e){let t=e.target,n=w.current?.contains(t),r=C.current?.contains(t);!n&&!r&&N(!1)}return p&&i!==pi.Hover&&(window.addEventListener(`mouseup`,e),document.addEventListener(`focusin`,n)),m&&window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`mouseup`,e),document.removeEventListener(`focusin`,n),window.removeEventListener(`keydown`,t)}},[j,p,m,i,N]),(0,c.useEffect)(()=>()=>clearTimeout(D.current),[]);function L(e){clearTimeout(D.current),D.current=setTimeout(()=>N(e),e?h:g)}let R=i===pi.Click?{onClick:()=>N(!j)}:i===pi.Hover?{onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1)}:{onFocus:()=>N(!0),onBlur:()=>N(!1)},z=i===pi.Hover?{onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1)}:{};return(0,f.jsxs)(`div`,{...S,className:(0,l.default)(ui.popover,v,b?.root),style:{...y,...x?.root},children:[(0,f.jsx)(`div`,{ref:C,className:(0,l.default)(ui.popoverTrigger,b?.trigger),style:x?.trigger,...R,children:e}),j&&(0,f.jsx)(Ne,{children:(0,f.jsxs)(`div`,{ref:w,className:(0,l.default)(ui.popoverFloating,b?.floating),style:x?.floating,"data-placement":n,onKeyDown:I,...z,children:[(0,f.jsx)(`div`,{ref:T,className:(0,l.default)(ui.popoverPanel,b?.panel),style:x?.panel,children:t}),d&&(0,f.jsx)(`div`,{ref:E,className:(0,l.default)(ui.popoverArrow,b?.arrow),style:x?.arrow})]})})]})}var vi={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 yi(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 bi({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)(vi.progressBarFill,i===e.length-1&&vi.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:vi.progressBarLabel,style:n.color?{color:yi(n.color)}:{},children:n.label})},i)})}return(0,f.jsx)(`div`,{...i,className:(0,l.default)(vi.progressBar,e),style:r,children:a()})}var xi=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),Si={radioGroup:`radioGroup_5PUYO`,"radioGroup-horizontal":`radioGroup-horizontal_cfCch`,radioGroupHorizontal:`radioGroup-horizontal_cfCch`,"radioGroup-disabled":`radioGroup-disabled_O2hKy`,radioGroupDisabled:`radioGroup-disabled_O2hKy`,"radioGroup-error":`radioGroup-error_HVUcn`,radioGroupError:`radioGroup-error_HVUcn`,"radioGroup-radio":`radioGroup-radio_XLU2j`,radioGroupRadio:`radioGroup-radio_XLU2j`,"radioGroup-radio-checked":`radioGroup-radio-checked_AOEJu`,radioGroupRadioChecked:`radioGroup-radio-checked_AOEJu`,"radioGroup-option":`radioGroup-option_QxMeW`,radioGroupOption:`radioGroup-option_QxMeW`,"radioGroup-option-disabled":`radioGroup-option-disabled_Q0y35`,radioGroupOptionDisabled:`radioGroup-option-disabled_Q0y35`,"radioGroup-dot":`radioGroup-dot_Q-4Ge`,radioGroupDot:`radioGroup-dot_Q-4Ge`,"radioGroup-dot-checked":`radioGroup-dot-checked_7djgv`,radioGroupDotChecked:`radioGroup-dot-checked_7djgv`,"radioGroup-text":`radioGroup-text_8ekBs`,radioGroupText:`radioGroup-text_8ekBs`,"radioGroup-label":`radioGroup-label_hJD2S`,radioGroupLabel:`radioGroup-label_hJD2S`,"radioGroup-description":`radioGroup-description_xZSLE`,radioGroupDescription:`radioGroup-description_xZSLE`};function Ci(e){let{options:t=[],value:n,defaultValue:r,onChange:i=()=>{},orientation:a=xi.Vertical,disabled:o=!1,size:s=`18px`,tabIndex:u=0,formValidator:d=null,errorMessage:p=``,isValid:m=!0,className:h,style:g,classNames:_,styles:v,...y}=O(`RadioGroup`,e),b=(0,c.useRef)([]),x=(0,c.useRef)(d);(0,c.useEffect)(()=>{x.current=d});let[,S]=(0,c.useState)(0),[C,w]=(0,c.useState)(r),[T,E]=(0,c.useState)(!1),[D,k]=(0,c.useState)(!1);(0,c.useEffect)(()=>{if(!d)return;d.validate();let e=()=>S(e=>e+1);return d.registerOnUpdateListener(e),()=>d.removeOnUpdateListener(e)},[d]);let A=d?d.touched&&d.hasError():!m||!!p,j=d?d.getCurrentErrorMessage():p||``,M=n!==void 0&&!d,N=d?d.value:M?n:C;function P(e,t){d?d.set(e):M||w(e),i(e,t)}function F(e){e.currentTarget.contains(e.relatedTarget)||(E(!1),x.current&&(x.current.touched=!0))}let I=t.findIndex(e=>e.value===N),L=t.findIndex(e=>!e.disabled),R=I>=0?I:L;function z(e){b.current[e]?.focus()}function B(e,n,r){if(o||t.length===0)return;let i=n;for(let n=0;n<t.length;n++)if(i=(i+e+t.length)%t.length,!t[i].disabled){z(i),P(t[i].value,r);return}}function V(e,n){let r=t[n];switch(e.key){case`ArrowDown`:case`ArrowRight`:e.preventDefault(),B(1,n,e);break;case`ArrowUp`:case`ArrowLeft`:e.preventDefault(),B(-1,n,e);break;case` `:case`Enter`:e.preventDefault(),!o&&!r.disabled&&P(r.value,e);break;default:break}}return(0,f.jsxs)(`div`,{...y,role:`radiogroup`,"aria-orientation":a,"aria-disabled":o||void 0,"aria-invalid":A||void 0,className:(0,l.default)(Si.radioGroup,a===xi.Horizontal&&Si.radioGroupHorizontal,o&&Si.radioGroupDisabled,A&&Si.radioGroupError,h,_?.root),style:{"--radio-size":s,...g,...v?.root},onFocus:()=>E(!0),onBlur:F,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),children:[t.map((e,t)=>{let n=e.value===N,r=o||!!e.disabled;return(0,f.jsxs)(`div`,{ref:e=>{b.current[t]=e},role:`radio`,"aria-checked":n,"aria-disabled":r||void 0,tabIndex:r?-1:t===R?u:-1,className:(0,l.default)(Si.radioGroupOption,n&&Si.radioGroupOptionChecked,r&&Si.radioGroupOptionDisabled,_?.option),style:v?.option,onClick:()=>{r||P(e.value)},onKeyDown:e=>V(e,t),children:[(0,f.jsx)(`div`,{className:(0,l.default)(Si.radioGroupRadio,n&&Si.radioGroupRadioChecked,_?.radio),style:v?.radio,children:(0,f.jsx)(`div`,{className:(0,l.default)(Si.radioGroupDot,n&&Si.radioGroupDotChecked,_?.dot),style:v?.dot})}),(e.label??e.value)!==``&&(0,f.jsxs)(`div`,{className:Si.radioGroupText,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Si.radioGroupLabel,_?.label),style:v?.label,children:e.label??e.value}),e.description!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(Si.radioGroupDescription,_?.description),style:v?.description,children:e.description})]})]},String(e.value))}),(0,f.jsx)(yt,{variant:`error`,message:j,isVisible:A&&(T||D)})]})}var wi={rating:`rating_eDKeX`,"rating-disabled":`rating-disabled_Xk0cI`,ratingDisabled:`rating-disabled_Xk0cI`,"rating-readOnly":`rating-readOnly_o8Kx1`,ratingReadOnly:`rating-readOnly_o8Kx1`,"rating-item":`rating-item_4tqx2`,ratingItem:`rating-item_4tqx2`,"rating-iconEmpty":`rating-iconEmpty_3uk2A`,ratingIconEmpty:`rating-iconEmpty_3uk2A`,"rating-iconFilledClip":`rating-iconFilledClip_4aNxG`,ratingIconFilledClip:`rating-iconFilledClip_4aNxG`,"rating-iconFilled":`rating-iconFilled_-rQ58`,ratingIconFilled:`rating-iconFilled_-rQ58`},Ti=4;function Ei(e,t){return Math.max(0,Math.min(t,e))}function Di(e){let{value:t,defaultValue:n=0,onChange:r=()=>{},max:i=5,allowHalf:a=!1,allowClear:o=!0,readOnly:s=!1,disabled:p=!1,icon:m=d.faStar,"aria-label":h=`Rating`,className:g,style:_,classNames:v,styles:y,...b}=O(`Rating`,e),x=t!==void 0,[S,C]=(0,c.useState)(n),w=Ei(x?t:S,i),[T,E]=(0,c.useState)(null),D=!s&&!p,k=T??w,A=(0,c.useRef)(null),j=(0,c.useRef)(w),M=(0,c.useRef)(!1),N=(0,c.useRef)(0),P=(0,c.useRef)(!1);function F(e){let t=Ei(e,i);x||C(t),r(t)}function I(e){let t=A.current?.getBoundingClientRect();if(!t||t.width===0)return null;let n=Ei((e-t.left)/t.width,1)*i;return a?Math.round(n*2)/2:Math.ceil(n)}function L(e){if(!D)return;e.currentTarget.setPointerCapture?.(e.pointerId),M.current=!0,P.current=!1,N.current=e.clientX,j.current=w;let t=I(e.clientX);t!==null&&E(t)}function R(e){if(!D)return;let t=I(e.clientX);t!==null&&(M.current&&(e.preventDefault(),Math.abs(e.clientX-N.current)>Ti&&(P.current=!0)),E(t))}function z(e){if(!D||!M.current)return;e.currentTarget.releasePointerCapture?.(e.pointerId),M.current=!1;let t=I(e.clientX)??T;t!==null&&F(!P.current&&o&&t===j.current?0:t),E(null)}function B(){!D||M.current||E(null)}function V(e){let t=a?.5:1;e.key===`ArrowRight`||e.key===`ArrowUp`?(e.preventDefault(),F(w+t)):e.key===`ArrowLeft`||e.key===`ArrowDown`?(e.preventDefault(),F(w-t)):e.key===`Home`?(e.preventDefault(),F(0)):e.key===`End`&&(e.preventDefault(),F(i))}return(0,f.jsx)(`div`,{...b,ref:A,role:`slider`,"aria-label":h,"aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":w,"aria-valuetext":`${w} out of ${i}`,"aria-readonly":s||void 0,"aria-disabled":p||void 0,tabIndex:D?0:-1,className:(0,l.default)(wi.rating,p&&wi.ratingDisabled,s&&wi.ratingReadOnly,v?.root,g),style:{..._,...y?.root},onKeyDown:D?V:void 0,onPointerDown:D?L:void 0,onPointerMove:D?R:void 0,onPointerUp:D?z:void 0,onPointerCancel:D?z:void 0,onPointerLeave:D?B:void 0,children:Array.from({length:i},(e,t)=>{let n=Math.round(Math.max(0,Math.min(1,k-t))*100);return(0,f.jsxs)(`div`,{className:(0,l.default)(wi.ratingItem,v?.item),style:y?.item,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:m,className:(0,l.default)(wi.ratingIconEmpty,v?.iconEmpty),style:y?.iconEmpty}),(0,f.jsx)(`div`,{className:wi.ratingIconFilledClip,style:{width:`${n}%`},children:(0,f.jsx)(u.FontAwesomeIcon,{icon:m,className:(0,l.default)(wi.ratingIconFilled,v?.iconFilled),style:y?.iconFilled})})]},t)})})}var Oi={revealLens:`revealLens_V3Kkk`,"revealLens-background":`revealLens-background_pQyK9`,revealLensBackground:`revealLens-background_pQyK9`,"revealLens-overlay":`revealLens-overlay_NOUoj`,revealLensOverlay:`revealLens-overlay_NOUoj`,"revealLens-overlay-transitioning":`revealLens-overlay-transitioning_-co2e`,revealLensOverlayTransitioning:`revealLens-overlay-transitioning_-co2e`};function ki(e,t,n,r){let i=Math.max(n-r,0);return`radial-gradient(circle ${n}px at ${e}px ${t}px, transparent ${i}px, transparent ${i}px, white ${n}px)`}function Ai(e,t){e.style.setProperty(`mask-image`,t),e.style.setProperty(`-webkit-mask-image`,t)}function ji(e){e.style.removeProperty(`mask-image`),e.style.removeProperty(`-webkit-mask-image`)}function Mi(e){let{background:t,overlay:n,radius:r=120,feather:i=24,shape:a=`circle`,maskImage:o,disabled:s=!1,className:u,style:d,classNames:p,styles:m,...h}=O(`RevealLens`,e),g=(0,c.useRef)(null),_=(0,c.useRef)(null),v=(e,t)=>{let n=g.current,a=_.current;if(!n||!a)return;let s=n.getBoundingClientRect(),c=e-s.left,l=t-s.top;a.classList.remove(Oi.revealLensOverlayTransitioning),Ai(a,o??ki(c,l,r,i))},y=()=>{let e=_.current;e&&(e.classList.add(Oi.revealLensOverlayTransitioning),ji(e))},b=e=>{s||(e.currentTarget.setPointerCapture?.(e.pointerId),v(e.clientX,e.clientY))},x=e=>{s||v(e.clientX,e.clientY)},S=e=>{s||e.pointerType===`mouse`||y()},C=e=>{if(s)return;let t=g.current;if(t){let n=t.getBoundingClientRect();if(e.clientX>=n.left&&e.clientX<=n.right&&e.clientY>=n.top&&e.clientY<=n.bottom)return;if(typeof document.elementFromPoint==`function`){let n=document.elementFromPoint(e.clientX,e.clientY);if(n&&t.contains(n))return}}y()};return(0,f.jsxs)(`div`,{...h,ref:g,className:(0,l.default)(Oi.revealLens,u,p?.root),style:{...d,...m?.root},"data-reveal-shape":a,onPointerDown:b,onPointerMove:x,onPointerUp:S,onPointerCancel:C,onPointerLeave:C,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Oi.revealLensBackground,p?.background),style:m?.background,children:t}),(0,f.jsx)(`div`,{ref:_,className:(0,l.default)(Oi.revealLensOverlay,p?.overlay),style:m?.overlay,children:n})]})}function Ni(e){return Math.round(e/5)*5}function Pi(e){return{x:Ni(e.x),y:Ni(e.y)}}function Fi(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 Pi({x:a.x,y:a.y})}function Ii(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Li(e,t,n){let r=n.x-t.x,i=n.y-t.y,a=r*r+i*i;if(a===0)return{dist:Ii(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 Ri(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}=Li(e,a,o);s<=8&&(!n||s<n.dist)&&(n={roomId:r.id,wallIndex:i,t:c,dist:s})}}return n}function zi(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 Bi(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 Vi(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 Hi(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 Ui(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function Wi(e){return e.map((e,t)=>`${t===0?`M`:`L`} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(` `)+` Z`}function Gi(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 Ki(e,t,n){let r=Hi(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 qi(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=Gi(e.points,n),i=Wi(e.points),a=Bi(e.points),o=r.map(e=>` <path d="${e}" />`).join(`
|
|
8
|
+
`};function Vr({columns:e,items:t,renderItem:n,onChange:r,dragHandle:i,getItemLabel:a=Ir,getItemDisabled:o,renderEmptyColumn:s,renderColumnActions:u,reorderableColumns:d,collapseEmptyColumns:p,columnMaxHeight:m,onLoadMore:h,loadMoreThreshold:v,className:y,style:b,classNames:x,styles:S,...C}){let[w,T]=(0,c.useState)(null),[E,D]=(0,c.useState)(!1),[O,k]=(0,c.useState)(null),A=(0,c.useRef)(null),j=(0,g.useSensors)((0,g.useSensor)(g.MouseSensor,Lr),(0,g.useSensor)(g.TouchSensor,Rr),(0,g.useSensor)(g.KeyboardSensor,zr)),M=O??e,N=(0,c.useMemo)(()=>M.map(e=>e.id),[M]),P=(0,c.useMemo)(()=>Nr(M,t,a),[M,t,a]),F=(0,c.useMemo)(()=>({announcements:P,screenReaderInstructions:Br}),[P]);function I({active:t}){T(String(t.id)),D(Or(t.data.current)),k(e),A.current=null}function L({active:t,over:n}){if(!n)return;if(Or(t.data.current)){let r=String(t.id),i=String(n.id);k(t=>{let n=t??e,a=kr(n,r,i);return a===n?t:a});return}let r=String(t.id),i=String(n.id),a=t.rect.current.translated??t.rect.current.initial,o=a?`${a.top}:${a.left}`:null;o!==null&&o===A.current||(A.current=o,k(t=>{let o=t??e,s=Mr(o,r,i,{activeRect:a,overRect:n.rect});return s===o?t:s}))}function R({over:t}){if(T(null),D(!1),!t||!O){k(null);return}Er(O,e)||r(O),k(null)}function z(){T(null),D(!1),k(null)}let B=w&&E?M.find(e=>e.id===w):void 0;return(0,f.jsxs)(g.DndContext,{sensors:j,collisionDetection:Ar,onDragStart:I,onDragOver:L,onDragEnd:R,onDragCancel:z,accessibility:F,children:[(0,f.jsx)(_.SortableContext,{id:`kanban-columns`,items:N,strategy:_.horizontalListSortingStrategy,children:(0,f.jsx)(`div`,{...C,className:(0,l.default)(Z.board,y),style:b,children:M.map(e=>(0,f.jsx)(Tr,{id:e.id,title:e.title,itemIds:e.itemIds,maxItems:e.maxItems,disabled:e.disabled,getItemDisabled:o,emptyPlaceholder:s?.(e),actions:u?.(e),reorderable:d,activeIsColumn:w!==null&&E,collapseEmptyColumns:p,columnMaxHeight:m,hasMore:e.hasMore,onLoadMore:h?()=>h(e.id):void 0,loadMoreThreshold:v,items:t,renderItem:n,dragHandle:i,preserveSizeWhileEmpty:w!==null},e.id))})}),(0,f.jsx)(g.DragOverlay,{children:B?(0,f.jsx)(`div`,{className:(0,l.default)(Z.column,Z.columnDragOverlay),children:(0,f.jsx)(`div`,{className:Z.columnHeader,children:(0,f.jsx)(`span`,{className:Z.columnHeaderTitle,children:B.title})})}):w&&!E&&t[w]!==void 0?(0,f.jsx)(`div`,{className:(0,l.default)(Z.dragOverlay,x?.dragOverlay),style:S?.dragOverlay,children:n(t[w],w)}):null})]})}var Hr=`https://api.klipy.com/v2`,Ur=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(`${Hr}/search?${n}`)).json()}async searchSuggestions(e){let t=new URLSearchParams({q:e,key:this.key});return(await fetch(`${Hr}/search_suggestions?${t}`)).json()}registerShare(e,t){let n=new URLSearchParams({id:t,q:e,key:this.key});fetch(`${Hr}/registershare?${n}`).catch(()=>null)}},Wr={resultCount:`resultCount_Sn48Q`};function Gr({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)(Dt,{type:wt.Search,label:i,placeholder:r,value:e,onChange:m}),h&&(0,f.jsxs)(`p`,{className:Wr.resultCount,children:[o,` `,o===1?`result`:`results`]})]})}var Kr={gifPreview:`gifPreview_jAXT2`,"gifPreview-image":`gifPreview-image_41bwm`,gifPreviewImage:`gifPreview-image_41bwm`,"gifPreview-image-container":`gifPreview-image-container_5hAjJ`,gifPreviewImageContainer:`gifPreview-image-container_5hAjJ`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_9EI0A`};function qr({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)(Kr.gifPreview,e),onScroll:i,children:t.map((e,t)=>(0,f.jsx)(U,{className:Kr.gifPreviewImageContainer,onClick:()=>n?.(e),children:(0,f.jsx)(`div`,{className:Kr.gifPreviewImage,style:{backgroundImage:`url(${e.media_formats.tinygif.url})`}})},`${e.id}_${t}`))})})}var Jr={gifView:`gifView_YUeLK`,"gifView-loading":`gifView-loading_N1Lzx`,gifViewLoading:`gifView-loading_N1Lzx`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_OmJUc`};function Yr({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)(Jr.gifView,e),children:[(0,f.jsx)(`img`,{className:Jr.klipyPickerSelected,src:t,onLoad:()=>r(!1)}),n&&(0,f.jsx)(`div`,{className:Jr.gifViewLoading})]})}var Xr={"klipyPicker-selected":`klipyPicker-selected_Watxl`,klipyPickerSelected:`klipyPicker-selected_Watxl`,"klipyPicker-modal-content":`klipyPicker-modal-content_3CBV9`,klipyPickerModalContent:`klipyPicker-modal-content_3CBV9`,"klipyPicker-suggestions-container":`klipyPicker-suggestions-container_-csDI`,klipyPickerSuggestionsContainer:`klipyPicker-suggestions-container_-csDI`,"klipyPicker-suggestions-item":`klipyPicker-suggestions-item_nHHSA`,klipyPickerSuggestionsItem:`klipyPicker-suggestions-item_nHHSA`};function Zr({className:e,token:t=``,isModal:n=!1,onSelect:r=()=>void 0,selected:i=null}){let a=(0,c.useMemo)(()=>new Ur(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)(_t,{inline:!0,className:Xr.klipyPickerSuggestionsContainer,children:p.map(e=>(0,f.jsx)(gt,{className:Xr.klipyPickerSuggestionsItem,text:e,onClick:()=>y(e)},e))})}function C(){return(0,f.jsx)(qr,{previewItems:u,onSelect:x,onLoadAdditional:b})}function w(){return(0,f.jsx)(Gr,{label:`Pick gif`,value:o,onDebounce:y,onChange:s})}return n?(0,f.jsxs)(`div`,{className:(0,l.default)(Xr.klipyPicker,e),children:[(0,f.jsxs)(`div`,{className:j.actionButtons,children:[(0,f.jsx)(H,{onClick:()=>v(!0),children:`Pick gif`}),i&&(0,f.jsx)(H,{styleType:I.Delete,onClick:()=>x(null),children:`Remove gif`})]}),i&&(0,f.jsx)(Yr,{className:Xr.klipyPickerSelected,src:i}),(0,f.jsx)(Ht,{isOpen:_,onClose:()=>v(!1),children:(0,f.jsxs)(`div`,{className:Xr.klipyPickerModalContent,children:[w(),S(),C()]})})]}):(0,f.jsxs)(`div`,{className:(0,l.default)(Xr.klipyPicker,e),children:[(0,f.jsx)(We,{align:He.Left,isOpen:u.length>0&&_,onOpenChange:v,dontCloseOnChildClick:!0,content:(0,f.jsxs)(f.Fragment,{children:[S(),C()]}),children:w()}),i&&(0,f.jsx)(H,{styleType:I.Delete,onClick:()=>x(null),children:`Remove gif`}),i&&(0,f.jsx)(Yr,{className:Xr.klipyPickerSelected,src:i})]})}var Qr={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 $r({className:e=``}){return(0,f.jsx)(`div`,{className:(0,l.default)(Qr.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:Qr.iconLoadingFirst,d:`M 0 0 C 3 5 6 5 6 12`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:Qr.iconLoadingFirst,d:`M 0 0 C -3 5 -6 5 -6 12`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:Qr.iconLoadingFirst,d:`M 0 0 L 0 10`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:Qr.iconLoadingSecond,d:`M 0.1 10 C -3 10 -4 10 -6 12`,strokeWidth:`1.7`,fill:`none`}),(0,f.jsx)(`path`,{className:Qr.iconLoadingSecond,d:`M -0.1 10 C 3 10 4 10 6 12`,strokeWidth:`1.7`,fill:`none`})]})})}var ei=$r,ti={numberInput:`numberInput_7p2O3`,arrows:`arrows_yjRlc`,arrowBtn:`arrowBtn_DbJoa`};function ni(e){let t=c.default.useRef(void 0),{value:n,onChange:r,formValidator:i,label:a,error:o,className:s,style:p,allowNegative:m=!1,decimalSeparator:h,thousandSeparator:g,prefix:_,suffix:v,decimalScale:b,fixedDecimalScale:x=!0,placeholder:S,sign:C,showArrows:w=!1,step:T=1,readOnly:E=!1,isRequired:D=!1,onKeyDown:k,...A}=O(`NumberInput`,e),[,j]=c.default.useState(0);c.default.useEffect(()=>{if(t.current=i,!i)return;let e=()=>j(e=>e+1);return i.registerOnUpdateListener(e),()=>{i.removeOnUpdateListener(e)}},[i]);let M=D||!!i?.validators.find(e=>e.validatorId===`required`),N=i==null?n:i.value,P=C!=null&&N!=null?Math.abs(Number(N)):N,F=P==null?``:String(P);function I(e){let t=e;t!==void 0&&(C===`-`&&(t=-Math.abs(t)),C===`+`&&(t=Math.abs(t))),i?.set(t??null),r?.(t)}function L(e){if(E)return;let t=(N!=null&&N!==``?Number(N):0)+e;!m&&C!==`-`&&(t=Math.max(0,t)),C===`-`&&(t=Math.min(0,t)),I(t)}function R(e){if(E){k?.(e);return}if(e.key===`ArrowUp`){e.preventDefault(),L(e.shiftKey?T*10:T);return}if(e.key===`ArrowDown`){e.preventDefault(),L(e.shiftKey?-T*10:-T);return}k?.(e)}let z=C===`-`?`-`:C===`+`?`+`:_,B=w&&!E?(0,f.jsxs)(`div`,{className:ti.arrows,children:[(0,f.jsx)(U,{className:ti.arrowBtn,tabIndex:-1,onMouseDown:e=>{e.preventDefault(),L(e.shiftKey?T*10:T)},children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronUp})}),(0,f.jsx)(U,{className:ti.arrowBtn,tabIndex:-1,onMouseDown:e=>{e.preventDefault(),L(e.shiftKey?-T*10:-T)},children:(0,f.jsx)(u.FontAwesomeIcon,{icon:d.faChevronDown})})]}):null;return(0,f.jsx)(Dt,{label:a,className:(0,l.default)(ti.numberInput,s),style:p,value:F,onChange:()=>{},formValidator:null,isRequired:M,onBlur:()=>{t.current&&(t.current.touched=!0)},isValid:i?i.touched?!i.hasError():!0:!o,errorMessage:i?i.touched?i.getCurrentErrorMessage()??``:``:o??``,placeholder:S,readOnly:E,suffix:B,inputMode:b===0?`numeric`:`decimal`,customInput:(0,f.jsx)(y.NumericFormat,{onValueChange:e=>I(e.floatValue),allowNegative:C==null?m:!1,decimalSeparator:h,thousandSeparator:g,decimalScale:b,fixedDecimalScale:x,prefix:z,suffix:v,onKeyDown:w?R:k,...A})})}var ri=ni,ii={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 ai(e){let{className:t=void 0,style:n,classNames:r,styles:i,options:a,onChange:o,value:s,...c}=O(`OptionPicker`,e),u=a.findIndex(e=>e.key===s)*100/a.length;return(0,f.jsxs)(`div`,{...c,className:(0,l.default)(ii.optionPicker,t,r?.root),style:{...n,...i?.root},children:[(0,f.jsx)(`div`,{className:(0,l.default)(ii.optionPickerChip,r?.chip),style:{left:`${u}%`,width:`${100/a.length}%`,...i?.chip}}),a.map(e=>(0,f.jsx)(U,{onClick:t=>o(e.key,t),className:(0,l.default)(ii.optionPickerOption,e.key===s&&ii.optionPickerOptionActive,r?.option),style:i?.option,tabIndex:e.key===s?-1:0,children:e.label},e.key))]})}var oi=768;function si(){let[e,t]=(0,c.useState)(()=>({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<oi}));return(0,c.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<oi})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}var ci={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 li({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}=si(),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:ci.overscroll,ref:g,onScroll:D,children:[(0,f.jsx)(`div`,{className:ci.overscrollHeaderContainer,style:{height:`${a}${s}`},ref:v,children:(0,f.jsx)(`div`,{className:(0,l.default)(ci.overscrollHeader,r&&ci.overscrollHeaderCentered),ref:_,children:t})}),(0,f.jsx)(`div`,{style:{minHeight:O},children:e})]})}var ui={popover:`popover_hhmvN`,"popover-trigger":`popover-trigger_R4ckf`,popoverTrigger:`popover-trigger_R4ckf`,"popover-floating":`popover-floating_mhXrQ`,popoverFloating:`popover-floating_mhXrQ`,"popover-panel":`popover-panel_tVB2k`,popoverPanel:`popover-panel_tVB2k`,popoverIn:`popoverIn_nKOqX`,"popover-arrow":`popover-arrow_B8kB-`,popoverArrow:`popover-arrow_B8kB-`},di=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({}),fi=function(e){return e.Start=`start`,e.Center=`center`,e.End=`end`,e}({}),pi=function(e){return e.Click=`click`,e.Hover=`hover`,e.Focus=`focus`,e}({}),mi={[di.Top]:`bottom`,[di.Bottom]:`top`,[di.Left]:`right`,[di.Right]:`left`},hi=8;function gi({isOpen:e,placement:t,align:n,offset:r,triggerRef:i,floatingRef:a,panelRef:o,arrowRef:s}){(0,c.useLayoutEffect)(()=>{if(!e)return;let c,l;function u(){let e=i.current,d=a.current,f=o.current;if(!e||!d||!f){c=requestAnimationFrame(u);return}let p=Fe(e);function m(){let i=e.getBoundingClientRect(),a=f.offsetWidth,o=f.offsetHeight,c=window.innerWidth,l=window.innerHeight,u={top:i.top,bottom:l-i.bottom,left:i.left,right:c-i.right},m=t===di.Top||t===di.Bottom?o:a,h=t,g=mi[t];u[h]<m+r&&u[g]>u[h]&&(h=g);let _=h===`top`||h===`bottom`,v,y;h===`bottom`?v=i.bottom+r:h===`top`?v=i.top-r-o:y=h===`right`?i.right+r:i.left-r-a,_?(y=n===fi.Start?i.left:n===fi.End?i.right-a:i.left+i.width/2-a/2,y=Math.max(hi,Math.min(y,c-a-hi))):(v=n===fi.Start?i.top:n===fi.End?i.bottom-o:i.top+i.height/2-o/2,v=Math.max(hi,Math.min(v,l-o-hi))),d.style.top=`${v}px`,d.style.left=`${y}px`,d.style.visibility=Ie(i,p)?`hidden`:`visible`,d.dataset.placement=h;let b=s.current;if(b){let e=b.offsetWidth/2||5;if(_){let t=i.left+i.width/2-y;b.style.setProperty(`--arrow-x`,`${Math.max(e+2,Math.min(t,a-e-2))}px`),b.style.removeProperty(`--arrow-y`)}else{let t=i.top+i.height/2-v;b.style.setProperty(`--arrow-y`,`${Math.max(e+2,Math.min(t,o-e-2))}px`),b.style.removeProperty(`--arrow-x`)}}}m();let h=[window,...p];h.forEach(e=>e.addEventListener(`scroll`,m,{passive:!0})),window.addEventListener(`resize`,m),l=()=>{h.forEach(e=>e.removeEventListener(`scroll`,m)),window.removeEventListener(`resize`,m)}}return u(),()=>{c!==void 0&&cancelAnimationFrame(c),l?.()}},[e,t,n,r,i,a,o,s])}function _i({children:e=null,content:t=null,placement:n=di.Bottom,align:r=fi.Center,trigger:i=pi.Click,isOpen:a,defaultOpen:o=!1,onOpenChange:s=()=>{},offset:u=10,withArrow:d=!0,closeOnOutsideClick:p=!0,closeOnEscape:m=!0,openDelay:h=100,closeDelay:g=120,disabled:_=!1,className:v,style:y,classNames:b,styles:x,...S}){let C=(0,c.useRef)(null),w=(0,c.useRef)(null),T=(0,c.useRef)(null),E=(0,c.useRef)(null),D=(0,c.useRef)(void 0),O=a!==void 0,[k,A]=(0,c.useState)(o),j=O?a:k,M=(0,c.useRef)(s);(0,c.useEffect)(()=>{M.current=s});let N=(0,c.useCallback)(e=>{_&&e||(O||A(e),M.current(e))},[_,O]);gi({isOpen:!!j,placement:n,align:r,offset:u,triggerRef:C,floatingRef:w,panelRef:T,arrowRef:d?E:{current:null}});let{restoreFocusToTrigger:P,focusAfterTrigger:F}=Ve({triggerRef:C,contentRef:w});(0,c.useEffect)(()=>{if(!j||i!==pi.Click)return;let e=Be(T.current);e.length!==0&&(w.current?.setAttribute(`role`,`dialog`),e[0].focus())},[j,i]);function I(e){if(e.key!==`Tab`||i!==pi.Click)return;let t=Be(T.current);if(t.length===0)return;let n=document.activeElement;!e.shiftKey&&n===t[t.length-1]?(e.preventDefault(),F(),N(!1)):e.shiftKey&&n===t[0]&&(e.preventDefault(),P(),N(!1))}(0,c.useEffect)(()=>{if(!j)return;function e(e){let t=e.target,n=w.current?.contains(t),r=C.current?.contains(t);!n&&!r&&N(!1)}function t(e){e.key===`Escape`&&(w.current?.contains(document.activeElement)&&(Be(C.current)[0]??C.current)?.focus(),N(!1))}function n(e){let t=e.target,n=w.current?.contains(t),r=C.current?.contains(t);!n&&!r&&N(!1)}return p&&i!==pi.Hover&&(window.addEventListener(`mouseup`,e),document.addEventListener(`focusin`,n)),m&&window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`mouseup`,e),document.removeEventListener(`focusin`,n),window.removeEventListener(`keydown`,t)}},[j,p,m,i,N]),(0,c.useEffect)(()=>()=>clearTimeout(D.current),[]);function L(e){clearTimeout(D.current),D.current=setTimeout(()=>N(e),e?h:g)}let R=i===pi.Click?{onClick:()=>N(!j)}:i===pi.Hover?{onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1)}:{onFocus:()=>N(!0),onBlur:()=>N(!1)},z=i===pi.Hover?{onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1)}:{};return(0,f.jsxs)(`div`,{...S,className:(0,l.default)(ui.popover,v,b?.root),style:{...y,...x?.root},children:[(0,f.jsx)(`div`,{ref:C,className:(0,l.default)(ui.popoverTrigger,b?.trigger),style:x?.trigger,...R,children:e}),j&&(0,f.jsx)(Ne,{children:(0,f.jsxs)(`div`,{ref:w,className:(0,l.default)(ui.popoverFloating,b?.floating),style:x?.floating,"data-placement":n,onKeyDown:I,...z,children:[(0,f.jsx)(`div`,{ref:T,className:(0,l.default)(ui.popoverPanel,b?.panel),style:x?.panel,children:t}),d&&(0,f.jsx)(`div`,{ref:E,className:(0,l.default)(ui.popoverArrow,b?.arrow),style:x?.arrow})]})})]})}var vi={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 yi(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 bi({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)(vi.progressBarFill,i===e.length-1&&vi.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:vi.progressBarLabel,style:n.color?{color:yi(n.color)}:{},children:n.label})},i)})}return(0,f.jsx)(`div`,{...i,className:(0,l.default)(vi.progressBar,e),style:r,children:a()})}var xi=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),Si={radioGroup:`radioGroup_5PUYO`,"radioGroup-horizontal":`radioGroup-horizontal_cfCch`,radioGroupHorizontal:`radioGroup-horizontal_cfCch`,"radioGroup-disabled":`radioGroup-disabled_O2hKy`,radioGroupDisabled:`radioGroup-disabled_O2hKy`,"radioGroup-error":`radioGroup-error_HVUcn`,radioGroupError:`radioGroup-error_HVUcn`,"radioGroup-radio":`radioGroup-radio_XLU2j`,radioGroupRadio:`radioGroup-radio_XLU2j`,"radioGroup-radio-checked":`radioGroup-radio-checked_AOEJu`,radioGroupRadioChecked:`radioGroup-radio-checked_AOEJu`,"radioGroup-option":`radioGroup-option_QxMeW`,radioGroupOption:`radioGroup-option_QxMeW`,"radioGroup-option-disabled":`radioGroup-option-disabled_Q0y35`,radioGroupOptionDisabled:`radioGroup-option-disabled_Q0y35`,"radioGroup-dot":`radioGroup-dot_Q-4Ge`,radioGroupDot:`radioGroup-dot_Q-4Ge`,"radioGroup-dot-checked":`radioGroup-dot-checked_7djgv`,radioGroupDotChecked:`radioGroup-dot-checked_7djgv`,"radioGroup-text":`radioGroup-text_8ekBs`,radioGroupText:`radioGroup-text_8ekBs`,"radioGroup-label":`radioGroup-label_hJD2S`,radioGroupLabel:`radioGroup-label_hJD2S`,"radioGroup-description":`radioGroup-description_xZSLE`,radioGroupDescription:`radioGroup-description_xZSLE`};function Ci(e){let{options:t=[],value:n,defaultValue:r,onChange:i=()=>{},orientation:a=xi.Vertical,disabled:o=!1,size:s=`18px`,tabIndex:u=0,formValidator:d=null,errorMessage:p=``,isValid:m=!0,className:h,style:g,classNames:_,styles:v,...y}=O(`RadioGroup`,e),b=(0,c.useRef)([]),x=(0,c.useRef)(d);(0,c.useEffect)(()=>{x.current=d});let[,S]=(0,c.useState)(0),[C,w]=(0,c.useState)(r),[T,E]=(0,c.useState)(!1),[D,k]=(0,c.useState)(!1);(0,c.useEffect)(()=>{if(!d)return;d.validate();let e=()=>S(e=>e+1);return d.registerOnUpdateListener(e),()=>d.removeOnUpdateListener(e)},[d]);let A=d?d.touched&&d.hasError():!m||!!p,j=d?d.getCurrentErrorMessage():p||``,M=n!==void 0&&!d,N=d?d.value:M?n:C;function P(e,t){d?d.set(e):M||w(e),i(e,t)}function F(e){e.currentTarget.contains(e.relatedTarget)||(E(!1),x.current&&(x.current.touched=!0))}let I=t.findIndex(e=>e.value===N),L=t.findIndex(e=>!e.disabled),R=I>=0?I:L;function z(e){b.current[e]?.focus()}function B(e,n,r){if(o||t.length===0)return;let i=n;for(let n=0;n<t.length;n++)if(i=(i+e+t.length)%t.length,!t[i].disabled){z(i),P(t[i].value,r);return}}function V(e,n){let r=t[n];switch(e.key){case`ArrowDown`:case`ArrowRight`:e.preventDefault(),B(1,n,e);break;case`ArrowUp`:case`ArrowLeft`:e.preventDefault(),B(-1,n,e);break;case` `:case`Enter`:e.preventDefault(),!o&&!r.disabled&&P(r.value,e);break;default:break}}return(0,f.jsxs)(`div`,{...y,role:`radiogroup`,"aria-orientation":a,"aria-disabled":o||void 0,"aria-invalid":A||void 0,className:(0,l.default)(Si.radioGroup,a===xi.Horizontal&&Si.radioGroupHorizontal,o&&Si.radioGroupDisabled,A&&Si.radioGroupError,h,_?.root),style:{"--radio-size":s,...g,...v?.root},onFocus:()=>E(!0),onBlur:F,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),children:[t.map((e,t)=>{let n=e.value===N,r=o||!!e.disabled;return(0,f.jsxs)(`div`,{ref:e=>{b.current[t]=e},role:`radio`,"aria-checked":n,"aria-disabled":r||void 0,tabIndex:r?-1:t===R?u:-1,className:(0,l.default)(Si.radioGroupOption,n&&Si.radioGroupOptionChecked,r&&Si.radioGroupOptionDisabled,_?.option),style:v?.option,onClick:()=>{r||P(e.value)},onKeyDown:e=>V(e,t),children:[(0,f.jsx)(`div`,{className:(0,l.default)(Si.radioGroupRadio,n&&Si.radioGroupRadioChecked,_?.radio),style:v?.radio,children:(0,f.jsx)(`div`,{className:(0,l.default)(Si.radioGroupDot,n&&Si.radioGroupDotChecked,_?.dot),style:v?.dot})}),(e.label??e.value)!==``&&(0,f.jsxs)(`div`,{className:Si.radioGroupText,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Si.radioGroupLabel,_?.label),style:v?.label,children:e.label??e.value}),e.description!=null&&(0,f.jsx)(`div`,{className:(0,l.default)(Si.radioGroupDescription,_?.description),style:v?.description,children:e.description})]})]},String(e.value))}),(0,f.jsx)(yt,{variant:`error`,message:j,isVisible:A&&(T||D)})]})}var wi={rating:`rating_eDKeX`,"rating-disabled":`rating-disabled_Xk0cI`,ratingDisabled:`rating-disabled_Xk0cI`,"rating-readOnly":`rating-readOnly_o8Kx1`,ratingReadOnly:`rating-readOnly_o8Kx1`,"rating-item":`rating-item_4tqx2`,ratingItem:`rating-item_4tqx2`,"rating-iconEmpty":`rating-iconEmpty_3uk2A`,ratingIconEmpty:`rating-iconEmpty_3uk2A`,"rating-iconFilledClip":`rating-iconFilledClip_4aNxG`,ratingIconFilledClip:`rating-iconFilledClip_4aNxG`,"rating-iconFilled":`rating-iconFilled_-rQ58`,ratingIconFilled:`rating-iconFilled_-rQ58`},Ti=4;function Ei(e,t){return Math.max(0,Math.min(t,e))}function Di(e){let{value:t,defaultValue:n=0,onChange:r=()=>{},max:i=5,allowHalf:a=!1,allowClear:o=!0,readOnly:s=!1,disabled:p=!1,icon:m=d.faStar,"aria-label":h=`Rating`,className:g,style:_,classNames:v,styles:y,...b}=O(`Rating`,e),x=t!==void 0,[S,C]=(0,c.useState)(n),w=Ei(x?t:S,i),[T,E]=(0,c.useState)(null),D=!s&&!p,k=T??w,A=(0,c.useRef)(null),j=(0,c.useRef)(w),M=(0,c.useRef)(!1),N=(0,c.useRef)(0),P=(0,c.useRef)(!1);function F(e){let t=Ei(e,i);x||C(t),r(t)}function I(e){let t=A.current?.getBoundingClientRect();if(!t||t.width===0)return null;let n=Ei((e-t.left)/t.width,1)*i;return a?Math.round(n*2)/2:Math.ceil(n)}function L(e){if(!D)return;e.currentTarget.setPointerCapture?.(e.pointerId),M.current=!0,P.current=!1,N.current=e.clientX,j.current=w;let t=I(e.clientX);t!==null&&E(t)}function R(e){if(!D)return;let t=I(e.clientX);t!==null&&(M.current&&(e.preventDefault(),Math.abs(e.clientX-N.current)>Ti&&(P.current=!0)),E(t))}function z(e){if(!D||!M.current)return;e.currentTarget.releasePointerCapture?.(e.pointerId),M.current=!1;let t=I(e.clientX)??T;t!==null&&F(!P.current&&o&&t===j.current?0:t),E(null)}function B(){!D||M.current||E(null)}function V(e){let t=a?.5:1;e.key===`ArrowRight`||e.key===`ArrowUp`?(e.preventDefault(),F(w+t)):e.key===`ArrowLeft`||e.key===`ArrowDown`?(e.preventDefault(),F(w-t)):e.key===`Home`?(e.preventDefault(),F(0)):e.key===`End`&&(e.preventDefault(),F(i))}return(0,f.jsx)(`div`,{...b,ref:A,role:`slider`,"aria-label":h,"aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":w,"aria-valuetext":`${w} out of ${i}`,"aria-readonly":s||void 0,"aria-disabled":p||void 0,tabIndex:D?0:-1,className:(0,l.default)(wi.rating,p&&wi.ratingDisabled,s&&wi.ratingReadOnly,v?.root,g),style:{..._,...y?.root},onKeyDown:D?V:void 0,onPointerDown:D?L:void 0,onPointerMove:D?R:void 0,onPointerUp:D?z:void 0,onPointerCancel:D?z:void 0,onPointerLeave:D?B:void 0,children:Array.from({length:i},(e,t)=>{let n=Math.round(Math.max(0,Math.min(1,k-t))*100);return(0,f.jsxs)(`div`,{className:(0,l.default)(wi.ratingItem,v?.item),style:y?.item,children:[(0,f.jsx)(u.FontAwesomeIcon,{icon:m,className:(0,l.default)(wi.ratingIconEmpty,v?.iconEmpty),style:y?.iconEmpty}),(0,f.jsx)(`div`,{className:wi.ratingIconFilledClip,style:{width:`${n}%`},children:(0,f.jsx)(u.FontAwesomeIcon,{icon:m,className:(0,l.default)(wi.ratingIconFilled,v?.iconFilled),style:y?.iconFilled})})]},t)})})}var Oi={revealLens:`revealLens_V3Kkk`,"revealLens-background":`revealLens-background_pQyK9`,revealLensBackground:`revealLens-background_pQyK9`,"revealLens-overlay":`revealLens-overlay_NOUoj`,revealLensOverlay:`revealLens-overlay_NOUoj`,"revealLens-overlay-transitioning":`revealLens-overlay-transitioning_-co2e`,revealLensOverlayTransitioning:`revealLens-overlay-transitioning_-co2e`};function ki(e,t,n,r){let i=Math.max(n-r,0);return`radial-gradient(circle ${n}px at ${e}px ${t}px, transparent ${i}px, transparent ${i}px, white ${n}px)`}function Ai(e,t){e.style.setProperty(`mask-image`,t),e.style.setProperty(`-webkit-mask-image`,t)}function ji(e){e.style.removeProperty(`mask-image`),e.style.removeProperty(`-webkit-mask-image`)}function Mi(e){let{background:t,overlay:n,radius:r=120,feather:i=24,shape:a=`circle`,maskImage:o,disabled:s=!1,className:u,style:d,classNames:p,styles:m,...h}=O(`RevealLens`,e),g=(0,c.useRef)(null),_=(0,c.useRef)(null),v=(e,t)=>{let n=g.current,a=_.current;if(!n||!a)return;let s=n.getBoundingClientRect(),c=e-s.left,l=t-s.top;a.classList.remove(Oi.revealLensOverlayTransitioning),Ai(a,o??ki(c,l,r,i))},y=()=>{let e=_.current;e&&(e.classList.add(Oi.revealLensOverlayTransitioning),ji(e))},b=e=>{s||(e.currentTarget.setPointerCapture?.(e.pointerId),v(e.clientX,e.clientY))},x=e=>{s||v(e.clientX,e.clientY)},S=e=>{s||e.pointerType===`mouse`||y()},C=e=>{if(s)return;let t=g.current;if(t){let n=t.getBoundingClientRect();if(e.clientX>=n.left&&e.clientX<=n.right&&e.clientY>=n.top&&e.clientY<=n.bottom)return;if(typeof document.elementFromPoint==`function`){let n=document.elementFromPoint(e.clientX,e.clientY);if(n&&t.contains(n))return}}y()};return(0,f.jsxs)(`div`,{...h,ref:g,className:(0,l.default)(Oi.revealLens,u,p?.root),style:{...d,...m?.root},"data-reveal-shape":a,onPointerDown:b,onPointerMove:x,onPointerUp:S,onPointerCancel:C,onPointerLeave:C,children:[(0,f.jsx)(`div`,{className:(0,l.default)(Oi.revealLensBackground,p?.background),style:m?.background,children:t}),(0,f.jsx)(`div`,{ref:_,className:(0,l.default)(Oi.revealLensOverlay,p?.overlay),style:m?.overlay,children:n})]})}function Ni(e){return Math.round(e/5)*5}function Pi(e){return{x:Ni(e.x),y:Ni(e.y)}}function Fi(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 Pi({x:a.x,y:a.y})}function Ii(e,t){return Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2)}function Li(e,t,n){let r=n.x-t.x,i=n.y-t.y,a=r*r+i*i;if(a===0)return{dist:Ii(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 Ri(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}=Li(e,a,o);s<=8&&(!n||s<n.dist)&&(n={roomId:r.id,wallIndex:i,t:c,dist:s})}}return n}function zi(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 Bi(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 Vi(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 Hi(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 Ui(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function Wi(e){return e.map((e,t)=>`${t===0?`M`:`L`} ${e.x.toFixed(2)},${e.y.toFixed(2)}`).join(` `)+` Z`}function Gi(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 Ki(e,t,n){let r=Hi(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 qi(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=Gi(e.points,n),i=Wi(e.points),a=Bi(e.points),o=r.map(e=>` <path d="${e}" />`).join(`
|
|
9
9
|
`),s=n.map(t=>{let n=e.points[t.wallIndex],r=e.points[(t.wallIndex+1)%e.points.length],i=Ki(n,r,t);return i?` <path d="${i}" fill="none" />`:``}).filter(Boolean).join(`
|
|
10
10
|
`),c=e.name?` <text fontSize="5" x="${a.x.toFixed(1)}" y="${a.y.toFixed(1)}">${Ui(e.name)}</text>`:``;return[` <g id="${e.id}">`,o,` <path id="background" d="${i}" />`,s,c,` </g>`].filter(Boolean).join(`
|
|
11
11
|
`)});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(`
|