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,324 @@
|
|
|
1
|
+
function uw(n,r){for(var o=0;o<r.length;o++){const i=r[o];if(typeof i!="string"&&!Array.isArray(i)){for(const c in i)if(c!=="default"&&!(c in n)){const u=Object.getOwnPropertyDescriptor(i,c);u&&Object.defineProperty(n,c,u.get?u:{enumerable:!0,get:()=>i[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function o(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(c){if(c.ep)return;c.ep=!0;const u=o(c);fetch(c.href,u)}})();function Ed(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var yf={exports:{}},To={};/**
|
|
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 ay;function fw(){if(ay)return To;ay=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function o(i,c,u){var d=null;if(u!==void 0&&(d=""+u),c.key!==void 0&&(d=""+c.key),"key"in c){u={};for(var h in c)h!=="key"&&(u[h]=c[h])}else u=c;return c=u.ref,{$$typeof:n,type:i,key:d,ref:c!==void 0?c:null,props:u}}return To.Fragment=r,To.jsx=o,To.jsxs=o,To}var oy;function dw(){return oy||(oy=1,yf.exports=fw()),yf.exports}var x=dw(),vf={exports:{}},Te={};/**
|
|
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 iy;function hw(){if(iy)return Te;iy=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),S=Symbol.iterator;function C(M){return M===null||typeof M!="object"?null:(M=S&&M[S]||M["@@iterator"],typeof M=="function"?M:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,A={};function N(M,B,ne){this.props=M,this.context=B,this.refs=A,this.updater=ne||T}N.prototype.isReactComponent={},N.prototype.setState=function(M,B){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,B,"setState")},N.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function z(){}z.prototype=N.prototype;function k(M,B,ne){this.props=M,this.context=B,this.refs=A,this.updater=ne||T}var q=k.prototype=new z;q.constructor=k,E(q,N.prototype),q.isPureReactComponent=!0;var Z=Array.isArray;function D(){}var _={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function H(M,B,ne){var oe=ne.ref;return{$$typeof:n,type:M,key:B,ref:oe!==void 0?oe:null,props:ne}}function I(M,B){return H(M.type,B,M.props)}function J(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}function le(M){var B={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(ne){return B[ne]})}var re=/\/+/g;function te(M,B){return typeof M=="object"&&M!==null&&M.key!=null?le(""+M.key):B.toString(36)}function ae(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(D,D):(M.status="pending",M.then(function(B){M.status==="pending"&&(M.status="fulfilled",M.value=B)},function(B){M.status==="pending"&&(M.status="rejected",M.reason=B)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function O(M,B,ne,oe,ce){var se=typeof M;(se==="undefined"||se==="boolean")&&(M=null);var ie=!1;if(M===null)ie=!0;else switch(se){case"bigint":case"string":case"number":ie=!0;break;case"object":switch(M.$$typeof){case n:case r:ie=!0;break;case v:return ie=M._init,O(ie(M._payload),B,ne,oe,ce)}}if(ie)return ce=ce(M),ie=oe===""?"."+te(M,0):oe,Z(ce)?(ne="",ie!=null&&(ne=ie.replace(re,"$&/")+"/"),O(ce,B,ne,"",function(Me){return Me})):ce!=null&&(J(ce)&&(ce=I(ce,ne+(ce.key==null||M&&M.key===ce.key?"":(""+ce.key).replace(re,"$&/")+"/")+ie)),B.push(ce)),1;ie=0;var xe=oe===""?".":oe+":";if(Z(M))for(var fe=0;fe<M.length;fe++)oe=M[fe],se=xe+te(oe,fe),ie+=O(oe,B,ne,se,ce);else if(fe=C(M),typeof fe=="function")for(M=fe.call(M),fe=0;!(oe=M.next()).done;)oe=oe.value,se=xe+te(oe,fe++),ie+=O(oe,B,ne,se,ce);else if(se==="object"){if(typeof M.then=="function")return O(ae(M),B,ne,oe,ce);throw B=String(M),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return ie}function X(M,B,ne){if(M==null)return M;var oe=[],ce=0;return O(M,oe,"","",function(se){return B.call(ne,se,ce++)}),oe}function G(M){if(M._status===-1){var B=M._result;B=B(),B.then(function(ne){(M._status===0||M._status===-1)&&(M._status=1,M._result=ne)},function(ne){(M._status===0||M._status===-1)&&(M._status=2,M._result=ne)}),M._status===-1&&(M._status=0,M._result=B)}if(M._status===1)return M._result.default;throw M._result}var $=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},K={map:X,forEach:function(M,B,ne){X(M,function(){B.apply(this,arguments)},ne)},count:function(M){var B=0;return X(M,function(){B++}),B},toArray:function(M){return X(M,function(B){return B})||[]},only:function(M){if(!J(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return Te.Activity=b,Te.Children=K,Te.Component=N,Te.Fragment=o,Te.Profiler=c,Te.PureComponent=k,Te.StrictMode=i,Te.Suspense=m,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,Te.__COMPILER_RUNTIME={__proto__:null,c:function(M){return _.H.useMemoCache(M)}},Te.cache=function(M){return function(){return M.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(M,B,ne){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var oe=E({},M.props),ce=M.key;if(B!=null)for(se in B.key!==void 0&&(ce=""+B.key),B)!j.call(B,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&B.ref===void 0||(oe[se]=B[se]);var se=arguments.length-2;if(se===1)oe.children=ne;else if(1<se){for(var ie=Array(se),xe=0;xe<se;xe++)ie[xe]=arguments[xe+2];oe.children=ie}return H(M.type,ce,oe)},Te.createContext=function(M){return M={$$typeof:d,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:u,_context:M},M},Te.createElement=function(M,B,ne){var oe,ce={},se=null;if(B!=null)for(oe in B.key!==void 0&&(se=""+B.key),B)j.call(B,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(ce[oe]=B[oe]);var ie=arguments.length-2;if(ie===1)ce.children=ne;else if(1<ie){for(var xe=Array(ie),fe=0;fe<ie;fe++)xe[fe]=arguments[fe+2];ce.children=xe}if(M&&M.defaultProps)for(oe in ie=M.defaultProps,ie)ce[oe]===void 0&&(ce[oe]=ie[oe]);return H(M,se,ce)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(M){return{$$typeof:h,render:M}},Te.isValidElement=J,Te.lazy=function(M){return{$$typeof:v,_payload:{_status:-1,_result:M},_init:G}},Te.memo=function(M,B){return{$$typeof:p,type:M,compare:B===void 0?null:B}},Te.startTransition=function(M){var B=_.T,ne={};_.T=ne;try{var oe=M(),ce=_.S;ce!==null&&ce(ne,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(D,$)}catch(se){$(se)}finally{B!==null&&ne.types!==null&&(B.types=ne.types),_.T=B}},Te.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},Te.use=function(M){return _.H.use(M)},Te.useActionState=function(M,B,ne){return _.H.useActionState(M,B,ne)},Te.useCallback=function(M,B){return _.H.useCallback(M,B)},Te.useContext=function(M){return _.H.useContext(M)},Te.useDebugValue=function(){},Te.useDeferredValue=function(M,B){return _.H.useDeferredValue(M,B)},Te.useEffect=function(M,B){return _.H.useEffect(M,B)},Te.useEffectEvent=function(M){return _.H.useEffectEvent(M)},Te.useId=function(){return _.H.useId()},Te.useImperativeHandle=function(M,B,ne){return _.H.useImperativeHandle(M,B,ne)},Te.useInsertionEffect=function(M,B){return _.H.useInsertionEffect(M,B)},Te.useLayoutEffect=function(M,B){return _.H.useLayoutEffect(M,B)},Te.useMemo=function(M,B){return _.H.useMemo(M,B)},Te.useOptimistic=function(M,B){return _.H.useOptimistic(M,B)},Te.useReducer=function(M,B,ne){return _.H.useReducer(M,B,ne)},Te.useRef=function(M){return _.H.useRef(M)},Te.useState=function(M){return _.H.useState(M)},Te.useSyncExternalStore=function(M,B,ne){return _.H.useSyncExternalStore(M,B,ne)},Te.useTransition=function(){return _.H.useTransition()},Te.version="19.2.5",Te}var cy;function Cd(){return cy||(cy=1,vf.exports=hw()),vf.exports}var y=Cd();const rl=Ed(y),Dv=uw({__proto__:null,default:rl},[y]);var bf={exports:{}},Ao={},xf={exports:{}},Sf={};/**
|
|
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 sy;function mw(){return sy||(sy=1,(function(n){function r(O,X){var G=O.length;O.push(X);e:for(;0<G;){var $=G-1>>>1,K=O[$];if(0<c(K,X))O[$]=X,O[G]=K,G=$;else break e}}function o(O){return O.length===0?null:O[0]}function i(O){if(O.length===0)return null;var X=O[0],G=O.pop();if(G!==X){O[0]=G;e:for(var $=0,K=O.length,M=K>>>1;$<M;){var B=2*($+1)-1,ne=O[B],oe=B+1,ce=O[oe];if(0>c(ne,G))oe<K&&0>c(ce,ne)?(O[$]=ce,O[oe]=G,$=oe):(O[$]=ne,O[B]=G,$=B);else if(oe<K&&0>c(ce,G))O[$]=ce,O[oe]=G,$=oe;else break e}}return X}function c(O,X){var G=O.sortIndex-X.sortIndex;return G!==0?G:O.id-X.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var m=[],p=[],v=1,b=null,S=3,C=!1,T=!1,E=!1,A=!1,N=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function q(O){for(var X=o(p);X!==null;){if(X.callback===null)i(p);else if(X.startTime<=O)i(p),X.sortIndex=X.expirationTime,r(m,X);else break;X=o(p)}}function Z(O){if(E=!1,q(O),!T)if(o(m)!==null)T=!0,D||(D=!0,le());else{var X=o(p);X!==null&&ae(Z,X.startTime-O)}}var D=!1,_=-1,j=5,H=-1;function I(){return A?!0:!(n.unstable_now()-H<j)}function J(){if(A=!1,D){var O=n.unstable_now();H=O;var X=!0;try{e:{T=!1,E&&(E=!1,z(_),_=-1),C=!0;var G=S;try{t:{for(q(O),b=o(m);b!==null&&!(b.expirationTime>O&&I());){var $=b.callback;if(typeof $=="function"){b.callback=null,S=b.priorityLevel;var K=$(b.expirationTime<=O);if(O=n.unstable_now(),typeof K=="function"){b.callback=K,q(O),X=!0;break t}b===o(m)&&i(m),q(O)}else i(m);b=o(m)}if(b!==null)X=!0;else{var M=o(p);M!==null&&ae(Z,M.startTime-O),X=!1}}break e}finally{b=null,S=G,C=!1}X=void 0}}finally{X?le():D=!1}}}var le;if(typeof k=="function")le=function(){k(J)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,te=re.port2;re.port1.onmessage=J,le=function(){te.postMessage(null)}}else le=function(){N(J,0)};function ae(O,X){_=N(function(){O(n.unstable_now())},X)}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(O){O.callback=null},n.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<O?Math.floor(1e3/O):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(O){switch(S){case 1:case 2:case 3:var X=3;break;default:X=S}var G=S;S=X;try{return O()}finally{S=G}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(O,X){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var G=S;S=O;try{return X()}finally{S=G}},n.unstable_scheduleCallback=function(O,X,G){var $=n.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?$+G:$):G=$,O){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=G+K,O={id:v++,callback:X,priorityLevel:O,startTime:G,expirationTime:K,sortIndex:-1},G>$?(O.sortIndex=G,r(p,O),o(m)===null&&O===o(p)&&(E?(z(_),_=-1):E=!0,ae(Z,G-$))):(O.sortIndex=K,r(m,O),T||C||(T=!0,D||(D=!0,le()))),O},n.unstable_shouldYield=I,n.unstable_wrapCallback=function(O){var X=S;return function(){var G=S;S=X;try{return O.apply(this,arguments)}finally{S=G}}}})(Sf)),Sf}var uy;function pw(){return uy||(uy=1,xf.exports=mw()),xf.exports}var wf={exports:{}},Ot={};/**
|
|
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 fy;function gw(){if(fy)return Ot;fy=1;var n=Cd();function r(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)p+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+p+" 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(r(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 u(m,p,v){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:b==null?null:""+b,children:m,containerInfo:p,implementation:v}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Ot.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Ot.createPortal=function(m,p){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return u(m,p,null,v)},Ot.flushSync=function(m){var p=d.T,v=i.p;try{if(d.T=null,i.p=2,m)return m()}finally{d.T=p,i.p=v,i.d.f()}},Ot.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(m,p))},Ot.prefetchDNS=function(m){typeof m=="string"&&i.d.D(m)},Ot.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var v=p.as,b=h(v,p.crossOrigin),S=typeof p.integrity=="string"?p.integrity:void 0,C=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;v==="style"?i.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:b,integrity:S,fetchPriority:C}):v==="script"&&i.d.X(m,{crossOrigin:b,integrity:S,fetchPriority:C,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Ot.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var v=h(p.as,p.crossOrigin);i.d.M(m,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(m)},Ot.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var v=p.as,b=h(v,p.crossOrigin);i.d.L(m,v,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Ot.preloadModule=function(m,p){if(typeof m=="string")if(p){var v=h(p.as,p.crossOrigin);i.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(m)},Ot.requestFormReset=function(m){i.d.r(m)},Ot.unstable_batchedUpdates=function(m,p){return m(p)},Ot.useFormState=function(m,p,v){return d.H.useFormState(m,p,v)},Ot.useFormStatus=function(){return d.H.useHostTransitionStatus()},Ot.version="19.2.5",Ot}var dy;function jv(){if(dy)return wf.exports;dy=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(r){console.error(r)}}return n(),wf.exports=gw(),wf.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 hy;function yw(){if(hy)return Ao;hy=1;var n=pw(),r=Cd(),o=jv();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 u(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l: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 h(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(u(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var l=e,a=t;;){var s=l.return;if(s===null)break;var f=s.alternate;if(f===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===f.child){for(f=s.child;f;){if(f===l)return m(s),e;if(f===a)return m(s),t;f=f.sibling}throw Error(i(188))}if(l.return!==a.return)l=s,a=f;else{for(var g=!1,w=s.child;w;){if(w===l){g=!0,l=s,a=f;break}if(w===a){g=!0,a=s,l=f;break}w=w.sibling}if(!g){for(w=f.child;w;){if(w===l){g=!0,l=f,a=s;break}if(w===a){g=!0,a=f,l=s;break}w=w.sibling}if(!g)throw Error(i(189))}}if(l.alternate!==a)throw Error(i(190))}if(l.tag!==3)throw Error(i(188));return l.stateNode.current===l?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,S=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),k=Symbol.for("react.context"),q=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function le(e){return e===null||typeof e!="object"?null:(e=J&&e[J]||e["@@iterator"],typeof e=="function"?e:null)}var re=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===re?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case N:return"Profiler";case A:return"StrictMode";case Z:return"Suspense";case D:return"SuspenseList";case H:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case k:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case q:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _:return t=e.displayName||null,t!==null?t:te(e.type)||"Memo";case j:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var ae=Array.isArray,O=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},$=[],K=-1;function M(e){return{current:e}}function B(e){0>K||(e.current=$[K],$[K]=null,K--)}function ne(e,t){K++,$[K]=e.current,e.current=t}var oe=M(null),ce=M(null),se=M(null),ie=M(null);function xe(e,t){switch(ne(se,t),ne(ce,e),ne(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?_g(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=_g(t),e=Rg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(oe),ne(oe,e)}function fe(){B(oe),B(ce),B(se)}function Me(e){e.memoizedState!==null&&ne(ie,e);var t=oe.current,l=Rg(t,e.type);t!==l&&(ne(ce,e),ne(oe,l))}function we(e){ce.current===e&&(B(oe),B(ce)),ie.current===e&&(B(ie),So._currentValue=G)}var Ee,nt;function Pe(e){if(Ee===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);Ee=t&&t[1]||"",nt=-1<l.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ee+e+nt}var kt=!1;function Ht(e,t){if(!e||kt)return"";kt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch(Q){var P=Q}Reflect.construct(e,[],ee)}else{try{ee.call()}catch(Q){P=Q}e.call(ee.prototype)}}else{try{throw Error()}catch(Q){P=Q}(ee=e())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch(Q){if(Q&&P&&typeof Q.stack=="string")return[Q.stack,P.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=a.DetermineComponentFrameRoot(),g=f[0],w=f[1];if(g&&w){var R=g.split(`
|
|
44
|
+
`),V=w.split(`
|
|
45
|
+
`);for(s=a=0;a<R.length&&!R[a].includes("DetermineComponentFrameRoot");)a++;for(;s<V.length&&!V[s].includes("DetermineComponentFrameRoot");)s++;if(a===R.length||s===V.length)for(a=R.length-1,s=V.length-1;1<=a&&0<=s&&R[a]!==V[s];)s--;for(;1<=a&&0<=s;a--,s--)if(R[a]!==V[s]){if(a!==1||s!==1)do if(a--,s--,0>s||R[a]!==V[s]){var F=`
|
|
46
|
+
`+R[a].replace(" at new "," at ");return e.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",e.displayName)),F}while(1<=a&&0<=s);break}}}finally{kt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Pe(l):""}function jt(e,t){switch(e.tag){case 26:case 27:case 5:return Pe(e.type);case 16:return Pe("Lazy");case 13:return e.child!==t&&t!==null?Pe("Suspense Fallback"):Pe("Suspense");case 19:return Pe("SuspenseList");case 0:case 15:return Ht(e.type,!1);case 11:return Ht(e.type.render,!1);case 1:return Ht(e.type,!0);case 31:return Pe("Activity");default:return""}}function Ne(e){try{var t="",l=null;do t+=jt(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
|
+
Error generating stack: `+a.message+`
|
|
48
|
+
`+a.stack}}var be=Object.prototype.hasOwnProperty,yn=n.unstable_scheduleCallback,vn=n.unstable_cancelCallback,An=n.unstable_shouldYield,Oa=n.unstable_requestPaint,Et=n.unstable_now,Hn=n.unstable_getCurrentPriorityLevel,ue=n.unstable_ImmediatePriority,Ce=n.unstable_UserBlockingPriority,ye=n.unstable_NormalPriority,je=n.unstable_LowPriority,$e=n.unstable_IdlePriority,Ue=n.log,tt=n.unstable_setDisableYieldValue,gt=null,at=null;function Ct(e){if(typeof Ue=="function"&&tt(e),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(gt,e)}catch{}}var it=Math.clz32?Math.clz32:rs,za=Math.log,Tr=Math.LN2;function rs(e){return e>>>=0,e===0?32:31-(za(e)/Tr|0)|0}var Ql=256,xt=262144,ln=4194304;function Ut(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 Ar(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,f=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var w=a&134217727;return w!==0?(a=w&~f,a!==0?s=Ut(a):(g&=w,g!==0?s=Ut(g):l||(l=w&~e,l!==0&&(s=Ut(l))))):(w=a&~f,w!==0?s=Ut(w):g!==0?s=Ut(g):l||(l=a&~e,l!==0&&(s=Ut(l)))),s===0?0:t!==0&&t!==s&&(t&f)===0&&(f=s&-s,l=t&-t,f>=l||f===32&&(l&4194048)!==0)?t:s}function Un(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Mr(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 _r(){var e=ln;return ln<<=1,(ln&62914560)===0&&(ln=4194304),e}function Da(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function ja(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Jx(e,t,l,a,s,f){var g=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var w=e.entanglements,R=e.expirationTimes,V=e.hiddenUpdates;for(l=g&~l;0<l;){var F=31-it(l),ee=1<<F;w[F]=0,R[F]=-1;var P=V[F];if(P!==null)for(V[F]=null,F=0;F<P.length;F++){var Q=P[F];Q!==null&&(Q.lane&=-536870913)}l&=~ee}a!==0&&uh(e,a,0),f!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=f&~(g&~t))}function uh(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-it(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function fh(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-it(l),s=1<<a;s&t|e[a]&t&&(e[a]|=t),l&=~s}}function dh(e,t){var l=t&-t;return l=(l&42)!==0?1:as(l),(l&(e.suspendedLanes|t))!==0?0:l}function as(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 os(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function hh(){var e=X.p;return e!==0?e:(e=window.event,e===void 0?32:Jg(e.type))}function mh(e,t){var l=X.p;try{return X.p=e,t()}finally{X.p=l}}var sl=Math.random().toString(36).slice(2),Tt="__reactFiber$"+sl,Bt="__reactProps$"+sl,Rr="__reactContainer$"+sl,is="__reactEvents$"+sl,Wx="__reactListeners$"+sl,eS="__reactHandles$"+sl,ph="__reactResources$"+sl,La="__reactMarker$"+sl;function cs(e){delete e[Tt],delete e[Bt],delete e[is],delete e[Wx],delete e[eS]}function Nr(e){var t=e[Tt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Rr]||l[Tt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=kg(e);e!==null;){if(l=e[Tt])return l;e=kg(e)}return t}e=l,l=e.parentNode}return null}function Or(e){if(e=e[Tt]||e[Rr]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ka(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function zr(e){var t=e[ph];return t||(t=e[ph]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function St(e){e[La]=!0}var gh=new Set,yh={};function Zl(e,t){Dr(e,t),Dr(e+"Capture",t)}function Dr(e,t){for(yh[e]=t,e=0;e<t.length;e++)gh.add(t[e])}var tS=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]*$"),vh={},bh={};function nS(e){return be.call(bh,e)?!0:be.call(vh,e)?!1:tS.test(e)?bh[e]=!0:(vh[e]=!0,!1)}function qo(e,t,l){if(nS(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Xo(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Bn(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function rn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lS(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,f=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(g){l=""+g,f.call(this,g)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(g){l=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ss(e){if(!e._valueTracker){var t=xh(e)?"checked":"value";e._valueTracker=lS(e,t,""+e[t])}}function Sh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=xh(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Io(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 rS=/[\n"\\]/g;function an(e){return e.replace(rS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function us(e,t,l,a,s,f,g,w){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+rn(t)):e.value!==""+rn(t)&&(e.value=""+rn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?fs(e,g,rn(t)):l!=null?fs(e,g,rn(l)):a!=null&&e.removeAttribute("value"),s==null&&f!=null&&(e.defaultChecked=!!f),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+rn(w):e.removeAttribute("name")}function wh(e,t,l,a,s,f,g,w){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||l!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){ss(e);return}l=l!=null?""+rn(l):"",t=t!=null?""+rn(t):l,w||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=w?e.checked:!!a,e.defaultChecked=!!a,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),ss(e)}function fs(e,t,l){t==="number"&&Io(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function jr(e,t,l,a){if(e=e.options,t){t={};for(var s=0;s<l.length;s++)t["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=t.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+rn(l),t=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Eh(e,t,l){if(t!=null&&(t=""+rn(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+rn(l):""}function Ch(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(i(92));if(ae(a)){if(1<a.length)throw Error(i(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=rn(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),ss(e)}function Lr(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var aS=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 Th(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||aS.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Ah(e,t,l){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&l[s]!==a&&Th(e,s,a)}else for(var f in t)t.hasOwnProperty(f)&&Th(e,f,t[f])}function ds(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 oS=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"]]),iS=/^[\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 Po(e){return iS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Gn(){}var hs=null;function ms(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kr=null,Hr=null;function Mh(e){var t=Or(e);if(t&&(e=t.stateNode)){var l=e[Bt]||null;e:switch(e=t.stateNode,t.type){case"input":if(us(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+an(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var s=a[Bt]||null;if(!s)throw Error(i(90));us(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Sh(a)}break e;case"textarea":Eh(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&jr(e,!!l.multiple,t,!1)}}}var ps=!1;function _h(e,t,l){if(ps)return e(t,l);ps=!0;try{var a=e(t);return a}finally{if(ps=!1,(kr!==null||Hr!==null)&&(Di(),kr&&(t=kr,e=Hr,Hr=kr=null,Mh(t),e)))for(t=0;t<e.length;t++)Mh(e[t])}}function Ha(e,t){var l=e.stateNode;if(l===null)return null;var a=l[Bt]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(i(231,t,typeof l));return l}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gs=!1;if(Yn)try{var Ua={};Object.defineProperty(Ua,"passive",{get:function(){gs=!0}}),window.addEventListener("test",Ua,Ua),window.removeEventListener("test",Ua,Ua)}catch{gs=!1}var ul=null,ys=null,$o=null;function Rh(){if($o)return $o;var e,t=ys,l=t.length,a,s="value"in ul?ul.value:ul.textContent,f=s.length;for(e=0;e<l&&t[e]===s[e];e++);var g=l-e;for(a=1;a<=g&&t[l-a]===s[f-a];a++);return $o=s.slice(e,1<a?1-a:void 0)}function Ko(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 Qo(){return!0}function Nh(){return!1}function Gt(e){function t(l,a,s,f,g){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=f,this.target=g,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(l=e[w],this[w]=l?l(f):f[w]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Qo:Nh,this.isPropagationStopped=Nh,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Qo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Qo)},persist:function(){},isPersistent:Qo}),t}var Fl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zo=Gt(Fl),Ba=b({},Fl,{view:0,detail:0}),cS=Gt(Ba),vs,bs,Ga,Fo=b({},Ba,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ss,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!==Ga&&(Ga&&e.type==="mousemove"?(vs=e.screenX-Ga.screenX,bs=e.screenY-Ga.screenY):bs=vs=0,Ga=e),vs)},movementY:function(e){return"movementY"in e?e.movementY:bs}}),Oh=Gt(Fo),sS=b({},Fo,{dataTransfer:0}),uS=Gt(sS),fS=b({},Ba,{relatedTarget:0}),xs=Gt(fS),dS=b({},Fl,{animationName:0,elapsedTime:0,pseudoElement:0}),hS=Gt(dS),mS=b({},Fl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pS=Gt(mS),gS=b({},Fl,{data:0}),zh=Gt(gS),yS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vS={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"},bS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bS[e])?!!t[e]:!1}function Ss(){return xS}var SS=b({},Ba,{key:function(e){if(e.key){var t=yS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ko(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?vS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ss,charCode:function(e){return e.type==="keypress"?Ko(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ko(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wS=Gt(SS),ES=b({},Fo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dh=Gt(ES),CS=b({},Ba,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ss}),TS=Gt(CS),AS=b({},Fl,{propertyName:0,elapsedTime:0,pseudoElement:0}),MS=Gt(AS),_S=b({},Fo,{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}),RS=Gt(_S),NS=b({},Fl,{newState:0,oldState:0}),OS=Gt(NS),zS=[9,13,27,32],ws=Yn&&"CompositionEvent"in window,Ya=null;Yn&&"documentMode"in document&&(Ya=document.documentMode);var DS=Yn&&"TextEvent"in window&&!Ya,jh=Yn&&(!ws||Ya&&8<Ya&&11>=Ya),Lh=" ",kh=!1;function Hh(e,t){switch(e){case"keyup":return zS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ur=!1;function jS(e,t){switch(e){case"compositionend":return Uh(t);case"keypress":return t.which!==32?null:(kh=!0,Lh);case"textInput":return e=t.data,e===Lh&&kh?null:e;default:return null}}function LS(e,t){if(Ur)return e==="compositionend"||!ws&&Hh(e,t)?(e=Rh(),$o=ys=ul=null,Ur=!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 jh&&t.locale!=="ko"?null:t.data;default:return null}}var kS={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 Bh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!kS[e.type]:t==="textarea"}function Gh(e,t,l,a){kr?Hr?Hr.push(a):Hr=[a]:kr=a,t=Gi(t,"onChange"),0<t.length&&(l=new Zo("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Va=null,qa=null;function HS(e){wg(e,0)}function Jo(e){var t=ka(e);if(Sh(t))return e}function Yh(e,t){if(e==="change")return t}var Vh=!1;if(Yn){var Es;if(Yn){var Cs="oninput"in document;if(!Cs){var qh=document.createElement("div");qh.setAttribute("oninput","return;"),Cs=typeof qh.oninput=="function"}Es=Cs}else Es=!1;Vh=Es&&(!document.documentMode||9<document.documentMode)}function Xh(){Va&&(Va.detachEvent("onpropertychange",Ih),qa=Va=null)}function Ih(e){if(e.propertyName==="value"&&Jo(qa)){var t=[];Gh(t,qa,e,ms(e)),_h(HS,t)}}function US(e,t,l){e==="focusin"?(Xh(),Va=t,qa=l,Va.attachEvent("onpropertychange",Ih)):e==="focusout"&&Xh()}function BS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Jo(qa)}function GS(e,t){if(e==="click")return Jo(t)}function YS(e,t){if(e==="input"||e==="change")return Jo(t)}function VS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $t=typeof Object.is=="function"?Object.is:VS;function Xa(e,t){if($t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!be.call(t,s)||!$t(e[s],t[s]))return!1}return!0}function Ph(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $h(e,t){var l=Ph(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ph(l)}}function Kh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Io(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Io(e.document)}return t}function Ts(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 qS=Yn&&"documentMode"in document&&11>=document.documentMode,Br=null,As=null,Ia=null,Ms=!1;function Zh(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ms||Br==null||Br!==Io(a)||(a=Br,"selectionStart"in a&&Ts(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ia&&Xa(Ia,a)||(Ia=a,a=Gi(As,"onSelect"),0<a.length&&(t=new Zo("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Br)))}function Jl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var Gr={animationend:Jl("Animation","AnimationEnd"),animationiteration:Jl("Animation","AnimationIteration"),animationstart:Jl("Animation","AnimationStart"),transitionrun:Jl("Transition","TransitionRun"),transitionstart:Jl("Transition","TransitionStart"),transitioncancel:Jl("Transition","TransitionCancel"),transitionend:Jl("Transition","TransitionEnd")},_s={},Fh={};Yn&&(Fh=document.createElement("div").style,"AnimationEvent"in window||(delete Gr.animationend.animation,delete Gr.animationiteration.animation,delete Gr.animationstart.animation),"TransitionEvent"in window||delete Gr.transitionend.transition);function Wl(e){if(_s[e])return _s[e];if(!Gr[e])return e;var t=Gr[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Fh)return _s[e]=t[l];return e}var Jh=Wl("animationend"),Wh=Wl("animationiteration"),em=Wl("animationstart"),XS=Wl("transitionrun"),IS=Wl("transitionstart"),PS=Wl("transitioncancel"),tm=Wl("transitionend"),nm=new Map,Rs="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(" ");Rs.push("scrollEnd");function bn(e,t){nm.set(e,t),Zl(t,[e])}var Wo=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)},on=[],Yr=0,Ns=0;function ei(){for(var e=Yr,t=Ns=Yr=0;t<e;){var l=on[t];on[t++]=null;var a=on[t];on[t++]=null;var s=on[t];on[t++]=null;var f=on[t];if(on[t++]=null,a!==null&&s!==null){var g=a.pending;g===null?s.next=s:(s.next=g.next,g.next=s),a.pending=s}f!==0&&lm(l,s,f)}}function ti(e,t,l,a){on[Yr++]=e,on[Yr++]=t,on[Yr++]=l,on[Yr++]=a,Ns|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Os(e,t,l,a){return ti(e,t,l,a),ni(e)}function er(e,t){return ti(e,null,null,t),ni(e)}function lm(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,f=e.return;f!==null;)f.childLanes|=l,a=f.alternate,a!==null&&(a.childLanes|=l),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(s=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,s&&t!==null&&(s=31-it(l),e=f.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=l|536870912),f):null}function ni(e){if(50<mo)throw mo=0,Gu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Vr={};function $S(e,t,l,a){this.tag=e,this.key=l,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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kt(e,t,l,a){return new $S(e,t,l,a)}function zs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vn(e,t){var l=e.alternate;return l===null?(l=Kt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function rm(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function li(e,t,l,a,s,f){var g=0;if(a=e,typeof e=="function")zs(e)&&(g=1);else if(typeof e=="string")g=J1(e,l,oe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case H:return e=Kt(31,l,t,s),e.elementType=H,e.lanes=f,e;case E:return tr(l.children,s,f,t);case A:g=8,s|=24;break;case N:return e=Kt(12,l,t,s|2),e.elementType=N,e.lanes=f,e;case Z:return e=Kt(13,l,t,s),e.elementType=Z,e.lanes=f,e;case D:return e=Kt(19,l,t,s),e.elementType=D,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case k:g=10;break e;case z:g=9;break e;case q:g=11;break e;case _:g=14;break e;case j:g=16,a=null;break e}g=29,l=Error(i(130,e===null?"null":typeof e,"")),a=null}return t=Kt(g,l,t,s),t.elementType=e,t.type=a,t.lanes=f,t}function tr(e,t,l,a){return e=Kt(7,e,a,t),e.lanes=l,e}function Ds(e,t,l){return e=Kt(6,e,null,t),e.lanes=l,e}function am(e){var t=Kt(18,null,null,0);return t.stateNode=e,t}function js(e,t,l){return t=Kt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var om=new WeakMap;function cn(e,t){if(typeof e=="object"&&e!==null){var l=om.get(e);return l!==void 0?l:(t={value:e,source:t,stack:Ne(t)},om.set(e,t),t)}return{value:e,source:t,stack:Ne(t)}}var qr=[],Xr=0,ri=null,Pa=0,sn=[],un=0,fl=null,Mn=1,_n="";function qn(e,t){qr[Xr++]=Pa,qr[Xr++]=ri,ri=e,Pa=t}function im(e,t,l){sn[un++]=Mn,sn[un++]=_n,sn[un++]=fl,fl=e;var a=Mn;e=_n;var s=32-it(a)-1;a&=~(1<<s),l+=1;var f=32-it(t)+s;if(30<f){var g=s-s%5;f=(a&(1<<g)-1).toString(32),a>>=g,s-=g,Mn=1<<32-it(t)+s|l<<s|a,_n=f+e}else Mn=1<<f|l<<s|a,_n=e}function Ls(e){e.return!==null&&(qn(e,1),im(e,1,0))}function ks(e){for(;e===ri;)ri=qr[--Xr],qr[Xr]=null,Pa=qr[--Xr],qr[Xr]=null;for(;e===fl;)fl=sn[--un],sn[un]=null,_n=sn[--un],sn[un]=null,Mn=sn[--un],sn[un]=null}function cm(e,t){sn[un++]=Mn,sn[un++]=_n,sn[un++]=fl,Mn=t.id,_n=t.overflow,fl=e}var At=null,lt=null,Be=!1,dl=null,fn=!1,Hs=Error(i(519));function hl(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw $a(cn(t,e)),Hs}function sm(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Tt]=e,t[Bt]=a,l){case"dialog":De("cancel",t),De("close",t);break;case"iframe":case"object":case"embed":De("load",t);break;case"video":case"audio":for(l=0;l<go.length;l++)De(go[l],t);break;case"source":De("error",t);break;case"img":case"image":case"link":De("error",t),De("load",t);break;case"details":De("toggle",t);break;case"input":De("invalid",t),wh(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":De("invalid",t);break;case"textarea":De("invalid",t),Ch(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||Ag(t.textContent,l)?(a.popover!=null&&(De("beforetoggle",t),De("toggle",t)),a.onScroll!=null&&De("scroll",t),a.onScrollEnd!=null&&De("scrollend",t),a.onClick!=null&&(t.onclick=Gn),t=!0):t=!1,t||hl(e,!0)}function um(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:At=At.return}}function Ir(e){if(e!==At)return!1;if(!Be)return um(e),Be=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||tf(e.type,e.memoizedProps)),l=!l),l&<&&hl(e),um(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));lt=Lg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));lt=Lg(e)}else t===27?(t=lt,Ml(e.type)?(e=of,of=null,lt=e):lt=t):lt=At?hn(e.stateNode.nextSibling):null;return!0}function nr(){lt=At=null,Be=!1}function Us(){var e=dl;return e!==null&&(Xt===null?Xt=e:Xt.push.apply(Xt,e),dl=null),e}function $a(e){dl===null?dl=[e]:dl.push(e)}var Bs=M(null),lr=null,Xn=null;function ml(e,t,l){ne(Bs,t._currentValue),t._currentValue=l}function In(e){e._currentValue=Bs.current,B(Bs)}function Gs(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Ys(e,t,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var f=s.dependencies;if(f!==null){var g=s.child;f=f.firstContext;e:for(;f!==null;){var w=f;f=s;for(var R=0;R<t.length;R++)if(w.context===t[R]){f.lanes|=l,w=f.alternate,w!==null&&(w.lanes|=l),Gs(f.return,l,e),a||(g=null);break e}f=w.next}}else if(s.tag===18){if(g=s.return,g===null)throw Error(i(341));g.lanes|=l,f=g.alternate,f!==null&&(f.lanes|=l),Gs(g,l,e),g=null}else g=s.child;if(g!==null)g.return=s;else for(g=s;g!==null;){if(g===e){g=null;break}if(s=g.sibling,s!==null){s.return=g.return,g=s;break}g=g.return}s=g}}function Pr(e,t,l,a){e=null;for(var s=t,f=!1;s!==null;){if(!f){if((s.flags&524288)!==0)f=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var g=s.alternate;if(g===null)throw Error(i(387));if(g=g.memoizedProps,g!==null){var w=s.type;$t(s.pendingProps.value,g.value)||(e!==null?e.push(w):e=[w])}}else if(s===ie.current){if(g=s.alternate,g===null)throw Error(i(387));g.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(So):e=[So])}s=s.return}e!==null&&Ys(t,e,l,a),t.flags|=262144}function ai(e){for(e=e.firstContext;e!==null;){if(!$t(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function rr(e){lr=e,Xn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Mt(e){return fm(lr,e)}function oi(e,t){return lr===null&&rr(e),fm(e,t)}function fm(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Xn===null){if(e===null)throw Error(i(308));Xn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xn=Xn.next=t;return l}var KS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},QS=n.unstable_scheduleCallback,ZS=n.unstable_NormalPriority,dt={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Vs(){return{controller:new KS,data:new Map,refCount:0}}function Ka(e){e.refCount--,e.refCount===0&&QS(ZS,function(){e.controller.abort()})}var Qa=null,qs=0,$r=0,Kr=null;function FS(e,t){if(Qa===null){var l=Qa=[];qs=0,$r=Pu(),Kr={status:"pending",value:void 0,then:function(a){l.push(a)}}}return qs++,t.then(dm,dm),t}function dm(){if(--qs===0&&Qa!==null){Kr!==null&&(Kr.status="fulfilled");var e=Qa;Qa=null,$r=0,Kr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function JS(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<l.length;s++)(0,l[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var hm=O.S;O.S=function(e,t){Zp=Et(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&FS(e,t),hm!==null&&hm(e,t)};var ar=M(null);function Xs(){var e=ar.current;return e!==null?e:et.pooledCache}function ii(e,t){t===null?ne(ar,ar.current):ne(ar,t.pool)}function mm(){var e=Xs();return e===null?null:{parent:dt._currentValue,pool:e}}var Qr=Error(i(460)),Is=Error(i(474)),ci=Error(i(542)),si={then:function(){}};function pm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function gm(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Gn,Gn),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vm(e),e;default:if(typeof t.status=="string")t.then(Gn,Gn);else{if(e=et,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,vm(e),e}throw ir=t,Qr}}function or(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ir=l,Qr):l}}var ir=null;function ym(){if(ir===null)throw Error(i(459));var e=ir;return ir=null,e}function vm(e){if(e===Qr||e===ci)throw Error(i(483))}var Zr=null,Za=0;function ui(e){var t=Za;return Za+=1,Zr===null&&(Zr=[]),gm(Zr,e,t)}function Fa(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function fi(e,t){throw t.$$typeof===S?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function bm(e){function t(U,L){if(e){var Y=U.deletions;Y===null?(U.deletions=[L],U.flags|=16):Y.push(L)}}function l(U,L){if(!e)return null;for(;L!==null;)t(U,L),L=L.sibling;return null}function a(U){for(var L=new Map;U!==null;)U.key!==null?L.set(U.key,U):L.set(U.index,U),U=U.sibling;return L}function s(U,L){return U=Vn(U,L),U.index=0,U.sibling=null,U}function f(U,L,Y){return U.index=Y,e?(Y=U.alternate,Y!==null?(Y=Y.index,Y<L?(U.flags|=67108866,L):Y):(U.flags|=67108866,L)):(U.flags|=1048576,L)}function g(U){return e&&U.alternate===null&&(U.flags|=67108866),U}function w(U,L,Y,W){return L===null||L.tag!==6?(L=Ds(Y,U.mode,W),L.return=U,L):(L=s(L,Y),L.return=U,L)}function R(U,L,Y,W){var ve=Y.type;return ve===E?F(U,L,Y.props.children,W,Y.key):L!==null&&(L.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===j&&or(ve)===L.type)?(L=s(L,Y.props),Fa(L,Y),L.return=U,L):(L=li(Y.type,Y.key,Y.props,null,U.mode,W),Fa(L,Y),L.return=U,L)}function V(U,L,Y,W){return L===null||L.tag!==4||L.stateNode.containerInfo!==Y.containerInfo||L.stateNode.implementation!==Y.implementation?(L=js(Y,U.mode,W),L.return=U,L):(L=s(L,Y.children||[]),L.return=U,L)}function F(U,L,Y,W,ve){return L===null||L.tag!==7?(L=tr(Y,U.mode,W,ve),L.return=U,L):(L=s(L,Y),L.return=U,L)}function ee(U,L,Y){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=Ds(""+L,U.mode,Y),L.return=U,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case C:return Y=li(L.type,L.key,L.props,null,U.mode,Y),Fa(Y,L),Y.return=U,Y;case T:return L=js(L,U.mode,Y),L.return=U,L;case j:return L=or(L),ee(U,L,Y)}if(ae(L)||le(L))return L=tr(L,U.mode,Y,null),L.return=U,L;if(typeof L.then=="function")return ee(U,ui(L),Y);if(L.$$typeof===k)return ee(U,oi(U,L),Y);fi(U,L)}return null}function P(U,L,Y,W){var ve=L!==null?L.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return ve!==null?null:w(U,L,""+Y,W);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case C:return Y.key===ve?R(U,L,Y,W):null;case T:return Y.key===ve?V(U,L,Y,W):null;case j:return Y=or(Y),P(U,L,Y,W)}if(ae(Y)||le(Y))return ve!==null?null:F(U,L,Y,W,null);if(typeof Y.then=="function")return P(U,L,ui(Y),W);if(Y.$$typeof===k)return P(U,L,oi(U,Y),W);fi(U,Y)}return null}function Q(U,L,Y,W,ve){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return U=U.get(Y)||null,w(L,U,""+W,ve);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case C:return U=U.get(W.key===null?Y:W.key)||null,R(L,U,W,ve);case T:return U=U.get(W.key===null?Y:W.key)||null,V(L,U,W,ve);case j:return W=or(W),Q(U,L,Y,W,ve)}if(ae(W)||le(W))return U=U.get(Y)||null,F(L,U,W,ve,null);if(typeof W.then=="function")return Q(U,L,Y,ui(W),ve);if(W.$$typeof===k)return Q(U,L,Y,oi(L,W),ve);fi(L,W)}return null}function de(U,L,Y,W){for(var ve=null,Ye=null,ge=L,Re=L=0,ke=null;ge!==null&&Re<Y.length;Re++){ge.index>Re?(ke=ge,ge=null):ke=ge.sibling;var Ve=P(U,ge,Y[Re],W);if(Ve===null){ge===null&&(ge=ke);break}e&&ge&&Ve.alternate===null&&t(U,ge),L=f(Ve,L,Re),Ye===null?ve=Ve:Ye.sibling=Ve,Ye=Ve,ge=ke}if(Re===Y.length)return l(U,ge),Be&&qn(U,Re),ve;if(ge===null){for(;Re<Y.length;Re++)ge=ee(U,Y[Re],W),ge!==null&&(L=f(ge,L,Re),Ye===null?ve=ge:Ye.sibling=ge,Ye=ge);return Be&&qn(U,Re),ve}for(ge=a(ge);Re<Y.length;Re++)ke=Q(ge,U,Re,Y[Re],W),ke!==null&&(e&&ke.alternate!==null&&ge.delete(ke.key===null?Re:ke.key),L=f(ke,L,Re),Ye===null?ve=ke:Ye.sibling=ke,Ye=ke);return e&&ge.forEach(function(zl){return t(U,zl)}),Be&&qn(U,Re),ve}function Se(U,L,Y,W){if(Y==null)throw Error(i(151));for(var ve=null,Ye=null,ge=L,Re=L=0,ke=null,Ve=Y.next();ge!==null&&!Ve.done;Re++,Ve=Y.next()){ge.index>Re?(ke=ge,ge=null):ke=ge.sibling;var zl=P(U,ge,Ve.value,W);if(zl===null){ge===null&&(ge=ke);break}e&&ge&&zl.alternate===null&&t(U,ge),L=f(zl,L,Re),Ye===null?ve=zl:Ye.sibling=zl,Ye=zl,ge=ke}if(Ve.done)return l(U,ge),Be&&qn(U,Re),ve;if(ge===null){for(;!Ve.done;Re++,Ve=Y.next())Ve=ee(U,Ve.value,W),Ve!==null&&(L=f(Ve,L,Re),Ye===null?ve=Ve:Ye.sibling=Ve,Ye=Ve);return Be&&qn(U,Re),ve}for(ge=a(ge);!Ve.done;Re++,Ve=Y.next())Ve=Q(ge,U,Re,Ve.value,W),Ve!==null&&(e&&Ve.alternate!==null&&ge.delete(Ve.key===null?Re:Ve.key),L=f(Ve,L,Re),Ye===null?ve=Ve:Ye.sibling=Ve,Ye=Ve);return e&&ge.forEach(function(sw){return t(U,sw)}),Be&&qn(U,Re),ve}function Je(U,L,Y,W){if(typeof Y=="object"&&Y!==null&&Y.type===E&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case C:e:{for(var ve=Y.key;L!==null;){if(L.key===ve){if(ve=Y.type,ve===E){if(L.tag===7){l(U,L.sibling),W=s(L,Y.props.children),W.return=U,U=W;break e}}else if(L.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===j&&or(ve)===L.type){l(U,L.sibling),W=s(L,Y.props),Fa(W,Y),W.return=U,U=W;break e}l(U,L);break}else t(U,L);L=L.sibling}Y.type===E?(W=tr(Y.props.children,U.mode,W,Y.key),W.return=U,U=W):(W=li(Y.type,Y.key,Y.props,null,U.mode,W),Fa(W,Y),W.return=U,U=W)}return g(U);case T:e:{for(ve=Y.key;L!==null;){if(L.key===ve)if(L.tag===4&&L.stateNode.containerInfo===Y.containerInfo&&L.stateNode.implementation===Y.implementation){l(U,L.sibling),W=s(L,Y.children||[]),W.return=U,U=W;break e}else{l(U,L);break}else t(U,L);L=L.sibling}W=js(Y,U.mode,W),W.return=U,U=W}return g(U);case j:return Y=or(Y),Je(U,L,Y,W)}if(ae(Y))return de(U,L,Y,W);if(le(Y)){if(ve=le(Y),typeof ve!="function")throw Error(i(150));return Y=ve.call(Y),Se(U,L,Y,W)}if(typeof Y.then=="function")return Je(U,L,ui(Y),W);if(Y.$$typeof===k)return Je(U,L,oi(U,Y),W);fi(U,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,L!==null&&L.tag===6?(l(U,L.sibling),W=s(L,Y),W.return=U,U=W):(l(U,L),W=Ds(Y,U.mode,W),W.return=U,U=W),g(U)):l(U,L)}return function(U,L,Y,W){try{Za=0;var ve=Je(U,L,Y,W);return Zr=null,ve}catch(ge){if(ge===Qr||ge===ci)throw ge;var Ye=Kt(29,ge,null,U.mode);return Ye.lanes=W,Ye.return=U,Ye}finally{}}}var cr=bm(!0),xm=bm(!1),pl=!1;function Ps(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $s(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 gl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Xe&2)!==0){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=ni(e),lm(e,null,l),t}return ti(e,a,t,l),ni(e)}function Ja(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,fh(e,l)}}function Ks(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,f=null;if(l=l.firstBaseUpdate,l!==null){do{var g={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};f===null?s=f=g:f=f.next=g,l=l.next}while(l!==null);f===null?s=f=t:f=f.next=t}else s=f=t;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:f,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Qs=!1;function Wa(){if(Qs){var e=Kr;if(e!==null)throw e}}function eo(e,t,l,a){Qs=!1;var s=e.updateQueue;pl=!1;var f=s.firstBaseUpdate,g=s.lastBaseUpdate,w=s.shared.pending;if(w!==null){s.shared.pending=null;var R=w,V=R.next;R.next=null,g===null?f=V:g.next=V,g=R;var F=e.alternate;F!==null&&(F=F.updateQueue,w=F.lastBaseUpdate,w!==g&&(w===null?F.firstBaseUpdate=V:w.next=V,F.lastBaseUpdate=R))}if(f!==null){var ee=s.baseState;g=0,F=V=R=null,w=f;do{var P=w.lane&-536870913,Q=P!==w.lane;if(Q?(Le&P)===P:(a&P)===P){P!==0&&P===$r&&(Qs=!0),F!==null&&(F=F.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var de=e,Se=w;P=t;var Je=l;switch(Se.tag){case 1:if(de=Se.payload,typeof de=="function"){ee=de.call(Je,ee,P);break e}ee=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=Se.payload,P=typeof de=="function"?de.call(Je,ee,P):de,P==null)break e;ee=b({},ee,P);break e;case 2:pl=!0}}P=w.callback,P!==null&&(e.flags|=64,Q&&(e.flags|=8192),Q=s.callbacks,Q===null?s.callbacks=[P]:Q.push(P))}else Q={lane:P,tag:w.tag,payload:w.payload,callback:w.callback,next:null},F===null?(V=F=Q,R=ee):F=F.next=Q,g|=P;if(w=w.next,w===null){if(w=s.shared.pending,w===null)break;Q=w,w=Q.next,Q.next=null,s.lastBaseUpdate=Q,s.shared.pending=null}}while(!0);F===null&&(R=ee),s.baseState=R,s.firstBaseUpdate=V,s.lastBaseUpdate=F,f===null&&(s.shared.lanes=0),wl|=g,e.lanes=g,e.memoizedState=ee}}function Sm(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function wm(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Sm(l[e],t)}var Fr=M(null),di=M(0);function Em(e,t){e=el,ne(di,e),ne(Fr,t),el=e|t.baseLanes}function Zs(){ne(di,el),ne(Fr,Fr.current)}function Fs(){el=di.current,B(Fr),B(di)}var Qt=M(null),dn=null;function vl(e){var t=e.alternate;ne(ut,ut.current&1),ne(Qt,e),dn===null&&(t===null||Fr.current!==null||t.memoizedState!==null)&&(dn=e)}function Js(e){ne(ut,ut.current),ne(Qt,e),dn===null&&(dn=e)}function Cm(e){e.tag===22?(ne(ut,ut.current),ne(Qt,e),dn===null&&(dn=e)):bl()}function bl(){ne(ut,ut.current),ne(Qt,Qt.current)}function Zt(e){B(Qt),dn===e&&(dn=null),B(ut)}var ut=M(0);function hi(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||rf(l)||af(l)))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 Pn=0,_e=null,Ze=null,ht=null,mi=!1,Jr=!1,sr=!1,pi=0,to=0,Wr=null,WS=0;function ct(){throw Error(i(321))}function Ws(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!$t(e[l],t[l]))return!1;return!0}function eu(e,t,l,a,s,f){return Pn=f,_e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,O.H=e===null||e.memoizedState===null?ip:pu,sr=!1,f=l(a,s),sr=!1,Jr&&(f=Am(t,l,a,s)),Tm(e),f}function Tm(e){O.H=ro;var t=Ze!==null&&Ze.next!==null;if(Pn=0,ht=Ze=_e=null,mi=!1,to=0,Wr=null,t)throw Error(i(300));e===null||mt||(e=e.dependencies,e!==null&&ai(e)&&(mt=!0))}function Am(e,t,l,a){_e=e;var s=0;do{if(Jr&&(Wr=null),to=0,Jr=!1,25<=s)throw Error(i(301));if(s+=1,ht=Ze=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}O.H=cp,f=t(l,a)}while(Jr);return f}function e1(){var e=O.H,t=e.useState()[0];return t=typeof t.then=="function"?no(t):t,e=e.useState()[0],(Ze!==null?Ze.memoizedState:null)!==e&&(_e.flags|=1024),t}function tu(){var e=pi!==0;return pi=0,e}function nu(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function lu(e){if(mi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mi=!1}Pn=0,ht=Ze=_e=null,Jr=!1,to=pi=0,Wr=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?_e.memoizedState=ht=e:ht=ht.next=e,ht}function ft(){if(Ze===null){var e=_e.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var t=ht===null?_e.memoizedState:ht.next;if(t!==null)ht=t,Ze=e;else{if(e===null)throw _e.alternate===null?Error(i(467)):Error(i(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},ht===null?_e.memoizedState=ht=e:ht=ht.next=e}return ht}function gi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function no(e){var t=to;return to+=1,Wr===null&&(Wr=[]),e=gm(Wr,e,t),t=_e,(ht===null?t.memoizedState:ht.next)===null&&(t=t.alternate,O.H=t===null||t.memoizedState===null?ip:pu),e}function yi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return no(e);if(e.$$typeof===k)return Mt(e)}throw Error(i(438,String(e)))}function ru(e){var t=null,l=_e.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=_e.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=gi(),_e.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=I;return t.index++,l}function $n(e,t){return typeof t=="function"?t(e):t}function vi(e){var t=ft();return au(t,Ze,e)}function au(e,t,l){var a=e.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=l;var s=e.baseQueue,f=a.pending;if(f!==null){if(s!==null){var g=s.next;s.next=f.next,f.next=g}t.baseQueue=s=f,a.pending=null}if(f=e.baseState,s===null)e.memoizedState=f;else{t=s.next;var w=g=null,R=null,V=t,F=!1;do{var ee=V.lane&-536870913;if(ee!==V.lane?(Le&ee)===ee:(Pn&ee)===ee){var P=V.revertLane;if(P===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),ee===$r&&(F=!0);else if((Pn&P)===P){V=V.next,P===$r&&(F=!0);continue}else ee={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},R===null?(w=R=ee,g=f):R=R.next=ee,_e.lanes|=P,wl|=P;ee=V.action,sr&&l(f,ee),f=V.hasEagerState?V.eagerState:l(f,ee)}else P={lane:ee,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},R===null?(w=R=P,g=f):R=R.next=P,_e.lanes|=ee,wl|=ee;V=V.next}while(V!==null&&V!==t);if(R===null?g=f:R.next=w,!$t(f,e.memoizedState)&&(mt=!0,F&&(l=Kr,l!==null)))throw l;e.memoizedState=f,e.baseState=g,e.baseQueue=R,a.lastRenderedState=f}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function ou(e){var t=ft(),l=t.queue;if(l===null)throw Error(i(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,f=t.memoizedState;if(s!==null){l.pending=null;var g=s=s.next;do f=e(f,g.action),g=g.next;while(g!==s);$t(f,t.memoizedState)||(mt=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),l.lastRenderedState=f}return[f,a]}function Mm(e,t,l){var a=_e,s=ft(),f=Be;if(f){if(l===void 0)throw Error(i(407));l=l()}else l=t();var g=!$t((Ze||s).memoizedState,l);if(g&&(s.memoizedState=l,mt=!0),s=s.queue,su(Nm.bind(null,a,s,e),[e]),s.getSnapshot!==t||g||ht!==null&&ht.memoizedState.tag&1){if(a.flags|=2048,ea(9,{destroy:void 0},Rm.bind(null,a,s,l,t),null),et===null)throw Error(i(349));f||(Pn&127)!==0||_m(a,t,l)}return l}function _m(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=_e.updateQueue,t===null?(t=gi(),_e.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Rm(e,t,l,a){t.value=l,t.getSnapshot=a,Om(t)&&zm(e)}function Nm(e,t,l){return l(function(){Om(t)&&zm(e)})}function Om(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!$t(e,l)}catch{return!0}}function zm(e){var t=er(e,2);t!==null&&It(t,e,2)}function iu(e){var t=Lt();if(typeof e=="function"){var l=e;if(e=l(),sr){Ct(!0);try{l()}finally{Ct(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:e},t}function Dm(e,t,l,a){return e.baseState=l,au(e,Ze,typeof a=="function"?a:$n)}function t1(e,t,l,a,s){if(Si(e))throw Error(i(485));if(e=t.action,e!==null){var f={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){f.listeners.push(g)}};O.T!==null?l(!0):f.isTransition=!1,a(f),l=t.pending,l===null?(f.next=t.pending=f,jm(t,f)):(f.next=l.next,t.pending=l.next=f)}}function jm(e,t){var l=t.action,a=t.payload,s=e.state;if(t.isTransition){var f=O.T,g={};O.T=g;try{var w=l(s,a),R=O.S;R!==null&&R(g,w),Lm(e,t,w)}catch(V){cu(e,t,V)}finally{f!==null&&g.types!==null&&(f.types=g.types),O.T=f}}else try{f=l(s,a),Lm(e,t,f)}catch(V){cu(e,t,V)}}function Lm(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){km(e,t,a)},function(a){return cu(e,t,a)}):km(e,t,l)}function km(e,t,l){t.status="fulfilled",t.value=l,Hm(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,jm(e,l)))}function cu(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Hm(t),t=t.next;while(t!==a)}e.action=null}function Hm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Um(e,t){return t}function Bm(e,t){if(Be){var l=et.formState;if(l!==null){e:{var a=_e;if(Be){if(lt){t:{for(var s=lt,f=fn;s.nodeType!==8;){if(!f){s=null;break t}if(s=hn(s.nextSibling),s===null){s=null;break t}}f=s.data,s=f==="F!"||f==="F"?s:null}if(s){lt=hn(s.nextSibling),a=s.data==="F!";break e}}hl(a)}a=!1}a&&(t=l[0])}}return l=Lt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Um,lastRenderedState:t},l.queue=a,l=rp.bind(null,_e,a),a.dispatch=l,a=iu(!1),f=mu.bind(null,_e,!1,a.queue),a=Lt(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,l=t1.bind(null,_e,s,f,l),s.dispatch=l,a.memoizedState=e,[t,l,!1]}function Gm(e){var t=ft();return Ym(t,Ze,e)}function Ym(e,t,l){if(t=au(e,t,Um)[0],e=vi($n)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=no(t)}catch(g){throw g===Qr?ci:g}else a=t;t=ft();var s=t.queue,f=s.dispatch;return l!==t.memoizedState&&(_e.flags|=2048,ea(9,{destroy:void 0},n1.bind(null,s,l),null)),[a,f,e]}function n1(e,t){e.action=t}function Vm(e){var t=ft(),l=Ze;if(l!==null)return Ym(t,l,e);ft(),t=t.memoizedState,l=ft();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function ea(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=_e.updateQueue,t===null&&(t=gi(),_e.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function qm(){return ft().memoizedState}function bi(e,t,l,a){var s=Lt();_e.flags|=e,s.memoizedState=ea(1|t,{destroy:void 0},l,a===void 0?null:a)}function xi(e,t,l,a){var s=ft();a=a===void 0?null:a;var f=s.memoizedState.inst;Ze!==null&&a!==null&&Ws(a,Ze.memoizedState.deps)?s.memoizedState=ea(t,f,l,a):(_e.flags|=e,s.memoizedState=ea(1|t,f,l,a))}function Xm(e,t){bi(8390656,8,e,t)}function su(e,t){xi(2048,8,e,t)}function l1(e){_e.flags|=4;var t=_e.updateQueue;if(t===null)t=gi(),_e.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Im(e){var t=ft().memoizedState;return l1({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Pm(e,t){return xi(4,2,e,t)}function $m(e,t){return xi(4,4,e,t)}function Km(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Qm(e,t,l){l=l!=null?l.concat([e]):null,xi(4,4,Km.bind(null,t,e),l)}function uu(){}function Zm(e,t){var l=ft();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&Ws(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Fm(e,t){var l=ft();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&Ws(t,a[1]))return a[0];if(a=e(),sr){Ct(!0);try{e()}finally{Ct(!1)}}return l.memoizedState=[a,t],a}function fu(e,t,l){return l===void 0||(Pn&1073741824)!==0&&(Le&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Jp(),_e.lanes|=e,wl|=e,l)}function Jm(e,t,l,a){return $t(l,t)?l:Fr.current!==null?(e=fu(e,l,a),$t(e,t)||(mt=!0),e):(Pn&42)===0||(Pn&1073741824)!==0&&(Le&261930)===0?(mt=!0,e.memoizedState=l):(e=Jp(),_e.lanes|=e,wl|=e,t)}function Wm(e,t,l,a,s){var f=X.p;X.p=f!==0&&8>f?f:8;var g=O.T,w={};O.T=w,mu(e,!1,t,l);try{var R=s(),V=O.S;if(V!==null&&V(w,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var F=JS(R,a);lo(e,t,F,Wt(e))}else lo(e,t,a,Wt(e))}catch(ee){lo(e,t,{then:function(){},status:"rejected",reason:ee},Wt())}finally{X.p=f,g!==null&&w.types!==null&&(g.types=w.types),O.T=g}}function r1(){}function du(e,t,l,a){if(e.tag!==5)throw Error(i(476));var s=ep(e).queue;Wm(e,s,t,G,l===null?r1:function(){return tp(e),l(a)})}function ep(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:G},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function tp(e){var t=ep(e);t.next===null&&(t=e.alternate.memoizedState),lo(e,t.next.queue,{},Wt())}function hu(){return Mt(So)}function np(){return ft().memoizedState}function lp(){return ft().memoizedState}function a1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Wt();e=gl(l);var a=yl(t,e,l);a!==null&&(It(a,t,l),Ja(a,t,l)),t={cache:Vs()},e.payload=t;return}t=t.return}}function o1(e,t,l){var a=Wt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Si(e)?ap(t,l):(l=Os(e,t,l,a),l!==null&&(It(l,e,a),op(l,t,a)))}function rp(e,t,l){var a=Wt();lo(e,t,l,a)}function lo(e,t,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Si(e))ap(t,s);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var g=t.lastRenderedState,w=f(g,l);if(s.hasEagerState=!0,s.eagerState=w,$t(w,g))return ti(e,t,s,0),et===null&&ei(),!1}catch{}finally{}if(l=Os(e,t,s,a),l!==null)return It(l,e,a),op(l,t,a),!0}return!1}function mu(e,t,l,a){if(a={lane:2,revertLane:Pu(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Si(e)){if(t)throw Error(i(479))}else t=Os(e,l,a,2),t!==null&&It(t,e,2)}function Si(e){var t=e.alternate;return e===_e||t!==null&&t===_e}function ap(e,t){Jr=mi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function op(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,fh(e,l)}}var ro={readContext:Mt,use:yi,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useInsertionEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useSyncExternalStore:ct,useId:ct,useHostTransitionStatus:ct,useFormState:ct,useActionState:ct,useOptimistic:ct,useMemoCache:ct,useCacheRefresh:ct};ro.useEffectEvent=ct;var ip={readContext:Mt,use:yi,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:Mt,useEffect:Xm,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,bi(4194308,4,Km.bind(null,t,e),l)},useLayoutEffect:function(e,t){return bi(4194308,4,e,t)},useInsertionEffect:function(e,t){bi(4,2,e,t)},useMemo:function(e,t){var l=Lt();t=t===void 0?null:t;var a=e();if(sr){Ct(!0);try{e()}finally{Ct(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Lt();if(l!==void 0){var s=l(t);if(sr){Ct(!0);try{l(t)}finally{Ct(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=o1.bind(null,_e,e),[a.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:function(e){e=iu(e);var t=e.queue,l=rp.bind(null,_e,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:uu,useDeferredValue:function(e,t){var l=Lt();return fu(l,e,t)},useTransition:function(){var e=iu(!1);return e=Wm.bind(null,_e,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=_e,s=Lt();if(Be){if(l===void 0)throw Error(i(407));l=l()}else{if(l=t(),et===null)throw Error(i(349));(Le&127)!==0||_m(a,t,l)}s.memoizedState=l;var f={value:l,getSnapshot:t};return s.queue=f,Xm(Nm.bind(null,a,f,e),[e]),a.flags|=2048,ea(9,{destroy:void 0},Rm.bind(null,a,f,l,t),null),l},useId:function(){var e=Lt(),t=et.identifierPrefix;if(Be){var l=_n,a=Mn;l=(a&~(1<<32-it(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=pi++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=WS++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:hu,useFormState:Bm,useActionState:Bm,useOptimistic:function(e){var t=Lt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=mu.bind(null,_e,!0,l),l.dispatch=t,[e,t]},useMemoCache:ru,useCacheRefresh:function(){return Lt().memoizedState=a1.bind(null,_e)},useEffectEvent:function(e){var t=Lt(),l={impl:e};return t.memoizedState=l,function(){if((Xe&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}},pu={readContext:Mt,use:yi,useCallback:Zm,useContext:Mt,useEffect:su,useImperativeHandle:Qm,useInsertionEffect:Pm,useLayoutEffect:$m,useMemo:Fm,useReducer:vi,useRef:qm,useState:function(){return vi($n)},useDebugValue:uu,useDeferredValue:function(e,t){var l=ft();return Jm(l,Ze.memoizedState,e,t)},useTransition:function(){var e=vi($n)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:no(e),t]},useSyncExternalStore:Mm,useId:np,useHostTransitionStatus:hu,useFormState:Gm,useActionState:Gm,useOptimistic:function(e,t){var l=ft();return Dm(l,Ze,e,t)},useMemoCache:ru,useCacheRefresh:lp};pu.useEffectEvent=Im;var cp={readContext:Mt,use:yi,useCallback:Zm,useContext:Mt,useEffect:su,useImperativeHandle:Qm,useInsertionEffect:Pm,useLayoutEffect:$m,useMemo:Fm,useReducer:ou,useRef:qm,useState:function(){return ou($n)},useDebugValue:uu,useDeferredValue:function(e,t){var l=ft();return Ze===null?fu(l,e,t):Jm(l,Ze.memoizedState,e,t)},useTransition:function(){var e=ou($n)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:no(e),t]},useSyncExternalStore:Mm,useId:np,useHostTransitionStatus:hu,useFormState:Vm,useActionState:Vm,useOptimistic:function(e,t){var l=ft();return Ze!==null?Dm(l,Ze,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:ru,useCacheRefresh:lp};cp.useEffectEvent=Im;function gu(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:b({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var yu={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=Wt(),s=gl(a);s.payload=t,l!=null&&(s.callback=l),t=yl(e,s,a),t!==null&&(It(t,e,a),Ja(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=Wt(),s=gl(a);s.tag=1,s.payload=t,l!=null&&(s.callback=l),t=yl(e,s,a),t!==null&&(It(t,e,a),Ja(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Wt(),a=gl(l);a.tag=2,t!=null&&(a.callback=t),t=yl(e,a,l),t!==null&&(It(t,e,l),Ja(t,e,l))}};function sp(e,t,l,a,s,f,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,f,g):t.prototype&&t.prototype.isPureReactComponent?!Xa(l,a)||!Xa(s,f):!0}function up(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&yu.enqueueReplaceState(t,t.state,null)}function ur(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=b({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function fp(e){Wo(e)}function dp(e){console.error(e)}function hp(e){Wo(e)}function wi(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function mp(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function vu(e,t,l){return l=gl(l),l.tag=3,l.payload={element:null},l.callback=function(){wi(e,t)},l}function pp(e){return e=gl(e),e.tag=3,e}function gp(e,t,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var f=a.value;e.payload=function(){return s(f)},e.callback=function(){mp(t,l,a)}}var g=l.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){mp(t,l,a),typeof s!="function"&&(El===null?El=new Set([this]):El.add(this));var w=a.stack;this.componentDidCatch(a.value,{componentStack:w!==null?w:""})})}function i1(e,t,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Pr(t,l,s,!0),l=Qt.current,l!==null){switch(l.tag){case 31:case 13:return dn===null?ji():l.alternate===null&&st===0&&(st=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===si?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),qu(e,a,s)),!1;case 22:return l.flags|=65536,a===si?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),qu(e,a,s)),!1}throw Error(i(435,l.tag))}return qu(e,a,s),ji(),!1}if(Be)return t=Qt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==Hs&&(e=Error(i(422),{cause:a}),$a(cn(e,l)))):(a!==Hs&&(t=Error(i(423),{cause:a}),$a(cn(t,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=cn(a,l),s=vu(e.stateNode,a,s),Ks(e,s),st!==4&&(st=2)),!1;var f=Error(i(520),{cause:a});if(f=cn(f,l),ho===null?ho=[f]:ho.push(f),st!==4&&(st=2),t===null)return!0;a=cn(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=vu(l.stateNode,a,e),Ks(l,e),!1;case 1:if(t=l.type,f=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(El===null||!El.has(f))))return l.flags|=65536,s&=-s,l.lanes|=s,s=pp(s),gp(s,e,l,a),Ks(l,s),!1}l=l.return}while(l!==null);return!1}var bu=Error(i(461)),mt=!1;function _t(e,t,l,a){t.child=e===null?xm(t,null,l,a):cr(t,e.child,l,a)}function yp(e,t,l,a,s){l=l.render;var f=t.ref;if("ref"in a){var g={};for(var w in a)w!=="ref"&&(g[w]=a[w])}else g=a;return rr(t),a=eu(e,t,l,g,f,s),w=tu(),e!==null&&!mt?(nu(e,t,s),Kn(e,t,s)):(Be&&w&&Ls(t),t.flags|=1,_t(e,t,a,s),t.child)}function vp(e,t,l,a,s){if(e===null){var f=l.type;return typeof f=="function"&&!zs(f)&&f.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=f,bp(e,t,f,a,s)):(e=li(l.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Mu(e,s)){var g=f.memoizedProps;if(l=l.compare,l=l!==null?l:Xa,l(g,a)&&e.ref===t.ref)return Kn(e,t,s)}return t.flags|=1,e=Vn(f,a),e.ref=t.ref,e.return=t,t.child=e}function bp(e,t,l,a,s){if(e!==null){var f=e.memoizedProps;if(Xa(f,a)&&e.ref===t.ref)if(mt=!1,t.pendingProps=a=f,Mu(e,s))(e.flags&131072)!==0&&(mt=!0);else return t.lanes=e.lanes,Kn(e,t,s)}return xu(e,t,l,a,s)}function xp(e,t,l,a){var s=a.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|l:l,e!==null){for(a=t.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~f}else a=0,t.child=null;return Sp(e,t,f,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ii(t,f!==null?f.cachePool:null),f!==null?Em(t,f):Zs(),Cm(t);else return a=t.lanes=536870912,Sp(e,t,f!==null?f.baseLanes|l:l,l,a)}else f!==null?(ii(t,f.cachePool),Em(t,f),bl(),t.memoizedState=null):(e!==null&&ii(t,null),Zs(),bl());return _t(e,t,s,l),t.child}function ao(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Sp(e,t,l,a,s){var f=Xs();return f=f===null?null:{parent:dt._currentValue,pool:f},t.memoizedState={baseLanes:l,cachePool:f},e!==null&&ii(t,null),Zs(),Cm(t),e!==null&&Pr(e,t,a,!0),t.childLanes=s,null}function Ei(e,t){return t=Ti({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function wp(e,t,l){return cr(t,e.child,null,l),e=Ei(t,t.pendingProps),e.flags|=2,Zt(t),t.memoizedState=null,e}function c1(e,t,l){var a=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Be){if(a.mode==="hidden")return e=Ei(t,a),t.lanes=536870912,ao(null,e);if(Js(t),(e=lt)?(e=jg(e,fn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fl!==null?{id:Mn,overflow:_n}:null,retryLane:536870912,hydrationErrors:null},l=am(e),l.return=t,t.child=l,At=t,lt=null)):e=null,e===null)throw hl(t);return t.lanes=536870912,null}return Ei(t,a)}var f=e.memoizedState;if(f!==null){var g=f.dehydrated;if(Js(t),s)if(t.flags&256)t.flags&=-257,t=wp(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(mt||Pr(e,t,l,!1),s=(l&e.childLanes)!==0,mt||s){if(a=et,a!==null&&(g=dh(a,l),g!==0&&g!==f.retryLane))throw f.retryLane=g,er(e,g),It(a,e,g),bu;ji(),t=wp(e,t,l)}else e=f.treeContext,lt=hn(g.nextSibling),At=t,Be=!0,dl=null,fn=!1,e!==null&&cm(t,e),t=Ei(t,a),t.flags|=4096;return t}return e=Vn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ci(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(i(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function xu(e,t,l,a,s){return rr(t),l=eu(e,t,l,a,void 0,s),a=tu(),e!==null&&!mt?(nu(e,t,s),Kn(e,t,s)):(Be&&a&&Ls(t),t.flags|=1,_t(e,t,l,s),t.child)}function Ep(e,t,l,a,s,f){return rr(t),t.updateQueue=null,l=Am(t,a,l,s),Tm(e),a=tu(),e!==null&&!mt?(nu(e,t,f),Kn(e,t,f)):(Be&&a&&Ls(t),t.flags|=1,_t(e,t,l,f),t.child)}function Cp(e,t,l,a,s){if(rr(t),t.stateNode===null){var f=Vr,g=l.contextType;typeof g=="object"&&g!==null&&(f=Mt(g)),f=new l(a,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=yu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=a,f.state=t.memoizedState,f.refs={},Ps(t),g=l.contextType,f.context=typeof g=="object"&&g!==null?Mt(g):Vr,f.state=t.memoizedState,g=l.getDerivedStateFromProps,typeof g=="function"&&(gu(t,l,g,a),f.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(g=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),g!==f.state&&yu.enqueueReplaceState(f,f.state,null),eo(t,a,f,s),Wa(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){f=t.stateNode;var w=t.memoizedProps,R=ur(l,w);f.props=R;var V=f.context,F=l.contextType;g=Vr,typeof F=="object"&&F!==null&&(g=Mt(F));var ee=l.getDerivedStateFromProps;F=typeof ee=="function"||typeof f.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,F||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w||V!==g)&&up(t,f,a,g),pl=!1;var P=t.memoizedState;f.state=P,eo(t,a,f,s),Wa(),V=t.memoizedState,w||P!==V||pl?(typeof ee=="function"&&(gu(t,l,ee,a),V=t.memoizedState),(R=pl||sp(t,l,R,a,P,V,g))?(F||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=V),f.props=a,f.state=V,f.context=g,a=R):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{f=t.stateNode,$s(e,t),g=t.memoizedProps,F=ur(l,g),f.props=F,ee=t.pendingProps,P=f.context,V=l.contextType,R=Vr,typeof V=="object"&&V!==null&&(R=Mt(V)),w=l.getDerivedStateFromProps,(V=typeof w=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==ee||P!==R)&&up(t,f,a,R),pl=!1,P=t.memoizedState,f.state=P,eo(t,a,f,s),Wa();var Q=t.memoizedState;g!==ee||P!==Q||pl||e!==null&&e.dependencies!==null&&ai(e.dependencies)?(typeof w=="function"&&(gu(t,l,w,a),Q=t.memoizedState),(F=pl||sp(t,l,F,a,P,Q,R)||e!==null&&e.dependencies!==null&&ai(e.dependencies))?(V||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(a,Q,R),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(a,Q,R)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=Q),f.props=a,f.state=Q,f.context=R,a=F):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&P===e.memoizedState||(t.flags|=1024),a=!1)}return f=a,Ci(e,t),a=(t.flags&128)!==0,f||a?(f=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&a?(t.child=cr(t,e.child,null,s),t.child=cr(t,null,l,s)):_t(e,t,l,s),t.memoizedState=f.state,e=t.child):e=Kn(e,t,s),e}function Tp(e,t,l,a){return nr(),t.flags|=256,_t(e,t,l,a),t.child}var Su={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wu(e){return{baseLanes:e,cachePool:mm()}}function Eu(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=Jt),e}function Ap(e,t,l){var a=t.pendingProps,s=!1,f=(t.flags&128)!==0,g;if((g=f)||(g=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),g&&(s=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Be){if(s?vl(t):bl(),(e=lt)?(e=jg(e,fn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fl!==null?{id:Mn,overflow:_n}:null,retryLane:536870912,hydrationErrors:null},l=am(e),l.return=t,t.child=l,At=t,lt=null)):e=null,e===null)throw hl(t);return af(e)?t.lanes=32:t.lanes=536870912,null}var w=a.children;return a=a.fallback,s?(bl(),s=t.mode,w=Ti({mode:"hidden",children:w},s),a=tr(a,s,l,null),w.return=t,a.return=t,w.sibling=a,t.child=w,a=t.child,a.memoizedState=wu(l),a.childLanes=Eu(e,g,l),t.memoizedState=Su,ao(null,a)):(vl(t),Cu(t,w))}var R=e.memoizedState;if(R!==null&&(w=R.dehydrated,w!==null)){if(f)t.flags&256?(vl(t),t.flags&=-257,t=Tu(e,t,l)):t.memoizedState!==null?(bl(),t.child=e.child,t.flags|=128,t=null):(bl(),w=a.fallback,s=t.mode,a=Ti({mode:"visible",children:a.children},s),w=tr(w,s,l,null),w.flags|=2,a.return=t,w.return=t,a.sibling=w,t.child=a,cr(t,e.child,null,l),a=t.child,a.memoizedState=wu(l),a.childLanes=Eu(e,g,l),t.memoizedState=Su,t=ao(null,a));else if(vl(t),af(w)){if(g=w.nextSibling&&w.nextSibling.dataset,g)var V=g.dgst;g=V,a=Error(i(419)),a.stack="",a.digest=g,$a({value:a,source:null,stack:null}),t=Tu(e,t,l)}else if(mt||Pr(e,t,l,!1),g=(l&e.childLanes)!==0,mt||g){if(g=et,g!==null&&(a=dh(g,l),a!==0&&a!==R.retryLane))throw R.retryLane=a,er(e,a),It(g,e,a),bu;rf(w)||ji(),t=Tu(e,t,l)}else rf(w)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,lt=hn(w.nextSibling),At=t,Be=!0,dl=null,fn=!1,e!==null&&cm(t,e),t=Cu(t,a.children),t.flags|=4096);return t}return s?(bl(),w=a.fallback,s=t.mode,R=e.child,V=R.sibling,a=Vn(R,{mode:"hidden",children:a.children}),a.subtreeFlags=R.subtreeFlags&65011712,V!==null?w=Vn(V,w):(w=tr(w,s,l,null),w.flags|=2),w.return=t,a.return=t,a.sibling=w,t.child=a,ao(null,a),a=t.child,w=e.child.memoizedState,w===null?w=wu(l):(s=w.cachePool,s!==null?(R=dt._currentValue,s=s.parent!==R?{parent:R,pool:R}:s):s=mm(),w={baseLanes:w.baseLanes|l,cachePool:s}),a.memoizedState=w,a.childLanes=Eu(e,g,l),t.memoizedState=Su,ao(e.child,a)):(vl(t),l=e.child,e=l.sibling,l=Vn(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=l,t.memoizedState=null,l)}function Cu(e,t){return t=Ti({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ti(e,t){return e=Kt(22,e,null,t),e.lanes=0,e}function Tu(e,t,l){return cr(t,e.child,null,l),e=Cu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Mp(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Gs(e.return,t,l)}function Au(e,t,l,a,s,f){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:f}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=a,g.tail=l,g.tailMode=s,g.treeForkCount=f)}function _p(e,t,l){var a=t.pendingProps,s=a.revealOrder,f=a.tail;a=a.children;var g=ut.current,w=(g&2)!==0;if(w?(g=g&1|2,t.flags|=128):g&=1,ne(ut,g),_t(e,t,a,l),a=Be?Pa:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mp(e,l,t);else if(e.tag===19)Mp(e,l,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(l=t.child,s=null;l!==null;)e=l.alternate,e!==null&&hi(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=t.child,t.child=null):(s=l.sibling,l.sibling=null),Au(t,!1,s,l,f,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&hi(e)===null){t.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}Au(t,!0,l,null,f,a);break;case"together":Au(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Kn(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),wl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Pr(e,t,l,!1),(l&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,l=Vn(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Vn(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Mu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ai(e)))}function s1(e,t,l){switch(t.tag){case 3:xe(t,t.stateNode.containerInfo),ml(t,dt,e.memoizedState.cache),nr();break;case 27:case 5:Me(t);break;case 4:xe(t,t.stateNode.containerInfo);break;case 10:ml(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Js(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(vl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Ap(e,t,l):(vl(t),e=Kn(e,t,l),e!==null?e.sibling:null);vl(t);break;case 19:var s=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Pr(e,t,l,!1),a=(l&t.childLanes)!==0),s){if(a)return _p(e,t,l);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ne(ut,ut.current),a)break;return null;case 22:return t.lanes=0,xp(e,t,l,t.pendingProps);case 24:ml(t,dt,e.memoizedState.cache)}return Kn(e,t,l)}function Rp(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)mt=!0;else{if(!Mu(e,l)&&(t.flags&128)===0)return mt=!1,s1(e,t,l);mt=(e.flags&131072)!==0}else mt=!1,Be&&(t.flags&1048576)!==0&&im(t,Pa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=or(t.elementType),t.type=e,typeof e=="function")zs(e)?(a=ur(e,a),t.tag=1,t=Cp(null,t,e,a,l)):(t.tag=0,t=xu(null,t,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===q){t.tag=11,t=yp(null,t,e,a,l);break e}else if(s===_){t.tag=14,t=vp(null,t,e,a,l);break e}}throw t=te(e)||e,Error(i(306,t,""))}}return t;case 0:return xu(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,s=ur(a,t.pendingProps),Cp(e,t,a,s,l);case 3:e:{if(xe(t,t.stateNode.containerInfo),e===null)throw Error(i(387));a=t.pendingProps;var f=t.memoizedState;s=f.element,$s(e,t),eo(t,a,null,l);var g=t.memoizedState;if(a=g.cache,ml(t,dt,a),a!==f.cache&&Ys(t,[dt],l,!0),Wa(),a=g.element,f.isDehydrated)if(f={element:a,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Tp(e,t,a,l);break e}else if(a!==s){s=cn(Error(i(424)),t),$a(s),t=Tp(e,t,a,l);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(lt=hn(e.firstChild),At=t,Be=!0,dl=null,fn=!0,l=xm(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(nr(),a===s){t=Kn(e,t,l);break e}_t(e,t,a,l)}t=t.child}return t;case 26:return Ci(e,t),e===null?(l=Gg(t.type,null,t.pendingProps,null))?t.memoizedState=l:Be||(l=t.type,e=t.pendingProps,a=Yi(se.current).createElement(l),a[Tt]=t,a[Bt]=e,Rt(a,l,e),St(a),t.stateNode=a):t.memoizedState=Gg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Me(t),e===null&&Be&&(a=t.stateNode=Hg(t.type,t.pendingProps,se.current),At=t,fn=!0,s=lt,Ml(t.type)?(of=s,lt=hn(a.firstChild)):lt=s),_t(e,t,t.pendingProps.children,l),Ci(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Be&&((s=a=lt)&&(a=B1(a,t.type,t.pendingProps,fn),a!==null?(t.stateNode=a,At=t,lt=hn(a.firstChild),fn=!1,s=!0):s=!1),s||hl(t)),Me(t),s=t.type,f=t.pendingProps,g=e!==null?e.memoizedProps:null,a=f.children,tf(s,f)?a=null:g!==null&&tf(s,g)&&(t.flags|=32),t.memoizedState!==null&&(s=eu(e,t,e1,null,null,l),So._currentValue=s),Ci(e,t),_t(e,t,a,l),t.child;case 6:return e===null&&Be&&((e=l=lt)&&(l=G1(l,t.pendingProps,fn),l!==null?(t.stateNode=l,At=t,lt=null,e=!0):e=!1),e||hl(t)),null;case 13:return Ap(e,t,l);case 4:return xe(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=cr(t,null,a,l):_t(e,t,a,l),t.child;case 11:return yp(e,t,t.type,t.pendingProps,l);case 7:return _t(e,t,t.pendingProps,l),t.child;case 8:return _t(e,t,t.pendingProps.children,l),t.child;case 12:return _t(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,ml(t,t.type,a.value),_t(e,t,a.children,l),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,rr(t),s=Mt(s),a=a(s),t.flags|=1,_t(e,t,a,l),t.child;case 14:return vp(e,t,t.type,t.pendingProps,l);case 15:return bp(e,t,t.type,t.pendingProps,l);case 19:return _p(e,t,l);case 31:return c1(e,t,l);case 22:return xp(e,t,l,t.pendingProps);case 24:return rr(t),a=Mt(dt),e===null?(s=Xs(),s===null&&(s=et,f=Vs(),s.pooledCache=f,f.refCount++,f!==null&&(s.pooledCacheLanes|=l),s=f),t.memoizedState={parent:a,cache:s},Ps(t),ml(t,dt,s)):((e.lanes&l)!==0&&($s(e,t),eo(t,null,null,l),Wa()),s=e.memoizedState,f=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),ml(t,dt,a)):(a=f.cache,ml(t,dt,a),a!==s.cache&&Ys(t,[dt],l,!0))),_t(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Qn(e){e.flags|=4}function _u(e,t,l,a,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(ng())e.flags|=8192;else throw ir=si,Is}else e.flags&=-16777217}function Np(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ig(t))if(ng())e.flags|=8192;else throw ir=si,Is}function Ai(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?_r():536870912,e.lanes|=t,ra|=t)}function oo(e,t){if(!Be)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function u1(e,t,l){var a=t.pendingProps;switch(ks(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return rt(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),In(dt),fe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ir(t)?Qn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Us())),rt(t),null;case 26:var s=t.type,f=t.memoizedState;return e===null?(Qn(t),f!==null?(rt(t),Np(t,f)):(rt(t),_u(t,s,null,a,l))):f?f!==e.memoizedState?(Qn(t),rt(t),Np(t,f)):(rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Qn(t),rt(t),_u(t,s,e,a,l)),null;case 27:if(we(t),l=se.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Qn(t);else{if(!a){if(t.stateNode===null)throw Error(i(166));return rt(t),null}e=oe.current,Ir(t)?sm(t):(e=Hg(s,a,l),t.stateNode=e,Qn(t))}return rt(t),null;case 5:if(we(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Qn(t);else{if(!a){if(t.stateNode===null)throw Error(i(166));return rt(t),null}if(f=oe.current,Ir(t))sm(t);else{var g=Yi(se.current);switch(f){case 1:f=g.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:f=g.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":f=g.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":f=g.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":f=g.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof a.is=="string"?g.createElement("select",{is:a.is}):g.createElement("select"),a.multiple?f.multiple=!0:a.size&&(f.size=a.size);break;default:f=typeof a.is=="string"?g.createElement(s,{is:a.is}):g.createElement(s)}}f[Tt]=t,f[Bt]=a;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)f.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=f;e:switch(Rt(f,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Qn(t)}}return rt(t),_u(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Qn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(i(166));if(e=se.current,Ir(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,s=At,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[Tt]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||Ag(e.nodeValue,l)),e||hl(t,!0)}else e=Yi(e).createTextNode(a),e[Tt]=t,t.stateNode=e}return rt(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ir(t),l!==null){if(e===null){if(!a)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[Tt]=t}else nr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),e=!1}else l=Us(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(Zt(t),t):(Zt(t),null);if((t.flags&128)!==0)throw Error(i(558))}return rt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Ir(t),a!==null&&a.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 nr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),s=!1}else s=Us(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(Zt(t),t):(Zt(t),null)}return Zt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),f=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),f!==s&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),Ai(t,t.updateQueue),rt(t),null);case 4:return fe(),e===null&&Zu(t.stateNode.containerInfo),rt(t),null;case 10:return In(t.type),rt(t),null;case 19:if(B(ut),a=t.memoizedState,a===null)return rt(t),null;if(s=(t.flags&128)!==0,f=a.rendering,f===null)if(s)oo(a,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=hi(e),f!==null){for(t.flags|=128,oo(a,!1),e=f.updateQueue,t.updateQueue=e,Ai(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)rm(l,e),l=l.sibling;return ne(ut,ut.current&1|2),Be&&qn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Et()>Oi&&(t.flags|=128,s=!0,oo(a,!1),t.lanes=4194304)}else{if(!s)if(e=hi(f),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,Ai(t,e),oo(a,!0),a.tail===null&&a.tailMode==="hidden"&&!f.alternate&&!Be)return rt(t),null}else 2*Et()-a.renderingStartTime>Oi&&l!==536870912&&(t.flags|=128,s=!0,oo(a,!1),t.lanes=4194304);a.isBackwards?(f.sibling=t.child,t.child=f):(e=a.last,e!==null?e.sibling=f:t.child=f,a.last=f)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Et(),e.sibling=null,l=ut.current,ne(ut,s?l&1|2:l&1),Be&&qn(t,a.treeForkCount),e):(rt(t),null);case 22:case 23:return Zt(t),Fs(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),l=t.updateQueue,l!==null&&Ai(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&B(ar),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),In(dt),rt(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function f1(e,t){switch(ks(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return In(dt),fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return we(t),null;case 31:if(t.memoizedState!==null){if(Zt(t),t.alternate===null)throw Error(i(340));nr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));nr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(ut),null;case 4:return fe(),null;case 10:return In(t.type),null;case 22:case 23:return Zt(t),Fs(),e!==null&&B(ar),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return In(dt),null;case 25:return null;default:return null}}function Op(e,t){switch(ks(t),t.tag){case 3:In(dt),fe();break;case 26:case 27:case 5:we(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&Zt(t);break;case 13:Zt(t);break;case 19:B(ut);break;case 10:In(t.type);break;case 22:case 23:Zt(t),Fs(),e!==null&&B(ar);break;case 24:In(dt)}}function io(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var f=l.create,g=l.inst;a=f(),g.destroy=a}l=l.next}while(l!==s)}}catch(w){Qe(t,t.return,w)}}function xl(e,t,l){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var f=s.next;a=f;do{if((a.tag&e)===e){var g=a.inst,w=g.destroy;if(w!==void 0){g.destroy=void 0,s=t;var R=l,V=w;try{V()}catch(F){Qe(s,R,F)}}}a=a.next}while(a!==f)}}catch(F){Qe(t,t.return,F)}}function zp(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{wm(t,l)}catch(a){Qe(e,e.return,a)}}}function Dp(e,t,l){l.props=ur(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Qe(e,t,a)}}function co(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){Qe(e,t,s)}}function Rn(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){Qe(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){Qe(e,t,s)}else l.current=null}function jp(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){Qe(e,e.return,s)}}function Ru(e,t,l){try{var a=e.stateNode;D1(a,e.type,l,t),a[Bt]=t}catch(s){Qe(e,e.return,s)}}function Lp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ml(e.type)||e.tag===4}function Nu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lp(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&&Ml(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 Ou(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=Gn));else if(a!==4&&(a===27&&Ml(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Ou(e,t,l),e=e.sibling;e!==null;)Ou(e,t,l),e=e.sibling}function Mi(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Ml(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Mi(e,t,l),e=e.sibling;e!==null;)Mi(e,t,l),e=e.sibling}function kp(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Rt(t,a,l),t[Tt]=e,t[Bt]=l}catch(f){Qe(e,e.return,f)}}var Zn=!1,pt=!1,zu=!1,Hp=typeof WeakSet=="function"?WeakSet:Set,wt=null;function d1(e,t){if(e=e.containerInfo,Wu=Ki,e=Qh(e),Ts(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,f=a.focusNode;a=a.focusOffset;try{l.nodeType,f.nodeType}catch{l=null;break e}var g=0,w=-1,R=-1,V=0,F=0,ee=e,P=null;t:for(;;){for(var Q;ee!==l||s!==0&&ee.nodeType!==3||(w=g+s),ee!==f||a!==0&&ee.nodeType!==3||(R=g+a),ee.nodeType===3&&(g+=ee.nodeValue.length),(Q=ee.firstChild)!==null;)P=ee,ee=Q;for(;;){if(ee===e)break t;if(P===l&&++V===s&&(w=g),P===f&&++F===a&&(R=g),(Q=ee.nextSibling)!==null)break;ee=P,P=ee.parentNode}ee=Q}l=w===-1||R===-1?null:{start:w,end:R}}else l=null}l=l||{start:0,end:0}}else l=null;for(ef={focusedElem:e,selectionRange:l},Ki=!1,wt=t;wt!==null;)if(t=wt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,wt=e;else for(;wt!==null;){switch(t=wt,f=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(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,l=t,s=f.memoizedProps,f=f.memoizedState,a=l.stateNode;try{var de=ur(l.type,s);e=a.getSnapshotBeforeUpdate(de,f),a.__reactInternalSnapshotBeforeUpdate=e}catch(Se){Qe(l,l.return,Se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)lf(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":lf(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,wt=e;break}wt=t.return}}function Up(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Jn(e,l),a&4&&io(5,l);break;case 1:if(Jn(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(g){Qe(l,l.return,g)}else{var s=ur(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Qe(l,l.return,g)}}a&64&&zp(l),a&512&&co(l,l.return);break;case 3:if(Jn(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{wm(e,t)}catch(g){Qe(l,l.return,g)}}break;case 27:t===null&&a&4&&kp(l);case 26:case 5:Jn(e,l),t===null&&a&4&&jp(l),a&512&&co(l,l.return);break;case 12:Jn(e,l);break;case 31:Jn(e,l),a&4&&Yp(e,l);break;case 13:Jn(e,l),a&4&&Vp(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=S1.bind(null,l),Y1(e,l))));break;case 22:if(a=l.memoizedState!==null||Zn,!a){t=t!==null&&t.memoizedState!==null||pt,s=Zn;var f=pt;Zn=a,(pt=t)&&!f?Wn(e,l,(l.subtreeFlags&8772)!==0):Jn(e,l),Zn=s,pt=f}break;case 30:break;default:Jn(e,l)}}function Bp(e){var t=e.alternate;t!==null&&(e.alternate=null,Bp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&cs(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 ot=null,Yt=!1;function Fn(e,t,l){for(l=l.child;l!==null;)Gp(e,t,l),l=l.sibling}function Gp(e,t,l){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(gt,l)}catch{}switch(l.tag){case 26:pt||Rn(l,t),Fn(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:pt||Rn(l,t);var a=ot,s=Yt;Ml(l.type)&&(ot=l.stateNode,Yt=!1),Fn(e,t,l),vo(l.stateNode),ot=a,Yt=s;break;case 5:pt||Rn(l,t);case 6:if(a=ot,s=Yt,ot=null,Fn(e,t,l),ot=a,Yt=s,ot!==null)if(Yt)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(l.stateNode)}catch(f){Qe(l,t,f)}else try{ot.removeChild(l.stateNode)}catch(f){Qe(l,t,f)}break;case 18:ot!==null&&(Yt?(e=ot,zg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),da(e)):zg(ot,l.stateNode));break;case 4:a=ot,s=Yt,ot=l.stateNode.containerInfo,Yt=!0,Fn(e,t,l),ot=a,Yt=s;break;case 0:case 11:case 14:case 15:xl(2,l,t),pt||xl(4,l,t),Fn(e,t,l);break;case 1:pt||(Rn(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Dp(l,t,a)),Fn(e,t,l);break;case 21:Fn(e,t,l);break;case 22:pt=(a=pt)||l.memoizedState!==null,Fn(e,t,l),pt=a;break;default:Fn(e,t,l)}}function Yp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{da(e)}catch(l){Qe(t,t.return,l)}}}function Vp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{da(e)}catch(l){Qe(t,t.return,l)}}function h1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Hp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Hp),t;default:throw Error(i(435,e.tag))}}function _i(e,t){var l=h1(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var s=w1.bind(null,e,a);a.then(s,s)}})}function Vt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],f=e,g=t,w=g;e:for(;w!==null;){switch(w.tag){case 27:if(Ml(w.type)){ot=w.stateNode,Yt=!1;break e}break;case 5:ot=w.stateNode,Yt=!1;break e;case 3:case 4:ot=w.stateNode.containerInfo,Yt=!0;break e}w=w.return}if(ot===null)throw Error(i(160));Gp(f,g,s),ot=null,Yt=!1,f=s.alternate,f!==null&&(f.return=null),s.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)qp(t,e),t=t.sibling}var xn=null;function qp(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Vt(t,e),qt(e),a&4&&(xl(3,e,e.return),io(3,e),xl(5,e,e.return));break;case 1:Vt(t,e),qt(e),a&512&&(pt||l===null||Rn(l,l.return)),a&64&&Zn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=xn;if(Vt(t,e),qt(e),a&512&&(pt||l===null||Rn(l,l.return)),a&4){var f=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":f=s.getElementsByTagName("title")[0],(!f||f[La]||f[Tt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=s.createElement(a),s.head.insertBefore(f,s.querySelector("head > title"))),Rt(f,a,l),f[Tt]=e,St(f),a=f;break e;case"link":var g=qg("link","href",s).get(a+(l.href||""));if(g){for(var w=0;w<g.length;w++)if(f=g[w],f.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&f.getAttribute("rel")===(l.rel==null?null:l.rel)&&f.getAttribute("title")===(l.title==null?null:l.title)&&f.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){g.splice(w,1);break t}}f=s.createElement(a),Rt(f,a,l),s.head.appendChild(f);break;case"meta":if(g=qg("meta","content",s).get(a+(l.content||""))){for(w=0;w<g.length;w++)if(f=g[w],f.getAttribute("content")===(l.content==null?null:""+l.content)&&f.getAttribute("name")===(l.name==null?null:l.name)&&f.getAttribute("property")===(l.property==null?null:l.property)&&f.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&f.getAttribute("charset")===(l.charSet==null?null:l.charSet)){g.splice(w,1);break t}}f=s.createElement(a),Rt(f,a,l),s.head.appendChild(f);break;default:throw Error(i(468,a))}f[Tt]=e,St(f),a=f}e.stateNode=a}else Xg(s,e.type,e.stateNode);else e.stateNode=Vg(s,a,e.memoizedProps);else f!==a?(f===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):f.count--,a===null?Xg(s,e.type,e.stateNode):Vg(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Ru(e,e.memoizedProps,l.memoizedProps)}break;case 27:Vt(t,e),qt(e),a&512&&(pt||l===null||Rn(l,l.return)),l!==null&&a&4&&Ru(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Vt(t,e),qt(e),a&512&&(pt||l===null||Rn(l,l.return)),e.flags&32){s=e.stateNode;try{Lr(s,"")}catch(de){Qe(e,e.return,de)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,Ru(e,s,l!==null?l.memoizedProps:s)),a&1024&&(zu=!0);break;case 6:if(Vt(t,e),qt(e),a&4){if(e.stateNode===null)throw Error(i(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(de){Qe(e,e.return,de)}}break;case 3:if(Xi=null,s=xn,xn=Vi(t.containerInfo),Vt(t,e),xn=s,qt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{da(t.containerInfo)}catch(de){Qe(e,e.return,de)}zu&&(zu=!1,Xp(e));break;case 4:a=xn,xn=Vi(e.stateNode.containerInfo),Vt(t,e),qt(e),xn=a;break;case 12:Vt(t,e),qt(e);break;case 31:Vt(t,e),qt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,_i(e,a)));break;case 13:Vt(t,e),qt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Ni=Et()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,_i(e,a)));break;case 22:s=e.memoizedState!==null;var R=l!==null&&l.memoizedState!==null,V=Zn,F=pt;if(Zn=V||s,pt=F||R,Vt(t,e),pt=F,Zn=V,qt(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(l===null||R||Zn||pt||fr(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){R=l=t;try{if(f=R.stateNode,s)g=f.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{w=R.stateNode;var ee=R.memoizedProps.style,P=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;w.style.display=P==null||typeof P=="boolean"?"":(""+P).trim()}}catch(de){Qe(R,R.return,de)}}}else if(t.tag===6){if(l===null){R=t;try{R.stateNode.nodeValue=s?"":R.memoizedProps}catch(de){Qe(R,R.return,de)}}}else if(t.tag===18){if(l===null){R=t;try{var Q=R.stateNode;s?Dg(Q,!0):Dg(R.stateNode,!1)}catch(de){Qe(R,R.return,de)}}}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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,_i(e,l))));break;case 19:Vt(t,e),qt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,_i(e,a)));break;case 30:break;case 21:break;default:Vt(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Lp(a)){l=a;break}a=a.return}if(l==null)throw Error(i(160));switch(l.tag){case 27:var s=l.stateNode,f=Nu(e);Mi(e,f,s);break;case 5:var g=l.stateNode;l.flags&32&&(Lr(g,""),l.flags&=-33);var w=Nu(e);Mi(e,w,g);break;case 3:case 4:var R=l.stateNode.containerInfo,V=Nu(e);Ou(e,V,R);break;default:throw Error(i(161))}}catch(F){Qe(e,e.return,F)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Xp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Jn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Up(e,t.alternate,t),t=t.sibling}function fr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xl(4,t,t.return),fr(t);break;case 1:Rn(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Dp(t,t.return,l),fr(t);break;case 27:vo(t.stateNode);case 26:case 5:Rn(t,t.return),fr(t);break;case 22:t.memoizedState===null&&fr(t);break;case 30:fr(t);break;default:fr(t)}e=e.sibling}}function Wn(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,f=t,g=f.flags;switch(f.tag){case 0:case 11:case 15:Wn(s,f,l),io(4,f);break;case 1:if(Wn(s,f,l),a=f,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(V){Qe(a,a.return,V)}if(a=f,s=a.updateQueue,s!==null){var w=a.stateNode;try{var R=s.shared.hiddenCallbacks;if(R!==null)for(s.shared.hiddenCallbacks=null,s=0;s<R.length;s++)Sm(R[s],w)}catch(V){Qe(a,a.return,V)}}l&&g&64&&zp(f),co(f,f.return);break;case 27:kp(f);case 26:case 5:Wn(s,f,l),l&&a===null&&g&4&&jp(f),co(f,f.return);break;case 12:Wn(s,f,l);break;case 31:Wn(s,f,l),l&&g&4&&Yp(s,f);break;case 13:Wn(s,f,l),l&&g&4&&Vp(s,f);break;case 22:f.memoizedState===null&&Wn(s,f,l),co(f,f.return);break;case 30:break;default:Wn(s,f,l)}t=t.sibling}}function Du(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Ka(l))}function ju(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ka(e))}function Sn(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ip(e,t,l,a),t=t.sibling}function Ip(e,t,l,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Sn(e,t,l,a),s&2048&&io(9,t);break;case 1:Sn(e,t,l,a);break;case 3:Sn(e,t,l,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ka(e)));break;case 12:if(s&2048){Sn(e,t,l,a),e=t.stateNode;try{var f=t.memoizedProps,g=f.id,w=f.onPostCommit;typeof w=="function"&&w(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){Qe(t,t.return,R)}}else Sn(e,t,l,a);break;case 31:Sn(e,t,l,a);break;case 13:Sn(e,t,l,a);break;case 23:break;case 22:f=t.stateNode,g=t.alternate,t.memoizedState!==null?f._visibility&2?Sn(e,t,l,a):so(e,t):f._visibility&2?Sn(e,t,l,a):(f._visibility|=2,ta(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),s&2048&&Du(g,t);break;case 24:Sn(e,t,l,a),s&2048&&ju(t.alternate,t);break;default:Sn(e,t,l,a)}}function ta(e,t,l,a,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,g=t,w=l,R=a,V=g.flags;switch(g.tag){case 0:case 11:case 15:ta(f,g,w,R,s),io(8,g);break;case 23:break;case 22:var F=g.stateNode;g.memoizedState!==null?F._visibility&2?ta(f,g,w,R,s):so(f,g):(F._visibility|=2,ta(f,g,w,R,s)),s&&V&2048&&Du(g.alternate,g);break;case 24:ta(f,g,w,R,s),s&&V&2048&&ju(g.alternate,g);break;default:ta(f,g,w,R,s)}t=t.sibling}}function so(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,s=a.flags;switch(a.tag){case 22:so(l,a),s&2048&&Du(a.alternate,a);break;case 24:so(l,a),s&2048&&ju(a.alternate,a);break;default:so(l,a)}t=t.sibling}}var uo=8192;function na(e,t,l){if(e.subtreeFlags&uo)for(e=e.child;e!==null;)Pp(e,t,l),e=e.sibling}function Pp(e,t,l){switch(e.tag){case 26:na(e,t,l),e.flags&uo&&e.memoizedState!==null&&W1(l,xn,e.memoizedState,e.memoizedProps);break;case 5:na(e,t,l);break;case 3:case 4:var a=xn;xn=Vi(e.stateNode.containerInfo),na(e,t,l),xn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=uo,uo=16777216,na(e,t,l),uo=a):na(e,t,l));break;default:na(e,t,l)}}function $p(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 fo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];wt=a,Qp(a,e)}$p(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Kp(e),e=e.sibling}function Kp(e){switch(e.tag){case 0:case 11:case 15:fo(e),e.flags&2048&&xl(9,e,e.return);break;case 3:fo(e);break;case 12:fo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ri(e)):fo(e);break;default:fo(e)}}function Ri(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];wt=a,Qp(a,e)}$p(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xl(8,t,t.return),Ri(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Ri(t));break;default:Ri(t)}e=e.sibling}}function Qp(e,t){for(;wt!==null;){var l=wt;switch(l.tag){case 0:case 11:case 15:xl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Ka(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,wt=a;else e:for(l=e;wt!==null;){a=wt;var s=a.sibling,f=a.return;if(Bp(a),a===l){wt=null;break e}if(s!==null){s.return=f,wt=s;break e}wt=f}}}var m1={getCacheForType:function(e){var t=Mt(dt),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Mt(dt).controller.signal}},p1=typeof WeakMap=="function"?WeakMap:Map,Xe=0,et=null,ze=null,Le=0,Ke=0,Ft=null,Sl=!1,la=!1,Lu=!1,el=0,st=0,wl=0,dr=0,ku=0,Jt=0,ra=0,ho=null,Xt=null,Hu=!1,Ni=0,Zp=0,Oi=1/0,zi=null,El=null,yt=0,Cl=null,aa=null,tl=0,Uu=0,Bu=null,Fp=null,mo=0,Gu=null;function Wt(){return(Xe&2)!==0&&Le!==0?Le&-Le:O.T!==null?Pu():hh()}function Jp(){if(Jt===0)if((Le&536870912)===0||Be){var e=xt;xt<<=1,(xt&3932160)===0&&(xt=262144),Jt=e}else Jt=536870912;return e=Qt.current,e!==null&&(e.flags|=32),Jt}function It(e,t,l){(e===et&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(oa(e,0),Tl(e,Le,Jt,!1)),ja(e,l),((Xe&2)===0||e!==et)&&(e===et&&((Xe&2)===0&&(dr|=l),st===4&&Tl(e,Le,Jt,!1)),Nn(e))}function Wp(e,t,l){if((Xe&6)!==0)throw Error(i(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Un(e,t),s=a?v1(e,t):Vu(e,t,!0),f=a;do{if(s===0){la&&!a&&Tl(e,t,0,!1);break}else{if(l=e.current.alternate,f&&!g1(l)){s=Vu(e,t,!1),f=!1;continue}if(s===2){if(f=t,e.errorRecoveryDisabledLanes&f)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var w=e;s=ho;var R=w.current.memoizedState.isDehydrated;if(R&&(oa(w,g).flags|=256),g=Vu(w,g,!1),g!==2){if(Lu&&!R){w.errorRecoveryDisabledLanes|=f,dr|=f,s=4;break e}f=Xt,Xt=s,f!==null&&(Xt===null?Xt=f:Xt.push.apply(Xt,f))}s=g}if(f=!1,s!==2)continue}}if(s===1){oa(e,0),Tl(e,t,0,!0);break}e:{switch(a=e,f=s,f){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Tl(a,t,Jt,!Sl);break e;case 2:Xt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(s=Ni+300-Et(),10<s)){if(Tl(a,t,Jt,!Sl),Ar(a,0,!0)!==0)break e;tl=t,a.timeoutHandle=Ng(eg.bind(null,a,l,Xt,zi,Hu,t,Jt,dr,ra,Sl,f,"Throttled",-0,0),s);break e}eg(a,l,Xt,zi,Hu,t,Jt,dr,ra,Sl,f,null,-0,0)}}break}while(!0);Nn(e)}function eg(e,t,l,a,s,f,g,w,R,V,F,ee,P,Q){if(e.timeoutHandle=-1,ee=t.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Gn},Pp(t,f,ee);var de=(f&62914560)===f?Ni-Et():(f&4194048)===f?Zp-Et():0;if(de=ew(ee,de),de!==null){tl=f,e.cancelPendingCommit=de(cg.bind(null,e,t,f,l,a,s,g,w,R,F,ee,null,P,Q)),Tl(e,f,g,!V);return}}cg(e,t,f,l,a,s,g,w,R)}function g1(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],f=s.getSnapshot;s=s.value;try{if(!$t(f(),s))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Tl(e,t,l,a){t&=~ku,t&=~dr,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var f=31-it(s),g=1<<f;a[f]=-1,s&=~g}l!==0&&uh(e,l,t)}function Di(){return(Xe&6)===0?(po(0),!1):!0}function Yu(){if(ze!==null){if(Ke===0)var e=ze.return;else e=ze,Xn=lr=null,lu(e),Zr=null,Za=0,e=ze;for(;e!==null;)Op(e.alternate,e),e=e.return;ze=null}}function oa(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,k1(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),tl=0,Yu(),et=e,ze=l=Vn(e.current,null),Le=t,Ke=0,Ft=null,Sl=!1,la=Un(e,t),Lu=!1,ra=Jt=ku=dr=wl=st=0,Xt=ho=null,Hu=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-it(a),f=1<<s;t|=e[s],a&=~f}return el=t,ei(),l}function tg(e,t){_e=null,O.H=ro,t===Qr||t===ci?(t=ym(),Ke=3):t===Is?(t=ym(),Ke=4):Ke=t===bu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ft=t,ze===null&&(st=1,wi(e,cn(t,e.current)))}function ng(){var e=Qt.current;return e===null?!0:(Le&4194048)===Le?dn===null:(Le&62914560)===Le||(Le&536870912)!==0?e===dn:!1}function lg(){var e=O.H;return O.H=ro,e===null?ro:e}function rg(){var e=O.A;return O.A=m1,e}function ji(){st=4,Sl||(Le&4194048)!==Le&&Qt.current!==null||(la=!0),(wl&134217727)===0&&(dr&134217727)===0||et===null||Tl(et,Le,Jt,!1)}function Vu(e,t,l){var a=Xe;Xe|=2;var s=lg(),f=rg();(et!==e||Le!==t)&&(zi=null,oa(e,t)),t=!1;var g=st;e:do try{if(Ke!==0&&ze!==null){var w=ze,R=Ft;switch(Ke){case 8:Yu(),g=6;break e;case 3:case 2:case 9:case 6:Qt.current===null&&(t=!0);var V=Ke;if(Ke=0,Ft=null,ia(e,w,R,V),l&&la){g=0;break e}break;default:V=Ke,Ke=0,Ft=null,ia(e,w,R,V)}}y1(),g=st;break}catch(F){tg(e,F)}while(!0);return t&&e.shellSuspendCounter++,Xn=lr=null,Xe=a,O.H=s,O.A=f,ze===null&&(et=null,Le=0,ei()),g}function y1(){for(;ze!==null;)ag(ze)}function v1(e,t){var l=Xe;Xe|=2;var a=lg(),s=rg();et!==e||Le!==t?(zi=null,Oi=Et()+500,oa(e,t)):la=Un(e,t);e:do try{if(Ke!==0&&ze!==null){t=ze;var f=Ft;t:switch(Ke){case 1:Ke=0,Ft=null,ia(e,t,f,1);break;case 2:case 9:if(pm(f)){Ke=0,Ft=null,og(t);break}t=function(){Ke!==2&&Ke!==9||et!==e||(Ke=7),Nn(e)},f.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:pm(f)?(Ke=0,Ft=null,og(t)):(Ke=0,Ft=null,ia(e,t,f,7));break;case 5:var g=null;switch(ze.tag){case 26:g=ze.memoizedState;case 5:case 27:var w=ze;if(g?Ig(g):w.stateNode.complete){Ke=0,Ft=null;var R=w.sibling;if(R!==null)ze=R;else{var V=w.return;V!==null?(ze=V,Li(V)):ze=null}break t}}Ke=0,Ft=null,ia(e,t,f,5);break;case 6:Ke=0,Ft=null,ia(e,t,f,6);break;case 8:Yu(),st=6;break e;default:throw Error(i(462))}}b1();break}catch(F){tg(e,F)}while(!0);return Xn=lr=null,O.H=a,O.A=s,Xe=l,ze!==null?0:(et=null,Le=0,ei(),st)}function b1(){for(;ze!==null&&!An();)ag(ze)}function ag(e){var t=Rp(e.alternate,e,el);e.memoizedProps=e.pendingProps,t===null?Li(e):ze=t}function og(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Ep(l,t,t.pendingProps,t.type,void 0,Le);break;case 11:t=Ep(l,t,t.pendingProps,t.type.render,t.ref,Le);break;case 5:lu(t);default:Op(l,t),t=ze=rm(t,el),t=Rp(l,t,el)}e.memoizedProps=e.pendingProps,t===null?Li(e):ze=t}function ia(e,t,l,a){Xn=lr=null,lu(t),Zr=null,Za=0;var s=t.return;try{if(i1(e,s,t,l,Le)){st=1,wi(e,cn(l,e.current)),ze=null;return}}catch(f){if(s!==null)throw ze=s,f;st=1,wi(e,cn(l,e.current)),ze=null;return}t.flags&32768?(Be||a===1?e=!0:la||(Le&536870912)!==0?e=!1:(Sl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Qt.current,a!==null&&a.tag===13&&(a.flags|=16384))),ig(t,e)):Li(t)}function Li(e){var t=e;do{if((t.flags&32768)!==0){ig(t,Sl);return}e=t.return;var l=u1(t.alternate,t,el);if(l!==null){ze=l;return}if(t=t.sibling,t!==null){ze=t;return}ze=t=e}while(t!==null);st===0&&(st=5)}function ig(e,t){do{var l=f1(e.alternate,e);if(l!==null){l.flags&=32767,ze=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ze=e;return}ze=e=l}while(e!==null);st=6,ze=null}function cg(e,t,l,a,s,f,g,w,R){e.cancelPendingCommit=null;do ki();while(yt!==0);if((Xe&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(f=t.lanes|t.childLanes,f|=Ns,Jx(e,l,f,g,w,R),e===et&&(ze=et=null,Le=0),aa=t,Cl=e,tl=l,Uu=f,Bu=s,Fp=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,E1(ye,function(){return hg(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=O.T,O.T=null,s=X.p,X.p=2,g=Xe,Xe|=4;try{d1(e,t,l)}finally{Xe=g,X.p=s,O.T=a}}yt=1,sg(),ug(),fg()}}function sg(){if(yt===1){yt=0;var e=Cl,t=aa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=O.T,O.T=null;var a=X.p;X.p=2;var s=Xe;Xe|=4;try{qp(t,e);var f=ef,g=Qh(e.containerInfo),w=f.focusedElem,R=f.selectionRange;if(g!==w&&w&&w.ownerDocument&&Kh(w.ownerDocument.documentElement,w)){if(R!==null&&Ts(w)){var V=R.start,F=R.end;if(F===void 0&&(F=V),"selectionStart"in w)w.selectionStart=V,w.selectionEnd=Math.min(F,w.value.length);else{var ee=w.ownerDocument||document,P=ee&&ee.defaultView||window;if(P.getSelection){var Q=P.getSelection(),de=w.textContent.length,Se=Math.min(R.start,de),Je=R.end===void 0?Se:Math.min(R.end,de);!Q.extend&&Se>Je&&(g=Je,Je=Se,Se=g);var U=$h(w,Se),L=$h(w,Je);if(U&&L&&(Q.rangeCount!==1||Q.anchorNode!==U.node||Q.anchorOffset!==U.offset||Q.focusNode!==L.node||Q.focusOffset!==L.offset)){var Y=ee.createRange();Y.setStart(U.node,U.offset),Q.removeAllRanges(),Se>Je?(Q.addRange(Y),Q.extend(L.node,L.offset)):(Y.setEnd(L.node,L.offset),Q.addRange(Y))}}}}for(ee=[],Q=w;Q=Q.parentNode;)Q.nodeType===1&&ee.push({element:Q,left:Q.scrollLeft,top:Q.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ee.length;w++){var W=ee[w];W.element.scrollLeft=W.left,W.element.scrollTop=W.top}}Ki=!!Wu,ef=Wu=null}finally{Xe=s,X.p=a,O.T=l}}e.current=t,yt=2}}function ug(){if(yt===2){yt=0;var e=Cl,t=aa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=O.T,O.T=null;var a=X.p;X.p=2;var s=Xe;Xe|=4;try{Up(e,t.alternate,t)}finally{Xe=s,X.p=a,O.T=l}}yt=3}}function fg(){if(yt===4||yt===3){yt=0,Oa();var e=Cl,t=aa,l=tl,a=Fp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?yt=5:(yt=0,aa=Cl=null,dg(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(El=null),os(l),t=t.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(gt,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=O.T,s=X.p,X.p=2,O.T=null;try{for(var f=e.onRecoverableError,g=0;g<a.length;g++){var w=a[g];f(w.value,{componentStack:w.stack})}}finally{O.T=t,X.p=s}}(tl&3)!==0&&ki(),Nn(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===Gu?mo++:(mo=0,Gu=e):mo=0,po(0)}}function dg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ka(t)))}function ki(){return sg(),ug(),fg(),hg()}function hg(){if(yt!==5)return!1;var e=Cl,t=Uu;Uu=0;var l=os(tl),a=O.T,s=X.p;try{X.p=32>l?32:l,O.T=null,l=Bu,Bu=null;var f=Cl,g=tl;if(yt=0,aa=Cl=null,tl=0,(Xe&6)!==0)throw Error(i(331));var w=Xe;if(Xe|=4,Kp(f.current),Ip(f,f.current,g,l),Xe=w,po(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(gt,f)}catch{}return!0}finally{X.p=s,O.T=a,dg(e,t)}}function mg(e,t,l){t=cn(l,t),t=vu(e.stateNode,t,2),e=yl(e,t,2),e!==null&&(ja(e,2),Nn(e))}function Qe(e,t,l){if(e.tag===3)mg(e,e,l);else for(;t!==null;){if(t.tag===3){mg(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(El===null||!El.has(a))){e=cn(l,e),l=pp(2),a=yl(t,l,2),a!==null&&(gp(l,a,t,e),ja(a,2),Nn(a));break}}t=t.return}}function qu(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new p1;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(l)||(Lu=!0,s.add(l),e=x1.bind(null,e,t,l),t.then(e,e))}function x1(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,et===e&&(Le&l)===l&&(st===4||st===3&&(Le&62914560)===Le&&300>Et()-Ni?(Xe&2)===0&&oa(e,0):ku|=l,ra===Le&&(ra=0)),Nn(e)}function pg(e,t){t===0&&(t=_r()),e=er(e,t),e!==null&&(ja(e,t),Nn(e))}function S1(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),pg(e,l)}function w1(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(i(314))}a!==null&&a.delete(t),pg(e,l)}function E1(e,t){return yn(e,t)}var Hi=null,ca=null,Xu=!1,Ui=!1,Iu=!1,Al=0;function Nn(e){e!==ca&&e.next===null&&(ca===null?Hi=ca=e:ca=ca.next=e),Ui=!0,Xu||(Xu=!0,T1())}function po(e,t){if(!Iu&&Ui){Iu=!0;do for(var l=!1,a=Hi;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var f=0;else{var g=a.suspendedLanes,w=a.pingedLanes;f=(1<<31-it(42|e)+1)-1,f&=s&~(g&~w),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(l=!0,bg(a,f))}else f=Le,f=Ar(a,a===et?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(f&3)===0||Un(a,f)||(l=!0,bg(a,f));a=a.next}while(l);Iu=!1}}function C1(){gg()}function gg(){Ui=Xu=!1;var e=0;Al!==0&&L1()&&(e=Al);for(var t=Et(),l=null,a=Hi;a!==null;){var s=a.next,f=yg(a,t);f===0?(a.next=null,l===null?Hi=s:l.next=s,s===null&&(ca=l)):(l=a,(e!==0||(f&3)!==0)&&(Ui=!0)),a=s}yt!==0&&yt!==5||po(e),Al!==0&&(Al=0)}function yg(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var g=31-it(f),w=1<<g,R=s[g];R===-1?((w&l)===0||(w&a)!==0)&&(s[g]=Mr(w,t)):R<=t&&(e.expiredLanes|=w),f&=~w}if(t=et,l=Le,l=Ar(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&vn(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Un(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&vn(a),os(l)){case 2:case 8:l=Ce;break;case 32:l=ye;break;case 268435456:l=$e;break;default:l=ye}return a=vg.bind(null,e),l=yn(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&vn(a),e.callbackPriority=2,e.callbackNode=null,2}function vg(e,t){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(ki()&&e.callbackNode!==l)return null;var a=Le;return a=Ar(e,e===et?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Wp(e,a,t),yg(e,Et()),e.callbackNode!=null&&e.callbackNode===l?vg.bind(null,e):null)}function bg(e,t){if(ki())return null;Wp(e,t,!0)}function T1(){H1(function(){(Xe&6)!==0?yn(ue,C1):gg()})}function Pu(){if(Al===0){var e=$r;e===0&&(e=Ql,Ql<<=1,(Ql&261888)===0&&(Ql=256)),Al=e}return Al}function xg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Po(""+e)}function Sg(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function A1(e,t,l,a,s){if(t==="submit"&&l&&l.stateNode===s){var f=xg((s[Bt]||null).action),g=a.submitter;g&&(t=(t=g[Bt]||null)?xg(t.formAction):g.getAttribute("formAction"),t!==null&&(f=t,g=null));var w=new Zo("action","action",null,a,s);e.push({event:w,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Al!==0){var R=g?Sg(s,g):new FormData(s);du(l,{pending:!0,data:R,method:s.method,action:f},null,R)}}else typeof f=="function"&&(w.preventDefault(),R=g?Sg(s,g):new FormData(s),du(l,{pending:!0,data:R,method:s.method,action:f},f,R))},currentTarget:s}]})}}for(var $u=0;$u<Rs.length;$u++){var Ku=Rs[$u],M1=Ku.toLowerCase(),_1=Ku[0].toUpperCase()+Ku.slice(1);bn(M1,"on"+_1)}bn(Jh,"onAnimationEnd"),bn(Wh,"onAnimationIteration"),bn(em,"onAnimationStart"),bn("dblclick","onDoubleClick"),bn("focusin","onFocus"),bn("focusout","onBlur"),bn(XS,"onTransitionRun"),bn(IS,"onTransitionStart"),bn(PS,"onTransitionCancel"),bn(tm,"onTransitionEnd"),Dr("onMouseEnter",["mouseout","mouseover"]),Dr("onMouseLeave",["mouseout","mouseover"]),Dr("onPointerEnter",["pointerout","pointerover"]),Dr("onPointerLeave",["pointerout","pointerover"]),Zl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var go="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(" "),R1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(go));function wg(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var f=void 0;if(t)for(var g=a.length-1;0<=g;g--){var w=a[g],R=w.instance,V=w.currentTarget;if(w=w.listener,R!==f&&s.isPropagationStopped())break e;f=w,s.currentTarget=V;try{f(s)}catch(F){Wo(F)}s.currentTarget=null,f=R}else for(g=0;g<a.length;g++){if(w=a[g],R=w.instance,V=w.currentTarget,w=w.listener,R!==f&&s.isPropagationStopped())break e;f=w,s.currentTarget=V;try{f(s)}catch(F){Wo(F)}s.currentTarget=null,f=R}}}}function De(e,t){var l=t[is];l===void 0&&(l=t[is]=new Set);var a=e+"__bubble";l.has(a)||(Eg(t,e,2,!1),l.add(a))}function Qu(e,t,l){var a=0;t&&(a|=4),Eg(l,e,a,t)}var Bi="_reactListening"+Math.random().toString(36).slice(2);function Zu(e){if(!e[Bi]){e[Bi]=!0,gh.forEach(function(l){l!=="selectionchange"&&(R1.has(l)||Qu(l,!1,e),Qu(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Bi]||(t[Bi]=!0,Qu("selectionchange",!1,t))}}function Eg(e,t,l,a){switch(Jg(t)){case 2:var s=lw;break;case 8:s=rw;break;default:s=df}l=s.bind(null,t,l,e),s=void 0,!gs||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,l,{capture:!0,passive:s}):e.addEventListener(t,l,!0):s!==void 0?e.addEventListener(t,l,{passive:s}):e.addEventListener(t,l,!1)}function Fu(e,t,l,a,s){var f=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var g=a.tag;if(g===3||g===4){var w=a.stateNode.containerInfo;if(w===s)break;if(g===4)for(g=a.return;g!==null;){var R=g.tag;if((R===3||R===4)&&g.stateNode.containerInfo===s)return;g=g.return}for(;w!==null;){if(g=Nr(w),g===null)return;if(R=g.tag,R===5||R===6||R===26||R===27){a=f=g;continue e}w=w.parentNode}}a=a.return}_h(function(){var V=f,F=ms(l),ee=[];e:{var P=nm.get(e);if(P!==void 0){var Q=Zo,de=e;switch(e){case"keypress":if(Ko(l)===0)break e;case"keydown":case"keyup":Q=wS;break;case"focusin":de="focus",Q=xs;break;case"focusout":de="blur",Q=xs;break;case"beforeblur":case"afterblur":Q=xs;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=Oh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=uS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=TS;break;case Jh:case Wh:case em:Q=hS;break;case tm:Q=MS;break;case"scroll":case"scrollend":Q=cS;break;case"wheel":Q=RS;break;case"copy":case"cut":case"paste":Q=pS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=Dh;break;case"toggle":case"beforetoggle":Q=OS}var Se=(t&4)!==0,Je=!Se&&(e==="scroll"||e==="scrollend"),U=Se?P!==null?P+"Capture":null:P;Se=[];for(var L=V,Y;L!==null;){var W=L;if(Y=W.stateNode,W=W.tag,W!==5&&W!==26&&W!==27||Y===null||U===null||(W=Ha(L,U),W!=null&&Se.push(yo(L,W,Y))),Je)break;L=L.return}0<Se.length&&(P=new Q(P,de,null,l,F),ee.push({event:P,listeners:Se}))}}if((t&7)===0){e:{if(P=e==="mouseover"||e==="pointerover",Q=e==="mouseout"||e==="pointerout",P&&l!==hs&&(de=l.relatedTarget||l.fromElement)&&(Nr(de)||de[Rr]))break e;if((Q||P)&&(P=F.window===F?F:(P=F.ownerDocument)?P.defaultView||P.parentWindow:window,Q?(de=l.relatedTarget||l.toElement,Q=V,de=de?Nr(de):null,de!==null&&(Je=u(de),Se=de.tag,de!==Je||Se!==5&&Se!==27&&Se!==6)&&(de=null)):(Q=null,de=V),Q!==de)){if(Se=Oh,W="onMouseLeave",U="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(Se=Dh,W="onPointerLeave",U="onPointerEnter",L="pointer"),Je=Q==null?P:ka(Q),Y=de==null?P:ka(de),P=new Se(W,L+"leave",Q,l,F),P.target=Je,P.relatedTarget=Y,W=null,Nr(F)===V&&(Se=new Se(U,L+"enter",de,l,F),Se.target=Y,Se.relatedTarget=Je,W=Se),Je=W,Q&&de)t:{for(Se=N1,U=Q,L=de,Y=0,W=U;W;W=Se(W))Y++;W=0;for(var ve=L;ve;ve=Se(ve))W++;for(;0<Y-W;)U=Se(U),Y--;for(;0<W-Y;)L=Se(L),W--;for(;Y--;){if(U===L||L!==null&&U===L.alternate){Se=U;break t}U=Se(U),L=Se(L)}Se=null}else Se=null;Q!==null&&Cg(ee,P,Q,Se,!1),de!==null&&Je!==null&&Cg(ee,Je,de,Se,!0)}}e:{if(P=V?ka(V):window,Q=P.nodeName&&P.nodeName.toLowerCase(),Q==="select"||Q==="input"&&P.type==="file")var Ye=Yh;else if(Bh(P))if(Vh)Ye=YS;else{Ye=BS;var ge=US}else Q=P.nodeName,!Q||Q.toLowerCase()!=="input"||P.type!=="checkbox"&&P.type!=="radio"?V&&ds(V.elementType)&&(Ye=Yh):Ye=GS;if(Ye&&(Ye=Ye(e,V))){Gh(ee,Ye,l,F);break e}ge&&ge(e,P,V),e==="focusout"&&V&&P.type==="number"&&V.memoizedProps.value!=null&&fs(P,"number",P.value)}switch(ge=V?ka(V):window,e){case"focusin":(Bh(ge)||ge.contentEditable==="true")&&(Br=ge,As=V,Ia=null);break;case"focusout":Ia=As=Br=null;break;case"mousedown":Ms=!0;break;case"contextmenu":case"mouseup":case"dragend":Ms=!1,Zh(ee,l,F);break;case"selectionchange":if(qS)break;case"keydown":case"keyup":Zh(ee,l,F)}var Re;if(ws)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else Ur?Hh(e,l)&&(ke="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ke="onCompositionStart");ke&&(jh&&l.locale!=="ko"&&(Ur||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Ur&&(Re=Rh()):(ul=F,ys="value"in ul?ul.value:ul.textContent,Ur=!0)),ge=Gi(V,ke),0<ge.length&&(ke=new zh(ke,e,null,l,F),ee.push({event:ke,listeners:ge}),Re?ke.data=Re:(Re=Uh(l),Re!==null&&(ke.data=Re)))),(Re=DS?jS(e,l):LS(e,l))&&(ke=Gi(V,"onBeforeInput"),0<ke.length&&(ge=new zh("onBeforeInput","beforeinput",null,l,F),ee.push({event:ge,listeners:ke}),ge.data=Re)),A1(ee,e,V,l,F)}wg(ee,t)})}function yo(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Gi(e,t){for(var l=t+"Capture",a=[];e!==null;){var s=e,f=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||f===null||(s=Ha(e,l),s!=null&&a.unshift(yo(e,s,f)),s=Ha(e,t),s!=null&&a.push(yo(e,s,f))),e.tag===3)return a;e=e.return}return[]}function N1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Cg(e,t,l,a,s){for(var f=t._reactName,g=[];l!==null&&l!==a;){var w=l,R=w.alternate,V=w.stateNode;if(w=w.tag,R!==null&&R===a)break;w!==5&&w!==26&&w!==27||V===null||(R=V,s?(V=Ha(l,f),V!=null&&g.unshift(yo(l,V,R))):s||(V=Ha(l,f),V!=null&&g.push(yo(l,V,R)))),l=l.return}g.length!==0&&e.push({event:t,listeners:g})}var O1=/\r\n?/g,z1=/\u0000|\uFFFD/g;function Tg(e){return(typeof e=="string"?e:""+e).replace(O1,`
|
|
49
|
+
`).replace(z1,"")}function Ag(e,t){return t=Tg(t),Tg(e)===t}function Fe(e,t,l,a,s,f){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Lr(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Lr(e,""+a);break;case"className":Xo(e,"class",a);break;case"tabIndex":Xo(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Xo(e,l,a);break;case"style":Ah(e,a,f);break;case"data":if(t!=="object"){Xo(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Po(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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 f=="function"&&(l==="formAction"?(t!=="input"&&Fe(e,t,"name",s.name,s,null),Fe(e,t,"formEncType",s.formEncType,s,null),Fe(e,t,"formMethod",s.formMethod,s,null),Fe(e,t,"formTarget",s.formTarget,s,null)):(Fe(e,t,"encType",s.encType,s,null),Fe(e,t,"method",s.method,s,null),Fe(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Po(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Gn);break;case"onScroll":a!=null&&De("scroll",e);break;case"onScrollEnd":a!=null&&De("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(i(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(i(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=Po(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":De("beforetoggle",e),De("toggle",e),qo(e,"popover",a);break;case"xlinkActuate":Bn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Bn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Bn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Bn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Bn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Bn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":qo(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=oS.get(l)||l,qo(e,l,a))}}function Ju(e,t,l,a,s,f){switch(l){case"style":Ah(e,a,f);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(i(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(i(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Lr(e,a):(typeof a=="number"||typeof a=="bigint")&&Lr(e,""+a);break;case"onScroll":a!=null&&De("scroll",e);break;case"onScrollEnd":a!=null&&De("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Gn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yh.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),t=l.slice(2,s?l.length-7:void 0),f=e[Bt]||null,f=f!=null?f[l]:null,typeof f=="function"&&e.removeEventListener(t,f,s),typeof a=="function")){typeof f!="function"&&f!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):qo(e,l,a)}}}function Rt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",e),De("load",e);var a=!1,s=!1,f;for(f in l)if(l.hasOwnProperty(f)){var g=l[f];if(g!=null)switch(f){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Fe(e,t,f,g,l,null)}}s&&Fe(e,t,"srcSet",l.srcSet,l,null),a&&Fe(e,t,"src",l.src,l,null);return;case"input":De("invalid",e);var w=f=g=s=null,R=null,V=null;for(a in l)if(l.hasOwnProperty(a)){var F=l[a];if(F!=null)switch(a){case"name":s=F;break;case"type":g=F;break;case"checked":R=F;break;case"defaultChecked":V=F;break;case"value":f=F;break;case"defaultValue":w=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(i(137,t));break;default:Fe(e,t,a,F,l,null)}}wh(e,f,w,R,V,g,s,!1);return;case"select":De("invalid",e),a=g=f=null;for(s in l)if(l.hasOwnProperty(s)&&(w=l[s],w!=null))switch(s){case"value":f=w;break;case"defaultValue":g=w;break;case"multiple":a=w;default:Fe(e,t,s,w,l,null)}t=f,l=g,e.multiple=!!a,t!=null?jr(e,!!a,t,!1):l!=null&&jr(e,!!a,l,!0);return;case"textarea":De("invalid",e),f=s=a=null;for(g in l)if(l.hasOwnProperty(g)&&(w=l[g],w!=null))switch(g){case"value":a=w;break;case"defaultValue":s=w;break;case"children":f=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:Fe(e,t,g,w,l,null)}Ch(e,a,s,f);return;case"option":for(R in l)if(l.hasOwnProperty(R)&&(a=l[R],a!=null))switch(R){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Fe(e,t,R,a,l,null)}return;case"dialog":De("beforetoggle",e),De("toggle",e),De("cancel",e),De("close",e);break;case"iframe":case"object":De("load",e);break;case"video":case"audio":for(a=0;a<go.length;a++)De(go[a],e);break;case"image":De("error",e),De("load",e);break;case"details":De("toggle",e);break;case"embed":case"source":case"link":De("error",e),De("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(V in l)if(l.hasOwnProperty(V)&&(a=l[V],a!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:Fe(e,t,V,a,l,null)}return;default:if(ds(t)){for(F in l)l.hasOwnProperty(F)&&(a=l[F],a!==void 0&&Ju(e,t,F,a,l,void 0));return}}for(w in l)l.hasOwnProperty(w)&&(a=l[w],a!=null&&Fe(e,t,w,a,l,null))}function D1(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,f=null,g=null,w=null,R=null,V=null,F=null;for(Q in l){var ee=l[Q];if(l.hasOwnProperty(Q)&&ee!=null)switch(Q){case"checked":break;case"value":break;case"defaultValue":R=ee;default:a.hasOwnProperty(Q)||Fe(e,t,Q,null,a,ee)}}for(var P in a){var Q=a[P];if(ee=l[P],a.hasOwnProperty(P)&&(Q!=null||ee!=null))switch(P){case"type":f=Q;break;case"name":s=Q;break;case"checked":V=Q;break;case"defaultChecked":F=Q;break;case"value":g=Q;break;case"defaultValue":w=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(i(137,t));break;default:Q!==ee&&Fe(e,t,P,Q,a,ee)}}us(e,g,w,R,V,F,f,s);return;case"select":Q=g=w=P=null;for(f in l)if(R=l[f],l.hasOwnProperty(f)&&R!=null)switch(f){case"value":break;case"multiple":Q=R;default:a.hasOwnProperty(f)||Fe(e,t,f,null,a,R)}for(s in a)if(f=a[s],R=l[s],a.hasOwnProperty(s)&&(f!=null||R!=null))switch(s){case"value":P=f;break;case"defaultValue":w=f;break;case"multiple":g=f;default:f!==R&&Fe(e,t,s,f,a,R)}t=w,l=g,a=Q,P!=null?jr(e,!!l,P,!1):!!a!=!!l&&(t!=null?jr(e,!!l,t,!0):jr(e,!!l,l?[]:"",!1));return;case"textarea":Q=P=null;for(w in l)if(s=l[w],l.hasOwnProperty(w)&&s!=null&&!a.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:Fe(e,t,w,null,a,s)}for(g in a)if(s=a[g],f=l[g],a.hasOwnProperty(g)&&(s!=null||f!=null))switch(g){case"value":P=s;break;case"defaultValue":Q=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(i(91));break;default:s!==f&&Fe(e,t,g,s,a,f)}Eh(e,P,Q);return;case"option":for(var de in l)if(P=l[de],l.hasOwnProperty(de)&&P!=null&&!a.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:Fe(e,t,de,null,a,P)}for(R in a)if(P=a[R],Q=l[R],a.hasOwnProperty(R)&&P!==Q&&(P!=null||Q!=null))switch(R){case"selected":e.selected=P&&typeof P!="function"&&typeof P!="symbol";break;default:Fe(e,t,R,P,a,Q)}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 Se in l)P=l[Se],l.hasOwnProperty(Se)&&P!=null&&!a.hasOwnProperty(Se)&&Fe(e,t,Se,null,a,P);for(V in a)if(P=a[V],Q=l[V],a.hasOwnProperty(V)&&P!==Q&&(P!=null||Q!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(i(137,t));break;default:Fe(e,t,V,P,a,Q)}return;default:if(ds(t)){for(var Je in l)P=l[Je],l.hasOwnProperty(Je)&&P!==void 0&&!a.hasOwnProperty(Je)&&Ju(e,t,Je,void 0,a,P);for(F in a)P=a[F],Q=l[F],!a.hasOwnProperty(F)||P===Q||P===void 0&&Q===void 0||Ju(e,t,F,P,a,Q);return}}for(var U in l)P=l[U],l.hasOwnProperty(U)&&P!=null&&!a.hasOwnProperty(U)&&Fe(e,t,U,null,a,P);for(ee in a)P=a[ee],Q=l[ee],!a.hasOwnProperty(ee)||P===Q||P==null&&Q==null||Fe(e,t,ee,P,a,Q)}function Mg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function j1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],f=s.transferSize,g=s.initiatorType,w=s.duration;if(f&&w&&Mg(g)){for(g=0,w=s.responseEnd,a+=1;a<l.length;a++){var R=l[a],V=R.startTime;if(V>w)break;var F=R.transferSize,ee=R.initiatorType;F&&Mg(ee)&&(R=R.responseEnd,g+=F*(R<w?1:(w-V)/(R-V)))}if(--a,t+=8*(f+g)/(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 Wu=null,ef=null;function Yi(e){return e.nodeType===9?e:e.ownerDocument}function _g(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 Rg(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 tf(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 nf=null;function L1(){var e=window.event;return e&&e.type==="popstate"?e===nf?!1:(nf=e,!0):(nf=null,!1)}var Ng=typeof setTimeout=="function"?setTimeout:void 0,k1=typeof clearTimeout=="function"?clearTimeout:void 0,Og=typeof Promise=="function"?Promise:void 0,H1=typeof queueMicrotask=="function"?queueMicrotask:typeof Og<"u"?function(e){return Og.resolve(null).then(e).catch(U1)}:Ng;function U1(e){setTimeout(function(){throw e})}function Ml(e){return e==="head"}function zg(e,t){var l=t,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),da(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")vo(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,vo(l);for(var f=l.firstChild;f;){var g=f.nextSibling,w=f.nodeName;f[La]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&f.rel.toLowerCase()==="stylesheet"||l.removeChild(f),f=g}}else l==="body"&&vo(e.ownerDocument.body);l=s}while(l);da(t)}function Dg(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function lf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":lf(l),cs(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function B1(e,t,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[La])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==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(f=e.getAttribute("src"),(f!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=hn(e.nextSibling),e===null)break}return null}function G1(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=hn(e.nextSibling),e===null))return null;return e}function jg(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=hn(e.nextSibling),e===null))return null;return e}function rf(e){return e.data==="$?"||e.data==="$~"}function af(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Y1(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function hn(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 of=null;function Lg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return hn(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function kg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function Hg(e,t,l){switch(t=Yi(l),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 vo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);cs(e)}var mn=new Map,Ug=new Set;function Vi(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var nl=X.d;X.d={f:V1,r:q1,D:X1,C:I1,L:P1,m:$1,X:Q1,S:K1,M:Z1};function V1(){var e=nl.f(),t=Di();return e||t}function q1(e){var t=Or(e);t!==null&&t.tag===5&&t.type==="form"?tp(t):nl.r(e)}var sa=typeof document>"u"?null:document;function Bg(e,t,l){var a=sa;if(a&&typeof t=="string"&&t){var s=an(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),Ug.has(s)||(Ug.add(s),e={rel:e,crossOrigin:l,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),Rt(t,"link",e),St(t),a.head.appendChild(t)))}}function X1(e){nl.D(e),Bg("dns-prefetch",e,null)}function I1(e,t){nl.C(e,t),Bg("preconnect",e,t)}function P1(e,t,l){nl.L(e,t,l);var a=sa;if(a&&e&&t){var s='link[rel="preload"][as="'+an(t)+'"]';t==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+an(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+an(l.imageSizes)+'"]')):s+='[href="'+an(e)+'"]';var f=s;switch(t){case"style":f=ua(e);break;case"script":f=fa(e)}mn.has(f)||(e=b({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),mn.set(f,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(bo(f))||t==="script"&&a.querySelector(xo(f))||(t=a.createElement("link"),Rt(t,"link",e),St(t),a.head.appendChild(t)))}}function $1(e,t){nl.m(e,t);var l=sa;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+an(a)+'"][href="'+an(e)+'"]',f=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=fa(e)}if(!mn.has(f)&&(e=b({rel:"modulepreload",href:e},t),mn.set(f,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(xo(f)))return}a=l.createElement("link"),Rt(a,"link",e),St(a),l.head.appendChild(a)}}}function K1(e,t,l){nl.S(e,t,l);var a=sa;if(a&&e){var s=zr(a).hoistableStyles,f=ua(e);t=t||"default";var g=s.get(f);if(!g){var w={loading:0,preload:null};if(g=a.querySelector(bo(f)))w.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},l),(l=mn.get(f))&&cf(e,l);var R=g=a.createElement("link");St(R),Rt(R,"link",e),R._p=new Promise(function(V,F){R.onload=V,R.onerror=F}),R.addEventListener("load",function(){w.loading|=1}),R.addEventListener("error",function(){w.loading|=2}),w.loading|=4,qi(g,t,a)}g={type:"stylesheet",instance:g,count:1,state:w},s.set(f,g)}}}function Q1(e,t){nl.X(e,t);var l=sa;if(l&&e){var a=zr(l).hoistableScripts,s=fa(e),f=a.get(s);f||(f=l.querySelector(xo(s)),f||(e=b({src:e,async:!0},t),(t=mn.get(s))&&sf(e,t),f=l.createElement("script"),St(f),Rt(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(s,f))}}function Z1(e,t){nl.M(e,t);var l=sa;if(l&&e){var a=zr(l).hoistableScripts,s=fa(e),f=a.get(s);f||(f=l.querySelector(xo(s)),f||(e=b({src:e,async:!0,type:"module"},t),(t=mn.get(s))&&sf(e,t),f=l.createElement("script"),St(f),Rt(f,"link",e),l.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},a.set(s,f))}}function Gg(e,t,l,a){var s=(s=se.current)?Vi(s):null;if(!s)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=ua(l.href),l=zr(s).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=ua(l.href);var f=zr(s).hoistableStyles,g=f.get(e);if(g||(s=s.ownerDocument||s,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,g),(f=s.querySelector(bo(e)))&&!f._p&&(g.instance=f,g.state.loading=5),mn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},mn.set(e,l),f||F1(s,e,l,g.state))),t&&a===null)throw Error(i(528,""));return g}if(t&&a!==null)throw Error(i(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=fa(l),l=zr(s).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function ua(e){return'href="'+an(e)+'"'}function bo(e){return'link[rel="stylesheet"]['+e+"]"}function Yg(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function F1(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Rt(t,"link",l),St(t),e.head.appendChild(t))}function fa(e){return'[src="'+an(e)+'"]'}function xo(e){return"script[async]"+e}function Vg(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+an(l.href)+'"]');if(a)return t.instance=a,St(a),a;var s=b({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),St(a),Rt(a,"style",s),qi(a,l.precedence,e),t.instance=a;case"stylesheet":s=ua(l.href);var f=e.querySelector(bo(s));if(f)return t.state.loading|=4,t.instance=f,St(f),f;a=Yg(l),(s=mn.get(s))&&cf(a,s),f=(e.ownerDocument||e).createElement("link"),St(f);var g=f;return g._p=new Promise(function(w,R){g.onload=w,g.onerror=R}),Rt(f,"link",a),t.state.loading|=4,qi(f,l.precedence,e),t.instance=f;case"script":return f=fa(l.src),(s=e.querySelector(xo(f)))?(t.instance=s,St(s),s):(a=l,(s=mn.get(f))&&(a=b({},l),sf(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),St(s),Rt(s,"link",a),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&&(a=t.instance,t.state.loading|=4,qi(a,l.precedence,e));return t.instance}function qi(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,f=s,g=0;g<a.length;g++){var w=a[g];if(w.dataset.precedence===t)f=w;else if(f!==s)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function cf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function sf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Xi=null;function qg(e,t,l){if(Xi===null){var a=new Map,s=Xi=new Map;s.set(l,a)}else s=Xi,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var f=l[s];if(!(f[La]||f[Tt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var g=f.getAttribute(t)||"";g=e+g;var w=a.get(g);w?w.push(f):a.set(g,[f])}}return a}function Xg(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function J1(e,t,l){if(l===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 Ig(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function W1(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=ua(a.href),f=t.querySelector(bo(s));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ii.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=f,St(f);return}f=t.ownerDocument||t,a=Yg(a),(s=mn.get(s))&&cf(a,s),f=f.createElement("link"),St(f);var g=f;g._p=new Promise(function(w,R){g.onload=w,g.onerror=R}),Rt(f,"link",a),l.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Ii.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var uf=0;function ew(e,t){return e.stylesheets&&e.count===0&&$i(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&$i(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&uf===0&&(uf=62500*j1());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$i(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>uf?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function Ii(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$i(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Pi=null;function $i(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Pi=new Map,t.forEach(tw,e),Pi=null,Ii.call(e))}function tw(e,t){if(!(t.state.loading&4)){var l=Pi.get(e);if(l)var a=l.get(null);else{l=new Map,Pi.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<s.length;f++){var g=s[f];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(l.set(g.dataset.precedence,g),a=g)}a&&l.set(null,a)}s=t.instance,g=s.getAttribute("data-precedence"),f=l.get(g)||a,f===a&&l.set(null,s),l.set(g,s),this.count++,a=Ii.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),f?f.parentNode.insertBefore(s,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var So={$$typeof:k,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function nw(e,t,l,a,s,f,g,w,R){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=Da(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Da(0),this.hiddenUpdates=Da(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=f,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Pg(e,t,l,a,s,f,g,w,R,V,F,ee){return e=new nw(e,t,l,g,R,V,F,ee,w),t=1,f===!0&&(t|=24),f=Kt(3,null,null,t),e.current=f,f.stateNode=e,t=Vs(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:a,isDehydrated:l,cache:t},Ps(f),e}function $g(e){return e?(e=Vr,e):Vr}function Kg(e,t,l,a,s,f){s=$g(s),a.context===null?a.context=s:a.pendingContext=s,a=gl(t),a.payload={element:l},f=f===void 0?null:f,f!==null&&(a.callback=f),l=yl(e,a,t),l!==null&&(It(l,e,t),Ja(l,e,t))}function Qg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function ff(e,t){Qg(e,t),(e=e.alternate)&&Qg(e,t)}function Zg(e){if(e.tag===13||e.tag===31){var t=er(e,67108864);t!==null&&It(t,e,67108864),ff(e,67108864)}}function Fg(e){if(e.tag===13||e.tag===31){var t=Wt();t=as(t);var l=er(e,t);l!==null&&It(l,e,t),ff(e,t)}}var Ki=!0;function lw(e,t,l,a){var s=O.T;O.T=null;var f=X.p;try{X.p=2,df(e,t,l,a)}finally{X.p=f,O.T=s}}function rw(e,t,l,a){var s=O.T;O.T=null;var f=X.p;try{X.p=8,df(e,t,l,a)}finally{X.p=f,O.T=s}}function df(e,t,l,a){if(Ki){var s=hf(a);if(s===null)Fu(e,t,a,Qi,l),Wg(e,a);else if(ow(s,e,t,l,a))a.stopPropagation();else if(Wg(e,a),t&4&&-1<aw.indexOf(e)){for(;s!==null;){var f=Or(s);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var g=Ut(f.pendingLanes);if(g!==0){var w=f;for(w.pendingLanes|=2,w.entangledLanes|=2;g;){var R=1<<31-it(g);w.entanglements[1]|=R,g&=~R}Nn(f),(Xe&6)===0&&(Oi=Et()+500,po(0))}}break;case 31:case 13:w=er(f,2),w!==null&&It(w,f,2),Di(),ff(f,2)}if(f=hf(a),f===null&&Fu(e,t,a,Qi,l),f===s)break;s=f}s!==null&&a.stopPropagation()}else Fu(e,t,a,null,l)}}function hf(e){return e=ms(e),mf(e)}var Qi=null;function mf(e){if(Qi=null,e=Nr(e),e!==null){var t=u(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=d(t),e!==null)return e;e=null}else if(l===31){if(e=h(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Qi=e,null}function Jg(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(Hn()){case ue:return 2;case Ce:return 8;case ye:case je:return 32;case $e:return 268435456;default:return 32}default:return 32}}var pf=!1,_l=null,Rl=null,Nl=null,wo=new Map,Eo=new Map,Ol=[],aw="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 Wg(e,t){switch(e){case"focusin":case"focusout":_l=null;break;case"dragenter":case"dragleave":Rl=null;break;case"mouseover":case"mouseout":Nl=null;break;case"pointerover":case"pointerout":wo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Eo.delete(t.pointerId)}}function Co(e,t,l,a,s,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:f,targetContainers:[s]},t!==null&&(t=Or(t),t!==null&&Zg(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function ow(e,t,l,a,s){switch(t){case"focusin":return _l=Co(_l,e,t,l,a,s),!0;case"dragenter":return Rl=Co(Rl,e,t,l,a,s),!0;case"mouseover":return Nl=Co(Nl,e,t,l,a,s),!0;case"pointerover":var f=s.pointerId;return wo.set(f,Co(wo.get(f)||null,e,t,l,a,s)),!0;case"gotpointercapture":return f=s.pointerId,Eo.set(f,Co(Eo.get(f)||null,e,t,l,a,s)),!0}return!1}function ey(e){var t=Nr(e.target);if(t!==null){var l=u(t);if(l!==null){if(t=l.tag,t===13){if(t=d(l),t!==null){e.blockedOn=t,mh(e.priority,function(){Fg(l)});return}}else if(t===31){if(t=h(l),t!==null){e.blockedOn=t,mh(e.priority,function(){Fg(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Zi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=hf(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);hs=a,l.target.dispatchEvent(a),hs=null}else return t=Or(l),t!==null&&Zg(t),e.blockedOn=l,!1;t.shift()}return!0}function ty(e,t,l){Zi(e)&&l.delete(t)}function iw(){pf=!1,_l!==null&&Zi(_l)&&(_l=null),Rl!==null&&Zi(Rl)&&(Rl=null),Nl!==null&&Zi(Nl)&&(Nl=null),wo.forEach(ty),Eo.forEach(ty)}function Fi(e,t){e.blockedOn===t&&(e.blockedOn=null,pf||(pf=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,iw)))}var Ji=null;function ny(e){Ji!==e&&(Ji=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Ji===e&&(Ji=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(mf(a||l)===null)continue;break}var f=Or(l);f!==null&&(e.splice(t,3),t-=3,du(f,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function da(e){function t(R){return Fi(R,e)}_l!==null&&Fi(_l,e),Rl!==null&&Fi(Rl,e),Nl!==null&&Fi(Nl,e),wo.forEach(t),Eo.forEach(t);for(var l=0;l<Ol.length;l++){var a=Ol[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ol.length&&(l=Ol[0],l.blockedOn===null);)ey(l),l.blockedOn===null&&Ol.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],f=l[a+1],g=s[Bt]||null;if(typeof f=="function")g||ny(l);else if(g){var w=null;if(f&&f.hasAttribute("formAction")){if(s=f,g=f[Bt]||null)w=g.formAction;else if(mf(s)!==null)continue}else w=g.action;typeof w=="function"?l[a+1]=w:(l.splice(a,3),a-=3),ny(l)}}}function ly(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(g){return s=g})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function gf(e){this._internalRoot=e}Wi.prototype.render=gf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var l=t.current,a=Wt();Kg(l,a,e,t,null,null)},Wi.prototype.unmount=gf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Kg(e.current,2,null,e,null,null),Di(),t[Rr]=null}};function Wi(e){this._internalRoot=e}Wi.prototype.unstable_scheduleHydration=function(e){if(e){var t=hh();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Ol.length&&t!==0&&t<Ol[l].priority;l++);Ol.splice(l,0,e),l===0&&ey(e)}};var ry=r.version;if(ry!=="19.2.5")throw Error(i(527,ry,"19.2.5"));X.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=p(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var cw={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:O,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ec=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ec.isDisabled&&ec.supportsFiber)try{gt=ec.inject(cw),at=ec}catch{}}return Ao.createRoot=function(e,t){if(!c(e))throw Error(i(299));var l=!1,a="",s=fp,f=dp,g=hp;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=Pg(e,1,!1,null,null,l,a,null,s,f,g,ly),e[Rr]=t.current,Zu(e),new gf(t)},Ao.hydrateRoot=function(e,t,l){if(!c(e))throw Error(i(299));var a=!1,s="",f=fp,g=dp,w=hp,R=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(f=l.onUncaughtError),l.onCaughtError!==void 0&&(g=l.onCaughtError),l.onRecoverableError!==void 0&&(w=l.onRecoverableError),l.formState!==void 0&&(R=l.formState)),t=Pg(e,1,!0,t,l??null,a,s,R,f,g,w,ly),t.context=$g(null),l=t.current,a=Wt(),a=as(a),s=gl(a),s.callback=null,yl(l,s,a),l=a,t.current.lanes=l,ja(t,l),Nn(t),e[Rr]=t.current,Zu(e),new Wi(t)},Ao.version="19.2.5",Ao}var my;function vw(){if(my)return bf.exports;my=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(r){console.error(r)}}return n(),bf.exports=yw(),bf.exports}var bw=vw();const xw=Ed(bw),Ae="data-editor-id",yr="data-slide-root",vr=1920,br=1080;function Td(n){return`[${Ae}="${n}"]`}function Sw(n){return n.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"slide"}function Lv(n,r){return`${r}-${n+1}`}function py(n,r){const o=Number.parseInt(n||"",10);return Number.isFinite(o)&&o>0?o:r}function ww(n){return Sw(n)}function wc(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function kv(n){const r=n.querySelector(`[${yr}]`);if(r)return r.getAttribute("data-slide-width")||r.setAttribute("data-slide-width",String(vr)),r.getAttribute("data-slide-height")||r.setAttribute("data-slide-height",String(br)),r;const o=n.querySelector(".slide-container");return o?(o.setAttribute(yr,"true"),o.getAttribute("data-slide-width")||o.setAttribute("data-slide-width",String(vr)),o.getAttribute("data-slide-height")||o.setAttribute("data-slide-height",String(br)),o):null}function Ew(n){return`<!DOCTYPE html>
|
|
50
|
+
${n.documentElement.outerHTML}`}function Cw(n){const r=wc(n);if(!r)return n;const o=kv(r),i=Array.from(r.querySelectorAll("[data-editable]"));return o&&!o.getAttribute(Ae)&&o.setAttribute(Ae,"slide-root"),i.forEach((c,u)=>{if(!c.getAttribute(Ae)){const d=c.getAttribute("data-editable")||"block";c.setAttribute(Ae,Lv(u,d))}}),Ew(r)}function kl(n,r="slide-1"){var C;if(!wc(n))return{id:r,title:"Untitled Slide",htmlSource:n,rootSelector:`[${yr}]`,width:vr,height:br,elements:[]};const i=Cw(n),c=wc(i);if(!c)return{id:r,title:"Untitled Slide",htmlSource:i,rootSelector:`[${yr}]`,width:vr,height:br,elements:[]};const u=kv(c),d=Array.from(c.querySelectorAll("[data-editable]")),h=u!=null&&u.getAttribute(Ae)?`[${Ae}="${u.getAttribute(Ae)}"]`:`[${yr}]`,m=py((u==null?void 0:u.getAttribute("data-slide-width"))??null,vr),p=py((u==null?void 0:u.getAttribute("data-slide-height"))??null,br),v=d.map((T,E)=>{const A=T.getAttribute("data-editable")||"block",N=T.getAttribute(Ae)||Lv(E,A);return{id:N,selector:Td(N),type:A==="block"&&T.getAttribute("data-group")==="true"?"group":A,content:T instanceof HTMLImageElement?T.src:T.textContent||"",tagName:T.tagName.toLowerCase()}}),b=c.querySelector("h1, h2, title"),S=((C=b==null?void 0:b.textContent)==null?void 0:C.trim())||`Slide ${r}`;return{id:ww(r),title:S,htmlSource:i,rootSelector:h,width:m,height:p,elements:v}}function We(n,r){return n.querySelector(Td(r))}function Tw(n,r,o){const i=wc(n.htmlSource);if(!i)return"";const c=We(i,r);return(c==null?void 0:c.style.getPropertyValue(o).trim())||""}function ql(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function Ad(n){return`<!DOCTYPE html>
|
|
51
|
+
${n.documentElement.outerHTML}`}function Ta(n,r){const o=ql(n);return o?(r(o),Ad(o)):n}const Md=["position","left","top","width","height","transform","transformOrigin","margin","zIndex"];function Hv(){return{position:null,left:null,top:null,width:null,height:null,transform:null,transformOrigin:null,margin:null,zIndex:null}}function zo(n){const r=Hv();for(const o of Md){const i=n.style[o];r[o]=i||null}return r}function $f(n){return{...Hv(),...n}}function En(n){const r=n||"",o=r.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/i),i=r.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 Ef(n){return Math.round(n*100)/100}function al(n,r,o){const i=[];return(Math.abs(n)>.01||Math.abs(r)>.01)&&i.push(`translate(${Ef(n)}px, ${Ef(r)}px)`),Math.abs(o)>.01&&i.push(`rotate(${Ef(o)}deg)`),i.length?i.join(" "):null}function Oo(n,r,o){return{x:o.offsetX+(n.left-r.left)*o.scale,y:o.offsetY+(n.top-r.top)*o.scale,width:n.width*o.scale,height:n.height*o.scale}}function hr(n,r){return{...r,sourceFile:n.sourceFile}}function Uv(n,r){if(n.id!==r.slideId)return n;switch(r.type){case"operation.batch":return r.operations.reduce((o,i)=>Uv(o,i),n);case"text.update":return hr(n,kl(Mw(n.htmlSource,r.elementId,r.nextText),n.id));case"style.update":return hr(n,kl(_w(n.htmlSource,r.elementId,r.propertyName,r.nextValue),n.id));case"attribute.update":return hr(n,kl(Rw(n.htmlSource,r.elementId,r.attributeName,r.nextValue),n.id));case"element.layout.update":return hr(n,kl(Ow(n.htmlSource,r.elementId,r.nextStyle),n.id));case"element.insert":return hr(n,kl(zw(n.htmlSource,r),n.id));case"element.remove":return hr(n,kl(Dw(n.htmlSource,r.elementId),n.id));case"group.create":case"group.ungroup":return hr(n,kl(r.nextHtmlSource,n.id))}}function Bv(n){switch(n.type){case"operation.batch":return{type:"operation.batch",slideId:n.slideId,operations:n.operations.map(r=>Bv(r)).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}}}function tc(n){const r=Number.parseFloat(n||"");return Number.isFinite(r)?r:0}function Aw(n){const r=En(n.style.transform);return{x:tc(n.style.left)+r.translateX,y:tc(n.style.top)+r.translateY,width:tc(n.style.width)||vr,height:tc(n.style.height)||br}}function Ec(n,r={}){let o=n,i=0,c=0,u=0,d=0;for(;o;){const h=o.getAttribute(Ae)??"",m=r[h]??Aw(o);i+=m.x,c+=m.y,u=m.width,d=m.height;const p=o.parentElement;if(!p||!p.hasAttribute("data-editable"))break;o=p}return{x:i,y:c,width:u,height:d}}function Gv(n,r={}){const o=n.parentElement;if(!o||!o.hasAttribute("data-editable"))return{x:0,y:0};const i=Ec(o,r);return{x:i.x,y:i.y}}function Kf(n,r){n.style.position=n.style.position||"absolute",n.style.left=`${Math.round(r.x*100)/100}px`,n.style.top=`${Math.round(r.y*100)/100}px`,n.style.width=`${Math.round(r.width*100)/100}px`,n.style.height=`${Math.round(r.height*100)/100}px`;const o=En(n.style.transform),i=al(0,0,o.rotate);i?n.style.transform=i:n.style.removeProperty("transform")}function Cf(n){const r=n.parentElement;return r&&(r.hasAttribute(yr)||r.hasAttribute("data-editable"))?r:null}function Qf(n){return Array.from(n.children).filter(r=>r instanceof HTMLElement&&r.hasAttribute("data-editable"))}function Mw(n,r,o){return Ta(n,i=>{const c=We(i,r);c&&(c.textContent=o)})}function _w(n,r,o,i){return Ta(n,c=>{var d;const u=We(c,r);u&&(i.trim().length===0?u.style.removeProperty(o):u.style.setProperty(o,i),(d=u.getAttribute("style"))!=null&&d.trim()||u.removeAttribute("style"))})}function Rw(n,r,o,i){return Ta(n,c=>{const u=We(c,r);u&&(i.trim().length===0?u.removeAttribute(o):u.setAttribute(o,i))})}function Nw(n,r){var o;for(const i of Md){const c=r[i];if(c===null){n.style[i]="";continue}n.style[i]=c}(o=n.getAttribute("style"))!=null&&o.trim()||n.removeAttribute("style")}function Ow(n,r,o){return Ta(n,i=>{const c=We(i,r);c&&Nw(c,o)})}function Cc(n,r){const o=ql(n);if(!o)return null;const i=We(o,r);if(!i||!(i.parentElement instanceof HTMLElement))return null;const c=i.previousElementSibling instanceof HTMLElement?i.previousElementSibling.getAttribute(Ae):null,u=i.nextElementSibling instanceof HTMLElement?i.nextElementSibling.getAttribute(Ae):null;return{parentElementId:i.parentElement.getAttribute(Ae),previousSiblingElementId:c,nextSiblingElementId:u}}function Tc(n,r){var i;const o=ql(n);return o?((i=We(o,r))==null?void 0:i.outerHTML)??null:null}function Yv(n,r){var u;const o=ql(`<template>${n}</template>`),i=(u=o==null?void 0:o.querySelector("template"))==null?void 0:u.content.firstElementChild;if(!(i instanceof HTMLElement))return n;const c=[i,...Array.from(i.querySelectorAll(`[${Ae}]`))];for(const d of c){const h=d.getAttribute(Ae);h&&r[h]&&d.setAttribute(Ae,r[h])}return i.outerHTML}function Zf(n,r){const o=ql(n);if(!o)return r;const i=new Set(Array.from(o.querySelectorAll(`[${Ae}]`)).map(h=>h.getAttribute(Ae)).filter(h=>!!h));if(!i.has(r))return r;const c=r.match(/^(.*?)(?:-(\d+))?$/),u=(c==null?void 0:c[1])||r;let d=Number.parseInt((c==null?void 0:c[2])||"1",10)+1;for(;i.has(`${u}-${d}`);)d+=1;return`${u}-${d}`}function zw(n,r){return Ta(n,o=>{var m;if(We(o,r.elementId))return;const i=ql(`<template>${r.html}</template>`),c=(m=i==null?void 0:i.querySelector("template"))==null?void 0:m.content.firstElementChild;if(!(c instanceof HTMLElement))return;const u=(r.parentElementId?We(o,r.parentElementId):null)??o.querySelector(`[${yr}]`)??o.body,d=r.nextSiblingElementId?We(o,r.nextSiblingElementId):null,h=r.previousSiblingElementId?We(o,r.previousSiblingElementId):null;(d==null?void 0:d.parentElement)===u?u.insertBefore(o.importNode(c,!0),d):(h==null?void 0:h.parentElement)===u?h.after(o.importNode(c,!0)):u.appendChild(o.importNode(c,!0))})}function Dw(n,r){return Ta(n,o=>{var i;(i=We(o,r))==null||i.remove()})}function jw({html:n,slideId:r,groupElementId:o,elementIds:i,elementRects:c={},timestamp:u=Date.now()}){const d=ql(n);if(!d||!i.length)return null;const h=i.map(D=>We(d,D)).filter(D=>!!D);if(h.length!==i.length)return null;const p=h.flatMap(D=>D.getAttribute("data-group")==="true"?Qf(D):[D]).filter((D,_,j)=>j.findIndex(H=>H===D)===_);if(p.length<2)return null;const v=Cf(h[0]);if(!v||h.some(D=>Cf(D)!==v)||We(d,o))return null;const b=h.filter(D=>D.getAttribute("data-group")==="true"),S=p.map(D=>Ec(D,c)),C=Math.min(...S.map(D=>D.x)),T=Math.min(...S.map(D=>D.y)),E=Math.max(...S.map(D=>D.x+D.width)),A=Math.max(...S.map(D=>D.y+D.height)),N=Gv(h[0],c),z=d.createElement("div");z.setAttribute("data-editable","block"),z.setAttribute("data-group","true"),z.setAttribute(Ae,o),Kf(z,{x:C-N.x,y:T-N.y,width:E-C,height:A-T});const k=Array.from(v.children).flatMap(D=>D instanceof HTMLElement?b.includes(D)?Qf(D).filter(_=>p.includes(_)):p.includes(D)?[D]:[]:[]),q=h.find(D=>Cf(D)===v)??null;(q==null?void 0:q.parentElement)===v?v.insertBefore(z,q):v.appendChild(z);for(const D of k){const _=Ec(D,c);Kf(D,{x:_.x-C,y:_.y-T,width:_.width,height:_.height}),z.appendChild(D)}for(const D of b)D.children.length||D.remove();const Z=Ad(d);return Z===n?null:{type:"group.create",slideId:r,groupElementId:o,elementIds:k.map(D=>D.getAttribute(Ae)).filter(D=>!!D),previousHtmlSource:n,nextHtmlSource:Z,timestamp:u}}function Lw({html:n,slideId:r,groupElementId:o,timestamp:i=Date.now()}){const c=ql(n);if(!c)return null;const u=We(c,o);if(!u||u.getAttribute("data-group")!=="true"||!u.parentElement)return null;const d=u.parentElement,h=Gv(u),m=Qf(u);if(!m.length)return null;const p=m.map(b=>b.getAttribute(Ae)).filter(b=>!!b);for(const b of m){const S=Ec(b);Kf(b,{x:S.x-h.x,y:S.y-h.y,width:S.width,height:S.height}),d.insertBefore(b,u)}u.remove();const v=Ad(c);return v===n?null:{type:"group.ungroup",slideId:r,groupElementId:o,childElementIds:p,previousHtmlSource:n,nextHtmlSource:v,timestamp:i}}function Tf(n,r){return n.map(o=>Uv(o,r))}function Vv(n){return{slides:n,undoStack:[],redoStack:[]}}function nc(n,r){switch(r.type){case"history.reset":return Vv(r.slides);case"history.commit":return{slides:Tf(n.slides,r.operation),undoStack:[...n.undoStack,r.operation],redoStack:[]};case"history.undo":{const o=n.undoStack[n.undoStack.length-1];return o?{slides:Tf(n.slides,Bv(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:Tf(n.slides,o),undoStack:[...n.undoStack,o],redoStack:n.redoStack.slice(0,-1)}:n}}}async function kw({manifestUrl:n,fetchImpl:r,requestInit:o,slideIdPrefix:i="generated-slide-"}){var b;const c=r??globalThis.fetch;if(!c)throw new Error("loadSlidesFromManifest requires a fetch implementation.");const u={cache:"no-store",...o},d=await c(n,u);if(!d.ok)return null;const h=await d.json();if(!((b=h.slides)!=null&&b.length))return null;const m=d.url||n,p=new URL(m),v=await Promise.all(h.slides.map(async(S,C)=>{const T=new URL(S.file,m);for(const[z,k]of p.searchParams)T.searchParams.has(z)||T.searchParams.set(z,k);const E=await c(T.toString(),u);if(!E.ok)throw new Error(`Failed to load slide HTML: ${S.file}`);const A=await E.text(),N=kl(A,`${i}${C+1}`);return{...N,sourceFile:S.file,title:S.title||N.title}}));return{manifest:h,slides:v}}function qv(n){var r,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(r=0;r<c;r++)n[r]&&(o=qv(n[r]))&&(i&&(i+=" "),i+=o)}else for(o in n)n[o]&&(i&&(i+=" "),i+=o);return i}function Xv(){for(var n,r,o=0,i="",c=arguments.length;o<c;o++)(n=arguments[o])&&(r=qv(n))&&(i&&(i+=" "),i+=r);return i}const gy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,yy=Xv,Hw=(n,r)=>o=>{var i;if((r==null?void 0:r.variants)==null)return yy(n,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:c,defaultVariants:u}=r,d=Object.keys(c).map(p=>{const v=o==null?void 0:o[p],b=u==null?void 0:u[p];if(v===null)return null;const S=gy(v)||gy(b);return c[p][S]}),h=o&&Object.entries(o).reduce((p,v)=>{let[b,S]=v;return S===void 0||(p[b]=S),p},{}),m=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((p,v)=>{let{class:b,className:S,...C}=v;return Object.entries(C).every(T=>{let[E,A]=T;return Array.isArray(A)?A.includes({...u,...h}[E]):{...u,...h}[E]===A})?[...p,b,S]:p},[]);return yy(n,d,m,o==null?void 0:o.class,o==null?void 0:o.className)};var Ho=jv();const Uw=Ed(Ho);function vy(n,r){if(typeof n=="function")return n(r);n!=null&&(n.current=r)}function _d(...n){return r=>{let o=!1;const i=n.map(c=>{const u=vy(c,r);return!o&&typeof u=="function"&&(o=!0),u});if(o)return()=>{for(let c=0;c<i.length;c++){const u=i[c];typeof u=="function"?u():vy(n[c],null)}}}}function qe(...n){return y.useCallback(_d(...n),n)}function xa(n){const r=Gw(n),o=y.forwardRef((i,c)=>{const{children:u,...d}=i,h=y.Children.toArray(u),m=h.find(Vw);if(m){const p=m.props.children,v=h.map(b=>b===m?y.Children.count(p)>1?y.Children.only(null):y.isValidElement(p)?p.props.children:null:b);return x.jsx(r,{...d,ref:c,children:y.isValidElement(p)?y.cloneElement(p,void 0,v):null})}return x.jsx(r,{...d,ref:c,children:u})});return o.displayName=`${n}.Slot`,o}var Bw=xa("Slot");function Gw(n){const r=y.forwardRef((o,i)=>{const{children:c,...u}=o;if(y.isValidElement(c)){const d=Xw(c),h=qw(u,c.props);return c.type!==y.Fragment&&(h.ref=i?_d(i,d):d),y.cloneElement(c,h)}return y.Children.count(c)>1?y.Children.only(null):null});return r.displayName=`${n}.SlotClone`,r}var Iv=Symbol("radix.slottable");function Yw(n){const r=({children:o})=>x.jsx(x.Fragment,{children:o});return r.displayName=`${n}.Slottable`,r.__radixId=Iv,r}function Vw(n){return y.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Iv}function qw(n,r){const o={...r};for(const i in r){const c=n[i],u=r[i];/^on[A-Z]/.test(i)?c&&u?o[i]=(...h)=>{const m=u(...h);return c(...h),m}:c&&(o[i]=c):i==="style"?o[i]={...c,...u}:i==="className"&&(o[i]=[c,u].filter(Boolean).join(" "))}return{...n,...o}}function Xw(n){var i,c;let r=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var Iw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=Iw.reduce((n,r)=>{const o=xa(`Primitive.${r}`),i=y.forwardRef((c,u)=>{const{asChild:d,...h}=c,m=d?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(m,{...h,ref:u})});return i.displayName=`Primitive.${r}`,{...n,[r]:i}},{});function Pv(n,r){n&&Ho.flushSync(()=>n.dispatchEvent(r))}var $v=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"}),Pw="VisuallyHidden",Kv=y.forwardRef((n,r)=>x.jsx(He.span,{...n,ref:r,style:{...$v,...n.style}}));Kv.displayName=Pw;var $w=Kv;function Xl(n,r=[]){let o=[];function i(u,d){const h=y.createContext(d),m=o.length;o=[...o,d];const p=b=>{var N;const{scope:S,children:C,...T}=b,E=((N=S==null?void 0:S[n])==null?void 0:N[m])||h,A=y.useMemo(()=>T,Object.values(T));return x.jsx(E.Provider,{value:A,children:C})};p.displayName=u+"Provider";function v(b,S){var E;const C=((E=S==null?void 0:S[n])==null?void 0:E[m])||h,T=y.useContext(C);if(T)return T;if(d!==void 0)return d;throw new Error(`\`${b}\` must be used within \`${u}\``)}return[p,v]}const c=()=>{const u=o.map(d=>y.createContext(d));return function(h){const m=(h==null?void 0:h[n])||u;return y.useMemo(()=>({[`__scope${n}`]:{...h,[n]:m}}),[h,m])}};return c.scopeName=n,[i,Kw(c,...r)]}function Kw(...n){const r=n[0];if(n.length===1)return r;const o=()=>{const i=n.map(c=>({useScope:c(),scopeName:c.scopeName}));return function(u){const d=i.reduce((h,{useScope:m,scopeName:p})=>{const b=m(u)[`__scope${p}`];return{...h,...b}},{});return y.useMemo(()=>({[`__scope${r.scopeName}`]:d}),[d])}};return o.scopeName=r.scopeName,o}function Rd(n){const r=n+"CollectionProvider",[o,i]=Xl(r),[c,u]=o(r,{collectionRef:{current:null},itemMap:new Map}),d=E=>{const{scope:A,children:N}=E,z=rl.useRef(null),k=rl.useRef(new Map).current;return x.jsx(c,{scope:A,itemMap:k,collectionRef:z,children:N})};d.displayName=r;const h=n+"CollectionSlot",m=xa(h),p=rl.forwardRef((E,A)=>{const{scope:N,children:z}=E,k=u(h,N),q=qe(A,k.collectionRef);return x.jsx(m,{ref:q,children:z})});p.displayName=h;const v=n+"CollectionItemSlot",b="data-radix-collection-item",S=xa(v),C=rl.forwardRef((E,A)=>{const{scope:N,children:z,...k}=E,q=rl.useRef(null),Z=qe(A,q),D=u(v,N);return rl.useEffect(()=>(D.itemMap.set(q,{ref:q,...k}),()=>void D.itemMap.delete(q))),x.jsx(S,{[b]:"",ref:Z,children:z})});C.displayName=v;function T(E){const A=u(n+"CollectionConsumer",E);return rl.useCallback(()=>{const z=A.collectionRef.current;if(!z)return[];const k=Array.from(z.querySelectorAll(`[${b}]`));return Array.from(A.itemMap.values()).sort((D,_)=>k.indexOf(D.ref.current)-k.indexOf(_.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:d,Slot:p,ItemSlot:C},T,i]}function he(n,r,{checkForDefaultPrevented:o=!0}={}){return function(c){if(n==null||n(c),o===!1||!c.defaultPrevented)return r==null?void 0:r(c)}}var Nt=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},Qw=Dv[" useInsertionEffect ".trim().toString()]||Nt;function Ac({prop:n,defaultProp:r,onChange:o=()=>{},caller:i}){const[c,u,d]=Zw({defaultProp:r,onChange:o}),h=n!==void 0,m=h?n:c;{const v=y.useRef(n!==void 0);y.useEffect(()=>{const b=v.current;b!==h&&console.warn(`${i} is changing from ${b?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=h},[h,i])}const p=y.useCallback(v=>{var b;if(h){const S=Fw(v)?v(n):v;S!==n&&((b=d.current)==null||b.call(d,S))}else u(v)},[h,n,u,d]);return[m,p]}function Zw({defaultProp:n,onChange:r}){const[o,i]=y.useState(n),c=y.useRef(o),u=y.useRef(r);return Qw(()=>{u.current=r},[r]),y.useEffect(()=>{var d;c.current!==o&&((d=u.current)==null||d.call(u,o),c.current=o)},[o,c]),[o,i,u]}function Fw(n){return typeof n=="function"}function Jw(n,r){return y.useReducer((o,i)=>r[o][i]??o,n)}var jn=n=>{const{present:r,children:o}=n,i=Ww(r),c=typeof o=="function"?o({present:i.isPresent}):y.Children.only(o),u=qe(i.ref,eE(c));return typeof o=="function"||i.isPresent?y.cloneElement(c,{ref:u}):null};jn.displayName="Presence";function Ww(n){const[r,o]=y.useState(),i=y.useRef(null),c=y.useRef(n),u=y.useRef("none"),d=n?"mounted":"unmounted",[h,m]=Jw(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const p=lc(i.current);u.current=h==="mounted"?p:"none"},[h]),Nt(()=>{const p=i.current,v=c.current;if(v!==n){const S=u.current,C=lc(p);n?m("MOUNT"):C==="none"||(p==null?void 0:p.display)==="none"?m("UNMOUNT"):m(v&&S!==C?"ANIMATION_OUT":"UNMOUNT"),c.current=n}},[n,m]),Nt(()=>{if(r){let p;const v=r.ownerDocument.defaultView??window,b=C=>{const E=lc(i.current).includes(CSS.escape(C.animationName));if(C.target===r&&E&&(m("ANIMATION_END"),!c.current)){const A=r.style.animationFillMode;r.style.animationFillMode="forwards",p=v.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=A)})}},S=C=>{C.target===r&&(u.current=lc(i.current))};return r.addEventListener("animationstart",S),r.addEventListener("animationcancel",b),r.addEventListener("animationend",b),()=>{v.clearTimeout(p),r.removeEventListener("animationstart",S),r.removeEventListener("animationcancel",b),r.removeEventListener("animationend",b)}}else m("ANIMATION_END")},[r,m]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:y.useCallback(p=>{i.current=p?getComputedStyle(p):null,o(p)},[])}}function lc(n){return(n==null?void 0:n.animationName)||"none"}function eE(n){var i,c;let r=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?n.ref:(r=(c=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:c.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var tE=Dv[" useId ".trim().toString()]||(()=>{}),nE=0;function Sa(n){const[r,o]=y.useState(tE());return Nt(()=>{o(i=>i??String(nE++))},[n]),n||(r?`radix-${r}`:"")}var lE=y.createContext(void 0);function Yc(n){const r=y.useContext(lE);return n||r||"ltr"}function bt(n){const r=y.useRef(n);return y.useEffect(()=>{r.current=n}),y.useMemo(()=>(...o)=>{var i;return(i=r.current)==null?void 0:i.call(r,...o)},[])}function rE(n,r=globalThis==null?void 0:globalThis.document){const o=bt(n);y.useEffect(()=>{const i=c=>{c.key==="Escape"&&o(c)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[o,r])}var aE="DismissableLayer",Ff="dismissableLayer.update",oE="dismissableLayer.pointerDownOutside",iE="dismissableLayer.focusOutside",by,Qv=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vc=y.forwardRef((n,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,onDismiss:h,...m}=n,p=y.useContext(Qv),[v,b]=y.useState(null),S=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=y.useState({}),T=qe(r,_=>b(_)),E=Array.from(p.layers),[A]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),N=E.indexOf(A),z=v?E.indexOf(v):-1,k=p.layersWithOutsidePointerEventsDisabled.size>0,q=z>=N,Z=uE(_=>{const j=_.target,H=[...p.branches].some(I=>I.contains(j));!q||H||(c==null||c(_),d==null||d(_),_.defaultPrevented||h==null||h())},S),D=fE(_=>{const j=_.target;[...p.branches].some(I=>I.contains(j))||(u==null||u(_),d==null||d(_),_.defaultPrevented||h==null||h())},S);return rE(_=>{z===p.layers.size-1&&(i==null||i(_),!_.defaultPrevented&&h&&(_.preventDefault(),h()))},S),y.useEffect(()=>{if(v)return o&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(by=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(v)),p.layers.add(v),xy(),()=>{o&&p.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=by)}},[v,S,o,p]),y.useEffect(()=>()=>{v&&(p.layers.delete(v),p.layersWithOutsidePointerEventsDisabled.delete(v),xy())},[v,p]),y.useEffect(()=>{const _=()=>C({});return document.addEventListener(Ff,_),()=>document.removeEventListener(Ff,_)},[]),x.jsx(He.div,{...m,ref:T,style:{pointerEvents:k?q?"auto":"none":void 0,...n.style},onFocusCapture:he(n.onFocusCapture,D.onFocusCapture),onBlurCapture:he(n.onBlurCapture,D.onBlurCapture),onPointerDownCapture:he(n.onPointerDownCapture,Z.onPointerDownCapture)})});Vc.displayName=aE;var cE="DismissableLayerBranch",sE=y.forwardRef((n,r)=>{const o=y.useContext(Qv),i=y.useRef(null),c=qe(r,i);return y.useEffect(()=>{const u=i.current;if(u)return o.branches.add(u),()=>{o.branches.delete(u)}},[o.branches]),x.jsx(He.div,{...n,ref:c})});sE.displayName=cE;function uE(n,r=globalThis==null?void 0:globalThis.document){const o=bt(n),i=y.useRef(!1),c=y.useRef(()=>{});return y.useEffect(()=>{const u=h=>{if(h.target&&!i.current){let m=function(){Zv(oE,o,p,{discrete:!0})};const p={originalEvent:h};h.pointerType==="touch"?(r.removeEventListener("click",c.current),c.current=m,r.addEventListener("click",c.current,{once:!0})):m()}else r.removeEventListener("click",c.current);i.current=!1},d=window.setTimeout(()=>{r.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),r.removeEventListener("pointerdown",u),r.removeEventListener("click",c.current)}},[r,o]),{onPointerDownCapture:()=>i.current=!0}}function fE(n,r=globalThis==null?void 0:globalThis.document){const o=bt(n),i=y.useRef(!1);return y.useEffect(()=>{const c=u=>{u.target&&!i.current&&Zv(iE,o,{originalEvent:u},{discrete:!1})};return r.addEventListener("focusin",c),()=>r.removeEventListener("focusin",c)},[r,o]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function xy(){const n=new CustomEvent(Ff);document.dispatchEvent(n)}function Zv(n,r,o,{discrete:i}){const c=o.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});r&&c.addEventListener(n,r,{once:!0}),i?Pv(c,u):c.dispatchEvent(u)}var Af="focusScope.autoFocusOnMount",Mf="focusScope.autoFocusOnUnmount",Sy={bubbles:!1,cancelable:!0},dE="FocusScope",Nd=y.forwardRef((n,r)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:c,onUnmountAutoFocus:u,...d}=n,[h,m]=y.useState(null),p=bt(c),v=bt(u),b=y.useRef(null),S=qe(r,E=>m(E)),C=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(i){let E=function(k){if(C.paused||!h)return;const q=k.target;h.contains(q)?b.current=q:Hl(b.current,{select:!0})},A=function(k){if(C.paused||!h)return;const q=k.relatedTarget;q!==null&&(h.contains(q)||Hl(b.current,{select:!0}))},N=function(k){if(document.activeElement===document.body)for(const Z of k)Z.removedNodes.length>0&&Hl(h)};document.addEventListener("focusin",E),document.addEventListener("focusout",A);const z=new MutationObserver(N);return h&&z.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",A),z.disconnect()}}},[i,h,C.paused]),y.useEffect(()=>{if(h){Ey.add(C);const E=document.activeElement;if(!h.contains(E)){const N=new CustomEvent(Af,Sy);h.addEventListener(Af,p),h.dispatchEvent(N),N.defaultPrevented||(hE(vE(Fv(h)),{select:!0}),document.activeElement===E&&Hl(h))}return()=>{h.removeEventListener(Af,p),setTimeout(()=>{const N=new CustomEvent(Mf,Sy);h.addEventListener(Mf,v),h.dispatchEvent(N),N.defaultPrevented||Hl(E??document.body,{select:!0}),h.removeEventListener(Mf,v),Ey.remove(C)},0)}}},[h,p,v,C]);const T=y.useCallback(E=>{if(!o&&!i||C.paused)return;const A=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,N=document.activeElement;if(A&&N){const z=E.currentTarget,[k,q]=mE(z);k&&q?!E.shiftKey&&N===q?(E.preventDefault(),o&&Hl(k,{select:!0})):E.shiftKey&&N===k&&(E.preventDefault(),o&&Hl(q,{select:!0})):N===z&&E.preventDefault()}},[o,i,C.paused]);return x.jsx(He.div,{tabIndex:-1,...d,ref:S,onKeyDown:T})});Nd.displayName=dE;function hE(n,{select:r=!1}={}){const o=document.activeElement;for(const i of n)if(Hl(i,{select:r}),document.activeElement!==o)return}function mE(n){const r=Fv(n),o=wy(r,n),i=wy(r.reverse(),n);return[o,i]}function Fv(n){const r=[],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();)r.push(o.currentNode);return r}function wy(n,r){for(const o of n)if(!pE(o,{upTo:r}))return o}function pE(n,{upTo:r}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(r!==void 0&&n===r)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function gE(n){return n instanceof HTMLInputElement&&"select"in n}function Hl(n,{select:r=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&gE(n)&&r&&n.select()}}var Ey=yE();function yE(){let n=[];return{add(r){const o=n[0];r!==o&&(o==null||o.pause()),n=Cy(n,r),n.unshift(r)},remove(r){var o;n=Cy(n,r),(o=n[0])==null||o.resume()}}}function Cy(n,r){const o=[...n],i=o.indexOf(r);return i!==-1&&o.splice(i,1),o}function vE(n){return n.filter(r=>r.tagName!=="A")}var bE="Portal",Od=y.forwardRef((n,r)=>{var h;const{container:o,...i}=n,[c,u]=y.useState(!1);Nt(()=>u(!0),[]);const d=o||c&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return d?Uw.createPortal(x.jsx(He.div,{...i,ref:r}),d):null});Od.displayName=bE;var _f=0;function Jv(){y.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Ty()),document.body.insertAdjacentElement("beforeend",n[1]??Ty()),_f++,()=>{_f===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),_f--}},[])}function Ty(){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 On=function(){return On=Object.assign||function(r){for(var o,i=1,c=arguments.length;i<c;i++){o=arguments[i];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(r[u]=o[u])}return r},On.apply(this,arguments)};function Wv(n,r){var o={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&r.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++)r.indexOf(i[c])<0&&Object.prototype.propertyIsEnumerable.call(n,i[c])&&(o[i[c]]=n[i[c]]);return o}function xE(n,r,o){if(o||arguments.length===2)for(var i=0,c=r.length,u;i<c;i++)(u||!(i in r))&&(u||(u=Array.prototype.slice.call(r,0,i)),u[i]=r[i]);return n.concat(u||Array.prototype.slice.call(r))}var yc="right-scroll-bar-position",vc="width-before-scroll-bar",SE="with-scroll-bars-hidden",wE="--removed-body-scroll-bar-size";function Rf(n,r){return typeof n=="function"?n(r):n&&(n.current=r),n}function EE(n,r){var o=y.useState(function(){return{value:n,callback:r,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=r,o.facade}var CE=typeof window<"u"?y.useLayoutEffect:y.useEffect,Ay=new WeakMap;function TE(n,r){var o=EE(null,function(i){return n.forEach(function(c){return Rf(c,i)})});return CE(function(){var i=Ay.get(o);if(i){var c=new Set(i),u=new Set(n),d=o.current;c.forEach(function(h){u.has(h)||Rf(h,null)}),u.forEach(function(h){c.has(h)||Rf(h,d)})}Ay.set(o,n)},[n]),o}function AE(n){return n}function ME(n,r){r===void 0&&(r=AE);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(u){var d=r(u,i);return o.push(d),function(){o=o.filter(function(h){return h!==d})}},assignSyncMedium:function(u){for(i=!0;o.length;){var d=o;o=[],d.forEach(u)}o={push:function(h){return u(h)},filter:function(){return o}}},assignMedium:function(u){i=!0;var d=[];if(o.length){var h=o;o=[],h.forEach(u),d=o}var m=function(){var v=d;d=[],v.forEach(u)},p=function(){return Promise.resolve().then(m)};p(),o={push:function(v){d.push(v),p()},filter:function(v){return d=d.filter(v),o}}}};return c}function _E(n){n===void 0&&(n={});var r=ME(null);return r.options=On({async:!0,ssr:!1},n),r}var eb=function(n){var r=n.sideCar,o=Wv(n,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return y.createElement(i,On({},o))};eb.isSideCarExport=!0;function RE(n,r){return n.useMedium(r),eb}var tb=_E(),Nf=function(){},qc=y.forwardRef(function(n,r){var o=y.useRef(null),i=y.useState({onScrollCapture:Nf,onWheelCapture:Nf,onTouchMoveCapture:Nf}),c=i[0],u=i[1],d=n.forwardProps,h=n.children,m=n.className,p=n.removeScrollBar,v=n.enabled,b=n.shards,S=n.sideCar,C=n.noRelative,T=n.noIsolation,E=n.inert,A=n.allowPinchZoom,N=n.as,z=N===void 0?"div":N,k=n.gapMode,q=Wv(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),Z=S,D=TE([o,r]),_=On(On({},q),c);return y.createElement(y.Fragment,null,v&&y.createElement(Z,{sideCar:tb,removeScrollBar:p,shards:b,noRelative:C,noIsolation:T,inert:E,setCallbacks:u,allowPinchZoom:!!A,lockRef:o,gapMode:k}),d?y.cloneElement(y.Children.only(h),On(On({},_),{ref:D})):y.createElement(z,On({},_,{className:m,ref:D}),h))});qc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qc.classNames={fullWidth:vc,zeroRight:yc};var NE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function OE(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var r=NE();return r&&n.setAttribute("nonce",r),n}function zE(n,r){n.styleSheet?n.styleSheet.cssText=r:n.appendChild(document.createTextNode(r))}function DE(n){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(n)}var jE=function(){var n=0,r=null;return{add:function(o){n==0&&(r=OE())&&(zE(r,o),DE(r)),n++},remove:function(){n--,!n&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},LE=function(){var n=jE();return function(r,o){y.useEffect(function(){return n.add(r),function(){n.remove()}},[r&&o])}},nb=function(){var n=LE(),r=function(o){var i=o.styles,c=o.dynamic;return n(i,c),null};return r},kE={left:0,top:0,right:0,gap:0},Of=function(n){return parseInt(n||"",10)||0},HE=function(n){var r=window.getComputedStyle(document.body),o=r[n==="padding"?"paddingLeft":"marginLeft"],i=r[n==="padding"?"paddingTop":"marginTop"],c=r[n==="padding"?"paddingRight":"marginRight"];return[Of(o),Of(i),Of(c)]},UE=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return kE;var r=HE(n),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-o+r[2]-r[0])}},BE=nb(),va="data-scroll-locked",GE=function(n,r,o,i){var c=n.left,u=n.top,d=n.right,h=n.gap;return o===void 0&&(o="margin"),`
|
|
52
|
+
.`.concat(SE,` {
|
|
53
|
+
overflow: hidden `).concat(i,`;
|
|
54
|
+
padding-right: `).concat(h,"px ").concat(i,`;
|
|
55
|
+
}
|
|
56
|
+
body[`).concat(va,`] {
|
|
57
|
+
overflow: hidden `).concat(i,`;
|
|
58
|
+
overscroll-behavior: contain;
|
|
59
|
+
`).concat([r&&"position: relative ".concat(i,";"),o==="margin"&&`
|
|
60
|
+
padding-left: `.concat(c,`px;
|
|
61
|
+
padding-top: `).concat(u,`px;
|
|
62
|
+
padding-right: `).concat(d,`px;
|
|
63
|
+
margin-left:0;
|
|
64
|
+
margin-top:0;
|
|
65
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
66
|
+
`),o==="padding"&&"padding-right: ".concat(h,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.`).concat(yc,` {
|
|
70
|
+
right: `).concat(h,"px ").concat(i,`;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.`).concat(vc,` {
|
|
74
|
+
margin-right: `).concat(h,"px ").concat(i,`;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.`).concat(yc," .").concat(yc,` {
|
|
78
|
+
right: 0 `).concat(i,`;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.`).concat(vc," .").concat(vc,` {
|
|
82
|
+
margin-right: 0 `).concat(i,`;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
body[`).concat(va,`] {
|
|
86
|
+
`).concat(wE,": ").concat(h,`px;
|
|
87
|
+
}
|
|
88
|
+
`)},My=function(){var n=parseInt(document.body.getAttribute(va)||"0",10);return isFinite(n)?n:0},YE=function(){y.useEffect(function(){return document.body.setAttribute(va,(My()+1).toString()),function(){var n=My()-1;n<=0?document.body.removeAttribute(va):document.body.setAttribute(va,n.toString())}},[])},VE=function(n){var r=n.noRelative,o=n.noImportant,i=n.gapMode,c=i===void 0?"margin":i;YE();var u=y.useMemo(function(){return UE(c)},[c]);return y.createElement(BE,{styles:GE(u,!r,c,o?"":"!important")})},Jf=!1;if(typeof window<"u")try{var rc=Object.defineProperty({},"passive",{get:function(){return Jf=!0,!0}});window.addEventListener("test",rc,rc),window.removeEventListener("test",rc,rc)}catch{Jf=!1}var ha=Jf?{passive:!1}:!1,qE=function(n){return n.tagName==="TEXTAREA"},lb=function(n,r){if(!(n instanceof Element))return!1;var o=window.getComputedStyle(n);return o[r]!=="hidden"&&!(o.overflowY===o.overflowX&&!qE(n)&&o[r]==="visible")},XE=function(n){return lb(n,"overflowY")},IE=function(n){return lb(n,"overflowX")},_y=function(n,r){var o=r.ownerDocument,i=r;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var c=rb(n,i);if(c){var u=ab(n,i),d=u[1],h=u[2];if(d>h)return!0}i=i.parentNode}while(i&&i!==o.body);return!1},PE=function(n){var r=n.scrollTop,o=n.scrollHeight,i=n.clientHeight;return[r,o,i]},$E=function(n){var r=n.scrollLeft,o=n.scrollWidth,i=n.clientWidth;return[r,o,i]},rb=function(n,r){return n==="v"?XE(r):IE(r)},ab=function(n,r){return n==="v"?PE(r):$E(r)},KE=function(n,r){return n==="h"&&r==="rtl"?-1:1},QE=function(n,r,o,i,c){var u=KE(n,window.getComputedStyle(r).direction),d=u*i,h=o.target,m=r.contains(h),p=!1,v=d>0,b=0,S=0;do{if(!h)break;var C=ab(n,h),T=C[0],E=C[1],A=C[2],N=E-A-u*T;(T||N)&&rb(n,h)&&(b+=N,S+=T);var z=h.parentNode;h=z&&z.nodeType===Node.DOCUMENT_FRAGMENT_NODE?z.host:z}while(!m&&h!==document.body||m&&(r.contains(h)||r===h));return(v&&Math.abs(b)<1||!v&&Math.abs(S)<1)&&(p=!0),p},ac=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Ry=function(n){return[n.deltaX,n.deltaY]},Ny=function(n){return n&&"current"in n?n.current:n},ZE=function(n,r){return n[0]===r[0]&&n[1]===r[1]},FE=function(n){return`
|
|
89
|
+
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
90
|
+
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
91
|
+
`)},JE=0,ma=[];function WE(n){var r=y.useRef([]),o=y.useRef([0,0]),i=y.useRef(),c=y.useState(JE++)[0],u=y.useState(nb)[0],d=y.useRef(n);y.useEffect(function(){d.current=n},[n]),y.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(c));var E=xE([n.lockRef.current],(n.shards||[]).map(Ny),!0).filter(Boolean);return E.forEach(function(A){return A.classList.add("allow-interactivity-".concat(c))}),function(){document.body.classList.remove("block-interactivity-".concat(c)),E.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(c))})}}},[n.inert,n.lockRef.current,n.shards]);var h=y.useCallback(function(E,A){if("touches"in E&&E.touches.length===2||E.type==="wheel"&&E.ctrlKey)return!d.current.allowPinchZoom;var N=ac(E),z=o.current,k="deltaX"in E?E.deltaX:z[0]-N[0],q="deltaY"in E?E.deltaY:z[1]-N[1],Z,D=E.target,_=Math.abs(k)>Math.abs(q)?"h":"v";if("touches"in E&&_==="h"&&D.type==="range")return!1;var j=window.getSelection(),H=j&&j.anchorNode,I=H?H===D||H.contains(D):!1;if(I)return!1;var J=_y(_,D);if(!J)return!0;if(J?Z=_:(Z=_==="v"?"h":"v",J=_y(_,D)),!J)return!1;if(!i.current&&"changedTouches"in E&&(k||q)&&(i.current=Z),!Z)return!0;var le=i.current||Z;return QE(le,A,E,le==="h"?k:q)},[]),m=y.useCallback(function(E){var A=E;if(!(!ma.length||ma[ma.length-1]!==u)){var N="deltaY"in A?Ry(A):ac(A),z=r.current.filter(function(Z){return Z.name===A.type&&(Z.target===A.target||A.target===Z.shadowParent)&&ZE(Z.delta,N)})[0];if(z&&z.should){A.cancelable&&A.preventDefault();return}if(!z){var k=(d.current.shards||[]).map(Ny).filter(Boolean).filter(function(Z){return Z.contains(A.target)}),q=k.length>0?h(A,k[0]):!d.current.noIsolation;q&&A.cancelable&&A.preventDefault()}}},[]),p=y.useCallback(function(E,A,N,z){var k={name:E,delta:A,target:N,should:z,shadowParent:e2(N)};r.current.push(k),setTimeout(function(){r.current=r.current.filter(function(q){return q!==k})},1)},[]),v=y.useCallback(function(E){o.current=ac(E),i.current=void 0},[]),b=y.useCallback(function(E){p(E.type,Ry(E),E.target,h(E,n.lockRef.current))},[]),S=y.useCallback(function(E){p(E.type,ac(E),E.target,h(E,n.lockRef.current))},[]);y.useEffect(function(){return ma.push(u),n.setCallbacks({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:S}),document.addEventListener("wheel",m,ha),document.addEventListener("touchmove",m,ha),document.addEventListener("touchstart",v,ha),function(){ma=ma.filter(function(E){return E!==u}),document.removeEventListener("wheel",m,ha),document.removeEventListener("touchmove",m,ha),document.removeEventListener("touchstart",v,ha)}},[]);var C=n.removeScrollBar,T=n.inert;return y.createElement(y.Fragment,null,T?y.createElement(u,{styles:FE(c)}):null,C?y.createElement(VE,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function e2(n){for(var r=null;n!==null;)n instanceof ShadowRoot&&(r=n.host,n=n.host),n=n.parentNode;return r}const t2=RE(tb,WE);var zd=y.forwardRef(function(n,r){return y.createElement(qc,On({},n,{ref:r,sideCar:t2}))});zd.classNames=qc.classNames;var n2=function(n){if(typeof document>"u")return null;var r=Array.isArray(n)?n[0]:n;return r.ownerDocument.body},pa=new WeakMap,oc=new WeakMap,ic={},zf=0,ob=function(n){return n&&(n.host||ob(n.parentNode))},l2=function(n,r){return r.map(function(o){if(n.contains(o))return o;var i=ob(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})},r2=function(n,r,o,i){var c=l2(r,Array.isArray(n)?n:[n]);ic[o]||(ic[o]=new WeakMap);var u=ic[o],d=[],h=new Set,m=new Set(c),p=function(b){!b||h.has(b)||(h.add(b),p(b.parentNode))};c.forEach(p);var v=function(b){!b||m.has(b)||Array.prototype.forEach.call(b.children,function(S){if(h.has(S))v(S);else try{var C=S.getAttribute(i),T=C!==null&&C!=="false",E=(pa.get(S)||0)+1,A=(u.get(S)||0)+1;pa.set(S,E),u.set(S,A),d.push(S),E===1&&T&&oc.set(S,!0),A===1&&S.setAttribute(o,"true"),T||S.setAttribute(i,"true")}catch(N){console.error("aria-hidden: cannot operate on ",S,N)}})};return v(r),h.clear(),zf++,function(){d.forEach(function(b){var S=pa.get(b)-1,C=u.get(b)-1;pa.set(b,S),u.set(b,C),S||(oc.has(b)||b.removeAttribute(i),oc.delete(b)),C||b.removeAttribute(o)}),zf--,zf||(pa=new WeakMap,pa=new WeakMap,oc=new WeakMap,ic={})}},ib=function(n,r,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),c=n2(n);return c?(i.push.apply(i,Array.from(c.querySelectorAll("[aria-live], script"))),r2(i,c,o,"aria-hidden")):function(){return null}};function a2(n){const r=y.useRef({value:n,previous:n});return y.useMemo(()=>(r.current.value!==n&&(r.current.previous=r.current.value,r.current.value=n),r.current.previous),[n])}function o2(n){const[r,o]=y.useState(void 0);return Nt(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(c=>{if(!Array.isArray(c)||!c.length)return;const u=c[0];let d,h;if("borderBoxSize"in u){const m=u.borderBoxSize,p=Array.isArray(m)?m[0]:m;d=p.inlineSize,h=p.blockSize}else d=n.offsetWidth,h=n.offsetHeight;o({width:d,height:h})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else o(void 0)},[n]),r}const i2=["top","right","bottom","left"],Yl=Math.min,tn=Math.max,Mc=Math.round,cc=Math.floor,Dn=n=>({x:n,y:n}),c2={left:"right",right:"left",bottom:"top",top:"bottom"};function Wf(n,r,o){return tn(n,Yl(r,o))}function ol(n,r){return typeof n=="function"?n(r):n}function il(n){return n.split("-")[0]}function Aa(n){return n.split("-")[1]}function Dd(n){return n==="x"?"y":"x"}function jd(n){return n==="y"?"height":"width"}function zn(n){const r=n[0];return r==="t"||r==="b"?"y":"x"}function Ld(n){return Dd(zn(n))}function s2(n,r,o){o===void 0&&(o=!1);const i=Aa(n),c=Ld(n),u=jd(c);let d=c==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[u]>r.floating[u]&&(d=_c(d)),[d,_c(d)]}function u2(n){const r=_c(n);return[ed(n),r,ed(r)]}function ed(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Oy=["left","right"],zy=["right","left"],f2=["top","bottom"],d2=["bottom","top"];function h2(n,r,o){switch(n){case"top":case"bottom":return o?r?zy:Oy:r?Oy:zy;case"left":case"right":return r?f2:d2;default:return[]}}function m2(n,r,o,i){const c=Aa(n);let u=h2(il(n),o==="start",i);return c&&(u=u.map(d=>d+"-"+c),r&&(u=u.concat(u.map(ed)))),u}function _c(n){const r=il(n);return c2[r]+n.slice(r.length)}function p2(n){return{top:0,right:0,bottom:0,left:0,...n}}function cb(n){return typeof n!="number"?p2(n):{top:n,right:n,bottom:n,left:n}}function Rc(n){const{x:r,y:o,width:i,height:c}=n;return{width:i,height:c,top:o,left:r,right:r+i,bottom:o+c,x:r,y:o}}function Dy(n,r,o){let{reference:i,floating:c}=n;const u=zn(r),d=Ld(r),h=jd(d),m=il(r),p=u==="y",v=i.x+i.width/2-c.width/2,b=i.y+i.height/2-c.height/2,S=i[h]/2-c[h]/2;let C;switch(m){case"top":C={x:v,y:i.y-c.height};break;case"bottom":C={x:v,y:i.y+i.height};break;case"right":C={x:i.x+i.width,y:b};break;case"left":C={x:i.x-c.width,y:b};break;default:C={x:i.x,y:i.y}}switch(Aa(r)){case"start":C[d]-=S*(o&&p?-1:1);break;case"end":C[d]+=S*(o&&p?-1:1);break}return C}async function g2(n,r){var o;r===void 0&&(r={});const{x:i,y:c,platform:u,rects:d,elements:h,strategy:m}=n,{boundary:p="clippingAncestors",rootBoundary:v="viewport",elementContext:b="floating",altBoundary:S=!1,padding:C=0}=ol(r,n),T=cb(C),A=h[S?b==="floating"?"reference":"floating":b],N=Rc(await u.getClippingRect({element:(o=await(u.isElement==null?void 0:u.isElement(A)))==null||o?A:A.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(h.floating)),boundary:p,rootBoundary:v,strategy:m})),z=b==="floating"?{x:i,y:c,width:d.floating.width,height:d.floating.height}:d.reference,k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h.floating)),q=await(u.isElement==null?void 0:u.isElement(k))?await(u.getScale==null?void 0:u.getScale(k))||{x:1,y:1}:{x:1,y:1},Z=Rc(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:h,rect:z,offsetParent:k,strategy:m}):z);return{top:(N.top-Z.top+T.top)/q.y,bottom:(Z.bottom-N.bottom+T.bottom)/q.y,left:(N.left-Z.left+T.left)/q.x,right:(Z.right-N.right+T.right)/q.x}}const y2=50,v2=async(n,r,o)=>{const{placement:i="bottom",strategy:c="absolute",middleware:u=[],platform:d}=o,h=d.detectOverflow?d:{...d,detectOverflow:g2},m=await(d.isRTL==null?void 0:d.isRTL(r));let p=await d.getElementRects({reference:n,floating:r,strategy:c}),{x:v,y:b}=Dy(p,i,m),S=i,C=0;const T={};for(let E=0;E<u.length;E++){const A=u[E];if(!A)continue;const{name:N,fn:z}=A,{x:k,y:q,data:Z,reset:D}=await z({x:v,y:b,initialPlacement:i,placement:S,strategy:c,middlewareData:T,rects:p,platform:h,elements:{reference:n,floating:r}});v=k??v,b=q??b,T[N]={...T[N],...Z},D&&C<y2&&(C++,typeof D=="object"&&(D.placement&&(S=D.placement),D.rects&&(p=D.rects===!0?await d.getElementRects({reference:n,floating:r,strategy:c}):D.rects),{x:v,y:b}=Dy(p,S,m)),E=-1)}return{x:v,y:b,placement:S,strategy:c,middlewareData:T}},b2=n=>({name:"arrow",options:n,async fn(r){const{x:o,y:i,placement:c,rects:u,platform:d,elements:h,middlewareData:m}=r,{element:p,padding:v=0}=ol(n,r)||{};if(p==null)return{};const b=cb(v),S={x:o,y:i},C=Ld(c),T=jd(C),E=await d.getDimensions(p),A=C==="y",N=A?"top":"left",z=A?"bottom":"right",k=A?"clientHeight":"clientWidth",q=u.reference[T]+u.reference[C]-S[C]-u.floating[T],Z=S[C]-u.reference[C],D=await(d.getOffsetParent==null?void 0:d.getOffsetParent(p));let _=D?D[k]:0;(!_||!await(d.isElement==null?void 0:d.isElement(D)))&&(_=h.floating[k]||u.floating[T]);const j=q/2-Z/2,H=_/2-E[T]/2-1,I=Yl(b[N],H),J=Yl(b[z],H),le=I,re=_-E[T]-J,te=_/2-E[T]/2+j,ae=Wf(le,te,re),O=!m.arrow&&Aa(c)!=null&&te!==ae&&u.reference[T]/2-(te<le?I:J)-E[T]/2<0,X=O?te<le?te-le:te-re:0;return{[C]:S[C]+X,data:{[C]:ae,centerOffset:te-ae-X,...O&&{alignmentOffset:X}},reset:O}}}),x2=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(r){var o,i;const{placement:c,middlewareData:u,rects:d,initialPlacement:h,platform:m,elements:p}=r,{mainAxis:v=!0,crossAxis:b=!0,fallbackPlacements:S,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:E=!0,...A}=ol(n,r);if((o=u.arrow)!=null&&o.alignmentOffset)return{};const N=il(c),z=zn(h),k=il(h)===h,q=await(m.isRTL==null?void 0:m.isRTL(p.floating)),Z=S||(k||!E?[_c(h)]:u2(h)),D=T!=="none";!S&&D&&Z.push(...m2(h,E,T,q));const _=[h,...Z],j=await m.detectOverflow(r,A),H=[];let I=((i=u.flip)==null?void 0:i.overflows)||[];if(v&&H.push(j[N]),b){const te=s2(c,d,q);H.push(j[te[0]],j[te[1]])}if(I=[...I,{placement:c,overflows:H}],!H.every(te=>te<=0)){var J,le;const te=(((J=u.flip)==null?void 0:J.index)||0)+1,ae=_[te];if(ae&&(!(b==="alignment"?z!==zn(ae):!1)||I.every(G=>zn(G.placement)===z?G.overflows[0]>0:!0)))return{data:{index:te,overflows:I},reset:{placement:ae}};let O=(le=I.filter(X=>X.overflows[0]<=0).sort((X,G)=>X.overflows[1]-G.overflows[1])[0])==null?void 0:le.placement;if(!O)switch(C){case"bestFit":{var re;const X=(re=I.filter(G=>{if(D){const $=zn(G.placement);return $===z||$==="y"}return!0}).map(G=>[G.placement,G.overflows.filter($=>$>0).reduce(($,K)=>$+K,0)]).sort((G,$)=>G[1]-$[1])[0])==null?void 0:re[0];X&&(O=X);break}case"initialPlacement":O=h;break}if(c!==O)return{reset:{placement:O}}}return{}}}};function jy(n,r){return{top:n.top-r.height,right:n.right-r.width,bottom:n.bottom-r.height,left:n.left-r.width}}function Ly(n){return i2.some(r=>n[r]>=0)}const S2=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(r){const{rects:o,platform:i}=r,{strategy:c="referenceHidden",...u}=ol(n,r);switch(c){case"referenceHidden":{const d=await i.detectOverflow(r,{...u,elementContext:"reference"}),h=jy(d,o.reference);return{data:{referenceHiddenOffsets:h,referenceHidden:Ly(h)}}}case"escaped":{const d=await i.detectOverflow(r,{...u,altBoundary:!0}),h=jy(d,o.floating);return{data:{escapedOffsets:h,escaped:Ly(h)}}}default:return{}}}}},sb=new Set(["left","top"]);async function w2(n,r){const{placement:o,platform:i,elements:c}=n,u=await(i.isRTL==null?void 0:i.isRTL(c.floating)),d=il(o),h=Aa(o),m=zn(o)==="y",p=sb.has(d)?-1:1,v=u&&m?-1:1,b=ol(r,n);let{mainAxis:S,crossAxis:C,alignmentAxis:T}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return h&&typeof T=="number"&&(C=h==="end"?T*-1:T),m?{x:C*v,y:S*p}:{x:S*p,y:C*v}}const E2=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(r){var o,i;const{x:c,y:u,placement:d,middlewareData:h}=r,m=await w2(r,n);return d===((o=h.offset)==null?void 0:o.placement)&&(i=h.arrow)!=null&&i.alignmentOffset?{}:{x:c+m.x,y:u+m.y,data:{...m,placement:d}}}}},C2=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(r){const{x:o,y:i,placement:c,platform:u}=r,{mainAxis:d=!0,crossAxis:h=!1,limiter:m={fn:N=>{let{x:z,y:k}=N;return{x:z,y:k}}},...p}=ol(n,r),v={x:o,y:i},b=await u.detectOverflow(r,p),S=zn(il(c)),C=Dd(S);let T=v[C],E=v[S];if(d){const N=C==="y"?"top":"left",z=C==="y"?"bottom":"right",k=T+b[N],q=T-b[z];T=Wf(k,T,q)}if(h){const N=S==="y"?"top":"left",z=S==="y"?"bottom":"right",k=E+b[N],q=E-b[z];E=Wf(k,E,q)}const A=m.fn({...r,[C]:T,[S]:E});return{...A,data:{x:A.x-o,y:A.y-i,enabled:{[C]:d,[S]:h}}}}}},T2=function(n){return n===void 0&&(n={}),{options:n,fn(r){const{x:o,y:i,placement:c,rects:u,middlewareData:d}=r,{offset:h=0,mainAxis:m=!0,crossAxis:p=!0}=ol(n,r),v={x:o,y:i},b=zn(c),S=Dd(b);let C=v[S],T=v[b];const E=ol(h,r),A=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(m){const k=S==="y"?"height":"width",q=u.reference[S]-u.floating[k]+A.mainAxis,Z=u.reference[S]+u.reference[k]-A.mainAxis;C<q?C=q:C>Z&&(C=Z)}if(p){var N,z;const k=S==="y"?"width":"height",q=sb.has(il(c)),Z=u.reference[b]-u.floating[k]+(q&&((N=d.offset)==null?void 0:N[b])||0)+(q?0:A.crossAxis),D=u.reference[b]+u.reference[k]+(q?0:((z=d.offset)==null?void 0:z[b])||0)-(q?A.crossAxis:0);T<Z?T=Z:T>D&&(T=D)}return{[S]:C,[b]:T}}}},A2=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(r){var o,i;const{placement:c,rects:u,platform:d,elements:h}=r,{apply:m=()=>{},...p}=ol(n,r),v=await d.detectOverflow(r,p),b=il(c),S=Aa(c),C=zn(c)==="y",{width:T,height:E}=u.floating;let A,N;b==="top"||b==="bottom"?(A=b,N=S===(await(d.isRTL==null?void 0:d.isRTL(h.floating))?"start":"end")?"left":"right"):(N=b,A=S==="end"?"top":"bottom");const z=E-v.top-v.bottom,k=T-v.left-v.right,q=Yl(E-v[A],z),Z=Yl(T-v[N],k),D=!r.middlewareData.shift;let _=q,j=Z;if((o=r.middlewareData.shift)!=null&&o.enabled.x&&(j=k),(i=r.middlewareData.shift)!=null&&i.enabled.y&&(_=z),D&&!S){const I=tn(v.left,0),J=tn(v.right,0),le=tn(v.top,0),re=tn(v.bottom,0);C?j=T-2*(I!==0||J!==0?I+J:tn(v.left,v.right)):_=E-2*(le!==0||re!==0?le+re:tn(v.top,v.bottom))}await m({...r,availableWidth:j,availableHeight:_});const H=await d.getDimensions(h.floating);return T!==H.width||E!==H.height?{reset:{rects:!0}}:{}}}};function Xc(){return typeof window<"u"}function Ma(n){return ub(n)?(n.nodeName||"").toLowerCase():"#document"}function nn(n){var r;return(n==null||(r=n.ownerDocument)==null?void 0:r.defaultView)||window}function Ln(n){var r;return(r=(ub(n)?n.ownerDocument:n.document)||window.document)==null?void 0:r.documentElement}function ub(n){return Xc()?n instanceof Node||n instanceof nn(n).Node:!1}function Cn(n){return Xc()?n instanceof Element||n instanceof nn(n).Element:!1}function cl(n){return Xc()?n instanceof HTMLElement||n instanceof nn(n).HTMLElement:!1}function ky(n){return!Xc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof nn(n).ShadowRoot}function Uo(n){const{overflow:r,overflowX:o,overflowY:i,display:c}=Tn(n);return/auto|scroll|overlay|hidden|clip/.test(r+i+o)&&c!=="inline"&&c!=="contents"}function M2(n){return/^(table|td|th)$/.test(Ma(n))}function Ic(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const _2=/transform|translate|scale|rotate|perspective|filter/,R2=/paint|layout|strict|content/,mr=n=>!!n&&n!=="none";let Df;function kd(n){const r=Cn(n)?Tn(n):n;return mr(r.transform)||mr(r.translate)||mr(r.scale)||mr(r.rotate)||mr(r.perspective)||!Hd()&&(mr(r.backdropFilter)||mr(r.filter))||_2.test(r.willChange||"")||R2.test(r.contain||"")}function N2(n){let r=Vl(n);for(;cl(r)&&!wa(r);){if(kd(r))return r;if(Ic(r))return null;r=Vl(r)}return null}function Hd(){return Df==null&&(Df=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Df}function wa(n){return/^(html|body|#document)$/.test(Ma(n))}function Tn(n){return nn(n).getComputedStyle(n)}function Pc(n){return Cn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Vl(n){if(Ma(n)==="html")return n;const r=n.assignedSlot||n.parentNode||ky(n)&&n.host||Ln(n);return ky(r)?r.host:r}function fb(n){const r=Vl(n);return wa(r)?n.ownerDocument?n.ownerDocument.body:n.body:cl(r)&&Uo(r)?r:fb(r)}function Do(n,r,o){var i;r===void 0&&(r=[]),o===void 0&&(o=!0);const c=fb(n),u=c===((i=n.ownerDocument)==null?void 0:i.body),d=nn(c);if(u){const h=td(d);return r.concat(d,d.visualViewport||[],Uo(c)?c:[],h&&o?Do(h):[])}else return r.concat(c,Do(c,[],o))}function td(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function db(n){const r=Tn(n);let o=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const c=cl(n),u=c?n.offsetWidth:o,d=c?n.offsetHeight:i,h=Mc(o)!==u||Mc(i)!==d;return h&&(o=u,i=d),{width:o,height:i,$:h}}function Ud(n){return Cn(n)?n:n.contextElement}function ba(n){const r=Ud(n);if(!cl(r))return Dn(1);const o=r.getBoundingClientRect(),{width:i,height:c,$:u}=db(r);let d=(u?Mc(o.width):o.width)/i,h=(u?Mc(o.height):o.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!h||!Number.isFinite(h))&&(h=1),{x:d,y:h}}const O2=Dn(0);function hb(n){const r=nn(n);return!Hd()||!r.visualViewport?O2:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function z2(n,r,o){return r===void 0&&(r=!1),!o||r&&o!==nn(n)?!1:r}function xr(n,r,o,i){r===void 0&&(r=!1),o===void 0&&(o=!1);const c=n.getBoundingClientRect(),u=Ud(n);let d=Dn(1);r&&(i?Cn(i)&&(d=ba(i)):d=ba(n));const h=z2(u,o,i)?hb(u):Dn(0);let m=(c.left+h.x)/d.x,p=(c.top+h.y)/d.y,v=c.width/d.x,b=c.height/d.y;if(u){const S=nn(u),C=i&&Cn(i)?nn(i):i;let T=S,E=td(T);for(;E&&i&&C!==T;){const A=ba(E),N=E.getBoundingClientRect(),z=Tn(E),k=N.left+(E.clientLeft+parseFloat(z.paddingLeft))*A.x,q=N.top+(E.clientTop+parseFloat(z.paddingTop))*A.y;m*=A.x,p*=A.y,v*=A.x,b*=A.y,m+=k,p+=q,T=nn(E),E=td(T)}}return Rc({width:v,height:b,x:m,y:p})}function $c(n,r){const o=Pc(n).scrollLeft;return r?r.left+o:xr(Ln(n)).left+o}function mb(n,r){const o=n.getBoundingClientRect(),i=o.left+r.scrollLeft-$c(n,o),c=o.top+r.scrollTop;return{x:i,y:c}}function D2(n){let{elements:r,rect:o,offsetParent:i,strategy:c}=n;const u=c==="fixed",d=Ln(i),h=r?Ic(r.floating):!1;if(i===d||h&&u)return o;let m={scrollLeft:0,scrollTop:0},p=Dn(1);const v=Dn(0),b=cl(i);if((b||!b&&!u)&&((Ma(i)!=="body"||Uo(d))&&(m=Pc(i)),b)){const C=xr(i);p=ba(i),v.x=C.x+i.clientLeft,v.y=C.y+i.clientTop}const S=d&&!b&&!u?mb(d,m):Dn(0);return{width:o.width*p.x,height:o.height*p.y,x:o.x*p.x-m.scrollLeft*p.x+v.x+S.x,y:o.y*p.y-m.scrollTop*p.y+v.y+S.y}}function j2(n){return Array.from(n.getClientRects())}function L2(n){const r=Ln(n),o=Pc(n),i=n.ownerDocument.body,c=tn(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),u=tn(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let d=-o.scrollLeft+$c(n);const h=-o.scrollTop;return Tn(i).direction==="rtl"&&(d+=tn(r.clientWidth,i.clientWidth)-c),{width:c,height:u,x:d,y:h}}const Hy=25;function k2(n,r){const o=nn(n),i=Ln(n),c=o.visualViewport;let u=i.clientWidth,d=i.clientHeight,h=0,m=0;if(c){u=c.width,d=c.height;const v=Hd();(!v||v&&r==="fixed")&&(h=c.offsetLeft,m=c.offsetTop)}const p=$c(i);if(p<=0){const v=i.ownerDocument,b=v.body,S=getComputedStyle(b),C=v.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,T=Math.abs(i.clientWidth-b.clientWidth-C);T<=Hy&&(u-=T)}else p<=Hy&&(u+=p);return{width:u,height:d,x:h,y:m}}function H2(n,r){const o=xr(n,!0,r==="fixed"),i=o.top+n.clientTop,c=o.left+n.clientLeft,u=cl(n)?ba(n):Dn(1),d=n.clientWidth*u.x,h=n.clientHeight*u.y,m=c*u.x,p=i*u.y;return{width:d,height:h,x:m,y:p}}function Uy(n,r,o){let i;if(r==="viewport")i=k2(n,o);else if(r==="document")i=L2(Ln(n));else if(Cn(r))i=H2(r,o);else{const c=hb(n);i={x:r.x-c.x,y:r.y-c.y,width:r.width,height:r.height}}return Rc(i)}function pb(n,r){const o=Vl(n);return o===r||!Cn(o)||wa(o)?!1:Tn(o).position==="fixed"||pb(o,r)}function U2(n,r){const o=r.get(n);if(o)return o;let i=Do(n,[],!1).filter(h=>Cn(h)&&Ma(h)!=="body"),c=null;const u=Tn(n).position==="fixed";let d=u?Vl(n):n;for(;Cn(d)&&!wa(d);){const h=Tn(d),m=kd(d);!m&&h.position==="fixed"&&(c=null),(u?!m&&!c:!m&&h.position==="static"&&!!c&&(c.position==="absolute"||c.position==="fixed")||Uo(d)&&!m&&pb(n,d))?i=i.filter(v=>v!==d):c=h,d=Vl(d)}return r.set(n,i),i}function B2(n){let{element:r,boundary:o,rootBoundary:i,strategy:c}=n;const d=[...o==="clippingAncestors"?Ic(r)?[]:U2(r,this._c):[].concat(o),i],h=Uy(r,d[0],c);let m=h.top,p=h.right,v=h.bottom,b=h.left;for(let S=1;S<d.length;S++){const C=Uy(r,d[S],c);m=tn(C.top,m),p=Yl(C.right,p),v=Yl(C.bottom,v),b=tn(C.left,b)}return{width:p-b,height:v-m,x:b,y:m}}function G2(n){const{width:r,height:o}=db(n);return{width:r,height:o}}function Y2(n,r,o){const i=cl(r),c=Ln(r),u=o==="fixed",d=xr(n,!0,u,r);let h={scrollLeft:0,scrollTop:0};const m=Dn(0);function p(){m.x=$c(c)}if(i||!i&&!u)if((Ma(r)!=="body"||Uo(c))&&(h=Pc(r)),i){const C=xr(r,!0,u,r);m.x=C.x+r.clientLeft,m.y=C.y+r.clientTop}else c&&p();u&&!i&&c&&p();const v=c&&!i&&!u?mb(c,h):Dn(0),b=d.left+h.scrollLeft-m.x-v.x,S=d.top+h.scrollTop-m.y-v.y;return{x:b,y:S,width:d.width,height:d.height}}function jf(n){return Tn(n).position==="static"}function By(n,r){if(!cl(n)||Tn(n).position==="fixed")return null;if(r)return r(n);let o=n.offsetParent;return Ln(n)===o&&(o=o.ownerDocument.body),o}function gb(n,r){const o=nn(n);if(Ic(n))return o;if(!cl(n)){let c=Vl(n);for(;c&&!wa(c);){if(Cn(c)&&!jf(c))return c;c=Vl(c)}return o}let i=By(n,r);for(;i&&M2(i)&&jf(i);)i=By(i,r);return i&&wa(i)&&jf(i)&&!kd(i)?o:i||N2(n)||o}const V2=async function(n){const r=this.getOffsetParent||gb,o=this.getDimensions,i=await o(n.floating);return{reference:Y2(n.reference,await r(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function q2(n){return Tn(n).direction==="rtl"}const X2={convertOffsetParentRelativeRectToViewportRelativeRect:D2,getDocumentElement:Ln,getClippingRect:B2,getOffsetParent:gb,getElementRects:V2,getClientRects:j2,getDimensions:G2,getScale:ba,isElement:Cn,isRTL:q2};function yb(n,r){return n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function I2(n,r){let o=null,i;const c=Ln(n);function u(){var h;clearTimeout(i),(h=o)==null||h.disconnect(),o=null}function d(h,m){h===void 0&&(h=!1),m===void 0&&(m=1),u();const p=n.getBoundingClientRect(),{left:v,top:b,width:S,height:C}=p;if(h||r(),!S||!C)return;const T=cc(b),E=cc(c.clientWidth-(v+S)),A=cc(c.clientHeight-(b+C)),N=cc(v),k={rootMargin:-T+"px "+-E+"px "+-A+"px "+-N+"px",threshold:tn(0,Yl(1,m))||1};let q=!0;function Z(D){const _=D[0].intersectionRatio;if(_!==m){if(!q)return d();_?d(!1,_):i=setTimeout(()=>{d(!1,1e-7)},1e3)}_===1&&!yb(p,n.getBoundingClientRect())&&d(),q=!1}try{o=new IntersectionObserver(Z,{...k,root:c.ownerDocument})}catch{o=new IntersectionObserver(Z,k)}o.observe(n)}return d(!0),u}function P2(n,r,o,i){i===void 0&&(i={});const{ancestorScroll:c=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:h=typeof IntersectionObserver=="function",animationFrame:m=!1}=i,p=Ud(n),v=c||u?[...p?Do(p):[],...r?Do(r):[]]:[];v.forEach(N=>{c&&N.addEventListener("scroll",o,{passive:!0}),u&&N.addEventListener("resize",o)});const b=p&&h?I2(p,o):null;let S=-1,C=null;d&&(C=new ResizeObserver(N=>{let[z]=N;z&&z.target===p&&C&&r&&(C.unobserve(r),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var k;(k=C)==null||k.observe(r)})),o()}),p&&!m&&C.observe(p),r&&C.observe(r));let T,E=m?xr(n):null;m&&A();function A(){const N=xr(n);E&&!yb(E,N)&&o(),E=N,T=requestAnimationFrame(A)}return o(),()=>{var N;v.forEach(z=>{c&&z.removeEventListener("scroll",o),u&&z.removeEventListener("resize",o)}),b==null||b(),(N=C)==null||N.disconnect(),C=null,m&&cancelAnimationFrame(T)}}const $2=E2,K2=C2,Q2=x2,Z2=A2,F2=S2,Gy=b2,J2=T2,W2=(n,r,o)=>{const i=new Map,c={platform:X2,...o},u={...c.platform,_c:i};return v2(n,r,{...c,platform:u})};var eC=typeof document<"u",tC=function(){},bc=eC?y.useLayoutEffect:tC;function Nc(n,r){if(n===r)return!0;if(typeof n!=typeof r)return!1;if(typeof n=="function"&&n.toString()===r.toString())return!0;let o,i,c;if(n&&r&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==r.length)return!1;for(i=o;i--!==0;)if(!Nc(n[i],r[i]))return!1;return!0}if(c=Object.keys(n),o=c.length,o!==Object.keys(r).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(r,c[i]))return!1;for(i=o;i--!==0;){const u=c[i];if(!(u==="_owner"&&n.$$typeof)&&!Nc(n[u],r[u]))return!1}return!0}return n!==n&&r!==r}function vb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Yy(n,r){const o=vb(n);return Math.round(r*o)/o}function Lf(n){const r=y.useRef(n);return bc(()=>{r.current=n}),r}function nC(n){n===void 0&&(n={});const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:c,elements:{reference:u,floating:d}={},transform:h=!0,whileElementsMounted:m,open:p}=n,[v,b]=y.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[S,C]=y.useState(i);Nc(S,i)||C(i);const[T,E]=y.useState(null),[A,N]=y.useState(null),z=y.useCallback(G=>{G!==D.current&&(D.current=G,E(G))},[]),k=y.useCallback(G=>{G!==_.current&&(_.current=G,N(G))},[]),q=u||T,Z=d||A,D=y.useRef(null),_=y.useRef(null),j=y.useRef(v),H=m!=null,I=Lf(m),J=Lf(c),le=Lf(p),re=y.useCallback(()=>{if(!D.current||!_.current)return;const G={placement:r,strategy:o,middleware:S};J.current&&(G.platform=J.current),W2(D.current,_.current,G).then($=>{const K={...$,isPositioned:le.current!==!1};te.current&&!Nc(j.current,K)&&(j.current=K,Ho.flushSync(()=>{b(K)}))})},[S,r,o,J,le]);bc(()=>{p===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,b(G=>({...G,isPositioned:!1})))},[p]);const te=y.useRef(!1);bc(()=>(te.current=!0,()=>{te.current=!1}),[]),bc(()=>{if(q&&(D.current=q),Z&&(_.current=Z),q&&Z){if(I.current)return I.current(q,Z,re);re()}},[q,Z,re,I,H]);const ae=y.useMemo(()=>({reference:D,floating:_,setReference:z,setFloating:k}),[z,k]),O=y.useMemo(()=>({reference:q,floating:Z}),[q,Z]),X=y.useMemo(()=>{const G={position:o,left:0,top:0};if(!O.floating)return G;const $=Yy(O.floating,v.x),K=Yy(O.floating,v.y);return h?{...G,transform:"translate("+$+"px, "+K+"px)",...vb(O.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:$,top:K}},[o,h,O.floating,v.x,v.y]);return y.useMemo(()=>({...v,update:re,refs:ae,elements:O,floatingStyles:X}),[v,re,ae,O,X])}const lC=n=>{function r(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&&r(i)?i.current!=null?Gy({element:i.current,padding:c}).fn(o):{}:i?Gy({element:i,padding:c}).fn(o):{}}}},rC=(n,r)=>{const o=$2(n);return{name:o.name,fn:o.fn,options:[n,r]}},aC=(n,r)=>{const o=K2(n);return{name:o.name,fn:o.fn,options:[n,r]}},oC=(n,r)=>({fn:J2(n).fn,options:[n,r]}),iC=(n,r)=>{const o=Q2(n);return{name:o.name,fn:o.fn,options:[n,r]}},cC=(n,r)=>{const o=Z2(n);return{name:o.name,fn:o.fn,options:[n,r]}},sC=(n,r)=>{const o=F2(n);return{name:o.name,fn:o.fn,options:[n,r]}},uC=(n,r)=>{const o=lC(n);return{name:o.name,fn:o.fn,options:[n,r]}};var fC="Arrow",bb=y.forwardRef((n,r)=>{const{children:o,width:i=10,height:c=5,...u}=n;return x.jsx(He.svg,{...u,ref:r,width:i,height:c,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?o:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});bb.displayName=fC;var dC=bb,Bd="Popper",[xb,_a]=Xl(Bd),[hC,Sb]=xb(Bd),wb=n=>{const{__scopePopper:r,children:o}=n,[i,c]=y.useState(null);return x.jsx(hC,{scope:r,anchor:i,onAnchorChange:c,children:o})};wb.displayName=Bd;var Eb="PopperAnchor",Cb=y.forwardRef((n,r)=>{const{__scopePopper:o,virtualRef:i,...c}=n,u=Sb(Eb,o),d=y.useRef(null),h=qe(r,d),m=y.useRef(null);return y.useEffect(()=>{const p=m.current;m.current=(i==null?void 0:i.current)||d.current,p!==m.current&&u.onAnchorChange(m.current)}),i?null:x.jsx(He.div,{...c,ref:h})});Cb.displayName=Eb;var Gd="PopperContent",[mC,pC]=xb(Gd),Tb=y.forwardRef((n,r)=>{var ie,xe,fe,Me,we,Ee;const{__scopePopper:o,side:i="bottom",sideOffset:c=0,align:u="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:m=!0,collisionBoundary:p=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:S=!1,updatePositionStrategy:C="optimized",onPlaced:T,...E}=n,A=Sb(Gd,o),[N,z]=y.useState(null),k=qe(r,nt=>z(nt)),[q,Z]=y.useState(null),D=o2(q),_=(D==null?void 0:D.width)??0,j=(D==null?void 0:D.height)??0,H=i+(u!=="center"?"-"+u:""),I=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},J=Array.isArray(p)?p:[p],le=J.length>0,re={padding:I,boundary:J.filter(yC),altBoundary:le},{refs:te,floatingStyles:ae,placement:O,isPositioned:X,middlewareData:G}=nC({strategy:"fixed",placement:H,whileElementsMounted:(...nt)=>P2(...nt,{animationFrame:C==="always"}),elements:{reference:A.anchor},middleware:[rC({mainAxis:c+j,alignmentAxis:d}),m&&aC({mainAxis:!0,crossAxis:!1,limiter:b==="partial"?oC():void 0,...re}),m&&iC({...re}),cC({...re,apply:({elements:nt,rects:Pe,availableWidth:kt,availableHeight:Ht})=>{const{width:jt,height:Ne}=Pe.reference,be=nt.floating.style;be.setProperty("--radix-popper-available-width",`${kt}px`),be.setProperty("--radix-popper-available-height",`${Ht}px`),be.setProperty("--radix-popper-anchor-width",`${jt}px`),be.setProperty("--radix-popper-anchor-height",`${Ne}px`)}}),q&&uC({element:q,padding:h}),vC({arrowWidth:_,arrowHeight:j}),S&&sC({strategy:"referenceHidden",...re})]}),[$,K]=_b(O),M=bt(T);Nt(()=>{X&&(M==null||M())},[X,M]);const B=(ie=G.arrow)==null?void 0:ie.x,ne=(xe=G.arrow)==null?void 0:xe.y,oe=((fe=G.arrow)==null?void 0:fe.centerOffset)!==0,[ce,se]=y.useState();return Nt(()=>{N&&se(window.getComputedStyle(N).zIndex)},[N]),x.jsx("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:X?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[(Me=G.transformOrigin)==null?void 0:Me.x,(we=G.transformOrigin)==null?void 0:we.y].join(" "),...((Ee=G.hide)==null?void 0:Ee.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:x.jsx(mC,{scope:o,placedSide:$,onArrowChange:Z,arrowX:B,arrowY:ne,shouldHideArrow:oe,children:x.jsx(He.div,{"data-side":$,"data-align":K,...E,ref:k,style:{...E.style,animation:X?void 0:"none"}})})})});Tb.displayName=Gd;var Ab="PopperArrow",gC={top:"bottom",right:"left",bottom:"top",left:"right"},Mb=y.forwardRef(function(r,o){const{__scopePopper:i,...c}=r,u=pC(Ab,i),d=gC[u.placedSide];return x.jsx("span",{ref:u.onArrowChange,style:{position:"absolute",left:u.arrowX,top:u.arrowY,[d]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u.placedSide],visibility:u.shouldHideArrow?"hidden":void 0},children:x.jsx(dC,{...c,ref:o,style:{...c.style,display:"block"}})})});Mb.displayName=Ab;function yC(n){return n!==null}var vC=n=>({name:"transformOrigin",options:n,fn(r){var A,N,z;const{placement:o,rects:i,middlewareData:c}=r,d=((A=c.arrow)==null?void 0:A.centerOffset)!==0,h=d?0:n.arrowWidth,m=d?0:n.arrowHeight,[p,v]=_b(o),b={start:"0%",center:"50%",end:"100%"}[v],S=(((N=c.arrow)==null?void 0:N.x)??0)+h/2,C=(((z=c.arrow)==null?void 0:z.y)??0)+m/2;let T="",E="";return p==="bottom"?(T=d?b:`${S}px`,E=`${-m}px`):p==="top"?(T=d?b:`${S}px`,E=`${i.floating.height+m}px`):p==="right"?(T=`${-m}px`,E=d?b:`${C}px`):p==="left"&&(T=`${i.floating.width+m}px`,E=d?b:`${C}px`),{data:{x:T,y:E}}}});function _b(n){const[r,o="center"]=n.split("-");return[r,o]}var Yd=wb,Vd=Cb,qd=Tb,Xd=Mb,kf="rovingFocusGroup.onEntryFocus",bC={bubbles:!1,cancelable:!0},Bo="RovingFocusGroup",[nd,Rb,xC]=Rd(Bo),[SC,Nb]=Xl(Bo,[xC]),[wC,EC]=SC(Bo),Ob=y.forwardRef((n,r)=>x.jsx(nd.Provider,{scope:n.__scopeRovingFocusGroup,children:x.jsx(nd.Slot,{scope:n.__scopeRovingFocusGroup,children:x.jsx(CC,{...n,ref:r})})}));Ob.displayName=Bo;var CC=y.forwardRef((n,r)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:c=!1,dir:u,currentTabStopId:d,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:m,onEntryFocus:p,preventScrollOnEntryFocus:v=!1,...b}=n,S=y.useRef(null),C=qe(r,S),T=Yc(u),[E,A]=Ac({prop:d,defaultProp:h??null,onChange:m,caller:Bo}),[N,z]=y.useState(!1),k=bt(p),q=Rb(o),Z=y.useRef(!1),[D,_]=y.useState(0);return y.useEffect(()=>{const j=S.current;if(j)return j.addEventListener(kf,k),()=>j.removeEventListener(kf,k)},[k]),x.jsx(wC,{scope:o,orientation:i,dir:T,loop:c,currentTabStopId:E,onItemFocus:y.useCallback(j=>A(j),[A]),onItemShiftTab:y.useCallback(()=>z(!0),[]),onFocusableItemAdd:y.useCallback(()=>_(j=>j+1),[]),onFocusableItemRemove:y.useCallback(()=>_(j=>j-1),[]),children:x.jsx(He.div,{tabIndex:N||D===0?-1:0,"data-orientation":i,...b,ref:C,style:{outline:"none",...n.style},onMouseDown:he(n.onMouseDown,()=>{Z.current=!0}),onFocus:he(n.onFocus,j=>{const H=!Z.current;if(j.target===j.currentTarget&&H&&!N){const I=new CustomEvent(kf,bC);if(j.currentTarget.dispatchEvent(I),!I.defaultPrevented){const J=q().filter(O=>O.focusable),le=J.find(O=>O.active),re=J.find(O=>O.id===E),ae=[le,re,...J].filter(Boolean).map(O=>O.ref.current);jb(ae,v)}}Z.current=!1}),onBlur:he(n.onBlur,()=>z(!1))})})}),zb="RovingFocusGroupItem",Db=y.forwardRef((n,r)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:c=!1,tabStopId:u,children:d,...h}=n,m=Sa(),p=u||m,v=EC(zb,o),b=v.currentTabStopId===p,S=Rb(o),{onFocusableItemAdd:C,onFocusableItemRemove:T,currentTabStopId:E}=v;return y.useEffect(()=>{if(i)return C(),()=>T()},[i,C,T]),x.jsx(nd.ItemSlot,{scope:o,id:p,focusable:i,active:c,children:x.jsx(He.span,{tabIndex:b?0:-1,"data-orientation":v.orientation,...h,ref:r,onMouseDown:he(n.onMouseDown,A=>{i?v.onItemFocus(p):A.preventDefault()}),onFocus:he(n.onFocus,()=>v.onItemFocus(p)),onKeyDown:he(n.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){v.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const N=MC(A,v.orientation,v.dir);if(N!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let k=S().filter(q=>q.focusable).map(q=>q.ref.current);if(N==="last")k.reverse();else if(N==="prev"||N==="next"){N==="prev"&&k.reverse();const q=k.indexOf(A.currentTarget);k=v.loop?_C(k,q+1):k.slice(q+1)}setTimeout(()=>jb(k))}}),children:typeof d=="function"?d({isCurrentTabStop:b,hasTabStop:E!=null}):d})})});Db.displayName=zb;var TC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function AC(n,r){return r!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function MC(n,r,o){const i=AC(n.key,o);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return TC[i]}function jb(n,r=!1){const o=document.activeElement;for(const i of n)if(i===o||(i.focus({preventScroll:r}),document.activeElement!==o))return}function _C(n,r){return n.map((o,i)=>n[(r+i)%n.length])}var RC=Ob,NC=Db,ld=["Enter"," "],OC=["ArrowDown","PageUp","Home"],Lb=["ArrowUp","PageDown","End"],zC=[...OC,...Lb],DC={ltr:[...ld,"ArrowRight"],rtl:[...ld,"ArrowLeft"]},jC={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Go="Menu",[jo,LC,kC]=Rd(Go),[Er,kb]=Xl(Go,[kC,_a,Nb]),Yo=_a(),Hb=Nb(),[Ub,Il]=Er(Go),[HC,Vo]=Er(Go),Bb=n=>{const{__scopeMenu:r,open:o=!1,children:i,dir:c,onOpenChange:u,modal:d=!0}=n,h=Yo(r),[m,p]=y.useState(null),v=y.useRef(!1),b=bt(u),S=Yc(c);return y.useEffect(()=>{const C=()=>{v.current=!0,document.addEventListener("pointerdown",T,{capture:!0,once:!0}),document.addEventListener("pointermove",T,{capture:!0,once:!0})},T=()=>v.current=!1;return document.addEventListener("keydown",C,{capture:!0}),()=>{document.removeEventListener("keydown",C,{capture:!0}),document.removeEventListener("pointerdown",T,{capture:!0}),document.removeEventListener("pointermove",T,{capture:!0})}},[]),x.jsx(Yd,{...h,children:x.jsx(Ub,{scope:r,open:o,onOpenChange:b,content:m,onContentChange:p,children:x.jsx(HC,{scope:r,onClose:y.useCallback(()=>b(!1),[b]),isUsingKeyboardRef:v,dir:S,modal:d,children:i})})})};Bb.displayName=Go;var UC="MenuAnchor",Id=y.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n,c=Yo(o);return x.jsx(Vd,{...c,...i,ref:r})});Id.displayName=UC;var Pd="MenuPortal",[BC,Gb]=Er(Pd,{forceMount:void 0}),Yb=n=>{const{__scopeMenu:r,forceMount:o,children:i,container:c}=n,u=Il(Pd,r);return x.jsx(BC,{scope:r,forceMount:o,children:x.jsx(jn,{present:o||u.open,children:x.jsx(Od,{asChild:!0,container:c,children:i})})})};Yb.displayName=Pd;var pn="MenuContent",[GC,$d]=Er(pn),Vb=y.forwardRef((n,r)=>{const o=Gb(pn,n.__scopeMenu),{forceMount:i=o.forceMount,...c}=n,u=Il(pn,n.__scopeMenu),d=Vo(pn,n.__scopeMenu);return x.jsx(jo.Provider,{scope:n.__scopeMenu,children:x.jsx(jn,{present:i||u.open,children:x.jsx(jo.Slot,{scope:n.__scopeMenu,children:d.modal?x.jsx(YC,{...c,ref:r}):x.jsx(VC,{...c,ref:r})})})})}),YC=y.forwardRef((n,r)=>{const o=Il(pn,n.__scopeMenu),i=y.useRef(null),c=qe(r,i);return y.useEffect(()=>{const u=i.current;if(u)return ib(u)},[]),x.jsx(Kd,{...n,ref:c,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:he(n.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),VC=y.forwardRef((n,r)=>{const o=Il(pn,n.__scopeMenu);return x.jsx(Kd,{...n,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),qC=xa("MenuContent.ScrollLock"),Kd=y.forwardRef((n,r)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:c,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:h,onEntryFocus:m,onEscapeKeyDown:p,onPointerDownOutside:v,onFocusOutside:b,onInteractOutside:S,onDismiss:C,disableOutsideScroll:T,...E}=n,A=Il(pn,o),N=Vo(pn,o),z=Yo(o),k=Hb(o),q=LC(o),[Z,D]=y.useState(null),_=y.useRef(null),j=qe(r,_,A.onContentChange),H=y.useRef(0),I=y.useRef(""),J=y.useRef(0),le=y.useRef(null),re=y.useRef("right"),te=y.useRef(0),ae=T?zd:y.Fragment,O=T?{as:qC,allowPinchZoom:!0}:void 0,X=$=>{var ie,xe;const K=I.current+$,M=q().filter(fe=>!fe.disabled),B=document.activeElement,ne=(ie=M.find(fe=>fe.ref.current===B))==null?void 0:ie.textValue,oe=M.map(fe=>fe.textValue),ce=tT(oe,K,ne),se=(xe=M.find(fe=>fe.textValue===ce))==null?void 0:xe.ref.current;(function fe(Me){I.current=Me,window.clearTimeout(H.current),Me!==""&&(H.current=window.setTimeout(()=>fe(""),1e3))})(K),se&&setTimeout(()=>se.focus())};y.useEffect(()=>()=>window.clearTimeout(H.current),[]),Jv();const G=y.useCallback($=>{var M,B;return re.current===((M=le.current)==null?void 0:M.side)&&lT($,(B=le.current)==null?void 0:B.area)},[]);return x.jsx(GC,{scope:o,searchRef:I,onItemEnter:y.useCallback($=>{G($)&&$.preventDefault()},[G]),onItemLeave:y.useCallback($=>{var K;G($)||((K=_.current)==null||K.focus(),D(null))},[G]),onTriggerLeave:y.useCallback($=>{G($)&&$.preventDefault()},[G]),pointerGraceTimerRef:J,onPointerGraceIntentChange:y.useCallback($=>{le.current=$},[]),children:x.jsx(ae,{...O,children:x.jsx(Nd,{asChild:!0,trapped:c,onMountAutoFocus:he(u,$=>{var K;$.preventDefault(),(K=_.current)==null||K.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:x.jsx(Vc,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:p,onPointerDownOutside:v,onFocusOutside:b,onInteractOutside:S,onDismiss:C,children:x.jsx(RC,{asChild:!0,...k,dir:N.dir,orientation:"vertical",loop:i,currentTabStopId:Z,onCurrentTabStopIdChange:D,onEntryFocus:he(m,$=>{N.isUsingKeyboardRef.current||$.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(qd,{role:"menu","aria-orientation":"vertical","data-state":a0(A.open),"data-radix-menu-content":"",dir:N.dir,...z,...E,ref:j,style:{outline:"none",...E.style},onKeyDown:he(E.onKeyDown,$=>{const M=$.target.closest("[data-radix-menu-content]")===$.currentTarget,B=$.ctrlKey||$.altKey||$.metaKey,ne=$.key.length===1;M&&($.key==="Tab"&&$.preventDefault(),!B&&ne&&X($.key));const oe=_.current;if($.target!==oe||!zC.includes($.key))return;$.preventDefault();const se=q().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);Lb.includes($.key)&&se.reverse(),WC(se)}),onBlur:he(n.onBlur,$=>{$.currentTarget.contains($.target)||(window.clearTimeout(H.current),I.current="")}),onPointerMove:he(n.onPointerMove,Lo($=>{const K=$.target,M=te.current!==$.clientX;if($.currentTarget.contains(K)&&M){const B=$.clientX>te.current?"right":"left";re.current=B,te.current=$.clientX}}))})})})})})})});Vb.displayName=pn;var XC="MenuGroup",Qd=y.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n;return x.jsx(He.div,{role:"group",...i,ref:r})});Qd.displayName=XC;var IC="MenuLabel",qb=y.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n;return x.jsx(He.div,{...i,ref:r})});qb.displayName=IC;var Oc="MenuItem",Vy="menu.itemSelect",Kc=y.forwardRef((n,r)=>{const{disabled:o=!1,onSelect:i,...c}=n,u=y.useRef(null),d=Vo(Oc,n.__scopeMenu),h=$d(Oc,n.__scopeMenu),m=qe(r,u),p=y.useRef(!1),v=()=>{const b=u.current;if(!o&&b){const S=new CustomEvent(Vy,{bubbles:!0,cancelable:!0});b.addEventListener(Vy,C=>i==null?void 0:i(C),{once:!0}),Pv(b,S),S.defaultPrevented?p.current=!1:d.onClose()}};return x.jsx(Xb,{...c,ref:m,disabled:o,onClick:he(n.onClick,v),onPointerDown:b=>{var S;(S=n.onPointerDown)==null||S.call(n,b),p.current=!0},onPointerUp:he(n.onPointerUp,b=>{var S;p.current||(S=b.currentTarget)==null||S.click()}),onKeyDown:he(n.onKeyDown,b=>{const S=h.searchRef.current!=="";o||S&&b.key===" "||ld.includes(b.key)&&(b.currentTarget.click(),b.preventDefault())})})});Kc.displayName=Oc;var Xb=y.forwardRef((n,r)=>{const{__scopeMenu:o,disabled:i=!1,textValue:c,...u}=n,d=$d(Oc,o),h=Hb(o),m=y.useRef(null),p=qe(r,m),[v,b]=y.useState(!1),[S,C]=y.useState("");return y.useEffect(()=>{const T=m.current;T&&C((T.textContent??"").trim())},[u.children]),x.jsx(jo.ItemSlot,{scope:o,disabled:i,textValue:c??S,children:x.jsx(NC,{asChild:!0,...h,focusable:!i,children:x.jsx(He.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:p,onPointerMove:he(n.onPointerMove,Lo(T=>{i?d.onItemLeave(T):(d.onItemEnter(T),T.defaultPrevented||T.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:he(n.onPointerLeave,Lo(T=>d.onItemLeave(T))),onFocus:he(n.onFocus,()=>b(!0)),onBlur:he(n.onBlur,()=>b(!1))})})})}),PC="MenuCheckboxItem",Ib=y.forwardRef((n,r)=>{const{checked:o=!1,onCheckedChange:i,...c}=n;return x.jsx(Zb,{scope:n.__scopeMenu,checked:o,children:x.jsx(Kc,{role:"menuitemcheckbox","aria-checked":zc(o)?"mixed":o,...c,ref:r,"data-state":Jd(o),onSelect:he(c.onSelect,()=>i==null?void 0:i(zc(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Ib.displayName=PC;var Pb="MenuRadioGroup",[$C,KC]=Er(Pb,{value:void 0,onValueChange:()=>{}}),$b=y.forwardRef((n,r)=>{const{value:o,onValueChange:i,...c}=n,u=bt(i);return x.jsx($C,{scope:n.__scopeMenu,value:o,onValueChange:u,children:x.jsx(Qd,{...c,ref:r})})});$b.displayName=Pb;var Kb="MenuRadioItem",Qb=y.forwardRef((n,r)=>{const{value:o,...i}=n,c=KC(Kb,n.__scopeMenu),u=o===c.value;return x.jsx(Zb,{scope:n.__scopeMenu,checked:u,children:x.jsx(Kc,{role:"menuitemradio","aria-checked":u,...i,ref:r,"data-state":Jd(u),onSelect:he(i.onSelect,()=>{var d;return(d=c.onValueChange)==null?void 0:d.call(c,o)},{checkForDefaultPrevented:!1})})})});Qb.displayName=Kb;var Zd="MenuItemIndicator",[Zb,QC]=Er(Zd,{checked:!1}),Fb=y.forwardRef((n,r)=>{const{__scopeMenu:o,forceMount:i,...c}=n,u=QC(Zd,o);return x.jsx(jn,{present:i||zc(u.checked)||u.checked===!0,children:x.jsx(He.span,{...c,ref:r,"data-state":Jd(u.checked)})})});Fb.displayName=Zd;var ZC="MenuSeparator",Jb=y.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n;return x.jsx(He.div,{role:"separator","aria-orientation":"horizontal",...i,ref:r})});Jb.displayName=ZC;var FC="MenuArrow",Wb=y.forwardRef((n,r)=>{const{__scopeMenu:o,...i}=n,c=Yo(o);return x.jsx(Xd,{...c,...i,ref:r})});Wb.displayName=FC;var Fd="MenuSub",[JC,e0]=Er(Fd),t0=n=>{const{__scopeMenu:r,children:o,open:i=!1,onOpenChange:c}=n,u=Il(Fd,r),d=Yo(r),[h,m]=y.useState(null),[p,v]=y.useState(null),b=bt(c);return y.useEffect(()=>(u.open===!1&&b(!1),()=>b(!1)),[u.open,b]),x.jsx(Yd,{...d,children:x.jsx(Ub,{scope:r,open:i,onOpenChange:b,content:p,onContentChange:v,children:x.jsx(JC,{scope:r,contentId:Sa(),triggerId:Sa(),trigger:h,onTriggerChange:m,children:o})})})};t0.displayName=Fd;var _o="MenuSubTrigger",n0=y.forwardRef((n,r)=>{const o=Il(_o,n.__scopeMenu),i=Vo(_o,n.__scopeMenu),c=e0(_o,n.__scopeMenu),u=$d(_o,n.__scopeMenu),d=y.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:m}=u,p={__scopeMenu:n.__scopeMenu},v=y.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return y.useEffect(()=>v,[v]),y.useEffect(()=>{const b=h.current;return()=>{window.clearTimeout(b),m(null)}},[h,m]),x.jsx(Id,{asChild:!0,...p,children:x.jsx(Xb,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":c.contentId,"data-state":a0(o.open),...n,ref:_d(r,c.onTriggerChange),onClick:b=>{var S;(S=n.onClick)==null||S.call(n,b),!(n.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:he(n.onPointerMove,Lo(b=>{u.onItemEnter(b),!b.defaultPrevented&&!n.disabled&&!o.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{o.onOpenChange(!0),v()},100))})),onPointerLeave:he(n.onPointerLeave,Lo(b=>{var C,T;v();const S=(C=o.content)==null?void 0:C.getBoundingClientRect();if(S){const E=(T=o.content)==null?void 0:T.dataset.side,A=E==="right",N=A?-5:5,z=S[A?"left":"right"],k=S[A?"right":"left"];u.onPointerGraceIntentChange({area:[{x:b.clientX+N,y:b.clientY},{x:z,y:S.top},{x:k,y:S.top},{x:k,y:S.bottom},{x:z,y:S.bottom}],side:E}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(b),b.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:he(n.onKeyDown,b=>{var C;const S=u.searchRef.current!=="";n.disabled||S&&b.key===" "||DC[i.dir].includes(b.key)&&(o.onOpenChange(!0),(C=o.content)==null||C.focus(),b.preventDefault())})})})});n0.displayName=_o;var l0="MenuSubContent",r0=y.forwardRef((n,r)=>{const o=Gb(pn,n.__scopeMenu),{forceMount:i=o.forceMount,...c}=n,u=Il(pn,n.__scopeMenu),d=Vo(pn,n.__scopeMenu),h=e0(l0,n.__scopeMenu),m=y.useRef(null),p=qe(r,m);return x.jsx(jo.Provider,{scope:n.__scopeMenu,children:x.jsx(jn,{present:i||u.open,children:x.jsx(jo.Slot,{scope:n.__scopeMenu,children:x.jsx(Kd,{id:h.contentId,"aria-labelledby":h.triggerId,...c,ref:p,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:v=>{var b;d.isUsingKeyboardRef.current&&((b=m.current)==null||b.focus()),v.preventDefault()},onCloseAutoFocus:v=>v.preventDefault(),onFocusOutside:he(n.onFocusOutside,v=>{v.target!==h.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:he(n.onEscapeKeyDown,v=>{d.onClose(),v.preventDefault()}),onKeyDown:he(n.onKeyDown,v=>{var C;const b=v.currentTarget.contains(v.target),S=jC[d.dir].includes(v.key);b&&S&&(u.onOpenChange(!1),(C=h.trigger)==null||C.focus(),v.preventDefault())})})})})})});r0.displayName=l0;function a0(n){return n?"open":"closed"}function zc(n){return n==="indeterminate"}function Jd(n){return zc(n)?"indeterminate":n?"checked":"unchecked"}function WC(n){const r=document.activeElement;for(const o of n)if(o===r||(o.focus(),document.activeElement!==r))return}function eT(n,r){return n.map((o,i)=>n[(r+i)%n.length])}function tT(n,r,o){const c=r.length>1&&Array.from(r).every(p=>p===r[0])?r[0]:r,u=o?n.indexOf(o):-1;let d=eT(n,Math.max(u,0));c.length===1&&(d=d.filter(p=>p!==o));const m=d.find(p=>p.toLowerCase().startsWith(c.toLowerCase()));return m!==o?m:void 0}function nT(n,r){const{x:o,y:i}=n;let c=!1;for(let u=0,d=r.length-1;u<r.length;d=u++){const h=r[u],m=r[d],p=h.x,v=h.y,b=m.x,S=m.y;v>i!=S>i&&o<(b-p)*(i-v)/(S-v)+p&&(c=!c)}return c}function lT(n,r){if(!r)return!1;const o={x:n.clientX,y:n.clientY};return nT(o,r)}function Lo(n){return r=>r.pointerType==="mouse"?n(r):void 0}var rT=Bb,aT=Id,oT=Yb,iT=Vb,cT=Qd,sT=qb,uT=Kc,fT=Ib,dT=$b,hT=Qb,mT=Fb,pT=Jb,gT=Wb,yT=t0,vT=n0,bT=r0,Wd="ContextMenu",[xT]=Xl(Wd,[kb]),Dt=kb(),[ST,o0]=xT(Wd),i0=n=>{const{__scopeContextMenu:r,children:o,onOpenChange:i,dir:c,modal:u=!0}=n,[d,h]=y.useState(!1),m=Dt(r),p=bt(i),v=y.useCallback(b=>{h(b),p(b)},[p]);return x.jsx(ST,{scope:r,open:d,onOpenChange:v,modal:u,children:x.jsx(rT,{...m,dir:c,open:d,onOpenChange:v,modal:u,children:o})})};i0.displayName=Wd;var c0="ContextMenuTrigger",s0=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,disabled:i=!1,...c}=n,u=o0(c0,o),d=Dt(o),h=y.useRef({x:0,y:0}),m=y.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...h.current})}),p=y.useRef(0),v=y.useCallback(()=>window.clearTimeout(p.current),[]),b=S=>{h.current={x:S.clientX,y:S.clientY},u.onOpenChange(!0)};return y.useEffect(()=>v,[v]),y.useEffect(()=>void(i&&v()),[i,v]),x.jsxs(x.Fragment,{children:[x.jsx(aT,{...d,virtualRef:m}),x.jsx(He.span,{"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,...c,ref:r,style:{WebkitTouchCallout:"none",...n.style},onContextMenu:i?n.onContextMenu:he(n.onContextMenu,S=>{v(),b(S),S.preventDefault()}),onPointerDown:i?n.onPointerDown:he(n.onPointerDown,sc(S=>{v(),p.current=window.setTimeout(()=>b(S),700)})),onPointerMove:i?n.onPointerMove:he(n.onPointerMove,sc(v)),onPointerCancel:i?n.onPointerCancel:he(n.onPointerCancel,sc(v)),onPointerUp:i?n.onPointerUp:he(n.onPointerUp,sc(v))})]})});s0.displayName=c0;var wT="ContextMenuPortal",u0=n=>{const{__scopeContextMenu:r,...o}=n,i=Dt(r);return x.jsx(oT,{...i,...o})};u0.displayName=wT;var f0="ContextMenuContent",d0=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=o0(f0,o),u=Dt(o),d=y.useRef(!1);return x.jsx(iT,{...u,...i,ref:r,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:h=>{var m;(m=n.onCloseAutoFocus)==null||m.call(n,h),!h.defaultPrevented&&d.current&&h.preventDefault(),d.current=!1},onInteractOutside:h=>{var m;(m=n.onInteractOutside)==null||m.call(n,h),!h.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)"}})});d0.displayName=f0;var ET="ContextMenuGroup",CT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(cT,{...c,...i,ref:r})});CT.displayName=ET;var TT="ContextMenuLabel",AT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(sT,{...c,...i,ref:r})});AT.displayName=TT;var MT="ContextMenuItem",h0=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(uT,{...c,...i,ref:r})});h0.displayName=MT;var _T="ContextMenuCheckboxItem",RT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(fT,{...c,...i,ref:r})});RT.displayName=_T;var NT="ContextMenuRadioGroup",OT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(dT,{...c,...i,ref:r})});OT.displayName=NT;var zT="ContextMenuRadioItem",DT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(hT,{...c,...i,ref:r})});DT.displayName=zT;var jT="ContextMenuItemIndicator",LT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(mT,{...c,...i,ref:r})});LT.displayName=jT;var kT="ContextMenuSeparator",m0=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(pT,{...c,...i,ref:r})});m0.displayName=kT;var HT="ContextMenuArrow",UT=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(gT,{...c,...i,ref:r})});UT.displayName=HT;var p0="ContextMenuSub",g0=n=>{const{__scopeContextMenu:r,children:o,onOpenChange:i,open:c,defaultOpen:u}=n,d=Dt(r),[h,m]=Ac({prop:c,defaultProp:u??!1,onChange:i,caller:p0});return x.jsx(yT,{...d,open:h,onOpenChange:m,children:o})};g0.displayName=p0;var BT="ContextMenuSubTrigger",y0=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(vT,{...c,...i,ref:r})});y0.displayName=BT;var GT="ContextMenuSubContent",v0=y.forwardRef((n,r)=>{const{__scopeContextMenu:o,...i}=n,c=Dt(o);return x.jsx(bT,{...c,...i,ref:r,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)"}})});v0.displayName=GT;function sc(n){return r=>r.pointerType!=="mouse"?n(r):void 0}var YT=i0,VT=s0,qT=u0,XT=d0,IT=h0,PT=m0,$T=g0,KT=y0,QT=v0;function rd(n,[r,o]){return Math.min(o,Math.max(r,n))}function ZT(n,r){return y.useReducer((o,i)=>r[o][i]??o,n)}var eh="ScrollArea",[b0]=Xl(eh),[FT,gn]=b0(eh),x0=y.forwardRef((n,r)=>{const{__scopeScrollArea:o,type:i="hover",dir:c,scrollHideDelay:u=600,...d}=n,[h,m]=y.useState(null),[p,v]=y.useState(null),[b,S]=y.useState(null),[C,T]=y.useState(null),[E,A]=y.useState(null),[N,z]=y.useState(0),[k,q]=y.useState(0),[Z,D]=y.useState(!1),[_,j]=y.useState(!1),H=qe(r,J=>m(J)),I=Yc(c);return x.jsx(FT,{scope:o,type:i,dir:I,scrollHideDelay:u,scrollArea:h,viewport:p,onViewportChange:v,content:b,onContentChange:S,scrollbarX:C,onScrollbarXChange:T,scrollbarXEnabled:Z,onScrollbarXEnabledChange:D,scrollbarY:E,onScrollbarYChange:A,scrollbarYEnabled:_,onScrollbarYEnabledChange:j,onCornerWidthChange:z,onCornerHeightChange:q,children:x.jsx(He.div,{dir:I,...d,ref:H,style:{position:"relative","--radix-scroll-area-corner-width":N+"px","--radix-scroll-area-corner-height":k+"px",...n.style}})})});x0.displayName=eh;var S0="ScrollAreaViewport",w0=y.forwardRef((n,r)=>{const{__scopeScrollArea:o,children:i,nonce:c,...u}=n,d=gn(S0,o),h=y.useRef(null),m=qe(r,h,d.onViewportChange);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:c}),x.jsx(He.div,{"data-radix-scroll-area-viewport":"",...u,ref:m,style:{overflowX:d.scrollbarXEnabled?"scroll":"hidden",overflowY:d.scrollbarYEnabled?"scroll":"hidden",...n.style},children:x.jsx("div",{ref:d.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});w0.displayName=S0;var kn="ScrollAreaScrollbar",E0=y.forwardRef((n,r)=>{const{forceMount:o,...i}=n,c=gn(kn,n.__scopeScrollArea),{onScrollbarXEnabledChange:u,onScrollbarYEnabledChange:d}=c,h=n.orientation==="horizontal";return y.useEffect(()=>(h?u(!0):d(!0),()=>{h?u(!1):d(!1)}),[h,u,d]),c.type==="hover"?x.jsx(JT,{...i,ref:r,forceMount:o}):c.type==="scroll"?x.jsx(WT,{...i,ref:r,forceMount:o}):c.type==="auto"?x.jsx(C0,{...i,ref:r,forceMount:o}):c.type==="always"?x.jsx(th,{...i,ref:r}):null});E0.displayName=kn;var JT=y.forwardRef((n,r)=>{const{forceMount:o,...i}=n,c=gn(kn,n.__scopeScrollArea),[u,d]=y.useState(!1);return y.useEffect(()=>{const h=c.scrollArea;let m=0;if(h){const p=()=>{window.clearTimeout(m),d(!0)},v=()=>{m=window.setTimeout(()=>d(!1),c.scrollHideDelay)};return h.addEventListener("pointerenter",p),h.addEventListener("pointerleave",v),()=>{window.clearTimeout(m),h.removeEventListener("pointerenter",p),h.removeEventListener("pointerleave",v)}}},[c.scrollArea,c.scrollHideDelay]),x.jsx(jn,{present:o||u,children:x.jsx(C0,{"data-state":u?"visible":"hidden",...i,ref:r})})}),WT=y.forwardRef((n,r)=>{const{forceMount:o,...i}=n,c=gn(kn,n.__scopeScrollArea),u=n.orientation==="horizontal",d=Zc(()=>m("SCROLL_END"),100),[h,m]=ZT("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(h==="idle"){const p=window.setTimeout(()=>m("HIDE"),c.scrollHideDelay);return()=>window.clearTimeout(p)}},[h,c.scrollHideDelay,m]),y.useEffect(()=>{const p=c.viewport,v=u?"scrollLeft":"scrollTop";if(p){let b=p[v];const S=()=>{const C=p[v];b!==C&&(m("SCROLL"),d()),b=C};return p.addEventListener("scroll",S),()=>p.removeEventListener("scroll",S)}},[c.viewport,u,m,d]),x.jsx(jn,{present:o||h!=="hidden",children:x.jsx(th,{"data-state":h==="hidden"?"hidden":"visible",...i,ref:r,onPointerEnter:he(n.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:he(n.onPointerLeave,()=>m("POINTER_LEAVE"))})})}),C0=y.forwardRef((n,r)=>{const o=gn(kn,n.__scopeScrollArea),{forceMount:i,...c}=n,[u,d]=y.useState(!1),h=n.orientation==="horizontal",m=Zc(()=>{if(o.viewport){const p=o.viewport.offsetWidth<o.viewport.scrollWidth,v=o.viewport.offsetHeight<o.viewport.scrollHeight;d(h?p:v)}},10);return Ea(o.viewport,m),Ea(o.content,m),x.jsx(jn,{present:i||u,children:x.jsx(th,{"data-state":u?"visible":"hidden",...c,ref:r})})}),th=y.forwardRef((n,r)=>{const{orientation:o="vertical",...i}=n,c=gn(kn,n.__scopeScrollArea),u=y.useRef(null),d=y.useRef(0),[h,m]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=R0(h.viewport,h.content),v={...i,sizes:h,onSizesChange:m,hasThumb:p>0&&p<1,onThumbChange:S=>u.current=S,onThumbPointerUp:()=>d.current=0,onThumbPointerDown:S=>d.current=S};function b(S,C){return aA(S,d.current,h,C)}return o==="horizontal"?x.jsx(eA,{...v,ref:r,onThumbPositionChange:()=>{if(c.viewport&&u.current){const S=c.viewport.scrollLeft,C=qy(S,h,c.dir);u.current.style.transform=`translate3d(${C}px, 0, 0)`}},onWheelScroll:S=>{c.viewport&&(c.viewport.scrollLeft=S)},onDragScroll:S=>{c.viewport&&(c.viewport.scrollLeft=b(S,c.dir))}}):o==="vertical"?x.jsx(tA,{...v,ref:r,onThumbPositionChange:()=>{if(c.viewport&&u.current){const S=c.viewport.scrollTop,C=qy(S,h);u.current.style.transform=`translate3d(0, ${C}px, 0)`}},onWheelScroll:S=>{c.viewport&&(c.viewport.scrollTop=S)},onDragScroll:S=>{c.viewport&&(c.viewport.scrollTop=b(S))}}):null}),eA=y.forwardRef((n,r)=>{const{sizes:o,onSizesChange:i,...c}=n,u=gn(kn,n.__scopeScrollArea),[d,h]=y.useState(),m=y.useRef(null),p=qe(r,m,u.onScrollbarXChange);return y.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),x.jsx(A0,{"data-orientation":"horizontal",...c,ref:p,sizes:o,style:{bottom:0,left:u.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:u.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Qc(o)+"px",...n.style},onThumbPointerDown:v=>n.onThumbPointerDown(v.x),onDragScroll:v=>n.onDragScroll(v.x),onWheelScroll:(v,b)=>{if(u.viewport){const S=u.viewport.scrollLeft+v.deltaX;n.onWheelScroll(S),O0(S,b)&&v.preventDefault()}},onResize:()=>{m.current&&u.viewport&&d&&i({content:u.viewport.scrollWidth,viewport:u.viewport.offsetWidth,scrollbar:{size:m.current.clientWidth,paddingStart:jc(d.paddingLeft),paddingEnd:jc(d.paddingRight)}})}})}),tA=y.forwardRef((n,r)=>{const{sizes:o,onSizesChange:i,...c}=n,u=gn(kn,n.__scopeScrollArea),[d,h]=y.useState(),m=y.useRef(null),p=qe(r,m,u.onScrollbarYChange);return y.useEffect(()=>{m.current&&h(getComputedStyle(m.current))},[m]),x.jsx(A0,{"data-orientation":"vertical",...c,ref:p,sizes:o,style:{top:0,right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Qc(o)+"px",...n.style},onThumbPointerDown:v=>n.onThumbPointerDown(v.y),onDragScroll:v=>n.onDragScroll(v.y),onWheelScroll:(v,b)=>{if(u.viewport){const S=u.viewport.scrollTop+v.deltaY;n.onWheelScroll(S),O0(S,b)&&v.preventDefault()}},onResize:()=>{m.current&&u.viewport&&d&&i({content:u.viewport.scrollHeight,viewport:u.viewport.offsetHeight,scrollbar:{size:m.current.clientHeight,paddingStart:jc(d.paddingTop),paddingEnd:jc(d.paddingBottom)}})}})}),[nA,T0]=b0(kn),A0=y.forwardRef((n,r)=>{const{__scopeScrollArea:o,sizes:i,hasThumb:c,onThumbChange:u,onThumbPointerUp:d,onThumbPointerDown:h,onThumbPositionChange:m,onDragScroll:p,onWheelScroll:v,onResize:b,...S}=n,C=gn(kn,o),[T,E]=y.useState(null),A=qe(r,H=>E(H)),N=y.useRef(null),z=y.useRef(""),k=C.viewport,q=i.content-i.viewport,Z=bt(v),D=bt(m),_=Zc(b,10);function j(H){if(N.current){const I=H.clientX-N.current.left,J=H.clientY-N.current.top;p({x:I,y:J})}}return y.useEffect(()=>{const H=I=>{const J=I.target;(T==null?void 0:T.contains(J))&&Z(I,q)};return document.addEventListener("wheel",H,{passive:!1}),()=>document.removeEventListener("wheel",H,{passive:!1})},[k,T,q,Z]),y.useEffect(D,[i,D]),Ea(T,_),Ea(C.content,_),x.jsx(nA,{scope:o,scrollbar:T,hasThumb:c,onThumbChange:bt(u),onThumbPointerUp:bt(d),onThumbPositionChange:D,onThumbPointerDown:bt(h),children:x.jsx(He.div,{...S,ref:A,style:{position:"absolute",...S.style},onPointerDown:he(n.onPointerDown,H=>{H.button===0&&(H.target.setPointerCapture(H.pointerId),N.current=T.getBoundingClientRect(),z.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",C.viewport&&(C.viewport.style.scrollBehavior="auto"),j(H))}),onPointerMove:he(n.onPointerMove,j),onPointerUp:he(n.onPointerUp,H=>{const I=H.target;I.hasPointerCapture(H.pointerId)&&I.releasePointerCapture(H.pointerId),document.body.style.webkitUserSelect=z.current,C.viewport&&(C.viewport.style.scrollBehavior=""),N.current=null})})})}),Dc="ScrollAreaThumb",M0=y.forwardRef((n,r)=>{const{forceMount:o,...i}=n,c=T0(Dc,n.__scopeScrollArea);return x.jsx(jn,{present:o||c.hasThumb,children:x.jsx(lA,{ref:r,...i})})}),lA=y.forwardRef((n,r)=>{const{__scopeScrollArea:o,style:i,...c}=n,u=gn(Dc,o),d=T0(Dc,o),{onThumbPositionChange:h}=d,m=qe(r,b=>d.onThumbChange(b)),p=y.useRef(void 0),v=Zc(()=>{p.current&&(p.current(),p.current=void 0)},100);return y.useEffect(()=>{const b=u.viewport;if(b){const S=()=>{if(v(),!p.current){const C=oA(b,h);p.current=C,h()}};return h(),b.addEventListener("scroll",S),()=>b.removeEventListener("scroll",S)}},[u.viewport,v,h]),x.jsx(He.div,{"data-state":d.hasThumb?"visible":"hidden",...c,ref:m,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:he(n.onPointerDownCapture,b=>{const C=b.target.getBoundingClientRect(),T=b.clientX-C.left,E=b.clientY-C.top;d.onThumbPointerDown({x:T,y:E})}),onPointerUp:he(n.onPointerUp,d.onThumbPointerUp)})});M0.displayName=Dc;var nh="ScrollAreaCorner",_0=y.forwardRef((n,r)=>{const o=gn(nh,n.__scopeScrollArea),i=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&i?x.jsx(rA,{...n,ref:r}):null});_0.displayName=nh;var rA=y.forwardRef((n,r)=>{const{__scopeScrollArea:o,...i}=n,c=gn(nh,o),[u,d]=y.useState(0),[h,m]=y.useState(0),p=!!(u&&h);return Ea(c.scrollbarX,()=>{var b;const v=((b=c.scrollbarX)==null?void 0:b.offsetHeight)||0;c.onCornerHeightChange(v),m(v)}),Ea(c.scrollbarY,()=>{var b;const v=((b=c.scrollbarY)==null?void 0:b.offsetWidth)||0;c.onCornerWidthChange(v),d(v)}),p?x.jsx(He.div,{...i,ref:r,style:{width:u,height:h,position:"absolute",right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function jc(n){return n?parseInt(n,10):0}function R0(n,r){const o=n/r;return isNaN(o)?0:o}function Qc(n){const r=R0(n.viewport,n.content),o=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,i=(n.scrollbar.size-o)*r;return Math.max(i,18)}function aA(n,r,o,i="ltr"){const c=Qc(o),u=c/2,d=r||u,h=c-d,m=o.scrollbar.paddingStart+d,p=o.scrollbar.size-o.scrollbar.paddingEnd-h,v=o.content-o.viewport,b=i==="ltr"?[0,v]:[v*-1,0];return N0([m,p],b)(n)}function qy(n,r,o="ltr"){const i=Qc(r),c=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,u=r.scrollbar.size-c,d=r.content-r.viewport,h=u-i,m=o==="ltr"?[0,d]:[d*-1,0],p=rd(n,m);return N0([0,d],[0,h])(p)}function N0(n,r){return o=>{if(n[0]===n[1]||r[0]===r[1])return r[0];const i=(r[1]-r[0])/(n[1]-n[0]);return r[0]+i*(o-n[0])}}function O0(n,r){return n>0&&n<r}var oA=(n,r=()=>{})=>{let o={left:n.scrollLeft,top:n.scrollTop},i=0;return(function c(){const u={left:n.scrollLeft,top:n.scrollTop},d=o.left!==u.left,h=o.top!==u.top;(d||h)&&r(),o=u,i=window.requestAnimationFrame(c)})(),()=>window.cancelAnimationFrame(i)};function Zc(n,r){const o=bt(n),i=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(i.current),[]),y.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(o,r)},[o,r])}function Ea(n,r){const o=bt(r);Nt(()=>{let i=0;if(n){const c=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(o)});return c.observe(n),()=>{window.cancelAnimationFrame(i),c.unobserve(n)}}},[n,o])}var iA=x0,cA=w0,sA=_0,uA=[" ","Enter","ArrowUp","ArrowDown"],fA=[" ","Enter"],Sr="Select",[Fc,Jc,dA]=Rd(Sr),[Ra]=Xl(Sr,[dA,_a]),Wc=_a(),[hA,Pl]=Ra(Sr),[mA,pA]=Ra(Sr),z0=n=>{const{__scopeSelect:r,children:o,open:i,defaultOpen:c,onOpenChange:u,value:d,defaultValue:h,onValueChange:m,dir:p,name:v,autoComplete:b,disabled:S,required:C,form:T}=n,E=Wc(r),[A,N]=y.useState(null),[z,k]=y.useState(null),[q,Z]=y.useState(!1),D=Yc(p),[_,j]=Ac({prop:i,defaultProp:c??!1,onChange:u,caller:Sr}),[H,I]=Ac({prop:d,defaultProp:h,onChange:m,caller:Sr}),J=y.useRef(null),le=A?T||!!A.closest("form"):!0,[re,te]=y.useState(new Set),ae=Array.from(re).map(O=>O.props.value).join(";");return x.jsx(Yd,{...E,children:x.jsxs(hA,{required:C,scope:r,trigger:A,onTriggerChange:N,valueNode:z,onValueNodeChange:k,valueNodeHasChildren:q,onValueNodeHasChildrenChange:Z,contentId:Sa(),value:H,onValueChange:I,open:_,onOpenChange:j,dir:D,triggerPointerDownPosRef:J,disabled:S,children:[x.jsx(Fc.Provider,{scope:r,children:x.jsx(mA,{scope:n.__scopeSelect,onNativeOptionAdd:y.useCallback(O=>{te(X=>new Set(X).add(O))},[]),onNativeOptionRemove:y.useCallback(O=>{te(X=>{const G=new Set(X);return G.delete(O),G})},[]),children:o})}),le?x.jsxs(tx,{"aria-hidden":!0,required:C,tabIndex:-1,name:v,autoComplete:b,value:H,onChange:O=>I(O.target.value),disabled:S,form:T,children:[H===void 0?x.jsx("option",{value:""}):null,Array.from(re)]},ae):null]})})};z0.displayName=Sr;var D0="SelectTrigger",j0=y.forwardRef((n,r)=>{const{__scopeSelect:o,disabled:i=!1,...c}=n,u=Wc(o),d=Pl(D0,o),h=d.disabled||i,m=qe(r,d.onTriggerChange),p=Jc(o),v=y.useRef("touch"),[b,S,C]=lx(E=>{const A=p().filter(k=>!k.disabled),N=A.find(k=>k.value===d.value),z=rx(A,E,N);z!==void 0&&d.onValueChange(z.value)}),T=E=>{h||(d.onOpenChange(!0),C()),E&&(d.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return x.jsx(Vd,{asChild:!0,...u,children:x.jsx(He.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:h,"data-disabled":h?"":void 0,"data-placeholder":nx(d.value)?"":void 0,...c,ref:m,onClick:he(c.onClick,E=>{E.currentTarget.focus(),v.current!=="mouse"&&T(E)}),onPointerDown:he(c.onPointerDown,E=>{v.current=E.pointerType;const A=E.target;A.hasPointerCapture(E.pointerId)&&A.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(T(E),E.preventDefault())}),onKeyDown:he(c.onKeyDown,E=>{const A=b.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&S(E.key),!(A&&E.key===" ")&&uA.includes(E.key)&&(T(),E.preventDefault())})})})});j0.displayName=D0;var L0="SelectValue",k0=y.forwardRef((n,r)=>{const{__scopeSelect:o,className:i,style:c,children:u,placeholder:d="",...h}=n,m=Pl(L0,o),{onValueNodeHasChildrenChange:p}=m,v=u!==void 0,b=qe(r,m.onValueNodeChange);return Nt(()=>{p(v)},[p,v]),x.jsx(He.span,{...h,ref:b,style:{pointerEvents:"none"},children:nx(m.value)?x.jsx(x.Fragment,{children:d}):u})});k0.displayName=L0;var gA="SelectIcon",H0=y.forwardRef((n,r)=>{const{__scopeSelect:o,children:i,...c}=n;return x.jsx(He.span,{"aria-hidden":!0,...c,ref:r,children:i||"▼"})});H0.displayName=gA;var yA="SelectPortal",U0=n=>x.jsx(Od,{asChild:!0,...n});U0.displayName=yA;var wr="SelectContent",B0=y.forwardRef((n,r)=>{const o=Pl(wr,n.__scopeSelect),[i,c]=y.useState();if(Nt(()=>{c(new DocumentFragment)},[]),!o.open){const u=i;return u?Ho.createPortal(x.jsx(G0,{scope:n.__scopeSelect,children:x.jsx(Fc.Slot,{scope:n.__scopeSelect,children:x.jsx("div",{children:n.children})})}),u):null}return x.jsx(Y0,{...n,ref:r})});B0.displayName=wr;var wn=10,[G0,$l]=Ra(wr),vA="SelectContentImpl",bA=xa("SelectContent.RemoveScroll"),Y0=y.forwardRef((n,r)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,side:h,sideOffset:m,align:p,alignOffset:v,arrowPadding:b,collisionBoundary:S,collisionPadding:C,sticky:T,hideWhenDetached:E,avoidCollisions:A,...N}=n,z=Pl(wr,o),[k,q]=y.useState(null),[Z,D]=y.useState(null),_=qe(r,ie=>q(ie)),[j,H]=y.useState(null),[I,J]=y.useState(null),le=Jc(o),[re,te]=y.useState(!1),ae=y.useRef(!1);y.useEffect(()=>{if(k)return ib(k)},[k]),Jv();const O=y.useCallback(ie=>{const[xe,...fe]=le().map(Ee=>Ee.ref.current),[Me]=fe.slice(-1),we=document.activeElement;for(const Ee of ie)if(Ee===we||(Ee==null||Ee.scrollIntoView({block:"nearest"}),Ee===xe&&Z&&(Z.scrollTop=0),Ee===Me&&Z&&(Z.scrollTop=Z.scrollHeight),Ee==null||Ee.focus(),document.activeElement!==we))return},[le,Z]),X=y.useCallback(()=>O([j,k]),[O,j,k]);y.useEffect(()=>{re&&X()},[re,X]);const{onOpenChange:G,triggerPointerDownPosRef:$}=z;y.useEffect(()=>{if(k){let ie={x:0,y:0};const xe=Me=>{var we,Ee;ie={x:Math.abs(Math.round(Me.pageX)-(((we=$.current)==null?void 0:we.x)??0)),y:Math.abs(Math.round(Me.pageY)-(((Ee=$.current)==null?void 0:Ee.y)??0))}},fe=Me=>{ie.x<=10&&ie.y<=10?Me.preventDefault():k.contains(Me.target)||G(!1),document.removeEventListener("pointermove",xe),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",xe),document.addEventListener("pointerup",fe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",xe),document.removeEventListener("pointerup",fe,{capture:!0})}}},[k,G,$]),y.useEffect(()=>{const ie=()=>G(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[G]);const[K,M]=lx(ie=>{const xe=le().filter(we=>!we.disabled),fe=xe.find(we=>we.ref.current===document.activeElement),Me=rx(xe,ie,fe);Me&&setTimeout(()=>Me.ref.current.focus())}),B=y.useCallback((ie,xe,fe)=>{const Me=!ae.current&&!fe;(z.value!==void 0&&z.value===xe||Me)&&(H(ie),Me&&(ae.current=!0))},[z.value]),ne=y.useCallback(()=>k==null?void 0:k.focus(),[k]),oe=y.useCallback((ie,xe,fe)=>{const Me=!ae.current&&!fe;(z.value!==void 0&&z.value===xe||Me)&&J(ie)},[z.value]),ce=i==="popper"?ad:V0,se=ce===ad?{side:h,sideOffset:m,align:p,alignOffset:v,arrowPadding:b,collisionBoundary:S,collisionPadding:C,sticky:T,hideWhenDetached:E,avoidCollisions:A}:{};return x.jsx(G0,{scope:o,content:k,viewport:Z,onViewportChange:D,itemRefCallback:B,selectedItem:j,onItemLeave:ne,itemTextRefCallback:oe,focusSelectedItem:X,selectedItemText:I,position:i,isPositioned:re,searchRef:K,children:x.jsx(zd,{as:bA,allowPinchZoom:!0,children:x.jsx(Nd,{asChild:!0,trapped:z.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:he(c,ie=>{var xe;(xe=z.trigger)==null||xe.focus({preventScroll:!0}),ie.preventDefault()}),children:x.jsx(Vc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>z.onOpenChange(!1),children:x.jsx(ce,{role:"listbox",id:z.contentId,"data-state":z.open?"open":"closed",dir:z.dir,onContextMenu:ie=>ie.preventDefault(),...N,...se,onPlaced:()=>te(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...N.style},onKeyDown:he(N.onKeyDown,ie=>{const xe=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!xe&&ie.key.length===1&&M(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let Me=le().filter(we=>!we.disabled).map(we=>we.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(Me=Me.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const we=ie.target,Ee=Me.indexOf(we);Me=Me.slice(Ee+1)}setTimeout(()=>O(Me)),ie.preventDefault()}})})})})})})});Y0.displayName=vA;var xA="SelectItemAlignedPosition",V0=y.forwardRef((n,r)=>{const{__scopeSelect:o,onPlaced:i,...c}=n,u=Pl(wr,o),d=$l(wr,o),[h,m]=y.useState(null),[p,v]=y.useState(null),b=qe(r,_=>v(_)),S=Jc(o),C=y.useRef(!1),T=y.useRef(!0),{viewport:E,selectedItem:A,selectedItemText:N,focusSelectedItem:z}=d,k=y.useCallback(()=>{if(u.trigger&&u.valueNode&&h&&p&&E&&A&&N){const _=u.trigger.getBoundingClientRect(),j=p.getBoundingClientRect(),H=u.valueNode.getBoundingClientRect(),I=N.getBoundingClientRect();if(u.dir!=="rtl"){const we=I.left-j.left,Ee=H.left-we,nt=_.left-Ee,Pe=_.width+nt,kt=Math.max(Pe,j.width),Ht=window.innerWidth-wn,jt=rd(Ee,[wn,Math.max(wn,Ht-kt)]);h.style.minWidth=Pe+"px",h.style.left=jt+"px"}else{const we=j.right-I.right,Ee=window.innerWidth-H.right-we,nt=window.innerWidth-_.right-Ee,Pe=_.width+nt,kt=Math.max(Pe,j.width),Ht=window.innerWidth-wn,jt=rd(Ee,[wn,Math.max(wn,Ht-kt)]);h.style.minWidth=Pe+"px",h.style.right=jt+"px"}const J=S(),le=window.innerHeight-wn*2,re=E.scrollHeight,te=window.getComputedStyle(p),ae=parseInt(te.borderTopWidth,10),O=parseInt(te.paddingTop,10),X=parseInt(te.borderBottomWidth,10),G=parseInt(te.paddingBottom,10),$=ae+O+re+G+X,K=Math.min(A.offsetHeight*5,$),M=window.getComputedStyle(E),B=parseInt(M.paddingTop,10),ne=parseInt(M.paddingBottom,10),oe=_.top+_.height/2-wn,ce=le-oe,se=A.offsetHeight/2,ie=A.offsetTop+se,xe=ae+O+ie,fe=$-xe;if(xe<=oe){const we=J.length>0&&A===J[J.length-1].ref.current;h.style.bottom="0px";const Ee=p.clientHeight-E.offsetTop-E.offsetHeight,nt=Math.max(ce,se+(we?ne:0)+Ee+X),Pe=xe+nt;h.style.height=Pe+"px"}else{const we=J.length>0&&A===J[0].ref.current;h.style.top="0px";const nt=Math.max(oe,ae+E.offsetTop+(we?B:0)+se)+fe;h.style.height=nt+"px",E.scrollTop=xe-oe+E.offsetTop}h.style.margin=`${wn}px 0`,h.style.minHeight=K+"px",h.style.maxHeight=le+"px",i==null||i(),requestAnimationFrame(()=>C.current=!0)}},[S,u.trigger,u.valueNode,h,p,E,A,N,u.dir,i]);Nt(()=>k(),[k]);const[q,Z]=y.useState();Nt(()=>{p&&Z(window.getComputedStyle(p).zIndex)},[p]);const D=y.useCallback(_=>{_&&T.current===!0&&(k(),z==null||z(),T.current=!1)},[k,z]);return x.jsx(wA,{scope:o,contentWrapper:h,shouldExpandOnScrollRef:C,onScrollButtonChange:D,children:x.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:q},children:x.jsx(He.div,{...c,ref:b,style:{boxSizing:"border-box",maxHeight:"100%",...c.style}})})})});V0.displayName=xA;var SA="SelectPopperPosition",ad=y.forwardRef((n,r)=>{const{__scopeSelect:o,align:i="start",collisionPadding:c=wn,...u}=n,d=Wc(o);return x.jsx(qd,{...d,...u,ref:r,align:i,collisionPadding:c,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});ad.displayName=SA;var[wA,lh]=Ra(wr,{}),od="SelectViewport",q0=y.forwardRef((n,r)=>{const{__scopeSelect:o,nonce:i,...c}=n,u=$l(od,o),d=lh(od,o),h=qe(r,u.onViewportChange),m=y.useRef(0);return x.jsxs(x.Fragment,{children:[x.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}),x.jsx(Fc.Slot,{scope:o,children:x.jsx(He.div,{"data-radix-select-viewport":"",role:"presentation",...c,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...c.style},onScroll:he(c.onScroll,p=>{const v=p.currentTarget,{contentWrapper:b,shouldExpandOnScrollRef:S}=d;if(S!=null&&S.current&&b){const C=Math.abs(m.current-v.scrollTop);if(C>0){const T=window.innerHeight-wn*2,E=parseFloat(b.style.minHeight),A=parseFloat(b.style.height),N=Math.max(E,A);if(N<T){const z=N+C,k=Math.min(T,z),q=z-k;b.style.height=k+"px",b.style.bottom==="0px"&&(v.scrollTop=q>0?q:0,b.style.justifyContent="flex-end")}}}m.current=v.scrollTop})})})]})});q0.displayName=od;var X0="SelectGroup",[EA,CA]=Ra(X0),I0=y.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n,c=Sa();return x.jsx(EA,{scope:o,id:c,children:x.jsx(He.div,{role:"group","aria-labelledby":c,...i,ref:r})})});I0.displayName=X0;var P0="SelectLabel",TA=y.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n,c=CA(P0,o);return x.jsx(He.div,{id:c.id,...i,ref:r})});TA.displayName=P0;var Lc="SelectItem",[AA,$0]=Ra(Lc),K0=y.forwardRef((n,r)=>{const{__scopeSelect:o,value:i,disabled:c=!1,textValue:u,...d}=n,h=Pl(Lc,o),m=$l(Lc,o),p=h.value===i,[v,b]=y.useState(u??""),[S,C]=y.useState(!1),T=qe(r,z=>{var k;return(k=m.itemRefCallback)==null?void 0:k.call(m,z,i,c)}),E=Sa(),A=y.useRef("touch"),N=()=>{c||(h.onValueChange(i),h.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return x.jsx(AA,{scope:o,value:i,disabled:c,textId:E,isSelected:p,onItemTextChange:y.useCallback(z=>{b(k=>k||((z==null?void 0:z.textContent)??"").trim())},[]),children:x.jsx(Fc.ItemSlot,{scope:o,value:i,disabled:c,textValue:v,children:x.jsx(He.div,{role:"option","aria-labelledby":E,"data-highlighted":S?"":void 0,"aria-selected":p&&S,"data-state":p?"checked":"unchecked","aria-disabled":c||void 0,"data-disabled":c?"":void 0,tabIndex:c?void 0:-1,...d,ref:T,onFocus:he(d.onFocus,()=>C(!0)),onBlur:he(d.onBlur,()=>C(!1)),onClick:he(d.onClick,()=>{A.current!=="mouse"&&N()}),onPointerUp:he(d.onPointerUp,()=>{A.current==="mouse"&&N()}),onPointerDown:he(d.onPointerDown,z=>{A.current=z.pointerType}),onPointerMove:he(d.onPointerMove,z=>{var k;A.current=z.pointerType,c?(k=m.onItemLeave)==null||k.call(m):A.current==="mouse"&&z.currentTarget.focus({preventScroll:!0})}),onPointerLeave:he(d.onPointerLeave,z=>{var k;z.currentTarget===document.activeElement&&((k=m.onItemLeave)==null||k.call(m))}),onKeyDown:he(d.onKeyDown,z=>{var q;((q=m.searchRef)==null?void 0:q.current)!==""&&z.key===" "||(fA.includes(z.key)&&N(),z.key===" "&&z.preventDefault())})})})})});K0.displayName=Lc;var Ro="SelectItemText",Q0=y.forwardRef((n,r)=>{const{__scopeSelect:o,className:i,style:c,...u}=n,d=Pl(Ro,o),h=$l(Ro,o),m=$0(Ro,o),p=pA(Ro,o),[v,b]=y.useState(null),S=qe(r,N=>b(N),m.onItemTextChange,N=>{var z;return(z=h.itemTextRefCallback)==null?void 0:z.call(h,N,m.value,m.disabled)}),C=v==null?void 0:v.textContent,T=y.useMemo(()=>x.jsx("option",{value:m.value,disabled:m.disabled,children:C},m.value),[m.disabled,m.value,C]),{onNativeOptionAdd:E,onNativeOptionRemove:A}=p;return Nt(()=>(E(T),()=>A(T)),[E,A,T]),x.jsxs(x.Fragment,{children:[x.jsx(He.span,{id:m.textId,...u,ref:S}),m.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Ho.createPortal(u.children,d.valueNode):null]})});Q0.displayName=Ro;var Z0="SelectItemIndicator",F0=y.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n;return $0(Z0,o).isSelected?x.jsx(He.span,{"aria-hidden":!0,...i,ref:r}):null});F0.displayName=Z0;var id="SelectScrollUpButton",J0=y.forwardRef((n,r)=>{const o=$l(id,n.__scopeSelect),i=lh(id,n.__scopeSelect),[c,u]=y.useState(!1),d=qe(r,i.onScrollButtonChange);return Nt(()=>{if(o.viewport&&o.isPositioned){let h=function(){const p=m.scrollTop>0;u(p)};const m=o.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[o.viewport,o.isPositioned]),c?x.jsx(ex,{...n,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=o;h&&m&&(h.scrollTop=h.scrollTop-m.offsetHeight)}}):null});J0.displayName=id;var cd="SelectScrollDownButton",W0=y.forwardRef((n,r)=>{const o=$l(cd,n.__scopeSelect),i=lh(cd,n.__scopeSelect),[c,u]=y.useState(!1),d=qe(r,i.onScrollButtonChange);return Nt(()=>{if(o.viewport&&o.isPositioned){let h=function(){const p=m.scrollHeight-m.clientHeight,v=Math.ceil(m.scrollTop)<p;u(v)};const m=o.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[o.viewport,o.isPositioned]),c?x.jsx(ex,{...n,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=o;h&&m&&(h.scrollTop=h.scrollTop+m.offsetHeight)}}):null});W0.displayName=cd;var ex=y.forwardRef((n,r)=>{const{__scopeSelect:o,onAutoScroll:i,...c}=n,u=$l("SelectScrollButton",o),d=y.useRef(null),h=Jc(o),m=y.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return y.useEffect(()=>()=>m(),[m]),Nt(()=>{var v;const p=h().find(b=>b.ref.current===document.activeElement);(v=p==null?void 0:p.ref.current)==null||v.scrollIntoView({block:"nearest"})},[h]),x.jsx(He.div,{"aria-hidden":!0,...c,ref:r,style:{flexShrink:0,...c.style},onPointerDown:he(c.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:he(c.onPointerMove,()=>{var p;(p=u.onItemLeave)==null||p.call(u),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:he(c.onPointerLeave,()=>{m()})})}),MA="SelectSeparator",_A=y.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n;return x.jsx(He.div,{"aria-hidden":!0,...i,ref:r})});_A.displayName=MA;var sd="SelectArrow",RA=y.forwardRef((n,r)=>{const{__scopeSelect:o,...i}=n,c=Wc(o),u=Pl(sd,o),d=$l(sd,o);return u.open&&d.position==="popper"?x.jsx(Xd,{...c,...i,ref:r}):null});RA.displayName=sd;var NA="SelectBubbleInput",tx=y.forwardRef(({__scopeSelect:n,value:r,...o},i)=>{const c=y.useRef(null),u=qe(i,c),d=a2(r);return y.useEffect(()=>{const h=c.current;if(!h)return;const m=window.HTMLSelectElement.prototype,v=Object.getOwnPropertyDescriptor(m,"value").set;if(d!==r&&v){const b=new Event("change",{bubbles:!0});v.call(h,r),h.dispatchEvent(b)}},[d,r]),x.jsx(He.select,{...o,style:{...$v,...o.style},ref:u,defaultValue:r})});tx.displayName=NA;function nx(n){return n===""||n===void 0}function lx(n){const r=bt(n),o=y.useRef(""),i=y.useRef(0),c=y.useCallback(d=>{const h=o.current+d;r(h),(function m(p){o.current=p,window.clearTimeout(i.current),p!==""&&(i.current=window.setTimeout(()=>m(""),1e3))})(h)},[r]),u=y.useCallback(()=>{o.current="",window.clearTimeout(i.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(i.current),[]),[o,c,u]}function rx(n,r,o){const c=r.length>1&&Array.from(r).every(p=>p===r[0])?r[0]:r,u=o?n.indexOf(o):-1;let d=OA(n,Math.max(u,0));c.length===1&&(d=d.filter(p=>p!==o));const m=d.find(p=>p.textValue.toLowerCase().startsWith(c.toLowerCase()));return m!==o?m:void 0}function OA(n,r){return n.map((o,i)=>n[(r+i)%n.length])}var zA=z0,DA=j0,jA=k0,LA=H0,kA=U0,HA=B0,UA=q0,BA=I0,GA=K0,YA=Q0,VA=F0,qA=J0,XA=W0,IA="Separator",Xy="horizontal",PA=["horizontal","vertical"],ax=y.forwardRef((n,r)=>{const{decorative:o,orientation:i=Xy,...c}=n,u=$A(i)?i:Xy,h=o?{role:"none"}:{"aria-orientation":u==="vertical"?u:void 0,role:"separator"};return x.jsx(He.div,{"data-orientation":u,...h,...c,ref:r})});ax.displayName=IA;function $A(n){return PA.includes(n)}var KA=ax,[es]=Xl("Tooltip",[_a]),rh=_a(),ox="TooltipProvider",QA=700,Iy="tooltip.open",[ZA,ix]=es(ox),cx=n=>{const{__scopeTooltip:r,delayDuration:o=QA,skipDelayDuration:i=300,disableHoverableContent:c=!1,children:u}=n,d=y.useRef(!0),h=y.useRef(!1),m=y.useRef(0);return y.useEffect(()=>{const p=m.current;return()=>window.clearTimeout(p)},[]),x.jsx(ZA,{scope:r,isOpenDelayedRef:d,delayDuration:o,onOpen:y.useCallback(()=>{window.clearTimeout(m.current),d.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>d.current=!0,i)},[i]),isPointerInTransitRef:h,onPointerInTransitChange:y.useCallback(p=>{h.current=p},[]),disableHoverableContent:c,children:u})};cx.displayName=ox;var sx="Tooltip",[ZO,ts]=es(sx),ud="TooltipTrigger",FA=y.forwardRef((n,r)=>{const{__scopeTooltip:o,...i}=n,c=ts(ud,o),u=ix(ud,o),d=rh(o),h=y.useRef(null),m=qe(r,h,c.onTriggerChange),p=y.useRef(!1),v=y.useRef(!1),b=y.useCallback(()=>p.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",b),[b]),x.jsx(Vd,{asChild:!0,...d,children:x.jsx(He.button,{"aria-describedby":c.open?c.contentId:void 0,"data-state":c.stateAttribute,...i,ref:m,onPointerMove:he(n.onPointerMove,S=>{S.pointerType!=="touch"&&!v.current&&!u.isPointerInTransitRef.current&&(c.onTriggerEnter(),v.current=!0)}),onPointerLeave:he(n.onPointerLeave,()=>{c.onTriggerLeave(),v.current=!1}),onPointerDown:he(n.onPointerDown,()=>{c.open&&c.onClose(),p.current=!0,document.addEventListener("pointerup",b,{once:!0})}),onFocus:he(n.onFocus,()=>{p.current||c.onOpen()}),onBlur:he(n.onBlur,c.onClose),onClick:he(n.onClick,c.onClose)})})});FA.displayName=ud;var JA="TooltipPortal",[FO,WA]=es(JA,{forceMount:void 0}),Ca="TooltipContent",eM=y.forwardRef((n,r)=>{const o=WA(Ca,n.__scopeTooltip),{forceMount:i=o.forceMount,side:c="top",...u}=n,d=ts(Ca,n.__scopeTooltip);return x.jsx(jn,{present:i||d.open,children:d.disableHoverableContent?x.jsx(ux,{side:c,...u,ref:r}):x.jsx(tM,{side:c,...u,ref:r})})}),tM=y.forwardRef((n,r)=>{const o=ts(Ca,n.__scopeTooltip),i=ix(Ca,n.__scopeTooltip),c=y.useRef(null),u=qe(r,c),[d,h]=y.useState(null),{trigger:m,onClose:p}=o,v=c.current,{onPointerInTransitChange:b}=i,S=y.useCallback(()=>{h(null),b(!1)},[b]),C=y.useCallback((T,E)=>{const A=T.currentTarget,N={x:T.clientX,y:T.clientY},z=oM(N,A.getBoundingClientRect()),k=iM(N,z),q=cM(E.getBoundingClientRect()),Z=uM([...k,...q]);h(Z),b(!0)},[b]);return y.useEffect(()=>()=>S(),[S]),y.useEffect(()=>{if(m&&v){const T=A=>C(A,v),E=A=>C(A,m);return m.addEventListener("pointerleave",T),v.addEventListener("pointerleave",E),()=>{m.removeEventListener("pointerleave",T),v.removeEventListener("pointerleave",E)}}},[m,v,C,S]),y.useEffect(()=>{if(d){const T=E=>{const A=E.target,N={x:E.clientX,y:E.clientY},z=(m==null?void 0:m.contains(A))||(v==null?void 0:v.contains(A)),k=!sM(N,d);z?S():k&&(S(),p())};return document.addEventListener("pointermove",T),()=>document.removeEventListener("pointermove",T)}},[m,v,d,p,S]),x.jsx(ux,{...n,ref:u})}),[nM,lM]=es(sx,{isInside:!1}),rM=Yw("TooltipContent"),ux=y.forwardRef((n,r)=>{const{__scopeTooltip:o,children:i,"aria-label":c,onEscapeKeyDown:u,onPointerDownOutside:d,...h}=n,m=ts(Ca,o),p=rh(o),{onClose:v}=m;return y.useEffect(()=>(document.addEventListener(Iy,v),()=>document.removeEventListener(Iy,v)),[v]),y.useEffect(()=>{if(m.trigger){const b=S=>{const C=S.target;C!=null&&C.contains(m.trigger)&&v()};return window.addEventListener("scroll",b,{capture:!0}),()=>window.removeEventListener("scroll",b,{capture:!0})}},[m.trigger,v]),x.jsx(Vc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:b=>b.preventDefault(),onDismiss:v,children:x.jsxs(qd,{"data-state":m.stateAttribute,...p,...h,ref:r,style:{...h.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(rM,{children:i}),x.jsx(nM,{scope:o,isInside:!0,children:x.jsx($w,{id:m.contentId,role:"tooltip",children:c||i})})]})})});eM.displayName=Ca;var fx="TooltipArrow",aM=y.forwardRef((n,r)=>{const{__scopeTooltip:o,...i}=n,c=rh(o);return lM(fx,o).isInside?null:x.jsx(Xd,{...c,...i,ref:r})});aM.displayName=fx;function oM(n,r){const o=Math.abs(r.top-n.y),i=Math.abs(r.bottom-n.y),c=Math.abs(r.right-n.x),u=Math.abs(r.left-n.x);switch(Math.min(o,i,c,u)){case u:return"left";case c:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function iM(n,r,o=5){const i=[];switch(r){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 cM(n){const{top:r,right:o,bottom:i,left:c}=n;return[{x:c,y:r},{x:o,y:r},{x:o,y:i},{x:c,y:i}]}function sM(n,r){const{x:o,y:i}=n;let c=!1;for(let u=0,d=r.length-1;u<r.length;d=u++){const h=r[u],m=r[d],p=h.x,v=h.y,b=m.x,S=m.y;v>i!=S>i&&o<(b-p)*(i-v)/(S-v)+p&&(c=!c)}return c}function uM(n){const r=n.slice();return r.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),fM(r)}function fM(n){if(n.length<=1)return n.slice();const r=[];for(let i=0;i<n.length;i++){const c=n[i];for(;r.length>=2;){const u=r[r.length-1],d=r[r.length-2];if((u.x-d.x)*(c.y-d.y)>=(u.y-d.y)*(c.x-d.x))r.pop();else break}r.push(c)}r.pop();const o=[];for(let i=n.length-1;i>=0;i--){const c=n[i];for(;o.length>=2;){const u=o[o.length-1],d=o[o.length-2];if((u.x-d.x)*(c.y-d.y)>=(u.y-d.y)*(c.x-d.x))o.pop();else break}o.push(c)}return o.pop(),r.length===1&&o.length===1&&r[0].x===o[0].x&&r[0].y===o[0].y?r:r.concat(o)}var dM=cx;const hM=(n,r)=>{const o=new Array(n.length+r.length);for(let i=0;i<n.length;i++)o[i]=n[i];for(let i=0;i<r.length;i++)o[n.length+i]=r[i];return o},mM=(n,r)=>({classGroupId:n,validator:r}),dx=(n=new Map,r=null,o)=>({nextPart:n,validators:r,classGroupId:o}),kc="-",Py=[],pM="arbitrary..",gM=n=>{const r=vM(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return yM(d);const h=d.split(kc),m=h[0]===""&&h.length>1?1:0;return hx(h,m,r)},getConflictingClassGroupIds:(d,h)=>{if(h){const m=i[d],p=o[d];return m?p?hM(p,m):m:p||Py}return o[d]||Py}}},hx=(n,r,o)=>{if(n.length-r===0)return o.classGroupId;const c=n[r],u=o.nextPart.get(c);if(u){const p=hx(n,r+1,u);if(p)return p}const d=o.validators;if(d===null)return;const h=r===0?n.join(kc):n.slice(r).join(kc),m=d.length;for(let p=0;p<m;p++){const v=d[p];if(v.validator(h))return v.classGroupId}},yM=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=n.slice(1,-1),o=r.indexOf(":"),i=r.slice(0,o);return i?pM+i:void 0})(),vM=n=>{const{theme:r,classGroups:o}=n;return bM(o,r)},bM=(n,r)=>{const o=dx();for(const i in n){const c=n[i];ah(c,o,i,r)}return o},ah=(n,r,o,i)=>{const c=n.length;for(let u=0;u<c;u++){const d=n[u];xM(d,r,o,i)}},xM=(n,r,o,i)=>{if(typeof n=="string"){SM(n,r,o);return}if(typeof n=="function"){wM(n,r,o,i);return}EM(n,r,o,i)},SM=(n,r,o)=>{const i=n===""?r:mx(r,n);i.classGroupId=o},wM=(n,r,o,i)=>{if(CM(n)){ah(n(i),r,o,i);return}r.validators===null&&(r.validators=[]),r.validators.push(mM(o,n))},EM=(n,r,o,i)=>{const c=Object.entries(n),u=c.length;for(let d=0;d<u;d++){const[h,m]=c[d];ah(m,mx(r,h),o,i)}},mx=(n,r)=>{let o=n;const i=r.split(kc),c=i.length;for(let u=0;u<c;u++){const d=i[u];let h=o.nextPart.get(d);h||(h=dx(),o.nextPart.set(d,h)),o=h}return o},CM=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,TM=n=>{if(n<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),i=Object.create(null);const c=(u,d)=>{o[u]=d,r++,r>n&&(r=0,i=o,o=Object.create(null))};return{get(u){let d=o[u];if(d!==void 0)return d;if((d=i[u])!==void 0)return c(u,d),d},set(u,d){u in o?o[u]=d:c(u,d)}}},fd="!",$y=":",AM=[],Ky=(n,r,o,i,c)=>({modifiers:n,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:i,isExternal:c}),MM=n=>{const{prefix:r,experimentalParseClassName:o}=n;let i=c=>{const u=[];let d=0,h=0,m=0,p;const v=c.length;for(let E=0;E<v;E++){const A=c[E];if(d===0&&h===0){if(A===$y){u.push(c.slice(m,E)),m=E+1;continue}if(A==="/"){p=E;continue}}A==="["?d++:A==="]"?d--:A==="("?h++:A===")"&&h--}const b=u.length===0?c:c.slice(m);let S=b,C=!1;b.endsWith(fd)?(S=b.slice(0,-1),C=!0):b.startsWith(fd)&&(S=b.slice(1),C=!0);const T=p&&p>m?p-m:void 0;return Ky(u,C,S,T)};if(r){const c=r+$y,u=i;i=d=>d.startsWith(c)?u(d.slice(c.length)):Ky(AM,!1,d,void 0,!0)}if(o){const c=i;i=u=>o({className:u,parseClassName:c})}return i},_M=n=>{const r=new Map;return n.orderSensitiveModifiers.forEach((o,i)=>{r.set(o,1e6+i)}),o=>{const i=[];let c=[];for(let u=0;u<o.length;u++){const d=o[u],h=d[0]==="[",m=r.has(d);h||m?(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}},RM=n=>({cache:TM(n.cacheSize),parseClassName:MM(n),sortModifiers:_M(n),...gM(n)}),NM=/\s+/,OM=(n,r)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:c,sortModifiers:u}=r,d=[],h=n.trim().split(NM);let m="";for(let p=h.length-1;p>=0;p-=1){const v=h[p],{isExternal:b,modifiers:S,hasImportantModifier:C,baseClassName:T,maybePostfixModifierPosition:E}=o(v);if(b){m=v+(m.length>0?" "+m:m);continue}let A=!!E,N=i(A?T.substring(0,E):T);if(!N){if(!A){m=v+(m.length>0?" "+m:m);continue}if(N=i(T),!N){m=v+(m.length>0?" "+m:m);continue}A=!1}const z=S.length===0?"":S.length===1?S[0]:u(S).join(":"),k=C?z+fd:z,q=k+N;if(d.indexOf(q)>-1)continue;d.push(q);const Z=c(N,A);for(let D=0;D<Z.length;++D){const _=Z[D];d.push(k+_)}m=v+(m.length>0?" "+m:m)}return m},zM=(...n)=>{let r=0,o,i,c="";for(;r<n.length;)(o=n[r++])&&(i=px(o))&&(c&&(c+=" "),c+=i);return c},px=n=>{if(typeof n=="string")return n;let r,o="";for(let i=0;i<n.length;i++)n[i]&&(r=px(n[i]))&&(o&&(o+=" "),o+=r);return o},DM=(n,...r)=>{let o,i,c,u;const d=m=>{const p=r.reduce((v,b)=>b(v),n());return o=RM(p),i=o.cache.get,c=o.cache.set,u=h,h(m)},h=m=>{const p=i(m);if(p)return p;const v=OM(m,o);return c(m,v),v};return u=d,(...m)=>u(zM(...m))},jM=[],vt=n=>{const r=o=>o[n]||jM;return r.isThemeGetter=!0,r},gx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,yx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,LM=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,kM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,HM=/\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$/,UM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,BM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GM=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Dl=n=>LM.test(n),Oe=n=>!!n&&!Number.isNaN(Number(n)),jl=n=>!!n&&Number.isInteger(Number(n)),Hf=n=>n.endsWith("%")&&Oe(n.slice(0,-1)),ll=n=>kM.test(n),vx=()=>!0,YM=n=>HM.test(n)&&!UM.test(n),oh=()=>!1,VM=n=>BM.test(n),qM=n=>GM.test(n),XM=n=>!me(n)&&!pe(n),IM=n=>Kl(n,Sx,oh),me=n=>gx.test(n),pr=n=>Kl(n,wx,YM),Qy=n=>Kl(n,WM,Oe),PM=n=>Kl(n,Cx,vx),$M=n=>Kl(n,Ex,oh),Zy=n=>Kl(n,bx,oh),KM=n=>Kl(n,xx,qM),uc=n=>Kl(n,Tx,VM),pe=n=>yx.test(n),Mo=n=>Cr(n,wx),QM=n=>Cr(n,Ex),Fy=n=>Cr(n,bx),ZM=n=>Cr(n,Sx),FM=n=>Cr(n,xx),fc=n=>Cr(n,Tx,!0),JM=n=>Cr(n,Cx,!0),Kl=(n,r,o)=>{const i=gx.exec(n);return i?i[1]?r(i[1]):o(i[2]):!1},Cr=(n,r,o=!1)=>{const i=yx.exec(n);return i?i[1]?r(i[1]):o:!1},bx=n=>n==="position"||n==="percentage",xx=n=>n==="image"||n==="url",Sx=n=>n==="length"||n==="size"||n==="bg-size",wx=n=>n==="length",WM=n=>n==="number",Ex=n=>n==="family-name",Cx=n=>n==="number"||n==="weight",Tx=n=>n==="shadow",e_=()=>{const n=vt("color"),r=vt("font"),o=vt("text"),i=vt("font-weight"),c=vt("tracking"),u=vt("leading"),d=vt("breakpoint"),h=vt("container"),m=vt("spacing"),p=vt("radius"),v=vt("shadow"),b=vt("inset-shadow"),S=vt("text-shadow"),C=vt("drop-shadow"),T=vt("blur"),E=vt("perspective"),A=vt("aspect"),N=vt("ease"),z=vt("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Z=()=>[...q(),pe,me],D=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],j=()=>[pe,me,m],H=()=>[Dl,"full","auto",...j()],I=()=>[jl,"none","subgrid",pe,me],J=()=>["auto",{span:["full",jl,pe,me]},jl,pe,me],le=()=>[jl,"auto",pe,me],re=()=>["auto","min","max","fr",pe,me],te=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...j()],X=()=>[Dl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],G=()=>[Dl,"screen","full","dvw","lvw","svw","min","max","fit",...j()],$=()=>[Dl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],K=()=>[n,pe,me],M=()=>[...q(),Fy,Zy,{position:[pe,me]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ne=()=>["auto","cover","contain",ZM,IM,{size:[pe,me]}],oe=()=>[Hf,Mo,pr],ce=()=>["","none","full",p,pe,me],se=()=>["",Oe,Mo,pr],ie=()=>["solid","dashed","dotted","double"],xe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[Oe,Hf,Fy,Zy],Me=()=>["","none",T,pe,me],we=()=>["none",Oe,pe,me],Ee=()=>["none",Oe,pe,me],nt=()=>[Oe,pe,me],Pe=()=>[Dl,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ll],breakpoint:[ll],color:[vx],container:[ll],"drop-shadow":[ll],ease:["in","out","in-out"],font:[XM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ll],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ll],shadow:[ll],spacing:["px",Oe],text:[ll],"text-shadow":[ll],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Dl,me,pe,A]}],container:["container"],columns:[{columns:[Oe,me,pe,h]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:Z()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{"inset-s":H(),start:H()}],end:[{"inset-e":H(),end:H()}],"inset-bs":[{"inset-bs":H()}],"inset-be":[{"inset-be":H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[jl,"auto",pe,me]}],basis:[{basis:[Dl,"full","auto",h,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Oe,Dl,"auto","initial","none",me]}],grow:[{grow:["",Oe,pe,me]}],shrink:[{shrink:["",Oe,pe,me]}],order:[{order:[jl,"first","last","none",pe,me]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...te(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...te()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[h,"screen",...X()]}],"min-w":[{"min-w":[h,"screen","none",...X()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",o,Mo,pr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,JM,PM]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hf,me]}],"font-family":[{font:[QM,$M,r]}],"font-features":[{"font-features":[me]}],"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,pe,me]}],"line-clamp":[{"line-clamp":[Oe,"none",pe,Qy]}],leading:[{leading:[u,...j()]}],"list-image":[{"list-image":["none",pe,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[Oe,"from-font","auto",pe,pr]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[Oe,"auto",pe,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,me]}],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",pe,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},jl,pe,me],radial:["",pe,me],conic:[jl,pe,me]},FM,KM]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Oe,pe,me]}],"outline-w":[{outline:["",Oe,Mo,pr]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",v,fc,uc]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",b,fc,uc]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[Oe,pr]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",S,fc,uc]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[Oe,pe,me]}],"mix-blend":[{"mix-blend":[...xe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":xe()}],"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":[Oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[pe,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":q()}],"mask-image-conic-pos":[{"mask-conic":[Oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,me]}],filter:[{filter:["","none",pe,me]}],blur:[{blur:Me()}],brightness:[{brightness:[Oe,pe,me]}],contrast:[{contrast:[Oe,pe,me]}],"drop-shadow":[{"drop-shadow":["","none",C,fc,uc]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",Oe,pe,me]}],"hue-rotate":[{"hue-rotate":[Oe,pe,me]}],invert:[{invert:["",Oe,pe,me]}],saturate:[{saturate:[Oe,pe,me]}],sepia:[{sepia:["",Oe,pe,me]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,me]}],"backdrop-blur":[{"backdrop-blur":Me()}],"backdrop-brightness":[{"backdrop-brightness":[Oe,pe,me]}],"backdrop-contrast":[{"backdrop-contrast":[Oe,pe,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Oe,pe,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Oe,pe,me]}],"backdrop-invert":[{"backdrop-invert":["",Oe,pe,me]}],"backdrop-opacity":[{"backdrop-opacity":[Oe,pe,me]}],"backdrop-saturate":[{"backdrop-saturate":[Oe,pe,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Oe,pe,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Oe,"initial",pe,me]}],ease:[{ease:["linear","initial",N,pe,me]}],delay:[{delay:[Oe,pe,me]}],animate:[{animate:["none",z,pe,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,pe,me]}],"perspective-origin":[{"perspective-origin":Z()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:nt()}],"skew-x":[{"skew-x":nt()}],"skew-y":[{"skew-y":nt()}],transform:[{transform:[pe,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:Z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pe()}],"translate-x":[{"translate-x":Pe()}],"translate-y":[{"translate-y":Pe()}],"translate-z":[{"translate-z":Pe()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,me]}],"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":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",pe,me]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[Oe,Mo,pr,Qy]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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"]}},t_=DM(e_);function Ie(...n){return t_(Xv(n))}const n_=Hw("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 Na({className:n,variant:r="default",size:o="default",asChild:i=!1,...c}){const u=i?Bw:"button";return x.jsx(u,{"data-slot":"button","data-variant":r,"data-size":o,className:Ie(n_({variant:r,size:o,className:n})),...c})}function l_({deckTitle:n,sourceLabel:r,isSaving:o}){return x.jsxs("header",{className:"flex min-h-14 items-center justify-between gap-4 border-b border-foreground/[0.08] bg-white px-5 py-2.5 max-[1200px]:flex-col max-[1200px]:items-start",children:[x.jsxs("div",{className:"grid min-w-0 gap-1",children:[x.jsxs("div",{className:"flex min-w-0 items-center gap-4",children:[x.jsx("h1",{className:"min-w-0 flex-1 truncate text-[16px] font-semibold leading-tight text-foreground",children:n}),o?x.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]}),x.jsx("div",{className:"flex min-w-0 items-center gap-3",children:x.jsx("p",{className:"m-0 min-w-0 truncate text-[12px] text-foreground/45",children:r})})]}),x.jsx("div",{className:"flex items-center gap-1 max-[1200px]:w-full max-[1200px]:justify-end",children:x.jsx(Na,{type:"button",variant:"outline","aria-label":"Present slides",title:"Present mode UI placeholder",children:"Present"})})]})}function r_({className:n,children:r,...o}){return x.jsxs(iA,{"data-slot":"scroll-area",className:Ie("relative",n),...o,children:[x.jsx(cA,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:r}),x.jsx(a_,{}),x.jsx(sA,{})]})}function a_({className:n,orientation:r="vertical",...o}){return x.jsx(E0,{"data-slot":"scroll-area-scrollbar",orientation:r,className:Ie("flex touch-none p-px transition-colors select-none",r==="vertical"&&"h-full w-2.5 border-l border-l-transparent",r==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",n),...o,children:x.jsx(M0,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function o_({slides:n,activeSlideId:r,slideCount:o,thumbnails:i,onSelectSlide:c}){const u=y.useCallback(d=>{d==null||d.scrollIntoView({block:"nearest",inline:"nearest"})},[]);return x.jsx("aside",{className:"group/sidebar relative flex min-h-0 min-w-0 basis-[124px] items-stretch justify-start overflow-hidden bg-transparent p-3 transition-[flex-basis,width,opacity] duration-200 ease-out after:absolute after:inset-y-1.5 after:right-0 after:w-px after:bg-foreground/10 hover:basis-[260px] focus-within:basis-[260px] max-[1200px]:basis-auto max-[1200px]:p-0 max-[1200px]:pb-2.5 max-[1200px]:after:inset-x-0 max-[1200px]:after:inset-y-auto max-[1200px]:after:bottom-0 max-[1200px]:after:h-px max-[1200px]:after:w-auto","data-testid":"slide-sidebar",children:x.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col gap-2.5","data-testid":"slide-sidebar-panel",children:[x.jsx("div",{className:"flex min-h-7 items-center pt-1",children:x.jsxs("span",{className:"inline-block text-[10px] font-medium uppercase tracking-wider text-foreground/40","data-testid":"slide-count",children:[o," slide",o===1?"":"s"]})}),x.jsx(r_,{className:"min-h-0 flex-1 overflow-hidden pt-2 [mask-image:linear-gradient(to_bottom,transparent_0,black_18px,black_calc(100%_-_18px),transparent_100%)]","data-testid":"slide-list",children:x.jsx("div",{className:"grid content-start gap-2.5 pr-2 transition-[gap] duration-150 group-[:not(:hover):not(:focus-within)]/sidebar:gap-2",children:n.map((d,h)=>x.jsx("button",{ref:d.id===r?u:null,className:Ie("grid w-full cursor-pointer gap-2 border-0 bg-transparent p-0 text-left opacity-100 transition-opacity duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",d.id!==r&&"group-[:not(:hover):not(:focus-within)]/sidebar:opacity-90"),onClick:()=>c(d.id),type:"button","aria-label":`Slide ${h+1}`,"aria-current":d.id===r?"true":void 0,"data-testid":"slide-card",children:x.jsxs("div",{className:Ie("relative aspect-video w-full overflow-hidden rounded-xl border border-foreground/[0.08] bg-white transition-[border-color,box-shadow,border-radius] duration-150 group-[:not(:hover):not(:focus-within)]/sidebar:rounded-lg",d.id===r&&"border-foreground/25 shadow-[0_0_0_2px_rgba(255,255,255,0.9),0_0_0_4px_rgba(0,0,0,0.08)]"),"data-testid":"slide-thumbnail",children:[i[d.id]?x.jsx("img",{alt:`Slide ${h+1}`,className:Ie("block size-full bg-transparent object-cover",d.id===r&&"shadow-[inset_0_0_0_1px_rgba(0,0,0,0.08)]"),src:i[d.id]}):x.jsx("div",{className:Ie("grid size-full place-items-center bg-foreground/[0.03]",d.id===r&&"shadow-[inset_0_0_0_1px_rgba(0,0,0,0.08)]"),"aria-hidden":"true",children:x.jsx("span",{className:"size-[18px] animate-spin rounded-full border-[1.5px] border-foreground/15 border-t-foreground/45"})}),x.jsx("span",{className:"pointer-events-none absolute right-2 top-2 rounded-md bg-foreground/65 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider text-background opacity-0 transition-opacity duration-150 group-hover/sidebar:opacity-100 group-focus-within/sidebar:opacity-100",children:h+1})]})},d.id))})})]})})}function i_({selectionBounds:n,snapGuides:r,resizeHandles:o,rotationHandle:i,onResizeHandleMouseDown:c,onRotateHandleMouseDown:u}){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 x.jsxs(x.Fragment,{children:[r.map((h,m)=>{const p=h.variant==="spacing"?"2px":"1px";return x.jsx("div",{className:"pointer-events-none absolute z-[4] border-foreground","data-testid":`snap-guide-${h.orientation}`,"data-variant":h.variant,style:h.orientation==="vertical"?{left:`${h.start.x}px`,top:`${Math.min(h.start.y,h.end.y)}px`,width:"0",height:`${Math.max(Math.abs(h.end.y-h.start.y),32)}px`,borderLeftWidth:p,borderLeftStyle:"solid",opacity:h.variant==="spacing"?.9:.82}:{left:`${Math.min(h.start.x,h.end.x)}px`,top:`${h.start.y}px`,width:`${Math.max(Math.abs(h.end.x-h.start.x),32)}px`,height:"0",borderTopWidth:p,borderTopStyle:"solid",opacity:h.variant==="spacing"?.9:.82}},`${h.orientation}-${h.start.x}-${h.start.y}-${h.end.x}-${h.end.y}-${h.variant}-${m}`)}),x.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:u}),o.map(h=>x.jsx("button",{type:"button",className:`${d} cursor-nwse-resize`,"data-testid":`block-resize-handle-${h.corner}`,"aria-label":`Resize selected element from ${h.corner}`,style:{left:`${h.x}px`,top:`${h.y}px`},onMouseDown:m=>{c(h.corner,m)}},h.corner))]})}/**
|
|
92
|
+
* @license lucide-react v1.14.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const Ax=(...n)=>n.filter((r,o,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===o).join(" ").trim();/**
|
|
97
|
+
* @license lucide-react v1.14.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const c_=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
102
|
+
* @license lucide-react v1.14.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const s_=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,i)=>i?i.toUpperCase():o.toLowerCase());/**
|
|
107
|
+
* @license lucide-react v1.14.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const Jy=n=>{const r=s_(n);return r.charAt(0).toUpperCase()+r.slice(1)};/**
|
|
112
|
+
* @license lucide-react v1.14.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/var Uf={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"};/**
|
|
117
|
+
* @license lucide-react v1.14.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const u_=n=>{for(const r in n)if(r.startsWith("aria-")||r==="role"||r==="title")return!0;return!1},f_=y.createContext({}),d_=()=>y.useContext(f_),h_=y.forwardRef(({color:n,size:r,strokeWidth:o,absoluteStrokeWidth:i,className:c="",children:u,iconNode:d,...h},m)=>{const{size:p=24,strokeWidth:v=2,absoluteStrokeWidth:b=!1,color:S="currentColor",className:C=""}=d_()??{},T=i??b?Number(o??v)*24/Number(r??p):o??v;return y.createElement("svg",{ref:m,...Uf,width:r??p??Uf.width,height:r??p??Uf.height,stroke:n??S,strokeWidth:T,className:Ax("lucide",C,c),...!u&&!u_(h)&&{"aria-hidden":"true"},...h},[...d.map(([E,A])=>y.createElement(E,A)),...Array.isArray(u)?u:[u]])});/**
|
|
122
|
+
* @license lucide-react v1.14.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const Ge=(n,r)=>{const o=y.forwardRef(({className:i,...c},u)=>y.createElement(h_,{ref:u,iconNode:r,className:Ax(`lucide-${c_(Jy(n))}`,`lucide-${n}`,i),...c}));return o.displayName=Jy(n),o};/**
|
|
127
|
+
* @license lucide-react v1.14.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const m_=[["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"}]],dd=Ge("align-center-horizontal",m_);/**
|
|
132
|
+
* @license lucide-react v1.14.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const p_=[["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"}]],Mx=Ge("align-center-vertical",p_);/**
|
|
137
|
+
* @license lucide-react v1.14.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const g_=[["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"}]],_x=Ge("align-end-horizontal",g_);/**
|
|
142
|
+
* @license lucide-react v1.14.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const y_=[["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"}]],Rx=Ge("align-end-vertical",y_);/**
|
|
147
|
+
* @license lucide-react v1.14.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const v_=[["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"}]],Nx=Ge("align-start-horizontal",v_);/**
|
|
152
|
+
* @license lucide-react v1.14.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const b_=[["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"}]],Ox=Ge("align-start-vertical",b_);/**
|
|
157
|
+
* @license lucide-react v1.14.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const x_=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],zx=Ge("arrow-down-to-line",x_);/**
|
|
162
|
+
* @license lucide-react v1.14.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const S_=[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]],hd=Ge("arrow-up-to-line",S_);/**
|
|
167
|
+
* @license lucide-react v1.14.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const w_=[["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"}]],E_=Ge("box",w_);/**
|
|
172
|
+
* @license lucide-react v1.14.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const C_=[["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"}]],Bf=Ge("case-sensitive",C_);/**
|
|
177
|
+
* @license lucide-react v1.14.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const T_=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],A_=Ge("check",T_);/**
|
|
182
|
+
* @license lucide-react v1.14.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const M_=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ns=Ge("chevron-down",M_);/**
|
|
187
|
+
* @license lucide-react v1.14.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const __=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],R_=Ge("chevron-right",__);/**
|
|
192
|
+
* @license lucide-react v1.14.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const N_=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],ih=Ge("chevron-up",N_);/**
|
|
197
|
+
* @license lucide-react v1.14.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const O_=[["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"}]],md=Ge("columns-3",O_);/**
|
|
202
|
+
* @license lucide-react v1.14.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const z_=[["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"}]],D_=Ge("copy",z_);/**
|
|
207
|
+
* @license lucide-react v1.14.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const j_=[["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"}]],L_=Ge("eye",j_);/**
|
|
212
|
+
* @license lucide-react v1.14.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const k_=[["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"}]],pd=Ge("group",k_);/**
|
|
217
|
+
* @license lucide-react v1.14.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const H_=[["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"}]],U_=Ge("hash",H_);/**
|
|
222
|
+
* @license lucide-react v1.14.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const B_=[["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"}]],G_=Ge("layers",B_);/**
|
|
227
|
+
* @license lucide-react v1.14.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const Y_=[["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"}]],V_=Ge("link-2",Y_);/**
|
|
232
|
+
* @license lucide-react v1.14.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const q_=[["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"}]],Wy=Ge("lock",q_);/**
|
|
237
|
+
* @license lucide-react v1.14.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const X_=[["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"}]],ev=Ge("palette",X_);/**
|
|
242
|
+
* @license lucide-react v1.14.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const I_=[["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"}]],P_=Ge("pilcrow",I_);/**
|
|
247
|
+
* @license lucide-react v1.14.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const $_=[["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"}]],K_=Ge("rotate-cw",$_);/**
|
|
252
|
+
* @license lucide-react v1.14.0 - ISC
|
|
253
|
+
*
|
|
254
|
+
* This source code is licensed under the ISC license.
|
|
255
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
+
*/const Q_=[["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"}]],Dx=Ge("rows-3",Q_);/**
|
|
257
|
+
* @license lucide-react v1.14.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*/const Z_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],tv=Ge("square",Z_);/**
|
|
262
|
+
* @license lucide-react v1.14.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/const F_=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],J_=Ge("text-align-center",F_);/**
|
|
267
|
+
* @license lucide-react v1.14.0 - ISC
|
|
268
|
+
*
|
|
269
|
+
* This source code is licensed under the ISC license.
|
|
270
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
+
*/const W_=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],eR=Ge("text-align-end",W_);/**
|
|
272
|
+
* @license lucide-react v1.14.0 - ISC
|
|
273
|
+
*
|
|
274
|
+
* This source code is licensed under the ISC license.
|
|
275
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
+
*/const tR=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],nR=Ge("text-align-start",tR);/**
|
|
277
|
+
* @license lucide-react v1.14.0 - ISC
|
|
278
|
+
*
|
|
279
|
+
* This source code is licensed under the ISC license.
|
|
280
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
+
*/const lR=[["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"}]],rR=Ge("trash-2",lR);/**
|
|
282
|
+
* @license lucide-react v1.14.0 - ISC
|
|
283
|
+
*
|
|
284
|
+
* This source code is licensed under the ISC license.
|
|
285
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
+
*/const aR=[["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"}]],nv=Ge("type",aR);/**
|
|
287
|
+
* @license lucide-react v1.14.0 - ISC
|
|
288
|
+
*
|
|
289
|
+
* This source code is licensed under the ISC license.
|
|
290
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
+
*/const oR=[["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"}]],jx=Ge("ungroup",oR);function iR({...n}){return x.jsx(YT,{"data-slot":"context-menu",...n})}function cR({...n}){return x.jsx(VT,{"data-slot":"context-menu-trigger",...n})}function Gf({...n}){return x.jsx($T,{"data-slot":"context-menu-sub",...n})}function Yf({className:n,inset:r,children:o,...i}){return x.jsxs(KT,{"data-slot":"context-menu-sub-trigger","data-inset":r,className:Ie("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,x.jsx(R_,{className:"ml-auto size-3.5 text-foreground/40"})]})}function Vf({className:n,...r}){return x.jsx(QT,{"data-slot":"context-menu-sub-content",className:Ie("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),...r})}function sR({className:n,...r}){return x.jsx(qT,{children:x.jsx(XT,{"data-slot":"context-menu-content",className:Ie("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),...r})})}function zt({className:n,inset:r,variant:o="default",...i}){return x.jsx(IT,{"data-slot":"context-menu-item","data-inset":r,"data-variant":o,className:Ie("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 lv({className:n,...r}){return x.jsx(PT,{"data-slot":"context-menu-separator",className:Ie("-mx-1 my-1 h-px bg-foreground/10",n),...r})}function rv({className:n,...r}){return x.jsx("span",{"data-slot":"context-menu-shortcut",className:Ie("ml-auto text-[11px] tracking-normal text-foreground/40",n),...r})}function uR({children:n,selectionCommandAvailability:r,onAlignToSlide:o,onDelete:i,onDistribute:c,onDuplicate:u,onGroup:d,onLayerOrder:h,onUngroup:m}){return x.jsxs(iR,{children:[x.jsx(cR,{asChild:!0,children:n}),x.jsxs(sR,{"aria-label":"Selection actions",children:[x.jsxs(zt,{disabled:!r.group,onSelect:d,children:[x.jsx(pd,{className:"size-3.5"}),"Group"]}),x.jsxs(zt,{disabled:!r.ungroup,onSelect:m,children:[x.jsx(jx,{className:"size-3.5"}),"Ungroup"]}),x.jsx(lv,{}),x.jsxs(Gf,{children:[x.jsxs(Yf,{children:[x.jsx(hd,{className:"size-3.5"}),"Layer"]}),x.jsxs(Vf,{children:[x.jsxs(zt,{onSelect:()=>h("front"),children:[x.jsx(hd,{className:"size-3.5"}),"Bring to front"]}),x.jsxs(zt,{onSelect:()=>h("forward"),children:[x.jsx(ih,{className:"size-3.5"}),"Bring forward"]}),x.jsxs(zt,{onSelect:()=>h("backward"),children:[x.jsx(ns,{className:"size-3.5"}),"Send backward"]}),x.jsxs(zt,{onSelect:()=>h("back"),children:[x.jsx(zx,{className:"size-3.5"}),"Send to back"]})]})]}),x.jsxs(Gf,{children:[x.jsxs(Yf,{children:[x.jsx(dd,{className:"size-3.5"}),"Align"]}),x.jsxs(Vf,{children:[x.jsxs(zt,{onSelect:()=>o("left"),children:[x.jsx(Nx,{className:"size-3.5"}),"Align left"]}),x.jsxs(zt,{onSelect:()=>o("hcenter"),children:[x.jsx(dd,{className:"size-3.5"}),"Align horizontal center"]}),x.jsxs(zt,{onSelect:()=>o("right"),children:[x.jsx(_x,{className:"size-3.5"}),"Align right"]}),x.jsxs(zt,{onSelect:()=>o("top"),children:[x.jsx(Ox,{className:"size-3.5"}),"Align top"]}),x.jsxs(zt,{onSelect:()=>o("vcenter"),children:[x.jsx(Mx,{className:"size-3.5"}),"Align vertical center"]}),x.jsxs(zt,{onSelect:()=>o("bottom"),children:[x.jsx(Rx,{className:"size-3.5"}),"Align bottom"]})]})]}),x.jsxs(Gf,{children:[x.jsxs(Yf,{children:[x.jsx(md,{className:"size-3.5"}),"Distribute"]}),x.jsxs(Vf,{children:[x.jsxs(zt,{onSelect:()=>c("horizontal"),children:[x.jsx(md,{className:"size-3.5"}),"Horizontally"]}),x.jsxs(zt,{onSelect:()=>c("vertical"),children:[x.jsx(Dx,{className:"size-3.5"}),"Vertically"]})]})]}),x.jsx(lv,{}),x.jsxs(zt,{onSelect:u,children:[x.jsx(D_,{className:"size-3.5"}),"Duplicate",x.jsx(rv,{children:"⌘D"})]}),x.jsxs(zt,{variant:"destructive",onSelect:i,children:[x.jsx(rR,{className:"size-3.5"}),"Delete",x.jsx(rv,{children:"Del"})]})]})]})}const fR=[{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 dR(n,r){const o=ov(n),i=ov(r);return!o||!i?!1:o===i||iv(av(n))===iv(av(r))}function hR(n){const r=n.trim().toLowerCase();if(r==="bold"||r==="bolder")return!0;const o=Number.parseInt(r,10);return Number.isFinite(o)&&o>=600}function gd(n){const r=new Set,o=n.toLowerCase();if(!o||o==="none")return r;for(const i of o.split(/\s+/))(i==="underline"||i==="line-through"||i==="overline")&&r.add(i);return r}function mR(n){return pR(n)?n.trim():gR(n)??"#000000"}function pR(n){return/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function av(n){return(n.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function ov(n){return n.toLowerCase().replace(/["']/g,"").replace(/\s+/g," ").trim()}function iv(n){return n.toLowerCase().replace(/["']/g,"").trim()}function qf(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function gR(n){const r=n.trim().match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,/]+[\d.]+)?\s*\)$/i);return r?`#${qf(r[1]||"0")}${qf(r[2]||"0")}${qf(r[3]||"0")}`:null}function yd({feature:n,inspectedStyles:r,attributeValues:o}){var c,u;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=vR(r,n.propertyName);return n.id==="font-family"?((u=(c=n.options)==null?void 0:c.find(d=>dR(i,d.value)))==null?void 0:u.value)??i:n.id==="font-size"&&i.endsWith("px")?i.slice(0,-2):n.id==="line-height"||n.id==="opacity"?i||(n.id==="opacity"?"1":""):n.id==="rotation"?String(En(i).rotate):n.controlType==="color"?mR(i):n.id==="text-align"&&i==="start"?"left":i}function cv(n,r){return n.id==="font-size"&&r.trim()?`${Math.min(200,Math.max(8,Number.parseFloat(r)||8))}px`:n.id==="font-bold"?r?"700":"400":n.id==="font-italic"?r?"italic":"normal":n.id==="font-underline"?r?"underline":"none":n.id==="font-strikethrough"?r?"line-through":"none":n.id==="locked"?r?"true":"":r.trim()}function sv(n,r,o){const i=gd(n);return o?i.delete(r):i.add(r),i.size?Array.from(i).join(" "):"none"}function Lx(n,r){return n.id==="font-bold"?hR(r):n.id==="font-italic"?r.trim().toLowerCase()==="italic":n.id==="font-underline"?gd(r).has("underline"):n.id==="font-strikethrough"?gd(r).has("line-through"):n.id==="locked"?r==="true":!!r}function yR(n,r){const o=n.options??[{label:"unset",value:""}];return!r||o.some(i=>i.value===r)?o:[{label:r,value:r},...o]}function vR(n,r){var o;return((o=n.find(i=>i.name===r))==null?void 0:o.value)??""}function bR({attributeValues:n,feature:r,inspectedStyles:o,nextValue:i,onAlignToSlide:c,onAttributeChange:u,onLayerOrder:d,onStyleChange:h}){if(r.target==="style"&&r.propertyName){const m=yd({feature:r,inspectedStyles:o,attributeValues:n});if(r.id==="rotation"){const p=xR(o),v=En(p),b=Number.parseFloat(i);h(r.propertyName,al(v.translateX,v.translateY,Number.isFinite(b)?b:0)??"");return}if(r.id==="font-underline"){h(r.propertyName,sv(m,"underline",i===""));return}if(r.id==="font-strikethrough"){h(r.propertyName,sv(m,"line-through",i===""));return}h(r.propertyName,cv(r,i));return}if(r.target==="attribute"&&r.attributeName){u(r.attributeName,cv(r,i));return}r.id==="align-to-slide"&&c(i),r.id==="layer-order"&&d(i)}function xR(n){var r;return((r=n.find(o=>o.name==="transform"))==null?void 0:r.value)??""}const SR=[{value:"left",label:"Left",icon:nR},{value:"center",label:"Center",icon:J_},{value:"right",label:"Right",icon:eR}],wR=[{value:"left",icon:Nx,label:"Align left"},{value:"hcenter",icon:dd,label:"Align horizontal center"},{value:"right",icon:_x,label:"Align right"},{value:"top",icon:Ox,label:"Align top"},{value:"vcenter",icon:Mx,label:"Align vertical center"},{value:"bottom",icon:Rx,label:"Align bottom"}],ER=[{value:"front",icon:hd,label:"Bring to front"},{value:"forward",icon:ih,label:"Bring forward"},{value:"backward",icon:ns,label:"Send backward"},{value:"back",icon:zx,label:"Send to back"}],CR=[{value:"horizontal",icon:md,label:"Distribute horizontally"},{value:"vertical",icon:Dx,label:"Distribute vertically"}],uv=[{id:"typography",label:"Typography",icon:nv,subgroups:[{id:"font",label:"Font",icon:nv,features:[{id:"font-family",label:"Font family",controlType:"select",target:"style",propertyName:"font-family",options:fR.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:P_,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:SR}]}]},{id:"appearance",label:"Appearance",icon:ev,subgroups:[{id:"fill",label:"Fill",icon:ev,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:E_,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:tv,subgroups:[{id:"size",label:"Size",icon:tv,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:L_,features:[{id:"opacity",label:"Opacity",controlType:"slider",target:"style",propertyName:"opacity",min:0,max:1,step:.01}]},{id:"rotation",label:"Rotation",icon:K_,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:G_,features:[{id:"align-to-slide",label:"Align selected element to slide bounds",controlType:"action-group",target:"operation",options:wR},{id:"layer-order",label:"Layer order",controlType:"action-group",target:"operation",options:ER},{id:"distribute",label:"Distribute selection",controlType:"action-group",target:"operation",options:CR}]},{id:"grouping",label:"Group",icon:pd,features:[{id:"group",label:"Group selection",controlType:"action-group",target:"operation",options:[{value:"group",icon:pd,label:"Group"}]},{id:"ungroup",label:"Ungroup selected group",controlType:"action-group",target:"operation",options:[{value:"ungroup",icon:jx,label:"Ungroup"}]}]}]},{id:"misc",label:"Misc",icon:Wy,subgroups:[{id:"state",label:"State",icon:Wy,features:[{id:"locked",label:"Lock / unlock",controlType:"toggle",target:"attribute",attributeName:"data-editor-locked"}]},{id:"link",label:"Link",icon:V_,features:[{id:"link-url",label:"Link URL",controlType:"text",target:"attribute",attributeName:"data-link-url",placeholder:"https://"}]}]},{id:"others",label:"Others",icon:Bf,subgroups:[{id:"text-alternatives",label:"Text alternatives",icon:Bf,features:[{id:"alt-text",label:"Alt text",controlType:"text",target:"attribute",attributeName:"alt",placeholder:"Describe this element"}]},{id:"labels",label:"Labels",icon:Bf,features:[{id:"aria-label",label:"ARIA label",controlType:"text",target:"attribute",attributeName:"aria-label",placeholder:"aria-label"}]},{id:"css",label:"CSS",icon:U_,features:[{id:"custom-css",label:"Custom CSS property",controlType:"custom-css",target:"style"}]}]}],TR=200,kx="motion-safe:duration-200 motion-safe:ease-out",Hx="motion-safe:animate-in motion-safe:fade-in-0 motion-reduce:animate-none",AR="motion-safe:animate-out motion-safe:fade-out-0 motion-reduce:animate-none";function ko({className:n,type:r,...o}){return x.jsx("input",{type:r,"data-slot":"input",className:Ie("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 MR=["#0F172A","#FFFFFF","#EF4444","#F97316","#F59E0B","#EAB308","#84CC16","#10B981","#06B6D4","#3B82F6","#8B5CF6","#EC4899"],_R=["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 RR({value:n,includeGradients:r=!0,onChange:o}){const i=y.useRef(null),c=y.useRef(null),u=y.useMemo(()=>NR(n),[n]),d=Xf(u),[h,m]=y.useState(d.replace("#","")),p=`hsl(${u.h}, 100%, 50%)`;y.useEffect(()=>{m(d.replace("#",""))},[d]);function v(S){var A;const C=(A=i.current)==null?void 0:A.getBoundingClientRect();if(!C)return;S.currentTarget.setPointerCapture(S.pointerId);const T=xc((S.clientX-C.left)/C.width,0,1),E=xc(1-(S.clientY-C.top)/C.height,0,1);o(Xf({...u,s:T,v:E}))}function b(S){var E;const C=(E=c.current)==null?void 0:E.getBoundingClientRect();if(!C)return;S.currentTarget.setPointerCapture(S.pointerId);const T=Math.round(xc((S.clientX-C.left)/C.width,0,1)*360);o(Xf({...u,h:T===360?0:T}))}return x.jsxs("div",{className:"grid gap-3",children:[x.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(u.v*100),"aria-valuetext":d,tabIndex:0,style:{backgroundColor:p},onPointerDown:v,onPointerMove:S=>{S.buttons===1&&v(S)},children:x.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(${u.s*100}% + ${(.5-u.s)*22}px)`,top:`calc(${(1-u.v)*100}% + ${(u.v-.5)*22}px)`}})}),x.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":u.h,tabIndex:0,onPointerDown:b,onPointerMove:S=>{S.buttons===1&&b(S)},children:x.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:p,left:`${u.h/360*100}%`}})}),x.jsxs("div",{className:"grid grid-cols-[40px_auto_minmax(0,1fr)] items-center gap-2",children:[x.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"}),x.jsx("span",{className:"font-mono text-sm font-medium leading-none text-foreground/45",children:"#"}),x.jsx(ko,{className:"h-8 rounded-md bg-foreground/[0.03] px-2 font-mono text-sm font-medium uppercase",type:"text",value:h,spellCheck:!1,onChange:S=>{const C=S.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6);m(C),C.length===6&&o(`#${C}`)},onBlur:()=>{m(d.replace("#",""))}})]}),x.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset colors",children:[x.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Presets"}),x.jsx("div",{className:"grid grid-cols-12 gap-1",children:MR.map(S=>x.jsx("button",{className:Ie("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))})]}),r?x.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset gradients",children:[x.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Gradients"}),x.jsx("div",{className:"grid grid-cols-6 gap-1.5",children:_R.map(S=>x.jsx("button",{className:Ie("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 xc(n,r,o){return Math.min(Math.max(n,r),o)}function NR(n){const r={h:220,s:.54,v:.5},o=/^#?([0-9a-f]{6})$/i.exec(n.trim());if(!o)return r;const i=o[1],c=Number.parseInt(i.slice(0,2),16)/255,u=Number.parseInt(i.slice(2,4),16)/255,d=Number.parseInt(i.slice(4,6),16)/255,h=Math.max(c,u,d),m=Math.min(c,u,d),p=h-m;let v=0;p!==0&&(h===c?v=(u-d)/p%6:h===u?v=(d-c)/p+2:v=(c-u)/p+4);const b=Math.round(v*60);return{h:b<0?b+360:b,s:h===0?0:p/h,v:h}}function Xf({h:n,s:r,v:o}){const i=o*r,c=i*(1-Math.abs(n/60%2-1)),u=o-i;let d=0,h=0,m=0;return n<60?(d=i,h=c):n<120?(d=c,h=i):n<180?(h=i,m=c):n<240?(h=c,m=i):n<300?(d=c,m=i):(d=i,m=c),`#${If(d+u)}${If(h+u)}${If(m+u)}`.toUpperCase()}function If(n){return Math.round(xc(n,0,1)*255).toString(16).padStart(2,"0")}function OR({className:n,orientation:r="horizontal",decorative:o=!0,...i}){return x.jsx(KA,{"data-slot":"separator",decorative:o,orientation:r,className:Ie("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 zR({children:n,active:r=!1,label:o,onClick:i}){return x.jsx(Na,{variant:r?"secondary":"ghost",size:"icon-sm",className:Ie("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",r&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":o,title:o,onClick:i,children:n})}function DR({children:n,active:r=!1,label:o,onClick:i}){return x.jsx(Na,{variant:r?"secondary":"ghost",size:"icon-sm",className:Ie("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",r&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":o,title:o,onClick:i,children:n})}function jR({children:n,left:r,width:o="default"}){const i=y.useRef(null),[c,u]=y.useState({x:0,y:0});y.useLayoutEffect(()=>{const h=i.current;if(!h)return;const m=h.getBoundingClientRect(),p=h.closest('[data-testid="floating-toolbar-anchor"]'),v=p instanceof HTMLElement?p.getBoundingClientRect():null,b=v?v.left+r:m.left-c.x,S=v?v.bottom+8:m.top-c.y,C={bottom:S+m.height,left:b,right:b+m.width,top:S},T=16;let E=0,A=0;C.right>window.innerWidth-T&&(E=window.innerWidth-T-C.right),C.left+E<T&&(E+=T-(C.left+E)),C.bottom>window.innerHeight-T&&(A=window.innerHeight-T-C.bottom),C.top+A<T&&(A+=T-(C.top+A)),(vd(c.x,E)||vd(c.y,A))&&u({x:E,y:A})},[r,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 x.jsx("div",{className:Ie("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)]",kx,Hx,d),ref:i,style:{left:r+c.x,top:`calc(100% + 8px + ${c.y}px)`},role:"menu",children:n})}function LR(n){return n.features.some(r=>r.controlType==="color")?"wide":n.features.some(r=>r.controlType==="action-group")?"medium":"default"}function vd(n,r){return Math.abs(n-r)>=.5}function kR(){return x.jsx(OR,{orientation:"vertical",className:"mx-1 h-4 bg-foreground/10"})}function HR({children:n}){return x.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 gr({children:n,htmlFor:r}){return x.jsx("label",{htmlFor:r,className:"text-[10px] font-medium uppercase tracking-wider text-foreground/50",children:n})}function bd({icon:n}){return x.jsx(n,{className:"size-3.5"})}function UR({children:n,disabled:r=!1,onClick:o,title:i}){return x.jsx(Na,{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:r,title:i,onClick:o,children:n})}function BR({...n}){return x.jsx(zA,{"data-slot":"select",...n})}function GR({...n}){return x.jsx(BA,{"data-slot":"select-group",...n})}function YR({...n}){return x.jsx(jA,{"data-slot":"select-value",...n})}function VR({className:n,size:r="default",children:o,...i}){return x.jsxs(DA,{"data-slot":"select-trigger","data-size":r,className:Ie("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,x.jsx(LA,{asChild:!0,children:x.jsx(ns,{className:"size-4 opacity-50"})})]})}function qR({className:n,children:r,position:o="item-aligned",align:i="center",...c}){return x.jsx(kA,{children:x.jsxs(HA,{"data-slot":"select-content",className:Ie("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:[x.jsx(IR,{}),x.jsx(UA,{className:Ie("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),x.jsx(PR,{})]})})}function XR({className:n,children:r,...o}){return x.jsxs(GA,{"data-slot":"select-item",className:Ie("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:[x.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:x.jsx(VA,{children:x.jsx(A_,{className:"size-4"})})}),x.jsx(YA,{children:r})]})}function IR({className:n,...r}){return x.jsx(qA,{"data-slot":"select-scroll-up-button",className:Ie("flex cursor-default items-center justify-center py-1",n),...r,children:x.jsx(ih,{className:"size-4"})})}function PR({className:n,...r}){return x.jsx(XA,{"data-slot":"select-scroll-down-button",className:Ie("flex cursor-default items-center justify-center py-1",n),...r,children:x.jsx(ns,{className:"size-4"})})}const dc="__empty__";function $R({currentValue:n,feature:r,onClosePanel:o,onCommitFeature:i,operationAvailability:c,onStyleChange:u}){const d=`floating-${r.id}`;if(r.controlType==="select")return x.jsxs("div",{className:"grid gap-1",children:[x.jsx(gr,{htmlFor:d,children:r.label}),x.jsxs(BR,{value:n||dc,onValueChange:h=>i(r,h===dc?"":h),children:[x.jsx(VR,{id:d,"aria-label":r.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:x.jsx(YR,{})}),x.jsx(qR,{children:x.jsx(GR,{children:yR(r,n).map(h=>x.jsx(XR,{value:h.value||dc,"data-value":h.value,style:r.id==="font-family"&&h.value?{fontFamily:h.value}:void 0,children:h.label},h.value||dc))})})]})]},r.id);if(r.controlType==="color")return x.jsxs("div",{className:"grid gap-1",children:[x.jsx(gr,{children:r.label}),x.jsx(RR,{value:n,includeGradients:r.id==="background-color",onChange:h=>i(r,h)})]},r.id);if(r.controlType==="toggle"){const h=Lx(r,n);return x.jsx(Na,{type:"button",variant:h?"secondary":"outline","aria-pressed":h,onClick:()=>i(r,h?"":"true"),children:r.label},r.id)}return r.controlType==="slider"||r.controlType==="number"?x.jsxs("div",{className:"grid gap-1",children:[x.jsx(gr,{htmlFor:d,children:r.label}),x.jsx(ko,{id:d,type:"number",min:r.min,max:r.max,step:r.step,value:n,onChange:h=>i(r,h.target.value),className:"h-8 rounded-md bg-foreground/[0.03] px-2 text-[13px] tabular-nums"})]},r.id):r.controlType==="action-group"?x.jsxs("div",{className:"grid gap-1",children:[x.jsx(gr,{children:r.label}),x.jsx("div",{className:"grid gap-1",children:(r.options??[]).map(h=>{const m=h.icon,p=r.target==="operation"&&c?c[r.id]===!1:!1;return x.jsxs(UR,{disabled:p,title:h.label,onClick:()=>{p||(i(r,h.value),o())},children:[m?x.jsx(bd,{icon:m}):null,x.jsx("span",{children:h.label})]},h.value)})})]},r.id):r.controlType==="custom-css"?x.jsx(KR,{onCommit:u},r.id):x.jsxs("div",{className:"grid gap-1",children:[x.jsx(gr,{htmlFor:d,children:r.label}),x.jsx(ko,{id:d,type:"text",value:n,placeholder:r.placeholder,onChange:h=>i(r,h.target.value),className:"h-8 rounded-md bg-foreground/[0.03] px-2 text-[13px]"})]},r.id)}function KR({onCommit:n}){const r=y.useId(),o=y.useId(),[i,c]=y.useState(""),[u,d]=y.useState("");function h(){const m=i.trim();m&&(n(m,u.trim()),d(""))}return x.jsxs("div",{className:"grid gap-2",children:[x.jsxs("div",{className:"grid gap-1",children:[x.jsx(gr,{htmlFor:r,children:"Property name"}),x.jsx(ko,{id:r,type:"text",value:i,placeholder:"e.g. justify-content",onChange:m=>c(m.target.value)})]}),x.jsxs("div",{className:"grid gap-1",children:[x.jsx(gr,{htmlFor:o,children:"Property value"}),x.jsx(ko,{id:o,type:"text",value:u,placeholder:"e.g. space-between",onChange:m=>d(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),h())}})]}),x.jsx(Na,{type:"button",variant:"outline",disabled:!i.trim(),onClick:h,children:"Apply property"})]})}function QR({inspectedStyles:n,selectedElementType:r,selectionCommandAvailability:o,attributeValues:i,onStyleChange:c,onAttributeChange:u,onAlignToSlide:d,onDistribute:h,onGroup:m,onLayerOrder:p,onUngroup:v}){const b=y.useRef(null),[S,C]=y.useState(null),[T,E]=y.useState(0),[A,N]=y.useState(0),z=y.useRef(0);y.useEffect(()=>{if(b.current)return()=>{const H=b.current,I=H==null?void 0:H.closest('[data-testid="stage-panel"]');if(!(H instanceof HTMLElement)||!(I instanceof HTMLElement))return;const J=H.getBoundingClientRect(),le=I.getBoundingClientRect(),re=H.cloneNode(!0);re instanceof HTMLElement&&(re.className=Ie(re.className,"absolute z-40 m-0 pointer-events-none"),re.classList.remove("motion-safe:animate-in","motion-safe:fade-in-0"),re.className=Ie(re.className,AR),re.setAttribute("aria-hidden","true"),re.style.left=`${J.left-le.left}px`,re.style.top=`${J.top-le.top}px`,re.style.width=`${J.width}px`,re.style.height=`${J.height}px`,I.appendChild(re),re.addEventListener("animationend",()=>{re.remove()}),window.setTimeout(()=>{re.remove()},TR+50))}},[]),y.useLayoutEffect(()=>{const j=b.current;if(!j)return;const H=j.getBoundingClientRect(),I=H.left-z.current,J=H.right-z.current,le=16;let re=0;I<le&&(re=le-I),J+re>window.innerWidth-le&&(re+=window.innerWidth-le-(J+re)),vd(z.current,re)&&(z.current=re,N(re))},[]),y.useEffect(()=>{function j(H){var I;(I=b.current)!=null&&I.contains(H.target)||C(null)}return document.addEventListener("mousedown",j),()=>{document.removeEventListener("mousedown",j)}},[]),y.useEffect(()=>{function j(H){H.key==="Escape"&&C(null)}return document.addEventListener("keydown",j),()=>{document.removeEventListener("keydown",j)}},[]);function k(j,H){E(H),C(I=>I===j?null:j)}function q(j,H){if(j.id==="distribute"){h(H);return}if(j.id==="group"){m();return}if(j.id==="ungroup"){v();return}bR({attributeValues:i,feature:j,inspectedStyles:n,nextValue:H,onAlignToSlide:d,onAttributeChange:u,onLayerOrder:p,onStyleChange:c})}const Z=ZR(r);return x.jsxs("div",{className:Ie("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",kx,Hx),ref:b,style:{marginLeft:A},children:[x.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:Z.map((j,H)=>x.jsxs("div",{className:"contents",children:[H>0?x.jsx(kR,{}):null,x.jsx("div",{className:"flex items-center gap-0.5 rounded-md bg-foreground/[0.02] px-0.5",children:j.subgroups.map(I=>{const J=I.features.length===1?I.features[0]:null;return(J==null?void 0:J.controlType)==="toggle"?D(I,J):x.jsx(zR,{active:S===I.id,label:I.label,onClick:le=>k(I.id,le.currentTarget.offsetLeft),children:x.jsx(bd,{icon:I.icon})},I.id)})})]},j.id))}),Z.flatMap(j=>j.subgroups).map(j=>S===j.id?x.jsxs(jR,{left:T,width:LR(j),children:[x.jsx(HR,{children:j.label}),x.jsx("div",{className:"grid gap-2",children:j.features.map(_)})]},j.id):null)]});function D(j,H){const I=yd({feature:H,inspectedStyles:n,attributeValues:i}),J=Lx(H,I);return x.jsx(DR,{label:H.label,active:J,onClick:()=>q(H,J?"":"true"),children:x.jsx(bd,{icon:j.icon})},j.id)}function _(j){return $R({currentValue:yd({feature:j,inspectedStyles:n,attributeValues:i}),feature:j,onClosePanel:()=>C(null),onCommitFeature:q,operationAvailability:o,onStyleChange:c})}}function ZR(n){return n!=="group"?uv:uv.flatMap(r=>r.id!=="layout"?[]:[{...r,subgroups:r.subgroups.filter(o=>["size","rotation","layer-alignment","grouping"].includes(o.id))}])}function FR({slideWidth:n,slideHeight:r,offsetX:o,offsetY:i,scale:c,selectionOverlay:u,toolbarKey:d,inspectedStyles:h,selectedElementType:m,selectionCommandAvailability:p,groupScopeOverlayPassive:v,isEditingText:b,manipulationOverlay:S,attributeValues:C,iframeRef:T,stageViewportRef:E,selectionOverlayRef:A,isManipulating:N,onSelectionOverlayMouseDown:z,onResizeHandleMouseDown:k,onRotateHandleMouseDown:q,onSelectionOverlayDoubleClick:Z,onBackgroundClick:D,onStyleChange:_,onAttributeChange:j,onAlignToSlide:H,onDistribute:I,onGroup:J,onLayerOrder:le,onUngroup:re,onDuplicate:te,onDelete:ae}){const O=(G,$)=>{G===$&&D()},X=u?JR({selectionOverlay:u,offsetX:o,scale:c,slideWidth:n}):void 0;return x.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:E,onClick:G=>{O(G.target,G.currentTarget)},onKeyDown:G=>{(G.key==="Enter"||G.key===" ")&&O(G.target,G.currentTarget)},children:[u&&!N&&!b?x.jsx("div",{className:"pointer-events-none absolute z-40 w-max max-[1200px]:static max-[1200px]:mb-4 max-[1200px]:pointer-events-auto",style:X,"data-testid":"floating-toolbar-anchor",children:x.jsx(QR,{inspectedStyles:h,selectedElementType:m,selectionCommandAvailability:p,attributeValues:C,onStyleChange:_,onAttributeChange:j,onAlignToSlide:H,onDistribute:I,onGroup:J,onLayerOrder:le,onUngroup:re},d)}):null,b?x.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,x.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:`${r}px`,left:`${o}px`,top:`${i}px`,transform:`scale(${c})`},children:x.jsx("iframe",{ref:T,title:"Slide canvas",className:"size-full border-0 bg-white","data-testid":"slide-iframe"})}),u&&!b?x.jsx(uR,{selectionCommandAvailability:p,onAlignToSlide:H,onDelete:ae,onDistribute:I,onDuplicate:te,onGroup:J,onLayerOrder:le,onUngroup:re,children:x.jsx("div",{ref:A,"data-testid":"selection-overlay",className:Ie("absolute z-[3] border border-dashed border-foreground/55 bg-foreground/[0.02]",v?"pointer-events-none":"pointer-events-auto"),style:{left:`${u.x}px`,top:`${u.y}px`,width:`${u.width}px`,height:`${u.height}px`},onMouseDown:z,onDoubleClick:G=>{Z(G)}})}):null,S?x.jsx(i_,{selectionBounds:S.selectionBounds,snapGuides:S.snapGuides,resizeHandles:S.resizeHandles,rotationHandle:S.rotationHandle,onResizeHandleMouseDown:k,onRotateHandleMouseDown:q}):null]})}function JR({selectionOverlay:n,offsetX:r,scale:o,slideWidth:i}){const u=r,d=r+i*o,h=Math.max((d-u)/2,0),m=Math.min(288,h),p=u+m,v=d-m,b=n.x+n.width/2;return{left:`${Math.min(Math.max(b,p),Math.max(p,v))}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 WR({delayDuration:n=0,...r}){return x.jsx(dM,{"data-slot":"tooltip-provider",delayDuration:n,...r})}function xd(n,r,o){return Tw(n,r,o)}function No(n,r,o){var u;if(typeof DOMParser>"u")return"";const c=new DOMParser().parseFromString(n.htmlSource,"text/html").querySelector(`[${Ae}="${r}"]`);return((u=c==null?void 0:c.getAttribute(o))==null?void 0:u.trim())??""}function eN({elementId:n,nextValue:r,propertyName:o,slide:i}){const c=xd(i,n,o),u=r.trim();return c===u?null:{type:"style.update",slideId:i.id,elementId:n,propertyName:o,previousValue:c,nextValue:u,timestamp:Date.now()}}function tN({attributeName:n,elementId:r,nextValue:o,slide:i}){const c=No(i,r,n),u=o.trim();return c===u?null:{type:"attribute.update",slideId:i.id,elementId:r,attributeName:n,previousValue:c,nextValue:u,timestamp:Date.now()}}const nN=18,Ux=6,fv=80,hc=24,Hc=40,dv=12,hv=360;function Ul(n,r,o,i,c){return Math.max(n,o)-Math.min(r,i)<=c}function Bx(n,r){const o=[];return r.vertical&&o.push(...mv(n,r.vertical,"vertical")),r.horizontal&&o.push(...mv(n,r.horizontal,"horizontal")),o}function mv(n,r,o){return r.target.kind==="spacing"?rN(n,r,o):[lN(n,r,o)]}function lN(n,r,o){const i=r.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 h=pv(n,r.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 m=Math.min(n.y,i.rect.y),p=Math.max(n.y+n.height,i.rect.y+i.rect.height);return{orientation:o,start:{x:h,y:m-hc},end:{x:h,y:p+hc},variant:"alignment"}}const c=pv(n,r.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 u=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:u-hc,y:c},end:{x:d+hc,y:c},variant:"alignment"}}function rN(n,r,o){const i=r.target.relatedRects;if(i.length<2)return[];const[c,u]=i;if(!c||!u)return[];if(o==="vertical"){const C=c.x<=u.x?c:u,T=C===c?u:c,E=C.x+C.width,A=T.x,N=r.anchor==="start"?n.x:n.x+n.width,z={orientation:"horizontal",start:{x:E,y:C.y+C.height/2},end:{x:A,y:T.y+T.height/2},variant:"spacing"},k={orientation:"horizontal",start:r.anchor==="start"?{x:T.x+T.width,y:T.y+T.height/2}:{x:C.x,y:C.y+C.height/2},end:{x:N,y:n.y+n.height/2},variant:"spacing"};return[z,k]}const d=c.y<=u.y?c:u,h=d===c?u:c,m=d.y+d.height,p=h.y,v=r.anchor==="start"?n.y:n.y+n.height,b={orientation:"vertical",start:{x:d.x+d.width/2,y:m},end:{x:h.x+h.width/2,y:p},variant:"spacing"},S={orientation:"vertical",start:r.anchor==="start"?{x:h.x+h.width/2,y:h.y+h.height}:{x:d.x+d.width/2,y:d.y},end:{x:n.x+n.width/2,y:v},variant:"spacing"};return[b,S]}function pv(n,r,o){return o==="vertical"?r==="start"?n.x:r==="end"?n.x+n.width:n.x+n.width/2:r==="start"?n.y:r==="end"?n.y+n.height:n.y+n.height/2}function aN({activeSlide:n,doc:r,rootRect:o,selectedElementId:i,slideStageRect:c,stageGeometry:u}){var S;const d=(C,T)=>({position:C,rect:c,kind:"slide",role:T,anchor:null,priority:T==="center"?0:2,elementId:null,relatedRects:[]}),h=[d(c.x,"start"),d(c.x+c.width/2,"center"),d(c.x+c.width,"end")],m=[d(c.y,"start"),d(c.y+c.height/2,"center"),d(c.y+c.height,"end")],p=r.querySelector(`[data-editor-id="${i}"]`),v=[];for(const C of n.elements){if(C.id===i)continue;const T=r.querySelector(`[data-editor-id="${C.id}"]`);if(!T||p&&(p.contains(T)||T.contains(p)))continue;const E=(S=r.defaultView)==null?void 0:S.getComputedStyle(T);if((E==null?void 0:E.display)==="none"||(E==null?void 0:E.visibility)==="hidden")continue;const A=T.getBoundingClientRect();if(A.width<=0||A.height<=0)continue;const N=Oo(A,o,u);(C.type==="block"||C.type==="image")&&v.push({elementId:C.id,rect:N});const z=N.x,k=N.x+N.width/2,q=N.x+N.width,Z=N.y,D=N.y+N.height/2,_=N.y+N.height,j=(H,I)=>({position:H,rect:N,kind:"element",role:I,anchor:null,priority:I==="center"?3:4,elementId:C.id,relatedRects:[]});h.push(j(z,"start"),j(k,"center"),j(q,"end")),m.push(j(Z,"start"),j(D,"center"),j(_,"end"))}const b=oN(v);return h.push(...b.vertical),m.push(...b.horizontal),{vertical:h,horizontal:m}}function oN(n){const r=[],o=[],i=n.slice().sort((u,d)=>u.rect.x-d.rect.x).filter(u=>u.rect.width>0&&u.rect.height>0),c=n.slice().sort((u,d)=>u.rect.y-d.rect.y).filter(u=>u.rect.width>0&&u.rect.height>0);for(let u=0;u<i.length-1;u+=1){const d=i[u],h=i[u+1];if(!d||!h)continue;if(!Ul(d.rect.x,d.rect.x+d.rect.width,h.rect.x,h.rect.x+h.rect.width,0)){const p=h.rect.x-(d.rect.x+d.rect.width);p>=dv&&p<=hv&&Ul(d.rect.y,d.rect.y+d.rect.height,h.rect.y,h.rect.y+h.rect.height,Hc)&&r.push(mc({position:h.rect.x+h.rect.width+p,rect:h.rect,anchor:"start",relatedRects:[d.rect,h.rect]}),mc({position:d.rect.x-p,rect:d.rect,anchor:"end",relatedRects:[d.rect,h.rect]}))}}for(let u=0;u<c.length-1;u+=1){const d=c[u],h=c[u+1];if(!d||!h)continue;if(!Ul(d.rect.y,d.rect.y+d.rect.height,h.rect.y,h.rect.y+h.rect.height,0)){const p=h.rect.y-(d.rect.y+d.rect.height);p>=dv&&p<=hv&&Ul(d.rect.x,d.rect.x+d.rect.width,h.rect.x,h.rect.x+h.rect.width,Hc)&&o.push(mc({position:h.rect.y+h.rect.height+p,rect:h.rect,anchor:"start",relatedRects:[d.rect,h.rect]}),mc({position:d.rect.y-p,rect:d.rect,anchor:"end",relatedRects:[d.rect,h.rect]}))}}return{vertical:r,horizontal:o}}function mc({position:n,rect:r,anchor:o,relatedRects:i}){return{position:n,rect:r,kind:"spacing",role:"end",anchor:o,priority:1,elementId:null,relatedRects:i}}function iN(n,r){const o=Uc([{anchor:"start",position:n.x},{anchor:"center",position:n.x+n.width/2},{anchor:"end",position:n.x+n.width}],r.vertical,n,"vertical"),i=Uc([{anchor:"start",position:n.y},{anchor:"center",position:n.y+n.height/2},{anchor:"end",position:n.y+n.height}],r.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:Bx(c,{vertical:o,horizontal:i})}}function cN(n,r,o){const i={...n},c=r==="top-left"||r==="bottom-left"?"start":"end",u=r==="top-left"||r==="top-right"?"start":"end",d=Uc([{anchor:c,position:c==="start"?n.x:n.x+n.width}],o.vertical,n,"vertical"),h=Uc([{anchor:u,position:u==="start"?n.y:n.y+n.height}],o.horizontal,n,"horizontal");if(d)if(c==="start"){const m=i.width-d.delta;m>=48&&(i.x+=d.delta,i.width=m)}else{const m=i.width+d.delta;m>=48&&(i.width=m)}if(h)if(u==="start"){const m=i.height-h.delta;m>=48&&(i.y+=h.delta,i.height=m)}else{const m=i.height+h.delta;m>=48&&(i.height=m)}return{rect:i,guides:Bx(i,{vertical:h,horizontal:d})}}function Uc(n,r,o,i){const c=dN(r);let u=null;for(const d of n)for(const h of c){if(!uN(o,h,i)||h.anchor&&h.anchor!==d.anchor)continue;const m=h.position-d.position,p=Math.abs(m);if(p>nN)continue;const v=h.kind==="spacing"?Math.max(0,p-Ux):p,b=Gx(d.anchor,h),S=v*100+h.priority+b,C=u?sN(u):Number.POSITIVE_INFINITY;S>=C||(u={anchor:d.anchor,delta:m,target:h})}return u}function sN(n){const r=Math.abs(n.delta);return(n.target.kind==="spacing"?Math.max(0,r-Ux):r)*100+n.target.priority+Gx(n.anchor,n.target)}function Gx(n,r){return r.kind==="slide"&&r.role==="center"&&n!=="center"?25:0}function uN(n,r,o){return r.kind==="slide"?!0:r.kind==="spacing"?fN(n,r,o):o==="vertical"?Ul(n.y,n.y+n.height,r.rect.y,r.rect.y+r.rect.height,fv):Ul(n.x,n.x+n.width,r.rect.x,r.rect.x+r.rect.width,fv)}function fN(n,r,o){if(r.relatedRects.length<2)return!1;if(o==="vertical"){const u=Math.min(...r.relatedRects.map(h=>h.y)),d=Math.max(...r.relatedRects.map(h=>h.y+h.height));return Ul(n.y,n.y+n.height,u,d,Hc)}const i=Math.min(...r.relatedRects.map(u=>u.x)),c=Math.max(...r.relatedRects.map(u=>u.x+u.width));return Ul(n.x,n.x+n.width,i,c,Hc)}function dN(n){const r=new Set;return n.filter(o=>{const i=`${o.kind}:${o.elementId??"slide"}:${o.position.toFixed(2)}`;return r.has(i)?!1:(r.add(i),!0)})}function pc(n){return`${Math.round(n*100)/100}px`}function Ll(n,r){return Math.max(n,48*r)}function Sd(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function hN(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function mN(n){const[r,...o]=n;return r?o.reduce((i,c)=>{const u=Math.min(i.x,c.x),d=Math.min(i.y,c.y),h=Math.max(i.x+i.width,c.x+c.width),m=Math.max(i.y+i.height,c.y+c.height);return{x:u,y:d,width:h-u,height:m-d}},r):{x:0,y:0,width:0,height:0}}function gv(n,r,o,i){return Math.atan2(r-i,n-o)*180/Math.PI}function pN({resizeCorner:n,scale:r,stageDeltaX:o,stageDeltaY:i,startStageRect:c}){let u=c.x,d=c.y,h=c.width,m=c.height;switch(n){case"top-left":{h=Ll(c.width-o,r),m=Ll(c.height-i,r),u=c.x+(c.width-h),d=c.y+(c.height-m);break}case"top-right":{h=Ll(c.width+o,r),m=Ll(c.height-i,r),d=c.y+(c.height-m);break}case"bottom-left":{h=Ll(c.width-o,r),m=Ll(c.height+i,r),u=c.x+(c.width-h);break}default:{h=Ll(c.width+o,r),m=Ll(c.height+i,r);break}}return{x:u,y:d,width:h,height:m}}function Sc(n,r){for(const o of Md)n.style[o]=r[o]??""}function gN(n){return n.elementIds.map(r=>{const o=n.targetNodes[r],i=n.previousStyles[r];if(!o||!i)return null;const c=zo(o);return JSON.stringify(c)===JSON.stringify(i)?null:{type:"element.layout.update",slideId:n.slideId,elementId:r,previousStyle:i,nextStyle:c,timestamp:Date.now()}}).filter(r=>!!r)}function yN(n,r){return r.length===1?r[0]:{type:"operation.batch",slideId:n.slideId,operations:r,timestamp:Date.now()}}function vN({isEditingText:n,isManipulating:r,selectedElement:o,selectedElementId:i,snapGuides:c,stageRect:u}){return!u||!i||!hN(o)||n?null:{selectionBounds:u,snapGuides:r?c:[],resizeHandles:[{corner:"top-left",x:u.x,y:u.y},{corner:"top-right",x:u.x+u.width,y:u.y},{corner:"bottom-right",x:u.x+u.width,y:u.y+u.height},{corner:"bottom-left",x:u.x,y:u.y+u.height}],rotationHandle:{x:u.x+u.width/2,y:u.y+u.height+20}}}function bN({activeSlide:n,selectedElement:r,selectedElementId:o,selectedElementIds:i,selectedStageRect:c,iframeRef:u,stageGeometry:d,isEditingText:h,onCommitOperation:m}){const{offsetX:p,offsetY:v,scale:b,slideHeight:S,slideWidth:C}=d,T=y.useRef(null),E=y.useRef(null),[A,N]=y.useState(!1),[z,k]=y.useState(!1),[q,Z]=y.useState(null),[D,_]=y.useState([]),H=vN({isEditingText:h,isManipulating:A,selectedElement:r,selectedElementId:o,snapGuides:D,stageRect:q??c});y.useEffect(()=>()=>{T.current=null,E.current&&window.clearTimeout(E.current)},[]),y.useEffect(()=>{(!n||!o||!Sd(r)||h)&&(T.current=null,N(!1),Z(null))},[n,h,r,o]),y.useEffect(()=>{A||(Z(null),_([]))},[A]);const I=y.useCallback(()=>{k(!0),E.current&&window.clearTimeout(E.current),E.current=window.setTimeout(()=>{k(!1),E.current=null},0)},[]),J=y.useCallback((le,re,te=null)=>{var jt;if(!n||!o||!c||!Sd(r)||h)return;const ae=(jt=u.current)==null?void 0:jt.contentDocument;if(!ae)return;const O=ae.querySelector(n.rootSelector),X=We(ae,o);if(!O||!X)return;const G=xN({activeSlide:n,doc:ae,mode:le,selectedElementId:o,selectedElementIds:i}),$=Object.fromEntries(G.map(Ne=>[Ne,We(ae,Ne)]).filter(Ne=>!!Ne[1]));if(!Object.keys($).length)return;const K=Object.fromEntries(Object.entries($).map(([Ne,be])=>[Ne,zo(be)])),M=Object.fromEntries(Object.entries($).map(([Ne,be])=>[Ne,SN(be,$)])),B=u.current,ne=(B==null?void 0:B.style.pointerEvents)||"";re.preventDefault(),re.stopPropagation();const oe=X.getBoundingClientRect(),ce=O.getBoundingClientRect(),se={x:p,y:v,width:C*b,height:S*b},ie={scale:b,offsetX:p,offsetY:v},xe=aN({activeSlide:n,doc:ae,rootRect:ce,selectedElementId:o,slideStageRect:se,stageGeometry:ie}),fe=Object.values($).map(Ne=>Oo(Ne.getBoundingClientRect(),ce,ie)),Me=Object.fromEntries(Object.entries($).map(([Ne,be])=>[Ne,Oo(be.getBoundingClientRect(),ce,ie)])),we=Object.fromEntries(Object.values($).map(Ne=>Ne.parentElement).filter(Ne=>!!Ne).map(Ne=>[Yx(Ne),Oo(Ne.getBoundingClientRect(),ce,ie)])),Ee=fe.length?mN(fe):c;T.current={slideId:n.id,elementId:o,elementIds:Object.keys($),mode:le,resizeCorner:te,startPointer:{x:re.clientX,y:re.clientY},startStageRect:Ee,centerPoint:{x:oe.left+oe.width/2,y:oe.top+oe.height/2},previousStyle:K[o],previousStyles:K,startElementStageRects:Me,resizeParentElementIds:M,startParentStageRects:we,targetNodes:$,snapTargets:xe},N(!0),_([]),B&&(B.style.pointerEvents="none");const nt=Ne=>{const be=T.current;if(!be)return;Ne.preventDefault();const yn=Ne.clientX-be.startPointer.x,vn=Ne.clientY-be.startPointer.y;if(be.mode==="move"){const Hn={x:be.startStageRect.x+yn,y:be.startStageRect.y+vn,width:be.startStageRect.width,height:be.startStageRect.height},ue=Ne.altKey?{rect:Hn,guides:[]}:iN(Hn,be.snapTargets);Z(ue.rect),_(ue.guides);const Ce=(ue.rect.x-be.startStageRect.x)/b,ye=(ue.rect.y-be.startStageRect.y)/b;for(const je of be.elementIds){const $e=be.targetNodes[je],Ue=be.previousStyles[je];if(!$e||!Ue)continue;const tt=En(Ue.transform);Sc($e,{...Ue,transform:al(tt.translateX+Ce,tt.translateY+ye,tt.rotate),transformOrigin:Ue.transformOrigin||"center center"})}return}if(be.mode==="resize"){const Hn=pN({resizeCorner:be.resizeCorner,scale:b,stageDeltaX:yn,stageDeltaY:vn,startStageRect:be.startStageRect}),ue=Ne.altKey||!be.resizeCorner?{rect:Hn,guides:[]}:cN(Hn,be.resizeCorner,be.snapTargets);Z(ue.rect),_(ue.guides),wN(be,ue.rect,{offsetX:p,offsetY:v,scale:b});return}const An=En(be.previousStyle.transform),Oa=gv(be.startPointer.x,be.startPointer.y,be.centerPoint.x,be.centerPoint.y),Et=gv(Ne.clientX,Ne.clientY,be.centerPoint.x,be.centerPoint.y);Sc(X,{...be.previousStyle,transform:al(An.translateX,An.translateY,An.rotate+(Et-Oa)),transformOrigin:"center center"}),_([])},Pe=()=>{window.removeEventListener("mousemove",nt),window.removeEventListener("mouseup",kt),window.removeEventListener("keydown",Ht),B&&(B.style.pointerEvents=ne)},kt=()=>{const Ne=T.current;if(Pe(),N(!1),I(),T.current=null,_([]),!Ne)return;const be=gN(Ne);if(!be.length){Z(null);return}m(yN(Ne,be))},Ht=Ne=>{if(Ne.key!=="Escape")return;const be=T.current;if(Pe(),N(!1),I(),T.current=null,_([]),!!be){for(const yn of be.elementIds){const vn=be.targetNodes[yn],An=be.previousStyles[yn];vn&&An&&Sc(vn,An)}Z(null)}};window.addEventListener("mousemove",nt),window.addEventListener("mouseup",kt),window.addEventListener("keydown",Ht)},[n,u,h,m,r,o,i,c,b,p,v,C,S,I]);return{manipulationOverlay:H,isManipulating:A,suppressBackgroundClear:z,beginMove:le=>{J("move",le)},beginResize:(le,re)=>{J("resize",re,le)},beginRotate:le=>{J("rotate",le)}}}function xN({activeSlide:n,doc:r,mode:o,selectedElementId:i,selectedElementIds:c}){const u=c.filter(h=>{const m=n.elements.find(p=>p.id===h);return Sd(m)});if(o==="move")return u;if(o==="rotate")return[i];const d=new Set;for(const h of u.length?u:[i]){const m=We(r,h);if(m&&(d.add(h),m.getAttribute("data-group")==="true"))for(const p of m.querySelectorAll(`[data-editable][${Ae}]`)){const v=p.getAttribute(Ae);v&&d.add(v)}}return[...d]}function SN(n,r){const o=Object.entries(r);let i=n.parentElement;for(;i;){const c=o.find(([,u])=>u===i);if(c)return c[0];i=i.parentElement}return null}function wN(n,r,o){const i=n.startStageRect.width>0?r.width/n.startStageRect.width:1,c=n.startStageRect.height>0?r.height/n.startStageRect.height:1,u={x:o.offsetX,y:o.offsetY},d=Object.fromEntries(Object.entries(n.startElementStageRects).map(([h,m])=>[h,{x:r.x+(m.x-n.startStageRect.x)*i,y:r.y+(m.y-n.startStageRect.y)*c,width:m.width*i,height:m.height*c}]));for(const h of n.elementIds){const m=n.targetNodes[h],p=n.previousStyles[h],v=d[h];if(!m||!p||!v)continue;const b=n.resizeParentElementIds[h]?d[n.resizeParentElementIds[h]]:n.startParentStageRects[Yx(m.parentElement)]??u;if(!b)continue;const S=En(p.transform);Sc(m,{...p,position:p.position||"absolute",left:pc((v.x-b.x)/o.scale),top:pc((v.y-b.y)/o.scale),width:pc(v.width/o.scale),height:pc(v.height/o.scale),transform:al(0,0,S.rotate),transformOrigin:p.transformOrigin||"center center"})}}function Yx(n){return n!=null&&n.getAttribute(Ae)?`editable:${n.getAttribute(Ae)}`:"slide"}function Bl(n){return Math.round(n*100)/100}function EN(n,r){var h;if(typeof DOMParser>"u")return n;const c=(h=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:h.content.firstElementChild;if(!(c instanceof HTMLElement))return n;const u=En(c.style.transform),d=al(0,0,u.rotate);return c.style.position="absolute",c.style.left=`${Bl(r.x)}px`,c.style.top=`${Bl(r.y)}px`,c.style.width=`${Bl(r.width)}px`,c.style.height=`${Bl(r.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 CN(n,r){return{x:n.left-r.left,y:n.top-r.top,width:n.width,height:n.height}}function TN(n,r,o){var d;const i=(d=n.current)==null?void 0:d.contentDocument,c=i==null?void 0:i.querySelector(r.rootSelector),u=c==null?void 0:c.getBoundingClientRect();return{width:(u==null?void 0:u.width)||o.width,height:(u==null?void 0:u.height)||o.height}}function yv(n,r,o){return{x:Bl(n.x+r),y:Bl(n.y+o),width:n.width,height:n.height}}function AN(n){return n.length?n.reduce((r,o)=>{const i=Math.min(r.x,o.x),c=Math.min(r.y,o.y),u=Math.max(r.x+r.width,o.x+o.width),d=Math.max(r.y+r.height,o.y+o.height);return{x:i,y:c,width:u-i,height:d-c}}):null}function MN(n,r,o){const i=Math.max(0,o.width-n.width),c=Math.max(0,o.height-n.height),u=Math.min(i,Math.max(0,n.x+r)),d=Math.min(c,Math.max(0,n.y+r));return{x:Bl(u-n.x),y:Bl(d-n.y)}}const vv={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function _N(n){return n instanceof Element?!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable="plaintext-only"]'):!1}function RN(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"}function NN(n){return n.altKey?1:n.shiftKey?10:5}function ON(n,r,o){var d;const i={[r]:o};if(typeof DOMParser>"u")return i;const u=(d=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:d.content.firstElementChild;if(!(u instanceof HTMLElement))return i;for(const h of u.querySelectorAll("[data-editor-id]")){const m=h.getAttribute("data-editor-id");m&&(i[m]=`${o}-${m}`)}return i}function gc(n,r,o){return r.length?(o(r.length===1?r[0]:{type:"operation.batch",slideId:n,operations:r,timestamp:Date.now()}),!0):!1}function zN({activeSlide:n,selectedElementIds:r,iframeRef:o,slideWidth:i,slideHeight:c,isEditingText:u,canUndo:d,canRedo:h,onEscapeSelection:m,onCommitOperation:p,onSelectElementIds:v,onUndo:b,onRedo:S}){const C=y.useRef(null),T=y.useRef(n),E=y.useRef(r),A=y.useRef(d),N=y.useRef(h),z=y.useRef(u),k=y.useRef(m);T.current=n,E.current=r,A.current=d,N.current=h,z.current=u,k.current=m,y.useEffect(()=>{var le,re;const q=()=>{var M;const te=T.current,ae=E.current;if(!te||!ae.length)return!1;const O=(M=o.current)==null?void 0:M.contentDocument,X=O==null?void 0:O.querySelector(te.rootSelector),G=X==null?void 0:X.getBoundingClientRect();if(!G)return!1;const $=ae.map(B=>{const ne=Tc(te.htmlSource,B),oe=Cc(te.htmlSource,B),ce=O?We(O,B):null;return!ne||!oe||!ce?null:{sourceElementId:B,html:ne,rect:CN(ce.getBoundingClientRect(),G),...oe}}).filter(B=>!!B);if(!$.length)return!1;const K=AN($.map(B=>B.rect));return K?(C.current={elements:$,unionRect:K},!0):!1},Z=()=>{const te=T.current,ae=E.current;if(!te||!ae.length)return!1;const O=ae.map(X=>{const G=Tc(te.htmlSource,X),$=Cc(te.htmlSource,X);return!G||!$?null:{type:"element.remove",slideId:te.id,elementId:X,...$,html:G,timestamp:Date.now()}}).filter(X=>!!X);return O.length?(gc(te.id,O,p),v([]),!0):!1},D=(te=C.current)=>{const ae=T.current;if(!ae||!te)return!1;let O=ae.htmlSource;const X=[],G=TN(o,ae,{width:i,height:c}),$=MN(te.unionRect,24,{width:G.width,height:G.height}),K=[],M=te.elements.map(B=>{const ne=Zf(O,`${B.sourceElementId}-copy`),oe=Yv(B.html,ON(B.html,B.sourceElementId,ne)),ce=yv(B.rect,$.x,$.y),se=EN(oe,ce);return O=`${O}
|
|
292
|
+
<!-- ${ne} reserved -->`,X.push(ne),K.push({...B,rect:ce}),{type:"element.insert",slideId:ae.id,elementId:ne,parentElementId:null,previousSiblingElementId:null,nextSiblingElementId:null,html:se,timestamp:Date.now()}});return gc(ae.id,M,p),v(X),C.current={elements:K,unionRect:yv(te.unionRect,$.x,$.y)},!0},_=te=>{var M;const ae=vv[te.key],O=T.current,X=E.current;if(!O||!X.length||!ae)return!1;const G=(M=o.current)==null?void 0:M.contentDocument,$=NN(te),K=X.map(B=>{const ne=O.elements.find(xe=>xe.id===B);if(!RN(ne))return null;const oe=G?We(G,B):null;if(!oe)return null;const ce=zo(oe),se=En(ce.transform),ie=$f({...ce,transform:al(se.translateX+ae.x*$,se.translateY+ae.y*$,se.rotate),transformOrigin:ce.transformOrigin||"center center"});return{type:"element.layout.update",slideId:O.id,elementId:B,previousStyle:ce,nextStyle:ie,timestamp:Date.now()}}).filter(B=>!!B);return gc(O.id,K,p),!0},j=te=>{var $;const ae=T.current,O=E.current;if(!ae||!O.length)return!1;const X=($=o.current)==null?void 0:$.contentDocument,G=O.map(K=>{const M=X?We(X,K):null;if(!M)return null;const B=zo(M),ne=Number.parseInt(B.zIndex||"",10),oe=Number.isFinite(ne)?ne:0,ce=te==="front"?999:te==="back"?0:Math.max(0,oe+(te==="forward"?1:-1)),se=$f({...B,zIndex:String(ce)});return se.zIndex===B.zIndex?null:{type:"element.layout.update",slideId:ae.id,elementId:K,previousStyle:B,nextStyle:se,timestamp:Date.now()}}).filter(K=>!!K);return gc(ae.id,G,p)},H=te=>{if(te.defaultPrevented||z.current)return;const ae=te.key.toLowerCase(),O=te.metaKey||te.ctrlKey,X=O&&!te.shiftKey&&ae==="z",G=O&&(te.shiftKey&&ae==="z"||ae==="y"),$=_N(te.target);let K=!1;if(X&&A.current)b(),K=!0;else if(G&&N.current)S(),K=!0;else{if($)return;O&&!te.shiftKey&&ae==="c"?K=q():O&&!te.shiftKey&&ae==="x"?K=q()&&Z():O&&!te.shiftKey&&ae==="v"?K=D():O&&!te.shiftKey&&ae==="d"?K=q()&&D():te.key==="Backspace"||te.key==="Delete"?K=Z():te.key==="Escape"?K=k.current():te.key in vv?K=_(te):O&&te.key==="]"?K=j(te.shiftKey?"front":"forward"):O&&te.key==="["&&(K=j(te.shiftKey?"back":"backward"))}K&&(te.preventDefault(),te.stopPropagation())},I=(le=o.current)==null?void 0:le.contentDocument,J=(re=o.current)==null?void 0:re.contentWindow;return window.addEventListener("keydown",H),J==null||J.addEventListener("keydown",H),I==null||I.addEventListener("keydown",H),()=>{window.removeEventListener("keydown",H),J==null||J.removeEventListener("keydown",H),I==null||I.removeEventListener("keydown",H)}},[o,p,S,v,b,c,i])}const bv="hse-editing-text-style",DN=`
|
|
293
|
+
[data-hse-editing="true"] {
|
|
294
|
+
outline: none !important;
|
|
295
|
+
box-shadow: none !important;
|
|
296
|
+
overflow: visible;
|
|
297
|
+
caret-color: currentColor;
|
|
298
|
+
white-space: pre-wrap;
|
|
299
|
+
user-select: text;
|
|
300
|
+
-webkit-user-select: text;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
[data-hse-editing="true"]:focus,
|
|
304
|
+
[data-hse-editing="true"]:focus-visible {
|
|
305
|
+
outline: none !important;
|
|
306
|
+
box-shadow: none !important;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
body[data-hse-group-scope] [data-editable] {
|
|
310
|
+
transition: opacity 120ms ease, filter 120ms ease;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
body[data-hse-group-scope] [data-editable][data-hse-outside-group-scope="true"] {
|
|
314
|
+
opacity: 0.28;
|
|
315
|
+
filter: blur(1.5px);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
body[data-hse-group-scope] [data-editable][data-hse-active-group-scope="true"] {
|
|
319
|
+
outline: 1px solid rgba(15, 23, 42, 0.22);
|
|
320
|
+
outline-offset: 4px;
|
|
321
|
+
}
|
|
322
|
+
`;function jN(n){return n.closest(`[data-editable][${Ae}]`)}function xv(n,r){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(!r){n.body.removeAttribute("data-hse-group-scope");return}n.body.setAttribute("data-hse-group-scope",r);const i=n.querySelector(`[data-editable="block"][data-group="true"][${Ae}="${r}"]`);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 Sv(n,r){const o=jN(n);return o?r?o.closest(`[data-editable="block"][data-group="true"][${Ae}="${r}"]`)?o:null:o.closest(`[data-editable="block"][data-group="true"][${Ae}]`)??o:null}function LN(n){if(n.getElementById(bv))return;const r=n.createElement("style");r.id=bv,r.textContent=DN,n.head.appendChild(r)}function kN(n){const r=n.ownerDocument.getSelection(),o=n.ownerDocument.createRange();o.selectNodeContents(n),o.collapse(!1),r==null||r.removeAllRanges(),r==null||r.addRange(o)}function HN({activeSlide:n,iframeRef:r,onCommitOperation:o}){const[i,c]=y.useState([]),[u,d]=y.useState(null),[h,m]=y.useState(null),p=y.useRef(null),v=y.useRef(null),b=y.useRef(()=>{}),S=y.useRef(()=>{}),C=i[i.length-1]??null;function T(D){c(_=>{const j=typeof D=="function"?D(_[_.length-1]??null):D;return j?[j]:[]})}const E=y.useCallback(D=>{c(_=>_.includes(D)?_.filter(j=>j!==D):[..._,D])},[]),A=y.useCallback(D=>{var I;if(!n)return;const _=(I=r.current)==null?void 0:I.contentDocument,j=_?We(_,D):null;if(!j||j.getAttribute("data-editable")!=="text")return;const H={slideId:n.id,elementId:D,initialText:j.textContent||""};c([D]),p.current=H,m(H)},[n,r]),N=y.useCallback(D=>{d(D),v.current=D,c([D])},[]),z=y.useCallback(()=>{const D=v.current;v.current=null,d(null),c(D?[D]:[])},[]),k=y.useCallback(()=>p.current?!1:v.current?(z(),!0):i.length?(c([]),!0):!1,[z,i.length]);function q(D,_){const j=h;if(!n||!j||j.slideId!==n.id||j.elementId!==D){p.current=null,m(null);return}const H=j.initialText;p.current=null,m(null),_!==H&&o({type:"text.update",slideId:n.id,elementId:D,previousText:H,nextText:_,timestamp:Date.now()})}function Z(){var j;const D=(j=r.current)==null?void 0:j.contentDocument,_=p.current;if(_&&D){const H=We(D,_.elementId);H&&(H.textContent=_.initialText)}p.current=null,m(null)}return y.useEffect(()=>{p.current=h},[h]),y.useEffect(()=>{v.current=u},[u]),y.useEffect(()=>{!n||!h||h.slideId===n.id||m(null)},[n,h]),b.current=q,S.current=Z,y.useEffect(()=>{if(!n)return;const D=r.current;if(!D)return;const _=D.contentDocument;if(!_)return;_.open(),_.write(n.htmlSource),_.close(),LN(_),xv(_,v.current);const j=I=>{const J=I.getAttribute(Ae);J&&b.current(J,I.textContent||"")};_.onclick=I=>{const J=I.target;if(!(J instanceof Element)){if(p.current){const ae=We(_,p.current.elementId);if(ae){j(ae);return}}c([]);return}const le=p.current;if(le){const ae=We(_,le.elementId);if(ae&&!ae.contains(J)){j(ae);return}return}const re=Sv(J,v.current);if(!re){v.current||c([]);return}const te=re.getAttribute(Ae);te&&(I.shiftKey||I.metaKey||I.ctrlKey?E(te):c([te]))};const H=Array.from(_.querySelectorAll(`[data-editable][${Ae}]`));for(const I of H)I.style.cursor="pointer",I.ondblclick=null,I.onblur=null,I.onkeydown=null,I.onclick=J=>{var te;J.stopPropagation();const le=Sv(J.target,v.current);if(v.current&&!le)return;const re=(le==null?void 0:le.getAttribute(Ae))??I.getAttribute(Ae);((te=p.current)==null?void 0:te.elementId)!==re&&re&&(J.shiftKey||J.metaKey||J.ctrlKey?E(re):c([re]))},I.ondblclick=J=>{const le=I.getAttribute(Ae),re=p.current;if(le&&I.getAttribute("data-group")==="true"){J.preventDefault(),J.stopPropagation(),N(le);return}if(I.getAttribute("data-editable")==="text"){if(le&&re&&re.slideId===n.id&&re.elementId===le){J.stopPropagation();return}J.preventDefault(),J.stopPropagation(),le&&A(le)}}},[n,N,A,r,E]),y.useEffect(()=>{var _;const D=(_=r.current)==null?void 0:_.contentDocument;D&&xv(D,u)},[u,r]),y.useEffect(()=>{var X;const D=h;if(!D||!n||D.slideId!==n.id)return;const _=r.current,j=_==null?void 0:_.contentDocument;if(!_||!j)return;const H=j.querySelector(Td(D.elementId));if(!H)return;const I=()=>{b.current(D.elementId,H.textContent||"")};let J=!1;const le=H.style.display,re=H.style.alignItems,te=H.style.overflow,ae=(X=H.ownerDocument.defaultView)==null?void 0:X.getComputedStyle(H),O=(ae==null?void 0:ae.display)??"";return H.setAttribute("contenteditable","plaintext-only"),H.setAttribute("spellcheck","false"),H.setAttribute("data-hse-editing","true"),H.style.cursor="text",H.style.overflow="visible",O==="inline-flex"?(H.style.display="inline-block",H.style.alignItems="normal"):(O==="flex"||O==="grid"||O==="inline-grid")&&(H.style.display="block",H.style.alignItems="normal"),H.focus(),kN(H),H.onkeydown=G=>{if(G.key==="Enter"&&!G.shiftKey){G.preventDefault(),I();return}G.key==="Escape"&&(G.preventDefault(),S.current())},H.onmousedown=()=>{J=!1},H.onmouseup=()=>{const G=H.ownerDocument.getSelection(),$=G==null?void 0:G.anchorNode,K=G==null?void 0:G.focusNode,M=$?H.contains($):!1,B=K?H.contains(K):!1;J=!!(G&&!G.isCollapsed&&M&&B)},H.onclick=G=>{G.stopPropagation(),J&&(G.preventDefault(),J=!1)},H.onblur=()=>{window.setTimeout(()=>{var ne;if(((ne=p.current)==null?void 0:ne.elementId)!==D.elementId)return;const G=H.ownerDocument.getSelection(),$=G==null?void 0:G.anchorNode,K=G==null?void 0:G.focusNode,M=H.ownerDocument.activeElement,B=!!(G&&!G.isCollapsed)&&!!($&&H.contains($))&&!!(K&&H.contains(K));M===H||B||I()},0)},()=>{H.removeAttribute("contenteditable"),H.removeAttribute("spellcheck"),H.removeAttribute("data-hse-editing"),H.style.cursor="pointer",H.style.display=le,H.style.alignItems=re,H.style.overflow=te,H.onblur=null,H.onclick=null,H.onkeydown=null,H.onmousedown=null,H.onmouseup=null}},[n,r,h]),{selectedElementId:C,selectedElementIds:i,activeGroupScopeId:u,isEditingText:!!(n&&(h==null?void 0:h.slideId)===n.id),setSelectedElementId:T,setSelectedElementIds:c,beginTextEditing:A,beginGroupEditingScope:N,exitGroupEditingScope:z,clearSelection:k}}function UN(n,r={}){var m;const{onSlidesChange:o}=r,[i,c]=y.useReducer(nc,n,Vv),[u,d]=y.useState(((m=n[0])==null?void 0:m.id)??"");y.useEffect(()=>{var p;c({type:"history.reset",slides:n}),d(((p=n[0])==null?void 0:p.id)??"")},[n]);const h=y.useMemo(()=>i.slides.find(p=>p.id===u)??i.slides[0],[u,i.slides]);return{slides:i.slides,activeSlide:h,activeSlideId:u,undoDepth:i.undoStack.length,redoDepth:i.redoStack.length,setActiveSlideId:d,commitOperation:p=>{const v=nc(i,{type:"history.commit",operation:p});c({type:"history.commit",operation:p}),o==null||o(v.slides)},runUndo:()=>{const p=nc(i,{type:"history.undo"});c({type:"history.undo"}),o==null||o(p.slides)},runRedo:()=>{const p=nc(i,{type:"history.redo"});c({type:"history.redo"}),o==null||o(p.slides)}}}const BN=["-webkit-","-moz-","-ms-"],GN=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 YN(n){return BN.some(r=>n.startsWith(r))?!1:!GN.has(n)}function VN(n){const r=window.getComputedStyle(n),o=[];for(const i of Array.from(r)){if(!YN(i))continue;const c=i==="transform"&&n.style.transform?n.style.transform.trim():r.getPropertyValue(i).trim();c.length!==0&&o.push({name:i,value:c})}return o.sort((i,c)=>i.name.localeCompare(c.name))}function qN({iframeRef:n,activeSlide:r,selectedElement:o,selectedElementIds:i,scale:c,offsetX:u,offsetY:d,slideWidth:h,slideHeight:m}){const[p,v]=y.useState(null),[b,S]=y.useState(null),[C,T]=y.useState([]);return y.useEffect(()=>{const E=n.current,A=E==null?void 0:E.contentDocument;if(!E||!A||!r){v(null),S(null),T([]);return}const N=A.querySelector(r.rootSelector),z=i[0]?We(A,i[0]):N;if(!z){v(null),S(null),T([]);return}const k=VN(z);if(T(_=>XN(_,k)?_:k),!i.length||!N){v(_=>_===null?_:null),S(_=>_===null?_:null);return}const q=N.getBoundingClientRect(),Z=i.map(_=>We(A,_)).filter(_=>!!_).map(_=>Oo(_.getBoundingClientRect(),q,{scale:c,offsetX:u,offsetY:d}));if(!Z.length){v(_=>_===null?_:null),S(_=>_===null?_:null);return}const D=Z.reduce((_,j)=>{const H=Math.min(_.x,j.x),I=Math.min(_.y,j.y),J=Math.max(_.x+_.width,j.x+j.width),le=Math.max(_.y+_.height,j.y+j.height);return{x:H,y:I,width:J-H,height:le-I}});v(_=>wv(_,D)?_:D),S(_=>wv(_,D)?_:D)},[r,n,u,d,c,i,m,h]),{selectedStageRect:p,selectionOverlay:b,selectionLabel:(o==null?void 0:o.type)||"element",inspectedStyles:C}}function wv(n,r){return n===r?!0:!n||!r?!1:n.x===r.x&&n.y===r.y&&n.width===r.width&&n.height===r.height}function XN(n,r){return n.length!==r.length?!1:n.every((o,i)=>{const c=r[i];return(c==null?void 0:c.name)===o.name&&c.value===o.value})}function IN(n,r){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),r&&(i.href=r),c.href=n,c.href}const PN=(()=>{let n=0;const r=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${r()}${n}`)})();function Gl(n){const r=[];for(let o=0,i=n.length;o<i;o++)r.push(n[o]);return r}let ga=null;function Vx(n={}){return ga||(n.includeStyleProperties?(ga=n.includeStyleProperties,ga):(ga=Gl(window.getComputedStyle(document.documentElement)),ga))}function Bc(n,r){const i=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(r);return i?parseFloat(i.replace("px","")):0}function $N(n){const r=Bc(n,"border-left-width"),o=Bc(n,"border-right-width");return n.clientWidth+r+o}function KN(n){const r=Bc(n,"border-top-width"),o=Bc(n,"border-bottom-width");return n.clientHeight+r+o}function qx(n,r={}){const o=r.width||$N(n),i=r.height||KN(n);return{width:o,height:i}}function QN(){let n,r;try{r=process}catch{}const o=r&&r.env?r.env.devicePixelRatio:null;return o&&(n=parseInt(o,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}const en=16384;function ZN(n){(n.width>en||n.height>en)&&(n.width>en&&n.height>en?n.width>n.height?(n.height*=en/n.width,n.width=en):(n.width*=en/n.height,n.height=en):n.width>en?(n.height*=en/n.width,n.width=en):(n.width*=en/n.height,n.height=en))}function Gc(n){return new Promise((r,o)=>{const i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>r(i))})},i.onerror=o,i.crossOrigin="anonymous",i.decoding="async",i.src=n})}async function FN(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(r=>`data:image/svg+xml;charset=utf-8,${r}`)}async function JN(n,r,o){const i="http://www.w3.org/2000/svg",c=document.createElementNS(i,"svg"),u=document.createElementNS(i,"foreignObject");return c.setAttribute("width",`${r}`),c.setAttribute("height",`${o}`),c.setAttribute("viewBox",`0 0 ${r} ${o}`),u.setAttribute("width","100%"),u.setAttribute("height","100%"),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("externalResourcesRequired","true"),c.appendChild(u),u.appendChild(n),FN(c)}const Pt=(n,r)=>{if(n instanceof r)return!0;const o=Object.getPrototypeOf(n);return o===null?!1:o.constructor.name===r.name||Pt(o,r)};function WN(n){const r=n.getPropertyValue("content");return`${n.cssText} content: '${r.replace(/'|"/g,"")}';`}function eO(n,r){return Vx(r).map(o=>{const i=n.getPropertyValue(o),c=n.getPropertyPriority(o);return`${o}: ${i}${c?" !important":""};`}).join(" ")}function tO(n,r,o,i){const c=`.${n}:${r}`,u=o.cssText?WN(o):eO(o,i);return document.createTextNode(`${c}{${u}}`)}function Ev(n,r,o,i){const c=window.getComputedStyle(n,o),u=c.getPropertyValue("content");if(u===""||u==="none")return;const d=PN();try{r.className=`${r.className} ${d}`}catch{return}const h=document.createElement("style");h.appendChild(tO(d,o,c,i)),r.appendChild(h)}function nO(n,r,o){Ev(n,r,":before",o),Ev(n,r,":after",o)}const Cv="application/font-woff",Tv="image/jpeg",lO={woff:Cv,woff2:Cv,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Tv,jpeg:Tv,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function rO(n){const r=/\.([^./]*?)$/g.exec(n);return r?r[1]:""}function ch(n){const r=rO(n).toLowerCase();return lO[r]||""}function aO(n){return n.split(/,/)[1]}function wd(n){return n.search(/^(data:)/)!==-1}function oO(n,r){return`data:${r};base64,${n}`}async function Xx(n,r,o){const i=await fetch(n,r);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);const c=await i.blob();return new Promise((u,d)=>{const h=new FileReader;h.onerror=d,h.onloadend=()=>{try{u(o({res:i,result:h.result}))}catch(m){d(m)}},h.readAsDataURL(c)})}const Pf={};function iO(n,r,o){let i=n.replace(/\?.*/,"");return o&&(i=n),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),r?`[${r}]${i}`:i}async function sh(n,r,o){const i=iO(n,r,o.includeQueryParams);if(Pf[i]!=null)return Pf[i];o.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let c;try{const u=await Xx(n,o.fetchRequestInit,({res:d,result:h})=>(r||(r=d.headers.get("Content-Type")||""),aO(h)));c=oO(u,r)}catch(u){c=o.imagePlaceholder||"";let d=`Failed to fetch resource: ${n}`;u&&(d=typeof u=="string"?u:u.message),d&&console.warn(d)}return Pf[i]=c,c}async function cO(n){const r=n.toDataURL();return r==="data:,"?n.cloneNode(!1):Gc(r)}async function sO(n,r){if(n.currentSrc){const u=document.createElement("canvas"),d=u.getContext("2d");u.width=n.clientWidth,u.height=n.clientHeight,d==null||d.drawImage(n,0,0,u.width,u.height);const h=u.toDataURL();return Gc(h)}const o=n.poster,i=ch(o),c=await sh(o,i,r);return Gc(c)}async function uO(n,r){var o;try{if(!((o=n==null?void 0:n.contentDocument)===null||o===void 0)&&o.body)return await ls(n.contentDocument.body,r,!0)}catch{}return n.cloneNode(!1)}async function fO(n,r){return Pt(n,HTMLCanvasElement)?cO(n):Pt(n,HTMLVideoElement)?sO(n,r):Pt(n,HTMLIFrameElement)?uO(n,r):n.cloneNode(Ix(n))}const dO=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT",Ix=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SVG";async function hO(n,r,o){var i,c;if(Ix(r))return r;let u=[];return dO(n)&&n.assignedNodes?u=Gl(n.assignedNodes()):Pt(n,HTMLIFrameElement)&&(!((i=n.contentDocument)===null||i===void 0)&&i.body)?u=Gl(n.contentDocument.body.childNodes):u=Gl(((c=n.shadowRoot)!==null&&c!==void 0?c:n).childNodes),u.length===0||Pt(n,HTMLVideoElement)||await u.reduce((d,h)=>d.then(()=>ls(h,o)).then(m=>{m&&r.appendChild(m)}),Promise.resolve()),r}function mO(n,r,o){const i=r.style;if(!i)return;const c=window.getComputedStyle(n);c.cssText?(i.cssText=c.cssText,i.transformOrigin=c.transformOrigin):Vx(o).forEach(u=>{let d=c.getPropertyValue(u);u==="font-size"&&d.endsWith("px")&&(d=`${Math.floor(parseFloat(d.substring(0,d.length-2)))-.1}px`),Pt(n,HTMLIFrameElement)&&u==="display"&&d==="inline"&&(d="block"),u==="d"&&r.getAttribute("d")&&(d=`path(${r.getAttribute("d")})`),i.setProperty(u,d,c.getPropertyPriority(u))})}function pO(n,r){Pt(n,HTMLTextAreaElement)&&(r.innerHTML=n.value),Pt(n,HTMLInputElement)&&r.setAttribute("value",n.value)}function gO(n,r){if(Pt(n,HTMLSelectElement)){const i=Array.from(r.children).find(c=>n.value===c.getAttribute("value"));i&&i.setAttribute("selected","")}}function yO(n,r,o){return Pt(r,Element)&&(mO(n,r,o),nO(n,r,o),pO(n,r),gO(n,r)),r}async function vO(n,r){const o=n.querySelectorAll?n.querySelectorAll("use"):[];if(o.length===0)return n;const i={};for(let u=0;u<o.length;u++){const h=o[u].getAttribute("xlink:href");if(h){const m=n.querySelector(h),p=document.querySelector(h);!m&&p&&!i[h]&&(i[h]=await ls(p,r,!0))}}const c=Object.values(i);if(c.length){const u="http://www.w3.org/1999/xhtml",d=document.createElementNS(u,"svg");d.setAttribute("xmlns",u),d.style.position="absolute",d.style.width="0",d.style.height="0",d.style.overflow="hidden",d.style.display="none";const h=document.createElementNS(u,"defs");d.appendChild(h);for(let m=0;m<c.length;m++)h.appendChild(c[m]);n.appendChild(d)}return n}async function ls(n,r,o){return!o&&r.filter&&!r.filter(n)?null:Promise.resolve(n).then(i=>fO(i,r)).then(i=>hO(n,i,r)).then(i=>yO(n,i,r)).then(i=>vO(i,r))}const Px=/url\((['"]?)([^'"]+?)\1\)/g,bO=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,xO=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function SO(n){const r=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${r})(['"]?\\))`,"g")}function wO(n){const r=[];return n.replace(Px,(o,i,c)=>(r.push(c),o)),r.filter(o=>!wd(o))}async function EO(n,r,o,i,c){try{const u=o?IN(r,o):r,d=ch(r);let h;return c||(h=await sh(u,d,i)),n.replace(SO(r),`$1${h}$3`)}catch{}return n}function CO(n,{preferredFontFormat:r}){return r?n.replace(xO,o=>{for(;;){const[i,,c]=bO.exec(o)||[];if(!c)return"";if(c===r)return`src: ${i};`}}):n}function $x(n){return n.search(Px)!==-1}async function Kx(n,r,o){if(!$x(n))return n;const i=CO(n,o);return wO(i).reduce((u,d)=>u.then(h=>EO(h,d,r,o)),Promise.resolve(i))}async function ya(n,r,o){var i;const c=(i=r.style)===null||i===void 0?void 0:i.getPropertyValue(n);if(c){const u=await Kx(c,null,o);return r.style.setProperty(n,u,r.style.getPropertyPriority(n)),!0}return!1}async function TO(n,r){await ya("background",n,r)||await ya("background-image",n,r),await ya("mask",n,r)||await ya("-webkit-mask",n,r)||await ya("mask-image",n,r)||await ya("-webkit-mask-image",n,r)}async function AO(n,r){const o=Pt(n,HTMLImageElement);if(!(o&&!wd(n.src))&&!(Pt(n,SVGImageElement)&&!wd(n.href.baseVal)))return;const i=o?n.src:n.href.baseVal,c=await sh(i,ch(i),r);await new Promise((u,d)=>{n.onload=u,n.onerror=r.onImageErrorHandler?(...m)=>{try{u(r.onImageErrorHandler(...m))}catch(p){d(p)}}:d;const h=n;h.decode&&(h.decode=u),h.loading==="lazy"&&(h.loading="eager"),o?(n.srcset="",n.src=c):n.href.baseVal=c})}async function MO(n,r){const i=Gl(n.childNodes).map(c=>Qx(c,r));await Promise.all(i).then(()=>n)}async function Qx(n,r){Pt(n,Element)&&(await TO(n,r),await AO(n,r),await MO(n,r))}function _O(n,r){const{style:o}=n;r.backgroundColor&&(o.backgroundColor=r.backgroundColor),r.width&&(o.width=`${r.width}px`),r.height&&(o.height=`${r.height}px`);const i=r.style;return i!=null&&Object.keys(i).forEach(c=>{o[c]=i[c]}),n}const Av={};async function Mv(n){let r=Av[n];if(r!=null)return r;const i=await(await fetch(n)).text();return r={url:n,cssText:i},Av[n]=r,r}async function _v(n,r){let o=n.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,u=(o.match(/url\([^)]+\)/g)||[]).map(async d=>{let h=d.replace(i,"$1");return h.startsWith("https://")||(h=new URL(h,n.url).href),Xx(h,r.fetchRequestInit,({result:m})=>(o=o.replace(d,`url(${m})`),[d,m]))});return Promise.all(u).then(()=>o)}function Rv(n){if(n==null)return[];const r=[],o=/(\/\*[\s\S]*?\*\/)/gi;let i=n.replace(o,"");const c=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const m=c.exec(i);if(m===null)break;r.push(m[0])}i=i.replace(c,"");const u=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,d="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",h=new RegExp(d,"gi");for(;;){let m=u.exec(i);if(m===null){if(m=h.exec(i),m===null)break;u.lastIndex=h.lastIndex}else h.lastIndex=u.lastIndex;r.push(m[0])}return r}async function RO(n,r){const o=[],i=[];return n.forEach(c=>{if("cssRules"in c)try{Gl(c.cssRules||[]).forEach((u,d)=>{if(u.type===CSSRule.IMPORT_RULE){let h=d+1;const m=u.href,p=Mv(m).then(v=>_v(v,r)).then(v=>Rv(v).forEach(b=>{try{c.insertRule(b,b.startsWith("@import")?h+=1:c.cssRules.length)}catch(S){console.error("Error inserting rule from remote css",{rule:b,error:S})}})).catch(v=>{console.error("Error loading remote css",v.toString())});i.push(p)}})}catch(u){const d=n.find(h=>h.href==null)||document.styleSheets[0];c.href!=null&&i.push(Mv(c.href).then(h=>_v(h,r)).then(h=>Rv(h).forEach(m=>{d.insertRule(m,d.cssRules.length)})).catch(h=>{console.error("Error loading remote stylesheet",h)})),console.error("Error inlining remote css file",u)}}),Promise.all(i).then(()=>(n.forEach(c=>{if("cssRules"in c)try{Gl(c.cssRules||[]).forEach(u=>{o.push(u)})}catch(u){console.error(`Error while reading CSS rules from ${c.href}`,u)}}),o))}function NO(n){return n.filter(r=>r.type===CSSRule.FONT_FACE_RULE).filter(r=>$x(r.style.getPropertyValue("src")))}async function OO(n,r){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");const o=Gl(n.ownerDocument.styleSheets),i=await RO(o,r);return NO(i)}function Zx(n){return n.trim().replace(/["']/g,"")}function zO(n){const r=new Set;function o(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(u=>{r.add(Zx(u))}),Array.from(i.children).forEach(u=>{u instanceof HTMLElement&&o(u)})}return o(n),r}async function DO(n,r){const o=await OO(n,r),i=zO(n);return(await Promise.all(o.filter(u=>i.has(Zx(u.style.fontFamily))).map(u=>{const d=u.parentStyleSheet?u.parentStyleSheet.href:null;return Kx(u.cssText,d,r)}))).join(`
|
|
323
|
+
`)}async function jO(n,r){const o=r.fontEmbedCSS!=null?r.fontEmbedCSS:r.skipFonts?null:await DO(n,r);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 LO(n,r={}){const{width:o,height:i}=qx(n,r),c=await ls(n,r,!0);return await jO(c,r),await Qx(c,r),_O(c,r),await JN(c,o,i)}async function kO(n,r={}){const{width:o,height:i}=qx(n,r),c=await LO(n,r),u=await Gc(c),d=document.createElement("canvas"),h=d.getContext("2d"),m=r.pixelRatio||QN(),p=r.canvasWidth||o,v=r.canvasHeight||i;return d.width=p*m,d.height=v*m,r.skipAutoScale||ZN(d),d.style.width=`${p}`,d.style.height=`${v}`,r.backgroundColor&&(h.fillStyle=r.backgroundColor,h.fillRect(0,0,d.width,d.height)),h.drawImage(u,0,0,d.width,d.height),d}async function HO(n,r={}){return(await kO(n,r)).toDataURL()}const Nv=224,UO=2;function BO(n){return new Promise(r=>{window.setTimeout(r,n)})}async function GO(n){var r;if((r=n.fonts)!=null&&r.ready)try{await n.fonts.ready}catch{}}async function YO(n){const r=document.createElement("iframe");r.setAttribute("aria-hidden","true"),r.tabIndex=-1,r.style.position="fixed",r.style.left="-10000px",r.style.top="0",r.style.width=`${n.width}px`,r.style.height=`${n.height}px`,r.style.opacity="0",r.style.pointerEvents="none",r.style.border="0",document.body.appendChild(r);try{const o=r.contentDocument;if(!o)throw new Error("Unable to access thumbnail iframe document.");o.open(),o.write(n.htmlSource),o.close(),await GO(o),await BO(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 HO(c,{cacheBust:!0,pixelRatio:UO,canvasWidth:Nv,canvasHeight:Math.round(n.height/n.width*Nv),backgroundColor:"white",skipFonts:!1})}finally{r.remove()}}const VO=300;function qO(n){const[r,o]=y.useState({}),i=y.useRef(new Map),c=y.useMemo(()=>n.map(u=>({id:u.id,key:`${u.id}:${u.htmlSource}`})),[n]);return y.useEffect(()=>{let u=!1;const d=window.setTimeout(async()=>{const h={};for(const m of n){const p=`${m.id}:${m.htmlSource}`,v=i.current.get(p);if(v){h[m.id]=v;continue}try{const b=await YO(m);i.current.set(p,b),h[m.id]=b}catch{}if(u)return}u||o(m=>({...m,...h}))},VO);return()=>{u=!0,window.clearTimeout(d)}},[n]),y.useEffect(()=>{const u=new Set(c.map(d=>d.key));for(const d of i.current.keys())u.has(d)||i.current.delete(d)},[c]),r}function XO({stageViewportRef:n,slideWidth:r,slideHeight:o}){const[i,c]=y.useState({width:0,height:0});y.useEffect(()=>{const p=n.current;if(!p)return;const v=()=>{const S=p.getBoundingClientRect();c(C=>C.width===S.width&&C.height===S.height?C:{width:S.width,height:S.height})};v();const b=new ResizeObserver(()=>{v()});return b.observe(p),()=>{b.disconnect()}},[n]);const u=Math.min(i.width>0?i.width/r:1,i.height>0?i.height/o:1),d=Number.isFinite(u)&&u>0?u:1,h=r*d,m=o*d;return{scale:d,offsetX:Math.max((i.width-h)/2,0),offsetY:Math.max((i.height-m)/2,0)}}function IO({slides:n,deckTitle:r,sourceLabel:o,isSaving:i=!1,onSlidesChange:c}){const{slides:u,activeSlide:d,undoDepth:h,redoDepth:m,setActiveSlideId:p,commitOperation:v,runUndo:b,runRedo:S}=UN(n,{onSlidesChange:c}),C=y.useRef(null),T=y.useRef(null),E=y.useRef(null),A=qO(u),{selectedElementId:N,selectedElementIds:z,isEditingText:k,activeGroupScopeId:q,setSelectedElementId:Z,setSelectedElementIds:D,beginTextEditing:_,beginGroupEditingScope:j,clearSelection:H}=HN({activeSlide:d,iframeRef:C,onCommitOperation:v}),I=d==null?void 0:d.elements.find(ue=>ue.id===N),J=d==null?void 0:d.elements.find(ue=>ue.id===q),le=z.length>1?"multi":(I==null?void 0:I.type)??(J==null?void 0:J.type)??"block",re=d?z.map(ue=>d.elements.find(Ce=>Ce.id===ue)).filter(ue=>!!ue):[],te={group:z.length>=2&&re.length===z.length,ungroup:z.length===1&&(I==null?void 0:I.type)==="group"},ae=!!q&&z.length===1&&N===q,O=(r==null?void 0:r.trim())||"Untitled deck",X=(d==null?void 0:d.width)||vr,G=(d==null?void 0:d.height)||br,{scale:$,offsetX:K,offsetY:M}=XO({stageViewportRef:T,slideWidth:X,slideHeight:G}),{selectedStageRect:B,selectionOverlay:ne,inspectedStyles:oe}=qN({iframeRef:C,activeSlide:d,selectedElement:I,selectedElementIds:z,scale:$,offsetX:K,offsetY:M,slideWidth:X,slideHeight:G}),{manipulationOverlay:ce,isManipulating:se,suppressBackgroundClear:ie,beginMove:xe,beginResize:fe,beginRotate:Me}=bN({activeSlide:d,selectedElement:I,selectedElementId:N,selectedElementIds:z,selectedStageRect:B,iframeRef:C,stageGeometry:{scale:$,offsetX:K,offsetY:M,slideWidth:X,slideHeight:G},isEditingText:k,onCommitOperation:v}),we=(ce==null?void 0:ce.selectionBounds)??ne,Ee=N??"slide-root",nt={locked:d?No(d,Ee,"data-editor-locked"):"",altText:d?No(d,Ee,"alt"):"",ariaLabel:d?No(d,Ee,"aria-label"):"",linkUrl:d?No(d,Ee,"data-link-url"):""};function Pe(ue,Ce){if(!d)return;const ye=eN({elementId:Ee,nextValue:Ce,propertyName:ue,slide:d});ye&&v(ye)}function kt(ue,Ce){if(!d)return;const ye=tN({attributeName:ue,elementId:Ee,nextValue:Ce,slide:d});ye&&v(ye)}function Ht(ue){if(!d||z.length===0)return;const Ce=z.map(ye=>{const je=xd(d,ye,"z-index"),$e=Number.parseInt(je,10),Ue=Number.isFinite($e)?$e:0,tt=ue==="front"?"999":ue==="back"?"0":String(Math.max(0,Ue+(ue==="forward"?1:-1)));return je===tt?null:{type:"style.update",slideId:d.id,elementId:ye,propertyName:"z-index",previousValue:je,nextValue:tt,timestamp:Date.now()}}).filter(ye=>!!ye);jt(Ce)}function jt(ue){!d||ue.length===0||v(ue.length===1?ue[0]:{type:"operation.batch",slideId:d.id,operations:ue,timestamp:Date.now()})}function Ne(ue,Ce,ye){var tt;const je={[Ce]:ye},Ue=(tt=new DOMParser().parseFromString(`<template>${ue}</template>`,"text/html").querySelector("template"))==null?void 0:tt.content.firstElementChild;if(!(Ue instanceof HTMLElement))return je;for(const gt of Ue.querySelectorAll(`[${Ae}]`)){const at=gt.getAttribute(Ae);at&&(je[at]=`${ye}-${at}`)}return je}function be(){if(!d||z.length===0)return;let ue=d.htmlSource;const Ce=[],ye=z.map(je=>{const $e=Tc(d.htmlSource,je),Ue=Cc(d.htmlSource,je);if(!$e||!Ue)return null;const tt=Zf(ue,`${je}-copy`),gt=Yv($e,Ne($e,je,tt));return ue=`${ue}
|
|
324
|
+
<!-- ${tt} reserved -->`,Ce.push(tt),{type:"element.insert",slideId:d.id,elementId:tt,...Ue,html:gt,timestamp:Date.now()}}).filter(je=>!!je);jt(ye),Ce.length&&D(Ce)}function yn(){if(!d||z.length===0)return;const ue=z.map(Ce=>{const ye=Tc(d.htmlSource,Ce),je=Cc(d.htmlSource,Ce);return!ye||!je?null:{type:"element.remove",slideId:d.id,elementId:Ce,...je,html:ye,timestamp:Date.now()}}).filter(Ce=>!!Ce);jt(ue),ue.length&&D([])}function vn(){if(!d||z.length<2)return;const ue=An(),Ce=Zf(d.htmlSource,"group-1"),ye=jw({html:d.htmlSource,slideId:d.id,groupElementId:Ce,elementRects:ue,elementIds:z});ye&&(v(ye),D([Ce]))}function An(){var tt;const ue=(tt=C.current)==null?void 0:tt.contentDocument,Ce=ue==null?void 0:ue.querySelector((d==null?void 0:d.rootSelector)??"");if(!ue||!Ce)return{};const ye=Ce.getBoundingClientRect(),je=d?d.width/ye.width:1,$e=d?d.height/ye.height:1,Ue={};for(const gt of ue.querySelectorAll(`[data-editable][${Ae}]`)){const at=gt.getAttribute(Ae);if(!at)continue;const Ct=gt.getBoundingClientRect(),it=gt.parentElement,za=it!=null&&it.hasAttribute("data-editable")&&it.getAttribute(Ae)?it.getAttribute(Ae):null,Tr=za?Ue[za]??{x:0,y:0,width:ye.width,height:ye.height}:{x:0,y:0,width:ye.width,height:ye.height};Ue[at]={x:(Ct.left-ye.left)*je-Tr.x,y:(Ct.top-ye.top)*$e-Tr.y,width:Ct.width*je,height:Ct.height*$e}}return Ue}function Oa(){if(!d||z.length!==1||!N)return;const ue=Lw({html:d.htmlSource,slideId:d.id,groupElementId:N});ue&&(v(ue),D(ue.childElementIds))}function Et(ue){if(!d||!N||!we)return;const Ce=xd(d,N,"transform"),ye={x:(we.x-K)/$,y:(we.y-M)/$,width:we.width/$,height:we.height/$};let je=0,$e=0;if(ue==="left"?je=-ye.x:ue==="hcenter"?je=X/2-(ye.x+ye.width/2):ue==="right"?je=X-(ye.x+ye.width):ue==="top"?$e=-ye.y:ue==="vcenter"?$e=G/2-(ye.y+ye.height/2):ue==="bottom"&&($e=G-(ye.y+ye.height)),Math.abs(je)<.01&&Math.abs($e)<.01)return;const Ue=En(Ce);Pe("transform",al(Ue.translateX+je,Ue.translateY+$e,Ue.rotate)??"")}function Hn(ue){var Ql;if(!d||z.length<3)return;const Ce=(Ql=C.current)==null?void 0:Ql.contentDocument,ye=Ce==null?void 0:Ce.querySelector(d.rootSelector),je=ye==null?void 0:ye.getBoundingClientRect();if(!Ce||!je)return;const $e=z.map(xt=>{const ln=We(Ce,xt);if(!ln)return null;const Ut=ln.getBoundingClientRect();return{elementId:xt,node:ln,rect:{x:Ut.left-je.left,y:Ut.top-je.top,width:Ut.width,height:Ut.height}}}).filter(xt=>!!xt);if($e.length<3)return;const Ue=ue==="vertical"?"y":"x",tt=ue==="vertical"?"height":"width",gt=[...$e].sort((xt,ln)=>xt.rect[Ue]-ln.rect[Ue]),at=gt[0],Ct=gt[gt.length-1];if(!at||!Ct)return;const it=at.rect[Ue]+at.rect[tt]/2,Tr=(Ct.rect[Ue]+Ct.rect[tt]/2-it)/(gt.length-1),rs=gt.map((xt,ln)=>{const Ut=it+Tr*ln,Ar=xt.rect[Ue]+xt.rect[tt]/2,Un=Ut-Ar;if(Math.abs(Un)<.01)return null;const Mr=zo(xt.node),_r=En(Mr.transform),Da=$f({...Mr,transform:al(_r.translateX+(Ue==="x"?Un:0),_r.translateY+(Ue==="y"?Un:0),_r.rotate),transformOrigin:Mr.transformOrigin||"center center"});return{type:"element.layout.update",slideId:d.id,elementId:xt.elementId,previousStyle:Mr,nextStyle:Da,timestamp:Date.now()}}).filter(xt=>!!xt);jt(rs)}return zN({activeSlide:d,selectedElementIds:z,iframeRef:C,slideWidth:X,slideHeight:G,isEditingText:k,canUndo:h>0,canRedo:m>0,onCommitOperation:v,onSelectElementIds:D,onEscapeSelection:H,onUndo:b,onRedo:S}),d?x.jsx(WR,{children:x.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[x.jsx(l_,{deckTitle:O,sourceLabel:o,isSaving:i}),x.jsxs("div",{className:"flex min-h-0 flex-auto gap-3 overflow-hidden max-[1200px]:block",children:[x.jsx(o_,{slides:u,activeSlideId:d.id,slideCount:u.length,thumbnails:A,onSelectSlide:ue=>{p(ue),Z(null)}}),x.jsx("main",{className:"flex min-h-0 min-w-0 flex-auto overflow-visible max-[1200px]:block",children:x.jsx(FR,{slideWidth:X,slideHeight:G,offsetX:K,offsetY:M,scale:$,selectionOverlay:we,toolbarKey:z.length?`${d.id}:${z.join(",")}`:null,inspectedStyles:oe,selectedElementType:le,selectionCommandAvailability:te,groupScopeOverlayPassive:ae,isEditingText:k,manipulationOverlay:ce,iframeRef:C,stageViewportRef:T,selectionOverlayRef:E,isManipulating:se,onSelectionOverlayMouseDown:ue=>{z.length&&xe({clientX:ue.clientX,clientY:ue.clientY,preventDefault:()=>ue.preventDefault(),stopPropagation:()=>ue.stopPropagation()})},onResizeHandleMouseDown:(ue,Ce)=>{z.length&&fe(ue,{clientX:Ce.clientX,clientY:Ce.clientY,preventDefault:()=>Ce.preventDefault(),stopPropagation:()=>Ce.stopPropagation()})},onRotateHandleMouseDown:ue=>{z.length===1&&Me({clientX:ue.clientX,clientY:ue.clientY,preventDefault:()=>ue.preventDefault(),stopPropagation:()=>ue.stopPropagation()})},onSelectionOverlayDoubleClick:ue=>{var Ce;if(q&&((Ce=C.current)!=null&&Ce.contentDocument)){const ye=C.current.getBoundingClientRect(),$e=C.current.contentDocument.elementFromPoint(ue.clientX-ye.left,ue.clientY-ye.top),Ue=$e==null?void 0:$e.closest(`[data-editable][${Ae}]`);if((Ue==null?void 0:Ue.getAttribute("data-editable"))==="text"){const tt=Ue.getAttribute(Ae);if(tt){_(tt);return}}}if(z.length===1&&(I==null?void 0:I.type)==="text"&&N){_(N);return}z.length===1&&(I==null?void 0:I.type)==="group"&&N&&j(N)},onBackgroundClick:()=>{ie||H()},onStyleChange:Pe,onAttributeChange:kt,onAlignToSlide:Et,onDistribute:Hn,onGroup:vn,onLayerOrder:Ht,onUngroup:Oa,onDuplicate:be,onDelete:yn,attributeValues:nt})})]})]})}):x.jsx("div",{className:"grid min-h-screen place-items-center",children:"No slides loaded."})}const PO="/deck/manifest.json",$O="/__editor/save-generated-deck",Ov=800;function KO(){const[n,r]=y.useState("Generated deck"),[o,i]=y.useState([]),[c,u]=y.useState("Generated deck"),[d,h]=y.useState(null),[m,p]=y.useState(!0),[v,b]=y.useState(!1),S=y.useRef(null),C=y.useRef([]),T=y.useRef(null),E=y.useRef(null),A=y.useRef(0),N=y.useRef(!1),z=y.useRef(Date.now());y.useEffect(()=>{let Z=!1;return kw({manifestUrl:`${PO}?v=${Date.now()}`}).then(D=>{if(!Z){if(!D){r("Generated deck"),i([]),u("Generated deck unavailable"),h("No slides were found at /deck/manifest.json."),p(!1);return}S.current=D.manifest,r(D.manifest.topic||"Generated deck"),i(D.slides),C.current=D.slides,u(D.manifest.topic?`Generated deck: ${D.manifest.topic}`:"Generated deck from Starry Slides Editor e2e generator"),h(null),p(!1)}}).catch(()=>{Z||(r("Generated deck"),i([]),u("Generated deck unavailable"),h("The app could not load the generated deck."),p(!1))}),()=>{Z=!0,E.current&&window.clearTimeout(E.current)}},[]);const k=()=>{var H;const Z=S.current,D=T.current,_=A.current;if(!((H=Z==null?void 0:Z.slides)!=null&&H.length)||!(D!=null&&D.length)||N.current)return;N.current=!0;const j=new Map(C.current.map((I,J)=>{var le,re;return[I.id,I.sourceFile??((re=(le=Z.slides)==null?void 0:le[J])==null?void 0:re.file)]}));fetch($O,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientLoadedAt:z.current,slides:D.map(I=>({file:I.sourceFile??j.get(I.id),htmlSource:I.htmlSource}))})}).catch(()=>{h("The app could not write generated slides back to disk.")}).finally(()=>{if(N.current=!1,A.current!==_){E.current||(E.current=window.setTimeout(()=>{E.current=null,k()},Ov));return}b(!1)})};return{deckTitle:n,slides:o,sourceLabel:c,errorMessage:d,isLoading:m,isSaving:v,saveSlides:Z=>{var _;if(C.current===Z)return;const D=S.current;(_=D==null?void 0:D.slides)!=null&&_.length&&(C.current=Z,T.current=Z,A.current+=1,b(!0),E.current&&window.clearTimeout(E.current),E.current=window.setTimeout(()=>{E.current=null,k()},Ov))}}}function zv({title:n,body:r}){return x.jsx("main",{style:{minHeight:"100vh",display:"grid",placeItems:"center",padding:"32px",background:"#f4efe8",color:"#241d16",fontFamily:'"Avenir Next", "Segoe UI", sans-serif'},children:x.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:[x.jsx("h1",{style:{margin:"0 0 12px",fontSize:"40px",lineHeight:1.05},children:n}),x.jsx("p",{style:{margin:0,fontSize:"20px",lineHeight:1.5},children:r})]})})}function QO(){const{deckTitle:n,slides:r,sourceLabel:o,errorMessage:i,isLoading:c,isSaving:u,saveSlides:d}=KO();return c?x.jsx(zv,{title:"Loading generated deck",body:"The app is importing the latest generated slides."}):i?x.jsx(zv,{title:"Generated deck required",body:i}):x.jsx(IO,{slides:r,deckTitle:n,sourceLabel:o,isSaving:u,onSlidesChange:d})}const Fx=document.getElementById("root");if(!Fx)throw new Error("Root element #root was not found.");xw.createRoot(Fx).render(x.jsx(rl.StrictMode,{children:x.jsx(QO,{})}));
|