starry-slides 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/LICENSE +10 -0
  2. package/README.md +131 -0
  3. package/dist/assets/index---ub3Dty.css +1 -0
  4. package/dist/assets/index-7Xs_Dyp0.js +354 -0
  5. package/dist/assets/index-8ul7coaw.js +451 -0
  6. package/dist/assets/index-B4_bJa9t.js +412 -0
  7. package/dist/assets/index-B9p6L9Wx.js +324 -0
  8. package/dist/assets/index-BF-Vi1Nh.js +413 -0
  9. package/dist/assets/index-BKvVbgXz.css +1 -0
  10. package/dist/assets/index-BNZJ_Wz-.js +417 -0
  11. package/dist/assets/index-BO2gtiKn.js +413 -0
  12. package/dist/assets/index-BYpD8kgo.js +456 -0
  13. package/dist/assets/index-BaZRfz_9.css +1 -0
  14. package/dist/assets/index-BlsWm4PI.js +412 -0
  15. package/dist/assets/index-BnUIBFtw.js +393 -0
  16. package/dist/assets/index-BvhCbfCi.js +412 -0
  17. package/dist/assets/index-BxEkxfy1.js +412 -0
  18. package/dist/assets/index-BzrA7O0L.js +422 -0
  19. package/dist/assets/index-C0xGkdRg.js +413 -0
  20. package/dist/assets/index-C1Rjncf1.js +456 -0
  21. package/dist/assets/index-CCgb2gqc.js +413 -0
  22. package/dist/assets/index-CDFJQRFx.js +413 -0
  23. package/dist/assets/index-CEOai0RW.js +456 -0
  24. package/dist/assets/index-CG2uWTey.css +1 -0
  25. package/dist/assets/index-CLe3_iTu.js +412 -0
  26. package/dist/assets/index-CS_optob.js +324 -0
  27. package/dist/assets/index-CXgwXOZH.css +1 -0
  28. package/dist/assets/index-CcBvAcE2.js +408 -0
  29. package/dist/assets/index-CllmR_MT.js +408 -0
  30. package/dist/assets/index-CnMy6wxq.js +412 -0
  31. package/dist/assets/index-CoWNjYgb.js +422 -0
  32. package/dist/assets/index-CtfA3BPy.css +1 -0
  33. package/dist/assets/index-D-JiuJIv.js +324 -0
  34. package/dist/assets/index-D2uEYXyQ.css +1 -0
  35. package/dist/assets/index-D70beOHW.js +456 -0
  36. package/dist/assets/index-D8xuxnF1.js +456 -0
  37. package/dist/assets/index-DKAtkRd8.css +1 -0
  38. package/dist/assets/index-DU3l9_k0.css +1 -0
  39. package/dist/assets/index-DaLY98jk.js +456 -0
  40. package/dist/assets/index-DkNHJHQl.js +412 -0
  41. package/dist/assets/index-DmFnifK8.js +456 -0
  42. package/dist/assets/index-DndZR7Ds.css +1 -0
  43. package/dist/assets/index-DuRa7Y6g.js +324 -0
  44. package/dist/assets/index-EnDjTeHF.js +451 -0
  45. package/dist/assets/index-J3nQgjqJ.js +451 -0
  46. package/dist/assets/index-wD_iWTBn.js +413 -0
  47. package/dist/chunk-AK5J4CXH.js +1671 -0
  48. package/dist/chunk-ARFDESSF.js +1583 -0
  49. package/dist/chunk-DHWTBXGS.js +985 -0
  50. package/dist/chunk-FCRRFL7N.js +1571 -0
  51. package/dist/chunk-J7W4Y7WJ.js +1620 -0
  52. package/dist/chunk-OCJULB7Z.js +1140 -0
  53. package/dist/chunk-WCJWV5SO.js +36 -0
  54. package/dist/cli/index.d.ts +2 -0
  55. package/dist/cli/index.js +1119 -0
  56. package/dist/cli/index.test.d.ts +1 -0
  57. package/dist/core/deck-slide-operations.d.ts +5 -0
  58. package/dist/core/generated-deck.d.ts +8 -0
  59. package/dist/core/generated-deck.test.d.ts +1 -0
  60. package/dist/core/group-operations.d.ts +24 -0
  61. package/dist/core/history.d.ts +20 -0
  62. package/dist/core/history.test.d.ts +1 -0
  63. package/dist/core/html-export.d.ts +20 -0
  64. package/dist/core/index.d.ts +11 -0
  65. package/dist/core/layout.d.ts +36 -0
  66. package/dist/core/layout.test.d.ts +1 -0
  67. package/dist/core/pdf-export.d.ts +20 -0
  68. package/dist/core/presentation.d.ts +7 -0
  69. package/dist/core/slide-contract.d.ts +41 -0
  70. package/dist/core/slide-document.d.ts +5 -0
  71. package/dist/core/slide-document.test.d.ts +1 -0
  72. package/dist/core/slide-html-document.d.ts +3 -0
  73. package/dist/core/slide-operation-reducer.d.ts +4 -0
  74. package/dist/core/slide-operation-reducer.test.d.ts +1 -0
  75. package/dist/core/slide-operation-types.d.ts +123 -0
  76. package/dist/core/slide-operations-helpers.d.ts +14 -0
  77. package/dist/core/slide-operations.d.ts +5 -0
  78. package/dist/core/slide-operations.test.d.ts +1 -0
  79. package/dist/core/verify-deck.d.ts +48 -0
  80. package/dist/core/verify-deck.test.d.ts +1 -0
  81. package/dist/editor/app/App.d.ts +2 -0
  82. package/dist/editor/app/main.d.ts +1 -0
  83. package/dist/editor/app/use-slides-data.d.ts +14 -0
  84. package/dist/editor/components/block-manipulation-overlay.d.ts +32 -0
  85. package/dist/editor/components/color-picker.d.ts +10 -0
  86. package/dist/editor/components/context-menu.d.ts +26 -0
  87. package/dist/editor/components/editor-header.d.ts +18 -0
  88. package/dist/editor/components/floating-toolbar-feature.d.ts +8 -0
  89. package/dist/editor/components/floating-toolbar-parts.d.ts +46 -0
  90. package/dist/editor/components/floating-toolbar.d.ts +27 -0
  91. package/dist/editor/components/presenter-view.d.ts +13 -0
  92. package/dist/editor/components/slide-sidebar.d.ts +18 -0
  93. package/dist/editor/components/stage-canvas.d.ts +77 -0
  94. package/dist/editor/components/ui/accordion.d.ts +7 -0
  95. package/dist/editor/components/ui/button.d.ts +10 -0
  96. package/dist/editor/components/ui/context-menu.d.ts +25 -0
  97. package/dist/editor/components/ui/dialog.d.ts +10 -0
  98. package/dist/editor/components/ui/input.d.ts +3 -0
  99. package/dist/editor/components/ui/popover.d.ts +10 -0
  100. package/dist/editor/components/ui/scroll-area.d.ts +5 -0
  101. package/dist/editor/components/ui/select.d.ts +15 -0
  102. package/dist/editor/components/ui/separator.d.ts +4 -0
  103. package/dist/editor/components/ui/tabs.d.ts +11 -0
  104. package/dist/editor/components/ui/textarea.d.ts +3 -0
  105. package/dist/editor/components/ui/toggle-group.d.ts +9 -0
  106. package/dist/editor/components/ui/toggle.d.ts +9 -0
  107. package/dist/editor/components/ui/tooltip.d.ts +7 -0
  108. package/dist/editor/editor-operations.d.ts +15 -0
  109. package/dist/editor/hooks/block-manipulation-geometry.d.ts +16 -0
  110. package/dist/editor/hooks/block-manipulation-operations.d.ts +10 -0
  111. package/dist/editor/hooks/block-manipulation-overlay.d.ts +11 -0
  112. package/dist/editor/hooks/block-manipulation-types.d.ts +73 -0
  113. package/dist/editor/hooks/editor-keyboard-geometry.d.ts +22 -0
  114. package/dist/editor/hooks/editor-keyboard-operations.d.ts +10 -0
  115. package/dist/editor/hooks/editor-keyboard-types.d.ts +35 -0
  116. package/dist/editor/hooks/iframe-editing-session.d.ts +10 -0
  117. package/dist/editor/hooks/iframe-text-editing-dom.d.ts +6 -0
  118. package/dist/editor/hooks/iframe-text-editing-types.d.ts +38 -0
  119. package/dist/editor/hooks/object-clipboard-commands.d.ts +28 -0
  120. package/dist/editor/hooks/use-block-manipulation.d.ts +3 -0
  121. package/dist/editor/hooks/use-editor-keyboard-shortcuts.d.ts +3 -0
  122. package/dist/editor/hooks/use-iframe-text-editing.d.ts +3 -0
  123. package/dist/editor/hooks/use-slide-history.d.ts +17 -0
  124. package/dist/editor/hooks/use-slide-inspector.d.ts +24 -0
  125. package/dist/editor/hooks/use-slide-thumbnails.d.ts +2 -0
  126. package/dist/editor/hooks/use-stage-viewport.d.ts +13 -0
  127. package/dist/editor/index.d.ts +13 -0
  128. package/dist/editor/index.js +8260 -0
  129. package/dist/editor/lib/block-snap-constants.d.ts +8 -0
  130. package/dist/editor/lib/block-snap-guides.d.ts +6 -0
  131. package/dist/editor/lib/block-snap-targets.d.ts +13 -0
  132. package/dist/editor/lib/block-snap-types.d.ts +30 -0
  133. package/dist/editor/lib/block-snapping.d.ts +17 -0
  134. package/dist/editor/lib/collect-css-properties.d.ts +5 -0
  135. package/dist/editor/lib/element-tool-commit.d.ts +18 -0
  136. package/dist/editor/lib/element-tool-model.d.ts +16 -0
  137. package/dist/editor/lib/element-tool-types.d.ts +35 -0
  138. package/dist/editor/lib/element-tool-values.d.ts +23 -0
  139. package/dist/editor/lib/motion.d.ts +8 -0
  140. package/dist/editor/lib/selection-overlay.d.ts +4 -0
  141. package/dist/editor/lib/style-controls.d.ts +17 -0
  142. package/dist/editor/lib/thumbnail-renderer.d.ts +2 -0
  143. package/dist/editor/lib/utils.d.ts +3 -0
  144. package/dist/index.html +13 -0
  145. package/dist/node/deck-runtime-middleware.d.ts +8 -0
  146. package/dist/node/deck-source.d.ts +1 -0
  147. package/dist/node/html-export.d.ts +16 -0
  148. package/dist/node/open-browser.d.ts +1 -0
  149. package/dist/node/pdf-export.d.ts +20 -0
  150. package/dist/node/ports.d.ts +1 -0
  151. package/dist/node/view-renderer.d.ts +31 -0
  152. package/dist/runtime/deck-source.d.ts +1 -0
  153. package/dist/runtime/html-export.d.ts +16 -0
  154. package/dist/runtime/open-browser.d.ts +1 -0
  155. package/dist/runtime/pdf-export.d.ts +20 -0
  156. package/dist/runtime/ports.d.ts +1 -0
  157. package/dist/runtime/view-renderer.d.ts +31 -0
  158. package/dist/runtime/view-renderer.test.d.ts +1 -0
  159. package/dist/test/deck-fixtures.d.ts +14 -0
  160. package/package.json +94 -0
@@ -0,0 +1,456 @@
1
+ function j2(n,a){for(var r=0;r<a.length;r++){const i=a[r];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in n)){const u=Object.getOwnPropertyDescriptor(i,s);u&&Object.defineProperty(n,s,u.get?u:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function r(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(s){if(s.ep)return;s.ep=!0;const u=r(s);fetch(s.href,u)}})();function yh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var nf={exports:{}},Jl={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var qy;function z2(){if(qy)return Jl;qy=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function r(i,s,u){var f=null;if(u!==void 0&&(f=""+u),s.key!==void 0&&(f=""+s.key),"key"in s){u={};for(var h in s)h!=="key"&&(u[h]=s[h])}else u=s;return s=u.ref,{$$typeof:n,type:i,key:f,ref:s!==void 0?s:null,props:u}}return Jl.Fragment=a,Jl.jsx=r,Jl.jsxs=r,Jl}var Xy;function k2(){return Xy||(Xy=1,nf.exports=z2()),nf.exports}var p=k2(),of={exports:{}},Le={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Fy;function L2(){if(Fy)return Le;Fy=1;var n=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.iterator;function A(_){return _===null||typeof _!="object"?null:(_=S&&_[S]||_["@@iterator"],typeof _=="function"?_:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,M={};function R(_,U,H){this.props=_,this.context=U,this.refs=M,this.updater=H||C}R.prototype.isReactComponent={},R.prototype.setState=function(_,U){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,U,"setState")},R.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function j(){}j.prototype=R.prototype;function B(_,U,H){this.props=_,this.context=U,this.refs=M,this.updater=H||C}var Y=B.prototype=new j;Y.constructor=B,E(Y,R.prototype),Y.isPureReactComponent=!0;var te=Array.isArray;function $(){}var q={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function W(_,U,H){var P=H.ref;return{$$typeof:n,type:_,key:U,ref:P!==void 0?P:null,props:H}}function ie(_,U){return W(_.type,U,_.props)}function de(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function K(_){var U={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(H){return U[H]})}var ae=/\/+/g;function fe(_,U){return typeof _=="object"&&_!==null&&_.key!=null?K(""+_.key):U.toString(36)}function pe(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then($,$):(_.status="pending",_.then(function(U){_.status==="pending"&&(_.status="fulfilled",_.value=U)},function(U){_.status==="pending"&&(_.status="rejected",_.reason=U)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function T(_,U,H,P,X){var J=typeof _;(J==="undefined"||J==="boolean")&&(_=null);var ne=!1;if(_===null)ne=!0;else switch(J){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(_.$$typeof){case n:case a:ne=!0;break;case x:return ne=_._init,T(ne(_._payload),U,H,P,X)}}if(ne)return X=X(_),ne=P===""?"."+fe(_,0):P,te(X)?(H="",ne!=null&&(H=ne.replace(ae,"$&/")+"/"),T(X,U,H,"",function(ye){return ye})):X!=null&&(de(X)&&(X=ie(X,H+(X.key==null||_&&_.key===X.key?"":(""+X.key).replace(ae,"$&/")+"/")+ne)),U.push(X)),1;ne=0;var V=P===""?".":P+":";if(te(_))for(var re=0;re<_.length;re++)P=_[re],J=V+fe(P,re),ne+=T(P,U,H,J,X);else if(re=A(_),typeof re=="function")for(_=re.call(_),re=0;!(P=_.next()).done;)P=P.value,J=V+fe(P,re++),ne+=T(P,U,H,J,X);else if(J==="object"){if(typeof _.then=="function")return T(pe(_),U,H,P,X);throw U=String(_),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return ne}function O(_,U,H){if(_==null)return _;var P=[],X=0;return T(_,P,"","",function(J){return U.call(H,J,X++)}),P}function N(_){if(_._status===-1){var U=_._result;U=U(),U.then(function(H){(_._status===0||_._status===-1)&&(_._status=1,_._result=H)},function(H){(_._status===0||_._status===-1)&&(_._status=2,_._result=H)}),_._status===-1&&(_._status=0,_._result=U)}if(_._status===1)return _._result.default;throw _._result}var L=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},D={map:O,forEach:function(_,U,H){O(_,function(){U.apply(this,arguments)},H)},count:function(_){var U=0;return O(_,function(){U++}),U},toArray:function(_){return O(_,function(U){return U})||[]},only:function(_){if(!de(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return Le.Activity=y,Le.Children=D,Le.Component=R,Le.Fragment=r,Le.Profiler=s,Le.PureComponent=B,Le.StrictMode=i,Le.Suspense=m,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,Le.__COMPILER_RUNTIME={__proto__:null,c:function(_){return q.H.useMemoCache(_)}},Le.cache=function(_){return function(){return _.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(_,U,H){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var P=E({},_.props),X=_.key;if(U!=null)for(J in U.key!==void 0&&(X=""+U.key),U)!z.call(U,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&U.ref===void 0||(P[J]=U[J]);var J=arguments.length-2;if(J===1)P.children=H;else if(1<J){for(var ne=Array(J),V=0;V<J;V++)ne[V]=arguments[V+2];P.children=ne}return W(_.type,X,P)},Le.createContext=function(_){return _={$$typeof:f,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:u,_context:_},_},Le.createElement=function(_,U,H){var P,X={},J=null;if(U!=null)for(P in U.key!==void 0&&(J=""+U.key),U)z.call(U,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(X[P]=U[P]);var ne=arguments.length-2;if(ne===1)X.children=H;else if(1<ne){for(var V=Array(ne),re=0;re<ne;re++)V[re]=arguments[re+2];X.children=V}if(_&&_.defaultProps)for(P in ne=_.defaultProps,ne)X[P]===void 0&&(X[P]=ne[P]);return W(_,J,X)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(_){return{$$typeof:h,render:_}},Le.isValidElement=de,Le.lazy=function(_){return{$$typeof:x,_payload:{_status:-1,_result:_},_init:N}},Le.memo=function(_,U){return{$$typeof:g,type:_,compare:U===void 0?null:U}},Le.startTransition=function(_){var U=q.T,H={};q.T=H;try{var P=_(),X=q.S;X!==null&&X(H,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then($,L)}catch(J){L(J)}finally{U!==null&&H.types!==null&&(U.types=H.types),q.T=U}},Le.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},Le.use=function(_){return q.H.use(_)},Le.useActionState=function(_,U,H){return q.H.useActionState(_,U,H)},Le.useCallback=function(_,U){return q.H.useCallback(_,U)},Le.useContext=function(_){return q.H.useContext(_)},Le.useDebugValue=function(){},Le.useDeferredValue=function(_,U){return q.H.useDeferredValue(_,U)},Le.useEffect=function(_,U){return q.H.useEffect(_,U)},Le.useEffectEvent=function(_){return q.H.useEffectEvent(_)},Le.useId=function(){return q.H.useId()},Le.useImperativeHandle=function(_,U,H){return q.H.useImperativeHandle(_,U,H)},Le.useInsertionEffect=function(_,U){return q.H.useInsertionEffect(_,U)},Le.useLayoutEffect=function(_,U){return q.H.useLayoutEffect(_,U)},Le.useMemo=function(_,U){return q.H.useMemo(_,U)},Le.useOptimistic=function(_,U){return q.H.useOptimistic(_,U)},Le.useReducer=function(_,U,H){return q.H.useReducer(_,U,H)},Le.useRef=function(_){return q.H.useRef(_)},Le.useState=function(_){return q.H.useState(_)},Le.useSyncExternalStore=function(_,U,H){return q.H.useSyncExternalStore(_,U,H)},Le.useTransition=function(){return q.H.useTransition()},Le.version="19.2.5",Le}var Ky;function vh(){return Ky||(Ky=1,of.exports=L2()),of.exports}var v=vh();const he=yh(v),Av=j2({__proto__:null,default:he},[v]);var af={exports:{}},ei={},rf={exports:{}},lf={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Qy;function H2(){return Qy||(Qy=1,(function(n){function a(T,O){var N=T.length;T.push(O);e:for(;0<N;){var L=N-1>>>1,D=T[L];if(0<s(D,O))T[L]=O,T[N]=D,N=L;else break e}}function r(T){return T.length===0?null:T[0]}function i(T){if(T.length===0)return null;var O=T[0],N=T.pop();if(N!==O){T[0]=N;e:for(var L=0,D=T.length,_=D>>>1;L<_;){var U=2*(L+1)-1,H=T[U],P=U+1,X=T[P];if(0>s(H,N))P<D&&0>s(X,H)?(T[L]=X,T[P]=N,L=P):(T[L]=H,T[U]=N,L=U);else if(P<D&&0>s(X,N))T[L]=X,T[P]=N,L=P;else break e}}return O}function s(T,O){var N=T.sortIndex-O.sortIndex;return N!==0?N:T.id-O.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var m=[],g=[],x=1,y=null,S=3,A=!1,C=!1,E=!1,M=!1,R=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function Y(T){for(var O=r(g);O!==null;){if(O.callback===null)i(g);else if(O.startTime<=T)i(g),O.sortIndex=O.expirationTime,a(m,O);else break;O=r(g)}}function te(T){if(E=!1,Y(T),!C)if(r(m)!==null)C=!0,$||($=!0,K());else{var O=r(g);O!==null&&pe(te,O.startTime-T)}}var $=!1,q=-1,z=5,W=-1;function ie(){return M?!0:!(n.unstable_now()-W<z)}function de(){if(M=!1,$){var T=n.unstable_now();W=T;var O=!0;try{e:{C=!1,E&&(E=!1,j(q),q=-1),A=!0;var N=S;try{t:{for(Y(T),y=r(m);y!==null&&!(y.expirationTime>T&&ie());){var L=y.callback;if(typeof L=="function"){y.callback=null,S=y.priorityLevel;var D=L(y.expirationTime<=T);if(T=n.unstable_now(),typeof D=="function"){y.callback=D,Y(T),O=!0;break t}y===r(m)&&i(m),Y(T)}else i(m);y=r(m)}if(y!==null)O=!0;else{var _=r(g);_!==null&&pe(te,_.startTime-T),O=!1}}break e}finally{y=null,S=N,A=!1}O=void 0}}finally{O?K():$=!1}}}var K;if(typeof B=="function")K=function(){B(de)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,fe=ae.port2;ae.port1.onmessage=de,K=function(){fe.postMessage(null)}}else K=function(){R(de,0)};function pe(T,O){q=R(function(){T(n.unstable_now())},O)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(T){T.callback=null},n.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<T?Math.floor(1e3/T):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(T){switch(S){case 1:case 2:case 3:var O=3;break;default:O=S}var N=S;S=O;try{return T()}finally{S=N}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(T,O){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var N=S;S=T;try{return O()}finally{S=N}},n.unstable_scheduleCallback=function(T,O,N){var L=n.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?L+N:L):N=L,T){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=N+D,T={id:x++,callback:O,priorityLevel:T,startTime:N,expirationTime:D,sortIndex:-1},N>L?(T.sortIndex=N,a(g,T),r(m)===null&&T===r(g)&&(E?(j(q),q=-1):E=!0,pe(te,N-L))):(T.sortIndex=D,a(m,T),C||A||(C=!0,$||($=!0,K()))),T},n.unstable_shouldYield=ie,n.unstable_wrapCallback=function(T){var O=S;return function(){var N=S;S=O;try{return T.apply(this,arguments)}finally{S=N}}}})(lf)),lf}var Zy;function B2(){return Zy||(Zy=1,rf.exports=H2()),rf.exports}var sf={exports:{}},en={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Wy;function U2(){if(Wy)return en;Wy=1;var n=vh();function a(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var i={d:{f:r,r:function(){throw Error(a(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(m,g,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:m,containerInfo:g,implementation:x}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return en.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,en.createPortal=function(m,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(a(299));return u(m,g,null,x)},en.flushSync=function(m){var g=f.T,x=i.p;try{if(f.T=null,i.p=2,m)return m()}finally{f.T=g,i.p=x,i.d.f()}},en.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(m,g))},en.prefetchDNS=function(m){typeof m=="string"&&i.d.D(m)},en.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var x=g.as,y=h(x,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,A=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?i.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:S,fetchPriority:A}):x==="script"&&i.d.X(m,{crossOrigin:y,integrity:S,fetchPriority:A,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},en.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=h(g.as,g.crossOrigin);i.d.M(m,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(m)},en.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,y=h(x,g.crossOrigin);i.d.L(m,x,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},en.preloadModule=function(m,g){if(typeof m=="string")if(g){var x=h(g.as,g.crossOrigin);i.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(m)},en.requestFormReset=function(m){i.d.r(m)},en.unstable_batchedUpdates=function(m,g){return m(g)},en.useFormState=function(m,g,x){return f.H.useFormState(m,g,x)},en.useFormStatus=function(){return f.H.useHostTransitionStatus()},en.version="19.2.5",en}var Jy;function Mv(){if(Jy)return sf.exports;Jy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),sf.exports=U2(),sf.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var e0;function I2(){if(e0)return ei;e0=1;var n=B2(),a=vh(),r=Mv();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)t+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,o=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(o=t.return),e=t.return;while(e)}return t.tag===3?o:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(u(e)!==e)throw Error(i(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var o=e,l=t;;){var c=o.return;if(c===null)break;var d=c.alternate;if(d===null){if(l=c.return,l!==null){o=l;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===o)return m(c),e;if(d===l)return m(c),t;d=d.sibling}throw Error(i(188))}if(o.return!==l.return)o=c,l=d;else{for(var b=!1,w=c.child;w;){if(w===o){b=!0,o=c,l=d;break}if(w===l){b=!0,l=c,o=d;break}w=w.sibling}if(!b){for(w=d.child;w;){if(w===o){b=!0,o=d,l=c;break}if(w===l){b=!0,l=d,o=c;break}w=w.sibling}if(!b)throw Error(i(189))}}if(o.alternate!==l)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var y=Object.assign,S=Symbol.for("react.element"),A=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),B=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),de=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=de&&e[de]||e["@@iterator"],typeof e=="function"?e:null)}var ae=Symbol.for("react.client.reference");function fe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case R:return"Profiler";case M:return"StrictMode";case te:return"Suspense";case $:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case B:return e.displayName||"Context";case j:return(e._context.displayName||"Context")+".Consumer";case Y:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q:return t=e.displayName||null,t!==null?t:fe(e.type)||"Memo";case z:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,T=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N={pending:!1,data:null,method:null,action:null},L=[],D=-1;function _(e){return{current:e}}function U(e){0>D||(e.current=L[D],L[D]=null,D--)}function H(e,t){D++,L[D]=e.current,e.current=t}var P=_(null),X=_(null),J=_(null),ne=_(null);function V(e,t){switch(H(J,t),H(X,e),H(P,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?py(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=py(t),e=gy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(P),H(P,e)}function re(){U(P),U(X),U(J)}function ye(e){e.memoizedState!==null&&H(ne,e);var t=P.current,o=gy(t,e.type);t!==o&&(H(X,e),H(P,o))}function Se(e){X.current===e&&(U(P),U(X)),ne.current===e&&(U(ne),Kl._currentValue=N)}var ve,De;function ke(e){if(ve===void 0)try{throw Error()}catch(o){var t=o.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||"",De=-1<o.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+ve+e+De}var _e=!1;function lt(e,t){if(!e||_e)return"";_e=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(oe){var Z=oe}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(oe){Z=oe}e.call(ue.prototype)}}else{try{throw Error()}catch(oe){Z=oe}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(oe){if(oe&&Z&&typeof oe.stack=="string")return[oe.stack,Z.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=l.DetermineComponentFrameRoot(),b=d[0],w=d[1];if(b&&w){var k=b.split(`
44
+ `),Q=w.split(`
45
+ `);for(c=l=0;l<k.length&&!k[l].includes("DetermineComponentFrameRoot");)l++;for(;c<Q.length&&!Q[c].includes("DetermineComponentFrameRoot");)c++;if(l===k.length||c===Q.length)for(l=k.length-1,c=Q.length-1;1<=l&&0<=c&&k[l]!==Q[c];)c--;for(;1<=l&&0<=c;l--,c--)if(k[l]!==Q[c]){if(l!==1||c!==1)do if(l--,c--,0>c||k[l]!==Q[c]){var le=`
46
+ `+k[l].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=l&&0<=c);break}}}finally{_e=!1,Error.prepareStackTrace=o}return(o=e?e.displayName||e.name:"")?ke(o):""}function ft(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke("Lazy");case 13:return e.child!==t&&t!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return lt(e.type,!1);case 11:return lt(e.type.render,!1);case 1:return lt(e.type,!0);case 31:return ke("Activity");default:return""}}function xt(e){try{var t="",o=null;do t+=ft(e,o),o=e,e=e.return;while(e);return t}catch(l){return`
47
+ Error generating stack: `+l.message+`
48
+ `+l.stack}}var ot=Object.prototype.hasOwnProperty,Sn=n.unstable_scheduleCallback,wn=n.unstable_cancelCallback,Tt=n.unstable_shouldYield,on=n.unstable_requestPaint,St=n.unstable_now,Yo=n.unstable_getCurrentPriorityLevel,je=n.unstable_ImmediatePriority,Je=n.unstable_UserBlockingPriority,Ne=n.unstable_NormalPriority,an=n.unstable_LowPriority,Gt=n.unstable_IdlePriority,vo=n.log,un=n.unstable_setDisableYieldValue,rn=null,Lt=null;function Ht(e){if(typeof vo=="function"&&un(e),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(rn,e)}catch{}}var ut=Math.clz32?Math.clz32:It,Vo=Math.log,ao=Math.LN2;function It(e){return e>>>=0,e===0?32:31-(Vo(e)/ao|0)|0}var kn=256,Kn=262144,ln=4194304;function Qt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ze(e,t,o){var l=e.pendingLanes;if(l===0)return 0;var c=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var w=l&134217727;return w!==0?(l=w&~d,l!==0?c=Qt(l):(b&=w,b!==0?c=Qt(b):o||(o=w&~e,o!==0&&(c=Qt(o))))):(w=l&~d,w!==0?c=Qt(w):b!==0?c=Qt(b):o||(o=l&~e,o!==0&&(c=Qt(o)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,o=t&-t,d>=o||d===32&&(o&4194048)!==0)?t:c}function ht(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Rt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Pt(){var e=ln;return ln<<=1,(ln&62914560)===0&&(ln=4194304),e}function ro(e){for(var t=[],o=0;31>o;o++)t.push(e);return t}function mt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Zt(e,t,o,l,c,d){var b=e.pendingLanes;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=o,e.entangledLanes&=o,e.errorRecoveryDisabledLanes&=o,e.shellSuspendCounter=0;var w=e.entanglements,k=e.expirationTimes,Q=e.hiddenUpdates;for(o=b&~o;0<o;){var le=31-ut(o),ue=1<<le;w[le]=0,k[le]=-1;var Z=Q[le];if(Z!==null)for(Q[le]=null,le=0;le<Z.length;le++){var oe=Z[le];oe!==null&&(oe.lane&=-536870913)}o&=~ue}l!==0&&bo(e,l,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~t))}function bo(e,t,o){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-ut(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|o&261930}function Wt(e,t){var o=e.entangledLanes|=t;for(e=e.entanglements;o;){var l=31-ut(o),c=1<<l;c&t|e[l]&t&&(e[l]|=t),o&=~c}}function Jt(e,t){var o=t&-t;return o=(o&42)!==0?1:ee(o),(o&(e.suspendedLanes|t))!==0?0:o}function ee(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ce(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function me(){var e=O.p;return e!==0?e:(e=window.event,e===void 0?32:Uy(e.type))}function ge(e,t){var o=O.p;try{return O.p=e,t()}finally{O.p=o}}var Ue=Math.random().toString(36).slice(2),Oe="__reactFiber$"+Ue,Pe="__reactProps$"+Ue,Qe="__reactContainer$"+Ue,et="__reactEvents$"+Ue,dn="__reactListeners$"+Ue,pt="__reactHandles$"+Ue,sn="__reactResources$"+Ue,Yt="__reactMarker$"+Ue;function At(e){delete e[Oe],delete e[Pe],delete e[et],delete e[dn],delete e[pt]}function fn(e){var t=e[Oe];if(t)return t;for(var o=e.parentNode;o;){if(t=o[Qe]||o[Oe]){if(o=t.alternate,t.child!==null||o!==null&&o.child!==null)for(e=Ey(e);e!==null;){if(o=e[Oe])return o;e=Ey(e)}return t}e=o,o=e.parentNode}return null}function gt(e){if(e=e[Oe]||e[Qe]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function En(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Cn(e){var t=e[sn];return t||(t=e[sn]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ot(e){e[Yt]=!0}var ul=new Set,dl={};function Ln(e,t){qo(e,t),qo(e+"Capture",t)}function qo(e,t){for(dl[e]=t,e=0;e<t.length;e++)ul.add(t[e])}var CS=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),rm={},lm={};function TS(e){return ot.call(lm,e)?!0:ot.call(rm,e)?!1:CS.test(e)?lm[e]=!0:(rm[e]=!0,!1)}function Ai(e,t,o){if(TS(t))if(o===null)e.removeAttribute(t);else{switch(typeof o){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+o)}}function Mi(e,t,o){if(o===null)e.removeAttribute(t);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+o)}}function xo(e,t,o,l){if(l===null)e.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(o);return}e.setAttributeNS(t,o,""+l)}}function Hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function im(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function AS(e,t,o){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var c=l.get,d=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(b){o=""+b,d.call(this,b)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return o},setValue:function(b){o=""+b},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Kc(e){if(!e._valueTracker){var t=im(e)?"checked":"value";e._valueTracker=AS(e,t,""+e[t])}}function sm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var o=t.getValue(),l="";return e&&(l=im(e)?e.checked?"true":"false":e.value),e=l,e!==o?(t.setValue(e),!0):!1}function _i(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var MS=/[\n"\\]/g;function Bn(e){return e.replace(MS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Qc(e,t,o,l,c,d,b,w){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),t!=null?b==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Hn(t)):e.value!==""+Hn(t)&&(e.value=""+Hn(t)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),t!=null?Zc(e,b,Hn(t)):o!=null?Zc(e,b,Hn(o)):l!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+Hn(w):e.removeAttribute("name")}function cm(e,t,o,l,c,d,b,w){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||o!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){Kc(e);return}o=o!=null?""+Hn(o):"",t=t!=null?""+Hn(t):o,w||t===e.value||(e.value=t),e.defaultValue=t}l=l??c,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=w?e.checked:!!l,e.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),Kc(e)}function Zc(e,t,o){t==="number"&&_i(e.ownerDocument)===e||e.defaultValue===""+o||(e.defaultValue=""+o)}function cr(e,t,o,l){if(e=e.options,t){t={};for(var c=0;c<o.length;c++)t["$"+o[c]]=!0;for(o=0;o<e.length;o++)c=t.hasOwnProperty("$"+e[o].value),e[o].selected!==c&&(e[o].selected=c),c&&l&&(e[o].defaultSelected=!0)}else{for(o=""+Hn(o),t=null,c=0;c<e.length;c++){if(e[c].value===o){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function um(e,t,o){if(t!=null&&(t=""+Hn(t),t!==e.value&&(e.value=t),o==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=o!=null?""+Hn(o):""}function dm(e,t,o,l){if(t==null){if(l!=null){if(o!=null)throw Error(i(92));if(pe(l)){if(1<l.length)throw Error(i(93));l=l[0]}o=l}o==null&&(o=""),t=o}o=Hn(t),e.defaultValue=o,l=e.textContent,l===o&&l!==""&&l!==null&&(e.value=l),Kc(e)}function ur(e,t){if(t){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=t;return}}e.textContent=t}var _S=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function fm(e,t,o){var l=t.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,o):typeof o!="number"||o===0||_S.has(t)?t==="float"?e.cssFloat=o:e[t]=(""+o).trim():e[t]=o+"px"}function hm(e,t,o){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,o!=null){for(var l in o)!o.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var c in t)l=t[c],t.hasOwnProperty(c)&&o[c]!==l&&fm(e,c,l)}else for(var d in t)t.hasOwnProperty(d)&&fm(e,d,t[d])}function Wc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var NS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),RS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ni(e){return RS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function So(){}var Jc=null;function eu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var dr=null,fr=null;function mm(e){var t=gt(e);if(t&&(e=t.stateNode)){var o=e[Pe]||null;e:switch(e=t.stateNode,t.type){case"input":if(Qc(e,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),t=o.name,o.type==="radio"&&t!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Bn(""+t)+'"][type="radio"]'),t=0;t<o.length;t++){var l=o[t];if(l!==e&&l.form===e.form){var c=l[Pe]||null;if(!c)throw Error(i(90));Qc(l,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<o.length;t++)l=o[t],l.form===e.form&&sm(l)}break e;case"textarea":um(e,o.value,o.defaultValue);break e;case"select":t=o.value,t!=null&&cr(e,!!o.multiple,t,!1)}}}var tu=!1;function pm(e,t,o){if(tu)return e(t,o);tu=!0;try{var l=e(t);return l}finally{if(tu=!1,(dr!==null||fr!==null)&&(gs(),dr&&(t=dr,e=fr,fr=dr=null,mm(t),e)))for(t=0;t<e.length;t++)mm(e[t])}}function fl(e,t){var o=e.stateNode;if(o===null)return null;var l=o[Pe]||null;if(l===null)return null;o=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(i(231,t,typeof o));return o}var wo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nu=!1;if(wo)try{var hl={};Object.defineProperty(hl,"passive",{get:function(){nu=!0}}),window.addEventListener("test",hl,hl),window.removeEventListener("test",hl,hl)}catch{nu=!1}var Xo=null,ou=null,Ri=null;function gm(){if(Ri)return Ri;var e,t=ou,o=t.length,l,c="value"in Xo?Xo.value:Xo.textContent,d=c.length;for(e=0;e<o&&t[e]===c[e];e++);var b=o-e;for(l=1;l<=b&&t[o-l]===c[d-l];l++);return Ri=c.slice(e,1<l?1-l:void 0)}function Oi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Di(){return!0}function ym(){return!1}function hn(e){function t(o,l,c,d,b){this._reactName=o,this._targetInst=c,this.type=l,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(o=e[w],this[w]=o?o(d):d[w]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Di:ym,this.isPropagationStopped=ym,this}return y(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Di)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Di)},persist:function(){},isPersistent:Di}),t}var Ha={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ji=hn(Ha),ml=y({},Ha,{view:0,detail:0}),OS=hn(ml),au,ru,pl,zi=y({},ml,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:iu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==pl&&(pl&&e.type==="mousemove"?(au=e.screenX-pl.screenX,ru=e.screenY-pl.screenY):ru=au=0,pl=e),au)},movementY:function(e){return"movementY"in e?e.movementY:ru}}),vm=hn(zi),DS=y({},zi,{dataTransfer:0}),jS=hn(DS),zS=y({},ml,{relatedTarget:0}),lu=hn(zS),kS=y({},Ha,{animationName:0,elapsedTime:0,pseudoElement:0}),LS=hn(kS),HS=y({},Ha,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),BS=hn(HS),US=y({},Ha,{data:0}),bm=hn(US),IS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},$S={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function GS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$S[e])?!!t[e]:!1}function iu(){return GS}var YS=y({},ml,{key:function(e){if(e.key){var t=IS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Oi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?PS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:iu,charCode:function(e){return e.type==="keypress"?Oi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Oi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),VS=hn(YS),qS=y({},zi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xm=hn(qS),XS=y({},ml,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:iu}),FS=hn(XS),KS=y({},Ha,{propertyName:0,elapsedTime:0,pseudoElement:0}),QS=hn(KS),ZS=y({},zi,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),WS=hn(ZS),JS=y({},Ha,{newState:0,oldState:0}),ew=hn(JS),tw=[9,13,27,32],su=wo&&"CompositionEvent"in window,gl=null;wo&&"documentMode"in document&&(gl=document.documentMode);var nw=wo&&"TextEvent"in window&&!gl,Sm=wo&&(!su||gl&&8<gl&&11>=gl),wm=" ",Em=!1;function Cm(e,t){switch(e){case"keyup":return tw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hr=!1;function ow(e,t){switch(e){case"compositionend":return Tm(t);case"keypress":return t.which!==32?null:(Em=!0,wm);case"textInput":return e=t.data,e===wm&&Em?null:e;default:return null}}function aw(e,t){if(hr)return e==="compositionend"||!su&&Cm(e,t)?(e=gm(),Ri=ou=Xo=null,hr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Sm&&t.locale!=="ko"?null:t.data;default:return null}}var rw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Am(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rw[e.type]:t==="textarea"}function Mm(e,t,o,l){dr?fr?fr.push(l):fr=[l]:dr=l,t=Es(t,"onChange"),0<t.length&&(o=new ji("onChange","change",null,o,l),e.push({event:o,listeners:t}))}var yl=null,vl=null;function lw(e){cy(e,0)}function ki(e){var t=En(e);if(sm(t))return e}function _m(e,t){if(e==="change")return t}var Nm=!1;if(wo){var cu;if(wo){var uu="oninput"in document;if(!uu){var Rm=document.createElement("div");Rm.setAttribute("oninput","return;"),uu=typeof Rm.oninput=="function"}cu=uu}else cu=!1;Nm=cu&&(!document.documentMode||9<document.documentMode)}function Om(){yl&&(yl.detachEvent("onpropertychange",Dm),vl=yl=null)}function Dm(e){if(e.propertyName==="value"&&ki(vl)){var t=[];Mm(t,vl,e,eu(e)),pm(lw,t)}}function iw(e,t,o){e==="focusin"?(Om(),yl=t,vl=o,yl.attachEvent("onpropertychange",Dm)):e==="focusout"&&Om()}function sw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ki(vl)}function cw(e,t){if(e==="click")return ki(t)}function uw(e,t){if(e==="input"||e==="change")return ki(t)}function dw(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:dw;function bl(e,t){if(Tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var o=Object.keys(e),l=Object.keys(t);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var c=o[l];if(!ot.call(t,c)||!Tn(e[c],t[c]))return!1}return!0}function jm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zm(e,t){var o=jm(e);e=0;for(var l;o;){if(o.nodeType===3){if(l=e+o.textContent.length,e<=t&&l>=t)return{node:o,offset:t-e};e=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=jm(o)}}function km(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?km(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=_i(e.document);t instanceof e.HTMLIFrameElement;){try{var o=typeof t.contentWindow.location.href=="string"}catch{o=!1}if(o)e=t.contentWindow;else break;t=_i(e.document)}return t}function du(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var fw=wo&&"documentMode"in document&&11>=document.documentMode,mr=null,fu=null,xl=null,hu=!1;function Hm(e,t,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;hu||mr==null||mr!==_i(l)||(l=mr,"selectionStart"in l&&du(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),xl&&bl(xl,l)||(xl=l,l=Es(fu,"onSelect"),0<l.length&&(t=new ji("onSelect","select",null,t,o),e.push({event:t,listeners:l}),t.target=mr)))}function Ba(e,t){var o={};return o[e.toLowerCase()]=t.toLowerCase(),o["Webkit"+e]="webkit"+t,o["Moz"+e]="moz"+t,o}var pr={animationend:Ba("Animation","AnimationEnd"),animationiteration:Ba("Animation","AnimationIteration"),animationstart:Ba("Animation","AnimationStart"),transitionrun:Ba("Transition","TransitionRun"),transitionstart:Ba("Transition","TransitionStart"),transitioncancel:Ba("Transition","TransitionCancel"),transitionend:Ba("Transition","TransitionEnd")},mu={},Bm={};wo&&(Bm=document.createElement("div").style,"AnimationEvent"in window||(delete pr.animationend.animation,delete pr.animationiteration.animation,delete pr.animationstart.animation),"TransitionEvent"in window||delete pr.transitionend.transition);function Ua(e){if(mu[e])return mu[e];if(!pr[e])return e;var t=pr[e],o;for(o in t)if(t.hasOwnProperty(o)&&o in Bm)return mu[e]=t[o];return e}var Um=Ua("animationend"),Im=Ua("animationiteration"),Pm=Ua("animationstart"),hw=Ua("transitionrun"),mw=Ua("transitionstart"),pw=Ua("transitioncancel"),$m=Ua("transitionend"),Gm=new Map,pu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");pu.push("scrollEnd");function Qn(e,t){Gm.set(e,t),Ln(t,[e])}var Li=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Un=[],gr=0,gu=0;function Hi(){for(var e=gr,t=gu=gr=0;t<e;){var o=Un[t];Un[t++]=null;var l=Un[t];Un[t++]=null;var c=Un[t];Un[t++]=null;var d=Un[t];if(Un[t++]=null,l!==null&&c!==null){var b=l.pending;b===null?c.next=c:(c.next=b.next,b.next=c),l.pending=c}d!==0&&Ym(o,c,d)}}function Bi(e,t,o,l){Un[gr++]=e,Un[gr++]=t,Un[gr++]=o,Un[gr++]=l,gu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function yu(e,t,o,l){return Bi(e,t,o,l),Ui(e)}function Ia(e,t){return Bi(e,null,null,t),Ui(e)}function Ym(e,t,o){e.lanes|=o;var l=e.alternate;l!==null&&(l.lanes|=o);for(var c=!1,d=e.return;d!==null;)d.childLanes|=o,l=d.alternate,l!==null&&(l.childLanes|=o),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-ut(o),e=d.hiddenUpdates,l=e[c],l===null?e[c]=[t]:l.push(t),t.lane=o|536870912),d):null}function Ui(e){if(50<$l)throw $l=0,Ad=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yr={};function gw(e,t,o,l){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function An(e,t,o,l){return new gw(e,t,o,l)}function vu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Eo(e,t){var o=e.alternate;return o===null?(o=An(e.tag,t,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=t,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&65011712,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,t=e.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o.refCleanup=e.refCleanup,o}function Vm(e,t){e.flags&=65011714;var o=e.alternate;return o===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=o.childLanes,e.lanes=o.lanes,e.child=o.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=o.memoizedProps,e.memoizedState=o.memoizedState,e.updateQueue=o.updateQueue,e.type=o.type,t=o.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ii(e,t,o,l,c,d){var b=0;if(l=e,typeof e=="function")vu(e)&&(b=1);else if(typeof e=="string")b=S2(e,o,P.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=An(31,o,t,c),e.elementType=W,e.lanes=d,e;case E:return Pa(o.children,c,d,t);case M:b=8,c|=24;break;case R:return e=An(12,o,t,c|2),e.elementType=R,e.lanes=d,e;case te:return e=An(13,o,t,c),e.elementType=te,e.lanes=d,e;case $:return e=An(19,o,t,c),e.elementType=$,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:b=10;break e;case j:b=9;break e;case Y:b=11;break e;case q:b=14;break e;case z:b=16,l=null;break e}b=29,o=Error(i(130,e===null?"null":typeof e,"")),l=null}return t=An(b,o,t,c),t.elementType=e,t.type=l,t.lanes=d,t}function Pa(e,t,o,l){return e=An(7,e,l,t),e.lanes=o,e}function bu(e,t,o){return e=An(6,e,null,t),e.lanes=o,e}function qm(e){var t=An(18,null,null,0);return t.stateNode=e,t}function xu(e,t,o){return t=An(4,e.children!==null?e.children:[],e.key,t),t.lanes=o,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Xm=new WeakMap;function In(e,t){if(typeof e=="object"&&e!==null){var o=Xm.get(e);return o!==void 0?o:(t={value:e,source:t,stack:xt(t)},Xm.set(e,t),t)}return{value:e,source:t,stack:xt(t)}}var vr=[],br=0,Pi=null,Sl=0,Pn=[],$n=0,Fo=null,lo=1,io="";function Co(e,t){vr[br++]=Sl,vr[br++]=Pi,Pi=e,Sl=t}function Fm(e,t,o){Pn[$n++]=lo,Pn[$n++]=io,Pn[$n++]=Fo,Fo=e;var l=lo;e=io;var c=32-ut(l)-1;l&=~(1<<c),o+=1;var d=32-ut(t)+c;if(30<d){var b=c-c%5;d=(l&(1<<b)-1).toString(32),l>>=b,c-=b,lo=1<<32-ut(t)+c|o<<c|l,io=d+e}else lo=1<<d|o<<c|l,io=e}function Su(e){e.return!==null&&(Co(e,1),Fm(e,1,0))}function wu(e){for(;e===Pi;)Pi=vr[--br],vr[br]=null,Sl=vr[--br],vr[br]=null;for(;e===Fo;)Fo=Pn[--$n],Pn[$n]=null,io=Pn[--$n],Pn[$n]=null,lo=Pn[--$n],Pn[$n]=null}function Km(e,t){Pn[$n++]=lo,Pn[$n++]=io,Pn[$n++]=Fo,lo=t.id,io=t.overflow,Fo=e}var Vt=null,yt=null,Fe=!1,Ko=null,Gn=!1,Eu=Error(i(519));function Qo(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wl(In(t,e)),Eu}function Qm(e){var t=e.stateNode,o=e.type,l=e.memoizedProps;switch(t[Oe]=e,t[Pe]=l,o){case"dialog":Ve("cancel",t),Ve("close",t);break;case"iframe":case"object":case"embed":Ve("load",t);break;case"video":case"audio":for(o=0;o<Yl.length;o++)Ve(Yl[o],t);break;case"source":Ve("error",t);break;case"img":case"image":case"link":Ve("error",t),Ve("load",t);break;case"details":Ve("toggle",t);break;case"input":Ve("invalid",t),cm(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ve("invalid",t);break;case"textarea":Ve("invalid",t),dm(t,l.value,l.defaultValue,l.children)}o=l.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||t.textContent===""+o||l.suppressHydrationWarning===!0||hy(t.textContent,o)?(l.popover!=null&&(Ve("beforetoggle",t),Ve("toggle",t)),l.onScroll!=null&&Ve("scroll",t),l.onScrollEnd!=null&&Ve("scrollend",t),l.onClick!=null&&(t.onclick=So),t=!0):t=!1,t||Qo(e,!0)}function Zm(e){for(Vt=e.return;Vt;)switch(Vt.tag){case 5:case 31:case 13:Gn=!1;return;case 27:case 3:Gn=!0;return;default:Vt=Vt.return}}function xr(e){if(e!==Vt)return!1;if(!Fe)return Zm(e),Fe=!0,!1;var t=e.tag,o;if((o=t!==3&&t!==27)&&((o=t===5)&&(o=e.type,o=!(o!=="form"&&o!=="button")||Pd(e.type,e.memoizedProps)),o=!o),o&&yt&&Qo(e),Zm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));yt=wy(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));yt=wy(e)}else t===27?(t=yt,ua(e.type)?(e=qd,qd=null,yt=e):yt=t):yt=Vt?Vn(e.stateNode.nextSibling):null;return!0}function $a(){yt=Vt=null,Fe=!1}function Cu(){var e=Ko;return e!==null&&(yn===null?yn=e:yn.push.apply(yn,e),Ko=null),e}function wl(e){Ko===null?Ko=[e]:Ko.push(e)}var Tu=_(null),Ga=null,To=null;function Zo(e,t,o){H(Tu,t._currentValue),t._currentValue=o}function Ao(e){e._currentValue=Tu.current,U(Tu)}function Au(e,t,o){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===o)break;e=e.return}}function Mu(e,t,o,l){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var b=c.child;d=d.firstContext;e:for(;d!==null;){var w=d;d=c;for(var k=0;k<t.length;k++)if(w.context===t[k]){d.lanes|=o,w=d.alternate,w!==null&&(w.lanes|=o),Au(d.return,o,e),l||(b=null);break e}d=w.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(i(341));b.lanes|=o,d=b.alternate,d!==null&&(d.lanes|=o),Au(b,o,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function Sr(e,t,o,l){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(i(387));if(b=b.memoizedProps,b!==null){var w=c.type;Tn(c.pendingProps.value,b.value)||(e!==null?e.push(w):e=[w])}}else if(c===ne.current){if(b=c.alternate,b===null)throw Error(i(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Kl):e=[Kl])}c=c.return}e!==null&&Mu(t,e,o,l),t.flags|=262144}function $i(e){for(e=e.firstContext;e!==null;){if(!Tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ya(e){Ga=e,To=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return Wm(Ga,e)}function Gi(e,t){return Ga===null&&Ya(e),Wm(e,t)}function Wm(e,t){var o=t._currentValue;if(t={context:t,memoizedValue:o,next:null},To===null){if(e===null)throw Error(i(308));To=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else To=To.next=t;return o}var yw=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(o,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(o){return o()})}},vw=n.unstable_scheduleCallback,bw=n.unstable_NormalPriority,Dt={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _u(){return{controller:new yw,data:new Map,refCount:0}}function El(e){e.refCount--,e.refCount===0&&vw(bw,function(){e.controller.abort()})}var Cl=null,Nu=0,wr=0,Er=null;function xw(e,t){if(Cl===null){var o=Cl=[];Nu=0,wr=Dd(),Er={status:"pending",value:void 0,then:function(l){o.push(l)}}}return Nu++,t.then(Jm,Jm),t}function Jm(){if(--Nu===0&&Cl!==null){Er!==null&&(Er.status="fulfilled");var e=Cl;Cl=null,wr=0,Er=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Sw(e,t){var o=[],l={status:"pending",value:null,reason:null,then:function(c){o.push(c)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var c=0;c<o.length;c++)(0,o[c])(t)},function(c){for(l.status="rejected",l.reason=c,c=0;c<o.length;c++)(0,o[c])(void 0)}),l}var ep=T.S;T.S=function(e,t){Hg=St(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&xw(e,t),ep!==null&&ep(e,t)};var Va=_(null);function Ru(){var e=Va.current;return e!==null?e:dt.pooledCache}function Yi(e,t){t===null?H(Va,Va.current):H(Va,t.pool)}function tp(){var e=Ru();return e===null?null:{parent:Dt._currentValue,pool:e}}var Cr=Error(i(460)),Ou=Error(i(474)),Vi=Error(i(542)),qi={then:function(){}};function np(e){return e=e.status,e==="fulfilled"||e==="rejected"}function op(e,t,o){switch(o=e[o],o===void 0?e.push(t):o!==t&&(t.then(So,So),t=o),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rp(e),e;default:if(typeof t.status=="string")t.then(So,So);else{if(e=dt,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=l}},function(l){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rp(e),e}throw Xa=t,Cr}}function qa(e){try{var t=e._init;return t(e._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Xa=o,Cr):o}}var Xa=null;function ap(){if(Xa===null)throw Error(i(459));var e=Xa;return Xa=null,e}function rp(e){if(e===Cr||e===Vi)throw Error(i(483))}var Tr=null,Tl=0;function Xi(e){var t=Tl;return Tl+=1,Tr===null&&(Tr=[]),op(Tr,e,t)}function Al(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Fi(e,t){throw t.$$typeof===S?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function lp(e){function t(G,I){if(e){var F=G.deletions;F===null?(G.deletions=[I],G.flags|=16):F.push(I)}}function o(G,I){if(!e)return null;for(;I!==null;)t(G,I),I=I.sibling;return null}function l(G){for(var I=new Map;G!==null;)G.key!==null?I.set(G.key,G):I.set(G.index,G),G=G.sibling;return I}function c(G,I){return G=Eo(G,I),G.index=0,G.sibling=null,G}function d(G,I,F){return G.index=F,e?(F=G.alternate,F!==null?(F=F.index,F<I?(G.flags|=67108866,I):F):(G.flags|=67108866,I)):(G.flags|=1048576,I)}function b(G){return e&&G.alternate===null&&(G.flags|=67108866),G}function w(G,I,F,se){return I===null||I.tag!==6?(I=bu(F,G.mode,se),I.return=G,I):(I=c(I,F),I.return=G,I)}function k(G,I,F,se){var Ae=F.type;return Ae===E?le(G,I,F.props.children,se,F.key):I!==null&&(I.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===z&&qa(Ae)===I.type)?(I=c(I,F.props),Al(I,F),I.return=G,I):(I=Ii(F.type,F.key,F.props,null,G.mode,se),Al(I,F),I.return=G,I)}function Q(G,I,F,se){return I===null||I.tag!==4||I.stateNode.containerInfo!==F.containerInfo||I.stateNode.implementation!==F.implementation?(I=xu(F,G.mode,se),I.return=G,I):(I=c(I,F.children||[]),I.return=G,I)}function le(G,I,F,se,Ae){return I===null||I.tag!==7?(I=Pa(F,G.mode,se,Ae),I.return=G,I):(I=c(I,F),I.return=G,I)}function ue(G,I,F){if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return I=bu(""+I,G.mode,F),I.return=G,I;if(typeof I=="object"&&I!==null){switch(I.$$typeof){case A:return F=Ii(I.type,I.key,I.props,null,G.mode,F),Al(F,I),F.return=G,F;case C:return I=xu(I,G.mode,F),I.return=G,I;case z:return I=qa(I),ue(G,I,F)}if(pe(I)||K(I))return I=Pa(I,G.mode,F,null),I.return=G,I;if(typeof I.then=="function")return ue(G,Xi(I),F);if(I.$$typeof===B)return ue(G,Gi(G,I),F);Fi(G,I)}return null}function Z(G,I,F,se){var Ae=I!==null?I.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return Ae!==null?null:w(G,I,""+F,se);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case A:return F.key===Ae?k(G,I,F,se):null;case C:return F.key===Ae?Q(G,I,F,se):null;case z:return F=qa(F),Z(G,I,F,se)}if(pe(F)||K(F))return Ae!==null?null:le(G,I,F,se,null);if(typeof F.then=="function")return Z(G,I,Xi(F),se);if(F.$$typeof===B)return Z(G,I,Gi(G,F),se);Fi(G,F)}return null}function oe(G,I,F,se,Ae){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return G=G.get(F)||null,w(I,G,""+se,Ae);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case A:return G=G.get(se.key===null?F:se.key)||null,k(I,G,se,Ae);case C:return G=G.get(se.key===null?F:se.key)||null,Q(I,G,se,Ae);case z:return se=qa(se),oe(G,I,F,se,Ae)}if(pe(se)||K(se))return G=G.get(F)||null,le(I,G,se,Ae,null);if(typeof se.then=="function")return oe(G,I,F,Xi(se),Ae);if(se.$$typeof===B)return oe(G,I,F,Gi(I,se),Ae);Fi(I,se)}return null}function we(G,I,F,se){for(var Ae=null,Ze=null,Te=I,Ie=I=0,Xe=null;Te!==null&&Ie<F.length;Ie++){Te.index>Ie?(Xe=Te,Te=null):Xe=Te.sibling;var We=Z(G,Te,F[Ie],se);if(We===null){Te===null&&(Te=Xe);break}e&&Te&&We.alternate===null&&t(G,Te),I=d(We,I,Ie),Ze===null?Ae=We:Ze.sibling=We,Ze=We,Te=Xe}if(Ie===F.length)return o(G,Te),Fe&&Co(G,Ie),Ae;if(Te===null){for(;Ie<F.length;Ie++)Te=ue(G,F[Ie],se),Te!==null&&(I=d(Te,I,Ie),Ze===null?Ae=Te:Ze.sibling=Te,Ze=Te);return Fe&&Co(G,Ie),Ae}for(Te=l(Te);Ie<F.length;Ie++)Xe=oe(Te,G,Ie,F[Ie],se),Xe!==null&&(e&&Xe.alternate!==null&&Te.delete(Xe.key===null?Ie:Xe.key),I=d(Xe,I,Ie),Ze===null?Ae=Xe:Ze.sibling=Xe,Ze=Xe);return e&&Te.forEach(function(pa){return t(G,pa)}),Fe&&Co(G,Ie),Ae}function Re(G,I,F,se){if(F==null)throw Error(i(151));for(var Ae=null,Ze=null,Te=I,Ie=I=0,Xe=null,We=F.next();Te!==null&&!We.done;Ie++,We=F.next()){Te.index>Ie?(Xe=Te,Te=null):Xe=Te.sibling;var pa=Z(G,Te,We.value,se);if(pa===null){Te===null&&(Te=Xe);break}e&&Te&&pa.alternate===null&&t(G,Te),I=d(pa,I,Ie),Ze===null?Ae=pa:Ze.sibling=pa,Ze=pa,Te=Xe}if(We.done)return o(G,Te),Fe&&Co(G,Ie),Ae;if(Te===null){for(;!We.done;Ie++,We=F.next())We=ue(G,We.value,se),We!==null&&(I=d(We,I,Ie),Ze===null?Ae=We:Ze.sibling=We,Ze=We);return Fe&&Co(G,Ie),Ae}for(Te=l(Te);!We.done;Ie++,We=F.next())We=oe(Te,G,Ie,We.value,se),We!==null&&(e&&We.alternate!==null&&Te.delete(We.key===null?Ie:We.key),I=d(We,I,Ie),Ze===null?Ae=We:Ze.sibling=We,Ze=We);return e&&Te.forEach(function(D2){return t(G,D2)}),Fe&&Co(G,Ie),Ae}function ct(G,I,F,se){if(typeof F=="object"&&F!==null&&F.type===E&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case A:e:{for(var Ae=F.key;I!==null;){if(I.key===Ae){if(Ae=F.type,Ae===E){if(I.tag===7){o(G,I.sibling),se=c(I,F.props.children),se.return=G,G=se;break e}}else if(I.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===z&&qa(Ae)===I.type){o(G,I.sibling),se=c(I,F.props),Al(se,F),se.return=G,G=se;break e}o(G,I);break}else t(G,I);I=I.sibling}F.type===E?(se=Pa(F.props.children,G.mode,se,F.key),se.return=G,G=se):(se=Ii(F.type,F.key,F.props,null,G.mode,se),Al(se,F),se.return=G,G=se)}return b(G);case C:e:{for(Ae=F.key;I!==null;){if(I.key===Ae)if(I.tag===4&&I.stateNode.containerInfo===F.containerInfo&&I.stateNode.implementation===F.implementation){o(G,I.sibling),se=c(I,F.children||[]),se.return=G,G=se;break e}else{o(G,I);break}else t(G,I);I=I.sibling}se=xu(F,G.mode,se),se.return=G,G=se}return b(G);case z:return F=qa(F),ct(G,I,F,se)}if(pe(F))return we(G,I,F,se);if(K(F)){if(Ae=K(F),typeof Ae!="function")throw Error(i(150));return F=Ae.call(F),Re(G,I,F,se)}if(typeof F.then=="function")return ct(G,I,Xi(F),se);if(F.$$typeof===B)return ct(G,I,Gi(G,F),se);Fi(G,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,I!==null&&I.tag===6?(o(G,I.sibling),se=c(I,F),se.return=G,G=se):(o(G,I),se=bu(F,G.mode,se),se.return=G,G=se),b(G)):o(G,I)}return function(G,I,F,se){try{Tl=0;var Ae=ct(G,I,F,se);return Tr=null,Ae}catch(Te){if(Te===Cr||Te===Vi)throw Te;var Ze=An(29,Te,null,G.mode);return Ze.lanes=se,Ze.return=G,Ze}finally{}}}var Fa=lp(!0),ip=lp(!1),Wo=!1;function Du(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ju(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Jo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ea(e,t,o){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(tt&2)!==0){var c=l.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),l.pending=t,t=Ui(e),Ym(e,null,o),t}return Bi(e,l,t,o),Ui(e)}function Ml(e,t,o){if(t=t.updateQueue,t!==null&&(t=t.shared,(o&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,o|=l,t.lanes=o,Wt(e,o)}}function zu(e,t){var o=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var c=null,d=null;if(o=o.firstBaseUpdate,o!==null){do{var b={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};d===null?c=d=b:d=d.next=b,o=o.next}while(o!==null);d===null?c=d=t:d=d.next=t}else c=d=t;o={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:l.shared,callbacks:l.callbacks},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=t:e.next=t,o.lastBaseUpdate=t}var ku=!1;function _l(){if(ku){var e=Er;if(e!==null)throw e}}function Nl(e,t,o,l){ku=!1;var c=e.updateQueue;Wo=!1;var d=c.firstBaseUpdate,b=c.lastBaseUpdate,w=c.shared.pending;if(w!==null){c.shared.pending=null;var k=w,Q=k.next;k.next=null,b===null?d=Q:b.next=Q,b=k;var le=e.alternate;le!==null&&(le=le.updateQueue,w=le.lastBaseUpdate,w!==b&&(w===null?le.firstBaseUpdate=Q:w.next=Q,le.lastBaseUpdate=k))}if(d!==null){var ue=c.baseState;b=0,le=Q=k=null,w=d;do{var Z=w.lane&-536870913,oe=Z!==w.lane;if(oe?(qe&Z)===Z:(l&Z)===Z){Z!==0&&Z===wr&&(ku=!0),le!==null&&(le=le.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var we=e,Re=w;Z=t;var ct=o;switch(Re.tag){case 1:if(we=Re.payload,typeof we=="function"){ue=we.call(ct,ue,Z);break e}ue=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Re.payload,Z=typeof we=="function"?we.call(ct,ue,Z):we,Z==null)break e;ue=y({},ue,Z);break e;case 2:Wo=!0}}Z=w.callback,Z!==null&&(e.flags|=64,oe&&(e.flags|=8192),oe=c.callbacks,oe===null?c.callbacks=[Z]:oe.push(Z))}else oe={lane:Z,tag:w.tag,payload:w.payload,callback:w.callback,next:null},le===null?(Q=le=oe,k=ue):le=le.next=oe,b|=Z;if(w=w.next,w===null){if(w=c.shared.pending,w===null)break;oe=w,w=oe.next,oe.next=null,c.lastBaseUpdate=oe,c.shared.pending=null}}while(!0);le===null&&(k=ue),c.baseState=k,c.firstBaseUpdate=Q,c.lastBaseUpdate=le,d===null&&(c.shared.lanes=0),ra|=b,e.lanes=b,e.memoizedState=ue}}function sp(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function cp(e,t){var o=e.callbacks;if(o!==null)for(e.callbacks=null,e=0;e<o.length;e++)sp(o[e],t)}var Ar=_(null),Ki=_(0);function up(e,t){e=ko,H(Ki,e),H(Ar,t),ko=e|t.baseLanes}function Lu(){H(Ki,ko),H(Ar,Ar.current)}function Hu(){ko=Ki.current,U(Ar),U(Ki)}var Mn=_(null),Yn=null;function ta(e){var t=e.alternate;H(Mt,Mt.current&1),H(Mn,e),Yn===null&&(t===null||Ar.current!==null||t.memoizedState!==null)&&(Yn=e)}function Bu(e){H(Mt,Mt.current),H(Mn,e),Yn===null&&(Yn=e)}function dp(e){e.tag===22?(H(Mt,Mt.current),H(Mn,e),Yn===null&&(Yn=e)):na()}function na(){H(Mt,Mt.current),H(Mn,Mn.current)}function _n(e){U(Mn),Yn===e&&(Yn=null),U(Mt)}var Mt=_(0);function Qi(e){for(var t=e;t!==null;){if(t.tag===13){var o=t.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Yd(o)||Vd(o)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Mo=0,He=null,it=null,jt=null,Zi=!1,Mr=!1,Ka=!1,Wi=0,Rl=0,_r=null,ww=0;function wt(){throw Error(i(321))}function Uu(e,t){if(t===null)return!1;for(var o=0;o<t.length&&o<e.length;o++)if(!Tn(e[o],t[o]))return!1;return!0}function Iu(e,t,o,l,c,d){return Mo=d,He=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?Fp:td,Ka=!1,d=o(l,c),Ka=!1,Mr&&(d=hp(t,o,l,c)),fp(e),d}function fp(e){T.H=jl;var t=it!==null&&it.next!==null;if(Mo=0,jt=it=He=null,Zi=!1,Rl=0,_r=null,t)throw Error(i(300));e===null||zt||(e=e.dependencies,e!==null&&$i(e)&&(zt=!0))}function hp(e,t,o,l){He=e;var c=0;do{if(Mr&&(_r=null),Rl=0,Mr=!1,25<=c)throw Error(i(301));if(c+=1,jt=it=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}T.H=Kp,d=t(o,l)}while(Mr);return d}function Ew(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?Ol(t):t,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(He.flags|=1024),t}function Pu(){var e=Wi!==0;return Wi=0,e}function $u(e,t,o){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o}function Gu(e){if(Zi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Zi=!1}Mo=0,jt=it=He=null,Mr=!1,Rl=Wi=0,_r=null}function cn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?He.memoizedState=jt=e:jt=jt.next=e,jt}function _t(){if(it===null){var e=He.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var t=jt===null?He.memoizedState:jt.next;if(t!==null)jt=t,it=e;else{if(e===null)throw He.alternate===null?Error(i(467)):Error(i(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},jt===null?He.memoizedState=jt=e:jt=jt.next=e}return jt}function Ji(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ol(e){var t=Rl;return Rl+=1,_r===null&&(_r=[]),e=op(_r,e,t),t=He,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?Fp:td),e}function es(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ol(e);if(e.$$typeof===B)return qt(e)}throw Error(i(438,String(e)))}function Yu(e){var t=null,o=He.updateQueue;if(o!==null&&(t=o.memoCache),t==null){var l=He.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),o===null&&(o=Ji(),He.updateQueue=o),o.memoCache=t,o=t.data[t.index],o===void 0)for(o=t.data[t.index]=Array(e),l=0;l<e;l++)o[l]=ie;return t.index++,o}function _o(e,t){return typeof t=="function"?t(e):t}function ts(e){var t=_t();return Vu(t,it,e)}function Vu(e,t,o){var l=e.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=o;var c=e.baseQueue,d=l.pending;if(d!==null){if(c!==null){var b=c.next;c.next=d.next,d.next=b}t.baseQueue=c=d,l.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var w=b=null,k=null,Q=t,le=!1;do{var ue=Q.lane&-536870913;if(ue!==Q.lane?(qe&ue)===ue:(Mo&ue)===ue){var Z=Q.revertLane;if(Z===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ue===wr&&(le=!0);else if((Mo&Z)===Z){Q=Q.next,Z===wr&&(le=!0);continue}else ue={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},k===null?(w=k=ue,b=d):k=k.next=ue,He.lanes|=Z,ra|=Z;ue=Q.action,Ka&&o(d,ue),d=Q.hasEagerState?Q.eagerState:o(d,ue)}else Z={lane:ue,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},k===null?(w=k=Z,b=d):k=k.next=Z,He.lanes|=ue,ra|=ue;Q=Q.next}while(Q!==null&&Q!==t);if(k===null?b=d:k.next=w,!Tn(d,e.memoizedState)&&(zt=!0,le&&(o=Er,o!==null)))throw o;e.memoizedState=d,e.baseState=b,e.baseQueue=k,l.lastRenderedState=d}return c===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function qu(e){var t=_t(),o=t.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=e;var l=o.dispatch,c=o.pending,d=t.memoizedState;if(c!==null){o.pending=null;var b=c=c.next;do d=e(d,b.action),b=b.next;while(b!==c);Tn(d,t.memoizedState)||(zt=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),o.lastRenderedState=d}return[d,l]}function mp(e,t,o){var l=He,c=_t(),d=Fe;if(d){if(o===void 0)throw Error(i(407));o=o()}else o=t();var b=!Tn((it||c).memoizedState,o);if(b&&(c.memoizedState=o,zt=!0),c=c.queue,Ku(yp.bind(null,l,c,e),[e]),c.getSnapshot!==t||b||jt!==null&&jt.memoizedState.tag&1){if(l.flags|=2048,Nr(9,{destroy:void 0},gp.bind(null,l,c,o,t),null),dt===null)throw Error(i(349));d||(Mo&127)!==0||pp(l,t,o)}return o}function pp(e,t,o){e.flags|=16384,e={getSnapshot:t,value:o},t=He.updateQueue,t===null?(t=Ji(),He.updateQueue=t,t.stores=[e]):(o=t.stores,o===null?t.stores=[e]:o.push(e))}function gp(e,t,o,l){t.value=o,t.getSnapshot=l,vp(t)&&bp(e)}function yp(e,t,o){return o(function(){vp(t)&&bp(e)})}function vp(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!Tn(e,o)}catch{return!0}}function bp(e){var t=Ia(e,2);t!==null&&vn(t,e,2)}function Xu(e){var t=cn();if(typeof e=="function"){var o=e;if(e=o(),Ka){Ht(!0);try{o()}finally{Ht(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:e},t}function xp(e,t,o,l){return e.baseState=o,Vu(e,it,typeof l=="function"?l:_o)}function Cw(e,t,o,l,c){if(as(e))throw Error(i(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};T.T!==null?o(!0):d.isTransition=!1,l(d),o=t.pending,o===null?(d.next=t.pending=d,Sp(t,d)):(d.next=o.next,t.pending=o.next=d)}}function Sp(e,t){var o=t.action,l=t.payload,c=e.state;if(t.isTransition){var d=T.T,b={};T.T=b;try{var w=o(c,l),k=T.S;k!==null&&k(b,w),wp(e,t,w)}catch(Q){Fu(e,t,Q)}finally{d!==null&&b.types!==null&&(d.types=b.types),T.T=d}}else try{d=o(c,l),wp(e,t,d)}catch(Q){Fu(e,t,Q)}}function wp(e,t,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(l){Ep(e,t,l)},function(l){return Fu(e,t,l)}):Ep(e,t,o)}function Ep(e,t,o){t.status="fulfilled",t.value=o,Cp(t),e.state=o,t=e.pending,t!==null&&(o=t.next,o===t?e.pending=null:(o=o.next,t.next=o,Sp(e,o)))}function Fu(e,t,o){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=o,Cp(t),t=t.next;while(t!==l)}e.action=null}function Cp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Tp(e,t){return t}function Ap(e,t){if(Fe){var o=dt.formState;if(o!==null){e:{var l=He;if(Fe){if(yt){t:{for(var c=yt,d=Gn;c.nodeType!==8;){if(!d){c=null;break t}if(c=Vn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){yt=Vn(c.nextSibling),l=c.data==="F!";break e}}Qo(l)}l=!1}l&&(t=o[0])}}return o=cn(),o.memoizedState=o.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tp,lastRenderedState:t},o.queue=l,o=Vp.bind(null,He,l),l.dispatch=o,l=Xu(!1),d=ed.bind(null,He,!1,l.queue),l=cn(),c={state:t,dispatch:null,action:e,pending:null},l.queue=c,o=Cw.bind(null,He,c,d,o),c.dispatch=o,l.memoizedState=e,[t,o,!1]}function Mp(e){var t=_t();return _p(t,it,e)}function _p(e,t,o){if(t=Vu(e,t,Tp)[0],e=ts(_o)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ol(t)}catch(b){throw b===Cr?Vi:b}else l=t;t=_t();var c=t.queue,d=c.dispatch;return o!==t.memoizedState&&(He.flags|=2048,Nr(9,{destroy:void 0},Tw.bind(null,c,o),null)),[l,d,e]}function Tw(e,t){e.action=t}function Np(e){var t=_t(),o=it;if(o!==null)return _p(t,o,e);_t(),t=t.memoizedState,o=_t();var l=o.queue.dispatch;return o.memoizedState=e,[t,l,!1]}function Nr(e,t,o,l){return e={tag:e,create:o,deps:l,inst:t,next:null},t=He.updateQueue,t===null&&(t=Ji(),He.updateQueue=t),o=t.lastEffect,o===null?t.lastEffect=e.next=e:(l=o.next,o.next=e,e.next=l,t.lastEffect=e),e}function Rp(){return _t().memoizedState}function ns(e,t,o,l){var c=cn();He.flags|=e,c.memoizedState=Nr(1|t,{destroy:void 0},o,l===void 0?null:l)}function os(e,t,o,l){var c=_t();l=l===void 0?null:l;var d=c.memoizedState.inst;it!==null&&l!==null&&Uu(l,it.memoizedState.deps)?c.memoizedState=Nr(t,d,o,l):(He.flags|=e,c.memoizedState=Nr(1|t,d,o,l))}function Op(e,t){ns(8390656,8,e,t)}function Ku(e,t){os(2048,8,e,t)}function Aw(e){He.flags|=4;var t=He.updateQueue;if(t===null)t=Ji(),He.updateQueue=t,t.events=[e];else{var o=t.events;o===null?t.events=[e]:o.push(e)}}function Dp(e){var t=_t().memoizedState;return Aw({ref:t,nextImpl:e}),function(){if((tt&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function jp(e,t){return os(4,2,e,t)}function zp(e,t){return os(4,4,e,t)}function kp(e,t){if(typeof t=="function"){e=e();var o=t(e);return function(){typeof o=="function"?o():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Lp(e,t,o){o=o!=null?o.concat([e]):null,os(4,4,kp.bind(null,t,e),o)}function Qu(){}function Hp(e,t){var o=_t();t=t===void 0?null:t;var l=o.memoizedState;return t!==null&&Uu(t,l[1])?l[0]:(o.memoizedState=[e,t],e)}function Bp(e,t){var o=_t();t=t===void 0?null:t;var l=o.memoizedState;if(t!==null&&Uu(t,l[1]))return l[0];if(l=e(),Ka){Ht(!0);try{e()}finally{Ht(!1)}}return o.memoizedState=[l,t],l}function Zu(e,t,o){return o===void 0||(Mo&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=o,e=Ug(),He.lanes|=e,ra|=e,o)}function Up(e,t,o,l){return Tn(o,t)?o:Ar.current!==null?(e=Zu(e,o,l),Tn(e,t)||(zt=!0),e):(Mo&42)===0||(Mo&1073741824)!==0&&(qe&261930)===0?(zt=!0,e.memoizedState=o):(e=Ug(),He.lanes|=e,ra|=e,t)}function Ip(e,t,o,l,c){var d=O.p;O.p=d!==0&&8>d?d:8;var b=T.T,w={};T.T=w,ed(e,!1,t,o);try{var k=c(),Q=T.S;if(Q!==null&&Q(w,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var le=Sw(k,l);Dl(e,t,le,On(e))}else Dl(e,t,l,On(e))}catch(ue){Dl(e,t,{then:function(){},status:"rejected",reason:ue},On())}finally{O.p=d,b!==null&&w.types!==null&&(b.types=w.types),T.T=b}}function Mw(){}function Wu(e,t,o,l){if(e.tag!==5)throw Error(i(476));var c=Pp(e).queue;Ip(e,c,t,N,o===null?Mw:function(){return $p(e),o(l)})}function Pp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:N,baseState:N,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:N},next:null};var o={};return t.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:o},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $p(e){var t=Pp(e);t.next===null&&(t=e.alternate.memoizedState),Dl(e,t.next.queue,{},On())}function Ju(){return qt(Kl)}function Gp(){return _t().memoizedState}function Yp(){return _t().memoizedState}function _w(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var o=On();e=Jo(o);var l=ea(t,e,o);l!==null&&(vn(l,t,o),Ml(l,t,o)),t={cache:_u()},e.payload=t;return}t=t.return}}function Nw(e,t,o){var l=On();o={lane:l,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},as(e)?qp(t,o):(o=yu(e,t,o,l),o!==null&&(vn(o,e,l),Xp(o,t,l)))}function Vp(e,t,o){var l=On();Dl(e,t,o,l)}function Dl(e,t,o,l){var c={lane:l,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(as(e))qp(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var b=t.lastRenderedState,w=d(b,o);if(c.hasEagerState=!0,c.eagerState=w,Tn(w,b))return Bi(e,t,c,0),dt===null&&Hi(),!1}catch{}finally{}if(o=yu(e,t,c,l),o!==null)return vn(o,e,l),Xp(o,t,l),!0}return!1}function ed(e,t,o,l){if(l={lane:2,revertLane:Dd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},as(e)){if(t)throw Error(i(479))}else t=yu(e,o,l,2),t!==null&&vn(t,e,2)}function as(e){var t=e.alternate;return e===He||t!==null&&t===He}function qp(e,t){Mr=Zi=!0;var o=e.pending;o===null?t.next=t:(t.next=o.next,o.next=t),e.pending=t}function Xp(e,t,o){if((o&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,o|=l,t.lanes=o,Wt(e,o)}}var jl={readContext:qt,use:es,useCallback:wt,useContext:wt,useEffect:wt,useImperativeHandle:wt,useLayoutEffect:wt,useInsertionEffect:wt,useMemo:wt,useReducer:wt,useRef:wt,useState:wt,useDebugValue:wt,useDeferredValue:wt,useTransition:wt,useSyncExternalStore:wt,useId:wt,useHostTransitionStatus:wt,useFormState:wt,useActionState:wt,useOptimistic:wt,useMemoCache:wt,useCacheRefresh:wt};jl.useEffectEvent=wt;var Fp={readContext:qt,use:es,useCallback:function(e,t){return cn().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:Op,useImperativeHandle:function(e,t,o){o=o!=null?o.concat([e]):null,ns(4194308,4,kp.bind(null,t,e),o)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var o=cn();t=t===void 0?null:t;var l=e();if(Ka){Ht(!0);try{e()}finally{Ht(!1)}}return o.memoizedState=[l,t],l},useReducer:function(e,t,o){var l=cn();if(o!==void 0){var c=o(t);if(Ka){Ht(!0);try{o(t)}finally{Ht(!1)}}}else c=t;return l.memoizedState=l.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},l.queue=e,e=e.dispatch=Nw.bind(null,He,e),[l.memoizedState,e]},useRef:function(e){var t=cn();return e={current:e},t.memoizedState=e},useState:function(e){e=Xu(e);var t=e.queue,o=Vp.bind(null,He,t);return t.dispatch=o,[e.memoizedState,o]},useDebugValue:Qu,useDeferredValue:function(e,t){var o=cn();return Zu(o,e,t)},useTransition:function(){var e=Xu(!1);return e=Ip.bind(null,He,e.queue,!0,!1),cn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,o){var l=He,c=cn();if(Fe){if(o===void 0)throw Error(i(407));o=o()}else{if(o=t(),dt===null)throw Error(i(349));(qe&127)!==0||pp(l,t,o)}c.memoizedState=o;var d={value:o,getSnapshot:t};return c.queue=d,Op(yp.bind(null,l,d,e),[e]),l.flags|=2048,Nr(9,{destroy:void 0},gp.bind(null,l,d,o,t),null),o},useId:function(){var e=cn(),t=dt.identifierPrefix;if(Fe){var o=io,l=lo;o=(l&~(1<<32-ut(l)-1)).toString(32)+o,t="_"+t+"R_"+o,o=Wi++,0<o&&(t+="H"+o.toString(32)),t+="_"}else o=ww++,t="_"+t+"r_"+o.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ju,useFormState:Ap,useActionState:Ap,useOptimistic:function(e){var t=cn();t.memoizedState=t.baseState=e;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=o,t=ed.bind(null,He,!0,o),o.dispatch=t,[e,t]},useMemoCache:Yu,useCacheRefresh:function(){return cn().memoizedState=_w.bind(null,He)},useEffectEvent:function(e){var t=cn(),o={impl:e};return t.memoizedState=o,function(){if((tt&2)!==0)throw Error(i(440));return o.impl.apply(void 0,arguments)}}},td={readContext:qt,use:es,useCallback:Hp,useContext:qt,useEffect:Ku,useImperativeHandle:Lp,useInsertionEffect:jp,useLayoutEffect:zp,useMemo:Bp,useReducer:ts,useRef:Rp,useState:function(){return ts(_o)},useDebugValue:Qu,useDeferredValue:function(e,t){var o=_t();return Up(o,it.memoizedState,e,t)},useTransition:function(){var e=ts(_o)[0],t=_t().memoizedState;return[typeof e=="boolean"?e:Ol(e),t]},useSyncExternalStore:mp,useId:Gp,useHostTransitionStatus:Ju,useFormState:Mp,useActionState:Mp,useOptimistic:function(e,t){var o=_t();return xp(o,it,e,t)},useMemoCache:Yu,useCacheRefresh:Yp};td.useEffectEvent=Dp;var Kp={readContext:qt,use:es,useCallback:Hp,useContext:qt,useEffect:Ku,useImperativeHandle:Lp,useInsertionEffect:jp,useLayoutEffect:zp,useMemo:Bp,useReducer:qu,useRef:Rp,useState:function(){return qu(_o)},useDebugValue:Qu,useDeferredValue:function(e,t){var o=_t();return it===null?Zu(o,e,t):Up(o,it.memoizedState,e,t)},useTransition:function(){var e=qu(_o)[0],t=_t().memoizedState;return[typeof e=="boolean"?e:Ol(e),t]},useSyncExternalStore:mp,useId:Gp,useHostTransitionStatus:Ju,useFormState:Np,useActionState:Np,useOptimistic:function(e,t){var o=_t();return it!==null?xp(o,it,e,t):(o.baseState=e,[e,o.queue.dispatch])},useMemoCache:Yu,useCacheRefresh:Yp};Kp.useEffectEvent=Dp;function nd(e,t,o,l){t=e.memoizedState,o=o(l,t),o=o==null?t:y({},t,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var od={enqueueSetState:function(e,t,o){e=e._reactInternals;var l=On(),c=Jo(l);c.payload=t,o!=null&&(c.callback=o),t=ea(e,c,l),t!==null&&(vn(t,e,l),Ml(t,e,l))},enqueueReplaceState:function(e,t,o){e=e._reactInternals;var l=On(),c=Jo(l);c.tag=1,c.payload=t,o!=null&&(c.callback=o),t=ea(e,c,l),t!==null&&(vn(t,e,l),Ml(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var o=On(),l=Jo(o);l.tag=2,t!=null&&(l.callback=t),t=ea(e,l,o),t!==null&&(vn(t,e,o),Ml(t,e,o))}};function Qp(e,t,o,l,c,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,d,b):t.prototype&&t.prototype.isPureReactComponent?!bl(o,l)||!bl(c,d):!0}function Zp(e,t,o,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(o,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(o,l),t.state!==e&&od.enqueueReplaceState(t,t.state,null)}function Qa(e,t){var o=t;if("ref"in t){o={};for(var l in t)l!=="ref"&&(o[l]=t[l])}if(e=e.defaultProps){o===t&&(o=y({},o));for(var c in e)o[c]===void 0&&(o[c]=e[c])}return o}function Wp(e){Li(e)}function Jp(e){console.error(e)}function eg(e){Li(e)}function rs(e,t){try{var o=e.onUncaughtError;o(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function tg(e,t,o){try{var l=e.onCaughtError;l(o.value,{componentStack:o.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function ad(e,t,o){return o=Jo(o),o.tag=3,o.payload={element:null},o.callback=function(){rs(e,t)},o}function ng(e){return e=Jo(e),e.tag=3,e}function og(e,t,o,l){var c=o.type.getDerivedStateFromError;if(typeof c=="function"){var d=l.value;e.payload=function(){return c(d)},e.callback=function(){tg(t,o,l)}}var b=o.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){tg(t,o,l),typeof c!="function"&&(la===null?la=new Set([this]):la.add(this));var w=l.stack;this.componentDidCatch(l.value,{componentStack:w!==null?w:""})})}function Rw(e,t,o,l,c){if(o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=o.alternate,t!==null&&Sr(t,o,c,!0),o=Mn.current,o!==null){switch(o.tag){case 31:case 13:return Yn===null?ys():o.alternate===null&&Et===0&&(Et=3),o.flags&=-257,o.flags|=65536,o.lanes=c,l===qi?o.flags|=16384:(t=o.updateQueue,t===null?o.updateQueue=new Set([l]):t.add(l),Nd(e,l,c)),!1;case 22:return o.flags|=65536,l===qi?o.flags|=16384:(t=o.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},o.updateQueue=t):(o=t.retryQueue,o===null?t.retryQueue=new Set([l]):o.add(l)),Nd(e,l,c)),!1}throw Error(i(435,o.tag))}return Nd(e,l,c),ys(),!1}if(Fe)return t=Mn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,l!==Eu&&(e=Error(i(422),{cause:l}),wl(In(e,o)))):(l!==Eu&&(t=Error(i(423),{cause:l}),wl(In(t,o))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,l=In(l,o),c=ad(e.stateNode,l,c),zu(e,c),Et!==4&&(Et=2)),!1;var d=Error(i(520),{cause:l});if(d=In(d,o),Pl===null?Pl=[d]:Pl.push(d),Et!==4&&(Et=2),t===null)return!0;l=In(l,o),o=t;do{switch(o.tag){case 3:return o.flags|=65536,e=c&-c,o.lanes|=e,e=ad(o.stateNode,l,e),zu(o,e),!1;case 1:if(t=o.type,d=o.stateNode,(o.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(la===null||!la.has(d))))return o.flags|=65536,c&=-c,o.lanes|=c,c=ng(c),og(c,e,o,l),zu(o,c),!1}o=o.return}while(o!==null);return!1}var rd=Error(i(461)),zt=!1;function Xt(e,t,o,l){t.child=e===null?ip(t,null,o,l):Fa(t,e.child,o,l)}function ag(e,t,o,l,c){o=o.render;var d=t.ref;if("ref"in l){var b={};for(var w in l)w!=="ref"&&(b[w]=l[w])}else b=l;return Ya(t),l=Iu(e,t,o,b,d,c),w=Pu(),e!==null&&!zt?($u(e,t,c),No(e,t,c)):(Fe&&w&&Su(t),t.flags|=1,Xt(e,t,l,c),t.child)}function rg(e,t,o,l,c){if(e===null){var d=o.type;return typeof d=="function"&&!vu(d)&&d.defaultProps===void 0&&o.compare===null?(t.tag=15,t.type=d,lg(e,t,d,l,c)):(e=Ii(o.type,null,l,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!hd(e,c)){var b=d.memoizedProps;if(o=o.compare,o=o!==null?o:bl,o(b,l)&&e.ref===t.ref)return No(e,t,c)}return t.flags|=1,e=Eo(d,l),e.ref=t.ref,e.return=t,t.child=e}function lg(e,t,o,l,c){if(e!==null){var d=e.memoizedProps;if(bl(d,l)&&e.ref===t.ref)if(zt=!1,t.pendingProps=l=d,hd(e,c))(e.flags&131072)!==0&&(zt=!0);else return t.lanes=e.lanes,No(e,t,c)}return ld(e,t,o,l,c)}function ig(e,t,o,l){var c=l.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|o:o,e!==null){for(l=t.child=e.child,c=0;l!==null;)c=c|l.lanes|l.childLanes,l=l.sibling;l=c&~d}else l=0,t.child=null;return sg(e,t,d,o,l)}if((o&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Yi(t,d!==null?d.cachePool:null),d!==null?up(t,d):Lu(),dp(t);else return l=t.lanes=536870912,sg(e,t,d!==null?d.baseLanes|o:o,o,l)}else d!==null?(Yi(t,d.cachePool),up(t,d),na(),t.memoizedState=null):(e!==null&&Yi(t,null),Lu(),na());return Xt(e,t,c,o),t.child}function zl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function sg(e,t,o,l,c){var d=Ru();return d=d===null?null:{parent:Dt._currentValue,pool:d},t.memoizedState={baseLanes:o,cachePool:d},e!==null&&Yi(t,null),Lu(),dp(t),e!==null&&Sr(e,t,l,!0),t.childLanes=c,null}function ls(e,t){return t=ss({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function cg(e,t,o){return Fa(t,e.child,null,o),e=ls(t,t.pendingProps),e.flags|=2,_n(t),t.memoizedState=null,e}function Ow(e,t,o){var l=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Fe){if(l.mode==="hidden")return e=ls(t,l),t.lanes=536870912,zl(null,e);if(Bu(t),(e=yt)?(e=Sy(e,Gn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fo!==null?{id:lo,overflow:io}:null,retryLane:536870912,hydrationErrors:null},o=qm(e),o.return=t,t.child=o,Vt=t,yt=null)):e=null,e===null)throw Qo(t);return t.lanes=536870912,null}return ls(t,l)}var d=e.memoizedState;if(d!==null){var b=d.dehydrated;if(Bu(t),c)if(t.flags&256)t.flags&=-257,t=cg(e,t,o);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(zt||Sr(e,t,o,!1),c=(o&e.childLanes)!==0,zt||c){if(l=dt,l!==null&&(b=Jt(l,o),b!==0&&b!==d.retryLane))throw d.retryLane=b,Ia(e,b),vn(l,e,b),rd;ys(),t=cg(e,t,o)}else e=d.treeContext,yt=Vn(b.nextSibling),Vt=t,Fe=!0,Ko=null,Gn=!1,e!==null&&Km(t,e),t=ls(t,l),t.flags|=4096;return t}return e=Eo(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function is(e,t){var o=t.ref;if(o===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(i(284));(e===null||e.ref!==o)&&(t.flags|=4194816)}}function ld(e,t,o,l,c){return Ya(t),o=Iu(e,t,o,l,void 0,c),l=Pu(),e!==null&&!zt?($u(e,t,c),No(e,t,c)):(Fe&&l&&Su(t),t.flags|=1,Xt(e,t,o,c),t.child)}function ug(e,t,o,l,c,d){return Ya(t),t.updateQueue=null,o=hp(t,l,o,c),fp(e),l=Pu(),e!==null&&!zt?($u(e,t,d),No(e,t,d)):(Fe&&l&&Su(t),t.flags|=1,Xt(e,t,o,d),t.child)}function dg(e,t,o,l,c){if(Ya(t),t.stateNode===null){var d=yr,b=o.contextType;typeof b=="object"&&b!==null&&(d=qt(b)),d=new o(l,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=od,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=l,d.state=t.memoizedState,d.refs={},Du(t),b=o.contextType,d.context=typeof b=="object"&&b!==null?qt(b):yr,d.state=t.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(nd(t,o,b,l),d.state=t.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&od.enqueueReplaceState(d,d.state,null),Nl(t,l,d,c),_l(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){d=t.stateNode;var w=t.memoizedProps,k=Qa(o,w);d.props=k;var Q=d.context,le=o.contextType;b=yr,typeof le=="object"&&le!==null&&(b=qt(le));var ue=o.getDerivedStateFromProps;le=typeof ue=="function"||typeof d.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,le||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(w||Q!==b)&&Zp(t,d,l,b),Wo=!1;var Z=t.memoizedState;d.state=Z,Nl(t,l,d,c),_l(),Q=t.memoizedState,w||Z!==Q||Wo?(typeof ue=="function"&&(nd(t,o,ue,l),Q=t.memoizedState),(k=Wo||Qp(t,o,k,l,Z,Q,b))?(le||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=Q),d.props=l,d.state=Q,d.context=b,l=k):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{d=t.stateNode,ju(e,t),b=t.memoizedProps,le=Qa(o,b),d.props=le,ue=t.pendingProps,Z=d.context,Q=o.contextType,k=yr,typeof Q=="object"&&Q!==null&&(k=qt(Q)),w=o.getDerivedStateFromProps,(Q=typeof w=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==ue||Z!==k)&&Zp(t,d,l,k),Wo=!1,Z=t.memoizedState,d.state=Z,Nl(t,l,d,c),_l();var oe=t.memoizedState;b!==ue||Z!==oe||Wo||e!==null&&e.dependencies!==null&&$i(e.dependencies)?(typeof w=="function"&&(nd(t,o,w,l),oe=t.memoizedState),(le=Wo||Qp(t,o,le,l,Z,oe,k)||e!==null&&e.dependencies!==null&&$i(e.dependencies))?(Q||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(l,oe,k),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(l,oe,k)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=oe),d.props=l,d.state=oe,d.context=k,l=le):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),l=!1)}return d=l,is(e,t),l=(t.flags&128)!==0,d||l?(d=t.stateNode,o=l&&typeof o.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&l?(t.child=Fa(t,e.child,null,c),t.child=Fa(t,null,o,c)):Xt(e,t,o,c),t.memoizedState=d.state,e=t.child):e=No(e,t,c),e}function fg(e,t,o,l){return $a(),t.flags|=256,Xt(e,t,o,l),t.child}var id={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function sd(e){return{baseLanes:e,cachePool:tp()}}function cd(e,t,o){return e=e!==null?e.childLanes&~o:0,t&&(e|=Rn),e}function hg(e,t,o){var l=t.pendingProps,c=!1,d=(t.flags&128)!==0,b;if((b=d)||(b=e!==null&&e.memoizedState===null?!1:(Mt.current&2)!==0),b&&(c=!0,t.flags&=-129),b=(t.flags&32)!==0,t.flags&=-33,e===null){if(Fe){if(c?ta(t):na(),(e=yt)?(e=Sy(e,Gn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fo!==null?{id:lo,overflow:io}:null,retryLane:536870912,hydrationErrors:null},o=qm(e),o.return=t,t.child=o,Vt=t,yt=null)):e=null,e===null)throw Qo(t);return Vd(e)?t.lanes=32:t.lanes=536870912,null}var w=l.children;return l=l.fallback,c?(na(),c=t.mode,w=ss({mode:"hidden",children:w},c),l=Pa(l,c,o,null),w.return=t,l.return=t,w.sibling=l,t.child=w,l=t.child,l.memoizedState=sd(o),l.childLanes=cd(e,b,o),t.memoizedState=id,zl(null,l)):(ta(t),ud(t,w))}var k=e.memoizedState;if(k!==null&&(w=k.dehydrated,w!==null)){if(d)t.flags&256?(ta(t),t.flags&=-257,t=dd(e,t,o)):t.memoizedState!==null?(na(),t.child=e.child,t.flags|=128,t=null):(na(),w=l.fallback,c=t.mode,l=ss({mode:"visible",children:l.children},c),w=Pa(w,c,o,null),w.flags|=2,l.return=t,w.return=t,l.sibling=w,t.child=l,Fa(t,e.child,null,o),l=t.child,l.memoizedState=sd(o),l.childLanes=cd(e,b,o),t.memoizedState=id,t=zl(null,l));else if(ta(t),Vd(w)){if(b=w.nextSibling&&w.nextSibling.dataset,b)var Q=b.dgst;b=Q,l=Error(i(419)),l.stack="",l.digest=b,wl({value:l,source:null,stack:null}),t=dd(e,t,o)}else if(zt||Sr(e,t,o,!1),b=(o&e.childLanes)!==0,zt||b){if(b=dt,b!==null&&(l=Jt(b,o),l!==0&&l!==k.retryLane))throw k.retryLane=l,Ia(e,l),vn(b,e,l),rd;Yd(w)||ys(),t=dd(e,t,o)}else Yd(w)?(t.flags|=192,t.child=e.child,t=null):(e=k.treeContext,yt=Vn(w.nextSibling),Vt=t,Fe=!0,Ko=null,Gn=!1,e!==null&&Km(t,e),t=ud(t,l.children),t.flags|=4096);return t}return c?(na(),w=l.fallback,c=t.mode,k=e.child,Q=k.sibling,l=Eo(k,{mode:"hidden",children:l.children}),l.subtreeFlags=k.subtreeFlags&65011712,Q!==null?w=Eo(Q,w):(w=Pa(w,c,o,null),w.flags|=2),w.return=t,l.return=t,l.sibling=w,t.child=l,zl(null,l),l=t.child,w=e.child.memoizedState,w===null?w=sd(o):(c=w.cachePool,c!==null?(k=Dt._currentValue,c=c.parent!==k?{parent:k,pool:k}:c):c=tp(),w={baseLanes:w.baseLanes|o,cachePool:c}),l.memoizedState=w,l.childLanes=cd(e,b,o),t.memoizedState=id,zl(e.child,l)):(ta(t),o=e.child,e=o.sibling,o=Eo(o,{mode:"visible",children:l.children}),o.return=t,o.sibling=null,e!==null&&(b=t.deletions,b===null?(t.deletions=[e],t.flags|=16):b.push(e)),t.child=o,t.memoizedState=null,o)}function ud(e,t){return t=ss({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ss(e,t){return e=An(22,e,null,t),e.lanes=0,e}function dd(e,t,o){return Fa(t,e.child,null,o),e=ud(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function mg(e,t,o){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Au(e.return,t,o)}function fd(e,t,o,l,c,d){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:c,treeForkCount:d}:(b.isBackwards=t,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=o,b.tailMode=c,b.treeForkCount=d)}function pg(e,t,o){var l=t.pendingProps,c=l.revealOrder,d=l.tail;l=l.children;var b=Mt.current,w=(b&2)!==0;if(w?(b=b&1|2,t.flags|=128):b&=1,H(Mt,b),Xt(e,t,l,o),l=Fe?Sl:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mg(e,o,t);else if(e.tag===19)mg(e,o,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(o=t.child,c=null;o!==null;)e=o.alternate,e!==null&&Qi(e)===null&&(c=o),o=o.sibling;o=c,o===null?(c=t.child,t.child=null):(c=o.sibling,o.sibling=null),fd(t,!1,c,o,d,l);break;case"backwards":case"unstable_legacy-backwards":for(o=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Qi(e)===null){t.child=c;break}e=c.sibling,c.sibling=o,o=c,c=e}fd(t,!0,o,null,d,l);break;case"together":fd(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function No(e,t,o){if(e!==null&&(t.dependencies=e.dependencies),ra|=t.lanes,(o&t.childLanes)===0)if(e!==null){if(Sr(e,t,o,!1),(o&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,o=Eo(e,e.pendingProps),t.child=o,o.return=t;e.sibling!==null;)e=e.sibling,o=o.sibling=Eo(e,e.pendingProps),o.return=t;o.sibling=null}return t.child}function hd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&$i(e)))}function Dw(e,t,o){switch(t.tag){case 3:V(t,t.stateNode.containerInfo),Zo(t,Dt,e.memoizedState.cache),$a();break;case 27:case 5:ye(t);break;case 4:V(t,t.stateNode.containerInfo);break;case 10:Zo(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Bu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(ta(t),t.flags|=128,null):(o&t.child.childLanes)!==0?hg(e,t,o):(ta(t),e=No(e,t,o),e!==null?e.sibling:null);ta(t);break;case 19:var c=(e.flags&128)!==0;if(l=(o&t.childLanes)!==0,l||(Sr(e,t,o,!1),l=(o&t.childLanes)!==0),c){if(l)return pg(e,t,o);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),H(Mt,Mt.current),l)break;return null;case 22:return t.lanes=0,ig(e,t,o,t.pendingProps);case 24:Zo(t,Dt,e.memoizedState.cache)}return No(e,t,o)}function gg(e,t,o){if(e!==null)if(e.memoizedProps!==t.pendingProps)zt=!0;else{if(!hd(e,o)&&(t.flags&128)===0)return zt=!1,Dw(e,t,o);zt=(e.flags&131072)!==0}else zt=!1,Fe&&(t.flags&1048576)!==0&&Fm(t,Sl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=qa(t.elementType),t.type=e,typeof e=="function")vu(e)?(l=Qa(e,l),t.tag=1,t=dg(null,t,e,l,o)):(t.tag=0,t=ld(null,t,e,l,o));else{if(e!=null){var c=e.$$typeof;if(c===Y){t.tag=11,t=ag(null,t,e,l,o);break e}else if(c===q){t.tag=14,t=rg(null,t,e,l,o);break e}}throw t=fe(e)||e,Error(i(306,t,""))}}return t;case 0:return ld(e,t,t.type,t.pendingProps,o);case 1:return l=t.type,c=Qa(l,t.pendingProps),dg(e,t,l,c,o);case 3:e:{if(V(t,t.stateNode.containerInfo),e===null)throw Error(i(387));l=t.pendingProps;var d=t.memoizedState;c=d.element,ju(e,t),Nl(t,l,null,o);var b=t.memoizedState;if(l=b.cache,Zo(t,Dt,l),l!==d.cache&&Mu(t,[Dt],o,!0),_l(),l=b.element,d.isDehydrated)if(d={element:l,isDehydrated:!1,cache:b.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=fg(e,t,l,o);break e}else if(l!==c){c=In(Error(i(424)),t),wl(c),t=fg(e,t,l,o);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(yt=Vn(e.firstChild),Vt=t,Fe=!0,Ko=null,Gn=!0,o=ip(t,null,l,o),t.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if($a(),l===c){t=No(e,t,o);break e}Xt(e,t,l,o)}t=t.child}return t;case 26:return is(e,t),e===null?(o=My(t.type,null,t.pendingProps,null))?t.memoizedState=o:Fe||(o=t.type,e=t.pendingProps,l=Cs(J.current).createElement(o),l[Oe]=t,l[Pe]=e,Ft(l,o,e),Ot(l),t.stateNode=l):t.memoizedState=My(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ye(t),e===null&&Fe&&(l=t.stateNode=Cy(t.type,t.pendingProps,J.current),Vt=t,Gn=!0,c=yt,ua(t.type)?(qd=c,yt=Vn(l.firstChild)):yt=c),Xt(e,t,t.pendingProps.children,o),is(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Fe&&((c=l=yt)&&(l=s2(l,t.type,t.pendingProps,Gn),l!==null?(t.stateNode=l,Vt=t,yt=Vn(l.firstChild),Gn=!1,c=!0):c=!1),c||Qo(t)),ye(t),c=t.type,d=t.pendingProps,b=e!==null?e.memoizedProps:null,l=d.children,Pd(c,d)?l=null:b!==null&&Pd(c,b)&&(t.flags|=32),t.memoizedState!==null&&(c=Iu(e,t,Ew,null,null,o),Kl._currentValue=c),is(e,t),Xt(e,t,l,o),t.child;case 6:return e===null&&Fe&&((e=o=yt)&&(o=c2(o,t.pendingProps,Gn),o!==null?(t.stateNode=o,Vt=t,yt=null,e=!0):e=!1),e||Qo(t)),null;case 13:return hg(e,t,o);case 4:return V(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Fa(t,null,l,o):Xt(e,t,l,o),t.child;case 11:return ag(e,t,t.type,t.pendingProps,o);case 7:return Xt(e,t,t.pendingProps,o),t.child;case 8:return Xt(e,t,t.pendingProps.children,o),t.child;case 12:return Xt(e,t,t.pendingProps.children,o),t.child;case 10:return l=t.pendingProps,Zo(t,t.type,l.value),Xt(e,t,l.children,o),t.child;case 9:return c=t.type._context,l=t.pendingProps.children,Ya(t),c=qt(c),l=l(c),t.flags|=1,Xt(e,t,l,o),t.child;case 14:return rg(e,t,t.type,t.pendingProps,o);case 15:return lg(e,t,t.type,t.pendingProps,o);case 19:return pg(e,t,o);case 31:return Ow(e,t,o);case 22:return ig(e,t,o,t.pendingProps);case 24:return Ya(t),l=qt(Dt),e===null?(c=Ru(),c===null&&(c=dt,d=_u(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=o),c=d),t.memoizedState={parent:l,cache:c},Du(t),Zo(t,Dt,c)):((e.lanes&o)!==0&&(ju(e,t),Nl(t,null,null,o),_l()),c=e.memoizedState,d=t.memoizedState,c.parent!==l?(c={parent:l,cache:l},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Zo(t,Dt,l)):(l=d.cache,Zo(t,Dt,l),l!==c.cache&&Mu(t,[Dt],o,!0))),Xt(e,t,t.pendingProps.children,o),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Ro(e){e.flags|=4}function md(e,t,o,l,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Gg())e.flags|=8192;else throw Xa=qi,Ou}else e.flags&=-16777217}function yg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Dy(t))if(Gg())e.flags|=8192;else throw Xa=qi,Ou}function cs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Pt():536870912,e.lanes|=t,jr|=t)}function kl(e,t){if(!Fe)switch(e.tailMode){case"hidden":t=e.tail;for(var o=null;t!==null;)t.alternate!==null&&(o=t),t=t.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function vt(e){var t=e.alternate!==null&&e.alternate.child===e.child,o=0,l=0;if(t)for(var c=e.child;c!==null;)o|=c.lanes|c.childLanes,l|=c.subtreeFlags&65011712,l|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)o|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=o,t}function jw(e,t,o){var l=t.pendingProps;switch(wu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(t),null;case 1:return vt(t),null;case 3:return o=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ao(Dt),re(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(xr(t)?Ro(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Cu())),vt(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(Ro(t),d!==null?(vt(t),yg(t,d)):(vt(t),md(t,c,null,l,o))):d?d!==e.memoizedState?(Ro(t),vt(t),yg(t,d)):(vt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Ro(t),vt(t),md(t,c,e,l,o)),null;case 27:if(Se(t),o=J.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ro(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return vt(t),null}e=P.current,xr(t)?Qm(t):(e=Cy(c,l,o),t.stateNode=e,Ro(t))}return vt(t),null;case 5:if(Se(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Ro(t);else{if(!l){if(t.stateNode===null)throw Error(i(166));return vt(t),null}if(d=P.current,xr(t))Qm(t);else{var b=Cs(J.current);switch(d){case 1:d=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=b.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?d.multiple=!0:l.size&&(d.size=l.size);break;default:d=typeof l.is=="string"?b.createElement(c,{is:l.is}):b.createElement(c)}}d[Oe]=t,d[Pe]=l;e:for(b=t.child;b!==null;){if(b.tag===5||b.tag===6)d.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===t)break e;for(;b.sibling===null;){if(b.return===null||b.return===t)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}t.stateNode=d;e:switch(Ft(d,c,l),c){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ro(t)}}return vt(t),md(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,o),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Ro(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(i(166));if(e=J.current,xr(t)){if(e=t.stateNode,o=t.memoizedProps,l=null,c=Vt,c!==null)switch(c.tag){case 27:case 5:l=c.memoizedProps}e[Oe]=t,e=!!(e.nodeValue===o||l!==null&&l.suppressHydrationWarning===!0||hy(e.nodeValue,o)),e||Qo(t,!0)}else e=Cs(e).createTextNode(l),e[Oe]=t,t.stateNode=e}return vt(t),null;case 31:if(o=t.memoizedState,e===null||e.memoizedState!==null){if(l=xr(t),o!==null){if(e===null){if(!l)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[Oe]=t}else $a(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),e=!1}else o=Cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),e=!0;if(!e)return t.flags&256?(_n(t),t):(_n(t),null);if((t.flags&128)!==0)throw Error(i(558))}return vt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=xr(t),l!==null&&l.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[Oe]=t}else $a(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),c=!1}else c=Cu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(_n(t),t):(_n(t),null)}return _n(t),(t.flags&128)!==0?(t.lanes=o,t):(o=l!==null,e=e!==null&&e.memoizedState!==null,o&&(l=t.child,c=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(c=l.alternate.memoizedState.cachePool.pool),d=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(d=l.memoizedState.cachePool.pool),d!==c&&(l.flags|=2048)),o!==e&&o&&(t.child.flags|=8192),cs(t,t.updateQueue),vt(t),null);case 4:return re(),e===null&&Ld(t.stateNode.containerInfo),vt(t),null;case 10:return Ao(t.type),vt(t),null;case 19:if(U(Mt),l=t.memoizedState,l===null)return vt(t),null;if(c=(t.flags&128)!==0,d=l.rendering,d===null)if(c)kl(l,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Qi(e),d!==null){for(t.flags|=128,kl(l,!1),e=d.updateQueue,t.updateQueue=e,cs(t,e),t.subtreeFlags=0,e=o,o=t.child;o!==null;)Vm(o,e),o=o.sibling;return H(Mt,Mt.current&1|2),Fe&&Co(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&St()>ms&&(t.flags|=128,c=!0,kl(l,!1),t.lanes=4194304)}else{if(!c)if(e=Qi(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,cs(t,e),kl(l,!0),l.tail===null&&l.tailMode==="hidden"&&!d.alternate&&!Fe)return vt(t),null}else 2*St()-l.renderingStartTime>ms&&o!==536870912&&(t.flags|=128,c=!0,kl(l,!1),t.lanes=4194304);l.isBackwards?(d.sibling=t.child,t.child=d):(e=l.last,e!==null?e.sibling=d:t.child=d,l.last=d)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=St(),e.sibling=null,o=Mt.current,H(Mt,c?o&1|2:o&1),Fe&&Co(t,l.treeForkCount),e):(vt(t),null);case 22:case 23:return _n(t),Hu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(o&536870912)!==0&&(t.flags&128)===0&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),o=t.updateQueue,o!==null&&cs(t,o.retryQueue),o=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==o&&(t.flags|=2048),e!==null&&U(Va),null;case 24:return o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Ao(Dt),vt(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zw(e,t){switch(wu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ao(Dt),re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Se(t),null;case 31:if(t.memoizedState!==null){if(_n(t),t.alternate===null)throw Error(i(340));$a()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(_n(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));$a()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(Mt),null;case 4:return re(),null;case 10:return Ao(t.type),null;case 22:case 23:return _n(t),Hu(),e!==null&&U(Va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ao(Dt),null;case 25:return null;default:return null}}function vg(e,t){switch(wu(t),t.tag){case 3:Ao(Dt),re();break;case 26:case 27:case 5:Se(t);break;case 4:re();break;case 31:t.memoizedState!==null&&_n(t);break;case 13:_n(t);break;case 19:U(Mt);break;case 10:Ao(t.type);break;case 22:case 23:_n(t),Hu(),e!==null&&U(Va);break;case 24:Ao(Dt)}}function Ll(e,t){try{var o=t.updateQueue,l=o!==null?o.lastEffect:null;if(l!==null){var c=l.next;o=c;do{if((o.tag&e)===e){l=void 0;var d=o.create,b=o.inst;l=d(),b.destroy=l}o=o.next}while(o!==c)}}catch(w){rt(t,t.return,w)}}function oa(e,t,o){try{var l=t.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var d=c.next;l=d;do{if((l.tag&e)===e){var b=l.inst,w=b.destroy;if(w!==void 0){b.destroy=void 0,c=t;var k=o,Q=w;try{Q()}catch(le){rt(c,k,le)}}}l=l.next}while(l!==d)}}catch(le){rt(t,t.return,le)}}function bg(e){var t=e.updateQueue;if(t!==null){var o=e.stateNode;try{cp(t,o)}catch(l){rt(e,e.return,l)}}}function xg(e,t,o){o.props=Qa(e.type,e.memoizedProps),o.state=e.memoizedState;try{o.componentWillUnmount()}catch(l){rt(e,t,l)}}function Hl(e,t){try{var o=e.ref;if(o!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof o=="function"?e.refCleanup=o(l):o.current=l}}catch(c){rt(e,t,c)}}function so(e,t){var o=e.ref,l=e.refCleanup;if(o!==null)if(typeof l=="function")try{l()}catch(c){rt(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(c){rt(e,t,c)}else o.current=null}function Sg(e){var t=e.type,o=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":o.autoFocus&&l.focus();break e;case"img":o.src?l.src=o.src:o.srcSet&&(l.srcset=o.srcSet)}}catch(c){rt(e,e.return,c)}}function pd(e,t,o){try{var l=e.stateNode;n2(l,e.type,o,t),l[Pe]=t}catch(c){rt(e,e.return,c)}}function wg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ua(e.type)||e.tag===4}function gd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ua(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function yd(e,t,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(e,t):(t=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,t.appendChild(e),o=o._reactRootContainer,o!=null||t.onclick!==null||(t.onclick=So));else if(l!==4&&(l===27&&ua(e.type)&&(o=e.stateNode,t=null),e=e.child,e!==null))for(yd(e,t,o),e=e.sibling;e!==null;)yd(e,t,o),e=e.sibling}function us(e,t,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?o.insertBefore(e,t):o.appendChild(e);else if(l!==4&&(l===27&&ua(e.type)&&(o=e.stateNode),e=e.child,e!==null))for(us(e,t,o),e=e.sibling;e!==null;)us(e,t,o),e=e.sibling}function Eg(e){var t=e.stateNode,o=e.memoizedProps;try{for(var l=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Ft(t,l,o),t[Oe]=e,t[Pe]=o}catch(d){rt(e,e.return,d)}}var Oo=!1,kt=!1,vd=!1,Cg=typeof WeakSet=="function"?WeakSet:Set,$t=null;function kw(e,t){if(e=e.containerInfo,Ud=Os,e=Lm(e),du(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var c=l.anchorOffset,d=l.focusNode;l=l.focusOffset;try{o.nodeType,d.nodeType}catch{o=null;break e}var b=0,w=-1,k=-1,Q=0,le=0,ue=e,Z=null;t:for(;;){for(var oe;ue!==o||c!==0&&ue.nodeType!==3||(w=b+c),ue!==d||l!==0&&ue.nodeType!==3||(k=b+l),ue.nodeType===3&&(b+=ue.nodeValue.length),(oe=ue.firstChild)!==null;)Z=ue,ue=oe;for(;;){if(ue===e)break t;if(Z===o&&++Q===c&&(w=b),Z===d&&++le===l&&(k=b),(oe=ue.nextSibling)!==null)break;ue=Z,Z=ue.parentNode}ue=oe}o=w===-1||k===-1?null:{start:w,end:k}}else o=null}o=o||{start:0,end:0}}else o=null;for(Id={focusedElem:e,selectionRange:o},Os=!1,$t=t;$t!==null;)if(t=$t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$t=e;else for(;$t!==null;){switch(t=$t,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(o=0;o<e.length;o++)c=e[o],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,o=t,c=d.memoizedProps,d=d.memoizedState,l=o.stateNode;try{var we=Qa(o.type,c);e=l.getSnapshotBeforeUpdate(we,d),l.__reactInternalSnapshotBeforeUpdate=e}catch(Re){rt(o,o.return,Re)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,o=e.nodeType,o===9)Gd(e);else if(o===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Gd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,$t=e;break}$t=t.return}}function Tg(e,t,o){var l=o.flags;switch(o.tag){case 0:case 11:case 15:jo(e,o),l&4&&Ll(5,o);break;case 1:if(jo(e,o),l&4)if(e=o.stateNode,t===null)try{e.componentDidMount()}catch(b){rt(o,o.return,b)}else{var c=Qa(o.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(b){rt(o,o.return,b)}}l&64&&bg(o),l&512&&Hl(o,o.return);break;case 3:if(jo(e,o),l&64&&(e=o.updateQueue,e!==null)){if(t=null,o.child!==null)switch(o.child.tag){case 27:case 5:t=o.child.stateNode;break;case 1:t=o.child.stateNode}try{cp(e,t)}catch(b){rt(o,o.return,b)}}break;case 27:t===null&&l&4&&Eg(o);case 26:case 5:jo(e,o),t===null&&l&4&&Sg(o),l&512&&Hl(o,o.return);break;case 12:jo(e,o);break;case 31:jo(e,o),l&4&&_g(e,o);break;case 13:jo(e,o),l&4&&Ng(e,o),l&64&&(e=o.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(o=Yw.bind(null,o),u2(e,o))));break;case 22:if(l=o.memoizedState!==null||Oo,!l){t=t!==null&&t.memoizedState!==null||kt,c=Oo;var d=kt;Oo=l,(kt=t)&&!d?zo(e,o,(o.subtreeFlags&8772)!==0):jo(e,o),Oo=c,kt=d}break;case 30:break;default:jo(e,o)}}function Ag(e){var t=e.alternate;t!==null&&(e.alternate=null,Ag(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&At(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var bt=null,mn=!1;function Do(e,t,o){for(o=o.child;o!==null;)Mg(e,t,o),o=o.sibling}function Mg(e,t,o){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(rn,o)}catch{}switch(o.tag){case 26:kt||so(o,t),Do(e,t,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:kt||so(o,t);var l=bt,c=mn;ua(o.type)&&(bt=o.stateNode,mn=!1),Do(e,t,o),ql(o.stateNode),bt=l,mn=c;break;case 5:kt||so(o,t);case 6:if(l=bt,c=mn,bt=null,Do(e,t,o),bt=l,mn=c,bt!==null)if(mn)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(o.stateNode)}catch(d){rt(o,t,d)}else try{bt.removeChild(o.stateNode)}catch(d){rt(o,t,d)}break;case 18:bt!==null&&(mn?(e=bt,by(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,o.stateNode),Pr(e)):by(bt,o.stateNode));break;case 4:l=bt,c=mn,bt=o.stateNode.containerInfo,mn=!0,Do(e,t,o),bt=l,mn=c;break;case 0:case 11:case 14:case 15:oa(2,o,t),kt||oa(4,o,t),Do(e,t,o);break;case 1:kt||(so(o,t),l=o.stateNode,typeof l.componentWillUnmount=="function"&&xg(o,t,l)),Do(e,t,o);break;case 21:Do(e,t,o);break;case 22:kt=(l=kt)||o.memoizedState!==null,Do(e,t,o),kt=l;break;default:Do(e,t,o)}}function _g(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Pr(e)}catch(o){rt(t,t.return,o)}}}function Ng(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Pr(e)}catch(o){rt(t,t.return,o)}}function Lw(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Cg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Cg),t;default:throw Error(i(435,e.tag))}}function ds(e,t){var o=Lw(e);t.forEach(function(l){if(!o.has(l)){o.add(l);var c=Vw.bind(null,e,l);l.then(c,c)}})}function pn(e,t){var o=t.deletions;if(o!==null)for(var l=0;l<o.length;l++){var c=o[l],d=e,b=t,w=b;e:for(;w!==null;){switch(w.tag){case 27:if(ua(w.type)){bt=w.stateNode,mn=!1;break e}break;case 5:bt=w.stateNode,mn=!1;break e;case 3:case 4:bt=w.stateNode.containerInfo,mn=!0;break e}w=w.return}if(bt===null)throw Error(i(160));Mg(d,b,c),bt=null,mn=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Rg(t,e),t=t.sibling}var Zn=null;function Rg(e,t){var o=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pn(t,e),gn(e),l&4&&(oa(3,e,e.return),Ll(3,e),oa(5,e,e.return));break;case 1:pn(t,e),gn(e),l&512&&(kt||o===null||so(o,o.return)),l&64&&Oo&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(o=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=o===null?l:o.concat(l))));break;case 26:var c=Zn;if(pn(t,e),gn(e),l&512&&(kt||o===null||so(o,o.return)),l&4){var d=o!==null?o.memoizedState:null;if(l=e.memoizedState,o===null)if(l===null)if(e.stateNode===null){e:{l=e.type,o=e.memoizedProps,c=c.ownerDocument||c;t:switch(l){case"title":d=c.getElementsByTagName("title")[0],(!d||d[Yt]||d[Oe]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(l),c.head.insertBefore(d,c.querySelector("head > title"))),Ft(d,l,o),d[Oe]=e,Ot(d),l=d;break e;case"link":var b=Ry("link","href",c).get(l+(o.href||""));if(b){for(var w=0;w<b.length;w++)if(d=b[w],d.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&d.getAttribute("rel")===(o.rel==null?null:o.rel)&&d.getAttribute("title")===(o.title==null?null:o.title)&&d.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){b.splice(w,1);break t}}d=c.createElement(l),Ft(d,l,o),c.head.appendChild(d);break;case"meta":if(b=Ry("meta","content",c).get(l+(o.content||""))){for(w=0;w<b.length;w++)if(d=b[w],d.getAttribute("content")===(o.content==null?null:""+o.content)&&d.getAttribute("name")===(o.name==null?null:o.name)&&d.getAttribute("property")===(o.property==null?null:o.property)&&d.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&d.getAttribute("charset")===(o.charSet==null?null:o.charSet)){b.splice(w,1);break t}}d=c.createElement(l),Ft(d,l,o),c.head.appendChild(d);break;default:throw Error(i(468,l))}d[Oe]=e,Ot(d),l=d}e.stateNode=l}else Oy(c,e.type,e.stateNode);else e.stateNode=Ny(c,l,e.memoizedProps);else d!==l?(d===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):d.count--,l===null?Oy(c,e.type,e.stateNode):Ny(c,l,e.memoizedProps)):l===null&&e.stateNode!==null&&pd(e,e.memoizedProps,o.memoizedProps)}break;case 27:pn(t,e),gn(e),l&512&&(kt||o===null||so(o,o.return)),o!==null&&l&4&&pd(e,e.memoizedProps,o.memoizedProps);break;case 5:if(pn(t,e),gn(e),l&512&&(kt||o===null||so(o,o.return)),e.flags&32){c=e.stateNode;try{ur(c,"")}catch(we){rt(e,e.return,we)}}l&4&&e.stateNode!=null&&(c=e.memoizedProps,pd(e,c,o!==null?o.memoizedProps:c)),l&1024&&(vd=!0);break;case 6:if(pn(t,e),gn(e),l&4){if(e.stateNode===null)throw Error(i(162));l=e.memoizedProps,o=e.stateNode;try{o.nodeValue=l}catch(we){rt(e,e.return,we)}}break;case 3:if(Ms=null,c=Zn,Zn=Ts(t.containerInfo),pn(t,e),Zn=c,gn(e),l&4&&o!==null&&o.memoizedState.isDehydrated)try{Pr(t.containerInfo)}catch(we){rt(e,e.return,we)}vd&&(vd=!1,Og(e));break;case 4:l=Zn,Zn=Ts(e.stateNode.containerInfo),pn(t,e),gn(e),Zn=l;break;case 12:pn(t,e),gn(e);break;case 31:pn(t,e),gn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ds(e,l)));break;case 13:pn(t,e),gn(e),e.child.flags&8192&&e.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(hs=St()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ds(e,l)));break;case 22:c=e.memoizedState!==null;var k=o!==null&&o.memoizedState!==null,Q=Oo,le=kt;if(Oo=Q||c,kt=le||k,pn(t,e),kt=le,Oo=Q,gn(e),l&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(o===null||k||Oo||kt||Za(e)),o=null,t=e;;){if(t.tag===5||t.tag===26){if(o===null){k=o=t;try{if(d=k.stateNode,c)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{w=k.stateNode;var ue=k.memoizedProps.style,Z=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;w.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(we){rt(k,k.return,we)}}}else if(t.tag===6){if(o===null){k=t;try{k.stateNode.nodeValue=c?"":k.memoizedProps}catch(we){rt(k,k.return,we)}}}else if(t.tag===18){if(o===null){k=t;try{var oe=k.stateNode;c?xy(oe,!0):xy(k.stateNode,!1)}catch(we){rt(k,k.return,we)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;o===t&&(o=null),t=t.return}o===t&&(o=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(o=l.retryQueue,o!==null&&(l.retryQueue=null,ds(e,o))));break;case 19:pn(t,e),gn(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ds(e,l)));break;case 30:break;case 21:break;default:pn(t,e),gn(e)}}function gn(e){var t=e.flags;if(t&2){try{for(var o,l=e.return;l!==null;){if(wg(l)){o=l;break}l=l.return}if(o==null)throw Error(i(160));switch(o.tag){case 27:var c=o.stateNode,d=gd(e);us(e,d,c);break;case 5:var b=o.stateNode;o.flags&32&&(ur(b,""),o.flags&=-33);var w=gd(e);us(e,w,b);break;case 3:case 4:var k=o.stateNode.containerInfo,Q=gd(e);yd(e,Q,k);break;default:throw Error(i(161))}}catch(le){rt(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Og(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Og(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function jo(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Tg(e,t.alternate,t),t=t.sibling}function Za(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:oa(4,t,t.return),Za(t);break;case 1:so(t,t.return);var o=t.stateNode;typeof o.componentWillUnmount=="function"&&xg(t,t.return,o),Za(t);break;case 27:ql(t.stateNode);case 26:case 5:so(t,t.return),Za(t);break;case 22:t.memoizedState===null&&Za(t);break;case 30:Za(t);break;default:Za(t)}e=e.sibling}}function zo(e,t,o){for(o=o&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,c=e,d=t,b=d.flags;switch(d.tag){case 0:case 11:case 15:zo(c,d,o),Ll(4,d);break;case 1:if(zo(c,d,o),l=d,c=l.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(Q){rt(l,l.return,Q)}if(l=d,c=l.updateQueue,c!==null){var w=l.stateNode;try{var k=c.shared.hiddenCallbacks;if(k!==null)for(c.shared.hiddenCallbacks=null,c=0;c<k.length;c++)sp(k[c],w)}catch(Q){rt(l,l.return,Q)}}o&&b&64&&bg(d),Hl(d,d.return);break;case 27:Eg(d);case 26:case 5:zo(c,d,o),o&&l===null&&b&4&&Sg(d),Hl(d,d.return);break;case 12:zo(c,d,o);break;case 31:zo(c,d,o),o&&b&4&&_g(c,d);break;case 13:zo(c,d,o),o&&b&4&&Ng(c,d);break;case 22:d.memoizedState===null&&zo(c,d,o),Hl(d,d.return);break;case 30:break;default:zo(c,d,o)}t=t.sibling}}function bd(e,t){var o=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(o=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==o&&(e!=null&&e.refCount++,o!=null&&El(o))}function xd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&El(e))}function Wn(e,t,o,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Dg(e,t,o,l),t=t.sibling}function Dg(e,t,o,l){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Wn(e,t,o,l),c&2048&&Ll(9,t);break;case 1:Wn(e,t,o,l);break;case 3:Wn(e,t,o,l),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&El(e)));break;case 12:if(c&2048){Wn(e,t,o,l),e=t.stateNode;try{var d=t.memoizedProps,b=d.id,w=d.onPostCommit;typeof w=="function"&&w(b,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(k){rt(t,t.return,k)}}else Wn(e,t,o,l);break;case 31:Wn(e,t,o,l);break;case 13:Wn(e,t,o,l);break;case 23:break;case 22:d=t.stateNode,b=t.alternate,t.memoizedState!==null?d._visibility&2?Wn(e,t,o,l):Bl(e,t):d._visibility&2?Wn(e,t,o,l):(d._visibility|=2,Rr(e,t,o,l,(t.subtreeFlags&10256)!==0||!1)),c&2048&&bd(b,t);break;case 24:Wn(e,t,o,l),c&2048&&xd(t.alternate,t);break;default:Wn(e,t,o,l)}}function Rr(e,t,o,l,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,b=t,w=o,k=l,Q=b.flags;switch(b.tag){case 0:case 11:case 15:Rr(d,b,w,k,c),Ll(8,b);break;case 23:break;case 22:var le=b.stateNode;b.memoizedState!==null?le._visibility&2?Rr(d,b,w,k,c):Bl(d,b):(le._visibility|=2,Rr(d,b,w,k,c)),c&&Q&2048&&bd(b.alternate,b);break;case 24:Rr(d,b,w,k,c),c&&Q&2048&&xd(b.alternate,b);break;default:Rr(d,b,w,k,c)}t=t.sibling}}function Bl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var o=e,l=t,c=l.flags;switch(l.tag){case 22:Bl(o,l),c&2048&&bd(l.alternate,l);break;case 24:Bl(o,l),c&2048&&xd(l.alternate,l);break;default:Bl(o,l)}t=t.sibling}}var Ul=8192;function Or(e,t,o){if(e.subtreeFlags&Ul)for(e=e.child;e!==null;)jg(e,t,o),e=e.sibling}function jg(e,t,o){switch(e.tag){case 26:Or(e,t,o),e.flags&Ul&&e.memoizedState!==null&&w2(o,Zn,e.memoizedState,e.memoizedProps);break;case 5:Or(e,t,o);break;case 3:case 4:var l=Zn;Zn=Ts(e.stateNode.containerInfo),Or(e,t,o),Zn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Ul,Ul=16777216,Or(e,t,o),Ul=l):Or(e,t,o));break;default:Or(e,t,o)}}function zg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Il(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var o=0;o<t.length;o++){var l=t[o];$t=l,Lg(l,e)}zg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kg(e),e=e.sibling}function kg(e){switch(e.tag){case 0:case 11:case 15:Il(e),e.flags&2048&&oa(9,e,e.return);break;case 3:Il(e);break;case 12:Il(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,fs(e)):Il(e);break;default:Il(e)}}function fs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var o=0;o<t.length;o++){var l=t[o];$t=l,Lg(l,e)}zg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:oa(8,t,t.return),fs(t);break;case 22:o=t.stateNode,o._visibility&2&&(o._visibility&=-3,fs(t));break;default:fs(t)}e=e.sibling}}function Lg(e,t){for(;$t!==null;){var o=$t;switch(o.tag){case 0:case 11:case 15:oa(8,o,t);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var l=o.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:El(o.memoizedState.cache)}if(l=o.child,l!==null)l.return=o,$t=l;else e:for(o=e;$t!==null;){l=$t;var c=l.sibling,d=l.return;if(Ag(l),l===o){$t=null;break e}if(c!==null){c.return=d,$t=c;break e}$t=d}}}var Hw={getCacheForType:function(e){var t=qt(Dt),o=t.data.get(e);return o===void 0&&(o=e(),t.data.set(e,o)),o},cacheSignal:function(){return qt(Dt).controller.signal}},Bw=typeof WeakMap=="function"?WeakMap:Map,tt=0,dt=null,Ye=null,qe=0,at=0,Nn=null,aa=!1,Dr=!1,Sd=!1,ko=0,Et=0,ra=0,Wa=0,wd=0,Rn=0,jr=0,Pl=null,yn=null,Ed=!1,hs=0,Hg=0,ms=1/0,ps=null,la=null,Bt=0,ia=null,zr=null,Lo=0,Cd=0,Td=null,Bg=null,$l=0,Ad=null;function On(){return(tt&2)!==0&&qe!==0?qe&-qe:T.T!==null?Dd():me()}function Ug(){if(Rn===0)if((qe&536870912)===0||Fe){var e=Kn;Kn<<=1,(Kn&3932160)===0&&(Kn=262144),Rn=e}else Rn=536870912;return e=Mn.current,e!==null&&(e.flags|=32),Rn}function vn(e,t,o){(e===dt&&(at===2||at===9)||e.cancelPendingCommit!==null)&&(kr(e,0),sa(e,qe,Rn,!1)),mt(e,o),((tt&2)===0||e!==dt)&&(e===dt&&((tt&2)===0&&(Wa|=o),Et===4&&sa(e,qe,Rn,!1)),co(e))}function Ig(e,t,o){if((tt&6)!==0)throw Error(i(327));var l=!o&&(t&127)===0&&(t&e.expiredLanes)===0||ht(e,t),c=l?Pw(e,t):_d(e,t,!0),d=l;do{if(c===0){Dr&&!l&&sa(e,t,0,!1);break}else{if(o=e.current.alternate,d&&!Uw(o)){c=_d(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){t=b;e:{var w=e;c=Pl;var k=w.current.memoizedState.isDehydrated;if(k&&(kr(w,b).flags|=256),b=_d(w,b,!1),b!==2){if(Sd&&!k){w.errorRecoveryDisabledLanes|=d,Wa|=d,c=4;break e}d=yn,yn=c,d!==null&&(yn===null?yn=d:yn.push.apply(yn,d))}c=b}if(d=!1,c!==2)continue}}if(c===1){kr(e,0),sa(e,t,0,!0);break}e:{switch(l=e,d=c,d){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:sa(l,t,Rn,!aa);break e;case 2:yn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=hs+300-St(),10<c)){if(sa(l,t,Rn,!aa),ze(l,0,!0)!==0)break e;Lo=t,l.timeoutHandle=yy(Pg.bind(null,l,o,yn,ps,Ed,t,Rn,Wa,jr,aa,d,"Throttled",-0,0),c);break e}Pg(l,o,yn,ps,Ed,t,Rn,Wa,jr,aa,d,null,-0,0)}}break}while(!0);co(e)}function Pg(e,t,o,l,c,d,b,w,k,Q,le,ue,Z,oe){if(e.timeoutHandle=-1,ue=t.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:So},jg(t,d,ue);var we=(d&62914560)===d?hs-St():(d&4194048)===d?Hg-St():0;if(we=E2(ue,we),we!==null){Lo=d,e.cancelPendingCommit=we(Kg.bind(null,e,t,d,o,l,c,b,w,k,le,ue,null,Z,oe)),sa(e,d,b,!Q);return}}Kg(e,t,d,o,l,c,b,w,k)}function Uw(e){for(var t=e;;){var o=t.tag;if((o===0||o===11||o===15)&&t.flags&16384&&(o=t.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var l=0;l<o.length;l++){var c=o[l],d=c.getSnapshot;c=c.value;try{if(!Tn(d(),c))return!1}catch{return!1}}if(o=t.child,t.subtreeFlags&16384&&o!==null)o.return=t,t=o;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function sa(e,t,o,l){t&=~wd,t&=~Wa,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var c=t;0<c;){var d=31-ut(c),b=1<<d;l[d]=-1,c&=~b}o!==0&&bo(e,o,t)}function gs(){return(tt&6)===0?(Gl(0),!1):!0}function Md(){if(Ye!==null){if(at===0)var e=Ye.return;else e=Ye,To=Ga=null,Gu(e),Tr=null,Tl=0,e=Ye;for(;e!==null;)vg(e.alternate,e),e=e.return;Ye=null}}function kr(e,t){var o=e.timeoutHandle;o!==-1&&(e.timeoutHandle=-1,r2(o)),o=e.cancelPendingCommit,o!==null&&(e.cancelPendingCommit=null,o()),Lo=0,Md(),dt=e,Ye=o=Eo(e.current,null),qe=t,at=0,Nn=null,aa=!1,Dr=ht(e,t),Sd=!1,jr=Rn=wd=Wa=ra=Et=0,yn=Pl=null,Ed=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var c=31-ut(l),d=1<<c;t|=e[c],l&=~d}return ko=t,Hi(),o}function $g(e,t){He=null,T.H=jl,t===Cr||t===Vi?(t=ap(),at=3):t===Ou?(t=ap(),at=4):at=t===rd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Nn=t,Ye===null&&(Et=1,rs(e,In(t,e.current)))}function Gg(){var e=Mn.current;return e===null?!0:(qe&4194048)===qe?Yn===null:(qe&62914560)===qe||(qe&536870912)!==0?e===Yn:!1}function Yg(){var e=T.H;return T.H=jl,e===null?jl:e}function Vg(){var e=T.A;return T.A=Hw,e}function ys(){Et=4,aa||(qe&4194048)!==qe&&Mn.current!==null||(Dr=!0),(ra&134217727)===0&&(Wa&134217727)===0||dt===null||sa(dt,qe,Rn,!1)}function _d(e,t,o){var l=tt;tt|=2;var c=Yg(),d=Vg();(dt!==e||qe!==t)&&(ps=null,kr(e,t)),t=!1;var b=Et;e:do try{if(at!==0&&Ye!==null){var w=Ye,k=Nn;switch(at){case 8:Md(),b=6;break e;case 3:case 2:case 9:case 6:Mn.current===null&&(t=!0);var Q=at;if(at=0,Nn=null,Lr(e,w,k,Q),o&&Dr){b=0;break e}break;default:Q=at,at=0,Nn=null,Lr(e,w,k,Q)}}Iw(),b=Et;break}catch(le){$g(e,le)}while(!0);return t&&e.shellSuspendCounter++,To=Ga=null,tt=l,T.H=c,T.A=d,Ye===null&&(dt=null,qe=0,Hi()),b}function Iw(){for(;Ye!==null;)qg(Ye)}function Pw(e,t){var o=tt;tt|=2;var l=Yg(),c=Vg();dt!==e||qe!==t?(ps=null,ms=St()+500,kr(e,t)):Dr=ht(e,t);e:do try{if(at!==0&&Ye!==null){t=Ye;var d=Nn;t:switch(at){case 1:at=0,Nn=null,Lr(e,t,d,1);break;case 2:case 9:if(np(d)){at=0,Nn=null,Xg(t);break}t=function(){at!==2&&at!==9||dt!==e||(at=7),co(e)},d.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:np(d)?(at=0,Nn=null,Xg(t)):(at=0,Nn=null,Lr(e,t,d,7));break;case 5:var b=null;switch(Ye.tag){case 26:b=Ye.memoizedState;case 5:case 27:var w=Ye;if(b?Dy(b):w.stateNode.complete){at=0,Nn=null;var k=w.sibling;if(k!==null)Ye=k;else{var Q=w.return;Q!==null?(Ye=Q,vs(Q)):Ye=null}break t}}at=0,Nn=null,Lr(e,t,d,5);break;case 6:at=0,Nn=null,Lr(e,t,d,6);break;case 8:Md(),Et=6;break e;default:throw Error(i(462))}}$w();break}catch(le){$g(e,le)}while(!0);return To=Ga=null,T.H=l,T.A=c,tt=o,Ye!==null?0:(dt=null,qe=0,Hi(),Et)}function $w(){for(;Ye!==null&&!Tt();)qg(Ye)}function qg(e){var t=gg(e.alternate,e,ko);e.memoizedProps=e.pendingProps,t===null?vs(e):Ye=t}function Xg(e){var t=e,o=t.alternate;switch(t.tag){case 15:case 0:t=ug(o,t,t.pendingProps,t.type,void 0,qe);break;case 11:t=ug(o,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:Gu(t);default:vg(o,t),t=Ye=Vm(t,ko),t=gg(o,t,ko)}e.memoizedProps=e.pendingProps,t===null?vs(e):Ye=t}function Lr(e,t,o,l){To=Ga=null,Gu(t),Tr=null,Tl=0;var c=t.return;try{if(Rw(e,c,t,o,qe)){Et=1,rs(e,In(o,e.current)),Ye=null;return}}catch(d){if(c!==null)throw Ye=c,d;Et=1,rs(e,In(o,e.current)),Ye=null;return}t.flags&32768?(Fe||l===1?e=!0:Dr||(qe&536870912)!==0?e=!1:(aa=e=!0,(l===2||l===9||l===3||l===6)&&(l=Mn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Fg(t,e)):vs(t)}function vs(e){var t=e;do{if((t.flags&32768)!==0){Fg(t,aa);return}e=t.return;var o=jw(t.alternate,t,ko);if(o!==null){Ye=o;return}if(t=t.sibling,t!==null){Ye=t;return}Ye=t=e}while(t!==null);Et===0&&(Et=5)}function Fg(e,t){do{var o=zw(e.alternate,e);if(o!==null){o.flags&=32767,Ye=o;return}if(o=e.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!t&&(e=e.sibling,e!==null)){Ye=e;return}Ye=e=o}while(e!==null);Et=6,Ye=null}function Kg(e,t,o,l,c,d,b,w,k){e.cancelPendingCommit=null;do bs();while(Bt!==0);if((tt&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(d=t.lanes|t.childLanes,d|=gu,Zt(e,o,d,b,w,k),e===dt&&(Ye=dt=null,qe=0),zr=t,ia=e,Lo=o,Cd=d,Td=c,Bg=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,qw(Ne,function(){return ey(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=T.T,T.T=null,c=O.p,O.p=2,b=tt,tt|=4;try{kw(e,t,o)}finally{tt=b,O.p=c,T.T=l}}Bt=1,Qg(),Zg(),Wg()}}function Qg(){if(Bt===1){Bt=0;var e=ia,t=zr,o=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||o){o=T.T,T.T=null;var l=O.p;O.p=2;var c=tt;tt|=4;try{Rg(t,e);var d=Id,b=Lm(e.containerInfo),w=d.focusedElem,k=d.selectionRange;if(b!==w&&w&&w.ownerDocument&&km(w.ownerDocument.documentElement,w)){if(k!==null&&du(w)){var Q=k.start,le=k.end;if(le===void 0&&(le=Q),"selectionStart"in w)w.selectionStart=Q,w.selectionEnd=Math.min(le,w.value.length);else{var ue=w.ownerDocument||document,Z=ue&&ue.defaultView||window;if(Z.getSelection){var oe=Z.getSelection(),we=w.textContent.length,Re=Math.min(k.start,we),ct=k.end===void 0?Re:Math.min(k.end,we);!oe.extend&&Re>ct&&(b=ct,ct=Re,Re=b);var G=zm(w,Re),I=zm(w,ct);if(G&&I&&(oe.rangeCount!==1||oe.anchorNode!==G.node||oe.anchorOffset!==G.offset||oe.focusNode!==I.node||oe.focusOffset!==I.offset)){var F=ue.createRange();F.setStart(G.node,G.offset),oe.removeAllRanges(),Re>ct?(oe.addRange(F),oe.extend(I.node,I.offset)):(F.setEnd(I.node,I.offset),oe.addRange(F))}}}}for(ue=[],oe=w;oe=oe.parentNode;)oe.nodeType===1&&ue.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ue.length;w++){var se=ue[w];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Os=!!Ud,Id=Ud=null}finally{tt=c,O.p=l,T.T=o}}e.current=t,Bt=2}}function Zg(){if(Bt===2){Bt=0;var e=ia,t=zr,o=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||o){o=T.T,T.T=null;var l=O.p;O.p=2;var c=tt;tt|=4;try{Tg(e,t.alternate,t)}finally{tt=c,O.p=l,T.T=o}}Bt=3}}function Wg(){if(Bt===4||Bt===3){Bt=0,on();var e=ia,t=zr,o=Lo,l=Bg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Bt=5:(Bt=0,zr=ia=null,Jg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(la=null),ce(o),t=t.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(rn,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=T.T,c=O.p,O.p=2,T.T=null;try{for(var d=e.onRecoverableError,b=0;b<l.length;b++){var w=l[b];d(w.value,{componentStack:w.stack})}}finally{T.T=t,O.p=c}}(Lo&3)!==0&&bs(),co(e),c=e.pendingLanes,(o&261930)!==0&&(c&42)!==0?e===Ad?$l++:($l=0,Ad=e):$l=0,Gl(0)}}function Jg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,El(t)))}function bs(){return Qg(),Zg(),Wg(),ey()}function ey(){if(Bt!==5)return!1;var e=ia,t=Cd;Cd=0;var o=ce(Lo),l=T.T,c=O.p;try{O.p=32>o?32:o,T.T=null,o=Td,Td=null;var d=ia,b=Lo;if(Bt=0,zr=ia=null,Lo=0,(tt&6)!==0)throw Error(i(331));var w=tt;if(tt|=4,kg(d.current),Dg(d,d.current,b,o),tt=w,Gl(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(rn,d)}catch{}return!0}finally{O.p=c,T.T=l,Jg(e,t)}}function ty(e,t,o){t=In(o,t),t=ad(e.stateNode,t,2),e=ea(e,t,2),e!==null&&(mt(e,2),co(e))}function rt(e,t,o){if(e.tag===3)ty(e,e,o);else for(;t!==null;){if(t.tag===3){ty(t,e,o);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(la===null||!la.has(l))){e=In(o,e),o=ng(2),l=ea(t,o,2),l!==null&&(og(o,l,t,e),mt(l,2),co(l));break}}t=t.return}}function Nd(e,t,o){var l=e.pingCache;if(l===null){l=e.pingCache=new Bw;var c=new Set;l.set(t,c)}else c=l.get(t),c===void 0&&(c=new Set,l.set(t,c));c.has(o)||(Sd=!0,c.add(o),e=Gw.bind(null,e,t,o),t.then(e,e))}function Gw(e,t,o){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&o,e.warmLanes&=~o,dt===e&&(qe&o)===o&&(Et===4||Et===3&&(qe&62914560)===qe&&300>St()-hs?(tt&2)===0&&kr(e,0):wd|=o,jr===qe&&(jr=0)),co(e)}function ny(e,t){t===0&&(t=Pt()),e=Ia(e,t),e!==null&&(mt(e,t),co(e))}function Yw(e){var t=e.memoizedState,o=0;t!==null&&(o=t.retryLane),ny(e,o)}function Vw(e,t){var o=0;switch(e.tag){case 31:case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(o=c.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(i(314))}l!==null&&l.delete(t),ny(e,o)}function qw(e,t){return Sn(e,t)}var xs=null,Hr=null,Rd=!1,Ss=!1,Od=!1,ca=0;function co(e){e!==Hr&&e.next===null&&(Hr===null?xs=Hr=e:Hr=Hr.next=e),Ss=!0,Rd||(Rd=!0,Fw())}function Gl(e,t){if(!Od&&Ss){Od=!0;do for(var o=!1,l=xs;l!==null;){if(e!==0){var c=l.pendingLanes;if(c===0)var d=0;else{var b=l.suspendedLanes,w=l.pingedLanes;d=(1<<31-ut(42|e)+1)-1,d&=c&~(b&~w),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(o=!0,ly(l,d))}else d=qe,d=ze(l,l===dt?d:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(d&3)===0||ht(l,d)||(o=!0,ly(l,d));l=l.next}while(o);Od=!1}}function Xw(){oy()}function oy(){Ss=Rd=!1;var e=0;ca!==0&&a2()&&(e=ca);for(var t=St(),o=null,l=xs;l!==null;){var c=l.next,d=ay(l,t);d===0?(l.next=null,o===null?xs=c:o.next=c,c===null&&(Hr=o)):(o=l,(e!==0||(d&3)!==0)&&(Ss=!0)),l=c}Bt!==0&&Bt!==5||Gl(e),ca!==0&&(ca=0)}function ay(e,t){for(var o=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-ut(d),w=1<<b,k=c[b];k===-1?((w&o)===0||(w&l)!==0)&&(c[b]=Rt(w,t)):k<=t&&(e.expiredLanes|=w),d&=~w}if(t=dt,o=qe,o=ze(e,e===t?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,o===0||e===t&&(at===2||at===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&wn(l),e.callbackNode=null,e.callbackPriority=0;if((o&3)===0||ht(e,o)){if(t=o&-o,t===e.callbackPriority)return t;switch(l!==null&&wn(l),ce(o)){case 2:case 8:o=Je;break;case 32:o=Ne;break;case 268435456:o=Gt;break;default:o=Ne}return l=ry.bind(null,e),o=Sn(o,l),e.callbackPriority=t,e.callbackNode=o,t}return l!==null&&l!==null&&wn(l),e.callbackPriority=2,e.callbackNode=null,2}function ry(e,t){if(Bt!==0&&Bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var o=e.callbackNode;if(bs()&&e.callbackNode!==o)return null;var l=qe;return l=ze(e,e===dt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Ig(e,l,t),ay(e,St()),e.callbackNode!=null&&e.callbackNode===o?ry.bind(null,e):null)}function ly(e,t){if(bs())return null;Ig(e,t,!0)}function Fw(){l2(function(){(tt&6)!==0?Sn(je,Xw):oy()})}function Dd(){if(ca===0){var e=wr;e===0&&(e=kn,kn<<=1,(kn&261888)===0&&(kn=256)),ca=e}return ca}function iy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ni(""+e)}function sy(e,t){var o=t.ownerDocument.createElement("input");return o.name=t.name,o.value=t.value,e.id&&o.setAttribute("form",e.id),t.parentNode.insertBefore(o,t),e=new FormData(e),o.parentNode.removeChild(o),e}function Kw(e,t,o,l,c){if(t==="submit"&&o&&o.stateNode===c){var d=iy((c[Pe]||null).action),b=l.submitter;b&&(t=(t=b[Pe]||null)?iy(t.formAction):b.getAttribute("formAction"),t!==null&&(d=t,b=null));var w=new ji("action","action",null,l,c);e.push({event:w,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ca!==0){var k=b?sy(c,b):new FormData(c);Wu(o,{pending:!0,data:k,method:c.method,action:d},null,k)}}else typeof d=="function"&&(w.preventDefault(),k=b?sy(c,b):new FormData(c),Wu(o,{pending:!0,data:k,method:c.method,action:d},d,k))},currentTarget:c}]})}}for(var jd=0;jd<pu.length;jd++){var zd=pu[jd],Qw=zd.toLowerCase(),Zw=zd[0].toUpperCase()+zd.slice(1);Qn(Qw,"on"+Zw)}Qn(Um,"onAnimationEnd"),Qn(Im,"onAnimationIteration"),Qn(Pm,"onAnimationStart"),Qn("dblclick","onDoubleClick"),Qn("focusin","onFocus"),Qn("focusout","onBlur"),Qn(hw,"onTransitionRun"),Qn(mw,"onTransitionStart"),Qn(pw,"onTransitionCancel"),Qn($m,"onTransitionEnd"),qo("onMouseEnter",["mouseout","mouseover"]),qo("onMouseLeave",["mouseout","mouseover"]),qo("onPointerEnter",["pointerout","pointerover"]),qo("onPointerLeave",["pointerout","pointerover"]),Ln("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ln("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ln("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ln("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ln("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ln("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ww=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yl));function cy(e,t){t=(t&4)!==0;for(var o=0;o<e.length;o++){var l=e[o],c=l.event;l=l.listeners;e:{var d=void 0;if(t)for(var b=l.length-1;0<=b;b--){var w=l[b],k=w.instance,Q=w.currentTarget;if(w=w.listener,k!==d&&c.isPropagationStopped())break e;d=w,c.currentTarget=Q;try{d(c)}catch(le){Li(le)}c.currentTarget=null,d=k}else for(b=0;b<l.length;b++){if(w=l[b],k=w.instance,Q=w.currentTarget,w=w.listener,k!==d&&c.isPropagationStopped())break e;d=w,c.currentTarget=Q;try{d(c)}catch(le){Li(le)}c.currentTarget=null,d=k}}}}function Ve(e,t){var o=t[et];o===void 0&&(o=t[et]=new Set);var l=e+"__bubble";o.has(l)||(uy(t,e,2,!1),o.add(l))}function kd(e,t,o){var l=0;t&&(l|=4),uy(o,e,l,t)}var ws="_reactListening"+Math.random().toString(36).slice(2);function Ld(e){if(!e[ws]){e[ws]=!0,ul.forEach(function(o){o!=="selectionchange"&&(Ww.has(o)||kd(o,!1,e),kd(o,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ws]||(t[ws]=!0,kd("selectionchange",!1,t))}}function uy(e,t,o,l){switch(Uy(t)){case 2:var c=A2;break;case 8:c=M2;break;default:c=Zd}o=c.bind(null,t,o,e),c=void 0,!nu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(t,o,{capture:!0,passive:c}):e.addEventListener(t,o,!0):c!==void 0?e.addEventListener(t,o,{passive:c}):e.addEventListener(t,o,!1)}function Hd(e,t,o,l,c){var d=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var w=l.stateNode.containerInfo;if(w===c)break;if(b===4)for(b=l.return;b!==null;){var k=b.tag;if((k===3||k===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;w!==null;){if(b=fn(w),b===null)return;if(k=b.tag,k===5||k===6||k===26||k===27){l=d=b;continue e}w=w.parentNode}}l=l.return}pm(function(){var Q=d,le=eu(o),ue=[];e:{var Z=Gm.get(e);if(Z!==void 0){var oe=ji,we=e;switch(e){case"keypress":if(Oi(o)===0)break e;case"keydown":case"keyup":oe=VS;break;case"focusin":we="focus",oe=lu;break;case"focusout":we="blur",oe=lu;break;case"beforeblur":case"afterblur":oe=lu;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=vm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=jS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=FS;break;case Um:case Im:case Pm:oe=LS;break;case $m:oe=QS;break;case"scroll":case"scrollend":oe=OS;break;case"wheel":oe=WS;break;case"copy":case"cut":case"paste":oe=BS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=xm;break;case"toggle":case"beforetoggle":oe=ew}var Re=(t&4)!==0,ct=!Re&&(e==="scroll"||e==="scrollend"),G=Re?Z!==null?Z+"Capture":null:Z;Re=[];for(var I=Q,F;I!==null;){var se=I;if(F=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||F===null||G===null||(se=fl(I,G),se!=null&&Re.push(Vl(I,se,F))),ct)break;I=I.return}0<Re.length&&(Z=new oe(Z,we,null,o,le),ue.push({event:Z,listeners:Re}))}}if((t&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",oe=e==="mouseout"||e==="pointerout",Z&&o!==Jc&&(we=o.relatedTarget||o.fromElement)&&(fn(we)||we[Qe]))break e;if((oe||Z)&&(Z=le.window===le?le:(Z=le.ownerDocument)?Z.defaultView||Z.parentWindow:window,oe?(we=o.relatedTarget||o.toElement,oe=Q,we=we?fn(we):null,we!==null&&(ct=u(we),Re=we.tag,we!==ct||Re!==5&&Re!==27&&Re!==6)&&(we=null)):(oe=null,we=Q),oe!==we)){if(Re=vm,se="onMouseLeave",G="onMouseEnter",I="mouse",(e==="pointerout"||e==="pointerover")&&(Re=xm,se="onPointerLeave",G="onPointerEnter",I="pointer"),ct=oe==null?Z:En(oe),F=we==null?Z:En(we),Z=new Re(se,I+"leave",oe,o,le),Z.target=ct,Z.relatedTarget=F,se=null,fn(le)===Q&&(Re=new Re(G,I+"enter",we,o,le),Re.target=F,Re.relatedTarget=ct,se=Re),ct=se,oe&&we)t:{for(Re=Jw,G=oe,I=we,F=0,se=G;se;se=Re(se))F++;se=0;for(var Ae=I;Ae;Ae=Re(Ae))se++;for(;0<F-se;)G=Re(G),F--;for(;0<se-F;)I=Re(I),se--;for(;F--;){if(G===I||I!==null&&G===I.alternate){Re=G;break t}G=Re(G),I=Re(I)}Re=null}else Re=null;oe!==null&&dy(ue,Z,oe,Re,!1),we!==null&&ct!==null&&dy(ue,ct,we,Re,!0)}}e:{if(Z=Q?En(Q):window,oe=Z.nodeName&&Z.nodeName.toLowerCase(),oe==="select"||oe==="input"&&Z.type==="file")var Ze=_m;else if(Am(Z))if(Nm)Ze=uw;else{Ze=sw;var Te=iw}else oe=Z.nodeName,!oe||oe.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?Q&&Wc(Q.elementType)&&(Ze=_m):Ze=cw;if(Ze&&(Ze=Ze(e,Q))){Mm(ue,Ze,o,le);break e}Te&&Te(e,Z,Q),e==="focusout"&&Q&&Z.type==="number"&&Q.memoizedProps.value!=null&&Zc(Z,"number",Z.value)}switch(Te=Q?En(Q):window,e){case"focusin":(Am(Te)||Te.contentEditable==="true")&&(mr=Te,fu=Q,xl=null);break;case"focusout":xl=fu=mr=null;break;case"mousedown":hu=!0;break;case"contextmenu":case"mouseup":case"dragend":hu=!1,Hm(ue,o,le);break;case"selectionchange":if(fw)break;case"keydown":case"keyup":Hm(ue,o,le)}var Ie;if(su)e:{switch(e){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else hr?Cm(e,o)&&(Xe="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(Xe="onCompositionStart");Xe&&(Sm&&o.locale!=="ko"&&(hr||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&hr&&(Ie=gm()):(Xo=le,ou="value"in Xo?Xo.value:Xo.textContent,hr=!0)),Te=Es(Q,Xe),0<Te.length&&(Xe=new bm(Xe,e,null,o,le),ue.push({event:Xe,listeners:Te}),Ie?Xe.data=Ie:(Ie=Tm(o),Ie!==null&&(Xe.data=Ie)))),(Ie=nw?ow(e,o):aw(e,o))&&(Xe=Es(Q,"onBeforeInput"),0<Xe.length&&(Te=new bm("onBeforeInput","beforeinput",null,o,le),ue.push({event:Te,listeners:Xe}),Te.data=Ie)),Kw(ue,e,Q,o,le)}cy(ue,t)})}function Vl(e,t,o){return{instance:e,listener:t,currentTarget:o}}function Es(e,t){for(var o=t+"Capture",l=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=fl(e,o),c!=null&&l.unshift(Vl(e,c,d)),c=fl(e,t),c!=null&&l.push(Vl(e,c,d))),e.tag===3)return l;e=e.return}return[]}function Jw(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function dy(e,t,o,l,c){for(var d=t._reactName,b=[];o!==null&&o!==l;){var w=o,k=w.alternate,Q=w.stateNode;if(w=w.tag,k!==null&&k===l)break;w!==5&&w!==26&&w!==27||Q===null||(k=Q,c?(Q=fl(o,d),Q!=null&&b.unshift(Vl(o,Q,k))):c||(Q=fl(o,d),Q!=null&&b.push(Vl(o,Q,k)))),o=o.return}b.length!==0&&e.push({event:t,listeners:b})}var e2=/\r\n?/g,t2=/\u0000|\uFFFD/g;function fy(e){return(typeof e=="string"?e:""+e).replace(e2,`
49
+ `).replace(t2,"")}function hy(e,t){return t=fy(t),fy(e)===t}function st(e,t,o,l,c,d){switch(o){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||ur(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&ur(e,""+l);break;case"className":Mi(e,"class",l);break;case"tabIndex":Mi(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Mi(e,o,l);break;case"style":hm(e,l,d);break;case"data":if(t!=="object"){Mi(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||o!=="href")){e.removeAttribute(o);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(o);break}l=Ni(""+l),e.setAttribute(o,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(o==="formAction"?(t!=="input"&&st(e,t,"name",c.name,c,null),st(e,t,"formEncType",c.formEncType,c,null),st(e,t,"formMethod",c.formMethod,c,null),st(e,t,"formTarget",c.formTarget,c,null)):(st(e,t,"encType",c.encType,c,null),st(e,t,"method",c.method,c,null),st(e,t,"target",c.target,c,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(o);break}l=Ni(""+l),e.setAttribute(o,l);break;case"onClick":l!=null&&(e.onclick=So);break;case"onScroll":l!=null&&Ve("scroll",e);break;case"onScrollEnd":l!=null&&Ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(o=l.__html,o!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=o}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}o=Ni(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,""+l):e.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,""):e.removeAttribute(o);break;case"capture":case"download":l===!0?e.setAttribute(o,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(o,l):e.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(o,l):e.removeAttribute(o);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(o):e.setAttribute(o,l);break;case"popover":Ve("beforetoggle",e),Ve("toggle",e),Ai(e,"popover",l);break;case"xlinkActuate":xo(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":xo(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":xo(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":xo(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":xo(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":xo(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":xo(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":xo(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":xo(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ai(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=NS.get(o)||o,Ai(e,o,l))}}function Bd(e,t,o,l,c,d){switch(o){case"style":hm(e,l,d);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(i(61));if(o=l.__html,o!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=o}}break;case"children":typeof l=="string"?ur(e,l):(typeof l=="number"||typeof l=="bigint")&&ur(e,""+l);break;case"onScroll":l!=null&&Ve("scroll",e);break;case"onScrollEnd":l!=null&&Ve("scrollend",e);break;case"onClick":l!=null&&(e.onclick=So);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!dl.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(c=o.endsWith("Capture"),t=o.slice(2,c?o.length-7:void 0),d=e[Pe]||null,d=d!=null?d[o]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof l=="function")){typeof d!="function"&&d!==null&&(o in e?e[o]=null:e.hasAttribute(o)&&e.removeAttribute(o)),e.addEventListener(t,l,c);break e}o in e?e[o]=l:l===!0?e.setAttribute(o,""):Ai(e,o,l)}}}function Ft(e,t,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",e),Ve("load",e);var l=!1,c=!1,d;for(d in o)if(o.hasOwnProperty(d)){var b=o[d];if(b!=null)switch(d){case"src":l=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:st(e,t,d,b,o,null)}}c&&st(e,t,"srcSet",o.srcSet,o,null),l&&st(e,t,"src",o.src,o,null);return;case"input":Ve("invalid",e);var w=d=b=c=null,k=null,Q=null;for(l in o)if(o.hasOwnProperty(l)){var le=o[l];if(le!=null)switch(l){case"name":c=le;break;case"type":b=le;break;case"checked":k=le;break;case"defaultChecked":Q=le;break;case"value":d=le;break;case"defaultValue":w=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,t));break;default:st(e,t,l,le,o,null)}}cm(e,d,w,k,Q,b,c,!1);return;case"select":Ve("invalid",e),l=b=d=null;for(c in o)if(o.hasOwnProperty(c)&&(w=o[c],w!=null))switch(c){case"value":d=w;break;case"defaultValue":b=w;break;case"multiple":l=w;default:st(e,t,c,w,o,null)}t=d,o=b,e.multiple=!!l,t!=null?cr(e,!!l,t,!1):o!=null&&cr(e,!!l,o,!0);return;case"textarea":Ve("invalid",e),d=c=l=null;for(b in o)if(o.hasOwnProperty(b)&&(w=o[b],w!=null))switch(b){case"value":l=w;break;case"defaultValue":c=w;break;case"children":d=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:st(e,t,b,w,o,null)}dm(e,l,c,d);return;case"option":for(k in o)if(o.hasOwnProperty(k)&&(l=o[k],l!=null))switch(k){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:st(e,t,k,l,o,null)}return;case"dialog":Ve("beforetoggle",e),Ve("toggle",e),Ve("cancel",e),Ve("close",e);break;case"iframe":case"object":Ve("load",e);break;case"video":case"audio":for(l=0;l<Yl.length;l++)Ve(Yl[l],e);break;case"image":Ve("error",e),Ve("load",e);break;case"details":Ve("toggle",e);break;case"embed":case"source":case"link":Ve("error",e),Ve("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Q in o)if(o.hasOwnProperty(Q)&&(l=o[Q],l!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:st(e,t,Q,l,o,null)}return;default:if(Wc(t)){for(le in o)o.hasOwnProperty(le)&&(l=o[le],l!==void 0&&Bd(e,t,le,l,o,void 0));return}}for(w in o)o.hasOwnProperty(w)&&(l=o[w],l!=null&&st(e,t,w,l,o,null))}function n2(e,t,o,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,b=null,w=null,k=null,Q=null,le=null;for(oe in o){var ue=o[oe];if(o.hasOwnProperty(oe)&&ue!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":k=ue;default:l.hasOwnProperty(oe)||st(e,t,oe,null,l,ue)}}for(var Z in l){var oe=l[Z];if(ue=o[Z],l.hasOwnProperty(Z)&&(oe!=null||ue!=null))switch(Z){case"type":d=oe;break;case"name":c=oe;break;case"checked":Q=oe;break;case"defaultChecked":le=oe;break;case"value":b=oe;break;case"defaultValue":w=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(i(137,t));break;default:oe!==ue&&st(e,t,Z,oe,l,ue)}}Qc(e,b,w,k,Q,le,d,c);return;case"select":oe=b=w=Z=null;for(d in o)if(k=o[d],o.hasOwnProperty(d)&&k!=null)switch(d){case"value":break;case"multiple":oe=k;default:l.hasOwnProperty(d)||st(e,t,d,null,l,k)}for(c in l)if(d=l[c],k=o[c],l.hasOwnProperty(c)&&(d!=null||k!=null))switch(c){case"value":Z=d;break;case"defaultValue":w=d;break;case"multiple":b=d;default:d!==k&&st(e,t,c,d,l,k)}t=w,o=b,l=oe,Z!=null?cr(e,!!o,Z,!1):!!l!=!!o&&(t!=null?cr(e,!!o,t,!0):cr(e,!!o,o?[]:"",!1));return;case"textarea":oe=Z=null;for(w in o)if(c=o[w],o.hasOwnProperty(w)&&c!=null&&!l.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:st(e,t,w,null,l,c)}for(b in l)if(c=l[b],d=o[b],l.hasOwnProperty(b)&&(c!=null||d!=null))switch(b){case"value":Z=c;break;case"defaultValue":oe=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==d&&st(e,t,b,c,l,d)}um(e,Z,oe);return;case"option":for(var we in o)if(Z=o[we],o.hasOwnProperty(we)&&Z!=null&&!l.hasOwnProperty(we))switch(we){case"selected":e.selected=!1;break;default:st(e,t,we,null,l,Z)}for(k in l)if(Z=l[k],oe=o[k],l.hasOwnProperty(k)&&Z!==oe&&(Z!=null||oe!=null))switch(k){case"selected":e.selected=Z&&typeof Z!="function"&&typeof Z!="symbol";break;default:st(e,t,k,Z,l,oe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in o)Z=o[Re],o.hasOwnProperty(Re)&&Z!=null&&!l.hasOwnProperty(Re)&&st(e,t,Re,null,l,Z);for(Q in l)if(Z=l[Q],oe=o[Q],l.hasOwnProperty(Q)&&Z!==oe&&(Z!=null||oe!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(i(137,t));break;default:st(e,t,Q,Z,l,oe)}return;default:if(Wc(t)){for(var ct in o)Z=o[ct],o.hasOwnProperty(ct)&&Z!==void 0&&!l.hasOwnProperty(ct)&&Bd(e,t,ct,void 0,l,Z);for(le in l)Z=l[le],oe=o[le],!l.hasOwnProperty(le)||Z===oe||Z===void 0&&oe===void 0||Bd(e,t,le,Z,l,oe);return}}for(var G in o)Z=o[G],o.hasOwnProperty(G)&&Z!=null&&!l.hasOwnProperty(G)&&st(e,t,G,null,l,Z);for(ue in l)Z=l[ue],oe=o[ue],!l.hasOwnProperty(ue)||Z===oe||Z==null&&oe==null||st(e,t,ue,Z,l,oe)}function my(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function o2(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,o=performance.getEntriesByType("resource"),l=0;l<o.length;l++){var c=o[l],d=c.transferSize,b=c.initiatorType,w=c.duration;if(d&&w&&my(b)){for(b=0,w=c.responseEnd,l+=1;l<o.length;l++){var k=o[l],Q=k.startTime;if(Q>w)break;var le=k.transferSize,ue=k.initiatorType;le&&my(ue)&&(k=k.responseEnd,b+=le*(k<w?1:(w-Q)/(k-Q)))}if(--l,t+=8*(d+b)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ud=null,Id=null;function Cs(e){return e.nodeType===9?e:e.ownerDocument}function py(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function gy(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Pd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $d=null;function a2(){var e=window.event;return e&&e.type==="popstate"?e===$d?!1:($d=e,!0):($d=null,!1)}var yy=typeof setTimeout=="function"?setTimeout:void 0,r2=typeof clearTimeout=="function"?clearTimeout:void 0,vy=typeof Promise=="function"?Promise:void 0,l2=typeof queueMicrotask=="function"?queueMicrotask:typeof vy<"u"?function(e){return vy.resolve(null).then(e).catch(i2)}:yy;function i2(e){setTimeout(function(){throw e})}function ua(e){return e==="head"}function by(e,t){var o=t,l=0;do{var c=o.nextSibling;if(e.removeChild(o),c&&c.nodeType===8)if(o=c.data,o==="/$"||o==="/&"){if(l===0){e.removeChild(c),Pr(t);return}l--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")l++;else if(o==="html")ql(e.ownerDocument.documentElement);else if(o==="head"){o=e.ownerDocument.head,ql(o);for(var d=o.firstChild;d;){var b=d.nextSibling,w=d.nodeName;d[Yt]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&d.rel.toLowerCase()==="stylesheet"||o.removeChild(d),d=b}}else o==="body"&&ql(e.ownerDocument.body);o=c}while(o);Pr(t)}function xy(e,t){var o=e;e=0;do{var l=o.nextSibling;if(o.nodeType===1?t?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(t?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),l&&l.nodeType===8)if(o=l.data,o==="/$"){if(e===0)break;e--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||e++;o=l}while(o)}function Gd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var o=t;switch(t=t.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Gd(o),At(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}e.removeChild(o)}}function s2(e,t,o,l){for(;e.nodeType===1;){var c=o;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Yt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Vn(e.nextSibling),e===null)break}return null}function c2(e,t,o){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!o||(e=Vn(e.nextSibling),e===null))return null;return e}function Sy(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Vn(e.nextSibling),e===null))return null;return e}function Yd(e){return e.data==="$?"||e.data==="$~"}function Vd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function u2(e,t){var o=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||o.readyState!=="loading")t();else{var l=function(){t(),o.removeEventListener("DOMContentLoaded",l)};o.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Vn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var qd=null;function wy(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"||o==="/&"){if(t===0)return Vn(e.nextSibling);t--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||t++}e=e.nextSibling}return null}function Ey(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(t===0)return e;t--}else o!=="/$"&&o!=="/&"||t++}e=e.previousSibling}return null}function Cy(e,t,o){switch(t=Cs(o),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function ql(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);At(e)}var qn=new Map,Ty=new Set;function Ts(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ho=O.d;O.d={f:d2,r:f2,D:h2,C:m2,L:p2,m:g2,X:v2,S:y2,M:b2};function d2(){var e=Ho.f(),t=gs();return e||t}function f2(e){var t=gt(e);t!==null&&t.tag===5&&t.type==="form"?$p(t):Ho.r(e)}var Br=typeof document>"u"?null:document;function Ay(e,t,o){var l=Br;if(l&&typeof t=="string"&&t){var c=Bn(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof o=="string"&&(c+='[crossorigin="'+o+'"]'),Ty.has(c)||(Ty.add(c),e={rel:e,crossOrigin:o,href:t},l.querySelector(c)===null&&(t=l.createElement("link"),Ft(t,"link",e),Ot(t),l.head.appendChild(t)))}}function h2(e){Ho.D(e),Ay("dns-prefetch",e,null)}function m2(e,t){Ho.C(e,t),Ay("preconnect",e,t)}function p2(e,t,o){Ho.L(e,t,o);var l=Br;if(l&&e&&t){var c='link[rel="preload"][as="'+Bn(t)+'"]';t==="image"&&o&&o.imageSrcSet?(c+='[imagesrcset="'+Bn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(c+='[imagesizes="'+Bn(o.imageSizes)+'"]')):c+='[href="'+Bn(e)+'"]';var d=c;switch(t){case"style":d=Ur(e);break;case"script":d=Ir(e)}qn.has(d)||(e=y({rel:"preload",href:t==="image"&&o&&o.imageSrcSet?void 0:e,as:t},o),qn.set(d,e),l.querySelector(c)!==null||t==="style"&&l.querySelector(Xl(d))||t==="script"&&l.querySelector(Fl(d))||(t=l.createElement("link"),Ft(t,"link",e),Ot(t),l.head.appendChild(t)))}}function g2(e,t){Ho.m(e,t);var o=Br;if(o&&e){var l=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+Bn(l)+'"][href="'+Bn(e)+'"]',d=c;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Ir(e)}if(!qn.has(d)&&(e=y({rel:"modulepreload",href:e},t),qn.set(d,e),o.querySelector(c)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Fl(d)))return}l=o.createElement("link"),Ft(l,"link",e),Ot(l),o.head.appendChild(l)}}}function y2(e,t,o){Ho.S(e,t,o);var l=Br;if(l&&e){var c=Cn(l).hoistableStyles,d=Ur(e);t=t||"default";var b=c.get(d);if(!b){var w={loading:0,preload:null};if(b=l.querySelector(Xl(d)))w.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":t},o),(o=qn.get(d))&&Xd(e,o);var k=b=l.createElement("link");Ot(k),Ft(k,"link",e),k._p=new Promise(function(Q,le){k.onload=Q,k.onerror=le}),k.addEventListener("load",function(){w.loading|=1}),k.addEventListener("error",function(){w.loading|=2}),w.loading|=4,As(b,t,l)}b={type:"stylesheet",instance:b,count:1,state:w},c.set(d,b)}}}function v2(e,t){Ho.X(e,t);var o=Br;if(o&&e){var l=Cn(o).hoistableScripts,c=Ir(e),d=l.get(c);d||(d=o.querySelector(Fl(c)),d||(e=y({src:e,async:!0},t),(t=qn.get(c))&&Fd(e,t),d=o.createElement("script"),Ot(d),Ft(d,"link",e),o.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function b2(e,t){Ho.M(e,t);var o=Br;if(o&&e){var l=Cn(o).hoistableScripts,c=Ir(e),d=l.get(c);d||(d=o.querySelector(Fl(c)),d||(e=y({src:e,async:!0,type:"module"},t),(t=qn.get(c))&&Fd(e,t),d=o.createElement("script"),Ot(d),Ft(d,"link",e),o.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},l.set(c,d))}}function My(e,t,o,l){var c=(c=J.current)?Ts(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(t=Ur(o.href),o=Cn(c).hoistableStyles,l=o.get(t),l||(l={type:"style",instance:null,count:0,state:null},o.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){e=Ur(o.href);var d=Cn(c).hoistableStyles,b=d.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=c.querySelector(Xl(e)))&&!d._p&&(b.instance=d,b.state.loading=5),qn.has(e)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},qn.set(e,o),d||x2(c,e,o,b.state))),t&&l===null)throw Error(i(528,""));return b}if(t&&l!==null)throw Error(i(529,""));return null;case"script":return t=o.async,o=o.src,typeof o=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ir(o),o=Cn(c).hoistableScripts,l=o.get(t),l||(l={type:"script",instance:null,count:0,state:null},o.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Ur(e){return'href="'+Bn(e)+'"'}function Xl(e){return'link[rel="stylesheet"]['+e+"]"}function _y(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function x2(e,t,o,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Ft(t,"link",o),Ot(t),e.head.appendChild(t))}function Ir(e){return'[src="'+Bn(e)+'"]'}function Fl(e){return"script[async]"+e}function Ny(e,t,o){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+Bn(o.href)+'"]');if(l)return t.instance=l,Ot(l),l;var c=y({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ot(l),Ft(l,"style",c),As(l,o.precedence,e),t.instance=l;case"stylesheet":c=Ur(o.href);var d=e.querySelector(Xl(c));if(d)return t.state.loading|=4,t.instance=d,Ot(d),d;l=_y(o),(c=qn.get(c))&&Xd(l,c),d=(e.ownerDocument||e).createElement("link"),Ot(d);var b=d;return b._p=new Promise(function(w,k){b.onload=w,b.onerror=k}),Ft(d,"link",l),t.state.loading|=4,As(d,o.precedence,e),t.instance=d;case"script":return d=Ir(o.src),(c=e.querySelector(Fl(d)))?(t.instance=c,Ot(c),c):(l=o,(c=qn.get(d))&&(l=y({},o),Fd(l,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ot(c),Ft(c,"link",l),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,As(l,o.precedence,e));return t.instance}function As(e,t,o){for(var l=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=l.length?l[l.length-1]:null,d=c,b=0;b<l.length;b++){var w=l[b];if(w.dataset.precedence===t)d=w;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=o.nodeType===9?o.head:o,t.insertBefore(e,t.firstChild))}function Xd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Fd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ms=null;function Ry(e,t,o){if(Ms===null){var l=new Map,c=Ms=new Map;c.set(o,l)}else c=Ms,l=c.get(o),l||(l=new Map,c.set(o,l));if(l.has(e))return l;for(l.set(e,null),o=o.getElementsByTagName(e),c=0;c<o.length;c++){var d=o[c];if(!(d[Yt]||d[Oe]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(t)||"";b=e+b;var w=l.get(b);w?w.push(d):l.set(b,[d])}}return l}function Oy(e,t,o){e=e.ownerDocument||e,e.head.insertBefore(o,t==="title"?e.querySelector("head > title"):null)}function S2(e,t,o){if(o===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Dy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function w2(e,t,o,l){if(o.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var c=Ur(l.href),d=t.querySelector(Xl(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=_s.bind(e),t.then(e,e)),o.state.loading|=4,o.instance=d,Ot(d);return}d=t.ownerDocument||t,l=_y(l),(c=qn.get(c))&&Xd(l,c),d=d.createElement("link"),Ot(d);var b=d;b._p=new Promise(function(w,k){b.onload=w,b.onerror=k}),Ft(d,"link",l),o.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(o,t),(t=o.state.preload)&&(o.state.loading&3)===0&&(e.count++,o=_s.bind(e),t.addEventListener("load",o),t.addEventListener("error",o))}}var Kd=0;function E2(e,t){return e.stylesheets&&e.count===0&&Rs(e,e.stylesheets),0<e.count||0<e.imgCount?function(o){var l=setTimeout(function(){if(e.stylesheets&&Rs(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Kd===0&&(Kd=62500*o2());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Rs(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Kd?50:800)+t);return e.unsuspend=o,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(c)}}:null}function _s(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Rs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ns=null;function Rs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ns=new Map,t.forEach(C2,e),Ns=null,_s.call(e))}function C2(e,t){if(!(t.state.loading&4)){var o=Ns.get(e);if(o)var l=o.get(null);else{o=new Map,Ns.set(e,o);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var b=c[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(o.set(b.dataset.precedence,b),l=b)}l&&o.set(null,l)}c=t.instance,b=c.getAttribute("data-precedence"),d=o.get(b)||l,d===l&&o.set(null,c),o.set(b,c),this.count++,l=_s.bind(this),c.addEventListener("load",l),c.addEventListener("error",l),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Kl={$$typeof:B,Provider:null,Consumer:null,_currentValue:N,_currentValue2:N,_threadCount:0};function T2(e,t,o,l,c,d,b,w,k){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ro(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ro(0),this.hiddenUpdates=ro(null),this.identifierPrefix=l,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function jy(e,t,o,l,c,d,b,w,k,Q,le,ue){return e=new T2(e,t,o,b,k,Q,le,ue,w),t=1,d===!0&&(t|=24),d=An(3,null,null,t),e.current=d,d.stateNode=e,t=_u(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:l,isDehydrated:o,cache:t},Du(d),e}function zy(e){return e?(e=yr,e):yr}function ky(e,t,o,l,c,d){c=zy(c),l.context===null?l.context=c:l.pendingContext=c,l=Jo(t),l.payload={element:o},d=d===void 0?null:d,d!==null&&(l.callback=d),o=ea(e,l,t),o!==null&&(vn(o,e,t),Ml(o,e,t))}function Ly(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<t?o:t}}function Qd(e,t){Ly(e,t),(e=e.alternate)&&Ly(e,t)}function Hy(e){if(e.tag===13||e.tag===31){var t=Ia(e,67108864);t!==null&&vn(t,e,67108864),Qd(e,67108864)}}function By(e){if(e.tag===13||e.tag===31){var t=On();t=ee(t);var o=Ia(e,t);o!==null&&vn(o,e,t),Qd(e,t)}}var Os=!0;function A2(e,t,o,l){var c=T.T;T.T=null;var d=O.p;try{O.p=2,Zd(e,t,o,l)}finally{O.p=d,T.T=c}}function M2(e,t,o,l){var c=T.T;T.T=null;var d=O.p;try{O.p=8,Zd(e,t,o,l)}finally{O.p=d,T.T=c}}function Zd(e,t,o,l){if(Os){var c=Wd(l);if(c===null)Hd(e,t,l,Ds,o),Iy(e,l);else if(N2(c,e,t,o,l))l.stopPropagation();else if(Iy(e,l),t&4&&-1<_2.indexOf(e)){for(;c!==null;){var d=gt(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=Qt(d.pendingLanes);if(b!==0){var w=d;for(w.pendingLanes|=2,w.entangledLanes|=2;b;){var k=1<<31-ut(b);w.entanglements[1]|=k,b&=~k}co(d),(tt&6)===0&&(ms=St()+500,Gl(0))}}break;case 31:case 13:w=Ia(d,2),w!==null&&vn(w,d,2),gs(),Qd(d,2)}if(d=Wd(l),d===null&&Hd(e,t,l,Ds,o),d===c)break;c=d}c!==null&&l.stopPropagation()}else Hd(e,t,l,null,o)}}function Wd(e){return e=eu(e),Jd(e)}var Ds=null;function Jd(e){if(Ds=null,e=fn(e),e!==null){var t=u(e);if(t===null)e=null;else{var o=t.tag;if(o===13){if(e=f(t),e!==null)return e;e=null}else if(o===31){if(e=h(t),e!==null)return e;e=null}else if(o===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ds=e,null}function Uy(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Yo()){case je:return 2;case Je:return 8;case Ne:case an:return 32;case Gt:return 268435456;default:return 32}default:return 32}}var ef=!1,da=null,fa=null,ha=null,Ql=new Map,Zl=new Map,ma=[],_2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Iy(e,t){switch(e){case"focusin":case"focusout":da=null;break;case"dragenter":case"dragleave":fa=null;break;case"mouseover":case"mouseout":ha=null;break;case"pointerover":case"pointerout":Ql.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zl.delete(t.pointerId)}}function Wl(e,t,o,l,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:o,eventSystemFlags:l,nativeEvent:d,targetContainers:[c]},t!==null&&(t=gt(t),t!==null&&Hy(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function N2(e,t,o,l,c){switch(t){case"focusin":return da=Wl(da,e,t,o,l,c),!0;case"dragenter":return fa=Wl(fa,e,t,o,l,c),!0;case"mouseover":return ha=Wl(ha,e,t,o,l,c),!0;case"pointerover":var d=c.pointerId;return Ql.set(d,Wl(Ql.get(d)||null,e,t,o,l,c)),!0;case"gotpointercapture":return d=c.pointerId,Zl.set(d,Wl(Zl.get(d)||null,e,t,o,l,c)),!0}return!1}function Py(e){var t=fn(e.target);if(t!==null){var o=u(t);if(o!==null){if(t=o.tag,t===13){if(t=f(o),t!==null){e.blockedOn=t,ge(e.priority,function(){By(o)});return}}else if(t===31){if(t=h(o),t!==null){e.blockedOn=t,ge(e.priority,function(){By(o)});return}}else if(t===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function js(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var o=Wd(e.nativeEvent);if(o===null){o=e.nativeEvent;var l=new o.constructor(o.type,o);Jc=l,o.target.dispatchEvent(l),Jc=null}else return t=gt(o),t!==null&&Hy(t),e.blockedOn=o,!1;t.shift()}return!0}function $y(e,t,o){js(e)&&o.delete(t)}function R2(){ef=!1,da!==null&&js(da)&&(da=null),fa!==null&&js(fa)&&(fa=null),ha!==null&&js(ha)&&(ha=null),Ql.forEach($y),Zl.forEach($y)}function zs(e,t){e.blockedOn===t&&(e.blockedOn=null,ef||(ef=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,R2)))}var ks=null;function Gy(e){ks!==e&&(ks=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ks===e&&(ks=null);for(var t=0;t<e.length;t+=3){var o=e[t],l=e[t+1],c=e[t+2];if(typeof l!="function"){if(Jd(l||o)===null)continue;break}var d=gt(o);d!==null&&(e.splice(t,3),t-=3,Wu(d,{pending:!0,data:c,method:o.method,action:l},l,c))}}))}function Pr(e){function t(k){return zs(k,e)}da!==null&&zs(da,e),fa!==null&&zs(fa,e),ha!==null&&zs(ha,e),Ql.forEach(t),Zl.forEach(t);for(var o=0;o<ma.length;o++){var l=ma[o];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ma.length&&(o=ma[0],o.blockedOn===null);)Py(o),o.blockedOn===null&&ma.shift();if(o=(e.ownerDocument||e).$$reactFormReplay,o!=null)for(l=0;l<o.length;l+=3){var c=o[l],d=o[l+1],b=c[Pe]||null;if(typeof d=="function")b||Gy(o);else if(b){var w=null;if(d&&d.hasAttribute("formAction")){if(c=d,b=d[Pe]||null)w=b.formAction;else if(Jd(c)!==null)continue}else w=b.action;typeof w=="function"?o[l+1]=w:(o.splice(l,3),l-=3),Gy(o)}}}function Yy(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),l||setTimeout(o,20)}function o(){if(!l&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(o,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function tf(e){this._internalRoot=e}Ls.prototype.render=tf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var o=t.current,l=On();ky(o,l,e,t,null,null)},Ls.prototype.unmount=tf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ky(e.current,2,null,e,null,null),gs(),t[Qe]=null}};function Ls(e){this._internalRoot=e}Ls.prototype.unstable_scheduleHydration=function(e){if(e){var t=me();e={blockedOn:null,target:e,priority:t};for(var o=0;o<ma.length&&t!==0&&t<ma[o].priority;o++);ma.splice(o,0,e),o===0&&Py(e)}};var Vy=a.version;if(Vy!=="19.2.5")throw Error(i(527,Vy,"19.2.5"));O.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var O2={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hs.isDisabled&&Hs.supportsFiber)try{rn=Hs.inject(O2),Lt=Hs}catch{}}return ei.createRoot=function(e,t){if(!s(e))throw Error(i(299));var o=!1,l="",c=Wp,d=Jp,b=eg;return t!=null&&(t.unstable_strictMode===!0&&(o=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(b=t.onRecoverableError)),t=jy(e,1,!1,null,null,o,l,null,c,d,b,Yy),e[Qe]=t.current,Ld(e),new tf(t)},ei.hydrateRoot=function(e,t,o){if(!s(e))throw Error(i(299));var l=!1,c="",d=Wp,b=Jp,w=eg,k=null;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onUncaughtError!==void 0&&(d=o.onUncaughtError),o.onCaughtError!==void 0&&(b=o.onCaughtError),o.onRecoverableError!==void 0&&(w=o.onRecoverableError),o.formState!==void 0&&(k=o.formState)),t=jy(e,1,!0,t,o??null,l,c,k,d,b,w,Yy),t.context=zy(null),o=t.current,l=On(),l=ee(l),c=Jo(l),c.callback=null,ea(o,c,l),o=l,t.current.lanes=o,mt(t,o),co(t),e[Qe]=t.current,Ld(e),new Ls(t)},ei.version="19.2.5",ei}var t0;function P2(){if(t0)return af.exports;t0=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(a){console.error(a)}}return n(),af.exports=I2(),af.exports}var $2=P2();const G2=yh($2);var fi=Mv();const _v=yh(fi);function Y2(n){if(typeof document>"u")return;let a=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",a.appendChild(r),r.styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n))}const V2=n=>{switch(n){case"success":return F2;case"info":return Q2;case"warning":return K2;case"error":return Z2;default:return null}},q2=Array(12).fill(0),X2=({visible:n,className:a})=>he.createElement("div",{className:["sonner-loading-wrapper",a].filter(Boolean).join(" "),"data-visible":n},he.createElement("div",{className:"sonner-spinner"},q2.map((r,i)=>he.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),F2=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),K2=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Q2=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Z2=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},he.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),W2=he.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},he.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),he.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),J2=()=>{const[n,a]=he.useState(document.hidden);return he.useEffect(()=>{const r=()=>{a(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),n};let If=1;class eE{constructor(){this.subscribe=a=>(this.subscribers.push(a),()=>{const r=this.subscribers.indexOf(a);this.subscribers.splice(r,1)}),this.publish=a=>{this.subscribers.forEach(r=>r(a))},this.addToast=a=>{this.publish(a),this.toasts=[...this.toasts,a]},this.create=a=>{var r;const{message:i,...s}=a,u=typeof(a==null?void 0:a.id)=="number"||((r=a.id)==null?void 0:r.length)>0?a.id:If++,f=this.toasts.find(m=>m.id===u),h=a.dismissible===void 0?!0:a.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),f?this.toasts=this.toasts.map(m=>m.id===u?(this.publish({...m,...a,id:u,title:i}),{...m,...a,id:u,dismissible:h,title:i}):m):this.addToast({title:i,...s,dismissible:h,id:u}),u},this.dismiss=a=>(a?(this.dismissedToasts.add(a),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:a,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(i=>i({id:r.id,dismiss:!0}))}),a),this.message=(a,r)=>this.create({...r,message:a}),this.error=(a,r)=>this.create({...r,message:a,type:"error"}),this.success=(a,r)=>this.create({...r,type:"success",message:a}),this.info=(a,r)=>this.create({...r,type:"info",message:a}),this.warning=(a,r)=>this.create({...r,type:"warning",message:a}),this.loading=(a,r)=>this.create({...r,type:"loading",message:a}),this.promise=(a,r)=>{if(!r)return;let i;r.loading!==void 0&&(i=this.create({...r,promise:a,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const s=Promise.resolve(a instanceof Function?a():a);let u=i!==void 0,f;const h=s.then(async g=>{if(f=["resolve",g],he.isValidElement(g))u=!1,this.create({id:i,type:"default",message:g});else if(nE(g)&&!g.ok){u=!1;const y=typeof r.error=="function"?await r.error(`HTTP error! status: ${g.status}`):r.error,S=typeof r.description=="function"?await r.description(`HTTP error! status: ${g.status}`):r.description,C=typeof y=="object"&&!he.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:S,...C})}else if(g instanceof Error){u=!1;const y=typeof r.error=="function"?await r.error(g):r.error,S=typeof r.description=="function"?await r.description(g):r.description,C=typeof y=="object"&&!he.isValidElement(y)?y:{message:y};this.create({id:i,type:"error",description:S,...C})}else if(r.success!==void 0){u=!1;const y=typeof r.success=="function"?await r.success(g):r.success,S=typeof r.description=="function"?await r.description(g):r.description,C=typeof y=="object"&&!he.isValidElement(y)?y:{message:y};this.create({id:i,type:"success",description:S,...C})}}).catch(async g=>{if(f=["reject",g],r.error!==void 0){u=!1;const x=typeof r.error=="function"?await r.error(g):r.error,y=typeof r.description=="function"?await r.description(g):r.description,A=typeof x=="object"&&!he.isValidElement(x)?x:{message:x};this.create({id:i,type:"error",description:y,...A})}}).finally(()=>{u&&(this.dismiss(i),i=void 0),r.finally==null||r.finally.call(r)}),m=()=>new Promise((g,x)=>h.then(()=>f[0]==="reject"?x(f[1]):g(f[1])).catch(x));return typeof i!="string"&&typeof i!="number"?{unwrap:m}:Object.assign(i,{unwrap:m})},this.custom=(a,r)=>{const i=(r==null?void 0:r.id)||If++;return this.create({jsx:a(i),id:i,...r}),i},this.getActiveToasts=()=>this.toasts.filter(a=>!this.dismissedToasts.has(a.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const bn=new eE,tE=(n,a)=>{const r=(a==null?void 0:a.id)||If++;return bn.addToast({title:n,...a,id:r}),r},nE=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",oE=tE,aE=()=>bn.toasts,rE=()=>bn.getActiveToasts(),Sa=Object.assign(oE,{success:bn.success,info:bn.info,warning:bn.warning,error:bn.error,custom:bn.custom,message:bn.message,promise:bn.promise,dismiss:bn.dismiss,loading:bn.loading},{getHistory:aE,getToasts:rE});Y2("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Bs(n){return n.label!==void 0}const lE=3,iE="24px",sE="16px",n0=4e3,cE=356,uE=14,dE=45,fE=200;function uo(...n){return n.filter(Boolean).join(" ")}function hE(n){const[a,r]=n.split("-"),i=[];return a&&i.push(a),r&&i.push(r),i}const mE=n=>{var a,r,i,s,u,f,h,m,g;const{invert:x,toast:y,unstyled:S,interacting:A,setHeights:C,visibleToasts:E,heights:M,index:R,toasts:j,expanded:B,removeToast:Y,defaultRichColors:te,closeButton:$,style:q,cancelButtonStyle:z,actionButtonStyle:W,className:ie="",descriptionClassName:de="",duration:K,position:ae,gap:fe,expandByDefault:pe,classNames:T,icons:O,closeButtonAriaLabel:N="Close toast"}=n,[L,D]=he.useState(null),[_,U]=he.useState(null),[H,P]=he.useState(!1),[X,J]=he.useState(!1),[ne,V]=he.useState(!1),[re,ye]=he.useState(!1),[Se,ve]=he.useState(!1),[De,ke]=he.useState(0),[_e,lt]=he.useState(0),ft=he.useRef(y.duration||K||n0),xt=he.useRef(null),ot=he.useRef(null),Sn=R===0,wn=R+1<=E,Tt=y.type,on=y.dismissible!==!1,St=y.className||"",Yo=y.descriptionClassName||"",je=he.useMemo(()=>M.findIndex(ze=>ze.toastId===y.id)||0,[M,y.id]),Je=he.useMemo(()=>{var ze;return(ze=y.closeButton)!=null?ze:$},[y.closeButton,$]),Ne=he.useMemo(()=>y.duration||K||n0,[y.duration,K]),an=he.useRef(0),Gt=he.useRef(0),vo=he.useRef(0),un=he.useRef(null),[rn,Lt]=ae.split("-"),Ht=he.useMemo(()=>M.reduce((ze,ht,Rt)=>Rt>=je?ze:ze+ht.height,0),[M,je]),ut=J2(),Vo=y.invert||x,ao=Tt==="loading";Gt.current=he.useMemo(()=>je*fe+Ht,[je,Ht]),he.useEffect(()=>{ft.current=Ne},[Ne]),he.useEffect(()=>{P(!0)},[]),he.useEffect(()=>{const ze=ot.current;if(ze){const ht=ze.getBoundingClientRect().height;return lt(ht),C(Rt=>[{toastId:y.id,height:ht,position:y.position},...Rt]),()=>C(Rt=>Rt.filter(Pt=>Pt.toastId!==y.id))}},[C,y.id]),he.useLayoutEffect(()=>{if(!H)return;const ze=ot.current,ht=ze.style.height;ze.style.height="auto";const Rt=ze.getBoundingClientRect().height;ze.style.height=ht,lt(Rt),C(Pt=>Pt.find(mt=>mt.toastId===y.id)?Pt.map(mt=>mt.toastId===y.id?{...mt,height:Rt}:mt):[{toastId:y.id,height:Rt,position:y.position},...Pt])},[H,y.title,y.description,C,y.id,y.jsx,y.action,y.cancel]);const It=he.useCallback(()=>{J(!0),ke(Gt.current),C(ze=>ze.filter(ht=>ht.toastId!==y.id)),setTimeout(()=>{Y(y)},fE)},[y,Y,C,Gt]);he.useEffect(()=>{if(y.promise&&Tt==="loading"||y.duration===1/0||y.type==="loading")return;let ze;return B||A||ut?(()=>{if(vo.current<an.current){const Pt=new Date().getTime()-an.current;ft.current=ft.current-Pt}vo.current=new Date().getTime()})():(()=>{ft.current!==1/0&&(an.current=new Date().getTime(),ze=setTimeout(()=>{y.onAutoClose==null||y.onAutoClose.call(y,y),It()},ft.current))})(),()=>clearTimeout(ze)},[B,A,y,Tt,ut,It]),he.useEffect(()=>{y.delete&&(It(),y.onDismiss==null||y.onDismiss.call(y,y))},[It,y.delete]);function kn(){var ze;if(O!=null&&O.loading){var ht;return he.createElement("div",{className:uo(T==null?void 0:T.loader,y==null||(ht=y.classNames)==null?void 0:ht.loader,"sonner-loader"),"data-visible":Tt==="loading"},O.loading)}return he.createElement(X2,{className:uo(T==null?void 0:T.loader,y==null||(ze=y.classNames)==null?void 0:ze.loader),visible:Tt==="loading"})}const Kn=y.icon||(O==null?void 0:O[Tt])||V2(Tt);var ln,Qt;return he.createElement("li",{tabIndex:0,ref:ot,className:uo(ie,St,T==null?void 0:T.toast,y==null||(a=y.classNames)==null?void 0:a.toast,T==null?void 0:T.default,T==null?void 0:T[Tt],y==null||(r=y.classNames)==null?void 0:r[Tt]),"data-sonner-toast":"","data-rich-colors":(ln=y.richColors)!=null?ln:te,"data-styled":!(y.jsx||y.unstyled||S),"data-mounted":H,"data-promise":!!y.promise,"data-swiped":Se,"data-removed":X,"data-visible":wn,"data-y-position":rn,"data-x-position":Lt,"data-index":R,"data-front":Sn,"data-swiping":ne,"data-dismissible":on,"data-type":Tt,"data-invert":Vo,"data-swipe-out":re,"data-swipe-direction":_,"data-expanded":!!(B||pe&&H),"data-testid":y.testId,style:{"--index":R,"--toasts-before":R,"--z-index":j.length-R,"--offset":`${X?De:Gt.current}px`,"--initial-height":pe?"auto":`${_e}px`,...q,...y.style},onDragEnd:()=>{V(!1),D(null),un.current=null},onPointerDown:ze=>{ze.button!==2&&(ao||!on||(xt.current=new Date,ke(Gt.current),ze.target.setPointerCapture(ze.pointerId),ze.target.tagName!=="BUTTON"&&(V(!0),un.current={x:ze.clientX,y:ze.clientY})))},onPointerUp:()=>{var ze,ht,Rt;if(re||!on)return;un.current=null;const Pt=Number(((ze=ot.current)==null?void 0:ze.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ro=Number(((ht=ot.current)==null?void 0:ht.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),mt=new Date().getTime()-((Rt=xt.current)==null?void 0:Rt.getTime()),Zt=L==="x"?Pt:ro,bo=Math.abs(Zt)/mt;if(Math.abs(Zt)>=dE||bo>.11){ke(Gt.current),y.onDismiss==null||y.onDismiss.call(y,y),U(L==="x"?Pt>0?"right":"left":ro>0?"down":"up"),It(),ye(!0);return}else{var Wt,Jt;(Wt=ot.current)==null||Wt.style.setProperty("--swipe-amount-x","0px"),(Jt=ot.current)==null||Jt.style.setProperty("--swipe-amount-y","0px")}ve(!1),V(!1),D(null)},onPointerMove:ze=>{var ht,Rt,Pt;if(!un.current||!on||((ht=window.getSelection())==null?void 0:ht.toString().length)>0)return;const mt=ze.clientY-un.current.y,Zt=ze.clientX-un.current.x;var bo;const Wt=(bo=n.swipeDirections)!=null?bo:hE(ae);!L&&(Math.abs(Zt)>1||Math.abs(mt)>1)&&D(Math.abs(Zt)>Math.abs(mt)?"x":"y");let Jt={x:0,y:0};const ee=ce=>1/(1.5+Math.abs(ce)/20);if(L==="y"){if(Wt.includes("top")||Wt.includes("bottom"))if(Wt.includes("top")&&mt<0||Wt.includes("bottom")&&mt>0)Jt.y=mt;else{const ce=mt*ee(mt);Jt.y=Math.abs(ce)<Math.abs(mt)?ce:mt}}else if(L==="x"&&(Wt.includes("left")||Wt.includes("right")))if(Wt.includes("left")&&Zt<0||Wt.includes("right")&&Zt>0)Jt.x=Zt;else{const ce=Zt*ee(Zt);Jt.x=Math.abs(ce)<Math.abs(Zt)?ce:Zt}(Math.abs(Jt.x)>0||Math.abs(Jt.y)>0)&&ve(!0),(Rt=ot.current)==null||Rt.style.setProperty("--swipe-amount-x",`${Jt.x}px`),(Pt=ot.current)==null||Pt.style.setProperty("--swipe-amount-y",`${Jt.y}px`)}},Je&&!y.jsx&&Tt!=="loading"?he.createElement("button",{"aria-label":N,"data-disabled":ao,"data-close-button":!0,onClick:ao||!on?()=>{}:()=>{It(),y.onDismiss==null||y.onDismiss.call(y,y)},className:uo(T==null?void 0:T.closeButton,y==null||(i=y.classNames)==null?void 0:i.closeButton)},(Qt=O==null?void 0:O.close)!=null?Qt:W2):null,(Tt||y.icon||y.promise)&&y.icon!==null&&((O==null?void 0:O[Tt])!==null||y.icon)?he.createElement("div",{"data-icon":"",className:uo(T==null?void 0:T.icon,y==null||(s=y.classNames)==null?void 0:s.icon)},y.promise||y.type==="loading"&&!y.icon?y.icon||kn():null,y.type!=="loading"?Kn:null):null,he.createElement("div",{"data-content":"",className:uo(T==null?void 0:T.content,y==null||(u=y.classNames)==null?void 0:u.content)},he.createElement("div",{"data-title":"",className:uo(T==null?void 0:T.title,y==null||(f=y.classNames)==null?void 0:f.title)},y.jsx?y.jsx:typeof y.title=="function"?y.title():y.title),y.description?he.createElement("div",{"data-description":"",className:uo(de,Yo,T==null?void 0:T.description,y==null||(h=y.classNames)==null?void 0:h.description)},typeof y.description=="function"?y.description():y.description):null),he.isValidElement(y.cancel)?y.cancel:y.cancel&&Bs(y.cancel)?he.createElement("button",{"data-button":!0,"data-cancel":!0,style:y.cancelButtonStyle||z,onClick:ze=>{Bs(y.cancel)&&on&&(y.cancel.onClick==null||y.cancel.onClick.call(y.cancel,ze),It())},className:uo(T==null?void 0:T.cancelButton,y==null||(m=y.classNames)==null?void 0:m.cancelButton)},y.cancel.label):null,he.isValidElement(y.action)?y.action:y.action&&Bs(y.action)?he.createElement("button",{"data-button":!0,"data-action":!0,style:y.actionButtonStyle||W,onClick:ze=>{Bs(y.action)&&(y.action.onClick==null||y.action.onClick.call(y.action,ze),!ze.defaultPrevented&&It())},className:uo(T==null?void 0:T.actionButton,y==null||(g=y.classNames)==null?void 0:g.actionButton)},y.action.label):null)};function o0(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function pE(n,a){const r={};return[n,a].forEach((i,s)=>{const u=s===1,f=u?"--mobile-offset":"--offset",h=u?sE:iE;function m(g){["top","right","bottom","left"].forEach(x=>{r[`${f}-${x}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?m(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?r[`${f}-${g}`]=h:r[`${f}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):m(h)}),r}const gE=he.forwardRef(function(a,r){const{id:i,invert:s,position:u="bottom-right",hotkey:f=["altKey","KeyT"],expand:h,closeButton:m,className:g,offset:x,mobileOffset:y,theme:S="light",richColors:A,duration:C,style:E,visibleToasts:M=lE,toastOptions:R,dir:j=o0(),gap:B=uE,icons:Y,containerAriaLabel:te="Notifications"}=a,[$,q]=he.useState([]),z=he.useMemo(()=>i?$.filter(H=>H.toasterId===i):$.filter(H=>!H.toasterId),[$,i]),W=he.useMemo(()=>Array.from(new Set([u].concat(z.filter(H=>H.position).map(H=>H.position)))),[z,u]),[ie,de]=he.useState([]),[K,ae]=he.useState(!1),[fe,pe]=he.useState(!1),[T,O]=he.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=he.useRef(null),L=f.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=he.useRef(null),_=he.useRef(!1),U=he.useCallback(H=>{q(P=>{var X;return(X=P.find(J=>J.id===H.id))!=null&&X.delete||bn.dismiss(H.id),P.filter(({id:J})=>J!==H.id)})},[]);return he.useEffect(()=>bn.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{q(P=>P.map(X=>X.id===H.id?{...X,delete:!0}:X))});return}setTimeout(()=>{_v.flushSync(()=>{q(P=>{const X=P.findIndex(J=>J.id===H.id);return X!==-1?[...P.slice(0,X),{...P[X],...H},...P.slice(X+1)]:[H,...P]})})})}),[$]),he.useEffect(()=>{if(S!=="system"){O(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:P})=>{O(P?"dark":"light")})}catch{H.addListener(({matches:X})=>{try{O(X?"dark":"light")}catch(J){console.error(J)}})}},[S]),he.useEffect(()=>{$.length<=1&&ae(!1)},[$]),he.useEffect(()=>{const H=P=>{var X;if(f.every(V=>P[V]||P.code===V)){var ne;ae(!0),(ne=N.current)==null||ne.focus()}P.code==="Escape"&&(document.activeElement===N.current||(X=N.current)!=null&&X.contains(document.activeElement))&&ae(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[f]),he.useEffect(()=>{if(N.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,_.current=!1)}},[N.current]),he.createElement("section",{ref:r,"aria-label":`${te} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},W.map((H,P)=>{var X;const[J,ne]=H.split("-");return z.length?he.createElement("ol",{key:H,dir:j==="auto"?o0():j,tabIndex:-1,ref:N,className:g,"data-sonner-toaster":!0,"data-sonner-theme":T,"data-y-position":J,"data-x-position":ne,style:{"--front-toast-height":`${((X=ie[0])==null?void 0:X.height)||0}px`,"--width":`${cE}px`,"--gap":`${B}px`,...E,...pE(x,y)},onBlur:V=>{_.current&&!V.currentTarget.contains(V.relatedTarget)&&(_.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||_.current||(_.current=!0,D.current=V.relatedTarget)},onMouseEnter:()=>ae(!0),onMouseMove:()=>ae(!0),onMouseLeave:()=>{fe||ae(!1)},onDragEnd:()=>ae(!1),onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||pe(!0)},onPointerUp:()=>pe(!1)},z.filter(V=>!V.position&&P===0||V.position===H).map((V,re)=>{var ye,Se;return he.createElement(mE,{key:V.id,icons:Y,index:re,toast:V,defaultRichColors:A,duration:(ye=R==null?void 0:R.duration)!=null?ye:C,className:R==null?void 0:R.className,descriptionClassName:R==null?void 0:R.descriptionClassName,invert:s,visibleToasts:M,closeButton:(Se=R==null?void 0:R.closeButton)!=null?Se:m,interacting:fe,position:H,style:R==null?void 0:R.style,unstyled:R==null?void 0:R.unstyled,classNames:R==null?void 0:R.classNames,cancelButtonStyle:R==null?void 0:R.cancelButtonStyle,actionButtonStyle:R==null?void 0:R.actionButtonStyle,closeButtonAriaLabel:R==null?void 0:R.closeButtonAriaLabel,removeToast:U,toasts:z.filter(ve=>ve.position==V.position),heights:ie.filter(ve=>ve.position==V.position),setHeights:de,expandByDefault:h,gap:B,expanded:K,swipeDirections:a.swipeDirections})})):null}))}),xe="data-editor-id",nr="data-slide-root",Ea=1920,Ca=1080;function bh(n){return`[${xe}="${n}"]`}function yE(n){return n.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"slide"}function Nv(n,a){return`${a}-${n+1}`}function a0(n,a){const r=Number.parseInt(n||"",10);return Number.isFinite(r)&&r>0?r:a}function vE(n){return yE(n)}function sc(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function Rv(n){const a=n.querySelector(`[${nr}]`);if(a)return a.getAttribute("data-slide-width")||a.setAttribute("data-slide-width",String(Ea)),a.getAttribute("data-slide-height")||a.setAttribute("data-slide-height",String(Ca)),a;const r=n.querySelector(".slide-container");return r?(r.setAttribute(nr,"true"),r.getAttribute("data-slide-width")||r.setAttribute("data-slide-width",String(Ea)),r.getAttribute("data-slide-height")||r.setAttribute("data-slide-height",String(Ca)),r):null}function bE(n){return`<!DOCTYPE html>
50
+ ${n.documentElement.outerHTML}`}function xE(n){const a=sc(n);if(!a)return n;const r=Rv(a),i=Array.from(a.querySelectorAll("[data-editable]"));return r&&!r.getAttribute(xe)&&r.setAttribute(xe,"slide-root"),i.forEach((s,u)=>{if(!s.getAttribute(xe)){const f=s.getAttribute("data-editable")||"block";s.setAttribute(xe,Nv(u,f))}}),bE(a)}function fo(n,a="slide-1"){var A;if(!sc(n))return{id:a,title:"Untitled Slide",htmlSource:n,rootSelector:`[${nr}]`,width:Ea,height:Ca,elements:[]};const i=xE(n),s=sc(i);if(!s)return{id:a,title:"Untitled Slide",htmlSource:i,rootSelector:`[${nr}]`,width:Ea,height:Ca,elements:[]};const u=Rv(s),f=Array.from(s.querySelectorAll("[data-editable]")),h=u!=null&&u.getAttribute(xe)?`[${xe}="${u.getAttribute(xe)}"]`:`[${nr}]`,m=a0((u==null?void 0:u.getAttribute("data-slide-width"))??null,Ea),g=a0((u==null?void 0:u.getAttribute("data-slide-height"))??null,Ca),x=f.map((C,E)=>{const M=C.getAttribute("data-editable")||"block",R=C.getAttribute(xe)||Nv(E,M);return{id:R,selector:bh(R),type:M==="block"&&C.getAttribute("data-group")==="true"?"group":M,content:C instanceof HTMLImageElement?C.src:C.textContent||"",tagName:C.tagName.toLowerCase()}}),y=s.querySelector("h1, h2, title"),S=((A=y==null?void 0:y.textContent)==null?void 0:A.trim())||`Slide ${a}`;return{id:vE(a),title:S,htmlSource:i,rootSelector:h,width:m,height:g,elements:x}}function Ke(n,a){return n.querySelector(bh(a))}function SE(n,a,r){const i=sc(n.htmlSource);if(!i)return"";const s=Ke(i,a);return(s==null?void 0:s.style.getPropertyValue(r).trim())||""}function Na(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function xh(n){return`<!DOCTYPE html>
51
+ ${n.documentElement.outerHTML}`}function rl(n,a){const r=Na(n);return r?(a(r),xh(r)):n}const Sh=["position","left","top","width","height","boxSizing","transform","transformOrigin","margin","zIndex"];function Ov(){return{position:null,left:null,top:null,width:null,height:null,boxSizing:null,transform:null,transformOrigin:null,margin:null,zIndex:null}}function Jr(n){const a=Ov();for(const r of Sh){const i=n.style[r];a[r]=i||null}return a}function wh(n){return{...Ov(),...n}}function Ra(n){const a=n||"",r=a.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/i),i=a.match(/rotate\(([-\d.]+)deg\)/i);return{translateX:r&&Number.parseFloat(r[1]||"0")||0,translateY:r&&Number.parseFloat(r[2]||"0")||0,rotate:i&&Number.parseFloat(i[1]||"0")||0}}function oc(n){return Math.round(n*100)/100}function hi(n,a,r){const i=[];return(Math.abs(n)>.01||Math.abs(a)>.01)&&i.push(`translate(${oc(n)}px, ${oc(a)}px)`),Math.abs(r)>.01&&i.push(`rotate(${oc(r)}deg)`),i.length?i.join(" "):null}function wE(n){return hi(0,0,Ra(n).rotate)}function Us(n){const a=(n||"").trim();if(!/^-?(?:\d+|\d*\.\d+)px$/i.test(a))return null;const r=Number.parseFloat(a);return Number.isFinite(r)?r:null}function Is(n){return`${oc(n)}px`}function mi({previousStyle:n,left:a,top:r,width:i,height:s}){return wh({...n,position:"absolute",left:Is(a),top:Is(r),width:Is(i),height:Is(s),boxSizing:"border-box",margin:"0px",transform:wE(n.transform),transformOrigin:n.transformOrigin||"center center"})}function EE(n,a,r,i={}){const s=Ra(n.transform),u=Us(n.left)??0,f=Us(n.top)??0,h=Us(n.width)??i.width??0,m=Us(n.height)??i.height??0;return mi({previousStyle:n,left:u+s.translateX+a,top:f+s.translateY+r,width:h,height:m})}function Kr(n,a,r){return{x:r.offsetX+(n.left-a.left)*r.scale,y:r.offsetY+(n.top-a.top)*r.scale,width:n.width*r.scale,height:n.height*r.scale}}function Ps(n){const a=Number.parseFloat(n||"");return Number.isFinite(a)?a:0}function r0(n){const a=Ra(n.style.transform);return{x:Ps(n.style.left)+a.translateX,y:Ps(n.style.top)+a.translateY,width:Ps(n.style.width)||Ea,height:Ps(n.style.height)||Ca}}function cc(n,a={}){let r=n,i=0,s=0;const u=n.getAttribute(xe)??"",f=a[u]??r0(n),h=f.width,m=f.height;for(;r;){const g=r.getAttribute(xe)??"",x=a[g]??r0(r);i+=x.x,s+=x.y;const y=r.parentElement;if(!y||!y.hasAttribute("data-editable"))break;r=y}return{x:i,y:s,width:h,height:m}}function Dv(n,a={}){const r=n.parentElement;if(!r||!r.hasAttribute("data-editable"))return{x:0,y:0};const i=cc(r,a);return{x:i.x,y:i.y}}function Pf(n,a){n.style.position=n.style.position||"absolute",n.style.left=`${Math.round(a.x*100)/100}px`,n.style.top=`${Math.round(a.y*100)/100}px`,n.style.width=`${Math.round(a.width*100)/100}px`,n.style.height=`${Math.round(a.height*100)/100}px`;const r=Ra(n.style.transform),i=hi(0,0,r.rotate);i?n.style.transform=i:n.style.removeProperty("transform")}function l0(n,a){a&&(a.color&&(n.style.color=a.color),a.fontSize&&(n.style.fontSize=a.fontSize),a.fontWeight&&(n.style.fontWeight=a.fontWeight),a.fontStyle&&(n.style.fontStyle=a.fontStyle),a.lineHeight&&(n.style.lineHeight=a.lineHeight),a.textAlign&&(n.style.textAlign=a.textAlign),a.paddingTop&&(n.style.paddingTop=a.paddingTop),a.paddingRight&&(n.style.paddingRight=a.paddingRight),a.paddingBottom&&(n.style.paddingBottom=a.paddingBottom),a.paddingLeft&&(n.style.paddingLeft=a.paddingLeft),a.listStylePosition&&(n.style.listStylePosition=a.listStylePosition),a.listStyleType&&(n.style.listStyleType=a.listStyleType))}function cf(n){const a=n.parentElement;return a&&(a.hasAttribute(nr)||a.hasAttribute("data-editable"))?a:null}function $f(n){return Array.from(n.children).filter(a=>a instanceof HTMLElement&&a.hasAttribute("data-editable"))}function jv(n){const a=n.tagName.toLowerCase();return a!=="ul"&&a!=="ol"?!1:Array.from(n.children).some(r=>r.tagName.toLowerCase()==="li"&&r.hasAttribute("data-editable"))}function CE(n,a){const r=new Set(Array.from(n.querySelectorAll(`[${xe}]`)).map(f=>f.getAttribute(xe)).filter(f=>!!f));if(!r.has(a))return a;const i=a.match(/^(.*?)(?:-(\d+))?$/),s=(i==null?void 0:i[1])||a;let u=Number.parseInt((i==null?void 0:i[2])||"1",10)+1;for(;r.has(`${s}-${u}`);)u+=1;return`${s}-${u}`}function TE(n,a){return Array.from(n.children).filter(r=>r instanceof HTMLElement?r.hasAttribute("data-editable")?!0:jv(r)?(r.setAttribute("data-editable","block"),r.getAttribute(xe)||r.setAttribute(xe,CE(a,"block-1")),!0):!1:!1)}function AE({html:n,slideId:a,groupElementId:r,elementIds:i,elementRects:s={},timestamp:u=Date.now()}){const f=Na(n);if(!f||!i.length)return null;const h=i.map($=>Ke(f,$)).filter($=>!!$);if(h.length!==i.length)return null;const g=h.flatMap($=>$.getAttribute("data-group")==="true"?$f($):[$]).filter(($,q,z)=>z.findIndex(W=>W===$)===q);if(g.length<2)return null;const x=cf(h[0]);if(!x||h.some($=>cf($)!==x)||Ke(f,r))return null;const y=h.filter($=>$.getAttribute("data-group")==="true"),S=g.map($=>cc($,s)),A=Math.min(...S.map($=>$.x)),C=Math.min(...S.map($=>$.y)),E=Math.max(...S.map($=>$.x+$.width)),M=Math.max(...S.map($=>$.y+$.height)),R=Dv(h[0],s),j=f.createElement("div");j.setAttribute("data-editable","block"),j.setAttribute("data-group","true"),j.setAttribute(xe,r),Pf(j,{x:A-R.x,y:C-R.y,width:E-A,height:M-C});const B=Array.from(x.children).flatMap($=>$ instanceof HTMLElement?y.includes($)?$f($).filter(q=>g.includes(q)):g.includes($)?[$]:[]:[]),Y=h.find($=>cf($)===x)??null;(Y==null?void 0:Y.parentElement)===x?x.insertBefore(j,Y):x.appendChild(j);for(const $ of B){const q=cc($,s);Pf($,{x:q.x-A,y:q.y-C,width:q.width,height:q.height}),j.appendChild($)}for(const $ of y)$.children.length||$.remove();const te=xh(f);return te===n?null:{type:"group.create",slideId:a,groupElementId:r,elementIds:B.map($=>$.getAttribute(xe)).filter($=>!!$),previousHtmlSource:n,nextHtmlSource:te,timestamp:u}}function ME({html:n,slideId:a,groupElementId:r,elementRects:i={},elementPresentationStyles:s={},timestamp:u=Date.now()}){const f=Na(n);if(!f)return null;const h=Ke(f,r);if(!h||!h.parentElement)return null;const m=h.parentElement,g=Dv(h,i),x=h.getAttribute("data-group")==="true",y=x?$f(h):TE(h,f);if(!y.length)return null;const S=h.getAttribute(xe),A=x?h:h.nextSibling,C=y.map(M=>M.getAttribute(xe)).filter(M=>!!M);for(const M of y){const R=cc(M,i);if(Pf(M,{x:R.x-g.x,y:R.y-g.y,width:R.width,height:R.height}),!x){const j=M.getAttribute(xe)??"";l0(M,s[j]),jv(M)&&(M.style.margin="0px");for(const B of Array.from(M.querySelectorAll(`[data-editable][${xe}]`))){const Y=B.getAttribute(xe)??"";l0(B,s[Y])}}m.insertBefore(M,A)}x&&h.remove();const E=xh(f);return E===n?null:{type:"group.ungroup",slideId:a,groupElementId:r,childElementIds:x||!S?C:[S,...C],previousHtmlSource:n,nextHtmlSource:E,timestamp:u}}function _E(n,a,r){return rl(n,i=>{const s=Ke(i,a);s&&(s.textContent=r)})}function NE(n,a,r,i){return rl(n,s=>{var f;const u=Ke(s,a);u&&(i.trim().length===0?u.style.removeProperty(r):u.style.setProperty(r,i),(f=u.getAttribute("style"))!=null&&f.trim()||u.removeAttribute("style"))})}function RE(n,a,r,i){return rl(n,s=>{const u=Ke(s,a);u&&(i.trim().length===0?u.removeAttribute(r):u.setAttribute(r,i))})}function OE(n,a){var r;for(const i of Sh){const s=a[i];if(s===null){n.style[i]="";continue}n.style[i]=s}(r=n.getAttribute("style"))!=null&&r.trim()||n.removeAttribute("style")}function DE(n,a,r){return rl(n,i=>{const s=Ke(i,a);s&&OE(s,r)})}function uc(n,a){const r=Na(n);if(!r)return null;const i=Ke(r,a);if(!i||!(i.parentElement instanceof HTMLElement))return null;const s=i.previousElementSibling instanceof HTMLElement?i.previousElementSibling.getAttribute(xe):null,u=i.nextElementSibling instanceof HTMLElement?i.nextElementSibling.getAttribute(xe):null;return{parentElementId:i.parentElement.getAttribute(xe),previousSiblingElementId:s,nextSiblingElementId:u}}function dc(n,a){var i;const r=Na(n);return r?((i=Ke(r,a))==null?void 0:i.outerHTML)??null:null}function zv(n,a){var u;const r=Na(`<template>${n}</template>`),i=(u=r==null?void 0:r.querySelector("template"))==null?void 0:u.content.firstElementChild;if(!(i instanceof HTMLElement))return n;const s=[i,...Array.from(i.querySelectorAll(`[${xe}]`))];for(const f of s){const h=f.getAttribute(xe);h&&a[h]&&f.setAttribute(xe,a[h])}return i.outerHTML}function jE(n,a){const r=new Set(Array.from(n.querySelectorAll(`[${xe}]`)).map(f=>f.getAttribute(xe)).filter(f=>!!f));if(!r.has(a))return a;const i=a.match(/^(.*?)(?:-(\d+))?$/),s=(i==null?void 0:i[1])||a;let u=Number.parseInt((i==null?void 0:i[2])||"1",10)+1;for(;r.has(`${s}-${u}`);)u+=1;return`${s}-${u}`}function Gf(n,a){const r=Na(n);return r?jE(r,a):a}function kv(n,a){return rl(n,r=>{var m;if(Ke(r,a.elementId))return;const i=Na(`<template>${a.html}</template>`),s=(m=i==null?void 0:i.querySelector("template"))==null?void 0:m.content.firstElementChild;if(!(s instanceof HTMLElement))return;const u=(a.parentElementId?Ke(r,a.parentElementId):null)??r.querySelector(`[${nr}]`)??r.body,f=a.nextSiblingElementId?Ke(r,a.nextSiblingElementId):null,h=a.previousSiblingElementId?Ke(r,a.previousSiblingElementId):null;(f==null?void 0:f.parentElement)===u?u.insertBefore(r.importNode(s,!0),f):(h==null?void 0:h.parentElement)===u?h.after(r.importNode(s,!0)):u.appendChild(r.importNode(s,!0))})}function zE(n,a){return rl(n,r=>{var i;(i=Ke(r,a))==null||i.remove()})}function Ja(n,a){return{...a,hidden:n.hidden,sourceFile:n.sourceFile}}function Lv(n,a){if(a.type==="slide.visibility.update")return n.id!==a.slideId?n:{...n,hidden:a.nextHidden};if(a.type==="slide.title.update")return n.id!==a.slideId?n:{...n,title:a.nextTitle};if(!("slideId"in a)||a.type==="slide.reorder"||n.id!==a.slideId)return n;switch(a.type){case"operation.batch":return a.operations.reduce((r,i)=>Lv(r,i),n);case"text.update":return Ja(n,fo(_E(n.htmlSource,a.elementId,a.nextText),n.id));case"style.update":return Ja(n,fo(NE(n.htmlSource,a.elementId,a.propertyName,a.nextValue),n.id));case"attribute.update":return Ja(n,fo(RE(n.htmlSource,a.elementId,a.attributeName,a.nextValue),n.id));case"element.layout.update":return Ja(n,fo(DE(n.htmlSource,a.elementId,a.nextStyle),n.id));case"element.insert":return Ja(n,fo(kv(n.htmlSource,a),n.id));case"element.remove":return Ja(n,fo(zE(n.htmlSource,a.elementId),n.id));case"group.create":case"group.ungroup":return Ja(n,fo(a.nextHtmlSource,n.id))}}function Hv(n){switch(n.type){case"operation.batch":return{type:"operation.batch",slideId:n.slideId,operations:n.operations.map(a=>Hv(a)).reverse(),timestamp:n.timestamp};case"text.update":return{...n,previousText:n.nextText,nextText:n.previousText};case"style.update":return{...n,previousValue:n.nextValue,nextValue:n.previousValue};case"attribute.update":return{...n,previousValue:n.nextValue,nextValue:n.previousValue};case"element.layout.update":return{...n,previousStyle:n.nextStyle,nextStyle:n.previousStyle};case"element.insert":return{type:"element.remove",slideId:n.slideId,elementId:n.elementId,parentElementId:n.parentElementId,previousSiblingElementId:n.previousSiblingElementId,nextSiblingElementId:n.nextSiblingElementId,html:n.html,timestamp:n.timestamp};case"element.remove":return{type:"element.insert",slideId:n.slideId,elementId:n.elementId,parentElementId:n.parentElementId,previousSiblingElementId:n.previousSiblingElementId,nextSiblingElementId:n.nextSiblingElementId,html:n.html,timestamp:n.timestamp};case"group.create":return{type:"group.ungroup",slideId:n.slideId,groupElementId:n.groupElementId,childElementIds:n.elementIds,previousHtmlSource:n.nextHtmlSource,nextHtmlSource:n.previousHtmlSource,timestamp:n.timestamp};case"group.ungroup":return{type:"group.create",slideId:n.slideId,groupElementId:n.groupElementId,elementIds:n.childElementIds,previousHtmlSource:n.nextHtmlSource,nextHtmlSource:n.previousHtmlSource,timestamp:n.timestamp};case"slide.create":return{type:"slide.delete",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.delete":return{type:"slide.create",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.duplicate":return{type:"slide.delete",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.reorder":return{...n,fromIndex:n.toIndex,toIndex:n.fromIndex};case"slide.visibility.update":return{...n,previousHidden:n.nextHidden,nextHidden:n.previousHidden};case"slide.title.update":return{...n,previousTitle:n.nextTitle,nextTitle:n.previousTitle}}}const kE=`<!DOCTYPE html>
52
+ <html lang="en">
53
+ <head>
54
+ <meta charset="utf-8" />
55
+ <title>Untitled Slide</title>
56
+ </head>
57
+ <body>
58
+ <main
59
+ data-slide-root="true"
60
+ data-slide-width="1920"
61
+ data-slide-height="1080"
62
+ data-editor-id="slide-root"
63
+ style="position: relative; width: 1920px; height: 1080px; overflow: hidden; background: #ffffff;"
64
+ >
65
+ <h1 data-editable="text" data-editor-id="text-1" style="position: absolute; left: 160px; top: 160px; width: 1200px; height: 220px; box-sizing: border-box; margin: 0; font-size: 96px; line-height: 1.05;">
66
+ Untitled Slide
67
+ </h1>
68
+ </main>
69
+ </body>
70
+ </html>`;function Bv(n,a){const r=new Set(n.map(s=>s.id));if(!r.has(a))return a;let i=2;for(;r.has(`${a}-${i}`);)i+=1;return`${a}-${i}`}function Uv(n,a){const r=new Set(n.map(h=>h.sourceFile).filter(Boolean));if(!r.has(a))return a;const i=a.lastIndexOf("."),s=i>=0?a.slice(0,i):a,u=i>=0?a.slice(i):"";let f=2;for(;r.has(`${s}-${f}${u}`);)f+=1;return`${s}-${f}${u}`}function LE(n,a){const r=Math.max(a+1,1),i=Bv(n,`generated-slide-${r}`),s=Uv(n,`${String(r).padStart(2,"0")}-untitled.html`);return{...fo(kE,i),hidden:!1,sourceFile:s,title:"Untitled Slide"}}function HE(n,a){const r=Bv(n,`${a.id}-copy`),i=Uv(n,a.sourceFile?BE(a.sourceFile,"copy"):`${r}.html`);return{...fo(a.htmlSource,r),hidden:a.hidden===!0,sourceFile:i,title:a.title}}function BE(n,a){const r=n.lastIndexOf(".");return r<0?`${n}-${a}`:`${n.slice(0,r)}-${a}${n.slice(r)}`}function i0(n,a){return Math.min(Math.max(n,0),a)}function uf(n,a){switch(a.type){case"slide.create":case"slide.duplicate":{const r=i0(a.index,n.length);return[...n.slice(0,r),a.slide,...n.slice(r)]}case"slide.delete":return n.filter(r=>r.id!==a.slide.id);case"slide.reorder":{const r=n.findIndex(u=>u.id===a.slideId);if(r<0)return n;const i=[...n],[s]=i.splice(r,1);return s?(i.splice(i0(a.toIndex,i.length),0,s),i):n}default:return n.map(r=>Lv(r,a))}}function Iv(n){return{slides:n,undoStack:[],redoStack:[]}}function $s(n,a){switch(a.type){case"history.reset":return Iv(a.slides);case"history.commit":return{slides:uf(n.slides,a.operation),undoStack:[...n.undoStack,a.operation],redoStack:[]};case"history.undo":{const r=n.undoStack[n.undoStack.length-1];return r?{slides:uf(n.slides,Hv(r)),undoStack:n.undoStack.slice(0,-1),redoStack:[...n.redoStack,r]}:n}case"history.redo":{const r=n.redoStack[n.redoStack.length-1];return r?{slides:uf(n.slides,r),undoStack:[...n.undoStack,r],redoStack:n.redoStack.slice(0,-1)}:n}}}async function UE({manifestUrl:n,fetchImpl:a,requestInit:r,slideIdPrefix:i="generated-slide-"}){var y;const s=a??globalThis.fetch;if(!s)throw new Error("loadSlidesFromManifest requires a fetch implementation.");const u={cache:"no-store",...r},f=await s(n,u);if(!f.ok)return null;const h=await f.json();if(!((y=h.slides)!=null&&y.length))return null;const m=f.url||n,g=new URL(m),x=await Promise.all(h.slides.map(async(S,A)=>{const C=new URL(S.file,m);for(const[j,B]of g.searchParams)C.searchParams.has(j)||C.searchParams.set(j,B);const E=await s(C.toString(),u);if(!E.ok)throw new Error(`Failed to load slide HTML: ${S.file}`);const M=await E.text(),R=fo(M,`${i}${A+1}`);return{...R,hidden:S.hidden===!0,sourceFile:S.file,title:S.title||R.title}}));return{manifest:h,slides:x}}const IE=["#F59E0B","#EF4444","#10B981","#3B82F6","#8B5CF6","#FFFFFF","#0F172A"];function PE(n){const a=n.filter(r=>r.hidden!==!0);return a.length>0?a:n}function $E(n,a){return Math.min(Math.max(n,0),Math.max(a-1,0))}/**
71
+ * @license lucide-react v1.14.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const Pv=(...n)=>n.filter((a,r,i)=>!!a&&a.trim()!==""&&i.indexOf(a)===r).join(" ").trim();/**
76
+ * @license lucide-react v1.14.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const GE=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
81
+ * @license lucide-react v1.14.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const YE=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,r,i)=>i?i.toUpperCase():r.toLowerCase());/**
86
+ * @license lucide-react v1.14.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const s0=n=>{const a=YE(n);return a.charAt(0).toUpperCase()+a.slice(1)};/**
91
+ * @license lucide-react v1.14.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */var df={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"};/**
96
+ * @license lucide-react v1.14.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const VE=n=>{for(const a in n)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1},qE=v.createContext({}),XE=()=>v.useContext(qE),FE=v.forwardRef(({color:n,size:a,strokeWidth:r,absoluteStrokeWidth:i,className:s="",children:u,iconNode:f,...h},m)=>{const{size:g=24,strokeWidth:x=2,absoluteStrokeWidth:y=!1,color:S="currentColor",className:A=""}=XE()??{},C=i??y?Number(r??x)*24/Number(a??g):r??x;return v.createElement("svg",{ref:m,...df,width:a??g??df.width,height:a??g??df.height,stroke:n??S,strokeWidth:C,className:Pv("lucide",A,s),...!u&&!VE(h)&&{"aria-hidden":"true"},...h},[...f.map(([E,M])=>v.createElement(E,M)),...Array.isArray(u)?u:[u]])});/**
101
+ * @license lucide-react v1.14.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const Me=(n,a)=>{const r=v.forwardRef(({className:i,...s},u)=>v.createElement(FE,{ref:u,iconNode:a,className:Pv(`lucide-${GE(s0(n))}`,`lucide-${n}`,i),...s}));return r.displayName=s0(n),r};/**
106
+ * @license lucide-react v1.14.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const KE=[["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"M10 16v4a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-4",key:"11f1s0"}],["path",{d:"M10 8V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v4",key:"t14dx9"}],["path",{d:"M20 16v1a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-1",key:"1w07xs"}],["path",{d:"M14 8V7c0-1.1.9-2 2-2h2a2 2 0 0 1 2 2v1",key:"1apec2"}]],Yf=Me("align-center-horizontal",KE);/**
111
+ * @license lucide-react v1.14.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const QE=[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",key:"14d6g8"}],["path",{d:"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",key:"1e2lrw"}],["path",{d:"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",key:"1fkdwx"}],["path",{d:"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",key:"1euafb"}]],$v=Me("align-center-vertical",QE);/**
116
+ * @license lucide-react v1.14.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const ZE=[["rect",{width:"6",height:"16",x:"4",y:"2",rx:"2",key:"z5wdxg"}],["rect",{width:"6",height:"9",x:"14",y:"9",rx:"2",key:"um7a8w"}],["path",{d:"M22 22H2",key:"19qnx5"}]],Gv=Me("align-end-horizontal",ZE);/**
121
+ * @license lucide-react v1.14.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const WE=[["rect",{width:"16",height:"6",x:"2",y:"4",rx:"2",key:"10wcwx"}],["rect",{width:"9",height:"6",x:"9",y:"14",rx:"2",key:"4p5bwg"}],["path",{d:"M22 22V2",key:"12ipfv"}]],Yv=Me("align-end-vertical",WE);/**
126
+ * @license lucide-react v1.14.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const JE=[["rect",{width:"6",height:"16",x:"4",y:"6",rx:"2",key:"1n4dg1"}],["rect",{width:"6",height:"9",x:"14",y:"6",rx:"2",key:"17khns"}],["path",{d:"M22 2H2",key:"fhrpnj"}]],Vv=Me("align-start-horizontal",JE);/**
131
+ * @license lucide-react v1.14.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const eC=[["rect",{width:"9",height:"6",x:"6",y:"14",rx:"2",key:"lpm2y7"}],["rect",{width:"16",height:"6",x:"6",y:"4",rx:"2",key:"rdj6ps"}],["path",{d:"M2 2v20",key:"1ivd8o"}]],qv=Me("align-start-vertical",eC);/**
136
+ * @license lucide-react v1.14.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const tC=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],Xv=Me("arrow-down-to-line",tC);/**
141
+ * @license lucide-react v1.14.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const nC=[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]],Vf=Me("arrow-up-to-line",nC);/**
146
+ * @license lucide-react v1.14.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const oC=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],aC=Me("bold",oC);/**
151
+ * @license lucide-react v1.14.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const rC=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],lC=Me("box",rC);/**
156
+ * @license lucide-react v1.14.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const iC=[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]],li=Me("case-sensitive",iC);/**
161
+ * @license lucide-react v1.14.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const sC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Fv=Me("check",sC);/**
166
+ * @license lucide-react v1.14.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const cC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pi=Me("chevron-down",cC);/**
171
+ * @license lucide-react v1.14.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const uC=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],dC=Me("chevron-right",uC);/**
176
+ * @license lucide-react v1.14.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const fC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Eh=Me("chevron-up",fC);/**
181
+ * @license lucide-react v1.14.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const hC=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],mC=Me("circle-dashed",hC);/**
186
+ * @license lucide-react v1.14.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const pC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],gC=Me("circle",pC);/**
191
+ * @license lucide-react v1.14.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const yC=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],vC=Me("cloud",yC);/**
196
+ * @license lucide-react v1.14.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const bC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],qf=Me("columns-3",bC);/**
201
+ * @license lucide-react v1.14.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const xC=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Kv=Me("copy",xC);/**
206
+ * @license lucide-react v1.14.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const SC=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],wC=Me("download",SC);/**
211
+ * @license lucide-react v1.14.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const EC=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],CC=Me("ellipsis",EC);/**
216
+ * @license lucide-react v1.14.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const TC=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],c0=Me("eye-off",TC);/**
221
+ * @license lucide-react v1.14.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const AC=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Qv=Me("eye",AC);/**
226
+ * @license lucide-react v1.14.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const MC=[["path",{d:"M10.5 22H6a2 2 0 0 1-2-2V4a2 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 8v6",key:"g5mvt7"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14 20 2 2 4-4",key:"15kota"}]],_C=Me("file-check-corner",MC);/**
231
+ * @license lucide-react v1.14.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const NC=[["path",{d:"M4 12.15V4a2 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 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],RC=Me("file-code-corner",NC);/**
236
+ * @license lucide-react v1.14.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const OC=[["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"}]],Zv=Me("file-text",OC);/**
241
+ * @license lucide-react v1.14.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const DC=[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]],fc=Me("group",DC);/**
246
+ * @license lucide-react v1.14.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */const jC=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],zC=Me("italic",jC);/**
251
+ * @license lucide-react v1.14.0 - ISC
252
+ *
253
+ * This source code is licensed under the ISC license.
254
+ * See the LICENSE file in the root directory of this source tree.
255
+ */const kC=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Ch=Me("layers",kC);/**
256
+ * @license lucide-react v1.14.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */const LC=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Wv=Me("link-2",LC);/**
261
+ * @license lucide-react v1.14.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const HC=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],BC=Me("lock-open",HC);/**
266
+ * @license lucide-react v1.14.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const UC=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Xf=Me("lock",UC);/**
271
+ * @license lucide-react v1.14.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ */const IC=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],PC=Me("maximize-2",IC);/**
276
+ * @license lucide-react v1.14.0 - ISC
277
+ *
278
+ * This source code is licensed under the ISC license.
279
+ * See the LICENSE file in the root directory of this source tree.
280
+ */const $C=[["path",{d:"M5 12h14",key:"1ays0h"}]],Jv=Me("minus",$C);/**
281
+ * @license lucide-react v1.14.0 - ISC
282
+ *
283
+ * This source code is licensed under the ISC license.
284
+ * See the LICENSE file in the root directory of this source tree.
285
+ */const GC=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Ff=Me("palette",GC);/**
286
+ * @license lucide-react v1.14.0 - ISC
287
+ *
288
+ * This source code is licensed under the ISC license.
289
+ * See the LICENSE file in the root directory of this source tree.
290
+ */const YC=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],VC=Me("pen",YC);/**
291
+ * @license lucide-react v1.14.0 - ISC
292
+ *
293
+ * This source code is licensed under the ISC license.
294
+ * See the LICENSE file in the root directory of this source tree.
295
+ */const qC=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],XC=Me("pencil",qC);/**
296
+ * @license lucide-react v1.14.0 - ISC
297
+ *
298
+ * This source code is licensed under the ISC license.
299
+ * See the LICENSE file in the root directory of this source tree.
300
+ */const FC=[["path",{d:"M13 4v16",key:"8vvj80"}],["path",{d:"M17 4v16",key:"7dpous"}],["path",{d:"M19 4H9.5a4.5 4.5 0 0 0 0 9H13",key:"sh4n9v"}]],KC=Me("pilcrow",FC);/**
301
+ * @license lucide-react v1.14.0 - ISC
302
+ *
303
+ * This source code is licensed under the ISC license.
304
+ * See the LICENSE file in the root directory of this source tree.
305
+ */const QC=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],ZC=Me("play",QC);/**
306
+ * @license lucide-react v1.14.0 - ISC
307
+ *
308
+ * This source code is licensed under the ISC license.
309
+ * See the LICENSE file in the root directory of this source tree.
310
+ */const WC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ii=Me("plus",WC);/**
311
+ * @license lucide-react v1.14.0 - ISC
312
+ *
313
+ * This source code is licensed under the ISC license.
314
+ * See the LICENSE file in the root directory of this source tree.
315
+ */const JC=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],eT=Me("presentation",JC);/**
316
+ * @license lucide-react v1.14.0 - ISC
317
+ *
318
+ * This source code is licensed under the ISC license.
319
+ * See the LICENSE file in the root directory of this source tree.
320
+ */const tT=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],nT=Me("rotate-cw",tT);/**
321
+ * @license lucide-react v1.14.0 - ISC
322
+ *
323
+ * This source code is licensed under the ISC license.
324
+ * See the LICENSE file in the root directory of this source tree.
325
+ */const oT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]],hc=Me("rows-3",oT);/**
326
+ * @license lucide-react v1.14.0 - ISC
327
+ *
328
+ * This source code is licensed under the ISC license.
329
+ * See the LICENSE file in the root directory of this source tree.
330
+ */const aT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],mc=Me("square",aT);/**
331
+ * @license lucide-react v1.14.0 - ISC
332
+ *
333
+ * This source code is licensed under the ISC license.
334
+ * See the LICENSE file in the root directory of this source tree.
335
+ */const rT=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],lT=Me("strikethrough",rT);/**
336
+ * @license lucide-react v1.14.0 - ISC
337
+ *
338
+ * This source code is licensed under the ISC license.
339
+ * See the LICENSE file in the root directory of this source tree.
340
+ */const iT=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],pc=Me("text-align-center",iT);/**
341
+ * @license lucide-react v1.14.0 - ISC
342
+ *
343
+ * This source code is licensed under the ISC license.
344
+ * See the LICENSE file in the root directory of this source tree.
345
+ */const sT=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],eb=Me("text-align-end",sT);/**
346
+ * @license lucide-react v1.14.0 - ISC
347
+ *
348
+ * This source code is licensed under the ISC license.
349
+ * See the LICENSE file in the root directory of this source tree.
350
+ */const cT=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],tb=Me("text-align-start",cT);/**
351
+ * @license lucide-react v1.14.0 - ISC
352
+ *
353
+ * This source code is licensed under the ISC license.
354
+ * See the LICENSE file in the root directory of this source tree.
355
+ */const uT=[["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"}]],nb=Me("trash-2",uT);/**
356
+ * @license lucide-react v1.14.0 - ISC
357
+ *
358
+ * This source code is licensed under the ISC license.
359
+ * See the LICENSE file in the root directory of this source tree.
360
+ */const dT=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],Kf=Me("type",dT);/**
361
+ * @license lucide-react v1.14.0 - ISC
362
+ *
363
+ * This source code is licensed under the ISC license.
364
+ * See the LICENSE file in the root directory of this source tree.
365
+ */const fT=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],hT=Me("underline",fT);/**
366
+ * @license lucide-react v1.14.0 - ISC
367
+ *
368
+ * This source code is licensed under the ISC license.
369
+ * See the LICENSE file in the root directory of this source tree.
370
+ */const mT=[["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"}]],Th=Me("ungroup",mT);/**
371
+ * @license lucide-react v1.14.0 - ISC
372
+ *
373
+ * This source code is licensed under the ISC license.
374
+ * See the LICENSE file in the root directory of this source tree.
375
+ */const pT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ah=Me("x",pT);/**
376
+ * @license lucide-react v1.14.0 - ISC
377
+ *
378
+ * This source code is licensed under the ISC license.
379
+ * See the LICENSE file in the root directory of this source tree.
380
+ */const gT=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],yT=Me("zap",gT);function ob(n){var a,r,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(a=0;a<s;a++)n[a]&&(r=ob(n[a]))&&(i&&(i+=" "),i+=r)}else for(r in n)n[r]&&(i&&(i+=" "),i+=r);return i}function ab(){for(var n,a,r=0,i="",s=arguments.length;r<s;r++)(n=arguments[r])&&(a=ob(n))&&(i&&(i+=" "),i+=a);return i}const vT=(n,a)=>{const r=new Array(n.length+a.length);for(let i=0;i<n.length;i++)r[i]=n[i];for(let i=0;i<a.length;i++)r[n.length+i]=a[i];return r},bT=(n,a)=>({classGroupId:n,validator:a}),rb=(n=new Map,a=null,r)=>({nextPart:n,validators:a,classGroupId:r}),gc="-",u0=[],xT="arbitrary..",ST=n=>{const a=ET(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return wT(f);const h=f.split(gc),m=h[0]===""&&h.length>1?1:0;return lb(h,m,a)},getConflictingClassGroupIds:(f,h)=>{if(h){const m=i[f],g=r[f];return m?g?vT(g,m):m:g||u0}return r[f]||u0}}},lb=(n,a,r)=>{if(n.length-a===0)return r.classGroupId;const s=n[a],u=r.nextPart.get(s);if(u){const g=lb(n,a+1,u);if(g)return g}const f=r.validators;if(f===null)return;const h=a===0?n.join(gc):n.slice(a).join(gc),m=f.length;for(let g=0;g<m;g++){const x=f[g];if(x.validator(h))return x.classGroupId}},wT=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=n.slice(1,-1),r=a.indexOf(":"),i=a.slice(0,r);return i?xT+i:void 0})(),ET=n=>{const{theme:a,classGroups:r}=n;return CT(r,a)},CT=(n,a)=>{const r=rb();for(const i in n){const s=n[i];Mh(s,r,i,a)}return r},Mh=(n,a,r,i)=>{const s=n.length;for(let u=0;u<s;u++){const f=n[u];TT(f,a,r,i)}},TT=(n,a,r,i)=>{if(typeof n=="string"){AT(n,a,r);return}if(typeof n=="function"){MT(n,a,r,i);return}_T(n,a,r,i)},AT=(n,a,r)=>{const i=n===""?a:ib(a,n);i.classGroupId=r},MT=(n,a,r,i)=>{if(NT(n)){Mh(n(i),a,r,i);return}a.validators===null&&(a.validators=[]),a.validators.push(bT(r,n))},_T=(n,a,r,i)=>{const s=Object.entries(n),u=s.length;for(let f=0;f<u;f++){const[h,m]=s[f];Mh(m,ib(a,h),r,i)}},ib=(n,a)=>{let r=n;const i=a.split(gc),s=i.length;for(let u=0;u<s;u++){const f=i[u];let h=r.nextPart.get(f);h||(h=rb(),r.nextPart.set(f,h)),r=h}return r},NT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,RT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let a=0,r=Object.create(null),i=Object.create(null);const s=(u,f)=>{r[u]=f,a++,a>n&&(a=0,i=r,r=Object.create(null))};return{get(u){let f=r[u];if(f!==void 0)return f;if((f=i[u])!==void 0)return s(u,f),f},set(u,f){u in r?r[u]=f:s(u,f)}}},Qf="!",d0=":",OT=[],f0=(n,a,r,i,s)=>({modifiers:n,hasImportantModifier:a,baseClassName:r,maybePostfixModifierPosition:i,isExternal:s}),DT=n=>{const{prefix:a,experimentalParseClassName:r}=n;let i=s=>{const u=[];let f=0,h=0,m=0,g;const x=s.length;for(let E=0;E<x;E++){const M=s[E];if(f===0&&h===0){if(M===d0){u.push(s.slice(m,E)),m=E+1;continue}if(M==="/"){g=E;continue}}M==="["?f++:M==="]"?f--:M==="("?h++:M===")"&&h--}const y=u.length===0?s:s.slice(m);let S=y,A=!1;y.endsWith(Qf)?(S=y.slice(0,-1),A=!0):y.startsWith(Qf)&&(S=y.slice(1),A=!0);const C=g&&g>m?g-m:void 0;return f0(u,A,S,C)};if(a){const s=a+d0,u=i;i=f=>f.startsWith(s)?u(f.slice(s.length)):f0(OT,!1,f,void 0,!0)}if(r){const s=i;i=u=>r({className:u,parseClassName:s})}return i},jT=n=>{const a=new Map;return n.orderSensitiveModifiers.forEach((r,i)=>{a.set(r,1e6+i)}),r=>{const i=[];let s=[];for(let u=0;u<r.length;u++){const f=r[u],h=f[0]==="[",m=a.has(f);h||m?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(f)):s.push(f)}return s.length>0&&(s.sort(),i.push(...s)),i}},zT=n=>({cache:RT(n.cacheSize),parseClassName:DT(n),sortModifiers:jT(n),...ST(n)}),kT=/\s+/,LT=(n,a)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:u}=a,f=[],h=n.trim().split(kT);let m="";for(let g=h.length-1;g>=0;g-=1){const x=h[g],{isExternal:y,modifiers:S,hasImportantModifier:A,baseClassName:C,maybePostfixModifierPosition:E}=r(x);if(y){m=x+(m.length>0?" "+m:m);continue}let M=!!E,R=i(M?C.substring(0,E):C);if(!R){if(!M){m=x+(m.length>0?" "+m:m);continue}if(R=i(C),!R){m=x+(m.length>0?" "+m:m);continue}M=!1}const j=S.length===0?"":S.length===1?S[0]:u(S).join(":"),B=A?j+Qf:j,Y=B+R;if(f.indexOf(Y)>-1)continue;f.push(Y);const te=s(R,M);for(let $=0;$<te.length;++$){const q=te[$];f.push(B+q)}m=x+(m.length>0?" "+m:m)}return m},HT=(...n)=>{let a=0,r,i,s="";for(;a<n.length;)(r=n[a++])&&(i=sb(r))&&(s&&(s+=" "),s+=i);return s},sb=n=>{if(typeof n=="string")return n;let a,r="";for(let i=0;i<n.length;i++)n[i]&&(a=sb(n[i]))&&(r&&(r+=" "),r+=a);return r},BT=(n,...a)=>{let r,i,s,u;const f=m=>{const g=a.reduce((x,y)=>y(x),n());return r=zT(g),i=r.cache.get,s=r.cache.set,u=h,h(m)},h=m=>{const g=i(m);if(g)return g;const x=LT(m,r);return s(m,x),x};return u=f,(...m)=>u(HT(...m))},UT=[],Ut=n=>{const a=r=>r[n]||UT;return a.isThemeGetter=!0,a},cb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ub=/^\((?:(\w[\w-]*):)?(.+)\)$/i,IT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,PT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$T=/\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$/,GT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,YT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ga=n=>IT.test(n),$e=n=>!!n&&!Number.isNaN(Number(n)),ya=n=>!!n&&Number.isInteger(Number(n)),ff=n=>n.endsWith("%")&&$e(n.slice(0,-1)),Bo=n=>PT.test(n),db=()=>!0,qT=n=>$T.test(n)&&!GT.test(n),_h=()=>!1,XT=n=>YT.test(n),FT=n=>VT.test(n),KT=n=>!Ee(n)&&!Ce(n),QT=n=>Oa(n,mb,_h),Ee=n=>cb.test(n),er=n=>Oa(n,pb,qT),h0=n=>Oa(n,aA,$e),ZT=n=>Oa(n,yb,db),WT=n=>Oa(n,gb,_h),m0=n=>Oa(n,fb,_h),JT=n=>Oa(n,hb,FT),Gs=n=>Oa(n,vb,XT),Ce=n=>ub.test(n),ti=n=>ir(n,pb),eA=n=>ir(n,gb),p0=n=>ir(n,fb),tA=n=>ir(n,mb),nA=n=>ir(n,hb),Ys=n=>ir(n,vb,!0),oA=n=>ir(n,yb,!0),Oa=(n,a,r)=>{const i=cb.exec(n);return i?i[1]?a(i[1]):r(i[2]):!1},ir=(n,a,r=!1)=>{const i=ub.exec(n);return i?i[1]?a(i[1]):r:!1},fb=n=>n==="position"||n==="percentage",hb=n=>n==="image"||n==="url",mb=n=>n==="length"||n==="size"||n==="bg-size",pb=n=>n==="length",aA=n=>n==="number",gb=n=>n==="family-name",yb=n=>n==="number"||n==="weight",vb=n=>n==="shadow",rA=()=>{const n=Ut("color"),a=Ut("font"),r=Ut("text"),i=Ut("font-weight"),s=Ut("tracking"),u=Ut("leading"),f=Ut("breakpoint"),h=Ut("container"),m=Ut("spacing"),g=Ut("radius"),x=Ut("shadow"),y=Ut("inset-shadow"),S=Ut("text-shadow"),A=Ut("drop-shadow"),C=Ut("blur"),E=Ut("perspective"),M=Ut("aspect"),R=Ut("ease"),j=Ut("animate"),B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],te=()=>[...Y(),Ce,Ee],$=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto","contain","none"],z=()=>[Ce,Ee,m],W=()=>[ga,"full","auto",...z()],ie=()=>[ya,"none","subgrid",Ce,Ee],de=()=>["auto",{span:["full",ya,Ce,Ee]},ya,Ce,Ee],K=()=>[ya,"auto",Ce,Ee],ae=()=>["auto","min","max","fr",Ce,Ee],fe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],pe=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...z()],O=()=>[ga,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],N=()=>[ga,"screen","full","dvw","lvw","svw","min","max","fit",...z()],L=()=>[ga,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],D=()=>[n,Ce,Ee],_=()=>[...Y(),p0,m0,{position:[Ce,Ee]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",tA,QT,{size:[Ce,Ee]}],P=()=>[ff,ti,er],X=()=>["","none","full",g,Ce,Ee],J=()=>["",$e,ti,er],ne=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[$e,ff,p0,m0],ye=()=>["","none",C,Ce,Ee],Se=()=>["none",$e,Ce,Ee],ve=()=>["none",$e,Ce,Ee],De=()=>[$e,Ce,Ee],ke=()=>[ga,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Bo],breakpoint:[Bo],color:[db],container:[Bo],"drop-shadow":[Bo],ease:["in","out","in-out"],font:[KT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Bo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Bo],shadow:[Bo],spacing:["px",$e],text:[Bo],"text-shadow":[Bo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ga,Ee,Ce,M]}],container:["container"],columns:[{columns:[$e,Ee,Ce,h]}],"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:te()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{"inset-s":W(),start:W()}],end:[{"inset-e":W(),end:W()}],"inset-bs":[{"inset-bs":W()}],"inset-be":[{"inset-be":W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[ya,"auto",Ce,Ee]}],basis:[{basis:[ga,"full","auto",h,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[$e,ga,"auto","initial","none",Ee]}],grow:[{grow:["",$e,Ce,Ee]}],shrink:[{shrink:["",$e,Ce,Ee]}],order:[{order:[ya,"first","last","none",Ce,Ee]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:de()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:de()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ae()}],"auto-rows":[{"auto-rows":ae()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...fe(),"normal"]}],"justify-items":[{"justify-items":[...pe(),"normal"]}],"justify-self":[{"justify-self":["auto",...pe()]}],"align-content":[{content:["normal",...fe()]}],"align-items":[{items:[...pe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...pe(),{baseline:["","last"]}]}],"place-content":[{"place-content":fe()}],"place-items":[{"place-items":[...pe(),"baseline"]}],"place-self":[{"place-self":["auto",...pe()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mbs:[{mbs:T()}],mbe:[{mbe:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],"inline-size":[{inline:["auto",...N()]}],"min-inline-size":[{"min-inline":["auto",...N()]}],"max-inline-size":[{"max-inline":["none",...N()]}],"block-size":[{block:["auto",...L()]}],"min-block-size":[{"min-block":["auto",...L()]}],"max-block-size":[{"max-block":["none",...L()]}],w:[{w:[h,"screen",...O()]}],"min-w":[{"min-w":[h,"screen","none",...O()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[f]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",r,ti,er]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,oA,ZT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ff,Ee]}],"font-family":[{font:[eA,WT,a]}],"font-features":[{"font-features":[Ee]}],"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:[s,Ce,Ee]}],"line-clamp":[{"line-clamp":[$e,"none",Ce,h0]}],leading:[{leading:[u,...z()]}],"list-image":[{"list-image":["none",Ce,Ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ce,Ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[$e,"from-font","auto",Ce,er]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[$e,"auto",Ce,Ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ce,Ee]}],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",Ce,Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ya,Ce,Ee],radial:["",Ce,Ee],conic:[ya,Ce,Ee]},nA,JT]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-bs":[{"border-bs":D()}],"border-color-be":[{"border-be":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[$e,Ce,Ee]}],"outline-w":[{outline:["",$e,ti,er]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",x,Ys,Gs]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",y,Ys,Gs]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[$e,er]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",S,Ys,Gs]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[$e,Ce,Ee]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"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":[$e]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[Ce,Ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":Y()}],"mask-image-conic-pos":[{"mask-conic":[$e]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ce,Ee]}],filter:[{filter:["","none",Ce,Ee]}],blur:[{blur:ye()}],brightness:[{brightness:[$e,Ce,Ee]}],contrast:[{contrast:[$e,Ce,Ee]}],"drop-shadow":[{"drop-shadow":["","none",A,Ys,Gs]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",$e,Ce,Ee]}],"hue-rotate":[{"hue-rotate":[$e,Ce,Ee]}],invert:[{invert:["",$e,Ce,Ee]}],saturate:[{saturate:[$e,Ce,Ee]}],sepia:[{sepia:["",$e,Ce,Ee]}],"backdrop-filter":[{"backdrop-filter":["","none",Ce,Ee]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[$e,Ce,Ee]}],"backdrop-contrast":[{"backdrop-contrast":[$e,Ce,Ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",$e,Ce,Ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[$e,Ce,Ee]}],"backdrop-invert":[{"backdrop-invert":["",$e,Ce,Ee]}],"backdrop-opacity":[{"backdrop-opacity":[$e,Ce,Ee]}],"backdrop-saturate":[{"backdrop-saturate":[$e,Ce,Ee]}],"backdrop-sepia":[{"backdrop-sepia":["",$e,Ce,Ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ce,Ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[$e,"initial",Ce,Ee]}],ease:[{ease:["linear","initial",R,Ce,Ee]}],delay:[{delay:[$e,Ce,Ee]}],animate:[{animate:["none",j,Ce,Ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Ce,Ee]}],"perspective-origin":[{"perspective-origin":te()}],rotate:[{rotate:Se()}],"rotate-x":[{"rotate-x":Se()}],"rotate-y":[{"rotate-y":Se()}],"rotate-z":[{"rotate-z":Se()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:De()}],"skew-x":[{"skew-x":De()}],"skew-y":[{"skew-y":De()}],transform:[{transform:[Ce,Ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:te()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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",Ce,Ee]}],"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":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"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",Ce,Ee]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[$e,ti,er,h0]}],stroke:[{stroke:["none",...D()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},lA=BT(rA);function Be(...n){return lA(ab(n))}const iA=[{id:"html",label:"Single HTML",desc:"Package as one shareable offline page, with built-in presenter view",icon:RC},{id:"pdf",label:"PDF",desc:"Export as a printable PDF document",icon:Zv},{id:"pptx",label:"PPTX",desc:"Export as a PowerPoint file",icon:eT,soon:!0},{id:"gslides",label:"Google Slides",desc:"Sync to Google Slides",icon:vC,soon:!0}];function sA({title:n,onTitleChange:a,onPresent:r,onExportPdf:i,onExportHtml:s,pdfSlides:u=[],pdfThumbnails:f={},isSaving:h}){const[m,g]=v.useState(!1),[x,y]=v.useState(!1),[S,A]=v.useState(0),C=v.useRef(null),E=n||"Untitled presentation";v.useEffect(()=>{const j=B=>{C.current&&!C.current.contains(B.target)&&g(!1)};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[]);const M=v.useCallback(j=>{if(!j)return;const B=j.getBoundingClientRect().width;A(Math.ceil(B))},[]),R=j=>{if(g(!1),j.soon){Sa(`${j.label} is not available yet.`,{description:"We are still building this export option."});return}if(j.id==="pdf"){y(!0);return}if(j.id==="html"){s==null||s();return}Sa(`Exporting as ${j.label}...`)};return p.jsxs("header",{className:"px-6 h-14 flex items-center justify-between bg-white border-b border-foreground/[0.06]",children:[p.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[p.jsx("div",{className:"w-8 h-8 rounded-lg bg-foreground flex items-center justify-center shrink-0",children:p.jsx("span",{className:"text-background font-bold text-sm font-display",children:"P"})}),p.jsx("div",{className:"w-px h-5 bg-foreground/10"}),p.jsxs("div",{className:"relative min-w-0 flex-1",children:[p.jsx("input",{value:n,onChange:j=>a==null?void 0:a(j.target.value),"aria-label":"Deck title",className:"max-w-full min-w-0 flex-none rounded-md bg-transparent px-2 py-1 text-[18px] font-semibold text-foreground outline-none focus:bg-foreground/[0.04]",style:S?{width:`${S}px`}:void 0,placeholder:"Untitled presentation"}),p.jsx("span",{ref:M,"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 whitespace-pre rounded-md px-2 py-1 text-[18px] font-semibold",children:E},E)]}),h?p.jsx("span",{className:"inline-flex h-5 shrink-0 items-center rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 text-[10px] font-medium uppercase leading-none tracking-wider text-foreground/45","aria-live":"polite",children:"saving..."}):null]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("div",{className:"relative",ref:C,children:[p.jsxs("button",{type:"button",onClick:()=>g(j=>!j),className:"h-8 px-3 rounded-md flex items-center gap-1.5 text-[13px] text-foreground/70 hover:bg-foreground/[0.04] hover:text-foreground transition-colors",children:[p.jsx(wC,{className:"w-3.5 h-3.5"}),p.jsx("span",{children:"Export"}),p.jsx(pi,{className:Be("w-3 h-3 transition-transform",m&&"rotate-180")})]}),m&&p.jsxs("div",{className:"absolute right-0 mt-1.5 w-[280px] bg-white rounded-xl border border-foreground/[0.08] shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] p-1.5 animate-fade-in z-50",children:[p.jsx("div",{className:"text-[10px] uppercase tracking-wider text-foreground/40 px-2.5 py-1.5 font-medium",children:"Export formats"}),iA.map(j=>{const B=j.icon;return p.jsxs("button",{type:"button",onClick:()=>R(j),className:Be("w-full text-left px-2.5 py-2 rounded-md flex items-start gap-2.5 transition-colors",j.soon?"opacity-50 cursor-not-allowed":"hover:bg-foreground/[0.04] cursor-pointer"),children:[p.jsx("div",{className:"w-7 h-7 rounded-md bg-foreground/[0.04] flex items-center justify-center shrink-0 mt-0.5",children:p.jsx(B,{className:"w-3.5 h-3.5 text-foreground/70"})}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:"text-[13px] font-medium text-foreground",children:j.label}),j.soon&&p.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-foreground/[0.06] text-foreground/50 uppercase tracking-wider",children:"Soon"})]}),p.jsx("div",{className:"text-[11px] text-foreground/50 mt-0.5 leading-snug",children:j.desc})]}),!j.soon&&p.jsx(Fv,{className:"w-3 h-3 text-foreground/0 mt-2"})]},j.id)})]})]}),p.jsxs("button",{type:"button",onClick:r,className:"h-8 px-3.5 rounded-md flex items-center gap-1.5 text-[13px] font-medium bg-foreground text-background hover:bg-foreground/90 transition-colors",children:[p.jsx(ZC,{className:"w-3.5 h-3.5"}),p.jsx("span",{children:"Present"})]})]}),x?p.jsx(cA,{slides:u,thumbnails:f,onClose:()=>y(!1),onExport:j=>{y(!1),i==null||i(j)}}):null]})}function cA({slides:n,thumbnails:a,onClose:r,onExport:i}){const s=n.filter(C=>C.file),[u,f]=v.useState("all"),[h,m]=v.useState([]),g=new Set(h),x=h.length,y=u==="all"||u==="selected"&&x>0;v.useEffect(()=>{const C=E=>{E.key==="Escape"&&r()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[r]);const S=(C,E)=>{m(M=>E?M.includes(C)?M:[...M,C]:M.filter(R=>R!==C))},A=()=>{if(u==="selected"){h.length>0&&i({mode:"slides",slideFiles:h});return}i({mode:"all"})};return p.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-foreground/20 px-4",onMouseDown:C=>{C.target===C.currentTarget&&r()},children:p.jsxs("dialog",{open:!0,"aria-modal":"true","aria-labelledby":"pdf-export-title",className:"relative m-0 flex max-h-[86vh] w-full max-w-[680px] flex-col overflow-hidden rounded-lg border border-foreground/[0.08] bg-white p-0 shadow-[0_24px_80px_rgba(0,0,0,0.18)]",children:[p.jsxs("div",{className:"flex items-center justify-between border-b border-foreground/[0.08] px-4 py-3",children:[p.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[p.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:p.jsx(Zv,{className:"h-4 w-4 text-foreground/70"})}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("h2",{id:"pdf-export-title",className:"text-[14px] font-semibold text-foreground",children:"Export PDF"}),p.jsx("p",{className:"mt-0.5 text-[11px] text-foreground/50",children:"Choose which slides to include."})]})]}),p.jsx("button",{type:"button","aria-label":"Close PDF export dialog",onClick:r,className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-foreground/55 transition-colors hover:bg-foreground/[0.05] hover:text-foreground",children:p.jsx(Ah,{className:"h-4 w-4"})})]}),p.jsxs("div",{className:"min-h-0 flex-1 overflow-auto px-4 py-4",children:[p.jsxs("fieldset",{className:"space-y-2",children:[p.jsx("legend",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-foreground/45",children:"PDF range"}),p.jsx(g0,{checked:u==="all",icon:Ch,label:"All slides",detail:`${s.length} slides`,onChange:()=>f("all")}),p.jsx(g0,{checked:u==="selected",icon:_C,label:"Selected slides",detail:x===1?"1 slide selected":`${x} slides selected`,onChange:()=>f("selected")})]}),u==="selected"?p.jsxs("div",{className:"mt-4 rounded-md border border-foreground/[0.08]",children:[p.jsx("div",{className:"border-b border-foreground/[0.08] px-3 py-2 text-[11px] font-medium text-foreground/55",children:"Slides"}),p.jsx("div",{className:"grid max-h-[360px] grid-cols-2 gap-2 overflow-auto p-2 max-[620px]:grid-cols-1","data-testid":"pdf-slide-picker",children:s.map((C,E)=>{const M=C.file;return M?p.jsxs("label",{"data-testid":"pdf-slide-option",className:Be("grid cursor-pointer grid-cols-[104px_1fr] gap-2 rounded-md border border-foreground/[0.08] bg-white p-2 text-[12px] transition-colors hover:border-foreground/20 hover:bg-foreground/[0.025]",g.has(M)&&"border-foreground/35 bg-foreground/[0.035]"),children:[p.jsx("div",{className:"relative aspect-[16/9] overflow-hidden rounded border border-foreground/[0.08] bg-white",children:a[C.id]?p.jsx("img",{alt:`Slide ${E+1} thumbnail`,className:"absolute inset-0 block size-full object-cover",src:a[C.id]}):p.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/25",children:["Slide ",E+1]})}),p.jsx("div",{className:"flex min-w-0 flex-col justify-between gap-2",children:p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx("input",{type:"checkbox","aria-label":`Select slide ${E+1}`,checked:g.has(M),onChange:R=>S(M,R.target.checked),className:"mt-0.5 h-3.5 w-3.5 shrink-0 accent-foreground"}),p.jsxs("div",{className:"min-w-0",children:[p.jsx("div",{className:"font-mono text-[11px] text-foreground/45",children:E+1}),p.jsx("div",{className:"mt-0.5 line-clamp-2 text-[12px] font-medium leading-snug text-foreground/75",children:C.title})]})]})})]},C.id):null})})]}):null]}),p.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-foreground/[0.08] px-4 py-3",children:[p.jsx("button",{type:"button",onClick:r,className:"h-8 rounded-md px-3 text-[12px] font-medium text-foreground/60 transition-colors hover:bg-foreground/[0.05] hover:text-foreground",children:"Cancel"}),p.jsx("button",{type:"button",onClick:A,disabled:!y,className:"h-8 rounded-md bg-foreground px-3.5 text-[12px] font-medium text-background transition-colors hover:bg-foreground/90 disabled:cursor-not-allowed disabled:opacity-40",children:"Export PDF"})]})]})})}function g0({checked:n,disabled:a,icon:r,label:i,detail:s,onChange:u}){return p.jsxs("label",{className:Be("flex cursor-pointer items-center gap-3 rounded-md border border-foreground/[0.08] px-3 py-2.5 transition-colors",n&&"border-foreground/30 bg-foreground/[0.035]",a?"cursor-not-allowed opacity-45":"hover:border-foreground/20 hover:bg-foreground/[0.03]"),children:[p.jsx("input",{type:"radio",name:"pdf-export-scope",checked:n,disabled:a,onChange:u,className:"h-3.5 w-3.5 accent-foreground"}),p.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:p.jsx(r,{className:"h-4 w-4 text-foreground/65"})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"text-[13px] font-medium text-foreground",children:i}),p.jsx("div",{className:"mt-0.5 truncate text-[11px] text-foreground/50",children:s})]})]})}const y0=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,v0=ab,uA=(n,a)=>r=>{var i;if((a==null?void 0:a.variants)==null)return v0(n,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:u}=a,f=Object.keys(s).map(g=>{const x=r==null?void 0:r[g],y=u==null?void 0:u[g];if(x===null)return null;const S=y0(x)||y0(y);return s[g][S]}),h=r&&Object.entries(r).reduce((g,x)=>{let[y,S]=x;return S===void 0||(g[y]=S),g},{}),m=a==null||(i=a.compoundVariants)===null||i===void 0?void 0:i.reduce((g,x)=>{let{class:y,className:S,...A}=x;return Object.entries(A).every(C=>{let[E,M]=C;return Array.isArray(M)?M.includes({...u,...h}[E]):{...u,...h}[E]===M})?[...g,y,S]:g},[]);return v0(n,f,m,r==null?void 0:r.class,r==null?void 0:r.className)};function b0(n,a){if(typeof n=="function")return n(a);n!=null&&(n.current=a)}function Nh(...n){return a=>{let r=!1;const i=n.map(s=>{const u=b0(s,a);return!r&&typeof u=="function"&&(r=!0),u});if(r)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():b0(n[s],null)}}}}function nt(...n){return v.useCallback(Nh(...n),n)}function Aa(n){const a=fA(n),r=v.forwardRef((i,s)=>{const{children:u,...f}=i,h=v.Children.toArray(u),m=h.find(mA);if(m){const g=m.props.children,x=h.map(y=>y===m?v.Children.count(g)>1?v.Children.only(null):v.isValidElement(g)?g.props.children:null:y);return p.jsx(a,{...f,ref:s,children:v.isValidElement(g)?v.cloneElement(g,void 0,x):null})}return p.jsx(a,{...f,ref:s,children:u})});return r.displayName=`${n}.Slot`,r}var dA=Aa("Slot");function fA(n){const a=v.forwardRef((r,i)=>{const{children:s,...u}=r;if(v.isValidElement(s)){const f=gA(s),h=pA(u,s.props);return s.type!==v.Fragment&&(h.ref=i?Nh(i,f):f),v.cloneElement(s,h)}return v.Children.count(s)>1?v.Children.only(null):null});return a.displayName=`${n}.SlotClone`,a}var bb=Symbol("radix.slottable");function hA(n){const a=({children:r})=>p.jsx(p.Fragment,{children:r});return a.displayName=`${n}.Slottable`,a.__radixId=bb,a}function mA(n){return v.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===bb}function pA(n,a){const r={...a};for(const i in a){const s=n[i],u=a[i];/^on[A-Z]/.test(i)?s&&u?r[i]=(...h)=>{const m=u(...h);return s(...h),m}:s&&(r[i]=s):i==="style"?r[i]={...s,...u}:i==="className"&&(r[i]=[s,u].filter(Boolean).join(" "))}return{...n,...r}}function gA(n){var i,s;let a=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,r=a&&"isReactWarning"in a&&a.isReactWarning;return r?n.ref:(a=(s=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:s.get,r=a&&"isReactWarning"in a&&a.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}var yA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ge=yA.reduce((n,a)=>{const r=Aa(`Primitive.${a}`),i=v.forwardRef((s,u)=>{const{asChild:f,...h}=s,m=f?r:a;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(m,{...h,ref:u})});return i.displayName=`Primitive.${a}`,{...n,[a]:i}},{});function xb(n,a){n&&fi.flushSync(()=>n.dispatchEvent(a))}var Sb=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),vA="VisuallyHidden",wb=v.forwardRef((n,a)=>p.jsx(Ge.span,{...n,ref:a,style:{...Sb,...n.style}}));wb.displayName=vA;var bA=wb;function xA(n,a){const r=v.createContext(a),i=u=>{const{children:f,...h}=u,m=v.useMemo(()=>h,Object.values(h));return p.jsx(r.Provider,{value:m,children:f})};i.displayName=n+"Provider";function s(u){const f=v.useContext(r);if(f)return f;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${n}\``)}return[i,s]}function $o(n,a=[]){let r=[];function i(u,f){const h=v.createContext(f),m=r.length;r=[...r,f];const g=y=>{var R;const{scope:S,children:A,...C}=y,E=((R=S==null?void 0:S[n])==null?void 0:R[m])||h,M=v.useMemo(()=>C,Object.values(C));return p.jsx(E.Provider,{value:M,children:A})};g.displayName=u+"Provider";function x(y,S){var E;const A=((E=S==null?void 0:S[n])==null?void 0:E[m])||h,C=v.useContext(A);if(C)return C;if(f!==void 0)return f;throw new Error(`\`${y}\` must be used within \`${u}\``)}return[g,x]}const s=()=>{const u=r.map(f=>v.createContext(f));return function(h){const m=(h==null?void 0:h[n])||u;return v.useMemo(()=>({[`__scope${n}`]:{...h,[n]:m}}),[h,m])}};return s.scopeName=n,[i,SA(s,...a)]}function SA(...n){const a=n[0];if(n.length===1)return a;const r=()=>{const i=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const f=i.reduce((h,{useScope:m,scopeName:g})=>{const y=m(u)[`__scope${g}`];return{...h,...y}},{});return v.useMemo(()=>({[`__scope${a.scopeName}`]:f}),[f])}};return r.scopeName=a.scopeName,r}function Rh(n){const a=n+"CollectionProvider",[r,i]=$o(a),[s,u]=r(a,{collectionRef:{current:null},itemMap:new Map}),f=E=>{const{scope:M,children:R}=E,j=he.useRef(null),B=he.useRef(new Map).current;return p.jsx(s,{scope:M,itemMap:B,collectionRef:j,children:R})};f.displayName=a;const h=n+"CollectionSlot",m=Aa(h),g=he.forwardRef((E,M)=>{const{scope:R,children:j}=E,B=u(h,R),Y=nt(M,B.collectionRef);return p.jsx(m,{ref:Y,children:j})});g.displayName=h;const x=n+"CollectionItemSlot",y="data-radix-collection-item",S=Aa(x),A=he.forwardRef((E,M)=>{const{scope:R,children:j,...B}=E,Y=he.useRef(null),te=nt(M,Y),$=u(x,R);return he.useEffect(()=>($.itemMap.set(Y,{ref:Y,...B}),()=>void $.itemMap.delete(Y))),p.jsx(S,{[y]:"",ref:te,children:j})});A.displayName=x;function C(E){const M=u(n+"CollectionConsumer",E);return he.useCallback(()=>{const j=M.collectionRef.current;if(!j)return[];const B=Array.from(j.querySelectorAll(`[${y}]`));return Array.from(M.itemMap.values()).sort(($,q)=>B.indexOf($.ref.current)-B.indexOf(q.ref.current))},[M.collectionRef,M.itemMap])}return[{Provider:f,Slot:g,ItemSlot:A},C,i]}function be(n,a,{checkForDefaultPrevented:r=!0}={}){return function(s){if(n==null||n(s),r===!1||!s.defaultPrevented)return a==null?void 0:a(s)}}var tn=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},wA=Av[" useInsertionEffect ".trim().toString()]||tn;function el({prop:n,defaultProp:a,onChange:r=()=>{},caller:i}){const[s,u,f]=EA({defaultProp:a,onChange:r}),h=n!==void 0,m=h?n:s;{const x=v.useRef(n!==void 0);v.useEffect(()=>{const y=x.current;y!==h&&console.warn(`${i} is changing from ${y?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=h},[h,i])}const g=v.useCallback(x=>{var y;if(h){const S=CA(x)?x(n):x;S!==n&&((y=f.current)==null||y.call(f,S))}else u(x)},[h,n,u,f]);return[m,g]}function EA({defaultProp:n,onChange:a}){const[r,i]=v.useState(n),s=v.useRef(r),u=v.useRef(a);return wA(()=>{u.current=a},[a]),v.useEffect(()=>{var f;s.current!==r&&((f=u.current)==null||f.call(u,r),s.current=r)},[r,s]),[r,i,u]}function CA(n){return typeof n=="function"}function TA(n,a){return v.useReducer((r,i)=>a[r][i]??r,n)}var no=n=>{const{present:a,children:r}=n,i=AA(a),s=typeof r=="function"?r({present:i.isPresent}):v.Children.only(r),u=nt(i.ref,MA(s));return typeof r=="function"||i.isPresent?v.cloneElement(s,{ref:u}):null};no.displayName="Presence";function AA(n){const[a,r]=v.useState(),i=v.useRef(null),s=v.useRef(n),u=v.useRef("none"),f=n?"mounted":"unmounted",[h,m]=TA(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const g=Vs(i.current);u.current=h==="mounted"?g:"none"},[h]),tn(()=>{const g=i.current,x=s.current;if(x!==n){const S=u.current,A=Vs(g);n?m("MOUNT"):A==="none"||(g==null?void 0:g.display)==="none"?m("UNMOUNT"):m(x&&S!==A?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,m]),tn(()=>{if(a){let g;const x=a.ownerDocument.defaultView??window,y=A=>{const E=Vs(i.current).includes(CSS.escape(A.animationName));if(A.target===a&&E&&(m("ANIMATION_END"),!s.current)){const M=a.style.animationFillMode;a.style.animationFillMode="forwards",g=x.setTimeout(()=>{a.style.animationFillMode==="forwards"&&(a.style.animationFillMode=M)})}},S=A=>{A.target===a&&(u.current=Vs(i.current))};return a.addEventListener("animationstart",S),a.addEventListener("animationcancel",y),a.addEventListener("animationend",y),()=>{x.clearTimeout(g),a.removeEventListener("animationstart",S),a.removeEventListener("animationcancel",y),a.removeEventListener("animationend",y)}}else m("ANIMATION_END")},[a,m]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:v.useCallback(g=>{i.current=g?getComputedStyle(g):null,r(g)},[])}}function Vs(n){return(n==null?void 0:n.animationName)||"none"}function MA(n){var i,s;let a=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,r=a&&"isReactWarning"in a&&a.isReactWarning;return r?n.ref:(a=(s=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:s.get,r=a&&"isReactWarning"in a&&a.isReactWarning,r?n.props.ref:n.props.ref||n.ref)}var _A=Av[" useId ".trim().toString()]||(()=>{}),NA=0;function po(n){const[a,r]=v.useState(_A());return tn(()=>{r(i=>i??String(NA++))},[n]),n||(a?`radix-${a}`:"")}var RA=v.createContext(void 0);function Oh(n){const a=v.useContext(RA);return n||a||"ltr"}function Fn(n){const a=v.useRef(n);return v.useEffect(()=>{a.current=n}),v.useMemo(()=>(...r)=>{var i;return(i=a.current)==null?void 0:i.call(a,...r)},[])}function OA(n,a=globalThis==null?void 0:globalThis.document){const r=Fn(n);v.useEffect(()=>{const i=s=>{s.key==="Escape"&&r(s)};return a.addEventListener("keydown",i,{capture:!0}),()=>a.removeEventListener("keydown",i,{capture:!0})},[r,a])}var DA="DismissableLayer",Zf="dismissableLayer.update",jA="dismissableLayer.pointerDownOutside",zA="dismissableLayer.focusOutside",x0,Eb=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ll=v.forwardRef((n,a)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:f,onDismiss:h,...m}=n,g=v.useContext(Eb),[x,y]=v.useState(null),S=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,A]=v.useState({}),C=nt(a,q=>y(q)),E=Array.from(g.layers),[M]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),R=E.indexOf(M),j=x?E.indexOf(x):-1,B=g.layersWithOutsidePointerEventsDisabled.size>0,Y=j>=R,te=HA(q=>{const z=q.target,W=[...g.branches].some(ie=>ie.contains(z));!Y||W||(s==null||s(q),f==null||f(q),q.defaultPrevented||h==null||h())},S),$=BA(q=>{const z=q.target;[...g.branches].some(ie=>ie.contains(z))||(u==null||u(q),f==null||f(q),q.defaultPrevented||h==null||h())},S);return OA(q=>{j===g.layers.size-1&&(i==null||i(q),!q.defaultPrevented&&h&&(q.preventDefault(),h()))},S),v.useEffect(()=>{if(x)return r&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(x0=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(x)),g.layers.add(x),S0(),()=>{r&&g.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=x0)}},[x,S,r,g]),v.useEffect(()=>()=>{x&&(g.layers.delete(x),g.layersWithOutsidePointerEventsDisabled.delete(x),S0())},[x,g]),v.useEffect(()=>{const q=()=>A({});return document.addEventListener(Zf,q),()=>document.removeEventListener(Zf,q)},[]),p.jsx(Ge.div,{...m,ref:C,style:{pointerEvents:B?Y?"auto":"none":void 0,...n.style},onFocusCapture:be(n.onFocusCapture,$.onFocusCapture),onBlurCapture:be(n.onBlurCapture,$.onBlurCapture),onPointerDownCapture:be(n.onPointerDownCapture,te.onPointerDownCapture)})});ll.displayName=DA;var kA="DismissableLayerBranch",LA=v.forwardRef((n,a)=>{const r=v.useContext(Eb),i=v.useRef(null),s=nt(a,i);return v.useEffect(()=>{const u=i.current;if(u)return r.branches.add(u),()=>{r.branches.delete(u)}},[r.branches]),p.jsx(Ge.div,{...n,ref:s})});LA.displayName=kA;function HA(n,a=globalThis==null?void 0:globalThis.document){const r=Fn(n),i=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const u=h=>{if(h.target&&!i.current){let m=function(){Cb(jA,r,g,{discrete:!0})};const g={originalEvent:h};h.pointerType==="touch"?(a.removeEventListener("click",s.current),s.current=m,a.addEventListener("click",s.current,{once:!0})):m()}else a.removeEventListener("click",s.current);i.current=!1},f=window.setTimeout(()=>{a.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(f),a.removeEventListener("pointerdown",u),a.removeEventListener("click",s.current)}},[a,r]),{onPointerDownCapture:()=>i.current=!0}}function BA(n,a=globalThis==null?void 0:globalThis.document){const r=Fn(n),i=v.useRef(!1);return v.useEffect(()=>{const s=u=>{u.target&&!i.current&&Cb(zA,r,{originalEvent:u},{discrete:!1})};return a.addEventListener("focusin",s),()=>a.removeEventListener("focusin",s)},[a,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function S0(){const n=new CustomEvent(Zf);document.dispatchEvent(n)}function Cb(n,a,r,{discrete:i}){const s=r.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:r});a&&s.addEventListener(n,a,{once:!0}),i?xb(s,u):s.dispatchEvent(u)}var hf="focusScope.autoFocusOnMount",mf="focusScope.autoFocusOnUnmount",w0={bubbles:!1,cancelable:!0},UA="FocusScope",gi=v.forwardRef((n,a)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...f}=n,[h,m]=v.useState(null),g=Fn(s),x=Fn(u),y=v.useRef(null),S=nt(a,E=>m(E)),A=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(i){let E=function(B){if(A.paused||!h)return;const Y=B.target;h.contains(Y)?y.current=Y:xa(y.current,{select:!0})},M=function(B){if(A.paused||!h)return;const Y=B.relatedTarget;Y!==null&&(h.contains(Y)||xa(y.current,{select:!0}))},R=function(B){if(document.activeElement===document.body)for(const te of B)te.removedNodes.length>0&&xa(h)};document.addEventListener("focusin",E),document.addEventListener("focusout",M);const j=new MutationObserver(R);return h&&j.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",M),j.disconnect()}}},[i,h,A.paused]),v.useEffect(()=>{if(h){C0.add(A);const E=document.activeElement;if(!h.contains(E)){const R=new CustomEvent(hf,w0);h.addEventListener(hf,g),h.dispatchEvent(R),R.defaultPrevented||(IA(VA(Tb(h)),{select:!0}),document.activeElement===E&&xa(h))}return()=>{h.removeEventListener(hf,g),setTimeout(()=>{const R=new CustomEvent(mf,w0);h.addEventListener(mf,x),h.dispatchEvent(R),R.defaultPrevented||xa(E??document.body,{select:!0}),h.removeEventListener(mf,x),C0.remove(A)},0)}}},[h,g,x,A]);const C=v.useCallback(E=>{if(!r&&!i||A.paused)return;const M=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,R=document.activeElement;if(M&&R){const j=E.currentTarget,[B,Y]=PA(j);B&&Y?!E.shiftKey&&R===Y?(E.preventDefault(),r&&xa(B,{select:!0})):E.shiftKey&&R===B&&(E.preventDefault(),r&&xa(Y,{select:!0})):R===j&&E.preventDefault()}},[r,i,A.paused]);return p.jsx(Ge.div,{tabIndex:-1,...f,ref:S,onKeyDown:C})});gi.displayName=UA;function IA(n,{select:a=!1}={}){const r=document.activeElement;for(const i of n)if(xa(i,{select:a}),document.activeElement!==r)return}function PA(n){const a=Tb(n),r=E0(a,n),i=E0(a.reverse(),n);return[r,i]}function Tb(n){const a=[],r=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)a.push(r.currentNode);return a}function E0(n,a){for(const r of n)if(!$A(r,{upTo:a}))return r}function $A(n,{upTo:a}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(a!==void 0&&n===a)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function GA(n){return n instanceof HTMLInputElement&&"select"in n}function xa(n,{select:a=!1}={}){if(n&&n.focus){const r=document.activeElement;n.focus({preventScroll:!0}),n!==r&&GA(n)&&a&&n.select()}}var C0=YA();function YA(){let n=[];return{add(a){const r=n[0];a!==r&&(r==null||r.pause()),n=T0(n,a),n.unshift(a)},remove(a){var r;n=T0(n,a),(r=n[0])==null||r.resume()}}}function T0(n,a){const r=[...n],i=r.indexOf(a);return i!==-1&&r.splice(i,1),r}function VA(n){return n.filter(a=>a.tagName!=="A")}var qA="Portal",yi=v.forwardRef((n,a)=>{var h;const{container:r,...i}=n,[s,u]=v.useState(!1);tn(()=>u(!0),[]);const f=r||s&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return f?_v.createPortal(p.jsx(Ge.div,{...i,ref:a}),f):null});yi.displayName=qA;var pf=0;function Rc(){v.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??A0()),document.body.insertAdjacentElement("beforeend",n[1]??A0()),pf++,()=>{pf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(a=>a.remove()),pf--}},[])}function A0(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var ho=function(){return ho=Object.assign||function(a){for(var r,i=1,s=arguments.length;i<s;i++){r=arguments[i];for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(a[u]=r[u])}return a},ho.apply(this,arguments)};function Ab(n,a){var r={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.indexOf(i)<0&&(r[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);s<i.length;s++)a.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(n,i[s])&&(r[i[s]]=n[i[s]]);return r}function XA(n,a,r){if(r||arguments.length===2)for(var i=0,s=a.length,u;i<s;i++)(u||!(i in a))&&(u||(u=Array.prototype.slice.call(a,0,i)),u[i]=a[i]);return n.concat(u||Array.prototype.slice.call(a))}var ac="right-scroll-bar-position",rc="width-before-scroll-bar",FA="with-scroll-bars-hidden",KA="--removed-body-scroll-bar-size";function gf(n,a){return typeof n=="function"?n(a):n&&(n.current=a),n}function QA(n,a){var r=v.useState(function(){return{value:n,callback:a,facade:{get current(){return r.value},set current(i){var s=r.value;s!==i&&(r.value=i,r.callback(i,s))}}}})[0];return r.callback=a,r.facade}var ZA=typeof window<"u"?v.useLayoutEffect:v.useEffect,M0=new WeakMap;function WA(n,a){var r=QA(null,function(i){return n.forEach(function(s){return gf(s,i)})});return ZA(function(){var i=M0.get(r);if(i){var s=new Set(i),u=new Set(n),f=r.current;s.forEach(function(h){u.has(h)||gf(h,null)}),u.forEach(function(h){s.has(h)||gf(h,f)})}M0.set(r,n)},[n]),r}function JA(n){return n}function eM(n,a){a===void 0&&(a=JA);var r=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:n},useMedium:function(u){var f=a(u,i);return r.push(f),function(){r=r.filter(function(h){return h!==f})}},assignSyncMedium:function(u){for(i=!0;r.length;){var f=r;r=[],f.forEach(u)}r={push:function(h){return u(h)},filter:function(){return r}}},assignMedium:function(u){i=!0;var f=[];if(r.length){var h=r;r=[],h.forEach(u),f=r}var m=function(){var x=f;f=[],x.forEach(u)},g=function(){return Promise.resolve().then(m)};g(),r={push:function(x){f.push(x),g()},filter:function(x){return f=f.filter(x),r}}}};return s}function tM(n){n===void 0&&(n={});var a=eM(null);return a.options=ho({async:!0,ssr:!1},n),a}var Mb=function(n){var a=n.sideCar,r=Ab(n,["sideCar"]);if(!a)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=a.read();if(!i)throw new Error("Sidecar medium not found");return v.createElement(i,ho({},r))};Mb.isSideCarExport=!0;function nM(n,a){return n.useMedium(a),Mb}var _b=tM(),yf=function(){},Oc=v.forwardRef(function(n,a){var r=v.useRef(null),i=v.useState({onScrollCapture:yf,onWheelCapture:yf,onTouchMoveCapture:yf}),s=i[0],u=i[1],f=n.forwardProps,h=n.children,m=n.className,g=n.removeScrollBar,x=n.enabled,y=n.shards,S=n.sideCar,A=n.noRelative,C=n.noIsolation,E=n.inert,M=n.allowPinchZoom,R=n.as,j=R===void 0?"div":R,B=n.gapMode,Y=Ab(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),te=S,$=WA([r,a]),q=ho(ho({},Y),s);return v.createElement(v.Fragment,null,x&&v.createElement(te,{sideCar:_b,removeScrollBar:g,shards:y,noRelative:A,noIsolation:C,inert:E,setCallbacks:u,allowPinchZoom:!!M,lockRef:r,gapMode:B}),f?v.cloneElement(v.Children.only(h),ho(ho({},q),{ref:$})):v.createElement(j,ho({},q,{className:m,ref:$}),h))});Oc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Oc.classNames={fullWidth:rc,zeroRight:ac};var oM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function aM(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var a=oM();return a&&n.setAttribute("nonce",a),n}function rM(n,a){n.styleSheet?n.styleSheet.cssText=a:n.appendChild(document.createTextNode(a))}function lM(n){var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(n)}var iM=function(){var n=0,a=null;return{add:function(r){n==0&&(a=aM())&&(rM(a,r),lM(a)),n++},remove:function(){n--,!n&&a&&(a.parentNode&&a.parentNode.removeChild(a),a=null)}}},sM=function(){var n=iM();return function(a,r){v.useEffect(function(){return n.add(a),function(){n.remove()}},[a&&r])}},Nb=function(){var n=sM(),a=function(r){var i=r.styles,s=r.dynamic;return n(i,s),null};return a},cM={left:0,top:0,right:0,gap:0},vf=function(n){return parseInt(n||"",10)||0},uM=function(n){var a=window.getComputedStyle(document.body),r=a[n==="padding"?"paddingLeft":"marginLeft"],i=a[n==="padding"?"paddingTop":"marginTop"],s=a[n==="padding"?"paddingRight":"marginRight"];return[vf(r),vf(i),vf(s)]},dM=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return cM;var a=uM(n),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:a[0],top:a[1],right:a[2],gap:Math.max(0,i-r+a[2]-a[0])}},fM=Nb(),Qr="data-scroll-locked",hM=function(n,a,r,i){var s=n.left,u=n.top,f=n.right,h=n.gap;return r===void 0&&(r="margin"),`
381
+ .`.concat(FA,` {
382
+ overflow: hidden `).concat(i,`;
383
+ padding-right: `).concat(h,"px ").concat(i,`;
384
+ }
385
+ body[`).concat(Qr,`] {
386
+ overflow: hidden `).concat(i,`;
387
+ overscroll-behavior: contain;
388
+ `).concat([a&&"position: relative ".concat(i,";"),r==="margin"&&`
389
+ padding-left: `.concat(s,`px;
390
+ padding-top: `).concat(u,`px;
391
+ padding-right: `).concat(f,`px;
392
+ margin-left:0;
393
+ margin-top:0;
394
+ margin-right: `).concat(h,"px ").concat(i,`;
395
+ `),r==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
396
+ }
397
+
398
+ .`).concat(ac,` {
399
+ right: `).concat(h,"px ").concat(i,`;
400
+ }
401
+
402
+ .`).concat(rc,` {
403
+ margin-right: `).concat(h,"px ").concat(i,`;
404
+ }
405
+
406
+ .`).concat(ac," .").concat(ac,` {
407
+ right: 0 `).concat(i,`;
408
+ }
409
+
410
+ .`).concat(rc," .").concat(rc,` {
411
+ margin-right: 0 `).concat(i,`;
412
+ }
413
+
414
+ body[`).concat(Qr,`] {
415
+ `).concat(KA,": ").concat(h,`px;
416
+ }
417
+ `)},_0=function(){var n=parseInt(document.body.getAttribute(Qr)||"0",10);return isFinite(n)?n:0},mM=function(){v.useEffect(function(){return document.body.setAttribute(Qr,(_0()+1).toString()),function(){var n=_0()-1;n<=0?document.body.removeAttribute(Qr):document.body.setAttribute(Qr,n.toString())}},[])},pM=function(n){var a=n.noRelative,r=n.noImportant,i=n.gapMode,s=i===void 0?"margin":i;mM();var u=v.useMemo(function(){return dM(s)},[s]);return v.createElement(fM,{styles:hM(u,!a,s,r?"":"!important")})},Wf=!1;if(typeof window<"u")try{var qs=Object.defineProperty({},"passive",{get:function(){return Wf=!0,!0}});window.addEventListener("test",qs,qs),window.removeEventListener("test",qs,qs)}catch{Wf=!1}var $r=Wf?{passive:!1}:!1,gM=function(n){return n.tagName==="TEXTAREA"},Rb=function(n,a){if(!(n instanceof Element))return!1;var r=window.getComputedStyle(n);return r[a]!=="hidden"&&!(r.overflowY===r.overflowX&&!gM(n)&&r[a]==="visible")},yM=function(n){return Rb(n,"overflowY")},vM=function(n){return Rb(n,"overflowX")},N0=function(n,a){var r=a.ownerDocument,i=a;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=Ob(n,i);if(s){var u=Db(n,i),f=u[1],h=u[2];if(f>h)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},bM=function(n){var a=n.scrollTop,r=n.scrollHeight,i=n.clientHeight;return[a,r,i]},xM=function(n){var a=n.scrollLeft,r=n.scrollWidth,i=n.clientWidth;return[a,r,i]},Ob=function(n,a){return n==="v"?yM(a):vM(a)},Db=function(n,a){return n==="v"?bM(a):xM(a)},SM=function(n,a){return n==="h"&&a==="rtl"?-1:1},wM=function(n,a,r,i,s){var u=SM(n,window.getComputedStyle(a).direction),f=u*i,h=r.target,m=a.contains(h),g=!1,x=f>0,y=0,S=0;do{if(!h)break;var A=Db(n,h),C=A[0],E=A[1],M=A[2],R=E-M-u*C;(C||R)&&Ob(n,h)&&(y+=R,S+=C);var j=h.parentNode;h=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!m&&h!==document.body||m&&(a.contains(h)||a===h));return(x&&Math.abs(y)<1||!x&&Math.abs(S)<1)&&(g=!0),g},Xs=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},R0=function(n){return[n.deltaX,n.deltaY]},O0=function(n){return n&&"current"in n?n.current:n},EM=function(n,a){return n[0]===a[0]&&n[1]===a[1]},CM=function(n){return`
418
+ .block-interactivity-`.concat(n,` {pointer-events: none;}
419
+ .allow-interactivity-`).concat(n,` {pointer-events: all;}
420
+ `)},TM=0,Gr=[];function AM(n){var a=v.useRef([]),r=v.useRef([0,0]),i=v.useRef(),s=v.useState(TM++)[0],u=v.useState(Nb)[0],f=v.useRef(n);v.useEffect(function(){f.current=n},[n]),v.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(s));var E=XA([n.lockRef.current],(n.shards||[]).map(O0),!0).filter(Boolean);return E.forEach(function(M){return M.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),E.forEach(function(M){return M.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var h=v.useCallback(function(E,M){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!f.current.allowPinchZoom;var R=Xs(E),j=r.current,B="deltaX"in E?E.deltaX:j[0]-R[0],Y="deltaY"in E?E.deltaY:j[1]-R[1],te,$=E.target,q=Math.abs(B)>Math.abs(Y)?"h":"v";if("touches"in E&&q==="h"&&$.type==="range")return!1;var z=window.getSelection(),W=z&&z.anchorNode,ie=W?W===$||W.contains($):!1;if(ie)return!1;var de=N0(q,$);if(!de)return!0;if(de?te=q:(te=q==="v"?"h":"v",de=N0(q,$)),!de)return!1;if(!i.current&&"changedTouches"in E&&(B||Y)&&(i.current=te),!te)return!0;var K=i.current||te;return wM(K,M,E,K==="h"?B:Y)},[]),m=v.useCallback(function(E){var M=E;if(!(!Gr.length||Gr[Gr.length-1]!==u)){var R="deltaY"in M?R0(M):Xs(M),j=a.current.filter(function(te){return te.name===M.type&&(te.target===M.target||M.target===te.shadowParent)&&EM(te.delta,R)})[0];if(j&&j.should){M.cancelable&&M.preventDefault();return}if(!j){var B=(f.current.shards||[]).map(O0).filter(Boolean).filter(function(te){return te.contains(M.target)}),Y=B.length>0?h(M,B[0]):!f.current.noIsolation;Y&&M.cancelable&&M.preventDefault()}}},[]),g=v.useCallback(function(E,M,R,j){var B={name:E,delta:M,target:R,should:j,shadowParent:MM(R)};a.current.push(B),setTimeout(function(){a.current=a.current.filter(function(Y){return Y!==B})},1)},[]),x=v.useCallback(function(E){r.current=Xs(E),i.current=void 0},[]),y=v.useCallback(function(E){g(E.type,R0(E),E.target,h(E,n.lockRef.current))},[]),S=v.useCallback(function(E){g(E.type,Xs(E),E.target,h(E,n.lockRef.current))},[]);v.useEffect(function(){return Gr.push(u),n.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:S}),document.addEventListener("wheel",m,$r),document.addEventListener("touchmove",m,$r),document.addEventListener("touchstart",x,$r),function(){Gr=Gr.filter(function(E){return E!==u}),document.removeEventListener("wheel",m,$r),document.removeEventListener("touchmove",m,$r),document.removeEventListener("touchstart",x,$r)}},[]);var A=n.removeScrollBar,C=n.inert;return v.createElement(v.Fragment,null,C?v.createElement(u,{styles:CM(s)}):null,A?v.createElement(pM,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function MM(n){for(var a=null;n!==null;)n instanceof ShadowRoot&&(a=n.host,n=n.host),n=n.parentNode;return a}const _M=nM(_b,AM);var vi=v.forwardRef(function(n,a){return v.createElement(Oc,ho({},n,{ref:a,sideCar:_M}))});vi.classNames=Oc.classNames;var NM=function(n){if(typeof document>"u")return null;var a=Array.isArray(n)?n[0]:n;return a.ownerDocument.body},Yr=new WeakMap,Fs=new WeakMap,Ks={},bf=0,jb=function(n){return n&&(n.host||jb(n.parentNode))},RM=function(n,a){return a.map(function(r){if(n.contains(r))return r;var i=jb(r);return i&&n.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",n,". Doing nothing"),null)}).filter(function(r){return!!r})},OM=function(n,a,r,i){var s=RM(a,Array.isArray(n)?n:[n]);Ks[r]||(Ks[r]=new WeakMap);var u=Ks[r],f=[],h=new Set,m=new Set(s),g=function(y){!y||h.has(y)||(h.add(y),g(y.parentNode))};s.forEach(g);var x=function(y){!y||m.has(y)||Array.prototype.forEach.call(y.children,function(S){if(h.has(S))x(S);else try{var A=S.getAttribute(i),C=A!==null&&A!=="false",E=(Yr.get(S)||0)+1,M=(u.get(S)||0)+1;Yr.set(S,E),u.set(S,M),f.push(S),E===1&&C&&Fs.set(S,!0),M===1&&S.setAttribute(r,"true"),C||S.setAttribute(i,"true")}catch(R){console.error("aria-hidden: cannot operate on ",S,R)}})};return x(a),h.clear(),bf++,function(){f.forEach(function(y){var S=Yr.get(y)-1,A=u.get(y)-1;Yr.set(y,S),u.set(y,A),S||(Fs.has(y)||y.removeAttribute(i),Fs.delete(y)),A||y.removeAttribute(r)}),bf--,bf||(Yr=new WeakMap,Yr=new WeakMap,Fs=new WeakMap,Ks={})}},Dc=function(n,a,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),s=NM(n);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),OM(i,s,r,"aria-hidden")):function(){return null}},jc="Dialog",[zb]=$o(jc),[DM,oo]=zb(jc),kb=n=>{const{__scopeDialog:a,children:r,open:i,defaultOpen:s,onOpenChange:u,modal:f=!0}=n,h=v.useRef(null),m=v.useRef(null),[g,x]=el({prop:i,defaultProp:s??!1,onChange:u,caller:jc});return p.jsx(DM,{scope:a,triggerRef:h,contentRef:m,contentId:po(),titleId:po(),descriptionId:po(),open:g,onOpenChange:x,onOpenToggle:v.useCallback(()=>x(y=>!y),[x]),modal:f,children:r})};kb.displayName=jc;var Lb="DialogTrigger",jM=v.forwardRef((n,a)=>{const{__scopeDialog:r,...i}=n,s=oo(Lb,r),u=nt(a,s.triggerRef);return p.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":zh(s.open),...i,ref:u,onClick:be(n.onClick,s.onOpenToggle)})});jM.displayName=Lb;var Dh="DialogPortal",[zM,Hb]=zb(Dh,{forceMount:void 0}),Bb=n=>{const{__scopeDialog:a,forceMount:r,children:i,container:s}=n,u=oo(Dh,a);return p.jsx(zM,{scope:a,forceMount:r,children:v.Children.map(i,f=>p.jsx(no,{present:r||u.open,children:p.jsx(yi,{asChild:!0,container:s,children:f})}))})};Bb.displayName=Dh;var yc="DialogOverlay",Ub=v.forwardRef((n,a)=>{const r=Hb(yc,n.__scopeDialog),{forceMount:i=r.forceMount,...s}=n,u=oo(yc,n.__scopeDialog);return u.modal?p.jsx(no,{present:i||u.open,children:p.jsx(LM,{...s,ref:a})}):null});Ub.displayName=yc;var kM=Aa("DialogOverlay.RemoveScroll"),LM=v.forwardRef((n,a)=>{const{__scopeDialog:r,...i}=n,s=oo(yc,r);return p.jsx(vi,{as:kM,allowPinchZoom:!0,shards:[s.contentRef],children:p.jsx(Ge.div,{"data-state":zh(s.open),...i,ref:a,style:{pointerEvents:"auto",...i.style}})})}),or="DialogContent",Ib=v.forwardRef((n,a)=>{const r=Hb(or,n.__scopeDialog),{forceMount:i=r.forceMount,...s}=n,u=oo(or,n.__scopeDialog);return p.jsx(no,{present:i||u.open,children:u.modal?p.jsx(HM,{...s,ref:a}):p.jsx(BM,{...s,ref:a})})});Ib.displayName=or;var HM=v.forwardRef((n,a)=>{const r=oo(or,n.__scopeDialog),i=v.useRef(null),s=nt(a,r.contentRef,i);return v.useEffect(()=>{const u=i.current;if(u)return Dc(u)},[]),p.jsx(Pb,{...n,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(n.onCloseAutoFocus,u=>{var f;u.preventDefault(),(f=r.triggerRef.current)==null||f.focus()}),onPointerDownOutside:be(n.onPointerDownOutside,u=>{const f=u.detail.originalEvent,h=f.button===0&&f.ctrlKey===!0;(f.button===2||h)&&u.preventDefault()}),onFocusOutside:be(n.onFocusOutside,u=>u.preventDefault())})}),BM=v.forwardRef((n,a)=>{const r=oo(or,n.__scopeDialog),i=v.useRef(!1),s=v.useRef(!1);return p.jsx(Pb,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var f,h;(f=n.onCloseAutoFocus)==null||f.call(n,u),u.defaultPrevented||(i.current||(h=r.triggerRef.current)==null||h.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{var m,g;(m=n.onInteractOutside)==null||m.call(n,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=u.target;((g=r.triggerRef.current)==null?void 0:g.contains(f))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),Pb=v.forwardRef((n,a)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,...f}=n,h=oo(or,r),m=v.useRef(null),g=nt(a,m);return Rc(),p.jsxs(p.Fragment,{children:[p.jsx(gi,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:p.jsx(ll,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":zh(h.open),...f,ref:g,onDismiss:()=>h.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(UM,{titleId:h.titleId}),p.jsx(PM,{contentRef:m,descriptionId:h.descriptionId})]})]})}),jh="DialogTitle",$b=v.forwardRef((n,a)=>{const{__scopeDialog:r,...i}=n,s=oo(jh,r);return p.jsx(Ge.h2,{id:s.titleId,...i,ref:a})});$b.displayName=jh;var Gb="DialogDescription",Yb=v.forwardRef((n,a)=>{const{__scopeDialog:r,...i}=n,s=oo(Gb,r);return p.jsx(Ge.p,{id:s.descriptionId,...i,ref:a})});Yb.displayName=Gb;var Vb="DialogClose",qb=v.forwardRef((n,a)=>{const{__scopeDialog:r,...i}=n,s=oo(Vb,r);return p.jsx(Ge.button,{type:"button",...i,ref:a,onClick:be(n.onClick,()=>s.onOpenChange(!1))})});qb.displayName=Vb;function zh(n){return n?"open":"closed"}var Xb="DialogTitleWarning",[Sj,Fb]=xA(Xb,{contentName:or,titleName:jh,docsSlug:"dialog"}),UM=({titleId:n})=>{const a=Fb(Xb),r=`\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
421
+
422
+ If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
423
+
424
+ For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;return v.useEffect(()=>{n&&(document.getElementById(n)||console.error(r))},[r,n]),null},IM="DialogDescriptionWarning",PM=({contentRef:n,descriptionId:a})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Fb(IM).contentName}}.`;return v.useEffect(()=>{var u;const s=(u=n.current)==null?void 0:u.getAttribute("aria-describedby");a&&s&&(document.getElementById(a)||console.warn(i))},[i,n,a]),null},$M=kb,GM=Bb,YM=Ub,VM=Ib,qM=$b,XM=Yb,FM=qb;function KM(n){const a=v.useRef({value:n,previous:n});return v.useMemo(()=>(a.current.value!==n&&(a.current.previous=a.current.value,a.current.value=n),a.current.previous),[n])}function QM(n){const[a,r]=v.useState(void 0);return tn(()=>{if(n){r({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let f,h;if("borderBoxSize"in u){const m=u.borderBoxSize,g=Array.isArray(m)?m[0]:m;f=g.inlineSize,h=g.blockSize}else f=n.offsetWidth,h=n.offsetHeight;r({width:f,height:h})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else r(void 0)},[n]),a}const ZM=["top","right","bottom","left"],Ma=Math.min,jn=Math.max,vc=Math.round,Qs=Math.floor,go=n=>({x:n,y:n}),WM={left:"right",right:"left",bottom:"top",top:"bottom"};function Jf(n,a,r){return jn(n,Ma(a,r))}function Io(n,a){return typeof n=="function"?n(a):n}function Po(n){return n.split("-")[0]}function il(n){return n.split("-")[1]}function kh(n){return n==="x"?"y":"x"}function Lh(n){return n==="y"?"height":"width"}function mo(n){const a=n[0];return a==="t"||a==="b"?"y":"x"}function Hh(n){return kh(mo(n))}function JM(n,a,r){r===void 0&&(r=!1);const i=il(n),s=Hh(n),u=Lh(s);let f=s==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return a.reference[u]>a.floating[u]&&(f=bc(f)),[f,bc(f)]}function e_(n){const a=bc(n);return[eh(n),a,eh(a)]}function eh(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const D0=["left","right"],j0=["right","left"],t_=["top","bottom"],n_=["bottom","top"];function o_(n,a,r){switch(n){case"top":case"bottom":return r?a?j0:D0:a?D0:j0;case"left":case"right":return a?t_:n_;default:return[]}}function a_(n,a,r,i){const s=il(n);let u=o_(Po(n),r==="start",i);return s&&(u=u.map(f=>f+"-"+s),a&&(u=u.concat(u.map(eh)))),u}function bc(n){const a=Po(n);return WM[a]+n.slice(a.length)}function r_(n){return{top:0,right:0,bottom:0,left:0,...n}}function Kb(n){return typeof n!="number"?r_(n):{top:n,right:n,bottom:n,left:n}}function xc(n){const{x:a,y:r,width:i,height:s}=n;return{width:i,height:s,top:r,left:a,right:a+i,bottom:r+s,x:a,y:r}}function z0(n,a,r){let{reference:i,floating:s}=n;const u=mo(a),f=Hh(a),h=Lh(f),m=Po(a),g=u==="y",x=i.x+i.width/2-s.width/2,y=i.y+i.height/2-s.height/2,S=i[h]/2-s[h]/2;let A;switch(m){case"top":A={x,y:i.y-s.height};break;case"bottom":A={x,y:i.y+i.height};break;case"right":A={x:i.x+i.width,y};break;case"left":A={x:i.x-s.width,y};break;default:A={x:i.x,y:i.y}}switch(il(a)){case"start":A[f]-=S*(r&&g?-1:1);break;case"end":A[f]+=S*(r&&g?-1:1);break}return A}async function l_(n,a){var r;a===void 0&&(a={});const{x:i,y:s,platform:u,rects:f,elements:h,strategy:m}=n,{boundary:g="clippingAncestors",rootBoundary:x="viewport",elementContext:y="floating",altBoundary:S=!1,padding:A=0}=Io(a,n),C=Kb(A),M=h[S?y==="floating"?"reference":"floating":y],R=xc(await u.getClippingRect({element:(r=await(u.isElement==null?void 0:u.isElement(M)))==null||r?M:M.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(h.floating)),boundary:g,rootBoundary:x,strategy:m})),j=y==="floating"?{x:i,y:s,width:f.floating.width,height:f.floating.height}:f.reference,B=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h.floating)),Y=await(u.isElement==null?void 0:u.isElement(B))?await(u.getScale==null?void 0:u.getScale(B))||{x:1,y:1}:{x:1,y:1},te=xc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:j,offsetParent:B,strategy:m}):j);return{top:(R.top-te.top+C.top)/Y.y,bottom:(te.bottom-R.bottom+C.bottom)/Y.y,left:(R.left-te.left+C.left)/Y.x,right:(te.right-R.right+C.right)/Y.x}}const i_=50,s_=async(n,a,r)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:f}=r,h=f.detectOverflow?f:{...f,detectOverflow:l_},m=await(f.isRTL==null?void 0:f.isRTL(a));let g=await f.getElementRects({reference:n,floating:a,strategy:s}),{x,y}=z0(g,i,m),S=i,A=0;const C={};for(let E=0;E<u.length;E++){const M=u[E];if(!M)continue;const{name:R,fn:j}=M,{x:B,y:Y,data:te,reset:$}=await j({x,y,initialPlacement:i,placement:S,strategy:s,middlewareData:C,rects:g,platform:h,elements:{reference:n,floating:a}});x=B??x,y=Y??y,C[R]={...C[R],...te},$&&A<i_&&(A++,typeof $=="object"&&($.placement&&(S=$.placement),$.rects&&(g=$.rects===!0?await f.getElementRects({reference:n,floating:a,strategy:s}):$.rects),{x,y}=z0(g,S,m)),E=-1)}return{x,y,placement:S,strategy:s,middlewareData:C}},c_=n=>({name:"arrow",options:n,async fn(a){const{x:r,y:i,placement:s,rects:u,platform:f,elements:h,middlewareData:m}=a,{element:g,padding:x=0}=Io(n,a)||{};if(g==null)return{};const y=Kb(x),S={x:r,y:i},A=Hh(s),C=Lh(A),E=await f.getDimensions(g),M=A==="y",R=M?"top":"left",j=M?"bottom":"right",B=M?"clientHeight":"clientWidth",Y=u.reference[C]+u.reference[A]-S[A]-u.floating[C],te=S[A]-u.reference[A],$=await(f.getOffsetParent==null?void 0:f.getOffsetParent(g));let q=$?$[B]:0;(!q||!await(f.isElement==null?void 0:f.isElement($)))&&(q=h.floating[B]||u.floating[C]);const z=Y/2-te/2,W=q/2-E[C]/2-1,ie=Ma(y[R],W),de=Ma(y[j],W),K=ie,ae=q-E[C]-de,fe=q/2-E[C]/2+z,pe=Jf(K,fe,ae),T=!m.arrow&&il(s)!=null&&fe!==pe&&u.reference[C]/2-(fe<K?ie:de)-E[C]/2<0,O=T?fe<K?fe-K:fe-ae:0;return{[A]:S[A]+O,data:{[A]:pe,centerOffset:fe-pe-O,...T&&{alignmentOffset:O}},reset:T}}}),u_=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(a){var r,i;const{placement:s,middlewareData:u,rects:f,initialPlacement:h,platform:m,elements:g}=a,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:S,fallbackStrategy:A="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:E=!0,...M}=Io(n,a);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const R=Po(s),j=mo(h),B=Po(h)===h,Y=await(m.isRTL==null?void 0:m.isRTL(g.floating)),te=S||(B||!E?[bc(h)]:e_(h)),$=C!=="none";!S&&$&&te.push(...a_(h,E,C,Y));const q=[h,...te],z=await m.detectOverflow(a,M),W=[];let ie=((i=u.flip)==null?void 0:i.overflows)||[];if(x&&W.push(z[R]),y){const fe=JM(s,f,Y);W.push(z[fe[0]],z[fe[1]])}if(ie=[...ie,{placement:s,overflows:W}],!W.every(fe=>fe<=0)){var de,K;const fe=(((de=u.flip)==null?void 0:de.index)||0)+1,pe=q[fe];if(pe&&(!(y==="alignment"?j!==mo(pe):!1)||ie.every(N=>mo(N.placement)===j?N.overflows[0]>0:!0)))return{data:{index:fe,overflows:ie},reset:{placement:pe}};let T=(K=ie.filter(O=>O.overflows[0]<=0).sort((O,N)=>O.overflows[1]-N.overflows[1])[0])==null?void 0:K.placement;if(!T)switch(A){case"bestFit":{var ae;const O=(ae=ie.filter(N=>{if($){const L=mo(N.placement);return L===j||L==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(L=>L>0).reduce((L,D)=>L+D,0)]).sort((N,L)=>N[1]-L[1])[0])==null?void 0:ae[0];O&&(T=O);break}case"initialPlacement":T=h;break}if(s!==T)return{reset:{placement:T}}}return{}}}};function k0(n,a){return{top:n.top-a.height,right:n.right-a.width,bottom:n.bottom-a.height,left:n.left-a.width}}function L0(n){return ZM.some(a=>n[a]>=0)}const d_=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(a){const{rects:r,platform:i}=a,{strategy:s="referenceHidden",...u}=Io(n,a);switch(s){case"referenceHidden":{const f=await i.detectOverflow(a,{...u,elementContext:"reference"}),h=k0(f,r.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:L0(h)}}}case"escaped":{const f=await i.detectOverflow(a,{...u,altBoundary:!0}),h=k0(f,r.floating);return{data:{escapedOffsets:h,escaped:L0(h)}}}default:return{}}}}},Qb=new Set(["left","top"]);async function f_(n,a){const{placement:r,platform:i,elements:s}=n,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),f=Po(r),h=il(r),m=mo(r)==="y",g=Qb.has(f)?-1:1,x=u&&m?-1:1,y=Io(a,n);let{mainAxis:S,crossAxis:A,alignmentAxis:C}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return h&&typeof C=="number"&&(A=h==="end"?C*-1:C),m?{x:A*x,y:S*g}:{x:S*g,y:A*x}}const h_=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(a){var r,i;const{x:s,y:u,placement:f,middlewareData:h}=a,m=await f_(a,n);return f===((r=h.offset)==null?void 0:r.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:s+m.x,y:u+m.y,data:{...m,placement:f}}}}},m_=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(a){const{x:r,y:i,placement:s,platform:u}=a,{mainAxis:f=!0,crossAxis:h=!1,limiter:m={fn:R=>{let{x:j,y:B}=R;return{x:j,y:B}}},...g}=Io(n,a),x={x:r,y:i},y=await u.detectOverflow(a,g),S=mo(Po(s)),A=kh(S);let C=x[A],E=x[S];if(f){const R=A==="y"?"top":"left",j=A==="y"?"bottom":"right",B=C+y[R],Y=C-y[j];C=Jf(B,C,Y)}if(h){const R=S==="y"?"top":"left",j=S==="y"?"bottom":"right",B=E+y[R],Y=E-y[j];E=Jf(B,E,Y)}const M=m.fn({...a,[A]:C,[S]:E});return{...M,data:{x:M.x-r,y:M.y-i,enabled:{[A]:f,[S]:h}}}}}},p_=function(n){return n===void 0&&(n={}),{options:n,fn(a){const{x:r,y:i,placement:s,rects:u,middlewareData:f}=a,{offset:h=0,mainAxis:m=!0,crossAxis:g=!0}=Io(n,a),x={x:r,y:i},y=mo(s),S=kh(y);let A=x[S],C=x[y];const E=Io(h,a),M=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(m){const B=S==="y"?"height":"width",Y=u.reference[S]-u.floating[B]+M.mainAxis,te=u.reference[S]+u.reference[B]-M.mainAxis;A<Y?A=Y:A>te&&(A=te)}if(g){var R,j;const B=S==="y"?"width":"height",Y=Qb.has(Po(s)),te=u.reference[y]-u.floating[B]+(Y&&((R=f.offset)==null?void 0:R[y])||0)+(Y?0:M.crossAxis),$=u.reference[y]+u.reference[B]+(Y?0:((j=f.offset)==null?void 0:j[y])||0)-(Y?M.crossAxis:0);C<te?C=te:C>$&&(C=$)}return{[S]:A,[y]:C}}}},g_=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(a){var r,i;const{placement:s,rects:u,platform:f,elements:h}=a,{apply:m=()=>{},...g}=Io(n,a),x=await f.detectOverflow(a,g),y=Po(s),S=il(s),A=mo(s)==="y",{width:C,height:E}=u.floating;let M,R;y==="top"||y==="bottom"?(M=y,R=S===(await(f.isRTL==null?void 0:f.isRTL(h.floating))?"start":"end")?"left":"right"):(R=y,M=S==="end"?"top":"bottom");const j=E-x.top-x.bottom,B=C-x.left-x.right,Y=Ma(E-x[M],j),te=Ma(C-x[R],B),$=!a.middlewareData.shift;let q=Y,z=te;if((r=a.middlewareData.shift)!=null&&r.enabled.x&&(z=B),(i=a.middlewareData.shift)!=null&&i.enabled.y&&(q=j),$&&!S){const ie=jn(x.left,0),de=jn(x.right,0),K=jn(x.top,0),ae=jn(x.bottom,0);A?z=C-2*(ie!==0||de!==0?ie+de:jn(x.left,x.right)):q=E-2*(K!==0||ae!==0?K+ae:jn(x.top,x.bottom))}await m({...a,availableWidth:z,availableHeight:q});const W=await f.getDimensions(h.floating);return C!==W.width||E!==W.height?{reset:{rects:!0}}:{}}}};function zc(){return typeof window<"u"}function sl(n){return Zb(n)?(n.nodeName||"").toLowerCase():"#document"}function zn(n){var a;return(n==null||(a=n.ownerDocument)==null?void 0:a.defaultView)||window}function yo(n){var a;return(a=(Zb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:a.documentElement}function Zb(n){return zc()?n instanceof Node||n instanceof zn(n).Node:!1}function eo(n){return zc()?n instanceof Element||n instanceof zn(n).Element:!1}function Go(n){return zc()?n instanceof HTMLElement||n instanceof zn(n).HTMLElement:!1}function H0(n){return!zc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof zn(n).ShadowRoot}function bi(n){const{overflow:a,overflowX:r,overflowY:i,display:s}=to(n);return/auto|scroll|overlay|hidden|clip/.test(a+i+r)&&s!=="inline"&&s!=="contents"}function y_(n){return/^(table|td|th)$/.test(sl(n))}function kc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const v_=/transform|translate|scale|rotate|perspective|filter/,b_=/paint|layout|strict|content/,tr=n=>!!n&&n!=="none";let xf;function Bh(n){const a=eo(n)?to(n):n;return tr(a.transform)||tr(a.translate)||tr(a.scale)||tr(a.rotate)||tr(a.perspective)||!Uh()&&(tr(a.backdropFilter)||tr(a.filter))||v_.test(a.willChange||"")||b_.test(a.contain||"")}function x_(n){let a=_a(n);for(;Go(a)&&!tl(a);){if(Bh(a))return a;if(kc(a))return null;a=_a(a)}return null}function Uh(){return xf==null&&(xf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),xf}function tl(n){return/^(html|body|#document)$/.test(sl(n))}function to(n){return zn(n).getComputedStyle(n)}function Lc(n){return eo(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function _a(n){if(sl(n)==="html")return n;const a=n.assignedSlot||n.parentNode||H0(n)&&n.host||yo(n);return H0(a)?a.host:a}function Wb(n){const a=_a(n);return tl(a)?n.ownerDocument?n.ownerDocument.body:n.body:Go(a)&&bi(a)?a:Wb(a)}function ci(n,a,r){var i;a===void 0&&(a=[]),r===void 0&&(r=!0);const s=Wb(n),u=s===((i=n.ownerDocument)==null?void 0:i.body),f=zn(s);if(u){const h=th(f);return a.concat(f,f.visualViewport||[],bi(s)?s:[],h&&r?ci(h):[])}else return a.concat(s,ci(s,[],r))}function th(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Jb(n){const a=to(n);let r=parseFloat(a.width)||0,i=parseFloat(a.height)||0;const s=Go(n),u=s?n.offsetWidth:r,f=s?n.offsetHeight:i,h=vc(r)!==u||vc(i)!==f;return h&&(r=u,i=f),{width:r,height:i,$:h}}function Ih(n){return eo(n)?n:n.contextElement}function Zr(n){const a=Ih(n);if(!Go(a))return go(1);const r=a.getBoundingClientRect(),{width:i,height:s,$:u}=Jb(a);let f=(u?vc(r.width):r.width)/i,h=(u?vc(r.height):r.height)/s;return(!f||!Number.isFinite(f))&&(f=1),(!h||!Number.isFinite(h))&&(h=1),{x:f,y:h}}const S_=go(0);function ex(n){const a=zn(n);return!Uh()||!a.visualViewport?S_:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function w_(n,a,r){return a===void 0&&(a=!1),!r||a&&r!==zn(n)?!1:a}function ar(n,a,r,i){a===void 0&&(a=!1),r===void 0&&(r=!1);const s=n.getBoundingClientRect(),u=Ih(n);let f=go(1);a&&(i?eo(i)&&(f=Zr(i)):f=Zr(n));const h=w_(u,r,i)?ex(u):go(0);let m=(s.left+h.x)/f.x,g=(s.top+h.y)/f.y,x=s.width/f.x,y=s.height/f.y;if(u){const S=zn(u),A=i&&eo(i)?zn(i):i;let C=S,E=th(C);for(;E&&i&&A!==C;){const M=Zr(E),R=E.getBoundingClientRect(),j=to(E),B=R.left+(E.clientLeft+parseFloat(j.paddingLeft))*M.x,Y=R.top+(E.clientTop+parseFloat(j.paddingTop))*M.y;m*=M.x,g*=M.y,x*=M.x,y*=M.y,m+=B,g+=Y,C=zn(E),E=th(C)}}return xc({width:x,height:y,x:m,y:g})}function Hc(n,a){const r=Lc(n).scrollLeft;return a?a.left+r:ar(yo(n)).left+r}function tx(n,a){const r=n.getBoundingClientRect(),i=r.left+a.scrollLeft-Hc(n,r),s=r.top+a.scrollTop;return{x:i,y:s}}function E_(n){let{elements:a,rect:r,offsetParent:i,strategy:s}=n;const u=s==="fixed",f=yo(i),h=a?kc(a.floating):!1;if(i===f||h&&u)return r;let m={scrollLeft:0,scrollTop:0},g=go(1);const x=go(0),y=Go(i);if((y||!y&&!u)&&((sl(i)!=="body"||bi(f))&&(m=Lc(i)),y)){const A=ar(i);g=Zr(i),x.x=A.x+i.clientLeft,x.y=A.y+i.clientTop}const S=f&&!y&&!u?tx(f,m):go(0);return{width:r.width*g.x,height:r.height*g.y,x:r.x*g.x-m.scrollLeft*g.x+x.x+S.x,y:r.y*g.y-m.scrollTop*g.y+x.y+S.y}}function C_(n){return Array.from(n.getClientRects())}function T_(n){const a=yo(n),r=Lc(n),i=n.ownerDocument.body,s=jn(a.scrollWidth,a.clientWidth,i.scrollWidth,i.clientWidth),u=jn(a.scrollHeight,a.clientHeight,i.scrollHeight,i.clientHeight);let f=-r.scrollLeft+Hc(n);const h=-r.scrollTop;return to(i).direction==="rtl"&&(f+=jn(a.clientWidth,i.clientWidth)-s),{width:s,height:u,x:f,y:h}}const B0=25;function A_(n,a){const r=zn(n),i=yo(n),s=r.visualViewport;let u=i.clientWidth,f=i.clientHeight,h=0,m=0;if(s){u=s.width,f=s.height;const x=Uh();(!x||x&&a==="fixed")&&(h=s.offsetLeft,m=s.offsetTop)}const g=Hc(i);if(g<=0){const x=i.ownerDocument,y=x.body,S=getComputedStyle(y),A=x.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,C=Math.abs(i.clientWidth-y.clientWidth-A);C<=B0&&(u-=C)}else g<=B0&&(u+=g);return{width:u,height:f,x:h,y:m}}function M_(n,a){const r=ar(n,!0,a==="fixed"),i=r.top+n.clientTop,s=r.left+n.clientLeft,u=Go(n)?Zr(n):go(1),f=n.clientWidth*u.x,h=n.clientHeight*u.y,m=s*u.x,g=i*u.y;return{width:f,height:h,x:m,y:g}}function U0(n,a,r){let i;if(a==="viewport")i=A_(n,r);else if(a==="document")i=T_(yo(n));else if(eo(a))i=M_(a,r);else{const s=ex(n);i={x:a.x-s.x,y:a.y-s.y,width:a.width,height:a.height}}return xc(i)}function nx(n,a){const r=_a(n);return r===a||!eo(r)||tl(r)?!1:to(r).position==="fixed"||nx(r,a)}function __(n,a){const r=a.get(n);if(r)return r;let i=ci(n,[],!1).filter(h=>eo(h)&&sl(h)!=="body"),s=null;const u=to(n).position==="fixed";let f=u?_a(n):n;for(;eo(f)&&!tl(f);){const h=to(f),m=Bh(f);!m&&h.position==="fixed"&&(s=null),(u?!m&&!s:!m&&h.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||bi(f)&&!m&&nx(n,f))?i=i.filter(x=>x!==f):s=h,f=_a(f)}return a.set(n,i),i}function N_(n){let{element:a,boundary:r,rootBoundary:i,strategy:s}=n;const f=[...r==="clippingAncestors"?kc(a)?[]:__(a,this._c):[].concat(r),i],h=U0(a,f[0],s);let m=h.top,g=h.right,x=h.bottom,y=h.left;for(let S=1;S<f.length;S++){const A=U0(a,f[S],s);m=jn(A.top,m),g=Ma(A.right,g),x=Ma(A.bottom,x),y=jn(A.left,y)}return{width:g-y,height:x-m,x:y,y:m}}function R_(n){const{width:a,height:r}=Jb(n);return{width:a,height:r}}function O_(n,a,r){const i=Go(a),s=yo(a),u=r==="fixed",f=ar(n,!0,u,a);let h={scrollLeft:0,scrollTop:0};const m=go(0);function g(){m.x=Hc(s)}if(i||!i&&!u)if((sl(a)!=="body"||bi(s))&&(h=Lc(a)),i){const A=ar(a,!0,u,a);m.x=A.x+a.clientLeft,m.y=A.y+a.clientTop}else s&&g();u&&!i&&s&&g();const x=s&&!i&&!u?tx(s,h):go(0),y=f.left+h.scrollLeft-m.x-x.x,S=f.top+h.scrollTop-m.y-x.y;return{x:y,y:S,width:f.width,height:f.height}}function Sf(n){return to(n).position==="static"}function I0(n,a){if(!Go(n)||to(n).position==="fixed")return null;if(a)return a(n);let r=n.offsetParent;return yo(n)===r&&(r=r.ownerDocument.body),r}function ox(n,a){const r=zn(n);if(kc(n))return r;if(!Go(n)){let s=_a(n);for(;s&&!tl(s);){if(eo(s)&&!Sf(s))return s;s=_a(s)}return r}let i=I0(n,a);for(;i&&y_(i)&&Sf(i);)i=I0(i,a);return i&&tl(i)&&Sf(i)&&!Bh(i)?r:i||x_(n)||r}const D_=async function(n){const a=this.getOffsetParent||ox,r=this.getDimensions,i=await r(n.floating);return{reference:O_(n.reference,await a(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function j_(n){return to(n).direction==="rtl"}const z_={convertOffsetParentRelativeRectToViewportRelativeRect:E_,getDocumentElement:yo,getClippingRect:N_,getOffsetParent:ox,getElementRects:D_,getClientRects:C_,getDimensions:R_,getScale:Zr,isElement:eo,isRTL:j_};function ax(n,a){return n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function k_(n,a){let r=null,i;const s=yo(n);function u(){var h;clearTimeout(i),(h=r)==null||h.disconnect(),r=null}function f(h,m){h===void 0&&(h=!1),m===void 0&&(m=1),u();const g=n.getBoundingClientRect(),{left:x,top:y,width:S,height:A}=g;if(h||a(),!S||!A)return;const C=Qs(y),E=Qs(s.clientWidth-(x+S)),M=Qs(s.clientHeight-(y+A)),R=Qs(x),B={rootMargin:-C+"px "+-E+"px "+-M+"px "+-R+"px",threshold:jn(0,Ma(1,m))||1};let Y=!0;function te($){const q=$[0].intersectionRatio;if(q!==m){if(!Y)return f();q?f(!1,q):i=setTimeout(()=>{f(!1,1e-7)},1e3)}q===1&&!ax(g,n.getBoundingClientRect())&&f(),Y=!1}try{r=new IntersectionObserver(te,{...B,root:s.ownerDocument})}catch{r=new IntersectionObserver(te,B)}r.observe(n)}return f(!0),u}function L_(n,a,r,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:f=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:m=!1}=i,g=Ih(n),x=s||u?[...g?ci(g):[],...a?ci(a):[]]:[];x.forEach(R=>{s&&R.addEventListener("scroll",r,{passive:!0}),u&&R.addEventListener("resize",r)});const y=g&&h?k_(g,r):null;let S=-1,A=null;f&&(A=new ResizeObserver(R=>{let[j]=R;j&&j.target===g&&A&&a&&(A.unobserve(a),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var B;(B=A)==null||B.observe(a)})),r()}),g&&!m&&A.observe(g),a&&A.observe(a));let C,E=m?ar(n):null;m&&M();function M(){const R=ar(n);E&&!ax(E,R)&&r(),E=R,C=requestAnimationFrame(M)}return r(),()=>{var R;x.forEach(j=>{s&&j.removeEventListener("scroll",r),u&&j.removeEventListener("resize",r)}),y==null||y(),(R=A)==null||R.disconnect(),A=null,m&&cancelAnimationFrame(C)}}const H_=h_,B_=m_,U_=u_,I_=g_,P_=d_,P0=c_,$_=p_,G_=(n,a,r)=>{const i=new Map,s={platform:z_,...r},u={...s.platform,_c:i};return s_(n,a,{...s,platform:u})};var Y_=typeof document<"u",V_=function(){},lc=Y_?v.useLayoutEffect:V_;function Sc(n,a){if(n===a)return!0;if(typeof n!=typeof a)return!1;if(typeof n=="function"&&n.toString()===a.toString())return!0;let r,i,s;if(n&&a&&typeof n=="object"){if(Array.isArray(n)){if(r=n.length,r!==a.length)return!1;for(i=r;i--!==0;)if(!Sc(n[i],a[i]))return!1;return!0}if(s=Object.keys(n),r=s.length,r!==Object.keys(a).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(a,s[i]))return!1;for(i=r;i--!==0;){const u=s[i];if(!(u==="_owner"&&n.$$typeof)&&!Sc(n[u],a[u]))return!1}return!0}return n!==n&&a!==a}function rx(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function $0(n,a){const r=rx(n);return Math.round(a*r)/r}function wf(n){const a=v.useRef(n);return lc(()=>{a.current=n}),a}function q_(n){n===void 0&&(n={});const{placement:a="bottom",strategy:r="absolute",middleware:i=[],platform:s,elements:{reference:u,floating:f}={},transform:h=!0,whileElementsMounted:m,open:g}=n,[x,y]=v.useState({x:0,y:0,strategy:r,placement:a,middlewareData:{},isPositioned:!1}),[S,A]=v.useState(i);Sc(S,i)||A(i);const[C,E]=v.useState(null),[M,R]=v.useState(null),j=v.useCallback(N=>{N!==$.current&&($.current=N,E(N))},[]),B=v.useCallback(N=>{N!==q.current&&(q.current=N,R(N))},[]),Y=u||C,te=f||M,$=v.useRef(null),q=v.useRef(null),z=v.useRef(x),W=m!=null,ie=wf(m),de=wf(s),K=wf(g),ae=v.useCallback(()=>{if(!$.current||!q.current)return;const N={placement:a,strategy:r,middleware:S};de.current&&(N.platform=de.current),G_($.current,q.current,N).then(L=>{const D={...L,isPositioned:K.current!==!1};fe.current&&!Sc(z.current,D)&&(z.current=D,fi.flushSync(()=>{y(D)}))})},[S,a,r,de,K]);lc(()=>{g===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,y(N=>({...N,isPositioned:!1})))},[g]);const fe=v.useRef(!1);lc(()=>(fe.current=!0,()=>{fe.current=!1}),[]),lc(()=>{if(Y&&($.current=Y),te&&(q.current=te),Y&&te){if(ie.current)return ie.current(Y,te,ae);ae()}},[Y,te,ae,ie,W]);const pe=v.useMemo(()=>({reference:$,floating:q,setReference:j,setFloating:B}),[j,B]),T=v.useMemo(()=>({reference:Y,floating:te}),[Y,te]),O=v.useMemo(()=>{const N={position:r,left:0,top:0};if(!T.floating)return N;const L=$0(T.floating,x.x),D=$0(T.floating,x.y);return h?{...N,transform:"translate("+L+"px, "+D+"px)",...rx(T.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:L,top:D}},[r,h,T.floating,x.x,x.y]);return v.useMemo(()=>({...x,update:ae,refs:pe,elements:T,floatingStyles:O}),[x,ae,pe,T,O])}const X_=n=>{function a(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:n,fn(r){const{element:i,padding:s}=typeof n=="function"?n(r):n;return i&&a(i)?i.current!=null?P0({element:i.current,padding:s}).fn(r):{}:i?P0({element:i,padding:s}).fn(r):{}}}},F_=(n,a)=>{const r=H_(n);return{name:r.name,fn:r.fn,options:[n,a]}},K_=(n,a)=>{const r=B_(n);return{name:r.name,fn:r.fn,options:[n,a]}},Q_=(n,a)=>({fn:$_(n).fn,options:[n,a]}),Z_=(n,a)=>{const r=U_(n);return{name:r.name,fn:r.fn,options:[n,a]}},W_=(n,a)=>{const r=I_(n);return{name:r.name,fn:r.fn,options:[n,a]}},J_=(n,a)=>{const r=P_(n);return{name:r.name,fn:r.fn,options:[n,a]}},eN=(n,a)=>{const r=X_(n);return{name:r.name,fn:r.fn,options:[n,a]}};var tN="Arrow",lx=v.forwardRef((n,a)=>{const{children:r,width:i=10,height:s=5,...u}=n;return p.jsx(Ge.svg,{...u,ref:a,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});lx.displayName=tN;var nN=lx,Ph="Popper",[ix,Da]=$o(Ph),[oN,sx]=ix(Ph),cx=n=>{const{__scopePopper:a,children:r}=n,[i,s]=v.useState(null);return p.jsx(oN,{scope:a,anchor:i,onAnchorChange:s,children:r})};cx.displayName=Ph;var ux="PopperAnchor",dx=v.forwardRef((n,a)=>{const{__scopePopper:r,virtualRef:i,...s}=n,u=sx(ux,r),f=v.useRef(null),h=nt(a,f),m=v.useRef(null);return v.useEffect(()=>{const g=m.current;m.current=(i==null?void 0:i.current)||f.current,g!==m.current&&u.onAnchorChange(m.current)}),i?null:p.jsx(Ge.div,{...s,ref:h})});dx.displayName=ux;var $h="PopperContent",[aN,rN]=ix($h),fx=v.forwardRef((n,a)=>{var ne,V,re,ye,Se,ve;const{__scopePopper:r,side:i="bottom",sideOffset:s=0,align:u="center",alignOffset:f=0,arrowPadding:h=0,avoidCollisions:m=!0,collisionBoundary:g=[],collisionPadding:x=0,sticky:y="partial",hideWhenDetached:S=!1,updatePositionStrategy:A="optimized",onPlaced:C,...E}=n,M=sx($h,r),[R,j]=v.useState(null),B=nt(a,De=>j(De)),[Y,te]=v.useState(null),$=QM(Y),q=($==null?void 0:$.width)??0,z=($==null?void 0:$.height)??0,W=i+(u!=="center"?"-"+u:""),ie=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},de=Array.isArray(g)?g:[g],K=de.length>0,ae={padding:ie,boundary:de.filter(iN),altBoundary:K},{refs:fe,floatingStyles:pe,placement:T,isPositioned:O,middlewareData:N}=q_({strategy:"fixed",placement:W,whileElementsMounted:(...De)=>L_(...De,{animationFrame:A==="always"}),elements:{reference:M.anchor},middleware:[F_({mainAxis:s+z,alignmentAxis:f}),m&&K_({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?Q_():void 0,...ae}),m&&Z_({...ae}),W_({...ae,apply:({elements:De,rects:ke,availableWidth:_e,availableHeight:lt})=>{const{width:ft,height:xt}=ke.reference,ot=De.floating.style;ot.setProperty("--radix-popper-available-width",`${_e}px`),ot.setProperty("--radix-popper-available-height",`${lt}px`),ot.setProperty("--radix-popper-anchor-width",`${ft}px`),ot.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),Y&&eN({element:Y,padding:h}),sN({arrowWidth:q,arrowHeight:z}),S&&J_({strategy:"referenceHidden",...ae})]}),[L,D]=px(T),_=Fn(C);tn(()=>{O&&(_==null||_())},[O,_]);const U=(ne=N.arrow)==null?void 0:ne.x,H=(V=N.arrow)==null?void 0:V.y,P=((re=N.arrow)==null?void 0:re.centerOffset)!==0,[X,J]=v.useState();return tn(()=>{R&&J(window.getComputedStyle(R).zIndex)},[R]),p.jsx("div",{ref:fe.setFloating,"data-radix-popper-content-wrapper":"",style:{...pe,transform:O?pe.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[(ye=N.transformOrigin)==null?void 0:ye.x,(Se=N.transformOrigin)==null?void 0:Se.y].join(" "),...((ve=N.hide)==null?void 0:ve.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:p.jsx(aN,{scope:r,placedSide:L,onArrowChange:te,arrowX:U,arrowY:H,shouldHideArrow:P,children:p.jsx(Ge.div,{"data-side":L,"data-align":D,...E,ref:B,style:{...E.style,animation:O?void 0:"none"}})})})});fx.displayName=$h;var hx="PopperArrow",lN={top:"bottom",right:"left",bottom:"top",left:"right"},mx=v.forwardRef(function(a,r){const{__scopePopper:i,...s}=a,u=rN(hx,i),f=lN[u.placedSide];return p.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[f]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:p.jsx(nN,{...s,ref:r,style:{...s.style,display:"block"}})})});mx.displayName=hx;function iN(n){return n!==null}var sN=n=>({name:"transformOrigin",options:n,fn(a){var M,R,j;const{placement:r,rects:i,middlewareData:s}=a,f=((M=s.arrow)==null?void 0:M.centerOffset)!==0,h=f?0:n.arrowWidth,m=f?0:n.arrowHeight,[g,x]=px(r),y={start:"0%",center:"50%",end:"100%"}[x],S=(((R=s.arrow)==null?void 0:R.x)??0)+h/2,A=(((j=s.arrow)==null?void 0:j.y)??0)+m/2;let C="",E="";return g==="bottom"?(C=f?y:`${S}px`,E=`${-m}px`):g==="top"?(C=f?y:`${S}px`,E=`${i.floating.height+m}px`):g==="right"?(C=`${-m}px`,E=f?y:`${A}px`):g==="left"&&(C=`${i.floating.width+m}px`,E=f?y:`${A}px`),{data:{x:C,y:E}}}});function px(n){const[a,r="center"]=n.split("-");return[a,r]}var Bc=cx,xi=dx,Uc=fx,Ic=mx,Ef="rovingFocusGroup.onEntryFocus",cN={bubbles:!1,cancelable:!0},Si="RovingFocusGroup",[nh,gx,uN]=Rh(Si),[dN,yx]=$o(Si,[uN]),[fN,hN]=dN(Si),vx=v.forwardRef((n,a)=>p.jsx(nh.Provider,{scope:n.__scopeRovingFocusGroup,children:p.jsx(nh.Slot,{scope:n.__scopeRovingFocusGroup,children:p.jsx(mN,{...n,ref:a})})}));vx.displayName=Si;var mN=v.forwardRef((n,a)=>{const{__scopeRovingFocusGroup:r,orientation:i,loop:s=!1,dir:u,currentTabStopId:f,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:m,onEntryFocus:g,preventScrollOnEntryFocus:x=!1,...y}=n,S=v.useRef(null),A=nt(a,S),C=Oh(u),[E,M]=el({prop:f,defaultProp:h??null,onChange:m,caller:Si}),[R,j]=v.useState(!1),B=Fn(g),Y=gx(r),te=v.useRef(!1),[$,q]=v.useState(0);return v.useEffect(()=>{const z=S.current;if(z)return z.addEventListener(Ef,B),()=>z.removeEventListener(Ef,B)},[B]),p.jsx(fN,{scope:r,orientation:i,dir:C,loop:s,currentTabStopId:E,onItemFocus:v.useCallback(z=>M(z),[M]),onItemShiftTab:v.useCallback(()=>j(!0),[]),onFocusableItemAdd:v.useCallback(()=>q(z=>z+1),[]),onFocusableItemRemove:v.useCallback(()=>q(z=>z-1),[]),children:p.jsx(Ge.div,{tabIndex:R||$===0?-1:0,"data-orientation":i,...y,ref:A,style:{outline:"none",...n.style},onMouseDown:be(n.onMouseDown,()=>{te.current=!0}),onFocus:be(n.onFocus,z=>{const W=!te.current;if(z.target===z.currentTarget&&W&&!R){const ie=new CustomEvent(Ef,cN);if(z.currentTarget.dispatchEvent(ie),!ie.defaultPrevented){const de=Y().filter(T=>T.focusable),K=de.find(T=>T.active),ae=de.find(T=>T.id===E),pe=[K,ae,...de].filter(Boolean).map(T=>T.ref.current);Sx(pe,x)}}te.current=!1}),onBlur:be(n.onBlur,()=>j(!1))})})}),bx="RovingFocusGroupItem",xx=v.forwardRef((n,a)=>{const{__scopeRovingFocusGroup:r,focusable:i=!0,active:s=!1,tabStopId:u,children:f,...h}=n,m=po(),g=u||m,x=hN(bx,r),y=x.currentTabStopId===g,S=gx(r),{onFocusableItemAdd:A,onFocusableItemRemove:C,currentTabStopId:E}=x;return v.useEffect(()=>{if(i)return A(),()=>C()},[i,A,C]),p.jsx(nh.ItemSlot,{scope:r,id:g,focusable:i,active:s,children:p.jsx(Ge.span,{tabIndex:y?0:-1,"data-orientation":x.orientation,...h,ref:a,onMouseDown:be(n.onMouseDown,M=>{i?x.onItemFocus(g):M.preventDefault()}),onFocus:be(n.onFocus,()=>x.onItemFocus(g)),onKeyDown:be(n.onKeyDown,M=>{if(M.key==="Tab"&&M.shiftKey){x.onItemShiftTab();return}if(M.target!==M.currentTarget)return;const R=yN(M,x.orientation,x.dir);if(R!==void 0){if(M.metaKey||M.ctrlKey||M.altKey||M.shiftKey)return;M.preventDefault();let B=S().filter(Y=>Y.focusable).map(Y=>Y.ref.current);if(R==="last")B.reverse();else if(R==="prev"||R==="next"){R==="prev"&&B.reverse();const Y=B.indexOf(M.currentTarget);B=x.loop?vN(B,Y+1):B.slice(Y+1)}setTimeout(()=>Sx(B))}}),children:typeof f=="function"?f({isCurrentTabStop:y,hasTabStop:E!=null}):f})})});xx.displayName=bx;var pN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gN(n,a){return a!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function yN(n,a,r){const i=gN(n.key,r);if(!(a==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(a==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return pN[i]}function Sx(n,a=!1){const r=document.activeElement;for(const i of n)if(i===r||(i.focus({preventScroll:a}),document.activeElement!==r))return}function vN(n,a){return n.map((r,i)=>n[(a+i)%n.length])}var bN=vx,xN=xx,oh=["Enter"," "],SN=["ArrowDown","PageUp","Home"],wx=["ArrowUp","PageDown","End"],wN=[...SN,...wx],EN={ltr:[...oh,"ArrowRight"],rtl:[...oh,"ArrowLeft"]},CN={ltr:["ArrowLeft"],rtl:["ArrowRight"]},wi="Menu",[ui,TN,AN]=Rh(wi),[sr,Ex]=$o(wi,[AN,Da,yx]),Ei=Da(),Cx=yx(),[Tx,ja]=sr(wi),[MN,Ci]=sr(wi),Ax=n=>{const{__scopeMenu:a,open:r=!1,children:i,dir:s,onOpenChange:u,modal:f=!0}=n,h=Ei(a),[m,g]=v.useState(null),x=v.useRef(!1),y=Fn(u),S=Oh(s);return v.useEffect(()=>{const A=()=>{x.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>x.current=!1;return document.addEventListener("keydown",A,{capture:!0}),()=>{document.removeEventListener("keydown",A,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),p.jsx(Bc,{...h,children:p.jsx(Tx,{scope:a,open:r,onOpenChange:y,content:m,onContentChange:g,children:p.jsx(MN,{scope:a,onClose:v.useCallback(()=>y(!1),[y]),isUsingKeyboardRef:x,dir:S,modal:f,children:i})})})};Ax.displayName=wi;var _N="MenuAnchor",Gh=v.forwardRef((n,a)=>{const{__scopeMenu:r,...i}=n,s=Ei(r);return p.jsx(xi,{...s,...i,ref:a})});Gh.displayName=_N;var Yh="MenuPortal",[NN,Mx]=sr(Yh,{forceMount:void 0}),_x=n=>{const{__scopeMenu:a,forceMount:r,children:i,container:s}=n,u=ja(Yh,a);return p.jsx(NN,{scope:a,forceMount:r,children:p.jsx(no,{present:r||u.open,children:p.jsx(yi,{asChild:!0,container:s,children:i})})})};_x.displayName=Yh;var Xn="MenuContent",[RN,Vh]=sr(Xn),Nx=v.forwardRef((n,a)=>{const r=Mx(Xn,n.__scopeMenu),{forceMount:i=r.forceMount,...s}=n,u=ja(Xn,n.__scopeMenu),f=Ci(Xn,n.__scopeMenu);return p.jsx(ui.Provider,{scope:n.__scopeMenu,children:p.jsx(no,{present:i||u.open,children:p.jsx(ui.Slot,{scope:n.__scopeMenu,children:f.modal?p.jsx(ON,{...s,ref:a}):p.jsx(DN,{...s,ref:a})})})})}),ON=v.forwardRef((n,a)=>{const r=ja(Xn,n.__scopeMenu),i=v.useRef(null),s=nt(a,i);return v.useEffect(()=>{const u=i.current;if(u)return Dc(u)},[]),p.jsx(qh,{...n,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:be(n.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),DN=v.forwardRef((n,a)=>{const r=ja(Xn,n.__scopeMenu);return p.jsx(qh,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),jN=Aa("MenuContent.ScrollLock"),qh=v.forwardRef((n,a)=>{const{__scopeMenu:r,loop:i=!1,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:f,disableOutsidePointerEvents:h,onEntryFocus:m,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:y,onInteractOutside:S,onDismiss:A,disableOutsideScroll:C,...E}=n,M=ja(Xn,r),R=Ci(Xn,r),j=Ei(r),B=Cx(r),Y=TN(r),[te,$]=v.useState(null),q=v.useRef(null),z=nt(a,q,M.onContentChange),W=v.useRef(0),ie=v.useRef(""),de=v.useRef(0),K=v.useRef(null),ae=v.useRef("right"),fe=v.useRef(0),pe=C?vi:v.Fragment,T=C?{as:jN,allowPinchZoom:!0}:void 0,O=L=>{var ne,V;const D=ie.current+L,_=Y().filter(re=>!re.disabled),U=document.activeElement,H=(ne=_.find(re=>re.ref.current===U))==null?void 0:ne.textValue,P=_.map(re=>re.textValue),X=VN(P,D,H),J=(V=_.find(re=>re.textValue===X))==null?void 0:V.ref.current;(function re(ye){ie.current=ye,window.clearTimeout(W.current),ye!==""&&(W.current=window.setTimeout(()=>re(""),1e3))})(D),J&&setTimeout(()=>J.focus())};v.useEffect(()=>()=>window.clearTimeout(W.current),[]),Rc();const N=v.useCallback(L=>{var _,U;return ae.current===((_=K.current)==null?void 0:_.side)&&XN(L,(U=K.current)==null?void 0:U.area)},[]);return p.jsx(RN,{scope:r,searchRef:ie,onItemEnter:v.useCallback(L=>{N(L)&&L.preventDefault()},[N]),onItemLeave:v.useCallback(L=>{var D;N(L)||((D=q.current)==null||D.focus(),$(null))},[N]),onTriggerLeave:v.useCallback(L=>{N(L)&&L.preventDefault()},[N]),pointerGraceTimerRef:de,onPointerGraceIntentChange:v.useCallback(L=>{K.current=L},[]),children:p.jsx(pe,{...T,children:p.jsx(gi,{asChild:!0,trapped:s,onMountAutoFocus:be(u,L=>{var D;L.preventDefault(),(D=q.current)==null||D.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:p.jsx(ll,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:y,onInteractOutside:S,onDismiss:A,children:p.jsx(bN,{asChild:!0,...B,dir:R.dir,orientation:"vertical",loop:i,currentTabStopId:te,onCurrentTabStopIdChange:$,onEntryFocus:be(m,L=>{R.isUsingKeyboardRef.current||L.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Uc,{role:"menu","aria-orientation":"vertical","data-state":qx(M.open),"data-radix-menu-content":"",dir:R.dir,...j,...E,ref:z,style:{outline:"none",...E.style},onKeyDown:be(E.onKeyDown,L=>{const _=L.target.closest("[data-radix-menu-content]")===L.currentTarget,U=L.ctrlKey||L.altKey||L.metaKey,H=L.key.length===1;_&&(L.key==="Tab"&&L.preventDefault(),!U&&H&&O(L.key));const P=q.current;if(L.target!==P||!wN.includes(L.key))return;L.preventDefault();const J=Y().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);wx.includes(L.key)&&J.reverse(),GN(J)}),onBlur:be(n.onBlur,L=>{L.currentTarget.contains(L.target)||(window.clearTimeout(W.current),ie.current="")}),onPointerMove:be(n.onPointerMove,di(L=>{const D=L.target,_=fe.current!==L.clientX;if(L.currentTarget.contains(D)&&_){const U=L.clientX>fe.current?"right":"left";ae.current=U,fe.current=L.clientX}}))})})})})})})});Nx.displayName=Xn;var zN="MenuGroup",Xh=v.forwardRef((n,a)=>{const{__scopeMenu:r,...i}=n;return p.jsx(Ge.div,{role:"group",...i,ref:a})});Xh.displayName=zN;var kN="MenuLabel",Rx=v.forwardRef((n,a)=>{const{__scopeMenu:r,...i}=n;return p.jsx(Ge.div,{...i,ref:a})});Rx.displayName=kN;var wc="MenuItem",G0="menu.itemSelect",Pc=v.forwardRef((n,a)=>{const{disabled:r=!1,onSelect:i,...s}=n,u=v.useRef(null),f=Ci(wc,n.__scopeMenu),h=Vh(wc,n.__scopeMenu),m=nt(a,u),g=v.useRef(!1),x=()=>{const y=u.current;if(!r&&y){const S=new CustomEvent(G0,{bubbles:!0,cancelable:!0});y.addEventListener(G0,A=>i==null?void 0:i(A),{once:!0}),xb(y,S),S.defaultPrevented?g.current=!1:f.onClose()}};return p.jsx(Ox,{...s,ref:m,disabled:r,onClick:be(n.onClick,x),onPointerDown:y=>{var S;(S=n.onPointerDown)==null||S.call(n,y),g.current=!0},onPointerUp:be(n.onPointerUp,y=>{var S;g.current||(S=y.currentTarget)==null||S.click()}),onKeyDown:be(n.onKeyDown,y=>{const S=h.searchRef.current!=="";r||S&&y.key===" "||oh.includes(y.key)&&(y.currentTarget.click(),y.preventDefault())})})});Pc.displayName=wc;var Ox=v.forwardRef((n,a)=>{const{__scopeMenu:r,disabled:i=!1,textValue:s,...u}=n,f=Vh(wc,r),h=Cx(r),m=v.useRef(null),g=nt(a,m),[x,y]=v.useState(!1),[S,A]=v.useState("");return v.useEffect(()=>{const C=m.current;C&&A((C.textContent??"").trim())},[u.children]),p.jsx(ui.ItemSlot,{scope:r,disabled:i,textValue:s??S,children:p.jsx(xN,{asChild:!0,...h,focusable:!i,children:p.jsx(Ge.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:g,onPointerMove:be(n.onPointerMove,di(C=>{i?f.onItemLeave(C):(f.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:be(n.onPointerLeave,di(C=>f.onItemLeave(C))),onFocus:be(n.onFocus,()=>y(!0)),onBlur:be(n.onBlur,()=>y(!1))})})})}),LN="MenuCheckboxItem",Dx=v.forwardRef((n,a)=>{const{checked:r=!1,onCheckedChange:i,...s}=n;return p.jsx(Hx,{scope:n.__scopeMenu,checked:r,children:p.jsx(Pc,{role:"menuitemcheckbox","aria-checked":Ec(r)?"mixed":r,...s,ref:a,"data-state":Qh(r),onSelect:be(s.onSelect,()=>i==null?void 0:i(Ec(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Dx.displayName=LN;var jx="MenuRadioGroup",[HN,BN]=sr(jx,{value:void 0,onValueChange:()=>{}}),zx=v.forwardRef((n,a)=>{const{value:r,onValueChange:i,...s}=n,u=Fn(i);return p.jsx(HN,{scope:n.__scopeMenu,value:r,onValueChange:u,children:p.jsx(Xh,{...s,ref:a})})});zx.displayName=jx;var kx="MenuRadioItem",Lx=v.forwardRef((n,a)=>{const{value:r,...i}=n,s=BN(kx,n.__scopeMenu),u=r===s.value;return p.jsx(Hx,{scope:n.__scopeMenu,checked:u,children:p.jsx(Pc,{role:"menuitemradio","aria-checked":u,...i,ref:a,"data-state":Qh(u),onSelect:be(i.onSelect,()=>{var f;return(f=s.onValueChange)==null?void 0:f.call(s,r)},{checkForDefaultPrevented:!1})})})});Lx.displayName=kx;var Fh="MenuItemIndicator",[Hx,UN]=sr(Fh,{checked:!1}),Bx=v.forwardRef((n,a)=>{const{__scopeMenu:r,forceMount:i,...s}=n,u=UN(Fh,r);return p.jsx(no,{present:i||Ec(u.checked)||u.checked===!0,children:p.jsx(Ge.span,{...s,ref:a,"data-state":Qh(u.checked)})})});Bx.displayName=Fh;var IN="MenuSeparator",Ux=v.forwardRef((n,a)=>{const{__scopeMenu:r,...i}=n;return p.jsx(Ge.div,{role:"separator","aria-orientation":"horizontal",...i,ref:a})});Ux.displayName=IN;var PN="MenuArrow",Ix=v.forwardRef((n,a)=>{const{__scopeMenu:r,...i}=n,s=Ei(r);return p.jsx(Ic,{...s,...i,ref:a})});Ix.displayName=PN;var Kh="MenuSub",[$N,Px]=sr(Kh),$x=n=>{const{__scopeMenu:a,children:r,open:i=!1,onOpenChange:s}=n,u=ja(Kh,a),f=Ei(a),[h,m]=v.useState(null),[g,x]=v.useState(null),y=Fn(s);return v.useEffect(()=>(u.open===!1&&y(!1),()=>y(!1)),[u.open,y]),p.jsx(Bc,{...f,children:p.jsx(Tx,{scope:a,open:i,onOpenChange:y,content:g,onContentChange:x,children:p.jsx($N,{scope:a,contentId:po(),triggerId:po(),trigger:h,onTriggerChange:m,children:r})})})};$x.displayName=Kh;var oi="MenuSubTrigger",Gx=v.forwardRef((n,a)=>{const r=ja(oi,n.__scopeMenu),i=Ci(oi,n.__scopeMenu),s=Px(oi,n.__scopeMenu),u=Vh(oi,n.__scopeMenu),f=v.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:m}=u,g={__scopeMenu:n.__scopeMenu},x=v.useCallback(()=>{f.current&&window.clearTimeout(f.current),f.current=null},[]);return v.useEffect(()=>x,[x]),v.useEffect(()=>{const y=h.current;return()=>{window.clearTimeout(y),m(null)}},[h,m]),p.jsx(Gh,{asChild:!0,...g,children:p.jsx(Ox,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":qx(r.open),...n,ref:Nh(a,s.onTriggerChange),onClick:y=>{var S;(S=n.onClick)==null||S.call(n,y),!(n.disabled||y.defaultPrevented)&&(y.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:be(n.onPointerMove,di(y=>{u.onItemEnter(y),!y.defaultPrevented&&!n.disabled&&!r.open&&!f.current&&(u.onPointerGraceIntentChange(null),f.current=window.setTimeout(()=>{r.onOpenChange(!0),x()},100))})),onPointerLeave:be(n.onPointerLeave,di(y=>{var A,C;x();const S=(A=r.content)==null?void 0:A.getBoundingClientRect();if(S){const E=(C=r.content)==null?void 0:C.dataset.side,M=E==="right",R=M?-5:5,j=S[M?"left":"right"],B=S[M?"right":"left"];u.onPointerGraceIntentChange({area:[{x:y.clientX+R,y:y.clientY},{x:j,y:S.top},{x:B,y:S.top},{x:B,y:S.bottom},{x:j,y:S.bottom}],side:E}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(y),y.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:be(n.onKeyDown,y=>{var A;const S=u.searchRef.current!=="";n.disabled||S&&y.key===" "||EN[i.dir].includes(y.key)&&(r.onOpenChange(!0),(A=r.content)==null||A.focus(),y.preventDefault())})})})});Gx.displayName=oi;var Yx="MenuSubContent",Vx=v.forwardRef((n,a)=>{const r=Mx(Xn,n.__scopeMenu),{forceMount:i=r.forceMount,...s}=n,u=ja(Xn,n.__scopeMenu),f=Ci(Xn,n.__scopeMenu),h=Px(Yx,n.__scopeMenu),m=v.useRef(null),g=nt(a,m);return p.jsx(ui.Provider,{scope:n.__scopeMenu,children:p.jsx(no,{present:i||u.open,children:p.jsx(ui.Slot,{scope:n.__scopeMenu,children:p.jsx(qh,{id:h.contentId,"aria-labelledby":h.triggerId,...s,ref:g,align:"start",side:f.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{var y;f.isUsingKeyboardRef.current&&((y=m.current)==null||y.focus()),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:be(n.onFocusOutside,x=>{x.target!==h.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:be(n.onEscapeKeyDown,x=>{f.onClose(),x.preventDefault()}),onKeyDown:be(n.onKeyDown,x=>{var A;const y=x.currentTarget.contains(x.target),S=CN[f.dir].includes(x.key);y&&S&&(u.onOpenChange(!1),(A=h.trigger)==null||A.focus(),x.preventDefault())})})})})})});Vx.displayName=Yx;function qx(n){return n?"open":"closed"}function Ec(n){return n==="indeterminate"}function Qh(n){return Ec(n)?"indeterminate":n?"checked":"unchecked"}function GN(n){const a=document.activeElement;for(const r of n)if(r===a||(r.focus(),document.activeElement!==a))return}function YN(n,a){return n.map((r,i)=>n[(a+i)%n.length])}function VN(n,a,r){const s=a.length>1&&Array.from(a).every(g=>g===a[0])?a[0]:a,u=r?n.indexOf(r):-1;let f=YN(n,Math.max(u,0));s.length===1&&(f=f.filter(g=>g!==r));const m=f.find(g=>g.toLowerCase().startsWith(s.toLowerCase()));return m!==r?m:void 0}function qN(n,a){const{x:r,y:i}=n;let s=!1;for(let u=0,f=a.length-1;u<a.length;f=u++){const h=a[u],m=a[f],g=h.x,x=h.y,y=m.x,S=m.y;x>i!=S>i&&r<(y-g)*(i-x)/(S-x)+g&&(s=!s)}return s}function XN(n,a){if(!a)return!1;const r={x:n.clientX,y:n.clientY};return qN(r,a)}function di(n){return a=>a.pointerType==="mouse"?n(a):void 0}var FN=Ax,KN=Gh,QN=_x,ZN=Nx,WN=Xh,JN=Rx,eR=Pc,tR=Dx,nR=zx,oR=Lx,aR=Bx,rR=Ux,lR=Ix,iR=$x,sR=Gx,cR=Vx,Zh="ContextMenu",[uR]=$o(Zh,[Ex]),nn=Ex(),[dR,Xx]=uR(Zh),Fx=n=>{const{__scopeContextMenu:a,children:r,onOpenChange:i,dir:s,modal:u=!0}=n,[f,h]=v.useState(!1),m=nn(a),g=Fn(i),x=v.useCallback(y=>{h(y),g(y)},[g]);return p.jsx(dR,{scope:a,open:f,onOpenChange:x,modal:u,children:p.jsx(FN,{...m,dir:s,open:f,onOpenChange:x,modal:u,children:r})})};Fx.displayName=Zh;var Kx="ContextMenuTrigger",Qx=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,disabled:i=!1,...s}=n,u=Xx(Kx,r),f=nn(r),h=v.useRef({x:0,y:0}),m=v.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...h.current})}),g=v.useRef(0),x=v.useCallback(()=>window.clearTimeout(g.current),[]),y=S=>{h.current={x:S.clientX,y:S.clientY},u.onOpenChange(!0)};return v.useEffect(()=>x,[x]),v.useEffect(()=>void(i&&x()),[i,x]),p.jsxs(p.Fragment,{children:[p.jsx(KN,{...f,virtualRef:m}),p.jsx(Ge.span,{"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,...s,ref:a,style:{WebkitTouchCallout:"none",...n.style},onContextMenu:i?n.onContextMenu:be(n.onContextMenu,S=>{x(),y(S),S.preventDefault()}),onPointerDown:i?n.onPointerDown:be(n.onPointerDown,Zs(S=>{x(),g.current=window.setTimeout(()=>y(S),700)})),onPointerMove:i?n.onPointerMove:be(n.onPointerMove,Zs(x)),onPointerCancel:i?n.onPointerCancel:be(n.onPointerCancel,Zs(x)),onPointerUp:i?n.onPointerUp:be(n.onPointerUp,Zs(x))})]})});Qx.displayName=Kx;var fR="ContextMenuPortal",Zx=n=>{const{__scopeContextMenu:a,...r}=n,i=nn(a);return p.jsx(QN,{...i,...r})};Zx.displayName=fR;var Wx="ContextMenuContent",Jx=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,...i}=n,s=Xx(Wx,r),u=nn(r),f=v.useRef(!1);return p.jsx(ZN,{...u,...i,ref:a,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:h=>{var m;(m=n.onCloseAutoFocus)==null||m.call(n,h),!h.defaultPrevented&&f.current&&h.preventDefault(),f.current=!1},onInteractOutside:h=>{var m;(m=n.onInteractOutside)==null||m.call(n,h),!h.defaultPrevented&&!s.modal&&(f.current=!0)},style:{...n.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Jx.displayName=Wx;var hR="ContextMenuGroup",mR=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,...i}=n,s=nn(r);return p.jsx(WN,{...s,...i,ref:a})});mR.displayName=hR;var pR="ContextMenuLabel",gR=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,...i}=n,s=nn(r);return p.jsx(JN,{...s,...i,ref:a})});gR.displayName=pR;var yR="ContextMenuItem",e1=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,...i}=n,s=nn(r);return p.jsx(eR,{...s,...i,ref:a})});e1.displayName=yR;var vR="ContextMenuCheckboxItem",bR=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,...i}=n,s=nn(r);return p.jsx(tR,{...s,...i,ref:a})});bR.displayName=vR;var xR="ContextMenuRadioGroup",SR=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,...i}=n,s=nn(r);return p.jsx(nR,{...s,...i,ref:a})});SR.displayName=xR;var wR="ContextMenuRadioItem",ER=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,...i}=n,s=nn(r);return p.jsx(oR,{...s,...i,ref:a})});ER.displayName=wR;var CR="ContextMenuItemIndicator",TR=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,...i}=n,s=nn(r);return p.jsx(aR,{...s,...i,ref:a})});TR.displayName=CR;var AR="ContextMenuSeparator",t1=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,...i}=n,s=nn(r);return p.jsx(rR,{...s,...i,ref:a})});t1.displayName=AR;var MR="ContextMenuArrow",_R=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,...i}=n,s=nn(r);return p.jsx(lR,{...s,...i,ref:a})});_R.displayName=MR;var n1="ContextMenuSub",o1=n=>{const{__scopeContextMenu:a,children:r,onOpenChange:i,open:s,defaultOpen:u}=n,f=nn(a),[h,m]=el({prop:s,defaultProp:u??!1,onChange:i,caller:n1});return p.jsx(iR,{...f,open:h,onOpenChange:m,children:r})};o1.displayName=n1;var NR="ContextMenuSubTrigger",a1=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,...i}=n,s=nn(r);return p.jsx(sR,{...s,...i,ref:a})});a1.displayName=NR;var RR="ContextMenuSubContent",r1=v.forwardRef((n,a)=>{const{__scopeContextMenu:r,...i}=n,s=nn(r);return p.jsx(cR,{...s,...i,ref:a,style:{...n.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});r1.displayName=RR;function Zs(n){return a=>a.pointerType!=="mouse"?n(a):void 0}var OR=Fx,DR=Qx,jR=Zx,zR=Jx,kR=e1,LR=t1,HR=o1,BR=a1,UR=r1;function Y0(n,[a,r]){return Math.min(r,Math.max(a,n))}var $c="Popover",[l1]=$o($c,[Da]),Ti=Da(),[IR,za]=l1($c),i1=n=>{const{__scopePopover:a,children:r,open:i,defaultOpen:s,onOpenChange:u,modal:f=!1}=n,h=Ti(a),m=v.useRef(null),[g,x]=v.useState(!1),[y,S]=el({prop:i,defaultProp:s??!1,onChange:u,caller:$c});return p.jsx(Bc,{...h,children:p.jsx(IR,{scope:a,contentId:po(),triggerRef:m,open:y,onOpenChange:S,onOpenToggle:v.useCallback(()=>S(A=>!A),[S]),hasCustomAnchor:g,onCustomAnchorAdd:v.useCallback(()=>x(!0),[]),onCustomAnchorRemove:v.useCallback(()=>x(!1),[]),modal:f,children:r})})};i1.displayName=$c;var s1="PopoverAnchor",PR=v.forwardRef((n,a)=>{const{__scopePopover:r,...i}=n,s=za(s1,r),u=Ti(r),{onCustomAnchorAdd:f,onCustomAnchorRemove:h}=s;return v.useEffect(()=>(f(),()=>h()),[f,h]),p.jsx(xi,{...u,...i,ref:a})});PR.displayName=s1;var c1="PopoverTrigger",u1=v.forwardRef((n,a)=>{const{__scopePopover:r,...i}=n,s=za(c1,r),u=Ti(r),f=nt(a,s.triggerRef),h=p.jsx(Ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":p1(s.open),...i,ref:f,onClick:be(n.onClick,s.onOpenToggle)});return s.hasCustomAnchor?h:p.jsx(xi,{asChild:!0,...u,children:h})});u1.displayName=c1;var Wh="PopoverPortal",[$R,GR]=l1(Wh,{forceMount:void 0}),d1=n=>{const{__scopePopover:a,forceMount:r,children:i,container:s}=n,u=za(Wh,a);return p.jsx($R,{scope:a,forceMount:r,children:p.jsx(no,{present:r||u.open,children:p.jsx(yi,{asChild:!0,container:s,children:i})})})};d1.displayName=Wh;var nl="PopoverContent",f1=v.forwardRef((n,a)=>{const r=GR(nl,n.__scopePopover),{forceMount:i=r.forceMount,...s}=n,u=za(nl,n.__scopePopover);return p.jsx(no,{present:i||u.open,children:u.modal?p.jsx(VR,{...s,ref:a}):p.jsx(qR,{...s,ref:a})})});f1.displayName=nl;var YR=Aa("PopoverContent.RemoveScroll"),VR=v.forwardRef((n,a)=>{const r=za(nl,n.__scopePopover),i=v.useRef(null),s=nt(a,i),u=v.useRef(!1);return v.useEffect(()=>{const f=i.current;if(f)return Dc(f)},[]),p.jsx(vi,{as:YR,allowPinchZoom:!0,children:p.jsx(h1,{...n,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(n.onCloseAutoFocus,f=>{var h;f.preventDefault(),u.current||(h=r.triggerRef.current)==null||h.focus()}),onPointerDownOutside:be(n.onPointerDownOutside,f=>{const h=f.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0,g=h.button===2||m;u.current=g},{checkForDefaultPrevented:!1}),onFocusOutside:be(n.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1})})})}),qR=v.forwardRef((n,a)=>{const r=za(nl,n.__scopePopover),i=v.useRef(!1),s=v.useRef(!1);return p.jsx(h1,{...n,ref:a,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{var f,h;(f=n.onCloseAutoFocus)==null||f.call(n,u),u.defaultPrevented||(i.current||(h=r.triggerRef.current)==null||h.focus(),u.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:u=>{var m,g;(m=n.onInteractOutside)==null||m.call(n,u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const f=u.target;((g=r.triggerRef.current)==null?void 0:g.contains(f))&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&s.current&&u.preventDefault()}})}),h1=v.forwardRef((n,a)=>{const{__scopePopover:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:x,...y}=n,S=za(nl,r),A=Ti(r);return Rc(),p.jsx(gi,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:u,children:p.jsx(ll,{asChild:!0,disableOutsidePointerEvents:f,onInteractOutside:x,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:g,onDismiss:()=>S.onOpenChange(!1),children:p.jsx(Uc,{"data-state":p1(S.open),role:"dialog",id:S.contentId,...A,...y,ref:a,style:{...y.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),m1="PopoverClose",XR=v.forwardRef((n,a)=>{const{__scopePopover:r,...i}=n,s=za(m1,r);return p.jsx(Ge.button,{type:"button",...i,ref:a,onClick:be(n.onClick,()=>s.onOpenChange(!1))})});XR.displayName=m1;var FR="PopoverArrow",KR=v.forwardRef((n,a)=>{const{__scopePopover:r,...i}=n,s=Ti(r);return p.jsx(Ic,{...s,...i,ref:a})});KR.displayName=FR;function p1(n){return n?"open":"closed"}var QR=i1,ZR=u1,WR=d1,JR=f1,e5=[" ","Enter","ArrowUp","ArrowDown"],t5=[" ","Enter"],rr="Select",[Gc,Yc,n5]=Rh(rr),[cl]=$o(rr,[n5,Da]),Vc=Da(),[o5,ka]=cl(rr),[a5,r5]=cl(rr),g1=n=>{const{__scopeSelect:a,children:r,open:i,defaultOpen:s,onOpenChange:u,value:f,defaultValue:h,onValueChange:m,dir:g,name:x,autoComplete:y,disabled:S,required:A,form:C}=n,E=Vc(a),[M,R]=v.useState(null),[j,B]=v.useState(null),[Y,te]=v.useState(!1),$=Oh(g),[q,z]=el({prop:i,defaultProp:s??!1,onChange:u,caller:rr}),[W,ie]=el({prop:f,defaultProp:h,onChange:m,caller:rr}),de=v.useRef(null),K=M?C||!!M.closest("form"):!0,[ae,fe]=v.useState(new Set),pe=Array.from(ae).map(T=>T.props.value).join(";");return p.jsx(Bc,{...E,children:p.jsxs(o5,{required:A,scope:a,trigger:M,onTriggerChange:R,valueNode:j,onValueNodeChange:B,valueNodeHasChildren:Y,onValueNodeHasChildrenChange:te,contentId:po(),value:W,onValueChange:ie,open:q,onOpenChange:z,dir:$,triggerPointerDownPosRef:de,disabled:S,children:[p.jsx(Gc.Provider,{scope:a,children:p.jsx(a5,{scope:n.__scopeSelect,onNativeOptionAdd:v.useCallback(T=>{fe(O=>new Set(O).add(T))},[]),onNativeOptionRemove:v.useCallback(T=>{fe(O=>{const N=new Set(O);return N.delete(T),N})},[]),children:r})}),K?p.jsxs(U1,{"aria-hidden":!0,required:A,tabIndex:-1,name:x,autoComplete:y,value:W,onChange:T=>ie(T.target.value),disabled:S,form:C,children:[W===void 0?p.jsx("option",{value:""}):null,Array.from(ae)]},pe):null]})})};g1.displayName=rr;var y1="SelectTrigger",v1=v.forwardRef((n,a)=>{const{__scopeSelect:r,disabled:i=!1,...s}=n,u=Vc(r),f=ka(y1,r),h=f.disabled||i,m=nt(a,f.onTriggerChange),g=Yc(r),x=v.useRef("touch"),[y,S,A]=P1(E=>{const M=g().filter(B=>!B.disabled),R=M.find(B=>B.value===f.value),j=$1(M,E,R);j!==void 0&&f.onValueChange(j.value)}),C=E=>{h||(f.onOpenChange(!0),A()),E&&(f.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return p.jsx(xi,{asChild:!0,...u,children:p.jsx(Ge.button,{type:"button",role:"combobox","aria-controls":f.contentId,"aria-expanded":f.open,"aria-required":f.required,"aria-autocomplete":"none",dir:f.dir,"data-state":f.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":I1(f.value)?"":void 0,...s,ref:m,onClick:be(s.onClick,E=>{E.currentTarget.focus(),x.current!=="mouse"&&C(E)}),onPointerDown:be(s.onPointerDown,E=>{x.current=E.pointerType;const M=E.target;M.hasPointerCapture(E.pointerId)&&M.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(C(E),E.preventDefault())}),onKeyDown:be(s.onKeyDown,E=>{const M=y.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&S(E.key),!(M&&E.key===" ")&&e5.includes(E.key)&&(C(),E.preventDefault())})})})});v1.displayName=y1;var b1="SelectValue",x1=v.forwardRef((n,a)=>{const{__scopeSelect:r,className:i,style:s,children:u,placeholder:f="",...h}=n,m=ka(b1,r),{onValueNodeHasChildrenChange:g}=m,x=u!==void 0,y=nt(a,m.onValueNodeChange);return tn(()=>{g(x)},[g,x]),p.jsx(Ge.span,{...h,ref:y,style:{pointerEvents:"none"},children:I1(m.value)?p.jsx(p.Fragment,{children:f}):u})});x1.displayName=b1;var l5="SelectIcon",S1=v.forwardRef((n,a)=>{const{__scopeSelect:r,children:i,...s}=n;return p.jsx(Ge.span,{"aria-hidden":!0,...s,ref:a,children:i||"▼"})});S1.displayName=l5;var i5="SelectPortal",w1=n=>p.jsx(yi,{asChild:!0,...n});w1.displayName=i5;var lr="SelectContent",E1=v.forwardRef((n,a)=>{const r=ka(lr,n.__scopeSelect),[i,s]=v.useState();if(tn(()=>{s(new DocumentFragment)},[]),!r.open){const u=i;return u?fi.createPortal(p.jsx(C1,{scope:n.__scopeSelect,children:p.jsx(Gc.Slot,{scope:n.__scopeSelect,children:p.jsx("div",{children:n.children})})}),u):null}return p.jsx(T1,{...n,ref:a})});E1.displayName=lr;var Jn=10,[C1,La]=cl(lr),s5="SelectContentImpl",c5=Aa("SelectContent.RemoveScroll"),T1=v.forwardRef((n,a)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:u,onPointerDownOutside:f,side:h,sideOffset:m,align:g,alignOffset:x,arrowPadding:y,collisionBoundary:S,collisionPadding:A,sticky:C,hideWhenDetached:E,avoidCollisions:M,...R}=n,j=ka(lr,r),[B,Y]=v.useState(null),[te,$]=v.useState(null),q=nt(a,ne=>Y(ne)),[z,W]=v.useState(null),[ie,de]=v.useState(null),K=Yc(r),[ae,fe]=v.useState(!1),pe=v.useRef(!1);v.useEffect(()=>{if(B)return Dc(B)},[B]),Rc();const T=v.useCallback(ne=>{const[V,...re]=K().map(ve=>ve.ref.current),[ye]=re.slice(-1),Se=document.activeElement;for(const ve of ne)if(ve===Se||(ve==null||ve.scrollIntoView({block:"nearest"}),ve===V&&te&&(te.scrollTop=0),ve===ye&&te&&(te.scrollTop=te.scrollHeight),ve==null||ve.focus(),document.activeElement!==Se))return},[K,te]),O=v.useCallback(()=>T([z,B]),[T,z,B]);v.useEffect(()=>{ae&&O()},[ae,O]);const{onOpenChange:N,triggerPointerDownPosRef:L}=j;v.useEffect(()=>{if(B){let ne={x:0,y:0};const V=ye=>{var Se,ve;ne={x:Math.abs(Math.round(ye.pageX)-(((Se=L.current)==null?void 0:Se.x)??0)),y:Math.abs(Math.round(ye.pageY)-(((ve=L.current)==null?void 0:ve.y)??0))}},re=ye=>{ne.x<=10&&ne.y<=10?ye.preventDefault():B.contains(ye.target)||N(!1),document.removeEventListener("pointermove",V),L.current=null};return L.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",re,{capture:!0})}}},[B,N,L]),v.useEffect(()=>{const ne=()=>N(!1);return window.addEventListener("blur",ne),window.addEventListener("resize",ne),()=>{window.removeEventListener("blur",ne),window.removeEventListener("resize",ne)}},[N]);const[D,_]=P1(ne=>{const V=K().filter(Se=>!Se.disabled),re=V.find(Se=>Se.ref.current===document.activeElement),ye=$1(V,ne,re);ye&&setTimeout(()=>ye.ref.current.focus())}),U=v.useCallback((ne,V,re)=>{const ye=!pe.current&&!re;(j.value!==void 0&&j.value===V||ye)&&(W(ne),ye&&(pe.current=!0))},[j.value]),H=v.useCallback(()=>B==null?void 0:B.focus(),[B]),P=v.useCallback((ne,V,re)=>{const ye=!pe.current&&!re;(j.value!==void 0&&j.value===V||ye)&&de(ne)},[j.value]),X=i==="popper"?ah:A1,J=X===ah?{side:h,sideOffset:m,align:g,alignOffset:x,arrowPadding:y,collisionBoundary:S,collisionPadding:A,sticky:C,hideWhenDetached:E,avoidCollisions:M}:{};return p.jsx(C1,{scope:r,content:B,viewport:te,onViewportChange:$,itemRefCallback:U,selectedItem:z,onItemLeave:H,itemTextRefCallback:P,focusSelectedItem:O,selectedItemText:ie,position:i,isPositioned:ae,searchRef:D,children:p.jsx(vi,{as:c5,allowPinchZoom:!0,children:p.jsx(gi,{asChild:!0,trapped:j.open,onMountAutoFocus:ne=>{ne.preventDefault()},onUnmountAutoFocus:be(s,ne=>{var V;(V=j.trigger)==null||V.focus({preventScroll:!0}),ne.preventDefault()}),children:p.jsx(ll,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:ne=>ne.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:p.jsx(X,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:ne=>ne.preventDefault(),...R,...J,onPlaced:()=>fe(!0),ref:q,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:be(R.onKeyDown,ne=>{const V=ne.ctrlKey||ne.altKey||ne.metaKey;if(ne.key==="Tab"&&ne.preventDefault(),!V&&ne.key.length===1&&_(ne.key),["ArrowUp","ArrowDown","Home","End"].includes(ne.key)){let ye=K().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(ne.key)&&(ye=ye.slice().reverse()),["ArrowUp","ArrowDown"].includes(ne.key)){const Se=ne.target,ve=ye.indexOf(Se);ye=ye.slice(ve+1)}setTimeout(()=>T(ye)),ne.preventDefault()}})})})})})})});T1.displayName=s5;var u5="SelectItemAlignedPosition",A1=v.forwardRef((n,a)=>{const{__scopeSelect:r,onPlaced:i,...s}=n,u=ka(lr,r),f=La(lr,r),[h,m]=v.useState(null),[g,x]=v.useState(null),y=nt(a,q=>x(q)),S=Yc(r),A=v.useRef(!1),C=v.useRef(!0),{viewport:E,selectedItem:M,selectedItemText:R,focusSelectedItem:j}=f,B=v.useCallback(()=>{if(u.trigger&&u.valueNode&&h&&g&&E&&M&&R){const q=u.trigger.getBoundingClientRect(),z=g.getBoundingClientRect(),W=u.valueNode.getBoundingClientRect(),ie=R.getBoundingClientRect();if(u.dir!=="rtl"){const Se=ie.left-z.left,ve=W.left-Se,De=q.left-ve,ke=q.width+De,_e=Math.max(ke,z.width),lt=window.innerWidth-Jn,ft=Y0(ve,[Jn,Math.max(Jn,lt-_e)]);h.style.minWidth=ke+"px",h.style.left=ft+"px"}else{const Se=z.right-ie.right,ve=window.innerWidth-W.right-Se,De=window.innerWidth-q.right-ve,ke=q.width+De,_e=Math.max(ke,z.width),lt=window.innerWidth-Jn,ft=Y0(ve,[Jn,Math.max(Jn,lt-_e)]);h.style.minWidth=ke+"px",h.style.right=ft+"px"}const de=S(),K=window.innerHeight-Jn*2,ae=E.scrollHeight,fe=window.getComputedStyle(g),pe=parseInt(fe.borderTopWidth,10),T=parseInt(fe.paddingTop,10),O=parseInt(fe.borderBottomWidth,10),N=parseInt(fe.paddingBottom,10),L=pe+T+ae+N+O,D=Math.min(M.offsetHeight*5,L),_=window.getComputedStyle(E),U=parseInt(_.paddingTop,10),H=parseInt(_.paddingBottom,10),P=q.top+q.height/2-Jn,X=K-P,J=M.offsetHeight/2,ne=M.offsetTop+J,V=pe+T+ne,re=L-V;if(V<=P){const Se=de.length>0&&M===de[de.length-1].ref.current;h.style.bottom="0px";const ve=g.clientHeight-E.offsetTop-E.offsetHeight,De=Math.max(X,J+(Se?H:0)+ve+O),ke=V+De;h.style.height=ke+"px"}else{const Se=de.length>0&&M===de[0].ref.current;h.style.top="0px";const De=Math.max(P,pe+E.offsetTop+(Se?U:0)+J)+re;h.style.height=De+"px",E.scrollTop=V-P+E.offsetTop}h.style.margin=`${Jn}px 0`,h.style.minHeight=D+"px",h.style.maxHeight=K+"px",i==null||i(),requestAnimationFrame(()=>A.current=!0)}},[S,u.trigger,u.valueNode,h,g,E,M,R,u.dir,i]);tn(()=>B(),[B]);const[Y,te]=v.useState();tn(()=>{g&&te(window.getComputedStyle(g).zIndex)},[g]);const $=v.useCallback(q=>{q&&C.current===!0&&(B(),j==null||j(),C.current=!1)},[B,j]);return p.jsx(f5,{scope:r,contentWrapper:h,shouldExpandOnScrollRef:A,onScrollButtonChange:$,children:p.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:Y},children:p.jsx(Ge.div,{...s,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});A1.displayName=u5;var d5="SelectPopperPosition",ah=v.forwardRef((n,a)=>{const{__scopeSelect:r,align:i="start",collisionPadding:s=Jn,...u}=n,f=Vc(r);return p.jsx(Uc,{...f,...u,ref:a,align:i,collisionPadding:s,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ah.displayName=d5;var[f5,Jh]=cl(lr,{}),rh="SelectViewport",M1=v.forwardRef((n,a)=>{const{__scopeSelect:r,nonce:i,...s}=n,u=La(rh,r),f=Jh(rh,r),h=nt(a,u.onViewportChange),m=v.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),p.jsx(Gc.Slot,{scope:r,children:p.jsx(Ge.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:be(s.onScroll,g=>{const x=g.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:S}=f;if(S!=null&&S.current&&y){const A=Math.abs(m.current-x.scrollTop);if(A>0){const C=window.innerHeight-Jn*2,E=parseFloat(y.style.minHeight),M=parseFloat(y.style.height),R=Math.max(E,M);if(R<C){const j=R+A,B=Math.min(C,j),Y=j-B;y.style.height=B+"px",y.style.bottom==="0px"&&(x.scrollTop=Y>0?Y:0,y.style.justifyContent="flex-end")}}}m.current=x.scrollTop})})})]})});M1.displayName=rh;var _1="SelectGroup",[h5,m5]=cl(_1),N1=v.forwardRef((n,a)=>{const{__scopeSelect:r,...i}=n,s=po();return p.jsx(h5,{scope:r,id:s,children:p.jsx(Ge.div,{role:"group","aria-labelledby":s,...i,ref:a})})});N1.displayName=_1;var R1="SelectLabel",p5=v.forwardRef((n,a)=>{const{__scopeSelect:r,...i}=n,s=m5(R1,r);return p.jsx(Ge.div,{id:s.id,...i,ref:a})});p5.displayName=R1;var Cc="SelectItem",[g5,O1]=cl(Cc),D1=v.forwardRef((n,a)=>{const{__scopeSelect:r,value:i,disabled:s=!1,textValue:u,...f}=n,h=ka(Cc,r),m=La(Cc,r),g=h.value===i,[x,y]=v.useState(u??""),[S,A]=v.useState(!1),C=nt(a,j=>{var B;return(B=m.itemRefCallback)==null?void 0:B.call(m,j,i,s)}),E=po(),M=v.useRef("touch"),R=()=>{s||(h.onValueChange(i),h.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(g5,{scope:r,value:i,disabled:s,textId:E,isSelected:g,onItemTextChange:v.useCallback(j=>{y(B=>B||((j==null?void 0:j.textContent)??"").trim())},[]),children:p.jsx(Gc.ItemSlot,{scope:r,value:i,disabled:s,textValue:x,children:p.jsx(Ge.div,{role:"option","aria-labelledby":E,"data-highlighted":S?"":void 0,"aria-selected":g&&S,"data-state":g?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...f,ref:C,onFocus:be(f.onFocus,()=>A(!0)),onBlur:be(f.onBlur,()=>A(!1)),onClick:be(f.onClick,()=>{M.current!=="mouse"&&R()}),onPointerUp:be(f.onPointerUp,()=>{M.current==="mouse"&&R()}),onPointerDown:be(f.onPointerDown,j=>{M.current=j.pointerType}),onPointerMove:be(f.onPointerMove,j=>{var B;M.current=j.pointerType,s?(B=m.onItemLeave)==null||B.call(m):M.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:be(f.onPointerLeave,j=>{var B;j.currentTarget===document.activeElement&&((B=m.onItemLeave)==null||B.call(m))}),onKeyDown:be(f.onKeyDown,j=>{var Y;((Y=m.searchRef)==null?void 0:Y.current)!==""&&j.key===" "||(t5.includes(j.key)&&R(),j.key===" "&&j.preventDefault())})})})})});D1.displayName=Cc;var ai="SelectItemText",j1=v.forwardRef((n,a)=>{const{__scopeSelect:r,className:i,style:s,...u}=n,f=ka(ai,r),h=La(ai,r),m=O1(ai,r),g=r5(ai,r),[x,y]=v.useState(null),S=nt(a,R=>y(R),m.onItemTextChange,R=>{var j;return(j=h.itemTextRefCallback)==null?void 0:j.call(h,R,m.value,m.disabled)}),A=x==null?void 0:x.textContent,C=v.useMemo(()=>p.jsx("option",{value:m.value,disabled:m.disabled,children:A},m.value),[m.disabled,m.value,A]),{onNativeOptionAdd:E,onNativeOptionRemove:M}=g;return tn(()=>(E(C),()=>M(C)),[E,M,C]),p.jsxs(p.Fragment,{children:[p.jsx(Ge.span,{id:m.textId,...u,ref:S}),m.isSelected&&f.valueNode&&!f.valueNodeHasChildren?fi.createPortal(u.children,f.valueNode):null]})});j1.displayName=ai;var z1="SelectItemIndicator",k1=v.forwardRef((n,a)=>{const{__scopeSelect:r,...i}=n;return O1(z1,r).isSelected?p.jsx(Ge.span,{"aria-hidden":!0,...i,ref:a}):null});k1.displayName=z1;var lh="SelectScrollUpButton",L1=v.forwardRef((n,a)=>{const r=La(lh,n.__scopeSelect),i=Jh(lh,n.__scopeSelect),[s,u]=v.useState(!1),f=nt(a,i.onScrollButtonChange);return tn(()=>{if(r.viewport&&r.isPositioned){let h=function(){const g=m.scrollTop>0;u(g)};const m=r.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[r.viewport,r.isPositioned]),s?p.jsx(B1,{...n,ref:f,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=r;h&&m&&(h.scrollTop=h.scrollTop-m.offsetHeight)}}):null});L1.displayName=lh;var ih="SelectScrollDownButton",H1=v.forwardRef((n,a)=>{const r=La(ih,n.__scopeSelect),i=Jh(ih,n.__scopeSelect),[s,u]=v.useState(!1),f=nt(a,i.onScrollButtonChange);return tn(()=>{if(r.viewport&&r.isPositioned){let h=function(){const g=m.scrollHeight-m.clientHeight,x=Math.ceil(m.scrollTop)<g;u(x)};const m=r.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[r.viewport,r.isPositioned]),s?p.jsx(B1,{...n,ref:f,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=r;h&&m&&(h.scrollTop=h.scrollTop+m.offsetHeight)}}):null});H1.displayName=ih;var B1=v.forwardRef((n,a)=>{const{__scopeSelect:r,onAutoScroll:i,...s}=n,u=La("SelectScrollButton",r),f=v.useRef(null),h=Yc(r),m=v.useCallback(()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null)},[]);return v.useEffect(()=>()=>m(),[m]),tn(()=>{var x;const g=h().find(y=>y.ref.current===document.activeElement);(x=g==null?void 0:g.ref.current)==null||x.scrollIntoView({block:"nearest"})},[h]),p.jsx(Ge.div,{"aria-hidden":!0,...s,ref:a,style:{flexShrink:0,...s.style},onPointerDown:be(s.onPointerDown,()=>{f.current===null&&(f.current=window.setInterval(i,50))}),onPointerMove:be(s.onPointerMove,()=>{var g;(g=u.onItemLeave)==null||g.call(u),f.current===null&&(f.current=window.setInterval(i,50))}),onPointerLeave:be(s.onPointerLeave,()=>{m()})})}),y5="SelectSeparator",v5=v.forwardRef((n,a)=>{const{__scopeSelect:r,...i}=n;return p.jsx(Ge.div,{"aria-hidden":!0,...i,ref:a})});v5.displayName=y5;var sh="SelectArrow",b5=v.forwardRef((n,a)=>{const{__scopeSelect:r,...i}=n,s=Vc(r),u=ka(sh,r),f=La(sh,r);return u.open&&f.position==="popper"?p.jsx(Ic,{...s,...i,ref:a}):null});b5.displayName=sh;var x5="SelectBubbleInput",U1=v.forwardRef(({__scopeSelect:n,value:a,...r},i)=>{const s=v.useRef(null),u=nt(i,s),f=KM(a);return v.useEffect(()=>{const h=s.current;if(!h)return;const m=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(m,"value").set;if(f!==a&&x){const y=new Event("change",{bubbles:!0});x.call(h,a),h.dispatchEvent(y)}},[f,a]),p.jsx(Ge.select,{...r,style:{...Sb,...r.style},ref:u,defaultValue:a})});U1.displayName=x5;function I1(n){return n===""||n===void 0}function P1(n){const a=Fn(n),r=v.useRef(""),i=v.useRef(0),s=v.useCallback(f=>{const h=r.current+f;a(h),(function m(g){r.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>m(""),1e3))})(h)},[a]),u=v.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,s,u]}function $1(n,a,r){const s=a.length>1&&Array.from(a).every(g=>g===a[0])?a[0]:a,u=r?n.indexOf(r):-1;let f=S5(n,Math.max(u,0));s.length===1&&(f=f.filter(g=>g!==r));const m=f.find(g=>g.textValue.toLowerCase().startsWith(s.toLowerCase()));return m!==r?m:void 0}function S5(n,a){return n.map((r,i)=>n[(a+i)%n.length])}var w5=g1,E5=v1,C5=x1,T5=S1,A5=w1,M5=E1,_5=M1,N5=N1,R5=D1,O5=j1,D5=k1,j5=L1,z5=H1,k5="Separator",V0="horizontal",L5=["horizontal","vertical"],G1=v.forwardRef((n,a)=>{const{decorative:r,orientation:i=V0,...s}=n,u=H5(i)?i:V0,h=r?{role:"none"}:{"aria-orientation":u==="vertical"?u:void 0,role:"separator"};return p.jsx(Ge.div,{"data-orientation":u,...h,...s,ref:a})});G1.displayName=k5;function H5(n){return L5.includes(n)}var B5=G1,[qc]=$o("Tooltip",[Da]),em=Da(),Y1="TooltipProvider",U5=700,q0="tooltip.open",[I5,V1]=qc(Y1),q1=n=>{const{__scopeTooltip:a,delayDuration:r=U5,skipDelayDuration:i=300,disableHoverableContent:s=!1,children:u}=n,f=v.useRef(!0),h=v.useRef(!1),m=v.useRef(0);return v.useEffect(()=>{const g=m.current;return()=>window.clearTimeout(g)},[]),p.jsx(I5,{scope:a,isOpenDelayedRef:f,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(m.current),f.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>f.current=!0,i)},[i]),isPointerInTransitRef:h,onPointerInTransitChange:v.useCallback(g=>{h.current=g},[]),disableHoverableContent:s,children:u})};q1.displayName=Y1;var X1="Tooltip",[wj,Xc]=qc(X1),ch="TooltipTrigger",P5=v.forwardRef((n,a)=>{const{__scopeTooltip:r,...i}=n,s=Xc(ch,r),u=V1(ch,r),f=em(r),h=v.useRef(null),m=nt(a,h,s.onTriggerChange),g=v.useRef(!1),x=v.useRef(!1),y=v.useCallback(()=>g.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),p.jsx(xi,{asChild:!0,...f,children:p.jsx(Ge.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...i,ref:m,onPointerMove:be(n.onPointerMove,S=>{S.pointerType!=="touch"&&!x.current&&!u.isPointerInTransitRef.current&&(s.onTriggerEnter(),x.current=!0)}),onPointerLeave:be(n.onPointerLeave,()=>{s.onTriggerLeave(),x.current=!1}),onPointerDown:be(n.onPointerDown,()=>{s.open&&s.onClose(),g.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:be(n.onFocus,()=>{g.current||s.onOpen()}),onBlur:be(n.onBlur,s.onClose),onClick:be(n.onClick,s.onClose)})})});P5.displayName=ch;var $5="TooltipPortal",[Ej,G5]=qc($5,{forceMount:void 0}),ol="TooltipContent",Y5=v.forwardRef((n,a)=>{const r=G5(ol,n.__scopeTooltip),{forceMount:i=r.forceMount,side:s="top",...u}=n,f=Xc(ol,n.__scopeTooltip);return p.jsx(no,{present:i||f.open,children:f.disableHoverableContent?p.jsx(F1,{side:s,...u,ref:a}):p.jsx(V5,{side:s,...u,ref:a})})}),V5=v.forwardRef((n,a)=>{const r=Xc(ol,n.__scopeTooltip),i=V1(ol,n.__scopeTooltip),s=v.useRef(null),u=nt(a,s),[f,h]=v.useState(null),{trigger:m,onClose:g}=r,x=s.current,{onPointerInTransitChange:y}=i,S=v.useCallback(()=>{h(null),y(!1)},[y]),A=v.useCallback((C,E)=>{const M=C.currentTarget,R={x:C.clientX,y:C.clientY},j=Q5(R,M.getBoundingClientRect()),B=Z5(R,j),Y=W5(E.getBoundingClientRect()),te=eO([...B,...Y]);h(te),y(!0)},[y]);return v.useEffect(()=>()=>S(),[S]),v.useEffect(()=>{if(m&&x){const C=M=>A(M,x),E=M=>A(M,m);return m.addEventListener("pointerleave",C),x.addEventListener("pointerleave",E),()=>{m.removeEventListener("pointerleave",C),x.removeEventListener("pointerleave",E)}}},[m,x,A,S]),v.useEffect(()=>{if(f){const C=E=>{const M=E.target,R={x:E.clientX,y:E.clientY},j=(m==null?void 0:m.contains(M))||(x==null?void 0:x.contains(M)),B=!J5(R,f);j?S():B&&(S(),g())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[m,x,f,g,S]),p.jsx(F1,{...n,ref:u})}),[q5,X5]=qc(X1,{isInside:!1}),F5=hA("TooltipContent"),F1=v.forwardRef((n,a)=>{const{__scopeTooltip:r,children:i,"aria-label":s,onEscapeKeyDown:u,onPointerDownOutside:f,...h}=n,m=Xc(ol,r),g=em(r),{onClose:x}=m;return v.useEffect(()=>(document.addEventListener(q0,x),()=>document.removeEventListener(q0,x)),[x]),v.useEffect(()=>{if(m.trigger){const y=S=>{const A=S.target;A!=null&&A.contains(m.trigger)&&x()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[m.trigger,x]),p.jsx(ll,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:y=>y.preventDefault(),onDismiss:x,children:p.jsxs(Uc,{"data-state":m.stateAttribute,...g,...h,ref:a,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(F5,{children:i}),p.jsx(q5,{scope:r,isInside:!0,children:p.jsx(bA,{id:m.contentId,role:"tooltip",children:s||i})})]})})});Y5.displayName=ol;var K1="TooltipArrow",K5=v.forwardRef((n,a)=>{const{__scopeTooltip:r,...i}=n,s=em(r);return X5(K1,r).isInside?null:p.jsx(Ic,{...s,...i,ref:a})});K5.displayName=K1;function Q5(n,a){const r=Math.abs(a.top-n.y),i=Math.abs(a.bottom-n.y),s=Math.abs(a.right-n.x),u=Math.abs(a.left-n.x);switch(Math.min(r,i,s,u)){case u:return"left";case s:return"right";case r:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function Z5(n,a,r=5){const i=[];switch(a){case"top":i.push({x:n.x-r,y:n.y+r},{x:n.x+r,y:n.y+r});break;case"bottom":i.push({x:n.x-r,y:n.y-r},{x:n.x+r,y:n.y-r});break;case"left":i.push({x:n.x+r,y:n.y-r},{x:n.x+r,y:n.y+r});break;case"right":i.push({x:n.x-r,y:n.y-r},{x:n.x-r,y:n.y+r});break}return i}function W5(n){const{top:a,right:r,bottom:i,left:s}=n;return[{x:s,y:a},{x:r,y:a},{x:r,y:i},{x:s,y:i}]}function J5(n,a){const{x:r,y:i}=n;let s=!1;for(let u=0,f=a.length-1;u<a.length;f=u++){const h=a[u],m=a[f],g=h.x,x=h.y,y=m.x,S=m.y;x>i!=S>i&&r<(y-g)*(i-x)/(S-x)+g&&(s=!s)}return s}function eO(n){const a=n.slice();return a.sort((r,i)=>r.x<i.x?-1:r.x>i.x?1:r.y<i.y?-1:r.y>i.y?1:0),tO(a)}function tO(n){if(n.length<=1)return n.slice();const a=[];for(let i=0;i<n.length;i++){const s=n[i];for(;a.length>=2;){const u=a[a.length-1],f=a[a.length-2];if((u.x-f.x)*(s.y-f.y)>=(u.y-f.y)*(s.x-f.x))a.pop();else break}a.push(s)}a.pop();const r=[];for(let i=n.length-1;i>=0;i--){const s=n[i];for(;r.length>=2;){const u=r[r.length-1],f=r[r.length-2];if((u.x-f.x)*(s.y-f.y)>=(u.y-f.y)*(s.x-f.x))r.pop();else break}r.push(s)}return r.pop(),a.length===1&&r.length===1&&a[0].x===r[0].x&&a[0].y===r[0].y?a:a.concat(r)}var nO=q1;const oO=uA("inline-flex shrink-0 items-center justify-center gap-1.5 rounded-md text-[13px] font-medium whitespace-nowrap transition-colors outline-none focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",{variants:{variant:{default:"bg-foreground text-background hover:bg-foreground/85",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20",outline:"border border-foreground/[0.08] bg-white text-foreground/70 shadow-none hover:bg-foreground/[0.04] hover:text-foreground",secondary:"bg-foreground/[0.06] text-foreground hover:bg-foreground/[0.08]",ghost:"text-foreground/70 hover:bg-foreground/[0.04] hover:text-foreground",link:"text-foreground underline-offset-4 hover:underline"},size:{default:"h-8 px-3 py-1.5 has-[>svg]:px-2.5",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1 rounded-md px-2 has-[>svg]:px-2",lg:"h-10 rounded-md px-4 has-[>svg]:px-3",icon:"size-8","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Kt({className:n,variant:a="default",size:r="default",asChild:i=!1,...s}){const u=i?dA:"button";return p.jsx(u,{"data-slot":"button","data-variant":a,"data-size":r,className:Be(oO({variant:a,size:r,className:n})),...s})}function aO({slides:n,startSlideId:a,onExit:r}){const i=v.useMemo(()=>{const V=n.findIndex(re=>re.id===a);return V>=0?V:0},[n,a]),[s,u]=v.useState(i),[f,h]=v.useState("none"),[m,g]=v.useState("#F59E0B"),[x,y]=v.useState(!1),[S,A]=v.useState([]),[C,E]=v.useState({x:-100,y:-100}),[M,R]=v.useState(!!document.fullscreenElement),[j,B]=v.useState(()=>({height:window.innerHeight,width:window.innerWidth})),Y=v.useRef(null),te=v.useRef(null),$=v.useRef(null),q=v.useRef(0),z=v.useRef(s),W=v.useMemo(()=>PE(n),[n]),ie=W[Math.min(s,W.length-1)]??null;v.useEffect(()=>{const V=W.findIndex(re=>re.id===a);u(V>=0?V:0)},[W,a]),v.useEffect(()=>{const V=W.findIndex(re=>re.id===(ie==null?void 0:ie.id));V>=0&&V!==s&&u(V)},[s,ie==null?void 0:ie.id,W]),v.useEffect(()=>()=>{$.current&&window.clearTimeout($.current)},[]),v.useEffect(()=>{const V=()=>{R(!!document.fullscreenElement),B({height:window.innerHeight,width:window.innerWidth})};return window.addEventListener("resize",V),document.addEventListener("fullscreenchange",V),()=>{window.removeEventListener("resize",V),document.removeEventListener("fullscreenchange",V)}},[]);const de=v.useCallback(()=>{y(!0),$.current&&window.clearTimeout($.current),$.current=window.setTimeout(()=>{y(!1)},1500)},[]);function K(V){h(re=>re===V?"none":V)}const ae=v.useCallback(()=>{A([]),te.current=null},[]);function fe(V){h("none"),u($E(V,W.length)),ae()}function pe(){fe(s+1)}function T(){var re;const V=document.documentElement;if(document.fullscreenElement){(re=document.exitFullscreen)==null||re.call(document);return}V.requestFullscreen&&V.requestFullscreen()}function O(V){return V.clientY>=window.innerHeight-96}function N(V){if(O(V)&&de(),f==="laser"&&E({x:V.clientX,y:V.clientY}),f==="pen"&&te.current){const re=Y.current,ye=re==null?void 0:re.getBoundingClientRect();if(re&&ye){const Se=Math.min(Math.max(V.clientX-ye.left,0),ye.width)/H,ve=Math.min(Math.max(V.clientY-ye.top,0),ye.height)/H,De={...te.current,points:`${te.current.points} L ${Se.toFixed(1)} ${ve.toFixed(1)}`};te.current=De,A(ke=>[...ke.slice(0,-1),De])}}}function L(V){U(),!(f!=="none"||!Y.current||!(V.target instanceof Node))&&Y.current.contains(V.target)&&pe()}function D(V){if(f!=="none"||Math.abs(V.deltaY)<Math.abs(V.deltaX)||V.deltaY<=8)return;const re=Date.now();re-q.current<360||(q.current=re,V.preventDefault(),pe())}function _(V){if(f!=="pen"||!Y.current||!(V.target instanceof Node)||!Y.current.contains(V.target))return;const re=Y.current.getBoundingClientRect();if(!(V.clientX>=re.left&&V.clientX<=re.right&&V.clientY>=re.top&&V.clientY<=re.bottom))return;const Se=Math.min(Math.max(V.clientX-re.left,0),re.width)/H,ve=Math.min(Math.max(V.clientY-re.top,0),re.height)/H,De={color:m,points:`M ${Se.toFixed(1)} ${ve.toFixed(1)}`};te.current=De,A(ke=>[...ke,De])}function U(){te.current=null}if(v.useEffect(()=>{z.current!==s&&(z.current=s,ae())},[s,ae]),v.useEffect(()=>{const V=re=>{if(re.key==="Escape"){if(f==="pen"){h("none"),ae(),de();return}r();return}(re.key==="ArrowRight"||re.key==="ArrowDown"||re.key==="PageDown")&&(h("none"),u(ye=>Math.min(ye+1,W.length-1))),(re.key==="ArrowLeft"||re.key==="ArrowUp"||re.key==="PageUp")&&(h("none"),u(ye=>Math.max(ye-1,0)))};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[ae,r,W.length,de,f]),v.useEffect(()=>{var re;if(!ie)return;const V=(re=Y.current)==null?void 0:re.querySelector("[data-testid='presenter-slide-iframe']");V&&(V.srcdoc=ie.htmlSource)},[ie]),!ie)return null;const H=Math.min(j.width/ie.width,j.height/ie.height),P=Math.max(320,Math.floor(ie.width*H)),X=Math.max(240,Math.floor(ie.height*H)),J=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6' fill='${encodeURIComponent(m)}' stroke='%23111827' stroke-width='2'/%3E%3C/svg%3E") 12 12, auto`,ne=f==="laser"?"none":f==="pen"?J:"default";return p.jsxs("main",{className:"fixed inset-0 z-50 overflow-hidden bg-[#111]","data-testid":"presenter-view",style:{cursor:ne},onPointerMove:N,onPointerDown:_,onPointerUp:L,onPointerLeave:U,onWheel:D,children:[p.jsxs("div",{ref:Y,className:"absolute left-1/2 top-1/2 overflow-hidden bg-white shadow-[0_18px_70px_rgba(0,0,0,0.42)]","data-testid":"presenter-slide-frame",style:{width:`${P}px`,height:`${X}px`,transform:"translate(-50%, -50%)"},children:[p.jsx("iframe",{title:"Presented slide",className:"pointer-events-none block border-0 bg-white","data-testid":"presenter-slide-iframe",style:{width:`${ie.width}px`,height:`${ie.height}px`,transform:`scale(${H})`,transformOrigin:"top left"}}),p.jsx("svg",{className:"pointer-events-none absolute inset-0 h-full w-full overflow-visible","data-testid":"presenter-ink-layer","aria-hidden":"true",viewBox:`0 0 ${ie.width} ${ie.height}`,children:S.map((V,re)=>p.jsx("path",{d:V.points,fill:"none",stroke:V.color,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4},`${V.color}-${re}`))})]}),p.jsx("div",{className:"pointer-events-none fixed left-0 top-0 size-4 rounded-full bg-[#f7ff2a] shadow-[0_0_0_1px_rgba(17,24,39,0.85),0_0_14px_rgba(247,255,42,0.9),0_0_24px_rgba(34,211,238,0.65)]","data-testid":"presenter-laser-cursor",style:{opacity:f==="laser"?1:0,transform:`translate(${C.x}px, ${C.y}px) translate(-50%, -50%)`}}),f==="pen"?p.jsx("div",{className:"absolute bottom-[78px] left-1/2 z-20 flex -translate-x-1/2 items-center gap-2 rounded-md border border-white/15 bg-[#111]/90 px-2 py-2 shadow-[0_14px_44px_rgba(0,0,0,0.32)] backdrop-blur-lg","data-testid":"presenter-pen-colors","aria-label":"Pen colors",children:IE.map(V=>p.jsx("button",{type:"button","aria-label":`Use pen color ${V}`,className:"size-7 rounded-full border border-white/25 shadow-[0_0_0_1px_rgba(0,0,0,0.25)] transition-transform hover:scale-105",style:{background:V,outline:m===V?"2px solid rgba(255,255,255,0.9)":"none",outlineOffset:"2px"},onClick:()=>g(V)},V))}):null,p.jsxs("nav",{className:"absolute bottom-6 left-1/2 z-20 flex h-11 -translate-x-1/2 items-center gap-2 rounded-md border border-white/15 bg-[#111]/90 px-2 py-1.5 text-white shadow-[0_18px_52px_rgba(0,0,0,0.38)] backdrop-blur-lg transition-[opacity,transform] duration-150 data-[visible=false]:translate-y-3 data-[visible=false]:opacity-0 data-[visible=false]:pointer-events-none","data-testid":"presenter-toolbar","data-visible":x?"true":"false",onPointerEnter:de,onPointerMove:de,children:[p.jsx(Kt,{variant:"ghost",size:"sm","aria-label":"Previous slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>fe(s-1),disabled:s===0,children:"Prev"}),p.jsxs("span",{className:"min-w-14 text-center text-[12px] font-semibold text-white/80",children:[s+1," / ",W.length]}),p.jsx(Kt,{variant:"ghost",size:"sm","aria-label":"Next slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>fe(s+1),disabled:s>=W.length-1,children:"Next"}),p.jsx("span",{className:"h-5 w-px bg-white/15"}),p.jsxs(Kt,{variant:f==="laser"?"secondary":"ghost",size:"sm","aria-label":"Laser pointer",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>K("laser"),"aria-pressed":f==="laser",children:[p.jsx(yT,{className:"size-3.5"}),"Laser"]}),p.jsxs(Kt,{variant:f==="pen"?"secondary":"ghost",size:"sm","aria-label":"Pen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>K("pen"),"aria-pressed":f==="pen",children:[p.jsx(VC,{className:"size-3.5"}),"Pen"]}),p.jsxs(Kt,{variant:"ghost",size:"sm","aria-label":M?"Exit fullscreen":"Enter fullscreen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:T,children:[p.jsx(PC,{className:"size-3.5"}),M?"Window":"Fullscreen"]}),p.jsx("span",{className:"h-5 w-px bg-white/15"}),p.jsxs(Kt,{variant:"ghost",size:"sm","aria-label":"Exit presentation",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:r,children:[p.jsx(Ah,{className:"size-3.5"}),"Exit"]})]})]})}function Q1({...n}){return p.jsx(OR,{"data-slot":"context-menu",...n})}function Z1({...n}){return p.jsx(DR,{"data-slot":"context-menu-trigger",...n})}function Cf({...n}){return p.jsx(HR,{"data-slot":"context-menu-sub",...n})}function Tf({className:n,inset:a,children:r,...i}){return p.jsxs(BR,{"data-slot":"context-menu-sub-trigger","data-inset":a,className:Be("flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-[13px] outline-hidden focus:bg-foreground/[0.04] data-[state=open]:bg-foreground/[0.04] data-[inset=true]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",n),...i,children:[r,p.jsx(dC,{className:"ml-auto size-3.5 text-foreground/40"})]})}function Af({className:n,...a}){return p.jsx(UR,{"data-slot":"context-menu-sub-content",className:Be("z-50 min-w-44 rounded-md border border-foreground/[0.08] bg-white p-1.5 text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",n),...a})}function W1({className:n,...a}){return p.jsx(jR,{children:p.jsx(zR,{"data-slot":"context-menu-content",className:Be("z-50 min-w-48 rounded-md border border-foreground/[0.08] bg-white p-1.5 text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",n),...a})})}function Ct({className:n,inset:a,variant:r="default",...i}){return p.jsx(kR,{"data-slot":"context-menu-item","data-inset":a,"data-variant":r,className:Be("relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-[13px] text-foreground/75 outline-hidden transition-colors focus:bg-foreground/[0.04] focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-45 data-[inset=true]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",n),...i})}function Tc({className:n,...a}){return p.jsx(LR,{"data-slot":"context-menu-separator",className:Be("-mx-1 my-1 h-px bg-foreground/10",n),...a})}function X0({className:n,...a}){return p.jsx("span",{"data-slot":"context-menu-shortcut",className:Be("ml-auto text-[11px] tracking-normal text-foreground/40",n),...a})}function Wr({className:n,type:a,...r}){return p.jsx("input",{type:a,"data-slot":"input",className:Be("h-8 w-full min-w-0 rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 py-1 text-sm shadow-none transition-colors outline-none selection:bg-foreground selection:text-background file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-foreground/35 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50","hover:bg-foreground/[0.04] focus-visible:border-foreground/20 focus-visible:bg-white focus-visible:ring-[2px] focus-visible:ring-ring/35","aria-invalid:border-destructive aria-invalid:ring-destructive/20",n),...r})}function rO({slides:n,activeSlideId:a,slideCount:r,thumbnails:i,onSelectSlide:s,onAdd:u,onAddSlideAbove:f,onAddSlideBelow:h,onDuplicate:m,onDelete:g,onToggleHidden:x,onRename:y,onReorder:S}){const[A,C]=v.useState(null),[E,M]=v.useState(null),[R,j]=v.useState(null),[B,Y]=v.useState(""),te=A?n.findIndex(K=>K.id===A):-1,$=R?n.find(K=>K.id===R):null,q=v.useCallback(K=>{K==null||K.scrollIntoView({block:"nearest",inline:"nearest"})},[]),z=v.useCallback((K,ae)=>{if(!K||ae===null){C(null),M(null);return}const fe=n.findIndex(pe=>pe.id===K);fe>=0&&fe!==ae&&(S==null||S(K,ae)),C(null),M(null)},[S,n]),W=v.useCallback(K=>{j(K.id),Y(K.title||"Untitled Slide"),s(K.id)},[s]),ie=v.useCallback(()=>{j(null),Y("")},[]),de=v.useCallback(()=>{R&&(y==null||y(R,B),ie())},[ie,y,R,B]);return p.jsxs(p.Fragment,{children:[p.jsx("aside",{className:"flex h-[calc(100vh-3.5rem)] w-[212px] shrink-0 flex-col border-r border-foreground/[0.06] bg-white","data-testid":"slide-sidebar",children:p.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col","data-testid":"slide-sidebar-panel",children:[p.jsxs("div",{className:"flex h-10 items-center justify-between border-b border-foreground/[0.06] px-3",children:[p.jsxs("div",{className:"text-[11px] font-medium uppercase tracking-wider text-foreground/50","data-testid":"slide-count",children:[p.jsx("span",{className:"tabular-nums",children:r})," slides"]}),p.jsx("button",{onClick:u,className:"flex size-7 items-center justify-center rounded-md text-foreground/50 transition-colors hover:bg-foreground/[0.06] hover:text-foreground",type:"button",title:"Add slide","aria-label":"Add slide",children:p.jsx(ii,{className:"size-3.5"})})]}),p.jsx("div",{className:"min-h-0 flex-1 space-y-2.5 overflow-y-auto px-2 py-2.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden","data-testid":"slide-list",children:n.map((K,ae)=>{const fe=K.id===a,pe=K.hidden===!0,T=K.id===A,O=te>=0&&E===ae&&ae<te&&A!==K.id,N=te>=0&&E===ae&&ae>te&&A!==K.id;return p.jsxs(Q1,{children:[p.jsx(Z1,{asChild:!0,children:p.jsxs("div",{draggable:!0,onDragStart:L=>{C(K.id),M(ae),L.dataTransfer.effectAllowed="move",L.dataTransfer.setData("text/plain",K.id)},onDragOver:L=>{L.preventDefault(),L.dataTransfer.dropEffect="move",M(ae)},onDrop:L=>{L.preventDefault(),L.stopPropagation();const D=L.dataTransfer.getData("text/plain")||A;z(D,ae)},onDragEnd:()=>{C(null),M(null)},className:Be("group relative flex cursor-grab items-stretch gap-1.5 rounded-lg active:cursor-grabbing",T&&"opacity-60"),"data-testid":"slide-card",children:[O?p.jsx(F0,{}):null,p.jsx("div",{className:Be("flex w-5 items-start justify-center pt-2 text-[11px] font-semibold tabular-nums transition-colors",fe?"text-foreground":"text-foreground/55 group-hover:text-foreground/75"),children:ae+1}),p.jsxs("div",{className:Be("relative flex-1 overflow-hidden rounded-lg ring-1 ring-inset transition-all",fe?"shadow-[0_0_0_2px_var(--background),0_0_0_3px_var(--foreground)] ring-foreground":"ring-foreground/30 shadow-[0_0_0_1px_rgba(0,0,0,0.05),0_1px_3px_rgba(0,0,0,0.04)] hover:ring-foreground/45",pe&&"opacity-40"),children:[p.jsx("button",{ref:fe?q:null,className:"block w-full text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",onClick:()=>s(K.id),type:"button","aria-label":`Slide ${ae+1}`,"aria-current":fe?"true":void 0,children:p.jsxs("div",{className:"relative aspect-[16/9] w-full bg-white","data-testid":"slide-thumbnail",children:[i[K.id]?p.jsx("img",{alt:`Slide ${ae+1}`,className:"absolute inset-0 block size-full object-cover",src:i[K.id]}):p.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/20",children:["Slide ",ae+1]}),pe?p.jsx("div",{className:"absolute left-1 top-1 flex size-4 items-center justify-center rounded bg-foreground/80 text-background","data-testid":"slide-hidden-indicator",children:p.jsx(c0,{className:"size-2.5"})}):null]})}),p.jsx("div",{className:"h-6 border-t border-foreground/[0.04] bg-white",children:p.jsx("button",{className:"h-full w-full truncate rounded-b-lg px-2 text-left text-[11px] text-foreground/60 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring",type:"button",onClick:()=>s(K.id),onDoubleClick:()=>W(K),"aria-label":`Slide title: ${K.title||"Untitled Slide"}`,children:K.title||"Untitled Slide"})})]}),N?p.jsx(F0,{position:"after"}):null]})}),p.jsxs(W1,{"aria-label":"Slide actions",className:"min-w-36",children:[p.jsxs(Ct,{onSelect:()=>f==null?void 0:f(K.id),children:[p.jsx(ii,{className:"size-3.5"}),"Add Slide Above"]}),p.jsxs(Ct,{onSelect:()=>h==null?void 0:h(K.id),children:[p.jsx(ii,{className:"size-3.5"}),"Add Slide Below"]}),p.jsx(Tc,{}),p.jsxs(Ct,{onSelect:()=>m==null?void 0:m(K.id),children:[p.jsx(Kv,{className:"size-3.5"}),"Duplicate"]}),p.jsxs(Ct,{onSelect:()=>W(K),children:[p.jsx(XC,{className:"size-3.5"}),"Rename"]}),p.jsxs(Ct,{onSelect:()=>x==null?void 0:x(K.id),children:[pe?p.jsx(Qv,{className:"size-3.5"}):p.jsx(c0,{className:"size-3.5"}),pe?"Show":"Hide"]}),p.jsx(Tc,{}),p.jsxs(Ct,{disabled:n.length<=1,variant:"destructive",onSelect:()=>g==null?void 0:g(K.id),children:[p.jsx(nb,{className:"size-3.5"}),"Delete"]})]})]},K.id)})})]})}),$?p.jsx(lO,{draft:B,slideTitle:$.title||"Untitled Slide",onCancel:ie,onChange:Y,onSave:de}):null]})}function lO({draft:n,slideTitle:a,onCancel:r,onChange:i,onSave:s}){const u=v.useRef(null);return v.useEffect(()=>{const f=window.requestAnimationFrame(()=>{var m,g;(m=u.current)==null||m.focus(),(g=u.current)==null||g.select()}),h=m=>{m.key==="Escape"&&r()};return document.addEventListener("keydown",h),()=>{window.cancelAnimationFrame(f),document.removeEventListener("keydown",h)}},[r]),p.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-foreground/20 px-4",onMouseDown:f=>{f.target===f.currentTarget&&r()},children:p.jsx("dialog",{open:!0,"aria-modal":"true","aria-labelledby":"rename-slide-title",className:"relative m-0 w-full max-w-[420px] overflow-hidden rounded-lg border border-foreground/[0.08] bg-white p-0 shadow-[0_24px_80px_rgba(0,0,0,0.18)]","data-testid":"rename-slide-dialog",children:p.jsxs("form",{onSubmit:f=>{f.preventDefault(),s()},children:[p.jsxs("div",{className:"border-b border-foreground/[0.08] px-4 py-3",children:[p.jsx("h2",{id:"rename-slide-title",className:"text-[14px] font-semibold text-foreground",children:"Rename slide"}),p.jsx("p",{className:"mt-0.5 truncate text-[11px] text-foreground/50",children:a})]}),p.jsxs("div",{className:"space-y-2 px-4 py-4",children:[p.jsx("label",{htmlFor:"rename-slide-input",className:"text-[12px] font-medium text-foreground",children:"Slide name"}),p.jsx(Wr,{ref:u,id:"rename-slide-input",value:n,onChange:f=>i(f.target.value)})]}),p.jsxs("div",{className:"flex justify-end gap-2 border-t border-foreground/[0.08] px-4 py-3",children:[p.jsx(Kt,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),p.jsx(Kt,{type:"submit",children:"Save"})]})]})})})}function F0({position:n="before"}){return p.jsxs("div",{className:Be("pointer-events-none absolute left-6 right-1 z-10 flex h-3 items-center",n==="before"?"-top-[11px]":"-bottom-[11px]"),"data-testid":"slide-insertion-marker",children:[p.jsx("span",{className:"size-2 rounded-full bg-foreground/55"}),p.jsx("span",{className:"h-0.5 flex-1 rounded-full bg-foreground/55"})]})}const iO=18,sO=6,Ws=24,Js="#ef4444",Ac=40,K0=12,Q0=360;function Fr(n,a,r,i,s){return Math.max(n,r)-Math.min(a,i)<=s}function cO({selectionBounds:n,snapGuides:a,resizeHandles:r,rotationHandle:i,onResizeHandleMouseDown:s,onRotateHandleMouseDown:u}){const f="absolute z-[5] size-[13px] -translate-x-1/2 -translate-y-1/2 cursor-pointer rounded-full border border-white bg-foreground shadow-[0_2px_8px_rgba(0,0,0,0.16)] transition-colors before:absolute before:inset-[3px] before:rounded-full before:bg-white/90 hover:bg-foreground/80";return p.jsxs(p.Fragment,{children:[a.map((h,m)=>{const g=h.variant==="spacing"?"2px":"1px",x=14,y=h.variant==="spacing"?2:1,S=h.orientation==="vertical",A=S?{left:`${h.start.x}px`,top:`${Math.min(h.start.y,h.end.y)}px`,width:"0",height:`${Math.max(Math.abs(h.end.y-h.start.y),32)}px`,borderLeftWidth:g,borderLeftStyle:"solid",borderLeftColor:Js,opacity:h.variant==="spacing"?.9:.82}:{left:`${Math.min(h.start.x,h.end.x)}px`,top:`${h.start.y}px`,width:`${Math.max(Math.abs(h.end.x-h.start.x),32)}px`,height:"0",borderTopWidth:g,borderTopStyle:"solid",borderTopColor:Js,opacity:h.variant==="spacing"?.9:.82},C=S?{width:`${x}px`,height:`${y}px`,left:`${-x/2}px`,backgroundColor:Js}:{width:`${y}px`,height:`${x}px`,top:`${-x/2}px`,backgroundColor:Js};return p.jsx("div",{className:"pointer-events-none absolute z-[4]","data-testid":`snap-guide-${h.orientation}`,"data-variant":h.variant,style:A,children:h.variant==="spacing"?p.jsxs(p.Fragment,{children:[p.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...C,top:"0"}:{...C,left:"0"}}),p.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...C,bottom:"0"}:{...C,right:"0"}})]}):null},`${h.orientation}-${h.start.x}-${h.start.y}-${h.end.x}-${h.end.y}-${h.variant}-${m}`)}),p.jsx("button",{type:"button",className:`${f} cursor-alias`,"data-testid":"block-rotate-handle","aria-label":"Rotate selected element",style:{left:`${i.x}px`,top:`${i.y}px`},onMouseDown:u}),r.map(h=>p.jsx("button",{type:"button",className:`${f} cursor-nwse-resize`,"data-testid":`block-resize-handle-${h.corner}`,"aria-label":`Resize selected element from ${h.corner}`,style:{left:`${h.x}px`,top:`${h.y}px`},onMouseDown:m=>{s(h.corner,m)}},h.corner))]})}function uO({selectionCommandAvailability:n,onAlignToSlide:a,onDelete:r,onDistribute:i,onDuplicate:s,onGroup:u,onLayerOrder:f,onUngroup:h}){return p.jsxs(W1,{"aria-label":"Selection actions",children:[p.jsxs(Ct,{disabled:!n.group,onSelect:u,children:[p.jsx(fc,{className:"size-3.5"}),"Group"]}),p.jsxs(Ct,{disabled:!n.ungroup,onSelect:h,children:[p.jsx(Th,{className:"size-3.5"}),"Ungroup"]}),p.jsx(Tc,{}),p.jsxs(Cf,{children:[p.jsxs(Tf,{children:[p.jsx(Vf,{className:"size-3.5"}),"Layer"]}),p.jsxs(Af,{children:[p.jsxs(Ct,{onSelect:()=>f("front"),children:[p.jsx(Vf,{className:"size-3.5"}),"Bring to front"]}),p.jsxs(Ct,{onSelect:()=>f("forward"),children:[p.jsx(Eh,{className:"size-3.5"}),"Bring forward"]}),p.jsxs(Ct,{onSelect:()=>f("backward"),children:[p.jsx(pi,{className:"size-3.5"}),"Send backward"]}),p.jsxs(Ct,{onSelect:()=>f("back"),children:[p.jsx(Xv,{className:"size-3.5"}),"Send to back"]})]})]}),p.jsxs(Cf,{children:[p.jsxs(Tf,{children:[p.jsx(Yf,{className:"size-3.5"}),"Align"]}),p.jsxs(Af,{children:[p.jsxs(Ct,{onSelect:()=>a("left"),children:[p.jsx(Vv,{className:"size-3.5"}),"Align left"]}),p.jsxs(Ct,{onSelect:()=>a("hcenter"),children:[p.jsx(Yf,{className:"size-3.5"}),"Align horizontal center"]}),p.jsxs(Ct,{onSelect:()=>a("right"),children:[p.jsx(Gv,{className:"size-3.5"}),"Align right"]}),p.jsxs(Ct,{onSelect:()=>a("top"),children:[p.jsx(qv,{className:"size-3.5"}),"Align top"]}),p.jsxs(Ct,{onSelect:()=>a("vcenter"),children:[p.jsx($v,{className:"size-3.5"}),"Align vertical center"]}),p.jsxs(Ct,{onSelect:()=>a("bottom"),children:[p.jsx(Yv,{className:"size-3.5"}),"Align bottom"]})]})]}),p.jsxs(Cf,{children:[p.jsxs(Tf,{children:[p.jsx(qf,{className:"size-3.5"}),"Distribute"]}),p.jsxs(Af,{children:[p.jsxs(Ct,{onSelect:()=>i("horizontal"),children:[p.jsx(qf,{className:"size-3.5"}),"Horizontally"]}),p.jsxs(Ct,{onSelect:()=>i("vertical"),children:[p.jsx(hc,{className:"size-3.5"}),"Vertically"]})]})]}),p.jsx(Tc,{}),p.jsxs(Ct,{onSelect:s,children:[p.jsx(Kv,{className:"size-3.5"}),"Duplicate",p.jsx(X0,{children:"⌘D"})]}),p.jsxs(Ct,{variant:"destructive",onSelect:r,children:[p.jsx(nb,{className:"size-3.5"}),"Delete",p.jsx(X0,{children:"Del"})]})]})}const tm=[{label:"Inter",value:'"Inter", "IBM Plex Sans", "Segoe UI", sans-serif'},{label:"Aptos",value:'"Aptos", "Segoe UI", Arial, sans-serif'},{label:"Avenir Next",value:'"Avenir Next", "Montserrat", "Segoe UI", sans-serif'},{label:"Optima",value:'"Optima", "Candara", "Segoe UI", sans-serif'},{label:"Arial Narrow",value:'"Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif'},{label:"Georgia",value:'Georgia, "Times New Roman", serif'},{label:"Times New Roman",value:'"Times New Roman", Times, serif'},{label:"Didot",value:'"Didot", "Bodoni 72", Georgia, serif'},{label:"SF Mono",value:'"SFMono-Regular", Menlo, Consolas, monospace'},{label:"IBM Plex Mono",value:'"IBM Plex Mono", "SFMono-Regular", Consolas, monospace'},{label:"System UI",value:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'},{label:"Nunito",value:'"Nunito", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif'}];function dO(n){return`${Math.round(n*100)/100}px`}function fO(n){const a=gO(n);return a?a.label:dh(n)||"Font"}function J1(n,a){const r=Z0(n),i=Z0(a);return!r||!i?!1:r===i||W0(dh(n))===W0(dh(a))}function hO(n){const a=n.trim().toLowerCase();if(a==="bold"||a==="bolder")return!0;const r=Number.parseInt(a,10);return Number.isFinite(r)&&r>=600}function uh(n){const a=new Set,r=n.toLowerCase();if(!r||r==="none")return a;for(const i of r.split(/\s+/))(i==="underline"||i==="line-through"||i==="overline")&&a.add(i);return a}function mO(n){return pO(n)?n.trim():yO(n)??"#000000"}function pO(n){return/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function gO(n){return tm.find(a=>J1(n,a.value))}function dh(n){return(n.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function Z0(n){return n.toLowerCase().replace(/["']/g,"").replace(/\s+/g," ").trim()}function W0(n){return n.toLowerCase().replace(/["']/g,"").trim()}function Mf(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function yO(n){const a=n.trim().match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,/]+[\d.]+)?\s*\)$/i);return a?`#${Mf(a[1]||"0")}${Mf(a[2]||"0")}${Mf(a[3]||"0")}`:null}function eS({feature:n,inspectedStyles:a,attributeValues:r}){var s,u;if(n.target==="attribute")return n.id==="other-link"?r.linkUrl:n.id==="other-alt-text"?r.altText:n.id==="other-aria-label"?r.ariaLabel:n.attributeName==="data-editor-locked"?r.locked:n.attributeName==="alt"?r.altText:n.attributeName==="aria-label"?r.ariaLabel:n.attributeName==="data-link-url"?r.linkUrl:"";if(!n.propertyName)return"";const i=bO(a,n.propertyName);return n.id==="font-family"?((u=(s=n.options)==null?void 0:s.find(f=>J1(i,f.value)))==null?void 0:u.value)??i:n.id==="font-size"&&i.endsWith("px")?i.slice(0,-2):n.id==="line-height"||n.id==="opacity"?i||(n.id==="opacity"?"1":""):n.id==="rotation"?String(Ra(i).rotate):n.controlType==="color"?mO(i):n.id==="text-align"&&i==="start"?"left":i}function J0(n,a){if(n.id==="font-size"&&a.trim()){const r=Number.parseFloat(a);return`${Math.min(200,Math.max(8,Number.isFinite(r)?r:8))}px`}return(n.id==="width"||n.id==="height")&&a?xO(n.id,a):n.id==="font-bold"?a?"700":"400":n.id==="font-italic"?a?"italic":"normal":n.id==="font-underline"?a?"underline":"none":n.id==="font-strikethrough"?a?"line-through":"none":n.id==="locked"?a?"true":"":a.trim()}function ev(n,a,r){const i=uh(n);return r?i.delete(a):i.add(a),i.size?Array.from(i).join(" "):"none"}function vO(n,a){return n.id==="font-bold"?hO(a):n.id==="font-italic"?a.trim().toLowerCase()==="italic":n.id==="font-underline"?uh(a).has("underline"):n.id==="font-strikethrough"?uh(a).has("line-through"):n.id==="locked"?a==="true":!!a}function bO(n,a){var r;return((r=n.find(i=>i.name===a))==null?void 0:r.value)??""}function xO(n,a){if(a==="auto")return"";const r=n==="width"?Ea:Ca,i=SO(a);return dO(r*i)}function SO(n){return n==="compact"?.18:n==="wide"?.42:n==="full"?.82:.42}function wO({attributeValues:n,feature:a,inspectedStyles:r,nextValue:i,onAlignToSlide:s,onAttributeChange:u,onLayerOrder:f,onStyleChange:h}){if(a.target==="style"&&a.propertyName){const m=eS({feature:a,inspectedStyles:r,attributeValues:n});if(a.id==="rotation"){const g=EO(r),x=Ra(g),y=Number.parseFloat(i);h(a.propertyName,hi(x.translateX,x.translateY,Number.isFinite(y)?y:0)??"");return}if(a.id==="font-underline"){h(a.propertyName,ev(m,"underline",i===""));return}if(a.id==="font-strikethrough"){h(a.propertyName,ev(m,"line-through",i===""));return}h(a.propertyName,J0(a,i));return}if(a.target==="attribute"&&a.attributeName){u(a.attributeName,J0(a,i));return}if(a.id==="other-link"){u("data-link-url",i.trim());return}if(a.id==="other-alt-text"){u("alt",i.trim());return}if(a.id==="other-aria-label"){u("aria-label",i.trim());return}a.id==="align-to-slide"&&s(i),a.id==="layer-order"&&f(i)}function EO(n){var a;return((a=n.find(r=>r.name==="transform"))==null?void 0:a.value)??""}const tS=[{value:"left",label:"Left",icon:tb},{value:"center",label:"Center",icon:pc},{value:"right",label:"Right",icon:eb}],nS=[{value:"left",icon:Vv,label:"Align left"},{value:"hcenter",icon:Yf,label:"Align horizontal center"},{value:"right",icon:Gv,label:"Align right"},{value:"top",icon:qv,label:"Align top"},{value:"vcenter",icon:$v,label:"Align vertical center"},{value:"bottom",icon:Yv,label:"Align bottom"}],oS=[{value:"front",icon:Vf,label:"Bring to front"},{value:"forward",icon:Eh,label:"Bring forward"},{value:"backward",icon:pi,label:"Send backward"},{value:"back",icon:Xv,label:"Send to back"}],aS=[{value:"horizontal",icon:qf,label:"Distribute horizontally"},{value:"vertical",icon:hc,label:"Distribute vertically"}],CO=[{value:"decrease",icon:Jv,label:"Decrease font size"},{value:"increase",icon:ii,label:"Increase font size"}],rS=[{value:"1",label:"Tight",description:"Compact text blocks"},{value:"1.2",label:"Normal",description:"Balanced paragraph spacing"},{value:"1.45",label:"Relaxed",description:"Readable body copy"},{value:"1.7",label:"Airy",description:"Open editorial spacing"}],tv=[{value:"compact",label:"Compact",description:"Small supporting element"},{value:"wide",label:"Wide",description:"Primary text or media area"},{value:"full",label:"Full width",description:"Span most of the slide"},{value:"auto",label:"Auto fit",description:"Let content define the size"}],TO=[{value:"1",label:"100%"},{value:"0.75",label:"75%"},{value:"0.5",label:"50%"},{value:"0.25",label:"25%"}],AO=[{value:"-15",label:"-15"},{value:"0",label:"0"},{value:"15",label:"15"},{value:"45",label:"45"}],lS=[{value:"none",label:"None"},{value:"1px solid rgba(15, 23, 42, 0.16)",label:"Hairline"},{value:"2px solid rgba(15, 23, 42, 0.22)",label:"Strong"},{value:"1px dashed rgba(15, 23, 42, 0.3)",label:"Dashed"}],iS=[{value:"0px",label:"Sharp"},{value:"8px",label:"Soft"},{value:"18px",label:"Round"},{value:"999px",label:"Pill"}],sS=[{value:"none",label:"None"},{value:"0 8px 22px rgba(15, 23, 42, 0.12)",label:"Soft"},{value:"0 18px 42px rgba(15, 23, 42, 0.18)",label:"Lifted"},{value:"0 28px 70px rgba(15, 23, 42, 0.24)",label:"Dramatic"}],MO=[{id:"typography",label:"Typography",icon:Kf,subgroups:[{id:"font",label:"Font",icon:Kf,features:[{id:"font-family",label:"Font family",controlType:"select",target:"style",propertyName:"font-family",options:tm.map(n=>({label:n.label,value:n.value}))},{id:"font-size",label:"Font size",controlType:"action-group",target:"style",propertyName:"font-size",options:CO,min:8,max:200,step:2,unit:"px"},{id:"font-bold",label:"Bold",controlType:"toggle",target:"style",propertyName:"font-weight"},{id:"font-italic",label:"Italic",controlType:"toggle",target:"style",propertyName:"font-style"},{id:"font-underline",label:"Underline",controlType:"toggle",target:"style",propertyName:"text-decoration-line"},{id:"font-strikethrough",label:"Strikethrough",controlType:"toggle",target:"style",propertyName:"text-decoration-line"}]},{id:"paragraph",label:"Paragraph",icon:KC,features:[{id:"line-height",label:"Line height",controlType:"action-group",target:"style",propertyName:"line-height",options:rS},{id:"text-align",label:"Text align",controlType:"action-group",target:"style",propertyName:"text-align",options:tS}]}]},{id:"appearance",label:"Appearance",icon:Ff,subgroups:[{id:"fill",label:"Fill",icon:Ff,features:[{id:"text-color",label:"Text color",controlType:"color",target:"style",propertyName:"color"},{id:"background-color",label:"Background color",controlType:"color",target:"style",propertyName:"background-color"}]},{id:"border",label:"Border",icon:lC,features:[{id:"border",label:"Border",controlType:"action-group",target:"style",propertyName:"border",options:lS},{id:"border-radius",label:"Border radius",controlType:"action-group",target:"style",propertyName:"border-radius",options:iS},{id:"box-shadow",label:"Shadow",controlType:"action-group",target:"style",propertyName:"box-shadow",options:sS}]}]},{id:"layout",label:"Layout",icon:mc,subgroups:[{id:"size",label:"Size",icon:mc,features:[{id:"width",label:"Width",controlType:"action-group",target:"style",propertyName:"width",options:tv},{id:"height",label:"Height",controlType:"action-group",target:"style",propertyName:"height",options:tv}]},{id:"visibility",label:"Visibility",icon:Qv,features:[{id:"opacity",label:"Opacity",controlType:"action-group",target:"style",propertyName:"opacity",options:TO}]},{id:"rotation",label:"Rotation",icon:nT,features:[{id:"rotation",label:"Rotation",controlType:"action-group",target:"style",propertyName:"transform",options:AO,min:-360,max:360,step:15,unit:"deg"}]},{id:"layer-alignment",label:"Layer, Align, Distribute",icon:Ch,features:[{id:"align-to-slide",label:"Align selected element to slide bounds",controlType:"action-group",target:"operation",options:nS},{id:"layer-order",label:"Layer order",controlType:"action-group",target:"operation",options:oS},{id:"distribute",label:"Distribute selection",controlType:"action-group",target:"operation",options:aS}]},{id:"grouping",label:"Group",icon:fc,features:[{id:"group",label:"Group selection",controlType:"action-group",target:"operation",options:[{value:"group",icon:fc,label:"Group"}]},{id:"ungroup",label:"Ungroup selected group",controlType:"action-group",target:"operation",options:[{value:"ungroup",icon:Th,label:"Ungroup"}]}]}]},{id:"misc",label:"Misc",icon:Xf,subgroups:[{id:"state",label:"State",icon:Xf,features:[{id:"locked",label:"Lock / unlock",controlType:"toggle",target:"attribute",attributeName:"data-editor-locked"}]},{id:"link",label:"Link",icon:Wv,features:[{id:"link-url",label:"Link URL",controlType:"text",target:"attribute",attributeName:"data-link-url",placeholder:"https://"}]}]},{id:"others",label:"Others",icon:li,subgroups:[{id:"text-alternatives",label:"Text alternatives",icon:li,features:[{id:"alt-text",label:"Alt text",controlType:"text",target:"attribute",attributeName:"alt",placeholder:"Describe this element"}]},{id:"labels",label:"Labels",icon:li,features:[{id:"aria-label",label:"ARIA label",controlType:"text",target:"attribute",attributeName:"aria-label",placeholder:"aria-label"}]}]}],_O=200,NO="motion-safe:duration-200 motion-safe:ease-out",RO="motion-safe:animate-in motion-safe:fade-in-0 motion-reduce:animate-none",OO="motion-safe:animate-out motion-safe:fade-out-0 motion-reduce:animate-none",DO=["#0F172A","#FFFFFF","#EF4444","#F97316","#F59E0B","#EAB308","#84CC16","#10B981","#06B6D4","#3B82F6","#8B5CF6","#EC4899"],jO=["linear-gradient(135deg,#a855f7,#ec4899)","linear-gradient(135deg,#06b6d4,#8b5cf6)","linear-gradient(135deg,#f59e0b,#ec4899)","linear-gradient(135deg,#10b981,#06b6d4)","linear-gradient(135deg,#f97316,#ef4444)","linear-gradient(135deg,#8b5cf6,#3b82f6)"];function zO({ariaLabelPrefix:n,value:a,includeGradients:r=!0,includeOpacity:i=!0,onChange:s,onCommit:u}){const f=v.useRef(null),h=v.useRef(null),m=v.useMemo(()=>kO(a),[a]),g=v.useMemo(()=>HO(m.hex),[m.hex]),x=Nf(g),[y,S]=v.useState(x.replace("#","")),[A,C]=v.useState("#06B6D4"),[E,M]=v.useState("#8B5CF6"),[R,j]=v.useState(135),B=`hsl(${g.h}, 100%, 50%)`;v.useEffect(()=>{S(x.replace("#",""))},[x]);function Y(z,W=m.alpha){s(_f(z,W))}function te(z){const W=Number.parseInt(z.target.value,10)/100;Y(x,W)}function $(z){var K;const W=(K=f.current)==null?void 0:K.getBoundingClientRect();if(!W)return;z.currentTarget.setPointerCapture(z.pointerId);const ie=si((z.clientX-W.left)/W.width,0,1),de=si(1-(z.clientY-W.top)/W.height,0,1);Y(Nf({...g,s:ie,v:de}))}function q(z){var de;const W=(de=h.current)==null?void 0:de.getBoundingClientRect();if(!W)return;z.currentTarget.setPointerCapture(z.pointerId);const ie=Math.round(si((z.clientX-W.left)/W.width,0,1)*360);Y(Nf({...g,h:ie===360?0:ie}))}return p.jsxs("div",{className:"grid gap-3",children:[p.jsx("div",{className:"relative h-36 w-full touch-none select-none overflow-hidden rounded-xl border-0 before:pointer-events-none before:absolute before:inset-0 before:bg-[linear-gradient(to_top,#000,transparent),linear-gradient(to_right,#fff,transparent)] before:content-[''] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",ref:f,role:"slider","aria-label":"Color saturation and brightness","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(g.v*100),"aria-valuetext":_f(x,m.alpha),tabIndex:0,style:{backgroundColor:B},onPointerDown:$,onPointerMove:z=>{z.buttons===1&&$(z)},children:p.jsx("span",{className:"pointer-events-none absolute size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white bg-current shadow-[0_2px_8px_rgba(0,0,0,0.22)]","aria-hidden":"true",style:{color:x,left:`calc(${g.s*100}% + ${(.5-g.s)*22}px)`,top:`calc(${(1-g.v)*100}% + ${(g.v-.5)*22}px)`}})}),p.jsx("div",{className:"relative h-3 touch-none select-none rounded-full bg-[linear-gradient(to_right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",ref:h,role:"slider","aria-label":"Hue","aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":g.h,tabIndex:0,onPointerDown:q,onPointerMove:z=>{z.buttons===1&&q(z)},children:p.jsx("span",{className:"pointer-events-none absolute -top-0.5 size-4 -translate-x-1/2 rounded-full border-2 border-white bg-current shadow-[0_2px_8px_rgba(0,0,0,0.2)]","aria-hidden":"true",style:{color:B,left:`${g.h/360*100}%`}})}),p.jsxs("div",{className:"grid grid-cols-[40px_auto_minmax(0,1fr)] items-center gap-2",children:[p.jsx("span",{className:"size-10 rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)]",style:{background:_f(x,m.alpha)},"aria-hidden":"true"}),p.jsx("span",{className:"font-mono text-sm font-medium leading-none text-foreground/45",children:"#"}),p.jsx(Wr,{className:"h-8 rounded-md bg-foreground/[0.03] px-2 font-mono text-sm font-medium uppercase",type:"text",value:y,spellCheck:!1,onChange:z=>{const W=z.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6);S(W),W.length===6&&Y(`#${W}`)},onBlur:()=>{S(x.replace("#",""))}})]}),i?p.jsxs("section",{className:"grid gap-1.5","aria-label":"Opacity",children:[p.jsxs("div",{className:"flex items-center justify-between text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:[p.jsx("span",{children:"Opacity"}),p.jsxs("span",{children:[Math.round(m.alpha*100),"%"]})]}),p.jsx("input",{type:"range",min:0,max:100,value:Math.round(m.alpha*100),"aria-label":"Opacity",onChange:te,className:"h-2 w-full cursor-pointer appearance-none rounded-full bg-foreground/10 accent-foreground"})]}):null,p.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset colors",children:[p.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Presets"}),p.jsx("div",{className:"grid grid-cols-12 gap-1",children:DO.map(z=>p.jsx("button",{className:Be("aspect-square min-w-0 cursor-pointer rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)] transition-[box-shadow,outline-color,border-color] duration-150 hover:border-foreground/25 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",z.toLowerCase()===a.toLowerCase()&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:z},"aria-label":n?`Use ${n} ${z}`:`Use ${z}`,onClick:()=>{Y(z),u==null||u()}},z))})]}),r?p.jsxs("section",{className:"grid gap-2","aria-label":"Preset gradients",children:[p.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Gradients"}),p.jsx("div",{className:"grid grid-cols-6 gap-1.5",children:jO.map((z,W)=>p.jsx("button",{className:Be("h-8 cursor-pointer rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)] transition-[box-shadow,outline-color,border-color] duration-150 hover:border-foreground/25 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",z===a&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:z},"aria-label":n?`Use ${n} gradient ${W+1}`:`Use gradient ${W+1}`,onClick:()=>{s(z),u==null||u()}},z))}),p.jsxs("div",{className:"grid gap-2 rounded-md bg-foreground/[0.03] p-2",children:[p.jsx("div",{className:"h-8 rounded-md border border-foreground/10",style:{background:nv(R,A,E)},"aria-hidden":"true"}),p.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[p.jsx(Wr,{className:"h-8 rounded-md bg-white px-2 font-mono text-xs uppercase","aria-label":"Gradient start",value:A.replace("#",""),onChange:z=>C(`#${z.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6)}`),onBlur:()=>C(al(A))}),p.jsx(Wr,{className:"h-8 rounded-md bg-white px-2 font-mono text-xs uppercase","aria-label":"Gradient end",value:E.replace("#",""),onChange:z=>M(`#${z.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6)}`),onBlur:()=>M(al(E))})]}),p.jsxs("div",{className:"grid gap-1",children:[p.jsxs("div",{className:"flex items-center justify-between text-[10px] font-medium uppercase tracking-wider text-foreground/40",children:[p.jsx("span",{children:"Angle"}),p.jsxs("span",{children:[R,"deg"]})]}),p.jsx("input",{type:"range",min:0,max:360,value:R,"aria-label":"Gradient angle",onChange:z=>j(Number.parseInt(z.target.value,10)),className:"h-2 w-full cursor-pointer appearance-none rounded-full bg-foreground/10 accent-foreground"})]}),p.jsx(Kt,{type:"button",variant:"outline",size:"sm",onClick:()=>{s(nv(R,A,E)),u==null||u()},children:"Apply gradient"})]})]}):null]})}function si(n,a,r){return Math.min(Math.max(n,a),r)}function kO(n){const a=n.trim().match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,/]+([\d.]+))?\s*\)$/i);return a?{alpha:si(Number.parseFloat(a[4]??"1"),0,1),hex:`#${Of(a[1]||"0")}${Of(a[2]||"0")}${Of(a[3]||"0")}`}:{alpha:1,hex:LO(n)?n.trim():"#0F172A"}}function _f(n,a){if(a>=.995)return n.toUpperCase();const r=al(n).replace("#",""),i=Number.parseInt(r.slice(0,2),16),s=Number.parseInt(r.slice(2,4),16),u=Number.parseInt(r.slice(4,6),16);return`rgba(${i}, ${s}, ${u}, ${Math.round(a*100)/100})`}function nv(n,a,r){return`linear-gradient(${n}deg, ${al(a)}, ${al(r)})`}function LO(n){return/^#?(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function al(n){const a=n.trim().replace("#","");return a.length===3?`#${a.split("").map(r=>r+r).join("")}`.toUpperCase():a.length===6?`#${a}`.toUpperCase():"#0F172A"}function HO(n){const a={h:220,s:.54,v:.5},r=/^#?([0-9a-f]{6})$/i.exec(al(n));if(!r)return a;const i=r[1],s=Number.parseInt(i.slice(0,2),16)/255,u=Number.parseInt(i.slice(2,4),16)/255,f=Number.parseInt(i.slice(4,6),16)/255,h=Math.max(s,u,f),m=Math.min(s,u,f),g=h-m;let x=0;g!==0&&(h===s?x=(u-f)/g%6:h===u?x=(f-s)/g+2:x=(s-u)/g+4);const y=Math.round(x*60);return{h:y<0?y+360:y,s:h===0?0:g/h,v:h}}function Nf({h:n,s:a,v:r}){const i=r*a,s=i*(1-Math.abs(n/60%2-1)),u=r-i;let f=0,h=0,m=0;return n<60?(f=i,h=s):n<120?(f=s,h=i):n<180?(h=i,m=s):n<240?(h=s,m=i):n<300?(f=s,m=i):(f=i,m=s),`#${Rf(f+u)}${Rf(h+u)}${Rf(m+u)}`.toUpperCase()}function Rf(n){return Math.round(si(n,0,1)*255).toString(16).padStart(2,"0")}function Of(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function BO({className:n,orientation:a="horizontal",decorative:r=!0,...i}){return p.jsx(B5,{"data-slot":"separator",decorative:r,orientation:a,className:Be("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),...i})}function ni({children:n,active:a=!1,className:r,label:i,onClick:s}){return p.jsx(Kt,{variant:a?"secondary":"ghost",size:"icon-sm",className:Be("size-9 rounded-xl text-foreground/60 transition-all duration-200 hover:-translate-y-px hover:bg-foreground/[0.05] hover:text-foreground hover:shadow-[0_5px_14px_rgba(0,0,0,0.08)] active:translate-y-0 active:scale-[0.98]",a&&"bg-foreground/[0.07] text-foreground shadow-[inset_0_1px_2px_rgba(0,0,0,0.08)] hover:bg-foreground/[0.08]",r),type:"button","aria-label":i,title:i,onClick:s,children:n})}function UO(n,a){return Math.abs(n-a)>=.5}function va(){return p.jsx(BO,{orientation:"vertical",className:"mx-1 h-6 bg-foreground/10"})}function IO({icon:n}){return p.jsx(n,{className:"size-3.5"})}function PO({...n}){return p.jsx($M,{"data-slot":"dialog",...n})}function $O({...n}){return p.jsx(GM,{"data-slot":"dialog-portal",...n})}function GO({className:n,...a}){return p.jsx(YM,{"data-slot":"dialog-overlay",className:Be("fixed inset-0 z-50 bg-black/20 backdrop-blur-[1px]",n),...a})}function YO({children:n,className:a,...r}){return p.jsxs($O,{children:[p.jsx(GO,{}),p.jsxs(VM,{"data-slot":"dialog-content",className:Be("fixed left-1/2 top-1/2 z-50 grid w-[min(420px,calc(100vw-32px))] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-md border border-foreground/[0.08] bg-white p-4 shadow-[0_20px_70px_rgba(15,23,42,0.18)] outline-none",a),...r,children:[n,p.jsxs(FM,{className:"absolute right-3 top-3 inline-flex size-7 items-center justify-center rounded-md text-foreground/45 hover:bg-foreground/[0.05] hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",children:[p.jsx(Ah,{className:"size-3.5"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function VO({className:n,...a}){return p.jsx("div",{className:Be("grid gap-1 pr-8",n),...a})}function qO({className:n,...a}){return p.jsx(qM,{"data-slot":"dialog-title",className:Be("text-sm font-semibold text-foreground",n),...a})}function XO({className:n,...a}){return p.jsx(XM,{"data-slot":"dialog-description",className:Be("text-xs leading-normal text-foreground/55",n),...a})}function FO({className:n,...a}){return p.jsx("div",{className:Be("flex justify-end gap-2",n),...a})}function Df({...n}){return p.jsx(QR,{"data-slot":"popover",...n})}function jf({...n}){return p.jsx(ZR,{"data-slot":"popover-trigger",...n})}function zf({className:n,align:a="center",sideOffset:r=4,...i}){return p.jsx(WR,{children:p.jsx(JR,{"data-slot":"popover-content",align:a,sideOffset:r,className:Be("z-50 w-72 rounded-2xl border border-foreground/[0.08] bg-white/95 p-2 text-popover-foreground shadow-[0_8px_26px_rgba(0,0,0,0.08),0_18px_58px_rgba(0,0,0,0.12)] outline-hidden backdrop-blur-xl data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",n),...i})})}function KO({...n}){return p.jsx(w5,{"data-slot":"select",...n})}function QO({...n}){return p.jsx(N5,{"data-slot":"select-group",...n})}function ZO({...n}){return p.jsx(C5,{"data-slot":"select-value",...n})}function WO({className:n,size:a="default",children:r,...i}){return p.jsxs(E5,{"data-slot":"select-trigger","data-size":a,className:Be("flex w-fit items-center justify-between gap-2 rounded-xl border border-transparent bg-transparent px-2.5 text-sm whitespace-nowrap shadow-none transition-all duration-200 outline-none hover:-translate-y-px hover:bg-foreground/[0.05] hover:shadow-[0_5px_14px_rgba(0,0,0,0.08)] focus-visible:border-foreground/20 focus-visible:bg-white focus-visible:ring-[2px] focus-visible:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-foreground/35 data-[size=default]:h-9 data-[size=sm]:h-9 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_svg:not([class*='text-'])]:text-foreground/45",n),...i,children:[r,p.jsx(T5,{asChild:!0,children:p.jsx(pi,{className:"size-4 opacity-50"})})]})}function JO({className:n,children:a,position:r="item-aligned",align:i="center",...s}){return p.jsx(A5,{children:p.jsxs(M5,{"data-slot":"select-content",className:Be("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-2xl border border-foreground/[0.08] bg-white/95 text-popover-foreground shadow-[0_8px_26px_rgba(0,0,0,0.08),0_18px_58px_rgba(0,0,0,0.12)] backdrop-blur-xl data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:r,align:i,...s,children:[p.jsx(t3,{}),p.jsx(_5,{className:Be("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:a}),p.jsx(n3,{})]})})}function e3({className:n,children:a,...r}){return p.jsxs(R5,{"data-slot":"select-item",className:Be("relative flex w-full cursor-default items-center gap-2 rounded-xl py-1.5 pr-8 pl-2.5 text-[13px] text-foreground/70 outline-hidden select-none focus:bg-foreground/[0.05] focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_svg:not([class*='text-'])]:text-foreground/50 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n),...r,children:[p.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(D5,{children:p.jsx(Fv,{className:"size-4"})})}),p.jsx(O5,{children:a})]})}function t3({className:n,...a}){return p.jsx(j5,{"data-slot":"select-scroll-up-button",className:Be("flex cursor-default items-center justify-center py-1",n),...a,children:p.jsx(Eh,{className:"size-4"})})}function n3({className:n,...a}){return p.jsx(z5,{"data-slot":"select-scroll-down-button",className:Be("flex cursor-default items-center justify-center py-1",n),...a,children:p.jsx(pi,{className:"size-4"})})}function cS({className:n,...a}){return p.jsx("textarea",{"data-slot":"textarea",className:Be("flex field-sizing-content min-h-16 w-full rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 py-2 text-sm shadow-none transition-colors outline-none placeholder:text-foreground/35 hover:bg-foreground/[0.04] focus-visible:border-foreground/20 focus-visible:bg-white focus-visible:ring-[2px] focus-visible:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20",n),...a})}const o3=new Map(MO.flatMap(n=>n.subgroups.flatMap(a=>a.features.map(r=>[r.id,r])))),a3={"other-aria-label":{id:"other-aria-label",label:"ARIA label",controlType:"text",target:"operation"},"other-alt-text":{id:"other-alt-text",label:"Alt text",controlType:"text",target:"operation"},"other-link":{id:"other-link",label:"Link",controlType:"text",target:"operation"}};function r3({inspectedStyles:n,selectedElementType:a,selectionCommandAvailability:r,attributeValues:i,onStyleChange:s,onAttributeChange:u,onAlignToSlide:f,onDistribute:h,onGroup:m,onLayerOrder:g,onUngroup:x}){const y=v.useRef(null),[S,A]=v.useState(0),C=v.useRef(0),[E,M]=v.useState(null),[R,j]=v.useState(null),B=a==="multi",Y=B||r.ungroup;v.useEffect(()=>{if(y.current)return()=>{const L=y.current,D=L==null?void 0:L.closest('[data-testid="stage-panel"]');if(!(L instanceof HTMLElement)||!(D instanceof HTMLElement))return;const _=L.getBoundingClientRect(),U=D.getBoundingClientRect(),H=L.cloneNode(!0);H instanceof HTMLElement&&(H.className=Be(H.className,"absolute z-40 m-0 pointer-events-none"),H.classList.remove("motion-safe:animate-in","motion-safe:fade-in-0"),H.className=Be(H.className,OO),H.setAttribute("aria-hidden","true"),H.style.left=`${_.left-U.left}px`,H.style.top=`${_.top-U.top}px`,H.style.width=`${_.width}px`,H.style.height=`${_.height}px`,D.appendChild(H),H.addEventListener("animationend",()=>H.remove()),window.setTimeout(()=>H.remove(),_O+50))}},[]),v.useLayoutEffect(()=>{const N=y.current;if(!N)return;const L=N.getBoundingClientRect(),D=L.left-C.current,_=L.right-C.current,U=16;let H=0;D<U&&(H=U-D),_+H>window.innerWidth-U&&(H+=window.innerWidth-U-(_+H)),UO(C.current,H)&&(C.current=H,A(H))},[]),v.useEffect(()=>{function N(L){var _;const D=L.target;(_=y.current)!=null&&_.contains(L.target)||D instanceof Element&&D.closest('[data-slot="select-content"]')||j(null)}return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),v.useEffect(()=>{function N(L){L.key==="Escape"&&j(null)}return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[]);function te(N,L){if(N.id==="distribute"){h(L);return}if(N.id==="group"){m();return}if(N.id==="ungroup"){x();return}if(N.id==="other-link"){u("data-link-url",L.trim());return}if(N.id==="other-alt-text"){u("alt",L.trim());return}if(N.id==="other-aria-label"){u("aria-label",L.trim());return}if(N.id==="background-color"&&L.startsWith("linear-gradient")){s("background-image",L);return}wO({attributeValues:i,feature:N,inspectedStyles:n,nextValue:L,onAlignToSlide:f,onAttributeChange:u,onLayerOrder:g,onStyleChange:s})}return p.jsxs("div",{className:Be("relative grid w-max min-w-max max-w-[min(1120px,calc(100vw-280px))] gap-2 text-foreground pointer-events-auto max-[1200px]:w-full max-[1200px]:min-w-0",NO,RO),ref:y,style:{marginLeft:S},children:[p.jsxs("div",{className:"flex w-max items-center gap-1 overflow-x-auto overflow-y-hidden rounded-2xl border border-foreground/[0.08] bg-white/92 px-2 py-2 shadow-[0_8px_24px_rgba(0,0,0,0.08),0_18px_54px_rgba(0,0,0,0.12)] backdrop-blur-xl max-[1200px]:min-w-[1120px]","aria-label":"Full editing toolbar",children:[$(),p.jsx(va,{}),q(),p.jsx(va,{}),z(),p.jsx(va,{}),W(),p.jsx(va,{}),ie(),p.jsx(va,{}),de(),B?p.jsxs(p.Fragment,{children:[p.jsx(va,{}),K()]}):null,Y?p.jsxs(p.Fragment,{children:[p.jsx(va,{}),ae()]}):null,p.jsx(va,{}),fe()]}),p.jsx(l3,{attributeValues:i,dialogId:E,onCommitFeature:te,onOpenChange:N=>{N||M(null)}})]});function $(){const N=!!i.locked;return p.jsx(Uo,{children:p.jsx(ni,{label:N?"Unlock":"Lock",active:N,onClick:()=>te(Nt("locked"),N?"":"true"),children:N?p.jsx(BC,{className:"size-3.5"}):p.jsx(Xf,{className:"size-3.5"})})})}function q(){const N=Nt("font-family"),L=Nt("font-size"),D=O(N),_=Number.parseFloat(O(L))||32;return p.jsxs(Uo,{children:[p.jsxs(KO,{value:D||"__empty__",onValueChange:U=>te(N,U==="__empty__"?"":U),children:[p.jsxs(WO,{"aria-label":"Font",size:"sm",className:"w-[156px] text-xs","data-value":D,children:[p.jsx(Kf,{className:"size-3.5 text-foreground/55"}),p.jsx(ZO,{placeholder:fO(D)})]}),p.jsx(JO,{children:p.jsx(QO,{children:tm.map(U=>p.jsx(e3,{value:U.value,"data-value":U.value,style:{fontFamily:U.value},children:U.label},U.value))})})]}),p.jsxs("div",{className:"flex items-center rounded-xl p-0.5",children:[p.jsx(ni,{className:"size-8 rounded-lg border-0 shadow-none hover:shadow-none",label:"Decrease font size",onClick:()=>te(L,String(av(_-2,8,200))),children:p.jsx(Jv,{className:"size-3.5"})}),p.jsx("span",{className:"grid h-8 min-w-9 place-items-center px-2 text-center text-[12px] font-semibold leading-none tabular-nums text-foreground/75",children:_}),p.jsx(ni,{className:"size-8 rounded-lg border-0 shadow-none hover:shadow-none",label:"Increase font size",onClick:()=>te(L,String(av(_+2,8,200))),children:p.jsx(ii,{className:"size-3.5"})})]})]})}function z(){return p.jsx(Uo,{children:[{feature:Nt("font-bold"),icon:aC},{feature:Nt("font-italic"),icon:zC},{feature:Nt("font-underline"),icon:hT},{feature:Nt("font-strikethrough"),icon:lT}].map(({feature:N,icon:L})=>{const D=vO(N,O(N));return p.jsx(ni,{label:N.label,active:D,onClick:()=>te(N,D?"":"true"),children:p.jsx(L,{className:"size-3.5"})},N.id)})})}function W(){return p.jsxs(Uo,{children:[pe({feature:Nt("text-color"),icon:p.jsx(Ff,{className:"size-3.5"}),includeGradients:!0,label:"Text color",popoverId:"text-color"}),pe({feature:Nt("background-color"),icon:p.jsx(mc,{className:"size-3.5"}),includeGradients:!0,label:"Background color",popoverId:"background-color"})]})}function ie(){return p.jsxs(Uo,{children:[T({custom:p.jsx(ov,{feature:Nt("line-height"),label:"Custom line height",onCommitFeature:te}),feature:Nt("line-height"),icon:p.jsx(hc,{className:"size-3.5"}),label:"Line height",options:rS,popoverId:"line-height"}),T({feature:Nt("text-align"),icon:p.jsx(pc,{className:"size-3.5"}),label:"Text align",options:tS,popoverId:"text-align"})]})}function de(){return p.jsxs(Uo,{children:[T({feature:Nt("border"),icon:p.jsx(mC,{className:"size-3.5"}),label:"Border style",options:lS,popoverId:"border"}),T({custom:p.jsx(ov,{feature:Nt("border-radius"),label:"Custom radius",onCommitFeature:te,unit:"px"}),feature:Nt("border-radius"),icon:p.jsx(gC,{className:"size-3.5"}),label:"Border radius",options:iS,popoverId:"border-radius"}),T({custom:p.jsx(i3,{feature:Nt("box-shadow"),label:"Custom shadow",onCommitFeature:te}),feature:Nt("box-shadow"),icon:p.jsx(mc,{className:"size-3.5 drop-shadow"}),label:"Shadow",options:sS,popoverId:"box-shadow"})]})}function K(){return p.jsxs(Uo,{children:[T({feature:Nt("align-to-slide"),icon:p.jsx(pc,{className:"size-3.5"}),label:"Align",options:nS,popoverId:"align"}),T({feature:Nt("layer-order"),icon:p.jsx(Ch,{className:"size-3.5"}),label:"Layer",options:oS,popoverId:"layer"}),T({feature:Nt("distribute"),icon:p.jsx(hc,{className:"size-3.5"}),label:"Distribute",options:aS,popoverId:"distribute"})]})}function ae(){const N=r.ungroup,L=Nt(N?"ungroup":"group");return p.jsx(Uo,{children:p.jsx(ni,{label:N?"Ungroup":"Group",onClick:()=>te(L,N?"ungroup":"group"),children:N?p.jsx(Th,{className:"size-3.5"}):p.jsx(fc,{className:"size-3.5"})})})}function fe(){return p.jsx(Uo,{children:p.jsxs(Df,{open:R==="other",onOpenChange:N=>j(N?"other":null),children:[p.jsx(jf,{asChild:!0,children:p.jsx(Kt,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Other",title:"Other",className:Be(kf,R==="other"&&Lf),children:p.jsx(CC,{className:"size-4"})})}),p.jsxs(zf,{align:"end",className:"w-56 p-1.5",children:[p.jsxs("button",{type:"button",className:ec,onClick:()=>{j(null),M("other-link")},children:[p.jsx(Wv,{className:"size-3.5"}),"Link"]}),p.jsxs("button",{type:"button",className:ec,onClick:()=>{j(null),M("other-alt-text")},children:[p.jsx(li,{className:"size-3.5"}),"Alt text"]}),p.jsxs("button",{type:"button",className:ec,onClick:()=>{j(null),M("other-aria-label")},children:[p.jsx(li,{className:"size-3.5"}),"ARIA label"]})]})]})})}function pe({feature:N,icon:L,includeGradients:D,label:_,popoverId:U}){return p.jsxs(Df,{open:R===U,onOpenChange:H=>j(H?U:null),children:[p.jsx(jf,{asChild:!0,children:p.jsx(Kt,{type:"button",variant:"ghost",size:"icon-sm","aria-label":_,title:_,className:Be(kf,R===U&&Lf),children:L})}),p.jsx(zf,{className:"w-80 max-h-[calc(100vh-40px)] overflow-y-auto p-2",children:p.jsx(zO,{value:O(N),ariaLabelPrefix:_,includeGradients:D,onChange:H=>te(N,H),onCommit:()=>j(null)})})]})}function T({custom:N,feature:L,icon:D,label:_,options:U,popoverId:H}){const P=O(L),X=L.id==="text-align"?c3(P):D;return p.jsxs(Df,{open:R===H,onOpenChange:J=>j(J?H:null),children:[p.jsx(jf,{asChild:!0,children:p.jsx(Kt,{type:"button",variant:"ghost",size:"icon-sm","aria-label":_,title:_,className:Be(kf,R===H&&Lf),children:X})}),p.jsxs(zf,{className:"w-64 p-1.5",children:[p.jsx("div",{className:"grid gap-1",children:U.map(J=>{const ne=J.icon,V=L.target==="operation"&&L.id==="distribute"&&!r.group;return p.jsxs("button",{type:"button",className:Be(ec,P===J.value&&"bg-foreground/[0.06]"),disabled:V,onClick:()=>{te(L,J.value),j(null)},children:[ne?p.jsx(IO,{icon:ne}):p.jsx(s3,{feature:L,option:J}),p.jsx("span",{className:"truncate",children:J.label})]},J.value)})}),N?p.jsx("div",{className:"mt-2 border-t border-foreground/[0.08] pt-2",children:N}):null]})]})}function O(N){return eS({attributeValues:i,feature:N,inspectedStyles:n})}}function l3({attributeValues:n,dialogId:a,onCommitFeature:r,onOpenChange:i}){const s=a?d3[a]:null,[u,f]=v.useState("");return v.useEffect(()=>{a&&f(u3(a,n))},[n,a]),p.jsx(PO,{open:!!a,onOpenChange:i,children:p.jsxs(YO,{children:[p.jsxs(VO,{children:[p.jsx(qO,{children:s==null?void 0:s.title}),p.jsx(XO,{children:s==null?void 0:s.description})]}),s!=null&&s.multiline?p.jsx(cS,{value:u,onChange:h=>f(h.target.value)}):p.jsx(Wr,{value:u,onChange:h=>f(h.target.value)}),p.jsxs(FO,{children:[p.jsx(Kt,{type:"button",variant:"outline",onClick:()=>i(!1),children:"Cancel"}),p.jsx(Kt,{type:"button",onClick:()=>{a&&(r(a3[a],u),i(!1))},children:"Save"})]})]})})}function ov({feature:n,label:a,onCommitFeature:r,unit:i=""}){const[s,u]=v.useState(""),f=`floating-${n.id}-custom`;return p.jsxs("div",{className:"grid gap-1.5",children:[p.jsx("label",{className:"text-[10px] font-medium uppercase tracking-wider text-foreground/45",htmlFor:f,children:a}),p.jsxs("div",{className:"flex gap-1",children:[p.jsx(Wr,{className:"h-8 min-w-0",id:f,inputMode:"decimal",value:s,onChange:h=>u(h.target.value)}),p.jsx(Kt,{type:"button",variant:"outline",size:"sm",disabled:!s.trim(),onClick:()=>{r(n,`${s.trim()}${i}`),u("")},children:"Apply"})]})]})}function i3({feature:n,label:a,onCommitFeature:r}){const[i,s]=v.useState(""),u=`floating-${n.id}-custom`;return p.jsxs("div",{className:"grid gap-1.5",children:[p.jsx("label",{className:"text-[10px] font-medium uppercase tracking-wider text-foreground/45",htmlFor:u,children:a}),p.jsx(cS,{id:u,value:i,onChange:f=>s(f.target.value)}),p.jsx(Kt,{type:"button",variant:"outline",size:"sm",disabled:!i.trim(),onClick:()=>{r(n,i.trim()),s("")},children:"Apply"})]})}function Uo({children:n}){return p.jsx("div",{className:"flex items-center gap-0.5 rounded-xl p-0.5",children:n})}function s3({feature:n,option:a}){return n.id==="border"?p.jsx("span",{className:"size-4 rounded bg-white",style:{border:a.value==="none"?"1px solid rgba(15,23,42,.12)":a.value}}):n.id==="border-radius"?p.jsx("span",{className:"size-4 border border-foreground/15 bg-foreground/[0.04]",style:{borderRadius:a.value}}):n.id==="box-shadow"?p.jsx("span",{className:"size-4 rounded border border-foreground/10 bg-white",style:{boxShadow:a.value==="none"?void 0:a.value}}):p.jsx("span",{className:"size-1.5 rounded-full bg-foreground/35"})}function Nt(n){const a=o3.get(n);if(!a)throw new Error(`Missing floating toolbar feature: ${n}`);return a}function c3(n){return n==="left"?p.jsx(tb,{className:"size-3.5"}):n==="right"?p.jsx(eb,{className:"size-3.5"}):p.jsx(pc,{className:"size-3.5"})}function av(n,a,r){return Math.min(r,Math.max(a,n))}function u3(n,a){return n==="other-link"?a.linkUrl:n==="other-alt-text"?a.altText:a.ariaLabel}const d3={"other-aria-label":{description:"Set the ARIA label used by assistive technologies.",title:"ARIA label"},"other-alt-text":{description:"Describe the selected visual element.",multiline:!0,title:"Alt text"},"other-link":{description:"Attach a URL to the selected element.",title:"Link"}},ec="flex min-h-9 w-full items-center gap-2 rounded-xl px-2.5 py-1.5 text-left text-[13px] text-foreground/70 outline-none transition-colors hover:bg-foreground/[0.05] hover:text-foreground focus-visible:bg-foreground/[0.06] focus-visible:text-foreground focus-visible:ring-[2px] focus-visible:ring-ring/25 disabled:pointer-events-none disabled:opacity-40",kf="size-9 rounded-xl text-foreground/60 transition-all duration-200 hover:-translate-y-px hover:bg-foreground/[0.05] hover:text-foreground hover:shadow-[0_5px_14px_rgba(0,0,0,0.08)] active:translate-y-0 active:scale-[0.98]",Lf="bg-foreground/[0.07] text-foreground shadow-[inset_0_1px_2px_rgba(0,0,0,0.08)] hover:bg-foreground/[0.08]",rv={borderColor:"#facc15",backgroundColor:"rgba(250, 204, 21, 0.08)",boxShadow:"0 0 0 1px rgba(24, 24, 27, 0.2)"};function f3({slideWidth:n,slideHeight:a,offsetX:r,offsetY:i,scale:s,preselectionOverlay:u,selectionOverlay:f,toolbarKey:h,inspectedStyles:m,selectedElementType:g,selectionCommandAvailability:x,groupScopeOverlayPassive:y,isEditingText:S,manipulationOverlay:A,attributeValues:C,iframeRef:E,stageViewportRef:M,selectionOverlayRef:R,selectionContextMenuTriggerRef:j,isManipulating:B,isToolbarSuppressed:Y,onSelectionOverlayMouseDown:te,onSelectionOverlayMouseUp:$,onSelectionOverlayMouseMove:q,onSelectionOverlayContextMenu:z,onStageMouseLeave:W,onResizeHandleMouseDown:ie,onRotateHandleMouseDown:de,onSelectionOverlayDoubleClick:K,onBackgroundClick:ae,onStageWheel:fe,onStyleChange:pe,onAttributeChange:T,onAlignToSlide:O,onDistribute:N,onGroup:L,onLayerOrder:D,onUngroup:_,onDuplicate:U,onDelete:H}){const P=(J,ne)=>{J===ne&&ae()},X=f?h3({selectionOverlay:f,offsetX:r,scale:s,slideWidth:n}):void 0;return p.jsxs("section",{className:"relative z-[5] min-h-0 min-w-0 flex-auto overflow-visible p-10 pb-6 max-[1200px]:px-5 max-[1200px]:py-4","data-testid":"stage-panel",ref:M,onClick:J=>{P(J.target,J.currentTarget)},onKeyDown:J=>{(J.key==="Enter"||J.key===" ")&&P(J.target,J.currentTarget)},onMouseLeave:W,onWheel:J=>{fe(J.nativeEvent)},children:[f&&!B&&!Y&&!S?p.jsx("div",{className:"pointer-events-none absolute z-40 w-max max-[1200px]:static max-[1200px]:mb-4 max-[1200px]:pointer-events-auto",style:X,"data-testid":"floating-toolbar-anchor",children:p.jsx(r3,{inspectedStyles:m,selectedElementType:g,selectionCommandAvailability:x,attributeValues:C,onStyleChange:pe,onAttributeChange:T,onAlignToSlide:O,onDistribute:N,onGroup:L,onLayerOrder:D,onUngroup:_},h)}):null,p.jsx("div",{className:"absolute origin-top-left overflow-hidden rounded-xl bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_2px_12px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.06)] max-[1200px]:max-w-full","data-testid":"stage-frame",style:{width:`${n}px`,height:`${a}px`,left:`${r}px`,top:`${i}px`,transform:`scale(${s})`},children:p.jsx("iframe",{ref:E,title:"Slide canvas",className:"size-full border-0 bg-white","data-testid":"slide-iframe"})}),u&&!S&&!B?p.jsx("div",{"data-testid":"preselection-overlay",className:"pointer-events-none absolute z-[2] border border-dashed",style:{...rv,left:`${u.x}px`,top:`${u.y}px`,width:`${u.width}px`,height:`${u.height}px`}}):null,S?null:p.jsxs(Q1,{children:[p.jsx(Z1,{asChild:!0,children:p.jsx("span",{ref:j,"data-testid":"selection-context-menu-trigger",className:"pointer-events-none absolute size-0","aria-hidden":"true"})}),p.jsx(uO,{selectionCommandAvailability:x,onAlignToSlide:O,onDelete:H,onDistribute:N,onDuplicate:U,onGroup:L,onLayerOrder:D,onUngroup:_})]}),f&&!S?p.jsx("div",{ref:R,"data-testid":"selection-overlay",className:Be("absolute z-[3] border border-dashed",y?"pointer-events-none":"pointer-events-auto"),style:{...rv,left:`${f.x}px`,top:`${f.y}px`,width:`${f.width}px`,height:`${f.height}px`},onMouseDown:te,onMouseMove:q,onMouseUp:$,onContextMenu:z,onDoubleClick:J=>{K(J)}}):null,A?p.jsx(cO,{selectionBounds:A.selectionBounds,snapGuides:A.snapGuides,resizeHandles:A.resizeHandles,rotationHandle:A.rotationHandle,onResizeHandleMouseDown:ie,onRotateHandleMouseDown:de}):null]})}function h3({selectionOverlay:n,offsetX:a,scale:r,slideWidth:i}){const u=a,f=a+i*r,h=Math.max((f-u)/2,0),m=Math.min(288,h),g=u+m,x=f-m,y=n.x+n.width/2;return{left:`${Math.min(Math.max(y,g),Math.max(g,x))}px`,top:n.y<84?`${n.y+n.height+18}px`:`${n.y-18}px`,transform:n.y<84?"translate(-50%, 0)":"translate(-50%, -100%)"}}function m3({delayDuration:n=0,...a}){return p.jsx(nO,{"data-slot":"tooltip-provider",delayDuration:n,...a})}function uS(n,a,r){return SE(n,a,r)}function ri(n,a,r){var u;if(typeof DOMParser>"u")return"";const s=new DOMParser().parseFromString(n.htmlSource,"text/html").querySelector(`[${xe}="${a}"]`);return((u=s==null?void 0:s.getAttribute(r))==null?void 0:u.trim())??""}function p3({elementId:n,nextValue:a,propertyName:r,slide:i}){const s=uS(i,n,r),u=a.trim();return s===u?null:{type:"style.update",slideId:i.id,elementId:n,propertyName:r,previousValue:s,nextValue:u,timestamp:Date.now()}}function g3({attributeName:n,elementId:a,nextValue:r,slide:i}){const s=ri(i,a,n),u=r.trim();return s===u?null:{type:"attribute.update",slideId:i.id,elementId:a,attributeName:n,previousValue:s,nextValue:u,timestamp:Date.now()}}function wa(n){return Math.round(n*100)/100}function dS(n,a){var h;if(typeof DOMParser>"u")return n;const s=(h=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:h.content.firstElementChild;if(!(s instanceof HTMLElement))return n;const u=Ra(s.style.transform),f=hi(0,0,u.rotate);return s.style.position="absolute",s.style.left=`${wa(a.x)}px`,s.style.top=`${wa(a.y)}px`,s.style.width=`${wa(a.width)}px`,s.style.height=`${wa(a.height)}px`,s.style.margin="0px",s.style.boxSizing="border-box",f?s.style.transform=f:s.style.removeProperty("transform"),s.style.transformOrigin||(s.style.transformOrigin="center center"),s.outerHTML}function fS(n,a){return{x:n.left-a.left,y:n.top-a.top,width:n.width,height:n.height}}function y3(n,a,r){var f;const i=(f=n.current)==null?void 0:f.contentDocument,s=i==null?void 0:i.querySelector(a.rootSelector),u=s==null?void 0:s.getBoundingClientRect();return{width:(u==null?void 0:u.width)||r.width,height:(u==null?void 0:u.height)||r.height}}function fh(n,a,r){return{x:wa(n.x+a),y:wa(n.y+r),width:n.width,height:n.height}}function v3(n){return n.length?n.reduce((a,r)=>{const i=Math.min(a.x,r.x),s=Math.min(a.y,r.y),u=Math.max(a.x+a.width,r.x+r.width),f=Math.max(a.y+a.height,r.y+r.height);return{x:i,y:s,width:u-i,height:f-s}}):null}function b3(n,a,r){const i=Math.max(0,r.width-n.width),s=Math.max(0,r.height-n.height),u=Math.min(i,Math.max(0,n.x+a)),f=Math.min(s,Math.max(0,n.y+a));return{x:wa(u-n.x),y:wa(f-n.y)}}function hS(n,a){const r=[];return a.vertical&&r.push(...lv(n,a.vertical,"vertical")),a.horizontal&&r.push(...lv(n,a.horizontal,"horizontal")),r}function lv(n,a,r){return a.target.kind==="spacing"?S3(n,a,r):[x3(n,a,r)]}function x3(n,a,r){const i=a.target;if(n.x+n.width/2,n.y+n.height/2,i.rect.x+i.rect.width/2,i.rect.y+i.rect.height/2,r==="vertical"){const h=iv(n,a.anchor,"vertical");if(i.kind==="slide")return{orientation:r,start:{x:i.position,y:n.y},end:{x:i.position,y:n.y+n.height},...i.role==="center"?{start:{x:i.position,y:i.rect.y},end:{x:i.position,y:i.rect.y+i.rect.height}}:{},variant:"alignment"};const m=Math.min(n.y,i.rect.y),g=Math.max(n.y+n.height,i.rect.y+i.rect.height);return{orientation:r,start:{x:h,y:m-Ws},end:{x:h,y:g+Ws},variant:"alignment"}}const s=iv(n,a.anchor,"horizontal");if(i.kind==="slide")return{orientation:r,start:{x:n.x,y:i.position},end:{x:n.x+n.width,y:i.position},...i.role==="center"?{start:{x:i.rect.x,y:i.position},end:{x:i.rect.x+i.rect.width,y:i.position}}:{},variant:"alignment"};const u=Math.min(n.x,i.rect.x),f=Math.max(n.x+n.width,i.rect.x+i.rect.width);return{orientation:r,start:{x:u-Ws,y:s},end:{x:f+Ws,y:s},variant:"alignment"}}function S3(n,a,r){const i=a.target.relatedRects;if(i.length<2)return[];const[s,u]=i;if(!s||!u)return[];if(r==="vertical"){const A=s.x<=u.x?s:u,C=A===s?u:s,E=A.x+A.width,M=C.x,R=a.anchor==="start"?n.x:n.x+n.width,j={orientation:"horizontal",start:{x:E,y:A.y+A.height/2},end:{x:M,y:C.y+C.height/2},variant:"spacing"},B={orientation:"horizontal",start:a.anchor==="start"?{x:C.x+C.width,y:C.y+C.height/2}:{x:A.x,y:A.y+A.height/2},end:{x:R,y:n.y+n.height/2},variant:"spacing"};return[j,B]}const f=s.y<=u.y?s:u,h=f===s?u:s,m=f.y+f.height,g=h.y,x=a.anchor==="start"?n.y:n.y+n.height,y={orientation:"vertical",start:{x:f.x+f.width/2,y:m},end:{x:h.x+h.width/2,y:g},variant:"spacing"},S={orientation:"vertical",start:a.anchor==="start"?{x:h.x+h.width/2,y:h.y+h.height}:{x:f.x+f.width/2,y:f.y},end:{x:n.x+n.width/2,y:x},variant:"spacing"};return[y,S]}function iv(n,a,r){return r==="vertical"?a==="start"?n.x:a==="end"?n.x+n.width:n.x+n.width/2:a==="start"?n.y:a==="end"?n.y+n.height:n.y+n.height/2}function w3({activeSlide:n,doc:a,rootRect:r,selectedElementId:i,slideStageRect:s,stageGeometry:u}){var S;const f=(A,C)=>({position:A,rect:s,kind:"slide",role:C,anchor:null,priority:C==="center"?0:2,elementId:null,relatedRects:[]}),h=[f(s.x,"start"),f(s.x+s.width/2,"center"),f(s.x+s.width,"end")],m=[f(s.y,"start"),f(s.y+s.height/2,"center"),f(s.y+s.height,"end")],g=a.querySelector(`[data-editor-id="${i}"]`),x=[];for(const A of n.elements){if(A.id===i)continue;const C=a.querySelector(`[data-editor-id="${A.id}"]`);if(!C||g&&(g.contains(C)||C.contains(g)))continue;const E=(S=a.defaultView)==null?void 0:S.getComputedStyle(C);if((E==null?void 0:E.display)==="none"||(E==null?void 0:E.visibility)==="hidden")continue;const M=C.getBoundingClientRect();if(M.width<=0||M.height<=0)continue;const R=Kr(M,r,u);(A.type==="block"||A.type==="image")&&x.push({elementId:A.id,rect:R});const j=R.x,B=R.x+R.width/2,Y=R.x+R.width,te=R.y,$=R.y+R.height/2,q=R.y+R.height,z=(W,ie)=>({position:W,rect:R,kind:"element",role:ie,anchor:null,priority:ie==="center"?3:4,elementId:A.id,relatedRects:[]});h.push(z(j,"start"),z(B,"center"),z(Y,"end")),m.push(z(te,"start"),z($,"center"),z(q,"end"))}const y=E3(x);return h.push(...y.vertical),m.push(...y.horizontal),{vertical:h,horizontal:m}}function E3(n){const a=[],r=[],i=n.slice().sort((u,f)=>u.rect.x-f.rect.x).filter(u=>u.rect.width>0&&u.rect.height>0),s=n.slice().sort((u,f)=>u.rect.y-f.rect.y).filter(u=>u.rect.width>0&&u.rect.height>0);for(let u=0;u<i.length-1;u+=1){const f=i[u],h=i[u+1];if(!f||!h)continue;if(!Fr(f.rect.x,f.rect.x+f.rect.width,h.rect.x,h.rect.x+h.rect.width,0)){const g=h.rect.x-(f.rect.x+f.rect.width);g>=K0&&g<=Q0&&Fr(f.rect.y,f.rect.y+f.rect.height,h.rect.y,h.rect.y+h.rect.height,Ac)&&a.push(tc({position:h.rect.x+h.rect.width+g,rect:h.rect,anchor:"start",relatedRects:[f.rect,h.rect]}),tc({position:f.rect.x-g,rect:f.rect,anchor:"end",relatedRects:[f.rect,h.rect]}))}}for(let u=0;u<s.length-1;u+=1){const f=s[u],h=s[u+1];if(!f||!h)continue;if(!Fr(f.rect.y,f.rect.y+f.rect.height,h.rect.y,h.rect.y+h.rect.height,0)){const g=h.rect.y-(f.rect.y+f.rect.height);g>=K0&&g<=Q0&&Fr(f.rect.x,f.rect.x+f.rect.width,h.rect.x,h.rect.x+h.rect.width,Ac)&&r.push(tc({position:h.rect.y+h.rect.height+g,rect:h.rect,anchor:"start",relatedRects:[f.rect,h.rect]}),tc({position:f.rect.y-g,rect:f.rect,anchor:"end",relatedRects:[f.rect,h.rect]}))}}return{vertical:a,horizontal:r}}function tc({position:n,rect:a,anchor:r,relatedRects:i}){return{position:n,rect:a,kind:"spacing",role:"end",anchor:r,priority:1,elementId:null,relatedRects:i}}function C3(n,a){const r=Mc([{anchor:"start",position:n.x},{anchor:"center",position:n.x+n.width/2},{anchor:"end",position:n.x+n.width}],a.vertical,n,"vertical"),i=Mc([{anchor:"start",position:n.y},{anchor:"center",position:n.y+n.height/2},{anchor:"end",position:n.y+n.height}],a.horizontal,n,"horizontal"),s={...n,x:n.x+((r==null?void 0:r.delta)??0),y:n.y+((i==null?void 0:i.delta)??0)};return{rect:s,guides:hS(s,{vertical:r,horizontal:i})}}function T3(n,a,r){const i={...n},s=a==="top-left"||a==="bottom-left"?"start":"end",u=a==="top-left"||a==="top-right"?"start":"end",f=Mc([{anchor:s,position:s==="start"?n.x:n.x+n.width}],r.vertical,n,"vertical"),h=Mc([{anchor:u,position:u==="start"?n.y:n.y+n.height}],r.horizontal,n,"horizontal");if(f)if(s==="start"){const m=i.width-f.delta;m>=48&&(i.x+=f.delta,i.width=m)}else{const m=i.width+f.delta;m>=48&&(i.width=m)}if(h)if(u==="start"){const m=i.height-h.delta;m>=48&&(i.y+=h.delta,i.height=m)}else{const m=i.height+h.delta;m>=48&&(i.height=m)}return{rect:i,guides:hS(i,{vertical:h,horizontal:f})}}function Mc(n,a,r,i){const s=O3(a);let u=null;for(const f of n)for(const h of s){if(!N3(r,h,i)||h.anchor&&h.anchor!==f.anchor)continue;const m=h.position-f.position;if(Math.abs(m)>iO)continue;const x=sv({anchor:f.anchor,delta:m,target:h},r,i),y=u?sv(u,r,i):Number.POSITIVE_INFINITY;x>=y||(u={anchor:f.anchor,delta:m,target:h})}return u}function sv(n,a,r){const i=Math.abs(n.delta),s=n.target.kind==="spacing"?Math.max(0,i-sO):i,u=A3(n.target);return s*1e3+u+n.target.priority+M3(n.anchor,n.target)+_3(a,n.target,r)/100}function A3(n){return n.kind==="element"?0:n.kind==="spacing"?8:16}function M3(n,a){return a.kind==="slide"&&a.role==="center"&&n!=="center"?25:0}function _3(n,a,r){return a.kind==="slide"?0:r==="vertical"?cv(n.y,n.y+n.height,a.rect.y,a.rect.y+a.rect.height):cv(n.x,n.x+n.width,a.rect.x,a.rect.x+a.rect.width)}function cv(n,a,r,i){return a<r?r-a:i<n?n-i:0}function N3(n,a,r){return a.kind==="slide"?!0:a.kind==="spacing"?R3(n,a,r):!0}function R3(n,a,r){if(a.relatedRects.length<2)return!1;if(r==="vertical"){const u=Math.min(...a.relatedRects.map(h=>h.y)),f=Math.max(...a.relatedRects.map(h=>h.y+h.height));return Fr(n.y,n.y+n.height,u,f,Ac)}const i=Math.min(...a.relatedRects.map(u=>u.x)),s=Math.max(...a.relatedRects.map(u=>u.x+u.width));return Fr(n.x,n.x+n.width,i,s,Ac)}function O3(n){const a=new Set;return n.filter(r=>{const i=`${r.kind}:${r.elementId??"slide"}:${r.position.toFixed(2)}`;return a.has(i)?!1:(a.add(i),!0)})}function ba(n,a){return Math.max(n,48*a)}function hh(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function D3(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function j3(n){const[a,...r]=n;return a?r.reduce((i,s)=>{const u=Math.min(i.x,s.x),f=Math.min(i.y,s.y),h=Math.max(i.x+i.width,s.x+s.width),m=Math.max(i.y+i.height,s.y+s.height);return{x:u,y:f,width:h-u,height:m-f}},a):{x:0,y:0,width:0,height:0}}function uv(n,a,r,i){return Math.atan2(a-i,n-r)*180/Math.PI}function z3({resizeCorner:n,scale:a,stageDeltaX:r,stageDeltaY:i,startStageRect:s}){let u=s.x,f=s.y,h=s.width,m=s.height;switch(n){case"top-left":{h=ba(s.width-r,a),m=ba(s.height-i,a),u=s.x+(s.width-h),f=s.y+(s.height-m);break}case"top-right":{h=ba(s.width+r,a),m=ba(s.height-i,a),f=s.y+(s.height-m);break}case"bottom-left":{h=ba(s.width-r,a),m=ba(s.height+i,a),u=s.x+(s.width-h);break}default:{h=ba(s.width+r,a),m=ba(s.height+i,a);break}}return{x:u,y:f,width:h,height:m}}function ic(n,a){for(const r of Sh)n.style[r]=a[r]??""}function k3(n){return n.elementIds.map(a=>{const r=n.targetNodes[a],i=n.previousStyles[a];if(!r||!i)return null;const s=Jr(r);return JSON.stringify(s)===JSON.stringify(i)?null:{type:"element.layout.update",slideId:n.slideId,elementId:a,previousStyle:i,nextStyle:s,timestamp:Date.now()}}).filter(a=>!!a)}function L3(n,a){return a.length===1?a[0]:{type:"operation.batch",slideId:n.slideId,operations:a,timestamp:Date.now()}}function H3({isEditingText:n,isManipulating:a,selectedElement:r,selectedElementId:i,snapGuides:s,stageRect:u}){return!u||!i||!D3(r)||n?null:{selectionBounds:u,snapGuides:a?s:[],resizeHandles:[{corner:"top-left",x:u.x,y:u.y},{corner:"top-right",x:u.x+u.width,y:u.y},{corner:"bottom-right",x:u.x+u.width,y:u.y+u.height},{corner:"bottom-left",x:u.x,y:u.y+u.height}],rotationHandle:{x:u.x+u.width/2,y:u.y+u.height+20}}}function B3({activeSlide:n,selectedElement:a,selectedElementId:r,selectedElementIds:i,selectedStageRect:s,iframeRef:u,stageGeometry:f,isEditingText:h,onCommitOperation:m}){const{offsetX:g,offsetY:x,scale:y,slideHeight:S,slideWidth:A}=f,C=v.useRef(null),E=v.useRef(!1),M=v.useRef(null),[R,j]=v.useState(!1),[B,Y]=v.useState(!1),[te,$]=v.useState(null),[q,z]=v.useState([]),ie=H3({isEditingText:h,isManipulating:R,selectedElement:a,selectedElementId:r,snapGuides:q,stageRect:te??s});v.useEffect(()=>()=>{C.current=null,M.current&&window.clearTimeout(M.current)},[]),v.useEffect(()=>{(!n||!r||!hh(a)||h)&&(C.current=null,j(!1),$(null))},[n,h,a,r]),v.useEffect(()=>{R||($(null),z([]))},[R]);const de=v.useCallback(()=>{Y(!0),M.current&&window.clearTimeout(M.current),M.current=window.setTimeout(()=>{Y(!1),M.current=null},0)},[]),K=v.useCallback((ae,fe,pe=null,T=r)=>{var Yo;const O=T?n==null?void 0:n.elements.find(je=>je.id===T):void 0;if(!n||!T||!hh(O)||h)return;const N=(Yo=u.current)==null?void 0:Yo.contentDocument;if(!N)return;const L=N.querySelector(n.rootSelector),D=Ke(N,T);if(!L||!D)return;const _=U3({activeSlide:n,doc:N,mode:ae,selectedElementId:T,selectedElementIds:i}),U=Object.fromEntries(_.map(je=>[je,Ke(N,je)]).filter(je=>!!je[1]));if(!Object.keys(U).length)return;const H=Object.fromEntries(Object.entries(U).map(([je,Je])=>[je,Jr(Je)])),P=Object.fromEntries(Object.entries(U).map(([je,Je])=>[je,I3(Je,U)])),X=u.current,J=(X==null?void 0:X.style.pointerEvents)||"",ne=fe.sourceWindow??window,V=fe.toStagePoint??((je,Je)=>({x:je,y:Je})),re=V(fe.clientX,fe.clientY);fe.preventDefault(),fe.stopPropagation();const ye=D.getBoundingClientRect(),Se=L.getBoundingClientRect(),ve={x:g,y:x,width:A*y,height:S*y},De={scale:y,offsetX:g,offsetY:x},ke=w3({activeSlide:n,doc:N,rootRect:Se,selectedElementId:T,slideStageRect:ve,stageGeometry:De}),_e=Object.values(U).map(je=>Kr(je.getBoundingClientRect(),Se,De)),lt=Object.fromEntries(Object.entries(U).map(([je,Je])=>[je,Kr(Je.getBoundingClientRect(),Se,De)])),ft=Object.fromEntries(Object.values(U).map(je=>je.parentElement).filter(je=>!!je).map(je=>[mh(je),Kr(je.getBoundingClientRect(),Se,De)]));if(!_e.length)return;const xt=j3(_e);C.current={slideId:n.id,elementId:T,elementIds:Object.keys(U),mode:ae,resizeCorner:pe,startPointer:re,startStageRect:xt,centerPoint:{x:ye.left+ye.width/2,y:ye.top+ye.height/2},previousStyle:H[T],previousStyles:H,startElementStageRects:lt,resizeParentElementIds:P,startParentStageRects:ft,targetNodes:U,snapTargets:ke},E.current=!0,j(!0),z([]),X&&(X.style.pointerEvents="none");const ot=(je,Je)=>{const Ne=C.current;if(!Ne)return;je.preventDefault();const an=Je(je.clientX,je.clientY),Gt=an.x-Ne.startPointer.x,vo=an.y-Ne.startPointer.y;if(Ne.mode==="move"){const Ht={x:Ne.startStageRect.x+Gt,y:Ne.startStageRect.y+vo,width:Ne.startStageRect.width,height:Ne.startStageRect.height},ut=je.altKey?{rect:Ht,guides:[]}:C3(Ht,Ne.snapTargets);$(ut.rect),z(ut.guides);const Vo=(ut.rect.x-Ne.startStageRect.x)/y,ao=(ut.rect.y-Ne.startStageRect.y)/y;for(const It of Ne.elementIds){const kn=Ne.targetNodes[It],Kn=Ne.previousStyles[It];if(!kn||!Kn)continue;const ln=Ne.startElementStageRects[It],Qt=Ne.startParentStageRects[mh(kn.parentElement)]??ve;!ln||!Qt||ic(kn,{...mi({previousStyle:Kn,left:(ln.x-Qt.x)/y+Vo,top:(ln.y-Qt.y)/y+ao,width:ln.width/y,height:ln.height/y})})}return}if(Ne.mode==="resize"){const Ht=z3({resizeCorner:Ne.resizeCorner,scale:y,stageDeltaX:Gt,stageDeltaY:vo,startStageRect:Ne.startStageRect}),ut=je.altKey||!Ne.resizeCorner?{rect:Ht,guides:[]}:T3(Ht,Ne.resizeCorner,Ne.snapTargets);$(ut.rect),z(ut.guides),P3(Ne,ut.rect,{offsetX:g,offsetY:x,scale:y});return}const un=Ra(Ne.previousStyle.transform),rn=uv(Ne.startPointer.x,Ne.startPointer.y,Ne.centerPoint.x,Ne.centerPoint.y),Lt=uv(an.x,an.y,Ne.centerPoint.x,Ne.centerPoint.y);ic(D,{...Ne.previousStyle,transform:hi(un.translateX,un.translateY,un.rotate+(Lt-rn)),transformOrigin:"center center"}),z([])},Sn=je=>{ot(je,V)},wn=je=>{ot(je,(Je,Ne)=>({x:Je,y:Ne}))},Tt=()=>{ne.removeEventListener("mousemove",Sn),ne.removeEventListener("mouseup",on),ne.removeEventListener("keydown",St),ne!==window&&(window.removeEventListener("mousemove",wn),window.removeEventListener("mouseup",on)),X&&(X.style.pointerEvents=J)},on=()=>{const je=C.current;if(Tt(),E.current=!1,j(!1),de(),C.current=null,z([]),!je)return;const Je=k3(je);if(!Je.length){$(null);return}m(L3(je,Je))},St=je=>{if(je.key!=="Escape")return;const Je=C.current;if(Tt(),j(!1),de(),C.current=null,z([]),!!Je){for(const Ne of Je.elementIds){const an=Je.targetNodes[Ne],Gt=Je.previousStyles[Ne];an&&Gt&&ic(an,Gt)}$(null)}};ne.addEventListener("mousemove",Sn),ne.addEventListener("mouseup",on),ne.addEventListener("keydown",St),ne!==window&&(window.addEventListener("mousemove",wn),window.addEventListener("mouseup",on))},[n,u,h,m,r,i,y,g,x,A,S,de]);return{manipulationOverlay:ie,isManipulating:R||E.current,suppressBackgroundClear:B,beginMove:(ae,fe)=>{K("move",ae,null,fe)},beginResize:(ae,fe)=>{K("resize",fe,ae)},beginRotate:ae=>{K("rotate",ae)}}}function U3({activeSlide:n,doc:a,mode:r,selectedElementId:i,selectedElementIds:s}){const u=s.filter(h=>{const m=n.elements.find(g=>g.id===h);return hh(m)});if(r==="move")return u.length?u:[i];if(r==="rotate")return[i];const f=new Set;for(const h of u.length?u:[i]){const m=Ke(a,h);if(m&&(f.add(h),m.getAttribute("data-group")==="true"))for(const g of m.querySelectorAll(`[data-editable][${xe}]`)){const x=g.getAttribute(xe);x&&f.add(x)}}return[...f]}function I3(n,a){const r=Object.entries(a);let i=n.parentElement;for(;i;){const s=r.find(([,u])=>u===i);if(s)return s[0];i=i.parentElement}return null}function P3(n,a,r){const i=n.startStageRect.width>0?a.width/n.startStageRect.width:1,s=n.startStageRect.height>0?a.height/n.startStageRect.height:1,u={x:r.offsetX,y:r.offsetY},f=Object.fromEntries(Object.entries(n.startElementStageRects).map(([h,m])=>[h,{x:a.x+(m.x-n.startStageRect.x)*i,y:a.y+(m.y-n.startStageRect.y)*s,width:m.width*i,height:m.height*s}]));for(const h of n.elementIds){const m=n.targetNodes[h],g=n.previousStyles[h],x=f[h];if(!m||!g||!x)continue;const y=n.resizeParentElementIds[h]?f[n.resizeParentElementIds[h]]:n.startParentStageRects[mh(m.parentElement)]??u;y&&ic(m,{...mi({previousStyle:g,left:(x.x-y.x)/r.scale,top:(x.y-y.y)/r.scale,width:x.width/r.scale,height:x.height/r.scale})})}}function mh(n){return n!=null&&n.getAttribute(xe)?`editable:${n.getAttribute(xe)}`:"slide"}const dv={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function $3(n){return n instanceof Element?!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable="plaintext-only"]'):!1}function G3(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"}function Y3(n){return n.altKey?1:n.shiftKey?10:5}function V3(n,a,r){var f;const i={[a]:r};if(typeof DOMParser>"u")return i;const u=(f=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:f.content.firstElementChild;if(!(u instanceof HTMLElement))return i;for(const h of u.querySelectorAll("[data-editor-id]")){const m=h.getAttribute("data-editor-id");m&&(i[m]=`${r}-${m}`)}return i}function ph(n,a,r){return a.length?(r(a.length===1?a[0]:{type:"operation.batch",slideId:n,operations:a,timestamp:Date.now()}),!0):!1}function q3({slide:n,selectedElementIds:a,iframeRef:r}){var m;if(!n||!a.length)return null;const i=(m=r.current)==null?void 0:m.contentDocument,s=i==null?void 0:i.querySelector(n.rootSelector),u=s==null?void 0:s.getBoundingClientRect();if(!u)return null;const f=a.map(g=>{const x=dc(n.htmlSource,g),y=uc(n.htmlSource,g),S=i?Ke(i,g):null;return!x||!y||!S?null:{sourceElementId:g,html:x,rect:fS(S.getBoundingClientRect(),u),...y}}).filter(g=>!!g),h=v3(f.map(g=>g.rect));return h?{elements:f,unionRect:h}:null}function X3({slide:n,selectedElementIds:a}){return!n||!a.length?[]:a.map(r=>{const i=dc(n.htmlSource,r),s=uc(n.htmlSource,r);return!i||!s?null:{type:"element.remove",slideId:n.id,elementId:r,...s,html:i,timestamp:Date.now()}}).filter(r=>!!r)}function F3({slide:n,payload:a,iframeRef:r,slideSize:i}){if(!n||!a)return null;let s=n.htmlSource;const u=[],f=y3(r,n,i),h=b3(a.unionRect,24,f),m=[];return{operations:a.elements.map(x=>{const y=Gf(s,`${x.sourceElementId}-copy`),S=zv(x.html,V3(x.html,x.sourceElementId,y)),A=fh(x.rect,h.x,h.y),C=dS(S,A),E={type:"element.insert",slideId:n.id,elementId:y,parentElementId:null,previousSiblingElementId:null,nextSiblingElementId:null,html:C,timestamp:Date.now()};return s=kv(s,E),u.push(y),m.push({...x,rect:A}),E}),selectedElementIds:u,nextHtmlSource:s,nextClipboard:{elements:m,unionRect:fh(a.unionRect,h.x,h.y)}}}function fv(n,a,r){return ph(n,a,r)}function K3({activeSlide:n,selectedElementIds:a,iframeRef:r,slideWidth:i,slideHeight:s,isEditingText:u,canUndo:f,canRedo:h,onEscapeSelection:m,onNavigateSlide:g,onCommitOperation:x,onSelectElementIds:y,onUndo:S,onRedo:A}){const C=v.useRef(null),E=v.useRef(n),M=v.useRef(a),R=v.useRef(f),j=v.useRef(h),B=v.useRef(u),Y=v.useRef(m),te=(n==null?void 0:n.htmlSource)??"",$=v.useRef(g);E.current=n,M.current=a,R.current=f,j.current=h,B.current=u,Y.current=m,$.current=g,v.useEffect(()=>{var pe;const q=()=>{const T=q3({slide:E.current,selectedElementIds:M.current,iframeRef:r});return T&&(C.current=T),!!T},z=()=>{const T=E.current;if(!T)return!1;const O=X3({slide:T,selectedElementIds:M.current});return O.length?(fv(T.id,O,x),y([]),!0):!1},W=(T=C.current)=>{const O=E.current,N=F3({slide:O,payload:T,iframeRef:r,slideSize:{width:i,height:s}});return!O||!N?!1:(fv(O.id,N.operations,x),E.current={...O,htmlSource:N.nextHtmlSource},y(N.selectedElementIds),C.current=N.nextClipboard,!0)},ie=T=>{var H;const O=dv[T.key],N=E.current,L=M.current;if(!N||!L.length||!O)return!1;const D=(H=r.current)==null?void 0:H.contentDocument,_=Y3(T),U=L.map(P=>{const X=N.elements.find(ve=>ve.id===P);if(!G3(X))return null;const J=D?Ke(D,P):null;if(!J)return null;const ne=Jr(J),V=J.getBoundingClientRect(),re=J.parentElement;if(!re)return null;const ye=re.getBoundingClientRect(),Se=mi({previousStyle:ne,left:V.left-ye.left+O.x*_,top:V.top-ye.top+O.y*_,width:V.width,height:V.height});return{type:"element.layout.update",slideId:N.id,elementId:P,previousStyle:ne,nextStyle:Se,timestamp:Date.now()}}).filter(P=>!!P);return ph(N.id,U,x),!0},de=T=>{var _;const O=E.current,N=M.current;if(!O||!N.length)return!1;const L=(_=r.current)==null?void 0:_.contentDocument,D=N.map(U=>{const H=L?Ke(L,U):null;if(!H)return null;const P=Jr(H),X=Number.parseInt(P.zIndex||"",10),J=Number.isFinite(X)?X:0,ne=T==="front"?999:T==="back"?0:Math.max(0,J+(T==="forward"?1:-1)),V=wh({...P,zIndex:String(ne)});return V.zIndex===P.zIndex?null:{type:"element.layout.update",slideId:O.id,elementId:U,previousStyle:P,nextStyle:V,timestamp:Date.now()}}).filter(U=>!!U);return ph(O.id,D,x)},K=T=>{if(T.defaultPrevented||B.current)return;const O=T.key.toLowerCase(),N=T.metaKey||T.ctrlKey,L=N&&!T.shiftKey&&O==="z",D=N&&(T.shiftKey&&O==="z"||O==="y"),_=$3(T.target);let U=!1;if(L&&R.current)S(),U=!0;else if(D&&j.current)A(),U=!0;else{if(_)return;N&&!T.shiftKey&&O==="c"?U=q():N&&!T.shiftKey&&O==="x"?U=q()&&z():N&&!T.shiftKey&&O==="v"?U=W():N&&!T.shiftKey&&O==="d"?U=q()&&W():T.key==="Backspace"||T.key==="Delete"?U=z():T.key==="Escape"?U=Y.current():T.key in dv?M.current.length>0?U=ie(T):!T.altKey&&!T.shiftKey&&!N&&(U=$.current(T.key==="ArrowUp"||T.key==="ArrowLeft"?"previous":"next")):N&&T.key==="]"?U=de(T.shiftKey?"front":"forward"):N&&T.key==="["&&(U=de(T.shiftKey?"back":"backward"))}U&&(T.preventDefault(),T.stopPropagation())},ae=Q3(te,r),fe=(pe=r.current)==null?void 0:pe.contentWindow;return window.addEventListener("keydown",K),fe==null||fe.addEventListener("keydown",K),ae==null||ae.addEventListener("keydown",K),()=>{window.removeEventListener("keydown",K),fe==null||fe.removeEventListener("keydown",K),ae==null||ae.removeEventListener("keydown",K)}},[te,r,x,A,y,S,s,i])}function Q3(n,a){var r;return(r=a.current)==null?void 0:r.contentDocument}function Z3(n){return n?[n]:[]}function nc(n,a){return n.includes(a)?n:[...n,a]}function W3({selectedElementIds:n,activeGroupScopeId:a}){return a?{handled:!0,nextSelection:[a],exitGroupScope:!0}:n.length?{handled:!0,nextSelection:[],exitGroupScope:!1}:{handled:!1,nextSelection:n,exitGroupScope:!1}}const hv="hse-editing-text-style",J3=`
425
+ [data-hse-editing="true"] {
426
+ outline: none !important;
427
+ box-shadow: none !important;
428
+ overflow: visible;
429
+ caret-color: currentColor;
430
+ white-space: pre-wrap;
431
+ user-select: text;
432
+ -webkit-user-select: text;
433
+ }
434
+
435
+ [data-hse-editing="true"]:focus,
436
+ [data-hse-editing="true"]:focus-visible {
437
+ outline: none !important;
438
+ box-shadow: none !important;
439
+ }
440
+
441
+ body[data-hse-group-scope] [data-editable] {
442
+ transition: opacity 120ms ease, filter 120ms ease;
443
+ }
444
+
445
+ body[data-hse-group-scope] [data-editable][data-hse-outside-group-scope="true"] {
446
+ opacity: 0.28;
447
+ filter: blur(1.5px);
448
+ }
449
+
450
+ body[data-hse-group-scope] [data-editable][data-hse-active-group-scope="true"] {
451
+ outline: 1px solid rgba(15, 23, 42, 0.22);
452
+ outline-offset: 4px;
453
+ }
454
+ `;function eD(n){return n.closest(`[data-editable][${xe}]`)}function mv(n,a,r,i){const s=n.elementFromPoint(a,r);return s?Xr(s,i):null}function pv(n,a){const r=Array.from(n.querySelectorAll("[data-editable]"));for(const s of r)s.removeAttribute("data-hse-active-group-scope"),s.removeAttribute("data-hse-outside-group-scope");if(!a){n.body.removeAttribute("data-hse-group-scope");return}n.body.setAttribute("data-hse-group-scope",a);const i=n.querySelector(`[data-editable="block"][data-group="true"][${xe}="${a}"]`);if(!i){n.body.removeAttribute("data-hse-group-scope");return}i.setAttribute("data-hse-active-group-scope","true");for(const s of r)s!==i&&!i.contains(s)&&s.setAttribute("data-hse-outside-group-scope","true")}function Xr(n,a){const r=eD(n);return r?a?r.closest(`[data-editable="block"][data-group="true"][${xe}="${a}"]`)?r:null:r.closest(`[data-editable="block"][data-group="true"][${xe}]`)??r:null}function tD(n){if(n.getElementById(hv))return;const a=n.createElement("style");a.id=hv,a.textContent=J3,n.head.appendChild(a)}function nD(n){const a=n.ownerDocument.getSelection(),r=n.ownerDocument.createRange();r.selectNodeContents(n),r.collapse(!1),a==null||a.removeAllRanges(),a==null||a.addRange(r)}function oD({activeSlide:n,iframeRef:a,onCommitOperation:r,onOpenSelectionContextMenu:i,onStageWheel:s,onBeginPointerMove:u}){const[f,h]=v.useState([]),[m,g]=v.useState(null),[x,y]=v.useState(null),[S,A]=v.useState(null),C=v.useRef(null),E=v.useRef(null),M=v.useRef(()=>{}),R=v.useRef(()=>{}),j=v.useRef(s),B=f[f.length-1]??null;j.current=s;const Y=v.useCallback(()=>{g(O=>O===null?O:null)},[]);function te(O){h(N=>{const L=typeof O=="function"?O(N[N.length-1]??null):O;return Z3(L)})}const $=v.useCallback((O,N)=>{const L=a.current,D=L==null?void 0:L.contentDocument;if(!L||!D||C.current)return null;const _=L.getBoundingClientRect(),U=_.width>0?L.clientWidth/_.width:1,H=_.height>0?L.clientHeight/_.height:1,P=mv(D,(O-_.left)*U,(N-_.top)*H,E.current);return(P==null?void 0:P.getAttribute(xe))??null},[a]),q=v.useCallback((O,N)=>{const L=$(O,N);return g(D=>D===L?D:L),L},[$]),z=v.useCallback((O,N,L)=>{const D=$(O,N);return D?(h(L?_=>nc(_,D):[D]),D):null},[$]),W=v.useCallback((O,N)=>{const L=$(O,N);return L?(h(D=>nc(D,L)),g(L),i==null||i(O,N),!0):!1},[$,i]),ie=v.useCallback(O=>{var _;if(!n)return;const N=(_=a.current)==null?void 0:_.contentDocument,L=N?Ke(N,O):null;if(!L||L.getAttribute("data-editable")!=="text")return;const D={slideId:n.id,elementId:O,initialText:L.textContent||""};h([O]),C.current=D,A(D)},[n,a]),de=v.useCallback(O=>{y(O),E.current=O,h([O])},[]),K=v.useCallback(()=>{const O=E.current;E.current=null,y(null),h(O?[O]:[])},[]),ae=v.useCallback(()=>{if(C.current)return h(N=>N.length?[]:N),!0;const O=W3({selectedElementIds:f,activeGroupScopeId:E.current});return O.handled&&(O.exitGroupScope&&(E.current=null,y(null)),h(O.nextSelection)),O.handled},[f]);function fe(O,N){const L=S;if(!n||!L||L.slideId!==n.id||L.elementId!==O){C.current=null,A(null);return}const D=L.initialText;C.current=null,A(null),N!==D&&r({type:"text.update",slideId:n.id,elementId:O,previousText:D,nextText:N,timestamp:Date.now()})}function pe(){var L;const O=(L=a.current)==null?void 0:L.contentDocument,N=C.current;if(N&&O){const D=Ke(O,N.elementId);D&&(D.textContent=N.initialText)}C.current=null,A(null)}v.useEffect(()=>{C.current=S},[S]),v.useEffect(()=>{E.current=x},[x]),v.useEffect(()=>{!n||!S||S.slideId===n.id||A(null)},[n,S]),M.current=fe,R.current=pe,v.useEffect(()=>{if(!n)return;const O=a.current;if(!O)return;const N=O.contentDocument;if(!N)return;N.open(),N.write(n.htmlSource),N.close(),tD(N),pv(N,E.current);const L=H=>{const P=H.getAttribute(xe);P&&M.current(P,H.textContent||"")};N.onclick=H=>{const P=H.target;if(!(P instanceof Element)){if(C.current){const V=Ke(N,C.current.elementId);if(V){L(V),h([]);return}}h([]);return}const X=C.current;if(X){Y();const V=Ke(N,X.elementId);if(V&&!V.contains(P)){L(V),h([]);return}return}const J=Xr(P,E.current);if(!J){E.current||h([]);return}const ne=J.getAttribute(xe);ne&&(H.shiftKey||H.metaKey||H.ctrlKey?h(V=>nc(V,ne)):h([ne]))},N.onmousemove=H=>{if(C.current){Y();return}const P=mv(N,H.clientX,H.clientY,E.current),X=(P==null?void 0:P.getAttribute(xe))??null;g(J=>J===X?J:X)},N.oncontextmenu=H=>{if(C.current)return;const P=O.getBoundingClientRect(),X=P.width>0?O.clientWidth/P.width:1,J=P.height>0?O.clientHeight/P.height:1,ne=P.left+H.clientX/X,V=P.top+H.clientY/J;W(ne,V)&&(H.preventDefault(),H.stopPropagation())},N.onmouseleave=()=>{Y()};const D=H=>{var P;(P=j.current)==null||P.call(j,H)};N.addEventListener("wheel",D,{passive:!1});const _=H=>{var J;const P=T(H,E.current),X=P==null?void 0:P.getAttribute(xe);if(X){if(((J=C.current)==null?void 0:J.elementId)===X){H.stopPropagation();return}H.preventDefault(),H.stopPropagation(),ie(X)}};N.addEventListener("dblclick",_,!0);const U=Array.from(N.querySelectorAll(`[data-editable][${xe}]`));for(const H of U)H.style.cursor="default",H.ondblclick=null,H.onblur=null,H.onkeydown=null,H.onmousedown=null,H.onclick=P=>{var ne;P.stopPropagation();const X=Xr(P.target,E.current);if(E.current&&!X)return;const J=(X==null?void 0:X.getAttribute(xe))??H.getAttribute(xe);((ne=C.current)==null?void 0:ne.elementId)!==J&&J&&(P.shiftKey||P.metaKey||P.ctrlKey?h(V=>nc(V,J)):h([J]))},H.onmousedown=P=>{if(P.button!==0||C.current)return;const X=Xr(P.target,E.current);if(E.current&&!X)return;const J=(X==null?void 0:X.getAttribute(xe))??H.getAttribute(xe);if(!J)return;const ne=O.getBoundingClientRect(),V=ne.width>0?O.clientWidth/ne.width:1,re=ne.height>0?O.clientHeight/ne.height:1,ye=(xt,ot)=>({x:ne.left+xt/V,y:ne.top+ot/re}),Se=O.contentWindow;if(!Se)return;const ve=P.clientX,De=P.clientY;let ke=!1;const _e=()=>{Se.removeEventListener("mousemove",lt),Se.removeEventListener("mouseup",ft)},lt=xt=>{ke||Math.hypot(xt.clientX-ve,xt.clientY-De)<=4||(ke=!0,_e(),h([J]),g(J),u==null||u(J,ve,De,{sourceWindow:Se,toStagePoint:ye}),xt.preventDefault(),xt.stopPropagation())},ft=()=>{_e()};Se.addEventListener("mousemove",lt),Se.addEventListener("mouseup",ft)},H.ondblclick=P=>{const X=T(P,E.current)??Xr(P.target,E.current);if((X==null?void 0:X.getAttribute("data-editable"))==="text"){const V=X.getAttribute(xe);if(V){P.preventDefault(),P.stopPropagation(),ie(V);return}}const J=H.getAttribute(xe),ne=C.current;if(J&&H.getAttribute("data-group")==="true"){P.preventDefault(),P.stopPropagation(),de(J);return}if(H.getAttribute("data-editable")==="text"){if(J&&ne&&ne.slideId===n.id&&ne.elementId===J){P.stopPropagation();return}P.preventDefault(),P.stopPropagation(),J&&ie(J)}};return()=>{N.removeEventListener("wheel",D),N.removeEventListener("dblclick",_,!0)}},[n,de,ie,Y,a,u,W]);function T(O,N){var H;const L=(H=a.current)==null?void 0:H.contentDocument;if(!L)return null;const D=Array.from(L.querySelectorAll(`[data-editable="text"][${xe}]`)).filter(P=>Xr(P,N)===P),_=D.find(P=>{const X=P.getBoundingClientRect();return O.clientX>=X.left&&O.clientX<=X.right&&O.clientY>=X.top&&O.clientY<=X.bottom});if(_)return _;const U=D.map(P=>{const X=P.getBoundingClientRect(),J=Math.min(Math.max(O.clientX,X.left),X.right),ne=Math.min(Math.max(O.clientY,X.top),X.bottom);return{candidate:P,distance:Math.hypot(O.clientX-J,O.clientY-ne)}}).sort((P,X)=>P.distance-X.distance)[0];return U&&U.distance<=24?U.candidate:null}return v.useEffect(()=>{var N;const O=(N=a.current)==null?void 0:N.contentDocument;O&&pv(O,x)},[x,a]),v.useEffect(()=>{var ke;const O=S;if(!O||!n||O.slideId!==n.id)return;const N=a.current,L=N==null?void 0:N.contentDocument;if(!N||!L)return;const D=L.querySelector(bh(O.elementId));if(!D)return;const _=()=>{M.current(O.elementId,D.textContent||"")};let U=!1;const H=D.style.display,P=D.style.alignItems,X=D.style.overflow,J=D.style.cursor,ne=D.onblur,V=D.onclick,re=D.onkeydown,ye=D.onmousedown,Se=D.onmouseup,ve=(ke=D.ownerDocument.defaultView)==null?void 0:ke.getComputedStyle(D),De=(ve==null?void 0:ve.display)??"";return D.setAttribute("contenteditable","plaintext-only"),D.setAttribute("spellcheck","false"),D.setAttribute("data-hse-editing","true"),D.style.cursor="text",D.style.overflow="visible",De==="inline-flex"?(D.style.display="inline-block",D.style.alignItems="normal"):(De==="flex"||De==="grid"||De==="inline-grid")&&(D.style.display="block",D.style.alignItems="normal"),D.focus(),nD(D),D.onkeydown=_e=>{if(_e.key==="Enter"&&!_e.shiftKey){_e.preventDefault(),_();return}_e.key==="Escape"&&(_e.preventDefault(),R.current())},D.onmousedown=()=>{U=!1},D.onmouseup=()=>{const _e=D.ownerDocument.getSelection(),lt=_e==null?void 0:_e.anchorNode,ft=_e==null?void 0:_e.focusNode,xt=lt?D.contains(lt):!1,ot=ft?D.contains(ft):!1;U=!!(_e&&!_e.isCollapsed&&xt&&ot)},D.onclick=_e=>{_e.stopPropagation(),U&&(_e.preventDefault(),U=!1)},D.onblur=()=>{window.setTimeout(()=>{var Sn;if(((Sn=C.current)==null?void 0:Sn.elementId)!==O.elementId)return;const _e=D.ownerDocument.getSelection(),lt=_e==null?void 0:_e.anchorNode,ft=_e==null?void 0:_e.focusNode,xt=D.ownerDocument.activeElement,ot=!!(_e&&!_e.isCollapsed)&&!!(lt&&D.contains(lt))&&!!(ft&&D.contains(ft));xt===D||ot||_()},0)},()=>{var _e;(_e=D.ownerDocument.getSelection())==null||_e.removeAllRanges(),D.ownerDocument.activeElement===D&&D.blur(),D.removeAttribute("contenteditable"),D.removeAttribute("spellcheck"),D.removeAttribute("data-hse-editing"),D.style.cursor=J,D.style.display=H,D.style.alignItems=P,D.style.overflow=X,D.onblur=ne,D.onclick=V,D.onkeydown=re,D.onmousedown=ye,D.onmouseup=Se}},[n,a,S]),{selectedElementId:B,selectedElementIds:f,preselectedElementId:m,activeGroupScopeId:x,isEditingText:!!(n&&(S==null?void 0:S.slideId)===n.id),setSelectedElementId:te,setSelectedElementIds:h,beginTextEditing:ie,beginGroupEditingScope:de,exitGroupEditingScope:K,clearSelection:ae,clearPreselection:Y,updatePointerPreselection:q,retargetPointerSelection:z,openPointerSelectionContextMenu:W}}function aD(n,a={}){var x;const{onSlidesChange:r}=a,[i,s]=v.useReducer($s,n,Iv),[u,f]=v.useState(((x=n[0])==null?void 0:x.id)??"");v.useEffect(()=>{var y;s({type:"history.reset",slides:n}),f(((y=n[0])==null?void 0:y.id)??"")},[n]);const h=v.useMemo(()=>i.slides.find(y=>y.id===u)??i.slides[0],[u,i.slides]),m=(h==null?void 0:h.id)??"";function g(y){var S;return y.some(A=>A.id===u)||f(((S=y[0])==null?void 0:S.id)??""),r==null||r(y),y}return{slides:i.slides,activeSlide:h,activeSlideId:m,undoDepth:i.undoStack.length,redoDepth:i.redoStack.length,setActiveSlideId:f,commitOperation:y=>{const S=$s(i,{type:"history.commit",operation:y});return s({type:"history.commit",operation:y}),g(S.slides)},runUndo:()=>{const y=$s(i,{type:"history.undo"});s({type:"history.undo"}),g(y.slides)},runRedo:()=>{const y=$s(i,{type:"history.redo"});s({type:"history.redo"}),g(y.slides)}}}const rD=["-webkit-","-moz-","-ms-"],lD=new Set(["appearance","caret-color","color-interpolation","color-rendering","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","math-depth","math-shift","print-color-adjust","ruby-align","ruby-position","speak","text-size-adjust"]);function iD(n){return rD.some(a=>n.startsWith(a))?!1:!lD.has(n)}function sD(n){const a=window.getComputedStyle(n),r=[];for(const i of Array.from(a)){if(!iD(i))continue;const s=i==="transform"&&n.style.transform?n.style.transform.trim():a.getPropertyValue(i).trim();s.length!==0&&r.push({name:i,value:s})}return r.sort((i,s)=>i.name.localeCompare(s.name))}function cD({iframeRef:n,activeSlide:a,selectedElement:r,selectedElementIds:i,preselectedElementId:s,scale:u,offsetX:f,offsetY:h,slideWidth:m,slideHeight:g}){const x=i.join("\0"),y=s??"",[S,A]=v.useState({key:"",rect:null}),[C,E]=v.useState({key:"",rect:null}),[M,R]=v.useState({key:"",rect:null}),[j,B]=v.useState([]),Y=S.key===x?S.rect:null,te=C.key===y?C.rect:null,$=M.key===x?M.rect:null;return v.useEffect(()=>{const q=n.current,z=q==null?void 0:q.contentDocument;if(!q||!z||!a){A({key:x,rect:null}),E({key:y,rect:null}),R({key:x,rect:null}),B([]);return}const W=z.querySelector(a.rootSelector),ie=i[0]?Ke(z,i[0]):W;if(!ie){A({key:x,rect:null}),E({key:y,rect:null}),R({key:x,rect:null}),B([]);return}const de=sD(ie);B(T=>dD(T,de)?T:de);const K=W==null?void 0:W.getBoundingClientRect();let ae=null;if(!i.length||!W||!K)ae=null;else{const T=i.map(O=>Ke(z,O)).filter(O=>!!O).map(O=>Kr(O.getBoundingClientRect(),K,{scale:u,offsetX:f,offsetY:h}));T.length&&(ae=T.reduce((O,N)=>{const L=Math.min(O.x,N.x),D=Math.min(O.y,N.y),_=Math.max(O.x+O.width,N.x+N.width),U=Math.max(O.y+O.height,N.y+N.height);return{x:L,y:D,width:_-L,height:U-D}}))}A(T=>Hf(T,x,ae)?T:{key:x,rect:ae}),R(T=>Hf(T,x,ae)?T:{key:x,rect:ae});const fe=s?Ke(z,s):null,pe=fe&&K?Kr(fe.getBoundingClientRect(),K,{scale:u,offsetX:f,offsetY:h}):null;E(T=>Hf(T,y,pe)?T:{key:y,rect:pe})},[a,n,f,h,s,y,u,i,x,g,m]),{selectedStageRect:Y,preselectionOverlay:te,selectionOverlay:$,selectionLabel:(r==null?void 0:r.type)||"element",inspectedStyles:j}}function Hf(n,a,r){return n.key===a&&uD(n.rect,r)}function uD(n,a){return n===a?!0:!n||!a?!1:n.x===a.x&&n.y===a.y&&n.width===a.width&&n.height===a.height}function dD(n,a){return n.length!==a.length?!1:n.every((r,i)=>{const s=a[i];return(s==null?void 0:s.name)===r.name&&s.value===r.value})}function fD(n,a){if(n.match(/^[a-z]+:\/\//i))return n;if(n.match(/^\/\//))return window.location.protocol+n;if(n.match(/^[a-z]+:/i))return n;const r=document.implementation.createHTMLDocument(),i=r.createElement("base"),s=r.createElement("a");return r.head.appendChild(i),r.body.appendChild(s),a&&(i.href=a),s.href=n,s.href}const hD=(()=>{let n=0;const a=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${a()}${n}`)})();function Ta(n){const a=[];for(let r=0,i=n.length;r<i;r++)a.push(n[r]);return a}let Vr=null;function mS(n={}){return Vr||(n.includeStyleProperties?(Vr=n.includeStyleProperties,Vr):(Vr=Ta(window.getComputedStyle(document.documentElement)),Vr))}function _c(n,a){const i=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(a);return i?parseFloat(i.replace("px","")):0}function mD(n){const a=_c(n,"border-left-width"),r=_c(n,"border-right-width");return n.clientWidth+a+r}function pD(n){const a=_c(n,"border-top-width"),r=_c(n,"border-bottom-width");return n.clientHeight+a+r}function pS(n,a={}){const r=a.width||mD(n),i=a.height||pD(n);return{width:r,height:i}}function gD(){let n,a;try{a=process}catch{}const r=a&&a.env?a.env.devicePixelRatio:null;return r&&(n=parseInt(r,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}const Dn=16384;function yD(n){(n.width>Dn||n.height>Dn)&&(n.width>Dn&&n.height>Dn?n.width>n.height?(n.height*=Dn/n.width,n.width=Dn):(n.width*=Dn/n.height,n.height=Dn):n.width>Dn?(n.height*=Dn/n.width,n.width=Dn):(n.width*=Dn/n.height,n.height=Dn))}function Nc(n){return new Promise((a,r)=>{const i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>a(i))})},i.onerror=r,i.crossOrigin="anonymous",i.decoding="async",i.src=n})}async function vD(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(a=>`data:image/svg+xml;charset=utf-8,${a}`)}async function bD(n,a,r){const i="http://www.w3.org/2000/svg",s=document.createElementNS(i,"svg"),u=document.createElementNS(i,"foreignObject");return s.setAttribute("width",`${a}`),s.setAttribute("height",`${r}`),s.setAttribute("viewBox",`0 0 ${a} ${r}`),u.setAttribute("width","100%"),u.setAttribute("height","100%"),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("externalResourcesRequired","true"),s.appendChild(u),u.appendChild(n),vD(s)}const xn=(n,a)=>{if(n instanceof a)return!0;const r=Object.getPrototypeOf(n);return r===null?!1:r.constructor.name===a.name||xn(r,a)};function xD(n){const a=n.getPropertyValue("content");return`${n.cssText} content: '${a.replace(/'|"/g,"")}';`}function SD(n,a){return mS(a).map(r=>{const i=n.getPropertyValue(r),s=n.getPropertyPriority(r);return`${r}: ${i}${s?" !important":""};`}).join(" ")}function wD(n,a,r,i){const s=`.${n}:${a}`,u=r.cssText?xD(r):SD(r,i);return document.createTextNode(`${s}{${u}}`)}function gv(n,a,r,i){const s=window.getComputedStyle(n,r),u=s.getPropertyValue("content");if(u===""||u==="none")return;const f=hD();try{a.className=`${a.className} ${f}`}catch{return}const h=document.createElement("style");h.appendChild(wD(f,r,s,i)),a.appendChild(h)}function ED(n,a,r){gv(n,a,":before",r),gv(n,a,":after",r)}const yv="application/font-woff",vv="image/jpeg",CD={woff:yv,woff2:yv,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:vv,jpeg:vv,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function TD(n){const a=/\.([^./]*?)$/g.exec(n);return a?a[1]:""}function nm(n){const a=TD(n).toLowerCase();return CD[a]||""}function AD(n){return n.split(/,/)[1]}function gh(n){return n.search(/^(data:)/)!==-1}function MD(n,a){return`data:${a};base64,${n}`}async function gS(n,a,r){const i=await fetch(n,a);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);const s=await i.blob();return new Promise((u,f)=>{const h=new FileReader;h.onerror=f,h.onloadend=()=>{try{u(r({res:i,result:h.result}))}catch(m){f(m)}},h.readAsDataURL(s)})}const Bf={};function _D(n,a,r){let i=n.replace(/\?.*/,"");return r&&(i=n),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),a?`[${a}]${i}`:i}async function om(n,a,r){const i=_D(n,a,r.includeQueryParams);if(Bf[i]!=null)return Bf[i];r.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let s;try{const u=await gS(n,r.fetchRequestInit,({res:f,result:h})=>(a||(a=f.headers.get("Content-Type")||""),AD(h)));s=MD(u,a)}catch(u){s=r.imagePlaceholder||"";let f=`Failed to fetch resource: ${n}`;u&&(f=typeof u=="string"?u:u.message),f&&console.warn(f)}return Bf[i]=s,s}async function ND(n){const a=n.toDataURL();return a==="data:,"?n.cloneNode(!1):Nc(a)}async function RD(n,a){if(n.currentSrc){const u=document.createElement("canvas"),f=u.getContext("2d");u.width=n.clientWidth,u.height=n.clientHeight,f==null||f.drawImage(n,0,0,u.width,u.height);const h=u.toDataURL();return Nc(h)}const r=n.poster,i=nm(r),s=await om(r,i,a);return Nc(s)}async function OD(n,a){var r;try{if(!((r=n==null?void 0:n.contentDocument)===null||r===void 0)&&r.body)return await Fc(n.contentDocument.body,a,!0)}catch{}return n.cloneNode(!1)}async function DD(n,a){return xn(n,HTMLCanvasElement)?ND(n):xn(n,HTMLVideoElement)?RD(n,a):xn(n,HTMLIFrameElement)?OD(n,a):n.cloneNode(yS(n))}const jD=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT",yS=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SVG";async function zD(n,a,r){var i,s;if(yS(a))return a;let u=[];return jD(n)&&n.assignedNodes?u=Ta(n.assignedNodes()):xn(n,HTMLIFrameElement)&&(!((i=n.contentDocument)===null||i===void 0)&&i.body)?u=Ta(n.contentDocument.body.childNodes):u=Ta(((s=n.shadowRoot)!==null&&s!==void 0?s:n).childNodes),u.length===0||xn(n,HTMLVideoElement)||await u.reduce((f,h)=>f.then(()=>Fc(h,r)).then(m=>{m&&a.appendChild(m)}),Promise.resolve()),a}function kD(n,a,r){const i=a.style;if(!i)return;const s=window.getComputedStyle(n);s.cssText?(i.cssText=s.cssText,i.transformOrigin=s.transformOrigin):mS(r).forEach(u=>{let f=s.getPropertyValue(u);u==="font-size"&&f.endsWith("px")&&(f=`${Math.floor(parseFloat(f.substring(0,f.length-2)))-.1}px`),xn(n,HTMLIFrameElement)&&u==="display"&&f==="inline"&&(f="block"),u==="d"&&a.getAttribute("d")&&(f=`path(${a.getAttribute("d")})`),i.setProperty(u,f,s.getPropertyPriority(u))})}function LD(n,a){xn(n,HTMLTextAreaElement)&&(a.innerHTML=n.value),xn(n,HTMLInputElement)&&a.setAttribute("value",n.value)}function HD(n,a){if(xn(n,HTMLSelectElement)){const i=Array.from(a.children).find(s=>n.value===s.getAttribute("value"));i&&i.setAttribute("selected","")}}function BD(n,a,r){return xn(a,Element)&&(kD(n,a,r),ED(n,a,r),LD(n,a),HD(n,a)),a}async function UD(n,a){const r=n.querySelectorAll?n.querySelectorAll("use"):[];if(r.length===0)return n;const i={};for(let u=0;u<r.length;u++){const h=r[u].getAttribute("xlink:href");if(h){const m=n.querySelector(h),g=document.querySelector(h);!m&&g&&!i[h]&&(i[h]=await Fc(g,a,!0))}}const s=Object.values(i);if(s.length){const u="http://www.w3.org/1999/xhtml",f=document.createElementNS(u,"svg");f.setAttribute("xmlns",u),f.style.position="absolute",f.style.width="0",f.style.height="0",f.style.overflow="hidden",f.style.display="none";const h=document.createElementNS(u,"defs");f.appendChild(h);for(let m=0;m<s.length;m++)h.appendChild(s[m]);n.appendChild(f)}return n}async function Fc(n,a,r){return!r&&a.filter&&!a.filter(n)?null:Promise.resolve(n).then(i=>DD(i,a)).then(i=>zD(n,i,a)).then(i=>BD(n,i,a)).then(i=>UD(i,a))}const vS=/url\((['"]?)([^'"]+?)\1\)/g,ID=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,PD=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function $D(n){const a=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${a})(['"]?\\))`,"g")}function GD(n){const a=[];return n.replace(vS,(r,i,s)=>(a.push(s),r)),a.filter(r=>!gh(r))}async function YD(n,a,r,i,s){try{const u=r?fD(a,r):a,f=nm(a);let h;return s||(h=await om(u,f,i)),n.replace($D(a),`$1${h}$3`)}catch{}return n}function VD(n,{preferredFontFormat:a}){return a?n.replace(PD,r=>{for(;;){const[i,,s]=ID.exec(r)||[];if(!s)return"";if(s===a)return`src: ${i};`}}):n}function bS(n){return n.search(vS)!==-1}async function xS(n,a,r){if(!bS(n))return n;const i=VD(n,r);return GD(i).reduce((u,f)=>u.then(h=>YD(h,f,a,r)),Promise.resolve(i))}async function qr(n,a,r){var i;const s=(i=a.style)===null||i===void 0?void 0:i.getPropertyValue(n);if(s){const u=await xS(s,null,r);return a.style.setProperty(n,u,a.style.getPropertyPriority(n)),!0}return!1}async function qD(n,a){await qr("background",n,a)||await qr("background-image",n,a),await qr("mask",n,a)||await qr("-webkit-mask",n,a)||await qr("mask-image",n,a)||await qr("-webkit-mask-image",n,a)}async function XD(n,a){const r=xn(n,HTMLImageElement);if(!(r&&!gh(n.src))&&!(xn(n,SVGImageElement)&&!gh(n.href.baseVal)))return;const i=r?n.src:n.href.baseVal,s=await om(i,nm(i),a);await new Promise((u,f)=>{n.onload=u,n.onerror=a.onImageErrorHandler?(...m)=>{try{u(a.onImageErrorHandler(...m))}catch(g){f(g)}}:f;const h=n;h.decode&&(h.decode=u),h.loading==="lazy"&&(h.loading="eager"),r?(n.srcset="",n.src=s):n.href.baseVal=s})}async function FD(n,a){const i=Ta(n.childNodes).map(s=>SS(s,a));await Promise.all(i).then(()=>n)}async function SS(n,a){xn(n,Element)&&(await qD(n,a),await XD(n,a),await FD(n,a))}function KD(n,a){const{style:r}=n;a.backgroundColor&&(r.backgroundColor=a.backgroundColor),a.width&&(r.width=`${a.width}px`),a.height&&(r.height=`${a.height}px`);const i=a.style;return i!=null&&Object.keys(i).forEach(s=>{r[s]=i[s]}),n}const bv={};async function xv(n){let a=bv[n];if(a!=null)return a;const i=await(await fetch(n)).text();return a={url:n,cssText:i},bv[n]=a,a}async function Sv(n,a){let r=n.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,u=(r.match(/url\([^)]+\)/g)||[]).map(async f=>{let h=f.replace(i,"$1");return h.startsWith("https://")||(h=new URL(h,n.url).href),gS(h,a.fetchRequestInit,({result:m})=>(r=r.replace(f,`url(${m})`),[f,m]))});return Promise.all(u).then(()=>r)}function wv(n){if(n==null)return[];const a=[],r=/(\/\*[\s\S]*?\*\/)/gi;let i=n.replace(r,"");const s=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const m=s.exec(i);if(m===null)break;a.push(m[0])}i=i.replace(s,"");const u=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,f="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",h=new RegExp(f,"gi");for(;;){let m=u.exec(i);if(m===null){if(m=h.exec(i),m===null)break;u.lastIndex=h.lastIndex}else h.lastIndex=u.lastIndex;a.push(m[0])}return a}async function QD(n,a){const r=[],i=[];return n.forEach(s=>{if("cssRules"in s)try{Ta(s.cssRules||[]).forEach((u,f)=>{if(u.type===CSSRule.IMPORT_RULE){let h=f+1;const m=u.href,g=xv(m).then(x=>Sv(x,a)).then(x=>wv(x).forEach(y=>{try{s.insertRule(y,y.startsWith("@import")?h+=1:s.cssRules.length)}catch(S){console.error("Error inserting rule from remote css",{rule:y,error:S})}})).catch(x=>{console.error("Error loading remote css",x.toString())});i.push(g)}})}catch(u){const f=n.find(h=>h.href==null)||document.styleSheets[0];s.href!=null&&i.push(xv(s.href).then(h=>Sv(h,a)).then(h=>wv(h).forEach(m=>{f.insertRule(m,f.cssRules.length)})).catch(h=>{console.error("Error loading remote stylesheet",h)})),console.error("Error inlining remote css file",u)}}),Promise.all(i).then(()=>(n.forEach(s=>{if("cssRules"in s)try{Ta(s.cssRules||[]).forEach(u=>{r.push(u)})}catch(u){console.error(`Error while reading CSS rules from ${s.href}`,u)}}),r))}function ZD(n){return n.filter(a=>a.type===CSSRule.FONT_FACE_RULE).filter(a=>bS(a.style.getPropertyValue("src")))}async function WD(n,a){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Ta(n.ownerDocument.styleSheets),i=await QD(r,a);return ZD(i)}function wS(n){return n.trim().replace(/["']/g,"")}function JD(n){const a=new Set;function r(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(u=>{a.add(wS(u))}),Array.from(i.children).forEach(u=>{u instanceof HTMLElement&&r(u)})}return r(n),a}async function ej(n,a){const r=await WD(n,a),i=JD(n);return(await Promise.all(r.filter(u=>i.has(wS(u.style.fontFamily))).map(u=>{const f=u.parentStyleSheet?u.parentStyleSheet.href:null;return xS(u.cssText,f,a)}))).join(`
455
+ `)}async function tj(n,a){const r=a.fontEmbedCSS!=null?a.fontEmbedCSS:a.skipFonts?null:await ej(n,a);if(r){const i=document.createElement("style"),s=document.createTextNode(r);i.appendChild(s),n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}}async function nj(n,a={}){const{width:r,height:i}=pS(n,a),s=await Fc(n,a,!0);return await tj(s,a),await SS(s,a),KD(s,a),await bD(s,r,i)}async function oj(n,a={}){const{width:r,height:i}=pS(n,a),s=await nj(n,a),u=await Nc(s),f=document.createElement("canvas"),h=f.getContext("2d"),m=a.pixelRatio||gD(),g=a.canvasWidth||r,x=a.canvasHeight||i;return f.width=g*m,f.height=x*m,a.skipAutoScale||yD(f),f.style.width=`${g}`,f.style.height=`${x}`,a.backgroundColor&&(h.fillStyle=a.backgroundColor,h.fillRect(0,0,f.width,f.height)),h.drawImage(u,0,0,f.width,f.height),f}async function aj(n,a={}){return(await oj(n,a)).toDataURL()}const Ev=224,rj=2;function lj(n){return new Promise(a=>{window.setTimeout(a,n)})}async function ij(n){var a;if((a=n.fonts)!=null&&a.ready)try{await n.fonts.ready}catch{}}async function sj(n){const a=document.createElement("iframe");a.setAttribute("aria-hidden","true"),a.tabIndex=-1,a.style.position="fixed",a.style.left="-10000px",a.style.top="0",a.style.width=`${n.width}px`,a.style.height=`${n.height}px`,a.style.opacity="0",a.style.pointerEvents="none",a.style.border="0",document.body.appendChild(a);try{const r=a.contentDocument;if(!r)throw new Error("Unable to access thumbnail iframe document.");r.open(),r.write(n.htmlSource),r.close(),await ij(r),await lj(50);const i=r.querySelector(n.rootSelector);if(!i)throw new Error("Slide root not found while rendering thumbnail.");const s=r.body??i;return await aj(s,{cacheBust:!0,pixelRatio:rj,canvasWidth:Ev,canvasHeight:Math.round(n.height/n.width*Ev),backgroundColor:"white",skipFonts:!1})}finally{a.remove()}}const cj=300;function uj(n){const[a,r]=v.useState({}),i=v.useRef(new Map),s=v.useMemo(()=>n.map(u=>({id:u.id,key:`${u.id}:${u.htmlSource}`})),[n]);return v.useEffect(()=>{let u=!1;const f=window.setTimeout(async()=>{const h={};for(const m of n){const g=`${m.id}:${m.htmlSource}`,x=i.current.get(g);if(x){h[m.id]=x;continue}try{const y=await sj(m);i.current.set(g,y),h[m.id]=y}catch{}if(u)return}u||r(m=>({...m,...h}))},cj);return()=>{u=!0,window.clearTimeout(f)}},[n]),v.useEffect(()=>{const u=new Set(s.map(f=>f.key));for(const f of i.current.keys())u.has(f)||i.current.delete(f)},[s]),a}function dj({stageViewportRef:n,slideWidth:a,slideHeight:r}){const[i,s]=v.useState({width:0,height:0});v.useEffect(()=>{const g=n.current;if(!g)return;const x=()=>{const S=g.getBoundingClientRect();s(A=>A.width===S.width&&A.height===S.height?A:{width:S.width,height:S.height})};x();const y=new ResizeObserver(()=>{x()});return y.observe(g),()=>{y.disconnect()}},[n]);const u=Math.min(i.width>0?i.width/a:1,i.height>0?i.height/r:1),f=Number.isFinite(u)&&u>0?u:1,h=a*f,m=r*f;return{scale:f,offsetX:Math.max((i.width-h)/2,0),offsetY:Math.max((i.height-m)/2,0)}}function fj({slides:n,deckTitle:a,isSaving:r=!1,onSlidesChange:i,onDeckTitleChange:s,onExportPdf:u,onExportHtml:f}){const{slides:h,activeSlide:m,activeSlideId:g,undoDepth:x,redoDepth:y,setActiveSlideId:S,commitOperation:A,runUndo:C,runRedo:E}=aD(n,{onSlidesChange:i}),M=v.useRef(null),R=v.useRef(null),j=v.useRef(null),B=v.useRef(null),Y=v.useRef(()=>{}),te=v.useRef(null),[$,q]=v.useState(!1),[z,W]=v.useState(!1),ie=uj(h),de=v.useCallback((ee,ce)=>{const me=B.current;me&&me.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:ee,clientY:ce,button:2,buttons:2}))},[]),{selectedElementId:K,selectedElementIds:ae,preselectedElementId:fe,isEditingText:pe,activeGroupScopeId:T,setSelectedElementId:O,setSelectedElementIds:N,beginTextEditing:L,beginGroupEditingScope:D,clearSelection:_,clearPreselection:U,updatePointerPreselection:H,retargetPointerSelection:P}=oD({activeSlide:m,iframeRef:M,onCommitOperation:A,onOpenSelectionContextMenu:de,onStageWheel:ao,onBeginPointerMove:v.useCallback((ee,ce,me,ge)=>{Y.current(ee,ce,me,ge)},[])}),X=m==null?void 0:m.elements.find(ee=>ee.id===K),J=m==null?void 0:m.elements.find(ee=>ee.id===T),ne=ae.length>1?"multi":(X==null?void 0:X.type)??(J==null?void 0:J.type)??"block",V=m?ae.map(ee=>m.elements.find(ce=>ce.id===ee)).filter(ee=>!!ee):[],re={group:ae.length>=2&&V.length===ae.length,ungroup:ae.length===1&&!!((X==null?void 0:X.type)==="group"||m&&K&&hj(m.htmlSource,K))},ye=!!T&&ae.length===1&&K===T,Se=a??"",ve=(m==null?void 0:m.width)||Ea,De=(m==null?void 0:m.height)||Ca,{scale:ke,offsetX:_e,offsetY:lt}=dj({stageViewportRef:R,slideWidth:ve,slideHeight:De}),{selectedStageRect:ft,preselectionOverlay:xt,selectionOverlay:ot,inspectedStyles:Sn}=cD({iframeRef:M,activeSlide:m,selectedElement:X,selectedElementIds:ae,preselectedElementId:fe,scale:ke,offsetX:_e,offsetY:lt,slideWidth:ve,slideHeight:De}),{manipulationOverlay:wn,isManipulating:Tt,suppressBackgroundClear:on,beginMove:St,beginResize:Yo,beginRotate:je}=B3({activeSlide:m,selectedElement:X,selectedElementId:K,selectedElementIds:ae,selectedStageRect:ft,iframeRef:M,stageGeometry:{scale:ke,offsetX:_e,offsetY:lt,slideWidth:ve,slideHeight:De},isEditingText:pe,onCommitOperation:A});Y.current=(ee,ce,me,ge)=>{St({clientX:ce,clientY:me,...ge,preventDefault:()=>{},stopPropagation:()=>{}},ee)};const Je=(wn==null?void 0:wn.selectionBounds)??ot,Ne=K??"slide-root",an={locked:m?ri(m,Ne,"data-editor-locked"):"",altText:m?ri(m,Ne,"alt"):"",ariaLabel:m?ri(m,Ne,"aria-label"):"",linkUrl:m?ri(m,Ne,"data-link-url"):""};function Gt(ee,ce){if(!m)return;const me=p3({elementId:Ne,nextValue:ce,propertyName:ee,slide:m});me&&A(me)}function vo(ee,ce){if(!m)return;const me=g3({attributeName:ee,elementId:Ne,nextValue:ce,slide:m});me&&A(me)}function un(ee){if(!m||ae.length===0)return;const ce=ae.map(me=>{const ge=uS(m,me,"z-index"),Ue=Number.parseInt(ge,10),Oe=Number.isFinite(Ue)?Ue:0,Pe=ee==="front"?"999":ee==="back"?"0":String(Math.max(0,Oe+(ee==="forward"?1:-1)));return ge===Pe?null:{type:"style.update",slideId:m.id,elementId:me,propertyName:"z-index",previousValue:ge,nextValue:Pe,timestamp:Date.now()}}).filter(me=>!!me);rn(ce)}function rn(ee){!m||ee.length===0||A(ee.length===1?ee[0]:{type:"operation.batch",slideId:m.id,operations:ee,timestamp:Date.now()})}function Lt(ee,ce,me){var Pe;const ge={[ce]:me},Oe=(Pe=new DOMParser().parseFromString(`<template>${ee}</template>`,"text/html").querySelector("template"))==null?void 0:Pe.content.firstElementChild;if(!(Oe instanceof HTMLElement))return ge;for(const Qe of Oe.querySelectorAll(`[${xe}]`)){const et=Qe.getAttribute(xe);et&&(ge[et]=`${me}-${et}`)}return ge}function Ht(){var Pe;if(!m||ae.length===0)return;const ee=(Pe=M.current)==null?void 0:Pe.contentDocument,ce=ee==null?void 0:ee.querySelector(m.rootSelector),me=ce==null?void 0:ce.getBoundingClientRect();let ge=m.htmlSource;const Ue=[],Oe=ae.map(Qe=>{const et=dc(m.htmlSource,Qe),dn=uc(m.htmlSource,Qe),pt=ee?Ke(ee,Qe):null;if(!et||!dn||!pt||!me)return null;const sn=Gf(ge,`${Qe}-copy`),Yt=zv(et,Lt(et,Qe,sn)),At=fh(fS(pt.getBoundingClientRect(),me),24,24),fn=dS(Yt,At);return ge=`${ge}
456
+ <!-- ${sn} reserved -->`,Ue.push(sn),{type:"element.insert",slideId:m.id,elementId:sn,...dn,html:fn,timestamp:Date.now()}}).filter(Qe=>!!Qe);rn(Oe),Ue.length&&N(Ue)}function ut(){if(!m||ae.length===0)return;const ee=ae.map(ce=>{const me=dc(m.htmlSource,ce),ge=uc(m.htmlSource,ce);return!me||!ge?null:{type:"element.remove",slideId:m.id,elementId:ce,...ge,html:me,timestamp:Date.now()}}).filter(ce=>!!ce);rn(ee),ee.length&&N([])}function Vo(ee){if(!m||h.length<=1)return!1;const ce=h.findIndex(Ue=>Ue.id===m.id);if(ce<0)return!1;const me=ee==="previous"?Math.max(0,ce-1):Math.min(h.length-1,ce+1),ge=h[me];return!ge||ge.id===m.id?!1:(S(ge.id),O(null),!0)}function ao(ee){if(ae.length||pe||Tt)return;const ce=Math.abs(ee.deltaY)>=Math.abs(ee.deltaX)?ee.deltaY:ee.deltaX;Math.abs(ce)<24||Vo(ce>0?"next":"previous")&&(ee.preventDefault(),ee.stopPropagation())}function It(ee){if(!m||h.length===0)return;const ce=LE(h,ee);A({type:"slide.create",slide:ce,index:ee,timestamp:Date.now()}),S(ce.id),_()}function kn(){if(!m)return;const ee=h.findIndex(me=>me.id===m.id),ce=ee>=0?ee+1:h.length;It(ce)}function Kn(ee){const ce=h.findIndex(me=>me.id===ee);ce<0||It(ce)}function ln(ee){const ce=h.findIndex(me=>me.id===ee);ce<0||It(ce+1)}function Qt(ee){const ce=h.find(Oe=>Oe.id===ee);if(!ce)return;const me=h.findIndex(Oe=>Oe.id===ee),ge=me>=0?me+1:h.length,Ue=HE(h,ce);A({type:"slide.duplicate",sourceSlideId:ee,slide:Ue,index:ge,timestamp:Date.now()}),S(Ue.id),_()}function ze(ee){if(h.length<=1)return;const ce=h.findIndex(Ue=>Ue.id===ee),me=h[ce];if(!me)return;const ge=h[ce+1]??h[ce-1]??h[0];A({type:"slide.delete",slide:me,index:ce,timestamp:Date.now()}),g===ee&&S((ge==null?void 0:ge.id)??""),_()}function ht(ee){const ce=h.find(me=>me.id===ee);ce&&A({type:"slide.visibility.update",slideId:ee,previousHidden:ce.hidden===!0,nextHidden:ce.hidden!==!0,timestamp:Date.now()})}function Rt(ee,ce){const me=h.find(Ue=>Ue.id===ee),ge=ce.trim()||"Untitled Slide";!me||me.title===ge||A({type:"slide.title.update",slideId:ee,previousTitle:me.title,nextTitle:ge,timestamp:Date.now()})}function Pt(ee,ce){const me=h.findIndex(ge=>ge.id===ee);me<0||me===ce||(A({type:"slide.reorder",slideId:ee,fromIndex:me,toIndex:ce,timestamp:Date.now()}),S(ee))}function ro(){if(!m||ae.length<2)return;const ee=mt(),ce=Gf(m.htmlSource,"group-1"),me=AE({html:m.htmlSource,slideId:m.id,groupElementId:ce,elementRects:ee,elementIds:ae});me&&(A(me),N([ce]))}function mt(ee){var dn;const ce=(dn=M.current)==null?void 0:dn.contentDocument,me=ce==null?void 0:ce.querySelector((m==null?void 0:m.rootSelector)??"");if(!ce||!me)return{};const ge=me.getBoundingClientRect(),Ue=m?m.width/ge.width:1,Oe=m?m.height/ge.height:1,Pe={},Qe=Cv(ce,ee),et=[...Array.from(ce.querySelectorAll(`[data-editable][${xe}]`)),...Array.from(Qe.keys())];for(const pt of et){const sn=pt.getAttribute(xe)||Qe.get(pt);if(!sn)continue;const Yt=pt.getBoundingClientRect(),At=pt.parentElement,fn=At!=null&&At.hasAttribute("data-editable")&&At.getAttribute(xe)?At.getAttribute(xe):null,gt=fn?Pe[fn]??{x:0,y:0,width:ge.width,height:ge.height}:{x:0,y:0,width:ge.width,height:ge.height};Pe[sn]={x:(Yt.left-ge.left)*Ue-gt.x,y:(Yt.top-ge.top)*Oe-gt.y,width:Yt.width*Ue,height:Yt.height*Oe}}return Pe}function Zt(){if(!m||ae.length!==1||!K)return;const ee=ME({html:m.htmlSource,slideId:m.id,groupElementId:K,elementRects:mt(K),elementPresentationStyles:bo(K)});ee&&(A(ee),N(ee.childElementIds))}function bo(ee){var Oe,Pe,Qe;const ce=(Oe=M.current)==null?void 0:Oe.contentDocument;if(!ce)return{};const me=Ke(ce,ee);if(!me||me.getAttribute("data-group")==="true")return{};const ge={},Ue=Cv(ce,ee);for(const et of Array.from(me.children)){if(!et.hasAttribute("data-editable")&&!am(et))continue;const dn=et.getAttribute(xe)||Ue.get(et),pt=(Pe=et.ownerDocument.defaultView)==null?void 0:Pe.getComputedStyle(et);if(!(!dn||!pt)){ge[dn]={color:pt.color,fontSize:pt.fontSize,fontWeight:pt.fontWeight,fontStyle:pt.fontStyle,lineHeight:pt.lineHeight,textAlign:pt.textAlign,paddingTop:pt.paddingTop,paddingRight:pt.paddingRight,paddingBottom:pt.paddingBottom,paddingLeft:pt.paddingLeft,listStylePosition:pt.listStylePosition,listStyleType:pt.listStyleType};for(const sn of Array.from(et.querySelectorAll(`[data-editable][${xe}]`))){const Yt=sn.getAttribute(xe),At=(Qe=sn.ownerDocument.defaultView)==null?void 0:Qe.getComputedStyle(sn);!Yt||!At||(ge[Yt]={color:At.color,fontSize:At.fontSize,fontWeight:At.fontWeight,fontStyle:At.fontStyle,lineHeight:At.lineHeight,textAlign:At.textAlign})}}}return ge}function Wt(ee){var et;if(!m||!K||!Je)return;const ce=(et=M.current)==null?void 0:et.contentDocument,me=ce?Ke(ce,K):null;if(!me)return;const ge={x:(Je.x-_e)/ke,y:(Je.y-lt)/ke,width:Je.width/ke,height:Je.height/ke};let Ue=0,Oe=0;if(ee==="left"?Ue=-ge.x:ee==="hcenter"?Ue=ve/2-(ge.x+ge.width/2):ee==="right"?Ue=ve-(ge.x+ge.width):ee==="top"?Oe=-ge.y:ee==="vcenter"?Oe=De/2-(ge.y+ge.height/2):ee==="bottom"&&(Oe=De-(ge.y+ge.height)),Math.abs(Ue)<.01&&Math.abs(Oe)<.01)return;const Pe=Jr(me),Qe=EE(Pe,Ue,Oe,{width:me.getBoundingClientRect().width,height:me.getBoundingClientRect().height});rn([{type:"element.layout.update",slideId:m.id,elementId:K,previousStyle:Pe,nextStyle:Qe,timestamp:Date.now()}])}function Jt(ee){var fn;if(!m||ae.length<3)return;const ce=(fn=M.current)==null?void 0:fn.contentDocument,me=ce==null?void 0:ce.querySelector(m.rootSelector),ge=me==null?void 0:me.getBoundingClientRect();if(!ce||!ge)return;const Ue=ae.map(gt=>{const En=Ke(ce,gt);if(!En)return null;const Cn=En.getBoundingClientRect();return{elementId:gt,node:En,rect:{x:Cn.left-ge.left,y:Cn.top-ge.top,width:Cn.width,height:Cn.height}}}).filter(gt=>!!gt);if(Ue.length<3)return;const Oe=ee==="vertical"?"y":"x",Pe=ee==="vertical"?"height":"width",Qe=[...Ue].sort((gt,En)=>gt.rect[Oe]-En.rect[Oe]),et=Qe[0],dn=Qe[Qe.length-1];if(!et||!dn)return;const pt=et.rect[Oe]+et.rect[Pe]/2,Yt=(dn.rect[Oe]+dn.rect[Pe]/2-pt)/(Qe.length-1),At=Qe.map((gt,En)=>{const Cn=pt+Yt*En,Ot=gt.rect[Oe]+gt.rect[Pe]/2,ul=Cn-Ot;if(Math.abs(ul)<.01)return null;const dl=Jr(gt.node),Ln={...gt.rect,[Oe]:gt.rect[Oe]+ul},qo=wh({...mi({previousStyle:dl,left:Ln.x,top:Ln.y,width:Ln.width,height:Ln.height})});return{type:"element.layout.update",slideId:m.id,elementId:gt.elementId,previousStyle:dl,nextStyle:qo,timestamp:Date.now()}}).filter(gt=>!!gt);rn(At)}return K3({activeSlide:m,selectedElementIds:ae,iframeRef:M,slideWidth:ve,slideHeight:De,isEditingText:pe,canUndo:x>0,canRedo:y>0,onCommitOperation:A,onSelectElementIds:N,onEscapeSelection:_,onNavigateSlide:Vo,onUndo:C,onRedo:E}),m?p.jsx(m3,{children:p.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[p.jsxs("div",{className:`flex min-h-0 flex-auto flex-col ${$?"invisible pointer-events-none absolute inset-0":""}`,children:[p.jsx(sA,{title:Se,onTitleChange:s,isSaving:r,onPresent:()=>{_(),q(!0)},onExportHtml:f,pdfSlides:h.map(ee=>({id:ee.id,title:ee.title,file:ee.sourceFile})),pdfThumbnails:ie,onExportPdf:u}),p.jsxs("div",{className:"flex min-h-0 flex-auto gap-3 overflow-hidden max-[1200px]:block",children:[p.jsx(rO,{slides:h,activeSlideId:m.id,slideCount:h.length,thumbnails:ie,onSelectSlide:ee=>{S(ee),O(null)},onAdd:kn,onAddSlideAbove:Kn,onAddSlideBelow:ln,onDuplicate:Qt,onDelete:ze,onToggleHidden:ht,onRename:Rt,onReorder:Pt}),p.jsx("main",{className:"flex min-h-0 min-w-0 flex-auto overflow-visible max-[1200px]:block",children:p.jsx(f3,{slideWidth:ve,slideHeight:De,offsetX:_e,offsetY:lt,scale:ke,preselectionOverlay:xt,selectionOverlay:Je,toolbarKey:ae.length?`${m.id}:${ae.join(",")}`:null,inspectedStyles:Sn,selectedElementType:ne,selectionCommandAvailability:re,groupScopeOverlayPassive:ye,isEditingText:pe,manipulationOverlay:wn,iframeRef:M,stageViewportRef:R,selectionOverlayRef:j,selectionContextMenuTriggerRef:B,isManipulating:Tt,isToolbarSuppressed:z,onSelectionOverlayMouseDown:ee=>{if(ee.button!==0||!ae.length)return;W(!0);const ce=ee.shiftKey||ee.metaKey||ee.ctrlKey,me=H(ee.clientX,ee.clientY);if(te.current={clientX:ee.clientX,clientY:ee.clientY,additive:ce,targetElementId:me},me&&me!==K){ee.stopPropagation();return}me&&me===K&&ee.stopPropagation(),St({clientX:ee.clientX,clientY:ee.clientY,preventDefault:()=>ee.preventDefault(),stopPropagation:()=>ee.stopPropagation()})},onSelectionOverlayMouseMove:ee=>{const ce=te.current;if(H(ee.clientX,ee.clientY),!ce||ce.targetElementId===K)return;const me=ee.clientX-ce.clientX,ge=ee.clientY-ce.clientY;Math.hypot(me,ge)<=4||(te.current=null,St({clientX:ce.clientX,clientY:ce.clientY,preventDefault:()=>ee.preventDefault(),stopPropagation:()=>ee.stopPropagation()}))},onSelectionOverlayContextMenu:ee=>{ee.preventDefault(),ee.stopPropagation(),de(ee.clientX,ee.clientY)},onSelectionOverlayMouseUp:ee=>{const ce=te.current;if(te.current=null,W(!1),!ce)return;const me=ee.clientX-ce.clientX,ge=ee.clientY-ce.clientY;Math.hypot(me,ge)>4||P(ee.clientX,ee.clientY,ce.additive)},onStageMouseLeave:U,onResizeHandleMouseDown:(ee,ce)=>{ae.length&&Yo(ee,{clientX:ce.clientX,clientY:ce.clientY,preventDefault:()=>ce.preventDefault(),stopPropagation:()=>ce.stopPropagation()})},onRotateHandleMouseDown:ee=>{ae.length===1&&je({clientX:ee.clientX,clientY:ee.clientY,preventDefault:()=>ee.preventDefault(),stopPropagation:()=>ee.stopPropagation()})},onSelectionOverlayDoubleClick:ee=>{var ce;if(T&&((ce=M.current)!=null&&ce.contentDocument)){const me=M.current.getBoundingClientRect(),ge=M.current.contentDocument,Ue=me.width/M.current.clientWidth||1,Oe=me.height/M.current.clientHeight||1,Pe={x:(ee.clientX-me.left)/Ue,y:(ee.clientY-me.top)/Oe},Qe=mj(ge,T,Pe),et=Qe==null?void 0:Qe.getAttribute(xe);if(et){L(et);return}}if(ae.length===1&&(X==null?void 0:X.type)==="text"&&K){L(K);return}ae.length===1&&(X==null?void 0:X.type)==="group"&&K&&D(K)},onBackgroundClick:()=>{on||_()},onStageWheel:ao,onStyleChange:Gt,onAttributeChange:vo,onAlignToSlide:Wt,onDistribute:Jt,onGroup:ro,onLayerOrder:un,onUngroup:Zt,onDuplicate:Ht,onDelete:ut,attributeValues:an})})]})]}),$?p.jsx(aO,{slides:h,startSlideId:m.id,onExit:()=>q(!1)}):null]})}):p.jsx("div",{className:"grid min-h-screen place-items-center",children:"No slides loaded."})}function hj(n,a){if(typeof DOMParser>"u")return!1;const r=new DOMParser().parseFromString(n,"text/html"),i=Ke(r,a);return!i||i.getAttribute("data-editable")!=="block"?!1:Array.from(i.children).some(s=>s instanceof HTMLElement&&(s.hasAttribute("data-editable")||am(s)))}function Cv(n,a){const r=new Map;if(!a)return r;const i=Ke(n,a);if(!i||i.getAttribute("data-group")==="true")return r;const s=new Set(Array.from(n.querySelectorAll(`[${xe}]`)).map(f=>f.getAttribute(xe)).filter(f=>!!f)),u=f=>{if(!s.has(f))return s.add(f),f;const h=f.match(/^(.*?)(?:-(\d+))?$/),m=(h==null?void 0:h[1])||f;let g=Number.parseInt((h==null?void 0:h[2])||"1",10)+1;for(;s.has(`${m}-${g}`);)g+=1;const x=`${m}-${g}`;return s.add(x),x};for(const f of Array.from(i.children))am(f)&&r.set(f,f.getAttribute(xe)||u("block-1"));return r}function am(n){const a=n.tagName.toLowerCase();return a!=="ul"&&a!=="ol"?!1:Array.from(n.children).some(r=>r.tagName.toLowerCase()==="li"&&r.hasAttribute("data-editable"))}function mj(n,a,r){const i=Ke(n,a);if(!i)return null;const s=n.elementFromPoint(r.x,r.y),u=s==null?void 0:s.closest(`[data-editable="text"][${xe}]`);if(u&&i.contains(u))return u;const f=Array.from(i.querySelectorAll(`[data-editable="text"][${xe}]`)),h=f.find(g=>{const x=g.getBoundingClientRect();return r.x>=x.left&&r.x<=x.right&&r.y>=x.top&&r.y<=x.bottom});if(h)return h;const m=f.map(g=>{const x=g.getBoundingClientRect(),y=Math.min(Math.max(r.x,x.left),x.right),S=Math.min(Math.max(r.y,x.top),x.bottom);return{candidate:g,distance:Math.hypot(r.x-y,r.y-S)}}).sort((g,x)=>g.distance-x.distance)[0];return m&&m.distance<=24?m.candidate:null}const pj="/deck/manifest.json",gj="/__editor/save-generated-deck",yj="/__editor/export-pdf",vj="/__editor/export-html",Uf=800;function bj(){const[n,a]=v.useState("Generated deck"),[r,i]=v.useState([]),[s,u]=v.useState(null),[f,h]=v.useState(!0),[m,g]=v.useState(!1),x=v.useRef(null),y=v.useRef([]),S=v.useRef(null),A=v.useRef(null),C=v.useRef(null),E=v.useRef(0),M=v.useRef(!1),R=v.useRef(null),j=v.useRef(Date.now());v.useEffect(()=>{let z=!1;return UE({manifestUrl:`${pj}?v=${Date.now()}`}).then(W=>{if(z)return;if(!W){a("Generated deck"),i([]),u("No slides were found at /deck/manifest.json."),h(!1);return}x.current=W.manifest;const ie=W.manifest.topic||"Generated deck";A.current=ie,a(ie),i(W.slides),y.current=W.slides,u(null),h(!1)}).catch(()=>{z||(a("Generated deck"),i([]),u("The app could not load the generated deck."),h(!1))}),()=>{z=!0,C.current&&window.clearTimeout(C.current)}},[]);const B=async()=>{var pe;const z=x.current,W=S.current??y.current,ie=A.current??n,de=E.current;if(!((pe=z==null?void 0:z.slides)!=null&&pe.length)||!(W!=null&&W.length))return;if(M.current){await R.current,E.current!==de&&await B();return}M.current=!0;const K=new Map(y.current.map((T,O)=>{var N,L;return[T.id,T.sourceFile??((L=(N=z.slides)==null?void 0:N[O])==null?void 0:L.file)]})),ae=W.flatMap(T=>{const O=T.sourceFile??K.get(T.id);return O?[{file:O,title:T.title,hidden:T.hidden===!0?!0:void 0}]:[]}),fe=fetch(gj,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientLoadedAt:j.current,manifest:{...z,topic:ie,slides:ae},slides:W.map(T=>({file:T.sourceFile??K.get(T.id),htmlSource:T.htmlSource,title:T.title,hidden:T.hidden===!0}))})}).then(T=>{if(!T.ok)throw new Error("The app could not write generated slides back to disk.")}).catch(T=>{throw u("The app could not write generated slides back to disk."),T}).finally(()=>{if(M.current=!1,R.current=null,E.current!==de){C.current||(C.current=window.setTimeout(()=>{C.current=null,B()},Uf));return}g(!1)});R.current=fe,await fe};return{deckTitle:n,slides:r,errorMessage:s,isLoading:f,isSaving:m,saveSlides:z=>{var ie;if(y.current===z)return;const W=x.current;(ie=W==null?void 0:W.slides)!=null&&ie.length&&(y.current=z,S.current=z,E.current+=1,g(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,B()},Uf))},saveDeckTitle:z=>{const W=z.trim()||"Untitled deck";a(z),A.current=W,E.current+=1,g(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,B()},Uf)},exportPdf:async z=>{C.current&&(window.clearTimeout(C.current),C.current=null),await B();const W=await fetch(yj,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({selection:z})});if(!W.ok)throw new Error(await W.text());const ie=await W.blob(),de=URL.createObjectURL(ie),K=document.createElement("a"),ae=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";K.href=de,K.download=`${ae}.pdf`,document.body.appendChild(K),K.click(),K.remove(),URL.revokeObjectURL(de)},exportHtml:async()=>{C.current&&(window.clearTimeout(C.current),C.current=null),await B();const z=await fetch(vj,{method:"POST"});if(!z.ok)throw new Error(await z.text());const W=await z.blob(),ie=URL.createObjectURL(W),de=document.createElement("a"),K=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";de.href=ie,de.download=`${K}.html`,document.body.appendChild(de),de.click(),de.remove(),URL.revokeObjectURL(ie)}}}function Tv({title:n,body:a}){return p.jsx("main",{style:{minHeight:"100vh",display:"grid",placeItems:"center",padding:"32px",background:"#f4efe8",color:"#241d16",fontFamily:'"Avenir Next", "Segoe UI", sans-serif'},children:p.jsxs("section",{style:{maxWidth:"720px",padding:"32px",borderRadius:"24px",background:"rgba(255, 255, 255, 0.82)",boxShadow:"0 24px 80px rgba(74, 53, 31, 0.12)"},children:[p.jsx("h1",{style:{margin:"0 0 12px",fontSize:"40px",lineHeight:1.05},children:n}),p.jsx("p",{style:{margin:0,fontSize:"20px",lineHeight:1.5},children:a})]})})}function xj(){const{deckTitle:n,slides:a,errorMessage:r,isLoading:i,isSaving:s,saveSlides:u,saveDeckTitle:f,exportPdf:h,exportHtml:m}=bj();return i?p.jsx(Tv,{title:"Loading generated deck",body:"The app is importing the latest generated slides."}):r?p.jsx(Tv,{title:"Generated deck required",body:r}):p.jsxs(p.Fragment,{children:[p.jsx(gE,{position:"top-center",richColors:!0,closeButton:!0}),p.jsx(fj,{slides:a,deckTitle:n,isSaving:s,onSlidesChange:u,onDeckTitleChange:f,onExportPdf:g=>{const x=Sa.loading("Exporting PDF...");h(g).then(()=>{Sa.success("PDF export is ready.",{id:x})}).catch(y=>{Sa.error("PDF export failed.",{id:x,description:y instanceof Error?y.message:String(y)})})},onExportHtml:()=>{const g=Sa.loading("Exporting HTML...");m().then(()=>{Sa.success("HTML export is ready.",{id:g})}).catch(x=>{Sa.error("HTML export failed.",{id:g,description:x instanceof Error?x.message:String(x)})})}})]})}const ES=document.getElementById("root");if(!ES)throw new Error("Root element #root was not found.");G2.createRoot(ES).render(p.jsx(he.StrictMode,{children:p.jsx(xj,{})}));