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.
- package/LICENSE +10 -0
- package/README.md +131 -0
- package/dist/assets/index---ub3Dty.css +1 -0
- package/dist/assets/index-7Xs_Dyp0.js +354 -0
- package/dist/assets/index-8ul7coaw.js +451 -0
- package/dist/assets/index-B4_bJa9t.js +412 -0
- package/dist/assets/index-B9p6L9Wx.js +324 -0
- package/dist/assets/index-BF-Vi1Nh.js +413 -0
- package/dist/assets/index-BKvVbgXz.css +1 -0
- package/dist/assets/index-BNZJ_Wz-.js +417 -0
- package/dist/assets/index-BO2gtiKn.js +413 -0
- package/dist/assets/index-BYpD8kgo.js +456 -0
- package/dist/assets/index-BaZRfz_9.css +1 -0
- package/dist/assets/index-BlsWm4PI.js +412 -0
- package/dist/assets/index-BnUIBFtw.js +393 -0
- package/dist/assets/index-BvhCbfCi.js +412 -0
- package/dist/assets/index-BxEkxfy1.js +412 -0
- package/dist/assets/index-BzrA7O0L.js +422 -0
- package/dist/assets/index-C0xGkdRg.js +413 -0
- package/dist/assets/index-C1Rjncf1.js +456 -0
- package/dist/assets/index-CCgb2gqc.js +413 -0
- package/dist/assets/index-CDFJQRFx.js +413 -0
- package/dist/assets/index-CEOai0RW.js +456 -0
- package/dist/assets/index-CG2uWTey.css +1 -0
- package/dist/assets/index-CLe3_iTu.js +412 -0
- package/dist/assets/index-CS_optob.js +324 -0
- package/dist/assets/index-CXgwXOZH.css +1 -0
- package/dist/assets/index-CcBvAcE2.js +408 -0
- package/dist/assets/index-CllmR_MT.js +408 -0
- package/dist/assets/index-CnMy6wxq.js +412 -0
- package/dist/assets/index-CoWNjYgb.js +422 -0
- package/dist/assets/index-CtfA3BPy.css +1 -0
- package/dist/assets/index-D-JiuJIv.js +324 -0
- package/dist/assets/index-D2uEYXyQ.css +1 -0
- package/dist/assets/index-D70beOHW.js +456 -0
- package/dist/assets/index-D8xuxnF1.js +456 -0
- package/dist/assets/index-DKAtkRd8.css +1 -0
- package/dist/assets/index-DU3l9_k0.css +1 -0
- package/dist/assets/index-DaLY98jk.js +456 -0
- package/dist/assets/index-DkNHJHQl.js +412 -0
- package/dist/assets/index-DmFnifK8.js +456 -0
- package/dist/assets/index-DndZR7Ds.css +1 -0
- package/dist/assets/index-DuRa7Y6g.js +324 -0
- package/dist/assets/index-EnDjTeHF.js +451 -0
- package/dist/assets/index-J3nQgjqJ.js +451 -0
- package/dist/assets/index-wD_iWTBn.js +413 -0
- package/dist/chunk-AK5J4CXH.js +1671 -0
- package/dist/chunk-ARFDESSF.js +1583 -0
- package/dist/chunk-DHWTBXGS.js +985 -0
- package/dist/chunk-FCRRFL7N.js +1571 -0
- package/dist/chunk-J7W4Y7WJ.js +1620 -0
- package/dist/chunk-OCJULB7Z.js +1140 -0
- package/dist/chunk-WCJWV5SO.js +36 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +1119 -0
- package/dist/cli/index.test.d.ts +1 -0
- package/dist/core/deck-slide-operations.d.ts +5 -0
- package/dist/core/generated-deck.d.ts +8 -0
- package/dist/core/generated-deck.test.d.ts +1 -0
- package/dist/core/group-operations.d.ts +24 -0
- package/dist/core/history.d.ts +20 -0
- package/dist/core/history.test.d.ts +1 -0
- package/dist/core/html-export.d.ts +20 -0
- package/dist/core/index.d.ts +11 -0
- package/dist/core/layout.d.ts +36 -0
- package/dist/core/layout.test.d.ts +1 -0
- package/dist/core/pdf-export.d.ts +20 -0
- package/dist/core/presentation.d.ts +7 -0
- package/dist/core/slide-contract.d.ts +41 -0
- package/dist/core/slide-document.d.ts +5 -0
- package/dist/core/slide-document.test.d.ts +1 -0
- package/dist/core/slide-html-document.d.ts +3 -0
- package/dist/core/slide-operation-reducer.d.ts +4 -0
- package/dist/core/slide-operation-reducer.test.d.ts +1 -0
- package/dist/core/slide-operation-types.d.ts +123 -0
- package/dist/core/slide-operations-helpers.d.ts +14 -0
- package/dist/core/slide-operations.d.ts +5 -0
- package/dist/core/slide-operations.test.d.ts +1 -0
- package/dist/core/verify-deck.d.ts +48 -0
- package/dist/core/verify-deck.test.d.ts +1 -0
- package/dist/editor/app/App.d.ts +2 -0
- package/dist/editor/app/main.d.ts +1 -0
- package/dist/editor/app/use-slides-data.d.ts +14 -0
- package/dist/editor/components/block-manipulation-overlay.d.ts +32 -0
- package/dist/editor/components/color-picker.d.ts +10 -0
- package/dist/editor/components/context-menu.d.ts +26 -0
- package/dist/editor/components/editor-header.d.ts +18 -0
- package/dist/editor/components/floating-toolbar-feature.d.ts +8 -0
- package/dist/editor/components/floating-toolbar-parts.d.ts +46 -0
- package/dist/editor/components/floating-toolbar.d.ts +27 -0
- package/dist/editor/components/presenter-view.d.ts +13 -0
- package/dist/editor/components/slide-sidebar.d.ts +18 -0
- package/dist/editor/components/stage-canvas.d.ts +77 -0
- package/dist/editor/components/ui/accordion.d.ts +7 -0
- package/dist/editor/components/ui/button.d.ts +10 -0
- package/dist/editor/components/ui/context-menu.d.ts +25 -0
- package/dist/editor/components/ui/dialog.d.ts +10 -0
- package/dist/editor/components/ui/input.d.ts +3 -0
- package/dist/editor/components/ui/popover.d.ts +10 -0
- package/dist/editor/components/ui/scroll-area.d.ts +5 -0
- package/dist/editor/components/ui/select.d.ts +15 -0
- package/dist/editor/components/ui/separator.d.ts +4 -0
- package/dist/editor/components/ui/tabs.d.ts +11 -0
- package/dist/editor/components/ui/textarea.d.ts +3 -0
- package/dist/editor/components/ui/toggle-group.d.ts +9 -0
- package/dist/editor/components/ui/toggle.d.ts +9 -0
- package/dist/editor/components/ui/tooltip.d.ts +7 -0
- package/dist/editor/editor-operations.d.ts +15 -0
- package/dist/editor/hooks/block-manipulation-geometry.d.ts +16 -0
- package/dist/editor/hooks/block-manipulation-operations.d.ts +10 -0
- package/dist/editor/hooks/block-manipulation-overlay.d.ts +11 -0
- package/dist/editor/hooks/block-manipulation-types.d.ts +73 -0
- package/dist/editor/hooks/editor-keyboard-geometry.d.ts +22 -0
- package/dist/editor/hooks/editor-keyboard-operations.d.ts +10 -0
- package/dist/editor/hooks/editor-keyboard-types.d.ts +35 -0
- package/dist/editor/hooks/iframe-editing-session.d.ts +10 -0
- package/dist/editor/hooks/iframe-text-editing-dom.d.ts +6 -0
- package/dist/editor/hooks/iframe-text-editing-types.d.ts +38 -0
- package/dist/editor/hooks/object-clipboard-commands.d.ts +28 -0
- package/dist/editor/hooks/use-block-manipulation.d.ts +3 -0
- package/dist/editor/hooks/use-editor-keyboard-shortcuts.d.ts +3 -0
- package/dist/editor/hooks/use-iframe-text-editing.d.ts +3 -0
- package/dist/editor/hooks/use-slide-history.d.ts +17 -0
- package/dist/editor/hooks/use-slide-inspector.d.ts +24 -0
- package/dist/editor/hooks/use-slide-thumbnails.d.ts +2 -0
- package/dist/editor/hooks/use-stage-viewport.d.ts +13 -0
- package/dist/editor/index.d.ts +13 -0
- package/dist/editor/index.js +8260 -0
- package/dist/editor/lib/block-snap-constants.d.ts +8 -0
- package/dist/editor/lib/block-snap-guides.d.ts +6 -0
- package/dist/editor/lib/block-snap-targets.d.ts +13 -0
- package/dist/editor/lib/block-snap-types.d.ts +30 -0
- package/dist/editor/lib/block-snapping.d.ts +17 -0
- package/dist/editor/lib/collect-css-properties.d.ts +5 -0
- package/dist/editor/lib/element-tool-commit.d.ts +18 -0
- package/dist/editor/lib/element-tool-model.d.ts +16 -0
- package/dist/editor/lib/element-tool-types.d.ts +35 -0
- package/dist/editor/lib/element-tool-values.d.ts +23 -0
- package/dist/editor/lib/motion.d.ts +8 -0
- package/dist/editor/lib/selection-overlay.d.ts +4 -0
- package/dist/editor/lib/style-controls.d.ts +17 -0
- package/dist/editor/lib/thumbnail-renderer.d.ts +2 -0
- package/dist/editor/lib/utils.d.ts +3 -0
- package/dist/index.html +13 -0
- package/dist/node/deck-runtime-middleware.d.ts +8 -0
- package/dist/node/deck-source.d.ts +1 -0
- package/dist/node/html-export.d.ts +16 -0
- package/dist/node/open-browser.d.ts +1 -0
- package/dist/node/pdf-export.d.ts +20 -0
- package/dist/node/ports.d.ts +1 -0
- package/dist/node/view-renderer.d.ts +31 -0
- package/dist/runtime/deck-source.d.ts +1 -0
- package/dist/runtime/html-export.d.ts +16 -0
- package/dist/runtime/open-browser.d.ts +1 -0
- package/dist/runtime/pdf-export.d.ts +20 -0
- package/dist/runtime/ports.d.ts +1 -0
- package/dist/runtime/view-renderer.d.ts +31 -0
- package/dist/runtime/view-renderer.test.d.ts +1 -0
- package/dist/test/deck-fixtures.d.ts +14 -0
- package/package.json +94 -0
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
function Sw(n,l){for(var o=0;o<l.length;o++){const i=l[o];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(i,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function o(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function i(c){if(c.ep)return;c.ep=!0;const f=o(c);fetch(c.href,f)}})();function kd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Tf={exports:{}},Uo={};/**
|
|
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 uy;function ww(){if(uy)return Uo;uy=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function o(i,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:n,type:i,key:d,ref:c!==void 0?c:null,props:f}}return Uo.Fragment=l,Uo.jsx=o,Uo.jsxs=o,Uo}var fy;function Ew(){return fy||(fy=1,Tf.exports=ww()),Tf.exports}var v=Ew(),Cf={exports:{}},ze={};/**
|
|
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 dy;function Tw(){if(dy)return ze;dy=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),S=Symbol.iterator;function E(_){return _===null||typeof _!="object"?null:(_=S&&_[S]||_["@@iterator"],typeof _=="function"?_:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,A={};function R(_,H,J){this.props=_,this.context=H,this.refs=A,this.updater=J||T}R.prototype.isReactComponent={},R.prototype.setState=function(_,H){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,_,H,"setState")},R.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function O(){}O.prototype=R.prototype;function D(_,H,J){this.props=_,this.context=H,this.refs=A,this.updater=J||T}var X=D.prototype=new O;X.constructor=D,C(X,R.prototype),X.isPureReactComponent=!0;var le=Array.isArray;function V(){}var U={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function Q(_,H,J){var ie=J.ref;return{$$typeof:n,type:_,key:H,ref:ie!==void 0?ie:null,props:J}}function ne(_,H){return Q(_.type,H,_.props)}function fe(_){return typeof _=="object"&&_!==null&&_.$$typeof===n}function B(_){var H={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(J){return H[J]})}var I=/\/+/g;function $(_,H){return typeof _=="object"&&_!==null&&_.key!=null?B(""+_.key):H.toString(36)}function Y(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(V,V):(_.status="pending",_.then(function(H){_.status==="pending"&&(_.status="fulfilled",_.value=H)},function(H){_.status==="pending"&&(_.status="rejected",_.reason=H)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function M(_,H,J,ie,ee){var me=typeof _;(me==="undefined"||me==="boolean")&&(_=null);var ce=!1;if(_===null)ce=!0;else switch(me){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(_.$$typeof){case n:case l:ce=!0;break;case x:return ce=_._init,M(ce(_._payload),H,J,ie,ee)}}if(ce)return ee=ee(_),ce=ie===""?"."+$(_,0):ie,le(ee)?(J="",ce!=null&&(J=ce.replace(I,"$&/")+"/"),M(ee,H,J,"",function(be){return be})):ee!=null&&(fe(ee)&&(ee=ne(ee,J+(ee.key==null||_&&_.key===ee.key?"":(""+ee.key).replace(I,"$&/")+"/")+ce)),H.push(ee)),1;ce=0;var Z=ie===""?".":ie+":";if(le(_))for(var re=0;re<_.length;re++)ie=_[re],me=Z+$(ie,re),ce+=M(ie,H,J,me,ee);else if(re=E(_),typeof re=="function")for(_=re.call(_),re=0;!(ie=_.next()).done;)ie=ie.value,me=Z+$(ie,re++),ce+=M(ie,H,J,me,ee);else if(me==="object"){if(typeof _.then=="function")return M(Y(_),H,J,ie,ee);throw H=String(_),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return ce}function j(_,H,J){if(_==null)return _;var ie=[],ee=0;return M(_,ie,"","",function(me){return H.call(J,me,ee++)}),ie}function q(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(J){(_._status===0||_._status===-1)&&(_._status=1,_._result=J)},function(J){(_._status===0||_._status===-1)&&(_._status=2,_._result=J)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var P=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},L={map:j,forEach:function(_,H,J){j(_,function(){H.apply(this,arguments)},J)},count:function(_){var H=0;return j(_,function(){H++}),H},toArray:function(_){return j(_,function(H){return H})||[]},only:function(_){if(!fe(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return ze.Activity=p,ze.Children=L,ze.Component=R,ze.Fragment=o,ze.Profiler=c,ze.PureComponent=D,ze.StrictMode=i,ze.Suspense=h,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,ze.__COMPILER_RUNTIME={__proto__:null,c:function(_){return U.H.useMemoCache(_)}},ze.cache=function(_){return function(){return _.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(_,H,J){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var ie=C({},_.props),ee=_.key;if(H!=null)for(me in H.key!==void 0&&(ee=""+H.key),H)!N.call(H,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&H.ref===void 0||(ie[me]=H[me]);var me=arguments.length-2;if(me===1)ie.children=J;else if(1<me){for(var ce=Array(me),Z=0;Z<me;Z++)ce[Z]=arguments[Z+2];ie.children=ce}return Q(_.type,ee,ie)},ze.createContext=function(_){return _={$$typeof:d,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:f,_context:_},_},ze.createElement=function(_,H,J){var ie,ee={},me=null;if(H!=null)for(ie in H.key!==void 0&&(me=""+H.key),H)N.call(H,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(ee[ie]=H[ie]);var ce=arguments.length-2;if(ce===1)ee.children=J;else if(1<ce){for(var Z=Array(ce),re=0;re<ce;re++)Z[re]=arguments[re+2];ee.children=Z}if(_&&_.defaultProps)for(ie in ce=_.defaultProps,ce)ee[ie]===void 0&&(ee[ie]=ce[ie]);return Q(_,me,ee)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(_){return{$$typeof:m,render:_}},ze.isValidElement=fe,ze.lazy=function(_){return{$$typeof:x,_payload:{_status:-1,_result:_},_init:q}},ze.memo=function(_,H){return{$$typeof:g,type:_,compare:H===void 0?null:H}},ze.startTransition=function(_){var H=U.T,J={};U.T=J;try{var ie=_(),ee=U.S;ee!==null&&ee(J,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(V,P)}catch(me){P(me)}finally{H!==null&&J.types!==null&&(H.types=J.types),U.T=H}},ze.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},ze.use=function(_){return U.H.use(_)},ze.useActionState=function(_,H,J){return U.H.useActionState(_,H,J)},ze.useCallback=function(_,H){return U.H.useCallback(_,H)},ze.useContext=function(_){return U.H.useContext(_)},ze.useDebugValue=function(){},ze.useDeferredValue=function(_,H){return U.H.useDeferredValue(_,H)},ze.useEffect=function(_,H){return U.H.useEffect(_,H)},ze.useEffectEvent=function(_){return U.H.useEffectEvent(_)},ze.useId=function(){return U.H.useId()},ze.useImperativeHandle=function(_,H,J){return U.H.useImperativeHandle(_,H,J)},ze.useInsertionEffect=function(_,H){return U.H.useInsertionEffect(_,H)},ze.useLayoutEffect=function(_,H){return U.H.useLayoutEffect(_,H)},ze.useMemo=function(_,H){return U.H.useMemo(_,H)},ze.useOptimistic=function(_,H){return U.H.useOptimistic(_,H)},ze.useReducer=function(_,H,J){return U.H.useReducer(_,H,J)},ze.useRef=function(_){return U.H.useRef(_)},ze.useState=function(_){return U.H.useState(_)},ze.useSyncExternalStore=function(_,H,J){return U.H.useSyncExternalStore(_,H,J)},ze.useTransition=function(){return U.H.useTransition()},ze.version="19.2.5",ze}var my;function Ld(){return my||(my=1,Cf.exports=Tw()),Cf.exports}var b=Ld();const pe=kd(b),P0=Sw({__proto__:null,default:pe},[b]);var Mf={exports:{}},Io={},Af={exports:{}},_f={};/**
|
|
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 hy;function Cw(){return hy||(hy=1,(function(n){function l(M,j){var q=M.length;M.push(j);e:for(;0<q;){var P=q-1>>>1,L=M[P];if(0<c(L,j))M[P]=j,M[q]=L,q=P;else break e}}function o(M){return M.length===0?null:M[0]}function i(M){if(M.length===0)return null;var j=M[0],q=M.pop();if(q!==j){M[0]=q;e:for(var P=0,L=M.length,_=L>>>1;P<_;){var H=2*(P+1)-1,J=M[H],ie=H+1,ee=M[ie];if(0>c(J,q))ie<L&&0>c(ee,J)?(M[P]=ee,M[ie]=q,P=ie):(M[P]=J,M[H]=q,P=H);else if(ie<L&&0>c(ee,q))M[P]=ee,M[ie]=q,P=ie;else break e}}return j}function c(M,j){var q=M.sortIndex-j.sortIndex;return q!==0?q:M.id-j.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var h=[],g=[],x=1,p=null,S=3,E=!1,T=!1,C=!1,A=!1,R=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function X(M){for(var j=o(g);j!==null;){if(j.callback===null)i(g);else if(j.startTime<=M)i(g),j.sortIndex=j.expirationTime,l(h,j);else break;j=o(g)}}function le(M){if(C=!1,X(M),!T)if(o(h)!==null)T=!0,V||(V=!0,B());else{var j=o(g);j!==null&&Y(le,j.startTime-M)}}var V=!1,U=-1,N=5,Q=-1;function ne(){return A?!0:!(n.unstable_now()-Q<N)}function fe(){if(A=!1,V){var M=n.unstable_now();Q=M;var j=!0;try{e:{T=!1,C&&(C=!1,O(U),U=-1),E=!0;var q=S;try{t:{for(X(M),p=o(h);p!==null&&!(p.expirationTime>M&&ne());){var P=p.callback;if(typeof P=="function"){p.callback=null,S=p.priorityLevel;var L=P(p.expirationTime<=M);if(M=n.unstable_now(),typeof L=="function"){p.callback=L,X(M),j=!0;break t}p===o(h)&&i(h),X(M)}else i(h);p=o(h)}if(p!==null)j=!0;else{var _=o(g);_!==null&&Y(le,_.startTime-M),j=!1}}break e}finally{p=null,S=q,E=!1}j=void 0}}finally{j?B():V=!1}}}var B;if(typeof D=="function")B=function(){D(fe)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,$=I.port2;I.port1.onmessage=fe,B=function(){$.postMessage(null)}}else B=function(){R(fe,0)};function Y(M,j){U=R(function(){M(n.unstable_now())},j)}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(M){M.callback=null},n.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<M?Math.floor(1e3/M):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(M){switch(S){case 1:case 2:case 3:var j=3;break;default:j=S}var q=S;S=j;try{return M()}finally{S=q}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(M,j){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var q=S;S=M;try{return j()}finally{S=q}},n.unstable_scheduleCallback=function(M,j,q){var P=n.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?P+q:P):q=P,M){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=q+L,M={id:x++,callback:j,priorityLevel:M,startTime:q,expirationTime:L,sortIndex:-1},q>P?(M.sortIndex=q,l(g,M),o(h)===null&&M===o(g)&&(C?(O(U),U=-1):C=!0,Y(le,q-P))):(M.sortIndex=L,l(h,M),T||E||(T=!0,V||(V=!0,B()))),M},n.unstable_shouldYield=ne,n.unstable_wrapCallback=function(M){var j=S;return function(){var q=S;S=j;try{return M.apply(this,arguments)}finally{S=q}}}})(_f)),_f}var py;function Mw(){return py||(py=1,Af.exports=Cw()),Af.exports}var Rf={exports:{}},Pt={};/**
|
|
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 gy;function Aw(){if(gy)return Pt;gy=1;var n=Ld();function l(h){var g="https://react.dev/errors/"+h;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 #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var i={d:{f:o,r:function(){throw Error(l(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(h,g,x){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:p==null?null:""+p,children:h,containerInfo:g,implementation:x}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Pt.createPortal=function(h,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(l(299));return f(h,g,null,x)},Pt.flushSync=function(h){var g=d.T,x=i.p;try{if(d.T=null,i.p=2,h)return h()}finally{d.T=g,i.p=x,i.d.f()}},Pt.preconnect=function(h,g){typeof h=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(h,g))},Pt.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},Pt.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var x=g.as,p=m(x,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,E=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?i.d.S(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:p,integrity:S,fetchPriority:E}):x==="script"&&i.d.X(h,{crossOrigin:p,integrity:S,fetchPriority:E,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Pt.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=m(g.as,g.crossOrigin);i.d.M(h,{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(h)},Pt.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,p=m(x,g.crossOrigin);i.d.L(h,x,{crossOrigin:p,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})}},Pt.preloadModule=function(h,g){if(typeof h=="string")if(g){var x=m(g.as,g.crossOrigin);i.d.m(h,{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(h)},Pt.requestFormReset=function(h){i.d.r(h)},Pt.unstable_batchedUpdates=function(h,g){return h(g)},Pt.useFormState=function(h,g,x){return d.H.useFormState(h,g,x)},Pt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Pt.version="19.2.5",Pt}var yy;function X0(){if(yy)return Rf.exports;yy=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(l){console.error(l)}}return n(),Rf.exports=Aw(),Rf.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 vy;function _w(){if(vy)return Io;vy=1;var n=Mw(),l=Ld(),o=X0();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(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 m(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 h(e){if(f(e)!==e)throw Error(i(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,r=t;;){var s=a.return;if(s===null)break;var u=s.alternate;if(u===null){if(r=s.return,r!==null){a=r;continue}break}if(s.child===u.child){for(u=s.child;u;){if(u===a)return h(s),e;if(u===r)return h(s),t;u=u.sibling}throw Error(i(188))}if(a.return!==r.return)a=s,r=u;else{for(var y=!1,w=s.child;w;){if(w===a){y=!0,a=s,r=u;break}if(w===r){y=!0,r=s,a=u;break}w=w.sibling}if(!y){for(w=u.child;w;){if(w===a){y=!0,a=u,r=s;break}if(w===r){y=!0,r=u,a=s;break}w=w.sibling}if(!y)throw Error(i(189))}}if(a.alternate!==r)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?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 p=Object.assign,S=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),D=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),fe=Symbol.iterator;function B(e){return e===null||typeof e!="object"?null:(e=fe&&e[fe]||e["@@iterator"],typeof e=="function"?e:null)}var I=Symbol.for("react.client.reference");function $(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===I?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case R:return"Profiler";case A:return"StrictMode";case le:return"Suspense";case V:return"SuspenseList";case Q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case D:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return t=e.displayName||null,t!==null?t:$(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return $(e(t))}catch{}}return null}var Y=Array.isArray,M=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},P=[],L=-1;function _(e){return{current:e}}function H(e){0>L||(e.current=P[L],P[L]=null,L--)}function J(e,t){L++,P[L]=e.current,e.current=t}var ie=_(null),ee=_(null),me=_(null),ce=_(null);function Z(e,t){switch(J(me,t),J(ee,e),J(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Dg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Dg(t),e=jg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(ie),J(ie,e)}function re(){H(ie),H(ee),H(me)}function be(e){e.memoizedState!==null&&J(ce,e);var t=ie.current,a=jg(t,e.type);t!==a&&(J(ee,e),J(ie,a))}function Me(e){ee.current===e&&(H(ie),H(ee)),ce.current===e&&(H(ce),ko._currentValue=q)}var Ae,Pe;function Ge(e){if(Ae===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ae=t&&t[1]||"",Pe=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ae+e+Pe}var Yt=!1;function St(e,t){if(!e||Yt)return"";Yt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={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(te){var W=te}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(te){W=te}e.call(ue.prototype)}}else{try{throw Error()}catch(te){W=te}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(te){if(te&&W&&typeof te.stack=="string")return[te.stack,W.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=r.DetermineComponentFrameRoot(),y=u[0],w=u[1];if(y&&w){var z=y.split(`
|
|
44
|
+
`),F=w.split(`
|
|
45
|
+
`);for(s=r=0;r<z.length&&!z[r].includes("DetermineComponentFrameRoot");)r++;for(;s<F.length&&!F[s].includes("DetermineComponentFrameRoot");)s++;if(r===z.length||s===F.length)for(r=z.length-1,s=F.length-1;1<=r&&0<=s&&z[r]!==F[s];)s--;for(;1<=r&&0<=s;r--,s--)if(z[r]!==F[s]){if(r!==1||s!==1)do if(r--,s--,0>s||z[r]!==F[s]){var oe=`
|
|
46
|
+
`+z[r].replace(" at new "," at ");return e.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",e.displayName)),oe}while(1<=r&&0<=s);break}}}finally{Yt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ge(a):""}function Ot(e,t){switch(e.tag){case 26:case 27:case 5:return Ge(e.type);case 16:return Ge("Lazy");case 13:return e.child!==t&&t!==null?Ge("Suspense Fallback"):Ge("Suspense");case 19:return Ge("SuspenseList");case 0:case 15:return St(e.type,!1);case 11:return St(e.type.render,!1);case 1:return St(e.type,!0);case 31:return Ge("Activity");default:return""}}function De(e){try{var t="",a=null;do t+=Ot(e,a),a=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var ye=Object.prototype.hasOwnProperty,on=n.unstable_scheduleCallback,sn=n.unstable_cancelCallback,et=n.unstable_shouldYield,Lt=n.unstable_requestPaint,_t=n.unstable_now,xn=n.unstable_getCurrentPriorityLevel,zt=n.unstable_ImmediatePriority,Ra=n.unstable_UserBlockingPriority,Ft=n.unstable_NormalPriority,qn=n.unstable_LowPriority,Qt=n.unstable_IdlePriority,kn=n.log,Vt=n.unstable_setDisableYieldValue,aa=null,Ht=null;function cn(e){if(typeof kn=="function"&&Vt(e),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(aa,e)}catch{}}var Dt=Math.clz32?Math.clz32:Sn,Fr=Math.log,vl=Math.LN2;function Sn(e){return e>>>=0,e===0?32:31-(Fr(e)/vl|0)|0}var Na=256,Oa=262144,Pn=4194304;function wn(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 Re(e,t,a){var r=e.pendingLanes;if(r===0)return 0;var s=0,u=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var w=r&134217727;return w!==0?(r=w&~u,r!==0?s=wn(r):(y&=w,y!==0?s=wn(y):a||(a=w&~e,a!==0&&(s=wn(a))))):(w=r&~u,w!==0?s=wn(w):y!==0?s=wn(y):a||(a=r&~e,a!==0&&(s=wn(a)))),s===0?0:t!==0&&t!==s&&(t&u)===0&&(u=s&-s,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:s}function ut(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wt(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 ae(){var e=Pn;return Pn<<=1,(Pn&62914560)===0&&(Pn=4194304),e}function he(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function de(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ge(e,t,a,r,s,u){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var w=e.entanglements,z=e.expirationTimes,F=e.hiddenUpdates;for(a=y&~a;0<a;){var oe=31-Dt(a),ue=1<<oe;w[oe]=0,z[oe]=-1;var W=F[oe];if(W!==null)for(F[oe]=null,oe=0;oe<W.length;oe++){var te=W[oe];te!==null&&(te.lane&=-536870913)}a&=~ue}r!==0&&Le(e,r,0),u!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=u&~(y&~t))}function Le(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Dt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|a&261930}function Ne(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-Dt(a),s=1<<r;s&t|e[r]&t&&(e[r]|=t),a&=~s}}function Be(e,t){var a=t&-t;return a=(a&42)!==0?1:lt(a),(a&(e.suspendedLanes|t))!==0?0:a}function lt(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 Xe(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function qt(){var e=j.p;return e!==0?e:(e=window.event,e===void 0?32:ay(e.type))}function st(e,t){var a=j.p;try{return j.p=e,t()}finally{j.p=a}}var vt=Math.random().toString(36).slice(2),tt="__reactFiber$"+vt,Ke="__reactProps$"+vt,Zt="__reactContainer$"+vt,Et="__reactEvents$"+vt,la="__reactListeners$"+vt,za="__reactHandles$"+vt,ai="__reactResources$"+vt,ra="__reactMarker$"+vt;function Da(e){delete e[tt],delete e[Ke],delete e[Et],delete e[la],delete e[za]}function Xn(e){var t=e[tt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Zt]||a[tt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Gg(e);e!==null;){if(a=e[tt])return a;e=Gg(e)}return t}e=a,a=e.parentNode}return null}function ja(e){if(e=e[tt]||e[Zt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Qr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Fl(e){var t=e[ai];return t||(t=e[ai]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function jt(e){e[ra]=!0}var Sm=new Set,wm={};function bl(e,t){Ql(e,t),Ql(e+"Capture",t)}function Ql(e,t){for(wm[e]=t,e=0;e<t.length;e++)Sm.add(t[e])}var d1=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]*$"),Em={},Tm={};function m1(e){return ye.call(Tm,e)?!0:ye.call(Em,e)?!1:d1.test(e)?Tm[e]=!0:(Em[e]=!0,!1)}function li(e,t,a){if(m1(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function ri(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function oa(e,t,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+r)}}function En(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Cm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function h1(e,t,a){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,u=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(y){a=""+y,u.call(this,y)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gc(e){if(!e._valueTracker){var t=Cm(e)?"checked":"value";e._valueTracker=h1(e,t,""+e[t])}}function Mm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=Cm(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}function oi(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 p1=/[\n"\\]/g;function Tn(e){return e.replace(p1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function yc(e,t,a,r,s,u,y,w){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+En(t)):e.value!==""+En(t)&&(e.value=""+En(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?vc(e,y,En(t)):a!=null?vc(e,y,En(a)):r!=null&&e.removeAttribute("value"),s==null&&u!=null&&(e.defaultChecked=!!u),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+En(w):e.removeAttribute("name")}function Am(e,t,a,r,s,u,y,w){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){gc(e);return}a=a!=null?""+En(a):"",t=t!=null?""+En(t):a,w||t===e.value||(e.value=t),e.defaultValue=t}r=r??s,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=w?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),gc(e)}function vc(e,t,a){t==="number"&&oi(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Zl(e,t,a,r){if(e=e.options,t){t={};for(var s=0;s<a.length;s++)t["$"+a[s]]=!0;for(a=0;a<e.length;a++)s=t.hasOwnProperty("$"+e[a].value),e[a].selected!==s&&(e[a].selected=s),s&&r&&(e[a].defaultSelected=!0)}else{for(a=""+En(a),t=null,s=0;s<e.length;s++){if(e[s].value===a){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function _m(e,t,a){if(t!=null&&(t=""+En(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+En(a):""}function Rm(e,t,a,r){if(t==null){if(r!=null){if(a!=null)throw Error(i(92));if(Y(r)){if(1<r.length)throw Error(i(93));r=r[0]}a=r}a==null&&(a=""),t=a}a=En(t),e.defaultValue=a,r=e.textContent,r===a&&r!==""&&r!==null&&(e.value=r),gc(e)}function Jl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var g1=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 Nm(e,t,a){var r=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,a):typeof a!="number"||a===0||g1.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Om(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var s in t)r=t[s],t.hasOwnProperty(s)&&a[s]!==r&&Nm(e,s,r)}else for(var u in t)t.hasOwnProperty(u)&&Nm(e,u,t[u])}function bc(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 y1=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"]]),v1=/^[\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 ii(e){return v1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ia(){}var xc=null;function Sc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wl=null,er=null;function zm(e){var t=ja(e);if(t&&(e=t.stateNode)){var a=e[Ke]||null;e:switch(e=t.stateNode,t.type){case"input":if(yc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Tn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var r=a[t];if(r!==e&&r.form===e.form){var s=r[Ke]||null;if(!s)throw Error(i(90));yc(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<a.length;t++)r=a[t],r.form===e.form&&Mm(r)}break e;case"textarea":_m(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Zl(e,!!a.multiple,t,!1)}}}var wc=!1;function Dm(e,t,a){if(wc)return e(t,a);wc=!0;try{var r=e(t);return r}finally{if(wc=!1,(Wl!==null||er!==null)&&(Ki(),Wl&&(t=Wl,e=er,er=Wl=null,zm(t),e)))for(t=0;t<e.length;t++)zm(e[t])}}function Zr(e,t){var a=e.stateNode;if(a===null)return null;var r=a[Ke]||null;if(r===null)return null;a=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var sa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ec=!1;if(sa)try{var Jr={};Object.defineProperty(Jr,"passive",{get:function(){Ec=!0}}),window.addEventListener("test",Jr,Jr),window.removeEventListener("test",Jr,Jr)}catch{Ec=!1}var ka=null,Tc=null,si=null;function jm(){if(si)return si;var e,t=Tc,a=t.length,r,s="value"in ka?ka.value:ka.textContent,u=s.length;for(e=0;e<a&&t[e]===s[e];e++);var y=a-e;for(r=1;r<=y&&t[a-r]===s[u-r];r++);return si=s.slice(e,1<r?1-r:void 0)}function ci(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 ui(){return!0}function km(){return!1}function Jt(e){function t(a,r,s,u,y){this._reactName=a,this._targetInst=s,this.type=r,this.nativeEvent=u,this.target=y,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(a=e[w],this[w]=a?a(u):u[w]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ui:km,this.isPropagationStopped=km,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ui)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ui)},persist:function(){},isPersistent:ui}),t}var xl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fi=Jt(xl),Wr=p({},xl,{view:0,detail:0}),b1=Jt(Wr),Cc,Mc,eo,di=p({},Wr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_c,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!==eo&&(eo&&e.type==="mousemove"?(Cc=e.screenX-eo.screenX,Mc=e.screenY-eo.screenY):Mc=Cc=0,eo=e),Cc)},movementY:function(e){return"movementY"in e?e.movementY:Mc}}),Lm=Jt(di),x1=p({},di,{dataTransfer:0}),S1=Jt(x1),w1=p({},Wr,{relatedTarget:0}),Ac=Jt(w1),E1=p({},xl,{animationName:0,elapsedTime:0,pseudoElement:0}),T1=Jt(E1),C1=p({},xl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),M1=Jt(C1),A1=p({},xl,{data:0}),Hm=Jt(A1),_1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R1={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"},N1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function O1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=N1[e])?!!t[e]:!1}function _c(){return O1}var z1=p({},Wr,{key:function(e){if(e.key){var t=_1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ci(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?R1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_c,charCode:function(e){return e.type==="keypress"?ci(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ci(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),D1=Jt(z1),j1=p({},di,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bm=Jt(j1),k1=p({},Wr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_c}),L1=Jt(k1),H1=p({},xl,{propertyName:0,elapsedTime:0,pseudoElement:0}),B1=Jt(H1),U1=p({},di,{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}),I1=Jt(U1),G1=p({},xl,{newState:0,oldState:0}),Y1=Jt(G1),V1=[9,13,27,32],Rc=sa&&"CompositionEvent"in window,to=null;sa&&"documentMode"in document&&(to=document.documentMode);var q1=sa&&"TextEvent"in window&&!to,Um=sa&&(!Rc||to&&8<to&&11>=to),Im=" ",Gm=!1;function Ym(e,t){switch(e){case"keyup":return V1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var tr=!1;function P1(e,t){switch(e){case"compositionend":return Vm(t);case"keypress":return t.which!==32?null:(Gm=!0,Im);case"textInput":return e=t.data,e===Im&&Gm?null:e;default:return null}}function X1(e,t){if(tr)return e==="compositionend"||!Rc&&Ym(e,t)?(e=jm(),si=Tc=ka=null,tr=!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 Um&&t.locale!=="ko"?null:t.data;default:return null}}var $1={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 qm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$1[e.type]:t==="textarea"}function Pm(e,t,a,r){Wl?er?er.push(r):er=[r]:Wl=r,t=ts(t,"onChange"),0<t.length&&(a=new fi("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var no=null,ao=null;function K1(e){Ag(e,0)}function mi(e){var t=Qr(e);if(Mm(t))return e}function Xm(e,t){if(e==="change")return t}var $m=!1;if(sa){var Nc;if(sa){var Oc="oninput"in document;if(!Oc){var Km=document.createElement("div");Km.setAttribute("oninput","return;"),Oc=typeof Km.oninput=="function"}Nc=Oc}else Nc=!1;$m=Nc&&(!document.documentMode||9<document.documentMode)}function Fm(){no&&(no.detachEvent("onpropertychange",Qm),ao=no=null)}function Qm(e){if(e.propertyName==="value"&&mi(ao)){var t=[];Pm(t,ao,e,Sc(e)),Dm(K1,t)}}function F1(e,t,a){e==="focusin"?(Fm(),no=t,ao=a,no.attachEvent("onpropertychange",Qm)):e==="focusout"&&Fm()}function Q1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mi(ao)}function Z1(e,t){if(e==="click")return mi(t)}function J1(e,t){if(e==="input"||e==="change")return mi(t)}function W1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var un=typeof Object.is=="function"?Object.is:W1;function lo(e,t){if(un(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var s=a[r];if(!ye.call(t,s)||!un(e[s],t[s]))return!1}return!0}function Zm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jm(e,t){var a=Zm(e);e=0;for(var r;a;){if(a.nodeType===3){if(r=e+a.textContent.length,e<=t&&r>=t)return{node:a,offset:t-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Zm(a)}}function Wm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function eh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=oi(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=oi(e.document)}return t}function zc(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 eS=sa&&"documentMode"in document&&11>=document.documentMode,nr=null,Dc=null,ro=null,jc=!1;function th(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;jc||nr==null||nr!==oi(r)||(r=nr,"selectionStart"in r&&zc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ro&&lo(ro,r)||(ro=r,r=ts(Dc,"onSelect"),0<r.length&&(t=new fi("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=nr)))}function Sl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ar={animationend:Sl("Animation","AnimationEnd"),animationiteration:Sl("Animation","AnimationIteration"),animationstart:Sl("Animation","AnimationStart"),transitionrun:Sl("Transition","TransitionRun"),transitionstart:Sl("Transition","TransitionStart"),transitioncancel:Sl("Transition","TransitionCancel"),transitionend:Sl("Transition","TransitionEnd")},kc={},nh={};sa&&(nh=document.createElement("div").style,"AnimationEvent"in window||(delete ar.animationend.animation,delete ar.animationiteration.animation,delete ar.animationstart.animation),"TransitionEvent"in window||delete ar.transitionend.transition);function wl(e){if(kc[e])return kc[e];if(!ar[e])return e;var t=ar[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in nh)return kc[e]=t[a];return e}var ah=wl("animationend"),lh=wl("animationiteration"),rh=wl("animationstart"),tS=wl("transitionrun"),nS=wl("transitionstart"),aS=wl("transitioncancel"),oh=wl("transitionend"),ih=new Map,Lc="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(" ");Lc.push("scrollEnd");function Ln(e,t){ih.set(e,t),bl(t,[e])}var hi=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)},Cn=[],lr=0,Hc=0;function pi(){for(var e=lr,t=Hc=lr=0;t<e;){var a=Cn[t];Cn[t++]=null;var r=Cn[t];Cn[t++]=null;var s=Cn[t];Cn[t++]=null;var u=Cn[t];if(Cn[t++]=null,r!==null&&s!==null){var y=r.pending;y===null?s.next=s:(s.next=y.next,y.next=s),r.pending=s}u!==0&&sh(a,s,u)}}function gi(e,t,a,r){Cn[lr++]=e,Cn[lr++]=t,Cn[lr++]=a,Cn[lr++]=r,Hc|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Bc(e,t,a,r){return gi(e,t,a,r),yi(e)}function El(e,t){return gi(e,null,null,t),yi(e)}function sh(e,t,a){e.lanes|=a;var r=e.alternate;r!==null&&(r.lanes|=a);for(var s=!1,u=e.return;u!==null;)u.childLanes|=a,r=u.alternate,r!==null&&(r.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(s=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,s&&t!==null&&(s=31-Dt(a),e=u.hiddenUpdates,r=e[s],r===null?e[s]=[t]:r.push(t),t.lane=a|536870912),u):null}function yi(e){if(50<_o)throw _o=0,$u=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var rr={};function lS(e,t,a,r){this.tag=e,this.key=a,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fn(e,t,a,r){return new lS(e,t,a,r)}function Uc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ca(e,t){var a=e.alternate;return a===null?(a=fn(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function ch(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function vi(e,t,a,r,s,u){var y=0;if(r=e,typeof e=="function")Uc(e)&&(y=1);else if(typeof e=="string")y=cw(e,a,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Q:return e=fn(31,a,t,s),e.elementType=Q,e.lanes=u,e;case C:return Tl(a.children,s,u,t);case A:y=8,s|=24;break;case R:return e=fn(12,a,t,s|2),e.elementType=R,e.lanes=u,e;case le:return e=fn(13,a,t,s),e.elementType=le,e.lanes=u,e;case V:return e=fn(19,a,t,s),e.elementType=V,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:y=10;break e;case O:y=9;break e;case X:y=11;break e;case U:y=14;break e;case N:y=16,r=null;break e}y=29,a=Error(i(130,e===null?"null":typeof e,"")),r=null}return t=fn(y,a,t,s),t.elementType=e,t.type=r,t.lanes=u,t}function Tl(e,t,a,r){return e=fn(7,e,r,t),e.lanes=a,e}function Ic(e,t,a){return e=fn(6,e,null,t),e.lanes=a,e}function uh(e){var t=fn(18,null,null,0);return t.stateNode=e,t}function Gc(e,t,a){return t=fn(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var fh=new WeakMap;function Mn(e,t){if(typeof e=="object"&&e!==null){var a=fh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:De(t)},fh.set(e,t),t)}return{value:e,source:t,stack:De(t)}}var or=[],ir=0,bi=null,oo=0,An=[],_n=0,La=null,$n=1,Kn="";function ua(e,t){or[ir++]=oo,or[ir++]=bi,bi=e,oo=t}function dh(e,t,a){An[_n++]=$n,An[_n++]=Kn,An[_n++]=La,La=e;var r=$n;e=Kn;var s=32-Dt(r)-1;r&=~(1<<s),a+=1;var u=32-Dt(t)+s;if(30<u){var y=s-s%5;u=(r&(1<<y)-1).toString(32),r>>=y,s-=y,$n=1<<32-Dt(t)+s|a<<s|r,Kn=u+e}else $n=1<<u|a<<s|r,Kn=e}function Yc(e){e.return!==null&&(ua(e,1),dh(e,1,0))}function Vc(e){for(;e===bi;)bi=or[--ir],or[ir]=null,oo=or[--ir],or[ir]=null;for(;e===La;)La=An[--_n],An[_n]=null,Kn=An[--_n],An[_n]=null,$n=An[--_n],An[_n]=null}function mh(e,t){An[_n++]=$n,An[_n++]=Kn,An[_n++]=La,$n=t.id,Kn=t.overflow,La=e}var Bt=null,dt=null,qe=!1,Ha=null,Rn=!1,qc=Error(i(519));function Ba(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw io(Mn(t,e)),qc}function hh(e){var t=e.stateNode,a=e.type,r=e.memoizedProps;switch(t[tt]=e,t[Ke]=r,a){case"dialog":Ie("cancel",t),Ie("close",t);break;case"iframe":case"object":case"embed":Ie("load",t);break;case"video":case"audio":for(a=0;a<No.length;a++)Ie(No[a],t);break;case"source":Ie("error",t);break;case"img":case"image":case"link":Ie("error",t),Ie("load",t);break;case"details":Ie("toggle",t);break;case"input":Ie("invalid",t),Am(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ie("invalid",t);break;case"textarea":Ie("invalid",t),Rm(t,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||r.suppressHydrationWarning===!0||Og(t.textContent,a)?(r.popover!=null&&(Ie("beforetoggle",t),Ie("toggle",t)),r.onScroll!=null&&Ie("scroll",t),r.onScrollEnd!=null&&Ie("scrollend",t),r.onClick!=null&&(t.onclick=ia),t=!0):t=!1,t||Ba(e,!0)}function ph(e){for(Bt=e.return;Bt;)switch(Bt.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Bt=Bt.return}}function sr(e){if(e!==Bt)return!1;if(!qe)return ph(e),qe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||cf(e.type,e.memoizedProps)),a=!a),a&&dt&&Ba(e),ph(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));dt=Ig(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));dt=Ig(e)}else t===27?(t=dt,Ja(e.type)?(e=hf,hf=null,dt=e):dt=t):dt=Bt?On(e.stateNode.nextSibling):null;return!0}function Cl(){dt=Bt=null,qe=!1}function Pc(){var e=Ha;return e!==null&&(nn===null?nn=e:nn.push.apply(nn,e),Ha=null),e}function io(e){Ha===null?Ha=[e]:Ha.push(e)}var Xc=_(null),Ml=null,fa=null;function Ua(e,t,a){J(Xc,t._currentValue),t._currentValue=a}function da(e){e._currentValue=Xc.current,H(Xc)}function $c(e,t,a){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===a)break;e=e.return}}function Kc(e,t,a,r){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var u=s.dependencies;if(u!==null){var y=s.child;u=u.firstContext;e:for(;u!==null;){var w=u;u=s;for(var z=0;z<t.length;z++)if(w.context===t[z]){u.lanes|=a,w=u.alternate,w!==null&&(w.lanes|=a),$c(u.return,a,e),r||(y=null);break e}u=w.next}}else if(s.tag===18){if(y=s.return,y===null)throw Error(i(341));y.lanes|=a,u=y.alternate,u!==null&&(u.lanes|=a),$c(y,a,e),y=null}else y=s.child;if(y!==null)y.return=s;else for(y=s;y!==null;){if(y===e){y=null;break}if(s=y.sibling,s!==null){s.return=y.return,y=s;break}y=y.return}s=y}}function cr(e,t,a,r){e=null;for(var s=t,u=!1;s!==null;){if(!u){if((s.flags&524288)!==0)u=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var y=s.alternate;if(y===null)throw Error(i(387));if(y=y.memoizedProps,y!==null){var w=s.type;un(s.pendingProps.value,y.value)||(e!==null?e.push(w):e=[w])}}else if(s===ce.current){if(y=s.alternate,y===null)throw Error(i(387));y.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(ko):e=[ko])}s=s.return}e!==null&&Kc(t,e,a,r),t.flags|=262144}function xi(e){for(e=e.firstContext;e!==null;){if(!un(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Al(e){Ml=e,fa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ut(e){return gh(Ml,e)}function Si(e,t){return Ml===null&&Al(e),gh(e,t)}function gh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},fa===null){if(e===null)throw Error(i(308));fa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else fa=fa.next=t;return a}var rS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},oS=n.unstable_scheduleCallback,iS=n.unstable_NormalPriority,Tt={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fc(){return{controller:new rS,data:new Map,refCount:0}}function so(e){e.refCount--,e.refCount===0&&oS(iS,function(){e.controller.abort()})}var co=null,Qc=0,ur=0,fr=null;function sS(e,t){if(co===null){var a=co=[];Qc=0,ur=Wu(),fr={status:"pending",value:void 0,then:function(r){a.push(r)}}}return Qc++,t.then(yh,yh),t}function yh(){if(--Qc===0&&co!==null){fr!==null&&(fr.status="fulfilled");var e=co;co=null,ur=0,fr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function cS(e,t){var a=[],r={status:"pending",value:null,reason:null,then:function(s){a.push(s)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var s=0;s<a.length;s++)(0,a[s])(t)},function(s){for(r.status="rejected",r.reason=s,s=0;s<a.length;s++)(0,a[s])(void 0)}),r}var vh=M.S;M.S=function(e,t){tg=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&sS(e,t),vh!==null&&vh(e,t)};var _l=_(null);function Zc(){var e=_l.current;return e!==null?e:ct.pooledCache}function wi(e,t){t===null?J(_l,_l.current):J(_l,t.pool)}function bh(){var e=Zc();return e===null?null:{parent:Tt._currentValue,pool:e}}var dr=Error(i(460)),Jc=Error(i(474)),Ei=Error(i(542)),Ti={then:function(){}};function xh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(ia,ia),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Eh(e),e;default:if(typeof t.status=="string")t.then(ia,ia);else{if(e=ct,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=r}},function(r){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Eh(e),e}throw Nl=t,dr}}function Rl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Nl=a,dr):a}}var Nl=null;function wh(){if(Nl===null)throw Error(i(459));var e=Nl;return Nl=null,e}function Eh(e){if(e===dr||e===Ei)throw Error(i(483))}var mr=null,uo=0;function Ci(e){var t=uo;return uo+=1,mr===null&&(mr=[]),Sh(mr,e,t)}function fo(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Mi(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 Th(e){function t(G,k){if(e){var K=G.deletions;K===null?(G.deletions=[k],G.flags|=16):K.push(k)}}function a(G,k){if(!e)return null;for(;k!==null;)t(G,k),k=k.sibling;return null}function r(G){for(var k=new Map;G!==null;)G.key!==null?k.set(G.key,G):k.set(G.index,G),G=G.sibling;return k}function s(G,k){return G=ca(G,k),G.index=0,G.sibling=null,G}function u(G,k,K){return G.index=K,e?(K=G.alternate,K!==null?(K=K.index,K<k?(G.flags|=67108866,k):K):(G.flags|=67108866,k)):(G.flags|=1048576,k)}function y(G){return e&&G.alternate===null&&(G.flags|=67108866),G}function w(G,k,K,se){return k===null||k.tag!==6?(k=Ic(K,G.mode,se),k.return=G,k):(k=s(k,K),k.return=G,k)}function z(G,k,K,se){var Ce=K.type;return Ce===C?oe(G,k,K.props.children,se,K.key):k!==null&&(k.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===N&&Rl(Ce)===k.type)?(k=s(k,K.props),fo(k,K),k.return=G,k):(k=vi(K.type,K.key,K.props,null,G.mode,se),fo(k,K),k.return=G,k)}function F(G,k,K,se){return k===null||k.tag!==4||k.stateNode.containerInfo!==K.containerInfo||k.stateNode.implementation!==K.implementation?(k=Gc(K,G.mode,se),k.return=G,k):(k=s(k,K.children||[]),k.return=G,k)}function oe(G,k,K,se,Ce){return k===null||k.tag!==7?(k=Tl(K,G.mode,se,Ce),k.return=G,k):(k=s(k,K),k.return=G,k)}function ue(G,k,K){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Ic(""+k,G.mode,K),k.return=G,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case E:return K=vi(k.type,k.key,k.props,null,G.mode,K),fo(K,k),K.return=G,K;case T:return k=Gc(k,G.mode,K),k.return=G,k;case N:return k=Rl(k),ue(G,k,K)}if(Y(k)||B(k))return k=Tl(k,G.mode,K,null),k.return=G,k;if(typeof k.then=="function")return ue(G,Ci(k),K);if(k.$$typeof===D)return ue(G,Si(G,k),K);Mi(G,k)}return null}function W(G,k,K,se){var Ce=k!==null?k.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return Ce!==null?null:w(G,k,""+K,se);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case E:return K.key===Ce?z(G,k,K,se):null;case T:return K.key===Ce?F(G,k,K,se):null;case N:return K=Rl(K),W(G,k,K,se)}if(Y(K)||B(K))return Ce!==null?null:oe(G,k,K,se,null);if(typeof K.then=="function")return W(G,k,Ci(K),se);if(K.$$typeof===D)return W(G,k,Si(G,K),se);Mi(G,K)}return null}function te(G,k,K,se,Ce){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return G=G.get(K)||null,w(k,G,""+se,Ce);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case E:return G=G.get(se.key===null?K:se.key)||null,z(k,G,se,Ce);case T:return G=G.get(se.key===null?K:se.key)||null,F(k,G,se,Ce);case N:return se=Rl(se),te(G,k,K,se,Ce)}if(Y(se)||B(se))return G=G.get(K)||null,oe(k,G,se,Ce,null);if(typeof se.then=="function")return te(G,k,K,Ci(se),Ce);if(se.$$typeof===D)return te(G,k,K,Si(k,se),Ce);Mi(k,se)}return null}function ve(G,k,K,se){for(var Ce=null,Fe=null,we=k,ke=k=0,Ve=null;we!==null&&ke<K.length;ke++){we.index>ke?(Ve=we,we=null):Ve=we.sibling;var Qe=W(G,we,K[ke],se);if(Qe===null){we===null&&(we=Ve);break}e&&we&&Qe.alternate===null&&t(G,we),k=u(Qe,k,ke),Fe===null?Ce=Qe:Fe.sibling=Qe,Fe=Qe,we=Ve}if(ke===K.length)return a(G,we),qe&&ua(G,ke),Ce;if(we===null){for(;ke<K.length;ke++)we=ue(G,K[ke],se),we!==null&&(k=u(we,k,ke),Fe===null?Ce=we:Fe.sibling=we,Fe=we);return qe&&ua(G,ke),Ce}for(we=r(we);ke<K.length;ke++)Ve=te(we,G,ke,K[ke],se),Ve!==null&&(e&&Ve.alternate!==null&&we.delete(Ve.key===null?ke:Ve.key),k=u(Ve,k,ke),Fe===null?Ce=Ve:Fe.sibling=Ve,Fe=Ve);return e&&we.forEach(function(al){return t(G,al)}),qe&&ua(G,ke),Ce}function _e(G,k,K,se){if(K==null)throw Error(i(151));for(var Ce=null,Fe=null,we=k,ke=k=0,Ve=null,Qe=K.next();we!==null&&!Qe.done;ke++,Qe=K.next()){we.index>ke?(Ve=we,we=null):Ve=we.sibling;var al=W(G,we,Qe.value,se);if(al===null){we===null&&(we=Ve);break}e&&we&&al.alternate===null&&t(G,we),k=u(al,k,ke),Fe===null?Ce=al:Fe.sibling=al,Fe=al,we=Ve}if(Qe.done)return a(G,we),qe&&ua(G,ke),Ce;if(we===null){for(;!Qe.done;ke++,Qe=K.next())Qe=ue(G,Qe.value,se),Qe!==null&&(k=u(Qe,k,ke),Fe===null?Ce=Qe:Fe.sibling=Qe,Fe=Qe);return qe&&ua(G,ke),Ce}for(we=r(we);!Qe.done;ke++,Qe=K.next())Qe=te(we,G,ke,Qe.value,se),Qe!==null&&(e&&Qe.alternate!==null&&we.delete(Qe.key===null?ke:Qe.key),k=u(Qe,k,ke),Fe===null?Ce=Qe:Fe.sibling=Qe,Fe=Qe);return e&&we.forEach(function(xw){return t(G,xw)}),qe&&ua(G,ke),Ce}function it(G,k,K,se){if(typeof K=="object"&&K!==null&&K.type===C&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case E:e:{for(var Ce=K.key;k!==null;){if(k.key===Ce){if(Ce=K.type,Ce===C){if(k.tag===7){a(G,k.sibling),se=s(k,K.props.children),se.return=G,G=se;break e}}else if(k.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===N&&Rl(Ce)===k.type){a(G,k.sibling),se=s(k,K.props),fo(se,K),se.return=G,G=se;break e}a(G,k);break}else t(G,k);k=k.sibling}K.type===C?(se=Tl(K.props.children,G.mode,se,K.key),se.return=G,G=se):(se=vi(K.type,K.key,K.props,null,G.mode,se),fo(se,K),se.return=G,G=se)}return y(G);case T:e:{for(Ce=K.key;k!==null;){if(k.key===Ce)if(k.tag===4&&k.stateNode.containerInfo===K.containerInfo&&k.stateNode.implementation===K.implementation){a(G,k.sibling),se=s(k,K.children||[]),se.return=G,G=se;break e}else{a(G,k);break}else t(G,k);k=k.sibling}se=Gc(K,G.mode,se),se.return=G,G=se}return y(G);case N:return K=Rl(K),it(G,k,K,se)}if(Y(K))return ve(G,k,K,se);if(B(K)){if(Ce=B(K),typeof Ce!="function")throw Error(i(150));return K=Ce.call(K),_e(G,k,K,se)}if(typeof K.then=="function")return it(G,k,Ci(K),se);if(K.$$typeof===D)return it(G,k,Si(G,K),se);Mi(G,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,k!==null&&k.tag===6?(a(G,k.sibling),se=s(k,K),se.return=G,G=se):(a(G,k),se=Ic(K,G.mode,se),se.return=G,G=se),y(G)):a(G,k)}return function(G,k,K,se){try{uo=0;var Ce=it(G,k,K,se);return mr=null,Ce}catch(we){if(we===dr||we===Ei)throw we;var Fe=fn(29,we,null,G.mode);return Fe.lanes=se,Fe.return=G,Fe}finally{}}}var Ol=Th(!0),Ch=Th(!1),Ia=!1;function Wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function eu(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 Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Je&2)!==0){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,t=yi(e),sh(e,null,a),t}return gi(e,r,t,a),yi(e)}function mo(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,Ne(e,a)}}function tu(e,t){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var s=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?s=u=y:u=u.next=y,a=a.next}while(a!==null);u===null?s=u=t:u=u.next=t}else s=u=t;a={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:u,shared:r.shared,callbacks:r.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var nu=!1;function ho(){if(nu){var e=fr;if(e!==null)throw e}}function po(e,t,a,r){nu=!1;var s=e.updateQueue;Ia=!1;var u=s.firstBaseUpdate,y=s.lastBaseUpdate,w=s.shared.pending;if(w!==null){s.shared.pending=null;var z=w,F=z.next;z.next=null,y===null?u=F:y.next=F,y=z;var oe=e.alternate;oe!==null&&(oe=oe.updateQueue,w=oe.lastBaseUpdate,w!==y&&(w===null?oe.firstBaseUpdate=F:w.next=F,oe.lastBaseUpdate=z))}if(u!==null){var ue=s.baseState;y=0,oe=F=z=null,w=u;do{var W=w.lane&-536870913,te=W!==w.lane;if(te?(Ye&W)===W:(r&W)===W){W!==0&&W===ur&&(nu=!0),oe!==null&&(oe=oe.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ve=e,_e=w;W=t;var it=a;switch(_e.tag){case 1:if(ve=_e.payload,typeof ve=="function"){ue=ve.call(it,ue,W);break e}ue=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=_e.payload,W=typeof ve=="function"?ve.call(it,ue,W):ve,W==null)break e;ue=p({},ue,W);break e;case 2:Ia=!0}}W=w.callback,W!==null&&(e.flags|=64,te&&(e.flags|=8192),te=s.callbacks,te===null?s.callbacks=[W]:te.push(W))}else te={lane:W,tag:w.tag,payload:w.payload,callback:w.callback,next:null},oe===null?(F=oe=te,z=ue):oe=oe.next=te,y|=W;if(w=w.next,w===null){if(w=s.shared.pending,w===null)break;te=w,w=te.next,te.next=null,s.lastBaseUpdate=te,s.shared.pending=null}}while(!0);oe===null&&(z=ue),s.baseState=z,s.firstBaseUpdate=F,s.lastBaseUpdate=oe,u===null&&(s.shared.lanes=0),$a|=y,e.lanes=y,e.memoizedState=ue}}function Mh(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function Ah(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Mh(a[e],t)}var hr=_(null),Ai=_(0);function _h(e,t){e=Sa,J(Ai,e),J(hr,t),Sa=e|t.baseLanes}function au(){J(Ai,Sa),J(hr,hr.current)}function lu(){Sa=Ai.current,H(hr),H(Ai)}var dn=_(null),Nn=null;function Va(e){var t=e.alternate;J(bt,bt.current&1),J(dn,e),Nn===null&&(t===null||hr.current!==null||t.memoizedState!==null)&&(Nn=e)}function ru(e){J(bt,bt.current),J(dn,e),Nn===null&&(Nn=e)}function Rh(e){e.tag===22?(J(bt,bt.current),J(dn,e),Nn===null&&(Nn=e)):qa()}function qa(){J(bt,bt.current),J(dn,dn.current)}function mn(e){H(dn),Nn===e&&(Nn=null),H(bt)}var bt=_(0);function _i(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||df(a)||mf(a)))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 ma=0,je=null,rt=null,Ct=null,Ri=!1,pr=!1,zl=!1,Ni=0,go=0,gr=null,uS=0;function pt(){throw Error(i(321))}function ou(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!un(e[a],t[a]))return!1;return!0}function iu(e,t,a,r,s,u){return ma=u,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?dp:wu,zl=!1,u=a(r,s),zl=!1,pr&&(u=Oh(t,a,r,s)),Nh(e),u}function Nh(e){M.H=bo;var t=rt!==null&&rt.next!==null;if(ma=0,Ct=rt=je=null,Ri=!1,go=0,gr=null,t)throw Error(i(300));e===null||Mt||(e=e.dependencies,e!==null&&xi(e)&&(Mt=!0))}function Oh(e,t,a,r){je=e;var s=0;do{if(pr&&(gr=null),go=0,pr=!1,25<=s)throw Error(i(301));if(s+=1,Ct=rt=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}M.H=mp,u=t(a,r)}while(pr);return u}function fS(){var e=M.H,t=e.useState()[0];return t=typeof t.then=="function"?yo(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(je.flags|=1024),t}function su(){var e=Ni!==0;return Ni=0,e}function cu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function uu(e){if(Ri){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ri=!1}ma=0,Ct=rt=je=null,pr=!1,go=Ni=0,gr=null}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?je.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function xt(){if(rt===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Ct===null?je.memoizedState:Ct.next;if(t!==null)Ct=t,rt=e;else{if(e===null)throw je.alternate===null?Error(i(467)):Error(i(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Ct===null?je.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function Oi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yo(e){var t=go;return go+=1,gr===null&&(gr=[]),e=Sh(gr,e,t),t=je,(Ct===null?t.memoizedState:Ct.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?dp:wu),e}function zi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yo(e);if(e.$$typeof===D)return Ut(e)}throw Error(i(438,String(e)))}function fu(e){var t=null,a=je.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var r=je.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Oi(),je.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),r=0;r<e;r++)a[r]=ne;return t.index++,a}function ha(e,t){return typeof t=="function"?t(e):t}function Di(e){var t=xt();return du(t,rt,e)}function du(e,t,a){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=a;var s=e.baseQueue,u=r.pending;if(u!==null){if(s!==null){var y=s.next;s.next=u.next,u.next=y}t.baseQueue=s=u,r.pending=null}if(u=e.baseState,s===null)e.memoizedState=u;else{t=s.next;var w=y=null,z=null,F=t,oe=!1;do{var ue=F.lane&-536870913;if(ue!==F.lane?(Ye&ue)===ue:(ma&ue)===ue){var W=F.revertLane;if(W===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),ue===ur&&(oe=!0);else if((ma&W)===W){F=F.next,W===ur&&(oe=!0);continue}else ue={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},z===null?(w=z=ue,y=u):z=z.next=ue,je.lanes|=W,$a|=W;ue=F.action,zl&&a(u,ue),u=F.hasEagerState?F.eagerState:a(u,ue)}else W={lane:ue,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},z===null?(w=z=W,y=u):z=z.next=W,je.lanes|=ue,$a|=ue;F=F.next}while(F!==null&&F!==t);if(z===null?y=u:z.next=w,!un(u,e.memoizedState)&&(Mt=!0,oe&&(a=fr,a!==null)))throw a;e.memoizedState=u,e.baseState=y,e.baseQueue=z,r.lastRenderedState=u}return s===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function mu(e){var t=xt(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var r=a.dispatch,s=a.pending,u=t.memoizedState;if(s!==null){a.pending=null;var y=s=s.next;do u=e(u,y.action),y=y.next;while(y!==s);un(u,t.memoizedState)||(Mt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,r]}function zh(e,t,a){var r=je,s=xt(),u=qe;if(u){if(a===void 0)throw Error(i(407));a=a()}else a=t();var y=!un((rt||s).memoizedState,a);if(y&&(s.memoizedState=a,Mt=!0),s=s.queue,gu(kh.bind(null,r,s,e),[e]),s.getSnapshot!==t||y||Ct!==null&&Ct.memoizedState.tag&1){if(r.flags|=2048,yr(9,{destroy:void 0},jh.bind(null,r,s,a,t),null),ct===null)throw Error(i(349));u||(ma&127)!==0||Dh(r,t,a)}return a}function Dh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=je.updateQueue,t===null?(t=Oi(),je.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function jh(e,t,a,r){t.value=a,t.getSnapshot=r,Lh(t)&&Hh(e)}function kh(e,t,a){return a(function(){Lh(t)&&Hh(e)})}function Lh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!un(e,a)}catch{return!0}}function Hh(e){var t=El(e,2);t!==null&&an(t,e,2)}function hu(e){var t=Kt();if(typeof e=="function"){var a=e;if(e=a(),zl){cn(!0);try{a()}finally{cn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:e},t}function Bh(e,t,a,r){return e.baseState=a,du(e,rt,typeof r=="function"?r:ha)}function dS(e,t,a,r,s){if(Li(e))throw Error(i(485));if(e=t.action,e!==null){var u={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){u.listeners.push(y)}};M.T!==null?a(!0):u.isTransition=!1,r(u),a=t.pending,a===null?(u.next=t.pending=u,Uh(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Uh(e,t){var a=t.action,r=t.payload,s=e.state;if(t.isTransition){var u=M.T,y={};M.T=y;try{var w=a(s,r),z=M.S;z!==null&&z(y,w),Ih(e,t,w)}catch(F){pu(e,t,F)}finally{u!==null&&y.types!==null&&(u.types=y.types),M.T=u}}else try{u=a(s,r),Ih(e,t,u)}catch(F){pu(e,t,F)}}function Ih(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){Gh(e,t,r)},function(r){return pu(e,t,r)}):Gh(e,t,a)}function Gh(e,t,a){t.status="fulfilled",t.value=a,Yh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Uh(e,a)))}function pu(e,t,a){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=a,Yh(t),t=t.next;while(t!==r)}e.action=null}function Yh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Vh(e,t){return t}function qh(e,t){if(qe){var a=ct.formState;if(a!==null){e:{var r=je;if(qe){if(dt){t:{for(var s=dt,u=Rn;s.nodeType!==8;){if(!u){s=null;break t}if(s=On(s.nextSibling),s===null){s=null;break t}}u=s.data,s=u==="F!"||u==="F"?s:null}if(s){dt=On(s.nextSibling),r=s.data==="F!";break e}}Ba(r)}r=!1}r&&(t=a[0])}}return a=Kt(),a.memoizedState=a.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vh,lastRenderedState:t},a.queue=r,a=cp.bind(null,je,r),r.dispatch=a,r=hu(!1),u=Su.bind(null,je,!1,r.queue),r=Kt(),s={state:t,dispatch:null,action:e,pending:null},r.queue=s,a=dS.bind(null,je,s,u,a),s.dispatch=a,r.memoizedState=e,[t,a,!1]}function Ph(e){var t=xt();return Xh(t,rt,e)}function Xh(e,t,a){if(t=du(e,t,Vh)[0],e=Di(ha)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=yo(t)}catch(y){throw y===dr?Ei:y}else r=t;t=xt();var s=t.queue,u=s.dispatch;return a!==t.memoizedState&&(je.flags|=2048,yr(9,{destroy:void 0},mS.bind(null,s,a),null)),[r,u,e]}function mS(e,t){e.action=t}function $h(e){var t=xt(),a=rt;if(a!==null)return Xh(t,a,e);xt(),t=t.memoizedState,a=xt();var r=a.queue.dispatch;return a.memoizedState=e,[t,r,!1]}function yr(e,t,a,r){return e={tag:e,create:a,deps:r,inst:t,next:null},t=je.updateQueue,t===null&&(t=Oi(),je.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(r=a.next,a.next=e,e.next=r,t.lastEffect=e),e}function Kh(){return xt().memoizedState}function ji(e,t,a,r){var s=Kt();je.flags|=e,s.memoizedState=yr(1|t,{destroy:void 0},a,r===void 0?null:r)}function ki(e,t,a,r){var s=xt();r=r===void 0?null:r;var u=s.memoizedState.inst;rt!==null&&r!==null&&ou(r,rt.memoizedState.deps)?s.memoizedState=yr(t,u,a,r):(je.flags|=e,s.memoizedState=yr(1|t,u,a,r))}function Fh(e,t){ji(8390656,8,e,t)}function gu(e,t){ki(2048,8,e,t)}function hS(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=Oi(),je.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Qh(e){var t=xt().memoizedState;return hS({ref:t,nextImpl:e}),function(){if((Je&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Zh(e,t){return ki(4,2,e,t)}function Jh(e,t){return ki(4,4,e,t)}function Wh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ep(e,t,a){a=a!=null?a.concat([e]):null,ki(4,4,Wh.bind(null,t,e),a)}function yu(){}function tp(e,t){var a=xt();t=t===void 0?null:t;var r=a.memoizedState;return t!==null&&ou(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function np(e,t){var a=xt();t=t===void 0?null:t;var r=a.memoizedState;if(t!==null&&ou(t,r[1]))return r[0];if(r=e(),zl){cn(!0);try{e()}finally{cn(!1)}}return a.memoizedState=[r,t],r}function vu(e,t,a){return a===void 0||(ma&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=ag(),je.lanes|=e,$a|=e,a)}function ap(e,t,a,r){return un(a,t)?a:hr.current!==null?(e=vu(e,a,r),un(e,t)||(Mt=!0),e):(ma&42)===0||(ma&1073741824)!==0&&(Ye&261930)===0?(Mt=!0,e.memoizedState=a):(e=ag(),je.lanes|=e,$a|=e,t)}function lp(e,t,a,r,s){var u=j.p;j.p=u!==0&&8>u?u:8;var y=M.T,w={};M.T=w,Su(e,!1,t,a);try{var z=s(),F=M.S;if(F!==null&&F(w,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var oe=cS(z,r);vo(e,t,oe,gn(e))}else vo(e,t,r,gn(e))}catch(ue){vo(e,t,{then:function(){},status:"rejected",reason:ue},gn())}finally{j.p=u,y!==null&&w.types!==null&&(y.types=w.types),M.T=y}}function pS(){}function bu(e,t,a,r){if(e.tag!==5)throw Error(i(476));var s=rp(e).queue;lp(e,s,t,q,a===null?pS:function(){return op(e),a(r)})}function rp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:q},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function op(e){var t=rp(e);t.next===null&&(t=e.alternate.memoizedState),vo(e,t.next.queue,{},gn())}function xu(){return Ut(ko)}function ip(){return xt().memoizedState}function sp(){return xt().memoizedState}function gS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=gn();e=Ga(a);var r=Ya(t,e,a);r!==null&&(an(r,t,a),mo(r,t,a)),t={cache:Fc()},e.payload=t;return}t=t.return}}function yS(e,t,a){var r=gn();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Li(e)?up(t,a):(a=Bc(e,t,a,r),a!==null&&(an(a,e,r),fp(a,t,r)))}function cp(e,t,a){var r=gn();vo(e,t,a,r)}function vo(e,t,a,r){var s={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Li(e))up(t,s);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var y=t.lastRenderedState,w=u(y,a);if(s.hasEagerState=!0,s.eagerState=w,un(w,y))return gi(e,t,s,0),ct===null&&pi(),!1}catch{}finally{}if(a=Bc(e,t,s,r),a!==null)return an(a,e,r),fp(a,t,r),!0}return!1}function Su(e,t,a,r){if(r={lane:2,revertLane:Wu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Li(e)){if(t)throw Error(i(479))}else t=Bc(e,a,r,2),t!==null&&an(t,e,2)}function Li(e){var t=e.alternate;return e===je||t!==null&&t===je}function up(e,t){pr=Ri=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function fp(e,t,a){if((a&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,Ne(e,a)}}var bo={readContext:Ut,use:zi,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt};bo.useEffectEvent=pt;var dp={readContext:Ut,use:zi,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:Fh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ji(4194308,4,Wh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ji(4194308,4,e,t)},useInsertionEffect:function(e,t){ji(4,2,e,t)},useMemo:function(e,t){var a=Kt();t=t===void 0?null:t;var r=e();if(zl){cn(!0);try{e()}finally{cn(!1)}}return a.memoizedState=[r,t],r},useReducer:function(e,t,a){var r=Kt();if(a!==void 0){var s=a(t);if(zl){cn(!0);try{a(t)}finally{cn(!1)}}}else s=t;return r.memoizedState=r.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},r.queue=e,e=e.dispatch=yS.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:function(e){e=hu(e);var t=e.queue,a=cp.bind(null,je,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:yu,useDeferredValue:function(e,t){var a=Kt();return vu(a,e,t)},useTransition:function(){var e=hu(!1);return e=lp.bind(null,je,e.queue,!0,!1),Kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var r=je,s=Kt();if(qe){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),ct===null)throw Error(i(349));(Ye&127)!==0||Dh(r,t,a)}s.memoizedState=a;var u={value:a,getSnapshot:t};return s.queue=u,Fh(kh.bind(null,r,u,e),[e]),r.flags|=2048,yr(9,{destroy:void 0},jh.bind(null,r,u,a,t),null),a},useId:function(){var e=Kt(),t=ct.identifierPrefix;if(qe){var a=Kn,r=$n;a=(r&~(1<<32-Dt(r)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Ni++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=uS++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:xu,useFormState:qh,useActionState:qh,useOptimistic:function(e){var t=Kt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Su.bind(null,je,!0,a),a.dispatch=t,[e,t]},useMemoCache:fu,useCacheRefresh:function(){return Kt().memoizedState=gS.bind(null,je)},useEffectEvent:function(e){var t=Kt(),a={impl:e};return t.memoizedState=a,function(){if((Je&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},wu={readContext:Ut,use:zi,useCallback:tp,useContext:Ut,useEffect:gu,useImperativeHandle:ep,useInsertionEffect:Zh,useLayoutEffect:Jh,useMemo:np,useReducer:Di,useRef:Kh,useState:function(){return Di(ha)},useDebugValue:yu,useDeferredValue:function(e,t){var a=xt();return ap(a,rt.memoizedState,e,t)},useTransition:function(){var e=Di(ha)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:yo(e),t]},useSyncExternalStore:zh,useId:ip,useHostTransitionStatus:xu,useFormState:Ph,useActionState:Ph,useOptimistic:function(e,t){var a=xt();return Bh(a,rt,e,t)},useMemoCache:fu,useCacheRefresh:sp};wu.useEffectEvent=Qh;var mp={readContext:Ut,use:zi,useCallback:tp,useContext:Ut,useEffect:gu,useImperativeHandle:ep,useInsertionEffect:Zh,useLayoutEffect:Jh,useMemo:np,useReducer:mu,useRef:Kh,useState:function(){return mu(ha)},useDebugValue:yu,useDeferredValue:function(e,t){var a=xt();return rt===null?vu(a,e,t):ap(a,rt.memoizedState,e,t)},useTransition:function(){var e=mu(ha)[0],t=xt().memoizedState;return[typeof e=="boolean"?e:yo(e),t]},useSyncExternalStore:zh,useId:ip,useHostTransitionStatus:xu,useFormState:$h,useActionState:$h,useOptimistic:function(e,t){var a=xt();return rt!==null?Bh(a,rt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:fu,useCacheRefresh:sp};mp.useEffectEvent=Qh;function Eu(e,t,a,r){t=e.memoizedState,a=a(r,t),a=a==null?t:p({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Tu={enqueueSetState:function(e,t,a){e=e._reactInternals;var r=gn(),s=Ga(r);s.payload=t,a!=null&&(s.callback=a),t=Ya(e,s,r),t!==null&&(an(t,e,r),mo(t,e,r))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=gn(),s=Ga(r);s.tag=1,s.payload=t,a!=null&&(s.callback=a),t=Ya(e,s,r),t!==null&&(an(t,e,r),mo(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=gn(),r=Ga(a);r.tag=2,t!=null&&(r.callback=t),t=Ya(e,r,a),t!==null&&(an(t,e,a),mo(t,e,a))}};function hp(e,t,a,r,s,u,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,u,y):t.prototype&&t.prototype.isPureReactComponent?!lo(a,r)||!lo(s,u):!0}function pp(e,t,a,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,r),t.state!==e&&Tu.enqueueReplaceState(t,t.state,null)}function Dl(e,t){var a=t;if("ref"in t){a={};for(var r in t)r!=="ref"&&(a[r]=t[r])}if(e=e.defaultProps){a===t&&(a=p({},a));for(var s in e)a[s]===void 0&&(a[s]=e[s])}return a}function gp(e){hi(e)}function yp(e){console.error(e)}function vp(e){hi(e)}function Hi(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function bp(e,t,a){try{var r=e.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function Cu(e,t,a){return a=Ga(a),a.tag=3,a.payload={element:null},a.callback=function(){Hi(e,t)},a}function xp(e){return e=Ga(e),e.tag=3,e}function Sp(e,t,a,r){var s=a.type.getDerivedStateFromError;if(typeof s=="function"){var u=r.value;e.payload=function(){return s(u)},e.callback=function(){bp(t,a,r)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){bp(t,a,r),typeof s!="function"&&(Ka===null?Ka=new Set([this]):Ka.add(this));var w=r.stack;this.componentDidCatch(r.value,{componentStack:w!==null?w:""})})}function vS(e,t,a,r,s){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=a.alternate,t!==null&&cr(t,a,s,!0),a=dn.current,a!==null){switch(a.tag){case 31:case 13:return Nn===null?Fi():a.alternate===null&>===0&&(gt=3),a.flags&=-257,a.flags|=65536,a.lanes=s,r===Ti?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([r]):t.add(r),Qu(e,r,s)),!1;case 22:return a.flags|=65536,r===Ti?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([r]):a.add(r)),Qu(e,r,s)),!1}throw Error(i(435,a.tag))}return Qu(e,r,s),Fi(),!1}if(qe)return t=dn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,r!==qc&&(e=Error(i(422),{cause:r}),io(Mn(e,a)))):(r!==qc&&(t=Error(i(423),{cause:r}),io(Mn(t,a))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,r=Mn(r,a),s=Cu(e.stateNode,r,s),tu(e,s),gt!==4&&(gt=2)),!1;var u=Error(i(520),{cause:r});if(u=Mn(u,a),Ao===null?Ao=[u]:Ao.push(u),gt!==4&&(gt=2),t===null)return!0;r=Mn(r,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=s&-s,a.lanes|=e,e=Cu(a.stateNode,r,e),tu(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(Ka===null||!Ka.has(u))))return a.flags|=65536,s&=-s,a.lanes|=s,s=xp(s),Sp(s,e,a,r),tu(a,s),!1}a=a.return}while(a!==null);return!1}var Mu=Error(i(461)),Mt=!1;function It(e,t,a,r){t.child=e===null?Ch(t,null,a,r):Ol(t,e.child,a,r)}function wp(e,t,a,r,s){a=a.render;var u=t.ref;if("ref"in r){var y={};for(var w in r)w!=="ref"&&(y[w]=r[w])}else y=r;return Al(t),r=iu(e,t,a,y,u,s),w=su(),e!==null&&!Mt?(cu(e,t,s),pa(e,t,s)):(qe&&w&&Yc(t),t.flags|=1,It(e,t,r,s),t.child)}function Ep(e,t,a,r,s){if(e===null){var u=a.type;return typeof u=="function"&&!Uc(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,Tp(e,t,u,r,s)):(e=vi(a.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!ju(e,s)){var y=u.memoizedProps;if(a=a.compare,a=a!==null?a:lo,a(y,r)&&e.ref===t.ref)return pa(e,t,s)}return t.flags|=1,e=ca(u,r),e.ref=t.ref,e.return=t,t.child=e}function Tp(e,t,a,r,s){if(e!==null){var u=e.memoizedProps;if(lo(u,r)&&e.ref===t.ref)if(Mt=!1,t.pendingProps=r=u,ju(e,s))(e.flags&131072)!==0&&(Mt=!0);else return t.lanes=e.lanes,pa(e,t,s)}return Au(e,t,a,r,s)}function Cp(e,t,a,r){var s=r.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(r=t.child=e.child,s=0;r!==null;)s=s|r.lanes|r.childLanes,r=r.sibling;r=s&~u}else r=0,t.child=null;return Mp(e,t,u,a,r)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&wi(t,u!==null?u.cachePool:null),u!==null?_h(t,u):au(),Rh(t);else return r=t.lanes=536870912,Mp(e,t,u!==null?u.baseLanes|a:a,a,r)}else u!==null?(wi(t,u.cachePool),_h(t,u),qa(),t.memoizedState=null):(e!==null&&wi(t,null),au(),qa());return It(e,t,s,a),t.child}function xo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Mp(e,t,a,r,s){var u=Zc();return u=u===null?null:{parent:Tt._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&wi(t,null),au(),Rh(t),e!==null&&cr(e,t,r,!0),t.childLanes=s,null}function Bi(e,t){return t=Ii({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ap(e,t,a){return Ol(t,e.child,null,a),e=Bi(t,t.pendingProps),e.flags|=2,mn(t),t.memoizedState=null,e}function bS(e,t,a){var r=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(qe){if(r.mode==="hidden")return e=Bi(t,r),t.lanes=536870912,xo(null,e);if(ru(t),(e=dt)?(e=Ug(e,Rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:La!==null?{id:$n,overflow:Kn}:null,retryLane:536870912,hydrationErrors:null},a=uh(e),a.return=t,t.child=a,Bt=t,dt=null)):e=null,e===null)throw Ba(t);return t.lanes=536870912,null}return Bi(t,r)}var u=e.memoizedState;if(u!==null){var y=u.dehydrated;if(ru(t),s)if(t.flags&256)t.flags&=-257,t=Ap(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Mt||cr(e,t,a,!1),s=(a&e.childLanes)!==0,Mt||s){if(r=ct,r!==null&&(y=Be(r,a),y!==0&&y!==u.retryLane))throw u.retryLane=y,El(e,y),an(r,e,y),Mu;Fi(),t=Ap(e,t,a)}else e=u.treeContext,dt=On(y.nextSibling),Bt=t,qe=!0,Ha=null,Rn=!1,e!==null&&mh(t,e),t=Bi(t,r),t.flags|=4096;return t}return e=ca(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ui(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Au(e,t,a,r,s){return Al(t),a=iu(e,t,a,r,void 0,s),r=su(),e!==null&&!Mt?(cu(e,t,s),pa(e,t,s)):(qe&&r&&Yc(t),t.flags|=1,It(e,t,a,s),t.child)}function _p(e,t,a,r,s,u){return Al(t),t.updateQueue=null,a=Oh(t,r,a,s),Nh(e),r=su(),e!==null&&!Mt?(cu(e,t,u),pa(e,t,u)):(qe&&r&&Yc(t),t.flags|=1,It(e,t,a,u),t.child)}function Rp(e,t,a,r,s){if(Al(t),t.stateNode===null){var u=rr,y=a.contextType;typeof y=="object"&&y!==null&&(u=Ut(y)),u=new a(r,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=Tu,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=r,u.state=t.memoizedState,u.refs={},Wc(t),y=a.contextType,u.context=typeof y=="object"&&y!==null?Ut(y):rr,u.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(Eu(t,a,y,r),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(y=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),y!==u.state&&Tu.enqueueReplaceState(u,u.state,null),po(t,r,u,s),ho(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){u=t.stateNode;var w=t.memoizedProps,z=Dl(a,w);u.props=z;var F=u.context,oe=a.contextType;y=rr,typeof oe=="object"&&oe!==null&&(y=Ut(oe));var ue=a.getDerivedStateFromProps;oe=typeof ue=="function"||typeof u.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,oe||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(w||F!==y)&&pp(t,u,r,y),Ia=!1;var W=t.memoizedState;u.state=W,po(t,r,u,s),ho(),F=t.memoizedState,w||W!==F||Ia?(typeof ue=="function"&&(Eu(t,a,ue,r),F=t.memoizedState),(z=Ia||hp(t,a,z,r,W,F,y))?(oe||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=F),u.props=r,u.state=F,u.context=y,r=z):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{u=t.stateNode,eu(e,t),y=t.memoizedProps,oe=Dl(a,y),u.props=oe,ue=t.pendingProps,W=u.context,F=a.contextType,z=rr,typeof F=="object"&&F!==null&&(z=Ut(F)),w=a.getDerivedStateFromProps,(F=typeof w=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(y!==ue||W!==z)&&pp(t,u,r,z),Ia=!1,W=t.memoizedState,u.state=W,po(t,r,u,s),ho();var te=t.memoizedState;y!==ue||W!==te||Ia||e!==null&&e.dependencies!==null&&xi(e.dependencies)?(typeof w=="function"&&(Eu(t,a,w,r),te=t.memoizedState),(oe=Ia||hp(t,a,oe,r,W,te,z)||e!==null&&e.dependencies!==null&&xi(e.dependencies))?(F||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(r,te,z),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(r,te,z)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=te),u.props=r,u.state=te,u.context=z,r=oe):(typeof u.componentDidUpdate!="function"||y===e.memoizedProps&&W===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&W===e.memoizedState||(t.flags|=1024),r=!1)}return u=r,Ui(e,t),r=(t.flags&128)!==0,u||r?(u=t.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&r?(t.child=Ol(t,e.child,null,s),t.child=Ol(t,null,a,s)):It(e,t,a,s),t.memoizedState=u.state,e=t.child):e=pa(e,t,s),e}function Np(e,t,a,r){return Cl(),t.flags|=256,It(e,t,a,r),t.child}var _u={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ru(e){return{baseLanes:e,cachePool:bh()}}function Nu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=pn),e}function Op(e,t,a){var r=t.pendingProps,s=!1,u=(t.flags&128)!==0,y;if((y=u)||(y=e!==null&&e.memoizedState===null?!1:(bt.current&2)!==0),y&&(s=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(qe){if(s?Va(t):qa(),(e=dt)?(e=Ug(e,Rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:La!==null?{id:$n,overflow:Kn}:null,retryLane:536870912,hydrationErrors:null},a=uh(e),a.return=t,t.child=a,Bt=t,dt=null)):e=null,e===null)throw Ba(t);return mf(e)?t.lanes=32:t.lanes=536870912,null}var w=r.children;return r=r.fallback,s?(qa(),s=t.mode,w=Ii({mode:"hidden",children:w},s),r=Tl(r,s,a,null),w.return=t,r.return=t,w.sibling=r,t.child=w,r=t.child,r.memoizedState=Ru(a),r.childLanes=Nu(e,y,a),t.memoizedState=_u,xo(null,r)):(Va(t),Ou(t,w))}var z=e.memoizedState;if(z!==null&&(w=z.dehydrated,w!==null)){if(u)t.flags&256?(Va(t),t.flags&=-257,t=zu(e,t,a)):t.memoizedState!==null?(qa(),t.child=e.child,t.flags|=128,t=null):(qa(),w=r.fallback,s=t.mode,r=Ii({mode:"visible",children:r.children},s),w=Tl(w,s,a,null),w.flags|=2,r.return=t,w.return=t,r.sibling=w,t.child=r,Ol(t,e.child,null,a),r=t.child,r.memoizedState=Ru(a),r.childLanes=Nu(e,y,a),t.memoizedState=_u,t=xo(null,r));else if(Va(t),mf(w)){if(y=w.nextSibling&&w.nextSibling.dataset,y)var F=y.dgst;y=F,r=Error(i(419)),r.stack="",r.digest=y,io({value:r,source:null,stack:null}),t=zu(e,t,a)}else if(Mt||cr(e,t,a,!1),y=(a&e.childLanes)!==0,Mt||y){if(y=ct,y!==null&&(r=Be(y,a),r!==0&&r!==z.retryLane))throw z.retryLane=r,El(e,r),an(y,e,r),Mu;df(w)||Fi(),t=zu(e,t,a)}else df(w)?(t.flags|=192,t.child=e.child,t=null):(e=z.treeContext,dt=On(w.nextSibling),Bt=t,qe=!0,Ha=null,Rn=!1,e!==null&&mh(t,e),t=Ou(t,r.children),t.flags|=4096);return t}return s?(qa(),w=r.fallback,s=t.mode,z=e.child,F=z.sibling,r=ca(z,{mode:"hidden",children:r.children}),r.subtreeFlags=z.subtreeFlags&65011712,F!==null?w=ca(F,w):(w=Tl(w,s,a,null),w.flags|=2),w.return=t,r.return=t,r.sibling=w,t.child=r,xo(null,r),r=t.child,w=e.child.memoizedState,w===null?w=Ru(a):(s=w.cachePool,s!==null?(z=Tt._currentValue,s=s.parent!==z?{parent:z,pool:z}:s):s=bh(),w={baseLanes:w.baseLanes|a,cachePool:s}),r.memoizedState=w,r.childLanes=Nu(e,y,a),t.memoizedState=_u,xo(e.child,r)):(Va(t),a=e.child,e=a.sibling,a=ca(a,{mode:"visible",children:r.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function Ou(e,t){return t=Ii({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ii(e,t){return e=fn(22,e,null,t),e.lanes=0,e}function zu(e,t,a){return Ol(t,e.child,null,a),e=Ou(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zp(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$c(e.return,t,a)}function Du(e,t,a,r,s,u){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:s,treeForkCount:u}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=a,y.tailMode=s,y.treeForkCount=u)}function Dp(e,t,a){var r=t.pendingProps,s=r.revealOrder,u=r.tail;r=r.children;var y=bt.current,w=(y&2)!==0;if(w?(y=y&1|2,t.flags|=128):y&=1,J(bt,y),It(e,t,r,a),r=qe?oo:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zp(e,a,t);else if(e.tag===19)zp(e,a,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(s){case"forwards":for(a=t.child,s=null;a!==null;)e=a.alternate,e!==null&&_i(e)===null&&(s=a),a=a.sibling;a=s,a===null?(s=t.child,t.child=null):(s=a.sibling,a.sibling=null),Du(t,!1,s,a,u,r);break;case"backwards":case"unstable_legacy-backwards":for(a=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&_i(e)===null){t.child=s;break}e=s.sibling,s.sibling=a,a=s,s=e}Du(t,!0,a,null,u,r);break;case"together":Du(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function pa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),$a|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(cr(e,t,a,!1),(a&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,a=ca(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ca(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ju(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&xi(e)))}function xS(e,t,a){switch(t.tag){case 3:Z(t,t.stateNode.containerInfo),Ua(t,Tt,e.memoizedState.cache),Cl();break;case 27:case 5:be(t);break;case 4:Z(t,t.stateNode.containerInfo);break;case 10:Ua(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ru(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Va(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Op(e,t,a):(Va(t),e=pa(e,t,a),e!==null?e.sibling:null);Va(t);break;case 19:var s=(e.flags&128)!==0;if(r=(a&t.childLanes)!==0,r||(cr(e,t,a,!1),r=(a&t.childLanes)!==0),s){if(r)return Dp(e,t,a);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),J(bt,bt.current),r)break;return null;case 22:return t.lanes=0,Cp(e,t,a,t.pendingProps);case 24:Ua(t,Tt,e.memoizedState.cache)}return pa(e,t,a)}function jp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Mt=!0;else{if(!ju(e,a)&&(t.flags&128)===0)return Mt=!1,xS(e,t,a);Mt=(e.flags&131072)!==0}else Mt=!1,qe&&(t.flags&1048576)!==0&&dh(t,oo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Rl(t.elementType),t.type=e,typeof e=="function")Uc(e)?(r=Dl(e,r),t.tag=1,t=Rp(null,t,e,r,a)):(t.tag=0,t=Au(null,t,e,r,a));else{if(e!=null){var s=e.$$typeof;if(s===X){t.tag=11,t=wp(null,t,e,r,a);break e}else if(s===U){t.tag=14,t=Ep(null,t,e,r,a);break e}}throw t=$(e)||e,Error(i(306,t,""))}}return t;case 0:return Au(e,t,t.type,t.pendingProps,a);case 1:return r=t.type,s=Dl(r,t.pendingProps),Rp(e,t,r,s,a);case 3:e:{if(Z(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var u=t.memoizedState;s=u.element,eu(e,t),po(t,r,null,a);var y=t.memoizedState;if(r=y.cache,Ua(t,Tt,r),r!==u.cache&&Kc(t,[Tt],a,!0),ho(),r=y.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Np(e,t,r,a);break e}else if(r!==s){s=Mn(Error(i(424)),t),io(s),t=Np(e,t,r,a);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(dt=On(e.firstChild),Bt=t,qe=!0,Ha=null,Rn=!0,a=Ch(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Cl(),r===s){t=pa(e,t,a);break e}It(e,t,r,a)}t=t.child}return t;case 26:return Ui(e,t),e===null?(a=Pg(t.type,null,t.pendingProps,null))?t.memoizedState=a:qe||(a=t.type,e=t.pendingProps,r=ns(me.current).createElement(a),r[tt]=t,r[Ke]=e,Gt(r,a,e),jt(r),t.stateNode=r):t.memoizedState=Pg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return be(t),e===null&&qe&&(r=t.stateNode=Yg(t.type,t.pendingProps,me.current),Bt=t,Rn=!0,s=dt,Ja(t.type)?(hf=s,dt=On(r.firstChild)):dt=s),It(e,t,t.pendingProps.children,a),Ui(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&qe&&((s=r=dt)&&(r=QS(r,t.type,t.pendingProps,Rn),r!==null?(t.stateNode=r,Bt=t,dt=On(r.firstChild),Rn=!1,s=!0):s=!1),s||Ba(t)),be(t),s=t.type,u=t.pendingProps,y=e!==null?e.memoizedProps:null,r=u.children,cf(s,u)?r=null:y!==null&&cf(s,y)&&(t.flags|=32),t.memoizedState!==null&&(s=iu(e,t,fS,null,null,a),ko._currentValue=s),Ui(e,t),It(e,t,r,a),t.child;case 6:return e===null&&qe&&((e=a=dt)&&(a=ZS(a,t.pendingProps,Rn),a!==null?(t.stateNode=a,Bt=t,dt=null,e=!0):e=!1),e||Ba(t)),null;case 13:return Op(e,t,a);case 4:return Z(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ol(t,null,r,a):It(e,t,r,a),t.child;case 11:return wp(e,t,t.type,t.pendingProps,a);case 7:return It(e,t,t.pendingProps,a),t.child;case 8:return It(e,t,t.pendingProps.children,a),t.child;case 12:return It(e,t,t.pendingProps.children,a),t.child;case 10:return r=t.pendingProps,Ua(t,t.type,r.value),It(e,t,r.children,a),t.child;case 9:return s=t.type._context,r=t.pendingProps.children,Al(t),s=Ut(s),r=r(s),t.flags|=1,It(e,t,r,a),t.child;case 14:return Ep(e,t,t.type,t.pendingProps,a);case 15:return Tp(e,t,t.type,t.pendingProps,a);case 19:return Dp(e,t,a);case 31:return bS(e,t,a);case 22:return Cp(e,t,a,t.pendingProps);case 24:return Al(t),r=Ut(Tt),e===null?(s=Zc(),s===null&&(s=ct,u=Fc(),s.pooledCache=u,u.refCount++,u!==null&&(s.pooledCacheLanes|=a),s=u),t.memoizedState={parent:r,cache:s},Wc(t),Ua(t,Tt,s)):((e.lanes&a)!==0&&(eu(e,t),po(t,null,null,a),ho()),s=e.memoizedState,u=t.memoizedState,s.parent!==r?(s={parent:r,cache:r},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Ua(t,Tt,r)):(r=u.cache,Ua(t,Tt,r),r!==s.cache&&Kc(t,[Tt],a,!0))),It(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ga(e){e.flags|=4}function ku(e,t,a,r,s){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(ig())e.flags|=8192;else throw Nl=Ti,Jc}else e.flags&=-16777217}function kp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Qg(t))if(ig())e.flags|=8192;else throw Nl=Ti,Jc}function Gi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ae():536870912,e.lanes|=t,Sr|=t)}function So(e,t){if(!qe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function mt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,r=0;if(t)for(var s=e.child;s!==null;)a|=s.lanes|s.childLanes,r|=s.subtreeFlags&65011712,r|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)a|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=a,t}function SS(e,t,a){var r=t.pendingProps;switch(Vc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(t),null;case 1:return mt(t),null;case 3:return a=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),da(Tt),re(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(sr(t)?ga(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Pc())),mt(t),null;case 26:var s=t.type,u=t.memoizedState;return e===null?(ga(t),u!==null?(mt(t),kp(t,u)):(mt(t),ku(t,s,null,r,a))):u?u!==e.memoizedState?(ga(t),mt(t),kp(t,u)):(mt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&ga(t),mt(t),ku(t,s,e,r,a)),null;case 27:if(Me(t),a=me.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ga(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return mt(t),null}e=ie.current,sr(t)?hh(t):(e=Yg(s,r,a),t.stateNode=e,ga(t))}return mt(t),null;case 5:if(Me(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ga(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return mt(t),null}if(u=ie.current,sr(t))hh(t);else{var y=ns(me.current);switch(u){case 1:u=y.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:u=y.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":u=y.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":u=y.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":u=y.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?u.multiple=!0:r.size&&(u.size=r.size);break;default:u=typeof r.is=="string"?y.createElement(s,{is:r.is}):y.createElement(s)}}u[tt]=t,u[Ke]=r;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)u.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=u;e:switch(Gt(u,s,r),s){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ga(t)}}return mt(t),ku(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ga(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(i(166));if(e=me.current,sr(t)){if(e=t.stateNode,a=t.memoizedProps,r=null,s=Bt,s!==null)switch(s.tag){case 27:case 5:r=s.memoizedProps}e[tt]=t,e=!!(e.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||Og(e.nodeValue,a)),e||Ba(t,!0)}else e=ns(e).createTextNode(r),e[tt]=t,t.stateNode=e}return mt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(r=sr(t),a!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[tt]=t}else Cl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),e=!1}else a=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(mn(t),t):(mn(t),null);if((t.flags&128)!==0)throw Error(i(558))}return mt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=sr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(i(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(i(317));s[tt]=t}else Cl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;mt(t),s=!1}else s=Pc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(mn(t),t):(mn(t),null)}return mn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=r!==null,e=e!==null&&e.memoizedState!==null,a&&(r=t.child,s=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(s=r.alternate.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==s&&(r.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Gi(t,t.updateQueue),mt(t),null);case 4:return re(),e===null&&af(t.stateNode.containerInfo),mt(t),null;case 10:return da(t.type),mt(t),null;case 19:if(H(bt),r=t.memoizedState,r===null)return mt(t),null;if(s=(t.flags&128)!==0,u=r.rendering,u===null)if(s)So(r,!1);else{if(gt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=_i(e),u!==null){for(t.flags|=128,So(r,!1),e=u.updateQueue,t.updateQueue=e,Gi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)ch(a,e),a=a.sibling;return J(bt,bt.current&1|2),qe&&ua(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&_t()>Xi&&(t.flags|=128,s=!0,So(r,!1),t.lanes=4194304)}else{if(!s)if(e=_i(u),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Gi(t,e),So(r,!0),r.tail===null&&r.tailMode==="hidden"&&!u.alternate&&!qe)return mt(t),null}else 2*_t()-r.renderingStartTime>Xi&&a!==536870912&&(t.flags|=128,s=!0,So(r,!1),t.lanes=4194304);r.isBackwards?(u.sibling=t.child,t.child=u):(e=r.last,e!==null?e.sibling=u:t.child=u,r.last=u)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=_t(),e.sibling=null,a=bt.current,J(bt,s?a&1|2:a&1),qe&&ua(t,r.treeForkCount),e):(mt(t),null);case 22:case 23:return mn(t),lu(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(a&536870912)!==0&&(t.flags&128)===0&&(mt(t),t.subtreeFlags&6&&(t.flags|=8192)):mt(t),a=t.updateQueue,a!==null&&Gi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==a&&(t.flags|=2048),e!==null&&H(_l),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),da(Tt),mt(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function wS(e,t){switch(Vc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return da(Tt),re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Me(t),null;case 31:if(t.memoizedState!==null){if(mn(t),t.alternate===null)throw Error(i(340));Cl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Cl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(bt),null;case 4:return re(),null;case 10:return da(t.type),null;case 22:case 23:return mn(t),lu(),e!==null&&H(_l),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return da(Tt),null;case 25:return null;default:return null}}function Lp(e,t){switch(Vc(t),t.tag){case 3:da(Tt),re();break;case 26:case 27:case 5:Me(t);break;case 4:re();break;case 31:t.memoizedState!==null&&mn(t);break;case 13:mn(t);break;case 19:H(bt);break;case 10:da(t.type);break;case 22:case 23:mn(t),lu(),e!==null&&H(_l);break;case 24:da(Tt)}}function wo(e,t){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var s=r.next;a=s;do{if((a.tag&e)===e){r=void 0;var u=a.create,y=a.inst;r=u(),y.destroy=r}a=a.next}while(a!==s)}}catch(w){at(t,t.return,w)}}function Pa(e,t,a){try{var r=t.updateQueue,s=r!==null?r.lastEffect:null;if(s!==null){var u=s.next;r=u;do{if((r.tag&e)===e){var y=r.inst,w=y.destroy;if(w!==void 0){y.destroy=void 0,s=t;var z=a,F=w;try{F()}catch(oe){at(s,z,oe)}}}r=r.next}while(r!==u)}}catch(oe){at(t,t.return,oe)}}function Hp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Ah(t,a)}catch(r){at(e,e.return,r)}}}function Bp(e,t,a){a.props=Dl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(r){at(e,t,r)}}function Eo(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof a=="function"?e.refCleanup=a(r):a.current=r}}catch(s){at(e,t,s)}}function Fn(e,t){var a=e.ref,r=e.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(s){at(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(s){at(e,t,s)}else a.current=null}function Up(e){var t=e.type,a=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(s){at(e,e.return,s)}}function Lu(e,t,a){try{var r=e.stateNode;qS(r,e.type,a,t),r[Ke]=t}catch(s){at(e,e.return,s)}}function Ip(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ja(e.type)||e.tag===4}function Hu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ip(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&&Ja(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 Bu(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=ia));else if(r!==4&&(r===27&&Ja(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Bu(e,t,a),e=e.sibling;e!==null;)Bu(e,t,a),e=e.sibling}function Yi(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(r!==4&&(r===27&&Ja(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Yi(e,t,a),e=e.sibling;e!==null;)Yi(e,t,a),e=e.sibling}function Gp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var r=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Gt(t,r,a),t[tt]=e,t[Ke]=a}catch(u){at(e,e.return,u)}}var ya=!1,At=!1,Uu=!1,Yp=typeof WeakSet=="function"?WeakSet:Set,kt=null;function ES(e,t){if(e=e.containerInfo,of=cs,e=eh(e),zc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var s=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var y=0,w=-1,z=-1,F=0,oe=0,ue=e,W=null;t:for(;;){for(var te;ue!==a||s!==0&&ue.nodeType!==3||(w=y+s),ue!==u||r!==0&&ue.nodeType!==3||(z=y+r),ue.nodeType===3&&(y+=ue.nodeValue.length),(te=ue.firstChild)!==null;)W=ue,ue=te;for(;;){if(ue===e)break t;if(W===a&&++F===s&&(w=y),W===u&&++oe===r&&(z=y),(te=ue.nextSibling)!==null)break;ue=W,W=ue.parentNode}ue=te}a=w===-1||z===-1?null:{start:w,end:z}}else a=null}a=a||{start:0,end:0}}else a=null;for(sf={focusedElem:e,selectionRange:a},cs=!1,kt=t;kt!==null;)if(t=kt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,kt=e;else for(;kt!==null;){switch(t=kt,u=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(a=0;a<e.length;a++)s=e[a],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,s=u.memoizedProps,u=u.memoizedState,r=a.stateNode;try{var ve=Dl(a.type,s);e=r.getSnapshotBeforeUpdate(ve,u),r.__reactInternalSnapshotBeforeUpdate=e}catch(_e){at(a,a.return,_e)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)ff(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ff(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,kt=e;break}kt=t.return}}function Vp(e,t,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:ba(e,a),r&4&&wo(5,a);break;case 1:if(ba(e,a),r&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){at(a,a.return,y)}else{var s=Dl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){at(a,a.return,y)}}r&64&&Hp(a),r&512&&Eo(a,a.return);break;case 3:if(ba(e,a),r&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Ah(e,t)}catch(y){at(a,a.return,y)}}break;case 27:t===null&&r&4&&Gp(a);case 26:case 5:ba(e,a),t===null&&r&4&&Up(a),r&512&&Eo(a,a.return);break;case 12:ba(e,a);break;case 31:ba(e,a),r&4&&Xp(e,a);break;case 13:ba(e,a),r&4&&$p(e,a),r&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=zS.bind(null,a),JS(e,a))));break;case 22:if(r=a.memoizedState!==null||ya,!r){t=t!==null&&t.memoizedState!==null||At,s=ya;var u=At;ya=r,(At=t)&&!u?xa(e,a,(a.subtreeFlags&8772)!==0):ba(e,a),ya=s,At=u}break;case 30:break;default:ba(e,a)}}function qp(e){var t=e.alternate;t!==null&&(e.alternate=null,qp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Da(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 ht=null,Wt=!1;function va(e,t,a){for(a=a.child;a!==null;)Pp(e,t,a),a=a.sibling}function Pp(e,t,a){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(aa,a)}catch{}switch(a.tag){case 26:At||Fn(a,t),va(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:At||Fn(a,t);var r=ht,s=Wt;Ja(a.type)&&(ht=a.stateNode,Wt=!1),va(e,t,a),zo(a.stateNode),ht=r,Wt=s;break;case 5:At||Fn(a,t);case 6:if(r=ht,s=Wt,ht=null,va(e,t,a),ht=r,Wt=s,ht!==null)if(Wt)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(a.stateNode)}catch(u){at(a,t,u)}else try{ht.removeChild(a.stateNode)}catch(u){at(a,t,u)}break;case 18:ht!==null&&(Wt?(e=ht,Hg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Rr(e)):Hg(ht,a.stateNode));break;case 4:r=ht,s=Wt,ht=a.stateNode.containerInfo,Wt=!0,va(e,t,a),ht=r,Wt=s;break;case 0:case 11:case 14:case 15:Pa(2,a,t),At||Pa(4,a,t),va(e,t,a);break;case 1:At||(Fn(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"&&Bp(a,t,r)),va(e,t,a);break;case 21:va(e,t,a);break;case 22:At=(r=At)||a.memoizedState!==null,va(e,t,a),At=r;break;default:va(e,t,a)}}function Xp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Rr(e)}catch(a){at(t,t.return,a)}}}function $p(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Rr(e)}catch(a){at(t,t.return,a)}}function TS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Yp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Yp),t;default:throw Error(i(435,e.tag))}}function Vi(e,t){var a=TS(e);t.forEach(function(r){if(!a.has(r)){a.add(r);var s=DS.bind(null,e,r);r.then(s,s)}})}function en(e,t){var a=t.deletions;if(a!==null)for(var r=0;r<a.length;r++){var s=a[r],u=e,y=t,w=y;e:for(;w!==null;){switch(w.tag){case 27:if(Ja(w.type)){ht=w.stateNode,Wt=!1;break e}break;case 5:ht=w.stateNode,Wt=!1;break e;case 3:case 4:ht=w.stateNode.containerInfo,Wt=!0;break e}w=w.return}if(ht===null)throw Error(i(160));Pp(u,y,s),ht=null,Wt=!1,u=s.alternate,u!==null&&(u.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Kp(t,e),t=t.sibling}var Hn=null;function Kp(e,t){var a=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:en(t,e),tn(e),r&4&&(Pa(3,e,e.return),wo(3,e),Pa(5,e,e.return));break;case 1:en(t,e),tn(e),r&512&&(At||a===null||Fn(a,a.return)),r&64&&ya&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:var s=Hn;if(en(t,e),tn(e),r&512&&(At||a===null||Fn(a,a.return)),r&4){var u=a!==null?a.memoizedState:null;if(r=e.memoizedState,a===null)if(r===null)if(e.stateNode===null){e:{r=e.type,a=e.memoizedProps,s=s.ownerDocument||s;t:switch(r){case"title":u=s.getElementsByTagName("title")[0],(!u||u[ra]||u[tt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=s.createElement(r),s.head.insertBefore(u,s.querySelector("head > title"))),Gt(u,r,a),u[tt]=e,jt(u),r=u;break e;case"link":var y=Kg("link","href",s).get(r+(a.href||""));if(y){for(var w=0;w<y.length;w++)if(u=y[w],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(w,1);break t}}u=s.createElement(r),Gt(u,r,a),s.head.appendChild(u);break;case"meta":if(y=Kg("meta","content",s).get(r+(a.content||""))){for(w=0;w<y.length;w++)if(u=y[w],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(w,1);break t}}u=s.createElement(r),Gt(u,r,a),s.head.appendChild(u);break;default:throw Error(i(468,r))}u[tt]=e,jt(u),r=u}e.stateNode=r}else Fg(s,e.type,e.stateNode);else e.stateNode=$g(s,r,e.memoizedProps);else u!==r?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,r===null?Fg(s,e.type,e.stateNode):$g(s,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Lu(e,e.memoizedProps,a.memoizedProps)}break;case 27:en(t,e),tn(e),r&512&&(At||a===null||Fn(a,a.return)),a!==null&&r&4&&Lu(e,e.memoizedProps,a.memoizedProps);break;case 5:if(en(t,e),tn(e),r&512&&(At||a===null||Fn(a,a.return)),e.flags&32){s=e.stateNode;try{Jl(s,"")}catch(ve){at(e,e.return,ve)}}r&4&&e.stateNode!=null&&(s=e.memoizedProps,Lu(e,s,a!==null?a.memoizedProps:s)),r&1024&&(Uu=!0);break;case 6:if(en(t,e),tn(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,a=e.stateNode;try{a.nodeValue=r}catch(ve){at(e,e.return,ve)}}break;case 3:if(rs=null,s=Hn,Hn=as(t.containerInfo),en(t,e),Hn=s,tn(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{Rr(t.containerInfo)}catch(ve){at(e,e.return,ve)}Uu&&(Uu=!1,Fp(e));break;case 4:r=Hn,Hn=as(e.stateNode.containerInfo),en(t,e),tn(e),Hn=r;break;case 12:en(t,e),tn(e);break;case 31:en(t,e),tn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Vi(e,r)));break;case 13:en(t,e),tn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Pi=_t()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Vi(e,r)));break;case 22:s=e.memoizedState!==null;var z=a!==null&&a.memoizedState!==null,F=ya,oe=At;if(ya=F||s,At=oe||z,en(t,e),At=oe,ya=F,tn(e),r&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(a===null||z||ya||At||jl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){z=a=t;try{if(u=z.stateNode,s)y=u.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{w=z.stateNode;var ue=z.memoizedProps.style,W=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;w.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(ve){at(z,z.return,ve)}}}else if(t.tag===6){if(a===null){z=t;try{z.stateNode.nodeValue=s?"":z.memoizedProps}catch(ve){at(z,z.return,ve)}}}else if(t.tag===18){if(a===null){z=t;try{var te=z.stateNode;s?Bg(te,!0):Bg(z.stateNode,!1)}catch(ve){at(z,z.return,ve)}}}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;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,Vi(e,a))));break;case 19:en(t,e),tn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Vi(e,r)));break;case 30:break;case 21:break;default:en(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{for(var a,r=e.return;r!==null;){if(Ip(r)){a=r;break}r=r.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var s=a.stateNode,u=Hu(e);Yi(e,u,s);break;case 5:var y=a.stateNode;a.flags&32&&(Jl(y,""),a.flags&=-33);var w=Hu(e);Yi(e,w,y);break;case 3:case 4:var z=a.stateNode.containerInfo,F=Hu(e);Bu(e,F,z);break;default:throw Error(i(161))}}catch(oe){at(e,e.return,oe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Fp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ba(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Vp(e,t.alternate,t),t=t.sibling}function jl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Pa(4,t,t.return),jl(t);break;case 1:Fn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Bp(t,t.return,a),jl(t);break;case 27:zo(t.stateNode);case 26:case 5:Fn(t,t.return),jl(t);break;case 22:t.memoizedState===null&&jl(t);break;case 30:jl(t);break;default:jl(t)}e=e.sibling}}function xa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,s=e,u=t,y=u.flags;switch(u.tag){case 0:case 11:case 15:xa(s,u,a),wo(4,u);break;case 1:if(xa(s,u,a),r=u,s=r.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(F){at(r,r.return,F)}if(r=u,s=r.updateQueue,s!==null){var w=r.stateNode;try{var z=s.shared.hiddenCallbacks;if(z!==null)for(s.shared.hiddenCallbacks=null,s=0;s<z.length;s++)Mh(z[s],w)}catch(F){at(r,r.return,F)}}a&&y&64&&Hp(u),Eo(u,u.return);break;case 27:Gp(u);case 26:case 5:xa(s,u,a),a&&r===null&&y&4&&Up(u),Eo(u,u.return);break;case 12:xa(s,u,a);break;case 31:xa(s,u,a),a&&y&4&&Xp(s,u);break;case 13:xa(s,u,a),a&&y&4&&$p(s,u);break;case 22:u.memoizedState===null&&xa(s,u,a),Eo(u,u.return);break;case 30:break;default:xa(s,u,a)}t=t.sibling}}function Iu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&so(a))}function Gu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&so(e))}function Bn(e,t,a,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Qp(e,t,a,r),t=t.sibling}function Qp(e,t,a,r){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Bn(e,t,a,r),s&2048&&wo(9,t);break;case 1:Bn(e,t,a,r);break;case 3:Bn(e,t,a,r),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&so(e)));break;case 12:if(s&2048){Bn(e,t,a,r),e=t.stateNode;try{var u=t.memoizedProps,y=u.id,w=u.onPostCommit;typeof w=="function"&&w(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){at(t,t.return,z)}}else Bn(e,t,a,r);break;case 31:Bn(e,t,a,r);break;case 13:Bn(e,t,a,r);break;case 23:break;case 22:u=t.stateNode,y=t.alternate,t.memoizedState!==null?u._visibility&2?Bn(e,t,a,r):To(e,t):u._visibility&2?Bn(e,t,a,r):(u._visibility|=2,vr(e,t,a,r,(t.subtreeFlags&10256)!==0||!1)),s&2048&&Iu(y,t);break;case 24:Bn(e,t,a,r),s&2048&&Gu(t.alternate,t);break;default:Bn(e,t,a,r)}}function vr(e,t,a,r,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,y=t,w=a,z=r,F=y.flags;switch(y.tag){case 0:case 11:case 15:vr(u,y,w,z,s),wo(8,y);break;case 23:break;case 22:var oe=y.stateNode;y.memoizedState!==null?oe._visibility&2?vr(u,y,w,z,s):To(u,y):(oe._visibility|=2,vr(u,y,w,z,s)),s&&F&2048&&Iu(y.alternate,y);break;case 24:vr(u,y,w,z,s),s&&F&2048&&Gu(y.alternate,y);break;default:vr(u,y,w,z,s)}t=t.sibling}}function To(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,r=t,s=r.flags;switch(r.tag){case 22:To(a,r),s&2048&&Iu(r.alternate,r);break;case 24:To(a,r),s&2048&&Gu(r.alternate,r);break;default:To(a,r)}t=t.sibling}}var Co=8192;function br(e,t,a){if(e.subtreeFlags&Co)for(e=e.child;e!==null;)Zp(e,t,a),e=e.sibling}function Zp(e,t,a){switch(e.tag){case 26:br(e,t,a),e.flags&Co&&e.memoizedState!==null&&uw(a,Hn,e.memoizedState,e.memoizedProps);break;case 5:br(e,t,a);break;case 3:case 4:var r=Hn;Hn=as(e.stateNode.containerInfo),br(e,t,a),Hn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Co,Co=16777216,br(e,t,a),Co=r):br(e,t,a));break;default:br(e,t,a)}}function Jp(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 Mo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];kt=r,eg(r,e)}Jp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wp(e),e=e.sibling}function Wp(e){switch(e.tag){case 0:case 11:case 15:Mo(e),e.flags&2048&&Pa(9,e,e.return);break;case 3:Mo(e);break;case 12:Mo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qi(e)):Mo(e);break;default:Mo(e)}}function qi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];kt=r,eg(r,e)}Jp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pa(8,t,t.return),qi(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,qi(t));break;default:qi(t)}e=e.sibling}}function eg(e,t){for(;kt!==null;){var a=kt;switch(a.tag){case 0:case 11:case 15:Pa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:so(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,kt=r;else e:for(a=e;kt!==null;){r=kt;var s=r.sibling,u=r.return;if(qp(r),r===a){kt=null;break e}if(s!==null){s.return=u,kt=s;break e}kt=u}}}var CS={getCacheForType:function(e){var t=Ut(Tt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Ut(Tt).controller.signal}},MS=typeof WeakMap=="function"?WeakMap:Map,Je=0,ct=null,Ue=null,Ye=0,nt=0,hn=null,Xa=!1,xr=!1,Yu=!1,Sa=0,gt=0,$a=0,kl=0,Vu=0,pn=0,Sr=0,Ao=null,nn=null,qu=!1,Pi=0,tg=0,Xi=1/0,$i=null,Ka=null,Rt=0,Fa=null,wr=null,wa=0,Pu=0,Xu=null,ng=null,_o=0,$u=null;function gn(){return(Je&2)!==0&&Ye!==0?Ye&-Ye:M.T!==null?Wu():qt()}function ag(){if(pn===0)if((Ye&536870912)===0||qe){var e=Oa;Oa<<=1,(Oa&3932160)===0&&(Oa=262144),pn=e}else pn=536870912;return e=dn.current,e!==null&&(e.flags|=32),pn}function an(e,t,a){(e===ct&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(Er(e,0),Qa(e,Ye,pn,!1)),de(e,a),((Je&2)===0||e!==ct)&&(e===ct&&((Je&2)===0&&(kl|=a),gt===4&&Qa(e,Ye,pn,!1)),Qn(e))}function lg(e,t,a){if((Je&6)!==0)throw Error(i(327));var r=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ut(e,t),s=r?RS(e,t):Fu(e,t,!0),u=r;do{if(s===0){xr&&!r&&Qa(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!AS(a)){s=Fu(e,t,!1),u=!1;continue}if(s===2){if(u=t,e.errorRecoveryDisabledLanes&u)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var w=e;s=Ao;var z=w.current.memoizedState.isDehydrated;if(z&&(Er(w,y).flags|=256),y=Fu(w,y,!1),y!==2){if(Yu&&!z){w.errorRecoveryDisabledLanes|=u,kl|=u,s=4;break e}u=nn,nn=s,u!==null&&(nn===null?nn=u:nn.push.apply(nn,u))}s=y}if(u=!1,s!==2)continue}}if(s===1){Er(e,0),Qa(e,t,0,!0);break}e:{switch(r=e,u=s,u){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Qa(r,t,pn,!Xa);break e;case 2:nn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(s=Pi+300-_t(),10<s)){if(Qa(r,t,pn,!Xa),Re(r,0,!0)!==0)break e;wa=t,r.timeoutHandle=kg(rg.bind(null,r,a,nn,$i,qu,t,pn,kl,Sr,Xa,u,"Throttled",-0,0),s);break e}rg(r,a,nn,$i,qu,t,pn,kl,Sr,Xa,u,null,-0,0)}}break}while(!0);Qn(e)}function rg(e,t,a,r,s,u,y,w,z,F,oe,ue,W,te){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:ia},Zp(t,u,ue);var ve=(u&62914560)===u?Pi-_t():(u&4194048)===u?tg-_t():0;if(ve=fw(ue,ve),ve!==null){wa=u,e.cancelPendingCommit=ve(mg.bind(null,e,t,u,a,r,s,y,w,z,oe,ue,null,W,te)),Qa(e,u,y,!F);return}}mg(e,t,u,a,r,s,y,w,z)}function AS(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var r=0;r<a.length;r++){var s=a[r],u=s.getSnapshot;s=s.value;try{if(!un(u(),s))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Qa(e,t,a,r){t&=~Vu,t&=~kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var s=t;0<s;){var u=31-Dt(s),y=1<<u;r[u]=-1,s&=~y}a!==0&&Le(e,a,t)}function Ki(){return(Je&6)===0?(Ro(0),!1):!0}function Ku(){if(Ue!==null){if(nt===0)var e=Ue.return;else e=Ue,fa=Ml=null,uu(e),mr=null,uo=0,e=Ue;for(;e!==null;)Lp(e.alternate,e),e=e.return;Ue=null}}function Er(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,$S(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),wa=0,Ku(),ct=e,Ue=a=ca(e.current,null),Ye=t,nt=0,hn=null,Xa=!1,xr=ut(e,t),Yu=!1,Sr=pn=Vu=kl=$a=gt=0,nn=Ao=null,qu=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var s=31-Dt(r),u=1<<s;t|=e[s],r&=~u}return Sa=t,pi(),a}function og(e,t){je=null,M.H=bo,t===dr||t===Ei?(t=wh(),nt=3):t===Jc?(t=wh(),nt=4):nt=t===Mu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,hn=t,Ue===null&&(gt=1,Hi(e,Mn(t,e.current)))}function ig(){var e=dn.current;return e===null?!0:(Ye&4194048)===Ye?Nn===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===Nn:!1}function sg(){var e=M.H;return M.H=bo,e===null?bo:e}function cg(){var e=M.A;return M.A=CS,e}function Fi(){gt=4,Xa||(Ye&4194048)!==Ye&&dn.current!==null||(xr=!0),($a&134217727)===0&&(kl&134217727)===0||ct===null||Qa(ct,Ye,pn,!1)}function Fu(e,t,a){var r=Je;Je|=2;var s=sg(),u=cg();(ct!==e||Ye!==t)&&($i=null,Er(e,t)),t=!1;var y=gt;e:do try{if(nt!==0&&Ue!==null){var w=Ue,z=hn;switch(nt){case 8:Ku(),y=6;break e;case 3:case 2:case 9:case 6:dn.current===null&&(t=!0);var F=nt;if(nt=0,hn=null,Tr(e,w,z,F),a&&xr){y=0;break e}break;default:F=nt,nt=0,hn=null,Tr(e,w,z,F)}}_S(),y=gt;break}catch(oe){og(e,oe)}while(!0);return t&&e.shellSuspendCounter++,fa=Ml=null,Je=r,M.H=s,M.A=u,Ue===null&&(ct=null,Ye=0,pi()),y}function _S(){for(;Ue!==null;)ug(Ue)}function RS(e,t){var a=Je;Je|=2;var r=sg(),s=cg();ct!==e||Ye!==t?($i=null,Xi=_t()+500,Er(e,t)):xr=ut(e,t);e:do try{if(nt!==0&&Ue!==null){t=Ue;var u=hn;t:switch(nt){case 1:nt=0,hn=null,Tr(e,t,u,1);break;case 2:case 9:if(xh(u)){nt=0,hn=null,fg(t);break}t=function(){nt!==2&&nt!==9||ct!==e||(nt=7),Qn(e)},u.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:xh(u)?(nt=0,hn=null,fg(t)):(nt=0,hn=null,Tr(e,t,u,7));break;case 5:var y=null;switch(Ue.tag){case 26:y=Ue.memoizedState;case 5:case 27:var w=Ue;if(y?Qg(y):w.stateNode.complete){nt=0,hn=null;var z=w.sibling;if(z!==null)Ue=z;else{var F=w.return;F!==null?(Ue=F,Qi(F)):Ue=null}break t}}nt=0,hn=null,Tr(e,t,u,5);break;case 6:nt=0,hn=null,Tr(e,t,u,6);break;case 8:Ku(),gt=6;break e;default:throw Error(i(462))}}NS();break}catch(oe){og(e,oe)}while(!0);return fa=Ml=null,M.H=r,M.A=s,Je=a,Ue!==null?0:(ct=null,Ye=0,pi(),gt)}function NS(){for(;Ue!==null&&!et();)ug(Ue)}function ug(e){var t=jp(e.alternate,e,Sa);e.memoizedProps=e.pendingProps,t===null?Qi(e):Ue=t}function fg(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=_p(a,t,t.pendingProps,t.type,void 0,Ye);break;case 11:t=_p(a,t,t.pendingProps,t.type.render,t.ref,Ye);break;case 5:uu(t);default:Lp(a,t),t=Ue=ch(t,Sa),t=jp(a,t,Sa)}e.memoizedProps=e.pendingProps,t===null?Qi(e):Ue=t}function Tr(e,t,a,r){fa=Ml=null,uu(t),mr=null,uo=0;var s=t.return;try{if(vS(e,s,t,a,Ye)){gt=1,Hi(e,Mn(a,e.current)),Ue=null;return}}catch(u){if(s!==null)throw Ue=s,u;gt=1,Hi(e,Mn(a,e.current)),Ue=null;return}t.flags&32768?(qe||r===1?e=!0:xr||(Ye&536870912)!==0?e=!1:(Xa=e=!0,(r===2||r===9||r===3||r===6)&&(r=dn.current,r!==null&&r.tag===13&&(r.flags|=16384))),dg(t,e)):Qi(t)}function Qi(e){var t=e;do{if((t.flags&32768)!==0){dg(t,Xa);return}e=t.return;var a=SS(t.alternate,t,Sa);if(a!==null){Ue=a;return}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);gt===0&&(gt=5)}function dg(e,t){do{var a=wS(e.alternate,e);if(a!==null){a.flags&=32767,Ue=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ue=e;return}Ue=e=a}while(e!==null);gt=6,Ue=null}function mg(e,t,a,r,s,u,y,w,z){e.cancelPendingCommit=null;do Zi();while(Rt!==0);if((Je&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(u=t.lanes|t.childLanes,u|=Hc,ge(e,a,u,y,w,z),e===ct&&(Ue=ct=null,Ye=0),wr=t,Fa=e,wa=a,Pu=u,Xu=s,ng=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,jS(Ft,function(){return vg(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=M.T,M.T=null,s=j.p,j.p=2,y=Je,Je|=4;try{ES(e,t,a)}finally{Je=y,j.p=s,M.T=r}}Rt=1,hg(),pg(),gg()}}function hg(){if(Rt===1){Rt=0;var e=Fa,t=wr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var r=j.p;j.p=2;var s=Je;Je|=4;try{Kp(t,e);var u=sf,y=eh(e.containerInfo),w=u.focusedElem,z=u.selectionRange;if(y!==w&&w&&w.ownerDocument&&Wm(w.ownerDocument.documentElement,w)){if(z!==null&&zc(w)){var F=z.start,oe=z.end;if(oe===void 0&&(oe=F),"selectionStart"in w)w.selectionStart=F,w.selectionEnd=Math.min(oe,w.value.length);else{var ue=w.ownerDocument||document,W=ue&&ue.defaultView||window;if(W.getSelection){var te=W.getSelection(),ve=w.textContent.length,_e=Math.min(z.start,ve),it=z.end===void 0?_e:Math.min(z.end,ve);!te.extend&&_e>it&&(y=it,it=_e,_e=y);var G=Jm(w,_e),k=Jm(w,it);if(G&&k&&(te.rangeCount!==1||te.anchorNode!==G.node||te.anchorOffset!==G.offset||te.focusNode!==k.node||te.focusOffset!==k.offset)){var K=ue.createRange();K.setStart(G.node,G.offset),te.removeAllRanges(),_e>it?(te.addRange(K),te.extend(k.node,k.offset)):(K.setEnd(k.node,k.offset),te.addRange(K))}}}}for(ue=[],te=w;te=te.parentNode;)te.nodeType===1&&ue.push({element:te,left:te.scrollLeft,top:te.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}}cs=!!of,sf=of=null}finally{Je=s,j.p=r,M.T=a}}e.current=t,Rt=2}}function pg(){if(Rt===2){Rt=0;var e=Fa,t=wr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var r=j.p;j.p=2;var s=Je;Je|=4;try{Vp(e,t.alternate,t)}finally{Je=s,j.p=r,M.T=a}}Rt=3}}function gg(){if(Rt===4||Rt===3){Rt=0,Lt();var e=Fa,t=wr,a=wa,r=ng;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Rt=5:(Rt=0,wr=Fa=null,yg(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Ka=null),Xe(a),t=t.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(aa,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=M.T,s=j.p,j.p=2,M.T=null;try{for(var u=e.onRecoverableError,y=0;y<r.length;y++){var w=r[y];u(w.value,{componentStack:w.stack})}}finally{M.T=t,j.p=s}}(wa&3)!==0&&Zi(),Qn(e),s=e.pendingLanes,(a&261930)!==0&&(s&42)!==0?e===$u?_o++:(_o=0,$u=e):_o=0,Ro(0)}}function yg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,so(t)))}function Zi(){return hg(),pg(),gg(),vg()}function vg(){if(Rt!==5)return!1;var e=Fa,t=Pu;Pu=0;var a=Xe(wa),r=M.T,s=j.p;try{j.p=32>a?32:a,M.T=null,a=Xu,Xu=null;var u=Fa,y=wa;if(Rt=0,wr=Fa=null,wa=0,(Je&6)!==0)throw Error(i(331));var w=Je;if(Je|=4,Wp(u.current),Qp(u,u.current,y,a),Je=w,Ro(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(aa,u)}catch{}return!0}finally{j.p=s,M.T=r,yg(e,t)}}function bg(e,t,a){t=Mn(a,t),t=Cu(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(de(e,2),Qn(e))}function at(e,t,a){if(e.tag===3)bg(e,e,a);else for(;t!==null;){if(t.tag===3){bg(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ka===null||!Ka.has(r))){e=Mn(a,e),a=xp(2),r=Ya(t,a,2),r!==null&&(Sp(a,r,t,e),de(r,2),Qn(r));break}}t=t.return}}function Qu(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new MS;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(a)||(Yu=!0,s.add(a),e=OS.bind(null,e,t,a),t.then(e,e))}function OS(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ct===e&&(Ye&a)===a&&(gt===4||gt===3&&(Ye&62914560)===Ye&&300>_t()-Pi?(Je&2)===0&&Er(e,0):Vu|=a,Sr===Ye&&(Sr=0)),Qn(e)}function xg(e,t){t===0&&(t=ae()),e=El(e,t),e!==null&&(de(e,t),Qn(e))}function zS(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),xg(e,a)}function DS(e,t){var a=0;switch(e.tag){case 31:case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(a=s.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),xg(e,a)}function jS(e,t){return on(e,t)}var Ji=null,Cr=null,Zu=!1,Wi=!1,Ju=!1,Za=0;function Qn(e){e!==Cr&&e.next===null&&(Cr===null?Ji=Cr=e:Cr=Cr.next=e),Wi=!0,Zu||(Zu=!0,LS())}function Ro(e,t){if(!Ju&&Wi){Ju=!0;do for(var a=!1,r=Ji;r!==null;){if(e!==0){var s=r.pendingLanes;if(s===0)var u=0;else{var y=r.suspendedLanes,w=r.pingedLanes;u=(1<<31-Dt(42|e)+1)-1,u&=s&~(y&~w),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,Tg(r,u))}else u=Ye,u=Re(r,r===ct?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(u&3)===0||ut(r,u)||(a=!0,Tg(r,u));r=r.next}while(a);Ju=!1}}function kS(){Sg()}function Sg(){Wi=Zu=!1;var e=0;Za!==0&&XS()&&(e=Za);for(var t=_t(),a=null,r=Ji;r!==null;){var s=r.next,u=wg(r,t);u===0?(r.next=null,a===null?Ji=s:a.next=s,s===null&&(Cr=a)):(a=r,(e!==0||(u&3)!==0)&&(Wi=!0)),r=s}Rt!==0&&Rt!==5||Ro(e),Za!==0&&(Za=0)}function wg(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var y=31-Dt(u),w=1<<y,z=s[y];z===-1?((w&a)===0||(w&r)!==0)&&(s[y]=wt(w,t)):z<=t&&(e.expiredLanes|=w),u&=~w}if(t=ct,a=Ye,a=Re(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,a===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&sn(r),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ut(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(r!==null&&sn(r),Xe(a)){case 2:case 8:a=Ra;break;case 32:a=Ft;break;case 268435456:a=Qt;break;default:a=Ft}return r=Eg.bind(null,e),a=on(a,r),e.callbackPriority=t,e.callbackNode=a,t}return r!==null&&r!==null&&sn(r),e.callbackPriority=2,e.callbackNode=null,2}function Eg(e,t){if(Rt!==0&&Rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Zi()&&e.callbackNode!==a)return null;var r=Ye;return r=Re(e,e===ct?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(lg(e,r,t),wg(e,_t()),e.callbackNode!=null&&e.callbackNode===a?Eg.bind(null,e):null)}function Tg(e,t){if(Zi())return null;lg(e,t,!0)}function LS(){KS(function(){(Je&6)!==0?on(zt,kS):Sg()})}function Wu(){if(Za===0){var e=ur;e===0&&(e=Na,Na<<=1,(Na&261888)===0&&(Na=256)),Za=e}return Za}function Cg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ii(""+e)}function Mg(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function HS(e,t,a,r,s){if(t==="submit"&&a&&a.stateNode===s){var u=Cg((s[Ke]||null).action),y=r.submitter;y&&(t=(t=y[Ke]||null)?Cg(t.formAction):y.getAttribute("formAction"),t!==null&&(u=t,y=null));var w=new fi("action","action",null,r,s);e.push({event:w,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Za!==0){var z=y?Mg(s,y):new FormData(s);bu(a,{pending:!0,data:z,method:s.method,action:u},null,z)}}else typeof u=="function"&&(w.preventDefault(),z=y?Mg(s,y):new FormData(s),bu(a,{pending:!0,data:z,method:s.method,action:u},u,z))},currentTarget:s}]})}}for(var ef=0;ef<Lc.length;ef++){var tf=Lc[ef],BS=tf.toLowerCase(),US=tf[0].toUpperCase()+tf.slice(1);Ln(BS,"on"+US)}Ln(ah,"onAnimationEnd"),Ln(lh,"onAnimationIteration"),Ln(rh,"onAnimationStart"),Ln("dblclick","onDoubleClick"),Ln("focusin","onFocus"),Ln("focusout","onBlur"),Ln(tS,"onTransitionRun"),Ln(nS,"onTransitionStart"),Ln(aS,"onTransitionCancel"),Ln(oh,"onTransitionEnd"),Ql("onMouseEnter",["mouseout","mouseover"]),Ql("onMouseLeave",["mouseout","mouseover"]),Ql("onPointerEnter",["pointerout","pointerover"]),Ql("onPointerLeave",["pointerout","pointerover"]),bl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bl("onBeforeInput",["compositionend","keypress","textInput","paste"]),bl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var No="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(" "),IS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(No));function Ag(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var r=e[a],s=r.event;r=r.listeners;e:{var u=void 0;if(t)for(var y=r.length-1;0<=y;y--){var w=r[y],z=w.instance,F=w.currentTarget;if(w=w.listener,z!==u&&s.isPropagationStopped())break e;u=w,s.currentTarget=F;try{u(s)}catch(oe){hi(oe)}s.currentTarget=null,u=z}else for(y=0;y<r.length;y++){if(w=r[y],z=w.instance,F=w.currentTarget,w=w.listener,z!==u&&s.isPropagationStopped())break e;u=w,s.currentTarget=F;try{u(s)}catch(oe){hi(oe)}s.currentTarget=null,u=z}}}}function Ie(e,t){var a=t[Et];a===void 0&&(a=t[Et]=new Set);var r=e+"__bubble";a.has(r)||(_g(t,e,2,!1),a.add(r))}function nf(e,t,a){var r=0;t&&(r|=4),_g(a,e,r,t)}var es="_reactListening"+Math.random().toString(36).slice(2);function af(e){if(!e[es]){e[es]=!0,Sm.forEach(function(a){a!=="selectionchange"&&(IS.has(a)||nf(a,!1,e),nf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[es]||(t[es]=!0,nf("selectionchange",!1,t))}}function _g(e,t,a,r){switch(ay(t)){case 2:var s=hw;break;case 8:s=pw;break;default:s=bf}a=s.bind(null,t,a,e),s=void 0,!Ec||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,a,{capture:!0,passive:s}):e.addEventListener(t,a,!0):s!==void 0?e.addEventListener(t,a,{passive:s}):e.addEventListener(t,a,!1)}function lf(e,t,a,r,s){var u=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var w=r.stateNode.containerInfo;if(w===s)break;if(y===4)for(y=r.return;y!==null;){var z=y.tag;if((z===3||z===4)&&y.stateNode.containerInfo===s)return;y=y.return}for(;w!==null;){if(y=Xn(w),y===null)return;if(z=y.tag,z===5||z===6||z===26||z===27){r=u=y;continue e}w=w.parentNode}}r=r.return}Dm(function(){var F=u,oe=Sc(a),ue=[];e:{var W=ih.get(e);if(W!==void 0){var te=fi,ve=e;switch(e){case"keypress":if(ci(a)===0)break e;case"keydown":case"keyup":te=D1;break;case"focusin":ve="focus",te=Ac;break;case"focusout":ve="blur",te=Ac;break;case"beforeblur":case"afterblur":te=Ac;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=Lm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=S1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=L1;break;case ah:case lh:case rh:te=T1;break;case oh:te=B1;break;case"scroll":case"scrollend":te=b1;break;case"wheel":te=I1;break;case"copy":case"cut":case"paste":te=M1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Bm;break;case"toggle":case"beforetoggle":te=Y1}var _e=(t&4)!==0,it=!_e&&(e==="scroll"||e==="scrollend"),G=_e?W!==null?W+"Capture":null:W;_e=[];for(var k=F,K;k!==null;){var se=k;if(K=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||K===null||G===null||(se=Zr(k,G),se!=null&&_e.push(Oo(k,se,K))),it)break;k=k.return}0<_e.length&&(W=new te(W,ve,null,a,oe),ue.push({event:W,listeners:_e}))}}if((t&7)===0){e:{if(W=e==="mouseover"||e==="pointerover",te=e==="mouseout"||e==="pointerout",W&&a!==xc&&(ve=a.relatedTarget||a.fromElement)&&(Xn(ve)||ve[Zt]))break e;if((te||W)&&(W=oe.window===oe?oe:(W=oe.ownerDocument)?W.defaultView||W.parentWindow:window,te?(ve=a.relatedTarget||a.toElement,te=F,ve=ve?Xn(ve):null,ve!==null&&(it=f(ve),_e=ve.tag,ve!==it||_e!==5&&_e!==27&&_e!==6)&&(ve=null)):(te=null,ve=F),te!==ve)){if(_e=Lm,se="onMouseLeave",G="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(_e=Bm,se="onPointerLeave",G="onPointerEnter",k="pointer"),it=te==null?W:Qr(te),K=ve==null?W:Qr(ve),W=new _e(se,k+"leave",te,a,oe),W.target=it,W.relatedTarget=K,se=null,Xn(oe)===F&&(_e=new _e(G,k+"enter",ve,a,oe),_e.target=K,_e.relatedTarget=it,se=_e),it=se,te&&ve)t:{for(_e=GS,G=te,k=ve,K=0,se=G;se;se=_e(se))K++;se=0;for(var Ce=k;Ce;Ce=_e(Ce))se++;for(;0<K-se;)G=_e(G),K--;for(;0<se-K;)k=_e(k),se--;for(;K--;){if(G===k||k!==null&&G===k.alternate){_e=G;break t}G=_e(G),k=_e(k)}_e=null}else _e=null;te!==null&&Rg(ue,W,te,_e,!1),ve!==null&&it!==null&&Rg(ue,it,ve,_e,!0)}}e:{if(W=F?Qr(F):window,te=W.nodeName&&W.nodeName.toLowerCase(),te==="select"||te==="input"&&W.type==="file")var Fe=Xm;else if(qm(W))if($m)Fe=J1;else{Fe=Q1;var we=F1}else te=W.nodeName,!te||te.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?F&&bc(F.elementType)&&(Fe=Xm):Fe=Z1;if(Fe&&(Fe=Fe(e,F))){Pm(ue,Fe,a,oe);break e}we&&we(e,W,F),e==="focusout"&&F&&W.type==="number"&&F.memoizedProps.value!=null&&vc(W,"number",W.value)}switch(we=F?Qr(F):window,e){case"focusin":(qm(we)||we.contentEditable==="true")&&(nr=we,Dc=F,ro=null);break;case"focusout":ro=Dc=nr=null;break;case"mousedown":jc=!0;break;case"contextmenu":case"mouseup":case"dragend":jc=!1,th(ue,a,oe);break;case"selectionchange":if(eS)break;case"keydown":case"keyup":th(ue,a,oe)}var ke;if(Rc)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else tr?Ym(e,a)&&(Ve="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ve="onCompositionStart");Ve&&(Um&&a.locale!=="ko"&&(tr||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&tr&&(ke=jm()):(ka=oe,Tc="value"in ka?ka.value:ka.textContent,tr=!0)),we=ts(F,Ve),0<we.length&&(Ve=new Hm(Ve,e,null,a,oe),ue.push({event:Ve,listeners:we}),ke?Ve.data=ke:(ke=Vm(a),ke!==null&&(Ve.data=ke)))),(ke=q1?P1(e,a):X1(e,a))&&(Ve=ts(F,"onBeforeInput"),0<Ve.length&&(we=new Hm("onBeforeInput","beforeinput",null,a,oe),ue.push({event:we,listeners:Ve}),we.data=ke)),HS(ue,e,F,a,oe)}Ag(ue,t)})}function Oo(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ts(e,t){for(var a=t+"Capture",r=[];e!==null;){var s=e,u=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||u===null||(s=Zr(e,a),s!=null&&r.unshift(Oo(e,s,u)),s=Zr(e,t),s!=null&&r.push(Oo(e,s,u))),e.tag===3)return r;e=e.return}return[]}function GS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Rg(e,t,a,r,s){for(var u=t._reactName,y=[];a!==null&&a!==r;){var w=a,z=w.alternate,F=w.stateNode;if(w=w.tag,z!==null&&z===r)break;w!==5&&w!==26&&w!==27||F===null||(z=F,s?(F=Zr(a,u),F!=null&&y.unshift(Oo(a,F,z))):s||(F=Zr(a,u),F!=null&&y.push(Oo(a,F,z)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var YS=/\r\n?/g,VS=/\u0000|\uFFFD/g;function Ng(e){return(typeof e=="string"?e:""+e).replace(YS,`
|
|
49
|
+
`).replace(VS,"")}function Og(e,t){return t=Ng(t),Ng(e)===t}function ot(e,t,a,r,s,u){switch(a){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Jl(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Jl(e,""+r);break;case"className":ri(e,"class",r);break;case"tabIndex":ri(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ri(e,a,r);break;case"style":Om(e,r,u);break;case"data":if(t!=="object"){ri(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=ii(""+r),e.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(a,"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 u=="function"&&(a==="formAction"?(t!=="input"&&ot(e,t,"name",s.name,s,null),ot(e,t,"formEncType",s.formEncType,s,null),ot(e,t,"formMethod",s.formMethod,s,null),ot(e,t,"formTarget",s.formTarget,s,null)):(ot(e,t,"encType",s.encType,s,null),ot(e,t,"method",s.method,s,null),ot(e,t,"target",s.target,s,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=ii(""+r),e.setAttribute(a,r);break;case"onClick":r!=null&&(e.onclick=ia);break;case"onScroll":r!=null&&Ie("scroll",e);break;case"onScrollEnd":r!=null&&Ie("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(a=r.__html,a!=null){if(s.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}a=ii(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""+r):e.removeAttribute(a);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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":r===!0?e.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,r):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(a,r):e.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(a):e.setAttribute(a,r);break;case"popover":Ie("beforetoggle",e),Ie("toggle",e),li(e,"popover",r);break;case"xlinkActuate":oa(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":oa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":oa(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":oa(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":oa(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":oa(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":oa(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":oa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":oa(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":li(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=y1.get(a)||a,li(e,a,r))}}function rf(e,t,a,r,s,u){switch(a){case"style":Om(e,r,u);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(a=r.__html,a!=null){if(s.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof r=="string"?Jl(e,r):(typeof r=="number"||typeof r=="bigint")&&Jl(e,""+r);break;case"onScroll":r!=null&&Ie("scroll",e);break;case"onScrollEnd":r!=null&&Ie("scrollend",e);break;case"onClick":r!=null&&(e.onclick=ia);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wm.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(s=a.endsWith("Capture"),t=a.slice(2,s?a.length-7:void 0),u=e[Ke]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,s),typeof r=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,r,s);break e}a in e?e[a]=r:r===!0?e.setAttribute(a,""):li(e,a,r)}}}function Gt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",e),Ie("load",e);var r=!1,s=!1,u;for(u in a)if(a.hasOwnProperty(u)){var y=a[u];if(y!=null)switch(u){case"src":r=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:ot(e,t,u,y,a,null)}}s&&ot(e,t,"srcSet",a.srcSet,a,null),r&&ot(e,t,"src",a.src,a,null);return;case"input":Ie("invalid",e);var w=u=y=s=null,z=null,F=null;for(r in a)if(a.hasOwnProperty(r)){var oe=a[r];if(oe!=null)switch(r){case"name":s=oe;break;case"type":y=oe;break;case"checked":z=oe;break;case"defaultChecked":F=oe;break;case"value":u=oe;break;case"defaultValue":w=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(i(137,t));break;default:ot(e,t,r,oe,a,null)}}Am(e,u,w,z,F,y,s,!1);return;case"select":Ie("invalid",e),r=y=u=null;for(s in a)if(a.hasOwnProperty(s)&&(w=a[s],w!=null))switch(s){case"value":u=w;break;case"defaultValue":y=w;break;case"multiple":r=w;default:ot(e,t,s,w,a,null)}t=u,a=y,e.multiple=!!r,t!=null?Zl(e,!!r,t,!1):a!=null&&Zl(e,!!r,a,!0);return;case"textarea":Ie("invalid",e),u=s=r=null;for(y in a)if(a.hasOwnProperty(y)&&(w=a[y],w!=null))switch(y){case"value":r=w;break;case"defaultValue":s=w;break;case"children":u=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:ot(e,t,y,w,a,null)}Rm(e,r,s,u);return;case"option":for(z in a)if(a.hasOwnProperty(z)&&(r=a[z],r!=null))switch(z){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:ot(e,t,z,r,a,null)}return;case"dialog":Ie("beforetoggle",e),Ie("toggle",e),Ie("cancel",e),Ie("close",e);break;case"iframe":case"object":Ie("load",e);break;case"video":case"audio":for(r=0;r<No.length;r++)Ie(No[r],e);break;case"image":Ie("error",e),Ie("load",e);break;case"details":Ie("toggle",e);break;case"embed":case"source":case"link":Ie("error",e),Ie("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(F in a)if(a.hasOwnProperty(F)&&(r=a[F],r!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:ot(e,t,F,r,a,null)}return;default:if(bc(t)){for(oe in a)a.hasOwnProperty(oe)&&(r=a[oe],r!==void 0&&rf(e,t,oe,r,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(r=a[w],r!=null&&ot(e,t,w,r,a,null))}function qS(e,t,a,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,u=null,y=null,w=null,z=null,F=null,oe=null;for(te in a){var ue=a[te];if(a.hasOwnProperty(te)&&ue!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":z=ue;default:r.hasOwnProperty(te)||ot(e,t,te,null,r,ue)}}for(var W in r){var te=r[W];if(ue=a[W],r.hasOwnProperty(W)&&(te!=null||ue!=null))switch(W){case"type":u=te;break;case"name":s=te;break;case"checked":F=te;break;case"defaultChecked":oe=te;break;case"value":y=te;break;case"defaultValue":w=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,t));break;default:te!==ue&&ot(e,t,W,te,r,ue)}}yc(e,y,w,z,F,oe,u,s);return;case"select":te=y=w=W=null;for(u in a)if(z=a[u],a.hasOwnProperty(u)&&z!=null)switch(u){case"value":break;case"multiple":te=z;default:r.hasOwnProperty(u)||ot(e,t,u,null,r,z)}for(s in r)if(u=r[s],z=a[s],r.hasOwnProperty(s)&&(u!=null||z!=null))switch(s){case"value":W=u;break;case"defaultValue":w=u;break;case"multiple":y=u;default:u!==z&&ot(e,t,s,u,r,z)}t=w,a=y,r=te,W!=null?Zl(e,!!a,W,!1):!!r!=!!a&&(t!=null?Zl(e,!!a,t,!0):Zl(e,!!a,a?[]:"",!1));return;case"textarea":te=W=null;for(w in a)if(s=a[w],a.hasOwnProperty(w)&&s!=null&&!r.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:ot(e,t,w,null,r,s)}for(y in r)if(s=r[y],u=a[y],r.hasOwnProperty(y)&&(s!=null||u!=null))switch(y){case"value":W=s;break;case"defaultValue":te=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(i(91));break;default:s!==u&&ot(e,t,y,s,r,u)}_m(e,W,te);return;case"option":for(var ve in a)if(W=a[ve],a.hasOwnProperty(ve)&&W!=null&&!r.hasOwnProperty(ve))switch(ve){case"selected":e.selected=!1;break;default:ot(e,t,ve,null,r,W)}for(z in r)if(W=r[z],te=a[z],r.hasOwnProperty(z)&&W!==te&&(W!=null||te!=null))switch(z){case"selected":e.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:ot(e,t,z,W,r,te)}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 _e in a)W=a[_e],a.hasOwnProperty(_e)&&W!=null&&!r.hasOwnProperty(_e)&&ot(e,t,_e,null,r,W);for(F in r)if(W=r[F],te=a[F],r.hasOwnProperty(F)&&W!==te&&(W!=null||te!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(i(137,t));break;default:ot(e,t,F,W,r,te)}return;default:if(bc(t)){for(var it in a)W=a[it],a.hasOwnProperty(it)&&W!==void 0&&!r.hasOwnProperty(it)&&rf(e,t,it,void 0,r,W);for(oe in r)W=r[oe],te=a[oe],!r.hasOwnProperty(oe)||W===te||W===void 0&&te===void 0||rf(e,t,oe,W,r,te);return}}for(var G in a)W=a[G],a.hasOwnProperty(G)&&W!=null&&!r.hasOwnProperty(G)&&ot(e,t,G,null,r,W);for(ue in r)W=r[ue],te=a[ue],!r.hasOwnProperty(ue)||W===te||W==null&&te==null||ot(e,t,ue,W,r,te)}function zg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function PS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var s=a[r],u=s.transferSize,y=s.initiatorType,w=s.duration;if(u&&w&&zg(y)){for(y=0,w=s.responseEnd,r+=1;r<a.length;r++){var z=a[r],F=z.startTime;if(F>w)break;var oe=z.transferSize,ue=z.initiatorType;oe&&zg(ue)&&(z=z.responseEnd,y+=oe*(z<w?1:(w-F)/(z-F)))}if(--r,t+=8*(u+y)/(s.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 of=null,sf=null;function ns(e){return e.nodeType===9?e:e.ownerDocument}function Dg(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 jg(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 cf(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 uf=null;function XS(){var e=window.event;return e&&e.type==="popstate"?e===uf?!1:(uf=e,!0):(uf=null,!1)}var kg=typeof setTimeout=="function"?setTimeout:void 0,$S=typeof clearTimeout=="function"?clearTimeout:void 0,Lg=typeof Promise=="function"?Promise:void 0,KS=typeof queueMicrotask=="function"?queueMicrotask:typeof Lg<"u"?function(e){return Lg.resolve(null).then(e).catch(FS)}:kg;function FS(e){setTimeout(function(){throw e})}function Ja(e){return e==="head"}function Hg(e,t){var a=t,r=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"||a==="/&"){if(r===0){e.removeChild(s),Rr(t);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")zo(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,zo(a);for(var u=a.firstChild;u;){var y=u.nextSibling,w=u.nodeName;u[ra]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=y}}else a==="body"&&zo(e.ownerDocument.body);a=s}while(a);Rr(t)}function Bg(e,t){var a=e;e=0;do{var r=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=r}while(a)}function ff(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":ff(a),Da(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function QS(e,t,a,r){for(;e.nodeType===1;){var s=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[ra])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=On(e.nextSibling),e===null)break}return null}function ZS(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=On(e.nextSibling),e===null))return null;return e}function Ug(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=On(e.nextSibling),e===null))return null;return e}function df(e){return e.data==="$?"||e.data==="$~"}function mf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function JS(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var r=function(){t(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function On(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 hf=null;function Ig(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return On(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Gg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Yg(e,t,a){switch(t=ns(a),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 zo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Da(e)}var zn=new Map,Vg=new Set;function as(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ea=j.d;j.d={f:WS,r:ew,D:tw,C:nw,L:aw,m:lw,X:ow,S:rw,M:iw};function WS(){var e=Ea.f(),t=Ki();return e||t}function ew(e){var t=ja(e);t!==null&&t.tag===5&&t.type==="form"?op(t):Ea.r(e)}var Mr=typeof document>"u"?null:document;function qg(e,t,a){var r=Mr;if(r&&typeof t=="string"&&t){var s=Tn(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof a=="string"&&(s+='[crossorigin="'+a+'"]'),Vg.has(s)||(Vg.add(s),e={rel:e,crossOrigin:a,href:t},r.querySelector(s)===null&&(t=r.createElement("link"),Gt(t,"link",e),jt(t),r.head.appendChild(t)))}}function tw(e){Ea.D(e),qg("dns-prefetch",e,null)}function nw(e,t){Ea.C(e,t),qg("preconnect",e,t)}function aw(e,t,a){Ea.L(e,t,a);var r=Mr;if(r&&e&&t){var s='link[rel="preload"][as="'+Tn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(s+='[imagesrcset="'+Tn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(s+='[imagesizes="'+Tn(a.imageSizes)+'"]')):s+='[href="'+Tn(e)+'"]';var u=s;switch(t){case"style":u=Ar(e);break;case"script":u=_r(e)}zn.has(u)||(e=p({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),zn.set(u,e),r.querySelector(s)!==null||t==="style"&&r.querySelector(Do(u))||t==="script"&&r.querySelector(jo(u))||(t=r.createElement("link"),Gt(t,"link",e),jt(t),r.head.appendChild(t)))}}function lw(e,t){Ea.m(e,t);var a=Mr;if(a&&e){var r=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Tn(r)+'"][href="'+Tn(e)+'"]',u=s;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=_r(e)}if(!zn.has(u)&&(e=p({rel:"modulepreload",href:e},t),zn.set(u,e),a.querySelector(s)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(jo(u)))return}r=a.createElement("link"),Gt(r,"link",e),jt(r),a.head.appendChild(r)}}}function rw(e,t,a){Ea.S(e,t,a);var r=Mr;if(r&&e){var s=Fl(r).hoistableStyles,u=Ar(e);t=t||"default";var y=s.get(u);if(!y){var w={loading:0,preload:null};if(y=r.querySelector(Do(u)))w.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},a),(a=zn.get(u))&&pf(e,a);var z=y=r.createElement("link");jt(z),Gt(z,"link",e),z._p=new Promise(function(F,oe){z.onload=F,z.onerror=oe}),z.addEventListener("load",function(){w.loading|=1}),z.addEventListener("error",function(){w.loading|=2}),w.loading|=4,ls(y,t,r)}y={type:"stylesheet",instance:y,count:1,state:w},s.set(u,y)}}}function ow(e,t){Ea.X(e,t);var a=Mr;if(a&&e){var r=Fl(a).hoistableScripts,s=_r(e),u=r.get(s);u||(u=a.querySelector(jo(s)),u||(e=p({src:e,async:!0},t),(t=zn.get(s))&&gf(e,t),u=a.createElement("script"),jt(u),Gt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},r.set(s,u))}}function iw(e,t){Ea.M(e,t);var a=Mr;if(a&&e){var r=Fl(a).hoistableScripts,s=_r(e),u=r.get(s);u||(u=a.querySelector(jo(s)),u||(e=p({src:e,async:!0,type:"module"},t),(t=zn.get(s))&&gf(e,t),u=a.createElement("script"),jt(u),Gt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},r.set(s,u))}}function Pg(e,t,a,r){var s=(s=me.current)?as(s):null;if(!s)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ar(a.href),a=Fl(s).hoistableStyles,r=a.get(t),r||(r={type:"style",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ar(a.href);var u=Fl(s).hoistableStyles,y=u.get(e);if(y||(s=s.ownerDocument||s,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,y),(u=s.querySelector(Do(e)))&&!u._p&&(y.instance=u,y.state.loading=5),zn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},zn.set(e,a),u||sw(s,e,a,y.state))),t&&r===null)throw Error(i(528,""));return y}if(t&&r!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=_r(a),a=Fl(s).hoistableScripts,r=a.get(t),r||(r={type:"script",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Ar(e){return'href="'+Tn(e)+'"'}function Do(e){return'link[rel="stylesheet"]['+e+"]"}function Xg(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function sw(e,t,a,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Gt(t,"link",a),jt(t),e.head.appendChild(t))}function _r(e){return'[src="'+Tn(e)+'"]'}function jo(e){return"script[async]"+e}function $g(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Tn(a.href)+'"]');if(r)return t.instance=r,jt(r),r;var s=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),jt(r),Gt(r,"style",s),ls(r,a.precedence,e),t.instance=r;case"stylesheet":s=Ar(a.href);var u=e.querySelector(Do(s));if(u)return t.state.loading|=4,t.instance=u,jt(u),u;r=Xg(a),(s=zn.get(s))&&pf(r,s),u=(e.ownerDocument||e).createElement("link"),jt(u);var y=u;return y._p=new Promise(function(w,z){y.onload=w,y.onerror=z}),Gt(u,"link",r),t.state.loading|=4,ls(u,a.precedence,e),t.instance=u;case"script":return u=_r(a.src),(s=e.querySelector(jo(u)))?(t.instance=s,jt(s),s):(r=a,(s=zn.get(u))&&(r=p({},a),gf(r,s)),e=e.ownerDocument||e,s=e.createElement("script"),jt(s),Gt(s,"link",r),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,ls(r,a.precedence,e));return t.instance}function ls(e,t,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=r.length?r[r.length-1]:null,u=s,y=0;y<r.length;y++){var w=r[y];if(w.dataset.precedence===t)u=w;else if(u!==s)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function pf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function gf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var rs=null;function Kg(e,t,a){if(rs===null){var r=new Map,s=rs=new Map;s.set(a,r)}else s=rs,r=s.get(a),r||(r=new Map,s.set(a,r));if(r.has(e))return r;for(r.set(e,null),a=a.getElementsByTagName(e),s=0;s<a.length;s++){var u=a[s];if(!(u[ra]||u[tt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var y=u.getAttribute(t)||"";y=e+y;var w=r.get(y);w?w.push(u):r.set(y,[u])}}return r}function Fg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function cw(e,t,a){if(a===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 Qg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function uw(e,t,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var s=Ar(r.href),u=t.querySelector(Do(s));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=os.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,jt(u);return}u=t.ownerDocument||t,r=Xg(r),(s=zn.get(s))&&pf(r,s),u=u.createElement("link"),jt(u);var y=u;y._p=new Promise(function(w,z){y.onload=w,y.onerror=z}),Gt(u,"link",r),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=os.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var yf=0;function fw(e,t){return e.stylesheets&&e.count===0&&ss(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var r=setTimeout(function(){if(e.stylesheets&&ss(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&yf===0&&(yf=62500*PS());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ss(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>yf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(s)}}:null}function os(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ss(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var is=null;function ss(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,is=new Map,t.forEach(dw,e),is=null,os.call(e))}function dw(e,t){if(!(t.state.loading&4)){var a=is.get(e);if(a)var r=a.get(null);else{a=new Map,is.set(e,a);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<s.length;u++){var y=s[u];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),r=y)}r&&a.set(null,r)}s=t.instance,y=s.getAttribute("data-precedence"),u=a.get(y)||r,u===r&&a.set(null,s),a.set(y,s),this.count++,r=os.bind(this),s.addEventListener("load",r),s.addEventListener("error",r),u?u.parentNode.insertBefore(s,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var ko={$$typeof:D,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function mw(e,t,a,r,s,u,y,w,z){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=he(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=he(0),this.hiddenUpdates=he(null),this.identifierPrefix=r,this.onUncaughtError=s,this.onCaughtError=u,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function Zg(e,t,a,r,s,u,y,w,z,F,oe,ue){return e=new mw(e,t,a,y,z,F,oe,ue,w),t=1,u===!0&&(t|=24),u=fn(3,null,null,t),e.current=u,u.stateNode=e,t=Fc(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:r,isDehydrated:a,cache:t},Wc(u),e}function Jg(e){return e?(e=rr,e):rr}function Wg(e,t,a,r,s,u){s=Jg(s),r.context===null?r.context=s:r.pendingContext=s,r=Ga(t),r.payload={element:a},u=u===void 0?null:u,u!==null&&(r.callback=u),a=Ya(e,r,t),a!==null&&(an(a,e,t),mo(a,e,t))}function ey(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function vf(e,t){ey(e,t),(e=e.alternate)&&ey(e,t)}function ty(e){if(e.tag===13||e.tag===31){var t=El(e,67108864);t!==null&&an(t,e,67108864),vf(e,67108864)}}function ny(e){if(e.tag===13||e.tag===31){var t=gn();t=lt(t);var a=El(e,t);a!==null&&an(a,e,t),vf(e,t)}}var cs=!0;function hw(e,t,a,r){var s=M.T;M.T=null;var u=j.p;try{j.p=2,bf(e,t,a,r)}finally{j.p=u,M.T=s}}function pw(e,t,a,r){var s=M.T;M.T=null;var u=j.p;try{j.p=8,bf(e,t,a,r)}finally{j.p=u,M.T=s}}function bf(e,t,a,r){if(cs){var s=xf(r);if(s===null)lf(e,t,r,us,a),ly(e,r);else if(yw(s,e,t,a,r))r.stopPropagation();else if(ly(e,r),t&4&&-1<gw.indexOf(e)){for(;s!==null;){var u=ja(s);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var y=wn(u.pendingLanes);if(y!==0){var w=u;for(w.pendingLanes|=2,w.entangledLanes|=2;y;){var z=1<<31-Dt(y);w.entanglements[1]|=z,y&=~z}Qn(u),(Je&6)===0&&(Xi=_t()+500,Ro(0))}}break;case 31:case 13:w=El(u,2),w!==null&&an(w,u,2),Ki(),vf(u,2)}if(u=xf(r),u===null&&lf(e,t,r,us,a),u===s)break;s=u}s!==null&&r.stopPropagation()}else lf(e,t,r,null,a)}}function xf(e){return e=Sc(e),Sf(e)}var us=null;function Sf(e){if(us=null,e=Xn(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return us=e,null}function ay(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(xn()){case zt:return 2;case Ra:return 8;case Ft:case qn:return 32;case Qt:return 268435456;default:return 32}default:return 32}}var wf=!1,Wa=null,el=null,tl=null,Lo=new Map,Ho=new Map,nl=[],gw="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 ly(e,t){switch(e){case"focusin":case"focusout":Wa=null;break;case"dragenter":case"dragleave":el=null;break;case"mouseover":case"mouseout":tl=null;break;case"pointerover":case"pointerout":Lo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ho.delete(t.pointerId)}}function Bo(e,t,a,r,s,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:r,nativeEvent:u,targetContainers:[s]},t!==null&&(t=ja(t),t!==null&&ty(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function yw(e,t,a,r,s){switch(t){case"focusin":return Wa=Bo(Wa,e,t,a,r,s),!0;case"dragenter":return el=Bo(el,e,t,a,r,s),!0;case"mouseover":return tl=Bo(tl,e,t,a,r,s),!0;case"pointerover":var u=s.pointerId;return Lo.set(u,Bo(Lo.get(u)||null,e,t,a,r,s)),!0;case"gotpointercapture":return u=s.pointerId,Ho.set(u,Bo(Ho.get(u)||null,e,t,a,r,s)),!0}return!1}function ry(e){var t=Xn(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,st(e.priority,function(){ny(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,st(e.priority,function(){ny(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=xf(e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);xc=r,a.target.dispatchEvent(r),xc=null}else return t=ja(a),t!==null&&ty(t),e.blockedOn=a,!1;t.shift()}return!0}function oy(e,t,a){fs(e)&&a.delete(t)}function vw(){wf=!1,Wa!==null&&fs(Wa)&&(Wa=null),el!==null&&fs(el)&&(el=null),tl!==null&&fs(tl)&&(tl=null),Lo.forEach(oy),Ho.forEach(oy)}function ds(e,t){e.blockedOn===t&&(e.blockedOn=null,wf||(wf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,vw)))}var ms=null;function iy(e){ms!==e&&(ms=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ms===e&&(ms=null);for(var t=0;t<e.length;t+=3){var a=e[t],r=e[t+1],s=e[t+2];if(typeof r!="function"){if(Sf(r||a)===null)continue;break}var u=ja(a);u!==null&&(e.splice(t,3),t-=3,bu(u,{pending:!0,data:s,method:a.method,action:r},r,s))}}))}function Rr(e){function t(z){return ds(z,e)}Wa!==null&&ds(Wa,e),el!==null&&ds(el,e),tl!==null&&ds(tl,e),Lo.forEach(t),Ho.forEach(t);for(var a=0;a<nl.length;a++){var r=nl[a];r.blockedOn===e&&(r.blockedOn=null)}for(;0<nl.length&&(a=nl[0],a.blockedOn===null);)ry(a),a.blockedOn===null&&nl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var s=a[r],u=a[r+1],y=s[Ke]||null;if(typeof u=="function")y||iy(a);else if(y){var w=null;if(u&&u.hasAttribute("formAction")){if(s=u,y=u[Ke]||null)w=y.formAction;else if(Sf(s)!==null)continue}else w=y.action;typeof w=="function"?a[r+1]=w:(a.splice(r,3),r-=3),iy(a)}}}function sy(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(y){return s=y})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function Ef(e){this._internalRoot=e}hs.prototype.render=Ef.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,r=gn();Wg(a,r,e,t,null,null)},hs.prototype.unmount=Ef.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Wg(e.current,2,null,e,null,null),Ki(),t[Zt]=null}};function hs(e){this._internalRoot=e}hs.prototype.unstable_scheduleHydration=function(e){if(e){var t=qt();e={blockedOn:null,target:e,priority:t};for(var a=0;a<nl.length&&t!==0&&t<nl[a].priority;a++);nl.splice(a,0,e),a===0&&ry(e)}};var cy=l.version;if(cy!=="19.2.5")throw Error(i(527,cy,"19.2.5"));j.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 bw={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ps=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ps.isDisabled&&ps.supportsFiber)try{aa=ps.inject(bw),Ht=ps}catch{}}return Io.createRoot=function(e,t){if(!c(e))throw Error(i(299));var a=!1,r="",s=gp,u=yp,y=vp;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Zg(e,1,!1,null,null,a,r,null,s,u,y,sy),e[Zt]=t.current,af(e),new Ef(t)},Io.hydrateRoot=function(e,t,a){if(!c(e))throw Error(i(299));var r=!1,s="",u=gp,y=yp,w=vp,z=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(s=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(z=a.formState)),t=Zg(e,1,!0,t,a??null,r,s,z,u,y,w,sy),t.context=Jg(null),a=t.current,r=gn(),r=lt(r),s=Ga(r),s.callback=null,Ya(a,s,r),a=r,t.current.lanes=a,de(t,a),Qn(t),e[Zt]=t.current,af(e),new hs(t)},Io.version="19.2.5",Io}var by;function Rw(){if(by)return Mf.exports;by=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(l){console.error(l)}}return n(),Mf.exports=_w(),Mf.exports}var Nw=Rw();const Ow=kd(Nw);var Qo=X0();const $0=kd(Qo);function zw(n){if(typeof document>"u")return;let l=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",l.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}const Dw=n=>{switch(n){case"success":return Lw;case"info":return Bw;case"warning":return Hw;case"error":return Uw;default:return null}},jw=Array(12).fill(0),kw=({visible:n,className:l})=>pe.createElement("div",{className:["sonner-loading-wrapper",l].filter(Boolean).join(" "),"data-visible":n},pe.createElement("div",{className:"sonner-spinner"},jw.map((o,i)=>pe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),Lw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.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"})),Hw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},pe.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"})),Bw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.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"})),Uw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.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"})),Iw=pe.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"},pe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),pe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Gw=()=>{const[n,l]=pe.useState(document.hidden);return pe.useEffect(()=>{const o=()=>{l(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),n};let ad=1;class Yw{constructor(){this.subscribe=l=>(this.subscribers.push(l),()=>{const o=this.subscribers.indexOf(l);this.subscribers.splice(o,1)}),this.publish=l=>{this.subscribers.forEach(o=>o(l))},this.addToast=l=>{this.publish(l),this.toasts=[...this.toasts,l]},this.create=l=>{var o;const{message:i,...c}=l,f=typeof(l==null?void 0:l.id)=="number"||((o=l.id)==null?void 0:o.length)>0?l.id:ad++,d=this.toasts.find(h=>h.id===f),m=l.dismissible===void 0?!0:l.dismissible;return this.dismissedToasts.has(f)&&this.dismissedToasts.delete(f),d?this.toasts=this.toasts.map(h=>h.id===f?(this.publish({...h,...l,id:f,title:i}),{...h,...l,id:f,dismissible:m,title:i}):h):this.addToast({title:i,...c,dismissible:m,id:f}),f},this.dismiss=l=>(l?(this.dismissedToasts.add(l),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:l,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(i=>i({id:o.id,dismiss:!0}))}),l),this.message=(l,o)=>this.create({...o,message:l}),this.error=(l,o)=>this.create({...o,message:l,type:"error"}),this.success=(l,o)=>this.create({...o,type:"success",message:l}),this.info=(l,o)=>this.create({...o,type:"info",message:l}),this.warning=(l,o)=>this.create({...o,type:"warning",message:l}),this.loading=(l,o)=>this.create({...o,type:"loading",message:l}),this.promise=(l,o)=>{if(!o)return;let i;o.loading!==void 0&&(i=this.create({...o,promise:l,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const c=Promise.resolve(l instanceof Function?l():l);let f=i!==void 0,d;const m=c.then(async g=>{if(d=["resolve",g],pe.isValidElement(g))f=!1,this.create({id:i,type:"default",message:g});else if(qw(g)&&!g.ok){f=!1;const p=typeof o.error=="function"?await o.error(`HTTP error! status: ${g.status}`):o.error,S=typeof o.description=="function"?await o.description(`HTTP error! status: ${g.status}`):o.description,T=typeof p=="object"&&!pe.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:S,...T})}else if(g instanceof Error){f=!1;const p=typeof o.error=="function"?await o.error(g):o.error,S=typeof o.description=="function"?await o.description(g):o.description,T=typeof p=="object"&&!pe.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:S,...T})}else if(o.success!==void 0){f=!1;const p=typeof o.success=="function"?await o.success(g):o.success,S=typeof o.description=="function"?await o.description(g):o.description,T=typeof p=="object"&&!pe.isValidElement(p)?p:{message:p};this.create({id:i,type:"success",description:S,...T})}}).catch(async g=>{if(d=["reject",g],o.error!==void 0){f=!1;const x=typeof o.error=="function"?await o.error(g):o.error,p=typeof o.description=="function"?await o.description(g):o.description,E=typeof x=="object"&&!pe.isValidElement(x)?x:{message:x};this.create({id:i,type:"error",description:p,...E})}}).finally(()=>{f&&(this.dismiss(i),i=void 0),o.finally==null||o.finally.call(o)}),h=()=>new Promise((g,x)=>m.then(()=>d[0]==="reject"?x(d[1]):g(d[1])).catch(x));return typeof i!="string"&&typeof i!="number"?{unwrap:h}:Object.assign(i,{unwrap:h})},this.custom=(l,o)=>{const i=(o==null?void 0:o.id)||ad++;return this.create({jsx:l(i),id:i,...o}),i},this.getActiveToasts=()=>this.toasts.filter(l=>!this.dismissedToasts.has(l.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ln=new Yw,Vw=(n,l)=>{const o=(l==null?void 0:l.id)||ad++;return ln.addToast({title:n,...l,id:o}),o},qw=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",Pw=Vw,Xw=()=>ln.toasts,$w=()=>ln.getActiveToasts(),sl=Object.assign(Pw,{success:ln.success,info:ln.info,warning:ln.warning,error:ln.error,custom:ln.custom,message:ln.message,promise:ln.promise,dismiss:ln.dismiss,loading:ln.loading},{getHistory:Xw,getToasts:$w});zw("[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 gs(n){return n.label!==void 0}const Kw=3,Fw="24px",Qw="16px",xy=4e3,Zw=356,Jw=14,Ww=45,e2=200;function Zn(...n){return n.filter(Boolean).join(" ")}function t2(n){const[l,o]=n.split("-"),i=[];return l&&i.push(l),o&&i.push(o),i}const n2=n=>{var l,o,i,c,f,d,m,h,g;const{invert:x,toast:p,unstyled:S,interacting:E,setHeights:T,visibleToasts:C,heights:A,index:R,toasts:O,expanded:D,removeToast:X,defaultRichColors:le,closeButton:V,style:U,cancelButtonStyle:N,actionButtonStyle:Q,className:ne="",descriptionClassName:fe="",duration:B,position:I,gap:$,expandByDefault:Y,classNames:M,icons:j,closeButtonAriaLabel:q="Close toast"}=n,[P,L]=pe.useState(null),[_,H]=pe.useState(null),[J,ie]=pe.useState(!1),[ee,me]=pe.useState(!1),[ce,Z]=pe.useState(!1),[re,be]=pe.useState(!1),[Me,Ae]=pe.useState(!1),[Pe,Ge]=pe.useState(0),[Yt,St]=pe.useState(0),Ot=pe.useRef(p.duration||B||xy),De=pe.useRef(null),ye=pe.useRef(null),on=R===0,sn=R+1<=C,et=p.type,Lt=p.dismissible!==!1,_t=p.className||"",xn=p.descriptionClassName||"",zt=pe.useMemo(()=>A.findIndex(Re=>Re.toastId===p.id)||0,[A,p.id]),Ra=pe.useMemo(()=>{var Re;return(Re=p.closeButton)!=null?Re:V},[p.closeButton,V]),Ft=pe.useMemo(()=>p.duration||B||xy,[p.duration,B]),qn=pe.useRef(0),Qt=pe.useRef(0),kn=pe.useRef(0),Vt=pe.useRef(null),[aa,Ht]=I.split("-"),cn=pe.useMemo(()=>A.reduce((Re,ut,wt)=>wt>=zt?Re:Re+ut.height,0),[A,zt]),Dt=Gw(),Fr=p.invert||x,vl=et==="loading";Qt.current=pe.useMemo(()=>zt*$+cn,[zt,cn]),pe.useEffect(()=>{Ot.current=Ft},[Ft]),pe.useEffect(()=>{ie(!0)},[]),pe.useEffect(()=>{const Re=ye.current;if(Re){const ut=Re.getBoundingClientRect().height;return St(ut),T(wt=>[{toastId:p.id,height:ut,position:p.position},...wt]),()=>T(wt=>wt.filter(ae=>ae.toastId!==p.id))}},[T,p.id]),pe.useLayoutEffect(()=>{if(!J)return;const Re=ye.current,ut=Re.style.height;Re.style.height="auto";const wt=Re.getBoundingClientRect().height;Re.style.height=ut,St(wt),T(ae=>ae.find(de=>de.toastId===p.id)?ae.map(de=>de.toastId===p.id?{...de,height:wt}:de):[{toastId:p.id,height:wt,position:p.position},...ae])},[J,p.title,p.description,T,p.id,p.jsx,p.action,p.cancel]);const Sn=pe.useCallback(()=>{me(!0),Ge(Qt.current),T(Re=>Re.filter(ut=>ut.toastId!==p.id)),setTimeout(()=>{X(p)},e2)},[p,X,T,Qt]);pe.useEffect(()=>{if(p.promise&&et==="loading"||p.duration===1/0||p.type==="loading")return;let Re;return D||E||Dt?(()=>{if(kn.current<qn.current){const ae=new Date().getTime()-qn.current;Ot.current=Ot.current-ae}kn.current=new Date().getTime()})():(()=>{Ot.current!==1/0&&(qn.current=new Date().getTime(),Re=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Sn()},Ot.current))})(),()=>clearTimeout(Re)},[D,E,p,et,Dt,Sn]),pe.useEffect(()=>{p.delete&&(Sn(),p.onDismiss==null||p.onDismiss.call(p,p))},[Sn,p.delete]);function Na(){var Re;if(j!=null&&j.loading){var ut;return pe.createElement("div",{className:Zn(M==null?void 0:M.loader,p==null||(ut=p.classNames)==null?void 0:ut.loader,"sonner-loader"),"data-visible":et==="loading"},j.loading)}return pe.createElement(kw,{className:Zn(M==null?void 0:M.loader,p==null||(Re=p.classNames)==null?void 0:Re.loader),visible:et==="loading"})}const Oa=p.icon||(j==null?void 0:j[et])||Dw(et);var Pn,wn;return pe.createElement("li",{tabIndex:0,ref:ye,className:Zn(ne,_t,M==null?void 0:M.toast,p==null||(l=p.classNames)==null?void 0:l.toast,M==null?void 0:M.default,M==null?void 0:M[et],p==null||(o=p.classNames)==null?void 0:o[et]),"data-sonner-toast":"","data-rich-colors":(Pn=p.richColors)!=null?Pn:le,"data-styled":!(p.jsx||p.unstyled||S),"data-mounted":J,"data-promise":!!p.promise,"data-swiped":Me,"data-removed":ee,"data-visible":sn,"data-y-position":aa,"data-x-position":Ht,"data-index":R,"data-front":on,"data-swiping":ce,"data-dismissible":Lt,"data-type":et,"data-invert":Fr,"data-swipe-out":re,"data-swipe-direction":_,"data-expanded":!!(D||Y&&J),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":O.length-R,"--offset":`${ee?Pe:Qt.current}px`,"--initial-height":Y?"auto":`${Yt}px`,...U,...p.style},onDragEnd:()=>{Z(!1),L(null),Vt.current=null},onPointerDown:Re=>{Re.button!==2&&(vl||!Lt||(De.current=new Date,Ge(Qt.current),Re.target.setPointerCapture(Re.pointerId),Re.target.tagName!=="BUTTON"&&(Z(!0),Vt.current={x:Re.clientX,y:Re.clientY})))},onPointerUp:()=>{var Re,ut,wt;if(re||!Lt)return;Vt.current=null;const ae=Number(((Re=ye.current)==null?void 0:Re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),he=Number(((ut=ye.current)==null?void 0:ut.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),de=new Date().getTime()-((wt=De.current)==null?void 0:wt.getTime()),ge=P==="x"?ae:he,Le=Math.abs(ge)/de;if(Math.abs(ge)>=Ww||Le>.11){Ge(Qt.current),p.onDismiss==null||p.onDismiss.call(p,p),H(P==="x"?ae>0?"right":"left":he>0?"down":"up"),Sn(),be(!0);return}else{var Ne,Be;(Ne=ye.current)==null||Ne.style.setProperty("--swipe-amount-x","0px"),(Be=ye.current)==null||Be.style.setProperty("--swipe-amount-y","0px")}Ae(!1),Z(!1),L(null)},onPointerMove:Re=>{var ut,wt,ae;if(!Vt.current||!Lt||((ut=window.getSelection())==null?void 0:ut.toString().length)>0)return;const de=Re.clientY-Vt.current.y,ge=Re.clientX-Vt.current.x;var Le;const Ne=(Le=n.swipeDirections)!=null?Le:t2(I);!P&&(Math.abs(ge)>1||Math.abs(de)>1)&&L(Math.abs(ge)>Math.abs(de)?"x":"y");let Be={x:0,y:0};const lt=Xe=>1/(1.5+Math.abs(Xe)/20);if(P==="y"){if(Ne.includes("top")||Ne.includes("bottom"))if(Ne.includes("top")&&de<0||Ne.includes("bottom")&&de>0)Be.y=de;else{const Xe=de*lt(de);Be.y=Math.abs(Xe)<Math.abs(de)?Xe:de}}else if(P==="x"&&(Ne.includes("left")||Ne.includes("right")))if(Ne.includes("left")&&ge<0||Ne.includes("right")&&ge>0)Be.x=ge;else{const Xe=ge*lt(ge);Be.x=Math.abs(Xe)<Math.abs(ge)?Xe:ge}(Math.abs(Be.x)>0||Math.abs(Be.y)>0)&&Ae(!0),(wt=ye.current)==null||wt.style.setProperty("--swipe-amount-x",`${Be.x}px`),(ae=ye.current)==null||ae.style.setProperty("--swipe-amount-y",`${Be.y}px`)}},Ra&&!p.jsx&&et!=="loading"?pe.createElement("button",{"aria-label":q,"data-disabled":vl,"data-close-button":!0,onClick:vl||!Lt?()=>{}:()=>{Sn(),p.onDismiss==null||p.onDismiss.call(p,p)},className:Zn(M==null?void 0:M.closeButton,p==null||(i=p.classNames)==null?void 0:i.closeButton)},(wn=j==null?void 0:j.close)!=null?wn:Iw):null,(et||p.icon||p.promise)&&p.icon!==null&&((j==null?void 0:j[et])!==null||p.icon)?pe.createElement("div",{"data-icon":"",className:Zn(M==null?void 0:M.icon,p==null||(c=p.classNames)==null?void 0:c.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Na():null,p.type!=="loading"?Oa:null):null,pe.createElement("div",{"data-content":"",className:Zn(M==null?void 0:M.content,p==null||(f=p.classNames)==null?void 0:f.content)},pe.createElement("div",{"data-title":"",className:Zn(M==null?void 0:M.title,p==null||(d=p.classNames)==null?void 0:d.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?pe.createElement("div",{"data-description":"",className:Zn(fe,xn,M==null?void 0:M.description,p==null||(m=p.classNames)==null?void 0:m.description)},typeof p.description=="function"?p.description():p.description):null),pe.isValidElement(p.cancel)?p.cancel:p.cancel&&gs(p.cancel)?pe.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||N,onClick:Re=>{gs(p.cancel)&&Lt&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Re),Sn())},className:Zn(M==null?void 0:M.cancelButton,p==null||(h=p.classNames)==null?void 0:h.cancelButton)},p.cancel.label):null,pe.isValidElement(p.action)?p.action:p.action&&gs(p.action)?pe.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||Q,onClick:Re=>{gs(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Re),!Re.defaultPrevented&&Sn())},className:Zn(M==null?void 0:M.actionButton,p==null||(g=p.classNames)==null?void 0:g.actionButton)},p.action.label):null)};function Sy(){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 a2(n,l){const o={};return[n,l].forEach((i,c)=>{const f=c===1,d=f?"--mobile-offset":"--offset",m=f?Qw:Fw;function h(g){["top","right","bottom","left"].forEach(x=>{o[`${d}-${x}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?h(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?o[`${d}-${g}`]=m:o[`${d}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):h(m)}),o}const l2=pe.forwardRef(function(l,o){const{id:i,invert:c,position:f="bottom-right",hotkey:d=["altKey","KeyT"],expand:m,closeButton:h,className:g,offset:x,mobileOffset:p,theme:S="light",richColors:E,duration:T,style:C,visibleToasts:A=Kw,toastOptions:R,dir:O=Sy(),gap:D=Jw,icons:X,containerAriaLabel:le="Notifications"}=l,[V,U]=pe.useState([]),N=pe.useMemo(()=>i?V.filter(J=>J.toasterId===i):V.filter(J=>!J.toasterId),[V,i]),Q=pe.useMemo(()=>Array.from(new Set([f].concat(N.filter(J=>J.position).map(J=>J.position)))),[N,f]),[ne,fe]=pe.useState([]),[B,I]=pe.useState(!1),[$,Y]=pe.useState(!1),[M,j]=pe.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=pe.useRef(null),P=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=pe.useRef(null),_=pe.useRef(!1),H=pe.useCallback(J=>{U(ie=>{var ee;return(ee=ie.find(me=>me.id===J.id))!=null&&ee.delete||ln.dismiss(J.id),ie.filter(({id:me})=>me!==J.id)})},[]);return pe.useEffect(()=>ln.subscribe(J=>{if(J.dismiss){requestAnimationFrame(()=>{U(ie=>ie.map(ee=>ee.id===J.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{$0.flushSync(()=>{U(ie=>{const ee=ie.findIndex(me=>me.id===J.id);return ee!==-1?[...ie.slice(0,ee),{...ie[ee],...J},...ie.slice(ee+1)]:[J,...ie]})})})}),[V]),pe.useEffect(()=>{if(S!=="system"){j(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?j("dark"):j("light")),typeof window>"u")return;const J=window.matchMedia("(prefers-color-scheme: dark)");try{J.addEventListener("change",({matches:ie})=>{j(ie?"dark":"light")})}catch{J.addListener(({matches:ee})=>{try{j(ee?"dark":"light")}catch(me){console.error(me)}})}},[S]),pe.useEffect(()=>{V.length<=1&&I(!1)},[V]),pe.useEffect(()=>{const J=ie=>{var ee;if(d.every(Z=>ie[Z]||ie.code===Z)){var ce;I(!0),(ce=q.current)==null||ce.focus()}ie.code==="Escape"&&(document.activeElement===q.current||(ee=q.current)!=null&&ee.contains(document.activeElement))&&I(!1)};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[d]),pe.useEffect(()=>{if(q.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,_.current=!1)}},[q.current]),pe.createElement("section",{ref:o,"aria-label":`${le} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Q.map((J,ie)=>{var ee;const[me,ce]=J.split("-");return N.length?pe.createElement("ol",{key:J,dir:O==="auto"?Sy():O,tabIndex:-1,ref:q,className:g,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":me,"data-x-position":ce,style:{"--front-toast-height":`${((ee=ne[0])==null?void 0:ee.height)||0}px`,"--width":`${Zw}px`,"--gap":`${D}px`,...C,...a2(x,p)},onBlur:Z=>{_.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(_.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||_.current||(_.current=!0,L.current=Z.relatedTarget)},onMouseEnter:()=>I(!0),onMouseMove:()=>I(!0),onMouseLeave:()=>{$||I(!1)},onDragEnd:()=>I(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},N.filter(Z=>!Z.position&&ie===0||Z.position===J).map((Z,re)=>{var be,Me;return pe.createElement(n2,{key:Z.id,icons:X,index:re,toast:Z,defaultRichColors:E,duration:(be=R==null?void 0:R.duration)!=null?be:T,className:R==null?void 0:R.className,descriptionClassName:R==null?void 0:R.descriptionClassName,invert:c,visibleToasts:A,closeButton:(Me=R==null?void 0:R.closeButton)!=null?Me:h,interacting:$,position:J,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:H,toasts:N.filter(Ae=>Ae.position==Z.position),heights:ne.filter(Ae=>Ae.position==Z.position),setHeights:fe,expandByDefault:m,gap:D,expanded:B,swipeDirections:l.swipeDirections})})):null}))}),Ee="data-editor-id",Il="data-slide-root",Gl=1920,Yl=1080;function Hd(n){return`[${Ee}="${n}"]`}function r2(n){return n.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"slide"}function K0(n,l){return`${l}-${n+1}`}function wy(n,l){const o=Number.parseInt(n||"",10);return Number.isFinite(o)&&o>0?o:l}function o2(n){return r2(n)}function Us(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function F0(n){const l=n.querySelector(`[${Il}]`);if(l)return l.getAttribute("data-slide-width")||l.setAttribute("data-slide-width",String(Gl)),l.getAttribute("data-slide-height")||l.setAttribute("data-slide-height",String(Yl)),l;const o=n.querySelector(".slide-container");return o?(o.setAttribute(Il,"true"),o.getAttribute("data-slide-width")||o.setAttribute("data-slide-width",String(Gl)),o.getAttribute("data-slide-height")||o.setAttribute("data-slide-height",String(Yl)),o):null}function i2(n){return`<!DOCTYPE html>
|
|
50
|
+
${n.documentElement.outerHTML}`}function s2(n){const l=Us(n);if(!l)return n;const o=F0(l),i=Array.from(l.querySelectorAll("[data-editable]"));return o&&!o.getAttribute(Ee)&&o.setAttribute(Ee,"slide-root"),i.forEach((c,f)=>{if(!c.getAttribute(Ee)){const d=c.getAttribute("data-editable")||"block";c.setAttribute(Ee,K0(f,d))}}),i2(l)}function Jn(n,l="slide-1"){var E;if(!Us(n))return{id:l,title:"Untitled Slide",htmlSource:n,rootSelector:`[${Il}]`,width:Gl,height:Yl,elements:[]};const i=s2(n),c=Us(i);if(!c)return{id:l,title:"Untitled Slide",htmlSource:i,rootSelector:`[${Il}]`,width:Gl,height:Yl,elements:[]};const f=F0(c),d=Array.from(c.querySelectorAll("[data-editable]")),m=f!=null&&f.getAttribute(Ee)?`[${Ee}="${f.getAttribute(Ee)}"]`:`[${Il}]`,h=wy((f==null?void 0:f.getAttribute("data-slide-width"))??null,Gl),g=wy((f==null?void 0:f.getAttribute("data-slide-height"))??null,Yl),x=d.map((T,C)=>{const A=T.getAttribute("data-editable")||"block",R=T.getAttribute(Ee)||K0(C,A);return{id:R,selector:Hd(R),type:A==="block"&&T.getAttribute("data-group")==="true"?"group":A,content:T instanceof HTMLImageElement?T.src:T.textContent||"",tagName:T.tagName.toLowerCase()}}),p=c.querySelector("h1, h2, title"),S=((E=p==null?void 0:p.textContent)==null?void 0:E.trim())||`Slide ${l}`;return{id:o2(l),title:S,htmlSource:i,rootSelector:m,width:h,height:g,elements:x}}function $e(n,l){return n.querySelector(Hd(l))}function c2(n,l,o){const i=Us(n.htmlSource);if(!i)return"";const c=$e(i,l);return(c==null?void 0:c.style.getPropertyValue(o).trim())||""}function ml(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function Bd(n){return`<!DOCTYPE html>
|
|
51
|
+
${n.documentElement.outerHTML}`}function Vr(n,l){const o=ml(n);return o?(l(o),Bd(o)):n}const Ud=["position","left","top","width","height","transform","transformOrigin","margin","zIndex"];function Q0(){return{position:null,left:null,top:null,width:null,height:null,transform:null,transformOrigin:null,margin:null,zIndex:null}}function Po(n){const l=Q0();for(const o of Ud){const i=n.style[o];l[o]=i||null}return l}function ld(n){return{...Q0(),...n}}function Gn(n){const l=n||"",o=l.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/i),i=l.match(/rotate\(([-\d.]+)deg\)/i);return{translateX:o&&Number.parseFloat(o[1]||"0")||0,translateY:o&&Number.parseFloat(o[2]||"0")||0,rotate:i&&Number.parseFloat(i[1]||"0")||0}}function Nf(n){return Math.round(n*100)/100}function Ca(n,l,o){const i=[];return(Math.abs(n)>.01||Math.abs(l)>.01)&&i.push(`translate(${Nf(n)}px, ${Nf(l)}px)`),Math.abs(o)>.01&&i.push(`rotate(${Nf(o)}deg)`),i.length?i.join(" "):null}function Lr(n,l,o){return{x:o.offsetX+(n.left-l.left)*o.scale,y:o.offsetY+(n.top-l.top)*o.scale,width:n.width*o.scale,height:n.height*o.scale}}function Ll(n,l){return{...l,hidden:n.hidden,sourceFile:n.sourceFile}}function Z0(n,l){if(l.type==="slide.visibility.update")return n.id!==l.slideId?n:{...n,hidden:l.nextHidden};if(l.type==="slide.title.update")return n.id!==l.slideId?n:{...n,title:l.nextTitle};if(!("slideId"in l)||l.type==="slide.reorder"||n.id!==l.slideId)return n;switch(l.type){case"operation.batch":return l.operations.reduce((o,i)=>Z0(o,i),n);case"text.update":return Ll(n,Jn(f2(n.htmlSource,l.elementId,l.nextText),n.id));case"style.update":return Ll(n,Jn(d2(n.htmlSource,l.elementId,l.propertyName,l.nextValue),n.id));case"attribute.update":return Ll(n,Jn(m2(n.htmlSource,l.elementId,l.attributeName,l.nextValue),n.id));case"element.layout.update":return Ll(n,Jn(p2(n.htmlSource,l.elementId,l.nextStyle),n.id));case"element.insert":return Ll(n,Jn(g2(n.htmlSource,l),n.id));case"element.remove":return Ll(n,Jn(y2(n.htmlSource,l.elementId),n.id));case"group.create":case"group.ungroup":return Ll(n,Jn(l.nextHtmlSource,n.id))}}function J0(n){switch(n.type){case"operation.batch":return{type:"operation.batch",slideId:n.slideId,operations:n.operations.map(l=>J0(l)).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}}}function ys(n){const l=Number.parseFloat(n||"");return Number.isFinite(l)?l:0}function Ey(n){const l=Gn(n.style.transform);return{x:ys(n.style.left)+l.translateX,y:ys(n.style.top)+l.translateY,width:ys(n.style.width)||Gl,height:ys(n.style.height)||Yl}}function Is(n,l={}){let o=n,i=0,c=0;const f=n.getAttribute(Ee)??"",d=l[f]??Ey(n),m=d.width,h=d.height;for(;o;){const g=o.getAttribute(Ee)??"",x=l[g]??Ey(o);i+=x.x,c+=x.y;const p=o.parentElement;if(!p||!p.hasAttribute("data-editable"))break;o=p}return{x:i,y:c,width:m,height:h}}function W0(n,l={}){const o=n.parentElement;if(!o||!o.hasAttribute("data-editable"))return{x:0,y:0};const i=Is(o,l);return{x:i.x,y:i.y}}function rd(n,l){n.style.position=n.style.position||"absolute",n.style.left=`${Math.round(l.x*100)/100}px`,n.style.top=`${Math.round(l.y*100)/100}px`,n.style.width=`${Math.round(l.width*100)/100}px`,n.style.height=`${Math.round(l.height*100)/100}px`;const o=Gn(n.style.transform),i=Ca(0,0,o.rotate);i?n.style.transform=i:n.style.removeProperty("transform")}function Ty(n,l){l&&(l.color&&(n.style.color=l.color),l.fontSize&&(n.style.fontSize=l.fontSize),l.fontWeight&&(n.style.fontWeight=l.fontWeight),l.fontStyle&&(n.style.fontStyle=l.fontStyle),l.lineHeight&&(n.style.lineHeight=l.lineHeight),l.textAlign&&(n.style.textAlign=l.textAlign),l.paddingTop&&(n.style.paddingTop=l.paddingTop),l.paddingRight&&(n.style.paddingRight=l.paddingRight),l.paddingBottom&&(n.style.paddingBottom=l.paddingBottom),l.paddingLeft&&(n.style.paddingLeft=l.paddingLeft),l.listStylePosition&&(n.style.listStylePosition=l.listStylePosition),l.listStyleType&&(n.style.listStyleType=l.listStyleType))}function Of(n){const l=n.parentElement;return l&&(l.hasAttribute(Il)||l.hasAttribute("data-editable"))?l:null}function od(n){return Array.from(n.children).filter(l=>l instanceof HTMLElement&&l.hasAttribute("data-editable"))}function ev(n){const l=n.tagName.toLowerCase();return l!=="ul"&&l!=="ol"?!1:Array.from(n.children).some(o=>o.tagName.toLowerCase()==="li"&&o.hasAttribute("data-editable"))}function tv(n,l){const o=new Set(Array.from(n.querySelectorAll(`[${Ee}]`)).map(d=>d.getAttribute(Ee)).filter(d=>!!d));if(!o.has(l))return l;const i=l.match(/^(.*?)(?:-(\d+))?$/),c=(i==null?void 0:i[1])||l;let f=Number.parseInt((i==null?void 0:i[2])||"1",10)+1;for(;o.has(`${c}-${f}`);)f+=1;return`${c}-${f}`}function u2(n,l){return Array.from(n.children).filter(o=>o instanceof HTMLElement?o.hasAttribute("data-editable")?!0:ev(o)?(o.setAttribute("data-editable","block"),o.getAttribute(Ee)||o.setAttribute(Ee,tv(l,"block-1")),!0):!1:!1)}function f2(n,l,o){return Vr(n,i=>{const c=$e(i,l);c&&(c.textContent=o)})}function d2(n,l,o,i){return Vr(n,c=>{var d;const f=$e(c,l);f&&(i.trim().length===0?f.style.removeProperty(o):f.style.setProperty(o,i),(d=f.getAttribute("style"))!=null&&d.trim()||f.removeAttribute("style"))})}function m2(n,l,o,i){return Vr(n,c=>{const f=$e(c,l);f&&(i.trim().length===0?f.removeAttribute(o):f.setAttribute(o,i))})}function h2(n,l){var o;for(const i of Ud){const c=l[i];if(c===null){n.style[i]="";continue}n.style[i]=c}(o=n.getAttribute("style"))!=null&&o.trim()||n.removeAttribute("style")}function p2(n,l,o){return Vr(n,i=>{const c=$e(i,l);c&&h2(c,o)})}function Gs(n,l){const o=ml(n);if(!o)return null;const i=$e(o,l);if(!i||!(i.parentElement instanceof HTMLElement))return null;const c=i.previousElementSibling instanceof HTMLElement?i.previousElementSibling.getAttribute(Ee):null,f=i.nextElementSibling instanceof HTMLElement?i.nextElementSibling.getAttribute(Ee):null;return{parentElementId:i.parentElement.getAttribute(Ee),previousSiblingElementId:c,nextSiblingElementId:f}}function Ys(n,l){var i;const o=ml(n);return o?((i=$e(o,l))==null?void 0:i.outerHTML)??null:null}function nv(n,l){var f;const o=ml(`<template>${n}</template>`),i=(f=o==null?void 0:o.querySelector("template"))==null?void 0:f.content.firstElementChild;if(!(i instanceof HTMLElement))return n;const c=[i,...Array.from(i.querySelectorAll(`[${Ee}]`))];for(const d of c){const m=d.getAttribute(Ee);m&&l[m]&&d.setAttribute(Ee,l[m])}return i.outerHTML}function id(n,l){const o=ml(n);return o?tv(o,l):l}function g2(n,l){return Vr(n,o=>{var h;if($e(o,l.elementId))return;const i=ml(`<template>${l.html}</template>`),c=(h=i==null?void 0:i.querySelector("template"))==null?void 0:h.content.firstElementChild;if(!(c instanceof HTMLElement))return;const f=(l.parentElementId?$e(o,l.parentElementId):null)??o.querySelector(`[${Il}]`)??o.body,d=l.nextSiblingElementId?$e(o,l.nextSiblingElementId):null,m=l.previousSiblingElementId?$e(o,l.previousSiblingElementId):null;(d==null?void 0:d.parentElement)===f?f.insertBefore(o.importNode(c,!0),d):(m==null?void 0:m.parentElement)===f?m.after(o.importNode(c,!0)):f.appendChild(o.importNode(c,!0))})}function y2(n,l){return Vr(n,o=>{var i;(i=$e(o,l))==null||i.remove()})}function v2({html:n,slideId:l,groupElementId:o,elementIds:i,elementRects:c={},timestamp:f=Date.now()}){const d=ml(n);if(!d||!i.length)return null;const m=i.map(V=>$e(d,V)).filter(V=>!!V);if(m.length!==i.length)return null;const g=m.flatMap(V=>V.getAttribute("data-group")==="true"?od(V):[V]).filter((V,U,N)=>N.findIndex(Q=>Q===V)===U);if(g.length<2)return null;const x=Of(m[0]);if(!x||m.some(V=>Of(V)!==x)||$e(d,o))return null;const p=m.filter(V=>V.getAttribute("data-group")==="true"),S=g.map(V=>Is(V,c)),E=Math.min(...S.map(V=>V.x)),T=Math.min(...S.map(V=>V.y)),C=Math.max(...S.map(V=>V.x+V.width)),A=Math.max(...S.map(V=>V.y+V.height)),R=W0(m[0],c),O=d.createElement("div");O.setAttribute("data-editable","block"),O.setAttribute("data-group","true"),O.setAttribute(Ee,o),rd(O,{x:E-R.x,y:T-R.y,width:C-E,height:A-T});const D=Array.from(x.children).flatMap(V=>V instanceof HTMLElement?p.includes(V)?od(V).filter(U=>g.includes(U)):g.includes(V)?[V]:[]:[]),X=m.find(V=>Of(V)===x)??null;(X==null?void 0:X.parentElement)===x?x.insertBefore(O,X):x.appendChild(O);for(const V of D){const U=Is(V,c);rd(V,{x:U.x-E,y:U.y-T,width:U.width,height:U.height}),O.appendChild(V)}for(const V of p)V.children.length||V.remove();const le=Bd(d);return le===n?null:{type:"group.create",slideId:l,groupElementId:o,elementIds:D.map(V=>V.getAttribute(Ee)).filter(V=>!!V),previousHtmlSource:n,nextHtmlSource:le,timestamp:f}}function b2({html:n,slideId:l,groupElementId:o,elementRects:i={},elementPresentationStyles:c={},timestamp:f=Date.now()}){const d=ml(n);if(!d)return null;const m=$e(d,o);if(!m||!m.parentElement)return null;const h=m.parentElement,g=W0(m,i),x=m.getAttribute("data-group")==="true",p=x?od(m):u2(m,d);if(!p.length)return null;const S=m.getAttribute(Ee),E=x?m:m.nextSibling,T=p.map(A=>A.getAttribute(Ee)).filter(A=>!!A);for(const A of p){const R=Is(A,i);if(rd(A,{x:R.x-g.x,y:R.y-g.y,width:R.width,height:R.height}),!x){const O=A.getAttribute(Ee)??"";Ty(A,c[O]),ev(A)&&(A.style.margin="0px");for(const D of Array.from(A.querySelectorAll(`[data-editable][${Ee}]`))){const X=D.getAttribute(Ee)??"";Ty(D,c[X])}}h.insertBefore(A,E)}x&&m.remove();const C=Bd(d);return C===n?null:{type:"group.ungroup",slideId:l,groupElementId:o,childElementIds:x||!S?T:[S,...T],previousHtmlSource:n,nextHtmlSource:C,timestamp:f}}const x2=`<!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; margin: 0; font-size: 96px; line-height: 1.05;">
|
|
66
|
+
Untitled Slide
|
|
67
|
+
</h1>
|
|
68
|
+
</main>
|
|
69
|
+
</body>
|
|
70
|
+
</html>`;function av(n,l){const o=new Set(n.map(c=>c.id));if(!o.has(l))return l;let i=2;for(;o.has(`${l}-${i}`);)i+=1;return`${l}-${i}`}function lv(n,l){const o=new Set(n.map(m=>m.sourceFile).filter(Boolean));if(!o.has(l))return l;const i=l.lastIndexOf("."),c=i>=0?l.slice(0,i):l,f=i>=0?l.slice(i):"";let d=2;for(;o.has(`${c}-${d}${f}`);)d+=1;return`${c}-${d}${f}`}function S2(n,l){const o=Math.max(l+1,1),i=av(n,`generated-slide-${o}`),c=lv(n,`${String(o).padStart(2,"0")}-untitled.html`);return{...Jn(x2,i),hidden:!1,sourceFile:c,title:"Untitled Slide"}}function w2(n,l){const o=av(n,`${l.id}-copy`),i=lv(n,l.sourceFile?E2(l.sourceFile,"copy"):`${o}.html`);return{...Jn(l.htmlSource,o),hidden:l.hidden===!0,sourceFile:i,title:l.title}}function E2(n,l){const o=n.lastIndexOf(".");return o<0?`${n}-${l}`:`${n.slice(0,o)}-${l}${n.slice(o)}`}function Cy(n,l){return Math.min(Math.max(n,0),l)}function zf(n,l){switch(l.type){case"slide.create":case"slide.duplicate":{const o=Cy(l.index,n.length);return[...n.slice(0,o),l.slide,...n.slice(o)]}case"slide.delete":return n.filter(o=>o.id!==l.slide.id);case"slide.reorder":{const o=n.findIndex(f=>f.id===l.slideId);if(o<0)return n;const i=[...n],[c]=i.splice(o,1);return c?(i.splice(Cy(l.toIndex,i.length),0,c),i):n}default:return n.map(o=>Z0(o,l))}}function rv(n){return{slides:n,undoStack:[],redoStack:[]}}function vs(n,l){switch(l.type){case"history.reset":return rv(l.slides);case"history.commit":return{slides:zf(n.slides,l.operation),undoStack:[...n.undoStack,l.operation],redoStack:[]};case"history.undo":{const o=n.undoStack[n.undoStack.length-1];return o?{slides:zf(n.slides,J0(o)),undoStack:n.undoStack.slice(0,-1),redoStack:[...n.redoStack,o]}:n}case"history.redo":{const o=n.redoStack[n.redoStack.length-1];return o?{slides:zf(n.slides,o),undoStack:[...n.undoStack,o],redoStack:n.redoStack.slice(0,-1)}:n}}}async function T2({manifestUrl:n,fetchImpl:l,requestInit:o,slideIdPrefix:i="generated-slide-"}){var p;const c=l??globalThis.fetch;if(!c)throw new Error("loadSlidesFromManifest requires a fetch implementation.");const f={cache:"no-store",...o},d=await c(n,f);if(!d.ok)return null;const m=await d.json();if(!((p=m.slides)!=null&&p.length))return null;const h=d.url||n,g=new URL(h),x=await Promise.all(m.slides.map(async(S,E)=>{const T=new URL(S.file,h);for(const[O,D]of g.searchParams)T.searchParams.has(O)||T.searchParams.set(O,D);const C=await c(T.toString(),f);if(!C.ok)throw new Error(`Failed to load slide HTML: ${S.file}`);const A=await C.text(),R=Jn(A,`${i}${E+1}`);return{...R,hidden:S.hidden===!0,sourceFile:S.file,title:S.title||R.title}}));return{manifest:m,slides:x}}/**
|
|
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 ov=(...n)=>n.filter((l,o,i)=>!!l&&l.trim()!==""&&i.indexOf(l)===o).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 C2=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 M2=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,o,i)=>i?i.toUpperCase():o.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 My=n=>{const l=M2(n);return l.charAt(0).toUpperCase()+l.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 A2=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1},_2=b.createContext({}),R2=()=>b.useContext(_2),N2=b.forwardRef(({color:n,size:l,strokeWidth:o,absoluteStrokeWidth:i,className:c="",children:f,iconNode:d,...m},h)=>{const{size:g=24,strokeWidth:x=2,absoluteStrokeWidth:p=!1,color:S="currentColor",className:E=""}=R2()??{},T=i??p?Number(o??x)*24/Number(l??g):o??x;return b.createElement("svg",{ref:h,...Df,width:l??g??Df.width,height:l??g??Df.height,stroke:n??S,strokeWidth:T,className:ov("lucide",E,c),...!f&&!A2(m)&&{"aria-hidden":"true"},...m},[...d.map(([C,A])=>b.createElement(C,A)),...Array.isArray(f)?f:[f]])});/**
|
|
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 Oe=(n,l)=>{const o=b.forwardRef(({className:i,...c},f)=>b.createElement(N2,{ref:f,iconNode:l,className:ov(`lucide-${C2(My(n))}`,`lucide-${n}`,i),...c}));return o.displayName=My(n),o};/**
|
|
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 O2=[["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"}]],sd=Oe("align-center-horizontal",O2);/**
|
|
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 z2=[["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"}]],iv=Oe("align-center-vertical",z2);/**
|
|
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 D2=[["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"}]],sv=Oe("align-end-horizontal",D2);/**
|
|
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 j2=[["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"}]],cv=Oe("align-end-vertical",j2);/**
|
|
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 k2=[["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"}]],uv=Oe("align-start-horizontal",k2);/**
|
|
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 L2=[["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"}]],fv=Oe("align-start-vertical",L2);/**
|
|
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 H2=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],dv=Oe("arrow-down-to-line",H2);/**
|
|
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 B2=[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]],cd=Oe("arrow-up-to-line",B2);/**
|
|
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 U2=[["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"}]],I2=Oe("box",U2);/**
|
|
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 G2=[["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"}]],jf=Oe("case-sensitive",G2);/**
|
|
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 Y2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],mv=Oe("check",Y2);/**
|
|
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 V2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Zo=Oe("chevron-down",V2);/**
|
|
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 q2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],P2=Oe("chevron-right",q2);/**
|
|
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 X2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Id=Oe("chevron-up",X2);/**
|
|
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 $2=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],K2=Oe("cloud",$2);/**
|
|
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 F2=[["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"}]],ud=Oe("columns-3",F2);/**
|
|
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 Q2=[["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"}]],hv=Oe("copy",Q2);/**
|
|
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 Z2=[["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"}]],J2=Oe("download",Z2);/**
|
|
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 W2=[["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"}]],Ay=Oe("eye-off",W2);/**
|
|
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 eE=[["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"}]],pv=Oe("eye",eE);/**
|
|
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 tE=[["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"}]],nE=Oe("file-check-corner",tE);/**
|
|
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 aE=[["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"}]],lE=Oe("file-code-corner",aE);/**
|
|
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 rE=[["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"}]],gv=Oe("file-text",rE);/**
|
|
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 oE=[["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"}]],fd=Oe("group",oE);/**
|
|
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 iE=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],sE=Oe("hash",iE);/**
|
|
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 cE=[["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"}]],yv=Oe("layers",cE);/**
|
|
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 uE=[["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"}]],fE=Oe("link-2",uE);/**
|
|
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 dE=[["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"}]],_y=Oe("lock",dE);/**
|
|
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 mE=[["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"}]],hE=Oe("maximize-2",mE);/**
|
|
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 pE=[["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"}]],Ry=Oe("palette",pE);/**
|
|
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 gE=[["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"}]],yE=Oe("pen",gE);/**
|
|
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 vE=[["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"}]],bE=Oe("pencil",vE);/**
|
|
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 xE=[["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"}]],SE=Oe("pilcrow",xE);/**
|
|
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 wE=[["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"}]],EE=Oe("play",wE);/**
|
|
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 TE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],kf=Oe("plus",TE);/**
|
|
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 CE=[["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"}]],ME=Oe("presentation",CE);/**
|
|
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 AE=[["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"}]],_E=Oe("rotate-cw",AE);/**
|
|
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 RE=[["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"}]],vv=Oe("rows-3",RE);/**
|
|
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 NE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Ny=Oe("square",NE);/**
|
|
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 OE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],zE=Oe("text-align-center",OE);/**
|
|
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 DE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],jE=Oe("text-align-end",DE);/**
|
|
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 kE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],LE=Oe("text-align-start",kE);/**
|
|
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 HE=[["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"}]],bv=Oe("trash-2",HE);/**
|
|
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 BE=[["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"}]],Oy=Oe("type",BE);/**
|
|
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 UE=[["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"}]],xv=Oe("ungroup",UE);/**
|
|
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 IE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sv=Oe("x",IE);/**
|
|
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 GE=[["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"}]],YE=Oe("zap",GE);function wv(n){var l,o,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(l=0;l<c;l++)n[l]&&(o=wv(n[l]))&&(i&&(i+=" "),i+=o)}else for(o in n)n[o]&&(i&&(i+=" "),i+=o);return i}function Ev(){for(var n,l,o=0,i="",c=arguments.length;o<c;o++)(n=arguments[o])&&(l=wv(n))&&(i&&(i+=" "),i+=l);return i}const VE=(n,l)=>{const o=new Array(n.length+l.length);for(let i=0;i<n.length;i++)o[i]=n[i];for(let i=0;i<l.length;i++)o[n.length+i]=l[i];return o},qE=(n,l)=>({classGroupId:n,validator:l}),Tv=(n=new Map,l=null,o)=>({nextPart:n,validators:l,classGroupId:o}),Vs="-",zy=[],PE="arbitrary..",XE=n=>{const l=KE(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return $E(d);const m=d.split(Vs),h=m[0]===""&&m.length>1?1:0;return Cv(m,h,l)},getConflictingClassGroupIds:(d,m)=>{if(m){const h=i[d],g=o[d];return h?g?VE(g,h):h:g||zy}return o[d]||zy}}},Cv=(n,l,o)=>{if(n.length-l===0)return o.classGroupId;const c=n[l],f=o.nextPart.get(c);if(f){const g=Cv(n,l+1,f);if(g)return g}const d=o.validators;if(d===null)return;const m=l===0?n.join(Vs):n.slice(l).join(Vs),h=d.length;for(let g=0;g<h;g++){const x=d[g];if(x.validator(m))return x.classGroupId}},$E=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),o=l.indexOf(":"),i=l.slice(0,o);return i?PE+i:void 0})(),KE=n=>{const{theme:l,classGroups:o}=n;return FE(o,l)},FE=(n,l)=>{const o=Tv();for(const i in n){const c=n[i];Gd(c,o,i,l)}return o},Gd=(n,l,o,i)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];QE(d,l,o,i)}},QE=(n,l,o,i)=>{if(typeof n=="string"){ZE(n,l,o);return}if(typeof n=="function"){JE(n,l,o,i);return}WE(n,l,o,i)},ZE=(n,l,o)=>{const i=n===""?l:Mv(l,n);i.classGroupId=o},JE=(n,l,o,i)=>{if(eT(n)){Gd(n(i),l,o,i);return}l.validators===null&&(l.validators=[]),l.validators.push(qE(o,n))},WE=(n,l,o,i)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[m,h]=c[d];Gd(h,Mv(l,m),o,i)}},Mv=(n,l)=>{let o=n;const i=l.split(Vs),c=i.length;for(let f=0;f<c;f++){const d=i[f];let m=o.nextPart.get(d);m||(m=Tv(),o.nextPart.set(d,m)),o=m}return o},eT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,tT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,o=Object.create(null),i=Object.create(null);const c=(f,d)=>{o[f]=d,l++,l>n&&(l=0,i=o,o=Object.create(null))};return{get(f){let d=o[f];if(d!==void 0)return d;if((d=i[f])!==void 0)return c(f,d),d},set(f,d){f in o?o[f]=d:c(f,d)}}},dd="!",Dy=":",nT=[],jy=(n,l,o,i,c)=>({modifiers:n,hasImportantModifier:l,baseClassName:o,maybePostfixModifierPosition:i,isExternal:c}),aT=n=>{const{prefix:l,experimentalParseClassName:o}=n;let i=c=>{const f=[];let d=0,m=0,h=0,g;const x=c.length;for(let C=0;C<x;C++){const A=c[C];if(d===0&&m===0){if(A===Dy){f.push(c.slice(h,C)),h=C+1;continue}if(A==="/"){g=C;continue}}A==="["?d++:A==="]"?d--:A==="("?m++:A===")"&&m--}const p=f.length===0?c:c.slice(h);let S=p,E=!1;p.endsWith(dd)?(S=p.slice(0,-1),E=!0):p.startsWith(dd)&&(S=p.slice(1),E=!0);const T=g&&g>h?g-h:void 0;return jy(f,E,S,T)};if(l){const c=l+Dy,f=i;i=d=>d.startsWith(c)?f(d.slice(c.length)):jy(nT,!1,d,void 0,!0)}if(o){const c=i;i=f=>o({className:f,parseClassName:c})}return i},lT=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((o,i)=>{l.set(o,1e6+i)}),o=>{const i=[];let c=[];for(let f=0;f<o.length;f++){const d=o[f],m=d[0]==="[",h=l.has(d);m||h?(c.length>0&&(c.sort(),i.push(...c),c=[]),i.push(d)):c.push(d)}return c.length>0&&(c.sort(),i.push(...c)),i}},rT=n=>({cache:tT(n.cacheSize),parseClassName:aT(n),sortModifiers:lT(n),...XE(n)}),oT=/\s+/,iT=(n,l)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:c,sortModifiers:f}=l,d=[],m=n.trim().split(oT);let h="";for(let g=m.length-1;g>=0;g-=1){const x=m[g],{isExternal:p,modifiers:S,hasImportantModifier:E,baseClassName:T,maybePostfixModifierPosition:C}=o(x);if(p){h=x+(h.length>0?" "+h:h);continue}let A=!!C,R=i(A?T.substring(0,C):T);if(!R){if(!A){h=x+(h.length>0?" "+h:h);continue}if(R=i(T),!R){h=x+(h.length>0?" "+h:h);continue}A=!1}const O=S.length===0?"":S.length===1?S[0]:f(S).join(":"),D=E?O+dd:O,X=D+R;if(d.indexOf(X)>-1)continue;d.push(X);const le=c(R,A);for(let V=0;V<le.length;++V){const U=le[V];d.push(D+U)}h=x+(h.length>0?" "+h:h)}return h},sT=(...n)=>{let l=0,o,i,c="";for(;l<n.length;)(o=n[l++])&&(i=Av(o))&&(c&&(c+=" "),c+=i);return c},Av=n=>{if(typeof n=="string")return n;let l,o="";for(let i=0;i<n.length;i++)n[i]&&(l=Av(n[i]))&&(o&&(o+=" "),o+=l);return o},cT=(n,...l)=>{let o,i,c,f;const d=h=>{const g=l.reduce((x,p)=>p(x),n());return o=rT(g),i=o.cache.get,c=o.cache.set,f=m,m(h)},m=h=>{const g=i(h);if(g)return g;const x=iT(h,o);return c(h,x),x};return f=d,(...h)=>f(sT(...h))},uT=[],Nt=n=>{const l=o=>o[n]||uT;return l.isThemeGetter=!0,l},_v=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Rv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,dT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mT=/\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$/,hT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,pT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ll=n=>fT.test(n),He=n=>!!n&&!Number.isNaN(Number(n)),rl=n=>!!n&&Number.isInteger(Number(n)),Lf=n=>n.endsWith("%")&&He(n.slice(0,-1)),Ta=n=>dT.test(n),Nv=()=>!0,yT=n=>mT.test(n)&&!hT.test(n),Yd=()=>!1,vT=n=>pT.test(n),bT=n=>gT.test(n),xT=n=>!xe(n)&&!Se(n),ST=n=>hl(n,Dv,Yd),xe=n=>_v.test(n),Hl=n=>hl(n,jv,yT),ky=n=>hl(n,RT,He),wT=n=>hl(n,Lv,Nv),ET=n=>hl(n,kv,Yd),Ly=n=>hl(n,Ov,Yd),TT=n=>hl(n,zv,bT),bs=n=>hl(n,Hv,vT),Se=n=>Rv.test(n),Go=n=>Xl(n,jv),CT=n=>Xl(n,kv),Hy=n=>Xl(n,Ov),MT=n=>Xl(n,Dv),AT=n=>Xl(n,zv),xs=n=>Xl(n,Hv,!0),_T=n=>Xl(n,Lv,!0),hl=(n,l,o)=>{const i=_v.exec(n);return i?i[1]?l(i[1]):o(i[2]):!1},Xl=(n,l,o=!1)=>{const i=Rv.exec(n);return i?i[1]?l(i[1]):o:!1},Ov=n=>n==="position"||n==="percentage",zv=n=>n==="image"||n==="url",Dv=n=>n==="length"||n==="size"||n==="bg-size",jv=n=>n==="length",RT=n=>n==="number",kv=n=>n==="family-name",Lv=n=>n==="number"||n==="weight",Hv=n=>n==="shadow",NT=()=>{const n=Nt("color"),l=Nt("font"),o=Nt("text"),i=Nt("font-weight"),c=Nt("tracking"),f=Nt("leading"),d=Nt("breakpoint"),m=Nt("container"),h=Nt("spacing"),g=Nt("radius"),x=Nt("shadow"),p=Nt("inset-shadow"),S=Nt("text-shadow"),E=Nt("drop-shadow"),T=Nt("blur"),C=Nt("perspective"),A=Nt("aspect"),R=Nt("ease"),O=Nt("animate"),D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],le=()=>[...X(),Se,xe],V=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto","contain","none"],N=()=>[Se,xe,h],Q=()=>[ll,"full","auto",...N()],ne=()=>[rl,"none","subgrid",Se,xe],fe=()=>["auto",{span:["full",rl,Se,xe]},rl,Se,xe],B=()=>[rl,"auto",Se,xe],I=()=>["auto","min","max","fr",Se,xe],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...N()],j=()=>[ll,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],q=()=>[ll,"screen","full","dvw","lvw","svw","min","max","fit",...N()],P=()=>[ll,"screen","full","lh","dvh","lvh","svh","min","max","fit",...N()],L=()=>[n,Se,xe],_=()=>[...X(),Hy,Ly,{position:[Se,xe]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",MT,ST,{size:[Se,xe]}],ie=()=>[Lf,Go,Hl],ee=()=>["","none","full",g,Se,xe],me=()=>["",He,Go,Hl],ce=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[He,Lf,Hy,Ly],be=()=>["","none",T,Se,xe],Me=()=>["none",He,Se,xe],Ae=()=>["none",He,Se,xe],Pe=()=>[He,Se,xe],Ge=()=>[ll,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ta],breakpoint:[Ta],color:[Nv],container:[Ta],"drop-shadow":[Ta],ease:["in","out","in-out"],font:[xT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ta],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ta],shadow:[Ta],spacing:["px",He],text:[Ta],"text-shadow":[Ta],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ll,xe,Se,A]}],container:["container"],columns:[{columns:[He,xe,Se,m]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:le()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[rl,"auto",Se,xe]}],basis:[{basis:[ll,"full","auto",m,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[He,ll,"auto","initial","none",xe]}],grow:[{grow:["",He,Se,xe]}],shrink:[{shrink:["",He,Se,xe]}],order:[{order:[rl,"first","last","none",Se,xe]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:fe()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:fe()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pbs:[{pbs:N()}],pbe:[{pbe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[m,"screen",...j()]}],"min-w":[{"min-w":[m,"screen","none",...j()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",o,Go,Hl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,_T,wT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Lf,xe]}],"font-family":[{font:[CT,ET,l]}],"font-features":[{"font-features":[xe]}],"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:[c,Se,xe]}],"line-clamp":[{"line-clamp":[He,"none",Se,ky]}],leading:[{leading:[f,...N()]}],"list-image":[{"list-image":["none",Se,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[He,"from-font","auto",Se,Hl]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[He,"auto",Se,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,xe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Se,xe]}],"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:H()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},rl,Se,xe],radial:["",Se,xe],conic:[rl,Se,xe]},AT,TT]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[He,Se,xe]}],"outline-w":[{outline:["",He,Go,Hl]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",x,xs,bs]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",p,xs,bs]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[He,Hl]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",S,xs,bs]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[He,Se,xe]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],"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":[He]}],"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":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"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":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"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":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"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":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"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":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"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":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"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":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[Se,xe]}],"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":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":X()}],"mask-image-conic-pos":[{"mask-conic":[He]}],"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":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,xe]}],filter:[{filter:["","none",Se,xe]}],blur:[{blur:be()}],brightness:[{brightness:[He,Se,xe]}],contrast:[{contrast:[He,Se,xe]}],"drop-shadow":[{"drop-shadow":["","none",E,xs,bs]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",He,Se,xe]}],"hue-rotate":[{"hue-rotate":[He,Se,xe]}],invert:[{invert:["",He,Se,xe]}],saturate:[{saturate:[He,Se,xe]}],sepia:[{sepia:["",He,Se,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,xe]}],"backdrop-blur":[{"backdrop-blur":be()}],"backdrop-brightness":[{"backdrop-brightness":[He,Se,xe]}],"backdrop-contrast":[{"backdrop-contrast":[He,Se,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",He,Se,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[He,Se,xe]}],"backdrop-invert":[{"backdrop-invert":["",He,Se,xe]}],"backdrop-opacity":[{"backdrop-opacity":[He,Se,xe]}],"backdrop-saturate":[{"backdrop-saturate":[He,Se,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",He,Se,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Se,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[He,"initial",Se,xe]}],ease:[{ease:["linear","initial",R,Se,xe]}],delay:[{delay:[He,Se,xe]}],animate:[{animate:["none",O,Se,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,Se,xe]}],"perspective-origin":[{"perspective-origin":le()}],rotate:[{rotate:Me()}],"rotate-x":[{"rotate-x":Me()}],"rotate-y":[{"rotate-y":Me()}],"rotate-z":[{"rotate-z":Me()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:Pe()}],"skew-x":[{"skew-x":Pe()}],"skew-y":[{"skew-y":Pe()}],transform:[{transform:[Se,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:le()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ge()}],"translate-x":[{"translate-x":Ge()}],"translate-y":[{"translate-y":Ge()}],"translate-z":[{"translate-z":Ge()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Se,xe]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mbs":[{"scroll-mbs":N()}],"scroll-mbe":[{"scroll-mbe":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pbs":[{"scroll-pbs":N()}],"scroll-pbe":[{"scroll-pbe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Se,xe]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[He,Go,Hl,ky]}],stroke:[{stroke:["none",...L()]}],"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"]}},OT=cT(NT);function Ze(...n){return OT(Ev(n))}const zT=[{id:"html",label:"Single HTML",desc:"Package as one shareable offline page, with built-in presenter view",icon:lE},{id:"pdf",label:"PDF",desc:"Export as a printable PDF document",icon:gv},{id:"pptx",label:"PPTX",desc:"Export as a PowerPoint file",icon:ME,soon:!0},{id:"gslides",label:"Google Slides",desc:"Sync to Google Slides",icon:K2,soon:!0}];function DT({title:n,onTitleChange:l,onPresent:o,onExportPdf:i,onExportHtml:c,pdfSlides:f=[],pdfThumbnails:d={},isSaving:m}){const[h,g]=b.useState(!1),[x,p]=b.useState(!1),[S,E]=b.useState(0),T=b.useRef(null),C=n||"Untitled presentation";b.useEffect(()=>{const O=D=>{T.current&&!T.current.contains(D.target)&&g(!1)};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[]);const A=b.useCallback(O=>{if(!O)return;const D=O.getBoundingClientRect().width;E(Math.ceil(D))},[]),R=O=>{if(g(!1),O.soon){sl(`${O.label} is not available yet.`,{description:"We are still building this export option."});return}if(O.id==="pdf"){p(!0);return}if(O.id==="html"){c==null||c();return}sl(`Exporting as ${O.label}...`)};return v.jsxs("header",{className:"px-6 h-14 flex items-center justify-between bg-white border-b border-foreground/[0.06]",children:[v.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[v.jsx("div",{className:"w-8 h-8 rounded-lg bg-foreground flex items-center justify-center shrink-0",children:v.jsx("span",{className:"text-background font-bold text-sm font-display",children:"P"})}),v.jsx("div",{className:"w-px h-5 bg-foreground/10"}),v.jsxs("div",{className:"relative min-w-0 flex-1",children:[v.jsx("input",{value:n,onChange:O=>l==null?void 0:l(O.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"}),v.jsx("span",{ref:A,"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:C},C)]}),m?v.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]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs("div",{className:"relative",ref:T,children:[v.jsxs("button",{type:"button",onClick:()=>g(O=>!O),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:[v.jsx(J2,{className:"w-3.5 h-3.5"}),v.jsx("span",{children:"Export"}),v.jsx(Zo,{className:Ze("w-3 h-3 transition-transform",h&&"rotate-180")})]}),h&&v.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:[v.jsx("div",{className:"text-[10px] uppercase tracking-wider text-foreground/40 px-2.5 py-1.5 font-medium",children:"Export formats"}),zT.map(O=>{const D=O.icon;return v.jsxs("button",{type:"button",onClick:()=>R(O),className:Ze("w-full text-left px-2.5 py-2 rounded-md flex items-start gap-2.5 transition-colors",O.soon?"opacity-50 cursor-not-allowed":"hover:bg-foreground/[0.04] cursor-pointer"),children:[v.jsx("div",{className:"w-7 h-7 rounded-md bg-foreground/[0.04] flex items-center justify-center shrink-0 mt-0.5",children:v.jsx(D,{className:"w-3.5 h-3.5 text-foreground/70"})}),v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"text-[13px] font-medium text-foreground",children:O.label}),O.soon&&v.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-foreground/[0.06] text-foreground/50 uppercase tracking-wider",children:"Soon"})]}),v.jsx("div",{className:"text-[11px] text-foreground/50 mt-0.5 leading-snug",children:O.desc})]}),!O.soon&&v.jsx(mv,{className:"w-3 h-3 text-foreground/0 mt-2"})]},O.id)})]})]}),v.jsxs("button",{type:"button",onClick:o,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:[v.jsx(EE,{className:"w-3.5 h-3.5"}),v.jsx("span",{children:"Present"})]})]}),x?v.jsx(jT,{slides:f,thumbnails:d,onClose:()=>p(!1),onExport:O=>{p(!1),i==null||i(O)}}):null]})}function jT({slides:n,thumbnails:l,onClose:o,onExport:i}){const c=n.filter(T=>T.file),[f,d]=b.useState("all"),[m,h]=b.useState([]),g=new Set(m),x=m.length,p=f==="all"||f==="selected"&&x>0;b.useEffect(()=>{const T=C=>{C.key==="Escape"&&o()};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[o]);const S=(T,C)=>{h(A=>C?A.includes(T)?A:[...A,T]:A.filter(R=>R!==T))},E=()=>{if(f==="selected"){m.length>0&&i({mode:"slides",slideFiles:m});return}i({mode:"all"})};return v.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-foreground/20 px-4",onMouseDown:T=>{T.target===T.currentTarget&&o()},children:v.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:[v.jsxs("div",{className:"flex items-center justify-between border-b border-foreground/[0.08] px-4 py-3",children:[v.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:v.jsx(gv,{className:"h-4 w-4 text-foreground/70"})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{id:"pdf-export-title",className:"text-[14px] font-semibold text-foreground",children:"Export PDF"}),v.jsx("p",{className:"mt-0.5 text-[11px] text-foreground/50",children:"Choose which slides to include."})]})]}),v.jsx("button",{type:"button","aria-label":"Close PDF export dialog",onClick:o,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:v.jsx(Sv,{className:"h-4 w-4"})})]}),v.jsxs("div",{className:"min-h-0 flex-1 overflow-auto px-4 py-4",children:[v.jsxs("fieldset",{className:"space-y-2",children:[v.jsx("legend",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-foreground/45",children:"PDF range"}),v.jsx(By,{checked:f==="all",icon:yv,label:"All slides",detail:`${c.length} slides`,onChange:()=>d("all")}),v.jsx(By,{checked:f==="selected",icon:nE,label:"Selected slides",detail:x===1?"1 slide selected":`${x} slides selected`,onChange:()=>d("selected")})]}),f==="selected"?v.jsxs("div",{className:"mt-4 rounded-md border border-foreground/[0.08]",children:[v.jsx("div",{className:"border-b border-foreground/[0.08] px-3 py-2 text-[11px] font-medium text-foreground/55",children:"Slides"}),v.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:c.map((T,C)=>{const A=T.file;return A?v.jsxs("label",{"data-testid":"pdf-slide-option",className:Ze("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(A)&&"border-foreground/35 bg-foreground/[0.035]"),children:[v.jsx("div",{className:"relative aspect-[16/9] overflow-hidden rounded border border-foreground/[0.08] bg-white",children:l[T.id]?v.jsx("img",{alt:`Slide ${C+1} thumbnail`,className:"absolute inset-0 block size-full object-cover",src:l[T.id]}):v.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/25",children:["Slide ",C+1]})}),v.jsx("div",{className:"flex min-w-0 flex-col justify-between gap-2",children:v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsx("input",{type:"checkbox","aria-label":`Select slide ${C+1}`,checked:g.has(A),onChange:R=>S(A,R.target.checked),className:"mt-0.5 h-3.5 w-3.5 shrink-0 accent-foreground"}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("div",{className:"font-mono text-[11px] text-foreground/45",children:C+1}),v.jsx("div",{className:"mt-0.5 line-clamp-2 text-[12px] font-medium leading-snug text-foreground/75",children:T.title})]})]})})]},T.id):null})})]}):null]}),v.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-foreground/[0.08] px-4 py-3",children:[v.jsx("button",{type:"button",onClick:o,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"}),v.jsx("button",{type:"button",onClick:E,disabled:!p,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 By({checked:n,disabled:l,icon:o,label:i,detail:c,onChange:f}){return v.jsxs("label",{className:Ze("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]",l?"cursor-not-allowed opacity-45":"hover:border-foreground/20 hover:bg-foreground/[0.03]"),children:[v.jsx("input",{type:"radio",name:"pdf-export-scope",checked:n,disabled:l,onChange:f,className:"h-3.5 w-3.5 accent-foreground"}),v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:v.jsx(o,{className:"h-4 w-4 text-foreground/65"})}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("div",{className:"text-[13px] font-medium text-foreground",children:i}),v.jsx("div",{className:"mt-0.5 truncate text-[11px] text-foreground/50",children:c})]})]})}const Uy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Iy=Ev,kT=(n,l)=>o=>{var i;if((l==null?void 0:l.variants)==null)return Iy(n,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:c,defaultVariants:f}=l,d=Object.keys(c).map(g=>{const x=o==null?void 0:o[g],p=f==null?void 0:f[g];if(x===null)return null;const S=Uy(x)||Uy(p);return c[g][S]}),m=o&&Object.entries(o).reduce((g,x)=>{let[p,S]=x;return S===void 0||(g[p]=S),g},{}),h=l==null||(i=l.compoundVariants)===null||i===void 0?void 0:i.reduce((g,x)=>{let{class:p,className:S,...E}=x;return Object.entries(E).every(T=>{let[C,A]=T;return Array.isArray(A)?A.includes({...f,...m}[C]):{...f,...m}[C]===A})?[...g,p,S]:g},[]);return Iy(n,d,h,o==null?void 0:o.class,o==null?void 0:o.className)};function Gy(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function Vd(...n){return l=>{let o=!1;const i=n.map(c=>{const f=Gy(c,l);return!o&&typeof f=="function"&&(o=!0),f});if(o)return()=>{for(let c=0;c<i.length;c++){const f=i[c];typeof f=="function"?f():Gy(n[c],null)}}}}function ft(...n){return b.useCallback(Vd(...n),n)}function Ur(n){const l=HT(n),o=b.forwardRef((i,c)=>{const{children:f,...d}=i,m=b.Children.toArray(f),h=m.find(UT);if(h){const g=h.props.children,x=m.map(p=>p===h?b.Children.count(g)>1?b.Children.only(null):b.isValidElement(g)?g.props.children:null:p);return v.jsx(l,{...d,ref:c,children:b.isValidElement(g)?b.cloneElement(g,void 0,x):null})}return v.jsx(l,{...d,ref:c,children:f})});return o.displayName=`${n}.Slot`,o}var LT=Ur("Slot");function HT(n){const l=b.forwardRef((o,i)=>{const{children:c,...f}=o;if(b.isValidElement(c)){const d=GT(c),m=IT(f,c.props);return c.type!==b.Fragment&&(m.ref=i?Vd(i,d):d),b.cloneElement(c,m)}return b.Children.count(c)>1?b.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var Bv=Symbol("radix.slottable");function BT(n){const l=({children:o})=>v.jsx(v.Fragment,{children:o});return l.displayName=`${n}.Slottable`,l.__radixId=Bv,l}function UT(n){return b.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Bv}function IT(n,l){const o={...l};for(const i in l){const c=n[i],f=l[i];/^on[A-Z]/.test(i)?c&&f?o[i]=(...m)=>{const h=f(...m);return c(...m),h}:c&&(o[i]=c):i==="style"?o[i]={...c,...f}:i==="className"&&(o[i]=[c,f].filter(Boolean).join(" "))}return{...n,...o}}function GT(n){var i,c;let l=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var YT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=YT.reduce((n,l)=>{const o=Ur(`Primitive.${l}`),i=b.forwardRef((c,f)=>{const{asChild:d,...m}=c,h=d?o:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(h,{...m,ref:f})});return i.displayName=`Primitive.${l}`,{...n,[l]:i}},{});function Uv(n,l){n&&Qo.flushSync(()=>n.dispatchEvent(l))}var Iv=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"}),VT="VisuallyHidden",Gv=b.forwardRef((n,l)=>v.jsx(We.span,{...n,ref:l,style:{...Iv,...n.style}}));Gv.displayName=VT;var qT=Gv;function $l(n,l=[]){let o=[];function i(f,d){const m=b.createContext(d),h=o.length;o=[...o,d];const g=p=>{var R;const{scope:S,children:E,...T}=p,C=((R=S==null?void 0:S[n])==null?void 0:R[h])||m,A=b.useMemo(()=>T,Object.values(T));return v.jsx(C.Provider,{value:A,children:E})};g.displayName=f+"Provider";function x(p,S){var C;const E=((C=S==null?void 0:S[n])==null?void 0:C[h])||m,T=b.useContext(E);if(T)return T;if(d!==void 0)return d;throw new Error(`\`${p}\` must be used within \`${f}\``)}return[g,x]}const c=()=>{const f=o.map(d=>b.createContext(d));return function(m){const h=(m==null?void 0:m[n])||f;return b.useMemo(()=>({[`__scope${n}`]:{...m,[n]:h}}),[m,h])}};return c.scopeName=n,[i,PT(c,...l)]}function PT(...n){const l=n[0];if(n.length===1)return l;const o=()=>{const i=n.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(f){const d=i.reduce((m,{useScope:h,scopeName:g})=>{const p=h(f)[`__scope${g}`];return{...m,...p}},{});return b.useMemo(()=>({[`__scope${l.scopeName}`]:d}),[d])}};return o.scopeName=l.scopeName,o}function qd(n){const l=n+"CollectionProvider",[o,i]=$l(l),[c,f]=o(l,{collectionRef:{current:null},itemMap:new Map}),d=C=>{const{scope:A,children:R}=C,O=pe.useRef(null),D=pe.useRef(new Map).current;return v.jsx(c,{scope:A,itemMap:D,collectionRef:O,children:R})};d.displayName=l;const m=n+"CollectionSlot",h=Ur(m),g=pe.forwardRef((C,A)=>{const{scope:R,children:O}=C,D=f(m,R),X=ft(A,D.collectionRef);return v.jsx(h,{ref:X,children:O})});g.displayName=m;const x=n+"CollectionItemSlot",p="data-radix-collection-item",S=Ur(x),E=pe.forwardRef((C,A)=>{const{scope:R,children:O,...D}=C,X=pe.useRef(null),le=ft(A,X),V=f(x,R);return pe.useEffect(()=>(V.itemMap.set(X,{ref:X,...D}),()=>void V.itemMap.delete(X))),v.jsx(S,{[p]:"",ref:le,children:O})});E.displayName=x;function T(C){const A=f(n+"CollectionConsumer",C);return pe.useCallback(()=>{const O=A.collectionRef.current;if(!O)return[];const D=Array.from(O.querySelectorAll(`[${p}]`));return Array.from(A.itemMap.values()).sort((V,U)=>D.indexOf(V.ref.current)-D.indexOf(U.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:d,Slot:g,ItemSlot:E},T,i]}function Te(n,l,{checkForDefaultPrevented:o=!0}={}){return function(c){if(n==null||n(c),o===!1||!c.defaultPrevented)return l==null?void 0:l(c)}}var Xt=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},XT=P0[" useInsertionEffect ".trim().toString()]||Xt;function qs({prop:n,defaultProp:l,onChange:o=()=>{},caller:i}){const[c,f,d]=$T({defaultProp:l,onChange:o}),m=n!==void 0,h=m?n:c;{const x=b.useRef(n!==void 0);b.useEffect(()=>{const p=x.current;p!==m&&console.warn(`${i} is changing from ${p?"controlled":"uncontrolled"} to ${m?"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=m},[m,i])}const g=b.useCallback(x=>{var p;if(m){const S=KT(x)?x(n):x;S!==n&&((p=d.current)==null||p.call(d,S))}else f(x)},[m,n,f,d]);return[h,g]}function $T({defaultProp:n,onChange:l}){const[o,i]=b.useState(n),c=b.useRef(o),f=b.useRef(l);return XT(()=>{f.current=l},[l]),b.useEffect(()=>{var d;c.current!==o&&((d=f.current)==null||d.call(f,o),c.current=o)},[o,c]),[o,i,f]}function KT(n){return typeof n=="function"}function FT(n,l){return b.useReducer((o,i)=>l[o][i]??o,n)}var qr=n=>{const{present:l,children:o}=n,i=QT(l),c=typeof o=="function"?o({present:i.isPresent}):b.Children.only(o),f=ft(i.ref,ZT(c));return typeof o=="function"||i.isPresent?b.cloneElement(c,{ref:f}):null};qr.displayName="Presence";function QT(n){const[l,o]=b.useState(),i=b.useRef(null),c=b.useRef(n),f=b.useRef("none"),d=n?"mounted":"unmounted",[m,h]=FT(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const g=Ss(i.current);f.current=m==="mounted"?g:"none"},[m]),Xt(()=>{const g=i.current,x=c.current;if(x!==n){const S=f.current,E=Ss(g);n?h("MOUNT"):E==="none"||(g==null?void 0:g.display)==="none"?h("UNMOUNT"):h(x&&S!==E?"ANIMATION_OUT":"UNMOUNT"),c.current=n}},[n,h]),Xt(()=>{if(l){let g;const x=l.ownerDocument.defaultView??window,p=E=>{const C=Ss(i.current).includes(CSS.escape(E.animationName));if(E.target===l&&C&&(h("ANIMATION_END"),!c.current)){const A=l.style.animationFillMode;l.style.animationFillMode="forwards",g=x.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=A)})}},S=E=>{E.target===l&&(f.current=Ss(i.current))};return l.addEventListener("animationstart",S),l.addEventListener("animationcancel",p),l.addEventListener("animationend",p),()=>{x.clearTimeout(g),l.removeEventListener("animationstart",S),l.removeEventListener("animationcancel",p),l.removeEventListener("animationend",p)}}else h("ANIMATION_END")},[l,h]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:b.useCallback(g=>{i.current=g?getComputedStyle(g):null,o(g)},[])}}function Ss(n){return(n==null?void 0:n.animationName)||"none"}function ZT(n){var i,c;let l=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var JT=P0[" useId ".trim().toString()]||(()=>{}),WT=0;function Ir(n){const[l,o]=b.useState(JT());return Xt(()=>{o(i=>i??String(WT++))},[n]),n||(l?`radix-${l}`:"")}var eC=b.createContext(void 0);function Pd(n){const l=b.useContext(eC);return n||l||"ltr"}function jn(n){const l=b.useRef(n);return b.useEffect(()=>{l.current=n}),b.useMemo(()=>(...o)=>{var i;return(i=l.current)==null?void 0:i.call(l,...o)},[])}function tC(n,l=globalThis==null?void 0:globalThis.document){const o=jn(n);b.useEffect(()=>{const i=c=>{c.key==="Escape"&&o(c)};return l.addEventListener("keydown",i,{capture:!0}),()=>l.removeEventListener("keydown",i,{capture:!0})},[o,l])}var nC="DismissableLayer",md="dismissableLayer.update",aC="dismissableLayer.pointerDownOutside",lC="dismissableLayer.focusOutside",Yy,Yv=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ac=b.forwardRef((n,l)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:d,onDismiss:m,...h}=n,g=b.useContext(Yv),[x,p]=b.useState(null),S=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,E]=b.useState({}),T=ft(l,U=>p(U)),C=Array.from(g.layers),[A]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),R=C.indexOf(A),O=x?C.indexOf(x):-1,D=g.layersWithOutsidePointerEventsDisabled.size>0,X=O>=R,le=iC(U=>{const N=U.target,Q=[...g.branches].some(ne=>ne.contains(N));!X||Q||(c==null||c(U),d==null||d(U),U.defaultPrevented||m==null||m())},S),V=sC(U=>{const N=U.target;[...g.branches].some(ne=>ne.contains(N))||(f==null||f(U),d==null||d(U),U.defaultPrevented||m==null||m())},S);return tC(U=>{O===g.layers.size-1&&(i==null||i(U),!U.defaultPrevented&&m&&(U.preventDefault(),m()))},S),b.useEffect(()=>{if(x)return o&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Yy=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(x)),g.layers.add(x),Vy(),()=>{o&&g.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=Yy)}},[x,S,o,g]),b.useEffect(()=>()=>{x&&(g.layers.delete(x),g.layersWithOutsidePointerEventsDisabled.delete(x),Vy())},[x,g]),b.useEffect(()=>{const U=()=>E({});return document.addEventListener(md,U),()=>document.removeEventListener(md,U)},[]),v.jsx(We.div,{...h,ref:T,style:{pointerEvents:D?X?"auto":"none":void 0,...n.style},onFocusCapture:Te(n.onFocusCapture,V.onFocusCapture),onBlurCapture:Te(n.onBlurCapture,V.onBlurCapture),onPointerDownCapture:Te(n.onPointerDownCapture,le.onPointerDownCapture)})});ac.displayName=nC;var rC="DismissableLayerBranch",oC=b.forwardRef((n,l)=>{const o=b.useContext(Yv),i=b.useRef(null),c=ft(l,i);return b.useEffect(()=>{const f=i.current;if(f)return o.branches.add(f),()=>{o.branches.delete(f)}},[o.branches]),v.jsx(We.div,{...n,ref:c})});oC.displayName=rC;function iC(n,l=globalThis==null?void 0:globalThis.document){const o=jn(n),i=b.useRef(!1),c=b.useRef(()=>{});return b.useEffect(()=>{const f=m=>{if(m.target&&!i.current){let h=function(){Vv(aC,o,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(l.removeEventListener("click",c.current),c.current=h,l.addEventListener("click",c.current,{once:!0})):h()}else l.removeEventListener("click",c.current);i.current=!1},d=window.setTimeout(()=>{l.addEventListener("pointerdown",f)},0);return()=>{window.clearTimeout(d),l.removeEventListener("pointerdown",f),l.removeEventListener("click",c.current)}},[l,o]),{onPointerDownCapture:()=>i.current=!0}}function sC(n,l=globalThis==null?void 0:globalThis.document){const o=jn(n),i=b.useRef(!1);return b.useEffect(()=>{const c=f=>{f.target&&!i.current&&Vv(lC,o,{originalEvent:f},{discrete:!1})};return l.addEventListener("focusin",c),()=>l.removeEventListener("focusin",c)},[l,o]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function Vy(){const n=new CustomEvent(md);document.dispatchEvent(n)}function Vv(n,l,o,{discrete:i}){const c=o.originalEvent.target,f=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});l&&c.addEventListener(n,l,{once:!0}),i?Uv(c,f):c.dispatchEvent(f)}var Hf="focusScope.autoFocusOnMount",Bf="focusScope.autoFocusOnUnmount",qy={bubbles:!1,cancelable:!0},cC="FocusScope",Xd=b.forwardRef((n,l)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:c,onUnmountAutoFocus:f,...d}=n,[m,h]=b.useState(null),g=jn(c),x=jn(f),p=b.useRef(null),S=ft(l,C=>h(C)),E=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(i){let C=function(D){if(E.paused||!m)return;const X=D.target;m.contains(X)?p.current=X:il(p.current,{select:!0})},A=function(D){if(E.paused||!m)return;const X=D.relatedTarget;X!==null&&(m.contains(X)||il(p.current,{select:!0}))},R=function(D){if(document.activeElement===document.body)for(const le of D)le.removedNodes.length>0&&il(m)};document.addEventListener("focusin",C),document.addEventListener("focusout",A);const O=new MutationObserver(R);return m&&O.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",A),O.disconnect()}}},[i,m,E.paused]),b.useEffect(()=>{if(m){Xy.add(E);const C=document.activeElement;if(!m.contains(C)){const R=new CustomEvent(Hf,qy);m.addEventListener(Hf,g),m.dispatchEvent(R),R.defaultPrevented||(uC(pC(qv(m)),{select:!0}),document.activeElement===C&&il(m))}return()=>{m.removeEventListener(Hf,g),setTimeout(()=>{const R=new CustomEvent(Bf,qy);m.addEventListener(Bf,x),m.dispatchEvent(R),R.defaultPrevented||il(C??document.body,{select:!0}),m.removeEventListener(Bf,x),Xy.remove(E)},0)}}},[m,g,x,E]);const T=b.useCallback(C=>{if(!o&&!i||E.paused)return;const A=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,R=document.activeElement;if(A&&R){const O=C.currentTarget,[D,X]=fC(O);D&&X?!C.shiftKey&&R===X?(C.preventDefault(),o&&il(D,{select:!0})):C.shiftKey&&R===D&&(C.preventDefault(),o&&il(X,{select:!0})):R===O&&C.preventDefault()}},[o,i,E.paused]);return v.jsx(We.div,{tabIndex:-1,...d,ref:S,onKeyDown:T})});Xd.displayName=cC;function uC(n,{select:l=!1}={}){const o=document.activeElement;for(const i of n)if(il(i,{select:l}),document.activeElement!==o)return}function fC(n){const l=qv(n),o=Py(l,n),i=Py(l.reverse(),n);return[o,i]}function qv(n){const l=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const c=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||c?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)l.push(o.currentNode);return l}function Py(n,l){for(const o of n)if(!dC(o,{upTo:l}))return o}function dC(n,{upTo:l}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(l!==void 0&&n===l)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function mC(n){return n instanceof HTMLInputElement&&"select"in n}function il(n,{select:l=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&mC(n)&&l&&n.select()}}var Xy=hC();function hC(){let n=[];return{add(l){const o=n[0];l!==o&&(o==null||o.pause()),n=$y(n,l),n.unshift(l)},remove(l){var o;n=$y(n,l),(o=n[0])==null||o.resume()}}}function $y(n,l){const o=[...n],i=o.indexOf(l);return i!==-1&&o.splice(i,1),o}function pC(n){return n.filter(l=>l.tagName!=="A")}var gC="Portal",$d=b.forwardRef((n,l)=>{var m;const{container:o,...i}=n,[c,f]=b.useState(!1);Xt(()=>f(!0),[]);const d=o||c&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return d?$0.createPortal(v.jsx(We.div,{...i,ref:l}),d):null});$d.displayName=gC;var Uf=0;function Pv(){b.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Ky()),document.body.insertAdjacentElement("beforeend",n[1]??Ky()),Uf++,()=>{Uf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(l=>l.remove()),Uf--}},[])}function Ky(){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 Wn=function(){return Wn=Object.assign||function(l){for(var o,i=1,c=arguments.length;i<c;i++){o=arguments[i];for(var f in o)Object.prototype.hasOwnProperty.call(o,f)&&(l[f]=o[f])}return l},Wn.apply(this,arguments)};function Xv(n,l){var o={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&l.indexOf(i)<0&&(o[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,i=Object.getOwnPropertySymbols(n);c<i.length;c++)l.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(n,i[c])&&(o[i[c]]=n[i[c]]);return o}function yC(n,l,o){if(o||arguments.length===2)for(var i=0,c=l.length,f;i<c;i++)(f||!(i in l))&&(f||(f=Array.prototype.slice.call(l,0,i)),f[i]=l[i]);return n.concat(f||Array.prototype.slice.call(l))}var js="right-scroll-bar-position",ks="width-before-scroll-bar",vC="with-scroll-bars-hidden",bC="--removed-body-scroll-bar-size";function If(n,l){return typeof n=="function"?n(l):n&&(n.current=l),n}function xC(n,l){var o=b.useState(function(){return{value:n,callback:l,facade:{get current(){return o.value},set current(i){var c=o.value;c!==i&&(o.value=i,o.callback(i,c))}}}})[0];return o.callback=l,o.facade}var SC=typeof window<"u"?b.useLayoutEffect:b.useEffect,Fy=new WeakMap;function wC(n,l){var o=xC(null,function(i){return n.forEach(function(c){return If(c,i)})});return SC(function(){var i=Fy.get(o);if(i){var c=new Set(i),f=new Set(n),d=o.current;c.forEach(function(m){f.has(m)||If(m,null)}),f.forEach(function(m){c.has(m)||If(m,d)})}Fy.set(o,n)},[n]),o}function EC(n){return n}function TC(n,l){l===void 0&&(l=EC);var o=[],i=!1,c={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:n},useMedium:function(f){var d=l(f,i);return o.push(d),function(){o=o.filter(function(m){return m!==d})}},assignSyncMedium:function(f){for(i=!0;o.length;){var d=o;o=[],d.forEach(f)}o={push:function(m){return f(m)},filter:function(){return o}}},assignMedium:function(f){i=!0;var d=[];if(o.length){var m=o;o=[],m.forEach(f),d=o}var h=function(){var x=d;d=[],x.forEach(f)},g=function(){return Promise.resolve().then(h)};g(),o={push:function(x){d.push(x),g()},filter:function(x){return d=d.filter(x),o}}}};return c}function CC(n){n===void 0&&(n={});var l=TC(null);return l.options=Wn({async:!0,ssr:!1},n),l}var $v=function(n){var l=n.sideCar,o=Xv(n,["sideCar"]);if(!l)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=l.read();if(!i)throw new Error("Sidecar medium not found");return b.createElement(i,Wn({},o))};$v.isSideCarExport=!0;function MC(n,l){return n.useMedium(l),$v}var Kv=CC(),Gf=function(){},lc=b.forwardRef(function(n,l){var o=b.useRef(null),i=b.useState({onScrollCapture:Gf,onWheelCapture:Gf,onTouchMoveCapture:Gf}),c=i[0],f=i[1],d=n.forwardProps,m=n.children,h=n.className,g=n.removeScrollBar,x=n.enabled,p=n.shards,S=n.sideCar,E=n.noRelative,T=n.noIsolation,C=n.inert,A=n.allowPinchZoom,R=n.as,O=R===void 0?"div":R,D=n.gapMode,X=Xv(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),le=S,V=wC([o,l]),U=Wn(Wn({},X),c);return b.createElement(b.Fragment,null,x&&b.createElement(le,{sideCar:Kv,removeScrollBar:g,shards:p,noRelative:E,noIsolation:T,inert:C,setCallbacks:f,allowPinchZoom:!!A,lockRef:o,gapMode:D}),d?b.cloneElement(b.Children.only(m),Wn(Wn({},U),{ref:V})):b.createElement(O,Wn({},U,{className:h,ref:V}),m))});lc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lc.classNames={fullWidth:ks,zeroRight:js};var AC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _C(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var l=AC();return l&&n.setAttribute("nonce",l),n}function RC(n,l){n.styleSheet?n.styleSheet.cssText=l:n.appendChild(document.createTextNode(l))}function NC(n){var l=document.head||document.getElementsByTagName("head")[0];l.appendChild(n)}var OC=function(){var n=0,l=null;return{add:function(o){n==0&&(l=_C())&&(RC(l,o),NC(l)),n++},remove:function(){n--,!n&&l&&(l.parentNode&&l.parentNode.removeChild(l),l=null)}}},zC=function(){var n=OC();return function(l,o){b.useEffect(function(){return n.add(l),function(){n.remove()}},[l&&o])}},Fv=function(){var n=zC(),l=function(o){var i=o.styles,c=o.dynamic;return n(i,c),null};return l},DC={left:0,top:0,right:0,gap:0},Yf=function(n){return parseInt(n||"",10)||0},jC=function(n){var l=window.getComputedStyle(document.body),o=l[n==="padding"?"paddingLeft":"marginLeft"],i=l[n==="padding"?"paddingTop":"marginTop"],c=l[n==="padding"?"paddingRight":"marginRight"];return[Yf(o),Yf(i),Yf(c)]},kC=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return DC;var l=jC(n),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,i-o+l[2]-l[0])}},LC=Fv(),Hr="data-scroll-locked",HC=function(n,l,o,i){var c=n.left,f=n.top,d=n.right,m=n.gap;return o===void 0&&(o="margin"),`
|
|
341
|
+
.`.concat(vC,` {
|
|
342
|
+
overflow: hidden `).concat(i,`;
|
|
343
|
+
padding-right: `).concat(m,"px ").concat(i,`;
|
|
344
|
+
}
|
|
345
|
+
body[`).concat(Hr,`] {
|
|
346
|
+
overflow: hidden `).concat(i,`;
|
|
347
|
+
overscroll-behavior: contain;
|
|
348
|
+
`).concat([l&&"position: relative ".concat(i,";"),o==="margin"&&`
|
|
349
|
+
padding-left: `.concat(c,`px;
|
|
350
|
+
padding-top: `).concat(f,`px;
|
|
351
|
+
padding-right: `).concat(d,`px;
|
|
352
|
+
margin-left:0;
|
|
353
|
+
margin-top:0;
|
|
354
|
+
margin-right: `).concat(m,"px ").concat(i,`;
|
|
355
|
+
`),o==="padding"&&"padding-right: ".concat(m,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.`).concat(js,` {
|
|
359
|
+
right: `).concat(m,"px ").concat(i,`;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.`).concat(ks,` {
|
|
363
|
+
margin-right: `).concat(m,"px ").concat(i,`;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.`).concat(js," .").concat(js,` {
|
|
367
|
+
right: 0 `).concat(i,`;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.`).concat(ks," .").concat(ks,` {
|
|
371
|
+
margin-right: 0 `).concat(i,`;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
body[`).concat(Hr,`] {
|
|
375
|
+
`).concat(bC,": ").concat(m,`px;
|
|
376
|
+
}
|
|
377
|
+
`)},Qy=function(){var n=parseInt(document.body.getAttribute(Hr)||"0",10);return isFinite(n)?n:0},BC=function(){b.useEffect(function(){return document.body.setAttribute(Hr,(Qy()+1).toString()),function(){var n=Qy()-1;n<=0?document.body.removeAttribute(Hr):document.body.setAttribute(Hr,n.toString())}},[])},UC=function(n){var l=n.noRelative,o=n.noImportant,i=n.gapMode,c=i===void 0?"margin":i;BC();var f=b.useMemo(function(){return kC(c)},[c]);return b.createElement(LC,{styles:HC(f,!l,c,o?"":"!important")})},hd=!1;if(typeof window<"u")try{var ws=Object.defineProperty({},"passive",{get:function(){return hd=!0,!0}});window.addEventListener("test",ws,ws),window.removeEventListener("test",ws,ws)}catch{hd=!1}var Nr=hd?{passive:!1}:!1,IC=function(n){return n.tagName==="TEXTAREA"},Qv=function(n,l){if(!(n instanceof Element))return!1;var o=window.getComputedStyle(n);return o[l]!=="hidden"&&!(o.overflowY===o.overflowX&&!IC(n)&&o[l]==="visible")},GC=function(n){return Qv(n,"overflowY")},YC=function(n){return Qv(n,"overflowX")},Zy=function(n,l){var o=l.ownerDocument,i=l;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var c=Zv(n,i);if(c){var f=Jv(n,i),d=f[1],m=f[2];if(d>m)return!0}i=i.parentNode}while(i&&i!==o.body);return!1},VC=function(n){var l=n.scrollTop,o=n.scrollHeight,i=n.clientHeight;return[l,o,i]},qC=function(n){var l=n.scrollLeft,o=n.scrollWidth,i=n.clientWidth;return[l,o,i]},Zv=function(n,l){return n==="v"?GC(l):YC(l)},Jv=function(n,l){return n==="v"?VC(l):qC(l)},PC=function(n,l){return n==="h"&&l==="rtl"?-1:1},XC=function(n,l,o,i,c){var f=PC(n,window.getComputedStyle(l).direction),d=f*i,m=o.target,h=l.contains(m),g=!1,x=d>0,p=0,S=0;do{if(!m)break;var E=Jv(n,m),T=E[0],C=E[1],A=E[2],R=C-A-f*T;(T||R)&&Zv(n,m)&&(p+=R,S+=T);var O=m.parentNode;m=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!h&&m!==document.body||h&&(l.contains(m)||l===m));return(x&&Math.abs(p)<1||!x&&Math.abs(S)<1)&&(g=!0),g},Es=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Jy=function(n){return[n.deltaX,n.deltaY]},Wy=function(n){return n&&"current"in n?n.current:n},$C=function(n,l){return n[0]===l[0]&&n[1]===l[1]},KC=function(n){return`
|
|
378
|
+
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
379
|
+
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
380
|
+
`)},FC=0,Or=[];function QC(n){var l=b.useRef([]),o=b.useRef([0,0]),i=b.useRef(),c=b.useState(FC++)[0],f=b.useState(Fv)[0],d=b.useRef(n);b.useEffect(function(){d.current=n},[n]),b.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(c));var C=yC([n.lockRef.current],(n.shards||[]).map(Wy),!0).filter(Boolean);return C.forEach(function(A){return A.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),C.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(c))})}}},[n.inert,n.lockRef.current,n.shards]);var m=b.useCallback(function(C,A){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!d.current.allowPinchZoom;var R=Es(C),O=o.current,D="deltaX"in C?C.deltaX:O[0]-R[0],X="deltaY"in C?C.deltaY:O[1]-R[1],le,V=C.target,U=Math.abs(D)>Math.abs(X)?"h":"v";if("touches"in C&&U==="h"&&V.type==="range")return!1;var N=window.getSelection(),Q=N&&N.anchorNode,ne=Q?Q===V||Q.contains(V):!1;if(ne)return!1;var fe=Zy(U,V);if(!fe)return!0;if(fe?le=U:(le=U==="v"?"h":"v",fe=Zy(U,V)),!fe)return!1;if(!i.current&&"changedTouches"in C&&(D||X)&&(i.current=le),!le)return!0;var B=i.current||le;return XC(B,A,C,B==="h"?D:X)},[]),h=b.useCallback(function(C){var A=C;if(!(!Or.length||Or[Or.length-1]!==f)){var R="deltaY"in A?Jy(A):Es(A),O=l.current.filter(function(le){return le.name===A.type&&(le.target===A.target||A.target===le.shadowParent)&&$C(le.delta,R)})[0];if(O&&O.should){A.cancelable&&A.preventDefault();return}if(!O){var D=(d.current.shards||[]).map(Wy).filter(Boolean).filter(function(le){return le.contains(A.target)}),X=D.length>0?m(A,D[0]):!d.current.noIsolation;X&&A.cancelable&&A.preventDefault()}}},[]),g=b.useCallback(function(C,A,R,O){var D={name:C,delta:A,target:R,should:O,shadowParent:ZC(R)};l.current.push(D),setTimeout(function(){l.current=l.current.filter(function(X){return X!==D})},1)},[]),x=b.useCallback(function(C){o.current=Es(C),i.current=void 0},[]),p=b.useCallback(function(C){g(C.type,Jy(C),C.target,m(C,n.lockRef.current))},[]),S=b.useCallback(function(C){g(C.type,Es(C),C.target,m(C,n.lockRef.current))},[]);b.useEffect(function(){return Or.push(f),n.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:S}),document.addEventListener("wheel",h,Nr),document.addEventListener("touchmove",h,Nr),document.addEventListener("touchstart",x,Nr),function(){Or=Or.filter(function(C){return C!==f}),document.removeEventListener("wheel",h,Nr),document.removeEventListener("touchmove",h,Nr),document.removeEventListener("touchstart",x,Nr)}},[]);var E=n.removeScrollBar,T=n.inert;return b.createElement(b.Fragment,null,T?b.createElement(f,{styles:KC(c)}):null,E?b.createElement(UC,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function ZC(n){for(var l=null;n!==null;)n instanceof ShadowRoot&&(l=n.host,n=n.host),n=n.parentNode;return l}const JC=MC(Kv,QC);var Kd=b.forwardRef(function(n,l){return b.createElement(lc,Wn({},n,{ref:l,sideCar:JC}))});Kd.classNames=lc.classNames;var WC=function(n){if(typeof document>"u")return null;var l=Array.isArray(n)?n[0]:n;return l.ownerDocument.body},zr=new WeakMap,Ts=new WeakMap,Cs={},Vf=0,Wv=function(n){return n&&(n.host||Wv(n.parentNode))},eM=function(n,l){return l.map(function(o){if(n.contains(o))return o;var i=Wv(o);return i&&n.contains(i)?i:(console.error("aria-hidden",o,"in not contained inside",n,". Doing nothing"),null)}).filter(function(o){return!!o})},tM=function(n,l,o,i){var c=eM(l,Array.isArray(n)?n:[n]);Cs[o]||(Cs[o]=new WeakMap);var f=Cs[o],d=[],m=new Set,h=new Set(c),g=function(p){!p||m.has(p)||(m.add(p),g(p.parentNode))};c.forEach(g);var x=function(p){!p||h.has(p)||Array.prototype.forEach.call(p.children,function(S){if(m.has(S))x(S);else try{var E=S.getAttribute(i),T=E!==null&&E!=="false",C=(zr.get(S)||0)+1,A=(f.get(S)||0)+1;zr.set(S,C),f.set(S,A),d.push(S),C===1&&T&&Ts.set(S,!0),A===1&&S.setAttribute(o,"true"),T||S.setAttribute(i,"true")}catch(R){console.error("aria-hidden: cannot operate on ",S,R)}})};return x(l),m.clear(),Vf++,function(){d.forEach(function(p){var S=zr.get(p)-1,E=f.get(p)-1;zr.set(p,S),f.set(p,E),S||(Ts.has(p)||p.removeAttribute(i),Ts.delete(p)),E||p.removeAttribute(o)}),Vf--,Vf||(zr=new WeakMap,zr=new WeakMap,Ts=new WeakMap,Cs={})}},eb=function(n,l,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),c=WC(n);return c?(i.push.apply(i,Array.from(c.querySelectorAll("[aria-live], script"))),tM(i,c,o,"aria-hidden")):function(){return null}};function nM(n){const l=b.useRef({value:n,previous:n});return b.useMemo(()=>(l.current.value!==n&&(l.current.previous=l.current.value,l.current.value=n),l.current.previous),[n])}function aM(n){const[l,o]=b.useState(void 0);return Xt(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const f=c[0];let d,m;if("borderBoxSize"in f){const h=f.borderBoxSize,g=Array.isArray(h)?h[0]:h;d=g.inlineSize,m=g.blockSize}else d=n.offsetWidth,m=n.offsetHeight;o({width:d,height:m})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else o(void 0)},[n]),l}const lM=["top","right","bottom","left"],fl=Math.min,vn=Math.max,Ps=Math.round,Ms=Math.floor,ta=n=>({x:n,y:n}),rM={left:"right",right:"left",bottom:"top",top:"bottom"};function pd(n,l,o){return vn(n,fl(l,o))}function Ma(n,l){return typeof n=="function"?n(l):n}function Aa(n){return n.split("-")[0]}function Pr(n){return n.split("-")[1]}function Fd(n){return n==="x"?"y":"x"}function Qd(n){return n==="y"?"height":"width"}function ea(n){const l=n[0];return l==="t"||l==="b"?"y":"x"}function Zd(n){return Fd(ea(n))}function oM(n,l,o){o===void 0&&(o=!1);const i=Pr(n),c=Zd(n),f=Qd(c);let d=c==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return l.reference[f]>l.floating[f]&&(d=Xs(d)),[d,Xs(d)]}function iM(n){const l=Xs(n);return[gd(n),l,gd(l)]}function gd(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const e0=["left","right"],t0=["right","left"],sM=["top","bottom"],cM=["bottom","top"];function uM(n,l,o){switch(n){case"top":case"bottom":return o?l?t0:e0:l?e0:t0;case"left":case"right":return l?sM:cM;default:return[]}}function fM(n,l,o,i){const c=Pr(n);let f=uM(Aa(n),o==="start",i);return c&&(f=f.map(d=>d+"-"+c),l&&(f=f.concat(f.map(gd)))),f}function Xs(n){const l=Aa(n);return rM[l]+n.slice(l.length)}function dM(n){return{top:0,right:0,bottom:0,left:0,...n}}function tb(n){return typeof n!="number"?dM(n):{top:n,right:n,bottom:n,left:n}}function $s(n){const{x:l,y:o,width:i,height:c}=n;return{width:i,height:c,top:o,left:l,right:l+i,bottom:o+c,x:l,y:o}}function n0(n,l,o){let{reference:i,floating:c}=n;const f=ea(l),d=Zd(l),m=Qd(d),h=Aa(l),g=f==="y",x=i.x+i.width/2-c.width/2,p=i.y+i.height/2-c.height/2,S=i[m]/2-c[m]/2;let E;switch(h){case"top":E={x,y:i.y-c.height};break;case"bottom":E={x,y:i.y+i.height};break;case"right":E={x:i.x+i.width,y:p};break;case"left":E={x:i.x-c.width,y:p};break;default:E={x:i.x,y:i.y}}switch(Pr(l)){case"start":E[d]-=S*(o&&g?-1:1);break;case"end":E[d]+=S*(o&&g?-1:1);break}return E}async function mM(n,l){var o;l===void 0&&(l={});const{x:i,y:c,platform:f,rects:d,elements:m,strategy:h}=n,{boundary:g="clippingAncestors",rootBoundary:x="viewport",elementContext:p="floating",altBoundary:S=!1,padding:E=0}=Ma(l,n),T=tb(E),A=m[S?p==="floating"?"reference":"floating":p],R=$s(await f.getClippingRect({element:(o=await(f.isElement==null?void 0:f.isElement(A)))==null||o?A:A.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(m.floating)),boundary:g,rootBoundary:x,strategy:h})),O=p==="floating"?{x:i,y:c,width:d.floating.width,height:d.floating.height}:d.reference,D=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m.floating)),X=await(f.isElement==null?void 0:f.isElement(D))?await(f.getScale==null?void 0:f.getScale(D))||{x:1,y:1}:{x:1,y:1},le=$s(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:O,offsetParent:D,strategy:h}):O);return{top:(R.top-le.top+T.top)/X.y,bottom:(le.bottom-R.bottom+T.bottom)/X.y,left:(R.left-le.left+T.left)/X.x,right:(le.right-R.right+T.right)/X.x}}const hM=50,pM=async(n,l,o)=>{const{placement:i="bottom",strategy:c="absolute",middleware:f=[],platform:d}=o,m=d.detectOverflow?d:{...d,detectOverflow:mM},h=await(d.isRTL==null?void 0:d.isRTL(l));let g=await d.getElementRects({reference:n,floating:l,strategy:c}),{x,y:p}=n0(g,i,h),S=i,E=0;const T={};for(let C=0;C<f.length;C++){const A=f[C];if(!A)continue;const{name:R,fn:O}=A,{x:D,y:X,data:le,reset:V}=await O({x,y:p,initialPlacement:i,placement:S,strategy:c,middlewareData:T,rects:g,platform:m,elements:{reference:n,floating:l}});x=D??x,p=X??p,T[R]={...T[R],...le},V&&E<hM&&(E++,typeof V=="object"&&(V.placement&&(S=V.placement),V.rects&&(g=V.rects===!0?await d.getElementRects({reference:n,floating:l,strategy:c}):V.rects),{x,y:p}=n0(g,S,h)),C=-1)}return{x,y:p,placement:S,strategy:c,middlewareData:T}},gM=n=>({name:"arrow",options:n,async fn(l){const{x:o,y:i,placement:c,rects:f,platform:d,elements:m,middlewareData:h}=l,{element:g,padding:x=0}=Ma(n,l)||{};if(g==null)return{};const p=tb(x),S={x:o,y:i},E=Zd(c),T=Qd(E),C=await d.getDimensions(g),A=E==="y",R=A?"top":"left",O=A?"bottom":"right",D=A?"clientHeight":"clientWidth",X=f.reference[T]+f.reference[E]-S[E]-f.floating[T],le=S[E]-f.reference[E],V=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let U=V?V[D]:0;(!U||!await(d.isElement==null?void 0:d.isElement(V)))&&(U=m.floating[D]||f.floating[T]);const N=X/2-le/2,Q=U/2-C[T]/2-1,ne=fl(p[R],Q),fe=fl(p[O],Q),B=ne,I=U-C[T]-fe,$=U/2-C[T]/2+N,Y=pd(B,$,I),M=!h.arrow&&Pr(c)!=null&&$!==Y&&f.reference[T]/2-($<B?ne:fe)-C[T]/2<0,j=M?$<B?$-B:$-I:0;return{[E]:S[E]+j,data:{[E]:Y,centerOffset:$-Y-j,...M&&{alignmentOffset:j}},reset:M}}}),yM=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var o,i;const{placement:c,middlewareData:f,rects:d,initialPlacement:m,platform:h,elements:g}=l,{mainAxis:x=!0,crossAxis:p=!0,fallbackPlacements:S,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:C=!0,...A}=Ma(n,l);if((o=f.arrow)!=null&&o.alignmentOffset)return{};const R=Aa(c),O=ea(m),D=Aa(m)===m,X=await(h.isRTL==null?void 0:h.isRTL(g.floating)),le=S||(D||!C?[Xs(m)]:iM(m)),V=T!=="none";!S&&V&&le.push(...fM(m,C,T,X));const U=[m,...le],N=await h.detectOverflow(l,A),Q=[];let ne=((i=f.flip)==null?void 0:i.overflows)||[];if(x&&Q.push(N[R]),p){const $=oM(c,d,X);Q.push(N[$[0]],N[$[1]])}if(ne=[...ne,{placement:c,overflows:Q}],!Q.every($=>$<=0)){var fe,B;const $=(((fe=f.flip)==null?void 0:fe.index)||0)+1,Y=U[$];if(Y&&(!(p==="alignment"?O!==ea(Y):!1)||ne.every(q=>ea(q.placement)===O?q.overflows[0]>0:!0)))return{data:{index:$,overflows:ne},reset:{placement:Y}};let M=(B=ne.filter(j=>j.overflows[0]<=0).sort((j,q)=>j.overflows[1]-q.overflows[1])[0])==null?void 0:B.placement;if(!M)switch(E){case"bestFit":{var I;const j=(I=ne.filter(q=>{if(V){const P=ea(q.placement);return P===O||P==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(P=>P>0).reduce((P,L)=>P+L,0)]).sort((q,P)=>q[1]-P[1])[0])==null?void 0:I[0];j&&(M=j);break}case"initialPlacement":M=m;break}if(c!==M)return{reset:{placement:M}}}return{}}}};function a0(n,l){return{top:n.top-l.height,right:n.right-l.width,bottom:n.bottom-l.height,left:n.left-l.width}}function l0(n){return lM.some(l=>n[l]>=0)}const vM=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(l){const{rects:o,platform:i}=l,{strategy:c="referenceHidden",...f}=Ma(n,l);switch(c){case"referenceHidden":{const d=await i.detectOverflow(l,{...f,elementContext:"reference"}),m=a0(d,o.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:l0(m)}}}case"escaped":{const d=await i.detectOverflow(l,{...f,altBoundary:!0}),m=a0(d,o.floating);return{data:{escapedOffsets:m,escaped:l0(m)}}}default:return{}}}}},nb=new Set(["left","top"]);async function bM(n,l){const{placement:o,platform:i,elements:c}=n,f=await(i.isRTL==null?void 0:i.isRTL(c.floating)),d=Aa(o),m=Pr(o),h=ea(o)==="y",g=nb.has(d)?-1:1,x=f&&h?-1:1,p=Ma(l,n);let{mainAxis:S,crossAxis:E,alignmentAxis:T}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return m&&typeof T=="number"&&(E=m==="end"?T*-1:T),h?{x:E*x,y:S*g}:{x:S*g,y:E*x}}const xM=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var o,i;const{x:c,y:f,placement:d,middlewareData:m}=l,h=await bM(l,n);return d===((o=m.offset)==null?void 0:o.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:c+h.x,y:f+h.y,data:{...h,placement:d}}}}},SM=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:o,y:i,placement:c,platform:f}=l,{mainAxis:d=!0,crossAxis:m=!1,limiter:h={fn:R=>{let{x:O,y:D}=R;return{x:O,y:D}}},...g}=Ma(n,l),x={x:o,y:i},p=await f.detectOverflow(l,g),S=ea(Aa(c)),E=Fd(S);let T=x[E],C=x[S];if(d){const R=E==="y"?"top":"left",O=E==="y"?"bottom":"right",D=T+p[R],X=T-p[O];T=pd(D,T,X)}if(m){const R=S==="y"?"top":"left",O=S==="y"?"bottom":"right",D=C+p[R],X=C-p[O];C=pd(D,C,X)}const A=h.fn({...l,[E]:T,[S]:C});return{...A,data:{x:A.x-o,y:A.y-i,enabled:{[E]:d,[S]:m}}}}}},wM=function(n){return n===void 0&&(n={}),{options:n,fn(l){const{x:o,y:i,placement:c,rects:f,middlewareData:d}=l,{offset:m=0,mainAxis:h=!0,crossAxis:g=!0}=Ma(n,l),x={x:o,y:i},p=ea(c),S=Fd(p);let E=x[S],T=x[p];const C=Ma(m,l),A=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(h){const D=S==="y"?"height":"width",X=f.reference[S]-f.floating[D]+A.mainAxis,le=f.reference[S]+f.reference[D]-A.mainAxis;E<X?E=X:E>le&&(E=le)}if(g){var R,O;const D=S==="y"?"width":"height",X=nb.has(Aa(c)),le=f.reference[p]-f.floating[D]+(X&&((R=d.offset)==null?void 0:R[p])||0)+(X?0:A.crossAxis),V=f.reference[p]+f.reference[D]+(X?0:((O=d.offset)==null?void 0:O[p])||0)-(X?A.crossAxis:0);T<le?T=le:T>V&&(T=V)}return{[S]:E,[p]:T}}}},EM=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(l){var o,i;const{placement:c,rects:f,platform:d,elements:m}=l,{apply:h=()=>{},...g}=Ma(n,l),x=await d.detectOverflow(l,g),p=Aa(c),S=Pr(c),E=ea(c)==="y",{width:T,height:C}=f.floating;let A,R;p==="top"||p==="bottom"?(A=p,R=S===(await(d.isRTL==null?void 0:d.isRTL(m.floating))?"start":"end")?"left":"right"):(R=p,A=S==="end"?"top":"bottom");const O=C-x.top-x.bottom,D=T-x.left-x.right,X=fl(C-x[A],O),le=fl(T-x[R],D),V=!l.middlewareData.shift;let U=X,N=le;if((o=l.middlewareData.shift)!=null&&o.enabled.x&&(N=D),(i=l.middlewareData.shift)!=null&&i.enabled.y&&(U=O),V&&!S){const ne=vn(x.left,0),fe=vn(x.right,0),B=vn(x.top,0),I=vn(x.bottom,0);E?N=T-2*(ne!==0||fe!==0?ne+fe:vn(x.left,x.right)):U=C-2*(B!==0||I!==0?B+I:vn(x.top,x.bottom))}await h({...l,availableWidth:N,availableHeight:U});const Q=await d.getDimensions(m.floating);return T!==Q.width||C!==Q.height?{reset:{rects:!0}}:{}}}};function rc(){return typeof window<"u"}function Xr(n){return ab(n)?(n.nodeName||"").toLowerCase():"#document"}function bn(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function na(n){var l;return(l=(ab(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function ab(n){return rc()?n instanceof Node||n instanceof bn(n).Node:!1}function Yn(n){return rc()?n instanceof Element||n instanceof bn(n).Element:!1}function _a(n){return rc()?n instanceof HTMLElement||n instanceof bn(n).HTMLElement:!1}function r0(n){return!rc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof bn(n).ShadowRoot}function Jo(n){const{overflow:l,overflowX:o,overflowY:i,display:c}=Vn(n);return/auto|scroll|overlay|hidden|clip/.test(l+i+o)&&c!=="inline"&&c!=="contents"}function TM(n){return/^(table|td|th)$/.test(Xr(n))}function oc(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const CM=/transform|translate|scale|rotate|perspective|filter/,MM=/paint|layout|strict|content/,Bl=n=>!!n&&n!=="none";let qf;function Jd(n){const l=Yn(n)?Vn(n):n;return Bl(l.transform)||Bl(l.translate)||Bl(l.scale)||Bl(l.rotate)||Bl(l.perspective)||!Wd()&&(Bl(l.backdropFilter)||Bl(l.filter))||CM.test(l.willChange||"")||MM.test(l.contain||"")}function AM(n){let l=dl(n);for(;_a(l)&&!Gr(l);){if(Jd(l))return l;if(oc(l))return null;l=dl(l)}return null}function Wd(){return qf==null&&(qf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),qf}function Gr(n){return/^(html|body|#document)$/.test(Xr(n))}function Vn(n){return bn(n).getComputedStyle(n)}function ic(n){return Yn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function dl(n){if(Xr(n)==="html")return n;const l=n.assignedSlot||n.parentNode||r0(n)&&n.host||na(n);return r0(l)?l.host:l}function lb(n){const l=dl(n);return Gr(l)?n.ownerDocument?n.ownerDocument.body:n.body:_a(l)&&Jo(l)?l:lb(l)}function Xo(n,l,o){var i;l===void 0&&(l=[]),o===void 0&&(o=!0);const c=lb(n),f=c===((i=n.ownerDocument)==null?void 0:i.body),d=bn(c);if(f){const m=yd(d);return l.concat(d,d.visualViewport||[],Jo(c)?c:[],m&&o?Xo(m):[])}else return l.concat(c,Xo(c,[],o))}function yd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function rb(n){const l=Vn(n);let o=parseFloat(l.width)||0,i=parseFloat(l.height)||0;const c=_a(n),f=c?n.offsetWidth:o,d=c?n.offsetHeight:i,m=Ps(o)!==f||Ps(i)!==d;return m&&(o=f,i=d),{width:o,height:i,$:m}}function em(n){return Yn(n)?n:n.contextElement}function Br(n){const l=em(n);if(!_a(l))return ta(1);const o=l.getBoundingClientRect(),{width:i,height:c,$:f}=rb(l);let d=(f?Ps(o.width):o.width)/i,m=(f?Ps(o.height):o.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const _M=ta(0);function ob(n){const l=bn(n);return!Wd()||!l.visualViewport?_M:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function RM(n,l,o){return l===void 0&&(l=!1),!o||l&&o!==bn(n)?!1:l}function Vl(n,l,o,i){l===void 0&&(l=!1),o===void 0&&(o=!1);const c=n.getBoundingClientRect(),f=em(n);let d=ta(1);l&&(i?Yn(i)&&(d=Br(i)):d=Br(n));const m=RM(f,o,i)?ob(f):ta(0);let h=(c.left+m.x)/d.x,g=(c.top+m.y)/d.y,x=c.width/d.x,p=c.height/d.y;if(f){const S=bn(f),E=i&&Yn(i)?bn(i):i;let T=S,C=yd(T);for(;C&&i&&E!==T;){const A=Br(C),R=C.getBoundingClientRect(),O=Vn(C),D=R.left+(C.clientLeft+parseFloat(O.paddingLeft))*A.x,X=R.top+(C.clientTop+parseFloat(O.paddingTop))*A.y;h*=A.x,g*=A.y,x*=A.x,p*=A.y,h+=D,g+=X,T=bn(C),C=yd(T)}}return $s({width:x,height:p,x:h,y:g})}function sc(n,l){const o=ic(n).scrollLeft;return l?l.left+o:Vl(na(n)).left+o}function ib(n,l){const o=n.getBoundingClientRect(),i=o.left+l.scrollLeft-sc(n,o),c=o.top+l.scrollTop;return{x:i,y:c}}function NM(n){let{elements:l,rect:o,offsetParent:i,strategy:c}=n;const f=c==="fixed",d=na(i),m=l?oc(l.floating):!1;if(i===d||m&&f)return o;let h={scrollLeft:0,scrollTop:0},g=ta(1);const x=ta(0),p=_a(i);if((p||!p&&!f)&&((Xr(i)!=="body"||Jo(d))&&(h=ic(i)),p)){const E=Vl(i);g=Br(i),x.x=E.x+i.clientLeft,x.y=E.y+i.clientTop}const S=d&&!p&&!f?ib(d,h):ta(0);return{width:o.width*g.x,height:o.height*g.y,x:o.x*g.x-h.scrollLeft*g.x+x.x+S.x,y:o.y*g.y-h.scrollTop*g.y+x.y+S.y}}function OM(n){return Array.from(n.getClientRects())}function zM(n){const l=na(n),o=ic(n),i=n.ownerDocument.body,c=vn(l.scrollWidth,l.clientWidth,i.scrollWidth,i.clientWidth),f=vn(l.scrollHeight,l.clientHeight,i.scrollHeight,i.clientHeight);let d=-o.scrollLeft+sc(n);const m=-o.scrollTop;return Vn(i).direction==="rtl"&&(d+=vn(l.clientWidth,i.clientWidth)-c),{width:c,height:f,x:d,y:m}}const o0=25;function DM(n,l){const o=bn(n),i=na(n),c=o.visualViewport;let f=i.clientWidth,d=i.clientHeight,m=0,h=0;if(c){f=c.width,d=c.height;const x=Wd();(!x||x&&l==="fixed")&&(m=c.offsetLeft,h=c.offsetTop)}const g=sc(i);if(g<=0){const x=i.ownerDocument,p=x.body,S=getComputedStyle(p),E=x.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,T=Math.abs(i.clientWidth-p.clientWidth-E);T<=o0&&(f-=T)}else g<=o0&&(f+=g);return{width:f,height:d,x:m,y:h}}function jM(n,l){const o=Vl(n,!0,l==="fixed"),i=o.top+n.clientTop,c=o.left+n.clientLeft,f=_a(n)?Br(n):ta(1),d=n.clientWidth*f.x,m=n.clientHeight*f.y,h=c*f.x,g=i*f.y;return{width:d,height:m,x:h,y:g}}function i0(n,l,o){let i;if(l==="viewport")i=DM(n,o);else if(l==="document")i=zM(na(n));else if(Yn(l))i=jM(l,o);else{const c=ob(n);i={x:l.x-c.x,y:l.y-c.y,width:l.width,height:l.height}}return $s(i)}function sb(n,l){const o=dl(n);return o===l||!Yn(o)||Gr(o)?!1:Vn(o).position==="fixed"||sb(o,l)}function kM(n,l){const o=l.get(n);if(o)return o;let i=Xo(n,[],!1).filter(m=>Yn(m)&&Xr(m)!=="body"),c=null;const f=Vn(n).position==="fixed";let d=f?dl(n):n;for(;Yn(d)&&!Gr(d);){const m=Vn(d),h=Jd(d);!h&&m.position==="fixed"&&(c=null),(f?!h&&!c:!h&&m.position==="static"&&!!c&&(c.position==="absolute"||c.position==="fixed")||Jo(d)&&!h&&sb(n,d))?i=i.filter(x=>x!==d):c=m,d=dl(d)}return l.set(n,i),i}function LM(n){let{element:l,boundary:o,rootBoundary:i,strategy:c}=n;const d=[...o==="clippingAncestors"?oc(l)?[]:kM(l,this._c):[].concat(o),i],m=i0(l,d[0],c);let h=m.top,g=m.right,x=m.bottom,p=m.left;for(let S=1;S<d.length;S++){const E=i0(l,d[S],c);h=vn(E.top,h),g=fl(E.right,g),x=fl(E.bottom,x),p=vn(E.left,p)}return{width:g-p,height:x-h,x:p,y:h}}function HM(n){const{width:l,height:o}=rb(n);return{width:l,height:o}}function BM(n,l,o){const i=_a(l),c=na(l),f=o==="fixed",d=Vl(n,!0,f,l);let m={scrollLeft:0,scrollTop:0};const h=ta(0);function g(){h.x=sc(c)}if(i||!i&&!f)if((Xr(l)!=="body"||Jo(c))&&(m=ic(l)),i){const E=Vl(l,!0,f,l);h.x=E.x+l.clientLeft,h.y=E.y+l.clientTop}else c&&g();f&&!i&&c&&g();const x=c&&!i&&!f?ib(c,m):ta(0),p=d.left+m.scrollLeft-h.x-x.x,S=d.top+m.scrollTop-h.y-x.y;return{x:p,y:S,width:d.width,height:d.height}}function Pf(n){return Vn(n).position==="static"}function s0(n,l){if(!_a(n)||Vn(n).position==="fixed")return null;if(l)return l(n);let o=n.offsetParent;return na(n)===o&&(o=o.ownerDocument.body),o}function cb(n,l){const o=bn(n);if(oc(n))return o;if(!_a(n)){let c=dl(n);for(;c&&!Gr(c);){if(Yn(c)&&!Pf(c))return c;c=dl(c)}return o}let i=s0(n,l);for(;i&&TM(i)&&Pf(i);)i=s0(i,l);return i&&Gr(i)&&Pf(i)&&!Jd(i)?o:i||AM(n)||o}const UM=async function(n){const l=this.getOffsetParent||cb,o=this.getDimensions,i=await o(n.floating);return{reference:BM(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function IM(n){return Vn(n).direction==="rtl"}const GM={convertOffsetParentRelativeRectToViewportRelativeRect:NM,getDocumentElement:na,getClippingRect:LM,getOffsetParent:cb,getElementRects:UM,getClientRects:OM,getDimensions:HM,getScale:Br,isElement:Yn,isRTL:IM};function ub(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function YM(n,l){let o=null,i;const c=na(n);function f(){var m;clearTimeout(i),(m=o)==null||m.disconnect(),o=null}function d(m,h){m===void 0&&(m=!1),h===void 0&&(h=1),f();const g=n.getBoundingClientRect(),{left:x,top:p,width:S,height:E}=g;if(m||l(),!S||!E)return;const T=Ms(p),C=Ms(c.clientWidth-(x+S)),A=Ms(c.clientHeight-(p+E)),R=Ms(x),D={rootMargin:-T+"px "+-C+"px "+-A+"px "+-R+"px",threshold:vn(0,fl(1,h))||1};let X=!0;function le(V){const U=V[0].intersectionRatio;if(U!==h){if(!X)return d();U?d(!1,U):i=setTimeout(()=>{d(!1,1e-7)},1e3)}U===1&&!ub(g,n.getBoundingClientRect())&&d(),X=!1}try{o=new IntersectionObserver(le,{...D,root:c.ownerDocument})}catch{o=new IntersectionObserver(le,D)}o.observe(n)}return d(!0),f}function VM(n,l,o,i){i===void 0&&(i={});const{ancestorScroll:c=!0,ancestorResize:f=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,g=em(n),x=c||f?[...g?Xo(g):[],...l?Xo(l):[]]:[];x.forEach(R=>{c&&R.addEventListener("scroll",o,{passive:!0}),f&&R.addEventListener("resize",o)});const p=g&&m?YM(g,o):null;let S=-1,E=null;d&&(E=new ResizeObserver(R=>{let[O]=R;O&&O.target===g&&E&&l&&(E.unobserve(l),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var D;(D=E)==null||D.observe(l)})),o()}),g&&!h&&E.observe(g),l&&E.observe(l));let T,C=h?Vl(n):null;h&&A();function A(){const R=Vl(n);C&&!ub(C,R)&&o(),C=R,T=requestAnimationFrame(A)}return o(),()=>{var R;x.forEach(O=>{c&&O.removeEventListener("scroll",o),f&&O.removeEventListener("resize",o)}),p==null||p(),(R=E)==null||R.disconnect(),E=null,h&&cancelAnimationFrame(T)}}const qM=xM,PM=SM,XM=yM,$M=EM,KM=vM,c0=gM,FM=wM,QM=(n,l,o)=>{const i=new Map,c={platform:GM,...o},f={...c.platform,_c:i};return pM(n,l,{...c,platform:f})};var ZM=typeof document<"u",JM=function(){},Ls=ZM?b.useLayoutEffect:JM;function Ks(n,l){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(typeof n=="function"&&n.toString()===l.toString())return!0;let o,i,c;if(n&&l&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==l.length)return!1;for(i=o;i--!==0;)if(!Ks(n[i],l[i]))return!1;return!0}if(c=Object.keys(n),o=c.length,o!==Object.keys(l).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(l,c[i]))return!1;for(i=o;i--!==0;){const f=c[i];if(!(f==="_owner"&&n.$$typeof)&&!Ks(n[f],l[f]))return!1}return!0}return n!==n&&l!==l}function fb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function u0(n,l){const o=fb(n);return Math.round(l*o)/o}function Xf(n){const l=b.useRef(n);return Ls(()=>{l.current=n}),l}function WM(n){n===void 0&&(n={});const{placement:l="bottom",strategy:o="absolute",middleware:i=[],platform:c,elements:{reference:f,floating:d}={},transform:m=!0,whileElementsMounted:h,open:g}=n,[x,p]=b.useState({x:0,y:0,strategy:o,placement:l,middlewareData:{},isPositioned:!1}),[S,E]=b.useState(i);Ks(S,i)||E(i);const[T,C]=b.useState(null),[A,R]=b.useState(null),O=b.useCallback(q=>{q!==V.current&&(V.current=q,C(q))},[]),D=b.useCallback(q=>{q!==U.current&&(U.current=q,R(q))},[]),X=f||T,le=d||A,V=b.useRef(null),U=b.useRef(null),N=b.useRef(x),Q=h!=null,ne=Xf(h),fe=Xf(c),B=Xf(g),I=b.useCallback(()=>{if(!V.current||!U.current)return;const q={placement:l,strategy:o,middleware:S};fe.current&&(q.platform=fe.current),QM(V.current,U.current,q).then(P=>{const L={...P,isPositioned:B.current!==!1};$.current&&!Ks(N.current,L)&&(N.current=L,Qo.flushSync(()=>{p(L)}))})},[S,l,o,fe,B]);Ls(()=>{g===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(q=>({...q,isPositioned:!1})))},[g]);const $=b.useRef(!1);Ls(()=>($.current=!0,()=>{$.current=!1}),[]),Ls(()=>{if(X&&(V.current=X),le&&(U.current=le),X&&le){if(ne.current)return ne.current(X,le,I);I()}},[X,le,I,ne,Q]);const Y=b.useMemo(()=>({reference:V,floating:U,setReference:O,setFloating:D}),[O,D]),M=b.useMemo(()=>({reference:X,floating:le}),[X,le]),j=b.useMemo(()=>{const q={position:o,left:0,top:0};if(!M.floating)return q;const P=u0(M.floating,x.x),L=u0(M.floating,x.y);return m?{...q,transform:"translate("+P+"px, "+L+"px)",...fb(M.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:P,top:L}},[o,m,M.floating,x.x,x.y]);return b.useMemo(()=>({...x,update:I,refs:Y,elements:M,floatingStyles:j}),[x,I,Y,M,j])}const eA=n=>{function l(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:n,fn(o){const{element:i,padding:c}=typeof n=="function"?n(o):n;return i&&l(i)?i.current!=null?c0({element:i.current,padding:c}).fn(o):{}:i?c0({element:i,padding:c}).fn(o):{}}}},tA=(n,l)=>{const o=qM(n);return{name:o.name,fn:o.fn,options:[n,l]}},nA=(n,l)=>{const o=PM(n);return{name:o.name,fn:o.fn,options:[n,l]}},aA=(n,l)=>({fn:FM(n).fn,options:[n,l]}),lA=(n,l)=>{const o=XM(n);return{name:o.name,fn:o.fn,options:[n,l]}},rA=(n,l)=>{const o=$M(n);return{name:o.name,fn:o.fn,options:[n,l]}},oA=(n,l)=>{const o=KM(n);return{name:o.name,fn:o.fn,options:[n,l]}},iA=(n,l)=>{const o=eA(n);return{name:o.name,fn:o.fn,options:[n,l]}};var sA="Arrow",db=b.forwardRef((n,l)=>{const{children:o,width:i=10,height:c=5,...f}=n;return v.jsx(We.svg,{...f,ref:l,width:i,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?o:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});db.displayName=sA;var cA=db,tm="Popper",[mb,$r]=$l(tm),[uA,hb]=mb(tm),pb=n=>{const{__scopePopper:l,children:o}=n,[i,c]=b.useState(null);return v.jsx(uA,{scope:l,anchor:i,onAnchorChange:c,children:o})};pb.displayName=tm;var gb="PopperAnchor",yb=b.forwardRef((n,l)=>{const{__scopePopper:o,virtualRef:i,...c}=n,f=hb(gb,o),d=b.useRef(null),m=ft(l,d),h=b.useRef(null);return b.useEffect(()=>{const g=h.current;h.current=(i==null?void 0:i.current)||d.current,g!==h.current&&f.onAnchorChange(h.current)}),i?null:v.jsx(We.div,{...c,ref:m})});yb.displayName=gb;var nm="PopperContent",[fA,dA]=mb(nm),vb=b.forwardRef((n,l)=>{var ce,Z,re,be,Me,Ae;const{__scopePopper:o,side:i="bottom",sideOffset:c=0,align:f="center",alignOffset:d=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:g=[],collisionPadding:x=0,sticky:p="partial",hideWhenDetached:S=!1,updatePositionStrategy:E="optimized",onPlaced:T,...C}=n,A=hb(nm,o),[R,O]=b.useState(null),D=ft(l,Pe=>O(Pe)),[X,le]=b.useState(null),V=aM(X),U=(V==null?void 0:V.width)??0,N=(V==null?void 0:V.height)??0,Q=i+(f!=="center"?"-"+f:""),ne=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},fe=Array.isArray(g)?g:[g],B=fe.length>0,I={padding:ne,boundary:fe.filter(hA),altBoundary:B},{refs:$,floatingStyles:Y,placement:M,isPositioned:j,middlewareData:q}=WM({strategy:"fixed",placement:Q,whileElementsMounted:(...Pe)=>VM(...Pe,{animationFrame:E==="always"}),elements:{reference:A.anchor},middleware:[tA({mainAxis:c+N,alignmentAxis:d}),h&&nA({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?aA():void 0,...I}),h&&lA({...I}),rA({...I,apply:({elements:Pe,rects:Ge,availableWidth:Yt,availableHeight:St})=>{const{width:Ot,height:De}=Ge.reference,ye=Pe.floating.style;ye.setProperty("--radix-popper-available-width",`${Yt}px`),ye.setProperty("--radix-popper-available-height",`${St}px`),ye.setProperty("--radix-popper-anchor-width",`${Ot}px`),ye.setProperty("--radix-popper-anchor-height",`${De}px`)}}),X&&iA({element:X,padding:m}),pA({arrowWidth:U,arrowHeight:N}),S&&oA({strategy:"referenceHidden",...I})]}),[P,L]=Sb(M),_=jn(T);Xt(()=>{j&&(_==null||_())},[j,_]);const H=(ce=q.arrow)==null?void 0:ce.x,J=(Z=q.arrow)==null?void 0:Z.y,ie=((re=q.arrow)==null?void 0:re.centerOffset)!==0,[ee,me]=b.useState();return Xt(()=>{R&&me(window.getComputedStyle(R).zIndex)},[R]),v.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:j?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(be=q.transformOrigin)==null?void 0:be.x,(Me=q.transformOrigin)==null?void 0:Me.y].join(" "),...((Ae=q.hide)==null?void 0:Ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:v.jsx(fA,{scope:o,placedSide:P,onArrowChange:le,arrowX:H,arrowY:J,shouldHideArrow:ie,children:v.jsx(We.div,{"data-side":P,"data-align":L,...C,ref:D,style:{...C.style,animation:j?void 0:"none"}})})})});vb.displayName=nm;var bb="PopperArrow",mA={top:"bottom",right:"left",bottom:"top",left:"right"},xb=b.forwardRef(function(l,o){const{__scopePopper:i,...c}=l,f=dA(bb,i),d=mA[f.placedSide];return v.jsx("span",{ref:f.onArrowChange,style:{position:"absolute",left:f.arrowX,top:f.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[f.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[f.placedSide],visibility:f.shouldHideArrow?"hidden":void 0},children:v.jsx(cA,{...c,ref:o,style:{...c.style,display:"block"}})})});xb.displayName=bb;function hA(n){return n!==null}var pA=n=>({name:"transformOrigin",options:n,fn(l){var A,R,O;const{placement:o,rects:i,middlewareData:c}=l,d=((A=c.arrow)==null?void 0:A.centerOffset)!==0,m=d?0:n.arrowWidth,h=d?0:n.arrowHeight,[g,x]=Sb(o),p={start:"0%",center:"50%",end:"100%"}[x],S=(((R=c.arrow)==null?void 0:R.x)??0)+m/2,E=(((O=c.arrow)==null?void 0:O.y)??0)+h/2;let T="",C="";return g==="bottom"?(T=d?p:`${S}px`,C=`${-h}px`):g==="top"?(T=d?p:`${S}px`,C=`${i.floating.height+h}px`):g==="right"?(T=`${-h}px`,C=d?p:`${E}px`):g==="left"&&(T=`${i.floating.width+h}px`,C=d?p:`${E}px`),{data:{x:T,y:C}}}});function Sb(n){const[l,o="center"]=n.split("-");return[l,o]}var am=pb,lm=yb,rm=vb,om=xb,$f="rovingFocusGroup.onEntryFocus",gA={bubbles:!1,cancelable:!0},Wo="RovingFocusGroup",[vd,wb,yA]=qd(Wo),[vA,Eb]=$l(Wo,[yA]),[bA,xA]=vA(Wo),Tb=b.forwardRef((n,l)=>v.jsx(vd.Provider,{scope:n.__scopeRovingFocusGroup,children:v.jsx(vd.Slot,{scope:n.__scopeRovingFocusGroup,children:v.jsx(SA,{...n,ref:l})})}));Tb.displayName=Wo;var SA=b.forwardRef((n,l)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:c=!1,dir:f,currentTabStopId:d,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:x=!1,...p}=n,S=b.useRef(null),E=ft(l,S),T=Pd(f),[C,A]=qs({prop:d,defaultProp:m??null,onChange:h,caller:Wo}),[R,O]=b.useState(!1),D=jn(g),X=wb(o),le=b.useRef(!1),[V,U]=b.useState(0);return b.useEffect(()=>{const N=S.current;if(N)return N.addEventListener($f,D),()=>N.removeEventListener($f,D)},[D]),v.jsx(bA,{scope:o,orientation:i,dir:T,loop:c,currentTabStopId:C,onItemFocus:b.useCallback(N=>A(N),[A]),onItemShiftTab:b.useCallback(()=>O(!0),[]),onFocusableItemAdd:b.useCallback(()=>U(N=>N+1),[]),onFocusableItemRemove:b.useCallback(()=>U(N=>N-1),[]),children:v.jsx(We.div,{tabIndex:R||V===0?-1:0,"data-orientation":i,...p,ref:E,style:{outline:"none",...n.style},onMouseDown:Te(n.onMouseDown,()=>{le.current=!0}),onFocus:Te(n.onFocus,N=>{const Q=!le.current;if(N.target===N.currentTarget&&Q&&!R){const ne=new CustomEvent($f,gA);if(N.currentTarget.dispatchEvent(ne),!ne.defaultPrevented){const fe=X().filter(M=>M.focusable),B=fe.find(M=>M.active),I=fe.find(M=>M.id===C),Y=[B,I,...fe].filter(Boolean).map(M=>M.ref.current);Ab(Y,x)}}le.current=!1}),onBlur:Te(n.onBlur,()=>O(!1))})})}),Cb="RovingFocusGroupItem",Mb=b.forwardRef((n,l)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:c=!1,tabStopId:f,children:d,...m}=n,h=Ir(),g=f||h,x=xA(Cb,o),p=x.currentTabStopId===g,S=wb(o),{onFocusableItemAdd:E,onFocusableItemRemove:T,currentTabStopId:C}=x;return b.useEffect(()=>{if(i)return E(),()=>T()},[i,E,T]),v.jsx(vd.ItemSlot,{scope:o,id:g,focusable:i,active:c,children:v.jsx(We.span,{tabIndex:p?0:-1,"data-orientation":x.orientation,...m,ref:l,onMouseDown:Te(n.onMouseDown,A=>{i?x.onItemFocus(g):A.preventDefault()}),onFocus:Te(n.onFocus,()=>x.onItemFocus(g)),onKeyDown:Te(n.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){x.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const R=TA(A,x.orientation,x.dir);if(R!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let D=S().filter(X=>X.focusable).map(X=>X.ref.current);if(R==="last")D.reverse();else if(R==="prev"||R==="next"){R==="prev"&&D.reverse();const X=D.indexOf(A.currentTarget);D=x.loop?CA(D,X+1):D.slice(X+1)}setTimeout(()=>Ab(D))}}),children:typeof d=="function"?d({isCurrentTabStop:p,hasTabStop:C!=null}):d})})});Mb.displayName=Cb;var wA={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function EA(n,l){return l!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function TA(n,l,o){const i=EA(n.key,o);if(!(l==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(l==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return wA[i]}function Ab(n,l=!1){const o=document.activeElement;for(const i of n)if(i===o||(i.focus({preventScroll:l}),document.activeElement!==o))return}function CA(n,l){return n.map((o,i)=>n[(l+i)%n.length])}var MA=Tb,AA=Mb,bd=["Enter"," "],_A=["ArrowDown","PageUp","Home"],_b=["ArrowUp","PageDown","End"],RA=[..._A,..._b],NA={ltr:[...bd,"ArrowRight"],rtl:[...bd,"ArrowLeft"]},OA={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ei="Menu",[$o,zA,DA]=qd(ei),[Kl,Rb]=$l(ei,[DA,$r,Eb]),ti=$r(),Nb=Eb(),[Ob,pl]=Kl(ei),[jA,ni]=Kl(ei),zb=n=>{const{__scopeMenu:l,open:o=!1,children:i,dir:c,onOpenChange:f,modal:d=!0}=n,m=ti(l),[h,g]=b.useState(null),x=b.useRef(!1),p=jn(f),S=Pd(c);return b.useEffect(()=>{const E=()=>{x.current=!0,document.addEventListener("pointerdown",T,{capture:!0,once:!0}),document.addEventListener("pointermove",T,{capture:!0,once:!0})},T=()=>x.current=!1;return document.addEventListener("keydown",E,{capture:!0}),()=>{document.removeEventListener("keydown",E,{capture:!0}),document.removeEventListener("pointerdown",T,{capture:!0}),document.removeEventListener("pointermove",T,{capture:!0})}},[]),v.jsx(am,{...m,children:v.jsx(Ob,{scope:l,open:o,onOpenChange:p,content:h,onContentChange:g,children:v.jsx(jA,{scope:l,onClose:b.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:x,dir:S,modal:d,children:i})})})};zb.displayName=ei;var kA="MenuAnchor",im=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n,c=ti(o);return v.jsx(lm,{...c,...i,ref:l})});im.displayName=kA;var sm="MenuPortal",[LA,Db]=Kl(sm,{forceMount:void 0}),jb=n=>{const{__scopeMenu:l,forceMount:o,children:i,container:c}=n,f=pl(sm,l);return v.jsx(LA,{scope:l,forceMount:o,children:v.jsx(qr,{present:o||f.open,children:v.jsx($d,{asChild:!0,container:c,children:i})})})};jb.displayName=sm;var Dn="MenuContent",[HA,cm]=Kl(Dn),kb=b.forwardRef((n,l)=>{const o=Db(Dn,n.__scopeMenu),{forceMount:i=o.forceMount,...c}=n,f=pl(Dn,n.__scopeMenu),d=ni(Dn,n.__scopeMenu);return v.jsx($o.Provider,{scope:n.__scopeMenu,children:v.jsx(qr,{present:i||f.open,children:v.jsx($o.Slot,{scope:n.__scopeMenu,children:d.modal?v.jsx(BA,{...c,ref:l}):v.jsx(UA,{...c,ref:l})})})})}),BA=b.forwardRef((n,l)=>{const o=pl(Dn,n.__scopeMenu),i=b.useRef(null),c=ft(l,i);return b.useEffect(()=>{const f=i.current;if(f)return eb(f)},[]),v.jsx(um,{...n,ref:c,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:Te(n.onFocusOutside,f=>f.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),UA=b.forwardRef((n,l)=>{const o=pl(Dn,n.__scopeMenu);return v.jsx(um,{...n,ref:l,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),IA=Ur("MenuContent.ScrollLock"),um=b.forwardRef((n,l)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:c,onOpenAutoFocus:f,onCloseAutoFocus:d,disableOutsidePointerEvents:m,onEntryFocus:h,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:p,onInteractOutside:S,onDismiss:E,disableOutsideScroll:T,...C}=n,A=pl(Dn,o),R=ni(Dn,o),O=ti(o),D=Nb(o),X=zA(o),[le,V]=b.useState(null),U=b.useRef(null),N=ft(l,U,A.onContentChange),Q=b.useRef(0),ne=b.useRef(""),fe=b.useRef(0),B=b.useRef(null),I=b.useRef("right"),$=b.useRef(0),Y=T?Kd:b.Fragment,M=T?{as:IA,allowPinchZoom:!0}:void 0,j=P=>{var ce,Z;const L=ne.current+P,_=X().filter(re=>!re.disabled),H=document.activeElement,J=(ce=_.find(re=>re.ref.current===H))==null?void 0:ce.textValue,ie=_.map(re=>re.textValue),ee=JA(ie,L,J),me=(Z=_.find(re=>re.textValue===ee))==null?void 0:Z.ref.current;(function re(be){ne.current=be,window.clearTimeout(Q.current),be!==""&&(Q.current=window.setTimeout(()=>re(""),1e3))})(L),me&&setTimeout(()=>me.focus())};b.useEffect(()=>()=>window.clearTimeout(Q.current),[]),Pv();const q=b.useCallback(P=>{var _,H;return I.current===((_=B.current)==null?void 0:_.side)&&e_(P,(H=B.current)==null?void 0:H.area)},[]);return v.jsx(HA,{scope:o,searchRef:ne,onItemEnter:b.useCallback(P=>{q(P)&&P.preventDefault()},[q]),onItemLeave:b.useCallback(P=>{var L;q(P)||((L=U.current)==null||L.focus(),V(null))},[q]),onTriggerLeave:b.useCallback(P=>{q(P)&&P.preventDefault()},[q]),pointerGraceTimerRef:fe,onPointerGraceIntentChange:b.useCallback(P=>{B.current=P},[]),children:v.jsx(Y,{...M,children:v.jsx(Xd,{asChild:!0,trapped:c,onMountAutoFocus:Te(f,P=>{var L;P.preventDefault(),(L=U.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:v.jsx(ac,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:p,onInteractOutside:S,onDismiss:E,children:v.jsx(MA,{asChild:!0,...D,dir:R.dir,orientation:"vertical",loop:i,currentTabStopId:le,onCurrentTabStopIdChange:V,onEntryFocus:Te(h,P=>{R.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(rm,{role:"menu","aria-orientation":"vertical","data-state":Jb(A.open),"data-radix-menu-content":"",dir:R.dir,...O,...C,ref:N,style:{outline:"none",...C.style},onKeyDown:Te(C.onKeyDown,P=>{const _=P.target.closest("[data-radix-menu-content]")===P.currentTarget,H=P.ctrlKey||P.altKey||P.metaKey,J=P.key.length===1;_&&(P.key==="Tab"&&P.preventDefault(),!H&&J&&j(P.key));const ie=U.current;if(P.target!==ie||!RA.includes(P.key))return;P.preventDefault();const me=X().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);_b.includes(P.key)&&me.reverse(),QA(me)}),onBlur:Te(n.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(Q.current),ne.current="")}),onPointerMove:Te(n.onPointerMove,Ko(P=>{const L=P.target,_=$.current!==P.clientX;if(P.currentTarget.contains(L)&&_){const H=P.clientX>$.current?"right":"left";I.current=H,$.current=P.clientX}}))})})})})})})});kb.displayName=Dn;var GA="MenuGroup",fm=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n;return v.jsx(We.div,{role:"group",...i,ref:l})});fm.displayName=GA;var YA="MenuLabel",Lb=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n;return v.jsx(We.div,{...i,ref:l})});Lb.displayName=YA;var Fs="MenuItem",f0="menu.itemSelect",cc=b.forwardRef((n,l)=>{const{disabled:o=!1,onSelect:i,...c}=n,f=b.useRef(null),d=ni(Fs,n.__scopeMenu),m=cm(Fs,n.__scopeMenu),h=ft(l,f),g=b.useRef(!1),x=()=>{const p=f.current;if(!o&&p){const S=new CustomEvent(f0,{bubbles:!0,cancelable:!0});p.addEventListener(f0,E=>i==null?void 0:i(E),{once:!0}),Uv(p,S),S.defaultPrevented?g.current=!1:d.onClose()}};return v.jsx(Hb,{...c,ref:h,disabled:o,onClick:Te(n.onClick,x),onPointerDown:p=>{var S;(S=n.onPointerDown)==null||S.call(n,p),g.current=!0},onPointerUp:Te(n.onPointerUp,p=>{var S;g.current||(S=p.currentTarget)==null||S.click()}),onKeyDown:Te(n.onKeyDown,p=>{const S=m.searchRef.current!=="";o||S&&p.key===" "||bd.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});cc.displayName=Fs;var Hb=b.forwardRef((n,l)=>{const{__scopeMenu:o,disabled:i=!1,textValue:c,...f}=n,d=cm(Fs,o),m=Nb(o),h=b.useRef(null),g=ft(l,h),[x,p]=b.useState(!1),[S,E]=b.useState("");return b.useEffect(()=>{const T=h.current;T&&E((T.textContent??"").trim())},[f.children]),v.jsx($o.ItemSlot,{scope:o,disabled:i,textValue:c??S,children:v.jsx(AA,{asChild:!0,...m,focusable:!i,children:v.jsx(We.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...f,ref:g,onPointerMove:Te(n.onPointerMove,Ko(T=>{i?d.onItemLeave(T):(d.onItemEnter(T),T.defaultPrevented||T.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Te(n.onPointerLeave,Ko(T=>d.onItemLeave(T))),onFocus:Te(n.onFocus,()=>p(!0)),onBlur:Te(n.onBlur,()=>p(!1))})})})}),VA="MenuCheckboxItem",Bb=b.forwardRef((n,l)=>{const{checked:o=!1,onCheckedChange:i,...c}=n;return v.jsx(Vb,{scope:n.__scopeMenu,checked:o,children:v.jsx(cc,{role:"menuitemcheckbox","aria-checked":Qs(o)?"mixed":o,...c,ref:l,"data-state":hm(o),onSelect:Te(c.onSelect,()=>i==null?void 0:i(Qs(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Bb.displayName=VA;var Ub="MenuRadioGroup",[qA,PA]=Kl(Ub,{value:void 0,onValueChange:()=>{}}),Ib=b.forwardRef((n,l)=>{const{value:o,onValueChange:i,...c}=n,f=jn(i);return v.jsx(qA,{scope:n.__scopeMenu,value:o,onValueChange:f,children:v.jsx(fm,{...c,ref:l})})});Ib.displayName=Ub;var Gb="MenuRadioItem",Yb=b.forwardRef((n,l)=>{const{value:o,...i}=n,c=PA(Gb,n.__scopeMenu),f=o===c.value;return v.jsx(Vb,{scope:n.__scopeMenu,checked:f,children:v.jsx(cc,{role:"menuitemradio","aria-checked":f,...i,ref:l,"data-state":hm(f),onSelect:Te(i.onSelect,()=>{var d;return(d=c.onValueChange)==null?void 0:d.call(c,o)},{checkForDefaultPrevented:!1})})})});Yb.displayName=Gb;var dm="MenuItemIndicator",[Vb,XA]=Kl(dm,{checked:!1}),qb=b.forwardRef((n,l)=>{const{__scopeMenu:o,forceMount:i,...c}=n,f=XA(dm,o);return v.jsx(qr,{present:i||Qs(f.checked)||f.checked===!0,children:v.jsx(We.span,{...c,ref:l,"data-state":hm(f.checked)})})});qb.displayName=dm;var $A="MenuSeparator",Pb=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n;return v.jsx(We.div,{role:"separator","aria-orientation":"horizontal",...i,ref:l})});Pb.displayName=$A;var KA="MenuArrow",Xb=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n,c=ti(o);return v.jsx(om,{...c,...i,ref:l})});Xb.displayName=KA;var mm="MenuSub",[FA,$b]=Kl(mm),Kb=n=>{const{__scopeMenu:l,children:o,open:i=!1,onOpenChange:c}=n,f=pl(mm,l),d=ti(l),[m,h]=b.useState(null),[g,x]=b.useState(null),p=jn(c);return b.useEffect(()=>(f.open===!1&&p(!1),()=>p(!1)),[f.open,p]),v.jsx(am,{...d,children:v.jsx(Ob,{scope:l,open:i,onOpenChange:p,content:g,onContentChange:x,children:v.jsx(FA,{scope:l,contentId:Ir(),triggerId:Ir(),trigger:m,onTriggerChange:h,children:o})})})};Kb.displayName=mm;var Yo="MenuSubTrigger",Fb=b.forwardRef((n,l)=>{const o=pl(Yo,n.__scopeMenu),i=ni(Yo,n.__scopeMenu),c=$b(Yo,n.__scopeMenu),f=cm(Yo,n.__scopeMenu),d=b.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:h}=f,g={__scopeMenu:n.__scopeMenu},x=b.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return b.useEffect(()=>x,[x]),b.useEffect(()=>{const p=m.current;return()=>{window.clearTimeout(p),h(null)}},[m,h]),v.jsx(im,{asChild:!0,...g,children:v.jsx(Hb,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":c.contentId,"data-state":Jb(o.open),...n,ref:Vd(l,c.onTriggerChange),onClick:p=>{var S;(S=n.onClick)==null||S.call(n,p),!(n.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:Te(n.onPointerMove,Ko(p=>{f.onItemEnter(p),!p.defaultPrevented&&!n.disabled&&!o.open&&!d.current&&(f.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{o.onOpenChange(!0),x()},100))})),onPointerLeave:Te(n.onPointerLeave,Ko(p=>{var E,T;x();const S=(E=o.content)==null?void 0:E.getBoundingClientRect();if(S){const C=(T=o.content)==null?void 0:T.dataset.side,A=C==="right",R=A?-5:5,O=S[A?"left":"right"],D=S[A?"right":"left"];f.onPointerGraceIntentChange({area:[{x:p.clientX+R,y:p.clientY},{x:O,y:S.top},{x:D,y:S.top},{x:D,y:S.bottom},{x:O,y:S.bottom}],side:C}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>f.onPointerGraceIntentChange(null),300)}else{if(f.onTriggerLeave(p),p.defaultPrevented)return;f.onPointerGraceIntentChange(null)}})),onKeyDown:Te(n.onKeyDown,p=>{var E;const S=f.searchRef.current!=="";n.disabled||S&&p.key===" "||NA[i.dir].includes(p.key)&&(o.onOpenChange(!0),(E=o.content)==null||E.focus(),p.preventDefault())})})})});Fb.displayName=Yo;var Qb="MenuSubContent",Zb=b.forwardRef((n,l)=>{const o=Db(Dn,n.__scopeMenu),{forceMount:i=o.forceMount,...c}=n,f=pl(Dn,n.__scopeMenu),d=ni(Dn,n.__scopeMenu),m=$b(Qb,n.__scopeMenu),h=b.useRef(null),g=ft(l,h);return v.jsx($o.Provider,{scope:n.__scopeMenu,children:v.jsx(qr,{present:i||f.open,children:v.jsx($o.Slot,{scope:n.__scopeMenu,children:v.jsx(um,{id:m.contentId,"aria-labelledby":m.triggerId,...c,ref:g,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{var p;d.isUsingKeyboardRef.current&&((p=h.current)==null||p.focus()),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:Te(n.onFocusOutside,x=>{x.target!==m.trigger&&f.onOpenChange(!1)}),onEscapeKeyDown:Te(n.onEscapeKeyDown,x=>{d.onClose(),x.preventDefault()}),onKeyDown:Te(n.onKeyDown,x=>{var E;const p=x.currentTarget.contains(x.target),S=OA[d.dir].includes(x.key);p&&S&&(f.onOpenChange(!1),(E=m.trigger)==null||E.focus(),x.preventDefault())})})})})})});Zb.displayName=Qb;function Jb(n){return n?"open":"closed"}function Qs(n){return n==="indeterminate"}function hm(n){return Qs(n)?"indeterminate":n?"checked":"unchecked"}function QA(n){const l=document.activeElement;for(const o of n)if(o===l||(o.focus(),document.activeElement!==l))return}function ZA(n,l){return n.map((o,i)=>n[(l+i)%n.length])}function JA(n,l,o){const c=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,f=o?n.indexOf(o):-1;let d=ZA(n,Math.max(f,0));c.length===1&&(d=d.filter(g=>g!==o));const h=d.find(g=>g.toLowerCase().startsWith(c.toLowerCase()));return h!==o?h:void 0}function WA(n,l){const{x:o,y:i}=n;let c=!1;for(let f=0,d=l.length-1;f<l.length;d=f++){const m=l[f],h=l[d],g=m.x,x=m.y,p=h.x,S=h.y;x>i!=S>i&&o<(p-g)*(i-x)/(S-x)+g&&(c=!c)}return c}function e_(n,l){if(!l)return!1;const o={x:n.clientX,y:n.clientY};return WA(o,l)}function Ko(n){return l=>l.pointerType==="mouse"?n(l):void 0}var t_=zb,n_=im,a_=jb,l_=kb,r_=fm,o_=Lb,i_=cc,s_=Bb,c_=Ib,u_=Yb,f_=qb,d_=Pb,m_=Xb,h_=Kb,p_=Fb,g_=Zb,pm="ContextMenu",[y_]=$l(pm,[Rb]),$t=Rb(),[v_,Wb]=y_(pm),ex=n=>{const{__scopeContextMenu:l,children:o,onOpenChange:i,dir:c,modal:f=!0}=n,[d,m]=b.useState(!1),h=$t(l),g=jn(i),x=b.useCallback(p=>{m(p),g(p)},[g]);return v.jsx(v_,{scope:l,open:d,onOpenChange:x,modal:f,children:v.jsx(t_,{...h,dir:c,open:d,onOpenChange:x,modal:f,children:o})})};ex.displayName=pm;var tx="ContextMenuTrigger",nx=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,disabled:i=!1,...c}=n,f=Wb(tx,o),d=$t(o),m=b.useRef({x:0,y:0}),h=b.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...m.current})}),g=b.useRef(0),x=b.useCallback(()=>window.clearTimeout(g.current),[]),p=S=>{m.current={x:S.clientX,y:S.clientY},f.onOpenChange(!0)};return b.useEffect(()=>x,[x]),b.useEffect(()=>void(i&&x()),[i,x]),v.jsxs(v.Fragment,{children:[v.jsx(n_,{...d,virtualRef:h}),v.jsx(We.span,{"data-state":f.open?"open":"closed","data-disabled":i?"":void 0,...c,ref:l,style:{WebkitTouchCallout:"none",...n.style},onContextMenu:i?n.onContextMenu:Te(n.onContextMenu,S=>{x(),p(S),S.preventDefault()}),onPointerDown:i?n.onPointerDown:Te(n.onPointerDown,As(S=>{x(),g.current=window.setTimeout(()=>p(S),700)})),onPointerMove:i?n.onPointerMove:Te(n.onPointerMove,As(x)),onPointerCancel:i?n.onPointerCancel:Te(n.onPointerCancel,As(x)),onPointerUp:i?n.onPointerUp:Te(n.onPointerUp,As(x))})]})});nx.displayName=tx;var b_="ContextMenuPortal",ax=n=>{const{__scopeContextMenu:l,...o}=n,i=$t(l);return v.jsx(a_,{...i,...o})};ax.displayName=b_;var lx="ContextMenuContent",rx=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=Wb(lx,o),f=$t(o),d=b.useRef(!1);return v.jsx(l_,{...f,...i,ref:l,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:m=>{var h;(h=n.onCloseAutoFocus)==null||h.call(n,m),!m.defaultPrevented&&d.current&&m.preventDefault(),d.current=!1},onInteractOutside:m=>{var h;(h=n.onInteractOutside)==null||h.call(n,m),!m.defaultPrevented&&!c.modal&&(d.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)"}})});rx.displayName=lx;var x_="ContextMenuGroup",S_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=$t(o);return v.jsx(r_,{...c,...i,ref:l})});S_.displayName=x_;var w_="ContextMenuLabel",E_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=$t(o);return v.jsx(o_,{...c,...i,ref:l})});E_.displayName=w_;var T_="ContextMenuItem",ox=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=$t(o);return v.jsx(i_,{...c,...i,ref:l})});ox.displayName=T_;var C_="ContextMenuCheckboxItem",M_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=$t(o);return v.jsx(s_,{...c,...i,ref:l})});M_.displayName=C_;var A_="ContextMenuRadioGroup",__=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=$t(o);return v.jsx(c_,{...c,...i,ref:l})});__.displayName=A_;var R_="ContextMenuRadioItem",N_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=$t(o);return v.jsx(u_,{...c,...i,ref:l})});N_.displayName=R_;var O_="ContextMenuItemIndicator",z_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=$t(o);return v.jsx(f_,{...c,...i,ref:l})});z_.displayName=O_;var D_="ContextMenuSeparator",ix=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=$t(o);return v.jsx(d_,{...c,...i,ref:l})});ix.displayName=D_;var j_="ContextMenuArrow",k_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=$t(o);return v.jsx(m_,{...c,...i,ref:l})});k_.displayName=j_;var sx="ContextMenuSub",cx=n=>{const{__scopeContextMenu:l,children:o,onOpenChange:i,open:c,defaultOpen:f}=n,d=$t(l),[m,h]=qs({prop:c,defaultProp:f??!1,onChange:i,caller:sx});return v.jsx(h_,{...d,open:m,onOpenChange:h,children:o})};cx.displayName=sx;var L_="ContextMenuSubTrigger",ux=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=$t(o);return v.jsx(p_,{...c,...i,ref:l})});ux.displayName=L_;var H_="ContextMenuSubContent",fx=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,c=$t(o);return v.jsx(g_,{...c,...i,ref:l,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)"}})});fx.displayName=H_;function As(n){return l=>l.pointerType!=="mouse"?n(l):void 0}var B_=ex,U_=nx,I_=ax,G_=rx,Y_=ox,V_=ix,q_=cx,P_=ux,X_=fx;function d0(n,[l,o]){return Math.min(o,Math.max(l,n))}var $_=[" ","Enter","ArrowUp","ArrowDown"],K_=[" ","Enter"],ql="Select",[uc,fc,F_]=qd(ql),[Kr]=$l(ql,[F_,$r]),dc=$r(),[Q_,gl]=Kr(ql),[Z_,J_]=Kr(ql),dx=n=>{const{__scopeSelect:l,children:o,open:i,defaultOpen:c,onOpenChange:f,value:d,defaultValue:m,onValueChange:h,dir:g,name:x,autoComplete:p,disabled:S,required:E,form:T}=n,C=dc(l),[A,R]=b.useState(null),[O,D]=b.useState(null),[X,le]=b.useState(!1),V=Pd(g),[U,N]=qs({prop:i,defaultProp:c??!1,onChange:f,caller:ql}),[Q,ne]=qs({prop:d,defaultProp:m,onChange:h,caller:ql}),fe=b.useRef(null),B=A?T||!!A.closest("form"):!0,[I,$]=b.useState(new Set),Y=Array.from(I).map(M=>M.props.value).join(";");return v.jsx(am,{...C,children:v.jsxs(Q_,{required:E,scope:l,trigger:A,onTriggerChange:R,valueNode:O,onValueNodeChange:D,valueNodeHasChildren:X,onValueNodeHasChildrenChange:le,contentId:Ir(),value:Q,onValueChange:ne,open:U,onOpenChange:N,dir:V,triggerPointerDownPosRef:fe,disabled:S,children:[v.jsx(uc.Provider,{scope:l,children:v.jsx(Z_,{scope:n.__scopeSelect,onNativeOptionAdd:b.useCallback(M=>{$(j=>new Set(j).add(M))},[]),onNativeOptionRemove:b.useCallback(M=>{$(j=>{const q=new Set(j);return q.delete(M),q})},[]),children:o})}),B?v.jsxs(kx,{"aria-hidden":!0,required:E,tabIndex:-1,name:x,autoComplete:p,value:Q,onChange:M=>ne(M.target.value),disabled:S,form:T,children:[Q===void 0?v.jsx("option",{value:""}):null,Array.from(I)]},Y):null]})})};dx.displayName=ql;var mx="SelectTrigger",hx=b.forwardRef((n,l)=>{const{__scopeSelect:o,disabled:i=!1,...c}=n,f=dc(o),d=gl(mx,o),m=d.disabled||i,h=ft(l,d.onTriggerChange),g=fc(o),x=b.useRef("touch"),[p,S,E]=Hx(C=>{const A=g().filter(D=>!D.disabled),R=A.find(D=>D.value===d.value),O=Bx(A,C,R);O!==void 0&&d.onValueChange(O.value)}),T=C=>{m||(d.onOpenChange(!0),E()),C&&(d.triggerPointerDownPosRef.current={x:Math.round(C.pageX),y:Math.round(C.pageY)})};return v.jsx(lm,{asChild:!0,...f,children:v.jsx(We.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Lx(d.value)?"":void 0,...c,ref:h,onClick:Te(c.onClick,C=>{C.currentTarget.focus(),x.current!=="mouse"&&T(C)}),onPointerDown:Te(c.onPointerDown,C=>{x.current=C.pointerType;const A=C.target;A.hasPointerCapture(C.pointerId)&&A.releasePointerCapture(C.pointerId),C.button===0&&C.ctrlKey===!1&&C.pointerType==="mouse"&&(T(C),C.preventDefault())}),onKeyDown:Te(c.onKeyDown,C=>{const A=p.current!=="";!(C.ctrlKey||C.altKey||C.metaKey)&&C.key.length===1&&S(C.key),!(A&&C.key===" ")&&$_.includes(C.key)&&(T(),C.preventDefault())})})})});hx.displayName=mx;var px="SelectValue",gx=b.forwardRef((n,l)=>{const{__scopeSelect:o,className:i,style:c,children:f,placeholder:d="",...m}=n,h=gl(px,o),{onValueNodeHasChildrenChange:g}=h,x=f!==void 0,p=ft(l,h.onValueNodeChange);return Xt(()=>{g(x)},[g,x]),v.jsx(We.span,{...m,ref:p,style:{pointerEvents:"none"},children:Lx(h.value)?v.jsx(v.Fragment,{children:d}):f})});gx.displayName=px;var W_="SelectIcon",yx=b.forwardRef((n,l)=>{const{__scopeSelect:o,children:i,...c}=n;return v.jsx(We.span,{"aria-hidden":!0,...c,ref:l,children:i||"▼"})});yx.displayName=W_;var eR="SelectPortal",vx=n=>v.jsx($d,{asChild:!0,...n});vx.displayName=eR;var Pl="SelectContent",bx=b.forwardRef((n,l)=>{const o=gl(Pl,n.__scopeSelect),[i,c]=b.useState();if(Xt(()=>{c(new DocumentFragment)},[]),!o.open){const f=i;return f?Qo.createPortal(v.jsx(xx,{scope:n.__scopeSelect,children:v.jsx(uc.Slot,{scope:n.__scopeSelect,children:v.jsx("div",{children:n.children})})}),f):null}return v.jsx(Sx,{...n,ref:l})});bx.displayName=Pl;var Un=10,[xx,yl]=Kr(Pl),tR="SelectContentImpl",nR=Ur("SelectContent.RemoveScroll"),Sx=b.forwardRef((n,l)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:f,onPointerDownOutside:d,side:m,sideOffset:h,align:g,alignOffset:x,arrowPadding:p,collisionBoundary:S,collisionPadding:E,sticky:T,hideWhenDetached:C,avoidCollisions:A,...R}=n,O=gl(Pl,o),[D,X]=b.useState(null),[le,V]=b.useState(null),U=ft(l,ce=>X(ce)),[N,Q]=b.useState(null),[ne,fe]=b.useState(null),B=fc(o),[I,$]=b.useState(!1),Y=b.useRef(!1);b.useEffect(()=>{if(D)return eb(D)},[D]),Pv();const M=b.useCallback(ce=>{const[Z,...re]=B().map(Ae=>Ae.ref.current),[be]=re.slice(-1),Me=document.activeElement;for(const Ae of ce)if(Ae===Me||(Ae==null||Ae.scrollIntoView({block:"nearest"}),Ae===Z&&le&&(le.scrollTop=0),Ae===be&&le&&(le.scrollTop=le.scrollHeight),Ae==null||Ae.focus(),document.activeElement!==Me))return},[B,le]),j=b.useCallback(()=>M([N,D]),[M,N,D]);b.useEffect(()=>{I&&j()},[I,j]);const{onOpenChange:q,triggerPointerDownPosRef:P}=O;b.useEffect(()=>{if(D){let ce={x:0,y:0};const Z=be=>{var Me,Ae;ce={x:Math.abs(Math.round(be.pageX)-(((Me=P.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(be.pageY)-(((Ae=P.current)==null?void 0:Ae.y)??0))}},re=be=>{ce.x<=10&&ce.y<=10?be.preventDefault():D.contains(be.target)||q(!1),document.removeEventListener("pointermove",Z),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",re,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",re,{capture:!0})}}},[D,q,P]),b.useEffect(()=>{const ce=()=>q(!1);return window.addEventListener("blur",ce),window.addEventListener("resize",ce),()=>{window.removeEventListener("blur",ce),window.removeEventListener("resize",ce)}},[q]);const[L,_]=Hx(ce=>{const Z=B().filter(Me=>!Me.disabled),re=Z.find(Me=>Me.ref.current===document.activeElement),be=Bx(Z,ce,re);be&&setTimeout(()=>be.ref.current.focus())}),H=b.useCallback((ce,Z,re)=>{const be=!Y.current&&!re;(O.value!==void 0&&O.value===Z||be)&&(Q(ce),be&&(Y.current=!0))},[O.value]),J=b.useCallback(()=>D==null?void 0:D.focus(),[D]),ie=b.useCallback((ce,Z,re)=>{const be=!Y.current&&!re;(O.value!==void 0&&O.value===Z||be)&&fe(ce)},[O.value]),ee=i==="popper"?xd:wx,me=ee===xd?{side:m,sideOffset:h,align:g,alignOffset:x,arrowPadding:p,collisionBoundary:S,collisionPadding:E,sticky:T,hideWhenDetached:C,avoidCollisions:A}:{};return v.jsx(xx,{scope:o,content:D,viewport:le,onViewportChange:V,itemRefCallback:H,selectedItem:N,onItemLeave:J,itemTextRefCallback:ie,focusSelectedItem:j,selectedItemText:ne,position:i,isPositioned:I,searchRef:L,children:v.jsx(Kd,{as:nR,allowPinchZoom:!0,children:v.jsx(Xd,{asChild:!0,trapped:O.open,onMountAutoFocus:ce=>{ce.preventDefault()},onUnmountAutoFocus:Te(c,ce=>{var Z;(Z=O.trigger)==null||Z.focus({preventScroll:!0}),ce.preventDefault()}),children:v.jsx(ac,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:ce=>ce.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:v.jsx(ee,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:ce=>ce.preventDefault(),...R,...me,onPlaced:()=>$(!0),ref:U,style:{display:"flex",flexDirection:"column",outline:"none",...R.style},onKeyDown:Te(R.onKeyDown,ce=>{const Z=ce.ctrlKey||ce.altKey||ce.metaKey;if(ce.key==="Tab"&&ce.preventDefault(),!Z&&ce.key.length===1&&_(ce.key),["ArrowUp","ArrowDown","Home","End"].includes(ce.key)){let be=B().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(ce.key)&&(be=be.slice().reverse()),["ArrowUp","ArrowDown"].includes(ce.key)){const Me=ce.target,Ae=be.indexOf(Me);be=be.slice(Ae+1)}setTimeout(()=>M(be)),ce.preventDefault()}})})})})})})});Sx.displayName=tR;var aR="SelectItemAlignedPosition",wx=b.forwardRef((n,l)=>{const{__scopeSelect:o,onPlaced:i,...c}=n,f=gl(Pl,o),d=yl(Pl,o),[m,h]=b.useState(null),[g,x]=b.useState(null),p=ft(l,U=>x(U)),S=fc(o),E=b.useRef(!1),T=b.useRef(!0),{viewport:C,selectedItem:A,selectedItemText:R,focusSelectedItem:O}=d,D=b.useCallback(()=>{if(f.trigger&&f.valueNode&&m&&g&&C&&A&&R){const U=f.trigger.getBoundingClientRect(),N=g.getBoundingClientRect(),Q=f.valueNode.getBoundingClientRect(),ne=R.getBoundingClientRect();if(f.dir!=="rtl"){const Me=ne.left-N.left,Ae=Q.left-Me,Pe=U.left-Ae,Ge=U.width+Pe,Yt=Math.max(Ge,N.width),St=window.innerWidth-Un,Ot=d0(Ae,[Un,Math.max(Un,St-Yt)]);m.style.minWidth=Ge+"px",m.style.left=Ot+"px"}else{const Me=N.right-ne.right,Ae=window.innerWidth-Q.right-Me,Pe=window.innerWidth-U.right-Ae,Ge=U.width+Pe,Yt=Math.max(Ge,N.width),St=window.innerWidth-Un,Ot=d0(Ae,[Un,Math.max(Un,St-Yt)]);m.style.minWidth=Ge+"px",m.style.right=Ot+"px"}const fe=S(),B=window.innerHeight-Un*2,I=C.scrollHeight,$=window.getComputedStyle(g),Y=parseInt($.borderTopWidth,10),M=parseInt($.paddingTop,10),j=parseInt($.borderBottomWidth,10),q=parseInt($.paddingBottom,10),P=Y+M+I+q+j,L=Math.min(A.offsetHeight*5,P),_=window.getComputedStyle(C),H=parseInt(_.paddingTop,10),J=parseInt(_.paddingBottom,10),ie=U.top+U.height/2-Un,ee=B-ie,me=A.offsetHeight/2,ce=A.offsetTop+me,Z=Y+M+ce,re=P-Z;if(Z<=ie){const Me=fe.length>0&&A===fe[fe.length-1].ref.current;m.style.bottom="0px";const Ae=g.clientHeight-C.offsetTop-C.offsetHeight,Pe=Math.max(ee,me+(Me?J:0)+Ae+j),Ge=Z+Pe;m.style.height=Ge+"px"}else{const Me=fe.length>0&&A===fe[0].ref.current;m.style.top="0px";const Pe=Math.max(ie,Y+C.offsetTop+(Me?H:0)+me)+re;m.style.height=Pe+"px",C.scrollTop=Z-ie+C.offsetTop}m.style.margin=`${Un}px 0`,m.style.minHeight=L+"px",m.style.maxHeight=B+"px",i==null||i(),requestAnimationFrame(()=>E.current=!0)}},[S,f.trigger,f.valueNode,m,g,C,A,R,f.dir,i]);Xt(()=>D(),[D]);const[X,le]=b.useState();Xt(()=>{g&&le(window.getComputedStyle(g).zIndex)},[g]);const V=b.useCallback(U=>{U&&T.current===!0&&(D(),O==null||O(),T.current=!1)},[D,O]);return v.jsx(rR,{scope:o,contentWrapper:m,shouldExpandOnScrollRef:E,onScrollButtonChange:V,children:v.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:X},children:v.jsx(We.div,{...c,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});wx.displayName=aR;var lR="SelectPopperPosition",xd=b.forwardRef((n,l)=>{const{__scopeSelect:o,align:i="start",collisionPadding:c=Un,...f}=n,d=dc(o);return v.jsx(rm,{...d,...f,ref:l,align:i,collisionPadding:c,style:{boxSizing:"border-box",...f.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)"}})});xd.displayName=lR;var[rR,gm]=Kr(Pl,{}),Sd="SelectViewport",Ex=b.forwardRef((n,l)=>{const{__scopeSelect:o,nonce:i,...c}=n,f=yl(Sd,o),d=gm(Sd,o),m=ft(l,f.onViewportChange),h=b.useRef(0);return v.jsxs(v.Fragment,{children:[v.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}),v.jsx(uc.Slot,{scope:o,children:v.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:Te(c.onScroll,g=>{const x=g.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:S}=d;if(S!=null&&S.current&&p){const E=Math.abs(h.current-x.scrollTop);if(E>0){const T=window.innerHeight-Un*2,C=parseFloat(p.style.minHeight),A=parseFloat(p.style.height),R=Math.max(C,A);if(R<T){const O=R+E,D=Math.min(T,O),X=O-D;p.style.height=D+"px",p.style.bottom==="0px"&&(x.scrollTop=X>0?X:0,p.style.justifyContent="flex-end")}}}h.current=x.scrollTop})})})]})});Ex.displayName=Sd;var Tx="SelectGroup",[oR,iR]=Kr(Tx),Cx=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n,c=Ir();return v.jsx(oR,{scope:o,id:c,children:v.jsx(We.div,{role:"group","aria-labelledby":c,...i,ref:l})})});Cx.displayName=Tx;var Mx="SelectLabel",sR=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n,c=iR(Mx,o);return v.jsx(We.div,{id:c.id,...i,ref:l})});sR.displayName=Mx;var Zs="SelectItem",[cR,Ax]=Kr(Zs),_x=b.forwardRef((n,l)=>{const{__scopeSelect:o,value:i,disabled:c=!1,textValue:f,...d}=n,m=gl(Zs,o),h=yl(Zs,o),g=m.value===i,[x,p]=b.useState(f??""),[S,E]=b.useState(!1),T=ft(l,O=>{var D;return(D=h.itemRefCallback)==null?void 0:D.call(h,O,i,c)}),C=Ir(),A=b.useRef("touch"),R=()=>{c||(m.onValueChange(i),m.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 v.jsx(cR,{scope:o,value:i,disabled:c,textId:C,isSelected:g,onItemTextChange:b.useCallback(O=>{p(D=>D||((O==null?void 0:O.textContent)??"").trim())},[]),children:v.jsx(uc.ItemSlot,{scope:o,value:i,disabled:c,textValue:x,children:v.jsx(We.div,{role:"option","aria-labelledby":C,"data-highlighted":S?"":void 0,"aria-selected":g&&S,"data-state":g?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...d,ref:T,onFocus:Te(d.onFocus,()=>E(!0)),onBlur:Te(d.onBlur,()=>E(!1)),onClick:Te(d.onClick,()=>{A.current!=="mouse"&&R()}),onPointerUp:Te(d.onPointerUp,()=>{A.current==="mouse"&&R()}),onPointerDown:Te(d.onPointerDown,O=>{A.current=O.pointerType}),onPointerMove:Te(d.onPointerMove,O=>{var D;A.current=O.pointerType,c?(D=h.onItemLeave)==null||D.call(h):A.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Te(d.onPointerLeave,O=>{var D;O.currentTarget===document.activeElement&&((D=h.onItemLeave)==null||D.call(h))}),onKeyDown:Te(d.onKeyDown,O=>{var X;((X=h.searchRef)==null?void 0:X.current)!==""&&O.key===" "||(K_.includes(O.key)&&R(),O.key===" "&&O.preventDefault())})})})})});_x.displayName=Zs;var Vo="SelectItemText",Rx=b.forwardRef((n,l)=>{const{__scopeSelect:o,className:i,style:c,...f}=n,d=gl(Vo,o),m=yl(Vo,o),h=Ax(Vo,o),g=J_(Vo,o),[x,p]=b.useState(null),S=ft(l,R=>p(R),h.onItemTextChange,R=>{var O;return(O=m.itemTextRefCallback)==null?void 0:O.call(m,R,h.value,h.disabled)}),E=x==null?void 0:x.textContent,T=b.useMemo(()=>v.jsx("option",{value:h.value,disabled:h.disabled,children:E},h.value),[h.disabled,h.value,E]),{onNativeOptionAdd:C,onNativeOptionRemove:A}=g;return Xt(()=>(C(T),()=>A(T)),[C,A,T]),v.jsxs(v.Fragment,{children:[v.jsx(We.span,{id:h.textId,...f,ref:S}),h.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Qo.createPortal(f.children,d.valueNode):null]})});Rx.displayName=Vo;var Nx="SelectItemIndicator",Ox=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n;return Ax(Nx,o).isSelected?v.jsx(We.span,{"aria-hidden":!0,...i,ref:l}):null});Ox.displayName=Nx;var wd="SelectScrollUpButton",zx=b.forwardRef((n,l)=>{const o=yl(wd,n.__scopeSelect),i=gm(wd,n.__scopeSelect),[c,f]=b.useState(!1),d=ft(l,i.onScrollButtonChange);return Xt(()=>{if(o.viewport&&o.isPositioned){let m=function(){const g=h.scrollTop>0;f(g)};const h=o.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[o.viewport,o.isPositioned]),c?v.jsx(jx,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=o;m&&h&&(m.scrollTop=m.scrollTop-h.offsetHeight)}}):null});zx.displayName=wd;var Ed="SelectScrollDownButton",Dx=b.forwardRef((n,l)=>{const o=yl(Ed,n.__scopeSelect),i=gm(Ed,n.__scopeSelect),[c,f]=b.useState(!1),d=ft(l,i.onScrollButtonChange);return Xt(()=>{if(o.viewport&&o.isPositioned){let m=function(){const g=h.scrollHeight-h.clientHeight,x=Math.ceil(h.scrollTop)<g;f(x)};const h=o.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[o.viewport,o.isPositioned]),c?v.jsx(jx,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=o;m&&h&&(m.scrollTop=m.scrollTop+h.offsetHeight)}}):null});Dx.displayName=Ed;var jx=b.forwardRef((n,l)=>{const{__scopeSelect:o,onAutoScroll:i,...c}=n,f=yl("SelectScrollButton",o),d=b.useRef(null),m=fc(o),h=b.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return b.useEffect(()=>()=>h(),[h]),Xt(()=>{var x;const g=m().find(p=>p.ref.current===document.activeElement);(x=g==null?void 0:g.ref.current)==null||x.scrollIntoView({block:"nearest"})},[m]),v.jsx(We.div,{"aria-hidden":!0,...c,ref:l,style:{flexShrink:0,...c.style},onPointerDown:Te(c.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:Te(c.onPointerMove,()=>{var g;(g=f.onItemLeave)==null||g.call(f),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:Te(c.onPointerLeave,()=>{h()})})}),uR="SelectSeparator",fR=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n;return v.jsx(We.div,{"aria-hidden":!0,...i,ref:l})});fR.displayName=uR;var Td="SelectArrow",dR=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n,c=dc(o),f=gl(Td,o),d=yl(Td,o);return f.open&&d.position==="popper"?v.jsx(om,{...c,...i,ref:l}):null});dR.displayName=Td;var mR="SelectBubbleInput",kx=b.forwardRef(({__scopeSelect:n,value:l,...o},i)=>{const c=b.useRef(null),f=ft(i,c),d=nM(l);return b.useEffect(()=>{const m=c.current;if(!m)return;const h=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(h,"value").set;if(d!==l&&x){const p=new Event("change",{bubbles:!0});x.call(m,l),m.dispatchEvent(p)}},[d,l]),v.jsx(We.select,{...o,style:{...Iv,...o.style},ref:f,defaultValue:l})});kx.displayName=mR;function Lx(n){return n===""||n===void 0}function Hx(n){const l=jn(n),o=b.useRef(""),i=b.useRef(0),c=b.useCallback(d=>{const m=o.current+d;l(m),(function h(g){o.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>h(""),1e3))})(m)},[l]),f=b.useCallback(()=>{o.current="",window.clearTimeout(i.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(i.current),[]),[o,c,f]}function Bx(n,l,o){const c=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,f=o?n.indexOf(o):-1;let d=hR(n,Math.max(f,0));c.length===1&&(d=d.filter(g=>g!==o));const h=d.find(g=>g.textValue.toLowerCase().startsWith(c.toLowerCase()));return h!==o?h:void 0}function hR(n,l){return n.map((o,i)=>n[(l+i)%n.length])}var pR=dx,gR=hx,yR=gx,vR=yx,bR=vx,xR=bx,SR=Ex,wR=Cx,ER=_x,TR=Rx,CR=Ox,MR=zx,AR=Dx,_R="Separator",m0="horizontal",RR=["horizontal","vertical"],Ux=b.forwardRef((n,l)=>{const{decorative:o,orientation:i=m0,...c}=n,f=NR(i)?i:m0,m=o?{role:"none"}:{"aria-orientation":f==="vertical"?f:void 0,role:"separator"};return v.jsx(We.div,{"data-orientation":f,...m,...c,ref:l})});Ux.displayName=_R;function NR(n){return RR.includes(n)}var OR=Ux,[mc]=$l("Tooltip",[$r]),ym=$r(),Ix="TooltipProvider",zR=700,h0="tooltip.open",[DR,Gx]=mc(Ix),Yx=n=>{const{__scopeTooltip:l,delayDuration:o=zR,skipDelayDuration:i=300,disableHoverableContent:c=!1,children:f}=n,d=b.useRef(!0),m=b.useRef(!1),h=b.useRef(0);return b.useEffect(()=>{const g=h.current;return()=>window.clearTimeout(g)},[]),v.jsx(DR,{scope:l,isOpenDelayedRef:d,delayDuration:o,onOpen:b.useCallback(()=>{window.clearTimeout(h.current),d.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.current=!0,i)},[i]),isPointerInTransitRef:m,onPointerInTransitChange:b.useCallback(g=>{m.current=g},[]),disableHoverableContent:c,children:f})};Yx.displayName=Ix;var Vx="Tooltip",[X3,hc]=mc(Vx),Cd="TooltipTrigger",jR=b.forwardRef((n,l)=>{const{__scopeTooltip:o,...i}=n,c=hc(Cd,o),f=Gx(Cd,o),d=ym(o),m=b.useRef(null),h=ft(l,m,c.onTriggerChange),g=b.useRef(!1),x=b.useRef(!1),p=b.useCallback(()=>g.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),v.jsx(lm,{asChild:!0,...d,children:v.jsx(We.button,{"aria-describedby":c.open?c.contentId:void 0,"data-state":c.stateAttribute,...i,ref:h,onPointerMove:Te(n.onPointerMove,S=>{S.pointerType!=="touch"&&!x.current&&!f.isPointerInTransitRef.current&&(c.onTriggerEnter(),x.current=!0)}),onPointerLeave:Te(n.onPointerLeave,()=>{c.onTriggerLeave(),x.current=!1}),onPointerDown:Te(n.onPointerDown,()=>{c.open&&c.onClose(),g.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Te(n.onFocus,()=>{g.current||c.onOpen()}),onBlur:Te(n.onBlur,c.onClose),onClick:Te(n.onClick,c.onClose)})})});jR.displayName=Cd;var kR="TooltipPortal",[$3,LR]=mc(kR,{forceMount:void 0}),Yr="TooltipContent",HR=b.forwardRef((n,l)=>{const o=LR(Yr,n.__scopeTooltip),{forceMount:i=o.forceMount,side:c="top",...f}=n,d=hc(Yr,n.__scopeTooltip);return v.jsx(qr,{present:i||d.open,children:d.disableHoverableContent?v.jsx(qx,{side:c,...f,ref:l}):v.jsx(BR,{side:c,...f,ref:l})})}),BR=b.forwardRef((n,l)=>{const o=hc(Yr,n.__scopeTooltip),i=Gx(Yr,n.__scopeTooltip),c=b.useRef(null),f=ft(l,c),[d,m]=b.useState(null),{trigger:h,onClose:g}=o,x=c.current,{onPointerInTransitChange:p}=i,S=b.useCallback(()=>{m(null),p(!1)},[p]),E=b.useCallback((T,C)=>{const A=T.currentTarget,R={x:T.clientX,y:T.clientY},O=VR(R,A.getBoundingClientRect()),D=qR(R,O),X=PR(C.getBoundingClientRect()),le=$R([...D,...X]);m(le),p(!0)},[p]);return b.useEffect(()=>()=>S(),[S]),b.useEffect(()=>{if(h&&x){const T=A=>E(A,x),C=A=>E(A,h);return h.addEventListener("pointerleave",T),x.addEventListener("pointerleave",C),()=>{h.removeEventListener("pointerleave",T),x.removeEventListener("pointerleave",C)}}},[h,x,E,S]),b.useEffect(()=>{if(d){const T=C=>{const A=C.target,R={x:C.clientX,y:C.clientY},O=(h==null?void 0:h.contains(A))||(x==null?void 0:x.contains(A)),D=!XR(R,d);O?S():D&&(S(),g())};return document.addEventListener("pointermove",T),()=>document.removeEventListener("pointermove",T)}},[h,x,d,g,S]),v.jsx(qx,{...n,ref:f})}),[UR,IR]=mc(Vx,{isInside:!1}),GR=BT("TooltipContent"),qx=b.forwardRef((n,l)=>{const{__scopeTooltip:o,children:i,"aria-label":c,onEscapeKeyDown:f,onPointerDownOutside:d,...m}=n,h=hc(Yr,o),g=ym(o),{onClose:x}=h;return b.useEffect(()=>(document.addEventListener(h0,x),()=>document.removeEventListener(h0,x)),[x]),b.useEffect(()=>{if(h.trigger){const p=S=>{const E=S.target;E!=null&&E.contains(h.trigger)&&x()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[h.trigger,x]),v.jsx(ac,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:p=>p.preventDefault(),onDismiss:x,children:v.jsxs(rm,{"data-state":h.stateAttribute,...g,...m,ref:l,style:{...m.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:[v.jsx(GR,{children:i}),v.jsx(UR,{scope:o,isInside:!0,children:v.jsx(qT,{id:h.contentId,role:"tooltip",children:c||i})})]})})});HR.displayName=Yr;var Px="TooltipArrow",YR=b.forwardRef((n,l)=>{const{__scopeTooltip:o,...i}=n,c=ym(o);return IR(Px,o).isInside?null:v.jsx(om,{...c,...i,ref:l})});YR.displayName=Px;function VR(n,l){const o=Math.abs(l.top-n.y),i=Math.abs(l.bottom-n.y),c=Math.abs(l.right-n.x),f=Math.abs(l.left-n.x);switch(Math.min(o,i,c,f)){case f:return"left";case c:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function qR(n,l,o=5){const i=[];switch(l){case"top":i.push({x:n.x-o,y:n.y+o},{x:n.x+o,y:n.y+o});break;case"bottom":i.push({x:n.x-o,y:n.y-o},{x:n.x+o,y:n.y-o});break;case"left":i.push({x:n.x+o,y:n.y-o},{x:n.x+o,y:n.y+o});break;case"right":i.push({x:n.x-o,y:n.y-o},{x:n.x-o,y:n.y+o});break}return i}function PR(n){const{top:l,right:o,bottom:i,left:c}=n;return[{x:c,y:l},{x:o,y:l},{x:o,y:i},{x:c,y:i}]}function XR(n,l){const{x:o,y:i}=n;let c=!1;for(let f=0,d=l.length-1;f<l.length;d=f++){const m=l[f],h=l[d],g=m.x,x=m.y,p=h.x,S=h.y;x>i!=S>i&&o<(p-g)*(i-x)/(S-x)+g&&(c=!c)}return c}function $R(n){const l=n.slice();return l.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),KR(l)}function KR(n){if(n.length<=1)return n.slice();const l=[];for(let i=0;i<n.length;i++){const c=n[i];for(;l.length>=2;){const f=l[l.length-1],d=l[l.length-2];if((f.x-d.x)*(c.y-d.y)>=(f.y-d.y)*(c.x-d.x))l.pop();else break}l.push(c)}l.pop();const o=[];for(let i=n.length-1;i>=0;i--){const c=n[i];for(;o.length>=2;){const f=o[o.length-1],d=o[o.length-2];if((f.x-d.x)*(c.y-d.y)>=(f.y-d.y)*(c.x-d.x))o.pop();else break}o.push(c)}return o.pop(),l.length===1&&o.length===1&&l[0].x===o[0].x&&l[0].y===o[0].y?l:l.concat(o)}var FR=Yx;const QR=kT("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 In({className:n,variant:l="default",size:o="default",asChild:i=!1,...c}){const f=i?LT:"button";return v.jsx(f,{"data-slot":"button","data-variant":l,"data-size":o,className:Ze(QR({variant:l,size:o,className:n})),...c})}const ZR=["#F59E0B","#EF4444","#10B981","#3B82F6","#8B5CF6","#FFFFFF","#0F172A"];function JR({slides:n,startSlideId:l,onExit:o}){const i=b.useMemo(()=>{const Z=n.findIndex(re=>re.id===l);return Z>=0?Z:0},[n,l]),[c,f]=b.useState(i),[d,m]=b.useState("none"),[h,g]=b.useState("#F59E0B"),[x,p]=b.useState(!1),[S,E]=b.useState([]),[T,C]=b.useState({x:-100,y:-100}),[A,R]=b.useState(!!document.fullscreenElement),[O,D]=b.useState(()=>({height:window.innerHeight,width:window.innerWidth})),X=b.useRef(null),le=b.useRef(null),V=b.useRef(null),U=b.useRef(0),N=b.useRef(c),Q=b.useMemo(()=>{const Z=n.filter(re=>re.hidden!==!0);return Z.length>0?Z:n},[n]),ne=Q[Math.min(c,Q.length-1)]??null;b.useEffect(()=>{const Z=Q.findIndex(re=>re.id===l);f(Z>=0?Z:0)},[Q,l]),b.useEffect(()=>{const Z=Q.findIndex(re=>re.id===(ne==null?void 0:ne.id));Z>=0&&Z!==c&&f(Z)},[c,ne==null?void 0:ne.id,Q]),b.useEffect(()=>()=>{V.current&&window.clearTimeout(V.current)},[]),b.useEffect(()=>{const Z=()=>{R(!!document.fullscreenElement),D({height:window.innerHeight,width:window.innerWidth})};return window.addEventListener("resize",Z),document.addEventListener("fullscreenchange",Z),()=>{window.removeEventListener("resize",Z),document.removeEventListener("fullscreenchange",Z)}},[]);const fe=b.useCallback(()=>{p(!0),V.current&&window.clearTimeout(V.current),V.current=window.setTimeout(()=>{p(!1)},1500)},[]);function B(Z){m(re=>re===Z?"none":Z)}const I=b.useCallback(()=>{E([]),le.current=null},[]);function $(Z){m("none"),f(Math.min(Math.max(Z,0),Q.length-1)),I()}function Y(){$(c+1)}function M(){var re;const Z=document.documentElement;if(document.fullscreenElement){(re=document.exitFullscreen)==null||re.call(document);return}Z.requestFullscreen&&Z.requestFullscreen()}function j(Z){return Z.clientY>=window.innerHeight-96}function q(Z){if(j(Z)&&fe(),d==="laser"&&C({x:Z.clientX,y:Z.clientY}),d==="pen"&&le.current){const re=X.current,be=re==null?void 0:re.getBoundingClientRect();if(re&&be){const Me=Math.min(Math.max(Z.clientX-be.left,0),be.width)/J,Ae=Math.min(Math.max(Z.clientY-be.top,0),be.height)/J,Pe={...le.current,points:`${le.current.points} L ${Me.toFixed(1)} ${Ae.toFixed(1)}`};le.current=Pe,E(Ge=>[...Ge.slice(0,-1),Pe])}}}function P(Z){H(),!(d!=="none"||!X.current||!(Z.target instanceof Node))&&X.current.contains(Z.target)&&Y()}function L(Z){if(d!=="none"||Math.abs(Z.deltaY)<Math.abs(Z.deltaX)||Z.deltaY<=8)return;const re=Date.now();re-U.current<360||(U.current=re,Z.preventDefault(),Y())}function _(Z){if(d!=="pen"||!X.current||!(Z.target instanceof Node)||!X.current.contains(Z.target))return;const re=X.current.getBoundingClientRect();if(!(Z.clientX>=re.left&&Z.clientX<=re.right&&Z.clientY>=re.top&&Z.clientY<=re.bottom))return;const Me=Math.min(Math.max(Z.clientX-re.left,0),re.width)/J,Ae=Math.min(Math.max(Z.clientY-re.top,0),re.height)/J,Pe={color:h,points:`M ${Me.toFixed(1)} ${Ae.toFixed(1)}`};le.current=Pe,E(Ge=>[...Ge,Pe])}function H(){le.current=null}if(b.useEffect(()=>{N.current!==c&&(N.current=c,I())},[c,I]),b.useEffect(()=>{const Z=re=>{if(re.key==="Escape"){if(d==="pen"){m("none"),I(),fe();return}o();return}(re.key==="ArrowRight"||re.key==="ArrowDown"||re.key==="PageDown")&&(m("none"),f(be=>Math.min(be+1,Q.length-1))),(re.key==="ArrowLeft"||re.key==="ArrowUp"||re.key==="PageUp")&&(m("none"),f(be=>Math.max(be-1,0)))};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[I,o,Q.length,fe,d]),b.useEffect(()=>{var re;if(!ne)return;const Z=(re=X.current)==null?void 0:re.querySelector("[data-testid='presenter-slide-iframe']");Z&&(Z.srcdoc=ne.htmlSource)},[ne]),!ne)return null;const J=Math.min(O.width/ne.width,O.height/ne.height),ie=Math.max(320,Math.floor(ne.width*J)),ee=Math.max(240,Math.floor(ne.height*J)),me=`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(h)}' stroke='%23111827' stroke-width='2'/%3E%3C/svg%3E") 12 12, auto`,ce=d==="laser"?"none":d==="pen"?me:"default";return v.jsxs("main",{className:"fixed inset-0 z-50 overflow-hidden bg-[#111]","data-testid":"presenter-view",style:{cursor:ce},onPointerMove:q,onPointerDown:_,onPointerUp:P,onPointerLeave:H,onWheel:L,children:[v.jsxs("div",{ref:X,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:`${ie}px`,height:`${ee}px`,transform:"translate(-50%, -50%)"},children:[v.jsx("iframe",{title:"Presented slide",className:"pointer-events-none block border-0 bg-white","data-testid":"presenter-slide-iframe",style:{width:`${ne.width}px`,height:`${ne.height}px`,transform:`scale(${J})`,transformOrigin:"top left"}}),v.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 ${ne.width} ${ne.height}`,children:S.map((Z,re)=>v.jsx("path",{d:Z.points,fill:"none",stroke:Z.color,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4},`${Z.color}-${re}`))})]}),v.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:d==="laser"?1:0,transform:`translate(${T.x}px, ${T.y}px) translate(-50%, -50%)`}}),d==="pen"?v.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:ZR.map(Z=>v.jsx("button",{type:"button","aria-label":`Use pen color ${Z}`,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:Z,outline:h===Z?"2px solid rgba(255,255,255,0.9)":"none",outlineOffset:"2px"},onClick:()=>g(Z)},Z))}):null,v.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:fe,onPointerMove:fe,children:[v.jsx(In,{variant:"ghost",size:"sm","aria-label":"Previous slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>$(c-1),disabled:c===0,children:"Prev"}),v.jsxs("span",{className:"min-w-14 text-center text-[12px] font-semibold text-white/80",children:[c+1," / ",Q.length]}),v.jsx(In,{variant:"ghost",size:"sm","aria-label":"Next slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>$(c+1),disabled:c>=Q.length-1,children:"Next"}),v.jsx("span",{className:"h-5 w-px bg-white/15"}),v.jsxs(In,{variant:d==="laser"?"secondary":"ghost",size:"sm","aria-label":"Laser pointer",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>B("laser"),"aria-pressed":d==="laser",children:[v.jsx(YE,{className:"size-3.5"}),"Laser"]}),v.jsxs(In,{variant:d==="pen"?"secondary":"ghost",size:"sm","aria-label":"Pen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>B("pen"),"aria-pressed":d==="pen",children:[v.jsx(yE,{className:"size-3.5"}),"Pen"]}),v.jsxs(In,{variant:"ghost",size:"sm","aria-label":A?"Exit fullscreen":"Enter fullscreen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:M,children:[v.jsx(hE,{className:"size-3.5"}),A?"Window":"Fullscreen"]}),v.jsx("span",{className:"h-5 w-px bg-white/15"}),v.jsxs(In,{variant:"ghost",size:"sm","aria-label":"Exit presentation",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:o,children:[v.jsx(Sv,{className:"size-3.5"}),"Exit"]})]})]})}function Xx({...n}){return v.jsx(B_,{"data-slot":"context-menu",...n})}function $x({...n}){return v.jsx(U_,{"data-slot":"context-menu-trigger",...n})}function Kf({...n}){return v.jsx(q_,{"data-slot":"context-menu-sub",...n})}function Ff({className:n,inset:l,children:o,...i}){return v.jsxs(P_,{"data-slot":"context-menu-sub-trigger","data-inset":l,className:Ze("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:[o,v.jsx(P2,{className:"ml-auto size-3.5 text-foreground/40"})]})}function Qf({className:n,...l}){return v.jsx(X_,{"data-slot":"context-menu-sub-content",className:Ze("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),...l})}function Kx({className:n,...l}){return v.jsx(I_,{children:v.jsx(G_,{"data-slot":"context-menu-content",className:Ze("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),...l})})}function yt({className:n,inset:l,variant:o="default",...i}){return v.jsx(Y_,{"data-slot":"context-menu-item","data-inset":l,"data-variant":o,className:Ze("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 Js({className:n,...l}){return v.jsx(V_,{"data-slot":"context-menu-separator",className:Ze("-mx-1 my-1 h-px bg-foreground/10",n),...l})}function p0({className:n,...l}){return v.jsx("span",{"data-slot":"context-menu-shortcut",className:Ze("ml-auto text-[11px] tracking-normal text-foreground/40",n),...l})}function WR({slides:n,activeSlideId:l,slideCount:o,thumbnails:i,onSelectSlide:c,onAdd:f,onAddSlideAbove:d,onAddSlideBelow:m,onDuplicate:h,onDelete:g,onToggleHidden:x,onRename:p,onReorder:S}){const[E,T]=b.useState(null),[C,A]=b.useState(null),[R,O]=b.useState(null),[D,X]=b.useState(""),le=b.useRef(null),V=E?n.findIndex(B=>B.id===E):-1;b.useEffect(()=>{if(!R)return;const B=window.requestAnimationFrame(()=>{var I,$;(I=le.current)==null||I.focus(),($=le.current)==null||$.select()});return()=>window.cancelAnimationFrame(B)},[R]);const U=b.useCallback(B=>{B==null||B.scrollIntoView({block:"nearest",inline:"nearest"})},[]),N=b.useCallback((B,I)=>{if(!B||I===null){T(null),A(null);return}const $=n.findIndex(Y=>Y.id===B);$>=0&&$!==I&&(S==null||S(B,I)),T(null),A(null)},[S,n]),Q=b.useCallback(B=>{O(B.id),X(B.title||"Untitled Slide"),c(B.id)},[c]),ne=b.useCallback(()=>{O(null),X("")},[]),fe=b.useCallback(()=>{R&&(p==null||p(R,D),ne())},[ne,p,D,R]);return v.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:v.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col","data-testid":"slide-sidebar-panel",children:[v.jsxs("div",{className:"flex h-10 items-center justify-between border-b border-foreground/[0.06] px-3",children:[v.jsxs("div",{className:"text-[11px] font-medium uppercase tracking-wider text-foreground/50","data-testid":"slide-count",children:[v.jsx("span",{className:"tabular-nums",children:o})," slides"]}),v.jsx("button",{onClick:f,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:v.jsx(kf,{className:"size-3.5"})})]}),v.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((B,I)=>{const $=B.id===l,Y=B.hidden===!0,M=B.id===E,j=B.id===R,q=V>=0&&C===I&&I<V&&E!==B.id,P=V>=0&&C===I&&I>V&&E!==B.id;return v.jsxs(Xx,{children:[v.jsx($x,{asChild:!0,children:v.jsxs("div",{draggable:!j,onDragStart:L=>{if(j){L.preventDefault();return}T(B.id),A(I),L.dataTransfer.effectAllowed="move",L.dataTransfer.setData("text/plain",B.id)},onDragOver:L=>{L.preventDefault(),L.dataTransfer.dropEffect="move",A(I)},onDrop:L=>{L.preventDefault(),L.stopPropagation();const _=L.dataTransfer.getData("text/plain")||E;N(_,I)},onDragEnd:()=>{T(null),A(null)},className:Ze("group relative flex cursor-grab items-stretch gap-1.5 rounded-lg active:cursor-grabbing",M&&"opacity-60"),"data-testid":"slide-card",children:[q?v.jsx(g0,{}):null,v.jsx("div",{className:Ze("flex w-5 items-start justify-center pt-2 text-[11px] font-semibold tabular-nums transition-colors",$?"text-foreground":"text-foreground/55 group-hover:text-foreground/75"),children:I+1}),v.jsxs("div",{className:Ze("relative flex-1 overflow-hidden rounded-lg ring-1 ring-inset transition-all",$?"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",Y&&"opacity-40"),children:[v.jsx("button",{ref:$?U:null,className:"block w-full text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",onClick:()=>c(B.id),type:"button","aria-label":`Slide ${I+1}`,"aria-current":$?"true":void 0,children:v.jsxs("div",{className:"relative aspect-[16/9] w-full bg-white","data-testid":"slide-thumbnail",children:[i[B.id]?v.jsx("img",{alt:`Slide ${I+1}`,className:"absolute inset-0 block size-full object-cover",src:i[B.id]}):v.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/20",children:["Slide ",I+1]}),Y?v.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:v.jsx(Ay,{className:"size-2.5"})}):null]})}),v.jsx("div",{className:"h-6 border-t border-foreground/[0.04] bg-white",children:j?v.jsx("input",{ref:le,"aria-label":`Rename slide ${I+1}`,className:"h-full w-full rounded-b-lg bg-white px-2 text-[11px] text-foreground outline-none ring-1 ring-inset ring-foreground/30 focus:ring-foreground/50",value:D,onChange:L=>X(L.target.value),onBlur:fe,onKeyDown:L=>{L.key==="Enter"&&(L.preventDefault(),fe()),L.key==="Escape"&&(L.preventDefault(),ne())},onClick:L=>L.stopPropagation(),onPointerDown:L=>L.stopPropagation()}):v.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:()=>c(B.id),onDoubleClick:()=>Q(B),"aria-label":`Slide title: ${B.title||"Untitled Slide"}`,children:B.title||"Untitled Slide"})})]}),P?v.jsx(g0,{position:"after"}):null]})}),v.jsxs(Kx,{"aria-label":"Slide actions",className:"min-w-36",children:[v.jsxs(yt,{onSelect:()=>d==null?void 0:d(B.id),children:[v.jsx(kf,{className:"size-3.5"}),"Add Slide Above"]}),v.jsxs(yt,{onSelect:()=>m==null?void 0:m(B.id),children:[v.jsx(kf,{className:"size-3.5"}),"Add Slide Below"]}),v.jsx(Js,{}),v.jsxs(yt,{onSelect:()=>h==null?void 0:h(B.id),children:[v.jsx(hv,{className:"size-3.5"}),"Duplicate"]}),v.jsxs(yt,{onSelect:()=>Q(B),children:[v.jsx(bE,{className:"size-3.5"}),"Rename"]}),v.jsxs(yt,{onSelect:()=>x==null?void 0:x(B.id),children:[Y?v.jsx(pv,{className:"size-3.5"}):v.jsx(Ay,{className:"size-3.5"}),Y?"Show":"Hide"]}),v.jsx(Js,{}),v.jsxs(yt,{disabled:n.length<=1,variant:"destructive",onSelect:()=>g==null?void 0:g(B.id),children:[v.jsx(bv,{className:"size-3.5"}),"Delete"]})]})]},B.id)})})]})})}function g0({position:n="before"}){return v.jsxs("div",{className:Ze("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:[v.jsx("span",{className:"size-2 rounded-full bg-foreground/55"}),v.jsx("span",{className:"h-0.5 flex-1 rounded-full bg-foreground/55"})]})}const eN=18,tN=6,_s=24,Rs="#ef4444",Ws=40,y0=12,v0=360;function kr(n,l,o,i,c){return Math.max(n,o)-Math.min(l,i)<=c}function nN({selectionBounds:n,snapGuides:l,resizeHandles:o,rotationHandle:i,onResizeHandleMouseDown:c,onRotateHandleMouseDown:f}){const d="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 v.jsxs(v.Fragment,{children:[l.map((m,h)=>{const g=m.variant==="spacing"?"2px":"1px",x=14,p=m.variant==="spacing"?2:1,S=m.orientation==="vertical",E=S?{left:`${m.start.x}px`,top:`${Math.min(m.start.y,m.end.y)}px`,width:"0",height:`${Math.max(Math.abs(m.end.y-m.start.y),32)}px`,borderLeftWidth:g,borderLeftStyle:"solid",borderLeftColor:Rs,opacity:m.variant==="spacing"?.9:.82}:{left:`${Math.min(m.start.x,m.end.x)}px`,top:`${m.start.y}px`,width:`${Math.max(Math.abs(m.end.x-m.start.x),32)}px`,height:"0",borderTopWidth:g,borderTopStyle:"solid",borderTopColor:Rs,opacity:m.variant==="spacing"?.9:.82},T=S?{width:`${x}px`,height:`${p}px`,left:`${-x/2}px`,backgroundColor:Rs}:{width:`${p}px`,height:`${x}px`,top:`${-x/2}px`,backgroundColor:Rs};return v.jsx("div",{className:"pointer-events-none absolute z-[4]","data-testid":`snap-guide-${m.orientation}`,"data-variant":m.variant,style:E,children:m.variant==="spacing"?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...T,top:"0"}:{...T,left:"0"}}),v.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...T,bottom:"0"}:{...T,right:"0"}})]}):null},`${m.orientation}-${m.start.x}-${m.start.y}-${m.end.x}-${m.end.y}-${m.variant}-${h}`)}),v.jsx("button",{type:"button",className:`${d} cursor-alias`,"data-testid":"block-rotate-handle","aria-label":"Rotate selected element",style:{left:`${i.x}px`,top:`${i.y}px`},onMouseDown:f}),o.map(m=>v.jsx("button",{type:"button",className:`${d} cursor-nwse-resize`,"data-testid":`block-resize-handle-${m.corner}`,"aria-label":`Resize selected element from ${m.corner}`,style:{left:`${m.x}px`,top:`${m.y}px`},onMouseDown:h=>{c(m.corner,h)}},m.corner))]})}function aN({children:n,selectionCommandAvailability:l,onAlignToSlide:o,onDelete:i,onDistribute:c,onDuplicate:f,onGroup:d,onLayerOrder:m,onUngroup:h}){return v.jsxs(Xx,{children:[v.jsx($x,{asChild:!0,children:n}),v.jsxs(Kx,{"aria-label":"Selection actions",children:[v.jsxs(yt,{disabled:!l.group,onSelect:d,children:[v.jsx(fd,{className:"size-3.5"}),"Group"]}),v.jsxs(yt,{disabled:!l.ungroup,onSelect:h,children:[v.jsx(xv,{className:"size-3.5"}),"Ungroup"]}),v.jsx(Js,{}),v.jsxs(Kf,{children:[v.jsxs(Ff,{children:[v.jsx(cd,{className:"size-3.5"}),"Layer"]}),v.jsxs(Qf,{children:[v.jsxs(yt,{onSelect:()=>m("front"),children:[v.jsx(cd,{className:"size-3.5"}),"Bring to front"]}),v.jsxs(yt,{onSelect:()=>m("forward"),children:[v.jsx(Id,{className:"size-3.5"}),"Bring forward"]}),v.jsxs(yt,{onSelect:()=>m("backward"),children:[v.jsx(Zo,{className:"size-3.5"}),"Send backward"]}),v.jsxs(yt,{onSelect:()=>m("back"),children:[v.jsx(dv,{className:"size-3.5"}),"Send to back"]})]})]}),v.jsxs(Kf,{children:[v.jsxs(Ff,{children:[v.jsx(sd,{className:"size-3.5"}),"Align"]}),v.jsxs(Qf,{children:[v.jsxs(yt,{onSelect:()=>o("left"),children:[v.jsx(uv,{className:"size-3.5"}),"Align left"]}),v.jsxs(yt,{onSelect:()=>o("hcenter"),children:[v.jsx(sd,{className:"size-3.5"}),"Align horizontal center"]}),v.jsxs(yt,{onSelect:()=>o("right"),children:[v.jsx(sv,{className:"size-3.5"}),"Align right"]}),v.jsxs(yt,{onSelect:()=>o("top"),children:[v.jsx(fv,{className:"size-3.5"}),"Align top"]}),v.jsxs(yt,{onSelect:()=>o("vcenter"),children:[v.jsx(iv,{className:"size-3.5"}),"Align vertical center"]}),v.jsxs(yt,{onSelect:()=>o("bottom"),children:[v.jsx(cv,{className:"size-3.5"}),"Align bottom"]})]})]}),v.jsxs(Kf,{children:[v.jsxs(Ff,{children:[v.jsx(ud,{className:"size-3.5"}),"Distribute"]}),v.jsxs(Qf,{children:[v.jsxs(yt,{onSelect:()=>c("horizontal"),children:[v.jsx(ud,{className:"size-3.5"}),"Horizontally"]}),v.jsxs(yt,{onSelect:()=>c("vertical"),children:[v.jsx(vv,{className:"size-3.5"}),"Vertically"]})]})]}),v.jsx(Js,{}),v.jsxs(yt,{onSelect:f,children:[v.jsx(hv,{className:"size-3.5"}),"Duplicate",v.jsx(p0,{children:"⌘D"})]}),v.jsxs(yt,{variant:"destructive",onSelect:i,children:[v.jsx(bv,{className:"size-3.5"}),"Delete",v.jsx(p0,{children:"Del"})]})]})]})}const lN=[{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 rN(n,l){const o=x0(n),i=x0(l);return!o||!i?!1:o===i||S0(b0(n))===S0(b0(l))}function oN(n){const l=n.trim().toLowerCase();if(l==="bold"||l==="bolder")return!0;const o=Number.parseInt(l,10);return Number.isFinite(o)&&o>=600}function Md(n){const l=new Set,o=n.toLowerCase();if(!o||o==="none")return l;for(const i of o.split(/\s+/))(i==="underline"||i==="line-through"||i==="overline")&&l.add(i);return l}function iN(n){return sN(n)?n.trim():cN(n)??"#000000"}function sN(n){return/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function b0(n){return(n.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function x0(n){return n.toLowerCase().replace(/["']/g,"").replace(/\s+/g," ").trim()}function S0(n){return n.toLowerCase().replace(/["']/g,"").trim()}function Zf(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function cN(n){const l=n.trim().match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,/]+[\d.]+)?\s*\)$/i);return l?`#${Zf(l[1]||"0")}${Zf(l[2]||"0")}${Zf(l[3]||"0")}`:null}function Ad({feature:n,inspectedStyles:l,attributeValues:o}){var c,f;if(n.target==="attribute")return n.attributeName==="data-editor-locked"?o.locked:n.attributeName==="alt"?o.altText:n.attributeName==="aria-label"?o.ariaLabel:n.attributeName==="data-link-url"?o.linkUrl:"";if(!n.propertyName)return"";const i=fN(l,n.propertyName);return n.id==="font-family"?((f=(c=n.options)==null?void 0:c.find(d=>rN(i,d.value)))==null?void 0:f.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(Gn(i).rotate):n.controlType==="color"?iN(i):n.id==="text-align"&&i==="start"?"left":i}function w0(n,l){return n.id==="font-size"&&l.trim()?`${Math.min(200,Math.max(8,Number.parseFloat(l)||8))}px`:n.id==="font-bold"?l?"700":"400":n.id==="font-italic"?l?"italic":"normal":n.id==="font-underline"?l?"underline":"none":n.id==="font-strikethrough"?l?"line-through":"none":n.id==="locked"?l?"true":"":l.trim()}function E0(n,l,o){const i=Md(n);return o?i.delete(l):i.add(l),i.size?Array.from(i).join(" "):"none"}function Fx(n,l){return n.id==="font-bold"?oN(l):n.id==="font-italic"?l.trim().toLowerCase()==="italic":n.id==="font-underline"?Md(l).has("underline"):n.id==="font-strikethrough"?Md(l).has("line-through"):n.id==="locked"?l==="true":!!l}function uN(n,l){const o=n.options??[{label:"unset",value:""}];return!l||o.some(i=>i.value===l)?o:[{label:l,value:l},...o]}function fN(n,l){var o;return((o=n.find(i=>i.name===l))==null?void 0:o.value)??""}function dN({attributeValues:n,feature:l,inspectedStyles:o,nextValue:i,onAlignToSlide:c,onAttributeChange:f,onLayerOrder:d,onStyleChange:m}){if(l.target==="style"&&l.propertyName){const h=Ad({feature:l,inspectedStyles:o,attributeValues:n});if(l.id==="rotation"){const g=mN(o),x=Gn(g),p=Number.parseFloat(i);m(l.propertyName,Ca(x.translateX,x.translateY,Number.isFinite(p)?p:0)??"");return}if(l.id==="font-underline"){m(l.propertyName,E0(h,"underline",i===""));return}if(l.id==="font-strikethrough"){m(l.propertyName,E0(h,"line-through",i===""));return}m(l.propertyName,w0(l,i));return}if(l.target==="attribute"&&l.attributeName){f(l.attributeName,w0(l,i));return}l.id==="align-to-slide"&&c(i),l.id==="layer-order"&&d(i)}function mN(n){var l;return((l=n.find(o=>o.name==="transform"))==null?void 0:l.value)??""}const hN=[{value:"left",label:"Left",icon:LE},{value:"center",label:"Center",icon:zE},{value:"right",label:"Right",icon:jE}],pN=[{value:"left",icon:uv,label:"Align left"},{value:"hcenter",icon:sd,label:"Align horizontal center"},{value:"right",icon:sv,label:"Align right"},{value:"top",icon:fv,label:"Align top"},{value:"vcenter",icon:iv,label:"Align vertical center"},{value:"bottom",icon:cv,label:"Align bottom"}],gN=[{value:"front",icon:cd,label:"Bring to front"},{value:"forward",icon:Id,label:"Bring forward"},{value:"backward",icon:Zo,label:"Send backward"},{value:"back",icon:dv,label:"Send to back"}],yN=[{value:"horizontal",icon:ud,label:"Distribute horizontally"},{value:"vertical",icon:vv,label:"Distribute vertically"}],T0=[{id:"typography",label:"Typography",icon:Oy,subgroups:[{id:"font",label:"Font",icon:Oy,features:[{id:"font-family",label:"Font family",controlType:"select",target:"style",propertyName:"font-family",options:lN.map(n=>({label:n.label,value:n.value}))},{id:"font-size",label:"Font size",controlType:"slider",target:"style",propertyName:"font-size",min:8,max:200,step:1,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:SE,features:[{id:"line-height",label:"Line height",controlType:"slider",target:"style",propertyName:"line-height",min:.8,max:3,step:.05},{id:"text-align",label:"Text align",controlType:"action-group",target:"style",propertyName:"text-align",options:hN}]}]},{id:"appearance",label:"Appearance",icon:Ry,subgroups:[{id:"fill",label:"Fill",icon:Ry,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:I2,features:[{id:"border",label:"Border",controlType:"text",target:"style",propertyName:"border",placeholder:"1px solid #d1c1ae"},{id:"border-radius",label:"Border radius",controlType:"text",target:"style",propertyName:"border-radius",placeholder:"16px"},{id:"box-shadow",label:"Shadow",controlType:"text",target:"style",propertyName:"box-shadow",placeholder:"0 12px 30px rgba(...)"}]}]},{id:"layout",label:"Layout",icon:Ny,subgroups:[{id:"size",label:"Size",icon:Ny,features:[{id:"width",label:"Width",controlType:"text",target:"style",propertyName:"width",placeholder:"320px or auto"},{id:"height",label:"Height",controlType:"text",target:"style",propertyName:"height",placeholder:"240px or auto"}]},{id:"visibility",label:"Visibility",icon:pv,features:[{id:"opacity",label:"Opacity",controlType:"slider",target:"style",propertyName:"opacity",min:0,max:1,step:.01}]},{id:"rotation",label:"Rotation",icon:_E,features:[{id:"rotation",label:"Rotation",controlType:"number",target:"style",propertyName:"transform",min:-360,max:360,step:1,unit:"deg"}]},{id:"layer-alignment",label:"Layer, Align, Distribute",icon:yv,features:[{id:"align-to-slide",label:"Align selected element to slide bounds",controlType:"action-group",target:"operation",options:pN},{id:"layer-order",label:"Layer order",controlType:"action-group",target:"operation",options:gN},{id:"distribute",label:"Distribute selection",controlType:"action-group",target:"operation",options:yN}]},{id:"grouping",label:"Group",icon:fd,features:[{id:"group",label:"Group selection",controlType:"action-group",target:"operation",options:[{value:"group",icon:fd,label:"Group"}]},{id:"ungroup",label:"Ungroup selected group",controlType:"action-group",target:"operation",options:[{value:"ungroup",icon:xv,label:"Ungroup"}]}]}]},{id:"misc",label:"Misc",icon:_y,subgroups:[{id:"state",label:"State",icon:_y,features:[{id:"locked",label:"Lock / unlock",controlType:"toggle",target:"attribute",attributeName:"data-editor-locked"}]},{id:"link",label:"Link",icon:fE,features:[{id:"link-url",label:"Link URL",controlType:"text",target:"attribute",attributeName:"data-link-url",placeholder:"https://"}]}]},{id:"others",label:"Others",icon:jf,subgroups:[{id:"text-alternatives",label:"Text alternatives",icon:jf,features:[{id:"alt-text",label:"Alt text",controlType:"text",target:"attribute",attributeName:"alt",placeholder:"Describe this element"}]},{id:"labels",label:"Labels",icon:jf,features:[{id:"aria-label",label:"ARIA label",controlType:"text",target:"attribute",attributeName:"aria-label",placeholder:"aria-label"}]},{id:"css",label:"CSS",icon:sE,features:[{id:"custom-css",label:"Custom CSS property",controlType:"custom-css",target:"style"}]}]}],vN=200,Qx="motion-safe:duration-200 motion-safe:ease-out",Zx="motion-safe:animate-in motion-safe:fade-in-0 motion-reduce:animate-none",bN="motion-safe:animate-out motion-safe:fade-out-0 motion-reduce:animate-none";function Fo({className:n,type:l,...o}){return v.jsx("input",{type:l,"data-slot":"input",className:Ze("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),...o})}const xN=["#0F172A","#FFFFFF","#EF4444","#F97316","#F59E0B","#EAB308","#84CC16","#10B981","#06B6D4","#3B82F6","#8B5CF6","#EC4899"],SN=["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 wN({value:n,includeGradients:l=!0,onChange:o}){const i=b.useRef(null),c=b.useRef(null),f=b.useMemo(()=>EN(n),[n]),d=Jf(f),[m,h]=b.useState(d.replace("#","")),g=`hsl(${f.h}, 100%, 50%)`;b.useEffect(()=>{h(d.replace("#",""))},[d]);function x(S){var A;const E=(A=i.current)==null?void 0:A.getBoundingClientRect();if(!E)return;S.currentTarget.setPointerCapture(S.pointerId);const T=Hs((S.clientX-E.left)/E.width,0,1),C=Hs(1-(S.clientY-E.top)/E.height,0,1);o(Jf({...f,s:T,v:C}))}function p(S){var C;const E=(C=c.current)==null?void 0:C.getBoundingClientRect();if(!E)return;S.currentTarget.setPointerCapture(S.pointerId);const T=Math.round(Hs((S.clientX-E.left)/E.width,0,1)*360);o(Jf({...f,h:T===360?0:T}))}return v.jsxs("div",{className:"grid gap-3",children:[v.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:i,role:"slider","aria-label":"Color saturation and brightness","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(f.v*100),"aria-valuetext":d,tabIndex:0,style:{backgroundColor:g},onPointerDown:x,onPointerMove:S=>{S.buttons===1&&x(S)},children:v.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:d,left:`calc(${f.s*100}% + ${(.5-f.s)*22}px)`,top:`calc(${(1-f.v)*100}% + ${(f.v-.5)*22}px)`}})}),v.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:c,role:"slider","aria-label":"Hue","aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":f.h,tabIndex:0,onPointerDown:p,onPointerMove:S=>{S.buttons===1&&p(S)},children:v.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:g,left:`${f.h/360*100}%`}})}),v.jsxs("div",{className:"grid grid-cols-[40px_auto_minmax(0,1fr)] items-center gap-2",children:[v.jsx("span",{className:"size-10 rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)]",style:{background:d},"aria-hidden":"true"}),v.jsx("span",{className:"font-mono text-sm font-medium leading-none text-foreground/45",children:"#"}),v.jsx(Fo,{className:"h-8 rounded-md bg-foreground/[0.03] px-2 font-mono text-sm font-medium uppercase",type:"text",value:m,spellCheck:!1,onChange:S=>{const E=S.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6);h(E),E.length===6&&o(`#${E}`)},onBlur:()=>{h(d.replace("#",""))}})]}),v.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset colors",children:[v.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Presets"}),v.jsx("div",{className:"grid grid-cols-12 gap-1",children:xN.map(S=>v.jsx("button",{className:Ze("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",S.toLowerCase()===n.toLowerCase()&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:S},"aria-label":`Use ${S}`,onClick:()=>{o(S)}},S))})]}),l?v.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset gradients",children:[v.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Gradients"}),v.jsx("div",{className:"grid grid-cols-6 gap-1.5",children:SN.map(S=>v.jsx("button",{className:Ze("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",S===n&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:S},"aria-label":"Use gradient",onClick:()=>{o(S)}},S))})]}):null]})}function Hs(n,l,o){return Math.min(Math.max(n,l),o)}function EN(n){const l={h:220,s:.54,v:.5},o=/^#?([0-9a-f]{6})$/i.exec(n.trim());if(!o)return l;const i=o[1],c=Number.parseInt(i.slice(0,2),16)/255,f=Number.parseInt(i.slice(2,4),16)/255,d=Number.parseInt(i.slice(4,6),16)/255,m=Math.max(c,f,d),h=Math.min(c,f,d),g=m-h;let x=0;g!==0&&(m===c?x=(f-d)/g%6:m===f?x=(d-c)/g+2:x=(c-f)/g+4);const p=Math.round(x*60);return{h:p<0?p+360:p,s:m===0?0:g/m,v:m}}function Jf({h:n,s:l,v:o}){const i=o*l,c=i*(1-Math.abs(n/60%2-1)),f=o-i;let d=0,m=0,h=0;return n<60?(d=i,m=c):n<120?(d=c,m=i):n<180?(m=i,h=c):n<240?(m=c,h=i):n<300?(d=c,h=i):(d=i,h=c),`#${Wf(d+f)}${Wf(m+f)}${Wf(h+f)}`.toUpperCase()}function Wf(n){return Math.round(Hs(n,0,1)*255).toString(16).padStart(2,"0")}function TN({className:n,orientation:l="horizontal",decorative:o=!0,...i}){return v.jsx(OR,{"data-slot":"separator",decorative:o,orientation:l,className:Ze("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 CN({children:n,active:l=!1,label:o,onClick:i}){return v.jsx(In,{variant:l?"secondary":"ghost",size:"icon-sm",className:Ze("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",l&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":o,title:o,onClick:i,children:n})}function MN({children:n,active:l=!1,label:o,onClick:i}){return v.jsx(In,{variant:l?"secondary":"ghost",size:"icon-sm",className:Ze("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",l&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":o,title:o,onClick:i,children:n})}function AN({children:n,left:l,width:o="default"}){const i=b.useRef(null),[c,f]=b.useState({x:0,y:0});b.useLayoutEffect(()=>{const m=i.current;if(!m)return;const h=m.getBoundingClientRect(),g=m.closest('[data-testid="floating-toolbar-anchor"]'),x=g instanceof HTMLElement?g.getBoundingClientRect():null,p=x?x.left+l:h.left-c.x,S=x?x.bottom+8:h.top-c.y,E={bottom:S+h.height,left:p,right:p+h.width,top:S},T=16;let C=0,A=0;E.right>window.innerWidth-T&&(C=window.innerWidth-T-E.right),E.left+C<T&&(C+=T-(E.left+C)),E.bottom>window.innerHeight-T&&(A=window.innerHeight-T-E.bottom),E.top+A<T&&(A+=T-(E.top+A)),(_d(c.x,C)||_d(c.y,A))&&f({x:C,y:A})},[l,c.x,c.y]);const d=o==="wide"?"w-80 max-w-[min(320px,calc(100vw-40px))] max-h-[calc(100vh-36px)] overflow-y-auto":o==="medium"?"w-[272px]":"w-64";return v.jsx("div",{className:Ze("absolute z-50 grid gap-1.5 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)] max-[1200px]:max-w-[calc(100vw-40px)]",Qx,Zx,d),ref:i,style:{left:l+c.x,top:`calc(100% + 8px + ${c.y}px)`},role:"menu",children:n})}function _N(n){return n.features.some(l=>l.controlType==="color")?"wide":n.features.some(l=>l.controlType==="action-group")?"medium":"default"}function _d(n,l){return Math.abs(n-l)>=.5}function RN(){return v.jsx(TN,{orientation:"vertical",className:"mx-1 h-4 bg-foreground/10"})}function NN({children:n}){return v.jsx("div",{className:"inline-flex items-center gap-1.5 px-2 py-1 text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:n})}function Ul({children:n,htmlFor:l}){return v.jsx("label",{htmlFor:l,className:"text-[10px] font-medium uppercase tracking-wider text-foreground/50",children:n})}function Rd({icon:n}){return v.jsx(n,{className:"size-3.5"})}function ON({children:n,disabled:l=!1,onClick:o,title:i}){return v.jsx(In,{variant:"ghost",className:"min-h-8 w-full justify-start gap-2 rounded-md px-2 py-1.5 text-left text-[13px] font-normal text-foreground/70 hover:text-foreground",type:"button",disabled:l,title:i,onClick:o,children:n})}function zN({...n}){return v.jsx(pR,{"data-slot":"select",...n})}function DN({...n}){return v.jsx(wR,{"data-slot":"select-group",...n})}function jN({...n}){return v.jsx(yR,{"data-slot":"select-value",...n})}function kN({className:n,size:l="default",children:o,...i}){return v.jsxs(gR,{"data-slot":"select-trigger","data-size":l,className:Ze("flex w-fit items-center justify-between gap-2 rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 text-sm whitespace-nowrap shadow-none transition-colors outline-none hover:bg-foreground/[0.05] 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-8 data-[size=sm]:h-8 *: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:[o,v.jsx(vR,{asChild:!0,children:v.jsx(Zo,{className:"size-4 opacity-50"})})]})}function LN({className:n,children:l,position:o="item-aligned",align:i="center",...c}){return v.jsx(bR,{children:v.jsxs(xR,{"data-slot":"select-content",className:Ze("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-xl border border-foreground/[0.08] bg-white text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",o==="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:o,align:i,...c,children:[v.jsx(BN,{}),v.jsx(SR,{className:Ze("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:l}),v.jsx(UN,{})]})})}function HN({className:n,children:l,...o}){return v.jsxs(ER,{"data-slot":"select-item",className:Ze("relative flex w-full cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-[13px] text-foreground/70 outline-hidden select-none focus:bg-foreground/[0.04] 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),...o,children:[v.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:v.jsx(CR,{children:v.jsx(mv,{className:"size-4"})})}),v.jsx(TR,{children:l})]})}function BN({className:n,...l}){return v.jsx(MR,{"data-slot":"select-scroll-up-button",className:Ze("flex cursor-default items-center justify-center py-1",n),...l,children:v.jsx(Id,{className:"size-4"})})}function UN({className:n,...l}){return v.jsx(AR,{"data-slot":"select-scroll-down-button",className:Ze("flex cursor-default items-center justify-center py-1",n),...l,children:v.jsx(Zo,{className:"size-4"})})}const Ns="__empty__";function IN({currentValue:n,feature:l,onClosePanel:o,onCommitFeature:i,operationAvailability:c,onStyleChange:f}){const d=`floating-${l.id}`;if(l.controlType==="select")return v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ul,{htmlFor:d,children:l.label}),v.jsxs(zN,{value:n||Ns,onValueChange:m=>i(l,m===Ns?"":m),children:[v.jsx(kN,{id:d,"aria-label":l.label,size:"sm",className:"h-8 rounded-md border-transparent bg-foreground/[0.03] px-2 text-xs shadow-none hover:bg-foreground/[0.06]","data-value":n,children:v.jsx(jN,{})}),v.jsx(LN,{children:v.jsx(DN,{children:uN(l,n).map(m=>v.jsx(HN,{value:m.value||Ns,"data-value":m.value,style:l.id==="font-family"&&m.value?{fontFamily:m.value}:void 0,children:m.label},m.value||Ns))})})]})]},l.id);if(l.controlType==="color")return v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ul,{children:l.label}),v.jsx(wN,{value:n,includeGradients:l.id==="background-color",onChange:m=>i(l,m)})]},l.id);if(l.controlType==="toggle"){const m=Fx(l,n);return v.jsx(In,{type:"button",variant:m?"secondary":"outline","aria-pressed":m,onClick:()=>i(l,m?"":"true"),children:l.label},l.id)}return l.controlType==="slider"||l.controlType==="number"?v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ul,{htmlFor:d,children:l.label}),v.jsx(Fo,{id:d,type:"number",min:l.min,max:l.max,step:l.step,value:n,onChange:m=>i(l,m.target.value),className:"h-8 rounded-md bg-foreground/[0.03] px-2 text-[13px] tabular-nums"})]},l.id):l.controlType==="action-group"?v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ul,{children:l.label}),v.jsx("div",{className:"grid gap-1",children:(l.options??[]).map(m=>{const h=m.icon,g=l.target==="operation"&&c?c[l.id]===!1:!1;return v.jsxs(ON,{disabled:g,title:m.label,onClick:()=>{g||(i(l,m.value),o())},children:[h?v.jsx(Rd,{icon:h}):null,v.jsx("span",{children:m.label})]},m.value)})})]},l.id):l.controlType==="custom-css"?v.jsx(GN,{onCommit:f},l.id):v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ul,{htmlFor:d,children:l.label}),v.jsx(Fo,{id:d,type:"text",value:n,placeholder:l.placeholder,onChange:m=>i(l,m.target.value),className:"h-8 rounded-md bg-foreground/[0.03] px-2 text-[13px]"})]},l.id)}function GN({onCommit:n}){const l=b.useId(),o=b.useId(),[i,c]=b.useState(""),[f,d]=b.useState("");function m(){const h=i.trim();h&&(n(h,f.trim()),d(""))}return v.jsxs("div",{className:"grid gap-2",children:[v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ul,{htmlFor:l,children:"Property name"}),v.jsx(Fo,{id:l,type:"text",value:i,placeholder:"e.g. justify-content",onChange:h=>c(h.target.value)})]}),v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Ul,{htmlFor:o,children:"Property value"}),v.jsx(Fo,{id:o,type:"text",value:f,placeholder:"e.g. space-between",onChange:h=>d(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),m())}})]}),v.jsx(In,{type:"button",variant:"outline",disabled:!i.trim(),onClick:m,children:"Apply property"})]})}function YN({inspectedStyles:n,selectedElementType:l,selectionCommandAvailability:o,attributeValues:i,onStyleChange:c,onAttributeChange:f,onAlignToSlide:d,onDistribute:m,onGroup:h,onLayerOrder:g,onUngroup:x}){const p=b.useRef(null),[S,E]=b.useState(null),[T,C]=b.useState(0),[A,R]=b.useState(0),O=b.useRef(0);b.useEffect(()=>{if(p.current)return()=>{const Q=p.current,ne=Q==null?void 0:Q.closest('[data-testid="stage-panel"]');if(!(Q instanceof HTMLElement)||!(ne instanceof HTMLElement))return;const fe=Q.getBoundingClientRect(),B=ne.getBoundingClientRect(),I=Q.cloneNode(!0);I instanceof HTMLElement&&(I.className=Ze(I.className,"absolute z-40 m-0 pointer-events-none"),I.classList.remove("motion-safe:animate-in","motion-safe:fade-in-0"),I.className=Ze(I.className,bN),I.setAttribute("aria-hidden","true"),I.style.left=`${fe.left-B.left}px`,I.style.top=`${fe.top-B.top}px`,I.style.width=`${fe.width}px`,I.style.height=`${fe.height}px`,ne.appendChild(I),I.addEventListener("animationend",()=>{I.remove()}),window.setTimeout(()=>{I.remove()},vN+50))}},[]),b.useLayoutEffect(()=>{const N=p.current;if(!N)return;const Q=N.getBoundingClientRect(),ne=Q.left-O.current,fe=Q.right-O.current,B=16;let I=0;ne<B&&(I=B-ne),fe+I>window.innerWidth-B&&(I+=window.innerWidth-B-(fe+I)),_d(O.current,I)&&(O.current=I,R(I))},[]),b.useEffect(()=>{function N(Q){var ne;(ne=p.current)!=null&&ne.contains(Q.target)||E(null)}return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),b.useEffect(()=>{function N(Q){Q.key==="Escape"&&E(null)}return document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[]);function D(N,Q){C(Q),E(ne=>ne===N?null:N)}function X(N,Q){if(N.id==="distribute"){m(Q);return}if(N.id==="group"){h();return}if(N.id==="ungroup"){x();return}dN({attributeValues:i,feature:N,inspectedStyles:n,nextValue:Q,onAlignToSlide:d,onAttributeChange:f,onLayerOrder:g,onStyleChange:c})}const le=VN(l);return v.jsxs("div",{className:Ze("relative grid w-max min-w-max max-w-[min(980px,calc(100vw-280px))] gap-2 text-foreground pointer-events-auto max-[1200px]:w-full max-[1200px]:min-w-0",Qx,Zx),ref:p,style:{marginLeft:A},children:[v.jsx("div",{className:"flex w-max items-center gap-0.5 overflow-x-auto overflow-y-hidden rounded-md border border-foreground/[0.08] bg-white px-1.5 py-1.5 shadow-[0_2px_12px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.06)] max-[1200px]:min-w-[760px]","aria-label":"Formatting toolbar",children:le.map((N,Q)=>v.jsxs("div",{className:"contents",children:[Q>0?v.jsx(RN,{}):null,v.jsx("div",{className:"flex items-center gap-0.5 rounded-md bg-foreground/[0.02] px-0.5",children:N.subgroups.map(ne=>{const fe=ne.features.length===1?ne.features[0]:null;return(fe==null?void 0:fe.controlType)==="toggle"?V(ne,fe):v.jsx(CN,{active:S===ne.id,label:ne.label,onClick:B=>D(ne.id,B.currentTarget.offsetLeft),children:v.jsx(Rd,{icon:ne.icon})},ne.id)})})]},N.id))}),le.flatMap(N=>N.subgroups).map(N=>S===N.id?v.jsxs(AN,{left:T,width:_N(N),children:[v.jsx(NN,{children:N.label}),v.jsx("div",{className:"grid gap-2",children:N.features.map(U)})]},N.id):null)]});function V(N,Q){const ne=Ad({feature:Q,inspectedStyles:n,attributeValues:i}),fe=Fx(Q,ne);return v.jsx(MN,{label:Q.label,active:fe,onClick:()=>X(Q,fe?"":"true"),children:v.jsx(Rd,{icon:N.icon})},N.id)}function U(N){return IN({currentValue:Ad({feature:N,inspectedStyles:n,attributeValues:i}),feature:N,onClosePanel:()=>E(null),onCommitFeature:X,operationAvailability:o,onStyleChange:c})}}function VN(n){return n!=="group"?T0:T0.flatMap(l=>l.id!=="layout"?[]:[{...l,subgroups:l.subgroups.filter(o=>["size","rotation","layer-alignment","grouping"].includes(o.id))}])}const C0={borderColor:"#facc15",backgroundColor:"rgba(250, 204, 21, 0.08)",boxShadow:"0 0 0 1px rgba(24, 24, 27, 0.2)"};function qN({slideWidth:n,slideHeight:l,offsetX:o,offsetY:i,scale:c,preselectionOverlay:f,selectionOverlay:d,toolbarKey:m,inspectedStyles:h,selectedElementType:g,selectionCommandAvailability:x,groupScopeOverlayPassive:p,isEditingText:S,manipulationOverlay:E,attributeValues:T,iframeRef:C,stageViewportRef:A,selectionOverlayRef:R,isManipulating:O,onSelectionOverlayMouseDown:D,onSelectionOverlayMouseUp:X,onSelectionOverlayMouseMove:le,onStageMouseLeave:V,onResizeHandleMouseDown:U,onRotateHandleMouseDown:N,onSelectionOverlayDoubleClick:Q,onBackgroundClick:ne,onStyleChange:fe,onAttributeChange:B,onAlignToSlide:I,onDistribute:$,onGroup:Y,onLayerOrder:M,onUngroup:j,onDuplicate:q,onDelete:P}){const L=(H,J)=>{H===J&&ne()},_=d?PN({selectionOverlay:d,offsetX:o,scale:c,slideWidth:n}):void 0;return v.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:A,onClick:H=>{L(H.target,H.currentTarget)},onKeyDown:H=>{(H.key==="Enter"||H.key===" ")&&L(H.target,H.currentTarget)},onMouseLeave:V,children:[d&&!O&&!S?v.jsx("div",{className:"pointer-events-none absolute z-40 w-max max-[1200px]:static max-[1200px]:mb-4 max-[1200px]:pointer-events-auto",style:_,"data-testid":"floating-toolbar-anchor",children:v.jsx(YN,{inspectedStyles:h,selectedElementType:g,selectionCommandAvailability:x,attributeValues:T,onStyleChange:fe,onAttributeChange:B,onAlignToSlide:I,onDistribute:$,onGroup:Y,onLayerOrder:M,onUngroup:j},m)}):null,S?v.jsx("p",{className:"absolute left-10 top-4 z-40 rounded-md border border-foreground/[0.06] bg-white px-3 py-2 text-[12px] leading-normal text-foreground/65 shadow-sm",children:"Editing text. Press Enter to save or Escape to cancel."}):null,v.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:`${l}px`,left:`${o}px`,top:`${i}px`,transform:`scale(${c})`},children:v.jsx("iframe",{ref:C,title:"Slide canvas",className:"size-full border-0 bg-white","data-testid":"slide-iframe"})}),f&&!S&&!O?v.jsx("div",{"data-testid":"preselection-overlay",className:"pointer-events-none absolute z-[2] border border-dashed",style:{...C0,left:`${f.x}px`,top:`${f.y}px`,width:`${f.width}px`,height:`${f.height}px`}}):null,d&&!S?v.jsx(aN,{selectionCommandAvailability:x,onAlignToSlide:I,onDelete:P,onDistribute:$,onDuplicate:q,onGroup:Y,onLayerOrder:M,onUngroup:j,children:v.jsx("div",{ref:R,"data-testid":"selection-overlay",className:Ze("absolute z-[3] border border-dashed",p?"pointer-events-none":"pointer-events-auto"),style:{...C0,left:`${d.x}px`,top:`${d.y}px`,width:`${d.width}px`,height:`${d.height}px`},onMouseDown:D,onMouseMove:le,onMouseUp:X,onDoubleClick:H=>{Q(H)}})}):null,E?v.jsx(nN,{selectionBounds:E.selectionBounds,snapGuides:E.snapGuides,resizeHandles:E.resizeHandles,rotationHandle:E.rotationHandle,onResizeHandleMouseDown:U,onRotateHandleMouseDown:N}):null]})}function PN({selectionOverlay:n,offsetX:l,scale:o,slideWidth:i}){const f=l,d=l+i*o,m=Math.max((d-f)/2,0),h=Math.min(288,m),g=f+h,x=d-h,p=n.x+n.width/2;return{left:`${Math.min(Math.max(p,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 XN({delayDuration:n=0,...l}){return v.jsx(FR,{"data-slot":"tooltip-provider",delayDuration:n,...l})}function Nd(n,l,o){return c2(n,l,o)}function qo(n,l,o){var f;if(typeof DOMParser>"u")return"";const c=new DOMParser().parseFromString(n.htmlSource,"text/html").querySelector(`[${Ee}="${l}"]`);return((f=c==null?void 0:c.getAttribute(o))==null?void 0:f.trim())??""}function $N({elementId:n,nextValue:l,propertyName:o,slide:i}){const c=Nd(i,n,o),f=l.trim();return c===f?null:{type:"style.update",slideId:i.id,elementId:n,propertyName:o,previousValue:c,nextValue:f,timestamp:Date.now()}}function KN({attributeName:n,elementId:l,nextValue:o,slide:i}){const c=qo(i,l,n),f=o.trim();return c===f?null:{type:"attribute.update",slideId:i.id,elementId:l,attributeName:n,previousValue:c,nextValue:f,timestamp:Date.now()}}function cl(n){return Math.round(n*100)/100}function Jx(n,l){var m;if(typeof DOMParser>"u")return n;const c=(m=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:m.content.firstElementChild;if(!(c instanceof HTMLElement))return n;const f=Gn(c.style.transform),d=Ca(0,0,f.rotate);return c.style.position="absolute",c.style.left=`${cl(l.x)}px`,c.style.top=`${cl(l.y)}px`,c.style.width=`${cl(l.width)}px`,c.style.height=`${cl(l.height)}px`,c.style.margin="0px",c.style.boxSizing="border-box",d?c.style.transform=d:c.style.removeProperty("transform"),c.style.transformOrigin||(c.style.transformOrigin="center center"),c.outerHTML}function Wx(n,l){return{x:n.left-l.left,y:n.top-l.top,width:n.width,height:n.height}}function FN(n,l,o){var d;const i=(d=n.current)==null?void 0:d.contentDocument,c=i==null?void 0:i.querySelector(l.rootSelector),f=c==null?void 0:c.getBoundingClientRect();return{width:(f==null?void 0:f.width)||o.width,height:(f==null?void 0:f.height)||o.height}}function Od(n,l,o){return{x:cl(n.x+l),y:cl(n.y+o),width:n.width,height:n.height}}function QN(n){return n.length?n.reduce((l,o)=>{const i=Math.min(l.x,o.x),c=Math.min(l.y,o.y),f=Math.max(l.x+l.width,o.x+o.width),d=Math.max(l.y+l.height,o.y+o.height);return{x:i,y:c,width:f-i,height:d-c}}):null}function ZN(n,l,o){const i=Math.max(0,o.width-n.width),c=Math.max(0,o.height-n.height),f=Math.min(i,Math.max(0,n.x+l)),d=Math.min(c,Math.max(0,n.y+l));return{x:cl(f-n.x),y:cl(d-n.y)}}function e1(n,l){const o=[];return l.vertical&&o.push(...M0(n,l.vertical,"vertical")),l.horizontal&&o.push(...M0(n,l.horizontal,"horizontal")),o}function M0(n,l,o){return l.target.kind==="spacing"?WN(n,l,o):[JN(n,l,o)]}function JN(n,l,o){const i=l.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,o==="vertical"){const m=A0(n,l.anchor,"vertical");if(i.kind==="slide")return{orientation:o,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 h=Math.min(n.y,i.rect.y),g=Math.max(n.y+n.height,i.rect.y+i.rect.height);return{orientation:o,start:{x:m,y:h-_s},end:{x:m,y:g+_s},variant:"alignment"}}const c=A0(n,l.anchor,"horizontal");if(i.kind==="slide")return{orientation:o,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 f=Math.min(n.x,i.rect.x),d=Math.max(n.x+n.width,i.rect.x+i.rect.width);return{orientation:o,start:{x:f-_s,y:c},end:{x:d+_s,y:c},variant:"alignment"}}function WN(n,l,o){const i=l.target.relatedRects;if(i.length<2)return[];const[c,f]=i;if(!c||!f)return[];if(o==="vertical"){const E=c.x<=f.x?c:f,T=E===c?f:c,C=E.x+E.width,A=T.x,R=l.anchor==="start"?n.x:n.x+n.width,O={orientation:"horizontal",start:{x:C,y:E.y+E.height/2},end:{x:A,y:T.y+T.height/2},variant:"spacing"},D={orientation:"horizontal",start:l.anchor==="start"?{x:T.x+T.width,y:T.y+T.height/2}:{x:E.x,y:E.y+E.height/2},end:{x:R,y:n.y+n.height/2},variant:"spacing"};return[O,D]}const d=c.y<=f.y?c:f,m=d===c?f:c,h=d.y+d.height,g=m.y,x=l.anchor==="start"?n.y:n.y+n.height,p={orientation:"vertical",start:{x:d.x+d.width/2,y:h},end:{x:m.x+m.width/2,y:g},variant:"spacing"},S={orientation:"vertical",start:l.anchor==="start"?{x:m.x+m.width/2,y:m.y+m.height}:{x:d.x+d.width/2,y:d.y},end:{x:n.x+n.width/2,y:x},variant:"spacing"};return[p,S]}function A0(n,l,o){return o==="vertical"?l==="start"?n.x:l==="end"?n.x+n.width:n.x+n.width/2:l==="start"?n.y:l==="end"?n.y+n.height:n.y+n.height/2}function e5({activeSlide:n,doc:l,rootRect:o,selectedElementId:i,slideStageRect:c,stageGeometry:f}){var S;const d=(E,T)=>({position:E,rect:c,kind:"slide",role:T,anchor:null,priority:T==="center"?0:2,elementId:null,relatedRects:[]}),m=[d(c.x,"start"),d(c.x+c.width/2,"center"),d(c.x+c.width,"end")],h=[d(c.y,"start"),d(c.y+c.height/2,"center"),d(c.y+c.height,"end")],g=l.querySelector(`[data-editor-id="${i}"]`),x=[];for(const E of n.elements){if(E.id===i)continue;const T=l.querySelector(`[data-editor-id="${E.id}"]`);if(!T||g&&(g.contains(T)||T.contains(g)))continue;const C=(S=l.defaultView)==null?void 0:S.getComputedStyle(T);if((C==null?void 0:C.display)==="none"||(C==null?void 0:C.visibility)==="hidden")continue;const A=T.getBoundingClientRect();if(A.width<=0||A.height<=0)continue;const R=Lr(A,o,f);(E.type==="block"||E.type==="image")&&x.push({elementId:E.id,rect:R});const O=R.x,D=R.x+R.width/2,X=R.x+R.width,le=R.y,V=R.y+R.height/2,U=R.y+R.height,N=(Q,ne)=>({position:Q,rect:R,kind:"element",role:ne,anchor:null,priority:ne==="center"?3:4,elementId:E.id,relatedRects:[]});m.push(N(O,"start"),N(D,"center"),N(X,"end")),h.push(N(le,"start"),N(V,"center"),N(U,"end"))}const p=t5(x);return m.push(...p.vertical),h.push(...p.horizontal),{vertical:m,horizontal:h}}function t5(n){const l=[],o=[],i=n.slice().sort((f,d)=>f.rect.x-d.rect.x).filter(f=>f.rect.width>0&&f.rect.height>0),c=n.slice().sort((f,d)=>f.rect.y-d.rect.y).filter(f=>f.rect.width>0&&f.rect.height>0);for(let f=0;f<i.length-1;f+=1){const d=i[f],m=i[f+1];if(!d||!m)continue;if(!kr(d.rect.x,d.rect.x+d.rect.width,m.rect.x,m.rect.x+m.rect.width,0)){const g=m.rect.x-(d.rect.x+d.rect.width);g>=y0&&g<=v0&&kr(d.rect.y,d.rect.y+d.rect.height,m.rect.y,m.rect.y+m.rect.height,Ws)&&l.push(Os({position:m.rect.x+m.rect.width+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),Os({position:d.rect.x-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}for(let f=0;f<c.length-1;f+=1){const d=c[f],m=c[f+1];if(!d||!m)continue;if(!kr(d.rect.y,d.rect.y+d.rect.height,m.rect.y,m.rect.y+m.rect.height,0)){const g=m.rect.y-(d.rect.y+d.rect.height);g>=y0&&g<=v0&&kr(d.rect.x,d.rect.x+d.rect.width,m.rect.x,m.rect.x+m.rect.width,Ws)&&o.push(Os({position:m.rect.y+m.rect.height+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),Os({position:d.rect.y-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}return{vertical:l,horizontal:o}}function Os({position:n,rect:l,anchor:o,relatedRects:i}){return{position:n,rect:l,kind:"spacing",role:"end",anchor:o,priority:1,elementId:null,relatedRects:i}}function n5(n,l){const o=ec([{anchor:"start",position:n.x},{anchor:"center",position:n.x+n.width/2},{anchor:"end",position:n.x+n.width}],l.vertical,n,"vertical"),i=ec([{anchor:"start",position:n.y},{anchor:"center",position:n.y+n.height/2},{anchor:"end",position:n.y+n.height}],l.horizontal,n,"horizontal"),c={...n,x:n.x+((o==null?void 0:o.delta)??0),y:n.y+((i==null?void 0:i.delta)??0)};return{rect:c,guides:e1(c,{vertical:o,horizontal:i})}}function a5(n,l,o){const i={...n},c=l==="top-left"||l==="bottom-left"?"start":"end",f=l==="top-left"||l==="top-right"?"start":"end",d=ec([{anchor:c,position:c==="start"?n.x:n.x+n.width}],o.vertical,n,"vertical"),m=ec([{anchor:f,position:f==="start"?n.y:n.y+n.height}],o.horizontal,n,"horizontal");if(d)if(c==="start"){const h=i.width-d.delta;h>=48&&(i.x+=d.delta,i.width=h)}else{const h=i.width+d.delta;h>=48&&(i.width=h)}if(m)if(f==="start"){const h=i.height-m.delta;h>=48&&(i.y+=m.delta,i.height=h)}else{const h=i.height+m.delta;h>=48&&(i.height=h)}return{rect:i,guides:e1(i,{vertical:m,horizontal:d})}}function ec(n,l,o,i){const c=c5(l);let f=null;for(const d of n)for(const m of c){if(!i5(o,m,i)||m.anchor&&m.anchor!==d.anchor)continue;const h=m.position-d.position;if(Math.abs(h)>eN)continue;const x=_0({anchor:d.anchor,delta:h,target:m},o,i),p=f?_0(f,o,i):Number.POSITIVE_INFINITY;x>=p||(f={anchor:d.anchor,delta:h,target:m})}return f}function _0(n,l,o){const i=Math.abs(n.delta),c=n.target.kind==="spacing"?Math.max(0,i-tN):i,f=l5(n.target);return c*1e3+f+n.target.priority+r5(n.anchor,n.target)+o5(l,n.target,o)/100}function l5(n){return n.kind==="element"?0:n.kind==="spacing"?8:16}function r5(n,l){return l.kind==="slide"&&l.role==="center"&&n!=="center"?25:0}function o5(n,l,o){return l.kind==="slide"?0:o==="vertical"?R0(n.y,n.y+n.height,l.rect.y,l.rect.y+l.rect.height):R0(n.x,n.x+n.width,l.rect.x,l.rect.x+l.rect.width)}function R0(n,l,o,i){return l<o?o-l:i<n?n-i:0}function i5(n,l,o){return l.kind==="slide"?!0:l.kind==="spacing"?s5(n,l,o):!0}function s5(n,l,o){if(l.relatedRects.length<2)return!1;if(o==="vertical"){const f=Math.min(...l.relatedRects.map(m=>m.y)),d=Math.max(...l.relatedRects.map(m=>m.y+m.height));return kr(n.y,n.y+n.height,f,d,Ws)}const i=Math.min(...l.relatedRects.map(f=>f.x)),c=Math.max(...l.relatedRects.map(f=>f.x+f.width));return kr(n.x,n.x+n.width,i,c,Ws)}function c5(n){const l=new Set;return n.filter(o=>{const i=`${o.kind}:${o.elementId??"slide"}:${o.position.toFixed(2)}`;return l.has(i)?!1:(l.add(i),!0)})}function zs(n){return`${Math.round(n*100)/100}px`}function ol(n,l){return Math.max(n,48*l)}function zd(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function u5(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function f5(n){const[l,...o]=n;return l?o.reduce((i,c)=>{const f=Math.min(i.x,c.x),d=Math.min(i.y,c.y),m=Math.max(i.x+i.width,c.x+c.width),h=Math.max(i.y+i.height,c.y+c.height);return{x:f,y:d,width:m-f,height:h-d}},l):{x:0,y:0,width:0,height:0}}function N0(n,l,o,i){return Math.atan2(l-i,n-o)*180/Math.PI}function d5({resizeCorner:n,scale:l,stageDeltaX:o,stageDeltaY:i,startStageRect:c}){let f=c.x,d=c.y,m=c.width,h=c.height;switch(n){case"top-left":{m=ol(c.width-o,l),h=ol(c.height-i,l),f=c.x+(c.width-m),d=c.y+(c.height-h);break}case"top-right":{m=ol(c.width+o,l),h=ol(c.height-i,l),d=c.y+(c.height-h);break}case"bottom-left":{m=ol(c.width-o,l),h=ol(c.height+i,l),f=c.x+(c.width-m);break}default:{m=ol(c.width+o,l),h=ol(c.height+i,l);break}}return{x:f,y:d,width:m,height:h}}function Bs(n,l){for(const o of Ud)n.style[o]=l[o]??""}function m5(n){return n.elementIds.map(l=>{const o=n.targetNodes[l],i=n.previousStyles[l];if(!o||!i)return null;const c=Po(o);return JSON.stringify(c)===JSON.stringify(i)?null:{type:"element.layout.update",slideId:n.slideId,elementId:l,previousStyle:i,nextStyle:c,timestamp:Date.now()}}).filter(l=>!!l)}function h5(n,l){return l.length===1?l[0]:{type:"operation.batch",slideId:n.slideId,operations:l,timestamp:Date.now()}}function p5({isEditingText:n,isManipulating:l,selectedElement:o,selectedElementId:i,snapGuides:c,stageRect:f}){return!f||!i||!u5(o)||n?null:{selectionBounds:f,snapGuides:l?c:[],resizeHandles:[{corner:"top-left",x:f.x,y:f.y},{corner:"top-right",x:f.x+f.width,y:f.y},{corner:"bottom-right",x:f.x+f.width,y:f.y+f.height},{corner:"bottom-left",x:f.x,y:f.y+f.height}],rotationHandle:{x:f.x+f.width/2,y:f.y+f.height+20}}}function g5({activeSlide:n,selectedElement:l,selectedElementId:o,selectedElementIds:i,selectedStageRect:c,iframeRef:f,stageGeometry:d,isEditingText:m,onCommitOperation:h}){const{offsetX:g,offsetY:x,scale:p,slideHeight:S,slideWidth:E}=d,T=b.useRef(null),C=b.useRef(null),[A,R]=b.useState(!1),[O,D]=b.useState(!1),[X,le]=b.useState(null),[V,U]=b.useState([]),Q=p5({isEditingText:m,isManipulating:A,selectedElement:l,selectedElementId:o,snapGuides:V,stageRect:X??c});b.useEffect(()=>()=>{T.current=null,C.current&&window.clearTimeout(C.current)},[]),b.useEffect(()=>{(!n||!o||!zd(l)||m)&&(T.current=null,R(!1),le(null))},[n,m,l,o]),b.useEffect(()=>{A||(le(null),U([]))},[A]);const ne=b.useCallback(()=>{D(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{D(!1),C.current=null},0)},[]),fe=b.useCallback((B,I,$=null)=>{var Ot;if(!n||!o||!c||!zd(l)||m)return;const Y=(Ot=f.current)==null?void 0:Ot.contentDocument;if(!Y)return;const M=Y.querySelector(n.rootSelector),j=$e(Y,o);if(!M||!j)return;const q=y5({activeSlide:n,doc:Y,mode:B,selectedElementId:o,selectedElementIds:i}),P=Object.fromEntries(q.map(De=>[De,$e(Y,De)]).filter(De=>!!De[1]));if(!Object.keys(P).length)return;const L=Object.fromEntries(Object.entries(P).map(([De,ye])=>[De,Po(ye)])),_=Object.fromEntries(Object.entries(P).map(([De,ye])=>[De,v5(ye,P)])),H=f.current,J=(H==null?void 0:H.style.pointerEvents)||"";I.preventDefault(),I.stopPropagation();const ie=j.getBoundingClientRect(),ee=M.getBoundingClientRect(),me={x:g,y:x,width:E*p,height:S*p},ce={scale:p,offsetX:g,offsetY:x},Z=e5({activeSlide:n,doc:Y,rootRect:ee,selectedElementId:o,slideStageRect:me,stageGeometry:ce}),re=Object.values(P).map(De=>Lr(De.getBoundingClientRect(),ee,ce)),be=Object.fromEntries(Object.entries(P).map(([De,ye])=>[De,Lr(ye.getBoundingClientRect(),ee,ce)])),Me=Object.fromEntries(Object.values(P).map(De=>De.parentElement).filter(De=>!!De).map(De=>[t1(De),Lr(De.getBoundingClientRect(),ee,ce)])),Ae=re.length?f5(re):c;T.current={slideId:n.id,elementId:o,elementIds:Object.keys(P),mode:B,resizeCorner:$,startPointer:{x:I.clientX,y:I.clientY},startStageRect:Ae,centerPoint:{x:ie.left+ie.width/2,y:ie.top+ie.height/2},previousStyle:L[o],previousStyles:L,startElementStageRects:be,resizeParentElementIds:_,startParentStageRects:Me,targetNodes:P,snapTargets:Z},R(!0),U([]),H&&(H.style.pointerEvents="none");const Pe=De=>{const ye=T.current;if(!ye)return;De.preventDefault();const on=De.clientX-ye.startPointer.x,sn=De.clientY-ye.startPointer.y;if(ye.mode==="move"){const xn={x:ye.startStageRect.x+on,y:ye.startStageRect.y+sn,width:ye.startStageRect.width,height:ye.startStageRect.height},zt=De.altKey?{rect:xn,guides:[]}:n5(xn,ye.snapTargets);le(zt.rect),U(zt.guides);const Ra=(zt.rect.x-ye.startStageRect.x)/p,Ft=(zt.rect.y-ye.startStageRect.y)/p;for(const qn of ye.elementIds){const Qt=ye.targetNodes[qn],kn=ye.previousStyles[qn];if(!Qt||!kn)continue;const Vt=Gn(kn.transform);Bs(Qt,{...kn,transform:Ca(Vt.translateX+Ra,Vt.translateY+Ft,Vt.rotate),transformOrigin:kn.transformOrigin||"center center"})}return}if(ye.mode==="resize"){const xn=d5({resizeCorner:ye.resizeCorner,scale:p,stageDeltaX:on,stageDeltaY:sn,startStageRect:ye.startStageRect}),zt=De.altKey||!ye.resizeCorner?{rect:xn,guides:[]}:a5(xn,ye.resizeCorner,ye.snapTargets);le(zt.rect),U(zt.guides),b5(ye,zt.rect,{offsetX:g,offsetY:x,scale:p});return}const et=Gn(ye.previousStyle.transform),Lt=N0(ye.startPointer.x,ye.startPointer.y,ye.centerPoint.x,ye.centerPoint.y),_t=N0(De.clientX,De.clientY,ye.centerPoint.x,ye.centerPoint.y);Bs(j,{...ye.previousStyle,transform:Ca(et.translateX,et.translateY,et.rotate+(_t-Lt)),transformOrigin:"center center"}),U([])},Ge=()=>{window.removeEventListener("mousemove",Pe),window.removeEventListener("mouseup",Yt),window.removeEventListener("keydown",St),H&&(H.style.pointerEvents=J)},Yt=()=>{const De=T.current;if(Ge(),R(!1),ne(),T.current=null,U([]),!De)return;const ye=m5(De);if(!ye.length){le(null);return}h(h5(De,ye))},St=De=>{if(De.key!=="Escape")return;const ye=T.current;if(Ge(),R(!1),ne(),T.current=null,U([]),!!ye){for(const on of ye.elementIds){const sn=ye.targetNodes[on],et=ye.previousStyles[on];sn&&et&&Bs(sn,et)}le(null)}};window.addEventListener("mousemove",Pe),window.addEventListener("mouseup",Yt),window.addEventListener("keydown",St)},[n,f,m,h,l,o,i,c,p,g,x,E,S,ne]);return{manipulationOverlay:Q,isManipulating:A,suppressBackgroundClear:O,beginMove:B=>{fe("move",B)},beginResize:(B,I)=>{fe("resize",I,B)},beginRotate:B=>{fe("rotate",B)}}}function y5({activeSlide:n,doc:l,mode:o,selectedElementId:i,selectedElementIds:c}){const f=c.filter(m=>{const h=n.elements.find(g=>g.id===m);return zd(h)});if(o==="move")return f;if(o==="rotate")return[i];const d=new Set;for(const m of f.length?f:[i]){const h=$e(l,m);if(h&&(d.add(m),h.getAttribute("data-group")==="true"))for(const g of h.querySelectorAll(`[data-editable][${Ee}]`)){const x=g.getAttribute(Ee);x&&d.add(x)}}return[...d]}function v5(n,l){const o=Object.entries(l);let i=n.parentElement;for(;i;){const c=o.find(([,f])=>f===i);if(c)return c[0];i=i.parentElement}return null}function b5(n,l,o){const i=n.startStageRect.width>0?l.width/n.startStageRect.width:1,c=n.startStageRect.height>0?l.height/n.startStageRect.height:1,f={x:o.offsetX,y:o.offsetY},d=Object.fromEntries(Object.entries(n.startElementStageRects).map(([m,h])=>[m,{x:l.x+(h.x-n.startStageRect.x)*i,y:l.y+(h.y-n.startStageRect.y)*c,width:h.width*i,height:h.height*c}]));for(const m of n.elementIds){const h=n.targetNodes[m],g=n.previousStyles[m],x=d[m];if(!h||!g||!x)continue;const p=n.resizeParentElementIds[m]?d[n.resizeParentElementIds[m]]:n.startParentStageRects[t1(h.parentElement)]??f;if(!p)continue;const S=Gn(g.transform);Bs(h,{...g,position:g.position||"absolute",left:zs((x.x-p.x)/o.scale),top:zs((x.y-p.y)/o.scale),width:zs(x.width/o.scale),height:zs(x.height/o.scale),transform:Ca(0,0,S.rotate),transformOrigin:g.transformOrigin||"center center"})}}function t1(n){return n!=null&&n.getAttribute(Ee)?`editable:${n.getAttribute(Ee)}`:"slide"}const O0={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function x5(n){return n instanceof Element?!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable="plaintext-only"]'):!1}function S5(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"}function w5(n){return n.altKey?1:n.shiftKey?10:5}function E5(n,l,o){var d;const i={[l]:o};if(typeof DOMParser>"u")return i;const f=(d=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:d.content.firstElementChild;if(!(f instanceof HTMLElement))return i;for(const m of f.querySelectorAll("[data-editor-id]")){const h=m.getAttribute("data-editor-id");h&&(i[h]=`${o}-${h}`)}return i}function Ds(n,l,o){return l.length?(o(l.length===1?l[0]:{type:"operation.batch",slideId:n,operations:l,timestamp:Date.now()}),!0):!1}function T5({activeSlide:n,selectedElementIds:l,iframeRef:o,slideWidth:i,slideHeight:c,isEditingText:f,canUndo:d,canRedo:m,onEscapeSelection:h,onCommitOperation:g,onSelectElementIds:x,onUndo:p,onRedo:S}){const E=b.useRef(null),T=b.useRef(n),C=b.useRef(l),A=b.useRef(d),R=b.useRef(m),O=b.useRef(f),D=b.useRef(h);T.current=n,C.current=l,A.current=d,R.current=m,O.current=f,D.current=h,b.useEffect(()=>{var B,I;const X=()=>{var _;const $=T.current,Y=C.current;if(!$||!Y.length)return!1;const M=(_=o.current)==null?void 0:_.contentDocument,j=M==null?void 0:M.querySelector($.rootSelector),q=j==null?void 0:j.getBoundingClientRect();if(!q)return!1;const P=Y.map(H=>{const J=Ys($.htmlSource,H),ie=Gs($.htmlSource,H),ee=M?$e(M,H):null;return!J||!ie||!ee?null:{sourceElementId:H,html:J,rect:Wx(ee.getBoundingClientRect(),q),...ie}}).filter(H=>!!H);if(!P.length)return!1;const L=QN(P.map(H=>H.rect));return L?(E.current={elements:P,unionRect:L},!0):!1},le=()=>{const $=T.current,Y=C.current;if(!$||!Y.length)return!1;const M=Y.map(j=>{const q=Ys($.htmlSource,j),P=Gs($.htmlSource,j);return!q||!P?null:{type:"element.remove",slideId:$.id,elementId:j,...P,html:q,timestamp:Date.now()}}).filter(j=>!!j);return M.length?(Ds($.id,M,g),x([]),!0):!1},V=($=E.current)=>{const Y=T.current;if(!Y||!$)return!1;let M=Y.htmlSource;const j=[],q=FN(o,Y,{width:i,height:c}),P=ZN($.unionRect,24,{width:q.width,height:q.height}),L=[],_=$.elements.map(H=>{const J=id(M,`${H.sourceElementId}-copy`),ie=nv(H.html,E5(H.html,H.sourceElementId,J)),ee=Od(H.rect,P.x,P.y),me=Jx(ie,ee);return M=`${M}
|
|
381
|
+
<!-- ${J} reserved -->`,j.push(J),L.push({...H,rect:ee}),{type:"element.insert",slideId:Y.id,elementId:J,parentElementId:null,previousSiblingElementId:null,nextSiblingElementId:null,html:me,timestamp:Date.now()}});return Ds(Y.id,_,g),x(j),E.current={elements:L,unionRect:Od($.unionRect,P.x,P.y)},!0},U=$=>{var _;const Y=O0[$.key],M=T.current,j=C.current;if(!M||!j.length||!Y)return!1;const q=(_=o.current)==null?void 0:_.contentDocument,P=w5($),L=j.map(H=>{const J=M.elements.find(Z=>Z.id===H);if(!S5(J))return null;const ie=q?$e(q,H):null;if(!ie)return null;const ee=Po(ie),me=Gn(ee.transform),ce=ld({...ee,transform:Ca(me.translateX+Y.x*P,me.translateY+Y.y*P,me.rotate),transformOrigin:ee.transformOrigin||"center center"});return{type:"element.layout.update",slideId:M.id,elementId:H,previousStyle:ee,nextStyle:ce,timestamp:Date.now()}}).filter(H=>!!H);return Ds(M.id,L,g),!0},N=$=>{var P;const Y=T.current,M=C.current;if(!Y||!M.length)return!1;const j=(P=o.current)==null?void 0:P.contentDocument,q=M.map(L=>{const _=j?$e(j,L):null;if(!_)return null;const H=Po(_),J=Number.parseInt(H.zIndex||"",10),ie=Number.isFinite(J)?J:0,ee=$==="front"?999:$==="back"?0:Math.max(0,ie+($==="forward"?1:-1)),me=ld({...H,zIndex:String(ee)});return me.zIndex===H.zIndex?null:{type:"element.layout.update",slideId:Y.id,elementId:L,previousStyle:H,nextStyle:me,timestamp:Date.now()}}).filter(L=>!!L);return Ds(Y.id,q,g)},Q=$=>{if($.defaultPrevented||O.current)return;const Y=$.key.toLowerCase(),M=$.metaKey||$.ctrlKey,j=M&&!$.shiftKey&&Y==="z",q=M&&($.shiftKey&&Y==="z"||Y==="y"),P=x5($.target);let L=!1;if(j&&A.current)p(),L=!0;else if(q&&R.current)S(),L=!0;else{if(P)return;M&&!$.shiftKey&&Y==="c"?L=X():M&&!$.shiftKey&&Y==="x"?L=X()&&le():M&&!$.shiftKey&&Y==="v"?L=V():M&&!$.shiftKey&&Y==="d"?L=X()&&V():$.key==="Backspace"||$.key==="Delete"?L=le():$.key==="Escape"?L=D.current():$.key in O0?L=U($):M&&$.key==="]"?L=N($.shiftKey?"front":"forward"):M&&$.key==="["&&(L=N($.shiftKey?"back":"backward"))}L&&($.preventDefault(),$.stopPropagation())},ne=(B=o.current)==null?void 0:B.contentDocument,fe=(I=o.current)==null?void 0:I.contentWindow;return window.addEventListener("keydown",Q),fe==null||fe.addEventListener("keydown",Q),ne==null||ne.addEventListener("keydown",Q),()=>{window.removeEventListener("keydown",Q),fe==null||fe.removeEventListener("keydown",Q),ne==null||ne.removeEventListener("keydown",Q)}},[o,g,S,x,p,c,i])}const z0="hse-editing-text-style",C5=`
|
|
382
|
+
[data-hse-editing="true"] {
|
|
383
|
+
outline: none !important;
|
|
384
|
+
box-shadow: none !important;
|
|
385
|
+
overflow: visible;
|
|
386
|
+
caret-color: currentColor;
|
|
387
|
+
white-space: pre-wrap;
|
|
388
|
+
user-select: text;
|
|
389
|
+
-webkit-user-select: text;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
[data-hse-editing="true"]:focus,
|
|
393
|
+
[data-hse-editing="true"]:focus-visible {
|
|
394
|
+
outline: none !important;
|
|
395
|
+
box-shadow: none !important;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
body[data-hse-group-scope] [data-editable] {
|
|
399
|
+
transition: opacity 120ms ease, filter 120ms ease;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
body[data-hse-group-scope] [data-editable][data-hse-outside-group-scope="true"] {
|
|
403
|
+
opacity: 0.28;
|
|
404
|
+
filter: blur(1.5px);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
body[data-hse-group-scope] [data-editable][data-hse-active-group-scope="true"] {
|
|
408
|
+
outline: 1px solid rgba(15, 23, 42, 0.22);
|
|
409
|
+
outline-offset: 4px;
|
|
410
|
+
}
|
|
411
|
+
`;function M5(n){return n.closest(`[data-editable][${Ee}]`)}function D0(n,l,o,i){const c=n.elementFromPoint(l,o);return c?Dd(c,i):null}function j0(n,l){const o=Array.from(n.querySelectorAll("[data-editable]"));for(const c of o)c.removeAttribute("data-hse-active-group-scope"),c.removeAttribute("data-hse-outside-group-scope");if(!l){n.body.removeAttribute("data-hse-group-scope");return}n.body.setAttribute("data-hse-group-scope",l);const i=n.querySelector(`[data-editable="block"][data-group="true"][${Ee}="${l}"]`);if(!i){n.body.removeAttribute("data-hse-group-scope");return}i.setAttribute("data-hse-active-group-scope","true");for(const c of o)c!==i&&!i.contains(c)&&c.setAttribute("data-hse-outside-group-scope","true")}function Dd(n,l){const o=M5(n);return o?l?o.closest(`[data-editable="block"][data-group="true"][${Ee}="${l}"]`)?o:null:o.closest(`[data-editable="block"][data-group="true"][${Ee}]`)??o:null}function A5(n){if(n.getElementById(z0))return;const l=n.createElement("style");l.id=z0,l.textContent=C5,n.head.appendChild(l)}function _5(n){const l=n.ownerDocument.getSelection(),o=n.ownerDocument.createRange();o.selectNodeContents(n),o.collapse(!1),l==null||l.removeAllRanges(),l==null||l.addRange(o)}function R5({activeSlide:n,iframeRef:l,onCommitOperation:o}){const[i,c]=b.useState([]),[f,d]=b.useState(null),[m,h]=b.useState(null),[g,x]=b.useState(null),p=b.useRef(null),S=b.useRef(null),E=b.useRef(()=>{}),T=b.useRef(()=>{}),C=i[i.length-1]??null,A=b.useCallback(()=>{d(B=>B===null?B:null)},[]);function R(B){c(I=>{const $=typeof B=="function"?B(I[I.length-1]??null):B;return $?[$]:[]})}const O=b.useCallback(B=>{c(I=>I.includes(B)?I.filter($=>$!==B):[...I,B])},[]),D=b.useCallback((B,I)=>{const $=l.current,Y=$==null?void 0:$.contentDocument;if(!$||!Y||p.current)return null;const M=$.getBoundingClientRect(),j=M.width>0?$.clientWidth/M.width:1,q=M.height>0?$.clientHeight/M.height:1,P=D0(Y,(B-M.left)*j,(I-M.top)*q,S.current);return(P==null?void 0:P.getAttribute(Ee))??null},[l]),X=b.useCallback((B,I)=>{const $=D(B,I);return d(Y=>Y===$?Y:$),$},[D]),le=b.useCallback((B,I,$)=>{const Y=D(B,I);return Y?($?O(Y):c([Y]),Y):null},[D,O]),V=b.useCallback(B=>{var M;if(!n)return;const I=(M=l.current)==null?void 0:M.contentDocument,$=I?$e(I,B):null;if(!$||$.getAttribute("data-editable")!=="text")return;const Y={slideId:n.id,elementId:B,initialText:$.textContent||""};c([B]),p.current=Y,x(Y)},[n,l]),U=b.useCallback(B=>{h(B),S.current=B,c([B])},[]),N=b.useCallback(()=>{const B=S.current;S.current=null,h(null),c(B?[B]:[])},[]),Q=b.useCallback(()=>p.current?!1:S.current?(N(),!0):i.length?(c([]),!0):!1,[N,i.length]);function ne(B,I){const $=g;if(!n||!$||$.slideId!==n.id||$.elementId!==B){p.current=null,x(null);return}const Y=$.initialText;p.current=null,x(null),I!==Y&&o({type:"text.update",slideId:n.id,elementId:B,previousText:Y,nextText:I,timestamp:Date.now()})}function fe(){var $;const B=($=l.current)==null?void 0:$.contentDocument,I=p.current;if(I&&B){const Y=$e(B,I.elementId);Y&&(Y.textContent=I.initialText)}p.current=null,x(null)}return b.useEffect(()=>{p.current=g},[g]),b.useEffect(()=>{S.current=m},[m]),b.useEffect(()=>{!n||!g||g.slideId===n.id||x(null)},[n,g]),E.current=ne,T.current=fe,b.useEffect(()=>{if(!n)return;const B=l.current;if(!B)return;const I=B.contentDocument;if(!I)return;I.open(),I.write(n.htmlSource),I.close(),A5(I),j0(I,S.current);const $=M=>{const j=M.getAttribute(Ee);j&&E.current(j,M.textContent||"")};I.onclick=M=>{const j=M.target;if(!(j instanceof Element)){if(p.current){const _=$e(I,p.current.elementId);if(_){$(_);return}}c([]);return}const q=p.current;if(q){A();const _=$e(I,q.elementId);if(_&&!_.contains(j)){$(_);return}return}const P=Dd(j,S.current);if(!P){S.current||c([]);return}const L=P.getAttribute(Ee);L&&(M.shiftKey||M.metaKey||M.ctrlKey?O(L):c([L]))},I.onmousemove=M=>{if(p.current){A();return}const j=D0(I,M.clientX,M.clientY,S.current),q=(j==null?void 0:j.getAttribute(Ee))??null;d(P=>P===q?P:q)},I.onmouseleave=()=>{A()};const Y=Array.from(I.querySelectorAll(`[data-editable][${Ee}]`));for(const M of Y)M.style.cursor="default",M.ondblclick=null,M.onblur=null,M.onkeydown=null,M.onclick=j=>{var L;j.stopPropagation();const q=Dd(j.target,S.current);if(S.current&&!q)return;const P=(q==null?void 0:q.getAttribute(Ee))??M.getAttribute(Ee);((L=p.current)==null?void 0:L.elementId)!==P&&P&&(j.shiftKey||j.metaKey||j.ctrlKey?O(P):c([P]))},M.ondblclick=j=>{const q=M.getAttribute(Ee),P=p.current;if(q&&M.getAttribute("data-group")==="true"){j.preventDefault(),j.stopPropagation(),U(q);return}if(M.getAttribute("data-editable")==="text"){if(q&&P&&P.slideId===n.id&&P.elementId===q){j.stopPropagation();return}j.preventDefault(),j.stopPropagation(),q&&V(q)}}},[n,U,V,A,l,O]),b.useEffect(()=>{var I;const B=(I=l.current)==null?void 0:I.contentDocument;B&&j0(B,m)},[m,l]),b.useEffect(()=>{var ie;const B=g;if(!B||!n||B.slideId!==n.id)return;const I=l.current,$=I==null?void 0:I.contentDocument;if(!I||!$)return;const Y=$.querySelector(Hd(B.elementId));if(!Y)return;const M=()=>{E.current(B.elementId,Y.textContent||"")};let j=!1;const q=Y.style.display,P=Y.style.alignItems,L=Y.style.overflow,_=Y.style.cursor,H=(ie=Y.ownerDocument.defaultView)==null?void 0:ie.getComputedStyle(Y),J=(H==null?void 0:H.display)??"";return Y.setAttribute("contenteditable","plaintext-only"),Y.setAttribute("spellcheck","false"),Y.setAttribute("data-hse-editing","true"),Y.style.cursor="text",Y.style.overflow="visible",J==="inline-flex"?(Y.style.display="inline-block",Y.style.alignItems="normal"):(J==="flex"||J==="grid"||J==="inline-grid")&&(Y.style.display="block",Y.style.alignItems="normal"),Y.focus(),_5(Y),Y.onkeydown=ee=>{if(ee.key==="Enter"&&!ee.shiftKey){ee.preventDefault(),M();return}ee.key==="Escape"&&(ee.preventDefault(),T.current())},Y.onmousedown=()=>{j=!1},Y.onmouseup=()=>{const ee=Y.ownerDocument.getSelection(),me=ee==null?void 0:ee.anchorNode,ce=ee==null?void 0:ee.focusNode,Z=me?Y.contains(me):!1,re=ce?Y.contains(ce):!1;j=!!(ee&&!ee.isCollapsed&&Z&&re)},Y.onclick=ee=>{ee.stopPropagation(),j&&(ee.preventDefault(),j=!1)},Y.onblur=()=>{window.setTimeout(()=>{var be;if(((be=p.current)==null?void 0:be.elementId)!==B.elementId)return;const ee=Y.ownerDocument.getSelection(),me=ee==null?void 0:ee.anchorNode,ce=ee==null?void 0:ee.focusNode,Z=Y.ownerDocument.activeElement,re=!!(ee&&!ee.isCollapsed)&&!!(me&&Y.contains(me))&&!!(ce&&Y.contains(ce));Z===Y||re||M()},0)},()=>{Y.removeAttribute("contenteditable"),Y.removeAttribute("spellcheck"),Y.removeAttribute("data-hse-editing"),Y.style.cursor=_,Y.style.display=q,Y.style.alignItems=P,Y.style.overflow=L,Y.onblur=null,Y.onclick=null,Y.onkeydown=null,Y.onmousedown=null,Y.onmouseup=null}},[n,l,g]),{selectedElementId:C,selectedElementIds:i,preselectedElementId:f,activeGroupScopeId:m,isEditingText:!!(n&&(g==null?void 0:g.slideId)===n.id),setSelectedElementId:R,setSelectedElementIds:c,beginTextEditing:V,beginGroupEditingScope:U,exitGroupEditingScope:N,clearSelection:Q,clearPreselection:A,updatePointerPreselection:X,retargetPointerSelection:le}}function N5(n,l={}){var x;const{onSlidesChange:o}=l,[i,c]=b.useReducer(vs,n,rv),[f,d]=b.useState(((x=n[0])==null?void 0:x.id)??"");b.useEffect(()=>{var p;c({type:"history.reset",slides:n}),d(((p=n[0])==null?void 0:p.id)??"")},[n]);const m=b.useMemo(()=>i.slides.find(p=>p.id===f)??i.slides[0],[f,i.slides]),h=(m==null?void 0:m.id)??"";function g(p){var S;return p.some(E=>E.id===f)||d(((S=p[0])==null?void 0:S.id)??""),o==null||o(p),p}return{slides:i.slides,activeSlide:m,activeSlideId:h,undoDepth:i.undoStack.length,redoDepth:i.redoStack.length,setActiveSlideId:d,commitOperation:p=>{const S=vs(i,{type:"history.commit",operation:p});return c({type:"history.commit",operation:p}),g(S.slides)},runUndo:()=>{const p=vs(i,{type:"history.undo"});c({type:"history.undo"}),g(p.slides)},runRedo:()=>{const p=vs(i,{type:"history.redo"});c({type:"history.redo"}),g(p.slides)}}}const O5=["-webkit-","-moz-","-ms-"],z5=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 D5(n){return O5.some(l=>n.startsWith(l))?!1:!z5.has(n)}function j5(n){const l=window.getComputedStyle(n),o=[];for(const i of Array.from(l)){if(!D5(i))continue;const c=i==="transform"&&n.style.transform?n.style.transform.trim():l.getPropertyValue(i).trim();c.length!==0&&o.push({name:i,value:c})}return o.sort((i,c)=>i.name.localeCompare(c.name))}function k5({iframeRef:n,activeSlide:l,selectedElement:o,selectedElementIds:i,preselectedElementId:c,scale:f,offsetX:d,offsetY:m,slideWidth:h,slideHeight:g}){const x=i.join("\0"),p=c??"",[S,E]=b.useState({key:"",rect:null}),[T,C]=b.useState({key:"",rect:null}),[A,R]=b.useState({key:"",rect:null}),[O,D]=b.useState([]),X=S.key===x?S.rect:null,le=T.key===p?T.rect:null,V=A.key===x?A.rect:null;return b.useEffect(()=>{const U=n.current,N=U==null?void 0:U.contentDocument;if(!U||!N||!l){E({key:x,rect:null}),C({key:p,rect:null}),R({key:x,rect:null}),D([]);return}const Q=N.querySelector(l.rootSelector),ne=i[0]?$e(N,i[0]):Q;if(!ne){E({key:x,rect:null}),C({key:p,rect:null}),R({key:x,rect:null}),D([]);return}const fe=j5(ne);D(M=>H5(M,fe)?M:fe);const B=Q==null?void 0:Q.getBoundingClientRect();let I=null;if(!i.length||!Q||!B)I=null;else{const M=i.map(j=>$e(N,j)).filter(j=>!!j).map(j=>Lr(j.getBoundingClientRect(),B,{scale:f,offsetX:d,offsetY:m}));M.length&&(I=M.reduce((j,q)=>{const P=Math.min(j.x,q.x),L=Math.min(j.y,q.y),_=Math.max(j.x+j.width,q.x+q.width),H=Math.max(j.y+j.height,q.y+q.height);return{x:P,y:L,width:_-P,height:H-L}}))}E(M=>ed(M,x,I)?M:{key:x,rect:I}),R(M=>ed(M,x,I)?M:{key:x,rect:I});const $=c?$e(N,c):null,Y=$&&B?Lr($.getBoundingClientRect(),B,{scale:f,offsetX:d,offsetY:m}):null;C(M=>ed(M,p,Y)?M:{key:p,rect:Y})},[l,n,d,m,c,p,f,i,x,g,h]),{selectedStageRect:X,preselectionOverlay:le,selectionOverlay:V,selectionLabel:(o==null?void 0:o.type)||"element",inspectedStyles:O}}function ed(n,l,o){return n.key===l&&L5(n.rect,o)}function L5(n,l){return n===l?!0:!n||!l?!1:n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function H5(n,l){return n.length!==l.length?!1:n.every((o,i)=>{const c=l[i];return(c==null?void 0:c.name)===o.name&&c.value===o.value})}function B5(n,l){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 o=document.implementation.createHTMLDocument(),i=o.createElement("base"),c=o.createElement("a");return o.head.appendChild(i),o.body.appendChild(c),l&&(i.href=l),c.href=n,c.href}const U5=(()=>{let n=0;const l=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${l()}${n}`)})();function ul(n){const l=[];for(let o=0,i=n.length;o<i;o++)l.push(n[o]);return l}let Dr=null;function n1(n={}){return Dr||(n.includeStyleProperties?(Dr=n.includeStyleProperties,Dr):(Dr=ul(window.getComputedStyle(document.documentElement)),Dr))}function tc(n,l){const i=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(l);return i?parseFloat(i.replace("px","")):0}function I5(n){const l=tc(n,"border-left-width"),o=tc(n,"border-right-width");return n.clientWidth+l+o}function G5(n){const l=tc(n,"border-top-width"),o=tc(n,"border-bottom-width");return n.clientHeight+l+o}function a1(n,l={}){const o=l.width||I5(n),i=l.height||G5(n);return{width:o,height:i}}function Y5(){let n,l;try{l=process}catch{}const o=l&&l.env?l.env.devicePixelRatio:null;return o&&(n=parseInt(o,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}const yn=16384;function V5(n){(n.width>yn||n.height>yn)&&(n.width>yn&&n.height>yn?n.width>n.height?(n.height*=yn/n.width,n.width=yn):(n.width*=yn/n.height,n.height=yn):n.width>yn?(n.height*=yn/n.width,n.width=yn):(n.width*=yn/n.height,n.height=yn))}function nc(n){return new Promise((l,o)=>{const i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>l(i))})},i.onerror=o,i.crossOrigin="anonymous",i.decoding="async",i.src=n})}async function q5(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(l=>`data:image/svg+xml;charset=utf-8,${l}`)}async function P5(n,l,o){const i="http://www.w3.org/2000/svg",c=document.createElementNS(i,"svg"),f=document.createElementNS(i,"foreignObject");return c.setAttribute("width",`${l}`),c.setAttribute("height",`${o}`),c.setAttribute("viewBox",`0 0 ${l} ${o}`),f.setAttribute("width","100%"),f.setAttribute("height","100%"),f.setAttribute("x","0"),f.setAttribute("y","0"),f.setAttribute("externalResourcesRequired","true"),c.appendChild(f),f.appendChild(n),q5(c)}const rn=(n,l)=>{if(n instanceof l)return!0;const o=Object.getPrototypeOf(n);return o===null?!1:o.constructor.name===l.name||rn(o,l)};function X5(n){const l=n.getPropertyValue("content");return`${n.cssText} content: '${l.replace(/'|"/g,"")}';`}function $5(n,l){return n1(l).map(o=>{const i=n.getPropertyValue(o),c=n.getPropertyPriority(o);return`${o}: ${i}${c?" !important":""};`}).join(" ")}function K5(n,l,o,i){const c=`.${n}:${l}`,f=o.cssText?X5(o):$5(o,i);return document.createTextNode(`${c}{${f}}`)}function k0(n,l,o,i){const c=window.getComputedStyle(n,o),f=c.getPropertyValue("content");if(f===""||f==="none")return;const d=U5();try{l.className=`${l.className} ${d}`}catch{return}const m=document.createElement("style");m.appendChild(K5(d,o,c,i)),l.appendChild(m)}function F5(n,l,o){k0(n,l,":before",o),k0(n,l,":after",o)}const L0="application/font-woff",H0="image/jpeg",Q5={woff:L0,woff2:L0,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:H0,jpeg:H0,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Z5(n){const l=/\.([^./]*?)$/g.exec(n);return l?l[1]:""}function vm(n){const l=Z5(n).toLowerCase();return Q5[l]||""}function J5(n){return n.split(/,/)[1]}function jd(n){return n.search(/^(data:)/)!==-1}function W5(n,l){return`data:${l};base64,${n}`}async function l1(n,l,o){const i=await fetch(n,l);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);const c=await i.blob();return new Promise((f,d)=>{const m=new FileReader;m.onerror=d,m.onloadend=()=>{try{f(o({res:i,result:m.result}))}catch(h){d(h)}},m.readAsDataURL(c)})}const td={};function e3(n,l,o){let i=n.replace(/\?.*/,"");return o&&(i=n),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),l?`[${l}]${i}`:i}async function bm(n,l,o){const i=e3(n,l,o.includeQueryParams);if(td[i]!=null)return td[i];o.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let c;try{const f=await l1(n,o.fetchRequestInit,({res:d,result:m})=>(l||(l=d.headers.get("Content-Type")||""),J5(m)));c=W5(f,l)}catch(f){c=o.imagePlaceholder||"";let d=`Failed to fetch resource: ${n}`;f&&(d=typeof f=="string"?f:f.message),d&&console.warn(d)}return td[i]=c,c}async function t3(n){const l=n.toDataURL();return l==="data:,"?n.cloneNode(!1):nc(l)}async function n3(n,l){if(n.currentSrc){const f=document.createElement("canvas"),d=f.getContext("2d");f.width=n.clientWidth,f.height=n.clientHeight,d==null||d.drawImage(n,0,0,f.width,f.height);const m=f.toDataURL();return nc(m)}const o=n.poster,i=vm(o),c=await bm(o,i,l);return nc(c)}async function a3(n,l){var o;try{if(!((o=n==null?void 0:n.contentDocument)===null||o===void 0)&&o.body)return await pc(n.contentDocument.body,l,!0)}catch{}return n.cloneNode(!1)}async function l3(n,l){return rn(n,HTMLCanvasElement)?t3(n):rn(n,HTMLVideoElement)?n3(n,l):rn(n,HTMLIFrameElement)?a3(n,l):n.cloneNode(r1(n))}const r3=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT",r1=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SVG";async function o3(n,l,o){var i,c;if(r1(l))return l;let f=[];return r3(n)&&n.assignedNodes?f=ul(n.assignedNodes()):rn(n,HTMLIFrameElement)&&(!((i=n.contentDocument)===null||i===void 0)&&i.body)?f=ul(n.contentDocument.body.childNodes):f=ul(((c=n.shadowRoot)!==null&&c!==void 0?c:n).childNodes),f.length===0||rn(n,HTMLVideoElement)||await f.reduce((d,m)=>d.then(()=>pc(m,o)).then(h=>{h&&l.appendChild(h)}),Promise.resolve()),l}function i3(n,l,o){const i=l.style;if(!i)return;const c=window.getComputedStyle(n);c.cssText?(i.cssText=c.cssText,i.transformOrigin=c.transformOrigin):n1(o).forEach(f=>{let d=c.getPropertyValue(f);f==="font-size"&&d.endsWith("px")&&(d=`${Math.floor(parseFloat(d.substring(0,d.length-2)))-.1}px`),rn(n,HTMLIFrameElement)&&f==="display"&&d==="inline"&&(d="block"),f==="d"&&l.getAttribute("d")&&(d=`path(${l.getAttribute("d")})`),i.setProperty(f,d,c.getPropertyPriority(f))})}function s3(n,l){rn(n,HTMLTextAreaElement)&&(l.innerHTML=n.value),rn(n,HTMLInputElement)&&l.setAttribute("value",n.value)}function c3(n,l){if(rn(n,HTMLSelectElement)){const i=Array.from(l.children).find(c=>n.value===c.getAttribute("value"));i&&i.setAttribute("selected","")}}function u3(n,l,o){return rn(l,Element)&&(i3(n,l,o),F5(n,l,o),s3(n,l),c3(n,l)),l}async function f3(n,l){const o=n.querySelectorAll?n.querySelectorAll("use"):[];if(o.length===0)return n;const i={};for(let f=0;f<o.length;f++){const m=o[f].getAttribute("xlink:href");if(m){const h=n.querySelector(m),g=document.querySelector(m);!h&&g&&!i[m]&&(i[m]=await pc(g,l,!0))}}const c=Object.values(i);if(c.length){const f="http://www.w3.org/1999/xhtml",d=document.createElementNS(f,"svg");d.setAttribute("xmlns",f),d.style.position="absolute",d.style.width="0",d.style.height="0",d.style.overflow="hidden",d.style.display="none";const m=document.createElementNS(f,"defs");d.appendChild(m);for(let h=0;h<c.length;h++)m.appendChild(c[h]);n.appendChild(d)}return n}async function pc(n,l,o){return!o&&l.filter&&!l.filter(n)?null:Promise.resolve(n).then(i=>l3(i,l)).then(i=>o3(n,i,l)).then(i=>u3(n,i,l)).then(i=>f3(i,l))}const o1=/url\((['"]?)([^'"]+?)\1\)/g,d3=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,m3=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function h3(n){const l=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${l})(['"]?\\))`,"g")}function p3(n){const l=[];return n.replace(o1,(o,i,c)=>(l.push(c),o)),l.filter(o=>!jd(o))}async function g3(n,l,o,i,c){try{const f=o?B5(l,o):l,d=vm(l);let m;return c||(m=await bm(f,d,i)),n.replace(h3(l),`$1${m}$3`)}catch{}return n}function y3(n,{preferredFontFormat:l}){return l?n.replace(m3,o=>{for(;;){const[i,,c]=d3.exec(o)||[];if(!c)return"";if(c===l)return`src: ${i};`}}):n}function i1(n){return n.search(o1)!==-1}async function s1(n,l,o){if(!i1(n))return n;const i=y3(n,o);return p3(i).reduce((f,d)=>f.then(m=>g3(m,d,l,o)),Promise.resolve(i))}async function jr(n,l,o){var i;const c=(i=l.style)===null||i===void 0?void 0:i.getPropertyValue(n);if(c){const f=await s1(c,null,o);return l.style.setProperty(n,f,l.style.getPropertyPriority(n)),!0}return!1}async function v3(n,l){await jr("background",n,l)||await jr("background-image",n,l),await jr("mask",n,l)||await jr("-webkit-mask",n,l)||await jr("mask-image",n,l)||await jr("-webkit-mask-image",n,l)}async function b3(n,l){const o=rn(n,HTMLImageElement);if(!(o&&!jd(n.src))&&!(rn(n,SVGImageElement)&&!jd(n.href.baseVal)))return;const i=o?n.src:n.href.baseVal,c=await bm(i,vm(i),l);await new Promise((f,d)=>{n.onload=f,n.onerror=l.onImageErrorHandler?(...h)=>{try{f(l.onImageErrorHandler(...h))}catch(g){d(g)}}:d;const m=n;m.decode&&(m.decode=f),m.loading==="lazy"&&(m.loading="eager"),o?(n.srcset="",n.src=c):n.href.baseVal=c})}async function x3(n,l){const i=ul(n.childNodes).map(c=>c1(c,l));await Promise.all(i).then(()=>n)}async function c1(n,l){rn(n,Element)&&(await v3(n,l),await b3(n,l),await x3(n,l))}function S3(n,l){const{style:o}=n;l.backgroundColor&&(o.backgroundColor=l.backgroundColor),l.width&&(o.width=`${l.width}px`),l.height&&(o.height=`${l.height}px`);const i=l.style;return i!=null&&Object.keys(i).forEach(c=>{o[c]=i[c]}),n}const B0={};async function U0(n){let l=B0[n];if(l!=null)return l;const i=await(await fetch(n)).text();return l={url:n,cssText:i},B0[n]=l,l}async function I0(n,l){let o=n.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,f=(o.match(/url\([^)]+\)/g)||[]).map(async d=>{let m=d.replace(i,"$1");return m.startsWith("https://")||(m=new URL(m,n.url).href),l1(m,l.fetchRequestInit,({result:h})=>(o=o.replace(d,`url(${h})`),[d,h]))});return Promise.all(f).then(()=>o)}function G0(n){if(n==null)return[];const l=[],o=/(\/\*[\s\S]*?\*\/)/gi;let i=n.replace(o,"");const c=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const h=c.exec(i);if(h===null)break;l.push(h[0])}i=i.replace(c,"");const f=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,d="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",m=new RegExp(d,"gi");for(;;){let h=f.exec(i);if(h===null){if(h=m.exec(i),h===null)break;f.lastIndex=m.lastIndex}else m.lastIndex=f.lastIndex;l.push(h[0])}return l}async function w3(n,l){const o=[],i=[];return n.forEach(c=>{if("cssRules"in c)try{ul(c.cssRules||[]).forEach((f,d)=>{if(f.type===CSSRule.IMPORT_RULE){let m=d+1;const h=f.href,g=U0(h).then(x=>I0(x,l)).then(x=>G0(x).forEach(p=>{try{c.insertRule(p,p.startsWith("@import")?m+=1:c.cssRules.length)}catch(S){console.error("Error inserting rule from remote css",{rule:p,error:S})}})).catch(x=>{console.error("Error loading remote css",x.toString())});i.push(g)}})}catch(f){const d=n.find(m=>m.href==null)||document.styleSheets[0];c.href!=null&&i.push(U0(c.href).then(m=>I0(m,l)).then(m=>G0(m).forEach(h=>{d.insertRule(h,d.cssRules.length)})).catch(m=>{console.error("Error loading remote stylesheet",m)})),console.error("Error inlining remote css file",f)}}),Promise.all(i).then(()=>(n.forEach(c=>{if("cssRules"in c)try{ul(c.cssRules||[]).forEach(f=>{o.push(f)})}catch(f){console.error(`Error while reading CSS rules from ${c.href}`,f)}}),o))}function E3(n){return n.filter(l=>l.type===CSSRule.FONT_FACE_RULE).filter(l=>i1(l.style.getPropertyValue("src")))}async function T3(n,l){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");const o=ul(n.ownerDocument.styleSheets),i=await w3(o,l);return E3(i)}function u1(n){return n.trim().replace(/["']/g,"")}function C3(n){const l=new Set;function o(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(f=>{l.add(u1(f))}),Array.from(i.children).forEach(f=>{f instanceof HTMLElement&&o(f)})}return o(n),l}async function M3(n,l){const o=await T3(n,l),i=C3(n);return(await Promise.all(o.filter(f=>i.has(u1(f.style.fontFamily))).map(f=>{const d=f.parentStyleSheet?f.parentStyleSheet.href:null;return s1(f.cssText,d,l)}))).join(`
|
|
412
|
+
`)}async function A3(n,l){const o=l.fontEmbedCSS!=null?l.fontEmbedCSS:l.skipFonts?null:await M3(n,l);if(o){const i=document.createElement("style"),c=document.createTextNode(o);i.appendChild(c),n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}}async function _3(n,l={}){const{width:o,height:i}=a1(n,l),c=await pc(n,l,!0);return await A3(c,l),await c1(c,l),S3(c,l),await P5(c,o,i)}async function R3(n,l={}){const{width:o,height:i}=a1(n,l),c=await _3(n,l),f=await nc(c),d=document.createElement("canvas"),m=d.getContext("2d"),h=l.pixelRatio||Y5(),g=l.canvasWidth||o,x=l.canvasHeight||i;return d.width=g*h,d.height=x*h,l.skipAutoScale||V5(d),d.style.width=`${g}`,d.style.height=`${x}`,l.backgroundColor&&(m.fillStyle=l.backgroundColor,m.fillRect(0,0,d.width,d.height)),m.drawImage(f,0,0,d.width,d.height),d}async function N3(n,l={}){return(await R3(n,l)).toDataURL()}const Y0=224,O3=2;function z3(n){return new Promise(l=>{window.setTimeout(l,n)})}async function D3(n){var l;if((l=n.fonts)!=null&&l.ready)try{await n.fonts.ready}catch{}}async function j3(n){const l=document.createElement("iframe");l.setAttribute("aria-hidden","true"),l.tabIndex=-1,l.style.position="fixed",l.style.left="-10000px",l.style.top="0",l.style.width=`${n.width}px`,l.style.height=`${n.height}px`,l.style.opacity="0",l.style.pointerEvents="none",l.style.border="0",document.body.appendChild(l);try{const o=l.contentDocument;if(!o)throw new Error("Unable to access thumbnail iframe document.");o.open(),o.write(n.htmlSource),o.close(),await D3(o),await z3(50);const i=o.querySelector(n.rootSelector);if(!i)throw new Error("Slide root not found while rendering thumbnail.");const c=o.body??i;return await N3(c,{cacheBust:!0,pixelRatio:O3,canvasWidth:Y0,canvasHeight:Math.round(n.height/n.width*Y0),backgroundColor:"white",skipFonts:!1})}finally{l.remove()}}const k3=300;function L3(n){const[l,o]=b.useState({}),i=b.useRef(new Map),c=b.useMemo(()=>n.map(f=>({id:f.id,key:`${f.id}:${f.htmlSource}`})),[n]);return b.useEffect(()=>{let f=!1;const d=window.setTimeout(async()=>{const m={};for(const h of n){const g=`${h.id}:${h.htmlSource}`,x=i.current.get(g);if(x){m[h.id]=x;continue}try{const p=await j3(h);i.current.set(g,p),m[h.id]=p}catch{}if(f)return}f||o(h=>({...h,...m}))},k3);return()=>{f=!0,window.clearTimeout(d)}},[n]),b.useEffect(()=>{const f=new Set(c.map(d=>d.key));for(const d of i.current.keys())f.has(d)||i.current.delete(d)},[c]),l}function H3({stageViewportRef:n,slideWidth:l,slideHeight:o}){const[i,c]=b.useState({width:0,height:0});b.useEffect(()=>{const g=n.current;if(!g)return;const x=()=>{const S=g.getBoundingClientRect();c(E=>E.width===S.width&&E.height===S.height?E:{width:S.width,height:S.height})};x();const p=new ResizeObserver(()=>{x()});return p.observe(g),()=>{p.disconnect()}},[n]);const f=Math.min(i.width>0?i.width/l:1,i.height>0?i.height/o:1),d=Number.isFinite(f)&&f>0?f:1,m=l*d,h=o*d;return{scale:d,offsetX:Math.max((i.width-m)/2,0),offsetY:Math.max((i.height-h)/2,0)}}function B3({slides:n,deckTitle:l,isSaving:o=!1,onSlidesChange:i,onDeckTitleChange:c,onExportPdf:f,onExportHtml:d}){const{slides:m,activeSlide:h,activeSlideId:g,undoDepth:x,redoDepth:p,setActiveSlideId:S,commitOperation:E,runUndo:T,runRedo:C}=N5(n,{onSlidesChange:i}),A=b.useRef(null),R=b.useRef(null),O=b.useRef(null),D=b.useRef(null),[X,le]=b.useState(!1),V=L3(m),{selectedElementId:U,selectedElementIds:N,preselectedElementId:Q,isEditingText:ne,activeGroupScopeId:fe,setSelectedElementId:B,setSelectedElementIds:I,beginTextEditing:$,beginGroupEditingScope:Y,clearSelection:M,clearPreselection:j,updatePointerPreselection:q,retargetPointerSelection:P}=R5({activeSlide:h,iframeRef:A,onCommitOperation:E}),L=h==null?void 0:h.elements.find(ae=>ae.id===U),_=h==null?void 0:h.elements.find(ae=>ae.id===fe),H=N.length>1?"multi":(L==null?void 0:L.type)??(_==null?void 0:_.type)??"block",J=h?N.map(ae=>h.elements.find(he=>he.id===ae)).filter(ae=>!!ae):[],ie={group:N.length>=2&&J.length===N.length,ungroup:N.length===1&&!!((L==null?void 0:L.type)==="group"||h&&U&&U3(h.htmlSource,U))},ee=!!fe&&N.length===1&&U===fe,me=l??"",ce=(h==null?void 0:h.width)||Gl,Z=(h==null?void 0:h.height)||Yl,{scale:re,offsetX:be,offsetY:Me}=H3({stageViewportRef:R,slideWidth:ce,slideHeight:Z}),{selectedStageRect:Ae,preselectionOverlay:Pe,selectionOverlay:Ge,inspectedStyles:Yt}=k5({iframeRef:A,activeSlide:h,selectedElement:L,selectedElementIds:N,preselectedElementId:Q,scale:re,offsetX:be,offsetY:Me,slideWidth:ce,slideHeight:Z}),{manipulationOverlay:St,isManipulating:Ot,suppressBackgroundClear:De,beginMove:ye,beginResize:on,beginRotate:sn}=g5({activeSlide:h,selectedElement:L,selectedElementId:U,selectedElementIds:N,selectedStageRect:Ae,iframeRef:A,stageGeometry:{scale:re,offsetX:be,offsetY:Me,slideWidth:ce,slideHeight:Z},isEditingText:ne,onCommitOperation:E}),et=(St==null?void 0:St.selectionBounds)??Ge,Lt=U??"slide-root",_t={locked:h?qo(h,Lt,"data-editor-locked"):"",altText:h?qo(h,Lt,"alt"):"",ariaLabel:h?qo(h,Lt,"aria-label"):"",linkUrl:h?qo(h,Lt,"data-link-url"):""};function xn(ae,he){if(!h)return;const de=$N({elementId:Lt,nextValue:he,propertyName:ae,slide:h});de&&E(de)}function zt(ae,he){if(!h)return;const de=KN({attributeName:ae,elementId:Lt,nextValue:he,slide:h});de&&E(de)}function Ra(ae){if(!h||N.length===0)return;const he=N.map(de=>{const ge=Nd(h,de,"z-index"),Le=Number.parseInt(ge,10),Ne=Number.isFinite(Le)?Le:0,Be=ae==="front"?"999":ae==="back"?"0":String(Math.max(0,Ne+(ae==="forward"?1:-1)));return ge===Be?null:{type:"style.update",slideId:h.id,elementId:de,propertyName:"z-index",previousValue:ge,nextValue:Be,timestamp:Date.now()}}).filter(de=>!!de);Ft(he)}function Ft(ae){!h||ae.length===0||E(ae.length===1?ae[0]:{type:"operation.batch",slideId:h.id,operations:ae,timestamp:Date.now()})}function qn(ae,he,de){var Be;const ge={[he]:de},Ne=(Be=new DOMParser().parseFromString(`<template>${ae}</template>`,"text/html").querySelector("template"))==null?void 0:Be.content.firstElementChild;if(!(Ne instanceof HTMLElement))return ge;for(const lt of Ne.querySelectorAll(`[${Ee}]`)){const Xe=lt.getAttribute(Ee);Xe&&(ge[Xe]=`${de}-${Xe}`)}return ge}function Qt(){var Be;if(!h||N.length===0)return;const ae=(Be=A.current)==null?void 0:Be.contentDocument,he=ae==null?void 0:ae.querySelector(h.rootSelector),de=he==null?void 0:he.getBoundingClientRect();let ge=h.htmlSource;const Le=[],Ne=N.map(lt=>{const Xe=Ys(h.htmlSource,lt),qt=Gs(h.htmlSource,lt),st=ae?$e(ae,lt):null;if(!Xe||!qt||!st||!de)return null;const vt=id(ge,`${lt}-copy`),tt=nv(Xe,qn(Xe,lt,vt)),Ke=Od(Wx(st.getBoundingClientRect(),de),24,24),Zt=Jx(tt,Ke);return ge=`${ge}
|
|
413
|
+
<!-- ${vt} reserved -->`,Le.push(vt),{type:"element.insert",slideId:h.id,elementId:vt,...qt,html:Zt,timestamp:Date.now()}}).filter(lt=>!!lt);Ft(Ne),Le.length&&I(Le)}function kn(){if(!h||N.length===0)return;const ae=N.map(he=>{const de=Ys(h.htmlSource,he),ge=Gs(h.htmlSource,he);return!de||!ge?null:{type:"element.remove",slideId:h.id,elementId:he,...ge,html:de,timestamp:Date.now()}}).filter(he=>!!he);Ft(ae),ae.length&&I([])}function Vt(ae){if(!h||m.length===0)return;const he=S2(m,ae);E({type:"slide.create",slide:he,index:ae,timestamp:Date.now()}),S(he.id),M()}function aa(){if(!h)return;const ae=m.findIndex(de=>de.id===h.id),he=ae>=0?ae+1:m.length;Vt(he)}function Ht(ae){const he=m.findIndex(de=>de.id===ae);he<0||Vt(he)}function cn(ae){const he=m.findIndex(de=>de.id===ae);he<0||Vt(he+1)}function Dt(ae){const he=m.find(Ne=>Ne.id===ae);if(!he)return;const de=m.findIndex(Ne=>Ne.id===ae),ge=de>=0?de+1:m.length,Le=w2(m,he);E({type:"slide.duplicate",sourceSlideId:ae,slide:Le,index:ge,timestamp:Date.now()}),S(Le.id),M()}function Fr(ae){if(m.length<=1)return;const he=m.findIndex(Le=>Le.id===ae),de=m[he];if(!de)return;const ge=m[he+1]??m[he-1]??m[0];E({type:"slide.delete",slide:de,index:he,timestamp:Date.now()}),g===ae&&S((ge==null?void 0:ge.id)??""),M()}function vl(ae){const he=m.find(de=>de.id===ae);he&&E({type:"slide.visibility.update",slideId:ae,previousHidden:he.hidden===!0,nextHidden:he.hidden!==!0,timestamp:Date.now()})}function Sn(ae,he){const de=m.find(Le=>Le.id===ae),ge=he.trim()||"Untitled Slide";!de||de.title===ge||E({type:"slide.title.update",slideId:ae,previousTitle:de.title,nextTitle:ge,timestamp:Date.now()})}function Na(ae,he){const de=m.findIndex(ge=>ge.id===ae);de<0||de===he||(E({type:"slide.reorder",slideId:ae,fromIndex:de,toIndex:he,timestamp:Date.now()}),S(ae))}function Oa(){if(!h||N.length<2)return;const ae=Pn(),he=id(h.htmlSource,"group-1"),de=v2({html:h.htmlSource,slideId:h.id,groupElementId:he,elementRects:ae,elementIds:N});de&&(E(de),I([he]))}function Pn(ae){var qt;const he=(qt=A.current)==null?void 0:qt.contentDocument,de=he==null?void 0:he.querySelector((h==null?void 0:h.rootSelector)??"");if(!he||!de)return{};const ge=de.getBoundingClientRect(),Le=h?h.width/ge.width:1,Ne=h?h.height/ge.height:1,Be={},lt=V0(he,ae),Xe=[...Array.from(he.querySelectorAll(`[data-editable][${Ee}]`)),...Array.from(lt.keys())];for(const st of Xe){const vt=st.getAttribute(Ee)||lt.get(st);if(!vt)continue;const tt=st.getBoundingClientRect(),Ke=st.parentElement,Zt=Ke!=null&&Ke.hasAttribute("data-editable")&&Ke.getAttribute(Ee)?Ke.getAttribute(Ee):null,Et=Zt?Be[Zt]??{x:0,y:0,width:ge.width,height:ge.height}:{x:0,y:0,width:ge.width,height:ge.height};Be[vt]={x:(tt.left-ge.left)*Le-Et.x,y:(tt.top-ge.top)*Ne-Et.y,width:tt.width*Le,height:tt.height*Ne}}return Be}function wn(){if(!h||N.length!==1||!U)return;const ae=b2({html:h.htmlSource,slideId:h.id,groupElementId:U,elementRects:Pn(U),elementPresentationStyles:Re(U)});ae&&(E(ae),I(ae.childElementIds))}function Re(ae){var Ne,Be,lt;const he=(Ne=A.current)==null?void 0:Ne.contentDocument;if(!he)return{};const de=$e(he,ae);if(!de||de.getAttribute("data-group")==="true")return{};const ge={},Le=V0(he,ae);for(const Xe of Array.from(de.children)){if(!Xe.hasAttribute("data-editable")&&!xm(Xe))continue;const qt=Xe.getAttribute(Ee)||Le.get(Xe),st=(Be=Xe.ownerDocument.defaultView)==null?void 0:Be.getComputedStyle(Xe);if(!(!qt||!st)){ge[qt]={color:st.color,fontSize:st.fontSize,fontWeight:st.fontWeight,fontStyle:st.fontStyle,lineHeight:st.lineHeight,textAlign:st.textAlign,paddingTop:st.paddingTop,paddingRight:st.paddingRight,paddingBottom:st.paddingBottom,paddingLeft:st.paddingLeft,listStylePosition:st.listStylePosition,listStyleType:st.listStyleType};for(const vt of Array.from(Xe.querySelectorAll(`[data-editable][${Ee}]`))){const tt=vt.getAttribute(Ee),Ke=(lt=vt.ownerDocument.defaultView)==null?void 0:lt.getComputedStyle(vt);!tt||!Ke||(ge[tt]={color:Ke.color,fontSize:Ke.fontSize,fontWeight:Ke.fontWeight,fontStyle:Ke.fontStyle,lineHeight:Ke.lineHeight,textAlign:Ke.textAlign})}}}return ge}function ut(ae){if(!h||!U||!et)return;const he=Nd(h,U,"transform"),de={x:(et.x-be)/re,y:(et.y-Me)/re,width:et.width/re,height:et.height/re};let ge=0,Le=0;if(ae==="left"?ge=-de.x:ae==="hcenter"?ge=ce/2-(de.x+de.width/2):ae==="right"?ge=ce-(de.x+de.width):ae==="top"?Le=-de.y:ae==="vcenter"?Le=Z/2-(de.y+de.height/2):ae==="bottom"&&(Le=Z-(de.y+de.height)),Math.abs(ge)<.01&&Math.abs(Le)<.01)return;const Ne=Gn(he);xn("transform",Ca(Ne.translateX+ge,Ne.translateY+Le,Ne.rotate)??"")}function wt(ae){var Zt;if(!h||N.length<3)return;const he=(Zt=A.current)==null?void 0:Zt.contentDocument,de=he==null?void 0:he.querySelector(h.rootSelector),ge=de==null?void 0:de.getBoundingClientRect();if(!he||!ge)return;const Le=N.map(Et=>{const la=$e(he,Et);if(!la)return null;const za=la.getBoundingClientRect();return{elementId:Et,node:la,rect:{x:za.left-ge.left,y:za.top-ge.top,width:za.width,height:za.height}}}).filter(Et=>!!Et);if(Le.length<3)return;const Ne=ae==="vertical"?"y":"x",Be=ae==="vertical"?"height":"width",lt=[...Le].sort((Et,la)=>Et.rect[Ne]-la.rect[Ne]),Xe=lt[0],qt=lt[lt.length-1];if(!Xe||!qt)return;const st=Xe.rect[Ne]+Xe.rect[Be]/2,tt=(qt.rect[Ne]+qt.rect[Be]/2-st)/(lt.length-1),Ke=lt.map((Et,la)=>{const za=st+tt*la,ai=Et.rect[Ne]+Et.rect[Be]/2,ra=za-ai;if(Math.abs(ra)<.01)return null;const Da=Po(Et.node),Xn=Gn(Da.transform),ja=ld({...Da,transform:Ca(Xn.translateX+(Ne==="x"?ra:0),Xn.translateY+(Ne==="y"?ra:0),Xn.rotate),transformOrigin:Da.transformOrigin||"center center"});return{type:"element.layout.update",slideId:h.id,elementId:Et.elementId,previousStyle:Da,nextStyle:ja,timestamp:Date.now()}}).filter(Et=>!!Et);Ft(Ke)}return T5({activeSlide:h,selectedElementIds:N,iframeRef:A,slideWidth:ce,slideHeight:Z,isEditingText:ne,canUndo:x>0,canRedo:p>0,onCommitOperation:E,onSelectElementIds:I,onEscapeSelection:M,onUndo:T,onRedo:C}),h?v.jsx(XN,{children:v.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[v.jsxs("div",{className:`flex min-h-0 flex-auto flex-col ${X?"invisible pointer-events-none absolute inset-0":""}`,children:[v.jsx(DT,{title:me,onTitleChange:c,isSaving:o,onPresent:()=>{M(),le(!0)},onExportHtml:d,pdfSlides:m.map(ae=>({id:ae.id,title:ae.title,file:ae.sourceFile})),pdfThumbnails:V,onExportPdf:f}),v.jsxs("div",{className:"flex min-h-0 flex-auto gap-3 overflow-hidden max-[1200px]:block",children:[v.jsx(WR,{slides:m,activeSlideId:h.id,slideCount:m.length,thumbnails:V,onSelectSlide:ae=>{S(ae),B(null)},onAdd:aa,onAddSlideAbove:Ht,onAddSlideBelow:cn,onDuplicate:Dt,onDelete:Fr,onToggleHidden:vl,onRename:Sn,onReorder:Na}),v.jsx("main",{className:"flex min-h-0 min-w-0 flex-auto overflow-visible max-[1200px]:block",children:v.jsx(qN,{slideWidth:ce,slideHeight:Z,offsetX:be,offsetY:Me,scale:re,preselectionOverlay:Pe,selectionOverlay:et,toolbarKey:N.length?`${h.id}:${N.join(",")}`:null,inspectedStyles:Yt,selectedElementType:H,selectionCommandAvailability:ie,groupScopeOverlayPassive:ee,isEditingText:ne,manipulationOverlay:St,iframeRef:A,stageViewportRef:R,selectionOverlayRef:O,isManipulating:Ot,onSelectionOverlayMouseDown:ae=>{if(!N.length)return;const he=ae.shiftKey||ae.metaKey||ae.ctrlKey,de=q(ae.clientX,ae.clientY);if(D.current={clientX:ae.clientX,clientY:ae.clientY,additive:he,targetElementId:de},de&&de!==U){ae.stopPropagation();return}de&&de===U&&ae.stopPropagation(),ye({clientX:ae.clientX,clientY:ae.clientY,preventDefault:()=>ae.preventDefault(),stopPropagation:()=>ae.stopPropagation()})},onSelectionOverlayMouseMove:ae=>{const he=D.current;if(q(ae.clientX,ae.clientY),!he||he.targetElementId===U)return;const de=ae.clientX-he.clientX,ge=ae.clientY-he.clientY;Math.hypot(de,ge)<=4||(D.current=null,ye({clientX:he.clientX,clientY:he.clientY,preventDefault:()=>ae.preventDefault(),stopPropagation:()=>ae.stopPropagation()}))},onSelectionOverlayMouseUp:ae=>{const he=D.current;if(D.current=null,!he)return;const de=ae.clientX-he.clientX,ge=ae.clientY-he.clientY;Math.hypot(de,ge)>4||P(ae.clientX,ae.clientY,he.additive)},onStageMouseLeave:j,onResizeHandleMouseDown:(ae,he)=>{N.length&&on(ae,{clientX:he.clientX,clientY:he.clientY,preventDefault:()=>he.preventDefault(),stopPropagation:()=>he.stopPropagation()})},onRotateHandleMouseDown:ae=>{N.length===1&&sn({clientX:ae.clientX,clientY:ae.clientY,preventDefault:()=>ae.preventDefault(),stopPropagation:()=>ae.stopPropagation()})},onSelectionOverlayDoubleClick:ae=>{var he;if(fe&&((he=A.current)!=null&&he.contentDocument)){const de=A.current.getBoundingClientRect(),Le=A.current.contentDocument.elementFromPoint(ae.clientX-de.left,ae.clientY-de.top),Ne=Le==null?void 0:Le.closest(`[data-editable][${Ee}]`);if((Ne==null?void 0:Ne.getAttribute("data-editable"))==="text"){const Be=Ne.getAttribute(Ee);if(Be){$(Be);return}}}if(N.length===1&&(L==null?void 0:L.type)==="text"&&U){$(U);return}N.length===1&&(L==null?void 0:L.type)==="group"&&U&&Y(U)},onBackgroundClick:()=>{De||M()},onStyleChange:xn,onAttributeChange:zt,onAlignToSlide:ut,onDistribute:wt,onGroup:Oa,onLayerOrder:Ra,onUngroup:wn,onDuplicate:Qt,onDelete:kn,attributeValues:_t})})]})]}),X?v.jsx(JR,{slides:m,startSlideId:h.id,onExit:()=>le(!1)}):null]})}):v.jsx("div",{className:"grid min-h-screen place-items-center",children:"No slides loaded."})}function U3(n,l){if(typeof DOMParser>"u")return!1;const o=new DOMParser().parseFromString(n,"text/html"),i=$e(o,l);return!i||i.getAttribute("data-editable")!=="block"?!1:Array.from(i.children).some(c=>c instanceof HTMLElement&&(c.hasAttribute("data-editable")||xm(c)))}function V0(n,l){const o=new Map;if(!l)return o;const i=$e(n,l);if(!i||i.getAttribute("data-group")==="true")return o;const c=new Set(Array.from(n.querySelectorAll(`[${Ee}]`)).map(d=>d.getAttribute(Ee)).filter(d=>!!d)),f=d=>{if(!c.has(d))return c.add(d),d;const m=d.match(/^(.*?)(?:-(\d+))?$/),h=(m==null?void 0:m[1])||d;let g=Number.parseInt((m==null?void 0:m[2])||"1",10)+1;for(;c.has(`${h}-${g}`);)g+=1;const x=`${h}-${g}`;return c.add(x),x};for(const d of Array.from(i.children))xm(d)&&o.set(d,d.getAttribute(Ee)||f("block-1"));return o}function xm(n){const l=n.tagName.toLowerCase();return l!=="ul"&&l!=="ol"?!1:Array.from(n.children).some(o=>o.tagName.toLowerCase()==="li"&&o.hasAttribute("data-editable"))}const I3="/deck/manifest.json",G3="/__editor/save-generated-deck",Y3="/__editor/export-pdf",V3="/__editor/export-html",nd=800;function q3(){const[n,l]=b.useState("Generated deck"),[o,i]=b.useState([]),[c,f]=b.useState(null),[d,m]=b.useState(!0),[h,g]=b.useState(!1),x=b.useRef(null),p=b.useRef([]),S=b.useRef(null),E=b.useRef(null),T=b.useRef(null),C=b.useRef(0),A=b.useRef(!1),R=b.useRef(null),O=b.useRef(Date.now());b.useEffect(()=>{let N=!1;return T2({manifestUrl:`${I3}?v=${Date.now()}`}).then(Q=>{if(N)return;if(!Q){l("Generated deck"),i([]),f("No slides were found at /deck/manifest.json."),m(!1);return}x.current=Q.manifest;const ne=Q.manifest.topic||"Generated deck";E.current=ne,l(ne),i(Q.slides),p.current=Q.slides,f(null),m(!1)}).catch(()=>{N||(l("Generated deck"),i([]),f("The app could not load the generated deck."),m(!1))}),()=>{N=!0,T.current&&window.clearTimeout(T.current)}},[]);const D=async()=>{var Y;const N=x.current,Q=S.current??p.current,ne=E.current??n,fe=C.current;if(!((Y=N==null?void 0:N.slides)!=null&&Y.length)||!(Q!=null&&Q.length))return;if(A.current){await R.current,C.current!==fe&&await D();return}A.current=!0;const B=new Map(p.current.map((M,j)=>{var q,P;return[M.id,M.sourceFile??((P=(q=N.slides)==null?void 0:q[j])==null?void 0:P.file)]})),I=Q.flatMap(M=>{const j=M.sourceFile??B.get(M.id);return j?[{file:j,title:M.title,hidden:M.hidden===!0?!0:void 0}]:[]}),$=fetch(G3,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientLoadedAt:O.current,manifest:{...N,topic:ne,slides:I},slides:Q.map(M=>({file:M.sourceFile??B.get(M.id),htmlSource:M.htmlSource,title:M.title,hidden:M.hidden===!0}))})}).then(M=>{if(!M.ok)throw new Error("The app could not write generated slides back to disk.")}).catch(M=>{throw f("The app could not write generated slides back to disk."),M}).finally(()=>{if(A.current=!1,R.current=null,C.current!==fe){T.current||(T.current=window.setTimeout(()=>{T.current=null,D()},nd));return}g(!1)});R.current=$,await $};return{deckTitle:n,slides:o,errorMessage:c,isLoading:d,isSaving:h,saveSlides:N=>{var ne;if(p.current===N)return;const Q=x.current;(ne=Q==null?void 0:Q.slides)!=null&&ne.length&&(p.current=N,S.current=N,C.current+=1,g(!0),T.current&&window.clearTimeout(T.current),T.current=window.setTimeout(()=>{T.current=null,D()},nd))},saveDeckTitle:N=>{const Q=N.trim()||"Untitled deck";l(N),E.current=Q,C.current+=1,g(!0),T.current&&window.clearTimeout(T.current),T.current=window.setTimeout(()=>{T.current=null,D()},nd)},exportPdf:async N=>{T.current&&(window.clearTimeout(T.current),T.current=null),await D();const Q=await fetch(Y3,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({selection:N})});if(!Q.ok)throw new Error(await Q.text());const ne=await Q.blob(),fe=URL.createObjectURL(ne),B=document.createElement("a"),I=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";B.href=fe,B.download=`${I}.pdf`,document.body.appendChild(B),B.click(),B.remove(),URL.revokeObjectURL(fe)},exportHtml:async()=>{T.current&&(window.clearTimeout(T.current),T.current=null),await D();const N=await fetch(V3,{method:"POST"});if(!N.ok)throw new Error(await N.text());const Q=await N.blob(),ne=URL.createObjectURL(Q),fe=document.createElement("a"),B=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";fe.href=ne,fe.download=`${B}.html`,document.body.appendChild(fe),fe.click(),fe.remove(),URL.revokeObjectURL(ne)}}}function q0({title:n,body:l}){return v.jsx("main",{style:{minHeight:"100vh",display:"grid",placeItems:"center",padding:"32px",background:"#f4efe8",color:"#241d16",fontFamily:'"Avenir Next", "Segoe UI", sans-serif'},children:v.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:[v.jsx("h1",{style:{margin:"0 0 12px",fontSize:"40px",lineHeight:1.05},children:n}),v.jsx("p",{style:{margin:0,fontSize:"20px",lineHeight:1.5},children:l})]})})}function P3(){const{deckTitle:n,slides:l,errorMessage:o,isLoading:i,isSaving:c,saveSlides:f,saveDeckTitle:d,exportPdf:m,exportHtml:h}=q3();return i?v.jsx(q0,{title:"Loading generated deck",body:"The app is importing the latest generated slides."}):o?v.jsx(q0,{title:"Generated deck required",body:o}):v.jsxs(v.Fragment,{children:[v.jsx(l2,{position:"top-center",richColors:!0,closeButton:!0}),v.jsx(B3,{slides:l,deckTitle:n,isSaving:c,onSlidesChange:f,onDeckTitleChange:d,onExportPdf:g=>{const x=sl.loading("Exporting PDF...");m(g).then(()=>{sl.success("PDF export is ready.",{id:x})}).catch(p=>{sl.error("PDF export failed.",{id:x,description:p instanceof Error?p.message:String(p)})})},onExportHtml:()=>{const g=sl.loading("Exporting HTML...");h().then(()=>{sl.success("HTML export is ready.",{id:g})}).catch(x=>{sl.error("HTML export failed.",{id:g,description:x instanceof Error?x.message:String(x)})})}})]})}const f1=document.getElementById("root");if(!f1)throw new Error("Root element #root was not found.");Ow.createRoot(f1).render(v.jsx(pe.StrictMode,{children:v.jsx(P3,{})}));
|