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,412 @@
|
|
|
1
|
+
function Ew(n,l){for(var o=0;o<l.length;o++){const i=l[o];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in n)){const u=Object.getOwnPropertyDescriptor(i,s);u&&Object.defineProperty(n,s,u.get?u:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function o(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(s){if(s.ep)return;s.ep=!0;const u=o(s);fetch(s.href,u)}})();function Hd(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Cf={exports:{}},Go={};/**
|
|
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 fy;function Tw(){if(fy)return Go;fy=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function o(i,s,u){var d=null;if(u!==void 0&&(d=""+u),s.key!==void 0&&(d=""+s.key),"key"in s){u={};for(var m in s)m!=="key"&&(u[m]=s[m])}else u=s;return s=u.ref,{$$typeof:n,type:i,key:d,ref:s!==void 0?s:null,props:u}}return Go.Fragment=l,Go.jsx=o,Go.jsxs=o,Go}var dy;function Cw(){return dy||(dy=1,Cf.exports=Tw()),Cf.exports}var v=Cw(),Mf={exports:{}},De={};/**
|
|
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 my;function Mw(){if(my)return De;my=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),S=Symbol.iterator;function T(R){return R===null||typeof R!="object"?null:(R=S&&R[S]||R["@@iterator"],typeof R=="function"?R:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,A={};function _(R,G,J){this.props=R,this.context=G,this.refs=A,this.updater=J||C}_.prototype.isReactComponent={},_.prototype.setState=function(R,G){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,G,"setState")},_.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function N(){}N.prototype=_.prototype;function D(R,G,J){this.props=R,this.context=G,this.refs=A,this.updater=J||C}var V=D.prototype=new N;V.constructor=D,M(V,_.prototype),V.isPureReactComponent=!0;var ae=Array.isArray;function I(){}var $={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function F(R,G,J){var le=J.ref;return{$$typeof:n,type:R,key:G,ref:le!==void 0?le:null,props:J}}function ne(R,G){return F(R.type,G,R.props)}function re(R){return typeof R=="object"&&R!==null&&R.$$typeof===n}function q(R){var G={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(J){return G[J]})}var H=/\/+/g;function Y(R,G){return typeof R=="object"&&R!==null&&R.key!=null?q(""+R.key):G.toString(36)}function ee(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(I,I):(R.status="pending",R.then(function(G){R.status==="pending"&&(R.status="fulfilled",R.value=G)},function(G){R.status==="pending"&&(R.status="rejected",R.reason=G)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function E(R,G,J,le,se){var ie=typeof R;(ie==="undefined"||ie==="boolean")&&(R=null);var de=!1;if(R===null)de=!0;else switch(ie){case"bigint":case"string":case"number":de=!0;break;case"object":switch(R.$$typeof){case n:case l:de=!0;break;case x:return de=R._init,E(de(R._payload),G,J,le,se)}}if(de)return se=se(R),de=le===""?"."+Y(R,0):le,ae(se)?(J="",de!=null&&(J=de.replace(H,"$&/")+"/"),E(se,G,J,"",function(ve){return ve})):se!=null&&(re(se)&&(se=ne(se,J+(se.key==null||R&&R.key===se.key?"":(""+se.key).replace(H,"$&/")+"/")+de)),G.push(se)),1;de=0;var Z=le===""?".":le+":";if(ae(R))for(var ce=0;ce<R.length;ce++)le=R[ce],ie=Z+Y(le,ce),de+=E(le,G,J,ie,se);else if(ce=T(R),typeof ce=="function")for(R=ce.call(R),ce=0;!(le=R.next()).done;)le=le.value,ie=Z+Y(le,ce++),de+=E(le,G,J,ie,se);else if(ie==="object"){if(typeof R.then=="function")return E(ee(R),G,J,le,se);throw G=String(R),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return de}function j(R,G,J){if(R==null)return R;var le=[],se=0;return E(R,le,"","",function(ie){return G.call(J,ie,se++)}),le}function B(R){if(R._status===-1){var G=R._result;G=G(),G.then(function(J){(R._status===0||R._status===-1)&&(R._status=1,R._result=J)},function(J){(R._status===0||R._status===-1)&&(R._status=2,R._result=J)}),R._status===-1&&(R._status=0,R._result=G)}if(R._status===1)return R._result.default;throw R._result}var P=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},L={map:j,forEach:function(R,G,J){j(R,function(){G.apply(this,arguments)},J)},count:function(R){var G=0;return j(R,function(){G++}),G},toArray:function(R){return j(R,function(G){return G})||[]},only:function(R){if(!re(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return De.Activity=p,De.Children=L,De.Component=_,De.Fragment=o,De.Profiler=s,De.PureComponent=D,De.StrictMode=i,De.Suspense=h,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,De.__COMPILER_RUNTIME={__proto__:null,c:function(R){return $.H.useMemoCache(R)}},De.cache=function(R){return function(){return R.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(R,G,J){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var le=M({},R.props),se=R.key;if(G!=null)for(ie in G.key!==void 0&&(se=""+G.key),G)!z.call(G,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&G.ref===void 0||(le[ie]=G[ie]);var ie=arguments.length-2;if(ie===1)le.children=J;else if(1<ie){for(var de=Array(ie),Z=0;Z<ie;Z++)de[Z]=arguments[Z+2];le.children=de}return F(R.type,se,le)},De.createContext=function(R){return R={$$typeof:d,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:u,_context:R},R},De.createElement=function(R,G,J){var le,se={},ie=null;if(G!=null)for(le in G.key!==void 0&&(ie=""+G.key),G)z.call(G,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(se[le]=G[le]);var de=arguments.length-2;if(de===1)se.children=J;else if(1<de){for(var Z=Array(de),ce=0;ce<de;ce++)Z[ce]=arguments[ce+2];se.children=Z}if(R&&R.defaultProps)for(le in de=R.defaultProps,de)se[le]===void 0&&(se[le]=de[le]);return F(R,ie,se)},De.createRef=function(){return{current:null}},De.forwardRef=function(R){return{$$typeof:m,render:R}},De.isValidElement=re,De.lazy=function(R){return{$$typeof:x,_payload:{_status:-1,_result:R},_init:B}},De.memo=function(R,G){return{$$typeof:g,type:R,compare:G===void 0?null:G}},De.startTransition=function(R){var G=$.T,J={};$.T=J;try{var le=R(),se=$.S;se!==null&&se(J,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(I,P)}catch(ie){P(ie)}finally{G!==null&&J.types!==null&&(G.types=J.types),$.T=G}},De.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},De.use=function(R){return $.H.use(R)},De.useActionState=function(R,G,J){return $.H.useActionState(R,G,J)},De.useCallback=function(R,G){return $.H.useCallback(R,G)},De.useContext=function(R){return $.H.useContext(R)},De.useDebugValue=function(){},De.useDeferredValue=function(R,G){return $.H.useDeferredValue(R,G)},De.useEffect=function(R,G){return $.H.useEffect(R,G)},De.useEffectEvent=function(R){return $.H.useEffectEvent(R)},De.useId=function(){return $.H.useId()},De.useImperativeHandle=function(R,G,J){return $.H.useImperativeHandle(R,G,J)},De.useInsertionEffect=function(R,G){return $.H.useInsertionEffect(R,G)},De.useLayoutEffect=function(R,G){return $.H.useLayoutEffect(R,G)},De.useMemo=function(R,G){return $.H.useMemo(R,G)},De.useOptimistic=function(R,G){return $.H.useOptimistic(R,G)},De.useReducer=function(R,G,J){return $.H.useReducer(R,G,J)},De.useRef=function(R){return $.H.useRef(R)},De.useState=function(R){return $.H.useState(R)},De.useSyncExternalStore=function(R,G,J){return $.H.useSyncExternalStore(R,G,J)},De.useTransition=function(){return $.H.useTransition()},De.version="19.2.5",De}var hy;function Bd(){return hy||(hy=1,Mf.exports=Mw()),Mf.exports}var b=Bd();const pe=Hd(b),X0=Ew({__proto__:null,default:pe},[b]);var Af={exports:{}},Yo={},_f={exports:{}},Rf={};/**
|
|
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 py;function Aw(){return py||(py=1,(function(n){function l(E,j){var B=E.length;E.push(j);e:for(;0<B;){var P=B-1>>>1,L=E[P];if(0<s(L,j))E[P]=j,E[B]=L,B=P;else break e}}function o(E){return E.length===0?null:E[0]}function i(E){if(E.length===0)return null;var j=E[0],B=E.pop();if(B!==j){E[0]=B;e:for(var P=0,L=E.length,R=L>>>1;P<R;){var G=2*(P+1)-1,J=E[G],le=G+1,se=E[le];if(0>s(J,B))le<L&&0>s(se,J)?(E[P]=se,E[le]=B,P=le):(E[P]=J,E[G]=B,P=G);else if(le<L&&0>s(se,B))E[P]=se,E[le]=B,P=le;else break e}}return j}function s(E,j){var B=E.sortIndex-j.sortIndex;return B!==0?B:E.id-j.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,m=d.now();n.unstable_now=function(){return d.now()-m}}var h=[],g=[],x=1,p=null,S=3,T=!1,C=!1,M=!1,A=!1,_=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function V(E){for(var j=o(g);j!==null;){if(j.callback===null)i(g);else if(j.startTime<=E)i(g),j.sortIndex=j.expirationTime,l(h,j);else break;j=o(g)}}function ae(E){if(M=!1,V(E),!C)if(o(h)!==null)C=!0,I||(I=!0,q());else{var j=o(g);j!==null&&ee(ae,j.startTime-E)}}var I=!1,$=-1,z=5,F=-1;function ne(){return A?!0:!(n.unstable_now()-F<z)}function re(){if(A=!1,I){var E=n.unstable_now();F=E;var j=!0;try{e:{C=!1,M&&(M=!1,N($),$=-1),T=!0;var B=S;try{t:{for(V(E),p=o(h);p!==null&&!(p.expirationTime>E&&ne());){var P=p.callback;if(typeof P=="function"){p.callback=null,S=p.priorityLevel;var L=P(p.expirationTime<=E);if(E=n.unstable_now(),typeof L=="function"){p.callback=L,V(E),j=!0;break t}p===o(h)&&i(h),V(E)}else i(h);p=o(h)}if(p!==null)j=!0;else{var R=o(g);R!==null&&ee(ae,R.startTime-E),j=!1}}break e}finally{p=null,S=B,T=!1}j=void 0}}finally{j?q():I=!1}}}var q;if(typeof D=="function")q=function(){D(re)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,Y=H.port2;H.port1.onmessage=re,q=function(){Y.postMessage(null)}}else q=function(){_(re,0)};function ee(E,j){$=_(function(){E(n.unstable_now())},j)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(E){E.callback=null},n.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<E?Math.floor(1e3/E):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(E){switch(S){case 1:case 2:case 3:var j=3;break;default:j=S}var B=S;S=j;try{return E()}finally{S=B}},n.unstable_requestPaint=function(){A=!0},n.unstable_runWithPriority=function(E,j){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var B=S;S=E;try{return j()}finally{S=B}},n.unstable_scheduleCallback=function(E,j,B){var P=n.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?P+B:P):B=P,E){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=B+L,E={id:x++,callback:j,priorityLevel:E,startTime:B,expirationTime:L,sortIndex:-1},B>P?(E.sortIndex=B,l(g,E),o(h)===null&&E===o(g)&&(M?(N($),$=-1):M=!0,ee(ae,B-P))):(E.sortIndex=L,l(h,E),C||T||(C=!0,I||(I=!0,q()))),E},n.unstable_shouldYield=ne,n.unstable_wrapCallback=function(E){var j=S;return function(){var B=S;S=j;try{return E.apply(this,arguments)}finally{S=B}}}})(Rf)),Rf}var gy;function _w(){return gy||(gy=1,_f.exports=Aw()),_f.exports}var Nf={exports:{}},Kt={};/**
|
|
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 yy;function Rw(){if(yy)return Kt;yy=1;var n=Bd();function l(h){var g="https://react.dev/errors/"+h;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var i={d:{f:o,r:function(){throw Error(l(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(h,g,x){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:p==null?null:""+p,children:h,containerInfo:g,implementation:x}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(h,g){if(h==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Kt.createPortal=function(h,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(l(299));return u(h,g,null,x)},Kt.flushSync=function(h){var g=d.T,x=i.p;try{if(d.T=null,i.p=2,h)return h()}finally{d.T=g,i.p=x,i.d.f()}},Kt.preconnect=function(h,g){typeof h=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,i.d.C(h,g))},Kt.prefetchDNS=function(h){typeof h=="string"&&i.d.D(h)},Kt.preinit=function(h,g){if(typeof h=="string"&&g&&typeof g.as=="string"){var x=g.as,p=m(x,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,T=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?i.d.S(h,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:p,integrity:S,fetchPriority:T}):x==="script"&&i.d.X(h,{crossOrigin:p,integrity:S,fetchPriority:T,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Kt.preinitModule=function(h,g){if(typeof h=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=m(g.as,g.crossOrigin);i.d.M(h,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&i.d.M(h)},Kt.preload=function(h,g){if(typeof h=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,p=m(x,g.crossOrigin);i.d.L(h,x,{crossOrigin:p,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Kt.preloadModule=function(h,g){if(typeof h=="string")if(g){var x=m(g.as,g.crossOrigin);i.d.m(h,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else i.d.m(h)},Kt.requestFormReset=function(h){i.d.r(h)},Kt.unstable_batchedUpdates=function(h,g){return h(g)},Kt.useFormState=function(h,g,x){return d.H.useFormState(h,g,x)},Kt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Kt.version="19.2.5",Kt}var vy;function K0(){if(vy)return Nf.exports;vy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Nf.exports=Rw(),Nf.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 by;function Nw(){if(by)return Yo;by=1;var n=_w(),l=Bd(),o=K0();function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(u(e)!==e)throw Error(i(188))}function g(e){var t=e.alternate;if(!t){if(t=u(e),t===null)throw Error(i(188));return t!==e?null:e}for(var a=e,r=t;;){var c=a.return;if(c===null)break;var f=c.alternate;if(f===null){if(r=c.return,r!==null){a=r;continue}break}if(c.child===f.child){for(f=c.child;f;){if(f===a)return h(c),e;if(f===r)return h(c),t;f=f.sibling}throw Error(i(188))}if(a.return!==r.return)a=c,r=f;else{for(var y=!1,w=c.child;w;){if(w===a){y=!0,a=c,r=f;break}if(w===r){y=!0,r=c,a=f;break}w=w.sibling}if(!y){for(w=f.child;w;){if(w===a){y=!0,a=f,r=c;break}if(w===r){y=!0,r=f,a=c;break}w=w.sibling}if(!y)throw Error(i(189))}}if(a.alternate!==r)throw Error(i(190))}if(a.tag!==3)throw Error(i(188));return a.stateNode.current===a?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,S=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),D=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=re&&e[re]||e["@@iterator"],typeof e=="function"?e:null)}var H=Symbol.for("react.client.reference");function Y(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===H?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case _:return"Profiler";case A:return"StrictMode";case ae:return"Suspense";case I:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case D:return e.displayName||"Context";case N:return(e._context.displayName||"Context")+".Consumer";case V: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:Y(e.type)||"Memo";case z:t=e._payload,e=e._init;try{return Y(e(t))}catch{}}return null}var ee=Array.isArray,E=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},P=[],L=-1;function R(e){return{current:e}}function G(e){0>L||(e.current=P[L],P[L]=null,L--)}function J(e,t){L++,P[L]=e.current,e.current=t}var le=R(null),se=R(null),ie=R(null),de=R(null);function Z(e,t){switch(J(ie,t),J(se,e),J(le,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?jg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=jg(t),e=kg(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(le),J(le,e)}function ce(){G(le),G(se),G(ie)}function ve(e){e.memoizedState!==null&&J(de,e);var t=le.current,a=kg(t,e.type);t!==a&&(J(se,e),J(le,a))}function we(e){se.current===e&&(G(le),G(se)),de.current===e&&(G(de),Ho._currentValue=B)}var Te,Ue;function Le(e){if(Te===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Te=t&&t[1]||"",Ue=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Te+e+Ue}var Nt=!1;function It(e,t){if(!e||Nt)return"";Nt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(W){var Q=W}Reflect.construct(e,[],fe)}else{try{fe.call()}catch(W){Q=W}e.call(fe.prototype)}}else{try{throw Error()}catch(W){Q=W}(fe=e())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(W){if(W&&Q&&typeof W.stack=="string")return[W.stack,Q.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=r.DetermineComponentFrameRoot(),y=f[0],w=f[1];if(y&&w){var O=y.split(`
|
|
44
|
+
`),K=w.split(`
|
|
45
|
+
`);for(c=r=0;r<O.length&&!O[r].includes("DetermineComponentFrameRoot");)r++;for(;c<K.length&&!K[c].includes("DetermineComponentFrameRoot");)c++;if(r===O.length||c===K.length)for(r=O.length-1,c=K.length-1;1<=r&&0<=c&&O[r]!==K[c];)c--;for(;1<=r&&0<=c;r--,c--)if(O[r]!==K[c]){if(r!==1||c!==1)do if(r--,c--,0>c||O[r]!==K[c]){var oe=`
|
|
46
|
+
`+O[r].replace(" at new "," at ");return e.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",e.displayName)),oe}while(1<=r&&0<=c);break}}}finally{Nt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Le(a):""}function kt(e,t){switch(e.tag){case 26:case 27:case 5:return Le(e.type);case 16:return Le("Lazy");case 13:return e.child!==t&&t!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("SuspenseList");case 0:case 15:return It(e.type,!1);case 11:return It(e.type.render,!1);case 1:return It(e.type,!0);case 31:return Le("Activity");default:return""}}function Tn(e){try{var t="",a=null;do t+=kt(e,a),a=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var Ae=Object.prototype.hasOwnProperty,_e=n.unstable_scheduleCallback,sn=n.unstable_cancelCallback,ht=n.unstable_shouldYield,Lt=n.unstable_requestPaint,Ot=n.unstable_now,xl=n.unstable_getCurrentPriorityLevel,Et=n.unstable_ImmediatePriority,Tt=n.unstable_UserBlockingPriority,Un=n.unstable_NormalPriority,Fn=n.unstable_LowPriority,Jt=n.unstable_IdlePriority,sa=n.log,Ht=n.unstable_setDisableYieldValue,cn=null,Gt=null;function un(e){if(typeof sa=="function"&&Ht(e),Gt&&typeof Gt.setStrictMode=="function")try{Gt.setStrictMode(cn,e)}catch{}}var Ct=Math.clz32?Math.clz32:Cn,Jr=Math.log,Sl=Math.LN2;function Cn(e){return e>>>=0,e===0?32:31-(Jr(e)/Sl|0)|0}var ja=256,ka=262144,ca=4194304;function Mn(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 Ne(e,t,a){var r=e.pendingLanes;if(r===0)return 0;var c=0,f=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var w=r&134217727;return w!==0?(r=w&~f,r!==0?c=Mn(r):(y&=w,y!==0?c=Mn(y):a||(a=w&~e,a!==0&&(c=Mn(a))))):(w=r&~f,w!==0?c=Mn(w):y!==0?c=Mn(y):a||(a=r&~e,a!==0&&(c=Mn(a)))),c===0?0:t!==0&&t!==c&&(t&f)===0&&(f=c&-c,a=t&-t,f>=a||f===32&&(a&4194048)!==0)?t:c}function it(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function xt(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 Bt(){var e=ca;return ca<<=1,(ca&62914560)===0&&(ca=4194304),e}function Qn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function ct(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $t(e,t,a,r,c,f){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var w=e.entanglements,O=e.expirationTimes,K=e.hiddenUpdates;for(a=y&~a;0<a;){var oe=31-Ct(a),fe=1<<oe;w[oe]=0,O[oe]=-1;var Q=K[oe];if(Q!==null)for(K[oe]=null,oe=0;oe<Q.length;oe++){var W=Q[oe];W!==null&&(W.lane&=-536870913)}a&=~fe}r!==0&&te(e,r,0),f!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=f&~(y&~t))}function te(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ct(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|a&261930}function me(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var r=31-Ct(a),c=1<<r;c&t|e[r]&t&&(e[r]|=t),a&=~c}}function he(e,t){var a=t&-t;return a=(a&42)!==0?1:Ee(a),(a&(e.suspendedLanes|t))!==0?0:a}function Ee(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ze(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ie(){var e=j.p;return e!==0?e:(e=window.event,e===void 0?32:ly(e.type))}function ut(e,t){var a=j.p;try{return j.p=e,t()}finally{j.p=a}}var We=Math.random().toString(36).slice(2),He="__reactFiber$"+We,rt="__reactProps$"+We,Qe="__reactContainer$"+We,Xt="__reactEvents$"+We,fn="__reactListeners$"+We,zt="__reactHandles$"+We,Zn="__reactResources$"+We,pt="__reactMarker$"+We;function In(e){delete e[He],delete e[rt],delete e[Xt],delete e[fn],delete e[zt]}function dn(e){var t=e[He];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Qe]||a[He]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Yg(e);e!==null;){if(a=e[He])return a;e=Yg(e)}return t}e=a,a=e.parentNode}return null}function La(e){if(e=e[He]||e[Qe]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ua(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Gn(e){var t=e[Zn];return t||(t=e[Zn]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[pt]=!0}var li=new Set,Em={};function wl(e,t){Jl(e,t),Jl(e+"Capture",t)}function Jl(e,t){for(Em[e]=t,e=0;e<t.length;e++)li.add(t[e])}var h1=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]*$"),Tm={},Cm={};function p1(e){return Ae.call(Cm,e)?!0:Ae.call(Tm,e)?!1:h1.test(e)?Cm[e]=!0:(Tm[e]=!0,!1)}function ri(e,t,a){if(p1(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function oi(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function fa(e,t,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+r)}}function An(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function g1(e,t,a){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,f=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(y){a=""+y,f.call(this,y)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function yc(e){if(!e._valueTracker){var t=Mm(e)?"checked":"value";e._valueTracker=g1(e,t,""+e[t])}}function Am(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),r="";return e&&(r=Mm(e)?e.checked?"true":"false":e.value),e=r,e!==a?(t.setValue(e),!0):!1}function ii(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 y1=/[\n"\\]/g;function _n(e){return e.replace(y1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function vc(e,t,a,r,c,f,y,w){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+An(t)):e.value!==""+An(t)&&(e.value=""+An(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?bc(e,y,An(t)):a!=null?bc(e,y,An(a)):r!=null&&e.removeAttribute("value"),c==null&&f!=null&&(e.defaultChecked=!!f),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+An(w):e.removeAttribute("name")}function _m(e,t,a,r,c,f,y,w){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){yc(e);return}a=a!=null?""+An(a):"",t=t!=null?""+An(t):a,w||t===e.value||(e.value=t),e.defaultValue=t}r=r??c,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=w?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),yc(e)}function bc(e,t,a){t==="number"&&ii(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Wl(e,t,a,r){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&r&&(e[a].defaultSelected=!0)}else{for(a=""+An(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,r&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Rm(e,t,a){if(t!=null&&(t=""+An(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+An(a):""}function Nm(e,t,a,r){if(t==null){if(r!=null){if(a!=null)throw Error(i(92));if(ee(r)){if(1<r.length)throw Error(i(93));r=r[0]}a=r}a==null&&(a=""),t=a}a=An(t),e.defaultValue=a,r=e.textContent,r===a&&r!==""&&r!==null&&(e.value=r),yc(e)}function er(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var v1=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 Om(e,t,a){var r=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,a):typeof a!="number"||a===0||v1.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function zm(e,t,a){if(t!=null&&typeof t!="object")throw Error(i(62));if(e=e.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var c in t)r=t[c],t.hasOwnProperty(c)&&a[c]!==r&&Om(e,c,r)}else for(var f in t)t.hasOwnProperty(f)&&Om(e,f,t[f])}function xc(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 b1=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"]]),x1=/^[\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 si(e){return x1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function da(){}var Sc=null;function wc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tr=null,nr=null;function Dm(e){var t=La(e);if(t&&(e=t.stateNode)){var a=e[rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(vc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+_n(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var r=a[t];if(r!==e&&r.form===e.form){var c=r[rt]||null;if(!c)throw Error(i(90));vc(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)r=a[t],r.form===e.form&&Am(r)}break e;case"textarea":Rm(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Wl(e,!!a.multiple,t,!1)}}}var Ec=!1;function jm(e,t,a){if(Ec)return e(t,a);Ec=!0;try{var r=e(t);return r}finally{if(Ec=!1,(tr!==null||nr!==null)&&(Fi(),tr&&(t=tr,e=nr,nr=tr=null,Dm(t),e)))for(t=0;t<e.length;t++)Dm(e[t])}}function Wr(e,t){var a=e.stateNode;if(a===null)return null;var r=a[rt]||null;if(r===null)return null;a=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(i(231,t,typeof a));return a}var ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tc=!1;if(ma)try{var eo={};Object.defineProperty(eo,"passive",{get:function(){Tc=!0}}),window.addEventListener("test",eo,eo),window.removeEventListener("test",eo,eo)}catch{Tc=!1}var Ha=null,Cc=null,ci=null;function km(){if(ci)return ci;var e,t=Cc,a=t.length,r,c="value"in Ha?Ha.value:Ha.textContent,f=c.length;for(e=0;e<a&&t[e]===c[e];e++);var y=a-e;for(r=1;r<=y&&t[a-r]===c[f-r];r++);return ci=c.slice(e,1<r?1-r:void 0)}function ui(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 fi(){return!0}function Lm(){return!1}function Wt(e){function t(a,r,c,f,y){this._reactName=a,this._targetInst=c,this.type=r,this.nativeEvent=f,this.target=y,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(a=e[w],this[w]=a?a(f):f[w]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?fi:Lm,this.isPropagationStopped=Lm,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=fi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=fi)},persist:function(){},isPersistent:fi}),t}var El={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},di=Wt(El),to=p({},El,{view:0,detail:0}),S1=Wt(to),Mc,Ac,no,mi=p({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rc,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!==no&&(no&&e.type==="mousemove"?(Mc=e.screenX-no.screenX,Ac=e.screenY-no.screenY):Ac=Mc=0,no=e),Mc)},movementY:function(e){return"movementY"in e?e.movementY:Ac}}),Hm=Wt(mi),w1=p({},mi,{dataTransfer:0}),E1=Wt(w1),T1=p({},to,{relatedTarget:0}),_c=Wt(T1),C1=p({},El,{animationName:0,elapsedTime:0,pseudoElement:0}),M1=Wt(C1),A1=p({},El,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_1=Wt(A1),R1=p({},El,{data:0}),Bm=Wt(R1),N1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},O1={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"},z1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function D1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=z1[e])?!!t[e]:!1}function Rc(){return D1}var j1=p({},to,{key:function(e){if(e.key){var t=N1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ui(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?O1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rc,charCode:function(e){return e.type==="keypress"?ui(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ui(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),k1=Wt(j1),L1=p({},mi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Um=Wt(L1),H1=p({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rc}),B1=Wt(H1),U1=p({},El,{propertyName:0,elapsedTime:0,pseudoElement:0}),I1=Wt(U1),G1=p({},mi,{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}),Y1=Wt(G1),V1=p({},El,{newState:0,oldState:0}),q1=Wt(V1),P1=[9,13,27,32],Nc=ma&&"CompositionEvent"in window,ao=null;ma&&"documentMode"in document&&(ao=document.documentMode);var $1=ma&&"TextEvent"in window&&!ao,Im=ma&&(!Nc||ao&&8<ao&&11>=ao),Gm=" ",Ym=!1;function Vm(e,t){switch(e){case"keyup":return P1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ar=!1;function X1(e,t){switch(e){case"compositionend":return qm(t);case"keypress":return t.which!==32?null:(Ym=!0,Gm);case"textInput":return e=t.data,e===Gm&&Ym?null:e;default:return null}}function K1(e,t){if(ar)return e==="compositionend"||!Nc&&Vm(e,t)?(e=km(),ci=Cc=Ha=null,ar=!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 Im&&t.locale!=="ko"?null:t.data;default:return null}}var F1={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 Pm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!F1[e.type]:t==="textarea"}function $m(e,t,a,r){tr?nr?nr.push(r):nr=[r]:tr=r,t=ns(t,"onChange"),0<t.length&&(a=new di("onChange","change",null,a,r),e.push({event:a,listeners:t}))}var lo=null,ro=null;function Q1(e){_g(e,0)}function hi(e){var t=ua(e);if(Am(t))return e}function Xm(e,t){if(e==="change")return t}var Km=!1;if(ma){var Oc;if(ma){var zc="oninput"in document;if(!zc){var Fm=document.createElement("div");Fm.setAttribute("oninput","return;"),zc=typeof Fm.oninput=="function"}Oc=zc}else Oc=!1;Km=Oc&&(!document.documentMode||9<document.documentMode)}function Qm(){lo&&(lo.detachEvent("onpropertychange",Zm),ro=lo=null)}function Zm(e){if(e.propertyName==="value"&&hi(ro)){var t=[];$m(t,ro,e,wc(e)),jm(Q1,t)}}function Z1(e,t,a){e==="focusin"?(Qm(),lo=t,ro=a,lo.attachEvent("onpropertychange",Zm)):e==="focusout"&&Qm()}function J1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hi(ro)}function W1(e,t){if(e==="click")return hi(t)}function eS(e,t){if(e==="input"||e==="change")return hi(t)}function tS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mn=typeof Object.is=="function"?Object.is:tS;function oo(e,t){if(mn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),r=Object.keys(t);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var c=a[r];if(!Ae.call(t,c)||!mn(e[c],t[c]))return!1}return!0}function Jm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wm(e,t){var a=Jm(e);e=0;for(var r;a;){if(a.nodeType===3){if(r=e+a.textContent.length,e<=t&&r>=t)return{node:a,offset:t-e};e=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Jm(a)}}function eh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function th(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ii(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=ii(e.document)}return t}function Dc(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 nS=ma&&"documentMode"in document&&11>=document.documentMode,lr=null,jc=null,io=null,kc=!1;function nh(e,t,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;kc||lr==null||lr!==ii(r)||(r=lr,"selectionStart"in r&&Dc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),io&&oo(io,r)||(io=r,r=ns(jc,"onSelect"),0<r.length&&(t=new di("onSelect","select",null,t,a),e.push({event:t,listeners:r}),t.target=lr)))}function Tl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var rr={animationend:Tl("Animation","AnimationEnd"),animationiteration:Tl("Animation","AnimationIteration"),animationstart:Tl("Animation","AnimationStart"),transitionrun:Tl("Transition","TransitionRun"),transitionstart:Tl("Transition","TransitionStart"),transitioncancel:Tl("Transition","TransitionCancel"),transitionend:Tl("Transition","TransitionEnd")},Lc={},ah={};ma&&(ah=document.createElement("div").style,"AnimationEvent"in window||(delete rr.animationend.animation,delete rr.animationiteration.animation,delete rr.animationstart.animation),"TransitionEvent"in window||delete rr.transitionend.transition);function Cl(e){if(Lc[e])return Lc[e];if(!rr[e])return e;var t=rr[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in ah)return Lc[e]=t[a];return e}var lh=Cl("animationend"),rh=Cl("animationiteration"),oh=Cl("animationstart"),aS=Cl("transitionrun"),lS=Cl("transitionstart"),rS=Cl("transitioncancel"),ih=Cl("transitionend"),sh=new Map,Hc="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(" ");Hc.push("scrollEnd");function Yn(e,t){sh.set(e,t),wl(t,[e])}var pi=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)},Rn=[],or=0,Bc=0;function gi(){for(var e=or,t=Bc=or=0;t<e;){var a=Rn[t];Rn[t++]=null;var r=Rn[t];Rn[t++]=null;var c=Rn[t];Rn[t++]=null;var f=Rn[t];if(Rn[t++]=null,r!==null&&c!==null){var y=r.pending;y===null?c.next=c:(c.next=y.next,y.next=c),r.pending=c}f!==0&&ch(a,c,f)}}function yi(e,t,a,r){Rn[or++]=e,Rn[or++]=t,Rn[or++]=a,Rn[or++]=r,Bc|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Uc(e,t,a,r){return yi(e,t,a,r),vi(e)}function Ml(e,t){return yi(e,null,null,t),vi(e)}function ch(e,t,a){e.lanes|=a;var r=e.alternate;r!==null&&(r.lanes|=a);for(var c=!1,f=e.return;f!==null;)f.childLanes|=a,r=f.alternate,r!==null&&(r.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(c=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,c&&t!==null&&(c=31-Ct(a),e=f.hiddenUpdates,r=e[c],r===null?e[c]=[t]:r.push(t),t.lane=a|536870912),f):null}function vi(e){if(50<No)throw No=0,Ku=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ir={};function oS(e,t,a,r){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hn(e,t,a,r){return new oS(e,t,a,r)}function Ic(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ha(e,t){var a=e.alternate;return a===null?(a=hn(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function uh(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function bi(e,t,a,r,c,f){var y=0;if(r=e,typeof e=="function")Ic(e)&&(y=1);else if(typeof e=="string")y=fw(e,a,le.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=hn(31,a,t,c),e.elementType=F,e.lanes=f,e;case M:return Al(a.children,c,f,t);case A:y=8,c|=24;break;case _:return e=hn(12,a,t,c|2),e.elementType=_,e.lanes=f,e;case ae:return e=hn(13,a,t,c),e.elementType=ae,e.lanes=f,e;case I:return e=hn(19,a,t,c),e.elementType=I,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:y=10;break e;case N:y=9;break e;case V:y=11;break e;case $:y=14;break e;case z:y=16,r=null;break e}y=29,a=Error(i(130,e===null?"null":typeof e,"")),r=null}return t=hn(y,a,t,c),t.elementType=e,t.type=r,t.lanes=f,t}function Al(e,t,a,r){return e=hn(7,e,r,t),e.lanes=a,e}function Gc(e,t,a){return e=hn(6,e,null,t),e.lanes=a,e}function fh(e){var t=hn(18,null,null,0);return t.stateNode=e,t}function Yc(e,t,a){return t=hn(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var dh=new WeakMap;function Nn(e,t){if(typeof e=="object"&&e!==null){var a=dh.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Tn(t)},dh.set(e,t),t)}return{value:e,source:t,stack:Tn(t)}}var sr=[],cr=0,xi=null,so=0,On=[],zn=0,Ba=null,Jn=1,Wn="";function pa(e,t){sr[cr++]=so,sr[cr++]=xi,xi=e,so=t}function mh(e,t,a){On[zn++]=Jn,On[zn++]=Wn,On[zn++]=Ba,Ba=e;var r=Jn;e=Wn;var c=32-Ct(r)-1;r&=~(1<<c),a+=1;var f=32-Ct(t)+c;if(30<f){var y=c-c%5;f=(r&(1<<y)-1).toString(32),r>>=y,c-=y,Jn=1<<32-Ct(t)+c|a<<c|r,Wn=f+e}else Jn=1<<f|a<<c|r,Wn=e}function Vc(e){e.return!==null&&(pa(e,1),mh(e,1,0))}function qc(e){for(;e===xi;)xi=sr[--cr],sr[cr]=null,so=sr[--cr],sr[cr]=null;for(;e===Ba;)Ba=On[--zn],On[zn]=null,Wn=On[--zn],On[zn]=null,Jn=On[--zn],On[zn]=null}function hh(e,t){On[zn++]=Jn,On[zn++]=Wn,On[zn++]=Ba,Jn=t.id,Wn=t.overflow,Ba=e}var Yt=null,ft=null,Pe=!1,Ua=null,Dn=!1,Pc=Error(i(519));function Ia(e){var t=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw co(Nn(t,e)),Pc}function ph(e){var t=e.stateNode,a=e.type,r=e.memoizedProps;switch(t[He]=e,t[rt]=r,a){case"dialog":Ye("cancel",t),Ye("close",t);break;case"iframe":case"object":case"embed":Ye("load",t);break;case"video":case"audio":for(a=0;a<zo.length;a++)Ye(zo[a],t);break;case"source":Ye("error",t);break;case"img":case"image":case"link":Ye("error",t),Ye("load",t);break;case"details":Ye("toggle",t);break;case"input":Ye("invalid",t),_m(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ye("invalid",t);break;case"textarea":Ye("invalid",t),Nm(t,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||r.suppressHydrationWarning===!0||zg(t.textContent,a)?(r.popover!=null&&(Ye("beforetoggle",t),Ye("toggle",t)),r.onScroll!=null&&Ye("scroll",t),r.onScrollEnd!=null&&Ye("scrollend",t),r.onClick!=null&&(t.onclick=da),t=!0):t=!1,t||Ia(e,!0)}function gh(e){for(Yt=e.return;Yt;)switch(Yt.tag){case 5:case 31:case 13:Dn=!1;return;case 27:case 3:Dn=!0;return;default:Yt=Yt.return}}function ur(e){if(e!==Yt)return!1;if(!Pe)return gh(e),Pe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||uf(e.type,e.memoizedProps)),a=!a),a&&ft&&Ia(e),gh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ft=Gg(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));ft=Gg(e)}else t===27?(t=ft,el(e.type)?(e=pf,pf=null,ft=e):ft=t):ft=Yt?kn(e.stateNode.nextSibling):null;return!0}function _l(){ft=Yt=null,Pe=!1}function $c(){var e=Ua;return e!==null&&(an===null?an=e:an.push.apply(an,e),Ua=null),e}function co(e){Ua===null?Ua=[e]:Ua.push(e)}var Xc=R(null),Rl=null,ga=null;function Ga(e,t,a){J(Xc,t._currentValue),t._currentValue=a}function ya(e){e._currentValue=Xc.current,G(Xc)}function Kc(e,t,a){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===a)break;e=e.return}}function Fc(e,t,a,r){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var f=c.dependencies;if(f!==null){var y=c.child;f=f.firstContext;e:for(;f!==null;){var w=f;f=c;for(var O=0;O<t.length;O++)if(w.context===t[O]){f.lanes|=a,w=f.alternate,w!==null&&(w.lanes|=a),Kc(f.return,a,e),r||(y=null);break e}f=w.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(i(341));y.lanes|=a,f=y.alternate,f!==null&&(f.lanes|=a),Kc(y,a,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function fr(e,t,a,r){e=null;for(var c=t,f=!1;c!==null;){if(!f){if((c.flags&524288)!==0)f=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(i(387));if(y=y.memoizedProps,y!==null){var w=c.type;mn(c.pendingProps.value,y.value)||(e!==null?e.push(w):e=[w])}}else if(c===de.current){if(y=c.alternate,y===null)throw Error(i(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Ho):e=[Ho])}c=c.return}e!==null&&Fc(t,e,a,r),t.flags|=262144}function Si(e){for(e=e.firstContext;e!==null;){if(!mn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Nl(e){Rl=e,ga=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Vt(e){return yh(Rl,e)}function wi(e,t){return Rl===null&&Nl(e),yh(e,t)}function yh(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ga===null){if(e===null)throw Error(i(308));ga=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ga=ga.next=t;return a}var iS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},sS=n.unstable_scheduleCallback,cS=n.unstable_NormalPriority,Mt={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qc(){return{controller:new iS,data:new Map,refCount:0}}function uo(e){e.refCount--,e.refCount===0&&sS(cS,function(){e.controller.abort()})}var fo=null,Zc=0,dr=0,mr=null;function uS(e,t){if(fo===null){var a=fo=[];Zc=0,dr=ef(),mr={status:"pending",value:void 0,then:function(r){a.push(r)}}}return Zc++,t.then(vh,vh),t}function vh(){if(--Zc===0&&fo!==null){mr!==null&&(mr.status="fulfilled");var e=fo;fo=null,dr=0,mr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fS(e,t){var a=[],r={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(r.status="rejected",r.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),r}var bh=E.S;E.S=function(e,t){ng=Ot(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&uS(e,t),bh!==null&&bh(e,t)};var Ol=R(null);function Jc(){var e=Ol.current;return e!==null?e:ot.pooledCache}function Ei(e,t){t===null?J(Ol,Ol.current):J(Ol,t.pool)}function xh(){var e=Jc();return e===null?null:{parent:Mt._currentValue,pool:e}}var hr=Error(i(460)),Wc=Error(i(474)),Ti=Error(i(542)),Ci={then:function(){}};function Sh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function wh(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(da,da),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Th(e),e;default:if(typeof t.status=="string")t.then(da,da);else{if(e=ot,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=r}},function(r){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Th(e),e}throw Dl=t,hr}}function zl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Dl=a,hr):a}}var Dl=null;function Eh(){if(Dl===null)throw Error(i(459));var e=Dl;return Dl=null,e}function Th(e){if(e===hr||e===Ti)throw Error(i(483))}var pr=null,mo=0;function Mi(e){var t=mo;return mo+=1,pr===null&&(pr=[]),wh(pr,e,t)}function ho(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ai(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 Ch(e){function t(U,k){if(e){var X=U.deletions;X===null?(U.deletions=[k],U.flags|=16):X.push(k)}}function a(U,k){if(!e)return null;for(;k!==null;)t(U,k),k=k.sibling;return null}function r(U){for(var k=new Map;U!==null;)U.key!==null?k.set(U.key,U):k.set(U.index,U),U=U.sibling;return k}function c(U,k){return U=ha(U,k),U.index=0,U.sibling=null,U}function f(U,k,X){return U.index=X,e?(X=U.alternate,X!==null?(X=X.index,X<k?(U.flags|=67108866,k):X):(U.flags|=67108866,k)):(U.flags|=1048576,k)}function y(U){return e&&U.alternate===null&&(U.flags|=67108866),U}function w(U,k,X,ue){return k===null||k.tag!==6?(k=Gc(X,U.mode,ue),k.return=U,k):(k=c(k,X),k.return=U,k)}function O(U,k,X,ue){var Me=X.type;return Me===M?oe(U,k,X.props.children,ue,X.key):k!==null&&(k.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===z&&zl(Me)===k.type)?(k=c(k,X.props),ho(k,X),k.return=U,k):(k=bi(X.type,X.key,X.props,null,U.mode,ue),ho(k,X),k.return=U,k)}function K(U,k,X,ue){return k===null||k.tag!==4||k.stateNode.containerInfo!==X.containerInfo||k.stateNode.implementation!==X.implementation?(k=Yc(X,U.mode,ue),k.return=U,k):(k=c(k,X.children||[]),k.return=U,k)}function oe(U,k,X,ue,Me){return k===null||k.tag!==7?(k=Al(X,U.mode,ue,Me),k.return=U,k):(k=c(k,X),k.return=U,k)}function fe(U,k,X){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Gc(""+k,U.mode,X),k.return=U,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case T:return X=bi(k.type,k.key,k.props,null,U.mode,X),ho(X,k),X.return=U,X;case C:return k=Yc(k,U.mode,X),k.return=U,k;case z:return k=zl(k),fe(U,k,X)}if(ee(k)||q(k))return k=Al(k,U.mode,X,null),k.return=U,k;if(typeof k.then=="function")return fe(U,Mi(k),X);if(k.$$typeof===D)return fe(U,wi(U,k),X);Ai(U,k)}return null}function Q(U,k,X,ue){var Me=k!==null?k.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return Me!==null?null:w(U,k,""+X,ue);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case T:return X.key===Me?O(U,k,X,ue):null;case C:return X.key===Me?K(U,k,X,ue):null;case z:return X=zl(X),Q(U,k,X,ue)}if(ee(X)||q(X))return Me!==null?null:oe(U,k,X,ue,null);if(typeof X.then=="function")return Q(U,k,Mi(X),ue);if(X.$$typeof===D)return Q(U,k,wi(U,X),ue);Ai(U,X)}return null}function W(U,k,X,ue,Me){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return U=U.get(X)||null,w(k,U,""+ue,Me);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case T:return U=U.get(ue.key===null?X:ue.key)||null,O(k,U,ue,Me);case C:return U=U.get(ue.key===null?X:ue.key)||null,K(k,U,ue,Me);case z:return ue=zl(ue),W(U,k,X,ue,Me)}if(ee(ue)||q(ue))return U=U.get(X)||null,oe(k,U,ue,Me,null);if(typeof ue.then=="function")return W(U,k,X,Mi(ue),Me);if(ue.$$typeof===D)return W(U,k,X,wi(k,ue),Me);Ai(k,ue)}return null}function ge(U,k,X,ue){for(var Me=null,Xe=null,xe=k,ke=k=0,qe=null;xe!==null&&ke<X.length;ke++){xe.index>ke?(qe=xe,xe=null):qe=xe.sibling;var Ke=Q(U,xe,X[ke],ue);if(Ke===null){xe===null&&(xe=qe);break}e&&xe&&Ke.alternate===null&&t(U,xe),k=f(Ke,k,ke),Xe===null?Me=Ke:Xe.sibling=Ke,Xe=Ke,xe=qe}if(ke===X.length)return a(U,xe),Pe&&pa(U,ke),Me;if(xe===null){for(;ke<X.length;ke++)xe=fe(U,X[ke],ue),xe!==null&&(k=f(xe,k,ke),Xe===null?Me=xe:Xe.sibling=xe,Xe=xe);return Pe&&pa(U,ke),Me}for(xe=r(xe);ke<X.length;ke++)qe=W(xe,U,ke,X[ke],ue),qe!==null&&(e&&qe.alternate!==null&&xe.delete(qe.key===null?ke:qe.key),k=f(qe,k,ke),Xe===null?Me=qe:Xe.sibling=qe,Xe=qe);return e&&xe.forEach(function(rl){return t(U,rl)}),Pe&&pa(U,ke),Me}function Re(U,k,X,ue){if(X==null)throw Error(i(151));for(var Me=null,Xe=null,xe=k,ke=k=0,qe=null,Ke=X.next();xe!==null&&!Ke.done;ke++,Ke=X.next()){xe.index>ke?(qe=xe,xe=null):qe=xe.sibling;var rl=Q(U,xe,Ke.value,ue);if(rl===null){xe===null&&(xe=qe);break}e&&xe&&rl.alternate===null&&t(U,xe),k=f(rl,k,ke),Xe===null?Me=rl:Xe.sibling=rl,Xe=rl,xe=qe}if(Ke.done)return a(U,xe),Pe&&pa(U,ke),Me;if(xe===null){for(;!Ke.done;ke++,Ke=X.next())Ke=fe(U,Ke.value,ue),Ke!==null&&(k=f(Ke,k,ke),Xe===null?Me=Ke:Xe.sibling=Ke,Xe=Ke);return Pe&&pa(U,ke),Me}for(xe=r(xe);!Ke.done;ke++,Ke=X.next())Ke=W(xe,U,ke,Ke.value,ue),Ke!==null&&(e&&Ke.alternate!==null&&xe.delete(Ke.key===null?ke:Ke.key),k=f(Ke,k,ke),Xe===null?Me=Ke:Xe.sibling=Ke,Xe=Ke);return e&&xe.forEach(function(ww){return t(U,ww)}),Pe&&pa(U,ke),Me}function lt(U,k,X,ue){if(typeof X=="object"&&X!==null&&X.type===M&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case T:e:{for(var Me=X.key;k!==null;){if(k.key===Me){if(Me=X.type,Me===M){if(k.tag===7){a(U,k.sibling),ue=c(k,X.props.children),ue.return=U,U=ue;break e}}else if(k.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===z&&zl(Me)===k.type){a(U,k.sibling),ue=c(k,X.props),ho(ue,X),ue.return=U,U=ue;break e}a(U,k);break}else t(U,k);k=k.sibling}X.type===M?(ue=Al(X.props.children,U.mode,ue,X.key),ue.return=U,U=ue):(ue=bi(X.type,X.key,X.props,null,U.mode,ue),ho(ue,X),ue.return=U,U=ue)}return y(U);case C:e:{for(Me=X.key;k!==null;){if(k.key===Me)if(k.tag===4&&k.stateNode.containerInfo===X.containerInfo&&k.stateNode.implementation===X.implementation){a(U,k.sibling),ue=c(k,X.children||[]),ue.return=U,U=ue;break e}else{a(U,k);break}else t(U,k);k=k.sibling}ue=Yc(X,U.mode,ue),ue.return=U,U=ue}return y(U);case z:return X=zl(X),lt(U,k,X,ue)}if(ee(X))return ge(U,k,X,ue);if(q(X)){if(Me=q(X),typeof Me!="function")throw Error(i(150));return X=Me.call(X),Re(U,k,X,ue)}if(typeof X.then=="function")return lt(U,k,Mi(X),ue);if(X.$$typeof===D)return lt(U,k,wi(U,X),ue);Ai(U,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,k!==null&&k.tag===6?(a(U,k.sibling),ue=c(k,X),ue.return=U,U=ue):(a(U,k),ue=Gc(X,U.mode,ue),ue.return=U,U=ue),y(U)):a(U,k)}return function(U,k,X,ue){try{mo=0;var Me=lt(U,k,X,ue);return pr=null,Me}catch(xe){if(xe===hr||xe===Ti)throw xe;var Xe=hn(29,xe,null,U.mode);return Xe.lanes=ue,Xe.return=U,Xe}finally{}}}var jl=Ch(!0),Mh=Ch(!1),Ya=!1;function eu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function tu(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,a){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ze&2)!==0){var c=r.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),r.pending=t,t=vi(e),ch(e,null,a),t}return yi(e,r,t,a),vi(e)}function po(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,me(e,a)}}function nu(e,t){var a=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var c=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?c=f=y:f=f.next=y,a=a.next}while(a!==null);f===null?c=f=t:f=f.next=t}else c=f=t;a={baseState:r.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:r.shared,callbacks:r.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var au=!1;function go(){if(au){var e=mr;if(e!==null)throw e}}function yo(e,t,a,r){au=!1;var c=e.updateQueue;Ya=!1;var f=c.firstBaseUpdate,y=c.lastBaseUpdate,w=c.shared.pending;if(w!==null){c.shared.pending=null;var O=w,K=O.next;O.next=null,y===null?f=K:y.next=K,y=O;var oe=e.alternate;oe!==null&&(oe=oe.updateQueue,w=oe.lastBaseUpdate,w!==y&&(w===null?oe.firstBaseUpdate=K:w.next=K,oe.lastBaseUpdate=O))}if(f!==null){var fe=c.baseState;y=0,oe=K=O=null,w=f;do{var Q=w.lane&-536870913,W=Q!==w.lane;if(W?(Ve&Q)===Q:(r&Q)===Q){Q!==0&&Q===dr&&(au=!0),oe!==null&&(oe=oe.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var ge=e,Re=w;Q=t;var lt=a;switch(Re.tag){case 1:if(ge=Re.payload,typeof ge=="function"){fe=ge.call(lt,fe,Q);break e}fe=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Re.payload,Q=typeof ge=="function"?ge.call(lt,fe,Q):ge,Q==null)break e;fe=p({},fe,Q);break e;case 2:Ya=!0}}Q=w.callback,Q!==null&&(e.flags|=64,W&&(e.flags|=8192),W=c.callbacks,W===null?c.callbacks=[Q]:W.push(Q))}else W={lane:Q,tag:w.tag,payload:w.payload,callback:w.callback,next:null},oe===null?(K=oe=W,O=fe):oe=oe.next=W,y|=Q;if(w=w.next,w===null){if(w=c.shared.pending,w===null)break;W=w,w=W.next,W.next=null,c.lastBaseUpdate=W,c.shared.pending=null}}while(!0);oe===null&&(O=fe),c.baseState=O,c.firstBaseUpdate=K,c.lastBaseUpdate=oe,f===null&&(c.shared.lanes=0),Fa|=y,e.lanes=y,e.memoizedState=fe}}function Ah(e,t){if(typeof e!="function")throw Error(i(191,e));e.call(t)}function _h(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Ah(a[e],t)}var gr=R(null),_i=R(0);function Rh(e,t){e=Ma,J(_i,e),J(gr,t),Ma=e|t.baseLanes}function lu(){J(_i,Ma),J(gr,gr.current)}function ru(){Ma=_i.current,G(gr),G(_i)}var pn=R(null),jn=null;function Pa(e){var t=e.alternate;J(St,St.current&1),J(pn,e),jn===null&&(t===null||gr.current!==null||t.memoizedState!==null)&&(jn=e)}function ou(e){J(St,St.current),J(pn,e),jn===null&&(jn=e)}function Nh(e){e.tag===22?(J(St,St.current),J(pn,e),jn===null&&(jn=e)):$a()}function $a(){J(St,St.current),J(pn,pn.current)}function gn(e){G(pn),jn===e&&(jn=null),G(St)}var St=R(0);function Ri(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||mf(a)||hf(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var va=0,je=null,nt=null,At=null,Ni=!1,yr=!1,kl=!1,Oi=0,vo=0,vr=null,dS=0;function yt(){throw Error(i(321))}function iu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!mn(e[a],t[a]))return!1;return!0}function su(e,t,a,r,c,f){return va=f,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,E.H=e===null||e.memoizedState===null?mp:Eu,kl=!1,f=a(r,c),kl=!1,yr&&(f=zh(t,a,r,c)),Oh(e),f}function Oh(e){E.H=So;var t=nt!==null&&nt.next!==null;if(va=0,At=nt=je=null,Ni=!1,vo=0,vr=null,t)throw Error(i(300));e===null||_t||(e=e.dependencies,e!==null&&Si(e)&&(_t=!0))}function zh(e,t,a,r){je=e;var c=0;do{if(yr&&(vr=null),vo=0,yr=!1,25<=c)throw Error(i(301));if(c+=1,At=nt=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}E.H=hp,f=t(a,r)}while(yr);return f}function mS(){var e=E.H,t=e.useState()[0];return t=typeof t.then=="function"?bo(t):t,e=e.useState()[0],(nt!==null?nt.memoizedState:null)!==e&&(je.flags|=1024),t}function cu(){var e=Oi!==0;return Oi=0,e}function uu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function fu(e){if(Ni){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ni=!1}va=0,At=nt=je=null,yr=!1,vo=Oi=0,vr=null}function Zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?je.memoizedState=At=e:At=At.next=e,At}function wt(){if(nt===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=nt.next;var t=At===null?je.memoizedState:At.next;if(t!==null)At=t,nt=e;else{if(e===null)throw je.alternate===null?Error(i(467)):Error(i(310));nt=e,e={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},At===null?je.memoizedState=At=e:At=At.next=e}return At}function zi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function bo(e){var t=vo;return vo+=1,vr===null&&(vr=[]),e=wh(vr,e,t),t=je,(At===null?t.memoizedState:At.next)===null&&(t=t.alternate,E.H=t===null||t.memoizedState===null?mp:Eu),e}function Di(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return bo(e);if(e.$$typeof===D)return Vt(e)}throw Error(i(438,String(e)))}function du(e){var t=null,a=je.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var r=je.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=zi(),je.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),r=0;r<e;r++)a[r]=ne;return t.index++,a}function ba(e,t){return typeof t=="function"?t(e):t}function ji(e){var t=wt();return mu(t,nt,e)}function mu(e,t,a){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=a;var c=e.baseQueue,f=r.pending;if(f!==null){if(c!==null){var y=c.next;c.next=f.next,f.next=y}t.baseQueue=c=f,r.pending=null}if(f=e.baseState,c===null)e.memoizedState=f;else{t=c.next;var w=y=null,O=null,K=t,oe=!1;do{var fe=K.lane&-536870913;if(fe!==K.lane?(Ve&fe)===fe:(va&fe)===fe){var Q=K.revertLane;if(Q===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),fe===dr&&(oe=!0);else if((va&Q)===Q){K=K.next,Q===dr&&(oe=!0);continue}else fe={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},O===null?(w=O=fe,y=f):O=O.next=fe,je.lanes|=Q,Fa|=Q;fe=K.action,kl&&a(f,fe),f=K.hasEagerState?K.eagerState:a(f,fe)}else Q={lane:fe,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},O===null?(w=O=Q,y=f):O=O.next=Q,je.lanes|=fe,Fa|=fe;K=K.next}while(K!==null&&K!==t);if(O===null?y=f:O.next=w,!mn(f,e.memoizedState)&&(_t=!0,oe&&(a=mr,a!==null)))throw a;e.memoizedState=f,e.baseState=y,e.baseQueue=O,r.lastRenderedState=f}return c===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function hu(e){var t=wt(),a=t.queue;if(a===null)throw Error(i(311));a.lastRenderedReducer=e;var r=a.dispatch,c=a.pending,f=t.memoizedState;if(c!==null){a.pending=null;var y=c=c.next;do f=e(f,y.action),y=y.next;while(y!==c);mn(f,t.memoizedState)||(_t=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),a.lastRenderedState=f}return[f,r]}function Dh(e,t,a){var r=je,c=wt(),f=Pe;if(f){if(a===void 0)throw Error(i(407));a=a()}else a=t();var y=!mn((nt||c).memoizedState,a);if(y&&(c.memoizedState=a,_t=!0),c=c.queue,yu(Lh.bind(null,r,c,e),[e]),c.getSnapshot!==t||y||At!==null&&At.memoizedState.tag&1){if(r.flags|=2048,br(9,{destroy:void 0},kh.bind(null,r,c,a,t),null),ot===null)throw Error(i(349));f||(va&127)!==0||jh(r,t,a)}return a}function jh(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=je.updateQueue,t===null?(t=zi(),je.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function kh(e,t,a,r){t.value=a,t.getSnapshot=r,Hh(t)&&Bh(e)}function Lh(e,t,a){return a(function(){Hh(t)&&Bh(e)})}function Hh(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!mn(e,a)}catch{return!0}}function Bh(e){var t=Ml(e,2);t!==null&&ln(t,e,2)}function pu(e){var t=Zt();if(typeof e=="function"){var a=e;if(e=a(),kl){un(!0);try{a()}finally{un(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:e},t}function Uh(e,t,a,r){return e.baseState=a,mu(e,nt,typeof r=="function"?r:ba)}function hS(e,t,a,r,c){if(Hi(e))throw Error(i(485));if(e=t.action,e!==null){var f={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){f.listeners.push(y)}};E.T!==null?a(!0):f.isTransition=!1,r(f),a=t.pending,a===null?(f.next=t.pending=f,Ih(t,f)):(f.next=a.next,t.pending=a.next=f)}}function Ih(e,t){var a=t.action,r=t.payload,c=e.state;if(t.isTransition){var f=E.T,y={};E.T=y;try{var w=a(c,r),O=E.S;O!==null&&O(y,w),Gh(e,t,w)}catch(K){gu(e,t,K)}finally{f!==null&&y.types!==null&&(f.types=y.types),E.T=f}}else try{f=a(c,r),Gh(e,t,f)}catch(K){gu(e,t,K)}}function Gh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){Yh(e,t,r)},function(r){return gu(e,t,r)}):Yh(e,t,a)}function Yh(e,t,a){t.status="fulfilled",t.value=a,Vh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ih(e,a)))}function gu(e,t,a){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=a,Vh(t),t=t.next;while(t!==r)}e.action=null}function Vh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function qh(e,t){return t}function Ph(e,t){if(Pe){var a=ot.formState;if(a!==null){e:{var r=je;if(Pe){if(ft){t:{for(var c=ft,f=Dn;c.nodeType!==8;){if(!f){c=null;break t}if(c=kn(c.nextSibling),c===null){c=null;break t}}f=c.data,c=f==="F!"||f==="F"?c:null}if(c){ft=kn(c.nextSibling),r=c.data==="F!";break e}}Ia(r)}r=!1}r&&(t=a[0])}}return a=Zt(),a.memoizedState=a.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qh,lastRenderedState:t},a.queue=r,a=up.bind(null,je,r),r.dispatch=a,r=pu(!1),f=wu.bind(null,je,!1,r.queue),r=Zt(),c={state:t,dispatch:null,action:e,pending:null},r.queue=c,a=hS.bind(null,je,c,f,a),c.dispatch=a,r.memoizedState=e,[t,a,!1]}function $h(e){var t=wt();return Xh(t,nt,e)}function Xh(e,t,a){if(t=mu(e,t,qh)[0],e=ji(ba)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=bo(t)}catch(y){throw y===hr?Ti:y}else r=t;t=wt();var c=t.queue,f=c.dispatch;return a!==t.memoizedState&&(je.flags|=2048,br(9,{destroy:void 0},pS.bind(null,c,a),null)),[r,f,e]}function pS(e,t){e.action=t}function Kh(e){var t=wt(),a=nt;if(a!==null)return Xh(t,a,e);wt(),t=t.memoizedState,a=wt();var r=a.queue.dispatch;return a.memoizedState=e,[t,r,!1]}function br(e,t,a,r){return e={tag:e,create:a,deps:r,inst:t,next:null},t=je.updateQueue,t===null&&(t=zi(),je.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(r=a.next,a.next=e,e.next=r,t.lastEffect=e),e}function Fh(){return wt().memoizedState}function ki(e,t,a,r){var c=Zt();je.flags|=e,c.memoizedState=br(1|t,{destroy:void 0},a,r===void 0?null:r)}function Li(e,t,a,r){var c=wt();r=r===void 0?null:r;var f=c.memoizedState.inst;nt!==null&&r!==null&&iu(r,nt.memoizedState.deps)?c.memoizedState=br(t,f,a,r):(je.flags|=e,c.memoizedState=br(1|t,f,a,r))}function Qh(e,t){ki(8390656,8,e,t)}function yu(e,t){Li(2048,8,e,t)}function gS(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=zi(),je.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Zh(e){var t=wt().memoizedState;return gS({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Jh(e,t){return Li(4,2,e,t)}function Wh(e,t){return Li(4,4,e,t)}function ep(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function tp(e,t,a){a=a!=null?a.concat([e]):null,Li(4,4,ep.bind(null,t,e),a)}function vu(){}function np(e,t){var a=wt();t=t===void 0?null:t;var r=a.memoizedState;return t!==null&&iu(t,r[1])?r[0]:(a.memoizedState=[e,t],e)}function ap(e,t){var a=wt();t=t===void 0?null:t;var r=a.memoizedState;if(t!==null&&iu(t,r[1]))return r[0];if(r=e(),kl){un(!0);try{e()}finally{un(!1)}}return a.memoizedState=[r,t],r}function bu(e,t,a){return a===void 0||(va&1073741824)!==0&&(Ve&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=lg(),je.lanes|=e,Fa|=e,a)}function lp(e,t,a,r){return mn(a,t)?a:gr.current!==null?(e=bu(e,a,r),mn(e,t)||(_t=!0),e):(va&42)===0||(va&1073741824)!==0&&(Ve&261930)===0?(_t=!0,e.memoizedState=a):(e=lg(),je.lanes|=e,Fa|=e,t)}function rp(e,t,a,r,c){var f=j.p;j.p=f!==0&&8>f?f:8;var y=E.T,w={};E.T=w,wu(e,!1,t,a);try{var O=c(),K=E.S;if(K!==null&&K(w,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var oe=fS(O,r);xo(e,t,oe,bn(e))}else xo(e,t,r,bn(e))}catch(fe){xo(e,t,{then:function(){},status:"rejected",reason:fe},bn())}finally{j.p=f,y!==null&&w.types!==null&&(y.types=w.types),E.T=y}}function yS(){}function xu(e,t,a,r){if(e.tag!==5)throw Error(i(476));var c=op(e).queue;rp(e,c,t,B,a===null?yS:function(){return ip(e),a(r)})}function op(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:B},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ba,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ip(e){var t=op(e);t.next===null&&(t=e.alternate.memoizedState),xo(e,t.next.queue,{},bn())}function Su(){return Vt(Ho)}function sp(){return wt().memoizedState}function cp(){return wt().memoizedState}function vS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=bn();e=Va(a);var r=qa(t,e,a);r!==null&&(ln(r,t,a),po(r,t,a)),t={cache:Qc()},e.payload=t;return}t=t.return}}function bS(e,t,a){var r=bn();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Hi(e)?fp(t,a):(a=Uc(e,t,a,r),a!==null&&(ln(a,e,r),dp(a,t,r)))}function up(e,t,a){var r=bn();xo(e,t,a,r)}function xo(e,t,a,r){var c={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Hi(e))fp(t,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var y=t.lastRenderedState,w=f(y,a);if(c.hasEagerState=!0,c.eagerState=w,mn(w,y))return yi(e,t,c,0),ot===null&&gi(),!1}catch{}finally{}if(a=Uc(e,t,c,r),a!==null)return ln(a,e,r),dp(a,t,r),!0}return!1}function wu(e,t,a,r){if(r={lane:2,revertLane:ef(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Hi(e)){if(t)throw Error(i(479))}else t=Uc(e,a,r,2),t!==null&&ln(t,e,2)}function Hi(e){var t=e.alternate;return e===je||t!==null&&t===je}function fp(e,t){yr=Ni=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function dp(e,t,a){if((a&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,a|=r,t.lanes=a,me(e,a)}}var So={readContext:Vt,use:Di,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};So.useEffectEvent=yt;var mp={readContext:Vt,use:Di,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:Vt,useEffect:Qh,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ki(4194308,4,ep.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ki(4194308,4,e,t)},useInsertionEffect:function(e,t){ki(4,2,e,t)},useMemo:function(e,t){var a=Zt();t=t===void 0?null:t;var r=e();if(kl){un(!0);try{e()}finally{un(!1)}}return a.memoizedState=[r,t],r},useReducer:function(e,t,a){var r=Zt();if(a!==void 0){var c=a(t);if(kl){un(!0);try{a(t)}finally{un(!1)}}}else c=t;return r.memoizedState=r.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},r.queue=e,e=e.dispatch=bS.bind(null,je,e),[r.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:function(e){e=pu(e);var t=e.queue,a=up.bind(null,je,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:vu,useDeferredValue:function(e,t){var a=Zt();return bu(a,e,t)},useTransition:function(){var e=pu(!1);return e=rp.bind(null,je,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var r=je,c=Zt();if(Pe){if(a===void 0)throw Error(i(407));a=a()}else{if(a=t(),ot===null)throw Error(i(349));(Ve&127)!==0||jh(r,t,a)}c.memoizedState=a;var f={value:a,getSnapshot:t};return c.queue=f,Qh(Lh.bind(null,r,f,e),[e]),r.flags|=2048,br(9,{destroy:void 0},kh.bind(null,r,f,a,t),null),a},useId:function(){var e=Zt(),t=ot.identifierPrefix;if(Pe){var a=Wn,r=Jn;a=(r&~(1<<32-Ct(r)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Oi++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=dS++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Su,useFormState:Ph,useActionState:Ph,useOptimistic:function(e){var t=Zt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=wu.bind(null,je,!0,a),a.dispatch=t,[e,t]},useMemoCache:du,useCacheRefresh:function(){return Zt().memoizedState=vS.bind(null,je)},useEffectEvent:function(e){var t=Zt(),a={impl:e};return t.memoizedState=a,function(){if((Ze&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}},Eu={readContext:Vt,use:Di,useCallback:np,useContext:Vt,useEffect:yu,useImperativeHandle:tp,useInsertionEffect:Jh,useLayoutEffect:Wh,useMemo:ap,useReducer:ji,useRef:Fh,useState:function(){return ji(ba)},useDebugValue:vu,useDeferredValue:function(e,t){var a=wt();return lp(a,nt.memoizedState,e,t)},useTransition:function(){var e=ji(ba)[0],t=wt().memoizedState;return[typeof e=="boolean"?e:bo(e),t]},useSyncExternalStore:Dh,useId:sp,useHostTransitionStatus:Su,useFormState:$h,useActionState:$h,useOptimistic:function(e,t){var a=wt();return Uh(a,nt,e,t)},useMemoCache:du,useCacheRefresh:cp};Eu.useEffectEvent=Zh;var hp={readContext:Vt,use:Di,useCallback:np,useContext:Vt,useEffect:yu,useImperativeHandle:tp,useInsertionEffect:Jh,useLayoutEffect:Wh,useMemo:ap,useReducer:hu,useRef:Fh,useState:function(){return hu(ba)},useDebugValue:vu,useDeferredValue:function(e,t){var a=wt();return nt===null?bu(a,e,t):lp(a,nt.memoizedState,e,t)},useTransition:function(){var e=hu(ba)[0],t=wt().memoizedState;return[typeof e=="boolean"?e:bo(e),t]},useSyncExternalStore:Dh,useId:sp,useHostTransitionStatus:Su,useFormState:Kh,useActionState:Kh,useOptimistic:function(e,t){var a=wt();return nt!==null?Uh(a,nt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:du,useCacheRefresh:cp};hp.useEffectEvent=Zh;function Tu(e,t,a,r){t=e.memoizedState,a=a(r,t),a=a==null?t:p({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Cu={enqueueSetState:function(e,t,a){e=e._reactInternals;var r=bn(),c=Va(r);c.payload=t,a!=null&&(c.callback=a),t=qa(e,c,r),t!==null&&(ln(t,e,r),po(t,e,r))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var r=bn(),c=Va(r);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=qa(e,c,r),t!==null&&(ln(t,e,r),po(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=bn(),r=Va(a);r.tag=2,t!=null&&(r.callback=t),t=qa(e,r,a),t!==null&&(ln(t,e,a),po(t,e,a))}};function pp(e,t,a,r,c,f,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,f,y):t.prototype&&t.prototype.isPureReactComponent?!oo(a,r)||!oo(c,f):!0}function gp(e,t,a,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,r),t.state!==e&&Cu.enqueueReplaceState(t,t.state,null)}function Ll(e,t){var a=t;if("ref"in t){a={};for(var r in t)r!=="ref"&&(a[r]=t[r])}if(e=e.defaultProps){a===t&&(a=p({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function yp(e){pi(e)}function vp(e){console.error(e)}function bp(e){pi(e)}function Bi(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function xp(e,t,a){try{var r=e.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Mu(e,t,a){return a=Va(a),a.tag=3,a.payload={element:null},a.callback=function(){Bi(e,t)},a}function Sp(e){return e=Va(e),e.tag=3,e}function wp(e,t,a,r){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var f=r.value;e.payload=function(){return c(f)},e.callback=function(){xp(t,a,r)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){xp(t,a,r),typeof c!="function"&&(Qa===null?Qa=new Set([this]):Qa.add(this));var w=r.stack;this.componentDidCatch(r.value,{componentStack:w!==null?w:""})})}function xS(e,t,a,r,c){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=a.alternate,t!==null&&fr(t,a,c,!0),a=pn.current,a!==null){switch(a.tag){case 31:case 13:return jn===null?Qi():a.alternate===null&&vt===0&&(vt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,r===Ci?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([r]):t.add(r),Zu(e,r,c)),!1;case 22:return a.flags|=65536,r===Ci?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([r]):a.add(r)),Zu(e,r,c)),!1}throw Error(i(435,a.tag))}return Zu(e,r,c),Qi(),!1}if(Pe)return t=pn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,r!==Pc&&(e=Error(i(422),{cause:r}),co(Nn(e,a)))):(r!==Pc&&(t=Error(i(423),{cause:r}),co(Nn(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,r=Nn(r,a),c=Mu(e.stateNode,r,c),nu(e,c),vt!==4&&(vt=2)),!1;var f=Error(i(520),{cause:r});if(f=Nn(f,a),Ro===null?Ro=[f]:Ro.push(f),vt!==4&&(vt=2),t===null)return!0;r=Nn(r,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Mu(a.stateNode,r,e),nu(a,e),!1;case 1:if(t=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Qa===null||!Qa.has(f))))return a.flags|=65536,c&=-c,a.lanes|=c,c=Sp(c),wp(c,e,a,r),nu(a,c),!1}a=a.return}while(a!==null);return!1}var Au=Error(i(461)),_t=!1;function qt(e,t,a,r){t.child=e===null?Mh(t,null,a,r):jl(t,e.child,a,r)}function Ep(e,t,a,r,c){a=a.render;var f=t.ref;if("ref"in r){var y={};for(var w in r)w!=="ref"&&(y[w]=r[w])}else y=r;return Nl(t),r=su(e,t,a,y,f,c),w=cu(),e!==null&&!_t?(uu(e,t,c),xa(e,t,c)):(Pe&&w&&Vc(t),t.flags|=1,qt(e,t,r,c),t.child)}function Tp(e,t,a,r,c){if(e===null){var f=a.type;return typeof f=="function"&&!Ic(f)&&f.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=f,Cp(e,t,f,r,c)):(e=bi(a.type,null,r,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!ku(e,c)){var y=f.memoizedProps;if(a=a.compare,a=a!==null?a:oo,a(y,r)&&e.ref===t.ref)return xa(e,t,c)}return t.flags|=1,e=ha(f,r),e.ref=t.ref,e.return=t,t.child=e}function Cp(e,t,a,r,c){if(e!==null){var f=e.memoizedProps;if(oo(f,r)&&e.ref===t.ref)if(_t=!1,t.pendingProps=r=f,ku(e,c))(e.flags&131072)!==0&&(_t=!0);else return t.lanes=e.lanes,xa(e,t,c)}return _u(e,t,a,r,c)}function Mp(e,t,a,r){var c=r.children,f=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(r=t.child=e.child,c=0;r!==null;)c=c|r.lanes|r.childLanes,r=r.sibling;r=c&~f}else r=0,t.child=null;return Ap(e,t,f,a,r)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ei(t,f!==null?f.cachePool:null),f!==null?Rh(t,f):lu(),Nh(t);else return r=t.lanes=536870912,Ap(e,t,f!==null?f.baseLanes|a:a,a,r)}else f!==null?(Ei(t,f.cachePool),Rh(t,f),$a(),t.memoizedState=null):(e!==null&&Ei(t,null),lu(),$a());return qt(e,t,c,a),t.child}function wo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ap(e,t,a,r,c){var f=Jc();return f=f===null?null:{parent:Mt._currentValue,pool:f},t.memoizedState={baseLanes:a,cachePool:f},e!==null&&Ei(t,null),lu(),Nh(t),e!==null&&fr(e,t,r,!0),t.childLanes=c,null}function Ui(e,t){return t=Gi({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _p(e,t,a){return jl(t,e.child,null,a),e=Ui(t,t.pendingProps),e.flags|=2,gn(t),t.memoizedState=null,e}function SS(e,t,a){var r=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(r.mode==="hidden")return e=Ui(t,r),t.lanes=536870912,wo(null,e);if(ou(t),(e=ft)?(e=Ig(e,Dn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ba!==null?{id:Jn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},a=fh(e),a.return=t,t.child=a,Yt=t,ft=null)):e=null,e===null)throw Ia(t);return t.lanes=536870912,null}return Ui(t,r)}var f=e.memoizedState;if(f!==null){var y=f.dehydrated;if(ou(t),c)if(t.flags&256)t.flags&=-257,t=_p(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(_t||fr(e,t,a,!1),c=(a&e.childLanes)!==0,_t||c){if(r=ot,r!==null&&(y=he(r,a),y!==0&&y!==f.retryLane))throw f.retryLane=y,Ml(e,y),ln(r,e,y),Au;Qi(),t=_p(e,t,a)}else e=f.treeContext,ft=kn(y.nextSibling),Yt=t,Pe=!0,Ua=null,Dn=!1,e!==null&&hh(t,e),t=Ui(t,r),t.flags|=4096;return t}return e=ha(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ii(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(i(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function _u(e,t,a,r,c){return Nl(t),a=su(e,t,a,r,void 0,c),r=cu(),e!==null&&!_t?(uu(e,t,c),xa(e,t,c)):(Pe&&r&&Vc(t),t.flags|=1,qt(e,t,a,c),t.child)}function Rp(e,t,a,r,c,f){return Nl(t),t.updateQueue=null,a=zh(t,r,a,c),Oh(e),r=cu(),e!==null&&!_t?(uu(e,t,f),xa(e,t,f)):(Pe&&r&&Vc(t),t.flags|=1,qt(e,t,a,f),t.child)}function Np(e,t,a,r,c){if(Nl(t),t.stateNode===null){var f=ir,y=a.contextType;typeof y=="object"&&y!==null&&(f=Vt(y)),f=new a(r,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Cu,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=r,f.state=t.memoizedState,f.refs={},eu(t),y=a.contextType,f.context=typeof y=="object"&&y!==null?Vt(y):ir,f.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(Tu(t,a,y,r),f.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(y=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),y!==f.state&&Cu.enqueueReplaceState(f,f.state,null),yo(t,r,f,c),go(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){f=t.stateNode;var w=t.memoizedProps,O=Ll(a,w);f.props=O;var K=f.context,oe=a.contextType;y=ir,typeof oe=="object"&&oe!==null&&(y=Vt(oe));var fe=a.getDerivedStateFromProps;oe=typeof fe=="function"||typeof f.getSnapshotBeforeUpdate=="function",w=t.pendingProps!==w,oe||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(w||K!==y)&&gp(t,f,r,y),Ya=!1;var Q=t.memoizedState;f.state=Q,yo(t,r,f,c),go(),K=t.memoizedState,w||Q!==K||Ya?(typeof fe=="function"&&(Tu(t,a,fe,r),K=t.memoizedState),(O=Ya||pp(t,a,O,r,Q,K,y))?(oe||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=r,t.memoizedState=K),f.props=r,f.state=K,f.context=y,r=O):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{f=t.stateNode,tu(e,t),y=t.memoizedProps,oe=Ll(a,y),f.props=oe,fe=t.pendingProps,Q=f.context,K=a.contextType,O=ir,typeof K=="object"&&K!==null&&(O=Vt(K)),w=a.getDerivedStateFromProps,(K=typeof w=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==fe||Q!==O)&&gp(t,f,r,O),Ya=!1,Q=t.memoizedState,f.state=Q,yo(t,r,f,c),go();var W=t.memoizedState;y!==fe||Q!==W||Ya||e!==null&&e.dependencies!==null&&Si(e.dependencies)?(typeof w=="function"&&(Tu(t,a,w,r),W=t.memoizedState),(oe=Ya||pp(t,a,oe,r,Q,W,O)||e!==null&&e.dependencies!==null&&Si(e.dependencies))?(K||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(r,W,O),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(r,W,O)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=W),f.props=r,f.state=W,f.context=O,r=oe):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),r=!1)}return f=r,Ii(e,t),r=(t.flags&128)!==0,f||r?(f=t.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&r?(t.child=jl(t,e.child,null,c),t.child=jl(t,null,a,c)):qt(e,t,a,c),t.memoizedState=f.state,e=t.child):e=xa(e,t,c),e}function Op(e,t,a,r){return _l(),t.flags|=256,qt(e,t,a,r),t.child}var Ru={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Nu(e){return{baseLanes:e,cachePool:xh()}}function Ou(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=vn),e}function zp(e,t,a){var r=t.pendingProps,c=!1,f=(t.flags&128)!==0,y;if((y=f)||(y=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),y&&(c=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(c?Pa(t):$a(),(e=ft)?(e=Ig(e,Dn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ba!==null?{id:Jn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},a=fh(e),a.return=t,t.child=a,Yt=t,ft=null)):e=null,e===null)throw Ia(t);return hf(e)?t.lanes=32:t.lanes=536870912,null}var w=r.children;return r=r.fallback,c?($a(),c=t.mode,w=Gi({mode:"hidden",children:w},c),r=Al(r,c,a,null),w.return=t,r.return=t,w.sibling=r,t.child=w,r=t.child,r.memoizedState=Nu(a),r.childLanes=Ou(e,y,a),t.memoizedState=Ru,wo(null,r)):(Pa(t),zu(t,w))}var O=e.memoizedState;if(O!==null&&(w=O.dehydrated,w!==null)){if(f)t.flags&256?(Pa(t),t.flags&=-257,t=Du(e,t,a)):t.memoizedState!==null?($a(),t.child=e.child,t.flags|=128,t=null):($a(),w=r.fallback,c=t.mode,r=Gi({mode:"visible",children:r.children},c),w=Al(w,c,a,null),w.flags|=2,r.return=t,w.return=t,r.sibling=w,t.child=r,jl(t,e.child,null,a),r=t.child,r.memoizedState=Nu(a),r.childLanes=Ou(e,y,a),t.memoizedState=Ru,t=wo(null,r));else if(Pa(t),hf(w)){if(y=w.nextSibling&&w.nextSibling.dataset,y)var K=y.dgst;y=K,r=Error(i(419)),r.stack="",r.digest=y,co({value:r,source:null,stack:null}),t=Du(e,t,a)}else if(_t||fr(e,t,a,!1),y=(a&e.childLanes)!==0,_t||y){if(y=ot,y!==null&&(r=he(y,a),r!==0&&r!==O.retryLane))throw O.retryLane=r,Ml(e,r),ln(y,e,r),Au;mf(w)||Qi(),t=Du(e,t,a)}else mf(w)?(t.flags|=192,t.child=e.child,t=null):(e=O.treeContext,ft=kn(w.nextSibling),Yt=t,Pe=!0,Ua=null,Dn=!1,e!==null&&hh(t,e),t=zu(t,r.children),t.flags|=4096);return t}return c?($a(),w=r.fallback,c=t.mode,O=e.child,K=O.sibling,r=ha(O,{mode:"hidden",children:r.children}),r.subtreeFlags=O.subtreeFlags&65011712,K!==null?w=ha(K,w):(w=Al(w,c,a,null),w.flags|=2),w.return=t,r.return=t,r.sibling=w,t.child=r,wo(null,r),r=t.child,w=e.child.memoizedState,w===null?w=Nu(a):(c=w.cachePool,c!==null?(O=Mt._currentValue,c=c.parent!==O?{parent:O,pool:O}:c):c=xh(),w={baseLanes:w.baseLanes|a,cachePool:c}),r.memoizedState=w,r.childLanes=Ou(e,y,a),t.memoizedState=Ru,wo(e.child,r)):(Pa(t),a=e.child,e=a.sibling,a=ha(a,{mode:"visible",children:r.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function zu(e,t){return t=Gi({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Gi(e,t){return e=hn(22,e,null,t),e.lanes=0,e}function Du(e,t,a){return jl(t,e.child,null,a),e=zu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Dp(e,t,a){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Kc(e.return,t,a)}function ju(e,t,a,r,c,f){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:c,treeForkCount:f}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=a,y.tailMode=c,y.treeForkCount=f)}function jp(e,t,a){var r=t.pendingProps,c=r.revealOrder,f=r.tail;r=r.children;var y=St.current,w=(y&2)!==0;if(w?(y=y&1|2,t.flags|=128):y&=1,J(St,y),qt(e,t,r,a),r=Pe?so:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dp(e,a,t);else if(e.tag===19)Dp(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&Ri(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),ju(t,!1,c,a,f,r);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Ri(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}ju(t,!0,a,null,f,r);break;case"together":ju(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function xa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Fa|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(fr(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,a=ha(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=ha(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function ku(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Si(e)))}function wS(e,t,a){switch(t.tag){case 3:Z(t,t.stateNode.containerInfo),Ga(t,Mt,e.memoizedState.cache),_l();break;case 27:case 5:ve(t);break;case 4:Z(t,t.stateNode.containerInfo);break;case 10:Ga(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ou(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Pa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?zp(e,t,a):(Pa(t),e=xa(e,t,a),e!==null?e.sibling:null);Pa(t);break;case 19:var c=(e.flags&128)!==0;if(r=(a&t.childLanes)!==0,r||(fr(e,t,a,!1),r=(a&t.childLanes)!==0),c){if(r)return jp(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),J(St,St.current),r)break;return null;case 22:return t.lanes=0,Mp(e,t,a,t.pendingProps);case 24:Ga(t,Mt,e.memoizedState.cache)}return xa(e,t,a)}function kp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)_t=!0;else{if(!ku(e,a)&&(t.flags&128)===0)return _t=!1,wS(e,t,a);_t=(e.flags&131072)!==0}else _t=!1,Pe&&(t.flags&1048576)!==0&&mh(t,so,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=zl(t.elementType),t.type=e,typeof e=="function")Ic(e)?(r=Ll(e,r),t.tag=1,t=Np(null,t,e,r,a)):(t.tag=0,t=_u(null,t,e,r,a));else{if(e!=null){var c=e.$$typeof;if(c===V){t.tag=11,t=Ep(null,t,e,r,a);break e}else if(c===$){t.tag=14,t=Tp(null,t,e,r,a);break e}}throw t=Y(e)||e,Error(i(306,t,""))}}return t;case 0:return _u(e,t,t.type,t.pendingProps,a);case 1:return r=t.type,c=Ll(r,t.pendingProps),Np(e,t,r,c,a);case 3:e:{if(Z(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var f=t.memoizedState;c=f.element,tu(e,t),yo(t,r,null,a);var y=t.memoizedState;if(r=y.cache,Ga(t,Mt,r),r!==f.cache&&Fc(t,[Mt],a,!0),go(),r=y.element,f.isDehydrated)if(f={element:r,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=Op(e,t,r,a);break e}else if(r!==c){c=Nn(Error(i(424)),t),co(c),t=Op(e,t,r,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ft=kn(e.firstChild),Yt=t,Pe=!0,Ua=null,Dn=!0,a=Mh(t,null,r,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(_l(),r===c){t=xa(e,t,a);break e}qt(e,t,r,a)}t=t.child}return t;case 26:return Ii(e,t),e===null?(a=$g(t.type,null,t.pendingProps,null))?t.memoizedState=a:Pe||(a=t.type,e=t.pendingProps,r=as(ie.current).createElement(a),r[He]=t,r[rt]=e,Pt(r,a,e),gt(r),t.stateNode=r):t.memoizedState=$g(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ve(t),e===null&&Pe&&(r=t.stateNode=Vg(t.type,t.pendingProps,ie.current),Yt=t,Dn=!0,c=ft,el(t.type)?(pf=c,ft=kn(r.firstChild)):ft=c),qt(e,t,t.pendingProps.children,a),Ii(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((c=r=ft)&&(r=JS(r,t.type,t.pendingProps,Dn),r!==null?(t.stateNode=r,Yt=t,ft=kn(r.firstChild),Dn=!1,c=!0):c=!1),c||Ia(t)),ve(t),c=t.type,f=t.pendingProps,y=e!==null?e.memoizedProps:null,r=f.children,uf(c,f)?r=null:y!==null&&uf(c,y)&&(t.flags|=32),t.memoizedState!==null&&(c=su(e,t,mS,null,null,a),Ho._currentValue=c),Ii(e,t),qt(e,t,r,a),t.child;case 6:return e===null&&Pe&&((e=a=ft)&&(a=WS(a,t.pendingProps,Dn),a!==null?(t.stateNode=a,Yt=t,ft=null,e=!0):e=!1),e||Ia(t)),null;case 13:return zp(e,t,a);case 4:return Z(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=jl(t,null,r,a):qt(e,t,r,a),t.child;case 11:return Ep(e,t,t.type,t.pendingProps,a);case 7:return qt(e,t,t.pendingProps,a),t.child;case 8:return qt(e,t,t.pendingProps.children,a),t.child;case 12:return qt(e,t,t.pendingProps.children,a),t.child;case 10:return r=t.pendingProps,Ga(t,t.type,r.value),qt(e,t,r.children,a),t.child;case 9:return c=t.type._context,r=t.pendingProps.children,Nl(t),c=Vt(c),r=r(c),t.flags|=1,qt(e,t,r,a),t.child;case 14:return Tp(e,t,t.type,t.pendingProps,a);case 15:return Cp(e,t,t.type,t.pendingProps,a);case 19:return jp(e,t,a);case 31:return SS(e,t,a);case 22:return Mp(e,t,a,t.pendingProps);case 24:return Nl(t),r=Vt(Mt),e===null?(c=Jc(),c===null&&(c=ot,f=Qc(),c.pooledCache=f,f.refCount++,f!==null&&(c.pooledCacheLanes|=a),c=f),t.memoizedState={parent:r,cache:c},eu(t),Ga(t,Mt,c)):((e.lanes&a)!==0&&(tu(e,t),yo(t,null,null,a),go()),c=e.memoizedState,f=t.memoizedState,c.parent!==r?(c={parent:r,cache:r},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),Ga(t,Mt,r)):(r=f.cache,Ga(t,Mt,r),r!==c.cache&&Fc(t,[Mt],a,!0))),qt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Sa(e){e.flags|=4}function Lu(e,t,a,r,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(sg())e.flags|=8192;else throw Dl=Ci,Wc}else e.flags&=-16777217}function Lp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Zg(t))if(sg())e.flags|=8192;else throw Dl=Ci,Wc}function Yi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Bt():536870912,e.lanes|=t,Er|=t)}function Eo(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,r=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,r|=c.subtreeFlags&65011712,r|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,r|=c.subtreeFlags,r|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=r,e.childLanes=a,t}function ES(e,t,a){var r=t.pendingProps;switch(qc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(t),null;case 1:return dt(t),null;case 3:return a=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ya(Mt),ce(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(ur(t)?Sa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$c())),dt(t),null;case 26:var c=t.type,f=t.memoizedState;return e===null?(Sa(t),f!==null?(dt(t),Lp(t,f)):(dt(t),Lu(t,c,null,r,a))):f?f!==e.memoizedState?(Sa(t),dt(t),Lp(t,f)):(dt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Sa(t),dt(t),Lu(t,c,e,r,a)),null;case 27:if(we(t),a=ie.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Sa(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return dt(t),null}e=le.current,ur(t)?ph(t):(e=Vg(c,r,a),t.stateNode=e,Sa(t))}return dt(t),null;case 5:if(we(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Sa(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return dt(t),null}if(f=le.current,ur(t))ph(t);else{var y=as(ie.current);switch(f){case 1:f=y.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:f=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":f=y.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":f=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":f=y.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?f.multiple=!0:r.size&&(f.size=r.size);break;default:f=typeof r.is=="string"?y.createElement(c,{is:r.is}):y.createElement(c)}}f[He]=t,f[rt]=r;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)f.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=f;e:switch(Pt(f,c,r),c){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Sa(t)}}return dt(t),Lu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Sa(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(i(166));if(e=ie.current,ur(t)){if(e=t.stateNode,a=t.memoizedProps,r=null,c=Yt,c!==null)switch(c.tag){case 27:case 5:r=c.memoizedProps}e[He]=t,e=!!(e.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||zg(e.nodeValue,a)),e||Ia(t,!0)}else e=as(e).createTextNode(r),e[He]=t,t.stateNode=e}return dt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(r=ur(t),a!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(557));e[He]=t}else _l(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),e=!1}else a=$c(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(gn(t),t):(gn(t),null);if((t.flags&128)!==0)throw Error(i(558))}return dt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=ur(t),r!==null&&r.dehydrated!==null){if(e===null){if(!c)throw Error(i(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(i(317));c[He]=t}else _l(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;dt(t),c=!1}else c=$c(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(gn(t),t):(gn(t),null)}return gn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=r!==null,e=e!==null&&e.memoizedState!==null,a&&(r=t.child,c=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(c=r.alternate.memoizedState.cachePool.pool),f=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(f=r.memoizedState.cachePool.pool),f!==c&&(r.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Yi(t,t.updateQueue),dt(t),null);case 4:return ce(),e===null&&lf(t.stateNode.containerInfo),dt(t),null;case 10:return ya(t.type),dt(t),null;case 19:if(G(St),r=t.memoizedState,r===null)return dt(t),null;if(c=(t.flags&128)!==0,f=r.rendering,f===null)if(c)Eo(r,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ri(e),f!==null){for(t.flags|=128,Eo(r,!1),e=f.updateQueue,t.updateQueue=e,Yi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)uh(a,e),a=a.sibling;return J(St,St.current&1|2),Pe&&pa(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ot()>Xi&&(t.flags|=128,c=!0,Eo(r,!1),t.lanes=4194304)}else{if(!c)if(e=Ri(f),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,Yi(t,e),Eo(r,!0),r.tail===null&&r.tailMode==="hidden"&&!f.alternate&&!Pe)return dt(t),null}else 2*Ot()-r.renderingStartTime>Xi&&a!==536870912&&(t.flags|=128,c=!0,Eo(r,!1),t.lanes=4194304);r.isBackwards?(f.sibling=t.child,t.child=f):(e=r.last,e!==null?e.sibling=f:t.child=f,r.last=f)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ot(),e.sibling=null,a=St.current,J(St,c?a&1|2:a&1),Pe&&pa(t,r.treeForkCount),e):(dt(t),null);case 22:case 23:return gn(t),ru(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(a&536870912)!==0&&(t.flags&128)===0&&(dt(t),t.subtreeFlags&6&&(t.flags|=8192)):dt(t),a=t.updateQueue,a!==null&&Yi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==a&&(t.flags|=2048),e!==null&&G(Ol),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ya(Mt),dt(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function TS(e,t){switch(qc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ya(Mt),ce(),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(gn(t),t.alternate===null)throw Error(i(340));_l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(gn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));_l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(St),null;case 4:return ce(),null;case 10:return ya(t.type),null;case 22:case 23:return gn(t),ru(),e!==null&&G(Ol),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ya(Mt),null;case 25:return null;default:return null}}function Hp(e,t){switch(qc(t),t.tag){case 3:ya(Mt),ce();break;case 26:case 27:case 5:we(t);break;case 4:ce();break;case 31:t.memoizedState!==null&&gn(t);break;case 13:gn(t);break;case 19:G(St);break;case 10:ya(t.type);break;case 22:case 23:gn(t),ru(),e!==null&&G(Ol);break;case 24:ya(Mt)}}function To(e,t){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var c=r.next;a=c;do{if((a.tag&e)===e){r=void 0;var f=a.create,y=a.inst;r=f(),y.destroy=r}a=a.next}while(a!==c)}}catch(w){tt(t,t.return,w)}}function Xa(e,t,a){try{var r=t.updateQueue,c=r!==null?r.lastEffect:null;if(c!==null){var f=c.next;r=f;do{if((r.tag&e)===e){var y=r.inst,w=y.destroy;if(w!==void 0){y.destroy=void 0,c=t;var O=a,K=w;try{K()}catch(oe){tt(c,O,oe)}}}r=r.next}while(r!==f)}}catch(oe){tt(t,t.return,oe)}}function Bp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{_h(t,a)}catch(r){tt(e,e.return,r)}}}function Up(e,t,a){a.props=Ll(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(r){tt(e,t,r)}}function Co(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof a=="function"?e.refCleanup=a(r):a.current=r}}catch(c){tt(e,t,c)}}function ea(e,t){var a=e.ref,r=e.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(c){tt(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){tt(e,t,c)}else a.current=null}function Ip(e){var t=e.type,a=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(c){tt(e,e.return,c)}}function Hu(e,t,a){try{var r=e.stateNode;$S(r,e.type,a,t),r[rt]=t}catch(c){tt(e,e.return,c)}}function Gp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&el(e.type)||e.tag===4}function Bu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Gp(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&&el(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 Uu(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=da));else if(r!==4&&(r===27&&el(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Uu(e,t,a),e=e.sibling;e!==null;)Uu(e,t,a),e=e.sibling}function Vi(e,t,a){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(r!==4&&(r===27&&el(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Vi(e,t,a),e=e.sibling;e!==null;)Vi(e,t,a),e=e.sibling}function Yp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var r=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Pt(t,r,a),t[He]=e,t[rt]=a}catch(f){tt(e,e.return,f)}}var wa=!1,Rt=!1,Iu=!1,Vp=typeof WeakSet=="function"?WeakSet:Set,Ut=null;function CS(e,t){if(e=e.containerInfo,sf=us,e=th(e),Dc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var r=a.getSelection&&a.getSelection();if(r&&r.rangeCount!==0){a=r.anchorNode;var c=r.anchorOffset,f=r.focusNode;r=r.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var y=0,w=-1,O=-1,K=0,oe=0,fe=e,Q=null;t:for(;;){for(var W;fe!==a||c!==0&&fe.nodeType!==3||(w=y+c),fe!==f||r!==0&&fe.nodeType!==3||(O=y+r),fe.nodeType===3&&(y+=fe.nodeValue.length),(W=fe.firstChild)!==null;)Q=fe,fe=W;for(;;){if(fe===e)break t;if(Q===a&&++K===c&&(w=y),Q===f&&++oe===r&&(O=y),(W=fe.nextSibling)!==null)break;fe=Q,Q=fe.parentNode}fe=W}a=w===-1||O===-1?null:{start:w,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(cf={focusedElem:e,selectionRange:a},us=!1,Ut=t;Ut!==null;)if(t=Ut,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ut=e;else for(;Ut!==null;){switch(t=Ut,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(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=t,c=f.memoizedProps,f=f.memoizedState,r=a.stateNode;try{var ge=Ll(a.type,c);e=r.getSnapshotBeforeUpdate(ge,f),r.__reactInternalSnapshotBeforeUpdate=e}catch(Re){tt(a,a.return,Re)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)df(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":df(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,Ut=e;break}Ut=t.return}}function qp(e,t,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:Ta(e,a),r&4&&To(5,a);break;case 1:if(Ta(e,a),r&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){tt(a,a.return,y)}else{var c=Ll(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){tt(a,a.return,y)}}r&64&&Bp(a),r&512&&Co(a,a.return);break;case 3:if(Ta(e,a),r&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{_h(e,t)}catch(y){tt(a,a.return,y)}}break;case 27:t===null&&r&4&&Yp(a);case 26:case 5:Ta(e,a),t===null&&r&4&&Ip(a),r&512&&Co(a,a.return);break;case 12:Ta(e,a);break;case 31:Ta(e,a),r&4&&Xp(e,a);break;case 13:Ta(e,a),r&4&&Kp(e,a),r&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=jS.bind(null,a),ew(e,a))));break;case 22:if(r=a.memoizedState!==null||wa,!r){t=t!==null&&t.memoizedState!==null||Rt,c=wa;var f=Rt;wa=r,(Rt=t)&&!f?Ca(e,a,(a.subtreeFlags&8772)!==0):Ta(e,a),wa=c,Rt=f}break;case 30:break;default:Ta(e,a)}}function Pp(e){var t=e.alternate;t!==null&&(e.alternate=null,Pp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&In(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 mt=null,en=!1;function Ea(e,t,a){for(a=a.child;a!==null;)$p(e,t,a),a=a.sibling}function $p(e,t,a){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(cn,a)}catch{}switch(a.tag){case 26:Rt||ea(a,t),Ea(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Rt||ea(a,t);var r=mt,c=en;el(a.type)&&(mt=a.stateNode,en=!1),Ea(e,t,a),jo(a.stateNode),mt=r,en=c;break;case 5:Rt||ea(a,t);case 6:if(r=mt,c=en,mt=null,Ea(e,t,a),mt=r,en=c,mt!==null)if(en)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(a.stateNode)}catch(f){tt(a,t,f)}else try{mt.removeChild(a.stateNode)}catch(f){tt(a,t,f)}break;case 18:mt!==null&&(en?(e=mt,Bg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Or(e)):Bg(mt,a.stateNode));break;case 4:r=mt,c=en,mt=a.stateNode.containerInfo,en=!0,Ea(e,t,a),mt=r,en=c;break;case 0:case 11:case 14:case 15:Xa(2,a,t),Rt||Xa(4,a,t),Ea(e,t,a);break;case 1:Rt||(ea(a,t),r=a.stateNode,typeof r.componentWillUnmount=="function"&&Up(a,t,r)),Ea(e,t,a);break;case 21:Ea(e,t,a);break;case 22:Rt=(r=Rt)||a.memoizedState!==null,Ea(e,t,a),Rt=r;break;default:Ea(e,t,a)}}function Xp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Or(e)}catch(a){tt(t,t.return,a)}}}function Kp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Or(e)}catch(a){tt(t,t.return,a)}}function MS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Vp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Vp),t;default:throw Error(i(435,e.tag))}}function qi(e,t){var a=MS(e);t.forEach(function(r){if(!a.has(r)){a.add(r);var c=kS.bind(null,e,r);r.then(c,c)}})}function tn(e,t){var a=t.deletions;if(a!==null)for(var r=0;r<a.length;r++){var c=a[r],f=e,y=t,w=y;e:for(;w!==null;){switch(w.tag){case 27:if(el(w.type)){mt=w.stateNode,en=!1;break e}break;case 5:mt=w.stateNode,en=!1;break e;case 3:case 4:mt=w.stateNode.containerInfo,en=!0;break e}w=w.return}if(mt===null)throw Error(i(160));$p(f,y,c),mt=null,en=!1,f=c.alternate,f!==null&&(f.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Fp(t,e),t=t.sibling}var Vn=null;function Fp(e,t){var a=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(t,e),nn(e),r&4&&(Xa(3,e,e.return),To(3,e),Xa(5,e,e.return));break;case 1:tn(t,e),nn(e),r&512&&(Rt||a===null||ea(a,a.return)),r&64&&wa&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?r:a.concat(r))));break;case 26:var c=Vn;if(tn(t,e),nn(e),r&512&&(Rt||a===null||ea(a,a.return)),r&4){var f=a!==null?a.memoizedState:null;if(r=e.memoizedState,a===null)if(r===null)if(e.stateNode===null){e:{r=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(r){case"title":f=c.getElementsByTagName("title")[0],(!f||f[pt]||f[He]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=c.createElement(r),c.head.insertBefore(f,c.querySelector("head > title"))),Pt(f,r,a),f[He]=e,gt(f),r=f;break e;case"link":var y=Fg("link","href",c).get(r+(a.href||""));if(y){for(var w=0;w<y.length;w++)if(f=y[w],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(w,1);break t}}f=c.createElement(r),Pt(f,r,a),c.head.appendChild(f);break;case"meta":if(y=Fg("meta","content",c).get(r+(a.content||""))){for(w=0;w<y.length;w++)if(f=y[w],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(w,1);break t}}f=c.createElement(r),Pt(f,r,a),c.head.appendChild(f);break;default:throw Error(i(468,r))}f[He]=e,gt(f),r=f}e.stateNode=r}else Qg(c,e.type,e.stateNode);else e.stateNode=Kg(c,r,e.memoizedProps);else f!==r?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,r===null?Qg(c,e.type,e.stateNode):Kg(c,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Hu(e,e.memoizedProps,a.memoizedProps)}break;case 27:tn(t,e),nn(e),r&512&&(Rt||a===null||ea(a,a.return)),a!==null&&r&4&&Hu(e,e.memoizedProps,a.memoizedProps);break;case 5:if(tn(t,e),nn(e),r&512&&(Rt||a===null||ea(a,a.return)),e.flags&32){c=e.stateNode;try{er(c,"")}catch(ge){tt(e,e.return,ge)}}r&4&&e.stateNode!=null&&(c=e.memoizedProps,Hu(e,c,a!==null?a.memoizedProps:c)),r&1024&&(Iu=!0);break;case 6:if(tn(t,e),nn(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,a=e.stateNode;try{a.nodeValue=r}catch(ge){tt(e,e.return,ge)}}break;case 3:if(os=null,c=Vn,Vn=ls(t.containerInfo),tn(t,e),Vn=c,nn(e),r&4&&a!==null&&a.memoizedState.isDehydrated)try{Or(t.containerInfo)}catch(ge){tt(e,e.return,ge)}Iu&&(Iu=!1,Qp(e));break;case 4:r=Vn,Vn=ls(e.stateNode.containerInfo),tn(t,e),nn(e),Vn=r;break;case 12:tn(t,e),nn(e);break;case 31:tn(t,e),nn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,qi(e,r)));break;case 13:tn(t,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&($i=Ot()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,qi(e,r)));break;case 22:c=e.memoizedState!==null;var O=a!==null&&a.memoizedState!==null,K=wa,oe=Rt;if(wa=K||c,Rt=oe||O,tn(t,e),Rt=oe,wa=K,nn(e),r&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||O||wa||Rt||Hl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){O=a=t;try{if(f=O.stateNode,c)y=f.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{w=O.stateNode;var fe=O.memoizedProps.style,Q=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;w.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(ge){tt(O,O.return,ge)}}}else if(t.tag===6){if(a===null){O=t;try{O.stateNode.nodeValue=c?"":O.memoizedProps}catch(ge){tt(O,O.return,ge)}}}else if(t.tag===18){if(a===null){O=t;try{var W=O.stateNode;c?Ug(W,!0):Ug(O.stateNode,!1)}catch(ge){tt(O,O.return,ge)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(a=r.retryQueue,a!==null&&(r.retryQueue=null,qi(e,a))));break;case 19:tn(t,e),nn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,qi(e,r)));break;case 30:break;case 21:break;default:tn(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{for(var a,r=e.return;r!==null;){if(Gp(r)){a=r;break}r=r.return}if(a==null)throw Error(i(160));switch(a.tag){case 27:var c=a.stateNode,f=Bu(e);Vi(e,f,c);break;case 5:var y=a.stateNode;a.flags&32&&(er(y,""),a.flags&=-33);var w=Bu(e);Vi(e,w,y);break;case 3:case 4:var O=a.stateNode.containerInfo,K=Bu(e);Uu(e,K,O);break;default:throw Error(i(161))}}catch(oe){tt(e,e.return,oe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Qp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Qp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ta(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)qp(e,t.alternate,t),t=t.sibling}function Hl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Xa(4,t,t.return),Hl(t);break;case 1:ea(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Up(t,t.return,a),Hl(t);break;case 27:jo(t.stateNode);case 26:case 5:ea(t,t.return),Hl(t);break;case 22:t.memoizedState===null&&Hl(t);break;case 30:Hl(t);break;default:Hl(t)}e=e.sibling}}function Ca(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,c=e,f=t,y=f.flags;switch(f.tag){case 0:case 11:case 15:Ca(c,f,a),To(4,f);break;case 1:if(Ca(c,f,a),r=f,c=r.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(K){tt(r,r.return,K)}if(r=f,c=r.updateQueue,c!==null){var w=r.stateNode;try{var O=c.shared.hiddenCallbacks;if(O!==null)for(c.shared.hiddenCallbacks=null,c=0;c<O.length;c++)Ah(O[c],w)}catch(K){tt(r,r.return,K)}}a&&y&64&&Bp(f),Co(f,f.return);break;case 27:Yp(f);case 26:case 5:Ca(c,f,a),a&&r===null&&y&4&&Ip(f),Co(f,f.return);break;case 12:Ca(c,f,a);break;case 31:Ca(c,f,a),a&&y&4&&Xp(c,f);break;case 13:Ca(c,f,a),a&&y&4&&Kp(c,f);break;case 22:f.memoizedState===null&&Ca(c,f,a),Co(f,f.return);break;case 30:break;default:Ca(c,f,a)}t=t.sibling}}function Gu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&uo(a))}function Yu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&uo(e))}function qn(e,t,a,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Zp(e,t,a,r),t=t.sibling}function Zp(e,t,a,r){var c=t.flags;switch(t.tag){case 0:case 11:case 15:qn(e,t,a,r),c&2048&&To(9,t);break;case 1:qn(e,t,a,r);break;case 3:qn(e,t,a,r),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&uo(e)));break;case 12:if(c&2048){qn(e,t,a,r),e=t.stateNode;try{var f=t.memoizedProps,y=f.id,w=f.onPostCommit;typeof w=="function"&&w(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){tt(t,t.return,O)}}else qn(e,t,a,r);break;case 31:qn(e,t,a,r);break;case 13:qn(e,t,a,r);break;case 23:break;case 22:f=t.stateNode,y=t.alternate,t.memoizedState!==null?f._visibility&2?qn(e,t,a,r):Mo(e,t):f._visibility&2?qn(e,t,a,r):(f._visibility|=2,xr(e,t,a,r,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Gu(y,t);break;case 24:qn(e,t,a,r),c&2048&&Yu(t.alternate,t);break;default:qn(e,t,a,r)}}function xr(e,t,a,r,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,y=t,w=a,O=r,K=y.flags;switch(y.tag){case 0:case 11:case 15:xr(f,y,w,O,c),To(8,y);break;case 23:break;case 22:var oe=y.stateNode;y.memoizedState!==null?oe._visibility&2?xr(f,y,w,O,c):Mo(f,y):(oe._visibility|=2,xr(f,y,w,O,c)),c&&K&2048&&Gu(y.alternate,y);break;case 24:xr(f,y,w,O,c),c&&K&2048&&Yu(y.alternate,y);break;default:xr(f,y,w,O,c)}t=t.sibling}}function Mo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,r=t,c=r.flags;switch(r.tag){case 22:Mo(a,r),c&2048&&Gu(r.alternate,r);break;case 24:Mo(a,r),c&2048&&Yu(r.alternate,r);break;default:Mo(a,r)}t=t.sibling}}var Ao=8192;function Sr(e,t,a){if(e.subtreeFlags&Ao)for(e=e.child;e!==null;)Jp(e,t,a),e=e.sibling}function Jp(e,t,a){switch(e.tag){case 26:Sr(e,t,a),e.flags&Ao&&e.memoizedState!==null&&dw(a,Vn,e.memoizedState,e.memoizedProps);break;case 5:Sr(e,t,a);break;case 3:case 4:var r=Vn;Vn=ls(e.stateNode.containerInfo),Sr(e,t,a),Vn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ao,Ao=16777216,Sr(e,t,a),Ao=r):Sr(e,t,a));break;default:Sr(e,t,a)}}function Wp(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 _o(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];Ut=r,tg(r,e)}Wp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)eg(e),e=e.sibling}function eg(e){switch(e.tag){case 0:case 11:case 15:_o(e),e.flags&2048&&Xa(9,e,e.return);break;case 3:_o(e);break;case 12:_o(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Pi(e)):_o(e);break;default:_o(e)}}function Pi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var r=t[a];Ut=r,tg(r,e)}Wp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Xa(8,t,t.return),Pi(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Pi(t));break;default:Pi(t)}e=e.sibling}}function tg(e,t){for(;Ut!==null;){var a=Ut;switch(a.tag){case 0:case 11:case 15:Xa(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:uo(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,Ut=r;else e:for(a=e;Ut!==null;){r=Ut;var c=r.sibling,f=r.return;if(Pp(r),r===a){Ut=null;break e}if(c!==null){c.return=f,Ut=c;break e}Ut=f}}}var AS={getCacheForType:function(e){var t=Vt(Mt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Vt(Mt).controller.signal}},_S=typeof WeakMap=="function"?WeakMap:Map,Ze=0,ot=null,Ge=null,Ve=0,et=0,yn=null,Ka=!1,wr=!1,Vu=!1,Ma=0,vt=0,Fa=0,Bl=0,qu=0,vn=0,Er=0,Ro=null,an=null,Pu=!1,$i=0,ng=0,Xi=1/0,Ki=null,Qa=null,Dt=0,Za=null,Tr=null,Aa=0,$u=0,Xu=null,ag=null,No=0,Ku=null;function bn(){return(Ze&2)!==0&&Ve!==0?Ve&-Ve:E.T!==null?ef():Ie()}function lg(){if(vn===0)if((Ve&536870912)===0||Pe){var e=ka;ka<<=1,(ka&3932160)===0&&(ka=262144),vn=e}else vn=536870912;return e=pn.current,e!==null&&(e.flags|=32),vn}function ln(e,t,a){(e===ot&&(et===2||et===9)||e.cancelPendingCommit!==null)&&(Cr(e,0),Ja(e,Ve,vn,!1)),ct(e,a),((Ze&2)===0||e!==ot)&&(e===ot&&((Ze&2)===0&&(Bl|=a),vt===4&&Ja(e,Ve,vn,!1)),ta(e))}function rg(e,t,a){if((Ze&6)!==0)throw Error(i(327));var r=!a&&(t&127)===0&&(t&e.expiredLanes)===0||it(e,t),c=r?OS(e,t):Qu(e,t,!0),f=r;do{if(c===0){wr&&!r&&Ja(e,t,0,!1);break}else{if(a=e.current.alternate,f&&!RS(a)){c=Qu(e,t,!1),f=!1;continue}if(c===2){if(f=t,e.errorRecoveryDisabledLanes&f)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var w=e;c=Ro;var O=w.current.memoizedState.isDehydrated;if(O&&(Cr(w,y).flags|=256),y=Qu(w,y,!1),y!==2){if(Vu&&!O){w.errorRecoveryDisabledLanes|=f,Bl|=f,c=4;break e}f=an,an=c,f!==null&&(an===null?an=f:an.push.apply(an,f))}c=y}if(f=!1,c!==2)continue}}if(c===1){Cr(e,0),Ja(e,t,0,!0);break}e:{switch(r=e,f=c,f){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Ja(r,t,vn,!Ka);break e;case 2:an=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(c=$i+300-Ot(),10<c)){if(Ja(r,t,vn,!Ka),Ne(r,0,!0)!==0)break e;Aa=t,r.timeoutHandle=Lg(og.bind(null,r,a,an,Ki,Pu,t,vn,Bl,Er,Ka,f,"Throttled",-0,0),c);break e}og(r,a,an,Ki,Pu,t,vn,Bl,Er,Ka,f,null,-0,0)}}break}while(!0);ta(e)}function og(e,t,a,r,c,f,y,w,O,K,oe,fe,Q,W){if(e.timeoutHandle=-1,fe=t.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:da},Jp(t,f,fe);var ge=(f&62914560)===f?$i-Ot():(f&4194048)===f?ng-Ot():0;if(ge=mw(fe,ge),ge!==null){Aa=f,e.cancelPendingCommit=ge(hg.bind(null,e,t,f,a,r,c,y,w,O,oe,fe,null,Q,W)),Ja(e,f,y,!K);return}}hg(e,t,f,a,r,c,y,w,O)}function RS(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var r=0;r<a.length;r++){var c=a[r],f=c.getSnapshot;c=c.value;try{if(!mn(f(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ja(e,t,a,r){t&=~qu,t&=~Bl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var c=t;0<c;){var f=31-Ct(c),y=1<<f;r[f]=-1,c&=~y}a!==0&&te(e,a,t)}function Fi(){return(Ze&6)===0?(Oo(0),!1):!0}function Fu(){if(Ge!==null){if(et===0)var e=Ge.return;else e=Ge,ga=Rl=null,fu(e),pr=null,mo=0,e=Ge;for(;e!==null;)Hp(e.alternate,e),e=e.return;Ge=null}}function Cr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,FS(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Aa=0,Fu(),ot=e,Ge=a=ha(e.current,null),Ve=t,et=0,yn=null,Ka=!1,wr=it(e,t),Vu=!1,Er=vn=qu=Bl=Fa=vt=0,an=Ro=null,Pu=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var c=31-Ct(r),f=1<<c;t|=e[c],r&=~f}return Ma=t,gi(),a}function ig(e,t){je=null,E.H=So,t===hr||t===Ti?(t=Eh(),et=3):t===Wc?(t=Eh(),et=4):et=t===Au?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yn=t,Ge===null&&(vt=1,Bi(e,Nn(t,e.current)))}function sg(){var e=pn.current;return e===null?!0:(Ve&4194048)===Ve?jn===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?e===jn:!1}function cg(){var e=E.H;return E.H=So,e===null?So:e}function ug(){var e=E.A;return E.A=AS,e}function Qi(){vt=4,Ka||(Ve&4194048)!==Ve&&pn.current!==null||(wr=!0),(Fa&134217727)===0&&(Bl&134217727)===0||ot===null||Ja(ot,Ve,vn,!1)}function Qu(e,t,a){var r=Ze;Ze|=2;var c=cg(),f=ug();(ot!==e||Ve!==t)&&(Ki=null,Cr(e,t)),t=!1;var y=vt;e:do try{if(et!==0&&Ge!==null){var w=Ge,O=yn;switch(et){case 8:Fu(),y=6;break e;case 3:case 2:case 9:case 6:pn.current===null&&(t=!0);var K=et;if(et=0,yn=null,Mr(e,w,O,K),a&&wr){y=0;break e}break;default:K=et,et=0,yn=null,Mr(e,w,O,K)}}NS(),y=vt;break}catch(oe){ig(e,oe)}while(!0);return t&&e.shellSuspendCounter++,ga=Rl=null,Ze=r,E.H=c,E.A=f,Ge===null&&(ot=null,Ve=0,gi()),y}function NS(){for(;Ge!==null;)fg(Ge)}function OS(e,t){var a=Ze;Ze|=2;var r=cg(),c=ug();ot!==e||Ve!==t?(Ki=null,Xi=Ot()+500,Cr(e,t)):wr=it(e,t);e:do try{if(et!==0&&Ge!==null){t=Ge;var f=yn;t:switch(et){case 1:et=0,yn=null,Mr(e,t,f,1);break;case 2:case 9:if(Sh(f)){et=0,yn=null,dg(t);break}t=function(){et!==2&&et!==9||ot!==e||(et=7),ta(e)},f.then(t,t);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:Sh(f)?(et=0,yn=null,dg(t)):(et=0,yn=null,Mr(e,t,f,7));break;case 5:var y=null;switch(Ge.tag){case 26:y=Ge.memoizedState;case 5:case 27:var w=Ge;if(y?Zg(y):w.stateNode.complete){et=0,yn=null;var O=w.sibling;if(O!==null)Ge=O;else{var K=w.return;K!==null?(Ge=K,Zi(K)):Ge=null}break t}}et=0,yn=null,Mr(e,t,f,5);break;case 6:et=0,yn=null,Mr(e,t,f,6);break;case 8:Fu(),vt=6;break e;default:throw Error(i(462))}}zS();break}catch(oe){ig(e,oe)}while(!0);return ga=Rl=null,E.H=r,E.A=c,Ze=a,Ge!==null?0:(ot=null,Ve=0,gi(),vt)}function zS(){for(;Ge!==null&&!ht();)fg(Ge)}function fg(e){var t=kp(e.alternate,e,Ma);e.memoizedProps=e.pendingProps,t===null?Zi(e):Ge=t}function dg(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Rp(a,t,t.pendingProps,t.type,void 0,Ve);break;case 11:t=Rp(a,t,t.pendingProps,t.type.render,t.ref,Ve);break;case 5:fu(t);default:Hp(a,t),t=Ge=uh(t,Ma),t=kp(a,t,Ma)}e.memoizedProps=e.pendingProps,t===null?Zi(e):Ge=t}function Mr(e,t,a,r){ga=Rl=null,fu(t),pr=null,mo=0;var c=t.return;try{if(xS(e,c,t,a,Ve)){vt=1,Bi(e,Nn(a,e.current)),Ge=null;return}}catch(f){if(c!==null)throw Ge=c,f;vt=1,Bi(e,Nn(a,e.current)),Ge=null;return}t.flags&32768?(Pe||r===1?e=!0:wr||(Ve&536870912)!==0?e=!1:(Ka=e=!0,(r===2||r===9||r===3||r===6)&&(r=pn.current,r!==null&&r.tag===13&&(r.flags|=16384))),mg(t,e)):Zi(t)}function Zi(e){var t=e;do{if((t.flags&32768)!==0){mg(t,Ka);return}e=t.return;var a=ES(t.alternate,t,Ma);if(a!==null){Ge=a;return}if(t=t.sibling,t!==null){Ge=t;return}Ge=t=e}while(t!==null);vt===0&&(vt=5)}function mg(e,t){do{var a=TS(e.alternate,e);if(a!==null){a.flags&=32767,Ge=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ge=e;return}Ge=e=a}while(e!==null);vt=6,Ge=null}function hg(e,t,a,r,c,f,y,w,O){e.cancelPendingCommit=null;do Ji();while(Dt!==0);if((Ze&6)!==0)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(f=t.lanes|t.childLanes,f|=Bc,$t(e,a,f,y,w,O),e===ot&&(Ge=ot=null,Ve=0),Tr=t,Za=e,Aa=a,$u=f,Xu=c,ag=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,LS(Un,function(){return bg(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=E.T,E.T=null,c=j.p,j.p=2,y=Ze,Ze|=4;try{CS(e,t,a)}finally{Ze=y,j.p=c,E.T=r}}Dt=1,pg(),gg(),yg()}}function pg(){if(Dt===1){Dt=0;var e=Za,t=Tr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=E.T,E.T=null;var r=j.p;j.p=2;var c=Ze;Ze|=4;try{Fp(t,e);var f=cf,y=th(e.containerInfo),w=f.focusedElem,O=f.selectionRange;if(y!==w&&w&&w.ownerDocument&&eh(w.ownerDocument.documentElement,w)){if(O!==null&&Dc(w)){var K=O.start,oe=O.end;if(oe===void 0&&(oe=K),"selectionStart"in w)w.selectionStart=K,w.selectionEnd=Math.min(oe,w.value.length);else{var fe=w.ownerDocument||document,Q=fe&&fe.defaultView||window;if(Q.getSelection){var W=Q.getSelection(),ge=w.textContent.length,Re=Math.min(O.start,ge),lt=O.end===void 0?Re:Math.min(O.end,ge);!W.extend&&Re>lt&&(y=lt,lt=Re,Re=y);var U=Wm(w,Re),k=Wm(w,lt);if(U&&k&&(W.rangeCount!==1||W.anchorNode!==U.node||W.anchorOffset!==U.offset||W.focusNode!==k.node||W.focusOffset!==k.offset)){var X=fe.createRange();X.setStart(U.node,U.offset),W.removeAllRanges(),Re>lt?(W.addRange(X),W.extend(k.node,k.offset)):(X.setEnd(k.node,k.offset),W.addRange(X))}}}}for(fe=[],W=w;W=W.parentNode;)W.nodeType===1&&fe.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<fe.length;w++){var ue=fe[w];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}us=!!sf,cf=sf=null}finally{Ze=c,j.p=r,E.T=a}}e.current=t,Dt=2}}function gg(){if(Dt===2){Dt=0;var e=Za,t=Tr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=E.T,E.T=null;var r=j.p;j.p=2;var c=Ze;Ze|=4;try{qp(e,t.alternate,t)}finally{Ze=c,j.p=r,E.T=a}}Dt=3}}function yg(){if(Dt===4||Dt===3){Dt=0,Lt();var e=Za,t=Tr,a=Aa,r=ag;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Dt=5:(Dt=0,Tr=Za=null,vg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Qa=null),ze(a),t=t.stateNode,Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(cn,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=E.T,c=j.p,j.p=2,E.T=null;try{for(var f=e.onRecoverableError,y=0;y<r.length;y++){var w=r[y];f(w.value,{componentStack:w.stack})}}finally{E.T=t,j.p=c}}(Aa&3)!==0&&Ji(),ta(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Ku?No++:(No=0,Ku=e):No=0,Oo(0)}}function vg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,uo(t)))}function Ji(){return pg(),gg(),yg(),bg()}function bg(){if(Dt!==5)return!1;var e=Za,t=$u;$u=0;var a=ze(Aa),r=E.T,c=j.p;try{j.p=32>a?32:a,E.T=null,a=Xu,Xu=null;var f=Za,y=Aa;if(Dt=0,Tr=Za=null,Aa=0,(Ze&6)!==0)throw Error(i(331));var w=Ze;if(Ze|=4,eg(f.current),Zp(f,f.current,y,a),Ze=w,Oo(0,!1),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(cn,f)}catch{}return!0}finally{j.p=c,E.T=r,vg(e,t)}}function xg(e,t,a){t=Nn(a,t),t=Mu(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(ct(e,2),ta(e))}function tt(e,t,a){if(e.tag===3)xg(e,e,a);else for(;t!==null;){if(t.tag===3){xg(t,e,a);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Qa===null||!Qa.has(r))){e=Nn(a,e),a=Sp(2),r=qa(t,a,2),r!==null&&(wp(a,r,t,e),ct(r,2),ta(r));break}}t=t.return}}function Zu(e,t,a){var r=e.pingCache;if(r===null){r=e.pingCache=new _S;var c=new Set;r.set(t,c)}else c=r.get(t),c===void 0&&(c=new Set,r.set(t,c));c.has(a)||(Vu=!0,c.add(a),e=DS.bind(null,e,t,a),t.then(e,e))}function DS(e,t,a){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ot===e&&(Ve&a)===a&&(vt===4||vt===3&&(Ve&62914560)===Ve&&300>Ot()-$i?(Ze&2)===0&&Cr(e,0):qu|=a,Er===Ve&&(Er=0)),ta(e)}function Sg(e,t){t===0&&(t=Bt()),e=Ml(e,t),e!==null&&(ct(e,t),ta(e))}function jS(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Sg(e,a)}function kS(e,t){var a=0;switch(e.tag){case 31:case 13:var r=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Sg(e,a)}function LS(e,t){return _e(e,t)}var Wi=null,Ar=null,Ju=!1,es=!1,Wu=!1,Wa=0;function ta(e){e!==Ar&&e.next===null&&(Ar===null?Wi=Ar=e:Ar=Ar.next=e),es=!0,Ju||(Ju=!0,BS())}function Oo(e,t){if(!Wu&&es){Wu=!0;do for(var a=!1,r=Wi;r!==null;){if(e!==0){var c=r.pendingLanes;if(c===0)var f=0;else{var y=r.suspendedLanes,w=r.pingedLanes;f=(1<<31-Ct(42|e)+1)-1,f&=c&~(y&~w),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Cg(r,f))}else f=Ve,f=Ne(r,r===ot?f:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(f&3)===0||it(r,f)||(a=!0,Cg(r,f));r=r.next}while(a);Wu=!1}}function HS(){wg()}function wg(){es=Ju=!1;var e=0;Wa!==0&&KS()&&(e=Wa);for(var t=Ot(),a=null,r=Wi;r!==null;){var c=r.next,f=Eg(r,t);f===0?(r.next=null,a===null?Wi=c:a.next=c,c===null&&(Ar=a)):(a=r,(e!==0||(f&3)!==0)&&(es=!0)),r=c}Dt!==0&&Dt!==5||Oo(e),Wa!==0&&(Wa=0)}function Eg(e,t){for(var a=e.suspendedLanes,r=e.pingedLanes,c=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var y=31-Ct(f),w=1<<y,O=c[y];O===-1?((w&a)===0||(w&r)!==0)&&(c[y]=xt(w,t)):O<=t&&(e.expiredLanes|=w),f&=~w}if(t=ot,a=Ve,a=Ne(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,a===0||e===t&&(et===2||et===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&sn(r),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||it(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(r!==null&&sn(r),ze(a)){case 2:case 8:a=Tt;break;case 32:a=Un;break;case 268435456:a=Jt;break;default:a=Un}return r=Tg.bind(null,e),a=_e(a,r),e.callbackPriority=t,e.callbackNode=a,t}return r!==null&&r!==null&&sn(r),e.callbackPriority=2,e.callbackNode=null,2}function Tg(e,t){if(Dt!==0&&Dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ji()&&e.callbackNode!==a)return null;var r=Ve;return r=Ne(e,e===ot?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(rg(e,r,t),Eg(e,Ot()),e.callbackNode!=null&&e.callbackNode===a?Tg.bind(null,e):null)}function Cg(e,t){if(Ji())return null;rg(e,t,!0)}function BS(){QS(function(){(Ze&6)!==0?_e(Et,HS):wg()})}function ef(){if(Wa===0){var e=dr;e===0&&(e=ja,ja<<=1,(ja&261888)===0&&(ja=256)),Wa=e}return Wa}function Mg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:si(""+e)}function Ag(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function US(e,t,a,r,c){if(t==="submit"&&a&&a.stateNode===c){var f=Mg((c[rt]||null).action),y=r.submitter;y&&(t=(t=y[rt]||null)?Mg(t.formAction):y.getAttribute("formAction"),t!==null&&(f=t,y=null));var w=new di("action","action",null,r,c);e.push({event:w,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Wa!==0){var O=y?Ag(c,y):new FormData(c);xu(a,{pending:!0,data:O,method:c.method,action:f},null,O)}}else typeof f=="function"&&(w.preventDefault(),O=y?Ag(c,y):new FormData(c),xu(a,{pending:!0,data:O,method:c.method,action:f},f,O))},currentTarget:c}]})}}for(var tf=0;tf<Hc.length;tf++){var nf=Hc[tf],IS=nf.toLowerCase(),GS=nf[0].toUpperCase()+nf.slice(1);Yn(IS,"on"+GS)}Yn(lh,"onAnimationEnd"),Yn(rh,"onAnimationIteration"),Yn(oh,"onAnimationStart"),Yn("dblclick","onDoubleClick"),Yn("focusin","onFocus"),Yn("focusout","onBlur"),Yn(aS,"onTransitionRun"),Yn(lS,"onTransitionStart"),Yn(rS,"onTransitionCancel"),Yn(ih,"onTransitionEnd"),Jl("onMouseEnter",["mouseout","mouseover"]),Jl("onMouseLeave",["mouseout","mouseover"]),Jl("onPointerEnter",["pointerout","pointerover"]),Jl("onPointerLeave",["pointerout","pointerover"]),wl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),wl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),wl("onBeforeInput",["compositionend","keypress","textInput","paste"]),wl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),wl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),wl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zo="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(" "),YS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zo));function _g(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var r=e[a],c=r.event;r=r.listeners;e:{var f=void 0;if(t)for(var y=r.length-1;0<=y;y--){var w=r[y],O=w.instance,K=w.currentTarget;if(w=w.listener,O!==f&&c.isPropagationStopped())break e;f=w,c.currentTarget=K;try{f(c)}catch(oe){pi(oe)}c.currentTarget=null,f=O}else for(y=0;y<r.length;y++){if(w=r[y],O=w.instance,K=w.currentTarget,w=w.listener,O!==f&&c.isPropagationStopped())break e;f=w,c.currentTarget=K;try{f(c)}catch(oe){pi(oe)}c.currentTarget=null,f=O}}}}function Ye(e,t){var a=t[Xt];a===void 0&&(a=t[Xt]=new Set);var r=e+"__bubble";a.has(r)||(Rg(t,e,2,!1),a.add(r))}function af(e,t,a){var r=0;t&&(r|=4),Rg(a,e,r,t)}var ts="_reactListening"+Math.random().toString(36).slice(2);function lf(e){if(!e[ts]){e[ts]=!0,li.forEach(function(a){a!=="selectionchange"&&(YS.has(a)||af(a,!1,e),af(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ts]||(t[ts]=!0,af("selectionchange",!1,t))}}function Rg(e,t,a,r){switch(ly(t)){case 2:var c=gw;break;case 8:c=yw;break;default:c=xf}a=c.bind(null,t,a,e),c=void 0,!Tc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),r?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function rf(e,t,a,r,c){var f=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var w=r.stateNode.containerInfo;if(w===c)break;if(y===4)for(y=r.return;y!==null;){var O=y.tag;if((O===3||O===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;w!==null;){if(y=dn(w),y===null)return;if(O=y.tag,O===5||O===6||O===26||O===27){r=f=y;continue e}w=w.parentNode}}r=r.return}jm(function(){var K=f,oe=wc(a),fe=[];e:{var Q=sh.get(e);if(Q!==void 0){var W=di,ge=e;switch(e){case"keypress":if(ui(a)===0)break e;case"keydown":case"keyup":W=k1;break;case"focusin":ge="focus",W=_c;break;case"focusout":ge="blur",W=_c;break;case"beforeblur":case"afterblur":W=_c;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=Hm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=E1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=B1;break;case lh:case rh:case oh:W=M1;break;case ih:W=I1;break;case"scroll":case"scrollend":W=S1;break;case"wheel":W=Y1;break;case"copy":case"cut":case"paste":W=_1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=Um;break;case"toggle":case"beforetoggle":W=q1}var Re=(t&4)!==0,lt=!Re&&(e==="scroll"||e==="scrollend"),U=Re?Q!==null?Q+"Capture":null:Q;Re=[];for(var k=K,X;k!==null;){var ue=k;if(X=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||X===null||U===null||(ue=Wr(k,U),ue!=null&&Re.push(Do(k,ue,X))),lt)break;k=k.return}0<Re.length&&(Q=new W(Q,ge,null,a,oe),fe.push({event:Q,listeners:Re}))}}if((t&7)===0){e:{if(Q=e==="mouseover"||e==="pointerover",W=e==="mouseout"||e==="pointerout",Q&&a!==Sc&&(ge=a.relatedTarget||a.fromElement)&&(dn(ge)||ge[Qe]))break e;if((W||Q)&&(Q=oe.window===oe?oe:(Q=oe.ownerDocument)?Q.defaultView||Q.parentWindow:window,W?(ge=a.relatedTarget||a.toElement,W=K,ge=ge?dn(ge):null,ge!==null&&(lt=u(ge),Re=ge.tag,ge!==lt||Re!==5&&Re!==27&&Re!==6)&&(ge=null)):(W=null,ge=K),W!==ge)){if(Re=Hm,ue="onMouseLeave",U="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(Re=Um,ue="onPointerLeave",U="onPointerEnter",k="pointer"),lt=W==null?Q:ua(W),X=ge==null?Q:ua(ge),Q=new Re(ue,k+"leave",W,a,oe),Q.target=lt,Q.relatedTarget=X,ue=null,dn(oe)===K&&(Re=new Re(U,k+"enter",ge,a,oe),Re.target=X,Re.relatedTarget=lt,ue=Re),lt=ue,W&&ge)t:{for(Re=VS,U=W,k=ge,X=0,ue=U;ue;ue=Re(ue))X++;ue=0;for(var Me=k;Me;Me=Re(Me))ue++;for(;0<X-ue;)U=Re(U),X--;for(;0<ue-X;)k=Re(k),ue--;for(;X--;){if(U===k||k!==null&&U===k.alternate){Re=U;break t}U=Re(U),k=Re(k)}Re=null}else Re=null;W!==null&&Ng(fe,Q,W,Re,!1),ge!==null&<!==null&&Ng(fe,lt,ge,Re,!0)}}e:{if(Q=K?ua(K):window,W=Q.nodeName&&Q.nodeName.toLowerCase(),W==="select"||W==="input"&&Q.type==="file")var Xe=Xm;else if(Pm(Q))if(Km)Xe=eS;else{Xe=J1;var xe=Z1}else W=Q.nodeName,!W||W.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?K&&xc(K.elementType)&&(Xe=Xm):Xe=W1;if(Xe&&(Xe=Xe(e,K))){$m(fe,Xe,a,oe);break e}xe&&xe(e,Q,K),e==="focusout"&&K&&Q.type==="number"&&K.memoizedProps.value!=null&&bc(Q,"number",Q.value)}switch(xe=K?ua(K):window,e){case"focusin":(Pm(xe)||xe.contentEditable==="true")&&(lr=xe,jc=K,io=null);break;case"focusout":io=jc=lr=null;break;case"mousedown":kc=!0;break;case"contextmenu":case"mouseup":case"dragend":kc=!1,nh(fe,a,oe);break;case"selectionchange":if(nS)break;case"keydown":case"keyup":nh(fe,a,oe)}var ke;if(Nc)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else ar?Vm(e,a)&&(qe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(qe="onCompositionStart");qe&&(Im&&a.locale!=="ko"&&(ar||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&ar&&(ke=km()):(Ha=oe,Cc="value"in Ha?Ha.value:Ha.textContent,ar=!0)),xe=ns(K,qe),0<xe.length&&(qe=new Bm(qe,e,null,a,oe),fe.push({event:qe,listeners:xe}),ke?qe.data=ke:(ke=qm(a),ke!==null&&(qe.data=ke)))),(ke=$1?X1(e,a):K1(e,a))&&(qe=ns(K,"onBeforeInput"),0<qe.length&&(xe=new Bm("onBeforeInput","beforeinput",null,a,oe),fe.push({event:xe,listeners:qe}),xe.data=ke)),US(fe,e,K,a,oe)}_g(fe,t)})}function Do(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ns(e,t){for(var a=t+"Capture",r=[];e!==null;){var c=e,f=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||f===null||(c=Wr(e,a),c!=null&&r.unshift(Do(e,c,f)),c=Wr(e,t),c!=null&&r.push(Do(e,c,f))),e.tag===3)return r;e=e.return}return[]}function VS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ng(e,t,a,r,c){for(var f=t._reactName,y=[];a!==null&&a!==r;){var w=a,O=w.alternate,K=w.stateNode;if(w=w.tag,O!==null&&O===r)break;w!==5&&w!==26&&w!==27||K===null||(O=K,c?(K=Wr(a,f),K!=null&&y.unshift(Do(a,K,O))):c||(K=Wr(a,f),K!=null&&y.push(Do(a,K,O)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var qS=/\r\n?/g,PS=/\u0000|\uFFFD/g;function Og(e){return(typeof e=="string"?e:""+e).replace(qS,`
|
|
49
|
+
`).replace(PS,"")}function zg(e,t){return t=Og(t),Og(e)===t}function at(e,t,a,r,c,f){switch(a){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||er(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&er(e,""+r);break;case"className":oi(e,"class",r);break;case"tabIndex":oi(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":oi(e,a,r);break;case"style":zm(e,r,f);break;case"data":if(t!=="object"){oi(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=si(""+r),e.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(a==="formAction"?(t!=="input"&&at(e,t,"name",c.name,c,null),at(e,t,"formEncType",c.formEncType,c,null),at(e,t,"formMethod",c.formMethod,c,null),at(e,t,"formTarget",c.formTarget,c,null)):(at(e,t,"encType",c.encType,c,null),at(e,t,"method",c.method,c,null),at(e,t,"target",c.target,c,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(a);break}r=si(""+r),e.setAttribute(a,r);break;case"onClick":r!=null&&(e.onclick=da);break;case"onScroll":r!=null&&Ye("scroll",e);break;case"onScrollEnd":r!=null&&Ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(a=r.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}a=si(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""+r):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":r===!0?e.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(a,r):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(a,r):e.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(a):e.setAttribute(a,r);break;case"popover":Ye("beforetoggle",e),Ye("toggle",e),ri(e,"popover",r);break;case"xlinkActuate":fa(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":fa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":fa(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":fa(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":fa(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":fa(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":fa(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":fa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":fa(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":ri(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=b1.get(a)||a,ri(e,a,r))}}function of(e,t,a,r,c,f){switch(a){case"style":zm(e,r,f);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(i(61));if(a=r.__html,a!=null){if(c.children!=null)throw Error(i(60));e.innerHTML=a}}break;case"children":typeof r=="string"?er(e,r):(typeof r=="number"||typeof r=="bigint")&&er(e,""+r);break;case"onScroll":r!=null&&Ye("scroll",e);break;case"onScrollEnd":r!=null&&Ye("scrollend",e);break;case"onClick":r!=null&&(e.onclick=da);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Em.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),f=e[rt]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(t,f,c),typeof r=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,r,c);break e}a in e?e[a]=r:r===!0?e.setAttribute(a,""):ri(e,a,r)}}}function Pt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",e),Ye("load",e);var r=!1,c=!1,f;for(f in a)if(a.hasOwnProperty(f)){var y=a[f];if(y!=null)switch(f){case"src":r=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:at(e,t,f,y,a,null)}}c&&at(e,t,"srcSet",a.srcSet,a,null),r&&at(e,t,"src",a.src,a,null);return;case"input":Ye("invalid",e);var w=f=y=c=null,O=null,K=null;for(r in a)if(a.hasOwnProperty(r)){var oe=a[r];if(oe!=null)switch(r){case"name":c=oe;break;case"type":y=oe;break;case"checked":O=oe;break;case"defaultChecked":K=oe;break;case"value":f=oe;break;case"defaultValue":w=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(i(137,t));break;default:at(e,t,r,oe,a,null)}}_m(e,f,w,O,K,y,c,!1);return;case"select":Ye("invalid",e),r=y=f=null;for(c in a)if(a.hasOwnProperty(c)&&(w=a[c],w!=null))switch(c){case"value":f=w;break;case"defaultValue":y=w;break;case"multiple":r=w;default:at(e,t,c,w,a,null)}t=f,a=y,e.multiple=!!r,t!=null?Wl(e,!!r,t,!1):a!=null&&Wl(e,!!r,a,!0);return;case"textarea":Ye("invalid",e),f=c=r=null;for(y in a)if(a.hasOwnProperty(y)&&(w=a[y],w!=null))switch(y){case"value":r=w;break;case"defaultValue":c=w;break;case"children":f=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(i(91));break;default:at(e,t,y,w,a,null)}Nm(e,r,c,f);return;case"option":for(O in a)if(a.hasOwnProperty(O)&&(r=a[O],r!=null))switch(O){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:at(e,t,O,r,a,null)}return;case"dialog":Ye("beforetoggle",e),Ye("toggle",e),Ye("cancel",e),Ye("close",e);break;case"iframe":case"object":Ye("load",e);break;case"video":case"audio":for(r=0;r<zo.length;r++)Ye(zo[r],e);break;case"image":Ye("error",e),Ye("load",e);break;case"details":Ye("toggle",e);break;case"embed":case"source":case"link":Ye("error",e),Ye("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(K in a)if(a.hasOwnProperty(K)&&(r=a[K],r!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,t));default:at(e,t,K,r,a,null)}return;default:if(xc(t)){for(oe in a)a.hasOwnProperty(oe)&&(r=a[oe],r!==void 0&&of(e,t,oe,r,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(r=a[w],r!=null&&at(e,t,w,r,a,null))}function $S(e,t,a,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,f=null,y=null,w=null,O=null,K=null,oe=null;for(W in a){var fe=a[W];if(a.hasOwnProperty(W)&&fe!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":O=fe;default:r.hasOwnProperty(W)||at(e,t,W,null,r,fe)}}for(var Q in r){var W=r[Q];if(fe=a[Q],r.hasOwnProperty(Q)&&(W!=null||fe!=null))switch(Q){case"type":f=W;break;case"name":c=W;break;case"checked":K=W;break;case"defaultChecked":oe=W;break;case"value":y=W;break;case"defaultValue":w=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(i(137,t));break;default:W!==fe&&at(e,t,Q,W,r,fe)}}vc(e,y,w,O,K,oe,f,c);return;case"select":W=y=w=Q=null;for(f in a)if(O=a[f],a.hasOwnProperty(f)&&O!=null)switch(f){case"value":break;case"multiple":W=O;default:r.hasOwnProperty(f)||at(e,t,f,null,r,O)}for(c in r)if(f=r[c],O=a[c],r.hasOwnProperty(c)&&(f!=null||O!=null))switch(c){case"value":Q=f;break;case"defaultValue":w=f;break;case"multiple":y=f;default:f!==O&&at(e,t,c,f,r,O)}t=w,a=y,r=W,Q!=null?Wl(e,!!a,Q,!1):!!r!=!!a&&(t!=null?Wl(e,!!a,t,!0):Wl(e,!!a,a?[]:"",!1));return;case"textarea":W=Q=null;for(w in a)if(c=a[w],a.hasOwnProperty(w)&&c!=null&&!r.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:at(e,t,w,null,r,c)}for(y in r)if(c=r[y],f=a[y],r.hasOwnProperty(y)&&(c!=null||f!=null))switch(y){case"value":Q=c;break;case"defaultValue":W=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(i(91));break;default:c!==f&&at(e,t,y,c,r,f)}Rm(e,Q,W);return;case"option":for(var ge in a)if(Q=a[ge],a.hasOwnProperty(ge)&&Q!=null&&!r.hasOwnProperty(ge))switch(ge){case"selected":e.selected=!1;break;default:at(e,t,ge,null,r,Q)}for(O in r)if(Q=r[O],W=a[O],r.hasOwnProperty(O)&&Q!==W&&(Q!=null||W!=null))switch(O){case"selected":e.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:at(e,t,O,Q,r,W)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Re in a)Q=a[Re],a.hasOwnProperty(Re)&&Q!=null&&!r.hasOwnProperty(Re)&&at(e,t,Re,null,r,Q);for(K in r)if(Q=r[K],W=a[K],r.hasOwnProperty(K)&&Q!==W&&(Q!=null||W!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(i(137,t));break;default:at(e,t,K,Q,r,W)}return;default:if(xc(t)){for(var lt in a)Q=a[lt],a.hasOwnProperty(lt)&&Q!==void 0&&!r.hasOwnProperty(lt)&&of(e,t,lt,void 0,r,Q);for(oe in r)Q=r[oe],W=a[oe],!r.hasOwnProperty(oe)||Q===W||Q===void 0&&W===void 0||of(e,t,oe,Q,r,W);return}}for(var U in a)Q=a[U],a.hasOwnProperty(U)&&Q!=null&&!r.hasOwnProperty(U)&&at(e,t,U,null,r,Q);for(fe in r)Q=r[fe],W=a[fe],!r.hasOwnProperty(fe)||Q===W||Q==null&&W==null||at(e,t,fe,Q,r,W)}function Dg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function XS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var c=a[r],f=c.transferSize,y=c.initiatorType,w=c.duration;if(f&&w&&Dg(y)){for(y=0,w=c.responseEnd,r+=1;r<a.length;r++){var O=a[r],K=O.startTime;if(K>w)break;var oe=O.transferSize,fe=O.initiatorType;oe&&Dg(fe)&&(O=O.responseEnd,y+=oe*(O<w?1:(w-K)/(O-K)))}if(--r,t+=8*(f+y)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var sf=null,cf=null;function as(e){return e.nodeType===9?e:e.ownerDocument}function jg(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 kg(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 uf(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 ff=null;function KS(){var e=window.event;return e&&e.type==="popstate"?e===ff?!1:(ff=e,!0):(ff=null,!1)}var Lg=typeof setTimeout=="function"?setTimeout:void 0,FS=typeof clearTimeout=="function"?clearTimeout:void 0,Hg=typeof Promise=="function"?Promise:void 0,QS=typeof queueMicrotask=="function"?queueMicrotask:typeof Hg<"u"?function(e){return Hg.resolve(null).then(e).catch(ZS)}:Lg;function ZS(e){setTimeout(function(){throw e})}function el(e){return e==="head"}function Bg(e,t){var a=t,r=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(r===0){e.removeChild(c),Or(t);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")jo(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,jo(a);for(var f=a.firstChild;f;){var y=f.nextSibling,w=f.nodeName;f[pt]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=y}}else a==="body"&&jo(e.ownerDocument.body);a=c}while(a);Or(t)}function Ug(e,t){var a=e;e=0;do{var r=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=r}while(a)}function df(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":df(a),In(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function JS(e,t,a,r){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[pt])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!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=kn(e.nextSibling),e===null)break}return null}function WS(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=kn(e.nextSibling),e===null))return null;return e}function Ig(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=kn(e.nextSibling),e===null))return null;return e}function mf(e){return e.data==="$?"||e.data==="$~"}function hf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ew(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var r=function(){t(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function kn(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 pf=null;function Gg(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return kn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Yg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Vg(e,t,a){switch(t=as(a),e){case"html":if(e=t.documentElement,!e)throw Error(i(452));return e;case"head":if(e=t.head,!e)throw Error(i(453));return e;case"body":if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function jo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);In(e)}var Ln=new Map,qg=new Set;function ls(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _a=j.d;j.d={f:tw,r:nw,D:aw,C:lw,L:rw,m:ow,X:sw,S:iw,M:cw};function tw(){var e=_a.f(),t=Fi();return e||t}function nw(e){var t=La(e);t!==null&&t.tag===5&&t.type==="form"?ip(t):_a.r(e)}var _r=typeof document>"u"?null:document;function Pg(e,t,a){var r=_r;if(r&&typeof t=="string"&&t){var c=_n(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),qg.has(c)||(qg.add(c),e={rel:e,crossOrigin:a,href:t},r.querySelector(c)===null&&(t=r.createElement("link"),Pt(t,"link",e),gt(t),r.head.appendChild(t)))}}function aw(e){_a.D(e),Pg("dns-prefetch",e,null)}function lw(e,t){_a.C(e,t),Pg("preconnect",e,t)}function rw(e,t,a){_a.L(e,t,a);var r=_r;if(r&&e&&t){var c='link[rel="preload"][as="'+_n(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+_n(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+_n(a.imageSizes)+'"]')):c+='[href="'+_n(e)+'"]';var f=c;switch(t){case"style":f=Rr(e);break;case"script":f=Nr(e)}Ln.has(f)||(e=p({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Ln.set(f,e),r.querySelector(c)!==null||t==="style"&&r.querySelector(ko(f))||t==="script"&&r.querySelector(Lo(f))||(t=r.createElement("link"),Pt(t,"link",e),gt(t),r.head.appendChild(t)))}}function ow(e,t){_a.m(e,t);var a=_r;if(a&&e){var r=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+_n(r)+'"][href="'+_n(e)+'"]',f=c;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Nr(e)}if(!Ln.has(f)&&(e=p({rel:"modulepreload",href:e},t),Ln.set(f,e),a.querySelector(c)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Lo(f)))return}r=a.createElement("link"),Pt(r,"link",e),gt(r),a.head.appendChild(r)}}}function iw(e,t,a){_a.S(e,t,a);var r=_r;if(r&&e){var c=Gn(r).hoistableStyles,f=Rr(e);t=t||"default";var y=c.get(f);if(!y){var w={loading:0,preload:null};if(y=r.querySelector(ko(f)))w.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Ln.get(f))&&gf(e,a);var O=y=r.createElement("link");gt(O),Pt(O,"link",e),O._p=new Promise(function(K,oe){O.onload=K,O.onerror=oe}),O.addEventListener("load",function(){w.loading|=1}),O.addEventListener("error",function(){w.loading|=2}),w.loading|=4,rs(y,t,r)}y={type:"stylesheet",instance:y,count:1,state:w},c.set(f,y)}}}function sw(e,t){_a.X(e,t);var a=_r;if(a&&e){var r=Gn(a).hoistableScripts,c=Nr(e),f=r.get(c);f||(f=a.querySelector(Lo(c)),f||(e=p({src:e,async:!0},t),(t=Ln.get(c))&&yf(e,t),f=a.createElement("script"),gt(f),Pt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(c,f))}}function cw(e,t){_a.M(e,t);var a=_r;if(a&&e){var r=Gn(a).hoistableScripts,c=Nr(e),f=r.get(c);f||(f=a.querySelector(Lo(c)),f||(e=p({src:e,async:!0,type:"module"},t),(t=Ln.get(c))&&yf(e,t),f=a.createElement("script"),gt(f),Pt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(c,f))}}function $g(e,t,a,r){var c=(c=ie.current)?ls(c):null;if(!c)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Rr(a.href),a=Gn(c).hoistableStyles,r=a.get(t),r||(r={type:"style",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Rr(a.href);var f=Gn(c).hoistableStyles,y=f.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,y),(f=c.querySelector(ko(e)))&&!f._p&&(y.instance=f,y.state.loading=5),Ln.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ln.set(e,a),f||uw(c,e,a,y.state))),t&&r===null)throw Error(i(528,""));return y}if(t&&r!==null)throw Error(i(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Nr(a),a=Gn(c).hoistableScripts,r=a.get(t),r||(r={type:"script",instance:null,count:0,state:null},a.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Rr(e){return'href="'+_n(e)+'"'}function ko(e){return'link[rel="stylesheet"]['+e+"]"}function Xg(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function uw(e,t,a,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Pt(t,"link",a),gt(t),e.head.appendChild(t))}function Nr(e){return'[src="'+_n(e)+'"]'}function Lo(e){return"script[async]"+e}function Kg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+_n(a.href)+'"]');if(r)return t.instance=r,gt(r),r;var c=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),gt(r),Pt(r,"style",c),rs(r,a.precedence,e),t.instance=r;case"stylesheet":c=Rr(a.href);var f=e.querySelector(ko(c));if(f)return t.state.loading|=4,t.instance=f,gt(f),f;r=Xg(a),(c=Ln.get(c))&&gf(r,c),f=(e.ownerDocument||e).createElement("link"),gt(f);var y=f;return y._p=new Promise(function(w,O){y.onload=w,y.onerror=O}),Pt(f,"link",r),t.state.loading|=4,rs(f,a.precedence,e),t.instance=f;case"script":return f=Nr(a.src),(c=e.querySelector(Lo(f)))?(t.instance=c,gt(c),c):(r=a,(c=Ln.get(f))&&(r=p({},a),yf(r,c)),e=e.ownerDocument||e,c=e.createElement("script"),gt(c),Pt(c,"link",r),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(i(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,rs(r,a.precedence,e));return t.instance}function rs(e,t,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=r.length?r[r.length-1]:null,f=c,y=0;y<r.length;y++){var w=r[y];if(w.dataset.precedence===t)f=w;else if(f!==c)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function gf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var os=null;function Fg(e,t,a){if(os===null){var r=new Map,c=os=new Map;c.set(a,r)}else c=os,r=c.get(a),r||(r=new Map,c.set(a,r));if(r.has(e))return r;for(r.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var f=a[c];if(!(f[pt]||f[He]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var y=f.getAttribute(t)||"";y=e+y;var w=r.get(y);w?w.push(f):r.set(y,[f])}}return r}function Qg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function fw(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Zg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function dw(e,t,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=Rr(r.href),f=t.querySelector(ko(c));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=is.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=f,gt(f);return}f=t.ownerDocument||t,r=Xg(r),(c=Ln.get(c))&&gf(r,c),f=f.createElement("link"),gt(f);var y=f;y._p=new Promise(function(w,O){y.onload=w,y.onerror=O}),Pt(f,"link",r),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=is.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var vf=0;function mw(e,t){return e.stylesheets&&e.count===0&&cs(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var r=setTimeout(function(){if(e.stylesheets&&cs(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&vf===0&&(vf=62500*XS());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&cs(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>vf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(c)}}:null}function is(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ss=null;function cs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ss=new Map,t.forEach(hw,e),ss=null,is.call(e))}function hw(e,t){if(!(t.state.loading&4)){var a=ss.get(e);if(a)var r=a.get(null);else{a=new Map,ss.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<c.length;f++){var y=c[f];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),r=y)}r&&a.set(null,r)}c=t.instance,y=c.getAttribute("data-precedence"),f=a.get(y)||r,f===r&&a.set(null,c),a.set(y,c),this.count++,r=is.bind(this),c.addEventListener("load",r),c.addEventListener("error",r),f?f.parentNode.insertBefore(c,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Ho={$$typeof:D,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function pw(e,t,a,r,c,f,y,w,O){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=Qn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qn(0),this.hiddenUpdates=Qn(null),this.identifierPrefix=r,this.onUncaughtError=c,this.onCaughtError=f,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function Jg(e,t,a,r,c,f,y,w,O,K,oe,fe){return e=new pw(e,t,a,y,O,K,oe,fe,w),t=1,f===!0&&(t|=24),f=hn(3,null,null,t),e.current=f,f.stateNode=e,t=Qc(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:r,isDehydrated:a,cache:t},eu(f),e}function Wg(e){return e?(e=ir,e):ir}function ey(e,t,a,r,c,f){c=Wg(c),r.context===null?r.context=c:r.pendingContext=c,r=Va(t),r.payload={element:a},f=f===void 0?null:f,f!==null&&(r.callback=f),a=qa(e,r,t),a!==null&&(ln(a,e,t),po(a,e,t))}function ty(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function bf(e,t){ty(e,t),(e=e.alternate)&&ty(e,t)}function ny(e){if(e.tag===13||e.tag===31){var t=Ml(e,67108864);t!==null&&ln(t,e,67108864),bf(e,67108864)}}function ay(e){if(e.tag===13||e.tag===31){var t=bn();t=Ee(t);var a=Ml(e,t);a!==null&&ln(a,e,t),bf(e,t)}}var us=!0;function gw(e,t,a,r){var c=E.T;E.T=null;var f=j.p;try{j.p=2,xf(e,t,a,r)}finally{j.p=f,E.T=c}}function yw(e,t,a,r){var c=E.T;E.T=null;var f=j.p;try{j.p=8,xf(e,t,a,r)}finally{j.p=f,E.T=c}}function xf(e,t,a,r){if(us){var c=Sf(r);if(c===null)rf(e,t,r,fs,a),ry(e,r);else if(bw(c,e,t,a,r))r.stopPropagation();else if(ry(e,r),t&4&&-1<vw.indexOf(e)){for(;c!==null;){var f=La(c);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=Mn(f.pendingLanes);if(y!==0){var w=f;for(w.pendingLanes|=2,w.entangledLanes|=2;y;){var O=1<<31-Ct(y);w.entanglements[1]|=O,y&=~O}ta(f),(Ze&6)===0&&(Xi=Ot()+500,Oo(0))}}break;case 31:case 13:w=Ml(f,2),w!==null&&ln(w,f,2),Fi(),bf(f,2)}if(f=Sf(r),f===null&&rf(e,t,r,fs,a),f===c)break;c=f}c!==null&&r.stopPropagation()}else rf(e,t,r,null,a)}}function Sf(e){return e=wc(e),wf(e)}var fs=null;function wf(e){if(fs=null,e=dn(e),e!==null){var t=u(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=d(t),e!==null)return e;e=null}else if(a===31){if(e=m(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fs=e,null}function ly(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(xl()){case Et:return 2;case Tt:return 8;case Un:case Fn:return 32;case Jt:return 268435456;default:return 32}default:return 32}}var Ef=!1,tl=null,nl=null,al=null,Bo=new Map,Uo=new Map,ll=[],vw="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 ry(e,t){switch(e){case"focusin":case"focusout":tl=null;break;case"dragenter":case"dragleave":nl=null;break;case"mouseover":case"mouseout":al=null;break;case"pointerover":case"pointerout":Bo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uo.delete(t.pointerId)}}function Io(e,t,a,r,c,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:a,eventSystemFlags:r,nativeEvent:f,targetContainers:[c]},t!==null&&(t=La(t),t!==null&&ny(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function bw(e,t,a,r,c){switch(t){case"focusin":return tl=Io(tl,e,t,a,r,c),!0;case"dragenter":return nl=Io(nl,e,t,a,r,c),!0;case"mouseover":return al=Io(al,e,t,a,r,c),!0;case"pointerover":var f=c.pointerId;return Bo.set(f,Io(Bo.get(f)||null,e,t,a,r,c)),!0;case"gotpointercapture":return f=c.pointerId,Uo.set(f,Io(Uo.get(f)||null,e,t,a,r,c)),!0}return!1}function oy(e){var t=dn(e.target);if(t!==null){var a=u(t);if(a!==null){if(t=a.tag,t===13){if(t=d(a),t!==null){e.blockedOn=t,ut(e.priority,function(){ay(a)});return}}else if(t===31){if(t=m(a),t!==null){e.blockedOn=t,ut(e.priority,function(){ay(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ds(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=Sf(e.nativeEvent);if(a===null){a=e.nativeEvent;var r=new a.constructor(a.type,a);Sc=r,a.target.dispatchEvent(r),Sc=null}else return t=La(a),t!==null&&ny(t),e.blockedOn=a,!1;t.shift()}return!0}function iy(e,t,a){ds(e)&&a.delete(t)}function xw(){Ef=!1,tl!==null&&ds(tl)&&(tl=null),nl!==null&&ds(nl)&&(nl=null),al!==null&&ds(al)&&(al=null),Bo.forEach(iy),Uo.forEach(iy)}function ms(e,t){e.blockedOn===t&&(e.blockedOn=null,Ef||(Ef=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,xw)))}var hs=null;function sy(e){hs!==e&&(hs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){hs===e&&(hs=null);for(var t=0;t<e.length;t+=3){var a=e[t],r=e[t+1],c=e[t+2];if(typeof r!="function"){if(wf(r||a)===null)continue;break}var f=La(a);f!==null&&(e.splice(t,3),t-=3,xu(f,{pending:!0,data:c,method:a.method,action:r},r,c))}}))}function Or(e){function t(O){return ms(O,e)}tl!==null&&ms(tl,e),nl!==null&&ms(nl,e),al!==null&&ms(al,e),Bo.forEach(t),Uo.forEach(t);for(var a=0;a<ll.length;a++){var r=ll[a];r.blockedOn===e&&(r.blockedOn=null)}for(;0<ll.length&&(a=ll[0],a.blockedOn===null);)oy(a),a.blockedOn===null&&ll.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var c=a[r],f=a[r+1],y=c[rt]||null;if(typeof f=="function")y||sy(a);else if(y){var w=null;if(f&&f.hasAttribute("formAction")){if(c=f,y=f[rt]||null)w=y.formAction;else if(wf(c)!==null)continue}else w=y.action;typeof w=="function"?a[r+1]=w:(a.splice(r,3),r-=3),sy(a)}}}function cy(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(y){return c=y})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),r||setTimeout(a,20)}function a(){if(!r&&!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 r=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Tf(e){this._internalRoot=e}ps.prototype.render=Tf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var a=t.current,r=bn();ey(a,r,e,t,null,null)},ps.prototype.unmount=Tf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ey(e.current,2,null,e,null,null),Fi(),t[Qe]=null}};function ps(e){this._internalRoot=e}ps.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ie();e={blockedOn:null,target:e,priority:t};for(var a=0;a<ll.length&&t!==0&&t<ll[a].priority;a++);ll.splice(a,0,e),a===0&&oy(e)}};var uy=l.version;if(uy!=="19.2.5")throw Error(i(527,uy,"19.2.5"));j.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var Sw={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gs.isDisabled&&gs.supportsFiber)try{cn=gs.inject(Sw),Gt=gs}catch{}}return Yo.createRoot=function(e,t){if(!s(e))throw Error(i(299));var a=!1,r="",c=yp,f=vp,y=bp;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=Jg(e,1,!1,null,null,a,r,null,c,f,y,cy),e[Qe]=t.current,lf(e),new Tf(t)},Yo.hydrateRoot=function(e,t,a){if(!s(e))throw Error(i(299));var r=!1,c="",f=yp,y=vp,w=bp,O=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(O=a.formState)),t=Jg(e,1,!0,t,a??null,r,c,O,f,y,w,cy),t.context=Wg(null),a=t.current,r=bn(),r=Ee(r),c=Va(r),c.callback=null,qa(a,c,r),a=r,t.current.lanes=a,ct(t,a),ta(t),e[Qe]=t.current,lf(e),new ps(t)},Yo.version="19.2.5",Yo}var xy;function Ow(){if(xy)return Af.exports;xy=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Af.exports=Nw(),Af.exports}var zw=Ow();const Dw=Hd(zw);var Zo=K0();const F0=Hd(Zo);function jw(n){if(typeof document>"u")return;let l=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",l.appendChild(o),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n))}const kw=n=>{switch(n){case"success":return Bw;case"info":return Iw;case"warning":return Uw;case"error":return Gw;default:return null}},Lw=Array(12).fill(0),Hw=({visible:n,className:l})=>pe.createElement("div",{className:["sonner-loading-wrapper",l].filter(Boolean).join(" "),"data-visible":n},pe.createElement("div",{className:"sonner-spinner"},Lw.map((o,i)=>pe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${i}`})))),Bw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Uw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),Iw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Gw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},pe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Yw=pe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},pe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),pe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Vw=()=>{const[n,l]=pe.useState(document.hidden);return pe.useEffect(()=>{const o=()=>{l(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),n};let ld=1;class qw{constructor(){this.subscribe=l=>(this.subscribers.push(l),()=>{const o=this.subscribers.indexOf(l);this.subscribers.splice(o,1)}),this.publish=l=>{this.subscribers.forEach(o=>o(l))},this.addToast=l=>{this.publish(l),this.toasts=[...this.toasts,l]},this.create=l=>{var o;const{message:i,...s}=l,u=typeof(l==null?void 0:l.id)=="number"||((o=l.id)==null?void 0:o.length)>0?l.id:ld++,d=this.toasts.find(h=>h.id===u),m=l.dismissible===void 0?!0:l.dismissible;return this.dismissedToasts.has(u)&&this.dismissedToasts.delete(u),d?this.toasts=this.toasts.map(h=>h.id===u?(this.publish({...h,...l,id:u,title:i}),{...h,...l,id:u,dismissible:m,title:i}):h):this.addToast({title:i,...s,dismissible:m,id:u}),u},this.dismiss=l=>(l?(this.dismissedToasts.add(l),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:l,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(i=>i({id:o.id,dismiss:!0}))}),l),this.message=(l,o)=>this.create({...o,message:l}),this.error=(l,o)=>this.create({...o,message:l,type:"error"}),this.success=(l,o)=>this.create({...o,type:"success",message:l}),this.info=(l,o)=>this.create({...o,type:"info",message:l}),this.warning=(l,o)=>this.create({...o,type:"warning",message:l}),this.loading=(l,o)=>this.create({...o,type:"loading",message:l}),this.promise=(l,o)=>{if(!o)return;let i;o.loading!==void 0&&(i=this.create({...o,promise:l,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const s=Promise.resolve(l instanceof Function?l():l);let u=i!==void 0,d;const m=s.then(async g=>{if(d=["resolve",g],pe.isValidElement(g))u=!1,this.create({id:i,type:"default",message:g});else if($w(g)&&!g.ok){u=!1;const p=typeof o.error=="function"?await o.error(`HTTP error! status: ${g.status}`):o.error,S=typeof o.description=="function"?await o.description(`HTTP error! status: ${g.status}`):o.description,C=typeof p=="object"&&!pe.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:S,...C})}else if(g instanceof Error){u=!1;const p=typeof o.error=="function"?await o.error(g):o.error,S=typeof o.description=="function"?await o.description(g):o.description,C=typeof p=="object"&&!pe.isValidElement(p)?p:{message:p};this.create({id:i,type:"error",description:S,...C})}else if(o.success!==void 0){u=!1;const p=typeof o.success=="function"?await o.success(g):o.success,S=typeof o.description=="function"?await o.description(g):o.description,C=typeof p=="object"&&!pe.isValidElement(p)?p:{message:p};this.create({id:i,type:"success",description:S,...C})}}).catch(async g=>{if(d=["reject",g],o.error!==void 0){u=!1;const x=typeof o.error=="function"?await o.error(g):o.error,p=typeof o.description=="function"?await o.description(g):o.description,T=typeof x=="object"&&!pe.isValidElement(x)?x:{message:x};this.create({id:i,type:"error",description:p,...T})}}).finally(()=>{u&&(this.dismiss(i),i=void 0),o.finally==null||o.finally.call(o)}),h=()=>new Promise((g,x)=>m.then(()=>d[0]==="reject"?x(d[1]):g(d[1])).catch(x));return typeof i!="string"&&typeof i!="number"?{unwrap:h}:Object.assign(i,{unwrap:h})},this.custom=(l,o)=>{const i=(o==null?void 0:o.id)||ld++;return this.create({jsx:l(i),id:i,...o}),i},this.getActiveToasts=()=>this.toasts.filter(l=>!this.dismissedToasts.has(l.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const rn=new qw,Pw=(n,l)=>{const o=(l==null?void 0:l.id)||ld++;return rn.addToast({title:n,...l,id:o}),o},$w=n=>n&&typeof n=="object"&&"ok"in n&&typeof n.ok=="boolean"&&"status"in n&&typeof n.status=="number",Xw=Pw,Kw=()=>rn.toasts,Fw=()=>rn.getActiveToasts(),ul=Object.assign(Xw,{success:rn.success,info:rn.info,warning:rn.warning,error:rn.error,custom:rn.custom,message:rn.message,promise:rn.promise,dismiss:rn.dismiss,loading:rn.loading},{getHistory:Kw,getToasts:Fw});jw("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ys(n){return n.label!==void 0}const Qw=3,Zw="24px",Jw="16px",Sy=4e3,Ww=356,e2=14,t2=45,n2=200;function na(...n){return n.filter(Boolean).join(" ")}function a2(n){const[l,o]=n.split("-"),i=[];return l&&i.push(l),o&&i.push(o),i}const l2=n=>{var l,o,i,s,u,d,m,h,g;const{invert:x,toast:p,unstyled:S,interacting:T,setHeights:C,visibleToasts:M,heights:A,index:_,toasts:N,expanded:D,removeToast:V,defaultRichColors:ae,closeButton:I,style:$,cancelButtonStyle:z,actionButtonStyle:F,className:ne="",descriptionClassName:re="",duration:q,position:H,gap:Y,expandByDefault:ee,classNames:E,icons:j,closeButtonAriaLabel:B="Close toast"}=n,[P,L]=pe.useState(null),[R,G]=pe.useState(null),[J,le]=pe.useState(!1),[se,ie]=pe.useState(!1),[de,Z]=pe.useState(!1),[ce,ve]=pe.useState(!1),[we,Te]=pe.useState(!1),[Ue,Le]=pe.useState(0),[Nt,It]=pe.useState(0),kt=pe.useRef(p.duration||q||Sy),Tn=pe.useRef(null),Ae=pe.useRef(null),_e=_===0,sn=_+1<=M,ht=p.type,Lt=p.dismissible!==!1,Ot=p.className||"",xl=p.descriptionClassName||"",Et=pe.useMemo(()=>A.findIndex(Ne=>Ne.toastId===p.id)||0,[A,p.id]),Tt=pe.useMemo(()=>{var Ne;return(Ne=p.closeButton)!=null?Ne:I},[p.closeButton,I]),Un=pe.useMemo(()=>p.duration||q||Sy,[p.duration,q]),Fn=pe.useRef(0),Jt=pe.useRef(0),sa=pe.useRef(0),Ht=pe.useRef(null),[cn,Gt]=H.split("-"),un=pe.useMemo(()=>A.reduce((Ne,it,xt)=>xt>=Et?Ne:Ne+it.height,0),[A,Et]),Ct=Vw(),Jr=p.invert||x,Sl=ht==="loading";Jt.current=pe.useMemo(()=>Et*Y+un,[Et,un]),pe.useEffect(()=>{kt.current=Un},[Un]),pe.useEffect(()=>{le(!0)},[]),pe.useEffect(()=>{const Ne=Ae.current;if(Ne){const it=Ne.getBoundingClientRect().height;return It(it),C(xt=>[{toastId:p.id,height:it,position:p.position},...xt]),()=>C(xt=>xt.filter(Bt=>Bt.toastId!==p.id))}},[C,p.id]),pe.useLayoutEffect(()=>{if(!J)return;const Ne=Ae.current,it=Ne.style.height;Ne.style.height="auto";const xt=Ne.getBoundingClientRect().height;Ne.style.height=it,It(xt),C(Bt=>Bt.find(ct=>ct.toastId===p.id)?Bt.map(ct=>ct.toastId===p.id?{...ct,height:xt}:ct):[{toastId:p.id,height:xt,position:p.position},...Bt])},[J,p.title,p.description,C,p.id,p.jsx,p.action,p.cancel]);const Cn=pe.useCallback(()=>{ie(!0),Le(Jt.current),C(Ne=>Ne.filter(it=>it.toastId!==p.id)),setTimeout(()=>{V(p)},n2)},[p,V,C,Jt]);pe.useEffect(()=>{if(p.promise&&ht==="loading"||p.duration===1/0||p.type==="loading")return;let Ne;return D||T||Ct?(()=>{if(sa.current<Fn.current){const Bt=new Date().getTime()-Fn.current;kt.current=kt.current-Bt}sa.current=new Date().getTime()})():(()=>{kt.current!==1/0&&(Fn.current=new Date().getTime(),Ne=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Cn()},kt.current))})(),()=>clearTimeout(Ne)},[D,T,p,ht,Ct,Cn]),pe.useEffect(()=>{p.delete&&(Cn(),p.onDismiss==null||p.onDismiss.call(p,p))},[Cn,p.delete]);function ja(){var Ne;if(j!=null&&j.loading){var it;return pe.createElement("div",{className:na(E==null?void 0:E.loader,p==null||(it=p.classNames)==null?void 0:it.loader,"sonner-loader"),"data-visible":ht==="loading"},j.loading)}return pe.createElement(Hw,{className:na(E==null?void 0:E.loader,p==null||(Ne=p.classNames)==null?void 0:Ne.loader),visible:ht==="loading"})}const ka=p.icon||(j==null?void 0:j[ht])||kw(ht);var ca,Mn;return pe.createElement("li",{tabIndex:0,ref:Ae,className:na(ne,Ot,E==null?void 0:E.toast,p==null||(l=p.classNames)==null?void 0:l.toast,E==null?void 0:E.default,E==null?void 0:E[ht],p==null||(o=p.classNames)==null?void 0:o[ht]),"data-sonner-toast":"","data-rich-colors":(ca=p.richColors)!=null?ca:ae,"data-styled":!(p.jsx||p.unstyled||S),"data-mounted":J,"data-promise":!!p.promise,"data-swiped":we,"data-removed":se,"data-visible":sn,"data-y-position":cn,"data-x-position":Gt,"data-index":_,"data-front":_e,"data-swiping":de,"data-dismissible":Lt,"data-type":ht,"data-invert":Jr,"data-swipe-out":ce,"data-swipe-direction":R,"data-expanded":!!(D||ee&&J),"data-testid":p.testId,style:{"--index":_,"--toasts-before":_,"--z-index":N.length-_,"--offset":`${se?Ue:Jt.current}px`,"--initial-height":ee?"auto":`${Nt}px`,...$,...p.style},onDragEnd:()=>{Z(!1),L(null),Ht.current=null},onPointerDown:Ne=>{Ne.button!==2&&(Sl||!Lt||(Tn.current=new Date,Le(Jt.current),Ne.target.setPointerCapture(Ne.pointerId),Ne.target.tagName!=="BUTTON"&&(Z(!0),Ht.current={x:Ne.clientX,y:Ne.clientY})))},onPointerUp:()=>{var Ne,it,xt;if(ce||!Lt)return;Ht.current=null;const Bt=Number(((Ne=Ae.current)==null?void 0:Ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Qn=Number(((it=Ae.current)==null?void 0:it.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ct=new Date().getTime()-((xt=Tn.current)==null?void 0:xt.getTime()),$t=P==="x"?Bt:Qn,te=Math.abs($t)/ct;if(Math.abs($t)>=t2||te>.11){Le(Jt.current),p.onDismiss==null||p.onDismiss.call(p,p),G(P==="x"?Bt>0?"right":"left":Qn>0?"down":"up"),Cn(),ve(!0);return}else{var me,he;(me=Ae.current)==null||me.style.setProperty("--swipe-amount-x","0px"),(he=Ae.current)==null||he.style.setProperty("--swipe-amount-y","0px")}Te(!1),Z(!1),L(null)},onPointerMove:Ne=>{var it,xt,Bt;if(!Ht.current||!Lt||((it=window.getSelection())==null?void 0:it.toString().length)>0)return;const ct=Ne.clientY-Ht.current.y,$t=Ne.clientX-Ht.current.x;var te;const me=(te=n.swipeDirections)!=null?te:a2(H);!P&&(Math.abs($t)>1||Math.abs(ct)>1)&&L(Math.abs($t)>Math.abs(ct)?"x":"y");let he={x:0,y:0};const Ee=ze=>1/(1.5+Math.abs(ze)/20);if(P==="y"){if(me.includes("top")||me.includes("bottom"))if(me.includes("top")&&ct<0||me.includes("bottom")&&ct>0)he.y=ct;else{const ze=ct*Ee(ct);he.y=Math.abs(ze)<Math.abs(ct)?ze:ct}}else if(P==="x"&&(me.includes("left")||me.includes("right")))if(me.includes("left")&&$t<0||me.includes("right")&&$t>0)he.x=$t;else{const ze=$t*Ee($t);he.x=Math.abs(ze)<Math.abs($t)?ze:$t}(Math.abs(he.x)>0||Math.abs(he.y)>0)&&Te(!0),(xt=Ae.current)==null||xt.style.setProperty("--swipe-amount-x",`${he.x}px`),(Bt=Ae.current)==null||Bt.style.setProperty("--swipe-amount-y",`${he.y}px`)}},Tt&&!p.jsx&&ht!=="loading"?pe.createElement("button",{"aria-label":B,"data-disabled":Sl,"data-close-button":!0,onClick:Sl||!Lt?()=>{}:()=>{Cn(),p.onDismiss==null||p.onDismiss.call(p,p)},className:na(E==null?void 0:E.closeButton,p==null||(i=p.classNames)==null?void 0:i.closeButton)},(Mn=j==null?void 0:j.close)!=null?Mn:Yw):null,(ht||p.icon||p.promise)&&p.icon!==null&&((j==null?void 0:j[ht])!==null||p.icon)?pe.createElement("div",{"data-icon":"",className:na(E==null?void 0:E.icon,p==null||(s=p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ja():null,p.type!=="loading"?ka:null):null,pe.createElement("div",{"data-content":"",className:na(E==null?void 0:E.content,p==null||(u=p.classNames)==null?void 0:u.content)},pe.createElement("div",{"data-title":"",className:na(E==null?void 0:E.title,p==null||(d=p.classNames)==null?void 0:d.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?pe.createElement("div",{"data-description":"",className:na(re,xl,E==null?void 0:E.description,p==null||(m=p.classNames)==null?void 0:m.description)},typeof p.description=="function"?p.description():p.description):null),pe.isValidElement(p.cancel)?p.cancel:p.cancel&&ys(p.cancel)?pe.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||z,onClick:Ne=>{ys(p.cancel)&&Lt&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,Ne),Cn())},className:na(E==null?void 0:E.cancelButton,p==null||(h=p.classNames)==null?void 0:h.cancelButton)},p.cancel.label):null,pe.isValidElement(p.action)?p.action:p.action&&ys(p.action)?pe.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||F,onClick:Ne=>{ys(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,Ne),!Ne.defaultPrevented&&Cn())},className:na(E==null?void 0:E.actionButton,p==null||(g=p.classNames)==null?void 0:g.actionButton)},p.action.label):null)};function wy(){if(typeof window>"u"||typeof document>"u")return"ltr";const n=document.documentElement.getAttribute("dir");return n==="auto"||!n?window.getComputedStyle(document.documentElement).direction:n}function r2(n,l){const o={};return[n,l].forEach((i,s)=>{const u=s===1,d=u?"--mobile-offset":"--offset",m=u?Jw:Zw;function h(g){["top","right","bottom","left"].forEach(x=>{o[`${d}-${x}`]=typeof g=="number"?`${g}px`:g})}typeof i=="number"||typeof i=="string"?h(i):typeof i=="object"?["top","right","bottom","left"].forEach(g=>{i[g]===void 0?o[`${d}-${g}`]=m:o[`${d}-${g}`]=typeof i[g]=="number"?`${i[g]}px`:i[g]}):h(m)}),o}const o2=pe.forwardRef(function(l,o){const{id:i,invert:s,position:u="bottom-right",hotkey:d=["altKey","KeyT"],expand:m,closeButton:h,className:g,offset:x,mobileOffset:p,theme:S="light",richColors:T,duration:C,style:M,visibleToasts:A=Qw,toastOptions:_,dir:N=wy(),gap:D=e2,icons:V,containerAriaLabel:ae="Notifications"}=l,[I,$]=pe.useState([]),z=pe.useMemo(()=>i?I.filter(J=>J.toasterId===i):I.filter(J=>!J.toasterId),[I,i]),F=pe.useMemo(()=>Array.from(new Set([u].concat(z.filter(J=>J.position).map(J=>J.position)))),[z,u]),[ne,re]=pe.useState([]),[q,H]=pe.useState(!1),[Y,ee]=pe.useState(!1),[E,j]=pe.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=pe.useRef(null),P=d.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=pe.useRef(null),R=pe.useRef(!1),G=pe.useCallback(J=>{$(le=>{var se;return(se=le.find(ie=>ie.id===J.id))!=null&&se.delete||rn.dismiss(J.id),le.filter(({id:ie})=>ie!==J.id)})},[]);return pe.useEffect(()=>rn.subscribe(J=>{if(J.dismiss){requestAnimationFrame(()=>{$(le=>le.map(se=>se.id===J.id?{...se,delete:!0}:se))});return}setTimeout(()=>{F0.flushSync(()=>{$(le=>{const se=le.findIndex(ie=>ie.id===J.id);return se!==-1?[...le.slice(0,se),{...le[se],...J},...le.slice(se+1)]:[J,...le]})})})}),[I]),pe.useEffect(()=>{if(S!=="system"){j(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?j("dark"):j("light")),typeof window>"u")return;const J=window.matchMedia("(prefers-color-scheme: dark)");try{J.addEventListener("change",({matches:le})=>{j(le?"dark":"light")})}catch{J.addListener(({matches:se})=>{try{j(se?"dark":"light")}catch(ie){console.error(ie)}})}},[S]),pe.useEffect(()=>{I.length<=1&&H(!1)},[I]),pe.useEffect(()=>{const J=le=>{var se;if(d.every(Z=>le[Z]||le.code===Z)){var de;H(!0),(de=B.current)==null||de.focus()}le.code==="Escape"&&(document.activeElement===B.current||(se=B.current)!=null&&se.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",J),()=>document.removeEventListener("keydown",J)},[d]),pe.useEffect(()=>{if(B.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,R.current=!1)}},[B.current]),pe.createElement("section",{ref:o,"aria-label":`${ae} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},F.map((J,le)=>{var se;const[ie,de]=J.split("-");return z.length?pe.createElement("ol",{key:J,dir:N==="auto"?wy():N,tabIndex:-1,ref:B,className:g,"data-sonner-toaster":!0,"data-sonner-theme":E,"data-y-position":ie,"data-x-position":de,style:{"--front-toast-height":`${((se=ne[0])==null?void 0:se.height)||0}px`,"--width":`${Ww}px`,"--gap":`${D}px`,...M,...r2(x,p)},onBlur:Z=>{R.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(R.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||R.current||(R.current=!0,L.current=Z.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{Y||H(!1)},onDragEnd:()=>H(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||ee(!0)},onPointerUp:()=>ee(!1)},z.filter(Z=>!Z.position&&le===0||Z.position===J).map((Z,ce)=>{var ve,we;return pe.createElement(l2,{key:Z.id,icons:V,index:ce,toast:Z,defaultRichColors:T,duration:(ve=_==null?void 0:_.duration)!=null?ve:C,className:_==null?void 0:_.className,descriptionClassName:_==null?void 0:_.descriptionClassName,invert:s,visibleToasts:A,closeButton:(we=_==null?void 0:_.closeButton)!=null?we:h,interacting:Y,position:J,style:_==null?void 0:_.style,unstyled:_==null?void 0:_.unstyled,classNames:_==null?void 0:_.classNames,cancelButtonStyle:_==null?void 0:_.cancelButtonStyle,actionButtonStyle:_==null?void 0:_.actionButtonStyle,closeButtonAriaLabel:_==null?void 0:_.closeButtonAriaLabel,removeToast:G,toasts:z.filter(Te=>Te.position==Z.position),heights:ne.filter(Te=>Te.position==Z.position),setHeights:re,expandByDefault:m,gap:D,expanded:q,swipeDirections:l.swipeDirections})})):null}))}),Se="data-editor-id",Vl="data-slide-root",ql=1920,Pl=1080;function Ud(n){return`[${Se}="${n}"]`}function i2(n){return n.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"slide"}function Q0(n,l){return`${l}-${n+1}`}function Ey(n,l){const o=Number.parseInt(n||"",10);return Number.isFinite(o)&&o>0?o:l}function s2(n){return i2(n)}function Is(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function Z0(n){const l=n.querySelector(`[${Vl}]`);if(l)return l.getAttribute("data-slide-width")||l.setAttribute("data-slide-width",String(ql)),l.getAttribute("data-slide-height")||l.setAttribute("data-slide-height",String(Pl)),l;const o=n.querySelector(".slide-container");return o?(o.setAttribute(Vl,"true"),o.getAttribute("data-slide-width")||o.setAttribute("data-slide-width",String(ql)),o.getAttribute("data-slide-height")||o.setAttribute("data-slide-height",String(Pl)),o):null}function c2(n){return`<!DOCTYPE html>
|
|
50
|
+
${n.documentElement.outerHTML}`}function u2(n){const l=Is(n);if(!l)return n;const o=Z0(l),i=Array.from(l.querySelectorAll("[data-editable]"));return o&&!o.getAttribute(Se)&&o.setAttribute(Se,"slide-root"),i.forEach((s,u)=>{if(!s.getAttribute(Se)){const d=s.getAttribute("data-editable")||"block";s.setAttribute(Se,Q0(u,d))}}),c2(l)}function aa(n,l="slide-1"){var T;if(!Is(n))return{id:l,title:"Untitled Slide",htmlSource:n,rootSelector:`[${Vl}]`,width:ql,height:Pl,elements:[]};const i=u2(n),s=Is(i);if(!s)return{id:l,title:"Untitled Slide",htmlSource:i,rootSelector:`[${Vl}]`,width:ql,height:Pl,elements:[]};const u=Z0(s),d=Array.from(s.querySelectorAll("[data-editable]")),m=u!=null&&u.getAttribute(Se)?`[${Se}="${u.getAttribute(Se)}"]`:`[${Vl}]`,h=Ey((u==null?void 0:u.getAttribute("data-slide-width"))??null,ql),g=Ey((u==null?void 0:u.getAttribute("data-slide-height"))??null,Pl),x=d.map((C,M)=>{const A=C.getAttribute("data-editable")||"block",_=C.getAttribute(Se)||Q0(M,A);return{id:_,selector:Ud(_),type:A==="block"&&C.getAttribute("data-group")==="true"?"group":A,content:C instanceof HTMLImageElement?C.src:C.textContent||"",tagName:C.tagName.toLowerCase()}}),p=s.querySelector("h1, h2, title"),S=((T=p==null?void 0:p.textContent)==null?void 0:T.trim())||`Slide ${l}`;return{id:s2(l),title:S,htmlSource:i,rootSelector:m,width:h,height:g,elements:x}}function $e(n,l){return n.querySelector(Ud(l))}function f2(n,l,o){const i=Is(n.htmlSource);if(!i)return"";const s=$e(i,l);return(s==null?void 0:s.style.getPropertyValue(o).trim())||""}function pl(n){return typeof DOMParser>"u"?null:new DOMParser().parseFromString(n,"text/html")}function Id(n){return`<!DOCTYPE html>
|
|
51
|
+
${n.documentElement.outerHTML}`}function $r(n,l){const o=pl(n);return o?(l(o),Id(o)):n}const Gd=["position","left","top","width","height","transform","transformOrigin","margin","zIndex"];function J0(){return{position:null,left:null,top:null,width:null,height:null,transform:null,transformOrigin:null,margin:null,zIndex:null}}function Xo(n){const l=J0();for(const o of Gd){const i=n.style[o];l[o]=i||null}return l}function rd(n){return{...J0(),...n}}function $n(n){const l=n||"",o=l.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/i),i=l.match(/rotate\(([-\d.]+)deg\)/i);return{translateX:o&&Number.parseFloat(o[1]||"0")||0,translateY:o&&Number.parseFloat(o[2]||"0")||0,rotate:i&&Number.parseFloat(i[1]||"0")||0}}function Of(n){return Math.round(n*100)/100}function Na(n,l,o){const i=[];return(Math.abs(n)>.01||Math.abs(l)>.01)&&i.push(`translate(${Of(n)}px, ${Of(l)}px)`),Math.abs(o)>.01&&i.push(`rotate(${Of(o)}deg)`),i.length?i.join(" "):null}function Br(n,l,o){return{x:o.offsetX+(n.left-l.left)*o.scale,y:o.offsetY+(n.top-l.top)*o.scale,width:n.width*o.scale,height:n.height*o.scale}}function vs(n){const l=Number.parseFloat(n||"");return Number.isFinite(l)?l:0}function Ty(n){const l=$n(n.style.transform);return{x:vs(n.style.left)+l.translateX,y:vs(n.style.top)+l.translateY,width:vs(n.style.width)||ql,height:vs(n.style.height)||Pl}}function Gs(n,l={}){let o=n,i=0,s=0;const u=n.getAttribute(Se)??"",d=l[u]??Ty(n),m=d.width,h=d.height;for(;o;){const g=o.getAttribute(Se)??"",x=l[g]??Ty(o);i+=x.x,s+=x.y;const p=o.parentElement;if(!p||!p.hasAttribute("data-editable"))break;o=p}return{x:i,y:s,width:m,height:h}}function W0(n,l={}){const o=n.parentElement;if(!o||!o.hasAttribute("data-editable"))return{x:0,y:0};const i=Gs(o,l);return{x:i.x,y:i.y}}function od(n,l){n.style.position=n.style.position||"absolute",n.style.left=`${Math.round(l.x*100)/100}px`,n.style.top=`${Math.round(l.y*100)/100}px`,n.style.width=`${Math.round(l.width*100)/100}px`,n.style.height=`${Math.round(l.height*100)/100}px`;const o=$n(n.style.transform),i=Na(0,0,o.rotate);i?n.style.transform=i:n.style.removeProperty("transform")}function Cy(n,l){l&&(l.color&&(n.style.color=l.color),l.fontSize&&(n.style.fontSize=l.fontSize),l.fontWeight&&(n.style.fontWeight=l.fontWeight),l.fontStyle&&(n.style.fontStyle=l.fontStyle),l.lineHeight&&(n.style.lineHeight=l.lineHeight),l.textAlign&&(n.style.textAlign=l.textAlign),l.paddingTop&&(n.style.paddingTop=l.paddingTop),l.paddingRight&&(n.style.paddingRight=l.paddingRight),l.paddingBottom&&(n.style.paddingBottom=l.paddingBottom),l.paddingLeft&&(n.style.paddingLeft=l.paddingLeft),l.listStylePosition&&(n.style.listStylePosition=l.listStylePosition),l.listStyleType&&(n.style.listStyleType=l.listStyleType))}function zf(n){const l=n.parentElement;return l&&(l.hasAttribute(Vl)||l.hasAttribute("data-editable"))?l:null}function id(n){return Array.from(n.children).filter(l=>l instanceof HTMLElement&&l.hasAttribute("data-editable"))}function ev(n){const l=n.tagName.toLowerCase();return l!=="ul"&&l!=="ol"?!1:Array.from(n.children).some(o=>o.tagName.toLowerCase()==="li"&&o.hasAttribute("data-editable"))}function d2(n,l){const o=new Set(Array.from(n.querySelectorAll(`[${Se}]`)).map(d=>d.getAttribute(Se)).filter(d=>!!d));if(!o.has(l))return l;const i=l.match(/^(.*?)(?:-(\d+))?$/),s=(i==null?void 0:i[1])||l;let u=Number.parseInt((i==null?void 0:i[2])||"1",10)+1;for(;o.has(`${s}-${u}`);)u+=1;return`${s}-${u}`}function m2(n,l){return Array.from(n.children).filter(o=>o instanceof HTMLElement?o.hasAttribute("data-editable")?!0:ev(o)?(o.setAttribute("data-editable","block"),o.getAttribute(Se)||o.setAttribute(Se,d2(l,"block-1")),!0):!1:!1)}function h2({html:n,slideId:l,groupElementId:o,elementIds:i,elementRects:s={},timestamp:u=Date.now()}){const d=pl(n);if(!d||!i.length)return null;const m=i.map(I=>$e(d,I)).filter(I=>!!I);if(m.length!==i.length)return null;const g=m.flatMap(I=>I.getAttribute("data-group")==="true"?id(I):[I]).filter((I,$,z)=>z.findIndex(F=>F===I)===$);if(g.length<2)return null;const x=zf(m[0]);if(!x||m.some(I=>zf(I)!==x)||$e(d,o))return null;const p=m.filter(I=>I.getAttribute("data-group")==="true"),S=g.map(I=>Gs(I,s)),T=Math.min(...S.map(I=>I.x)),C=Math.min(...S.map(I=>I.y)),M=Math.max(...S.map(I=>I.x+I.width)),A=Math.max(...S.map(I=>I.y+I.height)),_=W0(m[0],s),N=d.createElement("div");N.setAttribute("data-editable","block"),N.setAttribute("data-group","true"),N.setAttribute(Se,o),od(N,{x:T-_.x,y:C-_.y,width:M-T,height:A-C});const D=Array.from(x.children).flatMap(I=>I instanceof HTMLElement?p.includes(I)?id(I).filter($=>g.includes($)):g.includes(I)?[I]:[]:[]),V=m.find(I=>zf(I)===x)??null;(V==null?void 0:V.parentElement)===x?x.insertBefore(N,V):x.appendChild(N);for(const I of D){const $=Gs(I,s);od(I,{x:$.x-T,y:$.y-C,width:$.width,height:$.height}),N.appendChild(I)}for(const I of p)I.children.length||I.remove();const ae=Id(d);return ae===n?null:{type:"group.create",slideId:l,groupElementId:o,elementIds:D.map(I=>I.getAttribute(Se)).filter(I=>!!I),previousHtmlSource:n,nextHtmlSource:ae,timestamp:u}}function p2({html:n,slideId:l,groupElementId:o,elementRects:i={},elementPresentationStyles:s={},timestamp:u=Date.now()}){const d=pl(n);if(!d)return null;const m=$e(d,o);if(!m||!m.parentElement)return null;const h=m.parentElement,g=W0(m,i),x=m.getAttribute("data-group")==="true",p=x?id(m):m2(m,d);if(!p.length)return null;const S=m.getAttribute(Se),T=x?m:m.nextSibling,C=p.map(A=>A.getAttribute(Se)).filter(A=>!!A);for(const A of p){const _=Gs(A,i);if(od(A,{x:_.x-g.x,y:_.y-g.y,width:_.width,height:_.height}),!x){const N=A.getAttribute(Se)??"";Cy(A,s[N]),ev(A)&&(A.style.margin="0px");for(const D of Array.from(A.querySelectorAll(`[data-editable][${Se}]`))){const V=D.getAttribute(Se)??"";Cy(D,s[V])}}h.insertBefore(A,T)}x&&m.remove();const M=Id(d);return M===n?null:{type:"group.ungroup",slideId:l,groupElementId:o,childElementIds:x||!S?C:[S,...C],previousHtmlSource:n,nextHtmlSource:M,timestamp:u}}function g2(n,l,o){return $r(n,i=>{const s=$e(i,l);s&&(s.textContent=o)})}function y2(n,l,o,i){return $r(n,s=>{var d;const u=$e(s,l);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 v2(n,l,o,i){return $r(n,s=>{const u=$e(s,l);u&&(i.trim().length===0?u.removeAttribute(o):u.setAttribute(o,i))})}function b2(n,l){var o;for(const i of Gd){const s=l[i];if(s===null){n.style[i]="";continue}n.style[i]=s}(o=n.getAttribute("style"))!=null&&o.trim()||n.removeAttribute("style")}function x2(n,l,o){return $r(n,i=>{const s=$e(i,l);s&&b2(s,o)})}function Ys(n,l){const o=pl(n);if(!o)return null;const i=$e(o,l);if(!i||!(i.parentElement instanceof HTMLElement))return null;const s=i.previousElementSibling instanceof HTMLElement?i.previousElementSibling.getAttribute(Se):null,u=i.nextElementSibling instanceof HTMLElement?i.nextElementSibling.getAttribute(Se):null;return{parentElementId:i.parentElement.getAttribute(Se),previousSiblingElementId:s,nextSiblingElementId:u}}function Vs(n,l){var i;const o=pl(n);return o?((i=$e(o,l))==null?void 0:i.outerHTML)??null:null}function tv(n,l){var u;const o=pl(`<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 s=[i,...Array.from(i.querySelectorAll(`[${Se}]`))];for(const d of s){const m=d.getAttribute(Se);m&&l[m]&&d.setAttribute(Se,l[m])}return i.outerHTML}function S2(n,l){const o=new Set(Array.from(n.querySelectorAll(`[${Se}]`)).map(d=>d.getAttribute(Se)).filter(d=>!!d));if(!o.has(l))return l;const i=l.match(/^(.*?)(?:-(\d+))?$/),s=(i==null?void 0:i[1])||l;let u=Number.parseInt((i==null?void 0:i[2])||"1",10)+1;for(;o.has(`${s}-${u}`);)u+=1;return`${s}-${u}`}function sd(n,l){const o=pl(n);return o?S2(o,l):l}function nv(n,l){return $r(n,o=>{var h;if($e(o,l.elementId))return;const i=pl(`<template>${l.html}</template>`),s=(h=i==null?void 0:i.querySelector("template"))==null?void 0:h.content.firstElementChild;if(!(s instanceof HTMLElement))return;const u=(l.parentElementId?$e(o,l.parentElementId):null)??o.querySelector(`[${Vl}]`)??o.body,d=l.nextSiblingElementId?$e(o,l.nextSiblingElementId):null,m=l.previousSiblingElementId?$e(o,l.previousSiblingElementId):null;(d==null?void 0:d.parentElement)===u?u.insertBefore(o.importNode(s,!0),d):(m==null?void 0:m.parentElement)===u?m.after(o.importNode(s,!0)):u.appendChild(o.importNode(s,!0))})}function w2(n,l){return $r(n,o=>{var i;(i=$e(o,l))==null||i.remove()})}function Ul(n,l){return{...l,hidden:n.hidden,sourceFile:n.sourceFile}}function av(n,l){if(l.type==="slide.visibility.update")return n.id!==l.slideId?n:{...n,hidden:l.nextHidden};if(l.type==="slide.title.update")return n.id!==l.slideId?n:{...n,title:l.nextTitle};if(!("slideId"in l)||l.type==="slide.reorder"||n.id!==l.slideId)return n;switch(l.type){case"operation.batch":return l.operations.reduce((o,i)=>av(o,i),n);case"text.update":return Ul(n,aa(g2(n.htmlSource,l.elementId,l.nextText),n.id));case"style.update":return Ul(n,aa(y2(n.htmlSource,l.elementId,l.propertyName,l.nextValue),n.id));case"attribute.update":return Ul(n,aa(v2(n.htmlSource,l.elementId,l.attributeName,l.nextValue),n.id));case"element.layout.update":return Ul(n,aa(x2(n.htmlSource,l.elementId,l.nextStyle),n.id));case"element.insert":return Ul(n,aa(nv(n.htmlSource,l),n.id));case"element.remove":return Ul(n,aa(w2(n.htmlSource,l.elementId),n.id));case"group.create":case"group.ungroup":return Ul(n,aa(l.nextHtmlSource,n.id))}}function lv(n){switch(n.type){case"operation.batch":return{type:"operation.batch",slideId:n.slideId,operations:n.operations.map(l=>lv(l)).reverse(),timestamp:n.timestamp};case"text.update":return{...n,previousText:n.nextText,nextText:n.previousText};case"style.update":return{...n,previousValue:n.nextValue,nextValue:n.previousValue};case"attribute.update":return{...n,previousValue:n.nextValue,nextValue:n.previousValue};case"element.layout.update":return{...n,previousStyle:n.nextStyle,nextStyle:n.previousStyle};case"element.insert":return{type:"element.remove",slideId:n.slideId,elementId:n.elementId,parentElementId:n.parentElementId,previousSiblingElementId:n.previousSiblingElementId,nextSiblingElementId:n.nextSiblingElementId,html:n.html,timestamp:n.timestamp};case"element.remove":return{type:"element.insert",slideId:n.slideId,elementId:n.elementId,parentElementId:n.parentElementId,previousSiblingElementId:n.previousSiblingElementId,nextSiblingElementId:n.nextSiblingElementId,html:n.html,timestamp:n.timestamp};case"group.create":return{type:"group.ungroup",slideId:n.slideId,groupElementId:n.groupElementId,childElementIds:n.elementIds,previousHtmlSource:n.nextHtmlSource,nextHtmlSource:n.previousHtmlSource,timestamp:n.timestamp};case"group.ungroup":return{type:"group.create",slideId:n.slideId,groupElementId:n.groupElementId,elementIds:n.childElementIds,previousHtmlSource:n.nextHtmlSource,nextHtmlSource:n.previousHtmlSource,timestamp:n.timestamp};case"slide.create":return{type:"slide.delete",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.delete":return{type:"slide.create",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.duplicate":return{type:"slide.delete",slide:n.slide,index:n.index,timestamp:n.timestamp};case"slide.reorder":return{...n,fromIndex:n.toIndex,toIndex:n.fromIndex};case"slide.visibility.update":return{...n,previousHidden:n.nextHidden,nextHidden:n.previousHidden};case"slide.title.update":return{...n,previousTitle:n.nextTitle,nextTitle:n.previousTitle}}}const E2=`<!DOCTYPE html>
|
|
52
|
+
<html lang="en">
|
|
53
|
+
<head>
|
|
54
|
+
<meta charset="utf-8" />
|
|
55
|
+
<title>Untitled Slide</title>
|
|
56
|
+
</head>
|
|
57
|
+
<body>
|
|
58
|
+
<main
|
|
59
|
+
data-slide-root="true"
|
|
60
|
+
data-slide-width="1920"
|
|
61
|
+
data-slide-height="1080"
|
|
62
|
+
data-editor-id="slide-root"
|
|
63
|
+
style="position: relative; width: 1920px; height: 1080px; overflow: hidden; background: #ffffff;"
|
|
64
|
+
>
|
|
65
|
+
<h1 data-editable="text" data-editor-id="text-1" style="position: absolute; left: 160px; top: 160px; width: 1200px; margin: 0; font-size: 96px; line-height: 1.05;">
|
|
66
|
+
Untitled Slide
|
|
67
|
+
</h1>
|
|
68
|
+
</main>
|
|
69
|
+
</body>
|
|
70
|
+
</html>`;function rv(n,l){const o=new Set(n.map(s=>s.id));if(!o.has(l))return l;let i=2;for(;o.has(`${l}-${i}`);)i+=1;return`${l}-${i}`}function ov(n,l){const o=new Set(n.map(m=>m.sourceFile).filter(Boolean));if(!o.has(l))return l;const i=l.lastIndexOf("."),s=i>=0?l.slice(0,i):l,u=i>=0?l.slice(i):"";let d=2;for(;o.has(`${s}-${d}${u}`);)d+=1;return`${s}-${d}${u}`}function T2(n,l){const o=Math.max(l+1,1),i=rv(n,`generated-slide-${o}`),s=ov(n,`${String(o).padStart(2,"0")}-untitled.html`);return{...aa(E2,i),hidden:!1,sourceFile:s,title:"Untitled Slide"}}function C2(n,l){const o=rv(n,`${l.id}-copy`),i=ov(n,l.sourceFile?M2(l.sourceFile,"copy"):`${o}.html`);return{...aa(l.htmlSource,o),hidden:l.hidden===!0,sourceFile:i,title:l.title}}function M2(n,l){const o=n.lastIndexOf(".");return o<0?`${n}-${l}`:`${n.slice(0,o)}-${l}${n.slice(o)}`}function My(n,l){return Math.min(Math.max(n,0),l)}function Df(n,l){switch(l.type){case"slide.create":case"slide.duplicate":{const o=My(l.index,n.length);return[...n.slice(0,o),l.slide,...n.slice(o)]}case"slide.delete":return n.filter(o=>o.id!==l.slide.id);case"slide.reorder":{const o=n.findIndex(u=>u.id===l.slideId);if(o<0)return n;const i=[...n],[s]=i.splice(o,1);return s?(i.splice(My(l.toIndex,i.length),0,s),i):n}default:return n.map(o=>av(o,l))}}function iv(n){return{slides:n,undoStack:[],redoStack:[]}}function bs(n,l){switch(l.type){case"history.reset":return iv(l.slides);case"history.commit":return{slides:Df(n.slides,l.operation),undoStack:[...n.undoStack,l.operation],redoStack:[]};case"history.undo":{const o=n.undoStack[n.undoStack.length-1];return o?{slides:Df(n.slides,lv(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:Df(n.slides,o),undoStack:[...n.undoStack,o],redoStack:n.redoStack.slice(0,-1)}:n}}}async function A2({manifestUrl:n,fetchImpl:l,requestInit:o,slideIdPrefix:i="generated-slide-"}){var p;const s=l??globalThis.fetch;if(!s)throw new Error("loadSlidesFromManifest requires a fetch implementation.");const u={cache:"no-store",...o},d=await s(n,u);if(!d.ok)return null;const m=await d.json();if(!((p=m.slides)!=null&&p.length))return null;const h=d.url||n,g=new URL(h),x=await Promise.all(m.slides.map(async(S,T)=>{const C=new URL(S.file,h);for(const[N,D]of g.searchParams)C.searchParams.has(N)||C.searchParams.set(N,D);const M=await s(C.toString(),u);if(!M.ok)throw new Error(`Failed to load slide HTML: ${S.file}`);const A=await M.text(),_=aa(A,`${i}${T+1}`);return{..._,hidden:S.hidden===!0,sourceFile:S.file,title:S.title||_.title}}));return{manifest:m,slides:x}}const _2=["#F59E0B","#EF4444","#10B981","#3B82F6","#8B5CF6","#FFFFFF","#0F172A"];function R2(n){const l=n.filter(o=>o.hidden!==!0);return l.length>0?l:n}function N2(n,l){return Math.min(Math.max(n,0),Math.max(l-1,0))}/**
|
|
71
|
+
* @license lucide-react v1.14.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/const sv=(...n)=>n.filter((l,o,i)=>!!l&&l.trim()!==""&&i.indexOf(l)===o).join(" ").trim();/**
|
|
76
|
+
* @license lucide-react v1.14.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const O2=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
81
|
+
* @license lucide-react v1.14.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const z2=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,o,i)=>i?i.toUpperCase():o.toLowerCase());/**
|
|
86
|
+
* @license lucide-react v1.14.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const Ay=n=>{const l=z2(n);return l.charAt(0).toUpperCase()+l.slice(1)};/**
|
|
91
|
+
* @license lucide-react v1.14.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/var jf={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
96
|
+
* @license lucide-react v1.14.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const D2=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1},j2=b.createContext({}),k2=()=>b.useContext(j2),L2=b.forwardRef(({color:n,size:l,strokeWidth:o,absoluteStrokeWidth:i,className:s="",children:u,iconNode:d,...m},h)=>{const{size:g=24,strokeWidth:x=2,absoluteStrokeWidth:p=!1,color:S="currentColor",className:T=""}=k2()??{},C=i??p?Number(o??x)*24/Number(l??g):o??x;return b.createElement("svg",{ref:h,...jf,width:l??g??jf.width,height:l??g??jf.height,stroke:n??S,strokeWidth:C,className:sv("lucide",T,s),...!u&&!D2(m)&&{"aria-hidden":"true"},...m},[...d.map(([M,A])=>b.createElement(M,A)),...Array.isArray(u)?u:[u]])});/**
|
|
101
|
+
* @license lucide-react v1.14.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const Oe=(n,l)=>{const o=b.forwardRef(({className:i,...s},u)=>b.createElement(L2,{ref:u,iconNode:l,className:sv(`lucide-${O2(Ay(n))}`,`lucide-${n}`,i),...s}));return o.displayName=Ay(n),o};/**
|
|
106
|
+
* @license lucide-react v1.14.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const H2=[["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"}]],cd=Oe("align-center-horizontal",H2);/**
|
|
111
|
+
* @license lucide-react v1.14.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const B2=[["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"}]],cv=Oe("align-center-vertical",B2);/**
|
|
116
|
+
* @license lucide-react v1.14.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const U2=[["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"}]],uv=Oe("align-end-horizontal",U2);/**
|
|
121
|
+
* @license lucide-react v1.14.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const I2=[["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"}]],fv=Oe("align-end-vertical",I2);/**
|
|
126
|
+
* @license lucide-react v1.14.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const G2=[["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"}]],dv=Oe("align-start-horizontal",G2);/**
|
|
131
|
+
* @license lucide-react v1.14.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const Y2=[["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"}]],mv=Oe("align-start-vertical",Y2);/**
|
|
136
|
+
* @license lucide-react v1.14.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const V2=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],hv=Oe("arrow-down-to-line",V2);/**
|
|
141
|
+
* @license lucide-react v1.14.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const q2=[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]],ud=Oe("arrow-up-to-line",q2);/**
|
|
146
|
+
* @license lucide-react v1.14.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const P2=[["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"}]],$2=Oe("box",P2);/**
|
|
151
|
+
* @license lucide-react v1.14.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const X2=[["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"}]],kf=Oe("case-sensitive",X2);/**
|
|
156
|
+
* @license lucide-react v1.14.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const K2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],pv=Oe("check",K2);/**
|
|
161
|
+
* @license lucide-react v1.14.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const F2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jo=Oe("chevron-down",F2);/**
|
|
166
|
+
* @license lucide-react v1.14.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const Q2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Z2=Oe("chevron-right",Q2);/**
|
|
171
|
+
* @license lucide-react v1.14.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const J2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Yd=Oe("chevron-up",J2);/**
|
|
176
|
+
* @license lucide-react v1.14.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const W2=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],eE=Oe("cloud",W2);/**
|
|
181
|
+
* @license lucide-react v1.14.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const tE=[["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"}]],fd=Oe("columns-3",tE);/**
|
|
186
|
+
* @license lucide-react v1.14.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const nE=[["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"}]],gv=Oe("copy",nE);/**
|
|
191
|
+
* @license lucide-react v1.14.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const aE=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],lE=Oe("download",aE);/**
|
|
196
|
+
* @license lucide-react v1.14.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const rE=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],_y=Oe("eye-off",rE);/**
|
|
201
|
+
* @license lucide-react v1.14.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const oE=[["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"}]],yv=Oe("eye",oE);/**
|
|
206
|
+
* @license lucide-react v1.14.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const iE=[["path",{d:"M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6",key:"g5mvt7"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14 20 2 2 4-4",key:"15kota"}]],sE=Oe("file-check-corner",iE);/**
|
|
211
|
+
* @license lucide-react v1.14.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const cE=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],uE=Oe("file-code-corner",cE);/**
|
|
216
|
+
* @license lucide-react v1.14.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const fE=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],vv=Oe("file-text",fE);/**
|
|
221
|
+
* @license lucide-react v1.14.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const dE=[["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"}]],dd=Oe("group",dE);/**
|
|
226
|
+
* @license lucide-react v1.14.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const mE=[["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"}]],hE=Oe("hash",mE);/**
|
|
231
|
+
* @license lucide-react v1.14.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const pE=[["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"}]],bv=Oe("layers",pE);/**
|
|
236
|
+
* @license lucide-react v1.14.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const gE=[["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"}]],yE=Oe("link-2",gE);/**
|
|
241
|
+
* @license lucide-react v1.14.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const vE=[["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"}]],Ry=Oe("lock",vE);/**
|
|
246
|
+
* @license lucide-react v1.14.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const bE=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],xE=Oe("maximize-2",bE);/**
|
|
251
|
+
* @license lucide-react v1.14.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const SE=[["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"}]],Ny=Oe("palette",SE);/**
|
|
256
|
+
* @license lucide-react v1.14.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const wE=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],EE=Oe("pen",wE);/**
|
|
261
|
+
* @license lucide-react v1.14.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const TE=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],CE=Oe("pencil",TE);/**
|
|
266
|
+
* @license lucide-react v1.14.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const ME=[["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"}]],AE=Oe("pilcrow",ME);/**
|
|
271
|
+
* @license lucide-react v1.14.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const _E=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],RE=Oe("play",_E);/**
|
|
276
|
+
* @license lucide-react v1.14.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const NE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Lf=Oe("plus",NE);/**
|
|
281
|
+
* @license lucide-react v1.14.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const OE=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],zE=Oe("presentation",OE);/**
|
|
286
|
+
* @license lucide-react v1.14.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const DE=[["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"}]],jE=Oe("rotate-cw",DE);/**
|
|
291
|
+
* @license lucide-react v1.14.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const kE=[["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"}]],xv=Oe("rows-3",kE);/**
|
|
296
|
+
* @license lucide-react v1.14.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const LE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Oy=Oe("square",LE);/**
|
|
301
|
+
* @license lucide-react v1.14.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const HE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],BE=Oe("text-align-center",HE);/**
|
|
306
|
+
* @license lucide-react v1.14.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const UE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],IE=Oe("text-align-end",UE);/**
|
|
311
|
+
* @license lucide-react v1.14.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const GE=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],YE=Oe("text-align-start",GE);/**
|
|
316
|
+
* @license lucide-react v1.14.0 - ISC
|
|
317
|
+
*
|
|
318
|
+
* This source code is licensed under the ISC license.
|
|
319
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
+
*/const VE=[["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"}]],Sv=Oe("trash-2",VE);/**
|
|
321
|
+
* @license lucide-react v1.14.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/const qE=[["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"}]],zy=Oe("type",qE);/**
|
|
326
|
+
* @license lucide-react v1.14.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* This source code is licensed under the ISC license.
|
|
329
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
+
*/const PE=[["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"}]],wv=Oe("ungroup",PE);/**
|
|
331
|
+
* @license lucide-react v1.14.0 - ISC
|
|
332
|
+
*
|
|
333
|
+
* This source code is licensed under the ISC license.
|
|
334
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
+
*/const $E=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ev=Oe("x",$E);/**
|
|
336
|
+
* @license lucide-react v1.14.0 - ISC
|
|
337
|
+
*
|
|
338
|
+
* This source code is licensed under the ISC license.
|
|
339
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
+
*/const XE=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],KE=Oe("zap",XE);function Tv(n){var l,o,i="";if(typeof n=="string"||typeof n=="number")i+=n;else if(typeof n=="object")if(Array.isArray(n)){var s=n.length;for(l=0;l<s;l++)n[l]&&(o=Tv(n[l]))&&(i&&(i+=" "),i+=o)}else for(o in n)n[o]&&(i&&(i+=" "),i+=o);return i}function Cv(){for(var n,l,o=0,i="",s=arguments.length;o<s;o++)(n=arguments[o])&&(l=Tv(n))&&(i&&(i+=" "),i+=l);return i}const FE=(n,l)=>{const o=new Array(n.length+l.length);for(let i=0;i<n.length;i++)o[i]=n[i];for(let i=0;i<l.length;i++)o[n.length+i]=l[i];return o},QE=(n,l)=>({classGroupId:n,validator:l}),Mv=(n=new Map,l=null,o)=>({nextPart:n,validators:l,classGroupId:o}),qs="-",Dy=[],ZE="arbitrary..",JE=n=>{const l=eT(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return WE(d);const m=d.split(qs),h=m[0]===""&&m.length>1?1:0;return Av(m,h,l)},getConflictingClassGroupIds:(d,m)=>{if(m){const h=i[d],g=o[d];return h?g?FE(g,h):h:g||Dy}return o[d]||Dy}}},Av=(n,l,o)=>{if(n.length-l===0)return o.classGroupId;const s=n[l],u=o.nextPart.get(s);if(u){const g=Av(n,l+1,u);if(g)return g}const d=o.validators;if(d===null)return;const m=l===0?n.join(qs):n.slice(l).join(qs),h=d.length;for(let g=0;g<h;g++){const x=d[g];if(x.validator(m))return x.classGroupId}},WE=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),o=l.indexOf(":"),i=l.slice(0,o);return i?ZE+i:void 0})(),eT=n=>{const{theme:l,classGroups:o}=n;return tT(o,l)},tT=(n,l)=>{const o=Mv();for(const i in n){const s=n[i];Vd(s,o,i,l)}return o},Vd=(n,l,o,i)=>{const s=n.length;for(let u=0;u<s;u++){const d=n[u];nT(d,l,o,i)}},nT=(n,l,o,i)=>{if(typeof n=="string"){aT(n,l,o);return}if(typeof n=="function"){lT(n,l,o,i);return}rT(n,l,o,i)},aT=(n,l,o)=>{const i=n===""?l:_v(l,n);i.classGroupId=o},lT=(n,l,o,i)=>{if(oT(n)){Vd(n(i),l,o,i);return}l.validators===null&&(l.validators=[]),l.validators.push(QE(o,n))},rT=(n,l,o,i)=>{const s=Object.entries(n),u=s.length;for(let d=0;d<u;d++){const[m,h]=s[d];Vd(h,_v(l,m),o,i)}},_v=(n,l)=>{let o=n;const i=l.split(qs),s=i.length;for(let u=0;u<s;u++){const d=i[u];let m=o.nextPart.get(d);m||(m=Mv(),o.nextPart.set(d,m)),o=m}return o},oT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,iT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,o=Object.create(null),i=Object.create(null);const s=(u,d)=>{o[u]=d,l++,l>n&&(l=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 s(u,d),d},set(u,d){u in o?o[u]=d:s(u,d)}}},md="!",jy=":",sT=[],ky=(n,l,o,i,s)=>({modifiers:n,hasImportantModifier:l,baseClassName:o,maybePostfixModifierPosition:i,isExternal:s}),cT=n=>{const{prefix:l,experimentalParseClassName:o}=n;let i=s=>{const u=[];let d=0,m=0,h=0,g;const x=s.length;for(let M=0;M<x;M++){const A=s[M];if(d===0&&m===0){if(A===jy){u.push(s.slice(h,M)),h=M+1;continue}if(A==="/"){g=M;continue}}A==="["?d++:A==="]"?d--:A==="("?m++:A===")"&&m--}const p=u.length===0?s:s.slice(h);let S=p,T=!1;p.endsWith(md)?(S=p.slice(0,-1),T=!0):p.startsWith(md)&&(S=p.slice(1),T=!0);const C=g&&g>h?g-h:void 0;return ky(u,T,S,C)};if(l){const s=l+jy,u=i;i=d=>d.startsWith(s)?u(d.slice(s.length)):ky(sT,!1,d,void 0,!0)}if(o){const s=i;i=u=>o({className:u,parseClassName:s})}return i},uT=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((o,i)=>{l.set(o,1e6+i)}),o=>{const i=[];let s=[];for(let u=0;u<o.length;u++){const d=o[u],m=d[0]==="[",h=l.has(d);m||h?(s.length>0&&(s.sort(),i.push(...s),s=[]),i.push(d)):s.push(d)}return s.length>0&&(s.sort(),i.push(...s)),i}},fT=n=>({cache:iT(n.cacheSize),parseClassName:cT(n),sortModifiers:uT(n),...JE(n)}),dT=/\s+/,mT=(n,l)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:s,sortModifiers:u}=l,d=[],m=n.trim().split(dT);let h="";for(let g=m.length-1;g>=0;g-=1){const x=m[g],{isExternal:p,modifiers:S,hasImportantModifier:T,baseClassName:C,maybePostfixModifierPosition:M}=o(x);if(p){h=x+(h.length>0?" "+h:h);continue}let A=!!M,_=i(A?C.substring(0,M):C);if(!_){if(!A){h=x+(h.length>0?" "+h:h);continue}if(_=i(C),!_){h=x+(h.length>0?" "+h:h);continue}A=!1}const N=S.length===0?"":S.length===1?S[0]:u(S).join(":"),D=T?N+md:N,V=D+_;if(d.indexOf(V)>-1)continue;d.push(V);const ae=s(_,A);for(let I=0;I<ae.length;++I){const $=ae[I];d.push(D+$)}h=x+(h.length>0?" "+h:h)}return h},hT=(...n)=>{let l=0,o,i,s="";for(;l<n.length;)(o=n[l++])&&(i=Rv(o))&&(s&&(s+=" "),s+=i);return s},Rv=n=>{if(typeof n=="string")return n;let l,o="";for(let i=0;i<n.length;i++)n[i]&&(l=Rv(n[i]))&&(o&&(o+=" "),o+=l);return o},pT=(n,...l)=>{let o,i,s,u;const d=h=>{const g=l.reduce((x,p)=>p(x),n());return o=fT(g),i=o.cache.get,s=o.cache.set,u=m,m(h)},m=h=>{const g=i(h);if(g)return g;const x=mT(h,o);return s(h,x),x};return u=d,(...h)=>u(hT(...h))},gT=[],jt=n=>{const l=o=>o[n]||gT;return l.isThemeGetter=!0,l},Nv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ov=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,vT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bT=/\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$/,xT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ST=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ol=n=>yT.test(n),Be=n=>!!n&&!Number.isNaN(Number(n)),il=n=>!!n&&Number.isInteger(Number(n)),Hf=n=>n.endsWith("%")&&Be(n.slice(0,-1)),Ra=n=>vT.test(n),zv=()=>!0,ET=n=>bT.test(n)&&!xT.test(n),qd=()=>!1,TT=n=>ST.test(n),CT=n=>wT.test(n),MT=n=>!ye(n)&&!be(n),AT=n=>gl(n,kv,qd),ye=n=>Nv.test(n),Il=n=>gl(n,Lv,ET),Ly=n=>gl(n,kT,Be),_T=n=>gl(n,Bv,zv),RT=n=>gl(n,Hv,qd),Hy=n=>gl(n,Dv,qd),NT=n=>gl(n,jv,CT),xs=n=>gl(n,Uv,TT),be=n=>Ov.test(n),Vo=n=>Fl(n,Lv),OT=n=>Fl(n,Hv),By=n=>Fl(n,Dv),zT=n=>Fl(n,kv),DT=n=>Fl(n,jv),Ss=n=>Fl(n,Uv,!0),jT=n=>Fl(n,Bv,!0),gl=(n,l,o)=>{const i=Nv.exec(n);return i?i[1]?l(i[1]):o(i[2]):!1},Fl=(n,l,o=!1)=>{const i=Ov.exec(n);return i?i[1]?l(i[1]):o:!1},Dv=n=>n==="position"||n==="percentage",jv=n=>n==="image"||n==="url",kv=n=>n==="length"||n==="size"||n==="bg-size",Lv=n=>n==="length",kT=n=>n==="number",Hv=n=>n==="family-name",Bv=n=>n==="number"||n==="weight",Uv=n=>n==="shadow",LT=()=>{const n=jt("color"),l=jt("font"),o=jt("text"),i=jt("font-weight"),s=jt("tracking"),u=jt("leading"),d=jt("breakpoint"),m=jt("container"),h=jt("spacing"),g=jt("radius"),x=jt("shadow"),p=jt("inset-shadow"),S=jt("text-shadow"),T=jt("drop-shadow"),C=jt("blur"),M=jt("perspective"),A=jt("aspect"),_=jt("ease"),N=jt("animate"),D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],ae=()=>[...V(),be,ye],I=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],z=()=>[be,ye,h],F=()=>[ol,"full","auto",...z()],ne=()=>[il,"none","subgrid",be,ye],re=()=>["auto",{span:["full",il,be,ye]},il,be,ye],q=()=>[il,"auto",be,ye],H=()=>["auto","min","max","fr",be,ye],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...z()],j=()=>[ol,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],B=()=>[ol,"screen","full","dvw","lvw","svw","min","max","fit",...z()],P=()=>[ol,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],L=()=>[n,be,ye],R=()=>[...V(),By,Hy,{position:[be,ye]}],G=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",zT,AT,{size:[be,ye]}],le=()=>[Hf,Vo,Il],se=()=>["","none","full",g,be,ye],ie=()=>["",Be,Vo,Il],de=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[Be,Hf,By,Hy],ve=()=>["","none",C,be,ye],we=()=>["none",Be,be,ye],Te=()=>["none",Be,be,ye],Ue=()=>[Be,be,ye],Le=()=>[ol,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ra],breakpoint:[Ra],color:[zv],container:[Ra],"drop-shadow":[Ra],ease:["in","out","in-out"],font:[MT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ra],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ra],shadow:[Ra],spacing:["px",Be],text:[Ra],"text-shadow":[Ra],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ol,ye,be,A]}],container:["container"],columns:[{columns:[Be,ye,be,m]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:ae()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[il,"auto",be,ye]}],basis:[{basis:[ol,"full","auto",m,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Be,ol,"auto","initial","none",ye]}],grow:[{grow:["",Be,be,ye]}],shrink:[{shrink:["",Be,be,ye]}],order:[{order:[il,"first","last","none",be,ye]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mbs:[{mbs:E()}],mbe:[{mbe:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:j()}],"inline-size":[{inline:["auto",...B()]}],"min-inline-size":[{"min-inline":["auto",...B()]}],"max-inline-size":[{"max-inline":["none",...B()]}],"block-size":[{block:["auto",...P()]}],"min-block-size":[{"min-block":["auto",...P()]}],"max-block-size":[{"max-block":["none",...P()]}],w:[{w:[m,"screen",...j()]}],"min-w":[{"min-w":[m,"screen","none",...j()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...j()]}],h:[{h:["screen","lh",...j()]}],"min-h":[{"min-h":["screen","lh","none",...j()]}],"max-h":[{"max-h":["screen","lh",...j()]}],"font-size":[{text:["base",o,Vo,Il]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,jT,_T]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Hf,ye]}],"font-family":[{font:[OT,RT,l]}],"font-features":[{"font-features":[ye]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,be,ye]}],"line-clamp":[{"line-clamp":[Be,"none",be,Ly]}],leading:[{leading:[u,...z()]}],"list-image":[{"list-image":["none",be,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",be,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[Be,"from-font","auto",be,Il]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Be,"auto",be,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be,ye]}],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",be,ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:R()}],"bg-repeat":[{bg:G()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},il,be,ye],radial:["",be,ye],conic:[il,be,ye]},DT,NT]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Be,be,ye]}],"outline-w":[{outline:["",Be,Vo,Il]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",x,Ss,xs]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",p,Ss,xs]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Be,Il]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",S,Ss,xs]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Be,be,ye]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Be]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[be,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":V()}],"mask-image-conic-pos":[{"mask-conic":[Be]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:R()}],"mask-repeat":[{mask:G()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",be,ye]}],filter:[{filter:["","none",be,ye]}],blur:[{blur:ve()}],brightness:[{brightness:[Be,be,ye]}],contrast:[{contrast:[Be,be,ye]}],"drop-shadow":[{"drop-shadow":["","none",T,Ss,xs]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Be,be,ye]}],"hue-rotate":[{"hue-rotate":[Be,be,ye]}],invert:[{invert:["",Be,be,ye]}],saturate:[{saturate:[Be,be,ye]}],sepia:[{sepia:["",Be,be,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",be,ye]}],"backdrop-blur":[{"backdrop-blur":ve()}],"backdrop-brightness":[{"backdrop-brightness":[Be,be,ye]}],"backdrop-contrast":[{"backdrop-contrast":[Be,be,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Be,be,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Be,be,ye]}],"backdrop-invert":[{"backdrop-invert":["",Be,be,ye]}],"backdrop-opacity":[{"backdrop-opacity":[Be,be,ye]}],"backdrop-saturate":[{"backdrop-saturate":[Be,be,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",Be,be,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",be,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Be,"initial",be,ye]}],ease:[{ease:["linear","initial",_,be,ye]}],delay:[{delay:[Be,be,ye]}],animate:[{animate:["none",N,be,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[M,be,ye]}],"perspective-origin":[{"perspective-origin":ae()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:Te()}],"scale-x":[{"scale-x":Te()}],"scale-y":[{"scale-y":Te()}],"scale-z":[{"scale-z":Te()}],"scale-3d":["scale-3d"],skew:[{skew:Ue()}],"skew-x":[{"skew-x":Ue()}],"skew-y":[{"skew-y":Ue()}],transform:[{transform:[be,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:ae()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Le()}],"translate-x":[{"translate-x":Le()}],"translate-y":[{"translate-y":Le()}],"translate-z":[{"translate-z":Le()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be,ye]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",be,ye]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Be,Vo,Il,Ly]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},HT=pT(LT);function Fe(...n){return HT(Cv(n))}const BT=[{id:"html",label:"Single HTML",desc:"Package as one shareable offline page, with built-in presenter view",icon:uE},{id:"pdf",label:"PDF",desc:"Export as a printable PDF document",icon:vv},{id:"pptx",label:"PPTX",desc:"Export as a PowerPoint file",icon:zE,soon:!0},{id:"gslides",label:"Google Slides",desc:"Sync to Google Slides",icon:eE,soon:!0}];function UT({title:n,onTitleChange:l,onPresent:o,onExportPdf:i,onExportHtml:s,pdfSlides:u=[],pdfThumbnails:d={},isSaving:m}){const[h,g]=b.useState(!1),[x,p]=b.useState(!1),[S,T]=b.useState(0),C=b.useRef(null),M=n||"Untitled presentation";b.useEffect(()=>{const N=D=>{C.current&&!C.current.contains(D.target)&&g(!1)};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[]);const A=b.useCallback(N=>{if(!N)return;const D=N.getBoundingClientRect().width;T(Math.ceil(D))},[]),_=N=>{if(g(!1),N.soon){ul(`${N.label} is not available yet.`,{description:"We are still building this export option."});return}if(N.id==="pdf"){p(!0);return}if(N.id==="html"){s==null||s();return}ul(`Exporting as ${N.label}...`)};return v.jsxs("header",{className:"px-6 h-14 flex items-center justify-between bg-white border-b border-foreground/[0.06]",children:[v.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[v.jsx("div",{className:"w-8 h-8 rounded-lg bg-foreground flex items-center justify-center shrink-0",children:v.jsx("span",{className:"text-background font-bold text-sm font-display",children:"P"})}),v.jsx("div",{className:"w-px h-5 bg-foreground/10"}),v.jsxs("div",{className:"relative min-w-0 flex-1",children:[v.jsx("input",{value:n,onChange:N=>l==null?void 0:l(N.target.value),"aria-label":"Deck title",className:"max-w-full min-w-0 flex-none rounded-md bg-transparent px-2 py-1 text-[18px] font-semibold text-foreground outline-none focus:bg-foreground/[0.04]",style:S?{width:`${S}px`}:void 0,placeholder:"Untitled presentation"}),v.jsx("span",{ref:A,"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 whitespace-pre rounded-md px-2 py-1 text-[18px] font-semibold",children:M},M)]}),m?v.jsx("span",{className:"inline-flex h-5 shrink-0 items-center rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 text-[10px] font-medium uppercase leading-none tracking-wider text-foreground/45","aria-live":"polite",children:"saving..."}):null]}),v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs("div",{className:"relative",ref:C,children:[v.jsxs("button",{type:"button",onClick:()=>g(N=>!N),className:"h-8 px-3 rounded-md flex items-center gap-1.5 text-[13px] text-foreground/70 hover:bg-foreground/[0.04] hover:text-foreground transition-colors",children:[v.jsx(lE,{className:"w-3.5 h-3.5"}),v.jsx("span",{children:"Export"}),v.jsx(Jo,{className:Fe("w-3 h-3 transition-transform",h&&"rotate-180")})]}),h&&v.jsxs("div",{className:"absolute right-0 mt-1.5 w-[280px] bg-white rounded-xl border border-foreground/[0.08] shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] p-1.5 animate-fade-in z-50",children:[v.jsx("div",{className:"text-[10px] uppercase tracking-wider text-foreground/40 px-2.5 py-1.5 font-medium",children:"Export formats"}),BT.map(N=>{const D=N.icon;return v.jsxs("button",{type:"button",onClick:()=>_(N),className:Fe("w-full text-left px-2.5 py-2 rounded-md flex items-start gap-2.5 transition-colors",N.soon?"opacity-50 cursor-not-allowed":"hover:bg-foreground/[0.04] cursor-pointer"),children:[v.jsx("div",{className:"w-7 h-7 rounded-md bg-foreground/[0.04] flex items-center justify-center shrink-0 mt-0.5",children:v.jsx(D,{className:"w-3.5 h-3.5 text-foreground/70"})}),v.jsxs("div",{className:"flex-1 min-w-0",children:[v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("span",{className:"text-[13px] font-medium text-foreground",children:N.label}),N.soon&&v.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-foreground/[0.06] text-foreground/50 uppercase tracking-wider",children:"Soon"})]}),v.jsx("div",{className:"text-[11px] text-foreground/50 mt-0.5 leading-snug",children:N.desc})]}),!N.soon&&v.jsx(pv,{className:"w-3 h-3 text-foreground/0 mt-2"})]},N.id)})]})]}),v.jsxs("button",{type:"button",onClick:o,className:"h-8 px-3.5 rounded-md flex items-center gap-1.5 text-[13px] font-medium bg-foreground text-background hover:bg-foreground/90 transition-colors",children:[v.jsx(RE,{className:"w-3.5 h-3.5"}),v.jsx("span",{children:"Present"})]})]}),x?v.jsx(IT,{slides:u,thumbnails:d,onClose:()=>p(!1),onExport:N=>{p(!1),i==null||i(N)}}):null]})}function IT({slides:n,thumbnails:l,onClose:o,onExport:i}){const s=n.filter(C=>C.file),[u,d]=b.useState("all"),[m,h]=b.useState([]),g=new Set(m),x=m.length,p=u==="all"||u==="selected"&&x>0;b.useEffect(()=>{const C=M=>{M.key==="Escape"&&o()};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[o]);const S=(C,M)=>{h(A=>M?A.includes(C)?A:[...A,C]:A.filter(_=>_!==C))},T=()=>{if(u==="selected"){m.length>0&&i({mode:"slides",slideFiles:m});return}i({mode:"all"})};return v.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-foreground/20 px-4",onMouseDown:C=>{C.target===C.currentTarget&&o()},children:v.jsxs("dialog",{open:!0,"aria-modal":"true","aria-labelledby":"pdf-export-title",className:"relative m-0 flex max-h-[86vh] w-full max-w-[680px] flex-col overflow-hidden rounded-lg border border-foreground/[0.08] bg-white p-0 shadow-[0_24px_80px_rgba(0,0,0,0.18)]",children:[v.jsxs("div",{className:"flex items-center justify-between border-b border-foreground/[0.08] px-4 py-3",children:[v.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:v.jsx(vv,{className:"h-4 w-4 text-foreground/70"})}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("h2",{id:"pdf-export-title",className:"text-[14px] font-semibold text-foreground",children:"Export PDF"}),v.jsx("p",{className:"mt-0.5 text-[11px] text-foreground/50",children:"Choose which slides to include."})]})]}),v.jsx("button",{type:"button","aria-label":"Close PDF export dialog",onClick:o,className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md text-foreground/55 transition-colors hover:bg-foreground/[0.05] hover:text-foreground",children:v.jsx(Ev,{className:"h-4 w-4"})})]}),v.jsxs("div",{className:"min-h-0 flex-1 overflow-auto px-4 py-4",children:[v.jsxs("fieldset",{className:"space-y-2",children:[v.jsx("legend",{className:"mb-2 text-[10px] font-medium uppercase tracking-wider text-foreground/45",children:"PDF range"}),v.jsx(Uy,{checked:u==="all",icon:bv,label:"All slides",detail:`${s.length} slides`,onChange:()=>d("all")}),v.jsx(Uy,{checked:u==="selected",icon:sE,label:"Selected slides",detail:x===1?"1 slide selected":`${x} slides selected`,onChange:()=>d("selected")})]}),u==="selected"?v.jsxs("div",{className:"mt-4 rounded-md border border-foreground/[0.08]",children:[v.jsx("div",{className:"border-b border-foreground/[0.08] px-3 py-2 text-[11px] font-medium text-foreground/55",children:"Slides"}),v.jsx("div",{className:"grid max-h-[360px] grid-cols-2 gap-2 overflow-auto p-2 max-[620px]:grid-cols-1","data-testid":"pdf-slide-picker",children:s.map((C,M)=>{const A=C.file;return A?v.jsxs("label",{"data-testid":"pdf-slide-option",className:Fe("grid cursor-pointer grid-cols-[104px_1fr] gap-2 rounded-md border border-foreground/[0.08] bg-white p-2 text-[12px] transition-colors hover:border-foreground/20 hover:bg-foreground/[0.025]",g.has(A)&&"border-foreground/35 bg-foreground/[0.035]"),children:[v.jsx("div",{className:"relative aspect-[16/9] overflow-hidden rounded border border-foreground/[0.08] bg-white",children:l[C.id]?v.jsx("img",{alt:`Slide ${M+1} thumbnail`,className:"absolute inset-0 block size-full object-cover",src:l[C.id]}):v.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/25",children:["Slide ",M+1]})}),v.jsx("div",{className:"flex min-w-0 flex-col justify-between gap-2",children:v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsx("input",{type:"checkbox","aria-label":`Select slide ${M+1}`,checked:g.has(A),onChange:_=>S(A,_.target.checked),className:"mt-0.5 h-3.5 w-3.5 shrink-0 accent-foreground"}),v.jsxs("div",{className:"min-w-0",children:[v.jsx("div",{className:"font-mono text-[11px] text-foreground/45",children:M+1}),v.jsx("div",{className:"mt-0.5 line-clamp-2 text-[12px] font-medium leading-snug text-foreground/75",children:C.title})]})]})})]},C.id):null})})]}):null]}),v.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-foreground/[0.08] px-4 py-3",children:[v.jsx("button",{type:"button",onClick:o,className:"h-8 rounded-md px-3 text-[12px] font-medium text-foreground/60 transition-colors hover:bg-foreground/[0.05] hover:text-foreground",children:"Cancel"}),v.jsx("button",{type:"button",onClick:T,disabled:!p,className:"h-8 rounded-md bg-foreground px-3.5 text-[12px] font-medium text-background transition-colors hover:bg-foreground/90 disabled:cursor-not-allowed disabled:opacity-40",children:"Export PDF"})]})]})})}function Uy({checked:n,disabled:l,icon:o,label:i,detail:s,onChange:u}){return v.jsxs("label",{className:Fe("flex cursor-pointer items-center gap-3 rounded-md border border-foreground/[0.08] px-3 py-2.5 transition-colors",n&&"border-foreground/30 bg-foreground/[0.035]",l?"cursor-not-allowed opacity-45":"hover:border-foreground/20 hover:bg-foreground/[0.03]"),children:[v.jsx("input",{type:"radio",name:"pdf-export-scope",checked:n,disabled:l,onChange:u,className:"h-3.5 w-3.5 accent-foreground"}),v.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-foreground/[0.05]",children:v.jsx(o,{className:"h-4 w-4 text-foreground/65"})}),v.jsxs("div",{className:"min-w-0 flex-1",children:[v.jsx("div",{className:"text-[13px] font-medium text-foreground",children:i}),v.jsx("div",{className:"mt-0.5 truncate text-[11px] text-foreground/50",children:s})]})]})}const Iy=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Gy=Cv,GT=(n,l)=>o=>{var i;if((l==null?void 0:l.variants)==null)return Gy(n,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:s,defaultVariants:u}=l,d=Object.keys(s).map(g=>{const x=o==null?void 0:o[g],p=u==null?void 0:u[g];if(x===null)return null;const S=Iy(x)||Iy(p);return s[g][S]}),m=o&&Object.entries(o).reduce((g,x)=>{let[p,S]=x;return S===void 0||(g[p]=S),g},{}),h=l==null||(i=l.compoundVariants)===null||i===void 0?void 0:i.reduce((g,x)=>{let{class:p,className:S,...T}=x;return Object.entries(T).every(C=>{let[M,A]=C;return Array.isArray(A)?A.includes({...u,...m}[M]):{...u,...m}[M]===A})?[...g,p,S]:g},[]);return Gy(n,d,h,o==null?void 0:o.class,o==null?void 0:o.className)};function Yy(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function Pd(...n){return l=>{let o=!1;const i=n.map(s=>{const u=Yy(s,l);return!o&&typeof u=="function"&&(o=!0),u});if(o)return()=>{for(let s=0;s<i.length;s++){const u=i[s];typeof u=="function"?u():Yy(n[s],null)}}}}function st(...n){return b.useCallback(Pd(...n),n)}function Gr(n){const l=VT(n),o=b.forwardRef((i,s)=>{const{children:u,...d}=i,m=b.Children.toArray(u),h=m.find(PT);if(h){const g=h.props.children,x=m.map(p=>p===h?b.Children.count(g)>1?b.Children.only(null):b.isValidElement(g)?g.props.children:null:p);return v.jsx(l,{...d,ref:s,children:b.isValidElement(g)?b.cloneElement(g,void 0,x):null})}return v.jsx(l,{...d,ref:s,children:u})});return o.displayName=`${n}.Slot`,o}var YT=Gr("Slot");function VT(n){const l=b.forwardRef((o,i)=>{const{children:s,...u}=o;if(b.isValidElement(s)){const d=XT(s),m=$T(u,s.props);return s.type!==b.Fragment&&(m.ref=i?Pd(i,d):d),b.cloneElement(s,m)}return b.Children.count(s)>1?b.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var Iv=Symbol("radix.slottable");function qT(n){const l=({children:o})=>v.jsx(v.Fragment,{children:o});return l.displayName=`${n}.Slottable`,l.__radixId=Iv,l}function PT(n){return b.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Iv}function $T(n,l){const o={...l};for(const i in l){const s=n[i],u=l[i];/^on[A-Z]/.test(i)?s&&u?o[i]=(...m)=>{const h=u(...m);return s(...m),h}:s&&(o[i]=s):i==="style"?o[i]={...s,...u}:i==="className"&&(o[i]=[s,u].filter(Boolean).join(" "))}return{...n,...o}}function XT(n){var i,s;let l=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(s=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:s.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var KT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Je=KT.reduce((n,l)=>{const o=Gr(`Primitive.${l}`),i=b.forwardRef((s,u)=>{const{asChild:d,...m}=s,h=d?o:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(h,{...m,ref:u})});return i.displayName=`Primitive.${l}`,{...n,[l]:i}},{});function Gv(n,l){n&&Zo.flushSync(()=>n.dispatchEvent(l))}var Yv=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"}),FT="VisuallyHidden",Vv=b.forwardRef((n,l)=>v.jsx(Je.span,{...n,ref:l,style:{...Yv,...n.style}}));Vv.displayName=FT;var QT=Vv;function Ql(n,l=[]){let o=[];function i(u,d){const m=b.createContext(d),h=o.length;o=[...o,d];const g=p=>{var _;const{scope:S,children:T,...C}=p,M=((_=S==null?void 0:S[n])==null?void 0:_[h])||m,A=b.useMemo(()=>C,Object.values(C));return v.jsx(M.Provider,{value:A,children:T})};g.displayName=u+"Provider";function x(p,S){var M;const T=((M=S==null?void 0:S[n])==null?void 0:M[h])||m,C=b.useContext(T);if(C)return C;if(d!==void 0)return d;throw new Error(`\`${p}\` must be used within \`${u}\``)}return[g,x]}const s=()=>{const u=o.map(d=>b.createContext(d));return function(m){const h=(m==null?void 0:m[n])||u;return b.useMemo(()=>({[`__scope${n}`]:{...m,[n]:h}}),[m,h])}};return s.scopeName=n,[i,ZT(s,...l)]}function ZT(...n){const l=n[0];if(n.length===1)return l;const o=()=>{const i=n.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(u){const d=i.reduce((m,{useScope:h,scopeName:g})=>{const p=h(u)[`__scope${g}`];return{...m,...p}},{});return b.useMemo(()=>({[`__scope${l.scopeName}`]:d}),[d])}};return o.scopeName=l.scopeName,o}function $d(n){const l=n+"CollectionProvider",[o,i]=Ql(l),[s,u]=o(l,{collectionRef:{current:null},itemMap:new Map}),d=M=>{const{scope:A,children:_}=M,N=pe.useRef(null),D=pe.useRef(new Map).current;return v.jsx(s,{scope:A,itemMap:D,collectionRef:N,children:_})};d.displayName=l;const m=n+"CollectionSlot",h=Gr(m),g=pe.forwardRef((M,A)=>{const{scope:_,children:N}=M,D=u(m,_),V=st(A,D.collectionRef);return v.jsx(h,{ref:V,children:N})});g.displayName=m;const x=n+"CollectionItemSlot",p="data-radix-collection-item",S=Gr(x),T=pe.forwardRef((M,A)=>{const{scope:_,children:N,...D}=M,V=pe.useRef(null),ae=st(A,V),I=u(x,_);return pe.useEffect(()=>(I.itemMap.set(V,{ref:V,...D}),()=>void I.itemMap.delete(V))),v.jsx(S,{[p]:"",ref:ae,children:N})});T.displayName=x;function C(M){const A=u(n+"CollectionConsumer",M);return pe.useCallback(()=>{const N=A.collectionRef.current;if(!N)return[];const D=Array.from(N.querySelectorAll(`[${p}]`));return Array.from(A.itemMap.values()).sort((I,$)=>D.indexOf(I.ref.current)-D.indexOf($.ref.current))},[A.collectionRef,A.itemMap])}return[{Provider:d,Slot:g,ItemSlot:T},C,i]}function Ce(n,l,{checkForDefaultPrevented:o=!0}={}){return function(s){if(n==null||n(s),o===!1||!s.defaultPrevented)return l==null?void 0:l(s)}}var Ft=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},JT=X0[" useInsertionEffect ".trim().toString()]||Ft;function Ps({prop:n,defaultProp:l,onChange:o=()=>{},caller:i}){const[s,u,d]=WT({defaultProp:l,onChange:o}),m=n!==void 0,h=m?n:s;{const x=b.useRef(n!==void 0);b.useEffect(()=>{const p=x.current;p!==m&&console.warn(`${i} is changing from ${p?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=m},[m,i])}const g=b.useCallback(x=>{var p;if(m){const S=eC(x)?x(n):x;S!==n&&((p=d.current)==null||p.call(d,S))}else u(x)},[m,n,u,d]);return[h,g]}function WT({defaultProp:n,onChange:l}){const[o,i]=b.useState(n),s=b.useRef(o),u=b.useRef(l);return JT(()=>{u.current=l},[l]),b.useEffect(()=>{var d;s.current!==o&&((d=u.current)==null||d.call(u,o),s.current=o)},[o,s]),[o,i,u]}function eC(n){return typeof n=="function"}function tC(n,l){return b.useReducer((o,i)=>l[o][i]??o,n)}var Xr=n=>{const{present:l,children:o}=n,i=nC(l),s=typeof o=="function"?o({present:i.isPresent}):b.Children.only(o),u=st(i.ref,aC(s));return typeof o=="function"||i.isPresent?b.cloneElement(s,{ref:u}):null};Xr.displayName="Presence";function nC(n){const[l,o]=b.useState(),i=b.useRef(null),s=b.useRef(n),u=b.useRef("none"),d=n?"mounted":"unmounted",[m,h]=tC(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const g=ws(i.current);u.current=m==="mounted"?g:"none"},[m]),Ft(()=>{const g=i.current,x=s.current;if(x!==n){const S=u.current,T=ws(g);n?h("MOUNT"):T==="none"||(g==null?void 0:g.display)==="none"?h("UNMOUNT"):h(x&&S!==T?"ANIMATION_OUT":"UNMOUNT"),s.current=n}},[n,h]),Ft(()=>{if(l){let g;const x=l.ownerDocument.defaultView??window,p=T=>{const M=ws(i.current).includes(CSS.escape(T.animationName));if(T.target===l&&M&&(h("ANIMATION_END"),!s.current)){const A=l.style.animationFillMode;l.style.animationFillMode="forwards",g=x.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=A)})}},S=T=>{T.target===l&&(u.current=ws(i.current))};return l.addEventListener("animationstart",S),l.addEventListener("animationcancel",p),l.addEventListener("animationend",p),()=>{x.clearTimeout(g),l.removeEventListener("animationstart",S),l.removeEventListener("animationcancel",p),l.removeEventListener("animationend",p)}}else h("ANIMATION_END")},[l,h]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:b.useCallback(g=>{i.current=g?getComputedStyle(g):null,o(g)},[])}}function ws(n){return(n==null?void 0:n.animationName)||"none"}function aC(n){var i,s;let l=(i=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:i.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(s=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:s.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var lC=X0[" useId ".trim().toString()]||(()=>{}),rC=0;function Yr(n){const[l,o]=b.useState(lC());return Ft(()=>{o(i=>i??String(rC++))},[n]),n||(l?`radix-${l}`:"")}var oC=b.createContext(void 0);function Xd(n){const l=b.useContext(oC);return n||l||"ltr"}function Bn(n){const l=b.useRef(n);return b.useEffect(()=>{l.current=n}),b.useMemo(()=>(...o)=>{var i;return(i=l.current)==null?void 0:i.call(l,...o)},[])}function iC(n,l=globalThis==null?void 0:globalThis.document){const o=Bn(n);b.useEffect(()=>{const i=s=>{s.key==="Escape"&&o(s)};return l.addEventListener("keydown",i,{capture:!0}),()=>l.removeEventListener("keydown",i,{capture:!0})},[o,l])}var sC="DismissableLayer",hd="dismissableLayer.update",cC="dismissableLayer.pointerDownOutside",uC="dismissableLayer.focusOutside",Vy,qv=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lc=b.forwardRef((n,l)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:d,onDismiss:m,...h}=n,g=b.useContext(qv),[x,p]=b.useState(null),S=(x==null?void 0:x.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,T]=b.useState({}),C=st(l,$=>p($)),M=Array.from(g.layers),[A]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),_=M.indexOf(A),N=x?M.indexOf(x):-1,D=g.layersWithOutsidePointerEventsDisabled.size>0,V=N>=_,ae=mC($=>{const z=$.target,F=[...g.branches].some(ne=>ne.contains(z));!V||F||(s==null||s($),d==null||d($),$.defaultPrevented||m==null||m())},S),I=hC($=>{const z=$.target;[...g.branches].some(ne=>ne.contains(z))||(u==null||u($),d==null||d($),$.defaultPrevented||m==null||m())},S);return iC($=>{N===g.layers.size-1&&(i==null||i($),!$.defaultPrevented&&m&&($.preventDefault(),m()))},S),b.useEffect(()=>{if(x)return o&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(Vy=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(x)),g.layers.add(x),qy(),()=>{o&&g.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=Vy)}},[x,S,o,g]),b.useEffect(()=>()=>{x&&(g.layers.delete(x),g.layersWithOutsidePointerEventsDisabled.delete(x),qy())},[x,g]),b.useEffect(()=>{const $=()=>T({});return document.addEventListener(hd,$),()=>document.removeEventListener(hd,$)},[]),v.jsx(Je.div,{...h,ref:C,style:{pointerEvents:D?V?"auto":"none":void 0,...n.style},onFocusCapture:Ce(n.onFocusCapture,I.onFocusCapture),onBlurCapture:Ce(n.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Ce(n.onPointerDownCapture,ae.onPointerDownCapture)})});lc.displayName=sC;var fC="DismissableLayerBranch",dC=b.forwardRef((n,l)=>{const o=b.useContext(qv),i=b.useRef(null),s=st(l,i);return b.useEffect(()=>{const u=i.current;if(u)return o.branches.add(u),()=>{o.branches.delete(u)}},[o.branches]),v.jsx(Je.div,{...n,ref:s})});dC.displayName=fC;function mC(n,l=globalThis==null?void 0:globalThis.document){const o=Bn(n),i=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const u=m=>{if(m.target&&!i.current){let h=function(){Pv(cC,o,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(l.removeEventListener("click",s.current),s.current=h,l.addEventListener("click",s.current,{once:!0})):h()}else l.removeEventListener("click",s.current);i.current=!1},d=window.setTimeout(()=>{l.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),l.removeEventListener("pointerdown",u),l.removeEventListener("click",s.current)}},[l,o]),{onPointerDownCapture:()=>i.current=!0}}function hC(n,l=globalThis==null?void 0:globalThis.document){const o=Bn(n),i=b.useRef(!1);return b.useEffect(()=>{const s=u=>{u.target&&!i.current&&Pv(uC,o,{originalEvent:u},{discrete:!1})};return l.addEventListener("focusin",s),()=>l.removeEventListener("focusin",s)},[l,o]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function qy(){const n=new CustomEvent(hd);document.dispatchEvent(n)}function Pv(n,l,o,{discrete:i}){const s=o.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});l&&s.addEventListener(n,l,{once:!0}),i?Gv(s,u):s.dispatchEvent(u)}var Bf="focusScope.autoFocusOnMount",Uf="focusScope.autoFocusOnUnmount",Py={bubbles:!1,cancelable:!0},pC="FocusScope",Kd=b.forwardRef((n,l)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:u,...d}=n,[m,h]=b.useState(null),g=Bn(s),x=Bn(u),p=b.useRef(null),S=st(l,M=>h(M)),T=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(i){let M=function(D){if(T.paused||!m)return;const V=D.target;m.contains(V)?p.current=V:cl(p.current,{select:!0})},A=function(D){if(T.paused||!m)return;const V=D.relatedTarget;V!==null&&(m.contains(V)||cl(p.current,{select:!0}))},_=function(D){if(document.activeElement===document.body)for(const ae of D)ae.removedNodes.length>0&&cl(m)};document.addEventListener("focusin",M),document.addEventListener("focusout",A);const N=new MutationObserver(_);return m&&N.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",M),document.removeEventListener("focusout",A),N.disconnect()}}},[i,m,T.paused]),b.useEffect(()=>{if(m){Xy.add(T);const M=document.activeElement;if(!m.contains(M)){const _=new CustomEvent(Bf,Py);m.addEventListener(Bf,g),m.dispatchEvent(_),_.defaultPrevented||(gC(SC($v(m)),{select:!0}),document.activeElement===M&&cl(m))}return()=>{m.removeEventListener(Bf,g),setTimeout(()=>{const _=new CustomEvent(Uf,Py);m.addEventListener(Uf,x),m.dispatchEvent(_),_.defaultPrevented||cl(M??document.body,{select:!0}),m.removeEventListener(Uf,x),Xy.remove(T)},0)}}},[m,g,x,T]);const C=b.useCallback(M=>{if(!o&&!i||T.paused)return;const A=M.key==="Tab"&&!M.altKey&&!M.ctrlKey&&!M.metaKey,_=document.activeElement;if(A&&_){const N=M.currentTarget,[D,V]=yC(N);D&&V?!M.shiftKey&&_===V?(M.preventDefault(),o&&cl(D,{select:!0})):M.shiftKey&&_===D&&(M.preventDefault(),o&&cl(V,{select:!0})):_===N&&M.preventDefault()}},[o,i,T.paused]);return v.jsx(Je.div,{tabIndex:-1,...d,ref:S,onKeyDown:C})});Kd.displayName=pC;function gC(n,{select:l=!1}={}){const o=document.activeElement;for(const i of n)if(cl(i,{select:l}),document.activeElement!==o)return}function yC(n){const l=$v(n),o=$y(l,n),i=$y(l.reverse(),n);return[o,i]}function $v(n){const l=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)l.push(o.currentNode);return l}function $y(n,l){for(const o of n)if(!vC(o,{upTo:l}))return o}function vC(n,{upTo:l}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(l!==void 0&&n===l)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function bC(n){return n instanceof HTMLInputElement&&"select"in n}function cl(n,{select:l=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&bC(n)&&l&&n.select()}}var Xy=xC();function xC(){let n=[];return{add(l){const o=n[0];l!==o&&(o==null||o.pause()),n=Ky(n,l),n.unshift(l)},remove(l){var o;n=Ky(n,l),(o=n[0])==null||o.resume()}}}function Ky(n,l){const o=[...n],i=o.indexOf(l);return i!==-1&&o.splice(i,1),o}function SC(n){return n.filter(l=>l.tagName!=="A")}var wC="Portal",Fd=b.forwardRef((n,l)=>{var m;const{container:o,...i}=n,[s,u]=b.useState(!1);Ft(()=>u(!0),[]);const d=o||s&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return d?F0.createPortal(v.jsx(Je.div,{...i,ref:l}),d):null});Fd.displayName=wC;var If=0;function Xv(){b.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??Fy()),document.body.insertAdjacentElement("beforeend",n[1]??Fy()),If++,()=>{If===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(l=>l.remove()),If--}},[])}function Fy(){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 la=function(){return la=Object.assign||function(l){for(var o,i=1,s=arguments.length;i<s;i++){o=arguments[i];for(var u in o)Object.prototype.hasOwnProperty.call(o,u)&&(l[u]=o[u])}return l},la.apply(this,arguments)};function Kv(n,l){var o={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&l.indexOf(i)<0&&(o[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(n);s<i.length;s++)l.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(n,i[s])&&(o[i[s]]=n[i[s]]);return o}function EC(n,l,o){if(o||arguments.length===2)for(var i=0,s=l.length,u;i<s;i++)(u||!(i in l))&&(u||(u=Array.prototype.slice.call(l,0,i)),u[i]=l[i]);return n.concat(u||Array.prototype.slice.call(l))}var ks="right-scroll-bar-position",Ls="width-before-scroll-bar",TC="with-scroll-bars-hidden",CC="--removed-body-scroll-bar-size";function Gf(n,l){return typeof n=="function"?n(l):n&&(n.current=l),n}function MC(n,l){var o=b.useState(function(){return{value:n,callback:l,facade:{get current(){return o.value},set current(i){var s=o.value;s!==i&&(o.value=i,o.callback(i,s))}}}})[0];return o.callback=l,o.facade}var AC=typeof window<"u"?b.useLayoutEffect:b.useEffect,Qy=new WeakMap;function _C(n,l){var o=MC(null,function(i){return n.forEach(function(s){return Gf(s,i)})});return AC(function(){var i=Qy.get(o);if(i){var s=new Set(i),u=new Set(n),d=o.current;s.forEach(function(m){u.has(m)||Gf(m,null)}),u.forEach(function(m){s.has(m)||Gf(m,d)})}Qy.set(o,n)},[n]),o}function RC(n){return n}function NC(n,l){l===void 0&&(l=RC);var o=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:n},useMedium:function(u){var d=l(u,i);return o.push(d),function(){o=o.filter(function(m){return m!==d})}},assignSyncMedium:function(u){for(i=!0;o.length;){var d=o;o=[],d.forEach(u)}o={push:function(m){return u(m)},filter:function(){return o}}},assignMedium:function(u){i=!0;var d=[];if(o.length){var m=o;o=[],m.forEach(u),d=o}var h=function(){var x=d;d=[],x.forEach(u)},g=function(){return Promise.resolve().then(h)};g(),o={push:function(x){d.push(x),g()},filter:function(x){return d=d.filter(x),o}}}};return s}function OC(n){n===void 0&&(n={});var l=NC(null);return l.options=la({async:!0,ssr:!1},n),l}var Fv=function(n){var l=n.sideCar,o=Kv(n,["sideCar"]);if(!l)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=l.read();if(!i)throw new Error("Sidecar medium not found");return b.createElement(i,la({},o))};Fv.isSideCarExport=!0;function zC(n,l){return n.useMedium(l),Fv}var Qv=OC(),Yf=function(){},rc=b.forwardRef(function(n,l){var o=b.useRef(null),i=b.useState({onScrollCapture:Yf,onWheelCapture:Yf,onTouchMoveCapture:Yf}),s=i[0],u=i[1],d=n.forwardProps,m=n.children,h=n.className,g=n.removeScrollBar,x=n.enabled,p=n.shards,S=n.sideCar,T=n.noRelative,C=n.noIsolation,M=n.inert,A=n.allowPinchZoom,_=n.as,N=_===void 0?"div":_,D=n.gapMode,V=Kv(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),ae=S,I=_C([o,l]),$=la(la({},V),s);return b.createElement(b.Fragment,null,x&&b.createElement(ae,{sideCar:Qv,removeScrollBar:g,shards:p,noRelative:T,noIsolation:C,inert:M,setCallbacks:u,allowPinchZoom:!!A,lockRef:o,gapMode:D}),d?b.cloneElement(b.Children.only(m),la(la({},$),{ref:I})):b.createElement(N,la({},$,{className:h,ref:I}),m))});rc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rc.classNames={fullWidth:Ls,zeroRight:ks};var DC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jC(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var l=DC();return l&&n.setAttribute("nonce",l),n}function kC(n,l){n.styleSheet?n.styleSheet.cssText=l:n.appendChild(document.createTextNode(l))}function LC(n){var l=document.head||document.getElementsByTagName("head")[0];l.appendChild(n)}var HC=function(){var n=0,l=null;return{add:function(o){n==0&&(l=jC())&&(kC(l,o),LC(l)),n++},remove:function(){n--,!n&&l&&(l.parentNode&&l.parentNode.removeChild(l),l=null)}}},BC=function(){var n=HC();return function(l,o){b.useEffect(function(){return n.add(l),function(){n.remove()}},[l&&o])}},Zv=function(){var n=BC(),l=function(o){var i=o.styles,s=o.dynamic;return n(i,s),null};return l},UC={left:0,top:0,right:0,gap:0},Vf=function(n){return parseInt(n||"",10)||0},IC=function(n){var l=window.getComputedStyle(document.body),o=l[n==="padding"?"paddingLeft":"marginLeft"],i=l[n==="padding"?"paddingTop":"marginTop"],s=l[n==="padding"?"paddingRight":"marginRight"];return[Vf(o),Vf(i),Vf(s)]},GC=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return UC;var l=IC(n),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,i-o+l[2]-l[0])}},YC=Zv(),Ur="data-scroll-locked",VC=function(n,l,o,i){var s=n.left,u=n.top,d=n.right,m=n.gap;return o===void 0&&(o="margin"),`
|
|
341
|
+
.`.concat(TC,` {
|
|
342
|
+
overflow: hidden `).concat(i,`;
|
|
343
|
+
padding-right: `).concat(m,"px ").concat(i,`;
|
|
344
|
+
}
|
|
345
|
+
body[`).concat(Ur,`] {
|
|
346
|
+
overflow: hidden `).concat(i,`;
|
|
347
|
+
overscroll-behavior: contain;
|
|
348
|
+
`).concat([l&&"position: relative ".concat(i,";"),o==="margin"&&`
|
|
349
|
+
padding-left: `.concat(s,`px;
|
|
350
|
+
padding-top: `).concat(u,`px;
|
|
351
|
+
padding-right: `).concat(d,`px;
|
|
352
|
+
margin-left:0;
|
|
353
|
+
margin-top:0;
|
|
354
|
+
margin-right: `).concat(m,"px ").concat(i,`;
|
|
355
|
+
`),o==="padding"&&"padding-right: ".concat(m,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.`).concat(ks,` {
|
|
359
|
+
right: `).concat(m,"px ").concat(i,`;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.`).concat(Ls,` {
|
|
363
|
+
margin-right: `).concat(m,"px ").concat(i,`;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.`).concat(ks," .").concat(ks,` {
|
|
367
|
+
right: 0 `).concat(i,`;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.`).concat(Ls," .").concat(Ls,` {
|
|
371
|
+
margin-right: 0 `).concat(i,`;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
body[`).concat(Ur,`] {
|
|
375
|
+
`).concat(CC,": ").concat(m,`px;
|
|
376
|
+
}
|
|
377
|
+
`)},Zy=function(){var n=parseInt(document.body.getAttribute(Ur)||"0",10);return isFinite(n)?n:0},qC=function(){b.useEffect(function(){return document.body.setAttribute(Ur,(Zy()+1).toString()),function(){var n=Zy()-1;n<=0?document.body.removeAttribute(Ur):document.body.setAttribute(Ur,n.toString())}},[])},PC=function(n){var l=n.noRelative,o=n.noImportant,i=n.gapMode,s=i===void 0?"margin":i;qC();var u=b.useMemo(function(){return GC(s)},[s]);return b.createElement(YC,{styles:VC(u,!l,s,o?"":"!important")})},pd=!1;if(typeof window<"u")try{var Es=Object.defineProperty({},"passive",{get:function(){return pd=!0,!0}});window.addEventListener("test",Es,Es),window.removeEventListener("test",Es,Es)}catch{pd=!1}var zr=pd?{passive:!1}:!1,$C=function(n){return n.tagName==="TEXTAREA"},Jv=function(n,l){if(!(n instanceof Element))return!1;var o=window.getComputedStyle(n);return o[l]!=="hidden"&&!(o.overflowY===o.overflowX&&!$C(n)&&o[l]==="visible")},XC=function(n){return Jv(n,"overflowY")},KC=function(n){return Jv(n,"overflowX")},Jy=function(n,l){var o=l.ownerDocument,i=l;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=Wv(n,i);if(s){var u=eb(n,i),d=u[1],m=u[2];if(d>m)return!0}i=i.parentNode}while(i&&i!==o.body);return!1},FC=function(n){var l=n.scrollTop,o=n.scrollHeight,i=n.clientHeight;return[l,o,i]},QC=function(n){var l=n.scrollLeft,o=n.scrollWidth,i=n.clientWidth;return[l,o,i]},Wv=function(n,l){return n==="v"?XC(l):KC(l)},eb=function(n,l){return n==="v"?FC(l):QC(l)},ZC=function(n,l){return n==="h"&&l==="rtl"?-1:1},JC=function(n,l,o,i,s){var u=ZC(n,window.getComputedStyle(l).direction),d=u*i,m=o.target,h=l.contains(m),g=!1,x=d>0,p=0,S=0;do{if(!m)break;var T=eb(n,m),C=T[0],M=T[1],A=T[2],_=M-A-u*C;(C||_)&&Wv(n,m)&&(p+=_,S+=C);var N=m.parentNode;m=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!h&&m!==document.body||h&&(l.contains(m)||l===m));return(x&&Math.abs(p)<1||!x&&Math.abs(S)<1)&&(g=!0),g},Ts=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},Wy=function(n){return[n.deltaX,n.deltaY]},e0=function(n){return n&&"current"in n?n.current:n},WC=function(n,l){return n[0]===l[0]&&n[1]===l[1]},eM=function(n){return`
|
|
378
|
+
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
379
|
+
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
380
|
+
`)},tM=0,Dr=[];function nM(n){var l=b.useRef([]),o=b.useRef([0,0]),i=b.useRef(),s=b.useState(tM++)[0],u=b.useState(Zv)[0],d=b.useRef(n);b.useEffect(function(){d.current=n},[n]),b.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(s));var M=EC([n.lockRef.current],(n.shards||[]).map(e0),!0).filter(Boolean);return M.forEach(function(A){return A.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),M.forEach(function(A){return A.classList.remove("allow-interactivity-".concat(s))})}}},[n.inert,n.lockRef.current,n.shards]);var m=b.useCallback(function(M,A){if("touches"in M&&M.touches.length===2||M.type==="wheel"&&M.ctrlKey)return!d.current.allowPinchZoom;var _=Ts(M),N=o.current,D="deltaX"in M?M.deltaX:N[0]-_[0],V="deltaY"in M?M.deltaY:N[1]-_[1],ae,I=M.target,$=Math.abs(D)>Math.abs(V)?"h":"v";if("touches"in M&&$==="h"&&I.type==="range")return!1;var z=window.getSelection(),F=z&&z.anchorNode,ne=F?F===I||F.contains(I):!1;if(ne)return!1;var re=Jy($,I);if(!re)return!0;if(re?ae=$:(ae=$==="v"?"h":"v",re=Jy($,I)),!re)return!1;if(!i.current&&"changedTouches"in M&&(D||V)&&(i.current=ae),!ae)return!0;var q=i.current||ae;return JC(q,A,M,q==="h"?D:V)},[]),h=b.useCallback(function(M){var A=M;if(!(!Dr.length||Dr[Dr.length-1]!==u)){var _="deltaY"in A?Wy(A):Ts(A),N=l.current.filter(function(ae){return ae.name===A.type&&(ae.target===A.target||A.target===ae.shadowParent)&&WC(ae.delta,_)})[0];if(N&&N.should){A.cancelable&&A.preventDefault();return}if(!N){var D=(d.current.shards||[]).map(e0).filter(Boolean).filter(function(ae){return ae.contains(A.target)}),V=D.length>0?m(A,D[0]):!d.current.noIsolation;V&&A.cancelable&&A.preventDefault()}}},[]),g=b.useCallback(function(M,A,_,N){var D={name:M,delta:A,target:_,should:N,shadowParent:aM(_)};l.current.push(D),setTimeout(function(){l.current=l.current.filter(function(V){return V!==D})},1)},[]),x=b.useCallback(function(M){o.current=Ts(M),i.current=void 0},[]),p=b.useCallback(function(M){g(M.type,Wy(M),M.target,m(M,n.lockRef.current))},[]),S=b.useCallback(function(M){g(M.type,Ts(M),M.target,m(M,n.lockRef.current))},[]);b.useEffect(function(){return Dr.push(u),n.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:S}),document.addEventListener("wheel",h,zr),document.addEventListener("touchmove",h,zr),document.addEventListener("touchstart",x,zr),function(){Dr=Dr.filter(function(M){return M!==u}),document.removeEventListener("wheel",h,zr),document.removeEventListener("touchmove",h,zr),document.removeEventListener("touchstart",x,zr)}},[]);var T=n.removeScrollBar,C=n.inert;return b.createElement(b.Fragment,null,C?b.createElement(u,{styles:eM(s)}):null,T?b.createElement(PC,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function aM(n){for(var l=null;n!==null;)n instanceof ShadowRoot&&(l=n.host,n=n.host),n=n.parentNode;return l}const lM=zC(Qv,nM);var Qd=b.forwardRef(function(n,l){return b.createElement(rc,la({},n,{ref:l,sideCar:lM}))});Qd.classNames=rc.classNames;var rM=function(n){if(typeof document>"u")return null;var l=Array.isArray(n)?n[0]:n;return l.ownerDocument.body},jr=new WeakMap,Cs=new WeakMap,Ms={},qf=0,tb=function(n){return n&&(n.host||tb(n.parentNode))},oM=function(n,l){return l.map(function(o){if(n.contains(o))return o;var i=tb(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})},iM=function(n,l,o,i){var s=oM(l,Array.isArray(n)?n:[n]);Ms[o]||(Ms[o]=new WeakMap);var u=Ms[o],d=[],m=new Set,h=new Set(s),g=function(p){!p||m.has(p)||(m.add(p),g(p.parentNode))};s.forEach(g);var x=function(p){!p||h.has(p)||Array.prototype.forEach.call(p.children,function(S){if(m.has(S))x(S);else try{var T=S.getAttribute(i),C=T!==null&&T!=="false",M=(jr.get(S)||0)+1,A=(u.get(S)||0)+1;jr.set(S,M),u.set(S,A),d.push(S),M===1&&C&&Cs.set(S,!0),A===1&&S.setAttribute(o,"true"),C||S.setAttribute(i,"true")}catch(_){console.error("aria-hidden: cannot operate on ",S,_)}})};return x(l),m.clear(),qf++,function(){d.forEach(function(p){var S=jr.get(p)-1,T=u.get(p)-1;jr.set(p,S),u.set(p,T),S||(Cs.has(p)||p.removeAttribute(i),Cs.delete(p)),T||p.removeAttribute(o)}),qf--,qf||(jr=new WeakMap,jr=new WeakMap,Cs=new WeakMap,Ms={})}},nb=function(n,l,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),s=rM(n);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),iM(i,s,o,"aria-hidden")):function(){return null}};function sM(n){const l=b.useRef({value:n,previous:n});return b.useMemo(()=>(l.current.value!==n&&(l.current.previous=l.current.value,l.current.value=n),l.current.previous),[n])}function cM(n){const[l,o]=b.useState(void 0);return Ft(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const u=s[0];let d,m;if("borderBoxSize"in u){const h=u.borderBoxSize,g=Array.isArray(h)?h[0]:h;d=g.inlineSize,m=g.blockSize}else d=n.offsetWidth,m=n.offsetHeight;o({width:d,height:m})});return i.observe(n,{box:"border-box"}),()=>i.unobserve(n)}else o(void 0)},[n]),l}const uM=["top","right","bottom","left"],ml=Math.min,Sn=Math.max,$s=Math.round,As=Math.floor,oa=n=>({x:n,y:n}),fM={left:"right",right:"left",bottom:"top",top:"bottom"};function gd(n,l,o){return Sn(n,ml(l,o))}function Oa(n,l){return typeof n=="function"?n(l):n}function za(n){return n.split("-")[0]}function Kr(n){return n.split("-")[1]}function Zd(n){return n==="x"?"y":"x"}function Jd(n){return n==="y"?"height":"width"}function ra(n){const l=n[0];return l==="t"||l==="b"?"y":"x"}function Wd(n){return Zd(ra(n))}function dM(n,l,o){o===void 0&&(o=!1);const i=Kr(n),s=Wd(n),u=Jd(s);let d=s==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return l.reference[u]>l.floating[u]&&(d=Xs(d)),[d,Xs(d)]}function mM(n){const l=Xs(n);return[yd(n),l,yd(l)]}function yd(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const t0=["left","right"],n0=["right","left"],hM=["top","bottom"],pM=["bottom","top"];function gM(n,l,o){switch(n){case"top":case"bottom":return o?l?n0:t0:l?t0:n0;case"left":case"right":return l?hM:pM;default:return[]}}function yM(n,l,o,i){const s=Kr(n);let u=gM(za(n),o==="start",i);return s&&(u=u.map(d=>d+"-"+s),l&&(u=u.concat(u.map(yd)))),u}function Xs(n){const l=za(n);return fM[l]+n.slice(l.length)}function vM(n){return{top:0,right:0,bottom:0,left:0,...n}}function ab(n){return typeof n!="number"?vM(n):{top:n,right:n,bottom:n,left:n}}function Ks(n){const{x:l,y:o,width:i,height:s}=n;return{width:i,height:s,top:o,left:l,right:l+i,bottom:o+s,x:l,y:o}}function a0(n,l,o){let{reference:i,floating:s}=n;const u=ra(l),d=Wd(l),m=Jd(d),h=za(l),g=u==="y",x=i.x+i.width/2-s.width/2,p=i.y+i.height/2-s.height/2,S=i[m]/2-s[m]/2;let T;switch(h){case"top":T={x,y:i.y-s.height};break;case"bottom":T={x,y:i.y+i.height};break;case"right":T={x:i.x+i.width,y:p};break;case"left":T={x:i.x-s.width,y:p};break;default:T={x:i.x,y:i.y}}switch(Kr(l)){case"start":T[d]-=S*(o&&g?-1:1);break;case"end":T[d]+=S*(o&&g?-1:1);break}return T}async function bM(n,l){var o;l===void 0&&(l={});const{x:i,y:s,platform:u,rects:d,elements:m,strategy:h}=n,{boundary:g="clippingAncestors",rootBoundary:x="viewport",elementContext:p="floating",altBoundary:S=!1,padding:T=0}=Oa(l,n),C=ab(T),A=m[S?p==="floating"?"reference":"floating":p],_=Ks(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(m.floating)),boundary:g,rootBoundary:x,strategy:h})),N=p==="floating"?{x:i,y:s,width:d.floating.width,height:d.floating.height}:d.reference,D=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m.floating)),V=await(u.isElement==null?void 0:u.isElement(D))?await(u.getScale==null?void 0:u.getScale(D))||{x:1,y:1}:{x:1,y:1},ae=Ks(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:N,offsetParent:D,strategy:h}):N);return{top:(_.top-ae.top+C.top)/V.y,bottom:(ae.bottom-_.bottom+C.bottom)/V.y,left:(_.left-ae.left+C.left)/V.x,right:(ae.right-_.right+C.right)/V.x}}const xM=50,SM=async(n,l,o)=>{const{placement:i="bottom",strategy:s="absolute",middleware:u=[],platform:d}=o,m=d.detectOverflow?d:{...d,detectOverflow:bM},h=await(d.isRTL==null?void 0:d.isRTL(l));let g=await d.getElementRects({reference:n,floating:l,strategy:s}),{x,y:p}=a0(g,i,h),S=i,T=0;const C={};for(let M=0;M<u.length;M++){const A=u[M];if(!A)continue;const{name:_,fn:N}=A,{x:D,y:V,data:ae,reset:I}=await N({x,y:p,initialPlacement:i,placement:S,strategy:s,middlewareData:C,rects:g,platform:m,elements:{reference:n,floating:l}});x=D??x,p=V??p,C[_]={...C[_],...ae},I&&T<xM&&(T++,typeof I=="object"&&(I.placement&&(S=I.placement),I.rects&&(g=I.rects===!0?await d.getElementRects({reference:n,floating:l,strategy:s}):I.rects),{x,y:p}=a0(g,S,h)),M=-1)}return{x,y:p,placement:S,strategy:s,middlewareData:C}},wM=n=>({name:"arrow",options:n,async fn(l){const{x:o,y:i,placement:s,rects:u,platform:d,elements:m,middlewareData:h}=l,{element:g,padding:x=0}=Oa(n,l)||{};if(g==null)return{};const p=ab(x),S={x:o,y:i},T=Wd(s),C=Jd(T),M=await d.getDimensions(g),A=T==="y",_=A?"top":"left",N=A?"bottom":"right",D=A?"clientHeight":"clientWidth",V=u.reference[C]+u.reference[T]-S[T]-u.floating[C],ae=S[T]-u.reference[T],I=await(d.getOffsetParent==null?void 0:d.getOffsetParent(g));let $=I?I[D]:0;(!$||!await(d.isElement==null?void 0:d.isElement(I)))&&($=m.floating[D]||u.floating[C]);const z=V/2-ae/2,F=$/2-M[C]/2-1,ne=ml(p[_],F),re=ml(p[N],F),q=ne,H=$-M[C]-re,Y=$/2-M[C]/2+z,ee=gd(q,Y,H),E=!h.arrow&&Kr(s)!=null&&Y!==ee&&u.reference[C]/2-(Y<q?ne:re)-M[C]/2<0,j=E?Y<q?Y-q:Y-H:0;return{[T]:S[T]+j,data:{[T]:ee,centerOffset:Y-ee-j,...E&&{alignmentOffset:j}},reset:E}}}),EM=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var o,i;const{placement:s,middlewareData:u,rects:d,initialPlacement:m,platform:h,elements:g}=l,{mainAxis:x=!0,crossAxis:p=!0,fallbackPlacements:S,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:M=!0,...A}=Oa(n,l);if((o=u.arrow)!=null&&o.alignmentOffset)return{};const _=za(s),N=ra(m),D=za(m)===m,V=await(h.isRTL==null?void 0:h.isRTL(g.floating)),ae=S||(D||!M?[Xs(m)]:mM(m)),I=C!=="none";!S&&I&&ae.push(...yM(m,M,C,V));const $=[m,...ae],z=await h.detectOverflow(l,A),F=[];let ne=((i=u.flip)==null?void 0:i.overflows)||[];if(x&&F.push(z[_]),p){const Y=dM(s,d,V);F.push(z[Y[0]],z[Y[1]])}if(ne=[...ne,{placement:s,overflows:F}],!F.every(Y=>Y<=0)){var re,q;const Y=(((re=u.flip)==null?void 0:re.index)||0)+1,ee=$[Y];if(ee&&(!(p==="alignment"?N!==ra(ee):!1)||ne.every(B=>ra(B.placement)===N?B.overflows[0]>0:!0)))return{data:{index:Y,overflows:ne},reset:{placement:ee}};let E=(q=ne.filter(j=>j.overflows[0]<=0).sort((j,B)=>j.overflows[1]-B.overflows[1])[0])==null?void 0:q.placement;if(!E)switch(T){case"bestFit":{var H;const j=(H=ne.filter(B=>{if(I){const P=ra(B.placement);return P===N||P==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(P=>P>0).reduce((P,L)=>P+L,0)]).sort((B,P)=>B[1]-P[1])[0])==null?void 0:H[0];j&&(E=j);break}case"initialPlacement":E=m;break}if(s!==E)return{reset:{placement:E}}}return{}}}};function l0(n,l){return{top:n.top-l.height,right:n.right-l.width,bottom:n.bottom-l.height,left:n.left-l.width}}function r0(n){return uM.some(l=>n[l]>=0)}const TM=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(l){const{rects:o,platform:i}=l,{strategy:s="referenceHidden",...u}=Oa(n,l);switch(s){case"referenceHidden":{const d=await i.detectOverflow(l,{...u,elementContext:"reference"}),m=l0(d,o.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:r0(m)}}}case"escaped":{const d=await i.detectOverflow(l,{...u,altBoundary:!0}),m=l0(d,o.floating);return{data:{escapedOffsets:m,escaped:r0(m)}}}default:return{}}}}},lb=new Set(["left","top"]);async function CM(n,l){const{placement:o,platform:i,elements:s}=n,u=await(i.isRTL==null?void 0:i.isRTL(s.floating)),d=za(o),m=Kr(o),h=ra(o)==="y",g=lb.has(d)?-1:1,x=u&&h?-1:1,p=Oa(l,n);let{mainAxis:S,crossAxis:T,alignmentAxis:C}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return m&&typeof C=="number"&&(T=m==="end"?C*-1:C),h?{x:T*x,y:S*g}:{x:S*g,y:T*x}}const MM=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var o,i;const{x:s,y:u,placement:d,middlewareData:m}=l,h=await CM(l,n);return d===((o=m.offset)==null?void 0:o.placement)&&(i=m.arrow)!=null&&i.alignmentOffset?{}:{x:s+h.x,y:u+h.y,data:{...h,placement:d}}}}},AM=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:o,y:i,placement:s,platform:u}=l,{mainAxis:d=!0,crossAxis:m=!1,limiter:h={fn:_=>{let{x:N,y:D}=_;return{x:N,y:D}}},...g}=Oa(n,l),x={x:o,y:i},p=await u.detectOverflow(l,g),S=ra(za(s)),T=Zd(S);let C=x[T],M=x[S];if(d){const _=T==="y"?"top":"left",N=T==="y"?"bottom":"right",D=C+p[_],V=C-p[N];C=gd(D,C,V)}if(m){const _=S==="y"?"top":"left",N=S==="y"?"bottom":"right",D=M+p[_],V=M-p[N];M=gd(D,M,V)}const A=h.fn({...l,[T]:C,[S]:M});return{...A,data:{x:A.x-o,y:A.y-i,enabled:{[T]:d,[S]:m}}}}}},_M=function(n){return n===void 0&&(n={}),{options:n,fn(l){const{x:o,y:i,placement:s,rects:u,middlewareData:d}=l,{offset:m=0,mainAxis:h=!0,crossAxis:g=!0}=Oa(n,l),x={x:o,y:i},p=ra(s),S=Zd(p);let T=x[S],C=x[p];const M=Oa(m,l),A=typeof M=="number"?{mainAxis:M,crossAxis:0}:{mainAxis:0,crossAxis:0,...M};if(h){const D=S==="y"?"height":"width",V=u.reference[S]-u.floating[D]+A.mainAxis,ae=u.reference[S]+u.reference[D]-A.mainAxis;T<V?T=V:T>ae&&(T=ae)}if(g){var _,N;const D=S==="y"?"width":"height",V=lb.has(za(s)),ae=u.reference[p]-u.floating[D]+(V&&((_=d.offset)==null?void 0:_[p])||0)+(V?0:A.crossAxis),I=u.reference[p]+u.reference[D]+(V?0:((N=d.offset)==null?void 0:N[p])||0)-(V?A.crossAxis:0);C<ae?C=ae:C>I&&(C=I)}return{[S]:T,[p]:C}}}},RM=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(l){var o,i;const{placement:s,rects:u,platform:d,elements:m}=l,{apply:h=()=>{},...g}=Oa(n,l),x=await d.detectOverflow(l,g),p=za(s),S=Kr(s),T=ra(s)==="y",{width:C,height:M}=u.floating;let A,_;p==="top"||p==="bottom"?(A=p,_=S===(await(d.isRTL==null?void 0:d.isRTL(m.floating))?"start":"end")?"left":"right"):(_=p,A=S==="end"?"top":"bottom");const N=M-x.top-x.bottom,D=C-x.left-x.right,V=ml(M-x[A],N),ae=ml(C-x[_],D),I=!l.middlewareData.shift;let $=V,z=ae;if((o=l.middlewareData.shift)!=null&&o.enabled.x&&(z=D),(i=l.middlewareData.shift)!=null&&i.enabled.y&&($=N),I&&!S){const ne=Sn(x.left,0),re=Sn(x.right,0),q=Sn(x.top,0),H=Sn(x.bottom,0);T?z=C-2*(ne!==0||re!==0?ne+re:Sn(x.left,x.right)):$=M-2*(q!==0||H!==0?q+H:Sn(x.top,x.bottom))}await h({...l,availableWidth:z,availableHeight:$});const F=await d.getDimensions(m.floating);return C!==F.width||M!==F.height?{reset:{rects:!0}}:{}}}};function oc(){return typeof window<"u"}function Fr(n){return rb(n)?(n.nodeName||"").toLowerCase():"#document"}function En(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function ia(n){var l;return(l=(rb(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function rb(n){return oc()?n instanceof Node||n instanceof En(n).Node:!1}function Xn(n){return oc()?n instanceof Element||n instanceof En(n).Element:!1}function Da(n){return oc()?n instanceof HTMLElement||n instanceof En(n).HTMLElement:!1}function o0(n){return!oc()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof En(n).ShadowRoot}function Wo(n){const{overflow:l,overflowX:o,overflowY:i,display:s}=Kn(n);return/auto|scroll|overlay|hidden|clip/.test(l+i+o)&&s!=="inline"&&s!=="contents"}function NM(n){return/^(table|td|th)$/.test(Fr(n))}function ic(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const OM=/transform|translate|scale|rotate|perspective|filter/,zM=/paint|layout|strict|content/,Gl=n=>!!n&&n!=="none";let Pf;function em(n){const l=Xn(n)?Kn(n):n;return Gl(l.transform)||Gl(l.translate)||Gl(l.scale)||Gl(l.rotate)||Gl(l.perspective)||!tm()&&(Gl(l.backdropFilter)||Gl(l.filter))||OM.test(l.willChange||"")||zM.test(l.contain||"")}function DM(n){let l=hl(n);for(;Da(l)&&!Vr(l);){if(em(l))return l;if(ic(l))return null;l=hl(l)}return null}function tm(){return Pf==null&&(Pf=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pf}function Vr(n){return/^(html|body|#document)$/.test(Fr(n))}function Kn(n){return En(n).getComputedStyle(n)}function sc(n){return Xn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function hl(n){if(Fr(n)==="html")return n;const l=n.assignedSlot||n.parentNode||o0(n)&&n.host||ia(n);return o0(l)?l.host:l}function ob(n){const l=hl(n);return Vr(l)?n.ownerDocument?n.ownerDocument.body:n.body:Da(l)&&Wo(l)?l:ob(l)}function Ko(n,l,o){var i;l===void 0&&(l=[]),o===void 0&&(o=!0);const s=ob(n),u=s===((i=n.ownerDocument)==null?void 0:i.body),d=En(s);if(u){const m=vd(d);return l.concat(d,d.visualViewport||[],Wo(s)?s:[],m&&o?Ko(m):[])}else return l.concat(s,Ko(s,[],o))}function vd(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function ib(n){const l=Kn(n);let o=parseFloat(l.width)||0,i=parseFloat(l.height)||0;const s=Da(n),u=s?n.offsetWidth:o,d=s?n.offsetHeight:i,m=$s(o)!==u||$s(i)!==d;return m&&(o=u,i=d),{width:o,height:i,$:m}}function nm(n){return Xn(n)?n:n.contextElement}function Ir(n){const l=nm(n);if(!Da(l))return oa(1);const o=l.getBoundingClientRect(),{width:i,height:s,$:u}=ib(l);let d=(u?$s(o.width):o.width)/i,m=(u?$s(o.height):o.height)/s;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const jM=oa(0);function sb(n){const l=En(n);return!tm()||!l.visualViewport?jM:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function kM(n,l,o){return l===void 0&&(l=!1),!o||l&&o!==En(n)?!1:l}function $l(n,l,o,i){l===void 0&&(l=!1),o===void 0&&(o=!1);const s=n.getBoundingClientRect(),u=nm(n);let d=oa(1);l&&(i?Xn(i)&&(d=Ir(i)):d=Ir(n));const m=kM(u,o,i)?sb(u):oa(0);let h=(s.left+m.x)/d.x,g=(s.top+m.y)/d.y,x=s.width/d.x,p=s.height/d.y;if(u){const S=En(u),T=i&&Xn(i)?En(i):i;let C=S,M=vd(C);for(;M&&i&&T!==C;){const A=Ir(M),_=M.getBoundingClientRect(),N=Kn(M),D=_.left+(M.clientLeft+parseFloat(N.paddingLeft))*A.x,V=_.top+(M.clientTop+parseFloat(N.paddingTop))*A.y;h*=A.x,g*=A.y,x*=A.x,p*=A.y,h+=D,g+=V,C=En(M),M=vd(C)}}return Ks({width:x,height:p,x:h,y:g})}function cc(n,l){const o=sc(n).scrollLeft;return l?l.left+o:$l(ia(n)).left+o}function cb(n,l){const o=n.getBoundingClientRect(),i=o.left+l.scrollLeft-cc(n,o),s=o.top+l.scrollTop;return{x:i,y:s}}function LM(n){let{elements:l,rect:o,offsetParent:i,strategy:s}=n;const u=s==="fixed",d=ia(i),m=l?ic(l.floating):!1;if(i===d||m&&u)return o;let h={scrollLeft:0,scrollTop:0},g=oa(1);const x=oa(0),p=Da(i);if((p||!p&&!u)&&((Fr(i)!=="body"||Wo(d))&&(h=sc(i)),p)){const T=$l(i);g=Ir(i),x.x=T.x+i.clientLeft,x.y=T.y+i.clientTop}const S=d&&!p&&!u?cb(d,h):oa(0);return{width:o.width*g.x,height:o.height*g.y,x:o.x*g.x-h.scrollLeft*g.x+x.x+S.x,y:o.y*g.y-h.scrollTop*g.y+x.y+S.y}}function HM(n){return Array.from(n.getClientRects())}function BM(n){const l=ia(n),o=sc(n),i=n.ownerDocument.body,s=Sn(l.scrollWidth,l.clientWidth,i.scrollWidth,i.clientWidth),u=Sn(l.scrollHeight,l.clientHeight,i.scrollHeight,i.clientHeight);let d=-o.scrollLeft+cc(n);const m=-o.scrollTop;return Kn(i).direction==="rtl"&&(d+=Sn(l.clientWidth,i.clientWidth)-s),{width:s,height:u,x:d,y:m}}const i0=25;function UM(n,l){const o=En(n),i=ia(n),s=o.visualViewport;let u=i.clientWidth,d=i.clientHeight,m=0,h=0;if(s){u=s.width,d=s.height;const x=tm();(!x||x&&l==="fixed")&&(m=s.offsetLeft,h=s.offsetTop)}const g=cc(i);if(g<=0){const x=i.ownerDocument,p=x.body,S=getComputedStyle(p),T=x.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,C=Math.abs(i.clientWidth-p.clientWidth-T);C<=i0&&(u-=C)}else g<=i0&&(u+=g);return{width:u,height:d,x:m,y:h}}function IM(n,l){const o=$l(n,!0,l==="fixed"),i=o.top+n.clientTop,s=o.left+n.clientLeft,u=Da(n)?Ir(n):oa(1),d=n.clientWidth*u.x,m=n.clientHeight*u.y,h=s*u.x,g=i*u.y;return{width:d,height:m,x:h,y:g}}function s0(n,l,o){let i;if(l==="viewport")i=UM(n,o);else if(l==="document")i=BM(ia(n));else if(Xn(l))i=IM(l,o);else{const s=sb(n);i={x:l.x-s.x,y:l.y-s.y,width:l.width,height:l.height}}return Ks(i)}function ub(n,l){const o=hl(n);return o===l||!Xn(o)||Vr(o)?!1:Kn(o).position==="fixed"||ub(o,l)}function GM(n,l){const o=l.get(n);if(o)return o;let i=Ko(n,[],!1).filter(m=>Xn(m)&&Fr(m)!=="body"),s=null;const u=Kn(n).position==="fixed";let d=u?hl(n):n;for(;Xn(d)&&!Vr(d);){const m=Kn(d),h=em(d);!h&&m.position==="fixed"&&(s=null),(u?!h&&!s:!h&&m.position==="static"&&!!s&&(s.position==="absolute"||s.position==="fixed")||Wo(d)&&!h&&ub(n,d))?i=i.filter(x=>x!==d):s=m,d=hl(d)}return l.set(n,i),i}function YM(n){let{element:l,boundary:o,rootBoundary:i,strategy:s}=n;const d=[...o==="clippingAncestors"?ic(l)?[]:GM(l,this._c):[].concat(o),i],m=s0(l,d[0],s);let h=m.top,g=m.right,x=m.bottom,p=m.left;for(let S=1;S<d.length;S++){const T=s0(l,d[S],s);h=Sn(T.top,h),g=ml(T.right,g),x=ml(T.bottom,x),p=Sn(T.left,p)}return{width:g-p,height:x-h,x:p,y:h}}function VM(n){const{width:l,height:o}=ib(n);return{width:l,height:o}}function qM(n,l,o){const i=Da(l),s=ia(l),u=o==="fixed",d=$l(n,!0,u,l);let m={scrollLeft:0,scrollTop:0};const h=oa(0);function g(){h.x=cc(s)}if(i||!i&&!u)if((Fr(l)!=="body"||Wo(s))&&(m=sc(l)),i){const T=$l(l,!0,u,l);h.x=T.x+l.clientLeft,h.y=T.y+l.clientTop}else s&&g();u&&!i&&s&&g();const x=s&&!i&&!u?cb(s,m):oa(0),p=d.left+m.scrollLeft-h.x-x.x,S=d.top+m.scrollTop-h.y-x.y;return{x:p,y:S,width:d.width,height:d.height}}function $f(n){return Kn(n).position==="static"}function c0(n,l){if(!Da(n)||Kn(n).position==="fixed")return null;if(l)return l(n);let o=n.offsetParent;return ia(n)===o&&(o=o.ownerDocument.body),o}function fb(n,l){const o=En(n);if(ic(n))return o;if(!Da(n)){let s=hl(n);for(;s&&!Vr(s);){if(Xn(s)&&!$f(s))return s;s=hl(s)}return o}let i=c0(n,l);for(;i&&NM(i)&&$f(i);)i=c0(i,l);return i&&Vr(i)&&$f(i)&&!em(i)?o:i||DM(n)||o}const PM=async function(n){const l=this.getOffsetParent||fb,o=this.getDimensions,i=await o(n.floating);return{reference:qM(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function $M(n){return Kn(n).direction==="rtl"}const XM={convertOffsetParentRelativeRectToViewportRelativeRect:LM,getDocumentElement:ia,getClippingRect:YM,getOffsetParent:fb,getElementRects:PM,getClientRects:HM,getDimensions:VM,getScale:Ir,isElement:Xn,isRTL:$M};function db(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function KM(n,l){let o=null,i;const s=ia(n);function u(){var m;clearTimeout(i),(m=o)==null||m.disconnect(),o=null}function d(m,h){m===void 0&&(m=!1),h===void 0&&(h=1),u();const g=n.getBoundingClientRect(),{left:x,top:p,width:S,height:T}=g;if(m||l(),!S||!T)return;const C=As(p),M=As(s.clientWidth-(x+S)),A=As(s.clientHeight-(p+T)),_=As(x),D={rootMargin:-C+"px "+-M+"px "+-A+"px "+-_+"px",threshold:Sn(0,ml(1,h))||1};let V=!0;function ae(I){const $=I[0].intersectionRatio;if($!==h){if(!V)return d();$?d(!1,$):i=setTimeout(()=>{d(!1,1e-7)},1e3)}$===1&&!db(g,n.getBoundingClientRect())&&d(),V=!1}try{o=new IntersectionObserver(ae,{...D,root:s.ownerDocument})}catch{o=new IntersectionObserver(ae,D)}o.observe(n)}return d(!0),u}function FM(n,l,o,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,g=nm(n),x=s||u?[...g?Ko(g):[],...l?Ko(l):[]]:[];x.forEach(_=>{s&&_.addEventListener("scroll",o,{passive:!0}),u&&_.addEventListener("resize",o)});const p=g&&m?KM(g,o):null;let S=-1,T=null;d&&(T=new ResizeObserver(_=>{let[N]=_;N&&N.target===g&&T&&l&&(T.unobserve(l),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var D;(D=T)==null||D.observe(l)})),o()}),g&&!h&&T.observe(g),l&&T.observe(l));let C,M=h?$l(n):null;h&&A();function A(){const _=$l(n);M&&!db(M,_)&&o(),M=_,C=requestAnimationFrame(A)}return o(),()=>{var _;x.forEach(N=>{s&&N.removeEventListener("scroll",o),u&&N.removeEventListener("resize",o)}),p==null||p(),(_=T)==null||_.disconnect(),T=null,h&&cancelAnimationFrame(C)}}const QM=MM,ZM=AM,JM=EM,WM=RM,eA=TM,u0=wM,tA=_M,nA=(n,l,o)=>{const i=new Map,s={platform:XM,...o},u={...s.platform,_c:i};return SM(n,l,{...s,platform:u})};var aA=typeof document<"u",lA=function(){},Hs=aA?b.useLayoutEffect:lA;function Fs(n,l){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(typeof n=="function"&&n.toString()===l.toString())return!0;let o,i,s;if(n&&l&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==l.length)return!1;for(i=o;i--!==0;)if(!Fs(n[i],l[i]))return!1;return!0}if(s=Object.keys(n),o=s.length,o!==Object.keys(l).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(l,s[i]))return!1;for(i=o;i--!==0;){const u=s[i];if(!(u==="_owner"&&n.$$typeof)&&!Fs(n[u],l[u]))return!1}return!0}return n!==n&&l!==l}function mb(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function f0(n,l){const o=mb(n);return Math.round(l*o)/o}function Xf(n){const l=b.useRef(n);return Hs(()=>{l.current=n}),l}function rA(n){n===void 0&&(n={});const{placement:l="bottom",strategy:o="absolute",middleware:i=[],platform:s,elements:{reference:u,floating:d}={},transform:m=!0,whileElementsMounted:h,open:g}=n,[x,p]=b.useState({x:0,y:0,strategy:o,placement:l,middlewareData:{},isPositioned:!1}),[S,T]=b.useState(i);Fs(S,i)||T(i);const[C,M]=b.useState(null),[A,_]=b.useState(null),N=b.useCallback(B=>{B!==I.current&&(I.current=B,M(B))},[]),D=b.useCallback(B=>{B!==$.current&&($.current=B,_(B))},[]),V=u||C,ae=d||A,I=b.useRef(null),$=b.useRef(null),z=b.useRef(x),F=h!=null,ne=Xf(h),re=Xf(s),q=Xf(g),H=b.useCallback(()=>{if(!I.current||!$.current)return;const B={placement:l,strategy:o,middleware:S};re.current&&(B.platform=re.current),nA(I.current,$.current,B).then(P=>{const L={...P,isPositioned:q.current!==!1};Y.current&&!Fs(z.current,L)&&(z.current=L,Zo.flushSync(()=>{p(L)}))})},[S,l,o,re,q]);Hs(()=>{g===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,p(B=>({...B,isPositioned:!1})))},[g]);const Y=b.useRef(!1);Hs(()=>(Y.current=!0,()=>{Y.current=!1}),[]),Hs(()=>{if(V&&(I.current=V),ae&&($.current=ae),V&&ae){if(ne.current)return ne.current(V,ae,H);H()}},[V,ae,H,ne,F]);const ee=b.useMemo(()=>({reference:I,floating:$,setReference:N,setFloating:D}),[N,D]),E=b.useMemo(()=>({reference:V,floating:ae}),[V,ae]),j=b.useMemo(()=>{const B={position:o,left:0,top:0};if(!E.floating)return B;const P=f0(E.floating,x.x),L=f0(E.floating,x.y);return m?{...B,transform:"translate("+P+"px, "+L+"px)",...mb(E.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:P,top:L}},[o,m,E.floating,x.x,x.y]);return b.useMemo(()=>({...x,update:H,refs:ee,elements:E,floatingStyles:j}),[x,H,ee,E,j])}const oA=n=>{function l(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:n,fn(o){const{element:i,padding:s}=typeof n=="function"?n(o):n;return i&&l(i)?i.current!=null?u0({element:i.current,padding:s}).fn(o):{}:i?u0({element:i,padding:s}).fn(o):{}}}},iA=(n,l)=>{const o=QM(n);return{name:o.name,fn:o.fn,options:[n,l]}},sA=(n,l)=>{const o=ZM(n);return{name:o.name,fn:o.fn,options:[n,l]}},cA=(n,l)=>({fn:tA(n).fn,options:[n,l]}),uA=(n,l)=>{const o=JM(n);return{name:o.name,fn:o.fn,options:[n,l]}},fA=(n,l)=>{const o=WM(n);return{name:o.name,fn:o.fn,options:[n,l]}},dA=(n,l)=>{const o=eA(n);return{name:o.name,fn:o.fn,options:[n,l]}},mA=(n,l)=>{const o=oA(n);return{name:o.name,fn:o.fn,options:[n,l]}};var hA="Arrow",hb=b.forwardRef((n,l)=>{const{children:o,width:i=10,height:s=5,...u}=n;return v.jsx(Je.svg,{...u,ref:l,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?o:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});hb.displayName=hA;var pA=hb,am="Popper",[pb,Qr]=Ql(am),[gA,gb]=pb(am),yb=n=>{const{__scopePopper:l,children:o}=n,[i,s]=b.useState(null);return v.jsx(gA,{scope:l,anchor:i,onAnchorChange:s,children:o})};yb.displayName=am;var vb="PopperAnchor",bb=b.forwardRef((n,l)=>{const{__scopePopper:o,virtualRef:i,...s}=n,u=gb(vb,o),d=b.useRef(null),m=st(l,d),h=b.useRef(null);return b.useEffect(()=>{const g=h.current;h.current=(i==null?void 0:i.current)||d.current,g!==h.current&&u.onAnchorChange(h.current)}),i?null:v.jsx(Je.div,{...s,ref:m})});bb.displayName=vb;var lm="PopperContent",[yA,vA]=pb(lm),xb=b.forwardRef((n,l)=>{var de,Z,ce,ve,we,Te;const{__scopePopper:o,side:i="bottom",sideOffset:s=0,align:u="center",alignOffset:d=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:g=[],collisionPadding:x=0,sticky:p="partial",hideWhenDetached:S=!1,updatePositionStrategy:T="optimized",onPlaced:C,...M}=n,A=gb(lm,o),[_,N]=b.useState(null),D=st(l,Ue=>N(Ue)),[V,ae]=b.useState(null),I=cM(V),$=(I==null?void 0:I.width)??0,z=(I==null?void 0:I.height)??0,F=i+(u!=="center"?"-"+u:""),ne=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},re=Array.isArray(g)?g:[g],q=re.length>0,H={padding:ne,boundary:re.filter(xA),altBoundary:q},{refs:Y,floatingStyles:ee,placement:E,isPositioned:j,middlewareData:B}=rA({strategy:"fixed",placement:F,whileElementsMounted:(...Ue)=>FM(...Ue,{animationFrame:T==="always"}),elements:{reference:A.anchor},middleware:[iA({mainAxis:s+z,alignmentAxis:d}),h&&sA({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?cA():void 0,...H}),h&&uA({...H}),fA({...H,apply:({elements:Ue,rects:Le,availableWidth:Nt,availableHeight:It})=>{const{width:kt,height:Tn}=Le.reference,Ae=Ue.floating.style;Ae.setProperty("--radix-popper-available-width",`${Nt}px`),Ae.setProperty("--radix-popper-available-height",`${It}px`),Ae.setProperty("--radix-popper-anchor-width",`${kt}px`),Ae.setProperty("--radix-popper-anchor-height",`${Tn}px`)}}),V&&mA({element:V,padding:m}),SA({arrowWidth:$,arrowHeight:z}),S&&dA({strategy:"referenceHidden",...H})]}),[P,L]=Eb(E),R=Bn(C);Ft(()=>{j&&(R==null||R())},[j,R]);const G=(de=B.arrow)==null?void 0:de.x,J=(Z=B.arrow)==null?void 0:Z.y,le=((ce=B.arrow)==null?void 0:ce.centerOffset)!==0,[se,ie]=b.useState();return Ft(()=>{_&&ie(window.getComputedStyle(_).zIndex)},[_]),v.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:j?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(ve=B.transformOrigin)==null?void 0:ve.x,(we=B.transformOrigin)==null?void 0:we.y].join(" "),...((Te=B.hide)==null?void 0:Te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:v.jsx(yA,{scope:o,placedSide:P,onArrowChange:ae,arrowX:G,arrowY:J,shouldHideArrow:le,children:v.jsx(Je.div,{"data-side":P,"data-align":L,...M,ref:D,style:{...M.style,animation:j?void 0:"none"}})})})});xb.displayName=lm;var Sb="PopperArrow",bA={top:"bottom",right:"left",bottom:"top",left:"right"},wb=b.forwardRef(function(l,o){const{__scopePopper:i,...s}=l,u=vA(Sb,i),d=bA[u.placedSide];return v.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:v.jsx(pA,{...s,ref:o,style:{...s.style,display:"block"}})})});wb.displayName=Sb;function xA(n){return n!==null}var SA=n=>({name:"transformOrigin",options:n,fn(l){var A,_,N;const{placement:o,rects:i,middlewareData:s}=l,d=((A=s.arrow)==null?void 0:A.centerOffset)!==0,m=d?0:n.arrowWidth,h=d?0:n.arrowHeight,[g,x]=Eb(o),p={start:"0%",center:"50%",end:"100%"}[x],S=(((_=s.arrow)==null?void 0:_.x)??0)+m/2,T=(((N=s.arrow)==null?void 0:N.y)??0)+h/2;let C="",M="";return g==="bottom"?(C=d?p:`${S}px`,M=`${-h}px`):g==="top"?(C=d?p:`${S}px`,M=`${i.floating.height+h}px`):g==="right"?(C=`${-h}px`,M=d?p:`${T}px`):g==="left"&&(C=`${i.floating.width+h}px`,M=d?p:`${T}px`),{data:{x:C,y:M}}}});function Eb(n){const[l,o="center"]=n.split("-");return[l,o]}var rm=yb,om=bb,im=xb,sm=wb,Kf="rovingFocusGroup.onEntryFocus",wA={bubbles:!1,cancelable:!0},ei="RovingFocusGroup",[bd,Tb,EA]=$d(ei),[TA,Cb]=Ql(ei,[EA]),[CA,MA]=TA(ei),Mb=b.forwardRef((n,l)=>v.jsx(bd.Provider,{scope:n.__scopeRovingFocusGroup,children:v.jsx(bd.Slot,{scope:n.__scopeRovingFocusGroup,children:v.jsx(AA,{...n,ref:l})})}));Mb.displayName=ei;var AA=b.forwardRef((n,l)=>{const{__scopeRovingFocusGroup:o,orientation:i,loop:s=!1,dir:u,currentTabStopId:d,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:h,onEntryFocus:g,preventScrollOnEntryFocus:x=!1,...p}=n,S=b.useRef(null),T=st(l,S),C=Xd(u),[M,A]=Ps({prop:d,defaultProp:m??null,onChange:h,caller:ei}),[_,N]=b.useState(!1),D=Bn(g),V=Tb(o),ae=b.useRef(!1),[I,$]=b.useState(0);return b.useEffect(()=>{const z=S.current;if(z)return z.addEventListener(Kf,D),()=>z.removeEventListener(Kf,D)},[D]),v.jsx(CA,{scope:o,orientation:i,dir:C,loop:s,currentTabStopId:M,onItemFocus:b.useCallback(z=>A(z),[A]),onItemShiftTab:b.useCallback(()=>N(!0),[]),onFocusableItemAdd:b.useCallback(()=>$(z=>z+1),[]),onFocusableItemRemove:b.useCallback(()=>$(z=>z-1),[]),children:v.jsx(Je.div,{tabIndex:_||I===0?-1:0,"data-orientation":i,...p,ref:T,style:{outline:"none",...n.style},onMouseDown:Ce(n.onMouseDown,()=>{ae.current=!0}),onFocus:Ce(n.onFocus,z=>{const F=!ae.current;if(z.target===z.currentTarget&&F&&!_){const ne=new CustomEvent(Kf,wA);if(z.currentTarget.dispatchEvent(ne),!ne.defaultPrevented){const re=V().filter(E=>E.focusable),q=re.find(E=>E.active),H=re.find(E=>E.id===M),ee=[q,H,...re].filter(Boolean).map(E=>E.ref.current);Rb(ee,x)}}ae.current=!1}),onBlur:Ce(n.onBlur,()=>N(!1))})})}),Ab="RovingFocusGroupItem",_b=b.forwardRef((n,l)=>{const{__scopeRovingFocusGroup:o,focusable:i=!0,active:s=!1,tabStopId:u,children:d,...m}=n,h=Yr(),g=u||h,x=MA(Ab,o),p=x.currentTabStopId===g,S=Tb(o),{onFocusableItemAdd:T,onFocusableItemRemove:C,currentTabStopId:M}=x;return b.useEffect(()=>{if(i)return T(),()=>C()},[i,T,C]),v.jsx(bd.ItemSlot,{scope:o,id:g,focusable:i,active:s,children:v.jsx(Je.span,{tabIndex:p?0:-1,"data-orientation":x.orientation,...m,ref:l,onMouseDown:Ce(n.onMouseDown,A=>{i?x.onItemFocus(g):A.preventDefault()}),onFocus:Ce(n.onFocus,()=>x.onItemFocus(g)),onKeyDown:Ce(n.onKeyDown,A=>{if(A.key==="Tab"&&A.shiftKey){x.onItemShiftTab();return}if(A.target!==A.currentTarget)return;const _=NA(A,x.orientation,x.dir);if(_!==void 0){if(A.metaKey||A.ctrlKey||A.altKey||A.shiftKey)return;A.preventDefault();let D=S().filter(V=>V.focusable).map(V=>V.ref.current);if(_==="last")D.reverse();else if(_==="prev"||_==="next"){_==="prev"&&D.reverse();const V=D.indexOf(A.currentTarget);D=x.loop?OA(D,V+1):D.slice(V+1)}setTimeout(()=>Rb(D))}}),children:typeof d=="function"?d({isCurrentTabStop:p,hasTabStop:M!=null}):d})})});_b.displayName=Ab;var _A={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function RA(n,l){return l!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}function NA(n,l,o){const i=RA(n.key,o);if(!(l==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(l==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return _A[i]}function Rb(n,l=!1){const o=document.activeElement;for(const i of n)if(i===o||(i.focus({preventScroll:l}),document.activeElement!==o))return}function OA(n,l){return n.map((o,i)=>n[(l+i)%n.length])}var zA=Mb,DA=_b,xd=["Enter"," "],jA=["ArrowDown","PageUp","Home"],Nb=["ArrowUp","PageDown","End"],kA=[...jA,...Nb],LA={ltr:[...xd,"ArrowRight"],rtl:[...xd,"ArrowLeft"]},HA={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ti="Menu",[Fo,BA,UA]=$d(ti),[Zl,Ob]=Ql(ti,[UA,Qr,Cb]),ni=Qr(),zb=Cb(),[Db,yl]=Zl(ti),[IA,ai]=Zl(ti),jb=n=>{const{__scopeMenu:l,open:o=!1,children:i,dir:s,onOpenChange:u,modal:d=!0}=n,m=ni(l),[h,g]=b.useState(null),x=b.useRef(!1),p=Bn(u),S=Xd(s);return b.useEffect(()=>{const T=()=>{x.current=!0,document.addEventListener("pointerdown",C,{capture:!0,once:!0}),document.addEventListener("pointermove",C,{capture:!0,once:!0})},C=()=>x.current=!1;return document.addEventListener("keydown",T,{capture:!0}),()=>{document.removeEventListener("keydown",T,{capture:!0}),document.removeEventListener("pointerdown",C,{capture:!0}),document.removeEventListener("pointermove",C,{capture:!0})}},[]),v.jsx(rm,{...m,children:v.jsx(Db,{scope:l,open:o,onOpenChange:p,content:h,onContentChange:g,children:v.jsx(IA,{scope:l,onClose:b.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:x,dir:S,modal:d,children:i})})})};jb.displayName=ti;var GA="MenuAnchor",cm=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n,s=ni(o);return v.jsx(om,{...s,...i,ref:l})});cm.displayName=GA;var um="MenuPortal",[YA,kb]=Zl(um,{forceMount:void 0}),Lb=n=>{const{__scopeMenu:l,forceMount:o,children:i,container:s}=n,u=yl(um,l);return v.jsx(YA,{scope:l,forceMount:o,children:v.jsx(Xr,{present:o||u.open,children:v.jsx(Fd,{asChild:!0,container:s,children:i})})})};Lb.displayName=um;var Hn="MenuContent",[VA,fm]=Zl(Hn),Hb=b.forwardRef((n,l)=>{const o=kb(Hn,n.__scopeMenu),{forceMount:i=o.forceMount,...s}=n,u=yl(Hn,n.__scopeMenu),d=ai(Hn,n.__scopeMenu);return v.jsx(Fo.Provider,{scope:n.__scopeMenu,children:v.jsx(Xr,{present:i||u.open,children:v.jsx(Fo.Slot,{scope:n.__scopeMenu,children:d.modal?v.jsx(qA,{...s,ref:l}):v.jsx(PA,{...s,ref:l})})})})}),qA=b.forwardRef((n,l)=>{const o=yl(Hn,n.__scopeMenu),i=b.useRef(null),s=st(l,i);return b.useEffect(()=>{const u=i.current;if(u)return nb(u)},[]),v.jsx(dm,{...n,ref:s,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:Ce(n.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),PA=b.forwardRef((n,l)=>{const o=yl(Hn,n.__scopeMenu);return v.jsx(dm,{...n,ref:l,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),$A=Gr("MenuContent.ScrollLock"),dm=b.forwardRef((n,l)=>{const{__scopeMenu:o,loop:i=!1,trapFocus:s,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:m,onEntryFocus:h,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:p,onInteractOutside:S,onDismiss:T,disableOutsideScroll:C,...M}=n,A=yl(Hn,o),_=ai(Hn,o),N=ni(o),D=zb(o),V=BA(o),[ae,I]=b.useState(null),$=b.useRef(null),z=st(l,$,A.onContentChange),F=b.useRef(0),ne=b.useRef(""),re=b.useRef(0),q=b.useRef(null),H=b.useRef("right"),Y=b.useRef(0),ee=C?Qd:b.Fragment,E=C?{as:$A,allowPinchZoom:!0}:void 0,j=P=>{var de,Z;const L=ne.current+P,R=V().filter(ce=>!ce.disabled),G=document.activeElement,J=(de=R.find(ce=>ce.ref.current===G))==null?void 0:de.textValue,le=R.map(ce=>ce.textValue),se=l_(le,L,J),ie=(Z=R.find(ce=>ce.textValue===se))==null?void 0:Z.ref.current;(function ce(ve){ne.current=ve,window.clearTimeout(F.current),ve!==""&&(F.current=window.setTimeout(()=>ce(""),1e3))})(L),ie&&setTimeout(()=>ie.focus())};b.useEffect(()=>()=>window.clearTimeout(F.current),[]),Xv();const B=b.useCallback(P=>{var R,G;return H.current===((R=q.current)==null?void 0:R.side)&&o_(P,(G=q.current)==null?void 0:G.area)},[]);return v.jsx(VA,{scope:o,searchRef:ne,onItemEnter:b.useCallback(P=>{B(P)&&P.preventDefault()},[B]),onItemLeave:b.useCallback(P=>{var L;B(P)||((L=$.current)==null||L.focus(),I(null))},[B]),onTriggerLeave:b.useCallback(P=>{B(P)&&P.preventDefault()},[B]),pointerGraceTimerRef:re,onPointerGraceIntentChange:b.useCallback(P=>{q.current=P},[]),children:v.jsx(ee,{...E,children:v.jsx(Kd,{asChild:!0,trapped:s,onMountAutoFocus:Ce(u,P=>{var L;P.preventDefault(),(L=$.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:v.jsx(lc,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:g,onPointerDownOutside:x,onFocusOutside:p,onInteractOutside:S,onDismiss:T,children:v.jsx(zA,{asChild:!0,...D,dir:_.dir,orientation:"vertical",loop:i,currentTabStopId:ae,onCurrentTabStopIdChange:I,onEntryFocus:Ce(h,P=>{_.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(im,{role:"menu","aria-orientation":"vertical","data-state":ex(A.open),"data-radix-menu-content":"",dir:_.dir,...N,...M,ref:z,style:{outline:"none",...M.style},onKeyDown:Ce(M.onKeyDown,P=>{const R=P.target.closest("[data-radix-menu-content]")===P.currentTarget,G=P.ctrlKey||P.altKey||P.metaKey,J=P.key.length===1;R&&(P.key==="Tab"&&P.preventDefault(),!G&&J&&j(P.key));const le=$.current;if(P.target!==le||!kA.includes(P.key))return;P.preventDefault();const ie=V().filter(de=>!de.disabled).map(de=>de.ref.current);Nb.includes(P.key)&&ie.reverse(),n_(ie)}),onBlur:Ce(n.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(F.current),ne.current="")}),onPointerMove:Ce(n.onPointerMove,Qo(P=>{const L=P.target,R=Y.current!==P.clientX;if(P.currentTarget.contains(L)&&R){const G=P.clientX>Y.current?"right":"left";H.current=G,Y.current=P.clientX}}))})})})})})})});Hb.displayName=Hn;var XA="MenuGroup",mm=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n;return v.jsx(Je.div,{role:"group",...i,ref:l})});mm.displayName=XA;var KA="MenuLabel",Bb=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n;return v.jsx(Je.div,{...i,ref:l})});Bb.displayName=KA;var Qs="MenuItem",d0="menu.itemSelect",uc=b.forwardRef((n,l)=>{const{disabled:o=!1,onSelect:i,...s}=n,u=b.useRef(null),d=ai(Qs,n.__scopeMenu),m=fm(Qs,n.__scopeMenu),h=st(l,u),g=b.useRef(!1),x=()=>{const p=u.current;if(!o&&p){const S=new CustomEvent(d0,{bubbles:!0,cancelable:!0});p.addEventListener(d0,T=>i==null?void 0:i(T),{once:!0}),Gv(p,S),S.defaultPrevented?g.current=!1:d.onClose()}};return v.jsx(Ub,{...s,ref:h,disabled:o,onClick:Ce(n.onClick,x),onPointerDown:p=>{var S;(S=n.onPointerDown)==null||S.call(n,p),g.current=!0},onPointerUp:Ce(n.onPointerUp,p=>{var S;g.current||(S=p.currentTarget)==null||S.click()}),onKeyDown:Ce(n.onKeyDown,p=>{const S=m.searchRef.current!=="";o||S&&p.key===" "||xd.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});uc.displayName=Qs;var Ub=b.forwardRef((n,l)=>{const{__scopeMenu:o,disabled:i=!1,textValue:s,...u}=n,d=fm(Qs,o),m=zb(o),h=b.useRef(null),g=st(l,h),[x,p]=b.useState(!1),[S,T]=b.useState("");return b.useEffect(()=>{const C=h.current;C&&T((C.textContent??"").trim())},[u.children]),v.jsx(Fo.ItemSlot,{scope:o,disabled:i,textValue:s??S,children:v.jsx(DA,{asChild:!0,...m,focusable:!i,children:v.jsx(Je.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:g,onPointerMove:Ce(n.onPointerMove,Qo(C=>{i?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ce(n.onPointerLeave,Qo(C=>d.onItemLeave(C))),onFocus:Ce(n.onFocus,()=>p(!0)),onBlur:Ce(n.onBlur,()=>p(!1))})})})}),FA="MenuCheckboxItem",Ib=b.forwardRef((n,l)=>{const{checked:o=!1,onCheckedChange:i,...s}=n;return v.jsx(Pb,{scope:n.__scopeMenu,checked:o,children:v.jsx(uc,{role:"menuitemcheckbox","aria-checked":Zs(o)?"mixed":o,...s,ref:l,"data-state":gm(o),onSelect:Ce(s.onSelect,()=>i==null?void 0:i(Zs(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Ib.displayName=FA;var Gb="MenuRadioGroup",[QA,ZA]=Zl(Gb,{value:void 0,onValueChange:()=>{}}),Yb=b.forwardRef((n,l)=>{const{value:o,onValueChange:i,...s}=n,u=Bn(i);return v.jsx(QA,{scope:n.__scopeMenu,value:o,onValueChange:u,children:v.jsx(mm,{...s,ref:l})})});Yb.displayName=Gb;var Vb="MenuRadioItem",qb=b.forwardRef((n,l)=>{const{value:o,...i}=n,s=ZA(Vb,n.__scopeMenu),u=o===s.value;return v.jsx(Pb,{scope:n.__scopeMenu,checked:u,children:v.jsx(uc,{role:"menuitemradio","aria-checked":u,...i,ref:l,"data-state":gm(u),onSelect:Ce(i.onSelect,()=>{var d;return(d=s.onValueChange)==null?void 0:d.call(s,o)},{checkForDefaultPrevented:!1})})})});qb.displayName=Vb;var hm="MenuItemIndicator",[Pb,JA]=Zl(hm,{checked:!1}),$b=b.forwardRef((n,l)=>{const{__scopeMenu:o,forceMount:i,...s}=n,u=JA(hm,o);return v.jsx(Xr,{present:i||Zs(u.checked)||u.checked===!0,children:v.jsx(Je.span,{...s,ref:l,"data-state":gm(u.checked)})})});$b.displayName=hm;var WA="MenuSeparator",Xb=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n;return v.jsx(Je.div,{role:"separator","aria-orientation":"horizontal",...i,ref:l})});Xb.displayName=WA;var e_="MenuArrow",Kb=b.forwardRef((n,l)=>{const{__scopeMenu:o,...i}=n,s=ni(o);return v.jsx(sm,{...s,...i,ref:l})});Kb.displayName=e_;var pm="MenuSub",[t_,Fb]=Zl(pm),Qb=n=>{const{__scopeMenu:l,children:o,open:i=!1,onOpenChange:s}=n,u=yl(pm,l),d=ni(l),[m,h]=b.useState(null),[g,x]=b.useState(null),p=Bn(s);return b.useEffect(()=>(u.open===!1&&p(!1),()=>p(!1)),[u.open,p]),v.jsx(rm,{...d,children:v.jsx(Db,{scope:l,open:i,onOpenChange:p,content:g,onContentChange:x,children:v.jsx(t_,{scope:l,contentId:Yr(),triggerId:Yr(),trigger:m,onTriggerChange:h,children:o})})})};Qb.displayName=pm;var qo="MenuSubTrigger",Zb=b.forwardRef((n,l)=>{const o=yl(qo,n.__scopeMenu),i=ai(qo,n.__scopeMenu),s=Fb(qo,n.__scopeMenu),u=fm(qo,n.__scopeMenu),d=b.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:h}=u,g={__scopeMenu:n.__scopeMenu},x=b.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);return b.useEffect(()=>x,[x]),b.useEffect(()=>{const p=m.current;return()=>{window.clearTimeout(p),h(null)}},[m,h]),v.jsx(cm,{asChild:!0,...g,children:v.jsx(Ub,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":s.contentId,"data-state":ex(o.open),...n,ref:Pd(l,s.onTriggerChange),onClick:p=>{var S;(S=n.onClick)==null||S.call(n,p),!(n.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:Ce(n.onPointerMove,Qo(p=>{u.onItemEnter(p),!p.defaultPrevented&&!n.disabled&&!o.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{o.onOpenChange(!0),x()},100))})),onPointerLeave:Ce(n.onPointerLeave,Qo(p=>{var T,C;x();const S=(T=o.content)==null?void 0:T.getBoundingClientRect();if(S){const M=(C=o.content)==null?void 0:C.dataset.side,A=M==="right",_=A?-5:5,N=S[A?"left":"right"],D=S[A?"right":"left"];u.onPointerGraceIntentChange({area:[{x:p.clientX+_,y:p.clientY},{x:N,y:S.top},{x:D,y:S.top},{x:D,y:S.bottom},{x:N,y:S.bottom}],side:M}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(p),p.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:Ce(n.onKeyDown,p=>{var T;const S=u.searchRef.current!=="";n.disabled||S&&p.key===" "||LA[i.dir].includes(p.key)&&(o.onOpenChange(!0),(T=o.content)==null||T.focus(),p.preventDefault())})})})});Zb.displayName=qo;var Jb="MenuSubContent",Wb=b.forwardRef((n,l)=>{const o=kb(Hn,n.__scopeMenu),{forceMount:i=o.forceMount,...s}=n,u=yl(Hn,n.__scopeMenu),d=ai(Hn,n.__scopeMenu),m=Fb(Jb,n.__scopeMenu),h=b.useRef(null),g=st(l,h);return v.jsx(Fo.Provider,{scope:n.__scopeMenu,children:v.jsx(Xr,{present:i||u.open,children:v.jsx(Fo.Slot,{scope:n.__scopeMenu,children:v.jsx(dm,{id:m.contentId,"aria-labelledby":m.triggerId,...s,ref:g,align:"start",side:d.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{var p;d.isUsingKeyboardRef.current&&((p=h.current)==null||p.focus()),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:Ce(n.onFocusOutside,x=>{x.target!==m.trigger&&u.onOpenChange(!1)}),onEscapeKeyDown:Ce(n.onEscapeKeyDown,x=>{d.onClose(),x.preventDefault()}),onKeyDown:Ce(n.onKeyDown,x=>{var T;const p=x.currentTarget.contains(x.target),S=HA[d.dir].includes(x.key);p&&S&&(u.onOpenChange(!1),(T=m.trigger)==null||T.focus(),x.preventDefault())})})})})})});Wb.displayName=Jb;function ex(n){return n?"open":"closed"}function Zs(n){return n==="indeterminate"}function gm(n){return Zs(n)?"indeterminate":n?"checked":"unchecked"}function n_(n){const l=document.activeElement;for(const o of n)if(o===l||(o.focus(),document.activeElement!==l))return}function a_(n,l){return n.map((o,i)=>n[(l+i)%n.length])}function l_(n,l,o){const s=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,u=o?n.indexOf(o):-1;let d=a_(n,Math.max(u,0));s.length===1&&(d=d.filter(g=>g!==o));const h=d.find(g=>g.toLowerCase().startsWith(s.toLowerCase()));return h!==o?h:void 0}function r_(n,l){const{x:o,y:i}=n;let s=!1;for(let u=0,d=l.length-1;u<l.length;d=u++){const m=l[u],h=l[d],g=m.x,x=m.y,p=h.x,S=h.y;x>i!=S>i&&o<(p-g)*(i-x)/(S-x)+g&&(s=!s)}return s}function o_(n,l){if(!l)return!1;const o={x:n.clientX,y:n.clientY};return r_(o,l)}function Qo(n){return l=>l.pointerType==="mouse"?n(l):void 0}var i_=jb,s_=cm,c_=Lb,u_=Hb,f_=mm,d_=Bb,m_=uc,h_=Ib,p_=Yb,g_=qb,y_=$b,v_=Xb,b_=Kb,x_=Qb,S_=Zb,w_=Wb,ym="ContextMenu",[E_]=Ql(ym,[Ob]),Qt=Ob(),[T_,tx]=E_(ym),nx=n=>{const{__scopeContextMenu:l,children:o,onOpenChange:i,dir:s,modal:u=!0}=n,[d,m]=b.useState(!1),h=Qt(l),g=Bn(i),x=b.useCallback(p=>{m(p),g(p)},[g]);return v.jsx(T_,{scope:l,open:d,onOpenChange:x,modal:u,children:v.jsx(i_,{...h,dir:s,open:d,onOpenChange:x,modal:u,children:o})})};nx.displayName=ym;var ax="ContextMenuTrigger",lx=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,disabled:i=!1,...s}=n,u=tx(ax,o),d=Qt(o),m=b.useRef({x:0,y:0}),h=b.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...m.current})}),g=b.useRef(0),x=b.useCallback(()=>window.clearTimeout(g.current),[]),p=S=>{m.current={x:S.clientX,y:S.clientY},u.onOpenChange(!0)};return b.useEffect(()=>x,[x]),b.useEffect(()=>void(i&&x()),[i,x]),v.jsxs(v.Fragment,{children:[v.jsx(s_,{...d,virtualRef:h}),v.jsx(Je.span,{"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,...s,ref:l,style:{WebkitTouchCallout:"none",...n.style},onContextMenu:i?n.onContextMenu:Ce(n.onContextMenu,S=>{x(),p(S),S.preventDefault()}),onPointerDown:i?n.onPointerDown:Ce(n.onPointerDown,_s(S=>{x(),g.current=window.setTimeout(()=>p(S),700)})),onPointerMove:i?n.onPointerMove:Ce(n.onPointerMove,_s(x)),onPointerCancel:i?n.onPointerCancel:Ce(n.onPointerCancel,_s(x)),onPointerUp:i?n.onPointerUp:Ce(n.onPointerUp,_s(x))})]})});lx.displayName=ax;var C_="ContextMenuPortal",rx=n=>{const{__scopeContextMenu:l,...o}=n,i=Qt(l);return v.jsx(c_,{...i,...o})};rx.displayName=C_;var ox="ContextMenuContent",ix=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=tx(ox,o),u=Qt(o),d=b.useRef(!1);return v.jsx(u_,{...u,...i,ref:l,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:m=>{var h;(h=n.onCloseAutoFocus)==null||h.call(n,m),!m.defaultPrevented&&d.current&&m.preventDefault(),d.current=!1},onInteractOutside:m=>{var h;(h=n.onInteractOutside)==null||h.call(n,m),!m.defaultPrevented&&!s.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)"}})});ix.displayName=ox;var M_="ContextMenuGroup",A_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Qt(o);return v.jsx(f_,{...s,...i,ref:l})});A_.displayName=M_;var __="ContextMenuLabel",R_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Qt(o);return v.jsx(d_,{...s,...i,ref:l})});R_.displayName=__;var N_="ContextMenuItem",sx=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Qt(o);return v.jsx(m_,{...s,...i,ref:l})});sx.displayName=N_;var O_="ContextMenuCheckboxItem",z_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Qt(o);return v.jsx(h_,{...s,...i,ref:l})});z_.displayName=O_;var D_="ContextMenuRadioGroup",j_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Qt(o);return v.jsx(p_,{...s,...i,ref:l})});j_.displayName=D_;var k_="ContextMenuRadioItem",L_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Qt(o);return v.jsx(g_,{...s,...i,ref:l})});L_.displayName=k_;var H_="ContextMenuItemIndicator",B_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Qt(o);return v.jsx(y_,{...s,...i,ref:l})});B_.displayName=H_;var U_="ContextMenuSeparator",cx=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Qt(o);return v.jsx(v_,{...s,...i,ref:l})});cx.displayName=U_;var I_="ContextMenuArrow",G_=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Qt(o);return v.jsx(b_,{...s,...i,ref:l})});G_.displayName=I_;var ux="ContextMenuSub",fx=n=>{const{__scopeContextMenu:l,children:o,onOpenChange:i,open:s,defaultOpen:u}=n,d=Qt(l),[m,h]=Ps({prop:s,defaultProp:u??!1,onChange:i,caller:ux});return v.jsx(x_,{...d,open:m,onOpenChange:h,children:o})};fx.displayName=ux;var Y_="ContextMenuSubTrigger",dx=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Qt(o);return v.jsx(S_,{...s,...i,ref:l})});dx.displayName=Y_;var V_="ContextMenuSubContent",mx=b.forwardRef((n,l)=>{const{__scopeContextMenu:o,...i}=n,s=Qt(o);return v.jsx(w_,{...s,...i,ref:l,style:{...n.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mx.displayName=V_;function _s(n){return l=>l.pointerType!=="mouse"?n(l):void 0}var q_=nx,P_=lx,$_=rx,X_=ix,K_=sx,F_=cx,Q_=fx,Z_=dx,J_=mx;function m0(n,[l,o]){return Math.min(o,Math.max(l,n))}var W_=[" ","Enter","ArrowUp","ArrowDown"],eR=[" ","Enter"],Xl="Select",[fc,dc,tR]=$d(Xl),[Zr]=Ql(Xl,[tR,Qr]),mc=Qr(),[nR,vl]=Zr(Xl),[aR,lR]=Zr(Xl),hx=n=>{const{__scopeSelect:l,children:o,open:i,defaultOpen:s,onOpenChange:u,value:d,defaultValue:m,onValueChange:h,dir:g,name:x,autoComplete:p,disabled:S,required:T,form:C}=n,M=mc(l),[A,_]=b.useState(null),[N,D]=b.useState(null),[V,ae]=b.useState(!1),I=Xd(g),[$,z]=Ps({prop:i,defaultProp:s??!1,onChange:u,caller:Xl}),[F,ne]=Ps({prop:d,defaultProp:m,onChange:h,caller:Xl}),re=b.useRef(null),q=A?C||!!A.closest("form"):!0,[H,Y]=b.useState(new Set),ee=Array.from(H).map(E=>E.props.value).join(";");return v.jsx(rm,{...M,children:v.jsxs(nR,{required:T,scope:l,trigger:A,onTriggerChange:_,valueNode:N,onValueNodeChange:D,valueNodeHasChildren:V,onValueNodeHasChildrenChange:ae,contentId:Yr(),value:F,onValueChange:ne,open:$,onOpenChange:z,dir:I,triggerPointerDownPosRef:re,disabled:S,children:[v.jsx(fc.Provider,{scope:l,children:v.jsx(aR,{scope:n.__scopeSelect,onNativeOptionAdd:b.useCallback(E=>{Y(j=>new Set(j).add(E))},[]),onNativeOptionRemove:b.useCallback(E=>{Y(j=>{const B=new Set(j);return B.delete(E),B})},[]),children:o})}),q?v.jsxs(Hx,{"aria-hidden":!0,required:T,tabIndex:-1,name:x,autoComplete:p,value:F,onChange:E=>ne(E.target.value),disabled:S,form:C,children:[F===void 0?v.jsx("option",{value:""}):null,Array.from(H)]},ee):null]})})};hx.displayName=Xl;var px="SelectTrigger",gx=b.forwardRef((n,l)=>{const{__scopeSelect:o,disabled:i=!1,...s}=n,u=mc(o),d=vl(px,o),m=d.disabled||i,h=st(l,d.onTriggerChange),g=dc(o),x=b.useRef("touch"),[p,S,T]=Ux(M=>{const A=g().filter(D=>!D.disabled),_=A.find(D=>D.value===d.value),N=Ix(A,M,_);N!==void 0&&d.onValueChange(N.value)}),C=M=>{m||(d.onOpenChange(!0),T()),M&&(d.triggerPointerDownPosRef.current={x:Math.round(M.pageX),y:Math.round(M.pageY)})};return v.jsx(om,{asChild:!0,...u,children:v.jsx(Je.button,{type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:m,"data-disabled":m?"":void 0,"data-placeholder":Bx(d.value)?"":void 0,...s,ref:h,onClick:Ce(s.onClick,M=>{M.currentTarget.focus(),x.current!=="mouse"&&C(M)}),onPointerDown:Ce(s.onPointerDown,M=>{x.current=M.pointerType;const A=M.target;A.hasPointerCapture(M.pointerId)&&A.releasePointerCapture(M.pointerId),M.button===0&&M.ctrlKey===!1&&M.pointerType==="mouse"&&(C(M),M.preventDefault())}),onKeyDown:Ce(s.onKeyDown,M=>{const A=p.current!=="";!(M.ctrlKey||M.altKey||M.metaKey)&&M.key.length===1&&S(M.key),!(A&&M.key===" ")&&W_.includes(M.key)&&(C(),M.preventDefault())})})})});gx.displayName=px;var yx="SelectValue",vx=b.forwardRef((n,l)=>{const{__scopeSelect:o,className:i,style:s,children:u,placeholder:d="",...m}=n,h=vl(yx,o),{onValueNodeHasChildrenChange:g}=h,x=u!==void 0,p=st(l,h.onValueNodeChange);return Ft(()=>{g(x)},[g,x]),v.jsx(Je.span,{...m,ref:p,style:{pointerEvents:"none"},children:Bx(h.value)?v.jsx(v.Fragment,{children:d}):u})});vx.displayName=yx;var rR="SelectIcon",bx=b.forwardRef((n,l)=>{const{__scopeSelect:o,children:i,...s}=n;return v.jsx(Je.span,{"aria-hidden":!0,...s,ref:l,children:i||"▼"})});bx.displayName=rR;var oR="SelectPortal",xx=n=>v.jsx(Fd,{asChild:!0,...n});xx.displayName=oR;var Kl="SelectContent",Sx=b.forwardRef((n,l)=>{const o=vl(Kl,n.__scopeSelect),[i,s]=b.useState();if(Ft(()=>{s(new DocumentFragment)},[]),!o.open){const u=i;return u?Zo.createPortal(v.jsx(wx,{scope:n.__scopeSelect,children:v.jsx(fc.Slot,{scope:n.__scopeSelect,children:v.jsx("div",{children:n.children})})}),u):null}return v.jsx(Ex,{...n,ref:l})});Sx.displayName=Kl;var Pn=10,[wx,bl]=Zr(Kl),iR="SelectContentImpl",sR=Gr("SelectContent.RemoveScroll"),Ex=b.forwardRef((n,l)=>{const{__scopeSelect:o,position:i="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:u,onPointerDownOutside:d,side:m,sideOffset:h,align:g,alignOffset:x,arrowPadding:p,collisionBoundary:S,collisionPadding:T,sticky:C,hideWhenDetached:M,avoidCollisions:A,..._}=n,N=vl(Kl,o),[D,V]=b.useState(null),[ae,I]=b.useState(null),$=st(l,de=>V(de)),[z,F]=b.useState(null),[ne,re]=b.useState(null),q=dc(o),[H,Y]=b.useState(!1),ee=b.useRef(!1);b.useEffect(()=>{if(D)return nb(D)},[D]),Xv();const E=b.useCallback(de=>{const[Z,...ce]=q().map(Te=>Te.ref.current),[ve]=ce.slice(-1),we=document.activeElement;for(const Te of de)if(Te===we||(Te==null||Te.scrollIntoView({block:"nearest"}),Te===Z&&ae&&(ae.scrollTop=0),Te===ve&&ae&&(ae.scrollTop=ae.scrollHeight),Te==null||Te.focus(),document.activeElement!==we))return},[q,ae]),j=b.useCallback(()=>E([z,D]),[E,z,D]);b.useEffect(()=>{H&&j()},[H,j]);const{onOpenChange:B,triggerPointerDownPosRef:P}=N;b.useEffect(()=>{if(D){let de={x:0,y:0};const Z=ve=>{var we,Te;de={x:Math.abs(Math.round(ve.pageX)-(((we=P.current)==null?void 0:we.x)??0)),y:Math.abs(Math.round(ve.pageY)-(((Te=P.current)==null?void 0:Te.y)??0))}},ce=ve=>{de.x<=10&&de.y<=10?ve.preventDefault():D.contains(ve.target)||B(!1),document.removeEventListener("pointermove",Z),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",ce,{capture:!0})}}},[D,B,P]),b.useEffect(()=>{const de=()=>B(!1);return window.addEventListener("blur",de),window.addEventListener("resize",de),()=>{window.removeEventListener("blur",de),window.removeEventListener("resize",de)}},[B]);const[L,R]=Ux(de=>{const Z=q().filter(we=>!we.disabled),ce=Z.find(we=>we.ref.current===document.activeElement),ve=Ix(Z,de,ce);ve&&setTimeout(()=>ve.ref.current.focus())}),G=b.useCallback((de,Z,ce)=>{const ve=!ee.current&&!ce;(N.value!==void 0&&N.value===Z||ve)&&(F(de),ve&&(ee.current=!0))},[N.value]),J=b.useCallback(()=>D==null?void 0:D.focus(),[D]),le=b.useCallback((de,Z,ce)=>{const ve=!ee.current&&!ce;(N.value!==void 0&&N.value===Z||ve)&&re(de)},[N.value]),se=i==="popper"?Sd:Tx,ie=se===Sd?{side:m,sideOffset:h,align:g,alignOffset:x,arrowPadding:p,collisionBoundary:S,collisionPadding:T,sticky:C,hideWhenDetached:M,avoidCollisions:A}:{};return v.jsx(wx,{scope:o,content:D,viewport:ae,onViewportChange:I,itemRefCallback:G,selectedItem:z,onItemLeave:J,itemTextRefCallback:le,focusSelectedItem:j,selectedItemText:ne,position:i,isPositioned:H,searchRef:L,children:v.jsx(Qd,{as:sR,allowPinchZoom:!0,children:v.jsx(Kd,{asChild:!0,trapped:N.open,onMountAutoFocus:de=>{de.preventDefault()},onUnmountAutoFocus:Ce(s,de=>{var Z;(Z=N.trigger)==null||Z.focus({preventScroll:!0}),de.preventDefault()}),children:v.jsx(lc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:de=>de.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:v.jsx(se,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:de=>de.preventDefault(),..._,...ie,onPlaced:()=>Y(!0),ref:$,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:Ce(_.onKeyDown,de=>{const Z=de.ctrlKey||de.altKey||de.metaKey;if(de.key==="Tab"&&de.preventDefault(),!Z&&de.key.length===1&&R(de.key),["ArrowUp","ArrowDown","Home","End"].includes(de.key)){let ve=q().filter(we=>!we.disabled).map(we=>we.ref.current);if(["ArrowUp","End"].includes(de.key)&&(ve=ve.slice().reverse()),["ArrowUp","ArrowDown"].includes(de.key)){const we=de.target,Te=ve.indexOf(we);ve=ve.slice(Te+1)}setTimeout(()=>E(ve)),de.preventDefault()}})})})})})})});Ex.displayName=iR;var cR="SelectItemAlignedPosition",Tx=b.forwardRef((n,l)=>{const{__scopeSelect:o,onPlaced:i,...s}=n,u=vl(Kl,o),d=bl(Kl,o),[m,h]=b.useState(null),[g,x]=b.useState(null),p=st(l,$=>x($)),S=dc(o),T=b.useRef(!1),C=b.useRef(!0),{viewport:M,selectedItem:A,selectedItemText:_,focusSelectedItem:N}=d,D=b.useCallback(()=>{if(u.trigger&&u.valueNode&&m&&g&&M&&A&&_){const $=u.trigger.getBoundingClientRect(),z=g.getBoundingClientRect(),F=u.valueNode.getBoundingClientRect(),ne=_.getBoundingClientRect();if(u.dir!=="rtl"){const we=ne.left-z.left,Te=F.left-we,Ue=$.left-Te,Le=$.width+Ue,Nt=Math.max(Le,z.width),It=window.innerWidth-Pn,kt=m0(Te,[Pn,Math.max(Pn,It-Nt)]);m.style.minWidth=Le+"px",m.style.left=kt+"px"}else{const we=z.right-ne.right,Te=window.innerWidth-F.right-we,Ue=window.innerWidth-$.right-Te,Le=$.width+Ue,Nt=Math.max(Le,z.width),It=window.innerWidth-Pn,kt=m0(Te,[Pn,Math.max(Pn,It-Nt)]);m.style.minWidth=Le+"px",m.style.right=kt+"px"}const re=S(),q=window.innerHeight-Pn*2,H=M.scrollHeight,Y=window.getComputedStyle(g),ee=parseInt(Y.borderTopWidth,10),E=parseInt(Y.paddingTop,10),j=parseInt(Y.borderBottomWidth,10),B=parseInt(Y.paddingBottom,10),P=ee+E+H+B+j,L=Math.min(A.offsetHeight*5,P),R=window.getComputedStyle(M),G=parseInt(R.paddingTop,10),J=parseInt(R.paddingBottom,10),le=$.top+$.height/2-Pn,se=q-le,ie=A.offsetHeight/2,de=A.offsetTop+ie,Z=ee+E+de,ce=P-Z;if(Z<=le){const we=re.length>0&&A===re[re.length-1].ref.current;m.style.bottom="0px";const Te=g.clientHeight-M.offsetTop-M.offsetHeight,Ue=Math.max(se,ie+(we?J:0)+Te+j),Le=Z+Ue;m.style.height=Le+"px"}else{const we=re.length>0&&A===re[0].ref.current;m.style.top="0px";const Ue=Math.max(le,ee+M.offsetTop+(we?G:0)+ie)+ce;m.style.height=Ue+"px",M.scrollTop=Z-le+M.offsetTop}m.style.margin=`${Pn}px 0`,m.style.minHeight=L+"px",m.style.maxHeight=q+"px",i==null||i(),requestAnimationFrame(()=>T.current=!0)}},[S,u.trigger,u.valueNode,m,g,M,A,_,u.dir,i]);Ft(()=>D(),[D]);const[V,ae]=b.useState();Ft(()=>{g&&ae(window.getComputedStyle(g).zIndex)},[g]);const I=b.useCallback($=>{$&&C.current===!0&&(D(),N==null||N(),C.current=!1)},[D,N]);return v.jsx(fR,{scope:o,contentWrapper:m,shouldExpandOnScrollRef:T,onScrollButtonChange:I,children:v.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:V},children:v.jsx(Je.div,{...s,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});Tx.displayName=cR;var uR="SelectPopperPosition",Sd=b.forwardRef((n,l)=>{const{__scopeSelect:o,align:i="start",collisionPadding:s=Pn,...u}=n,d=mc(o);return v.jsx(im,{...d,...u,ref:l,align:i,collisionPadding:s,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Sd.displayName=uR;var[fR,vm]=Zr(Kl,{}),wd="SelectViewport",Cx=b.forwardRef((n,l)=>{const{__scopeSelect:o,nonce:i,...s}=n,u=bl(wd,o),d=vm(wd,o),m=st(l,u.onViewportChange),h=b.useRef(0);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),v.jsx(fc.Slot,{scope:o,children:v.jsx(Je.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:m,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:Ce(s.onScroll,g=>{const x=g.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:S}=d;if(S!=null&&S.current&&p){const T=Math.abs(h.current-x.scrollTop);if(T>0){const C=window.innerHeight-Pn*2,M=parseFloat(p.style.minHeight),A=parseFloat(p.style.height),_=Math.max(M,A);if(_<C){const N=_+T,D=Math.min(C,N),V=N-D;p.style.height=D+"px",p.style.bottom==="0px"&&(x.scrollTop=V>0?V:0,p.style.justifyContent="flex-end")}}}h.current=x.scrollTop})})})]})});Cx.displayName=wd;var Mx="SelectGroup",[dR,mR]=Zr(Mx),Ax=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n,s=Yr();return v.jsx(dR,{scope:o,id:s,children:v.jsx(Je.div,{role:"group","aria-labelledby":s,...i,ref:l})})});Ax.displayName=Mx;var _x="SelectLabel",hR=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n,s=mR(_x,o);return v.jsx(Je.div,{id:s.id,...i,ref:l})});hR.displayName=_x;var Js="SelectItem",[pR,Rx]=Zr(Js),Nx=b.forwardRef((n,l)=>{const{__scopeSelect:o,value:i,disabled:s=!1,textValue:u,...d}=n,m=vl(Js,o),h=bl(Js,o),g=m.value===i,[x,p]=b.useState(u??""),[S,T]=b.useState(!1),C=st(l,N=>{var D;return(D=h.itemRefCallback)==null?void 0:D.call(h,N,i,s)}),M=Yr(),A=b.useRef("touch"),_=()=>{s||(m.onValueChange(i),m.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.jsx(pR,{scope:o,value:i,disabled:s,textId:M,isSelected:g,onItemTextChange:b.useCallback(N=>{p(D=>D||((N==null?void 0:N.textContent)??"").trim())},[]),children:v.jsx(fc.ItemSlot,{scope:o,value:i,disabled:s,textValue:x,children:v.jsx(Je.div,{role:"option","aria-labelledby":M,"data-highlighted":S?"":void 0,"aria-selected":g&&S,"data-state":g?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...d,ref:C,onFocus:Ce(d.onFocus,()=>T(!0)),onBlur:Ce(d.onBlur,()=>T(!1)),onClick:Ce(d.onClick,()=>{A.current!=="mouse"&&_()}),onPointerUp:Ce(d.onPointerUp,()=>{A.current==="mouse"&&_()}),onPointerDown:Ce(d.onPointerDown,N=>{A.current=N.pointerType}),onPointerMove:Ce(d.onPointerMove,N=>{var D;A.current=N.pointerType,s?(D=h.onItemLeave)==null||D.call(h):A.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ce(d.onPointerLeave,N=>{var D;N.currentTarget===document.activeElement&&((D=h.onItemLeave)==null||D.call(h))}),onKeyDown:Ce(d.onKeyDown,N=>{var V;((V=h.searchRef)==null?void 0:V.current)!==""&&N.key===" "||(eR.includes(N.key)&&_(),N.key===" "&&N.preventDefault())})})})})});Nx.displayName=Js;var Po="SelectItemText",Ox=b.forwardRef((n,l)=>{const{__scopeSelect:o,className:i,style:s,...u}=n,d=vl(Po,o),m=bl(Po,o),h=Rx(Po,o),g=lR(Po,o),[x,p]=b.useState(null),S=st(l,_=>p(_),h.onItemTextChange,_=>{var N;return(N=m.itemTextRefCallback)==null?void 0:N.call(m,_,h.value,h.disabled)}),T=x==null?void 0:x.textContent,C=b.useMemo(()=>v.jsx("option",{value:h.value,disabled:h.disabled,children:T},h.value),[h.disabled,h.value,T]),{onNativeOptionAdd:M,onNativeOptionRemove:A}=g;return Ft(()=>(M(C),()=>A(C)),[M,A,C]),v.jsxs(v.Fragment,{children:[v.jsx(Je.span,{id:h.textId,...u,ref:S}),h.isSelected&&d.valueNode&&!d.valueNodeHasChildren?Zo.createPortal(u.children,d.valueNode):null]})});Ox.displayName=Po;var zx="SelectItemIndicator",Dx=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n;return Rx(zx,o).isSelected?v.jsx(Je.span,{"aria-hidden":!0,...i,ref:l}):null});Dx.displayName=zx;var Ed="SelectScrollUpButton",jx=b.forwardRef((n,l)=>{const o=bl(Ed,n.__scopeSelect),i=vm(Ed,n.__scopeSelect),[s,u]=b.useState(!1),d=st(l,i.onScrollButtonChange);return Ft(()=>{if(o.viewport&&o.isPositioned){let m=function(){const g=h.scrollTop>0;u(g)};const h=o.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[o.viewport,o.isPositioned]),s?v.jsx(Lx,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=o;m&&h&&(m.scrollTop=m.scrollTop-h.offsetHeight)}}):null});jx.displayName=Ed;var Td="SelectScrollDownButton",kx=b.forwardRef((n,l)=>{const o=bl(Td,n.__scopeSelect),i=vm(Td,n.__scopeSelect),[s,u]=b.useState(!1),d=st(l,i.onScrollButtonChange);return Ft(()=>{if(o.viewport&&o.isPositioned){let m=function(){const g=h.scrollHeight-h.clientHeight,x=Math.ceil(h.scrollTop)<g;u(x)};const h=o.viewport;return m(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[o.viewport,o.isPositioned]),s?v.jsx(Lx,{...n,ref:d,onAutoScroll:()=>{const{viewport:m,selectedItem:h}=o;m&&h&&(m.scrollTop=m.scrollTop+h.offsetHeight)}}):null});kx.displayName=Td;var Lx=b.forwardRef((n,l)=>{const{__scopeSelect:o,onAutoScroll:i,...s}=n,u=bl("SelectScrollButton",o),d=b.useRef(null),m=dc(o),h=b.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return b.useEffect(()=>()=>h(),[h]),Ft(()=>{var x;const g=m().find(p=>p.ref.current===document.activeElement);(x=g==null?void 0:g.ref.current)==null||x.scrollIntoView({block:"nearest"})},[m]),v.jsx(Je.div,{"aria-hidden":!0,...s,ref:l,style:{flexShrink:0,...s.style},onPointerDown:Ce(s.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:Ce(s.onPointerMove,()=>{var g;(g=u.onItemLeave)==null||g.call(u),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:Ce(s.onPointerLeave,()=>{h()})})}),gR="SelectSeparator",yR=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n;return v.jsx(Je.div,{"aria-hidden":!0,...i,ref:l})});yR.displayName=gR;var Cd="SelectArrow",vR=b.forwardRef((n,l)=>{const{__scopeSelect:o,...i}=n,s=mc(o),u=vl(Cd,o),d=bl(Cd,o);return u.open&&d.position==="popper"?v.jsx(sm,{...s,...i,ref:l}):null});vR.displayName=Cd;var bR="SelectBubbleInput",Hx=b.forwardRef(({__scopeSelect:n,value:l,...o},i)=>{const s=b.useRef(null),u=st(i,s),d=sM(l);return b.useEffect(()=>{const m=s.current;if(!m)return;const h=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(h,"value").set;if(d!==l&&x){const p=new Event("change",{bubbles:!0});x.call(m,l),m.dispatchEvent(p)}},[d,l]),v.jsx(Je.select,{...o,style:{...Yv,...o.style},ref:u,defaultValue:l})});Hx.displayName=bR;function Bx(n){return n===""||n===void 0}function Ux(n){const l=Bn(n),o=b.useRef(""),i=b.useRef(0),s=b.useCallback(d=>{const m=o.current+d;l(m),(function h(g){o.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>h(""),1e3))})(m)},[l]),u=b.useCallback(()=>{o.current="",window.clearTimeout(i.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(i.current),[]),[o,s,u]}function Ix(n,l,o){const s=l.length>1&&Array.from(l).every(g=>g===l[0])?l[0]:l,u=o?n.indexOf(o):-1;let d=xR(n,Math.max(u,0));s.length===1&&(d=d.filter(g=>g!==o));const h=d.find(g=>g.textValue.toLowerCase().startsWith(s.toLowerCase()));return h!==o?h:void 0}function xR(n,l){return n.map((o,i)=>n[(l+i)%n.length])}var SR=hx,wR=gx,ER=vx,TR=bx,CR=xx,MR=Sx,AR=Cx,_R=Ax,RR=Nx,NR=Ox,OR=Dx,zR=jx,DR=kx,jR="Separator",h0="horizontal",kR=["horizontal","vertical"],Gx=b.forwardRef((n,l)=>{const{decorative:o,orientation:i=h0,...s}=n,u=LR(i)?i:h0,m=o?{role:"none"}:{"aria-orientation":u==="vertical"?u:void 0,role:"separator"};return v.jsx(Je.div,{"data-orientation":u,...m,...s,ref:l})});Gx.displayName=jR;function LR(n){return kR.includes(n)}var HR=Gx,[hc]=Ql("Tooltip",[Qr]),bm=Qr(),Yx="TooltipProvider",BR=700,p0="tooltip.open",[UR,Vx]=hc(Yx),qx=n=>{const{__scopeTooltip:l,delayDuration:o=BR,skipDelayDuration:i=300,disableHoverableContent:s=!1,children:u}=n,d=b.useRef(!0),m=b.useRef(!1),h=b.useRef(0);return b.useEffect(()=>{const g=h.current;return()=>window.clearTimeout(g)},[]),v.jsx(UR,{scope:l,isOpenDelayedRef:d,delayDuration:o,onOpen:b.useCallback(()=>{window.clearTimeout(h.current),d.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>d.current=!0,i)},[i]),isPointerInTransitRef:m,onPointerInTransitChange:b.useCallback(g=>{m.current=g},[]),disableHoverableContent:s,children:u})};qx.displayName=Yx;var Px="Tooltip",[lO,pc]=hc(Px),Md="TooltipTrigger",IR=b.forwardRef((n,l)=>{const{__scopeTooltip:o,...i}=n,s=pc(Md,o),u=Vx(Md,o),d=bm(o),m=b.useRef(null),h=st(l,m,s.onTriggerChange),g=b.useRef(!1),x=b.useRef(!1),p=b.useCallback(()=>g.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),v.jsx(om,{asChild:!0,...d,children:v.jsx(Je.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...i,ref:h,onPointerMove:Ce(n.onPointerMove,S=>{S.pointerType!=="touch"&&!x.current&&!u.isPointerInTransitRef.current&&(s.onTriggerEnter(),x.current=!0)}),onPointerLeave:Ce(n.onPointerLeave,()=>{s.onTriggerLeave(),x.current=!1}),onPointerDown:Ce(n.onPointerDown,()=>{s.open&&s.onClose(),g.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Ce(n.onFocus,()=>{g.current||s.onOpen()}),onBlur:Ce(n.onBlur,s.onClose),onClick:Ce(n.onClick,s.onClose)})})});IR.displayName=Md;var GR="TooltipPortal",[rO,YR]=hc(GR,{forceMount:void 0}),qr="TooltipContent",VR=b.forwardRef((n,l)=>{const o=YR(qr,n.__scopeTooltip),{forceMount:i=o.forceMount,side:s="top",...u}=n,d=pc(qr,n.__scopeTooltip);return v.jsx(Xr,{present:i||d.open,children:d.disableHoverableContent?v.jsx($x,{side:s,...u,ref:l}):v.jsx(qR,{side:s,...u,ref:l})})}),qR=b.forwardRef((n,l)=>{const o=pc(qr,n.__scopeTooltip),i=Vx(qr,n.__scopeTooltip),s=b.useRef(null),u=st(l,s),[d,m]=b.useState(null),{trigger:h,onClose:g}=o,x=s.current,{onPointerInTransitChange:p}=i,S=b.useCallback(()=>{m(null),p(!1)},[p]),T=b.useCallback((C,M)=>{const A=C.currentTarget,_={x:C.clientX,y:C.clientY},N=FR(_,A.getBoundingClientRect()),D=QR(_,N),V=ZR(M.getBoundingClientRect()),ae=WR([...D,...V]);m(ae),p(!0)},[p]);return b.useEffect(()=>()=>S(),[S]),b.useEffect(()=>{if(h&&x){const C=A=>T(A,x),M=A=>T(A,h);return h.addEventListener("pointerleave",C),x.addEventListener("pointerleave",M),()=>{h.removeEventListener("pointerleave",C),x.removeEventListener("pointerleave",M)}}},[h,x,T,S]),b.useEffect(()=>{if(d){const C=M=>{const A=M.target,_={x:M.clientX,y:M.clientY},N=(h==null?void 0:h.contains(A))||(x==null?void 0:x.contains(A)),D=!JR(_,d);N?S():D&&(S(),g())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[h,x,d,g,S]),v.jsx($x,{...n,ref:u})}),[PR,$R]=hc(Px,{isInside:!1}),XR=qT("TooltipContent"),$x=b.forwardRef((n,l)=>{const{__scopeTooltip:o,children:i,"aria-label":s,onEscapeKeyDown:u,onPointerDownOutside:d,...m}=n,h=pc(qr,o),g=bm(o),{onClose:x}=h;return b.useEffect(()=>(document.addEventListener(p0,x),()=>document.removeEventListener(p0,x)),[x]),b.useEffect(()=>{if(h.trigger){const p=S=>{const T=S.target;T!=null&&T.contains(h.trigger)&&x()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[h.trigger,x]),v.jsx(lc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p=>p.preventDefault(),onDismiss:x,children:v.jsxs(im,{"data-state":h.stateAttribute,...g,...m,ref:l,style:{...m.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(XR,{children:i}),v.jsx(PR,{scope:o,isInside:!0,children:v.jsx(QT,{id:h.contentId,role:"tooltip",children:s||i})})]})})});VR.displayName=qr;var Xx="TooltipArrow",KR=b.forwardRef((n,l)=>{const{__scopeTooltip:o,...i}=n,s=bm(o);return $R(Xx,o).isInside?null:v.jsx(sm,{...s,...i,ref:l})});KR.displayName=Xx;function FR(n,l){const o=Math.abs(l.top-n.y),i=Math.abs(l.bottom-n.y),s=Math.abs(l.right-n.x),u=Math.abs(l.left-n.x);switch(Math.min(o,i,s,u)){case u:return"left";case s:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function QR(n,l,o=5){const i=[];switch(l){case"top":i.push({x:n.x-o,y:n.y+o},{x:n.x+o,y:n.y+o});break;case"bottom":i.push({x:n.x-o,y:n.y-o},{x:n.x+o,y:n.y-o});break;case"left":i.push({x:n.x+o,y:n.y-o},{x:n.x+o,y:n.y+o});break;case"right":i.push({x:n.x-o,y:n.y-o},{x:n.x-o,y:n.y+o});break}return i}function ZR(n){const{top:l,right:o,bottom:i,left:s}=n;return[{x:s,y:l},{x:o,y:l},{x:o,y:i},{x:s,y:i}]}function JR(n,l){const{x:o,y:i}=n;let s=!1;for(let u=0,d=l.length-1;u<l.length;d=u++){const m=l[u],h=l[d],g=m.x,x=m.y,p=h.x,S=h.y;x>i!=S>i&&o<(p-g)*(i-x)/(S-x)+g&&(s=!s)}return s}function WR(n){const l=n.slice();return l.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),eN(l)}function eN(n){if(n.length<=1)return n.slice();const l=[];for(let i=0;i<n.length;i++){const s=n[i];for(;l.length>=2;){const u=l[l.length-1],d=l[l.length-2];if((u.x-d.x)*(s.y-d.y)>=(u.y-d.y)*(s.x-d.x))l.pop();else break}l.push(s)}l.pop();const o=[];for(let i=n.length-1;i>=0;i--){const s=n[i];for(;o.length>=2;){const u=o[o.length-1],d=o[o.length-2];if((u.x-d.x)*(s.y-d.y)>=(u.y-d.y)*(s.x-d.x))o.pop();else break}o.push(s)}return o.pop(),l.length===1&&o.length===1&&l[0].x===o[0].x&&l[0].y===o[0].y?l:l.concat(o)}var tN=qx;const nN=GT("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 wn({className:n,variant:l="default",size:o="default",asChild:i=!1,...s}){const u=i?YT:"button";return v.jsx(u,{"data-slot":"button","data-variant":l,"data-size":o,className:Fe(nN({variant:l,size:o,className:n})),...s})}function aN({slides:n,startSlideId:l,onExit:o}){const i=b.useMemo(()=>{const Z=n.findIndex(ce=>ce.id===l);return Z>=0?Z:0},[n,l]),[s,u]=b.useState(i),[d,m]=b.useState("none"),[h,g]=b.useState("#F59E0B"),[x,p]=b.useState(!1),[S,T]=b.useState([]),[C,M]=b.useState({x:-100,y:-100}),[A,_]=b.useState(!!document.fullscreenElement),[N,D]=b.useState(()=>({height:window.innerHeight,width:window.innerWidth})),V=b.useRef(null),ae=b.useRef(null),I=b.useRef(null),$=b.useRef(0),z=b.useRef(s),F=b.useMemo(()=>R2(n),[n]),ne=F[Math.min(s,F.length-1)]??null;b.useEffect(()=>{const Z=F.findIndex(ce=>ce.id===l);u(Z>=0?Z:0)},[F,l]),b.useEffect(()=>{const Z=F.findIndex(ce=>ce.id===(ne==null?void 0:ne.id));Z>=0&&Z!==s&&u(Z)},[s,ne==null?void 0:ne.id,F]),b.useEffect(()=>()=>{I.current&&window.clearTimeout(I.current)},[]),b.useEffect(()=>{const Z=()=>{_(!!document.fullscreenElement),D({height:window.innerHeight,width:window.innerWidth})};return window.addEventListener("resize",Z),document.addEventListener("fullscreenchange",Z),()=>{window.removeEventListener("resize",Z),document.removeEventListener("fullscreenchange",Z)}},[]);const re=b.useCallback(()=>{p(!0),I.current&&window.clearTimeout(I.current),I.current=window.setTimeout(()=>{p(!1)},1500)},[]);function q(Z){m(ce=>ce===Z?"none":Z)}const H=b.useCallback(()=>{T([]),ae.current=null},[]);function Y(Z){m("none"),u(N2(Z,F.length)),H()}function ee(){Y(s+1)}function E(){var ce;const Z=document.documentElement;if(document.fullscreenElement){(ce=document.exitFullscreen)==null||ce.call(document);return}Z.requestFullscreen&&Z.requestFullscreen()}function j(Z){return Z.clientY>=window.innerHeight-96}function B(Z){if(j(Z)&&re(),d==="laser"&&M({x:Z.clientX,y:Z.clientY}),d==="pen"&&ae.current){const ce=V.current,ve=ce==null?void 0:ce.getBoundingClientRect();if(ce&&ve){const we=Math.min(Math.max(Z.clientX-ve.left,0),ve.width)/J,Te=Math.min(Math.max(Z.clientY-ve.top,0),ve.height)/J,Ue={...ae.current,points:`${ae.current.points} L ${we.toFixed(1)} ${Te.toFixed(1)}`};ae.current=Ue,T(Le=>[...Le.slice(0,-1),Ue])}}}function P(Z){G(),!(d!=="none"||!V.current||!(Z.target instanceof Node))&&V.current.contains(Z.target)&&ee()}function L(Z){if(d!=="none"||Math.abs(Z.deltaY)<Math.abs(Z.deltaX)||Z.deltaY<=8)return;const ce=Date.now();ce-$.current<360||($.current=ce,Z.preventDefault(),ee())}function R(Z){if(d!=="pen"||!V.current||!(Z.target instanceof Node)||!V.current.contains(Z.target))return;const ce=V.current.getBoundingClientRect();if(!(Z.clientX>=ce.left&&Z.clientX<=ce.right&&Z.clientY>=ce.top&&Z.clientY<=ce.bottom))return;const we=Math.min(Math.max(Z.clientX-ce.left,0),ce.width)/J,Te=Math.min(Math.max(Z.clientY-ce.top,0),ce.height)/J,Ue={color:h,points:`M ${we.toFixed(1)} ${Te.toFixed(1)}`};ae.current=Ue,T(Le=>[...Le,Ue])}function G(){ae.current=null}if(b.useEffect(()=>{z.current!==s&&(z.current=s,H())},[s,H]),b.useEffect(()=>{const Z=ce=>{if(ce.key==="Escape"){if(d==="pen"){m("none"),H(),re();return}o();return}(ce.key==="ArrowRight"||ce.key==="ArrowDown"||ce.key==="PageDown")&&(m("none"),u(ve=>Math.min(ve+1,F.length-1))),(ce.key==="ArrowLeft"||ce.key==="ArrowUp"||ce.key==="PageUp")&&(m("none"),u(ve=>Math.max(ve-1,0)))};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)},[H,o,F.length,re,d]),b.useEffect(()=>{var ce;if(!ne)return;const Z=(ce=V.current)==null?void 0:ce.querySelector("[data-testid='presenter-slide-iframe']");Z&&(Z.srcdoc=ne.htmlSource)},[ne]),!ne)return null;const J=Math.min(N.width/ne.width,N.height/ne.height),le=Math.max(320,Math.floor(ne.width*J)),se=Math.max(240,Math.floor(ne.height*J)),ie=`url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6' fill='${encodeURIComponent(h)}' stroke='%23111827' stroke-width='2'/%3E%3C/svg%3E") 12 12, auto`,de=d==="laser"?"none":d==="pen"?ie:"default";return v.jsxs("main",{className:"fixed inset-0 z-50 overflow-hidden bg-[#111]","data-testid":"presenter-view",style:{cursor:de},onPointerMove:B,onPointerDown:R,onPointerUp:P,onPointerLeave:G,onWheel:L,children:[v.jsxs("div",{ref:V,className:"absolute left-1/2 top-1/2 overflow-hidden bg-white shadow-[0_18px_70px_rgba(0,0,0,0.42)]","data-testid":"presenter-slide-frame",style:{width:`${le}px`,height:`${se}px`,transform:"translate(-50%, -50%)"},children:[v.jsx("iframe",{title:"Presented slide",className:"pointer-events-none block border-0 bg-white","data-testid":"presenter-slide-iframe",style:{width:`${ne.width}px`,height:`${ne.height}px`,transform:`scale(${J})`,transformOrigin:"top left"}}),v.jsx("svg",{className:"pointer-events-none absolute inset-0 h-full w-full overflow-visible","data-testid":"presenter-ink-layer","aria-hidden":"true",viewBox:`0 0 ${ne.width} ${ne.height}`,children:S.map((Z,ce)=>v.jsx("path",{d:Z.points,fill:"none",stroke:Z.color,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4},`${Z.color}-${ce}`))})]}),v.jsx("div",{className:"pointer-events-none fixed left-0 top-0 size-4 rounded-full bg-[#f7ff2a] shadow-[0_0_0_1px_rgba(17,24,39,0.85),0_0_14px_rgba(247,255,42,0.9),0_0_24px_rgba(34,211,238,0.65)]","data-testid":"presenter-laser-cursor",style:{opacity:d==="laser"?1:0,transform:`translate(${C.x}px, ${C.y}px) translate(-50%, -50%)`}}),d==="pen"?v.jsx("div",{className:"absolute bottom-[78px] left-1/2 z-20 flex -translate-x-1/2 items-center gap-2 rounded-md border border-white/15 bg-[#111]/90 px-2 py-2 shadow-[0_14px_44px_rgba(0,0,0,0.32)] backdrop-blur-lg","data-testid":"presenter-pen-colors","aria-label":"Pen colors",children:_2.map(Z=>v.jsx("button",{type:"button","aria-label":`Use pen color ${Z}`,className:"size-7 rounded-full border border-white/25 shadow-[0_0_0_1px_rgba(0,0,0,0.25)] transition-transform hover:scale-105",style:{background:Z,outline:h===Z?"2px solid rgba(255,255,255,0.9)":"none",outlineOffset:"2px"},onClick:()=>g(Z)},Z))}):null,v.jsxs("nav",{className:"absolute bottom-6 left-1/2 z-20 flex h-11 -translate-x-1/2 items-center gap-2 rounded-md border border-white/15 bg-[#111]/90 px-2 py-1.5 text-white shadow-[0_18px_52px_rgba(0,0,0,0.38)] backdrop-blur-lg transition-[opacity,transform] duration-150 data-[visible=false]:translate-y-3 data-[visible=false]:opacity-0 data-[visible=false]:pointer-events-none","data-testid":"presenter-toolbar","data-visible":x?"true":"false",onPointerEnter:re,onPointerMove:re,children:[v.jsx(wn,{variant:"ghost",size:"sm","aria-label":"Previous slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>Y(s-1),disabled:s===0,children:"Prev"}),v.jsxs("span",{className:"min-w-14 text-center text-[12px] font-semibold text-white/80",children:[s+1," / ",F.length]}),v.jsx(wn,{variant:"ghost",size:"sm","aria-label":"Next slide",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>Y(s+1),disabled:s>=F.length-1,children:"Next"}),v.jsx("span",{className:"h-5 w-px bg-white/15"}),v.jsxs(wn,{variant:d==="laser"?"secondary":"ghost",size:"sm","aria-label":"Laser pointer",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>q("laser"),"aria-pressed":d==="laser",children:[v.jsx(KE,{className:"size-3.5"}),"Laser"]}),v.jsxs(wn,{variant:d==="pen"?"secondary":"ghost",size:"sm","aria-label":"Pen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:()=>q("pen"),"aria-pressed":d==="pen",children:[v.jsx(EE,{className:"size-3.5"}),"Pen"]}),v.jsxs(wn,{variant:"ghost",size:"sm","aria-label":A?"Exit fullscreen":"Enter fullscreen",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:E,children:[v.jsx(xE,{className:"size-3.5"}),A?"Window":"Fullscreen"]}),v.jsx("span",{className:"h-5 w-px bg-white/15"}),v.jsxs(wn,{variant:"ghost",size:"sm","aria-label":"Exit presentation",className:"h-8 px-2.5 text-white/80 hover:text-white",onClick:o,children:[v.jsx(Ev,{className:"size-3.5"}),"Exit"]})]})]})}function Kx({...n}){return v.jsx(q_,{"data-slot":"context-menu",...n})}function Fx({...n}){return v.jsx(P_,{"data-slot":"context-menu-trigger",...n})}function Ff({...n}){return v.jsx(Q_,{"data-slot":"context-menu-sub",...n})}function Qf({className:n,inset:l,children:o,...i}){return v.jsxs(Z_,{"data-slot":"context-menu-sub-trigger","data-inset":l,className:Fe("flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-[13px] outline-hidden focus:bg-foreground/[0.04] data-[state=open]:bg-foreground/[0.04] data-[inset=true]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5",n),...i,children:[o,v.jsx(Z2,{className:"ml-auto size-3.5 text-foreground/40"})]})}function Zf({className:n,...l}){return v.jsx(J_,{"data-slot":"context-menu-sub-content",className:Fe("z-50 min-w-44 rounded-md border border-foreground/[0.08] bg-white p-1.5 text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",n),...l})}function Qx({className:n,...l}){return v.jsx($_,{children:v.jsx(X_,{"data-slot":"context-menu-content",className:Fe("z-50 min-w-48 rounded-md border border-foreground/[0.08] bg-white p-1.5 text-popover-foreground shadow-[0_4px_20px_rgba(0,0,0,0.06),0_12px_40px_rgba(0,0,0,0.08)] outline-hidden data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",n),...l})})}function bt({className:n,inset:l,variant:o="default",...i}){return v.jsx(K_,{"data-slot":"context-menu-item","data-inset":l,"data-variant":o,className:Fe("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 Ws({className:n,...l}){return v.jsx(F_,{"data-slot":"context-menu-separator",className:Fe("-mx-1 my-1 h-px bg-foreground/10",n),...l})}function g0({className:n,...l}){return v.jsx("span",{"data-slot":"context-menu-shortcut",className:Fe("ml-auto text-[11px] tracking-normal text-foreground/40",n),...l})}function Pr({className:n,type:l,...o}){return v.jsx("input",{type:l,"data-slot":"input",className:Fe("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})}function lN({slides:n,activeSlideId:l,slideCount:o,thumbnails:i,onSelectSlide:s,onAdd:u,onAddSlideAbove:d,onAddSlideBelow:m,onDuplicate:h,onDelete:g,onToggleHidden:x,onRename:p,onReorder:S}){const[T,C]=b.useState(null),[M,A]=b.useState(null),[_,N]=b.useState(null),[D,V]=b.useState(""),ae=T?n.findIndex(q=>q.id===T):-1,I=_?n.find(q=>q.id===_):null,$=b.useCallback(q=>{q==null||q.scrollIntoView({block:"nearest",inline:"nearest"})},[]),z=b.useCallback((q,H)=>{if(!q||H===null){C(null),A(null);return}const Y=n.findIndex(ee=>ee.id===q);Y>=0&&Y!==H&&(S==null||S(q,H)),C(null),A(null)},[S,n]),F=b.useCallback(q=>{N(q.id),V(q.title||"Untitled Slide"),s(q.id)},[s]),ne=b.useCallback(()=>{N(null),V("")},[]),re=b.useCallback(()=>{_&&(p==null||p(_,D),ne())},[ne,p,_,D]);return v.jsxs(v.Fragment,{children:[v.jsx("aside",{className:"flex h-[calc(100vh-3.5rem)] w-[212px] shrink-0 flex-col border-r border-foreground/[0.06] bg-white","data-testid":"slide-sidebar",children:v.jsxs("div",{className:"flex h-full min-h-0 w-full min-w-0 flex-col","data-testid":"slide-sidebar-panel",children:[v.jsxs("div",{className:"flex h-10 items-center justify-between border-b border-foreground/[0.06] px-3",children:[v.jsxs("div",{className:"text-[11px] font-medium uppercase tracking-wider text-foreground/50","data-testid":"slide-count",children:[v.jsx("span",{className:"tabular-nums",children:o})," slides"]}),v.jsx("button",{onClick:u,className:"flex size-7 items-center justify-center rounded-md text-foreground/50 transition-colors hover:bg-foreground/[0.06] hover:text-foreground",type:"button",title:"Add slide","aria-label":"Add slide",children:v.jsx(Lf,{className:"size-3.5"})})]}),v.jsx("div",{className:"min-h-0 flex-1 space-y-2.5 overflow-y-auto px-2 py-2.5 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden","data-testid":"slide-list",children:n.map((q,H)=>{const Y=q.id===l,ee=q.hidden===!0,E=q.id===T,j=ae>=0&&M===H&&H<ae&&T!==q.id,B=ae>=0&&M===H&&H>ae&&T!==q.id;return v.jsxs(Kx,{children:[v.jsx(Fx,{asChild:!0,children:v.jsxs("div",{draggable:!0,onDragStart:P=>{C(q.id),A(H),P.dataTransfer.effectAllowed="move",P.dataTransfer.setData("text/plain",q.id)},onDragOver:P=>{P.preventDefault(),P.dataTransfer.dropEffect="move",A(H)},onDrop:P=>{P.preventDefault(),P.stopPropagation();const L=P.dataTransfer.getData("text/plain")||T;z(L,H)},onDragEnd:()=>{C(null),A(null)},className:Fe("group relative flex cursor-grab items-stretch gap-1.5 rounded-lg active:cursor-grabbing",E&&"opacity-60"),"data-testid":"slide-card",children:[j?v.jsx(y0,{}):null,v.jsx("div",{className:Fe("flex w-5 items-start justify-center pt-2 text-[11px] font-semibold tabular-nums transition-colors",Y?"text-foreground":"text-foreground/55 group-hover:text-foreground/75"),children:H+1}),v.jsxs("div",{className:Fe("relative flex-1 overflow-hidden rounded-lg ring-1 ring-inset transition-all",Y?"shadow-[0_0_0_2px_var(--background),0_0_0_3px_var(--foreground)] ring-foreground":"ring-foreground/30 shadow-[0_0_0_1px_rgba(0,0,0,0.05),0_1px_3px_rgba(0,0,0,0.04)] hover:ring-foreground/45",ee&&"opacity-40"),children:[v.jsx("button",{ref:Y?$:null,className:"block w-full text-left focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",onClick:()=>s(q.id),type:"button","aria-label":`Slide ${H+1}`,"aria-current":Y?"true":void 0,children:v.jsxs("div",{className:"relative aspect-[16/9] w-full bg-white","data-testid":"slide-thumbnail",children:[i[q.id]?v.jsx("img",{alt:`Slide ${H+1}`,className:"absolute inset-0 block size-full object-cover",src:i[q.id]}):v.jsxs("div",{className:"absolute inset-0 flex items-center justify-center text-[10px] text-foreground/20",children:["Slide ",H+1]}),ee?v.jsx("div",{className:"absolute left-1 top-1 flex size-4 items-center justify-center rounded bg-foreground/80 text-background","data-testid":"slide-hidden-indicator",children:v.jsx(_y,{className:"size-2.5"})}):null]})}),v.jsx("div",{className:"h-6 border-t border-foreground/[0.04] bg-white",children:v.jsx("button",{className:"h-full w-full truncate rounded-b-lg px-2 text-left text-[11px] text-foreground/60 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ring",type:"button",onClick:()=>s(q.id),onDoubleClick:()=>F(q),"aria-label":`Slide title: ${q.title||"Untitled Slide"}`,children:q.title||"Untitled Slide"})})]}),B?v.jsx(y0,{position:"after"}):null]})}),v.jsxs(Qx,{"aria-label":"Slide actions",className:"min-w-36",children:[v.jsxs(bt,{onSelect:()=>d==null?void 0:d(q.id),children:[v.jsx(Lf,{className:"size-3.5"}),"Add Slide Above"]}),v.jsxs(bt,{onSelect:()=>m==null?void 0:m(q.id),children:[v.jsx(Lf,{className:"size-3.5"}),"Add Slide Below"]}),v.jsx(Ws,{}),v.jsxs(bt,{onSelect:()=>h==null?void 0:h(q.id),children:[v.jsx(gv,{className:"size-3.5"}),"Duplicate"]}),v.jsxs(bt,{onSelect:()=>F(q),children:[v.jsx(CE,{className:"size-3.5"}),"Rename"]}),v.jsxs(bt,{onSelect:()=>x==null?void 0:x(q.id),children:[ee?v.jsx(yv,{className:"size-3.5"}):v.jsx(_y,{className:"size-3.5"}),ee?"Show":"Hide"]}),v.jsx(Ws,{}),v.jsxs(bt,{disabled:n.length<=1,variant:"destructive",onSelect:()=>g==null?void 0:g(q.id),children:[v.jsx(Sv,{className:"size-3.5"}),"Delete"]})]})]},q.id)})})]})}),I?v.jsx(rN,{draft:D,slideTitle:I.title||"Untitled Slide",onCancel:ne,onChange:V,onSave:re}):null]})}function rN({draft:n,slideTitle:l,onCancel:o,onChange:i,onSave:s}){const u=b.useRef(null);return b.useEffect(()=>{const d=window.requestAnimationFrame(()=>{var h,g;(h=u.current)==null||h.focus(),(g=u.current)==null||g.select()}),m=h=>{h.key==="Escape"&&o()};return document.addEventListener("keydown",m),()=>{window.cancelAnimationFrame(d),document.removeEventListener("keydown",m)}},[o]),v.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center bg-foreground/20 px-4",onMouseDown:d=>{d.target===d.currentTarget&&o()},children:v.jsx("dialog",{open:!0,"aria-modal":"true","aria-labelledby":"rename-slide-title",className:"relative m-0 w-full max-w-[420px] overflow-hidden rounded-lg border border-foreground/[0.08] bg-white p-0 shadow-[0_24px_80px_rgba(0,0,0,0.18)]","data-testid":"rename-slide-dialog",children:v.jsxs("form",{onSubmit:d=>{d.preventDefault(),s()},children:[v.jsxs("div",{className:"border-b border-foreground/[0.08] px-4 py-3",children:[v.jsx("h2",{id:"rename-slide-title",className:"text-[14px] font-semibold text-foreground",children:"Rename slide"}),v.jsx("p",{className:"mt-0.5 truncate text-[11px] text-foreground/50",children:l})]}),v.jsxs("div",{className:"space-y-2 px-4 py-4",children:[v.jsx("label",{htmlFor:"rename-slide-input",className:"text-[12px] font-medium text-foreground",children:"Slide name"}),v.jsx(Pr,{ref:u,id:"rename-slide-input",value:n,onChange:d=>i(d.target.value)})]}),v.jsxs("div",{className:"flex justify-end gap-2 border-t border-foreground/[0.08] px-4 py-3",children:[v.jsx(wn,{type:"button",variant:"outline",onClick:o,children:"Cancel"}),v.jsx(wn,{type:"submit",children:"Save"})]})]})})})}function y0({position:n="before"}){return v.jsxs("div",{className:Fe("pointer-events-none absolute left-6 right-1 z-10 flex h-3 items-center",n==="before"?"-top-[11px]":"-bottom-[11px]"),"data-testid":"slide-insertion-marker",children:[v.jsx("span",{className:"size-2 rounded-full bg-foreground/55"}),v.jsx("span",{className:"h-0.5 flex-1 rounded-full bg-foreground/55"})]})}const oN=18,iN=6,Rs=24,Ns="#ef4444",ec=40,v0=12,b0=360;function Hr(n,l,o,i,s){return Math.max(n,o)-Math.min(l,i)<=s}function sN({selectionBounds:n,snapGuides:l,resizeHandles:o,rotationHandle:i,onResizeHandleMouseDown:s,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 v.jsxs(v.Fragment,{children:[l.map((m,h)=>{const g=m.variant==="spacing"?"2px":"1px",x=14,p=m.variant==="spacing"?2:1,S=m.orientation==="vertical",T=S?{left:`${m.start.x}px`,top:`${Math.min(m.start.y,m.end.y)}px`,width:"0",height:`${Math.max(Math.abs(m.end.y-m.start.y),32)}px`,borderLeftWidth:g,borderLeftStyle:"solid",borderLeftColor:Ns,opacity:m.variant==="spacing"?.9:.82}:{left:`${Math.min(m.start.x,m.end.x)}px`,top:`${m.start.y}px`,width:`${Math.max(Math.abs(m.end.x-m.start.x),32)}px`,height:"0",borderTopWidth:g,borderTopStyle:"solid",borderTopColor:Ns,opacity:m.variant==="spacing"?.9:.82},C=S?{width:`${x}px`,height:`${p}px`,left:`${-x/2}px`,backgroundColor:Ns}:{width:`${p}px`,height:`${x}px`,top:`${-x/2}px`,backgroundColor:Ns};return v.jsx("div",{className:"pointer-events-none absolute z-[4]","data-testid":`snap-guide-${m.orientation}`,"data-variant":m.variant,style:T,children:m.variant==="spacing"?v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...C,top:"0"}:{...C,left:"0"}}),v.jsx("span",{className:"absolute","data-testid":"snap-guide-cap",style:S?{...C,bottom:"0"}:{...C,right:"0"}})]}):null},`${m.orientation}-${m.start.x}-${m.start.y}-${m.end.x}-${m.end.y}-${m.variant}-${h}`)}),v.jsx("button",{type:"button",className:`${d} cursor-alias`,"data-testid":"block-rotate-handle","aria-label":"Rotate selected element",style:{left:`${i.x}px`,top:`${i.y}px`},onMouseDown:u}),o.map(m=>v.jsx("button",{type:"button",className:`${d} cursor-nwse-resize`,"data-testid":`block-resize-handle-${m.corner}`,"aria-label":`Resize selected element from ${m.corner}`,style:{left:`${m.x}px`,top:`${m.y}px`},onMouseDown:h=>{s(m.corner,h)}},m.corner))]})}function cN({selectionCommandAvailability:n,onAlignToSlide:l,onDelete:o,onDistribute:i,onDuplicate:s,onGroup:u,onLayerOrder:d,onUngroup:m}){return v.jsxs(Qx,{"aria-label":"Selection actions",children:[v.jsxs(bt,{disabled:!n.group,onSelect:u,children:[v.jsx(dd,{className:"size-3.5"}),"Group"]}),v.jsxs(bt,{disabled:!n.ungroup,onSelect:m,children:[v.jsx(wv,{className:"size-3.5"}),"Ungroup"]}),v.jsx(Ws,{}),v.jsxs(Ff,{children:[v.jsxs(Qf,{children:[v.jsx(ud,{className:"size-3.5"}),"Layer"]}),v.jsxs(Zf,{children:[v.jsxs(bt,{onSelect:()=>d("front"),children:[v.jsx(ud,{className:"size-3.5"}),"Bring to front"]}),v.jsxs(bt,{onSelect:()=>d("forward"),children:[v.jsx(Yd,{className:"size-3.5"}),"Bring forward"]}),v.jsxs(bt,{onSelect:()=>d("backward"),children:[v.jsx(Jo,{className:"size-3.5"}),"Send backward"]}),v.jsxs(bt,{onSelect:()=>d("back"),children:[v.jsx(hv,{className:"size-3.5"}),"Send to back"]})]})]}),v.jsxs(Ff,{children:[v.jsxs(Qf,{children:[v.jsx(cd,{className:"size-3.5"}),"Align"]}),v.jsxs(Zf,{children:[v.jsxs(bt,{onSelect:()=>l("left"),children:[v.jsx(dv,{className:"size-3.5"}),"Align left"]}),v.jsxs(bt,{onSelect:()=>l("hcenter"),children:[v.jsx(cd,{className:"size-3.5"}),"Align horizontal center"]}),v.jsxs(bt,{onSelect:()=>l("right"),children:[v.jsx(uv,{className:"size-3.5"}),"Align right"]}),v.jsxs(bt,{onSelect:()=>l("top"),children:[v.jsx(mv,{className:"size-3.5"}),"Align top"]}),v.jsxs(bt,{onSelect:()=>l("vcenter"),children:[v.jsx(cv,{className:"size-3.5"}),"Align vertical center"]}),v.jsxs(bt,{onSelect:()=>l("bottom"),children:[v.jsx(fv,{className:"size-3.5"}),"Align bottom"]})]})]}),v.jsxs(Ff,{children:[v.jsxs(Qf,{children:[v.jsx(fd,{className:"size-3.5"}),"Distribute"]}),v.jsxs(Zf,{children:[v.jsxs(bt,{onSelect:()=>i("horizontal"),children:[v.jsx(fd,{className:"size-3.5"}),"Horizontally"]}),v.jsxs(bt,{onSelect:()=>i("vertical"),children:[v.jsx(xv,{className:"size-3.5"}),"Vertically"]})]})]}),v.jsx(Ws,{}),v.jsxs(bt,{onSelect:s,children:[v.jsx(gv,{className:"size-3.5"}),"Duplicate",v.jsx(g0,{children:"⌘D"})]}),v.jsxs(bt,{variant:"destructive",onSelect:o,children:[v.jsx(Sv,{className:"size-3.5"}),"Delete",v.jsx(g0,{children:"Del"})]})]})}const uN=[{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 fN(n,l){const o=S0(n),i=S0(l);return!o||!i?!1:o===i||w0(x0(n))===w0(x0(l))}function dN(n){const l=n.trim().toLowerCase();if(l==="bold"||l==="bolder")return!0;const o=Number.parseInt(l,10);return Number.isFinite(o)&&o>=600}function Ad(n){const l=new Set,o=n.toLowerCase();if(!o||o==="none")return l;for(const i of o.split(/\s+/))(i==="underline"||i==="line-through"||i==="overline")&&l.add(i);return l}function mN(n){return hN(n)?n.trim():pN(n)??"#000000"}function hN(n){return/^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.trim())}function x0(n){return(n.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function S0(n){return n.toLowerCase().replace(/["']/g,"").replace(/\s+/g," ").trim()}function w0(n){return n.toLowerCase().replace(/["']/g,"").trim()}function Jf(n){return Math.max(0,Math.min(255,Number.parseInt(n,10)||0)).toString(16).padStart(2,"0")}function pN(n){const l=n.trim().match(/^rgba?\(\s*(\d{1,3})[\s,]+(\d{1,3})[\s,]+(\d{1,3})(?:[\s,/]+[\d.]+)?\s*\)$/i);return l?`#${Jf(l[1]||"0")}${Jf(l[2]||"0")}${Jf(l[3]||"0")}`:null}function _d({feature:n,inspectedStyles:l,attributeValues:o}){var s,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=yN(l,n.propertyName);return n.id==="font-family"?((u=(s=n.options)==null?void 0:s.find(d=>fN(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($n(i).rotate):n.controlType==="color"?mN(i):n.id==="text-align"&&i==="start"?"left":i}function E0(n,l){return n.id==="font-size"&&l.trim()?`${Math.min(200,Math.max(8,Number.parseFloat(l)||8))}px`:n.id==="font-bold"?l?"700":"400":n.id==="font-italic"?l?"italic":"normal":n.id==="font-underline"?l?"underline":"none":n.id==="font-strikethrough"?l?"line-through":"none":n.id==="locked"?l?"true":"":l.trim()}function T0(n,l,o){const i=Ad(n);return o?i.delete(l):i.add(l),i.size?Array.from(i).join(" "):"none"}function Zx(n,l){return n.id==="font-bold"?dN(l):n.id==="font-italic"?l.trim().toLowerCase()==="italic":n.id==="font-underline"?Ad(l).has("underline"):n.id==="font-strikethrough"?Ad(l).has("line-through"):n.id==="locked"?l==="true":!!l}function gN(n,l){const o=n.options??[{label:"unset",value:""}];return!l||o.some(i=>i.value===l)?o:[{label:l,value:l},...o]}function yN(n,l){var o;return((o=n.find(i=>i.name===l))==null?void 0:o.value)??""}function vN({attributeValues:n,feature:l,inspectedStyles:o,nextValue:i,onAlignToSlide:s,onAttributeChange:u,onLayerOrder:d,onStyleChange:m}){if(l.target==="style"&&l.propertyName){const h=_d({feature:l,inspectedStyles:o,attributeValues:n});if(l.id==="rotation"){const g=bN(o),x=$n(g),p=Number.parseFloat(i);m(l.propertyName,Na(x.translateX,x.translateY,Number.isFinite(p)?p:0)??"");return}if(l.id==="font-underline"){m(l.propertyName,T0(h,"underline",i===""));return}if(l.id==="font-strikethrough"){m(l.propertyName,T0(h,"line-through",i===""));return}m(l.propertyName,E0(l,i));return}if(l.target==="attribute"&&l.attributeName){u(l.attributeName,E0(l,i));return}l.id==="align-to-slide"&&s(i),l.id==="layer-order"&&d(i)}function bN(n){var l;return((l=n.find(o=>o.name==="transform"))==null?void 0:l.value)??""}const xN=[{value:"left",label:"Left",icon:YE},{value:"center",label:"Center",icon:BE},{value:"right",label:"Right",icon:IE}],SN=[{value:"left",icon:dv,label:"Align left"},{value:"hcenter",icon:cd,label:"Align horizontal center"},{value:"right",icon:uv,label:"Align right"},{value:"top",icon:mv,label:"Align top"},{value:"vcenter",icon:cv,label:"Align vertical center"},{value:"bottom",icon:fv,label:"Align bottom"}],wN=[{value:"front",icon:ud,label:"Bring to front"},{value:"forward",icon:Yd,label:"Bring forward"},{value:"backward",icon:Jo,label:"Send backward"},{value:"back",icon:hv,label:"Send to back"}],EN=[{value:"horizontal",icon:fd,label:"Distribute horizontally"},{value:"vertical",icon:xv,label:"Distribute vertically"}],C0=[{id:"typography",label:"Typography",icon:zy,subgroups:[{id:"font",label:"Font",icon:zy,features:[{id:"font-family",label:"Font family",controlType:"select",target:"style",propertyName:"font-family",options:uN.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:AE,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:xN}]}]},{id:"appearance",label:"Appearance",icon:Ny,subgroups:[{id:"fill",label:"Fill",icon:Ny,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:$2,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:Oy,subgroups:[{id:"size",label:"Size",icon:Oy,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:yv,features:[{id:"opacity",label:"Opacity",controlType:"slider",target:"style",propertyName:"opacity",min:0,max:1,step:.01}]},{id:"rotation",label:"Rotation",icon:jE,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:bv,features:[{id:"align-to-slide",label:"Align selected element to slide bounds",controlType:"action-group",target:"operation",options:SN},{id:"layer-order",label:"Layer order",controlType:"action-group",target:"operation",options:wN},{id:"distribute",label:"Distribute selection",controlType:"action-group",target:"operation",options:EN}]},{id:"grouping",label:"Group",icon:dd,features:[{id:"group",label:"Group selection",controlType:"action-group",target:"operation",options:[{value:"group",icon:dd,label:"Group"}]},{id:"ungroup",label:"Ungroup selected group",controlType:"action-group",target:"operation",options:[{value:"ungroup",icon:wv,label:"Ungroup"}]}]}]},{id:"misc",label:"Misc",icon:Ry,subgroups:[{id:"state",label:"State",icon:Ry,features:[{id:"locked",label:"Lock / unlock",controlType:"toggle",target:"attribute",attributeName:"data-editor-locked"}]},{id:"link",label:"Link",icon:yE,features:[{id:"link-url",label:"Link URL",controlType:"text",target:"attribute",attributeName:"data-link-url",placeholder:"https://"}]}]},{id:"others",label:"Others",icon:kf,subgroups:[{id:"text-alternatives",label:"Text alternatives",icon:kf,features:[{id:"alt-text",label:"Alt text",controlType:"text",target:"attribute",attributeName:"alt",placeholder:"Describe this element"}]},{id:"labels",label:"Labels",icon:kf,features:[{id:"aria-label",label:"ARIA label",controlType:"text",target:"attribute",attributeName:"aria-label",placeholder:"aria-label"}]},{id:"css",label:"CSS",icon:hE,features:[{id:"custom-css",label:"Custom CSS property",controlType:"custom-css",target:"style"}]}]}],TN=200,Jx="motion-safe:duration-200 motion-safe:ease-out",Wx="motion-safe:animate-in motion-safe:fade-in-0 motion-reduce:animate-none",CN="motion-safe:animate-out motion-safe:fade-out-0 motion-reduce:animate-none",MN=["#0F172A","#FFFFFF","#EF4444","#F97316","#F59E0B","#EAB308","#84CC16","#10B981","#06B6D4","#3B82F6","#8B5CF6","#EC4899"],AN=["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 _N({value:n,includeGradients:l=!0,onChange:o}){const i=b.useRef(null),s=b.useRef(null),u=b.useMemo(()=>RN(n),[n]),d=Wf(u),[m,h]=b.useState(d.replace("#","")),g=`hsl(${u.h}, 100%, 50%)`;b.useEffect(()=>{h(d.replace("#",""))},[d]);function x(S){var A;const T=(A=i.current)==null?void 0:A.getBoundingClientRect();if(!T)return;S.currentTarget.setPointerCapture(S.pointerId);const C=Bs((S.clientX-T.left)/T.width,0,1),M=Bs(1-(S.clientY-T.top)/T.height,0,1);o(Wf({...u,s:C,v:M}))}function p(S){var M;const T=(M=s.current)==null?void 0:M.getBoundingClientRect();if(!T)return;S.currentTarget.setPointerCapture(S.pointerId);const C=Math.round(Bs((S.clientX-T.left)/T.width,0,1)*360);o(Wf({...u,h:C===360?0:C}))}return v.jsxs("div",{className:"grid gap-3",children:[v.jsx("div",{className:"relative h-36 w-full touch-none select-none overflow-hidden rounded-xl border-0 before:pointer-events-none before:absolute before:inset-0 before:bg-[linear-gradient(to_top,#000,transparent),linear-gradient(to_right,#fff,transparent)] before:content-[''] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",ref:i,role:"slider","aria-label":"Color saturation and brightness","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(u.v*100),"aria-valuetext":d,tabIndex:0,style:{backgroundColor:g},onPointerDown:x,onPointerMove:S=>{S.buttons===1&&x(S)},children:v.jsx("span",{className:"pointer-events-none absolute size-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white bg-current shadow-[0_2px_8px_rgba(0,0,0,0.22)]","aria-hidden":"true",style:{color:d,left:`calc(${u.s*100}% + ${(.5-u.s)*22}px)`,top:`calc(${(1-u.v)*100}% + ${(u.v-.5)*22}px)`}})}),v.jsx("div",{className:"relative h-3 touch-none select-none rounded-full bg-[linear-gradient(to_right,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",ref:s,role:"slider","aria-label":"Hue","aria-valuemin":0,"aria-valuemax":359,"aria-valuenow":u.h,tabIndex:0,onPointerDown:p,onPointerMove:S=>{S.buttons===1&&p(S)},children:v.jsx("span",{className:"pointer-events-none absolute -top-0.5 size-4 -translate-x-1/2 rounded-full border-2 border-white bg-current shadow-[0_2px_8px_rgba(0,0,0,0.2)]","aria-hidden":"true",style:{color:g,left:`${u.h/360*100}%`}})}),v.jsxs("div",{className:"grid grid-cols-[40px_auto_minmax(0,1fr)] items-center gap-2",children:[v.jsx("span",{className:"size-10 rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)]",style:{background:d},"aria-hidden":"true"}),v.jsx("span",{className:"font-mono text-sm font-medium leading-none text-foreground/45",children:"#"}),v.jsx(Pr,{className:"h-8 rounded-md bg-foreground/[0.03] px-2 font-mono text-sm font-medium uppercase",type:"text",value:m,spellCheck:!1,onChange:S=>{const T=S.target.value.replace(/[^0-9a-f]/gi,"").slice(0,6);h(T),T.length===6&&o(`#${T}`)},onBlur:()=>{h(d.replace("#",""))}})]}),v.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset colors",children:[v.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Presets"}),v.jsx("div",{className:"grid grid-cols-12 gap-1",children:MN.map(S=>v.jsx("button",{className:Fe("aspect-square min-w-0 cursor-pointer rounded-md border border-foreground/10 shadow-[0_1px_4px_rgba(0,0,0,0.08)] transition-[box-shadow,outline-color,border-color] duration-150 hover:border-foreground/25 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",S.toLowerCase()===n.toLowerCase()&&"shadow-[0_0_0_2px_white,0_0_0_4px_rgba(0,0,0,0.18)]"),type:"button",style:{background:S},"aria-label":`Use ${S}`,onClick:()=>{o(S)}},S))})]}),l?v.jsxs("section",{className:"grid gap-1.5","aria-label":"Preset gradients",children:[v.jsx("div",{className:"text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:"Gradients"}),v.jsx("div",{className:"grid grid-cols-6 gap-1.5",children:AN.map(S=>v.jsx("button",{className:Fe("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 Bs(n,l,o){return Math.min(Math.max(n,l),o)}function RN(n){const l={h:220,s:.54,v:.5},o=/^#?([0-9a-f]{6})$/i.exec(n.trim());if(!o)return l;const i=o[1],s=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,m=Math.max(s,u,d),h=Math.min(s,u,d),g=m-h;let x=0;g!==0&&(m===s?x=(u-d)/g%6:m===u?x=(d-s)/g+2:x=(s-u)/g+4);const p=Math.round(x*60);return{h:p<0?p+360:p,s:m===0?0:g/m,v:m}}function Wf({h:n,s:l,v:o}){const i=o*l,s=i*(1-Math.abs(n/60%2-1)),u=o-i;let d=0,m=0,h=0;return n<60?(d=i,m=s):n<120?(d=s,m=i):n<180?(m=i,h=s):n<240?(m=s,h=i):n<300?(d=s,h=i):(d=i,h=s),`#${ed(d+u)}${ed(m+u)}${ed(h+u)}`.toUpperCase()}function ed(n){return Math.round(Bs(n,0,1)*255).toString(16).padStart(2,"0")}function NN({className:n,orientation:l="horizontal",decorative:o=!0,...i}){return v.jsx(HR,{"data-slot":"separator",decorative:o,orientation:l,className:Fe("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 ON({children:n,active:l=!1,label:o,onClick:i}){return v.jsx(wn,{variant:l?"secondary":"ghost",size:"icon-sm",className:Fe("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",l&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":o,title:o,onClick:i,children:n})}function zN({children:n,active:l=!1,label:o,onClick:i}){return v.jsx(wn,{variant:l?"secondary":"ghost",size:"icon-sm",className:Fe("h-8 w-8 rounded-md text-foreground/60 hover:text-foreground",l&&"bg-foreground/[0.06] text-foreground"),type:"button","aria-label":o,title:o,onClick:i,children:n})}function DN({children:n,left:l,width:o="default"}){const i=b.useRef(null),[s,u]=b.useState({x:0,y:0});b.useLayoutEffect(()=>{const m=i.current;if(!m)return;const h=m.getBoundingClientRect(),g=m.closest('[data-testid="floating-toolbar-anchor"]'),x=g instanceof HTMLElement?g.getBoundingClientRect():null,p=x?x.left+l:h.left-s.x,S=x?x.bottom+8:h.top-s.y,T={bottom:S+h.height,left:p,right:p+h.width,top:S},C=16;let M=0,A=0;T.right>window.innerWidth-C&&(M=window.innerWidth-C-T.right),T.left+M<C&&(M+=C-(T.left+M)),T.bottom>window.innerHeight-C&&(A=window.innerHeight-C-T.bottom),T.top+A<C&&(A+=C-(T.top+A)),(Rd(s.x,M)||Rd(s.y,A))&&u({x:M,y:A})},[l,s.x,s.y]);const d=o==="wide"?"w-80 max-w-[min(320px,calc(100vw-40px))] max-h-[calc(100vh-36px)] overflow-y-auto":o==="medium"?"w-[272px]":"w-64";return v.jsx("div",{className:Fe("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)]",Jx,Wx,d),ref:i,style:{left:l+s.x,top:`calc(100% + 8px + ${s.y}px)`},role:"menu",children:n})}function jN(n){return n.features.some(l=>l.controlType==="color")?"wide":n.features.some(l=>l.controlType==="action-group")?"medium":"default"}function Rd(n,l){return Math.abs(n-l)>=.5}function kN(){return v.jsx(NN,{orientation:"vertical",className:"mx-1 h-4 bg-foreground/10"})}function LN({children:n}){return v.jsx("div",{className:"inline-flex items-center gap-1.5 px-2 py-1 text-[10px] font-medium uppercase leading-tight tracking-wider text-foreground/40",children:n})}function Yl({children:n,htmlFor:l}){return v.jsx("label",{htmlFor:l,className:"text-[10px] font-medium uppercase tracking-wider text-foreground/50",children:n})}function Nd({icon:n}){return v.jsx(n,{className:"size-3.5"})}function HN({children:n,disabled:l=!1,onClick:o,title:i}){return v.jsx(wn,{variant:"ghost",className:"min-h-8 w-full justify-start gap-2 rounded-md px-2 py-1.5 text-left text-[13px] font-normal text-foreground/70 hover:text-foreground",type:"button",disabled:l,title:i,onClick:o,children:n})}function BN({...n}){return v.jsx(SR,{"data-slot":"select",...n})}function UN({...n}){return v.jsx(_R,{"data-slot":"select-group",...n})}function IN({...n}){return v.jsx(ER,{"data-slot":"select-value",...n})}function GN({className:n,size:l="default",children:o,...i}){return v.jsxs(wR,{"data-slot":"select-trigger","data-size":l,className:Fe("flex w-fit items-center justify-between gap-2 rounded-md border border-foreground/[0.08] bg-foreground/[0.03] px-2 text-sm whitespace-nowrap shadow-none transition-colors outline-none hover:bg-foreground/[0.05] focus-visible:border-foreground/20 focus-visible:bg-white focus-visible:ring-[2px] focus-visible:ring-ring/35 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-foreground/35 data-[size=default]:h-8 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_svg:not([class*='text-'])]:text-foreground/45",n),...i,children:[o,v.jsx(TR,{asChild:!0,children:v.jsx(Jo,{className:"size-4 opacity-50"})})]})}function YN({className:n,children:l,position:o="item-aligned",align:i="center",...s}){return v.jsx(CR,{children:v.jsxs(MR,{"data-slot":"select-content",className:Fe("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,...s,children:[v.jsx(qN,{}),v.jsx(AR,{className:Fe("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:l}),v.jsx(PN,{})]})})}function VN({className:n,children:l,...o}){return v.jsxs(RR,{"data-slot":"select-item",className:Fe("relative flex w-full cursor-default items-center gap-2 rounded-md py-1.5 pr-8 pl-2 text-[13px] text-foreground/70 outline-hidden select-none focus:bg-foreground/[0.04] focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 [&_svg:not([class*='text-'])]:text-foreground/50 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n),...o,children:[v.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:v.jsx(OR,{children:v.jsx(pv,{className:"size-4"})})}),v.jsx(NR,{children:l})]})}function qN({className:n,...l}){return v.jsx(zR,{"data-slot":"select-scroll-up-button",className:Fe("flex cursor-default items-center justify-center py-1",n),...l,children:v.jsx(Yd,{className:"size-4"})})}function PN({className:n,...l}){return v.jsx(DR,{"data-slot":"select-scroll-down-button",className:Fe("flex cursor-default items-center justify-center py-1",n),...l,children:v.jsx(Jo,{className:"size-4"})})}const Os="__empty__";function $N({currentValue:n,feature:l,onClosePanel:o,onCommitFeature:i,operationAvailability:s,onStyleChange:u}){const d=`floating-${l.id}`;if(l.controlType==="select")return v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Yl,{htmlFor:d,children:l.label}),v.jsxs(BN,{value:n||Os,onValueChange:m=>i(l,m===Os?"":m),children:[v.jsx(GN,{id:d,"aria-label":l.label,size:"sm",className:"h-8 rounded-md border-transparent bg-foreground/[0.03] px-2 text-xs shadow-none hover:bg-foreground/[0.06]","data-value":n,children:v.jsx(IN,{})}),v.jsx(YN,{children:v.jsx(UN,{children:gN(l,n).map(m=>v.jsx(VN,{value:m.value||Os,"data-value":m.value,style:l.id==="font-family"&&m.value?{fontFamily:m.value}:void 0,children:m.label},m.value||Os))})})]})]},l.id);if(l.controlType==="color")return v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Yl,{children:l.label}),v.jsx(_N,{value:n,includeGradients:l.id==="background-color",onChange:m=>i(l,m)})]},l.id);if(l.controlType==="toggle"){const m=Zx(l,n);return v.jsx(wn,{type:"button",variant:m?"secondary":"outline","aria-pressed":m,onClick:()=>i(l,m?"":"true"),children:l.label},l.id)}return l.controlType==="slider"||l.controlType==="number"?v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Yl,{htmlFor:d,children:l.label}),v.jsx(Pr,{id:d,type:"number",min:l.min,max:l.max,step:l.step,value:n,onChange:m=>i(l,m.target.value),className:"h-8 rounded-md bg-foreground/[0.03] px-2 text-[13px] tabular-nums"})]},l.id):l.controlType==="action-group"?v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Yl,{children:l.label}),v.jsx("div",{className:"grid gap-1",children:(l.options??[]).map(m=>{const h=m.icon,g=l.target==="operation"&&s?s[l.id]===!1:!1;return v.jsxs(HN,{disabled:g,title:m.label,onClick:()=>{g||(i(l,m.value),o())},children:[h?v.jsx(Nd,{icon:h}):null,v.jsx("span",{children:m.label})]},m.value)})})]},l.id):l.controlType==="custom-css"?v.jsx(XN,{onCommit:u},l.id):v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Yl,{htmlFor:d,children:l.label}),v.jsx(Pr,{id:d,type:"text",value:n,placeholder:l.placeholder,onChange:m=>i(l,m.target.value),className:"h-8 rounded-md bg-foreground/[0.03] px-2 text-[13px]"})]},l.id)}function XN({onCommit:n}){const l=b.useId(),o=b.useId(),[i,s]=b.useState(""),[u,d]=b.useState("");function m(){const h=i.trim();h&&(n(h,u.trim()),d(""))}return v.jsxs("div",{className:"grid gap-2",children:[v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Yl,{htmlFor:l,children:"Property name"}),v.jsx(Pr,{id:l,type:"text",value:i,placeholder:"e.g. justify-content",onChange:h=>s(h.target.value)})]}),v.jsxs("div",{className:"grid gap-1",children:[v.jsx(Yl,{htmlFor:o,children:"Property value"}),v.jsx(Pr,{id:o,type:"text",value:u,placeholder:"e.g. space-between",onChange:h=>d(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),m())}})]}),v.jsx(wn,{type:"button",variant:"outline",disabled:!i.trim(),onClick:m,children:"Apply property"})]})}function KN({inspectedStyles:n,selectedElementType:l,selectionCommandAvailability:o,attributeValues:i,onStyleChange:s,onAttributeChange:u,onAlignToSlide:d,onDistribute:m,onGroup:h,onLayerOrder:g,onUngroup:x}){const p=b.useRef(null),[S,T]=b.useState(null),[C,M]=b.useState(0),[A,_]=b.useState(0),N=b.useRef(0);b.useEffect(()=>{if(p.current)return()=>{const F=p.current,ne=F==null?void 0:F.closest('[data-testid="stage-panel"]');if(!(F instanceof HTMLElement)||!(ne instanceof HTMLElement))return;const re=F.getBoundingClientRect(),q=ne.getBoundingClientRect(),H=F.cloneNode(!0);H instanceof HTMLElement&&(H.className=Fe(H.className,"absolute z-40 m-0 pointer-events-none"),H.classList.remove("motion-safe:animate-in","motion-safe:fade-in-0"),H.className=Fe(H.className,CN),H.setAttribute("aria-hidden","true"),H.style.left=`${re.left-q.left}px`,H.style.top=`${re.top-q.top}px`,H.style.width=`${re.width}px`,H.style.height=`${re.height}px`,ne.appendChild(H),H.addEventListener("animationend",()=>{H.remove()}),window.setTimeout(()=>{H.remove()},TN+50))}},[]),b.useLayoutEffect(()=>{const z=p.current;if(!z)return;const F=z.getBoundingClientRect(),ne=F.left-N.current,re=F.right-N.current,q=16;let H=0;ne<q&&(H=q-ne),re+H>window.innerWidth-q&&(H+=window.innerWidth-q-(re+H)),Rd(N.current,H)&&(N.current=H,_(H))},[]),b.useEffect(()=>{function z(F){var ne;(ne=p.current)!=null&&ne.contains(F.target)||T(null)}return document.addEventListener("mousedown",z),()=>{document.removeEventListener("mousedown",z)}},[]),b.useEffect(()=>{function z(F){F.key==="Escape"&&T(null)}return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}},[]);function D(z,F){M(F),T(ne=>ne===z?null:z)}function V(z,F){if(z.id==="distribute"){m(F);return}if(z.id==="group"){h();return}if(z.id==="ungroup"){x();return}vN({attributeValues:i,feature:z,inspectedStyles:n,nextValue:F,onAlignToSlide:d,onAttributeChange:u,onLayerOrder:g,onStyleChange:s})}const ae=FN(l);return v.jsxs("div",{className:Fe("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",Jx,Wx),ref:p,style:{marginLeft:A},children:[v.jsx("div",{className:"flex w-max items-center gap-0.5 overflow-x-auto overflow-y-hidden rounded-md border border-foreground/[0.08] bg-white px-1.5 py-1.5 shadow-[0_2px_12px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.06)] max-[1200px]:min-w-[760px]","aria-label":"Formatting toolbar",children:ae.map((z,F)=>v.jsxs("div",{className:"contents",children:[F>0?v.jsx(kN,{}):null,v.jsx("div",{className:"flex items-center gap-0.5 rounded-md bg-foreground/[0.02] px-0.5",children:z.subgroups.map(ne=>{const re=ne.features.length===1?ne.features[0]:null;return(re==null?void 0:re.controlType)==="toggle"?I(ne,re):v.jsx(ON,{active:S===ne.id,label:ne.label,onClick:q=>D(ne.id,q.currentTarget.offsetLeft),children:v.jsx(Nd,{icon:ne.icon})},ne.id)})})]},z.id))}),ae.flatMap(z=>z.subgroups).map(z=>S===z.id?v.jsxs(DN,{left:C,width:jN(z),children:[v.jsx(LN,{children:z.label}),v.jsx("div",{className:"grid gap-2",children:z.features.map($)})]},z.id):null)]});function I(z,F){const ne=_d({feature:F,inspectedStyles:n,attributeValues:i}),re=Zx(F,ne);return v.jsx(zN,{label:F.label,active:re,onClick:()=>V(F,re?"":"true"),children:v.jsx(Nd,{icon:z.icon})},z.id)}function $(z){return $N({currentValue:_d({feature:z,inspectedStyles:n,attributeValues:i}),feature:z,onClosePanel:()=>T(null),onCommitFeature:V,operationAvailability:o,onStyleChange:s})}}function FN(n){return n!=="group"?C0:C0.flatMap(l=>l.id!=="layout"?[]:[{...l,subgroups:l.subgroups.filter(o=>["size","rotation","layer-alignment","grouping"].includes(o.id))}])}const M0={borderColor:"#facc15",backgroundColor:"rgba(250, 204, 21, 0.08)",boxShadow:"0 0 0 1px rgba(24, 24, 27, 0.2)"};function QN({slideWidth:n,slideHeight:l,offsetX:o,offsetY:i,scale:s,preselectionOverlay:u,selectionOverlay:d,toolbarKey:m,inspectedStyles:h,selectedElementType:g,selectionCommandAvailability:x,groupScopeOverlayPassive:p,isEditingText:S,manipulationOverlay:T,attributeValues:C,iframeRef:M,stageViewportRef:A,selectionOverlayRef:_,selectionContextMenuTriggerRef:N,isManipulating:D,isToolbarSuppressed:V,onSelectionOverlayMouseDown:ae,onSelectionOverlayMouseUp:I,onSelectionOverlayMouseMove:$,onSelectionOverlayContextMenu:z,onStageMouseLeave:F,onResizeHandleMouseDown:ne,onRotateHandleMouseDown:re,onSelectionOverlayDoubleClick:q,onBackgroundClick:H,onStyleChange:Y,onAttributeChange:ee,onAlignToSlide:E,onDistribute:j,onGroup:B,onLayerOrder:P,onUngroup:L,onDuplicate:R,onDelete:G}){const J=(se,ie)=>{se===ie&&H()},le=d?ZN({selectionOverlay:d,offsetX:o,scale:s,slideWidth:n}):void 0;return v.jsxs("section",{className:"relative z-[5] min-h-0 min-w-0 flex-auto overflow-visible p-10 pb-6 max-[1200px]:px-5 max-[1200px]:py-4","data-testid":"stage-panel",ref:A,onClick:se=>{J(se.target,se.currentTarget)},onKeyDown:se=>{(se.key==="Enter"||se.key===" ")&&J(se.target,se.currentTarget)},onMouseLeave:F,children:[d&&!D&&!V&&!S?v.jsx("div",{className:"pointer-events-none absolute z-40 w-max max-[1200px]:static max-[1200px]:mb-4 max-[1200px]:pointer-events-auto",style:le,"data-testid":"floating-toolbar-anchor",children:v.jsx(KN,{inspectedStyles:h,selectedElementType:g,selectionCommandAvailability:x,attributeValues:C,onStyleChange:Y,onAttributeChange:ee,onAlignToSlide:E,onDistribute:j,onGroup:B,onLayerOrder:P,onUngroup:L},m)}):null,S?v.jsx("p",{className:"absolute left-10 top-4 z-40 rounded-md border border-foreground/[0.06] bg-white px-3 py-2 text-[12px] leading-normal text-foreground/65 shadow-sm",children:"Editing text. Press Enter to save or Escape to cancel."}):null,v.jsx("div",{className:"absolute origin-top-left overflow-hidden rounded-xl bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.08),0_2px_12px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.06)] max-[1200px]:max-w-full","data-testid":"stage-frame",style:{width:`${n}px`,height:`${l}px`,left:`${o}px`,top:`${i}px`,transform:`scale(${s})`},children:v.jsx("iframe",{ref:M,title:"Slide canvas",className:"size-full border-0 bg-white","data-testid":"slide-iframe"})}),u&&!S&&!D?v.jsx("div",{"data-testid":"preselection-overlay",className:"pointer-events-none absolute z-[2] border border-dashed",style:{...M0,left:`${u.x}px`,top:`${u.y}px`,width:`${u.width}px`,height:`${u.height}px`}}):null,S?null:v.jsxs(Kx,{children:[v.jsx(Fx,{asChild:!0,children:v.jsx("span",{ref:N,"data-testid":"selection-context-menu-trigger",className:"pointer-events-none absolute size-0","aria-hidden":"true"})}),v.jsx(cN,{selectionCommandAvailability:x,onAlignToSlide:E,onDelete:G,onDistribute:j,onDuplicate:R,onGroup:B,onLayerOrder:P,onUngroup:L})]}),d&&!S?v.jsx("div",{ref:_,"data-testid":"selection-overlay",className:Fe("absolute z-[3] border border-dashed",p?"pointer-events-none":"pointer-events-auto"),style:{...M0,left:`${d.x}px`,top:`${d.y}px`,width:`${d.width}px`,height:`${d.height}px`},onMouseDown:ae,onMouseMove:$,onMouseUp:I,onContextMenu:z,onDoubleClick:se=>{q(se)}}):null,T?v.jsx(sN,{selectionBounds:T.selectionBounds,snapGuides:T.snapGuides,resizeHandles:T.resizeHandles,rotationHandle:T.rotationHandle,onResizeHandleMouseDown:ne,onRotateHandleMouseDown:re}):null]})}function ZN({selectionOverlay:n,offsetX:l,scale:o,slideWidth:i}){const u=l,d=l+i*o,m=Math.max((d-u)/2,0),h=Math.min(288,m),g=u+h,x=d-h,p=n.x+n.width/2;return{left:`${Math.min(Math.max(p,g),Math.max(g,x))}px`,top:n.y<84?`${n.y+n.height+18}px`:`${n.y-18}px`,transform:n.y<84?"translate(-50%, 0)":"translate(-50%, -100%)"}}function JN({delayDuration:n=0,...l}){return v.jsx(tN,{"data-slot":"tooltip-provider",delayDuration:n,...l})}function Od(n,l,o){return f2(n,l,o)}function $o(n,l,o){var u;if(typeof DOMParser>"u")return"";const s=new DOMParser().parseFromString(n.htmlSource,"text/html").querySelector(`[${Se}="${l}"]`);return((u=s==null?void 0:s.getAttribute(o))==null?void 0:u.trim())??""}function WN({elementId:n,nextValue:l,propertyName:o,slide:i}){const s=Od(i,n,o),u=l.trim();return s===u?null:{type:"style.update",slideId:i.id,elementId:n,propertyName:o,previousValue:s,nextValue:u,timestamp:Date.now()}}function e5({attributeName:n,elementId:l,nextValue:o,slide:i}){const s=$o(i,l,n),u=o.trim();return s===u?null:{type:"attribute.update",slideId:i.id,elementId:l,attributeName:n,previousValue:s,nextValue:u,timestamp:Date.now()}}function fl(n){return Math.round(n*100)/100}function e1(n,l){var m;if(typeof DOMParser>"u")return n;const s=(m=new DOMParser().parseFromString(`<template>${n}</template>`,"text/html").querySelector("template"))==null?void 0:m.content.firstElementChild;if(!(s instanceof HTMLElement))return n;const u=$n(s.style.transform),d=Na(0,0,u.rotate);return s.style.position="absolute",s.style.left=`${fl(l.x)}px`,s.style.top=`${fl(l.y)}px`,s.style.width=`${fl(l.width)}px`,s.style.height=`${fl(l.height)}px`,s.style.margin="0px",s.style.boxSizing="border-box",d?s.style.transform=d:s.style.removeProperty("transform"),s.style.transformOrigin||(s.style.transformOrigin="center center"),s.outerHTML}function t1(n,l){return{x:n.left-l.left,y:n.top-l.top,width:n.width,height:n.height}}function t5(n,l,o){var d;const i=(d=n.current)==null?void 0:d.contentDocument,s=i==null?void 0:i.querySelector(l.rootSelector),u=s==null?void 0:s.getBoundingClientRect();return{width:(u==null?void 0:u.width)||o.width,height:(u==null?void 0:u.height)||o.height}}function zd(n,l,o){return{x:fl(n.x+l),y:fl(n.y+o),width:n.width,height:n.height}}function n5(n){return n.length?n.reduce((l,o)=>{const i=Math.min(l.x,o.x),s=Math.min(l.y,o.y),u=Math.max(l.x+l.width,o.x+o.width),d=Math.max(l.y+l.height,o.y+o.height);return{x:i,y:s,width:u-i,height:d-s}}):null}function a5(n,l,o){const i=Math.max(0,o.width-n.width),s=Math.max(0,o.height-n.height),u=Math.min(i,Math.max(0,n.x+l)),d=Math.min(s,Math.max(0,n.y+l));return{x:fl(u-n.x),y:fl(d-n.y)}}function n1(n,l){const o=[];return l.vertical&&o.push(...A0(n,l.vertical,"vertical")),l.horizontal&&o.push(...A0(n,l.horizontal,"horizontal")),o}function A0(n,l,o){return l.target.kind==="spacing"?r5(n,l,o):[l5(n,l,o)]}function l5(n,l,o){const i=l.target;if(n.x+n.width/2,n.y+n.height/2,i.rect.x+i.rect.width/2,i.rect.y+i.rect.height/2,o==="vertical"){const m=_0(n,l.anchor,"vertical");if(i.kind==="slide")return{orientation:o,start:{x:i.position,y:n.y},end:{x:i.position,y:n.y+n.height},...i.role==="center"?{start:{x:i.position,y:i.rect.y},end:{x:i.position,y:i.rect.y+i.rect.height}}:{},variant:"alignment"};const h=Math.min(n.y,i.rect.y),g=Math.max(n.y+n.height,i.rect.y+i.rect.height);return{orientation:o,start:{x:m,y:h-Rs},end:{x:m,y:g+Rs},variant:"alignment"}}const s=_0(n,l.anchor,"horizontal");if(i.kind==="slide")return{orientation:o,start:{x:n.x,y:i.position},end:{x:n.x+n.width,y:i.position},...i.role==="center"?{start:{x:i.rect.x,y:i.position},end:{x:i.rect.x+i.rect.width,y:i.position}}:{},variant:"alignment"};const 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-Rs,y:s},end:{x:d+Rs,y:s},variant:"alignment"}}function r5(n,l,o){const i=l.target.relatedRects;if(i.length<2)return[];const[s,u]=i;if(!s||!u)return[];if(o==="vertical"){const T=s.x<=u.x?s:u,C=T===s?u:s,M=T.x+T.width,A=C.x,_=l.anchor==="start"?n.x:n.x+n.width,N={orientation:"horizontal",start:{x:M,y:T.y+T.height/2},end:{x:A,y:C.y+C.height/2},variant:"spacing"},D={orientation:"horizontal",start:l.anchor==="start"?{x:C.x+C.width,y:C.y+C.height/2}:{x:T.x,y:T.y+T.height/2},end:{x:_,y:n.y+n.height/2},variant:"spacing"};return[N,D]}const d=s.y<=u.y?s:u,m=d===s?u:s,h=d.y+d.height,g=m.y,x=l.anchor==="start"?n.y:n.y+n.height,p={orientation:"vertical",start:{x:d.x+d.width/2,y:h},end:{x:m.x+m.width/2,y:g},variant:"spacing"},S={orientation:"vertical",start:l.anchor==="start"?{x:m.x+m.width/2,y:m.y+m.height}:{x:d.x+d.width/2,y:d.y},end:{x:n.x+n.width/2,y:x},variant:"spacing"};return[p,S]}function _0(n,l,o){return o==="vertical"?l==="start"?n.x:l==="end"?n.x+n.width:n.x+n.width/2:l==="start"?n.y:l==="end"?n.y+n.height:n.y+n.height/2}function o5({activeSlide:n,doc:l,rootRect:o,selectedElementId:i,slideStageRect:s,stageGeometry:u}){var S;const d=(T,C)=>({position:T,rect:s,kind:"slide",role:C,anchor:null,priority:C==="center"?0:2,elementId:null,relatedRects:[]}),m=[d(s.x,"start"),d(s.x+s.width/2,"center"),d(s.x+s.width,"end")],h=[d(s.y,"start"),d(s.y+s.height/2,"center"),d(s.y+s.height,"end")],g=l.querySelector(`[data-editor-id="${i}"]`),x=[];for(const T of n.elements){if(T.id===i)continue;const C=l.querySelector(`[data-editor-id="${T.id}"]`);if(!C||g&&(g.contains(C)||C.contains(g)))continue;const M=(S=l.defaultView)==null?void 0:S.getComputedStyle(C);if((M==null?void 0:M.display)==="none"||(M==null?void 0:M.visibility)==="hidden")continue;const A=C.getBoundingClientRect();if(A.width<=0||A.height<=0)continue;const _=Br(A,o,u);(T.type==="block"||T.type==="image")&&x.push({elementId:T.id,rect:_});const N=_.x,D=_.x+_.width/2,V=_.x+_.width,ae=_.y,I=_.y+_.height/2,$=_.y+_.height,z=(F,ne)=>({position:F,rect:_,kind:"element",role:ne,anchor:null,priority:ne==="center"?3:4,elementId:T.id,relatedRects:[]});m.push(z(N,"start"),z(D,"center"),z(V,"end")),h.push(z(ae,"start"),z(I,"center"),z($,"end"))}const p=i5(x);return m.push(...p.vertical),h.push(...p.horizontal),{vertical:m,horizontal:h}}function i5(n){const l=[],o=[],i=n.slice().sort((u,d)=>u.rect.x-d.rect.x).filter(u=>u.rect.width>0&&u.rect.height>0),s=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],m=i[u+1];if(!d||!m)continue;if(!Hr(d.rect.x,d.rect.x+d.rect.width,m.rect.x,m.rect.x+m.rect.width,0)){const g=m.rect.x-(d.rect.x+d.rect.width);g>=v0&&g<=b0&&Hr(d.rect.y,d.rect.y+d.rect.height,m.rect.y,m.rect.y+m.rect.height,ec)&&l.push(zs({position:m.rect.x+m.rect.width+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),zs({position:d.rect.x-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}for(let u=0;u<s.length-1;u+=1){const d=s[u],m=s[u+1];if(!d||!m)continue;if(!Hr(d.rect.y,d.rect.y+d.rect.height,m.rect.y,m.rect.y+m.rect.height,0)){const g=m.rect.y-(d.rect.y+d.rect.height);g>=v0&&g<=b0&&Hr(d.rect.x,d.rect.x+d.rect.width,m.rect.x,m.rect.x+m.rect.width,ec)&&o.push(zs({position:m.rect.y+m.rect.height+g,rect:m.rect,anchor:"start",relatedRects:[d.rect,m.rect]}),zs({position:d.rect.y-g,rect:d.rect,anchor:"end",relatedRects:[d.rect,m.rect]}))}}return{vertical:l,horizontal:o}}function zs({position:n,rect:l,anchor:o,relatedRects:i}){return{position:n,rect:l,kind:"spacing",role:"end",anchor:o,priority:1,elementId:null,relatedRects:i}}function s5(n,l){const o=tc([{anchor:"start",position:n.x},{anchor:"center",position:n.x+n.width/2},{anchor:"end",position:n.x+n.width}],l.vertical,n,"vertical"),i=tc([{anchor:"start",position:n.y},{anchor:"center",position:n.y+n.height/2},{anchor:"end",position:n.y+n.height}],l.horizontal,n,"horizontal"),s={...n,x:n.x+((o==null?void 0:o.delta)??0),y:n.y+((i==null?void 0:i.delta)??0)};return{rect:s,guides:n1(s,{vertical:o,horizontal:i})}}function c5(n,l,o){const i={...n},s=l==="top-left"||l==="bottom-left"?"start":"end",u=l==="top-left"||l==="top-right"?"start":"end",d=tc([{anchor:s,position:s==="start"?n.x:n.x+n.width}],o.vertical,n,"vertical"),m=tc([{anchor:u,position:u==="start"?n.y:n.y+n.height}],o.horizontal,n,"horizontal");if(d)if(s==="start"){const h=i.width-d.delta;h>=48&&(i.x+=d.delta,i.width=h)}else{const h=i.width+d.delta;h>=48&&(i.width=h)}if(m)if(u==="start"){const h=i.height-m.delta;h>=48&&(i.y+=m.delta,i.height=h)}else{const h=i.height+m.delta;h>=48&&(i.height=h)}return{rect:i,guides:n1(i,{vertical:m,horizontal:d})}}function tc(n,l,o,i){const s=p5(l);let u=null;for(const d of n)for(const m of s){if(!m5(o,m,i)||m.anchor&&m.anchor!==d.anchor)continue;const h=m.position-d.position;if(Math.abs(h)>oN)continue;const x=R0({anchor:d.anchor,delta:h,target:m},o,i),p=u?R0(u,o,i):Number.POSITIVE_INFINITY;x>=p||(u={anchor:d.anchor,delta:h,target:m})}return u}function R0(n,l,o){const i=Math.abs(n.delta),s=n.target.kind==="spacing"?Math.max(0,i-iN):i,u=u5(n.target);return s*1e3+u+n.target.priority+f5(n.anchor,n.target)+d5(l,n.target,o)/100}function u5(n){return n.kind==="element"?0:n.kind==="spacing"?8:16}function f5(n,l){return l.kind==="slide"&&l.role==="center"&&n!=="center"?25:0}function d5(n,l,o){return l.kind==="slide"?0:o==="vertical"?N0(n.y,n.y+n.height,l.rect.y,l.rect.y+l.rect.height):N0(n.x,n.x+n.width,l.rect.x,l.rect.x+l.rect.width)}function N0(n,l,o,i){return l<o?o-l:i<n?n-i:0}function m5(n,l,o){return l.kind==="slide"?!0:l.kind==="spacing"?h5(n,l,o):!0}function h5(n,l,o){if(l.relatedRects.length<2)return!1;if(o==="vertical"){const u=Math.min(...l.relatedRects.map(m=>m.y)),d=Math.max(...l.relatedRects.map(m=>m.y+m.height));return Hr(n.y,n.y+n.height,u,d,ec)}const i=Math.min(...l.relatedRects.map(u=>u.x)),s=Math.max(...l.relatedRects.map(u=>u.x+u.width));return Hr(n.x,n.x+n.width,i,s,ec)}function p5(n){const l=new Set;return n.filter(o=>{const i=`${o.kind}:${o.elementId??"slide"}:${o.position.toFixed(2)}`;return l.has(i)?!1:(l.add(i),!0)})}function Ds(n){return`${Math.round(n*100)/100}px`}function sl(n,l){return Math.max(n,48*l)}function Dd(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function g5(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"||(n==null?void 0:n.type)==="group"}function y5(n){const[l,...o]=n;return l?o.reduce((i,s)=>{const u=Math.min(i.x,s.x),d=Math.min(i.y,s.y),m=Math.max(i.x+i.width,s.x+s.width),h=Math.max(i.y+i.height,s.y+s.height);return{x:u,y:d,width:m-u,height:h-d}},l):{x:0,y:0,width:0,height:0}}function O0(n,l,o,i){return Math.atan2(l-i,n-o)*180/Math.PI}function v5({resizeCorner:n,scale:l,stageDeltaX:o,stageDeltaY:i,startStageRect:s}){let u=s.x,d=s.y,m=s.width,h=s.height;switch(n){case"top-left":{m=sl(s.width-o,l),h=sl(s.height-i,l),u=s.x+(s.width-m),d=s.y+(s.height-h);break}case"top-right":{m=sl(s.width+o,l),h=sl(s.height-i,l),d=s.y+(s.height-h);break}case"bottom-left":{m=sl(s.width-o,l),h=sl(s.height+i,l),u=s.x+(s.width-m);break}default:{m=sl(s.width+o,l),h=sl(s.height+i,l);break}}return{x:u,y:d,width:m,height:h}}function Us(n,l){for(const o of Gd)n.style[o]=l[o]??""}function b5(n){return n.elementIds.map(l=>{const o=n.targetNodes[l],i=n.previousStyles[l];if(!o||!i)return null;const s=Xo(o);return JSON.stringify(s)===JSON.stringify(i)?null:{type:"element.layout.update",slideId:n.slideId,elementId:l,previousStyle:i,nextStyle:s,timestamp:Date.now()}}).filter(l=>!!l)}function x5(n,l){return l.length===1?l[0]:{type:"operation.batch",slideId:n.slideId,operations:l,timestamp:Date.now()}}function S5({isEditingText:n,isManipulating:l,selectedElement:o,selectedElementId:i,snapGuides:s,stageRect:u}){return!u||!i||!g5(o)||n?null:{selectionBounds:u,snapGuides:l?s:[],resizeHandles:[{corner:"top-left",x:u.x,y:u.y},{corner:"top-right",x:u.x+u.width,y:u.y},{corner:"bottom-right",x:u.x+u.width,y:u.y+u.height},{corner:"bottom-left",x:u.x,y:u.y+u.height}],rotationHandle:{x:u.x+u.width/2,y:u.y+u.height+20}}}function w5({activeSlide:n,selectedElement:l,selectedElementId:o,selectedElementIds:i,selectedStageRect:s,iframeRef:u,stageGeometry:d,isEditingText:m,onCommitOperation:h}){const{offsetX:g,offsetY:x,scale:p,slideHeight:S,slideWidth:T}=d,C=b.useRef(null),M=b.useRef(!1),A=b.useRef(null),[_,N]=b.useState(!1),[D,V]=b.useState(!1),[ae,I]=b.useState(null),[$,z]=b.useState([]),ne=S5({isEditingText:m,isManipulating:_,selectedElement:l,selectedElementId:o,snapGuides:$,stageRect:ae??s});b.useEffect(()=>()=>{C.current=null,A.current&&window.clearTimeout(A.current)},[]),b.useEffect(()=>{(!n||!o||!Dd(l)||m)&&(C.current=null,N(!1),I(null))},[n,m,l,o]),b.useEffect(()=>{_||(I(null),z([]))},[_]);const re=b.useCallback(()=>{V(!0),A.current&&window.clearTimeout(A.current),A.current=window.setTimeout(()=>{V(!1),A.current=null},0)},[]),q=b.useCallback((H,Y,ee=null)=>{var Tn;if(!n||!o||!s||!Dd(l)||m)return;const E=(Tn=u.current)==null?void 0:Tn.contentDocument;if(!E)return;const j=E.querySelector(n.rootSelector),B=$e(E,o);if(!j||!B)return;const P=E5({activeSlide:n,doc:E,mode:H,selectedElementId:o,selectedElementIds:i}),L=Object.fromEntries(P.map(Ae=>[Ae,$e(E,Ae)]).filter(Ae=>!!Ae[1]));if(!Object.keys(L).length)return;const R=Object.fromEntries(Object.entries(L).map(([Ae,_e])=>[Ae,Xo(_e)])),G=Object.fromEntries(Object.entries(L).map(([Ae,_e])=>[Ae,T5(_e,L)])),J=u.current,le=(J==null?void 0:J.style.pointerEvents)||"";Y.preventDefault(),Y.stopPropagation();const se=B.getBoundingClientRect(),ie=j.getBoundingClientRect(),de={x:g,y:x,width:T*p,height:S*p},Z={scale:p,offsetX:g,offsetY:x},ce=o5({activeSlide:n,doc:E,rootRect:ie,selectedElementId:o,slideStageRect:de,stageGeometry:Z}),ve=Object.values(L).map(Ae=>Br(Ae.getBoundingClientRect(),ie,Z)),we=Object.fromEntries(Object.entries(L).map(([Ae,_e])=>[Ae,Br(_e.getBoundingClientRect(),ie,Z)])),Te=Object.fromEntries(Object.values(L).map(Ae=>Ae.parentElement).filter(Ae=>!!Ae).map(Ae=>[a1(Ae),Br(Ae.getBoundingClientRect(),ie,Z)])),Ue=ve.length?y5(ve):s;C.current={slideId:n.id,elementId:o,elementIds:Object.keys(L),mode:H,resizeCorner:ee,startPointer:{x:Y.clientX,y:Y.clientY},startStageRect:Ue,centerPoint:{x:se.left+se.width/2,y:se.top+se.height/2},previousStyle:R[o],previousStyles:R,startElementStageRects:we,resizeParentElementIds:G,startParentStageRects:Te,targetNodes:L,snapTargets:ce},M.current=!0,N(!0),z([]),J&&(J.style.pointerEvents="none");const Le=Ae=>{const _e=C.current;if(!_e)return;Ae.preventDefault();const sn=Ae.clientX-_e.startPointer.x,ht=Ae.clientY-_e.startPointer.y;if(_e.mode==="move"){const Et={x:_e.startStageRect.x+sn,y:_e.startStageRect.y+ht,width:_e.startStageRect.width,height:_e.startStageRect.height},Tt=Ae.altKey?{rect:Et,guides:[]}:s5(Et,_e.snapTargets);I(Tt.rect),z(Tt.guides);const Un=(Tt.rect.x-_e.startStageRect.x)/p,Fn=(Tt.rect.y-_e.startStageRect.y)/p;for(const Jt of _e.elementIds){const sa=_e.targetNodes[Jt],Ht=_e.previousStyles[Jt];if(!sa||!Ht)continue;const cn=$n(Ht.transform);Us(sa,{...Ht,transform:Na(cn.translateX+Un,cn.translateY+Fn,cn.rotate),transformOrigin:Ht.transformOrigin||"center center"})}return}if(_e.mode==="resize"){const Et=v5({resizeCorner:_e.resizeCorner,scale:p,stageDeltaX:sn,stageDeltaY:ht,startStageRect:_e.startStageRect}),Tt=Ae.altKey||!_e.resizeCorner?{rect:Et,guides:[]}:c5(Et,_e.resizeCorner,_e.snapTargets);I(Tt.rect),z(Tt.guides),C5(_e,Tt.rect,{offsetX:g,offsetY:x,scale:p});return}const Lt=$n(_e.previousStyle.transform),Ot=O0(_e.startPointer.x,_e.startPointer.y,_e.centerPoint.x,_e.centerPoint.y),xl=O0(Ae.clientX,Ae.clientY,_e.centerPoint.x,_e.centerPoint.y);Us(B,{..._e.previousStyle,transform:Na(Lt.translateX,Lt.translateY,Lt.rotate+(xl-Ot)),transformOrigin:"center center"}),z([])},Nt=()=>{window.removeEventListener("mousemove",Le),window.removeEventListener("mouseup",It),window.removeEventListener("keydown",kt),J&&(J.style.pointerEvents=le)},It=()=>{const Ae=C.current;if(Nt(),M.current=!1,N(!1),re(),C.current=null,z([]),!Ae)return;const _e=b5(Ae);if(!_e.length){I(null);return}h(x5(Ae,_e))},kt=Ae=>{if(Ae.key!=="Escape")return;const _e=C.current;if(Nt(),N(!1),re(),C.current=null,z([]),!!_e){for(const sn of _e.elementIds){const ht=_e.targetNodes[sn],Lt=_e.previousStyles[sn];ht&&Lt&&Us(ht,Lt)}I(null)}};window.addEventListener("mousemove",Le),window.addEventListener("mouseup",It),window.addEventListener("keydown",kt)},[n,u,m,h,l,o,i,s,p,g,x,T,S,re]);return{manipulationOverlay:ne,isManipulating:_||M.current,suppressBackgroundClear:D,beginMove:H=>{q("move",H)},beginResize:(H,Y)=>{q("resize",Y,H)},beginRotate:H=>{q("rotate",H)}}}function E5({activeSlide:n,doc:l,mode:o,selectedElementId:i,selectedElementIds:s}){const u=s.filter(m=>{const h=n.elements.find(g=>g.id===m);return Dd(h)});if(o==="move")return u;if(o==="rotate")return[i];const d=new Set;for(const m of u.length?u:[i]){const h=$e(l,m);if(h&&(d.add(m),h.getAttribute("data-group")==="true"))for(const g of h.querySelectorAll(`[data-editable][${Se}]`)){const x=g.getAttribute(Se);x&&d.add(x)}}return[...d]}function T5(n,l){const o=Object.entries(l);let i=n.parentElement;for(;i;){const s=o.find(([,u])=>u===i);if(s)return s[0];i=i.parentElement}return null}function C5(n,l,o){const i=n.startStageRect.width>0?l.width/n.startStageRect.width:1,s=n.startStageRect.height>0?l.height/n.startStageRect.height:1,u={x:o.offsetX,y:o.offsetY},d=Object.fromEntries(Object.entries(n.startElementStageRects).map(([m,h])=>[m,{x:l.x+(h.x-n.startStageRect.x)*i,y:l.y+(h.y-n.startStageRect.y)*s,width:h.width*i,height:h.height*s}]));for(const m of n.elementIds){const h=n.targetNodes[m],g=n.previousStyles[m],x=d[m];if(!h||!g||!x)continue;const p=n.resizeParentElementIds[m]?d[n.resizeParentElementIds[m]]:n.startParentStageRects[a1(h.parentElement)]??u;if(!p)continue;const S=$n(g.transform);Us(h,{...g,position:g.position||"absolute",left:Ds((x.x-p.x)/o.scale),top:Ds((x.y-p.y)/o.scale),width:Ds(x.width/o.scale),height:Ds(x.height/o.scale),transform:Na(0,0,S.rotate),transformOrigin:g.transformOrigin||"center center"})}}function a1(n){return n!=null&&n.getAttribute(Se)?`editable:${n.getAttribute(Se)}`:"slide"}const z0={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function M5(n){return n instanceof Element?!!n.closest('input, textarea, select, [contenteditable="true"], [contenteditable="plaintext-only"]'):!1}function A5(n){return(n==null?void 0:n.type)==="block"||(n==null?void 0:n.type)==="text"}function _5(n){return n.altKey?1:n.shiftKey?10:5}function R5(n,l,o){var d;const i={[l]: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 m of u.querySelectorAll("[data-editor-id]")){const h=m.getAttribute("data-editor-id");h&&(i[h]=`${o}-${h}`)}return i}function jd(n,l,o){return l.length?(o(l.length===1?l[0]:{type:"operation.batch",slideId:n,operations:l,timestamp:Date.now()}),!0):!1}function N5({slide:n,selectedElementIds:l,iframeRef:o}){var h;if(!n||!l.length)return null;const i=(h=o.current)==null?void 0:h.contentDocument,s=i==null?void 0:i.querySelector(n.rootSelector),u=s==null?void 0:s.getBoundingClientRect();if(!u)return null;const d=l.map(g=>{const x=Vs(n.htmlSource,g),p=Ys(n.htmlSource,g),S=i?$e(i,g):null;return!x||!p||!S?null:{sourceElementId:g,html:x,rect:t1(S.getBoundingClientRect(),u),...p}}).filter(g=>!!g),m=n5(d.map(g=>g.rect));return m?{elements:d,unionRect:m}:null}function O5({slide:n,selectedElementIds:l}){return!n||!l.length?[]:l.map(o=>{const i=Vs(n.htmlSource,o),s=Ys(n.htmlSource,o);return!i||!s?null:{type:"element.remove",slideId:n.id,elementId:o,...s,html:i,timestamp:Date.now()}}).filter(o=>!!o)}function z5({slide:n,payload:l,iframeRef:o,slideSize:i}){if(!n||!l)return null;let s=n.htmlSource;const u=[],d=t5(o,n,i),m=a5(l.unionRect,24,d),h=[];return{operations:l.elements.map(x=>{const p=sd(s,`${x.sourceElementId}-copy`),S=tv(x.html,R5(x.html,x.sourceElementId,p)),T=zd(x.rect,m.x,m.y),C=e1(S,T),M={type:"element.insert",slideId:n.id,elementId:p,parentElementId:null,previousSiblingElementId:null,nextSiblingElementId:null,html:C,timestamp:Date.now()};return s=nv(s,M),u.push(p),h.push({...x,rect:T}),M}),selectedElementIds:u,nextHtmlSource:s,nextClipboard:{elements:h,unionRect:zd(l.unionRect,m.x,m.y)}}}function D0(n,l,o){return jd(n,l,o)}function D5({activeSlide:n,selectedElementIds:l,iframeRef:o,slideWidth:i,slideHeight:s,isEditingText:u,canUndo:d,canRedo:m,onEscapeSelection:h,onCommitOperation:g,onSelectElementIds:x,onUndo:p,onRedo:S}){const T=b.useRef(null),C=b.useRef(n),M=b.useRef(l),A=b.useRef(d),_=b.useRef(m),N=b.useRef(u),D=b.useRef(h),V=(n==null?void 0:n.htmlSource)??"";C.current=n,M.current=l,A.current=d,_.current=m,N.current=u,D.current=h,b.useEffect(()=>{var H;const ae=()=>{const Y=N5({slide:C.current,selectedElementIds:M.current,iframeRef:o});return Y&&(T.current=Y),!!Y},I=()=>{const Y=C.current;if(!Y)return!1;const ee=O5({slide:Y,selectedElementIds:M.current});return ee.length?(D0(Y.id,ee,g),x([]),!0):!1},$=(Y=T.current)=>{const ee=C.current,E=z5({slide:ee,payload:Y,iframeRef:o,slideSize:{width:i,height:s}});return!ee||!E?!1:(D0(ee.id,E.operations,g),C.current={...ee,htmlSource:E.nextHtmlSource},x(E.selectedElementIds),T.current=E.nextClipboard,!0)},z=Y=>{var R;const ee=z0[Y.key],E=C.current,j=M.current;if(!E||!j.length||!ee)return!1;const B=(R=o.current)==null?void 0:R.contentDocument,P=_5(Y),L=j.map(G=>{const J=E.elements.find(Z=>Z.id===G);if(!A5(J))return null;const le=B?$e(B,G):null;if(!le)return null;const se=Xo(le),ie=$n(se.transform),de=rd({...se,transform:Na(ie.translateX+ee.x*P,ie.translateY+ee.y*P,ie.rotate),transformOrigin:se.transformOrigin||"center center"});return{type:"element.layout.update",slideId:E.id,elementId:G,previousStyle:se,nextStyle:de,timestamp:Date.now()}}).filter(G=>!!G);return jd(E.id,L,g),!0},F=Y=>{var P;const ee=C.current,E=M.current;if(!ee||!E.length)return!1;const j=(P=o.current)==null?void 0:P.contentDocument,B=E.map(L=>{const R=j?$e(j,L):null;if(!R)return null;const G=Xo(R),J=Number.parseInt(G.zIndex||"",10),le=Number.isFinite(J)?J:0,se=Y==="front"?999:Y==="back"?0:Math.max(0,le+(Y==="forward"?1:-1)),ie=rd({...G,zIndex:String(se)});return ie.zIndex===G.zIndex?null:{type:"element.layout.update",slideId:ee.id,elementId:L,previousStyle:G,nextStyle:ie,timestamp:Date.now()}}).filter(L=>!!L);return jd(ee.id,B,g)},ne=Y=>{if(Y.defaultPrevented||N.current)return;const ee=Y.key.toLowerCase(),E=Y.metaKey||Y.ctrlKey,j=E&&!Y.shiftKey&&ee==="z",B=E&&(Y.shiftKey&&ee==="z"||ee==="y"),P=M5(Y.target);let L=!1;if(j&&A.current)p(),L=!0;else if(B&&_.current)S(),L=!0;else{if(P)return;E&&!Y.shiftKey&&ee==="c"?L=ae():E&&!Y.shiftKey&&ee==="x"?L=ae()&&I():E&&!Y.shiftKey&&ee==="v"?L=$():E&&!Y.shiftKey&&ee==="d"?L=ae()&&$():Y.key==="Backspace"||Y.key==="Delete"?L=I():Y.key==="Escape"?L=D.current():Y.key in z0?L=z(Y):E&&Y.key==="]"?L=F(Y.shiftKey?"front":"forward"):E&&Y.key==="["&&(L=F(Y.shiftKey?"back":"backward"))}L&&(Y.preventDefault(),Y.stopPropagation())},re=j5(V,o),q=(H=o.current)==null?void 0:H.contentWindow;return window.addEventListener("keydown",ne),q==null||q.addEventListener("keydown",ne),re==null||re.addEventListener("keydown",ne),()=>{window.removeEventListener("keydown",ne),q==null||q.removeEventListener("keydown",ne),re==null||re.removeEventListener("keydown",ne)}},[V,o,g,S,x,p,s,i])}function j5(n,l){var o;return(o=l.current)==null?void 0:o.contentDocument}function k5(n){return n?[n]:[]}function js(n,l){return n.includes(l)?n:[...n,l]}function L5({selectedElementIds:n,activeGroupScopeId:l}){return l?{handled:!0,nextSelection:[l],exitGroupScope:!0}:n.length?{handled:!0,nextSelection:[],exitGroupScope:!1}:{handled:!1,nextSelection:n,exitGroupScope:!1}}const j0="hse-editing-text-style",H5=`
|
|
381
|
+
[data-hse-editing="true"] {
|
|
382
|
+
outline: none !important;
|
|
383
|
+
box-shadow: none !important;
|
|
384
|
+
overflow: visible;
|
|
385
|
+
caret-color: currentColor;
|
|
386
|
+
white-space: pre-wrap;
|
|
387
|
+
user-select: text;
|
|
388
|
+
-webkit-user-select: text;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
[data-hse-editing="true"]:focus,
|
|
392
|
+
[data-hse-editing="true"]:focus-visible {
|
|
393
|
+
outline: none !important;
|
|
394
|
+
box-shadow: none !important;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
body[data-hse-group-scope] [data-editable] {
|
|
398
|
+
transition: opacity 120ms ease, filter 120ms ease;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
body[data-hse-group-scope] [data-editable][data-hse-outside-group-scope="true"] {
|
|
402
|
+
opacity: 0.28;
|
|
403
|
+
filter: blur(1.5px);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
body[data-hse-group-scope] [data-editable][data-hse-active-group-scope="true"] {
|
|
407
|
+
outline: 1px solid rgba(15, 23, 42, 0.22);
|
|
408
|
+
outline-offset: 4px;
|
|
409
|
+
}
|
|
410
|
+
`;function B5(n){return n.closest(`[data-editable][${Se}]`)}function k0(n,l,o,i){const s=n.elementFromPoint(l,o);return s?kd(s,i):null}function L0(n,l){const o=Array.from(n.querySelectorAll("[data-editable]"));for(const s of o)s.removeAttribute("data-hse-active-group-scope"),s.removeAttribute("data-hse-outside-group-scope");if(!l){n.body.removeAttribute("data-hse-group-scope");return}n.body.setAttribute("data-hse-group-scope",l);const i=n.querySelector(`[data-editable="block"][data-group="true"][${Se}="${l}"]`);if(!i){n.body.removeAttribute("data-hse-group-scope");return}i.setAttribute("data-hse-active-group-scope","true");for(const s of o)s!==i&&!i.contains(s)&&s.setAttribute("data-hse-outside-group-scope","true")}function kd(n,l){const o=B5(n);return o?l?o.closest(`[data-editable="block"][data-group="true"][${Se}="${l}"]`)?o:null:o.closest(`[data-editable="block"][data-group="true"][${Se}]`)??o:null}function U5(n){if(n.getElementById(j0))return;const l=n.createElement("style");l.id=j0,l.textContent=H5,n.head.appendChild(l)}function I5(n){const l=n.ownerDocument.getSelection(),o=n.ownerDocument.createRange();o.selectNodeContents(n),o.collapse(!1),l==null||l.removeAllRanges(),l==null||l.addRange(o)}function G5({activeSlide:n,iframeRef:l,onCommitOperation:o,onOpenSelectionContextMenu:i}){const[s,u]=b.useState([]),[d,m]=b.useState(null),[h,g]=b.useState(null),[x,p]=b.useState(null),S=b.useRef(null),T=b.useRef(null),C=b.useRef(()=>{}),M=b.useRef(()=>{}),A=s[s.length-1]??null,_=b.useCallback(()=>{m(H=>H===null?H:null)},[]);function N(H){u(Y=>{const ee=typeof H=="function"?H(Y[Y.length-1]??null):H;return k5(ee)})}const D=b.useCallback((H,Y)=>{const ee=l.current,E=ee==null?void 0:ee.contentDocument;if(!ee||!E||S.current)return null;const j=ee.getBoundingClientRect(),B=j.width>0?ee.clientWidth/j.width:1,P=j.height>0?ee.clientHeight/j.height:1,L=k0(E,(H-j.left)*B,(Y-j.top)*P,T.current);return(L==null?void 0:L.getAttribute(Se))??null},[l]),V=b.useCallback((H,Y)=>{const ee=D(H,Y);return m(E=>E===ee?E:ee),ee},[D]),ae=b.useCallback((H,Y,ee)=>{const E=D(H,Y);return E?(u(ee?j=>js(j,E):[E]),E):null},[D]),I=b.useCallback((H,Y)=>{const ee=D(H,Y);return ee?(u(E=>js(E,ee)),m(ee),i==null||i(H,Y),!0):!1},[D,i]),$=b.useCallback(H=>{var j;if(!n)return;const Y=(j=l.current)==null?void 0:j.contentDocument,ee=Y?$e(Y,H):null;if(!ee||ee.getAttribute("data-editable")!=="text")return;const E={slideId:n.id,elementId:H,initialText:ee.textContent||""};u([H]),S.current=E,p(E)},[n,l]),z=b.useCallback(H=>{g(H),T.current=H,u([H])},[]),F=b.useCallback(()=>{const H=T.current;T.current=null,g(null),u(H?[H]:[])},[]),ne=b.useCallback(()=>{if(S.current)return!1;const H=L5({selectedElementIds:s,activeGroupScopeId:T.current});return H.handled&&(H.exitGroupScope&&(T.current=null,g(null)),u(H.nextSelection)),H.handled},[s]);function re(H,Y){const ee=x;if(!n||!ee||ee.slideId!==n.id||ee.elementId!==H){S.current=null,p(null);return}const E=ee.initialText;S.current=null,p(null),Y!==E&&o({type:"text.update",slideId:n.id,elementId:H,previousText:E,nextText:Y,timestamp:Date.now()})}function q(){var ee;const H=(ee=l.current)==null?void 0:ee.contentDocument,Y=S.current;if(Y&&H){const E=$e(H,Y.elementId);E&&(E.textContent=Y.initialText)}S.current=null,p(null)}return b.useEffect(()=>{S.current=x},[x]),b.useEffect(()=>{T.current=h},[h]),b.useEffect(()=>{!n||!x||x.slideId===n.id||p(null)},[n,x]),C.current=re,M.current=q,b.useEffect(()=>{if(!n)return;const H=l.current;if(!H)return;const Y=H.contentDocument;if(!Y)return;Y.open(),Y.write(n.htmlSource),Y.close(),U5(Y),L0(Y,T.current);const ee=j=>{const B=j.getAttribute(Se);B&&C.current(B,j.textContent||"")};Y.onclick=j=>{const B=j.target;if(!(B instanceof Element)){if(S.current){const G=$e(Y,S.current.elementId);if(G){ee(G);return}}u([]);return}const P=S.current;if(P){_();const G=$e(Y,P.elementId);if(G&&!G.contains(B)){ee(G);return}return}const L=kd(B,T.current);if(!L){T.current||u([]);return}const R=L.getAttribute(Se);R&&(j.shiftKey||j.metaKey||j.ctrlKey?u(G=>js(G,R)):u([R]))},Y.onmousemove=j=>{if(S.current){_();return}const B=k0(Y,j.clientX,j.clientY,T.current),P=(B==null?void 0:B.getAttribute(Se))??null;m(L=>L===P?L:P)},Y.oncontextmenu=j=>{if(S.current)return;const B=H.getBoundingClientRect(),P=B.width>0?H.clientWidth/B.width:1,L=B.height>0?H.clientHeight/B.height:1,R=B.left+j.clientX/P,G=B.top+j.clientY/L;I(R,G)&&(j.preventDefault(),j.stopPropagation())},Y.onmouseleave=()=>{_()};const E=Array.from(Y.querySelectorAll(`[data-editable][${Se}]`));for(const j of E)j.style.cursor="default",j.ondblclick=null,j.onblur=null,j.onkeydown=null,j.onclick=B=>{var R;B.stopPropagation();const P=kd(B.target,T.current);if(T.current&&!P)return;const L=(P==null?void 0:P.getAttribute(Se))??j.getAttribute(Se);((R=S.current)==null?void 0:R.elementId)!==L&&L&&(B.shiftKey||B.metaKey||B.ctrlKey?u(G=>js(G,L)):u([L]))},j.ondblclick=B=>{const P=j.getAttribute(Se),L=S.current;if(P&&j.getAttribute("data-group")==="true"){B.preventDefault(),B.stopPropagation(),z(P);return}if(j.getAttribute("data-editable")==="text"){if(P&&L&&L.slideId===n.id&&L.elementId===P){B.stopPropagation();return}B.preventDefault(),B.stopPropagation(),P&&$(P)}}},[n,z,$,_,l,I]),b.useEffect(()=>{var Y;const H=(Y=l.current)==null?void 0:Y.contentDocument;H&&L0(H,h)},[h,l]),b.useEffect(()=>{var se;const H=x;if(!H||!n||H.slideId!==n.id)return;const Y=l.current,ee=Y==null?void 0:Y.contentDocument;if(!Y||!ee)return;const E=ee.querySelector(Ud(H.elementId));if(!E)return;const j=()=>{C.current(H.elementId,E.textContent||"")};let B=!1;const P=E.style.display,L=E.style.alignItems,R=E.style.overflow,G=E.style.cursor,J=(se=E.ownerDocument.defaultView)==null?void 0:se.getComputedStyle(E),le=(J==null?void 0:J.display)??"";return E.setAttribute("contenteditable","plaintext-only"),E.setAttribute("spellcheck","false"),E.setAttribute("data-hse-editing","true"),E.style.cursor="text",E.style.overflow="visible",le==="inline-flex"?(E.style.display="inline-block",E.style.alignItems="normal"):(le==="flex"||le==="grid"||le==="inline-grid")&&(E.style.display="block",E.style.alignItems="normal"),E.focus(),I5(E),E.onkeydown=ie=>{if(ie.key==="Enter"&&!ie.shiftKey){ie.preventDefault(),j();return}ie.key==="Escape"&&(ie.preventDefault(),M.current())},E.onmousedown=()=>{B=!1},E.onmouseup=()=>{const ie=E.ownerDocument.getSelection(),de=ie==null?void 0:ie.anchorNode,Z=ie==null?void 0:ie.focusNode,ce=de?E.contains(de):!1,ve=Z?E.contains(Z):!1;B=!!(ie&&!ie.isCollapsed&&ce&&ve)},E.onclick=ie=>{ie.stopPropagation(),B&&(ie.preventDefault(),B=!1)},E.onblur=()=>{window.setTimeout(()=>{var we;if(((we=S.current)==null?void 0:we.elementId)!==H.elementId)return;const ie=E.ownerDocument.getSelection(),de=ie==null?void 0:ie.anchorNode,Z=ie==null?void 0:ie.focusNode,ce=E.ownerDocument.activeElement,ve=!!(ie&&!ie.isCollapsed)&&!!(de&&E.contains(de))&&!!(Z&&E.contains(Z));ce===E||ve||j()},0)},()=>{E.removeAttribute("contenteditable"),E.removeAttribute("spellcheck"),E.removeAttribute("data-hse-editing"),E.style.cursor=G,E.style.display=P,E.style.alignItems=L,E.style.overflow=R,E.onblur=null,E.onclick=null,E.onkeydown=null,E.onmousedown=null,E.onmouseup=null}},[n,l,x]),{selectedElementId:A,selectedElementIds:s,preselectedElementId:d,activeGroupScopeId:h,isEditingText:!!(n&&(x==null?void 0:x.slideId)===n.id),setSelectedElementId:N,setSelectedElementIds:u,beginTextEditing:$,beginGroupEditingScope:z,exitGroupEditingScope:F,clearSelection:ne,clearPreselection:_,updatePointerPreselection:V,retargetPointerSelection:ae,openPointerSelectionContextMenu:I}}function Y5(n,l={}){var x;const{onSlidesChange:o}=l,[i,s]=b.useReducer(bs,n,iv),[u,d]=b.useState(((x=n[0])==null?void 0:x.id)??"");b.useEffect(()=>{var p;s({type:"history.reset",slides:n}),d(((p=n[0])==null?void 0:p.id)??"")},[n]);const m=b.useMemo(()=>i.slides.find(p=>p.id===u)??i.slides[0],[u,i.slides]),h=(m==null?void 0:m.id)??"";function g(p){var S;return p.some(T=>T.id===u)||d(((S=p[0])==null?void 0:S.id)??""),o==null||o(p),p}return{slides:i.slides,activeSlide:m,activeSlideId:h,undoDepth:i.undoStack.length,redoDepth:i.redoStack.length,setActiveSlideId:d,commitOperation:p=>{const S=bs(i,{type:"history.commit",operation:p});return s({type:"history.commit",operation:p}),g(S.slides)},runUndo:()=>{const p=bs(i,{type:"history.undo"});s({type:"history.undo"}),g(p.slides)},runRedo:()=>{const p=bs(i,{type:"history.redo"});s({type:"history.redo"}),g(p.slides)}}}const V5=["-webkit-","-moz-","-ms-"],q5=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 P5(n){return V5.some(l=>n.startsWith(l))?!1:!q5.has(n)}function $5(n){const l=window.getComputedStyle(n),o=[];for(const i of Array.from(l)){if(!P5(i))continue;const s=i==="transform"&&n.style.transform?n.style.transform.trim():l.getPropertyValue(i).trim();s.length!==0&&o.push({name:i,value:s})}return o.sort((i,s)=>i.name.localeCompare(s.name))}function X5({iframeRef:n,activeSlide:l,selectedElement:o,selectedElementIds:i,preselectedElementId:s,scale:u,offsetX:d,offsetY:m,slideWidth:h,slideHeight:g}){const x=i.join("\0"),p=s??"",[S,T]=b.useState({key:"",rect:null}),[C,M]=b.useState({key:"",rect:null}),[A,_]=b.useState({key:"",rect:null}),[N,D]=b.useState([]),V=S.key===x?S.rect:null,ae=C.key===p?C.rect:null,I=A.key===x?A.rect:null;return b.useEffect(()=>{const $=n.current,z=$==null?void 0:$.contentDocument;if(!$||!z||!l){T({key:x,rect:null}),M({key:p,rect:null}),_({key:x,rect:null}),D([]);return}const F=z.querySelector(l.rootSelector),ne=i[0]?$e(z,i[0]):F;if(!ne){T({key:x,rect:null}),M({key:p,rect:null}),_({key:x,rect:null}),D([]);return}const re=$5(ne);D(E=>F5(E,re)?E:re);const q=F==null?void 0:F.getBoundingClientRect();let H=null;if(!i.length||!F||!q)H=null;else{const E=i.map(j=>$e(z,j)).filter(j=>!!j).map(j=>Br(j.getBoundingClientRect(),q,{scale:u,offsetX:d,offsetY:m}));E.length&&(H=E.reduce((j,B)=>{const P=Math.min(j.x,B.x),L=Math.min(j.y,B.y),R=Math.max(j.x+j.width,B.x+B.width),G=Math.max(j.y+j.height,B.y+B.height);return{x:P,y:L,width:R-P,height:G-L}}))}T(E=>td(E,x,H)?E:{key:x,rect:H}),_(E=>td(E,x,H)?E:{key:x,rect:H});const Y=s?$e(z,s):null,ee=Y&&q?Br(Y.getBoundingClientRect(),q,{scale:u,offsetX:d,offsetY:m}):null;M(E=>td(E,p,ee)?E:{key:p,rect:ee})},[l,n,d,m,s,p,u,i,x,g,h]),{selectedStageRect:V,preselectionOverlay:ae,selectionOverlay:I,selectionLabel:(o==null?void 0:o.type)||"element",inspectedStyles:N}}function td(n,l,o){return n.key===l&&K5(n.rect,o)}function K5(n,l){return n===l?!0:!n||!l?!1:n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function F5(n,l){return n.length!==l.length?!1:n.every((o,i)=>{const s=l[i];return(s==null?void 0:s.name)===o.name&&s.value===o.value})}function Q5(n,l){if(n.match(/^[a-z]+:\/\//i))return n;if(n.match(/^\/\//))return window.location.protocol+n;if(n.match(/^[a-z]+:/i))return n;const o=document.implementation.createHTMLDocument(),i=o.createElement("base"),s=o.createElement("a");return o.head.appendChild(i),o.body.appendChild(s),l&&(i.href=l),s.href=n,s.href}const Z5=(()=>{let n=0;const l=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(n+=1,`u${l()}${n}`)})();function dl(n){const l=[];for(let o=0,i=n.length;o<i;o++)l.push(n[o]);return l}let kr=null;function l1(n={}){return kr||(n.includeStyleProperties?(kr=n.includeStyleProperties,kr):(kr=dl(window.getComputedStyle(document.documentElement)),kr))}function nc(n,l){const i=(n.ownerDocument.defaultView||window).getComputedStyle(n).getPropertyValue(l);return i?parseFloat(i.replace("px","")):0}function J5(n){const l=nc(n,"border-left-width"),o=nc(n,"border-right-width");return n.clientWidth+l+o}function W5(n){const l=nc(n,"border-top-width"),o=nc(n,"border-bottom-width");return n.clientHeight+l+o}function r1(n,l={}){const o=l.width||J5(n),i=l.height||W5(n);return{width:o,height:i}}function e3(){let n,l;try{l=process}catch{}const o=l&&l.env?l.env.devicePixelRatio:null;return o&&(n=parseInt(o,10),Number.isNaN(n)&&(n=1)),n||window.devicePixelRatio||1}const xn=16384;function t3(n){(n.width>xn||n.height>xn)&&(n.width>xn&&n.height>xn?n.width>n.height?(n.height*=xn/n.width,n.width=xn):(n.width*=xn/n.height,n.height=xn):n.width>xn?(n.height*=xn/n.width,n.width=xn):(n.width*=xn/n.height,n.height=xn))}function ac(n){return new Promise((l,o)=>{const i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>l(i))})},i.onerror=o,i.crossOrigin="anonymous",i.decoding="async",i.src=n})}async function n3(n){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(n)).then(encodeURIComponent).then(l=>`data:image/svg+xml;charset=utf-8,${l}`)}async function a3(n,l,o){const i="http://www.w3.org/2000/svg",s=document.createElementNS(i,"svg"),u=document.createElementNS(i,"foreignObject");return s.setAttribute("width",`${l}`),s.setAttribute("height",`${o}`),s.setAttribute("viewBox",`0 0 ${l} ${o}`),u.setAttribute("width","100%"),u.setAttribute("height","100%"),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("externalResourcesRequired","true"),s.appendChild(u),u.appendChild(n),n3(s)}const on=(n,l)=>{if(n instanceof l)return!0;const o=Object.getPrototypeOf(n);return o===null?!1:o.constructor.name===l.name||on(o,l)};function l3(n){const l=n.getPropertyValue("content");return`${n.cssText} content: '${l.replace(/'|"/g,"")}';`}function r3(n,l){return l1(l).map(o=>{const i=n.getPropertyValue(o),s=n.getPropertyPriority(o);return`${o}: ${i}${s?" !important":""};`}).join(" ")}function o3(n,l,o,i){const s=`.${n}:${l}`,u=o.cssText?l3(o):r3(o,i);return document.createTextNode(`${s}{${u}}`)}function H0(n,l,o,i){const s=window.getComputedStyle(n,o),u=s.getPropertyValue("content");if(u===""||u==="none")return;const d=Z5();try{l.className=`${l.className} ${d}`}catch{return}const m=document.createElement("style");m.appendChild(o3(d,o,s,i)),l.appendChild(m)}function i3(n,l,o){H0(n,l,":before",o),H0(n,l,":after",o)}const B0="application/font-woff",U0="image/jpeg",s3={woff:B0,woff2:B0,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:U0,jpeg:U0,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function c3(n){const l=/\.([^./]*?)$/g.exec(n);return l?l[1]:""}function xm(n){const l=c3(n).toLowerCase();return s3[l]||""}function u3(n){return n.split(/,/)[1]}function Ld(n){return n.search(/^(data:)/)!==-1}function f3(n,l){return`data:${l};base64,${n}`}async function o1(n,l,o){const i=await fetch(n,l);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);const s=await i.blob();return new Promise((u,d)=>{const m=new FileReader;m.onerror=d,m.onloadend=()=>{try{u(o({res:i,result:m.result}))}catch(h){d(h)}},m.readAsDataURL(s)})}const nd={};function d3(n,l,o){let i=n.replace(/\?.*/,"");return o&&(i=n),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),l?`[${l}]${i}`:i}async function Sm(n,l,o){const i=d3(n,l,o.includeQueryParams);if(nd[i]!=null)return nd[i];o.cacheBust&&(n+=(/\?/.test(n)?"&":"?")+new Date().getTime());let s;try{const u=await o1(n,o.fetchRequestInit,({res:d,result:m})=>(l||(l=d.headers.get("Content-Type")||""),u3(m)));s=f3(u,l)}catch(u){s=o.imagePlaceholder||"";let d=`Failed to fetch resource: ${n}`;u&&(d=typeof u=="string"?u:u.message),d&&console.warn(d)}return nd[i]=s,s}async function m3(n){const l=n.toDataURL();return l==="data:,"?n.cloneNode(!1):ac(l)}async function h3(n,l){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 m=u.toDataURL();return ac(m)}const o=n.poster,i=xm(o),s=await Sm(o,i,l);return ac(s)}async function p3(n,l){var o;try{if(!((o=n==null?void 0:n.contentDocument)===null||o===void 0)&&o.body)return await gc(n.contentDocument.body,l,!0)}catch{}return n.cloneNode(!1)}async function g3(n,l){return on(n,HTMLCanvasElement)?m3(n):on(n,HTMLVideoElement)?h3(n,l):on(n,HTMLIFrameElement)?p3(n,l):n.cloneNode(i1(n))}const y3=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SLOT",i1=n=>n.tagName!=null&&n.tagName.toUpperCase()==="SVG";async function v3(n,l,o){var i,s;if(i1(l))return l;let u=[];return y3(n)&&n.assignedNodes?u=dl(n.assignedNodes()):on(n,HTMLIFrameElement)&&(!((i=n.contentDocument)===null||i===void 0)&&i.body)?u=dl(n.contentDocument.body.childNodes):u=dl(((s=n.shadowRoot)!==null&&s!==void 0?s:n).childNodes),u.length===0||on(n,HTMLVideoElement)||await u.reduce((d,m)=>d.then(()=>gc(m,o)).then(h=>{h&&l.appendChild(h)}),Promise.resolve()),l}function b3(n,l,o){const i=l.style;if(!i)return;const s=window.getComputedStyle(n);s.cssText?(i.cssText=s.cssText,i.transformOrigin=s.transformOrigin):l1(o).forEach(u=>{let d=s.getPropertyValue(u);u==="font-size"&&d.endsWith("px")&&(d=`${Math.floor(parseFloat(d.substring(0,d.length-2)))-.1}px`),on(n,HTMLIFrameElement)&&u==="display"&&d==="inline"&&(d="block"),u==="d"&&l.getAttribute("d")&&(d=`path(${l.getAttribute("d")})`),i.setProperty(u,d,s.getPropertyPriority(u))})}function x3(n,l){on(n,HTMLTextAreaElement)&&(l.innerHTML=n.value),on(n,HTMLInputElement)&&l.setAttribute("value",n.value)}function S3(n,l){if(on(n,HTMLSelectElement)){const i=Array.from(l.children).find(s=>n.value===s.getAttribute("value"));i&&i.setAttribute("selected","")}}function w3(n,l,o){return on(l,Element)&&(b3(n,l,o),i3(n,l,o),x3(n,l),S3(n,l)),l}async function E3(n,l){const o=n.querySelectorAll?n.querySelectorAll("use"):[];if(o.length===0)return n;const i={};for(let u=0;u<o.length;u++){const m=o[u].getAttribute("xlink:href");if(m){const h=n.querySelector(m),g=document.querySelector(m);!h&&g&&!i[m]&&(i[m]=await gc(g,l,!0))}}const s=Object.values(i);if(s.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 m=document.createElementNS(u,"defs");d.appendChild(m);for(let h=0;h<s.length;h++)m.appendChild(s[h]);n.appendChild(d)}return n}async function gc(n,l,o){return!o&&l.filter&&!l.filter(n)?null:Promise.resolve(n).then(i=>g3(i,l)).then(i=>v3(n,i,l)).then(i=>w3(n,i,l)).then(i=>E3(i,l))}const s1=/url\((['"]?)([^'"]+?)\1\)/g,T3=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,C3=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function M3(n){const l=n.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${l})(['"]?\\))`,"g")}function A3(n){const l=[];return n.replace(s1,(o,i,s)=>(l.push(s),o)),l.filter(o=>!Ld(o))}async function _3(n,l,o,i,s){try{const u=o?Q5(l,o):l,d=xm(l);let m;return s||(m=await Sm(u,d,i)),n.replace(M3(l),`$1${m}$3`)}catch{}return n}function R3(n,{preferredFontFormat:l}){return l?n.replace(C3,o=>{for(;;){const[i,,s]=T3.exec(o)||[];if(!s)return"";if(s===l)return`src: ${i};`}}):n}function c1(n){return n.search(s1)!==-1}async function u1(n,l,o){if(!c1(n))return n;const i=R3(n,o);return A3(i).reduce((u,d)=>u.then(m=>_3(m,d,l,o)),Promise.resolve(i))}async function Lr(n,l,o){var i;const s=(i=l.style)===null||i===void 0?void 0:i.getPropertyValue(n);if(s){const u=await u1(s,null,o);return l.style.setProperty(n,u,l.style.getPropertyPriority(n)),!0}return!1}async function N3(n,l){await Lr("background",n,l)||await Lr("background-image",n,l),await Lr("mask",n,l)||await Lr("-webkit-mask",n,l)||await Lr("mask-image",n,l)||await Lr("-webkit-mask-image",n,l)}async function O3(n,l){const o=on(n,HTMLImageElement);if(!(o&&!Ld(n.src))&&!(on(n,SVGImageElement)&&!Ld(n.href.baseVal)))return;const i=o?n.src:n.href.baseVal,s=await Sm(i,xm(i),l);await new Promise((u,d)=>{n.onload=u,n.onerror=l.onImageErrorHandler?(...h)=>{try{u(l.onImageErrorHandler(...h))}catch(g){d(g)}}:d;const m=n;m.decode&&(m.decode=u),m.loading==="lazy"&&(m.loading="eager"),o?(n.srcset="",n.src=s):n.href.baseVal=s})}async function z3(n,l){const i=dl(n.childNodes).map(s=>f1(s,l));await Promise.all(i).then(()=>n)}async function f1(n,l){on(n,Element)&&(await N3(n,l),await O3(n,l),await z3(n,l))}function D3(n,l){const{style:o}=n;l.backgroundColor&&(o.backgroundColor=l.backgroundColor),l.width&&(o.width=`${l.width}px`),l.height&&(o.height=`${l.height}px`);const i=l.style;return i!=null&&Object.keys(i).forEach(s=>{o[s]=i[s]}),n}const I0={};async function G0(n){let l=I0[n];if(l!=null)return l;const i=await(await fetch(n)).text();return l={url:n,cssText:i},I0[n]=l,l}async function Y0(n,l){let o=n.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,u=(o.match(/url\([^)]+\)/g)||[]).map(async d=>{let m=d.replace(i,"$1");return m.startsWith("https://")||(m=new URL(m,n.url).href),o1(m,l.fetchRequestInit,({result:h})=>(o=o.replace(d,`url(${h})`),[d,h]))});return Promise.all(u).then(()=>o)}function V0(n){if(n==null)return[];const l=[],o=/(\/\*[\s\S]*?\*\/)/gi;let i=n.replace(o,"");const s=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const h=s.exec(i);if(h===null)break;l.push(h[0])}i=i.replace(s,"");const u=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,d="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",m=new RegExp(d,"gi");for(;;){let h=u.exec(i);if(h===null){if(h=m.exec(i),h===null)break;u.lastIndex=m.lastIndex}else m.lastIndex=u.lastIndex;l.push(h[0])}return l}async function j3(n,l){const o=[],i=[];return n.forEach(s=>{if("cssRules"in s)try{dl(s.cssRules||[]).forEach((u,d)=>{if(u.type===CSSRule.IMPORT_RULE){let m=d+1;const h=u.href,g=G0(h).then(x=>Y0(x,l)).then(x=>V0(x).forEach(p=>{try{s.insertRule(p,p.startsWith("@import")?m+=1:s.cssRules.length)}catch(S){console.error("Error inserting rule from remote css",{rule:p,error:S})}})).catch(x=>{console.error("Error loading remote css",x.toString())});i.push(g)}})}catch(u){const d=n.find(m=>m.href==null)||document.styleSheets[0];s.href!=null&&i.push(G0(s.href).then(m=>Y0(m,l)).then(m=>V0(m).forEach(h=>{d.insertRule(h,d.cssRules.length)})).catch(m=>{console.error("Error loading remote stylesheet",m)})),console.error("Error inlining remote css file",u)}}),Promise.all(i).then(()=>(n.forEach(s=>{if("cssRules"in s)try{dl(s.cssRules||[]).forEach(u=>{o.push(u)})}catch(u){console.error(`Error while reading CSS rules from ${s.href}`,u)}}),o))}function k3(n){return n.filter(l=>l.type===CSSRule.FONT_FACE_RULE).filter(l=>c1(l.style.getPropertyValue("src")))}async function L3(n,l){if(n.ownerDocument==null)throw new Error("Provided element is not within a Document");const o=dl(n.ownerDocument.styleSheets),i=await j3(o,l);return k3(i)}function d1(n){return n.trim().replace(/["']/g,"")}function H3(n){const l=new Set;function o(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(u=>{l.add(d1(u))}),Array.from(i.children).forEach(u=>{u instanceof HTMLElement&&o(u)})}return o(n),l}async function B3(n,l){const o=await L3(n,l),i=H3(n);return(await Promise.all(o.filter(u=>i.has(d1(u.style.fontFamily))).map(u=>{const d=u.parentStyleSheet?u.parentStyleSheet.href:null;return u1(u.cssText,d,l)}))).join(`
|
|
411
|
+
`)}async function U3(n,l){const o=l.fontEmbedCSS!=null?l.fontEmbedCSS:l.skipFonts?null:await B3(n,l);if(o){const i=document.createElement("style"),s=document.createTextNode(o);i.appendChild(s),n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i)}}async function I3(n,l={}){const{width:o,height:i}=r1(n,l),s=await gc(n,l,!0);return await U3(s,l),await f1(s,l),D3(s,l),await a3(s,o,i)}async function G3(n,l={}){const{width:o,height:i}=r1(n,l),s=await I3(n,l),u=await ac(s),d=document.createElement("canvas"),m=d.getContext("2d"),h=l.pixelRatio||e3(),g=l.canvasWidth||o,x=l.canvasHeight||i;return d.width=g*h,d.height=x*h,l.skipAutoScale||t3(d),d.style.width=`${g}`,d.style.height=`${x}`,l.backgroundColor&&(m.fillStyle=l.backgroundColor,m.fillRect(0,0,d.width,d.height)),m.drawImage(u,0,0,d.width,d.height),d}async function Y3(n,l={}){return(await G3(n,l)).toDataURL()}const q0=224,V3=2;function q3(n){return new Promise(l=>{window.setTimeout(l,n)})}async function P3(n){var l;if((l=n.fonts)!=null&&l.ready)try{await n.fonts.ready}catch{}}async function $3(n){const l=document.createElement("iframe");l.setAttribute("aria-hidden","true"),l.tabIndex=-1,l.style.position="fixed",l.style.left="-10000px",l.style.top="0",l.style.width=`${n.width}px`,l.style.height=`${n.height}px`,l.style.opacity="0",l.style.pointerEvents="none",l.style.border="0",document.body.appendChild(l);try{const o=l.contentDocument;if(!o)throw new Error("Unable to access thumbnail iframe document.");o.open(),o.write(n.htmlSource),o.close(),await P3(o),await q3(50);const i=o.querySelector(n.rootSelector);if(!i)throw new Error("Slide root not found while rendering thumbnail.");const s=o.body??i;return await Y3(s,{cacheBust:!0,pixelRatio:V3,canvasWidth:q0,canvasHeight:Math.round(n.height/n.width*q0),backgroundColor:"white",skipFonts:!1})}finally{l.remove()}}const X3=300;function K3(n){const[l,o]=b.useState({}),i=b.useRef(new Map),s=b.useMemo(()=>n.map(u=>({id:u.id,key:`${u.id}:${u.htmlSource}`})),[n]);return b.useEffect(()=>{let u=!1;const d=window.setTimeout(async()=>{const m={};for(const h of n){const g=`${h.id}:${h.htmlSource}`,x=i.current.get(g);if(x){m[h.id]=x;continue}try{const p=await $3(h);i.current.set(g,p),m[h.id]=p}catch{}if(u)return}u||o(h=>({...h,...m}))},X3);return()=>{u=!0,window.clearTimeout(d)}},[n]),b.useEffect(()=>{const u=new Set(s.map(d=>d.key));for(const d of i.current.keys())u.has(d)||i.current.delete(d)},[s]),l}function F3({stageViewportRef:n,slideWidth:l,slideHeight:o}){const[i,s]=b.useState({width:0,height:0});b.useEffect(()=>{const g=n.current;if(!g)return;const x=()=>{const S=g.getBoundingClientRect();s(T=>T.width===S.width&&T.height===S.height?T:{width:S.width,height:S.height})};x();const p=new ResizeObserver(()=>{x()});return p.observe(g),()=>{p.disconnect()}},[n]);const u=Math.min(i.width>0?i.width/l:1,i.height>0?i.height/o:1),d=Number.isFinite(u)&&u>0?u:1,m=l*d,h=o*d;return{scale:d,offsetX:Math.max((i.width-m)/2,0),offsetY:Math.max((i.height-h)/2,0)}}function Q3({slides:n,deckTitle:l,isSaving:o=!1,onSlidesChange:i,onDeckTitleChange:s,onExportPdf:u,onExportHtml:d}){const{slides:m,activeSlide:h,activeSlideId:g,undoDepth:x,redoDepth:p,setActiveSlideId:S,commitOperation:T,runUndo:C,runRedo:M}=Y5(n,{onSlidesChange:i}),A=b.useRef(null),_=b.useRef(null),N=b.useRef(null),D=b.useRef(null),V=b.useRef(null),[ae,I]=b.useState(!1),[$,z]=b.useState(!1),F=K3(m),ne=b.useCallback((te,me)=>{const he=D.current;he&&he.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:te,clientY:me,button:2,buttons:2}))},[]),{selectedElementId:re,selectedElementIds:q,preselectedElementId:H,isEditingText:Y,activeGroupScopeId:ee,setSelectedElementId:E,setSelectedElementIds:j,beginTextEditing:B,beginGroupEditingScope:P,clearSelection:L,clearPreselection:R,updatePointerPreselection:G,retargetPointerSelection:J}=G5({activeSlide:h,iframeRef:A,onCommitOperation:T,onOpenSelectionContextMenu:ne}),le=h==null?void 0:h.elements.find(te=>te.id===re),se=h==null?void 0:h.elements.find(te=>te.id===ee),ie=q.length>1?"multi":(le==null?void 0:le.type)??(se==null?void 0:se.type)??"block",de=h?q.map(te=>h.elements.find(me=>me.id===te)).filter(te=>!!te):[],Z={group:q.length>=2&&de.length===q.length,ungroup:q.length===1&&!!((le==null?void 0:le.type)==="group"||h&&re&&Z3(h.htmlSource,re))},ce=!!ee&&q.length===1&&re===ee,ve=l??"",we=(h==null?void 0:h.width)||ql,Te=(h==null?void 0:h.height)||Pl,{scale:Ue,offsetX:Le,offsetY:Nt}=F3({stageViewportRef:_,slideWidth:we,slideHeight:Te}),{selectedStageRect:It,preselectionOverlay:kt,selectionOverlay:Tn,inspectedStyles:Ae}=X5({iframeRef:A,activeSlide:h,selectedElement:le,selectedElementIds:q,preselectedElementId:H,scale:Ue,offsetX:Le,offsetY:Nt,slideWidth:we,slideHeight:Te}),{manipulationOverlay:_e,isManipulating:sn,suppressBackgroundClear:ht,beginMove:Lt,beginResize:Ot,beginRotate:xl}=w5({activeSlide:h,selectedElement:le,selectedElementId:re,selectedElementIds:q,selectedStageRect:It,iframeRef:A,stageGeometry:{scale:Ue,offsetX:Le,offsetY:Nt,slideWidth:we,slideHeight:Te},isEditingText:Y,onCommitOperation:T}),Et=(_e==null?void 0:_e.selectionBounds)??Tn,Tt=re??"slide-root",Un={locked:h?$o(h,Tt,"data-editor-locked"):"",altText:h?$o(h,Tt,"alt"):"",ariaLabel:h?$o(h,Tt,"aria-label"):"",linkUrl:h?$o(h,Tt,"data-link-url"):""};function Fn(te,me){if(!h)return;const he=WN({elementId:Tt,nextValue:me,propertyName:te,slide:h});he&&T(he)}function Jt(te,me){if(!h)return;const he=e5({attributeName:te,elementId:Tt,nextValue:me,slide:h});he&&T(he)}function sa(te){if(!h||q.length===0)return;const me=q.map(he=>{const Ee=Od(h,he,"z-index"),ze=Number.parseInt(Ee,10),Ie=Number.isFinite(ze)?ze:0,ut=te==="front"?"999":te==="back"?"0":String(Math.max(0,Ie+(te==="forward"?1:-1)));return Ee===ut?null:{type:"style.update",slideId:h.id,elementId:he,propertyName:"z-index",previousValue:Ee,nextValue:ut,timestamp:Date.now()}}).filter(he=>!!he);Ht(me)}function Ht(te){!h||te.length===0||T(te.length===1?te[0]:{type:"operation.batch",slideId:h.id,operations:te,timestamp:Date.now()})}function cn(te,me,he){var ut;const Ee={[me]:he},Ie=(ut=new DOMParser().parseFromString(`<template>${te}</template>`,"text/html").querySelector("template"))==null?void 0:ut.content.firstElementChild;if(!(Ie instanceof HTMLElement))return Ee;for(const We of Ie.querySelectorAll(`[${Se}]`)){const He=We.getAttribute(Se);He&&(Ee[He]=`${he}-${He}`)}return Ee}function Gt(){var ut;if(!h||q.length===0)return;const te=(ut=A.current)==null?void 0:ut.contentDocument,me=te==null?void 0:te.querySelector(h.rootSelector),he=me==null?void 0:me.getBoundingClientRect();let Ee=h.htmlSource;const ze=[],Ie=q.map(We=>{const He=Vs(h.htmlSource,We),rt=Ys(h.htmlSource,We),Qe=te?$e(te,We):null;if(!He||!rt||!Qe||!he)return null;const Xt=sd(Ee,`${We}-copy`),fn=tv(He,cn(He,We,Xt)),zt=zd(t1(Qe.getBoundingClientRect(),he),24,24),Zn=e1(fn,zt);return Ee=`${Ee}
|
|
412
|
+
<!-- ${Xt} reserved -->`,ze.push(Xt),{type:"element.insert",slideId:h.id,elementId:Xt,...rt,html:Zn,timestamp:Date.now()}}).filter(We=>!!We);Ht(Ie),ze.length&&j(ze)}function un(){if(!h||q.length===0)return;const te=q.map(me=>{const he=Vs(h.htmlSource,me),Ee=Ys(h.htmlSource,me);return!he||!Ee?null:{type:"element.remove",slideId:h.id,elementId:me,...Ee,html:he,timestamp:Date.now()}}).filter(me=>!!me);Ht(te),te.length&&j([])}function Ct(te){if(!h||m.length===0)return;const me=T2(m,te);T({type:"slide.create",slide:me,index:te,timestamp:Date.now()}),S(me.id),L()}function Jr(){if(!h)return;const te=m.findIndex(he=>he.id===h.id),me=te>=0?te+1:m.length;Ct(me)}function Sl(te){const me=m.findIndex(he=>he.id===te);me<0||Ct(me)}function Cn(te){const me=m.findIndex(he=>he.id===te);me<0||Ct(me+1)}function ja(te){const me=m.find(Ie=>Ie.id===te);if(!me)return;const he=m.findIndex(Ie=>Ie.id===te),Ee=he>=0?he+1:m.length,ze=C2(m,me);T({type:"slide.duplicate",sourceSlideId:te,slide:ze,index:Ee,timestamp:Date.now()}),S(ze.id),L()}function ka(te){if(m.length<=1)return;const me=m.findIndex(ze=>ze.id===te),he=m[me];if(!he)return;const Ee=m[me+1]??m[me-1]??m[0];T({type:"slide.delete",slide:he,index:me,timestamp:Date.now()}),g===te&&S((Ee==null?void 0:Ee.id)??""),L()}function ca(te){const me=m.find(he=>he.id===te);me&&T({type:"slide.visibility.update",slideId:te,previousHidden:me.hidden===!0,nextHidden:me.hidden!==!0,timestamp:Date.now()})}function Mn(te,me){const he=m.find(ze=>ze.id===te),Ee=me.trim()||"Untitled Slide";!he||he.title===Ee||T({type:"slide.title.update",slideId:te,previousTitle:he.title,nextTitle:Ee,timestamp:Date.now()})}function Ne(te,me){const he=m.findIndex(Ee=>Ee.id===te);he<0||he===me||(T({type:"slide.reorder",slideId:te,fromIndex:he,toIndex:me,timestamp:Date.now()}),S(te))}function it(){if(!h||q.length<2)return;const te=xt(),me=sd(h.htmlSource,"group-1"),he=h2({html:h.htmlSource,slideId:h.id,groupElementId:me,elementRects:te,elementIds:q});he&&(T(he),j([me]))}function xt(te){var rt;const me=(rt=A.current)==null?void 0:rt.contentDocument,he=me==null?void 0:me.querySelector((h==null?void 0:h.rootSelector)??"");if(!me||!he)return{};const Ee=he.getBoundingClientRect(),ze=h?h.width/Ee.width:1,Ie=h?h.height/Ee.height:1,ut={},We=P0(me,te),He=[...Array.from(me.querySelectorAll(`[data-editable][${Se}]`)),...Array.from(We.keys())];for(const Qe of He){const Xt=Qe.getAttribute(Se)||We.get(Qe);if(!Xt)continue;const fn=Qe.getBoundingClientRect(),zt=Qe.parentElement,Zn=zt!=null&&zt.hasAttribute("data-editable")&&zt.getAttribute(Se)?zt.getAttribute(Se):null,pt=Zn?ut[Zn]??{x:0,y:0,width:Ee.width,height:Ee.height}:{x:0,y:0,width:Ee.width,height:Ee.height};ut[Xt]={x:(fn.left-Ee.left)*ze-pt.x,y:(fn.top-Ee.top)*Ie-pt.y,width:fn.width*ze,height:fn.height*Ie}}return ut}function Bt(){if(!h||q.length!==1||!re)return;const te=p2({html:h.htmlSource,slideId:h.id,groupElementId:re,elementRects:xt(re),elementPresentationStyles:Qn(re)});te&&(T(te),j(te.childElementIds))}function Qn(te){var Ie,ut,We;const me=(Ie=A.current)==null?void 0:Ie.contentDocument;if(!me)return{};const he=$e(me,te);if(!he||he.getAttribute("data-group")==="true")return{};const Ee={},ze=P0(me,te);for(const He of Array.from(he.children)){if(!He.hasAttribute("data-editable")&&!wm(He))continue;const rt=He.getAttribute(Se)||ze.get(He),Qe=(ut=He.ownerDocument.defaultView)==null?void 0:ut.getComputedStyle(He);if(!(!rt||!Qe)){Ee[rt]={color:Qe.color,fontSize:Qe.fontSize,fontWeight:Qe.fontWeight,fontStyle:Qe.fontStyle,lineHeight:Qe.lineHeight,textAlign:Qe.textAlign,paddingTop:Qe.paddingTop,paddingRight:Qe.paddingRight,paddingBottom:Qe.paddingBottom,paddingLeft:Qe.paddingLeft,listStylePosition:Qe.listStylePosition,listStyleType:Qe.listStyleType};for(const Xt of Array.from(He.querySelectorAll(`[data-editable][${Se}]`))){const fn=Xt.getAttribute(Se),zt=(We=Xt.ownerDocument.defaultView)==null?void 0:We.getComputedStyle(Xt);!fn||!zt||(Ee[fn]={color:zt.color,fontSize:zt.fontSize,fontWeight:zt.fontWeight,fontStyle:zt.fontStyle,lineHeight:zt.lineHeight,textAlign:zt.textAlign})}}}return Ee}function ct(te){if(!h||!re||!Et)return;const me=Od(h,re,"transform"),he={x:(Et.x-Le)/Ue,y:(Et.y-Nt)/Ue,width:Et.width/Ue,height:Et.height/Ue};let Ee=0,ze=0;if(te==="left"?Ee=-he.x:te==="hcenter"?Ee=we/2-(he.x+he.width/2):te==="right"?Ee=we-(he.x+he.width):te==="top"?ze=-he.y:te==="vcenter"?ze=Te/2-(he.y+he.height/2):te==="bottom"&&(ze=Te-(he.y+he.height)),Math.abs(Ee)<.01&&Math.abs(ze)<.01)return;const Ie=$n(me);Fn("transform",Na(Ie.translateX+Ee,Ie.translateY+ze,Ie.rotate)??"")}function $t(te){var Zn;if(!h||q.length<3)return;const me=(Zn=A.current)==null?void 0:Zn.contentDocument,he=me==null?void 0:me.querySelector(h.rootSelector),Ee=he==null?void 0:he.getBoundingClientRect();if(!me||!Ee)return;const ze=q.map(pt=>{const In=$e(me,pt);if(!In)return null;const dn=In.getBoundingClientRect();return{elementId:pt,node:In,rect:{x:dn.left-Ee.left,y:dn.top-Ee.top,width:dn.width,height:dn.height}}}).filter(pt=>!!pt);if(ze.length<3)return;const Ie=te==="vertical"?"y":"x",ut=te==="vertical"?"height":"width",We=[...ze].sort((pt,In)=>pt.rect[Ie]-In.rect[Ie]),He=We[0],rt=We[We.length-1];if(!He||!rt)return;const Qe=He.rect[Ie]+He.rect[ut]/2,fn=(rt.rect[Ie]+rt.rect[ut]/2-Qe)/(We.length-1),zt=We.map((pt,In)=>{const dn=Qe+fn*In,La=pt.rect[Ie]+pt.rect[ut]/2,ua=dn-La;if(Math.abs(ua)<.01)return null;const Gn=Xo(pt.node),gt=$n(Gn.transform),li=rd({...Gn,transform:Na(gt.translateX+(Ie==="x"?ua:0),gt.translateY+(Ie==="y"?ua:0),gt.rotate),transformOrigin:Gn.transformOrigin||"center center"});return{type:"element.layout.update",slideId:h.id,elementId:pt.elementId,previousStyle:Gn,nextStyle:li,timestamp:Date.now()}}).filter(pt=>!!pt);Ht(zt)}return D5({activeSlide:h,selectedElementIds:q,iframeRef:A,slideWidth:we,slideHeight:Te,isEditingText:Y,canUndo:x>0,canRedo:p>0,onCommitOperation:T,onSelectElementIds:j,onEscapeSelection:L,onUndo:C,onRedo:M}),h?v.jsx(JN,{children:v.jsxs("div",{className:"flex h-screen flex-col overflow-hidden bg-background text-foreground",children:[v.jsxs("div",{className:`flex min-h-0 flex-auto flex-col ${ae?"invisible pointer-events-none absolute inset-0":""}`,children:[v.jsx(UT,{title:ve,onTitleChange:s,isSaving:o,onPresent:()=>{L(),I(!0)},onExportHtml:d,pdfSlides:m.map(te=>({id:te.id,title:te.title,file:te.sourceFile})),pdfThumbnails:F,onExportPdf:u}),v.jsxs("div",{className:"flex min-h-0 flex-auto gap-3 overflow-hidden max-[1200px]:block",children:[v.jsx(lN,{slides:m,activeSlideId:h.id,slideCount:m.length,thumbnails:F,onSelectSlide:te=>{S(te),E(null)},onAdd:Jr,onAddSlideAbove:Sl,onAddSlideBelow:Cn,onDuplicate:ja,onDelete:ka,onToggleHidden:ca,onRename:Mn,onReorder:Ne}),v.jsx("main",{className:"flex min-h-0 min-w-0 flex-auto overflow-visible max-[1200px]:block",children:v.jsx(QN,{slideWidth:we,slideHeight:Te,offsetX:Le,offsetY:Nt,scale:Ue,preselectionOverlay:kt,selectionOverlay:Et,toolbarKey:q.length?`${h.id}:${q.join(",")}`:null,inspectedStyles:Ae,selectedElementType:ie,selectionCommandAvailability:Z,groupScopeOverlayPassive:ce,isEditingText:Y,manipulationOverlay:_e,iframeRef:A,stageViewportRef:_,selectionOverlayRef:N,selectionContextMenuTriggerRef:D,isManipulating:sn,isToolbarSuppressed:$,onSelectionOverlayMouseDown:te=>{if(te.button!==0||!q.length)return;z(!0);const me=te.shiftKey||te.metaKey||te.ctrlKey,he=G(te.clientX,te.clientY);if(V.current={clientX:te.clientX,clientY:te.clientY,additive:me,targetElementId:he},he&&he!==re){te.stopPropagation();return}he&&he===re&&te.stopPropagation(),Lt({clientX:te.clientX,clientY:te.clientY,preventDefault:()=>te.preventDefault(),stopPropagation:()=>te.stopPropagation()})},onSelectionOverlayMouseMove:te=>{const me=V.current;if(G(te.clientX,te.clientY),!me||me.targetElementId===re)return;const he=te.clientX-me.clientX,Ee=te.clientY-me.clientY;Math.hypot(he,Ee)<=4||(V.current=null,Lt({clientX:me.clientX,clientY:me.clientY,preventDefault:()=>te.preventDefault(),stopPropagation:()=>te.stopPropagation()}))},onSelectionOverlayContextMenu:te=>{te.preventDefault(),te.stopPropagation(),ne(te.clientX,te.clientY)},onSelectionOverlayMouseUp:te=>{const me=V.current;if(V.current=null,z(!1),!me)return;const he=te.clientX-me.clientX,Ee=te.clientY-me.clientY;Math.hypot(he,Ee)>4||J(te.clientX,te.clientY,me.additive)},onStageMouseLeave:R,onResizeHandleMouseDown:(te,me)=>{q.length&&Ot(te,{clientX:me.clientX,clientY:me.clientY,preventDefault:()=>me.preventDefault(),stopPropagation:()=>me.stopPropagation()})},onRotateHandleMouseDown:te=>{q.length===1&&xl({clientX:te.clientX,clientY:te.clientY,preventDefault:()=>te.preventDefault(),stopPropagation:()=>te.stopPropagation()})},onSelectionOverlayDoubleClick:te=>{var me;if(ee&&((me=A.current)!=null&&me.contentDocument)){const he=A.current.getBoundingClientRect(),ze=A.current.contentDocument.elementFromPoint(te.clientX-he.left,te.clientY-he.top),Ie=ze==null?void 0:ze.closest(`[data-editable][${Se}]`);if((Ie==null?void 0:Ie.getAttribute("data-editable"))==="text"){const ut=Ie.getAttribute(Se);if(ut){B(ut);return}}}if(q.length===1&&(le==null?void 0:le.type)==="text"&&re){B(re);return}q.length===1&&(le==null?void 0:le.type)==="group"&&re&&P(re)},onBackgroundClick:()=>{ht||L()},onStyleChange:Fn,onAttributeChange:Jt,onAlignToSlide:ct,onDistribute:$t,onGroup:it,onLayerOrder:sa,onUngroup:Bt,onDuplicate:Gt,onDelete:un,attributeValues:Un})})]})]}),ae?v.jsx(aN,{slides:m,startSlideId:h.id,onExit:()=>I(!1)}):null]})}):v.jsx("div",{className:"grid min-h-screen place-items-center",children:"No slides loaded."})}function Z3(n,l){if(typeof DOMParser>"u")return!1;const o=new DOMParser().parseFromString(n,"text/html"),i=$e(o,l);return!i||i.getAttribute("data-editable")!=="block"?!1:Array.from(i.children).some(s=>s instanceof HTMLElement&&(s.hasAttribute("data-editable")||wm(s)))}function P0(n,l){const o=new Map;if(!l)return o;const i=$e(n,l);if(!i||i.getAttribute("data-group")==="true")return o;const s=new Set(Array.from(n.querySelectorAll(`[${Se}]`)).map(d=>d.getAttribute(Se)).filter(d=>!!d)),u=d=>{if(!s.has(d))return s.add(d),d;const m=d.match(/^(.*?)(?:-(\d+))?$/),h=(m==null?void 0:m[1])||d;let g=Number.parseInt((m==null?void 0:m[2])||"1",10)+1;for(;s.has(`${h}-${g}`);)g+=1;const x=`${h}-${g}`;return s.add(x),x};for(const d of Array.from(i.children))wm(d)&&o.set(d,d.getAttribute(Se)||u("block-1"));return o}function wm(n){const l=n.tagName.toLowerCase();return l!=="ul"&&l!=="ol"?!1:Array.from(n.children).some(o=>o.tagName.toLowerCase()==="li"&&o.hasAttribute("data-editable"))}const J3="/deck/manifest.json",W3="/__editor/save-generated-deck",eO="/__editor/export-pdf",tO="/__editor/export-html",ad=800;function nO(){const[n,l]=b.useState("Generated deck"),[o,i]=b.useState([]),[s,u]=b.useState(null),[d,m]=b.useState(!0),[h,g]=b.useState(!1),x=b.useRef(null),p=b.useRef([]),S=b.useRef(null),T=b.useRef(null),C=b.useRef(null),M=b.useRef(0),A=b.useRef(!1),_=b.useRef(null),N=b.useRef(Date.now());b.useEffect(()=>{let z=!1;return A2({manifestUrl:`${J3}?v=${Date.now()}`}).then(F=>{if(z)return;if(!F){l("Generated deck"),i([]),u("No slides were found at /deck/manifest.json."),m(!1);return}x.current=F.manifest;const ne=F.manifest.topic||"Generated deck";T.current=ne,l(ne),i(F.slides),p.current=F.slides,u(null),m(!1)}).catch(()=>{z||(l("Generated deck"),i([]),u("The app could not load the generated deck."),m(!1))}),()=>{z=!0,C.current&&window.clearTimeout(C.current)}},[]);const D=async()=>{var ee;const z=x.current,F=S.current??p.current,ne=T.current??n,re=M.current;if(!((ee=z==null?void 0:z.slides)!=null&&ee.length)||!(F!=null&&F.length))return;if(A.current){await _.current,M.current!==re&&await D();return}A.current=!0;const q=new Map(p.current.map((E,j)=>{var B,P;return[E.id,E.sourceFile??((P=(B=z.slides)==null?void 0:B[j])==null?void 0:P.file)]})),H=F.flatMap(E=>{const j=E.sourceFile??q.get(E.id);return j?[{file:j,title:E.title,hidden:E.hidden===!0?!0:void 0}]:[]}),Y=fetch(W3,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clientLoadedAt:N.current,manifest:{...z,topic:ne,slides:H},slides:F.map(E=>({file:E.sourceFile??q.get(E.id),htmlSource:E.htmlSource,title:E.title,hidden:E.hidden===!0}))})}).then(E=>{if(!E.ok)throw new Error("The app could not write generated slides back to disk.")}).catch(E=>{throw u("The app could not write generated slides back to disk."),E}).finally(()=>{if(A.current=!1,_.current=null,M.current!==re){C.current||(C.current=window.setTimeout(()=>{C.current=null,D()},ad));return}g(!1)});_.current=Y,await Y};return{deckTitle:n,slides:o,errorMessage:s,isLoading:d,isSaving:h,saveSlides:z=>{var ne;if(p.current===z)return;const F=x.current;(ne=F==null?void 0:F.slides)!=null&&ne.length&&(p.current=z,S.current=z,M.current+=1,g(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,D()},ad))},saveDeckTitle:z=>{const F=z.trim()||"Untitled deck";l(z),T.current=F,M.current+=1,g(!0),C.current&&window.clearTimeout(C.current),C.current=window.setTimeout(()=>{C.current=null,D()},ad)},exportPdf:async z=>{C.current&&(window.clearTimeout(C.current),C.current=null),await D();const F=await fetch(eO,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({selection:z})});if(!F.ok)throw new Error(await F.text());const ne=await F.blob(),re=URL.createObjectURL(ne),q=document.createElement("a"),H=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";q.href=re,q.download=`${H}.pdf`,document.body.appendChild(q),q.click(),q.remove(),URL.revokeObjectURL(re)},exportHtml:async()=>{C.current&&(window.clearTimeout(C.current),C.current=null),await D();const z=await fetch(tO,{method:"POST"});if(!z.ok)throw new Error(await z.text());const F=await z.blob(),ne=URL.createObjectURL(F),re=document.createElement("a"),q=n.trim().replace(/[^a-zA-Z0-9._-]+/g,"-")||"starry-slides";re.href=ne,re.download=`${q}.html`,document.body.appendChild(re),re.click(),re.remove(),URL.revokeObjectURL(ne)}}}function $0({title:n,body:l}){return v.jsx("main",{style:{minHeight:"100vh",display:"grid",placeItems:"center",padding:"32px",background:"#f4efe8",color:"#241d16",fontFamily:'"Avenir Next", "Segoe UI", sans-serif'},children:v.jsxs("section",{style:{maxWidth:"720px",padding:"32px",borderRadius:"24px",background:"rgba(255, 255, 255, 0.82)",boxShadow:"0 24px 80px rgba(74, 53, 31, 0.12)"},children:[v.jsx("h1",{style:{margin:"0 0 12px",fontSize:"40px",lineHeight:1.05},children:n}),v.jsx("p",{style:{margin:0,fontSize:"20px",lineHeight:1.5},children:l})]})})}function aO(){const{deckTitle:n,slides:l,errorMessage:o,isLoading:i,isSaving:s,saveSlides:u,saveDeckTitle:d,exportPdf:m,exportHtml:h}=nO();return i?v.jsx($0,{title:"Loading generated deck",body:"The app is importing the latest generated slides."}):o?v.jsx($0,{title:"Generated deck required",body:o}):v.jsxs(v.Fragment,{children:[v.jsx(o2,{position:"top-center",richColors:!0,closeButton:!0}),v.jsx(Q3,{slides:l,deckTitle:n,isSaving:s,onSlidesChange:u,onDeckTitleChange:d,onExportPdf:g=>{const x=ul.loading("Exporting PDF...");m(g).then(()=>{ul.success("PDF export is ready.",{id:x})}).catch(p=>{ul.error("PDF export failed.",{id:x,description:p instanceof Error?p.message:String(p)})})},onExportHtml:()=>{const g=ul.loading("Exporting HTML...");h().then(()=>{ul.success("HTML export is ready.",{id:g})}).catch(x=>{ul.error("HTML export failed.",{id:g,description:x instanceof Error?x.message:String(x)})})}})]})}const m1=document.getElementById("root");if(!m1)throw new Error("Root element #root was not found.");Dw.createRoot(m1).render(v.jsx(pe.StrictMode,{children:v.jsx(aO,{})}));
|