@maxhub/max-ui 0.6.0 → 0.8.0

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 (149) hide show
  1. package/dist/components/Avatar/parts/AvatarOnlineDot/AvatarOnlineDot.d.ts.map +1 -1
  2. package/dist/components/BottomSheet/BottomSheet.d.ts +16 -0
  3. package/dist/components/BottomSheet/BottomSheet.d.ts.map +1 -0
  4. package/dist/components/BottomSheet/index.d.ts +2 -0
  5. package/dist/components/BottomSheet/index.d.ts.map +1 -0
  6. package/dist/components/Checkbox/Checkbox.d.ts +8 -0
  7. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
  8. package/dist/components/Checkbox/index.d.ts +2 -0
  9. package/dist/components/Checkbox/index.d.ts.map +1 -0
  10. package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
  11. package/dist/components/ContextMenu/context.d.ts +12 -0
  12. package/dist/components/ContextMenu/context.d.ts.map +1 -1
  13. package/dist/components/ContextMenu/parts/ContextMenuList/ContextMenuList.d.ts.map +1 -1
  14. package/dist/components/ContextMenu/parts/ContextMenuRow/ContextMenuRow.d.ts +3 -2
  15. package/dist/components/ContextMenu/parts/ContextMenuRow/ContextMenuRow.d.ts.map +1 -1
  16. package/dist/components/ContextMenu/parts/ContextMenuSubmenu/ContextMenuSubmenu.d.ts +4 -3
  17. package/dist/components/ContextMenu/parts/ContextMenuSubmenu/ContextMenuSubmenu.d.ts.map +1 -1
  18. package/dist/components/Dot/Dot.d.ts +3 -0
  19. package/dist/components/Dot/Dot.d.ts.map +1 -1
  20. package/dist/components/Select/Select.d.ts +3 -0
  21. package/dist/components/Select/Select.d.ts.map +1 -0
  22. package/dist/components/Select/context.d.ts +36 -0
  23. package/dist/components/Select/context.d.ts.map +1 -0
  24. package/dist/components/Select/helpers.d.ts +15 -0
  25. package/dist/components/Select/helpers.d.ts.map +1 -0
  26. package/dist/components/Select/hooks.d.ts +18 -0
  27. package/dist/components/Select/hooks.d.ts.map +1 -0
  28. package/dist/components/Select/index.d.ts +7 -0
  29. package/dist/components/Select/index.d.ts.map +1 -0
  30. package/dist/components/Select/parts/SelectContent/SelectContent.d.ts +13 -0
  31. package/dist/components/Select/parts/SelectContent/SelectContent.d.ts.map +1 -0
  32. package/dist/components/Select/parts/SelectContent/index.d.ts +2 -0
  33. package/dist/components/Select/parts/SelectContent/index.d.ts.map +1 -0
  34. package/dist/components/Select/parts/SelectEmpty/SelectEmpty.d.ts +4 -0
  35. package/dist/components/Select/parts/SelectEmpty/SelectEmpty.d.ts.map +1 -0
  36. package/dist/components/Select/parts/SelectEmpty/index.d.ts +2 -0
  37. package/dist/components/Select/parts/SelectEmpty/index.d.ts.map +1 -0
  38. package/dist/components/Select/parts/SelectField/SelectField.d.ts +22 -0
  39. package/dist/components/Select/parts/SelectField/SelectField.d.ts.map +1 -0
  40. package/dist/components/Select/parts/SelectField/index.d.ts +2 -0
  41. package/dist/components/Select/parts/SelectField/index.d.ts.map +1 -0
  42. package/dist/components/Select/parts/SelectOptionRow/SelectOptionRow.d.ts +12 -0
  43. package/dist/components/Select/parts/SelectOptionRow/SelectOptionRow.d.ts.map +1 -0
  44. package/dist/components/Select/parts/SelectOptionRow/index.d.ts +2 -0
  45. package/dist/components/Select/parts/SelectOptionRow/index.d.ts.map +1 -0
  46. package/dist/components/Select/parts/SelectOptions/SelectOptions.d.ts +5 -0
  47. package/dist/components/Select/parts/SelectOptions/SelectOptions.d.ts.map +1 -0
  48. package/dist/components/Select/parts/SelectOptions/index.d.ts +2 -0
  49. package/dist/components/Select/parts/SelectOptions/index.d.ts.map +1 -0
  50. package/dist/components/Select/parts/SelectSearch/SelectSearch.d.ts +5 -0
  51. package/dist/components/Select/parts/SelectSearch/SelectSearch.d.ts.map +1 -0
  52. package/dist/components/Select/parts/SelectSearch/index.d.ts +2 -0
  53. package/dist/components/Select/parts/SelectSearch/index.d.ts.map +1 -0
  54. package/dist/components/Select/types.d.ts +79 -0
  55. package/dist/components/Select/types.d.ts.map +1 -0
  56. package/dist/components/Snackbar/SnackbarProvider.d.ts.map +1 -1
  57. package/dist/components/Snackbar/types.d.ts +2 -0
  58. package/dist/components/Snackbar/types.d.ts.map +1 -1
  59. package/dist/components/StatusBadge/StatusBadge.d.ts +8 -0
  60. package/dist/components/StatusBadge/StatusBadge.d.ts.map +1 -0
  61. package/dist/components/StatusBadge/index.d.ts +2 -0
  62. package/dist/components/StatusBadge/index.d.ts.map +1 -0
  63. package/dist/components/Steps/Steps.d.ts +7 -0
  64. package/dist/components/Steps/Steps.d.ts.map +1 -0
  65. package/dist/components/Steps/index.d.ts +2 -0
  66. package/dist/components/Steps/index.d.ts.map +1 -0
  67. package/dist/components/ToolButton/ToolButton.d.ts +3 -0
  68. package/dist/components/ToolButton/ToolButton.d.ts.map +1 -1
  69. package/dist/components/index.d.ts +5 -0
  70. package/dist/components/index.d.ts.map +1 -1
  71. package/dist/hooks/index.d.ts +1 -0
  72. package/dist/hooks/index.d.ts.map +1 -1
  73. package/dist/hooks/use-drag.d.ts +28 -0
  74. package/dist/hooks/use-drag.d.ts.map +1 -0
  75. package/dist/icons/index.d.ts +2 -1
  76. package/dist/icons/index.d.ts.map +1 -1
  77. package/dist/index.js +5 -1
  78. package/dist/index.js.map +1 -1
  79. package/dist/src/components/Button/Button.d.ts.map +1 -1
  80. package/dist/src/components/Button/helpers.d.ts.map +1 -1
  81. package/dist/src/components/CellAction/CellAction.d.ts +1 -1
  82. package/dist/src/components/CellAction/CellAction.d.ts.map +1 -1
  83. package/dist/src/components/CellSimple/CellSimple.d.ts +2 -0
  84. package/dist/src/components/CellSimple/CellSimple.d.ts.map +1 -1
  85. package/dist/src/components/CellSimple/index.d.ts +1 -1
  86. package/dist/src/components/CellSimple/index.d.ts.map +1 -1
  87. package/dist/src/components/IconButton/helpers.d.ts.map +1 -1
  88. package/dist/src/components/Switch/Switch.d.ts +0 -3
  89. package/dist/src/components/Switch/Switch.d.ts.map +1 -1
  90. package/dist/src/components/index.d.ts +0 -1
  91. package/dist/src/components/index.d.ts.map +1 -1
  92. package/dist/src/index.d.ts +1 -0
  93. package/dist/src/index.d.ts.map +1 -1
  94. package/dist/styles.css +1 -1
  95. package/package.json +1 -1
  96. package/dist/components/ClearableInput/ClearableInput.d.ts +0 -9
  97. package/dist/components/ClearableInput/ClearableInput.d.ts.map +0 -1
  98. package/dist/components/ClearableInput/index.d.ts +0 -2
  99. package/dist/components/ClearableInput/index.d.ts.map +0 -1
  100. package/dist/components/Container/Container.d.ts +0 -7
  101. package/dist/components/Container/Container.d.ts.map +0 -1
  102. package/dist/components/Container/index.d.ts +0 -2
  103. package/dist/components/Container/index.d.ts.map +0 -1
  104. package/dist/components/EllipsisText/EllipsisText.d.ts +0 -14
  105. package/dist/components/EllipsisText/EllipsisText.d.ts.map +0 -1
  106. package/dist/components/EllipsisText/index.d.ts +0 -2
  107. package/dist/components/EllipsisText/index.d.ts.map +0 -1
  108. package/dist/components/Flex/Flex.d.ts +0 -19
  109. package/dist/components/Flex/Flex.d.ts.map +0 -1
  110. package/dist/components/Flex/index.d.ts +0 -2
  111. package/dist/components/Flex/index.d.ts.map +0 -1
  112. package/dist/components/Grid/Grid.d.ts +0 -17
  113. package/dist/components/Grid/Grid.d.ts.map +0 -1
  114. package/dist/components/Grid/index.d.ts +0 -2
  115. package/dist/components/Grid/index.d.ts.map +0 -1
  116. package/dist/components/Panel/Panel.d.ts +0 -9
  117. package/dist/components/Panel/Panel.d.ts.map +0 -1
  118. package/dist/components/Panel/index.d.ts +0 -2
  119. package/dist/components/Panel/index.d.ts.map +0 -1
  120. package/dist/components/Ripple/Ripple.d.ts +0 -5
  121. package/dist/components/Ripple/Ripple.d.ts.map +0 -1
  122. package/dist/components/Ripple/index.d.ts +0 -2
  123. package/dist/components/Ripple/index.d.ts.map +0 -1
  124. package/dist/components/SearchInput/SearchInput.d.ts +0 -8
  125. package/dist/components/SearchInput/SearchInput.d.ts.map +0 -1
  126. package/dist/components/SearchInput/index.d.ts +0 -2
  127. package/dist/components/SearchInput/index.d.ts.map +0 -1
  128. package/dist/components/SvgButton/SvgButton.d.ts +0 -6
  129. package/dist/components/SvgButton/SvgButton.d.ts.map +0 -1
  130. package/dist/components/SvgButton/index.d.ts +0 -2
  131. package/dist/components/SvgButton/index.d.ts.map +0 -1
  132. package/dist/components/Tappable/Tappable.d.ts +0 -13
  133. package/dist/components/Tappable/Tappable.d.ts.map +0 -1
  134. package/dist/components/Tappable/helpers.d.ts +0 -11
  135. package/dist/components/Tappable/helpers.d.ts.map +0 -1
  136. package/dist/components/Tappable/index.d.ts +0 -2
  137. package/dist/components/Tappable/index.d.ts.map +0 -1
  138. package/dist/compositions/Profile/Profile.d.ts +0 -6
  139. package/dist/compositions/Profile/Profile.d.ts.map +0 -1
  140. package/dist/compositions/Profile/index.d.ts +0 -2
  141. package/dist/compositions/Profile/index.d.ts.map +0 -1
  142. package/dist/src/components/Dot/Dot.d.ts +0 -10
  143. package/dist/src/components/Dot/Dot.d.ts.map +0 -1
  144. package/dist/src/components/Dot/index.d.ts +0 -2
  145. package/dist/src/components/Dot/index.d.ts.map +0 -1
  146. package/dist/src/components/ToolButton/ToolButton.d.ts +0 -14
  147. package/dist/src/components/ToolButton/ToolButton.d.ts.map +0 -1
  148. package/dist/src/components/ToolButton/index.d.ts +0 -2
  149. package/dist/src/components/ToolButton/index.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,2 +1,6 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import{forwardRef as o,createContext as a,useContext as i,Children as l,cloneElement as s,isValidElement as c,useRef as u,useEffect as _,useMemo as d,useState as p,useLayoutEffect as m,useCallback as f,Fragment as h}from"react";import*as v from"react-dom";import{createPortal as y}from"react-dom";function g(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=g(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function C(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=g(e))&&(r&&(r+=" "),r+=t);return r}var b;function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},x.apply(null,arguments)}var w,T=function(e){return r.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:12,height:16,fill:"none"},e),b||(b=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.934 3.434a.8.8 0 0 1 1.132 0l4 4a.8.8 0 0 1 0 1.132l-4 4a.8.8 0 0 1-1.132-1.132L6.37 8 2.934 4.566a.8.8 0 0 1 0-1.132",clipRule:"evenodd"})))};function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N.apply(null,arguments)}var S,I=function(e){return r.createElement("svg",N({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),w||(w=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16M5.566 4.434a.8.8 0 1 0-1.132 1.132L6.87 8l-2.435 2.434a.8.8 0 0 0 1.132 1.132L8 9.13l2.434 2.435a.8.8 0 0 0 1.132-1.132L9.13 8l2.435-2.434a.8.8 0 0 0-1.132-1.132L8 6.87z",clipRule:"evenodd"})))};function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E.apply(null,arguments)}var B,M=function(e){return r.createElement("svg",E({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),S||(S=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.242 2.115c-2.605 0-4.677 2.044-4.677 4.517s2.072 4.517 4.677 4.517 4.677-2.044 4.677-4.517-2.072-4.517-4.677-4.517M1 6.632C1 3.252 3.817.55 7.242.55s6.242 2.701 6.242 6.082a5.97 5.97 0 0 1-1.692 4.165l3 3.247a.783.783 0 1 1-1.15 1.062l-3.074-3.326a6.34 6.34 0 0 1-3.326.935C3.817 12.715 1 10.013 1 6.632",clipRule:"evenodd"})))};function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R.apply(null,arguments)}var A,k,L=function(e){return r.createElement("svg",R({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),B||(B=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.364 4.364a.9.9 0 0 1 1.272 0L10 8.727l4.364-4.363a.9.9 0 0 1 1.272 1.272L11.273 10l4.363 4.364a.9.9 0 0 1-1.272 1.272L10 11.273l-4.364 4.363a.9.9 0 0 1-1.272-1.272L8.727 10 4.364 5.636a.9.9 0 0 1 0-1.272",clipRule:"evenodd"})))};function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P.apply(null,arguments)}var z,O=function(e){return r.createElement("svg",P({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),A||(A=r.createElement("circle",{cx:10,cy:10,r:10,fill:"currentColor"})),k||(k=r.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.364 5.364a.9.9 0 0 1 1.272 0L10 8.727l3.364-3.363a.9.9 0 0 1 1.272 1.272L11.274 10l3.364 3.364a.9.9 0 1 1-1.273 1.272L10 11.273l-3.364 3.363a.9.9 0 0 1-1.272-1.272L8.727 10 5.364 6.636a.9.9 0 0 1 0-1.272",clipRule:"evenodd"})))};function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D.apply(null,arguments)}var H=function(e){return r.createElement("svg",D({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),z||(z=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.268 6.268a.915.915 0 0 1 1.294 0L12 10.706l4.438-4.438a.915.915 0 1 1 1.294 1.294L13.294 12l4.438 4.438a.915.915 0 1 1-1.294 1.294L12 13.294l-4.438 4.438a.915.915 0 1 1-1.294-1.294L10.706 12 6.268 7.562a.915.915 0 0 1 0-1.294",clipRule:"evenodd"})))},$=Object.defineProperty,U=(e,t)=>$(e,"name",{value:t,configurable:!0});function j(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function W(...e){return t=>{let n=!1;const r=e.map(e=>{const r=j(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():j(e[t],null)}}}}function F(...e){return r.useCallback(W(...e),e)}U(j,"setRef"),U(W,"composeRefs"),U(F,"useComposedRefs");var V=Object.defineProperty,Y=(e,t)=>V(e,"name",{value:t,configurable:!0});function X(e){const t=r.forwardRef((t,n)=>{let{children:o,...a}=t,i=null,l=!1;const s=[];re(o)&&"function"==typeof le&&(o=le(o._payload)),r.Children.forEach(o,e=>{if(te(e)){l=!0;const t=e;let n="child"in t.props?t.props.child:t.props.children;re(n)&&"function"==typeof le&&(n=le(n._payload)),i=J(t,n),s.push(i?.props?.children)}else s.push(e)}),i?i=r.cloneElement(i,void 0,s):!l&&1===r.Children.count(o)&&r.isValidElement(o)&&(i=o);const c=i?ee(i):void 0,u=F(n,c);if(!i){if(o||0===o)throw new Error(l?ie(e):ae(e));return o}const _=Q(a,i.props??{});return i.type!==r.Fragment&&(_.ref=n?u:c),r.cloneElement(i,_)});return t.displayName=`${e}.Slot`,t}Y(X,"createSlot");var q=X("Slot"),K=Symbol.for("radix.slottable");function G(e){const t=Y(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=K,t}Y(G,"createSlottable");var Z=G("Slottable"),J=Y((e,t)=>{if("child"in e.props){const t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function Q(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function ee(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function te(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===K}Y(Q,"mergeProps"),Y(ee,"getElementRef"),Y(te,"isSlottable");var ne=Symbol.for("react.lazy");function re(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===ne&&"_payload"in e&&oe(e._payload)}function oe(e){return"object"==typeof e&&null!==e&&"then"in e}Y(re,"isLazyComponent"),Y(oe,"isPromiseLike");var ae=Y(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ie=Y(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),le=r[" use ".trim().toString()],se="SvgButton__-Jm";const ce=o((t,n)=>{const{className:r,asChild:o,...a}=t;return e(o?q:"button",{ref:n,className:C(se,r),...a})});ce.displayName="SvgButton";const ue=a({size:48}),_e=()=>i(ue);var de={};const pe=o((t,n)=>{const{className:r,onClick:o,...a}=t,{size:i}=_e(),l=(e=>e<40?12:e<54?16:e<72?20:24)(i);return e(ce,{ref:n,className:C(de.AvatarCloseButton,r),onClick:e=>{e.preventDefault(),o?.(e)},...a,children:e(O,{width:l,height:l})})});pe.displayName="AvatarCloseButton";const me=e=>"string"==typeof e?e:`${e}px`,fe=e=>{const{options:t,content:n}=e,{asChild:r,children:o}=t;if(!r)return"function"==typeof n?n(o):n;const a=l.only(o);return s(a,{children:"function"==typeof n?n(a.props.children):n})},he=e=>void 0!==e&&!1!==e&&null!==e&&""!==e,ve=()=>!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g),ye=(...e)=>{const t=e.filter(Boolean);if(t.length<=1){return t[0]??null}return e=>{for(const n of t)"function"==typeof n?n(e):n&&(n.current=e)}},ge=()=>{},Ce=[{maxExclusive:40,size:"xs"},{maxExclusive:52,size:"s"},{maxExclusive:72,size:"m"}];var be={AvatarContainer:"AvatarContainer__7c-",AvatarContainer_form_circle:"AvatarContainer_form_circle__J44",AvatarContainer__content:"AvatarContainer__content__h8v",AvatarContainer_form_squircle:"AvatarContainer_form_squircle__1i0",AvatarContainer__onlineStatus:"AvatarContainer__onlineStatus__cdV",AvatarContainer_onlineStatus_xs:"AvatarContainer_onlineStatus_xs__sy8",AvatarContainer_onlineStatus_s:"AvatarContainer_onlineStatus_s__YBz",AvatarContainer_onlineStatus_m:"AvatarContainer_onlineStatus_m__IU3",AvatarContainer_onlineStatus_l:"AvatarContainer_onlineStatus_l__X3w",AvatarContainer__overlay:"AvatarContainer__overlay__qul",AvatarContainer__rightBottomCorner:"AvatarContainer__rightBottomCorner__kZG",AvatarContainer__rightTopCorner:"AvatarContainer__rightTopCorner__y4y"};const xe=o((n,r)=>{const{className:o,style:a,children:i,overlay:l,rightTopCorner:s,rightBottomCorner:c,innerClassNames:u,size:_=40,asChild:d,form:p="circle",onlineStatus:m=!1,...f}=n,h=d?q:"div",{normalizedSize:v,hasOnlineStatus:y,onlineStatusSize:g}=(({size:e,onlineStatus:t,isCircle:n})=>{const r=Number.isFinite(e)?Math.min(200,Math.max(16,e)):40;return{normalizedSize:r,hasOnlineStatus:t&&n&&r>=24&&r<=80,onlineStatusSize:(o=r,Ce.find(({maxExclusive:e})=>o<e)?.size??"l")};var o})({size:_,onlineStatus:m,isCircle:"circle"===p}),b=!m&&v>24&&he(c),x=C(be.AvatarContainer,be[`AvatarContainer_form_${p}`],y&&be.AvatarContainer_onlineStatus,y&&be[`AvatarContainer_onlineStatus_${g}`],o);return e(ue.Provider,{value:{size:v},children:t(h,{ref:r,className:x,style:{"--MaxUi-AvatarContainer_size":`${v}px`,...a},...f,children:[e(Z,{children:fe({options:{asChild:n.asChild,children:i},content:n=>t("span",{className:C(be.AvatarContainer__content,u?.content),children:[n,he(l)&&e("span",{className:C(be.AvatarContainer__overlay,u?.overlay),children:l})]},"subtree-container")})}),y&&e("span",{className:be.AvatarContainer__onlineStatus,"aria-hidden":"true"}),b&&e("span",{className:C(be.AvatarContainer__rightBottomCorner,u?.rightBottomCorner),children:c}),he(s)&&e("span",{className:C(be.AvatarContainer__rightTopCorner,u?.rightTopCorner),children:s})]})})});xe.displayName="AvatarContainer";var we="AvatarIcon__ZUI";const Te=o((t,n)=>{const{className:r,...o}=t;return e("span",{ref:n,className:C(we,r),...o})});Te.displayName="AvatarIcon";const Ne=e=>{const{asChild:t,children:n,rootElement:r,disabled:o,loading:a,onClick:i}=e,l=Boolean(o||a),s=l?e=>{e.preventDefault()}:i;if(!t&&"button"===r){return{disabled:l,onClick:s,...a?{"aria-busy":!0,"aria-disabled":!0}:{}}}if(t&&c(n)){const{type:e}=n;if("a"===e){return{"aria-disabled":l,onClick:s,...a?{"aria-busy":!0}:{},...o?{tabIndex:-1}:{}}}}return{role:"button",tabIndex:o?-1:0,"aria-disabled":l,onClick:s,...a?{"aria-busy":!0}:{}}},Se=e=>{const t=u(e);return _(()=>{t.current=e}),d(()=>(...e)=>t.current?.(...e),[])},Ie=a({platform:"ios",colorScheme:"light"}),Ee=()=>i(Ie),Be=()=>{const{colorScheme:e}=Ee();return e},Me=e=>{const{src:t,referrerPolicy:n}=e,[r,o]=p("idle");return m(()=>{if(!t)return void o("error");let e=!0;const r=new window.Image,a=t=>()=>{e&&o(t)};return o("loading"),r.onload=a("loaded"),r.onerror=a("error"),r.src=t,n&&(r.referrerPolicy=n),()=>{e=!1}},[t,n]),r},Re=()=>{const{platform:e}=Ee();return e},Ae=a(void 0);function ke(){const e=i(Ae);if(!e)throw new Error("useSnackbar must be used within SnackbarProvider");return e}const Le=(e={})=>{const{listenChanges:t}=e,[n,r]=p(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),o=e=>{r(()=>e.matches?"dark":"light")};return _(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return r(()=>e.matches?"dark":"light"),t?(e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}):ge},[t]),n};var Pe={AvatarText:"AvatarText__DIj",AvatarText_gradient_red:"AvatarText_gradient_red__bnV",AvatarText_gradient_orange:"AvatarText_gradient_orange__Ngq",AvatarText_gradient_green:"AvatarText_gradient_green__n7Z",AvatarText_gradient_blue:"AvatarText_gradient_blue__gLu",AvatarText_gradient_purple:"AvatarText_gradient_purple__UsS",AvatarText__in:"AvatarText__in__cDg"};const ze=e=>e<20?{fontSize:6}:e<28?{fontSize:8}:e<32?{fontSize:10}:e<36?{fontSize:11}:e<40?{fontSize:13}:e<48?{fontSize:14}:e<54?{fontSize:17}:e<64?{fontSize:18}:e<72?{fontSize:21}:e<88?{fontSize:26}:{fontSize:30},Oe=o((t,n)=>{const{className:r,children:o,gradient:a="red",...i}=t,{size:l}=_e(),s=C(Pe.AvatarText,{[Pe[`AvatarText_gradient_${a}`]]:"custom"!==a},r);return e("span",{ref:n,className:s,...i,children:e("span",{className:Pe.AvatarText__in,style:ze(l),children:o})})});Oe.displayName="AvatarText";var De="AvatarImage__H7-";const He=o((t,n)=>{const{className:r,fallback:o,fallbackGradient:a="red",...i}=t,[l,s]=p("idle"),c=Me({src:i.src??i.srcSet,referrerPolicy:i.referrerPolicy}),u=Se(e=>{s(e)});return m(()=>{"idle"!==c&&u(c)},[c,u]),"error"===l?e(Oe,{gradient:a,children:o}):e("img",{ref:n,className:C(De,r),...i})});He.displayName="AvatarImage";var $e="AvatarOverlay__-nV";const Ue=o((t,n)=>{const{className:r,onClick:o,...a}=t;return e("span",{ref:n,className:C($e,r),onClick:e=>{e.preventDefault(),o?.(e)},...a})});Ue.displayName="AvatarOverlay";const je=Object.assign({},{Container:xe,Image:He,Overlay:Ue,Icon:Te,Text:Oe,CloseButton:pe});var We="ClearableInput__4PN",Fe="ClearableInput__button__iUo",Ve="ClearableInput__count__K7Z";const Ye=e=>void 0===e||""===e||Array.isArray(e)&&0===e.length,Xe=o((n,r)=>{const{className:o,onChange:a,innerClassNames:i,withClearButton:l=!0,disabled:s,count:c,..._}=n,d=u(null),m=void 0!==_.value,[f,h]=p(()=>Ye(_.defaultValue)),v=m?Ye(_.value):f;return t("span",{className:C(We,o),children:[e("input",{ref:ye(d,r),className:C(i?.input),onChange:e=>{m||h(""===e.currentTarget.value),a?.(e)},disabled:s,..._}),!v&&!s&&!!c&&e("div",{className:C(Ve,i?.count),children:c}),!v&&!s&&l&&e(ce,{type:"button",className:C(Fe,i?.clearButton),onClick:()=>{d.current&&(e=>{const{el:t,value:n}=e,r=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;r?.call(t,n);const o=new Event("input",{bubbles:!0});t.dispatchEvent(o)})({el:d.current,value:""})},"aria-label":"Очистить",children:e(I,{})})]})});Xe.displayName="ClearableInput";var qe="Container__yZR",Ke="Container_fullWidth__2tY";const Ge=o((t,n)=>{const{className:r,asChild:o,fullWidth:a,...i}=t,l=o?q:"div",s=C(qe,{[Ke]:a},r);return e(l,{ref:n,className:s,...i})});Ge.displayName="Container";var Ze="EllipsisText__DEC",Je="EllipsisText_multiline__y4t",Qe="EllipsisText_singleLine__Arf";const et=o((t,n)=>{const{className:r,maxLines:o=1,style:a,asChild:i,...l}=t,s=i?q:"span",c=C(Ze,{[Je]:o>1,[Qe]:1===o},r);return e(s,{ref:n,className:c,style:{"--MaxUi-EllipsisText_linesCount":o,...a},...l})});et.displayName="EllipsisText";var tt="Flex__pih";const nt=o((t,n)=>{const{className:r,display:o="flex",direction:a="row",align:i="flex-start",justify:l="start",asChild:s,wrap:c,style:u,gap:_,gapX:d,gapY:p,...m}=t;return e(s?q:"div",{ref:n,className:C(tt,r),style:{flexDirection:a,justifyContent:l,alignItems:i,flexWrap:c,...u,display:o,"--MaxUi-Flex_gapX":me(d??_??0),"--MaxUi-Flex_gapY":me(p??_??0)},...m})});nt.displayName="Flex";var rt="Grid__lFk";const ot=o((t,n)=>{const{className:r,style:o,display:a="grid",align:i="start",justify:l="start",gap:s,gapX:c,gapY:u,cols:_,rows:d,asChild:p,...m}=t;return e(p?q:"div",{ref:n,className:C(rt,r),style:{justifyContent:l,alignItems:i,...o,display:a,"--MaxUi-Grid_gapX":me(c??s??0),"--MaxUi-Grid_gapY":me(u??s??0),"--MaxUi-Grid_cols":_??0,"--MaxUi-Grid_rows":d??0},...m})});ot.displayName="Grid";var at={Panel:"Panel__XH0",Panel_centeredX:"Panel_centeredX__DG7",Panel_centeredY:"Panel_centeredY__f-k",Panel_mode_primary:"Panel_mode_primary__fNs",Panel_mode_secondary:"Panel_mode_secondary__Tez"};const it=o((t,n)=>{const{className:r,mode:o="primary",centeredX:a,centeredY:i,...l}=t,s=C(at.Panel,at[`Panel_mode_${o}`],{[at.Panel_centeredX]:a,[at.Panel_centeredY]:i},r);return e("div",{ref:n,className:s,...l})});it.displayName="Panel";var lt="Ripple__dJ9",st="Ripple_active__uv5";const ct=o((t,n)=>{const{className:r,...o}=t,a=u(null),i=u(null),l=e=>{const t=e.currentTarget.getBoundingClientRect();((e,t)=>{null!==i.current&&(i.current.classList.remove(st),i.current.style.top=t+"px",i.current.style.left=e+"px",i.current.classList.add(st))})(e.clientX-(t.left??0),e.clientY-(t.top??0))};return _(()=>{if(i.current)return a.current=i.current.parentElement,null!==a.current&&a.current.addEventListener("pointerdown",l),()=>{null!==a.current&&a.current?.removeEventListener("pointerdown",l)}},[]),e("span",{ref:ye(n,i),role:"presentation","aria-hidden":!0,className:C(lt,r),onAnimationEnd:()=>{null!==i.current&&i.current.classList.remove(st)},...o})});ct.displayName="Ripple";var ut="Tappable__O--",_t="Tappable_interactive__4Uv",dt="Tappable_disabled__0z8",pt="Tappable_activeMode_ripple__3k-",mt="Tappable_activeMode_highlight__Hs-",ft="Tappable__ripple__Egr";const ht=o((n,r)=>{const{className:o,disabled:a,asChild:i,children:l,onClick:s,parentChildren:u,as:_="div",...d}=n,p=i?q:_,m=Re(),f=Ne({asChild:i,children:l,disabled:a,onClick:s,rootElement:_}),h=(({onClick:e,href:t,children:n,asChild:r,parentChildren:o=n})=>r?!(!r||!c(o))&&("href"in o.props||"onClick"in o.props):!!e||!!t)({onClick:s,href:d.href,children:l,asChild:i,parentChildren:u}),v="android"===m&&h&&!a,y=C(ut,{[_t]:h,[dt]:a,[mt]:!v,[pt]:v},o);return t(p,{ref:r,className:y,...h?f:{},...d,children:[l,v&&e(ct,{className:ft})]})});ht.displayName="Tappable";var vt={Spinner:"Spinner__piy",Spinner_appearance_primary:"Spinner_appearance_primary__mxz",Spinner_appearance_themed:"Spinner_appearance_themed__-9S","Spinner_appearance_primary-static":"Spinner_appearance_primary-static__JxW",Spinner_appearance_contrast:"Spinner_appearance_contrast__Mv6","Spinner_appearance_contrast-static":"Spinner_appearance_contrast-static__rM7",Spinner_appearance_negative:"Spinner_appearance_negative__eMf","Spinner_appearance_neutral-themed":"Spinner_appearance_neutral-themed__D8F",androidSpinner:"androidSpinner__w-L",rotation:"rotation__CUP",iosSpinner:"iosSpinner__3q2",bar:"bar__aHj",fade:"fade__2ZD"};const yt=({size:t})=>e("div",{className:vt.androidSpinner,style:{width:t,height:t}}),gt=({size:t})=>e("div",{className:vt.iosSpinner,style:{width:t,height:t},children:Array.from({length:8},(t,n)=>e("div",{className:vt.bar},n))}),Ct=o((t,n)=>{const{className:r,size:o=20,appearance:a="primary",...i}=t,l=Re(),s=C(vt.Spinner,vt[`Spinner_appearance_${a}`],r);return e("span",{ref:n,role:"status",className:s,...i,children:e("ios"===l?gt:yt,{size:o})})});Ct.displayName="Spinner";var bt={Button:"Button__0OJ",Button_loading:"Button_loading__LD-",Button__iconBefore:"Button__iconBefore__BUe",Button__content:"Button__content__vnq",Button__indicator:"Button__indicator__HuA",Button__iconAfter:"Button__iconAfter__VhZ",Button_disabled:"Button_disabled__jkY",Button_stretched:"Button_stretched__mzq",Button_activeMode_ripple:"Button_activeMode_ripple__E5Y",Button_activeMode_highlight:"Button_activeMode_highlight__K3j",Button_size_xsmall:"Button_size_xsmall__QCm",Button_size_small:"Button_size_small__LLG",Button_size_medium:"Button_size_medium__fI9",Button_size_large:"Button_size_large__S2-",Button_variant_primary:"Button_variant_primary__yLL",Button_variant_secondary:"Button_variant_secondary__DR6",Button_variant_ghost:"Button_variant_ghost__EkG","Button_variant_primary-contrast":"Button_variant_primary-contrast__b63","Button_variant_secondary-contrast":"Button_variant_secondary-contrast__cey",Button_variant_overlay:"Button_variant_overlay__keO",Button_variant_destructive:"Button_variant_destructive__2Ug",Button__spinnerContainer:"Button__spinnerContainer__G4I",Button__ripple:"Button__ripple__jw0"},xt={Counter:"Counter__0Oj",Counter_variant_primary:"Counter_variant_primary__8Mz","Counter_variant_primary-contrast":"Counter_variant_primary-contrast__yFz",Counter_variant_attention:"Counter_variant_attention__IWH","Counter_variant_attention-contrast":"Counter_variant_attention-contrast__LHu",Counter_variant_promo:"Counter_variant_promo__9kD",Counter_variant_static:"Counter_variant_static__d8Y","Counter_variant_static-contrast":"Counter_variant_static-contrast__bAq",Counter_variant_default:"Counter_variant_default__weZ",Counter_variant_mute:"Counter_variant_mute__2SU",Counter_variant_menu:"Counter_variant_menu__qf0"};const wt=o((t,n)=>{const{className:r,value:o,rounded:a,variant:i="primary",...l}=t,s=C(xt.Counter,xt[`Counter_variant_${i}`],r),c=d(()=>a?Intl.NumberFormat("en",{notation:"compact"}).format(o):o,[a,o]);return e("span",{ref:n,className:s,...l,children:c})});wt.displayName="Counter";const Tt=e=>{switch(e){case"xsmall":return 16;case"small":case"medium":return 20;case"large":return 24}},Nt=e=>{switch(e){case"primary":case"destructive":case"overlay":return"contrast-static";case"secondary":return"primary";case"ghost":return"themed";case"primary-contrast":case"secondary-contrast":return"primary-static"}},St=e=>{switch(e){case"primary":return{variant:"primary-contrast"};case"secondary":case"ghost":case"primary-contrast":case"secondary-contrast":return{variant:"static"};case"overlay":return{variant:"static-contrast"};case"destructive":return{variant:"attention-contrast"}}},It=o((n,r)=>{const{className:o,iconBefore:a,iconAfter:i,indicator:l,children:u,onClick:_,loading:d,disabled:p=!1,asChild:m=!1,innerClassNames:f,stretched:h=!1,size:v="medium",variant:y="primary",...g}=n,b="button",x=m?q:b,w=Re(),T=Ne({asChild:m,children:u,disabled:p,loading:d,onClick:_,rootElement:b}),N=p||d,S="android"===w,I=C(bt.Button,bt[`Button_variant_${y}`],bt[`Button_size_${v}`],{[bt.Button_loading]:d,[bt.Button_disabled]:p,[bt.Button_stretched]:h,[bt.Button_activeMode_highlight]:!N&&!S,[bt.Button_activeMode_ripple]:!N&&S},o);return t(x,{ref:r,className:I,...T,...g,children:[he(a)&&e("span",{className:C(bt.Button__iconBefore,f?.iconBefore),children:a}),d&&e("span",{className:C(bt.Button__spinnerContainer,f?.spinnerContainer),children:e(Ct,{className:C(f?.spinner),size:Tt(v),appearance:Nt(y)})}),e(Z,{children:fe({options:{asChild:m,children:u},content:t=>e(et,{className:C(bt.Button__content,f?.content),children:t},"subtree-container")})}),he(l)&&e("span",{className:C(bt.Button__indicator,f?.indicator),children:(E=l,B=y,c(E)&&E.type===wt?s(E,{...St(B)}):E)}),he(i)&&e("span",{className:C(bt.Button__iconAfter,f?.iconAfter),children:i}),S&&!N&&e(ct,{className:bt.Button__ripple})]});var E,B});It.displayName="Button";var Et={CellAction:"CellAction__vzN",CellAction_mode_primary:"CellAction_mode_primary__vZQ",CellAction_disabled:"CellAction_disabled__VZA",CellAction_mode_secondary:"CellAction_mode_secondary__AJk",CellAction_mode_themed:"CellAction_mode_themed__-Gg",CellAction_mode_destructive:"CellAction_mode_destructive__ovY",CellAction_mode_custom:"CellAction_mode_custom__3T8",CellAction_height_compact:"CellAction_height_compact__ysc",CellAction_height_normal:"CellAction_height_normal__ELj",CellAction_surface_island:"CellAction_surface_island__REC",CellAction__before:"CellAction__before__oZm",CellAction__content:"CellAction__content__Uib",CellAction__chevron:"CellAction__chevron__6SI"};const Bt=o((n,r)=>{const{className:o,before:a,children:i,innerClassNames:l,asChild:s=!1,mode:c="primary",surface:u="default",height:_="normal",showChevron:d=!1,...p}=n,m=C(Et.CellAction,Et[`CellAction_mode_${c}`],Et[`CellAction_height_${_}`],{[Et.CellAction_surface_island]:"island"===u,[Et.CellAction_disabled]:p.disabled},o);return t(ht,{ref:r,className:m,asChild:s,as:"button",parentChildren:i,...p,children:[he(a)&&e("span",{className:C(Et.CellAction__before,l?.before),children:a}),e(Z,{children:fe({options:{asChild:s,children:i},content:t=>e("span",{className:C(Et.CellAction__content,l?.content),children:t},"subtree-container")})}),d&&e(T,{className:C(Et.CellAction__chevron,l?.chevron)})]})});Bt.displayName="CellAction";var Mt={CellHeader:"CellHeader__Epf",CellHeader_titleStyle_caps:"CellHeader_titleStyle_caps__nfB",CellHeader__content:"CellHeader__content__El-",CellHeader_titleStyle_normal:"CellHeader_titleStyle_normal__M-p",CellHeader_fullWidth:"CellHeader_fullWidth__h2Y",CellHeader__after:"CellHeader__after__RXN"};const Rt=o((n,r)=>{const{className:o,titleStyle:a="caps",fullWidth:i=!1,children:l,after:s,innerClassNames:c,...u}=n,_=C(Mt.CellHeader,Mt[`CellHeader_titleStyle_${a}`],{[Mt.CellHeader_fullWidth]:i},o);return t("div",{ref:r,className:_,...u,children:[he(l)&&e("div",{className:C(Mt.CellHeader__content,c?.content),children:l}),he(s)&&e("div",{className:C(Mt.CellHeader__after,c?.after),children:s})]})});Rt.displayName="CellHeader";var At={CellInput:"CellInput__92-",CellInput_disabled:"CellInput_disabled__fZ7",CellInput__input:"CellInput__input__gQ3",CellInput_height_compact:"CellInput_height_compact__Mv2",CellInput_height_normal:"CellInput_height_normal__ovc",CellInput_surface_island:"CellInput_surface_island__cls",CellInput__before:"CellInput__before__Hkm",CellInput__body:"CellInput__body__Egp",CellInput__clearButton:"CellInput__clearButton__znK"};const kt=o((n,r)=>{const{className:o,before:a,innerClassNames:i,disabled:l,height:s="normal",surface:c="default",...u}=n,_=C(At.CellInput,At[`CellInput_height_${s}`],{[At.CellInput_surface_island]:"island"===c,[At.CellInput_disabled]:l},o);return t("label",{className:_,children:[he(a)&&e(et,{className:C(At.CellInput__before,i?.before),maxLines:1,children:a}),e(Xe,{ref:r,className:C(At.CellInput__body,i?.body),innerClassNames:{input:C(At.CellInput__input,i?.input),clearButton:C(At.CellInput__clearButton,i?.clearButton)},type:"text",disabled:l,...u})]})});kt.displayName="CellInput";var Lt={CellList:"CellList__1ou",CellList_filled:"CellList_filled__ikE",CellList__body:"CellList__body__ouS",CellList_mode_island:"CellList_mode_island__aCu"};const Pt=o((n,r)=>{const{className:o,header:a,children:i,mode:l="full-width",filled:s="island"===l,...c}=n,u=C(Lt.CellList,Lt[`CellList_mode_${l}`],{[Lt.CellList_filled]:s},o);return t("div",{ref:r,className:u,...c,children:[he(a)&&e("div",{className:Lt.CellList__header,children:a}),e("div",{className:Lt.CellList__body,children:i})]})});Pt.displayName="CellList";var zt={CellSimple:"CellSimple__n0z",CellSimple_disabled:"CellSimple_disabled__T-3",CellSimple__title:"CellSimple__title__aYs",CellSimple__overline:"CellSimple__overline__Ncr",CellSimple__link:"CellSimple__link__ie-",CellSimple_subtitle_secondary:"CellSimple_subtitle_secondary__3uL",CellSimple__subtitle:"CellSimple__subtitle__oIF",CellSimple_subtitle_tertiary:"CellSimple_subtitle_tertiary__lz0",CellSimple_height_compact:"CellSimple_height_compact__HUQ",CellSimple_height_normal:"CellSimple_height_normal__pxj",CellSimple_surface_island:"CellSimple_surface_island__GzM",CellSimple__before:"CellSimple__before__5Q9",CellSimple__after:"CellSimple__after__2FK",CellSimple__content:"CellSimple__content__SOk",CellSimple__chevron:"CellSimple__chevron__cSs",CellSimple_separator:"CellSimple_separator__aOX"};const Ot=o((n,r)=>{const{link:o,after:a,title:i,before:l,subtitle:s,children:c,overline:u,separator:_,className:d,innerClassNames:p,as:m="div",surface:f="default",height:h="normal",asChild:v=!1,disabled:y=!1,showChevron:g=!1,subtitleMode:b="secondary",...x}=n,w=C(zt.CellSimple,zt[`CellSimple_height_${h}`],zt[`CellSimple_subtitle_${b}`],{[zt.CellSimple_surface_island]:"island"===f,[zt.CellSimple_disabled]:y,[zt.CellSimple_separator]:_},d);return t(ht,{ref:r,className:w,asChild:v,as:m,disabled:y,parentChildren:c,...x,children:[he(l)&&e("div",{className:C(zt.CellSimple__before,p?.before),children:l}),e(Z,{children:fe({options:{asChild:v,children:c},content:n=>t("div",{className:C(zt.CellSimple__content,p?.content),children:[he(u)&&e("div",{className:C(zt.CellSimple__overline,p?.overline),children:u}),he(i)&&e("div",{className:C(zt.CellSimple__title,p?.title),children:i}),he(s)&&e("div",{className:C(zt.CellSimple__subtitle,p?.subtitle),children:s}),n,o&&e("a",{className:C(zt.CellSimple__link,p?.link),href:o,target:"_blank",rel:"noreferrer",children:o})]},"subtree-container")})}),(he(a)||g)&&t("div",{className:C(zt.CellSimple__after,p?.after),children:[a,g&&e(T,{className:C(zt.CellSimple__chevron,p?.chevron)})]})]})});function Dt(){return"undefined"!=typeof window}function Ht(e){return jt(e)?(e.nodeName||"").toLowerCase():"#document"}function $t(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ut(e){var t;return null==(t=(jt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function jt(e){return!!Dt()&&(e instanceof Node||e instanceof $t(e).Node)}function Wt(e){return!!Dt()&&(e instanceof Element||e instanceof $t(e).Element)}function Ft(e){return!!Dt()&&(e instanceof HTMLElement||e instanceof $t(e).HTMLElement)}function Vt(e){return!(!Dt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof $t(e).ShadowRoot)}function Yt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function Xt(e){return/^(table|td|th)$/.test(Ht(e))}function qt(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}Ot.displayName="CellSimple";const Kt=/transform|translate|scale|rotate|perspective|filter/,Gt=/paint|layout|strict|content/,Zt=e=>!!e&&"none"!==e;let Jt;function Qt(e){const t=Wt(e)?nn(e):e;return Zt(t.transform)||Zt(t.translate)||Zt(t.scale)||Zt(t.rotate)||Zt(t.perspective)||!en()&&(Zt(t.backdropFilter)||Zt(t.filter))||Kt.test(t.willChange||"")||Gt.test(t.contain||"")}function en(){return null==Jt&&(Jt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jt}function tn(e){return/^(html|body|#document)$/.test(Ht(e))}function nn(e){return $t(e).getComputedStyle(e)}function rn(e){return Wt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function on(e){if("html"===Ht(e))return e;const t=e.assignedSlot||e.parentNode||Vt(e)&&e.host||Ut(e);return Vt(t)?t.host:t}function an(e){const t=on(e);return tn(t)?(e.ownerDocument||e).body:Ft(t)&&Yt(t)?t:an(t)}function ln(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=an(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=$t(o);if(a){const e=sn(i);return t.concat(i,i.visualViewport||[],Yt(o)?o:[],e&&n?ln(e):[])}return t.concat(o,ln(o,[],n))}function sn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const cn=Math.min,un=Math.max,_n=Math.round,dn=Math.floor,pn=e=>({x:e,y:e}),mn={left:"right",right:"left",bottom:"top",top:"bottom"};function fn(e,t){return"function"==typeof e?e(t):e}function hn(e){return e.split("-")[0]}function vn(e){return e.split("-")[1]}function yn(e){return"x"===e?"y":"x"}function gn(e){return"y"===e?"height":"width"}function Cn(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function bn(e){return yn(Cn(e))}function xn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const wn=["left","right"],Tn=["right","left"],Nn=["top","bottom"],Sn=["bottom","top"];function In(e,t,n,r){const o=vn(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Tn:wn:t?wn:Tn;case"left":case"right":return t?Nn:Sn;default:return[]}}(hn(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(xn)))),a}function En(e){const t=hn(e);return mn[t]+e.slice(t.length)}function Bn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const Mn="data-floating-ui-focusable";function Rn(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Vt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function An(e){return"composedPath"in e?e.composedPath()[0]:e.target}function kn(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Ln(e){return(null==e?void 0:e.ownerDocument)||document}function Pn(e,t,n){void 0===n&&(n=!0);return e.filter(e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))}).flatMap(t=>[t,...Pn(e,t.id,n)])}function zn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var On="undefined"!=typeof document?m:function(){};function Dn(e){const t=r.useRef(e);return On(()=>{t.current=e}),t}const Hn={...r}.useInsertionEffect||(e=>e());function $n(e){const t=r.useRef(()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")});return Hn(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function Un(e,t,n){let{reference:r,floating:o}=e;const a=Cn(t),i=bn(t),l=gn(i),s=hn(t),c="y"===a,u=r.x+r.width/2-o.width/2,_=r.y+r.height/2-o.height/2,d=r[l]/2-o[l]/2;let p;switch(s){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:_};break;case"left":p={x:r.x-o.width,y:_};break;default:p={x:r.x,y:r.y}}const m=vn(t);return m&&(p[i]+=d*("end"===m?1:-1)*(n&&c?-1:1)),p}async function jn(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:_="floating",altBoundary:d=!1,padding:p=0}=fn(t,e),m=function(e){return"number"!=typeof e?function(e){var t,n,r,o;return{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(o=e.left)?o:0}}(e):{top:e,right:e,bottom:e,left:e}}(p),f=l[d?"floating"===_?"reference":"floating":_],h=Bn(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(f)))||n?f:f.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:c,rootBoundary:u,strategy:s})),v="floating"===_?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),g=await(null==a.isElement?void 0:a.isElement(y))&&await(null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},C=Bn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:v,offsetParent:y,strategy:s}):v);return{top:(h.top-C.top+m.top)/g.y,bottom:(C.bottom-h.bottom+m.bottom)/g.y,left:(h.left-C.left+m.left)/g.x,right:(C.right-h.right+m.right)/g.x}}const Wn=new Set(["left","top"]);function Fn(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ft(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=_n(n)!==a||_n(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function Vn(e){return Wt(e)?e:e.contextElement}function Yn(e){const t=Vn(e);if(!Ft(t))return pn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Fn(t);let i=(a?_n(n.width):n.width)/r,l=(a?_n(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const Xn=pn(0);function qn(e){const t=$t(e);return en()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Xn}function Kn(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=Vn(e);let i=pn(1);t&&(r?Wt(r)&&(i=Yn(r)):i=Yn(e));const l=function(e,t,n){return void 0===t&&(t=!1),!!n&&t&&n===$t(e)}(a,n,r)?qn(a):pn(0);let s=(o.left+l.x)/i.x,c=(o.top+l.y)/i.y,u=o.width/i.x,_=o.height/i.y;if(a&&r){const e=$t(a),t=Wt(r)?$t(r):r;let n=e,o=sn(n);for(;o&&t!==n;){const e=Yn(o),t=o.getBoundingClientRect(),r=nn(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,u*=e.x,_*=e.y,s+=a,c+=i,n=$t(o),o=sn(n)}}return Bn({width:u,height:_,x:s,y:c})}function Gn(e,t){const n=rn(e).scrollLeft;return t?t.left+n:Kn(Ut(e)).left+n}function Zn(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Gn(e,n),y:n.top+t.scrollTop}}function Jn(e,t,n){let r;if("viewport"===t||"layoutViewport"===t)r=function(e,t,n){void 0===n&&(n="viewport");const r="layoutViewport"===n,o=$t(e),a=Ut(e),i=o.visualViewport;let l=a.clientWidth,s=a.clientHeight,c=0,u=0;if(i){const e=!en()||"fixed"===t;r?e||(c=-i.offsetLeft,u=-i.offsetTop):(l=i.width,s=i.height,e&&(c=i.offsetLeft,u=i.offsetTop))}if(Gn(a)<=0){const e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(a.clientWidth-t.clientWidth-r),i="stable both-edges"===getComputedStyle(a).scrollbarGutter?o/2:o;i<=25&&(l-=i)}return{width:l,height:s,x:c,y:u}}(e,n,t);else if("document"===t)r=function(e){const t=rn(e),n=e.ownerDocument.body,r=un(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=un(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Gn(e);const i=-t.scrollTop;return"rtl"===nn(n).direction&&(a+=un(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:a,y:i}}(Ut(e));else if(Wt(t))r=function(e,t){const n=Kn(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Yn(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=qn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Bn(r)}function Qn(e,t,n){const r=Ft(t),o=Ut(t),a="fixed"===n,i=Kn(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const s=pn(0);if((r||!a)&&(("body"!==Ht(t)||Yt(o))&&(l=rn(t)),r)){const e=Kn(t,!0,a,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}!r&&o&&(s.x=Gn(o));const c=!o||r||a?pn(0):Zn(o,l);return{x:i.left+l.scrollLeft-s.x-c.x,y:i.top+l.scrollTop-s.y-c.y,width:i.width,height:i.height}}function er(e){return"static"===nn(e).position}function tr(e,t){if(!Ft(e)||"fixed"===nn(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Ut(e)===n&&(n=n.ownerDocument.body),n}function nr(e,t){const n=$t(e);if(qt(e))return n;if(!Ft(e)){let t=on(e);for(;t&&!tn(t);){if(Wt(t)&&!er(t))return t;t=on(t)}return n}let r=tr(e,t);for(;r&&Xt(r)&&er(r);)r=tr(r,t);return r&&tn(r)&&er(r)&&!Qt(r)?n:r||function(e){let t=on(e);for(;Ft(t)&&!tn(t);){if(Qt(t))return t;if(qt(t))return null;t=on(t)}return null}(e)||n}const rr={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=Ut(r),l=!!t&&qt(t.floating);if(r===i||l&&a)return n;let s={scrollLeft:0,scrollTop:0},c=pn(1);const u=pn(0),_=Ft(r);if((_||!a)&&(("body"!==Ht(r)||Yt(i))&&(s=rn(r)),_)){const e=Kn(r);c=Yn(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const d=!i||_||a?pn(0):Zn(i,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-s.scrollTop*c.y+u.y+d.y}},getDocumentElement:Ut,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?qt(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=ln(e,[],!1).filter(e=>Wt(e)&&"body"!==Ht(e)),o=null;const a="fixed"===nn(e).position;let i=a?on(e):e;for(;Wt(i)&&!tn(i);){const e=nn(i),t=Qt(i),n=o?o.position:a?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?o=e:r=r.filter(e=>e!==i),i=on(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=Jn(t,a[0],o);let l=i.top,s=i.right,c=i.bottom,u=i.left;for(let e=1;e<a.length;e++){const n=Jn(t,a[e],o);l=un(n.top,l),s=cn(n.right,s),c=cn(n.bottom,c),u=un(n.left,u)}return{width:s-u,height:c-l,x:u,y:l}},getOffsetParent:nr,getElementRects:async function(e){const t=this.getOffsetParent||nr,n=this.getDimensions,r=await n(e.floating);return{reference:Qn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){const{width:t,height:n}=Fn(e);return{width:t,height:n}},getScale:Yn,isElement:Wt,isRTL:function(e){return"rtl"===nn(e).direction}};function or(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ar(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=Vn(e),u=o||a?[...c?ln(c):[],...t?ln(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n),a&&e.addEventListener("resize",n)});const _=c&&l?function(e,t,n){let r,o=null;const a=Ut(e);function i(){var e;clearTimeout(r),null==(e=o)||e.disconnect(),o=null}function l(n,s){void 0===n&&(n=!1),void 0===s&&(s=1),i();const c=e.getBoundingClientRect(),{left:u,top:_,width:d,height:p}=c;if(n||t(),!d||!p)return;const m={rootMargin:-dn(_)+"px "+-dn(a.clientWidth-(u+d))+"px "+-dn(a.clientHeight-(_+p))+"px "+-dn(u)+"px",threshold:un(0,cn(1,s))||1};let f=!0;function h(t){const n=t[0].intersectionRatio;if(!or(c,e.getBoundingClientRect()))return l();if(n!==s){if(!f)return l();n?l(!1,n):r=setTimeout(()=>{l(!1,1e-7)},1e3)}f=!1}try{o=new IntersectionObserver(h,{...m,root:a.ownerDocument})}catch(e){o=new IntersectionObserver(h,m)}o.observe(e)}const s=$t(e),c=()=>l(n);return s.addEventListener("resize",c),l(!0),()=>{s.removeEventListener("resize",c),i()}}(c,n,a):null;let d,p=-1,m=null;i&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!s&&m.observe(c),t&&m.observe(t));let f=s?Kn(e):null;return s&&function t(){const r=Kn(e);f&&!or(f,r)&&n();f=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==_||_(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(d)}}const ir=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,s=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=hn(n),l=vn(n),s="y"===Cn(n),c=Wn.has(i)?-1:1,u=a&&s?-1:1,_=fn(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof _?{mainAxis:_,crossAxis:0,alignmentAxis:null}:{mainAxis:_.mainAxis||0,crossAxis:_.crossAxis||0,alignmentAxis:_.alignmentAxis};return l&&"number"==typeof m&&(p="end"===l?-1*m:m),s?{x:p*u,y:d*c}:{x:d*c,y:p*u}}(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:a+s.y,data:{...s,placement:i}}}}},lr=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=fn(e,t),u={x:n,y:r},_=await a.detectOverflow(t,c),d=Cn(o),p=yn(d);let m=u[p],f=u[d];const h=(e,t)=>{return n=t+_["y"===e?"top":"left"],r=t,o=t-_["y"===e?"bottom":"right"],un(n,cn(r,o));var n,r,o};i&&(m=h(p,m)),l&&(f=h(d,f));const v=s.fn({...t,[p]:m,[d]:f});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:i,[d]:l}}}}}},sr=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:_=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...h}=fn(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const v=hn(o),y=Cn(l),g=hn(l)===l,C=await(null==s.isRTL?void 0:s.isRTL(c.floating)),b=d||(g||!f?[En(l)]:function(e){const t=En(e);return[xn(e),t,xn(t)]}(l)),x="none"!==m;!d&&x&&b.push(...In(l,f,m,C));const w=[l,...b],T=await s.detectOverflow(t,h),N=[];let S=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&N.push(T[v]),_){const e=function(e,t,n){void 0===n&&(n=!1);const r=vn(e),o=bn(e),a=gn(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=En(i)),[i,En(i)]}(o,i,C);N.push(T[e[0]],T[e[1]])}if(S=[...S,{placement:o,overflows:N}],!N.every(e=>e<=0)){var I,E;const e=((null==(I=a.flip)?void 0:I.index)||0)+1,t=w[e];if(t){if(!("alignment"===_&&y!==Cn(t))||S.every(e=>Cn(e.placement)!==y||e.overflows[0]>0))return{data:{index:e,overflows:S},reset:{placement:t}}}let n=null==(E=S.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var B;const e=null==(B=S.filter(e=>{if(x){const t=Cn(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:B[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},cr=(e,t,n)=>{const r=new Map,o=null!=n?n:{},a={...rr,...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:jn},s=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:_}=Un(c,r,s),d=r,p=0;const m={};for(let n=0;n<a.length;n++){const f=a[n];if(!f)continue;const{name:h,fn:v}=f,{x:y,y:g,data:C,reset:b}=await v({x:u,y:_,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=y?y:u,_=null!=g?g:_,m[h]={...m[h],...C},b&&p<50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:_}=Un(c,d,s))),n=-1)}return{x:u,y:_,placement:d,strategy:o,middlewareData:m}})(e,t,{...o,platform:a})};var ur="undefined"!=typeof document?m:function(){};function _r(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!_r(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!_r(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function dr(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function pr(e,t){const n=dr(e);return Math.round(t*n)/n}function mr(e){const t=r.useRef(e);return ur(()=>{t.current=e}),t}const fr=(e,t)=>{const n=ir(e);return{name:n.name,fn:n.fn,options:[e,t]}},hr=(e,t)=>{const n=lr(e);return{name:n.name,fn:n.fn,options:[e,t]}},vr=(e,t)=>{const n=sr(e);return{name:n.name,fn:n.fn,options:[e,t]}},yr="data-floating-ui-focusable",gr="active",Cr="selected",br={...r};let xr=!1,wr=0;const Tr=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+wr++;const Nr=br.useId||function(){const[e,t]=r.useState(()=>xr?Tr():void 0);return On(()=>{null==e&&t(Tr())},[]),r.useEffect(()=>{xr=!0},[]),e};let Sr;function Ir(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}"production"!==process.env.NODE_ENV&&(Sr=new Set);const Er=r.createContext(null),Br=r.createContext(null),Mr=()=>{var e;return(null==(e=r.useContext(Er))?void 0:e.id)||null},Rr=()=>r.useContext(Br);function Ar(e){const t=Nr(),n=Rr(),r=Mr();return On(()=>{if(!t)return;const e={id:t,parentId:r};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}},[n,t,r]),t}function kr(t){const{children:n,id:o}=t,a=Mr();return e(Er.Provider,{value:r.useMemo(()=>({id:o,parentId:a}),[o,a]),children:n})}function Lr(t){const{children:n}=t,o=r.useRef([]),a=r.useCallback(e=>{o.current=[...o.current,e]},[]),i=r.useCallback(e=>{o.current=o.current.filter(t=>t!==e)},[]),[l]=r.useState(()=>Ir());return e(Br.Provider,{value:r.useMemo(()=>({nodesRef:o,addNode:a,removeNode:i,events:l}),[a,i,l]),children:n})}function Pr(e){return"data-floating-ui-"+e}function zr(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const Or=Pr("safe-polygon");function Dr(e,t,n){if(n&&!zn(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){const n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function Hr(e){return"function"==typeof e?e():e}function $r(e){return Ft(e.target)&&"BUTTON"===e.target.tagName}function Ur(e){return function(e){return Ft(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}(e)}function jr(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:a,elements:{domReference:i}}=e,{enabled:l=!0,event:s="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:_=!0,stickIfOpen:d=!0}=t,p=r.useRef(),m=r.useRef(!1),f=r.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==s&&(zn(t,!0)&&u||(!n||!c||a.current.openEvent&&d&&"mousedown"!==a.current.openEvent.type?(e.preventDefault(),o(!0,e.nativeEvent,"click")):o(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===s&&p.current?p.current=void 0:zn(t,!0)&&u||(!n||!c||a.current.openEvent&&d&&"click"!==a.current.openEvent.type?o(!0,e.nativeEvent,"click"):o(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!_||$r(e)||(" "!==e.key||Ur(i)||(e.preventDefault(),m.current=!0),function(e){return Ft(e.target)&&"A"===e.target.tagName}(e)||"Enter"===e.key&&o(!n||!c,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!_||$r(e)||Ur(i)||" "===e.key&&m.current&&(m.current=!1,o(!n||!c,e.nativeEvent,"click"))}}),[a,i,s,u,_,o,n,d,c]);return r.useMemo(()=>l?{reference:f}:{},[l,f])}const Wr={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Fr={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Vr=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Yr(e){const{open:t=!1,onOpenChange:n,elements:o}=e,a=Nr(),i=r.useRef({}),[l]=r.useState(()=>Ir()),s=null!=Mr();if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!Wt(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var a;null!=(e=Sr)&&e.has(o)||(null==(a=Sr)||a.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=r.useState(o.reference),_=$n((e,t,r)=>{i.current.openEvent=e?t:void 0,l.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)}),d=r.useMemo(()=>({setPositionReference:u}),[]),p=r.useMemo(()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference}),[c,o.reference,o.floating]);return r.useMemo(()=>({dataRef:i,open:t,onOpenChange:_,elements:p,events:l,floatingId:a,refs:d}),[t,_,p,l,a,d])}function Xr(e){var t,n;let{elements:o,...a}=void 0===e?{}:e;const{nodeId:i}=a,l=Yr({...a,elements:{reference:null!=(t=null==o?void 0:o.reference)?t:null,floating:null!=(n=null==o?void 0:o.floating)?n:null}}),s=a.rootContext||l,c=s.elements,[u,_]=r.useState(null),[d,p]=r.useState(null),m=(null==c?void 0:c.domReference)||u,f=r.useRef(null),h=Rr();On(()=>{m&&(f.current=m)},[m]);const y=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:a,elements:{reference:i,floating:l}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[_,d]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=r.useState(o);_r(p,o)||m(o);const[f,h]=r.useState(null),[y,g]=r.useState(null),C=r.useCallback(e=>{e!==T.current&&(T.current=e,h(e))},[]),b=r.useCallback(e=>{e!==N.current&&(N.current=e,g(e))},[]),x=i||f,w=l||y,T=r.useRef(null),N=r.useRef(null),S=r.useRef(_),I=null!=c,E=mr(c),B=mr(a),M=mr(u),R=r.useCallback(()=>{if(!T.current||!N.current)return;const e={placement:t,strategy:n,middleware:p};B.current&&(e.platform=B.current),cr(T.current,N.current,e).then(e=>{const t={...e,isPositioned:!1!==M.current};A.current&&!_r(S.current,t)&&(S.current=t,v.flushSync(()=>{d(t)}))})},[p,t,n,B,M]);ur(()=>{!1===u&&S.current.isPositioned&&(S.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[u]);const A=r.useRef(!1);ur(()=>(A.current=!0,()=>{A.current=!1}),[]),ur(()=>{if(x&&(T.current=x),w&&(N.current=w),x&&w){if(E.current)return E.current(x,w,R);R()}},[x,w,R,E,I]);const k=r.useMemo(()=>({reference:T,floating:N,setReference:C,setFloating:b}),[C,b]),L=r.useMemo(()=>({reference:x,floating:w}),[x,w]),P=r.useMemo(()=>{const e={position:n,left:0,top:0};if(!L.floating)return e;const t=pr(L.floating,_.x),r=pr(L.floating,_.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...dr(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,L.floating,_.x,_.y]);return r.useMemo(()=>({..._,update:R,refs:k,elements:L,floatingStyles:P}),[_,R,k,L,P])}({...a,elements:{...c,...d&&{reference:d}}}),g=r.useCallback(e=>{const t=Wt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;p(t),y.refs.setReference(t)},[y.refs]),C=r.useCallback(e=>{(Wt(e)||null===e)&&(f.current=e,_(e)),(Wt(y.refs.reference.current)||null===y.refs.reference.current||null!==e&&!Wt(e))&&y.refs.setReference(e)},[y.refs]),b=r.useMemo(()=>({...y.refs,setReference:C,setPositionReference:g,domReference:f}),[y.refs,C,g]),x=r.useMemo(()=>({...y.elements,domReference:m}),[y.elements,m]),w=r.useMemo(()=>({...y,...s,refs:b,elements:x,nodeId:i}),[y,b,x,i,s]);return On(()=>{s.dataRef.current.floatingContext=w;const e=null==h?void 0:h.nodesRef.current.find(e=>e.id===i);e&&(e.context=w)}),r.useMemo(()=>({...y,context:w,refs:b,elements:x}),[y,b,x,w])}function qr(e,t,n){const r=new Map,o="item"===n;let a=e;if(o&&e){const{[gr]:t,[Cr]:n,...r}=e;a=r}return{..."floating"===n&&{tabIndex:-1,[yr]:""},...a,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,a]=t;var i;o&&[gr,Cr].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof a&&(null==(i=r.get(n))||i.push(a),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=a)}),e):e,{})}}const Kr=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Gr(e,t){var n,o;void 0===t&&(t={});const{open:a,elements:i,floatingId:l}=e,{enabled:s=!0,role:c="dialog"}=t,u=Nr(),_=(null==(n=i.domReference)?void 0:n.id)||u,d=r.useMemo(()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(Mn)?t:t.querySelector("["+Mn+"]")||t:null)?void 0:e.id)||l},[i.floating,l]),p=null!=(o=Kr.get(c))?o:c,m=null!=Mr(),f=r.useMemo(()=>"tooltip"===p||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:a?d:void 0}:{"aria-expanded":a?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":a?d:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:_},..."menu"===p&&m&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}},[p,d,m,a,_,c]),h=r.useMemo(()=>{const e={id:d,...p&&{role:p}};return"tooltip"===p||"label"===c?e:{...e,..."menu"===p&&{"aria-labelledby":_}}},[p,d,_,c]),v=r.useCallback(e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:d+"-fui-option"}};switch(c){case"select":case"combobox":return{...r,"aria-selected":n}}return{}},[d,c]);return r.useMemo(()=>s?{reference:f,floating:h,item:v}:{},[s,f,h,v])}const Zr=a({mode:"desktop",close:ge}),Jr=()=>i(Zr);var Qr="ContextMenu__trigger__bEu";const eo={open:100,close:300},to=()=>"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(pointer: coarse)").matches;var no="ContextMenuDivider__JLr";const ro=({className:t,...n})=>e("div",{role:"separator",className:C(no,t),...n});ro.displayName="ContextMenuDivider";var oo="ContextMenuActionBar__Req",ao="ContextMenuActionBar__button__5UF",io="ContextMenuActionBar__icon__pKA",lo="ContextMenuActionBar__label__Dcc";const so=({buttons:r})=>{const{close:o,innerClassNames:a}=Jr(),i=e=>t=>{e.onClick?.(t),o()};return t(n,{children:[e("div",{role:"none",className:C(oo,a?.actionBar),children:r.map(n=>t(ht,{as:"button",type:"button",disabled:n.disabled,className:C(ao,a?.actionBarButton),onClick:i(n),children:[e("span",{className:C(io,a?.actionBarButtonIcon),children:n.icon}),he(n.label)&&e("span",{className:C(lo,a?.actionBarButtonLabel),children:n.label})]},n.id))}),e(ro,{className:C(a?.divider)})]})};so.displayName="ContextMenuActionBar";var co={MaxUI:"MaxUI__g7Q",MaxUI_platform_ios:"MaxUI_platform_ios__gAV",MaxUI_platform_android:"MaxUI_platform_android__m3U",MaxUI_colorScheme_light:"MaxUI_colorScheme_light__Woo",MaxUI_colorScheme_dark:"MaxUI_colorScheme_dark__jFq",MaxUI_resetBody:"MaxUI_resetBody__Mwh"},uo="ContextMenuContent__9kf";const _o=o((t,n)=>{const{children:r,className:o,...a}=t,{platform:i,colorScheme:l}=Ee();return e("div",{ref:n,role:"menu",className:C(co[`MaxUI_colorScheme_${l}`],co[`MaxUI_platform_${i}`],uo,o),...a,children:r})});_o.displayName="ContextMenuContent";var po={ContextMenuRow:"ContextMenuRow__NZL",ContextMenuRow_destructive:"ContextMenuRow_destructive__WNP",ContextMenuRow_disabled:"ContextMenuRow_disabled__VUD",ContextMenuRow_hasSubmenu:"ContextMenuRow_hasSubmenu__ZJ6",ContextMenuRow__before:"ContextMenuRow__before__O8u",ContextMenuRow__label:"ContextMenuRow__label__DaH",ContextMenuRow__hint:"ContextMenuRow__hint__sZV",ContextMenuRow__chevron:"ContextMenuRow__chevron__1jA",ContextMenuRow__chevron_mobile:"ContextMenuRow__chevron_mobile__tKx",ContextMenuRow__chevron_expanded:"ContextMenuRow__chevron_expanded__8wf"};const mo=o((n,r)=>{const{item:o,expanded:a=!1,onClick:i,onMouseEnter:l,onMouseLeave:s,className:c}=n,{mode:u,innerClassNames:_}=Jr(),d=void 0!==o.items,p=C(po.ContextMenuRow,{[po.ContextMenuRow_destructive]:"destructive"===o.mode,[po.ContextMenuRow_disabled]:o.disabled,[po.ContextMenuRow_expanded]:a,[po.ContextMenuRow_hasSubmenu]:d},_?.row,c);return t(ht,{ref:r,role:"menuitem","aria-haspopup":d?"menu":void 0,"aria-expanded":d?a:void 0,disabled:o.disabled,className:p,onClick:i,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),e.currentTarget.click())},onMouseEnter:l,onMouseLeave:s,children:[(he(o.before)||o.offset)&&e("span",{className:C(po.ContextMenuRow__before,_?.before),children:o.before}),e("span",{className:C(po.ContextMenuRow__label,_?.label),children:o.label}),!d&&he(o.hint)&&e("span",{className:C(po.ContextMenuRow__hint,_?.hint),children:o.hint}),d&&e(T,{className:C(po.ContextMenuRow__chevron,po[`ContextMenuRow__chevron_${u}`],{[po.ContextMenuRow__chevron_expanded]:a},_?.chevron)})]})});mo.displayName="ContextMenuRow";const fo=n=>{const{item:r,open:o,onClick:a,onRowMouseEnter:i,onRowMouseLeave:l,onPanelMouseEnter:s,onPanelMouseLeave:c,children:u}=n,{innerClassNames:_}=Jr(),d=Ar(),{refs:p,floatingStyles:m}=Xr({nodeId:d,open:o,placement:"right-start",strategy:"fixed",middleware:[fr(16),vr({fallbackPlacements:["left-start"],padding:8}),hr({padding:8})],whileElementsMounted:ar});return t(kr,{id:d,children:[e(mo,{ref:p.setReference,item:r,expanded:o,onClick:a,onMouseEnter:()=>{i(r.id)},onMouseLeave:l}),o&&"undefined"!=typeof document&&y(e(_o,{ref:p.setFloating,style:m,className:C(_?.content),onMouseEnter:s,onMouseLeave:c,children:u}),document.body)]})};fo.displayName="ContextMenuSubmenu";var ho="ContextMenuList__I1T",vo="ContextMenuList_nested__dnE",yo="ContextMenuList__accordion__RaX",go="ContextMenuList__accordion_expanded__uiY",Co="ContextMenuList__accordionContent__8Ka";const bo=({items:n,nested:r=!1})=>{const{mode:o,close:a,innerClassNames:i}=Jr(),[l,s]=p(null),c=u(void 0),d=u(void 0),[m,v]=p([]);_(()=>()=>{window.clearTimeout(c.current),window.clearTimeout(d.current)},[]);const y=f(e=>{window.clearTimeout(d.current),window.clearTimeout(c.current),c.current=window.setTimeout(()=>{s(e)},100)},[]),g=f(()=>{window.clearTimeout(c.current),d.current=window.setTimeout(()=>{s(null)},300)},[]),b=f(()=>{window.clearTimeout(d.current)},[]),x=f(e=>{v(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),w=f(e=>t=>{e.onClick?.(t),a()},[a]),T=f(e=>t=>{e.onClick?.(t),"mobile"!==o?(window.clearTimeout(c.current),window.clearTimeout(d.current),s(t=>t===e.id?null:e.id)):x(e.id)},[o,x]);return e("div",{role:"none",className:C(ho,{[vo]:r},i?.list),children:n.map((n,r)=>{const a=void 0!==n.items,s=Boolean(n.divider)&&r>0&&e(ro,{className:C(i?.divider)});if(a&&"desktop"===o)return t(h,{children:[s,e(fo,{item:n,open:l===n.id,onClick:T(n),onRowMouseEnter:y,onRowMouseLeave:g,onPanelMouseEnter:b,onPanelMouseLeave:g,children:e(bo,{items:n.items})})]},n.id);const c=a&&"mobile"===o,u=c&&m.includes(n.id);return t(h,{children:[s,e(mo,{item:n,expanded:u,onClick:a?T(n):w(n)}),c&&e("div",{role:"none",className:C(yo,{[go]:u},i?.accordion),children:e("div",{className:Co,children:e(bo,{items:n.items,nested:!0})})})]},n.id)})})};bo.displayName="ContextMenuList";const xo=o((n,o)=>{const{items:a,actionBar:i,children:l,className:s,openOn:c="click",mode:u="auto",placement:m="bottom-start",open:h,defaultOpen:v=!1,onOpenChange:g,asChild:b=!1,innerClassNames:x}=n,[w,T]=p(v),N=void 0!==h,S=N?Boolean(h):w,I=(e=>{const[t,n]=p(to);return _(()=>{if("auto"!==e||"undefined"==typeof window||"function"!=typeof window.matchMedia)return;const t=window.matchMedia("(pointer: coarse)"),r=e=>{n(e.matches)};return n(t.matches),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e]),"auto"!==e?e:t?"mobile":"desktop"})(u),E=Ar(),B=f(e=>{N||T(e),g?.(e)},[N,g]),{refs:M,floatingStyles:R,context:A}=Xr({nodeId:E,open:S,onOpenChange:B,placement:m,strategy:"fixed",middleware:[fr(4),vr({padding:8}),hr({padding:8})],whileElementsMounted:ar}),k=d(()=>(e=>Array.isArray(e)?e:[e])(c),[c]),L=jr(A,{enabled:k.includes("click"),toggle:!0}),P=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:a,events:i,elements:l}=e,{enabled:s=!0,delay:c=0,handleClose:u=null,mouseOnly:_=!1,restMs:d=0,move:p=!0}=t,m=Rr(),f=Mr(),h=Dn(u),v=Dn(c),y=Dn(n),g=Dn(d),C=r.useRef(),b=r.useRef(-1),x=r.useRef(),w=r.useRef(-1),T=r.useRef(!0),N=r.useRef(!1),S=r.useRef(()=>{}),I=r.useRef(!1),E=$n(()=>{var e;const t=null==(e=a.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});r.useEffect(()=>{if(s)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(zr(b),zr(w),T.current=!0,I.current=!1)}},[s,i]),r.useEffect(()=>{if(!s)return;if(!h.current)return;if(!n)return;function e(e){E()&&o(!1,e,"hover")}const t=Ln(l.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[l.floating,n,o,s,h,E]);const B=r.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=Dr(v.current,"close",C.current);r&&!x.current?(zr(b),b.current=window.setTimeout(()=>o(!1,e,n),r)):t&&(zr(b),o(!1,e,n))},[v,o]),M=$n(()=>{S.current(),x.current=void 0}),R=$n(()=>{if(N.current){const e=Ln(l.floating).body;e.style.pointerEvents="",e.removeAttribute(Or),N.current=!1}}),A=$n(()=>!!a.current.openEvent&&["click","mousedown"].includes(a.current.openEvent.type));r.useEffect(()=>{if(s&&Wt(l.domReference)){const o=l.domReference,a=l.floating;return n&&o.addEventListener("mouseleave",r),p&&o.addEventListener("mousemove",e,{once:!0}),o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),a&&(a.addEventListener("mouseleave",r),a.addEventListener("mouseenter",i),a.addEventListener("mouseleave",c)),()=>{n&&o.removeEventListener("mouseleave",r),p&&o.removeEventListener("mousemove",e),o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),a&&(a.removeEventListener("mouseleave",r),a.removeEventListener("mouseenter",i),a.removeEventListener("mouseleave",c))}}function e(e){if(zr(b),T.current=!1,_&&!zn(C.current)||Hr(g.current)>0&&!Dr(v.current,"open"))return;const t=Dr(v.current,"open",C.current);t?b.current=window.setTimeout(()=>{y.current||o(!0,e,"hover")},t):n||o(!0,e,"hover")}function t(e){if(A())return void R();S.current();const t=Ln(l.floating);if(zr(w),I.current=!1,h.current&&a.current.floatingContext){n||zr(b),x.current=h.current({...a.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){R(),M(),A()||B(e,!0,"safe-polygon")}});const r=x.current;return t.addEventListener("mousemove",r),void(S.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==C.current||!Rn(l.floating,e.relatedTarget))&&B(e)}function r(e){A()||a.current.floatingContext&&(null==h.current||h.current({...a.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){R(),M(),A()||B(e)}})(e))}function i(){zr(b)}function c(e){A()||B(e,!1)}},[l,s,e,_,p,B,M,R,o,n,y,m,v,h,a,A,g]),On(()=>{var e;if(s&&n&&null!=(e=h.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&E()){N.current=!0;const e=l.floating;if(Wt(l.domReference)&&e){var t;const n=Ln(l.floating).body;n.setAttribute(Or,"");const r=l.domReference,o=null==m||null==(t=m.nodesRef.current.find(e=>e.id===f))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[s,n,f,l,m,h,E]),On(()=>{n||(C.current=void 0,I.current=!1,M(),R())},[n,M,R]),r.useEffect(()=>()=>{M(),zr(b),zr(w),R()},[s,l.domReference,M,R]);const k=r.useMemo(()=>{function e(e){C.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function r(){T.current||y.current||o(!0,t,"hover")}_&&!zn(C.current)||n||0===Hr(g.current)||I.current&&e.movementX**2+e.movementY**2<2||(zr(w),"touch"===C.current?r():(I.current=!0,w.current=window.setTimeout(r,Hr(g.current))))}}},[_,o,n,y,g]);return r.useMemo(()=>s?{reference:k}:{},[s,k])}(A,{enabled:k.includes("hover"),delay:eo}),z=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,elements:a,dataRef:i}=e,{enabled:l=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:_=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:f}=t,h=Rr(),v=$n("function"==typeof c?c:()=>!1),y="function"==typeof c?v:c,g=r.useRef(!1),{escapeKey:C,outsidePress:b}=Vr(m),{escapeKey:x,outsidePress:w}=Vr(f),T=r.useRef(!1),N=$n(e=>{var t;if(!n||!l||!s||"Escape"!==e.key)return;if(T.current)return;const r=null==(t=i.current.floatingContext)?void 0:t.nodeId,a=h?Pn(h.nodesRef.current,r):[];if(!C&&(e.stopPropagation(),a.length>0)){let e=!0;if(a.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),S=$n(e=>{var t;const n=()=>{var t;N(e),null==(t=An(e))||t.removeEventListener("keydown",n)};null==(t=An(e))||t.addEventListener("keydown",n)}),I=$n(e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const r=g.current;if(g.current=!1,"click"===u&&r)return;if(n)return;if("function"==typeof y&&!y(e))return;const l=An(e),s="["+Pr("inert")+"]",c=Ln(a.floating).querySelectorAll(s);let _=Wt(l)?l:null;for(;_&&!tn(_);){const e=on(_);if(tn(e)||!Wt(e))break;_=e}if(c.length&&Wt(l)&&!l.matches("html,body")&&!Rn(l,a.floating)&&Array.from(c).every(e=>!Rn(_,e)))return;if(Ft(l)&&M){const t=tn(l),n=nn(l),r=/auto|scroll/,o=t||r.test(n.overflowX),a=t||r.test(n.overflowY),i=o&&l.clientWidth>0&&l.scrollWidth>l.clientWidth,s=a&&l.clientHeight>0&&l.scrollHeight>l.clientHeight,c="rtl"===n.direction,u=s&&(c?e.offsetX<=l.offsetWidth-l.clientWidth:e.offsetX>l.clientWidth),_=i&&e.offsetY>l.clientHeight;if(u||_)return}const d=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=h&&Pn(h.nodesRef.current,d).some(t=>{var n;return kn(e,null==(n=t.context)?void 0:n.elements.floating)});if(kn(e,a.floating)||kn(e,a.domReference)||p)return;const m=h?Pn(h.nodesRef.current,d):[];if(m.length>0){let e=!0;if(m.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}o(!1,e,"outside-press")}),E=$n(e=>{var t;const n=()=>{var t;I(e),null==(t=An(e))||t.removeEventListener(u,n)};null==(t=An(e))||t.addEventListener(u,n)});r.useEffect(()=>{if(!n||!l)return;i.current.__escapeKeyBubbles=C,i.current.__outsidePressBubbles=b;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function r(){window.clearTimeout(e),T.current=!0}function c(){e=window.setTimeout(()=>{T.current=!1},en()?5:0)}const _=Ln(a.floating);s&&(_.addEventListener("keydown",x?S:N,x),_.addEventListener("compositionstart",r),_.addEventListener("compositionend",c)),y&&_.addEventListener(u,w?E:I,w);let d=[];return p&&(Wt(a.domReference)&&(d=ln(a.domReference)),Wt(a.floating)&&(d=d.concat(ln(a.floating))),!Wt(a.reference)&&a.reference&&a.reference.contextElement&&(d=d.concat(ln(a.reference.contextElement)))),d=d.filter(e=>{var t;return e!==(null==(t=_.defaultView)?void 0:t.visualViewport)}),d.forEach(e=>{e.addEventListener("scroll",t)}),()=>{s&&(_.removeEventListener("keydown",x?S:N,x),_.removeEventListener("compositionstart",r),_.removeEventListener("compositionend",c)),y&&_.removeEventListener(u,w?E:I,w),d.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[i,a,s,y,u,n,o,p,l,C,b,N,x,S,I,w,E]),r.useEffect(()=>{i.current.insideReactTree=!1},[i,y,u]);const B=r.useMemo(()=>({onKeyDown:N,..._&&{[Wr[d]]:e=>{o(!1,e.nativeEvent,"reference-press")},..."click"!==d&&{onClick(e){o(!1,e.nativeEvent,"reference-press")}}}}),[N,o,_,d]),M=r.useMemo(()=>{function e(e){0===e.button&&(g.current=!0)}return{onKeyDown:N,onMouseDown:e,onMouseUp:e,[Fr[u]]:()=>{i.current.insideReactTree=!0}}},[N,u,i]);return r.useMemo(()=>l?{reference:B,floating:M}:{},[l,B,M])}(A),O=Gr(A,{role:"menu"}),{getReferenceProps:D,getFloatingProps:H}=function(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),a=r.useCallback(t=>qr(t,e,"reference"),t),i=r.useCallback(t=>qr(t,e,"floating"),n),l=r.useCallback(t=>qr(t,e,"item"),o);return r.useMemo(()=>({getReferenceProps:a,getFloatingProps:i,getItemProps:l}),[a,i,l])}([L,P,z,O]),$=f(()=>{B(!1)},[B]),U=d(()=>({mode:I,close:$,innerClassNames:x}),[I,$,x]);return t(kr,{id:E,children:[e(b?q:"span",{ref:ye(o,M.setReference),className:C(!b&&Qr,s,x?.trigger),...D(),children:l}),S&&"undefined"!=typeof document&&y(e(Zr.Provider,{value:U,children:t(_o,{ref:M.setFloating,style:R,className:C(x?.content),...H(),children:[i&&e(so,{buttons:i}),e(bo,{items:a})]})}),document.body)]})});xo.displayName="ContextMenuInner";const wo=o((t,n)=>e(Lr,{children:e(xo,{...t,ref:n})}));wo.displayName="ContextMenu";const To=e=>{switch(e){case"xsmall":return 16;case"small":case"medium":return 20;case"large":return 24}},No=e=>{switch(e){case"primary":case"destructive":case"overlay":return"contrast-static";case"secondary":case"ghost":return"primary";case"primary-contrast":case"secondary-contrast":return"primary-static"}};var So={IconButton:"IconButton__KCr",IconButton_loading:"IconButton_loading__RxW",IconButton__content:"IconButton__content__dCL",IconButton_disabled:"IconButton_disabled__SZj",IconButton_activeMode_ripple:"IconButton_activeMode_ripple__asi",IconButton_activeMode_highlight:"IconButton_activeMode_highlight__h15",IconButton_size_xsmall:"IconButton_size_xsmall__G5T",IconButton_size_small:"IconButton_size_small__e3f",IconButton_size_medium:"IconButton_size_medium__MQQ",IconButton_size_large:"IconButton_size_large__9oz",IconButton_variant_primary:"IconButton_variant_primary__-4n",IconButton_variant_secondary:"IconButton_variant_secondary__dFi",IconButton_variant_ghost:"IconButton_variant_ghost__jvE","IconButton_variant_primary-contrast":"IconButton_variant_primary-contrast__O-T","IconButton_variant_secondary-contrast":"IconButton_variant_secondary-contrast__uNH",IconButton_variant_overlay:"IconButton_variant_overlay__vJc",IconButton_variant_destructive:"IconButton_variant_destructive__9rk",IconButton__spinnerContainer:"IconButton__spinnerContainer__9--",IconButton__ripple:"IconButton__ripple__l8M"};const Io=o((n,r)=>{const{children:o,className:a,disabled:i,innerClassNames:l,loading:s,onClick:c,asChild:u=!1,size:_="medium",variant:d="primary",...p}=n,m="button",f=u?q:m,h=Re(),v=Ne({asChild:u,children:o,disabled:i,loading:s,onClick:c,rootElement:m}),y=i||s,g="android"===h,b=C(So.IconButton,So[`IconButton_variant_${d}`],So[`IconButton_size_${_}`],{[So.IconButton_loading]:s,[So.IconButton_disabled]:i,[So.IconButton_activeMode_highlight]:!y&&!g,[So.IconButton_activeMode_ripple]:!y&&g},a);return t(f,{ref:r,className:b,...v,...p,children:[s&&e("span",{className:C(So.IconButton__spinnerContainer,l?.spinnerContainer),children:e(Ct,{className:C(l?.spinner),size:To(_),appearance:No(d)})}),e(Z,{children:fe({options:{asChild:u,children:o},content:t=>e("span",{className:C(So.IconButton__content,l?.content),children:t},"subtree-container")})}),g&&!y&&e(ct,{className:So.IconButton__ripple})]})});Io.displayName="IconButton";var Eo={Input:"Input__A3w",Input_disabled:"Input_disabled__mpt",Input__iconBefore:"Input__iconBefore__gxx",Input__iconAfter:"Input__iconAfter__jL1",Input_size_medium:"Input_size_medium__EjC",Input__input:"Input__input__gy5",Input_size_large:"Input_size_large__8OF",Input_mode_default:"Input_mode_default__ncX",Input_mode_contrast:"Input_mode_contrast__EIY",Input__body:"Input__body__sVJ",Input__clearButton:"Input__clearButton__nKe",Input__count:"Input__count__zAz",Input__hint:"Input__hint__dE5",Input__hint_disabled:"Input__hint_disabled__E55"};const Bo=o((n,r)=>{const{className:o,innerClassNames:a,withClearButton:i,iconBefore:l,iconAfter:s,size:c="large",mode:u="default",count:_,hint:d,...p}=n,m=C(Eo.Input,Eo[`Input_mode_${u}`],Eo[`Input_size_${c}`],{[Eo.Input_disabled]:p.disabled},o);return t("div",{className:C(a?.container),children:[t("label",{className:m,children:[he(l)&&e("div",{className:C(Eo.Input__iconBefore,a?.iconBefore),children:l}),e(Xe,{ref:r,className:C(Eo.Input__body,a?.body),withClearButton:i,count:_,innerClassNames:{input:C(Eo.Input__input,a?.input),clearButton:C(Eo.Input__clearButton,a?.clearButton),count:C(Eo.Input__count,a?.count)},...p}),he(s)&&e("div",{className:C(Eo.Input__iconAfter,a?.iconAfter),children:s})]}),he(d)&&e("div",{className:C(Eo.Input__hint,{[Eo.Input__hint_disabled]:p.disabled},a?.hint),children:d})]})});Bo.displayName="Input";const Mo=o((t,n)=>{const{children:r,className:o,colorScheme:a,platform:i=(ve()?"ios":"android"),resetBody:l=!1}=t,s=Le({listenChanges:!a}),c=a??s,u=d(()=>({colorScheme:c,platform:i}),[c,i]);_(()=>{if(l)return document.body.classList.add(co.MaxUI_resetBody),()=>{document.body.classList.remove(co.MaxUI_resetBody)}},[l]);const p=C(co.MaxUI,co[`MaxUI_colorScheme_${c}`],co[`MaxUI_platform_${i}`],o);return e(Ie.Provider,{value:u,children:e("div",{ref:n,className:p,children:r})})});Mo.displayName="MaxUI";var Ro="Radio__MT3",Ao="Radio__input__QY4",ko="Radio__control__T5I",Lo="Radio_animated__XvV";const Po=o((n,r)=>{const{className:o,...a}=n,i=C(Ro,Lo,o);return t("span",{className:i,children:[e("input",{...a,ref:r,type:"radio",className:Ao}),e("span",{className:ko})]})});Po.displayName="Radio";var zo="segmented__iN0",Oo="segment__-Te",Do="segment_active__85D";const Ho=({items:t,activeItem:n,onClick:r,innerClassNames:o})=>{const a=e=>n=>{const o=t.length-1;let a;switch(n.key){case"ArrowRight":case"ArrowDown":a=e===o?0:e+1;break;case"ArrowLeft":case"ArrowUp":a=0===e?o:e-1;break;case"Home":a=0;break;case"End":a=o;break;case"Enter":case" ":return n.preventDefault(),void r(t[e].id);default:return}n.preventDefault(),r(t[a].id);const i=n.currentTarget.parentElement?.children[a];i?.focus(),i?.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})},i=e=>e===n;return e("div",{className:C(zo,o?.list),role:"tablist",children:t.map((t,n)=>{return e("button",{role:"tab",tabIndex:i(t.id)?0:-1,"aria-selected":i(t.id),onKeyDown:a(n),className:C(Oo,o?.item,{[Do]:i(t.id)}),onClick:(l=t.id,e=>{r(l),e.currentTarget.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})}),type:"button",children:t.title},t.id);var l})})};var $o={viewport:"viewport__DPJ",topLeft:"topLeft__e-4",topCenter:"topCenter__WCQ",topRight:"topRight__Kqq",bottomLeft:"bottomLeft__-Jr",bottomCenter:"bottomCenter__6BC",bottomRight:"bottomRight__18f",SnackbarItem:"SnackbarItem__wdB",maxSnackbarEnter:"maxSnackbarEnter__qbP","SnackbarItem_placement_top-left":"SnackbarItem_placement_top-left__4gd","SnackbarItem_placement_top-center":"SnackbarItem_placement_top-center__1Ip","SnackbarItem_placement_top-right":"SnackbarItem_placement_top-right__Lx-","SnackbarItem_placement_bottom-left":"SnackbarItem_placement_bottom-left__D1r","SnackbarItem_placement_bottom-center":"SnackbarItem_placement_bottom-center__xy4","SnackbarItem_placement_bottom-right":"SnackbarItem_placement_bottom-right__8AG",SnackbarItem_leaving:"SnackbarItem_leaving__OwP",maxSnackbarExit:"maxSnackbarExit__YWk",before:"before__hVC",after:"after__1BT",textContainer:"textContainer__HNM",text:"text__6Z1",caption:"caption__K-X"},Uo={TypographyAction_variant_large:"TypographyAction_variant_large__l5j",TypographyAction_variant_medium:"TypographyAction_variant_medium__9H-",TypographyAction_variant_small:"TypographyAction_variant_small__-LL",TypographyAction_variant_xsmall:"TypographyAction_variant_xsmall__dcP"};const jo=o((t,n)=>{const{className:r,variant:o="large",asChild:a,...i}=t,l=a?q:"span",s=C(Uo.TypographyAction,Uo[`TypographyAction_variant_${o}`],r);return e(l,{ref:n,className:s,...i})});jo.displayName="TypographyAction";var Wo={TypographyBody_variant_large:"TypographyBody_variant_large__vlS","TypographyBody_variant_large-strong":"TypographyBody_variant_large-strong__V9x",TypographyBody_variant_medium:"TypographyBody_variant_medium__9v3","TypographyBody_variant_medium-strong":"TypographyBody_variant_medium-strong__bCQ",TypographyBody_variant_small:"TypographyBody_variant_small__beJ","TypographyBody_variant_small-strong":"TypographyBody_variant_small-strong__mWy"};const Fo=o((t,n)=>{const{className:r,variant:o="large-strong",asChild:a,...i}=t,l=a?q:"span",s=C(Wo.TypographyBody,Wo[`TypographyBody_variant_${o}`],r);return e(l,{ref:n,className:s,...i})});Fo.displayName="TypographyBody";var Vo="TypographyDisplay__6MW";const Yo=o((t,n)=>{const{className:r,asChild:o,...a}=t;return e(o?q:"span",{ref:n,className:C(Vo,r),...a})});Yo.displayName="TypographyDisplay";var Xo={"TypographyHeadline_variant_large-strong":"TypographyHeadline_variant_large-strong__mwz",TypographyHeadline_variant_medium:"TypographyHeadline_variant_medium__s92",TypographyHeadline_variant_small:"TypographyHeadline_variant_small__8Ei"};const qo=o((t,n)=>{const{className:r,variant:o="large-strong",asChild:a,...i}=t,l=a?q:"span",s=C(Xo.TypographyHeadline,Xo[`TypographyHeadline_variant_${o}`],r);return e(l,{ref:n,className:s,...i})});qo.displayName="TypographyHeadline";var Ko={TypographyLabel_variant_large:"TypographyLabel_variant_large__6vr","TypographyLabel_variant_large-strong":"TypographyLabel_variant_large-strong__uCg",TypographyLabel_variant_medium:"TypographyLabel_variant_medium__Xo5","TypographyLabel_variant_medium-strong":"TypographyLabel_variant_medium-strong__Bk8",TypographyLabel_variant_small:"TypographyLabel_variant_small__dGi","TypographyLabel_variant_small-strong":"TypographyLabel_variant_small-strong__qCw"};const Go=o((t,n)=>{const{className:r,variant:o="large",asChild:a,...i}=t,l=a?q:"span",s=C(Ko.TypographyLabel,Ko[`TypographyLabel_variant_${o}`],r);return e(l,{ref:n,className:s,...i})});Go.displayName="TypographyLabel";var Zo={TypographyText_variant_hero:"TypographyText_variant_hero__78f",TypographyText_variant_header:"TypographyText_variant_header__YA-",TypographyText_variant_subheader:"TypographyText_variant_subheader__8tX",TypographyText_variant_title:"TypographyText_variant_title__3HO",TypographyText_variant_body:"TypographyText_variant_body__-U7","TypographyText_variant_body-strong":"TypographyText_variant_body-strong__g4v",TypographyText_variant_detail:"TypographyText_variant_detail__2eL","TypographyText_variant_detail-strong":"TypographyText_variant_detail-strong__-9M",TypographyText_variant_description:"TypographyText_variant_description__FAg","TypographyText_variant_description-strong":"TypographyText_variant_description-strong__GYo",TypographyText_variant_label:"TypographyText_variant_label__s4i","TypographyText_variant_label-strong":"TypographyText_variant_label-strong__hPM",TypographyText_variant_tag:"TypographyText_variant_tag__6CN","TypographyText_variant_tag-strong":"TypographyText_variant_tag-strong__4DW",TypographyText_variant_note:"TypographyText_variant_note__QH-","TypographyText_variant_note-strong":"TypographyText_variant_note-strong__sWX","TypographyText_variant_action-large":"TypographyText_variant_action-large__Pa-","TypographyText_variant_action-medium":"TypographyText_variant_action-medium__Xyt","TypographyText_variant_action-small":"TypographyText_variant_action-small__mna","TypographyText_variant_action-xsmall":"TypographyText_variant_action-xsmall__IX0",TypographyText_color_primary:"TypographyText_color_primary__yhI",TypographyText_color_secondary:"TypographyText_color_secondary__ycW",TypographyText_color_tertiary:"TypographyText_color_tertiary__OTn",TypographyText_color_inherit:"TypographyText_color_inherit__hh5"};const Jo=o((t,n)=>{const{className:r,variant:o="body",color:a="inherit",asChild:i,...l}=t,s=i?q:"span",c=C(Zo.TypographyText,Zo[`TypographyText_variant_${o}`],Zo[`TypographyText_color_${a}`],r);return e(s,{ref:n,className:c,...l})});Jo.displayName="TypographyText";var Qo={"TypographyTitle_variant_large-strong":"TypographyTitle_variant_large-strong__9PL",TypographyTitle_variant_medium:"TypographyTitle_variant_medium__TrJ","TypographyTitle_variant_medium-strong":"TypographyTitle_variant_medium-strong__th0",TypographyTitle_variant_small:"TypographyTitle_variant_small__zJR","TypographyTitle_variant_small-strong":"TypographyTitle_variant_small-strong__BrE"};const ea=o((t,n)=>{const{className:r,variant:o="large-strong",asChild:a,...i}=t,l=a?q:"span",s=C(Qo.TypographyTitle,Qo[`TypographyTitle_variant_${o}`],r);return e(l,{ref:n,className:s,...i})});ea.displayName="TypographyTitle";const ta=Object.assign({},{Display:Yo,Headline:qo,Title:ea,Body:Fo,Label:Go,Text:Jo,Action:jo}),na=o((n,r)=>{const{id:o,caption:a,before:i,after:l,text:s,placement:c,leaving:u,onExited:_,...d}=n,p=f(()=>{u&&_?.(o)},[u,_,o]),m=C($o.SnackbarItem,$o[`SnackbarItem_placement_${c}`],u&&$o.SnackbarItem_leaving);return t("div",{ref:r,className:m,role:"status","data-placement":c,"data-leaving":u||void 0,onAnimationEnd:p,onClick:()=>_?.(o),...d,children:[he(i)&&e("div",{className:$o.before,children:i}),(!!s||!!a)&&t("div",{className:$o.textContainer,children:[!!s&&e(ta.Body,{className:$o.text,variant:"large",children:s}),!!a&&e(ta.Body,{className:$o.caption,variant:"small",children:a})]}),he(l)&&e("div",{className:$o.after,children:l})]})});na.displayName="SnackbarItem";const ra=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],oa={"top-left":$o.topLeft,"top-center":$o.topCenter,"top-right":$o.topRight,"bottom-left":$o.bottomLeft,"bottom-center":$o.bottomCenter,"bottom-right":$o.bottomRight},aa=e=>{if(void 0!==e)return"number"==typeof e?`${e}px`:e},ia=(e,t)=>{if(void 0!==t)return e.startsWith("top-")?{"--snackbar-top-offset":t}:{"--snackbar-bottom-offset":t}};function la({queue:t,onExited:r}){const o=(e=>ra.flatMap(t=>{const n=new Map;for(const r of e){if(r.placement!==t)continue;const e=aa(r.offset),o=`${t}:${void 0===e?"default":`offset:${e}`}`,a=n.get(o);a?a.items.push(r):n.set(o,{key:o,items:[r],offsetValue:e,placement:t})}return[...n.values()]}))(t);return e(n,{children:o.map(({key:t,items:n,offsetValue:o,placement:a})=>e("div",{className:C($o.viewport,oa[a]),"aria-label":`Уведомления: ${a}`,"aria-live":"polite","data-offset":o,"data-placement":a,role:"region",style:ia(a,o),children:n.map(t=>e(na,{...t,onExited:r},t.id))},t))})}let sa=0;const ca=()=>"function"==typeof globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():(sa+=1,`snackbar-${Date.now()}-${sa}`);function ua({children:n,queueSize:r=3,createId:o=ca,defaultPlacement:a="bottom-center"}){const[i,l]=p([]),s=u(new Map),c=f(e=>{const t=e.id??o();l(n=>n.some(e=>e.id===t)?n:[...n,{...e,id:t,placement:e.placement??a,leaving:!1}])},[o,a]),m=f(e=>{const t=s.current.get(e);t&&clearTimeout(t),s.current.delete(e),l(t=>t.map(t=>t.id===e?{...t,leaving:!0}:t))},[]),h=f(e=>{const t=s.current.get(e);t&&clearTimeout(t),s.current.delete(e),l(t=>t.filter(t=>t.id!==e))},[]),v=d(()=>{const e=new Map,t=Math.max(0,r);return i.filter(n=>{if(n.leaving)return!0;const r=e.get(n.placement)??0;return!(r>=t)&&(e.set(n.placement,r+1),!0)})},[i,r]);_(()=>{const e=new Set(i.map(e=>e.id));for(const[t,n]of s.current)e.has(t)||(clearTimeout(n),s.current.delete(t));for(const e of v){if(e.leaving)continue;if(s.current.has(e.id))continue;const t=setTimeout(()=>m(e.id),e.duration??5e3);s.current.set(e.id,t)}},[m,i,v]),_(()=>()=>{for(const e of s.current.values())clearTimeout(e);s.current.clear()},[]);const y=d(()=>({showSnackbar:c,closeSnackbar:m}),[m,c]);return t(Ae.Provider,{value:y,children:[n,e(la,{queue:v,onExited:h})]})}var _a={Switch:"Switch__-vj",Switch__toggle:"Switch__toggle__WU2",Switch__thumb:"Switch__thumb__jlX",Switch__input:"Switch__input__EDr",Switch_platform_ios:"Switch_platform_ios__B-C",Switch_platform_android:"Switch_platform_android__72T"};const da=o((n,r)=>{const{className:o,...a}=n,i=Re(),l=C(_a.Switch,_a[`Switch_platform_${i}`],o);return t("span",{className:l,children:[e("input",{ref:r,type:"checkbox",role:"switch",className:_a.Switch__input,...a}),e("span",{className:_a.Switch__toggle,children:e("span",{className:_a.Switch__thumb})})]})});da.displayName="Switch";var pa="tabs__z-C",ma="tab__LYq",fa="tab__label__9Dq",ha="tab_active__6Jq";const va=({items:n,activeItem:r,onCancel:o,onClick:a,innerClassNames:i})=>{const l=e=>t=>{t.stopPropagation(),o?.(e)},s=e=>t=>{const r=n.length-1;let o;switch(t.key){case"ArrowRight":case"ArrowDown":o=e===r?0:e+1;break;case"ArrowLeft":case"ArrowUp":o=0===e?r:e-1;break;case"Home":o=0;break;case"End":o=r;break;case"Enter":case" ":return t.preventDefault(),void a(n[e].id);default:return}t.preventDefault(),a(n[o].id);const i=t.currentTarget.parentElement?.children[o];i?.focus(),i?.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})},c=e=>e===r;return e("div",{className:C(pa,i?.list),role:"tablist",children:n.map((n,r)=>{return t("div",{role:"tab",tabIndex:c(n.id)?0:-1,"aria-selected":c(n.id),onKeyDown:s(r),className:C(ma,i?.item,{[ha]:c(n.id)}),onClick:(u=n.id,e=>{a(u),e.currentTarget.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})}),children:[t("button",{type:"button",tabIndex:-1,className:fa,children:[n.title,n.indicator&&e(wt,{variant:c(n.id)?"primary":"mute",value:n.indicator,className:C(i?.indicator)})]}),!!o&&!n.indicator&&e(ce,{type:"button",tabIndex:-1,className:C(i?.closeButton),onClick:l(n.id),"aria-label":"Close",children:e(I,{})})]},n.id);var u})})};var ya={Textarea:"Textarea__Sy6",Textarea_disabled:"Textarea_disabled__uY3",Textarea_mode_primary:"Textarea_mode_primary__E7l",Textarea_mode_secondary:"Textarea_mode_secondary__BYw",Textarea__textarea:"Textarea__textarea__Ok-"};const ga=o((t,n)=>{const{className:r,innerClassNames:o,mode:a="primary",...i}=t,l=C(ya.Textarea,ya[`Textarea_mode_${a}`],{[ya.Textarea_disabled]:i.disabled},r);return e("div",{className:l,children:e("textarea",{ref:n,className:C(ya.Textarea__textarea,o?.textarea),...i})})});ga.displayName="Textarea";export{je as Avatar,It as Button,Bt as CellAction,Rt as CellHeader,kt as CellInput,Pt as CellList,Ot as CellSimple,Xe as ClearableInput,Ge as Container,wo as ContextMenu,wt as Counter,et as EllipsisText,nt as Flex,ot as Grid,T as Icon16Chevron,I as Icon16CloseIos,M as Icon16SearchOutline,L as Icon20CloseAndroid,O as Icon20CloseFilled,H as Icon24CloseAndroid,Io as IconButton,Bo as Input,Mo as MaxUI,Ie as MaxUIContext,it as Panel,Po as Radio,ct as Ripple,Ho as Segmented,q as Slot,Z as Slottable,la as SnackbarContainer,na as SnackbarItem,ua as SnackbarProvider,Ct as Spinner,ce as SvgButton,da as Switch,va as Tabs,ht as Tappable,ga as Textarea,ta as Typography,fe as getSubtree,he as hasReactNode,ye as mergeRefs,Ee as useAppearance,Ne as useButtonLikeProps,Se as useCallbackRef,Be as useColorScheme,Me as useImageLoadingStatus,Re as usePlatform,ke as useSnackbar,Le as useSystemColorScheme};
1
+ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import{forwardRef as o,createContext as a,useContext as i,Children as l,cloneElement as c,isValidElement as s,useRef as u,useEffect as d,useMemo as _,useState as p,useLayoutEffect as f,useCallback as m,Fragment as v,useId as h}from"react";import*as g from"react-dom";import{createPortal as y}from"react-dom";function b(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=b(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function C(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=b(e))&&(r&&(r+=" "),r+=t);return r}var x;function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(null,arguments)}var S,T=function(e){return r.createElement("svg",w({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),x||(x=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.28 3.72a.75.75 0 0 1 0 1.06l-6.5 6.5a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 0 1 1.06-1.06l2.47 2.47 5.97-5.97a.75.75 0 0 1 1.06 0",clipRule:"evenodd"})))};function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N.apply(null,arguments)}var I,E=function(e){return r.createElement("svg",N({xmlns:"http://www.w3.org/2000/svg",width:12,height:16,fill:"none"},e),S||(S=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M2.934 3.434a.8.8 0 0 1 1.132 0l4 4a.8.8 0 0 1 0 1.132l-4 4a.8.8 0 0 1-1.132-1.132L6.37 8 2.934 4.566a.8.8 0 0 1 0-1.132",clipRule:"evenodd"})))};function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R.apply(null,arguments)}var k,A=function(e){return r.createElement("svg",R({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),I||(I=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16M5.566 4.434a.8.8 0 1 0-1.132 1.132L6.87 8l-2.435 2.434a.8.8 0 0 0 1.132 1.132L8 9.13l2.434 2.435a.8.8 0 0 0 1.132-1.132L9.13 8l2.435-2.434a.8.8 0 0 0-1.132-1.132L8 6.87z",clipRule:"evenodd"})))};function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M.apply(null,arguments)}var B,L=function(e){return r.createElement("svg",M({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),k||(k=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M7.242 2.115c-2.605 0-4.677 2.044-4.677 4.517s2.072 4.517 4.677 4.517 4.677-2.044 4.677-4.517-2.072-4.517-4.677-4.517M1 6.632C1 3.252 3.817.55 7.242.55s6.242 2.701 6.242 6.082a5.97 5.97 0 0 1-1.692 4.165l3 3.247a.783.783 0 1 1-1.15 1.062l-3.074-3.326a6.34 6.34 0 0 1-3.326.935C3.817 12.715 1 10.013 1 6.632",clipRule:"evenodd"})))};function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P.apply(null,arguments)}var O,D,F=function(e){return r.createElement("svg",P({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),B||(B=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.364 4.364a.9.9 0 0 1 1.272 0L10 8.727l4.364-4.363a.9.9 0 0 1 1.272 1.272L11.273 10l4.363 4.364a.9.9 0 0 1-1.272 1.272L10 11.273l-4.364 4.363a.9.9 0 0 1-1.272-1.272L8.727 10 4.364 5.636a.9.9 0 0 1 0-1.272",clipRule:"evenodd"})))};function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z.apply(null,arguments)}var U,$=function(e){return r.createElement("svg",z({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none"},e),O||(O=r.createElement("circle",{cx:10,cy:10,r:10,fill:"currentColor"})),D||(D=r.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M5.364 5.364a.9.9 0 0 1 1.272 0L10 8.727l3.364-3.363a.9.9 0 0 1 1.272 1.272L11.274 10l3.364 3.364a.9.9 0 1 1-1.273 1.272L10 11.273l-3.364 3.363a.9.9 0 0 1-1.272-1.272L8.727 10 5.364 6.636a.9.9 0 0 1 0-1.272",clipRule:"evenodd"})))};function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H.apply(null,arguments)}var j=function(e){return r.createElement("svg",H({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none"},e),U||(U=r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.268 6.268a.915.915 0 0 1 1.294 0L12 10.706l4.438-4.438a.915.915 0 1 1 1.294 1.294L13.294 12l4.438 4.438a.915.915 0 1 1-1.294 1.294L12 13.294l-4.438 4.438a.915.915 0 1 1-1.294-1.294L10.706 12 6.268 7.562a.915.915 0 0 1 0-1.294",clipRule:"evenodd"})))},V=Object.defineProperty,W=(e,t)=>V(e,"name",{value:t,configurable:!0});function K(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Y(...e){return t=>{let n=!1;const r=e.map(e=>{const r=K(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():K(e[t],null)}}}}function q(...e){return r.useCallback(Y(...e),e)}W(K,"setRef"),W(Y,"composeRefs"),W(q,"useComposedRefs");var X=Object.defineProperty,G=(e,t)=>X(e,"name",{value:t,configurable:!0});function Z(e){const t=r.forwardRef((t,n)=>{let{children:o,...a}=t,i=null,l=!1;const c=[];le(o)&&"function"==typeof de&&(o=de(o._payload)),r.Children.forEach(o,e=>{if(ae(e)){l=!0;const t=e;let n="child"in t.props?t.props.child:t.props.children;le(n)&&"function"==typeof de&&(n=de(n._payload)),i=ne(t,n),c.push(i?.props?.children)}else c.push(e)}),i?i=r.cloneElement(i,void 0,c):!l&&1===r.Children.count(o)&&r.isValidElement(o)&&(i=o);const s=i?oe(i):void 0,u=q(n,s);if(!i){if(o||0===o)throw new Error(l?ue(e):se(e));return o}const d=re(a,i.props??{});return i.type!==r.Fragment&&(d.ref=n?u:s),r.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}G(Z,"createSlot");var J=Z("Slot"),Q=Symbol.for("radix.slottable");function ee(e){const t=G(e=>"child"in e?e.children(e.child):e.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=Q,t}G(ee,"createSlottable");var te=ee("Slottable"),ne=G((e,t)=>{if("child"in e.props){const t=e.props.child;return r.isValidElement(t)?r.cloneElement(t,void 0,e.props.children(t.props.children)):null}return r.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function re(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function oe(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ae(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Q}G(re,"mergeProps"),G(oe,"getElementRef"),G(ae,"isSlottable");var ie=Symbol.for("react.lazy");function le(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===ie&&"_payload"in e&&ce(e._payload)}function ce(e){return"object"==typeof e&&null!==e&&"then"in e}G(le,"isLazyComponent"),G(ce,"isPromiseLike");var se=G(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),ue=G(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),de=r[" use ".trim().toString()],_e="SvgButton__-Jm";const pe=o((t,n)=>{const{className:r,asChild:o,...a}=t;return e(o?J:"button",{ref:n,className:C(_e,r),...a})});pe.displayName="SvgButton";const fe=a({size:48}),me=()=>i(fe);var ve={};const he=o((t,n)=>{const{className:r,onClick:o,...a}=t,{size:i}=me(),l=(e=>e<40?12:e<54?16:e<72?20:24)(i);return e(pe,{ref:n,className:C(ve.AvatarCloseButton,r),onClick:e=>{e.preventDefault(),o?.(e)},...a,children:e($,{width:l,height:l})})});he.displayName="AvatarCloseButton";const ge=e=>"string"==typeof e?e:`${e}px`,ye=e=>{const{options:t,content:n}=e,{asChild:r,children:o}=t;if(!r)return"function"==typeof n?n(o):n;const a=l.only(o);return c(a,{children:"function"==typeof n?n(a.props.children):n})},be=e=>void 0!==e&&!1!==e&&null!==e&&""!==e,Ce=()=>!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g),xe=(...e)=>{const t=e.filter(Boolean);if(t.length<=1){return t[0]??null}return e=>{for(const n of t)"function"==typeof n?n(e):n&&(n.current=e)}},we=()=>{},Se=[{maxExclusive:40,size:"xs"},{maxExclusive:52,size:"s"},{maxExclusive:72,size:"m"}];var Te={AvatarContainer:"AvatarContainer__7c-",AvatarContainer_form_circle:"AvatarContainer_form_circle__J44",AvatarContainer__content:"AvatarContainer__content__h8v",AvatarContainer_form_squircle:"AvatarContainer_form_squircle__1i0",AvatarContainer__onlineStatus:"AvatarContainer__onlineStatus__cdV",AvatarContainer_onlineStatus_xs:"AvatarContainer_onlineStatus_xs__sy8",AvatarContainer_onlineStatus_s:"AvatarContainer_onlineStatus_s__YBz",AvatarContainer_onlineStatus_m:"AvatarContainer_onlineStatus_m__IU3",AvatarContainer_onlineStatus_l:"AvatarContainer_onlineStatus_l__X3w",AvatarContainer__overlay:"AvatarContainer__overlay__qul",AvatarContainer__rightBottomCorner:"AvatarContainer__rightBottomCorner__kZG",AvatarContainer__rightTopCorner:"AvatarContainer__rightTopCorner__y4y"};const Ne=o((n,r)=>{const{className:o,style:a,children:i,overlay:l,rightTopCorner:c,rightBottomCorner:s,innerClassNames:u,size:d=40,asChild:_,form:p="circle",onlineStatus:f=!1,...m}=n,v=_?J:"div",{normalizedSize:h,hasOnlineStatus:g,onlineStatusSize:y}=(({size:e,onlineStatus:t,isCircle:n})=>{const r=Number.isFinite(e)?Math.min(200,Math.max(16,e)):40;return{normalizedSize:r,hasOnlineStatus:t&&n&&r>=24&&r<=80,onlineStatusSize:(o=r,Se.find(({maxExclusive:e})=>o<e)?.size??"l")};var o})({size:d,onlineStatus:f,isCircle:"circle"===p}),b=!f&&h>24&&be(s),x=C(Te.AvatarContainer,Te[`AvatarContainer_form_${p}`],g&&Te.AvatarContainer_onlineStatus,g&&Te[`AvatarContainer_onlineStatus_${y}`],o);return e(fe.Provider,{value:{size:h},children:t(v,{ref:r,className:x,style:{"--MaxUi-AvatarContainer_size":`${h}px`,...a},...m,children:[e(te,{children:ye({options:{asChild:n.asChild,children:i},content:n=>t("span",{className:C(Te.AvatarContainer__content,u?.content),children:[n,be(l)&&e("span",{className:C(Te.AvatarContainer__overlay,u?.overlay),children:l})]},"subtree-container")})}),g&&e("span",{className:Te.AvatarContainer__onlineStatus,"aria-hidden":"true"}),b&&e("span",{className:C(Te.AvatarContainer__rightBottomCorner,u?.rightBottomCorner),children:s}),be(c)&&e("span",{className:C(Te.AvatarContainer__rightTopCorner,u?.rightTopCorner),children:c})]})})});Ne.displayName="AvatarContainer";var Ie="AvatarIcon__ZUI";const Ee=o((t,n)=>{const{className:r,...o}=t;return e("span",{ref:n,className:C(Ie,r),...o})});Ee.displayName="AvatarIcon";const Re=e=>{const{asChild:t,children:n,rootElement:r,disabled:o,loading:a,onClick:i}=e,l=Boolean(o||a),c=l?e=>{e.preventDefault()}:i;if(!t&&"button"===r){return{disabled:l,onClick:c,...a?{"aria-busy":!0,"aria-disabled":!0}:{}}}if(t&&s(n)){const{type:e}=n;if("a"===e){return{"aria-disabled":l,onClick:c,...a?{"aria-busy":!0}:{},...o?{tabIndex:-1}:{}}}}return{role:"button",tabIndex:o?-1:0,"aria-disabled":l,onClick:c,...a?{"aria-busy":!0}:{}}},ke=e=>{const t=u(e);return d(()=>{t.current=e}),_(()=>(...e)=>t.current?.(...e),[])},Ae=a({platform:"ios",colorScheme:"light"}),Me=()=>i(Ae),Be=()=>{const{colorScheme:e}=Me();return e},Le=({enabled:e,onClose:t,closeThreshold:n=80,moveThreshold:r=5})=>{const[o,a]=p(!1),[i,l]=p(0),c=u(0),s=u(0),d=u(!1),_=u(!1),f=u(!1),m=u(e);m.current=e;const v=u(t);v.current=t;const h=e=>{if(!d.current)return;d.current=!1;const t=s.current;a(!1),_.current&&(f.current=!0),t>n&&v.current(),l(0),e.currentTarget.releasePointerCapture(e.pointerId)};return{dragging:o,dragOffset:i,suppressClickRef:f,handlePointerDown:e=>{m.current&&("mouse"===e.pointerType&&0!==e.button||(c.current=e.clientY,_.current=!1,d.current=!0,s.current=0,a(!0),l(0),e.currentTarget.setPointerCapture(e.pointerId)))},handlePointerMove:e=>{if(!d.current)return;const t=Math.max(0,e.clientY-c.current);s.current=t,t>r&&(_.current=!0),l(t)},handlePointerUp:h,handlePointerCancel:h}},Pe=e=>{const{src:t,referrerPolicy:n}=e,[r,o]=p("idle");return f(()=>{if(!t)return void o("error");let e=!0;const r=new window.Image,a=t=>()=>{e&&o(t)};return o("loading"),r.onload=a("loaded"),r.onerror=a("error"),r.src=t,n&&(r.referrerPolicy=n),()=>{e=!1}},[t,n]),r},Oe=()=>{const{platform:e}=Me();return e},De=a(void 0);function Fe(){const e=i(De);if(!e)throw new Error("useSnackbar must be used within SnackbarProvider");return e}const ze=(e={})=>{const{listenChanges:t}=e,[n,r]=p(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),o=e=>{r(()=>e.matches?"dark":"light")};return d(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)");return r(()=>e.matches?"dark":"light"),t?(e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}):we},[t]),n};var Ue={AvatarText:"AvatarText__DIj",AvatarText_gradient_red:"AvatarText_gradient_red__bnV",AvatarText_gradient_orange:"AvatarText_gradient_orange__Ngq",AvatarText_gradient_green:"AvatarText_gradient_green__n7Z",AvatarText_gradient_blue:"AvatarText_gradient_blue__gLu",AvatarText_gradient_purple:"AvatarText_gradient_purple__UsS",AvatarText__in:"AvatarText__in__cDg"};const $e=e=>e<20?{fontSize:6}:e<28?{fontSize:8}:e<32?{fontSize:10}:e<36?{fontSize:11}:e<40?{fontSize:13}:e<48?{fontSize:14}:e<54?{fontSize:17}:e<64?{fontSize:18}:e<72?{fontSize:21}:e<88?{fontSize:26}:{fontSize:30},He=o((t,n)=>{const{className:r,children:o,gradient:a="red",...i}=t,{size:l}=me(),c=C(Ue.AvatarText,{[Ue[`AvatarText_gradient_${a}`]]:"custom"!==a},r);return e("span",{ref:n,className:c,...i,children:e("span",{className:Ue.AvatarText__in,style:$e(l),children:o})})});He.displayName="AvatarText";var je="AvatarImage__H7-";const Ve=o((t,n)=>{const{className:r,fallback:o,fallbackGradient:a="red",...i}=t,[l,c]=p("idle"),s=Pe({src:i.src??i.srcSet,referrerPolicy:i.referrerPolicy}),u=ke(e=>{c(e)});return f(()=>{"idle"!==s&&u(s)},[s,u]),"error"===l?e(He,{gradient:a,children:o}):e("img",{ref:n,className:C(je,r),...i})});Ve.displayName="AvatarImage";var We="AvatarOverlay__-nV";const Ke=o((t,n)=>{const{className:r,onClick:o,...a}=t;return e("span",{ref:n,className:C(We,r),onClick:e=>{e.preventDefault(),o?.(e)},...a})});Ke.displayName="AvatarOverlay";const Ye=Object.assign({},{Container:Ne,Image:Ve,Overlay:Ke,Icon:Ee,Text:He,CloseButton:he});var qe={TypographyAction_variant_large:"TypographyAction_variant_large__l5j",TypographyAction_variant_medium:"TypographyAction_variant_medium__9H-",TypographyAction_variant_small:"TypographyAction_variant_small__-LL",TypographyAction_variant_xsmall:"TypographyAction_variant_xsmall__dcP"};const Xe=o((t,n)=>{const{className:r,variant:o="large",asChild:a,...i}=t,l=a?J:"span",c=C(qe.TypographyAction,qe[`TypographyAction_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});Xe.displayName="TypographyAction";var Ge={TypographyBody_variant_large:"TypographyBody_variant_large__vlS","TypographyBody_variant_large-strong":"TypographyBody_variant_large-strong__V9x",TypographyBody_variant_medium:"TypographyBody_variant_medium__9v3","TypographyBody_variant_medium-strong":"TypographyBody_variant_medium-strong__bCQ",TypographyBody_variant_small:"TypographyBody_variant_small__beJ","TypographyBody_variant_small-strong":"TypographyBody_variant_small-strong__mWy"};const Ze=o((t,n)=>{const{className:r,variant:o="large-strong",asChild:a,...i}=t,l=a?J:"span",c=C(Ge.TypographyBody,Ge[`TypographyBody_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});Ze.displayName="TypographyBody";var Je="TypographyDisplay__6MW";const Qe=o((t,n)=>{const{className:r,asChild:o,...a}=t;return e(o?J:"span",{ref:n,className:C(Je,r),...a})});Qe.displayName="TypographyDisplay";var et={"TypographyHeadline_variant_large-strong":"TypographyHeadline_variant_large-strong__mwz",TypographyHeadline_variant_medium:"TypographyHeadline_variant_medium__s92",TypographyHeadline_variant_small:"TypographyHeadline_variant_small__8Ei"};const tt=o((t,n)=>{const{className:r,variant:o="large-strong",asChild:a,...i}=t,l=a?J:"span",c=C(et.TypographyHeadline,et[`TypographyHeadline_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});tt.displayName="TypographyHeadline";var nt={TypographyLabel_variant_large:"TypographyLabel_variant_large__6vr","TypographyLabel_variant_large-strong":"TypographyLabel_variant_large-strong__uCg",TypographyLabel_variant_medium:"TypographyLabel_variant_medium__Xo5","TypographyLabel_variant_medium-strong":"TypographyLabel_variant_medium-strong__Bk8",TypographyLabel_variant_small:"TypographyLabel_variant_small__dGi","TypographyLabel_variant_small-strong":"TypographyLabel_variant_small-strong__qCw"};const rt=o((t,n)=>{const{className:r,variant:o="large",asChild:a,...i}=t,l=a?J:"span",c=C(nt.TypographyLabel,nt[`TypographyLabel_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});rt.displayName="TypographyLabel";var ot={TypographyText_variant_hero:"TypographyText_variant_hero__78f",TypographyText_variant_header:"TypographyText_variant_header__YA-",TypographyText_variant_subheader:"TypographyText_variant_subheader__8tX",TypographyText_variant_title:"TypographyText_variant_title__3HO",TypographyText_variant_body:"TypographyText_variant_body__-U7","TypographyText_variant_body-strong":"TypographyText_variant_body-strong__g4v",TypographyText_variant_detail:"TypographyText_variant_detail__2eL","TypographyText_variant_detail-strong":"TypographyText_variant_detail-strong__-9M",TypographyText_variant_description:"TypographyText_variant_description__FAg","TypographyText_variant_description-strong":"TypographyText_variant_description-strong__GYo",TypographyText_variant_label:"TypographyText_variant_label__s4i","TypographyText_variant_label-strong":"TypographyText_variant_label-strong__hPM",TypographyText_variant_tag:"TypographyText_variant_tag__6CN","TypographyText_variant_tag-strong":"TypographyText_variant_tag-strong__4DW",TypographyText_variant_note:"TypographyText_variant_note__QH-","TypographyText_variant_note-strong":"TypographyText_variant_note-strong__sWX","TypographyText_variant_action-large":"TypographyText_variant_action-large__Pa-","TypographyText_variant_action-medium":"TypographyText_variant_action-medium__Xyt","TypographyText_variant_action-small":"TypographyText_variant_action-small__mna","TypographyText_variant_action-xsmall":"TypographyText_variant_action-xsmall__IX0",TypographyText_color_primary:"TypographyText_color_primary__yhI",TypographyText_color_secondary:"TypographyText_color_secondary__ycW",TypographyText_color_tertiary:"TypographyText_color_tertiary__OTn",TypographyText_color_inherit:"TypographyText_color_inherit__hh5"};const at=o((t,n)=>{const{className:r,variant:o="body",color:a="inherit",asChild:i,...l}=t,c=i?J:"span",s=C(ot.TypographyText,ot[`TypographyText_variant_${o}`],ot[`TypographyText_color_${a}`],r);return e(c,{ref:n,className:s,...l})});at.displayName="TypographyText";var it={"TypographyTitle_variant_large-strong":"TypographyTitle_variant_large-strong__9PL",TypographyTitle_variant_medium:"TypographyTitle_variant_medium__TrJ","TypographyTitle_variant_medium-strong":"TypographyTitle_variant_medium-strong__th0",TypographyTitle_variant_small:"TypographyTitle_variant_small__zJR","TypographyTitle_variant_small-strong":"TypographyTitle_variant_small-strong__BrE"};const lt=o((t,n)=>{const{className:r,variant:o="large-strong",asChild:a,...i}=t,l=a?J:"span",c=C(it.TypographyTitle,it[`TypographyTitle_variant_${o}`],r);return e(l,{ref:n,className:c,...i})});lt.displayName="TypographyTitle";const ct=Object.assign({},{Display:Qe,Headline:tt,Title:lt,Body:Ze,Label:rt,Text:at,Action:Xe});var st="overlay__6xj",ut="overlayClosing__WO6",dt="sheet__FyU",_t="sheet_dragging__1LJ",pt="sheet_exiting__agq",ft="handle__028",mt="header__xaM",vt="content__qc2";const ht=({open:n,title:r,onClose:o,children:a,minHeight:i="auto",innerClassNames:l,enableDrag:c=!0})=>{const[s,u]=p(n?"open":"closed");d(()=>{u(e=>n?"open":"closed"===e?"closed":"exiting")},[n]);d(()=>{if("closed"===s)return;const e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[s]),d(()=>{if("closed"===s)return;const e=e=>{"Escape"===e.key&&o()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[s,o]);const{dragging:_,dragOffset:f,suppressClickRef:m,handlePointerDown:v,handlePointerMove:h,handlePointerUp:g,handlePointerCancel:y}=Le({enabled:c&&"open"===s,onClose:()=>{u("exiting"),o()}});if("closed"===s)return null;const b="exiting"===s,x=_?`translateY(${f}px)`:`translateY(${b?100:0}%)`;return e("div",{className:C(st,{[ut]:b},l?.overlay),onClick:()=>{m.current?m.current=!1:o()},children:t("div",{className:C(dt,l?.sheet,{[_t]:_,[pt]:b}),style:{minHeight:i,transform:x},onClick:e=>e.stopPropagation(),onTransitionEnd:e=>{e.target===e.currentTarget&&"transform"===e.propertyName&&u(e=>"exiting"===e?"closed":e)},children:[c&&e("div",{className:C(ft,l?.handle),role:"button",tabIndex:0,"aria-label":"Перетащите вниз, чтобы закрыть",onPointerDown:v,onPointerMove:h,onPointerUp:g,onPointerCancel:y,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),o())}}),r&&e("div",{className:C(mt,l?.header),children:e(ct.Title,{variant:"medium-strong",children:r})}),e("div",{className:vt,children:a})]})})};var gt="ClearableInput__4PN",yt="ClearableInput__button__iUo",bt="ClearableInput__count__K7Z";const Ct=e=>void 0===e||""===e||Array.isArray(e)&&0===e.length,xt=o((n,r)=>{const{className:o,onChange:a,innerClassNames:i,withClearButton:l=!0,disabled:c,count:s,...d}=n,_=u(null),f=void 0!==d.value,[m,v]=p(()=>Ct(d.defaultValue)),h=f?Ct(d.value):m;return t("span",{className:C(gt,o),children:[e("input",{ref:xe(_,r),className:C(i?.input),onChange:e=>{f||v(""===e.currentTarget.value),a?.(e)},disabled:c,...d}),!h&&!c&&!!s&&e("div",{className:C(bt,i?.count),children:s}),!h&&!c&&l&&e(pe,{type:"button",className:C(yt,i?.clearButton),onClick:()=>{_.current&&(e=>{const{el:t,value:n}=e,r=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;r?.call(t,n);const o=new Event("input",{bubbles:!0});t.dispatchEvent(o)})({el:_.current,value:""})},"aria-label":"Очистить",children:e(A,{})})]})});xt.displayName="ClearableInput";var wt="Container__yZR",St="Container_fullWidth__2tY";const Tt=o((t,n)=>{const{className:r,asChild:o,fullWidth:a,...i}=t,l=o?J:"div",c=C(wt,{[St]:a},r);return e(l,{ref:n,className:c,...i})});Tt.displayName="Container";var Nt="EllipsisText__DEC",It="EllipsisText_multiline__y4t",Et="EllipsisText_singleLine__Arf";const Rt=o((t,n)=>{const{className:r,maxLines:o=1,style:a,asChild:i,...l}=t,c=i?J:"span",s=C(Nt,{[It]:o>1,[Et]:1===o},r);return e(c,{ref:n,className:s,style:{"--MaxUi-EllipsisText_linesCount":o,...a},...l})});Rt.displayName="EllipsisText";var kt="Flex__pih";const At=o((t,n)=>{const{className:r,display:o="flex",direction:a="row",align:i="flex-start",justify:l="start",asChild:c,wrap:s,style:u,gap:d,gapX:_,gapY:p,...f}=t;return e(c?J:"div",{ref:n,className:C(kt,r),style:{flexDirection:a,justifyContent:l,alignItems:i,flexWrap:s,...u,display:o,"--MaxUi-Flex_gapX":ge(_??d??0),"--MaxUi-Flex_gapY":ge(p??d??0)},...f})});At.displayName="Flex";var Mt="Grid__lFk";const Bt=o((t,n)=>{const{className:r,style:o,display:a="grid",align:i="start",justify:l="start",gap:c,gapX:s,gapY:u,cols:d,rows:_,asChild:p,...f}=t;return e(p?J:"div",{ref:n,className:C(Mt,r),style:{justifyContent:l,alignItems:i,...o,display:a,"--MaxUi-Grid_gapX":ge(s??c??0),"--MaxUi-Grid_gapY":ge(u??c??0),"--MaxUi-Grid_cols":d??0,"--MaxUi-Grid_rows":_??0},...f})});Bt.displayName="Grid";var Lt={Panel:"Panel__XH0",Panel_centeredX:"Panel_centeredX__DG7",Panel_centeredY:"Panel_centeredY__f-k",Panel_mode_primary:"Panel_mode_primary__fNs",Panel_mode_secondary:"Panel_mode_secondary__Tez"};const Pt=o((t,n)=>{const{className:r,mode:o="primary",centeredX:a,centeredY:i,...l}=t,c=C(Lt.Panel,Lt[`Panel_mode_${o}`],{[Lt.Panel_centeredX]:a,[Lt.Panel_centeredY]:i},r);return e("div",{ref:n,className:c,...l})});Pt.displayName="Panel";var Ot="Ripple__dJ9",Dt="Ripple_active__uv5";const Ft=o((t,n)=>{const{className:r,...o}=t,a=u(null),i=u(null),l=e=>{const t=e.currentTarget.getBoundingClientRect();((e,t)=>{null!==i.current&&(i.current.classList.remove(Dt),i.current.style.top=t+"px",i.current.style.left=e+"px",i.current.classList.add(Dt))})(e.clientX-(t.left??0),e.clientY-(t.top??0))};return d(()=>{if(i.current)return a.current=i.current.parentElement,null!==a.current&&a.current.addEventListener("pointerdown",l),()=>{null!==a.current&&a.current?.removeEventListener("pointerdown",l)}},[]),e("span",{ref:xe(n,i),role:"presentation","aria-hidden":!0,className:C(Ot,r),onAnimationEnd:()=>{null!==i.current&&i.current.classList.remove(Dt)},...o})});Ft.displayName="Ripple";var zt="Tappable__O--",Ut="Tappable_interactive__4Uv",$t="Tappable_disabled__0z8",Ht="Tappable_activeMode_ripple__3k-",jt="Tappable_activeMode_highlight__Hs-",Vt="Tappable__ripple__Egr";const Wt=o((n,r)=>{const{className:o,disabled:a,asChild:i,children:l,onClick:c,parentChildren:u,as:d="div",..._}=n,p=i?J:d,f=Oe(),m=Re({asChild:i,children:l,disabled:a,onClick:c,rootElement:d}),v=(({onClick:e,href:t,children:n,asChild:r,parentChildren:o=n})=>r?!(!r||!s(o))&&("href"in o.props||"onClick"in o.props):!!e||!!t)({onClick:c,href:_.href,children:l,asChild:i,parentChildren:u}),h="android"===f&&v&&!a,g=C(zt,{[Ut]:v,[$t]:a,[jt]:!h,[Ht]:h},o);return t(p,{ref:r,className:g,...v?m:{},..._,children:[l,h&&e(Ft,{className:Vt})]})});Wt.displayName="Tappable";var Kt={Spinner:"Spinner__piy",Spinner_appearance_primary:"Spinner_appearance_primary__mxz",Spinner_appearance_themed:"Spinner_appearance_themed__-9S","Spinner_appearance_primary-static":"Spinner_appearance_primary-static__JxW",Spinner_appearance_contrast:"Spinner_appearance_contrast__Mv6","Spinner_appearance_contrast-static":"Spinner_appearance_contrast-static__rM7",Spinner_appearance_negative:"Spinner_appearance_negative__eMf","Spinner_appearance_neutral-themed":"Spinner_appearance_neutral-themed__D8F",androidSpinner:"androidSpinner__w-L",rotation:"rotation__CUP",iosSpinner:"iosSpinner__3q2",bar:"bar__aHj",fade:"fade__2ZD"};const Yt=({size:t})=>e("div",{className:Kt.androidSpinner,style:{width:t,height:t}}),qt=({size:t})=>e("div",{className:Kt.iosSpinner,style:{width:t,height:t},children:Array.from({length:8},(t,n)=>e("div",{className:Kt.bar},n))}),Xt=o((t,n)=>{const{className:r,size:o=20,appearance:a="primary",...i}=t,l=Oe(),c=C(Kt.Spinner,Kt[`Spinner_appearance_${a}`],r);return e("span",{ref:n,role:"status",className:c,...i,children:e("ios"===l?qt:Yt,{size:o})})});Xt.displayName="Spinner";var Gt={Button:"Button__0OJ",Button_loading:"Button_loading__LD-",Button__iconBefore:"Button__iconBefore__BUe",Button__content:"Button__content__vnq",Button__indicator:"Button__indicator__HuA",Button__iconAfter:"Button__iconAfter__VhZ",Button_disabled:"Button_disabled__jkY",Button_stretched:"Button_stretched__mzq",Button_activeMode_ripple:"Button_activeMode_ripple__E5Y",Button_activeMode_highlight:"Button_activeMode_highlight__K3j",Button_size_xsmall:"Button_size_xsmall__QCm",Button_size_small:"Button_size_small__LLG",Button_size_medium:"Button_size_medium__fI9",Button_size_large:"Button_size_large__S2-",Button_variant_primary:"Button_variant_primary__yLL",Button_variant_secondary:"Button_variant_secondary__DR6",Button_variant_ghost:"Button_variant_ghost__EkG","Button_variant_primary-contrast":"Button_variant_primary-contrast__b63","Button_variant_secondary-contrast":"Button_variant_secondary-contrast__cey",Button_variant_overlay:"Button_variant_overlay__keO",Button_variant_destructive:"Button_variant_destructive__2Ug",Button__spinnerContainer:"Button__spinnerContainer__G4I",Button__ripple:"Button__ripple__jw0"},Zt={Counter:"Counter__0Oj",Counter_variant_primary:"Counter_variant_primary__8Mz","Counter_variant_primary-contrast":"Counter_variant_primary-contrast__yFz",Counter_variant_attention:"Counter_variant_attention__IWH","Counter_variant_attention-contrast":"Counter_variant_attention-contrast__LHu",Counter_variant_promo:"Counter_variant_promo__9kD",Counter_variant_static:"Counter_variant_static__d8Y","Counter_variant_static-contrast":"Counter_variant_static-contrast__bAq",Counter_variant_default:"Counter_variant_default__weZ",Counter_variant_mute:"Counter_variant_mute__2SU",Counter_variant_menu:"Counter_variant_menu__qf0"};const Jt=o((t,n)=>{const{className:r,value:o,rounded:a,variant:i="primary",...l}=t,c=C(Zt.Counter,Zt[`Counter_variant_${i}`],r),s=_(()=>a?Intl.NumberFormat("en",{notation:"compact"}).format(o):o,[a,o]);return e("span",{ref:n,className:c,...l,children:s})});Jt.displayName="Counter";const Qt=e=>{switch(e){case"xsmall":return 16;case"small":case"medium":return 20;case"large":return 24}},en=e=>{switch(e){case"primary":case"destructive":case"overlay":return"contrast-static";case"secondary":return"primary";case"ghost":return"themed";case"primary-contrast":case"secondary-contrast":return"primary-static"}},tn=e=>{switch(e){case"primary":return{variant:"primary-contrast"};case"secondary":case"ghost":case"primary-contrast":case"secondary-contrast":return{variant:"static"};case"overlay":return{variant:"static-contrast"};case"destructive":return{variant:"attention-contrast"}}},nn=o((n,r)=>{const{className:o,iconBefore:a,iconAfter:i,indicator:l,children:u,onClick:d,loading:_,disabled:p=!1,asChild:f=!1,innerClassNames:m,stretched:v=!1,size:h="medium",variant:g="primary",...y}=n,b="button",x=f?J:b,w=Oe(),S=Re({asChild:f,children:u,disabled:p,loading:_,onClick:d,rootElement:b}),T=p||_,N="android"===w,I=C(Gt.Button,Gt[`Button_variant_${g}`],Gt[`Button_size_${h}`],{[Gt.Button_loading]:_,[Gt.Button_disabled]:p,[Gt.Button_stretched]:v,[Gt.Button_activeMode_highlight]:!T&&!N,[Gt.Button_activeMode_ripple]:!T&&N},o);return t(x,{ref:r,className:I,...S,...y,children:[be(a)&&e("span",{className:C(Gt.Button__iconBefore,m?.iconBefore),children:a}),_&&e("span",{className:C(Gt.Button__spinnerContainer,m?.spinnerContainer),children:e(Xt,{className:C(m?.spinner),size:Qt(h),appearance:en(g)})}),e(te,{children:ye({options:{asChild:f,children:u},content:t=>e(Rt,{className:C(Gt.Button__content,m?.content),children:t},"subtree-container")})}),be(l)&&e("span",{className:C(Gt.Button__indicator,m?.indicator),children:(E=l,R=g,s(E)&&E.type===Jt?c(E,{...tn(R)}):E)}),be(i)&&e("span",{className:C(Gt.Button__iconAfter,m?.iconAfter),children:i}),N&&!T&&e(Ft,{className:Gt.Button__ripple})]});var E,R});nn.displayName="Button";var rn={CellAction:"CellAction__vzN",CellAction_mode_primary:"CellAction_mode_primary__vZQ",CellAction_disabled:"CellAction_disabled__VZA",CellAction_mode_secondary:"CellAction_mode_secondary__AJk",CellAction_mode_themed:"CellAction_mode_themed__-Gg",CellAction_mode_destructive:"CellAction_mode_destructive__ovY",CellAction_mode_custom:"CellAction_mode_custom__3T8",CellAction_height_compact:"CellAction_height_compact__ysc",CellAction_height_normal:"CellAction_height_normal__ELj",CellAction_surface_island:"CellAction_surface_island__REC",CellAction__before:"CellAction__before__oZm",CellAction__content:"CellAction__content__Uib",CellAction__chevron:"CellAction__chevron__6SI"};const on=o((n,r)=>{const{className:o,before:a,children:i,innerClassNames:l,asChild:c=!1,mode:s="primary",surface:u="default",height:d="normal",showChevron:_=!1,...p}=n,f=C(rn.CellAction,rn[`CellAction_mode_${s}`],rn[`CellAction_height_${d}`],{[rn.CellAction_surface_island]:"island"===u,[rn.CellAction_disabled]:p.disabled},o);return t(Wt,{ref:r,className:f,asChild:c,as:"button",parentChildren:i,...p,children:[be(a)&&e("span",{className:C(rn.CellAction__before,l?.before),children:a}),e(te,{children:ye({options:{asChild:c,children:i},content:t=>e("span",{className:C(rn.CellAction__content,l?.content),children:t},"subtree-container")})}),_&&e(E,{className:C(rn.CellAction__chevron,l?.chevron)})]})});on.displayName="CellAction";var an={CellHeader:"CellHeader__Epf",CellHeader_titleStyle_caps:"CellHeader_titleStyle_caps__nfB",CellHeader__content:"CellHeader__content__El-",CellHeader_titleStyle_normal:"CellHeader_titleStyle_normal__M-p",CellHeader_fullWidth:"CellHeader_fullWidth__h2Y",CellHeader__after:"CellHeader__after__RXN"};const ln=o((n,r)=>{const{className:o,titleStyle:a="caps",fullWidth:i=!1,children:l,after:c,innerClassNames:s,...u}=n,d=C(an.CellHeader,an[`CellHeader_titleStyle_${a}`],{[an.CellHeader_fullWidth]:i},o);return t("div",{ref:r,className:d,...u,children:[be(l)&&e("div",{className:C(an.CellHeader__content,s?.content),children:l}),be(c)&&e("div",{className:C(an.CellHeader__after,s?.after),children:c})]})});ln.displayName="CellHeader";var cn={CellInput:"CellInput__92-",CellInput_disabled:"CellInput_disabled__fZ7",CellInput__input:"CellInput__input__gQ3",CellInput_height_compact:"CellInput_height_compact__Mv2",CellInput_height_normal:"CellInput_height_normal__ovc",CellInput_surface_island:"CellInput_surface_island__cls",CellInput__before:"CellInput__before__Hkm",CellInput__body:"CellInput__body__Egp",CellInput__clearButton:"CellInput__clearButton__znK"};const sn=o((n,r)=>{const{className:o,before:a,innerClassNames:i,disabled:l,height:c="normal",surface:s="default",...u}=n,d=C(cn.CellInput,cn[`CellInput_height_${c}`],{[cn.CellInput_surface_island]:"island"===s,[cn.CellInput_disabled]:l},o);return t("label",{className:d,children:[be(a)&&e(Rt,{className:C(cn.CellInput__before,i?.before),maxLines:1,children:a}),e(xt,{ref:r,className:C(cn.CellInput__body,i?.body),innerClassNames:{input:C(cn.CellInput__input,i?.input),clearButton:C(cn.CellInput__clearButton,i?.clearButton)},type:"text",disabled:l,...u})]})});sn.displayName="CellInput";var un={CellList:"CellList__1ou",CellList_filled:"CellList_filled__ikE",CellList__body:"CellList__body__ouS",CellList_mode_island:"CellList_mode_island__aCu"};const dn=o((n,r)=>{const{className:o,header:a,children:i,mode:l="full-width",filled:c="island"===l,...s}=n,u=C(un.CellList,un[`CellList_mode_${l}`],{[un.CellList_filled]:c},o);return t("div",{ref:r,className:u,...s,children:[be(a)&&e("div",{className:un.CellList__header,children:a}),e("div",{className:un.CellList__body,children:i})]})});dn.displayName="CellList";var _n={CellSimple:"CellSimple__n0z",CellSimple_disabled:"CellSimple_disabled__T-3",CellSimple__title:"CellSimple__title__aYs",CellSimple__overline:"CellSimple__overline__Ncr",CellSimple__link:"CellSimple__link__ie-",CellSimple_subtitle_secondary:"CellSimple_subtitle_secondary__3uL",CellSimple__subtitle:"CellSimple__subtitle__oIF",CellSimple_subtitle_tertiary:"CellSimple_subtitle_tertiary__lz0",CellSimple_height_compact:"CellSimple_height_compact__HUQ",CellSimple_height_normal:"CellSimple_height_normal__pxj",CellSimple_surface_island:"CellSimple_surface_island__GzM",CellSimple__before:"CellSimple__before__5Q9",CellSimple__after:"CellSimple__after__2FK",CellSimple__content:"CellSimple__content__SOk",CellSimple__chevron:"CellSimple__chevron__cSs",CellSimple_separator:"CellSimple_separator__aOX"};const pn=o((n,r)=>{const{link:o,after:a,title:i,before:l,subtitle:c,children:s,overline:u,separator:d,className:_,innerClassNames:p,as:f="div",surface:m="default",height:v="normal",asChild:h=!1,disabled:g=!1,showChevron:y=!1,subtitleMode:b="secondary",...x}=n,w=C(_n.CellSimple,_n[`CellSimple_height_${v}`],_n[`CellSimple_subtitle_${b}`],{[_n.CellSimple_surface_island]:"island"===m,[_n.CellSimple_disabled]:g,[_n.CellSimple_separator]:d},_);return t(Wt,{ref:r,className:w,asChild:h,as:f,disabled:g,parentChildren:s,...x,children:[be(l)&&e("div",{className:C(_n.CellSimple__before,p?.before),children:l}),e(te,{children:ye({options:{asChild:h,children:s},content:n=>t("div",{className:C(_n.CellSimple__content,p?.content),children:[be(u)&&e("div",{className:C(_n.CellSimple__overline,p?.overline),children:u}),be(i)&&e("div",{className:C(_n.CellSimple__title,p?.title),children:i}),be(c)&&e("div",{className:C(_n.CellSimple__subtitle,p?.subtitle),children:c}),n,o&&e("a",{className:C(_n.CellSimple__link,p?.link),href:o,target:"_blank",rel:"noreferrer",children:o})]},"subtree-container")})}),(be(a)||y)&&t("div",{className:C(_n.CellSimple__after,p?.after),children:[a,y&&e(E,{className:C(_n.CellSimple__chevron,p?.chevron)})]})]})});pn.displayName="CellSimple";var fn="Checkbox__ChG",mn="Checkbox__control__FUK",vn="Checkbox__input__ow-",hn="Checkbox__box__svi",gn="Checkbox__icon__Fa7",yn="Checkbox__content__MrQ",bn="Checkbox__label__ZKY",Cn="Checkbox__caption__CRn",xn="Checkbox_animated__cbY",wn="Checkbox_indeterminate__wqC",Sn="Checkbox_disabled__Wvo";const Tn=o((n,r)=>{const{label:o,caption:a,indeterminate:i=!1,disabled:l,className:c,...s}=n,u=be(o),d=be(a),_=u||d,p=_?"label":"span",f=m(e=>{e&&(e.indeterminate=i)},[i]),v=C(fn,xn,{[wn]:i,[Sn]:l},c);return t(p,{className:v,children:[t("span",{className:mn,children:[e("input",{...s,ref:xe(r,f),type:"checkbox",disabled:l,"aria-checked":i?"mixed":void 0,className:vn}),e("span",{className:hn,children:e(T,{className:gn})})]}),_&&t("span",{className:yn,children:[u&&e("span",{className:bn,children:o}),d&&e("span",{className:Cn,children:a})]})]})});function Nn(){return"undefined"!=typeof window}function In(e){return kn(e)?(e.nodeName||"").toLowerCase():"#document"}function En(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Rn(e){var t;return null==(t=(kn(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function kn(e){return!!Nn()&&(e instanceof Node||e instanceof En(e).Node)}function An(e){return!!Nn()&&(e instanceof Element||e instanceof En(e).Element)}function Mn(e){return!!Nn()&&(e instanceof HTMLElement||e instanceof En(e).HTMLElement)}function Bn(e){return!(!Nn()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof En(e).ShadowRoot)}function Ln(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function Pn(e){return/^(table|td|th)$/.test(In(e))}function On(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}Tn.displayName="Checkbox";const Dn=/transform|translate|scale|rotate|perspective|filter/,Fn=/paint|layout|strict|content/,zn=e=>!!e&&"none"!==e;let Un;function $n(e){const t=An(e)?Vn(e):e;return zn(t.transform)||zn(t.translate)||zn(t.scale)||zn(t.rotate)||zn(t.perspective)||!Hn()&&(zn(t.backdropFilter)||zn(t.filter))||Dn.test(t.willChange||"")||Fn.test(t.contain||"")}function Hn(){return null==Un&&(Un="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Un}function jn(e){return/^(html|body|#document)$/.test(In(e))}function Vn(e){return En(e).getComputedStyle(e)}function Wn(e){return An(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kn(e){if("html"===In(e))return e;const t=e.assignedSlot||e.parentNode||Bn(e)&&e.host||Rn(e);return Bn(t)?t.host:t}function Yn(e){const t=Kn(e);return jn(t)?(e.ownerDocument||e).body:Mn(t)&&Ln(t)?t:Yn(t)}function qn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Yn(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=En(o);if(a){const e=Xn(i);return t.concat(i,i.visualViewport||[],Ln(o)?o:[],e&&n?qn(e):[])}return t.concat(o,qn(o,[],n))}function Xn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Gn=Math.min,Zn=Math.max,Jn=Math.round,Qn=Math.floor,er=e=>({x:e,y:e}),tr={left:"right",right:"left",bottom:"top",top:"bottom"};function nr(e,t){return"function"==typeof e?e(t):e}function rr(e){return e.split("-")[0]}function or(e){return e.split("-")[1]}function ar(e){return"x"===e?"y":"x"}function ir(e){return"y"===e?"height":"width"}function lr(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function cr(e){return ar(lr(e))}function sr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const ur=["left","right"],dr=["right","left"],_r=["top","bottom"],pr=["bottom","top"];function fr(e,t,n,r){const o=or(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?dr:ur:t?ur:dr;case"left":case"right":return t?_r:pr;default:return[]}}(rr(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(sr)))),a}function mr(e){const t=rr(e);return tr[t]+e.slice(t.length)}function vr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}
2
+ /*!
3
+ * tabbable 6.5.0
4
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
5
+ */var hr=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","area[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),gr="undefined"==typeof Element,yr=gr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,br=!gr&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Cr=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):Cr(e.parentNode))},xr=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var a=o.shift();if(!Cr(a,!1))if("SLOT"===a.tagName){var i=a.assignedElements(),l=i.length?i:a.children,c=xr(l,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:a,candidates:c})}else{yr.call(a,hr)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var s=a.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(a),u=!Cr(s,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(s&&u){var d=xr(!0===s?a.children:s.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return r},wr=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Sr=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!wr(e)?0:e.tabIndex},Tr=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Nr=function(e){return"INPUT"===e.tagName},Ir=function(e){return function(e){return Nr(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||br(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Er=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Rr=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});var o=getComputedStyle(e).visibility;if("hidden"===o||"collapse"===o)return!0;var a=yr.call(e,"details>summary:first-of-type")?e.parentElement:e;if(yr.call(a,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Er(e)}else{if("function"==typeof r){for(var i=e;e;){var l=e.parentElement,c=br(e);if(l&&!l.shadowRoot&&!0===r(l))return Er(e);e=e.assignedSlot?e.assignedSlot:l||c===e.ownerDocument?l:c.host}e=i}if(function(e){var t,n,r,o,a=e&&br(e),i=null===(t=a)||void 0===t?void 0:t.host,l=!1;if(a&&a!==e)for(l=!!(null!==(n=i)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(i)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!l&&i;){var c,s,u;l=!(null===(s=i=null===(c=a=br(i))||void 0===c?void 0:c.host)||void 0===s||null===(u=s.ownerDocument)||void 0===u||!u.contains(i))}return l}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},kr=function(e,t){return!(t.disabled||function(e){return Nr(e)&&"hidden"===e.type}(t)||Rr(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!yr.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Ar=function(e,t){return!(Ir(t)||Sr(t)<0||!kr(e,t))},Mr=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Br=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,a=o?e.scopeParent:e,i=function(e,t){var n=Sr(e);return n<0&&t&&!wr(e)?0:n}(a,o),l=o?Br(e.candidates):a;0===i?o?t.push.apply(t,l):t.push(a):n.push({documentOrder:r,tabIndex:i,item:e,isScope:o,content:l})}),n.sort(Tr).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Lr=function(e,t){var n;return n=(t=t||{}).getShadowRoot?xr([e],t.includeContainer,{filter:Ar.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Mr}):function(e,t,n){if(Cr(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(hr));return t&&yr.call(e,hr)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,Ar.bind(null,t)),Br(n)};function Pr(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function Or(){const e=/android/i;return e.test(function(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}())||e.test(Pr())}const Dr="data-floating-ui-focusable",Fr="ArrowLeft",zr="ArrowRight";function Ur(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function $r(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Hr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function jr(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Vr(e){return(null==e?void 0:e.ownerDocument)||document}function Wr(e){return Mn(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function Kr(e){return e?e.hasAttribute(Dr)?e:e.querySelector("["+Dr+"]")||e:null}function Yr(e,t,n){void 0===n&&(n=!0);return e.filter(e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))}).flatMap(t=>[t,...Yr(e,t.id,n)])}function qr(e){e.preventDefault(),e.stopPropagation()}function Xr(e){return!Pr().includes("jsdom/")&&(!Or()&&0===e.width&&0===e.height||Or()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function Gr(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var Zr="undefined"!=typeof document?f:function(){};function Jr(e){const t=r.useRef(e);return Zr(()=>{t.current=e}),t}const Qr={...r}.useInsertionEffect||(e=>e());function eo(e){const t=r.useRef(()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")});return Qr(()=>{t.current=e}),r.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}function to(e,t,n){return Math.floor(e/t)!==n}function no(e,t){return t<0||t>=e.current.length}function ro(e,t){return ao(e,{disabledIndices:t})}function oo(e,t){return ao(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ao(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:a=1}=void 0===t?{}:t,i=n;do{i+=r?-a:a}while(i>=0&&i<=e.current.length-1&&co(e,i,o));return i}function io(e,t,n,r,o){if(-1===e)return-1;const a=n.indexOf(e),i=t[e];switch(o){case"tl":return a;case"tr":return i?a+i.width-1:a;case"bl":return i?a+(i.height-1)*r:a;case"br":return n.lastIndexOf(e)}}function lo(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function co(e,t,n){if("function"==typeof n)return n(t);if(n)return n.includes(t);const r=e.current[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}const so=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function uo(e,t){const n=Lr(e,so()),r=n.length;if(0===r)return;const o=Ur(Vr(e)),a=n.indexOf(o);return n[-1===a?1===t?0:r-1:a+t]}function _o(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!$r(n,r)}function po(e){Lr(e,so()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function fo(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}function mo(e,t,n){let{reference:r,floating:o}=e;const a=lr(t),i=cr(t),l=ir(i),c=rr(t),s="y"===a,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,_=r[l]/2-o[l]/2;let p;switch(c){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}const f=or(t);return f&&(p[i]+=_*("end"===f?1:-1)*(n&&s?-1:1)),p}async function vo(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:l,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:_=!1,padding:p=0}=nr(t,e),f=function(e){return"number"!=typeof e?function(e){var t,n,r,o;return{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(o=e.left)?o:0}}(e):{top:e,right:e,bottom:e,left:e}}(p),m=l[_?"floating"===d?"reference":"floating":d],v=vr(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(m)))||n?m:m.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(l.floating)),boundary:s,rootBoundary:u,strategy:c})),h="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,g=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l.floating)),y=await(null==a.isElement?void 0:a.isElement(g))&&await(null==a.getScale?void 0:a.getScale(g))||{x:1,y:1},b=vr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:h,offsetParent:g,strategy:c}):h);return{top:(v.top-b.top+f.top)/y.y,bottom:(b.bottom-v.bottom+f.bottom)/y.y,left:(v.left-b.left+f.left)/y.x,right:(b.right-v.right+f.right)/y.x}}const ho=new Set(["left","top"]);function go(e){const t=Vn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Mn(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=Jn(n)!==a||Jn(r)!==i;return l&&(n=a,r=i),{width:n,height:r,$:l}}function yo(e){return An(e)?e:e.contextElement}function bo(e){const t=yo(e);if(!Mn(t))return er(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=go(t);let i=(a?Jn(n.width):n.width)/r,l=(a?Jn(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}const Co=er(0);function xo(e){const t=En(e);return Hn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Co}function wo(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=yo(e);let i=er(1);t&&(r?An(r)&&(i=bo(r)):i=bo(e));const l=function(e,t,n){return void 0===t&&(t=!1),!!n&&t&&n===En(e)}(a,n,r)?xo(a):er(0);let c=(o.left+l.x)/i.x,s=(o.top+l.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a&&r){const e=En(a),t=An(r)?En(r):r;let n=e,o=Xn(n);for(;o&&t!==n;){const e=bo(o),t=o.getBoundingClientRect(),r=Vn(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,s*=e.y,u*=e.x,d*=e.y,c+=a,s+=i,n=En(o),o=Xn(n)}}return vr({width:u,height:d,x:c,y:s})}function So(e,t){const n=Wn(e).scrollLeft;return t?t.left+n:wo(Rn(e)).left+n}function To(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-So(e,n),y:n.top+t.scrollTop}}function No(e,t,n){let r;if("viewport"===t||"layoutViewport"===t)r=function(e,t,n){void 0===n&&(n="viewport");const r="layoutViewport"===n,o=En(e),a=Rn(e),i=o.visualViewport;let l=a.clientWidth,c=a.clientHeight,s=0,u=0;if(i){const e=!Hn()||"fixed"===t;r?e||(s=-i.offsetLeft,u=-i.offsetTop):(l=i.width,c=i.height,e&&(s=i.offsetLeft,u=i.offsetTop))}if(So(a)<=0){const e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(a.clientWidth-t.clientWidth-r),i="stable both-edges"===getComputedStyle(a).scrollbarGutter?o/2:o;i<=25&&(l-=i)}return{width:l,height:c,x:s,y:u}}(e,n,t);else if("document"===t)r=function(e){const t=Wn(e),n=e.ownerDocument.body,r=Zn(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=Zn(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+So(e);const i=-t.scrollTop;return"rtl"===Vn(n).direction&&(a+=Zn(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:a,y:i}}(Rn(e));else if(An(t))r=function(e,t){const n=wo(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=bo(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=xo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return vr(r)}function Io(e,t,n){const r=Mn(t),o=Rn(t),a="fixed"===n,i=wo(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=er(0);if((r||!a)&&(("body"!==In(t)||Ln(o))&&(l=Wn(t)),r)){const e=wo(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&o&&(c.x=So(o));const s=!o||r||a?er(0):To(o,l);return{x:i.left+l.scrollLeft-c.x-s.x,y:i.top+l.scrollTop-c.y-s.y,width:i.width,height:i.height}}function Eo(e){return"static"===Vn(e).position}function Ro(e,t){if(!Mn(e)||"fixed"===Vn(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Rn(e)===n&&(n=n.ownerDocument.body),n}function ko(e,t){const n=En(e);if(On(e))return n;if(!Mn(e)){let t=Kn(e);for(;t&&!jn(t);){if(An(t)&&!Eo(t))return t;t=Kn(t)}return n}let r=Ro(e,t);for(;r&&Pn(r)&&Eo(r);)r=Ro(r,t);return r&&jn(r)&&Eo(r)&&!$n(r)?n:r||function(e){let t=Kn(e);for(;Mn(t)&&!jn(t);){if($n(t))return t;if(On(t))return null;t=Kn(t)}return null}(e)||n}const Ao={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=Rn(r),l=!!t&&On(t.floating);if(r===i||l&&a)return n;let c={scrollLeft:0,scrollTop:0},s=er(1);const u=er(0),d=Mn(r);if((d||!a)&&(("body"!==In(r)||Ln(i))&&(c=Wn(r)),d)){const e=wo(r);s=bo(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const _=!i||d||a?er(0):To(i,c);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-c.scrollLeft*s.x+u.x+_.x,y:n.y*s.y-c.scrollTop*s.y+u.y+_.y}},getDocumentElement:Rn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?On(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=qn(e,[],!1).filter(e=>An(e)&&"body"!==In(e)),o=null;const a="fixed"===Vn(e).position;let i=a?Kn(e):e;for(;An(i)&&!jn(i);){const e=Vn(i),t=$n(i),n=o?o.position:a?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?o=e:r=r.filter(e=>e!==i),i=Kn(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=No(t,a[0],o);let l=i.top,c=i.right,s=i.bottom,u=i.left;for(let e=1;e<a.length;e++){const n=No(t,a[e],o);l=Zn(n.top,l),c=Gn(n.right,c),s=Gn(n.bottom,s),u=Zn(n.left,u)}return{width:c-u,height:s-l,x:u,y:l}},getOffsetParent:ko,getElementRects:async function(e){const t=this.getOffsetParent||ko,n=this.getDimensions,r=await n(e.floating);return{reference:Io(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){const{width:t,height:n}=go(e);return{width:t,height:n}},getScale:bo,isElement:An,isRTL:function(e){return"rtl"===Vn(e).direction}};function Mo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Bo(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,s=yo(e),u=o||a?[...s?qn(s):[],...t?qn(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n),a&&e.addEventListener("resize",n)});const d=s&&l?function(e,t,n){let r,o=null;const a=Rn(e);function i(){var e;clearTimeout(r),null==(e=o)||e.disconnect(),o=null}function l(n,c){void 0===n&&(n=!1),void 0===c&&(c=1),i();const s=e.getBoundingClientRect(),{left:u,top:d,width:_,height:p}=s;if(n||t(),!_||!p)return;const f={rootMargin:-Qn(d)+"px "+-Qn(a.clientWidth-(u+_))+"px "+-Qn(a.clientHeight-(d+p))+"px "+-Qn(u)+"px",threshold:Zn(0,Gn(1,c))||1};let m=!0;function v(t){const n=t[0].intersectionRatio;if(!Mo(s,e.getBoundingClientRect()))return l();if(n!==c){if(!m)return l();n?l(!1,n):r=setTimeout(()=>{l(!1,1e-7)},1e3)}m=!1}try{o=new IntersectionObserver(v,{...f,root:a.ownerDocument})}catch(e){o=new IntersectionObserver(v,f)}o.observe(e)}const c=En(e),s=()=>l(n);return c.addEventListener("resize",s),l(!0),()=>{c.removeEventListener("resize",s),i()}}(s,n,a):null;let _,p=-1,f=null;i&&(f=new ResizeObserver(e=>{let[r]=e;r&&r.target===s&&f&&t&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=f)||e.observe(t)})),n()}),s&&!c&&f.observe(s),t&&f.observe(t));let m=c?wo(e):null;return c&&function t(){const r=wo(e);m&&!Mo(m,r)&&n();m=r,_=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=f)||e.disconnect(),f=null,c&&cancelAnimationFrame(_)}}const Lo=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:l}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=rr(n),l=or(n),c="y"===lr(n),s=ho.has(i)?-1:1,u=a&&c?-1:1,d=nr(t,e);let{mainAxis:_,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&"number"==typeof f&&(p="end"===l?-1*f:f),c?{x:p*u,y:_*s}:{x:_*s,y:p*u}}(t,e);return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},Po=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=nr(e,t),u={x:n,y:r},d=await a.detectOverflow(t,s),_=lr(o),p=ar(_);let f=u[p],m=u[_];const v=(e,t)=>{return n=t+d["y"===e?"top":"left"],r=t,o=t-d["y"===e?"bottom":"right"],Zn(n,Gn(r,o));var n,r,o};i&&(f=v(p,f)),l&&(m=v(_,m));const h=c.fn({...t,[p]:f,[_]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:i,[_]:l}}}}}},Oo=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:c,elements:s}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:_,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=nr(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const h=rr(o),g=lr(l),y=rr(l)===l,b=await(null==c.isRTL?void 0:c.isRTL(s.floating)),C=_||(y||!m?[mr(l)]:function(e){const t=mr(e);return[sr(e),t,sr(t)]}(l)),x="none"!==f;!_&&x&&C.push(...fr(l,m,f,b));const w=[l,...C],S=await c.detectOverflow(t,v),T=[];let N=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&T.push(S[h]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=or(e),o=cr(e),a=ir(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=mr(i)),[i,mr(i)]}(o,i,b);T.push(S[e[0]],S[e[1]])}if(N=[...N,{placement:o,overflows:T}],!T.every(e=>e<=0)){var I,E;const e=((null==(I=a.flip)?void 0:I.index)||0)+1,t=w[e];if(t){if(!("alignment"===d&&g!==lr(t))||N.every(e=>lr(e.placement)!==g||e.overflows[0]>0))return{data:{index:e,overflows:N},reset:{placement:t}}}let n=null==(E=N.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!n)switch(p){case"bestFit":{var R;const e=null==(R=N.filter(e=>{if(x){const t=lr(e.placement);return t===g||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:R[0];e&&(n=e);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},Do=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:a}=t,{apply:i=()=>{},...l}=nr(e,t),c=await o.detectOverflow(t,l),s=rr(n),u=or(n),d="y"===lr(n),{width:_,height:p}=r.floating;let f,m;"top"===s||"bottom"===s?(f=s,m=u===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(m=s,f="end"===u?"top":"bottom");const v=p-c.top-c.bottom,h=_-c.left-c.right,g=Gn(p-c[f],v),y=Gn(_-c[m],h),b=t.middlewareData.shift,C=!b;let x=g,w=y;null!=b&&b.enabled.x&&(w=h),null!=b&&b.enabled.y&&(x=v),C&&!u&&(d?w=_-2*Zn(c.left,c.right):x=p-2*Zn(c.top,c.bottom)),await i({...t,availableWidth:w,availableHeight:x});const S=await o.getDimensions(a.floating);return _!==S.width||p!==S.height?{reset:{rects:!0}}:{}}}},Fo=(e,t,n)=>{const r=new Map,o=null!=n?n:{},a={...Ao,...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:vo},c=await(null==i.isRTL?void 0:i.isRTL(t));let s=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=mo(s,r,c),_=r,p=0;const f={};for(let n=0;n<a.length;n++){const m=a[n];if(!m)continue;const{name:v,fn:h}=m,{x:g,y:y,data:b,reset:C}=await h({x:u,y:d,initialPlacement:r,placement:_,strategy:o,middlewareData:f,rects:s,platform:l,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,f[v]={...f[v],...b},C&&p<50&&(p++,"object"==typeof C&&(C.placement&&(_=C.placement),C.rects&&(s=!0===C.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),({x:u,y:d}=mo(s,_,c))),n=-1)}return{x:u,y:d,placement:_,strategy:o,middlewareData:f}})(e,t,{...o,platform:a})};var zo="undefined"!=typeof document?f:function(){};function Uo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Uo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Uo(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function $o(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ho(e,t){const n=$o(e);return Math.round(t*n)/n}function jo(e){const t=r.useRef(e);return zo(()=>{t.current=e}),t}const Vo=(e,t)=>{const n=Lo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wo=(e,t)=>{const n=Po(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ko=(e,t)=>{const n=Oo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yo=(e,t)=>{const n=Do(e);return{name:n.name,fn:n.fn,options:[e,t]}};function qo(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Xo=r.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function Go(t){const{children:n,elementsRef:o,labelsRef:a}=t,[i,l]=r.useState(()=>new Set),c=r.useCallback(e=>{l(t=>new Set(t).add(e))},[]),s=r.useCallback(e=>{l(t=>{const n=new Set(t);return n.delete(e),n})},[]),u=r.useMemo(()=>{const e=new Map;return Array.from(i.keys()).sort(qo).forEach((t,n)=>{e.set(t,n)}),e},[i]);return e(Xo.Provider,{value:r.useMemo(()=>({register:c,unregister:s,map:u,elementsRef:o,labelsRef:a}),[c,s,u,o,a]),children:n})}const Zo="data-floating-ui-focusable",Jo="active",Qo="selected",ea="ArrowLeft",ta="ArrowRight",na="ArrowUp",ra="ArrowDown",oa={...r};let aa=!1,ia=0;const la=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ia++;const ca=oa.useId||function(){const[e,t]=r.useState(()=>aa?la():void 0);return Zr(()=>{null==e&&t(la())},[]),r.useEffect(()=>{aa=!0},[]),e};let sa;function ua(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var a;null!=(e=sa)&&e.has(o)||(null==(a=sa)||a.add(o),console.warn(o))}function da(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}"production"!==process.env.NODE_ENV&&(sa=new Set);const _a=r.createContext(null),pa=r.createContext(null),fa=()=>{var e;return(null==(e=r.useContext(_a))?void 0:e.id)||null},ma=()=>r.useContext(pa);function va(e){const t=ca(),n=ma(),r=fa();return Zr(()=>{if(!t)return;const e={id:t,parentId:r};return null==n||n.addNode(e),()=>{null==n||n.removeNode(e)}},[n,t,r]),t}function ha(t){const{children:n,id:o}=t,a=fa();return e(_a.Provider,{value:r.useMemo(()=>({id:o,parentId:a}),[o,a]),children:n})}function ga(t){const{children:n}=t,o=r.useRef([]),a=r.useCallback(e=>{o.current=[...o.current,e]},[]),i=r.useCallback(e=>{o.current=o.current.filter(t=>t!==e)},[]),[l]=r.useState(()=>da());return e(pa.Provider,{value:r.useMemo(()=>({nodesRef:o,addNode:a,removeNode:i,events:l}),[a,i,l]),children:n})}function ya(e){return"data-floating-ui-"+e}function ba(e){-1!==e.current&&(clearTimeout(e.current),e.current=-1)}const Ca=ya("safe-polygon");function xa(e,t,n){if(n&&!Gr(n))return 0;if("number"==typeof e)return e;if("function"==typeof e){const n=e();return"number"==typeof n?n:null==n?void 0:n[t]}return null==e?void 0:e[t]}function wa(e){return"function"==typeof e?e():e}let Sa=0;const Ta={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Na=r.forwardRef(function(t,n){const[o,a]=r.useState();Zr(()=>{/apple/i.test(navigator.vendor)&&a("button")},[]);const i={ref:n,tabIndex:0,role:o,"aria-hidden":!o||void 0,[ya("focus-guard")]:"",style:Ta};return e("span",{...t,...i})}),Ia={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ea=r.createContext(null),Ra=ya("portal");function ka(n){const{children:o,id:a,root:i,preserveTabOrder:l=!0}=n,c=function(e){void 0===e&&(e={});const{id:t,root:n}=e,o=ca(),a=Aa(),[i,l]=r.useState(null),c=r.useRef(null);return Zr(()=>()=>{null==i||i.remove(),queueMicrotask(()=>{c.current=null})},[i]),Zr(()=>{if(!o)return;if(c.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=o,n.setAttribute(Ra,""),e.appendChild(n),c.current=n,l(n)},[t,o]),Zr(()=>{if(null===n)return;if(!o)return;if(c.current)return;let e=n||(null==a?void 0:a.portalNode);e&&!kn(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const i=document.createElement("div");i.id=o,i.setAttribute(Ra,""),e=r||e,e.appendChild(i),c.current=i,l(i)},[t,n,o,a]),i}({id:a,root:i}),[s,u]=r.useState(null),d=r.useRef(null),_=r.useRef(null),p=r.useRef(null),f=r.useRef(null),m=null==s?void 0:s.modal,v=null==s?void 0:s.open,h=!!s&&!s.modal&&s.open&&l&&!(!i&&!c);return r.useEffect(()=>{if(c&&l&&!m)return c.addEventListener("focusin",e,!0),c.addEventListener("focusout",e,!0),()=>{c.removeEventListener("focusin",e,!0),c.removeEventListener("focusout",e,!0)};function e(e){if(c&&_o(e)){("focusin"===e.type?fo:po)(c)}}},[c,l,m]),r.useEffect(()=>{c&&(v||fo(c))},[v,c]),t(Ea.Provider,{value:r.useMemo(()=>({preserveTabOrder:l,beforeOutsideRef:d,afterOutsideRef:_,beforeInsideRef:p,afterInsideRef:f,portalNode:c,setFocusManagerState:u}),[l,c]),children:[h&&c&&e(Na,{"data-type":"outside",ref:d,onFocus:e=>{if(_o(e,c)){var t;null==(t=p.current)||t.focus()}else{const e=s?s.domReference:null,t=uo(Vr(n=e).body,-1)||n;null==t||t.focus()}var n}}),h&&c&&e("span",{"aria-owns":c.id,style:Ia}),c&&g.createPortal(o,c),h&&c&&e(Na,{"data-type":"outside",ref:_,onFocus:e=>{if(_o(e,c)){var t;null==(t=f.current)||t.focus()}else{const t=s?s.domReference:null,r=uo(Vr(n=t).body,1)||n;null==r||r.focus(),(null==s?void 0:s.closeOnFocusOut)&&(null==s||s.onOpenChange(!1,e.nativeEvent,"focus-out"))}var n}})]})}const Aa=()=>r.useContext(Ea);function Ma(e){return Mn(e.target)&&"BUTTON"===e.target.tagName}function Ba(e){return Wr(e)}function La(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:a,elements:{domReference:i}}=e,{enabled:l=!0,event:c="click",toggle:s=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:_=!0}=t,p=r.useRef(),f=r.useRef(!1),m=r.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==c&&(Gr(t,!0)&&u||(!n||!s||a.current.openEvent&&_&&"mousedown"!==a.current.openEvent.type?(e.preventDefault(),o(!0,e.nativeEvent,"click")):o(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===c&&p.current?p.current=void 0:Gr(t,!0)&&u||(!n||!s||a.current.openEvent&&_&&"click"!==a.current.openEvent.type?o(!0,e.nativeEvent,"click"):o(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!d||Ma(e)||(" "!==e.key||Ba(i)||(e.preventDefault(),f.current=!0),function(e){return Mn(e.target)&&"A"===e.target.tagName}(e)||"Enter"===e.key&&o(!n||!s,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||Ma(e)||Ba(i)||" "===e.key&&f.current&&(f.current=!1,o(!n||!s,e.nativeEvent,"click"))}}),[a,i,c,u,d,o,n,_,s]);return r.useMemo(()=>l?{reference:m}:{},[l,m])}const Pa={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Oa={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Da=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Fa(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,elements:a,dataRef:i}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:s=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:_="pointerdown",ancestorScroll:p=!1,bubbles:f,capture:m}=t,v=ma(),h=eo("function"==typeof s?s:()=>!1),g="function"==typeof s?h:s,y=r.useRef(!1),{escapeKey:b,outsidePress:C}=Da(f),{escapeKey:x,outsidePress:w}=Da(m),S=r.useRef(!1),T=eo(e=>{var t;if(!n||!l||!c||"Escape"!==e.key)return;if(S.current)return;const r=null==(t=i.current.floatingContext)?void 0:t.nodeId,a=v?Yr(v.nodesRef.current,r):[];if(!b&&(e.stopPropagation(),a.length>0)){let e=!0;if(a.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),N=eo(e=>{var t;const n=()=>{var t;T(e),null==(t=Hr(e))||t.removeEventListener("keydown",n)};null==(t=Hr(e))||t.addEventListener("keydown",n)}),I=eo(e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const r=y.current;if(y.current=!1,"click"===u&&r)return;if(n)return;if("function"==typeof g&&!g(e))return;const l=Hr(e),c="["+ya("inert")+"]",s=Vr(a.floating).querySelectorAll(c);let d=An(l)?l:null;for(;d&&!jn(d);){const e=Kn(d);if(jn(e)||!An(e))break;d=e}if(s.length&&An(l)&&!l.matches("html,body")&&!$r(l,a.floating)&&Array.from(s).every(e=>!$r(d,e)))return;if(Mn(l)&&k){const t=jn(l),n=Vn(l),r=/auto|scroll/,o=t||r.test(n.overflowX),a=t||r.test(n.overflowY),i=o&&l.clientWidth>0&&l.scrollWidth>l.clientWidth,c=a&&l.clientHeight>0&&l.scrollHeight>l.clientHeight,s="rtl"===n.direction,u=c&&(s?e.offsetX<=l.offsetWidth-l.clientWidth:e.offsetX>l.clientWidth),d=i&&e.offsetY>l.clientHeight;if(u||d)return}const _=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=v&&Yr(v.nodesRef.current,_).some(t=>{var n;return jr(e,null==(n=t.context)?void 0:n.elements.floating)});if(jr(e,a.floating)||jr(e,a.domReference)||p)return;const f=v?Yr(v.nodesRef.current,_):[];if(f.length>0){let e=!0;if(f.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}o(!1,e,"outside-press")}),E=eo(e=>{var t;const n=()=>{var t;I(e),null==(t=Hr(e))||t.removeEventListener(u,n)};null==(t=Hr(e))||t.addEventListener(u,n)});r.useEffect(()=>{if(!n||!l)return;i.current.__escapeKeyBubbles=b,i.current.__outsidePressBubbles=C;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function r(){window.clearTimeout(e),S.current=!0}function s(){e=window.setTimeout(()=>{S.current=!1},Hn()?5:0)}const d=Vr(a.floating);c&&(d.addEventListener("keydown",x?N:T,x),d.addEventListener("compositionstart",r),d.addEventListener("compositionend",s)),g&&d.addEventListener(u,w?E:I,w);let _=[];return p&&(An(a.domReference)&&(_=qn(a.domReference)),An(a.floating)&&(_=_.concat(qn(a.floating))),!An(a.reference)&&a.reference&&a.reference.contextElement&&(_=_.concat(qn(a.reference.contextElement)))),_=_.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)}),_.forEach(e=>{e.addEventListener("scroll",t)}),()=>{c&&(d.removeEventListener("keydown",x?N:T,x),d.removeEventListener("compositionstart",r),d.removeEventListener("compositionend",s)),g&&d.removeEventListener(u,w?E:I,w),_.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[i,a,c,g,u,n,o,p,l,b,C,T,x,N,I,w,E]),r.useEffect(()=>{i.current.insideReactTree=!1},[i,g,u]);const R=r.useMemo(()=>({onKeyDown:T,...d&&{[Pa[_]]:e=>{o(!1,e.nativeEvent,"reference-press")},..."click"!==_&&{onClick(e){o(!1,e.nativeEvent,"reference-press")}}}}),[T,o,d,_]),k=r.useMemo(()=>{function e(e){0===e.button&&(y.current=!0)}return{onKeyDown:T,onMouseDown:e,onMouseUp:e,[Oa[u]]:()=>{i.current.insideReactTree=!0}}},[T,u,i]);return r.useMemo(()=>l?{reference:R,floating:k}:{},[l,R,k])}function za(e){const{open:t=!1,onOpenChange:n,elements:o}=e,a=ca(),i=r.useRef({}),[l]=r.useState(()=>da()),c=null!=fa();if("production"!==process.env.NODE_ENV){const e=o.reference;e&&!An(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var a;null!=(e=sa)&&e.has(o)||(null==(a=sa)||a.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[s,u]=r.useState(o.reference),d=eo((e,t,r)=>{i.current.openEvent=e?t:void 0,l.emit("openchange",{open:e,event:t,reason:r,nested:c}),null==n||n(e,t,r)}),_=r.useMemo(()=>({setPositionReference:u}),[]),p=r.useMemo(()=>({reference:s||o.reference||null,floating:o.floating||null,domReference:o.reference}),[s,o.reference,o.floating]);return r.useMemo(()=>({dataRef:i,open:t,onOpenChange:d,elements:p,events:l,floatingId:a,refs:_}),[t,d,p,l,a,_])}function Ua(e){var t,n;let{elements:o,...a}=void 0===e?{}:e;const{nodeId:i}=a,l=za({...a,elements:{reference:null!=(t=null==o?void 0:o.reference)?t:null,floating:null!=(n=null==o?void 0:o.floating)?n:null}}),c=a.rootContext||l,s=c.elements,[u,d]=r.useState(null),[_,p]=r.useState(null),f=(null==s?void 0:s.domReference)||u,m=r.useRef(null),v=ma();Zr(()=>{f&&(m.current=f)},[f]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:a,elements:{reference:i,floating:l}={},transform:c=!0,whileElementsMounted:s,open:u}=e,[d,_]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=r.useState(o);Uo(p,o)||f(o);const[m,v]=r.useState(null),[h,y]=r.useState(null),b=r.useCallback(e=>{e!==S.current&&(S.current=e,v(e))},[]),C=r.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),x=i||m,w=l||h,S=r.useRef(null),T=r.useRef(null),N=r.useRef(d),I=null!=s,E=jo(s),R=jo(a),k=jo(u),A=r.useCallback(()=>{if(!S.current||!T.current)return;const e={placement:t,strategy:n,middleware:p};R.current&&(e.platform=R.current),Fo(S.current,T.current,e).then(e=>{const t={...e,isPositioned:!1!==k.current};M.current&&!Uo(N.current,t)&&(N.current=t,g.flushSync(()=>{_(t)}))})},[p,t,n,R,k]);zo(()=>{!1===u&&N.current.isPositioned&&(N.current.isPositioned=!1,_(e=>({...e,isPositioned:!1})))},[u]);const M=r.useRef(!1);zo(()=>(M.current=!0,()=>{M.current=!1}),[]),zo(()=>{if(x&&(S.current=x),w&&(T.current=w),x&&w){if(E.current)return E.current(x,w,A);A()}},[x,w,A,E,I]);const B=r.useMemo(()=>({reference:S,floating:T,setReference:b,setFloating:C}),[b,C]),L=r.useMemo(()=>({reference:x,floating:w}),[x,w]),P=r.useMemo(()=>{const e={position:n,left:0,top:0};if(!L.floating)return e;const t=Ho(L.floating,d.x),r=Ho(L.floating,d.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...$o(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,c,L.floating,d.x,d.y]);return r.useMemo(()=>({...d,update:A,refs:B,elements:L,floatingStyles:P}),[d,A,B,L,P])}({...a,elements:{...s,..._&&{reference:_}}}),y=r.useCallback(e=>{const t=An(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;p(t),h.refs.setReference(t)},[h.refs]),b=r.useCallback(e=>{(An(e)||null===e)&&(m.current=e,d(e)),(An(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!An(e))&&h.refs.setReference(e)},[h.refs]),C=r.useMemo(()=>({...h.refs,setReference:b,setPositionReference:y,domReference:m}),[h.refs,b,y]),x=r.useMemo(()=>({...h.elements,domReference:f}),[h.elements,f]),w=r.useMemo(()=>({...h,...c,refs:C,elements:x,nodeId:i}),[h,C,x,i,c]);return Zr(()=>{c.dataRef.current.floatingContext=w;const e=null==v?void 0:v.nodesRef.current.find(e=>e.id===i);e&&(e.context=w)}),r.useMemo(()=>({...h,context:w,refs:C,elements:x}),[h,C,x,w])}function $a(e,t,n){const r=new Map,o="item"===n;let a=e;if(o&&e){const{[Jo]:t,[Qo]:n,...r}=e;a=r}return{..."floating"===n&&{tabIndex:-1,[Zo]:""},...a,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,a]=t;var i;o&&[Jo,Qo].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof a&&(null==(i=r.get(n))||i.push(a),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=a)}),e):e,{})}}function Ha(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),o=e.map(e=>null==e?void 0:e.item),a=r.useCallback(t=>$a(t,e,"reference"),t),i=r.useCallback(t=>$a(t,e,"floating"),n),l=r.useCallback(t=>$a(t,e,"item"),o);return r.useMemo(()=>({getReferenceProps:a,getFloatingProps:i,getItemProps:l}),[a,i,l])}function ja(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Va(e,t){return ja(t,e===na||e===ra,e===ea||e===ta)}function Wa(e,t,n){return ja(t,e===ra,n?e===ea:e===ta)||"Enter"===e||" "===e||""===e}function Ka(e,t,n){return ja(t,n?e===ea:e===ta,e===ra)}function Ya(e,t,n,r){return"both"===t||"horizontal"===t&&r&&r>1?"Escape"===e:ja(t,n?e===ta:e===ea,e===na)}function qa(e,t){const{open:n,onOpenChange:o,elements:a,floatingId:i}=e,{listRef:l,activeIndex:c,onNavigate:s=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:_=!1,loop:p=!1,nested:f=!1,rtl:m=!1,virtual:v=!1,focusItemOnOpen:h="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:y=!0,disabledIndices:b,orientation:C="vertical",parentOrientation:x,cols:w=1,scrollItemIntoView:S=!0,virtualItemRef:T,itemSizes:N,dense:I=!1}=t;"production"!==process.env.NODE_ENV&&(_&&(p||ua("`useListNavigation` looping must be enabled to allow escaping."),v||ua("`useListNavigation` must be virtual to allow escaping.")),"vertical"===C&&w>1&&ua("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const E=Jr(Kr(a.floating)),R=fa(),k=ma();Zr(()=>{e.dataRef.current.orientation=C},[e,C]);const A=eo(()=>{s(-1===P.current?null:P.current)}),M=!!(B=a.domReference)&&"combobox"===B.getAttribute("role")&&Wr(B);var B;const L=r.useRef(h),P=r.useRef(null!=d?d:-1),O=r.useRef(null),D=r.useRef(!0),F=r.useRef(A),z=r.useRef(!!a.floating),U=r.useRef(n),$=r.useRef(!1),H=r.useRef(!1),j=Jr(b),V=Jr(n),W=Jr(S),K=Jr(d),[Y,q]=r.useState(),[X,G]=r.useState(),Z=eo(()=>{function e(e){var t;v?(null!=(t=e.id)&&t.endsWith("-fui-option")&&(e.id=i+"-"+Math.random().toString(16).slice(2,10)),q(e.id),null==k||k.events.emit("virtualfocus",e),T&&(T.current=e)):function(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Sa);const a=()=>null==e?void 0:e.focus({preventScroll:n});o?a():Sa=requestAnimationFrame(a)}(e,{sync:$.current,preventScroll:!0})}const t=l.current[P.current],n=H.current;t&&e(t);($.current?e=>e():requestAnimationFrame)(()=>{const r=l.current[P.current]||t;if(!r)return;t||e(r);const o=W.current;o&&Q&&(n||!D.current)&&(null==r.scrollIntoView||r.scrollIntoView("boolean"==typeof o?{block:"nearest",inline:"nearest"}:o))})});Zr(()=>{u&&(n&&a.floating?L.current&&null!=d&&(H.current=!0,P.current=d,A()):z.current&&(P.current=-1,F.current()))},[u,n,a.floating,d,A]),Zr(()=>{if(u&&n&&a.floating)if(null==c){if($.current=!1,null!=K.current)return;if(z.current&&(P.current=-1,Z()),(!U.current||!z.current)&&L.current&&(null!=O.current||!0===L.current&&null==O.current)){let e=0;const t=()=>{if(null==l.current[0]){if(e<2){(e?requestAnimationFrame:queueMicrotask)(t)}e++}else P.current=null==O.current||Wa(O.current,C,m)||f?ro(l,j.current):oo(l,j.current),O.current=null,A()};t()}}else no(l,c)||(P.current=c,Z(),H.current=!1)},[u,n,a.floating,c,K,f,l,C,m,A,Z,j]),Zr(()=>{var e;if(!u||a.floating||!k||v||!z.current)return;const t=k.nodesRef.current,n=null==(e=t.find(e=>e.id===R))||null==(e=e.context)?void 0:e.elements.floating,r=Ur(Vr(a.floating)),o=t.some(e=>e.context&&$r(e.context.elements.floating,r));n&&!o&&D.current&&n.focus({preventScroll:!0})},[u,a.floating,k,R,v]),Zr(()=>{if(u&&k&&v&&!R)return k.events.on("virtualfocus",e),()=>{k.events.off("virtualfocus",e)};function e(e){G(e.id),T&&(T.current=e)}},[u,k,v,R,T]),Zr(()=>{F.current=A,U.current=n,z.current=!!a.floating}),Zr(()=>{n||(O.current=null,L.current=h)},[n,h]);const J=null!=c,Q=r.useMemo(()=>{function e(e){if(!V.current)return;const t=l.current.indexOf(e);-1!==t&&P.current!==t&&(P.current=t,A())}return{onFocus(t){let{currentTarget:n}=t;$.current=!0,e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},onMouseMove(t){let{currentTarget:n}=t;$.current=!0,H.current=!1,g&&e(n)},onPointerLeave(e){let{pointerType:t}=e;var n;D.current&&"touch"!==t&&($.current=!0,g&&(P.current=-1,A(),v||null==(n=E.current)||n.focus({preventScroll:!0})))}}},[V,E,g,l,A,v]),ee=r.useCallback(()=>{var e;return null!=x?x:null==k||null==(e=k.nodesRef.current.find(e=>e.id===R))||null==(e=e.context)||null==(e=e.dataRef)?void 0:e.current.orientation},[R,k,x]),te=eo(e=>{if(D.current=!1,$.current=!0,229===e.which)return;if(!V.current&&e.currentTarget===E.current)return;if(f&&Ya(e.key,C,m,w))return Va(e.key,ee())||qr(e),o(!1,e.nativeEvent,"list-navigation"),void(Mn(a.domReference)&&(v?null==k||k.events.emit("virtualfocus",a.domReference):a.domReference.focus()));const t=P.current,r=ro(l,b),i=oo(l,b);if(M||("Home"===e.key&&(qr(e),P.current=r,A()),"End"===e.key&&(qr(e),P.current=i,A())),w>1){const t=N||Array.from({length:l.current.length},()=>({width:1,height:1})),n=function(e,t,n){const r=[];let o=0;return e.forEach((e,a)=>{let{width:i,height:l}=e;if(i>t&&"production"!==process.env.NODE_ENV)throw new Error("[Floating UI]: Invalid grid - item width at index "+a+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const e=[];for(let n=0;n<i;n++)for(let r=0;r<l;r++)e.push(o+n+r*t);o%t+i<=t&&e.every(e=>null==r[e])?(e.forEach(e=>{r[e]=a}),c=!0):o++}}),[...r]}(t,w,I),o=n.findIndex(e=>null!=e&&!co(l,e,b)),a=n.reduce((e,t,n)=>null==t||co(l,t,b)?e:n,-1),c=n[function(e,t){let{event:n,orientation:r,loop:o,rtl:a,cols:i,disabledIndices:l,minIndex:c,maxIndex:s,prevIndex:u,stopEvent:d=!1}=t,_=u;if("ArrowUp"===n.key){if(d&&qr(n),-1===u)_=s;else if(_=ao(e,{startingIndex:_,amount:i,decrement:!0,disabledIndices:l}),o&&(u-i<c||_<0)){const e=u%i,t=s%i,n=s-(t-e);_=t===e?s:t>e?n:n-i}no(e,_)&&(_=u)}if("ArrowDown"===n.key&&(d&&qr(n),-1===u?_=c:(_=ao(e,{startingIndex:u,amount:i,disabledIndices:l}),o&&u+i>s&&(_=ao(e,{startingIndex:u%i-i,amount:i,disabledIndices:l}))),no(e,_)&&(_=u)),"both"===r){const t=Qn(u/i);n.key===(a?Fr:zr)&&(d&&qr(n),u%i!==i-1?(_=ao(e,{startingIndex:u,disabledIndices:l}),o&&to(_,i,t)&&(_=ao(e,{startingIndex:u-u%i-1,disabledIndices:l}))):o&&(_=ao(e,{startingIndex:u-u%i-1,disabledIndices:l})),to(_,i,t)&&(_=u)),n.key===(a?zr:Fr)&&(d&&qr(n),u%i!==0?(_=ao(e,{startingIndex:u,decrement:!0,disabledIndices:l}),o&&to(_,i,t)&&(_=ao(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:l}))):o&&(_=ao(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:l})),to(_,i,t)&&(_=u));const r=Qn(s/i)===t;no(e,_)&&(_=o&&r?n.key===(a?zr:Fr)?s:ao(e,{startingIndex:u-u%i-1,disabledIndices:l}):u)}return _}({current:n.map(e=>null!=e?l.current[e]:null)},{event:e,orientation:C,loop:p,rtl:m,cols:w,disabledIndices:lo([...("function"!=typeof b?b:null)||l.current.map((e,t)=>co(l,t,b)?t:void 0),void 0],n),minIndex:o,maxIndex:a,prevIndex:io(P.current>i?r:P.current,t,n,w,e.key===ra?"bl":e.key===(m?ea:ta)?"tr":"tl"),stopEvent:!0})];if(null!=c&&(P.current=c,A()),"both"===C)return}if(Va(e.key,C)){if(qr(e),n&&!v&&Ur(e.currentTarget.ownerDocument)===e.currentTarget)return P.current=Wa(e.key,C,m)?r:i,void A();Wa(e.key,C,m)?P.current=p?t>=i?_&&t!==l.current.length?-1:r:ao(l,{startingIndex:t,disabledIndices:b}):Math.min(i,ao(l,{startingIndex:t,disabledIndices:b})):P.current=p?t<=r?_&&-1!==t?l.current.length:i:ao(l,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(r,ao(l,{startingIndex:t,decrement:!0,disabledIndices:b})),no(l,P.current)&&(P.current=-1),A()}}),ne=r.useMemo(()=>v&&n&&J&&{"aria-activedescendant":X||Y},[v,n,J,X,Y]),re=r.useMemo(()=>({"aria-orientation":"both"===C?void 0:C,...M?{}:ne,onKeyDown:te,onPointerMove(){D.current=!0}}),[ne,te,C,M]),oe=r.useMemo(()=>{function e(e){"auto"===h&&function(e){return!(0!==e.mozInputSource||!e.isTrusted)||(Or()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}(e.nativeEvent)&&(L.current=!0)}function t(e){L.current=h,"auto"===h&&Xr(e.nativeEvent)&&(L.current=!0)}return{...ne,onKeyDown(e){D.current=!1;const t=e.key.startsWith("Arrow"),r=["Home","End"].includes(e.key),a=t||r,i=Ka(e.key,C,m),c=Ya(e.key,C,m,w),s=Ka(e.key,ee(),m),u=Va(e.key,C),_=(f?s:u)||"Enter"===e.key||""===e.key.trim();if(v&&n){const t=null==k?void 0:k.nodesRef.current.find(e=>null==e.parentId),n=k&&t?function(e,t){let n,r=-1;return function t(o,a){a>r&&(n=o,r=a),Yr(e,o).forEach(e=>{t(e.id,a+1)})}(t,0),e.find(e=>e.id===n)}(k.nodesRef.current,t.id):null;if(a&&n&&T){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(i||c){var p,h;const r=(null==(p=n.context)?void 0:p.elements.domReference)===e.currentTarget,o=c&&!r?null==(h=n.context)?void 0:h.elements.domReference:i?l.current.find(e=>(null==e?void 0:e.id)===Y):null;o&&(qr(e),o.dispatchEvent(t),G(void 0))}var g;if((u||r)&&n.context)if(n.context.open&&n.parentId&&e.currentTarget!==n.context.elements.domReference)return qr(e),void(null==(g=n.context.elements.domReference)||g.dispatchEvent(t))}return te(e)}if(n||y||!t){if(_){const t=Va(e.key,ee());O.current=f&&t?null:e.key}f?s&&(qr(e),n?(P.current=ro(l,j.current),A()):o(!0,e.nativeEvent,"list-navigation")):u&&(null!=d&&(P.current=d),qr(e),!n&&y?o(!0,e.nativeEvent,"list-navigation"):te(e),n&&A())}},onFocus(){n&&!v&&(P.current=-1,A())},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[Y,ne,w,te,j,h,l,f,A,o,n,y,C,ee,m,d,k,v,T]);return r.useMemo(()=>u?{reference:oe,floating:re,item:Q}:{},[u,oe,re,Q])}const Xa=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);const Ga=a({mode:"desktop",close:we}),Za=()=>i(Ga),Ja=a({activeIndex:null,getItemProps:e=>({...e})});var Qa="ContextMenu__trigger__bEu";const ei={open:100,close:300},ti=()=>"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(pointer: coarse)").matches;var ni="ContextMenuDivider__JLr";const ri=({className:t,...n})=>e("div",{role:"separator",className:C(ni,t),...n});ri.displayName="ContextMenuDivider";var oi="ContextMenuActionBar__Req",ai="ContextMenuActionBar__button__5UF",ii="ContextMenuActionBar__icon__pKA",li="ContextMenuActionBar__label__Dcc";const ci=({buttons:r})=>{const{close:o,innerClassNames:a}=Za(),i=e=>t=>{e.onClick?.(t),o()};return t(n,{children:[e("div",{role:"none",className:C(oi,a?.actionBar),children:r.map(n=>t(Wt,{as:"button",type:"button",disabled:n.disabled,className:C(ai,a?.actionBarButton),onClick:i(n),children:[e("span",{className:C(ii,a?.actionBarButtonIcon),children:n.icon}),be(n.label)&&e("span",{className:C(li,a?.actionBarButtonLabel),children:n.label})]},n.id))}),e(ri,{className:C(a?.divider)})]})};ci.displayName="ContextMenuActionBar";var si={MaxUI:"MaxUI__g7Q",MaxUI_platform_ios:"MaxUI_platform_ios__gAV",MaxUI_platform_android:"MaxUI_platform_android__m3U",MaxUI_colorScheme_light:"MaxUI_colorScheme_light__Woo",MaxUI_colorScheme_dark:"MaxUI_colorScheme_dark__jFq",MaxUI_resetBody:"MaxUI_resetBody__Mwh"},ui="ContextMenuContent__9kf";const di=o((t,n)=>{const{children:r,className:o,...a}=t,{platform:i,colorScheme:l}=Me();return e("div",{ref:n,role:"menu",className:C(si[`MaxUI_colorScheme_${l}`],si[`MaxUI_platform_${i}`],ui,o),...a,children:r})});di.displayName="ContextMenuContent";var _i={ContextMenuRow:"ContextMenuRow__NZL",ContextMenuRow_destructive:"ContextMenuRow_destructive__WNP",ContextMenuRow_disabled:"ContextMenuRow_disabled__VUD",ContextMenuRow_hasSubmenu:"ContextMenuRow_hasSubmenu__ZJ6",ContextMenuRow__before:"ContextMenuRow__before__O8u",ContextMenuRow__label:"ContextMenuRow__label__DaH",ContextMenuRow__hint:"ContextMenuRow__hint__sZV",ContextMenuRow__chevron:"ContextMenuRow__chevron__1jA",ContextMenuRow__chevron_mobile:"ContextMenuRow__chevron_mobile__tKx",ContextMenuRow__chevron_expanded:"ContextMenuRow__chevron_expanded__8wf"};const pi=o((n,o)=>{const{item:a,expanded:l=!1,onClick:c,onMouseEnter:s,onMouseLeave:u,onFocus:d,onSubmenuKeyDown:_,className:p}=n,{mode:f,innerClassNames:m}=Za(),{activeIndex:v,getItemProps:h}=i(Ja),{ref:g,index:y}=function(e){void 0===e&&(e={});const{label:t}=e,{register:n,unregister:o,map:a,elementsRef:i,labelsRef:l}=r.useContext(Xo),[c,s]=r.useState(null),u=r.useRef(null),d=r.useCallback(e=>{if(u.current=e,null!==c&&(i.current[c]=e,l)){var n;const r=void 0!==t;l.current[c]=r?t:null!=(n=null==e?void 0:e.textContent)?n:null}},[c,i,l,t]);return Zr(()=>{const e=u.current;if(e)return n(e),()=>{o(e)}},[n,o]),Zr(()=>{const e=u.current?a.get(u.current):null;null!=e&&s(e)},[a]),r.useMemo(()=>({ref:d,index:null==c?-1:c}),[c,d])}(),b=void 0!==a.items,x=h({onClick:c,onMouseEnter:s,onMouseLeave:u,onFocus:d,onKeyDown:e=>{_?.(e),(e=>{"Enter"===e.key||" "===e.key?(e.preventDefault(),a.disabled||e.currentTarget.click()):"ArrowRight"===e.key?(e.preventDefault(),!a.disabled&&b&&"mobile"===f&&e.currentTarget.click()):"ArrowLeft"===e.key&&e.preventDefault()})(e)}}),w=C(_i.ContextMenuRow,{[_i.ContextMenuRow_destructive]:"destructive"===a.mode,[_i.ContextMenuRow_disabled]:a.disabled,[_i.ContextMenuRow_expanded]:l,[_i.ContextMenuRow_hasSubmenu]:b},m?.row,p);return t(Wt,{ref:xe(o,g),role:"menuitem","aria-haspopup":b?"menu":void 0,"aria-expanded":b?l:void 0,disabled:a.disabled,className:w,tabIndex:a.disabled||v!==y?-1:0,...x,children:[(be(a.before)||a.offset)&&e("span",{className:C(_i.ContextMenuRow__before,m?.before),children:a.before}),e("span",{className:C(_i.ContextMenuRow__label,m?.label),children:a.label}),!b&&be(a.hint)&&e("span",{className:C(_i.ContextMenuRow__hint,m?.hint),children:a.hint}),b&&e(E,{className:C(_i.ContextMenuRow__chevron,_i[`ContextMenuRow__chevron_${f}`],{[_i.ContextMenuRow__chevron_expanded]:l},m?.chevron)})]})});pi.displayName="ContextMenuRow";const fi=n=>{const{item:r,open:o,onOpenChange:a,onClick:i,onRowMouseEnter:l,onRowMouseLeave:c,onPanelMouseEnter:s,onPanelMouseLeave:d,onRowFocus:f,children:m}=n,{innerClassNames:v}=Za(),h=va(),g=u([]),[b,x]=p(null),{refs:w,floatingStyles:S,context:T}=Ua({nodeId:h,open:o,onOpenChange:a,placement:"right-start",strategy:"fixed",middleware:[Vo(16),Ko({fallbackPlacements:["left-start"],padding:8}),Wo({padding:8})],whileElementsMounted:Bo}),N=qa(T,{listRef:g,activeIndex:b,onNavigate:x,nested:!0}),{getFloatingProps:I,getItemProps:E,getReferenceProps:R}=Ha([N]),k=_(()=>({activeIndex:b,getItemProps:E}),[b,E]),A=R().onKeyDown;return t(ha,{id:h,children:[e(pi,{ref:w.setReference,item:r,expanded:o,onClick:i,onMouseEnter:()=>{r.disabled||l(r.id)},onMouseLeave:c,onFocus:f,onSubmenuKeyDown:A}),o&&"undefined"!=typeof document&&y(e(Ja.Provider,{value:k,children:e(di,{ref:w.setFloating,style:S,className:C(v?.content),...I({onMouseEnter:s,onMouseLeave:d}),children:e(Go,{elementsRef:g,children:m})})}),document.body)]})};fi.displayName="ContextMenuSubmenu";var mi="ContextMenuList__I1T",vi="ContextMenuList_nested__dnE",hi="ContextMenuList__accordion__RaX",gi="ContextMenuList__accordion_expanded__uiY",yi="ContextMenuList__accordionContent__8Ka";const bi=({items:n,nested:r=!1})=>{const{mode:o,close:a,innerClassNames:i}=Za(),[l,c]=p(null),s=u(void 0),_=u(void 0),[f,h]=p([]);d(()=>()=>{window.clearTimeout(s.current),window.clearTimeout(_.current)},[]);const g=m(e=>{window.clearTimeout(_.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{c(e)},100)},[]),y=m(()=>{window.clearTimeout(s.current),_.current=window.setTimeout(()=>{c(null)},300)},[]),b=m(()=>{window.clearTimeout(_.current)},[]),x=m(e=>{window.clearTimeout(s.current),window.clearTimeout(_.current),c(e)},[]),w=m(e=>{c(t=>t===e?null:t)},[]),S=m(e=>()=>{c(t=>t&&t!==e?null:t)},[]),T=m(e=>{h(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),N=m(e=>t=>{e.onClick?.(t),a()},[a]),I=m(e=>t=>{e.onClick?.(t),"mobile"!==o?(window.clearTimeout(s.current),window.clearTimeout(_.current),c(t=>t===e.id?null:e.id)):T(e.id)},[o,T]);return e("div",{role:"none",className:C(mi,{[vi]:r},i?.list),children:n.map((n,r)=>{const a=void 0!==n.items,c=Boolean(n.divider)&&r>0&&e(ri,{className:C(i?.divider)});if(a&&"desktop"===o)return t(v,{children:[c,e(fi,{item:n,open:l===n.id,onClick:I(n),onOpenChange:e=>{e?x(n.id):w(n.id)},onRowMouseEnter:g,onRowMouseLeave:y,onPanelMouseEnter:b,onPanelMouseLeave:y,onRowFocus:S(n.id),children:e(bi,{items:n.items})})]},n.id);const s=a&&"mobile"===o,u=s&&f.includes(n.id);return t(v,{children:[c,e(pi,{item:n,expanded:u,onClick:a?I(n):N(n),onFocus:"desktop"===o?S(n.id):void 0}),s&&e("div",{role:"none",className:C(hi,{[gi]:u},i?.accordion),children:e("div",{className:yi,children:e(bi,{items:n.items,nested:!0})})})]},n.id)})})};bi.displayName="ContextMenuList";const Ci=o((n,o)=>{const{items:a,actionBar:i,children:l,className:c,openOn:s="click",mode:f="auto",placement:v="bottom-start",open:h,defaultOpen:g=!1,onOpenChange:b,asChild:x=!1,innerClassNames:w}=n,[S,T]=p(g),N=void 0!==h,I=N?Boolean(h):S,E=(e=>{const[t,n]=p(ti);return d(()=>{if("auto"!==e||"undefined"==typeof window||"function"!=typeof window.matchMedia)return;const t=window.matchMedia("(pointer: coarse)"),r=e=>{n(e.matches)};return n(t.matches),t.addEventListener("change",r),()=>{t.removeEventListener("change",r)}},[e]),"auto"!==e?e:t?"mobile":"desktop"})(f),R=va(),k=m(e=>{N||T(e),b?.(e)},[N,b]),{refs:A,floatingStyles:M,context:B}=Ua({nodeId:R,open:I,onOpenChange:k,placement:v,strategy:"fixed",middleware:[Vo(4),Ko({padding:8}),Wo({padding:8})],whileElementsMounted:Bo}),L=_(()=>(e=>Array.isArray(e)?e:[e])(s),[s]),P=La(B,{enabled:L.includes("click"),toggle:!0}),O=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:a,events:i,elements:l}=e,{enabled:c=!0,delay:s=0,handleClose:u=null,mouseOnly:d=!1,restMs:_=0,move:p=!0}=t,f=ma(),m=fa(),v=Jr(u),h=Jr(s),g=Jr(n),y=Jr(_),b=r.useRef(),C=r.useRef(-1),x=r.useRef(),w=r.useRef(-1),S=r.useRef(!0),T=r.useRef(!1),N=r.useRef(()=>{}),I=r.useRef(!1),E=eo(()=>{var e;const t=null==(e=a.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t});r.useEffect(()=>{if(c)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(ba(C),ba(w),S.current=!0,I.current=!1)}},[c,i]),r.useEffect(()=>{if(!c)return;if(!v.current)return;if(!n)return;function e(e){E()&&o(!1,e,"hover")}const t=Vr(l.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[l.floating,n,o,c,v,E]);const R=r.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=xa(h.current,"close",b.current);r&&!x.current?(ba(C),C.current=window.setTimeout(()=>o(!1,e,n),r)):t&&(ba(C),o(!1,e,n))},[h,o]),k=eo(()=>{N.current(),x.current=void 0}),A=eo(()=>{if(T.current){const e=Vr(l.floating).body;e.style.pointerEvents="",e.removeAttribute(Ca),T.current=!1}}),M=eo(()=>!!a.current.openEvent&&["click","mousedown"].includes(a.current.openEvent.type));r.useEffect(()=>{if(c&&An(l.domReference)){const o=l.domReference,a=l.floating;return n&&o.addEventListener("mouseleave",r),p&&o.addEventListener("mousemove",e,{once:!0}),o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),a&&(a.addEventListener("mouseleave",r),a.addEventListener("mouseenter",i),a.addEventListener("mouseleave",s)),()=>{n&&o.removeEventListener("mouseleave",r),p&&o.removeEventListener("mousemove",e),o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),a&&(a.removeEventListener("mouseleave",r),a.removeEventListener("mouseenter",i),a.removeEventListener("mouseleave",s))}}function e(e){if(ba(C),S.current=!1,d&&!Gr(b.current)||wa(y.current)>0&&!xa(h.current,"open"))return;const t=xa(h.current,"open",b.current);t?C.current=window.setTimeout(()=>{g.current||o(!0,e,"hover")},t):n||o(!0,e,"hover")}function t(e){if(M())return void A();N.current();const t=Vr(l.floating);if(ba(w),I.current=!1,v.current&&a.current.floatingContext){n||ba(C),x.current=v.current({...a.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){A(),k(),M()||R(e,!0,"safe-polygon")}});const r=x.current;return t.addEventListener("mousemove",r),void(N.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!$r(l.floating,e.relatedTarget))&&R(e)}function r(e){M()||a.current.floatingContext&&(null==v.current||v.current({...a.current.floatingContext,tree:f,x:e.clientX,y:e.clientY,onClose(){A(),k(),M()||R(e)}})(e))}function i(){ba(C)}function s(e){M()||R(e,!1)}},[l,c,e,d,p,R,k,A,o,n,g,f,h,v,a,M,y]),Zr(()=>{var e;if(c&&n&&null!=(e=v.current)&&null!=(e=e.__options)&&e.blockPointerEvents&&E()){T.current=!0;const e=l.floating;if(An(l.domReference)&&e){var t;const n=Vr(l.floating).body;n.setAttribute(Ca,"");const r=l.domReference,o=null==f||null==(t=f.nodesRef.current.find(e=>e.id===m))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[c,n,m,l,f,v,E]),Zr(()=>{n||(b.current=void 0,I.current=!1,k(),A())},[n,k,A]),r.useEffect(()=>()=>{k(),ba(C),ba(w),A()},[c,l.domReference,k,A]);const B=r.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function r(){S.current||g.current||o(!0,t,"hover")}d&&!Gr(b.current)||n||0===wa(y.current)||I.current&&e.movementX**2+e.movementY**2<2||(ba(w),"touch"===b.current?r():(I.current=!0,w.current=window.setTimeout(r,wa(y.current))))}}},[d,o,n,g,y]);return r.useMemo(()=>c?{reference:B}:{},[c,B])}(B,{enabled:L.includes("hover"),delay:ei}),D=Fa(B),F=function(e,t){var n,o;void 0===t&&(t={});const{open:a,elements:i,floatingId:l}=e,{enabled:c=!0,role:s="dialog"}=t,u=ca(),d=(null==(n=i.domReference)?void 0:n.id)||u,_=r.useMemo(()=>{var e;return(null==(e=Kr(i.floating))?void 0:e.id)||l},[i.floating,l]),p=null!=(o=Xa.get(s))?o:s,f=null!=fa(),m=r.useMemo(()=>"tooltip"===p||"label"===s?{["aria-"+("label"===s?"labelledby":"describedby")]:a?_:void 0}:{"aria-expanded":a?"true":"false","aria-haspopup":"alertdialog"===p?"dialog":p,"aria-controls":a?_:void 0,..."listbox"===p&&{role:"combobox"},..."menu"===p&&{id:d},..."menu"===p&&f&&{role:"menuitem"},..."select"===s&&{"aria-autocomplete":"none"},..."combobox"===s&&{"aria-autocomplete":"list"}},[p,_,f,a,d,s]),v=r.useMemo(()=>{const e={id:_,...p&&{role:p}};return"tooltip"===p||"label"===s?e:{...e,..."menu"===p&&{"aria-labelledby":d}}},[p,_,d,s]),h=r.useCallback(e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:_+"-fui-option"}};switch(s){case"select":case"combobox":return{...r,"aria-selected":n}}return{}},[_,s]);return r.useMemo(()=>c?{reference:m,floating:v,item:h}:{},[c,m,v,h])}(B,{role:"menu"}),z=u([]),[U,$]=p(null),H=qa(B,{listRef:z,activeIndex:U,onNavigate:$}),{getReferenceProps:j,getFloatingProps:V,getItemProps:W}=Ha([P,O,D,F,H]),K=_(()=>({activeIndex:U,getItemProps:W}),[U,W]),Y=m(()=>{k(!1)},[k]),q=u(!1);d(()=>{I?q.current=!0:q.current&&(q.current=!1,"undefined"!=typeof document&&document.activeElement===document.body&&A.domReference.current?.focus())},[I,A]);const X=_(()=>({mode:E,close:Y,innerClassNames:w}),[E,Y,w]);return t(ha,{id:R,children:[e(x?J:"span",{ref:xe(o,A.setReference),className:C(!x&&Qa,c,w?.trigger),tabIndex:x?void 0:0,...j(),children:l}),I&&"undefined"!=typeof document&&y(e(Ga.Provider,{value:X,children:t(di,{ref:A.setFloating,style:M,className:C(w?.content),...V({onKeyDown:e=>{"Tab"===e.key&&Y()}}),children:[i&&e(ci,{buttons:i}),e(Ja.Provider,{value:K,children:e(Go,{elementsRef:z,children:e(bi,{items:a})})})]})}),document.body)]})});Ci.displayName="ContextMenuInner";const xi=o((t,n)=>e(ga,{children:e(Ci,{...t,ref:n})}));xi.displayName="ContextMenu";const wi=e=>{switch(e){case"xsmall":return 16;case"small":case"medium":return 20;case"large":return 24}},Si=e=>{switch(e){case"primary":case"destructive":case"overlay":return"contrast-static";case"secondary":case"ghost":return"primary";case"primary-contrast":case"secondary-contrast":return"primary-static"}};var Ti={IconButton:"IconButton__KCr",IconButton_loading:"IconButton_loading__RxW",IconButton__content:"IconButton__content__dCL",IconButton_disabled:"IconButton_disabled__SZj",IconButton_activeMode_ripple:"IconButton_activeMode_ripple__asi",IconButton_activeMode_highlight:"IconButton_activeMode_highlight__h15",IconButton_size_xsmall:"IconButton_size_xsmall__G5T",IconButton_size_small:"IconButton_size_small__e3f",IconButton_size_medium:"IconButton_size_medium__MQQ",IconButton_size_large:"IconButton_size_large__9oz",IconButton_variant_primary:"IconButton_variant_primary__-4n",IconButton_variant_secondary:"IconButton_variant_secondary__dFi",IconButton_variant_ghost:"IconButton_variant_ghost__jvE","IconButton_variant_primary-contrast":"IconButton_variant_primary-contrast__O-T","IconButton_variant_secondary-contrast":"IconButton_variant_secondary-contrast__uNH",IconButton_variant_overlay:"IconButton_variant_overlay__vJc",IconButton_variant_destructive:"IconButton_variant_destructive__9rk",IconButton__spinnerContainer:"IconButton__spinnerContainer__9--",IconButton__ripple:"IconButton__ripple__l8M"};const Ni=o((n,r)=>{const{children:o,className:a,disabled:i,innerClassNames:l,loading:c,onClick:s,asChild:u=!1,size:d="medium",variant:_="primary",...p}=n,f="button",m=u?J:f,v=Oe(),h=Re({asChild:u,children:o,disabled:i,loading:c,onClick:s,rootElement:f}),g=i||c,y="android"===v,b=C(Ti.IconButton,Ti[`IconButton_variant_${_}`],Ti[`IconButton_size_${d}`],{[Ti.IconButton_loading]:c,[Ti.IconButton_disabled]:i,[Ti.IconButton_activeMode_highlight]:!g&&!y,[Ti.IconButton_activeMode_ripple]:!g&&y},a);return t(m,{ref:r,className:b,...h,...p,children:[c&&e("span",{className:C(Ti.IconButton__spinnerContainer,l?.spinnerContainer),children:e(Xt,{className:C(l?.spinner),size:wi(d),appearance:Si(_)})}),e(te,{children:ye({options:{asChild:u,children:o},content:t=>e("span",{className:C(Ti.IconButton__content,l?.content),children:t},"subtree-container")})}),y&&!g&&e(Ft,{className:Ti.IconButton__ripple})]})});Ni.displayName="IconButton";var Ii={Input:"Input__A3w",Input_disabled:"Input_disabled__mpt",Input__iconBefore:"Input__iconBefore__gxx",Input__iconAfter:"Input__iconAfter__jL1",Input_size_medium:"Input_size_medium__EjC",Input__input:"Input__input__gy5",Input_size_large:"Input_size_large__8OF",Input_mode_default:"Input_mode_default__ncX",Input_mode_contrast:"Input_mode_contrast__EIY",Input__body:"Input__body__sVJ",Input__clearButton:"Input__clearButton__nKe",Input__count:"Input__count__zAz",Input__hint:"Input__hint__dE5",Input__hint_disabled:"Input__hint_disabled__E55"};const Ei=o((n,r)=>{const{className:o,innerClassNames:a,withClearButton:i,iconBefore:l,iconAfter:c,size:s="large",mode:u="default",count:d,hint:_,...p}=n,f=C(Ii.Input,Ii[`Input_mode_${u}`],Ii[`Input_size_${s}`],{[Ii.Input_disabled]:p.disabled},o);return t("div",{className:C(a?.container),children:[t("label",{className:f,children:[be(l)&&e("div",{className:C(Ii.Input__iconBefore,a?.iconBefore),children:l}),e(xt,{ref:r,className:C(Ii.Input__body,a?.body),withClearButton:i,count:d,innerClassNames:{input:C(Ii.Input__input,a?.input),clearButton:C(Ii.Input__clearButton,a?.clearButton),count:C(Ii.Input__count,a?.count)},...p}),be(c)&&e("div",{className:C(Ii.Input__iconAfter,a?.iconAfter),children:c})]}),be(_)&&e("div",{className:C(Ii.Input__hint,{[Ii.Input__hint_disabled]:p.disabled},a?.hint),children:_})]})});Ei.displayName="Input";const Ri=o((t,n)=>{const{children:r,className:o,colorScheme:a,platform:i=(Ce()?"ios":"android"),resetBody:l=!1}=t,c=ze({listenChanges:!a}),s=a??c,u=_(()=>({colorScheme:s,platform:i}),[s,i]);d(()=>{if(l)return document.body.classList.add(si.MaxUI_resetBody),()=>{document.body.classList.remove(si.MaxUI_resetBody)}},[l]);const p=C(si.MaxUI,si[`MaxUI_colorScheme_${s}`],si[`MaxUI_platform_${i}`],o);return e(Ae.Provider,{value:u,children:e("div",{ref:n,className:p,children:r})})});Ri.displayName="MaxUI";var ki="Radio__MT3",Ai="Radio__input__QY4",Mi="Radio__control__T5I",Bi="Radio_animated__XvV";const Li=o((n,r)=>{const{className:o,...a}=n,i=C(ki,Bi,o);return t("span",{className:i,children:[e("input",{...a,ref:r,type:"radio",className:Ai}),e("span",{className:Mi})]})});Li.displayName="Radio";var Pi="segmented__iN0",Oi="segment__-Te",Di="segment_active__85D";const Fi=({items:t,activeItem:n,onClick:r,innerClassNames:o})=>{const a=e=>n=>{const o=t.length-1;let a;switch(n.key){case"ArrowRight":case"ArrowDown":a=e===o?0:e+1;break;case"ArrowLeft":case"ArrowUp":a=0===e?o:e-1;break;case"Home":a=0;break;case"End":a=o;break;case"Enter":case" ":return n.preventDefault(),void r(t[e].id);default:return}n.preventDefault(),r(t[a].id);const i=n.currentTarget.parentElement?.children[a];i?.focus(),i?.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})},i=e=>e===n;return e("div",{className:C(Pi,o?.list),role:"tablist",children:t.map((t,n)=>{return e("button",{role:"tab",tabIndex:i(t.id)?0:-1,"aria-selected":i(t.id),onKeyDown:a(n),className:C(Oi,o?.item,{[Di]:i(t.id)}),onClick:(l=t.id,e=>{r(l),e.currentTarget.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})}),type:"button",children:t.title},t.id);var l})})},zi="Ничего не найдено",Ui="Поиск",$i=[],Hi=e=>"string"==typeof e||"number"==typeof e?String(e):"",ji=(e,t)=>(e=>void 0!==e.searchText?e.searchText:`${Hi(e.label)} ${Hi(e.hint)}`.trim()||e.value)(e).toLowerCase().includes(t.trim().toLowerCase()),Vi=(e,t,n)=>{for(let r=t+n;r>=0&&r<e.length;r+=n)if(!e[r].disabled)return r;return-1},Wi=a({multiple:!1,query:"",setQuery:we,isSelected:()=>!1,select:we,close:we,options:$i,listId:"",getOptionId:()=>"",activeIndex:null,setActiveIndex:we,onKeyDown:we,emptyText:zi,loading:!1}),Ki=()=>i(Wi);var Yi="SelectEmpty__sWw";const qi=o((t,n)=>{const{className:r,children:o,...a}=t,{emptyText:i,loading:l,innerClassNames:c}=Ki();return e("div",{ref:n,role:"status","aria-label":l?"Загрузка":void 0,className:C(Yi,l?c?.loading:c?.empty,r),...a,children:l?e(Xt,{size:20,"aria-hidden":!0}):o??i})});qi.displayName="SelectEmpty";var Xi="SelectOptionRow__sXi",Gi="SelectOptionRow_selected__W8R",Zi="SelectOptionRow_active__pZs",Ji="SelectOptionRow_disabled__Xx7",Qi="SelectOptionRow__before__-y2",el="SelectOptionRow__label__cwK",tl="SelectOptionRow__hint__ppH",nl="SelectOptionRow__check__dmb";const rl=o((n,r)=>{const{option:o,index:a,className:i,...l}=n,{multiple:c,isSelected:s,select:_,activeIndex:p,setActiveIndex:f,getOptionId:m,innerClassNames:v}=Ki(),h=u(null),g=u(!1),y=s(o.value),b=void 0!==a&&p===a;d(()=>{b&&!g.current&&h.current?.scrollIntoView({block:"nearest"})},[b]);const x=C(Xi,{[Gi]:y,[Zi]:b,[Ji]:o.disabled},v?.option,i);return t("div",{ref:xe(h,r),id:void 0===a?void 0:m(a),role:"option","aria-selected":y,"aria-disabled":o.disabled||void 0,className:x,onMouseDown:e=>{e.preventDefault()},onMouseMove:()=>{g.current=!0,o.disabled||void 0===a||p===a||f(a)},onMouseLeave:()=>{g.current=!1},onClick:()=>{o.disabled||_(o.value,o)},...l,children:[be(o.before)&&e("span",{className:C(Qi,v?.optionBefore),children:o.before}),e("span",{className:C(el,v?.optionLabel),children:o.label}),be(o.hint)&&e("span",{className:C(tl,v?.optionHint),children:o.hint}),c&&e("span",{className:C(nl,v?.optionCheck),children:y&&e(T,{})})]})});rl.displayName="SelectOptionRow";var ol="SelectSearch__x-k",al="SelectSearch__icon__dxs",il="SelectSearch__input__S13",ll="SelectSearch__clearButton__A9A";const cl=o((n,r)=>{const{className:o,placeholder:a,...i}=n,{query:l,setQuery:c,listId:s,activeIndex:_,getOptionId:p,onKeyDown:f,innerClassNames:m}=Ki(),v=u(null);return d(()=>{window.matchMedia?.("(pointer: coarse)").matches||v.current?.focus({preventScroll:!0})},[]),t("div",{className:C(ol,o,m?.search),children:[e(L,{className:al}),e("input",{ref:xe(v,r),type:"text",role:"searchbox",autoComplete:"off",spellCheck:!1,"aria-autocomplete":"list","aria-label":a,"aria-controls":s,"aria-activedescendant":null===_?void 0:p(_),className:il,placeholder:a,value:l,onChange:e=>{c(e.currentTarget.value)},onKeyDown:f,...i}),""!==l&&e(pe,{type:"button",tabIndex:-1,className:ll,"aria-label":"Очистить поиск",onMouseDown:e=>{e.preventDefault()},onClick:()=>{c("")},children:e(A,{})})]})});cl.displayName="SelectSearch";var sl={SelectContent:"SelectContent__VfR",SelectContent_width_trigger:"SelectContent_width_trigger__JeH",SelectContent_width_auto:"SelectContent_width_auto__7XK",SelectContent__header:"SelectContent__header__1jc",SelectContent__body:"SelectContent__body__2jh"};const ul=o((n,r)=>{const{children:o,className:a,header:i,dropdownWidth:l="trigger",innerClassNames:c,...s}=n,u=(()=>{const{platform:e,colorScheme:t}=Me();return C(si[`MaxUI_colorScheme_${t}`],si[`MaxUI_platform_${e}`])})();return t("div",{ref:r,className:C(u,sl.SelectContent,sl[`SelectContent_width_${l}`],a),...s,children:[i&&e("div",{className:C(sl.SelectContent__header,c?.header),children:i}),e("div",{className:C(sl.SelectContent__body,c?.body),children:o})]})});ul.displayName="SelectContent";var dl={SelectField:"SelectField__vYH",SelectField_disabled:"SelectField_disabled__Zd-",SelectField__iconBefore:"SelectField__iconBefore__jb0",SelectField__chevron:"SelectField__chevron__Co2",SelectField__value:"SelectField__value__jnC",SelectField_size_medium:"SelectField_size_medium__Ai4",SelectField_size_large:"SelectField_size_large__SLs",SelectField_mode_default:"SelectField_mode_default__Hnl",SelectField_mode_contrast:"SelectField_mode_contrast__VUx",SelectField__value_placeholder:"SelectField__value_placeholder__bR7",SelectField__counter:"SelectField__counter__8-T",SelectField__clearButton:"SelectField__clearButton__p7f",SelectField_open:"SelectField_open__yhN",SelectField__chevron_open:"SelectField__chevron_open__xtc"};const _l=o((n,r)=>{const{className:o,mode:a,size:i,open:l,disabled:c,iconBefore:s,valueContent:u,placeholder:d,hiddenCount:_=0,valueId:p,showClearButton:f,onClear:m,innerClassNames:v,...h}=n,g=be(u),y=C(dl.SelectField,dl[`SelectField_mode_${a}`],dl[`SelectField_size_${i}`],{[dl.SelectField_disabled]:c,[dl.SelectField_open]:l},v?.field,o);return t("div",{ref:r,role:"combobox","aria-haspopup":"listbox","aria-expanded":l,"aria-disabled":c||void 0,tabIndex:c?-1:0,className:y,...h,children:[be(s)&&e("div",{className:C(dl.SelectField__iconBefore,v?.iconBefore),children:s}),e(Rt,{id:p,className:C(dl.SelectField__value,{[dl.SelectField__value_placeholder]:!g},v?.value),children:g?u:d}),_>0&&e("span",{className:C(dl.SelectField__counter,v?.counter),children:`+${_}`}),f&&!c&&e(pe,{type:"button",tabIndex:-1,className:C(dl.SelectField__clearButton,v?.clearButton),"aria-label":"Очистить",onMouseDown:e=>{e.preventDefault()},onClick:e=>{e.stopPropagation(),m()},children:e(A,{})}),e(E,{"aria-hidden":!0,className:C(dl.SelectField__chevron,{[dl.SelectField__chevron_open]:l},v?.chevron)})]})});_l.displayName="SelectField";var pl="SelectOptions__0k6";const fl=()=>{const{options:r,listId:o,multiple:a,loading:i,listLabel:l,innerClassNames:c}=Ki();return t(n,{children:[e("div",{id:o,role:"listbox",...l,"aria-multiselectable":a||void 0,"aria-busy":i||void 0,className:C(pl,c?.list),children:r.map((t,n)=>e(rl,{option:t,index:n},t.value))}),(0===r.length||i)&&e(qi,{})]})};fl.displayName="SelectOptions";var ml="Select__Yce",vl="Select__hint__K4l",hl="Select__hint_disabled__k6E";const gl=o((n,r)=>{const{options:o=$i,customDropdownMenu:a,selectedOptions:i,searchable:l=!1,searchPlaceholder:c=Ui,filterOption:s,onSearchChange:f,loading:v=!1,emptyText:g=zi,placeholder:y,disabled:b=!1,mode:x="default",size:w="large",hint:S,iconBefore:T,withClearButton:N=!1,name:I,open:E,defaultOpen:R=!1,onOpenChange:k,placement:A="bottom-start",dropdownWidth:M="trigger",innerClassNames:B,multiple:L,value:P,defaultValue:O,onValueChange:D,onKeyDown:F,onFocus:z,onBlur:U,"aria-label":$,"aria-labelledby":H,"aria-describedby":j,...V}=n,W=Boolean(L),K=h(),Y=`${K}-listbox`,q=`${K}-value`,X=`${K}-hint`,G=V.id??`${K}-field`,Z=m(e=>`${K}-option-${e}`,[K]),J=void 0!==P,[Q,ee]=p(O),te=J?P:Q,ne=_(()=>{return void 0===(e=te)||""===e?[]:Array.isArray(e)?e:[e];var e},[te]),re=u(new Map);for(const e of re.current.keys())ne.includes(e)||re.current.delete(e);for(const e of o)re.current.set(e.value,e);if(i)for(const e of i)re.current.set(e.value,e);const oe=e=>e.map(e=>re.current.get(e)??{value:e,label:e}),[ae,ie]=p(R),le=void 0!==E,ce=!b&&(le?Boolean(E):ae),se=m(e=>{le||ie(e),k?.(e)},[le,k]);d(()=>{b&&(le?E:ae)&&se(!1)},[b]);const[ue,de]=p(""),[_e,pe]=p(null),fe=m(e=>{de(e),f?.(e)},[f]),me=_(()=>void 0!==a?$i:l&&""!==ue.trim()?s?o.filter(e=>s(e,ue)):f?o:o.filter(e=>ji(e,ue)):o,[a,l,ue,o,s,f]),ve=me.map(e=>e.value).join("\0"),he=null!==_e&&me[_e]&&!me[_e].disabled?_e:null,{refs:ge,floatingStyles:ye,context:Ce}=Ua({open:ce,onOpenChange:se,placement:A,strategy:"fixed",middleware:[Vo(4),Ko({padding:8}),Yo({padding:8,apply({rects:e,availableHeight:t,elements:n}){n.floating.style.setProperty("--MaxUi-Select_trigger-width",`${e.reference.width}px`),n.floating.style.setProperty("--MaxUi-Select_available-height",`${t}px`)}}),Wo({padding:8})],whileElementsMounted:Bo}),we=La(Ce,{enabled:!b,toggle:!0,keyboardHandlers:!1}),Se=Fa(Ce),{getReferenceProps:Te,getFloatingProps:Ne}=Ha([we,Se]),Ie=m(()=>{ge.domReference.current?.focus()},[ge]),Ee=m(e=>{se(!1),e&&Ie()},[se,Ie]),Re=u(!1);d(()=>{ce?Re.current=!0:(pe(null),""!==ue&&(de(""),f?.("")),Re.current&&(Re.current=!1,document.activeElement===document.body&&Ie()))},[ce]),d(()=>{if(!ce)return;const e=me.findIndex(e=>!e.disabled&&ne.includes(e.value));pe(-1===e?null:e)},[ce]),d(()=>{if(!ce||""===ue)return;const e=Vi(me,-1,1);pe(-1===e?null:e)},[ue,ve]);const ke=e=>{const t=W?e:e[0]??"";J||ee(t),W?D?.(e,oe(e)):D?.(t,oe(e)[0]??null)},Ae=(e,t)=>{t&&re.current.set(e,t),W?ke(ne.includes(e)?ne.filter(t=>t!==e):[...ne,e]):(ne[0]!==e&&ke([e]),Ee(!0))},Me=e=>ne.includes(e),Be=N&&ne.length>0,Le=()=>{ke([])},Pe=(e=>{const{open:t,options:n,activeIndex:r,setActiveIndex:o,onSelectIndex:a,onOpen:i,onClose:l,onClear:c}=e;return m(e=>{if(e.target!==e.currentTarget)return;if(e.nativeEvent.isComposing)return;const s=e.currentTarget instanceof HTMLInputElement;if(!t)return"ArrowDown"===e.key||"ArrowUp"===e.key||"Enter"===e.key||" "===e.key?(e.preventDefault(),void i()):void("Backspace"!==e.key&&"Delete"!==e.key||!c||(e.preventDefault(),c()));const u=e=>{-1!==e&&o(e)};switch(e.key){case"ArrowDown":e.preventDefault(),u(Vi(n,r??-1,1));break;case"ArrowUp":e.preventDefault(),u(Vi(n,r??n.length,-1));break;case"Home":if(s)break;e.preventDefault(),u(Vi(n,-1,1));break;case"End":if(s)break;e.preventDefault(),u(Vi(n,n.length,-1));break;case"Enter":case" ":{if(" "===e.key&&s)break;const t=null===r?void 0:n[r];null!==r&&t&&!t.disabled?(e.preventDefault(),a(r)):s||(e.preventDefault(),l(!0));break}case"Tab":s&&e.preventDefault(),l(s)}},[t,n,r,o,a,i,l,c])})({open:ce,options:me,activeIndex:he,setActiveIndex:pe,onSelectIndex:e=>{Ae(me[e].value,me[e])},onOpen:()=>{se(!0)},onClose:Ee,onClear:Be?Le:void 0}),Oe=e=>e instanceof Node&&Boolean(ge.floating.current?.contains(e)),De=()=>{Ee(!0)},Fe={multiple:W,query:ue,setQuery:fe,isSelected:Me,select:Ae,close:De,options:me,listId:Y,getOptionId:Z,activeIndex:he,setActiveIndex:pe,onKeyDown:Pe,emptyText:g,loading:v,listLabel:H?{"aria-labelledby":H}:{"aria-label":$??("string"==typeof y?y:void 0)},innerClassNames:B},ze={query:ue,multiple:W,isSelected:Me,select:Ae,close:De},[Ue]=oe(ne),$e=ne.length>0?Ue?.label??ne[0]:void 0,He=void 0!==a,je=l&&!He,Ve=He?"function"==typeof a?a(ze):a:e(fl,{}),We=ce&&!je&&null!==he?Z(he):void 0,Ke=H?`${H} ${q}`:$?`${G} ${q}`:q,Ye=[j,be(S)?X:void 0].filter(Boolean).join(" ")||void 0;return t("div",{className:C(ml,B?.container),children:[e(_l,{ref:xe(r,ge.setReference),id:G,valueId:q,"aria-label":$,"aria-labelledby":Ke,"aria-describedby":Ye,mode:x,size:w,open:ce,disabled:b,iconBefore:T??(W?void 0:Ue?.before),valueContent:$e,placeholder:y,hiddenCount:W?Math.max(ne.length-1,0):0,showClearButton:Be,onClear:Le,innerClassNames:B,"aria-controls":ce&&!He?Y:void 0,"aria-activedescendant":We,...Te({...V,onKeyDown:e=>{F?.(e),e.defaultPrevented||Pe(e)},onFocus:e=>{Oe(e.relatedTarget)||z?.(e)},onBlur:e=>{Oe(e.relatedTarget)||U?.(e)}})}),be(S)&&e("div",{id:X,className:C(vl,{[hl]:b},B?.hint),children:S}),I&&!b&&ne.map(t=>e("input",{type:"hidden",name:I,value:t},t)),ce&&e(ka,{children:e(Wi.Provider,{value:Fe,children:e(ul,{ref:ge.setFloating,style:ye,dropdownWidth:M,className:C(B?.content),header:je?e(cl,{placeholder:c}):void 0,...Ne({onBlur:e=>{const t=e.relatedTarget,n=t instanceof Node&&Boolean(ge.domReference.current?.contains(t));Oe(t)||n||U?.(e)},onMouseDown:e=>{e.target.closest("input, textarea, select, [contenteditable]")||e.preventDefault()}}),children:Ve})})})]})});gl.displayName="Select";var yl={viewport:"viewport__DPJ",topLeft:"topLeft__e-4",topCenter:"topCenter__WCQ",topRight:"topRight__Kqq",bottomLeft:"bottomLeft__-Jr",bottomCenter:"bottomCenter__6BC",bottomRight:"bottomRight__18f",SnackbarItem:"SnackbarItem__wdB",maxSnackbarEnter:"maxSnackbarEnter__qbP","SnackbarItem_placement_top-left":"SnackbarItem_placement_top-left__4gd","SnackbarItem_placement_top-center":"SnackbarItem_placement_top-center__1Ip","SnackbarItem_placement_top-right":"SnackbarItem_placement_top-right__Lx-","SnackbarItem_placement_bottom-left":"SnackbarItem_placement_bottom-left__D1r","SnackbarItem_placement_bottom-center":"SnackbarItem_placement_bottom-center__xy4","SnackbarItem_placement_bottom-right":"SnackbarItem_placement_bottom-right__8AG",SnackbarItem_leaving:"SnackbarItem_leaving__OwP",maxSnackbarExit:"maxSnackbarExit__YWk",before:"before__hVC",after:"after__1BT",textContainer:"textContainer__HNM",text:"text__6Z1",caption:"caption__K-X"};const bl=o((n,r)=>{const{id:o,caption:a,before:i,after:l,text:c,placement:s,leaving:u,onExited:d,..._}=n,p=m(()=>{u&&d?.(o)},[u,d,o]),f=C(yl.SnackbarItem,yl[`SnackbarItem_placement_${s}`],u&&yl.SnackbarItem_leaving);return t("div",{ref:r,className:f,role:"status","data-placement":s,"data-leaving":u||void 0,onAnimationEnd:p,onClick:()=>d?.(o),..._,children:[be(i)&&e("div",{className:yl.before,children:i}),(!!c||!!a)&&t("div",{className:yl.textContainer,children:[!!c&&e(ct.Body,{className:yl.text,variant:"large",children:c}),!!a&&e(ct.Body,{className:yl.caption,variant:"small",children:a})]}),be(l)&&e("div",{className:yl.after,children:l})]})});bl.displayName="SnackbarItem";const Cl=["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"],xl={"top-left":yl.topLeft,"top-center":yl.topCenter,"top-right":yl.topRight,"bottom-left":yl.bottomLeft,"bottom-center":yl.bottomCenter,"bottom-right":yl.bottomRight},wl=e=>{if(void 0!==e)return"number"==typeof e?`${e}px`:e},Sl=(e,t)=>{if(void 0!==t)return e.startsWith("top-")?{"--snackbar-top-offset":t}:{"--snackbar-bottom-offset":t}};function Tl({queue:t,onExited:r}){const o=(e=>Cl.flatMap(t=>{const n=new Map;for(const r of e){if(r.placement!==t)continue;const e=wl(r.offset),o=`${t}:${void 0===e?"default":`offset:${e}`}`,a=n.get(o);a?a.items.push(r):n.set(o,{key:o,items:[r],offsetValue:e,placement:t})}return[...n.values()]}))(t);return e(n,{children:o.map(({key:t,items:n,offsetValue:o,placement:a})=>e("div",{className:C(yl.viewport,xl[a]),"aria-label":`Уведомления: ${a}`,"aria-live":"polite","data-offset":o,"data-placement":a,role:"region",style:Sl(a,o),children:n.map(t=>e(bl,{...t,onExited:r},t.id))},t))})}let Nl=0;const Il=()=>"function"==typeof globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():(Nl+=1,`snackbar-${Date.now()}-${Nl}`);function El({children:n,queueSize:r=3,createId:o=Il,defaultPlacement:a="bottom-center"}){const[i,l]=p([]),c=u(new Map),s=m(e=>{const t=e.id??o();l(n=>n.some(e=>e.id===t)?n:[...n,{...e,id:t,placement:e.placement??a,leaving:!1}])},[o,a]),f=m(e=>{const t=c.current.get(e);t&&clearTimeout(t),c.current.delete(e),l(t=>t.map(t=>t.id===e?{...t,leaving:!0}:t))},[]),v=m(()=>{for(const e of c.current.values())clearTimeout(e);c.current.clear(),l([])},[]),h=m(e=>{const t=c.current.get(e);t&&clearTimeout(t),c.current.delete(e),l(t=>t.filter(t=>t.id!==e))},[]),g=_(()=>{const e=new Map,t=Math.max(0,r);return i.filter(n=>{if(n.leaving)return!0;const r=e.get(n.placement)??0;return!(r>=t)&&(e.set(n.placement,r+1),!0)})},[i,r]);d(()=>{const e=new Set(i.map(e=>e.id));for(const[t,n]of c.current)e.has(t)||(clearTimeout(n),c.current.delete(t));for(const e of g){if(e.leaving)continue;if(c.current.has(e.id))continue;const t=setTimeout(()=>f(e.id),e.duration??5e3);c.current.set(e.id,t)}},[f,i,g]),d(()=>()=>{for(const e of c.current.values())clearTimeout(e);c.current.clear()},[]);const y=_(()=>({showSnackbar:s,closeSnackbar:f,clearSnackbars:v}),[f,s,v]);return t(De.Provider,{value:y,children:[n,e(Tl,{queue:g,onExited:h})]})}var Rl="label__ddl",kl="positive__pv1",Al="warning__UrM",Ml="negative__EtT",Bl="neutral__WIV";const Ll=o(({text:t,status:n},r)=>e(ct.Title,{ref:r,className:C(Rl,{[kl]:"positive"===n,[Al]:"warning"===n,[Ml]:"negative"===n,[Bl]:"neutral"===n}),variant:"medium-strong",children:t}));Ll.displayName="StatusBadge";var Pl="Steps__S-N",Ol="Steps__step__i-Y",Dl="Steps__step_active__-Ee";const Fl=o((t,n)=>{const{className:r,count:o,progress:a,...i}=t;return e("div",{ref:n,className:C(Pl,r),...i,children:Array.from({length:o},(t,n)=>e("div",{className:C(Ol,{[Dl]:n<a})},n))})});Fl.displayName="Steps";var zl={Switch:"Switch__-vj",Switch__toggle:"Switch__toggle__WU2",Switch__thumb:"Switch__thumb__jlX",Switch__input:"Switch__input__EDr",Switch_platform_ios:"Switch_platform_ios__B-C",Switch_platform_android:"Switch_platform_android__72T"};const Ul=o((n,r)=>{const{className:o,...a}=n,i=Oe(),l=C(zl.Switch,zl[`Switch_platform_${i}`],o);return t("span",{className:l,children:[e("input",{ref:r,type:"checkbox",role:"switch",className:zl.Switch__input,...a}),e("span",{className:zl.Switch__toggle,children:e("span",{className:zl.Switch__thumb})})]})});Ul.displayName="Switch";var $l="tabs__z-C",Hl="tab__LYq",jl="tab__label__9Dq",Vl="tab_active__6Jq";const Wl=({items:n,activeItem:r,onCancel:o,onClick:a,innerClassNames:i})=>{const l=e=>t=>{t.stopPropagation(),o?.(e)},c=e=>t=>{const r=n.length-1;let o;switch(t.key){case"ArrowRight":case"ArrowDown":o=e===r?0:e+1;break;case"ArrowLeft":case"ArrowUp":o=0===e?r:e-1;break;case"Home":o=0;break;case"End":o=r;break;case"Enter":case" ":return t.preventDefault(),void a(n[e].id);default:return}t.preventDefault(),a(n[o].id);const i=t.currentTarget.parentElement?.children[o];i?.focus(),i?.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})},s=e=>e===r;return e("div",{className:C($l,i?.list),role:"tablist",children:n.map((n,r)=>{return t("div",{role:"tab",tabIndex:s(n.id)?0:-1,"aria-selected":s(n.id),onKeyDown:c(r),className:C(Hl,i?.item,{[Vl]:s(n.id)}),onClick:(u=n.id,e=>{a(u),e.currentTarget.scrollIntoView({inline:"nearest",block:"nearest",behavior:"smooth"})}),children:[t("button",{type:"button",tabIndex:-1,className:jl,children:[n.title,n.indicator&&e(Jt,{variant:s(n.id)?"primary":"mute",value:n.indicator,className:C(i?.indicator)})]}),!!o&&!n.indicator&&e(pe,{type:"button",tabIndex:-1,className:C(i?.closeButton),onClick:l(n.id),"aria-label":"Close",children:e(A,{})})]},n.id);var u})})};var Kl={Textarea:"Textarea__Sy6",Textarea_disabled:"Textarea_disabled__uY3",Textarea_mode_primary:"Textarea_mode_primary__E7l",Textarea_mode_secondary:"Textarea_mode_secondary__BYw",Textarea__textarea:"Textarea__textarea__Ok-"};const Yl=o((t,n)=>{const{className:r,innerClassNames:o,mode:a="primary",...i}=t,l=C(Kl.Textarea,Kl[`Textarea_mode_${a}`],{[Kl.Textarea_disabled]:i.disabled},r);return e("div",{className:l,children:e("textarea",{ref:n,className:C(Kl.Textarea__textarea,o?.textarea),...i})})});Yl.displayName="Textarea";export{Ye as Avatar,ht as BottomSheet,nn as Button,on as CellAction,ln as CellHeader,sn as CellInput,dn as CellList,pn as CellSimple,Tn as Checkbox,xt as ClearableInput,Tt as Container,xi as ContextMenu,Jt as Counter,Rt as EllipsisText,At as Flex,Bt as Grid,T as Icon16Check,E as Icon16Chevron,A as Icon16CloseIos,L as Icon16SearchOutline,F as Icon20CloseAndroid,$ as Icon20CloseFilled,j as Icon24CloseAndroid,Ni as IconButton,Ei as Input,Ri as MaxUI,Ae as MaxUIContext,Pt as Panel,Li as Radio,Ft as Ripple,Fi as Segmented,gl as Select,qi as SelectEmpty,rl as SelectOptionRow,cl as SelectSearch,J as Slot,te as Slottable,Tl as SnackbarContainer,bl as SnackbarItem,El as SnackbarProvider,Xt as Spinner,Ll as StatusBadge,Fl as Steps,pe as SvgButton,Ul as Switch,Wl as Tabs,Wt as Tappable,Yl as Textarea,ct as Typography,ye as getSubtree,be as hasReactNode,xe as mergeRefs,Me as useAppearance,Re as useButtonLikeProps,ke as useCallbackRef,Be as useColorScheme,Le as useDrag,Pe as useImageLoadingStatus,Oe as usePlatform,Ki as useSelect,Fe as useSnackbar,ze as useSystemColorScheme};
2
6
  //# sourceMappingURL=index.js.map