@tom2012/cc-web 1.5.72 → 1.5.75
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/README.md +1 -1
- package/backend/dist/index.d.ts.map +1 -1
- package/backend/dist/index.js +22 -0
- package/backend/dist/index.js.map +1 -1
- package/backend/dist/plugin-manager.d.ts +88 -0
- package/backend/dist/plugin-manager.d.ts.map +1 -0
- package/backend/dist/plugin-manager.js +307 -0
- package/backend/dist/plugin-manager.js.map +1 -0
- package/backend/dist/routes/claude.js +2 -2
- package/backend/dist/routes/claude.js.map +1 -1
- package/backend/dist/routes/plugin-bridge.d.ts +3 -0
- package/backend/dist/routes/plugin-bridge.d.ts.map +1 -0
- package/backend/dist/routes/plugin-bridge.js +141 -0
- package/backend/dist/routes/plugin-bridge.js.map +1 -0
- package/backend/dist/routes/plugins.d.ts +3 -0
- package/backend/dist/routes/plugins.d.ts.map +1 -0
- package/backend/dist/routes/plugins.js +193 -0
- package/backend/dist/routes/plugins.js.map +1 -0
- package/backend/dist/routes/skillhub.d.ts.map +1 -1
- package/backend/dist/routes/skillhub.js +22 -0
- package/backend/dist/routes/skillhub.js.map +1 -1
- package/bin/ccweb-plugin.js +268 -0
- package/frontend/dist/assets/{GraphPreview-QqDpOEoI.js → GraphPreview-CiL6ZjdW.js} +1 -1
- package/frontend/dist/assets/{OfficePreview-BC2woErg.js → OfficePreview-laIUc98k.js} +3 -3
- package/frontend/dist/assets/{ProjectPage-B8Tdoz_M.js → ProjectPage-BmYhTTYq.js} +57 -57
- package/frontend/dist/assets/{SettingsPage-C8572fFD.js → SettingsPage-C30iHtBo.js} +1 -1
- package/frontend/dist/assets/{ShareViewPage-PTSFe5df.js → ShareViewPage-BGAvzqO1.js} +1 -1
- package/frontend/dist/assets/SkillHubPage-BSb-9jya.js +11 -0
- package/frontend/dist/assets/{bot-CP4ljg4K.js → bot-hRRV5XmX.js} +1 -1
- package/frontend/dist/assets/{chevron-down-BPKbPuX9.js → chevron-down-BR0IMbA9.js} +1 -1
- package/frontend/dist/assets/{download-DJNy8XSX.js → download-UC5GvInE.js} +1 -1
- package/frontend/dist/assets/{index-CENzb-E2.js → index-BiYAwwZA.js} +24 -24
- package/frontend/dist/assets/index-D7mCoW2r.js +295 -0
- package/frontend/dist/assets/index-DgHvs3fU.css +1 -0
- package/frontend/dist/assets/{jszip.min-CPp1Je4B.js → jszip.min-YWYO5s4l.js} +1 -1
- package/frontend/dist/assets/{save-dexIyJWW.js → save-CdDjQhdC.js} +1 -1
- package/frontend/dist/assets/{user-BGUBSa7q.js → user-Bv38vpTL.js} +1 -1
- package/frontend/dist/index.html +2 -2
- package/package.json +6 -3
- package/plugin-sdk/ccweb-plugin-sdk.js +123 -0
- package/plugins/pomodoro/frontend/index.html +242 -0
- package/plugins/pomodoro/manifest.json +19 -0
- package/frontend/dist/assets/SkillHubPage-BHgZp94q.js +0 -6
- package/frontend/dist/assets/index-BPzNyZy4.js +0 -280
- package/frontend/dist/assets/index-PNcejD9U.css +0 -1
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProjectPage-BmYhTTYq.js","assets/save-CdDjQhdC.js","assets/download-UC5GvInE.js","assets/chevron-down-BR0IMbA9.js","assets/bot-hRRV5XmX.js","assets/user-Bv38vpTL.js","assets/ProjectPage-9CEnUXvW.css","assets/SettingsPage-C30iHtBo.js","assets/SkillHubPage-BSb-9jya.js","assets/ShareViewPage-BGAvzqO1.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var ww=Object.defineProperty;var Sw=(e,t,n)=>t in e?ww(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ul=(e,t,n)=>Sw(e,typeof t!="symbol"?t+"":t,n);function bw(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();var aD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Am(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lD(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Lm={exports:{}},wa={},_m={exports:{}},K={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var bo=Symbol.for("react.element"),Ew=Symbol.for("react.portal"),kw=Symbol.for("react.fragment"),Cw=Symbol.for("react.strict_mode"),Pw=Symbol.for("react.profiler"),Tw=Symbol.for("react.provider"),jw=Symbol.for("react.context"),Nw=Symbol.for("react.forward_ref"),Rw=Symbol.for("react.suspense"),Mw=Symbol.for("react.memo"),Dw=Symbol.for("react.lazy"),kf=Symbol.iterator;function Aw(e){return e===null||typeof e!="object"?null:(e=kf&&e[kf]||e["@@iterator"],typeof e=="function"?e:null)}var Om={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Im=Object.assign,Vm={};function ls(e,t,n){this.props=e,this.context=t,this.refs=Vm,this.updater=n||Om}ls.prototype.isReactComponent={};ls.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ls.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Fm(){}Fm.prototype=ls.prototype;function _c(e,t,n){this.props=e,this.context=t,this.refs=Vm,this.updater=n||Om}var Oc=_c.prototype=new Fm;Oc.constructor=_c;Im(Oc,ls.prototype);Oc.isPureReactComponent=!0;var Cf=Array.isArray,zm=Object.prototype.hasOwnProperty,Ic={current:null},Bm={key:!0,ref:!0,__self:!0,__source:!0};function $m(e,t,n){var r,s={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)zm.call(t,r)&&!Bm.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:bo,type:e,key:o,ref:i,props:s,_owner:Ic.current}}function Lw(e,t){return{$$typeof:bo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Vc(e){return typeof e=="object"&&e!==null&&e.$$typeof===bo}function _w(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Pf=/\/+/g;function cl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_w(""+e.key):t.toString(36)}function hi(e,t,n,r,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case bo:case Ew:i=!0}}if(i)return i=e,s=s(i),e=r===""?"."+cl(i,0):r,Cf(s)?(n="",e!=null&&(n=e.replace(Pf,"$&/")+"/"),hi(s,t,n,"",function(c){return c})):s!=null&&(Vc(s)&&(s=Lw(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Pf,"$&/")+"/")+e)),t.push(s)),1;if(i=0,r=r===""?".":r+":",Cf(e))for(var a=0;a<e.length;a++){o=e[a];var l=r+cl(o,a);i+=hi(o,t,n,l,s)}else if(l=Aw(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+cl(o,a++),i+=hi(o,t,n,l,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Io(e,t,n){if(e==null)return e;var r=[],s=0;return hi(e,r,"","",function(o){return t.call(n,o,s++)}),r}function Ow(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ze={current:null},pi={transition:null},Iw={ReactCurrentDispatcher:Ze,ReactCurrentBatchConfig:pi,ReactCurrentOwner:Ic};function Um(){throw Error("act(...) is not supported in production builds of React.")}K.Children={map:Io,forEach:function(e,t,n){Io(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Io(e,function(){t++}),t},toArray:function(e){return Io(e,function(t){return t})||[]},only:function(e){if(!Vc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};K.Component=ls;K.Fragment=kw;K.Profiler=Pw;K.PureComponent=_c;K.StrictMode=Cw;K.Suspense=Rw;K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Iw;K.act=Um;K.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Im({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Ic.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)zm.call(t,l)&&!Bm.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:bo,type:e.type,key:s,ref:o,props:r,_owner:i}};K.createContext=function(e){return e={$$typeof:jw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Tw,_context:e},e.Consumer=e};K.createElement=$m;K.createFactory=function(e){var t=$m.bind(null,e);return t.type=e,t};K.createRef=function(){return{current:null}};K.forwardRef=function(e){return{$$typeof:Nw,render:e}};K.isValidElement=Vc;K.lazy=function(e){return{$$typeof:Dw,_payload:{_status:-1,_result:e},_init:Ow}};K.memo=function(e,t){return{$$typeof:Mw,type:e,compare:t===void 0?null:t}};K.startTransition=function(e){var t=pi.transition;pi.transition={};try{e()}finally{pi.transition=t}};K.unstable_act=Um;K.useCallback=function(e,t){return Ze.current.useCallback(e,t)};K.useContext=function(e){return Ze.current.useContext(e)};K.useDebugValue=function(){};K.useDeferredValue=function(e){return Ze.current.useDeferredValue(e)};K.useEffect=function(e,t){return Ze.current.useEffect(e,t)};K.useId=function(){return Ze.current.useId()};K.useImperativeHandle=function(e,t,n){return Ze.current.useImperativeHandle(e,t,n)};K.useInsertionEffect=function(e,t){return Ze.current.useInsertionEffect(e,t)};K.useLayoutEffect=function(e,t){return Ze.current.useLayoutEffect(e,t)};K.useMemo=function(e,t){return Ze.current.useMemo(e,t)};K.useReducer=function(e,t,n){return Ze.current.useReducer(e,t,n)};K.useRef=function(e){return Ze.current.useRef(e)};K.useState=function(e){return Ze.current.useState(e)};K.useSyncExternalStore=function(e,t,n){return Ze.current.useSyncExternalStore(e,t,n)};K.useTransition=function(){return Ze.current.useTransition()};K.version="18.3.1";_m.exports=K;var p=_m.exports;const M=Am(p),Sa=bw({__proto__:null,default:M},[p]);/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react-jsx-runtime.production.min.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var Vw=p,Fw=Symbol.for("react.element"),zw=Symbol.for("react.fragment"),Bw=Object.prototype.hasOwnProperty,$w=Vw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Uw={key:!0,ref:!0,__self:!0,__source:!0};function Wm(e,t,n){var r,s={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Bw.call(t,r)&&!Uw.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:Fw,type:e,key:o,ref:i,props:s,_owner:$w.current}}wa.Fragment=zw;wa.jsx=Wm;wa.jsxs=Wm;Lm.exports=wa;var h=Lm.exports,cu={},Hm={exports:{}},ft={},Gm={exports:{}},Km={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.min.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/(function(e){function t(N,_){var I=N.length;N.push(_);e:for(;0<I;){var B=I-1>>>1,ne=N[B];if(0<s(ne,_))N[B]=_,N[I]=ne,I=B;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var _=N[0],I=N.pop();if(I!==_){N[0]=I;e:for(var B=0,ne=N.length,U=ne>>>1;B<U;){var Z=2*(B+1)-1,Y=N[Z],me=Z+1,Je=N[me];if(0>s(Y,I))me<ne&&0>s(Je,Y)?(N[B]=Je,N[me]=I,B=me):(N[B]=Y,N[Z]=I,B=Z);else if(me<ne&&0>s(Je,I))N[B]=Je,N[me]=I,B=me;else break e}}return _}function s(N,_){var I=N.sortIndex-_.sortIndex;return I!==0?I:N.id-_.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],c=[],d=1,u=null,f=3,y=!1,x=!1,v=!1,S=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(N){for(var _=n(c);_!==null;){if(_.callback===null)r(c);else if(_.startTime<=N)r(c),_.sortIndex=_.expirationTime,t(l,_);else break;_=n(c)}}function b(N){if(v=!1,w(N),!x)if(n(l)!==null)x=!0,z(C);else{var _=n(c);_!==null&&Q(b,_.startTime-N)}}function C(N,_){x=!1,v&&(v=!1,g(k),k=-1),y=!0;var I=f;try{for(w(_),u=n(l);u!==null&&(!(u.expirationTime>_)||N&&!A());){var B=u.callback;if(typeof B=="function"){u.callback=null,f=u.priorityLevel;var ne=B(u.expirationTime<=_);_=e.unstable_now(),typeof ne=="function"?u.callback=ne:u===n(l)&&r(l),w(_)}else r(l);u=n(l)}if(u!==null)var U=!0;else{var Z=n(c);Z!==null&&Q(b,Z.startTime-_),U=!1}return U}finally{u=null,f=I,y=!1}}var P=!1,E=null,k=-1,j=5,T=-1;function A(){return!(e.unstable_now()-T<j)}function L(){if(E!==null){var N=e.unstable_now();T=N;var _=!0;try{_=E(!0,N)}finally{_?G():(P=!1,E=null)}}else P=!1}var G;if(typeof m=="function")G=function(){m(L)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,ae=oe.port2;oe.port1.onmessage=L,G=function(){ae.postMessage(null)}}else G=function(){S(L,0)};function z(N){E=N,P||(P=!0,G())}function Q(N,_){k=S(function(){N(e.unstable_now())},_)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_continueExecution=function(){x||y||(x=!0,z(C))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(N){switch(f){case 1:case 2:case 3:var _=3;break;default:_=f}var I=f;f=_;try{return N()}finally{f=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,_){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var I=f;f=N;try{return _()}finally{f=I}},e.unstable_scheduleCallback=function(N,_,I){var B=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?B+I:B):I=B,N){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=I+ne,N={id:d++,callback:_,priorityLevel:N,startTime:I,expirationTime:ne,sortIndex:-1},I>B?(N.sortIndex=I,t(c,N),n(l)===null&&N===n(c)&&(v?(g(k),k=-1):v=!0,Q(b,I-B))):(N.sortIndex=ne,t(l,N),x||y||(x=!0,z(C))),N},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(N){var _=f;return function(){var I=f;f=_;try{return N.apply(this,arguments)}finally{f=I}}}})(Km);Gm.exports=Km;var Ww=Gm.exports;/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.min.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var Hw=p,dt=Ww;function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);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."}var Ym=new Set,Xs={};function br(e,t){Jr(e,t),Jr(e+"Capture",t)}function Jr(e,t){for(Xs[e]=t,e=0;e<t.length;e++)Ym.add(t[e])}var sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),du=Object.prototype.hasOwnProperty,Gw=/^[: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]*$/,Tf={},jf={};function Kw(e){return du.call(jf,e)?!0:du.call(Tf,e)?!1:Gw.test(e)?jf[e]=!0:(Tf[e]=!0,!1)}function Yw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Xw(e,t,n,r){if(t===null||typeof t>"u"||Yw(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function qe(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Fe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Fe[e]=new qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Fe[t]=new qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Fe[e]=new qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Fe[e]=new qe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Fe[e]=new qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Fe[e]=new qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Fe[e]=new qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Fe[e]=new qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Fe[e]=new qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var Fc=/[\-:]([a-z])/g;function zc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Fc,zc);Fe[t]=new qe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Fc,zc);Fe[t]=new qe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Fc,zc);Fe[t]=new qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Fe[e]=new qe(e,1,!1,e.toLowerCase(),null,!1,!1)});Fe.xlinkHref=new qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Fe[e]=new qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function Bc(e,t,n,r){var s=Fe.hasOwnProperty(t)?Fe[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Xw(t,n,s,r)&&(n=null),r||s===null?Kw(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var un=Hw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Vo=Symbol.for("react.element"),Rr=Symbol.for("react.portal"),Mr=Symbol.for("react.fragment"),$c=Symbol.for("react.strict_mode"),fu=Symbol.for("react.profiler"),Xm=Symbol.for("react.provider"),Qm=Symbol.for("react.context"),Uc=Symbol.for("react.forward_ref"),hu=Symbol.for("react.suspense"),pu=Symbol.for("react.suspense_list"),Wc=Symbol.for("react.memo"),bn=Symbol.for("react.lazy"),Zm=Symbol.for("react.offscreen"),Nf=Symbol.iterator;function vs(e){return e===null||typeof e!="object"?null:(e=Nf&&e[Nf]||e["@@iterator"],typeof e=="function"?e:null)}var we=Object.assign,dl;function Rs(e){if(dl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);dl=t&&t[1]||""}return`
|
|
35
|
+
`+dl+e}var fl=!1;function hl(e,t){if(!e||fl)return"";fl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
|
|
36
|
+
`),o=r.stack.split(`
|
|
37
|
+
`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=`
|
|
38
|
+
`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{fl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Rs(e):""}function Qw(e){switch(e.tag){case 5:return Rs(e.type);case 16:return Rs("Lazy");case 13:return Rs("Suspense");case 19:return Rs("SuspenseList");case 0:case 2:case 15:return e=hl(e.type,!1),e;case 11:return e=hl(e.type.render,!1),e;case 1:return e=hl(e.type,!0),e;default:return""}}function mu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Mr:return"Fragment";case Rr:return"Portal";case fu:return"Profiler";case $c:return"StrictMode";case hu:return"Suspense";case pu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qm:return(e.displayName||"Context")+".Consumer";case Xm:return(e._context.displayName||"Context")+".Provider";case Uc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Wc:return t=e.displayName||null,t!==null?t:mu(e.type)||"Memo";case bn:t=e._payload,e=e._init;try{return mu(e(t))}catch{}}return null}function Zw(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return mu(t);case 8:return t===$c?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function zn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function qm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qw(e){var t=qm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fo(e){e._valueTracker||(e._valueTracker=qw(e))}function Jm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function _i(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function gu(e,t){var n=t.checked;return we({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Rf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=zn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function eg(e,t){t=t.checked,t!=null&&Bc(e,"checked",t,!1)}function yu(e,t){eg(e,t);var n=zn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vu(e,t.type,n):t.hasOwnProperty("defaultValue")&&vu(e,t.type,zn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Mf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function vu(e,t,n){(t!=="number"||_i(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ms=Array.isArray;function Hr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+zn(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function xu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return we({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Df(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(D(92));if(Ms(n)){if(1<n.length)throw Error(D(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:zn(n)}}function tg(e,t){var n=zn(t.value),r=zn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Af(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function ng(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function wu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ng(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var zo,rg=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(zo=zo||document.createElement("div"),zo.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=zo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Qs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Os={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Jw=["Webkit","ms","Moz","O"];Object.keys(Os).forEach(function(e){Jw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Os[t]=Os[e]})});function sg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Os.hasOwnProperty(e)&&Os[e]?(""+t).trim():t+"px"}function og(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=sg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var e1=we({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Su(e,t){if(t){if(e1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function bu(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Eu=null;function Hc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ku=null,Gr=null,Kr=null;function Lf(e){if(e=Co(e)){if(typeof ku!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Pa(t),ku(e.stateNode,e.type,t))}}function ig(e){Gr?Kr?Kr.push(e):Kr=[e]:Gr=e}function ag(){if(Gr){var e=Gr,t=Kr;if(Kr=Gr=null,Lf(e),t)for(e=0;e<t.length;e++)Lf(t[e])}}function lg(e,t){return e(t)}function ug(){}var pl=!1;function cg(e,t,n){if(pl)return e(t,n);pl=!0;try{return lg(e,t,n)}finally{pl=!1,(Gr!==null||Kr!==null)&&(ug(),ag())}}function Zs(e,t){var n=e.stateNode;if(n===null)return null;var r=Pa(n);if(r===null)return null;n=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(n&&typeof n!="function")throw Error(D(231,t,typeof n));return n}var Cu=!1;if(sn)try{var xs={};Object.defineProperty(xs,"passive",{get:function(){Cu=!0}}),window.addEventListener("test",xs,xs),window.removeEventListener("test",xs,xs)}catch{Cu=!1}function t1(e,t,n,r,s,o,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Is=!1,Oi=null,Ii=!1,Pu=null,n1={onError:function(e){Is=!0,Oi=e}};function r1(e,t,n,r,s,o,i,a,l){Is=!1,Oi=null,t1.apply(n1,arguments)}function s1(e,t,n,r,s,o,i,a,l){if(r1.apply(this,arguments),Is){if(Is){var c=Oi;Is=!1,Oi=null}else throw Error(D(198));Ii||(Ii=!0,Pu=c)}}function Er(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function dg(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 _f(e){if(Er(e)!==e)throw Error(D(188))}function o1(e){var t=e.alternate;if(!t){if(t=Er(e),t===null)throw Error(D(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var o=s.alternate;if(o===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===n)return _f(s),e;if(o===r)return _f(s),t;o=o.sibling}throw Error(D(188))}if(n.return!==r.return)n=s,r=o;else{for(var i=!1,a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i)throw Error(D(189))}}if(n.alternate!==r)throw Error(D(190))}if(n.tag!==3)throw Error(D(188));return n.stateNode.current===n?e:t}function fg(e){return e=o1(e),e!==null?hg(e):null}function hg(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=hg(e);if(t!==null)return t;e=e.sibling}return null}var pg=dt.unstable_scheduleCallback,Of=dt.unstable_cancelCallback,i1=dt.unstable_shouldYield,a1=dt.unstable_requestPaint,Ee=dt.unstable_now,l1=dt.unstable_getCurrentPriorityLevel,Gc=dt.unstable_ImmediatePriority,mg=dt.unstable_UserBlockingPriority,Vi=dt.unstable_NormalPriority,u1=dt.unstable_LowPriority,gg=dt.unstable_IdlePriority,ba=null,Ht=null;function c1(e){if(Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(ba,e,void 0,(e.current.flags&128)===128)}catch{}}var Dt=Math.clz32?Math.clz32:h1,d1=Math.log,f1=Math.LN2;function h1(e){return e>>>=0,e===0?32:31-(d1(e)/f1|0)|0}var Bo=64,$o=4194304;function Ds(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Fi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~s;a!==0?r=Ds(a):(o&=i,o!==0&&(r=Ds(o)))}else i=n&~s,i!==0?r=Ds(i):o!==0&&(r=Ds(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Dt(t),s=1<<n,r|=e[n],t&=~s;return r}function p1(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function m1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Dt(o),a=1<<i,l=s[i];l===-1?(!(a&n)||a&r)&&(s[i]=p1(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function Tu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yg(){var e=Bo;return Bo<<=1,!(Bo&4194240)&&(Bo=64),e}function ml(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Eo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Dt(t),e[t]=n}function g1(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Dt(n),o=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~o}}function Kc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Dt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var se=0;function vg(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var xg,Yc,wg,Sg,bg,ju=!1,Uo=[],Mn=null,Dn=null,An=null,qs=new Map,Js=new Map,kn=[],y1="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 submit".split(" ");function If(e,t){switch(e){case"focusin":case"focusout":Mn=null;break;case"dragenter":case"dragleave":Dn=null;break;case"mouseover":case"mouseout":An=null;break;case"pointerover":case"pointerout":qs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Js.delete(t.pointerId)}}function ws(e,t,n,r,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[s]},t!==null&&(t=Co(t),t!==null&&Yc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function v1(e,t,n,r,s){switch(t){case"focusin":return Mn=ws(Mn,e,t,n,r,s),!0;case"dragenter":return Dn=ws(Dn,e,t,n,r,s),!0;case"mouseover":return An=ws(An,e,t,n,r,s),!0;case"pointerover":var o=s.pointerId;return qs.set(o,ws(qs.get(o)||null,e,t,n,r,s)),!0;case"gotpointercapture":return o=s.pointerId,Js.set(o,ws(Js.get(o)||null,e,t,n,r,s)),!0}return!1}function Eg(e){var t=sr(e.target);if(t!==null){var n=Er(t);if(n!==null){if(t=n.tag,t===13){if(t=dg(n),t!==null){e.blockedOn=t,bg(e.priority,function(){wg(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Nu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Eu=r,n.target.dispatchEvent(r),Eu=null}else return t=Co(n),t!==null&&Yc(t),e.blockedOn=n,!1;t.shift()}return!0}function Vf(e,t,n){mi(e)&&n.delete(t)}function x1(){ju=!1,Mn!==null&&mi(Mn)&&(Mn=null),Dn!==null&&mi(Dn)&&(Dn=null),An!==null&&mi(An)&&(An=null),qs.forEach(Vf),Js.forEach(Vf)}function Ss(e,t){e.blockedOn===t&&(e.blockedOn=null,ju||(ju=!0,dt.unstable_scheduleCallback(dt.unstable_NormalPriority,x1)))}function eo(e){function t(s){return Ss(s,e)}if(0<Uo.length){Ss(Uo[0],e);for(var n=1;n<Uo.length;n++){var r=Uo[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Mn!==null&&Ss(Mn,e),Dn!==null&&Ss(Dn,e),An!==null&&Ss(An,e),qs.forEach(t),Js.forEach(t),n=0;n<kn.length;n++)r=kn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<kn.length&&(n=kn[0],n.blockedOn===null);)Eg(n),n.blockedOn===null&&kn.shift()}var Yr=un.ReactCurrentBatchConfig,zi=!0;function w1(e,t,n,r){var s=se,o=Yr.transition;Yr.transition=null;try{se=1,Xc(e,t,n,r)}finally{se=s,Yr.transition=o}}function S1(e,t,n,r){var s=se,o=Yr.transition;Yr.transition=null;try{se=4,Xc(e,t,n,r)}finally{se=s,Yr.transition=o}}function Xc(e,t,n,r){if(zi){var s=Nu(e,t,n,r);if(s===null)Cl(e,t,r,Bi,n),If(e,r);else if(v1(s,e,t,n,r))r.stopPropagation();else if(If(e,r),t&4&&-1<y1.indexOf(e)){for(;s!==null;){var o=Co(s);if(o!==null&&xg(o),o=Nu(e,t,n,r),o===null&&Cl(e,t,r,Bi,n),o===s)break;s=o}s!==null&&r.stopPropagation()}else Cl(e,t,r,null,n)}}var Bi=null;function Nu(e,t,n,r){if(Bi=null,e=Hc(r),e=sr(e),e!==null)if(t=Er(e),t===null)e=null;else if(n=t.tag,n===13){if(e=dg(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Bi=e,null}function kg(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(l1()){case Gc:return 1;case mg:return 4;case Vi:case u1:return 16;case gg:return 536870912;default:return 16}default:return 16}}var Pn=null,Qc=null,gi=null;function Cg(){if(gi)return gi;var e,t=Qc,n=t.length,r,s="value"in Pn?Pn.value:Pn.textContent,o=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[o-r];r++);return gi=s.slice(e,1<r?1-r:void 0)}function yi(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 Wo(){return!0}function Ff(){return!1}function ht(e){function t(n,r,s,o,i){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Wo:Ff,this.isPropagationStopped=Ff,this}return we(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Wo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Wo)},persist:function(){},isPersistent:Wo}),t}var us={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zc=ht(us),ko=we({},us,{view:0,detail:0}),b1=ht(ko),gl,yl,bs,Ea=we({},ko,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qc,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!==bs&&(bs&&e.type==="mousemove"?(gl=e.screenX-bs.screenX,yl=e.screenY-bs.screenY):yl=gl=0,bs=e),gl)},movementY:function(e){return"movementY"in e?e.movementY:yl}}),zf=ht(Ea),E1=we({},Ea,{dataTransfer:0}),k1=ht(E1),C1=we({},ko,{relatedTarget:0}),vl=ht(C1),P1=we({},us,{animationName:0,elapsedTime:0,pseudoElement:0}),T1=ht(P1),j1=we({},us,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),N1=ht(j1),R1=we({},us,{data:0}),Bf=ht(R1),M1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},D1={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"},A1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=A1[e])?!!t[e]:!1}function qc(){return L1}var _1=we({},ko,{key:function(e){if(e.key){var t=M1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=yi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?D1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qc,charCode:function(e){return e.type==="keypress"?yi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),O1=ht(_1),I1=we({},Ea,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$f=ht(I1),V1=we({},ko,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qc}),F1=ht(V1),z1=we({},us,{propertyName:0,elapsedTime:0,pseudoElement:0}),B1=ht(z1),$1=we({},Ea,{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}),U1=ht($1),W1=[9,13,27,32],Jc=sn&&"CompositionEvent"in window,Vs=null;sn&&"documentMode"in document&&(Vs=document.documentMode);var H1=sn&&"TextEvent"in window&&!Vs,Pg=sn&&(!Jc||Vs&&8<Vs&&11>=Vs),Uf=" ",Wf=!1;function Tg(e,t){switch(e){case"keyup":return W1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dr=!1;function G1(e,t){switch(e){case"compositionend":return jg(t);case"keypress":return t.which!==32?null:(Wf=!0,Uf);case"textInput":return e=t.data,e===Uf&&Wf?null:e;default:return null}}function K1(e,t){if(Dr)return e==="compositionend"||!Jc&&Tg(e,t)?(e=Cg(),gi=Qc=Pn=null,Dr=!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 Pg&&t.locale!=="ko"?null:t.data;default:return null}}var Y1={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 Hf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Y1[e.type]:t==="textarea"}function Ng(e,t,n,r){ig(r),t=$i(t,"onChange"),0<t.length&&(n=new Zc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Fs=null,to=null;function X1(e){zg(e,0)}function ka(e){var t=_r(e);if(Jm(t))return e}function Q1(e,t){if(e==="change")return t}var Rg=!1;if(sn){var xl;if(sn){var wl="oninput"in document;if(!wl){var Gf=document.createElement("div");Gf.setAttribute("oninput","return;"),wl=typeof Gf.oninput=="function"}xl=wl}else xl=!1;Rg=xl&&(!document.documentMode||9<document.documentMode)}function Kf(){Fs&&(Fs.detachEvent("onpropertychange",Mg),to=Fs=null)}function Mg(e){if(e.propertyName==="value"&&ka(to)){var t=[];Ng(t,to,e,Hc(e)),cg(X1,t)}}function Z1(e,t,n){e==="focusin"?(Kf(),Fs=t,to=n,Fs.attachEvent("onpropertychange",Mg)):e==="focusout"&&Kf()}function q1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ka(to)}function J1(e,t){if(e==="click")return ka(t)}function eS(e,t){if(e==="input"||e==="change")return ka(t)}function tS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _t=typeof Object.is=="function"?Object.is:tS;function no(e,t){if(_t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!du.call(t,s)||!_t(e[s],t[s]))return!1}return!0}function Yf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xf(e,t){var n=Yf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yf(n)}}function Dg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ag(){for(var e=window,t=_i();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=_i(e.document)}return t}function ed(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")}function nS(e){var t=Ag(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Dg(n.ownerDocument.documentElement,n)){if(r!==null&&ed(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,o=Math.min(r.start,s);r=r.end===void 0?o:Math.min(r.end,s),!e.extend&&o>r&&(s=r,r=o,o=s),s=Xf(n,o);var i=Xf(n,r);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var rS=sn&&"documentMode"in document&&11>=document.documentMode,Ar=null,Ru=null,zs=null,Mu=!1;function Qf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mu||Ar==null||Ar!==_i(r)||(r=Ar,"selectionStart"in r&&ed(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}),zs&&no(zs,r)||(zs=r,r=$i(Ru,"onSelect"),0<r.length&&(t=new Zc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ar)))}function Ho(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Lr={animationend:Ho("Animation","AnimationEnd"),animationiteration:Ho("Animation","AnimationIteration"),animationstart:Ho("Animation","AnimationStart"),transitionend:Ho("Transition","TransitionEnd")},Sl={},Lg={};sn&&(Lg=document.createElement("div").style,"AnimationEvent"in window||(delete Lr.animationend.animation,delete Lr.animationiteration.animation,delete Lr.animationstart.animation),"TransitionEvent"in window||delete Lr.transitionend.transition);function Ca(e){if(Sl[e])return Sl[e];if(!Lr[e])return e;var t=Lr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lg)return Sl[e]=t[n];return e}var _g=Ca("animationend"),Og=Ca("animationiteration"),Ig=Ca("animationstart"),Vg=Ca("transitionend"),Fg=new Map,Zf="abort auxClick 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(" ");function Wn(e,t){Fg.set(e,t),br(t,[e])}for(var bl=0;bl<Zf.length;bl++){var El=Zf[bl],sS=El.toLowerCase(),oS=El[0].toUpperCase()+El.slice(1);Wn(sS,"on"+oS)}Wn(_g,"onAnimationEnd");Wn(Og,"onAnimationIteration");Wn(Ig,"onAnimationStart");Wn("dblclick","onDoubleClick");Wn("focusin","onFocus");Wn("focusout","onBlur");Wn(Vg,"onTransitionEnd");Jr("onMouseEnter",["mouseout","mouseover"]);Jr("onMouseLeave",["mouseout","mouseover"]);Jr("onPointerEnter",["pointerout","pointerover"]);Jr("onPointerLeave",["pointerout","pointerover"]);br("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));br("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));br("onBeforeInput",["compositionend","keypress","textInput","paste"]);br("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));br("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));br("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var As="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),iS=new Set("cancel close invalid load scroll toggle".split(" ").concat(As));function qf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,s1(r,t,void 0,e),e.currentTarget=null}function zg(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;qf(s,a,c),o=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;qf(s,a,c),o=l}}}if(Ii)throw e=Pu,Ii=!1,Pu=null,e}function fe(e,t){var n=t[Ou];n===void 0&&(n=t[Ou]=new Set);var r=e+"__bubble";n.has(r)||(Bg(t,e,2,!1),n.add(r))}function kl(e,t,n){var r=0;t&&(r|=4),Bg(n,e,r,t)}var Go="_reactListening"+Math.random().toString(36).slice(2);function ro(e){if(!e[Go]){e[Go]=!0,Ym.forEach(function(n){n!=="selectionchange"&&(iS.has(n)||kl(n,!1,e),kl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Go]||(t[Go]=!0,kl("selectionchange",!1,t))}}function Bg(e,t,n,r){switch(kg(t)){case 1:var s=w1;break;case 4:s=S1;break;default:s=Xc}n=s.bind(null,t,n,e),s=void 0,!Cu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Cl(e,t,n,r,s){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=sr(a),i===null)return;if(l=i.tag,l===5||l===6){r=o=i;continue e}a=a.parentNode}}r=r.return}cg(function(){var c=o,d=Hc(n),u=[];e:{var f=Fg.get(e);if(f!==void 0){var y=Zc,x=e;switch(e){case"keypress":if(yi(n)===0)break e;case"keydown":case"keyup":y=O1;break;case"focusin":x="focus",y=vl;break;case"focusout":x="blur",y=vl;break;case"beforeblur":case"afterblur":y=vl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=zf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=k1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=F1;break;case _g:case Og:case Ig:y=T1;break;case Vg:y=B1;break;case"scroll":y=b1;break;case"wheel":y=U1;break;case"copy":case"cut":case"paste":y=N1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=$f}var v=(t&4)!==0,S=!v&&e==="scroll",g=v?f!==null?f+"Capture":null:f;v=[];for(var m=c,w;m!==null;){w=m;var b=w.stateNode;if(w.tag===5&&b!==null&&(w=b,g!==null&&(b=Zs(m,g),b!=null&&v.push(so(m,b,w)))),S)break;m=m.return}0<v.length&&(f=new y(f,x,null,n,d),u.push({event:f,listeners:v}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",f&&n!==Eu&&(x=n.relatedTarget||n.fromElement)&&(sr(x)||x[on]))break e;if((y||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,y?(x=n.relatedTarget||n.toElement,y=c,x=x?sr(x):null,x!==null&&(S=Er(x),x!==S||x.tag!==5&&x.tag!==6)&&(x=null)):(y=null,x=c),y!==x)){if(v=zf,b="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(v=$f,b="onPointerLeave",g="onPointerEnter",m="pointer"),S=y==null?f:_r(y),w=x==null?f:_r(x),f=new v(b,m+"leave",y,n,d),f.target=S,f.relatedTarget=w,b=null,sr(d)===c&&(v=new v(g,m+"enter",x,n,d),v.target=w,v.relatedTarget=S,b=v),S=b,y&&x)t:{for(v=y,g=x,m=0,w=v;w;w=Cr(w))m++;for(w=0,b=g;b;b=Cr(b))w++;for(;0<m-w;)v=Cr(v),m--;for(;0<w-m;)g=Cr(g),w--;for(;m--;){if(v===g||g!==null&&v===g.alternate)break t;v=Cr(v),g=Cr(g)}v=null}else v=null;y!==null&&Jf(u,f,y,v,!1),x!==null&&S!==null&&Jf(u,S,x,v,!0)}}e:{if(f=c?_r(c):window,y=f.nodeName&&f.nodeName.toLowerCase(),y==="select"||y==="input"&&f.type==="file")var C=Q1;else if(Hf(f))if(Rg)C=eS;else{C=q1;var P=Z1}else(y=f.nodeName)&&y.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=J1);if(C&&(C=C(e,c))){Ng(u,C,n,d);break e}P&&P(e,f,c),e==="focusout"&&(P=f._wrapperState)&&P.controlled&&f.type==="number"&&vu(f,"number",f.value)}switch(P=c?_r(c):window,e){case"focusin":(Hf(P)||P.contentEditable==="true")&&(Ar=P,Ru=c,zs=null);break;case"focusout":zs=Ru=Ar=null;break;case"mousedown":Mu=!0;break;case"contextmenu":case"mouseup":case"dragend":Mu=!1,Qf(u,n,d);break;case"selectionchange":if(rS)break;case"keydown":case"keyup":Qf(u,n,d)}var E;if(Jc)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Dr?Tg(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(Pg&&n.locale!=="ko"&&(Dr||k!=="onCompositionStart"?k==="onCompositionEnd"&&Dr&&(E=Cg()):(Pn=d,Qc="value"in Pn?Pn.value:Pn.textContent,Dr=!0)),P=$i(c,k),0<P.length&&(k=new Bf(k,e,null,n,d),u.push({event:k,listeners:P}),E?k.data=E:(E=jg(n),E!==null&&(k.data=E)))),(E=H1?G1(e,n):K1(e,n))&&(c=$i(c,"onBeforeInput"),0<c.length&&(d=new Bf("onBeforeInput","beforeinput",null,n,d),u.push({event:d,listeners:c}),d.data=E))}zg(u,t)})}function so(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $i(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Zs(e,n),o!=null&&r.unshift(so(e,o,s)),o=Zs(e,t),o!=null&&r.push(so(e,o,s))),e=e.return}return r}function Cr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Jf(e,t,n,r,s){for(var o=t._reactName,i=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=Zs(n,o),l!=null&&i.unshift(so(n,l,a))):s||(l=Zs(n,o),l!=null&&i.push(so(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var aS=/\r\n?/g,lS=/\u0000|\uFFFD/g;function eh(e){return(typeof e=="string"?e:""+e).replace(aS,`
|
|
39
|
+
`).replace(lS,"")}function Ko(e,t,n){if(t=eh(t),eh(e)!==t&&n)throw Error(D(425))}function Ui(){}var Du=null,Au=null;function Lu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _u=typeof setTimeout=="function"?setTimeout:void 0,uS=typeof clearTimeout=="function"?clearTimeout:void 0,th=typeof Promise=="function"?Promise:void 0,cS=typeof queueMicrotask=="function"?queueMicrotask:typeof th<"u"?function(e){return th.resolve(null).then(e).catch(dS)}:_u;function dS(e){setTimeout(function(){throw e})}function Pl(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),eo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);eo(t)}function Ln(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==="$?")break;if(t==="/$")return null}}return e}function nh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var cs=Math.random().toString(36).slice(2),Ut="__reactFiber$"+cs,oo="__reactProps$"+cs,on="__reactContainer$"+cs,Ou="__reactEvents$"+cs,fS="__reactListeners$"+cs,hS="__reactHandles$"+cs;function sr(e){var t=e[Ut];if(t)return t;for(var n=e.parentNode;n;){if(t=n[on]||n[Ut]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=nh(e);e!==null;){if(n=e[Ut])return n;e=nh(e)}return t}e=n,n=e.parentNode}return null}function Co(e){return e=e[Ut]||e[on],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function _r(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function Pa(e){return e[oo]||null}var Iu=[],Or=-1;function Hn(e){return{current:e}}function pe(e){0>Or||(e.current=Iu[Or],Iu[Or]=null,Or--)}function ue(e,t){Or++,Iu[Or]=e.current,e.current=t}var Bn={},He=Hn(Bn),rt=Hn(!1),mr=Bn;function es(e,t){var n=e.type.contextTypes;if(!n)return Bn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function st(e){return e=e.childContextTypes,e!=null}function Wi(){pe(rt),pe(He)}function rh(e,t,n){if(He.current!==Bn)throw Error(D(168));ue(He,t),ue(rt,n)}function $g(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(D(108,Zw(e)||"Unknown",s));return we({},n,r)}function Hi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Bn,mr=He.current,ue(He,e),ue(rt,rt.current),!0}function sh(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=$g(e,t,mr),r.__reactInternalMemoizedMergedChildContext=e,pe(rt),pe(He),ue(He,e)):pe(rt),ue(rt,n)}var en=null,Ta=!1,Tl=!1;function Ug(e){en===null?en=[e]:en.push(e)}function pS(e){Ta=!0,Ug(e)}function Gn(){if(!Tl&&en!==null){Tl=!0;var e=0,t=se;try{var n=en;for(se=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}en=null,Ta=!1}catch(s){throw en!==null&&(en=en.slice(e+1)),pg(Gc,Gn),s}finally{se=t,Tl=!1}}return null}var Ir=[],Vr=0,Gi=null,Ki=0,mt=[],gt=0,gr=null,tn=1,nn="";function er(e,t){Ir[Vr++]=Ki,Ir[Vr++]=Gi,Gi=e,Ki=t}function Wg(e,t,n){mt[gt++]=tn,mt[gt++]=nn,mt[gt++]=gr,gr=e;var r=tn;e=nn;var s=32-Dt(r)-1;r&=~(1<<s),n+=1;var o=32-Dt(t)+s;if(30<o){var i=s-s%5;o=(r&(1<<i)-1).toString(32),r>>=i,s-=i,tn=1<<32-Dt(t)+s|n<<s|r,nn=o+e}else tn=1<<o|n<<s|r,nn=e}function td(e){e.return!==null&&(er(e,1),Wg(e,1,0))}function nd(e){for(;e===Gi;)Gi=Ir[--Vr],Ir[Vr]=null,Ki=Ir[--Vr],Ir[Vr]=null;for(;e===gr;)gr=mt[--gt],mt[gt]=null,nn=mt[--gt],mt[gt]=null,tn=mt[--gt],mt[gt]=null}var ut=null,lt=null,ge=!1,Mt=null;function Hg(e,t){var n=yt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function oh(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ut=e,lt=Ln(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ut=e,lt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=gr!==null?{id:tn,overflow:nn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=yt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ut=e,lt=null,!0):!1;default:return!1}}function Vu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Fu(e){if(ge){var t=lt;if(t){var n=t;if(!oh(e,t)){if(Vu(e))throw Error(D(418));t=Ln(n.nextSibling);var r=ut;t&&oh(e,t)?Hg(r,n):(e.flags=e.flags&-4097|2,ge=!1,ut=e)}}else{if(Vu(e))throw Error(D(418));e.flags=e.flags&-4097|2,ge=!1,ut=e}}}function ih(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ut=e}function Yo(e){if(e!==ut)return!1;if(!ge)return ih(e),ge=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Lu(e.type,e.memoizedProps)),t&&(t=lt)){if(Vu(e))throw Gg(),Error(D(418));for(;t;)Hg(e,t),t=Ln(t.nextSibling)}if(ih(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){lt=Ln(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}lt=null}}else lt=ut?Ln(e.stateNode.nextSibling):null;return!0}function Gg(){for(var e=lt;e;)e=Ln(e.nextSibling)}function ts(){lt=ut=null,ge=!1}function rd(e){Mt===null?Mt=[e]:Mt.push(e)}var mS=un.ReactCurrentBatchConfig;function Es(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(D(309));var r=n.stateNode}if(!r)throw Error(D(147,e));var s=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(D(284));if(!n._owner)throw Error(D(290,e))}return e}function Xo(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ah(e){var t=e._init;return t(e._payload)}function Kg(e){function t(g,m){if(e){var w=g.deletions;w===null?(g.deletions=[m],g.flags|=16):w.push(m)}}function n(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function r(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function s(g,m){return g=Vn(g,m),g.index=0,g.sibling=null,g}function o(g,m,w){return g.index=w,e?(w=g.alternate,w!==null?(w=w.index,w<m?(g.flags|=2,m):w):(g.flags|=2,m)):(g.flags|=1048576,m)}function i(g){return e&&g.alternate===null&&(g.flags|=2),g}function a(g,m,w,b){return m===null||m.tag!==6?(m=Ll(w,g.mode,b),m.return=g,m):(m=s(m,w),m.return=g,m)}function l(g,m,w,b){var C=w.type;return C===Mr?d(g,m,w.props.children,b,w.key):m!==null&&(m.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===bn&&ah(C)===m.type)?(b=s(m,w.props),b.ref=Es(g,m,w),b.return=g,b):(b=ki(w.type,w.key,w.props,null,g.mode,b),b.ref=Es(g,m,w),b.return=g,b)}function c(g,m,w,b){return m===null||m.tag!==4||m.stateNode.containerInfo!==w.containerInfo||m.stateNode.implementation!==w.implementation?(m=_l(w,g.mode,b),m.return=g,m):(m=s(m,w.children||[]),m.return=g,m)}function d(g,m,w,b,C){return m===null||m.tag!==7?(m=cr(w,g.mode,b,C),m.return=g,m):(m=s(m,w),m.return=g,m)}function u(g,m,w){if(typeof m=="string"&&m!==""||typeof m=="number")return m=Ll(""+m,g.mode,w),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Vo:return w=ki(m.type,m.key,m.props,null,g.mode,w),w.ref=Es(g,null,m),w.return=g,w;case Rr:return m=_l(m,g.mode,w),m.return=g,m;case bn:var b=m._init;return u(g,b(m._payload),w)}if(Ms(m)||vs(m))return m=cr(m,g.mode,w,null),m.return=g,m;Xo(g,m)}return null}function f(g,m,w,b){var C=m!==null?m.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return C!==null?null:a(g,m,""+w,b);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Vo:return w.key===C?l(g,m,w,b):null;case Rr:return w.key===C?c(g,m,w,b):null;case bn:return C=w._init,f(g,m,C(w._payload),b)}if(Ms(w)||vs(w))return C!==null?null:d(g,m,w,b,null);Xo(g,w)}return null}function y(g,m,w,b,C){if(typeof b=="string"&&b!==""||typeof b=="number")return g=g.get(w)||null,a(m,g,""+b,C);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Vo:return g=g.get(b.key===null?w:b.key)||null,l(m,g,b,C);case Rr:return g=g.get(b.key===null?w:b.key)||null,c(m,g,b,C);case bn:var P=b._init;return y(g,m,w,P(b._payload),C)}if(Ms(b)||vs(b))return g=g.get(w)||null,d(m,g,b,C,null);Xo(m,b)}return null}function x(g,m,w,b){for(var C=null,P=null,E=m,k=m=0,j=null;E!==null&&k<w.length;k++){E.index>k?(j=E,E=null):j=E.sibling;var T=f(g,E,w[k],b);if(T===null){E===null&&(E=j);break}e&&E&&T.alternate===null&&t(g,E),m=o(T,m,k),P===null?C=T:P.sibling=T,P=T,E=j}if(k===w.length)return n(g,E),ge&&er(g,k),C;if(E===null){for(;k<w.length;k++)E=u(g,w[k],b),E!==null&&(m=o(E,m,k),P===null?C=E:P.sibling=E,P=E);return ge&&er(g,k),C}for(E=r(g,E);k<w.length;k++)j=y(E,g,k,w[k],b),j!==null&&(e&&j.alternate!==null&&E.delete(j.key===null?k:j.key),m=o(j,m,k),P===null?C=j:P.sibling=j,P=j);return e&&E.forEach(function(A){return t(g,A)}),ge&&er(g,k),C}function v(g,m,w,b){var C=vs(w);if(typeof C!="function")throw Error(D(150));if(w=C.call(w),w==null)throw Error(D(151));for(var P=C=null,E=m,k=m=0,j=null,T=w.next();E!==null&&!T.done;k++,T=w.next()){E.index>k?(j=E,E=null):j=E.sibling;var A=f(g,E,T.value,b);if(A===null){E===null&&(E=j);break}e&&E&&A.alternate===null&&t(g,E),m=o(A,m,k),P===null?C=A:P.sibling=A,P=A,E=j}if(T.done)return n(g,E),ge&&er(g,k),C;if(E===null){for(;!T.done;k++,T=w.next())T=u(g,T.value,b),T!==null&&(m=o(T,m,k),P===null?C=T:P.sibling=T,P=T);return ge&&er(g,k),C}for(E=r(g,E);!T.done;k++,T=w.next())T=y(E,g,k,T.value,b),T!==null&&(e&&T.alternate!==null&&E.delete(T.key===null?k:T.key),m=o(T,m,k),P===null?C=T:P.sibling=T,P=T);return e&&E.forEach(function(L){return t(g,L)}),ge&&er(g,k),C}function S(g,m,w,b){if(typeof w=="object"&&w!==null&&w.type===Mr&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Vo:e:{for(var C=w.key,P=m;P!==null;){if(P.key===C){if(C=w.type,C===Mr){if(P.tag===7){n(g,P.sibling),m=s(P,w.props.children),m.return=g,g=m;break e}}else if(P.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===bn&&ah(C)===P.type){n(g,P.sibling),m=s(P,w.props),m.ref=Es(g,P,w),m.return=g,g=m;break e}n(g,P);break}else t(g,P);P=P.sibling}w.type===Mr?(m=cr(w.props.children,g.mode,b,w.key),m.return=g,g=m):(b=ki(w.type,w.key,w.props,null,g.mode,b),b.ref=Es(g,m,w),b.return=g,g=b)}return i(g);case Rr:e:{for(P=w.key;m!==null;){if(m.key===P)if(m.tag===4&&m.stateNode.containerInfo===w.containerInfo&&m.stateNode.implementation===w.implementation){n(g,m.sibling),m=s(m,w.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=_l(w,g.mode,b),m.return=g,g=m}return i(g);case bn:return P=w._init,S(g,m,P(w._payload),b)}if(Ms(w))return x(g,m,w,b);if(vs(w))return v(g,m,w,b);Xo(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,m!==null&&m.tag===6?(n(g,m.sibling),m=s(m,w),m.return=g,g=m):(n(g,m),m=Ll(w,g.mode,b),m.return=g,g=m),i(g)):n(g,m)}return S}var ns=Kg(!0),Yg=Kg(!1),Yi=Hn(null),Xi=null,Fr=null,sd=null;function od(){sd=Fr=Xi=null}function id(e){var t=Yi.current;pe(Yi),e._currentValue=t}function zu(e,t,n){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===n)break;e=e.return}}function Xr(e,t){Xi=e,sd=Fr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(nt=!0),e.firstContext=null)}function St(e){var t=e._currentValue;if(sd!==e)if(e={context:e,memoizedValue:t,next:null},Fr===null){if(Xi===null)throw Error(D(308));Fr=e,Xi.dependencies={lanes:0,firstContext:e}}else Fr=Fr.next=e;return t}var or=null;function ad(e){or===null?or=[e]:or.push(e)}function Xg(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,ad(t)):(n.next=s.next,s.next=n),t.interleaved=n,an(e,r)}function an(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var En=!1;function ld(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function rn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function _n(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,an(e,n)}return s=r.interleaved,s===null?(t.next=t,ad(r)):(t.next=s.next,s.next=t),r.interleaved=t,an(e,n)}function vi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kc(e,n)}}function lh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?s=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?s=o=t:o=o.next=t}else s=o=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Qi(e,t,n,r){var s=e.updateQueue;En=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?o=c:i.next=c,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==i&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(o!==null){var u=s.baseState;i=0,d=c=l=null,a=o;do{var f=a.lane,y=a.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var x=e,v=a;switch(f=t,y=n,v.tag){case 1:if(x=v.payload,typeof x=="function"){u=x.call(y,u,f);break e}u=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=v.payload,f=typeof x=="function"?x.call(y,u,f):x,f==null)break e;u=we({},u,f);break e;case 2:En=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else y={eventTime:y,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=y,l=u):d=d.next=y,i|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(l=u),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);vr|=i,e.lanes=i,e.memoizedState=u}}function uh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(D(191,s));s.call(r)}}}var Po={},Gt=Hn(Po),io=Hn(Po),ao=Hn(Po);function ir(e){if(e===Po)throw Error(D(174));return e}function ud(e,t){switch(ue(ao,t),ue(io,e),ue(Gt,Po),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:wu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=wu(t,e)}pe(Gt),ue(Gt,t)}function rs(){pe(Gt),pe(io),pe(ao)}function Zg(e){ir(ao.current);var t=ir(Gt.current),n=wu(t,e.type);t!==n&&(ue(io,e),ue(Gt,n))}function cd(e){io.current===e&&(pe(Gt),pe(io))}var ve=Hn(0);function Zi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 jl=[];function dd(){for(var e=0;e<jl.length;e++)jl[e]._workInProgressVersionPrimary=null;jl.length=0}var xi=un.ReactCurrentDispatcher,Nl=un.ReactCurrentBatchConfig,yr=0,xe=null,Ne=null,De=null,qi=!1,Bs=!1,lo=0,gS=0;function $e(){throw Error(D(321))}function fd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_t(e[n],t[n]))return!1;return!0}function hd(e,t,n,r,s,o){if(yr=o,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xi.current=e===null||e.memoizedState===null?wS:SS,e=n(r,s),Bs){o=0;do{if(Bs=!1,lo=0,25<=o)throw Error(D(301));o+=1,De=Ne=null,t.updateQueue=null,xi.current=bS,e=n(r,s)}while(Bs)}if(xi.current=Ji,t=Ne!==null&&Ne.next!==null,yr=0,De=Ne=xe=null,qi=!1,t)throw Error(D(300));return e}function pd(){var e=lo!==0;return lo=0,e}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return De===null?xe.memoizedState=De=e:De=De.next=e,De}function bt(){if(Ne===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=De===null?xe.memoizedState:De.next;if(t!==null)De=t,Ne=e;else{if(e===null)throw Error(D(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},De===null?xe.memoizedState=De=e:De=De.next=e}return De}function uo(e,t){return typeof t=="function"?t(e):t}function Rl(e){var t=bt(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=Ne,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){o=s.next,r=r.baseState;var a=i=null,l=null,c=o;do{var d=c.lane;if((yr&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var u={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=u,i=r):l=l.next=u,xe.lanes|=d,vr|=d}c=c.next}while(c!==null&&c!==o);l===null?i=r:l.next=a,_t(r,t.memoizedState)||(nt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do o=s.lane,xe.lanes|=o,vr|=o,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ml(e){var t=bt(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);_t(o,t.memoizedState)||(nt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function qg(){}function Jg(e,t){var n=xe,r=bt(),s=t(),o=!_t(r.memoizedState,s);if(o&&(r.memoizedState=s,nt=!0),r=r.queue,md(ny.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||De!==null&&De.memoizedState.tag&1){if(n.flags|=2048,co(9,ty.bind(null,n,r,s,t),void 0,null),Ae===null)throw Error(D(349));yr&30||ey(n,t,s)}return s}function ey(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ty(e,t,n,r){t.value=n,t.getSnapshot=r,ry(t)&&sy(e)}function ny(e,t,n){return n(function(){ry(t)&&sy(e)})}function ry(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_t(e,n)}catch{return!0}}function sy(e){var t=an(e,1);t!==null&&At(t,e,1,-1)}function ch(e){var t=zt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:uo,lastRenderedState:e},t.queue=e,e=e.dispatch=xS.bind(null,xe,e),[t.memoizedState,e]}function co(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function oy(){return bt().memoizedState}function wi(e,t,n,r){var s=zt();xe.flags|=e,s.memoizedState=co(1|t,n,void 0,r===void 0?null:r)}function ja(e,t,n,r){var s=bt();r=r===void 0?null:r;var o=void 0;if(Ne!==null){var i=Ne.memoizedState;if(o=i.destroy,r!==null&&fd(r,i.deps)){s.memoizedState=co(t,n,o,r);return}}xe.flags|=e,s.memoizedState=co(1|t,n,o,r)}function dh(e,t){return wi(8390656,8,e,t)}function md(e,t){return ja(2048,8,e,t)}function iy(e,t){return ja(4,2,e,t)}function ay(e,t){return ja(4,4,e,t)}function ly(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function uy(e,t,n){return n=n!=null?n.concat([e]):null,ja(4,4,ly.bind(null,t,e),n)}function gd(){}function cy(e,t){var n=bt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&fd(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function dy(e,t){var n=bt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&fd(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fy(e,t,n){return yr&21?(_t(n,t)||(n=yg(),xe.lanes|=n,vr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,nt=!0),e.memoizedState=n)}function yS(e,t){var n=se;se=n!==0&&4>n?n:4,e(!0);var r=Nl.transition;Nl.transition={};try{e(!1),t()}finally{se=n,Nl.transition=r}}function hy(){return bt().memoizedState}function vS(e,t,n){var r=In(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},py(e))my(t,n);else if(n=Xg(e,t,n,r),n!==null){var s=Qe();At(n,e,r,s),gy(n,t,r)}}function xS(e,t,n){var r=In(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(py(e))my(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(s.hasEagerState=!0,s.eagerState=a,_t(a,i)){var l=t.interleaved;l===null?(s.next=s,ad(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Xg(e,t,s,r),n!==null&&(s=Qe(),At(n,e,r,s),gy(n,t,r))}}function py(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function my(e,t){Bs=qi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kc(e,n)}}var Ji={readContext:St,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useInsertionEffect:$e,useLayoutEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useMutableSource:$e,useSyncExternalStore:$e,useId:$e,unstable_isNewReconciler:!1},wS={readContext:St,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:dh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,wi(4194308,4,ly.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wi(4194308,4,e,t)},useInsertionEffect:function(e,t){return wi(4,2,e,t)},useMemo:function(e,t){var n=zt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=zt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=vS.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:ch,useDebugValue:gd,useDeferredValue:function(e){return zt().memoizedState=e},useTransition:function(){var e=ch(!1),t=e[0];return e=yS.bind(null,e[1]),zt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xe,s=zt();if(ge){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),Ae===null)throw Error(D(349));yr&30||ey(r,t,n)}s.memoizedState=n;var o={value:n,getSnapshot:t};return s.queue=o,dh(ny.bind(null,r,o,e),[e]),r.flags|=2048,co(9,ty.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=zt(),t=Ae.identifierPrefix;if(ge){var n=nn,r=tn;n=(r&~(1<<32-Dt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=lo++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=gS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},SS={readContext:St,useCallback:cy,useContext:St,useEffect:md,useImperativeHandle:uy,useInsertionEffect:iy,useLayoutEffect:ay,useMemo:dy,useReducer:Rl,useRef:oy,useState:function(){return Rl(uo)},useDebugValue:gd,useDeferredValue:function(e){var t=bt();return fy(t,Ne.memoizedState,e)},useTransition:function(){var e=Rl(uo)[0],t=bt().memoizedState;return[e,t]},useMutableSource:qg,useSyncExternalStore:Jg,useId:hy,unstable_isNewReconciler:!1},bS={readContext:St,useCallback:cy,useContext:St,useEffect:md,useImperativeHandle:uy,useInsertionEffect:iy,useLayoutEffect:ay,useMemo:dy,useReducer:Ml,useRef:oy,useState:function(){return Ml(uo)},useDebugValue:gd,useDeferredValue:function(e){var t=bt();return Ne===null?t.memoizedState=e:fy(t,Ne.memoizedState,e)},useTransition:function(){var e=Ml(uo)[0],t=bt().memoizedState;return[e,t]},useMutableSource:qg,useSyncExternalStore:Jg,useId:hy,unstable_isNewReconciler:!1};function Nt(e,t){if(e&&e.defaultProps){t=we({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Bu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:we({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Na={isMounted:function(e){return(e=e._reactInternals)?Er(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Qe(),s=In(e),o=rn(r,s);o.payload=t,n!=null&&(o.callback=n),t=_n(e,o,s),t!==null&&(At(t,e,s,r),vi(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Qe(),s=In(e),o=rn(r,s);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=_n(e,o,s),t!==null&&(At(t,e,s,r),vi(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Qe(),r=In(e),s=rn(n,r);s.tag=2,t!=null&&(s.callback=t),t=_n(e,s,r),t!==null&&(At(t,e,r,n),vi(t,e,r))}};function fh(e,t,n,r,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,i):t.prototype&&t.prototype.isPureReactComponent?!no(n,r)||!no(s,o):!0}function yy(e,t,n){var r=!1,s=Bn,o=t.contextType;return typeof o=="object"&&o!==null?o=St(o):(s=st(t)?mr:He.current,r=t.contextTypes,o=(r=r!=null)?es(e,s):Bn),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Na,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function hh(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Na.enqueueReplaceState(t,t.state,null)}function $u(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},ld(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=St(o):(o=st(t)?mr:He.current,s.context=es(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Bu(e,t,o,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Na.enqueueReplaceState(s,s.state,null),Qi(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function ss(e,t){try{var n="",r=t;do n+=Qw(r),r=r.return;while(r);var s=n}catch(o){s=`
|
|
40
|
+
Error generating stack: `+o.message+`
|
|
41
|
+
`+o.stack}return{value:e,source:t,stack:s,digest:null}}function Dl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Uu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var ES=typeof WeakMap=="function"?WeakMap:Map;function vy(e,t,n){n=rn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ta||(ta=!0,Ju=r),Uu(e,t)},n}function xy(e,t,n){n=rn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Uu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Uu(e,t),typeof r!="function"&&(On===null?On=new Set([this]):On.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function ph(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ES;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=IS.bind(null,e,t,n),t.then(e,e))}function mh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function gh(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=rn(-1,1),t.tag=2,_n(n,t,1))),n.lanes|=1),e)}var kS=un.ReactCurrentOwner,nt=!1;function Ke(e,t,n,r){t.child=e===null?Yg(t,null,n,r):ns(t,e.child,n,r)}function yh(e,t,n,r,s){n=n.render;var o=t.ref;return Xr(t,s),r=hd(e,t,n,r,o,s),n=pd(),e!==null&&!nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,ln(e,t,s)):(ge&&n&&td(t),t.flags|=1,Ke(e,t,r,s),t.child)}function vh(e,t,n,r,s){if(e===null){var o=n.type;return typeof o=="function"&&!kd(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,wy(e,t,o,r,s)):(e=ki(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:no,n(i,r)&&e.ref===t.ref)return ln(e,t,s)}return t.flags|=1,e=Vn(o,r),e.ref=t.ref,e.return=t,t.child=e}function wy(e,t,n,r,s){if(e!==null){var o=e.memoizedProps;if(no(o,r)&&e.ref===t.ref)if(nt=!1,t.pendingProps=r=o,(e.lanes&s)!==0)e.flags&131072&&(nt=!0);else return t.lanes=e.lanes,ln(e,t,s)}return Wu(e,t,n,r,s)}function Sy(e,t,n){var r=t.pendingProps,s=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ue(Br,at),at|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ue(Br,at),at|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ue(Br,at),at|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ue(Br,at),at|=r;return Ke(e,t,s,n),t.child}function by(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Wu(e,t,n,r,s){var o=st(n)?mr:He.current;return o=es(t,o),Xr(t,s),n=hd(e,t,n,r,o,s),r=pd(),e!==null&&!nt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,ln(e,t,s)):(ge&&r&&td(t),t.flags|=1,Ke(e,t,n,s),t.child)}function xh(e,t,n,r,s){if(st(n)){var o=!0;Hi(t)}else o=!1;if(Xr(t,s),t.stateNode===null)Si(e,t),yy(t,n,r),$u(t,n,r,s),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=St(c):(c=st(n)?mr:He.current,c=es(t,c));var d=n.getDerivedStateFromProps,u=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";u||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==c)&&hh(t,i,r,c),En=!1;var f=t.memoizedState;i.state=f,Qi(t,r,i,s),l=t.memoizedState,a!==r||f!==l||rt.current||En?(typeof d=="function"&&(Bu(t,n,d,r),l=t.memoizedState),(a=En||fh(t,n,a,r,f,l,c))?(u||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Qg(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Nt(t.type,a),i.props=c,u=t.pendingProps,f=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=St(l):(l=st(n)?mr:He.current,l=es(t,l));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==u||f!==l)&&hh(t,i,r,l),En=!1,f=t.memoizedState,i.state=f,Qi(t,r,i,s);var x=t.memoizedState;a!==u||f!==x||rt.current||En?(typeof y=="function"&&(Bu(t,n,y,r),x=t.memoizedState),(c=En||fh(t,n,c,r,f,x,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),i.props=r,i.state=x,i.context=l,r=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Hu(e,t,n,r,o,s)}function Hu(e,t,n,r,s,o){by(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return s&&sh(t,n,!1),ln(e,t,o);r=t.stateNode,kS.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=ns(t,e.child,null,o),t.child=ns(t,null,a,o)):Ke(e,t,a,o),t.memoizedState=r.state,s&&sh(t,n,!0),t.child}function Ey(e){var t=e.stateNode;t.pendingContext?rh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&rh(e,t.context,!1),ud(e,t.containerInfo)}function wh(e,t,n,r,s){return ts(),rd(s),t.flags|=256,Ke(e,t,n,r),t.child}var Gu={dehydrated:null,treeContext:null,retryLane:0};function Ku(e){return{baseLanes:e,cachePool:null,transitions:null}}function ky(e,t,n){var r=t.pendingProps,s=ve.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ue(ve,s&1),e===null)return Fu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Da(i,r,0,null),e=cr(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ku(n),t.memoizedState=Gu,e):yd(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return CS(e,t,i,r,a,s,n);if(o){o=r.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(i&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Vn(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=Vn(a,o):(o=cr(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?Ku(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=Gu,r}return o=e.child,e=o.sibling,r=Vn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function yd(e,t){return t=Da({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qo(e,t,n,r){return r!==null&&rd(r),ns(t,e.child,null,n),e=yd(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function CS(e,t,n,r,s,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Dl(Error(D(422))),Qo(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,s=t.mode,r=Da({mode:"visible",children:r.children},s,0,null),o=cr(o,s,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&ns(t,e.child,null,i),t.child.memoizedState=Ku(i),t.memoizedState=Gu,o);if(!(t.mode&1))return Qo(e,t,i,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(D(419)),r=Dl(o,r,void 0),Qo(e,t,i,r)}if(a=(i&e.childLanes)!==0,nt||a){if(r=Ae,r!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,an(e,s),At(r,e,s,-1))}return Ed(),r=Dl(Error(D(421))),Qo(e,t,i,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=VS.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,lt=Ln(s.nextSibling),ut=t,ge=!0,Mt=null,e!==null&&(mt[gt++]=tn,mt[gt++]=nn,mt[gt++]=gr,tn=e.id,nn=e.overflow,gr=t),t=yd(t,r.children),t.flags|=4096,t)}function Sh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),zu(e.return,t,n)}function Al(e,t,n,r,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=s)}function Cy(e,t,n){var r=t.pendingProps,s=r.revealOrder,o=r.tail;if(Ke(e,t,r.children,n),r=ve.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sh(e,n,t);else if(e.tag===19)Sh(e,n,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}r&=1}if(ue(ve,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Zi(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Al(t,!1,s,n,o);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Zi(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Al(t,!0,n,null,o);break;case"together":Al(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Si(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ln(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=Vn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function PS(e,t,n){switch(t.tag){case 3:Ey(t),ts();break;case 5:Zg(t);break;case 1:st(t.type)&&Hi(t);break;case 4:ud(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ue(Yi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ue(ve,ve.current&1),t.flags|=128,null):n&t.child.childLanes?ky(e,t,n):(ue(ve,ve.current&1),e=ln(e,t,n),e!==null?e.sibling:null);ue(ve,ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Cy(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ue(ve,ve.current),r)break;return null;case 22:case 23:return t.lanes=0,Sy(e,t,n)}return ln(e,t,n)}var Py,Yu,Ty,jy;Py=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Yu=function(){};Ty=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,ir(Gt.current);var o=null;switch(n){case"input":s=gu(e,s),r=gu(e,r),o=[];break;case"select":s=we({},s,{value:void 0}),r=we({},r,{value:void 0}),o=[];break;case"textarea":s=xu(e,s),r=xu(e,r),o=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ui)}Su(n,r);var i;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Xs.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Xs.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&fe("scroll",e),o||a===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};jy=function(e,t,n,r){n!==r&&(t.flags|=4)};function ks(e,t){if(!ge)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function TS(e,t,n){var r=t.pendingProps;switch(nd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return st(t.type)&&Wi(),Ue(t),null;case 3:return r=t.stateNode,rs(),pe(rt),pe(He),dd(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Yo(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Mt!==null&&(nc(Mt),Mt=null))),Yu(e,t),Ue(t),null;case 5:cd(t);var s=ir(ao.current);if(n=t.type,e!==null&&t.stateNode!=null)Ty(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return Ue(t),null}if(e=ir(Gt.current),Yo(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Ut]=t,r[oo]=o,e=(t.mode&1)!==0,n){case"dialog":fe("cancel",r),fe("close",r);break;case"iframe":case"object":case"embed":fe("load",r);break;case"video":case"audio":for(s=0;s<As.length;s++)fe(As[s],r);break;case"source":fe("error",r);break;case"img":case"image":case"link":fe("error",r),fe("load",r);break;case"details":fe("toggle",r);break;case"input":Rf(r,o),fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},fe("invalid",r);break;case"textarea":Df(r,o),fe("invalid",r)}Su(n,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Ko(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Ko(r.textContent,a,e),s=["children",""+a]):Xs.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&fe("scroll",r)}switch(n){case"input":Fo(r),Mf(r,o,!0);break;case"textarea":Fo(r),Af(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Ui)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ng(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Ut]=t,e[oo]=r,Py(e,t,!1,!1),t.stateNode=e;e:{switch(i=bu(n,r),n){case"dialog":fe("cancel",e),fe("close",e),s=r;break;case"iframe":case"object":case"embed":fe("load",e),s=r;break;case"video":case"audio":for(s=0;s<As.length;s++)fe(As[s],e);s=r;break;case"source":fe("error",e),s=r;break;case"img":case"image":case"link":fe("error",e),fe("load",e),s=r;break;case"details":fe("toggle",e),s=r;break;case"input":Rf(e,r),s=gu(e,r),fe("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=we({},r,{value:void 0}),fe("invalid",e);break;case"textarea":Df(e,r),s=xu(e,r),fe("invalid",e);break;default:s=r}Su(n,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?og(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&rg(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Qs(e,l):typeof l=="number"&&Qs(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Xs.hasOwnProperty(o)?l!=null&&o==="onScroll"&&fe("scroll",e):l!=null&&Bc(e,o,l,i))}switch(n){case"input":Fo(e),Mf(e,r,!1);break;case"textarea":Fo(e),Af(e);break;case"option":r.value!=null&&e.setAttribute("value",""+zn(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Hr(e,!!r.multiple,o,!1):r.defaultValue!=null&&Hr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Ui)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ue(t),null;case 6:if(e&&t.stateNode!=null)jy(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(D(166));if(n=ir(ao.current),ir(Gt.current),Yo(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ut]=t,(o=r.nodeValue!==n)&&(e=ut,e!==null))switch(e.tag){case 3:Ko(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ko(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ut]=t,t.stateNode=r}return Ue(t),null;case 13:if(pe(ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ge&<!==null&&t.mode&1&&!(t.flags&128))Gg(),ts(),t.flags|=98560,o=!1;else if(o=Yo(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(D(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(D(317));o[Ut]=t}else ts(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ue(t),o=!1}else Mt!==null&&(nc(Mt),Mt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ve.current&1?Re===0&&(Re=3):Ed())),t.updateQueue!==null&&(t.flags|=4),Ue(t),null);case 4:return rs(),Yu(e,t),e===null&&ro(t.stateNode.containerInfo),Ue(t),null;case 10:return id(t.type._context),Ue(t),null;case 17:return st(t.type)&&Wi(),Ue(t),null;case 19:if(pe(ve),o=t.memoizedState,o===null)return Ue(t),null;if(r=(t.flags&128)!==0,i=o.rendering,i===null)if(r)ks(o,!1);else{if(Re!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Zi(e),i!==null){for(t.flags|=128,ks(o,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ue(ve,ve.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ee()>os&&(t.flags|=128,r=!0,ks(o,!1),t.lanes=4194304)}else{if(!r)if(e=Zi(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ks(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ge)return Ue(t),null}else 2*Ee()-o.renderingStartTime>os&&n!==1073741824&&(t.flags|=128,r=!0,ks(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ee(),t.sibling=null,n=ve.current,ue(ve,r?n&1|2:n&1),t):(Ue(t),null);case 22:case 23:return bd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?at&1073741824&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function jS(e,t){switch(nd(t),t.tag){case 1:return st(t.type)&&Wi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rs(),pe(rt),pe(He),dd(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return cd(t),null;case 13:if(pe(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));ts()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ve),null;case 4:return rs(),null;case 10:return id(t.type._context),null;case 22:case 23:return bd(),null;case 24:return null;default:return null}}var Zo=!1,We=!1,NS=typeof WeakSet=="function"?WeakSet:Set,O=null;function zr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){be(e,t,r)}else n.current=null}function Xu(e,t,n){try{n()}catch(r){be(e,t,r)}}var bh=!1;function RS(e,t){if(Du=zi,e=Ag(),ed(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var y;u!==n||s!==0&&u.nodeType!==3||(a=i+s),u!==o||r!==0&&u.nodeType!==3||(l=i+r),u.nodeType===3&&(i+=u.nodeValue.length),(y=u.firstChild)!==null;)f=u,u=y;for(;;){if(u===e)break t;if(f===n&&++c===s&&(a=i),f===o&&++d===r&&(l=i),(y=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=y}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Au={focusedElem:e,selectionRange:n},zi=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var v=x.memoizedProps,S=x.memoizedState,g=t.stateNode,m=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:Nt(t.type,v),S);g.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(b){be(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return x=bh,bh=!1,x}function $s(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Xu(t,n,o)}s=s.next}while(s!==r)}}function Ra(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Qu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ny(e){var t=e.alternate;t!==null&&(e.alternate=null,Ny(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ut],delete t[oo],delete t[Ou],delete t[fS],delete t[hS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ry(e){return e.tag===5||e.tag===3||e.tag===4}function Eh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ry(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.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 Zu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ui));else if(r!==4&&(e=e.child,e!==null))for(Zu(e,t,n),e=e.sibling;e!==null;)Zu(e,t,n),e=e.sibling}function qu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(qu(e,t,n),e=e.sibling;e!==null;)qu(e,t,n),e=e.sibling}var _e=null,Rt=!1;function mn(e,t,n){for(n=n.child;n!==null;)My(e,t,n),n=n.sibling}function My(e,t,n){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(ba,n)}catch{}switch(n.tag){case 5:We||zr(n,t);case 6:var r=_e,s=Rt;_e=null,mn(e,t,n),_e=r,Rt=s,_e!==null&&(Rt?(e=_e,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):_e.removeChild(n.stateNode));break;case 18:_e!==null&&(Rt?(e=_e,n=n.stateNode,e.nodeType===8?Pl(e.parentNode,n):e.nodeType===1&&Pl(e,n),eo(e)):Pl(_e,n.stateNode));break;case 4:r=_e,s=Rt,_e=n.stateNode.containerInfo,Rt=!0,mn(e,t,n),_e=r,Rt=s;break;case 0:case 11:case 14:case 15:if(!We&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Xu(n,t,i),s=s.next}while(s!==r)}mn(e,t,n);break;case 1:if(!We&&(zr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){be(n,t,a)}mn(e,t,n);break;case 21:mn(e,t,n);break;case 22:n.mode&1?(We=(r=We)||n.memoizedState!==null,mn(e,t,n),We=r):mn(e,t,n);break;default:mn(e,t,n)}}function kh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new NS),t.forEach(function(r){var s=FS.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Pt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:_e=a.stateNode,Rt=!1;break e;case 3:_e=a.stateNode.containerInfo,Rt=!0;break e;case 4:_e=a.stateNode.containerInfo,Rt=!0;break e}a=a.return}if(_e===null)throw Error(D(160));My(o,i,s),_e=null,Rt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){be(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Dy(t,e),t=t.sibling}function Dy(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Pt(t,e),Vt(e),r&4){try{$s(3,e,e.return),Ra(3,e)}catch(v){be(e,e.return,v)}try{$s(5,e,e.return)}catch(v){be(e,e.return,v)}}break;case 1:Pt(t,e),Vt(e),r&512&&n!==null&&zr(n,n.return);break;case 5:if(Pt(t,e),Vt(e),r&512&&n!==null&&zr(n,n.return),e.flags&32){var s=e.stateNode;try{Qs(s,"")}catch(v){be(e,e.return,v)}}if(r&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=n!==null?n.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&eg(s,o),bu(a,i);var c=bu(a,o);for(i=0;i<l.length;i+=2){var d=l[i],u=l[i+1];d==="style"?og(s,u):d==="dangerouslySetInnerHTML"?rg(s,u):d==="children"?Qs(s,u):Bc(s,d,u,c)}switch(a){case"input":yu(s,o);break;case"textarea":tg(s,o);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var y=o.value;y!=null?Hr(s,!!o.multiple,y,!1):f!==!!o.multiple&&(o.defaultValue!=null?Hr(s,!!o.multiple,o.defaultValue,!0):Hr(s,!!o.multiple,o.multiple?[]:"",!1))}s[oo]=o}catch(v){be(e,e.return,v)}}break;case 6:if(Pt(t,e),Vt(e),r&4){if(e.stateNode===null)throw Error(D(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(v){be(e,e.return,v)}}break;case 3:if(Pt(t,e),Vt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{eo(t.containerInfo)}catch(v){be(e,e.return,v)}break;case 4:Pt(t,e),Vt(e);break;case 13:Pt(t,e),Vt(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(wd=Ee())),r&4&&kh(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(We=(c=We)||d,Pt(t,e),We=c):Pt(t,e),Vt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(O=e,d=e.child;d!==null;){for(u=O=d;O!==null;){switch(f=O,y=f.child,f.tag){case 0:case 11:case 14:case 15:$s(4,f,f.return);break;case 1:zr(f,f.return);var x=f.stateNode;if(typeof x.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(v){be(r,n,v)}}break;case 5:zr(f,f.return);break;case 22:if(f.memoizedState!==null){Ph(u);continue}}y!==null?(y.return=f,O=y):Ph(u)}d=d.sibling}e:for(d=null,u=e;;){if(u.tag===5){if(d===null){d=u;try{s=u.stateNode,c?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=u.stateNode,l=u.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=sg("display",i))}catch(v){be(e,e.return,v)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=c?"":u.memoizedProps}catch(v){be(e,e.return,v)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:Pt(t,e),Vt(e),r&4&&kh(e);break;case 21:break;default:Pt(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ry(n)){var r=n;break e}n=n.return}throw Error(D(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Qs(s,""),r.flags&=-33);var o=Eh(e);qu(e,o,s);break;case 3:case 4:var i=r.stateNode.containerInfo,a=Eh(e);Zu(e,a,i);break;default:throw Error(D(161))}}catch(l){be(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function MS(e,t,n){O=e,Ay(e)}function Ay(e,t,n){for(var r=(e.mode&1)!==0;O!==null;){var s=O,o=s.child;if(s.tag===22&&r){var i=s.memoizedState!==null||Zo;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||We;a=Zo;var c=We;if(Zo=i,(We=l)&&!c)for(O=s;O!==null;)i=O,l=i.child,i.tag===22&&i.memoizedState!==null?Th(s):l!==null?(l.return=i,O=l):Th(s);for(;o!==null;)O=o,Ay(o),o=o.sibling;O=s,Zo=a,We=c}Ch(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,O=o):Ch(e)}}function Ch(e){for(;O!==null;){var t=O;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:We||Ra(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!We)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Nt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&uh(t,o,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}uh(t,i,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&eo(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}We||t.flags&512&&Qu(t)}catch(f){be(t,t.return,f)}}if(t===e){O=null;break}if(n=t.sibling,n!==null){n.return=t.return,O=n;break}O=t.return}}function Ph(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var n=t.sibling;if(n!==null){n.return=t.return,O=n;break}O=t.return}}function Th(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ra(4,t)}catch(l){be(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){be(t,s,l)}}var o=t.return;try{Qu(t)}catch(l){be(t,o,l)}break;case 5:var i=t.return;try{Qu(t)}catch(l){be(t,i,l)}}}catch(l){be(t,t.return,l)}if(t===e){O=null;break}var a=t.sibling;if(a!==null){a.return=t.return,O=a;break}O=t.return}}var DS=Math.ceil,ea=un.ReactCurrentDispatcher,vd=un.ReactCurrentOwner,xt=un.ReactCurrentBatchConfig,J=0,Ae=null,Ce=null,Ve=0,at=0,Br=Hn(0),Re=0,fo=null,vr=0,Ma=0,xd=0,Us=null,tt=null,wd=0,os=1/0,Jt=null,ta=!1,Ju=null,On=null,qo=!1,Tn=null,na=0,Ws=0,ec=null,bi=-1,Ei=0;function Qe(){return J&6?Ee():bi!==-1?bi:bi=Ee()}function In(e){return e.mode&1?J&2&&Ve!==0?Ve&-Ve:mS.transition!==null?(Ei===0&&(Ei=yg()),Ei):(e=se,e!==0||(e=window.event,e=e===void 0?16:kg(e.type)),e):1}function At(e,t,n,r){if(50<Ws)throw Ws=0,ec=null,Error(D(185));Eo(e,n,r),(!(J&2)||e!==Ae)&&(e===Ae&&(!(J&2)&&(Ma|=n),Re===4&&Cn(e,Ve)),ot(e,r),n===1&&J===0&&!(t.mode&1)&&(os=Ee()+500,Ta&&Gn()))}function ot(e,t){var n=e.callbackNode;m1(e,t);var r=Fi(e,e===Ae?Ve:0);if(r===0)n!==null&&Of(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Of(n),t===1)e.tag===0?pS(jh.bind(null,e)):Ug(jh.bind(null,e)),cS(function(){!(J&6)&&Gn()}),n=null;else{switch(vg(r)){case 1:n=Gc;break;case 4:n=mg;break;case 16:n=Vi;break;case 536870912:n=gg;break;default:n=Vi}n=By(n,Ly.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ly(e,t){if(bi=-1,Ei=0,J&6)throw Error(D(327));var n=e.callbackNode;if(Qr()&&e.callbackNode!==n)return null;var r=Fi(e,e===Ae?Ve:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ra(e,r);else{t=r;var s=J;J|=2;var o=Oy();(Ae!==e||Ve!==t)&&(Jt=null,os=Ee()+500,ur(e,t));do try{_S();break}catch(a){_y(e,a)}while(!0);od(),ea.current=o,J=s,Ce!==null?t=0:(Ae=null,Ve=0,t=Re)}if(t!==0){if(t===2&&(s=Tu(e),s!==0&&(r=s,t=tc(e,s))),t===1)throw n=fo,ur(e,0),Cn(e,r),ot(e,Ee()),n;if(t===6)Cn(e,r);else{if(s=e.current.alternate,!(r&30)&&!AS(s)&&(t=ra(e,r),t===2&&(o=Tu(e),o!==0&&(r=o,t=tc(e,o))),t===1))throw n=fo,ur(e,0),Cn(e,r),ot(e,Ee()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(D(345));case 2:tr(e,tt,Jt);break;case 3:if(Cn(e,r),(r&130023424)===r&&(t=wd+500-Ee(),10<t)){if(Fi(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Qe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=_u(tr.bind(null,e,tt,Jt),t);break}tr(e,tt,Jt);break;case 4:if(Cn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var i=31-Dt(r);o=1<<i,i=t[i],i>s&&(s=i),r&=~o}if(r=s,r=Ee()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*DS(r/1960))-r,10<r){e.timeoutHandle=_u(tr.bind(null,e,tt,Jt),r);break}tr(e,tt,Jt);break;case 5:tr(e,tt,Jt);break;default:throw Error(D(329))}}}return ot(e,Ee()),e.callbackNode===n?Ly.bind(null,e):null}function tc(e,t){var n=Us;return e.current.memoizedState.isDehydrated&&(ur(e,t).flags|=256),e=ra(e,t),e!==2&&(t=tt,tt=n,t!==null&&nc(t)),e}function nc(e){tt===null?tt=e:tt.push.apply(tt,e)}function AS(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],o=s.getSnapshot;s=s.value;try{if(!_t(o(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Cn(e,t){for(t&=~xd,t&=~Ma,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Dt(t),r=1<<n;e[n]=-1,t&=~r}}function jh(e){if(J&6)throw Error(D(327));Qr();var t=Fi(e,0);if(!(t&1))return ot(e,Ee()),null;var n=ra(e,t);if(e.tag!==0&&n===2){var r=Tu(e);r!==0&&(t=r,n=tc(e,r))}if(n===1)throw n=fo,ur(e,0),Cn(e,t),ot(e,Ee()),n;if(n===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,tr(e,tt,Jt),ot(e,Ee()),null}function Sd(e,t){var n=J;J|=1;try{return e(t)}finally{J=n,J===0&&(os=Ee()+500,Ta&&Gn())}}function xr(e){Tn!==null&&Tn.tag===0&&!(J&6)&&Qr();var t=J;J|=1;var n=xt.transition,r=se;try{if(xt.transition=null,se=1,e)return e()}finally{se=r,xt.transition=n,J=t,!(J&6)&&Gn()}}function bd(){at=Br.current,pe(Br)}function ur(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,uS(n)),Ce!==null)for(n=Ce.return;n!==null;){var r=n;switch(nd(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Wi();break;case 3:rs(),pe(rt),pe(He),dd();break;case 5:cd(r);break;case 4:rs();break;case 13:pe(ve);break;case 19:pe(ve);break;case 10:id(r.type._context);break;case 22:case 23:bd()}n=n.return}if(Ae=e,Ce=e=Vn(e.current,null),Ve=at=t,Re=0,fo=null,xd=Ma=vr=0,tt=Us=null,or!==null){for(t=0;t<or.length;t++)if(n=or[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,o=n.pending;if(o!==null){var i=o.next;o.next=s,r.next=i}n.pending=r}or=null}return e}function _y(e,t){do{var n=Ce;try{if(od(),xi.current=Ji,qi){for(var r=xe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}qi=!1}if(yr=0,De=Ne=xe=null,Bs=!1,lo=0,vd.current=null,n===null||n.return===null){Re=1,fo=t,Ce=null;break}e:{var o=e,i=n.return,a=n,l=t;if(t=Ve,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,u=d.tag;if(!(d.mode&1)&&(u===0||u===11||u===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=mh(i);if(y!==null){y.flags&=-257,gh(y,i,a,o,t),y.mode&1&&ph(o,c,t),t=y,l=c;var x=t.updateQueue;if(x===null){var v=new Set;v.add(l),t.updateQueue=v}else x.add(l);break e}else{if(!(t&1)){ph(o,c,t),Ed();break e}l=Error(D(426))}}else if(ge&&a.mode&1){var S=mh(i);if(S!==null){!(S.flags&65536)&&(S.flags|=256),gh(S,i,a,o,t),rd(ss(l,a));break e}}o=l=ss(l,a),Re!==4&&(Re=2),Us===null?Us=[o]:Us.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var g=vy(o,l,t);lh(o,g);break e;case 1:a=l;var m=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof m.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(On===null||!On.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var b=xy(o,a,t);lh(o,b);break e}}o=o.return}while(o!==null)}Vy(n)}catch(C){t=C,Ce===n&&n!==null&&(Ce=n=n.return);continue}break}while(!0)}function Oy(){var e=ea.current;return ea.current=Ji,e===null?Ji:e}function Ed(){(Re===0||Re===3||Re===2)&&(Re=4),Ae===null||!(vr&268435455)&&!(Ma&268435455)||Cn(Ae,Ve)}function ra(e,t){var n=J;J|=2;var r=Oy();(Ae!==e||Ve!==t)&&(Jt=null,ur(e,t));do try{LS();break}catch(s){_y(e,s)}while(!0);if(od(),J=n,ea.current=r,Ce!==null)throw Error(D(261));return Ae=null,Ve=0,Re}function LS(){for(;Ce!==null;)Iy(Ce)}function _S(){for(;Ce!==null&&!i1();)Iy(Ce)}function Iy(e){var t=zy(e.alternate,e,at);e.memoizedProps=e.pendingProps,t===null?Vy(e):Ce=t,vd.current=null}function Vy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=jS(n,t),n!==null){n.flags&=32767,Ce=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Re=6,Ce=null;return}}else if(n=TS(n,t,at),n!==null){Ce=n;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);Re===0&&(Re=5)}function tr(e,t,n){var r=se,s=xt.transition;try{xt.transition=null,se=1,OS(e,t,n,r)}finally{xt.transition=s,se=r}return null}function OS(e,t,n,r){do Qr();while(Tn!==null);if(J&6)throw Error(D(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(D(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(g1(e,o),e===Ae&&(Ce=Ae=null,Ve=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||qo||(qo=!0,By(Vi,function(){return Qr(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=xt.transition,xt.transition=null;var i=se;se=1;var a=J;J|=4,vd.current=null,RS(e,n),Dy(n,e),nS(Au),zi=!!Du,Au=Du=null,e.current=n,MS(n),a1(),J=a,se=i,xt.transition=o}else e.current=n;if(qo&&(qo=!1,Tn=e,na=s),o=e.pendingLanes,o===0&&(On=null),c1(n.stateNode),ot(e,Ee()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(ta)throw ta=!1,e=Ju,Ju=null,e;return na&1&&e.tag!==0&&Qr(),o=e.pendingLanes,o&1?e===ec?Ws++:(Ws=0,ec=e):Ws=0,Gn(),null}function Qr(){if(Tn!==null){var e=vg(na),t=xt.transition,n=se;try{if(xt.transition=null,se=16>e?16:e,Tn===null)var r=!1;else{if(e=Tn,Tn=null,na=0,J&6)throw Error(D(331));var s=J;for(J|=4,O=e.current;O!==null;){var o=O,i=o.child;if(O.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(O=c;O!==null;){var d=O;switch(d.tag){case 0:case 11:case 15:$s(8,d,o)}var u=d.child;if(u!==null)u.return=d,O=u;else for(;O!==null;){d=O;var f=d.sibling,y=d.return;if(Ny(d),d===c){O=null;break}if(f!==null){f.return=y,O=f;break}O=y}}}var x=o.alternate;if(x!==null){var v=x.child;if(v!==null){x.child=null;do{var S=v.sibling;v.sibling=null,v=S}while(v!==null)}}O=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,O=i;else e:for(;O!==null;){if(o=O,o.flags&2048)switch(o.tag){case 0:case 11:case 15:$s(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,O=g;break e}O=o.return}}var m=e.current;for(O=m;O!==null;){i=O;var w=i.child;if(i.subtreeFlags&2064&&w!==null)w.return=i,O=w;else e:for(i=m;O!==null;){if(a=O,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ra(9,a)}}catch(C){be(a,a.return,C)}if(a===i){O=null;break e}var b=a.sibling;if(b!==null){b.return=a.return,O=b;break e}O=a.return}}if(J=s,Gn(),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(ba,e)}catch{}r=!0}return r}finally{se=n,xt.transition=t}}return!1}function Nh(e,t,n){t=ss(n,t),t=vy(e,t,1),e=_n(e,t,1),t=Qe(),e!==null&&(Eo(e,1,t),ot(e,t))}function be(e,t,n){if(e.tag===3)Nh(e,e,n);else for(;t!==null;){if(t.tag===3){Nh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(On===null||!On.has(r))){e=ss(n,e),e=xy(t,e,1),t=_n(t,e,1),e=Qe(),t!==null&&(Eo(t,1,e),ot(t,e));break}}t=t.return}}function IS(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Qe(),e.pingedLanes|=e.suspendedLanes&n,Ae===e&&(Ve&n)===n&&(Re===4||Re===3&&(Ve&130023424)===Ve&&500>Ee()-wd?ur(e,0):xd|=n),ot(e,t)}function Fy(e,t){t===0&&(e.mode&1?(t=$o,$o<<=1,!($o&130023424)&&($o=4194304)):t=1);var n=Qe();e=an(e,t),e!==null&&(Eo(e,t,n),ot(e,n))}function VS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Fy(e,n)}function FS(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),Fy(e,n)}var zy;zy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||rt.current)nt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return nt=!1,PS(e,t,n);nt=!!(e.flags&131072)}else nt=!1,ge&&t.flags&1048576&&Wg(t,Ki,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Si(e,t),e=t.pendingProps;var s=es(t,He.current);Xr(t,n),s=hd(null,t,r,e,s,n);var o=pd();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,st(r)?(o=!0,Hi(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ld(t),s.updater=Na,t.stateNode=s,s._reactInternals=t,$u(t,r,e,n),t=Hu(null,t,r,!0,o,n)):(t.tag=0,ge&&o&&td(t),Ke(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Si(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=BS(r),e=Nt(r,e),s){case 0:t=Wu(null,t,r,e,n);break e;case 1:t=xh(null,t,r,e,n);break e;case 11:t=yh(null,t,r,e,n);break e;case 14:t=vh(null,t,r,Nt(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nt(r,s),Wu(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nt(r,s),xh(e,t,r,s,n);case 3:e:{if(Ey(t),e===null)throw Error(D(387));r=t.pendingProps,o=t.memoizedState,s=o.element,Qg(e,t),Qi(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=ss(Error(D(423)),t),t=wh(e,t,r,n,s);break e}else if(r!==s){s=ss(Error(D(424)),t),t=wh(e,t,r,n,s);break e}else for(lt=Ln(t.stateNode.containerInfo.firstChild),ut=t,ge=!0,Mt=null,n=Yg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ts(),r===s){t=ln(e,t,n);break e}Ke(e,t,r,n)}t=t.child}return t;case 5:return Zg(t),e===null&&Fu(t),r=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Lu(r,s)?i=null:o!==null&&Lu(r,o)&&(t.flags|=32),by(e,t),Ke(e,t,i,n),t.child;case 6:return e===null&&Fu(t),null;case 13:return ky(e,t,n);case 4:return ud(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ns(t,null,r,n):Ke(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nt(r,s),yh(e,t,r,s,n);case 7:return Ke(e,t,t.pendingProps,n),t.child;case 8:return Ke(e,t,t.pendingProps.children,n),t.child;case 12:return Ke(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,ue(Yi,r._currentValue),r._currentValue=i,o!==null)if(_t(o.value,i)){if(o.children===s.children&&!rt.current){t=ln(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=rn(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),zu(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(D(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),zu(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Ke(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Xr(t,n),s=St(s),r=r(s),t.flags|=1,Ke(e,t,r,n),t.child;case 14:return r=t.type,s=Nt(r,t.pendingProps),s=Nt(r.type,s),vh(e,t,r,s,n);case 15:return wy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Nt(r,s),Si(e,t),t.tag=1,st(r)?(e=!0,Hi(t)):e=!1,Xr(t,n),yy(t,r,s),$u(t,r,s,n),Hu(null,t,r,!0,e,n);case 19:return Cy(e,t,n);case 22:return Sy(e,t,n)}throw Error(D(156,t.tag))};function By(e,t){return pg(e,t)}function zS(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,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 yt(e,t,n,r){return new zS(e,t,n,r)}function kd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function BS(e){if(typeof e=="function")return kd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Uc)return 11;if(e===Wc)return 14}return 2}function Vn(e,t){var n=e.alternate;return n===null?(n=yt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ki(e,t,n,r,s,o){var i=2;if(r=e,typeof e=="function")kd(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Mr:return cr(n.children,s,o,t);case $c:i=8,s|=8;break;case fu:return e=yt(12,n,t,s|2),e.elementType=fu,e.lanes=o,e;case hu:return e=yt(13,n,t,s),e.elementType=hu,e.lanes=o,e;case pu:return e=yt(19,n,t,s),e.elementType=pu,e.lanes=o,e;case Zm:return Da(n,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xm:i=10;break e;case Qm:i=9;break e;case Uc:i=11;break e;case Wc:i=14;break e;case bn:i=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=yt(i,n,t,s),t.elementType=e,t.type=r,t.lanes=o,t}function cr(e,t,n,r){return e=yt(7,e,r,t),e.lanes=n,e}function Da(e,t,n,r){return e=yt(22,e,r,t),e.elementType=Zm,e.lanes=n,e.stateNode={isHidden:!1},e}function Ll(e,t,n){return e=yt(6,e,null,t),e.lanes=n,e}function _l(e,t,n){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $S(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ml(0),this.expirationTimes=ml(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ml(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Cd(e,t,n,r,s,o,i,a,l){return e=new $S(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=yt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ld(o),e}function US(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Rr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function $y(e){if(!e)return Bn;e=e._reactInternals;e:{if(Er(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(st(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var n=e.type;if(st(n))return $g(e,n,t)}return t}function Uy(e,t,n,r,s,o,i,a,l){return e=Cd(n,r,!0,e,s,o,i,a,l),e.context=$y(null),n=e.current,r=Qe(),s=In(n),o=rn(r,s),o.callback=t??null,_n(n,o,s),e.current.lanes=s,Eo(e,s,r),ot(e,r),e}function Aa(e,t,n,r){var s=t.current,o=Qe(),i=In(s);return n=$y(n),t.context===null?t.context=n:t.pendingContext=n,t=rn(o,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=_n(s,t,i),e!==null&&(At(e,s,i,o),vi(e,s,i)),i}function sa(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Rh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Pd(e,t){Rh(e,t),(e=e.alternate)&&Rh(e,t)}function WS(){return null}var Wy=typeof reportError=="function"?reportError:function(e){console.error(e)};function Td(e){this._internalRoot=e}La.prototype.render=Td.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));Aa(e,t,null,null)};La.prototype.unmount=Td.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;xr(function(){Aa(null,e,null,null)}),t[on]=null}};function La(e){this._internalRoot=e}La.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sg();e={blockedOn:null,target:e,priority:t};for(var n=0;n<kn.length&&t!==0&&t<kn[n].priority;n++);kn.splice(n,0,e),n===0&&Eg(e)}};function jd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function _a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Mh(){}function HS(e,t,n,r,s){if(s){if(typeof r=="function"){var o=r;r=function(){var c=sa(i);o.call(c)}}var i=Uy(t,r,e,0,null,!1,!1,"",Mh);return e._reactRootContainer=i,e[on]=i.current,ro(e.nodeType===8?e.parentNode:e),xr(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=sa(l);a.call(c)}}var l=Cd(e,0,!1,null,null,!1,!1,"",Mh);return e._reactRootContainer=l,e[on]=l.current,ro(e.nodeType===8?e.parentNode:e),xr(function(){Aa(t,l,n,r)}),l}function Oa(e,t,n,r,s){var o=n._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=sa(i);a.call(l)}}Aa(t,i,e,s)}else i=HS(n,t,e,s,r);return sa(i)}xg=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ds(t.pendingLanes);n!==0&&(Kc(t,n|1),ot(t,Ee()),!(J&6)&&(os=Ee()+500,Gn()))}break;case 13:xr(function(){var r=an(e,1);if(r!==null){var s=Qe();At(r,e,1,s)}}),Pd(e,1)}};Yc=function(e){if(e.tag===13){var t=an(e,134217728);if(t!==null){var n=Qe();At(t,e,134217728,n)}Pd(e,134217728)}};wg=function(e){if(e.tag===13){var t=In(e),n=an(e,t);if(n!==null){var r=Qe();At(n,e,t,r)}Pd(e,t)}};Sg=function(){return se};bg=function(e,t){var n=se;try{return se=e,t()}finally{se=n}};ku=function(e,t,n){switch(t){case"input":if(yu(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Pa(r);if(!s)throw Error(D(90));Jm(r),yu(r,s)}}}break;case"textarea":tg(e,n);break;case"select":t=n.value,t!=null&&Hr(e,!!n.multiple,t,!1)}};lg=Sd;ug=xr;var GS={usingClientEntryPoint:!1,Events:[Co,_r,Pa,ig,ag,Sd]},Cs={findFiberByHostInstance:sr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},KS={bundleType:Cs.bundleType,version:Cs.version,rendererPackageName:Cs.rendererPackageName,rendererConfig:Cs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:un.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=fg(e),e===null?null:e.stateNode},findFiberByHostInstance:Cs.findFiberByHostInstance||WS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Jo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jo.isDisabled&&Jo.supportsFiber)try{ba=Jo.inject(KS),Ht=Jo}catch{}}ft.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=GS;ft.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jd(t))throw Error(D(200));return US(e,t,null,n)};ft.createRoot=function(e,t){if(!jd(e))throw Error(D(299));var n=!1,r="",s=Wy;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Cd(e,1,!1,null,null,n,!1,r,s),e[on]=t.current,ro(e.nodeType===8?e.parentNode:e),new Td(t)};ft.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=fg(t),e=e===null?null:e.stateNode,e};ft.flushSync=function(e){return xr(e)};ft.hydrate=function(e,t,n){if(!_a(t))throw Error(D(200));return Oa(null,e,t,!0,n)};ft.hydrateRoot=function(e,t,n){if(!jd(e))throw Error(D(405));var r=n!=null&&n.hydratedSources||null,s=!1,o="",i=Wy;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Uy(t,null,e,1,n??null,s,!1,o,i),e[on]=t.current,ro(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new La(t)};ft.render=function(e,t,n){if(!_a(t))throw Error(D(200));return Oa(null,e,t,!1,n)};ft.unmountComponentAtNode=function(e){if(!_a(e))throw Error(D(40));return e._reactRootContainer?(xr(function(){Oa(null,null,e,!1,function(){e._reactRootContainer=null,e[on]=null})}),!0):!1};ft.unstable_batchedUpdates=Sd;ft.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!_a(n))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return Oa(e,t,n,!1,r)};ft.version="18.3.1-next-f1338f8080-20240426";function Hy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hy)}catch(e){console.error(e)}}Hy(),Hm.exports=ft;var Ia=Hm.exports;const Gy=Am(Ia);var Dh=Ia;cu.createRoot=Dh.createRoot,cu.hydrateRoot=Dh.hydrateRoot;const YS="modulepreload",XS=function(e){return"/"+e},Ah={},To=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(n.map(l=>{if(l=XS(l),l in Ah)return;Ah[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":YS,c||(u.as="script"),u.crossOrigin="",u.href=l,a&&u.setAttribute("nonce",a),document.head.appendChild(u),c)return new Promise((f,y)=>{u.addEventListener("load",f),u.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})};/**
|
|
42
|
+
* @remix-run/router v1.23.2
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Remix Software Inc.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
48
|
+
*
|
|
49
|
+
* @license MIT
|
|
50
|
+
*/function ho(){return ho=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ho.apply(this,arguments)}var jn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(jn||(jn={}));const Lh="popstate";function QS(e){e===void 0&&(e={});function t(r,s){let{pathname:o,search:i,hash:a}=r.location;return rc("",{pathname:o,search:i,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Ky(s)}return qS(t,n,null,e)}function Pe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Nd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ZS(){return Math.random().toString(36).substr(2,8)}function _h(e,t){return{usr:e.state,key:e.key,idx:t}}function rc(e,t,n,r){return n===void 0&&(n=null),ho({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ds(t):t,{state:n,key:t&&t.key||r||ZS()})}function Ky(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function ds(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function qS(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:o=!1}=r,i=s.history,a=jn.Pop,l=null,c=d();c==null&&(c=0,i.replaceState(ho({},i.state,{idx:c}),""));function d(){return(i.state||{idx:null}).idx}function u(){a=jn.Pop;let S=d(),g=S==null?null:S-c;c=S,l&&l({action:a,location:v.location,delta:g})}function f(S,g){a=jn.Push;let m=rc(v.location,S,g);c=d()+1;let w=_h(m,c),b=v.createHref(m);try{i.pushState(w,"",b)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(b)}o&&l&&l({action:a,location:v.location,delta:1})}function y(S,g){a=jn.Replace;let m=rc(v.location,S,g);c=d();let w=_h(m,c),b=v.createHref(m);i.replaceState(w,"",b),o&&l&&l({action:a,location:v.location,delta:0})}function x(S){let g=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof S=="string"?S:Ky(S);return m=m.replace(/ $/,"%20"),Pe(g,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,g)}let v={get action(){return a},get location(){return e(s,i)},listen(S){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Lh,u),l=S,()=>{s.removeEventListener(Lh,u),l=null}},createHref(S){return t(s,S)},createURL:x,encodeLocation(S){let g=x(S);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:y,go(S){return i.go(S)}};return v}var Oh;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Oh||(Oh={}));function JS(e,t,n){return n===void 0&&(n="/"),eb(e,t,n)}function eb(e,t,n,r){let s=typeof t=="string"?ds(t):t,o=Qy(s.pathname||"/",n);if(o==null)return null;let i=Yy(e);tb(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let c=hb(o);a=cb(i[l],c)}return a}function Yy(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(o,i,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(Pe(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=dr([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(Pe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Yy(o.children,t,d,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:lb(c,o.index),routesMeta:d})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of Xy(o.path))s(o,i,l)}),t}function Xy(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return s?[o,""]:[o];let i=Xy(r.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function tb(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ub(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const nb=/^:[\w-]+$/,rb=3,sb=2,ob=1,ib=10,ab=-2,Ih=e=>e==="*";function lb(e,t){let n=e.split("/"),r=n.length;return n.some(Ih)&&(r+=ab),t&&(r+=sb),n.filter(s=>!Ih(s)).reduce((s,o)=>s+(nb.test(o)?rb:o===""?ob:ib),r)}function ub(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function cb(e,t,n){let{routesMeta:r}=e,s={},o="/",i=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",u=db({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),f=l.route;if(!u)return null;Object.assign(s,u.params),i.push({params:s,pathname:dr([o,u.pathname]),pathnameBase:vb(dr([o,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(o=dr([o,u.pathnameBase]))}return i}function db(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=fb(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,d,u)=>{let{paramName:f,isOptional:y}=d;if(f==="*"){let v=a[u]||"";i=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const x=a[u];return y&&!x?c[f]=void 0:c[f]=(x||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:e}}function fb(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Nd(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function hb(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Nd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Qy(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const pb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mb=e=>pb.test(e);function gb(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?ds(e):e,o;if(n)if(mb(n))o=n;else{if(n.includes("//")){let i=n;n=n.replace(/\/\/+/g,"/"),Nd(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+n))}n.startsWith("/")?o=Vh(n.substring(1),"/"):o=Vh(n,t)}else o=t;return{pathname:o,search:xb(r),hash:wb(s)}}function Vh(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Ol(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function yb(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Zy(e,t){let n=yb(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function qy(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=ds(e):(s=ho({},e),Pe(!s.pathname||!s.pathname.includes("?"),Ol("?","pathname","search",s)),Pe(!s.pathname||!s.pathname.includes("#"),Ol("#","pathname","hash",s)),Pe(!s.search||!s.search.includes("#"),Ol("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=n;else{let u=t.length-1;if(!r&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),u-=1;s.pathname=f.join("/")}a=u>=0?t[u]:"/"}let l=gb(s,a),c=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const dr=e=>e.join("/").replace(/\/\/+/g,"/"),vb=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),xb=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wb=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Sb(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Jy=["post","put","patch","delete"];new Set(Jy);const bb=["get",...Jy];new Set(bb);/**
|
|
51
|
+
* React Router v6.30.3
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Remix Software Inc.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
+
*
|
|
58
|
+
* @license MIT
|
|
59
|
+
*/function po(){return po=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},po.apply(this,arguments)}const Rd=p.createContext(null),Eb=p.createContext(null),jo=p.createContext(null),Va=p.createContext(null),Kn=p.createContext({outlet:null,matches:[],isDataRoute:!1}),ev=p.createContext(null);function No(){return p.useContext(Va)!=null}function Fa(){return No()||Pe(!1),p.useContext(Va).location}function tv(e){p.useContext(jo).static||p.useLayoutEffect(e)}function za(){let{isDataRoute:e}=p.useContext(Kn);return e?Ob():kb()}function kb(){No()||Pe(!1);let e=p.useContext(Rd),{basename:t,future:n,navigator:r}=p.useContext(jo),{matches:s}=p.useContext(Kn),{pathname:o}=Fa(),i=JSON.stringify(Zy(s,n.v7_relativeSplatPath)),a=p.useRef(!1);return tv(()=>{a.current=!0}),p.useCallback(function(c,d){if(d===void 0&&(d={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let u=qy(c,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:dr([t,u.pathname])),(d.replace?r.replace:r.push)(u,d.state,d)},[t,r,i,o,e])}function uD(){let{matches:e}=p.useContext(Kn),t=e[e.length-1];return t?t.params:{}}function Cb(e,t){return Pb(e,t)}function Pb(e,t,n,r){No()||Pe(!1);let{navigator:s}=p.useContext(jo),{matches:o}=p.useContext(Kn),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=Fa(),d;if(t){var u;let S=typeof t=="string"?ds(t):t;l==="/"||(u=S.pathname)!=null&&u.startsWith(l)||Pe(!1),d=S}else d=c;let f=d.pathname||"/",y=f;if(l!=="/"){let S=l.replace(/^\//,"").split("/");y="/"+f.replace(/^\//,"").split("/").slice(S.length).join("/")}let x=JS(e,{pathname:y}),v=Mb(x&&x.map(S=>Object.assign({},S,{params:Object.assign({},a,S.params),pathname:dr([l,s.encodeLocation?s.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?l:dr([l,s.encodeLocation?s.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),o,n,r);return t&&v?p.createElement(Va.Provider,{value:{location:po({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:jn.Pop}},v):v}function Tb(){let e=_b(),t=Sb(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:s},n):null,null)}const jb=p.createElement(Tb,null);class Nb extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?p.createElement(Kn.Provider,{value:this.props.routeContext},p.createElement(ev.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Rb(e){let{routeContext:t,match:n,children:r}=e,s=p.useContext(Rd);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(Kn.Provider,{value:t},r)}function Mb(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let d=i.findIndex(u=>u.route.id&&(a==null?void 0:a[u.route.id])!==void 0);d>=0||Pe(!1),i=i.slice(0,Math.min(i.length,d+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<i.length;d++){let u=i[d];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(c=d),u.route.id){let{loaderData:f,errors:y}=n,x=u.route.loader&&f[u.route.id]===void 0&&(!y||y[u.route.id]===void 0);if(u.route.lazy||x){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((d,u,f)=>{let y,x=!1,v=null,S=null;n&&(y=a&&u.route.id?a[u.route.id]:void 0,v=u.route.errorElement||jb,l&&(c<0&&f===0?(Ib("route-fallback"),x=!0,S=null):c===f&&(x=!0,S=u.route.hydrateFallbackElement||null)));let g=t.concat(i.slice(0,f+1)),m=()=>{let w;return y?w=v:x?w=S:u.route.Component?w=p.createElement(u.route.Component,null):u.route.element?w=u.route.element:w=d,p.createElement(Rb,{match:u,routeContext:{outlet:d,matches:g,isDataRoute:n!=null},children:w})};return n&&(u.route.ErrorBoundary||u.route.errorElement||f===0)?p.createElement(Nb,{location:n.location,revalidation:n.revalidation,component:v,error:y,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):m()},null)}var nv=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(nv||{}),rv=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(rv||{});function Db(e){let t=p.useContext(Rd);return t||Pe(!1),t}function Ab(e){let t=p.useContext(Eb);return t||Pe(!1),t}function Lb(e){let t=p.useContext(Kn);return t||Pe(!1),t}function sv(e){let t=Lb(),n=t.matches[t.matches.length-1];return n.route.id||Pe(!1),n.route.id}function _b(){var e;let t=p.useContext(ev),n=Ab(),r=sv();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Ob(){let{router:e}=Db(nv.UseNavigateStable),t=sv(rv.UseNavigateStable),n=p.useRef(!1);return tv(()=>{n.current=!0}),p.useCallback(function(s,o){o===void 0&&(o={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,po({fromRouteId:t},o)))},[e,t])}const Fh={};function Ib(e,t,n){Fh[e]||(Fh[e]=!0)}function Vb(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function ov(e){let{to:t,replace:n,state:r,relative:s}=e;No()||Pe(!1);let{future:o,static:i}=p.useContext(jo),{matches:a}=p.useContext(Kn),{pathname:l}=Fa(),c=za(),d=qy(t,Zy(a,o.v7_relativeSplatPath),l,s==="path"),u=JSON.stringify(d);return p.useEffect(()=>c(JSON.parse(u),{replace:n,state:r,relative:s}),[c,u,s,n,r]),null}function vn(e){Pe(!1)}function Fb(e){let{basename:t="/",children:n=null,location:r,navigationType:s=jn.Pop,navigator:o,static:i=!1,future:a}=e;No()&&Pe(!1);let l=t.replace(/^\/*/,"/"),c=p.useMemo(()=>({basename:l,navigator:o,static:i,future:po({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof r=="string"&&(r=ds(r));let{pathname:d="/",search:u="",hash:f="",state:y=null,key:x="default"}=r,v=p.useMemo(()=>{let S=Qy(d,l);return S==null?null:{location:{pathname:S,search:u,hash:f,state:y,key:x},navigationType:s}},[l,d,u,f,y,x,s]);return v==null?null:p.createElement(jo.Provider,{value:c},p.createElement(Va.Provider,{children:n,value:v}))}function zb(e){let{children:t,location:n}=e;return Cb(sc(t),n)}new Promise(()=>{});function sc(e,t){t===void 0&&(t=[]);let n=[];return p.Children.forEach(e,(r,s)=>{if(!p.isValidElement(r))return;let o=[...t,s];if(r.type===p.Fragment){n.push.apply(n,sc(r.props.children,o));return}r.type!==vn&&Pe(!1),!r.props.index||!r.props.children||Pe(!1);let i={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=sc(r.props.children,o)),n.push(i)}),n}/**
|
|
60
|
+
* React Router DOM v6.30.3
|
|
61
|
+
*
|
|
62
|
+
* Copyright (c) Remix Software Inc.
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the MIT license found in the
|
|
65
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
66
|
+
*
|
|
67
|
+
* @license MIT
|
|
68
|
+
*/const Bb="6";try{window.__reactRouterVersion=Bb}catch{}const $b="startTransition",zh=Sa[$b];function Ub(e){let{basename:t,children:n,future:r,window:s}=e,o=p.useRef();o.current==null&&(o.current=QS({window:s,v5Compat:!0}));let i=o.current,[a,l]=p.useState({action:i.action,location:i.location}),{v7_startTransition:c}=r||{},d=p.useCallback(u=>{c&&zh?zh(()=>l(u)):l(u)},[l,c]);return p.useLayoutEffect(()=>i.listen(d),[i,d]),p.useEffect(()=>Vb(r),[r]),p.createElement(Fb,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:i,future:r})}var Bh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Bh||(Bh={}));var $h;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})($h||($h={}));const Md=p.createContext({});function Dd(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const Wb=typeof window<"u",iv=Wb?p.useLayoutEffect:p.useEffect,Ba=p.createContext(null);function Ad(e,t){e.indexOf(t)===-1&&e.push(t)}function oa(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Xt=(e,t,n)=>n>t?t:n<e?e:n;let Ld=()=>{};const $n={},av=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function lv(e){return typeof e=="object"&&e!==null}const uv=e=>/^0[^.\s]+$/u.test(e);function cv(e){let t;return()=>(t===void 0&&(t=e()),t)}const wt=e=>e,Hb=(e,t)=>n=>t(e(n)),Ro=(...e)=>e.reduce(Hb),mo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class _d{constructor(){this.subscriptions=[]}add(t){return Ad(this.subscriptions,t),()=>oa(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ct=e=>e*1e3,vt=e=>e/1e3;function dv(e,t){return t?e*(1e3/t):0}const fv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Gb=1e-7,Kb=12;function Yb(e,t,n,r,s){let o,i,a=0;do i=t+(n-t)/2,o=fv(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>Gb&&++a<Kb);return i}function Mo(e,t,n,r){if(e===t&&n===r)return wt;const s=o=>Yb(o,0,1,e,n);return o=>o===0||o===1?o:fv(s(o),t,r)}const hv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,pv=e=>t=>1-e(1-t),mv=Mo(.33,1.53,.69,.99),Od=pv(mv),gv=hv(Od),yv=e=>e>=1?1:(e*=2)<1?.5*Od(e):.5*(2-Math.pow(2,-10*(e-1))),Id=e=>1-Math.sin(Math.acos(e)),vv=pv(Id),xv=hv(Id),Xb=Mo(.42,0,1,1),Qb=Mo(0,0,.58,1),wv=Mo(.42,0,.58,1),Zb=e=>Array.isArray(e)&&typeof e[0]!="number",Sv=e=>Array.isArray(e)&&typeof e[0]=="number",qb={linear:wt,easeIn:Xb,easeInOut:wv,easeOut:Qb,circIn:Id,circInOut:xv,circOut:vv,backIn:Od,backInOut:gv,backOut:mv,anticipate:yv},Jb=e=>typeof e=="string",Uh=e=>{if(Sv(e)){Ld(e.length===4);const[t,n,r,s]=e;return Mo(t,n,r,s)}else if(Jb(e))return qb[e];return e},ei=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function eE(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(d){i.has(d)&&(c.schedule(d),e()),d(a)}const c={schedule:(d,u=!1,f=!1)=>{const x=f&&s?n:r;return u&&i.add(d),x.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,s){o=!0;return}s=!0;const u=n;n=r,r=u,n.forEach(l),n.clear(),s=!1,o&&(o=!1,c.process(d))}};return c}const tE=40;function bv(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=ei.reduce((w,b)=>(w[b]=eE(o),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:f,render:y,postRender:x}=i,v=()=>{const w=$n.useManualTiming,b=w?s.timestamp:performance.now();n=!1,w||(s.delta=r?1e3/60:Math.max(Math.min(b-s.timestamp,tE),1)),s.timestamp=b,s.isProcessing=!0,a.process(s),l.process(s),c.process(s),d.process(s),u.process(s),f.process(s),y.process(s),x.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(v))},S=()=>{n=!0,r=!0,s.isProcessing||e(v)};return{schedule:ei.reduce((w,b)=>{const C=i[b];return w[b]=(P,E=!1,k=!1)=>(n||S(),C.schedule(P,E,k)),w},{}),cancel:w=>{for(let b=0;b<ei.length;b++)i[ei[b]].cancel(w)},state:s,steps:i}}const{schedule:ie,cancel:Un,state:Oe,steps:Il}=bv(typeof requestAnimationFrame<"u"?requestAnimationFrame:wt,!0);let Ci;function nE(){Ci=void 0}const Ye={now:()=>(Ci===void 0&&Ye.set(Oe.isProcessing||$n.useManualTiming?Oe.timestamp:performance.now()),Ci),set:e=>{Ci=e,queueMicrotask(nE)}},Ev=e=>t=>typeof t=="string"&&t.startsWith(e),kv=Ev("--"),rE=Ev("var(--"),Vd=e=>rE(e)?sE.test(e.split("/*")[0].trim()):!1,sE=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Wh(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const fs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},go={...fs,transform:e=>Xt(0,1,e)},ti={...fs,default:1},Hs=e=>Math.round(e*1e5)/1e5,Fd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function oE(e){return e==null}const iE=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zd=(e,t)=>n=>!!(typeof n=="string"&&iE.test(n)&&n.startsWith(e)||t&&!oE(n)&&Object.prototype.hasOwnProperty.call(n,t)),Cv=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,a]=r.match(Fd);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},aE=e=>Xt(0,255,e),Vl={...fs,transform:e=>Math.round(aE(e))},ar={test:zd("rgb","red"),parse:Cv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Vl.transform(e)+", "+Vl.transform(t)+", "+Vl.transform(n)+", "+Hs(go.transform(r))+")"};function lE(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const oc={test:zd("#"),parse:lE,transform:ar.transform},Do=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),xn=Do("deg"),Kt=Do("%"),V=Do("px"),uE=Do("vh"),cE=Do("vw"),Hh={...Kt,parse:e=>Kt.parse(e)/100,transform:e=>Kt.transform(e*100)},$r={test:zd("hsl","hue"),parse:Cv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Kt.transform(Hs(t))+", "+Kt.transform(Hs(n))+", "+Hs(go.transform(r))+")"},ke={test:e=>ar.test(e)||oc.test(e)||$r.test(e),parse:e=>ar.test(e)?ar.parse(e):$r.test(e)?$r.parse(e):oc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ar.transform(e):$r.transform(e),getAnimatableNone:e=>{const t=ke.parse(e);return t.alpha=0,ke.transform(t)}},dE=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fE(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Fd))==null?void 0:t.length)||0)+(((n=e.match(dE))==null?void 0:n.length)||0)>0}const Pv="number",Tv="color",hE="var",pE="var(",Gh="${}",mE=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function is(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(mE,l=>(ke.test(l)?(r.color.push(o),s.push(Tv),n.push(ke.parse(l))):l.startsWith(pE)?(r.var.push(o),s.push(hE),n.push(l)):(r.number.push(o),s.push(Pv),n.push(parseFloat(l))),++o,Gh)).split(Gh);return{values:n,split:a,indexes:r,types:s}}function gE(e){return is(e).values}function jv({split:e,types:t}){const n=e.length;return r=>{let s="";for(let o=0;o<n;o++)if(s+=e[o],r[o]!==void 0){const i=t[o];i===Pv?s+=Hs(r[o]):i===Tv?s+=ke.transform(r[o]):s+=r[o]}return s}}function yE(e){return jv(is(e))}const vE=e=>typeof e=="number"?0:ke.test(e)?ke.getAnimatableNone(e):e,xE=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:vE(e);function wE(e){const t=is(e);return jv(t)(t.values.map((r,s)=>xE(r,t.split[s])))}const Lt={test:fE,parse:gE,createTransformer:yE,getAnimatableNone:wE};function Fl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function SE({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=Fl(l,a,e+1/3),o=Fl(l,a,e),i=Fl(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function ia(e,t){return n=>n>0?t:e}const he=(e,t,n)=>e+(t-e)*n,zl=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},bE=[oc,ar,$r],EE=e=>bE.find(t=>t.test(e));function Kh(e){const t=EE(e);if(!t)return!1;let n=t.parse(e);return t===$r&&(n=SE(n)),n}const Yh=(e,t)=>{const n=Kh(e),r=Kh(t);if(!n||!r)return ia(e,t);const s={...n};return o=>(s.red=zl(n.red,r.red,o),s.green=zl(n.green,r.green,o),s.blue=zl(n.blue,r.blue,o),s.alpha=he(n.alpha,r.alpha,o),ar.transform(s))},ic=new Set(["none","hidden"]);function kE(e,t){return ic.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function CE(e,t){return n=>he(e,t,n)}function Bd(e){return typeof e=="number"?CE:typeof e=="string"?Vd(e)?ia:ke.test(e)?Yh:jE:Array.isArray(e)?Nv:typeof e=="object"?ke.test(e)?Yh:PE:ia}function Nv(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>Bd(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function PE(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Bd(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function TE(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],i=e.indexes[o][r[o]],a=e.values[i]??0;n[s]=a,r[o]++}return n}const jE=(e,t)=>{const n=Lt.createTransformer(t),r=is(e),s=is(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?ic.has(e)&&!s.values.length||ic.has(t)&&!r.values.length?kE(e,t):Ro(Nv(TE(r,s),s.values),n):ia(e,t)};function Rv(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?he(e,t,n):Bd(e)(e,t)}const NE=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ie.update(t,n),stop:()=>Un(t),now:()=>Oe.isProcessing?Oe.timestamp:Ye.now()}},Mv=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},aa=2e4;function $d(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<aa;)t+=n,r=e.next(t);return t>=aa?1/0:t}function RE(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min($d(r),aa);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:vt(s)}}const Se={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function ac(e,t){return e*Math.sqrt(1-t*t)}const ME=12;function DE(e,t,n){let r=n;for(let s=1;s<ME;s++)r=r-e(r)/t(r);return r}const Bl=.001;function AE({duration:e=Se.duration,bounce:t=Se.bounce,velocity:n=Se.velocity,mass:r=Se.mass}){let s,o,i=1-t;i=Xt(Se.minDamping,Se.maxDamping,i),e=Xt(Se.minDuration,Se.maxDuration,vt(e)),i<1?(s=c=>{const d=c*i,u=d*e,f=d-n,y=ac(c,i),x=Math.exp(-u);return Bl-f/y*x},o=c=>{const u=c*i*e,f=u*n+n,y=Math.pow(i,2)*Math.pow(c,2)*e,x=Math.exp(-u),v=ac(Math.pow(c,2),i);return(-s(c)+Bl>0?-1:1)*((f-y)*x)/v}):(s=c=>{const d=Math.exp(-c*e),u=(c-n)*e+1;return-Bl+d*u},o=c=>{const d=Math.exp(-c*e),u=(n-c)*(e*e);return d*u});const a=5/e,l=DE(s,o,a);if(e=ct(e),isNaN(l))return{stiffness:Se.stiffness,damping:Se.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const LE=["duration","bounce"],_E=["stiffness","damping","mass"];function Xh(e,t){return t.some(n=>e[n]!==void 0)}function OE(e){let t={velocity:Se.velocity,stiffness:Se.stiffness,damping:Se.damping,mass:Se.mass,isResolvedFromDuration:!1,...e};if(!Xh(e,_E)&&Xh(e,LE))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Xt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:Se.mass,stiffness:s,damping:o}}else{const n=AE({...e,velocity:0});t={...t,...n,mass:Se.mass},t.isResolvedFromDuration=!0}return t}function la(e=Se.visualDuration,t=Se.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:d,duration:u,velocity:f,isResolvedFromDuration:y}=OE({...n,velocity:-vt(n.velocity||0)}),x=f||0,v=c/(2*Math.sqrt(l*d)),S=i-o,g=vt(Math.sqrt(l/d)),m=Math.abs(S)<5;r||(r=m?Se.restSpeed.granular:Se.restSpeed.default),s||(s=m?Se.restDelta.granular:Se.restDelta.default);let w,b,C,P,E,k;if(v<1)C=ac(g,v),P=(x+v*g*S)/C,w=T=>{const A=Math.exp(-v*g*T);return i-A*(P*Math.sin(C*T)+S*Math.cos(C*T))},E=v*g*P+S*C,k=v*g*S-P*C,b=T=>Math.exp(-v*g*T)*(E*Math.sin(C*T)+k*Math.cos(C*T));else if(v===1){w=A=>i-Math.exp(-g*A)*(S+(x+g*S)*A);const T=x+g*S;b=A=>Math.exp(-g*A)*(g*T*A-x)}else{const T=g*Math.sqrt(v*v-1);w=oe=>{const ae=Math.exp(-v*g*oe),z=Math.min(T*oe,300);return i-ae*((x+v*g*S)*Math.sinh(z)+T*S*Math.cosh(z))/T};const A=(x+v*g*S)/T,L=v*g*A-S*T,G=v*g*S-A*T;b=oe=>{const ae=Math.exp(-v*g*oe),z=Math.min(T*oe,300);return ae*(L*Math.sinh(z)+G*Math.cosh(z))}}const j={calculatedDuration:y&&u||null,velocity:T=>ct(b(T)),next:T=>{if(!y&&v<1){const L=Math.exp(-v*g*T),G=Math.sin(C*T),oe=Math.cos(C*T),ae=i-L*(P*G+S*oe),z=ct(L*(E*G+k*oe));return a.done=Math.abs(z)<=r&&Math.abs(i-ae)<=s,a.value=a.done?i:ae,a}const A=w(T);if(y)a.done=T>=u;else{const L=ct(b(T));a.done=Math.abs(L)<=r&&Math.abs(i-A)<=s}return a.value=a.done?i:A,a},toString:()=>{const T=Math.min($d(j),aa),A=Mv(L=>j.next(T*L).value,T,30);return T+"ms "+A},toTransition:()=>{}};return j}la.applyToOptions=e=>{const t=RE(e,100,la);return e.ease=t.ease,e.duration=ct(t.duration),e.type="keyframes",e};const IE=5;function Dv(e,t,n){const r=Math.max(t-IE,0);return dv(n-e(r),t-r)}function lc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],f={done:!1,value:u},y=k=>a!==void 0&&k<a||l!==void 0&&k>l,x=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let v=n*t;const S=u+v,g=i===void 0?S:i(S);g!==S&&(v=g-u);const m=k=>-v*Math.exp(-k/r),w=k=>g+m(k),b=k=>{const j=m(k),T=w(k);f.done=Math.abs(j)<=c,f.value=f.done?g:T};let C,P;const E=k=>{y(f.value)&&(C=k,P=la({keyframes:[f.value,x(f.value)],velocity:Dv(w,k,f.value),damping:s,stiffness:o,restDelta:c,restSpeed:d}))};return E(0),{calculatedDuration:null,next:k=>{let j=!1;return!P&&C===void 0&&(j=!0,b(k),E(k)),C!==void 0&&k>=C?P.next(k-C):(!j&&b(k),f)}}}function VE(e,t,n){const r=[],s=n||$n.mix||Rv,o=e.length-1;for(let i=0;i<o;i++){let a=s(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||wt:t;a=Ro(l,a)}r.push(a)}return r}function FE(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(Ld(o===t.length),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=VE(t,r,s),l=a.length,c=d=>{if(i&&d<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const f=mo(e[u],e[u+1],d);return a[u](f)};return n?d=>c(Xt(e[0],e[o-1],d)):c}function zE(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=mo(0,t,r);e.push(he(n,1,s))}}function BE(e){const t=[0];return zE(t,e.length-1),t}function $E(e,t){return e.map(n=>n*t)}function UE(e,t){return e.map(()=>t||wv).splice(0,e.length-1)}function Gs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Zb(r)?r.map(Uh):Uh(r),o={done:!1,value:t[0]},i=$E(n&&n.length===t.length?n:BE(t),e),a=FE(i,t,{ease:Array.isArray(s)?s:UE(t,s)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const WE=e=>e!==null;function $a(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(WE),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const HE={decay:lc,inertia:lc,tween:Gs,keyframes:Gs,spring:la};function Av(e){typeof e.type=="string"&&(e.type=HE[e.type])}class Ud{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const GE=e=>e/100;class ua extends Ud{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,s;const{motionValue:n}=this.options;n&&n.updatedAt!==Ye.now()&&this.tick(Ye.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(s=(r=this.options).onStop)==null||s.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Av(t);const{type:n=Gs,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=t;let{keyframes:a}=t;const l=n||Gs;l!==Gs&&typeof a[0]!="number"&&(this.mixKeyframes=Ro(GE,Rv(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-i})),c.calculatedDuration===null&&(c.calculatedDuration=$d(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:d,repeat:u,repeatType:f,repeatDelay:y,type:x,onUpdate:v,finalKeyframe:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),m=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let w=this.currentTime,b=r;if(u){const k=Math.min(this.currentTime,s)/a;let j=Math.floor(k),T=k%1;!T&&k>=1&&(T=1),T===1&&j--,j=Math.min(j,u+1),!!(j%2)&&(f==="reverse"?(T=1-T,y&&(T-=y/a)):f==="mirror"&&(b=i)),w=Xt(0,1,T)*a}let C;m?(this.delayState.value=d[0],C=this.delayState):C=b.next(w),o&&!m&&(C.value=o(C.value));let{done:P}=C;!m&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return E&&x!==lc&&(C.value=$a(d,this.options,S,this.speed)),v&&v(C.value),E&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return vt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+vt(t)}get time(){return vt(this.currentTime)}set time(t){t=ct(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return Dv(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(Ye.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=vt(this.currentTime))}play(){var s,o;if(this.isStopped)return;const{driver:t=NE,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(o=(s=this.options).onPlay)==null||o.call(s);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ye.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function KE(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const lr=e=>e*180/Math.PI,uc=e=>{const t=lr(Math.atan2(e[1],e[0]));return cc(t)},YE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:uc,rotateZ:uc,skewX:e=>lr(Math.atan(e[1])),skewY:e=>lr(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},cc=e=>(e=e%360,e<0&&(e+=360),e),Qh=uc,Zh=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),qh=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),XE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Zh,scaleY:qh,scale:e=>(Zh(e)+qh(e))/2,rotateX:e=>cc(lr(Math.atan2(e[6],e[5]))),rotateY:e=>cc(lr(Math.atan2(-e[2],e[0]))),rotateZ:Qh,rotate:Qh,skewX:e=>lr(Math.atan(e[4])),skewY:e=>lr(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function dc(e){return e.includes("scale")?1:0}function fc(e,t){if(!e||e==="none")return dc(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=XE,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=YE,s=a}if(!s)return dc(t);const o=r[t],i=s[1].split(",").map(ZE);return typeof o=="function"?o(i):i[o]}const QE=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return fc(n,t)};function ZE(e){return parseFloat(e.trim())}const hs=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ps=new Set(hs),Jh=e=>e===fs||e===V,qE=new Set(["x","y","z"]),JE=hs.filter(e=>!qE.has(e));function ek(e){const t=[];return JE.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Nn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const s=e.max-e.min;return r==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>fc(t,"x"),y:(e,{transform:t})=>fc(t,"y")};Nn.translateX=Nn.x;Nn.translateY=Nn.y;const fr=new Set;let hc=!1,pc=!1,mc=!1;function Lv(){if(pc){const e=Array.from(fr).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=ek(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{var a;(a=r.getValue(o))==null||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}pc=!1,hc=!1,fr.forEach(e=>e.complete(mc)),fr.clear()}function _v(){fr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(pc=!0)})}function tk(){mc=!0,_v(),Lv(),mc=!1}class Wd{constructor(t,n,r,s,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(fr.add(this),hc||(hc=!0,ie.read(_v),ie.resolveKeyframes(Lv))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s==null?void 0:s.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const a=r.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),s&&o===void 0&&s.set(t[0])}KE(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),fr.delete(this)}cancel(){this.state==="scheduled"&&(fr.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const nk=e=>e.startsWith("--");function Ov(e,t,n){nk(t)?e.style.setProperty(t,n):e.style[t]=n}const rk={};function Iv(e,t){const n=cv(e);return()=>rk[t]??n()}const sk=Iv(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Vv=Iv(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ls=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ep={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ls([0,.65,.55,1]),circOut:Ls([.55,0,1,.45]),backIn:Ls([.31,.01,.66,-.59]),backOut:Ls([.33,1.53,.69,.99])};function Fv(e,t){if(e)return typeof e=="function"?Vv()?Mv(e,t):"ease-out":Sv(e)?Ls(e):Array.isArray(e)?e.map(n=>Fv(n,t)||ep.easeOut):ep[e]}function ok(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:l}={},c=void 0){const d={[t]:n};l&&(d.offset=l);const u=Fv(a,s);Array.isArray(u)&&(d.easing=u);const f={delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(d,f)}function zv(e){return typeof e=="function"&&"applyToOptions"in e}function ik({type:e,...t}){return zv(e)&&Vv()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Bv extends Ud{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,Ld(typeof t.type!="string");const c=ik(t);this.animation=ok(n,r,s,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const d=$a(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(d),Ov(n,r,d),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,s;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((s=(r=this.animation).commitStyles)==null||s.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return vt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+vt(t)}get time(){return vt(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ct(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:s}){var o;return this.allowFlatten&&((o=this.animation.effect)==null||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&sk()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),wt):s(this)}}const $v={anticipate:yv,backInOut:gv,circInOut:xv};function ak(e){return e in $v}function lk(e){typeof e.ease=="string"&&ak(e.ease)&&(e.ease=$v[e.ease])}const $l=10;class uk extends Bv{constructor(t){lk(t),Av(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new ua({...i,autoplay:!1}),l=Math.max($l,Ye.now()-this.startTime),c=Xt(0,$l,l-$l),d=a.sample(l).value,{name:u}=this.options;o&&u&&Ov(o,u,d),n.setWithVelocity(a.sample(Math.max(0,l-c)).value,d,c),a.stop()}}const tp=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Lt.test(e)||e==="0")&&!e.startsWith("url("));function ck(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function dk(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=tp(s,t),a=tp(o,t);return!i||!a?!1:ck(e)||(n==="spring"||zv(n))&&r}function gc(e){e.duration=0,e.type="keyframes"}const Uv=new Set(["opacity","clipPath","filter","transform"]),fk=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function hk(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&fk.test(e[t]))return!0;return!1}const pk=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),mk=cv(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gk(e){var u;const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:i,keyframes:a}=e;if(!(((u=t==null?void 0:t.owner)==null?void 0:u.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:d}=t.owner.getProps();return mk()&&n&&(Uv.has(n)||pk.has(n)&&hk(a))&&(n!=="transform"||!d)&&!c&&!r&&s!=="mirror"&&o!==0&&i!=="inertia"}const yk=40;class vk extends Ud{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:l,motionValue:c,element:d,...u}){var x;super(),this.stop=()=>{var v,S;this._animation&&(this._animation.stop(),(v=this.stopTimeline)==null||v.call(this)),(S=this.keyframeResolver)==null||S.cancel()},this.createdAt=Ye.now();const f={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,name:l,motionValue:c,element:d,...u},y=(d==null?void 0:d.KeyframeResolver)||Wd;this.keyframeResolver=new y(a,(v,S,g)=>this.onKeyframesResolved(v,S,f,!g),l,c,d),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,r,s){var g,m;this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:l,isHandoff:c,onUpdate:d}=r;this.resolvedAt=Ye.now();let u=!0;dk(t,o,i,a)||(u=!1,($n.instantAnimations||!l)&&(d==null||d($a(t,r,n))),t[0]=t[t.length-1],gc(r),r.repeat=0);const y={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>yk?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},x=u&&!c&&gk(y),v=(m=(g=y.motionValue)==null?void 0:g.owner)==null?void 0:m.current;let S;if(x)try{S=new uk({...y,element:v})}catch{S=new ua(y)}else S=new ua(y);S.finished.then(()=>{this.notifyFinished()}).catch(wt),this.pendingTimeline&&(this.stopTimeline=S.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=S}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),tk()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function Wv(e,t,n,r=0,s=1){const o=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),i=e.size,a=(i-1)*r;return typeof n=="function"?n(o,i):s===1?o*r:a-o*r}const xk=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wk(e){const t=xk.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function Hv(e,t,n=1){const[r,s]=wk(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return av(i)?parseFloat(i):i}return Vd(s)?Hv(s,t,n+1):s}const Sk={type:"spring",stiffness:500,damping:25,restSpeed:10},bk=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Ek={type:"keyframes",duration:.8},kk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ck=(e,{keyframes:t})=>t.length>2?Ek:ps.has(e)?e.startsWith("scale")?bk(t[1]):Sk:kk;function Gv(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Hd(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?Gv(n,e):n}const Pk=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Tk(e){for(const t in e)if(!Pk.has(t))return!0;return!1}const Gd=(e,t,n,r={},s,o)=>i=>{const a=Hd(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-ct(l);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};Tk(a)||Object.assign(d,Ck(e,d)),d.duration&&(d.duration=ct(d.duration)),d.repeatDelay&&(d.repeatDelay=ct(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(gc(d),d.delay===0&&(u=!0)),($n.instantAnimations||$n.skipAnimations||s!=null&&s.shouldSkipAnimations)&&(u=!0,gc(d),d.delay=0),d.allowFlatten=!a.type&&!a.ease,u&&!o&&t.get()!==void 0){const f=$a(d.keyframes,a);if(f!==void 0){ie.update(()=>{d.onUpdate(f),d.onComplete()});return}}return a.isSync?new ua(d):new vk(d)};function np(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Kd(e,t,n,r){if(typeof t=="function"){const[s,o]=np(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=np(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function hr(e,t,n){const r=e.getProps();return Kd(r,t,n!==void 0?n:r.custom,e)}const Kv=new Set(["width","height","top","left","right","bottom",...hs]),rp=30,jk=e=>!isNaN(parseFloat(e));class Nk{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const s=Ye.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const i of this.dependents)i.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ye.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=jk(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new _d);const r=this.events[t].add(n);return t==="change"?()=>{r(),ie.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ye.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>rp)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,rp);return dv(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function as(e,t){return new Nk(e,t)}const yc=e=>Array.isArray(e);function Rk(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,as(n))}function Mk(e){return yc(e)?e[e.length-1]||0:e}function Dk(e,t){const n=hr(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const a=Mk(o[i]);Rk(e,i,a)}}const Ie=e=>!!(e&&e.getVelocity);function Ak(e){return!!(Ie(e)&&e.add)}function vc(e,t){const n=e.getValue("willChange");if(Ak(n))return n.add(t);if(!n&&$n.WillChange){const r=new $n.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Yd(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Lk="framerAppearId",Yv="data-"+Yd(Lk);function Xv(e){return e.props[Yv]}function _k({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Qv(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o,transitionEnd:i,...a}=t;const l=e.getDefaultTransition();o=o?Gv(o,l):l;const c=o==null?void 0:o.reduceMotion;r&&(o=r);const d=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const f in a){const y=e.getValue(f,e.latestValues[f]??null),x=a[f];if(x===void 0||u&&_k(u,f))continue;const v={delay:n,...Hd(o||{},f)},S=y.get();if(S!==void 0&&!y.isAnimating()&&!Array.isArray(x)&&x===S&&!v.velocity){ie.update(()=>y.set(x));continue}let g=!1;if(window.MotionHandoffAnimation){const b=Xv(e);if(b){const C=window.MotionHandoffAnimation(b,f,ie);C!==null&&(v.startTime=C,g=!0)}}vc(e,f);const m=c??e.shouldReduceMotion;y.start(Gd(f,y,x,m&&Kv.has(f)?{type:!1}:v,e,g));const w=y.animation;w&&d.push(w)}if(i){const f=()=>ie.update(()=>{i&&Dk(e,i)});d.length?Promise.all(d).then(f):f()}return d}function xc(e,t,n={}){var l;const r=hr(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(Qv(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:u,staggerDirection:f}=s;return Ok(e,t,c,d,u,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,d]=a==="beforeChildren"?[o,i]:[i,o];return c().then(()=>d())}else return Promise.all([o(),i(n.delay)])}function Ok(e,t,n=0,r=0,s=0,o=1,i){const a=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),a.push(xc(l,t,{...i,delay:n+(typeof r=="function"?0:r)+Wv(e.variantChildren,l,r,s,o)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(a)}function Ik(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>xc(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=xc(e,t,n);else{const s=typeof t=="function"?hr(e,t,n.custom):t;r=Promise.all(Qv(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const Vk={test:e=>e==="auto",parse:e=>e},Zv=e=>t=>t.test(e),qv=[fs,V,Kt,xn,cE,uE,Vk],sp=e=>qv.find(Zv(e));function Fk(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||uv(e):!0}const zk=new Set(["brightness","contrast","saturate","opacity"]);function Bk(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Fd)||[];if(!r)return e;const s=n.replace(r,"");let o=zk.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const $k=/\b([a-z-]*)\(.*?\)/gu,wc={...Lt,getAnimatableNone:e=>{const t=e.match($k);return t?t.map(Bk).join(" "):e}},Sc={...Lt,getAnimatableNone:e=>{const t=Lt.parse(e);return Lt.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},op={...fs,transform:Math.round},Uk={rotate:xn,rotateX:xn,rotateY:xn,rotateZ:xn,scale:ti,scaleX:ti,scaleY:ti,scaleZ:ti,skew:xn,skewX:xn,skewY:xn,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:go,originX:Hh,originY:Hh,originZ:V},Xd={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,inset:V,insetBlock:V,insetBlockStart:V,insetBlockEnd:V,insetInline:V,insetInlineStart:V,insetInlineEnd:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,paddingBlock:V,paddingBlockStart:V,paddingBlockEnd:V,paddingInline:V,paddingInlineStart:V,paddingInlineEnd:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,marginBlock:V,marginBlockStart:V,marginBlockEnd:V,marginInline:V,marginInlineStart:V,marginInlineEnd:V,fontSize:V,backgroundPositionX:V,backgroundPositionY:V,...Uk,zIndex:op,fillOpacity:go,strokeOpacity:go,numOctaves:op},Wk={...Xd,color:ke,backgroundColor:ke,outlineColor:ke,fill:ke,stroke:ke,borderColor:ke,borderTopColor:ke,borderRightColor:ke,borderBottomColor:ke,borderLeftColor:ke,filter:wc,WebkitFilter:wc,mask:Sc,WebkitMask:Sc},Jv=e=>Wk[e],Hk=new Set([wc,Sc]);function e0(e,t){let n=Jv(e);return Hk.has(n)||(n=Lt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Gk=new Set(["auto","none","0"]);function Kk(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!Gk.has(o)&&is(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=e0(n,s)}class Yk extends Wd{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let u=t[d];if(typeof u=="string"&&(u=u.trim(),Vd(u))){const f=Hv(u,n.current);f!==void 0&&(t[d]=f),d===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Kv.has(r)||t.length!==2)return;const[s,o]=t,i=sp(s),a=sp(o),l=Wh(s),c=Wh(o);if(l!==c&&Nn[r]){this.needsMeasurement=!0;return}if(i!==a)if(Jh(i)&&Jh(a))for(let d=0;d<t.length;d++){const u=t[d];typeof u=="string"&&(t[d]=parseFloat(u))}else Nn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||Fk(t[s]))&&r.push(s);r.length&&Kk(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Nn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,i=r[o];r[o]=Nn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function t0(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(n==null?void 0:n[e])??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(r=>r!=null)}const n0=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Pi(e){return lv(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Qd}=bv(queueMicrotask,!1),jt={x:!1,y:!1};function r0(){return jt.x||jt.y}function Xk(e){return e==="x"||e==="y"?jt[e]?null:(jt[e]=!0,()=>{jt[e]=!1}):jt.x||jt.y?null:(jt.x=jt.y=!0,()=>{jt.x=jt.y=!1})}function s0(e,t){const n=t0(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Qk(e){return!(e.pointerType==="touch"||r0())}function Zk(e,t,n={}){const[r,s,o]=s0(e,n);return r.forEach(i=>{let a=!1,l=!1,c;const d=()=>{i.removeEventListener("pointerleave",x)},u=S=>{c&&(c(S),c=void 0),d()},f=S=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,u(S))},y=()=>{a=!0,window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",f,s)},x=S=>{if(S.pointerType!=="touch"){if(a){l=!0;return}u(S)}},v=S=>{if(!Qk(S))return;l=!1;const g=t(i,S);typeof g=="function"&&(c=g,i.addEventListener("pointerleave",x,s))};i.addEventListener("pointerenter",v,s),i.addEventListener("pointerdown",y,s)}),o}const o0=(e,t)=>t?e===t?!0:o0(e,t.parentElement):!1,Zd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,qk=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Jk(e){return qk.has(e.tagName)||e.isContentEditable===!0}const eC=new Set(["INPUT","SELECT","TEXTAREA"]);function tC(e){return eC.has(e.tagName)||e.isContentEditable===!0}const Ti=new WeakSet;function ip(e){return t=>{t.key==="Enter"&&e(t)}}function Ul(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const nC=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=ip(()=>{if(Ti.has(n))return;Ul(n,"down");const s=ip(()=>{Ul(n,"up")}),o=()=>Ul(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ap(e){return Zd(e)&&!r0()}const lp=new WeakSet;function rC(e,t,n={}){const[r,s,o]=s0(e,n),i=a=>{const l=a.currentTarget;if(!ap(a)||lp.has(a))return;Ti.add(l),n.stopPropagation&&lp.add(a);const c=t(l,a),d=(y,x)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",f),Ti.has(l)&&Ti.delete(l),ap(y)&&typeof c=="function"&&c(y,{success:x})},u=y=>{d(y,l===window||l===document||n.useGlobalTarget||o0(l,y.target))},f=y=>{d(y,!1)};window.addEventListener("pointerup",u,s),window.addEventListener("pointercancel",f,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,s),Pi(a)&&(a.addEventListener("focus",c=>nC(c,s)),!Jk(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function qd(e){return lv(e)&&"ownerSVGElement"in e}const ji=new WeakMap;let wn;const i0=(e,t,n)=>(r,s)=>s&&s[0]?s[0][e+"Size"]:qd(r)&&"getBBox"in r?r.getBBox()[t]:r[n],sC=i0("inline","width","offsetWidth"),oC=i0("block","height","offsetHeight");function iC({target:e,borderBoxSize:t}){var n;(n=ji.get(e))==null||n.forEach(r=>{r(e,{get width(){return sC(e,t)},get height(){return oC(e,t)}})})}function aC(e){e.forEach(iC)}function lC(){typeof ResizeObserver>"u"||(wn=new ResizeObserver(aC))}function uC(e,t){wn||lC();const n=t0(e);return n.forEach(r=>{let s=ji.get(r);s||(s=new Set,ji.set(r,s)),s.add(t),wn==null||wn.observe(r)}),()=>{n.forEach(r=>{const s=ji.get(r);s==null||s.delete(t),s!=null&&s.size||wn==null||wn.unobserve(r)})}}const Ni=new Set;let Ur;function cC(){Ur=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ni.forEach(t=>t(e))},window.addEventListener("resize",Ur)}function dC(e){return Ni.add(e),Ur||cC(),()=>{Ni.delete(e),!Ni.size&&typeof Ur=="function"&&(window.removeEventListener("resize",Ur),Ur=void 0)}}function up(e,t){return typeof e=="function"?dC(e):uC(e,t)}function fC(e){return qd(e)&&e.tagName==="svg"}const hC=[...qv,ke,Lt],pC=e=>hC.find(Zv(e)),cp=()=>({translate:0,scale:1,origin:0,originPoint:0}),Wr=()=>({x:cp(),y:cp()}),dp=()=>({min:0,max:0}),je=()=>({x:dp(),y:dp()}),mC=new WeakMap;function Ua(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function yo(e){return typeof e=="string"||Array.isArray(e)}const Jd=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ef=["initial",...Jd];function Wa(e){return Ua(e.animate)||ef.some(t=>yo(e[t]))}function a0(e){return!!(Wa(e)||e.variants)}function gC(e,t,n){for(const r in t){const s=t[r],o=n[r];if(Ie(s))e.addValue(r,s);else if(Ie(o))e.addValue(r,as(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,as(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const bc={current:null},l0={current:!1},yC=typeof window<"u";function vC(){if(l0.current=!0,!!yC)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>bc.current=e.matches;e.addEventListener("change",t),t()}else bc.current=!1}const fp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ca={};function u0(e){ca=e}function xC(){return ca}class wC{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,skipAnimations:o,blockInitialAnimation:i,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Wd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const y=Ye.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,ie.render(this.render,!1,!0))};const{latestValues:c,renderState:d}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=o,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=Wa(n),this.isVariantNode=a0(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in f){const x=f[y];c[y]!==void 0&&Ie(x)&&x.set(c[y])}}mount(t){var n,r;if(this.hasBeenMounted)for(const s in this.initialValues)(n=this.values.get(s))==null||n.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];this.current=t,mC.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((s,o)=>this.bindToMotionValue(o,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(l0.current||vC(),this.shouldReduceMotion=bc.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Un(this.notifyUpdate),Un(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&Uv.has(t)&&this.current instanceof HTMLElement){const{factory:i,keyframes:a,times:l,ease:c,duration:d}=n.accelerate,u=new Bv({element:this.current,name:t,keyframes:a,times:l,ease:c,duration:ct(d)}),f=i(u);this.valueSubscriptions.set(t,()=>{f(),u.cancel()});return}const r=ps.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&ie.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;typeof window<"u"&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ca){const n=ca[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):je()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<fp.length;r++){const s=fp[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=gC(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=as(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(av(r)||uv(r))?r=parseFloat(r):!pC(r)&&Lt.test(n)&&(r=e0(t,n)),this.setBaseTarget(t,Ie(r)?r.get():r)),Ie(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Kd(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ie(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new _d),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Qd.render(this.render)}}class c0 extends wC{constructor(){super(...arguments),this.KeyframeResolver=Yk}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ie(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Yn{constructor(t){this.isMounted=!1,this.node=t}update(){}}function d0({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function SC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bC(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Wl(e){return e===void 0||e===1}function Ec({scale:e,scaleX:t,scaleY:n}){return!Wl(e)||!Wl(t)||!Wl(n)}function nr(e){return Ec(e)||f0(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function f0(e){return hp(e.x)||hp(e.y)}function hp(e){return e&&e!=="0%"}function da(e,t,n){const r=e-n,s=t*r;return n+s}function pp(e,t,n,r,s){return s!==void 0&&(e=da(e,s,r)),da(e,n,r)+t}function kc(e,t=0,n=1,r,s){e.min=pp(e.min,t,n,r,s),e.max=pp(e.max,t,n,r,s)}function h0(e,{x:t,y:n}){kc(e.x,t.translate,t.scale,t.originPoint),kc(e.y,n.translate,n.scale,n.originPoint)}const mp=.999999999999,gp=1.0000000000001;function EC(e,t,n,r=!1){var a;const s=n.length;if(!s)return;t.x=t.y=1;let o,i;for(let l=0;l<s;l++){o=n[l],i=o.projectionDelta;const{visualElement:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&($t(e.x,-o.scroll.offset.x),$t(e.y,-o.scroll.offset.y)),i&&(t.x*=i.x.scale,t.y*=i.y.scale,h0(e,i)),r&&nr(o.latestValues)&&Ri(e,o.latestValues,(a=o.layout)==null?void 0:a.layoutBox))}t.x<gp&&t.x>mp&&(t.x=1),t.y<gp&&t.y>mp&&(t.y=1)}function $t(e,t){e.min+=t,e.max+=t}function yp(e,t,n,r,s=.5){const o=he(e.min,e.max,s);kc(e,t,n,o,r)}function vp(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Ri(e,t,n){const r=n??e;yp(e.x,vp(t.x,r.x),t.scaleX,t.scale,t.originX),yp(e.y,vp(t.y,r.y),t.scaleY,t.scale,t.originY)}function p0(e,t){return d0(bC(e.getBoundingClientRect(),t))}function kC(e,t,n){const r=p0(e,n),{scroll:s}=t;return s&&($t(r.x,s.offset.x),$t(r.y,s.offset.y)),r}const CC={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},PC=hs.length;function TC(e,t,n){let r="",s=!0;for(let o=0;o<PC;o++){const i=hs[o],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(i.startsWith("scale")?1:0);else{const c=parseFloat(a);l=i.startsWith("scale")?c===1:c===0}if(!l||n){const c=n0(a,Xd[i]);if(!l){s=!1;const d=CC[i]||i;r+=`${d}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function tf(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(ps.has(l)){i=!0;continue}else if(kv(l)){s[l]=c;continue}else{const d=n0(c,Xd[l]);l.startsWith("origin")?(a=!0,o[l]=d):r[l]=d}}if(t.transform||(i||n?r.transform=TC(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:d=0}=o;r.transformOrigin=`${l} ${c} ${d}`}}function m0(e,{style:t,vars:n},r,s){const o=e.style;let i;for(i in t)o[i]=t[i];s==null||s.applyProjectionStyles(o,r);for(i in n)o.setProperty(i,n[i])}function xp(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ps={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(V.test(e))e=parseFloat(e);else return e;const n=xp(e,t.target.x),r=xp(e,t.target.y);return`${n}% ${r}%`}},jC={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Lt.parse(e);if(s.length>5)return r;const o=Lt.createTransformer(e),i=typeof s[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;s[0+i]/=a,s[1+i]/=l;const c=he(a,l,.5);return typeof s[2+i]=="number"&&(s[2+i]/=c),typeof s[3+i]=="number"&&(s[3+i]/=c),o(s)}},Cc={borderRadius:{...Ps,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ps,borderTopRightRadius:Ps,borderBottomLeftRadius:Ps,borderBottomRightRadius:Ps,boxShadow:jC};function g0(e,{layout:t,layoutId:n}){return ps.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Cc[e]||e==="opacity")}function nf(e,t,n){var i;const r=e.style,s=t==null?void 0:t.style,o={};if(!r)return o;for(const a in r)(Ie(r[a])||s&&Ie(s[a])||g0(a,e)||((i=n==null?void 0:n.getValue(a))==null?void 0:i.liveStyle)!==void 0)&&(o[a]=r[a]);return o}function NC(e){return window.getComputedStyle(e)}class RC extends c0{constructor(){super(...arguments),this.type="html",this.renderInstance=m0}readValueFromInstance(t,n){var r;if(ps.has(n))return(r=this.projection)!=null&&r.isProjecting?dc(n):QE(t,n);{const s=NC(t),o=(kv(n)?s.getPropertyValue(n):s[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return p0(t,n)}build(t,n,r){tf(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return nf(t,n,r)}}const MC={offset:"stroke-dashoffset",array:"stroke-dasharray"},DC={offset:"strokeDashoffset",array:"strokeDasharray"};function AC(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?MC:DC;e[o.offset]=`${-r}`,e[o.array]=`${t} ${n}`}const LC=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function y0(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...a},l,c,d){if(tf(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:u,style:f}=e;u.transform&&(f.transform=u.transform,delete u.transform),(f.transform||u.transformOrigin)&&(f.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete u.transformBox);for(const y of LC)u[y]!==void 0&&(f[y]=u[y],delete u[y]);t!==void 0&&(u.x=t),n!==void 0&&(u.y=n),r!==void 0&&(u.scale=r),s!==void 0&&AC(u,s,o,i,!1)}const v0=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),x0=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _C(e,t,n,r){m0(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(v0.has(s)?s:Yd(s),t.attrs[s])}function w0(e,t,n){const r=nf(e,t,n);for(const s in e)if(Ie(e[s])||Ie(t[s])){const o=hs.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}class OC extends c0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=je}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ps.has(n)){const r=Jv(n);return r&&r.default||0}return n=v0.has(n)?n:Yd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return w0(t,n,r)}build(t,n,r){y0(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){_C(t,n,r,s)}mount(t){this.isSVGTag=x0(t.tagName),super.mount(t)}}const IC=ef.length;function S0(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?S0(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<IC;n++){const r=ef[n],s=e.props[r];(yo(s)||s===!1)&&(t[r]=s)}return t}function b0(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const VC=[...Jd].reverse(),FC=Jd.length;function zC(e){return t=>Promise.all(t.map(({animation:n,options:r})=>Ik(e,n,r)))}function BC(e){let t=zC(e),n=wp(),r=!0,s=!1;const o=c=>(d,u)=>{var y;const f=hr(e,u,c==="exit"?(y=e.presenceContext)==null?void 0:y.custom:void 0);if(f){const{transition:x,transitionEnd:v,...S}=f;d={...d,...S,...v}}return d};function i(c){t=c(e)}function a(c){const{props:d}=e,u=S0(e.parent)||{},f=[],y=new Set;let x={},v=1/0;for(let g=0;g<FC;g++){const m=VC[g],w=n[m],b=d[m]!==void 0?d[m]:u[m],C=yo(b),P=m===c?w.isActive:null;P===!1&&(v=g);let E=b===u[m]&&b!==d[m]&&C;if(E&&(r||s)&&e.manuallyAnimateOnMount&&(E=!1),w.protectedKeys={...x},!w.isActive&&P===null||!b&&!w.prevProp||Ua(b)||typeof b=="boolean")continue;if(m==="exit"&&w.isActive&&P!==!0){w.prevResolvedValues&&(x={...x,...w.prevResolvedValues});continue}const k=$C(w.prevProp,b);let j=k||m===c&&w.isActive&&!E&&C||g>v&&C,T=!1;const A=Array.isArray(b)?b:[b];let L=A.reduce(o(m),{});P===!1&&(L={});const{prevResolvedValues:G={}}=w,oe={...G,...L},ae=N=>{j=!0,y.has(N)&&(T=!0,y.delete(N)),w.needsAnimating[N]=!0;const _=e.getValue(N);_&&(_.liveStyle=!1)};for(const N in oe){const _=L[N],I=G[N];if(x.hasOwnProperty(N))continue;let B=!1;yc(_)&&yc(I)?B=!b0(_,I):B=_!==I,B?_!=null?ae(N):y.add(N):_!==void 0&&y.has(N)?ae(N):w.protectedKeys[N]=!0}w.prevProp=b,w.prevResolvedValues=L,w.isActive&&(x={...x,...L}),(r||s)&&e.blockInitialAnimation&&(j=!1);const z=E&&k;j&&(!z||T)&&f.push(...A.map(N=>{const _={type:m};if(typeof N=="string"&&(r||s)&&!z&&e.manuallyAnimateOnMount&&e.parent){const{parent:I}=e,B=hr(I,N);if(I.enteringChildren&&B){const{delayChildren:ne}=B.transition||{};_.delay=Wv(I.enteringChildren,e,ne)}}return{animation:N,options:_}}))}if(y.size){const g={};if(typeof d.initial!="boolean"){const m=hr(e,Array.isArray(d.initial)?d.initial[0]:d.initial);m&&m.transition&&(g.transition=m.transition)}y.forEach(m=>{const w=e.getBaseTarget(m),b=e.getValue(m);b&&(b.liveStyle=!0),g[m]=w??null}),f.push({animation:g})}let S=!!f.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(S=!1),r=!1,s=!1,S?t(f):Promise.resolve()}function l(c,d){var f;if(n[c].isActive===d)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(y=>{var x;return(x=y.animationState)==null?void 0:x.setActive(c,d)}),n[c].isActive=d;const u=a(c);for(const y in n)n[y].protectedKeys={};return u}return{animateChanges:a,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=wp(),s=!0}}}function $C(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!b0(t,e):!1}function Jn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wp(){return{animate:Jn(!0),whileInView:Jn(),whileHover:Jn(),whileTap:Jn(),whileDrag:Jn(),whileFocus:Jn(),exit:Jn()}}function Pc(e,t){e.min=t.min,e.max=t.max}function Tt(e,t){Pc(e.x,t.x),Pc(e.y,t.y)}function Sp(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const E0=1e-4,UC=1-E0,WC=1+E0,k0=.01,HC=0-k0,GC=0+k0;function Xe(e){return e.max-e.min}function KC(e,t,n){return Math.abs(e-t)<=n}function bp(e,t,n,r=.5){e.origin=r,e.originPoint=he(t.min,t.max,e.origin),e.scale=Xe(n)/Xe(t),e.translate=he(n.min,n.max,e.origin)-e.originPoint,(e.scale>=UC&&e.scale<=WC||isNaN(e.scale))&&(e.scale=1),(e.translate>=HC&&e.translate<=GC||isNaN(e.translate))&&(e.translate=0)}function Ks(e,t,n,r){bp(e.x,t.x,n.x,r?r.originX:void 0),bp(e.y,t.y,n.y,r?r.originY:void 0)}function Ep(e,t,n,r=0){const s=r?he(n.min,n.max,r):n.min;e.min=s+t.min,e.max=e.min+Xe(t)}function YC(e,t,n,r){Ep(e.x,t.x,n.x,r==null?void 0:r.x),Ep(e.y,t.y,n.y,r==null?void 0:r.y)}function kp(e,t,n,r=0){const s=r?he(n.min,n.max,r):n.min;e.min=t.min-s,e.max=e.min+Xe(t)}function fa(e,t,n,r){kp(e.x,t.x,n.x,r==null?void 0:r.x),kp(e.y,t.y,n.y,r==null?void 0:r.y)}function Cp(e,t,n,r,s){return e-=t,e=da(e,1/n,r),s!==void 0&&(e=da(e,1/s,r)),e}function XC(e,t=0,n=1,r=.5,s,o=e,i=e){if(Kt.test(t)&&(t=parseFloat(t),t=he(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=he(o.min,o.max,r);e===o&&(a-=t),e.min=Cp(e.min,t,n,a,s),e.max=Cp(e.max,t,n,a,s)}function Pp(e,t,[n,r,s],o,i){XC(e,t[n],t[r],t[s],t.scale,o,i)}const QC=["x","scaleX","originX"],ZC=["y","scaleY","originY"];function Tp(e,t,n,r){Pp(e.x,t,QC,n?n.x:void 0,r?r.x:void 0),Pp(e.y,t,ZC,n?n.y:void 0,r?r.y:void 0)}function jp(e){return e.translate===0&&e.scale===1}function C0(e){return jp(e.x)&&jp(e.y)}function Np(e,t){return e.min===t.min&&e.max===t.max}function qC(e,t){return Np(e.x,t.x)&&Np(e.y,t.y)}function Rp(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function P0(e,t){return Rp(e.x,t.x)&&Rp(e.y,t.y)}function Mp(e){return Xe(e.x)/Xe(e.y)}function Dp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Bt(e){return[e("x"),e("y")]}function JC(e,t,n){let r="";const s=e.x.translate/t.x,o=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((s||o||i)&&(r=`translate3d(${s}px, ${o}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,rotateX:u,rotateY:f,skewX:y,skewY:x}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),u&&(r+=`rotateX(${u}deg) `),f&&(r+=`rotateY(${f}deg) `),y&&(r+=`skewX(${y}deg) `),x&&(r+=`skewY(${x}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const T0=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],e2=T0.length,Ap=e=>typeof e=="string"?parseFloat(e):e,Lp=e=>typeof e=="number"||V.test(e);function t2(e,t,n,r,s,o){s?(e.opacity=he(0,n.opacity??1,n2(r)),e.opacityExit=he(t.opacity??1,0,r2(r))):o&&(e.opacity=he(t.opacity??1,n.opacity??1,r));for(let i=0;i<e2;i++){const a=T0[i];let l=_p(t,a),c=_p(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Lp(l)===Lp(c)?(e[a]=Math.max(he(Ap(l),Ap(c),r),0),(Kt.test(c)||Kt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=he(t.rotate||0,n.rotate||0,r))}function _p(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const n2=j0(0,.5,vv),r2=j0(.5,.95,wt);function j0(e,t,n){return r=>r<e?0:r>t?1:n(mo(e,t,r))}function s2(e,t,n){const r=Ie(e)?e:as(e);return r.start(Gd("",r,t,n)),r.animation}function vo(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const o2=(e,t)=>e.depth-t.depth;class i2{constructor(){this.children=[],this.isDirty=!1}add(t){Ad(this.children,t),this.isDirty=!0}remove(t){oa(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(o2),this.isDirty=!1,this.children.forEach(t)}}function a2(e,t){const n=Ye.now(),r=({timestamp:s})=>{const o=s-n;o>=t&&(Un(r),e(o-t))};return ie.setup(r,!0),()=>Un(r)}function Mi(e){return Ie(e)?e.get():e}class l2{constructor(){this.members=[]}add(t){Ad(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const s=r.instance;(!s||s.isConnected===!1)&&!r.snapshot&&(oa(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(oa(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1&&((n=s.instance)==null?void 0:n.isConnected)!==!1)return this.promote(s),!0}return!1}promote(t,n){var s;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=r.options,{layoutDependency:i}=t.options;(o===void 0||o!==i)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(s=t.root)!=null&&s.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,s,o,i;(r=(n=t.options).onExitComplete)==null||r.call(n),(i=(s=t.resumingFrom)==null?void 0:(o=s.options).onExitComplete)==null||i.call(o)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Di={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Hl=["","X","Y","Z"],u2=1e3;let c2=0;function Gl(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function N0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Xv(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ie,!(s||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&N0(r)}function R0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(i={},a=t==null?void 0:t()){this.id=c2++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(h2),this.nodes.forEach(x2),this.nodes.forEach(w2),this.nodes.forEach(p2)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new i2)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new _d),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=qd(i)&&!fC(i),this.instance=i;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let d,u=0;const f=()=>this.root.updateBlockedByResize=!1;ie.read(()=>{u=window.innerWidth}),e(i,()=>{const y=window.innerWidth;y!==u&&(u=y,this.root.updateBlockedByResize=!0,d&&d(),d=a2(f,250),Di.hasAnimatedSinceResize&&(Di.hasAnimatedSinceResize=!1,this.nodes.forEach(Vp)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:u,hasRelativeLayoutChanged:f,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||c.getDefaultTransition()||C2,{onLayoutAnimationStart:v,onLayoutAnimationComplete:S}=c.getProps(),g=!this.targetLayout||!P0(this.targetLayout,y),m=!u&&f;if(this.options.layoutRoot||this.resumeFrom||m||u&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...Hd(x,"layout"),onPlay:v,onComplete:S};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,m)}else u||Vp(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Un(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(S2),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&N0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const u=this.path[d];u.shouldResetTransform=!0,(typeof u.latestValues.x=="string"||typeof u.latestValues.y=="string")&&(u.isLayoutDirty=!0),u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(g2),this.nodes.forEach(Op);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ip);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(y2),this.nodes.forEach(v2),this.nodes.forEach(d2),this.nodes.forEach(f2)):this.nodes.forEach(Ip),this.clearAllSnapshots();const a=Ye.now();Oe.delta=Xt(0,1e3/60,a-Oe.timestamp),Oe.timestamp=a,Oe.isProcessing=!0,Il.update.process(Oe),Il.preRender.process(Oe),Il.render.process(Oe),Oe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(m2),this.sharedNodes.forEach(b2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ie.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ie.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Xe(this.snapshot.measuredBox.x)&&!Xe(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=je()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!C0(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;i&&this.instance&&(a||nr(this.latestValues)||d)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),P2(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:i}=this.options;if(!i)return je();const a=i.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(T2))){const{scroll:d}=this.root;d&&($t(a.x,d.offset.x),$t(a.y,d.offset.y))}return a}removeElementScroll(i){var l;const a=je();if(Tt(a,i),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:u,options:f}=d;d!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&Tt(a,i),$t(a.x,u.offset.x),$t(a.y,u.offset.y))}return a}applyTransform(i,a=!1,l){var d,u;const c=l||je();Tt(c,i);for(let f=0;f<this.path.length;f++){const y=this.path[f];!a&&y.options.layoutScroll&&y.scroll&&y!==y.root&&($t(c.x,-y.scroll.offset.x),$t(c.y,-y.scroll.offset.y)),nr(y.latestValues)&&Ri(c,y.latestValues,(d=y.layout)==null?void 0:d.layoutBox)}return nr(this.latestValues)&&Ri(c,this.latestValues,(u=this.layout)==null?void 0:u.layoutBox),c}removeTransform(i){var l;const a=je();Tt(a,i);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!nr(d.latestValues))continue;let u;d.instance&&(Ec(d.latestValues)&&d.updateSnapshot(),u=je(),Tt(u,d.measurePageBox())),Tp(a,d.latestValues,(l=d.snapshot)==null?void 0:l.layoutBox,u)}return nr(this.latestValues)&&Tp(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Oe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var y;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(i||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:u}=this.options;if(!this.layout||!(d||u))return;this.resolvedRelativeTargetAt=Oe.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=je(),this.targetWithTransforms=je()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),YC(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Tt(this.target,this.layout.layoutBox),h0(this.target,this.targetDelta)):Tt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ec(this.parent.latestValues)||f0(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,a,l){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=je(),this.relativeTargetOrigin=je(),fa(this.relativeTargetOrigin,a,l,this.options.layoutAnchor||void 0),Tt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let l=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Oe.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;Tt(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,f=this.treeScale.y;EC(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=je());const{target:y}=i;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Sp(this.prevProjectionDelta.x,this.projectionDelta.x),Sp(this.prevProjectionDelta.y,this.projectionDelta.y)),Ks(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==f||!Dp(this.projectionDelta.x,this.prevProjectionDelta.x)||!Dp(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Wr(),this.projectionDelta=Wr(),this.projectionDeltaWithTransform=Wr()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},u=Wr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=je(),y=l?l.source:void 0,x=this.layout?this.layout.source:void 0,v=y!==x,S=this.getStack(),g=!S||S.members.length<=1,m=!!(v&&!g&&this.options.crossfade===!0&&!this.path.some(k2));this.animationProgress=0;let w;this.mixTargetDelta=b=>{const C=b/1e3;Fp(u.x,i.x,C),Fp(u.y,i.y,C),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(fa(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),E2(this.relativeTarget,this.relativeTargetOrigin,f,C),w&&qC(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=je()),Tt(w,this.relativeTarget)),v&&(this.animationValues=d,t2(d,c,this.latestValues,C,m,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(),this.pendingAnimation&&(Un(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ie.update(()=>{Di.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=as(0)),this.motionValue.jump(0,!1),this.currentAnimation=s2(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),i.onUpdate&&i.onUpdate(d)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(u2),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&M0(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||je();const u=Xe(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+u;const f=Xe(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}Tt(a,l),Ri(a,d),Ks(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new l2),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Gl("z",i,c,this.animationValues);for(let d=0;d<Hl.length;d++)Gl(`rotate${Hl[d]}`,i,c,this.animationValues),Gl(`skew${Hl[d]}`,i,c,this.animationValues);i.render();for(const d in c)i.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);i.scheduleRender()}applyProjectionStyles(i,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=Mi(a==null?void 0:a.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=Mi(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!nr(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";const d=c.animationValues||c.latestValues;this.applyTransformsToTarget();let u=JC(this.projectionDeltaWithTransform,this.treeScale,d);l&&(u=l(d,u)),i.transform=u;const{x:f,y}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${y.origin*100}% 0`,c.animationValues?i.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:i.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const x in Cc){if(d[x]===void 0)continue;const{correct:v,applyTo:S,isCSSVariable:g}=Cc[x],m=u==="none"?d[x]:v(d[x],c);if(S){const w=S.length;for(let b=0;b<w;b++)i[S[b]]=m}else g?this.options.visualElement.renderState.vars[x]=m:i[x]=m}this.options.layoutId&&(i.pointerEvents=c===this?Mi(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(Op),this.root.sharedNodes.clear()}}}function d2(e){e.updateLayout()}function f2(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;if(o==="size")Bt(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],y=Xe(f);f.min=r[u].min,f.max=f.min+y});else if(o==="x"||o==="y"){const u=o==="x"?"y":"x";Pc(i?t.measuredBox[u]:t.layoutBox[u],r[u])}else M0(o,t.layoutBox,r)&&Bt(u=>{const f=i?t.measuredBox[u]:t.layoutBox[u],y=Xe(r[u]);f.max=f.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+y)});const a=Wr();Ks(a,r,t.layoutBox);const l=Wr();i?Ks(l,e.applyTransform(s,!0),t.measuredBox):Ks(l,r,t.layoutBox);const c=!C0(a);let d=!1;if(!e.resumeFrom){const u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:y}=u;if(f&&y){const x=e.options.layoutAnchor||void 0,v=je();fa(v,t.layoutBox,f.layoutBox,x);const S=je();fa(S,r,y.layoutBox,x),P0(v,S)||(d=!0),u.options.layoutRoot&&(e.relativeTarget=S,e.relativeTargetOrigin=v,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function h2(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function p2(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function m2(e){e.clearSnapshot()}function Op(e){e.clearMeasurements()}function g2(e){e.isLayoutDirty=!0,e.updateLayout()}function Ip(e){e.isLayoutDirty=!1}function y2(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function v2(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Vp(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function x2(e){e.resolveTargetDelta()}function w2(e){e.calcProjection()}function S2(e){e.resetSkewAndRotation()}function b2(e){e.removeLeadSnapshot()}function Fp(e,t,n){e.translate=he(t.translate,0,n),e.scale=he(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function zp(e,t,n,r){e.min=he(t.min,n.min,r),e.max=he(t.max,n.max,r)}function E2(e,t,n,r){zp(e.x,t.x,n.x,r),zp(e.y,t.y,n.y,r)}function k2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const C2={duration:.45,ease:[.4,0,.1,1]},Bp=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),$p=Bp("applewebkit/")&&!Bp("chrome/")?Math.round:wt;function Up(e){e.min=$p(e.min),e.max=$p(e.max)}function P2(e){Up(e.x),Up(e.y)}function M0(e,t,n){return e==="position"||e==="preserve-aspect"&&!KC(Mp(t),Mp(n),.2)}function T2(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const j2=R0({attachResizeListener:(e,t)=>vo(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Kl={current:void 0},D0=R0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Kl.current){const e=new j2({});e.mount(window),e.setOptions({layoutScroll:!0}),Kl.current=e}return Kl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),rf=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Wp(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function N2(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Wp(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():Wp(e[s],null)}}}}function R2(...e){return p.useCallback(N2(...e),e)}class M2 extends p.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Pi(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,s=Pi(r)&&r.offsetWidth||0,o=Pi(r)&&r.offsetHeight||0,i=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=o-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function D2({children:e,isPresent:t,anchorX:n,anchorY:r,root:s,pop:o}){var f;const i=p.useId(),a=p.useRef(null),l=p.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=p.useContext(rf),d=((f=e.props)==null?void 0:f.ref)??(e==null?void 0:e.ref),u=R2(a,d);return p.useInsertionEffect(()=>{const{width:y,height:x,top:v,left:S,right:g,bottom:m}=l.current;if(t||o===!1||!a.current||!y||!x)return;const w=n==="left"?`left: ${S}`:`right: ${g}`,b=r==="bottom"?`bottom: ${m}`:`top: ${v}`;a.current.dataset.motionPopId=i;const C=document.createElement("style");c&&(C.nonce=c);const P=s??document.head;return P.appendChild(C),C.sheet&&C.sheet.insertRule(`
|
|
69
|
+
[data-motion-pop-id="${i}"] {
|
|
70
|
+
position: absolute !important;
|
|
71
|
+
width: ${y}px !important;
|
|
72
|
+
height: ${x}px !important;
|
|
73
|
+
${w}px !important;
|
|
74
|
+
${b}px !important;
|
|
75
|
+
}
|
|
76
|
+
`),()=>{var E;(E=a.current)==null||E.removeAttribute("data-motion-pop-id"),P.contains(C)&&P.removeChild(C)}},[t]),h.jsx(M2,{isPresent:t,childRef:a,sizeRef:l,pop:o,children:o===!1?e:p.cloneElement(e,{ref:u})})}const A2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:i,anchorX:a,anchorY:l,root:c})=>{const d=Dd(L2),u=p.useId();let f=!0,y=p.useMemo(()=>(f=!1,{id:u,initial:t,isPresent:n,custom:s,onExitComplete:x=>{d.set(x,!0);for(const v of d.values())if(!v)return;r&&r()},register:x=>(d.set(x,!1),()=>d.delete(x))}),[n,d,r]);return o&&f&&(y={...y}),p.useMemo(()=>{d.forEach((x,v)=>d.set(v,!1))},[n]),p.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=h.jsx(D2,{pop:i==="popLayout",isPresent:n,anchorX:a,anchorY:l,root:c,children:e}),h.jsx(Ba.Provider,{value:y,children:e})};function L2(){return new Map}function A0(e=!0){const t=p.useContext(Ba);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=p.useId();p.useEffect(()=>{if(e)return s(o)},[e]);const i=p.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}const ni=e=>e.key||"";function Hp(e){const t=[];return p.Children.forEach(e,n=>{p.isValidElement(n)&&t.push(n)}),t}const Ha=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",anchorY:l="top",root:c})=>{const[d,u]=A0(i),f=p.useMemo(()=>Hp(e),[e]),y=i&&!d?[]:f.map(ni),x=p.useRef(!0),v=p.useRef(f),S=Dd(()=>new Map),g=p.useRef(new Set),[m,w]=p.useState(f),[b,C]=p.useState(f);iv(()=>{x.current=!1,v.current=f;for(let k=0;k<b.length;k++){const j=ni(b[k]);y.includes(j)?(S.delete(j),g.current.delete(j)):S.get(j)!==!0&&S.set(j,!1)}},[b,y.length,y.join("-")]);const P=[];if(f!==m){let k=[...f];for(let j=0;j<b.length;j++){const T=b[j],A=ni(T);y.includes(A)||(k.splice(j,0,T),P.push(T))}return o==="wait"&&P.length&&(k=P),C(Hp(k)),w(f),null}const{forceRender:E}=p.useContext(Md);return h.jsx(h.Fragment,{children:b.map(k=>{const j=ni(k),T=i&&!d?!1:f===b||y.includes(j),A=()=>{if(g.current.has(j))return;if(S.has(j))g.current.add(j),S.set(j,!0);else return;let L=!0;S.forEach(G=>{G||(L=!1)}),L&&(E==null||E(),C(v.current),i&&(u==null||u()),r&&r())};return h.jsx(A2,{isPresent:T,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:c,onExitComplete:T?void 0:A,anchorX:a,anchorY:l,children:k},j)})})},L0=p.createContext({strict:!1}),Gp={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Kp=!1;function _2(){if(Kp)return;const e={};for(const t in Gp)e[t]={isEnabled:n=>Gp[t].some(r=>!!n[r])};u0(e),Kp=!0}function _0(){return _2(),xC()}function O2(e){const t=_0();for(const n in e)t[n]={...t[n],...e[n]};u0(t)}const I2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function ha(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||I2.has(e)}let O0=e=>!ha(e);function V2(e){typeof e=="function"&&(O0=t=>t.startsWith("on")?!ha(t):e(t))}try{V2(require("@emotion/is-prop-valid").default)}catch{}function F2(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||Ie(e[s])||(O0(s)||n===!0&&ha(s)||!t&&!ha(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Ga=p.createContext({});function z2(e,t){if(Wa(e)){const{initial:n,animate:r}=e;return{initial:n===!1||yo(n)?n:void 0,animate:yo(r)?r:void 0}}return e.inherit!==!1?t:{}}function B2(e){const{initial:t,animate:n}=z2(e,p.useContext(Ga));return p.useMemo(()=>({initial:t,animate:n}),[Yp(t),Yp(n)])}function Yp(e){return Array.isArray(e)?e.join(" "):e}const sf=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function I0(e,t,n){for(const r in t)!Ie(t[r])&&!g0(r,n)&&(e[r]=t[r])}function $2({transformTemplate:e},t){return p.useMemo(()=>{const n=sf();return tf(n,t,e),Object.assign({},n.vars,n.style)},[t])}function U2(e,t){const n=e.style||{},r={};return I0(r,n,e),Object.assign(r,$2(e,t)),r}function W2(e,t){const n={},r=U2(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const V0=()=>({...sf(),attrs:{}});function H2(e,t,n,r){const s=p.useMemo(()=>{const o=V0();return y0(o,t,x0(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};I0(o,e.style,e),s.style={...o,...s.style}}return s}const G2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function of(e){return typeof e!="string"||e.includes("-")?!1:!!(G2.indexOf(e)>-1||/[A-Z]/u.test(e))}function K2(e,t,n,{latestValues:r},s,o=!1,i){const l=(i??of(e)?H2:W2)(t,r,s,e),c=F2(t,typeof e=="string",o),d=e!==p.Fragment?{...c,...l,ref:n}:{},{children:u}=t,f=p.useMemo(()=>Ie(u)?u.get():u,[u]);return p.createElement(e,{...d,children:f})}function Y2({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:X2(n,r,s,e),renderState:t()}}function X2(e,t,n,r){const s={},o=r(e,{});for(const f in o)s[f]=Mi(o[f]);let{initial:i,animate:a}=e;const l=Wa(e),c=a0(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||i===!1;const u=d?a:i;if(u&&typeof u!="boolean"&&!Ua(u)){const f=Array.isArray(u)?u:[u];for(let y=0;y<f.length;y++){const x=Kd(e,f[y]);if(x){const{transitionEnd:v,transition:S,...g}=x;for(const m in g){let w=g[m];if(Array.isArray(w)){const b=d?w.length-1:0;w=w[b]}w!==null&&(s[m]=w)}for(const m in v)s[m]=v[m]}}}return s}const F0=e=>(t,n)=>{const r=p.useContext(Ga),s=p.useContext(Ba),o=()=>Y2(e,t,r,s);return n?o():Dd(o)},Q2=F0({scrapeMotionValuesFromProps:nf,createRenderState:sf}),Z2=F0({scrapeMotionValuesFromProps:w0,createRenderState:V0}),q2=Symbol.for("motionComponentSymbol");function J2(e,t,n){const r=p.useRef(n);p.useInsertionEffect(()=>{r.current=n});const s=p.useRef(null);return p.useCallback(o=>{var a;o&&((a=e.onMount)==null||a.call(e,o));const i=r.current;if(typeof i=="function")if(o){const l=i(o);typeof l=="function"&&(s.current=l)}else s.current?(s.current(),s.current=null):i(o);else i&&(i.current=o);t&&(o?t.mount(o):t.unmount())},[t])}const z0=p.createContext({});function Nr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function eP(e,t,n,r,s,o){var w,b;const{visualElement:i}=p.useContext(Ga),a=p.useContext(L0),l=p.useContext(Ba),c=p.useContext(rf),d=c.reducedMotion,u=c.skipAnimations,f=p.useRef(null),y=p.useRef(!1);r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d,skipAnimations:u,isSVG:o}),y.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const x=f.current,v=p.useContext(z0);x&&!x.projection&&s&&(x.type==="html"||x.type==="svg")&&tP(f.current,n,s,v);const S=p.useRef(!1);p.useInsertionEffect(()=>{x&&S.current&&x.update(n,l)});const g=n[Yv],m=p.useRef(!!g&&typeof window<"u"&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,g))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,g)));return iv(()=>{y.current=!0,x&&(S.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),m.current&&x.animationState&&x.animationState.animateChanges())}),p.useEffect(()=>{x&&(!m.current&&x.animationState&&x.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,g)}),m.current=!1),x.enteringChildren=void 0)}),x}function tP(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutAnchor:d,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:B0(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||a&&Nr(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c,layoutAnchor:d})}function B0(e){if(e)return e.options.allowProjection!==!1?e.projection:B0(e.parent)}function Yl(e,{forwardMotionProps:t=!1,type:n}={},r,s){r&&O2(r);const o=n?n==="svg":of(e),i=o?Z2:Q2;function a(c,d){let u;const f={...p.useContext(rf),...c,layoutId:nP(c)},{isStatic:y}=f,x=B2(c),v=i(c,y);if(!y&&typeof window<"u"){rP();const S=sP(f);u=S.MeasureLayout,x.visualElement=eP(e,v,f,s,S.ProjectionNode,o)}return h.jsxs(Ga.Provider,{value:x,children:[u&&x.visualElement?h.jsx(u,{visualElement:x.visualElement,...f}):null,K2(e,c,J2(v,x.visualElement,d),v,y,t,o)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const l=p.forwardRef(a);return l[q2]=e,l}function nP({layoutId:e}){const t=p.useContext(Md).id;return t&&e!==void 0?t+"-"+e:e}function rP(e,t){p.useContext(L0).strict}function sP(e){const t=_0(),{drag:n,layout:r}=t;if(!n&&!r)return{};const s={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function oP(e,t){if(typeof Proxy>"u")return Yl;const n=new Map,r=(o,i)=>Yl(o,i,e,t),s=(o,i)=>r(o,i);return new Proxy(s,{get:(o,i)=>i==="create"?r:(n.has(i)||n.set(i,Yl(i,void 0,e,t)),n.get(i))})}const iP=(e,t)=>t.isSVG??of(e)?new OC(t):new RC(t,{allowProjection:e!==p.Fragment});class aP extends Yn{constructor(t){super(t),t.animationState||(t.animationState=BC(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ua(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let lP=0;class uP extends Yn{constructor(){super(...arguments),this.id=lP++,this.isExitComplete=!1}update(){var o;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:i,custom:a}=this.node.getProps();if(typeof i=="string"){const l=hr(this.node,i,a);if(l){const{transition:c,transitionEnd:d,...u}=l;for(const f in u)(o=this.node.getValue(f))==null||o.jump(u[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const cP={animation:{Feature:aP},exit:{Feature:uP}};function Ao(e){return{point:{x:e.pageX,y:e.pageY}}}const dP=e=>t=>Zd(t)&&e(t,Ao(t));function Ys(e,t,n,r){return vo(e,t,dP(n),r)}const $0=({current:e})=>e?e.ownerDocument.defaultView:null,Xp=(e,t)=>Math.abs(e-t);function fP(e,t){const n=Xp(e.x,t.x),r=Xp(e.y,t.y);return Math.sqrt(n**2+r**2)}const Qp=new Set(["auto","scroll"]);class U0{constructor(t,n,{transformPagePoint:r,contextWindow:s=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=y=>{this.handleScroll(y.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ri(this.lastRawMoveEventInfo,this.transformPagePoint));const y=Xl(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,v=fP(y.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!v)return;const{point:S}=y,{timestamp:g}=Oe;this.history.push({...S,timestamp:g});const{onStart:m,onMove:w}=this.handlers;x||(m&&m(this.lastMoveEvent,y),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,y)},this.handlePointerMove=(y,x)=>{this.lastMoveEvent=y,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=ri(x,this.transformPagePoint),ie.update(this.updatePoint,!0)},this.handlePointerUp=(y,x)=>{this.end();const{onEnd:v,onSessionEnd:S,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Xl(y.type==="pointercancel"?this.lastMoveEventInfo:ri(x,this.transformPagePoint),this.history);this.startEvent&&v&&v(y,m),S&&S(y,m)},!Zd(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=i,this.contextWindow=s||window;const l=Ao(t),c=ri(l,this.transformPagePoint),{point:d}=c,{timestamp:u}=Oe;this.history=[{...d,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,Xl(c,this.history)),this.removeListeners=Ro(Ys(this.contextWindow,"pointermove",this.handlePointerMove),Ys(this.contextWindow,"pointerup",this.handlePointerUp),Ys(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(Qp.has(r.overflowX)||Qp.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,s=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},o={x:s.x-n.x,y:s.y-n.y};o.x===0&&o.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o.x,this.lastMoveEventInfo.point.y+=o.y):this.history.length>0&&(this.history[0].x-=o.x,this.history[0].y-=o.y),this.scrollPositions.set(t,s),ie.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Un(this.updatePoint)}}function ri(e,t){return t?{point:t(e.point)}:e}function Zp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Xl({point:e},t){return{point:e,delta:Zp(e,W0(t)),offset:Zp(e,hP(t)),velocity:pP(t,.1)}}function hP(e){return e[0]}function W0(e){return e[e.length-1]}function pP(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=W0(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>ct(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&s.timestamp-r.timestamp>ct(t)*2&&(r=e[1]);const o=vt(s.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const i={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function mP(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?he(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?he(n,e,r.max):Math.min(e,n)),e}function qp(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function gP(e,{top:t,left:n,bottom:r,right:s}){return{x:qp(e.x,n,s),y:qp(e.y,t,r)}}function Jp(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function yP(e,t){return{x:Jp(e.x,t.x),y:Jp(e.y,t.y)}}function vP(e,t){let n=.5;const r=Xe(e),s=Xe(t);return s>r?n=mo(t.min,t.max-r,e.min):r>s&&(n=mo(e.min,e.max-s,t.min)),Xt(0,1,n)}function xP(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Tc=.35;function wP(e=Tc){return e===!1?e=0:e===!0&&(e=Tc),{x:em(e,"left","right"),y:em(e,"top","bottom")}}function em(e,t,n){return{min:tm(e,t),max:tm(e,n)}}function tm(e,t){return typeof e=="number"?e:e[t]||0}const SP=new WeakMap;class bP{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=je(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const o=u=>{n&&this.snapToCursor(Ao(u).point),this.stopAnimation()},i=(u,f)=>{const{drag:y,dragPropagation:x,onDragStart:v}=this.getProps();if(y&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Xk(y),!this.openDragLock))return;this.latestPointerEvent=u,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Bt(g=>{let m=this.getAxisMotionValue(g).get()||0;if(Kt.test(m)){const{projection:w}=this.visualElement;if(w&&w.layout){const b=w.layout.layoutBox[g];b&&(m=Xe(b)*(parseFloat(m)/100))}}this.originPoint[g]=m}),v&&ie.update(()=>v(u,f),!1,!0),vc(this.visualElement,"transform");const{animationState:S}=this.visualElement;S&&S.setActive("whileDrag",!0)},a=(u,f)=>{this.latestPointerEvent=u,this.latestPanInfo=f;const{dragPropagation:y,dragDirectionLock:x,onDirectionLock:v,onDrag:S}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:g}=f;if(x&&this.currentDirection===null){this.currentDirection=kP(g),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),S&&ie.update(()=>S(u,f),!1,!0)},l=(u,f)=>{this.latestPointerEvent=u,this.latestPanInfo=f,this.stop(u,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{const{dragSnapToOrigin:u}=this.getProps();(u||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new U0(t,{onSessionStart:o,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:$0(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,s=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!s||!r)return;const{velocity:i}=s;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&ie.postRender(()=>a(r,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!si(t,s,this.currentDirection))return;const o=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=mP(i,this.constraints[t],this.elastic[t])),o.set(i)}resolveConstraints(){var o;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,s=this.constraints;t&&Nr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=gP(r.layoutBox,t):this.constraints=!1,this.elastic=wP(n),s!==this.constraints&&!Nr(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Bt(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=xP(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Nr(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const o=kC(r,s.root,this.visualElement.getTransformPagePoint());let i=yP(s.layout.layoutBox,o);if(n){const a=n(SC(i));this.hasMutatedConstraints=!!a,a&&(i=d0(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Bt(d=>{if(!si(d,n,this.currentDirection))return;let u=l&&l[d]||{};(i===!0||i===d)&&(u={min:0,max:0});const f=s?200:1e6,y=s?40:1e7,x={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...u};return this.startAxisValueAnimation(d,x)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return vc(this.visualElement,t),r.start(Gd(t,r,0,n,this.visualElement,!1))}stopAnimation(){Bt(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Bt(n=>{const{drag:r}=this.getProps();if(!si(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(n);if(s&&s.layout){const{min:i,max:a}=s.layout.layoutBox[n],l=o.get()||0;o.set(t[n]-he(i,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Nr(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Bt(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();s[i]=vP({min:l,max:l},this.constraints[i])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Bt(i=>{if(!si(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(he(l,c,s[i]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;SP.set(this.visualElement,this);const t=this.visualElement.current,n=Ys(t,"pointerdown",c=>{const{drag:d,dragListener:u=!0}=this.getProps(),f=c.target,y=f!==t&&tC(f);d&&u&&!y&&this.start(c)});let r;const s=()=>{const{dragConstraints:c}=this.getProps();Nr(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),r||(r=EP(t,c.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",s);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ie.read(s);const a=vo(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(Bt(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=c[u].translate,f.set(f.get()+c[u].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),l&&l(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:o=!1,dragElastic:i=Tc,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function nm(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function EP(e,t,n){const r=up(e,nm(n)),s=up(t,nm(n));return()=>{r(),s()}}function si(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function kP(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class CP extends Yn{constructor(t){super(t),this.removeGroupControls=wt,this.removeListeners=wt,this.controls=new bP(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||wt}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Ql=e=>(t,n)=>{e&&ie.update(()=>e(t,n),!1,!0)};class PP extends Yn{constructor(){super(...arguments),this.removePointerDownListener=wt}onPointerDown(t){this.session=new U0(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Ql(t),onStart:Ql(n),onMove:Ql(r),onEnd:(o,i)=>{delete this.session,s&&ie.postRender(()=>s(o,i))}}}mount(){this.removePointerDownListener=Ys(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Zl=!1;class TP extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:o}=t;o&&(n.group&&n.group.add(o),r&&r.register&&s&&r.register(o),Zl&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Di.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:o}=this.props,{projection:i}=r;return i&&(i.isPresent=o,t.layoutDependency!==n&&i.setOptions({...i.options,layoutDependency:n}),Zl=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==o?i.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?i.promote():i.relegate()||ie.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),Qd.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;Zl=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function H0(e){const[t,n]=A0(),r=p.useContext(Md);return h.jsx(TP,{...e,layoutGroup:r,switchLayoutGroup:p.useContext(z0),isPresent:t,safeToRemove:n})}const jP={pan:{Feature:PP},drag:{Feature:CP,ProjectionNode:D0,MeasureLayout:H0}};function rm(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&ie.postRender(()=>o(t,Ao(t)))}class NP extends Yn{mount(){const{current:t}=this.node;t&&(this.unmount=Zk(t,(n,r)=>(rm(this.node,r,"Start"),s=>rm(this.node,s,"End"))))}unmount(){}}class RP extends Yn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ro(vo(this.node.current,"focus",()=>this.onFocus()),vo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function sm(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&ie.postRender(()=>o(t,Ao(t)))}class MP extends Yn{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=rC(t,(s,o)=>(sm(this.node,o,"Start"),(i,{success:a})=>sm(this.node,i,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const jc=new WeakMap,ql=new WeakMap,DP=e=>{const t=jc.get(e.target);t&&t(e)},AP=e=>{e.forEach(DP)};function LP({root:e,...t}){const n=e||document;ql.has(n)||ql.set(n,{});const r=ql.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(AP,{root:e,...t})),r[s]}function _P(e,t,n){const r=LP(t);return jc.set(e,n),r.observe(e),()=>{jc.delete(e),r.unobserve(e)}}const OP={some:0,all:1};class IP extends Yn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var l;(l=this.stopObserver)==null||l.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:OP[s]},a=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),y=d?u:f;y&&y(c)};this.stopObserver=_P(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(VP(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function VP({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const FP={inView:{Feature:IP},tap:{Feature:MP},focus:{Feature:RP},hover:{Feature:NP}},zP={layout:{ProjectionNode:D0,MeasureLayout:H0}},BP={...cP,...FP,...jP,...zP},Yt=oP(BP,iP);function G0(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=G0(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function K0(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=G0(e))&&(r&&(r+=" "),r+=t);return r}const af="-",$P=e=>{const t=WP(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(af);return a[0]===""&&a.length!==1&&a.shift(),Y0(a,t)||UP(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},Y0=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Y0(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(af);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},om=/^\[(.+)\]$/,UP=e=>{if(om.test(e)){const t=om.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},WP=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return GP(Object.entries(e.classGroups),n).forEach(([o,i])=>{Nc(i,r,o,t)}),r},Nc=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:im(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(HP(s)){Nc(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{Nc(i,im(t,o),n,r)})})},im=(e,t)=>{let n=e;return t.split(af).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},HP=e=>e.isThemeGetter,GP=(e,t)=>t?e.map(([n,r])=>{const s=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[n,s]}):e,KP=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}},X0="!",YP=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],o=t.length,i=a=>{const l=[];let c=0,d=0,u;for(let S=0;S<a.length;S++){let g=a[S];if(c===0){if(g===s&&(r||a.slice(S,S+o)===t)){l.push(a.slice(d,S)),d=S+o;continue}if(g==="/"){u=S;continue}}g==="["?c++:g==="]"&&c--}const f=l.length===0?a:a.substring(d),y=f.startsWith(X0),x=y?f.substring(1):f,v=u&&u>d?u-d:void 0;return{modifiers:l,hasImportantModifier:y,baseClassName:x,maybePostfixModifierPosition:v}};return n?a=>n({className:a,parseClassName:i}):i},XP=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},QP=e=>({cache:KP(e.cacheSize),parseClassName:YP(e),...$P(e)}),ZP=/\s+/,qP=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(ZP);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:d,hasImportantModifier:u,baseClassName:f,maybePostfixModifierPosition:y}=n(c);let x=!!y,v=r(x?f.substring(0,y):f);if(!v){if(!x){a=c+(a.length>0?" "+a:a);continue}if(v=r(f),!v){a=c+(a.length>0?" "+a:a);continue}x=!1}const S=XP(d).join(":"),g=u?S+X0:S,m=g+v;if(o.includes(m))continue;o.push(m);const w=s(v,x);for(let b=0;b<w.length;++b){const C=w[b];o.push(g+C)}a=c+(a.length>0?" "+a:a)}return a};function JP(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Q0(t))&&(r&&(r+=" "),r+=n);return r}const Q0=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Q0(e[r]))&&(n&&(n+=" "),n+=t);return n};function eT(e,...t){let n,r,s,o=i;function i(l){const c=t.reduce((d,u)=>u(d),e());return n=QP(c),r=n.cache.get,s=n.cache.set,o=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=qP(l,n);return s(l,d),d}return function(){return o(JP.apply(null,arguments))}}const de=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Z0=/^\[(?:([a-z-]+):)?(.+)\]$/i,tT=/^\d+\/\d+$/,nT=new Set(["px","full","screen"]),rT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sT=/\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$/,oT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,iT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,aT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qt=e=>Zr(e)||nT.has(e)||tT.test(e),gn=e=>ms(e,"length",mT),Zr=e=>!!e&&!Number.isNaN(Number(e)),Jl=e=>ms(e,"number",Zr),Ts=e=>!!e&&Number.isInteger(Number(e)),lT=e=>e.endsWith("%")&&Zr(e.slice(0,-1)),H=e=>Z0.test(e),yn=e=>rT.test(e),uT=new Set(["length","size","percentage"]),cT=e=>ms(e,uT,q0),dT=e=>ms(e,"position",q0),fT=new Set(["image","url"]),hT=e=>ms(e,fT,yT),pT=e=>ms(e,"",gT),js=()=>!0,ms=(e,t,n)=>{const r=Z0.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},mT=e=>sT.test(e)&&!oT.test(e),q0=()=>!1,gT=e=>iT.test(e),yT=e=>aT.test(e),vT=()=>{const e=de("colors"),t=de("spacing"),n=de("blur"),r=de("brightness"),s=de("borderColor"),o=de("borderRadius"),i=de("borderSpacing"),a=de("borderWidth"),l=de("contrast"),c=de("grayscale"),d=de("hueRotate"),u=de("invert"),f=de("gap"),y=de("gradientColorStops"),x=de("gradientColorStopPositions"),v=de("inset"),S=de("margin"),g=de("opacity"),m=de("padding"),w=de("saturate"),b=de("scale"),C=de("sepia"),P=de("skew"),E=de("space"),k=de("translate"),j=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",H,t],L=()=>[H,t],G=()=>["",qt,gn],oe=()=>["auto",Zr,H],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],Q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",H],I=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Zr,H];return{cacheSize:500,separator:":",theme:{colors:[js],spacing:[qt,gn],blur:["none","",yn,H],brightness:B(),borderColor:[e],borderRadius:["none","","full",yn,H],borderSpacing:L(),borderWidth:G(),contrast:B(),grayscale:_(),hueRotate:B(),invert:_(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[lT,gn],inset:A(),margin:A(),opacity:B(),padding:L(),saturate:B(),scale:B(),sepia:_(),skew:B(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",H]}],container:["container"],columns:[{columns:[yn]}],"break-after":[{"break-after":I()}],"break-before":[{"break-before":I()}],"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"],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(),H]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ts,H]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",H]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",Ts,H]}],"grid-cols":[{"grid-cols":[js]}],"col-start-end":[{col:["auto",{span:["full",Ts,H]},H]}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":[js]}],"row-start-end":[{row:["auto",{span:[Ts,H]},H]}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",H]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",H]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[m]}],px:[{px:[m]}],py:[{py:[m]}],ps:[{ps:[m]}],pe:[{pe:[m]}],pt:[{pt:[m]}],pr:[{pr:[m]}],pb:[{pb:[m]}],pl:[{pl:[m]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",H,t]}],"min-w":[{"min-w":[H,t,"min","max","fit"]}],"max-w":[{"max-w":[H,t,"none","full","min","max","fit","prose",{screen:[yn]},yn]}],h:[{h:[H,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[H,t,"auto","min","max","fit"]}],"font-size":[{text:["base",yn,gn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Jl]}],"font-family":[{font:[js]}],"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:["tighter","tight","normal","wide","wider","widest",H]}],"line-clamp":[{"line-clamp":["none",Zr,Jl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qt,H]}],"list-image":[{"list-image":["none",H]}],"list-style-type":[{list:["none","disc","decimal",H]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qt,gn]}],"underline-offset":[{"underline-offset":["auto",qt,H]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",H]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),dT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",cT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},hT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...z(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:z()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...z()]}],"outline-offset":[{"outline-offset":[qt,H]}],"outline-w":[{outline:[qt,gn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[qt,gn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",yn,pT]}],"shadow-color":[{shadow:[js]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...Q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",yn,H]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",H]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",H]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",H]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Ts,H]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",H]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",H]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",H]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[qt,gn,Jl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},xT=eT(vT);function X(...e){return xT(K0(e))}const lf=p.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:X("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));lf.displayName="Card";const uf=p.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:X("flex flex-col space-y-1.5 p-6",e),...t}));uf.displayName="CardHeader";const cf=p.forwardRef(({className:e,...t},n)=>h.jsx("h3",{ref:n,className:X("text-2xl font-semibold leading-none tracking-tight",e),...t}));cf.displayName="CardTitle";const J0=p.forwardRef(({className:e,...t},n)=>h.jsx("p",{ref:n,className:X("text-sm text-muted-foreground",e),...t}));J0.displayName="CardDescription";const df=p.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:X("p-6 pt-0",e),...t}));df.displayName="CardContent";const ex=p.forwardRef(({className:e,...t},n)=>h.jsx("div",{ref:n,className:X("flex items-center p-6 pt-0",e),...t}));ex.displayName="CardFooter";function am(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ka(...e){return t=>{let n=!1;const r=e.map(s=>{const o=am(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():am(e[s],null)}}}}function kr(...e){return p.useCallback(Ka(...e),e)}var wT=Symbol.for("react.lazy"),pa=Sa[" use ".trim().toString()];function ST(e){return typeof e=="object"&&e!==null&&"then"in e}function tx(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===wT&&"_payload"in e&&ST(e._payload)}function nx(e){const t=ET(e),n=p.forwardRef((r,s)=>{let{children:o,...i}=r;tx(o)&&typeof pa=="function"&&(o=pa(o._payload));const a=p.Children.toArray(o),l=a.find(CT);if(l){const c=l.props.children,d=a.map(u=>u===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:u);return h.jsx(t,{...i,ref:s,children:p.isValidElement(c)?p.cloneElement(c,void 0,d):null})}return h.jsx(t,{...i,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}var bT=nx("Slot");function ET(e){const t=p.forwardRef((n,r)=>{let{children:s,...o}=n;if(tx(s)&&typeof pa=="function"&&(s=pa(s._payload)),p.isValidElement(s)){const i=TT(s),a=PT(o,s.props);return s.type!==p.Fragment&&(a.ref=r?Ka(r,i):i),p.cloneElement(s,a)}return p.Children.count(s)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kT=Symbol("radix.slottable");function CT(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kT}function PT(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{const l=o(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function TT(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const lm=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,um=K0,ff=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return um(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(c=>{const d=n==null?void 0:n[c],u=o==null?void 0:o[c];if(d===null)return null;const f=lm(d)||lm(u);return s[c][f]}),a=n&&Object.entries(n).reduce((c,d)=>{let[u,f]=d;return f===void 0||(c[u]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:u,className:f,...y}=d;return Object.entries(y).every(x=>{let[v,S]=x;return Array.isArray(S)?S.includes({...o,...a}[v]):{...o,...a}[v]===S})?[...c,u,f]:c},[]);return um(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},jT=ff("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),le=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...s},o)=>{const i=r?bT:"button";return h.jsx(i,{className:X(jT({variant:t,size:n,className:e})),ref:o,...s})});le.displayName="Button";const xo=p.forwardRef(({className:e,type:t,...n},r)=>h.jsx("input",{type:t,className:X("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));xo.displayName="Input";var NT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],RT=NT.reduce((e,t)=>{const n=nx(`Primitive.${t}`),r=p.forwardRef((s,o)=>{const{asChild:i,...a}=s,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),MT="Label",rx=p.forwardRef((e,t)=>h.jsx(RT.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));rx.displayName=MT;var sx=rx;const DT=ff("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Rn=p.forwardRef(({className:e,...t},n)=>h.jsx(sx,{ref:n,className:X(DT(),e),...t}));Rn.displayName=sx.displayName;const cm=e=>{let t;const n=new Set,r=(c,d)=>{const u=typeof c=="function"?c(t):c;if(!Object.is(u,t)){const f=t;t=d??(typeof u!="object"||u===null)?u:Object.assign({},t,u),n.forEach(y=>y(t,f))}},s=()=>t,a={setState:r,getState:s,getInitialState:()=>l,subscribe:c=>(n.add(c),()=>n.delete(c))},l=t=e(r,s,a);return a},AT=e=>e?cm(e):cm,LT=e=>e;function _T(e,t=LT){const n=M.useSyncExternalStore(e.subscribe,M.useCallback(()=>t(e.getState()),[e,t]),M.useCallback(()=>t(e.getInitialState()),[e,t]));return M.useDebugValue(n),n}const dm=e=>{const t=AT(e),n=r=>_T(t,r);return Object.assign(n,t),n},Ya=e=>e?dm(e):dm,pr={token:"cc_web_token",theme:"cc_web_theme",viewMode:e=>`cc_viewmode_${e}`,panelFileTree:"cc_panel_filetree",panelShortcuts:"cc_panel_shortcuts",fileZoom:"cc_file_zoom",skillhubAuthor:"ccweb_skillhub_author",projectOrder:"cc_project_order",pomodoroConfig:"cc_pomodoro_config",panelLeftWidth:"cc_panel_left_width",panelRightWidth:"cc_panel_right_width",terminalDraft:e=>`cc_terminal_draft_${e}`,usedSkills:"cc_used_skills",projectModel:e=>`cc_project_model_${e}`,draftState:e=>`cc_draft_state_${e}`};function ox(e,t,n){try{const r=localStorage.getItem(e);return r===null?t:n?JSON.parse(r):r}catch{return t}}function ix(e,t,n){try{localStorage.setItem(e,n?JSON.stringify(t):String(t))}catch{}}function OT(e){try{localStorage.removeItem(e)}catch{}}function IT(e,t,n){const r=(n==null?void 0:n.parse)??!1,[s,o]=p.useState(()=>{try{const a=localStorage.getItem(e);return a===null?t:r?JSON.parse(a):a}catch{return t}}),i=p.useCallback(a=>{o(l=>{const c=typeof a=="function"?a(l):a;try{localStorage.setItem(e,r?JSON.stringify(c):String(c))}catch{}return c})},[e,r]);return[s,i]}const wr=Ya(e=>({token:localStorage.getItem(pr.token),setToken:t=>{ix(pr.token,t),e({token:t})},clearToken:()=>{OT(pr.token),e({token:null})}})),VT=()=>wr.getState().token,FT=e=>wr.getState().setToken(e),zT=()=>wr.getState().clearToken();let eu=null;async function BT(){return eu||(eu=(await To(()=>Promise.resolve().then(()=>Oj),void 0)).getProjects),eu()}const fm=Ya((e,t)=>({projects:[],loading:!1,error:null,hasFetched:!1,fetchProjects:async()=>{if(!t().loading){e({loading:!0,error:null});try{const n=await BT();e({projects:n,hasFetched:!0})}catch(n){e({error:n instanceof Error?n.message:"Failed to load projects"})}finally{e({loading:!1})}}},addProject:n=>e(r=>({projects:[...r.projects,n]})),updateProject:n=>e(r=>({projects:r.projects.map(s=>s.id===n.id?n:s)})),removeProject:n=>e(r=>({projects:r.projects.filter(s=>s.id!==n)})),setProjects:n=>e({projects:n})})),Ns={filePreviewPath:null,sessionId:null,shortcutEditorOpen:!1,shortcutEditingId:null,shareHubOpen:!1,shareHubLabel:"",shareHubCommand:""},dD=Ya((e,t)=>({entries:{},get:n=>t().entries[n]??Ns,setFilePreviewPath:(n,r)=>e(s=>({entries:{...s.entries,[n]:{...s.entries[n]??Ns,filePreviewPath:r}}})),setSessionId:(n,r)=>e(s=>({entries:{...s.entries,[n]:{...s.entries[n]??Ns,sessionId:r}}})),setShortcutEditor:(n,r,s=null)=>e(o=>({entries:{...o.entries,[n]:{...o.entries[n]??Ns,shortcutEditorOpen:r,shortcutEditingId:r?s:null}}})),setShareHub:(n,r,s="",o="")=>e(i=>({entries:{...i.entries,[n]:{...i.entries[n]??Ns,shareHubOpen:r,shareHubLabel:r?s:"",shareHubCommand:r?o:""}}}))})),Xa="";function gs(){return VT()}function $T(e){FT(e)}function ax(){zT()}async function F(e,t,n,r=!0,s){const o={"Content-Type":"application/json"};if(r){const a=gs();a&&(o.Authorization=`Bearer ${a}`)}const i=await fetch(`${Xa}${t}`,{method:e,headers:o,body:n!==void 0?JSON.stringify(n):void 0,signal:s});if(i.status===401)throw ax(),window.location.pathname!=="/login"&&(window.location.href="/login"),new Error("Unauthorized");if(!i.ok){let a=`HTTP ${i.status}`;try{const l=await i.json();l.error&&(a=l.error)}catch{}throw new Error(a)}return i.json()}async function lx(e,t){return(await F("POST","/api/auth/login",{username:e,password:t},!1)).token}function ma(){const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"||e==="::1"}async function hf(){return(await F("GET","/api/auth/local-token",void 0,!1)).token}async function UT(){return(await F("GET","/api/projects/workspace")).workspace}async function WT(){return F("GET","/api/projects")}async function ux(){return F("GET","/api/projects/users")}async function cx(e,t){return F("PUT",`/api/projects/${e}/shares`,{shares:t})}async function dx(e){return F("POST","/api/projects",e)}async function fx(e){return F("POST","/api/projects/open",{folderPath:e})}async function hx(e){await F("DELETE",`/api/projects/${e}`)}async function HT(e){return F("PATCH",`/api/projects/${e}/stop`)}async function GT(e){return F("PATCH",`/api/projects/${e}/start`)}async function px(e){return F("PATCH",`/api/projects/${e}/archive`)}async function mx(e){return F("PATCH",`/api/projects/${e}/unarchive`)}async function KT(e,t){return F("GET",`/api/projects/${e}/sessions`,void 0,!0,t)}async function YT(e,t,n){return F("GET",`/api/projects/${e}/sessions/${t}`,void 0,!0,n)}async function XT(e){return F("GET","/api/projects/activity",void 0,!0,e)}async function gx(){return F("GET","/api/shortcuts")}async function yx(e){return F("POST","/api/shortcuts",e)}async function vx(e,t){return F("PUT",`/api/shortcuts/${e}`,t)}async function xx(e){await F("DELETE",`/api/shortcuts/${e}`)}async function QT(e){return F("GET",`/api/shortcuts/project/${e}`)}async function ZT(e,t){return F("POST",`/api/shortcuts/project/${e}`,t)}async function qT(e,t,n){return F("PUT",`/api/shortcuts/project/${e}/${t}`,n)}async function JT(e,t){await F("DELETE",`/api/shortcuts/project/${e}/${t}`)}async function ej(){return F("GET","/api/skillhub/skills")}async function tj(e){await F("POST","/api/skillhub/submit",e)}async function nj(e){return F("POST",`/api/skillhub/download/${e}`)}async function wx(){return F("GET","/api/projects/usage")}async function Sx(){return F("GET","/api/projects/usage?refresh=true")}async function bx(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return F("GET",`/api/filesystem${t}`)}function rj(e){return`${Xa}/api/filesystem/raw?path=${encodeURIComponent(e)}`}async function sj(e,t){const n=new FormData;n.append("path",e);for(const i of t)n.append("files",i);const r={},s=gs();s&&(r.Authorization=`Bearer ${s}`);const o=await fetch(`${Xa}/api/filesystem/upload`,{method:"POST",headers:r,body:n});if(!o.ok){const i=await o.json().catch(()=>({}));throw new Error(i.error||`Upload failed: ${o.status}`)}return o.json()}async function Ex(e,t){return F("POST","/api/filesystem/mkdir",{path:e,name:t})}async function oj(e){return F("GET",`/api/filesystem/file?path=${encodeURIComponent(e)}`)}async function ij(e,t){return F("PUT","/api/filesystem/file",{path:e,content:t})}async function aj(){return F("GET","/api/update/check-running")}async function lj(){return F("POST","/api/update/prepare")}async function uj(){return F("GET","/api/backup/built-in-oauth")}async function cj(){return F("GET","/api/backup/providers")}async function dj(e){return F("POST","/api/backup/providers",e)}async function fj(e){await F("DELETE",`/api/backup/providers/${e}`)}async function hj(e){return F("GET",`/api/backup/auth/${e}/url`)}async function pj(e){return F("POST",`/api/backup/run/${e}`)}async function mj(){return F("GET","/api/backup/schedule")}async function gj(e){return F("PUT","/api/backup/schedule",e)}async function yj(){return F("GET","/api/backup/excludes")}async function vj(e){return F("PUT","/api/backup/excludes",{patterns:e})}async function xj(){return F("GET","/api/backup/history")}async function wj(){return F("GET","/api/notify/config")}async function Sj(e){return F("PUT","/api/notify/config",e)}async function bj(e){return F("GET",`/api/projects/${e}/git/status`)}async function Ej(e,t){const n=t?`?file=${encodeURIComponent(t)}`:"";return F("GET",`/api/projects/${e}/git/diff${n}`)}async function kj(e,t){await F("POST",`/api/projects/${e}/git/add`,{files:t})}async function Cj(e,t){await F("POST",`/api/projects/${e}/git/commit`,{message:t})}async function kx(e){return F("GET",`/api/projects/sessions/search?q=${encodeURIComponent(e)}`)}async function Pj(e,t){return F("PATCH",`/api/projects/${e}/tags`,{tags:t})}async function Tj(e){return F("GET",`/api/projects/${e}/todos`)}async function jj(e,t){return F("POST",`/api/sessions/${e}/share`,{expiryDays:t})}async function Nj(e){const t=await fetch(`${Xa}/api/share/${e}`);if(!t.ok){let n=`HTTP ${t.status}`;try{const r=await t.json();r.error&&(n=r.error)}catch{}throw new Error(n)}return t.json()}async function Rj(){return F("GET","/api/claude/model")}async function Mj(){return F("GET","/api/claude/skills")}async function ga(){return F("GET","/api/plugins")}async function Dj(e){return F("POST","/api/plugins/install",{downloadUrl:e})}async function Aj(e){await F("DELETE",`/api/plugins/${e}`)}async function Lj(e,t){return F("POST",`/api/plugins/${e}/update`,{downloadUrl:t})}async function Cx(e,t){return F("PUT",`/api/plugins/${e}/config`,t)}async function _j(e,t){await F("PUT",`/api/plugins/${e}/enabled`,{enabled:t})}const Oj=Object.freeze(Object.defineProperty({__proto__:null,addBackupProvider:dj,archiveProject:px,browseFilesystem:bx,checkRunningProjects:aj,clearToken:ax,createFolder:Ex,createGlobalShortcut:yx,createProject:dx,createProjectShortcut:ZT,deleteBackupProvider:fj,deleteGlobalShortcut:xx,deleteProject:hx,deleteProjectShortcut:JT,downloadSkillFromHub:nj,getAllUsers:ux,getBackupAuthUrl:hj,getBackupExcludes:yj,getBackupHistory:xj,getBackupProviders:cj,getBackupSchedule:mj,getBuiltInOAuthTypes:uj,getClaudeModel:Rj,getClaudeSkills:Mj,getGitDiff:Ej,getGitStatus:bj,getGlobalShortcuts:gx,getInstalledPlugins:ga,getLocalToken:hf,getNotifyConfig:wj,getProjectShortcuts:QT,getProjectTodos:Tj,getProjects:WT,getProjectsActivity:XT,getRawFileUrl:rj,getSession:YT,getSessions:KT,getSharedSession:Nj,getSkillHubSkills:ej,getToken:gs,getUsage:wx,getWorkspace:UT,gitAdd:kj,gitCommit:Cj,installPlugin:Dj,isLocalAccess:ma,login:lx,openProject:fx,prepareForUpdate:lj,readFile:oj,refreshUsage:Sx,searchSessions:kx,setPluginEnabled:_j,setToken:$T,shareSession:jj,startProject:GT,stopProject:HT,submitSkillToHub:tj,triggerBackup:pj,unarchiveProject:mx,uninstallPlugin:Aj,updateBackupExcludes:vj,updateBackupSchedule:gj,updateGlobalShortcut:vx,updateNotifyConfig:Sj,updatePlugin:Lj,updatePluginConfig:Cx,updateProjectShares:cx,updateProjectShortcut:qT,updateProjectTags:Pj,uploadFiles:sj,writeFile:ij},Symbol.toStringTag,{value:"Module"}));function Ij(){const e=za(),t=wr(u=>u.setToken),[n,r]=p.useState(""),[s,o]=p.useState(""),[i,a]=p.useState(null),[l,c]=p.useState(!1);p.useEffect(()=>{if(!ma())return;let u=!1;return(async()=>{try{const f=await hf();u||(t(f),e("/",{replace:!0}))}catch{}})(),()=>{u=!0}},[e,t]);const d=async u=>{u.preventDefault(),a(null),c(!0);try{const f=await lx(n,s);t(f),e("/")}catch(f){a(f instanceof Error?f.message:"Login failed")}finally{c(!1)}};return h.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:h.jsx(Yt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},className:"w-full max-w-sm",children:h.jsxs(lf,{children:[h.jsxs(uf,{className:"text-center",children:[h.jsx(cf,{className:"text-2xl",children:"CC Web"}),h.jsx(J0,{children:ma()?"Connecting locally...":"Sign in to manage your Claude projects"})]}),h.jsxs("form",{onSubmit:u=>void d(u),children:[h.jsxs(df,{className:"space-y-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(Rn,{htmlFor:"username",children:"Username"}),h.jsx(xo,{id:"username",type:"text",autoComplete:"username",value:n,onChange:u=>r(u.target.value),required:!0,autoFocus:!0})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Rn,{htmlFor:"password",children:"Password"}),h.jsx(xo,{id:"password",type:"password",autoComplete:"current-password",value:s,onChange:u=>o(u.target.value),required:!0})]}),h.jsx(Ha,{children:i&&h.jsx(Yt.p,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.2},className:"text-sm text-destructive",children:i})})]}),h.jsx(ex,{children:h.jsx(Yt.div,{className:"w-full",whileTap:{scale:.98},children:h.jsx(le,{type:"submit",className:"w-full",disabled:l,children:l?"Signing in...":"Sign In"})})})]})]})})})}/**
|
|
77
|
+
* @license lucide-react v0.309.0 - ISC
|
|
78
|
+
*
|
|
79
|
+
* This source code is licensed under the ISC license.
|
|
80
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
+
*/var Vj={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"};/**
|
|
82
|
+
* @license lucide-react v0.309.0 - ISC
|
|
83
|
+
*
|
|
84
|
+
* This source code is licensed under the ISC license.
|
|
85
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
+
*/const Fj=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),ee=(e,t)=>{const n=p.forwardRef(({color:r="currentColor",size:s=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:a="",children:l,...c},d)=>p.createElement("svg",{ref:d,...Vj,width:s,height:s,stroke:r,strokeWidth:i?Number(o)*24/Number(s):o,className:["lucide",`lucide-${Fj(e)}`,a].join(" "),...c},[...t.map(([u,f])=>p.createElement(u,f)),...Array.isArray(l)?l:[l]]));return n.displayName=`${e}`,n};/**
|
|
87
|
+
* @license lucide-react v0.309.0 - ISC
|
|
88
|
+
*
|
|
89
|
+
* This source code is licensed under the ISC license.
|
|
90
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
+
*/const zj=ee("ArchiveRestore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]);/**
|
|
92
|
+
* @license lucide-react v0.309.0 - ISC
|
|
93
|
+
*
|
|
94
|
+
* This source code is licensed under the ISC license.
|
|
95
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
+
*/const Bj=ee("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
|
97
|
+
* @license lucide-react v0.309.0 - ISC
|
|
98
|
+
*
|
|
99
|
+
* This source code is licensed under the ISC license.
|
|
100
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
+
*/const $j=ee("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
102
|
+
* @license lucide-react v0.309.0 - ISC
|
|
103
|
+
*
|
|
104
|
+
* This source code is licensed under the ISC license.
|
|
105
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
+
*/const Uj=ee("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
107
|
+
* @license lucide-react v0.309.0 - ISC
|
|
108
|
+
*
|
|
109
|
+
* This source code is licensed under the ISC license.
|
|
110
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
+
*/const Px=ee("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
112
|
+
* @license lucide-react v0.309.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/const Wj=ee("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
117
|
+
* @license lucide-react v0.309.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* This source code is licensed under the ISC license.
|
|
120
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
+
*/const Hj=ee("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]);/**
|
|
122
|
+
* @license lucide-react v0.309.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/const Rc=ee("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
127
|
+
* @license lucide-react v0.309.0 - ISC
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the ISC license.
|
|
130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
+
*/const Gj=ee("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
132
|
+
* @license lucide-react v0.309.0 - ISC
|
|
133
|
+
*
|
|
134
|
+
* This source code is licensed under the ISC license.
|
|
135
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
+
*/const hm=ee("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
137
|
+
* @license lucide-react v0.309.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/const tu=ee("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);/**
|
|
142
|
+
* @license lucide-react v0.309.0 - ISC
|
|
143
|
+
*
|
|
144
|
+
* This source code is licensed under the ISC license.
|
|
145
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
+
*/const Kj=ee("GripHorizontal",[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]]);/**
|
|
147
|
+
* @license lucide-react v0.309.0 - ISC
|
|
148
|
+
*
|
|
149
|
+
* This source code is licensed under the ISC license.
|
|
150
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
+
*/const Yj=ee("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);/**
|
|
152
|
+
* @license lucide-react v0.309.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/const Xj=ee("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
|
|
157
|
+
* @license lucide-react v0.309.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/const Qj=ee("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);/**
|
|
162
|
+
* @license lucide-react v0.309.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*/const Zj=ee("Minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]);/**
|
|
167
|
+
* @license lucide-react v0.309.0 - ISC
|
|
168
|
+
*
|
|
169
|
+
* This source code is licensed under the ISC license.
|
|
170
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
+
*/const qj=ee("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
172
|
+
* @license lucide-react v0.309.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/const Jj=ee("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
177
|
+
* @license lucide-react v0.309.0 - ISC
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the ISC license.
|
|
180
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/const eN=ee("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
182
|
+
* @license lucide-react v0.309.0 - ISC
|
|
183
|
+
*
|
|
184
|
+
* This source code is licensed under the ISC license.
|
|
185
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
+
*/const Tx=ee("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
|
|
187
|
+
* @license lucide-react v0.309.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/const ya=ee("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
192
|
+
* @license lucide-react v0.309.0 - ISC
|
|
193
|
+
*
|
|
194
|
+
* This source code is licensed under the ISC license.
|
|
195
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
+
*/const tN=ee("Puzzle",[["path",{d:"M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.705.707 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073 1.01a2.5 2.5 0 1 0 3.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.464.18-.894.527-.967 1.02Z",key:"i0oyt7"}]]);/**
|
|
197
|
+
* @license lucide-react v0.309.0 - ISC
|
|
198
|
+
*
|
|
199
|
+
* This source code is licensed under the ISC license.
|
|
200
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
+
*/const nN=ee("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
202
|
+
* @license lucide-react v0.309.0 - ISC
|
|
203
|
+
*
|
|
204
|
+
* This source code is licensed under the ISC license.
|
|
205
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
+
*/const rN=ee("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
207
|
+
* @license lucide-react v0.309.0 - ISC
|
|
208
|
+
*
|
|
209
|
+
* This source code is licensed under the ISC license.
|
|
210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
+
*/const sN=ee("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
212
|
+
* @license lucide-react v0.309.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* This source code is licensed under the ISC license.
|
|
215
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
+
*/const oN=ee("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/**
|
|
217
|
+
* @license lucide-react v0.309.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*/const iN=ee("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
222
|
+
* @license lucide-react v0.309.0 - ISC
|
|
223
|
+
*
|
|
224
|
+
* This source code is licensed under the ISC license.
|
|
225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
+
*/const pm=ee("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
227
|
+
* @license lucide-react v0.309.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/const aN=ee("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
|
|
232
|
+
* @license lucide-react v0.309.0 - ISC
|
|
233
|
+
*
|
|
234
|
+
* This source code is licensed under the ISC license.
|
|
235
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
+
*/const jx=ee("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
237
|
+
* @license lucide-react v0.309.0 - ISC
|
|
238
|
+
*
|
|
239
|
+
* This source code is licensed under the ISC license.
|
|
240
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
+
*/const Mc=ee("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
|
|
242
|
+
* @license lucide-react v0.309.0 - ISC
|
|
243
|
+
*
|
|
244
|
+
* This source code is licensed under the ISC license.
|
|
245
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
+
*/const Qa=ee("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
247
|
+
* @license lucide-react v0.309.0 - ISC
|
|
248
|
+
*
|
|
249
|
+
* This source code is licensed under the ISC license.
|
|
250
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
+
*/const mm=ee("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),lN=ff("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function rr({className:e,variant:t,...n}){return h.jsx("div",{className:X(lN({variant:t}),e),...n})}function Fn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function uN(e,t){const n=p.createContext(t),r=o=>{const{children:i,...a}=o,l=p.useMemo(()=>a,Object.values(a));return h.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function s(o){const i=p.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,s]}function cN(e,t=[]){let n=[];function r(o,i){const a=p.createContext(i),l=n.length;n=[...n,i];const c=u=>{var g;const{scope:f,children:y,...x}=u,v=((g=f==null?void 0:f[e])==null?void 0:g[l])||a,S=p.useMemo(()=>x,Object.values(x));return h.jsx(v.Provider,{value:S,children:y})};c.displayName=o+"Provider";function d(u,f){var v;const y=((v=f==null?void 0:f[e])==null?void 0:v[l])||a,x=p.useContext(y);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${o}\``)}return[c,d]}const s=()=>{const o=n.map(i=>p.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[r,dN(s,...t)]}function dN(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const u=l(o)[`__scope${c}`];return{...a,...u}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var wo=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},fN=Sa[" useId ".trim().toString()]||(()=>{}),hN=0;function nu(e){const[t,n]=p.useState(fN());return wo(()=>{n(r=>r??String(hN++))},[e]),e||(t?`radix-${t}`:"")}var pN=Sa[" useInsertionEffect ".trim().toString()]||wo;function mN({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[s,o,i]=gN({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:s;{const d=p.useRef(e!==void 0);p.useEffect(()=>{const u=d.current;u!==a&&console.warn(`${r} is changing from ${u?"controlled":"uncontrolled"} to ${a?"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.`),d.current=a},[a,r])}const c=p.useCallback(d=>{var u;if(a){const f=yN(d)?d(e):d;f!==e&&((u=i.current)==null||u.call(i,f))}else o(d)},[a,e,o,i]);return[l,c]}function gN({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),s=p.useRef(n),o=p.useRef(t);return pN(()=>{o.current=t},[t]),p.useEffect(()=>{var i;s.current!==n&&((i=o.current)==null||i.call(o,n),s.current=n)},[n,s]),[n,r,o]}function yN(e){return typeof e=="function"}function vN(e){const t=xN(e),n=p.forwardRef((r,s)=>{const{children:o,...i}=r,a=p.Children.toArray(o),l=a.find(SN);if(l){const c=l.props.children,d=a.map(u=>u===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:u);return h.jsx(t,{...i,ref:s,children:p.isValidElement(c)?p.cloneElement(c,void 0,d):null})}return h.jsx(t,{...i,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function xN(e){const t=p.forwardRef((n,r)=>{const{children:s,...o}=n;if(p.isValidElement(s)){const i=EN(s),a=bN(o,s.props);return s.type!==p.Fragment&&(a.ref=r?Ka(r,i):i),p.cloneElement(s,a)}return p.Children.count(s)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wN=Symbol("radix.slottable");function SN(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===wN}function bN(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{const l=o(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function EN(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cn=kN.reduce((e,t)=>{const n=vN(`Primitive.${t}`),r=p.forwardRef((s,o)=>{const{asChild:i,...a}=s,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function CN(e,t){e&&Ia.flushSync(()=>e.dispatchEvent(t))}function So(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function PN(e,t=globalThis==null?void 0:globalThis.document){const n=So(e);p.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var TN="DismissableLayer",Dc="dismissableLayer.update",jN="dismissableLayer.pointerDownOutside",NN="dismissableLayer.focusOutside",gm,Nx=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rx=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,c=p.useContext(Nx),[d,u]=p.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=p.useState({}),x=kr(t,E=>u(E)),v=Array.from(c.layers),[S]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(S),m=d?v.indexOf(d):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,b=m>=g,C=DN(E=>{const k=E.target,j=[...c.branches].some(T=>T.contains(k));!b||j||(s==null||s(E),i==null||i(E),E.defaultPrevented||a==null||a())},f),P=AN(E=>{const k=E.target;[...c.branches].some(T=>T.contains(k))||(o==null||o(E),i==null||i(E),E.defaultPrevented||a==null||a())},f);return PN(E=>{m===c.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),p.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(gm=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),ym(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=gm)}},[d,f,n,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),ym())},[d,c]),p.useEffect(()=>{const E=()=>y({});return document.addEventListener(Dc,E),()=>document.removeEventListener(Dc,E)},[]),h.jsx(cn.div,{...l,ref:x,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:Fn(e.onFocusCapture,P.onFocusCapture),onBlurCapture:Fn(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Fn(e.onPointerDownCapture,C.onPointerDownCapture)})});Rx.displayName=TN;var RN="DismissableLayerBranch",MN=p.forwardRef((e,t)=>{const n=p.useContext(Nx),r=p.useRef(null),s=kr(t,r);return p.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),h.jsx(cn.div,{...e,ref:s})});MN.displayName=RN;function DN(e,t=globalThis==null?void 0:globalThis.document){const n=So(e),r=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){Mx(jN,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function AN(e,t=globalThis==null?void 0:globalThis.document){const n=So(e),r=p.useRef(!1);return p.useEffect(()=>{const s=o=>{o.target&&!r.current&&Mx(NN,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ym(){const e=new CustomEvent(Dc);document.dispatchEvent(e)}function Mx(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?CN(s,o):s.dispatchEvent(o)}var ru="focusScope.autoFocusOnMount",su="focusScope.autoFocusOnUnmount",vm={bubbles:!1,cancelable:!0},LN="FocusScope",Dx=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,l]=p.useState(null),c=So(s),d=So(o),u=p.useRef(null),f=kr(t,v=>l(v)),y=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let v=function(w){if(y.paused||!a)return;const b=w.target;a.contains(b)?u.current=b:Sn(u.current,{select:!0})},S=function(w){if(y.paused||!a)return;const b=w.relatedTarget;b!==null&&(a.contains(b)||Sn(u.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&Sn(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",S);const m=new MutationObserver(g);return a&&m.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",S),m.disconnect()}}},[r,a,y.paused]),p.useEffect(()=>{if(a){wm.add(y);const v=document.activeElement;if(!a.contains(v)){const g=new CustomEvent(ru,vm);a.addEventListener(ru,c),a.dispatchEvent(g),g.defaultPrevented||(_N(zN(Ax(a)),{select:!0}),document.activeElement===v&&Sn(a))}return()=>{a.removeEventListener(ru,c),setTimeout(()=>{const g=new CustomEvent(su,vm);a.addEventListener(su,d),a.dispatchEvent(g),g.defaultPrevented||Sn(v??document.body,{select:!0}),a.removeEventListener(su,d),wm.remove(y)},0)}}},[a,c,d,y]);const x=p.useCallback(v=>{if(!n&&!r||y.paused)return;const S=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,g=document.activeElement;if(S&&g){const m=v.currentTarget,[w,b]=ON(m);w&&b?!v.shiftKey&&g===b?(v.preventDefault(),n&&Sn(w,{select:!0})):v.shiftKey&&g===w&&(v.preventDefault(),n&&Sn(b,{select:!0})):g===m&&v.preventDefault()}},[n,r,y.paused]);return h.jsx(cn.div,{tabIndex:-1,...i,ref:f,onKeyDown:x})});Dx.displayName=LN;function _N(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Sn(r,{select:t}),document.activeElement!==n)return}function ON(e){const t=Ax(e),n=xm(t,e),r=xm(t.reverse(),e);return[n,r]}function Ax(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function xm(e,t){for(const n of e)if(!IN(n,{upTo:t}))return n}function IN(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function VN(e){return e instanceof HTMLInputElement&&"select"in e}function Sn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&VN(e)&&t&&e.select()}}var wm=FN();function FN(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Sm(e,t),e.unshift(t)},remove(t){var n;e=Sm(e,t),(n=e[0])==null||n.resume()}}}function Sm(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function zN(e){return e.filter(t=>t.tagName!=="A")}var BN="Portal",Lx=p.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[s,o]=p.useState(!1);wo(()=>o(!0),[]);const i=n||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Gy.createPortal(h.jsx(cn.div,{...r,ref:t}),i):null});Lx.displayName=BN;function $N(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Za=e=>{const{present:t,children:n}=e,r=UN(t),s=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),o=kr(r.ref,WN(s));return typeof n=="function"||r.isPresent?p.cloneElement(s,{ref:o}):null};Za.displayName="Presence";function UN(e){const[t,n]=p.useState(),r=p.useRef(null),s=p.useRef(e),o=p.useRef("none"),i=e?"mounted":"unmounted",[a,l]=$N(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const c=oi(r.current);o.current=a==="mounted"?c:"none"},[a]),wo(()=>{const c=r.current,d=s.current;if(d!==e){const f=o.current,y=oi(c);e?l("MOUNT"):y==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&f!==y?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),wo(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,u=y=>{const v=oi(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&v&&(l("ANIMATION_END"),!s.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},f=y=>{y.target===t&&(o.current=oi(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function oi(e){return(e==null?void 0:e.animationName)||"none"}function WN(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ou=0;function HN(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??bm()),document.body.insertAdjacentElement("beforeend",e[1]??bm()),ou++,()=>{ou===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ou--}},[])}function bm(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Wt=function(){return Wt=Object.assign||function(t){for(var n,r=1,s=arguments.length;r<s;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Wt.apply(this,arguments)};function _x(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]]);return n}function GN(e,t,n){if(n||arguments.length===2)for(var r=0,s=t.length,o;r<s;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var Ai="right-scroll-bar-position",Li="width-before-scroll-bar",KN="with-scroll-bars-hidden",YN="--removed-body-scroll-bar-size";function iu(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function XN(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var s=n.value;s!==r&&(n.value=r,n.callback(r,s))}}}})[0];return n.callback=t,n.facade}var QN=typeof window<"u"?p.useLayoutEffect:p.useEffect,Em=new WeakMap;function ZN(e,t){var n=XN(null,function(r){return e.forEach(function(s){return iu(s,r)})});return QN(function(){var r=Em.get(n);if(r){var s=new Set(r),o=new Set(e),i=n.current;s.forEach(function(a){o.has(a)||iu(a,null)}),o.forEach(function(a){s.has(a)||iu(a,i)})}Em.set(n,e)},[e]),n}function qN(e){return e}function JN(e,t){t===void 0&&(t=qN);var n=[],r=!1,s={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var i=t(o,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(r=!0;n.length;){var i=n;n=[],i.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(o),i=n}var l=function(){var d=i;i=[],d.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){i.push(d),c()},filter:function(d){return i=i.filter(d),n}}}};return s}function eR(e){e===void 0&&(e={});var t=JN(null);return t.options=Wt({async:!0,ssr:!1},e),t}var Ox=function(e){var t=e.sideCar,n=_x(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,Wt({},n))};Ox.isSideCarExport=!0;function tR(e,t){return e.useMedium(t),Ox}var Ix=eR(),au=function(){},qa=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:au,onWheelCapture:au,onTouchMoveCapture:au}),s=r[0],o=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,f=e.sideCar,y=e.noRelative,x=e.noIsolation,v=e.inert,S=e.allowPinchZoom,g=e.as,m=g===void 0?"div":g,w=e.gapMode,b=_x(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,P=ZN([n,t]),E=Wt(Wt({},b),s);return p.createElement(p.Fragment,null,d&&p.createElement(C,{sideCar:Ix,removeScrollBar:c,shards:u,noRelative:y,noIsolation:x,inert:v,setCallbacks:o,allowPinchZoom:!!S,lockRef:n,gapMode:w}),i?p.cloneElement(p.Children.only(a),Wt(Wt({},E),{ref:P})):p.createElement(m,Wt({},E,{className:l,ref:P}),a))});qa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};qa.classNames={fullWidth:Li,zeroRight:Ai};var nR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=nR();return t&&e.setAttribute("nonce",t),e}function sR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function oR(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var iR=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rR())&&(sR(t,n),oR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},aR=function(){var e=iR();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Vx=function(){var e=aR(),t=function(n){var r=n.styles,s=n.dynamic;return e(r,s),null};return t},lR={left:0,top:0,right:0,gap:0},lu=function(e){return parseInt(e||"",10)||0},uR=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[lu(n),lu(r),lu(s)]},cR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lR;var t=uR(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},dR=Vx(),qr="data-scroll-locked",fR=function(e,t,n,r){var s=e.left,o=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
252
|
+
.`.concat(KN,` {
|
|
253
|
+
overflow: hidden `).concat(r,`;
|
|
254
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
255
|
+
}
|
|
256
|
+
body[`).concat(qr,`] {
|
|
257
|
+
overflow: hidden `).concat(r,`;
|
|
258
|
+
overscroll-behavior: contain;
|
|
259
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
260
|
+
padding-left: `.concat(s,`px;
|
|
261
|
+
padding-top: `).concat(o,`px;
|
|
262
|
+
padding-right: `).concat(i,`px;
|
|
263
|
+
margin-left:0;
|
|
264
|
+
margin-top:0;
|
|
265
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
266
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.`).concat(Ai,` {
|
|
270
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.`).concat(Li,` {
|
|
274
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.`).concat(Ai," .").concat(Ai,` {
|
|
278
|
+
right: 0 `).concat(r,`;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.`).concat(Li," .").concat(Li,` {
|
|
282
|
+
margin-right: 0 `).concat(r,`;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
body[`).concat(qr,`] {
|
|
286
|
+
`).concat(YN,": ").concat(a,`px;
|
|
287
|
+
}
|
|
288
|
+
`)},km=function(){var e=parseInt(document.body.getAttribute(qr)||"0",10);return isFinite(e)?e:0},hR=function(){p.useEffect(function(){return document.body.setAttribute(qr,(km()+1).toString()),function(){var e=km()-1;e<=0?document.body.removeAttribute(qr):document.body.setAttribute(qr,e.toString())}},[])},pR=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,s=r===void 0?"margin":r;hR();var o=p.useMemo(function(){return cR(s)},[s]);return p.createElement(dR,{styles:fR(o,!t,s,n?"":"!important")})},Ac=!1;if(typeof window<"u")try{var ii=Object.defineProperty({},"passive",{get:function(){return Ac=!0,!0}});window.addEventListener("test",ii,ii),window.removeEventListener("test",ii,ii)}catch{Ac=!1}var Pr=Ac?{passive:!1}:!1,mR=function(e){return e.tagName==="TEXTAREA"},Fx=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!mR(e)&&n[t]==="visible")},gR=function(e){return Fx(e,"overflowY")},yR=function(e){return Fx(e,"overflowX")},Cm=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=zx(e,r);if(s){var o=Bx(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},vR=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},xR=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},zx=function(e,t){return e==="v"?gR(t):yR(t)},Bx=function(e,t){return e==="v"?vR(t):xR(t)},wR=function(e,t){return e==="h"&&t==="rtl"?-1:1},SR=function(e,t,n,r,s){var o=wR(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,l=t.contains(a),c=!1,d=i>0,u=0,f=0;do{if(!a)break;var y=Bx(e,a),x=y[0],v=y[1],S=y[2],g=v-S-o*x;(x||g)&&zx(e,a)&&(u+=g,f+=x);var m=a.parentNode;a=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(u)<1||!d&&Math.abs(f)<1)&&(c=!0),c},ai=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Pm=function(e){return[e.deltaX,e.deltaY]},Tm=function(e){return e&&"current"in e?e.current:e},bR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ER=function(e){return`
|
|
289
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
290
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
291
|
+
`)},kR=0,Tr=[];function CR(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),s=p.useState(kR++)[0],o=p.useState(Vx)[0],i=p.useRef(e);p.useEffect(function(){i.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var v=GN([e.lockRef.current],(e.shards||[]).map(Tm),!0).filter(Boolean);return v.forEach(function(S){return S.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),v.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var a=p.useCallback(function(v,S){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var g=ai(v),m=n.current,w="deltaX"in v?v.deltaX:m[0]-g[0],b="deltaY"in v?v.deltaY:m[1]-g[1],C,P=v.target,E=Math.abs(w)>Math.abs(b)?"h":"v";if("touches"in v&&E==="h"&&P.type==="range")return!1;var k=window.getSelection(),j=k&&k.anchorNode,T=j?j===P||j.contains(P):!1;if(T)return!1;var A=Cm(E,P);if(!A)return!0;if(A?C=E:(C=E==="v"?"h":"v",A=Cm(E,P)),!A)return!1;if(!r.current&&"changedTouches"in v&&(w||b)&&(r.current=C),!C)return!0;var L=r.current||C;return SR(L,S,v,L==="h"?w:b)},[]),l=p.useCallback(function(v){var S=v;if(!(!Tr.length||Tr[Tr.length-1]!==o)){var g="deltaY"in S?Pm(S):ai(S),m=t.current.filter(function(C){return C.name===S.type&&(C.target===S.target||S.target===C.shadowParent)&&bR(C.delta,g)})[0];if(m&&m.should){S.cancelable&&S.preventDefault();return}if(!m){var w=(i.current.shards||[]).map(Tm).filter(Boolean).filter(function(C){return C.contains(S.target)}),b=w.length>0?a(S,w[0]):!i.current.noIsolation;b&&S.cancelable&&S.preventDefault()}}},[]),c=p.useCallback(function(v,S,g,m){var w={name:v,delta:S,target:g,should:m,shadowParent:PR(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(b){return b!==w})},1)},[]),d=p.useCallback(function(v){n.current=ai(v),r.current=void 0},[]),u=p.useCallback(function(v){c(v.type,Pm(v),v.target,a(v,e.lockRef.current))},[]),f=p.useCallback(function(v){c(v.type,ai(v),v.target,a(v,e.lockRef.current))},[]);p.useEffect(function(){return Tr.push(o),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Pr),document.addEventListener("touchmove",l,Pr),document.addEventListener("touchstart",d,Pr),function(){Tr=Tr.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,Pr),document.removeEventListener("touchmove",l,Pr),document.removeEventListener("touchstart",d,Pr)}},[]);var y=e.removeScrollBar,x=e.inert;return p.createElement(p.Fragment,null,x?p.createElement(o,{styles:ER(s)}):null,y?p.createElement(pR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function PR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const TR=tR(Ix,CR);var $x=p.forwardRef(function(e,t){return p.createElement(qa,Wt({},e,{ref:t,sideCar:TR}))});$x.classNames=qa.classNames;var jR=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jr=new WeakMap,li=new WeakMap,ui={},uu=0,Ux=function(e){return e&&(e.host||Ux(e.parentNode))},NR=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ux(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},RR=function(e,t,n,r){var s=NR(t,Array.isArray(e)?e:[e]);ui[n]||(ui[n]=new WeakMap);var o=ui[n],i=[],a=new Set,l=new Set(s),c=function(u){!u||a.has(u)||(a.add(u),c(u.parentNode))};s.forEach(c);var d=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(f){if(a.has(f))d(f);else try{var y=f.getAttribute(r),x=y!==null&&y!=="false",v=(jr.get(f)||0)+1,S=(o.get(f)||0)+1;jr.set(f,v),o.set(f,S),i.push(f),v===1&&x&&li.set(f,!0),S===1&&f.setAttribute(n,"true"),x||f.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return d(t),a.clear(),uu++,function(){i.forEach(function(u){var f=jr.get(u)-1,y=o.get(u)-1;jr.set(u,f),o.set(u,y),f||(li.has(u)||u.removeAttribute(r),li.delete(u)),y||u.removeAttribute(n)}),uu--,uu||(jr=new WeakMap,jr=new WeakMap,li=new WeakMap,ui={})}},MR=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),s=jR(e);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live], script"))),RR(r,s,n,"aria-hidden")):function(){return null}};function DR(e){const t=AR(e),n=p.forwardRef((r,s)=>{const{children:o,...i}=r,a=p.Children.toArray(o),l=a.find(_R);if(l){const c=l.props.children,d=a.map(u=>u===l?p.Children.count(c)>1?p.Children.only(null):p.isValidElement(c)?c.props.children:null:u);return h.jsx(t,{...i,ref:s,children:p.isValidElement(c)?p.cloneElement(c,void 0,d):null})}return h.jsx(t,{...i,ref:s,children:o})});return n.displayName=`${e}.Slot`,n}function AR(e){const t=p.forwardRef((n,r)=>{const{children:s,...o}=n;if(p.isValidElement(s)){const i=IR(s),a=OR(o,s.props);return s.type!==p.Fragment&&(a.ref=r?Ka(r,i):i),p.cloneElement(s,a)}return p.Children.count(s)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var LR=Symbol("radix.slottable");function _R(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===LR}function OR(e,t){const n={...t};for(const r in t){const s=e[r],o=t[r];/^on[A-Z]/.test(r)?s&&o?n[r]=(...a)=>{const l=o(...a);return s(...a),l}:s&&(n[r]=s):r==="style"?n[r]={...s,...o}:r==="className"&&(n[r]=[s,o].filter(Boolean).join(" "))}return{...e,...n}}function IR(e){var r,s;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ja="Dialog",[Wx]=cN(Ja),[VR,Ot]=Wx(Ja),Hx=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=p.useRef(null),l=p.useRef(null),[c,d]=mN({prop:r,defaultProp:s??!1,onChange:o,caller:Ja});return h.jsx(VR,{scope:t,triggerRef:a,contentRef:l,contentId:nu(),titleId:nu(),descriptionId:nu(),open:c,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(u=>!u),[d]),modal:i,children:n})};Hx.displayName=Ja;var Gx="DialogTrigger",FR=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Ot(Gx,n),o=kr(t,s.triggerRef);return h.jsx(cn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":gf(s.open),...r,ref:o,onClick:Fn(e.onClick,s.onOpenToggle)})});FR.displayName=Gx;var pf="DialogPortal",[zR,Kx]=Wx(pf,{forceMount:void 0}),Yx=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:s}=e,o=Ot(pf,t);return h.jsx(zR,{scope:t,forceMount:n,children:p.Children.map(r,i=>h.jsx(Za,{present:n||o.open,children:h.jsx(Lx,{asChild:!0,container:s,children:i})}))})};Yx.displayName=pf;var va="DialogOverlay",Xx=p.forwardRef((e,t)=>{const n=Kx(va,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Ot(va,e.__scopeDialog);return o.modal?h.jsx(Za,{present:r||o.open,children:h.jsx($R,{...s,ref:t})}):null});Xx.displayName=va;var BR=DR("DialogOverlay.RemoveScroll"),$R=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Ot(va,n);return h.jsx($x,{as:BR,allowPinchZoom:!0,shards:[s.contentRef],children:h.jsx(cn.div,{"data-state":gf(s.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Sr="DialogContent",Qx=p.forwardRef((e,t)=>{const n=Kx(Sr,e.__scopeDialog),{forceMount:r=n.forceMount,...s}=e,o=Ot(Sr,e.__scopeDialog);return h.jsx(Za,{present:r||o.open,children:o.modal?h.jsx(UR,{...s,ref:t}):h.jsx(WR,{...s,ref:t})})});Qx.displayName=Sr;var UR=p.forwardRef((e,t)=>{const n=Ot(Sr,e.__scopeDialog),r=p.useRef(null),s=kr(t,n.contentRef,r);return p.useEffect(()=>{const o=r.current;if(o)return MR(o)},[]),h.jsx(Zx,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Fn(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Fn(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:Fn(e.onFocusOutside,o=>o.preventDefault())})}),WR=p.forwardRef((e,t)=>{const n=Ot(Sr,e.__scopeDialog),r=p.useRef(!1),s=p.useRef(!1);return h.jsx(Zx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:o=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Zx=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=Ot(Sr,n),l=p.useRef(null),c=kr(t,l);return HN(),h.jsxs(h.Fragment,{children:[h.jsx(Dx,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:o,children:h.jsx(Rx,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":gf(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(HR,{titleId:a.titleId}),h.jsx(KR,{contentRef:l,descriptionId:a.descriptionId})]})]})}),mf="DialogTitle",qx=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Ot(mf,n);return h.jsx(cn.h2,{id:s.titleId,...r,ref:t})});qx.displayName=mf;var Jx="DialogDescription",ew=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Ot(Jx,n);return h.jsx(cn.p,{id:s.descriptionId,...r,ref:t})});ew.displayName=Jx;var tw="DialogClose",nw=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,s=Ot(tw,n);return h.jsx(cn.button,{type:"button",...r,ref:t,onClick:Fn(e.onClick,()=>s.onOpenChange(!1))})});nw.displayName=tw;function gf(e){return e?"open":"closed"}var rw="DialogTitleWarning",[fD,sw]=uN(rw,{contentName:Sr,titleName:mf,docsSlug:"dialog"}),HR=({titleId:e})=>{const t=sw(rw),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
292
|
+
|
|
293
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
294
|
+
|
|
295
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},GR="DialogDescriptionWarning",KR=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${sw(GR).contentName}}.`;return p.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},YR=Hx,XR=Yx,ow=Xx,iw=Qx,aw=qx,lw=ew,QR=nw;const yf=YR,ZR=XR,uw=p.forwardRef(({className:e,...t},n)=>h.jsx(ow,{ref:n,className:X("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));uw.displayName=ow.displayName;const el=p.forwardRef(({className:e,children:t,noOverlay:n,...r},s)=>h.jsxs(ZR,{children:[!n&&h.jsx(uw,{}),h.jsxs(iw,{ref:s,className:X("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,h.jsxs(QR,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[h.jsx(Qa,{className:"h-4 w-4"}),h.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));el.displayName=iw.displayName;const tl=({className:e,...t})=>h.jsx("div",{className:X("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});tl.displayName="DialogHeader";const nl=({className:e,...t})=>h.jsx("div",{className:X("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});nl.displayName="DialogFooter";const rl=p.forwardRef(({className:e,...t},n)=>h.jsx(aw,{ref:n,className:X("text-lg font-semibold leading-none tracking-tight",e),...t}));rl.displayName=aw.displayName;const sl=p.forwardRef(({className:e,...t},n)=>h.jsx(lw,{ref:n,className:X("text-sm text-muted-foreground",e),...t}));sl.displayName=lw.displayName;function qR({project:e,open:t,onOpenChange:n,onUpdated:r}){const[s,o]=p.useState([]),[i,a]=p.useState([]),[l,c]=p.useState(!1),[d,u]=p.useState(null);p.useEffect(()=>{if(!t)return;o(e.shares?[...e.shares]:[]),u(null);let m=!1;return ux().then(w=>{m||a(w)}).catch(()=>{}),()=>{m=!0}},[t,e.id]);const f=new Set(s.map(m=>m.username)),y=i.filter(m=>m!==e.owner&&!f.has(m)),x=m=>{o(w=>[...w,{username:m,permission:"view"}])},v=m=>{o(w=>w.filter(b=>b.username!==m))},S=m=>{o(w=>w.map(b=>b.username===m?{...b,permission:b.permission==="view"?"edit":"view"}:b))},g=async()=>{c(!0),u(null);try{const m=await cx(e.id,s);r(m),n(!1)}catch(m){u(m instanceof Error?m.message:"Failed to update shares")}finally{c(!1)}};return h.jsx(yf,{open:t,onOpenChange:n,children:h.jsxs(el,{className:"sm:max-w-md",children:[h.jsxs(tl,{children:[h.jsxs(rl,{className:"flex items-center gap-2",children:[h.jsx(Mc,{className:"h-4 w-4"}),"共享设置"]}),h.jsx(sl,{children:"选择用户并设置权限:可见(只读)或可编辑(读写+终端)"})]}),h.jsxs("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:[s.length===0&&h.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"尚未共享给任何用户"}),s.map(m=>h.jsxs("div",{className:"flex items-center justify-between gap-2 px-1",children:[h.jsx("span",{className:"text-sm font-medium",children:m.username}),h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx("button",{onClick:()=>S(m.username),className:"focus:outline-none",children:h.jsx(rr,{variant:m.permission==="edit"?"default":"secondary",className:"cursor-pointer text-xs",children:m.permission==="edit"?"可编辑":"可见"})}),h.jsx(le,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive",onClick:()=>v(m.username),children:h.jsx(jx,{className:"h-3.5 w-3.5"})})]})]},m.username))]}),y.length>0&&h.jsxs("div",{className:"border-t pt-3",children:[h.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"添加用户"}),h.jsx("div",{className:"flex flex-wrap gap-1.5",children:y.map(m=>h.jsxs(le,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>x(m),children:[h.jsx(ya,{className:"h-3 w-3"}),m]},m))})]}),d&&h.jsx("p",{className:"text-sm text-destructive",children:d}),h.jsxs(nl,{children:[h.jsx(le,{variant:"outline",onClick:()=>n(!1),disabled:l,children:"取消"}),h.jsx(le,{onClick:()=>void g(),disabled:l,children:l?"保存中...":"保存"})]})]})})}function JR(e,t){switch(e){case"thinking":return"Thinking…";case"tool_use":return t?`${t}`:"Tool…";case"tool_result":return"Reading…";case"text":return"Writing…"}}function eM({status:e}){return h.jsx("span",{className:X("inline-block w-2 h-2 rounded-full",{"bg-green-500":e==="running","bg-zinc-400":e==="stopped","bg-yellow-400 animate-pulse":e==="restarting"})})}const jm=M.memo(function({project:t,active:n=!1,statusStack:r=[],onDelete:s,onArchive:o,onUnarchive:i,onUpdated:a}){var m,w;const l=za(),[c,d]=p.useState(!1),u=!!t._sharedPermission,f=t._sharedPermission==="view",y=b=>{b.stopPropagation(),confirm(`Delete project "${t.name}"? This cannot be undone.`)&&s(t.id)},x=b=>{b.stopPropagation(),o(t.id)},v=b=>{b.stopPropagation(),i(t.id)},S=h.jsx(Yt.div,{whileHover:!t.archived&&!n?{y:-2}:{},transition:{duration:.2},children:h.jsxs(lf,{className:X("group cursor-pointer transition-colors relative",t.archived?"opacity-60 hover:opacity-80 hover:border-zinc-400":n?"border-transparent hover:border-transparent bg-transparent shadow-none":"hover:border-zinc-400 hover:shadow-md"),onClick:()=>!t.archived&&l(`/projects/${t.id}`),children:[h.jsxs(uf,{className:"pb-2",children:[h.jsxs("div",{className:"flex items-start justify-between gap-2",children:[h.jsx(cf,{className:X("text-base leading-tight",t.archived&&"text-muted-foreground"),children:t.name}),h.jsx("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0",children:!u&&h.jsxs(h.Fragment,{children:[t.archived?h.jsx(le,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:v,title:"Restore project",children:h.jsx(zj,{className:"h-3.5 w-3.5"})}):h.jsxs(h.Fragment,{children:[h.jsx(le,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:b=>{b.stopPropagation(),d(!0)},title:"共享设置",children:h.jsx(Mc,{className:"h-3.5 w-3.5"})}),h.jsx(le,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:x,title:"Archive project",children:h.jsx(Bj,{className:"h-3.5 w-3.5"})})]}),h.jsx(le,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:y,title:"Delete project",children:h.jsx(jx,{className:"h-3.5 w-3.5"})})]})})]}),h.jsx("div",{className:"flex items-center gap-1.5",children:t.archived?h.jsx(rr,{variant:"secondary",className:"text-xs",children:"Archived"}):h.jsxs(h.Fragment,{children:[h.jsx(eM,{status:t.status}),h.jsx("span",{className:"text-xs text-muted-foreground capitalize",children:t.status}),n&&r.length>0&&h.jsx("div",{className:"ml-auto",children:h.jsx(Ha,{mode:"wait",children:r.slice(-1).map(b=>h.jsx(Yt.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.25,ease:"easeOut"},children:h.jsx(rr,{variant:"outline",className:"text-xs font-normal whitespace-nowrap",children:JR(b.phase,b.detail)})},b.id))})})]})})]}),h.jsxs(df,{className:"space-y-2",children:[h.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[h.jsx(Rc,{className:"h-3.5 w-3.5 flex-shrink-0"}),h.jsx("span",{className:"truncate font-mono",children:t.folderPath})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(rr,{variant:"outline",className:"text-xs font-mono",children:t.cliTool??"claude"}),h.jsx(rr,{variant:t.permissionMode==="unlimited"?"destructive":"secondary",className:"text-xs",children:t.permissionMode==="unlimited"?"Unlimited":"Limited"}),u&&h.jsxs(rr,{variant:"outline",className:"text-xs gap-0.5",children:[f?h.jsx(Wj,{className:"h-3 w-3"}):h.jsx(Tx,{className:"h-3 w-3"}),f?"可见":"可编辑"]}),!u&&t.shares&&t.shares.length>0&&h.jsxs(rr,{variant:"outline",className:"text-xs gap-0.5",children:[h.jsx(Mc,{className:"h-3 w-3"}),t.shares.length]}),h.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(t.createdAt).toLocaleDateString()})]}),(t.tags??[]).length>0&&h.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[(t.tags??[]).slice(0,3).map(b=>h.jsxs("span",{className:"px-1.5 py-0 rounded-full text-[10px] bg-muted text-muted-foreground border border-border",children:["#",b]},b)),(((m=t.tags)==null?void 0:m.length)??0)>3&&h.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["+",(((w=t.tags)==null?void 0:w.length)??0)-3]})]})]})]})}),g=n&&!t.archived?h.jsx("div",{className:"card-active-glow rounded-lg",children:S}):S;return h.jsxs(h.Fragment,{children:[g,!u&&a&&h.jsx(qR,{project:t,open:c,onOpenChange:d,onUpdated:a})]})});function cw({onSelect:e}){const[t,n]=p.useState(""),[r,s]=p.useState(null),[o,i]=p.useState([]),[a,l]=p.useState(!0),[c,d]=p.useState(null),[u,f]=p.useState(!1),[y,x]=p.useState(""),[v,S]=p.useState(null),[g,m]=p.useState(!1),w=p.useRef(null),b=async A=>{l(!0),d(null);try{const L=await bx(A);n(L.path),s(L.parent),i(L.entries)}catch(L){d(L instanceof Error?L.message:"Failed to load directory")}finally{l(!1)}};p.useEffect(()=>{b()},[]),p.useEffect(()=>{u&&setTimeout(()=>{var A;return(A=w.current)==null?void 0:A.focus()},0)},[u]);const C=()=>{x(""),S(null),f(!0)},P=()=>{f(!1),x(""),S(null)},E=async()=>{const A=y.trim();if(A){m(!0),S(null);try{const{path:L}=await Ex(t,A);f(!1),x(""),await b(t),b(L)}catch(L){S(L instanceof Error?L.message:"Failed to create folder")}finally{m(!1)}}},k=A=>{A.key==="Enter"?(A.preventDefault(),E()):A.key==="Escape"&&P()},j=t.split("/").filter(Boolean),T=A=>{const L="/"+j.slice(0,A+1).join("/");b(L)};return h.jsxs("div",{className:"flex flex-col h-64 border rounded-md overflow-hidden",children:[h.jsxs("div",{className:"flex items-center gap-1 px-2 py-2 bg-muted border-b flex-shrink-0",children:[h.jsx(le,{variant:"ghost",size:"sm",className:"h-6 px-1 flex-shrink-0",onClick:()=>void b(),title:"Home",children:h.jsx(Yj,{className:"h-3 w-3"})}),h.jsx("div",{className:"flex items-center gap-1 flex-1 overflow-x-auto min-w-0",children:j.map((A,L)=>h.jsxs(M.Fragment,{children:[h.jsx(Px,{className:"h-3 w-3 text-muted-foreground flex-shrink-0"}),h.jsx("button",{className:"text-xs hover:text-foreground text-muted-foreground whitespace-nowrap",onClick:()=>T(L),children:A})]},L))}),h.jsxs(le,{variant:"ghost",size:"sm",className:"h-6 px-1.5 flex-shrink-0 gap-1 text-xs",onClick:C,disabled:u||a||!!c,title:"New folder",children:[h.jsx(Gj,{className:"h-3.5 w-3.5"}),h.jsx("span",{className:"hidden sm:inline",children:"New folder"})]})]}),h.jsxs("div",{className:"flex-1 overflow-y-auto",children:[a&&h.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"Loading..."}),c&&h.jsx("div",{className:"flex items-center justify-center h-full text-sm text-destructive px-4 text-center",children:c}),!a&&!c&&h.jsxs("div",{className:"p-1",children:[r&&h.jsxs("button",{className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded hover:bg-accent hover:text-accent-foreground",onClick:()=>void b(r),children:[h.jsx($j,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("span",{children:".."})]}),u&&h.jsxs("div",{className:"flex items-center gap-1 px-2 py-1.5",children:[h.jsx(hm,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}),h.jsx("input",{ref:w,className:X("flex-1 text-sm bg-background border rounded px-1.5 py-0.5 outline-none","focus:ring-1 focus:ring-ring",v&&"border-destructive"),placeholder:"Folder name",value:y,onChange:A=>{x(A.target.value),S(null)},onKeyDown:k,disabled:g}),h.jsx("button",{className:"p-1 rounded hover:bg-accent disabled:opacity-50",onClick:()=>void E(),disabled:!y.trim()||g,title:"Create",children:h.jsx(Uj,{className:"h-3.5 w-3.5 text-green-600"})}),h.jsx("button",{className:"p-1 rounded hover:bg-accent",onClick:P,disabled:g,title:"Cancel",children:h.jsx(Qa,{className:"h-3.5 w-3.5 text-muted-foreground"})})]}),v&&h.jsx("p",{className:"px-3 pb-1 text-xs text-destructive",children:v}),o.length===0&&!u&&h.jsx("div",{className:"text-sm text-muted-foreground px-2 py-4 text-center",children:"Empty directory"}),o.map(A=>h.jsxs("button",{className:X("flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded text-left",A.type==="dir"?"hover:bg-accent hover:text-accent-foreground cursor-pointer":"opacity-40 cursor-not-allowed"),onClick:()=>{A.type==="dir"&&b(A.path)},disabled:A.type==="file",children:[A.type==="dir"?h.jsx(hm,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}):h.jsx(Hj,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),h.jsx("span",{className:"truncate",children:A.name})]},A.path))]})]}),h.jsxs("div",{className:"border-t px-3 py-2 flex items-center justify-between gap-2 flex-shrink-0 bg-background",children:[h.jsx("span",{className:"text-xs text-muted-foreground truncate flex-1",children:t}),h.jsx(le,{size:"sm",onClick:()=>e(t),disabled:!t,children:"Select this folder"})]})]})}const tM=[{value:"claude",label:"Claude",desc:"Anthropic Claude Code CLI"},{value:"opencode",label:"OpenCode",desc:"OpenCode CLI (sst/opencode)"},{value:"codex",label:"Codex",desc:"OpenAI Codex CLI"},{value:"qwen",label:"Qwen",desc:"Qwen Code CLI (QwenLM)"}],Nm={claude:{limited:"claude",unlimited:"claude --dangerously-skip-permissions"},opencode:{limited:"opencode",unlimited:"opencode --dangerously-skip-permissions"},codex:{limited:"codex",unlimited:"codex --ask-for-approval never --sandbox danger-full-access"},qwen:{limited:"qwen-code",unlimited:"qwen-code --yolo"}};function nM({open:e,onOpenChange:t,onCreated:n}){const[r,s]=p.useState("name"),[o,i]=p.useState(""),[a,l]=p.useState(""),[c,d]=p.useState("claude"),[u,f]=p.useState("limited"),[y,x]=p.useState(!1),[v,S]=p.useState(null),g=()=>{s("name"),i(""),l(""),d("claude"),f("limited"),S(null),x(!1)},m=k=>{k||g(),t(k)},w=()=>{if(!o.trim()){S("Please enter a project name");return}S(null),s("folder")},b=k=>{l(k),s("settings")},C=async()=>{x(!0),S(null);try{const k=await dx({name:o.trim(),folderPath:a,permissionMode:u,cliTool:c});n(k),m(!1)}catch(k){S(k instanceof Error?k.message:"Failed to create project")}finally{x(!1)}},P={name:"New Project — Name",folder:"New Project — Select Folder",settings:"New Project — Settings"},E=["name","folder","settings"];return h.jsx(yf,{open:e,onOpenChange:m,children:h.jsxs(el,{className:"sm:max-w-lg",children:[h.jsxs(tl,{children:[h.jsx(rl,{children:P[r]}),h.jsxs(sl,{children:[r==="name"&&"Give your project a name.",r==="folder"&&"Choose the working directory for this project.",r==="settings"&&"Choose the AI coding tool and run mode."]})]}),h.jsx("div",{className:"flex gap-2 mb-2",children:E.map((k,j)=>h.jsx("div",{className:`h-1.5 flex-1 rounded-full ${r===k?"bg-primary":E.indexOf(r)>j?"bg-primary/40":"bg-muted"}`},k))}),r==="name"&&h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(Rn,{htmlFor:"project-name",children:"Project Name"}),h.jsx(xo,{id:"project-name",placeholder:"My Project",value:o,onChange:k=>i(k.target.value),onKeyDown:k=>{k.key==="Enter"&&w()},autoFocus:!0})]}),v&&h.jsx("p",{className:"text-sm text-destructive",children:v})]}),r==="folder"&&h.jsxs("div",{className:"space-y-2",children:[h.jsx(Rn,{children:"Working Directory"}),h.jsx(cw,{onSelect:b})]}),r==="settings"&&h.jsxs("div",{className:"space-y-5",children:[h.jsxs("div",{className:"space-y-2",children:[h.jsx(Rn,{children:"AI Coding Tool"}),h.jsx("div",{className:"grid grid-cols-2 gap-2",children:tM.map(k=>h.jsxs("label",{className:`flex items-center gap-2.5 cursor-pointer p-3 rounded-md border transition-colors ${c===k.value?"border-primary bg-primary/5":"hover:bg-accent"}`,children:[h.jsx("input",{type:"radio",name:"cliTool",value:k.value,checked:c===k.value,onChange:()=>d(k.value),className:"accent-primary"}),h.jsxs("div",{children:[h.jsx("div",{className:"font-medium text-sm",children:k.label}),h.jsx("div",{className:"text-xs text-muted-foreground",children:k.desc})]})]},k.value))})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Rn,{children:"Permission Mode"}),h.jsxs("div",{className:"space-y-2",children:[h.jsxs("label",{className:"flex items-start gap-3 cursor-pointer p-3 rounded-md border hover:bg-accent transition-colors",children:[h.jsx("input",{type:"radio",name:"permissionMode",value:"limited",checked:u==="limited",onChange:()=>f("limited"),className:"mt-0.5"}),h.jsxs("div",{children:[h.jsx("div",{className:"font-medium text-sm",children:"Limited"}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["Runs ",h.jsx("code",{className:"bg-muted px-1 rounded",children:Nm[c].limited})," — asks for permission before file changes."]})]})]}),h.jsxs("label",{className:"flex items-start gap-3 cursor-pointer p-3 rounded-md border hover:bg-accent transition-colors",children:[h.jsx("input",{type:"radio",name:"permissionMode",value:"unlimited",checked:u==="unlimited",onChange:()=>f("unlimited"),className:"mt-0.5"}),h.jsxs("div",{children:[h.jsx("div",{className:"font-medium text-sm",children:"Unlimited"}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:["Runs ",h.jsx("code",{className:"bg-muted px-1 rounded",children:Nm[c].unlimited})," — acts autonomously."]})]})]})]})]}),h.jsxs("div",{className:"text-xs text-muted-foreground",children:[h.jsx("span",{className:"font-medium",children:"Folder:"})," ",h.jsx("span",{className:"font-mono",children:a})]}),v&&h.jsx("p",{className:"text-sm text-destructive",children:v})]}),h.jsxs(nl,{children:[r!=="name"&&h.jsx(le,{variant:"outline",onClick:()=>s(r==="settings"?"folder":"name"),disabled:y,children:"Back"}),r==="name"&&h.jsx(le,{onClick:w,children:"Next"}),r==="folder"&&h.jsx(le,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),r==="settings"&&h.jsx(le,{onClick:()=>void C(),disabled:y,children:y?"Creating...":"Create Project"})]})]})})}function rM({open:e,onOpenChange:t,onOpened:n}){const[r,s]=p.useState(""),[o,i]=p.useState(!1),[a,l]=p.useState(null),c=()=>{s(""),l(null),i(!1)},d=f=>{f||c(),t(f)},u=async f=>{s(f),i(!0),l(null);try{const y=await fx(f);n(y),d(!1)}catch(y){l(y instanceof Error?y.message:"Failed to open project"),i(!1)}};return h.jsx(yf,{open:e,onOpenChange:d,children:h.jsxs(el,{className:"sm:max-w-lg",children:[h.jsxs(tl,{children:[h.jsx(rl,{children:"Open Existing Project"}),h.jsxs(sl,{children:["Select a folder that contains a ",h.jsx("code",{className:"bg-muted px-1 rounded text-xs",children:".ccweb/"})," configuration. The project's history and settings will be restored."]})]}),h.jsxs("div",{className:"space-y-2",children:[h.jsx(Rn,{children:"Project Folder"}),h.jsx(cw,{onSelect:f=>void u(f)})]}),a&&h.jsx("p",{className:"text-sm text-destructive",children:a}),r&&!a&&o&&h.jsxs("p",{className:"text-sm text-muted-foreground",children:["Opening project from ",r,"..."]}),h.jsx(nl,{children:h.jsx(le,{variant:"outline",onClick:()=>d(!1),disabled:o,children:"Cancel"})})]})})}function sM(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const oM=e=>{switch(e){case"success":return lM;case"info":return cM;case"warning":return uM;case"error":return dM;default:return null}},iM=Array(12).fill(0),aM=({visible:e,className:t})=>M.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},M.createElement("div",{className:"sonner-spinner"},iM.map((n,r)=>M.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),lM=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),uM=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},M.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"})),cM=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),dM=M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},M.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"})),fM=M.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"},M.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),M.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),hM=()=>{const[e,t]=M.useState(document.hidden);return M.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Lc=1;class pM{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...s}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Lc++,i=this.toasts.find(l=>l.id===o),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...t,id:o,title:r}),{...l,...t,id:o,dismissible:a,title:r}):l):this.addToast({title:r,...s,dismissible:a,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,i;const a=s.then(async c=>{if(i=["resolve",c],M.isValidElement(c))o=!1,this.create({id:r,type:"default",message:c});else if(gM(c)&&!c.ok){o=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,x=typeof u=="object"&&!M.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:f,...x})}else if(c instanceof Error){o=!1;const u=typeof n.error=="function"?await n.error(c):n.error,f=typeof n.description=="function"?await n.description(c):n.description,x=typeof u=="object"&&!M.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:f,...x})}else if(n.success!==void 0){o=!1;const u=typeof n.success=="function"?await n.success(c):n.success,f=typeof n.description=="function"?await n.description(c):n.description,x=typeof u=="object"&&!M.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:f,...x})}}).catch(async c=>{if(i=["reject",c],n.error!==void 0){o=!1;const d=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,y=typeof d=="object"&&!M.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:u,...y})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,d)=>a.then(()=>i[0]==="reject"?d(i[1]):c(i[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Lc++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const et=new pM,mM=(e,t)=>{const n=(t==null?void 0:t.id)||Lc++;return et.addToast({title:e,...t,id:n}),n},gM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",yM=mM,vM=()=>et.toasts,xM=()=>et.getActiveToasts(),_s=Object.assign(yM,{success:et.success,info:et.info,warning:et.warning,error:et.error,custom:et.custom,message:et.message,promise:et.promise,dismiss:et.dismiss,loading:et.loading},{getHistory:vM,getToasts:xM});sM("[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 ci(e){return e.label!==void 0}const wM=3,SM="24px",bM="16px",Rm=4e3,EM=356,kM=14,CM=45,PM=200;function Ft(...e){return e.filter(Boolean).join(" ")}function TM(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const jM=e=>{var t,n,r,s,o,i,a,l,c;const{invert:d,toast:u,unstyled:f,interacting:y,setHeights:x,visibleToasts:v,heights:S,index:g,toasts:m,expanded:w,removeToast:b,defaultRichColors:C,closeButton:P,style:E,cancelButtonStyle:k,actionButtonStyle:j,className:T="",descriptionClassName:A="",duration:L,position:G,gap:oe,expandByDefault:ae,classNames:z,icons:Q,closeButtonAriaLabel:N="Close toast"}=e,[_,I]=M.useState(null),[B,ne]=M.useState(null),[U,Z]=M.useState(!1),[Y,me]=M.useState(!1),[Je,te]=M.useState(!1),[Qt,dn]=M.useState(!1),[Zt,It]=M.useState(!1),[ys,Xn]=M.useState(0),[ol,Qn]=M.useState(0),fn=M.useRef(u.duration||L||Rm),Lo=M.useRef(null),Et=M.useRef(null),il=g===0,al=g+1<=v,ze=u.type,R=u.dismissible!==!1,$=u.className||"",q=u.descriptionClassName||"",re=M.useMemo(()=>S.findIndex(W=>W.toastId===u.id)||0,[S,u.id]),ce=M.useMemo(()=>{var W;return(W=u.closeButton)!=null?W:P},[u.closeButton,P]),Te=M.useMemo(()=>u.duration||L||Rm,[u.duration,L]),Ge=M.useRef(0),ye=M.useRef(0),Zn=M.useRef(0),hn=M.useRef(null),[mw,gw]=G.split("-"),xf=M.useMemo(()=>S.reduce((W,Me,Be)=>Be>=re?W:W+Me.height,0),[S,re]),wf=hM(),yw=u.invert||d,ll=ze==="loading";ye.current=M.useMemo(()=>re*oe+xf,[re,xf]),M.useEffect(()=>{fn.current=Te},[Te]),M.useEffect(()=>{Z(!0)},[]),M.useEffect(()=>{const W=Et.current;if(W){const Me=W.getBoundingClientRect().height;return Qn(Me),x(Be=>[{toastId:u.id,height:Me,position:u.position},...Be]),()=>x(Be=>Be.filter(it=>it.toastId!==u.id))}},[x,u.id]),M.useLayoutEffect(()=>{if(!U)return;const W=Et.current,Me=W.style.height;W.style.height="auto";const Be=W.getBoundingClientRect().height;W.style.height=Me,Qn(Be),x(it=>it.find(Le=>Le.toastId===u.id)?it.map(Le=>Le.toastId===u.id?{...Le,height:Be}:Le):[{toastId:u.id,height:Be,position:u.position},...it])},[U,u.title,u.description,x,u.id,u.jsx,u.action,u.cancel]);const pn=M.useCallback(()=>{me(!0),Xn(ye.current),x(W=>W.filter(Me=>Me.toastId!==u.id)),setTimeout(()=>{b(u)},PM)},[u,b,x,ye]);M.useEffect(()=>{if(u.promise&&ze==="loading"||u.duration===1/0||u.type==="loading")return;let W;return w||y||wf?(()=>{if(Zn.current<Ge.current){const it=new Date().getTime()-Ge.current;fn.current=fn.current-it}Zn.current=new Date().getTime()})():(()=>{fn.current!==1/0&&(Ge.current=new Date().getTime(),W=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),pn()},fn.current))})(),()=>clearTimeout(W)},[w,y,u,ze,wf,pn]),M.useEffect(()=>{u.delete&&(pn(),u.onDismiss==null||u.onDismiss.call(u,u))},[pn,u.delete]);function vw(){var W;if(Q!=null&&Q.loading){var Me;return M.createElement("div",{className:Ft(z==null?void 0:z.loader,u==null||(Me=u.classNames)==null?void 0:Me.loader,"sonner-loader"),"data-visible":ze==="loading"},Q.loading)}return M.createElement(aM,{className:Ft(z==null?void 0:z.loader,u==null||(W=u.classNames)==null?void 0:W.loader),visible:ze==="loading"})}const xw=u.icon||(Q==null?void 0:Q[ze])||oM(ze);var Sf,bf;return M.createElement("li",{tabIndex:0,ref:Et,className:Ft(T,$,z==null?void 0:z.toast,u==null||(t=u.classNames)==null?void 0:t.toast,z==null?void 0:z.default,z==null?void 0:z[ze],u==null||(n=u.classNames)==null?void 0:n[ze]),"data-sonner-toast":"","data-rich-colors":(Sf=u.richColors)!=null?Sf:C,"data-styled":!(u.jsx||u.unstyled||f),"data-mounted":U,"data-promise":!!u.promise,"data-swiped":Zt,"data-removed":Y,"data-visible":al,"data-y-position":mw,"data-x-position":gw,"data-index":g,"data-front":il,"data-swiping":Je,"data-dismissible":R,"data-type":ze,"data-invert":yw,"data-swipe-out":Qt,"data-swipe-direction":B,"data-expanded":!!(w||ae&&U),"data-testid":u.testId,style:{"--index":g,"--toasts-before":g,"--z-index":m.length-g,"--offset":`${Y?ys:ye.current}px`,"--initial-height":ae?"auto":`${ol}px`,...E,...u.style},onDragEnd:()=>{te(!1),I(null),hn.current=null},onPointerDown:W=>{W.button!==2&&(ll||!R||(Lo.current=new Date,Xn(ye.current),W.target.setPointerCapture(W.pointerId),W.target.tagName!=="BUTTON"&&(te(!0),hn.current={x:W.clientX,y:W.clientY})))},onPointerUp:()=>{var W,Me,Be;if(Qt||!R)return;hn.current=null;const it=Number(((W=Et.current)==null?void 0:W.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),_o=Number(((Me=Et.current)==null?void 0:Me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Le=new Date().getTime()-((Be=Lo.current)==null?void 0:Be.getTime()),pt=_==="x"?it:_o,Oo=Math.abs(pt)/Le;if(Math.abs(pt)>=CM||Oo>.11){Xn(ye.current),u.onDismiss==null||u.onDismiss.call(u,u),ne(_==="x"?it>0?"right":"left":_o>0?"down":"up"),pn(),dn(!0);return}else{var kt,Ct;(kt=Et.current)==null||kt.style.setProperty("--swipe-amount-x","0px"),(Ct=Et.current)==null||Ct.style.setProperty("--swipe-amount-y","0px")}It(!1),te(!1),I(null)},onPointerMove:W=>{var Me,Be,it;if(!hn.current||!R||((Me=window.getSelection())==null?void 0:Me.toString().length)>0)return;const Le=W.clientY-hn.current.y,pt=W.clientX-hn.current.x;var Oo;const kt=(Oo=e.swipeDirections)!=null?Oo:TM(G);!_&&(Math.abs(pt)>1||Math.abs(Le)>1)&&I(Math.abs(pt)>Math.abs(Le)?"x":"y");let Ct={x:0,y:0};const Ef=qn=>1/(1.5+Math.abs(qn)/20);if(_==="y"){if(kt.includes("top")||kt.includes("bottom"))if(kt.includes("top")&&Le<0||kt.includes("bottom")&&Le>0)Ct.y=Le;else{const qn=Le*Ef(Le);Ct.y=Math.abs(qn)<Math.abs(Le)?qn:Le}}else if(_==="x"&&(kt.includes("left")||kt.includes("right")))if(kt.includes("left")&&pt<0||kt.includes("right")&&pt>0)Ct.x=pt;else{const qn=pt*Ef(pt);Ct.x=Math.abs(qn)<Math.abs(pt)?qn:pt}(Math.abs(Ct.x)>0||Math.abs(Ct.y)>0)&&It(!0),(Be=Et.current)==null||Be.style.setProperty("--swipe-amount-x",`${Ct.x}px`),(it=Et.current)==null||it.style.setProperty("--swipe-amount-y",`${Ct.y}px`)}},ce&&!u.jsx&&ze!=="loading"?M.createElement("button",{"aria-label":N,"data-disabled":ll,"data-close-button":!0,onClick:ll||!R?()=>{}:()=>{pn(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Ft(z==null?void 0:z.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(bf=Q==null?void 0:Q.close)!=null?bf:fM):null,(ze||u.icon||u.promise)&&u.icon!==null&&((Q==null?void 0:Q[ze])!==null||u.icon)?M.createElement("div",{"data-icon":"",className:Ft(z==null?void 0:z.icon,u==null||(s=u.classNames)==null?void 0:s.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||vw():null,u.type!=="loading"?xw:null):null,M.createElement("div",{"data-content":"",className:Ft(z==null?void 0:z.content,u==null||(o=u.classNames)==null?void 0:o.content)},M.createElement("div",{"data-title":"",className:Ft(z==null?void 0:z.title,u==null||(i=u.classNames)==null?void 0:i.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?M.createElement("div",{"data-description":"",className:Ft(A,q,z==null?void 0:z.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),M.isValidElement(u.cancel)?u.cancel:u.cancel&&ci(u.cancel)?M.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||k,onClick:W=>{ci(u.cancel)&&R&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,W),pn())},className:Ft(z==null?void 0:z.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,M.isValidElement(u.action)?u.action:u.action&&ci(u.action)?M.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||j,onClick:W=>{ci(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,W),!W.defaultPrevented&&pn())},className:Ft(z==null?void 0:z.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function Mm(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function NM(e,t){const n={};return[e,t].forEach((r,s)=>{const o=s===1,i=o?"--mobile-offset":"--offset",a=o?bM:SM;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${i}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${i}-${c}`]=a:n[`${i}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}const RM=M.forwardRef(function(t,n){const{id:r,invert:s,position:o="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:l,className:c,offset:d,mobileOffset:u,theme:f="light",richColors:y,duration:x,style:v,visibleToasts:S=wM,toastOptions:g,dir:m=Mm(),gap:w=kM,icons:b,containerAriaLabel:C="Notifications"}=t,[P,E]=M.useState([]),k=M.useMemo(()=>r?P.filter(U=>U.toasterId===r):P.filter(U=>!U.toasterId),[P,r]),j=M.useMemo(()=>Array.from(new Set([o].concat(k.filter(U=>U.position).map(U=>U.position)))),[k,o]),[T,A]=M.useState([]),[L,G]=M.useState(!1),[oe,ae]=M.useState(!1),[z,Q]=M.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=M.useRef(null),_=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),I=M.useRef(null),B=M.useRef(!1),ne=M.useCallback(U=>{E(Z=>{var Y;return(Y=Z.find(me=>me.id===U.id))!=null&&Y.delete||et.dismiss(U.id),Z.filter(({id:me})=>me!==U.id)})},[]);return M.useEffect(()=>et.subscribe(U=>{if(U.dismiss){requestAnimationFrame(()=>{E(Z=>Z.map(Y=>Y.id===U.id?{...Y,delete:!0}:Y))});return}setTimeout(()=>{Gy.flushSync(()=>{E(Z=>{const Y=Z.findIndex(me=>me.id===U.id);return Y!==-1?[...Z.slice(0,Y),{...Z[Y],...U},...Z.slice(Y+1)]:[U,...Z]})})})}),[P]),M.useEffect(()=>{if(f!=="system"){Q(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Q("dark"):Q("light")),typeof window>"u")return;const U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:Z})=>{Q(Z?"dark":"light")})}catch{U.addListener(({matches:Y})=>{try{Q(Y?"dark":"light")}catch(me){console.error(me)}})}},[f]),M.useEffect(()=>{P.length<=1&&G(!1)},[P]),M.useEffect(()=>{const U=Z=>{var Y;if(i.every(te=>Z[te]||Z.code===te)){var Je;G(!0),(Je=N.current)==null||Je.focus()}Z.code==="Escape"&&(document.activeElement===N.current||(Y=N.current)!=null&&Y.contains(document.activeElement))&&G(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[i]),M.useEffect(()=>{if(N.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,B.current=!1)}},[N.current]),M.createElement("section",{ref:n,"aria-label":`${C} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((U,Z)=>{var Y;const[me,Je]=U.split("-");return k.length?M.createElement("ol",{key:U,dir:m==="auto"?Mm():m,tabIndex:-1,ref:N,className:c,"data-sonner-toaster":!0,"data-sonner-theme":z,"data-y-position":me,"data-x-position":Je,style:{"--front-toast-height":`${((Y=T[0])==null?void 0:Y.height)||0}px`,"--width":`${EM}px`,"--gap":`${w}px`,...v,...NM(d,u)},onBlur:te=>{B.current&&!te.currentTarget.contains(te.relatedTarget)&&(B.current=!1,I.current&&(I.current.focus({preventScroll:!0}),I.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||B.current||(B.current=!0,I.current=te.relatedTarget)},onMouseEnter:()=>G(!0),onMouseMove:()=>G(!0),onMouseLeave:()=>{oe||G(!1)},onDragEnd:()=>G(!1),onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||ae(!0)},onPointerUp:()=>ae(!1)},k.filter(te=>!te.position&&Z===0||te.position===U).map((te,Qt)=>{var dn,Zt;return M.createElement(jM,{key:te.id,icons:b,index:Qt,toast:te,defaultRichColors:y,duration:(dn=g==null?void 0:g.duration)!=null?dn:x,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:s,visibleToasts:S,closeButton:(Zt=g==null?void 0:g.closeButton)!=null?Zt:l,interacting:oe,position:U,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,closeButtonAriaLabel:g==null?void 0:g.closeButtonAriaLabel,removeToast:ne,toasts:k.filter(It=>It.position==te.position),heights:T.filter(It=>It.position==te.position),setHeights:A,expandByDefault:a,gap:w,expanded:L,swipeDirections:t.swipeDirections})})):null}))}),dw=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`,fw=5,hw=3e3;function hD(e,t){const n=p.useRef(null),r=p.useRef(0),s=p.useRef(!0),o=p.useRef(!1),i=p.useRef(t);i.current=t;const a=p.useRef(!1),l=p.useCallback(x=>{var v;((v=n.current)==null?void 0:v.readyState)===WebSocket.OPEN&&n.current.send(JSON.stringify(x))},[]),c=p.useCallback((x,v)=>{var S;((S=n.current)==null?void 0:S.readyState)===WebSocket.OPEN?(n.current.send(JSON.stringify({type:"terminal_subscribe",cols:x,rows:v})),a.current=!1):a.current=!0},[]),d=p.useCallback(x=>{l({type:"terminal_input",data:x})},[l]),u=p.useCallback((x,v)=>{l({type:"terminal_resize",cols:x,rows:v})},[l]),f=p.useCallback(()=>{l({type:"chat_subscribe"})},[l]),y=p.useCallback(()=>{if(!s.current||o.current)return;const x=gs();if(!x){window.location.href="/login";return}o.current=!0;const v=new WebSocket(`${dw}/ws/projects/${e}`);n.current=v,v.onopen=()=>{o.current=!1,r.current=0,v.send(JSON.stringify({type:"auth",token:x}))},v.onmessage=S=>{var m,w,b,C,P,E,k,j;let g;try{g=JSON.parse(S.data)}catch{return}switch(g.type){case"connected":a.current=!1,(w=(m=i.current).onConnected)==null||w.call(m);break;case"terminal_data":(C=(b=i.current).onTerminalData)==null||C.call(b,g.data);break;case"status":(E=(P=i.current).onStatus)==null||E.call(P,g.status);break;case"chat_message":{const T=g;(j=(k=i.current).onChatMessage)==null||j.call(k,T);break}case"error":console.error("[WS] Server error:",g.message);break}},v.onclose=()=>{o.current=!1,n.current=null,s.current&&r.current<fw&&(r.current++,setTimeout(y,hw))},v.onerror=S=>{o.current=!1,console.error("[WS] WebSocket error:",S)}},[e]);return p.useEffect(()=>(s.current=!0,y(),()=>{var x;s.current=!1,(x=n.current)==null||x.close(),n.current=null}),[y]),{subscribeTerminal:c,sendTerminalInput:d,sendTerminalResize:u,subscribeChatMessages:f}}function MM(e){const t=p.useRef(null),n=p.useRef(0),r=p.useRef(!0),s=p.useRef(!1),o=p.useRef(e);o.current=e;const i=p.useCallback(()=>{if(!r.current||s.current)return;const a=gs();if(!a)return;s.current=!0;const l=new WebSocket(`${dw}/ws/dashboard`);t.current=l,l.onopen=()=>{s.current=!1,n.current=0,l.send(JSON.stringify({type:"auth",token:a}))},l.onmessage=c=>{var d,u;try{const f=JSON.parse(c.data);f.type==="activity_update"?o.current.onActivityUpdate(f):f.type==="project_stopped"&&((u=(d=o.current).onProjectStopped)==null||u.call(d,f.projectId,f.projectName))}catch{}},l.onclose=()=>{s.current=!1,t.current=null,r.current&&n.current<fw&&(n.current++,setTimeout(i,hw))},l.onerror=c=>{s.current=!1,console.error("[DashboardWS] Error:",c)}},[]);p.useEffect(()=>(r.current=!0,i(),()=>{var a;r.current=!1,(a=t.current)==null||a.close(),t.current=null}),[i])}function DM(e){if(!e)return"";const t=new Date(e).getTime()-Date.now();if(t<=0)return"即将重置";const n=Math.floor(t/36e5),r=Math.floor(t%36e5/6e4);return n>0?`${n}h${r}m`:`${r}m`}const Dm=5*36e5;function AM(e){if(!e||e.utilization===void 0||e.utilization<=0||!e.resetAt)return null;const t=new Date(e.resetAt).getTime()-Date.now();if(t<=0)return null;const n=Dm-t;return n<=0?null:Math.round(e.utilization/(n/Dm))}function di({label:e,bucket:t}){if(!t||t.utilization===void 0)return null;const n=t.utilization,r=n<50?"text-green-400":n<80?"text-yellow-400":"text-red-400",s=DM(t.resetAt);return h.jsxs("span",{className:"text-muted-foreground whitespace-nowrap",children:[e," ",h.jsxs("span",{className:X("font-medium",r),children:[n,"%"]}),s&&h.jsxs("span",{className:"text-muted-foreground/70 ml-0.5",children:["(",s,")"]})]})}function LM({className:e}){const[t,n]=p.useState("loading"),[r,s]=p.useState(!1);p.useEffect(()=>{const f=async()=>{try{n(await wx())}catch{n(null)}};f();const y=setInterval(()=>void f(),5*60*1e3);return()=>clearInterval(y)},[]);const o=async()=>{s(!0);try{n(await Sx())}catch{n(null)}finally{s(!1)}};if(t==="loading"||!t)return null;const i=!!t.fiveHour,a=!!t.sevenDay,l=!!t.sevenDaySonnet,c=!!t.sevenDayOpus,d=i||a||l||c,u=AM(t.fiveHour);return h.jsxs("div",{className:X("flex items-center gap-1.5 text-xs",e),children:[u!==null&&h.jsxs("span",{className:X("font-medium",u<=100?"text-green-400":"text-orange-400"),title:`5h 使用进度:按当前速率,窗口结束时预计使用 ${u}%`,children:[u,"%"]}),t.planName&&h.jsx("span",{className:"font-medium text-foreground bg-muted border border-border px-2 py-0.5 rounded-full",children:t.planName}),d&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-muted-foreground/50",children:"|"}),h.jsx(di,{label:"5h",bucket:t.fiveHour}),a&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-muted-foreground/50",children:"·"}),h.jsx(di,{label:"7d",bucket:t.sevenDay})]}),l&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-muted-foreground/50",children:"·"}),h.jsx(di,{label:"7d Sonnet",bucket:t.sevenDaySonnet})]}),c&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-muted-foreground/50",children:"·"}),h.jsx(di,{label:"7d Opus",bucket:t.sevenDayOpus})]})]}),h.jsx("button",{onClick:()=>void o(),className:"text-muted-foreground hover:text-foreground transition-colors",title:"刷新用量信息",children:h.jsx(nN,{className:X("h-3 w-3",r&&"animate-spin")})})]})}function _M(){const[e,t]=p.useState([]),[n,r]=p.useState(!1),[s,o]=p.useState(""),[i,a]=p.useState(""),[l,c]=p.useState(""),[d,u]=p.useState(null),[f,y]=p.useState(""),[x,v]=p.useState(""),[S,g]=p.useState(""),m=p.useRef(null),w=p.useRef(null);p.useEffect(()=>{gx().then(t).catch(()=>t([]))},[]),p.useEffect(()=>{n&&setTimeout(()=>{var E;return(E=m.current)==null?void 0:E.focus()},0)},[n]),p.useEffect(()=>{d&&setTimeout(()=>{var E;return(E=w.current)==null?void 0:E.focus()},0)},[d]);const b=async()=>{const E=i.trim();if(E)try{const k=await yx({label:s.trim()||E,command:E,...l?{parentId:l}:{}});t(j=>[...j,k]),o(""),a(""),c(""),r(!1)}catch(k){console.error("[GlobalShortcuts] Failed to add:",k)}},C=async E=>{try{await xx(E),t(k=>k.filter(j=>j.id!==E)),d===E&&u(null)}catch(k){console.error("[GlobalShortcuts] Failed to delete:",k)}},P=async()=>{const E=x.trim();if(!(!E||!d))try{const k=await vx(d,{label:f.trim()||E,command:E,parentId:S||null});t(j=>j.map(T=>T.id===d?k:T)),u(null)}catch(k){console.error("[GlobalShortcuts] Failed to save:",k)}};return h.jsxs("section",{className:"mt-10",children:[h.jsxs("div",{className:"flex items-center justify-between mb-4",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(mm,{className:"h-4 w-4 text-muted-foreground"}),h.jsx("h2",{className:"text-lg font-semibold",children:"全局快捷命令"}),h.jsx("span",{className:"text-xs text-muted-foreground",children:"在所有项目的终端中可用"})]}),h.jsxs("button",{onClick:()=>{r(E=>!E),u(null)},className:X("flex items-center gap-1.5 text-sm px-3 py-1.5 rounded-md border transition-colors",n?"border-border text-foreground bg-muted":"border-border text-muted-foreground hover:text-foreground hover:bg-muted"),children:[h.jsx(ya,{className:"h-3.5 w-3.5"}),"新建"]})]}),n&&h.jsxs("div",{className:"mb-4 p-4 rounded-lg border border-border bg-background space-y-3",children:[h.jsx("input",{ref:m,placeholder:"名称(可选)",value:s,onChange:E=>o(E.target.value),className:"w-full text-sm bg-muted border border-border rounded px-3 py-1.5 text-foreground placeholder:text-muted-foreground outline-none focus:border-border transition-colors"}),h.jsx("textarea",{placeholder:"命令内容…",value:i,onChange:E=>a(E.target.value),rows:3,className:"w-full text-sm bg-muted border border-border rounded px-3 py-1.5 text-foreground placeholder:text-muted-foreground font-mono outline-none focus:border-border transition-colors resize-none",onKeyDown:E=>{E.key==="Enter"&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),b()),E.key==="Escape"&&(r(!1),o(""),a(""),c(""))}}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(tu,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),h.jsxs("select",{value:l,onChange:E=>c(E.target.value),className:"flex-1 text-sm bg-muted border border-border rounded px-3 py-1.5 text-foreground outline-none focus:border-border transition-colors",children:[h.jsx("option",{value:"",children:"无继承"}),e.map(E=>h.jsx("option",{value:E.id,children:E.label},E.id))]})]}),h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("span",{className:"text-xs text-muted-foreground",children:"⌘↩ 保存 · Esc 取消"}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("button",{onClick:()=>{r(!1),o(""),a("")},className:"text-sm px-3 py-1 rounded bg-secondary hover:bg-accent text-foreground transition-colors",children:"取消"}),h.jsx("button",{onClick:()=>void b(),disabled:!i.trim(),className:X("text-sm px-3 py-1 rounded transition-colors text-white",i.trim()?"bg-blue-600 hover:bg-blue-500":"bg-secondary opacity-40 cursor-not-allowed"),children:"保存"})]})]})]}),e.length===0&&!n?h.jsxs("div",{className:"flex flex-col items-center gap-2 py-10 text-muted-foreground/50 border border-dashed border-border rounded-lg",children:[h.jsx(mm,{className:"h-6 w-6"}),h.jsx("p",{className:"text-sm",children:"还没有全局快捷命令"})]}):h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:e.map(E=>d===E.id?h.jsxs("div",{className:"rounded-lg border border-border bg-background p-3 space-y-2",children:[h.jsx("input",{ref:w,value:f,onChange:k=>y(k.target.value),placeholder:"名称(可选)",className:"w-full text-sm bg-muted border border-border rounded px-2.5 py-1 text-foreground placeholder:text-muted-foreground outline-none focus:border-border transition-colors"}),h.jsx("textarea",{value:x,onChange:k=>v(k.target.value),rows:3,className:"w-full text-sm bg-muted border border-border rounded px-2.5 py-1 text-foreground font-mono outline-none focus:border-border transition-colors resize-none",onKeyDown:k=>{k.key==="Enter"&&(k.metaKey||k.ctrlKey)&&(k.preventDefault(),P()),k.key==="Escape"&&u(null)}}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(tu,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),h.jsxs("select",{value:S,onChange:k=>g(k.target.value),className:"flex-1 text-sm bg-muted border border-border rounded px-2.5 py-1 text-foreground outline-none focus:border-border transition-colors",children:[h.jsx("option",{value:"",children:"无继承"}),e.filter(k=>k.id!==E.id).map(k=>h.jsx("option",{value:k.id,children:k.label},k.id))]})]}),h.jsxs("div",{className:"flex gap-2 justify-end",children:[h.jsx("button",{onClick:()=>u(null),className:"text-xs px-2.5 py-1 rounded bg-secondary hover:bg-accent text-foreground transition-colors",children:"取消"}),h.jsx("button",{onClick:()=>void P(),disabled:!x.trim(),className:X("text-xs px-2.5 py-1 rounded transition-colors text-white",x.trim()?"bg-blue-600 hover:bg-blue-500":"bg-secondary opacity-40 cursor-not-allowed"),children:"保存"})]})]},E.id):h.jsxs("div",{className:"group relative rounded-lg border border-border bg-background hover:border-muted-foreground/30 transition-colors p-3",children:[h.jsx("div",{className:"text-sm font-medium text-foreground truncate pr-14",children:E.label}),E.parentId&&(()=>{const k=e.find(j=>j.id===E.parentId);return k?h.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[h.jsx(tu,{className:"h-3 w-3 text-muted-foreground"}),h.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["继承: ",k.label]})]}):null})(),!E.parentId&&E.label!==E.command&&h.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate mt-1 pr-14",children:E.command}),h.jsxs("div",{className:"absolute top-2.5 right-2.5 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[h.jsx("button",{onClick:()=>{u(E.id),y(E.label),v(E.command),g(E.parentId||""),r(!1)},className:"p-1 rounded text-muted-foreground hover:text-blue-400 transition-colors",title:"编辑",children:h.jsx(Tx,{className:"h-3.5 w-3.5"})}),h.jsx("button",{onClick:()=>void C(E.id),className:"p-1 rounded text-muted-foreground hover:text-red-400 transition-colors",title:"删除",children:h.jsx(Qa,{className:"h-3.5 w-3.5"})})]})]},E.id))})]})}const pw=p.createContext({theme:"system",resolved:"dark",setTheme:()=>{}});function OM(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function IM(){return p.useSyncExternalStore(e=>{const t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},()=>OM())}function VM({children:e}){const[t,n]=p.useState(()=>ox(pr.theme,"system")),r=IM(),s=t==="system"?r:t;p.useEffect(()=>{const i=document.documentElement;i.classList.remove("light","dark"),i.classList.add(s)},[s]);const o=i=>{n(i),ix(pr.theme,i)};return h.jsx(pw.Provider,{value:{theme:t,resolved:s,setTheme:o},children:e})}function FM(){return p.useContext(pw)}function zM(){const{theme:e,setTheme:t}=FM(),n=[{value:"light",icon:iN,label:"浅色"},{value:"dark",icon:eN,label:"深色"},{value:"system",icon:Jj,label:"系统"}];return h.jsx("div",{className:"flex items-center rounded-md border border-border bg-muted/50 p-0.5",children:n.map(({value:r,icon:s,label:o})=>h.jsx("button",{onClick:()=>t(r),className:X("p-1 rounded-sm transition-colors",e===r?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:o,children:h.jsx(s,{className:"h-3.5 w-3.5"})},r))})}const BM={workMinutes:30,breakMinutes:5};function xa(){return ox(pr.pomodoroConfig,BM,!0)}function $M(e){Notification.permission==="granted"&&new Notification("番茄钟",{body:e,icon:"/favicon.ico"})}const vf=Ya(e=>({running:!1,phase:"work",secondsLeft:xa().workMinutes*60,setRunning:t=>e({running:t}),setPhase:t=>e({phase:t}),setSecondsLeft:t=>e({secondsLeft:t})}));function UM(){const{running:e,phase:t,secondsLeft:n,setPhase:r,setSecondsLeft:s}=vf(),o=p.useCallback(i=>{const a=xa();r(i),s(i==="work"?a.workMinutes*60:a.breakMinutes*60),$M(i==="break"?"休息一下 ☕":"该工作了 💻")},[r,s]);return p.useEffect(()=>{if(!e)return;if(n===0){o(t==="work"?"break":"work");return}const i=setTimeout(()=>s(n-1),1e3);return()=>clearTimeout(i)},[e,n,t,o,s]),null}function WM(){const{running:e,phase:t,secondsLeft:n}=vf(),r=Math.floor(n/60),s=n%60,o=`${String(r).padStart(2,"0")}:${String(s).padStart(2,"0")}`;return e?Ia.createPortal(h.jsxs("div",{className:"fixed inset-0 flex flex-col items-center justify-center pointer-events-none z-40 select-none",style:{opacity:t==="work"?.1:.6},children:[h.jsx("div",{className:X("font-mono font-bold tabular-nums leading-none",t==="work"?"text-foreground":"text-blue-400 dark:text-blue-300"),style:{fontSize:"clamp(180px, 45vw, 550px)"},children:o}),h.jsx("div",{className:"mt-3 text-muted-foreground font-medium tracking-widest uppercase",style:{fontSize:"clamp(12px, 1.5vw, 20px)"},children:t==="work"?"专注工作":"休息一下"})]}),document.body):null}function HM(){const{running:e,phase:t,secondsLeft:n,setRunning:r,setPhase:s,setSecondsLeft:o}=vf(),i=Math.floor(n/60),a=n%60,l=`${String(i).padStart(2,"0")}:${String(a).padStart(2,"0")}`,c=()=>{if(e){const d=xa();s("work"),o(d.workMinutes*60)}else{const d=xa();s("work"),o(d.workMinutes*60),Notification.permission==="default"&&Notification.requestPermission()}r(!e)};return h.jsx("button",{onClick:c,className:X("p-1 rounded transition-colors",e?t==="work"?"text-red-500 bg-red-500/10 hover:bg-red-500/20":"text-green-500 bg-green-500/10 hover:bg-green-500/20":"text-muted-foreground hover:text-foreground hover:bg-muted"),title:e?t==="work"?`工作中 ${l} — 点击停止`:`休息中 ${l} — 点击停止`:"启动番茄钟",children:h.jsx(aN,{className:"h-4 w-4"})})}function GM(){const e=za(),{projects:t,loading:n,error:r,fetchProjects:s,addProject:o,updateProject:i,removeProject:a}=fm(),l=wr(R=>R.clearToken),[c,d]=p.useState(!1),[u,f]=p.useState(!1),[y,x]=p.useState(new Set),v=p.useRef(new Map),[S,g]=p.useState(new Map),m=p.useRef(0),[w,b]=p.useState(!!document.fullscreenElement),[C,P]=p.useState(!1),[E,k]=p.useState(""),[j,T]=p.useState([]),[A,L]=p.useState(!1);p.useEffect(()=>{if(!E.trim()||E.trim().length<2){T([]);return}const R=setTimeout(()=>{L(!0),kx(E).then($=>T($)).catch(()=>T([])).finally(()=>L(!1))},400);return()=>clearTimeout(R)},[E]);const G=()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()};p.useEffect(()=>{const R=()=>b(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",R),()=>document.removeEventListener("fullscreenchange",R)},[]),p.useEffect(()=>{s()},[s]),p.useEffect(()=>{"Notification"in window&&Notification.permission==="default"&&Notification.requestPermission()},[]);const oe=2e3,ae=3,z=8e3,Q=p.useCallback(R=>{if(R.status){const re=fm.getState().projects.find(ce=>ce.id===R.projectId);re&&re.status!==R.status&&i({...re,status:R.status})}const $=Date.now(),q=v.current;if($-R.lastActivityAt<oe){x(ye=>ye.has(R.projectId)?ye:new Set(ye).add(R.projectId));const re=q.get(R.projectId)??[];let ce=!1;if(R.semantic){const ye=re[re.length-1],Zn=`${R.semantic.phase}:${R.semantic.detail??""}`,hn=ye?`${ye.phase}:${ye.detail??""}`:"";Zn!==hn?(re.push({id:m.current++,phase:R.semantic.phase,detail:R.semantic.detail,ts:$}),ce=!0):ye&&(ye.ts=$)}const Te=re.filter(ye=>$-ye.ts<z),Ge=Te.length>ae?Te.slice(-ae):Te;Ge.length!==re.length&&(ce=!0),q.set(R.projectId,Ge),ce&&g(new Map(q))}else x(re=>{if(!re.has(R.projectId))return re;const ce=new Set(re);return ce.delete(R.projectId),ce}),q.has(R.projectId)&&q.get(R.projectId).length>0&&(q.set(R.projectId,[]),g(new Map(q)))},[]),N=p.useCallback((R,$)=>{"Notification"in window&&Notification.permission==="granted"?new Notification("Claude 已完成",{body:`项目「${$}」的任务已完成`,icon:"/terminal.svg"}):_s.success(`项目「${$}」的任务已完成`,{duration:8e3})},[]);MM({onActivityUpdate:Q,onProjectStopped:N}),p.useEffect(()=>{const R=setInterval(()=>{const $=Date.now(),q=v.current;let re=!1;for(const[ce,Te]of q){const Ge=Te.filter(ye=>$-ye.ts<z);Ge.length!==Te.length&&(q.set(ce,Ge),re=!0)}re&&g(new Map(q)),x(ce=>{let Te=!1;const Ge=new Set(ce);for(const ye of ce){const Zn=q.get(ye);(!Zn||Zn.length===0)&&(Ge.delete(ye),Te=!0)}return Te?Ge:ce})},3e3);return()=>clearInterval(R)},[]);const _=()=>{l(),e("/login")},I=R=>{o(R)},B=R=>{o(R)},ne=async R=>{try{await hx(R),a(R)}catch($){_s.error($ instanceof Error?$.message:"Failed to delete project")}},U=async R=>{try{const $=await px(R);i($)}catch($){_s.error($ instanceof Error?$.message:"Failed to archive project")}},Z=async R=>{try{const $=await mx(R);i($)}catch($){_s.error($ instanceof Error?$.message:"Failed to restore project")}},Y=p.useMemo(()=>t.filter(R=>!R.archived),[t]),me=p.useMemo(()=>t.filter(R=>R.archived),[t]),Je=p.useMemo(()=>Array.from(new Set(t.flatMap(R=>R.tags??[]))),[t]),[te,Qt]=p.useState([]),dn=p.useMemo(()=>te.length===0?Y:Y.filter(R=>te.some($=>{var q;return(q=R.tags)==null?void 0:q.includes($)})),[Y,te]),[Zt,It]=IT(pr.projectOrder,[],{parse:!0}),[ys,Xn]=p.useState(null),[ol,Qn]=p.useState(null);p.useEffect(()=>{if(Y.length===0)return;const R=Y.map($=>$.id);It($=>{const q=$.filter(Te=>R.includes(Te)),re=R.filter(Te=>!$.includes(Te)),ce=[...q,...re];return ce.join(",")===$.join(",")?$:ce})},[Y]);const fn=p.useMemo(()=>Zt.length===0?dn:[...dn].sort((R,$)=>{const q=Zt.indexOf(R.id),re=Zt.indexOf($.id);return q===-1?1:re===-1?-1:q-re}),[dn,Zt]),Lo=p.useCallback(R=>Xn(R),[]),Et=p.useCallback(()=>{Xn(null),Qn(null)},[]),il=p.useCallback((R,$)=>{R.preventDefault(),Qn($)},[]),al=p.useCallback((R,$,q)=>{if(R.preventDefault(),!q||q===$){Qn(null);return}It(re=>{const ce=[...re],Te=ce.indexOf(q),Ge=ce.indexOf($);return Te===-1||Ge===-1?re:(ce.splice(Te,1),ce.splice(Ge,0,q),ce)}),Xn(null),Qn(null)},[It]),ze={onDelete:R=>void ne(R),onArchive:R=>void U(R),onUnarchive:R=>void Z(R),onUpdated:i};return h.jsxs("div",{className:"min-h-screen bg-background",children:[h.jsx("header",{className:"border-b sticky top-0 bg-background z-10",children:h.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-14 flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(pm,{className:"h-5 w-5"}),h.jsx("span",{className:"font-semibold text-lg",children:"CC Web"})]}),h.jsx(LM,{}),h.jsxs("div",{className:"relative",children:[h.jsx(rN,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground pointer-events-none"}),h.jsx(xo,{placeholder:"搜索历史对话…",value:E,onChange:R=>k(R.target.value),className:"pl-8 h-8 text-xs w-48"}),E.trim().length>=2&&h.jsxs("div",{className:"absolute top-full mt-1 right-0 w-96 max-h-80 overflow-y-auto bg-popover border border-border rounded-lg shadow-xl z-50",children:[A&&h.jsx("div",{className:"px-4 py-3 text-xs text-muted-foreground",children:"搜索中…"}),!A&&j.length===0&&h.jsx("div",{className:"px-4 py-3 text-xs text-muted-foreground",children:"无结果"}),j.map((R,$)=>h.jsxs("button",{className:"w-full text-left px-4 py-2.5 hover:bg-muted transition-colors border-b border-border last:border-0",onClick:()=>{e(`/project/${R.projectId}`),k("")},children:[h.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[h.jsx("span",{className:"text-xs font-medium text-foreground truncate",children:R.projectName}),h.jsx("span",{className:"text-[10px] text-muted-foreground flex-shrink-0",children:new Date(R.startedAt).toLocaleDateString("zh-CN")})]}),h.jsx("p",{className:"text-[11px] text-muted-foreground leading-relaxed line-clamp-2",children:R.snippet})]},$))]})]}),h.jsx(le,{variant:"ghost",size:"sm",onClick:()=>e("/skillhub"),title:"SkillHub",children:h.jsx(oN,{className:"h-4 w-4"})}),h.jsx(le,{variant:"ghost",size:"sm",onClick:()=>e("/settings"),title:"设置",children:h.jsx(sN,{className:"h-4 w-4"})}),h.jsx(le,{variant:"ghost",size:"sm",onClick:G,title:w?"Exit fullscreen":"Fullscreen",children:w?h.jsx(Zj,{className:"h-4 w-4"}):h.jsx(Qj,{className:"h-4 w-4"})}),h.jsx(HM,{}),h.jsx(zM,{}),h.jsxs(le,{variant:"ghost",size:"sm",onClick:_,children:[h.jsx(Xj,{className:"h-4 w-4 mr-2"}),"Logout"]})]})}),h.jsxs("main",{className:"max-w-6xl mx-auto px-4 py-8",children:[h.jsxs("div",{className:"flex items-center justify-between mb-6",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"text-2xl font-bold",children:"Projects"}),h.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Each project runs Claude CLI in a dedicated terminal session."})]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsxs(le,{variant:"outline",onClick:()=>f(!0),children:[h.jsx(Rc,{className:"h-4 w-4 mr-2"}),"Open Project"]}),h.jsxs(le,{onClick:()=>d(!0),children:[h.jsx(ya,{className:"h-4 w-4 mr-2"}),"New Project"]})]})]}),n&&h.jsx("div",{className:"text-center text-muted-foreground py-12",children:"Loading projects..."}),r&&h.jsx("div",{className:"text-center text-destructive py-12",children:r}),!n&&!r&&t.length===0&&h.jsxs("div",{className:"text-center py-20",children:[h.jsx(pm,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),h.jsx("h2",{className:"text-lg font-semibold mb-2",children:"No projects yet"}),h.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:"Create a new project or open an existing one."}),h.jsxs("div",{className:"flex gap-2 justify-center",children:[h.jsxs(le,{variant:"outline",onClick:()=>f(!0),children:[h.jsx(Rc,{className:"h-4 w-4 mr-2"}),"Open Project"]}),h.jsxs(le,{onClick:()=>d(!0),children:[h.jsx(ya,{className:"h-4 w-4 mr-2"}),"New Project"]})]})]}),!n&&!r&&Je.length>0&&h.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-4",children:[Je.map(R=>h.jsxs("button",{onClick:()=>Qt($=>$.includes(R)?$.filter(q=>q!==R):[...$,R]),className:X("px-2 py-0.5 rounded-full text-xs border transition-colors",te.includes(R)?"bg-blue-500/20 text-blue-400 border-blue-500/40":"bg-muted text-muted-foreground border-border hover:border-muted-foreground/40"),children:["#",R]},R)),te.length>0&&h.jsx("button",{onClick:()=>Qt([]),className:"px-2 py-0.5 rounded-full text-xs text-muted-foreground hover:text-foreground transition-colors",children:"清除"})]}),!n&&!r&&fn.length>0&&h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:fn.map((R,$)=>h.jsx(Yt.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.3,delay:$*.05,ease:"easeOut"},draggable:!0,onDragStart:()=>Lo(R.id),onDragOver:q=>il(q,R.id),onDrop:q=>al(q,R.id,ys),onDragEnd:Et,style:{opacity:ys===R.id?.4:1,cursor:"grab"},className:X(ol===R.id&&ys!==R.id&&"ring-2 ring-blue-500/50 rounded-xl"),children:h.jsx(jm,{project:R,active:y.has(R.id),statusStack:S.get(R.id)??[],...ze})},R.id))}),!n&&!r&&me.length>0&&h.jsxs("div",{className:"mt-10",children:[h.jsxs("button",{className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors mb-4 group",onClick:()=>P(R=>!R),children:[h.jsx(Yt.span,{animate:{rotate:C?90:0},transition:{duration:.2},children:h.jsx(Px,{className:"h-4 w-4"})}),h.jsx("span",{className:"font-medium",children:"Archived"}),h.jsx("span",{className:"text-xs bg-muted rounded-full px-2 py-0.5",children:me.length})]}),h.jsx(Ha,{children:C&&h.jsx(Yt.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.25,ease:"easeInOut"},className:"overflow-hidden",children:h.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:me.map(R=>h.jsx(jm,{project:R,active:!1,...ze},R.id))})})})]}),h.jsx(_M,{})]}),h.jsx(nM,{open:c,onOpenChange:d,onCreated:I}),h.jsx(rM,{open:u,onOpenChange:f,onOpened:B})]})}class KM extends M.Component{constructor(){super(...arguments);ul(this,"state",{hasError:!1,error:null});ul(this,"handleReset",()=>{var n,r;this.setState({hasError:!1,error:null}),(r=(n=this.props).onReset)==null||r.call(n)})}static getDerivedStateFromError(n){return{hasError:!0,error:n}}componentDidCatch(n,r){console.error("[ErrorBoundary]",n,r.componentStack),_s.error(n.message||"Something went wrong")}render(){return this.state.hasError?this.props.fallback?this.props.fallback:h.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3 p-4 text-sm text-muted-foreground",children:[h.jsx("p",{children:"出错了"}),h.jsx("button",{onClick:this.handleReset,className:"px-3 py-1.5 text-xs rounded-md border border-border hover:bg-muted transition-colors",children:"重新加载"})]}):this.props.children}}function YM({plugin:e,onConfigChange:t,onClose:n}){const{float:r,userConfig:s}=e,[o,i]=p.useState(()=>{var P,E;return{x:((P=s.floatPosition)==null?void 0:P.x)??window.innerWidth*.5-r.defaultWidth/2,y:((E=s.floatPosition)==null?void 0:E.y)??window.innerHeight*.3}}),[a,l]=p.useState(()=>{var P,E;return{w:((P=s.floatSize)==null?void 0:P.w)??r.defaultWidth,h:((E=s.floatSize)==null?void 0:E.h)??r.defaultHeight}}),[c,d]=p.useState(!1),[u,f]=p.useState(100),y=p.useRef(null),x=p.useRef(null),v=p.useCallback(()=>{f(Date.now()%1e5+100)},[]),S=p.useRef(null),g=p.useCallback(P=>{P.preventDefault(),v(),S.current={sx:P.clientX,sy:P.clientY,ox:o.x,oy:o.y},x.current&&(x.current.style.pointerEvents="none");const E=j=>{if(!S.current)return;const T=Math.max(0,Math.min(window.innerWidth-100,S.current.ox+j.clientX-S.current.sx)),A=Math.max(0,Math.min(window.innerHeight-40,S.current.oy+j.clientY-S.current.sy));y.current&&(y.current.style.left=T+"px",y.current.style.top=A+"px")},k=j=>{if(!S.current)return;const T=Math.max(0,Math.min(window.innerWidth-100,S.current.ox+j.clientX-S.current.sx)),A=Math.max(0,Math.min(window.innerHeight-40,S.current.oy+j.clientY-S.current.sy));S.current=null,x.current&&(x.current.style.pointerEvents=""),i({x:T,y:A}),t(e.id,{floatPosition:{x:T,y:A}}),window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",k)};window.addEventListener("mousemove",E),window.addEventListener("mouseup",k)},[o,v,e.id,t]),m=p.useRef(null),w=p.useCallback(P=>{if(!r.resizable)return;P.preventDefault(),P.stopPropagation(),v(),m.current={sx:P.clientX,sy:P.clientY,ow:a.w,oh:a.h},x.current&&(x.current.style.pointerEvents="none");const E=r.minWidth??150,k=r.minHeight??100,j=A=>{if(!m.current)return;const L=Math.max(E,m.current.ow+A.clientX-m.current.sx),G=Math.max(k,m.current.oh+A.clientY-m.current.sy);y.current&&(y.current.style.width=L+"px",y.current.style.height=G+"px")},T=A=>{if(!m.current)return;const L=Math.max(E,m.current.ow+A.clientX-m.current.sx),G=Math.max(k,m.current.oh+A.clientY-m.current.sy);m.current=null,x.current&&(x.current.style.pointerEvents=""),l({w:L,h:G}),t(e.id,{floatSize:{w:L,h:G}}),window.removeEventListener("mousemove",j),window.removeEventListener("mouseup",T)};window.addEventListener("mousemove",j),window.addEventListener("mouseup",T)},[a,r,v,e.id,t]);p.useEffect(()=>{const P=async E=>{var A,L,G,oe,ae;if(E.source!==((A=x.current)==null?void 0:A.contentWindow))return;const{callId:k,method:j,args:T}=E.data;if(!(!k||!j))try{const z=gs(),Q={"Content-Type":"application/json","X-Plugin-Id":e.id};z&&(Q.Authorization=`Bearer ${z}`);let N,_;if(j==="storage:get")N=`/api/plugin-bridge/storage/${e.id}`,_={method:"GET",headers:Q};else if(j==="storage:set")N=`/api/plugin-bridge/storage/${e.id}`,_={method:"PUT",headers:Q,body:JSON.stringify(T)};else{const ne={"project:status":{path:`/api/plugin-bridge/project/status/${T.projectId}`,httpMethod:"GET"},"project:list":{path:"/api/plugin-bridge/project/list",httpMethod:"GET"},"terminal:send":{path:"/api/plugin-bridge/terminal/send",httpMethod:"POST"},"session:read":{path:`/api/plugin-bridge/session/${T.projectId}`,httpMethod:"GET"},"system:info":{path:"/api/plugin-bridge/system/info",httpMethod:"GET"}};if(j==="backend:api"){const{method:U,path:Z,body:Y}=T;N=`/api/plugins/${e.id}${Z}`,_={method:U||"GET",headers:Q},Y&&(U==="POST"||U==="PUT")&&(_.body=JSON.stringify(Y))}else{const U=ne[j];if(!U)throw new Error(`Unknown method: ${j}`);N=U.path,_={method:U.httpMethod,headers:Q},U.httpMethod==="POST"&&(_.body=JSON.stringify(T))}}const B=await(await fetch(N,_)).json();(G=(L=x.current)==null?void 0:L.contentWindow)==null||G.postMessage({callId:k,result:B,error:null},"*")}catch(z){const Q=z instanceof Error?z.message:"Bridge error";(ae=(oe=x.current)==null?void 0:oe.contentWindow)==null||ae.postMessage({callId:k,result:null,error:Q},"*")}};return window.addEventListener("message",P),()=>window.removeEventListener("message",P)},[e.id]);const b=s.clickable??r.clickable.default,C=`/plugins/${e.id}/${e.float?"index.html":""}`;return h.jsxs(Yt.div,{ref:y,className:X("fixed rounded-lg border border-border shadow-xl overflow-hidden flex flex-col","bg-background/95 backdrop-blur-sm"),style:{left:o.x,top:o.y,width:c?200:a.w,height:c?32:a.h,zIndex:u},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},onMouseDown:v,children:[h.jsxs("div",{className:"h-8 flex items-center gap-1 px-2 bg-muted/50 border-b border-border cursor-grab active:cursor-grabbing flex-shrink-0 select-none",onMouseDown:g,children:[h.jsx(Kj,{className:"h-3 w-3 text-muted-foreground/40 flex-shrink-0"}),h.jsx("span",{className:"text-xs text-muted-foreground truncate flex-1",children:e.name}),h.jsx("button",{onClick:()=>d(P=>!P),className:"p-0.5 rounded hover:bg-white/10 text-muted-foreground/60 hover:text-foreground transition-colors",children:h.jsx(qj,{className:"h-3 w-3"})}),h.jsx("button",{onClick:()=>n(e.id),className:"p-0.5 rounded hover:bg-red-500/20 text-muted-foreground/60 hover:text-red-400 transition-colors",children:h.jsx(Qa,{className:"h-3 w-3"})})]}),!c&&h.jsxs("div",{className:"flex-1 min-h-0 relative",children:[h.jsx("iframe",{ref:x,src:C,sandbox:"allow-scripts allow-same-origin",className:"w-full h-full border-0",style:{pointerEvents:b?"auto":"none"}}),r.resizable&&h.jsx("div",{className:"absolute bottom-0 right-0 w-3 h-3 cursor-se-resize",onMouseDown:w,children:h.jsxs("svg",{viewBox:"0 0 12 12",className:"w-3 h-3 text-muted-foreground/30",children:[h.jsx("path",{d:"M11 1v10H1",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),h.jsx("path",{d:"M11 5v6H5",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})]})})]})]})}function XM({plugins:e,onPluginsChange:t,onClose:n}){const r=p.useCallback(async(s,o)=>{t(i=>i.map(a=>a.id===s?{...a,userConfig:{...a.userConfig,...o}}:a));try{await Cx(s,o)}catch{}},[t]);return e.length===0?null:h.jsx(Ha,{children:e.map(s=>h.jsx(YM,{plugin:s,onConfigChange:r,onClose:n},s.id))})}function QM({onTogglePlugin:e,activeIds:t}){const[n,r]=p.useState([]);return p.useEffect(()=>{ga().then(s=>r(s.filter(o=>o.enabled))).catch(()=>r([]))},[]),p.useEffect(()=>{const s=()=>{ga().then(o=>r(o.filter(i=>i.enabled))).catch(()=>{})};return window.addEventListener("focus",s),()=>window.removeEventListener("focus",s)},[]),n.length===0?null:h.jsx("div",{className:"border-b border-border bg-muted/30 px-4",children:h.jsxs("div",{className:"max-w-6xl mx-auto flex items-center gap-1 h-9 overflow-x-auto",children:[h.jsx(tN,{className:"h-3.5 w-3.5 text-muted-foreground/50 flex-shrink-0 mr-1"}),n.map(s=>{const o=t.has(s.id);return h.jsxs(Yt.button,{onClick:()=>e(s),className:X("flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs transition-colors flex-shrink-0",o?"bg-blue-500/15 text-blue-400 border border-blue-500/30":"text-muted-foreground hover:text-foreground hover:bg-muted"),whileHover:{scale:1.02},whileTap:{scale:.98},title:s.description,children:[h.jsx("span",{className:X("h-1.5 w-1.5 rounded-full flex-shrink-0",o?"bg-blue-400":"bg-muted-foreground/30")}),s.name]},s.id)})]})})}const ZM=M.lazy(()=>To(()=>import("./ProjectPage-BmYhTTYq.js").then(e=>e.P),__vite__mapDeps([0,1,2,3,4,5,6])).then(e=>({default:e.ProjectPage}))),qM=M.lazy(()=>To(()=>import("./SettingsPage-C30iHtBo.js"),__vite__mapDeps([7,3,1])).then(e=>({default:e.SettingsPage}))),JM=M.lazy(()=>To(()=>import("./SkillHubPage-BSb-9jya.js"),__vite__mapDeps([8,2,5,3])).then(e=>({default:e.SkillHubPage}))),eD=M.lazy(()=>To(()=>import("./ShareViewPage-BGAvzqO1.js"),__vite__mapDeps([9,5,4])).then(e=>({default:e.ShareViewPage})));function tD(){return h.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:h.jsx("span",{className:"text-muted-foreground text-sm",children:"Loading…"})})}function fi({children:e}){const[t,n]=p.useState(!1),r=wr(o=>o.token),s=wr(o=>o.setToken);return p.useEffect(()=>{if(r){n(!0);return}ma()?hf().then(o=>s(o)).catch(()=>{}).finally(()=>n(!0)):n(!0)},[]),!t&&!r?null:r?h.jsx(h.Fragment,{children:e}):h.jsx(ov,{to:"/login",replace:!0})}function nD(){const[e,t]=p.useState([]),[n,r]=p.useState(()=>{try{return new Set(JSON.parse(localStorage.getItem("cc_plugin_open")||"[]"))}catch{return new Set}}),s=Fa();p.useEffect(()=>{ga().then(t).catch(()=>t([]))},[]);const o=p.useCallback(d=>{r(u=>{const f=new Set(u);f.has(d.id)?f.delete(d.id):f.add(d.id);try{localStorage.setItem("cc_plugin_open",JSON.stringify([...f]))}catch{}return f})},[]),i=p.useCallback(d=>{r(u=>{const f=new Set(u);f.delete(d);try{localStorage.setItem("cc_plugin_open",JSON.stringify([...f]))}catch{}return f})},[]),a=rD(s.pathname),l=e.filter(d=>{if(!d.enabled||!n.has(d.id))return!1;switch(d.userConfig.scope??d.float.scope.default){case"global":return!0;case"dashboard":return a.type==="dashboard";case"project":return a.type==="project";case"project:specific":return a.type==="project"&&(d.userConfig.projectIds??[]).includes(a.projectId??"");default:return!1}}),c=s.pathname==="/login";return h.jsxs(h.Fragment,{children:[!c&&h.jsx(QM,{onTogglePlugin:o,activeIds:n}),h.jsx(XM,{plugins:l,onPluginsChange:t,onClose:i})]})}function rD(e){if(e==="/"||e==="/dashboard")return{type:"dashboard"};const t=e.match(/^\/projects?\/([^/]+)/);return t?{type:"project",projectId:t[1]}:{type:"other"}}function sD(){return h.jsxs(VM,{children:[h.jsx(RM,{richColors:!0,position:"bottom-right"}),h.jsx(UM,{}),h.jsx(WM,{}),h.jsx(KM,{children:h.jsxs(Ub,{children:[h.jsx(nD,{}),h.jsx(p.Suspense,{fallback:h.jsx(tD,{}),children:h.jsxs(zb,{children:[h.jsx(vn,{path:"/login",element:h.jsx(Ij,{})}),h.jsx(vn,{path:"/",element:h.jsx(fi,{children:h.jsx(GM,{})})}),h.jsx(vn,{path:"/projects/:id",element:h.jsx(fi,{children:h.jsx(ZM,{})})}),h.jsx(vn,{path:"/settings",element:h.jsx(fi,{children:h.jsx(qM,{})})}),h.jsx(vn,{path:"/skillhub",element:h.jsx(fi,{children:h.jsx(JM,{})})}),h.jsx(vn,{path:"/share/:token",element:h.jsx(eD,{})}),h.jsx(vn,{path:"*",element:h.jsx(ov,{to:"/",replace:!0})})]})})]})})]})}cu.createRoot(document.getElementById("root")).render(h.jsx(M.StrictMode,{children:h.jsx(sD,{})}));export{tj as $,Ha as A,le as B,Px as C,Cj as D,Wj as E,Rc as F,QT as G,gx as H,xo as I,tu as J,JT as K,yf as L,Zj as M,el as N,tl as O,Tx as P,rl as Q,M as R,pr as S,sl as T,Rn as U,nl as V,qT as W,Qa as X,ZT as Y,mm as Z,To as _,aD as a,tN as a$,Tj as a0,KT as a1,YT as a2,jj as a3,za as a4,$j as a5,rr as a6,HM as a7,zM as a8,pj as a9,$x as aA,Dx as aB,Rx as aC,uj as aD,dj as aE,hj as aF,lf as aG,uf as aH,cf as aI,df as aJ,jx as aK,xa as aL,wj as aM,aN,cj as aO,mj as aP,yj as aQ,xj as aR,fj as aS,vj as aT,gj as aU,Sj as aV,ga as aW,Dj as aX,Aj as aY,_j as aZ,ej as a_,GT as aa,rN as ab,Rj as ac,OT as ad,Mj as ae,oN as af,hD as ag,LM as ah,uD as ai,IT as aj,fm as ak,pm as al,wo as am,kr as an,mN as ao,cn as ap,Fn as aq,cN as ar,Ka as as,nu as at,So as au,Za as av,Ia as aw,Lx as ax,MR as ay,HN as az,gs as b,nj as b0,Nj as b1,lD as b2,ee as c,oj as d,X as e,Qj as f,Am as g,rj as h,ox as i,h as j,dD as k,bx as l,nN as m,sj as n,hm as o,Yt as p,bj as q,p as r,ix as s,_s as t,FM as u,Uj as v,ij as w,ya as x,Ej as y,kj as z};
|