@g4rcez/components 3.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/dist/ai/SKILL.md +266 -0
  2. package/dist/ai/docs/Alert.md +167 -0
  3. package/dist/ai/docs/AnimatedList.md +205 -0
  4. package/dist/ai/docs/Autocomplete.md +225 -0
  5. package/dist/ai/docs/Button.md +182 -0
  6. package/dist/ai/docs/Calendar.md +219 -0
  7. package/dist/ai/docs/Card.md +174 -0
  8. package/dist/ai/docs/Checkbox.md +199 -0
  9. package/dist/ai/docs/CommandPalette.md +293 -0
  10. package/dist/ai/docs/DatePicker.md +171 -0
  11. package/dist/ai/docs/Dropdown.md +223 -0
  12. package/dist/ai/docs/Empty.md +163 -0
  13. package/dist/ai/docs/Expand.md +143 -0
  14. package/dist/ai/docs/FileUpload.md +225 -0
  15. package/dist/ai/docs/Form.md +107 -0
  16. package/dist/ai/docs/FormReset.md +117 -0
  17. package/dist/ai/docs/Heading.md +88 -0
  18. package/dist/ai/docs/Input.md +237 -0
  19. package/dist/ai/docs/InputField.md +170 -0
  20. package/dist/ai/docs/List.md +205 -0
  21. package/dist/ai/docs/Menu.md +166 -0
  22. package/dist/ai/docs/Modal.md +280 -0
  23. package/dist/ai/docs/MultiSelect.md +196 -0
  24. package/dist/ai/docs/Notifications.md +231 -0
  25. package/dist/ai/docs/PageCalendar.md +271 -0
  26. package/dist/ai/docs/Polymorph.md +159 -0
  27. package/dist/ai/docs/Progress.md +145 -0
  28. package/dist/ai/docs/Radiobox.md +128 -0
  29. package/dist/ai/docs/RenderOnView.md +138 -0
  30. package/dist/ai/docs/Resizable.md +159 -0
  31. package/dist/ai/docs/Select.md +284 -0
  32. package/dist/ai/docs/Shortcut.md +105 -0
  33. package/dist/ai/docs/Skeleton.md +166 -0
  34. package/dist/ai/docs/Slider.md +144 -0
  35. package/dist/ai/docs/Slot.md +173 -0
  36. package/dist/ai/docs/Spinner.md +118 -0
  37. package/dist/ai/docs/Stats.md +137 -0
  38. package/dist/ai/docs/Step.md +159 -0
  39. package/dist/ai/docs/Switch.md +167 -0
  40. package/dist/ai/docs/Table.md +298 -0
  41. package/dist/ai/docs/Tabs.md +191 -0
  42. package/dist/ai/docs/Tag.md +224 -0
  43. package/dist/ai/docs/TaskList.md +144 -0
  44. package/dist/ai/docs/Textarea.md +167 -0
  45. package/dist/ai/docs/Timeline.md +210 -0
  46. package/dist/ai/docs/Toolbar.md +132 -0
  47. package/dist/ai/docs/Tooltip.md +231 -0
  48. package/dist/ai/docs/TransferList.md +142 -0
  49. package/dist/ai/docs/Typography.md +187 -0
  50. package/dist/ai/docs/Wizard.md +213 -0
  51. package/dist/ai/docs/index.md +183 -0
  52. package/dist/components/core/tag.d.ts +1 -1
  53. package/dist/components/core/tag.d.ts.map +1 -1
  54. package/dist/components/display/list.d.ts.map +1 -1
  55. package/dist/components/floating/dropdown.d.ts +1 -0
  56. package/dist/components/floating/dropdown.d.ts.map +1 -1
  57. package/dist/components/floating/menu.d.ts.map +1 -1
  58. package/dist/config/default-translations.d.ts +4 -4
  59. package/dist/hooks/use-translations.d.ts +4 -4
  60. package/dist/hooks/use-translations.d.ts.map +1 -1
  61. package/dist/index.css +1 -1
  62. package/dist/index.js +28 -20
  63. package/dist/index.js.map +1 -1
  64. package/dist/index.mjs +2463 -2458
  65. package/dist/index.mjs.map +1 -1
  66. package/dist/index.umd.js +12 -12
  67. package/dist/index.umd.js.map +1 -1
  68. package/package.json +4 -4
  69. package/dist/components/core/button.jsx +0 -79
  70. package/dist/components/core/heading.jsx +0 -4
  71. package/dist/components/core/polymorph.jsx +0 -5
  72. package/dist/components/core/render-on-view.jsx +0 -31
  73. package/dist/components/core/resizable.jsx +0 -51
  74. package/dist/components/core/slot.jsx +0 -156
  75. package/dist/components/core/tag.jsx +0 -51
  76. package/dist/components/core/typography.jsx +0 -22
  77. package/dist/components/display/alert.jsx +0 -58
  78. package/dist/components/display/calendar.jsx +0 -299
  79. package/dist/components/display/card.jsx +0 -43
  80. package/dist/components/display/empty.jsx +0 -11
  81. package/dist/components/display/list.jsx +0 -81
  82. package/dist/components/display/notifications.jsx +0 -126
  83. package/dist/components/display/progress.jsx +0 -11
  84. package/dist/components/display/shortcut.jsx +0 -23
  85. package/dist/components/display/skeleton.jsx +0 -12
  86. package/dist/components/display/spinner.jsx +0 -7
  87. package/dist/components/display/stats.jsx +0 -20
  88. package/dist/components/display/step.jsx +0 -131
  89. package/dist/components/display/tabs.jsx +0 -98
  90. package/dist/components/display/timeline.jsx +0 -25
  91. package/dist/components/floating/command-palette.jsx +0 -194
  92. package/dist/components/floating/dropdown.jsx +0 -53
  93. package/dist/components/floating/expand.jsx +0 -44
  94. package/dist/components/floating/menu.jsx +0 -147
  95. package/dist/components/floating/modal.jsx +0 -299
  96. package/dist/components/floating/toolbar.jsx +0 -5
  97. package/dist/components/floating/tooltip.jsx +0 -58
  98. package/dist/components/floating/wizard.jsx +0 -161
  99. package/dist/components/form/autocomplete.jsx +0 -279
  100. package/dist/components/form/checkbox.jsx +0 -12
  101. package/dist/components/form/date-picker.jsx +0 -115
  102. package/dist/components/form/file-upload.jsx +0 -133
  103. package/dist/components/form/form.jsx +0 -10
  104. package/dist/components/form/formReset.jsx +0 -17
  105. package/dist/components/form/free-text.jsx +0 -41
  106. package/dist/components/form/input-field.jsx +0 -56
  107. package/dist/components/form/input.jsx +0 -36
  108. package/dist/components/form/multi-select.jsx +0 -328
  109. package/dist/components/form/radiobox.jsx +0 -6
  110. package/dist/components/form/select.jsx +0 -42
  111. package/dist/components/form/slider.jsx +0 -45
  112. package/dist/components/form/switch.jsx +0 -46
  113. package/dist/components/form/task-list.jsx +0 -26
  114. package/dist/components/form/textarea.jsx +0 -12
  115. package/dist/components/form/transfer-list.jsx +0 -39
  116. package/dist/components/index.js +0 -45
  117. package/dist/components/page-calendar/calendar-header.jsx +0 -81
  118. package/dist/components/page-calendar/day-view.jsx +0 -87
  119. package/dist/components/page-calendar/event-pill.jsx +0 -25
  120. package/dist/components/page-calendar/index.js +0 -2
  121. package/dist/components/page-calendar/month-view.jsx +0 -47
  122. package/dist/components/page-calendar/page-calendar.jsx +0 -41
  123. package/dist/components/page-calendar/page-calendar.types.js +0 -1
  124. package/dist/components/page-calendar/page-calendar.utils.js +0 -71
  125. package/dist/components/page-calendar/week-view.jsx +0 -64
  126. package/dist/components/table/filter.jsx +0 -141
  127. package/dist/components/table/group.jsx +0 -68
  128. package/dist/components/table/index.jsx +0 -60
  129. package/dist/components/table/inner-table.jsx +0 -104
  130. package/dist/components/table/metadata.jsx +0 -36
  131. package/dist/components/table/pagination.jsx +0 -73
  132. package/dist/components/table/row.jsx +0 -58
  133. package/dist/components/table/sort.jsx +0 -105
  134. package/dist/components/table/table-lib.js +0 -83
  135. package/dist/components/table/table.context.jsx +0 -4
  136. package/dist/components/table/thead.jsx +0 -103
  137. package/dist/config/context.js +0 -12
  138. package/dist/config/default-translations.jsx +0 -83
  139. package/dist/config/default-tweaks.js +0 -4
  140. package/dist/constants.js +0 -2
  141. package/dist/hooks/use-click-outside.js +0 -17
  142. package/dist/hooks/use-color-parser.js +0 -9
  143. package/dist/hooks/use-components-provider.jsx +0 -19
  144. package/dist/hooks/use-debounce.js +0 -12
  145. package/dist/hooks/use-floating-ref.js +0 -6
  146. package/dist/hooks/use-form.js +0 -550
  147. package/dist/hooks/use-hover.js +0 -18
  148. package/dist/hooks/use-input-id.js +0 -5
  149. package/dist/hooks/use-is-coarse-device.js +0 -12
  150. package/dist/hooks/use-locale.js +0 -10
  151. package/dist/hooks/use-media-query.js +0 -25
  152. package/dist/hooks/use-on-event.js +0 -7
  153. package/dist/hooks/use-parent.js +0 -21
  154. package/dist/hooks/use-preferences.js +0 -23
  155. package/dist/hooks/use-previous.js +0 -9
  156. package/dist/hooks/use-reactive.js +0 -9
  157. package/dist/hooks/use-remove-scroll.js +0 -61
  158. package/dist/hooks/use-resize-observer.js +0 -17
  159. package/dist/hooks/use-stable-ref.js +0 -9
  160. package/dist/hooks/use-swipe.js +0 -17
  161. package/dist/hooks/use-translations.js +0 -9
  162. package/dist/hooks/use-tweaks.js +0 -9
  163. package/dist/hooks/use-window-size.js +0 -14
  164. package/dist/lib/combi-keys.js +0 -60
  165. package/dist/lib/dict.js +0 -39
  166. package/dist/lib/dom.js +0 -62
  167. package/dist/lib/fns.js +0 -46
  168. package/dist/lib/fzf.js +0 -117
  169. package/dist/lib/keyboard-area.js +0 -14
  170. package/dist/styles/common.js +0 -29
  171. package/dist/styles/dark.js +0 -214
  172. package/dist/styles/design-tokens.js +0 -69
  173. package/dist/styles/light.js +0 -214
  174. package/dist/styles/theme.js +0 -4
  175. package/dist/styles/theme.types.js +0 -1
  176. package/dist/types.js +0 -1
package/dist/index.js CHANGED
@@ -1,20 +1,28 @@
1
- export * from "./components";
2
- export * from "./config/context";
3
- export * from "./config/default-translations";
4
- export * from "./config/default-tweaks";
5
- export * from "./hooks/use-form";
6
- export * from "./hooks/use-previous";
7
- export * from "./hooks/use-reactive";
8
- export * from "./hooks/use-stable-ref";
9
- export * from "./hooks/use-swipe";
10
- export * from "./lib/dom";
11
- export * from "./lib/dict";
12
- export * from "./lib/fns";
13
- export * from "./styles/design-tokens";
14
- export * from "./styles/theme";
15
- export * from "./styles/theme.types";
16
- export { ComponentsProvider } from "./hooks/use-components-provider";
17
- export { createColumns, createOptionCols, ColType, useTablePreferences, getModalScrollerRef } from "./components/table/table-lib";
18
- export { useColorParser } from "./hooks/use-color-parser";
19
- export { useLocale } from "./hooks/use-locale";
20
- export { useTranslations } from "./hooks/use-translations";
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),p=require("react/jsx-runtime"),bs=require("react-dom");function o0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const A=o0(S),xr=o0(bs);function i0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=i0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function s0(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=i0(e))&&(r&&(r+=" "),r+=t);return r}const Sh=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Th=s0,ki=(e,t)=>n=>{var r;if(t?.variants==null)return Th(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n?.[c],d=i?.[c];if(u===null)return null;const f=Sh(u)||Sh(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...m}=u;return Object.entries(m).every(g=>{let[y,h]=g;return Array.isArray(h)?h.includes({...i,...a}[y]):{...i,...a}[y]===h})?[...c,d,f]:c},[]);return Th(e,s,l,n?.class,n?.className)};var Eh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function a0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function FC(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var o=!1;try{o=this instanceof r}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var Bc,Ch;function Ri(){return Ch||(Ch=1,Bc=TypeError),Bc}const LC={},VC=Object.freeze(Object.defineProperty({__proto__:null,default:LC},Symbol.toStringTag,{value:"Module"})),$C=FC(VC);var Hc,kh;function Gl(){if(kh)return Hc;kh=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,o=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=o&&i&&typeof i.get=="function"?i.get:null,a=o&&Set.prototype.forEach,l=typeof WeakMap=="function"&&WeakMap.prototype,c=l?WeakMap.prototype.has:null,u=typeof WeakSet=="function"&&WeakSet.prototype,d=u?WeakSet.prototype.has:null,f=typeof WeakRef=="function"&&WeakRef.prototype,m=f?WeakRef.prototype.deref:null,g=Boolean.prototype.valueOf,y=Object.prototype.toString,h=Function.prototype.toString,v=String.prototype.match,x=String.prototype.slice,b=String.prototype.replace,T=String.prototype.toUpperCase,E=String.prototype.toLowerCase,R=RegExp.prototype.test,w=Array.prototype.concat,C=Array.prototype.join,I=Array.prototype.slice,P=Math.floor,M=typeof BigInt=="function"?BigInt.prototype.valueOf:null,j=Object.getOwnPropertySymbols,L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,O=typeof Symbol=="function"&&typeof Symbol.iterator=="object",N=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===O||!0)?Symbol.toStringTag:null,V=Object.prototype.propertyIsEnumerable,D=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(W){return W.__proto__}:null);function k(W,K){if(W===1/0||W===-1/0||W!==W||W&&W>-1e3&&W<1e3||R.call(/e/,K))return K;var Ae=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof W=="number"){var We=W<0?-P(-W):P(W);if(We!==W){var Ge=String(We),Fe=x.call(K,Ge.length+1);return b.call(Ge,Ae,"$&_")+"."+b.call(b.call(Fe,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(K,Ae,"$&_")}var F=$C,_=F.custom,B=le(_)?_:null,U={__proto__:null,double:'"',single:"'"},G={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Hc=function W(K,Ae,We,Ge){var Fe=Ae||{};if(re(Fe,"quoteStyle")&&!re(U,Fe.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(re(Fe,"maxStringLength")&&(typeof Fe.maxStringLength=="number"?Fe.maxStringLength<0&&Fe.maxStringLength!==1/0:Fe.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var et=re(Fe,"customInspect")?Fe.customInspect:!0;if(typeof et!="boolean"&&et!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(re(Fe,"indent")&&Fe.indent!==null&&Fe.indent!==" "&&!(parseInt(Fe.indent,10)===Fe.indent&&Fe.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(re(Fe,"numericSeparator")&&typeof Fe.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var ft=Fe.numericSeparator;if(typeof K>"u")return"undefined";if(K===null)return"null";if(typeof K=="boolean")return K?"true":"false";if(typeof K=="string")return me(K,Fe);if(typeof K=="number"){if(K===0)return 1/0/K>0?"0":"-0";var tt=String(K);return ft?k(K,tt):tt}if(typeof K=="bigint"){var cn=String(K)+"n";return ft?k(K,cn):cn}var Sr=typeof Fe.depth>"u"?5:Fe.depth;if(typeof We>"u"&&(We=0),We>=Sr&&Sr>0&&typeof K=="object")return te(K)?"[Array]":"[Object]";var Tr=Pt(Fe,We);if(typeof Ge>"u")Ge=[];else if(ae(Ge,K)>=0)return"[Circular]";function wn(No,pa,_C){if(pa&&(Ge=I.call(Ge),Ge.push(pa)),_C){var wh={depth:Fe.depth};return re(Fe,"quoteStyle")&&(wh.quoteStyle=Fe.quoteStyle),W(No,wh,We+1,Ge)}return W(No,Fe,We+1,Ge)}if(typeof K=="function"&&!Y(K)){var Do=oe(K),Mo=Ve(K,wn);return"[Function"+(Do?": "+Do:" (anonymous)")+"]"+(Mo.length>0?" { "+C.call(Mo,", ")+" }":"")}if(le(K)){var gh=O?b.call(String(K),/^(Symbol\(.*\))_[^)]*$/,"$1"):L.call(K);return typeof K=="object"&&!O?Ee(gh):gh}if(X(K)){for(var Wi="<"+E.call(String(K.nodeName)),_c=K.attributes||[],fa=0;fa<_c.length;fa++)Wi+=" "+_c[fa].name+"="+H(ee(_c[fa].value),"double",Fe);return Wi+=">",K.childNodes&&K.childNodes.length&&(Wi+="..."),Wi+="</"+E.call(String(K.nodeName))+">",Wi}if(te(K)){if(K.length===0)return"[]";var Fc=Ve(K,wn);return Tr&&!it(Fc)?"["+Yt(Fc,Tr)+"]":"[ "+C.call(Fc,", ")+" ]"}if(Z(K)){var Lc=Ve(K,wn);return!("cause"in Error.prototype)&&"cause"in K&&!V.call(K,"cause")?"{ ["+String(K)+"] "+C.call(w.call("[cause]: "+wn(K.cause),Lc),", ")+" }":Lc.length===0?"["+String(K)+"]":"{ ["+String(K)+"] "+C.call(Lc,", ")+" }"}if(typeof K=="object"&&et){if(B&&typeof K[B]=="function"&&F)return F(K,{depth:Sr-We});if(et!=="symbol"&&typeof K.inspect=="function")return K.inspect()}if(ve(K)){var yh=[];return r&&r.call(K,function(No,pa){yh.push(wn(pa,K,!0)+" => "+wn(No,K))}),De("Map",n.call(K),yh,Tr)}if(J(K)){var vh=[];return a&&a.call(K,function(No){vh.push(wn(No,K))}),De("Set",s.call(K),vh,Tr)}if(ue(K))return je("WeakMap");if($(K))return je("WeakSet");if(ne(K))return je("WeakRef");if(z(K))return Ee(wn(Number(K)));if(Q(K))return Ee(wn(M.call(K)));if(se(K))return Ee(g.call(K));if(fe(K))return Ee(wn(String(K)));if(typeof window<"u"&&K===window)return"{ [object Window] }";if(typeof globalThis<"u"&&K===globalThis||typeof Eh<"u"&&K===Eh)return"{ [object globalThis] }";if(!q(K)&&!Y(K)){var Vc=Ve(K,wn),xh=D?D(K)===Object.prototype:K instanceof Object||K.constructor===Object,$c=K instanceof Object?"":"null prototype",bh=!xh&&N&&Object(K)===K&&N in K?x.call(pe(K),8,-1):$c?"Object":"",NC=xh||typeof K.constructor!="function"?"":K.constructor.name?K.constructor.name+" ":"",zc=NC+(bh||$c?"["+C.call(w.call([],bh||[],$c||[]),": ")+"] ":"");return Vc.length===0?zc+"{}":Tr?zc+"{"+Yt(Vc,Tr)+"}":zc+"{ "+C.call(Vc,", ")+" }"}return String(K)};function H(W,K,Ae){var We=Ae.quoteStyle||K,Ge=U[We];return Ge+W+Ge}function ee(W){return b.call(String(W),/"/g,"&quot;")}function ie(W){return!N||!(typeof W=="object"&&(N in W||typeof W[N]<"u"))}function te(W){return pe(W)==="[object Array]"&&ie(W)}function q(W){return pe(W)==="[object Date]"&&ie(W)}function Y(W){return pe(W)==="[object RegExp]"&&ie(W)}function Z(W){return pe(W)==="[object Error]"&&ie(W)}function fe(W){return pe(W)==="[object String]"&&ie(W)}function z(W){return pe(W)==="[object Number]"&&ie(W)}function se(W){return pe(W)==="[object Boolean]"&&ie(W)}function le(W){if(O)return W&&typeof W=="object"&&W instanceof Symbol;if(typeof W=="symbol")return!0;if(!W||typeof W!="object"||!L)return!1;try{return L.call(W),!0}catch{}return!1}function Q(W){if(!W||typeof W!="object"||!M)return!1;try{return M.call(W),!0}catch{}return!1}var ce=Object.prototype.hasOwnProperty||function(W){return W in this};function re(W,K){return ce.call(W,K)}function pe(W){return y.call(W)}function oe(W){if(W.name)return W.name;var K=v.call(h.call(W),/^function\s*([\w$]+)/);return K?K[1]:null}function ae(W,K){if(W.indexOf)return W.indexOf(K);for(var Ae=0,We=W.length;Ae<We;Ae++)if(W[Ae]===K)return Ae;return-1}function ve(W){if(!n||!W||typeof W!="object")return!1;try{n.call(W);try{s.call(W)}catch{return!0}return W instanceof Map}catch{}return!1}function ue(W){if(!c||!W||typeof W!="object")return!1;try{c.call(W,c);try{d.call(W,d)}catch{return!0}return W instanceof WeakMap}catch{}return!1}function ne(W){if(!m||!W||typeof W!="object")return!1;try{return m.call(W),!0}catch{}return!1}function J(W){if(!s||!W||typeof W!="object")return!1;try{s.call(W);try{n.call(W)}catch{return!0}return W instanceof Set}catch{}return!1}function $(W){if(!d||!W||typeof W!="object")return!1;try{d.call(W,d);try{c.call(W,c)}catch{return!0}return W instanceof WeakSet}catch{}return!1}function X(W){return!W||typeof W!="object"?!1:typeof HTMLElement<"u"&&W instanceof HTMLElement?!0:typeof W.nodeName=="string"&&typeof W.getAttribute=="function"}function me(W,K){if(W.length>K.maxStringLength){var Ae=W.length-K.maxStringLength,We="... "+Ae+" more character"+(Ae>1?"s":"");return me(x.call(W,0,K.maxStringLength),K)+We}var Ge=G[K.quoteStyle||"single"];Ge.lastIndex=0;var Fe=b.call(b.call(W,Ge,"\\$1"),/[\x00-\x1f]/g,ye);return H(Fe,"single",K)}function ye(W){var K=W.charCodeAt(0),Ae={8:"b",9:"t",10:"n",12:"f",13:"r"}[K];return Ae?"\\"+Ae:"\\x"+(K<16?"0":"")+T.call(K.toString(16))}function Ee(W){return"Object("+W+")"}function je(W){return W+" { ? }"}function De(W,K,Ae,We){var Ge=We?Yt(Ae,We):C.call(Ae,", ");return W+" ("+K+") {"+Ge+"}"}function it(W){for(var K=0;K<W.length;K++)if(ae(W[K],`
2
+ `)>=0)return!1;return!0}function Pt(W,K){var Ae;if(W.indent===" ")Ae=" ";else if(typeof W.indent=="number"&&W.indent>0)Ae=C.call(Array(W.indent+1)," ");else return null;return{base:Ae,prev:C.call(Array(K+1),Ae)}}function Yt(W,K){if(W.length===0)return"";var Ae=`
3
+ `+K.prev+K.base;return Ae+C.call(W,","+Ae)+`
4
+ `+K.prev}function Ve(W,K){var Ae=te(W),We=[];if(Ae){We.length=W.length;for(var Ge=0;Ge<W.length;Ge++)We[Ge]=re(W,Ge)?K(W[Ge],W):""}var Fe=typeof j=="function"?j(W):[],et;if(O){et={};for(var ft=0;ft<Fe.length;ft++)et["$"+Fe[ft]]=Fe[ft]}for(var tt in W)re(W,tt)&&(Ae&&String(Number(tt))===tt&&tt<W.length||O&&et["$"+tt]instanceof Symbol||(R.call(/[^\w$]/,tt)?We.push(K(tt,W)+": "+K(W[tt],W)):We.push(tt+": "+K(W[tt],W))));if(typeof j=="function")for(var cn=0;cn<Fe.length;cn++)V.call(W,Fe[cn])&&We.push("["+K(Fe[cn])+"]: "+K(W[Fe[cn]],W));return We}return Hc}var Wc,Rh;function zC(){if(Rh)return Wc;Rh=1;var e=Gl(),t=Ri(),n=function(a,l,c){for(var u=a,d;(d=u.next)!=null;u=d)if(d.key===l)return u.next=d.next,c||(d.next=a.next,a.next=d),d},r=function(a,l){if(a){var c=n(a,l);return c&&c.value}},o=function(a,l,c){var u=n(a,l);u?u.value=c:a.next={key:l,next:a.next,value:c}},i=function(a,l){return a?!!n(a,l):!1},s=function(a,l){if(a)return n(a,l,!0)};return Wc=function(){var l,c={assert:function(u){if(!c.has(u))throw new t("Side channel does not contain "+e(u))},delete:function(u){var d=l&&l.next,f=s(l,u);return f&&d&&d===f&&(l=void 0),!!f},get:function(u){return r(l,u)},has:function(u){return i(l,u)},set:function(u,d){l||(l={next:void 0}),o(l,u,d)}};return c},Wc}var qc,Ih;function l0(){return Ih||(Ih=1,qc=Object),qc}var Uc,Ah;function BC(){return Ah||(Ah=1,Uc=Error),Uc}var Gc,Ph;function HC(){return Ph||(Ph=1,Gc=EvalError),Gc}var Yc,Oh;function WC(){return Oh||(Oh=1,Yc=RangeError),Yc}var Kc,jh;function qC(){return jh||(jh=1,Kc=ReferenceError),Kc}var Zc,Dh;function UC(){return Dh||(Dh=1,Zc=SyntaxError),Zc}var Xc,Mh;function GC(){return Mh||(Mh=1,Xc=URIError),Xc}var Qc,Nh;function YC(){return Nh||(Nh=1,Qc=Math.abs),Qc}var Jc,_h;function KC(){return _h||(_h=1,Jc=Math.floor),Jc}var eu,Fh;function ZC(){return Fh||(Fh=1,eu=Math.max),eu}var tu,Lh;function XC(){return Lh||(Lh=1,tu=Math.min),tu}var nu,Vh;function QC(){return Vh||(Vh=1,nu=Math.pow),nu}var ru,$h;function JC(){return $h||($h=1,ru=Math.round),ru}var ou,zh;function ek(){return zh||(zh=1,ou=Number.isNaN||function(t){return t!==t}),ou}var iu,Bh;function tk(){if(Bh)return iu;Bh=1;var e=ek();return iu=function(n){return e(n)||n===0?n:n<0?-1:1},iu}var su,Hh;function nk(){return Hh||(Hh=1,su=Object.getOwnPropertyDescriptor),su}var au,Wh;function c0(){if(Wh)return au;Wh=1;var e=nk();if(e)try{e([],"length")}catch{e=null}return au=e,au}var lu,qh;function rk(){if(qh)return lu;qh=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return lu=e,lu}var cu,Uh;function ok(){return Uh||(Uh=1,cu=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0}),cu}var uu,Gh;function ik(){if(Gh)return uu;Gh=1;var e=typeof Symbol<"u"&&Symbol,t=ok();return uu=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},uu}var du,Yh;function u0(){return Yh||(Yh=1,du=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),du}var fu,Kh;function d0(){if(Kh)return fu;Kh=1;var e=l0();return fu=e.getPrototypeOf||null,fu}var pu,Zh;function sk(){if(Zh)return pu;Zh=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",o=function(l,c){for(var u=[],d=0;d<l.length;d+=1)u[d]=l[d];for(var f=0;f<c.length;f+=1)u[f+l.length]=c[f];return u},i=function(l,c){for(var u=[],d=c,f=0;d<l.length;d+=1,f+=1)u[f]=l[d];return u},s=function(a,l){for(var c="",u=0;u<a.length;u+=1)c+=a[u],u+1<a.length&&(c+=l);return c};return pu=function(l){var c=this;if(typeof c!="function"||t.apply(c)!==r)throw new TypeError(e+c);for(var u=i(arguments,1),d,f=function(){if(this instanceof d){var v=c.apply(this,o(u,arguments));return Object(v)===v?v:this}return c.apply(l,o(u,arguments))},m=n(0,c.length-u.length),g=[],y=0;y<m;y++)g[y]="$"+y;if(d=Function("binder","return function ("+s(g,",")+"){ return binder.apply(this,arguments); }")(f),c.prototype){var h=function(){};h.prototype=c.prototype,d.prototype=new h,h.prototype=null}return d},pu}var mu,Xh;function Yl(){if(Xh)return mu;Xh=1;var e=sk();return mu=Function.prototype.bind||e,mu}var hu,Qh;function dp(){return Qh||(Qh=1,hu=Function.prototype.call),hu}var gu,Jh;function f0(){return Jh||(Jh=1,gu=Function.prototype.apply),gu}var yu,eg;function ak(){return eg||(eg=1,yu=typeof Reflect<"u"&&Reflect&&Reflect.apply),yu}var vu,tg;function lk(){if(tg)return vu;tg=1;var e=Yl(),t=f0(),n=dp(),r=ak();return vu=r||e.call(n,t),vu}var xu,ng;function p0(){if(ng)return xu;ng=1;var e=Yl(),t=Ri(),n=dp(),r=lk();return xu=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},xu}var bu,rg;function ck(){if(rg)return bu;rg=1;var e=p0(),t=c0(),n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&t&&t(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return bu=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(a){return i(a==null?a:o(a))}:!1,bu}var wu,og;function uk(){if(og)return wu;og=1;var e=u0(),t=d0(),n=ck();return wu=e?function(o){return e(o)}:t?function(o){if(!o||typeof o!="object"&&typeof o!="function")throw new TypeError("getProto: not an object");return t(o)}:n?function(o){return n(o)}:null,wu}var Su,ig;function dk(){if(ig)return Su;ig=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Yl();return Su=n.call(e,t),Su}var Tu,sg;function fp(){if(sg)return Tu;sg=1;var e,t=l0(),n=BC(),r=HC(),o=WC(),i=qC(),s=UC(),a=Ri(),l=GC(),c=YC(),u=KC(),d=ZC(),f=XC(),m=QC(),g=JC(),y=tk(),h=Function,v=function(Y){try{return h('"use strict"; return ('+Y+").constructor;")()}catch{}},x=c0(),b=rk(),T=function(){throw new a},E=x?(function(){try{return arguments.callee,T}catch{try{return x(arguments,"callee").get}catch{return T}}})():T,R=ik()(),w=uk(),C=d0(),I=u0(),P=f0(),M=dp(),j={},L=typeof Uint8Array>"u"||!w?e:w(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":R&&w?w([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":j,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":R&&w?w(w([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!R||!w?e:w(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!R||!w?e:w(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":R&&w?w(""[Symbol.iterator]()):e,"%Symbol%":R?Symbol:e,"%SyntaxError%":s,"%ThrowTypeError%":E,"%TypedArray%":L,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":M,"%Function.prototype.apply%":P,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":u,"%Math.max%":d,"%Math.min%":f,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":y,"%Reflect.getPrototypeOf%":I};if(w)try{null.error}catch(Y){var N=w(w(Y));O["%Error.prototype%"]=N}var V=function Y(Z){var fe;if(Z==="%AsyncFunction%")fe=v("async function () {}");else if(Z==="%GeneratorFunction%")fe=v("function* () {}");else if(Z==="%AsyncGeneratorFunction%")fe=v("async function* () {}");else if(Z==="%AsyncGenerator%"){var z=Y("%AsyncGeneratorFunction%");z&&(fe=z.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var se=Y("%AsyncGenerator%");se&&w&&(fe=w(se.prototype))}return O[Z]=fe,fe},D={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},k=Yl(),F=dk(),_=k.call(M,Array.prototype.concat),B=k.call(P,Array.prototype.splice),U=k.call(M,String.prototype.replace),G=k.call(M,String.prototype.slice),H=k.call(M,RegExp.prototype.exec),ee=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ie=/\\(\\)?/g,te=function(Z){var fe=G(Z,0,1),z=G(Z,-1);if(fe==="%"&&z!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(z==="%"&&fe!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var se=[];return U(Z,ee,function(le,Q,ce,re){se[se.length]=ce?U(re,ie,"$1"):Q||le}),se},q=function(Z,fe){var z=Z,se;if(F(D,z)&&(se=D[z],z="%"+se[0]+"%"),F(O,z)){var le=O[z];if(le===j&&(le=V(z)),typeof le>"u"&&!fe)throw new a("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:se,name:z,value:le}}throw new s("intrinsic "+Z+" does not exist!")};return Tu=function(Z,fe){if(typeof Z!="string"||Z.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof fe!="boolean")throw new a('"allowMissing" argument must be a boolean');if(H(/^%?[^%]*%?$/,Z)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var z=te(Z),se=z.length>0?z[0]:"",le=q("%"+se+"%",fe),Q=le.name,ce=le.value,re=!1,pe=le.alias;pe&&(se=pe[0],B(z,_([0,1],pe)));for(var oe=1,ae=!0;oe<z.length;oe+=1){var ve=z[oe],ue=G(ve,0,1),ne=G(ve,-1);if((ue==='"'||ue==="'"||ue==="`"||ne==='"'||ne==="'"||ne==="`")&&ue!==ne)throw new s("property names with quotes must have matching quotes");if((ve==="constructor"||!ae)&&(re=!0),se+="."+ve,Q="%"+se+"%",F(O,Q))ce=O[Q];else if(ce!=null){if(!(ve in ce)){if(!fe)throw new a("base intrinsic for "+Z+" exists, but the property is not available.");return}if(x&&oe+1>=z.length){var J=x(ce,ve);ae=!!J,ae&&"get"in J&&!("originalValue"in J.get)?ce=J.get:ce=ce[ve]}else ae=F(ce,ve),ce=ce[ve];ae&&!re&&(O[Q]=ce)}}return ce},Tu}var Eu,ag;function m0(){if(ag)return Eu;ag=1;var e=fp(),t=p0(),n=t([e("%String.prototype.indexOf%")]);return Eu=function(o,i){var s=e(o,!!i);return typeof s=="function"&&n(o,".prototype.")>-1?t([s]):s},Eu}var Cu,lg;function h0(){if(lg)return Cu;lg=1;var e=fp(),t=m0(),n=Gl(),r=Ri(),o=e("%Map%",!0),i=t("Map.prototype.get",!0),s=t("Map.prototype.set",!0),a=t("Map.prototype.has",!0),l=t("Map.prototype.delete",!0),c=t("Map.prototype.size",!0);return Cu=!!o&&function(){var d,f={assert:function(m){if(!f.has(m))throw new r("Side channel does not contain "+n(m))},delete:function(m){if(d){var g=l(d,m);return c(d)===0&&(d=void 0),g}return!1},get:function(m){if(d)return i(d,m)},has:function(m){return d?a(d,m):!1},set:function(m,g){d||(d=new o),s(d,m,g)}};return f},Cu}var ku,cg;function fk(){if(cg)return ku;cg=1;var e=fp(),t=m0(),n=Gl(),r=h0(),o=Ri(),i=e("%WeakMap%",!0),s=t("WeakMap.prototype.get",!0),a=t("WeakMap.prototype.set",!0),l=t("WeakMap.prototype.has",!0),c=t("WeakMap.prototype.delete",!0);return ku=i?function(){var d,f,m={assert:function(g){if(!m.has(g))throw new o("Side channel does not contain "+n(g))},delete:function(g){if(i&&g&&(typeof g=="object"||typeof g=="function")){if(d)return c(d,g)}else if(r&&f)return f.delete(g);return!1},get:function(g){return i&&g&&(typeof g=="object"||typeof g=="function")&&d?s(d,g):f&&f.get(g)},has:function(g){return i&&g&&(typeof g=="object"||typeof g=="function")&&d?l(d,g):!!f&&f.has(g)},set:function(g,y){i&&g&&(typeof g=="object"||typeof g=="function")?(d||(d=new i),a(d,g,y)):r&&(f||(f=r()),f.set(g,y))}};return m}:r,ku}var Ru,ug;function g0(){if(ug)return Ru;ug=1;var e=Ri(),t=Gl(),n=zC(),r=h0(),o=fk(),i=o||r||n;return Ru=function(){var a,l={assert:function(c){if(!l.has(c))throw new e("Side channel does not contain "+t(c))},delete:function(c){return!!a&&a.delete(c)},get:function(c){return a&&a.get(c)},has:function(c){return!!a&&a.has(c)},set:function(c,u){a||(a=i()),a.set(c,u)}};return l},Ru}var dg=e=>Array.isArray(e),Iu=e=>e===void 0,Au=e=>e===null,pk=Function.bind.call(Function.call,Object.prototype.toString),mk=e=>!!e&&pk(e)==="[object Error]"||e instanceof Error,y0=(e,t)=>e instanceof t,hk=e=>{const t=typeof e;return t==="undefined"||t===null||t==="number"||t==="string"||t==="boolean"||t==="bigint"},gk=e=>Object.prototype.toString.call(e)==="[object Date]"&&y0(e,Date),Be={array:dg,date:gk,empty:e=>Au(e)||Iu(e)?!0:typeof e=="object"?Object.keys(e).length===0:typeof e=="string"?e==="":Array.isArray(e)?e.length===0:Number.isNaN(e),function:e=>typeof e=="function",instance:y0,isError:mk,keyof:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),nan:e=>Number.isNaN(e),nil:e=>Au(e)||Iu(e),null:Au,number:e=>typeof e=="number"?!Number.isNaN(e):!1,object:e=>!dg(e)&&typeof e=="object",primitive:hk,string:e=>typeof e=="string",undefined:Iu},yk=e=>Object.keys(e),Bn=(e,t,n)=>{if(!t)return;const o=(Array.isArray(t)?t:t.match(/([^[.\]])+/g)).reduce((i,s)=>i&&i[s],e);return o===void 0?n:o},vk=e=>e.replace(/[^0-9]/g,"");const xk=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},bk=(e,t)=>({classGroupId:e,validator:t}),v0=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),il="-",fg=[],wk="arbitrary..",Sk=e=>{const t=Ek(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Tk(s);const a=s.split(il),l=a[0]===""&&a.length>1?1:0;return x0(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],c=n[s];return l?c?xk(c,l):l:c||fg}return n[s]||fg}}},x0=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const c=x0(e,t+1,i);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(il):e.slice(t).join(il),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(a))return u.classGroupId}},Tk=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?wk+r:void 0})(),Ek=e=>{const{theme:t,classGroups:n}=e;return Ck(n,t)},Ck=(e,t)=>{const n=v0();for(const r in e){const o=e[r];pp(o,n,r,t)}return n},pp=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];kk(s,t,n,r)}},kk=(e,t,n,r)=>{if(typeof e=="string"){Rk(e,t,n);return}if(typeof e=="function"){Ik(e,t,n,r);return}Ak(e,t,n,r)},Rk=(e,t,n)=>{const r=e===""?t:b0(t,e);r.classGroupId=n},Ik=(e,t,n,r)=>{if(Pk(e)){pp(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(bk(n,e))},Ak=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];pp(l,b0(t,a),n,r)}},b0=(e,t)=>{let n=e;const r=t.split(il),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=v0(),n.nextPart.set(s,a)),n=a}return n},Pk=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Ok=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},Yd="!",pg=":",jk=[],mg=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),Dk=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,c;const u=o.length;for(let y=0;y<u;y++){const h=o[y];if(s===0&&a===0){if(h===pg){i.push(o.slice(l,y)),l=y+1;continue}if(h==="/"){c=y;continue}}h==="["?s++:h==="]"?s--:h==="("?a++:h===")"&&a--}const d=i.length===0?o:o.slice(l);let f=d,m=!1;d.endsWith(Yd)?(f=d.slice(0,-1),m=!0):d.startsWith(Yd)&&(f=d.slice(1),m=!0);const g=c&&c>l?c-l:void 0;return mg(i,m,f,g)};if(t){const o=t+pg,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):mg(jk,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},Mk=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},Nk=e=>({cache:Ok(e.cacheSize),parseClassName:Dk(e),sortModifiers:Mk(e),...Sk(e)}),_k=/\s+/,Fk=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(_k);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:f,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:y}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let h=!!y,v=r(h?g.substring(0,y):g);if(!v){if(!h){l=u+(l.length>0?" "+l:l);continue}if(v=r(g),!v){l=u+(l.length>0?" "+l:l);continue}h=!1}const x=f.length===0?"":f.length===1?f[0]:i(f).join(":"),b=m?x+Yd:x,T=b+v;if(s.indexOf(T)>-1)continue;s.push(T);const E=o(v,h);for(let R=0;R<E.length;++R){const w=E[R];s.push(b+w)}l=u+(l.length>0?" "+l:l)}return l},Lk=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=w0(n))&&(o&&(o+=" "),o+=r);return o},w0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=w0(e[r]))&&(n&&(n+=" "),n+=t);return n},Vk=(e,...t)=>{let n,r,o,i;const s=l=>{const c=t.reduce((u,d)=>d(u),e());return n=Nk(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=Fk(l,n);return o(l,u),u};return i=s,(...l)=>i(Lk(...l))},$k=[],Ft=e=>{const t=n=>n[e]||$k;return t.isThemeGetter=!0,t},S0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,T0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zk=/^\d+\/\d+$/,Bk=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hk=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Wk=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qk=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Uk=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_o=e=>zk.test(e),qe=e=>!!e&&!Number.isNaN(Number(e)),Er=e=>!!e&&Number.isInteger(Number(e)),Pu=e=>e.endsWith("%")&&qe(e.slice(0,-1)),cr=e=>Bk.test(e),Gk=()=>!0,Yk=e=>Hk.test(e)&&!Wk.test(e),E0=()=>!1,Kk=e=>qk.test(e),Zk=e=>Uk.test(e),Xk=e=>!we(e)&&!Se(e),Qk=e=>Ii(e,R0,E0),we=e=>S0.test(e),no=e=>Ii(e,I0,Yk),Ou=e=>Ii(e,rR,qe),hg=e=>Ii(e,C0,E0),Jk=e=>Ii(e,k0,Zk),ma=e=>Ii(e,A0,Kk),Se=e=>T0.test(e),qi=e=>Ai(e,I0),eR=e=>Ai(e,oR),gg=e=>Ai(e,C0),tR=e=>Ai(e,R0),nR=e=>Ai(e,k0),ha=e=>Ai(e,A0,!0),Ii=(e,t,n)=>{const r=S0.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ai=(e,t,n=!1)=>{const r=T0.exec(e);return r?r[1]?t(r[1]):n:!1},C0=e=>e==="position"||e==="percentage",k0=e=>e==="image"||e==="url",R0=e=>e==="length"||e==="size"||e==="bg-size",I0=e=>e==="length",rR=e=>e==="number",oR=e=>e==="family-name",A0=e=>e==="shadow",iR=()=>{const e=Ft("color"),t=Ft("font"),n=Ft("text"),r=Ft("font-weight"),o=Ft("tracking"),i=Ft("leading"),s=Ft("breakpoint"),a=Ft("container"),l=Ft("spacing"),c=Ft("radius"),u=Ft("shadow"),d=Ft("inset-shadow"),f=Ft("text-shadow"),m=Ft("drop-shadow"),g=Ft("blur"),y=Ft("perspective"),h=Ft("aspect"),v=Ft("ease"),x=Ft("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...T(),Se,we],R=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],C=()=>[Se,we,l],I=()=>[_o,"full","auto",...C()],P=()=>[Er,"none","subgrid",Se,we],M=()=>["auto",{span:["full",Er,Se,we]},Er,Se,we],j=()=>[Er,"auto",Se,we],L=()=>["auto","min","max","fr",Se,we],O=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...C()],D=()=>[_o,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],k=()=>[e,Se,we],F=()=>[...T(),gg,hg,{position:[Se,we]}],_=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",tR,Qk,{size:[Se,we]}],U=()=>[Pu,qi,no],G=()=>["","none","full",c,Se,we],H=()=>["",qe,qi,no],ee=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[qe,Pu,gg,hg],q=()=>["","none",g,Se,we],Y=()=>["none",qe,Se,we],Z=()=>["none",qe,Se,we],fe=()=>[qe,Se,we],z=()=>[_o,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[cr],breakpoint:[cr],color:[Gk],container:[cr],"drop-shadow":[cr],ease:["in","out","in-out"],font:[Xk],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[cr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[cr],shadow:[cr],spacing:["px",qe],text:[cr],"text-shadow":[cr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_o,we,Se,h]}],container:["container"],columns:[{columns:[qe,we,Se,a]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:E()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[Er,"auto",Se,we]}],basis:[{basis:[_o,"full","auto",a,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,_o,"auto","initial","none",we]}],grow:[{grow:["",qe,Se,we]}],shrink:[{shrink:["",qe,Se,we]}],order:[{order:[Er,"first","last","none",Se,we]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...O(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...O()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:D()}],w:[{w:[a,"screen",...D()]}],"min-w":[{"min-w":[a,"screen","none",...D()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...D()]}],h:[{h:["screen","lh",...D()]}],"min-h":[{"min-h":["screen","lh","none",...D()]}],"max-h":[{"max-h":["screen","lh",...D()]}],"font-size":[{text:["base",n,qi,no]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Se,Ou]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Pu,we]}],"font-family":[{font:[eR,we,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Se,we]}],"line-clamp":[{"line-clamp":[qe,"none",Se,Ou]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",Se,we]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,we]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",Se,no]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[qe,"auto",Se,we]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,we]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,we]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:_()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Er,Se,we],radial:["",Se,we],conic:[Er,Se,we]},nR,Jk]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,Se,we]}],"outline-w":[{outline:["",qe,qi,no]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",u,ha,ma]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",d,ha,ma]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[qe,no]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",f,ha,ma]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[qe,Se,we]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Se,we]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:_()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,we]}],filter:[{filter:["","none",Se,we]}],blur:[{blur:q()}],brightness:[{brightness:[qe,Se,we]}],contrast:[{contrast:[qe,Se,we]}],"drop-shadow":[{"drop-shadow":["","none",m,ha,ma]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",qe,Se,we]}],"hue-rotate":[{"hue-rotate":[qe,Se,we]}],invert:[{invert:["",qe,Se,we]}],saturate:[{saturate:[qe,Se,we]}],sepia:[{sepia:["",qe,Se,we]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,we]}],"backdrop-blur":[{"backdrop-blur":q()}],"backdrop-brightness":[{"backdrop-brightness":[qe,Se,we]}],"backdrop-contrast":[{"backdrop-contrast":[qe,Se,we]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,Se,we]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,Se,we]}],"backdrop-invert":[{"backdrop-invert":["",qe,Se,we]}],"backdrop-opacity":[{"backdrop-opacity":[qe,Se,we]}],"backdrop-saturate":[{"backdrop-saturate":[qe,Se,we]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,Se,we]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,we]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",Se,we]}],ease:[{ease:["linear","initial",v,Se,we]}],delay:[{delay:[qe,Se,we]}],animate:[{animate:["none",x,Se,we]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Se,we]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[Se,we,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:z()}],"translate-x":[{"translate-x":z()}],"translate-y":[{"translate-y":z()}],"translate-z":[{"translate-z":z()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se,we]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se,we]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[qe,qi,no,Ou]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},sR=Vk(iR),mr=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n!==null&&(n.current=t)})},aR=e=>e.$$typeof===Symbol.for("react.forward_ref")||e.$$typeof===Symbol.for("react.fragment")?!0:e.$$typeof===Symbol.for("react.element"),mp=e=>Be.function(e),Ie=(...e)=>sR(s0(e)),P0=e=>{const t=new Event("input",{bubbles:!0,composed:!0});return e?.dispatchEvent(t),Object.assign({},t,{target:e,currentTarget:e})},Us=e=>{const t=()=>e.setAttribute("data-initialized","true");return e.addEventListener("focus",t),()=>e.removeEventListener("focus",t)},O0=e=>e.scrollHeight>e.clientHeight,ws=(e,t)=>{if(e&&e.getBoundingClientRect){const n=e.getBoundingClientRect();return Math.abs(t-n.bottom)}return 320},lR=(e,t)=>{const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{top:Math.round(n.top-r.top),left:Math.round(n.left-r.left)}},j0=(e,t,n=!0)=>{const r=e.getBoundingClientRect(),o=t.getBoundingClientRect(),i=o.top>=r.top,s=o.bottom<=r.bottom,a=o.left>=r.left,l=o.right<=r.right;return n?o.top<r.bottom&&o.bottom>r.top&&o.left<r.right&&o.right>r.left:i&&s&&a&&l},mn=S.forwardRef(function(t,n){const r=t.as||"span";return p.jsx(r,{ref:n,...t,as:void 0})}),cR={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-8 px-4 py-2",tiny:"h-5 p-1 px-2 text-xs",small:"h-6 p-2 px-3 text-sm"},theme:{custom:"",info:"bg-tag-info-bg text-tag-info-text",warn:"bg-tag-warn-bg text-tag-warn-text",muted:"bg-tag-muted-bg text-tag-muted-text",danger:"bg-tag-danger-bg text-tag-danger-text",disabled:"bg-disabled duration-700 opacity-70",primary:"bg-tag-primary-bg text-tag-primary-text",success:"bg-tag-success-bg text-tag-success-text",neutral:"bg-transparent border border-card-border",secondary:"bg-tag-secondary-bg text-tag-secondary-text",loading:"animate-pulse bg-disabled duration-700 opacity-70"}},uR=ki("size-2 aspect-square rounded-full border-0",{variants:{theme:{info:"bg-info",warn:"bg-warn",muted:"bg-muted",danger:"bg-danger",neutral:"bg-muted",primary:"bg-primary",success:"bg-success",secondary:"bg-secondary"}}}),dR=ki("inline-flex rounded-pill gap-1.5 border-0 items-center justify-center align-middle whitespace-nowrap ease-linear duration-300 transition-all",{variants:cR,defaultVariants:{theme:"primary",size:"default"}}),fi=S.forwardRef(function({className:t,indicator:n=void 0,icon:r,loading:o,theme:i,size:s,...a},l){return p.jsxs(mn,{...a,ref:l,"data-theme":i,"data-component":"tag",as:a.as??"span",className:Ie(dR({size:s,theme:o?"loading":i}),t),children:[n?p.jsx("span",{"aria-hidden":"true",className:uR({theme:n===!0?i:n})}):null,r,a.children]})}),fR=e=>{const t=n=>{n.persist(),n.preventDefault(),e.onSubmit?.(n)};return p.jsx("form",{...e,onSubmit:t})};var Dt=function(){return Dt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Dt.apply(this,arguments)};function hp(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Kd(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}var Ss=function(e){return e.replace(new RegExp(" ","g")," ")},D0=function(e,t){var n=e.length,r=t+1;if(n>=r)return e;var o="0".repeat(r-n);return"".concat(o).concat(e)},pR=function(e){return e.replace(/^0+([0-9]+)/,"$1")},M0=function(e,t,n){var r=e.length-2,o=pR(e.substring(0,r)),i=e.substring(r);return o.split(/(?=(?:\d{3})*$)/).join(t)+n+i},N0=function(e){return e===void 0&&(e=""),e.replace(/(-(?!\d))|[^0-9|-]/g,"")||""},sl=function(e){return Number.parseFloat(e.replace(/,/g,".").replace(/(.*)\./,function(t){return"".concat(t.replace(/\./g,""),".")}).replace(/[^0-9.]/g,""))},mR=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},ju=function(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t},hR=function(e){return e==="money"||e==="currency"},gR=function(e,t,n){return new Intl.NumberFormat(e,{style:"currency",currency:t,currencyDisplay:n}).formatToParts(1e3).reduce(function(r,o){var i;return Dt(Dt({},r),(i={},i[o.type]=o.value,i))},{currency:"",currencyDisplay:"",decimal:",",fraction:"",group:"",integer:"",literal:""})},ga=function(e,t){var n=D0(N0(e),t.fraction.length),r="".concat(t.currency).concat(M0(n,t.group,t.decimal));return Ss(r)},yR=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n,o=e.currency,i=o===void 0?"BRL":o,s=e.currencyDisplay,a=s===void 0?"symbol":s;e.mask;var l=e.onChange,c=hp(e,["locale","currency","currencyDisplay","mask","onChange"]),u=S.useRef(null);S.useImperativeHandle(t,function(){return u.current});var d=S.useMemo(function(){var g=gR(r,i,a);return g.currency=Ss("".concat(g.currency.trim()," ")),g.literal=Ss(g.literal.trim()),g},[r,i]),f=function(g){var y=ga(g.target.value,d),h=sl(y);g.target.value=y,g.target.setAttribute("data-number",h.toString()),l?.(g),h!==0&&(u.current.selectionEnd=y.length)};S.useEffect(function(){if(u.current!==null){var g=u.current.value;if(g!==""){var y=ga(g,d),h=sl(y);u.current.value=y,u.current.setAttribute("data-number",h.toString());var v=new InputEvent("change",{});l?.(Dt(Dt({},v),{target:u.current,currentTarget:u.current})),h!==0&&(u.current.selectionEnd=y.length)}}},[d]);var m=c.defaultValue?ga(c.defaultValue,d):void 0;return S.createElement("input",Dt({},c,{value:typeof c.value=="string"?ga(c.value,d):c.value,defaultValue:m,type:"text",ref:u,onChange:f,inputMode:"decimal"}))}),vR=1,xR=function(e){return e==="percentage"||e==="percent"||e==="percentual"},bR=function(e){return new Intl.NumberFormat(e,{style:"percent",minimumFractionDigits:2}).formatToParts(1e3).reduce(function(t,n){var r;return Dt(Dt({},t),(r={},r[n.type]=n.value,r))},{decimal:"",fraction:"",group:"",integer:"",percentSign:"",type:"",value:""})},ya=function(e,t){var n=D0(N0(e),t.fraction.length),r="".concat(M0(n,t.group,t.decimal)," ").concat(t.percentSign);return Ss(r)},wR=S.forwardRef(function(e,t){var n=e.locale,r=n===void 0?"pt-BR":n;e.mask;var o=e.onChange,i=e.onKeyUp,s=hp(e,["locale","mask","onChange","onKeyUp"]),a=S.useRef(null),l=Kd(S.useState(function(){var v,x;return(x=(v=s.value)===null||v===void 0?void 0:v.toString())!==null&&x!==void 0?x:""}),2),c=l[0],u=l[1];S.useImperativeHandle(t,function(){return a.current}),S.useEffect(function(){var v,x=Number.parseFloat("".concat((v=s.value)!==null&&v!==void 0?v:"0")).toFixed(d.fraction.length);u(ya(x,d))},[s.value]);var d=S.useMemo(function(){var v=bR(r);return v.percentSign=Ss("".concat(v.percentSign)),v},[r]),f=c.length-d.percentSign.length-vR,m=function(v){var x,b=a.current;b&&(b.setSelectionRange(f,f),v&&((x=s.onFocus)===null||x===void 0||x.call(s,v)))},g=function(v){var x=v.currentTarget;if(x.selectionStart!==null){var b=x.selectionStart,T=x.selectionEnd,E=b!==T,R=f<b;!E&&R&&m()}i?.(v)},y=function(v){var x=ya(v.target.value,d),b=sl(x);u(x),v.target.value=x,v.target.setAttribute("data-number",b.toString()),o?.(v)};S.useEffect(function(){if(a.current!==null){var v=a.current.value;if(v!==""){var x=ya(v,d),b=sl(x);u(x),a.current.value=x,a.current.setAttribute("data-number",b.toString());var T=new InputEvent("change",{});o?.(Dt(Dt({},T),{target:a.current,currentTarget:a.current}))}}},[]),S.useEffect(function(){return m()},[c]);var h=s.defaultValue?ya(s.defaultValue,d):void 0;return S.createElement("input",Dt({},s,{defaultValue:h,inputMode:"decimal",onChange:y,onFocus:m,onKeyUp:g,ref:a,type:"text"}))}),Qi={dots:/\./g,openParenthesis:/\(/g,closeParenthesis:/\)/g,leadingBars:/\\\\/g,escape:/[.*+?^${}()|[\]\\]/g},SR=function(e){for(var t,n=e.length,r=[],o=0;o<n;o++){var i=e[o],s=al[i];s===void 0?r.push(i.replace(Qi.dots,"\\.").replace(Qi.openParenthesis,"\\(").replace(Qi.closeParenthesis,"\\)")):r.push((t=s.regex)===null||t===void 0?void 0:t.source)}return r.join("").replace(Qi.leadingBars,"\\")},os=function(e,t,n){var r=typeof e=="function",o=r?"":e;if(r&&(o=e(t)),Array.isArray(o))return Zd(o,n);var i=SR(o);return n?"^".concat(i,"$"):i},TR=function(e){return e.replace(Qi.escape,"\\$&")},Zd=function(e,t){var n=e.map(function(r){return typeof r=="string"?TR(r):r.source}).join("");return new RegExp(t?"^".concat(n,"$"):n).source},al={A:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleUpperCase()}},H:{regex:/[a-fA-F0-9]/},X:{regex:/[0-9a-zA-Z]/},a:{regex:/[a-zA-Z]/,parse:function(e){return e.toLocaleLowerCase()}},d:{regex:/\d/,escape:!0},x:{regex:/[a-zA-Z]/}},ER=/\d/,yg="(dd) 9dddd-dddd",vg="(dd) dddd-dddd",xg="ddd.ddd.ddd-dd",bg="dd.ddd.ddd/dddd-dd",Wa=function(e){return e.replace(/\D/g,"")},CR=["2",/[0-3]/,":",/[0-5]/,/\d/],kR=[/[012]/,/\d/,":",/[0-5]/,/[0-9]/],nn={cep:"ddddd-ddd",date:"dd/dd/dddd",cpf:xg,isoDate:"dddd-dd-dd",cnpj:bg,telephone:vg,cellphone:yg,creditCard:"dddd dddd dddd dddd",uuid:"HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHHHHHH",color:function(e){return e.length>4?"#HHHHHH":"#HHH"},cpfCnpj:function(e){return Wa(e).length<=11?xg:bg},int:function(e){return e===void 0&&(e=""),ER.test(e.toString().slice(-1))?"d".repeat(Math.max(e.length,0)):"d".repeat(Math.max(e.length-1,0))},cellTelephone:function(e){var t=Wa(e);return t.length<11?vg:yg},time:function(e){var t=Wa(e),n=t[0];return n==="2"?CR:kR}},rn=function(e,t,n){var r;return n===void 0&&(n={}),Dt({mask:e,inputMode:t,strict:!0,pattern:((r=n.pattern)!==null&&r!==void 0?r:typeof e=="function")?void 0:os(e,"",!0),infinity:n.infinity},n)},Xt={cellTelephone:rn(nn.cellTelephone,"tel"),cellphone:rn(nn.cellphone,"tel"),cep:rn(nn.cep,"decimal"),cnpj:rn(nn.cnpj,"decimal"),color:rn(nn.color,"decimal",{pattern:"#[a-fA-F0-9]{3}([a-fA-F0-9]{3})?"}),cpf:rn(nn.cpf,"decimal"),cpfCnpj:rn(nn.cpfCnpj,"decimal",{transform:Wa}),creditCard:rn(nn.creditCard,"decimal",{pattern:"[0-9]{4} [0-9]{4} [0-9]{4} [0-9]{3,4}"}),date:rn(nn.date,"decimal"),int:rn(nn.int,"decimal",{pattern:"[0-9]+"}),isoDate:rn(nn.isoDate,"decimal"),telephone:rn(nn.telephone,"tel"),time:rn(nn.time,"decimal",{pattern:"[0-9]{2}:[0-9]{2}"}),uuid:rn(nn.uuid,"decimal",{pattern:"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"})};function wg(e,t,n,r){var o,i;r===void 0&&(r=al);for(var s=n(e),a="",l=0,c=0;l<t.length&&c<s.length;){var u=t[l],d=u instanceof RegExp?u:r[u],f=s[c];if(d===void 0){a+=u,f===u&&(c+=1),l+=1;continue}var m=d instanceof RegExp?{regex:d}:d;m.regex.test(f)&&(a+=(i=(o=m.parse)===null||o===void 0?void 0:o.call(m,f))!==null&&i!==void 0?i:f),c+=1,l+=1}return a}var Sg=function(e){return e},RR=function(e,t,n){if(!e||!n)return!1;var r=new RegExp(os(e,n,t));return r.test(n)};function IR(e){var t=S.useRef(e);return S.useEffect(function(){t.current=e},[e]),t.current}var AR=S.forwardRef(function(e,t){var n=e.infinity,r=n===void 0?!1:n,o=e.strict,i=o===void 0?!0:o,s=e.transform,a=e.onChange,l=e.pattern,c=e.tokens,u=e.mask,d=e.onChangeText,f=e.as,m=hp(e,["infinity","strict","transform","onChange","pattern","tokens","mask","onChangeText","as"]),g=S.useRef(null);S.useImperativeHandle(t,function(){return g.current});var y=ju(a),h=ju(d),v=ju(u),x=S.useRef(RR(u,i,m.value||m.defaultValue)),b=f??"input",T=Kd(S.useState(""),2),E=T[0],R=T[1],w=IR(E),C=S.useCallback(function(N,V){var D,k,F=(D=N??V)!==null&&D!==void 0?D:"";if(u===void 0)return F;var _=(k=F?.toString())!==null&&k!==void 0?k:"";return wg(_,typeof u=="function"?u(_):u,s??Sg,c??al)},[s,u,c]),I=Kd(S.useState(function(){return C(m.value,m.defaultValue)}),2),P=I[0],M=I[1],j=C(m.defaultValue,m.defaultValue),L=S.useMemo(function(){if(l||u===void 0)return l;if(typeof u=="function"){var N=u(P);return Array.isArray(N)?Zd(N,i):os(u,P,i)}return typeof u=="string"?os(u,P,i):Zd(u,i)},[l,P,i,u]);S.useEffect(function(){if(m.value!==void 0){var N=C(m.value,m.defaultValue);M(N),g.current!==null&&(g.current.value=N)}},[m.value,u,s,m.defaultValue]);var O=function(N){var V,D,k,F,_,B=N.currentTarget,U=N.target.value;if(v.current===void 0)return M(U),(V=h.current)===null||V===void 0||V.call(h,U),(D=y.current)===null||D===void 0||D.call(y,N),d?.(U);var G=new RegExp(os(v.current,U,i)),H=(k=B.selectionEnd)!==null&&k!==void 0?k:0,ee=function(Z,fe,z){if(Z.type!=="number")return Z.setSelectionRange(fe,z)};if(r&&x.current&&U.length>=P.length)return B.value=P,ee(B,H-1,H-1);var ie=!1;U.length<w.length&&(x.current=!1,ie=!0),G.test(U)&&(x.current=!0);var te=H,q=U[te-1],Y=wg(U,typeof v.current=="function"?v.current(U):v.current,s??Sg,c??al);for(B.value=Y,M(Y);te<Y.length&&Y.charAt(te-1)!==q;)te+=1;ie?ee(B,H,H):ee(B,te,te),N.target.value=Y,R(Y),(F=h.current)===null||F===void 0||F.call(h,Y),(_=y.current)===null||_===void 0||_.call(y,N)};return S.createElement(b,Dt({},m,{ref:g,pattern:L,onChange:O,defaultValue:Tg(m.defaultValue)?j:void 0,value:Tg(m.value)?C(m.value,m.value):m.value}))}),Tg=function(e){return typeof e=="string"},_0=S.forwardRef(function(e,t){return hR(e.mask)?S.createElement(yR,Dt({},e,{mask:void 0,ref:t})):xR(e.mask)?S.createElement(wR,Dt({},e,{mask:void 0,ref:t})):S.createElement(AR,Dt({},e,{ref:t}))}),an=function(e){return function(t){return S.createElement(_0,Dt({},e,t))}};an(Xt.cellTelephone);an(Xt.cellphone);an(Xt.cep);an(Xt.cnpj);an(Xt.color);an(Xt.cpf);an(Xt.cpfCnpj);an(Xt.creditCard);an(Xt.date);an(Xt.int);an(Xt.isoDate);an(Xt.telephone);an(Xt.time);an(Xt.uuid);var F0=S.forwardRef(function(t,n){var r=S.useMemo(function(){if(t.mask)return typeof t.mask=="string"&&mR(Xt,t.mask)?Xt[t.mask]:{mask:t.mask}},[t.mask]),o=Dt(Dt({},t),r);return S.createElement(_0,Dt({},o,{ref:n}))});const L0=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const PR=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const OR=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Eg=e=>{const t=OR(e);return t.charAt(0).toUpperCase()+t.slice(1)};var jR={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const DR=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const MR=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>S.createElement("svg",{ref:l,...jR,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:L0("lucide",o),...!i&&!DR(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,u])=>S.createElement(c,u)),...Array.isArray(i)?i:[i]]));const Qe=(e,t)=>{const n=S.forwardRef(({className:r,...o},i)=>S.createElement(MR,{ref:i,iconNode:t,className:L0(`lucide-${PR(Eg(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Eg(e),n};const NR=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]],_R=Qe("arrow-down-0-1",NR);const FR=[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["rect",{x:"15",y:"4",width:"4",height:"6",ry:"2",key:"1bwicg"}],["path",{d:"M17 20v-6h-2",key:"1qp1so"}],["path",{d:"M15 20h4",key:"1j968p"}]],LR=Qe("arrow-up-0-1",FR);const VR=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],V0=Qe("arrow-up-down",VR);const $R=[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]],zR=Qe("audio-lines",$R);const BR=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],$0=Qe("calendar",BR);const HR=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],gp=Qe("chevron-down",HR);const WR=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],z0=Qe("chevron-left",WR);const qR=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Kl=Qe("chevron-right",qR);const UR=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],yp=Qe("circle-check-big",UR);const GR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],YR=Qe("circle-plus",GR);const KR=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],ZR=Qe("circle-x",KR);const XR=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],QR=Qe("command",XR);const JR=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],eI=Qe("file-braces",JR);const tI=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Cg=Qe("file-text",tI);const nI=[["path",{d:"M4 12V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2",key:"jrl274"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 17.843 3.033-1.755a.64.64 0 0 1 .967.56v4.704a.65.65 0 0 1-.967.56L10 20.157",key:"17aeo9"}],["rect",{width:"7",height:"6",x:"3",y:"16",rx:"1",key:"s27ndx"}]],kg=Qe("file-video-camera",nI);const rI=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],B0=Qe("file",rI);const oI=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],iI=Qe("folder-open",oI);const sI=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],aI=Qe("folder",sI);const lI=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Du=Qe("funnel",lI);const cI=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],uI=Qe("grip-vertical",cI);const dI=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],jr=Qe("info",dI);const fI=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],pI=Qe("list-filter",fI);const mI=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],hI=Qe("loader-circle",mI);const gI=[["path",{d:"M3 3h6l6 18h6",key:"ph9rgk"}],["path",{d:"M14 3h7",key:"16f0ms"}]],yI=Qe("option",gI);const vI=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],vp=Qe("plus",vI);const xI=[["path",{d:"m8 11 2 2 4-4",key:"1sed1v"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],bI=Qe("search-check",xI);const wI=[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],SI=Qe("search-x",wI);const TI=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]],Mu=Qe("sheet",TI);const EI=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Zl=Qe("trash-2",EI);const CI=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Xd=Qe("triangle-alert",CI);const kI=[["rect",{width:"8",height:"6",x:"5",y:"4",rx:"1",key:"nzclkv"}],["rect",{width:"8",height:"6",x:"11",y:"14",rx:"1",key:"4tytwb"}]],RI=Qe("ungroup",kI);const II=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Pi=Qe("x",II),Xl={hex:e=>e,raw:e=>e,hsl:e=>`hsl(${e})`,rgb:e=>`rgb(${e})`,z:(e,t,n)=>`var(--z-${n})`,hsla:e=>`hsla(${e})`,rgba:e=>`rgba(${e})`,cssVariable:(e,t,n)=>`var(--${n})`,formatWithVar:e=>(t,n,r)=>`${e}(var(--${r}), <alpha-value>)`},Ar=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return o.concat(t(s,l,a))}return o.concat(Ar(s,t,n,a))},[]),H0=(e,t,n="",r="")=>Object.entries(e).reduce((o,[i,s])=>{const a=r===""?`${n}${i}`:`${r}-${i}`;if(typeof s=="string"){const l=r===""?`${n}${i}`:i;return{...o,[l]:t(s,i,a)}}return{...o,[i]:H0(s,t,n,a)}},{}),Rg={default:e=>`:root { ${e} }`,dark:e=>`html.dark {${e}}`},ll=(e,t)=>{const n=t.value||((o,i)=>i),r=e.map(o=>`${o.key}: ${n(o.key,o.value)}`).join(";");return t.result(r)},AI={default:e=>ll(e,{result:Rg.default}),dark:e=>ll(e,{result:Rg.dark})},Fo=e=>(t,n,r)=>{const o={key:`--${r}`,value:`${t}`};return e?e(o):o},PI=e=>({key:e.key.replace(/^--/,"--z-"),value:e.value}),xp=(e,t)=>{const n=Ar(e.colors,Fo(t?.colors)),r=Ar(e.spacing,Fo(t?.spacing)),o=Ar(e.rounded,Fo(t?.rounded)),i=Ar(e.shadow,Fo(t?.rounded)),s=Ar(e.zIndex,Fo(t?.zIndex??PI)),a=e.custom?Ar(e.custom,Fo(t?.customTokens)):[];return n.concat(r,o,a,s,i)},OI=(e,t)=>ll(xp(e),{result:n=>`html${t?`.${t}`:""} {${n}}`,value:(n,r)=>r.replace("hsla(","").replace(")","")}),jI=(e,t)=>xp(e,t).reduce((r,o)=>({...r,[o.key]:o.value}),{}),DI=(e,t)=>ll(xp(e,t),{result:n=>`html${t?.name?`.${t.name}`:""} {${n}}`,value:(n,r)=>r}),Ql={autocompleteEmpty:"Nothing here...",calendarBackMonth:"Back month",calendarFromDate:"From",calendarMonthLabel:"Month",calendarNextMonth:"Next month",calendarDatetimeTitle:"Time",calendarToDate:"To",calendarToday:"Today",pageCalendarMonthView:"Month view",pageCalendarWeekView:"Week view",pageCalendarDayView:"Day view",pageCalendarPrevious:"Previous",pageCalendarNext:"Next",pageCalendarToday:"Today",pageCalendarAddEvent:"Add event",pageCalendarWeekLabel:e=>`Week ${e}`,pageCalendarFilter:"Filter:",pageCalendarMoreEvents:e=>`+${e} more...`,pageCalendarLabel:"Calendar",pageCalendarNavigation:"Calendar navigation",pageCalendarMonthGrid:"Calendar month",pageCalendarFilterEnabled:"enabled",pageCalendarFilterDisabled:"disabled",pageCalendarEventCount:e=>e===1?"1 event":`${e} events`,pageCalendarEventAt:(e,t)=>`${e} at ${t}`,commandPaletteEmpty:"Nothing here...",commandPaletteLoading:"Loading...",datePickerCalendarButtonLabel:"Click to open a date picker",emptyDataMessage:"No data",inputCaretDown:"Click to see all options",inputCloseValue:"Click to clear the value",inputOptionalLabel:"Optional",wizardNext:"Next",wizardPrev:"Previous",wizardFinish:"Finish",wizardSkip:"Skip",multiSelectInnerPlaceholder:"Search...",multiSelectSelectedLabel:"Selected",tableColumnResizer:"Resize column",tableFilterColumnPlaceholder:"Filter by",tableFilterColumnTitle:"Filter by",tableFilterDropdownTitle:"Filters",tableFilterDropdownTitleUnique:"Filter by",tableFilterLabel:"Filters",tableFilterNewFilter:"New filter",tableFilterOperatorPlaceholder:"Equals to...",tableFilterOperatorTitle:"Operation",tableFilterTypeContains:"Contains",tableFilterTypeEndsWith:"Ends with",tableFilterTypeGreaterThan:"Greater than",tableFilterTypeIs:"Is",tableFilterTypeIsNot:"Is not",tableFilterTypeLessThan:"Less than",tableFilterTypeNotContains:"Not contains",tableFilterTypeStartsWith:"Starts with",tableFilterValuePlaceholder:"Something...",tableFilterValueTitle:"Value",tableGroupLabel:"Group",tableGroupLabelWithCount:"Group",tablePaginationFooter:e=>p.jsxs(S.Fragment,{children:[e.current," to ",e.pages," of ",e.totalItems," items.",Array.isArray(e.sizes)?e.select:null," ","per page."]}),tablePaginationNext:"Next",tablePaginationPrevious:"Previous",tablePaginationSelectLabel:"Select the size of page",tableSortAddButton:"Add sort",tableSortAsc:"Ascending",tableSortDesc:"Descending",tableSortDropdownTitle:"Order by",tableSortOrderByLabel:"Order by",tableSortOrderInputPlaceholder:"Order by",tableSortOrderInputTitle:"Order by",tableSortTypeInputPlaceholder:"Ascending",tableSortTypeInputTitle:"Sort type",uploadIdle:"You can drag your files here",uploadIdleButton:"Choose your files",uploadDragging:e=>`Dragging ${e.n} ${e.n>0?"files":"file"}`,uploadDialogTitle:"Details of your file",datepickerPlaceholder:e=>"day/month/year"},Jl={input:{iconFeedback:!0},table:{operations:!0,sorters:!0,filters:!0,sticky:void 0}},ko=S.createContext({parser:Xl.hsla,tweaks:Jl,floatingRef:void 0,map:Ql,locale:void 0}),yt=()=>{const e=S.useContext(ko);return e?e.map:Ql},bp=()=>{const e=S.useContext(ko);return e?e.tweaks:Jl};function ec(){return typeof window<"u"}function Ur(e){return tc(e)?(e.nodeName||"").toLowerCase():"#document"}function Gt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function or(e){var t;return(t=(tc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function tc(e){return ec()?e instanceof Node||e instanceof Gt(e).Node:!1}function rt(e){return ec()?e instanceof Element||e instanceof Gt(e).Element:!1}function It(e){return ec()?e instanceof HTMLElement||e instanceof Gt(e).HTMLElement:!1}function Ts(e){return!ec()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gt(e).ShadowRoot}const MI=new Set(["inline","contents"]);function Gs(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=yn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!MI.has(o)}const NI=new Set(["table","td","th"]);function _I(e){return NI.has(Ur(e))}const FI=[":popover-open",":modal"];function nc(e){return FI.some(t=>{try{return e.matches(t)}catch{return!1}})}const LI=["transform","translate","scale","rotate","perspective"],VI=["transform","translate","scale","rotate","perspective","filter"],$I=["paint","layout","strict","content"];function wp(e){const t=rc(),n=rt(e)?yn(e):e;return LI.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||VI.some(r=>(n.willChange||"").includes(r))||$I.some(r=>(n.contain||"").includes(r))}function zI(e){let t=hr(e);for(;It(t)&&!pr(t);){if(wp(t))return t;if(nc(t))return null;t=hr(t)}return null}function rc(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const BI=new Set(["html","body","#document"]);function pr(e){return BI.has(Ur(e))}function yn(e){return Gt(e).getComputedStyle(e)}function oc(e){return rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function hr(e){if(Ur(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ts(e)&&e.host||or(e);return Ts(t)?t.host:t}function W0(e){const t=hr(e);return pr(t)?e.ownerDocument?e.ownerDocument.body:e.body:It(t)&&Gs(t)?t:W0(t)}function _r(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=W0(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Gt(o);if(i){const a=Qd(s);return t.concat(s,s.visualViewport||[],Gs(o)?o:[],a&&n?_r(a):[])}return t.concat(o,_r(o,[],n))}function Qd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const HI=["top","right","bottom","left"],Ig=["start","end"],Ag=HI.reduce((e,t)=>e.concat(t,t+"-"+Ig[0],t+"-"+Ig[1]),[]),Vr=Math.min,dn=Math.max,cl=Math.round,Uo=Math.floor,Xn=e=>({x:e,y:e}),WI={left:"right",right:"left",bottom:"top",top:"bottom"},qI={start:"end",end:"start"};function Jd(e,t,n){return dn(e,Vr(t,n))}function Ro(e,t){return typeof e=="function"?e(t):e}function er(e){return e.split("-")[0]}function Mn(e){return e.split("-")[1]}function q0(e){return e==="x"?"y":"x"}function Sp(e){return e==="y"?"height":"width"}const UI=new Set(["top","bottom"]);function dr(e){return UI.has(er(e))?"y":"x"}function Tp(e){return q0(dr(e))}function U0(e,t,n){n===void 0&&(n=!1);const r=Mn(e),o=Tp(e),i=Sp(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=dl(s)),[s,dl(s)]}function GI(e){const t=dl(e);return[ul(e),t,ul(t)]}function ul(e){return e.replace(/start|end/g,t=>qI[t])}const Pg=["left","right"],Og=["right","left"],YI=["top","bottom"],KI=["bottom","top"];function ZI(e,t,n){switch(e){case"top":case"bottom":return n?t?Og:Pg:t?Pg:Og;case"left":case"right":return t?YI:KI;default:return[]}}function XI(e,t,n,r){const o=Mn(e);let i=ZI(er(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ul)))),i}function dl(e){return e.replace(/left|right|bottom|top/g,t=>WI[t])}function QI(e){return{top:0,right:0,bottom:0,left:0,...e}}function G0(e){return typeof e!="number"?QI(e):{top:e,right:e,bottom:e,left:e}}function fl(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}}var JI=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[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] *)"],pl=JI.join(","),Y0=typeof Element>"u",pi=Y0?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ml=!Y0&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},hl=function(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):hl(t.parentNode));return s},eA=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},K0=function(t,n,r){if(hl(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(pl));return n&&pi.call(t,pl)&&o.unshift(t),o=o.filter(r),o},gl=function(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!hl(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=gl(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=pi.call(s,pl);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!hl(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var m=gl(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,m):o.push({scopeParent:s,candidates:m})}else i.unshift.apply(i,s.children)}}return o},Z0=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},X0=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||eA(t))&&!Z0(t)?0:t.tabIndex},tA=function(t,n){var r=X0(t);return r<0&&n&&!Z0(t)?0:r},nA=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Q0=function(t){return t.tagName==="INPUT"},rA=function(t){return Q0(t)&&t.type==="hidden"},oA=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},iA=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},sA=function(t){if(!t.name)return!0;var n=t.form||ml(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){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",s.message),!1}var i=iA(o,t.form);return!i||i===t},aA=function(t){return Q0(t)&&t.type==="radio"},lA=function(t){return aA(t)&&!sA(t)},cA=function(t){var n,r=t&&ml(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=ml(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},jg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},uA=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var s=pi.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(pi.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var l=t;t;){var c=t.parentElement,u=ml(t);if(c&&!c.shadowRoot&&o(c)===!0)return jg(t);t.assignedSlot?t=t.assignedSlot:!c&&u!==t.ownerDocument?t=u.host:t=c}t=l}if(cA(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return jg(t);return!1},dA=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return pi.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},ef=function(t,n){return!(n.disabled||rA(n)||uA(n,t)||oA(n)||dA(n))},tf=function(t,n){return!(lA(n)||X0(n)<0||!ef(t,n))},fA=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},J0=function(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=tA(a,s),c=s?J0(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(nA).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Oi=function(t,n){n=n||{};var r;return n.getShadowRoot?r=gl([t],n.includeContainer,{filter:tf.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:fA}):r=K0(t,n.includeContainer,tf.bind(null,n)),J0(r)},pA=function(t,n){n=n||{};var r;return n.getShadowRoot?r=gl([t],n.includeContainer,{filter:ef.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=K0(t,n.includeContainer,ef.bind(null,n)),r},ew=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return pi.call(t,pl)===!1?!1:tf(n,t)};function Ep(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function tw(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function nw(){return/apple/i.test(navigator.vendor)}function nf(){const e=/android/i;return e.test(Ep())||e.test(tw())}function mA(){return Ep().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function rw(){return tw().includes("jsdom/")}const Dg="data-floating-ui-focusable",hA="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Nu="ArrowLeft",_u="ArrowRight",gA="ArrowUp",yA="ArrowDown";function Un(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function zt(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ts(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Gn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Fu(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function vA(e){return e.matches("html,body")}function Ut(e){return e?.ownerDocument||document}function Cp(e){return It(e)&&e.matches(hA)}function rf(e){return e?e.getAttribute("role")==="combobox"&&Cp(e):!1}function xA(e){if(!e||rw())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function yl(e){return e?e.hasAttribute(Dg)?e:e.querySelector("["+Dg+"]")||e:null}function go(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...go(e,o.id,n)])}function bA(e,t){let n,r=-1;function o(i,s){s>r&&(n=i,r=s),go(e,i).forEach(l=>{o(l.id,s+1)})}return o(t,0),e.find(i=>i.id===n)}function Mg(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(s=>s.id===o);o=i?.parentId,i&&(r=r.concat(i))}return r}function qt(e){e.preventDefault(),e.stopPropagation()}function wA(e){return"nativeEvent"in e}function ow(e){return e.mozInputSource===0&&e.isTrusted?!0:nf()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function iw(e){return rw()?!1:!nf()&&e.width===0&&e.height===0||nf()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function mi(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var SA=typeof document<"u",TA=function(){},nt=SA?S.useLayoutEffect:TA;const EA={...A};function Bt(e){const t=A.useRef(e);return nt(()=>{t.current=e}),t}const CA=EA.useInsertionEffect,kA=CA||(e=>e());function kt(e){const t=A.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return kA(()=>{t.current=e}),A.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function va(e,t,n){return Math.floor(e/t)!==n}function is(e,t){return t<0||t>=e.current.length}function Lu(e,t){return Kt(e,{disabledIndices:t})}function Ng(e,t){return Kt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Kt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t,s=n;do s+=r?-i:i;while(s>=0&&s<=e.current.length-1&&qa(e,s,o));return s}function RA(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:s,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===gA){if(d&&qt(n),u===-1)f=c;else if(f=Kt(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:a}),o&&(u-s<l||f<0)){const m=u%s,g=c%s,y=c-(g-m);g===m?f=c:f=g>m?y:y-s}is(e,f)&&(f=u)}if(n.key===yA&&(d&&qt(n),u===-1?f=l:(f=Kt(e,{startingIndex:u,amount:s,disabledIndices:a}),o&&u+s>c&&(f=Kt(e,{startingIndex:u%s-s,amount:s,disabledIndices:a}))),is(e,f)&&(f=u)),r==="both"){const m=Uo(u/s);n.key===(i?Nu:_u)&&(d&&qt(n),u%s!==s-1?(f=Kt(e,{startingIndex:u,disabledIndices:a}),o&&va(f,s,m)&&(f=Kt(e,{startingIndex:u-u%s-1,disabledIndices:a}))):o&&(f=Kt(e,{startingIndex:u-u%s-1,disabledIndices:a})),va(f,s,m)&&(f=u)),n.key===(i?_u:Nu)&&(d&&qt(n),u%s!==0?(f=Kt(e,{startingIndex:u,decrement:!0,disabledIndices:a}),o&&va(f,s,m)&&(f=Kt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a}))):o&&(f=Kt(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:a})),va(f,s,m)&&(f=u));const g=Uo(c/s)===m;is(e,f)&&(o&&g?f=n.key===(i?_u:Nu)?c:Kt(e,{startingIndex:u-u%s-1,disabledIndices:a}):f=u)}return f}function IA(e,t,n){const r=[];let o=0;return e.forEach((i,s)=>{let{width:a,height:l}=i;if(a>t&&process.env.NODE_ENV!=="production")throw new Error("[Floating UI]: Invalid grid - item width at index "+s+" is greater than grid columns");let c=!1;for(n&&(o=0);!c;){const u=[];for(let d=0;d<a;d++)for(let f=0;f<l;f++)u.push(o+d+f*t);o%t+a<=t&&u.every(d=>r[d]==null)?(u.forEach(d=>{r[d]=s}),c=!0):o++}}),[...r]}function AA(e,t,n,r,o){if(e===-1)return-1;const i=n.indexOf(e),s=t[e];switch(o){case"tl":return i;case"tr":return s?i+s.width-1:i;case"bl":return s?i+(s.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function PA(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function qa(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Ys=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function sw(e,t){const n=Oi(e,Ys()),r=n.length;if(r===0)return;const o=Un(Ut(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function aw(e){return sw(Ut(e).body,1)||e}function lw(e){return sw(Ut(e).body,-1)||e}function ss(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!zt(n,r)}function OA(e){Oi(e,Ys()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function _g(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Fg(e,t,n){let{reference:r,floating:o}=e;const i=dr(t),s=Tp(t),a=Sp(s),l=er(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let m;switch(l){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Mn(t)){case"start":m[s]-=f*(n&&c?-1:1);break;case"end":m[s]+=f*(n&&c?-1:1);break}return m}async function jA(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=Ro(t,e),g=G0(m),h=a[f?d==="floating"?"reference":"floating":d],v=fl(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(h)))==null||n?h:h.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),T=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},E=fl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:b,strategy:l}):x);return{top:(v.top-E.top+g.top)/T.y,bottom:(E.bottom-v.bottom+g.bottom)/T.y,left:(v.left-E.left+g.left)/T.x,right:(E.right-v.right+g.right)/T.x}}const DA=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Fg(c,r,l),f=r,m={},g=0;for(let h=0;h<a.length;h++){var y;const{name:v,fn:x}=a[h],{x:b,y:T,data:E,reset:R}=await x({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:{...s,detectOverflow:(y=s.detectOverflow)!=null?y:jA},elements:{reference:e,floating:t}});u=b??u,d=T??d,m={...m,[v]:{...m[v],...E}},R&&g<=50&&(g++,typeof R=="object"&&(R.placement&&(f=R.placement),R.rects&&(c=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:u,y:d}=Fg(c,f,l)),h=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}},MA=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Ro(e,t)||{};if(c==null)return{};const d=G0(u),f={x:n,y:r},m=Tp(o),g=Sp(m),y=await s.getDimensions(c),h=m==="y",v=h?"top":"left",x=h?"bottom":"right",b=h?"clientHeight":"clientWidth",T=i.reference[g]+i.reference[m]-f[m]-i.floating[g],E=f[m]-i.reference[m],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let w=R?R[b]:0;(!w||!await(s.isElement==null?void 0:s.isElement(R)))&&(w=a.floating[b]||i.floating[g]);const C=T/2-E/2,I=w/2-y[g]/2-1,P=Vr(d[v],I),M=Vr(d[x],I),j=P,L=w-y[g]-M,O=w/2-y[g]/2+C,N=Jd(j,O,L),V=!l.arrow&&Mn(o)!=null&&O!==N&&i.reference[g]/2-(O<j?P:M)-y[g]/2<0,D=V?O<j?O-j:O-L:0;return{[m]:f[m]+D,data:{[m]:N,centerOffset:O-N-D,...V&&{alignmentOffset:D}},reset:V}}});function NA(e,t,n){return(e?[...n.filter(o=>Mn(o)===e),...n.filter(o=>Mn(o)!==e)]:n.filter(o=>er(o)===o)).filter(o=>e?Mn(o)===e||(t?ul(o)!==o:!1):!0)}const _A=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o;const{rects:i,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:u=!1,alignment:d,allowedPlacements:f=Ag,autoAlignment:m=!0,...g}=Ro(e,t),y=d!==void 0||f===Ag?NA(d||null,m,f):f,h=await l.detectOverflow(t,g),v=((n=s.autoPlacement)==null?void 0:n.index)||0,x=y[v];if(x==null)return{};const b=U0(x,i,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==x)return{reset:{placement:y[0]}};const T=[h[er(x)],h[b[0]],h[b[1]]],E=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:x,overflows:T}],R=y[v+1];if(R)return{data:{index:v+1,overflows:E},reset:{placement:R}};const w=E.map(P=>{const M=Mn(P.placement);return[P.placement,M&&u?P.overflows.slice(0,2).reduce((j,L)=>j+L,0):P.overflows[0],P.overflows]}).sort((P,M)=>P[1]-M[1]),I=((o=w.filter(P=>P[2].slice(0,Mn(P[0])?2:3).every(M=>M<=0))[0])==null?void 0:o[0])||w[0][0];return I!==a?{data:{index:v+1,overflows:E},reset:{placement:I}}:{}}}},FA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:y=!0,...h}=Ro(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=er(o),x=dr(a),b=er(a)===a,T=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(b||!y?[dl(a)]:GI(a)),R=g!=="none";!f&&R&&E.push(...XI(a,y,g,T));const w=[a,...E],C=await l.detectOverflow(t,h),I=[];let P=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&I.push(C[v]),d){const O=U0(o,s,T);I.push(C[O[0]],C[O[1]])}if(P=[...P,{placement:o,overflows:I}],!I.every(O=>O<=0)){var M,j;const O=(((M=i.flip)==null?void 0:M.index)||0)+1,N=w[O];if(N&&(!(d==="alignment"?x!==dr(N):!1)||P.every(k=>dr(k.placement)===x?k.overflows[0]>0:!0)))return{data:{index:O,overflows:P},reset:{placement:N}};let V=(j=P.filter(D=>D.overflows[0]<=0).sort((D,k)=>D.overflows[1]-k.overflows[1])[0])==null?void 0:j.placement;if(!V)switch(m){case"bestFit":{var L;const D=(L=P.filter(k=>{if(R){const F=dr(k.placement);return F===x||F==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(F=>F>0).reduce((F,_)=>F+_,0)]).sort((k,F)=>k[1]-F[1])[0])==null?void 0:L[0];D&&(V=D);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}},LA=new Set(["left","top"]);async function VA(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=er(n),a=Mn(n),l=dr(n)==="y",c=LA.has(s)?-1:1,u=i&&l?-1:1,d=Ro(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(m=a==="end"?g*-1:g),l?{x:m*u,y:f*c}:{x:f*c,y:m*u}}const $A=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await VA(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},zA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x,y:b}=v;return{x,y:b}}},...c}=Ro(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),f=dr(er(o)),m=q0(f);let g=u[m],y=u[f];if(s){const v=m==="y"?"top":"left",x=m==="y"?"bottom":"right",b=g+d[v],T=g-d[x];g=Jd(b,g,T)}if(a){const v=f==="y"?"top":"left",x=f==="y"?"bottom":"right",b=y+d[v],T=y-d[x];y=Jd(b,y,T)}const h=l.fn({...t,[m]:g,[f]:y});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[m]:s,[f]:a}}}}}},BA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=Ro(e,t),u=await s.detectOverflow(t,c),d=er(o),f=Mn(o),m=dr(o)==="y",{width:g,height:y}=i.floating;let h,v;d==="top"||d==="bottom"?(h=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,h=f==="end"?"top":"bottom");const x=y-u.top-u.bottom,b=g-u.left-u.right,T=Vr(y-u[h],x),E=Vr(g-u[v],b),R=!t.middlewareData.shift;let w=T,C=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(C=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=x),R&&!f){const P=dn(u.left,0),M=dn(u.right,0),j=dn(u.top,0),L=dn(u.bottom,0);m?C=g-2*(P!==0||M!==0?P+M:dn(u.left,u.right)):w=y-2*(j!==0||L!==0?j+L:dn(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:w});const I=await s.getDimensions(a.floating);return g!==I.width||y!==I.height?{reset:{rects:!0}}:{}}}};function cw(e){const t=yn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=It(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=cl(n)!==i||cl(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function kp(e){return rt(e)?e:e.contextElement}function ti(e){const t=kp(e);if(!It(t))return Xn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=cw(t);let s=(i?cl(n.width):n.width)/r,a=(i?cl(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const HA=Xn(0);function uw(e){const t=Gt(e);return!rc()||!t.visualViewport?HA:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function WA(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gt(e)?!1:t}function vo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=kp(e);let s=Xn(1);t&&(r?rt(r)&&(s=ti(r)):s=ti(e));const a=WA(i,n,r)?uw(i):Xn(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=Gt(i),m=r&&rt(r)?Gt(r):r;let g=f,y=Qd(g);for(;y&&r&&m!==g;){const h=ti(y),v=y.getBoundingClientRect(),x=yn(y),b=v.left+(y.clientLeft+parseFloat(x.paddingLeft))*h.x,T=v.top+(y.clientTop+parseFloat(x.paddingTop))*h.y;l*=h.x,c*=h.y,u*=h.x,d*=h.y,l+=b,c+=T,g=Gt(y),y=Qd(g)}}return fl({width:u,height:d,x:l,y:c})}function ic(e,t){const n=oc(e).scrollLeft;return t?t.left+n:vo(or(e)).left+n}function dw(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ic(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function qA(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=or(r),a=t?nc(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Xn(1);const u=Xn(0),d=It(r);if((d||!d&&!i)&&((Ur(r)!=="body"||Gs(s))&&(l=oc(r)),It(r))){const m=vo(r);c=ti(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const f=s&&!d&&!i?dw(s,l):Xn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function UA(e){return Array.from(e.getClientRects())}function GA(e){const t=or(e),n=oc(e),r=e.ownerDocument.body,o=dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ic(e);const a=-n.scrollTop;return yn(r).direction==="rtl"&&(s+=dn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Lg=25;function YA(e,t){const n=Gt(e),r=or(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=rc();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=ic(r);if(c<=0){const u=r.ownerDocument,d=u.body,f=getComputedStyle(d),m=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-m);g<=Lg&&(i-=g)}else c<=Lg&&(i+=c);return{width:i,height:s,x:a,y:l}}const KA=new Set(["absolute","fixed"]);function ZA(e,t){const n=vo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=It(e)?ti(e):Xn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Vg(e,t,n){let r;if(t==="viewport")r=YA(e,n);else if(t==="document")r=GA(or(e));else if(rt(t))r=ZA(t,n);else{const o=uw(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return fl(r)}function fw(e,t){const n=hr(e);return n===t||!rt(n)||pr(n)?!1:yn(n).position==="fixed"||fw(n,t)}function XA(e,t){const n=t.get(e);if(n)return n;let r=_r(e,[],!1).filter(a=>rt(a)&&Ur(a)!=="body"),o=null;const i=yn(e).position==="fixed";let s=i?hr(e):e;for(;rt(s)&&!pr(s);){const a=yn(s),l=wp(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&KA.has(o.position)||Gs(s)&&!l&&fw(e,s))?r=r.filter(u=>u!==s):o=a,s=hr(s)}return t.set(e,r),r}function QA(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?nc(t)?[]:XA(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Vg(t,u,o);return c.top=dn(d.top,c.top),c.right=Vr(d.right,c.right),c.bottom=Vr(d.bottom,c.bottom),c.left=dn(d.left,c.left),c},Vg(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function JA(e){const{width:t,height:n}=cw(e);return{width:t,height:n}}function eP(e,t,n){const r=It(t),o=or(t),i=n==="fixed",s=vo(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Xn(0);function c(){l.x=ic(o)}if(r||!r&&!i)if((Ur(t)!=="body"||Gs(o))&&(a=oc(t)),r){const m=vo(t,!0,i,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?dw(o,a):Xn(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function Vu(e){return yn(e).position==="static"}function $g(e,t){if(!It(e)||yn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return or(e)===n&&(n=n.ownerDocument.body),n}function pw(e,t){const n=Gt(e);if(nc(e))return n;if(!It(e)){let o=hr(e);for(;o&&!pr(o);){if(rt(o)&&!Vu(o))return o;o=hr(o)}return n}let r=$g(e,t);for(;r&&_I(r)&&Vu(r);)r=$g(r,t);return r&&pr(r)&&Vu(r)&&!wp(r)?n:r||zI(e)||n}const tP=async function(e){const t=this.getOffsetParent||pw,n=this.getDimensions,r=await n(e.floating);return{reference:eP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nP(e){return yn(e).direction==="rtl"}const rP={convertOffsetParentRelativeRectToViewportRelativeRect:qA,getDocumentElement:or,getClippingRect:QA,getOffsetParent:pw,getElementRects:tP,getClientRects:UA,getDimensions:JA,getScale:ti,isElement:rt,isRTL:nP};function mw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function oP(e,t){let n=null,r;const o=or(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:m}=c;if(a||t(),!f||!m)return;const g=Uo(d),y=Uo(o.clientWidth-(u+f)),h=Uo(o.clientHeight-(d+m)),v=Uo(u),b={rootMargin:-g+"px "+-y+"px "+-h+"px "+-v+"px",threshold:dn(0,Vr(1,l))||1};let T=!0;function E(R){const w=R[0].intersectionRatio;if(w!==l){if(!T)return s();w?s(!1,w):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!mw(c,e.getBoundingClientRect())&&s(),T=!1}try{n=new IntersectionObserver(E,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return s(!0),i}function Io(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=kp(e),u=o||i?[...c?_r(c):[],..._r(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=c&&a?oP(c,n):null;let f=-1,m=null;s&&(m=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),c&&!l&&m.observe(c),m.observe(t));let g,y=l?vo(e):null;l&&h();function h(){const v=vo(e);y&&!mw(y,v)&&n(),y=v,g=requestAnimationFrame(h)}return n(),()=>{var v;u.forEach(x=>{o&&x.removeEventListener("scroll",n),i&&x.removeEventListener("resize",n)}),d?.(),(v=m)==null||v.disconnect(),m=null,l&&cancelAnimationFrame(g)}}const iP=$A,sP=_A,aP=zA,lP=FA,cP=BA,zg=MA,uP=(e,t,n)=>{const r=new Map,o={platform:rP,...n},i={...o.platform,_c:r};return DA(e,t,{...o,platform:i})};var dP=typeof document<"u",fP=function(){},Ua=dP?S.useLayoutEffect:fP;function vl(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!vl(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;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!vl(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function hw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bg(e,t){const n=hw(e);return Math.round(t*n)/n}function $u(e){const t=A.useRef(e);return Ua(()=>{t.current=e}),t}function pP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=A.useState(r);vl(f,r)||m(r);const[g,y]=A.useState(null),[h,v]=A.useState(null),x=A.useCallback(k=>{k!==R.current&&(R.current=k,y(k))},[]),b=A.useCallback(k=>{k!==w.current&&(w.current=k,v(k))},[]),T=i||g,E=s||h,R=A.useRef(null),w=A.useRef(null),C=A.useRef(u),I=l!=null,P=$u(l),M=$u(o),j=$u(c),L=A.useCallback(()=>{if(!R.current||!w.current)return;const k={placement:t,strategy:n,middleware:f};M.current&&(k.platform=M.current),uP(R.current,w.current,k).then(F=>{const _={...F,isPositioned:j.current!==!1};O.current&&!vl(C.current,_)&&(C.current=_,xr.flushSync(()=>{d(_)}))})},[f,t,n,M,j]);Ua(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(k=>({...k,isPositioned:!1})))},[c]);const O=A.useRef(!1);Ua(()=>(O.current=!0,()=>{O.current=!1}),[]),Ua(()=>{if(T&&(R.current=T),E&&(w.current=E),T&&E){if(P.current)return P.current(T,E,L);L()}},[T,E,L,P,I]);const N=A.useMemo(()=>({reference:R,floating:w,setReference:x,setFloating:b}),[x,b]),V=A.useMemo(()=>({reference:T,floating:E}),[T,E]),D=A.useMemo(()=>{const k={position:n,left:0,top:0};if(!V.floating)return k;const F=Bg(V.floating,u.x),_=Bg(V.floating,u.y);return a?{...k,transform:"translate("+F+"px, "+_+"px)",...hw(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:_}},[n,a,V.floating,u.x,u.y]);return A.useMemo(()=>({...u,update:L,refs:N,elements:V,floatingStyles:D}),[u,L,N,V,D])}const mP=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?zg({element:r.current,padding:o}).fn(n):{}:r?zg({element:r,padding:o}).fn(n):{}}}},ji=(e,t)=>({...iP(e),options:[e,t]}),sc=(e,t)=>({...aP(e),options:[e,t]}),ac=(e,t)=>({...lP(e),options:[e,t]}),gw=(e,t)=>({...cP(e),options:[e,t]}),yw=(e,t)=>({...sP(e),options:[e,t]}),Rp=(e,t)=>({...mP(e),options:[e,t]});function hP(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 vw=A.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function gP(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,i]=A.useState(()=>new Set),s=A.useCallback(c=>{i(u=>new Set(u).add(c))},[]),a=A.useCallback(c=>{i(u=>{const d=new Set(u);return d.delete(c),d})},[]),l=A.useMemo(()=>{const c=new Map;return Array.from(o.keys()).sort(hP).forEach((d,f)=>{c.set(d,f)}),c},[o]);return p.jsx(vw.Provider,{value:A.useMemo(()=>({register:s,unregister:a,map:l,elementsRef:n,labelsRef:r}),[s,a,l,n,r]),children:t})}function xw(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:i,labelsRef:s}=A.useContext(vw),[a,l]=A.useState(null),c=A.useRef(null),u=A.useCallback(d=>{if(c.current=d,a!==null&&(i.current[a]=d,s)){var f;const m=t!==void 0;s.current[a]=m?t:(f=d?.textContent)!=null?f:null}},[a,i,s,t]);return nt(()=>{const d=c.current;if(d)return n(d),()=>{r(d)}},[n,r]),nt(()=>{const d=c.current?o.get(c.current):null;d!=null&&l(d)},[o]),A.useMemo(()=>({ref:u,index:a??-1}),[a,u])}const yP="data-floating-ui-focusable",Hg="active",Wg="selected",Ks="ArrowLeft",Zs="ArrowRight",bw="ArrowUp",lc="ArrowDown",vP={...A};let qg=!1,xP=0;const Ug=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+xP++;function bP(){const[e,t]=A.useState(()=>qg?Ug():void 0);return nt(()=>{e==null&&t(Ug())},[]),A.useEffect(()=>{qg=!0},[]),e}const wP=vP.useId,Xs=wP||bP;let Es;process.env.NODE_ENV!=="production"&&(Es=new Set);function Ga(){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(" ");if(!((e=Es)!=null&&e.has(o))){var i;(i=Es)==null||i.add(o),console.warn(o)}}function SP(){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(" ");if(!((e=Es)!=null&&e.has(o))){var i;(i=Es)==null||i.add(o),console.error(o)}}const Ip=A.forwardRef(function(t,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:f,d:m,style:{transform:g,...y}={},...h}=t;process.env.NODE_ENV!=="production"&&(n||Ga("The `ref` prop is required for `FloatingArrow`."));const v=Xs(),[x,b]=A.useState(!1);if(nt(()=>{if(!o)return;yn(o).direction==="rtl"&&b(!0)},[o]),!o)return null;const[T,E]=r.split("-"),R=T==="top"||T==="bottom";let w=d;(R&&s!=null&&s.x||!R&&s!=null&&s.y)&&(w=null);const C=u*2,I=C/2,P=a/2*(c/-8+1),M=l/2*c/4,j=!!m,L=w&&E==="end"?"bottom":"top";let O=w&&E==="end"?"right":"left";w&&x&&(O=E==="end"?"left":"right");const N=i?.x!=null?w||i.x:"",V=i?.y!=null?w||i.y:"",D=m||"M0,0"+(" H"+a)+(" L"+(a-P)+","+(l-M))+(" Q"+a/2+","+l+" "+P+","+(l-M))+" Z",k={top:j?"rotate(180deg)":"",left:j?"rotate(90deg)":"rotate(-90deg)",bottom:j?"":"rotate(180deg)",right:j?"rotate(-90deg)":"rotate(90deg)"}[T];return p.jsxs("svg",{...h,"aria-hidden":!0,ref:n,width:j?a:a+C,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[O]:N,[L]:V,[T]:R||j?"100%":"calc(100% - "+C/2+"px)",transform:[k,g].filter(F=>!!F).join(" "),...y},children:[C>0&&p.jsx("path",{clipPath:"url(#"+v+")",fill:"none",stroke:f,strokeWidth:C+(m?0:1),d:D}),p.jsx("path",{stroke:C&&!m?h.fill:"none",d:D}),p.jsx("clipPath",{id:v,children:p.jsx("rect",{x:-I,y:I*(j?-1:1),width:a+C,height:a})})]})});function ww(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Sw=A.createContext(null),Tw=A.createContext(null),Gr=()=>{var e;return((e=A.useContext(Sw))==null?void 0:e.id)||null},Yr=()=>A.useContext(Tw);function TP(e){const t=Xs(),n=Yr(),o=Gr();return nt(()=>{if(!t)return;const i={id:t,parentId:o};return n?.addNode(i),()=>{n?.removeNode(i)}},[n,t,o]),t}function EP(e){const{children:t,id:n}=e,r=Gr();return p.jsx(Sw.Provider,{value:A.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function CP(e){const{children:t}=e,n=A.useRef([]),r=A.useCallback(s=>{n.current=[...n.current,s]},[]),o=A.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),[i]=A.useState(()=>ww());return p.jsx(Tw.Provider,{value:A.useMemo(()=>({nodesRef:n,addNode:r,removeNode:o,events:i}),[r,o,i]),children:t})}function xo(e){return"data-floating-ui-"+e}function Ht(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const Gg=xo("safe-polygon");function zu(e,t,n){if(n&&!mi(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function Bu(e){return typeof e=="function"?e():e}function Ap(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,m=Yr(),g=Gr(),y=Bt(c),h=Bt(l),v=Bt(n),x=Bt(d),b=A.useRef(),T=A.useRef(-1),E=A.useRef(),R=A.useRef(-1),w=A.useRef(!0),C=A.useRef(!1),I=A.useRef(()=>{}),P=A.useRef(!1),M=kt(()=>{var D;const k=(D=o.current.openEvent)==null?void 0:D.type;return k?.includes("mouse")&&k!=="mousedown"});A.useEffect(()=>{if(!a)return;function D(k){let{open:F}=k;F||(Ht(T),Ht(R),w.current=!0,P.current=!1)}return i.on("openchange",D),()=>{i.off("openchange",D)}},[a,i]),A.useEffect(()=>{if(!a||!y.current||!n)return;function D(F){M()&&r(!1,F,"hover")}const k=Ut(s.floating).documentElement;return k.addEventListener("mouseleave",D),()=>{k.removeEventListener("mouseleave",D)}},[s.floating,n,r,a,y,M]);const j=A.useCallback(function(D,k,F){k===void 0&&(k=!0),F===void 0&&(F="hover");const _=zu(h.current,"close",b.current);_&&!E.current?(Ht(T),T.current=window.setTimeout(()=>r(!1,D,F),_)):k&&(Ht(T),r(!1,D,F))},[h,r]),L=kt(()=>{I.current(),E.current=void 0}),O=kt(()=>{if(C.current){const D=Ut(s.floating).body;D.style.pointerEvents="",D.removeAttribute(Gg),C.current=!1}}),N=kt(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);A.useEffect(()=>{if(!a)return;function D(U){if(Ht(T),w.current=!1,u&&!mi(b.current)||Bu(x.current)>0&&!zu(h.current,"open"))return;const G=zu(h.current,"open",b.current);G?T.current=window.setTimeout(()=>{v.current||r(!0,U,"hover")},G):n||r(!0,U,"hover")}function k(U){if(N()){O();return}I.current();const G=Ut(s.floating);if(Ht(R),P.current=!1,y.current&&o.current.floatingContext){n||Ht(T),E.current=y.current({...o.current.floatingContext,tree:m,x:U.clientX,y:U.clientY,onClose(){O(),L(),N()||j(U,!0,"safe-polygon")}});const ee=E.current;G.addEventListener("mousemove",ee),I.current=()=>{G.removeEventListener("mousemove",ee)};return}(b.current!=="touch"||!zt(s.floating,U.relatedTarget))&&j(U)}function F(U){N()||o.current.floatingContext&&(y.current==null||y.current({...o.current.floatingContext,tree:m,x:U.clientX,y:U.clientY,onClose(){O(),L(),N()||j(U)}})(U))}function _(){Ht(T)}function B(U){N()||j(U,!1)}if(rt(s.domReference)){const U=s.domReference,G=s.floating;return n&&U.addEventListener("mouseleave",F),f&&U.addEventListener("mousemove",D,{once:!0}),U.addEventListener("mouseenter",D),U.addEventListener("mouseleave",k),G&&(G.addEventListener("mouseleave",F),G.addEventListener("mouseenter",_),G.addEventListener("mouseleave",B)),()=>{n&&U.removeEventListener("mouseleave",F),f&&U.removeEventListener("mousemove",D),U.removeEventListener("mouseenter",D),U.removeEventListener("mouseleave",k),G&&(G.removeEventListener("mouseleave",F),G.removeEventListener("mouseenter",_),G.removeEventListener("mouseleave",B))}}},[s,a,e,u,f,j,L,O,r,n,v,m,h,y,o,N,x]),nt(()=>{var D;if(a&&n&&(D=y.current)!=null&&(D=D.__options)!=null&&D.blockPointerEvents&&M()){C.current=!0;const F=s.floating;if(rt(s.domReference)&&F){var k;const _=Ut(s.floating).body;_.setAttribute(Gg,"");const B=s.domReference,U=m==null||(k=m.nodesRef.current.find(G=>G.id===g))==null||(k=k.context)==null?void 0:k.elements.floating;return U&&(U.style.pointerEvents=""),_.style.pointerEvents="none",B.style.pointerEvents="auto",F.style.pointerEvents="auto",()=>{_.style.pointerEvents="",B.style.pointerEvents="",F.style.pointerEvents=""}}}},[a,n,g,s,m,y,M]),nt(()=>{n||(b.current=void 0,P.current=!1,L(),O())},[n,L,O]),A.useEffect(()=>()=>{L(),Ht(T),Ht(R),O()},[a,s.domReference,L,O]);const V=A.useMemo(()=>{function D(k){b.current=k.pointerType}return{onPointerDown:D,onPointerEnter:D,onMouseMove(k){const{nativeEvent:F}=k;function _(){!w.current&&!v.current&&r(!0,F,"hover")}u&&!mi(b.current)||n||Bu(x.current)===0||P.current&&k.movementX**2+k.movementY**2<2||(Ht(R),b.current==="touch"?_():(P.current=!0,R.current=window.setTimeout(_,Bu(x.current))))}}},[u,r,n,v,x]);return A.useMemo(()=>a?{reference:V}:{},[a,V])}let Yg=0;function so(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Yg);const i=()=>e?.focus({preventScroll:n});o?i():Yg=requestAnimationFrame(i)}function Hu(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ts(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function kP(e){return"composedPath"in e?e.composedPath()[0]:e.target}function RP(e){return e?.ownerDocument||document}const ni={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function Kg(e){return e==="inert"?ni.inert:e==="aria-hidden"?ni["aria-hidden"]:ni.none}let xa=new WeakSet,ba={},Wu=0;const IP=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Ew=e=>e&&(e.host||Ew(e.parentNode)),AP=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ew(n);return e.contains(r)?r:null}).filter(n=>n!=null);function PP(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=AP(t,e),a=new Set,l=new Set(s),c=[];ba[o]||(ba[o]=new WeakMap);const u=ba[o];s.forEach(d),f(t),a.clear();function d(m){!m||a.has(m)||(a.add(m),m.parentNode&&d(m.parentNode))}function f(m){!m||l.has(m)||[].forEach.call(m.children,g=>{if(Ur(g)!=="script")if(a.has(g))f(g);else{const y=i?g.getAttribute(i):null,h=y!==null&&y!=="false",v=Kg(i),x=(v.get(g)||0)+1,b=(u.get(g)||0)+1;v.set(g,x),u.set(g,b),c.push(g),x===1&&h&&xa.add(g),b===1&&g.setAttribute(o,""),!h&&i&&g.setAttribute(i,i==="inert"?"":"true")}})}return Wu++,()=>{c.forEach(m=>{const g=Kg(i),h=(g.get(m)||0)-1,v=(u.get(m)||0)-1;g.set(m,h),u.set(m,v),h||(!xa.has(m)&&i&&m.removeAttribute(i),xa.delete(m)),v||m.removeAttribute(o)}),Wu--,Wu||(ni.inert=new WeakMap,ni["aria-hidden"]=new WeakMap,ni.none=new WeakMap,xa=new WeakSet,ba={})}}function Zg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=RP(e[0]).body;return PP(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Pp={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},xl=A.forwardRef(function(t,n){const[r,o]=A.useState();nt(()=>{nw()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[xo("focus-guard")]:"",style:Pp};return p.jsx("span",{...t,...i})}),OP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Cw=A.createContext(null),Xg=xo("portal");function jP(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Xs(),o=kw(),[i,s]=A.useState(null),a=A.useRef(null);return nt(()=>()=>{i?.remove(),queueMicrotask(()=>{a.current=null})},[i]),nt(()=>{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(Xg,""),l.appendChild(c),a.current=c,s(c)},[t,r]),nt(()=>{if(n===null||!r||a.current)return;let l=n||o?.portalNode;l&&!tc(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const u=document.createElement("div");u.id=r,u.setAttribute(Xg,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function br(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=jP({id:n,root:r}),[s,a]=A.useState(null),l=A.useRef(null),c=A.useRef(null),u=A.useRef(null),d=A.useRef(null),f=s?.modal,m=s?.open,g=!!s&&!s.modal&&s.open&&o&&!!(r||i);return A.useEffect(()=>{if(!i||!o||f)return;function y(h){i&&ss(h)&&(h.type==="focusin"?_g:OA)(i)}return i.addEventListener("focusin",y,!0),i.addEventListener("focusout",y,!0),()=>{i.removeEventListener("focusin",y,!0),i.removeEventListener("focusout",y,!0)}},[i,o,f]),A.useEffect(()=>{i&&(m||_g(i))},[m,i]),p.jsxs(Cw.Provider,{value:A.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[g&&i&&p.jsx(xl,{"data-type":"outside",ref:l,onFocus:y=>{if(ss(y,i)){var h;(h=u.current)==null||h.focus()}else{const v=s?s.domReference:null,x=lw(v);x?.focus()}}}),g&&i&&p.jsx("span",{"aria-owns":i.id,style:OP}),i&&xr.createPortal(t,i),g&&i&&p.jsx(xl,{"data-type":"outside",ref:c,onFocus:y=>{if(ss(y,i)){var h;(h=d.current)==null||h.focus()}else{const v=s?s.domReference:null,x=aw(v);x?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,y.nativeEvent,"focus-out")}}})]})}const kw=()=>A.useContext(Cw);function Qg(e){return A.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const DP=20;let Dr=[];function Op(){Dr=Dr.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function MP(e){Op(),e&&Ur(e)!=="body"&&(Dr.push(new WeakRef(e)),Dr.length>DP&&(Dr=Dr.slice(-20)))}function Jg(){Op();const e=Dr[Dr.length-1];return e?.deref()}function NP(e){const t=Ys();return ew(e,t)?e:Oi(e,t)[0]||e}function ey(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Ys(),i=pA(e,r).filter(a=>{const l=a.getAttribute("data-tabindex")||"";return ew(a,r)||a.hasAttribute("data-tabindex")&&!l.startsWith("-")}),s=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?s!=="0"&&e.setAttribute("tabindex","0"):(s!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const _P=A.forwardRef(function(t,n){return p.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Pp})});function Ao(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:m=()=>[]}=e,{open:g,onOpenChange:y,events:h,dataRef:v,elements:{domReference:x,floating:b}}=t,T=kt(()=>{var z;return(z=v.current.floatingContext)==null?void 0:z.nodeId}),E=kt(m),R=typeof s=="number"&&s<0,w=rf(x)&&R,C=IP(),I=C?i:!0,P=!I||C&&f,M=Bt(o),j=Bt(s),L=Bt(a),O=Yr(),N=kw(),V=A.useRef(null),D=A.useRef(null),k=A.useRef(!1),F=A.useRef(!1),_=A.useRef(-1),B=A.useRef(-1),U=N!=null,G=yl(b),H=kt(function(z){return z===void 0&&(z=G),z?Oi(z,Ys()):[]}),ee=kt(z=>{const se=H(z);return M.current.map(le=>x&&le==="reference"?x:G&&le==="floating"?G:se).filter(Boolean).flat()});A.useEffect(()=>{if(r||!c)return;function z(le){if(le.key==="Tab"){zt(G,Un(Ut(G)))&&H().length===0&&!w&&qt(le);const Q=ee(),ce=Gn(le);M.current[0]==="reference"&&ce===x&&(qt(le),le.shiftKey?so(Q[Q.length-1]):so(Q[1])),M.current[1]==="floating"&&ce===G&&le.shiftKey&&(qt(le),so(Q[0]))}}const se=Ut(G);return se.addEventListener("keydown",z),()=>{se.removeEventListener("keydown",z)}},[r,x,G,c,M,w,H,ee]),A.useEffect(()=>{if(r||!b)return;function z(se){const le=Gn(se),ce=H().indexOf(le);ce!==-1&&(_.current=ce)}return b.addEventListener("focusin",z),()=>{b.removeEventListener("focusin",z)}},[r,b,H]),A.useEffect(()=>{if(r||!d)return;function z(){F.current=!0,setTimeout(()=>{F.current=!1})}function se(ce){const re=ce.relatedTarget,pe=ce.currentTarget,oe=Gn(ce);queueMicrotask(()=>{const ae=T(),ve=!(zt(x,re)||zt(b,re)||zt(re,b)||zt(N?.portalNode,re)||re!=null&&re.hasAttribute(xo("focus-guard"))||O&&(go(O.nodesRef.current,ae).find(ue=>{var ne,J;return zt((ne=ue.context)==null?void 0:ne.elements.floating,re)||zt((J=ue.context)==null?void 0:J.elements.domReference,re)})||Mg(O.nodesRef.current,ae).find(ue=>{var ne,J,$;return[(ne=ue.context)==null?void 0:ne.elements.floating,yl((J=ue.context)==null?void 0:J.elements.floating)].includes(re)||(($=ue.context)==null?void 0:$.elements.domReference)===re})));if(pe===x&&G&&ey(G,M),l&&pe!==x&&!(oe!=null&&oe.isConnected)&&Un(Ut(G))===Ut(G).body){It(G)&&G.focus();const ue=_.current,ne=H(),J=ne[ue]||ne[ne.length-1]||G;It(J)&&J.focus()}if(v.current.insideReactTree){v.current.insideReactTree=!1;return}(w||!c)&&re&&ve&&!F.current&&re!==Jg()&&(k.current=!0,y(!1,ce,"focus-out"))})}const le=!!(!O&&N);function Q(){Ht(B),v.current.insideReactTree=!0,B.current=window.setTimeout(()=>{v.current.insideReactTree=!1})}if(b&&It(x))return x.addEventListener("focusout",se),x.addEventListener("pointerdown",z),b.addEventListener("focusout",se),le&&b.addEventListener("focusout",Q,!0),()=>{x.removeEventListener("focusout",se),x.removeEventListener("pointerdown",z),b.removeEventListener("focusout",se),le&&b.removeEventListener("focusout",Q,!0)}},[r,x,b,G,c,O,N,y,d,l,H,w,T,M,v]);const ie=A.useRef(null),te=A.useRef(null),q=Qg([ie,N?.beforeInsideRef]),Y=Qg([te,N?.afterInsideRef]);A.useEffect(()=>{var z,se;if(r||!b)return;const le=Array.from((N==null||(z=N.portalNode)==null?void 0:z.querySelectorAll("["+xo("portal")+"]"))||[]),ce=(se=(O?Mg(O.nodesRef.current,T()):[]).find(oe=>{var ae;return rf(((ae=oe.context)==null?void 0:ae.elements.domReference)||null)}))==null||(se=se.context)==null?void 0:se.elements.domReference,re=[b,ce,...le,...E(),V.current,D.current,ie.current,te.current,N?.beforeOutsideRef.current,N?.afterOutsideRef.current,M.current.includes("reference")||w?x:null].filter(oe=>oe!=null),pe=c||w?Zg(re,!P,P):Zg(re);return()=>{pe()}},[r,x,b,c,M,N,w,I,P,O,T,E]),nt(()=>{if(r||!It(G))return;const z=Ut(G),se=Un(z);queueMicrotask(()=>{const le=ee(G),Q=j.current,ce=(typeof Q=="number"?le[Q]:Q.current)||G,re=zt(G,se);!R&&!re&&g&&so(ce,{preventScroll:ce===G})})},[r,g,G,R,ee,j]),nt(()=>{if(r||!G)return;const z=Ut(G),se=Un(z);MP(se);function le(re){let{reason:pe,event:oe,nested:ae}=re;if(["hover","safe-polygon"].includes(pe)&&oe.type==="mouseleave"&&(k.current=!0),pe==="outside-press")if(ae)k.current=!1;else if(ow(oe)||iw(oe))k.current=!1;else{let ve=!1;document.createElement("div").focus({get preventScroll(){return ve=!0,!1}}),ve?k.current=!1:k.current=!0}}h.on("openchange",le);const Q=z.createElement("span");Q.setAttribute("tabindex","-1"),Q.setAttribute("aria-hidden","true"),Object.assign(Q.style,Pp),U&&x&&x.insertAdjacentElement("afterend",Q);function ce(){if(typeof L.current=="boolean"){const re=x||Jg();return re&&re.isConnected?re:Q}return L.current.current||Q}return()=>{h.off("openchange",le);const re=Un(z),pe=zt(b,re)||O&&go(O.nodesRef.current,T(),!1).some(ae=>{var ve;return zt((ve=ae.context)==null?void 0:ve.elements.floating,re)}),oe=ce();queueMicrotask(()=>{const ae=NP(oe);L.current&&!k.current&&It(ae)&&(!(ae!==re&&re!==z.body)||pe)&&ae.focus({preventScroll:!0}),Q.remove()})}},[r,b,G,L,v,h,O,U,x,T]),A.useEffect(()=>(queueMicrotask(()=>{k.current=!1}),()=>{queueMicrotask(Op)}),[r]),nt(()=>{if(!r&&N)return N.setFocusManagerState({modal:c,closeOnFocusOut:d,open:g,onOpenChange:y,domReference:x}),()=>{N.setFocusManagerState(null)}},[r,N,c,g,y,d,x]),nt(()=>{r||G&&ey(G,M)},[r,G,M]);function Z(z){return r||!u||!c?null:p.jsx(_P,{ref:z==="start"?V:D,onClick:se=>y(!1,se.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}const fe=!r&&I&&(c?!w:!0)&&(U||c);return p.jsxs(p.Fragment,{children:[fe&&p.jsx(xl,{"data-type":"inside",ref:q,onFocus:z=>{if(c){const le=ee();so(o[0]==="reference"?le[0]:le[le.length-1])}else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(k.current=!1,ss(z,N.portalNode)){const le=aw(x);le?.focus()}else{var se;(se=N.beforeOutsideRef.current)==null||se.focus()}}}),!w&&Z("start"),n,Z("end"),fe&&p.jsx(xl,{"data-type":"inside",ref:Y,onFocus:z=>{if(c)so(ee()[0]);else if(N!=null&&N.preserveTabOrder&&N.portalNode)if(d&&(k.current=!0),ss(z,N.portalNode)){const le=lw(x);le?.focus()}else{var se;(se=N.afterOutsideRef.current)==null||se.focus()}}})]})}let wa=0;const ty="--floating-ui-scrollbar-width";function FP(){const e=Ep(),t=/iP(hone|ad|od)|iOS/.test(e)||e==="MacIntel"&&navigator.maxTouchPoints>1,n=document.body.style,o=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",i=window.innerWidth-document.documentElement.clientWidth,s=n.left?parseFloat(n.left):window.scrollX,a=n.top?parseFloat(n.top):window.scrollY;if(n.overflow="hidden",n.setProperty(ty,i+"px"),i&&(n[o]=i+"px"),t){var l,c;const u=((l=window.visualViewport)==null?void 0:l.offsetLeft)||0,d=((c=window.visualViewport)==null?void 0:c.offsetTop)||0;Object.assign(n,{position:"fixed",top:-(a-Math.floor(d))+"px",left:-(s-Math.floor(u))+"px",right:"0"})}return()=>{Object.assign(n,{overflow:"",[o]:""}),n.removeProperty(ty),t&&(Object.assign(n,{position:"",top:"",left:"",right:""}),window.scrollTo(s,a))}}let ny=()=>{};const jp=A.forwardRef(function(t,n){const{lockScroll:r=!1,...o}=t;return nt(()=>{if(r)return wa++,wa===1&&(ny=FP()),()=>{wa--,wa===0&&ny()}},[r]),p.jsx("div",{ref:n,...o,style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...o.style}})});function ry(e){return It(e.target)&&e.target.tagName==="BUTTON"}function LP(e){return It(e.target)&&e.target.tagName==="A"}function oy(e){return Cp(e)}function Di(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=A.useRef(),m=A.useRef(!1),g=A.useMemo(()=>({onPointerDown(y){f.current=y.pointerType},onMouseDown(y){const h=f.current;y.button===0&&a!=="click"&&(mi(h,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,y.nativeEvent,"click"):(y.preventDefault(),r(!0,y.nativeEvent,"click"))))},onClick(y){const h=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}mi(h,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,y.nativeEvent,"click"):r(!0,y.nativeEvent,"click"))},onKeyDown(y){f.current=void 0,!(y.defaultPrevented||!u||ry(y))&&(y.key===" "&&!oy(i)&&(y.preventDefault(),m.current=!0),!LP(y)&&y.key==="Enter"&&r(!(n&&l),y.nativeEvent,"click"))},onKeyUp(y){y.defaultPrevented||!u||ry(y)||oy(i)||y.key===" "&&m.current&&(m.current=!1,r(!(n&&l),y.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,d,l]);return A.useMemo(()=>s?{reference:g}:{},[s,g])}function VP(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){var i;const s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",l=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((i=t.dataRef.current.openEvent)==null?void 0:i.type)||"")&&t.pointerType!=="touch";let u=s.width,d=s.height,f=s.x,m=s.y;return n==null&&t.x&&a&&(n=s.x-t.x),r==null&&t.y&&l&&(r=s.y-t.y),f-=n||0,m-=r||0,u=0,d=0,!o||c?(u=t.axis==="y"?s.width:0,d=t.axis==="x"?s.height:0,f=a&&t.x!=null?t.x:f,m=l&&t.y!=null?t.y:m):o&&!c&&(d=t.axis==="x"?s.height:d,u=t.axis==="y"?s.width:u),o=!0,{width:u,height:d,x:f,y:m,top:m,right:f+u,bottom:m+d,left:f}}}}function iy(e){return e!=null&&e.clientX!=null}function $P(e,t){t===void 0&&(t={});const{open:n,dataRef:r,elements:{floating:o,domReference:i},refs:s}=e,{enabled:a=!0,axis:l="both",x:c=null,y:u=null}=t,d=A.useRef(!1),f=A.useRef(null),[m,g]=A.useState(),[y,h]=A.useState([]),v=kt((R,w)=>{d.current||r.current.openEvent&&!iy(r.current.openEvent)||s.setPositionReference(VP(i,{x:R,y:w,axis:l,dataRef:r,pointerType:m}))}),x=kt(R=>{c!=null||u!=null||(n?f.current||h([]):v(R.clientX,R.clientY))}),b=mi(m)?o:n,T=A.useCallback(()=>{if(!b||!a||c!=null||u!=null)return;const R=Gt(o);function w(C){const I=Gn(C);zt(o,I)?(R.removeEventListener("mousemove",w),f.current=null):v(C.clientX,C.clientY)}if(!r.current.openEvent||iy(r.current.openEvent)){R.addEventListener("mousemove",w);const C=()=>{R.removeEventListener("mousemove",w),f.current=null};return f.current=C,C}s.setPositionReference(i)},[b,a,c,u,o,r,s,i,v]);A.useEffect(()=>T(),[T,y]),A.useEffect(()=>{a&&!o&&(d.current=!1)},[a,o]),A.useEffect(()=>{!a&&n&&(d.current=!0)},[a,n]),nt(()=>{a&&(c!=null||u!=null)&&(d.current=!1,v(c,u))},[a,c,u,v]);const E=A.useMemo(()=>{function R(w){let{pointerType:C}=w;g(C)}return{onPointerDown:R,onPointerEnter:R,onMouseMove:x,onMouseEnter:x}},[x]);return A.useMemo(()=>a?{reference:E}:{},[a,E])}const zP={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},BP={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},sy=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Kr(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:m,capture:g}=t,y=Yr(),h=kt(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,x=A.useRef(!1),{escapeKey:b,outsidePress:T}=sy(m),{escapeKey:E,outsidePress:R}=sy(g),w=A.useRef(!1),C=kt(O=>{var N;if(!n||!s||!a||O.key!=="Escape"||w.current)return;const V=(N=i.current.floatingContext)==null?void 0:N.nodeId,D=y?go(y.nodesRef.current,V):[];if(!b&&(O.stopPropagation(),D.length>0)){let k=!0;if(D.forEach(F=>{var _;if((_=F.context)!=null&&_.open&&!F.context.dataRef.current.__escapeKeyBubbles){k=!1;return}}),!k)return}r(!1,wA(O)?O.nativeEvent:O,"escape-key")}),I=kt(O=>{var N;const V=()=>{var D;C(O),(D=Gn(O))==null||D.removeEventListener("keydown",V)};(N=Gn(O))==null||N.addEventListener("keydown",V)}),P=kt(O=>{var N;const V=i.current.insideReactTree;i.current.insideReactTree=!1;const D=x.current;if(x.current=!1,c==="click"&&D||V||typeof v=="function"&&!v(O))return;const k=Gn(O),F="["+xo("inert")+"]",_=Ut(o.floating).querySelectorAll(F);let B=rt(k)?k:null;for(;B&&!pr(B);){const ee=hr(B);if(pr(ee)||!rt(ee))break;B=ee}if(_.length&&rt(k)&&!vA(k)&&!zt(k,o.floating)&&Array.from(_).every(ee=>!zt(B,ee)))return;if(It(k)&&L){const ee=pr(k),ie=yn(k),te=/auto|scroll/,q=ee||te.test(ie.overflowX),Y=ee||te.test(ie.overflowY),Z=q&&k.clientWidth>0&&k.scrollWidth>k.clientWidth,fe=Y&&k.clientHeight>0&&k.scrollHeight>k.clientHeight,z=ie.direction==="rtl",se=fe&&(z?O.offsetX<=k.offsetWidth-k.clientWidth:O.offsetX>k.clientWidth),le=Z&&O.offsetY>k.clientHeight;if(se||le)return}const U=(N=i.current.floatingContext)==null?void 0:N.nodeId,G=y&&go(y.nodesRef.current,U).some(ee=>{var ie;return Fu(O,(ie=ee.context)==null?void 0:ie.elements.floating)});if(Fu(O,o.floating)||Fu(O,o.domReference)||G)return;const H=y?go(y.nodesRef.current,U):[];if(H.length>0){let ee=!0;if(H.forEach(ie=>{var te;if((te=ie.context)!=null&&te.open&&!ie.context.dataRef.current.__outsidePressBubbles){ee=!1;return}}),!ee)return}r(!1,O,"outside-press")}),M=kt(O=>{var N;const V=()=>{var D;P(O),(D=Gn(O))==null||D.removeEventListener(c,V)};(N=Gn(O))==null||N.addEventListener(c,V)});A.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=b,i.current.__outsidePressBubbles=T;let O=-1;function N(_){r(!1,_,"ancestor-scroll")}function V(){window.clearTimeout(O),w.current=!0}function D(){O=window.setTimeout(()=>{w.current=!1},rc()?5:0)}const k=Ut(o.floating);a&&(k.addEventListener("keydown",E?I:C,E),k.addEventListener("compositionstart",V),k.addEventListener("compositionend",D)),v&&k.addEventListener(c,R?M:P,R);let F=[];return f&&(rt(o.domReference)&&(F=_r(o.domReference)),rt(o.floating)&&(F=F.concat(_r(o.floating))),!rt(o.reference)&&o.reference&&o.reference.contextElement&&(F=F.concat(_r(o.reference.contextElement)))),F=F.filter(_=>{var B;return _!==((B=k.defaultView)==null?void 0:B.visualViewport)}),F.forEach(_=>{_.addEventListener("scroll",N,{passive:!0})}),()=>{a&&(k.removeEventListener("keydown",E?I:C,E),k.removeEventListener("compositionstart",V),k.removeEventListener("compositionend",D)),v&&k.removeEventListener(c,R?M:P,R),F.forEach(_=>{_.removeEventListener("scroll",N)}),window.clearTimeout(O)}},[i,o,a,v,c,n,r,f,s,b,T,C,E,I,P,R,M]),A.useEffect(()=>{i.current.insideReactTree=!1},[i,v,c]);const j=A.useMemo(()=>({onKeyDown:C,...u&&{[zP[d]]:O=>{r(!1,O.nativeEvent,"reference-press")},...d!=="click"&&{onClick(O){r(!1,O.nativeEvent,"reference-press")}}}}),[C,r,u,d]),L=A.useMemo(()=>({onKeyDown:C,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[BP[c]]:()=>{i.current.insideReactTree=!0}}),[C,c,i]);return A.useMemo(()=>s?{reference:j,floating:L}:{},[s,j,L])}function HP(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Xs(),i=A.useRef({}),[s]=A.useState(()=>ww()),a=Gr()!=null;if(process.env.NODE_ENV!=="production"){const m=r.reference;m&&!rt(m)&&SP("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[l,c]=A.useState(r.reference),u=kt((m,g,y)=>{i.current.openEvent=m?g:void 0,s.emit("openchange",{open:m,event:g,reason:y,nested:a}),n?.(m,g,y)}),d=A.useMemo(()=>({setPositionReference:c}),[]),f=A.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return A.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function ir(e){e===void 0&&(e={});const{nodeId:t}=e,n=HP({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,s]=A.useState(null),[a,l]=A.useState(null),u=o?.domReference||i,d=A.useRef(null),f=Yr();nt(()=>{u&&(d.current=u)},[u]);const m=pP({...e,elements:{...o,...a&&{reference:a}}}),g=A.useCallback(b=>{const T=rt(b)?{getBoundingClientRect:()=>b.getBoundingClientRect(),getClientRects:()=>b.getClientRects(),contextElement:b}:b;l(T),m.refs.setReference(T)},[m.refs]),y=A.useCallback(b=>{(rt(b)||b===null)&&(d.current=b,s(b)),(rt(m.refs.reference.current)||m.refs.reference.current===null||b!==null&&!rt(b))&&m.refs.setReference(b)},[m.refs]),h=A.useMemo(()=>({...m.refs,setReference:y,setPositionReference:g,domReference:d}),[m.refs,y,g]),v=A.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),x=A.useMemo(()=>({...m,...r,refs:h,elements:v,nodeId:t}),[m,h,v,t,r]);return nt(()=>{r.dataRef.current.floatingContext=x;const b=f?.nodesRef.current.find(T=>T.id===t);b&&(b.context=x)}),A.useMemo(()=>({...m,context:x,refs:h,elements:v}),[m,h,v,x])}function qu(){return mA()&&nw()}function WP(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=A.useRef(!1),u=A.useRef(-1),d=A.useRef(!0);A.useEffect(()=>{if(!a)return;const m=Gt(s.domReference);function g(){!n&&It(s.domReference)&&s.domReference===Un(Ut(s.domReference))&&(c.current=!0)}function y(){d.current=!0}function h(){d.current=!1}return m.addEventListener("blur",g),qu()&&(m.addEventListener("keydown",y,!0),m.addEventListener("pointerdown",h,!0)),()=>{m.removeEventListener("blur",g),qu()&&(m.removeEventListener("keydown",y,!0),m.removeEventListener("pointerdown",h,!0))}},[s.domReference,n,a]),A.useEffect(()=>{if(!a)return;function m(g){let{reason:y}=g;(y==="reference-press"||y==="escape-key")&&(c.current=!0)}return o.on("openchange",m),()=>{o.off("openchange",m)}},[o,a]),A.useEffect(()=>()=>{Ht(u)},[]);const f=A.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(m){if(c.current)return;const g=Gn(m.nativeEvent);if(l&&rt(g)){if(qu()&&!m.relatedTarget){if(!d.current&&!Cp(g))return}else if(!xA(g))return}r(!0,m.nativeEvent,"focus")},onBlur(m){c.current=!1;const g=m.relatedTarget,y=m.nativeEvent,h=rt(g)&&g.hasAttribute(xo("focus-guard"))&&g.getAttribute("data-type")==="outside";u.current=window.setTimeout(()=>{var v;const x=Un(s.domReference?s.domReference.ownerDocument:document);!g&&x===s.domReference||zt((v=i.current.floatingContext)==null?void 0:v.refs.floating.current,x)||zt(s.domReference,x)||h||r(!1,y,"focus")})}}),[i,s.domReference,r,l]);return A.useMemo(()=>a?{reference:f}:{},[a,f])}function Uu(e,t,n){const r=new Map,o=n==="item";let i=e;if(o&&e){const{[Hg]:s,[Wg]:a,...l}=e;i=l}return{...n==="floating"&&{tabIndex:-1,[yP]:""},...i,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[Hg,Wg].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof u=="function"){var d;(d=r.get(c))==null||d.push(u),s[c]=function(){for(var f,m=arguments.length,g=new Array(m),y=0;y<m;y++)g[y]=arguments[y];return(f=r.get(c))==null?void 0:f.map(h=>h(...g)).find(h=>h!==void 0)}}}else s[c]=u}),s),{})}}function sr(e){e===void 0&&(e=[]);const t=e.map(a=>a?.reference),n=e.map(a=>a?.floating),r=e.map(a=>a?.item),o=A.useCallback(a=>Uu(a,e,"reference"),t),i=A.useCallback(a=>Uu(a,e,"floating"),n),s=A.useCallback(a=>Uu(a,e,"item"),r);return A.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const qP="Escape";function cc(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Sa(e,t){return cc(t,e===bw||e===lc,e===Ks||e===Zs)}function Gu(e,t,n){return cc(t,e===lc,n?e===Ks:e===Zs)||e==="Enter"||e===" "||e===""}function ay(e,t,n){return cc(t,n?e===Ks:e===Zs,e===lc)}function ly(e,t,n,r){const o=n?e===Zs:e===Ks,i=e===bw;return t==="both"||t==="horizontal"&&r&&r>1?e===qP:cc(t,o,i)}function uc(e,t){const{open:n,onOpenChange:r,elements:o,floatingId:i}=e,{listRef:s,activeIndex:a,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:m=!1,rtl:g=!1,virtual:y=!1,focusItemOnOpen:h="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:x=!0,disabledIndices:b=void 0,orientation:T="vertical",parentOrientation:E,cols:R=1,scrollItemIntoView:w=!0,virtualItemRef:C,itemSizes:I,dense:P=!1}=t;process.env.NODE_ENV!=="production"&&(d&&(f||Ga("`useListNavigation` looping must be enabled to allow escaping."),y||Ga("`useListNavigation` must be virtual to allow escaping.")),T==="vertical"&&R>1&&Ga("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const M=yl(o.floating),j=Bt(M),L=Gr(),O=Yr();nt(()=>{e.dataRef.current.orientation=T},[e,T]);const N=kt(()=>{l(k.current===-1?null:k.current)}),V=rf(o.domReference),D=A.useRef(h),k=A.useRef(u??-1),F=A.useRef(null),_=A.useRef(!0),B=A.useRef(N),U=A.useRef(!!o.floating),G=A.useRef(n),H=A.useRef(!1),ee=A.useRef(!1),ie=Bt(b),te=Bt(n),q=Bt(w),Y=Bt(u),[Z,fe]=A.useState(),[z,se]=A.useState(),le=kt(()=>{function ue(X){if(y){var me;(me=X.id)!=null&&me.endsWith("-fui-option")&&(X.id=i+"-"+Math.random().toString(16).slice(2,10)),fe(X.id),O?.events.emit("virtualfocus",X),C&&(C.current=X)}else so(X,{sync:H.current,preventScroll:!0})}const ne=s.current[k.current],J=ee.current;ne&&ue(ne),(H.current?X=>X():requestAnimationFrame)(()=>{const X=s.current[k.current]||ne;if(!X)return;ne||ue(X);const me=q.current;me&&ce&&(J||!_.current)&&(X.scrollIntoView==null||X.scrollIntoView(typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me))})});nt(()=>{c&&(n&&o.floating?D.current&&u!=null&&(ee.current=!0,k.current=u,N()):U.current&&(k.current=-1,B.current()))},[c,n,o.floating,u,N]),nt(()=>{if(c&&n&&o.floating)if(a==null){if(H.current=!1,Y.current!=null)return;if(U.current&&(k.current=-1,le()),(!G.current||!U.current)&&D.current&&(F.current!=null||D.current===!0&&F.current==null)){let ue=0;const ne=()=>{s.current[0]==null?(ue<2&&(ue?requestAnimationFrame:queueMicrotask)(ne),ue++):(k.current=F.current==null||Gu(F.current,T,g)||m?Lu(s,ie.current):Ng(s,ie.current),F.current=null,N())};ne()}}else is(s,a)||(k.current=a,le(),ee.current=!1)},[c,n,o.floating,a,Y,m,s,T,g,N,le,ie]),nt(()=>{var ue;if(!c||o.floating||!O||y||!U.current)return;const ne=O.nodesRef.current,J=(ue=ne.find(me=>me.id===L))==null||(ue=ue.context)==null?void 0:ue.elements.floating,$=Un(Ut(o.floating)),X=ne.some(me=>me.context&&zt(me.context.elements.floating,$));J&&!X&&_.current&&J.focus({preventScroll:!0})},[c,o.floating,O,L,y]),nt(()=>{if(!c||!O||!y||L)return;function ue(ne){se(ne.id),C&&(C.current=ne)}return O.events.on("virtualfocus",ue),()=>{O.events.off("virtualfocus",ue)}},[c,O,y,L,C]),nt(()=>{B.current=N,G.current=n,U.current=!!o.floating}),nt(()=>{n||(F.current=null,D.current=h)},[n,h]);const Q=a!=null,ce=A.useMemo(()=>{function ue(J){if(!te.current)return;const $=s.current.indexOf(J);$!==-1&&k.current!==$&&(k.current=$,N())}return{onFocus(J){let{currentTarget:$}=J;H.current=!0,ue($)},onClick:J=>{let{currentTarget:$}=J;return $.focus({preventScroll:!0})},onMouseMove(J){let{currentTarget:$}=J;H.current=!0,ee.current=!1,v&&ue($)},onPointerLeave(J){let{pointerType:$}=J;if(!(!_.current||$==="touch")&&(H.current=!0,!!v&&(k.current=-1,N(),!y))){var X;(X=j.current)==null||X.focus({preventScroll:!0})}}}},[te,j,v,s,N,y]),re=A.useCallback(()=>{var ue;return E??(O==null||(ue=O.nodesRef.current.find(ne=>ne.id===L))==null||(ue=ue.context)==null||(ue=ue.dataRef)==null?void 0:ue.current.orientation)},[L,O,E]),pe=kt(ue=>{if(_.current=!1,H.current=!0,ue.which===229||!te.current&&ue.currentTarget===j.current)return;if(m&&ly(ue.key,T,g,R)){Sa(ue.key,re())||qt(ue),r(!1,ue.nativeEvent,"list-navigation"),It(o.domReference)&&(y?O?.events.emit("virtualfocus",o.domReference):o.domReference.focus());return}const ne=k.current,J=Lu(s,b),$=Ng(s,b);if(V||(ue.key==="Home"&&(qt(ue),k.current=J,N()),ue.key==="End"&&(qt(ue),k.current=$,N())),R>1){const X=I||Array.from({length:s.current.length},()=>({width:1,height:1})),me=IA(X,R,P),ye=me.findIndex(De=>De!=null&&!qa(s,De,b)),Ee=me.reduce((De,it,Pt)=>it!=null&&!qa(s,it,b)?Pt:De,-1),je=me[RA({current:me.map(De=>De!=null?s.current[De]:null)},{event:ue,orientation:T,loop:f,rtl:g,cols:R,disabledIndices:PA([...(typeof b!="function"?b:null)||s.current.map((De,it)=>qa(s,it,b)?it:void 0),void 0],me),minIndex:ye,maxIndex:Ee,prevIndex:AA(k.current>$?J:k.current,X,me,R,ue.key===lc?"bl":ue.key===(g?Ks:Zs)?"tr":"tl"),stopEvent:!0})];if(je!=null&&(k.current=je,N()),T==="both")return}if(Sa(ue.key,T)){if(qt(ue),n&&!y&&Un(ue.currentTarget.ownerDocument)===ue.currentTarget){k.current=Gu(ue.key,T,g)?J:$,N();return}Gu(ue.key,T,g)?f?k.current=ne>=$?d&&ne!==s.current.length?-1:J:Kt(s,{startingIndex:ne,disabledIndices:b}):k.current=Math.min($,Kt(s,{startingIndex:ne,disabledIndices:b})):f?k.current=ne<=J?d&&ne!==-1?s.current.length:$:Kt(s,{startingIndex:ne,decrement:!0,disabledIndices:b}):k.current=Math.max(J,Kt(s,{startingIndex:ne,decrement:!0,disabledIndices:b})),is(s,k.current)&&(k.current=-1),N()}}),oe=A.useMemo(()=>y&&n&&Q&&{"aria-activedescendant":z||Z},[y,n,Q,z,Z]),ae=A.useMemo(()=>({"aria-orientation":T==="both"?void 0:T,...V?{}:oe,onKeyDown:pe,onPointerMove(){_.current=!0}}),[oe,pe,T,V]),ve=A.useMemo(()=>{function ue(J){h==="auto"&&ow(J.nativeEvent)&&(D.current=!0)}function ne(J){D.current=h,h==="auto"&&iw(J.nativeEvent)&&(D.current=!0)}return{...oe,onKeyDown(J){_.current=!1;const $=J.key.startsWith("Arrow"),X=["Home","End"].includes(J.key),me=$||X,ye=ay(J.key,T,g),Ee=ly(J.key,T,g,R),je=ay(J.key,re(),g),De=Sa(J.key,T),it=(m?je:De)||J.key==="Enter"||J.key.trim()==="";if(y&&n){const W=O?.nodesRef.current.find(Ae=>Ae.parentId==null),K=O&&W?bA(O.nodesRef.current,W.id):null;if(me&&K&&C){const Ae=new KeyboardEvent("keydown",{key:J.key,bubbles:!0});if(ye||Ee){var Pt,Yt;const We=((Pt=K.context)==null?void 0:Pt.elements.domReference)===J.currentTarget,Ge=Ee&&!We?(Yt=K.context)==null?void 0:Yt.elements.domReference:ye?s.current.find(Fe=>Fe?.id===Z):null;Ge&&(qt(J),Ge.dispatchEvent(Ae),se(void 0))}if((De||X)&&K.context&&K.context.open&&K.parentId&&J.currentTarget!==K.context.elements.domReference){var Ve;qt(J),(Ve=K.context.elements.domReference)==null||Ve.dispatchEvent(Ae);return}}return pe(J)}if(!(!n&&!x&&$)){if(it){const W=Sa(J.key,re());F.current=m&&W?null:J.key}if(m){je&&(qt(J),n?(k.current=Lu(s,ie.current),N()):r(!0,J.nativeEvent,"list-navigation"));return}De&&(u!=null&&(k.current=u),qt(J),!n&&x?r(!0,J.nativeEvent,"list-navigation"):pe(J),n&&N())}},onFocus(){n&&!y&&(k.current=-1,N())},onPointerDown:ne,onPointerEnter:ne,onMouseDown:ue,onClick:ue}},[Z,oe,R,pe,ie,h,s,m,N,r,n,x,T,re,g,u,O,y,C]);return A.useMemo(()=>c?{reference:ve,floating:ae,item:ce}:{},[c,ve,ae,ce])}const UP=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function wr(e,t){var n,r;t===void 0&&(t={});const{open:o,elements:i,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=Xs(),u=((n=i.domReference)==null?void 0:n.id)||c,d=A.useMemo(()=>{var x;return((x=yl(i.floating))==null?void 0:x.id)||s},[i.floating,s]),f=(r=UP.get(l))!=null?r:l,g=Gr()!=null,y=A.useMemo(()=>f==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:o?d:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":f==="alertdialog"?"dialog":f,"aria-controls":o?d:void 0,...f==="listbox"&&{role:"combobox"},...f==="menu"&&{id:u},...f==="menu"&&g&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[f,d,g,o,u,l]),h=A.useMemo(()=>{const x={id:d,...f&&{role:f}};return f==="tooltip"||l==="label"?x:{...x,...f==="menu"&&{"aria-labelledby":u}}},[f,d,u,l]),v=A.useCallback(x=>{let{active:b,selected:T}=x;const E={role:"option",...b&&{id:d+"-fui-option"}};switch(l){case"select":case"combobox":return{...E,"aria-selected":T}}return{}},[d,l]);return A.useMemo(()=>a?{reference:y,floating:h,item:v}:{},[a,y,h,v])}const cy=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function Lo(e,t){return typeof e=="function"?e(t):e}function GP(e,t){const[n,r]=A.useState(e);return e&&!n&&r(!0),A.useEffect(()=>{if(!e&&n){const o=setTimeout(()=>r(!1),t);return()=>clearTimeout(o)}},[e,n,t]),n}function YP(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,s=(typeof o=="number"?o:o.close)||0,[a,l]=A.useState("unmounted"),c=GP(n,s);return!c&&a==="close"&&l("unmounted"),nt(()=>{if(r){if(n){l("initial");const u=requestAnimationFrame(()=>{xr.flushSync(()=>{l("open")})});return()=>{cancelAnimationFrame(u)}}l("close")}},[n,r]),{isMounted:c,status:a}}function Rw(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:s=250}=t,a=e.placement,l=a.split("-")[0],c=A.useMemo(()=>({side:l,placement:a}),[l,a]),u=typeof s=="number",d=(u?s:s.open)||0,f=(u?s:s.close)||0,[m,g]=A.useState(()=>({...Lo(i,c),...Lo(n,c)})),{isMounted:y,status:h}=YP(e,{duration:s}),v=Bt(n),x=Bt(r),b=Bt(o),T=Bt(i);return nt(()=>{const E=Lo(v.current,c),R=Lo(b.current,c),w=Lo(T.current,c),C=Lo(x.current,c)||Object.keys(E).reduce((I,P)=>(I[P]="",I),{});if(h==="initial"&&g(I=>({transitionProperty:I.transitionProperty,...w,...E})),h==="open"&&g({transitionProperty:Object.keys(C).map(cy).join(","),transitionDuration:d+"ms",...w,...C}),h==="close"){const I=R||E;g({transitionProperty:Object.keys(I).map(cy).join(","),transitionDuration:f+"ms",...w,...I})}},[f,b,v,x,T,d,h,c]),{isMounted:y,styles:m}}function KP(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:s,onMatch:a,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:m=null}=t,g=A.useRef(-1),y=A.useRef(""),h=A.useRef((n=m??s)!=null?n:-1),v=A.useRef(null),x=kt(a),b=kt(l),T=Bt(u),E=Bt(f);nt(()=>{r&&(Ht(g),v.current=null,y.current="")},[r]),nt(()=>{if(r&&y.current===""){var P;h.current=(P=m??s)!=null?P:-1}},[r,m,s]);const R=kt(P=>{P?o.current.typing||(o.current.typing=P,b(P)):o.current.typing&&(o.current.typing=P,b(P))}),w=kt(P=>{function M(V,D,k){const F=T.current?T.current(D,k):D.find(_=>_?.toLocaleLowerCase().indexOf(k.toLocaleLowerCase())===0);return F?V.indexOf(F):-1}const j=i.current;if(y.current.length>0&&y.current[0]!==" "&&(M(j,j,y.current)===-1?R(!1):P.key===" "&&qt(P)),j==null||E.current.includes(P.key)||P.key.length!==1||P.ctrlKey||P.metaKey||P.altKey)return;r&&P.key!==" "&&(qt(P),R(!0)),j.every(V=>{var D,k;return V?((D=V[0])==null?void 0:D.toLocaleLowerCase())!==((k=V[1])==null?void 0:k.toLocaleLowerCase()):!0})&&y.current===P.key&&(y.current="",h.current=v.current),y.current+=P.key,Ht(g),g.current=window.setTimeout(()=>{y.current="",h.current=v.current,R(!1)},d);const O=h.current,N=M(j,[...j.slice((O||0)+1),...j.slice(0,(O||0)+1)],y.current);N!==-1?(x(N),v.current=N):P.key!==" "&&(y.current="",R(!1))}),C=A.useMemo(()=>({onKeyDown:w}),[w]),I=A.useMemo(()=>({onKeyDown:w,onKeyUp(P){P.key===" "&&R(!1)}}),[w,R]);return A.useMemo(()=>c?{reference:C,floating:I}:{},[c,C,I])}function Iw(e,t,n){return n===void 0&&(n=!0),e.filter(o=>{var i;return o.parentId===t&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...Iw(e,o.id,n)])}function uy(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=0,a=i-1;s<i;a=s++){const[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function ZP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Aw(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o={current:-1};let i=!1,s=null,a=null,l=typeof performance<"u"?performance.now():0;function c(d,f){const m=performance.now(),g=m-l;if(s===null||a===null||g===0)return s=d,a=f,l=m,null;const y=d-s,h=f-a,x=Math.sqrt(y*y+h*h)/g;return s=d,a=f,l=m,x}const u=d=>{let{x:f,y:m,placement:g,elements:y,onClose:h,nodeId:v,tree:x}=d;return function(T){function E(){Ht(o),h()}if(Ht(o),!y.domReference||!y.floating||g==null||f==null||m==null)return;const{clientX:R,clientY:w}=T,C=[R,w],I=kP(T),P=T.type==="mouseleave",M=Hu(y.floating,I),j=Hu(y.domReference,I),L=y.domReference.getBoundingClientRect(),O=y.floating.getBoundingClientRect(),N=g.split("-")[0],V=f>O.right-O.width/2,D=m>O.bottom-O.height/2,k=ZP(C,L),F=O.width>L.width,_=O.height>L.height,B=(F?L:O).left,U=(F?L:O).right,G=(_?L:O).top,H=(_?L:O).bottom;if(M&&(i=!0,!P))return;if(j&&(i=!1),j&&!P){i=!0;return}if(P&&rt(T.relatedTarget)&&Hu(y.floating,T.relatedTarget)||x&&Iw(x.nodesRef.current,v).length)return;if(N==="top"&&m>=L.bottom-1||N==="bottom"&&m<=L.top+1||N==="left"&&f>=L.right-1||N==="right"&&f<=L.left+1)return E();let ee=[];switch(N){case"top":ee=[[B,L.top+1],[B,O.bottom-1],[U,O.bottom-1],[U,L.top+1]];break;case"bottom":ee=[[B,O.top+1],[B,L.bottom-1],[U,L.bottom-1],[U,O.top+1]];break;case"left":ee=[[O.right-1,H],[O.right-1,G],[L.left+1,G],[L.left+1,H]];break;case"right":ee=[[L.right-1,H],[L.right-1,G],[O.left+1,G],[O.left+1,H]];break}function ie(te){let[q,Y]=te;switch(N){case"top":{const Z=[F?q+t/2:V?q+t*4:q-t*4,Y+t+1],fe=[F?q-t/2:V?q+t*4:q-t*4,Y+t+1],z=[[O.left,V||F?O.bottom-t:O.top],[O.right,V?F?O.bottom-t:O.top:O.bottom-t]];return[Z,fe,...z]}case"bottom":{const Z=[F?q+t/2:V?q+t*4:q-t*4,Y-t],fe=[F?q-t/2:V?q+t*4:q-t*4,Y-t],z=[[O.left,V||F?O.top+t:O.bottom],[O.right,V?F?O.top+t:O.bottom:O.top+t]];return[Z,fe,...z]}case"left":{const Z=[q+t+1,_?Y+t/2:D?Y+t*4:Y-t*4],fe=[q+t+1,_?Y-t/2:D?Y+t*4:Y-t*4];return[...[[D||_?O.right-t:O.left,O.top],[D?_?O.right-t:O.left:O.right-t,O.bottom]],Z,fe]}case"right":{const Z=[q-t,_?Y+t/2:D?Y+t*4:Y-t*4],fe=[q-t,_?Y-t/2:D?Y+t*4:Y-t*4],z=[[D||_?O.left+t:O.right,O.top],[D?_?O.left+t:O.right:O.left+t,O.bottom]];return[Z,fe,...z]}}}if(!uy([R,w],ee)){if(i&&!k)return E();if(!P&&r){const te=c(T.clientX,T.clientY);if(te!==null&&te<.1)return E()}uy([R,w],ie([f,m]))?!i&&r&&(o.current=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}const Pw=200,XP=500,Mi=()=>{const e=Date.now(),t=new Uint8Array(16);t[0]=e/Math.pow(2,40)&255,t[1]=e/Math.pow(2,32)&255,t[2]=e/Math.pow(2,24)&255,t[3]=e/Math.pow(2,16)&255,t[4]=e/Math.pow(2,8)&255,t[5]=e&255;const n=new Uint8Array(10);crypto.getRandomValues(n),t.set(n,6),t[6]=t[6]&15|112,t[8]=t[8]&63|128;const r=Array.from(t).map(o=>o.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`},dy=(e,t,n)=>e.split(t).filter(Boolean).reduce((r,o)=>r!=null?r[o]:r,n),fy={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Dp=(e,t)=>{const n=dy(t,fy.basic,e)||dy(t,fy.extend,e);return n===void 0||n===e?void 0:n},$r=()=>typeof window>"u",of=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ow=(e,t)=>{const n=[];for(let r=0;r<t;r++){const o=r*t,i=e.slice(o,o+t);i.length>0&&n.push(i)}return n},QP=e=>!e,ri=()=>{},jw=()=>{const e=navigator.userAgent||navigator.vendor||window.opera;return/android|iphone|ipad|ipod|opera mini|iemobile|wpdesktop/i.test(e)},Mp=S.forwardRef(function({as:t,open:n,title:r,children:o,placement:i,focus:s=!0,hover:a=!0,enabled:l=!0,popover:c=!0,onChange:u=ri,followCursor:d=!1,...f},m){const[g,y]=S.useState(n??!1),h=S.useRef(null),v=t||"span",x=O=>{y(O),u?.(O)},{refs:b,floatingStyles:T,context:E}=ir({placement:i,open:g,whileElementsMounted:Io,onOpenChange:n?void 0:x,middleware:[sc(),ji(5),yw(),Rp({padding:5,element:h}),ac({fallbackAxisSideDirection:"start"})]}),R=Kr(E,{enabled:l}),w=wr(E,{role:"tooltip",enabled:l}),C=WP(E,{enabled:l?s:!1}),I=Di(E,{enabled:l?c:!1}),P=$P(E,{enabled:!!l&&!!d}),M=Ap(E,{move:!0,delay:{open:Pw},enabled:l?a:!1,handleClose:c?Aw():null}),{getReferenceProps:j,getFloatingProps:L}=sr([w,R,P,s?C:void 0,a?M:void 0,c?I:void 0]);return S.useEffect(()=>y(n===void 0?!1:n),[n]),p.jsxs(S.Fragment,{children:[p.jsx(v,{...j(f),ref:mr(b.setReference,m),children:r}),g&&p.jsx(br,{children:p.jsxs(mn,{...L(),ref:b.setFloating,style:T,className:"isolate z-tooltip rounded-lg border border-tooltip-border bg-tooltip-background p-3 text-tooltip-foreground shadow-shadow-floating",children:[p.jsx(Ip,{ref:h,context:E,strokeWidth:.1,className:"fill-tooltip-background stroke-tooltip-border"}),o]})})]})}),Dw=({reportStatus:e,id:t,hideLeft:n=!1,className:r,info:o,children:i,title:s})=>p.jsxs("span",{className:Ie("w-full justify-between",n&&i===null?"hidden":"flex",r),children:[n?null:p.jsxs("span",{className:"flex items-center gap-1 transition-colors group-focus-within:text-primary group-hover:text-primary group-disabled:text-disabled group-error:text-danger",children:[s,e||o?p.jsxs("span",{className:"flex items-center justify-center gap-1",children:[o?p.jsx(Mp,{as:"button",type:"button","aria-label":typeof o=="string"?o:void 0,"aria-describedby":typeof o=="string"?void 0:t?`tooltip-info-content-${t}`:void 0,title:p.jsx("span",{className:"cursor-help",children:p.jsx(jr,{className:"aspect-square size-3","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})}),children:p.jsx("div",{id:t?`tooltip-info-content-${t}`:void 0,className:"w-full max-w-48 whitespace-break-spaces break-words",children:o})}):null,e?p.jsxs("span",{className:"flex h-3 min-w-6 items-center",children:[p.jsx(yp,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-assert:block group-assert:text-success group-assert:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0}),p.jsx(ZR,{className:"hidden aspect-square size-3 opacity-0 transition-opacity group-error:block group-error:opacity-100","aria-hidden":"true",size:16,strokeWidth:1,absoluteStrokeWidth:!0})]}):null]}):null]}),i]}),Qs=S.forwardRef(({optionalText:e,left:t,rightLabel:n,container:r,feedback:o,interactive:i,right:s,info:a,children:l,error:c,form:u,id:d,labelClassName:f="",name:m,title:g,componentName:y,placeholder:h,hideLeft:v=!1,required:x,disabled:b,reportStatus:T,hiddenLabel:E},R)=>{const w=bp(),C=T!==void 0?T:w.input.iconFeedback,I=d??m,P=yt(),M=e??P.inputOptionalLabel;return p.jsxs("fieldset",{ref:R,form:u,disabled:b,"data-error":!!c,"aria-disabled":b,"data-component":y,"data-interactive":!!i,className:Ie("group flex min-h-0 min-w-0 max-w-full flex-col items-start",r),children:[p.jsxs("label",{form:u,htmlFor:I,className:"relative inline-flex w-full max-w-full cursor-text flex-row flex-wrap justify-between gap-1 text-field-label text-sm transition-colors empty:hidden group-disabled:cursor-not-allowed group-error:text-danger",children:[E?null:p.jsx(Dw,{info:a,hideLeft:v,reportStatus:C,title:g,placeholder:h,children:M||n?p.jsxs(S.Fragment,{children:[x?null:p.jsx("span",{"aria-disabled":b,className:"text-opacity-70 transition-colors group-focus-within:text-primary group-hover:text-primary aria-disabled:text-disabled",children:M}),n?p.jsx(S.Fragment,{children:n}):null]}):null}),p.jsxs("div",{className:`group relative flex w-full flex-row flex-nowrap items-center gap-x-2 gap-y-1 rounded-md border border-input-border bg-transparent transition-colors group-hover:border-primary group-disabled:border-disabled group-error:border-danger ${f}`,children:[t?p.jsx("span",{className:"flex flex-nowrap gap-1 whitespace-nowrap pl-2",children:t}):null,l,s?p.jsx("span",{className:"flex flex-nowrap gap-2 whitespace-nowrap pr-2",children:s}):null]})]}),p.jsx("p",{className:"mt-input-gap hidden whitespace-pre-wrap text-wrap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):invalid[data-initialized=true]]:flex group-error:flex group-error:text-danger",children:c}),p.jsx("p",{className:"mt-input-gap text-xs empty:mt-0 empty:hidden group-has-[input:not(:focus):valid[data-initialized=true]]:block group-assert:block group-error:hidden",children:o})]})}),Mw=(e,t,n,r)=>S.forwardRef(({info:i,left:s,next:a,error:l,right:c,container:u,rightLabel:d,interactive:f,optionalText:m,type:g="text",labelClassName:y,feedback:h=null,hideLeft:v=!1,loading:x,hiddenLabel:b,...T},E)=>{const R=e,w=T.id??T.name,C=S.useRef(null);return S.useEffect(()=>{if(C.current===null)return;const I=C.current,P=Us(C.current),M=r?.(I),j=L=>{const O=L;if(O.key==="Enter"&&I.enterKeyHint==="next"){const N=I.getAttribute("data-next");if(N){const V=document.getElementById(N);if(V)return V.focus(),void O.preventDefault()}}};return I.addEventListener("keydown",j),()=>{M?.(),P(),I.removeEventListener("keydown",j)}},[]),p.jsx(Qs,{...n,info:i,left:s,error:l,right:c,form:T.form,loading:x,name:T.name,feedback:h,hideLeft:v,title:T.title,rightLabel:d,disabled:T.disabled,hiddenLabel:b,interactive:f,required:T.required,componentName:t,id:T.name||T.id,optionalText:m,labelClassName:y,placeholder:T.placeholder,container:Ie(u,n.container),children:p.jsx(R,{...n,...T,id:w,name:w,type:g,"data-next":a,"aria-busy":T.disabled,"aria-disabled":T.disabled,"aria-readonly":T.readOnly,ref:mr(E,C),className:Ie("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-base text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","resize-y group-focus-within:border-primary group-hover:border-primary","disabled:cursor-not-allowed disabled:text-disabled",T.className)})})}),Ni=Mw(F0,"input",{type:"text"}),JP={size:{icon:"p-1",big:"h-12 px-6 py-4",default:"h-10 px-4 py-2",min:"h-7 px-3 py-1 text-sm",small:"h-8 px-4 py-2 text-sm",tiny:"h-6 px-2 py-1 text-sm"},rounded:{rough:"rounded-sm",squared:"rounded-none",default:"rounded-button",circle:"rounded-full aspect-square"},theme:{raw:"",disabled:"bg-disabled opacity-70",loading:"animate-pulse bg-disabled",main:"bg-button-primary-bg text-button-primary-text",info:"bg-button-info-bg text-button-info-text",warn:"bg-button-warn-bg text-button-warn-text",muted:"bg-button-muted-bg text-button-muted-text",danger:"bg-button-danger-bg text-button-danger-text",neutral:"bg-transparent border-1 border-card-border",primary:"bg-button-primary-bg text-button-primary-text",success:"bg-button-success-bg text-button-success-text",secondary:"bg-button-secondary-bg text-button-secondary-text","ghost-info":"bg-transparent hover:bg-info/20 border-0 border-transparent text-info","ghost-warn":"bg-transparent hover:bg-warn/20 border-0 border-transparent text-warn","ghost-danger":"bg-transparent hover:bg-danger/20 border-0 border-transparent text-danger","ghost-primary":"bg-transparent hover:bg-primary/20 border-0 border-transparent text-primary","ghost-success":"bg-transparent hover:bg-success/20 border-0 border-transparent text-success","ghost-secondary":"bg-transparent hover:bg-secondary/20 border-0 border-transparent text-secondary","ghost-muted":"bg-transparent hover:bg-muted/20 border-0 border-transparent text-muted-foreground","ghost-neutral":"bg-transparent border-0 border-card-border"}},eO=ki("relative overflow-hidden inline-flex duration-300 enabled:hover:bg-opacity-70 enabled:focus:bg-opacity-70 data-[loading=true]:opacity-30 data-[loading=true]:animate-pulse gap-1.5 items-center justify-center align-middle cursor-pointer whitespace-nowrap font-medium transition-colors ease-linear disabled:cursor-not-allowed disabled:bg-opacity-40 disabled:text-opacity-80 focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring",{variants:JP,defaultVariants:{theme:"main",size:"default",rounded:"default"}}),Qt=S.forwardRef(function({className:t,icon:n,loading:r,theme:o,type:i="button",size:s,rounded:a,...l},c){const u=r||l.disabled;return p.jsxs(mn,{...l,ref:c,type:i,"data-theme":o,disabled:u,"data-loading":r,"data-component":"button","aria-disabled":u,as:l.as??"button","aria-busy":u||r,onClick:u?void 0:l.onClick,className:Ie(eO({size:s,rounded:a,theme:o}),t),children:[n,l.children]})}),bo=S.forwardRef(({required:e=!0,options:t,info:n,selectContainer:r="",feedback:o=null,labelClassName:i,interactive:s,rightLabel:a,hiddenLabel:l,loading:c,optionalText:u,container:d,hideLeft:f=!1,right:m,left:g,error:y,...h},v)=>{const x=yt(),b=S.useRef(null),T=h.id??h.name;S.useImperativeHandle(v,()=>b.current),S.useEffect(()=>{if(b.current===null)return;const R=new AbortController,w=b.current,C=Us(b.current);return w.addEventListener("change",()=>w.setAttribute("data-selected","true"),{once:!0,signal:R.signal}),()=>{C(),R.abort()}},[]);const E=()=>b.current?.focus();return p.jsx(Qs,{info:n,left:g,error:y,form:h.form,loading:c,name:h.name,feedback:o,hideLeft:f,required:e,title:h.title,container:d,componentName:"select",rightLabel:a,hiddenLabel:l,interactive:s,id:h.name||h.id,optionalText:u,labelClassName:i,placeholder:h.placeholder,right:p.jsxs("label",{htmlFor:T,children:[m,p.jsxs("button",{onClick:E,type:"button",className:"mt-2 transition-colors hover:text-primary",children:[p.jsx(gp,{size:20}),p.jsx("span",{className:"sr-only",children:x.inputCaretDown})]})]}),children:p.jsxs("select",{...h,id:T,name:T,required:e,ref:mr(v,b),"data-selected":!!h.value||!1,title:typeof h.title=="string"?h.title:void 0,className:Ie("input select group h-10 w-full flex-1 appearance-none rounded-md text-base","bg-transparent px-2 py-1 text-foreground placeholder-input-placeholder","outline-none transition-colors group-error:text-danger group-error:placeholder-input-mask-error","data-[selected=false]:text-input-placeholder",h.className),children:[p.jsx("option",{value:"",disabled:!0,hidden:!0,children:h.placeholder}),t.map(R=>S.createElement("option",{...R,value:R.value,children:R.label??R.value,key:`${T}-select-option-${R.value}`}))]})})});function on(e){return e?.ownerDocument||document}function tO({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=A.useRef(e!==void 0),[i,s]=A.useState(t),a=o?e:i;if(process.env.NODE_ENV!=="production"){A.useEffect(()=>{o!==(e!==void 0)&&console.error([`Base UI: A component is changing the ${o?"":"un"}controlled ${r} state of ${n} to be ${o?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
5
+ `))},[r,n,e]);const{current:c}=A.useRef(t);A.useEffect(()=>{!o&&JSON.stringify(c)!==JSON.stringify(t)&&console.error([`Base UI: A component is changing the default ${r} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join(`
6
+ `))},[JSON.stringify(t)])}const l=A.useCallback(c=>{o||s(c)},[]);return[a,l]}const py={};function tr(e,t){const n=A.useRef(py);return n.current===py&&(n.current=e(t)),n}const Yu=A[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],nO=Yu&&Yu!==A.useLayoutEffect?Yu:e=>e();function ut(e){const t=tr(rO).current;return t.next=e,nO(t.effect),t.trampoline}function rO(){const e={next:void 0,callback:oO,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function oO(){if(process.env.NODE_ENV!=="production")throw new Error("Base UI: Cannot call an event handler while rendering.")}const iO=()=>{},pt=typeof document<"u"?A.useLayoutEffect:iO;function Np(e){const t=tr(sO,e).current;return t.next=e,pt(t.effect),t}function sO(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let sf;process.env.NODE_ENV!=="production"&&(sf=new Set);function aO(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");sf.has(t)||(sf.add(t),console.warn(`Base UI: ${t}`))}}function fn(){}const jn=Object.freeze({}),lO={clipPath:"inset(50%)",position:"fixed",top:0,left:0},cO="none",my="track-press",uO="input-change",dO="focus-out",fO="keyboard",pO="drag";function oi(e,t,n,r){let o=!1,i=!1;const s=r??jn;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...s}}function Nw(e,t,n){const r=jn;return{reason:e,event:t??new Event("base-ui"),...r}}function mO(e,t){const n=A.useRef(e),r=ut(t);pt(()=>{n.current!==e&&r(n.current)},[e,r]),pt(()=>{n.current=e},[e])}const af={...A};let hy=0;function hO(e,t="mui"){const[n,r]=A.useState(e),o=e||n;return A.useEffect(()=>{n==null&&(hy+=1,r(`${t}-${hy}`))},[n,t]),o}const gy=af.useId;function dc(e,t){if(gy!==void 0){const n=gy();return e??(t?`${t}-${n}`:n)}return hO(e,t)}function bl(e){return dc(e,"base-ui")}function Vn(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function lf(e,t,n,r){const o=tr(_w).current;return yO(o,e,t,n,r)&&Fw(o,[e,t,n,r]),o.callback}function gO(e){const t=tr(_w).current;return vO(t,e)&&Fw(t,e),t.callback}function _w(){return{callback:null,cleanup:null,refs:[]}}function yO(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}function vO(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Fw(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=i(n);typeof s=="function"&&(r[o]=s);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const i=t[o];if(i!=null)switch(typeof i){case"function":{const s=r[o];typeof s=="function"?s():i(null);break}case"object":{i.current=null;break}}}}}}}const xO=parseInt(A.version,10);function _p(e){return xO>=e}function yy(e){if(!A.isValidElement(e))return null;const t=e,n=t.props;return(_p(19)?n?.ref:t.ref)??null}function cf(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function bO(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const i=t[r](o);i!=null&&Object.assign(n,i);continue}o===!0?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}function wO(e,t){return typeof e=="function"?e(t):e}function SO(e,t){return typeof e=="function"?e(t):e}const as={};function Fp(e,t,n,r,o){let i={...uf(e,as)};return t&&(i=Ya(i,t)),n&&(i=Ya(i,n)),r&&(i=Ya(i,r)),i}function TO(e){if(e.length===0)return as;if(e.length===1)return uf(e[0],as);let t={...uf(e[0],as)};for(let n=1;n<e.length;n+=1)t=Ya(t,e[n]);return t}function Ya(e,t){return Lw(t)?t(e):EO(e,t)}function EO(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=cf(e.style,r);break}case"className":{e[n]=Vw(e.className,r);break}default:CO(n,r)?e[n]=kO(e[n],r):e[n]=r}}return e}function CO(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&r===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function Lw(e){return typeof e=="function"}function uf(e,t){return Lw(e)?e(t):e??as}function kO(e,t){return t?e?n=>{if(RO(n)){const o=n;df(o);const i=t(o);return o.baseUIHandlerPrevented||e?.(o),i}const r=t(n);return e?.(n),r}:t:e}function df(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Vw(e,t){return t?e?t+" "+e:t:e}function RO(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ln(e,t,n={}){const r=t.render,o=IO(t,n);if(n.enabled===!1)return null;const i=n.state??jn;return PO(e,r,o,i)}function IO(e,t={}){const{className:n,style:r,render:o}=e,{state:i=jn,ref:s,props:a,stateAttributesMapping:l,enabled:c=!0}=t,u=c?wO(n,i):void 0,d=c?SO(r,i):void 0,f=c?bO(i,l):jn,m=c?cf(f,Array.isArray(a)?TO(a):a)??jn:jn;return typeof document<"u"&&(c?Array.isArray(s)?m.ref=gO([m.ref,yy(o),...s]):m.ref=lf(m.ref,yy(o),s):lf(null,null)),c?(u!==void 0&&(m.className=Vw(m.className,u)),d!==void 0&&(m.style=cf(m.style,d)),m):jn}const AO=Symbol.for("react.lazy");function PO(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const o=Fp(n,t.props);o.ref=n.ref;let i=t;if(i?.$$typeof===AO&&(i=A.Children.toArray(t)[0]),process.env.NODE_ENV!=="production"&&!A.isValidElement(i))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join(`
7
+ `));return A.cloneElement(i,o)}if(e&&typeof e=="string")return OO(e,n);throw new Error(process.env.NODE_ENV!=="production"?"Base UI: Render element or function are not defined.":Vn(8))}function OO(e,t){return e==="button"?S.createElement("button",{type:"button",...t,key:t.key}):e==="img"?S.createElement("img",{alt:"",...t,key:t.key}):A.createElement(e,t)}function Nn(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function $w(e,t,n=(r,o)=>r===o){return e.length===t.length&&e.every((r,o)=>n(r,t[o]))}const Js=typeof navigator<"u",Ku=_O(),jO=LO(),DO=FO();typeof CSS>"u"||!CSS.supports||CSS.supports("-webkit-backdrop-filter:none");Ku.platform==="MacIntel"&&Ku.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(Ku.platform);const MO=Js&&/apple/i.test(navigator.vendor);Js&&jO.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;const NO=DO.includes("jsdom/");function _O(){if(!Js)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function FO(){if(!Js)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function LO(){if(!Js)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}function wo(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function zr(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Ts(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Lp(e){return"composedPath"in e?e.composedPath()[0]:e.target}function ff(e){if(!e||NO)return!0;try{return e.matches(":focus-visible")}catch{return!0}}const zw=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Bw(e,t){const n=Oi(e,zw()),r=n.length;if(r===0)return;const o=wo(on(e)),i=n.indexOf(o),s=i===-1?t===1?0:r-1:i+t;return n[s]}function VO(e){return Bw(on(e).body,1)||e}function $O(e){return Bw(on(e).body,-1)||e}function Zu(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!zr(n,r)}function zO(e){Oi(e,zw()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function vy(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Vp=A.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});process.env.NODE_ENV!=="production"&&(Vp.displayName="CompositeListContext");function BO(){return A.useContext(Vp)}function HO(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:o}=e,i=ut(o),s=A.useRef(0),a=tr(qO).current,l=tr(WO).current,[c,u]=A.useState(0),d=A.useRef(c),f=ut((v,x)=>{l.set(v,x??null),d.current+=1,u(d.current)}),m=ut(v=>{l.delete(v),d.current+=1,u(d.current)}),g=A.useMemo(()=>{const v=new Map;return Array.from(l.keys()).filter(b=>b.isConnected).sort(UO).forEach((b,T)=>{const E=l.get(b)??{};v.set(b,{...E,index:T})}),v},[l,c]);pt(()=>{if(typeof MutationObserver!="function"||g.size===0)return;const v=new MutationObserver(x=>{const b=new Set,T=E=>b.has(E)?b.delete(E):b.add(E);x.forEach(E=>{E.removedNodes.forEach(T),E.addedNodes.forEach(T)}),b.size===0&&(d.current+=1,u(d.current))});return g.forEach((x,b)=>{b.parentElement&&v.observe(b.parentElement,{childList:!0})}),()=>{v.disconnect()}},[g]),pt(()=>{d.current===c&&(n.current.length!==g.size&&(n.current.length=g.size),r&&r.current.length!==g.size&&(r.current.length=g.size),s.current=g.size),i(g)},[i,g,n,r,c]),pt(()=>()=>{n.current=[]},[n]),pt(()=>()=>{r&&(r.current=[])},[r]);const y=ut(v=>(a.add(v),()=>{a.delete(v)}));pt(()=>{a.forEach(v=>v(g))},[a,g]);const h=A.useMemo(()=>({register:f,unregister:m,subscribeMapChange:y,elementsRef:n,labelsRef:r,nextIndexRef:s}),[f,m,y,n,r,s]);return p.jsx(Vp.Provider,{value:h,children:t})}function WO(){return new Map}function qO(){return new Set}function UO(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}function GO(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Hw=A.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:fn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});process.env.NODE_ENV!=="production"&&(Hw.displayName="FormContext");function Ww(){return A.useContext(Hw)}let xy=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const YO={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},KO={valid(e){return e===null?null:e?{[xy.valid]:""}:{[xy.invalid]:""}}},qw=A.createContext({invalid:void 0,name:void 0,validityData:{state:YO,errors:[],error:"",value:"",initialValue:null},setValidityData:fn,disabled:void 0,touched:!1,setTouched:fn,dirty:!1,setDirty:fn,filled:!1,setFilled:fn,focused:!1,setFocused:fn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=jn)=>e,getInputValidationProps:(e=jn)=>e,inputRef:{current:null},commit:async()=>{}}});process.env.NODE_ENV!=="production"&&(qw.displayName="FieldRootContext");function $p(e=!0){const t=A.useContext(qw);if(t.setValidityData===fn&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":Vn(28));return t}function ZO(e){const{enabled:t=!0,value:n,id:r,name:o,controlRef:i,commit:s}=e,{formRef:a}=Ww(),{invalid:l,markedDirtyRef:c,validityData:u,setValidityData:d}=$p(),f=ut(e.getValue);pt(()=>{if(!t)return;let m=n;m===void 0&&(m=f()),u.initialValue===null&&m!==null&&d(g=>({...g,initialValue:m}))},[t,d,n,u.initialValue,f]),pt(()=>{!t||!r||a.current.fields.set(r,{getValue:f,name:o,controlRef:i,validityData:GO(u,l),validate(m=!0){let g=n;g===void 0&&(g=f()),c.current=!0,m?xr.flushSync(()=>s(g)):s(g)}})},[s,i,t,a,f,r,l,c,o,u,n]),pt(()=>{const m=a.current.fields;return()=>{r&&m.delete(r)}},[a,r])}const Uw=A.createContext({controlId:void 0,registerControlId:fn,labelId:void 0,setLabelId:fn,messageIds:[],setMessageIds:fn,getDescriptionProps:e=>e});process.env.NODE_ENV!=="production"&&(Uw.displayName="LabelableContext");function Gw(){return A.useContext(Uw)}function Yw(e,t){return e-t}function XO(e,t,n){const r=e.slice();return r[t]=n,r.sort(Yw)}function Kw(e,t,n,r,o,i){let s=e;return s=Nn(s,n,r),o&&(s=XO(i,t,Nn(s,i[t-1]||-1/0,i[t+1]||1/0))),s}function Zw(e,t,n){if(!Array.isArray(e))return!0;const r=e.reduce((o,i,s,a)=>(s===a.length-1||o.push(Math.abs(i-a[s+1])),o),[]);return Math.min(...r)>=t*n}const ea={activeThumbIndex:()=>null,max:()=>null,min:()=>null,minStepsBetweenValues:()=>null,step:()=>null,values:()=>null,...KO},zp=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(zp.displayName="SliderRootContext");function fc(){const e=A.useContext(zp);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: SliderRootContext is missing. Slider parts must be placed within <Slider.Root>.":Vn(62));return e}function QO(e){return"key"in e?fO:uO}function JO(e,t){return typeof e=="number"&&typeof t=="number"?e===t:Array.isArray(e)&&Array.isArray(t)?$w(e,t):!1}const Xw=A.forwardRef(function(t,n){const{"aria-labelledby":r,className:o,defaultValue:i,disabled:s=!1,id:a,format:l,largeStep:c=10,locale:u,render:d,max:f=100,min:m=0,minStepsBetweenValues:g=0,name:y,onValueChange:h,onValueCommitted:v,orientation:x="horizontal",step:b=1,thumbCollisionBehavior:T="push",thumbAlignment:E="center",value:R,...w}=t,C=bl(a),I=ut(h),P=ut(v),{clearErrors:M}=Ww(),{state:j,disabled:L,name:O,setTouched:N,setDirty:V,validityData:D,shouldValidateOnChange:k,validation:F}=$p(),{labelId:_}=Gw(),B=r??_,U=L||s,G=O??y,[H,ee]=tO({controlled:R,default:i??m,name:"Slider"}),ie=A.useRef(null),te=A.useRef(null),q=A.useRef([]),Y=A.useRef(null),Z=A.useRef(null),fe=A.useRef(-1),z=A.useRef(null),se=A.useRef(null),le=A.useRef("none"),Q=Np(l),[ce,re]=A.useState(-1),[pe,oe]=A.useState(-1),[ae,ve]=A.useState(!1),[ue,ne]=A.useState(()=>new Map),[J,$]=A.useState([void 0,void 0]),X=ut(Ve=>{re(Ve),Ve!==-1&&oe(Ve)});ZO({id:C,commit:F.commit,value:H,controlRef:te,name:G,getValue:()=>H}),mO(H,()=>{M(G),k()?F.commit(H):F.commit(H,!0);const Ve=D.initialValue;let W;Array.isArray(H)&&Array.isArray(Ve)?W=!$w(H,Ve):W=H!==Ve,V(W)});const me=ut(Ve=>{Ve&&(te.current=Ve)}),ye=Array.isArray(H),Ee=A.useMemo(()=>ye?H.slice().sort(Yw):[Nn(H,m,f)],[f,m,ye,H]),je=ut((Ve,W)=>{if(Number.isNaN(Ve)||JO(Ve,H))return;const K=W??oi(cO,void 0,void 0,{activeThumbIndex:-1});le.current=K.reason;const Ae=K.event,We=Ae.constructor??Event,Ge=new We(Ae.type,Ae);Object.defineProperty(Ge,"target",{writable:!0,value:{value:Ve,name:G}}),K.event=Ge,se.current=Ve,I(Ve,K),!K.isCanceled&&ee(Ve)}),De=ut((Ve,W,K)=>{const Ae=Kw(Ve,W,m,f,ye,Ee);if(Zw(Ae,b,g)){const We=QO(K);je(Ae,oi(We,K.nativeEvent,void 0,{activeThumbIndex:W})),N(!0);const Ge=se.current??Ae;P(Ge,Nw(We,K.nativeEvent))}});process.env.NODE_ENV!=="production"&&m>=f&&aO("Slider `max` must be greater than `min`."),pt(()=>{const Ve=wo(on(ie.current));U&&Ve&&ie.current?.contains(Ve)&&Ve.blur()},[U]),U&&ce!==-1&&X(-1);const it=A.useMemo(()=>({...j,activeThumbIndex:ce,disabled:U,dragging:ae,orientation:x,max:f,min:m,minStepsBetweenValues:g,step:b,values:Ee}),[j,ce,U,ae,f,m,g,x,b,Ee]),Pt=A.useMemo(()=>({active:ce,controlRef:te,disabled:U,dragging:ae,validation:F,formatOptionsRef:Q,handleInputChange:De,indicatorPosition:J,inset:E!=="center",labelId:B,largeStep:c,lastUsedThumbIndex:pe,lastChangedValueRef:se,lastChangeReasonRef:le,locale:u,max:f,min:m,minStepsBetweenValues:g,name:G,onValueCommitted:P,orientation:x,pressedInputRef:Y,pressedThumbCenterOffsetRef:Z,pressedThumbIndexRef:fe,pressedValuesRef:z,registerFieldControlRef:me,renderBeforeHydration:E==="edge",setActive:X,setDragging:ve,setIndicatorPosition:$,setValue:je,state:it,step:b,thumbCollisionBehavior:T,thumbMap:ue,thumbRefs:q,values:Ee}),[ce,te,B,U,ae,F,Q,De,J,c,pe,se,le,u,f,m,g,G,P,x,Y,Z,fe,z,me,X,ve,$,je,it,b,T,E,ue,q,Ee]),Yt=ln("div",t,{state:it,ref:[n,ie],props:[{"aria-labelledby":B,id:C,role:"group"},F.getValidationProps,w],stateAttributesMapping:ea});return p.jsx(zp.Provider,{value:Pt,children:p.jsx(HO,{elementsRef:q,onMapChange:ne,children:Yt})})});process.env.NODE_ENV!=="production"&&(Xw.displayName="SliderRoot");const by=new Map;function ej(e,t){const n=JSON.stringify({locale:e,options:t}),r=by.get(n);if(r)return r;const o=new Intl.NumberFormat(e,t);return by.set(n,o),o}function ii(e,t,n){return e==null?"":ej(t,n).format(e)}function tj(e,t,n){return e==null?"":n?ii(e,t,n):ii(e/100,t,{style:"percent"})}const nj=[];function ta(e){A.useEffect(e,nj)}const Ta=null;let wy=globalThis.requestAnimationFrame;class rj{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)n[o]?.(t)};request(t){const n=this.nextId;this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1;const r=process.env.NODE_ENV!=="production"&&wy!==requestAnimationFrame&&(wy=requestAnimationFrame,!0);return(!this.isScheduled||r)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Ea=new rj;class Bp{static create(){return new Bp}static request(t){return Ea.request(t)}static cancel(t){return Ea.cancel(t)}currentId=Ta;request(t){this.cancel(),this.currentId=Ea.request(()=>{this.currentId=Ta,t()})}cancel=()=>{this.currentId!==Ta&&(Ea.cancel(this.currentId),this.currentId=Ta)};disposeEffect=()=>this.cancel}function Qw(){const e=tr(Bp.create).current;return ta(e.disposeEffect),e}const Jw=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Jw.displayName="DirectionContext");function e1(){return A.useContext(Jw)?.direction??"ltr"}function t1(e){const t=e.getBoundingClientRect();return{x:(t.left+t.right)/2,y:(t.top+t.bottom)/2}}function oj(e){if(Math.abs(e)<1){const n=e.toExponential().split("e-"),r=n[0].split(".")[1];return(r?r.length:0)+parseInt(n[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function n1(e,t,n){const r=Math.round((e-n)/t)*t+n;return Number(r.toFixed(oj(t)))}function Sy({values:e,index:t,nextValue:n,min:r,max:o,step:i,minStepsBetweenValues:s,initialValues:a}){if(e.length===0)return[];const l=e.slice(),c=i*s,u=l.length-1,d=a??e,f=r+t*c,m=o-(u-t)*c;l[t]=Nn(n,f,m);for(let g=t+1;g<=u;g+=1){const y=l[g-1]+c,h=o-(u-g)*c,v=d[g]??l[g];let x=Math.max(l[g],y);v<x&&(x=Math.max(v,y)),l[g]=Nn(x,y,h)}for(let g=t-1;g>=0;g-=1){const y=l[g+1]-c,h=r+g*c,v=d[g]??l[g];let x=Math.min(l[g],y);v>x&&(x=Math.min(v,y)),l[g]=Nn(x,h,y)}for(let g=0;g<=u;g+=1)l[g]=Number(l[g].toFixed(12));return l}function ij({behavior:e,values:t,currentValues:n,initialValues:r,pressedIndex:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}){const u=n??t,d=r??t;if(!(u.length>1))return{value:i,thumbIndex:0,didSwap:!1};const m=l*c;switch(e){case"swap":{const g=u[o],y=1e-7,h=u.slice(),v=h[o-1],x=h[o+1],b=v!=null?v+m:s,T=x!=null?x-m:a,E=Nn(i,b,T),R=Number(E.toFixed(12));h[o]=R;const w=i>g,C=i<g,I=w&&x!=null&&i>=x-y,P=C&&v!=null&&i<=v+y;if(!I&&!P)return{value:h,thumbIndex:o,didSwap:!1};const M=I?o+1:o-1,j=h.map((V,D)=>{if(D===o)return R;const k=d[D];return k??u[D]});let L=i;I?L=Math.max(i,h[M]):L=Math.min(i,h[M]);const O=Sy({values:h,index:M,nextValue:L,min:s,max:a,step:l,minStepsBetweenValues:c,initialValues:j}),N=I?M-1:M+1;if(N>=0&&N<O.length){const V=O[N-1],D=O[N+1];let k=V!=null?V+m:s;k=Math.max(k,s+N*m);let F=D!=null?D-m:a;F=Math.min(F,a-(O.length-1-N)*m);const _=Nn(R,k,F);O[N]=Number(_.toFixed(12))}return{value:O,thumbIndex:M,didSwap:!0}}case"push":return{value:Sy({values:u,index:o,nextValue:i,min:s,max:a,step:l,minStepsBetweenValues:c}),thumbIndex:o,didSwap:!1};default:{const g=u.slice(),y=g[o-1],h=g[o+1],v=y!=null?y+m:s,x=h!=null?h-m:a,b=Nn(i,v,x);return g[o]=Number(b.toFixed(12)),{value:g,thumbIndex:o,didSwap:!1}}}}const sj=2;function aj(e,t){if(!e)return{start:0,end:0};function n(i){const s=i!=null?parseFloat(i):0;return Number.isNaN(s)?0:s}const r=t?"Top":"InlineStart",o=t?"Bottom":"InlineEnd";return{start:n(e[`border${r}Width`])+n(e[`padding${r}`]),end:n(e[`border${o}Width`])+n(e[`padding${o}`])}}function Ca(e,t){if(t.current!=null&&e.changedTouches){const n=e;for(let r=0;r<n.changedTouches.length;r+=1){const o=n.changedTouches[r];if(o.identifier===t.current)return{x:o.clientX,y:o.clientY}}return null}return{x:e.clientX,y:e.clientY}}const r1=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{disabled:s,dragging:a,validation:l,inset:c,lastChangedValueRef:u,lastChangeReasonRef:d,max:f,min:m,minStepsBetweenValues:g,onValueCommitted:y,orientation:h,pressedInputRef:v,pressedThumbCenterOffsetRef:x,pressedThumbIndexRef:b,pressedValuesRef:T,registerFieldControlRef:E,renderBeforeHydration:R,setActive:w,setDragging:C,setValue:I,state:P,step:M,thumbCollisionBehavior:j,thumbRefs:L,values:O}=fc(),N=e1(),V=O.length>1,D=h==="vertical",k=A.useRef(null),F=A.useRef(null),_=ut(Q=>{Q&&F.current==null&&F.current==null&&(F.current=getComputedStyle(Q))}),B=A.useRef(null),U=A.useRef(0),G=A.useRef(0),H=Np(O),ee=ut(Q=>{b.current!==Q&&(b.current=Q);const ce=L.current[Q];if(!ce){x.current=null,v.current=null;return}v.current=ce.querySelector('input[type="range"]')}),ie=ut(Q=>{const ce=k.current;if(!ce)return null;const{width:re,height:pe,bottom:oe,left:ae,right:ve}=ce.getBoundingClientRect(),ue=aj(F.current,D),ne=G.current,J=(D?pe:re)-ue.start-ue.end-ne*2,$=x.current??0,X=Q.x-$,me=Q.y-$,ye=D?oe-me-ue.end:(N==="rtl"?ve-X:X-ae)-ue.start,Ee=Nn((ye-ne)/J,0,1);let je=(f-m)*Ee+m;if(je=n1(je,M,m),je=Nn(je,m,f),!V)return{value:je,thumbIndex:0,didSwap:!1};const De=b.current;if(De<0)return null;const it=ij({behavior:j,values:O,currentValues:H.current??O,initialValues:T.current,pressedIndex:De,nextValue:je,min:m,max:f,step:M,minStepsBetweenValues:g});return j==="swap"&&it.didSwap?ee(it.thumbIndex):b.current=it.thumbIndex,it}),te=ut(Q=>{T.current=V?O.slice():null,H.current=O;const ce=b.current;let re=ce;if(ce>-1&&ce<O.length){if(O[ce]===f){let pe=ce;for(;pe>0&&O[pe-1]===f;)pe-=1;re=pe}}else{const pe=D?"y":"x";let oe;re=-1;for(let ae=0;ae<L.current.length;ae+=1){const ve=L.current[ae];if(rt(ve)){const ue=t1(ve),ne=Math.abs(Q[pe]-ue[pe]);(oe===void 0||ne<=oe)&&(re=ae,oe=ne)}}}if(re>-1&&re!==ce&&ee(re),c){const pe=L.current[re];if(rt(pe)){const oe=pe.getBoundingClientRect(),ae=D?"height":"width";G.current=oe[ae]/2}}}),q=ut(Q=>{L.current?.[Q]?.querySelector('input[type="range"]')?.focus({preventScroll:!0})}),Y=ut(Q=>{const ce=Ca(Q,B);if(ce==null)return;if(U.current+=1,Q.type==="pointermove"&&Q.buttons===0){Z(Q);return}const re=ie(ce);re!=null&&Zw(re.value,M,g)&&(!a&&U.current>sj&&C(!0),I(re.value,oi(pO,Q,void 0,{activeThumbIndex:re.thumbIndex})),H.current=Array.isArray(re.value)?re.value:[re.value],re.didSwap&&q(re.thumbIndex))});function Z(Q){w(-1),C(!1),v.current=null,x.current=null;const ce=Ca(Q,B),re=ce!=null?ie(ce):null;if(re!=null){const pe=d.current;l.commit(u.current??re.value),y(u.current??re.value,Nw(pe,Q))}"pointerType"in Q&&k.current?.hasPointerCapture(Q.pointerId)&&k.current?.releasePointerCapture(Q.pointerId),b.current=-1,B.current=null,T.current=null,z()}const fe=ut(Q=>{if(s)return;const ce=Q.changedTouches[0];ce!=null&&(B.current=ce.identifier);const re=Ca(Q,B);if(re!=null){te(re);const oe=ie(re);if(oe==null)return;q(oe.thumbIndex),I(oe.value,oi(my,Q,void 0,{activeThumbIndex:oe.thumbIndex})),H.current=Array.isArray(oe.value)?oe.value:[oe.value],oe.didSwap&&q(oe.thumbIndex)}U.current=0;const pe=on(k.current);pe.addEventListener("touchmove",Y,{passive:!0}),pe.addEventListener("touchend",Z,{passive:!0})}),z=ut(()=>{const Q=on(k.current);Q.removeEventListener("pointermove",Y),Q.removeEventListener("pointerup",Z),Q.removeEventListener("touchmove",Y),Q.removeEventListener("touchend",Z),T.current=null}),se=Qw();return A.useEffect(()=>{const Q=k.current;return Q?(Q.addEventListener("touchstart",fe,{passive:!0}),()=>{Q.removeEventListener("touchstart",fe),se.cancel(),z()}):()=>z()},[z,fe,k,se]),A.useEffect(()=>{s&&z()},[s,z]),ln("div",t,{state:P,ref:[n,E,k,_],props:[{"data-base-ui-slider-control":R?"":void 0,onPointerDown(Q){const ce=k.current;if(!ce||s||Q.defaultPrevented||!rt(Q.target)||Q.button!==0)return;const re=Ca(Q,B);if(re!=null){te(re);const oe=ie(re);if(oe==null)return;zr(L.current[oe.thumbIndex],wo(on(ce)))?Q.preventDefault():se.request(()=>{q(oe.thumbIndex)}),C(!0),x.current!=null||(I(oe.value,oi(my,Q.nativeEvent,void 0,{activeThumbIndex:oe.thumbIndex})),H.current=Array.isArray(oe.value)?oe.value:[oe.value],oe.didSwap&&q(oe.thumbIndex))}Q.nativeEvent.pointerId&&ce.setPointerCapture(Q.nativeEvent.pointerId),U.current=0;const pe=on(k.current);pe.addEventListener("pointermove",Y,{passive:!0}),pe.addEventListener("pointerup",Z,{once:!0})},tabIndex:-1},i],stateAttributesMapping:ea})});process.env.NODE_ENV!=="production"&&(r1.displayName="SliderControl");const o1=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{state:s}=fc();return ln("div",t,{state:s,ref:n,props:[{style:{position:"relative"}},i],stateAttributesMapping:ea})});process.env.NODE_ENV!=="production"&&(o1.displayName="SliderTrack");const lj={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},wl={...lj,position:"fixed",top:0,left:0};function Sl(e,t,n){return(e-t)*100/(n-t)}const pc="ArrowUp",mc="ArrowDown",hc="ArrowLeft",gc="ArrowRight",yc="Home",vc="End",cj=new Set([hc,gc]),uj=new Set([pc,mc]),dj=new Set([...cj,...uj]);[...dj];const fj=new Set([pc,mc,hc,gc,yc,vc]);let pj=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function mj(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:o,index:i}=e,{register:s,unregister:a,subscribeMapChange:l,elementsRef:c,labelsRef:u,nextIndexRef:d}=BO(),f=A.useRef(-1),[m,g]=A.useState(i??(o===pj.GuessFromOrder?()=>{if(f.current===-1){const v=d.current;d.current+=1,f.current=v}return f.current}:-1)),y=A.useRef(null),h=A.useCallback(v=>{if(y.current=v,m!==-1&&v!==null&&(c.current[m]=v,u)){const x=t!==void 0;u.current[m]=x?t:r?.current?.textContent??v.textContent}},[m,c,u,t,r]);return pt(()=>{if(i!=null)return;const v=y.current;if(v)return s(v,n),()=>{a(v)}},[i,s,a,n]),pt(()=>{if(i==null)return l(v=>{const x=y.current?v.get(y.current)?.index:null;x!=null&&g(x)})},[i,l,g]),A.useMemo(()=>({ref:h,index:m}),[m,h])}const i1=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(i1.displayName="CSPContext");const hj={disableStyleElements:!1};function gj(){return A.useContext(i1)??hj}function yj(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:o,registerControlId:i}=Gw(),s=bl(t),a=n?o:void 0,l=tr(()=>Symbol("labelable-control")),c=A.useRef(!1),u=A.useRef(t!=null),d=ut(()=>{!c.current||i===fn||(c.current=!1,i(l.current,void 0))});return pt(()=>{if(i===fn)return;let f;if(n){const m=r?.current;rt(m)&&m.closest("label")!=null?f=t??null:f=a??s}else if(t!=null)u.current=!0,f=t;else if(u.current)f=s;else{d();return}if(f===void 0){d();return}c.current=!0,i(l.current,f)},[t,r,a,i,n,s,l,d]),A.useEffect(()=>d,[d]),o??s}let vj=(function(e){return e.index="data-index",e.dragging="data-dragging",e.orientation="data-orientation",e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.focused="data-focused",e})({});const xj='!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest("[data-base-ui-slider-control]");if(!e)return;const r=e.querySelector("[data-base-ui-slider-indicator]"),i=e.getBoundingClientRect(),n="vertical"===e.getAttribute("data-orientation")?"height":"width",o=e.querySelectorAll(\'input[type="range"]\'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute("value")??"");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute("max")??"100"),g=parseFloat(e.getAttribute("min")??"0"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty("--position",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty("visibility"),r&&(0===t?(a=v,r.style.setProperty("--start-position",`${v}%`),l||r.style.removeProperty("visibility")):t===s&&(u=v-(a??0),r.style.setProperty("--end-position",`${v}%`),r.style.setProperty("--relative-size",`${u}%`),r.style.removeProperty("visibility"))))}}();',s1="PageUp",a1="PageDown",bj=new Set([pc,mc,hc,gc,yc,vc,s1,a1]);function wj(e,t,n,r){if(!(t<0))return e.length===2?t===0?`${ii(e[t],r,n)} start range`:`${ii(e[t],r,n)} end range`:n?ii(e[t],r,n):void 0}function Vo(e,t,n,r,o){return n===1?Math.min(e+t,o):Math.max(e-t,r)}const l1=A.forwardRef(function(t,n){const{render:r,children:o,className:i,"aria-describedby":s,"aria-label":a,"aria-labelledby":l,disabled:c=!1,getAriaLabel:u,getAriaValueText:d,id:f,index:m,inputRef:g,onBlur:y,onFocus:h,onKeyDown:v,tabIndex:x,...b}=t,{nonce:T}=gj(),E=bl(f),{active:R,lastUsedThumbIndex:w,controlRef:C,disabled:I,validation:P,formatOptionsRef:M,handleInputChange:j,inset:L,labelId:O,largeStep:N,locale:V,max:D,min:k,minStepsBetweenValues:F,name:_,orientation:B,pressedInputRef:U,pressedThumbCenterOffsetRef:G,pressedThumbIndexRef:H,renderBeforeHydration:ee,setActive:ie,setIndicatorPosition:te,state:q,step:Y,values:Z}=fc(),fe=e1(),z=c||I,se=Z.length>1,le=B==="vertical",Q=fe==="rtl",{setTouched:ce,setFocused:re,validationMode:pe}=$p(),oe=A.useRef(null),ae=A.useRef(null),ve=bl(),ue=yj(),ne=se?ve:ue,J=A.useMemo(()=>({inputId:ne}),[ne]),{ref:$,index:X}=mj({metadata:J}),me=se?m??X:0,ye=me===Z.length-1,Ee=Z[me],je=Sl(Ee,k,D),[De,it]=A.useState(!1),[Pt,Yt]=A.useState();ta(()=>it(!0));const Ve=w>=0&&w<Z.length?w:-1,W=ut(()=>{const et=C.current,ft=oe.current;if(!et||!ft)return;const tt=ft.getBoundingClientRect(),cn=et.getBoundingClientRect(),Sr=le?"height":"width",Tr=cn[Sr]-tt[Sr],Do=(tt[Sr]/2+Tr*je/100)/cn[Sr]*100;Yt(Do),me===0?te(Mo=>[Do,Mo[1]]):ye&&te(Mo=>[Mo[0],Do])});pt(()=>{L&&queueMicrotask(W)},[W,L]),pt(()=>{L&&W()},[W,L,je]);const K=A.useCallback(()=>{const et=le?"bottom":"insetInlineStart",ft=le?"left":"top";let tt;return se?R===me?tt=2:Ve===me&&(tt=1):R===me&&(tt=1),L?{"--position":`${Pt}%`,visibility:ee&&!De||Pt===void 0?"hidden":void 0,position:"absolute",[et]:"var(--position)",[ft]:"50%",translate:`${(le||!Q?-1:1)*50}% ${(le?1:-1)*50}%`,zIndex:tt}:Number.isFinite(je)?{position:"absolute",[et]:`${je}%`,[ft]:"50%",translate:`${(le||!Q?-1:1)*50}% ${(le?1:-1)*50}%`,zIndex:tt}:wl},[R,me,L,De,Pt,se,ee,Q,Ve,je,le]);let Ae;B==="vertical"&&(Ae=Q?"vertical-rl":"vertical-lr");const We=Fp({"aria-label":typeof u=="function"?u(me):a,"aria-labelledby":l??O,"aria-describedby":s,"aria-orientation":B,"aria-valuenow":Ee,"aria-valuetext":typeof d=="function"?d(ii(Ee,V,M.current??void 0),Ee,me):wj(Z,me,M.current??void 0,V),disabled:z,id:ne,max:D,min:k,name:_,onChange(et){j(et.target.valueAsNumber,me,et)},onFocus(){ie(me),re(!0)},onBlur(){oe.current&&(ie(-1),ce(!0),re(!1),pe==="onBlur"&&P.commit(Kw(Ee,me,k,D,se,Z)))},onKeyDown(et){if(!bj.has(et.key))return;fj.has(et.key)&&et.stopPropagation();let ft=null;const tt=n1(Ee,Y,k);switch(et.key){case pc:ft=Vo(tt,et.shiftKey?N:Y,1,k,D);break;case gc:ft=Vo(tt,et.shiftKey?N:Y,Q?-1:1,k,D);break;case mc:ft=Vo(tt,et.shiftKey?N:Y,-1,k,D);break;case hc:ft=Vo(tt,et.shiftKey?N:Y,Q?1:-1,k,D);break;case s1:ft=Vo(tt,N,1,k,D);break;case a1:ft=Vo(tt,N,-1,k,D);break;case vc:ft=D,se&&(ft=Number.isFinite(Z[me+1])?Z[me+1]-Y*F:D);break;case yc:ft=k,se&&(ft=Number.isFinite(Z[me-1])?Z[me-1]+Y*F:k);break}ft!==null&&(j(ft,me,et),et.preventDefault())},step:Y,style:{...wl,width:"100%",height:"100%",writingMode:Ae},tabIndex:x??void 0,type:"range",value:Ee??""},P.getInputValidationProps),Ge=lf(ae,P.inputRef,g);return ln("div",t,{state:q,ref:[n,$,oe],props:[{[vj.index]:me,children:p.jsxs(A.Fragment,{children:[o,p.jsx("input",{ref:Ge,...We}),L&&!De&&ee&&ye&&p.jsx("script",{nonce:T,dangerouslySetInnerHTML:{__html:xj},suppressHydrationWarning:!0})]}),id:E,onBlur:y,onFocus:h,onPointerDown(et){if(H.current=me,oe.current!=null){const ft=B==="horizontal"?"x":"y",tt=t1(oe.current),cn=(B==="horizontal"?et.clientX:et.clientY)-tt[ft];G.current=cn}ae.current!=null&&U.current!==ae.current&&(U.current=ae.current)},style:K(),suppressHydrationWarning:ee||void 0,tabIndex:-1},b],stateAttributesMapping:ea})});process.env.NODE_ENV!=="production"&&(l1.displayName="SliderThumb");function Sj(e,t,n,r,o,i){const s=n===void 0||t&&r===void 0?"hidden":void 0,a=e?"bottom":"insetInlineStart",l=e?"height":"width",u={visibility:o&&!i?"hidden":s,position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};return u["--start-position"]=`${n??0}%`,t?(u["--relative-size"]=`${(r??0)-(n??0)}%`,u[a]="var(--start-position)",u[l]="var(--relative-size)",u):(u[a]=0,u[l]="var(--start-position)",u)}function Tj(e,t,n,r){const o=e?"bottom":"insetInlineStart",i=e?"height":"width",a={position:e?"absolute":"relative",[e?"width":"height"]:"inherit"};if(!t)return a[o]=0,a[i]=`${n}%`,a;const l=r-n;return a[o]=`${n}%`,a[i]=`${l}%`,a}const c1=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{indicatorPosition:s,inset:a,max:l,min:c,orientation:u,renderBeforeHydration:d,state:f,values:m}=fc(),[g,y]=A.useState(!1);ta(()=>y(!0));const h=u==="vertical",v=m.length>1,x=a?Sj(h,v,s[0],s[1],d,g):Tj(h,v,Sl(m[0],c,l),Sl(m[m.length-1],c,l));return ln("div",t,{state:f,ref:n,props:[{"data-base-ui-slider-indicator":d?"":void 0,style:x,suppressHydrationWarning:d||void 0},i],stateAttributesMapping:ea})});process.env.NODE_ENV!=="production"&&(c1.displayName="SliderIndicator");const Zr=e=>{const t=S.useContext(ko);if(e)return e;if(t)return t.locale||e},Ej=e=>{const[t,n]=S.useState(null),r=S.useRef(null);return S.useEffect(()=>{const o=r.current;if(o===null)return;const i=Number(o.getAttribute("aria-valuenow"));Be.number(i)&&n(i);const s=new MutationObserver(a=>{const l=a[0].target,c=Number(l.getAttribute("aria-valuenow"));n(Be.number(c)?c:null)});return s.observe(o,{attributeFilter:["aria-valuenow"]}),()=>s.disconnect()},[]),p.jsx(Mp,{title:"",ref:r,as:l1,enabled:e.tooltip,className:"focus-within::scale-105 block size-5 cursor-grab rounded-full border-2 border-input-border bg-input-switch shadow-shadow-floating focus-within:border-primary focus-within:outline active:cursor-grabbing",children:t})},Cj=e=>{const{tooltip:t,className:n,defaultValue:r,value:o,...i}=e,s=S.useRef(Mi()),a=r||o||[],l=Zr();return p.jsx(Xw,{...i,value:o,locale:l,defaultValue:r,children:p.jsxs(r1,{className:Ie("relative flex h-5 w-full touch-none select-none items-center",n),children:[p.jsx(o1,{className:"relative h-2 grow rounded-full bg-background",children:p.jsx(c1,{className:"absolute h-full rounded-full bg-primary"})}),Array.isArray(a)?a.map((c,u)=>p.jsx(Ej,{tooltip:t??!1},`${s.current}-${u}`)):null]})})},Br=e=>{const t=S.useRef(e);return S.useEffect(()=>{t.current=e},[e]),t},kj=S.forwardRef(({children:e,loading:t,container:n,error:r,...o},i)=>{const s=S.useId(),[a,l]=S.useState(o.checked??!1),c=a,u=S.useRef(null),d=Br(o.onChange);S.useImperativeHandle(i,()=>u.current),S.useEffect(()=>{if(u.current!==null&&d.current){const m=y=>{d.current&&d.current(y)},g=u.current;return g.addEventListener("change",m),()=>g?.removeEventListener("change",m)}},[]);const f=()=>{const m=!u.current?.checked;l(m),o?.onCheck?.(m),u.current!==null&&(u.current.checked=m,u.current.dispatchEvent(new Event("change",{bubbles:!0})))};return p.jsxs("fieldset",{className:Ie("flex flex-col flex-wrap justify-center",n),"data-component":"switch",disabled:o.disabled||t,children:[p.jsxs("span",{className:"flex flex-row flex-wrap items-center",children:[p.jsx("input",{...o,hidden:!0,ref:u,type:"checkbox",checked:c,id:o.id||s,"data-trigger":"change","data-checked":c,disabled:o.disabled||t,onChange:m=>l(m.target.checked)}),p.jsx("button",{type:"button",role:"switch",onClick:f,"aria-checked":c,"data-checked":c,"aria-labelledby":`${s}-label`,disabled:o.disabled||t,className:"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 data-[checked=false]:bg-input-switch-bg data-[checked=true]:bg-primary",children:p.jsx("span",{"aria-hidden":"true","data-checked":c,className:"inline-block aspect-square size-5 transform rounded-full shadow ring-0 transition duration-300 ease-in-out data-[checked=false]:translate-x-0 data-[checked=true]:translate-x-5 data-[checked=false]:bg-disabled data-[checked=true]:bg-input-switch"})}),p.jsx("label",{htmlFor:o.id||s,className:"ml-3 inline-block text-sm",id:`${s}-label`,children:p.jsx("span",{className:"font-medium text-foreground",children:e})})]}),p.jsx("span",{className:"mt-1 flex-1 whitespace-nowrap text-xs text-danger empty:mt-0 empty:hidden",children:r})]})}),Cs=S.createContext({});function ar(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const u1=typeof window<"u",xc=u1?S.useLayoutEffect:S.useEffect,bc=S.createContext(null);function Hp(e,t){e.indexOf(t)===-1&&e.push(t)}function hi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function Rj([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const o=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(o,0,i)}return e}const nr=(e,t,n)=>n>t?t:n<e?e:n;function pf(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let _i=()=>{},vn=()=>{};typeof process<"u"&&process.env?.NODE_ENV!=="production"&&(_i=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(pf(t,n))},vn=(e,t,n)=>{if(!e)throw new Error(pf(t,n))});const gr={},d1=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function f1(e){return typeof e=="object"&&e!==null}const p1=e=>/^0[^.\s]+$/u.test(e);function m1(e){let t;return()=>(t===void 0&&(t=e()),t)}const kn=e=>e,Ij=(e,t)=>n=>t(e(n)),na=(...e)=>e.reduce(Ij),gi=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Wp{constructor(){this.subscriptions=[]}add(t){return Hp(this.subscriptions,t),()=>hi(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let i=0;i<o;i++){const s=this.subscriptions[i];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const hn=e=>e*1e3,Tn=e=>e/1e3;function h1(e,t){return t?e*(1e3/t):0}const Ty=new Set;function wc(e,t,n){e||Ty.has(t)||(console.warn(pf(t,n)),Ty.add(t))}const Aj=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e},g1=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Pj=1e-7,Oj=12;function jj(e,t,n,r,o){let i,s,a=0;do s=t+(n-t)/2,i=g1(s,r,o)-e,i>0?n=s:t=s;while(Math.abs(i)>Pj&&++a<Oj);return s}function ra(e,t,n,r){if(e===t&&n===r)return kn;const o=i=>jj(i,0,1,e,n);return i=>i===0||i===1?i:g1(o(i),t,r)}const y1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,v1=e=>t=>1-e(1-t),x1=ra(.33,1.53,.69,.99),qp=v1(x1),b1=y1(qp),w1=e=>(e*=2)<1?.5*qp(e):.5*(2-Math.pow(2,-10*(e-1))),Up=e=>1-Math.sin(Math.acos(e)),S1=v1(Up),T1=y1(Up),Dj=ra(.42,0,1,1),Mj=ra(0,0,.58,1),E1=ra(.42,0,.58,1),C1=e=>Array.isArray(e)&&typeof e[0]!="number";function k1(e,t){return C1(e)?e[Aj(0,e.length,t)]:e}const R1=e=>Array.isArray(e)&&typeof e[0]=="number",Ey={linear:kn,easeIn:Dj,easeInOut:E1,easeOut:Mj,circIn:Up,circInOut:T1,circOut:S1,backIn:qp,backInOut:b1,backOut:x1,anticipate:w1},Nj=e=>typeof e=="string",mf=e=>{if(R1(e)){vn(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return ra(t,n,r,o)}else if(Nj(e))return vn(Ey[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ey[e];return e},ka=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function _j(e,t){let n=new Set,r=new Set,o=!1,i=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){s.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,f=!1)=>{const g=f&&o?n:r;return d&&s.add(u),g.has(u)||g.add(u),u},cancel:u=>{r.delete(u),s.delete(u)},process:u=>{if(a=u,o){i=!0;return}o=!0,[n,r]=[r,n],n.forEach(l),n.clear(),o=!1,i&&(i=!1,c.process(u))}};return c}const Fj=40;function I1(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=ka.reduce((b,T)=>(b[T]=_j(i),b),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:m,postRender:g}=s,y=()=>{const b=gr.useManualTiming?o.timestamp:performance.now();n=!1,gr.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,Fj),1)),o.timestamp=b,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),m.process(o),g.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(y))},h=()=>{n=!0,r=!0,o.isProcessing||e(y)};return{schedule:ka.reduce((b,T)=>{const E=s[T];return b[T]=(R,w=!1,C=!1)=>(n||h(),E.schedule(R,w,C)),b},{}),cancel:b=>{for(let T=0;T<ka.length;T++)s[ka[T]].cancel(b)},state:o,steps:s}}const{schedule:mt,cancel:yr,state:Wt,steps:Xu}=I1(typeof requestAnimationFrame<"u"?requestAnimationFrame:kn,!0);let Ka;function Lj(){Ka=void 0}const Jt={now:()=>(Ka===void 0&&Jt.set(Wt.isProcessing||gr.useManualTiming?Wt.timestamp:performance.now()),Ka),set:e=>{Ka=e,queueMicrotask(Lj)}},A1=e=>t=>typeof t=="string"&&t.startsWith(e),P1=A1("--"),Vj=A1("var(--"),Gp=e=>Vj(e)?$j.test(e.split("/*")[0].trim()):!1,$j=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Cy(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Fi={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ks={...Fi,transform:e=>nr(0,1,e)},Ra={...Fi,default:1},ls=e=>Math.round(e*1e5)/1e5,Yp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zj(e){return e==null}const Bj=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Kp=(e,t)=>n=>!!(typeof n=="string"&&Bj.test(n)&&n.startsWith(e)||t&&!zj(n)&&Object.prototype.hasOwnProperty.call(n,t)),O1=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,i,s,a]=r.match(Yp);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},Hj=e=>nr(0,255,e),Qu={...Fi,transform:e=>Math.round(Hj(e))},uo={test:Kp("rgb","red"),parse:O1("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Qu.transform(e)+", "+Qu.transform(t)+", "+Qu.transform(n)+", "+ls(ks.transform(r))+")"};function Wj(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const hf={test:Kp("#"),parse:Wj,transform:uo.transform},oa=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Rr=oa("deg"),Qn=oa("%"),Te=oa("px"),qj=oa("vh"),Uj=oa("vw"),ky={...Qn,parse:e=>Qn.parse(e)/100,transform:e=>Qn.transform(e*100)},Go={test:Kp("hsl","hue"),parse:O1("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Qn.transform(ls(t))+", "+Qn.transform(ls(n))+", "+ls(ks.transform(r))+")"},Nt={test:e=>uo.test(e)||hf.test(e)||Go.test(e),parse:e=>uo.test(e)?uo.parse(e):Go.test(e)?Go.parse(e):hf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?uo.transform(e):Go.transform(e),getAnimatableNone:e=>{const t=Nt.parse(e);return t.alpha=0,Nt.transform(t)}},Gj=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Yj(e){return isNaN(e)&&typeof e=="string"&&(e.match(Yp)?.length||0)+(e.match(Gj)?.length||0)>0}const j1="number",D1="color",Kj="var",Zj="var(",Ry="${}",Xj=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Rs(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(Xj,l=>(Nt.test(l)?(r.color.push(i),o.push(D1),n.push(Nt.parse(l))):l.startsWith(Zj)?(r.var.push(i),o.push(Kj),n.push(l)):(r.number.push(i),o.push(j1),n.push(parseFloat(l))),++i,Ry)).split(Ry);return{values:n,split:a,indexes:r,types:o}}function M1(e){return Rs(e).values}function N1(e){const{split:t,types:n}=Rs(e),r=t.length;return o=>{let i="";for(let s=0;s<r;s++)if(i+=t[s],o[s]!==void 0){const a=n[s];a===j1?i+=ls(o[s]):a===D1?i+=Nt.transform(o[s]):i+=o[s]}return i}}const Qj=e=>typeof e=="number"?0:Nt.test(e)?Nt.getAnimatableNone(e):e;function Jj(e){const t=M1(e);return N1(e)(t.map(Qj))}const _n={test:Yj,parse:M1,createTransformer:N1,getAnimatableNone:Jj};function Ju(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function eD({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,i=0,s=0;if(!t)o=i=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Ju(l,a,e+1/3),i=Ju(l,a,e),s=Ju(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:r}}function Tl(e,t){return n=>n>0?t:e}const xt=(e,t,n)=>e+(t-e)*n,ed=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},tD=[hf,uo,Go],nD=e=>tD.find(t=>t.test(e));function Iy(e){const t=nD(e);if(_i(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Go&&(n=eD(n)),n}const Ay=(e,t)=>{const n=Iy(e),r=Iy(t);if(!n||!r)return Tl(e,t);const o={...n};return i=>(o.red=ed(n.red,r.red,i),o.green=ed(n.green,r.green,i),o.blue=ed(n.blue,r.blue,i),o.alpha=xt(n.alpha,r.alpha,i),uo.transform(o))},gf=new Set(["none","hidden"]);function rD(e,t){return gf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function oD(e,t){return n=>xt(e,t,n)}function Zp(e){return typeof e=="number"?oD:typeof e=="string"?Gp(e)?Tl:Nt.test(e)?Ay:aD:Array.isArray(e)?_1:typeof e=="object"?Nt.test(e)?Ay:iD:Tl}function _1(e,t){const n=[...e],r=n.length,o=e.map((i,s)=>Zp(i)(i,t[s]));return i=>{for(let s=0;s<r;s++)n[s]=o[s](i);return n}}function iD(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Zp(e[o])(e[o],t[o]));return o=>{for(const i in r)n[i]=r[i](o);return n}}function sD(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],s=e.indexes[i][r[i]],a=e.values[s]??0;n[o]=a,r[i]++}return n}const aD=(e,t)=>{const n=_n.createTransformer(t),r=Rs(e),o=Rs(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?gf.has(e)&&!o.values.length||gf.has(t)&&!r.values.length?rD(e,t):na(_1(sD(r,o),o.values),n):(_i(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Tl(e,t))};function F1(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?xt(e,t,n):Zp(e)(e,t)}const lD=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>mt.update(t,n),stop:()=>yr(t),now:()=>Wt.isProcessing?Wt.timestamp:Jt.now()}},L1=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let i=0;i<o;i++)r+=Math.round(e(i/(o-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},El=2e4;function Xp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<El;)t+=n,r=e.next(t);return t>=El?1/0:t}function V1(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Xp(r),El);return{type:"keyframes",ease:i=>r.next(o*i).value/t,duration:Tn(o)}}const cD=5;function $1(e,t,n){const r=Math.max(t-cD,0);return h1(n-e(r),t-r)}const Ct={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},td=.001;function uD({duration:e=Ct.duration,bounce:t=Ct.bounce,velocity:n=Ct.velocity,mass:r=Ct.mass}){let o,i;_i(e<=hn(Ct.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=nr(Ct.minDamping,Ct.maxDamping,s),e=nr(Ct.minDuration,Ct.maxDuration,Tn(e)),s<1?(o=c=>{const u=c*s,d=u*e,f=u-n,m=yf(c,s),g=Math.exp(-d);return td-f/m*g},i=c=>{const d=c*s*e,f=d*n+n,m=Math.pow(s,2)*Math.pow(c,2)*e,g=Math.exp(-d),y=yf(Math.pow(c,2),s);return(-o(c)+td>0?-1:1)*((f-m)*g)/y}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-td+u*d},i=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=fD(o,i,a);if(e=hn(e),isNaN(l))return{stiffness:Ct.stiffness,damping:Ct.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:s*2*Math.sqrt(r*c),duration:e}}}const dD=12;function fD(e,t,n){let r=n;for(let o=1;o<dD;o++)r=r-e(r)/t(r);return r}function yf(e,t){return e*Math.sqrt(1-t*t)}const pD=["duration","bounce"],mD=["stiffness","damping","mass"];function Py(e,t){return t.some(n=>e[n]!==void 0)}function hD(e){let t={velocity:Ct.velocity,stiffness:Ct.stiffness,damping:Ct.damping,mass:Ct.mass,isResolvedFromDuration:!1,...e};if(!Py(e,mD)&&Py(e,pD))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,i=2*nr(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ct.mass,stiffness:o,damping:i}}else{const n=uD({...e,velocity:0});t={...t,...n,mass:Ct.mass},t.isResolvedFromDuration=!0}return t}function Is(e=Ct.visualDuration,t=Ct.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:m}=hD({...n,velocity:-Tn(n.velocity||0)}),g=f||0,y=c/(2*Math.sqrt(l*u)),h=s-i,v=Tn(Math.sqrt(l/u)),x=Math.abs(h)<5;r||(r=x?Ct.restSpeed.granular:Ct.restSpeed.default),o||(o=x?Ct.restDelta.granular:Ct.restDelta.default);let b;if(y<1){const E=yf(v,y);b=R=>{const w=Math.exp(-y*v*R);return s-w*((g+y*v*h)/E*Math.sin(E*R)+h*Math.cos(E*R))}}else if(y===1)b=E=>s-Math.exp(-v*E)*(h+(g+v*h)*E);else{const E=v*Math.sqrt(y*y-1);b=R=>{const w=Math.exp(-y*v*R),C=Math.min(E*R,300);return s-w*((g+y*v*h)*Math.sinh(C)+E*h*Math.cosh(C))/E}}const T={calculatedDuration:m&&d||null,next:E=>{const R=b(E);if(m)a.done=E>=d;else{let w=E===0?g:0;y<1&&(w=E===0?hn(g):$1(b,E,R));const C=Math.abs(w)<=r,I=Math.abs(s-R)<=o;a.done=C&&I}return a.value=a.done?s:R,a},toString:()=>{const E=Math.min(Xp(T),El),R=L1(w=>T.next(E*w).value,E,30);return E+"ms "+R},toTransition:()=>{}};return T}Is.applyToOptions=e=>{const t=V1(e,100,Is);return e.ease=t.ease,e.duration=hn(t.duration),e.type="keyframes",e};function vf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},m=C=>a!==void 0&&C<a||l!==void 0&&C>l,g=C=>a===void 0?l:l===void 0||Math.abs(a-C)<Math.abs(l-C)?a:l;let y=n*t;const h=d+y,v=s===void 0?h:s(h);v!==h&&(y=v-d);const x=C=>-y*Math.exp(-C/r),b=C=>v+x(C),T=C=>{const I=x(C),P=b(C);f.done=Math.abs(I)<=c,f.value=f.done?v:P};let E,R;const w=C=>{m(f.value)&&(E=C,R=Is({keyframes:[f.value,g(f.value)],velocity:$1(b,C,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return w(0),{calculatedDuration:null,next:C=>{let I=!1;return!R&&E===void 0&&(I=!0,T(C),w(C)),E!==void 0&&C>=E?R.next(C-E):(!I&&T(C),f)}}}function gD(e,t,n){const r=[],o=n||gr.mix||F1,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||kn:t;a=na(l,a)}r.push(a)}return r}function z1(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(vn(i===t.length,"Both input and output ranges must be the same length","range-length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=gD(t,r,o),l=a.length,c=u=>{if(s&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=gi(e[d],e[d+1],u);return a[d](f)};return n?u=>c(nr(e[0],e[i-1],u)):c}function B1(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=gi(0,t,r);e.push(xt(n,1,o))}}function H1(e){const t=[0];return B1(t,e.length-1),t}function yD(e,t){return e.map(n=>n*t)}function vD(e,t){return e.map(()=>t||E1).splice(0,e.length-1)}function Yo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=C1(r)?r.map(mf):mf(r),i={done:!1,value:t[0]},s=yD(n&&n.length===t.length?n:H1(t),e),a=z1(s,t,{ease:Array.isArray(o)?o:vD(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}const xD=e=>e!==null;function Qp(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(xD),a=o<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const bD={decay:vf,inertia:vf,tween:Yo,keyframes:Yo,spring:Is};function W1(e){typeof e.type=="string"&&(e.type=bD[e.type])}class Jp{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const wD=e=>e/100;class em extends Jp{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Jt.now()&&this.tick(Jt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;W1(t);const{type:n=Yo,repeat:r=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=t;let{keyframes:a}=t;const l=n||Yo;process.env.NODE_ENV!=="production"&&l!==Yo&&vn(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),l!==Yo&&typeof a[0]!="number"&&(this.mixKeyframes=na(wD,F1(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=Xp(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:m,type:g,onUpdate:y,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-c*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let b=this.currentTime,T=r;if(d){const C=Math.min(this.currentTime,o)/a;let I=Math.floor(C),P=C%1;!P&&C>=1&&(P=1),P===1&&I--,I=Math.min(I,d+1),I%2&&(f==="reverse"?(P=1-P,m&&(P-=m/a)):f==="mirror"&&(T=s)),b=nr(0,1,P)*a}const E=x?{done:!1,value:u[0]}:T.next(b);i&&(E.value=i(E.value));let{done:R}=E;!x&&l!==null&&(R=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return w&&g!==vf&&(E.value=Qp(u,this.options,h,this.speed)),y&&y(E.value),w&&this.finish(),E}then(t,n){return this.finished.then(t,n)}get duration(){return Tn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Tn(t)}get time(){return Tn(this.currentTime)}set time(t){t=hn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Jt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Tn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=lD,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Jt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function SD(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const fo=e=>e*180/Math.PI,xf=e=>{const t=fo(Math.atan2(e[1],e[0]));return bf(t)},TD={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:xf,rotateZ:xf,skewX:e=>fo(Math.atan(e[1])),skewY:e=>fo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},bf=e=>(e=e%360,e<0&&(e+=360),e),Oy=xf,jy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Dy=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ED={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:jy,scaleY:Dy,scale:e=>(jy(e)+Dy(e))/2,rotateX:e=>bf(fo(Math.atan2(e[6],e[5]))),rotateY:e=>bf(fo(Math.atan2(-e[2],e[0]))),rotateZ:Oy,rotate:Oy,skewX:e=>fo(Math.atan(e[4])),skewY:e=>fo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function wf(e){return e.includes("scale")?1:0}function Sf(e,t){if(!e||e==="none")return wf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=ED,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=TD,o=a}if(!o)return wf(t);const i=r[t],s=o[1].split(",").map(kD);return typeof i=="function"?i(s):s[i]}const CD=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Sf(n,t)};function kD(e){return parseFloat(e.trim())}const Li=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Vi=new Set(Li),My=e=>e===Fi||e===Te,RD=new Set(["x","y","z"]),ID=Li.filter(e=>!RD.has(e));function AD(e){const t=[];return ID.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Mr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Sf(t,"x"),y:(e,{transform:t})=>Sf(t,"y")};Mr.translateX=Mr.x;Mr.translateY=Mr.y;const yo=new Set;let Tf=!1,Ef=!1,Cf=!1;function q1(){if(Ef){const e=Array.from(yo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=AD(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([i,s])=>{r.getValue(i)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Ef=!1,Tf=!1,yo.forEach(e=>e.complete(Cf)),yo.clear()}function U1(){yo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ef=!0)})}function PD(){Cf=!0,U1(),q1(),Cf=!1}class tm{constructor(t,n,r,o,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(yo.add(this),Tf||(Tf=!0,mt.read(U1),mt.resolveKeyframes(q1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const i=o?.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const a=r.readValue(n,s);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=s),o&&i===void 0&&o.set(t[0])}SD(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),yo.delete(this)}cancel(){this.state==="scheduled"&&(yo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const OD=e=>e.startsWith("--");function jD(e,t,n){OD(t)?e.style.setProperty(t,n):e.style[t]=n}const DD={};function G1(e,t){const n=m1(e);return()=>DD[t]??n()}const MD=G1(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Y1=G1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ji=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ny={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ji([0,.65,.55,1]),circOut:Ji([.55,0,1,.45]),backIn:Ji([.31,.01,.66,-.59]),backOut:Ji([.33,1.53,.69,.99])};function K1(e,t){if(e)return typeof e=="function"?Y1()?L1(e,t):"ease-out":R1(e)?Ji(e):Array.isArray(e)?e.map(n=>K1(n,t)||Ny.easeOut):Ny[e]}function ND(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=K1(a,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function nm(e){return typeof e=="function"&&"applyToOptions"in e}function _D({type:e,...t}){return nm(e)&&Y1()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Z1 extends Jp{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,vn(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=_D(t);this.animation=ND(n,r,o,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const u=Qp(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):jD(n,r,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Tn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Tn(t)}get time(){return Tn(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=hn(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&MD()?(this.animation.timeline=t,kn):n(this)}}const X1={anticipate:w1,backInOut:b1,circInOut:T1};function FD(e){return e in X1}function LD(e){typeof e.ease=="string"&&FD(e.ease)&&(e.ease=X1[e.ease])}const nd=10;class VD extends Z1{constructor(t){LD(t),W1(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:i,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new em({...s,autoplay:!1}),l=Math.max(nd,Jt.now()-this.startTime),c=nr(0,nd,l-nd);n.setWithVelocity(a.sample(Math.max(0,l-c)).value,a.sample(l).value,c),a.stop()}}const _y=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(_n.test(e)||e==="0")&&!e.startsWith("url("));function $D(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function zD(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=_y(o,t),a=_y(i,t);return _i(s===a,`You are trying to animate ${t} from "${o}" to "${i}". "${s?i:o}" is not an animatable value.`,"value-not-animatable"),!s||!a?!1:$D(e)||(n==="spring"||nm(n))&&r}function kf(e){e.duration=0,e.type="keyframes"}const BD=new Set(["opacity","clipPath","filter","transform"]),HD=m1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function WD(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return HD()&&n&&BD.has(n)&&(n!=="transform"||!c)&&!l&&!r&&o!=="mirror"&&i!==0&&s!=="inertia"}const qD=40;class UD extends Jp{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Jt.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:i,repeatType:s,name:l,motionValue:c,element:u,...d},m=u?.KeyframeResolver||tm;this.keyframeResolver=new m(a,(g,y,h)=>this.onKeyframesResolved(g,y,f,!h),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:i,type:s,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Jt.now(),zD(t,i,s,a)||((gr.instantAnimations||!l)&&u?.(Qp(t,r,n)),t[0]=t[t.length-1],kf(r),r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>qD?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!c&&WD(f),g=f.motionValue?.owner?.current,y=m?new VD({...f,element:g}):new em(f);y.finished.then(()=>{this.notifyFinished()}).catch(kn),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),PD()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class GD{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>r.attachTimeline(t));return()=>{n.forEach((r,o)=>{r&&r(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Fy(this.animations,"duration")}get iterationDuration(){return Fy(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Fy(e,t){let n=0;for(let r=0;r<e.length;r++){const o=e[r][t];o!==null&&o>n&&(n=o)}return n}class YD extends GD{then(t,n){return this.finished.finally(t).then(()=>{})}}function Q1(e,t,n,r=0,o=1){const i=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),s=e.size,a=(s-1)*r;return typeof n=="function"?n(i,s):o===1?i*r:a-i*r}const KD=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ZD(e){const t=KD.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const XD=4;function J1(e,t,n=1){vn(n<=XD,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=ZD(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const s=i.trim();return d1(s)?parseFloat(s):s}return Gp(o)?J1(o,t,n+1):o}const QD={type:"spring",stiffness:500,damping:25,restSpeed:10},JD=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),eM={type:"keyframes",duration:.8},tM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nM=(e,{keyframes:t})=>t.length>2?eM:Vi.has(e)?e.startsWith("scale")?JD(t[1]):QD:tM,rM=e=>e!==null;function oM(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(rM),i=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[i]}function rm(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function om(e,t){const n=e?.[t]??e?.default??e;return n!==e?rm(n,e):n}function iM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const im=(e,t,n,r={},o,i)=>s=>{const a=om(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-hn(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};iM(a)||Object.assign(u,nM(e,u)),u.duration&&(u.duration=hn(u.duration)),u.repeatDelay&&(u.repeatDelay=hn(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(kf(u),u.delay===0&&(d=!0)),(gr.instantAnimations||gr.skipAnimations||o?.shouldSkipAnimations)&&(d=!0,kf(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!i&&t.get()!==void 0){const f=oM(u.keyframes,a);if(f!==void 0){mt.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new em(u):new UD(u)};function Ly(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function sm(e,t,n,r){if(typeof t=="function"){const[o,i]=Ly(r);t=t(n!==void 0?n:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,i]=Ly(r);t=t(n!==void 0?n:e.custom,o,i)}return t}function si(e,t,n){const r=e.getProps();return sm(r,t,n!==void 0?n:r.custom,e)}const eS=new Set(["width","height","top","left","right","bottom",...Li]),Vy=30,sM=e=>!isNaN(parseFloat(e)),cs={current:void 0};class aM{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const o=Jt.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Jt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=sM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&wc(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Wp);const r=this.events[t].add(n);return t==="change"?()=>{r(),mt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return cs.current&&cs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Jt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Vy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Vy);return h1(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Hr(e,t){return new aM(e,t)}const Rf=e=>Array.isArray(e);function lM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Hr(n))}function cM(e){return Rf(e)?e[e.length-1]||0:e}function uM(e,t){const n=si(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const s in i){const a=cM(i[s]);lM(e,s,a)}}const $t=e=>!!(e&&e.getVelocity);function dM(e){return!!($t(e)&&e.add)}function If(e,t){const n=e.getValue("willChange");if(dM(n))return n.add(t);if(!n&&gr.WillChange){const r=new gr.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function am(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const fM="framerAppearId",tS="data-"+am(fM);function nS(e){return e.props[tS]}function pM({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function lm(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i,transitionEnd:s,...a}=t;const l=e.getDefaultTransition();i=i?rm(i,l):l;const c=i?.reduceMotion;r&&(i=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const f in a){const m=e.getValue(f,e.latestValues[f]??null),g=a[f];if(g===void 0||d&&pM(d,f))continue;const y={delay:n,...om(i||{},f)},h=m.get();if(h!==void 0&&!m.isAnimating&&!Array.isArray(g)&&g===h&&!y.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const T=nS(e);if(T){const E=window.MotionHandoffAnimation(T,f,mt);E!==null&&(y.startTime=E,v=!0)}}If(e,f);const x=c??e.shouldReduceMotion;m.start(im(f,m,g,x&&eS.has(f)?{type:!1}:y,e,v));const b=m.animation;b&&u.push(b)}if(s){const f=()=>mt.update(()=>{s&&uM(e,s)});u.length?Promise.all(u).then(f):f()}return u}function Af(e,t,n={}){const r=si(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(lm(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return mM(e,t,l,c,u,d,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[l,c]=a==="beforeChildren"?[i,s]:[s,i];return l().then(()=>c())}else return Promise.all([i(),s(n.delay)])}function mM(e,t,n=0,r=0,o=0,i=1,s){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(Af(l,t,{...s,delay:n+(typeof r=="function"?0:r)+Q1(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function hM(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(i=>Af(e,i,n));r=Promise.all(o)}else if(typeof t=="string")r=Af(e,t,n);else{const o=typeof t=="function"?si(e,t,n.custom):t;r=Promise.all(lm(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const gM={test:e=>e==="auto",parse:e=>e},rS=e=>t=>t.test(e),oS=[Fi,Te,Qn,Rr,Uj,qj,gM],$y=e=>oS.find(rS(e));function yM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||p1(e):!0}const vM=new Set(["brightness","contrast","saturate","opacity"]);function xM(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Yp)||[];if(!r)return e;const o=n.replace(r,"");let i=vM.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const bM=/\b([a-z-]*)\(.*?\)/gu,Pf={..._n,getAnimatableNone:e=>{const t=e.match(bM);return t?t.map(xM).join(" "):e}},Of={..._n,getAnimatableNone:e=>{const t=_n.parse(e);return _n.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},zy={...Fi,transform:Math.round},wM={rotate:Rr,rotateX:Rr,rotateY:Rr,rotateZ:Rr,scale:Ra,scaleX:Ra,scaleY:Ra,scaleZ:Ra,skew:Rr,skewX:Rr,skewY:Rr,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:ks,originX:ky,originY:ky,originZ:Te},cm={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,top:Te,right:Te,bottom:Te,left:Te,inset:Te,insetBlock:Te,insetBlockStart:Te,insetBlockEnd:Te,insetInline:Te,insetInlineStart:Te,insetInlineEnd:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,paddingBlock:Te,paddingBlockStart:Te,paddingBlockEnd:Te,paddingInline:Te,paddingInlineStart:Te,paddingInlineEnd:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,marginBlock:Te,marginBlockStart:Te,marginBlockEnd:Te,marginInline:Te,marginInlineStart:Te,marginInlineEnd:Te,fontSize:Te,backgroundPositionX:Te,backgroundPositionY:Te,...wM,zIndex:zy,fillOpacity:ks,strokeOpacity:ks,numOctaves:zy},SM={...cm,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:Pf,WebkitFilter:Pf,mask:Of,WebkitMask:Of},iS=e=>SM[e],TM=new Set([Pf,Of]);function sS(e,t){let n=iS(e);return TM.has(n)||(n=_n),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const EM=new Set(["auto","none","0"]);function CM(e,t,n){let r=0,o;for(;r<e.length&&!o;){const i=e[r];typeof i=="string"&&!EM.has(i)&&Rs(i).values.length&&(o=e[r]),r++}if(o&&n)for(const i of t)e[i]=sS(n,o)}class kM extends tm{constructor(t,n,r,o,i){super(t,n,r,o,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Gp(d))){const f=J1(d,n.current);f!==void 0&&(t[u]=f),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!eS.has(r)||t.length!==2)return;const[o,i]=t,s=$y(o),a=$y(i),l=Cy(o),c=Cy(i);if(l!==c&&Mr[r]){this.needsMeasurement=!0;return}if(s!==a)if(My(s)&&My(a))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else Mr[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||yM(t[o]))&&r.push(o);r.length&&CM(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Mr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=Mr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{t.getValue(a).set(l)}),this.resolveNoneKeyframes()}}const RM=new Set(["opacity","clipPath","filter","transform"]);function um(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(r=>r!=null)}const aS=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function jf(e){return f1(e)&&"offsetHeight"in e}const{schedule:dm}=I1(queueMicrotask,!1),On={x:!1,y:!1};function lS(){return On.x||On.y}function IM(e){return e==="x"||e==="y"?On[e]?null:(On[e]=!0,()=>{On[e]=!1}):On.x||On.y?null:(On.x=On.y=!0,()=>{On.x=On.y=!1})}function cS(e,t){const n=um(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function AM(e){return!(e.pointerType==="touch"||lS())}function PM(e,t,n={}){const[r,o,i]=cS(e,n);return r.forEach(s=>{let a=!1,l=!1,c;const u=()=>{s.removeEventListener("pointerleave",g)},d=h=>{c&&(c(h),c=void 0),u()},f=h=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,d(h))},m=()=>{a=!0,window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",f,o)},g=h=>{if(h.pointerType!=="touch"){if(a){l=!0;return}d(h)}},y=h=>{if(!AM(h))return;l=!1;const v=t(s,h);typeof v=="function"&&(c=v,s.addEventListener("pointerleave",g,o))};s.addEventListener("pointerenter",y,o),s.addEventListener("pointerdown",m,o)}),i}const uS=(e,t)=>t?e===t?!0:uS(e,t.parentElement):!1,fm=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,OM=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function jM(e){return OM.has(e.tagName)||e.isContentEditable===!0}const DM=new Set(["INPUT","SELECT","TEXTAREA"]);function MM(e){return DM.has(e.tagName)||e.isContentEditable===!0}const Za=new WeakSet;function By(e){return t=>{t.key==="Enter"&&e(t)}}function rd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const NM=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=By(()=>{if(Za.has(n))return;rd(n,"down");const o=By(()=>{rd(n,"up")}),i=()=>rd(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Hy(e){return fm(e)&&!lS()}const Wy=new WeakSet;function _M(e,t,n={}){const[r,o,i]=cS(e,n),s=a=>{const l=a.currentTarget;if(!Hy(a)||Wy.has(a))return;Za.add(l),n.stopPropagation&&Wy.add(a);const c=t(l,a),u=(m,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Za.has(l)&&Za.delete(l),Hy(m)&&typeof c=="function"&&c(m,{success:g})},d=m=>{u(m,l===window||l===document||n.useGlobalTarget||uS(l,m.target))},f=m=>{u(m,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,o),jf(a)&&(a.addEventListener("focus",c=>NM(c,o)),!jM(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),i}function Sc(e){return f1(e)&&"ownerSVGElement"in e}const Xa=new WeakMap;let Qa;const dS=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:Sc(r)&&"getBBox"in r?r.getBBox()[t]:r[n],FM=dS("inline","width","offsetWidth"),LM=dS("block","height","offsetHeight");function VM({target:e,borderBoxSize:t}){Xa.get(e)?.forEach(n=>{n(e,{get width(){return FM(e,t)},get height(){return LM(e,t)}})})}function $M(e){e.forEach(VM)}function zM(){typeof ResizeObserver>"u"||(Qa=new ResizeObserver($M))}function BM(e,t){Qa||zM();const n=um(e);return n.forEach(r=>{let o=Xa.get(r);o||(o=new Set,Xa.set(r,o)),o.add(t),Qa?.observe(r)}),()=>{n.forEach(r=>{const o=Xa.get(r);o?.delete(t),o?.size||Qa?.unobserve(r)})}}const Ja=new Set;let Ko;function HM(){Ko=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ja.forEach(t=>t(e))},window.addEventListener("resize",Ko)}function WM(e){return Ja.add(e),Ko||HM(),()=>{Ja.delete(e),!Ja.size&&typeof Ko=="function"&&(window.removeEventListener("resize",Ko),Ko=void 0)}}function qy(e,t){return typeof e=="function"?WM(e):BM(e,t)}function fS(e){return Sc(e)&&e.tagName==="svg"}function qM(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function UM(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,i)=>{const s=typeof n=="number"?n:qM(n,i),a=Math.abs(s-o);let l=e*a;if(r){const c=i*e;l=mf(r)(l/c)*c}return t+l}}function GM(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],i=e[2+n],s=e[3+n],a=z1(o,i,s);return t?a(r):a}const YM=[...oS,Nt,_n],KM=e=>YM.find(rS(e)),Uy=()=>({translate:0,scale:1,origin:0,originPoint:0}),Zo=()=>({x:Uy(),y:Uy()}),Gy=()=>({min:0,max:0}),Mt=()=>({x:Gy(),y:Gy()}),As=new WeakMap;function Tc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ps(e){return typeof e=="string"||Array.isArray(e)}const pm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mm=["initial",...pm];function Ec(e){return Tc(e.animate)||mm.some(t=>Ps(e[t]))}function pS(e){return!!(Ec(e)||e.variants)}function ZM(e,t,n){for(const r in t){const o=t[r],i=n[r];if($t(o))e.addValue(r,o);else if($t(i))e.addValue(r,Hr(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{const s=e.getStaticValue(r);e.addValue(r,Hr(s!==void 0?s:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Cl={current:null},hm={current:!1},XM=typeof window<"u";function mS(){if(hm.current=!0,!!XM)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Cl.current=e.matches;e.addEventListener("change",t),t()}else Cl.current=!1}const Yy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let kl={};function hS(e){kl=e}function QM(){return kl}class gS{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,skipAnimations:i,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=tm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Jt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,mt.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.skipAnimationsConfig=i,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=Ec(n),this.isVariantNode=pS(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];c[m]!==void 0&&$t(g)&&g.set(c[m])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,As.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(hm.current||mS(),this.shouldReduceMotion=Cl.current),process.env.NODE_ENV!=="production"&&wc(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),yr(this.notifyUpdate),yr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&RM.has(t)&&this.current instanceof HTMLElement){const{factory:s,keyframes:a,times:l,ease:c,duration:u}=n.accelerate,d=new Z1({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:hn(u)}),f=s(d);this.valueSubscriptions.set(t,()=>{f(),d.cancel()});return}const r=Vi.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&mt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;typeof window<"u"&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in kl){const n=kl[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Mt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Yy.length;r++){const o=Yy[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=ZM(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Hr(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(d1(r)||p1(r))?r=parseFloat(r):!KM(r)&&_n.test(n)&&(r=sS(t,n)),this.setBaseTarget(t,$t(r)?r.get():r)),$t(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=sm(this.props,n,this.presenceContext?.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!$t(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Wp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){dm.render(this.render)}}class yS extends gS{constructor(){super(...arguments),this.KeyframeResolver=kM}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;$t(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Xr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function vS({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function JM({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function eN(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function od(e){return e===void 0||e===1}function Df({scale:e,scaleX:t,scaleY:n}){return!od(e)||!od(t)||!od(n)}function ao(e){return Df(e)||xS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function xS(e){return Ky(e.x)||Ky(e.y)}function Ky(e){return e&&e!=="0%"}function Rl(e,t,n){const r=e-n,o=t*r;return n+o}function Zy(e,t,n,r,o){return o!==void 0&&(e=Rl(e,o,r)),Rl(e,n,r)+t}function Mf(e,t=0,n=1,r,o){e.min=Zy(e.min,t,n,r,o),e.max=Zy(e.max,t,n,r,o)}function bS(e,{x:t,y:n}){Mf(e.x,t.translate,t.scale,t.originPoint),Mf(e.y,n.translate,n.scale,n.originPoint)}const Xy=.999999999999,Qy=1.0000000000001;function tN(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Qo(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,bS(e,s)),r&&ao(i.latestValues)&&Qo(e,i.latestValues))}t.x<Qy&&t.x>Xy&&(t.x=1),t.y<Qy&&t.y>Xy&&(t.y=1)}function Xo(e,t){e.min=e.min+t,e.max=e.max+t}function Jy(e,t,n,r,o=.5){const i=xt(e.min,e.max,o);Mf(e,t,n,i,r)}function Qo(e,t){Jy(e.x,t.x,t.scaleX,t.scale,t.originX),Jy(e.y,t.y,t.scaleY,t.scale,t.originY)}function wS(e,t){return vS(eN(e.getBoundingClientRect(),t))}function nN(e,t,n){const r=wS(e,n),{scroll:o}=t;return o&&(Xo(r.x,o.offset.x),Xo(r.y,o.offset.y)),r}const rN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},oN=Li.length;function iN(e,t,n){let r="",o=!0;for(let i=0;i<oN;i++){const s=Li[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(s.startsWith("scale")?1:0);else{const c=parseFloat(a);l=s.startsWith("scale")?c===1:c===0}if(!l||n){const c=aS(a,cm[s]);if(!l){o=!1;const u=rN[s]||s;r+=`${u}(${c}) `}n&&(t[s]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function gm(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const l in t){const c=t[l];if(Vi.has(l)){s=!0;continue}else if(P1(l)){o[l]=c;continue}else{const u=aS(c,cm[l]);l.startsWith("origin")?(a=!0,i[l]=u):r[l]=u}}if(t.transform||(s||n?r.transform=iN(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=i;r.transformOrigin=`${l} ${c} ${u}`}}function SS(e,{style:t,vars:n},r,o){const i=e.style;let s;for(s in t)i[s]=t[s];o?.applyProjectionStyles(i,r);for(s in n)i.setProperty(s,n[s])}function ev(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ui={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Te.test(e))e=parseFloat(e);else return e;const n=ev(e,t.target.x),r=ev(e,t.target.y);return`${n}% ${r}%`}},sN={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=_n.parse(e);if(o.length>5)return r;const i=_n.createTransformer(e),s=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=xt(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}},Nf={borderRadius:{...Ui,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ui,borderTopRightRadius:Ui,borderBottomLeftRadius:Ui,borderBottomRightRadius:Ui,boxShadow:sN};function TS(e,{layout:t,layoutId:n}){return Vi.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Nf[e]||e==="opacity")}function ym(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const s in r)($t(r[s])||o&&$t(o[s])||TS(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(i[s]=r[s]);return i}function aN(e){return window.getComputedStyle(e)}class ES extends yS{constructor(){super(...arguments),this.type="html",this.renderInstance=SS}readValueFromInstance(t,n){if(Vi.has(n))return this.projection?.isProjecting?wf(n):CD(t,n);{const r=aN(t),o=(P1(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return wS(t,n)}build(t,n,r){gm(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return ym(t,n,r)}}function lN(e,t){return e in t}class cN extends gS{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(lN(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Mt()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}const uN={offset:"stroke-dashoffset",array:"stroke-dasharray"},dN={offset:"strokeDashoffset",array:"strokeDasharray"};function fN(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?uN:dN;e[i.offset]=`${-r}`,e[i.array]=`${t} ${n}`}const pN=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function CS(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:s=0,...a},l,c,u){if(gm(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const m of pN)d[m]!==void 0&&(f[m]=d[m],delete d[m]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&fN(d,o,i,s,!1)}const kS=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),RS=e=>typeof e=="string"&&e.toLowerCase()==="svg";function mN(e,t,n,r){SS(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(kS.has(o)?o:am(o),t.attrs[o])}function IS(e,t,n){const r=ym(e,t,n);for(const o in e)if($t(e[o])||$t(t[o])){const i=Li.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[i]=e[o]}return r}class AS extends yS{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Mt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Vi.has(n)){const r=iS(n);return r&&r.default||0}return n=kS.has(n)?n:am(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return IS(t,n,r)}build(t,n,r){CS(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){mN(t,n,r,o)}mount(t){this.isSVGTag=RS(t.tagName),super.mount(t)}}const hN=mm.length;function PS(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?PS(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<hN;n++){const r=mm[n],o=e.props[r];(Ps(o)||o===!1)&&(t[r]=o)}return t}function OS(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const gN=[...pm].reverse(),yN=pm.length;function vN(e){return t=>Promise.all(t.map(({animation:n,options:r})=>hM(e,n,r)))}function xN(e){let t=vN(e),n=tv(),r=!0;const o=l=>(c,u)=>{const d=si(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:f,transitionEnd:m,...g}=d;c={...c,...g,...m}}return c};function i(l){t=l(e)}function s(l){const{props:c}=e,u=PS(e.parent)||{},d=[],f=new Set;let m={},g=1/0;for(let h=0;h<yN;h++){const v=gN[h],x=n[v],b=c[v]!==void 0?c[v]:u[v],T=Ps(b),E=v===l?x.isActive:null;E===!1&&(g=h);let R=b===u[v]&&b!==c[v]&&T;if(R&&r&&e.manuallyAnimateOnMount&&(R=!1),x.protectedKeys={...m},!x.isActive&&E===null||!b&&!x.prevProp||Tc(b)||typeof b=="boolean")continue;if(v==="exit"&&x.isActive&&E!==!0){x.prevResolvedValues&&(m={...m,...x.prevResolvedValues});continue}const w=bN(x.prevProp,b);let C=w||v===l&&x.isActive&&!R&&T||h>g&&T,I=!1;const P=Array.isArray(b)?b:[b];let M=P.reduce(o(v),{});E===!1&&(M={});const{prevResolvedValues:j={}}=x,L={...j,...M},O=D=>{C=!0,f.has(D)&&(I=!0,f.delete(D)),x.needsAnimating[D]=!0;const k=e.getValue(D);k&&(k.liveStyle=!1)};for(const D in L){const k=M[D],F=j[D];if(m.hasOwnProperty(D))continue;let _=!1;Rf(k)&&Rf(F)?_=!OS(k,F):_=k!==F,_?k!=null?O(D):f.add(D):k!==void 0&&f.has(D)?O(D):x.protectedKeys[D]=!0}x.prevProp=b,x.prevResolvedValues=M,x.isActive&&(m={...m,...M}),r&&e.blockInitialAnimation&&(C=!1);const N=R&&w;C&&(!N||I)&&d.push(...P.map(D=>{const k={type:v};if(typeof D=="string"&&r&&!N&&e.manuallyAnimateOnMount&&e.parent){const{parent:F}=e,_=si(F,D);if(F.enteringChildren&&_){const{delayChildren:B}=_.transition||{};k.delay=Q1(F.enteringChildren,e,B)}}return{animation:D,options:k}}))}if(f.size){const h={};if(typeof c.initial!="boolean"){const v=si(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(h.transition=v.transition)}f.forEach(v=>{const x=e.getBaseTarget(v),b=e.getValue(v);b&&(b.liveStyle=!0),h[v]=x??null}),d.push({animation:h})}let y=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(d):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),n[l].isActive=c;const u=s(l);for(const d in n)n[d].protectedKeys={};return u}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>n,reset:()=>{n=tv()}}}function bN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!OS(t,e):!1}function ro(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function tv(){return{animate:ro(!0),whileInView:ro(),whileHover:ro(),whileTap:ro(),whileDrag:ro(),whileFocus:ro(),exit:ro()}}function nv(e,t){e.min=t.min,e.max=t.max}function An(e,t){nv(e.x,t.x),nv(e.y,t.y)}function rv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const jS=1e-4,wN=1-jS,SN=1+jS,DS=.01,TN=0-DS,EN=0+DS;function en(e){return e.max-e.min}function CN(e,t,n){return Math.abs(e-t)<=n}function ov(e,t,n,r=.5){e.origin=r,e.originPoint=xt(t.min,t.max,e.origin),e.scale=en(n)/en(t),e.translate=xt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=wN&&e.scale<=SN||isNaN(e.scale))&&(e.scale=1),(e.translate>=TN&&e.translate<=EN||isNaN(e.translate))&&(e.translate=0)}function us(e,t,n,r){ov(e.x,t.x,n.x,r?r.originX:void 0),ov(e.y,t.y,n.y,r?r.originY:void 0)}function iv(e,t,n){e.min=n.min+t.min,e.max=e.min+en(t)}function kN(e,t,n){iv(e.x,t.x,n.x),iv(e.y,t.y,n.y)}function sv(e,t,n){e.min=t.min-n.min,e.max=e.min+en(t)}function Il(e,t,n){sv(e.x,t.x,n.x),sv(e.y,t.y,n.y)}function av(e,t,n,r,o){return e-=t,e=Rl(e,1/n,r),o!==void 0&&(e=Rl(e,1/o,r)),e}function RN(e,t=0,n=1,r=.5,o,i=e,s=e){if(Qn.test(t)&&(t=parseFloat(t),t=xt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=xt(i.min,i.max,r);e===i&&(a-=t),e.min=av(e.min,t,n,a,o),e.max=av(e.max,t,n,a,o)}function lv(e,t,[n,r,o],i,s){RN(e,t[n],t[r],t[o],t.scale,i,s)}const IN=["x","scaleX","originX"],AN=["y","scaleY","originY"];function cv(e,t,n,r){lv(e.x,t,IN,n?n.x:void 0,r?r.x:void 0),lv(e.y,t,AN,n?n.y:void 0,r?r.y:void 0)}function uv(e){return e.translate===0&&e.scale===1}function MS(e){return uv(e.x)&&uv(e.y)}function dv(e,t){return e.min===t.min&&e.max===t.max}function PN(e,t){return dv(e.x,t.x)&&dv(e.y,t.y)}function fv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function NS(e,t){return fv(e.x,t.x)&&fv(e.y,t.y)}function pv(e){return en(e.x)/en(e.y)}function mv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Wn(e){return[e("x"),e("y")]}function ON(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=n?.z||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:m,skewY:g}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),g&&(r+=`skewY(${g}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const _S=["TopLeft","TopRight","BottomLeft","BottomRight"],jN=_S.length,hv=e=>typeof e=="string"?parseFloat(e):e,gv=e=>typeof e=="number"||Te.test(e);function DN(e,t,n,r,o,i){o?(e.opacity=xt(0,n.opacity??1,MN(r)),e.opacityExit=xt(t.opacity??1,0,NN(r))):i&&(e.opacity=xt(t.opacity??1,n.opacity??1,r));for(let s=0;s<jN;s++){const a=`border${_S[s]}Radius`;let l=yv(t,a),c=yv(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||gv(l)===gv(c)?(e[a]=Math.max(xt(hv(l),hv(c),r),0),(Qn.test(c)||Qn.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=xt(t.rotate||0,n.rotate||0,r))}function yv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const MN=FS(0,.5,S1),NN=FS(.5,.95,kn);function FS(e,t,n){return r=>r<e?0:r>t?1:n(gi(e,t,r))}function LS(e,t,n){const r=$t(e)?e:Hr(e);return r.start(im("",r,t,n)),r.animation}function Os(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const _N=(e,t)=>e.depth-t.depth;class FN{constructor(){this.children=[],this.isDirty=!1}add(t){Hp(this.children,t),this.isDirty=!0}remove(t){hi(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(_N),this.isDirty=!1,this.children.forEach(t)}}function LN(e,t){const n=Jt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(yr(r),e(i-t))};return mt.setup(r,!0),()=>yr(r)}function el(e){return $t(e)?e.get():e}class VN{constructor(){this.members=[]}add(t){Hp(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const o=r.instance;o&&o.isConnected===!1&&r.isPresent!==!1&&!r.snapshot&&hi(this.members,r)}t.scheduleRender()}remove(t){if(hi(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const i=this.members[o],s=i.instance;if(i.isPresent!==!1&&(!s||s.isConnected!==!1)){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const o=r.options.layoutDependency,i=t.options.layoutDependency;if(!(o!==void 0&&i!==void 0&&o===i)){const l=r.instance;l&&l.isConnected===!1&&!r.snapshot||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0))}const{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const tl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},id=["","X","Y","Z"],$N=1e3;let zN=0;function sd(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function VS(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=nS(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",mt,!(o||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&VS(r)}function $S({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=zN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(WN),this.nodes.forEach(YN),this.nodes.forEach(KN),this.nodes.forEach(qN)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new FN)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Wp),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Sc(s)&&!fS(s),this.instance=s;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u,d=0;const f=()=>this.root.updateBlockedByResize=!1;mt.read(()=>{d=window.innerWidth}),e(s,()=>{const m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,u&&u(),u=LN(f,250),tl.hasAnimatedSinceResize&&(tl.hasAnimatedSinceResize=!1,this.nodes.forEach(bv)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||e_,{onLayoutAnimationStart:y,onLayoutAnimationComplete:h}=c.getProps(),v=!this.targetLayout||!NS(this.targetLayout,m),x=!d&&f;if(this.options.layoutRoot||this.resumeFrom||x||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const b={...om(g,"layout"),onPlay:y,onComplete:h};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b),this.setAnimationOrigin(u,x)}else d||bv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),yr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ZN),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&VS(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(vv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(xv);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(GN),this.nodes.forEach(BN),this.nodes.forEach(HN)):this.nodes.forEach(xv),this.clearAllSnapshots();const a=Jt.now();Wt.delta=nr(0,1e3/60,a-Wt.timestamp),Wt.timestamp=a,Wt.isProcessing=!0,Xu.update.process(Wt),Xu.preRender.process(Wt),Xu.render.process(Wt),Wt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,dm.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(UN),this.sharedNodes.forEach(XN)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,mt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){mt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!en(this.snapshot.measuredBox.x)&&!en(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Mt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!MS(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&this.instance&&(a||ao(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),t_(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Mt();const a=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(n_))){const{scroll:c}=this.root;c&&(Xo(a.x,c.offset.x),Xo(a.y,c.offset.y))}return a}removeElementScroll(s){const a=Mt();if(An(a,s),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&An(a,s),Xo(a.x,u.offset.x),Xo(a.y,u.offset.y))}return a}applyTransform(s,a=!1){const l=Mt();An(l,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Qo(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),ao(u.latestValues)&&Qo(l,u.latestValues)}return ao(this.latestValues)&&Qo(l,this.latestValues),l}removeTransform(s){const a=Mt();An(a,s);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!ao(c.latestValues))continue;Df(c.latestValues)&&c.updateSnapshot();const u=Mt(),d=c.measurePageBox();An(u,d),cv(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return ao(this.latestValues)&&cv(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Wt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!this.layout||!(u||d))return;this.resolvedRelativeTargetAt=Wt.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Mt(),this.targetWithTransforms=Mt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):An(this.target,this.layout.layoutBox),bS(this.target,this.targetDelta)):An(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Df(this.parent.latestValues)||xS(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,a,l){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Mt(),this.relativeTargetOrigin=Mt(),Il(this.relativeTargetOrigin,a,l),An(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Wt.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;An(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;tN(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Mt());const{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(rv(this.prevProjectionDelta.x,this.projectionDelta.x),rv(this.prevProjectionDelta.y,this.projectionDelta.y)),us(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!mv(this.projectionDelta.x,this.prevProjectionDelta.x)||!mv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Zo(),this.projectionDelta=Zo(),this.projectionDeltaWithTransform=Zo()}setAnimationOrigin(s,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=Zo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Mt(),m=l?l.source:void 0,g=this.layout?this.layout.source:void 0,y=m!==g,h=this.getStack(),v=!h||h.members.length<=1,x=!!(y&&!v&&this.options.crossfade===!0&&!this.path.some(JN));this.animationProgress=0;let b;this.mixTargetDelta=T=>{const E=T/1e3;wv(d.x,s.x,E),wv(d.y,s.y,E),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Il(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),QN(this.relativeTarget,this.relativeTargetOrigin,f,E),b&&PN(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Mt()),An(b,this.relativeTarget)),y&&(this.animationValues=u,DN(u,c,this.latestValues,E,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(yr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=mt.update(()=>{tl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Hr(0)),this.motionValue.jump(0,!1),this.currentAnimation=LS(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta($N),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&zS(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Mt();const d=en(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=en(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}An(a,l),Qo(a,u),us(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new VN),this.sharedNodes.get(s).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){const{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&sd("z",s,c,this.animationValues);for(let u=0;u<id.length;u++)sd(`rotate${id[u]}`,s,c,this.animationValues),sd(`skew${id[u]}`,s,c,this.animationValues);s.render();for(const u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=el(a?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=el(a?.pointerEvents)||""),this.hasProjected&&!ao(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=ON(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),s.transform=d;const{x:f,y:m}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,c.animationValues?s.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:s.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const g in Nf){if(u[g]===void 0)continue;const{correct:y,applyTo:h,isCSSVariable:v}=Nf[g],x=d==="none"?u[g]:y(u[g],c);if(h){const b=h.length;for(let T=0;T<b;T++)s[h[T]]=x}else v?this.options.visualElement.renderState.vars[g]=x:s[g]=x}this.options.layoutId&&(s.pointerEvents=c===this?el(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(vv),this.root.sharedNodes.clear()}}}function BN(e){e.updateLayout()}function HN(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;o==="size"?Wn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(d);d.min=n[u].min,d.max=d.min+f}):zS(o,t.layoutBox,n)&&Wn(u=>{const d=i?t.measuredBox[u]:t.layoutBox[u],f=en(n[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});const s=Zo();us(s,n,t.layoutBox);const a=Zo();i?us(a,e.applyTransform(r,!0),t.measuredBox):us(a,n,t.layoutBox);const l=!MS(s);let c=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:d,layout:f}=u;if(d&&f){const m=Mt();Il(m,t.layoutBox,d.layoutBox);const g=Mt();Il(g,n,f.layoutBox),NS(m,g)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function WN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function qN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function UN(e){e.clearSnapshot()}function vv(e){e.clearMeasurements()}function xv(e){e.isLayoutDirty=!1}function GN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function bv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function YN(e){e.resolveTargetDelta()}function KN(e){e.calcProjection()}function ZN(e){e.resetSkewAndRotation()}function XN(e){e.removeLeadSnapshot()}function wv(e,t,n){e.translate=xt(t.translate,0,n),e.scale=xt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Sv(e,t,n,r){e.min=xt(t.min,n.min,r),e.max=xt(t.max,n.max,r)}function QN(e,t,n,r){Sv(e.x,t.x,n.x,r),Sv(e.y,t.y,n.y,r)}function JN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const e_={duration:.45,ease:[.4,0,.1,1]},Tv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ev=Tv("applewebkit/")&&!Tv("chrome/")?Math.round:kn;function Cv(e){e.min=Ev(e.min),e.max=Ev(e.max)}function t_(e){Cv(e.x),Cv(e.y)}function zS(e,t,n){return e==="position"||e==="preserve-aspect"&&!CN(pv(t),pv(n),.2)}function n_(e){return e!==e.root&&e.scroll?.wasRoot}const r_=$S({attachResizeListener:(e,t)=>Os(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),o_=e=>!e.isLayoutDirty&&e.willUpdate(!1);function kv(){const e=new Set,t=new WeakMap,n=()=>e.forEach(o_);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const ad={current:void 0},BS=$S({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ad.current){const e=new r_({});e.mount(window),e.setOptions({layoutScroll:!0}),ad.current=e}return ad.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),So=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Rv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function i_(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Rv(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Rv(e[o],null)}}}}function s_(...e){return A.useCallback(i_(...e),e)}class a_ extends A.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,o=jf(r)&&r.offsetWidth||0,i=jf(r)&&r.offsetHeight||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=o-s.width-s.left,s.bottom=i-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function l_({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:i}){const s=S.useId(),a=S.useRef(null),l=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=S.useContext(So),u=e.props?.ref??e?.ref,d=s_(a,u);return S.useInsertionEffect(()=>{const{width:f,height:m,top:g,left:y,right:h,bottom:v}=l.current;if(t||i===!1||!a.current||!f||!m)return;const x=n==="left"?`left: ${y}`:`right: ${h}`,b=r==="bottom"?`bottom: ${v}`:`top: ${g}`;a.current.dataset.motionPopId=s;const T=document.createElement("style");c&&(T.nonce=c);const E=o??document.head;return E.appendChild(T),T.sheet&&T.sheet.insertRule(`
8
+ [data-motion-pop-id="${s}"] {
9
+ position: absolute !important;
10
+ width: ${f}px !important;
11
+ height: ${m}px !important;
12
+ ${x}px !important;
13
+ ${b}px !important;
14
+ }
15
+ `),()=>{E.contains(T)&&E.removeChild(T)}},[t]),p.jsx(a_,{isPresent:t,childRef:a,sizeRef:l,pop:i,children:i===!1?e:A.cloneElement(e,{ref:d})})}const c_=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:s,anchorX:a,anchorY:l,root:c})=>{const u=ar(u_),d=S.useId();let f=!0,m=S.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:g=>{u.set(g,!0);for(const y of u.values())if(!y)return;r&&r()},register:g=>(u.set(g,!1),()=>u.delete(g))}),[n,u,r]);return i&&f&&(m={...m}),S.useMemo(()=>{u.forEach((g,y)=>u.set(y,!1))},[n]),A.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=p.jsx(l_,{pop:s==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),p.jsx(bc.Provider,{value:m,children:e})};function u_(){return new Map}function HS(e=!0){const t=S.useContext(bc);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,i=S.useId();S.useEffect(()=>{if(e)return o(i)},[e]);const s=S.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,s]:[!0]}const Ia=e=>e.key||"";function Iv(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const xn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:i="sync",propagate:s=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[u,d]=HS(s),f=S.useMemo(()=>Iv(e),[e]),m=s&&!u?[]:f.map(Ia),g=S.useRef(!0),y=S.useRef(f),h=ar(()=>new Map),v=S.useRef(new Set),[x,b]=S.useState(f),[T,E]=S.useState(f);xc(()=>{g.current=!1,y.current=f;for(let C=0;C<T.length;C++){const I=Ia(T[C]);m.includes(I)?(h.delete(I),v.current.delete(I)):h.get(I)!==!0&&h.set(I,!1)}},[T,m.length,m.join("-")]);const R=[];if(f!==x){let C=[...f];for(let I=0;I<T.length;I++){const P=T[I],M=Ia(P);m.includes(M)||(C.splice(I,0,P),R.push(P))}return i==="wait"&&R.length&&(C=R),E(Iv(C)),b(f),null}process.env.NODE_ENV!=="production"&&i==="wait"&&T.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=S.useContext(Cs);return p.jsx(p.Fragment,{children:T.map(C=>{const I=Ia(C),P=s&&!u?!1:f===T||m.includes(I),M=()=>{if(v.current.has(I))return;if(v.current.add(I),h.has(I))h.set(I,!0);else return;let j=!0;h.forEach(L=>{L||(j=!1)}),j&&(w?.(),E(y.current),s&&d?.(),r&&r())};return p.jsx(c_,{isPresent:P,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:o,mode:i,root:c,onExitComplete:P?void 0:M,anchorX:a,anchorY:l,children:C},I)})})},d_=S.createContext(null);function f_(){const e=S.useRef(!1);return xc(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function p_(){const e=f_(),[t,n]=S.useState(0),r=S.useCallback(()=>{e.current&&n(t+1)},[t]);return[S.useCallback(()=>mt.postRender(r),[r]),t]}const WS=e=>e===!0,m_=e=>WS(e===!0)||e==="id",h_=({children:e,id:t,inherit:n=!0})=>{const r=S.useContext(Cs),o=S.useContext(d_),[i,s]=p_(),a=S.useRef(null),l=r.id||o;a.current===null&&(m_(n)&&l&&(t=t?l+"-"+t:l),a.current={id:t,group:WS(n)&&r.group||kv()});const c=S.useMemo(()=>({...a.current,forceRender:i}),[s]);return p.jsx(Cs.Provider,{value:c,children:e})},qS=S.createContext({strict:!1}),Av={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Pv=!1;function g_(){if(Pv)return;const e={};for(const t in Av)e[t]={isEnabled:n=>Av[t].some(r=>!!n[r])};hS(e),Pv=!0}function US(){return g_(),QM()}function y_(e){const t=US();for(const n in e)t[n]={...t[n],...e[n]};hS(t)}const v_=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Al(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||v_.has(e)}let GS=e=>!Al(e);function YS(e){typeof e=="function"&&(GS=t=>t.startsWith("on")?!Al(t):e(t))}try{YS(require("@emotion/is-prop-valid").default)}catch{}function x_(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(GS(o)||n===!0&&Al(o)||!t&&!Al(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function vm({children:e,isValidProp:t,...n}){t&&YS(t);const r=S.useContext(So);n={...r,...n},n.transition=rm(n.transition,r.transition),n.isStatic=ar(()=>n.isStatic);const o=S.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return p.jsx(So.Provider,{value:o,children:e})}const Cc=S.createContext({});function b_(e,t){if(Ec(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ps(n)?n:void 0,animate:Ps(r)?r:void 0}}return e.inherit!==!1?t:{}}function w_(e){const{initial:t,animate:n}=b_(e,S.useContext(Cc));return S.useMemo(()=>({initial:t,animate:n}),[Ov(t),Ov(n)])}function Ov(e){return Array.isArray(e)?e.join(" "):e}const xm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function KS(e,t,n){for(const r in t)!$t(t[r])&&!TS(r,n)&&(e[r]=t[r])}function S_({transformTemplate:e},t){return S.useMemo(()=>{const n=xm();return gm(n,t,e),Object.assign({},n.vars,n.style)},[t])}function T_(e,t){const n=e.style||{},r={};return KS(r,n,e),Object.assign(r,S_(e,t)),r}function E_(e,t){const n={},r=T_(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const ZS=()=>({...xm(),attrs:{}});function C_(e,t,n,r){const o=S.useMemo(()=>{const i=ZS();return CS(i,t,RS(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};KS(i,e.style,e),o.style={...i,...o.style}}return o}const k_=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function bm(e){return typeof e!="string"||e.includes("-")?!1:!!(k_.indexOf(e)>-1||/[A-Z]/u.test(e))}function R_(e,t,n,{latestValues:r},o,i=!1,s){const l=(s??bm(e)?C_:E_)(t,r,o,e),c=x_(t,typeof e=="string",i),u=e!==S.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=S.useMemo(()=>$t(d)?d.get():d,[d]);return S.createElement(e,{...u,children:f})}function I_({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:A_(n,r,o,e),renderState:t()}}function A_(e,t,n,r){const o={},i=r(e,{});for(const f in i)o[f]=el(i[f]);let{initial:s,animate:a}=e;const l=Ec(e),c=pS(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||s===!1;const d=u?a:s;if(d&&typeof d!="boolean"&&!Tc(d)){const f=Array.isArray(d)?d:[d];for(let m=0;m<f.length;m++){const g=sm(e,f[m]);if(g){const{transitionEnd:y,transition:h,...v}=g;for(const x in v){let b=v[x];if(Array.isArray(b)){const T=u?b.length-1:0;b=b[T]}b!==null&&(o[x]=b)}for(const x in y)o[x]=y[x]}}}return o}const XS=e=>(t,n)=>{const r=S.useContext(Cc),o=S.useContext(bc),i=()=>I_(e,t,r,o);return n?i():ar(i)},P_=XS({scrapeMotionValuesFromProps:ym,createRenderState:xm}),O_=XS({scrapeMotionValuesFromProps:IS,createRenderState:ZS}),j_=Symbol.for("motionComponentSymbol");function D_(e,t,n){const r=S.useRef(n);S.useInsertionEffect(()=>{r.current=n});const o=S.useRef(null);return S.useCallback(i=>{i&&e.onMount?.(i),t&&(i?t.mount(i):t.unmount());const s=r.current;if(typeof s=="function")if(i){const a=s(i);typeof a=="function"&&(o.current=a)}else o.current?(o.current(),o.current=null):s(i);else s&&(s.current=i)},[t])}const QS=S.createContext({});function Wo(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function M_(e,t,n,r,o,i){const{visualElement:s}=S.useContext(Cc),a=S.useContext(qS),l=S.useContext(bc),c=S.useContext(So),u=c.reducedMotion,d=c.skipAnimations,f=S.useRef(null),m=S.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:i}),m.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const g=f.current,y=S.useContext(QS);g&&!g.projection&&o&&(g.type==="html"||g.type==="svg")&&N_(f.current,n,o,y);const h=S.useRef(!1);S.useInsertionEffect(()=>{g&&h.current&&g.update(n,l)});const v=n[tS],x=S.useRef(!!v&&!window.MotionHandoffIsComplete?.(v)&&window.MotionHasOptimisedAnimation?.(v));return xc(()=>{m.current=!0,g&&(h.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),x.current&&g.animationState&&g.animationState.animateChanges())}),S.useEffect(()=>{g&&(!x.current&&g.animationState&&g.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(v)}),x.current=!1),g.enteringChildren=void 0)}),g}function N_(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:JS(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&Wo(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function JS(e){if(e)return e.options.allowProjection!==!1?e.projection:JS(e.parent)}function ld(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&y_(r);const i=n?n==="svg":bm(e),s=i?O_:P_;function a(c,u){let d;const f={...S.useContext(So),...c,layoutId:__(c)},{isStatic:m}=f,g=w_(c),y=s(c,m);if(!m&&u1){F_(f,r);const h=L_(f);d=h.MeasureLayout,g.visualElement=M_(e,y,f,o,h.ProjectionNode,i)}return p.jsxs(Cc.Provider,{value:g,children:[d&&g.visualElement?p.jsx(d,{visualElement:g.visualElement,...f}):null,R_(e,c,D_(y,g.visualElement,u),y,m,t,i)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=S.forwardRef(a);return l[j_]=e,l}function __({layoutId:e}){const t=S.useContext(Cs).id;return t&&e!==void 0?t+"-"+e:e}function F_(e,t){const n=S.useContext(qS).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?_i(!1,r,"lazy-strict-mode"):vn(!1,r,"lazy-strict-mode")}}function L_(e){const t=US(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function V_(e,t){if(typeof Proxy>"u")return ld;const n=new Map,r=(i,s)=>ld(i,s,e,t),o=(i,s)=>(process.env.NODE_ENV!=="production"&&wc(!1,"motion() is deprecated. Use motion.create() instead."),r(i,s));return new Proxy(o,{get:(i,s)=>s==="create"?r:(n.has(s)||n.set(s,ld(s,void 0,e,t)),n.get(s))})}const $_=(e,t)=>t.isSVG??bm(e)?new AS(t):new ES(t,{allowProjection:e!==S.Fragment});class z_ extends Xr{constructor(t){super(t),t.animationState||(t.animationState=xN(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Tc(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let B_=0;class H_ extends Xr{constructor(){super(...arguments),this.id=B_++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const W_={animation:{Feature:z_},exit:{Feature:H_}};function ia(e){return{point:{x:e.pageX,y:e.pageY}}}const q_=e=>t=>fm(t)&&e(t,ia(t));function ds(e,t,n,r){return Os(e,t,q_(n),r)}const eT=({current:e})=>e?e.ownerDocument.defaultView:null,jv=(e,t)=>Math.abs(e-t);function U_(e,t){const n=jv(e.x,t.x),r=jv(e.y,t.y);return Math.sqrt(n**2+r**2)}const Dv=new Set(["auto","scroll"]);class tT{constructor(t,n,{transformPagePoint:r,contextWindow:o=window,dragSnapToOrigin:i=!1,distanceThreshold:s=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=m=>{this.handleScroll(m.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=ud(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=U_(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!y)return;const{point:h}=m,{timestamp:v}=Wt;this.history.push({...h,timestamp:v});const{onStart:x,onMove:b}=this.handlers;g||(x&&x(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=cd(g,this.transformPagePoint),mt.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:y,onSessionEnd:h,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=ud(m.type==="pointercancel"?this.lastMoveEventInfo:cd(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,x),h&&h(m,x)},!fm(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=o||window;const l=ia(t),c=cd(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=Wt;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,ud(c,this.history)),this.removeListeners=na(ds(this.contextWindow,"pointermove",this.handlePointerMove),ds(this.contextWindow,"pointerup",this.handlePointerUp),ds(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Dv.has(r.overflowX)||Dv.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,o=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},i={x:o.x-n.x,y:o.y-n.y};i.x===0&&i.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(t,o),mt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),yr(this.updatePoint)}}function cd(e,t){return t?{point:t(e.point)}:e}function Mv(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ud({point:e},t){return{point:e,delta:Mv(e,nT(t)),offset:Mv(e,G_(t)),velocity:Y_(t,.1)}}function G_(e){return e[0]}function nT(e){return e[e.length-1]}function Y_(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=nT(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>hn(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>hn(t)*2&&(r=e[1]);const i=Tn(o.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function K_(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?xt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?xt(n,e,r.max):Math.min(e,n)),e}function Nv(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Z_(e,{top:t,left:n,bottom:r,right:o}){return{x:Nv(e.x,n,o),y:Nv(e.y,t,r)}}function _v(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function X_(e,t){return{x:_v(e.x,t.x),y:_v(e.y,t.y)}}function Q_(e,t){let n=.5;const r=en(e),o=en(t);return o>r?n=gi(t.min,t.max-r,e.min):r>o&&(n=gi(e.min,e.max-o,t.min)),nr(0,1,n)}function J_(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const _f=.35;function e2(e=_f){return e===!1?e=0:e===!0&&(e=_f),{x:Fv(e,"left","right"),y:Fv(e,"top","bottom")}}function Fv(e,t,n){return{min:Lv(e,t),max:Lv(e,n)}}function Lv(e,t){return typeof e=="number"?e:e[t]||0}const t2=new WeakMap;class n2{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Mt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const i=d=>{n&&this.snapToCursor(ia(d).point),this.stopAnimation()},s=(d,f)=>{const{drag:m,dragPropagation:g,onDragStart:y}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=IM(m),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Wn(v=>{let x=this.getAxisMotionValue(v).get()||0;if(Qn.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const T=b.layout.layoutBox[v];T&&(x=en(T)*(parseFloat(x)/100))}}this.originPoint[v]=x}),y&&mt.update(()=>y(d,f),!1,!0),If(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:y,onDrag:h}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:v}=f;if(g&&this.currentDirection===null){this.currentDirection=o2(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),h&&mt.update(()=>h(d,f),!1,!0)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new tT(t,{onSessionStart:i,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:r,contextWindow:eT(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,o=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!o||!r)return;const{velocity:s}=o;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&mt.postRender(()=>a(r,o))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!Aa(t,o,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=K_(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&Wo(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Z_(r.layoutBox,t):this.constraints=!1,this.elastic=e2(n),o!==this.constraints&&!Wo(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Wn(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=J_(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Wo(t))return!1;const r=t.current;vn(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const i=nN(r,o.root,this.visualElement.getTransformPagePoint());let s=X_(o.layout.layoutBox,i);if(n){const a=n(JM(s));this.hasMutatedConstraints=!!a,a&&(s=vS(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Wn(u=>{if(!Aa(u,n,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});const f=o?200:1e6,m=o?40:1e7,g={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,g)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return If(this.visualElement,t),r.start(im(t,r,0,n,this.visualElement,!1))}stopAnimation(){Wn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Wn(n=>{const{drag:r}=this.getProps();if(!Aa(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,i=this.getAxisMotionValue(n);if(o&&o.layout){const{min:s,max:a}=o.layout.layoutBox[n],l=i.get()||0;i.set(t[n]-xt(s,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Wo(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Wn(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();o[s]=Q_({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Wn(s=>{if(!Aa(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(xt(l,c,o[s]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;t2.set(this.visualElement,this);const t=this.visualElement.current,n=ds(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps(),f=c.target,m=f!==t&&MM(f);u&&d&&!m&&this.start(c)});let r;const o=()=>{const{dragConstraints:c}=this.getProps();Wo(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=r2(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:i}=this.visualElement,s=i.addEventListener("measure",o);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),mt.read(o);const a=Os(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Wn(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{a(),n(),s(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=_f,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}}function Vv(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function r2(e,t,n){const r=qy(e,Vv(n)),o=qy(t,Vv(n));return()=>{r(),o()}}function Aa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function o2(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class i2 extends Xr{constructor(t){super(t),this.removeGroupControls=kn,this.removeListeners=kn,this.controls=new n2(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||kn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const dd=e=>(t,n)=>{e&&mt.update(()=>e(t,n),!1,!0)};class s2 extends Xr{constructor(){super(...arguments),this.removePointerDownListener=kn}onPointerDown(t){this.session=new tT(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:eT(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:dd(t),onStart:dd(n),onMove:dd(r),onEnd:(i,s)=>{delete this.session,o&&mt.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=ds(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let fd=!1;class a2 extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:i}=t;i&&(n.group&&n.group.add(i),r&&r.register&&o&&r.register(i),fd&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),tl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:i}=this.props,{projection:s}=r;return s&&(s.isPresent=i,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),fd=!0,o||t.layoutDependency!==n||n===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||mt.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),dm.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;fd=!0,o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function rT(e){const[t,n]=HS(),r=S.useContext(Cs);return p.jsx(a2,{...e,layoutGroup:r,switchLayoutGroup:S.useContext(QS),isPresent:t,safeToRemove:n})}const l2={pan:{Feature:s2},drag:{Feature:i2,ProjectionNode:BS,MeasureLayout:rT}};function $v(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,i=r[o];i&&mt.postRender(()=>i(t,ia(t)))}class c2 extends Xr{mount(){const{current:t}=this.node;t&&(this.unmount=PM(t,(n,r)=>($v(this.node,r,"Start"),o=>$v(this.node,o,"End"))))}unmount(){}}class u2 extends Xr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=na(Os(this.node.current,"focus",()=>this.onFocus()),Os(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function zv(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),i=r[o];i&&mt.postRender(()=>i(t,ia(t)))}class d2 extends Xr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=_M(t,(o,i)=>(zv(this.node,i,"Start"),(s,{success:a})=>zv(this.node,s,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}}const Ff=new WeakMap,pd=new WeakMap,f2=e=>{const t=Ff.get(e.target);t&&t(e)},p2=e=>{e.forEach(f2)};function m2({root:e,...t}){const n=e||document;pd.has(n)||pd.set(n,{});const r=pd.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(p2,{root:e,...t})),r[o]}function h2(e,t,n){const r=m2(t);return Ff.set(e,n),r.observe(e),()=>{Ff.delete(e),r.unobserve(e)}}const g2={some:0,all:1};class y2 extends Xr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:i}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:g2[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return h2(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(v2(t,n))&&this.startObserver()}unmount(){}}function v2({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const x2={inView:{Feature:y2},tap:{Feature:d2},focus:{Feature:u2},hover:{Feature:c2}},b2={layout:{ProjectionNode:BS,MeasureLayout:rT}},w2={...W_,...x2,...l2,...b2},Le=V_(w2,$_);function S2(e){return S.useEffect(()=>()=>e(),[])}function po(e){const t=ar(()=>Hr(e)),{isStatic:n}=S.useContext(So);if(n){const[,r]=S.useState(e);S.useEffect(()=>t.on("change",r),[])}return t}function oT(e,t){const n=po(t()),r=()=>n.set(t());return r(),xc(()=>{const o=()=>mt.preRender(r,!1,!0),i=e.map(s=>s.on("change",o));return()=>{i.forEach(s=>s()),yr(r)}}),n}function T2(e){cs.current=[],e();const t=oT(cs.current,e);return cs.current=void 0,t}function E2(e,t,n,r){if(typeof e=="function")return T2(e);const i=typeof t=="function"?t:GM(t,n,r),s=Array.isArray(e)?Bv(e,i):Bv([e],([l])=>i(l)),a=Array.isArray(e)?void 0:e.accelerate;return a&&!a.isTransformed&&typeof t!="function"&&Array.isArray(n)&&r?.clamp!==!1&&(s.accelerate={...a,times:t,keyframes:n,isTransformed:!0}),s}function Bv(e,t){const n=ar(()=>[]);return oT(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function C2(){!hm.current&&mS();const[e]=S.useState(Cl.current);return process.env.NODE_ENV!=="production"&&wc(e!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),e}function k2(){const e=C2(),{reducedMotion:t}=S.useContext(So);return t==="never"?!1:t==="always"?!0:e}function wm(e){return typeof e=="object"&&!Array.isArray(e)}function iT(e,t,n,r){return e==null?[]:typeof e=="string"&&wm(t)?um(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(o=>o!=null):[e]}function R2(e,t,n){return e*(t+1)}function Hv(e,t,n,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:t.startsWith("<")?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function I2(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(hi(e,o),r--)}}function A2(e,t,n,r,o,i){I2(e,o,i);for(let s=0;s<t.length;s++)e.push({value:t[s],at:xt(o,i,r[s]),easing:k1(n,s)})}function P2(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function O2(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const j2="easeInOut",D2=20;function M2(e,{defaultTransition:t={},...n}={},r,o){const i=t.duration||.3,s=new Map,a=new Map,l={},c=new Map;let u=0,d=0,f=0;for(let m=0;m<e.length;m++){const g=e[m];if(typeof g=="string"){c.set(g,d);continue}else if(!Array.isArray(g)){c.set(g.name,Hv(d,g.at,u,c));continue}let[y,h,v={}]=g;v.at!==void 0&&(d=Hv(d,v.at,u,c));let x=0;const b=(T,E,R,w=0,C=0)=>{const I=N2(T),{delay:P=0,times:M=H1(I),type:j=t.type||"keyframes",repeat:L,repeatType:O,repeatDelay:N=0,...V}=E;let{ease:D=t.ease||"easeOut",duration:k}=E;const F=typeof P=="function"?P(w,C):P,_=I.length,B=nm(j)?j:o?.[j||"keyframes"];if(_<=2&&B){let ee=100;if(_===2&&L2(I)){const q=I[1]-I[0];ee=Math.abs(q)}const ie={...t,...V};k!==void 0&&(ie.duration=hn(k));const te=V1(ie,ee,B);D=te.ease,k=te.duration}k??(k=i);const U=d+F;M.length===1&&M[0]===0&&(M[1]=1);const G=M.length-I.length;if(G>0&&B1(M,G),I.length===1&&I.unshift(null),L){vn(L<D2,"Repeat count too high, must be less than 20","repeat-count-high"),k=R2(k,L);const ee=[...I],ie=[...M];D=Array.isArray(D)?[...D]:[D];const te=[...D];for(let q=0;q<L;q++){I.push(...ee);for(let Y=0;Y<ee.length;Y++)M.push(ie[Y]+(q+1)),D.push(Y===0?"linear":k1(te,Y-1))}P2(M,L)}const H=U+k;A2(R,I,D,M,U,H),x=Math.max(F+k,x),f=Math.max(H,f)};if($t(y)){const T=Wv(y,a);b(h,v,qv("default",T))}else{const T=iT(y,h,r,l),E=T.length;for(let R=0;R<E;R++){h=h,v=v;const w=T[R],C=Wv(w,a);for(const I in h)b(h[I],_2(v,I),qv(I,C),R,E)}}u=d,d+=x}return a.forEach((m,g)=>{for(const y in m){const h=m[y];h.sort(O2);const v=[],x=[],b=[];for(let w=0;w<h.length;w++){const{at:C,value:I,easing:P}=h[w];v.push(I),x.push(gi(0,f,C)),b.push(P||"easeOut")}x[0]!==0&&(x.unshift(0),v.unshift(v[0]),b.unshift(j2)),x[x.length-1]!==1&&(x.push(1),v.push(null)),s.has(g)||s.set(g,{keyframes:{},transition:{}});const T=s.get(g);T.keyframes[y]=v;const{type:E,...R}=t;T.transition[y]={...R,duration:f,ease:b,times:x,...n}}}),s}function Wv(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function qv(e,t){return t[e]||(t[e]=[]),t[e]}function N2(e){return Array.isArray(e)?e:[e]}function _2(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const F2=e=>typeof e=="number",L2=e=>e.every(F2);function V2(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Sc(e)&&!fS(e)?new AS(t):new ES(t);n.mount(e),As.set(e,n)}function $2(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new cN(t);n.mount(e),As.set(e,n)}function z2(e,t){return $t(e)||typeof e=="number"||typeof e=="string"&&!wm(t)}function sT(e,t,n,r){const o=[];if(z2(e,t))o.push(LS(e,wm(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return o;const i=iT(e,t,r),s=i.length;vn(!!s,"No valid elements provided.","no-valid-elements");for(let a=0;a<s;a++){const l=i[a],c=l instanceof Element?V2:$2;As.has(l)||c(l);const u=As.get(l),d={...n};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(a,s)),o.push(...lm(u,{...t,transition:d},{}))}}return o}function B2(e,t,n){const r=[],o=e.map(s=>{if(Array.isArray(s)&&typeof s[0]=="function"){const a=s[0],l=Hr(0);return l.on("change",a),s.length===1?[l,[0,1]]:s.length===2?[l,[0,1],s[1]]:[l,s[1],s[2]]}return s});return M2(o,t,n,{spring:Is}).forEach(({keyframes:s,transition:a},l)=>{r.push(...sT(l,s,a))}),r}function H2(e){return Array.isArray(e)&&e.some(Array.isArray)}function aT(e={}){const{scope:t,reduceMotion:n}=e;function r(o,i,s){let a=[],l;if(H2(o))a=B2(o,n!==void 0?{reduceMotion:n,...i}:i,t);else{const{onComplete:u,...d}=s||{};typeof u=="function"&&(l=u),a=sT(o,i,n!==void 0?{reduceMotion:n,...d}:d,t)}const c=new YD(a);return l&&c.finished.then(l),t&&(t.animations.push(c),c.finished.then(()=>{hi(t.animations,c)})),c}return r}const Uv=aT();function W2(){const e=ar(()=>({current:null,animations:[]})),t=k2()??void 0,n=S.useMemo(()=>aT({scope:e,reduceMotion:t}),[e,t]);return S2(()=>{e.animations.forEach(r=>r.stop()),e.animations.length=0}),[e,n]}class q2{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const U2=()=>new q2;function G2(){return ar(U2)}const lT=S.createContext(null);function Y2(e,t,n,r){if(!r)return e;const o=e.findIndex(u=>u.value===t);if(o===-1)return e;const i=r>0?1:-1,s=e[o+i];if(!s)return e;const a=e[o],l=s.layout,c=xt(l.min,l.max,.5);return i===1&&a.layout.max+n>c||i===-1&&a.layout.min+n<c?Rj(e,o,o+i):e}function K2({children:e,as:t="ul",axis:n="y",onReorder:r,values:o,...i},s){const a=ar(()=>Le[t]),l=[],c=S.useRef(!1),u=S.useRef(null);vn(!!o,"Reorder.Group must be provided a values prop","reorder-values");const d={axis:n,groupRef:u,registerItem:(g,y)=>{const h=l.findIndex(v=>g===v.value);h!==-1?l[h].layout=y[n]:l.push({value:g,layout:y[n]}),l.sort(X2)},updateOrder:(g,y,h)=>{if(c.current)return;const v=Y2(l,g,y,h);l!==v&&(c.current=!0,r(v.map(Z2).filter(x=>o.indexOf(x)!==-1)))}};S.useEffect(()=>{c.current=!1});const f=g=>{u.current=g,typeof s=="function"?s(g):s&&(s.current=g)},m={overflowAnchor:"none",...i.style};return p.jsx(a,{...i,style:m,ref:f,ignoreStrict:!0,children:p.jsx(lT.Provider,{value:d,children:e})})}const cT=S.forwardRef(K2);function Z2(e){return e.value}function X2(e,t){return e.layout.min-t.layout.min}const Pa=50,Gv=25,Q2=new Set(["auto","scroll"]),fs=new WeakMap,ps=new WeakMap;let es=null;function J2(){if(es){const e=Lf(es,"y");e&&(ps.delete(e),fs.delete(e));const t=Lf(es,"x");t&&t!==e&&(ps.delete(t),fs.delete(t)),es=null}}function eF(e,t){const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY,o=e===document.body||e===document.documentElement;return Q2.has(r)||o}function Lf(e,t){let n=e?.parentElement;for(;n;){if(eF(n,t))return n;n=n.parentElement}return null}function tF(e,t,n){const r=t.getBoundingClientRect(),o=n==="x"?Math.max(0,r.left):Math.max(0,r.top),i=n==="x"?Math.min(window.innerWidth,r.right):Math.min(window.innerHeight,r.bottom),s=e-o,a=i-e;if(s<Pa){const l=1-s/Pa;return{amount:-Gv*l*l,edge:"start"}}else if(a<Pa){const l=1-a/Pa;return{amount:Gv*l*l,edge:"end"}}return{amount:0,edge:null}}function nF(e,t,n,r){if(!e)return;es=e;const o=Lf(e,n);if(!o)return;const i=t-(n==="x"?window.scrollX:window.scrollY),{amount:s,edge:a}=tF(i,o,n);if(a===null){ps.delete(o),fs.delete(o);return}const l=ps.get(o),c=o===document.body||o===document.documentElement;if(l!==a){if(!(a==="start"&&r<0||a==="end"&&r>0))return;ps.set(o,a);const d=n==="x"?o.scrollWidth-(c?window.innerWidth:o.clientWidth):o.scrollHeight-(c?window.innerHeight:o.clientHeight);fs.set(o,d)}if(s>0){const u=fs.get(o);if((n==="x"?c?window.scrollX:o.scrollLeft:c?window.scrollY:o.scrollTop)>=u)return}n==="x"?c?window.scrollBy({left:s}):o.scrollLeft+=s:c?window.scrollBy({top:s}):o.scrollTop+=s}function Yv(e,t=0){return $t(e)?e:po(t)}function rF({children:e,style:t={},value:n,as:r="li",onDrag:o,onDragEnd:i,layout:s=!0,...a},l){const c=ar(()=>Le[r]),u=S.useContext(lT),d={x:Yv(t.x),y:Yv(t.y)},f=E2([d.x,d.y],([v,x])=>v||x?1:"unset");vn(!!u,"Reorder.Item must be a child of Reorder.Group","reorder-item-child");const{axis:m,registerItem:g,updateOrder:y,groupRef:h}=u;return p.jsx(c,{drag:m,...a,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:f},layout:s,onDrag:(v,x)=>{const{velocity:b,point:T}=x,E=d[m].get();y(n,E,b[m]),nF(h.current,T[m],m,b[m]),o&&o(v,x)},onDragEnd:(v,x)=>{J2(),i&&i(v,x)},onLayoutMeasure:v=>{g(n,v)},ref:l,ignoreStrict:!0,children:e})}const uT=S.forwardRef(rF);var Oa={exports:{}},md={},ja={exports:{}},hd={};var Kv;function oF(){if(Kv)return hd;Kv=1;var e=S;function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(d,f){var m=f(),g=r({inst:{value:m,getSnapshot:f}}),y=g[0].inst,h=g[1];return i(function(){y.value=m,y.getSnapshot=f,l(y)&&h({inst:y})},[d,m,f]),o(function(){return l(y)&&h({inst:y}),d(function(){l(y)&&h({inst:y})})},[d]),s(m),m}function l(d){var f=d.getSnapshot;d=d.value;try{var m=f();return!n(d,m)}catch{return!0}}function c(d,f){return f()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return hd.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,hd}var gd={};var Zv;function iF(){return Zv||(Zv=1,process.env.NODE_ENV!=="production"&&(function(){function e(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}function t(m,g){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var y=g();if(!d){var h=g();i(y,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}h=s({inst:{value:y,getSnapshot:g}});var v=h[0].inst,x=h[1];return l(function(){v.value=y,v.getSnapshot=g,n(v)&&x({inst:v})},[m,y,g]),a(function(){return n(v)&&x({inst:v}),m(function(){n(v)&&x({inst:v})})},[m]),c(y),y}function n(m){var g=m.getSnapshot;m=m.value;try{var y=g();return!i(m,y)}catch{return!0}}function r(m,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=S,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,d=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;gd.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),gd}var Xv;function Sm(){return Xv||(Xv=1,process.env.NODE_ENV==="production"?ja.exports=oF():ja.exports=iF()),ja.exports}var Qv;function sF(){if(Qv)return md;Qv=1;var e=S,t=Sm();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return md.useSyncExternalStoreWithSelector=function(c,u,d,f,m){var g=i(null);if(g.current===null){var y={hasValue:!1,value:null};g.current=y}else y=g.current;g=a(function(){function v(R){if(!x){if(x=!0,b=R,R=f(R),m!==void 0&&y.hasValue){var w=y.value;if(m(w,R))return T=w}return T=R}if(w=T,r(b,R))return w;var C=f(R);return m!==void 0&&m(w,C)?(b=R,w):(b=R,T=C)}var x=!1,b,T,E=d===void 0?null:d;return[function(){return v(u())},E===null?void 0:function(){return v(E())}]},[u,d,f,m]);var h=o(c,g[0],g[1]);return s(function(){y.hasValue=!0,y.value=h},[h]),l(h),h},md}var yd={};var Jv;function aF(){return Jv||(Jv=1,process.env.NODE_ENV!=="production"&&(function(){function e(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=S,n=Sm(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,l=t.useDebugValue;yd.useSyncExternalStoreWithSelector=function(c,u,d,f,m){var g=i(null);if(g.current===null){var y={hasValue:!1,value:null};g.current=y}else y=g.current;g=a(function(){function v(R){if(!x){if(x=!0,b=R,R=f(R),m!==void 0&&y.hasValue){var w=y.value;if(m(w,R))return T=w}return T=R}if(w=T,r(b,R))return w;var C=f(R);return m!==void 0&&m(w,C)?(b=R,w):(b=R,T=C)}var x=!1,b,T,E=d===void 0?null:d;return[function(){return v(u())},E===null?void 0:function(){return v(E())}]},[u,d,f,m]);var h=o(c,g[0],g[1]);return s(function(){y.hasValue=!0,y.value=h},[h]),l(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),yd}var ex;function lF(){return ex||(ex=1,process.env.NODE_ENV==="production"?Oa.exports=sF():Oa.exports=aF()),Oa.exports}var cF=lF(),uF=Sm(),yi=function(){return yi=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},yi.apply(this,arguments)};function ms(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return i}function dT(e,t,n){if(arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var $o=function(e){var t=S.useRef(e??{});return S.useEffect(function(){t.current=e},[e]),t},dF=function(e){var t=S.useRef(void 0);return S.useEffect(function(){t.current=e},[e]),t.current},fF=function(e){return Object.entries(e)},fT=function(e){return e instanceof Promise},pT=function(e,t,n,r){return t===e?n.reduce(function(o,i){return i(o,t,r)},e):e.constructor.name===Object.name?n.reduce(function(o,i){return i(o,t,r)},yi(yi({},t),e)):n.reduce(function(o,i){return i(o,t,r)},e)},pF=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];var l=performance.now(),c=t.apply(void 0,dT([],ms(s),!1)),u=function(d,f){return n(function(m){return pT(d,m,i,f)})};return fT(c)?c.then(function(d){o.current={method:e,props:r(),time:performance.now()-l},u(d,o.current)}):(o.current={method:e,props:r(),time:performance.now()-l},void u(c,o.current))}},mF=function(e,t,n,r,o,i){return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];o.current={method:e,time:0,props:r()};var l=t.apply(void 0,dT([],ms(s),!1)),c=function(u){return n(function(d){return pT(u,d,i,o.current)})};return fT(l)?l.then(function(u){return c(u)}):c(l)}},Tm=function(e,t,n){var r,o,i,s=ms(S.useState(function(){return e}),2),a=s[0],l=s[1],c=$o(a),u=$o((r=n?.props)!==null&&r!==void 0?r:{}),d=$o(t),f=$o((o=n?.postMiddleware)!==null&&o!==void 0?o:[]),m=$o((i=n?.interceptor)!==null&&i!==void 0?i:[]),g=S.useRef(e),y=dF(a),h=$o(y),v=S.useRef(null);S.useEffect(function(){if(v.current!==null){var T=v.current;f.current.forEach(function(E){E(a,y,T)})}},[a,f,y]);var x=ms(S.useState(function(){var T=function(){return u.current},E=d.current({props:T,state:function(){return c.current},initialState:g.current,previousState:function(){return h.current}});return fF(E).reduce(function(R,w){var C,I=ms(w,2),P=I[0],M=I[1];return yi(yi({},R),(C={},C[P]=n?.debug?pF(P,M,l,T,v,m.current):mF(P,M,l,T,v,m.current),C))},{})}),1),b=x[0];return[a,b,u.current]},hF=Object.defineProperty,tx=Object.getOwnPropertySymbols,gF=Object.prototype.hasOwnProperty,yF=Object.prototype.propertyIsEnumerable,nx=(e,t,n)=>t in e?hF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vF=(e,t)=>{for(var n in t||(t={}))gF.call(t,n)&&nx(e,n,t[n]);if(tx)for(var n of tx(t))yF.call(t,n)&&nx(e,n,t[n]);return e},Em=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return!0;return!1},xF=(e,t,n,r)=>kc(Em,e,t,n,r),vi=e=>typeof e=="object",Fr=(e,t)=>{if(e===t)return!0;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(!e||!t||!vi(e)&&!vi(t))return e===t;if(e.prototype!==t.prototype)return!1;const n=Object.keys(e);return n.length!==Object.keys(t).length?!1:n.every(r=>Fr(e[r],t[r]))},bF=(e,t)=>(vi(e)||Array.isArray(e))&&t?e[t]:e,wF=e=>(t,n)=>t[e]===n[e]?0:t[e]>n[e]?1:-1,Pl=e=>/[0-9.]+/.test(e),rx=e=>["string","number"].includes(typeof e),ox=e=>e==null||e?.length===0||e==="",ix={eq:Fr,is:Object.is,"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"<":(e,t)=>e<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,includes:(e,t)=>`${e}`.includes(t),notIncludes:(e,t)=>!`${e}`.includes(t),startsWith:(e,t)=>`${e}`.startsWith(t),endsWith:(e,t)=>`${e}`.endsWith(t),like:(e,t)=>new RegExp(`.*${t}.*`,"gi").test(`${e}`),alphabetical:(e,t)=>e.toString().localeCompare(t.toString()),empty:ox,notEmpty:e=>!ox(e),in:(e,t)=>Em(t,n=>Fr(e,n)),notIn:(e,t)=>mT(t,n=>!Fr(e,n))},SF=e=>{if(e in ix)return ix[e];throw new Error("Linq - Symbol not found")},ai=(e,t)=>{const n=[],r=e.length;for(let o=0;o<r;o++)t(e[o],o,e)&&n.push(e[o]);return n},kc=(e,t,n,r,o)=>{if(typeof n=="function")return e(t,n);const i=SF(r);return n&&r&&o!==void 0?e(t,s=>i(s[n],o)):e(t,s=>i(s,o))},TF=(e,t,n,r)=>kc(ai,e,t,n,r),mT=(e,t)=>{for(let n=0;n<e.length;n++)if(!t(e[n],n,e))return!1;return!0},EF=(e,t,n,r)=>kc(mT,e,t,n,r),hT=e=>{if(e===null)return null;const t=vF({},e);return Object.keys(t).forEach(n=>t[n]=vi(e[n])?hT(e[n]):e[n]),Array.isArray(e)&&e.length?(t.length=e.length)&&Array.from(t):Array.isArray(e)?Array.from(e):t},sx=(e,t)=>{if(vi(t)){for(let n=0;n<e.length;n++){const r=e[n];if(Fr(t,r))return!0}return!1}for(let n=0;n<e.length;n++){const r=e[n];if(Fr(t,r))return!0}return!1},CF=(e,t)=>{const n=new Map(e.map(r=>[r[t],r]));return Object.fromEntries(n.entries())},kF=e=>ai(e,(t,n,r)=>vi(t)?n===r.findIndex(o=>Fr(o,t)):n===r.indexOf(t)),RF=(e,t)=>{const n=e.length;for(let r=0;r<n;r++)if(t(e[r],r,e))return e[r]},gT=(e,t)=>{const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o)||[];i.push(r),n.set(o,i)}),Object.fromEntries(n.entries())},IF=(e,t)=>gT(e,n=>n[t]),ax=(e,t)=>{const n=[];let r=0;const o=e.length;for(r;r<o;r++){const i=t(e[r],r,e);n.push(i)}return n},AF=(e,t)=>{let n=Number.parseInt(e,10),r=Number.parseInt(t,10);return n>r?[r,n]:[n,r]},PF=(e,t,n=1)=>{const r=[];let o=e.charCodeAt(0);const i=t.charCodeAt(0);for(;o<=i;o+=n)r.push(String.fromCharCode(o));return Pl(e)&&Pl(t)?r.map(s=>Number.parseInt(s)):r},vd=(e,t,n=1)=>{let r=Math.abs(n);if((e.length>1||t.length>1)&&Pl(e)&&Pl(t)){const o=[],[i,s]=AF(e,t);for(let a=i;a<=s;a+=r)o.push(a);return o}return PF(e,t,r)},OF=(e,t,n=1)=>{if(t===void 0){const[r,o,i]=e.split("..");return i===void 0?vd(r,o,1):vd(r,i,Number.parseInt(o,10))}return rx(e)&&rx(t)?vd(`${e}`,`${t}`,n):Array.from({length:e},(r,o)=>o*Math.abs(t))},xd=(e,t,n)=>{let r=t;const o=n.length;for(let i=0;i<o;i++){const s=n[i];r=e(r,s,i,n)}return r},lx=e=>{const t=Array.from(e.values());let n=null,r=null,o=t.length;for(n=0;n<o/2;n+=1){r=o-1-n;let i=t[n];t[n]=t[r],t[r]=i}return t},jF=(e,t)=>{if(typeof t=="number")return e.slice(t);let n=e.length;for(let r=0;r<n;r++){const o=e[r];if(t(o,r,e))return e.slice(r)}return e.slice(0)},DF=(e,t,n,r)=>kc(jF,e,t,n,r),cx=(e,t)=>{const n=[...e];return t===void 0?n.sort():typeof t=="function"?n.toSorted(t):n.toSorted(wF(t))},yT=(e=>(e.Asc="asc",e.Desc="desc",e))(yT||{}),MF=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.key,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),NF=(e,t)=>e.sort(MF(t)),_F=(e,t)=>{if(t===void 0)return[...new Set(e).values()];const n=new Set;return Array.isArray(t)?[...new Set(t)]:ai(e,r=>{const o=t?n.has(r[t]):n.has(t);return t&&(o||n.add(r[t])),!o})},FF=class Vf{constructor(t=[]){this.array=t}static Range(...t){return OF(...t)}static New(t){return new Vf(t)}Where(t,n,r){return this.array=TF(this.array,t,n,r),this}Some(t,n,r){return xF(this.array,t,n,r)}All(t,n,r){return EF(this.array,t,n,r)}Reverse(){return this.array=lx(this.array),this}Add(t){return this.array=Array.isArray(t)?this.array.concat(t):this.array.concat([t]),this}Prepend(t){return this.array=Array.isArray(t)?t.concat(this.array):[t].concat(this.array),this}Select(t){return t===void 0?this.array:this.array.map(t)}Take(t,n){return n!==void 0?this.array=this.array.slice(t,Math.max(0,n)):this.array=this.array.slice(t),this}Head(){return this.array[0]}Tail(){return this.Skip(1)}Skip(t,n,r){return this.array=DF(this.array,t,n,r),this}Distinct(){return this.array=kF(this.array),this}First(t){return t===void 0?this.array[0]:RF(this.array,t)||null}Last(t){const n=this.array.length;if(t===void 0)return this.array[n-1];for(let r=n;r!==0;r--)if(t(this.array[r],r,this.array))return this.array[r]}Sum(t){return t===void 0?xd((n,r)=>n+r,0,this.array):xd((n,r)=>n+bF(r,t),0,this.array)}Average(t){return this.Sum(t)/this.array.length}GroupBy(t){return IF(this.array,t)}GroupWith(t){return gT(this.array,t)}Except(t){return ai(this.array,n=>!sx(t,n))}Intersect(t){return ai(this.array,n=>sx(t,n))}OrderBy(t,n){let r;return r=t?cx(this.array,t):this.array.toSorted(),this.array=n==="desc"?lx(r):r,this}Includes(t){return Em(this.array,n=>Fr(n,t))}In(t){const n=t.length;for(let r=0;r<n;r++){const o=t[r];if(this.Includes(o))return!0}return!1}Reduce(t,n){return xd(t,n??this.array[0],this.array)}Empty(){return this.array.length===0}ToMap(t){return new Map(ax(this.array,n=>[t,n]))}Zip(t,n){return ax(this.array,(r,o)=>n(r,t[o]))}Count(t){return t===void 0?this.array.length:ai(this.array,t).length}Get(t){return this.array[t]}Clone(){return new Vf(hT(this.array))}ToObject(t){return CF(this.array,t)}Sort(t){return Array.isArray(t)?NF(this.array,t):cx(this.array,t)}Unique(t){return _F(this.array,t)}},vT=FF;const Rc=0,Qr=1,$i=2,xT=4;function ux(e){return()=>e}function LF(e){e()}function js(e,t){return n=>e(t(n))}function dx(e,t){return()=>e(t)}function VF(e,t){return n=>e(t,n)}function Cm(e){return e!==void 0}function $F(...e){return()=>{e.map(LF)}}function zi(){}function Ic(e,t){return t(e),e}function zF(e,t){return t(e)}function St(...e){return e}function lt(e,t){return e(Qr,t)}function ze(e,t){e(Rc,t)}function km(e){e($i)}function Et(e){return e(xT)}function Re(e,t){return lt(e,VF(t,Rc))}function Fn(e,t){const n=e(Qr,r=>{n(),t(r)});return n}function fx(e){let t,n;return r=>o=>{t=o,n&&clearTimeout(n),n=setTimeout(()=>{r(t)},e)}}function bT(e,t){return e===t}function bt(e=bT){let t;return n=>r=>{e(t,r)||(t=r,n(r))}}function Oe(e){return t=>n=>{e(n)&&t(n)}}function be(e){return t=>js(t,e)}function qn(e){return t=>()=>{t(e)}}function de(e,...t){const n=BF(...t);return((r,o)=>{switch(r){case $i:km(e);return;case Qr:return lt(e,n(o))}})}function Zn(e,t){return n=>r=>{n(t=e(t,r))}}function To(e){return t=>n=>{e>0?e--:t(n)}}function fr(e){let t=null,n;return r=>o=>{t=o,!n&&(n=setTimeout(()=>{n=void 0,r(t)},e))}}function He(...e){const t=new Array(e.length);let n=0,r=null;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);lt(i,l=>{const c=n;n=n|a,t[s]=l,c!==o&&n===o&&r&&(r(),r=null)})}),i=>s=>{const a=()=>{i([s].concat(t))};n===o?a():r=a}}function BF(...e){return t=>e.reduceRight(zF,t)}function HF(e){let t,n;const r=()=>t?.();return function(o,i){switch(o){case Qr:return i?n===i?void 0:(r(),n=i,t=lt(e,i),t):(r(),zi);case $i:r(),n=null;return}}}function he(e){let t=e;const n=Ye();return((r,o)=>{switch(r){case Rc:t=o;break;case Qr:{o(t);break}case xT:return t}return n(r,o)})}function Zt(e,t){return Ic(he(t),n=>Re(e,n))}function Ye(){const e=[];return((t,n)=>{switch(t){case Rc:e.slice().forEach(r=>{r(n)});return;case $i:e.splice(0,e.length);return;case Qr:return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}})}function gn(e){return Ic(Ye(),t=>Re(e,t))}function Je(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:WF(),singleton:n}}const WF=()=>Symbol();function qF(e){const t=new Map,n=({constructor:r,dependencies:o,id:i,singleton:s})=>{if(s&&t.has(i))return t.get(i);const a=r(o.map(l=>n(l)));return s&&t.set(i,a),a};return n(e)}function _t(...e){const t=Ye(),n=new Array(e.length);let r=0;const o=Math.pow(2,e.length)-1;return e.forEach((i,s)=>{const a=Math.pow(2,s);lt(i,l=>{n[s]=l,r=r|a,r===o&&ze(t,n)})}),function(i,s){switch(i){case $i:{km(t);return}case Qr:return r===o&&s(n),lt(t,s)}}}function Pe(e,t=bT){return de(e,bt(t))}function $f(...e){return function(t,n){switch(t){case $i:return;case Qr:return $F(...e.map(r=>lt(r,n)))}}}var sn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(sn||{});const UF={0:"debug",3:"error",1:"log",2:"warn"},GF=()=>typeof globalThis>"u"?window:globalThis,Jr=Je(()=>{const e=he(3);return{log:he((t,n,r=1)=>{var o;const i=(o=GF().VIRTUOSO_LOG_LEVEL)!=null?o:Et(e);r>=i&&console[UF[r]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function rr(e,t,n){return Rm(e,t,n).callbackRef}function Rm(e,t,n){const r=S.useRef(null);let o=s=>{};const i=S.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(s=>{const a=()=>{const l=s[0].target;l.offsetParent!==null&&e(l)};n?a():requestAnimationFrame(a)}):null,[e,n]);return o=s=>{s&&t?(i?.observe(s),r.current=s):(r.current&&i?.unobserve(r.current),r.current=null)},{callbackRef:o,ref:r}}function wT(e,t,n,r,o,i,s,a,l){const c=S.useCallback(u=>{const d=YF(u.children,t,a?"offsetWidth":"offsetHeight",o);let f=u.parentElement;for(;!f.dataset.virtuosoScroller;)f=f.parentElement;const m=f.lastElementChild.dataset.viewportType==="window";let g;m&&(g=f.ownerDocument.defaultView);const y=s?a?s.scrollLeft:s.scrollTop:m?a?g.scrollX||g.document.documentElement.scrollLeft:g.scrollY||g.document.documentElement.scrollTop:a?f.scrollLeft:f.scrollTop,h=s?a?s.scrollWidth:s.scrollHeight:m?a?g.document.documentElement.scrollWidth:g.document.documentElement.scrollHeight:a?f.scrollWidth:f.scrollHeight,v=s?a?s.offsetWidth:s.offsetHeight:m?a?g.innerWidth:g.innerHeight:a?f.offsetWidth:f.offsetHeight;r({scrollHeight:h,scrollTop:Math.max(y,0),viewportHeight:v}),i?.(a?px("column-gap",getComputedStyle(u).columnGap,o):px("row-gap",getComputedStyle(u).rowGap,o)),d!==null&&e(d)},[e,t,o,i,s,r,a]);return Rm(c,n,l)}function YF(e,t,n,r){const o=e.length;if(o===0)return null;const i=[];for(let s=0;s<o;s++){const a=e.item(s);if(a.dataset.index===void 0)continue;const l=parseInt(a.dataset.index),c=parseFloat(a.dataset.knownSize),u=t(a,n);if(u===0&&r("Zero-sized element, this should not happen",{child:a},sn.ERROR),u===c)continue;const d=i[i.length-1];i.length===0||d.size!==u||d.endIndex!==l-1?i.push({endIndex:l,size:u,startIndex:l}):i[i.length-1].endIndex++}return i}function px(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}function Im(e,t,n){const r=S.useRef(null),o=S.useCallback(l=>{if(!(l!=null&&l.offsetParent))return;const c=l.getBoundingClientRect(),u=c.width;let d,f;if(t){const m=t.getBoundingClientRect(),g=c.top-m.top;f=m.height-Math.max(0,g),d=g+t.scrollTop}else{const m=s.current.ownerDocument.defaultView;f=m.innerHeight-Math.max(0,c.top),d=c.top+m.scrollY}r.current={offsetTop:d,visibleHeight:f,visibleWidth:u},e(r.current)},[e,t]),{callbackRef:i,ref:s}=Rm(o,!0,n),a=S.useCallback(()=>{o(s.current)},[o,s]);return S.useEffect(()=>{var l;if(t){t.addEventListener("scroll",a);const c=new ResizeObserver(()=>{requestAnimationFrame(a)});return c.observe(t),()=>{t.removeEventListener("scroll",a),c.unobserve(t)}}else{const c=(l=s.current)==null?void 0:l.ownerDocument.defaultView;return c?.addEventListener("scroll",a),c?.addEventListener("resize",a),()=>{c?.removeEventListener("scroll",a),c?.removeEventListener("resize",a)}}},[a,t,s]),i}const tn=Je(()=>{const e=Ye(),t=Ye(),n=he(0),r=Ye(),o=he(0),i=Ye(),s=Ye(),a=he(0),l=he(0),c=he(0),u=he(0),d=Ye(),f=Ye(),m=he(!1),g=he(!1),y=he(!1);return Re(de(e,be(({scrollTop:h})=>h)),t),Re(de(e,be(({scrollHeight:h})=>h)),s),Re(t,o),{deviation:n,fixedFooterHeight:c,fixedHeaderHeight:l,footerHeight:u,headerHeight:a,horizontalDirection:g,scrollBy:f,scrollContainerState:e,scrollHeight:s,scrollingInProgress:m,scrollTo:d,scrollTop:t,skipAnimationFrameInResizeObserver:y,smoothScrollTargetReached:r,statefulScrollTop:o,viewportHeight:i}},[],{singleton:!0}),Ds={lvl:0};function ST(e,t){const n=e.length;if(n===0)return[];let{index:r,value:o}=t(e[0]);const i=[];for(let s=1;s<n;s++){const{index:a,value:l}=t(e[s]);i.push({end:a-1,start:r,value:o}),r=a,o=l}return i.push({end:1/0,start:r,value:o}),i}function ht(e){return e===Ds}function Ms(e,t){if(!ht(e))return t===e.k?e.v:t<e.k?Ms(e.l,t):Ms(e.r,t)}function $n(e,t,n="k"){if(ht(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const r=$n(e.r,t,n);return r[0]===-1/0?[e.k,e.v]:r}return $n(e.l,t,n)}function pn(e,t,n){return ht(e)?CT(t,n,1):t===e.k?Vt(e,{k:t,v:n}):t<e.k?mx(Vt(e,{l:pn(e.l,t,n)})):mx(Vt(e,{r:pn(e.r,t,n)}))}function li(){return Ds}function ci(e,t,n){if(ht(e))return[];const r=$n(e,t)[0];return KF(Bf(e,r,n))}function zf(e,t){if(ht(e))return Ds;const{k:n,l:r,r:o}=e;if(t===n){if(ht(r))return o;if(ht(o))return r;{const[i,s]=ET(r);return nl(Vt(e,{k:i,l:TT(r),v:s}))}}else return t<n?nl(Vt(e,{l:zf(r,t)})):nl(Vt(e,{r:zf(o,t)}))}function mo(e){return ht(e)?[]:[...mo(e.l),{k:e.k,v:e.v},...mo(e.r)]}function Bf(e,t,n){if(ht(e))return[];const{k:r,l:o,r:i,v:s}=e;let a=[];return r>t&&(a=a.concat(Bf(o,t,n))),r>=t&&r<=n&&a.push({k:r,v:s}),r<=n&&(a=a.concat(Bf(i,t,n))),a}function nl(e){const{l:t,lvl:n,r}=e;if(r.lvl>=n-1&&t.lvl>=n-1)return e;if(n>r.lvl+1){if(bd(t))return kT(Vt(e,{lvl:n-1}));if(!ht(t)&&!ht(t.r))return Vt(t.r,{l:Vt(t,{r:t.r.l}),lvl:n,r:Vt(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(bd(e))return Hf(Vt(e,{lvl:n-1}));if(!ht(r)&&!ht(r.l)){const o=r.l,i=bd(o)?r.lvl-1:r.lvl;return Vt(o,{l:Vt(e,{lvl:n-1,r:o.l}),lvl:o.lvl+1,r:Hf(Vt(r,{l:o.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function Vt(e,t){return CT(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function TT(e){return ht(e.r)?e.l:nl(Vt(e,{r:TT(e.r)}))}function bd(e){return ht(e)||e.lvl>e.r.lvl}function ET(e){return ht(e.r)?[e.k,e.v]:ET(e.r)}function CT(e,t,n,r=Ds,o=Ds){return{k:e,l:r,lvl:n,r:o,v:t}}function mx(e){return Hf(kT(e))}function kT(e){const{l:t}=e;return!ht(t)&&t.lvl===e.lvl?Vt(t,{r:Vt(e,{l:t.r})}):e}function Hf(e){const{lvl:t,r:n}=e;return!ht(n)&&!ht(n.r)&&n.lvl===t&&n.r.lvl===t?Vt(n,{l:Vt(e,{r:n.l}),lvl:t+1}):e}function KF(e){return ST(e,({k:t,v:n})=>({index:t,value:n}))}function RT(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function Ns(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Am=Je(()=>({recalcInProgress:he(!1)}),[],{singleton:!0});function IT(e,t,n){return e[Ol(e,t,n)]}function Ol(e,t,n,r=0){let o=e.length-1;for(;r<=o;){const i=Math.floor((r+o)/2),s=e[i],a=n(s,t);if(a===0)return i;if(a===-1){if(o-r<2)return i-1;o=i-1}else{if(o===r)return i;r=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function ZF(e,t,n,r){const o=Ol(e,t,r),i=Ol(e,n,r,o);return e.slice(o,i+1)}function zn(e,t){return Math.round(e.getBoundingClientRect()[t])}function Ac(e){return!ht(e.groupOffsetTree)}function Pm({index:e},t){return t===e?0:t<e?-1:1}function XF(){return{groupIndices:[],groupOffsetTree:li(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:li()}}function QF(e,t){let n=ht(e)?0:1/0;for(const r of t){const{endIndex:o,size:i,startIndex:s}=r;if(n=Math.min(n,s),ht(e)){e=pn(e,0,i);continue}const a=ci(e,s-1,o+1);if(a.some(iL(r)))continue;let l=!1,c=!1;for(const{end:u,start:d,value:f}of a)l?(o>=d||i===f)&&(e=zf(e,d)):(c=f!==i,l=!0),u>o&&o>=d&&f!==i&&(e=pn(e,o+1,f));c&&(e=pn(e,s,i))}return[e,n]}function JF(e){return typeof e.groupIndex<"u"}function eL({offset:e},t){return t===e?0:t<e?-1:1}function _s(e,t,n){if(t.length===0)return 0;const{index:r,offset:o,size:i}=IT(t,e,Pm),s=e-r,a=i*s+(s-1)*n+o;return a>0?a+n:a}function AT(e,t){if(!Ac(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function PT(e,t,n){if(JF(e))return t.groupIndices[e.groupIndex]+1;{const r=e.index==="LAST"?n:e.index;let o=AT(r,t);return o=Math.max(0,o,Math.min(n,o)),o}}function tL(e,t,n,r=0){return r>0&&(t=Math.max(t,IT(e,r,Pm).offset)),ST(ZF(e,t,n,eL),oL)}function nL(e,[t,n,r,o]){t.length>0&&r("received item sizes",t,sn.DEBUG);const i=e.sizeTree;let s=i,a=0;if(n.length>0&&ht(i)&&t.length===2){const f=t[0].size,m=t[1].size;s=n.reduce((g,y)=>pn(pn(g,y,f),y+1,m),s)}else[s,a]=QF(s,t);if(s===i)return e;const{lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d}=Wf(e.offsetTree,a,s,o);return{groupIndices:n,groupOffsetTree:n.reduce((f,m)=>pn(f,m,_s(m,d,o)),li()),lastIndex:l,lastOffset:c,lastSize:u,offsetTree:d,sizeTree:s}}function rL(e){return mo(e).map(({k:t,v:n},r,o)=>{const i=o[r+1];return{endIndex:i?i.k-1:1/0,size:n,startIndex:t}})}function hx(e,t){let n=0,r=0;for(;n<e;)n+=t[r+1]-t[r]-1,r++;return r-(n===e?0:1)}function Wf(e,t,n,r){let o=e,i=0,s=0,a=0,l=0;if(t!==0){l=Ol(o,t-1,Pm),a=o[l].offset;const c=$n(n,t-1);i=c[0],s=c[1],o.length&&o[l].size===$n(n,t)[1]&&(l-=1),o=o.slice(0,l+1)}else o=[];for(const{start:c,value:u}of ci(n,t,1/0)){const d=c-i,f=d*s+a+d*r;o.push({index:c,offset:f,size:u}),i=c,a=f,s=u}return{lastIndex:i,lastOffset:a,lastSize:s,offsetTree:o}}function oL(e){return{index:e.index,value:e}}function iL(e){const{endIndex:t,size:n,startIndex:r}=e;return o=>o.start===r&&(o.end===t||o.end===1/0)&&o.value===n}const sL={offsetHeight:"height",offsetWidth:"width"},lr=Je(([{log:e},{recalcInProgress:t}])=>{const n=Ye(),r=Ye(),o=Zt(r,0),i=Ye(),s=Ye(),a=he(0),l=he([]),c=he(void 0),u=he(void 0),d=he(void 0),f=he(void 0),m=he((w,C)=>zn(w,sL[C])),g=he(void 0),y=he(0),h=XF(),v=Zt(de(n,He(l,e,y),Zn(nL,h),bt()),h),x=Zt(de(l,bt(),Zn((w,C)=>({current:C,prev:w.current}),{current:[],prev:[]}),be(({prev:w})=>w)),[]);Re(de(l,Oe(w=>w.length>0),He(v,y),be(([w,C,I])=>{const P=w.reduce((M,j,L)=>pn(M,j,_s(j,C.offsetTree,I)||L),li());return{...C,groupIndices:w,groupOffsetTree:P}})),v),Re(de(r,He(v),Oe(([w,{lastIndex:C}])=>w<C),be(([w,{lastIndex:C,lastSize:I}])=>[{endIndex:C,size:I,startIndex:w}])),n),Re(c,u);const b=Zt(de(c,be(w=>w===void 0)),!0);Re(de(u,Oe(w=>w!==void 0&&ht(Et(v).sizeTree)),be(w=>{const C=Et(d),I=Et(l).length>0;return C?I?[{endIndex:0,size:C,startIndex:0},{endIndex:1,size:w,startIndex:1}]:[]:[{endIndex:0,size:w,startIndex:0}]})),n),Re(de(f,Oe(w=>w!==void 0&&w.length>0&&ht(Et(v).sizeTree)),be(w=>{const C=[];let I=w[0],P=0;for(let M=1;M<w.length;M++){const j=w[M];j!==I&&(C.push({endIndex:M-1,size:I,startIndex:P}),I=j,P=M)}return C.push({endIndex:w.length-1,size:I,startIndex:P}),C})),n),Re(de(l,He(d,u),Oe(([,w,C])=>w!==void 0&&C!==void 0),be(([w,C,I])=>{const P=[];for(let M=0;M<w.length;M++){const j=w[M],L=w[M+1];P.push({startIndex:j,endIndex:j,size:C}),L!==void 0&&P.push({startIndex:j+1,endIndex:L-1,size:I})}return P})),n);const T=gn(de(n,He(v),Zn(({sizes:w},[C,I])=>({changed:I!==w,sizes:I}),{changed:!1,sizes:h}),be(w=>w.changed)));lt(de(a,Zn((w,C)=>({diff:w.prev-C,prev:C}),{diff:0,prev:0}),be(w=>w.diff)),w=>{const{groupIndices:C}=Et(v);if(w>0)ze(t,!0),ze(i,w+hx(w,C));else if(w<0){const I=Et(x);I.length>0&&(w-=hx(-w,I)),ze(s,w)}}),lt(de(a,He(e)),([w,C])=>{w<0&&C("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:a},sn.ERROR)});const E=gn(i);Re(de(i,He(v),be(([w,C])=>{const I=C.groupIndices.length>0,P=[],M=C.lastSize;if(I){const j=Ms(C.sizeTree,0);let L=0,O=0;for(;L<w;){const V=C.groupIndices[O],D=C.groupIndices.length===O+1?1/0:C.groupIndices[O+1]-V-1;P.push({endIndex:V,size:j,startIndex:V}),P.push({endIndex:V+1+D-1,size:M,startIndex:V+1}),O++,L+=D+1}const N=mo(C.sizeTree);return L!==w&&N.shift(),N.reduce((V,{k:D,v:k})=>{let F=V.ranges;return V.prevSize!==0&&(F=[...V.ranges,{endIndex:D+w-1,size:V.prevSize,startIndex:V.prevIndex}]),{prevIndex:D+w,prevSize:k,ranges:F}},{prevIndex:w,prevSize:0,ranges:P}).ranges}return mo(C.sizeTree).reduce((j,{k:L,v:O})=>({prevIndex:L+w,prevSize:O,ranges:[...j.ranges,{endIndex:L+w-1,size:j.prevSize,startIndex:j.prevIndex}]}),{prevIndex:0,prevSize:M,ranges:[]}).ranges})),n);const R=gn(de(s,He(v,y),be(([w,{offsetTree:C},I])=>{const P=-w;return _s(P,C,I)})));return Re(de(s,He(v,y),be(([w,C,I])=>{if(C.groupIndices.length>0){if(ht(C.sizeTree))return C;let P=li();const M=Et(x);let j=0,L=0,O=0;for(;j<-w;){O=M[L];const N=M[L+1]-O-1;L++,j+=N+1}if(P=mo(C.sizeTree).reduce((N,{k:V,v:D})=>pn(N,Math.max(0,V+w),D),P),j!==-w){const N=Ms(C.sizeTree,O);P=pn(P,0,N);const V=$n(C.sizeTree,-w+1)[1];P=pn(P,1,V)}return{...C,sizeTree:P,...Wf(C.offsetTree,0,P,I)}}else{const P=mo(C.sizeTree).reduce((M,{k:j,v:L})=>pn(M,Math.max(0,j+w),L),li());return{...C,sizeTree:P,...Wf(C.offsetTree,0,P,I)}}})),v),{beforeUnshiftWith:E,data:g,defaultItemSize:u,firstItemIndex:a,fixedItemSize:c,fixedGroupSize:d,gap:y,groupIndices:l,heightEstimates:f,itemSize:m,listRefresh:T,shiftWith:s,shiftWithOffset:R,sizeRanges:n,sizes:v,statefulTotalCount:o,totalCount:r,trackItemSizes:b,unshiftWith:i}},St(Jr,Am),{singleton:!0});function aL(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const OT=Je(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:r,scrollTop:o}])=>{const i=Ye(),s=Ye(),a=gn(de(i,be(aL)));return Re(de(a,be(l=>l.totalCount)),n),Re(de(a,be(l=>l.groupIndices)),e),Re(de(_t(o,t,r),Oe(([l,c])=>Ac(c)),be(([l,c,u])=>$n(c.groupOffsetTree,Math.max(l-u,0),"v")[0]),bt(),be(l=>[l])),s),{groupCounts:i,topItemsIndexes:s}},St(lr,tn)),eo=Je(([{log:e}])=>{const t=he(!1),n=gn(de(t,Oe(r=>r),bt()));return lt(t,r=>{r&&Et(e)("props updated",{},sn.DEBUG)}),{didMount:n,propsReady:t}},St(Jr),{singleton:!0}),lL=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function jT(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!lL)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const sa=Je(([{gap:e,listRefresh:t,sizes:n,totalCount:r},{fixedFooterHeight:o,fixedHeaderHeight:i,footerHeight:s,headerHeight:a,scrollingInProgress:l,scrollTo:c,smoothScrollTargetReached:u,viewportHeight:d},{log:f}])=>{const m=Ye(),g=Ye(),y=he(0);let h=null,v=null,x=null;function b(){h&&(h(),h=null),x&&(x(),x=null),v&&(clearTimeout(v),v=null),ze(l,!1)}return Re(de(m,He(n,d,r,y,a,s,f),He(e,i,o),be(([[T,E,R,w,C,I,P,M],j,L,O])=>{const N=jT(T),{align:V,behavior:D,offset:k}=N,F=w-1,_=PT(N,E,F);let B=_s(_,E.offsetTree,j)+I;V==="end"?(B+=L+$n(E.sizeTree,_)[1]-R+O,_===F&&(B+=P)):V==="center"?B+=(L+$n(E.sizeTree,_)[1]-R+O)/2:B-=C,k&&(B+=k);const U=G=>{b(),G?(M("retrying to scroll to",{location:T},sn.DEBUG),ze(m,T)):(ze(g,!0),M("list did not change, scroll successful",{},sn.DEBUG))};if(b(),D==="smooth"){let G=!1;x=lt(t,H=>{G=G||H}),h=Fn(u,()=>{U(G)})}else h=Fn(de(t,cL(150)),U);return v=setTimeout(()=>{b()},1200),ze(l,!0),M("scrolling from index to",{behavior:D,index:_,top:B},sn.DEBUG),{behavior:D,top:B}})),c),{scrollTargetReached:g,scrollToIndex:m,topListHeight:y}},St(lr,tn,Jr),{singleton:!0});function cL(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return r=>{r&&(t(!0),clearTimeout(n))}}}function Om(e,t){e==0?t():requestAnimationFrame(()=>{Om(e-1,t)})}function jm(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const aa=Je(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:r},{scrollTargetReached:o,scrollToIndex:i},{didMount:s}])=>{const a=he(!0),l=he(0),c=he(!0);return Re(de(s,He(l),Oe(([u,d])=>!!d),qn(!1)),a),Re(de(s,He(l),Oe(([u,d])=>!!d),qn(!1)),c),lt(de(_t(t,s),He(a,n,e,c),Oe(([[,u],d,{sizeTree:f},m,g])=>u&&(!ht(f)||Cm(m))&&!d&&!g),He(l)),([,u])=>{Fn(o,()=>{ze(c,!0)}),Om(4,()=>{Fn(r,()=>{ze(a,!0)}),ze(i,u)})}),{initialItemFinalLocationReached:c,initialTopMostItemIndex:l,scrolledToInitialItem:a}},St(lr,tn,sa,eo),{singleton:!0});function DT(e,t){return Math.abs(e-t)<1.01}const Fs="up",hs="down",uL="none",dL={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},fL=0,la=Je(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:r,scrollTop:o,viewportHeight:i}])=>{const s=he(!1),a=he(!0),l=Ye(),c=Ye(),u=he(4),d=he(fL),f=Zt(de($f(de(Pe(o),To(1),qn(!0)),de(Pe(o),To(1),qn(!1),fx(100))),bt()),!1),m=Zt(de($f(de(n,qn(!0)),de(n,qn(!1),fx(200))),bt()),!1);Re(de(_t(Pe(o),Pe(d)),be(([x,b])=>x<=b),bt()),a),Re(de(a,fr(50)),c);const g=gn(de(_t(r,Pe(i),Pe(t),Pe(e),Pe(u)),Zn((x,[{scrollHeight:b,scrollTop:T},E,R,w,C])=>{const I=T+E-b>-C,P={scrollHeight:b,scrollTop:T,viewportHeight:E};if(I){let j,L;return T>x.state.scrollTop?(j="SCROLLED_DOWN",L=x.state.scrollTop-T):(j="SIZE_DECREASED",L=x.state.scrollTop-T||x.scrollTopDelta),{atBottom:!0,atBottomBecause:j,scrollTopDelta:L,state:P}}let M;return P.scrollHeight>x.state.scrollHeight?M="SIZE_INCREASED":E<x.state.viewportHeight?M="VIEWPORT_HEIGHT_DECREASING":T<x.state.scrollTop?M="SCROLLING_UPWARDS":M="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:M,state:P}},dL),bt((x,b)=>x&&x.atBottom===b.atBottom))),y=Zt(de(r,Zn((x,{scrollHeight:b,scrollTop:T,viewportHeight:E})=>{if(DT(x.scrollHeight,b))return{changed:!1,jump:0,scrollHeight:b,scrollTop:T};{const R=b-(T+E)<1;return x.scrollTop!==T&&R?{changed:!0,jump:x.scrollTop-T,scrollHeight:b,scrollTop:T}:{changed:!0,jump:0,scrollHeight:b,scrollTop:T}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Oe(x=>x.changed),be(x=>x.jump)),0);Re(de(g,be(x=>x.atBottom)),s),Re(de(s,fr(50)),l);const h=he(hs);Re(de(r,be(({scrollTop:x})=>x),bt(),Zn((x,b)=>Et(m)?{direction:x.direction,prevScrollTop:b}:{direction:b<x.prevScrollTop?Fs:hs,prevScrollTop:b},{direction:hs,prevScrollTop:0}),be(x=>x.direction)),h),Re(de(r,fr(50),qn(uL)),h);const v=he(0);return Re(de(f,Oe(x=>!x),qn(0)),v),Re(de(o,fr(100),He(f),Oe(([x,b])=>b),Zn(([x,b],[T])=>[b,T],[0,0]),be(([x,b])=>b-x)),v),{atBottomState:g,atBottomStateChange:l,atBottomThreshold:u,atTopStateChange:c,atTopThreshold:d,isAtBottom:s,isAtTop:a,isScrolling:f,lastJumpDueToItemResize:y,scrollDirection:h,scrollVelocity:v}},St(tn)),Ls="top",Vs="bottom",gx="none";function yx(e,t,n){return typeof e=="number"?n===Fs&&t===Ls||n===hs&&t===Vs?e:0:n===Fs?t===Ls?e.main:e.reverse:t===Vs?e.main:e.reverse}function vx(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const Dm=Je(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:r,viewportHeight:o}])=>{const i=Ye(),s=he(0),a=he(0),l=he(0),c=Zt(de(_t(Pe(r),Pe(o),Pe(n),Pe(i,Ns),Pe(l),Pe(s),Pe(t),Pe(e),Pe(a)),be(([u,d,f,[m,g],y,h,v,x,b])=>{const T=u-x,E=h+v,R=Math.max(f-T,0);let w=gx;const C=vx(b,Ls),I=vx(b,Vs);return m-=x,m+=f+v,g+=f+v,g-=x,m>u+E-C&&(w=Fs),g<u-R+d+I&&(w=hs),w!==gx?[Math.max(T-f-yx(y,Ls,w)-C,0),T-R-v+d+yx(y,Vs,w)+I]:null}),Oe(u=>u!=null),bt(Ns)),[0,0]);return{increaseViewportBy:a,listBoundary:i,overscan:l,topListHeight:s,visibleRange:c}},St(tn),{singleton:!0});function pL(e,t,n){if(Ac(t)){const r=AT(e,t);return[{index:$n(t.groupOffsetTree,r)[0],offset:0,size:0},{data:n?.[0],index:r,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const wd={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function rl(e,t,n,r,o,i){const{lastIndex:s,lastOffset:a,lastSize:l}=o;let c=0,u=0;if(e.length>0){c=e[0].offset;const y=e[e.length-1];u=y.offset+y.size}const d=n-s,f=a+d*l+(d-1)*r,m=c,g=f-u;return{bottom:u,firstItemIndex:i,items:xx(e,o,i),offsetBottom:g,offsetTop:c,top:m,topItems:xx(t,o,i),topListHeight:t.reduce((y,h)=>h.size+y,0),totalCount:n}}function MT(e,t,n,r,o,i){let s=0;if(n.groupIndices.length>0)for(const u of n.groupIndices){if(u-s>=e)break;s++}const a=e+s,l=jm(t,a),c=Array.from({length:a}).map((u,d)=>({data:i[d+l],index:d+l,offset:0,size:0}));return rl(c,[],a,o,n,r)}function xx(e,t,n){if(e.length===0)return[];if(!Ac(t))return e.map(c=>({...c,index:c.index+n,originalIndex:c.index}));const r=e[0].index,o=e[e.length-1].index,i=[],s=ci(t.groupOffsetTree,r,o);let a,l=0;for(const c of e){(!a||a.end<c.index)&&(a=s.shift(),l=t.groupIndices.indexOf(a.start));let u;c.index===a.start?u={index:l,type:"group"}:u={groupIndex:l,index:c.index-(l+1)+n},i.push({...u,data:c.data,offset:c.offset,originalIndex:c.index,size:c.size})}return i}function bx(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const Po=Je(([{data:e,firstItemIndex:t,gap:n,sizes:r,totalCount:o},i,{listBoundary:s,topListHeight:a,visibleRange:l},{initialTopMostItemIndex:c,scrolledToInitialItem:u},{topListHeight:d},f,{didMount:m},{recalcInProgress:g}])=>{const y=he([]),h=he(0),v=Ye(),x=he(0);Re(i.topItemsIndexes,y);const b=Zt(de(_t(m,g,Pe(l,Ns),Pe(o),Pe(r),Pe(c),u,Pe(y),Pe(t),Pe(n),Pe(x),e),Oe(([w,C,,I,,,,,,,,P])=>{const M=P&&P.length!==I;return w&&!C&&!M}),be(([,,[w,C],I,P,M,j,L,O,N,V,D])=>{var k,F,_,B;const U=P,{offsetTree:G,sizeTree:H}=U,ee=Et(h);if(I===0)return{...wd,totalCount:I};if(w===0&&C===0)return ee===0?{...wd,totalCount:I}:MT(ee,M,P,O,N,D||[]);if(ht(H))return ee>0?null:rl(pL(jm(M,I),U,D),[],I,N,U,O);const ie=[];if(L.length>0){const se=L[0],le=L[L.length-1];let Q=0;for(const ce of ci(H,se,le)){const re=ce.value,pe=Math.max(ce.start,se),oe=Math.min(ce.end,le);for(let ae=pe;ae<=oe;ae++)ie.push({data:D?.[ae],index:ae,offset:Q,size:re}),Q+=re}}if(!j)return rl([],ie,I,N,U,O);const te=L.length>0?L[L.length-1]+1:0,q=tL(G,w,C,te);if(q.length===0)return null;const Y=I-1,Z=Ic([],se=>{for(const le of q){const Q=le.value;let ce=Q.offset,re=le.start;const pe=Q.size;if(Q.offset<w){re+=Math.floor((w-Q.offset+N)/(pe+N));const ae=re-le.start;ce+=ae*pe+ae*N}re<te&&(ce+=(te-re)*pe,re=te);const oe=Math.min(le.end,Y);for(let ae=re;ae<=oe&&!(ce>=C);ae++)se.push({data:D?.[ae],index:ae,offset:ce,size:pe}),ce+=pe+N}}),fe=bx(V,Ls),z=bx(V,Vs);if(Z.length>0&&(fe>0||z>0)){const se=Z[0],le=Z[Z.length-1];if(fe>0&&se.index>te){const Q=Math.min(fe,se.index-te),ce=[];let re=se.offset;for(let pe=se.index-1;pe>=se.index-Q;pe--){const oe=(F=(k=ci(H,pe,pe)[0])==null?void 0:k.value)!=null?F:se.size;re-=oe+N,ce.unshift({data:D?.[pe],index:pe,offset:re,size:oe})}Z.unshift(...ce)}if(z>0&&le.index<Y){const Q=Math.min(z,Y-le.index);let ce=le.offset+le.size+N;for(let re=le.index+1;re<=le.index+Q;re++){const pe=(B=(_=ci(H,re,re)[0])==null?void 0:_.value)!=null?B:le.size;Z.push({data:D?.[re],index:re,offset:ce,size:pe}),ce+=pe+N}}}return rl(Z,ie,I,N,U,O)}),Oe(w=>w!==null),bt()),wd);Re(de(e,Oe(Cm),be(w=>w?.length)),o),Re(de(b,be(w=>w.topListHeight)),d),Re(d,a),Re(de(b,be(w=>[w.top,w.bottom])),s),Re(de(b,be(w=>w.items)),v);const T=gn(de(b,Oe(({items:w})=>w.length>0),He(o,e),Oe(([{items:w},C])=>w[w.length-1].originalIndex===C-1),be(([,w,C])=>[w-1,C]),bt(Ns),be(([w])=>w))),E=gn(de(b,fr(200),Oe(({items:w,topItems:C})=>w.length>0&&w[0].originalIndex===C.length),be(({items:w})=>w[0].index),bt())),R=gn(de(b,Oe(({items:w})=>w.length>0),be(({items:w})=>{let C=0,I=w.length-1;for(;w[C].type==="group"&&C<I;)C++;for(;w[I].type==="group"&&I>C;)I--;return{endIndex:w[I].index,startIndex:w[C].index}}),bt(RT)));return{endReached:T,initialItemCount:h,itemsRendered:v,listState:b,minOverscanItemCount:x,rangeChanged:R,startReached:E,topItemsIndexes:y,...f}},St(lr,OT,Dm,aa,sa,la,eo,Am),{singleton:!0}),NT=Je(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:r},{listState:o}])=>{const i=Ye(),s=Zt(de(_t(n,e,r,t,o),be(([a,l,c,u,d])=>a+l+c+u+d.offsetBottom+d.bottom)),0);return Re(Pe(s),i),{totalListHeight:s,totalListHeightChanged:i}},St(tn,Po),{singleton:!0}),mL=Je(([{viewportHeight:e},{totalListHeight:t}])=>{const n=he(!1),r=Zt(de(_t(n,e,t),Oe(([o])=>o),be(([,o,i])=>Math.max(0,o-i)),fr(0),bt()),0);return{alignToBottom:n,paddingTopAddition:r}},St(tn,NT),{singleton:!0}),_T=Je(()=>({context:he(null)})),hL=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:r,...o},viewportBottom:i,viewportTop:s})=>t<s?{...o,align:n??"start",behavior:r}:e>i?{...o,align:n??"end",behavior:r}:null,FT=Je(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:o,headerHeight:i,scrollingInProgress:s,scrollTop:a,viewportHeight:l},{scrollToIndex:c}])=>{const u=Ye();return Re(de(u,He(t,l,n,i,o,r,a),He(e),be(([[d,f,m,g,y,h,v,x],b])=>{const{align:T,behavior:E,calculateViewLocation:R=hL,done:w,...C}=d,I=PT(d,f,g-1),P=_s(I,f.offsetTree,b)+y+h,M=P+$n(f.sizeTree,I)[1],j=x+h,L=x+m-v,O=R({itemBottom:M,itemTop:P,locationParams:{align:T,behavior:E,...C},viewportBottom:L,viewportTop:j});return O?w&&Fn(de(s,Oe(N=>!N),To(Et(s)?1:2)),w):w?.(),O}),Oe(d=>d!==null)),c),{scrollIntoView:u}},St(lr,tn,sa,Po,Jr),{singleton:!0});function wx(e){return e?e==="smooth"?"smooth":"auto":!1}const gL=(e,t)=>typeof e=="function"?wx(e(t)):t&&wx(e),yL=Je(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:r},{atBottomState:o,isAtBottom:i},{scrollToIndex:s},{scrolledToInitialItem:a},{didMount:l,propsReady:c},{log:u},{scrollingInProgress:d},{context:f},{scrollIntoView:m}])=>{const g=he(!1),y=Ye();let h=null;function v(E){ze(s,{align:"end",behavior:E,index:"LAST"})}lt(de(_t(de(Pe(t),To(1)),l),He(Pe(g),i,a,d),be(([[E,R],w,C,I,P])=>{let M=R&&I,j="auto";return M&&(j=gL(w,C||P),M=M&&!!j),{followOutputBehavior:j,shouldFollow:M,totalCount:E}}),Oe(({shouldFollow:E})=>E)),({followOutputBehavior:E,totalCount:R})=>{h&&(h(),h=null),Et(n)?requestAnimationFrame(()=>{Et(u)("following output to ",{totalCount:R},sn.DEBUG),v(E)}):h=Fn(e,()=>{Et(u)("following output to ",{totalCount:R},sn.DEBUG),v(E),h=null})});function x(E){const R=Fn(o,w=>{E&&!w.atBottom&&w.notAtBottomBecause==="SIZE_INCREASED"&&!h&&(Et(u)("scrolling to bottom due to increased size",{},sn.DEBUG),v("auto"))});setTimeout(R,100)}lt(de(_t(Pe(g),t,c),Oe(([E,,R])=>E&&R),Zn(({value:E},[,R])=>({refreshed:E===R,value:R}),{refreshed:!1,value:0}),Oe(({refreshed:E})=>E),He(g,t)),([,E])=>{Et(a)&&x(E!==!1)}),lt(y,()=>{x(Et(g)!==!1)}),lt(_t(Pe(g),o),([E,R])=>{E&&!R.atBottom&&R.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&v("auto")});const b=he(null),T=Ye();return Re($f(de(Pe(r),be(E=>{var R;return(R=E?.length)!=null?R:0})),de(Pe(t))),T),lt(de(_t(de(T,To(1)),l),He(Pe(b),a,d,f),be(([[E,R],w,C,I,P])=>R&&C&&w?.({context:P,totalCount:E,scrollingInProgress:I})),Oe(E=>!!E),fr(0)),E=>{h&&(h(),h=null),Et(n)?requestAnimationFrame(()=>{Et(u)("scrolling into view",{}),ze(m,E)}):h=Fn(e,()=>{Et(u)("scrolling into view",{}),ze(m,E),h=null})}),{autoscrollToBottom:y,followOutput:g,scrollIntoViewOnChange:b}},St(lr,la,sa,aa,eo,Jr,tn,_T,FT)),vL=Je(([{data:e,firstItemIndex:t,gap:n,sizes:r},{initialTopMostItemIndex:o},{initialItemCount:i,listState:s},{didMount:a}])=>(Re(de(a,He(i),Oe(([,l])=>l!==0),He(o,r,t,n,e),be(([[,l],c,u,d,f,m=[]])=>MT(l,c,u,d,f,m))),s),{}),St(lr,aa,Po,eo),{singleton:!0}),xL=Je(([{didMount:e},{scrollTo:t},{listState:n}])=>{const r=he(0);return lt(de(e,He(r),Oe(([,o])=>o!==0),be(([,o])=>({top:o}))),o=>{Fn(de(n,To(1),Oe(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{ze(t,o)})})}),{initialScrollTop:r}},St(eo,tn,Po),{singleton:!0}),LT=Je(([{scrollVelocity:e}])=>{const t=he(!1),n=Ye(),r=he(!1);return Re(de(e,He(r,t,n),Oe(([o,i])=>!!i),be(([o,i,s,a])=>{const{enter:l,exit:c}=i;if(s){if(c(o,a))return!1}else if(l(o,a))return!0;return s}),bt()),t),lt(de(_t(t,e,n),He(r)),([[o,i,s],a])=>{o&&a&&a.change&&a.change(i,s)}),{isSeeking:t,scrollSeekConfiguration:r,scrollSeekRangeChanged:n,scrollVelocity:e}},St(la),{singleton:!0}),Mm=Je(([{scrollContainerState:e,scrollTo:t}])=>{const n=Ye(),r=Ye(),o=Ye(),i=he(!1),s=he(void 0);return Re(de(_t(n,r),be(([{scrollHeight:a,scrollTop:l,viewportHeight:c},{offsetTop:u}])=>({scrollHeight:a,scrollTop:Math.max(0,l-u),viewportHeight:c}))),e),Re(de(t,He(r),be(([a,{offsetTop:l}])=>({...a,top:a.top+l}))),o),{customScrollParent:s,useWindowScroll:i,windowScrollContainerState:n,windowScrollTo:o,windowViewportRect:r}},St(tn)),bL=Je(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:r},{initialTopMostItemIndex:o},{didMount:i},{useWindowScroll:s,windowScrollContainerState:a,windowViewportRect:l}])=>{const c=Ye(),u=he(void 0),d=he(null),f=he(null);return Re(a,d),Re(l,f),lt(de(c,He(t,r,s,d,f,n)),([m,g,y,h,v,x,b])=>{const T=rL(g.sizeTree);h&&v!==null&&x!==null&&(y=v.scrollTop-x.offsetTop),y-=b,m({ranges:T,scrollTop:y})}),Re(de(u,Oe(Cm),be(wL)),o),Re(de(i,He(u),Oe(([,m])=>m!==void 0),bt(),be(([,m])=>m.ranges)),e),{getState:c,restoreStateFrom:u}},St(lr,tn,aa,eo,Mm));function wL(e){return{align:"start",index:0,offset:e.scrollTop}}const SL=Je(([{topItemsIndexes:e}])=>{const t=he(0);return Re(de(t,Oe(n=>n>=0),be(n=>Array.from({length:n}).map((r,o)=>o))),e),{topItemCount:t}},St(Po));function VT(e){let t=!1,n;return(()=>(t||(t=!0,n=e()),n))}const TL=VT(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),EL=Je(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:r},{isAtBottom:o,isScrolling:i,lastJumpDueToItemResize:s,scrollDirection:a},{listState:l},{beforeUnshiftWith:c,gap:u,shiftWithOffset:d,sizes:f},{log:m},{recalcInProgress:g}])=>{const y=gn(de(l,He(s),Zn(([,v,x,b],[{bottom:T,items:E,offsetBottom:R,totalCount:w},C])=>{const I=T+R;let P=0;return x===w&&v.length>0&&E.length>0&&(E[0].originalIndex===0&&v[0].originalIndex===0||(P=I-b,P!==0&&(P+=C))),[P,E,w,I]},[0,[],0,0]),Oe(([v])=>v!==0),He(r,a,n,o,m,g),Oe(([,v,x,b,,,T])=>!T&&!b&&v!==0&&x===Fs),be(([[v],,,,,x])=>(x("Upward scrolling compensation",{amount:v},sn.DEBUG),v))));function h(v){v>0?(ze(t,{behavior:"auto",top:-v}),ze(e,0)):(ze(e,0),ze(t,{behavior:"auto",top:-v}))}return lt(de(y,He(e,i)),([v,x,b])=>{b&&TL()?ze(e,x-v):h(-v)}),lt(de(_t(Zt(i,!1),e,g),Oe(([v,x,b])=>!v&&!b&&x!==0),be(([v,x])=>x),fr(1)),h),Re(de(d,be(v=>({top:-v}))),t),lt(de(c,He(f,u),be(([v,{groupIndices:x,lastSize:b,sizeTree:T},E])=>{function R(w){return w*(b+E)}if(x.length===0)return R(v);{let w=0;const C=Ms(T,0);let I=0,P=0;for(;I<v;){I++,w+=C;let M=x.length===P+1?1/0:x[P+1]-x[P]-1;I+M>v&&(w-=C,M=v-I+1),I+=M,w+=R(M),P++}return w}})),v=>{ze(e,v),requestAnimationFrame(()=>{ze(t,{top:v}),requestAnimationFrame(()=>{ze(e,0),ze(g,!1)})})}),{deviation:e}},St(tn,la,Po,lr,Jr,Am)),CL=Je(([e,t,n,r,o,i,s,a,l,c,u])=>({...e,...t,...n,...r,...o,...i,...s,...a,...l,...c,...u}),St(Dm,vL,eo,LT,NT,xL,mL,Mm,FT,Jr,_T)),$T=Je(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:r,fixedGroupSize:o,gap:i,groupIndices:s,heightEstimates:a,itemSize:l,sizeRanges:c,sizes:u,statefulTotalCount:d,totalCount:f,trackItemSizes:m},{initialItemFinalLocationReached:g,initialTopMostItemIndex:y,scrolledToInitialItem:h},v,x,b,T,{scrollToIndex:E},R,{topItemCount:w},{groupCounts:C},I])=>{const{listState:P,minOverscanItemCount:M,topItemsIndexes:j,rangeChanged:L,...O}=T;return Re(L,I.scrollSeekRangeChanged),Re(de(I.windowViewportRect,be(N=>N.visibleHeight)),v.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:r,fixedGroupHeight:o,gap:i,groupCounts:C,heightEstimates:a,initialItemFinalLocationReached:g,initialTopMostItemIndex:y,scrolledToInitialItem:h,sizeRanges:c,topItemCount:w,topItemsIndexes:j,totalCount:f,...b,groupIndices:s,itemSize:l,listState:P,minOverscanItemCount:M,scrollToIndex:E,statefulTotalCount:d,trackItemSizes:m,rangeChanged:L,...O,...I,...v,sizes:u,...x}},St(lr,aa,tn,bL,yL,Po,sa,EL,SL,OT,CL));function kL(e,t){const n={},r={};let o=0;const i=e.length;for(;o<i;)r[e[o]]=1,o+=1;for(const s in t)Object.hasOwn(r,s)||(n[s]=t[s]);return n}const Da=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Nm(e,t,n){const r=Object.keys(t.required||{}),o=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),s=Object.keys(t.events||{}),a=S.createContext({});function l(h,v){h.propsReady&&ze(h.propsReady,!1);for(const x of r){const b=h[t.required[x]];ze(b,v[x])}for(const x of o)if(x in v){const b=h[t.optional[x]];ze(b,v[x])}h.propsReady&&ze(h.propsReady,!0)}function c(h){return i.reduce((v,x)=>(v[x]=b=>{const T=h[t.methods[x]];ze(T,b)},v),{})}function u(h){return s.reduce((v,x)=>(v[x]=HF(h[t.events[x]]),v),{})}const d=S.forwardRef((h,v)=>{const{children:x,...b}=h,[T]=S.useState(()=>Ic(qF(e),w=>{l(w,b)})),[E]=S.useState(dx(u,T));Da(()=>{for(const w of s)w in b&&lt(E[w],b[w]);return()=>{Object.values(E).map(km)}},[b,E,T]),Da(()=>{l(T,b)}),S.useImperativeHandle(v,ux(c(T)));const R=n;return p.jsx(a.Provider,{value:T,children:n?p.jsx(R,{...kL([...r,...o,...s],b),children:x}):x})}),f=h=>{const v=S.useContext(a);return S.useCallback(x=>{ze(v[h],x)},[v,h])},m=h=>{const v=S.useContext(a)[h],x=S.useCallback(b=>lt(v,b),[v]);return S.useSyncExternalStore(x,()=>Et(v),()=>Et(v))},g=h=>{const v=S.useContext(a)[h],[x,b]=S.useState(dx(Et,v));return Da(()=>lt(v,T=>{T!==x&&b(ux(T))}),[v,x]),x},y=S.version.startsWith("18")?m:g;return{Component:d,useEmitter:(h,v)=>{const x=S.useContext(a)[h];Da(()=>lt(x,v),[v,x])},useEmitterValue:y,usePublisher:f}}const Pc=S.createContext(void 0),zT=S.createContext(void 0),BT=typeof document<"u"?S.useLayoutEffect:S.useEffect;function Sd(e){return"self"in e}function RL(e){return"body"in e}function HT(e,t,n,r=zi,o,i){const s=S.useRef(null),a=S.useRef(null),l=S.useRef(null),c=S.useCallback(f=>{let m,g,y;const h=f.target;if(RL(h)||Sd(h)){const x=Sd(h)?h:h.defaultView;y=i?x.scrollX:x.scrollY,m=i?x.document.documentElement.scrollWidth:x.document.documentElement.scrollHeight,g=i?x.innerWidth:x.innerHeight}else y=i?h.scrollLeft:h.scrollTop,m=i?h.scrollWidth:h.scrollHeight,g=i?h.offsetWidth:h.offsetHeight;const v=()=>{e({scrollHeight:m,scrollTop:Math.max(y,0),viewportHeight:g})};f.suppressFlushSync?v():bs.flushSync(v),a.current!==null&&(y===a.current||y<=0||y===m-g)&&(a.current=null,t(!0),l.current&&(clearTimeout(l.current),l.current=null))},[e,t,i]);S.useEffect(()=>{const f=o||s.current;return r(o||s.current),c({suppressFlushSync:!0,target:f}),f.addEventListener("scroll",c,{passive:!0}),()=>{r(null),f.removeEventListener("scroll",c)}},[s,c,n,r,o]);function u(f){const m=s.current;if(!m||(i?"offsetWidth"in m&&m.offsetWidth===0:"offsetHeight"in m&&m.offsetHeight===0))return;const g=f.behavior==="smooth";let y,h,v;Sd(m)?(h=Math.max(zn(m.document.documentElement,i?"width":"height"),i?m.document.documentElement.scrollWidth:m.document.documentElement.scrollHeight),y=i?m.innerWidth:m.innerHeight,v=i?window.scrollX:window.scrollY):(h=m[i?"scrollWidth":"scrollHeight"],y=zn(m,i?"width":"height"),v=m[i?"scrollLeft":"scrollTop"]);const x=h-y;if(f.top=Math.ceil(Math.max(Math.min(x,f.top),0)),DT(y,h)||f.top===v){e({scrollHeight:h,scrollTop:v,viewportHeight:y}),g&&t(!0);return}g?(a.current=f.top,l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,a.current=null,t(!0)},1e3)):a.current=null,i&&(f={behavior:f.behavior,left:f.top}),m.scrollTo(f)}function d(f){i&&(f={behavior:f.behavior,left:f.top}),s.current.scrollBy(f)}return{scrollByCallback:d,scrollerRef:s,scrollToCallback:u}}const Td="-webkit-sticky",Sx="sticky",_m=VT(()=>{if(typeof document>"u")return Sx;const e=document.createElement("div");return e.style.position=Td,e.style.position===Td?Td:Sx});function Fm(e){return e}const IL=Je(()=>{const e=he(a=>`Item ${a}`),t=he(a=>`Group ${a}`),n=he({}),r=he(Fm),o=he("div"),i=he(zi),s=(a,l=null)=>Zt(de(n,be(c=>c[a]),bt()),l);return{components:n,computeItemKey:r,EmptyPlaceholder:s("EmptyPlaceholder"),FooterComponent:s("Footer"),GroupComponent:s("Group","div"),groupContent:t,HeaderComponent:s("Header"),HeaderFooterTag:o,ItemComponent:s("Item","div"),itemContent:e,ListComponent:s("List","div"),ScrollerComponent:s("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:s("ScrollSeekPlaceholder"),TopItemListComponent:s("TopItemList")}}),AL=Je(([e,t])=>({...e,...t}),St($T,IL)),PL=({height:e})=>p.jsx("div",{style:{height:e}}),OL={overflowAnchor:"none",position:_m(),zIndex:1},WT={overflowAnchor:"none"},jL={...WT,display:"inline-block",height:"100%"},Tx=S.memo(function({showTopList:e=!1}){const t=Me("listState"),n=En("sizeRanges"),r=Me("useWindowScroll"),o=Me("customScrollParent"),i=En("windowScrollContainerState"),s=En("scrollContainerState"),a=o||r?i:s,l=Me("itemContent"),c=Me("context"),u=Me("groupContent"),d=Me("trackItemSizes"),f=Me("itemSize"),m=Me("log"),g=En("gap"),y=Me("horizontalDirection"),{callbackRef:h}=wT(n,f,d,e?zi:a,m,g,o,y,Me("skipAnimationFrameInResizeObserver")),[v,x]=S.useState(0);$m("deviation",O=>{v!==O&&x(O)});const b=Me("EmptyPlaceholder"),T=Me("ScrollSeekPlaceholder")||PL,E=Me("ListComponent"),R=Me("ItemComponent"),w=Me("GroupComponent"),C=Me("computeItemKey"),I=Me("isSeeking"),P=Me("groupIndices").length>0,M=Me("alignToBottom"),j=Me("initialItemFinalLocationReached"),L=e?{}:{boxSizing:"border-box",...y?{display:"inline-block",height:"100%",marginLeft:v!==0?v:M?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:v!==0?v:M?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...j?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&b?p.jsx(b,{...wt(b,c)}):p.jsx(E,{...wt(E,c),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:h,style:L,children:(e?t.topItems:t.items).map(O=>{const N=O.originalIndex,V=C(N+t.firstItemIndex,O.data,c);return I?S.createElement(T,{...wt(T,c),height:O.size,index:O.index,key:V,type:O.type||"item",...O.type==="group"?{}:{groupIndex:O.groupIndex}}):O.type==="group"?S.createElement(w,{...wt(w,c),"data-index":N,"data-item-index":O.index,"data-known-size":O.size,key:V,style:OL},u(O.index,c)):S.createElement(R,{...wt(R,c),...qT(R,O.data),"data-index":N,"data-item-group-index":O.groupIndex,"data-item-index":O.index,"data-known-size":O.size,key:V,style:y?jL:WT},P?l(O.index,O.groupIndex,O.data,c):l(O.index,O.data,c))})})}),DL={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},ML={outline:"none",overflowX:"auto",position:"relative"},Bi=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),NL={position:_m(),top:0,width:"100%",zIndex:1};function wt(e,t){if(typeof e!="string")return{context:t}}function qT(e,t){return{item:typeof e=="string"?void 0:t}}const _L=S.memo(function(){const e=Me("HeaderComponent"),t=En("headerHeight"),n=Me("HeaderFooterTag"),r=rr(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,Me("skipAnimationFrameInResizeObserver")),o=Me("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...wt(e,o)})}):null}),FL=S.memo(function(){const e=Me("FooterComponent"),t=En("footerHeight"),n=Me("HeaderFooterTag"),r=rr(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,Me("skipAnimationFrameInResizeObserver")),o=Me("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...wt(e,o)})}):null});function Lm({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...s}){const a=n("scrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("scrollerRef"),d=t("horizontalDirection")||!1,{scrollByCallback:f,scrollerRef:m,scrollToCallback:g}=HT(a,c,l,u,void 0,d);return e("scrollTo",g),e("scrollBy",f),p.jsx(l,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:m,style:{...d?ML:DL,...o},tabIndex:0,...s,...wt(l,i),children:r})})}function Vm({useEmitter:e,useEmitterValue:t,usePublisher:n}){return S.memo(function({children:r,style:o,context:i,...s}){const a=n("windowScrollContainerState"),l=t("ScrollerComponent"),c=n("smoothScrollTargetReached"),u=t("totalListHeight"),d=t("deviation"),f=t("customScrollParent"),m=S.useRef(null),g=t("scrollerRef"),{scrollByCallback:y,scrollerRef:h,scrollToCallback:v}=HT(a,c,l,g,f);return BT(()=>{var x;return h.current=f||((x=m.current)==null?void 0:x.ownerDocument.defaultView),()=>{h.current=null}},[h,f]),e("windowScrollTo",v),e("scrollBy",y),p.jsx(l,{ref:m,"data-virtuoso-scroller":!0,style:{position:"relative",...o,...u!==0?{height:u+d}:{}},...s,...wt(l,i),children:r})})}const LL=({children:e})=>{const t=S.useContext(Pc),n=En("viewportHeight"),r=En("fixedItemHeight"),o=Me("alignToBottom"),i=Me("horizontalDirection"),s=S.useMemo(()=>js(n,l=>zn(l,i?"width":"height")),[n,i]),a=rr(s,!0,Me("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),p.jsx("div",{"data-viewport-type":"element",ref:a,style:Bi(o),children:e})},VL=({children:e})=>{const t=S.useContext(Pc),n=En("windowViewportRect"),r=En("fixedItemHeight"),o=Me("customScrollParent"),i=Im(n,o,Me("skipAnimationFrameInResizeObserver")),s=Me("alignToBottom");return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),p.jsx("div",{"data-viewport-type":"window",ref:i,style:Bi(s),children:e})},$L=({children:e})=>{const t=Me("TopItemListComponent")||"div",n=Me("headerHeight"),r={...NL,marginTop:`${n}px`},o=Me("context");return p.jsx(t,{style:r,...wt(t,o),children:e})},zL=S.memo(function(e){const t=Me("useWindowScroll"),n=Me("topItemsIndexes").length>0,r=Me("customScrollParent"),o=Me("context");return p.jsxs(r||t?WL:HL,{...e,context:o,children:[n&&p.jsx($L,{children:p.jsx(Tx,{showTopList:!0})}),p.jsxs(r||t?VL:LL,{children:[p.jsx(_L,{}),p.jsx(Tx,{}),p.jsx(FL,{})]})]})}),{Component:BL,useEmitter:$m,useEmitterValue:Me,usePublisher:En}=Nm(AL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},zL),HL=Lm({useEmitter:$m,useEmitterValue:Me,usePublisher:En}),WL=Vm({useEmitter:$m,useEmitterValue:Me,usePublisher:En}),zm=BL,qL=Je(()=>{const e=he(c=>p.jsxs("td",{children:["Item $",c]})),t=he(null),n=he(c=>p.jsxs("td",{colSpan:1e3,children:["Group ",c]})),r=he(null),o=he(null),i=he({}),s=he(Fm),a=he(zi),l=(c,u=null)=>Zt(de(i,be(d=>d[c]),bt()),u);return{components:i,computeItemKey:s,context:t,EmptyPlaceholder:l("EmptyPlaceholder"),FillerRow:l("FillerRow"),fixedFooterContent:o,fixedHeaderContent:r,itemContent:e,groupContent:n,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TableBodyComponent:l("TableBody","tbody"),TableComponent:l("Table","table"),TableFooterComponent:l("TableFoot","tfoot"),TableHeadComponent:l("TableHead","thead"),TableRowComponent:l("TableRow","tr"),GroupComponent:l("Group","tr")}}),UL=Je(([e,t])=>({...e,...t}),St($T,qL)),GL=({height:e})=>p.jsx("tr",{children:p.jsx("td",{style:{height:e}})}),YL=({height:e})=>p.jsx("tr",{children:p.jsx("td",{style:{border:0,height:e,padding:0}})}),KL={overflowAnchor:"none"},Ex={position:_m(),zIndex:2,overflowAnchor:"none"},Cx=S.memo(function({showTopList:e=!1}){const t=$e("listState"),n=$e("computeItemKey"),r=$e("firstItemIndex"),o=$e("context"),i=$e("isSeeking"),s=$e("fixedHeaderHeight"),a=$e("groupIndices").length>0,l=$e("itemContent"),c=$e("groupContent"),u=$e("ScrollSeekPlaceholder")||GL,d=$e("GroupComponent"),f=$e("TableRowComponent"),m=(e?t.topItems:[]).reduce((y,h,v)=>(v===0?y.push(h.size):y.push(y[v-1]+h.size),y),[]),g=(e?t.topItems:t.items).map(y=>{const h=y.originalIndex,v=n(h+r,y.data,o),x=e?h===0?0:m[h-1]:0;return i?S.createElement(u,{...wt(u,o),height:y.size,index:y.index,key:v,type:y.type||"item"}):y.type==="group"?S.createElement(d,{...wt(d,o),"data-index":h,"data-item-index":y.index,"data-known-size":y.size,key:v,style:{...Ex,top:s}},c(y.index,o)):S.createElement(f,{...wt(f,o),...qT(f,y.data),"data-index":h,"data-item-index":y.index,"data-known-size":y.size,"data-item-group-index":y.groupIndex,key:v,style:e?{...Ex,top:s+x}:KL},a?l(y.index,y.groupIndex,y.data,o):l(y.index,y.data,o))});return p.jsx(p.Fragment,{children:g})}),ZL=S.memo(function(){const e=$e("listState"),t=$e("topItemsIndexes").length>0,n=Ln("sizeRanges"),r=$e("useWindowScroll"),o=$e("customScrollParent"),i=Ln("windowScrollContainerState"),s=Ln("scrollContainerState"),a=o||r?i:s,l=$e("trackItemSizes"),c=$e("itemSize"),u=$e("log"),{callbackRef:d,ref:f}=wT(n,c,l,a,u,void 0,o,!1,$e("skipAnimationFrameInResizeObserver")),[m,g]=S.useState(0);Bm("deviation",P=>{m!==P&&(f.current.style.marginTop=`${P}px`,g(P))});const y=$e("EmptyPlaceholder"),h=$e("FillerRow")||YL,v=$e("TableBodyComponent"),x=$e("paddingTopAddition"),b=$e("statefulTotalCount"),T=$e("context");if(b===0&&y)return p.jsx(y,{...wt(y,T)});const E=(t?e.topItems:[]).reduce((P,M)=>P+M.size,0),R=e.offsetTop+x+m-E,w=e.offsetBottom,C=R>0?p.jsx(h,{context:T,height:R},"padding-top"):null,I=w>0?p.jsx(h,{context:T,height:w},"padding-bottom"):null;return p.jsxs(v,{"data-testid":"virtuoso-item-list",ref:d,...wt(v,T),children:[C,t&&p.jsx(Cx,{showTopList:!0}),p.jsx(Cx,{}),I]})}),XL=({children:e})=>{const t=S.useContext(Pc),n=Ln("viewportHeight"),r=Ln("fixedItemHeight"),o=rr(S.useMemo(()=>js(n,i=>zn(i,"height")),[n]),!0,$e("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(n(t.viewportHeight),r(t.itemHeight))},[t,n,r]),p.jsx("div",{"data-viewport-type":"element",ref:o,style:Bi(!1),children:e})},QL=({children:e})=>{const t=S.useContext(Pc),n=Ln("windowViewportRect"),r=Ln("fixedItemHeight"),o=$e("customScrollParent"),i=Im(n,o,$e("skipAnimationFrameInResizeObserver"));return S.useEffect(()=>{t&&(r(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,r]),p.jsx("div",{"data-viewport-type":"window",ref:i,style:Bi(!1),children:e})},JL=S.memo(function(e){const t=$e("useWindowScroll"),n=$e("customScrollParent"),r=Ln("fixedHeaderHeight"),o=Ln("fixedFooterHeight"),i=$e("fixedHeaderContent"),s=$e("fixedFooterContent"),a=$e("context"),l=rr(S.useMemo(()=>js(r,v=>zn(v,"height")),[r]),!0,$e("skipAnimationFrameInResizeObserver")),c=rr(S.useMemo(()=>js(o,v=>zn(v,"height")),[o]),!0,$e("skipAnimationFrameInResizeObserver")),u=n||t?nV:tV,d=n||t?QL:XL,f=$e("TableComponent"),m=$e("TableHeadComponent"),g=$e("TableFooterComponent"),y=i?p.jsx(m,{ref:l,style:{position:"sticky",top:0,zIndex:2},...wt(m,a),children:i()},"TableHead"):null,h=s?p.jsx(g,{ref:c,style:{bottom:0,position:"sticky",zIndex:1},...wt(g,a),children:s()},"TableFoot"):null;return p.jsx(u,{...e,...wt(u,a),children:p.jsx(d,{children:p.jsxs(f,{style:{borderSpacing:0,overflowAnchor:"none"},...wt(f,a),children:[y,p.jsx(ZL,{},"TableBody"),h]})})})}),{Component:eV,useEmitter:Bm,useEmitterValue:$e,usePublisher:Ln}=Nm(UL,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},JL),tV=Lm({useEmitter:Bm,useEmitterValue:$e,usePublisher:Ln}),nV=Vm({useEmitter:Bm,useEmitterValue:$e,usePublisher:Ln}),rV=eV,kx={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},oV={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:Rx,floor:jl,max:gs,min:Ed,round:Ix}=Math;function Ax(e,t,n){return Array.from({length:t-e+1}).map((r,o)=>({data:n===null?null:n[o+e],index:o+e}))}function iV(e){return{...oV,items:e}}function Ma(e,t){return e&&e.width===t.width&&e.height===t.height}function sV(e,t){return e&&e.column===t.column&&e.row===t.row}const aV=Je(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:r},{footerHeight:o,headerHeight:i,scrollBy:s,scrollContainerState:a,scrollTo:l,scrollTop:c,smoothScrollTargetReached:u,viewportHeight:d},f,m,{didMount:g,propsReady:y},{customScrollParent:h,useWindowScroll:v,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:T},E])=>{const R=he(0),w=he(0),C=he(kx),I=he({height:0,width:0}),P=he({height:0,width:0}),M=Ye(),j=Ye(),L=he(0),O=he(null),N=he({column:0,row:0}),V=Ye(),D=Ye(),k=he(!1),F=he(0),_=he(!0),B=he(!1),U=he(!1);lt(de(g,He(F),Oe(([q,Y])=>!!Y)),()=>{ze(_,!1)}),lt(de(_t(g,_,P,I,F,B),Oe(([q,Y,Z,fe,,z])=>q&&!Y&&Z.height!==0&&fe.height!==0&&!z)),([,,,,q])=>{ze(B,!0),Om(1,()=>{ze(M,q)}),Fn(de(c),()=>{ze(t,[0,0]),ze(_,!0)})}),Re(de(D,Oe(q=>q!=null&&q.scrollTop>0),qn(0)),w),lt(de(g,He(D),Oe(([,q])=>q!=null)),([,q])=>{q&&(ze(I,q.viewport),ze(P,q.item),ze(N,q.gap),q.scrollTop>0&&(ze(k,!0),Fn(de(c,To(1)),Y=>{ze(k,!1)}),ze(l,{top:q.scrollTop})))}),Re(de(I,be(({height:q})=>q)),d),Re(de(_t(Pe(I,Ma),Pe(P,Ma),Pe(N,(q,Y)=>q&&q.column===Y.column&&q.row===Y.row),Pe(c)),be(([q,Y,Z,fe])=>({gap:Z,item:Y,scrollTop:fe,viewport:q}))),V),Re(de(_t(Pe(R),r,Pe(N,sV),Pe(P,Ma),Pe(I,Ma),Pe(O),Pe(w),Pe(k),Pe(_),Pe(F)),Oe(([,,,,,,,q])=>!q),be(([q,[Y,Z],fe,z,se,le,Q,,ce,re])=>{const{column:pe,row:oe}=fe,{height:ae,width:ve}=z,{width:ue}=se;if(Q===0&&(q===0||ue===0))return kx;if(ve===0){const De=jm(re,q),it=De+Math.max(Q-1,0);return iV(Ax(De,it,le))}const ne=UT(ue,ve,pe);let J,$;ce?Y===0&&Z===0&&Q>0?(J=0,$=Q-1):(J=ne*jl((Y+oe)/(ae+oe)),$=ne*Rx((Z+oe)/(ae+oe))-1,$=Ed(q-1,gs($,ne-1)),J=Ed($,gs(0,J))):(J=0,$=-1);const X=Ax(J,$,le),{bottom:me,top:ye}=Px(se,fe,z,X),Ee=Rx(q/ne),je=Ee*ae+(Ee-1)*oe-me;return{bottom:me,itemHeight:ae,items:X,itemWidth:ve,offsetBottom:je,offsetTop:ye,top:ye}})),C),Re(de(O,Oe(q=>q!==null),be(q=>q.length)),R),Re(de(_t(I,P,C,N),Oe(([q,Y,{items:Z}])=>Z.length>0&&Y.height!==0&&q.height!==0),be(([q,Y,{items:Z},fe])=>{const{bottom:z,top:se}=Px(q,fe,Y,Z);return[se,z]}),bt(Ns)),t);const G=he(!1);Re(de(c,He(G),be(([q,Y])=>Y||q!==0)),G);const H=gn(de(_t(C,R),Oe(([{items:q}])=>q.length>0),He(G),Oe(([[q,Y],Z])=>{const fe=q.items[q.items.length-1].index===Y-1;return(Z||q.bottom>0&&q.itemHeight>0&&q.offsetBottom===0&&q.items.length===Y)&&fe}),be(([[,q]])=>q-1),bt())),ee=gn(de(Pe(C),Oe(({items:q})=>q.length>0&&q[0].index===0),qn(0),bt())),ie=gn(de(Pe(C),He(k),Oe(([{items:q},Y])=>q.length>0&&!Y),be(([{items:q}])=>({endIndex:q[q.length-1].index,startIndex:q[0].index})),bt(RT),fr(0)));Re(ie,m.scrollSeekRangeChanged),Re(de(M,He(I,P,R,N),be(([q,Y,Z,fe,z])=>{const se=jT(q),{align:le,behavior:Q,offset:ce}=se;let re=se.index;re==="LAST"&&(re=fe-1),re=gs(0,re,Ed(fe-1,re));let pe=qf(Y,z,Z,re);return le==="end"?pe=Ix(pe-Y.height+Z.height):le==="center"&&(pe=Ix(pe-Y.height/2+Z.height/2)),ce&&(pe+=ce),{behavior:Q,top:pe}})),l);const te=Zt(de(C,be(q=>q.offsetBottom+q.bottom)),0);return Re(de(T,be(q=>({height:q.visibleHeight,width:q.visibleWidth}))),I),{customScrollParent:h,data:O,deviation:L,footerHeight:o,gap:N,headerHeight:i,increaseViewportBy:e,initialItemCount:w,itemDimensions:P,overscan:n,restoreStateFrom:D,scrollBy:s,scrollContainerState:a,scrollHeight:j,scrollTo:l,scrollToIndex:M,scrollTop:c,smoothScrollTargetReached:u,totalCount:R,useWindowScroll:v,viewportDimensions:I,windowScrollContainerState:x,windowScrollTo:b,windowViewportRect:T,...m,gridState:C,horizontalDirection:U,initialTopMostItemIndex:F,totalListHeight:te,...f,endReached:H,propsReady:y,rangeChanged:ie,startReached:ee,stateChanged:V,stateRestoreInProgress:k,...E}},St(Dm,tn,la,LT,eo,Mm,Jr));function UT(e,t,n){return gs(1,jl((e+n)/(jl(t)+n)))}function Px(e,t,n,r){const{height:o}=n;if(o===void 0||r.length===0)return{bottom:0,top:0};const i=qf(e,t,n,r[0].index);return{bottom:qf(e,t,n,r[r.length-1].index)+o,top:i}}function qf(e,t,n,r){const o=UT(e.width,n.width,t.column),i=jl(r/o),s=i*n.height+gs(0,i-1)*t.row;return s>0?s+t.row:s}const lV=Je(()=>{const e=he(d=>`Item ${d}`),t=he({}),n=he(null),r=he("virtuoso-grid-item"),o=he("virtuoso-grid-list"),i=he(Fm),s=he("div"),a=he(zi),l=(d,f=null)=>Zt(de(t,be(m=>m[d]),bt()),f),c=he(!1),u=he(!1);return Re(Pe(u),c),{components:t,computeItemKey:i,context:n,FooterComponent:l("Footer"),HeaderComponent:l("Header"),headerFooterTag:s,itemClassName:r,ItemComponent:l("Item","div"),itemContent:e,listClassName:o,ListComponent:l("List","div"),readyStateChanged:c,reportReadyState:u,ScrollerComponent:l("Scroller","div"),scrollerRef:a,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder","div")}}),cV=Je(([e,t])=>({...e,...t}),St(aV,lV)),uV=S.memo(function(){const e=Tt("gridState"),t=Tt("listClassName"),n=Tt("itemClassName"),r=Tt("itemContent"),o=Tt("computeItemKey"),i=Tt("isSeeking"),s=Cn("scrollHeight"),a=Tt("ItemComponent"),l=Tt("ListComponent"),c=Tt("ScrollSeekPlaceholder"),u=Tt("context"),d=Cn("itemDimensions"),f=Cn("gap"),m=Tt("log"),g=Tt("stateRestoreInProgress"),y=Cn("reportReadyState"),h=rr(S.useMemo(()=>v=>{const x=v.parentElement.parentElement.scrollHeight;s(x);const b=v.firstChild;if(b){const{height:T,width:E}=b.getBoundingClientRect();d({height:T,width:E})}f({column:Ox("column-gap",getComputedStyle(v).columnGap,m),row:Ox("row-gap",getComputedStyle(v).rowGap,m)})},[s,d,f,m]),!0,!1);return BT(()=>{e.itemHeight>0&&e.itemWidth>0&&y(!0)},[e]),g?null:p.jsx(l,{className:t,ref:h,...wt(l,u),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(v=>{const x=o(v.index,v.data,u);return i?p.jsx(c,{...wt(c,u),height:e.itemHeight,index:v.index,width:e.itemWidth},x):S.createElement(a,{...wt(a,u),className:n,"data-index":v.index,key:x},r(v.index,v.data,u))})})}),dV=S.memo(function(){const e=Tt("HeaderComponent"),t=Cn("headerHeight"),n=Tt("headerFooterTag"),r=rr(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,!1),o=Tt("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...wt(e,o)})}):null}),fV=S.memo(function(){const e=Tt("FooterComponent"),t=Cn("footerHeight"),n=Tt("headerFooterTag"),r=rr(S.useMemo(()=>i=>{t(zn(i,"height"))},[t]),!0,!1),o=Tt("context");return e?p.jsx(n,{ref:r,children:p.jsx(e,{...wt(e,o)})}):null}),pV=({children:e})=>{const t=S.useContext(zT),n=Cn("itemDimensions"),r=Cn("viewportDimensions"),o=rr(S.useMemo(()=>i=>{r(i.getBoundingClientRect())},[r]),!0,!1);return S.useEffect(()=>{t&&(r({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,r,n]),p.jsx("div",{ref:o,style:Bi(!1),children:e})},mV=({children:e})=>{const t=S.useContext(zT),n=Cn("windowViewportRect"),r=Cn("itemDimensions"),o=Tt("customScrollParent"),i=Im(n,o,!1);return S.useEffect(()=>{t&&(r({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,r]),p.jsx("div",{ref:i,style:Bi(!1),children:e})},hV=S.memo(function({...e}){const t=Tt("useWindowScroll"),n=Tt("customScrollParent"),r=n||t?yV:gV,o=n||t?mV:pV,i=Tt("context");return p.jsx(r,{...e,...wt(r,i),children:p.jsxs(o,{children:[p.jsx(dV,{}),p.jsx(uV,{}),p.jsx(fV,{})]})})}),{useEmitter:GT,useEmitterValue:Tt,usePublisher:Cn}=Nm(cV,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},hV),gV=Lm({useEmitter:GT,useEmitterValue:Tt,usePublisher:Cn}),yV=Vm({useEmitter:GT,useEmitterValue:Tt,usePublisher:Cn});function Ox(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,sn.WARN),t==="normal"?0:parseInt(t??"0",10)}const YT=e=>{const t=e.Icon??B0,n=yt();return p.jsxs("div",{className:"flex w-full flex-col items-center justify-center gap-4 px-8 py-12",children:[p.jsx(t,{size:64,className:"text-disabled"}),p.jsx("p",{className:"text-disabled",children:e.message??n.emptyDataMessage})]})},Hm=p.jsx("div",{className:"h-6 w-10/12 animate-pulse rounded bg-muted"}),ts=e=>p.jsx(mn,{...e,as:e.as||"span",className:Ie("block h-8 w-32 animate-pulse rounded bg-muted",e.className)});function vV(e,t){if(!e||!t)return[];const n=[1];if(e===1&&t===1)return n;e>4&&n.push("-");const r=2,o=e-r,i=e+r;for(let a=o>2?o:2;a<=Math.min(t,i);a++)n.push(a);const s=t-2;return i+1!==s&&i+1<t&&n.push("_"),i<t&&(n.push(t-2),n.push(t-1),n.push(t)),Array.from(new Set(n))}const xV=e=>{const t=S.useId(),n=yt(),r=S.useMemo(()=>vV(e.current,e.pages),[e.current,e.pages]),o=e.current<e.pages;return p.jsxs("footer",{className:"flex flex-wrap items-center justify-center gap-4 border-t-muted p-3 text-sm lg:flex-nowrap lg:justify-between",children:[p.jsx("p",{children:p.jsx(n.tablePaginationFooter,{...e,sizes:e.sizes,select:e.onChangeSize&&Array.isArray(e.sizes)?p.jsxs(S.Fragment,{children:[p.jsx("label",{htmlFor:t,children:n.tablePaginationSelectLabel}),p.jsx("select",{id:t,value:e.size,className:"cursor-pointer bg-transparent",onChange:i=>{e.onChangeSize?.(Number(i.target.value))},children:e.sizes.map(i=>p.jsx("option",{value:i,children:i},`pagination-opt-${i}`))})," "]}):null})}),p.jsx("nav",{children:p.jsxs("ul",{className:"flex items-center gap-2",children:[e.current>1?p.jsx("li",{children:p.jsx(mn,{as:e.asLink||"button",href:"previous",className:"",children:n.tablePaginationPrevious})}):null,r.map(i=>i===null?null:p.jsx(S.Fragment,{children:typeof i=="string"?p.jsx("li",{children:"..."}):p.jsx("li",{children:p.jsx(mn,{href:i,as:e.asLink||"button",className:`cursor-pointer border-b-2 px-3 py-1 proportional-nums transition-colors hover:border-primary-subtle hover:text-primary-subtle ${i===e.current?"border-primary text-primary":"border-transparent"}`,children:i})})},`pagination-${i}`)),o?p.jsx("li",{children:p.jsx(mn,{as:e.asLink||"button",href:"next",className:"",children:n.tablePaginationNext})}):null]})})]})},bV=e=>{const t=S.useRef(null),n=S.useRef(null),[r,o]=S.useState("opacity-0"),i=r==="opacity-0",s=()=>o("opacity-0"),a=()=>{const c=n.current,u=t.current;c===null||u===null||(u.style.left=`-${c.getBoundingClientRect().width+4}px`)},l=()=>o("opacity-100");return S.useEffect(()=>{const c=n.current;if(c===null||parent===null)return;a();const u=new IntersectionObserver(d=>d.forEach(a),{root:document.documentElement});return u.observe(c),()=>u.disconnect()},[]),p.jsx("div",{ref:t,onMouseEnter:l,onMouseLeave:s,"data-component":"cell-aside",inert:i?!0:void 0,tabIndex:i?-1:void 0,className:`group-table-cell-aside absolute inset-0 top-0 flex h-full w-full items-stretch transition-opacity duration-300 ease-in-out ${r}`,children:p.jsx("div",{ref:n,className:"isolate block",children:e.children})})},wV=(e,t,n)=>{const r=n.cols,o=n.loading;return p.jsx(S.Fragment,{children:r.map((i,s)=>{const a=`${s},${e}`,l=Dp(t,i.id),c=i.Element,u=i.cellProps?.className||"",d=s===0&&n.Aside&&o===!1,f=n.Aside;return S.createElement("td",{...i.cellProps,role:"cell","data-matrix":a,key:`accessor-${e}-${s}`,className:`typography group-table-cell flex border-collapse flex-col whitespace-pre-wrap border border-y border-b border-table-border p-[var(--table-cell-padding)] md:table-cell md:border-b-0 md:border-r md:border-l-transparent md:last:border-r-transparent ${u}`},d?p.jsx(bV,{children:p.jsx(f,{col:i,row:t,rowIndex:e})}):null,p.jsx("span",{className:"block text-sm font-bold leading-tight md:hidden",children:i.thead}),p.jsx("span",{className:"relative",children:o?Hm:c?p.jsx(S.Fragment,{children:p.jsx(c,{row:t,matrix:a,col:i,rowIndex:e,value:l})}):p.jsx(S.Fragment,{children:Be.nil(l)?"":l})}))})})},Hi=e=>{const t=S.useId(),[n,r]=S.useState(e.open);S.useEffect(()=>r(e.open),[e.open]);const o=S.useRef(null),i=S.useMemo(()=>[ji(10),ac({fallbackAxisSideDirection:"end"}),sc(),Rp({padding:5,element:o})],[e.arrow]),{refs:s,floatingStyles:a,context:l}=ir({open:n,middleware:i,transform:!0,whileElementsMounted:Io,onOpenChange:(y,h)=>{const v=h?.relatedTarget;v&&v.dataset.floating==="true"&&!y||(r(y),e.onChange?.(y))}}),c=Di(l),u=Ap(l,{enabled:e.hover??!1}),d=Kr(l),f=wr(l,{role:"tooltip"}),{getReferenceProps:m,getFloatingProps:g}=sr([c,d,f,u]);return p.jsxs(S.Fragment,{children:[p.jsx("button",{ref:s.setReference,...m(e.buttonProps),type:"button",children:e.trigger}),n&&p.jsx(br,{preserveTabOrder:!0,id:`${t}-portal`,children:p.jsx(Ao,{guards:!0,restoreFocus:!0,returnFocus:!0,visuallyHiddenDismiss:!0,context:l,modal:!1,children:p.jsxs("div",{className:"relative isolate z-floating rounded-lg border border-floating-border bg-floating-background p-4 shadow-shadow-floating",ref:s.setFloating,"aria-labelledby":t,style:a,...g(),children:[p.jsx(Ip,{ref:o,context:l,strokeWidth:.1,className:"fill-floating-background stroke-floating-border"}),p.jsx("header",{className:"mb-2",children:p.jsx("h3",{className:"text-left text-2xl font-medium leading-snug tracking-wide",children:e.title})}),e.children]})})})]})};var Cd={},jx;function SV(){return jx||(jx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=(h,v)=>{try{Object.keys(h).forEach(v)}catch(x){window.console.log(x)}},n=h=>h==null,r=h=>{const v=typeof h;return v==="string"||v==="number"||v==="boolean"||n(h)},o=(h,v)=>{const x=v.getItem(h);try{return JSON.parse(x)}catch{return x??null}},i=h=>Object.keys(h).reduce((v,x)=>({...v,[x]:o(x,h)}),{}),s=h=>h instanceof Date?h:typeof h=="number"?new Date(new Date*1+h*864e5):h,a="1969-12-31T23:59:59.000Z",l=()=>document.cookie===""?{}:document.cookie.split("; ").map(h=>h.split("=")).reduce((h,v)=>(h[decodeURIComponent(v[0].trim())]=decodeURIComponent(v[1].trim()),h),{}),c=new Set,u=()=>{const h=l();c.forEach(v=>v(h))},d=[{name:"expires",parse:h=>`expires=${s(h.expires??a)}`},{name:"maxAge",parse:h=>h.maxAge?`max-age=${s(h.expires??a)}`:""},{name:"path",parse:h=>`path=${h.path??"/"}`},{name:"sameSite",parse:h=>`samesite=${h.sameSite??"strict"}`},{name:"useSecure",parse:h=>`${h.useSecure??!0?"secure":""}`},{name:"domain",parse:h=>{const v=h.domain??"";return v===""?"":`domain=${h.multiDomain?".":""}${v}`}},{name:"partitioned",parse:h=>h.partitioned?"Partitioned":""}],f={json:l,listener:h=>(c.add(h),()=>c.delete(h)),clearListeners:()=>c.clear(),has:h=>document.cookie.split(";").some(v=>v.trim().startsWith(`${h}=`)),deleteAll:()=>{document.cookie.split(";").forEach(h=>{document.cookie=h.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}),u()},get:h=>{const v=f.json()[h];if(n(v))return null;try{return JSON.parse(decodeURIComponent(v))}catch{return v}},delete:h=>{document.cookie=`${encodeURIComponent(h)}=;expires=${new Date().toUTCString()}`,u()},set:(h,v,x={})=>{const b=r(v)?v:encodeURIComponent(JSON.stringify(v)),T=d.reduce((E,R)=>{const w=R.parse(x);return w===""?E:E.concat(w)},[`${encodeURIComponent(h)}=${b}`]).join(";");document.cookie=T,u()}},m=h=>{const v=new Set,x=b=>{h().removeItem(b);const T=i(h());v.forEach(E=>E(T))};return{delete:x,listener:b=>(v.add(b),()=>v.delete(b)),clearListeners:()=>v.clear(),json:(b=!1)=>b?i(h()):h(),has:b=>{const T=h().getItem(b);return!n(T)},deleteAll:()=>{t(h(),x),v.forEach(b=>b(h()))},get:b=>o(b,h()),set:(b,T)=>{h().setItem(b,JSON.stringify(T)),v.forEach(E=>E(h()))}}},g=m(()=>window.sessionStorage),y=m(()=>window.localStorage);e.Cookie=f,e.LocalStorage=y,e.SessionStorage=g,e.createStorage=m})(Cd)),Cd}var ys=SV();const Wm=e=>e.headerLabel??e.thead??e.id,qm=e=>e.map(t=>({value:t.id,label:t.thead??t.headerLabel??t.id}));var ui=(e=>(e.Boolean="boolean",e.Number="number",e.Select="select",e.Text="text",e))(ui||{});const Um=e=>e.type==="number"?e.valueAsNumber:e.value,TV=e=>{let t=[];return e({add:(s,a,l)=>t.push({...l,id:s,thead:a}),remove:s=>t=t.filter(a=>a.id!==s),getAll:()=>Array.from(t),filter:s=>t=Array.from(t.filter(s))}),t},EV={},CV=(e,t)=>{if(!Array.isArray(t))return e;const n=new Set(t.map(o=>o.id));if(!e.every(o=>n.has(o.id)))return e;const r=new Map(e.map(o=>[o.id,o]));return t.map((o,i)=>{const s=r.get(o.id);return s===void 0?e[i]:s})},kV=(e,t,n=EV)=>{const r=$r()?null:ys.LocalStorage.get(`@components/table-${e}`)||null,[o,i]=Tm({name:e,groups:n.groups||r?.groups||[],sorters:n.sorters||r?.sorters||[],filters:n.filters||r?.filters||[],cols:CV(t,r?.cols)},s=>{const a=l=>{const c=s.state(),u={...c,...l};return $r()||ys.LocalStorage.set(`@components/table-${c.name}`,u),u};return a(s.state()),{set:l=>a(l)}});return{...o,...i,name:e}},RV=e=>{const t=Br(e),n=S.useRef(null),r=S.useCallback(o=>{t.current(o),o.forEach(i=>{const s=n.current.querySelector(`th[data-tableheader="${i.id}"]`);s&&(s.style.width="auto")})},[t]);return[n,r]},IV=()=>$r()?void 0:document.querySelector('[data-component="modal-body"]'),AV=e=>(t,n)=>e.reduce((r,o)=>{const i=o.type==="desc"?-1:1,s=o.value,a=t[s]>n[s]?i:t[s]<n[s]?-i:0;return r!==0?r:a},0),PV=(e,t)=>e.toSorted(AV(t)),KT=(e,t,n)=>({label:t,id:Mi(),type:n,value:e.id}),OV=e=>{const t=yt(),n={asc:{label:t.tableSortAsc,value:"asc"},desc:{label:t.tableSortDesc,value:"desc"}},r=[n.asc,n.desc],o=()=>{const l=e.cols[0];l&&e.set(c=>[...c,KT(l,n.asc.label,n.asc.value)])},i=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,value:u}:f))},s=l=>c=>{const u=c.target.value;e.set(d=>d.map(f=>f.id===l?{...f,type:u}:f))},a=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))};return p.jsx(S.Fragment,{children:p.jsx(Hi,{title:t.tableSortDropdownTitle,trigger:p.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[p.jsx(V0,{size:14}),t.tableSortOrderByLabel," ",e.sorters.length===0?"":` (${e.sorters.length})`]}),children:p.jsxs("ul",{className:"mt-4 space-y-2",children:[e.sorters.map(l=>p.jsxs("li",{className:"flex flex-nowrap gap-3",children:[p.jsx(bo,{options:e.options,value:l.value,onChange:i(l.id),title:t.tableSortOrderInputTitle,placeholder:t.tableSortOrderInputPlaceholder}),p.jsx(bo,{onChange:s(l.id),value:l.type,options:r,title:t.tableSortTypeInputTitle,placeholder:t.tableSortTypeInputPlaceholder}),p.jsx("button",{className:"mt-4","data-id":l.id,onClick:a,children:p.jsx(Zl,{className:"text-danger",size:14})})]},`sorter-select-${l.id}`)),p.jsx("li",{children:p.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-primary",children:[p.jsx(vp,{size:14})," ",t.tableSortAddButton]})})]})})})},jV=e=>{const t=yt(),[n,r]=S.useState(()=>{const a=e.sorters.find(l=>l.value===e.col.id);return a?a.type:"undefined"}),o=()=>r(a=>a==="undefined"?"asc":a==="asc"?"desc":"undefined");S.useEffect(()=>{e.setSorters(a=>{if(n==="undefined")return a.filter(u=>u.value!==e.col.id);const l=a.findIndex(u=>u.value===e.col.id),c=KT(e.col,n,n);return l===-1?[...a,c]:(a[l]=c,[...a])})},[n,e.col]);const i=`${e.col.id}-sorter-id`,s=Wm(e.col);return p.jsxs("button",{"aria-labelledby":i,className:"isolate flex items-center",onClick:o,type:"button",children:[p.jsxs("span",{id:i,className:"sr-only",children:[t.tableSortDropdownTitle," ",s]}),n==="asc"?p.jsx(LR,{size:14}):null,n==="desc"?p.jsx(_R,{size:14}):null,n==="undefined"?p.jsx(V0,{size:14}):null]})},ZT=S.createContext({}),DV=ZT.Provider,MV=()=>S.useContext(ZT),Uf=(e,t,n,r={})=>{const o=e.id,i=e.type??ui.Text,s=t[i]??[],a=s.find(c=>c["data-default"])?.value??s[0]?.value,l=n[a];return{id:Mi(),operation:l,label:Wm(e),name:o,type:i,value:"",...r}},Gm=()=>{const e=yt(),t=S.useMemo(()=>({contains:{value:"contains",label:e.tableFilterTypeContains,symbol:"includes","data-default":"true"},is:{value:"is",label:e.tableFilterTypeIs,symbol:"is"},isNot:{value:"isNot",label:e.tableFilterTypeIsNot,symbol:"!=="},notContains:{value:"notContains",label:e.tableFilterTypeNotContains,symbol:"notIncludes"},lessThan:{value:"lessThan",label:e.tableFilterTypeLessThan,symbol:"<="},greaterThan:{value:"greaterThan",label:e.tableFilterTypeGreaterThan,symbol:">="},startsWith:{value:"startsWith",label:e.tableFilterTypeStartsWith,symbol:"startsWith"},endsWith:{value:"endsWith",label:e.tableFilterTypeEndsWith,symbol:"endsWith"}}),[e]);return{options:S.useMemo(()=>({[ui.Text]:[t.is,t.isNot,t.contains,t.notContains,t.startsWith,t.endsWith],[ui.Boolean]:[t.is,t.isNot],[ui.Number]:[t.is,t.isNot,t.greaterThan,t.lessThan]}),[t]),operations:t}},NV=e=>{const t=yt(),n=Gm(),r=()=>{const l=e.cols.at(0);e.set(c=>[...c,Uf(l,n.options,n.operations)])},o=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>{if(c!==f.id)return f;const m=e.cols.find(g=>u===g.id);return Uf(m,n.options,n.operations,{value:""})}))},i=l=>{const c=l.target.dataset.id||"",u=l.target.value;e.set(d=>d.map(f=>f.id===c?{...f,operation:n.operations[u]}:f))},s=l=>{const c=l.currentTarget.dataset.id||"";e.set(u=>u.filter(d=>d.id!==c))},a=l=>{const c=l.target.dataset.id||"",u=Um(l.target);e.set(d=>d.map(f=>f.id===c?{...f,value:u}:f))};return p.jsx(S.Fragment,{children:p.jsx(Hi,{arrow:!0,title:t.tableFilterDropdownTitle,trigger:p.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[p.jsx(pI,{size:14}),t.tableFilterLabel," ",e.filters.length===0?"":` (${e.filters.length})`]}),children:p.jsxs("ul",{className:"mt-4 space-y-2",children:[e.filters.map(l=>{const c=n.options[l.type];return p.jsxs("li",{className:"flex flex-nowrap gap-3",children:[p.jsx(bo,{options:e.options,title:t.tableFilterColumnTitle,placeholder:t.tableFilterColumnPlaceholder,value:l.name,"data-id":l.id,onChange:o}),p.jsx(bo,{"data-id":l.id,onChange:i,value:l.operation.value,options:c,title:t.tableFilterOperatorTitle,placeholder:t.tableFilterOperatorPlaceholder}),p.jsx(Ni,{optionalText:"","data-id":l.id,onChange:a,value:l.value,type:l.type,title:t.tableFilterValueTitle,placeholder:t.tableFilterValuePlaceholder}),p.jsx("div",{className:"mt-5 flex items-center justify-center",children:p.jsx("button",{"data-id":l.id,type:"button",onClick:s,children:p.jsx(Zl,{className:"text-danger",size:16})})})]},`filter-select-${l.id}`)}),p.jsx("li",{children:p.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-primary",children:[p.jsx(vp,{size:14})," ",t.tableFilterNewFilter]})})]})})})},_V=({filter:e,onDelete:t,set:n})=>{const r=yt(),o=Gm(),i=a=>{const l=a.target.value,c=a.target.dataset.id||"";n(u=>u.map(d=>d.id===c?{...d,operation:o.operations[l]}:d))},s=a=>{const l=a.target.dataset.id||"",c=Um(a.target);n(u=>u.map(d=>d.id===l?{...d,value:c}:d))};return p.jsxs("div",{className:"flex flex-nowrap items-center gap-4 py-2",children:[p.jsx(bo,{"data-id":e.id,onChange:i,value:e.operation.value,options:o.options[e.type],title:r.tableFilterColumnTitle,placeholder:r.tableFilterColumnPlaceholder}),p.jsx(Ni,{optionalText:" ","data-id":e.id,onChange:s,value:e.value,type:e.type,title:r.tableFilterValueTitle,placeholder:r.tableFilterValueTitle}),p.jsx("button",{onClick:t,"data-id":e.id,type:"button",className:"mt-4",children:p.jsx(Zl,{className:"text-danger",size:14})})]})},FV={top:0,left:0,right:0,bottom:-1},LV=e=>{const t=bp(),n=yt(),r=e.filters.filter(y=>y.name===e.header.id),o=r.length>0,i=e.header.allowSort??t.table.sorters??!0,s=e.header.allowFilter??t.table.filters??!0,a=Gm(),l=o?bI:SI,c=S.useRef(null),u=y=>{const h=y.currentTarget.dataset.id||"";return e.setFilters(v=>v.filter(x=>x.id!==h))},d=S.useCallback(y=>{if(y===null)return;c.current=y;const h=new AbortController;return y.addEventListener("pointerdown",v=>{if(v.target.dataset.type==="resizer")return v.stopPropagation(),v.stopImmediatePropagation()},{signal:h.signal}),()=>h.abort()},[]),f=e.sorters.find(y=>e.header.id===y.value),m=f?.type?f.type===yT.Asc?"ascending":"descending":"none",g=Wm(e.header);return p.jsxs(uT,{...e.header.thProps,as:"th",ref:d,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,role:"columnheader","aria-sort":m,value:e.header,"aria-busy":e.loading,"data-tableheader":e.header.id,whileDrag:{cursor:"grabbing"},className:`typography bg-table-header first:rounded-tl-lg last:rounded-tr-lg overflow-clip last:border-r-transparent border-table-border border-r-[1px] relative min-w-0 cursor-grab font-medium md:h-14 ${e.header.thProps?.className??""}`,children:[p.jsx("span",{className:`flex h-full items-center justify-between bg-table-header p-[var(--table-cell-padding)] ${e.isLast?"rounded-tr-lg":""} ${e.index===0?"rounded-tl-lg":""}`,children:p.jsxs("span",{className:"flex items-center gap-1",children:[e.inlineFilter&&s?p.jsx(Hi,{arrow:!0,trigger:p.jsxs("span",{children:[p.jsxs("span",{id:`${e.header.id}-filter-dropdown-button`,className:"sr-only",children:[n.tableFilterDropdownTitleUnique," ",g]}),p.jsx(l,{"aria-labelledby":`${e.header.id}-filter-dropdown-button`,size:14})]}),title:p.jsxs("span",{className:"text-lg",children:[n.tableFilterDropdownTitleUnique," ",p.jsx("span",{className:"font-medium",children:g})]}),children:p.jsxs("ul",{className:"font-medium",children:[r.length===0?null:p.jsx(S.Fragment,{children:r.map(y=>p.jsx("li",{className:"my-1",children:p.jsx(_V,{onDelete:u,filter:y,set:e.setFilters})},`thead-filter-${y.id}`))}),p.jsx("li",{children:p.jsxs("button",{type:"button",className:"flex items-center gap-1 text-primary",onClick:()=>e.setFilters(y=>y.concat(Uf(e.header,a.options,a.operations))),children:[p.jsx(vp,{size:14})," ",n.tableFilterNewFilter]})})]})}):null,p.jsx("span",{className:"pointer-events-auto text-balance text-base",children:e.header.thead}),e.inlineSorter&&i?p.jsx(jV,{col:e.header,setSorters:e.setSorters,sorters:e.sorters}):null]})}),e.isLast?null:p.jsx(Le.button,{drag:"x",draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,dragSnapToOrigin:!0,dragDirectionLock:!0,"data-type":"resizer",title:e.header.id,dragConstraints:FV,className:"absolute -right-[0.5px] top-0 z-calendar block h-full w-[1px] cursor-col-resize bg-transparent hover:w-1.5 hover:bg-primary active:w-1.5 active:bg-primary",onClick:y=>{y.currentTarget.focus()},onKeyDown:y=>{if(y.key==="ArrowLeft"||y.key==="ArrowRight"){if(c.current===null)return;c.current.setAttribute("data-resized","true");const h=c.current.getBoundingClientRect().width,x=(y.shiftKey?50:10)*(y.key==="ArrowLeft"?-1:1);c.current.style.width=`${Math.abs(h+x)}px`}},onDoubleClick:()=>{c.current!==null&&(c.current.style.width="auto")},onDrag:(y,h)=>{if(c.current===null)return;c.current.setAttribute("data-resized","true");const v=c.current.getBoundingClientRect().width,x=h.delta.x;c.current.style.width=`${Math.abs(v+x)}px`}})]})},VV=e=>{const[t,n]=RV(e.setCols);return p.jsx(cT,{layout:!0,as:"tr",axis:"x",drag:"x",ref:t,layoutRoot:!0,role:"row",layoutScroll:!0,onReorder:n,values:e.headers,children:p.jsx(xn,{children:e.headers.map((r,o)=>p.jsx(LV,{index:o,header:r,filters:e.filters,loading:e.loading,sorters:e.sorters,setFilters:e.setFilters,setSorters:e.setSorters,inlineFilter:e.inlineFilter,inlineSorter:e.inlineSorter,isLast:o===e.headers.length-1},`header-child-item-${r.id}`))})})},$V=S.forwardRef(({context:e,className:t="",...n},r)=>p.jsx("tbody",{...n,role:"rowgroup",className:`divide-y divide-table-border ${t}`,ref:r,children:p.jsx(xn,{children:n.children})})),zV=S.forwardRef(({context:e,className:t="",...n},r)=>p.jsx("table",{...n,role:"table",ref:r,style:{...n.style,"--table-cell-padding":"0.75rem"},className:`table w-full table-fixed border-separate border-spacing-0 text-left ${t??""}`})),BV=S.forwardRef(({context:e,...t},n)=>{const r=MV(),o={...t?.style,top:Be.number(r.sticky)?`${r.sticky}px`:void 0};return p.jsx("thead",{...t,ref:n,style:o,role:"rowgroup",className:"group:sticky top-0 hidden bg-transparent md:table-header-group"})}),HV=S.forwardRef(({context:e,item:t,...n},r)=>{const o=e?.getRowProps?.(t),i={...n,...o};return p.jsx("tr",{...i,role:"row",ref:r,className:`group-table-row flex h-fit flex-col flex-wrap justify-center gap-1 pb-4 md:table-row ${[n?.className,o?.className].filter(Boolean).join(" ")}`})}),WV=S.forwardRef((e,t)=>e.context.loadingMore?p.jsx("tfoot",{...e,ref:t,className:"bg-card-background",children:p.jsx("tr",{role:"row",className:"bg-card-background",children:p.jsx("td",{colSpan:999,className:"h-14 bg-card-background px-2",children:p.jsx("span",{className:"block h-2 w-full animate-pulse rounded bg-foreground opacity-60"})})})}):null),qV={TableRow:HV,TableFoot:WV,TableHead:BV,Table:zV,TableBody:$V},UV=[0,0,0,0,0,0,0,0,0,0],GV=e=>p.jsx("div",{className:"flex h-48 w-full items-center justify-center px-2",children:e.loading?Hm:p.jsx(YT,{})}),YV=()=>p.jsx(S.Fragment,{}),KV=[],Dx=({cols:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,onScrollEnd:s,getScrollRef:a,pagination:l=null,useControl:c=!1,...u})=>{const d=S.useRef(null),[,f]=S.useState(!1),m=Br(s),g=Br(u.loadingMore),y=S.useMemo(()=>{if(u.loading)return UV;if(c)return u.rows;const x=new vT(u.rows);return t.length>0&&t.forEach(b=>b.value===""||Number.isNaN(b.value)?void 0:x.Where(b.name,b.operation.symbol,b.value)),r.length===0?x.Select():PV(x.Select(),r)},[u.loading,u.rows,c,t,r]);S.useEffect(()=>{if(d.current===null)return()=>{};const x=d.current,b=new IntersectionObserver(T=>T[T.length-1].isIntersecting&&g.current?(m.current?.(),void f(!0)):f(!1));return b.observe(x),()=>b.disconnect()},[g,m]);const h=y.length===0,v={cols:e,Aside:u.Aside,loading:u.loading,getRowProps:u.getRowProps,loadingMore:u.loadingMore};return p.jsxs("div",{className:"group bg-table-background relative flex w-full flex-col whitespace-nowrap rounded-lg",children:[p.jsx(rV,{components:qV,context:v,totalCount:y.length,itemContent:h?YV:wV,data:h?KV:y,useWindowScroll:!a,customScrollParent:a?a():void 0,fixedHeaderContent:()=>p.jsx(VV,{headers:e,filters:t,setCols:n,sorters:r,setFilters:o,setSorters:i,loading:!!u.loading,inlineFilter:u.inlineFilter,inlineSorter:u.inlineSorter})}),h?p.jsx(GV,{loading:u.loading}):null,p.jsx("div",{"aria-hidden":"true",ref:d,className:"h-0.5 w-full"}),l!==null?p.jsx(xV,{...l}):null]})},ZV=({item:e,onPointerDown:t})=>{const n=po(0);return p.jsxs(uT,{onPointerDown:t,id:e.groupId,className:"flex flex-row items-center gap-2",value:e,style:{y:n},children:[p.jsx("button",{type:"button",className:"cursor-grab",children:p.jsx(uI,{size:14})}),p.jsx("span",{children:e.groupName})]},e.groupId)},XV=e=>{const t=yt(),n=qm(e.cols),r=G2(),[o,i]=S.useState(e.groups[0]?.thead||""),s=l=>{const c=l.target,u=c.value,d=c.options.selectedIndex,f=c.options.item(d)?.label||"";i(f);const m=new vT(e.rows).GroupBy(u),g=e.cols.find(y=>y.id===u);e.setGroups(yk(m).map((y,h)=>{const v=m[y];return{...g,groupId:Mi(),groupKey:u,index:h,rows:v,groupName:y}}))},a=()=>e.setGroups([]);return p.jsx(S.Fragment,{children:p.jsxs(Hi,{arrow:!1,title:t.tableGroupLabel,trigger:p.jsxs("span",{className:"flex items-center gap-1 proportional-nums",children:[p.jsx(RI,{size:14}),t.tableGroupLabelWithCount,e.groups.length>0?` - ${o}(${e.groups.length})`:""]}),children:[p.jsxs("div",{className:"flex flex-nowrap items-center",children:[p.jsx(bo,{value:o,title:"Tipo de agrupamento",onChange:s,options:n,placeholder:"Agrupar por..."}),p.jsx(Qt,{className:"mt-4",onClick:a,theme:"raw","data-id":o,children:p.jsx(Zl,{size:16,className:"text-danger"})})]}),e.groups.length>0?p.jsxs("section",{className:"my-4",children:[p.jsx("header",{children:p.jsx("h2",{className:"text-xl font-medium",children:"Order groups"})}),p.jsx(h_,{children:p.jsx(cT,{axis:"y",className:"relative space-y-2",drag:!0,dragControls:r,dragListener:!1,layoutScroll:!0,onReorder:e.setGroups,values:e.groups,children:e.groups.map(l=>p.jsx(ZV,{item:l,onPointerDown:c=>{r.start(c),e.setGroups([...e.groups])}},l.groupId))})})]}):null]})})},QV=e=>p.jsx("header",{className:"mb-1 min-w-full",children:p.jsxs("div",{className:"flex min-w-full flex-wrap items-center justify-between gap-x-4 gap-y-1",children:[p.jsxs("div",{className:"items-centeend flex w-fit gap-4 whitespace-nowrap py-2",children:[p.jsx("span",{children:p.jsx(NV,{cols:e.cols,options:e.options,filters:e.filters,set:e.setFilters})}),p.jsx("span",{children:p.jsx(OV,{options:e.options,cols:e.cols,sorters:e.sorters,set:e.setSorters})}),p.jsx("span",{children:p.jsx(XV,{rows:e.rows,groups:e.groups,setGroups:e.setGroups,options:e.options,cols:e.cols})})]}),p.jsx("ul",{className:"flex w-full flex-1 flex-grow flex-row flex-wrap items-center gap-4 md:justify-end",children:e.filters.map(t=>p.jsxs("li",{className:"flex items-center gap-1 rounded-xl border border-card-border px-4 py-0.5",children:[p.jsxs("span",{children:[p.jsx("span",{className:"mr-2 inline-block aspect-square size-3 rounded-full bg-primary","aria-hidden":"true"}),t.label," ",t.operation.label.toLowerCase(),":"]}),p.jsxs("div",{className:"relative w-min min-w-[1ch]",children:[p.jsx("span",{"aria-hidden":"true",className:"invisible whitespace-pre p-0",children:t.value||" "}),p.jsx("input",{type:t.type,value:t.value,className:"absolute left-0 top-0 m-0 inline-block w-full bg-transparent p-0 placeholder-primary/70 outline-none [appearance:textfield] after:empty:text-primary/70 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",onChange:n=>{const r=Um(n.target);e.setFilters(o=>o.map(i=>t.id===i.id?{...i,value:r}:i))}})]})]},`filter-table-${t.id}`))})]})}),JV=(e,t)=>typeof t=="function"?t(e):t,Na=(e,t,n)=>e===t?void 0:n?.(t),e$=e=>{const t=bp(),n=S.useMemo(()=>({sticky:e.sticky===void 0?t.table.sticky??void 0:e.sticky??void 0}),[e.sticky,t.table.sticky]),r=e.operations??t.table.operations??!0,o=S.useMemo(()=>qm(e.cols),[e.cols]),[i,s]=Tm({cols:e.cols,sorters:e.sorters??[],groups:e.groups??[],filters:e.filters??[]},a=>{const l=c=>u=>{const d=a.state();return{...d,[c]:JV(d[c],u)}};return{cols:l("cols"),sorters:l("sorters"),groups:l("groups"),filters:l("filters")}},{postMiddleware:[(a,l)=>(e.set?.(a),Na(l?.filters??[],a.filters??[],e.setFilters),Na(l?.sorters??[],a.sorters??[],e.setSorters),Na(l?.groups??[],a.groups??[],e.setGroups),Na(l?.cols??[],a.cols??[],e.setCols),a)]});return S.useEffect(()=>{s.cols(e.cols)},[e.cols]),p.jsx(DV,{value:n,children:p.jsxs(xn,{propagate:!0,initial:!1,children:[r?p.jsx(QV,{cols:i.cols,rows:e.rows,options:o,groups:i.groups,filters:i.filters,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):null,i.groups.length===0?p.jsx(Dx,{...e,index:0,cols:i.cols,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,pagination:e.pagination??null,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0}):p.jsx("div",{className:"flex flex-wrap gap-4",children:i.groups.map((a,l)=>p.jsx("div",{className:"min-w-full",children:p.jsx(Dx,{...e,group:a,index:l,cols:i.cols,pagination:null,rows:a.rows,options:o,groups:i.groups,filters:i.filters,optionCols:o,setCols:s.cols,sorters:i.sorters,setGroups:s.groups,setFilters:s.filters,setSorters:s.sorters,onScrollEnd:e.onScrollEnd,inlineFilter:e.inlineFilter??!0,inlineSorter:e.inlineSorter??!0})},`group-${a.groupId}`))})]})})},Oc=({title:e,loading:t,children:n,as:r,header:o=null,container:i="",titleClassName:s="",...a})=>p.jsxs(mn,{...a,as:r||"div","data-component":"card",className:Ie("flex w-full flex-col gap-4 rounded-card border border-card-border bg-card-background py-3 shadow-shadow-card",i),children:[e?p.jsx("header",{"data-component":"card-title",className:Ie("mb-2 w-full border-b border-card-border px-6 pb-2 text-xl font-medium",s),children:e}):o,p.jsx("div",{"data-component":"card-body",className:Ie("min-w-full px-6",a.className),children:t?p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsx(ts,{className:"w-full"}),p.jsx(ts,{className:"w-8/12"}),p.jsx(ts,{className:"w-10/12"}),p.jsx(ts,{className:"w-1/2"})]}):n})]});Oc.Title=({as:e,titleTag:t,navTag:n,children:r,...o})=>{const i=e||"div",s=t||"h2",a=n||"nav";return p.jsxs(i,{...o,title:Be.string(o.title)?o.title:void 0,className:Ie("flex w-full flex-col flex-wrap items-start justify-between gap-base sm:flex-row sm:items-center",o.className),children:[p.jsx(s,{className:"font-semibold",children:o.title}),r?p.jsx(a,{className:"gap-kilo flex flex-col items-start justify-start sm:flex-row sm:items-center sm:justify-end",children:r}):null]})};const t$=e=>{const t=e.interactive??!0,n=e.Icon??jr;return p.jsx(Oc,{...e,title:null,loading:void 0,container:"px-0 py-0",className:"flex items-center gap-4 px-0",children:p.jsxs("div",{className:`flex w-full items-center gap-4 rounded-card px-0 lg:px-0 ${t?"transition-colors duration-300 ease-linear hover:bg-primary-hover/10":""}`,children:[p.jsx("div",{className:Ie("flex aspect-square h-[stretch] w-20 items-center justify-center rounded-l-card bg-primary p-4 text-primary-foreground",e.mark),children:p.jsx(n,{size:48})}),p.jsxs("div",{className:"flex flex-col justify-center gap-2 py-2",children:[p.jsx("p",{className:"text-lg",children:e.title}),e.loading?p.jsx(ts,{className:"h-10"}):p.jsx("p",{className:"text-4xl font-bold tracking-wide",children:e.value})]})]})})},n$=({item:e,context:t,setter:n,get:r,refs:o})=>p.jsx(br,{children:p.jsx(vm,{reducedMotion:"user",transition:{type:"spring",damping:30,stiffness:350},children:p.jsxs(xn,{mode:"wait",presenceAffectsLayout:!0,children:[e?p.jsx(Le.div,{exit:{opacity:0},animate:{opacity:1},initial:{opacity:0},transition:{type:"tween",duration:.15,ease:"easeOut"},className:"pointer-events-none fixed inset-0 top-0 z-overlay h-screen w-screen bg-floating-overlay/70"},"overlay"):null,e?p.jsx(jp,{lockScroll:!0,className:"absolute inset-0 z-floating flex items-center justify-center",children:p.jsx(Ao,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:t,children:p.jsxs(Le.div,{layout:!0,layoutId:`item-${e.id}`,initial:{opacity:.6,scale:.98},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.98},className:"relative flex h-min w-min min-w-xs flex-col gap-4 rounded-card border border-card-border bg-card-background p-6 py-4 pb-8 shadow-shadow-card",ref:o.setFloating,...r(),children:[p.jsx("nav",{className:"absolute right-4 top-1 lg:right-2",children:p.jsx("button",{type:"button",onClick:n,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:p.jsx(Pi,{})})}),p.jsxs(Le.header,{layout:!0,className:"flex w-full flex-wrap items-center justify-between gap-2",children:[p.jsx("h3",{className:"min-w-full text-balance text-2xl font-medium",children:e.title}),p.jsx("p",{className:"text-sm leading-snug text-secondary",children:e.description})]}),p.jsx(Le.div,{layout:!0,children:e.children})]})})},"card"):null]})})}),r$=e=>{const[t,n]=S.useState(null),r=S.useId(),{context:o,refs:i}=ir({open:t!==null,transform:!0,onOpenChange:f=>f?void 0:n(null)}),s=Di(o),a=wr(o,{role:"dialog"}),l=Kr(o,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:c}=sr([s,a,l]),u=S.useCallback(()=>{n(null)},[]),d=S.Children.toArray(e.children);return p.jsxs(S.Fragment,{children:[p.jsx(n$,{refs:i,context:o,get:c,item:t,setter:u}),p.jsx("ul",{role:"list",children:d.map((f,m)=>{const g=f.props,y=`${r}-${m}`,h=()=>n({...g,id:y}),v=g.leading;return p.jsx(Le.li,{layout:!0,layoutId:`item-${y}`,className:"border-b border-card-border py-2 last:border-transparent",children:p.jsx(Le.div,{layoutId:`toast-${y}`,className:"relative",children:p.jsx("div",{className:"relative flex items-start space-x-3",children:p.jsxs(S.Fragment,{children:[g.avatar?p.jsx("div",{children:p.jsx("div",{className:"relative px-1",children:p.jsx("button",{onClick:h,className:"flex size-10 items-center justify-center ring-primary",children:g.avatar})})}):null,p.jsx("div",{className:"min-w-0 flex-1 py-1 text-foreground",children:p.jsxs("div",{className:"flex flex-row flex-nowrap justify-between gap-4",children:[p.jsxs("button",{onClick:h,className:"cursor-pointer text-left transition-all ease-out hover:text-primary",children:[p.jsx("h3",{children:g.title}),p.jsx("p",{className:"text-sm leading-snug text-secondary",children:g.description})]}),v?p.jsx(v,{open:h}):null]})})]})})})},y)})})]})},o$=e=>p.jsx(S.Fragment,{children:e.children}),XT=()=>{const e=S.useContext(ko);return e?e.parser:Xl.hsla},Gf=.3,_a={duration:Gf,type:"tween",ease:"easeInOut"},QT=S.createContext(null),Yf={delay:.2,duration:.3,type:"tween",ease:"easeOut"},Jo={initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1}},i$=e=>p.jsxs("svg",{...e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx(Le.path,{className:"currentColor",initial:Jo.initial,animate:Jo.animate,transition:Yf,d:"M18 6 6 18"}),p.jsx(Le.path,{className:"currentColor",initial:Jo.initial,animate:Jo.animate,transition:Yf,d:"m6 6 12 12"})]}),s$=e=>p.jsx("svg",{...e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:p.jsx(Le.path,{d:"M5 13l4 4L19 7",strokeLinecap:"round",strokeLinejoin:"round",animate:Jo.animate,initial:Jo.initial,transition:Yf})}),a$={complete:{scale:1.25},active:{scale:1,transition:{delay:0,duration:.3}}},l$={duration:.6,delay:.2,type:"tween",ease:"circOut"},c$=(e,t,n)=>n==="error"?"error":t===e?"active":t<e?"inactive":"complete",u$=(e,t,n,r)=>t===n?0:t>n?e<=n||e>t?0:(e-n)/(t-n)*r:e<=t||e>n?0:(n-e)/(n-t)*r,JT=()=>S.useContext(QT),d$=({step:e,currentStep:t,status:n,title:r,titleClassName:o,...i})=>{const s=XT(),a=JT(),[l,c]=S.useState(t);S.useEffect(()=>{if(!a){c(t);return}const d=u$(e,a.currentStep,a.previousStep,a.progressBarDuration);if(d===0){c(t);return}const f=setTimeout(()=>{c(t)},d*1e3);return()=>clearTimeout(f)},[t,a,e]);const u=c$(e,l,n);return a?.steps&&100/a?.steps,p.jsxs(S.Fragment,{children:[p.jsx("div",{className:`hidden h-[2px] w-full bg-card-border first:hidden xl:block ${u==="active"||u==="complete"?"bg-success":""}`}),p.jsxs(Le.button,{...i,type:"button","data-step":e,animate:u,className:"relative flex w-auto items-center justify-center text-center",children:[p.jsx(Le.div,{variants:a$,transition:l$,className:`absolute inset-0 hidden rounded-full text-center xl:block ${u==="error"?"bg-danger":""}`}),p.jsx(Le.div,{initial:!1,animate:u,transition:_a,className:"relative flex aspect-square size-10 items-center justify-center rounded-full font-medium",variants:{error:{color:s("var(--danger-foreground)"),borderColor:s("var(--danger-hover)"),backgroundColor:s("var(--danger-DEFAULT)")},inactive:{transition:_a,color:s("var(--disabled)"),borderColor:s("var(--card-border)"),backgroundColor:s("var(--background)")},active:{transition:_a,color:s("var(--primary-foreground)"),borderColor:s("var(--primary-DEFAULT)"),backgroundColor:s("var(--primary-DEFAULT)")},complete:{transition:_a,color:s("var(--success-foreground)"),borderColor:s("var(--success-DEFAULT)"),backgroundColor:s("var(--success-DEFAULT)")}},children:p.jsx("div",{className:"flex items-center justify-center",children:u==="complete"?p.jsx(s$,{className:"size-6 text-primary-foreground"}):u==="error"?p.jsx(i$,{className:"size-6 text-danger-foreground"}):p.jsx(S.Fragment,{children:p.jsx("span",{children:e})})})}),p.jsx("header",{className:"flex flex-col items-start justify-start px-2",children:p.jsx("h3",{className:`flex h-full items-center whitespace-nowrap font-normal ${o}`,children:r})})]})]})},f$=e=>{const t=S.useRef(e.currentStep),[n,r]=S.useState(e.currentStep);S.useEffect(()=>{t.current=n;const i=setTimeout(()=>{r(e.currentStep)},Gf*1e3);return()=>clearTimeout(i)},[e.currentStep,n]);const o={currentStep:e.currentStep,previousStep:t.current,progressBarDuration:Gf,steps:S.Children.count(e.children)};return p.jsx(QT.Provider,{value:o,children:p.jsx("div",{className:"relative flex w-full flex-col items-start justify-center gap-4 lg:flex-row lg:items-center lg:justify-between",children:e.children})})},eE=(e,t)=>{const[n,r]=S.useState(()=>t||e);return S.useEffect(()=>{r(e)},[e]),[n,r]},Mx={ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},tE=S.createContext(""),p$=e=>e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true",Kf=(e,t,n)=>{const r=n==="forward"?1:-1,o=t+r;for(let i=o;i>=0&&i<e.length;i+=r){const s=e[i];if(!p$(s))return s}return n==="backward"?Kf(e,e.length-1,"backward"):Kf(e,-1,"forward")},Nx=(e,t)=>{const n=Array.from(e.querySelectorAll("li")),r=n.findIndex(i=>i.dataset.active==="true");if(r===-1)return null;const o=Kf(n,r,t);return o===null?null:(o.querySelector("button")?.focus({preventScroll:!1}),o.getAttribute("data-id")||"")},_x={[Mx.ArrowLeft]:(e,t)=>Nx(t,"backward"),[Mx.ArrowRight]:(e,t)=>Nx(t,"forward")},m$=e=>{const[t,n]=eE(e.active),r=S.useRef(null),o=Br(e.onChange);S.useEffect(()=>{const l=r.current;if(l===null)return;let c=l.querySelector("li[data-active=true]");if(c===null){c=l.querySelector("li[data-id]");const u=c.getAttribute("data-id")||"";n(u)}},[e.active,n]),S.useEffect(()=>{o.current&&o.current(t)},[o,t]);const i=S.Children.toArray(e.children),s=l=>{const c=l.currentTarget;n(c.dataset.id||"")},a=l=>{if(r.current===null)return;const c=l.key;if(Be.keyof(_x,c)){const u=_x[c],d=u(l,r.current);if(d===null)return;n(d)}};return p.jsx(tE.Provider,{value:t,children:p.jsx(Oc,{className:e.className,container:Ie("pt-0 max-w-full w-full min-w-0",e.container),header:p.jsxs("header",{className:"relative mb-2 overflow-x-auto",children:[p.jsx("div",{className:"absolute bottom-0 h-[1px] w-full bg-card-border"}),p.jsx("nav",{className:"min-w-0",children:p.jsx("ul",{onKeyDown:a,ref:r,className:"flex w-0 min-w-full flex-1 justify-start overflow-x-auto",children:i.map(l=>{const c=l.props,u=t===c.id;return p.jsx("li",{"data-id":c.id,"data-active":u,"aria-disabled":c.disabled,className:Ie("relative w-fit border-b border-transparent transition-all",u?"border-primary font-medium text-primary":"",c.disabled?"aria-disabled:text-disabled":""),children:p.jsx(mn,{as:"button",type:"button","data-id":c.id,"aria-current":"page",disabled:c.disabled,onClick:c.disabled?void 0:s,className:"block w-full whitespace-nowrap px-10 py-4 disabled:cursor-not-allowed",children:c.title})},`tab-header-${c.id}`)})})})]}),children:e.children})})},h$=()=>S.useContext(tE),g$=e=>{const t=h$();return p.jsx(S.Fragment,{children:e.id===t?e.children:null})},Fx={true:{opacity:1,height:"auto"},false:{opacity:[.7,.3,0],height:0}},y$={type:"tween",duration:.7,ease:[.04,.62,.23,.98]},nE=e=>p.jsx(Le.div,{...e,layout:!0,layoutRoot:!0,layoutScroll:!0,initial:!1,variants:Fx,exit:Fx.false,transition:y$,"aria-hidden":!e.open,"data-component":"collapse",animate:e.open.toString(),className:Ie("aria-hidden:pointer-events-none",e.className),children:e.children}),v$={theme:{primary:"bg-alert-primary-bg text-alert-primary-text border-alert-primary-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",neutral:"bg-transparent border border-card-border text-alert-primary-text"}},x$=ki("p-4 w-full block border relative rounded-lg text-sm",{variants:v$,defaultVariants:{theme:"neutral"}}),b$=S.forwardRef(function({className:t,theme:n,Icon:r,onClose:o,open:i=!0,...s},a){const l=()=>o?.(!1);return p.jsx(xn,{presenceAffectsLayout:!0,propagate:!0,mode:"sync",children:i?p.jsx(Le.div,{"data-open":!!i,"aria-hidden":!i,"data-component":"alert",className:Ie("isolate w-full",i?"pointer-events-auto":"pointer-events-none"),children:p.jsx(nE,{"data-open":!!i,open:!!i,children:p.jsx(mn,{...s,ref:a,role:"alert","data-theme":n,as:s.as??"div",className:Ie(x$({theme:n}),t),children:p.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-base",children:[o!==void 0&&i?p.jsx("button",{type:"button",onClick:l,className:"absolute right-3 top-3 text-foreground transition-colors duration-300 ease-in-out hover:text-danger",children:p.jsx(Pi,{size:20})}):null,p.jsxs("div",{className:Ie("flex items-center gap-2",s.title?"":"w-fit"),children:[!r&&n==="success"?p.jsx(yp,{"aria-hidden":"true",size:20}):null,!r&&n==="info"?p.jsx(jr,{"aria-hidden":"true",size:20}):null,!r&&n==="danger"?p.jsx(Xd,{"aria-hidden":"true",size:20}):null,r]}),s.title?p.jsx("h4",{className:"tracking-3 col-start-2 text-balance text-lg font-semibold",children:s.title}):null,p.jsx("div",{className:"col-start-2 w-full",children:s.children})]})})})}):null})}),w$=e=>p.jsxs("div",{className:"divide-y divide-card-border rounded-card border border-card-border bg-card-background shadow-shadow-card",children:[p.jsxs("header",{className:"flex items-start gap-4 p-6",children:[p.jsx("div",{className:Ie("flex aspect-square size-10 items-center justify-center rounded-card bg-primary p-8",e.iconContainer),children:p.jsx("div",{children:p.jsx(e.Icon,{className:"aspect-square size-10 text-primary-foreground"})})}),p.jsxs("div",{className:"flex flex-col gap-1",children:[p.jsx("header",{children:p.jsx("h3",{className:"text-base leading-none",children:e.title})}),p.jsx("p",{className:"text-4xl font-semibold",children:e.children})]})]}),e.footer?p.jsx("footer",{className:"px-6 py-2",children:e.footer}):null]}),S$=Symbol.for("react.lazy");function Lx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function T$(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Lx(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Lx(e[o],null)}}}}const Dl=A[" use ".trim().toString()];function E$(e){return typeof e=="object"&&e!==null&&"then"in e}function rE(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===S$&&"_payload"in e&&E$(e._payload)}function C$(e){const t=k$(e),n=A.forwardRef((r,o)=>{let{children:i,...s}=r;rE(i)&&typeof Dl=="function"&&(i=Dl(i._payload));const a=A.Children.toArray(i),l=a.find(I$);if(l){const c=l.props.children,u=a.map(d=>d===l?A.Children.count(c)>1?A.Children.only(null):A.isValidElement(c)?c.props.children:null:d);return p.jsx(t,{...s,ref:o,children:A.isValidElement(c)?A.cloneElement(c,void 0,u):null})}return p.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}const oE=C$("Slot");function k$(e){const t=A.forwardRef((n,r)=>{let{children:o,...i}=n;if(rE(o)&&typeof Dl=="function"&&(o=Dl(o._payload)),A.isValidElement(o)){const s=P$(o),a=A$(i,o.props);return o.type!==A.Fragment&&(a.ref=r?T$(r,s):s),A.cloneElement(o,a)}return A.Children.count(o)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}const R$=Symbol("radix.slottable");function I$(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===R$}function A$(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function P$(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)}const iE=(e="")=>Ie("w-full min-w-36 outline-none p-2.5 items-center flex justify-between text-left","hover:bg-primary focus:bg-primary aria-expanded:opacity-80","focus:text-primary-foreground hover:text-primary-foreground","first-of-type:rounded-t-lg last-of-type:rounded-b-lg","disabled:opacity-40 disabled:cursor-not-allowed",e),Zf=S.createContext({isOpen:!1,activeIndex:null,getItemProps:()=>({}),setActiveIndex:()=>{},setHasFocusInside:()=>{}}),Vx=S.forwardRef(({children:e,FloatingComponent:t="div",hover:n=!0,open:r,isParent:o=!1,restoreFocus:i=!1,floatingClassName:s="",label:a,...l},c)=>{const[u,d]=S.useState(r??!1),[f,m]=S.useState(!1),[g,y]=S.useState(null),h=S.useRef([]),v=S.useRef([]),x=S.useContext(Zf),b=Gr(),T=Yr(),E=TP(),R=xw(),w=b!==null,{floatingStyles:C,refs:I,context:P}=ir({nodeId:E,open:u,transform:!0,strategy:"absolute",onOpenChange:d,whileElementsMounted:Io,placement:w?"right":"bottom-start",middleware:[ji({mainAxis:w?0:4,alignmentAxis:w?-4:0}),ac(),sc()]}),M=wr(P,{role:"menu"}),j=Kr(P,{bubbles:!0}),L=Ap(P,{move:!1,enabled:n,delay:{open:Pw},handleClose:Aw({blockPointerEvents:!0,requireIntent:!1})}),O=Di(P,{toggle:!w,event:"mousedown",ignoreMouse:w,keyboardHandlers:!0}),N=uc(P,{loop:!0,activeIndex:g,nested:w,listRef:h,onNavigate:y}),V=KP(P,{activeIndex:g,listRef:v,resetMs:XP,onMatch:u?y:void 0}),{getReferenceProps:D,getFloatingProps:k,getItemProps:F}=sr([L,O,M,j,N,V]);S.useEffect(()=>{if(!T)return;const B=()=>d(!1),U=G=>{G.nodeId!==E&&G.parentId===b&&d(!1)};return T.events.on("click",B),T.events.on("menuopen",U),()=>{T.events.off("click",B),T.events.off("menuopen",U)}},[T,E,b]),S.useEffect(()=>{u&&T&&T.events.emit("menuopen",{parentId:b,nodeId:E})},[T,u,E,b]);const _=o?l.className:Ie(iE(l.className));return p.jsxs(EP,{id:E,children:[p.jsx(S.Fragment,{children:l.asChild?p.jsx(oE,{...D(x.getItemProps({...l,onFocus(B){l.onFocus?.(B),m(!1),x.setHasFocusInside(!0)}})),children:a,className:_,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:mr(I.setReference,R.ref,c),tabIndex:w?x.activeIndex===R.index?0:-1:void 0}):p.jsxs("button",{type:"button",className:_,"data-open":u?"":void 0,"data-nested":w?"":void 0,role:w?"menuitem":void 0,"data-focus-inside":f?"":void 0,ref:mr(I.setReference,R.ref,c),tabIndex:w?x.activeIndex===R.index?0:-1:void 0,...D(x.getItemProps({...l,onFocus(B){l.onFocus?.(B),m(!1),x.setHasFocusInside(!0)}})),children:[a,w&&p.jsxs("span",{style:{marginLeft:10,fontSize:10},children:[p.jsx("span",{className:"sr-only",children:"Next menu"}),p.jsx(Kl,{size:14})]})]})}),p.jsx(Zf.Provider,{value:{activeIndex:g,setActiveIndex:y,getItemProps:F,setHasFocusInside:m,isOpen:u},children:p.jsx(gP,{elementsRef:h,labelsRef:v,children:u&&p.jsx(br,{children:p.jsx(Ao,{context:P,modal:!1,initialFocus:w?-1:0,returnFocus:o?i:!w,children:p.jsx(t,{...k(),ref:I.setFloating,style:{...l.style,...C},className:Ie("isolate z-tooltip flex max-h-80 flex-col items-start overflow-y-auto rounded-lg border border-floating-border bg-floating-background text-left shadow-shadow-floating outline-none",s),children:e})})})})})]})}),O$=S.forwardRef(({title:e,Right:t,disabled:n,children:r,...o},i)=>{const s=S.useContext(Zf),a=xw({label:n?null:e}),l=Yr(),c=a.index===s.activeIndex;return p.jsxs("button",{...o,title:e,type:"button",role:"menuitem",disabled:n,"data-active":c,"data-open":s.isOpen,tabIndex:c?0:-1,ref:mr(a.ref,i),className:iE(`${o.className??""} ${c?"bg-primary text-primary-foreground":""}`),...s.getItemProps({onClick(u){o.onClick?.(u),l?.events.emit("click")},onFocus(u){o.onFocus?.(u),s.setHasFocusInside(!0)}}),children:[r,t?p.jsx(t,{size:16}):null]})}),j$=S.forwardRef((e,t)=>Gr()===null?p.jsx(CP,{children:p.jsx(Vx,{...e,isParent:!0,ref:t})}):p.jsx(Vx,{...e,isParent:!1,ref:t})),Ym=S.forwardRef(({children:e,asTask:t=!1,labelClassName:n,loading:r,error:o,className:i="",size:s,container:a,...l},c)=>{const u=l.disabled||r;return p.jsxs("label",{"aria-disabled":u,"data-disabled":u,"data-task":t,"data-component":"checkbox",className:Ie("group flex w-fit flex-wrap items-center font-normal data-[disabled=true]:cursor-not-allowed",t?"group-checkbox-checked:line-through":"",a),children:[p.jsx("input",{...l,ref:c,disabled:u,type:"checkbox","data-task":t,className:Ie("form-checkbox mr-2 inline-block size-4 appearance-none rounded border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",i)}),e,p.jsx("span",{"data-name":"checkbox-label",className:Ie("min-w-full flex-1 text-xs text-danger empty:mt-0 empty:hidden",n),children:o})]})}),D$=({children:e,className:t="",size:n,...r})=>p.jsxs("label",{"data-component":"radiobox","data-disabled":r.disabled,"aria-disabled":r.disabled,className:"group flex items-center gap-2 font-normal data-[disabled=true]:cursor-not-allowed",children:[p.jsx("input",{...r,type:"radio",className:Ie("app form-radio inline-block h-4 w-4 appearance-none rounded-full border-card-border bg-origin-border text-primary focus:ring-primary disabled:opacity-70 group-aria-disabled:cursor-not-allowed",t),...r}),e]}),M$=Mw("textarea","textarea",{container:"w-full"},e=>{const t=()=>{const n=e.value.split(`
16
+ `);if(e.style.height="auto",n.length>1)return void(e.style.height=`${e.scrollHeight}px`)};return e.addEventListener("input",t),()=>e.removeEventListener("input",t)}),N$=(e,t)=>$r()?t:window.matchMedia(e).matches,_$=(e,t=!0)=>{const[n,r]=S.useState(t);return S.useLayoutEffect(()=>{const o=window.matchMedia(e),i=()=>r(N$(e,t));return i(),o.addListener?(o.addListener(i),()=>o.removeListener?o.removeListener(i):void 0):(o.addEventListener("change",i),()=>o.removeEventListener("change",i))},[e]),n},F$=()=>S.useContext(ko).floatingRef??void 0,sE=S.createContext(async()=>!1),L$=()=>S.useContext(sE),Sn="500ms",V$={exit:{x:["0%","-30%"],opacity:0,animationDuration:Sn},enter:{x:["-30%","0%"],opacity:1,animationDuration:Sn},initial:{x:["-30%","0%"],opacity:.8,animationDuration:Sn}},$$={enter:{x:"0%",opacity:1,animationDuration:Sn},exit:{x:["0%","30%"],opacity:0,animationDuration:Sn},initial:{x:["30%","0%"],opacity:.8,animationDuration:Sn}},kd={drawer:e=>e==="left"?V$:$$,sheet:{enter:{opacity:1,y:"0%",animationDuration:Sn,transformOrigin:"bottom"},exit:{opacity:.4,y:"10%",animationDuration:Sn,transformOrigin:"bottom"},initial:{opacity:.7,y:"10%",animationDuration:Sn,transformOrigin:"bottom"}},dialog:{exit:{opacity:0,scale:.95,animationDuration:Sn},enter:{opacity:1,scale:[1.05,1],animationDuration:Sn},initial:{opacity:.5,scale:.95,animationDuration:Sn,transition:{duration:.5,ease:"easeInOut"}}}},z$=ki("z-floating border border-floating-border ring-0 outline-0 appearance-none flex flex-col gap-4 flex-nowrap min-w-xs bg-floating-background",{variants:{type:{drawer:"max-h-screen max-w-[90%] absolute w-fit h-screen min-h-0",dialog:"max-h-[calc(100lvh-10%)] relative container h-min rounded-lg py-4",sheet:"w-screen absolute bottom-0 max-h-[calc(100vh-15%)] max-h-[calc(100svh-5%)] h-screen pt-6 pb-4 rounded-t-lg"},position:{none:"",right:"py-4 absolute right-0 top-0 rounded-l-lg",left:"py-4 absolute left-0 top-0 rounded-r-lg"}},defaultVariants:{position:"right",type:"dialog"}}),aE={top:0,left:0,right:0,bottom:0},lE=e=>e*.6,B$=e=>{const t=(n,r)=>{if(e.parent.current){if(n.stopPropagation(),n.stopImmediatePropagation(),e.sheet){const c=e.parent.current.getBoundingClientRect(),u=e.value.get()||c.height,d=Math.abs(u-r.delta.y),f=window.outerHeight,m=lE(f);return d>=m?e.value.set(d):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),e.onChange(!1),setTimeout(()=>e.value.set(void 0),350))}const o=e.parent.current,i=e.value.get()||o.getBoundingClientRect().width,s=e.position==="right"?-r.delta.x:r.delta.x,a=Math.abs(i+s);return e.value.set(a)}};return p.jsx(Le.button,{draggable:!0,dragListener:!0,dragMomentum:!0,type:"button",animate:!1,dragElastic:0,dragPropagation:!0,initial:!1,onDrag:t,dragSnapToOrigin:!0,dragDirectionLock:!0,drag:e.sheet?"y":"x",dragConstraints:aE,whileDrag:{cursor:"grabbing"},className:Ie("absolute isolate z-calendar rounded-lg",e.sheet?"cursor-row-resize":"cursor-col-resize bg-floating-border",e.sheet?"top-1 flex h-3 w-full justify-center py-2":e.position==="left"?"right-5 top-1/2 h-10 w-2":"left-2 top-1/2 h-10 w-2"),children:e.sheet?p.jsx("div",{className:"h-2 w-1/4 rounded-lg bg-floating-border"}):null})},Fa={drawer:"right",sheet:"none",dialog:"none"},H$=(e,t,n,r)=>{const o=n||"dialog";return e?n==="drawer"?r??Fa.drawer:Fa[o]:t?Fa[o]:Fa.sheet},W$=[],ca=S.forwardRef(({open:e,title:t,footer:n,asChild:r,trigger:o,children:i,onChange:s,ariaTitle:a,className:l,bodyClassName:c,resizer:u=!0,animated:d=!0,closable:f=!0,forceType:m=!1,layoutId:g=void 0,overlayClassName:y="",type:h="dialog",position:v,overlayClickClose:x=!1,closeOnFocusOut:b=!1,interactions:T=W$,...E},R)=>{const w=F$(),C=S.useRef(null),I=S.useRef(null),P=S.useId(),M=S.useId(),j=_$("(min-width: 64rem)"),L=H$(j,m,h,v),O=j||m?kd[h]:kd.sheet,N=typeof O=="function"?O(L):O,V=j||m?h:"sheet",D=V!=="dialog",k=ir({open:e,onOpenChange:s,strategy:"fixed"}),F=Di(k.context,{}),_=wr(k.context,{role:"dialog"}),B=Kr(k.context,{bubbles:!0,escapeKey:!0,outsidePress:le=>{const Q=le.target;return x&&!!Q?.isConnected}}),U=sr([F,B,_].concat(T)),G=o,H=po(void 0),ee=po(void 0),ie=S.useRef(!1),te=S.useRef(0);S.useEffect(()=>{H.set(void 0),ee.set(void 0)},[V,H,ee]);const q=()=>s(!1);S.useImperativeHandle(R,()=>({context:k.context,floating:I.current}),[k.context,I]);const Z=V==="sheet"?{drag:"y",animate:!1,dragElastic:0,initial:!1,dragConstraints:aE,draggable:!0,dragListener:!0,dragMomentum:!0,onDrag:(le,Q)=>{const re=k.refs.floating.current.getBoundingClientRect(),pe=H.get()||re.height,oe=Math.abs(pe-Q.delta.y),ae=window.outerHeight,ve=lE(ae);return oe>=ve?H.set(oe):(document.activeElement instanceof HTMLElement&&document.activeElement?.blur(),s?.(!1),setTimeout(()=>H.set(void 0),350))},dragPropagation:!0,dragSnapToOrigin:!0,dragDirectionLock:!0,whileDrag:{cursor:"grabbing"}}:{animate:d,initial:!1},fe=po(void 0),z=po(void 0),se=r?oE:Le.button;return p.jsxs(S.Fragment,{children:[o?p.jsx(se,{ref:k.refs.setReference,...U.getReferenceProps(),layoutId:g,type:"button",children:G}):null,p.jsx(vm,{reducedMotion:d?"user":"always",children:p.jsx(br,{preserveTabOrder:!0,root:w,children:p.jsx(xn,{mode:"wait",propagate:!0,children:e?p.jsx(jp,{lockScroll:!0,className:Ie("inset-0 isolate z-overlay flex h-[100dvh] !overflow-clip bg-floating-overlay/80",V==="drawer"?"":"items-start justify-center pt-10 lg:p-10",y),children:p.jsx(Ao,{guards:!0,modal:!0,closeOnFocusOut:b,context:k.context,children:p.jsx(xn,{propagate:!0,children:p.jsxs(Le.div,{...E,...t?{"aria-labelledby":P,"aria-describedby":M}:{"aria-label":a},...U.getFloatingProps({"aria-modal":e,ref:mr(k.refs.setFloating,I),className:Ie(z$({position:L,type:V}),l,"isolate overscroll-contain")}),exit:"exit",layout:!0,animate:"enter",initial:"initial",layoutId:g,variants:N,"data-component":"modal",style:V==="drawer"?{width:H}:{height:H,y:ee},children:[D&&u?p.jsx(B$,{onChange:s,value:H,sheet:V==="sheet",position:L,parent:k.refs.floating}):null,t?p.jsx(Le.header,{...Z,className:"relative isolate w-full",children:t?p.jsx("h2",{id:P,className:"block select-text border-b border-floating-border px-8 pb-2 text-3xl font-medium leading-relaxed",children:t}):null}):null,p.jsx(Le.section,{ref:C,"data-component":"modal-body",className:Ie("flex-1 select-text overflow-y-auto px-8 py-1",c),onTouchEnd:async()=>{if(z.set(void 0),fe.set(void 0),ie.current){const le=ee.get()||0,Q=window.innerHeight*.2;le>Q?(await Uv(ee,window.innerHeight,{duration:.2,ease:"easeIn"}).finished,s(!1)):Uv(ee,0,{type:"spring",bounce:0,duration:.3}),ie.current=!1}},onTouchStart:le=>{const Q=le.changedTouches[0];fe.set(Q.pageY),z.set(Q.pageY),ie.current=!1},onTouchMove:le=>{const ce=le.changedTouches[0].pageY,re=z.get()||ce,pe=C.current?.scrollTop||0;if(!ie.current&&pe<=0&&ce>re&&V==="sheet"&&(ie.current=!0,te.current=ce),ie.current){const oe=ce-te.current;oe<0?ee.set(oe*.2):ee.set(oe)}z.set(ce)},children:i}),n?p.jsx("footer",{className:"w-full select-text border-t border-floating-border px-8 pt-4",children:n}):null,f?p.jsx("nav",{className:"absolute right-4 top-1 z-floating",children:p.jsx("button",{type:"button",onClick:q,className:"p-1 opacity-70 transition-colors hover:text-danger hover:opacity-100 focus:text-danger",children:p.jsx(Pi,{})})}):null]})})})}):null})})})]})});let cE=async e=>(typeof window<"u"&&console.warn("ConfirmationProvider is not mounted"),!1);ca.confirm=e=>cE(e);const uE=({children:e})=>{const[t,n]=S.useState(!1),[r,o]=S.useState({}),[i,s]=S.useState(()=>{}),a=S.useCallback(u=>(o(u),n(!0),new Promise(d=>{s(()=>d)})),[]);S.useEffect(()=>{cE=a},[a]);const l=()=>{n(!1);const u=r.confirm?.value??!0;i(u??!0)},c=()=>{n(!1);const u=r.cancel?.value??!1;i(u??!1)};return p.jsxs(sE.Provider,{value:a,children:[e,p.jsx(ca,{open:t,type:"dialog",closable:!1,onChange:n,overlayClickClose:!1,title:r.title||"Confirmation",className:"container max-w-dialog lg:max-w-96",footer:p.jsxs("div",{className:"flex justify-end gap-2",children:[p.jsx(Qt,{theme:r.cancel?.theme||"ghost-muted",onClick:c,children:r.cancel?.text||"Cancel"}),p.jsx(Qt,{autoFocus:!0,theme:r.confirm?.theme||"primary",onClick:l,children:r.confirm?.text||"Confirm"})]}),children:p.jsx("div",{className:"py-2 text-foreground",children:r.description})})]})},q$=e=>{const[t,n]=W2();return S.useEffect(()=>{const r=t.current;if(!r)return;const o=i=>{const s=i.target,a=Array.from(r.querySelectorAll("input[data-task=true]")),l=a.every(u=>u.checked),c=a.indexOf(s);l&&c!==-1&&n("input",{scale:[1,1.35,1],rotate:[0,20,-20,0]},{duration:.5,delay:UM(.075,{from:c})})};return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[]),p.jsx("fieldset",{...e,"data-component":"task-list",ref:t})},U$=e=>p.jsx("p",{...e,className:Ie("text-base leading-snug",e.className)}),G$=e=>p.jsx("p",{...e,className:Ie("mb-kilo text-sm text-secondary",e.className)}),Y$=e=>p.jsx("div",{className:Ie(`flex ${e.row?"flex-row items-center":"flex-col"} gap-1`,e.className),children:p.jsxs(S.Fragment,{children:[p.jsx("span",{className:"text-sm font-medium tracking-wide",children:e.row?`${e.label}:`:e.label}),p.jsx("span",{className:Ie(e.disabled?"text-disabled":"",e.row?"w-fit text-base":"w-full text-lg"),children:e.children})]})}),dE=e=>p.jsxs("div",{children:[p.jsx("h2",{className:"typography text-3xl font-bold tracking-wide",children:e.title}),p.jsx("p",{className:"typography text-secondary",children:e.children})]}),K$=e=>p.jsxs("header",{className:"gap-mega min-w-full flex flex-row flex-wrap items-center justify-between",children:[p.jsx("div",{children:p.jsx(dE,{title:e.title,children:e.description})}),p.jsx("div",{className:"gap-kilo flex flex-wrap items-center",children:e.children})]}),fE=e=>p.jsx("span",{"aria-busy":"true","aria-description":"Carregando...",className:Ie("box-border inline-block aspect-square size-12 animate-spin rounded-full border-4 border-background border-b-primary",e.className)}),Z$=()=>p.jsx("div",{className:"flex h-full w-full items-center justify-center p-12",children:p.jsx(fE,{})}),X$=e=>{const t=S.useRef(null),n=S.useId(),r=`${n}:wrapper`,o=`${n}:title`,[i,s]=S.useState(e.open??!1);S.useEffect(()=>{s(e.open??!1)},[e.open]);const{context:a,refs:l}=ir({transform:!0,open:i!==null,nodeId:n,onOpenChange:s,strategy:"absolute"}),c=Di(a,{enabled:e.disabled??!0}),u=wr(a,{role:"tooltip"}),d=Kr(a,{escapeKey:!0,referencePress:!0,outsidePress:!0}),{getFloatingProps:f,getReferenceProps:m}=sr([c,u,d]);return p.jsxs("div",{className:"relative inline-flex items-center justify-center",ref:t,children:[p.jsx(Qt,{...m(e),as:Le.button,layoutId:r,ref:l.setReference,size:"small",onClick:()=>s(!0),children:p.jsx(Le.span,{layoutId:o,children:e.trigger})}),p.jsx(xn,{children:i?p.jsx(br,{root:t,children:p.jsx(Ao,{visuallyHiddenDismiss:!0,modal:!0,closeOnFocusOut:!0,context:a,children:p.jsx(Le.div,{...f(),ref:l.setFloating,layoutId:r,className:"absolute -left-1/4 -top-3/4",children:e.children})})}):null})]})},Q$=(e,t)=>{const n=S.useRef(t);n.current=t,S.useEffect(()=>{if(!e)return;const r=new ResizeObserver(o=>{o[0]&&n.current(o[0])});return r.observe(e),()=>r.disconnect()},[e])},J$=()=>{const[e,t]=S.useState({width:0,height:0});return S.useEffect(()=>{if(typeof window>"u")return;const n=()=>t({width:window.innerWidth,height:window.innerHeight});return n(),window.addEventListener("resize",n,{passive:!0}),()=>window.removeEventListener("resize",n)},[]),e},ez=e=>({top:0,left:0,width:0,height:0,bottom:0,right:0}),tz=e=>typeof e=="string"?document.querySelector(e):"current"in e?e.current:e,nz=({steps:e,active:t=!1,onClose:n=ri,onFinish:r=ri,onChange:o=ri,labels:i})=>{const s=yt(),[a,l]=S.useState(0),c=e[a],[u,d]=S.useState(null),[f,m]=S.useState(ez()),[g,y]=S.useState(!1),h=S.useRef(null),{width:v,height:x}=J$(),b={next:i?.next??s.wizardNext,previous:i?.previous??s.wizardPrev,finish:i?.finish??s.wizardFinish,skip:i?.skip??s.wizardSkip},{refs:T,floatingStyles:E,context:R}=ir({open:t&&g,placement:c?.side||"bottom",whileElementsMounted:Io,middleware:[ji(10),ac(),sc(),Rp({element:h})]}),{getFloatingProps:w}=sr([wr(R)]);S.useEffect(()=>{t&&l(0)},[t]),S.useEffect(()=>{y(!1)},[a,t]),S.useEffect(()=>{if(!t||!c)return;const j=tz(c.element);j?(c.onEnter?.(),setTimeout(()=>{m(j.getBoundingClientRect()),T.setReference(j),d(j)},100)):(console.warn("Driver: Element not found:",c.element),d(null),m({top:0,left:0,width:0,height:0,bottom:0,right:0}))},[a,t,c,T]),S.useLayoutEffect(()=>{if(!u)return;const j=()=>m(u.getBoundingClientRect());return j(),window.addEventListener("scroll",j,{capture:!0,passive:!0}),window.addEventListener("resize",j,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",j,{capture:!0}),window.removeEventListener("resize",j,{capture:!0})}},[u,v,x]),Q$(u,j=>{m(j.target.getBoundingClientRect())});const C=()=>{c.onNext?.(),setTimeout(()=>{a<e.length-1?(l(j=>j+1),o(a+1)):(r(),n())},0)},I=()=>{c.onPrevious?.(),a>0&&(l(j=>j-1),o(a-1))};if(!t)return null;const P=a<e.length-1,M=a>0;return p.jsx(br,{children:p.jsxs("div",{className:"pointer-events-none fixed inset-0 z-wizard",children:[p.jsxs("svg",{className:"absolute inset-0 h-full w-full fill-current text-floating-overlay/70",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("defs",{children:p.jsxs("mask",{id:"driver-mask",children:[p.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"white"}),p.jsx(Le.rect,{rx:"4",fill:"black",initial:!1,onAnimationComplete:()=>y(!0),transition:{type:"spring",duration:.5,ease:"easeInOut"},animate:{x:f.left-5,y:f.top-5,width:f.width+10,height:f.height+10}})]})}),p.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",mask:"url(#driver-mask)",className:"pointer-events-auto"})]}),p.jsx(xn,{mode:"wait",children:c&&g&&p.jsx("div",{...w(),ref:T.setFloating,style:u?E:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},className:"pointer-events-auto outline-none",children:p.jsxs(Le.div,{transition:{duration:.2},exit:{opacity:0,scale:.9},animate:{opacity:1,scale:1},initial:{opacity:0,scale:.9},className:"flex w-80 max-w-sm flex-col gap-3 rounded-lg border border-floating-border bg-floating-background p-4 shadow-lg",children:[u&&p.jsx(Ip,{ref:h,context:R,className:"fill-floating-background stroke-floating-border"}),c.title&&p.jsx("h3",{children:c.title}),c.description&&p.jsx(S.Fragment,{children:c.description}),p.jsxs("div",{className:"mt-2 flex items-center justify-between border-t border-floating-border pt-2",children:[p.jsx(Qt,{theme:"raw",size:"small",onClick:n,className:"text-xs text-muted-foreground hover:text-foreground",children:b.skip}),p.jsxs("div",{className:"flex gap-2",children:[M&&p.jsx(Qt,{size:"small",theme:"ghost-muted",onClick:I,children:b.previous}),p.jsx(Qt,{size:"small",onClick:C,children:P?b.next:b.finish})]})]}),p.jsxs("div",{className:"absolute right-2 top-2 text-xs text-muted-foreground",children:[a+1," / ",e.length]})]})})})]})})},pE=6048e5,rz=864e5,oz=6e4,iz=36e5,sz=1e3,$x=Symbol.for("constructDateFrom");function dt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&$x in e?e[$x](t):e instanceof Date?new e.constructor(t):new Date(t)}function Xe(e,t){return dt(t||e,e)}function to(e,t,n){const r=Xe(e,n?.in);return isNaN(t)?dt(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Km(e,t,n){const r=Xe(e,n?.in);if(isNaN(t))return dt(e,NaN);if(!t)return r;const o=r.getDate(),i=dt(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const s=i.getDate();return o>=s?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}function ei(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=Xe(e,n?.in),d=o||r?Km(u,o+r*12):u,f=s||i?to(d,s+i*7):d,m=l+a*60,y=(c+m*60)*1e3;return dt(e,+f+y)}let az={};function Oo(){return az}function Rn(e,t){const n=Oo(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Xe(e,t?.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function xi(e,t){return Rn(e,{...t,weekStartsOn:1})}function mE(e,t){const n=Xe(e,t?.in),r=n.getFullYear(),o=dt(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=xi(o),s=dt(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=xi(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function Ml(e){const t=Xe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function jc(e,...t){const n=dt.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Eo(e,t){const n=Xe(e,t?.in);return n.setHours(0,0,0,0),n}function lz(e,t,n){const[r,o]=jc(n?.in,e,t),i=Eo(r),s=Eo(o),a=+i-Ml(i),l=+s-Ml(s);return Math.round((a-l)/rz)}function cz(e,t){const n=mE(e,t),r=dt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),xi(r)}function hE(e,t,n){return to(e,t*7,n)}function uz(e){return dt(e,Date.now())}function dz(e,t,n){const[r,o]=jc(n?.in,e,t);return+Eo(r)==+Eo(o)}function fz(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Nl(e){return!(!fz(e)&&typeof e!="number"||isNaN(+Xe(e)))}function pz(e,t){const[n,r]=jc(e,t.start,t.end);return{start:n,end:r}}function gE(e,t){const{start:n,end:r}=pz(t?.in,e);let o=+n>+r;const i=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0);let a=1;const l=[];for(;+s<=i;)l.push(dt(n,s)),s.setDate(s.getDate()+a),s.setHours(0,0,0,0);return o?l.reverse():l}function Zm(e,t){const n=Xe(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function mz(e,t){const n=Xe(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function hz(e,t){const n=Oo(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Xe(e,t?.in),i=o.getDay(),s=(i<r?-7:0)+6-(i-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}const gz={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},yz=(e,t,n)=>{let r;const o=gz[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Rd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const vz={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xz={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},bz={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},wz={date:Rd({formats:vz,defaultWidth:"full"}),time:Rd({formats:xz,defaultWidth:"full"}),dateTime:Rd({formats:bz,defaultWidth:"full"})},Sz={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Tz=(e,t,n,r)=>Sz[e];function Gi(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n?.width?String(n.width):s;o=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n?.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const Ez={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Cz={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},kz={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Rz={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Iz={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Az={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Pz=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Oz={ordinalNumber:Pz,era:Gi({values:Ez,defaultWidth:"wide"}),quarter:Gi({values:Cz,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Gi({values:kz,defaultWidth:"wide"}),day:Gi({values:Rz,defaultWidth:"wide"}),dayPeriod:Gi({values:Iz,defaultWidth:"wide",formattingValues:Az,defaultFormattingWidth:"wide"})};function Yi(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const s=i[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?Dz(a,d=>d.test(s)):jz(a,d=>d.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const u=t.slice(s.length);return{value:c,rest:u}}}function jz(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Dz(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Mz(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(o.length);return{value:s,rest:a}}}const Nz=/^(\d+)(th|st|nd|rd)?/i,_z=/\d+/i,Fz={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Lz={any:[/^b/i,/^(a|c)/i]},Vz={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$z={any:[/1/i,/2/i,/3/i,/4/i]},zz={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Bz={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Hz={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Wz={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},qz={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Uz={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Gz={ordinalNumber:Mz({matchPattern:Nz,parsePattern:_z,valueCallback:e=>parseInt(e,10)}),era:Yi({matchPatterns:Fz,defaultMatchWidth:"wide",parsePatterns:Lz,defaultParseWidth:"any"}),quarter:Yi({matchPatterns:Vz,defaultMatchWidth:"wide",parsePatterns:$z,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Yi({matchPatterns:zz,defaultMatchWidth:"wide",parsePatterns:Bz,defaultParseWidth:"any"}),day:Yi({matchPatterns:Hz,defaultMatchWidth:"wide",parsePatterns:Wz,defaultParseWidth:"any"}),dayPeriod:Yi({matchPatterns:qz,defaultMatchWidth:"any",parsePatterns:Uz,defaultParseWidth:"any"})},yE={code:"en-US",formatDistance:yz,formatLong:wz,formatRelative:Tz,localize:Oz,match:Gz,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Yz(e,t){const n=Xe(e,t?.in);return lz(n,mz(n))+1}function Xm(e,t){const n=Xe(e,t?.in),r=+xi(n)-+cz(n);return Math.round(r/pE)+1}function Qm(e,t){const n=Xe(e,t?.in),r=n.getFullYear(),o=Oo(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=dt(t?.in||e,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const a=Rn(s,t),l=dt(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=Rn(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function Kz(e,t){const n=Oo(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Qm(e,t),i=dt(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Rn(i,t)}function vE(e,t){const n=Xe(e,t?.in),r=+Rn(n,t)-+Kz(n,t);return Math.round(r/pE)+1}function ct(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Cr={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ct(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ct(n+1,2)},d(e,t){return ct(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ct(e.getHours()%12||12,t.length)},H(e,t){return ct(e.getHours(),t.length)},m(e,t){return ct(e.getMinutes(),t.length)},s(e,t){return ct(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ct(o,t.length)}},zo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zx={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Cr.y(e,t)},Y:function(e,t,n,r){const o=Qm(e,r),i=o>0?o:1-o;if(t==="YY"){const s=i%100;return ct(s,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):ct(i,t.length)},R:function(e,t){const n=mE(e);return ct(n,t.length)},u:function(e,t){const n=e.getFullYear();return ct(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ct(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ct(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Cr.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ct(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=vE(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ct(o,t.length)},I:function(e,t,n){const r=Xm(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ct(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Cr.d(e,t)},D:function(e,t,n){const r=Yz(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ct(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ct(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ct(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ct(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=zo.noon:r===0?o=zo.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=zo.evening:r>=12?o=zo.afternoon:r>=4?o=zo.morning:o=zo.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Cr.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Cr.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ct(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ct(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Cr.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Cr.s(e,t)},S:function(e,t){return Cr.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Hx(r);case"XXXX":case"XX":return lo(r);default:return lo(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Hx(r);case"xxxx":case"xx":return lo(r);default:return lo(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Bx(r,":");default:return"GMT"+lo(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Bx(r,":");default:return"GMT"+lo(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ct(r,t.length)},T:function(e,t,n){return ct(+e,t.length)}};function Bx(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+t+ct(i,2)}function Hx(e,t){return e%60===0?(e>0?"-":"+")+ct(Math.abs(e)/60,2):lo(e,t)}function lo(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ct(Math.trunc(r/60),2),i=ct(r%60,2);return n+o+t+i}const Wx=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},xE=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Zz=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Wx(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Wx(r,t)).replace("{{time}}",xE(o,t))},Xf={p:xE,P:Zz},Xz=/^D+$/,Qz=/^Y+$/,Jz=["D","DD","YY","YYYY"];function bE(e){return Xz.test(e)}function wE(e){return Qz.test(e)}function Qf(e,t,n){const r=e4(e,t,n);if(console.warn(r),Jz.includes(e))throw new RangeError(r)}function e4(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const t4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,n4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,r4=/^'([^]*?)'?$/,o4=/''/g,i4=/[a-zA-Z]/;function Jf(e,t,n){const r=Oo(),o=r.locale??yE,i=r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=r.weekStartsOn??r.locale?.options?.weekStartsOn??0,a=Xe(e,n?.in);if(!Nl(a))throw new RangeError("Invalid time value");let l=t.match(n4).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Xf[d];return f(u,o.formatLong)}return u}).join("").match(t4).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:s4(u)};if(zx[d])return{isToken:!0,value:u};if(d.match(i4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(a,l));const c={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return l.map(u=>{if(!u.isToken)return u.value;const d=u.value;(wE(d)||bE(d))&&Qf(d,t,String(e));const f=zx[d[0]];return f(a,d,o.localize,c)}).join("")}function s4(e){const t=e.match(r4);return t?t[1].replace(o4,"'"):e}function a4(e,t){const n=Xe(e,t?.in),r=n.getFullYear(),o=n.getMonth(),i=dt(n,0);return i.setFullYear(r,o+1,0),i.setHours(0,0,0,0),i.getDate()}function l4(){return Object.assign({},Oo())}function c4(e,t){const n=Xe(e,t?.in).getDay();return n===0?7:n}function u4(e,t){return+Xe(e)>+Xe(t)}function d4(e,t){return+Xe(e)<+Xe(t)}function f4(e,t){const n=p4(t)?new t(0):dt(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function p4(e){return typeof e=="function"&&e.prototype?.constructor===e}const m4=10;class SE{subPriority=0;validate(t,n){return!0}}class h4 extends SE{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class g4 extends SE{priority=m4;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>dt(n,r))}set(t,n){return n.timestampIsSet?t:dt(t,f4(t,this.context))}}class ot{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new h4(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class y4 extends ot{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Ot={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Yn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function jt(e,t){return e&&{value:t(e.value),rest:e.rest}}function Rt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Kn(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,s=n[5]?parseInt(n[5],10):0;return{value:r*(o*iz+i*oz+s*sz),rest:t.slice(n[0].length)}}function TE(e){return Rt(Ot.anyDigitsSigned,e)}function At(e,t){switch(e){case 1:return Rt(Ot.singleDigit,t);case 2:return Rt(Ot.twoDigits,t);case 3:return Rt(Ot.threeDigits,t);case 4:return Rt(Ot.fourDigits,t);default:return Rt(new RegExp("^\\d{1,"+e+"}"),t)}}function _l(e,t){switch(e){case 1:return Rt(Ot.singleDigitSigned,t);case 2:return Rt(Ot.twoDigitsSigned,t);case 3:return Rt(Ot.threeDigitsSigned,t);case 4:return Rt(Ot.fourDigitsSigned,t);default:return Rt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Jm(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function EE(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,s=Math.trunc(i/100)*100,a=e>=i%100;o=e+s-(a?100:0)}return n?o:1-o}function CE(e){return e%400===0||e%4===0&&e%100!==0}class v4 extends ot{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return jt(At(4,t),o);case"yo":return jt(r.ordinalNumber(t,{unit:"year"}),o);default:return jt(At(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const s=EE(r.year,o);return t.setFullYear(s,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class x4 extends ot{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return jt(At(4,t),o);case"Yo":return jt(r.ordinalNumber(t,{unit:"year"}),o);default:return jt(At(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=Qm(t,o);if(r.isTwoDigitYear){const a=EE(r.year,i);return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Rn(t,o)}const s=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Rn(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class b4 extends ot{priority=130;parse(t,n){return _l(n==="R"?4:n.length,t)}set(t,n,r){const o=dt(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),xi(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class w4 extends ot{priority=130;parse(t,n){return _l(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class S4 extends ot{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return At(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class T4 extends ot{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return At(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class E4 extends ot{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return jt(Rt(Ot.month,t),o);case"MM":return jt(At(2,t),o);case"Mo":return jt(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class C4 extends ot{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return jt(Rt(Ot.month,t),o);case"LL":return jt(At(2,t),o);case"Lo":return jt(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function k4(e,t,n){const r=Xe(e,n?.in),o=vE(r,n)-t;return r.setDate(r.getDate()-o*7),Xe(r,n?.in)}class R4 extends ot{priority=100;parse(t,n,r){switch(n){case"w":return Rt(Ot.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return At(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return Rn(k4(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function I4(e,t,n){const r=Xe(e,n?.in),o=Xm(r,n)-t;return r.setDate(r.getDate()-o*7),r}class A4 extends ot{priority=100;parse(t,n,r){switch(n){case"I":return Rt(Ot.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return At(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return xi(I4(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const P4=[31,28,31,30,31,30,31,31,30,31,30,31],O4=[31,29,31,30,31,30,31,31,30,31,30,31];class j4 extends ot{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return Rt(Ot.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return At(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=CE(r),i=t.getMonth();return o?n>=1&&n<=O4[i]:n>=1&&n<=P4[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class D4 extends ot{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return Rt(Ot.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return At(n.length,t)}}validate(t,n){const r=t.getFullYear();return CE(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function eh(e,t,n){const r=Oo(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Xe(e,n?.in),s=i.getDay(),l=(t%7+7)%7,c=7-o,u=t<0||t>6?t-(s+c)%7:(l+c)%7-(s+c)%7;return to(i,u,n)}class M4 extends ot{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=eh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class N4 extends ot{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"e":case"ee":return jt(At(n.length,t),i);case"eo":return jt(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=eh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class _4 extends ot{priority=90;parse(t,n,r,o){const i=s=>{const a=Math.floor((s-1)/7)*7;return(s+o.weekStartsOn+6)%7+a};switch(n){case"c":case"cc":return jt(At(n.length,t),i);case"co":return jt(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=eh(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function F4(e,t,n){const r=Xe(e,n?.in),o=c4(r,n),i=t-o;return to(r,i,n)}class L4 extends ot{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return At(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return jt(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return jt(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return jt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);default:return jt(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=F4(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class V4 extends ot{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Jm(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class $4 extends ot{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Jm(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class z4 extends ot{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(Jm(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class B4 extends ot{priority=70;parse(t,n,r){switch(n){case"h":return Rt(Ot.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return At(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class H4 extends ot{priority=70;parse(t,n,r){switch(n){case"H":return Rt(Ot.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return At(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class W4 extends ot{priority=70;parse(t,n,r){switch(n){case"K":return Rt(Ot.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return At(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class q4 extends ot{priority=70;parse(t,n,r){switch(n){case"k":return Rt(Ot.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return At(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class U4 extends ot{priority=60;parse(t,n,r){switch(n){case"m":return Rt(Ot.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return At(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class G4 extends ot{priority=50;parse(t,n,r){switch(n){case"s":return Rt(Ot.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return At(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class Y4 extends ot{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return jt(At(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class K4 extends ot{priority=10;parse(t,n){switch(n){case"X":return Kn(Yn.basicOptionalMinutes,t);case"XX":return Kn(Yn.basic,t);case"XXXX":return Kn(Yn.basicOptionalSeconds,t);case"XXXXX":return Kn(Yn.extendedOptionalSeconds,t);default:return Kn(Yn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:dt(t,t.getTime()-Ml(t)-r)}incompatibleTokens=["t","T","x"]}class Z4 extends ot{priority=10;parse(t,n){switch(n){case"x":return Kn(Yn.basicOptionalMinutes,t);case"xx":return Kn(Yn.basic,t);case"xxxx":return Kn(Yn.basicOptionalSeconds,t);case"xxxxx":return Kn(Yn.extendedOptionalSeconds,t);default:return Kn(Yn.extended,t)}}set(t,n,r){return n.timestampIsSet?t:dt(t,t.getTime()-Ml(t)-r)}incompatibleTokens=["t","T","X"]}class X4 extends ot{priority=40;parse(t){return TE(t)}set(t,n,r){return[dt(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class Q4 extends ot{priority=20;parse(t){return TE(t)}set(t,n,r){return[dt(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const J4={G:new y4,y:new v4,Y:new x4,R:new b4,u:new w4,Q:new S4,q:new T4,M:new E4,L:new C4,w:new R4,I:new A4,d:new j4,D:new D4,E:new M4,e:new N4,c:new _4,i:new L4,a:new V4,b:new $4,B:new z4,h:new B4,H:new H4,K:new W4,k:new q4,m:new U4,s:new G4,S:new Y4,X:new K4,x:new Z4,t:new X4,T:new Q4},eB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nB=/^'([^]*?)'?$/,rB=/''/g,oB=/\S/,iB=/[a-zA-Z]/;function sB(e,t,n,r){const o=()=>dt(n,NaN),i=l4(),s=i.locale??yE,a=i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=i.weekStartsOn??i.locale?.options?.weekStartsOn??0;if(!t)return e?o():Xe(n,r?.in);const c={firstWeekContainsDate:a,weekStartsOn:l,locale:s},u=[new g4(r?.in,n)],d=t.match(tB).map(h=>{const v=h[0];if(v in Xf){const x=Xf[v];return x(h,s.formatLong)}return h}).join("").match(eB),f=[];for(let h of d){wE(h)&&Qf(h,t,e),bE(h)&&Qf(h,t,e);const v=h[0],x=J4[v];if(x){const{incompatibleTokens:b}=x;if(Array.isArray(b)){const E=f.find(R=>b.includes(R.token)||R.token===v);if(E)throw new RangeError(`The format string mustn't contain \`${E.fullToken}\` and \`${h}\` at the same time`)}else if(x.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${h}\` and any other token at the same time`);f.push({token:v,fullToken:h});const T=x.run(e,h,s.match,c);if(!T)return o();u.push(T.setter),e=T.rest}else{if(v.match(iB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");if(h==="''"?h="'":v==="'"&&(h=aB(h)),e.indexOf(h)===0)e=e.slice(h.length);else return o()}}if(e.length>0&&oB.test(e))return o();const m=u.map(h=>h.priority).sort((h,v)=>v-h).filter((h,v,x)=>x.indexOf(h)===v).map(h=>u.filter(v=>v.priority===h).sort((v,x)=>x.subPriority-v.subPriority)).map(h=>h[0]);let g=Xe(n,r?.in);if(isNaN(+g))return o();const y={};for(const h of m){if(!h.validate(g,c))return o();const v=h.set(g,y,c);Array.isArray(v)?(g=v[0],Object.assign(y,v[1])):g=v}return g}function aB(e){return e.match(nB)[1].replace(rB,"'")}function kE(e,t,n){const[r,o]=jc(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function ua(e,t){return dz(dt(e,e),uz(e))}function RE(e,t,n){return to(e,-t,n)}function lB(e,t,n){const r=Xe(e,n?.in),o=r.getFullYear(),i=r.getDate(),s=dt(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const a=a4(s);return r.setMonth(t,Math.min(i,a)),r}function cB(e,t,n){let r=Xe(e,n?.in);return isNaN(+r)?dt(e,NaN):(t.year!=null&&r.setFullYear(t.year),t.month!=null&&(r=lB(r,t.month)),t.date!=null&&r.setDate(t.date),t.hours!=null&&r.setHours(t.hours),t.minutes!=null&&r.setMinutes(t.minutes),t.seconds!=null&&r.setSeconds(t.seconds),t.milliseconds!=null&&r.setMilliseconds(t.milliseconds),r)}function uB(e,t,n){const r=Xe(e,n?.in);return isNaN(+r)?dt(e,NaN):(r.setFullYear(t),r)}function IE(e,t,n){return Km(e,-t,n)}function ns(e,t,n){const{years:r=0,months:o=0,weeks:i=0,days:s=0,hours:a=0,minutes:l=0,seconds:c=0}=t,u=IE(e,o+r*12,n),d=RE(u,s+i*7,n),f=l+a*60,g=(c+f*60)*1e3;return dt(e,+d-g)}function dB(e,t,n){return hE(e,-1,n)}const fB=(e,t=0)=>{let n;return function(...o){clearTimeout(n),n=setTimeout(()=>e(...o),t)}};function pB(e,t){return S.useRef(fB(e,t)).current}function AE(e,t){const n=S.useRef(null);return{onTouchStart:i=>n.current=i.touches[0].clientX,onTouchEnd:i=>{if(n.current===null)return;const a=i.changedTouches[0].clientX-n.current;Math.abs(a)>t&&e(i,a>0?"right":"left"),n.current=null}}}const mB=/^(?<hour>\d\d):(?<min>\d\d)$/,hB={type:"spring",bounce:.3,duration:.6},qx=e=>(t=1)=>({x:`${100*e*t}%`,opacity:.25}),PE={enter:qx(1),exit:qx(-1),middle:{x:"0%",opacity:1}},Ux={exit:{visibility:"hidden"}},gB=e=>{const t=Rn(Zm(e));return gE({start:t,end:ei(t,{days:41})})},OE=(e,t)=>e.toLocaleDateString(t,{month:"long"}),yB=(e,t,n)=>Array.from({length:12}).map((r,o)=>{const i=Zm(new Date(1970,o,1).setMonth(o)),s=OE(i,n);return p.jsx("option",{value:s,"data-index":o,children:s},`${e}-${s}`)}),Id={ArrowLeft:(e,t)=>t==="days"?ns(e,{days:1}):ns(e,{months:1}),ArrowRight:(e,t)=>t==="days"?ei(e,{days:1}):ei(e,{months:1}),ArrowUp:(e,t)=>t==="days"?ns(e,{weeks:1}):ns(e,{years:1}),ArrowDown:(e,t)=>t==="days"?ei(e,{weeks:1}):ei(e,{years:1})},Gx=(e,t,n,r=0)=>{const o=n.toISOString(),i=()=>{if(e?.dataset.focustrap){const s=t.current?.querySelector(`button[data-focustrap="${e?.dataset.focustrap}"]`);return setTimeout(()=>s?.focus({preventScroll:!0}),r)}if(t.current){const s=t.current.querySelector(`button[data-date="${o}"]`);if(s)return s.focus({preventScroll:!0})}};r===0&&i(),setTimeout(i,r)},oo=e=>e.getFullYear().toString().padStart(4,"0"),vB=(e,t,n)=>e===void 0||n===void 0?!1:u4(t,e)&&d4(t,n),xB=e=>{const t=yt();return p.jsx(Le.tbody,{layout:!0,variants:PE,custom:e.direction,onKeyDown:e.onKeyDown,className:Ie(e.styles?.week),children:e.zip.map((n,r)=>{const o=Be.function(e.styles?.week)?e.styles?.week(n):e.styles?.week;return p.jsx("tr",{className:o,children:n.map(i=>{const s=i.toISOString(),a=e.rangeMode?s===e.range?.to?.toISOString()||s===e.range?.from?.toISOString():s===(e.date?Eo(e.date).toISOString():void 0),l=ua(i)&&e.markToday,c=e.disabledDate?.(i)||!1,u=kE(i,e.stateDate),d=!u||c,f=e.rangeMode?vB(e.range?.from,i,e.range?.to):!1;return p.jsxs("td",{align:"center",className:Ie("relative p-1",Be.function(e.styles?.dayFrame)?e.styles?.dayFrame(i):e.styles?.dayFrame),children:[p.jsxs("button",{type:"button","data-date":s,disabled:c,"data-samemonth":u,"data-range":e.rangeMode,onClick:e.dispatch.onSelectDate,"data-view":e.stateDate.getMonth().toString(),className:Ie(`relative flex size-9 items-center justify-center rounded-full proportional-nums disabled:cursor-not-allowed ${l?"text-emphasis":""} ${d?"text-disabled":""} ${a?"bg-primary text-primary-foreground":""}`,f&&e.markRange?"size-9 border border-dashed border-card-border":"",Be.function(e.styles?.day)?e.styles?.day(i):e.styles?.day),children:[p.jsx("div",{}),i.getDate(),a&&e.stateRange.from?.toISOString()===s?p.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:p.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.from??t.calendarFromDate})}):null,a&&e.stateRange.to?.toISOString()===s?p.jsx("span",{className:"absolute -top-2 left-0 h-full w-full",children:p.jsx("span",{className:"text-xs text-foreground",children:e.labelRange?.to??t.calendarToDate})}):null]}),e.RenderOnDay?p.jsx(e.RenderOnDay,{date:i}):null]},s)})},`week-${n.length}-${r}`)})})},bB=()=>Eo(new Date),th=({RenderOnDay:e,changeOnlyOnClick:t=!1,labelRange:n,disabledDate:r,locale:o,markToday:i=!0,onChangeMonth:s,onChangeYear:a,rangeMode:l=!1,onChange:c,styles:u,markRange:d=!0,type:f="date",datetimeTitle:m,...g})=>{const y=S.useRef(Mi()),h=yt(),v=Zr(o),x=S.useRef(null),{date:b,range:T}=g,E=b||new Date,R=S.useRef(null),[w,C]=Tm({date:E,isAnimating:!1,year:oo(E),direction:void 0,range:{from:T?.from,to:T?.to},months:yB(y.current,E,v),selectMode:l?"from":void 0,week:gE({start:Rn(E),end:hz(E)})},D=>({onChangeYear:k=>({year:k}),onExitComplete:()=>(Gx(R.current||null,x,D.state().date,200),R.current=null,{isAnimating:!1}),date:k=>{const F=k(D.state().date);return{date:F,year:oo(F)}},nextMonth:k=>{k&&(R.current=k.currentTarget);const F=D.state();if(F.isAnimating)return F;const _=ei(F.date,{months:1});return{date:_,isAnimating:!0,direction:1,year:oo(_)}},previousMonth:k=>{k&&(R.current=k.currentTarget);const F=D.state();if(F.isAnimating)return F;const _=ns(F.date,{months:1});return{date:_,isAnimating:!0,direction:-1,year:oo(_)}},onSelectDate:k=>{const F=D.state(),_=k.currentTarget.dataset.range==="true",B=k.currentTarget.dataset.date||"",U=new Date(B);return{date:U,year:oo(U),selectMode:F.selectMode===void 0?void 0:F.selectMode==="from"?"to":"from",range:_?{from:F.selectMode==="from"?U:F.range.from,to:F.selectMode==="to"?U:F.range.to}:F.range}},onChangeMonth:k=>{const F=k.target.value,B=Array.from(k.target.options).find(G=>G.value===F),U=D.state();if(B){const G=B.dataset.index||"",H=new Date(D.state().date);return H.setMonth(+G),{...U,date:H,year:oo(H)}}return U},onKeyDown:k=>{const F=k.key,_=D.state();if(F in Id){(F==="ArrowUp"||F==="ArrowDown")&&k.preventDefault();const B=D.state().date,U=Be.keyof(Id,F)?Id[F](B,k.shiftKey?"month":"days"):null;if(U!==null)return Gx(k.target,x,U),{..._,date:U,year:oo(U)}}return D.state()}}),{props:{onChangeMonth:s,onChangeYear:a},postMiddleware:[(D,k,F)=>((F.method==="onChangeMonth"||F.method==="previousMonth"||F.method==="nextMonth")&&F.props.onChangeMonth?.(D.date),D),(D,k,F)=>(F.method==="onChangeYear"&&F.props.onChangeYear?.(D.date),D),(D,k,F)=>{const _=F.method==="onSelectDate"||F.method==="setToday"||F.method==="onKeyDown";return l&&_&&t?(c?.(D.range),D):(_&&t&&c?.(D.date),D)}]}),I=gB(w.date),P=Ow(I,7),M=w.date.toISOString(),j=OE(w.date,v);S.useEffect(()=>{t||c?.(w.date)},[M,t]);const L=pB(D=>C.date(k=>uB(new Date(k),+D)),1200),O=D=>{const k=D.currentTarget.value;C.onChangeYear(k),a?.(new Date(k)),L(k)},N=AE((D,k)=>(D.preventDefault(),k==="right"?C.previousMonth():C.nextMonth()),10),V=()=>{const D=bB();C.date(()=>D),c?.(D)};return p.jsx(vm,{transition:hB,children:p.jsxs("div",{ref:x,"data-component":"calendar",onTouchEnd:N.onTouchEnd,onTouchStart:N.onTouchStart,className:Ie("relative overflow-hidden",Be.function(u?.calendar)?u?.calendar(I):u?.calendar),children:[p.jsx("div",{className:"flex flex-col justify-center rounded text-center",children:p.jsx(xn,{initial:!1,mode:"popLayout",custom:w.direction,onExitComplete:C.onExitComplete,children:p.jsxs(Le.div,{initial:"enter",animate:"middle",exit:"exit",children:[p.jsxs("header",{className:"relative flex justify-between",children:[p.jsx(Le.button,{layout:!0,type:"button","data-focustrap":"prev",variants:Ux,onClick:C.previousMonth,title:h.calendarBackMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:p.jsx(z0,{className:"h-4 w-4"})}),p.jsx(Le.span,{layout:!0,variants:PE,custom:w.direction,className:"absolute inset-0 isolate z-normal flex items-center justify-center font-semibold",children:p.jsxs("span",{className:"flex w-fit items-center justify-center gap-0.5 py-1",children:[p.jsx("select",{value:j,onChange:C.onChangeMonth,"aria-label":h.calendarMonthLabel,style:{width:`${j.length+1}ch`},className:"cursor-pointer appearance-none bg-transparent capitalize proportional-nums hover:text-primary",children:w.months}),p.jsx(F0,{mask:"int",maxLength:4,placeholder:"YYYY",value:w.year,onChange:O,style:{width:`${w.year.length}ch`},className:"w-16 cursor-pointer appearance-none bg-transparent hover:text-primary"})]})}),p.jsx(Le.button,{layout:!0,type:"button","data-focustrap":"next",variants:Ux,onClick:C.nextMonth,title:h.calendarNextMonth,className:"z-calendar rounded-full p-1.5 hover:bg-primary hover:text-primary-foreground",children:p.jsx(Kl,{className:"h-4 w-4"})})]}),p.jsxs(Le.table,{className:"mt-2 table min-w-full table-auto border-0",children:[p.jsx("thead",{children:p.jsx("tr",{children:w.week.map(D=>p.jsx("th",{role:"columnheader",className:Ie("py-2 text-sm font-medium capitalize",Be.function(u?.weekDay)?u.weekDay(D):u?.weekDay),children:D.toLocaleDateString(v,{weekday:"short"})},D.toString()))})}),p.jsx(xB,{zip:P,range:T,styles:u,date:b||null,dispatch:C,markRange:d,markToday:i,rangeMode:l,stateDate:w.date,labelRange:n,stateRange:w.range,RenderOnDay:e,direction:w.direction,disabledDate:r,onKeyDown:C.onKeyDown})]})]},j)})}),f==="datetime"?p.jsx("section",{className:"my-4 grid items-center",children:p.jsx(Ni,{info:null,mask:"time",optionalText:" ",container:"w-full",reportStatus:!1,defaultValue:b?Jf(b,"HH:mm"):void 0,title:m||h.calendarDatetimeTitle,onChange:D=>{const k=D.target.value,F=mB.exec(k);if(!F)return;const _=F.groups.hour,B=F.groups.min,U=cB(w.date,{hours:Number(_),minutes:Number(B),seconds:0});C.date(()=>U),c?.(U)}})}):null,p.jsx("footer",{className:"mt-2 text-center text-primary",children:p.jsx("button",{type:"button",onClick:V,className:"transition-transform duration-300 hover:scale-105",children:h.calendarToday})})]})})},nh=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(nh.displayName="ProgressRootContext");function wB(){const e=A.useContext(nh);if(e===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ProgressRootContext is missing. Progress parts must be placed within <Progress.Root>.":Vn(51));return e}let Ad=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const jE={status(e){return e==="progressing"?{[Ad.progressing]:""}:e==="complete"?{[Ad.complete]:""}:e==="indeterminate"?{[Ad.indeterminate]:""}:null}};function SB(e,t){return t==null?"indeterminate progress":e||`${t}%`}const DE=A.forwardRef(function(t,n){const{format:r,getAriaValueText:o=SB,locale:i,max:s=100,min:a=0,value:l,render:c,className:u,...d}=t,[f,m]=A.useState(),g=Np(r);let y="indeterminate";Number.isFinite(l)&&(y=l===s?"complete":"progressing");const h=tj(l,i,g.current),v=A.useMemo(()=>({status:y}),[y]),x={"aria-labelledby":f,"aria-valuemax":s,"aria-valuemin":a,"aria-valuenow":l??void 0,"aria-valuetext":o(h,l),role:"progressbar"},b=A.useMemo(()=>({formattedValue:h,max:s,min:a,setLabelId:m,state:v,status:y,value:l}),[h,s,a,m,v,y,l]),T=ln("div",t,{state:v,ref:n,props:[x,d],stateAttributesMapping:jE});return p.jsx(nh.Provider,{value:b,children:T})});process.env.NODE_ENV!=="production"&&(DE.displayName="ProgressRoot");const ME=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{max:s,min:a,value:l,state:c}=wB(),u=Number.isFinite(l)&&l!==null?Sl(l,a,s):null,d=A.useCallback(()=>u==null?{}:{insetInlineStart:0,height:"inherit",width:`${u}%`},[u]);return ln("div",t,{state:c,ref:n,props:[{style:d()},i],stateAttributesMapping:jE})});process.env.NODE_ENV!=="production"&&(ME.displayName="ProgressIndicator");const TB=e=>p.jsxs(DE,{max:e.max,value:e.percent??null,style:{transform:"translateZ(0)"},className:Ie("relative h-6 w-full overflow-hidden rounded-full bg-background",e.container),children:[p.jsx(ME,{style:{transform:Be.number(e.percent)?`translateX(-${100-e.percent}%)`:void 0},className:Ie("size-full bg-primary transition-transform duration-500 ease-in-out",e.className)}),Be.number(e.percent)?p.jsx("p",{className:Ie("absolute inset-0 flex w-full items-center justify-center font-semibold tabular-nums text-primary-foreground",e.textClassName),children:e.label?e.label:`${e.percent} %`}):null]}),Dc=e=>p.jsxs("li",{"data-component":"timeline-item",className:"relative pb-12",role:"listitem",children:[p.jsx("span",{"aria-hidden":"true",className:"absolute left-6 top-8 -ml-px h-full w-0.5 bg-card-border"}),p.jsx("div",{className:"relative flex items-stretch justify-start space-x-3",children:e.children})]});Dc.Icon=function(t){return p.jsx("header",{...t,className:Ie("flex size-12 items-center justify-center rounded-full bg-primary p-2 text-warn-foreground",t.className),children:t.children})};Dc.Body=function(t){return p.jsx(mn,{...t,className:Ie("min-w-0 flex-1",t.className),children:t.children})};Dc.Right=function(t){return p.jsx("footer",{className:"flex gap-6 self-stretch px-4 align-baseline",children:p.jsx(mn,{...t,type:"button"})})};const EB=e=>p.jsx("ul",{"data-component":"timeline",role:"list",className:"flow-root [&>li:last-child>span[aria-hidden=true]]:hidden",children:e.children}),CB=e=>p.jsx(Le.div,{className:"sticky bottom-4 flex items-center justify-center rounded-lg border border-card-border bg-background p-4",children:e.children}),Yx=new Date(1970,11,31),Pd={year:()=>[/\d/,/\d/,/\d/,/\d/],month:()=>[/\d/,/\d/],day:()=>[/\d/,/\d/],hour:()=>[/\d/,/\d/],minute:()=>[/\d/,/\d/],literal:e=>e.split("")},Kx={day:()=>"dd",hour:()=>"HH",month:()=>"MM",minute:()=>"mm",year:()=>"yyyy",literal:e=>e},kB={literal:(e,t)=>t,year:e=>e.getFullYear().toString(),day:e=>e.getDate().toString().padStart(2,"0"),hour:e=>e.getHours().toString().padStart(2,"0"),minute:e=>e.getMinutes().toString().padStart(2,"0"),month:e=>(e.getMonth()+1).toString().padStart(2,"0")},Od=(e,t)=>{try{return e.formatToParts(t).map(n=>n.type==="literal"&&n.value===", "?{type:n.type,value:" "}:n)}catch{return[]}},RB={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},IB={day:"numeric",month:"numeric",year:"numeric"},AB=S.forwardRef(({date:e,locale:t,disabledDate:n,onChange:r,markToday:o,clickToClose:i,floating:s=!0,type:a,...l},c)=>{const u=Zr(t),d=S.useId(),f=yt(),m=S.useMemo(()=>new Intl.DateTimeFormat(u,a==="datetime"?RB:IB),[u,a]),[g,y]=S.useState(e||void 0),[h,v]=S.useState(!1),x=Od(m,Yx).flatMap(j=>Be.keyof(Pd,j.type)?Pd[j.type](j.value):[]),b=S.useMemo(()=>Od(m,Yx).reduce((j,L)=>j+(Be.keyof(Kx,L.type)?Kx[L.type](L.value):""),""),[m]),T=e?.toISOString(),[E,R]=S.useState(g?Od(m,g).reduce((j,L)=>j+(Be.keyof(Pd,L.type)?kB[L.type](g,L.value):""),""):""),w=j=>{const L=j.target.value;if(R(L),x.length===L.length&&x.every((N,V)=>{const D=L.charAt(V);return typeof N=="string"?D===N:N.test(D)})){const N=sB(L,b,new Date),V=a==="datetime"?N:Eo(N);return y(V),r?.(V)}return y(void 0),r?.(void 0)};S.useEffect(()=>{Nl(e)&&(y(e),R(Jf(e,b)))},[T,b]);const C=j=>(y(j),r?.(j),i&&v(!1),R(j?Jf(j,b):"")),I=Nl(g),P=I?g.toISOString():void 0,M=p.jsx(th,{...l,type:a,locale:u,changeOnlyOnClick:!0,markToday:o,onChange:C,disabledDate:n,date:I?g:void 0});return p.jsx(S.Fragment,{children:p.jsx(Ni,{...l,mask:x,value:E,id:void 0,name:void 0,"data-value":P,formNoValidate:!h,"data-target":l.name,"data-component":"date-picker",onChange:w,required:l.required??!0,error:h?void 0:l.error,placeholder:l.placeholder||f.datepickerPlaceholder(b),right:s?p.jsxs(S.Fragment,{children:[p.jsx("input",{"data-origin":l.name,defaultValue:P,form:l.form,hidden:!0,id:l.name,name:l.name,ref:c,type:"date"}),p.jsx(Hi,{open:h,onChange:v,buttonProps:{"aria-describedby":d},trigger:p.jsxs("span",{"aria-labelledby":d,children:[p.jsx("span",{id:d,className:"sr-only",children:f.datePickerCalendarButtonLabel}),p.jsx($0,{})]}),children:M})]}):null})})}),PB=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],OB=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],jB=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],DB=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Zx=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r},NE=e=>{if(typeof e=="number")return Math.log10(e);const t=e.toString(10);return t.length+Math.log10(`0.${t.slice(0,15)}`)},MB=e=>typeof e=="number"?Math.log(e):NE(e)*Math.log(10),NB=(e,t)=>{if(typeof e=="number")return e/t;const n=e/BigInt(t),r=e%BigInt(t);return Number(n)+Number(r)/t},Xx=(e,t)=>{if(t===void 0)return e;if(typeof t!="number"||!Number.isSafeInteger(t)||t<0)throw new TypeError(`Expected fixedWidth to be a non-negative integer, got ${typeof t}: ${t}`);return t===0?e:e.length<t?e.padStart(t," "):e},_B=e=>{const{minimumFractionDigits:t,maximumFractionDigits:n}=e;if(!(t===void 0&&n===void 0))return{...t!==void 0&&{minimumFractionDigits:t},...n!==void 0&&{maximumFractionDigits:n},roundingMode:"trunc"}};function FB(e,t){if(typeof e!="bigint"&&!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,space:!0,nonBreakingSpace:!1,...t};const n=t.bits?t.binary?DB:jB:t.binary?OB:PB,r=t.space?t.nonBreakingSpace?" ":" ":"",o=typeof e=="number"?e===0:e===0n;if(t.signed&&o){const c=` 0${r}${n[0]}`;return Xx(c,t.fixedWidth)}const i=e<0,s=i?"-":t.signed?"+":"";i&&(e=-e);const a=_B(t);let l;if(e<1){const c=Zx(e,t.locale,a);l=s+c+r+n[0]}else{const c=Math.min(Math.floor(t.binary?MB(e)/Math.log(1024):NE(e)/3),n.length-1);if(e=NB(e,(t.binary?1024:1e3)**c),!a){const f=Math.max(3,Math.floor(e).toString().length);e=e.toPrecision(f)}const u=Zx(Number(e),t.locale,a),d=n[c];l=s+u+r+d}return Xx(l,t.fixedWidth)}var La={exports:{}},Va={exports:{}},st={};var Qx;function LB(){if(Qx)return st;Qx=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(E){if(typeof E=="object"&&E!==null){var R=E.$$typeof;switch(R){case t:switch(E=E.type,E){case l:case c:case r:case i:case o:case d:return E;default:switch(E=E&&E.$$typeof,E){case a:case u:case g:case m:case s:return E;default:return R}}case n:return R}}}function T(E){return b(E)===c}return st.AsyncMode=l,st.ConcurrentMode=c,st.ContextConsumer=a,st.ContextProvider=s,st.Element=t,st.ForwardRef=u,st.Fragment=r,st.Lazy=g,st.Memo=m,st.Portal=n,st.Profiler=i,st.StrictMode=o,st.Suspense=d,st.isAsyncMode=function(E){return T(E)||b(E)===l},st.isConcurrentMode=T,st.isContextConsumer=function(E){return b(E)===a},st.isContextProvider=function(E){return b(E)===s},st.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},st.isForwardRef=function(E){return b(E)===u},st.isFragment=function(E){return b(E)===r},st.isLazy=function(E){return b(E)===g},st.isMemo=function(E){return b(E)===m},st.isPortal=function(E){return b(E)===n},st.isProfiler=function(E){return b(E)===i},st.isStrictMode=function(E){return b(E)===o},st.isSuspense=function(E){return b(E)===d},st.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===r||E===c||E===i||E===o||E===d||E===f||typeof E=="object"&&E!==null&&(E.$$typeof===g||E.$$typeof===m||E.$$typeof===s||E.$$typeof===a||E.$$typeof===u||E.$$typeof===h||E.$$typeof===v||E.$$typeof===x||E.$$typeof===y)},st.typeOf=b,st}var at={};var Jx;function VB(){return Jx||(Jx=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function b(z){return typeof z=="string"||typeof z=="function"||z===r||z===c||z===i||z===o||z===d||z===f||typeof z=="object"&&z!==null&&(z.$$typeof===g||z.$$typeof===m||z.$$typeof===s||z.$$typeof===a||z.$$typeof===u||z.$$typeof===h||z.$$typeof===v||z.$$typeof===x||z.$$typeof===y)}function T(z){if(typeof z=="object"&&z!==null){var se=z.$$typeof;switch(se){case t:var le=z.type;switch(le){case l:case c:case r:case i:case o:case d:return le;default:var Q=le&&le.$$typeof;switch(Q){case a:case u:case g:case m:case s:return Q;default:return se}}case n:return se}}}var E=l,R=c,w=a,C=s,I=t,P=u,M=r,j=g,L=m,O=n,N=i,V=o,D=d,k=!1;function F(z){return k||(k=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),_(z)||T(z)===l}function _(z){return T(z)===c}function B(z){return T(z)===a}function U(z){return T(z)===s}function G(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function H(z){return T(z)===u}function ee(z){return T(z)===r}function ie(z){return T(z)===g}function te(z){return T(z)===m}function q(z){return T(z)===n}function Y(z){return T(z)===i}function Z(z){return T(z)===o}function fe(z){return T(z)===d}at.AsyncMode=E,at.ConcurrentMode=R,at.ContextConsumer=w,at.ContextProvider=C,at.Element=I,at.ForwardRef=P,at.Fragment=M,at.Lazy=j,at.Memo=L,at.Portal=O,at.Profiler=N,at.StrictMode=V,at.Suspense=D,at.isAsyncMode=F,at.isConcurrentMode=_,at.isContextConsumer=B,at.isContextProvider=U,at.isElement=G,at.isForwardRef=H,at.isFragment=ee,at.isLazy=ie,at.isMemo=te,at.isPortal=q,at.isProfiler=Y,at.isStrictMode=Z,at.isSuspense=fe,at.isValidElementType=b,at.typeOf=T})()),at}var eb;function _E(){return eb||(eb=1,process.env.NODE_ENV==="production"?Va.exports=LB():Va.exports=VB()),Va.exports}var jd,tb;function $B(){if(tb)return jd;tb=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var s={},a=0;a<10;a++)s["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(s).map(function(u){return s[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return jd=o()?Object.assign:function(i,s){for(var a,l=r(i),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},jd}var Dd,nb;function rh(){if(nb)return Dd;nb=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Dd=e,Dd}var Md,rb;function FE(){return rb||(rb=1,Md=Function.call.bind(Object.prototype.hasOwnProperty)),Md}var Nd,ob;function zB(){if(ob)return Nd;ob=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=rh(),n={},r=FE();e=function(i){var s="Warning: "+i;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(i,s,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var d;try{if(typeof i[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=i[u](s,u,l,a,null,t)}catch(g){d=g}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var m=c?c():"";e("Failed "+a+" type: "+d.message+(m??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Nd=o,Nd}var _d,ib;function BB(){if(ib)return _d;ib=1;var e=_E(),t=$B(),n=rh(),r=FE(),o=zB(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return _d=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(_){var B=_&&(c&&_[c]||_[u]);if(typeof B=="function")return B}var f="<<anonymous>>",m={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:x(),arrayOf:b,element:T(),elementType:E(),instanceOf:R,node:P(),objectOf:C,oneOf:w,oneOfType:I,shape:j,exact:L};function g(_,B){return _===B?_!==0||1/_===1/B:_!==_&&B!==B}function y(_,B){this.message=_,this.data=B&&typeof B=="object"?B:{},this.stack=""}y.prototype=Error.prototype;function h(_){if(process.env.NODE_ENV!=="production")var B={},U=0;function G(ee,ie,te,q,Y,Z,fe){if(q=q||f,Z=Z||te,fe!==n){if(l){var z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var se=q+":"+te;!B[se]&&U<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+q+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),B[se]=!0,U++)}}return ie[te]==null?ee?ie[te]===null?new y("The "+Y+" `"+Z+"` is marked as required "+("in `"+q+"`, but its value is `null`.")):new y("The "+Y+" `"+Z+"` is marked as required in "+("`"+q+"`, but its value is `undefined`.")):null:_(ie,te,q,Y,Z)}var H=G.bind(null,!1);return H.isRequired=G.bind(null,!0),H}function v(_){function B(U,G,H,ee,ie,te){var q=U[G],Y=V(q);if(Y!==_){var Z=D(q);return new y("Invalid "+ee+" `"+ie+"` of type "+("`"+Z+"` supplied to `"+H+"`, expected ")+("`"+_+"`."),{expectedType:_})}return null}return h(B)}function x(){return h(s)}function b(_){function B(U,G,H,ee,ie){if(typeof _!="function")return new y("Property `"+ie+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var te=U[G];if(!Array.isArray(te)){var q=V(te);return new y("Invalid "+ee+" `"+ie+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an array."))}for(var Y=0;Y<te.length;Y++){var Z=_(te,Y,H,ee,ie+"["+Y+"]",n);if(Z instanceof Error)return Z}return null}return h(B)}function T(){function _(B,U,G,H,ee){var ie=B[U];if(!a(ie)){var te=V(ie);return new y("Invalid "+H+" `"+ee+"` of type "+("`"+te+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return h(_)}function E(){function _(B,U,G,H,ee){var ie=B[U];if(!e.isValidElementType(ie)){var te=V(ie);return new y("Invalid "+H+" `"+ee+"` of type "+("`"+te+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return h(_)}function R(_){function B(U,G,H,ee,ie){if(!(U[G]instanceof _)){var te=_.name||f,q=F(U[G]);return new y("Invalid "+ee+" `"+ie+"` of type "+("`"+q+"` supplied to `"+H+"`, expected ")+("instance of `"+te+"`."))}return null}return h(B)}function w(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),s;function B(U,G,H,ee,ie){for(var te=U[G],q=0;q<_.length;q++)if(g(te,_[q]))return null;var Y=JSON.stringify(_,function(fe,z){var se=D(z);return se==="symbol"?String(z):z});return new y("Invalid "+ee+" `"+ie+"` of value `"+String(te)+"` "+("supplied to `"+H+"`, expected one of "+Y+"."))}return h(B)}function C(_){function B(U,G,H,ee,ie){if(typeof _!="function")return new y("Property `"+ie+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var te=U[G],q=V(te);if(q!=="object")return new y("Invalid "+ee+" `"+ie+"` of type "+("`"+q+"` supplied to `"+H+"`, expected an object."));for(var Y in te)if(r(te,Y)){var Z=_(te,Y,H,ee,ie+"."+Y,n);if(Z instanceof Error)return Z}return null}return h(B)}function I(_){if(!Array.isArray(_))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var B=0;B<_.length;B++){var U=_[B];if(typeof U!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+k(U)+" at index "+B+"."),s}function G(H,ee,ie,te,q){for(var Y=[],Z=0;Z<_.length;Z++){var fe=_[Z],z=fe(H,ee,ie,te,q,n);if(z==null)return null;z.data&&r(z.data,"expectedType")&&Y.push(z.data.expectedType)}var se=Y.length>0?", expected one of type ["+Y.join(", ")+"]":"";return new y("Invalid "+te+" `"+q+"` supplied to "+("`"+ie+"`"+se+"."))}return h(G)}function P(){function _(B,U,G,H,ee){return O(B[U])?null:new y("Invalid "+H+" `"+ee+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return h(_)}function M(_,B,U,G,H){return new y((_||"React class")+": "+B+" type `"+U+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function j(_){function B(U,G,H,ee,ie){var te=U[G],q=V(te);if(q!=="object")return new y("Invalid "+ee+" `"+ie+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));for(var Y in _){var Z=_[Y];if(typeof Z!="function")return M(H,ee,ie,Y,D(Z));var fe=Z(te,Y,H,ee,ie+"."+Y,n);if(fe)return fe}return null}return h(B)}function L(_){function B(U,G,H,ee,ie){var te=U[G],q=V(te);if(q!=="object")return new y("Invalid "+ee+" `"+ie+"` of type `"+q+"` "+("supplied to `"+H+"`, expected `object`."));var Y=t({},U[G],_);for(var Z in Y){var fe=_[Z];if(r(_,Z)&&typeof fe!="function")return M(H,ee,ie,Z,D(fe));if(!fe)return new y("Invalid "+ee+" `"+ie+"` key `"+Z+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(U[G],null," ")+`
17
+ Valid keys: `+JSON.stringify(Object.keys(_),null," "));var z=fe(te,Z,H,ee,ie+"."+Z,n);if(z)return z}return null}return h(B)}function O(_){switch(typeof _){case"number":case"string":case"undefined":return!0;case"boolean":return!_;case"object":if(Array.isArray(_))return _.every(O);if(_===null||a(_))return!0;var B=d(_);if(B){var U=B.call(_),G;if(B!==_.entries){for(;!(G=U.next()).done;)if(!O(G.value))return!1}else for(;!(G=U.next()).done;){var H=G.value;if(H&&!O(H[1]))return!1}}else return!1;return!0;default:return!1}}function N(_,B){return _==="symbol"?!0:B?B["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&B instanceof Symbol:!1}function V(_){var B=typeof _;return Array.isArray(_)?"array":_ instanceof RegExp?"object":N(B,_)?"symbol":B}function D(_){if(typeof _>"u"||_===null)return""+_;var B=V(_);if(B==="object"){if(_ instanceof Date)return"date";if(_ instanceof RegExp)return"regexp"}return B}function k(_){var B=D(_);switch(B){case"array":case"object":return"an "+B;case"boolean":case"date":case"regexp":return"a "+B;default:return B}}function F(_){return!_.constructor||!_.constructor.name?f:_.constructor.name}return m.checkPropTypes=o,m.resetWarningCache=o.resetWarningCache,m.PropTypes=m,m},_d}var Fd,sb;function HB(){if(sb)return Fd;sb=1;var e=rh();function t(){}function n(){}return n.resetWarningCache=t,Fd=function(){function r(s,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Fd}var ab;function WB(){if(ab)return La.exports;if(ab=1,process.env.NODE_ENV!=="production"){var e=_E(),t=!0;La.exports=BB()(e.isElement,t)}else La.exports=HB()();return La.exports}var qB=WB();const gt=a0(qB);function jo(e,t,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function a(u){try{c(r.next(u))}catch(d){s(d)}}function l(u){try{c(r.throw(u))}catch(d){s(d)}}function c(u){u.done?i(u.value):o(u.value).then(a,l)}c((r=r.apply(e,t||[])).next())})}const UB=new Map([["1km","application/vnd.1000minds.decision-model+xml"],["3dml","text/vnd.in3d.3dml"],["3ds","image/x-3ds"],["3g2","video/3gpp2"],["3gp","video/3gp"],["3gpp","video/3gpp"],["3mf","model/3mf"],["7z","application/x-7z-compressed"],["7zip","application/x-7z-compressed"],["123","application/vnd.lotus-1-2-3"],["aab","application/x-authorware-bin"],["aac","audio/x-acc"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abw","application/x-abiword"],["ac","application/vnd.nokia.n-gage.ac+xml"],["ac3","audio/ac3"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acu","application/vnd.acucobol"],["acutc","application/vnd.acucorp"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afm","application/x-font-type1"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/pdf"],["aif","audio/x-aiff"],["aifc","audio/x-aiff"],["aiff","audio/x-aiff"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["amr","audio/amr"],["apk","application/vnd.android.package-archive"],["apng","image/apng"],["appcache","text/cache-manifest"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["arc","application/x-freearc"],["arj","application/x-arj"],["asc","application/pgp-signature"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asx","video/x-ms-asf"],["atc","application/vnd.acucorp"],["atom","application/atom+xml"],["atomcat","application/atomcat+xml"],["atomdeleted","application/atomdeleted+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au","audio/x-au"],["avi","video/x-msvideo"],["avif","image/avif"],["aw","application/applixware"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azv","image/vnd.airzip.accelerator.azv"],["azw","application/vnd.amazon.ebook"],["b16","image/vnd.pco.b16"],["bat","application/x-msdownload"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bdoc","application/x-bdoc"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin","application/octet-stream"],["blb","application/x-blorb"],["blorb","application/x-blorb"],["bmi","application/vnd.bmi"],["bmml","application/vnd.balsamiq.bmml+xml"],["bmp","image/bmp"],["book","application/vnd.framemaker"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bpk","application/octet-stream"],["bpmn","application/octet-stream"],["bsp","model/vnd.valve.source.compiled-map"],["btif","image/prs.btif"],["buffer","application/octet-stream"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c","text/x-c"],["c4d","application/vnd.clonk.c4group"],["c4f","application/vnd.clonk.c4group"],["c4g","application/vnd.clonk.c4group"],["c4p","application/vnd.clonk.c4group"],["c4u","application/vnd.clonk.c4group"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["cab","application/vnd.ms-cab-compressed"],["caf","audio/x-caf"],["cap","application/vnd.tcpdump.pcap"],["car","application/vnd.curl.car"],["cat","application/vnd.ms-pki.seccat"],["cb7","application/x-cbr"],["cba","application/x-cbr"],["cbr","application/x-cbr"],["cbt","application/x-cbr"],["cbz","application/x-cbr"],["cc","text/x-c"],["cco","application/x-cocoa"],["cct","application/x-director"],["ccxml","application/ccxml+xml"],["cdbcmsg","application/vnd.contact.cmsg"],["cda","application/x-cdf"],["cdf","application/x-netcdf"],["cdfx","application/cdfx+xml"],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdr","application/cdr"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer","application/pkix-cert"],["cfs","application/x-cfs-compressed"],["cgm","image/cgm"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cjs","application/node"],["cla","application/vnd.claymore"],["class","application/octet-stream"],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod","application/vnd.rim.cod"],["coffee","text/coffeescript"],["com","application/x-msdownload"],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt","application/mac-compactpro"],["crd","application/x-mscardfile"],["crl","application/pkix-crl"],["crt","application/x-x509-ca-cert"],["crx","application/x-chrome-extension"],["cryptonote","application/vnd.rig.cryptonote"],["csh","application/x-csh"],["csl","application/vnd.citationstyles.style+xml"],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["csr","application/octet-stream"],["css","text/css"],["cst","application/x-director"],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxt","application/x-director"],["cxx","text/x-c"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["dart","application/vnd.dart"],["dataless","application/vnd.fdsn.seed"],["davmount","application/davmount+xml"],["dbf","application/vnd.dbf"],["dbk","application/docbook+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["ddf","application/vnd.syncml.dmddf+xml"],["dds","image/vnd.ms-dds"],["deb","application/x-debian-package"],["def","text/plain"],["deploy","application/octet-stream"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dgc","application/x-dgc-compressed"],["dic","text/x-c"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["disposition-notification","message/disposition-notification"],["dist","application/octet-stream"],["distz","application/octet-stream"],["djv","image/vnd.djvu"],["djvu","image/vnd.djvu"],["dll","application/octet-stream"],["dmg","application/x-apple-diskimage"],["dmn","application/octet-stream"],["dmp","application/vnd.tcpdump.pcap"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.template.macroEnabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroEnabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp","application/vnd.osgi.dp"],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drle","image/dicom-rle"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dvb","video/vnd.dvb.file"],["dvi","application/x-dvi"],["dwd","application/atsc-dwd+xml"],["dwf","model/vnd.dwf"],["dwg","image/vnd.dwg"],["dxf","image/vnd.dxf"],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ear","application/java-archive"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["ecma","application/ecmascript"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["elc","application/octet-stream"],["emf","image/emf"],["eml","message/rfc822"],["emma","application/emma+xml"],["emotionml","application/emotionml+xml"],["emz","application/x-msmetafile"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es","application/ecmascript"],["es3","application/vnd.eszigno3+xml"],["esa","application/vnd.osgi.subsystem"],["esf","application/vnd.epson.esf"],["et3","application/vnd.eszigno3+xml"],["etx","text/x-setext"],["eva","application/x-eva"],["evy","application/x-envoy"],["exe","application/octet-stream"],["exi","application/exi"],["exp","application/express"],["exr","image/aces"],["ext","application/vnd.novadigm.ext"],["ez","application/andrew-inset"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f","text/x-fortran"],["f4v","video/mp4"],["f77","text/x-fortran"],["f90","text/x-fortran"],["fbs","image/vnd.fastbidsheet"],["fcdt","application/vnd.adobe.formscentral.fcdt"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fdt","application/fdt+xml"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fgd","application/x-director"],["fh","image/x-freehand"],["fh4","image/x-freehand"],["fh5","image/x-freehand"],["fh7","image/x-freehand"],["fhc","image/x-freehand"],["fig","application/x-xfig"],["fits","image/fits"],["flac","audio/x-flac"],["fli","video/x-fli"],["flo","application/vnd.micrografx.flo"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fnc","application/vnd.frogans.fnc"],["fo","application/vnd.software602.filler.form+xml"],["for","text/x-fortran"],["fpx","image/vnd.fpx"],["frame","application/vnd.framemaker"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fxpl","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gam","application/x-tads"],["gbr","application/rpki-ghostbusters"],["gca","application/x-gca-compressed"],["gdl","model/vnd.gdl"],["gdoc","application/vnd.google-apps.document"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["glb","model/gltf-binary"],["gltf","model/gltf+json"],["gml","application/gml+xml"],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gpg","application/gpg-keys"],["gph","application/vnd.flographit"],["gpx","application/gpx+xml"],["gqf","application/vnd.grafeq"],["gqs","application/vnd.grafeq"],["gram","application/srgs"],["gramps","application/x-gramps-xml"],["gre","application/vnd.geometry-explorer"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsf","application/x-font-ghostscript"],["gsheet","application/vnd.google-apps.spreadsheet"],["gslides","application/vnd.google-apps.presentation"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxf","application/gxf"],["gxt","application/vnd.geonext"],["gz","application/gzip"],["gzip","application/gzip"],["h","text/x-c"],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hbs","text/x-handlebars-template"],["hdd","application/x-virtualbox-hdd"],["hdf","application/x-hdf"],["heic","image/heic"],["heics","image/heic-sequence"],["heif","image/heif"],["heifs","image/heif-sequence"],["hej2","image/hej2k"],["held","application/atsc-held+xml"],["hh","text/x-c"],["hjson","application/hjson"],["hlp","application/winhlp"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx","application/mac-binhex40"],["hsj2","image/hsj2"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["icm","application/vnd.iccprofile"],["ico","image/x-icon"],["ics","text/calendar"],["ief","image/ief"],["ifb","text/calendar"],["ifm","application/vnd.shana.informed.formdata"],["iges","model/iges"],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs","model/iges"],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["img","application/octet-stream"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["in","text/plain"],["ini","text/plain"],["ink","application/inkml+xml"],["inkml","application/inkml+xml"],["install","application/x-install-instructions"],["iota","application/vnd.astraea-software.iota"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["iso","application/x-iso9660-image"],["itp","application/vnd.shana.informed.formtemplate"],["its","application/its+xml"],["ivp","application/vnd.immervision-ivp"],["ivu","application/vnd.immervision-ivu"],["jad","text/vnd.sun.j2me.app-descriptor"],["jade","text/jade"],["jam","application/vnd.jam"],["jar","application/java-archive"],["jardiff","application/x-java-archive-diff"],["java","text/x-java-source"],["jhc","image/jphc"],["jisp","application/vnd.jisp"],["jls","image/jls"],["jlt","application/vnd.hp-jlyt"],["jng","image/x-jng"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jp2","image/jp2"],["jpe","image/jpeg"],["jpeg","image/jpeg"],["jpf","image/jpx"],["jpg","image/jpeg"],["jpg2","image/jp2"],["jpgm","video/jpm"],["jpgv","video/jpeg"],["jph","image/jph"],["jpm","video/jpm"],["jpx","image/jpx"],["js","application/javascript"],["json","application/json"],["json5","application/json5"],["jsonld","application/ld+json"],["jsonl","application/jsonl"],["jsonml","application/jsonml+json"],["jsx","text/jsx"],["jxr","image/jxr"],["jxra","image/jxra"],["jxrs","image/jxrs"],["jxs","image/jxs"],["jxsc","image/jxsc"],["jxsi","image/jxsi"],["jxss","image/jxss"],["kar","audio/midi"],["karbon","application/vnd.kde.karbon"],["kdb","application/octet-stream"],["kdbx","application/x-keepass2"],["key","application/x-iwork-keynote-sffkey"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["knp","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["kpt","application/vnd.kde.kpresenter"],["kpxx","application/vnd.ds-keypoint"],["ksp","application/vnd.kde.kspread"],["ktr","application/vnd.kahootz"],["ktx","image/ktx"],["ktx2","image/ktx2"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["kwt","application/vnd.kde.kword"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["less","text/less"],["lgr","application/lgr+xml"],["lha","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["list3820","application/vnd.ibm.modcap"],["listafp","application/vnd.ibm.modcap"],["litcoffee","text/coffeescript"],["lnk","application/x-ms-shortcut"],["log","text/plain"],["lostxml","application/lost+xml"],["lrf","application/octet-stream"],["lrm","application/vnd.ms-lrm"],["ltf","application/vnd.frogans.ltf"],["lua","text/x-lua"],["luac","application/x-lua-bytecode"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh","application/octet-stream"],["m1v","video/mpeg"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3a","audio/mpeg"],["m3u","text/plain"],["m3u8","application/vnd.apple.mpegurl"],["m4a","audio/x-m4a"],["m4p","application/mp4"],["m4s","video/iso.segment"],["m4u","application/vnd.mpegurl"],["m4v","video/x-m4v"],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m21","application/mp21"],["ma","application/mathematica"],["mads","application/mads+xml"],["maei","application/mmt-aei+xml"],["mag","application/vnd.ecowin.chart"],["maker","application/vnd.framemaker"],["man","text/troff"],["manifest","text/cache-manifest"],["map","application/json"],["mar","application/octet-stream"],["markdown","text/markdown"],["mathml","application/mathml+xml"],["mb","application/mathematica"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc1","application/vnd.medcalcdata"],["mcd","application/vnd.mcd"],["mcurl","text/vnd.curl.mcurl"],["md","text/markdown"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["mdx","text/mdx"],["me","text/troff"],["mesh","model/mesh"],["meta4","application/metalink4+xml"],["metalink","application/metalink+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mft","application/rpki-manifest"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mid","audio/midi"],["midi","audio/midi"],["mie","application/x-mie"],["mif","application/vnd.mif"],["mime","message/rfc822"],["mj2","video/mj2"],["mjp2","video/mj2"],["mjs","application/javascript"],["mk3d","video/x-matroska"],["mka","audio/x-matroska"],["mkd","text/x-markdown"],["mks","video/x-matroska"],["mkv","video/x-matroska"],["mlp","application/vnd.dolby.mlp"],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mmf","application/vnd.smaf"],["mml","text/mathml"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mng","video/x-mng"],["mny","application/x-msmoney"],["mobi","application/x-mobipocket-ebook"],["mods","application/mods+xml"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2","audio/mpeg"],["mp2a","audio/mpeg"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mp4a","audio/mp4"],["mp4s","application/mp4"],["mp4v","video/mp4"],["mp21","application/mp21"],["mpc","application/vnd.mophun.certificate"],["mpd","application/dash+xml"],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg","video/mpeg"],["mpg4","video/mp4"],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/vnd.ms-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","text/troff"],["mscml","application/mediaservercontrol+xml"],["mseed","application/vnd.fdsn.mseed"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msi","application/x-msdownload"],["msl","application/vnd.mobius.msl"],["msm","application/octet-stream"],["msp","application/octet-stream"],["msty","application/vnd.muvee.style"],["mtl","model/mtl"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musd","application/mmt-usd+xml"],["musicxml","application/vnd.recordare.musicxml+xml"],["mvb","application/x-msmediaview"],["mvt","application/vnd.mapbox-vector-tile"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxmf","audio/mobile-xmf"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nb","application/mathematica"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncx","application/x-dtbncx+xml"],["nfo","text/x-nfo"],["ngdat","application/vnd.nokia.n-gage.data"],["nitf","application/vnd.nitf"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nq","application/n-quads"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nt","application/n-triples"],["ntf","application/vnd.nitf"],["numbers","application/x-iwork-numbers-sffnumbers"],["nzb","application/x-nzb"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["obgx","application/vnd.openblox.game+xml"],["obj","model/obj"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogex","model/vnd.opengex"],["ogg","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omdoc","application/omdoc+xml"],["onepkg","application/onenote"],["onetmp","application/onenote"],["onetoc","application/onenote"],["onetoc2","application/onenote"],["opf","application/oebps-package+xml"],["opml","text/x-opml"],["oprc","application/vnd.palm"],["opus","audio/ogg"],["org","text/x-org"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["osm","application/vnd.openstreetmap.data+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","font/otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["ova","application/x-virtualbox-ova"],["ovf","application/x-virtualbox-ovf"],["owl","application/rdf+xml"],["oxps","application/oxps"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c","application/pkcs7-mime"],["p7m","application/pkcs7-mime"],["p7r","application/x-pkcs7-certreqresp"],["p7s","application/pkcs7-signature"],["p8","application/pkcs8"],["p10","application/x-pkcs10"],["p12","application/x-pkcs12"],["pac","application/x-ns-proxy-autoconfig"],["pages","application/x-iwork-pages-sffpages"],["pas","text/x-pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcap","application/vnd.tcpdump.pcap"],["pcf","application/x-font-pcf"],["pcl","application/vnd.hp-pcl"],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb","application/x-pilot"],["pde","text/x-processing"],["pdf","application/pdf"],["pem","application/x-x509-user-cert"],["pfa","application/x-font-type1"],["pfb","application/x-font-type1"],["pfm","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfx","application/x-pkcs12"],["pgm","image/x-portable-graymap"],["pgn","application/x-chess-pgn"],["pgp","application/pgp"],["php","application/x-httpd-php"],["php3","application/x-httpd-php"],["php4","application/x-httpd-php"],["phps","application/x-httpd-php-source"],["phtml","application/x-httpd-php"],["pic","image/x-pict"],["pkg","application/octet-stream"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pkpass","application/vnd.apple.pkpass"],["pl","application/x-perl"],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["pm","application/x-perl"],["pml","application/vnd.ctc-posml"],["png","image/png"],["pnm","image/x-portable-anymap"],["portpkg","application/vnd.macports.portpkg"],["pot","application/vnd.ms-powerpoint"],["potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps","application/vnd.ms-powerpoint"],["ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt","application/powerpoint"],["pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["pqa","application/vnd.palm"],["prc","application/x-pilot"],["pre","application/vnd.lotus-freelance"],["prf","application/pics-rules"],["provx","application/provenance+xml"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd","application/x-photoshop"],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["pti","image/prs.pti"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pwn","application/vnd.3m.post-it-notes"],["pya","audio/vnd.ms-playready.media.pya"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qfx","application/vnd.intu.qfx"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qwd","application/vnd.quark.quarkxpress"],["qwt","application/vnd.quark.quarkxpress"],["qxb","application/vnd.quark.quarkxpress"],["qxd","application/vnd.quark.quarkxpress"],["qxl","application/vnd.quark.quarkxpress"],["qxt","application/vnd.quark.quarkxpress"],["ra","audio/x-realaudio"],["ram","audio/x-pn-realaudio"],["raml","application/raml+yaml"],["rapd","application/route-apd+xml"],["rar","application/x-rar"],["ras","image/x-cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["relo","application/p2p-overlay+xml"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["ris","application/x-research-info-systems"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm","audio/x-pn-realaudio"],["rmi","audio/midi"],["rmp","audio/x-pn-realaudio-plugin"],["rms","application/vnd.jcp.javame.midlet-rms"],["rmvb","application/vnd.rn-realmedia-vbr"],["rnc","application/relax-ng-compact-syntax"],["rng","application/xml"],["roa","application/rpki-roa"],["roff","text/troff"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsa","application/x-pkcs7"],["rsat","application/atsc-rsat+xml"],["rsd","application/rsd+xml"],["rsheet","application/urc-ressheet+xml"],["rss","application/rss+xml"],["rtf","text/rtf"],["rtx","text/richtext"],["run","application/x-makeself"],["rusd","application/route-usd+xml"],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["sass","text/x-sass"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm","application/vnd.lotus-screencam"],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["scss","text/x-scss"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkd","application/vnd.solent.sdkm+xml"],["sdkm","application/vnd.solent.sdkm+xml"],["sdp","application/sdp"],["sdw","application/vnd.stardivision.writer"],["sea","application/octet-stream"],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["senmlx","application/senml+xml"],["sensmlx","application/sensml+xml"],["ser","application/java-serialized-object"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sfv","text/x-sfv"],["sgi","image/sgi"],["sgl","application/vnd.stardivision.writer-global"],["sgm","text/sgml"],["sgml","text/sgml"],["sh","application/x-sh"],["shar","application/x-shar"],["shex","text/shex"],["shf","application/shf+xml"],["shtml","text/html"],["sid","image/x-mrsid-image"],["sieve","application/sieve"],["sig","application/pgp-signature"],["sil","audio/silk"],["silo","model/mesh"],["sis","application/vnd.symbian.install"],["sisx","application/vnd.symbian.install"],["sit","application/x-stuffit"],["sitx","application/x-stuffitx"],["siv","application/sieve"],["skd","application/vnd.koan"],["skm","application/vnd.koan"],["skp","application/vnd.koan"],["skt","application/vnd.koan"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slim","text/slim"],["slm","text/slim"],["sls","application/route-s-tsid+xml"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi","application/smil"],["smil","application/smil"],["smv","video/x-smv"],["smzip","application/vnd.stepmania.package"],["snd","audio/basic"],["snf","application/x-font-snf"],["so","application/octet-stream"],["spc","application/x-pkcs7-certificates"],["spdx","text/spdx"],["spf","application/vnd.yamaha.smaf-phrase"],["spl","application/x-futuresplash"],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spx","audio/ogg"],["sql","application/x-sql"],["src","application/x-wais-source"],["srt","application/x-subrip"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["ssdl","application/ssdl+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssml","application/ssml+xml"],["sst","application/octet-stream"],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl","model/stl"],["stpx","model/step+xml"],["stpxz","model/step-xml+zip"],["stpz","model/step+zip"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["styl","text/stylus"],["stylus","text/stylus"],["sub","text/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["susp","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svg","image/svg+xml"],["svgz","image/svg+xml"],["swa","application/x-director"],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["swidtag","application/swid+xml"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t","text/troff"],["t3","application/x-t3vm-image"],["t38","image/t38"],["taglet","application/vnd.mynfc"],["tao","application/vnd.tao.intent-module-archive"],["tap","image/vnd.tencent.tap"],["tar","application/x-tar"],["tcap","application/vnd.3gpp2.tcap"],["tcl","application/x-tcl"],["td","application/urc-targetdesc+xml"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["teicorpus","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text","text/plain"],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tfx","image/tiff-fx"],["tga","image/x-tga"],["tgz","application/x-tar"],["thmx","application/vnd.ms-officetheme"],["tif","image/tiff"],["tiff","image/tiff"],["tk","application/x-tcl"],["tmo","application/vnd.tmobile-livetv"],["toml","application/toml"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","text/troff"],["tra","application/vnd.trueapp"],["trig","application/trig"],["trm","application/x-msterminal"],["ts","video/mp2t"],["tsd","application/timestamped-data"],["tsv","text/tab-separated-values"],["ttc","font/collection"],["ttf","font/ttf"],["ttl","text/turtle"],["ttml","application/ttml+xml"],["twd","application/vnd.simtech-mindmapper"],["twds","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["u8dsn","message/global-delivery-status"],["u8hdr","message/global-headers"],["u8mdn","message/global-disposition-notification"],["u8msg","message/global"],["u32","application/x-authorware-bin"],["ubj","application/ubjson"],["udeb","application/x-debian-package"],["ufd","application/vnd.ufdl"],["ufdl","application/vnd.ufdl"],["ulx","application/x-glulx"],["umj","application/vnd.umajin"],["unityweb","application/vnd.unity"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["urls","text/uri-list"],["usdz","model/vnd.usdz+zip"],["ustar","application/x-ustar"],["utz","application/vnd.uiq.theme"],["uu","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvd","application/vnd.dece.data"],["uvf","application/vnd.dece.data"],["uvg","image/vnd.dece.graphic"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvt","application/vnd.dece.ttml+xml"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["uvva","audio/vnd.dece.audio"],["uvvd","application/vnd.dece.data"],["uvvf","application/vnd.dece.data"],["uvvg","image/vnd.dece.graphic"],["uvvh","video/vnd.dece.hd"],["uvvi","image/vnd.dece.graphic"],["uvvm","video/vnd.dece.mobile"],["uvvp","video/vnd.dece.pd"],["uvvs","video/vnd.dece.sd"],["uvvt","application/vnd.dece.ttml+xml"],["uvvu","video/vnd.uvvu.mp4"],["uvvv","video/vnd.dece.video"],["uvvx","application/vnd.dece.unspecified"],["uvvz","application/vnd.dece.zip"],["uvx","application/vnd.dece.unspecified"],["uvz","application/vnd.dece.zip"],["vbox","application/x-virtualbox-vbox"],["vbox-extpack","application/x-virtualbox-vbox-extpack"],["vcard","text/vcard"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vdi","application/x-virtualbox-vdi"],["vds","model/vnd.sap.vds"],["vhd","application/x-virtualbox-vhd"],["vis","application/vnd.visionary"],["viv","video/vnd.vivo"],["vlc","application/videolan"],["vmdk","application/x-virtualbox-vmdk"],["vob","video/x-ms-vob"],["vor","application/vnd.stardivision.writer"],["vox","application/x-authorware-bin"],["vrml","model/vrml"],["vsd","application/vnd.visio"],["vsf","application/vnd.vsf"],["vss","application/vnd.visio"],["vst","application/vnd.visio"],["vsw","application/vnd.visio"],["vtf","image/vnd.valve.source.texture"],["vtt","text/vtt"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w3d","application/x-director"],["wad","application/x-doom"],["wadl","application/vnd.sun.wadl+xml"],["war","application/java-archive"],["wasm","application/wasm"],["wav","audio/x-wav"],["wax","audio/x-ms-wax"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["wdp","image/vnd.ms-photo"],["weba","audio/webm"],["webapp","application/x-web-app-manifest+json"],["webm","video/webm"],["webmanifest","application/manifest+json"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf","image/wmf"],["wml","text/vnd.wap.wml"],["wmlc","application/wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-msmetafile"],["woff","font/woff"],["woff2","font/woff2"],["word","application/msword"],["wpd","application/vnd.wordperfect"],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wqd","application/vnd.wqd"],["wri","application/x-mswrite"],["wrl","model/vrml"],["wsc","message/vnd.wfa.wsc"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wtb","application/vnd.webturbo"],["wvx","video/x-ms-wvx"],["x3d","model/x3d+xml"],["x3db","model/x3d+fastinfoset"],["x3dbz","model/x3d+binary"],["x3dv","model/x3d-vrml"],["x3dvz","model/x3d+vrml"],["x3dz","model/x3d+xml"],["x32","application/x-authorware-bin"],["x_b","model/vnd.parasolid.transmit.binary"],["x_t","model/vnd.parasolid.transmit.text"],["xaml","application/xaml+xml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xav","application/xcap-att+xml"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm","image/x-xbitmap"],["xca","application/xcap-caps+xml"],["xcs","application/calendar+xml"],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xel","application/xcap-el+xml"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xht","application/xhtml+xml"],["xhtml","application/xhtml+xml"],["xhvml","application/xv+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla","application/vnd.ms-excel"],["xlam","application/vnd.ms-excel.addin.macroEnabled.12"],["xlc","application/vnd.ms-excel"],["xlf","application/xliff+xml"],["xlm","application/vnd.ms-excel"],["xls","application/vnd.ms-excel"],["xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt","application/vnd.ms-excel"],["xltm","application/vnd.ms-excel.template.macroEnabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlw","application/vnd.ms-excel"],["xm","audio/xm"],["xml","application/xml"],["xns","application/xcap-ns+xml"],["xo","application/vnd.olpc-sugar"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpl","application/xproc+xml"],["xpm","image/x-xpixmap"],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xpx","application/vnd.intercon.formnet"],["xsd","application/xml"],["xsl","application/xml"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xul","application/vnd.mozilla.xul+xml"],["xvm","application/xv+xml"],["xvml","application/xv+xml"],["xwd","image/x-xwindowdump"],["xyz","chemical/x-xyz"],["xz","application/x-xz"],["yaml","text/yaml"],["yang","application/yang"],["yin","application/yin+xml"],["yml","text/yaml"],["ymp","text/x-suse-ymp"],["z","application/x-compress"],["z1","application/x-zmachine"],["z2","application/x-zmachine"],["z3","application/x-zmachine"],["z4","application/x-zmachine"],["z5","application/x-zmachine"],["z6","application/x-zmachine"],["z7","application/x-zmachine"],["z8","application/x-zmachine"],["zaz","application/vnd.zzazz.deck+xml"],["zip","application/zip"],["zir","application/vnd.zul"],["zirz","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zsh","text/x-scriptzsh"]]);function bi(e,t,n){const r=GB(e),{webkitRelativePath:o}=e,i=typeof t=="string"?t:typeof o=="string"&&o.length>0?o:`./${e.name}`;return typeof r.path!="string"&&lb(r,"path",i),lb(r,"relativePath",i),r}function GB(e){const{name:t}=e;if(t&&t.lastIndexOf(".")!==-1&&!e.type){const r=t.split(".").pop().toLowerCase(),o=UB.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}function lb(e,t,n){Object.defineProperty(e,t,{value:n,writable:!1,configurable:!1,enumerable:!0})}const YB=[".DS_Store","Thumbs.db"];function KB(e){return jo(this,void 0,void 0,function*(){return Fl(e)&&ZB(e.dataTransfer)?eH(e.dataTransfer,e.type):XB(e)?QB(e):Array.isArray(e)&&e.every(t=>"getFile"in t&&typeof t.getFile=="function")?JB(e):[]})}function ZB(e){return Fl(e)}function XB(e){return Fl(e)&&Fl(e.target)}function Fl(e){return typeof e=="object"&&e!==null}function QB(e){return ep(e.target.files).map(t=>bi(t))}function JB(e){return jo(this,void 0,void 0,function*(){return(yield Promise.all(e.map(n=>n.getFile()))).map(n=>bi(n))})}function eH(e,t){return jo(this,void 0,void 0,function*(){if(e.items){const n=ep(e.items).filter(o=>o.kind==="file");if(t!=="drop")return n;const r=yield Promise.all(n.map(tH));return cb(LE(r))}return cb(ep(e.files).map(n=>bi(n)))})}function cb(e){return e.filter(t=>YB.indexOf(t.name)===-1)}function ep(e){if(e===null)return[];const t=[];for(let n=0;n<e.length;n++){const r=e[n];t.push(r)}return t}function tH(e){if(typeof e.webkitGetAsEntry!="function")return ub(e);const t=e.webkitGetAsEntry();return t&&t.isDirectory?VE(t):ub(e,t)}function LE(e){return e.reduce((t,n)=>[...t,...Array.isArray(n)?LE(n):[n]],[])}function ub(e,t){return jo(this,void 0,void 0,function*(){var n;if(globalThis.isSecureContext&&typeof e.getAsFileSystemHandle=="function"){const i=yield e.getAsFileSystemHandle();if(i===null)throw new Error(`${e} is not a File`);if(i!==void 0){const s=yield i.getFile();return s.handle=i,bi(s)}}const r=e.getAsFile();if(!r)throw new Error(`${e} is not a File`);return bi(r,(n=t?.fullPath)!==null&&n!==void 0?n:void 0)})}function nH(e){return jo(this,void 0,void 0,function*(){return e.isDirectory?VE(e):rH(e)})}function VE(e){const t=e.createReader();return new Promise((n,r)=>{const o=[];function i(){t.readEntries(s=>jo(this,void 0,void 0,function*(){if(s.length){const a=Promise.all(s.map(nH));o.push(a),i()}else try{const a=yield Promise.all(o);n(a)}catch(a){r(a)}}),s=>{r(s)})}i()})}function rH(e){return jo(this,void 0,void 0,function*(){return new Promise((t,n)=>{e.file(r=>{const o=bi(r,e.fullPath);t(o)},r=>{n(r)})})})}var $a={},db;function oH(){return db||(db=1,$a.__esModule=!0,$a.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(s){var a=s.trim().toLowerCase();return a.charAt(0)==="."?r.toLowerCase().endsWith(a):a.endsWith("/*")?i===a.replace(/\/.*$/,""):o===a})}return!0}),$a}var iH=oH();const Ld=a0(iH);function fb(e){return lH(e)||aH(e)||zE(e)||sH()}function sH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lH(e){if(Array.isArray(e))return tp(e)}function pb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function mb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pb(Object(n),!0).forEach(function(r){$E(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $s(e,t){return dH(e)||uH(e,t)||zE(e,t)||cH()}function cH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zE(e,t){if(e){if(typeof e=="string")return tp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tp(e,t)}}function tp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function dH(e){if(Array.isArray(e))return e}var fH=typeof Ld=="function"?Ld:Ld.default,pH="file-invalid-type",mH="file-too-large",hH="file-too-small",gH="too-many-files",yH=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",n=t.split(","),r=n.length>1?"one of ".concat(n.join(", ")):n[0];return{code:pH,message:"File type must be ".concat(r)}},hb=function(t){return{code:mH,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},gb=function(t){return{code:hH,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},vH={code:gH,message:"Too many files"};function xH(e){return e.type===""&&typeof e.getAsFile=="function"}function BE(e,t){var n=e.type==="application/x-moz-file"||fH(e,t)||xH(e);return[n,n?null:yH(t)]}function HE(e,t,n){if(co(e.size))if(co(t)&&co(n)){if(e.size>n)return[!1,hb(n)];if(e.size<t)return[!1,gb(t)]}else{if(co(t)&&e.size<t)return[!1,gb(t)];if(co(n)&&e.size>n)return[!1,hb(n)]}return[!0,null]}function co(e){return e!=null}function bH(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,s=e.maxFiles,a=e.validator;return!i&&t.length>1||i&&s>=1&&t.length>s?!1:t.every(function(l){var c=BE(l,n),u=$s(c,1),d=u[0],f=HE(l,r,o),m=$s(f,1),g=m[0],y=a?a(l):null;return d&&g&&!y})}function Ll(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function Ki(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function yb(e){e.preventDefault()}function wH(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function SH(e){return e.indexOf("Edge/")!==-1}function TH(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return wH(e)||SH(e)}function Hn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),s=1;s<o;s++)i[s-1]=arguments[s];return t.some(function(a){return!Ll(r)&&a&&a.apply(void 0,[r].concat(i)),Ll(r)})}}function EH(){return"showOpenFilePicker"in window}function CH(e){if(co(e)){var t=Object.entries(e).filter(function(n){var r=$s(n,2),o=r[0],i=r[1],s=!0;return WE(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),s=!1),(!Array.isArray(i)||!i.every(qE))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),s=!1),s}).reduce(function(n,r){var o=$s(r,2),i=o[0],s=o[1];return mb(mb({},n),{},$E({},i,s))},{});return[{description:"Files",accept:t}]}return e}function kH(e){if(co(e))return Object.entries(e).reduce(function(t,n){var r=$s(n,2),o=r[0],i=r[1];return[].concat(fb(t),[o],fb(i))},[]).filter(function(t){return WE(t)||qE(t)}).join(",")}function RH(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function IH(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function WE(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function qE(e){return/^.*\.[\w]+$/.test(e)}var AH=["children"],PH=["open"],OH=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],jH=["refKey","onChange","onClick"];function vb(e){return NH(e)||MH(e)||UE(e)||DH()}function DH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MH(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NH(e){if(Array.isArray(e))return np(e)}function Vd(e,t){return LH(e)||FH(e,t)||UE(e,t)||_H()}function _H(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UE(e,t){if(e){if(typeof e=="string")return np(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return np(e,t)}}function np(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,s,a;try{for(n=n.call(e);!(o=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,a=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function LH(e){if(Array.isArray(e))return e}function xb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xb(Object(n),!0).forEach(function(r){rp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xb(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vl(e,t){if(e==null)return{};var n=VH(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VH(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var oh=S.forwardRef(function(e,t){var n=e.children,r=Vl(e,AH),o=YE(r),i=o.open,s=Vl(o,PH);return S.useImperativeHandle(t,function(){return{open:i}},[i]),S.createElement(S.Fragment,null,n(vt(vt({},s),{},{open:i})))});oh.displayName="Dropzone";var GE={disabled:!1,getFilesFromEvent:KB,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};oh.defaultProps=GE;oh.propTypes={children:gt.func,accept:gt.objectOf(gt.arrayOf(gt.string)),multiple:gt.bool,preventDropOnDocument:gt.bool,noClick:gt.bool,noKeyboard:gt.bool,noDrag:gt.bool,noDragEventsBubbling:gt.bool,minSize:gt.number,maxSize:gt.number,maxFiles:gt.number,disabled:gt.bool,getFilesFromEvent:gt.func,onFileDialogCancel:gt.func,onFileDialogOpen:gt.func,useFsAccessApi:gt.bool,autoFocus:gt.bool,onDragEnter:gt.func,onDragLeave:gt.func,onDragOver:gt.func,onDrop:gt.func,onDropAccepted:gt.func,onDropRejected:gt.func,onError:gt.func,validator:gt.func};var op={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,isDragGlobal:!1,acceptedFiles:[],fileRejections:[]};function YE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=vt(vt({},GE),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,s=t.minSize,a=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,m=t.onDropAccepted,g=t.onDropRejected,y=t.onFileDialogCancel,h=t.onFileDialogOpen,v=t.useFsAccessApi,x=t.autoFocus,b=t.preventDropOnDocument,T=t.noClick,E=t.noKeyboard,R=t.noDrag,w=t.noDragEventsBubbling,C=t.onError,I=t.validator,P=S.useMemo(function(){return kH(n)},[n]),M=S.useMemo(function(){return CH(n)},[n]),j=S.useMemo(function(){return typeof h=="function"?h:bb},[h]),L=S.useMemo(function(){return typeof y=="function"?y:bb},[y]),O=S.useRef(null),N=S.useRef(null),V=S.useReducer($H,op),D=Vd(V,2),k=D[0],F=D[1],_=k.isFocused,B=k.isFileDialogActive,U=S.useRef(typeof window<"u"&&window.isSecureContext&&v&&EH()),G=function(){!U.current&&B&&setTimeout(function(){if(N.current){var X=N.current.files;X.length||(F({type:"closeDialog"}),L())}},300)};S.useEffect(function(){return window.addEventListener("focus",G,!1),function(){window.removeEventListener("focus",G,!1)}},[N,B,L,U]);var H=S.useRef([]),ee=S.useRef([]),ie=function(X){O.current&&O.current.contains(X.target)||(X.preventDefault(),H.current=[])};S.useEffect(function(){return b&&(document.addEventListener("dragover",yb,!1),document.addEventListener("drop",ie,!1)),function(){b&&(document.removeEventListener("dragover",yb),document.removeEventListener("drop",ie))}},[O,b]),S.useEffect(function(){var $=function(je){ee.current=[].concat(vb(ee.current),[je.target]),Ki(je)&&F({isDragGlobal:!0,type:"setDragGlobal"})},X=function(je){ee.current=ee.current.filter(function(De){return De!==je.target&&De!==null}),!(ee.current.length>0)&&F({isDragGlobal:!1,type:"setDragGlobal"})},me=function(){ee.current=[],F({isDragGlobal:!1,type:"setDragGlobal"})},ye=function(){ee.current=[],F({isDragGlobal:!1,type:"setDragGlobal"})};return document.addEventListener("dragenter",$,!1),document.addEventListener("dragleave",X,!1),document.addEventListener("dragend",me,!1),document.addEventListener("drop",ye,!1),function(){document.removeEventListener("dragenter",$),document.removeEventListener("dragleave",X),document.removeEventListener("dragend",me),document.removeEventListener("drop",ye)}},[O]),S.useEffect(function(){return!r&&x&&O.current&&O.current.focus(),function(){}},[O,x,r]);var te=S.useCallback(function($){C?C($):console.error($)},[C]),q=S.useCallback(function($){$.preventDefault(),$.persist(),ve($),H.current=[].concat(vb(H.current),[$.target]),Ki($)&&Promise.resolve(o($)).then(function(X){if(!(Ll($)&&!w)){var me=X.length,ye=me>0&&bH({files:X,accept:P,minSize:s,maxSize:i,multiple:a,maxFiles:l,validator:I}),Ee=me>0&&!ye;F({isDragAccept:ye,isDragReject:Ee,isDragActive:!0,type:"setDraggedFiles"}),c&&c($)}}).catch(function(X){return te(X)})},[o,c,te,w,P,s,i,a,l,I]),Y=S.useCallback(function($){$.preventDefault(),$.persist(),ve($);var X=Ki($);if(X&&$.dataTransfer)try{$.dataTransfer.dropEffect="copy"}catch{}return X&&d&&d($),!1},[d,w]),Z=S.useCallback(function($){$.preventDefault(),$.persist(),ve($);var X=H.current.filter(function(ye){return O.current&&O.current.contains(ye)}),me=X.indexOf($.target);me!==-1&&X.splice(me,1),H.current=X,!(X.length>0)&&(F({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ki($)&&u&&u($))},[O,u,w]),fe=S.useCallback(function($,X){var me=[],ye=[];$.forEach(function(Ee){var je=BE(Ee,P),De=Vd(je,2),it=De[0],Pt=De[1],Yt=HE(Ee,s,i),Ve=Vd(Yt,2),W=Ve[0],K=Ve[1],Ae=I?I(Ee):null;if(it&&W&&!Ae)me.push(Ee);else{var We=[Pt,K];Ae&&(We=We.concat(Ae)),ye.push({file:Ee,errors:We.filter(function(Ge){return Ge})})}}),(!a&&me.length>1||a&&l>=1&&me.length>l)&&(me.forEach(function(Ee){ye.push({file:Ee,errors:[vH]})}),me.splice(0)),F({acceptedFiles:me,fileRejections:ye,type:"setFiles"}),f&&f(me,ye,X),ye.length>0&&g&&g(ye,X),me.length>0&&m&&m(me,X)},[F,a,P,s,i,l,f,m,g,I]),z=S.useCallback(function($){$.preventDefault(),$.persist(),ve($),H.current=[],Ki($)&&Promise.resolve(o($)).then(function(X){Ll($)&&!w||fe(X,$)}).catch(function(X){return te(X)}),F({type:"reset"})},[o,fe,te,w]),se=S.useCallback(function(){if(U.current){F({type:"openDialog"}),j();var $={multiple:a,types:M};window.showOpenFilePicker($).then(function(X){return o(X)}).then(function(X){fe(X,null),F({type:"closeDialog"})}).catch(function(X){RH(X)?(L(X),F({type:"closeDialog"})):IH(X)?(U.current=!1,N.current?(N.current.value=null,N.current.click()):te(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):te(X)});return}N.current&&(F({type:"openDialog"}),j(),N.current.value=null,N.current.click())},[F,j,L,v,fe,te,M,a]),le=S.useCallback(function($){!O.current||!O.current.isEqualNode($.target)||($.key===" "||$.key==="Enter"||$.keyCode===32||$.keyCode===13)&&($.preventDefault(),se())},[O,se]),Q=S.useCallback(function(){F({type:"focus"})},[]),ce=S.useCallback(function(){F({type:"blur"})},[]),re=S.useCallback(function(){T||(TH()?setTimeout(se,0):se())},[T,se]),pe=function(X){return r?null:X},oe=function(X){return E?null:pe(X)},ae=function(X){return R?null:pe(X)},ve=function(X){w&&X.stopPropagation()},ue=S.useMemo(function(){return function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=$.refKey,me=X===void 0?"ref":X,ye=$.role,Ee=$.onKeyDown,je=$.onFocus,De=$.onBlur,it=$.onClick,Pt=$.onDragEnter,Yt=$.onDragOver,Ve=$.onDragLeave,W=$.onDrop,K=Vl($,OH);return vt(vt(rp({onKeyDown:oe(Hn(Ee,le)),onFocus:oe(Hn(je,Q)),onBlur:oe(Hn(De,ce)),onClick:pe(Hn(it,re)),onDragEnter:ae(Hn(Pt,q)),onDragOver:ae(Hn(Yt,Y)),onDragLeave:ae(Hn(Ve,Z)),onDrop:ae(Hn(W,z)),role:typeof ye=="string"&&ye!==""?ye:"presentation"},me,O),!r&&!E?{tabIndex:0}:{}),K)}},[O,le,Q,ce,re,q,Y,Z,z,E,R,r]),ne=S.useCallback(function($){$.stopPropagation()},[]),J=S.useMemo(function(){return function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},X=$.refKey,me=X===void 0?"ref":X,ye=$.onChange,Ee=$.onClick,je=Vl($,jH),De=rp({accept:P,multiple:a,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:pe(Hn(ye,z)),onClick:pe(Hn(Ee,ne)),tabIndex:-1},me,N);return vt(vt({},De),je)}},[N,n,a,z,r]);return vt(vt({},k),{},{isFocused:_&&!r,getRootProps:ue,getInputProps:J,rootRef:O,inputRef:N,open:pe(se)})}function $H(e,t){switch(t.type){case"focus":return vt(vt({},e),{},{isFocused:!0});case"blur":return vt(vt({},e),{},{isFocused:!1});case"openDialog":return vt(vt({},op),{},{isFileDialogActive:!0});case"closeDialog":return vt(vt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return vt(vt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return vt(vt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections,isDragReject:!1});case"setDragGlobal":return vt(vt({},e),{},{isDragGlobal:t.isDragGlobal});case"reset":return vt({},op);default:return e}}function bb(){}const KE=S.createContext([null,()=>{}]),zH=()=>S.useContext(KE),BH=e=>e.type.startsWith("image/")?"img":e.type.startsWith("audio/")?"audio":e.type.startsWith("video/")?"video":e.type,HH={csv:Mu,xls:Mu,mov:kg,mp4:kg,xlsx:Mu,pdf:Cg,txt:Cg,json:eI,mp3:zR},WH=e=>{const[,t]=zH(),[n,r]=S.useState({url:"",type:"",size:""});S.useEffect(()=>{const l=e.file,c=URL.createObjectURL(l);return r({url:c,type:BH(l),size:FB(l.size)}),()=>URL.revokeObjectURL(c)},[e.file]);const o=l=>{l.stopPropagation(),l.preventDefault(),t({...n,file:e.file})},i=l=>{l.preventDefault(),l.stopPropagation(),e.onDeleteFile?.(e.file)},s=HH[e.file.name.split(".").at(-1)]??B0,a=n.type==="img"?p.jsx("img",{src:n.url,className:"w-full object-contain",alt:e.file.name}):p.jsx(s,{strokeWidth:2,absoluteStrokeWidth:!0,size:48});return p.jsxs("li",{className:"flex w-full flex-row justify-between gap-4 border-b border-card-border last:border-b-transparent",children:[p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsxs("div",{className:"flex flex-row items-center gap-4",children:[p.jsx("button",{type:"button",onClick:o,className:"m-2 flex size-16 max-w-16 items-center justify-center overflow-hidden",children:a}),p.jsxs("div",{className:"flex flex-col items-start justify-start text-left",children:[p.jsx("span",{children:e.file.name}),p.jsx("span",{className:"text-sm italic",children:n.size})]})]}),e.File?p.jsx("div",{className:"min-w-full flex-1",children:p.jsx(e.File,{file:e.file})}):null]}),p.jsx("div",{className:"align-start flex justify-start py-4 transition-colors duration-300 ease-linear hover:text-danger-hover",children:p.jsx("button",{onClick:i,type:"button",className:"flex size-6 items-center justify-center",children:p.jsx(Pi,{size:16})})})]})},qH=e=>p.jsx("ul",{className:"w-full space-y-8",children:e.files.map(t=>p.jsx(WH,{File:e.File,onDeleteFile:e.onDeleteFile,file:t},t.name))}),ZE=e=>{const t=yt(),n=e.dragging?iI:aI;return p.jsxs("div",{className:"flex flex-col items-center justify-center",children:[p.jsx("div",{className:"flex flex-col items-center justify-center gap-2",children:p.jsx(n,{className:"text-primary",size:80})}),p.jsxs("div",{className:"my-4 flex flex-col items-center gap-1",children:[p.jsx("p",{children:t.uploadIdle}),p.jsx("button",{className:"text-primary underline",type:"button",children:t.uploadIdleButton})]})]})},UH=e=>e.isDragActive?p.jsx(ZE,{files:e.files,dragging:!0}):e.files.length>0?p.jsx(qH,{File:e.File,onDeleteFile:e.onDeleteFile,files:e.files}):p.jsx(S.Fragment,{children:e.idle}),GH=p.jsx(ZE,{dragging:!1}),YH=e=>{const t=e.item.file,n=e.item.type;return p.jsxs("div",{className:"flex flex-col gap-4",children:[p.jsx("p",{className:"text-lg font-medium",children:e.item.file.name}),p.jsx("p",{className:"text-base",children:e.item.size}),n==="img"?p.jsx("img",{className:"container inline-block w-full max-w-96",src:e.item.url,alt:t.name}):n==="video"?p.jsx("video",{className:"container block w-full max-w-96",src:e.item.url,controls:!0,muted:!0}):n==="audio"?p.jsx("figure",{children:p.jsx("audio",{controls:!0,src:e.item.url})}):null]})},KH=({idle:e=GH,onDeleteFile:t,File:n,onDrop:r,...o})=>{const i=yt(),s=S.useState(null),[a,l]=S.useState([]),c=o.files??a,u=()=>s[1](null),d=y=>{r?.(y),l(h=>h.concat(y))},{getRootProps:f,getInputProps:m,isDragActive:g}=YE({onDrop:d});return p.jsxs(KE.Provider,{value:s,children:[p.jsx(ca,{overlayClickClose:!0,title:i.uploadDialogTitle,ariaTitle:i.uploadDialogTitle,open:s[0]!==null,onChange:u,children:s[0]?p.jsx(YH,{item:s[0]}):null}),p.jsxs("div",{...f(),"data-active":c?c.length>0:!1,className:"flex flex-col items-center justify-center rounded-lg border border-card-border p-6 text-foreground data-[active=true]:border-solid data-[active=false]:border-dashed data-[active=true]:border-transparent data-[active=true]:bg-card-background",children:[p.jsx("input",{...m(o),name:o.name,id:o.name}),p.jsx(UH,{File:n,onDeleteFile:t,isDragActive:g,idle:e,files:c})]})]})},wb=()=>window.matchMedia("@media (pointer: coarse)"),ZH=()=>{const e=S.useRef($r()?null:wb()),[t,n]=S.useState($r()?!1:e.current?.matches??!1);return S.useEffect(()=>{(e.current===null?wb():e.current).addEventListener("change",o=>n(o.matches))},[]),t},XE=(e,t="overflow-hidden")=>{const n=S.useRef(null),r=ZH(),o=S.useRef($r()?"":document.documentElement.style.overflowY);return S.useEffect(()=>{if(!(n.current===null&&!e)&&t!=="block-only"&&t==="overflow-hidden")if(e){if(o.current=document.documentElement.style.overflowY,document.documentElement.style.overflowY="hidden",r||jw())return;document.documentElement.style.padding=O0(document.documentElement)?"0 15px 0 0":""}else document.documentElement.style.padding="",document.documentElement.style.overflowY=o.current},[e,r,t]),S.useEffect(()=>{if(!e)return;const i=new AbortController,s=document.documentElement,a=l=>{const c=n.current;if(c&&c.contains(l.target)){const u=c.getBoundingClientRect(),d=c.style.height?Number(vk(c.style.height)):null,f=Be.number(d)?d:u.height,m=c.scrollHeight<=f;return f===c.scrollHeight?e?l.preventDefault():void 0:m?void 0:e?l.preventDefault():void 0}return l.currentTarget===document.documentElement,e?l.preventDefault():void 0};return s.addEventListener("wheel",a,{signal:i.signal,passive:!1}),s.addEventListener("scroll",a,{signal:i.signal,passive:!1}),()=>{i.abort()}},[e]),n},XH=(e,t)=>{e=String(e).toLocaleLowerCase(),t=String(t).toLocaleLowerCase();const n=t[0],r=e.split("").map((s,a)=>s===n?a:!1).filter(s=>s!==!1);if(r.length===0)return null;const o=[];if(r.forEach(s=>{let a=s+1;const l=[s];for(let c=1;c<t.length;c++){const u=t[c];if(a=e.indexOf(u,a),a===-1)return;l.push(a),a++}o.push(l)}),o.length===0)return null;const i=o.sort((s,a)=>{if(s.length===1)return s[0]-a[0];const l=s[s.length-1]-s[0],c=a[a.length-1]-a[0];return l-c})[0];return e===t?1:i.length>1?2+(i[i.length-1]-i[0]):2+i[0]},Sb=(e,t,n)=>{const r=e.split(t).filter(Boolean);let o=n;for(const i of r){if(o==null)return o;o=o[i]}return o},Tb={basic:/[,[\]]+?/,extend:/[,[\].]+?/},Eb=(e,t)=>{const n=Sb(t,Tb.basic,e);return n!==void 0&&n!==e?n:Sb(t,Tb.extend,e)},Cb=e=>e.replace(/[^0-9]/g,""),za=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,""),kb=(e,t,n,r="FUZZY")=>r==="CONTAINS"?e.includes(t):r==="EQUAL"?e===t:r==="CONTAINS_NUMBERS"?Cb(e).includes(Cb(t)):r==="STARTS_WITH"?e.startsWith(t):r==="ENDS_WITH"?e.endsWith(t):r==="FUZZY"?XH(e,t)!==null:!1,QH=(e,t,n,r="FUZZY")=>Array.isArray(t)?t.some(o=>kb(e,o,n,r)):kb(e,t,n,r),ih=(e,t,n)=>{if(n.length===0)return e;const r=new Map,o=n.map(i=>({...i,value:Be.array(i.value)?i.value.map(za):za(`${i.value}`)}));return e.forEach(i=>{const s=Eb(i,t);o.forEach(a=>{const l=Eb(i,a.key);if(!l)return;const c=za(`${a.value}`.toLocaleLowerCase()).trim(),u=za(`${l}`.toLocaleLowerCase()).trim();if(QH(u,c,a.score,a.match))return void r.set(s,i);Be.function(a.ifNotMatch)&&a.ifNotMatch(c,u)&&r.set(s,i)})}),Array.from(r.values())},JH=e=>p.jsx(S.Fragment,{children:e.children}),eW={duration:200,open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0},initial:{transform:"scaleY(0)",opacity:.2}},tW=[],nW=S.forwardRef(function(t,n){return p.jsx(Le.ul,{...t,ref:n,className:"max-h-96 w-full overscroll-contain rounded-lg",children:p.jsx(xn,{children:t.children})})}),rW=S.forwardRef(function({item:t,context:n,...r},o){return p.jsx(Le.li,{...r,ref:o,className:"first:rounded-t-lg last:rounded-t-lg"})}),oW={List:nW,Item:rW},Bo=40,iW=S.forwardRef(({left:e,error:t,right:n,loading:r,options:o,container:i,rightLabel:s,interactive:a,emptyMessage:l,optionalText:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:m=!1,dynamicOption:g=!1,...y},h)=>{const v=S.useRef(null),x=S.useRef(null),b=S.useRef(null),T=y.value??y.defaultValue??"",E=yt(),[R,w]=S.useState(()=>Math.min(320,Bo*o.length)),[C,I]=S.useState(!1),[P,M]=S.useState(""),[j,L]=S.useState(T),[O,N]=S.useState(()=>o.find($=>$.value===T)?.label??T),[V,D]=S.useState(null),k=S.useRef(tW),F=XE(C,"block-only"),_=g&&P!==""?[{value:P,label:P,"data-dynamic":"true"},...o]:o,B=()=>bs.flushSync(()=>I(!0)),U=P?ih(_,"value",[{key:"value",value:P},{key:"label",value:P}]):_,G=()=>{I(!1),w(0)},H=U.filter($=>$.hidden!==!0),ee=g?void 0:`^(${o.map($=>`${of($.value)}${$.label?"|"+of($.label):""}`).join("|")})$`,{x:ie,y:te,strategy:q,refs:Y,context:Z,placement:fe}=ir({open:C,transform:!0,onOpenChange:I,placement:"bottom-start",whileElementsMounted:Io,middleware:[ji(4),yw({allowedPlacements:["top-start","bottom-start"],alignment:"start"}),gw({padding:10,elementContext:"reference",apply($){const me=$.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,ye=ws(Y.reference.current,window.innerHeight),Ee=Math.min(me<Bo?ye:me,ye,$.availableHeight),je=H.length===0?Bo:Math.min(Ee,ye,me),De=`${x.current?.getBoundingClientRect().width||ye}px`;Object.assign($.elements.floating.style,{width:De,maxWidth:De,height:je})}})]}),z=Rw(Z,eW),{getReferenceProps:se,getFloatingProps:le,getItemProps:Q}=sr([wr(Z,{role:"listbox"}),Kr(Z),uc(Z,{cols:0,listRef:k,loop:!0,virtual:!0,allowEscape:!0,activeIndex:V,selectedIndex:V,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0})]);S.useEffect(()=>{if(y.value){const $=o.find(X=>X.value===y.value);$&&(N($.label??$.value),L(y.value))}},[y.value,o.length]),S.useEffect(()=>{if(!C)return w(0);const $=Y.reference;if($.current===null)return;const X=ws($.current,window.innerHeight);setTimeout(()=>w(Math.min(X,H.length*Bo)),100)},[P,C,Y.reference,H.length]),S.useEffect(()=>{const $=Y.reference.current;if($)return Us($)},[]);const ce=($,X)=>{L($.value);const me=Y.reference.current;if(!me)return;me?.setAttribute("data-value",$.value),me.value=$.value;const ye=new Event("change",{bubbles:!1,cancelable:!0});me.dispatchEvent(ye),y.onChange&&y.onChange(ye),N($.label??""),G(),M(""),D(X)},re=$=>{const X=$.target.value;return M(X),!C&&X===""?I(!0):($.target.name=y.name||"",X?I(!0):y.onChange?.($))},pe=()=>{B(),M(""),Y.reference.current?.focus()},oe=()=>{D($=>$===null?0:$),B(),M("")},ae=()=>{Y.reference.current?.setAttribute("data-value",""),M(""),L(""),N(""),P0(Y.reference.current),G()},ve=y.id||y.name,ue=`${ve}-shadow`,ne=H.length===0,J=fe==="top"||fe==="top-start";return p.jsxs(Qs,{...y,left:e,error:t,ref:x,form:y.form,loading:r,name:y.name,feedback:C&&J?y.title:d,hideLeft:f,required:m,title:y.title,container:i,rightLabel:s,interactive:a,id:ue,optionalText:c,componentName:"autocomplete",labelClassName:u,placeholder:y.placeholder,right:p.jsxs("span",{className:"flex items-center gap-0.5",children:[n,p.jsxs("button",{type:"button",className:"p-2 transition-colors link:text-primary md:p-1",onClick:pe,children:[p.jsx(gp,{size:20}),p.jsx("span",{className:"sr-only",children:E.inputCaretDown})]}),j?p.jsx("button",{type:"button",onClick:ae,className:"p-2 transition-colors link:text-danger md:p-1",children:p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[p.jsx("input",{"data-shadow":"true",...se({...y,onFocus:oe,pattern:ee,onChange:re,id:ue,name:ue,ref:Y.setReference,onClick:$=>$.currentTarget.focus(),onKeyDown($){if($.key==="Escape")return $.currentTarget.blur(),G();if(C){if($.key==="ArrowDown"){let X=Be.number(V)?V+1:0;return X>H.length-1&&(X=0),b.current?.scrollIntoView({index:X}),D(X)}if($.key==="ArrowUp"){let X=Be.number(V)?V-1:H.length-1;return X<0&&(X=H.length-1),b.current?.scrollIntoView({index:X}),D(X)}if($.key==="Enter"){if(V!==null&&H[V])return $.preventDefault(),ce(H[V],V);if(H.length===1)return $.preventDefault(),ce(H[0],0)}}}}),"data-value":j,"data-error":!!t,"data-name":ve,"data-target":ve,required:m,value:C?P:o.length===0?"":O||j,"aria-autocomplete":"list",autoComplete:"off",className:Ie("input placeholder-input-mask group h-input-height w-full flex-1","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","text-base group-focus-within:border-primary group-hover:border-primary",y.className)}),p.jsx("input",{id:ve,name:ve,type:"hidden","data-origin":ve,ref:h,required:m,defaultValue:y.value||j||void 0}),p.jsx(br,{preserveTabOrder:!0,children:C?p.jsx(Ao,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:p.jsxs(Le.div,{...le({ref:mr(F,Y.setFloating),style:{...z.styles,left:ie,top:te??0,position:q,height:"auto"}}),initial:!1,"data-floating":"true",animate:{height:ne?"auto":R},className:Ie("shadow-floating isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground ease-in-out",J?"origin-[bottom_center]":"origin-[top_center]"),onAnimationComplete:()=>{if(!C)return w(0);const X=Y.floating.current.querySelectorAll("li").item(0),me=(X?X.getBoundingClientRect().height:Bo)*H.length;return bs.flushSync(()=>w(me+2))},children:[ne?p.jsx("div",{role:"option",className:"w-full border-b border-tooltip-border",children:p.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:l||E.autocompleteEmpty})}):null,p.jsx(zm,{overscan:40,ref:b,hidden:ne,data:H,style:{height:R},defaultItemHeight:Bo,components:oW,scrollerRef:$=>{v.current=$},className:"border-floating max-h-full overscroll-contain rounded-lg bg-floating-background p-0 text-foreground",itemContent:($,X)=>{const me=X.Render??JH,ye=j===X.value||j===X.label,Ee=V===$,je=X.label??X.value;return p.jsx("button",{"data-value":X.value,...Q({ref:De=>{k.current[$]=De},role:"option",type:"button","aria-checked":ye,"aria-current":ye,"aria-selected":ye,"aria-busy":X.disabled,onClick:()=>ce(X,$),className:`cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${ye?"bg-primary-hover text-primary-foreground":""} ${Ee?"bg-floating-hover text-floating-foreground":""}`}),children:p.jsx(me,{...y,label:X.label,value:X.value,children:je})})}})]})}):null})]})});class Dn extends Map{list=[];constructor(t){super(t),this.list=[],Array.isArray(t)&&(this.list=t),t instanceof Dn&&(this.list=Array.from(t.entries()))}set(t,n){return super.set(t,n),this.list=(this.list??[]).concat([[t,n]]),this}remove(t){return super.delete(t),this.list=Array.from(this.entries())??[],this}map(t){return this.list.map((n,r)=>t(n[1],r))}clone(t){const n=new Dn(this);return t?t(n):n}static from(t,n){return new Dn(t.map(r=>[n(r),r]))}static unique(t,n){return Array.from(Dn.from(t,n).values())}toArray(){return Array.from(this.values())}}const Rb=40,sW=e=>p.jsx(S.Fragment,{children:e.children}),aW={duration:300,initial:{transform:"scaleY(0)",opacity:.2},open:{transform:"scaleY(1)",opacity:1},close:{transform:"scaleY(0)",opacity:0}},Ib=[],lW=S.forwardRef(function(t,n){return p.jsx(Le.ul,{...t,role:"listbox",ref:n,className:"w-full rounded-b-lg border-b border-tooltip-border last:border-transparent",children:p.jsx(xn,{children:t.children})})}),cW=S.forwardRef(function({item:t,context:n,...r},o){return p.jsx(Le.li,{...r,ref:o,className:"last:rounded-t-lg"})}),uW={List:lW,Item:cW},dW=e=>{const t=yt(),n=S.useRef(null),r=S.Children.count(e.children),[o,i]=S.useState(!1);return S.useEffect(()=>{if(n.current===null)return;const s=n.current.parentElement.getBoundingClientRect(),l=Array.from(n.current.querySelectorAll("[data-component='tag']")).reduce((u,d)=>u+d.getBoundingClientRect().width,0);if(n.current.querySelectorAll("[data-multicounter]").length&&r<=3)return i(!1);if(l>s.width)return i(!0)},[r]),p.jsx("span",{ref:n,className:"flex flex-nowrap gap-x-2",children:o?p.jsxs(fi,{size:"small","data-multicounter":"true",children:[r," ",t.multiSelectSelectedLabel]}):e.children})},fW=S.forwardRef(({left:e,error:t,right:n,options:r,container:o,rightLabel:i,interactive:s,emptyMessage:a,optionalText:l,selectedLabel:c,labelClassName:u,feedback:d=null,hideLeft:f=!1,required:m=!1,dynamicOption:g=!1,onChangeOptions:y,...h},v)=>{const x=S.useMemo(()=>new Dn(r.map(ne=>[ne.value,ne])),[r]),b=S.useRef(null),T=S.useRef(null),E=h.value??h.defaultValue??Ib,R=yt(),[w,C]=S.useState(0),[I,P]=S.useState(!1),[M,j]=S.useState(""),[L,O]=S.useState(()=>{const ne=new Dn;return E.forEach(J=>{const $=x.get(J);return $?ne.set(J,$):void 0}),ne}),N=S.useMemo(()=>Array.from(L.keys()),[L]),[V,D]=S.useState(()=>{const ne=new Set(E);return r.reduce((J,$)=>ne.has($.value)?[...J,$.label??$.value]:J,[])??E}),[k,F]=S.useState(null),_=S.useRef(Ib),B=g&&M!==""?[{value:M,label:M,"data-dynamic":"true"},...r]:r,U=M.length===0?B:ih(B,"value",[{key:"value",value:M},{key:"label",value:M}]),G=XE(I,"block-only"),H=U.filter(ne=>ne.hidden!==!0),ee=H.length===0,{x:ie,y:te,strategy:q,refs:Y,context:Z}=ir({open:I,transform:!0,placement:"bottom-start",strategy:"absolute",onOpenChange:P,whileElementsMounted:Io,middleware:[ji(4),gw({padding:10,elementContext:"reference",apply(ne){const $=ne.elements.floating.querySelector("ul")?.getBoundingClientRect().height||0,X=ws(Y.reference.current,window.innerHeight),me=Math.min($<Rb?X:$,X,ne.availableHeight),ye=H.length===0?Rb:Math.min(me,X,$),Ee=`${b.current.getBoundingClientRect().width}px`;Object.assign(ne.elements.floating.style,{width:Ee,maxWidth:Ee,height:ye})}})]}),fe=Rw(Z,aW),{getReferenceProps:z,getFloatingProps:se,getItemProps:le}=sr([wr(Z,{role:"listbox"}),Kr(Z),uc(Z,{cols:0,listRef:_,loop:!0,virtual:!0,allowEscape:!0,activeIndex:k,selectedIndex:k,focusItemOnOpen:"auto",openOnArrowKeyDown:!0,scrollItemIntoView:!0,onNavigate:ne=>F(J=>ne??J)})]);S.useEffect(()=>{if(!I)return C(0);const ne=Y.reference;if(ne.current===null)return;const J=ws(ne.current,window.innerHeight);setTimeout(()=>C(Math.min(J,H.length*40)),100)},[M,I,Y.reference]),S.useEffect(()=>{h.value&&O(new Dn(h.value.map(ne=>[ne,x.get(ne)])))},[h.value,x]),S.useEffect(()=>{const ne=Y.reference.current;if(ne)return Us(ne)},[]);const Q=(ne,J)=>{const $=L.clone(ye=>ye.has(ne.value)?ye.remove(ne.value):ye.set(ne.value,ne));O($);const X=Y.reference.current;if(!X)return;const me=$.map(ye=>ye.value);X?.setAttribute("data-value",JSON.stringify(me)),y&&y(me),D(ye=>ye.concat(ne.label??"")),j(""),F(J)},ce=ne=>{const J=ne.target.value;return j(J),!I&&J===""?P(!0):(ne.target.name=h.name||"",J?P(!0):void 0)},re=()=>{P(!0),j(""),Y.reference.current?.focus()},pe=()=>{P(!0),j("")},oe=()=>{Y.reference.current?.setAttribute("data-value","[]"),j(""),P(!1),O(new Dn),y?.([])},ae=h.id||h.name,ve=L.map((ne,J)=>p.jsx(fi,{size:"small",icon:p.jsx("button",{type:"button",className:"text-current hover:text-danger focus:text-danger",onClick:$=>{$.preventDefault(),$.stopPropagation(),Q(ne,J)},children:p.jsx(Pi,{size:14})}),children:ne.label??ne.value},`MultiSelect-${ne.value}-x`)),ue={height:ee?"0":L.size===0?w-49:w-86};return p.jsxs(Qs,{...h,left:e,error:t,ref:b,form:h.form,name:h.name,feedback:d,hideLeft:f,required:m,title:h.title,container:o,rightLabel:i,interactive:s,id:h.name||h.id,optionalText:l,componentName:"autocomplete",labelClassName:u,placeholder:h.placeholder,right:p.jsxs("span",{className:"flex items-center gap-0.5",children:[n,p.jsxs("button",{type:"button",className:"transition-colors link:text-primary",onClick:re,children:[p.jsx(gp,{size:20}),p.jsx("span",{className:"sr-only",children:R.inputCaretDown})]}),L?p.jsx("button",{type:"button",onClick:oe,className:"transition-colors link:text-danger",children:p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}):null]}),children:[p.jsxs("ul",{...z({...h,onFocus:pe,id:`${ae}-shadow`,name:`${ae}-shadow`,ref:Y.setReference}),tabIndex:0,role:"button","data-name":ae,"data-target":ae,"data-shadow":"true","data-error":!!t,"aria-autocomplete":"list","data-value":N.join(","),className:Ie("input placeholder-input-mask group h-input-height w-full text-base","rounded-md bg-transparent px-input-x py-input-y text-foreground","outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary","group-error:text-danger group-error:placeholder-input-mask-error","group-focus-within:border-primary group-hover:border-primary","flex flex-row items-center gap-2 whitespace-nowrap text-left","max-w-full overflow-x-auto truncate overflow-ellipsis",h.className),children:[N.length>0?null:p.jsx("li",{className:"text-input-placeholder",children:h.placeholder}),p.jsx(dW,{label:c,children:ve})]}),p.jsx("input",{id:ae,name:ae,type:"hidden","data-origin":ae,ref:v,required:m,defaultValue:h.value||N||void 0}),p.jsx(br,{preserveTabOrder:!0,children:I?p.jsx(jp,{lockScroll:!0,children:p.jsx(Ao,{modal:!0,guards:!0,returnFocus:!1,context:Z,initialFocus:-1,visuallyHiddenDismiss:!0,children:p.jsxs("div",{...se({ref:Y.setFloating,style:{...fe.styles,top:te??0,position:q,left:ie,height:w-(N.length===0?65:30)}}),"data-floating":"true",className:"shadow-floating isolate z-floating m-0 max-h-96 w-full origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground",children:[p.jsx("input",{autoFocus:!0,value:M,onChange:ce,title:h.title,placeholder:R.multiSelectInnerPlaceholder,className:"input placeholder-input-mask group mb-1 h-10 w-full flex-1 rounded border-b border-input-border bg-transparent px-input-x py-input-y outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",onKeyDown:ne=>{if(ne.key==="ArrowDown"){let J=k+1;return J>H.length-1&&(J=0),T.current?.scrollIntoView({index:J}),F(J)}if(ne.key==="ArrowUp"){let J=k-1;return J<0&&(J=H.length-1),T.current?.scrollIntoView({index:J}),F(J)}if(ne.key==="Escape")return ne.currentTarget.blur(),P(!1);if(ne.key==="Enter"){if(k!==null&&H[k])return ne.preventDefault(),Q(H[k],k);if(H.length===1)return ne.preventDefault(),Q(H[0],0)}}}),ee?p.jsx("li",{role:"option",className:"w-full border-b border-tooltip-border last:border-transparent",children:p.jsx("span",{className:"flex w-full justify-between p-2 text-left text-disabled",children:a||R.autocompleteEmpty})}):null,ee?null:p.jsx(Le.div,{initial:!1,"data-floating":"true",ref:G,animate:{height:ee?"auto":w},style:ue,className:"max-h-72 w-full overscroll-contain",onAnimationComplete:()=>{if(!I)return C(0);const J=Y.floating.current.querySelectorAll("li").item(0),$=(J?J.getBoundingClientRect().height:40)*H.length;return bs.flushSync(()=>C($+2))},children:p.jsx(zm,{ref:T,hidden:ee,data:H,components:uW,style:ue,className:"max-h-72 border-floating-border bg-floating-background p-0 text-foreground",itemContent:(ne,J)=>{const $=J.Render??sW,X=L.has(J.value)||L.has(J.label??""),me=k===ne,ye=J.label??J.value;return p.jsxs("button",{"data-value":J.value,...le({ref:Ee=>{_.current[ne]=Ee},role:"option",type:"button","aria-checked":X,"aria-current":X,"aria-selected":X,"aria-busy":J.disabled,onClick:()=>Q(J,ne)}),className:`flex w-full max-w-full cursor-pointer items-center justify-start p-2 text-left hover:bg-floating-hover focus:bg-floating-hover ${X||me?"bg-floating-hover text-floating-foreground":""}`,children:[p.jsx(Ym,{onChange:ri,checked:X,"aria-checked":X,onClick:Ee=>{Ee.stopPropagation(),Q(J,ne)}}),p.jsx($,{...h,label:J.label,value:J.value,children:ye})]})}})}),p.jsx("div",{className:"sticky bottom-0 flex w-full flex-nowrap items-center gap-2 overflow-x-auto rounded-b-lg bg-floating-background p-2",children:L.size===0?p.jsx(fi,{theme:"muted",size:"small",children:R.autocompleteEmpty}):ve})]})})}):null})]})}),pW=e=>{const[t,n]=S.useState(0);return S.useEffect(()=>{const r=e.current;if(!r)return;const o=r.parentElement;if(!o)return;const i=()=>{n(o.clientHeight)};return o.addEventListener("resize",i),i(),()=>{o.removeEventListener("resize",i)}},[]),t},mW={Item:S.forwardRef(function(t,n){return p.jsx("li",{...t,ref:n,className:"flex items-center justify-between gap-1"})}),List:S.forwardRef(function(t,n){return p.jsx("ul",{...t,ref:n,className:"space-y-3"})})},hW=e=>{const t=S.useRef(null),n=pW(t);return p.jsxs("div",{className:"flex flex-row gap-4",ref:t,children:[p.jsxs("div",{className:"flex w-fit min-w-64 flex-col space-y-4 whitespace-nowrap rounded-lg border border-card-border py-8",children:[p.jsx("header",{className:"border-b border-card-border pb-2"}),p.jsxs("div",{className:"space-y-2 px-8",children:[p.jsx(Ni,{rightLabel:"",title:"Search",placeholder:"Looking for..."}),p.jsx(zm,{height:n,useWindowScroll:!0,data:e.source,components:mW,itemContent:(r,o)=>p.jsx(S.Fragment,{children:p.jsx(Ym,{children:p.jsx(e.Item,{data:o})})})})]})]}),p.jsx("div",{children:p.jsx(Qt,{children:p.jsx(Kl,{})})}),p.jsx("div",{})]})};function gW(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}const yW=({children:e,...t})=>{const n=Br(t.onIntersection),r=S.useRef(null),[o,i]=S.useState(()=>r.current===null?!1:gW(r.current));return S.useLayoutEffect(()=>{const s=r.current;if(s===null)return;const a=new IntersectionObserver(l=>{const c=l[0];return c.isIntersecting&&n.current?.(),i(u=>c.isIntersecting?!0:u)});return a.observe(s),()=>a.disconnect()},[]),p.jsx("div",{...t,ref:r,children:o?e:null})},Mc=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(Mc.displayName="ToastContext");function sh(){const e=A.useContext(Mc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Vn(73));return e}var vW=(e,t,n)=>{if(t.length===1&&t[0]===n){let r=!1;try{const o={};e(o)===o&&(r=!0)}catch{}if(r){let o;try{throw new Error}catch(i){({stack:o}=i)}console.warn(`The result function returned its own inputs without modification. e.g
22
+ \`createSelector([state => state.todos], todos => todos)\`
23
+ This could lead to inefficient memoization and unnecessary re-renders.
24
+ Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},xW=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:s}=e,a=r(()=>({}),...o);if(!(a.apply(null,i)===a.apply(null,s))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
25
+ This means your output selector will likely run more frequently than intended.
26
+ Avoid returning a new reference inside your input selector, e.g.
27
+ \`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:i,secondInputs:s,stack:c})}},bW={inputStabilityCheck:"once",identityFunctionCheck:"once"},$l=Symbol("NOT_FOUND");function wW(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function SW(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function TW(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var Ab=e=>Array.isArray(e)?e:[e];function EW(e){const t=Array.isArray(e[0])?e[0]:e;return TW(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Pb(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var CW=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...bW,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:vW},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:xW}}};function kW(e){let t;return{get(n){return t&&e(t.key,n)?t.value:$l},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function RW(e,t){let n=[];function r(a){const l=n.findIndex(c=>t(a,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return $l}function o(a,l){r(a)===$l&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var IW=(e,t)=>e===t;function AW(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function PW(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=IW,maxSize:o=1,resultEqualityCheck:i}=n,s=AW(r);let a=0;const l=o<=1?kW(s):RW(o,s);function c(){let u=l.get(arguments);if(u===$l){if(u=e.apply(null,arguments),a++,i){const f=l.getEntries().find(m=>i(m.value,u));f&&(u=f.value,a!==0&&a--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>a,c.resetResultsCount=()=>{a=0},c}var OW=class{constructor(e){this.value=e}deref(){return this.value}},jW=typeof WeakRef<"u"?WeakRef:OW,DW=0,Ob=1;function Ba(){return{s:DW,v:void 0,o:null,p:null}}function QE(e,t={}){let n=Ba();const{resultEqualityCheck:r}=t;let o,i=0;function s(){let a=n;const{length:l}=arguments;for(let d=0,f=l;d<f;d++){const m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let g=a.o;g===null&&(a.o=g=new WeakMap);const y=g.get(m);y===void 0?(a=Ba(),g.set(m,a)):a=y}else{let g=a.p;g===null&&(a.p=g=new Map);const y=g.get(m);y===void 0?(a=Ba(),g.set(m,a)):a=y}}const c=a;let u;if(a.s===Ob)u=a.v;else if(u=e.apply(null,arguments),i++,r){const d=o?.deref?.()??o;d!=null&&r(d,u)&&(u=d,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new jW(u):u}return c.s=Ob,c.v=u,u}return s.clearCache=()=>{n=Ba(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function JE(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),wW(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:m=QE,argsMemoizeOptions:g=[],devModeChecks:y={}}=u,h=Ab(f),v=Ab(g),x=EW(o),b=d(function(){return i++,c.apply(null,arguments)},...h);let T=!0;const E=m(function(){s++;const w=Pb(x,arguments);if(a=b.apply(null,w),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:C,inputStabilityCheck:I}=CW(T,y);if(C.shouldRun&&C.run(c,w,a),I.shouldRun){const P=Pb(x,arguments);I.run({inputSelectorResults:w,inputSelectorResultsCopy:P},{memoize:d,memoizeOptions:h},arguments)}T&&(T=!1)}return a},...v);return Object.assign(E,{resultFunc:c,memoizedResultFunc:b,dependencies:x,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var MW=JE(QE),NW=Object.assign((e,t=MW)=>{SW(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>NW});const _W=JE({memoize:PW,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Pn=(e,t,n,r,o,i,...s)=>{if(s.length>0)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of selectors":Vn(1));let a;if(e&&t)a=(l,c,u,d)=>{const f=e(l,c,u,d);return t(f,c,u,d)};else if(e)a=e;else throw new Error("Missing arguments");return a},FW=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],o=e.length-1||1,i=r.length-o;if(i>3)throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":Vn(2));return(a,l,c,u)=>{let d=a.__cacheKey__;d||(d={id:n},a.__cacheKey__=d,n+=1);let f=t.get(d);if(!f){let m=e;const g=[void 0,void 0,void 0];switch(i){case 0:break;case 1:{m=[...e.slice(0,-1),()=>g[0],r];break}case 2:{m=[...e.slice(0,-1),()=>g[0],()=>g[1],r];break}case 3:{m=[...e.slice(0,-1),()=>g[0],()=>g[1],()=>g[2],r];break}default:throw new Error(process.env.NODE_ENV!=="production"?"Unsupported number of arguments":Vn(2))}f=_W(...m),f.selectorArgs=g,t.set(d,f)}switch(f.selectorArgs[0]=l,f.selectorArgs[1]=c,f.selectorArgs[2]=u,i){case 0:return f(a);case 1:return f(a,l);case 2:return f(a,l,c);case 3:return f(a,l,c,u);default:throw new Error("unreachable")}}},LW=_p(19),VW=LW?zW:BW;function eC(e,t,n,r,o){return VW(e,t,n,r,o)}function $W(e,t,n,r,o){const i=A.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return uF.useSyncExternalStore(e.subscribe,i,i)}function zW(e,t,n,r,o){return $W(e,t,n,r,o)}function BW(e,t,n,r,o){return cF.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,i=>t(i,n,r,o))}class HW{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,o){return eC(this,t,n,r,o)}}class WW extends HW{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){A.useDebugValue(t),pt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;pt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this;if(process.env.NODE_ENV!=="production"){A.useDebugValue(t,s=>Object.keys(s));const o=A.useRef(Object.keys(t)).current,i=Object.keys(t);(o.length!==i.length||o.some((s,a)=>s!==i[a]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const r=Object.values(t);pt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){A.useDebugValue(t);const r=n!==void 0;if(pt(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r]),process.env.NODE_ENV!=="production"){const o=this.controlledValues??=new Map;o.has(t)||o.set(t,r);const i=o.get(t);i!==void 0&&i!==r&&console.error(`A component is changing the ${r?"":"un"}controlled state of ${t.toString()} to be ${r?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(t,n,r,o){const i=this.selectors[t];return i(this.state,n,r,o)}useState(t,n,r,o){return A.useDebugValue(t),eC(this,this.selectors[t],n,r,o)}useContextCallback(t,n){A.useDebugValue(t);const r=ut(n??fn);this.context[t]=r}useStateSetter(t){const n=A.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let o=r(this.state);return n(o,o,this),this.subscribe(i=>{const s=r(i);if(!Object.is(o,s)){const a=o;o=s,n(s,a,this)}})}}const Zi=0;class zs{static create(){return new zs}currentId=Zi;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Zi,n()},t)}isStarted(){return this.currentId!==Zi}clear=()=>{this.currentId!==Zi&&(clearTimeout(this.currentId),this.currentId=Zi)};disposeEffect=()=>this.clear}function qW(){const e=tr(zs.create).current;return ta(e.disposeEffect),e}let jb=0;function UW(e){return jb+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${jb}`}function $d(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const Ha=FW(e=>e.toasts,e=>{const t=new Map;let n=0,r=0;return e.forEach((o,i)=>{const s=o.transitionStatus==="ending";t.set(o.id,{value:o,domIndex:i,visibleIndex:s?-1:n,offsetY:r}),r+=o.height||0,s||(n+=1)}),t}),ur={toasts:Pn(e=>e.toasts),isEmpty:Pn(e=>e.toasts.length===0),toast:Pn(Ha,(e,t)=>e.get(t)?.value),toastIndex:Pn(Ha,(e,t)=>e.get(t)?.domIndex??-1),toastOffsetY:Pn(Ha,(e,t)=>e.get(t)?.offsetY??0),toastVisibleIndex:Pn(Ha,(e,t)=>e.get(t)?.visibleIndex??-1),hovering:Pn(e=>e.hovering),focused:Pn(e=>e.focused),expanded:Pn(e=>e.hovering||e.focused),expandedOrOutOfFocus:Pn(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:Pn(e=>e.prevFocusElement)};class GW extends WW{timers=new Map;areTimersPaused=!1;constructor(t){super(t,{},ur)}setFocused(t){this.set("focused",t)}setHovering(t){this.set("hovering",t)}setIsWindowFocused(t){this.set("isWindowFocused",t)}setPrevFocusElement(t){this.set("prevFocusElement",t)}setViewport=t=>{this.set("viewport",t)};disposeEffect=()=>()=>{this.timers.forEach(t=>{t.timeout?.clear()}),this.timers.clear()};removeToast(t){const n=ur.toastIndex(this.state,t);if(n===-1)return;this.state.toasts[n]?.onRemove?.();const o=[...this.state.toasts];o.splice(n,1),this.setToasts(o)}addToast=t=>{const{toasts:n,timeout:r,limit:o}=this.state,i=t.id||UW("toast"),s={...t,id:i,transitionStatus:"starting"},a=[s,...n],l=a.filter(u=>u.transitionStatus!=="ending");if(l.length>o){const u=l.length-o,d=l.slice(-u),f=new Set(d.map(m=>m.id));this.setToasts(a.map(m=>{const g=f.has(m.id);return m.limited!==g?{...m,limited:g}:m}))}else this.setToasts(a.map(u=>u.limited?{...u,limited:!1}:u));const c=s.timeout??r;return s.type!=="loading"&&c>0&&this.scheduleTimer(i,c,()=>this.closeToast(i)),ur.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),i};updateToast=(t,n)=>{this.updateToastInternal(t,n)};updateToastInternal=(t,n)=>{const{timeout:r,toasts:o}=this.state,i=ur.toast(this.state,t)??null;if(!i||i.transitionStatus==="ending")return;const s={...i,...n};this.setToasts(o.map(g=>g.id===t?{...g,...n}:g));const a=s.timeout??r,l=i?.timeout??r,c=Object.hasOwn(n,"timeout"),u=s.transitionStatus!=="ending"&&s.type!=="loading"&&a>0,d=this.timers.has(t),f=l!==a,m=i?.type==="loading";if(!u&&d){this.timers.get(t)?.timeout?.clear(),this.timers.delete(t);return}if(u&&(!d||f||c||m)){const g=this.timers.get(t);g&&(g.timeout?.clear(),this.timers.delete(t)),this.scheduleTimer(t,a,()=>this.closeToast(t)),ur.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}};closeToast=t=>{ur.toast(this.state,t)?.onClose?.();const{limit:r,toasts:o}=this.state;let i=0;const s=o.map(l=>{if(l.id===t)return{...l,transitionStatus:"ending",height:0};if(l.transitionStatus==="ending")return l;const c=i>=r;return i+=1,l.limited!==c?{...l,limited:c}:l}),a=this.timers.get(t);a&&a.timeout&&(a.timeout.clear(),this.timers.delete(t)),this.handleFocusManagement(t),this.setToasts(s)};promiseToast=(t,n)=>{const r=$d(n.loading),o=this.addToast({...r,type:"loading"}),i=t.then(s=>{const a=$d(n.success,s);return this.updateToast(o,{...a,type:"success",timeout:a.timeout}),s}).catch(s=>{const a=$d(n.error,s);return this.updateToast(o,{...a,type:"error",timeout:a.timeout}),Promise.reject(s)});return{}.hasOwnProperty.call(n,"setPromise")&&n.setPromise(i),i};pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(t=>{if(t.timeout){t.timeout.clear();const n=Date.now()-t.start,r=t.delay-n;t.remaining=r>0?r:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((t,n)=>{t.remaining=t.remaining>0?t.remaining:t.delay,t.timeout??=zs.create(),t.timeout.start(t.remaining,()=>{this.timers.delete(n),t.callback()}),t.start=Date.now()}))}restoreFocusToPrevElement(){this.state.prevFocusElement?.focus({preventScroll:!0})}handleDocumentPointerDown=t=>{if(t.pointerType!=="touch")return;const n=Lp(t);zr(this.state.viewport,n)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))};scheduleTimer(t,n,r){const o=Date.now(),i=!ur.expandedOrOutOfFocus(this.state),s=i?zs.create():void 0;s?.start(n,()=>{this.timers.delete(t),r()}),this.timers.set(t,{timeout:s,start:i?o:0,delay:n,remaining:n,callback:r})}setToasts(t){const n={toasts:t};t.length===0&&(n.hovering=!1,n.focused=!1),this.update(n)}handleFocusManagement(t){const n=wo(on(this.state.viewport));if(!this.state.viewport||!zr(this.state.viewport,n)||!ff(n))return;const r=ur.toasts(this.state),o=ur.toastIndex(this.state,t);let i=null,s=o+1;for(;s<r.length;){if(r[s].transitionStatus!=="ending"){i=r[s];break}s+=1}if(!i)for(s=o-1;s>=0;){if(r[s].transitionStatus!=="ending"){i=r[s];break}s-=1}i?i.ref?.current?.focus():this.restoreFocusToPrevElement()}}const tC=function(t){const{children:n,timeout:r=5e3,limit:o=3,toastManager:i}=t,s=tr(()=>new GW({timeout:r,limit:o,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return ta(s.disposeEffect),A.useEffect(function(){return i?i[" subscribe"](({action:c,options:u})=>{const d=u.id;c==="promise"&&u.promise?s.promiseToast(u.promise,u):c==="update"&&d?s.updateToast(d,u):c==="close"&&d?s.closeToast(d):s.addToast(u)}):void 0},[s,r,i]),s.useSyncedValues({timeout:r,limit:o}),p.jsx(Mc.Provider,{value:s,children:n})};process.env.NODE_ENV!=="production"&&(tC.displayName="ToastProvider");const di=A.forwardRef(function(t,n){const[r,o]=A.useState();pt(()=>{MO&&o("button")},[]);const i={tabIndex:0,role:r};return p.jsx("span",{...t,ref:n,style:wl,"aria-hidden":r?void 0:!0,...i,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(di.displayName="FocusGuard");let YW=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const nC=A.forwardRef(function(t,n){const{render:r,className:o,children:i,...s}=t,a=sh(),l=qW(),c=A.useRef(!1),u=A.useRef(!1),d=a.useState("isEmpty"),f=a.useState("toasts"),m=a.useState("focused"),g=a.useState("expanded"),y=a.useState("prevFocusElement"),h=f[0]?.height??0,v=A.useMemo(()=>f.some(j=>j.transitionStatus==="ending"),[f]);A.useEffect(()=>{const j=a.state.viewport;if(!j)return;function L(N){d||N.key==="F6"&&N.target!==j&&(N.preventDefault(),a.setPrevFocusElement(wo(on(j))),j?.focus({preventScroll:!0}),a.pauseTimers(),a.setFocused(!0))}const O=Gt(j);return O.addEventListener("keydown",L),()=>{O.removeEventListener("keydown",L)}},[a,d]),A.useEffect(()=>{const j=a.state.viewport;if(!j||d)return;const L=Gt(j);function O(V){V.target===L&&(a.setIsWindowFocused(!1),a.pauseTimers())}function N(V){if(V.relatedTarget||V.target===L)return;const D=Lp(V),k=wo(on(j));(!zr(j,D)||!ff(k))&&a.resumeTimers(),l.start(0,()=>a.setIsWindowFocused(!0))}return L.addEventListener("blur",O,!0),L.addEventListener("focus",N,!0),()=>{L.removeEventListener("blur",O,!0),L.removeEventListener("focus",N,!0)}},[a,l,d]),A.useEffect(()=>{const j=a.state.viewport;if(!j||d)return;const L=on(j);return L.addEventListener("pointerdown",a.handleDocumentPointerDown,!0),()=>{L.removeEventListener("pointerdown",a.handleDocumentPointerDown,!0)}},[d,a]);function x(j){const L=a.state.viewport;L&&(c.current=!0,j.relatedTarget===L?f[0]?.ref?.current?.focus():a.restoreFocusToPrevElement())}function b(j){j.key==="Tab"&&j.shiftKey&&j.target===a.state.viewport&&(j.preventDefault(),a.restoreFocusToPrevElement(),a.resumeTimers())}A.useEffect(()=>{!a.state.isWindowFocused||v||!u.current||(a.resumeTimers(),a.setHovering(!1),u.current=!1)},[v,a]);function T(){a.pauseTimers(),a.setHovering(!0),u.current=!1}function E(){v?u.current=!0:(a.resumeTimers(),a.setHovering(!1))}function R(){if(c.current){c.current=!1;return}m||ff(on(a.state.viewport).activeElement)&&(a.setFocused(!0),a.pauseTimers())}function w(j){!m||zr(a.state.viewport,j.relatedTarget)||(a.setFocused(!1),a.resumeTimers())}const C={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:T,onMouseMove:T,onMouseLeave:E,onFocus:R,onBlur:w,onKeyDown:b,onClick:R},I={expanded:g},P=ln("div",t,{ref:[n,a.setViewport],state:I,props:[C,{style:{[YW.frontmostHeight]:h?`${h}px`:void 0}},s,{children:p.jsxs(A.Fragment,{children:[!d&&y&&p.jsx(di,{onFocus:x}),i,!d&&y&&p.jsx(di,{onFocus:x})]})}]}),M=A.useMemo(()=>f.filter(j=>j.priority==="high"),[f]);return p.jsxs(A.Fragment,{children:[!d&&y&&p.jsx(di,{onFocus:x}),P,!m&&M.length>0&&p.jsx("div",{style:wl,children:M.map(j=>p.jsxs("div",{role:"alert","aria-atomic":!0,children:[p.jsx("div",{children:j.title}),p.jsx("div",{children:j.description})]},j.id))})]})});process.env.NODE_ENV!=="production"&&(nC.displayName="ToastViewport");function KW(e){return _p(19)?e:e?"true":void 0}const ah=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(ah.displayName="ToastRootContext");function Nc(){const e=A.useContext(ah);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.":Vn(66));return e}let lh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const ZW={[lh.startingStyle]:""},XW={[lh.endingStyle]:""},QW={transitionStatus(e){return e==="starting"?ZW:e==="ending"?XW:null}};function JW(e){return e==null?e:"current"in e?e.current:e}function e3(e,t=!1,n=!0){const r=Qw();return ut((o,i=null)=>{r.cancel();function s(){xr.flushSync(o)}const a=JW(e);if(a==null)return;const l=a;if(typeof l.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{let c=function(){const d=lh.startingStyle;if(!l.hasAttribute(d)){r.request(u);return}const f=new MutationObserver(()=>{l.hasAttribute(d)||(f.disconnect(),u())});f.observe(l,{attributes:!0,attributeFilter:[d]}),i?.addEventListener("abort",()=>f.disconnect(),{once:!0})},u=function(){Promise.all(l.getAnimations().map(d=>d.finished)).then(()=>{i?.aborted||s()}).catch(()=>{const d=l.getAnimations();if(n){if(i?.aborted)return;s()}else d.length>0&&d.some(f=>f.pending||f.playState!=="finished")&&u()})};if(t){c();return}r.request(u)}})}function t3(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,i=ut(o),s=e3(r,n,!1);A.useEffect(()=>{if(!t)return;const a=new AbortController;return s(i,a.signal),()=>{a.abort()}},[t,n,i,s])}let io=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const n3={...QW,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Xi=40,r3=10,kr=.5,o3=1;function Db(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function i3(e){const n=window.getComputedStyle(e).transform;let r=0,o=0,i=1;if(n&&n!=="none"){const s=n.match(/matrix(?:3d)?\(([^)]+)\)/);if(s){const a=s[1].split(", ").map(parseFloat);a.length===6?(r=a[4],o=a[5],i=Math.sqrt(a[0]*a[0]+a[1]*a[1])):a.length===16&&(r=a[12],o=a[13],i=a[0])}}return{x:r,y:o,scale:i}}const rC=A.forwardRef(function(t,n){const{toast:r,render:o,className:i,swipeDirection:s=["down","right"],...a}=t,l=r.positionerProps?.anchor!==void 0;let c=[];l||(c=Array.isArray(s)?s:[s]);const u=c.length>0,d=sh(),[f,m]=A.useState(void 0),[g,y]=A.useState(!1),[h,v]=A.useState(!1),[x,b]=A.useState(!1),[T,E]=A.useState({x:0,y:0}),[R,w]=A.useState({x:0,y:0,scale:1}),[C,I]=A.useState(),[P,M]=A.useState(),[j,L]=A.useState(null),O=A.useRef(null),N=A.useRef({x:0,y:0}),V=A.useRef({x:0,y:0,scale:1}),D=A.useRef(void 0),k=A.useRef(0),F=A.useRef(!1),_=A.useRef({x:0,y:0}),B=A.useRef(!1),U=d.useState("toastIndex",r.id),G=d.useState("toastVisibleIndex",r.id),H=d.useState("toastOffsetY",r.id),ee=d.useState("focused"),ie=d.useState("expanded");t3({open:r.transitionStatus!=="ending",ref:O,onComplete(){r.transitionStatus==="ending"&&d.removeToast(r.id)}});const te=ut((oe=!1)=>{const ae=O.current;if(!ae)return;const ve=ae.style.height;ae.style.height="auto";const ue=ae.offsetHeight;ae.style.height=ve;function ne(){d.updateToastInternal(r.id,{ref:O,height:ue,...r.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}oe?xr.flushSync(ne):ne()});pt(te,[te]);function q(oe,ae){let ve=oe,ue=ae;return!c.includes("left")&&!c.includes("right")?ve=oe>0?oe**kr:-(Math.abs(oe)**kr):(!c.includes("right")&&oe>0&&(ve=oe**kr),!c.includes("left")&&oe<0&&(ve=-(Math.abs(oe)**kr))),!c.includes("up")&&!c.includes("down")?ue=ae>0?ae**kr:-(Math.abs(ae)**kr):(!c.includes("down")&&ae>0&&(ue=ae**kr),!c.includes("up")&&ae<0&&(ue=-(Math.abs(ae)**kr))),{x:ve,y:ue}}function Y(oe){if(oe.button!==0)return;oe.pointerType==="touch"&&d.pauseTimers();const ae=Lp(oe.nativeEvent);if(!(ae&&ae.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(F.current=!1,D.current=void 0,k.current=0,N.current={x:oe.clientX,y:oe.clientY},_.current=N.current,O.current){const ue=i3(O.current);V.current=ue,w(ue),E({x:ue.x,y:ue.y})}d.setHovering(!0),y(!0),v(!1),L(null),B.current=!0,O.current?.setPointerCapture(oe.pointerId)}}function Z(oe){if(!g)return;oe.preventDefault(),B.current&&(N.current={x:oe.clientX,y:oe.clientY},B.current=!1);const{clientY:ae,clientX:ve,movementX:ue,movementY:ne}=oe;(ne<0&&ae>_.current.y||ne>0&&ae<_.current.y)&&(_.current={x:_.current.x,y:ae}),(ue<0&&ve>_.current.x||ue>0&&ve<_.current.x)&&(_.current={x:ve,y:_.current.y});const J=ve-N.current.x,$=ae-N.current.y,X=ae-_.current.y,me=ve-_.current.x;if(!h&&Math.sqrt(J*J+$*$)>=o3&&(v(!0),j===null)){const Pt=c.includes("left")||c.includes("right"),Yt=c.includes("up")||c.includes("down");if(Pt&&Yt){const Ve=Math.abs(J),W=Math.abs($);L(Ve>W?"horizontal":"vertical")}}let ye;if(!D.current)j==="vertical"?$>0?ye="down":$<0&&(ye="up"):j==="horizontal"?J>0?ye="right":J<0&&(ye="left"):Math.abs(J)>=Math.abs($)?ye=J>0?"right":"left":ye=$>0?"down":"up",ye&&c.includes(ye)&&(D.current=ye,k.current=Db(ye,J,$),m(ye));else{const it=D.current,Pt=Db(it,me,X);Pt>Xi?(F.current=!1,m(it)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&k.current-Pt>=r3&&(F.current=!0)}const Ee=q(J,$);let je=V.current.x,De=V.current.y;j==="horizontal"?(c.includes("left")||c.includes("right"))&&(je+=Ee.x):(j==="vertical"||(c.includes("left")||c.includes("right"))&&(je+=Ee.x),(c.includes("up")||c.includes("down"))&&(De+=Ee.y)),E({x:je,y:De})}function fe(oe){if(!g)return;if(y(!1),v(!1),L(null),O.current?.releasePointerCapture(oe.pointerId),F.current){E({x:R.x,y:R.y}),m(void 0);return}let ae=!1;const ve=T.x-R.x,ue=T.y-R.y;let ne;for(const J of c){switch(J){case"right":ve>Xi&&(ae=!0,ne="right");break;case"left":ve<-Xi&&(ae=!0,ne="left");break;case"down":ue>Xi&&(ae=!0,ne="down");break;case"up":ue<-Xi&&(ae=!0,ne="up");break}if(ae)break}ae?(m(ne),b(!0),d.closeToast(r.id)):(E({x:R.x,y:R.y}),m(void 0))}function z(oe){if(oe.key==="Escape"){if(!O.current||!zr(O.current,wo(on(O.current))))return;d.closeToast(r.id)}}A.useEffect(()=>{if(!u)return;const oe=O.current;if(!oe)return;function ae(ve){zr(oe,ve.target)&&ve.preventDefault()}return oe.addEventListener("touchmove",ae,{passive:!1}),()=>{oe.removeEventListener("touchmove",ae)}},[u]);function se(){if(!g&&T.x===R.x&&T.y===R.y&&!x)return{[io.swipeMovementX]:"0px",[io.swipeMovementY]:"0px"};const oe=T.x-R.x,ae=T.y-R.y;return{transition:g?"none":void 0,transform:g?`translateX(${T.x}px) translateY(${T.y}px) scale(${R.scale})`:void 0,[io.swipeMovementX]:`${oe}px`,[io.swipeMovementY]:`${ae}px`}}const le=r.priority==="high",Q={role:le?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":C,"aria-describedby":P,"aria-hidden":le&&!ee?!0:void 0,onPointerDown:u?Y:void 0,onPointerMove:u?Z:void 0,onPointerUp:u?fe:void 0,onKeyDown:z,inert:KW(r.limited),style:{...se(),[io.index]:r.transitionStatus==="ending"?U:G,[io.offsetY]:`${H}px`,[io.height]:r.height?`${r.height}px`:void 0}},ce=A.useMemo(()=>({rootRef:O,toast:r,titleId:C,setTitleId:I,descriptionId:P,setDescriptionId:M,swiping:g,swipeDirection:f,recalculateHeight:te,index:U,visibleIndex:G,expanded:ie}),[r,C,P,g,f,te,U,G,ie]),re={transitionStatus:r.transitionStatus,expanded:ie,limited:r.limited||!1,type:r.type,swiping:ce.swiping,swipeDirection:ce.swipeDirection},pe=ln("div",t,{ref:[n,ce.rootRef],state:re,stateAttributesMapping:n3,props:[Q,a]});return p.jsx(ah.Provider,{value:ce,children:pe})});process.env.NODE_ENV!=="production"&&(rC.displayName="ToastRoot");const oC=A.forwardRef(function(t,n){const{render:r,className:o,...i}=t,{visibleIndex:s,expanded:a,recalculateHeight:l}=Nc(),c=A.useRef(null);pt(()=>{const m=c.current;if(!m||(l(),typeof ResizeObserver!="function"||typeof MutationObserver!="function"))return;const g=new ResizeObserver(()=>l(!0)),y=new MutationObserver(()=>l(!0));return g.observe(m),y.observe(m,{childList:!0,subtree:!0,characterData:!0}),()=>{g.disconnect(),y.disconnect()}},[l]);const u=s>0;return ln("div",t,{ref:[n,c],state:{expanded:a,behind:u},props:i})});process.env.NODE_ENV!=="production"&&(oC.displayName="ToastContent");const iC=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l,setDescriptionId:c}=Nc(),u=s??l.description,d=!!u,f=dc(i);pt(()=>{if(d)return c(f),()=>{c(void 0)}},[d,f,c]);const m={type:l.type},g=ln("p",t,{ref:n,state:m,props:{...a,id:f,children:u}});return d?g:null});process.env.NODE_ENV!=="production"&&(iC.displayName="ToastDescription");const sC=A.forwardRef(function(t,n){const{render:r,className:o,id:i,children:s,...a}=t,{toast:l,setTitleId:c}=Nc(),u=s??l.title,d=!!u,f=dc(i);pt(()=>{if(d)return c(f),()=>{c(void 0)}},[d,f,c]);const m={type:l.type},g=ln("h2",t,{ref:n,state:m,props:{...a,id:f,children:u}});return d?g:null});process.env.NODE_ENV!=="production"&&(sC.displayName="ToastTitle");let ip;process.env.NODE_ENV!=="production"&&(ip=new Set);function Mb(...e){if(process.env.NODE_ENV!=="production"){const t=e.join(" ");ip.has(t)||(ip.add(t),console.error(`Base UI: ${t}`))}}const aC=A.createContext(void 0);process.env.NODE_ENV!=="production"&&(aC.displayName="CompositeRootContext");function s3(e=!1){const t=A.useContext(aC);if(t===void 0&&!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":Vn(16));return t}function a3(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:o=0,isNativeButton:i}=e,s=r&&t!==!1,a=r&&t===!1;return{props:A.useMemo(()=>{const c={onKeyDown(u){n&&t&&u.key!=="Tab"&&u.preventDefault()}};return r||(c.tabIndex=o,!i&&n&&(c.tabIndex=t?o:-1)),(i&&(t||s)||!i&&n)&&(c["aria-disabled"]=n),i&&(!t||a)&&(c.disabled=n),c},[r,n,t,s,a,i,o])}}function l3(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:o=!0}=e,i=A.useRef(null),s=s3(!0)!==void 0,a=ut(()=>{const f=i.current;return!!(f?.tagName==="A"&&f?.href)}),{props:l}=a3({focusableWhenDisabled:n,disabled:t,composite:s,tabIndex:r,isNativeButton:o});process.env.NODE_ENV!=="production"&&A.useEffect(()=>{if(!i.current)return;const f=i.current.tagName==="BUTTON";if(o){if(!f){const m=af.captureOwnerStack?.()||"";Mb(`A component that acts as a button expected a native <button> because the \`nativeButton\` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the \`render\` prop, or set \`nativeButton\` to \`false\`.${m}`)}}else if(f){const m=af.captureOwnerStack?.()||"";Mb(`A component that acts as a button expected a non-<button> because the \`nativeButton\` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as \`role\` or \`aria-disabled\`). Use a non-<button> in the \`render\` prop, or set \`nativeButton\` to \`true\`.${m}`)}},[o]);const c=A.useCallback(()=>{const f=i.current;c3(f)&&s&&t&&l.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,l.disabled,s]);pt(c,[c]);const u=A.useCallback((f={})=>{const{onClick:m,onMouseDown:g,onKeyUp:y,onKeyDown:h,onPointerDown:v,...x}=f;return Fp({type:o?"button":void 0,onClick(T){if(t){T.preventDefault();return}m?.(T)},onMouseDown(T){t||g?.(T)},onKeyDown(T){if(t||(df(T),h?.(T)),T.baseUIHandlerPrevented)return;const E=T.target===T.currentTarget&&!o&&!a()&&!t,R=T.key==="Enter",w=T.key===" ";E&&((w||R)&&T.preventDefault(),R&&m?.(T))},onKeyUp(T){t||(df(T),y?.(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!o&&!t&&T.key===" "&&m?.(T)},onPointerDown(T){if(t){T.preventDefault();return}v?.(T)}},o?void 0:{role:"button"},l,x)},[t,l,o,a]),d=ut(f=>{i.current=f,c()});return{getButtonProps:u,buttonRef:d}}function c3(e){return It(e)&&e.tagName==="BUTTON"}const lC=A.forwardRef(function(t,n){const{render:r,className:o,disabled:i,nativeButton:s=!0,...a}=t,l=sh(),{toast:c}=Nc(),u=l.useState("expanded"),[d,f]=A.useState(!1),{getButtonProps:m,buttonRef:g}=l3({disabled:i,native:s}),y={type:c.type};return ln("button",t,{ref:[n,g],state:y,props:[{"aria-hidden":!u&&!d,onClick(){l.closeToast(c.id)},onFocus(){f(!0)},onBlur(){f(!1)}},a,m]})});process.env.NODE_ENV!=="production"&&(lC.displayName="ToastClose");function u3(e){return`data-base-ui-${e}`}const ch=A.createContext(null);process.env.NODE_ENV!=="production"&&(ch.displayName="PortalContext");const d3=()=>A.useContext(ch),f3=u3("portal");function cC(e={}){const{ref:t,container:n,componentProps:r=jn,elementProps:o}=e,i=dc(),a=d3()?.portalNode,[l,c]=A.useState(null),[u,d]=A.useState(null),f=ut(h=>{h!==null&&d(h)}),m=A.useRef(null);pt(()=>{if(n===null){m.current&&(m.current=null,d(null),c(null));return}if(i==null)return;const h=(n&&(tc(n)?n:n.current))??a??document.body;if(h==null){m.current&&(m.current=null,d(null),c(null));return}m.current!==h&&(m.current=h,d(null),c(h))},[n,a,i]);const g=ln("div",r,{ref:[t,f],props:[{id:i,[f3]:""},o]});return{portalNode:u,portalSubtree:l&&g?xr.createPortal(g,l):null}}const p3=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,renderGuards:a,...l}=t,{portalNode:c,portalSubtree:u}=cC({container:o,ref:n,componentProps:t,elementProps:l}),d=A.useRef(null),f=A.useRef(null),m=A.useRef(null),g=A.useRef(null),[y,h]=A.useState(null),v=y?.modal,x=y?.open,b=typeof a=="boolean"?a:!!y&&!y.modal&&y.open&&!!c;A.useEffect(()=>{if(!c||v)return;function E(R){c&&R.relatedTarget&&Zu(R)&&(R.type==="focusin"?vy:zO)(c)}return c.addEventListener("focusin",E,!0),c.addEventListener("focusout",E,!0),()=>{c.removeEventListener("focusin",E,!0),c.removeEventListener("focusout",E,!0)}},[c,v]),A.useEffect(()=>{!c||x||vy(c)},[x,c]);const T=A.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:m,afterInsideRef:g,portalNode:c,setFocusManagerState:h}),[c]);return p.jsxs(A.Fragment,{children:[u,p.jsxs(ch.Provider,{value:T,children:[b&&c&&p.jsx(di,{"data-type":"outside",ref:d,onFocus:E=>{if(Zu(E,c))m.current?.focus();else{const R=y?y.domReference:null;$O(R)?.focus()}}}),b&&c&&p.jsx("span",{"aria-owns":c.id,style:lO}),c&&xr.createPortal(r,c),b&&c&&p.jsx(di,{"data-type":"outside",ref:f,onFocus:E=>{if(Zu(E,c))g.current?.focus();else{const R=y?y.domReference:null;VO(R)?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,oi(dO,E.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(p3.displayName="FloatingPortal");const uC=A.forwardRef(function(t,n){const{children:r,container:o,className:i,render:s,...a}=t,{portalNode:l,portalSubtree:c}=cC({container:o,ref:n,componentProps:t,elementProps:a});return!c&&!l?null:p.jsxs(A.Fragment,{children:[c,l&&xr.createPortal(r,l)]})});process.env.NODE_ENV!=="production"&&(uC.displayName="FloatingPortalLite");const m3=uC;function dC(){const e=A.useContext(Mc);if(!e)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: useToastManager must be used within <Toast.Provider>.":Vn(73));const t=e.useState("toasts");return A.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}const h3=e=>{const[t,n]=S.useState(!1),r=()=>n(!0),o=()=>n(!1);return S.useEffect(()=>{const i=e.current;if(i)return i.addEventListener("mouseenter",r),i.addEventListener("mouseleave",o),()=>{i.removeEventListener("mouseenter",r),i.removeEventListener("mouseleave",o)}},[]),t},g3=ki("relative isolate z-tooltip flex w-full flex-col overflow-hidden rounded-xl border bg-card-background backdrop-blur-md text-sm shadow-notification transition-all duration-300",{variants:{theme:{default:"border-card-border text-foreground shadow-black/5",info:"bg-alert-info-bg text-alert-info-text border-alert-info-border",warn:"bg-alert-warn-bg text-alert-warn-text border-alert-warn-border",muted:"bg-alert-muted-bg text-alert-muted-text border-alert-muted-border",danger:"bg-alert-danger-bg text-alert-danger-text border-alert-danger-border",success:"bg-alert-success-bg text-alert-success-text border-alert-success-border",secondary:"bg-alert-secondary-bg text-alert-secondary-text border-alert-secondary-border"}},defaultVariants:{theme:"default"}}),y3={default:jr,info:jr,warn:Xd,muted:jr,danger:Xd,success:yp,secondary:jr},fC=S.createContext(()=>{throw new Error("Not implemented")}),v3=()=>S.useContext(fC);function x3(e){const t=e.toast.data?.closable??!0,n=e.toast.data?.loading??!1,r=e.toast.data?.theme||"default",o=g3({theme:r}),i=n?hI:y3[r]||jr;return p.jsx(rC,{toast:e.toast,swipeDirection:"right",children:p.jsx(Le.li,{layout:!0,initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.9,y:-20,transition:{duration:.2}},transition:{type:"spring",damping:25,stiffness:300},className:"pointer-events-auto w-full list-none",children:p.jsx(oC,{className:Ie(o,"shadow-lg"),children:p.jsxs("div",{className:"flex items-start gap-3 p-4",children:[p.jsx("div",{className:Ie("mt-0.5 shrink-0 opacity-80",n&&"animate-spin"),children:p.jsx(i,{className:"size-4"})}),p.jsxs("div",{className:"flex flex-1 flex-col gap-1 overflow-hidden",children:[e.toast.title?p.jsx(sC,{className:"select-text truncate font-semibold leading-tight tracking-tight"}):null,p.jsx(iC,{className:"line-clamp-2 select-text text-xs font-medium leading-relaxed opacity-90"})]}),t&&!n?p.jsx(lC,{className:"-mr-1 -mt-1 shrink-0 rounded-lg p-1.5 text-foreground/40 transition hover:bg-foreground/10 hover:text-foreground",children:p.jsx(Pi,{className:"size-3.5"})}):null]})})})})}function b3({max:e=5}){const t=S.useRef(null),n=h3(t),r=dC(),o=e?r.toasts.slice(0,e):r.toasts,i=n?o:o.slice(0,3),s=o.length-i.length;return p.jsxs(nC,{ref:t,className:"pointer-events-none fixed left-1/2 top-6 z-[100] flex w-full max-w-[380px] -translate-x-1/2 flex-col gap-3 overflow-visible outline-none",children:[p.jsx(xn,{mode:"popLayout",initial:!1,children:i.map(a=>p.jsx(x3,{toast:a},a.id))}),!n&&s>0&&p.jsxs(Le.div,{layout:!0,initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"pointer-events-auto cursor-default self-center rounded-full border border-card-border bg-card-background/80 px-3 py-1 text-[10px] font-bold uppercase tracking-wider text-foreground/50 shadow-sm backdrop-blur transition-all hover:bg-card-background hover:text-foreground/80",children:["+",s," more"]})]})}function w3({children:e,max:t=5}){const n=dC(),r=S.useCallback(()=>{n.toasts.forEach(i=>n.close(i.id))},[n]),o=S.useCallback((i,s)=>{const a={theme:s?.theme,closable:s?.closable,loading:s?.loading};if(s?.id&&n.toasts.find(u=>u.id===s.id))return n.update(s.id,{description:i,title:s.title,timeout:s.timeout,data:a}),{close:()=>n.close(s.id),clear:r};const l=n.add({description:i,id:s?.id,title:s?.title,timeout:s?.timeout,data:a});return{close:()=>n.close(l),clear:r}},[n,r]);return p.jsxs(fC.Provider,{value:o,children:[e,p.jsx(m3,{children:p.jsx(b3,{max:t})})]})}function S3({children:e,max:t=5,timeout:n=5e3}){return p.jsx(tC,{limit:t,timeout:n,children:p.jsx(w3,{max:t,children:e})})}const T3=/Mac|iPod|iPhone|iPad/,zl=()=>T3.test(navigator.userAgent),E3=e=>e.split("+").map(t=>{const n=t.trim();return n==="Mod"?zl()?"Meta":"Control":n==="Hyper"?zl()?"Meta+Shift+Alt":"Control+Shift+Alt":n}),Nb=e=>e.map(t=>t.trim()).join("+");class C3{combinations=[];constructor(t=[]){this.combinations=this.combinations.concat(t),this.combinations.forEach(n=>{this.add(n.key,n.fn)})}add(t,n){const r=Nb(E3(t));if(!this.combinations.find(o=>o.key===r))return this.combinations.push({fn:n,key:r}),this}register(){const t=new AbortController,n=r=>{const o=r.target;if((o.tagName==="INPUT"||o.tagName==="TEXTAREA")&&o.getAttribute("data-combikeysbypass")!=="true")return;const i=new Set;if(r.metaKey&&i.add("Meta"),r.ctrlKey&&i.add("Control"),r.altKey&&i.add("Alt"),r.key.charCodeAt(0)>127){const a=r.code.replace(/^Digit/,"").replace(/^Key/,"");i.add(r.shiftKey?a.toUpperCase():a.toLowerCase())}else i.add(r.shiftKey?r.key.toUpperCase():r.key);const s=Nb(Array.from(i));this.combinations.forEach(a=>{if(a.key===s)return r.preventDefault(),void a.fn(r)})};return window.addEventListener("keydown",n,{signal:t.signal}),()=>t.abort()}}const k3=e=>(e=e.trim(),e==="Alt"?zl()?p.jsx(yI,{"aria-label":"Option",size:12}):"Alt":e==="Mod"?zl()?p.jsx(QR,{"aria-label":"Command",size:12}):"Ctrl":e),R3=e=>{const t=e.value.trim().split("+");return p.jsx("span",{className:"flex items-center gap-1 text-sm",children:t.map((n,r)=>{const o=t.length-1===r;return p.jsxs(S.Fragment,{children:[p.jsx("kbd",{"aria-label":n,children:k3(n)}),o?null:p.jsx("span",{children:"+"})]},`${e.value}-${n}-key-${r}`)})})},I3=e=>p.jsx("span",{className:"flex h-full items-center text-left text-sm font-medium text-secondary",children:mp(e.item.title)?p.jsx(e.item.title,{text:e.text}):e.item.title}),A3=S.forwardRef((e,t)=>{const n=S.useId(),r=e.active,o=e.item;return o.type==="group"?p.jsx("div",{id:n,className:"h-10 px-2 pb-1 pt-2",children:p.jsx(I3,{text:e.text,item:o})}):o.type!=="shortcut"?p.jsx(S.Fragment,{}):p.jsxs("button",{...e,id:n,ref:t,role:"option",type:"button","aria-selected":r,"data-component":"command-palette-item",className:Ie("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-floating-hover",r?"bg-floating-hover":""),children:[p.jsxs("span",{className:"flex items-center gap-2",children:[o.Icon?o.Icon:null,p.jsx("span",{children:mp(o.title)?p.jsx(o.title,{text:e.text}):o.title})]}),o.shortcut?p.jsx(R3,{value:o.shortcut}):null]})}),P3=(e,t)=>{if(t.length===0)return e;const n=[{key:"title",value:t},{key:"shortcut",value:t},{key:"hint",value:t}],r=e.map(a=>({...a,title:Be.function(a.title)?a.title({text:t}):a.title})),o=r.reduce((a,l)=>{const c=Be.function(l.enabled)?l.enabled({text:t}):l.enabled??!0;return c&&a.push({...l,enabled:c}),a},[]),i=ih(o,"title",n),s=r.filter(a=>Be.function(a.enabled)?a.enabled({text:t}):!1);return Dn.unique(i.concat(s),a=>a.title)},O3=[0,0,0,0,0],pC=e=>{for(let t=0;t<e.length;t++){const n=e[t];if(n.type==="shortcut")return n;const r=pC(n.items);if(r)return r}return null},mC=e=>{const t=S.useId(),n=S.useRef(null),[r,o]=S.useState(""),i=S.useRef([]),s=yt(),a=Br(r),[l,c]=S.useState(null),u=e.bind??"Mod + k",d=ir({open:e.open,strategy:"absolute",whileElementsMounted:Io,onOpenChange:e.onChangeVisibility}),f=e.commands.flatMap(T=>T.type==="group"?[T,...T.items]:[T]),m=P3(f,r),g=r===""?f:[{type:"group",title:"Results",items:[]},...m.filter(T=>T.type!=="group")],y=uc(d.context,{listRef:i,loop:!0,activeIndex:l,virtual:!0,allowEscape:!1,focusItemOnOpen:!0,focusItemOnHover:!0,openOnArrowKeyDown:!0,scrollItemIntoView:!1,selectedIndex:l,disabledIndices:T=>{const E=g[T];return E?E.type==="group":!1},onNavigate:T=>{Be.number(T)&&(j0(n.current,i.current[T])||i.current[T]?.scrollIntoView({block:"start",inline:"start"})),c(E=>Be.number(T)?T:e.open?E??0:null)}}),{getItemProps:h,getReferenceProps:v,getFloatingProps:x}=sr([y]);S.useEffect(()=>{const T=new C3;return T.add(u,()=>e.onChangeVisibility?.(!0)),f.forEach(E=>{E.type!=="group"&&E.type==="shortcut"&&E.shortcut!==void 0&&T.add(E.shortcut,R=>E.action({event:R,setText:o,text:a.current,setOpen:e.onChangeVisibility}))}),T.register()},[u,f,e,a]);const b=e.Icon??Du;return p.jsx(S.Fragment,{children:p.jsxs(ca,{...x(),animated:!1,closable:!1,open:e.open,overlayClickClose:!0,ariaTitle:"Command palette",bodyClassName:"px-0 py-0 pt-0","data-component":"command-palette",onChange:e.onChangeVisibility,className:"container relative overflow-clip py-0 md:max-w-screen-sm lg:max-w-screen-md",children:[p.jsxs("header",{className:"sticky top-0 isolate z-floating flex h-12 w-full items-center overflow-clip border-b border-floating-border bg-floating-background",children:[p.jsx("div",{className:"flex size-10 items-center justify-center",children:e.Icon?p.jsx(b,{Default:Du,text:r,size:16}):p.jsx(Du,{size:16})}),p.jsx("input",{...v({ref:d.refs.setReference,onKeyDown:T=>{const E=Be.number(l)?g[l]:null;if(T.key==="Enter")if(E)E.type==="shortcut"&&E.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o});else{const w=pC(m);w?.type==="shortcut"&&w.action({event:T,text:r,setOpen:e.onChangeVisibility,setText:o})}}}),autoFocus:!0,value:r,"data-combikeysbypass":"true",placeholder:"Search for...",onChange:T=>o(T.target.value),className:"h-12 w-full items-center bg-transparent px-2 py-2 pb-2 text-left text-lg outline-none"})]}),e.loading?p.jsxs("ul",{role:"listbox","data-component":"command-palette-list",className:"my-2 flex max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[p.jsx("div",{className:"h-10 px-2 pb-1 pt-2",children:s.commandPaletteLoading}),O3.map((T,E)=>p.jsx("li",{className:Ie("flex h-10 items-center justify-between rounded-lg p-2 hover:bg-primary hover:text-primary-foreground"),children:Hm},`${t}-${E}-skeleton-index`))]}):p.jsxs("div",{className:"flex min-w-full flex-row flex-nowrap","data-component":"command-palette-container",children:[p.jsxs("ul",{role:"listbox",ref:n,"data-component":"command-palette-list",className:"my-2 flex h-fit max-h-96 w-full origin-[top_center] flex-col gap-1 overflow-y-auto px-2",children:[g.map((T,E)=>S.createElement(A3,{...h({onMouseEnter:()=>c(E),ref(R){i.current[E]=R},onClick(R){R.preventDefault(),e.onChangeVisibility(!1),T.type==="shortcut"&&T.action({event:R,text:r,setOpen:e.onChangeVisibility,setText:o})}}),item:T,text:r,active:l===E,key:`${t}-${T.type}-${E}`})),g.length===1?p.jsx("div",{className:Ie("flex items-center justify-between rounded-lg p-2 text-secondary"),children:s.commandPaletteEmpty??e.emptyMessage}):null]}),e.Preview&&Be.number(l)?p.jsx(e.Preview,{command:g[l],text:r}):null]}),e.footer?p.jsx("footer",{className:"flex h-8 items-center rounded-b-lg border-t border-floating-border p-2",children:e.footer}):null]})})};function Nr(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function hC(e){const t=new Map;for(const n of e){const r=Nr(n.date),o=t.get(r);o?o.push(n):t.set(r,[n])}return t}function gC(e){const t=Zm(e),n=Rn(t,{weekStartsOn:1}),r=[];for(let o=0;o<42;o++)r.push(to(n,o));return r}function uh(e){const t=Rn(e,{weekStartsOn:1}),n=[];for(let r=0;r<7;r++)n.push(to(t,r));return n}function dh(){return Array.from({length:24},(e,t)=>t)}function ol(e,t){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(new Date(e))}function da(e,t){return new Intl.DateTimeFormat(t,{day:"numeric"}).format(e)}function j3(e,t){return new Intl.DateTimeFormat(t,{weekday:"short"}).format(e)}function yC(e,t){return new Intl.DateTimeFormat(t,{weekday:"long"}).format(e)}function vC(e,t){return new Intl.DateTimeFormat(t,{weekday:"short"}).format(e)}function fh(e,t){return new Intl.DateTimeFormat(t,{month:"long",year:"numeric"}).format(e)}function xC(e,t){return new Intl.DateTimeFormat(t,{month:"short"}).format(e)}function Bs(e,t){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(new Date(0,0,0,e))}function Hs(e,t){return new Intl.DateTimeFormat(t,{weekday:"long",month:"short",day:"numeric",year:"numeric"}).format(e)}function bC(e,t){return new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit",hour12:!1}).format(e)}function wC(e){return Xm(e)}function D3({currentDate:e,currentView:t,filters:n,filterArea:r,setCurrentDate:o,setCurrentView:i,onToggleFilter:s,onAddEvent:a}){const l=Zr(),c=yt(),u=ua(e),d=S.useMemo(()=>[{value:"month",label:c.pageCalendarMonthView},{value:"week",label:c.pageCalendarWeekView},{value:"day",label:c.pageCalendarDayView}],[c]),f=()=>{o(y=>t==="month"?IE(y,1):t==="week"?dB(y):RE(y,1))},m=()=>{o(y=>t==="month"?Km(y,1):t==="week"?hE(y,1):to(y,1))},g=wC(e);return p.jsxs("header",{className:"flex flex-col gap-4",children:[p.jsxs("div",{className:"flex items-center justify-between gap-4",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("div",{"aria-hidden":"true",className:`flex size-12 flex-col items-center justify-center overflow-hidden rounded-lg text-xs ${u?"bg-primary text-primary-foreground":"bg-card text-foreground"}`,children:[p.jsx("span",{className:"font-light uppercase leading-none",children:xC(e,l)}),p.jsx("span",{className:"text-xl font-medium leading-none",children:da(e,l)})]}),p.jsxs("div",{children:[p.jsx("h1",{"aria-live":"polite","aria-atomic":"true",className:"text-xl font-bold leading-tight",children:fh(e,l)}),p.jsx("span",{className:"text-xs text-muted-foreground",children:c.pageCalendarWeekLabel(g)})]})]}),p.jsxs("nav",{"aria-label":c.pageCalendarNavigation,className:"flex items-center gap-2",children:[p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(Qt,{size:"small",title:c.pageCalendarPrevious,"aria-label":c.pageCalendarPrevious,theme:"ghost-muted",onClick:f,children:p.jsx(z0,{size:16})}),p.jsx("button",{type:"button","aria-label":c.pageCalendarToday,onClick:()=>o(new Date),className:"rounded-md px-3 py-1.5 text-sm transition-colors hover:bg-muted/50",children:c.pageCalendarToday}),p.jsx(Qt,{size:"small",title:c.pageCalendarNext,"aria-label":c.pageCalendarNext,theme:"ghost-muted",onClick:m,children:p.jsx(Kl,{size:16})})]}),p.jsx("div",{className:"flex rounded-md",children:d.map(y=>p.jsx(Qt,{size:"small",onClick:()=>i(y.value),theme:t===y.value?"primary":"muted","aria-pressed":t===y.value,className:"rounded-none first:rounded-l-button last:rounded-r-button",children:y.label},y.value))}),a&&p.jsxs(Qt,{theme:"primary",size:"small",onClick:a,children:[p.jsx(YR,{size:14}),c.pageCalendarAddEvent]})]})]}),r??(n.length>0&&p.jsxs("div",{role:"group","aria-label":c.pageCalendarFilter,className:"flex flex-wrap items-center gap-1.5",children:[p.jsx($0,{size:14,className:"text-muted-foreground","aria-hidden":"true"}),p.jsx("span",{className:"mr-1 text-xs text-muted-foreground",children:c.pageCalendarFilter}),n.map(y=>p.jsx(fi,{as:"button",size:"small",type:"button",theme:y.theme,indicator:y.enabled?y.theme:void 0,"aria-pressed":y.enabled,"aria-label":`${y.label}, ${y.enabled?c.pageCalendarFilterEnabled:c.pageCalendarFilterDisabled}`,onClick:()=>s(y.id),children:y.label},y.id))]}))]})}function ph({event:e,onClick:t,compact:n=!1}){const r=yt(),o={style:{border:"0",padding:"0 0.5rem",height:"1.25rem",borderRadius:"0.25rem"},className:Ie("w-full border-0 justify-start rounded text-xs truncate text-ellipsis overflow-hidden border leading-tight",e.className)};return n?p.jsx(Qt,{...o,size:"small",onClick:t,title:e.title,"aria-label":r.pageCalendarEventAt(e.title,ol(e.date)),theme:e.className?"raw":"primary",children:e.title}):p.jsxs(Qt,{...o,size:"small",onClick:t,title:e.title,"aria-label":r.pageCalendarEventAt(e.title,ol(e.date)),theme:e.className?"raw":"primary",children:[p.jsx("div",{className:"truncate font-medium",children:e.title}),p.jsx("div",{className:"text-xs opacity-60",children:ol(e.date)})]})}function M3({days:e,eventsByDate:t,currentDate:n,onEventClick:r,onDayClick:o}){const i=Zr(),s=yt(),a=S.useMemo(()=>uh(new Date),[]);return p.jsxs("div",{className:"flex h-full flex-1 flex-col",children:[p.jsx("ul",{role:"row","aria-hidden":"true",className:"grid grid-cols-7 border-b border-border",children:a.map(l=>{const c=j3(l,i);return p.jsx("li",{className:"py-2 text-center text-xs font-medium text-muted-foreground",children:c},c)})}),p.jsx("div",{role:"grid","aria-label":s.pageCalendarMonthGrid,className:"grid flex-1 auto-rows-fr grid-cols-7",children:e.map((l,c)=>{const u=Nr(l),d=t.get(u)||[],f=kE(l,n),m=ua(l),g=d.slice(0,2),y=d.length-2;return p.jsxs("button",{type:"button",onClick:()=>o(l),"aria-label":`${Hs(l,i)}${d.length>0?`, ${s.pageCalendarEventCount(d.length)}`:""}`,className:`group flex min-h-32 cursor-pointer flex-col gap-1 border-b border-r border-border p-2 transition-colors hover:bg-muted hover:bg-opacity-20 ${f?"":"opacity-50"}`,children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:`flex h-6 w-6 items-center justify-center rounded-full text-xs font-medium ${m?"bg-primary text-primary-foreground":"text-foreground"}`,children:da(l,i)}),p.jsx("span",{"aria-hidden":"true",className:"text-lg leading-none text-muted-foreground opacity-0 transition-opacity group-hover:opacity-40",children:"+"})]}),p.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.map(h=>p.jsx("div",{onClick:v=>v.stopPropagation(),children:p.jsx(ph,{compact:!0,event:h,onClick:()=>r(h)})},h.id)),y>0&&p.jsx("span",{className:"pl-1 text-xs text-muted-foreground",children:s.pageCalendarMoreEvents(y)})]})]},c)})})]})}const vs=48;function N3(e){const t=e.date.getHours(),n=e.date.getMinutes();return t*vs+n/60*vs}function _3({days:e,eventsByDate:t,onEventClick:n,onSlotClick:r}){const o=Zr(),i=S.useRef(null),s=S.useRef(null),a=dh();return S.useEffect(()=>{if(s.current&&i.current){const l=i.current.offsetTop;s.current.scrollTop=l-s.current.clientHeight/2}},[]),p.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[p.jsxs("div",{className:"flex flex-shrink-0 border-b border-border",children:[p.jsx("div",{className:"w-[60px] flex-shrink-0"}),e.map((l,c)=>{const u=ua(l);return p.jsxs("div",{"aria-label":Hs(l,o),className:"flex-1 py-2 text-center text-xs font-medium text-muted-foreground",children:[p.jsx("span",{className:"block",children:vC(l,o)}),p.jsx("span",{className:`inline-flex h-6 w-6 items-center justify-center rounded-full text-sm font-bold ${u?"bg-primary text-primary-foreground":"text-foreground"}`,children:da(l,o)})]},c)})]}),p.jsxs("div",{ref:s,className:"flex flex-1 items-start overflow-y-auto",children:[p.jsx("div",{className:"w-[60px] flex-shrink-0",children:a.map(l=>p.jsxs("div",{className:"relative",style:{height:vs},children:[p.jsx("span",{className:"absolute -top-2.5 right-2 text-[10px] text-muted-foreground",children:l===0?"":Bs(l,o)}),l===new Date().getHours()&&p.jsx("div",{ref:i})]},l))}),e.map((l,c)=>{const u=Nr(l),d=t.get(u)||[];return p.jsxs("div",{className:"relative flex-1 border-l border-card-border",children:[a.map(f=>{const m=new Date(l);return m.setHours(f,0,0,0),p.jsx("div",{role:"button",tabIndex:0,"aria-label":Bs(f,o),className:"cursor-pointer border-b border-border/50 hover:bg-muted/20",style:{height:vs},onClick:()=>r?.(m),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),r?.(m))}},f)}),d.map(f=>p.jsx("div",{className:"absolute left-0.5 right-0.5",style:{top:N3(f),height:vs},onClick:m=>m.stopPropagation(),children:p.jsx(ph,{event:f,onClick:()=>n(f)})},f.id))]},c)})]})]})}const xs=48;function F3(e){const t=e.date.getHours(),n=e.date.getMinutes();return t*xs+n/60*xs}function L3({currentDate:e,onSlotClick:t,renderEvent:n,eventsByDate:r,onDateChange:o,onEventClick:i}){const s=Zr(),a=S.useRef(null),l=S.useRef(null),c=dh(),[u,d]=S.useState(null);S.useEffect(()=>{if(l.current&&a.current){const h=a.current.offsetTop;l.current.scrollTop=h-l.current.clientHeight/2}},[]);const f=Nr(e),m=r.get(f)||[],g=({date:h})=>{const v=Nr(h),x=(r.get(v)||[]).length>0,b=Nr(h)===Nr(e);return!x||b?null:p.jsx("span",{className:"absolute bottom-0.5 left-1/2 h-1 w-1 -translate-x-1/2 rounded-full bg-primary"})},y=h=>{d(h),i(h)};return p.jsxs("div",{className:"flex flex-1 min-w-full",children:[p.jsxs("div",{className:"flex w-full flex-1 flex-col",children:[p.jsxs("div",{"aria-label":Hs(e,s),className:"flex flex-shrink-0 items-center gap-3 border-b border-border px-4 py-2",children:[p.jsx("span",{className:`inline-flex h-8 w-8 items-center justify-center rounded-full font-bold ${ua(e)?"bg-primary text-primary-foreground":"text-foreground"}`,children:da(e,s)}),p.jsxs("div",{children:[p.jsx("div",{className:"font-semibold",children:yC(e,s)}),p.jsx("div",{className:"text-xs text-muted-foreground",children:fh(e,s)})]})]}),p.jsxs("div",{ref:l,className:"flex flex-1 items-start overflow-y-auto",children:[p.jsx("div",{className:"w-[60px] flex-shrink-0",children:c.map(h=>p.jsxs("div",{className:"relative",style:{height:xs},children:[p.jsx("span",{className:"absolute -top-2.5 right-2 text-[10px] text-muted-foreground",children:h===0?"":Bs(h,s)}),h===new Date().getHours()&&p.jsx("div",{ref:a})]},h))}),p.jsxs("div",{className:"relative flex-1 border-l border-card-border",children:[c.map(h=>{const v=new Date(e);return v.setHours(h,0,0,0),p.jsx("div",{role:"button",tabIndex:0,"aria-label":Bs(h,s),className:"cursor-pointer border-b border-border/50 hover:bg-muted/20",style:{height:xs},onClick:()=>t?.(v),onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),t?.(v))}},h)}),m.map(h=>p.jsx("div",{className:"absolute left-1 right-1",style:{top:F3(h),height:xs},onClick:v=>v.stopPropagation(),children:p.jsx(ph,{event:h,onClick:()=>y(h)})},h.id))]})]})]}),p.jsxs("div",{className:"flex flex-col overflow-y-auto border-l border-card-border px-4",children:[p.jsx(th,{date:e,markToday:!0,changeOnlyOnClick:!0,RenderOnDay:g,onChange:h=>h&&o(h)}),u&&p.jsx("div",{className:"flex flex-col gap-2 border-t p-3",children:n?n(u):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"truncate text-sm font-semibold",children:u.title}),p.jsx("div",{className:"text-xs text-muted-foreground",children:Hs(u.date,s)}),p.jsx("div",{className:"text-xs text-muted-foreground",children:bC(u.date,s)}),p.jsx(fi,{theme:u.className?"custom":"primary",size:"small",className:`self-start${u.className?` ${u.className}`:""}`})]})})]})]})}const V3=[];function $3({events:e,filterArea:t,onAddEvent:n,defaultDate:r,onSlotClick:o,getFilterId:i,renderEvent:s,onEventClick:a,filters:l=V3,defaultView:c="month",onChangeFilters:u}){const d=yt(),[f,m]=S.useState(c),[g,y]=S.useState(()=>r??new Date),[h,v]=S.useState(l),x=I=>{v(P=>{const M=P.map(j=>j.id===I?{...j,enabled:!j.enabled}:j);return u?.(M),M})},b=S.useMemo(()=>{if(l.length===0)return e;const I=i??(P=>P?.filterId);return e.filter(P=>h.find(M=>M.id===I(P))?.enabled??!0)},[e,h,l]),T=S.useMemo(()=>hC(b),[b]),E=S.useMemo(()=>gC(g),[g]),R=S.useMemo(()=>uh(g),[g]),w=I=>a?.(I),C=I=>{y(I),m("day")};return p.jsxs("div",{role:"application","aria-label":d.pageCalendarLabel,className:"flex h-full w-full flex-grow flex-col gap-4",children:[p.jsx(D3,{filters:h,filterArea:t,onAddEvent:n,currentDate:g,currentView:f,setCurrentDate:y,setCurrentView:m,onToggleFilter:x}),f==="month"&&p.jsx(M3,{days:E,currentDate:g,eventsByDate:T,onDayClick:C,onEventClick:w}),f==="week"&&p.jsx(_3,{days:R,currentDate:g,onSlotClick:o,eventsByDate:T,onEventClick:w}),f==="day"&&p.jsx(L3,{currentDate:g,onSlotClick:o,renderEvent:s,eventsByDate:T,onDateChange:y,onEventClick:w})]})}const z3=["INPUT","SELECT"],SC=e=>{if(!e)return;Array.from(e.elements).forEach(n=>{z3.includes(n.tagName)&&(n.tagName==="INPUT"&&(n.value=n.defaultValue),n.tagName==="SELECT"&&(n.value=""),n.setAttribute("data-initialized","false"))})};var zd,_b;function mh(){if(_b)return zd;_b=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return zd={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},zd}var Bd,Fb;function TC(){if(Fb)return Bd;Fb=1;var e=mh(),t=g0(),n=Object.prototype.hasOwnProperty,r=Array.isArray,o=t(),i=function(w,C){return o.set(w,C),w},s=function(w){return o.has(w)},a=function(w){return o.get(w)},l=function(w,C){o.set(w,C)},c=(function(){for(var R=[],w=0;w<256;++w)R[R.length]="%"+((w<16?"0":"")+w.toString(16)).toUpperCase();return R})(),u=function(w){for(;w.length>1;){var C=w.pop(),I=C.obj[C.prop];if(r(I)){for(var P=[],M=0;M<I.length;++M)typeof I[M]<"u"&&(P[P.length]=I[M]);C.obj[C.prop]=P}}},d=function(w,C){for(var I=C&&C.plainObjects?{__proto__:null}:{},P=0;P<w.length;++P)typeof w[P]<"u"&&(I[P]=w[P]);return I},f=function R(w,C,I){if(!C)return w;if(typeof C!="object"&&typeof C!="function"){if(r(w)){var P=w.length;if(I&&typeof I.arrayLimit=="number"&&P>I.arrayLimit)return i(d(w.concat(C),I),P);w[P]=C}else if(w&&typeof w=="object")if(s(w)){var M=a(w)+1;w[M]=C,l(w,M)}else{if(I&&I.strictMerge)return[w,C];(I&&(I.plainObjects||I.allowPrototypes)||!n.call(Object.prototype,C))&&(w[C]=!0)}else return[w,C];return w}if(!w||typeof w!="object"){if(s(C)){for(var j=Object.keys(C),L=I&&I.plainObjects?{__proto__:null,0:w}:{0:w},O=0;O<j.length;O++){var N=parseInt(j[O],10);L[N+1]=C[j[O]]}return i(L,a(C)+1)}var V=[w].concat(C);return I&&typeof I.arrayLimit=="number"&&V.length>I.arrayLimit?i(d(V,I),V.length-1):V}var D=w;return r(w)&&!r(C)&&(D=d(w,I)),r(w)&&r(C)?(C.forEach(function(k,F){if(n.call(w,F)){var _=w[F];_&&typeof _=="object"&&k&&typeof k=="object"?w[F]=R(_,k,I):w[w.length]=k}else w[F]=k}),w):Object.keys(C).reduce(function(k,F){var _=C[F];if(n.call(k,F)?k[F]=R(k[F],_,I):k[F]=_,s(C)&&!s(k)&&i(k,a(C)),s(k)){var B=parseInt(F,10);String(B)===F&&B>=0&&B>a(k)&&l(k,B)}return k},D)},m=function(w,C){return Object.keys(C).reduce(function(I,P){return I[P]=C[P],I},w)},g=function(R,w,C){var I=R.replace(/\+/g," ");if(C==="iso-8859-1")return I.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(I)}catch{return I}},y=1024,h=function(w,C,I,P,M){if(w.length===0)return w;var j=w;if(typeof w=="symbol"?j=Symbol.prototype.toString.call(w):typeof w!="string"&&(j=String(w)),I==="iso-8859-1")return escape(j).replace(/%u[0-9a-f]{4}/gi,function(F){return"%26%23"+parseInt(F.slice(2),16)+"%3B"});for(var L="",O=0;O<j.length;O+=y){for(var N=j.length>=y?j.slice(O,O+y):j,V=[],D=0;D<N.length;++D){var k=N.charCodeAt(D);if(k===45||k===46||k===95||k===126||k>=48&&k<=57||k>=65&&k<=90||k>=97&&k<=122||M===e.RFC1738&&(k===40||k===41)){V[V.length]=N.charAt(D);continue}if(k<128){V[V.length]=c[k];continue}if(k<2048){V[V.length]=c[192|k>>6]+c[128|k&63];continue}if(k<55296||k>=57344){V[V.length]=c[224|k>>12]+c[128|k>>6&63]+c[128|k&63];continue}D+=1,k=65536+((k&1023)<<10|N.charCodeAt(D)&1023),V[V.length]=c[240|k>>18]+c[128|k>>12&63]+c[128|k>>6&63]+c[128|k&63]}L+=V.join("")}return L},v=function(w){for(var C=[{obj:{o:w},prop:"o"}],I=[],P=0;P<C.length;++P)for(var M=C[P],j=M.obj[M.prop],L=Object.keys(j),O=0;O<L.length;++O){var N=L[O],V=j[N];typeof V=="object"&&V!==null&&I.indexOf(V)===-1&&(C[C.length]={obj:j,prop:N},I[I.length]=V)}return u(C),w},x=function(w){return Object.prototype.toString.call(w)==="[object RegExp]"},b=function(w){return!w||typeof w!="object"?!1:!!(w.constructor&&w.constructor.isBuffer&&w.constructor.isBuffer(w))},T=function(w,C,I,P){if(s(w)){var M=a(w)+1;return w[M]=C,l(w,M),w}var j=[].concat(w,C);return j.length>I?i(d(j,{plainObjects:P}),j.length-1):j},E=function(w,C){if(r(w)){for(var I=[],P=0;P<w.length;P+=1)I[I.length]=C(w[P]);return I}return C(w)};return Bd={arrayToObject:d,assign:m,combine:T,compact:v,decode:g,encode:h,isBuffer:b,isOverflow:s,isRegExp:x,markOverflow:i,maybeMap:E,merge:f},Bd}var Hd,Lb;function B3(){if(Lb)return Hd;Lb=1;var e=g0(),t=TC(),n=mh(),r=Object.prototype.hasOwnProperty,o={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,v){return h+"["+v+"]"},repeat:function(h){return h}},i=Array.isArray,s=Array.prototype.push,a=function(y,h){s.apply(y,i(h)?h:[h])},l=Date.prototype.toISOString,c=n.default,u={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:n.formatters[c],indices:!1,serializeDate:function(h){return l.call(h)},skipNulls:!1,strictNullHandling:!1},d=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},f={},m=function y(h,v,x,b,T,E,R,w,C,I,P,M,j,L,O,N,V,D){for(var k=h,F=D,_=0,B=!1;(F=F.get(f))!==void 0&&!B;){var U=F.get(h);if(_+=1,typeof U<"u"){if(U===_)throw new RangeError("Cyclic object value");B=!0}typeof F.get(f)>"u"&&(_=0)}if(typeof I=="function"?k=I(v,k):k instanceof Date?k=j(k):x==="comma"&&i(k)&&(k=t.maybeMap(k,function(Q){return Q instanceof Date?j(Q):Q})),k===null){if(E)return C&&!N?C(v,u.encoder,V,"key",L):v;k=""}if(d(k)||t.isBuffer(k)){if(C){var G=N?v:C(v,u.encoder,V,"key",L);return[O(G)+"="+O(C(k,u.encoder,V,"value",L))]}return[O(v)+"="+O(String(k))]}var H=[];if(typeof k>"u")return H;var ee;if(x==="comma"&&i(k))N&&C&&(k=t.maybeMap(k,C)),ee=[{value:k.length>0?k.join(",")||null:void 0}];else if(i(I))ee=I;else{var ie=Object.keys(k);ee=P?ie.sort(P):ie}var te=w?String(v).replace(/\./g,"%2E"):String(v),q=b&&i(k)&&k.length===1?te+"[]":te;if(T&&i(k)&&k.length===0)return q+"[]";for(var Y=0;Y<ee.length;++Y){var Z=ee[Y],fe=typeof Z=="object"&&Z&&typeof Z.value<"u"?Z.value:k[Z];if(!(R&&fe===null)){var z=M&&w?String(Z).replace(/\./g,"%2E"):String(Z),se=i(k)?typeof x=="function"?x(q,z):q:q+(M?"."+z:"["+z+"]");D.set(h,_);var le=e();le.set(f,D),a(H,y(fe,se,x,b,T,E,R,w,x==="comma"&&N&&i(k)?null:C,I,P,M,j,L,O,N,V,le))}}return H},g=function(h){if(!h)return u;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var v=h.charset||u.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var x=n.default;if(typeof h.format<"u"){if(!r.call(n.formatters,h.format))throw new TypeError("Unknown format option provided.");x=h.format}var b=n.formatters[x],T=u.filter;(typeof h.filter=="function"||i(h.filter))&&(T=h.filter);var E;if(h.arrayFormat in o?E=h.arrayFormat:"indices"in h?E=h.indices?"indices":"repeat":E=u.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var R=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:u.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:u.addQueryPrefix,allowDots:R,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:u.allowEmptyArrays,arrayFormat:E,charset:v,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:u.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?u.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:u.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:u.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:u.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:u.encodeValuesOnly,filter:T,format:x,formatter:b,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:u.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:u.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:u.strictNullHandling}};return Hd=function(y,h){var v=y,x=g(h),b,T;typeof x.filter=="function"?(T=x.filter,v=T("",v)):i(x.filter)&&(T=x.filter,b=T);var E=[];if(typeof v!="object"||v===null)return"";var R=o[x.arrayFormat],w=R==="comma"&&x.commaRoundTrip;b||(b=Object.keys(v)),x.sort&&b.sort(x.sort);for(var C=e(),I=0;I<b.length;++I){var P=b[I],M=v[P];x.skipNulls&&M===null||a(E,m(M,P,R,w,x.allowEmptyArrays,x.strictNullHandling,x.skipNulls,x.encodeDotInKeys,x.encode?x.encoder:null,x.filter,x.sort,x.allowDots,x.serializeDate,x.format,x.formatter,x.encodeValuesOnly,x.charset,C))}var j=E.join(x.delimiter),L=x.addQueryPrefix===!0?"?":"";return x.charsetSentinel&&(x.charset==="iso-8859-1"?L+="utf8=%26%2310003%3B&":L+="utf8=%E2%9C%93&"),j.length>0?L+j:""},Hd}var Wd,Vb;function H3(){if(Vb)return Wd;Vb=1;var e=TC(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},o=function(m){return m.replace(/&#(\d+);/g,function(g,y){return String.fromCharCode(parseInt(y,10))})},i=function(m,g,y){if(m&&typeof m=="string"&&g.comma&&m.indexOf(",")>-1)return m.split(",");if(g.throwOnLimitExceeded&&y>=g.arrayLimit)throw new RangeError("Array limit exceeded. Only "+g.arrayLimit+" element"+(g.arrayLimit===1?"":"s")+" allowed in an array.");return m},s="utf8=%26%2310003%3B",a="utf8=%E2%9C%93",l=function(g,y){var h={__proto__:null},v=y.ignoreQueryPrefix?g.replace(/^\?/,""):g;v=v.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var x=y.parameterLimit===1/0?void 0:y.parameterLimit,b=v.split(y.delimiter,y.throwOnLimitExceeded?x+1:x);if(y.throwOnLimitExceeded&&b.length>x)throw new RangeError("Parameter limit exceeded. Only "+x+" parameter"+(x===1?"":"s")+" allowed.");var T=-1,E,R=y.charset;if(y.charsetSentinel)for(E=0;E<b.length;++E)b[E].indexOf("utf8=")===0&&(b[E]===a?R="utf-8":b[E]===s&&(R="iso-8859-1"),T=E,E=b.length);for(E=0;E<b.length;++E)if(E!==T){var w=b[E],C=w.indexOf("]="),I=C===-1?w.indexOf("="):C+1,P,M;if(I===-1?(P=y.decoder(w,r.decoder,R,"key"),M=y.strictNullHandling?null:""):(P=y.decoder(w.slice(0,I),r.decoder,R,"key"),P!==null&&(M=e.maybeMap(i(w.slice(I+1),y,n(h[P])?h[P].length:0),function(L){return y.decoder(L,r.decoder,R,"value")}))),M&&y.interpretNumericEntities&&R==="iso-8859-1"&&(M=o(String(M))),w.indexOf("[]=")>-1&&(M=n(M)?[M]:M),y.comma&&n(M)&&M.length>y.arrayLimit){if(y.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+y.arrayLimit+" element"+(y.arrayLimit===1?"":"s")+" allowed in an array.");M=e.combine([],M,y.arrayLimit,y.plainObjects)}if(P!==null){var j=t.call(h,P);j&&(y.duplicates==="combine"||w.indexOf("[]=")>-1)?h[P]=e.combine(h[P],M,y.arrayLimit,y.plainObjects):(!j||y.duplicates==="last")&&(h[P]=M)}}return h},c=function(m,g,y,h){var v=0;if(m.length>0&&m[m.length-1]==="[]"){var x=m.slice(0,-1).join("");v=Array.isArray(g)&&g[x]?g[x].length:0}for(var b=h?g:i(g,y,v),T=m.length-1;T>=0;--T){var E,R=m[T];if(R==="[]"&&y.parseArrays)e.isOverflow(b)?E=b:E=y.allowEmptyArrays&&(b===""||y.strictNullHandling&&b===null)?[]:e.combine([],b,y.arrayLimit,y.plainObjects);else{E=y.plainObjects?{__proto__:null}:{};var w=R.charAt(0)==="["&&R.charAt(R.length-1)==="]"?R.slice(1,-1):R,C=y.decodeDotInKeys?w.replace(/%2E/g,"."):w,I=parseInt(C,10),P=!isNaN(I)&&R!==C&&String(I)===C&&I>=0&&y.parseArrays;if(!y.parseArrays&&C==="")E={0:b};else if(P&&I<y.arrayLimit)E=[],E[I]=b;else{if(P&&y.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+y.arrayLimit+" element"+(y.arrayLimit===1?"":"s")+" allowed in an array.");P?(E[I]=b,e.markOverflow(E,I)):C!=="__proto__"&&(E[C]=b)}}b=E}return b},u=function(g,y){var h=y.allowDots?g.replace(/\.([^.[]+)/g,"[$1]"):g;if(y.depth<=0)return!y.plainObjects&&t.call(Object.prototype,h)&&!y.allowPrototypes?void 0:[h];var v=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,b=v.exec(h),T=b?h.slice(0,b.index):h,E=[];if(T){if(!y.plainObjects&&t.call(Object.prototype,T)&&!y.allowPrototypes)return;E[E.length]=T}for(var R=0;(b=x.exec(h))!==null&&R<y.depth;){R+=1;var w=b[1].slice(1,-1);if(!y.plainObjects&&t.call(Object.prototype,w)&&!y.allowPrototypes)return;E[E.length]=b[1]}if(b){if(y.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+y.depth+" and strictDepth is true");E[E.length]="["+h.slice(b.index)+"]"}return E},d=function(g,y,h,v){if(g){var x=u(g,h);if(x)return c(x,y,h,v)}},f=function(g){if(!g)return r;if(typeof g.allowEmptyArrays<"u"&&typeof g.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof g.decodeDotInKeys<"u"&&typeof g.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(g.decoder!==null&&typeof g.decoder<"u"&&typeof g.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof g.charset<"u"&&g.charset!=="utf-8"&&g.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof g.throwOnLimitExceeded<"u"&&typeof g.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var y=typeof g.charset>"u"?r.charset:g.charset,h=typeof g.duplicates>"u"?r.duplicates:g.duplicates;if(h!=="combine"&&h!=="first"&&h!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var v=typeof g.allowDots>"u"?g.decodeDotInKeys===!0?!0:r.allowDots:!!g.allowDots;return{allowDots:v,allowEmptyArrays:typeof g.allowEmptyArrays=="boolean"?!!g.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof g.allowPrototypes=="boolean"?g.allowPrototypes:r.allowPrototypes,allowSparse:typeof g.allowSparse=="boolean"?g.allowSparse:r.allowSparse,arrayLimit:typeof g.arrayLimit=="number"?g.arrayLimit:r.arrayLimit,charset:y,charsetSentinel:typeof g.charsetSentinel=="boolean"?g.charsetSentinel:r.charsetSentinel,comma:typeof g.comma=="boolean"?g.comma:r.comma,decodeDotInKeys:typeof g.decodeDotInKeys=="boolean"?g.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof g.decoder=="function"?g.decoder:r.decoder,delimiter:typeof g.delimiter=="string"||e.isRegExp(g.delimiter)?g.delimiter:r.delimiter,depth:typeof g.depth=="number"||g.depth===!1?+g.depth:r.depth,duplicates:h,ignoreQueryPrefix:g.ignoreQueryPrefix===!0,interpretNumericEntities:typeof g.interpretNumericEntities=="boolean"?g.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof g.parameterLimit=="number"?g.parameterLimit:r.parameterLimit,parseArrays:g.parseArrays!==!1,plainObjects:typeof g.plainObjects=="boolean"?g.plainObjects:r.plainObjects,strictDepth:typeof g.strictDepth=="boolean"?!!g.strictDepth:r.strictDepth,strictMerge:typeof g.strictMerge=="boolean"?!!g.strictMerge:r.strictMerge,strictNullHandling:typeof g.strictNullHandling=="boolean"?g.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof g.throwOnLimitExceeded=="boolean"?g.throwOnLimitExceeded:!1}};return Wd=function(m,g){var y=f(g);if(m===""||m===null||typeof m>"u")return y.plainObjects?{__proto__:null}:{};for(var h=typeof m=="string"?l(m,y):m,v=y.plainObjects?{__proto__:null}:{},x=Object.keys(h),b=0;b<x.length;++b){var T=x[b],E=d(T,h[T],y,typeof m=="string");v=e.merge(v,E,y)}return y.allowSparse===!0?v:e.compact(v)},Wd}var qd,$b;function W3(){if($b)return qd;$b=1;var e=B3(),t=H3(),n=mh();return qd={formats:n,parse:t,stringify:e},qd}var q3=W3(),Ze;(function(e){e.assertEqual=o=>{};function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const i={};for(const s of o)i[s]=s;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(a=>typeof o[o[a]]!="number"),s={};for(const a of i)s[a]=o[a];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(const s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Ze||(Ze={}));var zb;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(zb||(zb={}));const Ce=Ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Pr=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return Number.isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},ge=Ze.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class vr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return o(this),r}static assert(t){if(!(t instanceof vr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}vr.create=e=>new vr(e);const sp=(e,t)=>{let n;switch(e.code){case ge.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ge.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ze.jsonStringifyReplacer)}`;break;case ge.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ze.joinValues(e.keys,", ")}`;break;case ge.invalid_union:n="Invalid input";break;case ge.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ze.joinValues(e.options)}`;break;case ge.invalid_enum_value:n=`Invalid enum value. Expected ${Ze.joinValues(e.options)}, received '${e.received}'`;break;case ge.invalid_arguments:n="Invalid function arguments";break;case ge.invalid_return_type:n="Invalid function return type";break;case ge.invalid_date:n="Invalid date";break;case ge.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ze.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ge.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ge.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ge.custom:n="Invalid input";break;case ge.invalid_intersection_types:n="Intersection results could not be merged";break;case ge.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ge.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ze.assertNever(e)}return{message:n}};let U3=sp;function G3(){return U3}const Y3=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i};if(o.message!==void 0)return{...o,path:i,message:o.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...o,path:i,message:a}};function xe(e,t){const n=G3(),r=Y3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===sp?void 0:sp].filter(o=>!!o)});e.common.issues.push(r)}class bn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Ne;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n){const i=await o.key,s=await o.value;r.push({key:i,value:s})}return bn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return Ne;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}}const Ne=Object.freeze({status:"aborted"}),rs=e=>({status:"dirty",value:e}),In=e=>({status:"valid",value:e}),Bb=e=>e.status==="aborted",Hb=e=>e.status==="dirty",wi=e=>e.status==="valid",Bl=e=>typeof Promise<"u"&&e instanceof Promise;var ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ke||(ke={}));class Wr{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Wb=(e,t)=>{if(wi(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new vr(e.common.issues);return this._error=n,this._error}}};function Ue(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,a)=>{const{message:l}=e;return s.code==="invalid_enum_value"?{message:l??a.defaultError}:typeof a.data>"u"?{message:l??r??a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:l??n??a.defaultError}},description:o}}class Ke{get description(){return this._def.description}_getType(t){return Pr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Pr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new bn,ctx:{common:t.parent.common,data:t.data,parsedType:Pr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Bl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pr(t)},o=this._parseSync({data:t,path:r.path,parent:r});return Wb(r,o)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pr(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return wi(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>wi(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Pr(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(Bl(o)?o:Promise.resolve(o));return Wb(r,i)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{const s=t(o),a=()=>i.addIssue({code:ge.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Ei({schema:this,typeName:_e.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Lr.create(this,this._def)}nullable(){return Ci.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Jn.create(this)}promise(){return Ul.create(this,this._def)}or(t){return Wl.create([this,t],this._def)}and(t){return ql.create(this,t,this._def)}transform(t){return new Ei({...Ue(this._def),schema:this,typeName:_e.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new lp({...Ue(this._def),innerType:this,defaultValue:n,typeName:_e.ZodDefault})}brand(){return new y9({typeName:_e.ZodBranded,type:this,...Ue(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new cp({...Ue(this._def),innerType:this,catchValue:n,typeName:_e.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return hh.create(this,t)}readonly(){return up.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const K3=/^c[^\s-]{8,}$/i,Z3=/^[0-9a-z]+$/,X3=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Q3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,J3=/^[a-z0-9_-]{21}$/i,e9=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,t9=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,n9=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,r9="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ud;const o9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,i9=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,s9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,a9=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,l9=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,c9=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,EC="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",u9=new RegExp(`^${EC}$`);function CC(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function d9(e){return new RegExp(`^${CC(e)}$`)}function f9(e){let t=`${EC}T${CC(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function p9(e,t){return!!((t==="v4"||!t)&&o9.test(e)||(t==="v6"||!t)&&s9.test(e))}function m9(e,t){if(!e9.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&o?.typ!=="JWT"||!o.alg||t&&o.alg!==t)}catch{return!1}}function h9(e,t){return!!((t==="v4"||!t)&&i9.test(e)||(t==="v6"||!t)&&a9.test(e))}class ho extends Ke{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const i=this._getOrReturnCtx(t);return xe(i,{code:ge.invalid_type,expected:Ce.string,received:i.parsedType}),Ne}const r=new bn;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const s=t.data.length>i.value,a=t.data.length<i.value;(s||a)&&(o=this._getOrReturnCtx(t,o),s?xe(o,{code:ge.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&xe(o,{code:ge.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")n9.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"email",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Ud||(Ud=new RegExp(r9,"u")),Ud.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"emoji",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Q3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"uuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")J3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"nanoid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")K3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Z3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cuid2",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")X3.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ulid",code:ge.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),xe(o,{validation:"url",code:ge.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"regex",code:ge.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ge.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ge.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ge.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?f9(i).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ge.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?u9.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ge.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?d9(i).test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{code:ge.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?t9.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"duration",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?p9(t.data,i.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"ip",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?m9(t.data,i.alg)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"jwt",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?h9(t.data,i.version)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"cidr",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?l9.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64",code:ge.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?c9.test(t.data)||(o=this._getOrReturnCtx(t,o),xe(o,{validation:"base64url",code:ge.invalid_string,message:i.message}),r.dirty()):Ze.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(o=>t.test(o),{validation:n,code:ge.invalid_string,...ke.errToObj(r)})}_addCheck(t){return new ho({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ke.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ke.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ke.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ke.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ke.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ke.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...ke.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...ke.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ke.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ke.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...ke.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ke.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ke.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ke.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ke.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ke.errToObj(n)})}nonempty(t){return this.min(1,ke.errToObj(t))}trim(){return new ho({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ho({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ho({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ho.create=e=>new ho({checks:[],typeName:_e.ZodString,coerce:e?.coerce??!1,...Ue(e)});function g9(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=Number.parseInt(e.toFixed(o).replace(".","")),s=Number.parseInt(t.toFixed(o).replace(".",""));return i%s/10**o}class Si extends Ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const i=this._getOrReturnCtx(t);return xe(i,{code:ge.invalid_type,expected:Ce.number,received:i.parsedType}),Ne}let r;const o=new bn;for(const i of this._def.checks)i.kind==="int"?Ze.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:ge.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ge.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ge.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?g9(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:ge.not_finite,message:i.message}),o.dirty()):Ze.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,o){return new Si({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(o)}]})}_addCheck(t){return new Si({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ze.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Si.create=e=>new Si({checks:[],typeName:_e.ZodNumber,coerce:e?.coerce||!1,...Ue(e)});class Ws extends Ke{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ce.bigint)return this._getInvalidInput(t);let r;const o=new bn;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ge.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ge.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:ge.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Ze.assertNever(i);return{status:o.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ge.invalid_type,expected:Ce.bigint,received:n.parsedType}),Ne}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,o){return new Ws({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(o)}]})}_addCheck(t){return new Ws({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ws.create=e=>new Ws({checks:[],typeName:_e.ZodBigInt,coerce:e?.coerce??!1,...Ue(e)});class qb extends Ke{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const r=this._getOrReturnCtx(t);return xe(r,{code:ge.invalid_type,expected:Ce.boolean,received:r.parsedType}),Ne}return In(t.data)}}qb.create=e=>new qb({typeName:_e.ZodBoolean,coerce:e?.coerce||!1,...Ue(e)});class Hl extends Ke{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const i=this._getOrReturnCtx(t);return xe(i,{code:ge.invalid_type,expected:Ce.date,received:i.parsedType}),Ne}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return xe(i,{code:ge.invalid_date}),Ne}const r=new bn;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ge.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),xe(o,{code:ge.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ze.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Hl({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ke.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ke.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Hl.create=e=>new Hl({checks:[],coerce:e?.coerce||!1,typeName:_e.ZodDate,...Ue(e)});class Ub extends Ke{_parse(t){if(this._getType(t)!==Ce.symbol){const r=this._getOrReturnCtx(t);return xe(r,{code:ge.invalid_type,expected:Ce.symbol,received:r.parsedType}),Ne}return In(t.data)}}Ub.create=e=>new Ub({typeName:_e.ZodSymbol,...Ue(e)});class Gb extends Ke{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:ge.invalid_type,expected:Ce.undefined,received:r.parsedType}),Ne}return In(t.data)}}Gb.create=e=>new Gb({typeName:_e.ZodUndefined,...Ue(e)});class Yb extends Ke{_parse(t){if(this._getType(t)!==Ce.null){const r=this._getOrReturnCtx(t);return xe(r,{code:ge.invalid_type,expected:Ce.null,received:r.parsedType}),Ne}return In(t.data)}}Yb.create=e=>new Yb({typeName:_e.ZodNull,...Ue(e)});class Kb extends Ke{constructor(){super(...arguments),this._any=!0}_parse(t){return In(t.data)}}Kb.create=e=>new Kb({typeName:_e.ZodAny,...Ue(e)});class Zb extends Ke{constructor(){super(...arguments),this._unknown=!0}_parse(t){return In(t.data)}}Zb.create=e=>new Zb({typeName:_e.ZodUnknown,...Ue(e)});class qr extends Ke{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:ge.invalid_type,expected:Ce.never,received:n.parsedType}),Ne}}qr.create=e=>new qr({typeName:_e.ZodNever,...Ue(e)});class Xb extends Ke{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:ge.invalid_type,expected:Ce.void,received:r.parsedType}),Ne}return In(t.data)}}Xb.create=e=>new Xb({typeName:_e.ZodVoid,...Ue(e)});class Jn extends Ke{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Ce.array)return xe(n,{code:ge.invalid_type,expected:Ce.array,received:n.parsedType}),Ne;if(o.exactLength!==null){const s=n.data.length>o.exactLength.value,a=n.data.length<o.exactLength.value;(s||a)&&(xe(n,{code:s?ge.too_big:ge.too_small,minimum:a?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(xe(n,{code:ge.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(xe(n,{code:ge.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>o.type._parseAsync(new Wr(n,s,n.path,a)))).then(s=>bn.mergeArray(r,s));const i=[...n.data].map((s,a)=>o.type._parseSync(new Wr(n,s,n.path,a)));return bn.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new Jn({...this._def,minLength:{value:t,message:ke.toString(n)}})}max(t,n){return new Jn({...this._def,maxLength:{value:t,message:ke.toString(n)}})}length(t,n){return new Jn({...this._def,exactLength:{value:t,message:ke.toString(n)}})}nonempty(t){return this.min(1,t)}}Jn.create=(e,t)=>new Jn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:_e.ZodArray,...Ue(t)});function qo(e){if(e instanceof Lt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Lr.create(qo(r))}return new Lt({...e._def,shape:()=>t})}else return e instanceof Jn?new Jn({...e._def,type:qo(e.element)}):e instanceof Lr?Lr.create(qo(e.unwrap())):e instanceof Ci?Ci.create(qo(e.unwrap())):e instanceof Co?Co.create(e.items.map(t=>qo(t))):e}class Lt extends Ke{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ze.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ce.object){const c=this._getOrReturnCtx(t);return xe(c,{code:ge.invalid_type,expected:Ce.object,received:c.parsedType}),Ne}const{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof qr&&this._def.unknownKeys==="strip"))for(const c in o.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=i[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Wr(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof qr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")a.length>0&&(xe(o,{code:ge.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Wr(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>bn.mergeObjectSync(r,c)):bn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return ke.errToObj,new Lt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const o=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:ke.errToObj(t).message??o}:{message:o}}}:{}})}strip(){return new Lt({...this._def,unknownKeys:"strip"})}passthrough(){return new Lt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Lt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Lt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:_e.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Lt({...this._def,catchall:t})}pick(t){const n={};for(const r of Ze.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Lt({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Ze.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Lt({...this._def,shape:()=>n})}deepPartial(){return qo(this)}partial(t){const n={};for(const r of Ze.objectKeys(this.shape)){const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}return new Lt({...this._def,shape:()=>n})}required(t){const n={};for(const r of Ze.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Lr;)i=i._def.innerType;n[r]=i}return new Lt({...this._def,shape:()=>n})}keyof(){return kC(Ze.objectKeys(this.shape))}}Lt.create=(e,t)=>new Lt({shape:()=>e,unknownKeys:"strip",catchall:qr.create(),typeName:_e.ZodObject,...Ue(t)});Lt.strictCreate=(e,t)=>new Lt({shape:()=>e,unknownKeys:"strict",catchall:qr.create(),typeName:_e.ZodObject,...Ue(t)});Lt.lazycreate=(e,t)=>new Lt({shape:e,unknownKeys:"strip",catchall:qr.create(),typeName:_e.ZodObject,...Ue(t)});class Wl extends Ke{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(a=>new vr(a.ctx.common.issues));return xe(n,{code:ge.invalid_union,unionErrors:s}),Ne}if(n.common.async)return Promise.all(r.map(async i=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(l=>new vr(l));return xe(n,{code:ge.invalid_union,unionErrors:a}),Ne}}get options(){return this._def.options}}Wl.create=(e,t)=>new Wl({options:e,typeName:_e.ZodUnion,...Ue(t)});function ap(e,t){const n=Pr(e),r=Pr(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const o=Ze.objectKeys(t),i=Ze.objectKeys(e).filter(a=>o.indexOf(a)!==-1),s={...e,...t};for(const a of i){const l=ap(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===Ce.array&&r===Ce.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const s=e[i],a=t[i],l=ap(s,a);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===Ce.date&&r===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ql extends Ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(Bb(i)||Bb(s))return Ne;const a=ap(i.value,s.value);return a.valid?((Hb(i)||Hb(s))&&n.dirty(),{status:n.value,value:a.data}):(xe(r,{code:ge.invalid_intersection_types}),Ne)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ql.create=(e,t,n)=>new ql({left:e,right:t,typeName:_e.ZodIntersection,...Ue(n)});class Co extends Ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.array)return xe(r,{code:ge.invalid_type,expected:Ce.array,received:r.parsedType}),Ne;if(r.data.length<this._def.items.length)return xe(r,{code:ge.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ne;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:ge.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new Wr(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>bn.mergeArray(n,s)):bn.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new Co({...this._def,rest:t})}}Co.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Co({items:e,typeName:_e.ZodTuple,rest:null,...Ue(t)})};class Qb extends Ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.map)return xe(r,{code:ge.invalid_type,expected:Ce.map,received:r.parsedType}),Ne;const o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:o._parse(new Wr(r,a,r.path,[c,"key"])),value:i._parse(new Wr(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Ne;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Ne;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}Qb.create=(e,t,n)=>new Qb({valueType:t,keyType:e,typeName:_e.ZodMap,...Ue(n)});class qs extends Ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.set)return xe(r,{code:ge.invalid_type,expected:Ce.set,received:r.parsedType}),Ne;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(xe(r,{code:ge.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(xe(r,{code:ge.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Ne;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>i._parse(new Wr(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new qs({...this._def,minSize:{value:t,message:ke.toString(n)}})}max(t,n){return new qs({...this._def,maxSize:{value:t,message:ke.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}qs.create=(e,t)=>new qs({valueType:e,minSize:null,maxSize:null,typeName:_e.ZodSet,...Ue(t)});class Jb extends Ke{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Jb.create=(e,t)=>new Jb({getter:e,typeName:_e.ZodLazy,...Ue(t)});class e0 extends Ke{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:ge.invalid_literal,expected:this._def.value}),Ne}return{status:"valid",value:t.data}}get value(){return this._def.value}}e0.create=(e,t)=>new e0({value:e,typeName:_e.ZodLiteral,...Ue(t)});function kC(e,t){return new Ti({values:e,typeName:_e.ZodEnum,...Ue(t)})}class Ti extends Ke{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:Ze.joinValues(r),received:n.parsedType,code:ge.invalid_type}),Ne}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{received:n.data,code:ge.invalid_enum_value,options:r}),Ne}return In(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Ti.create(t,{...this._def,...n})}exclude(t,n=this._def){return Ti.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Ti.create=kC;class t0 extends Ke{_parse(t){const n=Ze.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const o=Ze.objectValues(n);return xe(r,{expected:Ze.joinValues(o),received:r.parsedType,code:ge.invalid_type}),Ne}if(this._cache||(this._cache=new Set(Ze.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const o=Ze.objectValues(n);return xe(r,{received:r.data,code:ge.invalid_enum_value,options:o}),Ne}return In(t.data)}get enum(){return this._def.values}}t0.create=(e,t)=>new t0({values:e,typeName:_e.ZodNativeEnum,...Ue(t)});class Ul extends Ke{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return xe(n,{code:ge.invalid_type,expected:Ce.promise,received:n.parsedType}),Ne;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return In(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ul.create=(e,t)=>new Ul({type:e,typeName:_e.ZodPromise,...Ue(t)});class Ei extends Ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{xe(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const s=o.transform(r.data,i);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return Ne;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?Ne:l.status==="dirty"||n.value==="dirty"?rs(l.value):l});{if(n.value==="aborted")return Ne;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?Ne:a.status==="dirty"||n.value==="dirty"?rs(a.value):a}}if(o.type==="refinement"){const s=a=>{const l=o.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ne:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?Ne:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(o.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!wi(s))return Ne;const a=o.transform(s.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>wi(s)?Promise.resolve(o.transform(s.value,i)).then(a=>({status:n.value,value:a})):Ne);Ze.assertNever(o)}}Ei.create=(e,t,n)=>new Ei({schema:e,typeName:_e.ZodEffects,effect:t,...Ue(n)});Ei.createWithPreprocess=(e,t,n)=>new Ei({schema:t,effect:{type:"preprocess",transform:e},typeName:_e.ZodEffects,...Ue(n)});class Lr extends Ke{_parse(t){return this._getType(t)===Ce.undefined?In(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Lr.create=(e,t)=>new Lr({innerType:e,typeName:_e.ZodOptional,...Ue(t)});class Ci extends Ke{_parse(t){return this._getType(t)===Ce.null?In(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ci.create=(e,t)=>new Ci({innerType:e,typeName:_e.ZodNullable,...Ue(t)});class lp extends Ke{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ce.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}lp.create=(e,t)=>new lp({innerType:e,typeName:_e.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ue(t)});class cp extends Ke{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Bl(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new vr(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new vr(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}cp.create=(e,t)=>new cp({innerType:e,typeName:_e.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ue(t)});class n0 extends Ke{_parse(t){if(this._getType(t)!==Ce.nan){const r=this._getOrReturnCtx(t);return xe(r,{code:ge.invalid_type,expected:Ce.nan,received:r.parsedType}),Ne}return{status:"valid",value:t.data}}}n0.create=e=>new n0({typeName:_e.ZodNaN,...Ue(e)});class y9 extends Ke{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class hh extends Ke{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ne:i.status==="dirty"?(n.dirty(),rs(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ne:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new hh({in:t,out:n,typeName:_e.ZodPipeline})}}class up extends Ke{_parse(t){const n=this._def.innerType._parse(t),r=o=>(wi(o)&&(o.value=Object.freeze(o.value)),o);return Bl(n)?n.then(o=>r(o)):r(n)}unwrap(){return this._def.innerType}}up.create=(e,t)=>new up({innerType:e,typeName:_e.ZodReadonly,...Ue(t)});var _e;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(_e||(_e={}));qr.create;Jn.create;Wl.create;ql.create;Co.create;Ti.create;Ul.create;Lr.create;Ci.create;const v9=e=>{if(typeof e!="string")try{e=JSON.stringify(e)}catch{return!1}try{return JSON.parse(e),!0}catch{return!1}},x9=(e,t,n)=>{const r=t.length-1;for(let o=0;o<t.length;o++){const i=t[o];if(o===r)e[i]=n;else{if(!(i in e)||typeof e[i]!="object"){const s=t[o+1];e[i]=isNaN(Number(s))?{}:[]}e=e[i]}}},RC=e=>e.replace(/\[(\d+)]/g,".$1").split("."),un=(e,t,n)=>{const r=Array.isArray(t)?t.map(String):RC(t),o=structuredClone(e);return x9(o,r,n),o},b9=(e,t)=>e.localeCompare(t),Ho={},IC=e=>{const t=e._def.typeName;if(t==="ZodDefault")return e._def.defaultValue();if(t==="ZodObject")return AC(e);if(t==="ZodArray")return[];if("innerType"in e._def){const n=IC(e._def.innerType);return t==="ZodArray"?n??[]:n}},AC=e=>Object.fromEntries(Object.entries(e.shape).map(([t,n])=>[t,IC(n)])),PC=(e,t)=>{const n=structuredClone(e);for(const r in t){const o=t[r],i=e[r];o!==void 0&&(typeof o=="object"&&o!==null&&!Array.isArray(o)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?n[r]=PC(i,o):n[r]=o||i)}return n},w9={sort:b9,allowDots:!0,charset:"utf-8",parseArrays:!0,plainObjects:!0,charsetSentinel:!0,allowPrototypes:!1,depth:Number.MAX_SAFE_INTEGER,arrayLimit:Number.MAX_SAFE_INTEGER,parameterLimit:Number.MAX_SAFE_INTEGER},OC=e=>{const t=new FormData(e),n=new URLSearchParams(t);return q3.parse(n.toString(),w9)},Ir=(e,t)=>RC(e).reduce((n,r)=>{if(r==="")return n;const o=n.shape?.[r]||n;return o._def.typeName==="ZodArray"?o.element:o},t),Or=e=>e.dataset.value?e.dataset.value:e.type==="checkbox"?e.checked:e.type==="number"?e.valueAsNumber:e.value||e.getAttribute("value"),Gd=e=>{const t=e.dataset.target;if(!t)return Or(e);const n=document.querySelector(`[data-origin="${t}"]`);return Or(n||e)},S9={state:{},loading:!1,useOnChange:!1},r0=e=>e.dataset.target||e.name,T9=e=>{const t=`@use-form/${e}`;return{get:()=>{const n=ys.LocalStorage.get(t);return v9(n)?n:{}},clear:()=>{ys.LocalStorage.delete(t)},set:n=>ys.LocalStorage.set(t,n)}},E9=(e,t,n=S9)=>{const[r,o]=S.useState(null),i=S.useRef({}),[s,a]=S.useState(()=>Be.function(n?.state)?n.state():n?.state??AC(e)??{}),l=S.useCallback(b=>{const T=b.target,E=b.currentTarget;if(T.dataset.optional==="true")return;const w=r0(T),C=Gd(T)||(E?Or(E):""),I=Ir(w,e);if(T.setAttribute("data-initialized","true"),I){const P=I.safeParse(C),M=P.success?void 0:P.error.issues[0]?.message??"";o(j=>un(j??{},w,M))}},[e]),c=S.useCallback(b=>T=>{const E=T.currentTarget,R=Object.values(i.current).reduce((C,I)=>{const P=I.element,M=I.schema.safeParse(Or(P));if(P.dataset.ignore==="ignore"||M.success)return C;const j=M.error.issues[0]?.message;P.setAttribute("data-initialized","true");const L=P.dataset.name||P.name||"";return un(C,L,j)},{}),w=Be.empty(R)?null:R;o(w),console.error(w),b?.({form:E,errors:w||{}})},[]),u=(b,T=Ho)=>{const E=Ir(b,e),R=w=>{if(!Nl(w))return;a(I=>un(I,b,w.toISOString())),o(I=>un(I,b,void 0));const C=i.current[b].element;if(C){const I=C.getAttribute("data-origin"),P=document.querySelector(`input[data-target="${I}"]`);P&&P.setCustomValidity("")}T?.onChange?.(w)};return{...T,loading:n.loading,name:b,id:b,onChange:R,form:t,date:Be.string(s[b])?new Date(s[b]):s[b],required:T.required??!E.isOptional(),error:Bn(r,b),ref:w=>{w!==null&&(i.current[b]={element:w,schema:E})}}},d=(b,T=Ho)=>{const E=Ir(b,e);return{...T,name:b,id:b,onChange:w=>{const C=w.target.value;a(I=>un(I,b,C)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Bn(r,b,void 0),value:Bn(s,b,void 0)??"",required:T.required??!E.isOptional(),ref:w=>w!==null?i.current[b]={element:w,schema:E}:void 0}},f=(b,T=Ho)=>{const E=Ir(b,e);return{...T,name:b,id:b,onChange:w=>{const C=w.target.checked;a(I=>un(I??{},b,C)),T?.onChange?.(w)},form:t,loading:n.loading,onInvalid:l,error:Bn(r,b,void 0),required:T.required??!E.isOptional(),ref:w=>w!==null?void(i.current[b]={element:w,schema:E}):void 0}},m=(b,T=Ho)=>{const E=Ir(b,e),R=w=>{w.persist?.();const C=w.target.value;T?.onChange?.(w),a(I=>un(I,b,C))};return{...T,loading:n.loading,name:b,id:b,onChange:R,form:t,onInvalid:l,error:Bn(r,b,void 0),required:T.required??!E.isOptional(),value:Bn(s,b,void 0)||T?.value||"",type:Be.instance(E,Si)?"number":T?.type??"text",ref:w=>w===null?void 0:i.current[b]={element:w,schema:E}}},g=(b,T=Ho)=>{const E=Ir(b,e);return{...T,name:b,id:b,onChangeOptions:w=>{a(C=>un(C,b,w))},form:t,loading:n.loading,onInvalid:l,error:Bn(r,b,void 0),required:T.required??!E.isOptional(),value:Bn(s,b,void 0)||T?.value||[],ref:w=>w===null?void 0:void(i.current[b]={element:w,schema:E})}},y=(b,T=Ho)=>{const E=Ir(b,e),R=E._def.typeName==="ZodNumber";return{...T,name:b,id:b,onChange:C=>{C.persist?.();const I=R?C.target.valueAsNumber:C.target.value;T?.onChange?.(C),a(P=>un(P,b,I))},form:t,loading:n.loading,onInvalid:l,error:Bn(r,b,void 0),required:T.required??!E.isOptional(),type:R?"number":T?.type??"text",value:Bn(s,b,void 0)||T?.value||"",ref:C=>C===null?void 0:void(i.current[b]={element:C,schema:E})}};S.useEffect(()=>{const b=Object.values(i.current).map(E=>{const R=E.element.dataset.origin?document.querySelector(`[data-target="${E.element.name}"]`):E.element,w=E.schema.safeParse(Or(R)),C=j=>{const L=r0(j.target);if(!L)return!1;const O=j.target,N=Gd(j.target)||(j.relatedTarget?Or(j.relatedTarget):""),V=E.schema.safeParse(N);if(O.setAttribute("value",N),V.success)return R.setCustomValidity&&R.setCustomValidity(""),o(D=>{if(Be.null(D))return null;const k=un(D,L,void 0);return Be.empty(D)||Be.nil(D)||Be.empty(k)?null:k}),!1;if(R.required){const D=V.error.issues[0]?.message||"";R.setCustomValidity&&R.setCustomValidity(D),o(k=>{if(Be.null(k))return null;const F=un(k,L,D||void 0);return Be.empty(F)?null:F})}return!1},I=new AbortController,P=R.getAttribute("data-trigger")||"blur";R.addEventListener(P,C,{signal:I.signal});const M=R.dataset.shadow?!1:R.required?!w.success:!1;return{input:E,hasInitialError:M,unsubscribe:()=>I.abort()}});return b.some(E=>E.hasInitialError)&&o(E=>E===null?{}:E),()=>b.forEach(E=>E.unsubscribe())});const h=b=>T=>{T.preventDefault();const E=T.currentTarget;let R=OC(E);Array.from(t?document.querySelectorAll(`[form="${t}"]`):E.elements).forEach(M=>{if(M.tagName==="SELECT"){const j=M;R=un(R,j.name,j.value)}if(M.tagName==="INPUT"){const j=M,L=Gd(j)||(j?Or(j):"");R=un(R,j.dataset.target||j.name,L)}});const C=PC(R,s),I=e.safeParse(C),P=()=>{SC(E),n.interceptor?.clear()};if(I.success){const M=JSON.stringify(I.data);return E.setAttribute("data-json",M),n.interceptor?.clear(),b?.(T,{form:E,event:T,reset:P,setErrors:o,errors:[],success:!0,data:I.data,json:I.data})}return console.group("useForm error"),console.info(I),console.info(I.error.issues),console.error(I.error),console.groupEnd(),E.reportValidity(),b?.(T,{form:E,json:R,event:T,reset:P,setErrors:o,data:R,success:!1,errors:I.error.issues.map(M=>({message:M.message,path:M.path.map(j=>String(j))}))})},v=b=>Dp(s,b)||"",x=b=>({...b,id:t,name:t});return S.useEffect(()=>{n.interceptor&&n.interceptor?.set(s)},[s]),{get:v,input:y,state:s,errors:r,select:d,checkbox:f,onSubmit:h,setState:a,textarea:m,onInvalid:c,controller:x,datepicker:u,name:t,multiselect:g,disabled:r!==null}},C9=e=>e?JSON.parse(e.getAttribute("data-json")):{},k9=e=>{const t=S.useRef(void 0);return S.useEffect(()=>{t.current=e},[e]),t.current},jC={button:"0.55rem",pill:"2rem",card:"0.75rem",full:"9999px"},DC={base:"1rem",hairline:"0.0625rem",lg:"1.125rem",sm:"0.75rem",dialog:"20rem","field-height":"1.5rem","field-label":"0.875rem","input-height":"2.5rem","input-x":"0.5rem","input-y":"0.25rem","input-inline":"0.25rem","input-gap":"0.3rem"},MC={wizard:"50",normal:"1",navbar:"22",calendar:"2",overlay:"21",tooltip:"20",floating:"22"},R9={name:"dark",zIndex:MC,rounded:jC,spacing:DC,shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 15%, 20%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 25%, 20%, 0.1)"},colors:{foreground:"hsla(240, 5%, 96%)",background:"hsla(240, 10%, 8%)",border:"hsla(240, 4%, 16%)",disabled:"hsla(240, 4%, 16%)",muted:{DEFAULT:"hsla(240, 4%, 16%)",foreground:"hsla(240, 5%, 65%)",subtle:"hsla(240, 5%, 65%)",hover:"hsla(240, 4%, 20%)"},emphasis:{foreground:"hsla(199, 89%, 48%)",DEFAULT:"hsla(199, 89%, 10%)",subtle:"hsla(199, 89%, 15%)",hover:"hsla(199, 89%, 40%)"},primary:{foreground:"hsla(240, 6%, 10%)",DEFAULT:"hsla(201,49%,54%)",subtle:"hsla(201,49%,36%)",hover:"hsla(201,49%,22%)"},secondary:{DEFAULT:"hsla(240, 5%, 96%)",background:"hsla(240, 4%, 16%)",subtle:"hsla(240, 4%, 20%)",hover:"hsla(240, 4%, 25%)",foreground:"hsla(240, 5%, 96%)"},info:{DEFAULT:"hsla(199, 89%, 48%)",subtle:"hsla(199, 89%, 15%)",hover:"hsla(199, 89%, 40%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(199, 89%, 48%)"},danger:{DEFAULT:"hsla(0, 84%, 60%)",subtle:"hsla(0, 84%, 15%)",hover:"hsla(0, 84%, 50%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(0, 84%, 60%)"},warn:{DEFAULT:"hsla(38, 92%, 50%)",subtle:"hsla(38, 92%, 15%)",hover:"hsla(38, 92%, 45%)",foreground:"hsla(240, 10%, 4%)",notification:"hsla(38, 92%, 50%)"},success:{DEFAULT:"hsla(142, 71%, 45%)",subtle:"hsla(142, 71%, 15%)",hover:"hsla(142, 71%, 40%)",foreground:"hsla(240, 10%, 4%)",notification:"hsla(142, 71%, 45%)"},input:{border:"hsla(240, 4%, 16%)",placeholder:"hsla(240, 5%, 65%)","mask-error":"hsla(0, 84%, 20%)","switch-bg":"hsla(240, 4%, 16%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(0, 0%, 100%)"},card:{muted:"hsla(240, 4%, 10%)",border:"hsla(240, 4%, 11%)",background:"hsla(221, 16%, 9%)"},floating:{foreground:"hsla(240, 5%, 96%)",background:"hsla(240, 10%, 8%)",hover:"hsla(240, 4%, 16%)",border:"hsla(240, 4%, 16%)",overlay:"hsla(0, 0%, 0%)"},tooltip:{foreground:"hsla(240, 10%, 4%)",background:"hsla(0, 0%, 100%)",hover:"hsla(0, 0%, 100%)",border:"hsla(0, 0%, 100%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(240, 4%, 10%)",border:"hsla(240, 4%, 16%)",background:"hsla(240, 10%, 4%)"},button:{primary:{text:"hsla(221, 52%, 100%)",bg:"hsla(201,49%,42%)"},warn:{text:"hsla(240, 10%, 4%)",bg:"hsla(38, 92%, 50%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(199, 89%, 48%)"},success:{text:"hsla(240, 10%, 4%)",bg:"hsla(142, 71%, 45%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(0, 84%, 60%)"},muted:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)"},neutral:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)"},secondary:{text:"hsla(240, 10%, 4%)",bg:"hsla(0, 0%, 100%)"}},tag:{primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(240, 4%, 20%)"},warn:{text:"hsla(38, 92%, 70%)",bg:"hsla(38, 92%, 15%)"},info:{text:"hsla(199, 89%, 70%)",bg:"hsla(199, 89%, 15%)"},success:{text:"hsla(142, 71%, 70%)",bg:"hsla(142, 71%, 15%)"},danger:{text:"hsla(0, 84%, 70%)",bg:"hsla(0, 84%, 15%)"},neutral:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)"},secondary:{text:"hsla(240, 10%, 4%)",bg:"hsla(0, 0%, 100%)"},muted:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)"}},alert:{primary:{text:"hsla(199, 89%, 80%)",border:"hsla(199, 89%, 25%)",bg:"hsla(199, 89%, 12%)"},warn:{bg:"hsla(38, 92%, 12%)",border:"hsla(38, 92%, 25%)",text:"hsla(38, 92%, 80%)"},info:{text:"hsla(199, 89%, 80%)",bg:"hsla(199, 89%, 12%)",border:"hsla(199, 89%, 25%)"},success:{text:"hsla(142, 71%, 80%)",bg:"hsla(142, 71%, 12%)",border:"hsla(142, 71%, 25%)"},danger:{text:"hsla(0, 84%, 80%)",bg:"hsla(0, 84%, 12%)",border:"hsla(0, 84%, 25%)"},neutral:{text:"hsla(240, 5%, 96%)",bg:"hsla(240, 4%, 16%)",border:"hsla(240, 4%, 20%)"},secondary:{text:"hsla(240, 10%, 4%)",bg:"hsla(0, 0%, 100%)",border:"hsla(0, 0%, 100%)"},muted:{bg:"hsla(240, 4%, 16%)",border:"hsla(240, 4%, 20%)",text:"hsla(240, 5%, 96%)"}}}},I9={rounded:jC,spacing:DC,name:"light",shadow:{"shadow-notification":"1px 2px 2px 2px hsla(210, 25%, 40%, 0.15)","shadow-floating":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","shadow-card":"0px 1px 2px 1px hsla(210, 25%, 20%, 0.1)","shadow-table":"0px 1px 1px 1px hsla(210, 0%, 0%, 0.1)"},zIndex:MC,colors:{foreground:"hsla(221, 15%, 23%)",background:"hsla(0, 0%, 100%)",border:"hsla(240, 6%, 90%)",muted:{DEFAULT:"hsla(240, 5%, 96%)",foreground:"hsla(240, 4%, 46%)",subtle:"hsla(240, 4%, 46%)",hover:"hsla(240, 5%, 96%)"},disabled:"hsla(240, 5%, 96%)",emphasis:{foreground:"hsla(199, 89%, 48%)",DEFAULT:"hsla(199, 89%, 96%)",subtle:"hsla(199, 89%, 92%)",hover:"hsla(199, 89%, 40%)"},primary:{foreground:"hsla(240, 6%, 10%)",DEFAULT:"hsla(201,49%,54%)",subtle:"hsla(201,49%,36%)",hover:"hsla(201,49%,22%)"},secondary:{background:"hsla(240, 5%, 96%)",DEFAULT:"hsla(240, 6%, 10%)",subtle:"hsla(240, 5%, 96%)",hover:"hsla(240, 6%, 15%)",foreground:"hsla(0, 0%, 100%)"},info:{DEFAULT:"hsla(199, 89%, 48%)",subtle:"hsla(199, 89%, 96%)",hover:"hsla(199, 89%, 40%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(199, 89%, 48%)"},danger:{DEFAULT:"hsla(0, 84%, 60%)",subtle:"hsla(0, 84%, 96%)",hover:"hsla(0, 84%, 50%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(0, 84%, 60%)"},warn:{DEFAULT:"hsla(38, 92%, 50%)",subtle:"hsla(38, 92%, 96%)",hover:"hsla(38, 92%, 45%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(38, 92%, 50%)"},success:{DEFAULT:"hsla(142, 71%, 45%)",subtle:"hsla(142, 71%, 96%)",hover:"hsla(142, 71%, 40%)",foreground:"hsla(0, 0%, 100%)",notification:"hsla(142, 71%, 45%)"},input:{border:"hsla(240, 6%, 90%)",placeholder:"hsla(240, 4%, 46%)","mask-error":"hsla(0, 84%, 96%)","switch-bg":"hsla(240, 6%, 90%)",switch:"hsla(0, 0%, 100%)",slider:"hsla(199, 89%, 48%)"},card:{muted:"hsla(240, 5%, 96%)",border:"hsla(240, 6%, 90%)",background:"hsla(0, 0%, 100%)"},floating:{foreground:"hsla(240, 10%, 4%)",background:"hsla(0, 0%, 100%)",hover:"hsla(240, 5%, 96%)",border:"hsla(240, 6%, 90%)",overlay:"hsla(240, 10%, 4%)"},tooltip:{foreground:"hsla(0, 0%, 100%)",background:"hsla(240, 10%, 4%)",hover:"hsla(240, 10%, 4%)",border:"hsla(240, 10%, 4%)",overlay:"hsla(0, 0%, 0%)"},table:{header:"hsla(240, 5%, 96%)",background:"hsla(0, 0%, 100%)",border:"hsla(240, 6%, 90%)"},button:{muted:{bg:"hsla(240, 5%, 96%)",text:"hsla(240, 6%, 10%)"},primary:{text:"hsla(0, 0%, 100%)",bg:"hsla(201,49%,54%)"},warn:{bg:"hsla(38, 92%, 50%)",text:"hsla(0, 0%, 100%)"},info:{text:"hsla(0, 0%, 100%)",bg:"hsla(199, 89%, 48%)"},success:{text:"hsla(0, 0%, 100%)",bg:"hsla(142, 71%, 45%)"},danger:{text:"hsla(0, 0%, 100%)",bg:"hsla(0, 84%, 60%)"},neutral:{text:"hsla(240, 6%, 10%)",bg:"hsla(240, 5%, 96%)"},secondary:{text:"hsla(0, 0%, 100%)",bg:"hsla(240, 6%, 10%)"}},tag:{muted:{bg:"hsla(240, 5%, 96%)",text:"hsla(240, 4%, 46%)"},primary:{text:"hsla(199, 89%, 48%)",bg:"hsla(199, 89%, 96%)"},warn:{bg:"hsla(38, 92%, 96%)",text:"hsla(38, 92%, 40%)"},info:{text:"hsla(199, 89%, 40%)",bg:"hsla(199, 89%, 96%)"},success:{text:"hsla(142, 71%, 35%)",bg:"hsla(142, 71%, 96%)"},danger:{text:"hsla(0, 84%, 45%)",bg:"hsla(0, 84%, 96%)"},neutral:{text:"hsla(240, 6%, 10%)",bg:"hsla(240, 5%, 96%)"},secondary:{text:"hsla(0, 0%, 100%)",bg:"hsla(240, 6%, 10%)"}},alert:{muted:{bg:"hsla(240, 5%, 96%)",text:"hsla(240, 6%, 10%)",border:"hsla(240, 6%, 90%)"},primary:{text:"hsla(199, 89%, 40%)",border:"hsla(199, 89%, 90%)",bg:"hsla(199, 89%, 98%)"},warn:{bg:"hsla(38, 92%, 98%)",text:"hsla(38, 92%, 35%)",border:"hsla(38, 92%, 90%)"},info:{text:"hsla(199, 89%, 35%)",bg:"hsla(199, 89%, 98%)",border:"hsla(199, 89%, 90%)"},success:{text:"hsla(142, 71%, 30%)",bg:"hsla(142, 71%, 98%)",border:"hsla(142, 71%, 90%)"},danger:{text:"hsla(0, 84%, 40%)",bg:"hsla(0, 84%, 98%)",border:"hsla(0, 84%, 90%)"},neutral:{text:"hsla(240, 6%, 10%)",bg:"hsla(240, 5%, 96%)",border:"hsla(240, 6%, 90%)"},secondary:{text:"hsla(0, 0%, 100%)",bg:"hsla(240, 6%, 10%)",border:"hsla(240, 6%, 10%)"}}}},A9=R9,P9=I9,O9=e=>{const t=S.useMemo(()=>({locale:e.locale,floatingRef:e.rootFloating,tweaks:{...Jl,...e.tweaks},parser:e.parser||Xl.hsla,map:{...Ql,...e.map}}),[e]);return p.jsx(ko.Provider,{value:t,children:p.jsx(uE,{children:e.children})})};exports.Alert=b$;exports.AnimatedList=r$;exports.AnimatedListItem=o$;exports.Autocomplete=iW;exports.Button=Qt;exports.Calendar=th;exports.Card=Oc;exports.Checkbox=Ym;exports.ColType=ui;exports.Collapse=nE;exports.CommandPalette=mC;exports.Commander=mC;exports.ComponentsProvider=O9;exports.Context=ko;exports.DatePicker=AB;exports.Description=G$;exports.Dict=Dn;exports.Dropdown=Hi;exports.Empty=YT;exports.Expand=X$;exports.FileUpload=KH;exports.Form=fR;exports.Info=Y$;exports.Input=Ni;exports.InputFeedback=Dw;exports.InputField=Qs;exports.Loading=Z$;exports.Menu=j$;exports.MenuItem=O$;exports.Modal=ca;exports.ModalConfirmProvider=uE;exports.MultiSelect=fW;exports.Notifications=S3;exports.PageCalendar=$3;exports.PageHeader=K$;exports.PageTitle=dE;exports.Paragraph=U$;exports.Polymorph=mn;exports.Progress=TB;exports.Radiobox=D$;exports.RenderOnView=yW;exports.Select=bo;exports.Slider=Cj;exports.Spinner=fE;exports.Stats=w$;exports.StatsCard=t$;exports.Step=d$;exports.Steps=f$;exports.Switch=kj;exports.Tab=g$;exports.Table=e$;exports.Tabs=m$;exports.Tag=fi;exports.TaskList=q$;exports.Textarea=M$;exports.Timeline=EB;exports.TimelineItem=Dc;exports.Toolbar=CB;exports.Tooltip=Mp;exports.TransferList=hW;exports.Wizard=nz;exports.createColumns=TV;exports.createCssProperties=jI;exports.createDesignTokens=H0;exports.createFormStorage=T9;exports.createOptionCols=qm;exports.createStyles=AI;exports.createTheme=OI;exports.createTokenStyles=DI;exports.css=Ie;exports.defaultDarkTheme=A9;exports.defaultLightTheme=P9;exports.defaultTranslations=Ql;exports.defaultTweaks=Jl;exports.dispatchInput=P0;exports.formReset=SC;exports.formToJson=OC;exports.formatDay=da;exports.formatEventTime=ol;exports.formatFullDate=Hs;exports.formatHourLabel=Bs;exports.formatMonthShort=xC;exports.formatMonthYear=fh;exports.formatTime=bC;exports.formatWeekdayLong=yC;exports.formatWeekdayShort=vC;exports.getCoords=lR;exports.getHourSlots=dh;exports.getJsonForm=C9;exports.getModalScrollerRef=IV;exports.getMonthDays=gC;exports.getRemainingSize=ws;exports.getSchemaShape=Ir;exports.getWeekDays=uh;exports.getWeekNumber=wC;exports.groupEventsByDate=hC;exports.hasVerticalScroll=O0;exports.initializeInputDataset=Us;exports.isChildVisible=j0;exports.isMobile=jw;exports.isReactComponent=aR;exports.isReactFC=mp;exports.isSsr=$r;exports.mergeRefs=mr;exports.negate=QP;exports.noop=ri;exports.parsers=Xl;exports.path=Dp;exports.reduceTokens=Ar;exports.safeRegex=of;exports.splitInto=Ow;exports.toDateKey=Nr;exports.useColorParser=XT;exports.useConfirm=L$;exports.useForm=E9;exports.useLocale=Zr;exports.useNotification=v3;exports.usePrevious=k9;exports.useReactive=eE;exports.useStableRef=Br;exports.useStepContext=JT;exports.useSwipe=AE;exports.useTablePreferences=kV;exports.useTranslations=yt;exports.uuid=Mi;
28
+ //# sourceMappingURL=index.js.map