@tom2012/cc-web 2026.4.19-u → 2026.4.19-w
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/adapters/claude-adapter.d.ts.map +1 -1
- package/backend/dist/adapters/claude-adapter.js +48 -5
- package/backend/dist/adapters/claude-adapter.js.map +1 -1
- package/backend/dist/crypto-at-rest.d.ts +8 -0
- package/backend/dist/crypto-at-rest.d.ts.map +1 -0
- package/backend/dist/crypto-at-rest.js +96 -0
- package/backend/dist/crypto-at-rest.js.map +1 -0
- package/backend/dist/hub-auth.d.ts +12 -0
- package/backend/dist/hub-auth.d.ts.map +1 -0
- package/backend/dist/hub-auth.js +123 -0
- package/backend/dist/hub-auth.js.map +1 -0
- package/backend/dist/index.d.ts.map +1 -1
- package/backend/dist/index.js +2 -0
- package/backend/dist/index.js.map +1 -1
- package/backend/dist/memory-prompts.d.ts +30 -0
- package/backend/dist/memory-prompts.d.ts.map +1 -0
- package/backend/dist/memory-prompts.js +163 -0
- package/backend/dist/memory-prompts.js.map +1 -0
- package/backend/dist/routes/claude.d.ts.map +1 -1
- package/backend/dist/routes/claude.js +98 -0
- package/backend/dist/routes/claude.js.map +1 -1
- package/backend/dist/routes/memory-prompts.d.ts +3 -0
- package/backend/dist/routes/memory-prompts.d.ts.map +1 -0
- package/backend/dist/routes/memory-prompts.js +49 -0
- package/backend/dist/routes/memory-prompts.js.map +1 -0
- package/backend/dist/routes/skillhub.d.ts.map +1 -1
- package/backend/dist/routes/skillhub.js +170 -0
- package/backend/dist/routes/skillhub.js.map +1 -1
- package/backend/dist/session-manager.d.ts +12 -0
- package/backend/dist/session-manager.d.ts.map +1 -1
- package/backend/dist/session-manager.js.map +1 -1
- package/backend/dist/sync-service.d.ts.map +1 -1
- package/backend/dist/sync-service.js +7 -2
- package/backend/dist/sync-service.js.map +1 -1
- package/frontend/dist/assets/AssistantMessageContent-ZKbU1jlC.js +13 -0
- package/frontend/dist/assets/{GraphPreview-UVA4ODDv.js → GraphPreview-FNlubgv_.js} +1 -1
- package/frontend/dist/assets/{MobilePage-8bMFdgD9.js → MobilePage-C0xGtLMa.js} +3 -3
- package/frontend/dist/assets/{OfficePreview-DFa568OD.js → OfficePreview-THZQ5px4.js} +2 -2
- package/frontend/dist/assets/{ProjectPage-D23Cx4LX.js → ProjectPage-CTEe2Tdp.js} +5 -5
- package/frontend/dist/assets/SettingsPage-DAflwmGB.js +13 -0
- package/frontend/dist/assets/{SkillHubPage-BBWaNxzY.js → SkillHubPage-PxI0FGcw.js} +3 -3
- package/frontend/dist/assets/{chevron-down-XjVVezAn.js → chevron-down-DtcZkqFf.js} +1 -1
- package/frontend/dist/assets/chevron-up-CUW9T6yb.js +13 -0
- package/frontend/dist/assets/{index-Qowsi3Ey.js → index-D1P-udhw.js} +2 -2
- package/frontend/dist/assets/index-DCiTw3F5.css +1 -0
- package/frontend/dist/assets/index-fJX6wxPU.js +75 -0
- package/frontend/dist/assets/{index-Cz7UGH1l.js → index-rGoP4nhR.js} +1 -1
- package/frontend/dist/assets/{jszip.min-BvfmA-CV.js → jszip.min-Dz4RfJJo.js} +1 -1
- package/frontend/dist/assets/{search-CdJtkP3F.js → search-28CWGQwO.js} +1 -1
- package/frontend/dist/index.html +2 -2
- package/package.json +1 -1
- package/frontend/dist/assets/AssistantMessageContent-DuOuKxgH.js +0 -13
- package/frontend/dist/assets/SettingsPage-CTTCafJA.js +0 -13
- package/frontend/dist/assets/chevron-up-BD4j4icv.js +0 -7
- package/frontend/dist/assets/index-BL3iZx_u.css +0 -1
- package/frontend/dist/assets/index-hLxTQaCY.js +0 -75
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProjectPage-D23Cx4LX.js","assets/purify.es-CgRAQgUo.js","assets/AssistantMessageContent-DuOuKxgH.js","assets/chevron-down-XjVVezAn.js","assets/chevron-up-BD4j4icv.js","assets/AssistantMessageContent-wklAmtGL.css","assets/index-Qowsi3Ey.js","assets/search-CdJtkP3F.js","assets/ProjectPage-9CEnUXvW.css","assets/SettingsPage-CTTCafJA.js","assets/SkillHubPage-BBWaNxzY.js","assets/MobilePage-8bMFdgD9.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var e=Object.defineProperty,t=(t,n,r)=>((t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r)(t,"symbol"!=typeof n?n+"":n,r);function n(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?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(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var i={exports:{}},s={},l={exports:{}},u={},c=Symbol.for("react.element"),d=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),w=Symbol.iterator;var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function j(e,t,n){this.props=e,this.context=t,this.refs=E,this.updater=n||k}function C(){}function P(e,t,n){this.props=e,this.context=t,this.refs=E,this.updater=n||k}j.prototype.isReactComponent={},j.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},j.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},C.prototype=j.prototype;var N=P.prototype=new C;N.constructor=P,S(N,j.prototype),N.isPureReactComponent=!0;var T=Array.isArray,M=Object.prototype.hasOwnProperty,R={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var r,o={},a=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(a=""+t.key),t)M.call(t,r)&&!L.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:c,type:e,key:a,ref:i,props:o,_owner:R.current}}function _(e){return"object"==typeof e&&null!==e&&e.$$typeof===c}var A=/\/+/g;function O(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function I(e,t,n,r,o){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var i=!1;if(null===e)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case c:case d:i=!0}}if(i)return o=o(i=e),e=""===r?"."+O(i,0):r,T(o)?(n="",null!=e&&(n=e.replace(A,"$&/")+"/"),I(o,t,n,"",function(e){return e})):null!=o&&(_(o)&&(o=function(e,t){return{$$typeof:c,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(A,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=""===r?".":r+":",T(e))for(var s=0;s<e.length;s++){var l=r+O(a=e[s],s);i+=I(a,t,n,l,o)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=w&&e[w]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),s=0;!(a=e.next()).done;)i+=I(a=a.value,t,n,l=r+O(a,s++),o);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function z(e,t,n){if(null==e)return e;var r=[],o=0;return I(e,r,"","",function(e){return t.call(n,e,o++)}),r}function F(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var V={current:null},$={transition:null},B={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:$,ReactCurrentOwner:R};function U(){throw Error("act(...) is not supported in production builds of React.")}u.Children={map:z,forEach:function(e,t,n){z(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return z(e,function(){t++}),t},toArray:function(e){return z(e,function(e){return e})||[]},only:function(e){if(!_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},u.Component=j,u.Fragment=f,u.Profiler=h,u.PureComponent=P,u.StrictMode=p,u.Suspense=y,u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,u.act=U,u.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=S({},e.props),o=e.key,a=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,i=R.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)M.call(t,l)&&!L.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:c,type:e.type,key:o,ref:a,props:r,_owner:i}},u.createContext=function(e){return(e={$$typeof:g,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:m,_context:e},e.Consumer=e},u.createElement=D,u.createFactory=function(e){var t=D.bind(null,e);return t.type=e,t},u.createRef=function(){return{current:null}},u.forwardRef=function(e){return{$$typeof:v,render:e}},u.isValidElement=_,u.lazy=function(e){return{$$typeof:x,_payload:{_status:-1,_result:e},_init:F}},u.memo=function(e,t){return{$$typeof:b,type:e,compare:void 0===t?null:t}},u.startTransition=function(e){var t=$.transition;$.transition={};try{e()}finally{$.transition=t}},u.unstable_act=U,u.useCallback=function(e,t){return V.current.useCallback(e,t)},u.useContext=function(e){return V.current.useContext(e)},u.useDebugValue=function(){},u.useDeferredValue=function(e){return V.current.useDeferredValue(e)},u.useEffect=function(e,t){return V.current.useEffect(e,t)},u.useId=function(){return V.current.useId()},u.useImperativeHandle=function(e,t,n){return V.current.useImperativeHandle(e,t,n)},u.useInsertionEffect=function(e,t){return V.current.useInsertionEffect(e,t)},u.useLayoutEffect=function(e,t){return V.current.useLayoutEffect(e,t)},u.useMemo=function(e,t){return V.current.useMemo(e,t)},u.useReducer=function(e,t,n){return V.current.useReducer(e,t,n)},u.useRef=function(e){return V.current.useRef(e)},u.useState=function(e){return V.current.useState(e)},u.useSyncExternalStore=function(e,t,n){return V.current.useSyncExternalStore(e,t,n)},u.useTransition=function(){return V.current.useTransition()},u.version="18.3.1",l.exports=u;var W=l.exports;const H=o(W),G=n({__proto__:null,default:H},[W]);
|
|
3
|
-
/**
|
|
4
|
-
* @license React
|
|
5
|
-
* react-jsx-runtime.production.min.js
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
var Y=W,q=Symbol.for("react.element"),K=Symbol.for("react.fragment"),X=Object.prototype.hasOwnProperty,Q=Y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,J={key:!0,ref:!0,__self:!0,__source:!0};function Z(e,t,n){var r,o={},a=null,i=null;for(r in void 0!==n&&(a=""+n),void 0!==t.key&&(a=""+t.key),void 0!==t.ref&&(i=t.ref),t)X.call(t,r)&&!J.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:q,type:e,key:a,ref:i,props:o,_owner:Q.current}}s.Fragment=K,s.jsx=Z,s.jsxs=Z,i.exports=s;var ee=i.exports,te={},ne={exports:{}},re={},oe={exports:{}},ae={};
|
|
13
|
-
/**
|
|
14
|
-
* @license React
|
|
15
|
-
* scheduler.production.min.js
|
|
16
|
-
*
|
|
17
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the MIT license found in the
|
|
20
|
-
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/
|
|
22
|
-
!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,a=e[r];if(!(0<o(a,t)))break e;e[r]=t,e[n]=a,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length,i=a>>>1;r<i;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>o(l,n))u<a&&0>o(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<a&&0>o(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var l=[],u=[],c=1,d=null,f=3,p=!1,h=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var o=n(u);null!==o;){if(null===o.callback)r(u);else{if(!(o.startTime<=e))break;r(u),o.sortIndex=o.expirationTime,t(l,o)}o=n(u)}}function x(e){if(m=!1,b(e),!h)if(null!==n(l))h=!0,L(w);else{var t=n(u);null!==t&&D(x,t.startTime-e)}}function w(t,o){h=!1,m&&(m=!1,v(j),j=-1),p=!0;var a=f;try{for(b(o),d=n(l);null!==d&&(!(d.expirationTime>o)||t&&!N());){var i=d.callback;if("function"==typeof i){d.callback=null,f=d.priorityLevel;var s=i(d.expirationTime<=o);o=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(o)}else r(l);d=n(l)}if(null!==d)var c=!0;else{var g=n(u);null!==g&&D(x,g.startTime-o),c=!1}return c}finally{d=null,f=a,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,S=!1,E=null,j=-1,C=5,P=-1;function N(){return!(e.unstable_now()-P<C)}function T(){if(null!==E){var t=e.unstable_now();P=t;var n=!0;try{n=E(!0,t)}finally{n?k():(S=!1,E=null)}}else S=!1}if("function"==typeof y)k=function(){y(T)};else if("undefined"!=typeof MessageChannel){var M=new MessageChannel,R=M.port2;M.port1.onmessage=T,k=function(){R.postMessage(null)}}else k=function(){g(T,0)};function L(e){E=e,S||(S=!0,k())}function D(t,n){j=g(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,L(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,o,a){var i=e.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0<a?i+a:i:a=i,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:c++,callback:o,priorityLevel:r,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>i?(r.sortIndex=a,t(u,r),null===n(l)&&r===n(u)&&(m?(v(j),j=-1):m=!0,D(x,a-i))):(r.sortIndex=s,t(l,r),h||p||(h=!0,L(w))),r},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(ae),oe.exports=ae;var ie=oe.exports,se=W,le=ie;
|
|
23
|
-
/**
|
|
24
|
-
* @license React
|
|
25
|
-
* react-dom.production.min.js
|
|
26
|
-
*
|
|
27
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the MIT license found in the
|
|
30
|
-
* LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/function ue(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 ce=new Set,de={};function fe(e,t){pe(e,t),pe(e+"Capture",t)}function pe(e,t){for(de[e]=t,e=0;e<t.length;e++)ce.add(t[e])}var he=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),me=Object.prototype.hasOwnProperty,ge=/^[: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]*$/,ve={},ye={};function be(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new be(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new be(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new be(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new be(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){xe[e]=new be(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new be(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){xe[e]=new be(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){xe[e]=new be(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){xe[e]=new be(e,5,!1,e.toLowerCase(),null,!1,!1)});var we=/[\-:]([a-z])/g;function ke(e){return e[1].toUpperCase()}function Se(e,t,n,r){var o=xe.hasOwnProperty(t)?xe[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!me.call(ye,e)||!me.call(ve,e)&&(ge.test(e)?ye[e]=!0:(ve[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"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(we,ke);xe[t]=new be(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(we,ke);xe[t]=new be(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(we,ke);xe[t]=new be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new be(e,1,!1,e.toLowerCase(),null,!1,!1)}),xe.xlinkHref=new be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){xe[e]=new be(e,1,!1,e.toLowerCase(),null,!0,!0)});var Ee=se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,je=Symbol.for("react.element"),Ce=Symbol.for("react.portal"),Pe=Symbol.for("react.fragment"),Ne=Symbol.for("react.strict_mode"),Te=Symbol.for("react.profiler"),Me=Symbol.for("react.provider"),Re=Symbol.for("react.context"),Le=Symbol.for("react.forward_ref"),De=Symbol.for("react.suspense"),_e=Symbol.for("react.suspense_list"),Ae=Symbol.for("react.memo"),Oe=Symbol.for("react.lazy"),Ie=Symbol.for("react.offscreen"),ze=Symbol.iterator;function Fe(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=ze&&e[ze]||e["@@iterator"])?e:null}var Ve,$e=Object.assign;function Be(e){if(void 0===Ve)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ve=t&&t[1]||""}return"\n"+Ve+e}var Ue=!1;function We(e,t){if(!e||Ue)return"";Ue=!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()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"==typeof u.stack){for(var o=u.stack.split("\n"),a=r.stack.split("\n"),i=o.length-1,s=a.length-1;1<=i&&0<=s&&o[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(o[i]!==a[s]){if(1!==i||1!==s)do{if(i--,0>--s||o[i]!==a[s]){var l="\n"+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=i&&0<=s);break}}}finally{Ue=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Be(e):""}function He(e){switch(e.tag){case 5:return Be(e.type);case 16:return Be("Lazy");case 13:return Be("Suspense");case 19:return Be("SuspenseList");case 0:case 2:case 15:return e=We(e.type,!1);case 11:return e=We(e.type.render,!1);case 1:return e=We(e.type,!0);default:return""}}function Ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Pe:return"Fragment";case Ce:return"Portal";case Te:return"Profiler";case Ne:return"StrictMode";case De:return"Suspense";case _e:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Re:return(e.displayName||"Context")+".Consumer";case Me:return(e._context.displayName||"Context")+".Provider";case Le:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Ae:return null!==(t=e.displayName||null)?t:Ge(e.type)||"Memo";case Oe:t=e._payload,e=e._init;try{return Ge(e(t))}catch(n){}}return null}function Ye(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=(e=t.render).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 Ge(t);case 8:return t===Ne?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function qe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Ke(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Xe(e){e._valueTracker||(e._valueTracker=function(e){var t=Ke(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Qe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ke(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Je(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Ze(e,t){var n=t.checked;return $e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function et(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=qe(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function tt(e,t){null!=(t=t.checked)&&Se(e,"checked",t,!1)}function nt(e,t){tt(e,t);var n=qe(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ot(e,t.type,n):t.hasOwnProperty("defaultValue")&&ot(e,t.type,qe(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function rt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ot(e,t,n){"number"===t&&Je(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var at=Array.isArray;function it(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+qe(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function st(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(ue(91));return $e({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function lt(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(ue(92));if(at(n)){if(1<n.length)throw Error(ue(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:qe(n)}}function ut(e,t){var n=qe(t.value),r=qe(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ct(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function dt(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 ft(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?dt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var pt,ht,mt=(ht=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((pt=pt||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return ht(e,t)})}:ht);function gt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var vt={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},yt=["Webkit","ms","Moz","O"];function bt(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||vt.hasOwnProperty(e)&&vt[e]?(""+t).trim():t+"px"}function xt(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=bt(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(vt).forEach(function(e){yt.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vt[t]=vt[e]})});var wt=$e({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 kt(e,t){if(t){if(wt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(ue(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(ue(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(ue(62))}}function St(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 Et=null;function jt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ct=null,Pt=null,Nt=null;function Tt(e){if(e=Ea(e)){if("function"!=typeof Ct)throw Error(ue(280));var t=e.stateNode;t&&(t=Ca(t),Ct(e.stateNode,e.type,t))}}function Mt(e){Pt?Nt?Nt.push(e):Nt=[e]:Pt=e}function Rt(){if(Pt){var e=Pt,t=Nt;if(Nt=Pt=null,Tt(e),t)for(e=0;e<t.length;e++)Tt(t[e])}}function Lt(e,t){return e(t)}function Dt(){}var _t=!1;function At(e,t,n){if(_t)return e(t,n);_t=!0;try{return Lt(e,t,n)}finally{_t=!1,(null!==Pt||null!==Nt)&&(Dt(),Rt())}}function Ot(e,t){var n=e.stateNode;if(null===n)return null;var r=Ca(n);if(null===r)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)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(ue(231,t,typeof n));return n}var It=!1;if(he)try{var zt={};Object.defineProperty(zt,"passive",{get:function(){It=!0}}),window.addEventListener("test",zt,zt),window.removeEventListener("test",zt,zt)}catch(ht){It=!1}function Ft(e,t,n,r,o,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Vt=!1,$t=null,Bt=!1,Ut=null,Wt={onError:function(e){Vt=!0,$t=e}};function Ht(e,t,n,r,o,a,i,s,l){Vt=!1,$t=null,Ft.apply(Wt,arguments)}function Gt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Yt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function qt(e){if(Gt(e)!==e)throw Error(ue(188))}function Kt(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Gt(e)))throw Error(ue(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return qt(o),e;if(a===r)return qt(o),t;a=a.sibling}throw Error(ue(188))}if(n.return!==r.return)n=o,r=a;else{for(var i=!1,s=o.child;s;){if(s===n){i=!0,n=o,r=a;break}if(s===r){i=!0,r=o,n=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===n){i=!0,n=a,r=o;break}if(s===r){i=!0,r=a,n=o;break}s=s.sibling}if(!i)throw Error(ue(189))}}if(n.alternate!==r)throw Error(ue(190))}if(3!==n.tag)throw Error(ue(188));return n.stateNode.current===n?e:t}(e))?Xt(e):null}function Xt(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Xt(e);if(null!==t)return t;e=e.sibling}return null}var Qt=le.unstable_scheduleCallback,Jt=le.unstable_cancelCallback,Zt=le.unstable_shouldYield,en=le.unstable_requestPaint,tn=le.unstable_now,nn=le.unstable_getCurrentPriorityLevel,rn=le.unstable_ImmediatePriority,on=le.unstable_UserBlockingPriority,an=le.unstable_NormalPriority,sn=le.unstable_LowPriority,ln=le.unstable_IdlePriority,un=null,cn=null;var dn=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(fn(e)/pn|0)|0},fn=Math.log,pn=Math.LN2;var hn=64,mn=4194304;function gn(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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vn(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=268435455&n;if(0!==i){var s=i&~o;0!==s?r=gn(s):0!==(a&=i)&&(r=gn(a))}else 0!==(i=n&~o)?r=gn(i):0!==a&&(r=gn(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(a=t&-t)||16===o&&4194240&a))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-dn(t)),r|=e[n],t&=~o;return r}function yn(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;default:return-1}}function bn(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function xn(){var e=hn;return!(4194240&(hn<<=1))&&(hn=64),e}function wn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function kn(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-dn(t)]=n}function Sn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var En=0;function jn(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Cn,Pn,Nn,Tn,Mn,Rn=!1,Ln=[],Dn=null,_n=null,An=null,On=new Map,In=new Map,zn=[],Fn="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 Vn(e,t){switch(e){case"focusin":case"focusout":Dn=null;break;case"dragenter":case"dragleave":_n=null;break;case"mouseover":case"mouseout":An=null;break;case"pointerover":case"pointerout":On.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":In.delete(t.pointerId)}}function $n(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&(null!==(t=Ea(t))&&Pn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Bn(e){var t=Sa(e.target);if(null!==t){var n=Gt(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Yt(n)))return e.blockedOn=t,void Mn(e.priority,function(){Nn(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Un(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=er(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Ea(n))&&Pn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Et=r,n.target.dispatchEvent(r),Et=null,t.shift()}return!0}function Wn(e,t,n){Un(e)&&n.delete(t)}function Hn(){Rn=!1,null!==Dn&&Un(Dn)&&(Dn=null),null!==_n&&Un(_n)&&(_n=null),null!==An&&Un(An)&&(An=null),On.forEach(Wn),In.forEach(Wn)}function Gn(e,t){e.blockedOn===t&&(e.blockedOn=null,Rn||(Rn=!0,le.unstable_scheduleCallback(le.unstable_NormalPriority,Hn)))}function Yn(e){function t(t){return Gn(t,e)}if(0<Ln.length){Gn(Ln[0],e);for(var n=1;n<Ln.length;n++){var r=Ln[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Dn&&Gn(Dn,e),null!==_n&&Gn(_n,e),null!==An&&Gn(An,e),On.forEach(t),In.forEach(t),n=0;n<zn.length;n++)(r=zn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<zn.length&&null===(n=zn[0]).blockedOn;)Bn(n),null===n.blockedOn&&zn.shift()}var qn=Ee.ReactCurrentBatchConfig,Kn=!0;function Xn(e,t,n,r){var o=En,a=qn.transition;qn.transition=null;try{En=1,Jn(e,t,n,r)}finally{En=o,qn.transition=a}}function Qn(e,t,n,r){var o=En,a=qn.transition;qn.transition=null;try{En=4,Jn(e,t,n,r)}finally{En=o,qn.transition=a}}function Jn(e,t,n,r){if(Kn){var o=er(e,t,n,r);if(null===o)Ko(e,t,r,Zn,n),Vn(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Dn=$n(Dn,e,t,n,r,o),!0;case"dragenter":return _n=$n(_n,e,t,n,r,o),!0;case"mouseover":return An=$n(An,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return On.set(a,$n(On.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,In.set(a,$n(In.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Vn(e,r),4&t&&-1<Fn.indexOf(e)){for(;null!==o;){var a=Ea(o);if(null!==a&&Cn(a),null===(a=er(e,t,n,r))&&Ko(e,t,r,Zn,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else Ko(e,t,r,null,n)}}var Zn=null;function er(e,t,n,r){if(Zn=null,null!==(e=Sa(e=jt(r))))if(null===(t=Gt(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Yt(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Zn=e,null}function tr(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(nn()){case rn:return 1;case on:return 4;case an:case sn:return 16;case ln:return 536870912;default:return 16}default:return 16}}var nr=null,rr=null,or=null;function ar(){if(or)return or;var e,t,n=rr,r=n.length,o="value"in nr?nr.value:nr.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return or=o.slice(e,1<t?1-t:void 0)}function ir(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function sr(){return!0}function lr(){return!1}function ur(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?sr:lr,this.isPropagationStopped=lr,this}return $e(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=sr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=sr)},persist:function(){},isPersistent:sr}),t}var cr,dr,fr,pr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hr=ur(pr),mr=$e({},pr,{view:0,detail:0}),gr=ur(mr),vr=$e({},mr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fr&&(fr&&"mousemove"===e.type?(cr=e.screenX-fr.screenX,dr=e.screenY-fr.screenY):dr=cr=0,fr=e),cr)},movementY:function(e){return"movementY"in e?e.movementY:dr}}),yr=ur(vr),br=ur($e({},vr,{dataTransfer:0})),xr=ur($e({},mr,{relatedTarget:0})),wr=ur($e({},pr,{animationName:0,elapsedTime:0,pseudoElement:0})),kr=$e({},pr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sr=ur(kr),Er=ur($e({},pr,{data:0})),jr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cr={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"},Pr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Nr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pr[e])&&!!t[e]}function Tr(){return Nr}var Mr=$e({},mr,{key:function(e){if(e.key){var t=jr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ir(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Cr[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tr,charCode:function(e){return"keypress"===e.type?ir(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ir(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Rr=ur(Mr),Lr=ur($e({},vr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Dr=ur($e({},mr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tr})),_r=ur($e({},pr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ar=$e({},vr,{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}),Or=ur(Ar),Ir=[9,13,27,32],zr=he&&"CompositionEvent"in window,Fr=null;he&&"documentMode"in document&&(Fr=document.documentMode);var Vr=he&&"TextEvent"in window&&!Fr,$r=he&&(!zr||Fr&&8<Fr&&11>=Fr),Br=String.fromCharCode(32),Ur=!1;function Wr(e,t){switch(e){case"keyup":return-1!==Ir.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Gr=!1;var Yr={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 qr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Yr[e.type]:"textarea"===t}function Kr(e,t,n,r){Mt(r),0<(t=Qo(t,"onChange")).length&&(n=new hr("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xr=null,Qr=null;function Jr(e){Uo(e,0)}function Zr(e){if(Qe(ja(e)))return e}function eo(e,t){if("change"===e)return t}var to=!1;if(he){var no;if(he){var ro="oninput"in document;if(!ro){var oo=document.createElement("div");oo.setAttribute("oninput","return;"),ro="function"==typeof oo.oninput}no=ro}else no=!1;to=no&&(!document.documentMode||9<document.documentMode)}function ao(){Xr&&(Xr.detachEvent("onpropertychange",io),Qr=Xr=null)}function io(e){if("value"===e.propertyName&&Zr(Qr)){var t=[];Kr(t,Qr,e,jt(e)),At(Jr,t)}}function so(e,t,n){"focusin"===e?(ao(),Qr=n,(Xr=t).attachEvent("onpropertychange",io)):"focusout"===e&&ao()}function lo(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Zr(Qr)}function uo(e,t){if("click"===e)return Zr(t)}function co(e,t){if("input"===e||"change"===e)return Zr(t)}var fo="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function po(e,t){if(fo(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)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 o=n[r];if(!me.call(t,o)||!fo(e[o],t[o]))return!1}return!0}function ho(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mo(e,t){var n,r=ho(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ho(r)}}function go(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?go(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function vo(){for(var e=window,t=Je();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Je((e=t.contentWindow).document)}return t}function yo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function bo(e){var t=vo(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&go(n.ownerDocument.documentElement,n)){if(null!==r&&yo(n))if(t=r.start,void 0===(e=r.end)&&(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).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=mo(n,a);var i=mo(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>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;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var xo=he&&"documentMode"in document&&11>=document.documentMode,wo=null,ko=null,So=null,Eo=!1;function jo(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Eo||null==wo||wo!==Je(r)||("selectionStart"in(r=wo)&&yo(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},So&&po(So,r)||(So=r,0<(r=Qo(ko,"onSelect")).length&&(t=new hr("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wo)))}function Co(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Po={animationend:Co("Animation","AnimationEnd"),animationiteration:Co("Animation","AnimationIteration"),animationstart:Co("Animation","AnimationStart"),transitionend:Co("Transition","TransitionEnd")},No={},To={};function Mo(e){if(No[e])return No[e];if(!Po[e])return e;var t,n=Po[e];for(t in n)if(n.hasOwnProperty(t)&&t in To)return No[e]=n[t];return e}he&&(To=document.createElement("div").style,"AnimationEvent"in window||(delete Po.animationend.animation,delete Po.animationiteration.animation,delete Po.animationstart.animation),"TransitionEvent"in window||delete Po.transitionend.transition);var Ro=Mo("animationend"),Lo=Mo("animationiteration"),Do=Mo("animationstart"),_o=Mo("transitionend"),Ao=new Map,Oo="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 Io(e,t){Ao.set(e,t),fe(t,[e])}for(var zo=0;zo<Oo.length;zo++){var Fo=Oo[zo];Io(Fo.toLowerCase(),"on"+(Fo[0].toUpperCase()+Fo.slice(1)))}Io(Ro,"onAnimationEnd"),Io(Lo,"onAnimationIteration"),Io(Do,"onAnimationStart"),Io("dblclick","onDoubleClick"),Io("focusin","onFocus"),Io("focusout","onBlur"),Io(_o,"onTransitionEnd"),pe("onMouseEnter",["mouseout","mouseover"]),pe("onMouseLeave",["mouseout","mouseover"]),pe("onPointerEnter",["pointerout","pointerover"]),pe("onPointerLeave",["pointerout","pointerover"]),fe("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fe("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fe("onBeforeInput",["compositionend","keypress","textInput","paste"]),fe("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fe("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fe("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vo="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(" "),$o=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vo));function Bo(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,i,s,l){if(Ht.apply(this,arguments),Vt){if(!Vt)throw Error(ue(198));var u=$t;Vt=!1,$t=null,Bt||(Bt=!0,Ut=u)}}(r,t,void 0,e),e.currentTarget=null}function Uo(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&o.isPropagationStopped())break e;Bo(o,s,u),a=l}else for(i=0;i<r.length;i++){if(l=(s=r[i]).instance,u=s.currentTarget,s=s.listener,l!==a&&o.isPropagationStopped())break e;Bo(o,s,u),a=l}}}if(Bt)throw e=Ut,Bt=!1,Ut=null,e}function Wo(e,t){var n=t[xa];void 0===n&&(n=t[xa]=new Set);var r=e+"__bubble";n.has(r)||(qo(t,e,2,!1),n.add(r))}function Ho(e,t,n){var r=0;t&&(r|=4),qo(n,e,r,t)}var Go="_reactListening"+Math.random().toString(36).slice(2);function Yo(e){if(!e[Go]){e[Go]=!0,ce.forEach(function(t){"selectionchange"!==t&&($o.has(t)||Ho(t,!1,e),Ho(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Go]||(t[Go]=!0,Ho("selectionchange",!1,t))}}function qo(e,t,n,r){switch(tr(t)){case 1:var o=Xn;break;case 4:o=Qn;break;default:o=Jn}n=o.bind(null,t,n,e),o=void 0,!It||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ko(e,t,n,r,o){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===i)for(i=r.return;null!==i;){var l=i.tag;if((3===l||4===l)&&((l=i.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;i=i.return}for(;null!==s;){if(null===(i=Sa(s)))return;if(5===(l=i.tag)||6===l){r=a=i;continue e}s=s.parentNode}}r=r.return}At(function(){var r=a,o=jt(n),i=[];e:{var s=Ao.get(e);if(void 0!==s){var l=hr,u=e;switch(e){case"keypress":if(0===ir(n))break e;case"keydown":case"keyup":l=Rr;break;case"focusin":u="focus",l=xr;break;case"focusout":u="blur",l=xr;break;case"beforeblur":case"afterblur":l=xr;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=yr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=br;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Dr;break;case Ro:case Lo:case Do:l=wr;break;case _o:l=_r;break;case"scroll":l=gr;break;case"wheel":l=Or;break;case"copy":case"cut":case"paste":l=Sr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Lr}var c=!!(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Ot(h,f))&&c.push(Xo(h,m,p)))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,o),i.push({event:s,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Et||!(u=n.relatedTarget||n.fromElement)||!Sa(u)&&!u[ba])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?Sa(u):null)&&(u!==(d=Gt(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=yr,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Lr,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:ja(l),p=null==u?s:ja(u),(s=new c(m,h+"leave",l,n,o)).target=d,s.relatedTarget=p,m=null,Sa(o)===r&&((c=new c(f,h+"enter",u,n,o)).target=p,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(f=u,h=0,p=c=l;p;p=Jo(p))h++;for(p=0,m=f;m;m=Jo(m))p++;for(;0<h-p;)c=Jo(c),h--;for(;0<p-h;)f=Jo(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Jo(c),f=Jo(f)}c=null}else c=null;null!==l&&Zo(i,s,l,c,!1),null!==u&&null!==d&&Zo(i,d,u,c,!0)}if("select"===(l=(s=r?ja(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=eo;else if(qr(s))if(to)g=co;else{g=lo;var v=so}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=uo);switch(g&&(g=g(e,r))?Kr(i,g,n,o):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ot(s,"number",s.value)),v=r?ja(r):window,e){case"focusin":(qr(v)||"true"===v.contentEditable)&&(wo=v,ko=r,So=null);break;case"focusout":So=ko=wo=null;break;case"mousedown":Eo=!0;break;case"contextmenu":case"mouseup":case"dragend":Eo=!1,jo(i,n,o);break;case"selectionchange":if(xo)break;case"keydown":case"keyup":jo(i,n,o)}var y;if(zr)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Gr?Wr(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&($r&&"ko"!==n.locale&&(Gr||"onCompositionStart"!==b?"onCompositionEnd"===b&&Gr&&(y=ar()):(rr="value"in(nr=o)?nr.value:nr.textContent,Gr=!0)),0<(v=Qo(r,b)).length&&(b=new Er(b,e,null,n,o),i.push({event:b,listeners:v}),y?b.data=y:null!==(y=Hr(n))&&(b.data=y))),(y=Vr?function(e,t){switch(e){case"compositionend":return Hr(t);case"keypress":return 32!==t.which?null:(Ur=!0,Br);case"textInput":return(e=t.data)===Br&&Ur?null:e;default:return null}}(e,n):function(e,t){if(Gr)return"compositionend"===e||!zr&&Wr(e,t)?(e=ar(),or=rr=nr=null,Gr=!1,e):null;switch(e){case"paste":default: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 $r&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Qo(r,"onBeforeInput")).length&&(o=new Er("onBeforeInput","beforeinput",null,n,o),i.push({event:o,listeners:r}),o.data=y))}Uo(i,t)})}function Xo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qo(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;5===o.tag&&null!==a&&(o=a,null!=(a=Ot(e,n))&&r.unshift(Xo(e,a,o)),null!=(a=Ot(e,t))&&r.push(Xo(e,a,o))),e=e.return}return r}function Jo(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Zo(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,o?null!=(l=Ot(n,a))&&i.unshift(Xo(n,l,s)):o||null!=(l=Ot(n,a))&&i.push(Xo(n,l,s))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var ea=/\r\n?/g,ta=/\u0000|\uFFFD/g;function na(e){return("string"==typeof e?e:""+e).replace(ea,"\n").replace(ta,"")}function ra(e,t,n){if(t=na(t),na(e)!==t&&n)throw Error(ue(425))}function oa(){}var aa=null,ia=null;function sa(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var la="function"==typeof setTimeout?setTimeout:void 0,ua="function"==typeof clearTimeout?clearTimeout:void 0,ca="function"==typeof Promise?Promise:void 0,da="function"==typeof queueMicrotask?queueMicrotask:void 0!==ca?function(e){return ca.resolve(null).then(e).catch(fa)}:la;function fa(e){setTimeout(function(){throw e})}function pa(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Yn(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Yn(t)}function ha(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ma(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ga=Math.random().toString(36).slice(2),va="__reactFiber$"+ga,ya="__reactProps$"+ga,ba="__reactContainer$"+ga,xa="__reactEvents$"+ga,wa="__reactListeners$"+ga,ka="__reactHandles$"+ga;function Sa(e){var t=e[va];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ba]||n[va]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ma(e);null!==e;){if(n=e[va])return n;e=ma(e)}return t}n=(e=n).parentNode}return null}function Ea(e){return!(e=e[va]||e[ba])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ja(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(ue(33))}function Ca(e){return e[ya]||null}var Pa=[],Na=-1;function Ta(e){return{current:e}}function Ma(e){0>Na||(e.current=Pa[Na],Pa[Na]=null,Na--)}function Ra(e,t){Na++,Pa[Na]=e.current,e.current=t}var La={},Da=Ta(La),_a=Ta(!1),Aa=La;function Oa(e,t){var n=e.type.contextTypes;if(!n)return La;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ia(e){return null!=(e=e.childContextTypes)}function za(){Ma(_a),Ma(Da)}function Fa(e,t,n){if(Da.current!==La)throw Error(ue(168));Ra(Da,t),Ra(_a,n)}function Va(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(ue(108,Ye(e)||"Unknown",o));return $e({},n,r)}function $a(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||La,Aa=Da.current,Ra(Da,e),Ra(_a,_a.current),!0}function Ba(e,t,n){var r=e.stateNode;if(!r)throw Error(ue(169));n?(e=Va(e,t,Aa),r.__reactInternalMemoizedMergedChildContext=e,Ma(_a),Ma(Da),Ra(Da,e)):Ma(_a),Ra(_a,n)}var Ua=null,Wa=!1,Ha=!1;function Ga(e){null===Ua?Ua=[e]:Ua.push(e)}function Ya(){if(!Ha&&null!==Ua){Ha=!0;var e=0,t=En;try{var n=Ua;for(En=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ua=null,Wa=!1}catch(o){throw null!==Ua&&(Ua=Ua.slice(e+1)),Qt(rn,Ya),o}finally{En=t,Ha=!1}}return null}var qa=[],Ka=0,Xa=null,Qa=0,Ja=[],Za=0,ei=null,ti=1,ni="";function ri(e,t){qa[Ka++]=Qa,qa[Ka++]=Xa,Xa=e,Qa=t}function oi(e,t,n){Ja[Za++]=ti,Ja[Za++]=ni,Ja[Za++]=ei,ei=e;var r=ti;e=ni;var o=32-dn(r)-1;r&=~(1<<o),n+=1;var a=32-dn(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,ti=1<<32-dn(t)+o|n<<o|r,ni=a+e}else ti=1<<a|n<<o|r,ni=e}function ai(e){null!==e.return&&(ri(e,1),oi(e,1,0))}function ii(e){for(;e===Xa;)Xa=qa[--Ka],qa[Ka]=null,Qa=qa[--Ka],qa[Ka]=null;for(;e===ei;)ei=Ja[--Za],Ja[Za]=null,ni=Ja[--Za],Ja[Za]=null,ti=Ja[--Za],Ja[Za]=null}var si=null,li=null,ui=!1,ci=null;function di(e,t){var n=Ac(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function fi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,si=e,li=ha(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,si=e,li=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==ei?{id:ti,overflow:ni}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ac(18,null,null,0)).stateNode=t,n.return=e,e.child=n,si=e,li=null,!0);default:return!1}}function pi(e){return!(!(1&e.mode)||128&e.flags)}function hi(e){if(ui){var t=li;if(t){var n=t;if(!fi(e,t)){if(pi(e))throw Error(ue(418));t=ha(n.nextSibling);var r=si;t&&fi(e,t)?di(r,n):(e.flags=-4097&e.flags|2,ui=!1,si=e)}}else{if(pi(e))throw Error(ue(418));e.flags=-4097&e.flags|2,ui=!1,si=e}}}function mi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;si=e}function gi(e){if(e!==si)return!1;if(!ui)return mi(e),ui=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!sa(e.type,e.memoizedProps)),t&&(t=li)){if(pi(e))throw vi(),Error(ue(418));for(;t;)di(e,t),t=ha(t.nextSibling)}if(mi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(ue(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){li=ha(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}li=null}}else li=si?ha(e.stateNode.nextSibling):null;return!0}function vi(){for(var e=li;e;)e=ha(e.nextSibling)}function yi(){li=si=null,ui=!1}function bi(e){null===ci?ci=[e]:ci.push(e)}var xi=Ee.ReactCurrentBatchConfig;function wi(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(ue(309));var r=n.stateNode}if(!r)throw Error(ue(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(ue(284));if(!n._owner)throw Error(ue(290,e))}return e}function ki(e,t){throw e=Object.prototype.toString.call(t),Error(ue(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Si(e){return(0,e._init)(e._payload)}function Ei(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ic(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=$c(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var a=n.type;return a===Pe?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===Oe&&Si(a)===t.type)?((r=o(t,n.props)).ref=wi(e,t,n),r.return=e,r):((r=zc(n.type,n.key,n.props,null,e.mode,r)).ref=wi(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bc(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function c(e,t,n,r,a){return null===t||7!==t.tag?((t=Fc(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=$c(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case je:return(n=zc(t.type,t.key,t.props,null,e.mode,n)).ref=wi(e,null,t),n.return=e,n;case Ce:return(t=Bc(t,e.mode,n)).return=e,t;case Oe:return d(e,(0,t._init)(t._payload),n)}if(at(t)||Fe(t))return(t=Fc(t,e.mode,n,null)).return=e,t;ki(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case je:return n.key===o?l(e,t,n,r):null;case Ce:return n.key===o?u(e,t,n,r):null;case Oe:return f(e,t,(o=n._init)(n._payload),r)}if(at(n)||Fe(n))return null!==o?null:c(e,t,n,r,null);ki(e,n)}return null}function p(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case je:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Ce:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Oe:return p(e,t,n,(0,r._init)(r._payload),o)}if(at(r)||Fe(r))return c(t,e=e.get(n)||null,r,o,null);ki(t,r)}return null}return function s(l,u,c,h){if("object"==typeof c&&null!==c&&c.type===Pe&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case je:e:{for(var m=c.key,g=u;null!==g;){if(g.key===m){if((m=c.type)===Pe){if(7===g.tag){n(l,g.sibling),(u=o(g,c.props.children)).return=l,l=u;break e}}else if(g.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===Oe&&Si(m)===g.type){n(l,g.sibling),(u=o(g,c.props)).ref=wi(l,g,c),u.return=l,l=u;break e}n(l,g);break}t(l,g),g=g.sibling}c.type===Pe?((u=Fc(c.props.children,l.mode,h,c.key)).return=l,l=u):((h=zc(c.type,c.key,c.props,null,l.mode,h)).ref=wi(l,u,c),h.return=l,l=h)}return i(l);case Ce:e:{for(g=c.key;null!==u;){if(u.key===g){if(4===u.tag&&u.stateNode.containerInfo===c.containerInfo&&u.stateNode.implementation===c.implementation){n(l,u.sibling),(u=o(u,c.children||[])).return=l,l=u;break e}n(l,u);break}t(l,u),u=u.sibling}(u=Bc(c,l.mode,h)).return=l,l=u}return i(l);case Oe:return s(l,u,(g=c._init)(c._payload),h)}if(at(c))return function(o,i,s,l){for(var u=null,c=null,h=i,m=i=0,g=null;null!==h&&m<s.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=f(o,h,s[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(o,h),i=a(v,i,m),null===c?u=v:c.sibling=v,c=v,h=g}if(m===s.length)return n(o,h),ui&&ri(o,m),u;if(null===h){for(;m<s.length;m++)null!==(h=d(o,s[m],l))&&(i=a(h,i,m),null===c?u=h:c.sibling=h,c=h);return ui&&ri(o,m),u}for(h=r(o,h);m<s.length;m++)null!==(g=p(h,o,m,s[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),i=a(g,i,m),null===c?u=g:c.sibling=g,c=g);return e&&h.forEach(function(e){return t(o,e)}),ui&&ri(o,m),u}(l,u,c,h);if(Fe(c))return function(o,i,s,l){var u=Fe(s);if("function"!=typeof u)throw Error(ue(150));if(null==(s=u.call(s)))throw Error(ue(151));for(var c=u=null,h=i,m=i=0,g=null,v=s.next();null!==h&&!v.done;m++,v=s.next()){h.index>m?(g=h,h=null):g=h.sibling;var y=f(o,h,v.value,l);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(o,h),i=a(y,i,m),null===c?u=y:c.sibling=y,c=y,h=g}if(v.done)return n(o,h),ui&&ri(o,m),u;if(null===h){for(;!v.done;m++,v=s.next())null!==(v=d(o,v.value,l))&&(i=a(v,i,m),null===c?u=v:c.sibling=v,c=v);return ui&&ri(o,m),u}for(h=r(o,h);!v.done;m++,v=s.next())null!==(v=p(h,o,m,v.value,l))&&(e&&null!==v.alternate&&h.delete(null===v.key?m:v.key),i=a(v,i,m),null===c?u=v:c.sibling=v,c=v);return e&&h.forEach(function(e){return t(o,e)}),ui&&ri(o,m),u}(l,u,c,h);ki(l,c)}return"string"==typeof c&&""!==c||"number"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(l,u.sibling),(u=o(u,c)).return=l,l=u):(n(l,u),(u=$c(c,l.mode,h)).return=l,l=u),i(l)):n(l,u)}}var ji=Ei(!0),Ci=Ei(!1),Pi=Ta(null),Ni=null,Ti=null,Mi=null;function Ri(){Mi=Ti=Ni=null}function Li(e){var t=Pi.current;Ma(Pi),e._currentValue=t}function Di(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _i(e,t){Ni=e,Mi=Ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Sl=!0),e.firstContext=null)}function Ai(e){var t=e._currentValue;if(Mi!==e)if(e={context:e,memoizedValue:t,next:null},null===Ti){if(null===Ni)throw Error(ue(308));Ti=e,Ni.dependencies={lanes:0,firstContext:e}}else Ti=Ti.next=e;return t}var Oi=null;function Ii(e){null===Oi?Oi=[e]:Oi.push(e)}function zi(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Ii(t)):(n.next=o.next,o.next=n),t.interleaved=n,Fi(e,r)}function Fi(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Vi=!1;function $i(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bi(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 Ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Lu){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Fi(e,n)}return null===(o=r.interleaved)?(t.next=t,Ii(r)):(t.next=o.next,o.next=t),r.interleaved=t,Fi(e,n)}function Hi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Sn(e,n)}}function Gi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Yi(e,t,n,r){var o=e.updateQueue;Vi=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,u=l.next;l.next=null,null===i?a=u:i.next=u,i=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==a){var d=o.baseState;for(i=0,c=u=l=null,s=a;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=$e({},d,f);break e;case 2:Vi=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,i|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(f=s).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===c&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{i|=o.lane,o=o.next}while(o!==t)}else null===a&&(o.shared.lanes=0);Vu|=i,e.lanes=i,e.memoizedState=d}}function qi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(ue(191,o));o.call(r)}}}var Ki={},Xi=Ta(Ki),Qi=Ta(Ki),Ji=Ta(Ki);function Zi(e){if(e===Ki)throw Error(ue(174));return e}function es(e,t){switch(Ra(Ji,t),Ra(Qi,e),Ra(Xi,Ki),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ft(null,"");break;default:t=ft(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ma(Xi),Ra(Xi,t)}function ts(){Ma(Xi),Ma(Qi),Ma(Ji)}function ns(e){Zi(Ji.current);var t=Zi(Xi.current),n=ft(t,e.type);t!==n&&(Ra(Qi,e),Ra(Xi,n))}function rs(e){Qi.current===e&&(Ma(Xi),Ma(Qi))}var os=Ta(0);function as(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var is=[];function ss(){for(var e=0;e<is.length;e++)is[e]._workInProgressVersionPrimary=null;is.length=0}var ls=Ee.ReactCurrentDispatcher,us=Ee.ReactCurrentBatchConfig,cs=0,ds=null,fs=null,ps=null,hs=!1,ms=!1,gs=0,vs=0;function ys(){throw Error(ue(321))}function bs(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!fo(e[n],t[n]))return!1;return!0}function xs(e,t,n,r,o,a){if(cs=a,ds=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ls.current=null===e||null===e.memoizedState?rl:ol,e=n(r,o),ms){a=0;do{if(ms=!1,gs=0,25<=a)throw Error(ue(301));a+=1,ps=fs=null,t.updateQueue=null,ls.current=al,e=n(r,o)}while(ms)}if(ls.current=nl,t=null!==fs&&null!==fs.next,cs=0,ps=fs=ds=null,hs=!1,t)throw Error(ue(300));return e}function ws(){var e=0!==gs;return gs=0,e}function ks(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ps?ds.memoizedState=ps=e:ps=ps.next=e,ps}function Ss(){if(null===fs){var e=ds.alternate;e=null!==e?e.memoizedState:null}else e=fs.next;var t=null===ps?ds.memoizedState:ps.next;if(null!==t)ps=t,fs=e;else{if(null===e)throw Error(ue(310));e={memoizedState:(fs=e).memoizedState,baseState:fs.baseState,baseQueue:fs.baseQueue,queue:fs.queue,next:null},null===ps?ds.memoizedState=ps=e:ps=ps.next=e}return ps}function Es(e,t){return"function"==typeof t?t(e):t}function js(e){var t=Ss(),n=t.queue;if(null===n)throw Error(ue(311));n.lastRenderedReducer=e;var r=fs,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var i=o.next;o.next=a.next,a.next=i}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var s=i=null,l=null,u=a;do{var c=u.lane;if((cs&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(s=l=d,i=r):l=l.next=d,ds.lanes|=c,Vu|=c}u=u.next}while(null!==u&&u!==a);null===l?i=r:l.next=s,fo(r,t.memoizedState)||(Sl=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,ds.lanes|=a,Vu|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Cs(e){var t=Ss(),n=t.queue;if(null===n)throw Error(ue(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var i=o=o.next;do{a=e(a,i.action),i=i.next}while(i!==o);fo(a,t.memoizedState)||(Sl=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Ps(){}function Ns(e,t){var n=ds,r=Ss(),o=t(),a=!fo(r.memoizedState,o);if(a&&(r.memoizedState=o,Sl=!0),r=r.queue,Vs(Rs.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ps&&1&ps.memoizedState.tag){if(n.flags|=2048,As(9,Ms.bind(null,n,r,o,t),void 0,null),null===Du)throw Error(ue(349));30&cs||Ts(n,t,o)}return o}function Ts(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ds.updateQueue)?(t={lastEffect:null,stores:null},ds.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ms(e,t,n,r){t.value=n,t.getSnapshot=r,Ls(t)&&Ds(e)}function Rs(e,t,n){return n(function(){Ls(t)&&Ds(e)})}function Ls(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fo(e,n)}catch(r){return!0}}function Ds(e){var t=Fi(e,1);null!==t&&ic(t,e,1,-1)}function _s(e){var t=ks();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Es,lastRenderedState:e},t.queue=e,e=e.dispatch=Js.bind(null,ds,e),[t.memoizedState,e]}function As(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ds.updateQueue)?(t={lastEffect:null,stores:null},ds.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Os(){return Ss().memoizedState}function Is(e,t,n,r){var o=ks();ds.flags|=e,o.memoizedState=As(1|t,n,void 0,void 0===r?null:r)}function zs(e,t,n,r){var o=Ss();r=void 0===r?null:r;var a=void 0;if(null!==fs){var i=fs.memoizedState;if(a=i.destroy,null!==r&&bs(r,i.deps))return void(o.memoizedState=As(t,n,a,r))}ds.flags|=e,o.memoizedState=As(1|t,n,a,r)}function Fs(e,t){return Is(8390656,8,e,t)}function Vs(e,t){return zs(2048,8,e,t)}function $s(e,t){return zs(4,2,e,t)}function Bs(e,t){return zs(4,4,e,t)}function Us(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ws(e,t,n){return n=null!=n?n.concat([e]):null,zs(4,4,Us.bind(null,t,e),n)}function Hs(){}function Gs(e,t){var n=Ss();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&bs(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=Ss();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&bs(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function qs(e,t,n){return 21&cs?(fo(n,t)||(n=xn(),ds.lanes|=n,Vu|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Sl=!0),e.memoizedState=n)}function Ks(e,t){var n=En;En=0!==n&&4>n?n:4,e(!0);var r=us.transition;us.transition={};try{e(!1),t()}finally{En=n,us.transition=r}}function Xs(){return Ss().memoizedState}function Qs(e,t,n){var r=ac(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Zs(e))el(t,n);else if(null!==(n=zi(e,t,n,r))){ic(n,e,r,oc()),tl(n,t,r)}}function Js(e,t,n){var r=ac(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zs(e))el(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=a(i,n);if(o.hasEagerState=!0,o.eagerState=s,fo(s,i)){var l=t.interleaved;return null===l?(o.next=o,Ii(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(u){}null!==(n=zi(e,t,o,r))&&(ic(n,e,r,o=oc()),tl(n,t,r))}}function Zs(e){var t=e.alternate;return e===ds||null!==t&&t===ds}function el(e,t){ms=hs=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tl(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Sn(e,n)}}var nl={readContext:Ai,useCallback:ys,useContext:ys,useEffect:ys,useImperativeHandle:ys,useInsertionEffect:ys,useLayoutEffect:ys,useMemo:ys,useReducer:ys,useRef:ys,useState:ys,useDebugValue:ys,useDeferredValue:ys,useTransition:ys,useMutableSource:ys,useSyncExternalStore:ys,useId:ys,unstable_isNewReconciler:!1},rl={readContext:Ai,useCallback:function(e,t){return ks().memoizedState=[e,void 0===t?null:t],e},useContext:Ai,useEffect:Fs,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Is(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Is(4194308,4,e,t)},useInsertionEffect:function(e,t){return Is(4,2,e,t)},useMemo:function(e,t){var n=ks();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ks();return t=void 0!==n?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=Qs.bind(null,ds,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ks().memoizedState=e},useState:_s,useDebugValue:Hs,useDeferredValue:function(e){return ks().memoizedState=e},useTransition:function(){var e=_s(!1),t=e[0];return e=Ks.bind(null,e[1]),ks().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ds,o=ks();if(ui){if(void 0===n)throw Error(ue(407));n=n()}else{if(n=t(),null===Du)throw Error(ue(349));30&cs||Ts(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,Fs(Rs.bind(null,r,a,e),[e]),r.flags|=2048,As(9,Ms.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ks(),t=Du.identifierPrefix;if(ui){var n=ni;t=":"+t+"R"+(n=(ti&~(1<<32-dn(ti)-1)).toString(32)+n),0<(n=gs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=vs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ol={readContext:Ai,useCallback:Gs,useContext:Ai,useEffect:Vs,useImperativeHandle:Ws,useInsertionEffect:$s,useLayoutEffect:Bs,useMemo:Ys,useReducer:js,useRef:Os,useState:function(){return js(Es)},useDebugValue:Hs,useDeferredValue:function(e){return qs(Ss(),fs.memoizedState,e)},useTransition:function(){return[js(Es)[0],Ss().memoizedState]},useMutableSource:Ps,useSyncExternalStore:Ns,useId:Xs,unstable_isNewReconciler:!1},al={readContext:Ai,useCallback:Gs,useContext:Ai,useEffect:Vs,useImperativeHandle:Ws,useInsertionEffect:$s,useLayoutEffect:Bs,useMemo:Ys,useReducer:Cs,useRef:Os,useState:function(){return Cs(Es)},useDebugValue:Hs,useDeferredValue:function(e){var t=Ss();return null===fs?t.memoizedState=e:qs(t,fs.memoizedState,e)},useTransition:function(){return[Cs(Es)[0],Ss().memoizedState]},useMutableSource:Ps,useSyncExternalStore:Ns,useId:Xs,unstable_isNewReconciler:!1};function il(e,t){if(e&&e.defaultProps){for(var n in t=$e({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function sl(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:$e({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ll={isMounted:function(e){return!!(e=e._reactInternals)&&Gt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=oc(),o=ac(e),a=Ui(r,o);a.payload=t,null!=n&&(a.callback=n),null!==(t=Wi(e,a,o))&&(ic(t,e,o,r),Hi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=oc(),o=ac(e),a=Ui(r,o);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=Wi(e,a,o))&&(ic(t,e,o,r),Hi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=oc(),r=ac(e),o=Ui(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Wi(e,o,r))&&(ic(t,e,r,n),Hi(t,e,r))}};function ul(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!po(n,r)||!po(o,a))}function cl(e,t,n){var r=!1,o=La,a=t.contextType;return"object"==typeof a&&null!==a?a=Ai(a):(o=Ia(t)?Aa:Da.current,a=(r=null!=(r=t.contextTypes))?Oa(e,o):La),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ll,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function dl(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ll.enqueueReplaceState(t,t.state,null)}function fl(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},$i(e);var a=t.contextType;"object"==typeof a&&null!==a?o.context=Ai(a):(a=Ia(t)?Aa:Da.current,o.context=Oa(e,a)),o.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(sl(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&ll.enqueueReplaceState(o,o.state,null),Yi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function pl(e,t){try{var n="",r=t;do{n+=He(r),r=r.return}while(r);var o=n}catch(a){o="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:o,digest:null}}function hl(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ml(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var gl="function"==typeof WeakMap?WeakMap:Map;function vl(e,t,n){(n=Ui(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qu||(qu=!0,Ku=r),ml(0,t)},n}function yl(e,t,n){(n=Ui(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ml(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){ml(0,t),"function"!=typeof r&&(null===Xu?Xu=new Set([this]):Xu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function bl(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new gl;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Tc.bind(null,e,t,n),t.then(e,e))}function xl(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function wl(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ui(-1,1)).tag=2,Wi(n,t,1))),n.lanes|=1),e)}var kl=Ee.ReactCurrentOwner,Sl=!1;function El(e,t,n,r){t.child=null===e?Ci(t,null,n,r):ji(t,e.child,n,r)}function jl(e,t,n,r,o){n=n.render;var a=t.ref;return _i(t,o),r=xs(e,t,n,r,a,o),n=ws(),null===e||Sl?(ui&&n&&ai(t),t.flags|=1,El(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ql(e,t,o))}function Cl(e,t,n,r,o){if(null===e){var a=n.type;return"function"!=typeof a||Oc(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=zc(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Pl(e,t,a,r,o))}if(a=e.child,0===(e.lanes&o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:po)(i,r)&&e.ref===t.ref)return ql(e,t,o)}return t.flags|=1,(e=Ic(a,r)).ref=t.ref,e.return=t,t.child=e}function Pl(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(po(a,r)&&e.ref===t.ref){if(Sl=!1,t.pendingProps=r=a,0===(e.lanes&o))return t.lanes=e.lanes,ql(e,t,o);131072&e.flags&&(Sl=!0)}}return Ml(e,t,n,r,o)}function Nl(e,t,n){var r=t.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ra(Iu,Ou),Ou|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ra(Iu,Ou),Ou|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ra(Iu,Ou),Ou|=n;else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ra(Iu,Ou),Ou|=r;return El(e,t,o,n),t.child}function Tl(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ml(e,t,n,r,o){var a=Ia(n)?Aa:Da.current;return a=Oa(t,a),_i(t,o),n=xs(e,t,n,r,a,o),r=ws(),null===e||Sl?(ui&&r&&ai(t),t.flags|=1,El(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ql(e,t,o))}function Rl(e,t,n,r,o){if(Ia(n)){var a=!0;$a(t)}else a=!1;if(_i(t,o),null===t.stateNode)Yl(e,t),cl(t,n,r),fl(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=n.contextType;"object"==typeof u&&null!==u?u=Ai(u):u=Oa(t,u=Ia(n)?Aa:Da.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==u)&&dl(t,i,r,u),Vi=!1;var f=t.memoizedState;i.state=f,Yi(t,r,i,o),l=t.memoizedState,s!==r||f!==l||_a.current||Vi?("function"==typeof c&&(sl(t,n,c,r),l=t.memoizedState),(s=Vi||ul(t,n,s,r,f,l,u))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Bi(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:il(t.type,s),i.props=u,d=t.pendingProps,f=i.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ai(l):l=Oa(t,l=Ia(n)?Aa:Da.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==d||f!==l)&&dl(t,i,r,l),Vi=!1,f=t.memoizedState,i.state=f,Yi(t,r,i,o);var h=t.memoizedState;s!==d||f!==h||_a.current||Vi?("function"==typeof p&&(sl(t,n,p,r),h=t.memoizedState),(u=Vi||ul(t,n,u,r,f,h,l)||!1)?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=l,r=u):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ll(e,t,n,r,a,o)}function Ll(e,t,n,r,o,a){Tl(e,t);var i=!!(128&t.flags);if(!r&&!i)return o&&Ba(t,n,!1),ql(e,t,a);r=t.stateNode,kl.current=t;var s=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=ji(t,e.child,null,a),t.child=ji(t,null,s,a)):El(e,t,s,a),t.memoizedState=r.state,o&&Ba(t,n,!0),t.child}function Dl(e){var t=e.stateNode;t.pendingContext?Fa(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Fa(0,t.context,!1),es(e,t.containerInfo)}function _l(e,t,n,r,o){return yi(),bi(o),t.flags|=256,El(e,t,n,r),t.child}var Al,Ol,Il,zl,Fl={dehydrated:null,treeContext:null,retryLane:0};function Vl(e){return{baseLanes:e,cachePool:null,transitions:null}}function $l(e,t,n){var r,o=t.pendingProps,a=os.current,i=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&a)),r?(i=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Ra(os,1&a),null===e)return hi(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=o.children,e=o.fallback,i?(o=t.mode,i=t.child,s={mode:"hidden",children:s},1&o||null===i?i=Vc(s,o,0,null):(i.childLanes=0,i.pendingProps=s),e=Fc(e,o,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Vl(n),t.memoizedState=Fl,e):Bl(t,s));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,i){if(n)return 256&t.flags?(t.flags&=-257,Ul(e,t,i,r=hl(Error(ue(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=Vc({mode:"visible",children:r.children},o,0,null),(a=Fc(a,o,i,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,1&t.mode&&ji(t,e.child,null,i),t.child.memoizedState=Vl(i),t.memoizedState=Fl,a);if(!(1&t.mode))return Ul(e,t,i,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var s=r.dgst;return r=s,Ul(e,t,i,r=hl(a=Error(ue(419)),r,void 0))}if(s=0!==(i&e.childLanes),Sl||s){if(null!==(r=Du)){switch(i&-i){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|i))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Fi(e,o),ic(r,e,o,-1))}return bc(),Ul(e,t,i,r=hl(Error(ue(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Rc.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,li=ha(o.nextSibling),si=t,ui=!0,ci=null,null!==e&&(Ja[Za++]=ti,Ja[Za++]=ni,Ja[Za++]=ei,ti=e.id,ni=e.overflow,ei=t),t=Bl(t,r.children),t.flags|=4096,t)}(e,t,s,o,r,a,n);if(i){i=o.fallback,s=t.mode,r=(a=e.child).sibling;var l={mode:"hidden",children:o.children};return 1&s||t.child===a?(o=Ic(a,l)).subtreeFlags=14680064&a.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null),null!==r?i=Ic(r,i):(i=Fc(i,s,n,null)).flags|=2,i.return=t,o.return=t,o.sibling=i,t.child=o,o=i,i=t.child,s=null===(s=e.child.memoizedState)?Vl(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Fl,o}return e=(i=e.child).sibling,o=Ic(i,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Bl(e,t){return(t=Vc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ul(e,t,n,r){return null!==r&&bi(r),ji(t,e.child,null,n),(e=Bl(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Wl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Di(e.return,t,n)}function Hl(e,t,n,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function Gl(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(El(e,t,r.children,n),2&(r=os.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Wl(e,n,t);else if(19===e.tag)Wl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ra(os,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===as(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Hl(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===as(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Hl(t,!0,n,null,a);break;case"together":Hl(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Yl(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ql(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Vu|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(ue(153));if(null!==t.child){for(n=Ic(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ic(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Kl(e,t){if(!ui)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ql(e,t,n){var r=t.pendingProps;switch(ii(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xl(t),null;case 1:case 17:return Ia(t.type)&&za(),Xl(t),null;case 3:return r=t.stateNode,ts(),Ma(_a),Ma(Da),ss(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(gi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ci&&(cc(ci),ci=null))),Ol(e,t),Xl(t),null;case 5:rs(t);var o=Zi(Ji.current);if(n=t.type,null!==e&&null!=t.stateNode)Il(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(ue(166));return Xl(t),null}if(e=Zi(Xi.current),gi(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[va]=t,r[ya]=a,e=!!(1&t.mode),n){case"dialog":Wo("cancel",r),Wo("close",r);break;case"iframe":case"object":case"embed":Wo("load",r);break;case"video":case"audio":for(o=0;o<Vo.length;o++)Wo(Vo[o],r);break;case"source":Wo("error",r);break;case"img":case"image":case"link":Wo("error",r),Wo("load",r);break;case"details":Wo("toggle",r);break;case"input":et(r,a),Wo("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Wo("invalid",r);break;case"textarea":lt(r,a),Wo("invalid",r)}for(var i in kt(n,a),o=null,a)if(a.hasOwnProperty(i)){var s=a[i];"children"===i?"string"==typeof s?r.textContent!==s&&(!0!==a.suppressHydrationWarning&&ra(r.textContent,s,e),o=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==a.suppressHydrationWarning&&ra(r.textContent,s,e),o=["children",""+s]):de.hasOwnProperty(i)&&null!=s&&"onScroll"===i&&Wo("scroll",r)}switch(n){case"input":Xe(r),rt(r,a,!0);break;case"textarea":Xe(r),ct(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=oa)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{i=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=dt(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),"select"===n&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[va]=t,e[ya]=r,Al(e,t,!1,!1),t.stateNode=e;e:{switch(i=St(n,r),n){case"dialog":Wo("cancel",e),Wo("close",e),o=r;break;case"iframe":case"object":case"embed":Wo("load",e),o=r;break;case"video":case"audio":for(o=0;o<Vo.length;o++)Wo(Vo[o],e);o=r;break;case"source":Wo("error",e),o=r;break;case"img":case"image":case"link":Wo("error",e),Wo("load",e),o=r;break;case"details":Wo("toggle",e),o=r;break;case"input":et(e,r),o=Ze(e,r),Wo("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=$e({},r,{value:void 0}),Wo("invalid",e);break;case"textarea":lt(e,r),o=st(e,r),Wo("invalid",e)}for(a in kt(n,o),s=o)if(s.hasOwnProperty(a)){var l=s[a];"style"===a?xt(e,l):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&mt(e,l):"children"===a?"string"==typeof l?("textarea"!==n||""!==l)&>(e,l):"number"==typeof l&>(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(de.hasOwnProperty(a)?null!=l&&"onScroll"===a&&Wo("scroll",e):null!=l&&Se(e,a,l,i))}switch(n){case"input":Xe(e),rt(e,r,!1);break;case"textarea":Xe(e),ct(e);break;case"option":null!=r.value&&e.setAttribute("value",""+qe(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?it(e,!!r.multiple,a,!1):null!=r.defaultValue&&it(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=oa)}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)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Xl(t),null;case 6:if(e&&null!=t.stateNode)zl(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(ue(166));if(n=Zi(Ji.current),Zi(Xi.current),gi(t)){if(r=t.stateNode,n=t.memoizedProps,r[va]=t,(a=r.nodeValue!==n)&&null!==(e=si))switch(e.tag){case 3:ra(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&ra(r.nodeValue,n,!!(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[va]=t,t.stateNode=r}return Xl(t),null;case 13:if(Ma(os),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ui&&null!==li&&1&t.mode&&!(128&t.flags))vi(),yi(),t.flags|=98560,a=!1;else if(a=gi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(ue(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(ue(317));a[va]=t}else yi(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Xl(t),a=!1}else null!==ci&&(cc(ci),ci=null),a=!0;if(!a)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&os.current?0===zu&&(zu=3):bc())),null!==t.updateQueue&&(t.flags|=4),Xl(t),null);case 4:return ts(),Ol(e,t),null===e&&Yo(t.stateNode.containerInfo),Xl(t),null;case 10:return Li(t.type._context),Xl(t),null;case 19:if(Ma(os),null===(a=t.memoizedState))return Xl(t),null;if(r=!!(128&t.flags),null===(i=a.rendering))if(r)Kl(a,!1);else{if(0!==zu||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(i=as(e))){for(t.flags|=128,Kl(a,!1),null!==(r=i.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(i=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ra(os,1&os.current|2),t.child}e=e.sibling}null!==a.tail&&tn()>Gu&&(t.flags|=128,r=!0,Kl(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=as(i))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Kl(a,!0),null===a.tail&&"hidden"===a.tailMode&&!i.alternate&&!ui)return Xl(t),null}else 2*tn()-a.renderingStartTime>Gu&&1073741824!==n&&(t.flags|=128,r=!0,Kl(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(null!==(n=a.last)?n.sibling=i:t.child=i,a.last=i)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=tn(),t.sibling=null,n=os.current,Ra(os,r?1&n|2:1&n),t):(Xl(t),null);case 22:case 23:return mc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Ou)&&(Xl(t),6&t.subtreeFlags&&(t.flags|=8192)):Xl(t),null;case 24:case 25:return null}throw Error(ue(156,t.tag))}function Jl(e,t){switch(ii(t),t.tag){case 1:return Ia(t.type)&&za(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ts(),Ma(_a),Ma(Da),ss(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return rs(t),null;case 13:if(Ma(os),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(ue(340));yi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ma(os),null;case 4:return ts(),null;case 10:return Li(t.type._context),null;case 22:case 23:return mc(),null;default:return null}}Al=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ol=function(){},Il=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Zi(Xi.current);var a,i=null;switch(n){case"input":o=Ze(e,o),r=Ze(e,r),i=[];break;case"select":o=$e({},o,{value:void 0}),r=$e({},r,{value:void 0}),i=[];break;case"textarea":o=st(e,o),r=st(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=oa)}for(u in kt(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var s=o[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(de.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(s=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(null!=l||null!=s))if("style"===u)if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(i||(i=[]),i.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(i=i||[]).push(u,l)):"children"===u?"string"!=typeof l&&"number"!=typeof l||(i=i||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(de.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&Wo("scroll",e),i||s===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}},zl=function(e,t,n,r){n!==r&&(t.flags|=4)};var Zl=!1,eu=!1,tu="function"==typeof WeakSet?WeakSet:Set,nu=null;function ru(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Nc(e,t,r)}else n.current=null}function ou(e,t,n){try{n()}catch(r){Nc(e,t,r)}}var au=!1;function iu(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&ou(t,n,a)}o=o.next}while(o!==r)}}function su(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect: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 lu(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function uu(e){var t=e.alternate;null!==t&&(e.alternate=null,uu(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[va],delete t[ya],delete t[xa],delete t[wa],delete t[ka])),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 cu(e){return 5===e.tag||3===e.tag||4===e.tag}function du(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||cu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function fu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=oa));else if(4!==r&&null!==(e=e.child))for(fu(e,t,n),e=e.sibling;null!==e;)fu(e,t,n),e=e.sibling}function pu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(pu(e,t,n),e=e.sibling;null!==e;)pu(e,t,n),e=e.sibling}var hu=null,mu=!1;function gu(e,t,n){for(n=n.child;null!==n;)vu(e,t,n),n=n.sibling}function vu(e,t,n){if(cn&&"function"==typeof cn.onCommitFiberUnmount)try{cn.onCommitFiberUnmount(un,n)}catch(s){}switch(n.tag){case 5:eu||ru(n,t);case 6:var r=hu,o=mu;hu=null,gu(e,t,n),mu=o,null!==(hu=r)&&(mu?(e=hu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):hu.removeChild(n.stateNode));break;case 18:null!==hu&&(mu?(e=hu,n=n.stateNode,8===e.nodeType?pa(e.parentNode,n):1===e.nodeType&&pa(e,n),Yn(e)):pa(hu,n.stateNode));break;case 4:r=hu,o=mu,hu=n.stateNode.containerInfo,mu=!0,gu(e,t,n),hu=r,mu=o;break;case 0:case 11:case 14:case 15:if(!eu&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,void 0!==i&&(2&a||4&a)&&ou(n,t,i),o=o.next}while(o!==r)}gu(e,t,n);break;case 1:if(!eu&&(ru(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Nc(n,t,s)}gu(e,t,n);break;case 21:gu(e,t,n);break;case 22:1&n.mode?(eu=(r=eu)||null!==n.memoizedState,gu(e,t,n),eu=r):gu(e,t,n);break;default:gu(e,t,n)}}function yu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new tu),t.forEach(function(t){var r=Lc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function bu(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,i=t,s=i;e:for(;null!==s;){switch(s.tag){case 5:hu=s.stateNode,mu=!1;break e;case 3:case 4:hu=s.stateNode.containerInfo,mu=!0;break e}s=s.return}if(null===hu)throw Error(ue(160));vu(a,i,o),hu=null,mu=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(u){Nc(o,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)xu(t,e),t=t.sibling}function xu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bu(t,e),wu(e),4&r){try{iu(3,e,e.return),su(3,e)}catch(m){Nc(e,e.return,m)}try{iu(5,e,e.return)}catch(m){Nc(e,e.return,m)}}break;case 1:bu(t,e),wu(e),512&r&&null!==n&&ru(n,n.return);break;case 5:if(bu(t,e),wu(e),512&r&&null!==n&&ru(n,n.return),32&e.flags){var o=e.stateNode;try{gt(o,"")}catch(m){Nc(e,e.return,m)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,i=null!==n?n.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===a.type&&null!=a.name&&tt(o,a),St(s,i);var u=St(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];"style"===c?xt(o,d):"dangerouslySetInnerHTML"===c?mt(o,d):"children"===c?gt(o,d):Se(o,c,d,u)}switch(s){case"input":nt(o,a);break;case"textarea":ut(o,a);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?it(o,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?it(o,!!a.multiple,a.defaultValue,!0):it(o,!!a.multiple,a.multiple?[]:"",!1))}o[ya]=a}catch(m){Nc(e,e.return,m)}}break;case 6:if(bu(t,e),wu(e),4&r){if(null===e.stateNode)throw Error(ue(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(m){Nc(e,e.return,m)}}break;case 3:if(bu(t,e),wu(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Yn(t.containerInfo)}catch(m){Nc(e,e.return,m)}break;case 4:default:bu(t,e),wu(e);break;case 13:bu(t,e),wu(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Hu=tn())),4&r&&yu(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(eu=(u=eu)||c,bu(t,e),eu=u):bu(t,e),wu(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!c&&1&e.mode)for(nu=e,c=e.child;null!==c;){for(d=nu=c;null!==nu;){switch(p=(f=nu).child,f.tag){case 0:case 11:case 14:case 15:iu(4,f,f.return);break;case 1:ru(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){Nc(r,n,m)}}break;case 5:ru(f,f.return);break;case 22:if(null!==f.memoizedState){ju(d);continue}}null!==p?(p.return=f,nu=p):ju(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{o=d.stateNode,u?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(s=d.stateNode,i=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=bt("display",i))}catch(m){Nc(e,e.return,m)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Nc(e,e.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:bu(t,e),wu(e),4&r&&yu(e);case 21:}}function wu(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(cu(n)){var r=n;break e}n=n.return}throw Error(ue(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(gt(o,""),r.flags&=-33),pu(e,du(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;fu(e,du(e),a);break;default:throw Error(ue(161))}}catch(i){Nc(e,e.return,i)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ku(e,t,n){nu=e,Su(e)}function Su(e,t,n){for(var r=!!(1&e.mode);null!==nu;){var o=nu,a=o.child;if(22===o.tag&&r){var i=null!==o.memoizedState||Zl;if(!i){var s=o.alternate,l=null!==s&&null!==s.memoizedState||eu;s=Zl;var u=eu;if(Zl=i,(eu=l)&&!u)for(nu=o;null!==nu;)l=(i=nu).child,22===i.tag&&null!==i.memoizedState?Cu(o):null!==l?(l.return=i,nu=l):Cu(o);for(;null!==a;)nu=a,Su(a),a=a.sibling;nu=o,Zl=s,eu=u}Eu(e)}else 8772&o.subtreeFlags&&null!==a?(a.return=o,nu=a):Eu(e)}}function Eu(e){for(;null!==nu;){var t=nu;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:eu||su(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!eu)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:il(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&qi(t,a,r);break;case 3:var i=t.updateQueue;if(null!==i){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}qi(t,i,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;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:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&Yn(d)}}}break;default:throw Error(ue(163))}eu||512&t.flags&&lu(t)}catch(f){Nc(t,t.return,f)}}if(t===e){nu=null;break}if(null!==(n=t.sibling)){n.return=t.return,nu=n;break}nu=t.return}}function ju(e){for(;null!==nu;){var t=nu;if(t===e){nu=null;break}var n=t.sibling;if(null!==n){n.return=t.return,nu=n;break}nu=t.return}}function Cu(e){for(;null!==nu;){var t=nu;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{su(4,t)}catch(l){Nc(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){Nc(t,o,l)}}var a=t.return;try{lu(t)}catch(l){Nc(t,a,l)}break;case 5:var i=t.return;try{lu(t)}catch(l){Nc(t,i,l)}}}catch(l){Nc(t,t.return,l)}if(t===e){nu=null;break}var s=t.sibling;if(null!==s){s.return=t.return,nu=s;break}nu=t.return}}var Pu,Nu=Math.ceil,Tu=Ee.ReactCurrentDispatcher,Mu=Ee.ReactCurrentOwner,Ru=Ee.ReactCurrentBatchConfig,Lu=0,Du=null,_u=null,Au=0,Ou=0,Iu=Ta(0),zu=0,Fu=null,Vu=0,$u=0,Bu=0,Uu=null,Wu=null,Hu=0,Gu=1/0,Yu=null,qu=!1,Ku=null,Xu=null,Qu=!1,Ju=null,Zu=0,ec=0,tc=null,nc=-1,rc=0;function oc(){return 6&Lu?tn():-1!==nc?nc:nc=tn()}function ac(e){return 1&e.mode?2&Lu&&0!==Au?Au&-Au:null!==xi.transition?(0===rc&&(rc=xn()),rc):0!==(e=En)?e:e=void 0===(e=window.event)?16:tr(e.type):1}function ic(e,t,n,r){if(50<ec)throw ec=0,tc=null,Error(ue(185));kn(e,n,r),2&Lu&&e===Du||(e===Du&&(!(2&Lu)&&($u|=n),4===zu&&dc(e,Au)),sc(e,r),1===n&&0===Lu&&!(1&t.mode)&&(Gu=tn()+500,Wa&&Ya()))}function sc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-dn(a),s=1<<i,l=o[i];-1===l?0!==(s&n)&&0===(s&r)||(o[i]=yn(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=vn(e,e===Du?Au:0);if(0===r)null!==n&&Jt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Jt(n),1===t)0===e.tag?function(e){Wa=!0,Ga(e)}(fc.bind(null,e)):Ga(fc.bind(null,e)),da(function(){!(6&Lu)&&Ya()}),n=null;else{switch(jn(r)){case 1:n=rn;break;case 4:n=on;break;case 16:default:n=an;break;case 536870912:n=ln}n=Dc(n,lc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function lc(e,t){if(nc=-1,rc=0,6&Lu)throw Error(ue(327));var n=e.callbackNode;if(Cc()&&e.callbackNode!==n)return null;var r=vn(e,e===Du?Au:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=xc(e,r);else{t=r;var o=Lu;Lu|=2;var a=yc();for(Du===e&&Au===t||(Yu=null,Gu=tn()+500,gc(e,t));;)try{kc();break}catch(s){vc(e,s)}Ri(),Tu.current=a,Lu=o,null!==_u?t=0:(Du=null,Au=0,t=zu)}if(0!==t){if(2===t&&(0!==(o=bn(e))&&(r=o,t=uc(e,o))),1===t)throw n=Fu,gc(e,0),dc(e,r),sc(e,tn()),n;if(6===t)dc(e,r);else{if(o=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!fo(a(),o))return!1}catch(i){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=xc(e,r),2===t&&(a=bn(e),0!==a&&(r=a,t=uc(e,a))),1!==t)))throw n=Fu,gc(e,0),dc(e,r),sc(e,tn()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(ue(345));case 2:case 5:jc(e,Wu,Yu);break;case 3:if(dc(e,r),(130023424&r)===r&&10<(t=Hu+500-tn())){if(0!==vn(e,0))break;if(((o=e.suspendedLanes)&r)!==r){oc(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=la(jc.bind(null,e,Wu,Yu),t);break}jc(e,Wu,Yu);break;case 4:if(dc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-dn(r);a=1<<i,(i=t[i])>o&&(o=i),r&=~a}if(r=o,10<(r=(120>(r=tn()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Nu(r/1960))-r)){e.timeoutHandle=la(jc.bind(null,e,Wu,Yu),r);break}jc(e,Wu,Yu);break;default:throw Error(ue(329))}}}return sc(e,tn()),e.callbackNode===n?lc.bind(null,e):null}function uc(e,t){var n=Uu;return e.current.memoizedState.isDehydrated&&(gc(e,t).flags|=256),2!==(e=xc(e,t))&&(t=Wu,Wu=n,null!==t&&cc(t)),e}function cc(e){null===Wu?Wu=e:Wu.push.apply(Wu,e)}function dc(e,t){for(t&=~Bu,t&=~$u,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dn(t),r=1<<n;e[n]=-1,t&=~r}}function fc(e){if(6&Lu)throw Error(ue(327));Cc();var t=vn(e,0);if(!(1&t))return sc(e,tn()),null;var n=xc(e,t);if(0!==e.tag&&2===n){var r=bn(e);0!==r&&(t=r,n=uc(e,r))}if(1===n)throw n=Fu,gc(e,0),dc(e,t),sc(e,tn()),n;if(6===n)throw Error(ue(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,jc(e,Wu,Yu),sc(e,tn()),null}function pc(e,t){var n=Lu;Lu|=1;try{return e(t)}finally{0===(Lu=n)&&(Gu=tn()+500,Wa&&Ya())}}function hc(e){null!==Ju&&0===Ju.tag&&!(6&Lu)&&Cc();var t=Lu;Lu|=1;var n=Ru.transition,r=En;try{if(Ru.transition=null,En=1,e)return e()}finally{En=r,Ru.transition=n,!(6&(Lu=t))&&Ya()}}function mc(){Ou=Iu.current,Ma(Iu)}function gc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ua(n)),null!==_u)for(n=_u.return;null!==n;){var r=n;switch(ii(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&za();break;case 3:ts(),Ma(_a),Ma(Da),ss();break;case 5:rs(r);break;case 4:ts();break;case 13:case 19:Ma(os);break;case 10:Li(r.type._context);break;case 22:case 23:mc()}n=n.return}if(Du=e,_u=e=Ic(e.current,null),Au=Ou=t,zu=0,Fu=null,Bu=$u=Vu=0,Wu=Uu=null,null!==Oi){for(t=0;t<Oi.length;t++)if(null!==(r=(n=Oi[t]).interleaved)){n.interleaved=null;var o=r.next,a=n.pending;if(null!==a){var i=a.next;a.next=o,r.next=i}n.pending=r}Oi=null}return e}function vc(e,t){for(;;){var n=_u;try{if(Ri(),ls.current=nl,hs){for(var r=ds.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}hs=!1}if(cs=0,ps=fs=ds=null,ms=!1,gs=0,Mu.current=null,null===n||null===n.return){zu=1,Fu=t,_u=null;break}e:{var a=e,i=n.return,s=n,l=t;if(t=Au,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var u=l,c=s,d=c.tag;if(!(1&c.mode||0!==d&&11!==d&&15!==d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=xl(i);if(null!==p){p.flags&=-257,wl(p,i,s,0,t),1&p.mode&&bl(a,u,t),l=u;var h=(t=p).updateQueue;if(null===h){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}if(!(1&t)){bl(a,u,t),bc();break e}l=Error(ue(426))}else if(ui&&1&s.mode){var g=xl(i);if(null!==g){!(65536&g.flags)&&(g.flags|=256),wl(g,i,s,0,t),bi(pl(l,s));break e}}a=l=pl(l,s),4!==zu&&(zu=2),null===Uu?Uu=[a]:Uu.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Gi(a,vl(0,l,t));break e;case 1:s=l;var v=a.type,y=a.stateNode;if(!(128&a.flags||"function"!=typeof v.getDerivedStateFromError&&(null===y||"function"!=typeof y.componentDidCatch||null!==Xu&&Xu.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t,Gi(a,yl(a,s,t));break e}}a=a.return}while(null!==a)}Ec(n)}catch(b){t=b,_u===n&&null!==n&&(_u=n=n.return);continue}break}}function yc(){var e=Tu.current;return Tu.current=nl,null===e?nl:e}function bc(){0!==zu&&3!==zu&&2!==zu||(zu=4),null===Du||!(268435455&Vu)&&!(268435455&$u)||dc(Du,Au)}function xc(e,t){var n=Lu;Lu|=2;var r=yc();for(Du===e&&Au===t||(Yu=null,gc(e,t));;)try{wc();break}catch(o){vc(e,o)}if(Ri(),Lu=n,Tu.current=r,null!==_u)throw Error(ue(261));return Du=null,Au=0,zu}function wc(){for(;null!==_u;)Sc(_u)}function kc(){for(;null!==_u&&!Zt();)Sc(_u)}function Sc(e){var t=Pu(e.alternate,e,Ou);e.memoizedProps=e.pendingProps,null===t?Ec(e):_u=t,Mu.current=null}function Ec(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Jl(n,t)))return n.flags&=32767,void(_u=n);if(null===e)return zu=6,void(_u=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ql(n,t,Ou)))return void(_u=n);if(null!==(t=t.sibling))return void(_u=t);_u=t=e}while(null!==t);0===zu&&(zu=5)}function jc(e,t,n){var r=En,o=Ru.transition;try{Ru.transition=null,En=1,function(e,t,n,r){do{Cc()}while(null!==Ju);if(6&Lu)throw Error(ue(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ue(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(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 o=31-dn(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}(e,a),e===Du&&(_u=Du=null,Au=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Qu||(Qu=!0,Dc(an,function(){return Cc(),null})),a=!!(15990&n.flags),!!(15990&n.subtreeFlags)||a){a=Ru.transition,Ru.transition=null;var i=En;En=1;var s=Lu;Lu|=4,Mu.current=null,function(e,t){if(aa=Kn,yo(e=vo())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(x){n=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==o&&3!==d.nodeType||(s=i+o),d!==a||0!==r&&3!==d.nodeType||(l=i+r),3===d.nodeType&&(i+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=i),f===a&&++c===r&&(l=i),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ia={focusedElem:e,selectionRange:n},Kn=!1,nu=t;null!==nu;)if(e=(t=nu).child,1028&t.subtreeFlags&&null!==e)e.return=t,nu=e;else for(;null!==nu;){t=nu;try{var h=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var m=h.memoizedProps,g=h.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:il(t.type,m),g);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(ue(163))}}catch(x){Nc(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,nu=e;break}nu=t.return}h=au,au=!1}(e,n),xu(n,e),bo(ia),Kn=!!aa,ia=aa=null,e.current=n,ku(n),en(),Lu=s,En=i,Ru.transition=a}else e.current=n;if(Qu&&(Qu=!1,Ju=e,Zu=o),a=e.pendingLanes,0===a&&(Xu=null),function(e){if(cn&&"function"==typeof cn.onCommitFiberRoot)try{cn.onCommitFiberRoot(un,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),sc(e,tn()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(qu)throw qu=!1,e=Ku,Ku=null,e;!!(1&Zu)&&0!==e.tag&&Cc(),a=e.pendingLanes,1&a?e===tc?ec++:(ec=0,tc=e):ec=0,Ya()}(e,t,n,r)}finally{Ru.transition=o,En=r}return null}function Cc(){if(null!==Ju){var e=jn(Zu),t=Ru.transition,n=En;try{if(Ru.transition=null,En=16>e?16:e,null===Ju)var r=!1;else{if(e=Ju,Ju=null,Zu=0,6&Lu)throw Error(ue(331));var o=Lu;for(Lu|=4,nu=e.current;null!==nu;){var a=nu,i=a.child;if(16&nu.flags){var s=a.deletions;if(null!==s){for(var l=0;l<s.length;l++){var u=s[l];for(nu=u;null!==nu;){var c=nu;switch(c.tag){case 0:case 11:case 15:iu(8,c,a)}var d=c.child;if(null!==d)d.return=c,nu=d;else for(;null!==nu;){var f=(c=nu).sibling,p=c.return;if(uu(c),c===u){nu=null;break}if(null!==f){f.return=p,nu=f;break}nu=p}}}var h=a.alternate;if(null!==h){var m=h.child;if(null!==m){h.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}nu=a}}if(2064&a.subtreeFlags&&null!==i)i.return=a,nu=i;else e:for(;null!==nu;){if(2048&(a=nu).flags)switch(a.tag){case 0:case 11:case 15:iu(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,nu=v;break e}nu=a.return}}var y=e.current;for(nu=y;null!==nu;){var b=(i=nu).child;if(2064&i.subtreeFlags&&null!==b)b.return=i,nu=b;else e:for(i=y;null!==nu;){if(2048&(s=nu).flags)try{switch(s.tag){case 0:case 11:case 15:su(9,s)}}catch(w){Nc(s,s.return,w)}if(s===i){nu=null;break e}var x=s.sibling;if(null!==x){x.return=s.return,nu=x;break e}nu=s.return}}if(Lu=o,Ya(),cn&&"function"==typeof cn.onPostCommitFiberRoot)try{cn.onPostCommitFiberRoot(un,e)}catch(w){}r=!0}return r}finally{En=n,Ru.transition=t}}return!1}function Pc(e,t,n){e=Wi(e,t=vl(0,t=pl(n,t),1),1),t=oc(),null!==e&&(kn(e,1,t),sc(e,t))}function Nc(e,t,n){if(3===e.tag)Pc(e,e,n);else for(;null!==t;){if(3===t.tag){Pc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Xu||!Xu.has(r))){t=Wi(t,e=yl(t,e=pl(n,e),1),1),e=oc(),null!==t&&(kn(t,1,e),sc(t,e));break}}t=t.return}}function Tc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=oc(),e.pingedLanes|=e.suspendedLanes&n,Du===e&&(Au&n)===n&&(4===zu||3===zu&&(130023424&Au)===Au&&500>tn()-Hu?gc(e,0):Bu|=n),sc(e,t)}function Mc(e,t){0===t&&(1&e.mode?(t=mn,!(130023424&(mn<<=1))&&(mn=4194304)):t=1);var n=oc();null!==(e=Fi(e,t))&&(kn(e,t,n),sc(e,n))}function Rc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Mc(e,n)}function Lc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ue(314))}null!==r&&r.delete(t),Mc(e,n)}function Dc(e,t){return Qt(e,t)}function _c(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 Ac(e,t,n,r){return new _c(e,t,n,r)}function Oc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ic(e,t){var n=e.alternate;return null===n?((n=Ac(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zc(e,t,n,r,o,a){var i=2;if(r=e,"function"==typeof e)Oc(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case Pe:return Fc(n.children,o,a,t);case Ne:i=8,o|=8;break;case Te:return(e=Ac(12,n,t,2|o)).elementType=Te,e.lanes=a,e;case De:return(e=Ac(13,n,t,o)).elementType=De,e.lanes=a,e;case _e:return(e=Ac(19,n,t,o)).elementType=_e,e.lanes=a,e;case Ie:return Vc(n,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Me:i=10;break e;case Re:i=9;break e;case Le:i=11;break e;case Ae:i=14;break e;case Oe:i=16,r=null;break e}throw Error(ue(130,null==e?e:typeof e,""))}return(t=Ac(i,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function Fc(e,t,n,r){return(e=Ac(7,e,r,t)).lanes=n,e}function Vc(e,t,n,r){return(e=Ac(22,e,r,t)).elementType=Ie,e.lanes=n,e.stateNode={isHidden:!1},e}function $c(e,t,n){return(e=Ac(6,e,null,t)).lanes=n,e}function Bc(e,t,n){return(t=Ac(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uc(e,t,n,r,o){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=wn(0),this.expirationTimes=wn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wn(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Wc(e,t,n,r,o,a,i,s,l){return e=new Uc(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Ac(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$i(a),e}function Hc(e){if(!e)return La;e:{if(Gt(e=e._reactInternals)!==e||1!==e.tag)throw Error(ue(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ia(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(ue(171))}if(1===e.tag){var n=e.type;if(Ia(n))return Va(e,n,t)}return t}function Gc(e,t,n,r,o,a,i,s,l){return(e=Wc(n,r,!0,e,0,a,0,s,l)).context=Hc(null),n=e.current,(a=Ui(r=oc(),o=ac(n))).callback=null!=t?t:null,Wi(n,a,o),e.current.lanes=o,kn(e,o,r),sc(e,r),e}function Yc(e,t,n,r){var o=t.current,a=oc(),i=ac(o);return n=Hc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ui(a,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Wi(o,t,i))&&(ic(e,o,i,a),Hi(e,o,i)),i}function qc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Kc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Xc(e,t){Kc(e,t),(e=e.alternate)&&Kc(e,t)}Pu=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||_a.current)Sl=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return Sl=!1,function(e,t,n){switch(t.tag){case 3:Dl(t),yi();break;case 5:ns(t);break;case 1:Ia(t.type)&&$a(t);break;case 4:es(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ra(Pi,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ra(os,1&os.current),t.flags|=128,null):0!==(n&t.child.childLanes)?$l(e,t,n):(Ra(os,1&os.current),null!==(e=ql(e,t,n))?e.sibling:null);Ra(os,1&os.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Gl(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ra(os,os.current),r)break;return null;case 22:case 23:return t.lanes=0,Nl(e,t,n)}return ql(e,t,n)}(e,t,n);Sl=!!(131072&e.flags)}else Sl=!1,ui&&1048576&t.flags&&oi(t,Qa,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yl(e,t),e=t.pendingProps;var o=Oa(t,Da.current);_i(t,n),o=xs(null,t,r,e,o,n);var a=ws();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ia(r)?(a=!0,$a(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,$i(t),o.updater=ll,t.stateNode=o,o._reactInternals=t,fl(t,r,e,n),t=Ll(null,t,r,!0,a,n)):(t.tag=0,ui&&a&&ai(t),El(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yl(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Oc(e)?1:0;if(null!=e){if((e=e.$$typeof)===Le)return 11;if(e===Ae)return 14}return 2}(r),e=il(r,e),o){case 0:t=Ml(null,t,r,e,n);break e;case 1:t=Rl(null,t,r,e,n);break e;case 11:t=jl(null,t,r,e,n);break e;case 14:t=Cl(null,t,r,il(r.type,e),n);break e}throw Error(ue(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ml(e,t,r,o=t.elementType===r?o:il(r,o),n);case 1:return r=t.type,o=t.pendingProps,Rl(e,t,r,o=t.elementType===r?o:il(r,o),n);case 3:e:{if(Dl(t),null===e)throw Error(ue(387));r=t.pendingProps,o=(a=t.memoizedState).element,Bi(e,t),Yi(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=_l(e,t,r,n,o=pl(Error(ue(423)),t));break e}if(r!==o){t=_l(e,t,r,n,o=pl(Error(ue(424)),t));break e}for(li=ha(t.stateNode.containerInfo.firstChild),si=t,ui=!0,ci=null,n=Ci(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(yi(),r===o){t=ql(e,t,n);break e}El(e,t,r,n)}t=t.child}return t;case 5:return ns(t),null===e&&hi(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,i=o.children,sa(r,o)?i=null:null!==a&&sa(r,a)&&(t.flags|=32),Tl(e,t),El(e,t,i,n),t.child;case 6:return null===e&&hi(t),null;case 13:return $l(e,t,n);case 4:return es(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ji(t,null,r,n):El(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,jl(e,t,r,o=t.elementType===r?o:il(r,o),n);case 7:return El(e,t,t.pendingProps,n),t.child;case 8:case 12:return El(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,Ra(Pi,r._currentValue),r._currentValue=i,null!==a)if(fo(a.value,i)){if(a.children===o.children&&!_a.current){t=ql(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var s=a.dependencies;if(null!==s){i=a.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===a.tag){(l=Ui(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var c=(u=u.shared).pending;null===c?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),Di(a.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===a.tag)i=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(i=a.return))throw Error(ue(341));i.lanes|=n,null!==(s=i.alternate)&&(s.lanes|=n),Di(i,n,t),i=a.sibling}else i=a.child;if(null!==i)i.return=a;else for(i=a;null!==i;){if(i===t){i=null;break}if(null!==(a=i.sibling)){a.return=i.return,i=a;break}i=i.return}a=i}El(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,_i(t,n),r=r(o=Ai(o)),t.flags|=1,El(e,t,r,n),t.child;case 14:return o=il(r=t.type,t.pendingProps),Cl(e,t,r,o=il(r.type,o),n);case 15:return Pl(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:il(r,o),Yl(e,t),t.tag=1,Ia(r)?(e=!0,$a(t)):e=!1,_i(t,n),cl(t,r,o),fl(t,r,o,n),Ll(null,t,r,!0,e,n);case 19:return Gl(e,t,n);case 22:return Nl(e,t,n)}throw Error(ue(156,t.tag))};var Qc="function"==typeof reportError?reportError:function(e){console.error(e)};function Jc(e){this._internalRoot=e}function Zc(e){this._internalRoot=e}function ed(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function td(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function nd(){}function rd(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if("function"==typeof o){var s=o;o=function(){var e=qc(i);s.call(e)}}Yc(t,i,e,o)}else i=function(e,t,n,r,o){if(o){if("function"==typeof r){var a=r;r=function(){var e=qc(i);a.call(e)}}var i=Gc(t,r,e,0,null,!1,0,"",nd);return e._reactRootContainer=i,e[ba]=i.current,Yo(8===e.nodeType?e.parentNode:e),hc(),i}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=qc(l);s.call(e)}}var l=Wc(e,0,!1,null,0,!1,0,"",nd);return e._reactRootContainer=l,e[ba]=l.current,Yo(8===e.nodeType?e.parentNode:e),hc(function(){Yc(t,l,n,r)}),l}(n,t,e,o,r);return qc(i)}Zc.prototype.render=Jc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(ue(409));Yc(e,t,null,null)},Zc.prototype.unmount=Jc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;hc(function(){Yc(null,e,null,null)}),t[ba]=null}},Zc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zn.length&&0!==t&&t<zn[n].priority;n++);zn.splice(n,0,e),0===n&&Bn(e)}},Cn=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=gn(t.pendingLanes);0!==n&&(Sn(t,1|n),sc(t,tn()),!(6&Lu)&&(Gu=tn()+500,Ya()))}break;case 13:hc(function(){var t=Fi(e,1);if(null!==t){var n=oc();ic(t,e,1,n)}}),Xc(e,1)}},Pn=function(e){if(13===e.tag){var t=Fi(e,134217728);if(null!==t)ic(t,e,134217728,oc());Xc(e,134217728)}},Nn=function(e){if(13===e.tag){var t=ac(e),n=Fi(e,t);if(null!==n)ic(n,e,t,oc());Xc(e,t)}},Tn=function(){return En},Mn=function(e,t){var n=En;try{return En=e,t()}finally{En=n}},Ct=function(e,t,n){switch(t){case"input":if(nt(e,n),t=n.name,"radio"===n.type&&null!=t){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 o=Ca(r);if(!o)throw Error(ue(90));Qe(r),nt(r,o)}}}break;case"textarea":ut(e,n);break;case"select":null!=(t=n.value)&&it(e,!!n.multiple,t,!1)}},Lt=pc,Dt=hc;var od={usingClientEntryPoint:!1,Events:[Ea,ja,Ca,Mt,Rt,pc]},ad={findFiberByHostInstance:Sa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},id={bundleType:ad.bundleType,version:ad.version,rendererPackageName:ad.rendererPackageName,rendererConfig:ad.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ee.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Kt(e))?null:e.stateNode},findFiberByHostInstance:ad.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var sd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sd.isDisabled&&sd.supportsFiber)try{un=sd.inject(id),cn=sd}catch(ht){}}re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=od,re.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ed(t))throw Error(ue(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Ce,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},re.createRoot=function(e,t){if(!ed(e))throw Error(ue(299));var n=!1,r="",o=Qc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Wc(e,1,!1,null,0,n,0,r,o),e[ba]=t.current,Yo(8===e.nodeType?e.parentNode:e),new Jc(t)},re.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(ue(188));throw e=Object.keys(e).join(","),Error(ue(268,e))}return e=null===(e=Kt(t))?null:e.stateNode},re.flushSync=function(e){return hc(e)},re.hydrate=function(e,t,n){if(!td(t))throw Error(ue(200));return rd(null,e,t,!0,n)},re.hydrateRoot=function(e,t,n){if(!ed(e))throw Error(ue(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",i=Qc;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(i=n.onRecoverableError)),t=Gc(t,null,e,1,null!=n?n:null,o,0,a,i),e[ba]=t.current,Yo(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Zc(t)},re.render=function(e,t,n){if(!td(t))throw Error(ue(200));return rd(null,e,t,!1,n)},re.unmountComponentAtNode=function(e){if(!td(e))throw Error(ue(40));return!!e._reactRootContainer&&(hc(function(){rd(null,null,e,!1,function(){e._reactRootContainer=null,e[ba]=null})}),!0)},re.unstable_batchedUpdates=pc,re.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!td(n))throw Error(ue(200));if(null==e||void 0===e._reactInternals)throw Error(ue(38));return rd(e,t,n,!1,r)},re.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),ne.exports=re;var ld=ne.exports;const ud=o(ld);var cd=ld;te.createRoot=cd.createRoot,te.hydrateRoot=cd.hydrateRoot;const dd={},fd=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),n=(null==e?void 0:e.nonce)||(null==e?void 0:e.getAttribute("nonce"));r=Promise.allSettled(t.map(e=>{if((e=function(e){return"/"+e}(e))in dd)return;dd[e]=!0;const t=e.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${r}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":"modulepreload",t||(o.as="script"),o.crossOrigin="",o.href=e,n&&o.setAttribute("nonce",n),document.head.appendChild(o),t?new Promise((t,n)=>{o.addEventListener("load",t),o.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function o(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&o(e.reason);return e().catch(o)})};
|
|
32
|
-
/**
|
|
33
|
-
* @remix-run/router v1.23.2
|
|
34
|
-
*
|
|
35
|
-
* Copyright (c) Remix Software Inc.
|
|
36
|
-
*
|
|
37
|
-
* This source code is licensed under the MIT license found in the
|
|
38
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
39
|
-
*
|
|
40
|
-
* @license MIT
|
|
41
|
-
*/
|
|
42
|
-
function pd(){return pd=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},pd.apply(this,arguments)}var hd,md;(md=hd||(hd={})).Pop="POP",md.Push="PUSH",md.Replace="REPLACE";const gd="popstate";function vd(e){return void 0===e&&(e={}),function(e,t,n,r){void 0===r&&(r={});let{window:o=document.defaultView,v5Compat:a=!1}=r,i=o.history,s=hd.Pop,l=null,u=c();null==u&&(u=0,i.replaceState(pd({},i.state,{idx:u}),""));function c(){return(i.state||{idx:null}).idx}function d(){s=hd.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:s,location:m.location,delta:t})}function f(e,t){s=hd.Push;let n=wd(m.location,e,t);u=c()+1;let r=xd(n,u),d=m.createHref(n);try{i.pushState(r,"",d)}catch(f){if(f instanceof DOMException&&"DataCloneError"===f.name)throw f;o.location.assign(d)}a&&l&&l({action:s,location:m.location,delta:1})}function p(e,t){s=hd.Replace;let n=wd(m.location,e,t);u=c();let r=xd(n,u),o=m.createHref(n);i.replaceState(r,"",o),a&&l&&l({action:s,location:m.location,delta:0})}function h(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"==typeof e?e:kd(e);return n=n.replace(/ $/,"%20"),yd(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}let m={get action(){return s},get location(){return e(o,i)},listen(e){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(gd,d),l=e,()=>{o.removeEventListener(gd,d),l=null}},createHref:e=>t(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go:e=>i.go(e)};return m}(function(e,t){let{pathname:n,search:r,hash:o}=e.location;return wd("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:kd(t)},0,e)}function yd(e,t){if(!1===e||null==e)throw new Error(t)}function bd(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function xd(e,t){return{usr:e.state,key:e.key,idx:t}}function wd(e,t,n,r){return void 0===n&&(n=null),pd({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?Sd(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function kd(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 Sd(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}var Ed,jd;function Cd(e,t,n){return void 0===n&&(n="/"),function(e,t,n){let r="string"==typeof t?Sd(t):t,o=Vd(r.pathname||"/",n);if(null==o)return null;let a=Pd(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let i=null;for(let s=0;null==i&&s<a.length;++s){let e=Fd(o);i=Id(a[s],e)}return i}(e,t,n)}function Pd(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(yd(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let s=Yd([r,i.relativePath]),l=n.concat(i);e.children&&e.children.length>0&&(yd(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),Pd(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:Od(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of Nd(e.path))o(e,t,r);else o(e,t)}),t}function Nd(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let i=Nd(r.join("/")),s=[];return s.push(...i.map(e=>""===e?a:[a,e].join("/"))),o&&s.push(...i),s.map(t=>e.startsWith("/")&&""===t?"/":t)}(jd=Ed||(Ed={})).data="data",jd.deferred="deferred",jd.redirect="redirect",jd.error="error";const Td=/^:[\w-]+$/,Md=3,Rd=2,Ld=1,Dd=10,_d=-2,Ad=e=>"*"===e;function Od(e,t){let n=e.split("/"),r=n.length;return n.some(Ad)&&(r+=_d),t&&(r+=Rd),n.filter(e=>!Ad(e)).reduce((e,t)=>e+(Td.test(t)?Md:""===t?Ld:Dd),r)}function Id(e,t,n){let{routesMeta:r}=e,o={},a="/",i=[];for(let s=0;s<r.length;++s){let e=r[s],n=s===r.length-1,l="/"===a?t:t.slice(a.length)||"/",u=zd({path:e.relativePath,caseSensitive:e.caseSensitive,end:n},l),c=e.route;if(!u)return null;Object.assign(o,u.params),i.push({params:o,pathname:Yd([a,u.pathname]),pathnameBase:qd(Yd([a,u.pathnameBase])),route:c}),"/"!==u.pathnameBase&&(a=Yd([a,u.pathnameBase]))}return i}function zd(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);bd("*"===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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:i,pattern:e}}function Fd(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return bd(!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 Vd(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 $d=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Bd(e,t){void 0===t&&(t="/");let n,{pathname:r,search:o="",hash:a=""}="string"==typeof e?Sd(e):e;if(r)if(i=r,$d.test(i))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),bd(!1,"Pathnames cannot have embedded double slashes - normalizing "+e+" -> "+r)}n=r.startsWith("/")?Ud(r.substring(1),"/"):Ud(r,t)}else n=t;var i;return{pathname:n,search:Kd(o),hash:Xd(a)}}function Ud(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function Wd(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 Hd(e,t){let n=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function Gd(e,t,n,r){let o;void 0===r&&(r=!1),"string"==typeof e?o=Sd(e):(o=pd({},e),yd(!o.pathname||!o.pathname.includes("?"),Wd("?","pathname","search",o)),yd(!o.pathname||!o.pathname.includes("#"),Wd("#","pathname","hash",o)),yd(!o.search||!o.search.includes("#"),Wd("#","search","hash",o)));let a,i=""===e||""===o.pathname,s=i?"/":o.pathname;if(null==s)a=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let l=Bd(o,a),u=s&&"/"!==s&&s.endsWith("/"),c=(i||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}const Yd=e=>e.join("/").replace(/\/\/+/g,"/"),qd=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Kd=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Xd=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";const Qd=["post","put","patch","delete"];new Set(Qd);const Jd=["get",...Qd];
|
|
43
|
-
/**
|
|
44
|
-
* React Router v6.30.3
|
|
45
|
-
*
|
|
46
|
-
* Copyright (c) Remix Software Inc.
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the MIT license found in the
|
|
49
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
50
|
-
*
|
|
51
|
-
* @license MIT
|
|
52
|
-
*/
|
|
53
|
-
function Zd(){return Zd=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},Zd.apply(this,arguments)}new Set(Jd);const ef=W.createContext(null),tf=W.createContext(null),nf=W.createContext(null),rf=W.createContext(null),of=W.createContext({outlet:null,matches:[],isDataRoute:!1}),af=W.createContext(null);function sf(){return null!=W.useContext(rf)}function lf(){return sf()||yd(!1),W.useContext(rf).location}function uf(e){W.useContext(nf).static||W.useLayoutEffect(e)}function cf(){let{isDataRoute:e}=W.useContext(of);return e?function(){let{router:e}=function(){let e=W.useContext(ef);return e||yd(!1),e}(vf.UseNavigateStable),t=bf(yf.UseNavigateStable),n=W.useRef(!1);uf(()=>{n.current=!0});let r=W.useCallback(function(r,o){void 0===o&&(o={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,Zd({fromRouteId:t},o)))},[e,t]);return r}():function(){sf()||yd(!1);let e=W.useContext(ef),{basename:t,future:n,navigator:r}=W.useContext(nf),{matches:o}=W.useContext(of),{pathname:a}=lf(),i=JSON.stringify(Hd(o,n.v7_relativeSplatPath)),s=W.useRef(!1);uf(()=>{s.current=!0});let l=W.useCallback(function(n,o){if(void 0===o&&(o={}),!s.current)return;if("number"==typeof n)return void r.go(n);let l=Gd(n,JSON.parse(i),a,"path"===o.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Yd([t,l.pathname])),(o.replace?r.replace:r.push)(l,o.state,o)},[t,r,i,a,e]);return l}()}function df(){let{matches:e}=W.useContext(of),t=e[e.length-1];return t?t.params:{}}function ff(e,t){return function(e,t,n,r){sf()||yd(!1);let{navigator:o}=W.useContext(nf),{matches:a}=W.useContext(of),i=a[a.length-1],s=i?i.params:{};!i||i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u,c=lf();if(t){var d;let e="string"==typeof t?Sd(t):t;"/"===l||(null==(d=e.pathname)?void 0:d.startsWith(l))||yd(!1),u=e}else u=c;let f=u.pathname||"/",p=f;if("/"!==l){let e=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let h=Cd(e,{pathname:p}),m=function(e,t,n,r){var o;void 0===t&&(t=[]);void 0===n&&(n=null);void 0===r&&(r=null);if(null==e){var a;if(!n)return null;if(n.errors)e=n.matches;else{if(!(null!=(a=r)&&a.v7_partialHydration&&0===t.length&&!n.initialized&&n.matches.length>0))return null;e=n.matches}}let i=e,s=null==(o=n)?void 0:o.errors;if(null!=s){let e=i.findIndex(e=>e.route.id&&void 0!==(null==s?void 0:s[e.route.id]));e>=0||yd(!1),i=i.slice(0,Math.min(i.length,e+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<i.length;c++){let e=i[c];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(u=c),e.route.id){let{loaderData:t,errors:r}=n,o=e.route.loader&&void 0===t[e.route.id]&&(!r||void 0===r[e.route.id]);if(e.route.lazy||o){l=!0,i=u>=0?i.slice(0,u+1):[i[0]];break}}}return i.reduceRight((e,r,o)=>{let a,c=!1,d=null,f=null;var p;n&&(a=s&&r.route.id?s[r.route.id]:void 0,d=r.route.errorElement||hf,l&&(u<0&&0===o?(xf[p="route-fallback"]||(xf[p]=!0),c=!0,f=null):u===o&&(c=!0,f=r.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,o+1)),m=()=>{let t;return t=a?d:c?f:r.route.Component?W.createElement(r.route.Component,null):r.route.element?r.route.element:e,W.createElement(gf,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===o)?W.createElement(mf,{location:n.location,revalidation:n.revalidation,component:d,error:a,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):m()},null)}(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:Yd([l,o.encodeLocation?o.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?l:Yd([l,o.encodeLocation?o.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),a,n,r);if(t&&m)return W.createElement(rf.Provider,{value:{location:Zd({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:hd.Pop}},m);return m}(e,t)}function pf(){let e=function(){var e;let t=W.useContext(af),n=function(){let e=W.useContext(tf);return e||yd(!1),e}(),r=bf();if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return W.createElement(W.Fragment,null,W.createElement("h2",null,"Unexpected Application Error!"),W.createElement("h3",{style:{fontStyle:"italic"}},t),n?W.createElement("pre",{style:r},n):null,null)}const hf=W.createElement(pf,null);class mf extends W.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?W.createElement(of.Provider,{value:this.props.routeContext},W.createElement(af.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gf(e){let{routeContext:t,match:n,children:r}=e,o=W.useContext(ef);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),W.createElement(of.Provider,{value:t},r)}var vf=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(vf||{}),yf=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}(yf||{});function bf(e){let t=function(){let e=W.useContext(of);return e||yd(!1),e}(),n=t.matches[t.matches.length-1];return n.route.id||yd(!1),n.route.id}const xf={};function wf(e){let{to:t,replace:n,state:r,relative:o}=e;sf()||yd(!1);let{future:a,static:i}=W.useContext(nf),{matches:s}=W.useContext(of),{pathname:l}=lf(),u=cf(),c=Gd(t,Hd(s,a.v7_relativeSplatPath),l,"path"===o),d=JSON.stringify(c);return W.useEffect(()=>u(JSON.parse(d),{replace:n,state:r,relative:o}),[u,d,o,n,r]),null}function kf(e){yd(!1)}function Sf(e){let{basename:t="/",children:n=null,location:r,navigationType:o=hd.Pop,navigator:a,static:i=!1,future:s}=e;sf()&&yd(!1);let l=t.replace(/^\/*/,"/"),u=W.useMemo(()=>({basename:l,navigator:a,static:i,future:Zd({v7_relativeSplatPath:!1},s)}),[l,s,a,i]);"string"==typeof r&&(r=Sd(r));let{pathname:c="/",search:d="",hash:f="",state:p=null,key:h="default"}=r,m=W.useMemo(()=>{let e=Vd(c,l);return null==e?null:{location:{pathname:e,search:d,hash:f,state:p,key:h},navigationType:o}},[l,c,d,f,p,h,o]);return null==m?null:W.createElement(nf.Provider,{value:u},W.createElement(rf.Provider,{children:n,value:m}))}function Ef(e){let{children:t,location:n}=e;return ff(jf(t),n)}function jf(e,t){void 0===t&&(t=[]);let n=[];return W.Children.forEach(e,(e,r)=>{if(!W.isValidElement(e))return;let o=[...t,r];if(e.type===W.Fragment)return void n.push.apply(n,jf(e.props.children,o));e.type!==kf&&yd(!1),e.props.index&&e.props.children&&yd(!1);let a={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=jf(e.props.children,o)),n.push(a)}),n}
|
|
54
|
-
/**
|
|
55
|
-
* React Router DOM v6.30.3
|
|
56
|
-
*
|
|
57
|
-
* Copyright (c) Remix Software Inc.
|
|
58
|
-
*
|
|
59
|
-
* This source code is licensed under the MIT license found in the
|
|
60
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
61
|
-
*
|
|
62
|
-
* @license MIT
|
|
63
|
-
*/new Promise(()=>{});try{window.__reactRouterVersion="6"}catch(kT){}const Cf=G.startTransition;function Pf(e){let{basename:t,children:n,future:r,window:o}=e,a=W.useRef();null==a.current&&(a.current=vd({window:o,v5Compat:!0}));let i=a.current,[s,l]=W.useState({action:i.action,location:i.location}),{v7_startTransition:u}=r||{},c=W.useCallback(e=>{u&&Cf?Cf(()=>l(e)):l(e)},[l,u]);return W.useLayoutEffect(()=>i.listen(c),[i,c]),W.useEffect(()=>{return null==(e=r)||e.v7_startTransition,void(null==e||e.v7_relativeSplatPath);var e},[r]),W.createElement(Sf,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:i,future:r})}var Nf,Tf,Mf,Rf;(Tf=Nf||(Nf={})).UseScrollRestoration="useScrollRestoration",Tf.UseSubmit="useSubmit",Tf.UseSubmitFetcher="useSubmitFetcher",Tf.UseFetcher="useFetcher",Tf.useViewTransitionState="useViewTransitionState",(Rf=Mf||(Mf={})).UseFetcher="useFetcher",Rf.UseFetchers="useFetchers",Rf.UseScrollRestoration="useScrollRestoration";const Lf=W.createContext({});function Df(e){const t=W.useRef(null);return null===t.current&&(t.current=e()),t.current}const _f="undefined"!=typeof window?W.useLayoutEffect:W.useEffect,Af=W.createContext(null);function Of(e,t){-1===e.indexOf(t)&&e.push(t)}function If(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const zf=(e,t,n)=>n>t?t:n<e?e:n;const Ff={},Vf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function $f(e){return"object"==typeof e&&null!==e}const Bf=e=>/^0[^.\s]+$/u.test(e);function Uf(e){let t;return()=>(void 0===t&&(t=e()),t)}const Wf=e=>e,Hf=(e,t)=>n=>t(e(n)),Gf=(...e)=>e.reduce(Hf),Yf=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class qf{constructor(){this.subscriptions=[]}add(e){return Of(this.subscriptions,e),()=>If(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Kf=e=>1e3*e,Xf=e=>e/1e3;function Qf(e,t){return t?e*(1e3/t):0}const Jf=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Zf(e,t,n,r){if(e===t&&n===r)return Wf;const o=t=>function(e,t,n,r,o){let a,i,s=0;do{i=t+(n-t)/2,a=Jf(i,r,o)-e,a>0?n=i:t=i}while(Math.abs(a)>1e-7&&++s<12);return i}(t,0,1,e,n);return e=>0===e||1===e?e:Jf(o(e),t,r)}const ep=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,tp=e=>t=>1-e(1-t),np=Zf(.33,1.53,.69,.99),rp=tp(np),op=ep(rp),ap=e=>e>=1?1:(e*=2)<1?.5*rp(e):.5*(2-Math.pow(2,-10*(e-1))),ip=e=>1-Math.sin(Math.acos(e)),sp=tp(ip),lp=ep(ip),up=Zf(.42,0,1,1),cp=Zf(0,0,.58,1),dp=Zf(.42,0,.58,1),fp=e=>Array.isArray(e)&&"number"==typeof e[0],pp={linear:Wf,easeIn:up,easeInOut:dp,easeOut:cp,circIn:ip,circInOut:lp,circOut:sp,backIn:rp,backInOut:op,backOut:np,anticipate:ap},hp=e=>{if(fp(e)){e.length;const[t,n,r,o]=e;return Zf(t,n,r,o)}return"string"==typeof e?pp[e]:e},mp=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function gp(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,i=mp.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const a=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(l.schedule(t),e()),t(i)}const l={schedule:(e,o=!1,i=!1)=>{const s=i&&r?t:n;return o&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(i=e,r)return void(o=!0);r=!0;const a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,o&&(o=!1,l.process(e))}};return l}(a),e),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:h}=i,m=()=>{const a=Ff.useManualTiming,i=a?o.timestamp:performance.now();n=!1,a||(o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1)),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),u.process(o),c.process(o),d.process(o),f.process(o),p.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:mp.reduce((t,a)=>{const s=i[a];return t[a]=(t,a=!1,i=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(m)),s.schedule(t,a,i)),t},{}),cancel:e=>{for(let t=0;t<mp.length;t++)i[mp[t]].cancel(e)},state:o,steps:i}}const{schedule:vp,cancel:yp,state:bp,steps:xp}=gp("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Wf,!0);let wp;function kp(){wp=void 0}const Sp={now:()=>(void 0===wp&&Sp.set(bp.isProcessing||Ff.useManualTiming?bp.timestamp:performance.now()),wp),set:e=>{wp=e,queueMicrotask(kp)}},Ep=e=>t=>"string"==typeof t&&t.startsWith(e),jp=Ep("--"),Cp=Ep("var(--"),Pp=e=>!!Cp(e)&&Np.test(e.split("/*")[0].trim()),Np=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Tp(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const Mp={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Rp={...Mp,transform:e=>zf(0,1,e)},Lp={...Mp,default:1},Dp=e=>Math.round(1e5*e)/1e5,_p=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Ap=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Op=(e,t)=>n=>Boolean("string"==typeof n&&Ap.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Ip=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,a,i,s]=r.match(_p);return{[e]:parseFloat(o),[t]:parseFloat(a),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},zp={...Mp,transform:e=>Math.round((e=>zf(0,255,e))(e))},Fp={test:Op("rgb","red"),parse:Ip("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+zp.transform(e)+", "+zp.transform(t)+", "+zp.transform(n)+", "+Dp(Rp.transform(r))+")"};const Vp={test:Op("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Fp.transform},$p=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Bp=$p("deg"),Up=$p("%"),Wp=$p("px"),Hp=$p("vh"),Gp=$p("vw"),Yp=(()=>({...Up,parse:e=>Up.parse(e)/100,transform:e=>Up.transform(100*e)}))(),qp={test:Op("hsl","hue"),parse:Ip("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Up.transform(Dp(t))+", "+Up.transform(Dp(n))+", "+Dp(Rp.transform(r))+")"},Kp={test:e=>Fp.test(e)||Vp.test(e)||qp.test(e),parse:e=>Fp.test(e)?Fp.parse(e):qp.test(e)?qp.parse(e):Vp.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Fp.transform(e):qp.transform(e),getAnimatableNone:e=>{const t=Kp.parse(e);return t.alpha=0,Kp.transform(t)}},Xp=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Qp="number",Jp="color",Zp=/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 eh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let a=0;const i=t.replace(Zp,e=>(Kp.test(e)?(r.color.push(a),o.push(Jp),n.push(Kp.parse(e))):e.startsWith("var(")?(r.var.push(a),o.push("var"),n.push(e)):(r.number.push(a),o.push(Qp),n.push(parseFloat(e))),++a,"${}")).split("${}");return{values:n,split:i,indexes:r,types:o}}function th({split:e,types:t}){const n=e.length;return r=>{let o="";for(let a=0;a<n;a++)if(o+=e[a],void 0!==r[a]){const e=t[a];o+=e===Qp?Dp(r[a]):e===Jp?Kp.transform(r[a]):r[a]}return o}}const nh=(e,t)=>{return"number"==typeof e?(null==t?void 0:t.trim().endsWith("/"))?e:0:"number"==typeof(n=e)?0:Kp.test(n)?Kp.getAnimatableNone(n):n;var n};const rh={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null==(t=e.match(_p))?void 0:t.length)||0)+((null==(n=e.match(Xp))?void 0:n.length)||0)>0},parse:function(e){return eh(e).values},createTransformer:function(e){return th(eh(e))},getAnimatableNone:function(e){const t=eh(e);return th(t)(t.values.map((e,n)=>nh(e,t.split[n])))}};function oh(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ah(e,t){return n=>n>0?t:e}const ih=(e,t,n)=>e+(t-e)*n,sh=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},lh=[Vp,Fp,qp];function uh(e){const t=(n=e,lh.find(e=>e.test(n)));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===qp&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,a=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=oh(s,r,e+1/3),a=oh(s,r,e),i=oh(s,r,e-1/3)}else o=a=i=n;return{red:Math.round(255*o),green:Math.round(255*a),blue:Math.round(255*i),alpha:r}}(r)),r}const ch=(e,t)=>{const n=uh(e),r=uh(t);if(!n||!r)return ah(e,t);const o={...n};return e=>(o.red=sh(n.red,r.red,e),o.green=sh(n.green,r.green,e),o.blue=sh(n.blue,r.blue,e),o.alpha=ih(n.alpha,r.alpha,e),Fp.transform(o))},dh=new Set(["none","hidden"]);function fh(e,t){return n=>ih(e,t,n)}function ph(e){return"number"==typeof e?fh:"string"==typeof e?Pp(e)?ah:Kp.test(e)?ch:gh:Array.isArray(e)?hh:"object"==typeof e?Kp.test(e)?ch:mh:ah}function hh(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>ph(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function mh(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=ph(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const gh=(e,t)=>{const n=rh.createTransformer(t),r=eh(e),o=eh(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?dh.has(e)&&!o.values.length||dh.has(t)&&!r.values.length?function(e,t){return dh.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Gf(hh(function(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],i=e.indexes[a][r[a]],s=e.values[i]??0;n[o]=s,r[a]++}return n}(r,o),o.values),n):ah(e,t)};function vh(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return ih(e,t,n);return ph(e)(e,t)}const yh=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>vp.update(t,e),stop:()=>yp(t),now:()=>bp.isProcessing?bp.timestamp:Sp.now()}},bh=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let a=0;a<o;a++)r+=Math.round(1e4*e(a/(o-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},xh=2e4;function wh(e){let t=0;let n=e.next(t);for(;!n.done&&t<xh;)t+=50,n=e.next(t);return t>=xh?1/0:t}const kh=100,Sh=10,Eh=1,jh=0,Ch=800,Ph=.3,Nh=.3,Th={granular:.01,default:2},Mh={granular:.005,default:.5},Rh=.01,Lh=10,Dh=.05,_h=1;function Ah(e,t){return e*Math.sqrt(1-t*t)}const Oh=.001;const Ih=["duration","bounce"],zh=["stiffness","damping","mass"];function Fh(e,t){return t.some(t=>void 0!==e[t])}function Vh(e){let t={velocity:jh,stiffness:kh,damping:Sh,mass:Eh,isResolvedFromDuration:!1,...e};if(!Fh(e,zh)&&Fh(e,Ih))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,a=2*zf(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Eh,stiffness:o,damping:a}}else{const n=function({duration:e=Ch,bounce:t=Ph,velocity:n=jh,mass:r=Eh}){let o,a,i=1-t;i=zf(Dh,_h,i),e=zf(Rh,Lh,Xf(e)),i<1?(o=t=>{const r=t*i,o=r*e,a=r-n,s=Ah(t,i),l=Math.exp(-o);return Oh-a/s*l},a=t=>{const r=t*i*e,a=r*n+n,s=Math.pow(i,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=Ah(Math.pow(t,2),i);return(-o(t)+Oh>0?-1:1)*((a-s)*l)/u}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let o=1;o<12;o++)r-=e(r)/t(r);return r}(o,a,5/e);if(e=Kf(e),isNaN(s))return{stiffness:kh,damping:Sh,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});t={...t,...n,mass:Eh},t.isResolvedFromDuration=!0}return t}function $h(e=Nh,t=Ph){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const a=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=Vh({...n,velocity:-Xf(n.velocity||0)}),h=f||0,m=u/(2*Math.sqrt(l*c)),g=i-a,v=Xf(Math.sqrt(l/c)),y=Math.abs(g)<5;let b,x,w,k,S,E;if(r||(r=y?Th.granular:Th.default),o||(o=y?Mh.granular:Mh.default),m<1)w=Ah(v,m),k=(h+m*v*g)/w,b=e=>{const t=Math.exp(-m*v*e);return i-t*(k*Math.sin(w*e)+g*Math.cos(w*e))},S=m*v*k+g*w,E=m*v*g-k*w,x=e=>Math.exp(-m*v*e)*(S*Math.sin(w*e)+E*Math.cos(w*e));else if(1===m){b=e=>i-Math.exp(-v*e)*(g+(h+v*g)*e);const e=h+v*g;x=t=>Math.exp(-v*t)*(v*e*t-h)}else{const e=v*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return i-n*((h+m*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};const t=(h+m*v*g)/e,n=m*v*t-g*e,r=m*v*g-t*e;x=t=>{const o=Math.exp(-m*v*t),a=Math.min(e*t,300);return o*(n*Math.sinh(a)+r*Math.cosh(a))}}const j={calculatedDuration:p&&d||null,velocity:e=>Kf(x(e)),next:e=>{if(!p&&m<1){const t=Math.exp(-m*v*e),n=Math.sin(w*e),a=Math.cos(w*e),l=i-t*(k*n+g*a),u=Kf(t*(S*n+E*a));return s.done=Math.abs(u)<=r&&Math.abs(i-l)<=o,s.value=s.done?i:l,s}const t=b(e);if(p)s.done=e>=d;else{const n=Kf(x(e));s.done=Math.abs(n)<=r&&Math.abs(i-t)<=o}return s.value=s.done?i:t,s},toString:()=>{const e=Math.min(wh(j),xh),t=bh(t=>j.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return j}$h.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(wh(r),xh);return{type:"keyframes",ease:e=>r.next(o*e).value/t,duration:Xf(o)}}(e,100,$h);return e.ease=t.ease,e.duration=Kf(t.duration),e.type="keyframes",e};function Bh(e,t,n){const r=Math.max(t-5,0);return Qf(n-e(r),t-r)}function Uh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=d+h,g=void 0===i?m:i(m);g!==m&&(h=g-d);const v=e=>-h*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);f.done=Math.abs(t)<=u,f.value=f.done?g:n};let x,w;const k=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=$h({keyframes:[f.value,p(f.value)],velocity:Bh(y,e,f.value),damping:o,stiffness:a,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),k(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}function Wh(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const a=e.length;if(t.length,1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||Ff.mix||vh,a=e.length-1;for(let i=0;i<a;i++){let n=o(e[i],e[i+1]);if(t){const e=Array.isArray(t)?t[i]||Wf:t;n=Gf(e,n)}r.push(n)}return r}(t,r,o),l=s.length,u=n=>{if(i&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=Yf(e[r],e[r+1],n);return s[r](o)};return n?t=>u(zf(e[0],e[a-1],t)):u}function Hh(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Yf(0,t,r);e.push(ih(n,1,o))}}(t,e.length-1),t}function Gh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(hp):hp(r),a={done:!1,value:t[0]},i=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:Hh(t),e),s=Wh(i,t,{ease:Array.isArray(o)?o:(l=t,u=o,l.map(()=>u||dp).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}const Yh=e=>null!==e;function qh(e,{repeat:t,repeatType:n="loop"},r,o=1){const a=e.filter(Yh),i=o<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return i&&void 0!==r?r:a[i]}const Kh={decay:Uh,inertia:Uh,tween:Gh,keyframes:Gh,spring:$h};function Xh(e){"string"==typeof e.type&&(e.type=Kh[e.type])}class Qh{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Jh=e=>e/100;class Zh extends Qh{constructor(e){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 e,t;const{motionValue:n}=this.options;n&&n.updatedAt!==Sp.now()&&this.tick(Sp.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),null==(t=(e=this.options).onStop)||t.call(e))},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Xh(e);const{type:t=Gh,repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:a=0}=e;let{keyframes:i}=e;const s=t||Gh;s!==Gh&&"number"!=typeof i[0]&&(this.mixKeyframes=Gf(Jh,vh(i[0],i[1])),i=[0,100]);const l=s({...e,keyframes:i});"mirror"===o&&(this.mirroredGenerator=s({...e,keyframes:[...i].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=wh(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:f,type:p,onUpdate:h,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let y,b=this.currentTime,x=n;if(c){const e=Math.min(this.currentTime,r)/i;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,c+1);Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/i)):"mirror"===d&&(x=a)),b=zf(0,1,n)*i}v?(this.delayState.value=u[0],y=this.delayState):y=x.next(b),o&&!v&&(y.value=o(y.value));let{done:w}=y;v||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&p!==Uh&&(y.value=qh(u,this.options,m,this.speed)),h&&h(y.value),k&&this.finish(),y}then(e,t){return this.finished.then(e,t)}get duration(){return Xf(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Xf(e)}get time(){return Xf(this.currentTime)}set time(e){e=Kf(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);return Bh(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Sp.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Xf(this.currentTime))}play(){var e,t;if(this.isStopped)return;const{driver:n=yh,startTime:r}=this.options;this.driver||(this.driver=n(e=>this.tick(e))),null==(t=(e=this.options).onPlay)||t.call(e);const o=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=o):null!==this.holdTime?this.startTime=o-this.holdTime:this.startTime||(this.startTime=r??o),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Sp.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",null==(t=(e=this.options).onComplete)||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),null==(t=(e=this.options).onCancel)||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),null==(t=this.driver)||t.stop(),e.observe(this)}}const em=e=>180*e/Math.PI,tm=e=>{const t=em(Math.atan2(e[1],e[0]));return rm(t)},nm={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:tm,rotateZ:tm,skewX:e=>em(Math.atan(e[1])),skewY:e=>em(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},rm=e=>((e%=360)<0&&(e+=360),e),om=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),am=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),im={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:om,scaleY:am,scale:e=>(om(e)+am(e))/2,rotateX:e=>rm(em(Math.atan2(e[6],e[5]))),rotateY:e=>rm(em(Math.atan2(-e[2],e[0]))),rotateZ:tm,rotate:tm,skewX:e=>em(Math.atan(e[4])),skewY:e=>em(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function sm(e){return e.includes("scale")?1:0}function lm(e,t){if(!e||"none"===e)return sm(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=im,o=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=nm,o=t}if(!o)return sm(t);const a=r[t],i=o[1].split(",").map(um);return"function"==typeof a?a(i):i[a]}function um(e){return parseFloat(e.trim())}const cm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],dm=(()=>new Set(cm))(),fm=e=>e===Mp||e===Wp,pm=new Set(["x","y","z"]),hm=cm.filter(e=>!pm.has(e));const mm={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-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})=>lm(t,"x"),y:(e,{transform:t})=>lm(t,"y")};mm.translateX=mm.x,mm.translateY=mm.y;const gm=new Set;let vm=!1,ym=!1,bm=!1;function xm(){if(ym){const e=Array.from(gm).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return hm.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{var r;null==(r=e.getValue(t))||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}ym=!1,vm=!1,gm.forEach(e=>e.complete(bm)),gm.clear()}function wm(){gm.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ym=!0)})}class km{constructor(e,t,n,r,o,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(gm.add(this),vm||(vm=!0,vp.read(wm),vp.resolveKeyframes(xm))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const o=null==r?void 0:r.get(),a=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,a);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=a),r&&void 0===o&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),gm.delete(this)}cancel(){"scheduled"===this.state&&(gm.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}function Sm(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}const Em={};function jm(e,t){const n=Uf(e);return()=>Em[t]??n()}const Cm=jm(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Pm=jm(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(kT){return!1}return!0},"linearEasing"),Nm=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Tm={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nm([0,.65,.55,1]),circOut:Nm([.55,0,1,.45]),backIn:Nm([.31,.01,.66,-.59]),backOut:Nm([.33,1.53,.69,.99])};function Mm(e,t){return e?"function"==typeof e?Pm()?bh(e,t):"ease-out":fp(e)?Nm(e):Array.isArray(e)?e.map(e=>Mm(e,t)||Tm.easeOut):Tm[e]:void 0}function Rm(e,t,n,{delay:r=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=Mm(s,o);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===i?"alternate":"normal"};u&&(f.pseudoElement=u);return e.animate(c,f)}function Lm(e){return"function"==typeof e&&"applyToOptions"in e}class Dm extends Qh{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:i,onComplete:s}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=a,this.options=e,e.type;const l=function({type:e,...t}){return Lm(e)&&Pm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=Rm(t,n,r,l,o),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const e=qh(r,this.options,i,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Sm(t,n,e),this.animation.cancel()}null==s||s(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;null==(t=(e=this.animation).finish)||t.call(e)}cancel(){try{this.animation.cancel()}catch(kT){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t,n;const r=null==(e=this.options)?void 0:e.element;!this.isPseudoElement&&(null==r?void 0:r.isConnected)&&(null==(n=(t=this.animation).commitStyles)||n.call(t))}get duration(){var e,t;const n=(null==(t=null==(e=this.animation.effect)?void 0:e.getComputedTiming)?void 0:t.call(e).duration)||0;return Xf(Number(n))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Xf(e)}get time(){return Xf(Number(this.animation.currentTime)||0)}set time(e){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Kf(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){var o;return this.allowFlatten&&(null==(o=this.animation.effect)||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Cm()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),Wf):r(this)}}const _m={anticipate:ap,backInOut:op,circInOut:lp};function Am(e){"string"==typeof e.ease&&e.ease in _m&&(e.ease=_m[e.ease])}class Om extends Dm{constructor(e){Am(e),Xh(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:o,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const i=new Zh({...a,autoplay:!1}),s=Math.max(10,Sp.now()-this.startTime),l=zf(0,10,s-10),u=i.sample(s).value,{name:c}=this.options;o&&c&&Sm(o,c,u),t.setWithVelocity(i.sample(Math.max(0,s-l)).value,u,l),i.stop()}}const Im=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!rh.test(e)&&"0"!==e||e.startsWith("url(")));function zm(e){e.duration=0,e.type="keyframes"}const Fm=new Set(["opacity","clipPath","filter","transform"]),Vm=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const $m=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Bm=Uf(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Um(e){var t;const{motionValue:n,name:r,repeatDelay:o,repeatType:a,damping:i,type:s,keyframes:l}=e;if(!((null==(t=null==n?void 0:n.owner)?void 0:t.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=n.owner.getProps();return Bm()&&r&&(Fm.has(r)||$m.has(r)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&Vm.test(e[t]))return!0;return!1}(l))&&("transform"!==r||!c)&&!u&&!o&&"mirror"!==a&&0!==i&&"inertia"!==s}class Wm extends Qh{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:a="loop",keyframes:i,name:s,motionValue:l,element:u,...c}){var d;super(),this.stop=()=>{var e,t;this._animation&&(this._animation.stop(),null==(e=this.stopTimeline)||e.call(this)),null==(t=this.keyframeResolver)||t.cancel()},this.createdAt=Sp.now();const f={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:a,name:s,motionValue:l,element:u,...c},p=(null==u?void 0:u.KeyframeResolver)||km;this.keyframeResolver=new p(i,(e,t,n)=>this.onKeyframesResolved(e,t,f,!n),s,l,u),null==(d=this.keyframeResolver)||d.scheduleResolve()}onKeyframesResolved(e,t,n,r){var o,a;this.keyframeResolver=void 0;const{name:i,type:s,velocity:l,delay:u,isHandoff:c,onUpdate:d}=n;this.resolvedAt=Sp.now();let f=!0;(function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const a=e[e.length-1],i=Im(o,t),s=Im(a,t);return!(!i||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||Lm(n))&&r)})(e,i,s,l)||(f=!1,!Ff.instantAnimations&&u||null==d||d(qh(e,n,t)),e[0]=e[e.length-1],zm(n),n.repeat=0);const p={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},h=f&&!c&&Um(p),m=null==(a=null==(o=p.motionValue)?void 0:o.owner)?void 0:a.current;let g;if(h)try{g=new Om({...p,element:m})}catch{g=new Zh(p)}else g=new Zh(p);g.finished.then(()=>{this.notifyFinished()}).catch(Wf),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||(null==(e=this.keyframeResolver)||e.resume(),bm=!0,wm(),xm(),bm=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),null==(e=this.keyframeResolver)||e.cancel()}}function Hm(e,t,n,r=0,o=1){const a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),i=e.size,s=(i-1)*r;return"function"==typeof n?n(a,i):1===o?a*r:s-a*r}const Gm=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ym(e,t,n=1){const[r,o]=function(e){const t=Gm.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const e=a.trim();return Vf(e)?parseFloat(e):e}return Pp(o)?Ym(o,t,n+1):o}const qm={type:"spring",stiffness:500,damping:25,restSpeed:10},Km={type:"keyframes",duration:.8},Xm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Qm=(e,{keyframes:t})=>t.length>2?Km:dm.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:qm:Xm;function Jm(e,t){if((null==e?void 0:e.inherit)&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Zm(e,t){const n=(null==e?void 0:e[t])??(null==e?void 0:e.default)??e;return n!==e?Jm(n,e):n}const eg=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const tg=(e,t,n,r={},o,a)=>i=>{const s=Zm(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u-=Kf(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:o};(function(e){for(const t in e)if(!eg.has(t))return!0;return!1})(s)||Object.assign(c,Qm(e,c)),c.duration&&(c.duration=Kf(c.duration)),c.repeatDelay&&(c.repeatDelay=Kf(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(zm(c),0===c.delay&&(d=!0)),(Ff.instantAnimations||Ff.skipAnimations||(null==o?void 0:o.shouldSkipAnimations))&&(d=!0,zm(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&void 0!==t.get()){const e=qh(c.keyframes,s);if(void 0!==e)return void vp.update(()=>{c.onUpdate(e),c.onComplete()})}return s.isSync?new Zh(c):new Wm(c)};function ng(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function rg(e,t,n,r){if("function"==typeof t){const[o,a]=ng(r);t=t(void 0!==n?n:e.custom,o,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,a]=ng(r);t=t(void 0!==n?n:e.custom,o,a)}return t}function og(e,t,n){const r=e.getProps();return rg(r,t,void 0!==n?n:r.custom,e)}const ag=new Set(["width","height","top","left","right","bottom",...cm]);class ig{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{var t;const n=Sp.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(null==(t=this.events.change)||t.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Sp.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new qf);const n=this.events[e].add(t);return"change"===e?()=>{n(),vp.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;null==(e=this.events.change)||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Sp.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Qf(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),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 e,t;null==(e=this.dependents)||e.clear(),null==(t=this.events.destroy)||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function sg(e,t){return new ig(e,t)}const lg=e=>Array.isArray(e);function ug(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,sg(n))}function cg(e){return lg(e)?e[e.length-1]||0:e}const dg=e=>Boolean(e&&e.getVelocity);function fg(e,t){const n=e.getValue("willChange");if(r=n,Boolean(dg(r)&&r.add))return n.add(t);if(!n&&Ff.WillChange){const n=new Ff.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function pg(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const hg="data-"+pg("framerAppearId");function mg(e){return e.props[hg]}function gg({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function vg(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:a,transitionEnd:i,...s}=t;const l=e.getDefaultTransition();a=a?Jm(a,l):l;const u=null==a?void 0:a.reduceMotion;r&&(a=r);const c=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const f in s){const t=e.getValue(f,e.latestValues[f]??null),r=s[f];if(void 0===r||d&&gg(d,f))continue;const o={delay:n,...Zm(a||{},f)},i=t.get();if(void 0!==i&&!t.isAnimating()&&!Array.isArray(r)&&r===i&&!o.velocity){vp.update(()=>t.set(r));continue}let l=!1;if(window.MotionHandoffAnimation){const t=mg(e);if(t){const e=window.MotionHandoffAnimation(t,f,vp);null!==e&&(o.startTime=e,l=!0)}}fg(e,f);const p=u??e.shouldReduceMotion;t.start(tg(f,t,r,p&&ag.has(f)?{type:!1}:o,e,l));const h=t.animation;h&&c.push(h)}if(i){const t=()=>vp.update(()=>{i&&function(e,t){const n=og(e,t);let{transitionEnd:r={},transition:o={},...a}=n||{};a={...a,...r};for(const i in a)ug(e,i,cg(a[i]))}(e,i)});c.length?Promise.all(c).then(t):t()}return c}function yg(e,t,n={}){var r;const o=og(e,t,"exit"===n.type?null==(r=e.presenceContext)?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(a=n.transitionOverride);const i=o?()=>Promise.all(vg(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:s}=a;return function(e,t,n=0,r=0,o=0,a=1,i){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(yg(l,t,{...i,delay:n+("function"==typeof r?0:r)+Hm(e.variantChildren,l,r,o,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,o,i,s,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[e,t]="beforeChildren"===l?[i,s]:[s,i];return e().then(()=>t())}return Promise.all([i(),s(n.delay)])}const bg=e=>t=>t.test(e),xg=[Mp,Wp,Up,Bp,Gp,Hp,{test:e=>"auto"===e,parse:e=>e}],wg=e=>xg.find(bg(e));function kg(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||Bf(e))}const Sg=new Set(["brightness","contrast","saturate","opacity"]);function Eg(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(_p)||[];if(!r)return e;const o=n.replace(r,"");let a=Sg.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+o+")"}const jg=/\b([a-z-]*)\(.*?\)/gu,Cg={...rh,getAnimatableNone:e=>{const t=e.match(jg);return t?t.map(Eg).join(" "):e}},Pg={...rh,getAnimatableNone:e=>{const t=rh.parse(e);return rh.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},Ng={...Mp,transform:Math.round},Tg={borderWidth:Wp,borderTopWidth:Wp,borderRightWidth:Wp,borderBottomWidth:Wp,borderLeftWidth:Wp,borderRadius:Wp,borderTopLeftRadius:Wp,borderTopRightRadius:Wp,borderBottomRightRadius:Wp,borderBottomLeftRadius:Wp,width:Wp,maxWidth:Wp,height:Wp,maxHeight:Wp,top:Wp,right:Wp,bottom:Wp,left:Wp,inset:Wp,insetBlock:Wp,insetBlockStart:Wp,insetBlockEnd:Wp,insetInline:Wp,insetInlineStart:Wp,insetInlineEnd:Wp,padding:Wp,paddingTop:Wp,paddingRight:Wp,paddingBottom:Wp,paddingLeft:Wp,paddingBlock:Wp,paddingBlockStart:Wp,paddingBlockEnd:Wp,paddingInline:Wp,paddingInlineStart:Wp,paddingInlineEnd:Wp,margin:Wp,marginTop:Wp,marginRight:Wp,marginBottom:Wp,marginLeft:Wp,marginBlock:Wp,marginBlockStart:Wp,marginBlockEnd:Wp,marginInline:Wp,marginInlineStart:Wp,marginInlineEnd:Wp,fontSize:Wp,backgroundPositionX:Wp,backgroundPositionY:Wp,...{rotate:Bp,rotateX:Bp,rotateY:Bp,rotateZ:Bp,scale:Lp,scaleX:Lp,scaleY:Lp,scaleZ:Lp,skew:Bp,skewX:Bp,skewY:Bp,distance:Wp,translateX:Wp,translateY:Wp,translateZ:Wp,x:Wp,y:Wp,z:Wp,perspective:Wp,transformPerspective:Wp,opacity:Rp,originX:Yp,originY:Yp,originZ:Wp},zIndex:Ng,fillOpacity:Rp,strokeOpacity:Rp,numOctaves:Ng},Mg={...Tg,color:Kp,backgroundColor:Kp,outlineColor:Kp,fill:Kp,stroke:Kp,borderColor:Kp,borderTopColor:Kp,borderRightColor:Kp,borderBottomColor:Kp,borderLeftColor:Kp,filter:Cg,WebkitFilter:Cg,mask:Pg,WebkitMask:Pg},Rg=e=>Mg[e],Lg=new Set([Cg,Pg]);function Dg(e,t){let n=Rg(e);return Lg.has(n)||(n=rh),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const _g=new Set(["auto","none","0"]);class Ag extends km{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),Pp(n))){const r=Ym(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!ag.has(n)||2!==e.length)return;const[r,o]=e,a=wg(r),i=wg(o);if(Tp(r)!==Tp(o)&&mm[n])this.needsMeasurement=!0;else if(a!==i)if(fm(a)&&fm(i))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else mm[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||kg(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!_g.has(t)&&eh(t).values.length&&(r=e[o]),o++}if(r&&n)for(const a of t)e[a]=Dg(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=mm[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const a=r.length-1,i=r[a];r[a]=mm[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),(null==(e=this.removedTransforms)?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}function Og(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=(null==n?void 0:n[e])??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}const Ig=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function zg(e){return $f(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Fg}=gp(queueMicrotask,!1),Vg={x:!1,y:!1};function $g(){return Vg.x||Vg.y}function Bg(e,t){const n=Og(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ug(e,t,n={}){const[r,o,a]=Bg(e,n);return r.forEach(e=>{let n,r=!1,a=!1;const i=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),a&&(a=!1,i(e))},l=e=>{"touch"!==e.pointerType&&(r?a=!0:i(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||$g())return;a=!1;const i=t(e,r);"function"==typeof i&&(n=i,e.addEventListener("pointerleave",l,o))},o),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",s,o)},o)}),a}const Wg=(e,t)=>!!t&&(e===t||Wg(e,t.parentElement)),Hg=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Gg=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Yg=new Set(["INPUT","SELECT","TEXTAREA"]);const qg=new WeakSet;function Kg(e){return t=>{"Enter"===t.key&&e(t)}}function Xg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Qg(e){return Hg(e)&&!$g()}const Jg=new WeakSet;function Zg(e,t,n={}){const[r,o,a]=Bg(e,n),i=e=>{const r=e.currentTarget;if(!Qg(e))return;if(Jg.has(e))return;qg.add(r),n.stopPropagation&&Jg.add(e);const a=t(r,e),i=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),qg.has(r)&&qg.delete(r),Qg(e)&&"function"==typeof a&&a(e,{success:t})},s=e=>{i(e,r===window||r===document||n.useGlobalTarget||Wg(r,e.target))},l=e=>{i(e,!1)};window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",l,o)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",i,o),zg(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Kg(()=>{if(qg.has(n))return;Xg(n,"down");const e=Kg(()=>{Xg(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Xg(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,o)),t=e,Gg.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}function ev(e){return $f(e)&&"ownerSVGElement"in e}const tv=new WeakMap;let nv;const rv=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:ev(r)&&"getBBox"in r?r.getBBox()[t]:r[n],ov=rv("inline","width","offsetWidth"),av=rv("block","height","offsetHeight");function iv({target:e,borderBoxSize:t}){var n;null==(n=tv.get(e))||n.forEach(n=>{n(e,{get width(){return ov(e,t)},get height(){return av(e,t)}})})}function sv(e){e.forEach(iv)}function lv(e,t){nv||"undefined"!=typeof ResizeObserver&&(nv=new ResizeObserver(sv));const n=Og(e);return n.forEach(e=>{let n=tv.get(e);n||(n=new Set,tv.set(e,n)),n.add(t),null==nv||nv.observe(e)}),()=>{n.forEach(e=>{const n=tv.get(e);null==n||n.delete(t),(null==n?void 0:n.size)||null==nv||nv.unobserve(e)})}}const uv=new Set;let cv;function dv(e){return uv.add(e),cv||(cv=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};uv.forEach(t=>t(e))},window.addEventListener("resize",cv)),()=>{uv.delete(e),uv.size||"function"!=typeof cv||(window.removeEventListener("resize",cv),cv=void 0)}}function fv(e,t){return"function"==typeof e?dv(e):lv(e,t)}const pv=[...xg,Kp,rh],hv=()=>({x:{min:0,max:0},y:{min:0,max:0}}),mv=new WeakMap;function gv(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function vv(e){return"string"==typeof e||Array.isArray(e)}const yv=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],bv=["initial",...yv];function xv(e){return gv(e.animate)||bv.some(t=>vv(e[t]))}function wv(e){return Boolean(xv(e)||e.variants)}const kv={current:null},Sv={current:!1},Ev="undefined"!=typeof window;function jv(){if(Sv.current=!0,Ev)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>kv.current=e.matches;e.addEventListener("change",t),t()}else kv.current=!1}const Cv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Pv={};function Nv(e){Pv=e}class Tv{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:a,visualState:i},s={}){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=km,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 e=Sp.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,vp.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=s,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=xv(t),this.isVariantNode=wv(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const f in d){const e=d[f];void 0!==l[f]&&dg(e)&&e.set(l[f])}}mount(e){var t,n;if(this.hasBeenMounted)for(const r in this.initialValues)null==(t=this.values.get(r))||t.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=e,mv.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Sv.current||jv(),this.shouldReduceMotion=kv.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,null==(n=this.parent)||n.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),yp(this.notifyUpdate),yp(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),null==(e=this.parent)||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Fm.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:o,ease:a,duration:i}=t.accelerate,s=new Dm({element:this.current,name:e,keyframes:r,times:o,ease:a,duration:Kf(i)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=dm.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&vp.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o&&o(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Pv){const t=Pv[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<Cv.length;n++){const t=Cv[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],a=n[r];if(dg(o))e.addValue(r,o);else if(dg(a))e.addValue(r,sg(o,{owner:e}));else if(a!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,sg(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=sg(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(Vf(n)||Bf(n))?n=parseFloat(n):(r=n,!pv.find(bg(r))&&rh.test(t)&&(n=Dg(e,t))),this.setBaseTarget(e,dg(n)?n.get():n)),dg(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=rg(this.props,n,null==(t=this.presenceContext)?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||dg(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new qf),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Fg.render(this.render)}}class Mv extends Tv{constructor(){super(...arguments),this.KeyframeResolver=Ag}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;dg(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class Rv{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Lv({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Dv(e){return void 0===e||1===e}function _v({scale:e,scaleX:t,scaleY:n}){return!Dv(e)||!Dv(t)||!Dv(n)}function Av(e){return _v(e)||Ov(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ov(e){return Iv(e.x)||Iv(e.y)}function Iv(e){return e&&"0%"!==e}function zv(e,t,n){return n+t*(e-n)}function Fv(e,t,n,r,o){return void 0!==o&&(e=zv(e,o,r)),zv(e,n,r)+t}function Vv(e,t=0,n=1,r,o){e.min=Fv(e.min,t,n,r,o),e.max=Fv(e.max,t,n,r,o)}function $v(e,{x:t,y:n}){Vv(e.x,t.translate,t.scale,t.originPoint),Vv(e.y,n.translate,n.scale,n.originPoint)}const Bv=.999999999999,Uv=1.0000000000001;function Wv(e,t){e.min+=t,e.max+=t}function Hv(e,t,n,r,o=.5){Vv(e,t,n,ih(e.min,e.max,o),r)}function Gv(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function Yv(e,t,n){const r=n??e;Hv(e.x,Gv(t.x,r.x),t.scaleX,t.scale,t.originX),Hv(e.y,Gv(t.y,r.y),t.scaleY,t.scale,t.originY)}function qv(e,t){return Lv(function(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}}(e.getBoundingClientRect(),t))}const Kv={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Xv=cm.length;function Qv(e,t,n){const{style:r,vars:o,transformOrigin:a}=e;let i=!1,s=!1;for(const l in t){const e=t[l];if(dm.has(l))i=!0;else if(jp(l))o[l]=e;else{const t=Ig(e,Tg[l]);l.startsWith("origin")?(s=!0,a[l]=t):r[l]=t}}if(t.transform||(i||n?r.transform=function(e,t,n){let r="",o=!0;for(let a=0;a<Xv;a++){const i=cm[a],s=e[i];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(i.startsWith("scale")?1:0);else{const e=parseFloat(s);l=i.startsWith("scale")?1===e:0===e}if(!l||n){const e=Ig(s,Tg[i]);l||(o=!1,r+=`${Kv[i]||i}(${e}) `),n&&(t[i]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Jv(e,{style:t,vars:n},r,o){const a=e.style;let i;for(i in t)a[i]=t[i];for(i in null==o||o.applyProjectionStyles(a,r),n)a.setProperty(i,n[i])}function Zv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ey={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Wp.test(e))return e;e=parseFloat(e)}return`${Zv(e,t.target.x)}% ${Zv(e,t.target.y)}%`}},ty={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=rh.parse(e);if(o.length>5)return r;const a=rh.createTransformer(e),i="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;const u=ih(s,l,.5);return"number"==typeof o[2+i]&&(o[2+i]/=u),"number"==typeof o[3+i]&&(o[3+i]/=u),a(o)}},ny={borderRadius:{...ey,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ey,borderTopRightRadius:ey,borderBottomLeftRadius:ey,borderBottomRightRadius:ey,boxShadow:ty};function ry(e,{layout:t,layoutId:n}){return dm.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!ny[e]||"opacity"===e)}function oy(e,t,n){var r;const o=e.style,a=null==t?void 0:t.style,i={};if(!o)return i;for(const s in o)(dg(o[s])||a&&dg(a[s])||ry(s,e)||void 0!==(null==(r=null==n?void 0:n.getValue(s))?void 0:r.liveStyle))&&(i[s]=o[s]);return i}class ay extends Mv{constructor(){super(...arguments),this.type="html",this.renderInstance=Jv}readValueFromInstance(e,t){var n,r;if(dm.has(t))return(null==(n=this.projection)?void 0:n.isProjecting)?sm(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return lm(n,t)})(e,t);{const n=(r=e,window.getComputedStyle(r)),o=(jp(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof o?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:t}){return qv(e,t)}build(e,t,n){Qv(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return oy(e,t,n)}}const iy={offset:"stroke-dashoffset",array:"stroke-dasharray"},sy={offset:"strokeDashoffset",array:"strokeDasharray"};const ly=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function uy(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(Qv(e,s,u),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(null==c?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const p of ly)void 0!==d[p]&&(f[p]=d[p],delete d[p]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==o&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const a=o?iy:sy;e[a.offset]=""+-r,e[a.array]=`${t} ${n}`}(d,o,a,i,!1)}const cy=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"]),dy=e=>"string"==typeof e&&"svg"===e.toLowerCase();function fy(e,t,n){const r=oy(e,t,n);for(const o in e)if(dg(e[o])||dg(t[o])){r[-1!==cm.indexOf(o)?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o]=e[o]}return r}class py extends Mv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=hv}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(dm.has(t)){const e=Rg(t);return e&&e.default||0}return t=cy.has(t)?t:pg(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return fy(e,t,n)}build(e,t,n){uy(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Jv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(cy.has(o)?o:pg(o),t.attrs[o])}(e,t,0,r)}mount(e){this.isSVGTag=dy(e.tagName),super.mount(e)}}const hy=bv.length;function my(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&my(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<hy;n++){const r=bv[n],o=e.props[r];(vv(o)||!1===o)&&(t[r]=o)}return t}function gy(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 vy=[...yv].reverse(),yy=yv.length;function by(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map(t=>yg(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=yg(e,t,n);else{const o="function"==typeof t?og(e,t,n.custom):t;r=Promise.all(vg(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function xy(e){let t=by(e),n=Sy(),r=!0,o=!1;const a=t=>(n,r)=>{var o;const a=og(e,r,"exit"===t?null==(o=e.presenceContext)?void 0:o.custom:void 0);if(a){const{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,l=my(e.parent)||{},u=[],c=new Set;let d={},f=1/0;for(let t=0;t<yy;t++){const p=vy[t],h=n[p],m=void 0!==s[p]?s[p]:l[p],g=vv(m),v=p===i?h.isActive:null;!1===v&&(f=t);let y=m===l[p]&&m!==s[p]&&g;if(y&&(r||o)&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys={...d},!h.isActive&&null===v||!m&&!h.prevProp||gv(m)||"boolean"==typeof m)continue;if("exit"===p&&h.isActive&&!0!==v){h.prevResolvedValues&&(d={...d,...h.prevResolvedValues});continue}const b=wy(h.prevProp,m);let x=b||p===i&&h.isActive&&!y&&g||t>f&&g,w=!1;const k=Array.isArray(m)?m:[m];let S=k.reduce(a(p),{});!1===v&&(S={});const{prevResolvedValues:E={}}=h,j={...E,...S},C=t=>{x=!0,c.has(t)&&(w=!0,c.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in j){const t=S[e],n=E[e];if(d.hasOwnProperty(e))continue;let r=!1;r=lg(t)&&lg(n)?!gy(t,n):t!==n,r?null!=t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):h.protectedKeys[e]=!0}h.prevProp=m,h.prevResolvedValues=S,h.isActive&&(d={...d,...S}),(r||o)&&e.blockInitialAnimation&&(x=!1);const P=y&&b;x&&(!P||w)&&u.push(...k.map(t=>{const n={type:p};if("string"==typeof t&&(r||o)&&!P&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,o=og(r,t);if(r.enteringChildren&&o){const{delayChildren:t}=o.transition||{};n.delay=Hm(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){const t={};if("boolean"!=typeof s.initial){const n=og(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=r??null}),u.push({animation:t})}let p=Boolean(u.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,o=!1,p?t(u):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null==(o=e.variantChildren)||o.forEach(e=>{var n;return null==(n=e.animationState)?void 0:n.setActive(t,r)}),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Sy(),o=!0}}}function wy(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!gy(t,e)}function ky(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Sy(){return{animate:ky(!0),whileInView:ky(),whileHover:ky(),whileTap:ky(),whileDrag:ky(),whileFocus:ky(),exit:ky()}}function Ey(e,t){e.min=t.min,e.max=t.max}function jy(e,t){Ey(e.x,t.x),Ey(e.y,t.y)}function Cy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Py(e){return e.max-e.min}function Ny(e,t,n,r=.5){e.origin=r,e.originPoint=ih(t.min,t.max,e.origin),e.scale=Py(n)/Py(t),e.translate=ih(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Ty(e,t,n,r){Ny(e.x,t.x,n.x,r?r.originX:void 0),Ny(e.y,t.y,n.y,r?r.originY:void 0)}function My(e,t,n,r=0){const o=r?ih(n.min,n.max,r):n.min;e.min=o+t.min,e.max=e.min+Py(t)}function Ry(e,t,n,r=0){const o=r?ih(n.min,n.max,r):n.min;e.min=t.min-o,e.max=e.min+Py(t)}function Ly(e,t,n,r){Ry(e.x,t.x,n.x,null==r?void 0:r.x),Ry(e.y,t.y,n.y,null==r?void 0:r.y)}function Dy(e,t,n,r,o){return e=zv(e-=t,1/n,r),void 0!==o&&(e=zv(e,1/o,r)),e}function _y(e,t,[n,r,o],a,i){!function(e,t=0,n=1,r=.5,o,a=e,i=e){Up.test(t)&&(t=parseFloat(t),t=ih(i.min,i.max,t/100)-i.min);if("number"!=typeof t)return;let s=ih(a.min,a.max,r);e===a&&(s-=t),e.min=Dy(e.min,t,n,s,o),e.max=Dy(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,a,i)}const Ay=["x","scaleX","originX"],Oy=["y","scaleY","originY"];function Iy(e,t,n,r){_y(e.x,t,Ay,n?n.x:void 0,r?r.x:void 0),_y(e.y,t,Oy,n?n.y:void 0,r?r.y:void 0)}function zy(e){return 0===e.translate&&1===e.scale}function Fy(e){return zy(e.x)&&zy(e.y)}function Vy(e,t){return e.min===t.min&&e.max===t.max}function $y(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function By(e,t){return $y(e.x,t.x)&&$y(e.y,t.y)}function Uy(e){return Py(e.x)/Py(e.y)}function Wy(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Hy(e){return[e("x"),e("y")]}const Gy=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Yy=Gy.length,qy=e=>"string"==typeof e?parseFloat(e):e,Ky=e=>"number"==typeof e||Wp.test(e);function Xy(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Qy=Zy(0,.5,sp),Jy=Zy(.5,.95,Wf);function Zy(e,t,n){return r=>r<e?0:r>t?1:n(Yf(e,t,r))}function eb(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const tb=(e,t)=>e.depth-t.depth;class nb{constructor(){this.children=[],this.isDirty=!1}add(e){Of(this.children,e),this.isDirty=!0}remove(e){If(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(tb),this.isDirty=!1,this.children.forEach(e)}}function rb(e){return dg(e)?e.get():e}class ob{constructor(){this.members=[]}add(e){Of(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1!==r.isConnected||n.snapshot||(If(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(If(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){var t;for(let n=this.members.indexOf(e)-1;n>=0;n--){const e=this.members[n];if(!1!==e.isPresent&&!1!==(null==(t=e.instance)?void 0:t.isConnected))return this.promote(e),!0}return!1}promote(e,t){var n;const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();const{layoutDependency:o}=r.options,{layoutDependency:a}=e.options;void 0!==o&&o===a||(e.resumeFrom=r,t&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(null==(n=e.root)?void 0:n.isUpdating)&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var t,n,r,o,a;null==(n=(t=e.options).onExitComplete)||n.call(t),null==(a=null==(r=e.resumingFrom)?void 0:(o=r.options).onExitComplete)||a.call(o)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(null==(e=this.lead)?void 0:e.snapshot)&&(this.lead.snapshot=void 0)}}const ab={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ib=["","X","Y","Z"];let sb=0;function lb(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ub(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=mg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",vp,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ub(r)}function cb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=sb++,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(pb),this.nodes.forEach(kb),this.nodes.forEach(Sb),this.nodes.forEach(hb)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new nb)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new qf),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=ev(t)&&!(ev(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:o,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(o||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const o=()=>this.root.updateBlockedByResize=!1;vp.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Sp.now(),r=({timestamp:o})=>{const a=o-n;a>=t&&(yp(r),e(a-t))};return vp.setup(r,!0),()=>yp(r)}(o,250),ab.hasAnimatedSinceResize&&(ab.hasAnimatedSinceResize=!1,this.nodes.forEach(wb)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&a&&(r||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||Tb,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!By(this.targetLayout,r),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...Zm(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||wb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),yp(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(Eb),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ub(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;o<this.path.length;o++){const e=this.path[o];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const e=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(vb),void this.nodes.forEach(gb)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(yb);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(bb),this.nodes.forEach(xb),this.nodes.forEach(db),this.nodes.forEach(fb)):this.nodes.forEach(yb),this.clearAllSnapshots();const e=Sp.now();bp.delta=zf(0,1e3/60,e-bp.timestamp),bp.timestamp=e,bp.isProcessing=!0,xp.update.process(bp),xp.preRender.process(bp),xp.render.process(bp),bp.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Fg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(mb),this.sharedNodes.forEach(jb)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,vp.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){vp.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Py(this.snapshot.measuredBox.x)||Py(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Fy(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Av(this.latestValues)||a)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Lb((r=n).x),Lb(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!((null==(e=this.scroll)?void 0:e.wasRoot)||this.path.some(_b))){const{scroll:e}=this.root;e&&(Wv(n.x,e.offset.x),Wv(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(jy(n,e),null==(t=this.scroll)?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:o,options:a}=t;t!==this.root&&o&&a.layoutScroll&&(o.wasRoot&&jy(n,e),Wv(n.x,o.offset.x),Wv(n.y,o.offset.y))}return n}applyTransform(e,t=!1,n){var r,o;const a=n||{x:{min:0,max:0},y:{min:0,max:0}};jy(a,e);for(let i=0;i<this.path.length;i++){const e=this.path[i];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&(Wv(a.x,-e.scroll.offset.x),Wv(a.y,-e.scroll.offset.y)),Av(e.latestValues)&&Yv(a,e.latestValues,null==(r=e.layout)?void 0:r.layoutBox)}return Av(this.latestValues)&&Yv(a,this.latestValues,null==(o=this.layout)?void 0:o.layoutBox),a}removeTransform(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};jy(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];if(!Av(e.latestValues))continue;let o;e.instance&&(_v(e.latestValues)&&e.updateSnapshot(),o=hv(),jy(o,e.measurePageBox())),Iy(n,e.latestValues,null==(t=e.snapshot)?void 0:t.layoutBox,o)}return Av(this.latestValues)&&Iy(n,this.latestValues),n}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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!==bp.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null==(t=this.parent)?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:a}=this.options;if(!this.layout||!o&&!a)return;this.resolvedRelativeTargetAt=bp.timestamp;const i=this.getClosestProjectingParent();var s,l,u,c;(i&&this.linkedParentVersion!==i.layoutVersion&&!i.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&i&&i.layout?this.createRelativeTarget(i,this.layout.layoutBox,i.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,l=this.relativeTarget,u=this.relativeParent.target,c=this.options.layoutAnchor||void 0,My(s.x,l.x,u.x,null==c?void 0:c.x),My(s.y,l.y,u.y,null==c?void 0:c.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):jy(this.target,this.layout.layoutBox),$v(this.target,this.targetDelta)):jy(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&i&&Boolean(i.resumingFrom)===Boolean(this.resumingFrom)&&!i.options.layoutScroll&&i.target&&1!==this.animationProgress?this.createRelativeTarget(i,this.target,i.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!_v(this.parent.latestValues)&&!Ov(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ly(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),jy(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null==(e=this.parent)?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===bp.timestamp&&(r=!1),r)return;const{layout:o,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!a)return;jy(this.layoutCorrected,this.layout.layoutBox);const i=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){var o;const a=n.length;if(!a)return;let i,s;t.x=t.y=1;for(let l=0;l<a;l++){i=n[l],s=i.projectionDelta;const{visualElement:a}=i.options;a&&a.props.style&&"contents"===a.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Wv(e.x,-i.scroll.offset.x),Wv(e.y,-i.scroll.offset.y)),s&&(t.x*=s.x.scale,t.y*=s.y.scale,$v(e,s)),r&&Av(i.latestValues)&&Yv(e,i.latestValues,null==(o=i.layout)?void 0:o.layoutBox))}t.x<Uv&&t.x>Bv&&(t.x=1),t.y<Uv&&t.y>Bv&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Cy(this.prevProjectionDelta.x,this.projectionDelta.x),Cy(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ty(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===i&&this.treeScale.y===s&&Wy(this.projectionDelta.x,this.prevProjectionDelta.x)&&Wy(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null==(t=this.options.visualElement)||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const i={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(s&&!u&&!0===this.options.crossfade&&!this.path.some(Nb));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,p,h;Cb(a.x,e.x,n),Cb(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ly(i,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),l=this.relativeTarget,f=this.relativeTargetOrigin,p=i,h=n,Pb(l.x,f.x,p.x,h),Pb(l.y,f.y,p.y,h),d&&function(e,t){return Vy(e.x,t.x)&&Vy(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),jy(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,a){o?(e.opacity=ih(0,n.opacity??1,Qy(r)),e.opacityExit=ih(t.opacity??1,0,Jy(r))):a&&(e.opacity=ih(t.opacity??1,n.opacity??1,r));for(let i=0;i<Yy;i++){const o=Gy[i];let a=Xy(t,o),s=Xy(n,o);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Ky(a)===Ky(s)?(e[o]=Math.max(ih(qy(a),qy(s),r),0),(Up.test(s)||Up.test(a))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=ih(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){var t,n,r;this.notifyListeners("animationStart"),null==(t=this.currentAnimation)||t.stop(),null==(r=null==(n=this.resumingFrom)?void 0:n.currentAnimation)||r.stop(),this.pendingAnimation&&(yp(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=vp.update(()=>{ab.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=sg(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=dg(e)?e:sg(e);return r.start(tg("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Db(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Py(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Py(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}jy(t,n),Yv(t,o),Ty(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ob);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null==(e=this.getStack())?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null==(e=this.getStack())?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&lb("z",e,r,this.animationValues);for(let o=0;o<ib.length;o++)lb(`rotate${ib[o]}`,e,r,this.animationValues),lb(`skew${ib[o]}`,e,r,this.animationValues);e.render();for(const o in r)e.setStaticValue(o,r[o]),this.animationValues&&(this.animationValues[o]=r[o]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=rb(null==t?void 0:t.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=rb(null==t?void 0:t.pointerEvents)||""),void(this.hasProjected&&!Av(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const o=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=function(e,t,n){let r="";const o=e.x.translate/t.x,a=e.y.translate/t.y,i=(null==n?void 0:n.z)||0;if((o||a||i)&&(r=`translate3d(${o}px, ${a}px, ${i}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:a,skewX:i,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),a&&(r+=`rotateY(${a}deg) `),i&&(r+=`skewX(${i}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,o);n&&(a=n(o,a)),e.transform=a;const{x:i,y:s}=this.projectionDelta;e.transformOrigin=`${100*i.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:e.opacity=r===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const l in ny){if(void 0===o[l])continue;const{correct:t,applyTo:n,isCSSVariable:i}=ny[l],s="none"===a?o[l]:t(o[l],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=s}else i?this.options.visualElement.renderState.vars[l]=s:e[l]=s}this.options.layoutId&&(e.pointerEvents=r===this?rb(null==t?void 0:t.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null==(t=e.currentAnimation)?void 0:t.stop()}),this.root.nodes.forEach(gb),this.root.sharedNodes.clear()}}}function db(e){e.updateLayout()}function fb(e){var t;const n=(null==(t=e.resumeFrom)?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;if("size"===o)Hy(e=>{const r=a?n.measuredBox[e]:n.layoutBox[e],o=Py(r);r.min=t[e].min,r.max=r.min+o});else if("x"===o||"y"===o){const e="x"===o?"y":"x";Ey(a?n.measuredBox[e]:n.layoutBox[e],t[e])}else Db(o,n.layoutBox,t)&&Hy(r=>{const o=a?n.measuredBox[r]:n.layoutBox[r],i=Py(t[r]);o.max=o.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+i)});const i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ty(i,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?Ty(s,e.applyTransform(r,!0),n.measuredBox):Ty(s,t,n.layoutBox);const l=!Fy(i);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:a}=r;if(o&&a){const i=e.options.layoutAnchor||void 0,s={x:{min:0,max:0},y:{min:0,max:0}};Ly(s,n.layoutBox,o.layoutBox,i);const l={x:{min:0,max:0},y:{min:0,max:0}};Ly(l,t,a.layoutBox,i),By(s,l)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function pb(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function hb(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function mb(e){e.clearSnapshot()}function gb(e){e.clearMeasurements()}function vb(e){e.isLayoutDirty=!0,e.updateLayout()}function yb(e){e.isLayoutDirty=!1}function bb(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function xb(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wb(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function kb(e){e.resolveTargetDelta()}function Sb(e){e.calcProjection()}function Eb(e){e.resetSkewAndRotation()}function jb(e){e.removeLeadSnapshot()}function Cb(e,t,n){e.translate=ih(t.translate,0,n),e.scale=ih(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Pb(e,t,n,r){e.min=ih(t.min,n.min,r),e.max=ih(t.max,n.max,r)}function Nb(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Tb={duration:.45,ease:[.4,0,.1,1]},Mb=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Rb=Mb("applewebkit/")&&!Mb("chrome/")?Math.round:Wf;function Lb(e){e.min=Rb(e.min),e.max=Rb(e.max)}function Db(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Uy(t),o=Uy(n),a=.2,!(Math.abs(r-o)<=a));var r,o,a}function _b(e){var t;return e!==e.root&&(null==(t=e.scroll)?void 0:t.wasRoot)}const Ab=cb({attachResizeListener:(e,t)=>eb(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||(null==(e=document.body)?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||(null==(t=document.body)?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Ob={current:void 0},Ib=cb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ob.current){const e=new Ab({});e.mount(window),e.setOptions({layoutScroll:!0}),Ob.current=e}return Ob.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),zb=W.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Fb(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Vb(...e){return W.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Fb(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Fb(e[t],null)}}}}(...e),e)}class $b extends W.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(zg(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=zg(e)&&e.offsetWidth||0,r=zg(e)&&e.offsetHeight||0,o=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Bb({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:a}){var i;const s=W.useId(),l=W.useRef(null),u=W.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=W.useContext(zb),d=(null==(i=e.props)?void 0:i.ref)??(null==e?void 0:e.ref),f=Vb(l,d);return W.useInsertionEffect(()=>{const{width:e,height:i,top:d,left:f,right:p,bottom:h}=u.current;if(t||!1===a||!l.current||!e||!i)return;const m="left"===n?`left: ${f}`:`right: ${p}`,g="bottom"===r?`bottom: ${h}`:`top: ${d}`;l.current.dataset.motionPopId=s;const v=document.createElement("style");c&&(v.nonce=c);const y=o??document.head;return y.appendChild(v),v.sheet&&v.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${i}px !important;\n ${m}px !important;\n ${g}px !important;\n }\n `),()=>{var e;null==(e=l.current)||e.removeAttribute("data-motion-pop-id"),y.contains(v)&&y.removeChild(v)}},[t]),ee.jsx($b,{isPresent:t,childRef:l,sizeRef:u,pop:a,children:!1===a?e:W.cloneElement(e,{ref:f})})}const Ub=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:a,mode:i,anchorX:s,anchorY:l,root:u})=>{const c=Df(Wb),d=W.useId();let f=!0,p=W.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:e=>{c.set(e,!0);for(const t of c.values())if(!t)return;r&&r()},register:e=>(c.set(e,!1),()=>c.delete(e))}),[n,c,r]);return a&&f&&(p={...p}),W.useMemo(()=>{c.forEach((e,t)=>c.set(t,!1))},[n]),W.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=ee.jsx(Bb,{pop:"popLayout"===i,isPresent:n,anchorX:s,anchorY:l,root:u,children:e}),ee.jsx(Af.Provider,{value:p,children:e})};function Wb(){return new Map}function Hb(e=!0){const t=W.useContext(Af);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,a=W.useId();W.useEffect(()=>{if(e)return o(a)},[e]);const i=W.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,i]:[!0]}const Gb=e=>e.key||"";function Yb(e){const t=[];return W.Children.forEach(e,e=>{W.isValidElement(e)&&t.push(e)}),t}const qb=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",anchorY:l="top",root:u})=>{const[c,d]=Hb(i),f=W.useMemo(()=>Yb(e),[e]),p=i&&!c?[]:f.map(Gb),h=W.useRef(!0),m=W.useRef(f),g=Df(()=>new Map),v=W.useRef(new Set),[y,b]=W.useState(f),[x,w]=W.useState(f);_f(()=>{h.current=!1,m.current=f;for(let e=0;e<x.length;e++){const t=Gb(x[e]);p.includes(t)?(g.delete(t),v.current.delete(t)):!0!==g.get(t)&&g.set(t,!1)}},[x,p.length,p.join("-")]);const k=[];if(f!==y){let e=[...f];for(let t=0;t<x.length;t++){const n=x[t],r=Gb(n);p.includes(r)||(e.splice(t,0,n),k.push(n))}return"wait"===a&&k.length&&(e=k),w(Yb(e)),b(f),null}const{forceRender:S}=W.useContext(Lf);return ee.jsx(ee.Fragment,{children:x.map(e=>{const y=Gb(e),b=!(i&&!c)&&(f===x||p.includes(y));return ee.jsx(Ub,{isPresent:b,initial:!(h.current&&!n)&&void 0,custom:t,presenceAffectsLayout:o,mode:a,root:u,onExitComplete:b?void 0:()=>{if(v.current.has(y))return;if(!g.has(y))return;v.current.add(y),g.set(y,!0);let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(null==S||S(),w(m.current),i&&(null==d||d()),r&&r())},anchorX:s,anchorY:l,children:e},y)})})},Kb=W.createContext({strict:!1}),Xb={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 Qb=!1;function Jb(){return function(){if(Qb)return;const e={};for(const t in Xb)e[t]={isEnabled:e=>Xb[t].some(t=>!!e[t])};Nv(e),Qb=!0}(),Pv}const Zb=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 ex(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Zb.has(e)}let tx=e=>!ex(e);try{"function"==typeof(nx=require("@emotion/is-prop-valid").default)&&(tx=e=>e.startsWith("on")?!ex(e):nx(e))}catch{}var nx;const rx=W.createContext({});function ox(e){const{initial:t,animate:n}=function(e,t){if(xv(e)){const{initial:t,animate:n}=e;return{initial:!1===t||vv(t)?t:void 0,animate:vv(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,W.useContext(rx));return W.useMemo(()=>({initial:t,animate:n}),[ax(t),ax(n)])}function ax(e){return Array.isArray(e)?e.join(" "):e}const ix=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function sx(e,t,n){for(const r in t)dg(t[r])||ry(r,n)||(e[r]=t[r])}function lx(e,t){const n={};return sx(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return W.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Qv(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function ux(e,t){const n={},r=lx(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const cx=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function dx(e,t,n,r){const o=W.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return uy(n,t,dy(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};sx(t,e.style,e),o.style={...t,...o.style}}return o}const fx=["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 px(e){return"string"==typeof e&&!e.includes("-")&&!!(fx.indexOf(e)>-1||/[A-Z]/u.test(e))}function hx(e,t,n,{latestValues:r},o,a=!1,i){const s=(i??px(e)?dx:ux)(t,r,o,e),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||dg(e[o])||(tx(o)||!0===n&&ex(o)||!t&&!ex(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(t,"string"==typeof e,a),u=e!==W.Fragment?{...l,...s,ref:n}:{},{children:c}=t,d=W.useMemo(()=>dg(c)?c.get():c,[c]);return W.createElement(e,{...u,children:d})}function mx(e,t,n,r){const o={},a=r(e,{});for(const f in a)o[f]=rb(a[f]);let{initial:i,animate:s}=e;const l=xv(e),u=wv(e);t&&u&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===i;const d=c?s:i;if(d&&"boolean"!=typeof d&&!gv(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=rg(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(o[r]=e)}for(const r in e)o[r]=e[r]}}}return o}const gx=e=>(t,n)=>{const r=W.useContext(rx),o=W.useContext(Af),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:mx(n,r,o,e),renderState:t()}}(e,t,r,o);return n?a():Df(a)},vx=gx({scrapeMotionValuesFromProps:oy,createRenderState:ix}),yx=gx({scrapeMotionValuesFromProps:fy,createRenderState:cx}),bx=Symbol.for("motionComponentSymbol");function xx(e,t,n){const r=W.useRef(n);W.useInsertionEffect(()=>{r.current=n});const o=W.useRef(null);return W.useCallback(n=>{var a;n&&(null==(a=e.onMount)||a.call(e,n));const i=r.current;if("function"==typeof i)if(n){const e=i(n);"function"==typeof e&&(o.current=e)}else o.current?(o.current(),o.current=null):i(n);else i&&(i.current=n);t&&(n?t.mount(n):t.unmount())},[t])}const wx=W.createContext({});function kx(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Sx(e,t,n,r,o,a){var i,s;const{visualElement:l}=W.useContext(rx),u=W.useContext(Kb),c=W.useContext(Af),d=W.useContext(zb),f=d.reducedMotion,p=d.skipAnimations,h=W.useRef(null),m=W.useRef(!1);r=r||u.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:l,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:f,skipAnimations:p,isSVG:a}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,v=W.useContext(wx);!g||g.projection||!o||"html"!==g.type&&"svg"!==g.type||function(e,t,n,r){const{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Ex(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:Boolean(i)||s&&kx(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}(h.current,n,o,v);const y=W.useRef(!1);W.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const b=n[hg],x=W.useRef(Boolean(b)&&"undefined"!=typeof window&&!(null==(i=window.MotionHandoffIsComplete)?void 0:i.call(window,b))&&(null==(s=window.MotionHasOptimisedAnimation)?void 0:s.call(window,b)));return _f(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),x.current&&g.animationState&&g.animationState.animateChanges())}),W.useEffect(()=>{g&&(!x.current&&g.animationState&&g.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var e;null==(e=window.MotionHandoffMarkAsComplete)||e.call(window,b)}),x.current=!1),g.enteringChildren=void 0)}),g}function Ex(e){if(e)return!1!==e.options.allowProjection?e.projection:Ex(e.parent)}function jx(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&function(e){const t=Jb();for(const n in e)t[n]={...t[n],...e[n]};Nv(t)}(r);const a=n?"svg"===n:px(e),i=a?yx:vx;function s(n,r){let s;const l={...W.useContext(zb),...n,layoutId:Cx(n)},{isStatic:u}=l,c=ox(n),d=i(n,u);if(!u&&"undefined"!=typeof window){W.useContext(Kb).strict;const t=function(e){const t=Jb(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:(null==n?void 0:n.isEnabled(e))||(null==r?void 0:r.isEnabled(e))?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}(l);s=t.MeasureLayout,c.visualElement=Sx(e,d,l,o,t.ProjectionNode,a)}return ee.jsxs(rx.Provider,{value:c,children:[s&&c.visualElement?ee.jsx(s,{visualElement:c.visualElement,...l}):null,hx(e,n,xx(d,c.visualElement,r),d,u,t,a)]})}s.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const l=W.forwardRef(s);return l[bx]=e,l}function Cx({layoutId:e}){const t=W.useContext(Lf).id;return t&&void 0!==e?t+"-"+e:e}function Px(e,t){if("undefined"==typeof Proxy)return jx;const n=new Map,r=(n,r)=>jx(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(o,a)=>"create"===a?r:(n.has(a)||n.set(a,jx(a,void 0,e,t)),n.get(a))})}const Nx=(e,t)=>t.isSVG??px(e)?new py(t):new ay(t,{allowProjection:e!==W.Fragment});let Tx=0;const Mx={animation:{Feature:class extends Rv{constructor(e){super(e),e.animationState||(e.animationState=xy(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();gv(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null==(e=this.unmountControls)||e.call(this)}}},exit:{Feature:class extends Rv{constructor(){super(...arguments),this.id=Tx++,this.isExitComplete=!1}update(){var e;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&&!1===r){if(this.isExitComplete){const{initial:t,custom:n}=this.node.getProps();if("string"==typeof t){const r=og(this.node,t,n);if(r){const{transition:t,transitionEnd:n,...o}=r;for(const r in o)null==(e=this.node.getValue(r))||e.jump(o[r])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Rx(e){return{point:{x:e.pageX,y:e.pageY}}}function Lx(e,t,n,r){return eb(e,t,(e=>t=>Hg(t)&&e(t,Rx(t)))(n),r)}const Dx=({current:e})=>e?e.ownerDocument.defaultView:null,_x=(e,t)=>Math.abs(e-t);const Ax=new Set(["auto","scroll"]);class Ox{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3,element:i}={}){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=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ix(this.lastRawMoveEventInfo,this.transformPagePoint));const e=Fx(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=_x(e.x,t.x),r=_x(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=bp;this.history.push({...r,timestamp:o});const{onStart:a,onMove:i}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),i&&i(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Ix(t,this.transformPagePoint),vp.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const a=Fx("pointercancel"===e.type?this.lastMoveEventInfo:Ix(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Hg(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;const s=Ix(Rx(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=bp;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,Fx(s,this.history)),this.removeListeners=Gf(Lx(this.contextWindow,"pointermove",this.handlePointerMove),Lx(this.contextWindow,"pointerup",this.handlePointerUp),Lx(this.contextWindow,"pointercancel",this.handlePointerUp)),i&&this.startScrollTracking(i)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(Ax.has(e.overflowX)||Ax.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.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(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o=r.x-t.x,a=r.y-t.y;0===o&&0===a||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o,this.lastMoveEventInfo.point.y+=a):this.history.length>0&&(this.history[0].x-=o,this.history[0].y-=a),this.scrollPositions.set(e,r),vp.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),yp(this.updatePoint)}}function Ix(e,t){return t?{point:t(e.point)}:e}function zx(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fx({point:e},t){return{point:e,delta:zx(e,$x(t)),offset:zx(e,Vx(t)),velocity:Bx(t,.1)}}function Vx(e){return e[0]}function $x(e){return e[e.length-1]}function Bx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=$x(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Kf(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>2*Kf(t)&&(r=e[1]);const a=Xf(o.timestamp-r.timestamp);if(0===a)return{x:0,y:0};const i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Ux(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Wx(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}}const Hx=.35;function Gx(e,t,n){return{min:Yx(e,t),max:Yx(e,n)}}function Yx(e,t){return"number"==typeof e?e:e[t]||0}const qx=new WeakMap;class Kx{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:o}=this.getProps();this.panSession=new Ox(e,{onSessionStart:e=>{t&&this.snapToCursor(Rx(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(a=n)||"y"===a?Vg[a]?null:(Vg[a]=!0,()=>{Vg[a]=!1}):Vg.x||Vg.y?null:(Vg.x=Vg.y=!0,()=>{Vg.x=Vg.y=!1}),!this.openDragLock))return;var a;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Hy(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Up.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Py(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),o&&vp.update(()=>o(e,t),!1,!0),fg(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:i}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),a&&vp.update(()=>a(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,distanceThreshold:n,contextWindow:Dx(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!n)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&vp.postRender(()=>i(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Qx(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?ih(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?ih(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),o.set(a)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null==(e=this.visualElement.projection)?void 0:e.layout,o=this.constraints;t&&kx(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Ux(e.x,n,o),y:Ux(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Hx){return!1===e?e=0:!0===e&&(e=Hx),{x:Gx(e,"left","right"),y:Gx(e,"top","bottom")}}(n),o!==this.constraints&&!kx(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Hy(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!kx(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=qv(e,n),{scroll:o}=t;return o&&(Wv(r.x,o.offset.x),Wv(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:Wx(e.x,t.x),y:Wx(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=Lv(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=Hy(i=>{if(!Qx(i,t,this.currentDirection))return;let l=s&&s[i]||{};!0!==a&&a!==i||(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[i]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(i,d)});return Promise.all(l).then(i)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return fg(this.visualElement,e),n.start(tg(e,n,0,t,this.visualElement,!1))}stopAnimation(){Hy(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Hy(t=>{const{drag:n}=this.getProps();if(!Qx(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:a}=r.layout.layoutBox[t],i=o.get()||0;o.set(e[t]-ih(n,a,.5)+i)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!kx(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Hy(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Py(e),o=Py(t);return o>r?n=Yf(t.min,t.max-r,e.min):r>o&&(n=Yf(e.min,e.max-o,t.min)),zf(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Hy(t=>{if(!Qx(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:a}=this.constraints[t];n.set(ih(o,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;qx.set(this.visualElement,this);const e=this.visualElement.current,t=Lx(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),o=t.target,a=o!==e&&function(e){return Yg.has(e.tagName)||!0===e.isContentEditable}(o);n&&r&&!a&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();kx(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=fv(e,Xx(n)),o=fv(t,Xx(n));return()=>{r(),o()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,a=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),vp.read(r);const i=eb(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Hy(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),t(),a(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:a=Hx,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:a,dragMomentum:i}}}function Xx(e){let t=!0;return()=>{t?t=!1:e()}}function Qx(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Jx=e=>(t,n)=>{e&&vp.update(()=>e(t,n),!1,!0)};let Zx=!1;class ew extends W.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),Zx&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ab.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,{projection:a}=n;return a?(a.isPresent=o,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Zx=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==o?a.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?a.promote():a.relegate()||vp.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Fg.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Zx=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function tw(e){const[t,n]=Hb(),r=W.useContext(Lf);return ee.jsx(ew,{...e,layoutGroup:r,switchLayoutGroup:W.useContext(wx),isPresent:t,safeToRemove:n})}const nw={pan:{Feature:class extends Rv{constructor(){super(...arguments),this.removePointerDownListener=Wf}onPointerDown(e){this.session=new Ox(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Dx(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Jx(e),onStart:Jx(t),onMove:Jx(n),onEnd:(e,t)=>{delete this.session,r&&vp.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Lx(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Rv{constructor(e){super(e),this.removeGroupControls=Wf,this.removeListeners=Wf,this.controls=new Kx(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Wf}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Ib,MeasureLayout:tw}};function rw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&vp.postRender(()=>o(t,Rx(t)))}function ow(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&vp.postRender(()=>o(t,Rx(t)))}const aw=new WeakMap,iw=new WeakMap,sw=e=>{const t=aw.get(e.target);t&&t(e)},lw=e=>{e.forEach(sw)};function uw(e,t,n){const r=function({root:e,...t}){const n=e||document;iw.has(n)||iw.set(n,{});const r=iw.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(lw,{root:e,...t})),r[o]}(t);return aw.set(e,n),r.observe(e),()=>{aw.delete(e),r.unobserve(e)}}const cw={some:0,all:1};const dw={inView:{Feature:class extends Rv{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;null==(e=this.stopObserver)||e.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:a}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:"number"==typeof o?o:cw[o]};this.stopObserver=uw(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,a&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){var e;null==(e=this.stopObserver)||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends Rv{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Zg(e,(e,t)=>(ow(this.node,t,"Start"),(e,{success:t})=>ow(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===(null==n?void 0:n.tap)})}unmount(){}}},focus:{Feature:class extends Rv{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(kT){e=!0}e&&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=Gf(eb(this.node.current,"focus",()=>this.onFocus()),eb(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Rv{mount(){const{current:e}=this.node;e&&(this.unmount=Ug(e,(e,t)=>(rw(this.node,t,"Start"),e=>rw(this.node,e,"End"))))}unmount(){}}}},fw=Px({...Mx,...dw,...nw,...{layout:{ProjectionNode:Ib,MeasureLayout:tw}}},Nx);function pw(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=pw(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function hw(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=pw(e))&&(r&&(r+=" "),r+=t);return r}const mw=e=>{const t=bw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),gw(n,t)||yw(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},gw=(e,t)=>{var n;if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),a=o?gw(e.slice(1),o):void 0;if(a)return a;if(0===t.validators.length)return;const i=e.join("-");return null==(n=t.validators.find(({validator:e})=>e(i)))?void 0:n.classGroupId},vw=/^\[(.+)\]$/,yw=e=>{if(vw.test(e)){const t=vw.exec(e)[1],n=null==t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bw=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Sw(Object.entries(e.classGroups),n).forEach(([e,n])=>{xw(n,r,e,t)}),r},xw=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:ww(t,e)).classGroupId=n)}if("function"==typeof e)return kw(e)?void xw(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,o])=>{xw(o,ww(t,e),n,r)})})},ww=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},kw=e=>e.isThemeGetter,Sw=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,Ew=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},jw=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],a=t.length,i=e=>{const n=[];let i,s=0,l=0;for(let d=0;d<e.length;d++){let u=e[d];if(0===s){if(u===o&&(r||e.slice(d,d+a)===t)){n.push(e.slice(l,d)),l=d+a;continue}if("/"===u){i=d;continue}}"["===u?s++:"]"===u&&s--}const u=0===n.length?e:e.substring(l),c=u.startsWith("!");return{modifiers:n,hasImportantModifier:c,baseClassName:c?u.substring(1):u,maybePostfixModifierPosition:i&&i>l?i-l:void 0}};return n?e=>n({className:e,parseClassName:i}):i},Cw=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},Pw=/\s+/;function Nw(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Tw(e))&&(r&&(r+=" "),r+=t);return r}const Tw=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Tw(e[r]))&&(n&&(n+=" "),n+=t);return n};function Mw(e,...t){let n,r,o,a=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:Ew(e.cacheSize),parseClassName:jw(e),...mw(e)}))(l),r=n.cache.get,o=n.cache.set,a=i,i(s)};function i(e){const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(Pw);let s="";for(let l=i.length-1;l>=0;l-=1){const e=i[l],{modifiers:t,hasImportantModifier:u,baseClassName:c,maybePostfixModifierPosition:d}=n(e);let f=Boolean(d),p=r(f?c.substring(0,d):c);if(!p){if(!f){s=e+(s.length>0?" "+s:s);continue}if(p=r(c),!p){s=e+(s.length>0?" "+s:s);continue}f=!1}const h=Cw(t).join(":"),m=u?h+"!":h,g=m+p;if(a.includes(g))continue;a.push(g);const v=o(p,f);for(let n=0;n<v.length;++n){const e=v[n];a.push(m+e)}s=e+(s.length>0?" "+s:s)}return s})(e,n);return o(e,a),a}return function(){return a(Nw.apply(null,arguments))}}const Rw=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},Lw=/^\[(?:([a-z-]+):)?(.+)\]$/i,Dw=/^\d+\/\d+$/,_w=new Set(["px","full","screen"]),Aw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ow=/\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$/,Iw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vw=e=>Bw(e)||_w.has(e)||Dw.test(e),$w=e=>tk(e,"length",nk),Bw=e=>Boolean(e)&&!Number.isNaN(Number(e)),Uw=e=>tk(e,"number",Bw),Ww=e=>Boolean(e)&&Number.isInteger(Number(e)),Hw=e=>e.endsWith("%")&&Bw(e.slice(0,-1)),Gw=e=>Lw.test(e),Yw=e=>Aw.test(e),qw=new Set(["length","size","percentage"]),Kw=e=>tk(e,qw,rk),Xw=e=>tk(e,"position",rk),Qw=new Set(["image","url"]),Jw=e=>tk(e,Qw,ak),Zw=e=>tk(e,"",ok),ek=()=>!0,tk=(e,t,n)=>{const r=Lw.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},nk=e=>Ow.test(e)&&!Iw.test(e),rk=()=>!1,ok=e=>zw.test(e),ak=e=>Fw.test(e),ik=Mw(()=>{const e=Rw("colors"),t=Rw("spacing"),n=Rw("blur"),r=Rw("brightness"),o=Rw("borderColor"),a=Rw("borderRadius"),i=Rw("borderSpacing"),s=Rw("borderWidth"),l=Rw("contrast"),u=Rw("grayscale"),c=Rw("hueRotate"),d=Rw("invert"),f=Rw("gap"),p=Rw("gradientColorStops"),h=Rw("gradientColorStopPositions"),m=Rw("inset"),g=Rw("margin"),v=Rw("opacity"),y=Rw("padding"),b=Rw("saturate"),x=Rw("scale"),w=Rw("sepia"),k=Rw("skew"),S=Rw("space"),E=Rw("translate"),j=()=>["auto",Gw,t],C=()=>[Gw,t],P=()=>["",Vw,$w],N=()=>["auto",Bw,Gw],T=()=>["","0",Gw],M=()=>[Bw,Gw];return{cacheSize:500,separator:":",theme:{colors:[ek],spacing:[Vw,$w],blur:["none","",Yw,Gw],brightness:M(),borderColor:[e],borderRadius:["none","","full",Yw,Gw],borderSpacing:C(),borderWidth:P(),contrast:M(),grayscale:T(),hueRotate:M(),invert:T(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Hw,$w],inset:j(),margin:j(),opacity:M(),padding:C(),saturate:M(),scale:M(),sepia:T(),skew:M(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",Gw]}],container:["container"],columns:[{columns:[Yw]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Gw]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ww,Gw]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Gw]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",Ww,Gw]}],"grid-cols":[{"grid-cols":[ek]}],"col-start-end":[{col:["auto",{span:["full",Ww,Gw]},Gw]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[ek]}],"row-start-end":[{row:["auto",{span:[Ww,Gw]},Gw]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Gw]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Gw]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Gw,t]}],"min-w":[{"min-w":[Gw,t,"min","max","fit"]}],"max-w":[{"max-w":[Gw,t,"none","full","min","max","fit","prose",{screen:[Yw]},Yw]}],h:[{h:[Gw,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Gw,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Gw,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Gw,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Yw,$w]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Uw]}],"font-family":[{font:[ek]}],"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",Gw]}],"line-clamp":[{"line-clamp":["none",Bw,Uw]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vw,Gw]}],"list-image":[{"list-image":["none",Gw]}],"list-style-type":[{list:["none","disc","decimal",Gw]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vw,$w]}],"underline-offset":[{"underline-offset":["auto",Vw,Gw]}],"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:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Gw]}],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",Gw]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Xw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Kw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Jw]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Vw,Gw]}],"outline-w":[{outline:[Vw,$w]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Vw,$w]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Yw,Zw]}],"shadow-color":[{shadow:[ek]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Yw,Gw]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"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",Gw]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",Gw]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",Gw]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Ww,Gw]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Gw]}],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",Gw]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",Gw]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vw,$w,Uw]}],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"]}}});function sk(...e){return ik(hw(e))}const lk=W.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:sk("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));lk.displayName="Card";const uk=W.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:sk("flex flex-col space-y-1.5 p-6",e),...t}));uk.displayName="CardHeader";const ck=W.forwardRef(({className:e,...t},n)=>ee.jsx("h3",{ref:n,className:sk("text-2xl font-semibold leading-none tracking-tight",e),...t}));ck.displayName="CardTitle";const dk=W.forwardRef(({className:e,...t},n)=>ee.jsx("p",{ref:n,className:sk("text-sm text-muted-foreground",e),...t}));dk.displayName="CardDescription";const fk=W.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:sk("p-6 pt-0",e),...t}));fk.displayName="CardContent";const pk=W.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:sk("flex items-center p-6 pt-0",e),...t}));function hk(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function mk(...e){return t=>{let n=!1;const r=e.map(e=>{const r=hk(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():hk(e[t],null)}}}}function gk(...e){return W.useCallback(mk(...e),e)}pk.displayName="CardFooter";var vk=Symbol.for("react.lazy"),yk=G[" use ".trim().toString()];function bk(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===vk&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function xk(e){const t=kk(e),n=W.forwardRef((e,n)=>{let{children:r,...o}=e;bk(r)&&"function"==typeof yk&&(r=yk(r._payload));const a=W.Children.toArray(r),i=a.find(Ek);if(i){const e=i.props.children,r=a.map(t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t);return ee.jsx(t,{...o,ref:n,children:W.isValidElement(e)?W.cloneElement(e,void 0,r):null})}return ee.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var wk=xk("Slot");function kk(e){const t=W.forwardRef((e,t)=>{let{children:n,...r}=e;if(bk(n)&&"function"==typeof yk&&(n=yk(n._payload)),W.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==W.Fragment&&(o.ref=t?mk(t,e):e),W.cloneElement(n,o)}return W.Children.count(n)>1?W.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Sk=Symbol("radix.slottable");function Ek(e){return W.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Sk}const jk=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Ck=hw,Pk=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Ck(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=jk(t)||jk(r);return o[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return Ck(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)},Nk=Pk("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"}}),Tk=W.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const i=r?wk:"button";return ee.jsx(i,{className:sk(Nk({variant:t,size:n,className:e})),ref:a,...o})});Tk.displayName="Button";const Mk=W.forwardRef(({className:e,type:t,...n},r)=>ee.jsx("input",{type:t,className:sk("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}));Mk.displayName="Input";var Rk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=xk(`Primitive.${t}`),r=W.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),ee.jsx(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Lk=W.forwardRef((e,t)=>ee.jsx(Rk.label,{...e,ref:t,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||(null==(n=e.onMouseDown)||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));Lk.displayName="Label";var Dk=Lk;const _k=Pk("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ak=W.forwardRef(({className:e,...t},n)=>ee.jsx(Dk,{ref:n,className:sk(_k(),e),...t}));Ak.displayName=Dk.displayName;const Ok=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>i,subscribe:e=>(n.add(e),()=>n.delete(e))},i=t=e(r,o,a);return a},Ik=e=>e;const zk=e=>{const t=(e=>e?Ok(e):Ok)(e),n=e=>function(e,t=Ik){const n=H.useSyncExternalStore(e.subscribe,H.useCallback(()=>t(e.getState()),[e,t]),H.useCallback(()=>t(e.getInitialState()),[e,t]));return H.useDebugValue(n),n}(t,e);return Object.assign(n,t),n},Fk=e=>e?zk(e):zk,Vk={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}`,usageMonitorTool:"cc_usage_monitor_tool",monitorMode:"cc_monitor_mode",chatOverlay:e=>`cc_chat_overlay_${e}`,rightPanelTab:"cc_right_panel_tab",leftPanelTab:"cc_left_panel_tab"};function $k(e,t,n){try{const r=localStorage.getItem(e);return null===r?t:n?JSON.parse(r):r}catch{return t}}function Bk(e,t,n){try{localStorage.setItem(e,n?JSON.stringify(t):String(t))}catch{}}function Uk(e){try{localStorage.removeItem(e)}catch{}}function Wk(e,t,n){const r=(null==n?void 0:n.parse)??!1,[o,a]=W.useState(()=>{try{const n=localStorage.getItem(e);return null===n?t:r?JSON.parse(n):n}catch{return t}});return[o,W.useCallback(t=>{a(n=>{const o="function"==typeof t?t(n):t;try{localStorage.setItem(e,r?JSON.stringify(o):String(o))}catch{}return o})},[e,r])]}const Hk=Fk(e=>({token:localStorage.getItem(Vk.token),setToken:t=>{Bk(Vk.token,t),e({token:t})},clearToken:()=>{Uk(Vk.token),e({token:null})}}));let Gk=null;const Yk=Fk((e,t)=>({projects:[],loading:!1,error:null,hasFetched:!1,fetchProjects:async()=>{if(!t().loading){e({loading:!0,error:null});try{const t=await async function(){if(!Gk){const e=await fd(()=>Promise.resolve().then(()=>EE),void 0);Gk=e.getProjects}return Gk()}();e({projects:t,hasFetched:!0})}catch(n){e({error:n instanceof Error?n.message:"Failed to load projects"})}finally{e({loading:!1})}}},addProject:t=>e(e=>({projects:[...e.projects,t]})),updateProject:t=>e(e=>({projects:e.projects.map(e=>e.id===t.id?t:e)})),removeProject:t=>e(e=>({projects:e.projects.filter(e=>e.id!==t)})),setProjects:t=>e({projects:t})})),qk={filePreviewPath:null,shortcutEditorOpen:!1,shortcutEditingId:null,shareHubOpen:!1,shareHubLabel:"",shareHubCommand:""},Kk=Fk((e,t)=>({entries:{},get:e=>t().entries[e]??qk,setFilePreviewPath:(t,n)=>e(e=>({entries:{...e.entries,[t]:{...e.entries[t]??qk,filePreviewPath:n}}})),setShortcutEditor:(t,n,r=null)=>e(e=>({entries:{...e.entries,[t]:{...e.entries[t]??qk,shortcutEditorOpen:n,shortcutEditingId:n?r:null}}})),setShareHub:(t,n,r="",o="")=>e(e=>({entries:{...e.entries,[t]:{...e.entries[t]??qk,shareHubOpen:n,shareHubLabel:n?r:"",shareHubCommand:n?o:""}}}))}));function Xk(){return Hk.getState().token}function Qk(){Hk.getState().clearToken()}async function Jk(e,t,n,r=!0,o){const a={"Content-Type":"application/json"};if(r){const e=Xk();e&&(a.Authorization=`Bearer ${e}`)}const i=await fetch(`${t}`,{method:e,headers:a,body:void 0!==n?JSON.stringify(n):void 0,signal:o});if(401===i.status)throw Qk(),"/login"!==window.location.pathname&&(window.location.href="/login"),new Error("Unauthorized");if(!i.ok){let e=`HTTP ${i.status}`;try{const t=await i.json();t.error&&(e=t.error)}catch{}throw new Error(e)}return i.json()}async function Zk(e,t){return(await Jk("POST","/api/auth/login",{username:e,password:t},!1)).token}function eS(){const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e}async function tS(){return(await Jk("GET","/api/auth/local-token",void 0,!1)).token}async function nS(){return(await Jk("GET","/api/projects/order")).order}async function rS(e){await Jk("PUT","/api/projects/order",{order:e})}async function oS(){return Jk("GET","/api/projects/users")}async function aS(e,t){return Jk("PUT",`/api/projects/${e}/shares`,{shares:t})}async function iS(e){return Jk("POST","/api/projects",e)}async function sS(e){return Jk("POST","/api/projects/open",{folderPath:e})}async function lS(e){await Jk("DELETE",`/api/projects/${e}`)}async function uS(e){return Jk("PATCH",`/api/projects/${e}/start`)}async function cS(e){return Jk("PATCH",`/api/projects/${e}/archive`)}async function dS(e){return Jk("PATCH",`/api/projects/${e}/unarchive`)}async function fS(){return Jk("GET","/api/shortcuts")}async function pS(e){return Jk("POST","/api/shortcuts",e)}async function hS(e,t){return Jk("PUT",`/api/shortcuts/${e}`,t)}async function mS(e){await Jk("DELETE",`/api/shortcuts/${e}`)}async function gS(e){return Jk("GET",`/api/shortcuts/project/${e}`)}async function vS(e,t){return Jk("POST",`/api/shortcuts/project/${e}`,t)}async function yS(e,t,n){return Jk("PUT",`/api/shortcuts/project/${e}/${t}`,n)}async function bS(e,t){await Jk("DELETE",`/api/shortcuts/project/${e}/${t}`)}async function xS(){return Jk("GET","/api/prompts")}async function wS(e){return Jk("POST","/api/prompts",e)}async function kS(e,t){return Jk("PUT",`/api/prompts/${e}`,t)}async function SS(e){await Jk("DELETE",`/api/prompts/${e}`)}async function ES(e){return Jk("GET",`/api/prompts/project/${e}`)}async function jS(e,t){return Jk("POST",`/api/prompts/project/${e}`,t)}async function CS(e,t,n){return Jk("PUT",`/api/prompts/project/${e}/${t}`,n)}async function PS(e,t){await Jk("DELETE",`/api/prompts/project/${e}/${t}`)}async function NS(e,t,n){return Jk("POST",`/api/prompts/project/${e}/toggle`,{text:t,action:n})}async function TS(){return Jk("GET","/api/skillhub/items")}async function MS(e="claude"){return Jk("GET",`/api/projects/usage?tool=${encodeURIComponent(e)}`)}async function RS(e="claude"){return Jk("GET",`/api/projects/usage?refresh=true&tool=${encodeURIComponent(e)}`)}async function LS(e){return Jk("GET",`/api/filesystem${e?`?path=${encodeURIComponent(e)}`:""}`)}function DS(e){return`/api/filesystem/raw?path=${encodeURIComponent(e)}`}async function _S(e,t){const n=new FormData;n.append("path",e);for(const i of t)n.append("files",i);const r={},o=Xk();o&&(r.Authorization=`Bearer ${o}`);const a=await fetch("/api/filesystem/upload",{method:"POST",headers:r,body:n});if(!a.ok){const e=await a.json().catch(()=>({}));throw new Error(e.error||`Upload failed: ${a.status}`)}return a.json()}async function AS(e,t){return Jk("POST","/api/filesystem/mkdir",{path:e,name:t})}async function OS(e){return Jk("GET",`/api/filesystem/file?path=${encodeURIComponent(e)}`)}async function IS(e,t){return Jk("PUT","/api/filesystem/file",{path:e,content:t})}async function zS(e){return Jk("DELETE",`/api/filesystem?path=${encodeURIComponent(e)}`)}async function FS(){return Jk("GET","/api/update/check-version")}async function VS(){return Jk("POST","/api/update/execute")}async function $S(){return Jk("GET","/api/update/status")}async function BS(){return Jk("GET","/api/backup/built-in-oauth")}async function US(){return Jk("GET","/api/backup/providers")}async function WS(e){return Jk("POST","/api/backup/providers",e)}async function HS(e){await Jk("DELETE",`/api/backup/providers/${e}`)}async function GS(e){return Jk("GET",`/api/backup/auth/${e}/url`)}async function YS(e){return Jk("POST",`/api/backup/run/${e}`)}async function qS(){return Jk("GET","/api/backup/schedule")}async function KS(e){return Jk("PUT","/api/backup/schedule",e)}async function XS(){return Jk("GET","/api/backup/excludes")}async function QS(e){return Jk("PUT","/api/backup/excludes",{patterns:e})}async function JS(){return Jk("GET","/api/backup/history")}async function ZS(){return Jk("GET","/api/notify/config")}async function eE(e){return Jk("PUT","/api/notify/config",e)}async function tE(e){return Jk("GET",`/api/projects/${e}/git/status`)}async function nE(e,t){return Jk("GET",`/api/projects/${e}/git/diff${t?`?file=${encodeURIComponent(t)}`:""}`)}async function rE(e,t){await Jk("POST",`/api/projects/${e}/git/add`,{files:t})}async function oE(e,t){await Jk("POST",`/api/projects/${e}/git/commit`,{message:t})}async function aE(e,t=50,n=0){return Jk("GET",`/api/projects/${e}/git/log?limit=${t}&skip=${n}`)}async function iE(e,t){return Jk("PATCH",`/api/projects/${e}/rename`,{name:t})}async function sE(e,t={}){const n=new URLSearchParams;null!=t.limit&&n.set("limit",String(t.limit)),t.before&&n.set("before",t.before);const r=n.toString();return Jk("GET",`/api/projects/${e}/chat-history${r?"?"+r:""}`)}async function lE(e){return Jk("GET",`/api/projects/${e}/disk-size`)}async function uE(e){return Jk("GET",`/api/tool/model?tool=${encodeURIComponent(e)}`)}async function cE(e){return Jk("GET",`/api/tool/models?tool=${encodeURIComponent(e)}`)}async function dE(e,t){return Jk("GET",`/api/tool/skills${t?`?tool=${encodeURIComponent(e)}&projectId=${encodeURIComponent(t)}`:`?tool=${encodeURIComponent(e)}`}`)}async function fE(){return Jk("GET","/api/plugins")}async function pE(e){return Jk("POST","/api/plugins/install",{downloadUrl:e})}async function hE(e){await Jk("DELETE",`/api/plugins/${e}`)}async function mE(e,t){return Jk("PUT",`/api/plugins/${e}/config`,t)}async function gE(e,t){await Jk("PUT",`/api/plugins/${e}/enabled`,{enabled:t})}async function vE(e){return Jk("GET",`/api/approval/${encodeURIComponent(e)}/pending`)}async function yE(e,t,n,r){return Jk("POST",`/api/approval/${encodeURIComponent(e)}/${encodeURIComponent(t)}/decide`,{behavior:n,message:r})}async function bE(){return Jk("GET","/api/sync/config")}async function xE(e){return Jk("PUT","/api/sync/config",e)}async function wE(){return Jk("POST","/api/sync/test")}async function kE(e,t){return Jk("POST",`/api/sync/project/${encodeURIComponent(e)}`,t?{direction:t}:{})}async function SE(){return Jk("POST","/api/sync/all")}const EE=Object.freeze(Object.defineProperty({__proto__:null,addBackupProvider:WS,archiveProject:cS,browseFilesystem:LS,checkRunningProjects:async function(){return Jk("GET","/api/update/check-running")},checkVersion:FS,clearToken:Qk,createFolder:AS,createGlobalPrompt:wS,createGlobalShortcut:pS,createProject:iS,createProjectPrompt:jS,createProjectShortcut:vS,decideApproval:yE,deleteBackupProvider:HS,deleteGlobalPrompt:SS,deleteGlobalShortcut:mS,deletePath:zS,deleteProject:lS,deleteProjectPrompt:PS,deleteProjectShortcut:bS,executeUpdate:VS,getAllUsers:oS,getBackupAuthUrl:GS,getBackupExcludes:XS,getBackupHistory:JS,getBackupProviders:US,getBackupSchedule:qS,getBuiltInOAuthTypes:BS,getChatHistory:sE,getClaudeModel:async function(){return Jk("GET","/api/claude/model")},getClaudeSkills:async function(){return Jk("GET","/api/claude/skills")},getGitDiff:nE,getGitLog:aE,getGitStatus:tE,getGlobalPrompts:xS,getGlobalShortcuts:fS,getHubItems:TS,getInstalledPlugins:fE,getLocalToken:tS,getNotifyConfig:ZS,getPendingApprovals:vE,getProjectDiskSize:lE,getProjectOrder:nS,getProjectPrompts:ES,getProjectShortcuts:gS,getProjects:async function(){return Jk("GET","/api/projects")},getProjectsActivity:async function(e){return Jk("GET","/api/projects/activity",void 0,!0,e)},getRawFileUrl:DS,getSyncConfig:bE,getSyncStatus:async function(){return Jk("GET","/api/sync/status")},getToken:Xk,getToolModel:uE,getToolModels:cE,getToolSkills:dE,getUpdateStatus:$S,getUsage:MS,getWorkspace:async function(){return(await Jk("GET","/api/projects/workspace")).workspace},gitAdd:rE,gitCommit:oE,installPlugin:pE,isLocalAccess:eS,login:Zk,openProject:sS,prepareForUpdate:async function(){return Jk("POST","/api/update/prepare")},readFile:OS,refreshUsage:RS,renameProject:iE,resetSyncConfig:async function(){return Jk("POST","/api/sync/reset")},setPluginEnabled:gE,setProjectOrder:rS,setToken:function(e){var t;t=e,Hk.getState().setToken(t)},startProject:uS,stopProject:async function(e){return Jk("PATCH",`/api/projects/${e}/stop`)},syncAll:SE,syncProjectOnce:kE,testSyncConnection:wE,togglePromptInClaudeMd:NS,triggerBackup:YS,unarchiveProject:dS,uninstallPlugin:hE,updateBackupExcludes:QS,updateBackupSchedule:KS,updateGlobalPrompt:kS,updateGlobalShortcut:hS,updateNotifyConfig:eE,updatePlugin:async function(e,t){return Jk("POST",`/api/plugins/${e}/update`,{downloadUrl:t})},updatePluginConfig:mE,updateProjectPrompt:CS,updateProjectShares:aS,updateProjectShortcut:yS,updateProjectTags:async function(e,t){return Jk("PATCH",`/api/projects/${e}/tags`,{tags:t})},updateSyncConfig:xE,uploadFiles:_S,writeFile:IS},Symbol.toStringTag,{value:"Module"}));function jE(){const e=cf(),t=Hk(e=>e.setToken),[n,r]=W.useState(""),[o,a]=W.useState(""),[i,s]=W.useState(null),[l,u]=W.useState(!1);W.useEffect(()=>{if(!eS())return;let n=!1;return(async()=>{try{const r=await tS();n||(t(r),e("/",{replace:!0}))}catch{}})(),()=>{n=!0}},[e,t]);return ee.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:ee.jsx(fw.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},className:"w-full max-w-sm",children:ee.jsxs(lk,{children:[ee.jsxs(uk,{className:"text-center",children:[ee.jsx(ck,{className:"text-2xl",children:"CC Web"}),ee.jsx(dk,{children:eS()?"Connecting locally...":"Sign in to manage your Claude projects"})]}),ee.jsxs("form",{onSubmit:r=>{(async r=>{r.preventDefault(),s(null),u(!0);try{const r=await Zk(n,o);t(r),e("/")}catch(a){s(a instanceof Error?a.message:"Login failed")}finally{u(!1)}})(r)},children:[ee.jsxs(fk,{className:"space-y-4",children:[ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ak,{htmlFor:"username",children:"Username"}),ee.jsx(Mk,{id:"username",type:"text",autoComplete:"username",value:n,onChange:e=>r(e.target.value),required:!0,autoFocus:!0})]}),ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ak,{htmlFor:"password",children:"Password"}),ee.jsx(Mk,{id:"password",type:"password",autoComplete:"current-password",value:o,onChange:e=>a(e.target.value),required:!0})]}),ee.jsx(qb,{children:i&&ee.jsx(fw.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})})]}),ee.jsx(pk,{children:ee.jsx(fw.div,{className:"w-full",whileTap:{scale:.98},children:ee.jsx(Tk,{type:"submit",className:"w-full",disabled:l,children:l?"Signing in...":"Sign In"})})})]})]})})})}
|
|
64
|
-
/**
|
|
65
|
-
* @license lucide-react v0.309.0 - ISC
|
|
66
|
-
*
|
|
67
|
-
* This source code is licensed under the ISC license.
|
|
68
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/var CE={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"};
|
|
70
|
-
/**
|
|
71
|
-
* @license lucide-react v0.309.0 - ISC
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the ISC license.
|
|
74
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const PE=(e,t)=>{const n=W.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:i="",children:s,...l},u)=>{return W.createElement("svg",{ref:u,...CE,width:r,height:r,stroke:n,strokeWidth:a?24*Number(o)/Number(r):o,className:["lucide",`lucide-${c=e,c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim()}`,i].join(" "),...l},[...t.map(([e,t])=>W.createElement(e,t)),...Array.isArray(s)?s:[s]]);var c});return n.displayName=`${e}`,n},NE=PE("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"}]]),TE=PE("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"}]]),ME=PE("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),RE=PE("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),LE=PE("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),DE=PE("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),_E=PE("ExternalLink",[["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}],["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["line",{x1:"10",x2:"21",y1:"14",y2:"3",key:"18c3s4"}]]),AE=PE("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"}]]),OE=PE("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"}]]),IE=PE("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"}]]),zE=PE("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"}]]),FE=PE("FolderSync",[["path",{d:"M9 20H4a2 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.9H20a2 2 0 0 1 2 2v.5",key:"1dkoa9"}],["path",{d:"M12 10v4h4",key:"1czhmt"}],["path",{d:"m12 14 1.535-1.605a5 5 0 0 1 8 1.5",key:"lvuxfi"}],["path",{d:"M22 22v-4h-4",key:"1ewp4q"}],["path",{d:"m22 18-1.535 1.605a5 5 0 0 1-8-1.5",key:"14ync0"}]]),VE=PE("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"}]]),$E=PE("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"}]]),BE=PE("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"}]]),UE=PE("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),WE=PE("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"}]]),HE=PE("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),GE=PE("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),YE=PE("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"}]]),qE=PE("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"}]]),KE=PE("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"}]]),XE=PE("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),QE=PE("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"}]]),JE=PE("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),ZE=PE("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"}]]),ej=PE("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),tj=PE("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"}]]),nj=PE("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"}]]),rj=PE("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),oj=PE("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]),aj=PE("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"}]]),ij=PE("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"}]]),sj=PE("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),lj=PE("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"}]]),uj=PE("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"}]]),cj=PE("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"}]]),dj=PE("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fj=PE("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),pj=Pk("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 hj({className:e,variant:t,...n}){return ee.jsx("div",{className:sk(pj({variant:t}),e),...n})}function mj(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function gj(e,t=[]){let n=[];const r=()=>{const t=n.map(e=>W.createContext(e));return function(n){const r=(null==n?void 0:n[e])||t;return W.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){const o=W.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,u=W.useMemo(()=>s,Object.values(s));return ee.jsx(l.Provider,{value:u,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[a])||o,u=W.useContext(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},vj(r,...t)]}function vj(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return W.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var yj=(null==globalThis?void 0:globalThis.document)?W.useLayoutEffect:()=>{},bj=G[" useId ".trim().toString()]||(()=>{}),xj=0;function wj(e){const[t,n]=W.useState(bj());return yj(()=>{n(e=>e??String(xj++))},[e]),e||(t?`radix-${t}`:"")}var kj=G[" useInsertionEffect ".trim().toString()]||yj;function Sj({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=function({defaultProp:e,onChange:t}){const[n,r]=W.useState(e),o=W.useRef(n),a=W.useRef(t);return kj(()=>{a.current=t},[t]),W.useEffect(()=>{var e;o.current!==n&&(null==(e=a.current)||e.call(a,n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:o;{const t=W.useRef(void 0!==e);W.useEffect(()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. 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.`)}t.current=s},[s,r])}const u=W.useCallback(t=>{var n;if(s){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&(null==(n=i.current)||n.call(i,r))}else a(t)},[s,e,a,i]);return[l,u]}function Ej(e){const t=jj(e),n=W.forwardRef((e,n)=>{const{children:r,...o}=e,a=W.Children.toArray(r),i=a.find(Pj);if(i){const e=i.props.children,r=a.map(t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t);return ee.jsx(t,{...o,ref:n,children:W.isValidElement(e)?W.cloneElement(e,void 0,r):null})}return ee.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function jj(e){const t=W.forwardRef((e,t)=>{const{children:n,...r}=e;if(W.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==W.Fragment&&(o.ref=t?mk(t,e):e),W.cloneElement(n,o)}return W.Children.count(n)>1?W.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Cj=Symbol("radix.slottable");function Pj(e){return W.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Cj}var Nj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Ej(`Primitive.${t}`),r=W.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),ee.jsx(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Tj(e,t){e&&ld.flushSync(()=>e.dispatchEvent(t))}function Mj(e){const t=W.useRef(e);return W.useEffect(()=>{t.current=e}),W.useMemo(()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)},[])}var Rj,Lj="dismissableLayer.update",Dj="dismissableLayer.pointerDownOutside",_j="dismissableLayer.focusOutside",Aj=W.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Oj=W.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=W.useContext(Aj),[c,d]=W.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=W.useState({}),h=gk(t,e=>d(e)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),y=c?m.indexOf(c):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Mj(e),r=W.useRef(!1),o=W.useRef(()=>{});return W.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){zj(Dj,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...u.branches].some(e=>e.contains(t));x&&!n&&(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())},f),k=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Mj(e),r=W.useRef(!1);return W.useEffect(()=>{const e=e=>{if(e.target&&!r.current){zj(_j,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())},f);return function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Mj(e);W.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{y===u.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),W.useEffect(()=>{if(c)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Rj=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Ij(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=Rj)}},[c,f,n,u]),W.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Ij())},[c,u]),W.useEffect(()=>{const e=()=>p({});return document.addEventListener(Lj,e),()=>document.removeEventListener(Lj,e)},[]),ee.jsx(Nj.div,{...l,ref:h,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:mj(e.onFocusCapture,k.onFocusCapture),onBlurCapture:mj(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:mj(e.onPointerDownCapture,w.onPointerDownCapture)})});Oj.displayName="DismissableLayer";function Ij(){const e=new CustomEvent(Lj);document.dispatchEvent(e)}function zj(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Tj(o,a):o.dispatchEvent(a)}W.forwardRef((e,t)=>{const n=W.useContext(Aj),r=W.useRef(null),o=gk(t,r);return W.useEffect(()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),ee.jsx(Nj.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var Fj="focusScope.autoFocusOnMount",Vj="focusScope.autoFocusOnUnmount",$j={bubbles:!1,cancelable:!0},Bj=W.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=W.useState(null),u=Mj(o),c=Mj(a),d=W.useRef(null),f=gk(t,e=>l(e)),p=W.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;W.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:Gj(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Gj(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Gj(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[r,s,p.paused]),W.useEffect(()=>{if(s){Yj.add(p);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(Fj,$j);s.addEventListener(Fj,u),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gj(r,{select:t}),document.activeElement!==n)return}((e=Uj(s),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Gj(s))}return()=>{s.removeEventListener(Fj,u),setTimeout(()=>{const e=new CustomEvent(Vj,$j);s.addEventListener(Vj,c),s.dispatchEvent(e),e.defaultPrevented||Gj(t??document.body,{select:!0}),s.removeEventListener(Vj,c),Yj.remove(p)},0)}}var e},[s,u,c,p]);const h=W.useCallback(e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=function(e){const t=Uj(e),n=Wj(t,e),r=Wj(t.reverse(),e);return[n,r]}(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&Gj(a,{select:!0})):(e.preventDefault(),n&&Gj(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,p.paused]);return ee.jsx(Nj.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})});function Uj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Wj(e,t){for(const n of e)if(!Hj(n,{upTo:t}))return n}function Hj(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Gj(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Bj.displayName="FocusScope";var Yj=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=qj(e,t),e.unshift(t)},remove(t){var n;e=qj(e,t),null==(n=e[0])||n.resume()}}}();function qj(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Kj=W.forwardRef((e,t)=>{var n;const{container:r,...o}=e,[a,i]=W.useState(!1);yj(()=>i(!0),[]);const s=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?ud.createPortal(ee.jsx(Nj.div,{...o,ref:t}),s):null});Kj.displayName="Portal";var Xj=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=W.useState(),r=W.useRef(null),o=W.useRef(e),a=W.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return W.useReducer((e,n)=>t[e][n]??e,e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W.useEffect(()=>{const e=Qj(r.current);a.current="mounted"===s?e:"none"},[s]),yj(()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=Qj(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,l]),yj(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=Qj(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&i&&(l("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=Qj(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:W.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):W.Children.only(n),a=gk(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?W.cloneElement(o,{ref:a}):null};function Qj(e){return(null==e?void 0:e.animationName)||"none"}Xj.displayName="Presence";var Jj=0;function Zj(){W.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??eC()),document.body.insertAdjacentElement("beforeend",e[1]??eC()),Jj++,()=>{1===Jj&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Jj--}},[])}function eC(){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 tC=function(){return tC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},tC.apply(this,arguments)};function nC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var rC="right-scroll-bar-position",oC="width-before-scroll-bar";function aC(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var iC="undefined"!=typeof window?W.useLayoutEffect:W.useEffect,sC=new WeakMap;function lC(e,t){var n,r,o,a=(n=null,r=function(t){return e.forEach(function(e){return aC(e,t)})},(o=W.useState(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,o.facade);return iC(function(){var t=sC.get(a);if(t){var n=new Set(t),r=new Set(e),o=a.current;n.forEach(function(e){r.has(e)||aC(e,null)}),r.forEach(function(e){n.has(e)||aC(e,o)})}sC.set(a,e)},[e]),a}function uC(e){return e}var cC=function(e){var t=e.sideCar,n=nC(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 W.createElement(r,tC({},n))};cC.isSideCarExport=!0;var dC=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=uC);var n=[],r=!1;return{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(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=tC({async:!0,ssr:!1},e),t}(),fC=function(){},pC=W.forwardRef(function(e,t){var n=W.useRef(null),r=W.useState({onScrollCapture:fC,onWheelCapture:fC,onTouchMoveCapture:fC}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,y=void 0===v?"div":v,b=e.gapMode,x=nC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,k=lC([n,t]),S=tC(tC({},x),o);return W.createElement(W.Fragment,null,c&&W.createElement(w,{sideCar:dC,removeScrollBar:u,shards:d,noRelative:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),i?W.cloneElement(W.Children.only(s),tC(tC({},S),{ref:k})):W.createElement(y,tC({},S,{className:l,ref:k}),s))});pC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},pC.classNames={fullWidth:oC,zeroRight:rC};function hC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var mC=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=hC())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gC=function(){var e,t=(e=mC(),function(t,n){W.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},vC={left:0,top:0,right:0,gap:0},yC=function(e){return parseInt(e||"",10)||0},bC=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return vC;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[yC(n),yC(r),yC(o)]}(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])}},xC=gC(),wC="data-scroll-locked",kC=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(wC,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(rC," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(oC," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(rC," .").concat(rC," {\n right: 0 ").concat(r,";\n }\n \n .").concat(oC," .").concat(oC," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(wC,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},SC=function(){var e=parseInt(document.body.getAttribute(wC)||"0",10);return isFinite(e)?e:0},EC=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;W.useEffect(function(){return document.body.setAttribute(wC,(SC()+1).toString()),function(){var e=SC()-1;e<=0?document.body.removeAttribute(wC):document.body.setAttribute(wC,e.toString())}},[]);var a=W.useMemo(function(){return bC(o)},[o]);return W.createElement(xC,{styles:kC(a,!t,o,n?"":"!important")})},jC=!1;if("undefined"!=typeof window)try{var CC=Object.defineProperty({},"passive",{get:function(){return jC=!0,!0}});window.addEventListener("test",CC,CC),window.removeEventListener("test",CC,CC)}catch(ST){jC=!1}var PC=!!jC&&{passive:!1},NC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},TC=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),MC(e,r)){var o=RC(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},MC=function(e,t){return"v"===e?function(e){return NC(e,"overflowY")}(t):function(e){return NC(e,"overflowX")}(t)},RC=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},LC=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},DC=function(e){return[e.deltaX,e.deltaY]},_C=function(e){return e&&"current"in e?e.current:e},AC=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},OC=0,IC=[];function zC(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const FC=(VC=function(e){var t=W.useRef([]),n=W.useRef([0,0]),r=W.useRef(),o=W.useState(OC++)[0],a=W.useState(gC)[0],i=W.useRef(e);W.useEffect(function(){i.current=e},[e]),W.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(_C),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=W.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=LC(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-a[0],u="deltaY"in e?e.deltaY:s[1]-a[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var h=TC(d,c);if(!h)return!0;if(h?o=d:(o="v"===d?"h":"v",h=TC(d,c)),!h)return!1;if(!r.current&&"changedTouches"in e&&(l||u)&&(r.current=o),!o)return!0;var m=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,i=n.target,s=t.contains(i),l=!1,u=a>0,c=0,d=0;do{if(!i)break;var f=RC(e,i),p=f[0],h=f[1]-f[2]-o*p;(p||h)&&MC(e,i)&&(c+=h,d+=p);var m=i.parentNode;i=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(u&&Math.abs(c)<1||!u&&Math.abs(d)<1)&&(l=!0),l}(m,t,e,"h"===m?l:u)},[]),l=W.useCallback(function(e){var n=e;if(IC.length&&IC[IC.length-1]===a){var r="deltaY"in n?DC(n):LC(n),o=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var l=(i.current.shards||[]).map(_C).filter(Boolean).filter(function(e){return e.contains(n.target)});(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=W.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:zC(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),c=W.useCallback(function(e){n.current=LC(e),r.current=void 0},[]),d=W.useCallback(function(t){u(t.type,DC(t),t.target,s(t,e.lockRef.current))},[]),f=W.useCallback(function(t){u(t.type,LC(t),t.target,s(t,e.lockRef.current))},[]);W.useEffect(function(){return IC.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,PC),document.addEventListener("touchmove",l,PC),document.addEventListener("touchstart",c,PC),function(){IC=IC.filter(function(e){return e!==a}),document.removeEventListener("wheel",l,PC),document.removeEventListener("touchmove",l,PC),document.removeEventListener("touchstart",c,PC)}},[]);var p=e.removeScrollBar,h=e.inert;return W.createElement(W.Fragment,null,h?W.createElement(a,{styles:AC(o)}):null,p?W.createElement(EC,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},dC.useMedium(VC),cC);var VC,$C=W.forwardRef(function(e,t){return W.createElement(pC,tC({},e,{ref:t,sideCar:FC}))});$C.classNames=pC.classNames;var BC=new WeakMap,UC=new WeakMap,WC={},HC=0,GC=function(e){return e&&(e.host||GC(e.parentNode))},YC=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=GC(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);WC[n]||(WC[n]=new WeakMap);var a=WC[n],i=[],s=new Set,l=new Set(o),u=function(e){e&&!s.has(e)&&(s.add(e),u(e.parentNode))};o.forEach(u);var c=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))c(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(BC.get(e)||0)+1,u=(a.get(e)||0)+1;BC.set(e,l),a.set(e,u),i.push(e),1===l&&o&&UC.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(kT){console.error("aria-hidden: cannot operate on ",e,kT)}})};return c(t),s.clear(),HC++,function(){i.forEach(function(e){var t=BC.get(e)-1,o=a.get(e)-1;BC.set(e,t),a.set(e,o),t||(UC.has(e)||e.removeAttribute(r),UC.delete(e)),o||e.removeAttribute(n)}),--HC||(BC=new WeakMap,BC=new WeakMap,UC=new WeakMap,WC={})}},qC=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),YC(r,o,n,"aria-hidden")):function(){return null}};function KC(e){const t=XC(e),n=W.forwardRef((e,n)=>{const{children:r,...o}=e,a=W.Children.toArray(r),i=a.find(JC);if(i){const e=i.props.children,r=a.map(t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t);return ee.jsx(t,{...o,ref:n,children:W.isValidElement(e)?W.cloneElement(e,void 0,r):null})}return ee.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function XC(e){const t=W.forwardRef((e,t)=>{const{children:n,...r}=e;if(W.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==W.Fragment&&(o.ref=t?mk(t,e):e),W.cloneElement(n,o)}return W.Children.count(n)>1?W.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var QC=Symbol("radix.slottable");function JC(e){return W.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===QC}var ZC="Dialog",[eP]=gj(ZC),[tP,nP]=eP(ZC),rP=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=W.useRef(null),l=W.useRef(null),[u,c]=Sj({prop:r,defaultProp:o??!1,onChange:a,caller:ZC});return ee.jsx(tP,{scope:t,triggerRef:s,contentRef:l,contentId:wj(),titleId:wj(),descriptionId:wj(),open:u,onOpenChange:c,onOpenToggle:W.useCallback(()=>c(e=>!e),[c]),modal:i,children:n})};rP.displayName=ZC;var oP="DialogTrigger";W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=nP(oP,n),a=gk(t,o.triggerRef);return ee.jsx(Nj.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":EP(o.open),...r,ref:a,onClick:mj(e.onClick,o.onOpenToggle)})}).displayName=oP;var aP="DialogPortal",[iP,sP]=eP(aP,{forceMount:void 0}),lP=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=nP(aP,t);return ee.jsx(iP,{scope:t,forceMount:n,children:W.Children.map(r,e=>ee.jsx(Xj,{present:n||a.open,children:ee.jsx(Kj,{asChild:!0,container:o,children:e})}))})};lP.displayName=aP;var uP="DialogOverlay",cP=W.forwardRef((e,t)=>{const n=sP(uP,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=nP(uP,e.__scopeDialog);return a.modal?ee.jsx(Xj,{present:r||a.open,children:ee.jsx(fP,{...o,ref:t})}):null});cP.displayName=uP;var dP=KC("DialogOverlay.RemoveScroll"),fP=W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=nP(uP,n);return ee.jsx($C,{as:dP,allowPinchZoom:!0,shards:[o.contentRef],children:ee.jsx(Nj.div,{"data-state":EP(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),pP="DialogContent",hP=W.forwardRef((e,t)=>{const n=sP(pP,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=nP(pP,e.__scopeDialog);return ee.jsx(Xj,{present:r||a.open,children:a.modal?ee.jsx(mP,{...o,ref:t}):ee.jsx(gP,{...o,ref:t})})});hP.displayName=pP;var mP=W.forwardRef((e,t)=>{const n=nP(pP,e.__scopeDialog),r=W.useRef(null),o=gk(t,n.contentRef,r);return W.useEffect(()=>{const e=r.current;if(e)return qC(e)},[]),ee.jsx(vP,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:mj(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()}),onPointerDownOutside:mj(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:mj(e.onFocusOutside,e=>e.preventDefault())})}),gP=W.forwardRef((e,t)=>{const n=nP(pP,e.__scopeDialog),r=W.useRef(!1),o=W.useRef(!1);return ee.jsx(vP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a,i;null==(a=e.onCloseAutoFocus)||a.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var a,i;null==(a=e.onInteractOutside)||a.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),vP=W.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=nP(pP,n),l=W.useRef(null),u=gk(t,l);return Zj(),ee.jsxs(ee.Fragment,{children:[ee.jsx(Bj,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:ee.jsx(Oj,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":EP(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),ee.jsxs(ee.Fragment,{children:[ee.jsx(NP,{titleId:s.titleId}),ee.jsx(TP,{contentRef:l,descriptionId:s.descriptionId})]})]})}),yP="DialogTitle",bP=W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=nP(yP,n);return ee.jsx(Nj.h2,{id:o.titleId,...r,ref:t})});bP.displayName=yP;var xP="DialogDescription",wP=W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=nP(xP,n);return ee.jsx(Nj.p,{id:o.descriptionId,...r,ref:t})});wP.displayName=xP;var kP="DialogClose",SP=W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=nP(kP,n);return ee.jsx(Nj.button,{type:"button",...r,ref:t,onClick:mj(e.onClick,()=>o.onOpenChange(!1))})});function EP(e){return e?"open":"closed"}SP.displayName=kP;var jP="DialogTitleWarning",[CP,PP]=function(e,t){const n=W.createContext(t),r=e=>{const{children:t,...r}=e,o=W.useMemo(()=>r,Object.values(r));return ee.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=W.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(jP,{contentName:pP,titleName:yP,docsSlug:"dialog"}),NP=({titleId:e})=>{const t=PP(jP),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return W.useEffect(()=>{if(e){document.getElementById(e)||console.error(n)}},[n,e]),null},TP=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${PP("DialogDescriptionWarning").contentName}}.`;return W.useEffect(()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");if(t&&o){document.getElementById(t)||console.warn(n)}},[n,e,t]),null},MP=cP,RP=hP,LP=bP,DP=wP,_P=SP;const AP=rP,OP=lP,IP=W.forwardRef(({className:e,...t},n)=>ee.jsx(MP,{ref:n,className:sk("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}));IP.displayName=MP.displayName;const zP=W.forwardRef(({className:e,children:t,noOverlay:n,...r},o)=>ee.jsxs(OP,{children:[!n&&ee.jsx(IP,{}),ee.jsxs(RP,{ref:o,className:sk("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,ee.jsxs(_P,{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:[ee.jsx(dj,{className:"h-4 w-4"}),ee.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));zP.displayName=RP.displayName;const FP=({className:e,...t})=>ee.jsx("div",{className:sk("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});FP.displayName="DialogHeader";const VP=({className:e,...t})=>ee.jsx("div",{className:sk("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});VP.displayName="DialogFooter";const $P=W.forwardRef(({className:e,...t},n)=>ee.jsx(LP,{ref:n,className:sk("text-lg font-semibold leading-none tracking-tight",e),...t}));$P.displayName=LP.displayName;const BP=W.forwardRef(({className:e,...t},n)=>ee.jsx(DP,{ref:n,className:sk("text-sm text-muted-foreground",e),...t}));function UP({project:e,open:t,onOpenChange:n,onUpdated:r}){const[o,a]=W.useState([]),[i,s]=W.useState([]),[l,u]=W.useState(!1),[c,d]=W.useState(null);W.useEffect(()=>{if(!t)return;a(e.shares?[...e.shares]:[]),d(null);let n=!1;return oS().then(e=>{n||s(e)}).catch(()=>{}),()=>{n=!0}},[t,e.id]);const f=new Set(o.map(e=>e.username)),p=i.filter(t=>t!==e.owner&&!f.has(t));return ee.jsx(AP,{open:t,onOpenChange:n,children:ee.jsxs(zP,{className:"sm:max-w-md",children:[ee.jsxs(FP,{children:[ee.jsxs($P,{className:"flex items-center gap-2",children:[ee.jsx(cj,{className:"h-4 w-4"}),"共享设置"]}),ee.jsx(BP,{children:"选择用户并设置权限:可见(只读)或可编辑(读写+终端)"})]}),ee.jsxs("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:[0===o.length&&ee.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"尚未共享给任何用户"}),o.map(e=>ee.jsxs("div",{className:"flex items-center justify-between gap-2 px-1",children:[ee.jsx("span",{className:"text-sm font-medium",children:e.username}),ee.jsxs("div",{className:"flex items-center gap-1.5",children:[ee.jsx("button",{onClick:()=>{return t=e.username,void a(e=>e.map(e=>e.username===t?{...e,permission:"view"===e.permission?"edit":"view"}:e));var t},className:"focus:outline-none",children:ee.jsx(hj,{variant:"edit"===e.permission?"default":"secondary",className:"cursor-pointer text-xs",children:"edit"===e.permission?"可编辑":"可见"})}),ee.jsx(Tk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive",onClick:()=>{return t=e.username,void a(e=>e.filter(e=>e.username!==t));var t},children:ee.jsx(uj,{className:"h-3.5 w-3.5"})})]})]},e.username))]}),p.length>0&&ee.jsxs("div",{className:"border-t pt-3",children:[ee.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"添加用户"}),ee.jsx("div",{className:"flex flex-wrap gap-1.5",children:p.map(e=>ee.jsxs(Tk,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>{return t=e,void a(e=>[...e,{username:t,permission:"view"}]);var t},children:[ee.jsx(ej,{className:"h-3 w-3"}),e]},e))})]}),c&&ee.jsx("p",{className:"text-sm text-destructive",children:c}),ee.jsxs(VP,{children:[ee.jsx(Tk,{variant:"outline",onClick:()=>n(!1),disabled:l,children:"取消"}),ee.jsx(Tk,{onClick:()=>{(async()=>{u(!0),d(null);try{const t=await aS(e.id,o);r(t),n(!1)}catch(ST){d(ST instanceof Error?ST.message:"Failed to update shares")}finally{u(!1)}})()},disabled:l,children:l?"保存中...":"保存"})]})]})})}BP.displayName=DP.displayName;const WP=Array(12).fill(0),HP=({visible:e,className:t})=>H.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},H.createElement("div",{className:"sonner-spinner"},WP.map((e,t)=>H.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),GP=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),YP=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},H.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"})),qP=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),KP=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),XP=H.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"},H.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),H.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}));let QP=1;const JP=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...r}=e,o="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:QP++,a=this.toasts.find(e=>e.id===o),i=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(t=>t.id===o?(this.publish({...t,...e,id:o,title:n}),{...t,...e,id:o,dismissible:i,title:n}):t):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let o,a=void 0!==n;const i=r.then(async e=>{o=["resolve",e];if(H.isValidElement(e))a=!1,this.create({id:n,type:"default",message:e});else if(ZP(e)&&!e.ok){a=!1;const r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,o="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,i="object"==typeof r&&!H.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:o,...i})}else if(e instanceof Error){a=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,i="object"==typeof r&&!H.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:o,...i})}else if(void 0!==t.success){a=!1;const r="function"==typeof t.success?await t.success(e):t.success,o="function"==typeof t.description?await t.description(e):t.description,i="object"==typeof r&&!H.isValidElement(r)?r:{message:r};this.create({id:n,type:"success",description:o,...i})}}).catch(async e=>{if(o=["reject",e],void 0!==t.error){a=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,i="object"==typeof r&&!H.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:o,...i})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),s=()=>new Promise((e,t)=>i.then(()=>"reject"===o[0]?t(o[1]):e(o[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||QP++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ZP=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,eN=(e,t)=>{const n=(null==t?void 0:t.id)||QP++;return JP.addToast({title:e,...t,id:n}),n},tN=Object.assign(eN,{success:JP.success,info:JP.info,warning:JP.warning,error:JP.error,custom:JP.custom,message:JP.message,promise:JP.promise,dismiss:JP.dismiss,loading:JP.loading},{getHistory:()=>JP.toasts,getToasts:()=>JP.getActiveToasts()});function nN(e){return void 0!==e.label}!function(e){if("undefined"==typeof document)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))}("[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%)}");const rN=3,oN=14;function aN(...e){return e.filter(Boolean).join(" ")}const iN=e=>{var t,n,r,o,a,i,s,l,u;const{invert:c,toast:d,unstyled:f,interacting:p,setHeights:h,visibleToasts:m,heights:g,index:v,toasts:y,expanded:b,removeToast:x,defaultRichColors:w,closeButton:k,style:S,cancelButtonStyle:E,actionButtonStyle:j,className:C="",descriptionClassName:P="",duration:N,position:T,gap:M,expandByDefault:R,classNames:L,icons:D,closeButtonAriaLabel:_="Close toast"}=e,[A,O]=H.useState(null),[I,z]=H.useState(null),[F,V]=H.useState(!1),[$,B]=H.useState(!1),[U,W]=H.useState(!1),[G,Y]=H.useState(!1),[q,K]=H.useState(!1),[X,Q]=H.useState(0),[J,Z]=H.useState(0),ee=H.useRef(d.duration||N||4e3),te=H.useRef(null),ne=H.useRef(null),re=0===v,oe=v+1<=m,ae=d.type,ie=!1!==d.dismissible,se=d.className||"",le=d.descriptionClassName||"",ue=H.useMemo(()=>g.findIndex(e=>e.toastId===d.id)||0,[g,d.id]),ce=H.useMemo(()=>{var e;return null!=(e=d.closeButton)?e:k},[d.closeButton,k]),de=H.useMemo(()=>d.duration||N||4e3,[d.duration,N]),fe=H.useRef(0),pe=H.useRef(0),he=H.useRef(0),me=H.useRef(null),[ge,ve]=T.split("-"),ye=H.useMemo(()=>g.reduce((e,t,n)=>n>=ue?e:e+t.height,0),[g,ue]),be=(()=>{const[e,t]=H.useState(document.hidden);return H.useEffect(()=>{const e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),xe=d.invert||c,we="loading"===ae;pe.current=H.useMemo(()=>ue*M+ye,[ue,ye]),H.useEffect(()=>{ee.current=de},[de]),H.useEffect(()=>{V(!0)},[]),H.useEffect(()=>{const e=ne.current;if(e){const t=e.getBoundingClientRect().height;return Z(t),h(e=>[{toastId:d.id,height:t,position:d.position},...e]),()=>h(e=>e.filter(e=>e.toastId!==d.id))}},[h,d.id]),H.useLayoutEffect(()=>{if(!F)return;const e=ne.current,t=e.style.height;e.style.height="auto";const n=e.getBoundingClientRect().height;e.style.height=t,Z(n),h(e=>e.find(e=>e.toastId===d.id)?e.map(e=>e.toastId===d.id?{...e,height:n}:e):[{toastId:d.id,height:n,position:d.position},...e])},[F,d.title,d.description,h,d.id,d.jsx,d.action,d.cancel]);const ke=H.useCallback(()=>{B(!0),Q(pe.current),h(e=>e.filter(e=>e.toastId!==d.id)),setTimeout(()=>{x(d)},200)},[d,x,h,pe]);H.useEffect(()=>{if(d.promise&&"loading"===ae||d.duration===1/0||"loading"===d.type)return;let e;return b||p||be?(()=>{if(he.current<fe.current){const e=(new Date).getTime()-fe.current;ee.current=ee.current-e}he.current=(new Date).getTime()})():ee.current!==1/0&&(fe.current=(new Date).getTime(),e=setTimeout(()=>{null==d.onAutoClose||d.onAutoClose.call(d,d),ke()},ee.current)),()=>clearTimeout(e)},[b,p,d,ae,be,ke]),H.useEffect(()=>{d.delete&&(ke(),null==d.onDismiss||d.onDismiss.call(d,d))},[ke,d.delete]);const Se=d.icon||(null==D?void 0:D[ae])||(e=>{switch(e){case"success":return GP;case"info":return qP;case"warning":return YP;case"error":return KP;default:return null}})(ae);var Ee,je,Ce,Pe;return H.createElement("li",{tabIndex:0,ref:ne,className:aN(C,se,null==L?void 0:L.toast,null==d||null==(t=d.classNames)?void 0:t.toast,null==L?void 0:L.default,null==L?void 0:L[ae],null==d||null==(n=d.classNames)?void 0:n[ae]),"data-sonner-toast":"","data-rich-colors":null!=(Ee=d.richColors)?Ee:w,"data-styled":!Boolean(d.jsx||d.unstyled||f),"data-mounted":F,"data-promise":Boolean(d.promise),"data-swiped":q,"data-removed":$,"data-visible":oe,"data-y-position":ge,"data-x-position":ve,"data-index":v,"data-front":re,"data-swiping":U,"data-dismissible":ie,"data-type":ae,"data-invert":xe,"data-swipe-out":G,"data-swipe-direction":I,"data-expanded":Boolean(b||R&&F),"data-testid":d.testId,style:{"--index":v,"--toasts-before":v,"--z-index":y.length-v,"--offset":`${$?X:pe.current}px`,"--initial-height":R?"auto":`${J}px`,...S,...d.style},onDragEnd:()=>{W(!1),O(null),me.current=null},onPointerDown:e=>{2!==e.button&&!we&&ie&&(te.current=new Date,Q(pe.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(W(!0),me.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n;if(G||!ie)return;me.current=null;const r=Number((null==(e=ne.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),o=Number((null==(t=ne.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),a=(new Date).getTime()-(null==(n=te.current)?void 0:n.getTime()),i="x"===A?r:o,s=Math.abs(i)/a;if(Math.abs(i)>=45||s>.11)return Q(pe.current),null==d.onDismiss||d.onDismiss.call(d,d),z("x"===A?r>0?"right":"left":o>0?"down":"up"),ke(),void Y(!0);var l,u;null==(l=ne.current)||l.style.setProperty("--swipe-amount-x","0px"),null==(u=ne.current)||u.style.setProperty("--swipe-amount-y","0px"),K(!1),W(!1),O(null)},onPointerMove:t=>{var n,r,o;if(!me.current||!ie)return;if((null==(n=window.getSelection())?void 0:n.toString().length)>0)return;const a=t.clientY-me.current.y,i=t.clientX-me.current.x;var s;const l=null!=(s=e.swipeDirections)?s:function(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(T);!A&&(Math.abs(i)>1||Math.abs(a)>1)&&O(Math.abs(i)>Math.abs(a)?"x":"y");let u={x:0,y:0};const c=e=>1/(1.5+Math.abs(e)/20);if("y"===A){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&a<0||l.includes("bottom")&&a>0)u.y=a;else{const e=a*c(a);u.y=Math.abs(e)<Math.abs(a)?e:a}}else if("x"===A&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&i<0||l.includes("right")&&i>0)u.x=i;else{const e=i*c(i);u.x=Math.abs(e)<Math.abs(i)?e:i}(Math.abs(u.x)>0||Math.abs(u.y)>0)&&K(!0),null==(r=ne.current)||r.style.setProperty("--swipe-amount-x",`${u.x}px`),null==(o=ne.current)||o.style.setProperty("--swipe-amount-y",`${u.y}px`)}},ce&&!d.jsx&&"loading"!==ae?H.createElement("button",{"aria-label":_,"data-disabled":we,"data-close-button":!0,onClick:we||!ie?()=>{}:()=>{ke(),null==d.onDismiss||d.onDismiss.call(d,d)},className:aN(null==L?void 0:L.closeButton,null==d||null==(r=d.classNames)?void 0:r.closeButton)},null!=(je=null==D?void 0:D.close)?je:XP):null,(ae||d.icon||d.promise)&&null!==d.icon&&(null!==(null==D?void 0:D[ae])||d.icon)?H.createElement("div",{"data-icon":"",className:aN(null==L?void 0:L.icon,null==d||null==(o=d.classNames)?void 0:o.icon)},d.promise||"loading"===d.type&&!d.icon?d.icon||((null==D?void 0:D.loading)?H.createElement("div",{className:aN(null==L?void 0:L.loader,null==d||null==(Pe=d.classNames)?void 0:Pe.loader,"sonner-loader"),"data-visible":"loading"===ae},D.loading):H.createElement(HP,{className:aN(null==L?void 0:L.loader,null==d||null==(Ce=d.classNames)?void 0:Ce.loader),visible:"loading"===ae})):null,"loading"!==d.type?Se:null):null,H.createElement("div",{"data-content":"",className:aN(null==L?void 0:L.content,null==d||null==(a=d.classNames)?void 0:a.content)},H.createElement("div",{"data-title":"",className:aN(null==L?void 0:L.title,null==d||null==(i=d.classNames)?void 0:i.title)},d.jsx?d.jsx:"function"==typeof d.title?d.title():d.title),d.description?H.createElement("div",{"data-description":"",className:aN(P,le,null==L?void 0:L.description,null==d||null==(s=d.classNames)?void 0:s.description)},"function"==typeof d.description?d.description():d.description):null),H.isValidElement(d.cancel)?d.cancel:d.cancel&&nN(d.cancel)?H.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||E,onClick:e=>{nN(d.cancel)&&ie&&(null==d.cancel.onClick||d.cancel.onClick.call(d.cancel,e),ke())},className:aN(null==L?void 0:L.cancelButton,null==d||null==(l=d.classNames)?void 0:l.cancelButton)},d.cancel.label):null,H.isValidElement(d.action)?d.action:d.action&&nN(d.action)?H.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||j,onClick:e=>{nN(d.action)&&(null==d.action.onClick||d.action.onClick.call(d.action,e),e.defaultPrevented||ke())},className:aN(null==L?void 0:L.actionButton,null==d||null==(u=d.classNames)?void 0:u.actionButton)},d.action.label):null)};function sN(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function lN(e,t){const n={};return[e,t].forEach((e,t)=>{const r=1===t,o=r?"--mobile-offset":"--offset",a=r?"16px":"24px";function i(e){["top","right","bottom","left"].forEach(t=>{n[`${o}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?i(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n[`${o}-${t}`]=a:n[`${o}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):i(a)}),n}const uN=H.forwardRef(function(e,t){const{id:n,invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:s,className:l,offset:u,mobileOffset:c,theme:d="light",richColors:f,duration:p,style:h,visibleToasts:m=rN,toastOptions:g,dir:v=sN(),gap:y=oN,icons:b,containerAriaLabel:x="Notifications"}=e,[w,k]=H.useState([]),S=H.useMemo(()=>n?w.filter(e=>e.toasterId===n):w.filter(e=>!e.toasterId),[w,n]),E=H.useMemo(()=>Array.from(new Set([o].concat(S.filter(e=>e.position).map(e=>e.position)))),[S,o]),[j,C]=H.useState([]),[P,N]=H.useState(!1),[T,M]=H.useState(!1),[R,L]=H.useState("system"!==d?d:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D=H.useRef(null),_=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=H.useRef(null),O=H.useRef(!1),I=H.useCallback(e=>{k(t=>{var n;return(null==(n=t.find(t=>t.id===e.id))?void 0:n.delete)||JP.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return H.useEffect(()=>JP.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{k(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{ud.flushSync(()=>{k(t=>{const n=t.findIndex(t=>t.id===e.id);return-1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[w]),H.useEffect(()=>{if("system"!==d)return void L(d);if("system"===d&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{L(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{L(e?"dark":"light")}catch(kT){console.error(kT)}})}},[d]),H.useEffect(()=>{w.length<=1&&N(!1)},[w]),H.useEffect(()=>{const e=e=>{var t;var n;a.every(t=>e[t]||e.code===t)&&(N(!0),null==(n=D.current)||n.focus());"Escape"!==e.code||document.activeElement!==D.current&&!(null==(t=D.current)?void 0:t.contains(document.activeElement))||N(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[a]),H.useEffect(()=>{if(D.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,O.current=!1)}},[D.current]),H.createElement("section",{ref:t,"aria-label":`${x} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((t,n)=>{var o;const[a,d]=t.split("-");return S.length?H.createElement("ol",{key:t,dir:"auto"===v?sN():v,tabIndex:-1,ref:D,className:l,"data-sonner-toaster":!0,"data-sonner-theme":R,"data-y-position":a,"data-x-position":d,style:{"--front-toast-height":`${(null==(o=j[0])?void 0:o.height)||0}px`,"--width":"356px","--gap":`${y}px`,...h,...lN(u,c)},onBlur:e=>{O.current&&!e.currentTarget.contains(e.relatedTarget)&&(O.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||O.current||(O.current=!0,A.current=e.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{T||N(!1)},onDragEnd:()=>N(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||M(!0)},onPointerUp:()=>M(!1)},S.filter(e=>!e.position&&0===n||e.position===t).map((n,o)=>{var a,l;return H.createElement(iN,{key:n.id,icons:b,index:o,toast:n,defaultRichColors:f,duration:null!=(a=null==g?void 0:g.duration)?a:p,className:null==g?void 0:g.className,descriptionClassName:null==g?void 0:g.descriptionClassName,invert:r,visibleToasts:m,closeButton:null!=(l=null==g?void 0:g.closeButton)?l:s,interacting:T,position:t,style:null==g?void 0:g.style,unstyled:null==g?void 0:g.unstyled,classNames:null==g?void 0:g.classNames,cancelButtonStyle:null==g?void 0:g.cancelButtonStyle,actionButtonStyle:null==g?void 0:g.actionButtonStyle,closeButtonAriaLabel:null==g?void 0:g.closeButtonAriaLabel,removeToast:I,toasts:S.filter(e=>e.position==n.position),heights:j.filter(e=>e.position==n.position),setHeights:C,expandByDefault:i,gap:y,expanded:P,swipeDirections:e.swipeDirections})})):null}))}),cN=W.createContext(null);function dN({children:e}){const[t,n]=W.useState(!1),[r,o]=W.useState({}),a=W.useRef(null),i=W.useCallback(e=>(o(e),n(!0),new Promise(e=>{a.current=e})),[]),s=W.useCallback(e=>{n(!1);const t=a.current;a.current=null,t&&t(e)},[]);return ee.jsxs(cN.Provider,{value:i,children:[e,ee.jsx(AP,{open:t,onOpenChange:e=>{e||s(!1)},children:ee.jsxs(zP,{className:"max-w-md",children:[ee.jsxs(FP,{children:[ee.jsx($P,{children:r.title??"确认"}),void 0!==r.description&&ee.jsx(BP,{asChild:!0,children:ee.jsx("div",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:r.description})})]}),ee.jsxs(VP,{children:[ee.jsx(Tk,{variant:"outline",onClick:()=>s(!1),children:r.cancelLabel??"取消"}),ee.jsx(fN,{destructive:r.destructive,onClick:()=>s(!0),children:r.confirmLabel??"确定"})]})]})})]})}function fN({destructive:e,onClick:t,children:n}){const r=W.useRef(null);return W.useEffect(()=>{var e;null==(e=r.current)||e.focus()},[]),ee.jsx(Tk,{ref:r,onClick:t,className:sk(e&&"bg-red-600 hover:bg-red-700 text-white"),children:n})}function pN(){const e=W.useContext(cN);if(!e)throw new Error("useConfirm must be used within <ConfirmProvider>");return e}function hN(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 mN({status:e}){return ee.jsx("span",{className:sk("inline-block w-2 h-2 rounded-full",{"bg-green-500":"running"===e,"bg-zinc-400":"stopped"===e,"bg-yellow-400 animate-pulse":"restarting"===e})})}const gN=H.memo(function({project:e,active:t=!1,statusStack:n=[],onDelete:r,onArchive:o,onUnarchive:a,onUpdated:i}){var s,l;const u=cf(),c=pN(),[d,f]=W.useState(!1),[p,h]=W.useState(null),[m,g]=W.useState(!1),[v,y]=W.useState(e.name),b=W.useRef(null),x=!!e._sharedPermission;W.useEffect(()=>{let t=!1;return lE(e.id).then(({bytes:e})=>{t||h(e)}).catch(()=>{}),()=>{t=!0}},[e.id]);const w="view"===e._sharedPermission,k=t=>{t.stopPropagation(),y(e.name),g(!0),setTimeout(()=>{var e;return null==(e=b.current)?void 0:e.select()},0)},S=async()=>{const t=v.trim();if(t&&t!==e.name)try{const n=await iE(e.id,t);null==i||i(n),g(!1)}catch(ST){tN.error("Rename failed",{description:null==ST?void 0:ST.message})}else g(!1)},E=ee.jsx(fw.div,{whileHover:e.archived||t?{}:{y:-2},transition:{duration:.2},children:ee.jsxs(lk,{className:sk("group cursor-pointer transition-colors relative",e.archived?"opacity-60 hover:opacity-80 hover:border-zinc-400":t?"border-transparent hover:border-transparent bg-transparent shadow-none":"hover:border-zinc-400 hover:shadow-md"),onClick:()=>!e.archived&&u(`/projects/${e.id}`),children:[ee.jsxs(uk,{className:"pb-2",children:[ee.jsxs("div",{className:"flex items-start justify-between gap-2",children:[m?ee.jsx("input",{ref:b,className:"text-base leading-tight font-semibold bg-transparent border-b border-primary outline-none w-full min-w-0",value:v,onChange:e=>y(e.target.value),onBlur:()=>{S()},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),S()),"Escape"===e.key&&g(!1)},onClick:e=>e.stopPropagation()}):ee.jsx(ck,{className:sk("text-base leading-tight",e.archived&&"text-muted-foreground"),onDoubleClick:x||e.archived?void 0:k,children:e.name}),ee.jsx("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0",children:!x&&ee.jsxs(ee.Fragment,{children:[e.archived?ee.jsx(Tk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),a(e.id)},title:"Restore project",children:ee.jsx(NE,{className:"h-3.5 w-3.5"})}):ee.jsxs(ee.Fragment,{children:[ee.jsx(Tk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:k,title:"Rename project",children:ee.jsx(ZE,{className:"h-3.5 w-3.5"})}),ee.jsx(Tk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:e=>{e.stopPropagation(),f(!0)},title:"共享设置",children:ee.jsx(cj,{className:"h-3.5 w-3.5"})}),ee.jsx(Tk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),o(e.id)},title:"Archive project",children:ee.jsx(TE,{className:"h-3.5 w-3.5"})})]}),ee.jsx(Tk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:async t=>{t.stopPropagation();await c({title:"删除项目",description:`确认删除项目 "${e.name}"?此操作不可撤销。`,destructive:!0,confirmLabel:"删除"})&&r(e.id)},title:"Delete project",children:ee.jsx(uj,{className:"h-3.5 w-3.5"})})]})})]}),ee.jsx("div",{className:"flex items-center gap-1.5",children:e.archived?ee.jsx(hj,{variant:"secondary",className:"text-xs",children:"Archived"}):ee.jsxs(ee.Fragment,{children:[ee.jsx(mN,{status:e.status}),ee.jsx("span",{className:"text-xs text-muted-foreground capitalize",children:e.status}),t&&n.length>0&&ee.jsx("div",{className:"ml-auto",children:ee.jsx(qb,{mode:"wait",children:n.slice(-1).map(e=>ee.jsx(fw.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.25,ease:"easeOut"},children:ee.jsx(hj,{variant:"outline",className:"text-xs font-normal whitespace-nowrap",children:hN(e.phase,e.detail)})},e.id))})})]})})]}),ee.jsxs(fk,{className:"space-y-2",children:[ee.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[ee.jsx(IE,{className:"h-3.5 w-3.5 flex-shrink-0"}),ee.jsx("span",{className:"truncate font-mono",children:e.folderPath}),null!==p&&ee.jsx("span",{className:"flex-shrink-0 ml-auto text-muted-foreground/70",children:(j=p,j>=1073741824?(j/1073741824).toFixed(1)+" GB":j>=1048576?(j/1048576).toFixed(1)+" MB":Math.round(j/1024)+" KB")})]}),ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(hj,{variant:"outline",className:"text-xs font-mono",children:e.cliTool??"claude"}),ee.jsx(hj,{variant:"unlimited"===e.permissionMode?"destructive":"secondary",className:"text-xs",children:"unlimited"===e.permissionMode?"Unlimited":"Limited"}),x&&ee.jsxs(hj,{variant:"outline",className:"text-xs gap-0.5",children:[w?ee.jsx(AE,{className:"h-3 w-3"}):ee.jsx(ZE,{className:"h-3 w-3"}),w?"可见":"可编辑"]}),!x&&e.shares&&e.shares.length>0&&ee.jsxs(hj,{variant:"outline",className:"text-xs gap-0.5",children:[ee.jsx(cj,{className:"h-3 w-3"}),e.shares.length]}),ee.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(e.createdAt).toLocaleDateString()})]}),(e.tags??[]).length>0&&ee.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[(e.tags??[]).slice(0,3).map(e=>ee.jsxs("span",{className:"px-1.5 py-0 rounded-full text-[10px] bg-muted text-muted-foreground border border-border",children:["#",e]},e)),((null==(s=e.tags)?void 0:s.length)??0)>3&&ee.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["+",((null==(l=e.tags)?void 0:l.length)??0)-3]})]})]})]})});var j;const C=t&&!e.archived?ee.jsx("div",{className:"card-active-glow rounded-lg",children:E}):E;return ee.jsxs(ee.Fragment,{children:[C,!x&&i&&ee.jsx(UP,{project:e,open:d,onOpenChange:f,onUpdated:i})]})});function vN({onSelect:e}){const[t,n]=W.useState(""),[r,o]=W.useState(null),[a,i]=W.useState([]),[s,l]=W.useState(!0),[u,c]=W.useState(null),[d,f]=W.useState(!1),[p,h]=W.useState(""),[m,g]=W.useState(null),[v,y]=W.useState(!1),b=W.useRef(null),x=async e=>{l(!0),c(null);try{const t=await LS(e);n(t.path),o(t.parent),i(t.entries)}catch(ST){c(ST instanceof Error?ST.message:"Failed to load directory")}finally{l(!1)}};W.useEffect(()=>{x()},[]),W.useEffect(()=>{d&&setTimeout(()=>{var e;return null==(e=b.current)?void 0:e.focus()},0)},[d]);const w=()=>{f(!1),h(""),g(null)},k=async()=>{const e=p.trim();if(e){y(!0),g(null);try{const{path:n}=await AS(t,e);f(!1),h(""),await x(t),x(n)}catch(ST){g(ST instanceof Error?ST.message:"Failed to create folder")}finally{y(!1)}}},S=t.split("/").filter(Boolean);return ee.jsxs("div",{className:"flex flex-col h-64 border rounded-md overflow-hidden",children:[ee.jsxs("div",{className:"flex items-center gap-1 px-2 py-2 bg-muted border-b flex-shrink-0",children:[ee.jsx(Tk,{variant:"ghost",size:"sm",className:"h-6 px-1 flex-shrink-0",onClick:()=>{x()},title:"Home",children:ee.jsx(WE,{className:"h-3 w-3"})}),ee.jsx("div",{className:"flex items-center gap-1 flex-1 overflow-x-auto min-w-0",children:S.map((e,t)=>ee.jsxs(H.Fragment,{children:[ee.jsx(LE,{className:"h-3 w-3 text-muted-foreground flex-shrink-0"}),ee.jsx("button",{className:"text-xs hover:text-foreground text-muted-foreground whitespace-nowrap",onClick:()=>(e=>{const t="/"+S.slice(0,e+1).join("/");x(t)})(t),children:e})]},t))}),ee.jsxs(Tk,{variant:"ghost",size:"sm",className:"h-6 px-1.5 flex-shrink-0 gap-1 text-xs",onClick:()=>{h(""),g(null),f(!0)},disabled:d||s||!!u,title:"New folder",children:[ee.jsx(zE,{className:"h-3.5 w-3.5"}),ee.jsx("span",{className:"hidden sm:inline",children:"New folder"})]})]}),ee.jsxs("div",{className:"flex-1 overflow-y-auto",children:[s&&ee.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"Loading..."}),u&&ee.jsx("div",{className:"flex items-center justify-center h-full text-sm text-destructive px-4 text-center",children:u}),!s&&!u&&ee.jsxs("div",{className:"p-1",children:[r&&ee.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:()=>{x(r)},children:[ee.jsx(ME,{className:"h-4 w-4 text-muted-foreground"}),ee.jsx("span",{children:".."})]}),d&&ee.jsxs("div",{className:"flex items-center gap-1 px-2 py-1.5",children:[ee.jsx(VE,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}),ee.jsx("input",{ref:b,className:sk("flex-1 text-sm bg-background border rounded px-1.5 py-0.5 outline-none","focus:ring-1 focus:ring-ring",m&&"border-destructive"),placeholder:"Folder name",value:p,onChange:e=>{h(e.target.value),g(null)},onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),k()):"Escape"===e.key&&w()},disabled:v}),ee.jsx("button",{className:"p-1 rounded hover:bg-accent disabled:opacity-50",onClick:()=>{k()},disabled:!p.trim()||v,title:"Create",children:ee.jsx(RE,{className:"h-3.5 w-3.5 text-green-600"})}),ee.jsx("button",{className:"p-1 rounded hover:bg-accent",onClick:w,disabled:v,title:"Cancel",children:ee.jsx(dj,{className:"h-3.5 w-3.5 text-muted-foreground"})})]}),m&&ee.jsx("p",{className:"px-3 pb-1 text-xs text-destructive",children:m}),0===a.length&&!d&&ee.jsx("div",{className:"text-sm text-muted-foreground px-2 py-4 text-center",children:"Empty directory"}),a.map(e=>ee.jsxs("button",{className:sk("flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded text-left","dir"===e.type?"hover:bg-accent hover:text-accent-foreground cursor-pointer":"opacity-40 cursor-not-allowed"),onClick:()=>{"dir"===e.type&&x(e.path)},disabled:"file"===e.type,children:["dir"===e.type?ee.jsx(VE,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}):ee.jsx(OE,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),ee.jsx("span",{className:"truncate",children:e.name})]},e.path))]})]}),ee.jsxs("div",{className:"border-t px-3 py-2 flex items-center justify-between gap-2 flex-shrink-0 bg-background",children:[ee.jsx("span",{className:"text-xs text-muted-foreground truncate flex-1",children:t}),ee.jsx(Tk,{size:"sm",onClick:()=>e(t),disabled:!t,children:"Select this folder"})]})]})}const yN=[{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)"},{value:"gemini",label:"Gemini",desc:"Google Gemini CLI"},{value:"terminal",label:"Terminal",desc:"Plain shell (no AI CLI)"}],bN={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"},gemini:{limited:"gemini",unlimited:"gemini --yolo"},terminal:{limited:"$SHELL (interactive)",unlimited:"$SHELL (interactive)"}};function xN({open:e,onOpenChange:t,onCreated:n}){const[r,o]=W.useState("name"),[a,i]=W.useState(""),[s,l]=W.useState(""),[u,c]=W.useState("claude"),[d,f]=W.useState("limited"),[p,h]=W.useState(!1),[m,g]=W.useState(null),v=e=>{e||(o("name"),i(""),l(""),c("claude"),f("limited"),g(null),h(!1)),t(e)},y=()=>{a.trim()?(g(null),o("folder")):g("Please enter a project name")},b=["name","folder","settings"];return ee.jsx(AP,{open:e,onOpenChange:v,children:ee.jsxs(zP,{className:"sm:max-w-lg",children:[ee.jsxs(FP,{children:[ee.jsx($P,{children:{name:"New Project — Name",folder:"New Project — Select Folder",settings:"New Project — Settings"}[r]}),ee.jsxs(BP,{children:["name"===r&&"Give your project a name.","folder"===r&&"Choose the working directory for this project.","settings"===r&&"Choose the AI coding tool and run mode."]})]}),ee.jsx("div",{className:"flex gap-2 mb-2",children:b.map((e,t)=>ee.jsx("div",{className:"h-1.5 flex-1 rounded-full "+(r===e?"bg-primary":b.indexOf(r)>t?"bg-primary/40":"bg-muted")},e))}),"name"===r&&ee.jsxs("div",{className:"space-y-4",children:[ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ak,{htmlFor:"project-name",children:"Project Name"}),ee.jsx(Mk,{id:"project-name",placeholder:"My Project",value:a,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&y()},autoFocus:!0})]}),m&&ee.jsx("p",{className:"text-sm text-destructive",children:m})]}),"folder"===r&&ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ak,{children:"Working Directory"}),ee.jsx(vN,{onSelect:e=>{l(e),o("settings")}})]}),"settings"===r&&ee.jsxs("div",{className:"space-y-5",children:[ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ak,{children:"AI Coding Tool"}),ee.jsx("div",{className:"grid grid-cols-2 gap-2",children:yN.map(e=>ee.jsxs("label",{className:"flex items-center gap-2.5 cursor-pointer p-3 rounded-md border transition-colors "+(u===e.value?"border-primary bg-primary/5":"hover:bg-accent"),children:[ee.jsx("input",{type:"radio",name:"cliTool",value:e.value,checked:u===e.value,onChange:()=>c(e.value),className:"accent-primary"}),ee.jsxs("div",{children:[ee.jsx("div",{className:"font-medium text-sm",children:e.label}),ee.jsx("div",{className:"text-xs text-muted-foreground",children:e.desc})]})]},e.value))})]}),"terminal"!==u&&ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ak,{children:"Permission Mode"}),ee.jsxs("div",{className:"space-y-2",children:[ee.jsxs("label",{className:"flex items-start gap-3 cursor-pointer p-3 rounded-md border hover:bg-accent transition-colors",children:[ee.jsx("input",{type:"radio",name:"permissionMode",value:"limited",checked:"limited"===d,onChange:()=>f("limited"),className:"mt-0.5"}),ee.jsxs("div",{children:[ee.jsx("div",{className:"font-medium text-sm",children:"Limited"}),ee.jsxs("div",{className:"text-xs text-muted-foreground",children:["Runs ",ee.jsx("code",{className:"bg-muted px-1 rounded",children:bN[u].limited})," — asks for permission before file changes."]})]})]}),ee.jsxs("label",{className:"flex items-start gap-3 cursor-pointer p-3 rounded-md border hover:bg-accent transition-colors",children:[ee.jsx("input",{type:"radio",name:"permissionMode",value:"unlimited",checked:"unlimited"===d,onChange:()=>f("unlimited"),className:"mt-0.5"}),ee.jsxs("div",{children:[ee.jsx("div",{className:"font-medium text-sm",children:"Unlimited"}),ee.jsxs("div",{className:"text-xs text-muted-foreground",children:["Runs ",ee.jsx("code",{className:"bg-muted px-1 rounded",children:bN[u].unlimited})," — acts autonomously."]})]})]})]})]}),ee.jsxs("div",{className:"text-xs text-muted-foreground",children:[ee.jsx("span",{className:"font-medium",children:"Folder:"})," ",ee.jsx("span",{className:"font-mono",children:s})]}),m&&ee.jsx("p",{className:"text-sm text-destructive",children:m})]}),ee.jsxs(VP,{children:["name"!==r&&ee.jsx(Tk,{variant:"outline",onClick:()=>o("settings"===r?"folder":"name"),disabled:p,children:"Back"}),"name"===r&&ee.jsx(Tk,{onClick:y,children:"Next"}),"folder"===r&&ee.jsx(Tk,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),"settings"===r&&ee.jsx(Tk,{onClick:()=>{(async()=>{h(!0),g(null);try{const e=await iS({name:a.trim(),folderPath:s,permissionMode:d,cliTool:u});n(e),v(!1)}catch(ST){g(ST instanceof Error?ST.message:"Failed to create project")}finally{h(!1)}})()},disabled:p,children:p?"Creating...":"Create Project"})]})]})})}function wN({open:e,onOpenChange:t,onOpened:n}){const[r,o]=W.useState(""),[a,i]=W.useState(!1),[s,l]=W.useState(null),u=e=>{e||(o(""),l(null),i(!1)),t(e)};return ee.jsx(AP,{open:e,onOpenChange:u,children:ee.jsxs(zP,{className:"sm:max-w-lg",children:[ee.jsxs(FP,{children:[ee.jsx($P,{children:"Open Existing Project"}),ee.jsxs(BP,{children:["Select a folder that contains a ",ee.jsx("code",{className:"bg-muted px-1 rounded text-xs",children:".ccweb/"})," configuration. The project's history and settings will be restored."]})]}),ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ak,{children:"Project Folder"}),ee.jsx(vN,{onSelect:e=>{(async e=>{o(e),i(!0),l(null);try{const t=await sS(e);n(t),u(!1)}catch(ST){l(ST instanceof Error?ST.message:"Failed to open project"),i(!1)}})(e)}})]}),s&&ee.jsx("p",{className:"text-sm text-destructive",children:s}),r&&!s&&a&&ee.jsxs("p",{className:"text-sm text-muted-foreground",children:["Opening project from ",r,"..."]}),ee.jsx(VP,{children:ee.jsx(Tk,{variant:"outline",onClick:()=>u(!1),disabled:a,children:"Cancel"})})]})})}const kN=`${"https:"===window.location.protocol?"wss:":"ws:"}//${window.location.host}`,SN=3e3;function EN(e,t){const n=W.useRef(null),r=W.useRef(0),o=W.useRef(!0),a=W.useRef(!1),i=W.useRef(null),s=W.useRef(t);s.current=t;const[l,u]=W.useState(!1),[c,d]=W.useState(0),f=W.useRef(!1),p=W.useRef([]),h=W.useCallback(e=>{var t;(null==(t=n.current)?void 0:t.readyState)===WebSocket.OPEN&&n.current.send(JSON.stringify(e))},[]),m=W.useCallback(()=>{var e;if((null==(e=n.current)?void 0:e.readyState)===WebSocket.OPEN)for(;p.current.length>0;){const e=p.current.shift();n.current.send(JSON.stringify({type:"terminal_input",data:e}))}},[]),g=W.useCallback((e,t)=>{var r;(null==(r=n.current)?void 0:r.readyState)===WebSocket.OPEN?(n.current.send(JSON.stringify({type:"terminal_subscribe",cols:e,rows:t})),f.current=!1):f.current=!0},[]),v=W.useCallback(e=>{var t;(null==(t=n.current)?void 0:t.readyState)===WebSocket.OPEN?n.current.send(JSON.stringify({type:"terminal_input",data:e})):p.current.push(e)},[]),y=W.useCallback((e,t)=>{h({type:"terminal_resize",cols:e,rows:t})},[h]),b=W.useCallback(()=>{h({type:"chat_subscribe",replay:50})},[h]),x=W.useCallback(()=>{if(!o.current)return;if(a.current)return;const t=Xk();if(!t)return void(window.location.href="/login");a.current=!0;const l=new WebSocket(`${kN}/ws/projects/${e}`);n.current=l,l.onopen=()=>{a.current=!1,r.current=0,l.send(JSON.stringify({type:"auth",token:t}))},l.onmessage=e=>{var t,n,r,o,a,i,l,c,p,h,g,v,y,b,x,w,k,S;let E;try{E=JSON.parse(e.data)}catch{return}switch(E.type){case"connected":f.current=!1,u(!0),d(e=>e+1),m(),null==(n=(t=s.current).onConnected)||n.call(t);break;case"terminal_data":null==(o=(r=s.current).onTerminalData)||o.call(r,E.data);break;case"status":null==(i=(a=s.current).onStatus)||i.call(a,E.status);break;case"chat_message":{const e=E;null==(c=(l=s.current).onChatMessage)||c.call(l,e);break}case"project_stopped":{const e=E;null==(h=(p=s.current).onProjectStopped)||h.call(p,e.projectId,e.projectName);break}case"context_update":null==(v=(g=s.current).onContextUpdate)||v.call(g,E);break;case"semantic_update":null==(b=(y=s.current).onSemanticUpdate)||b.call(y,E);break;case"approval_request":null==(w=(x=s.current).onApprovalRequest)||w.call(x,E);break;case"approval_resolved":null==(S=(k=s.current).onApprovalResolved)||S.call(k,E);break;case"error":console.error("[WS] Server error:",E.message)}},l.onclose=()=>{var e,t;a.current=!1,n.current===l&&(n.current=null),u(!1),null==(t=(e=s.current).onDisconnected)||t.call(e),o.current&&r.current<5&&(r.current++,i.current=window.setTimeout(x,SN))},l.onerror=e=>{a.current=!1,console.error("[WS] WebSocket error:",e)}},[e]);return W.useEffect(()=>(o.current=!0,x(),()=>{var e;o.current=!1,i.current&&(clearTimeout(i.current),i.current=null),null==(e=n.current)||e.close(),n.current=null,p.current=[]}),[x]),{subscribeTerminal:g,sendTerminalInput:v,sendTerminalResize:y,subscribeChatMessages:b,connected:l,readyTick:c}}function jN(e){const t=W.useRef(null),n=W.useRef(0),r=W.useRef(!0),o=W.useRef(!1),a=W.useRef(null),i=W.useRef(e);i.current=e;const s=W.useCallback(()=>{if(!r.current)return;if(o.current)return;const e=Xk();if(!e)return;o.current=!0;const l=new WebSocket(`${kN}/ws/dashboard`);t.current=l,l.onopen=()=>{o.current=!1,n.current=0,l.send(JSON.stringify({type:"auth",token:e}))},l.onmessage=e=>{var t,n;try{const r=JSON.parse(e.data);"activity_update"===r.type?i.current.onActivityUpdate(r):"project_stopped"===r.type&&(null==(n=(t=i.current).onProjectStopped)||n.call(t,r.projectId,r.projectName))}catch{}},l.onclose=()=>{o.current=!1,t.current===l&&(t.current=null),r.current&&n.current<5&&(n.current++,a.current=window.setTimeout(s,SN))},l.onerror=e=>{o.current=!1,console.error("[DashboardWS] Error:",e)}},[]);W.useEffect(()=>(r.current=!0,s(),()=>{var e;r.current=!1,a.current&&(clearTimeout(a.current),a.current=null),null==(e=t.current)||e.close(),t.current=null}),[s])}function CN({projectId:e,enabled:t,onChatMessage:n,onStatusChange:r,onContextUpdate:o,onApprovalRequest:a,onApprovalResolved:i}){const s=W.useRef(null),l=W.useRef(!0),u=W.useRef(0),c=W.useRef(null),d=W.useRef(!1),f=W.useRef(!1),p=W.useRef([]),h=W.useRef({onChatMessage:n,onStatusChange:r,onContextUpdate:o,onApprovalRequest:a,onApprovalResolved:i});h.current={onChatMessage:n,onStatusChange:r,onContextUpdate:o,onApprovalRequest:a,onApprovalResolved:i};const[m,g]=W.useState(!1),[v,y]=W.useState(0),b=W.useCallback(()=>{if(f.current&&s.current&&s.current.readyState===WebSocket.OPEN)for(;p.current.length>0;){const e=p.current.shift();s.current.send(JSON.stringify({type:"terminal_input",data:e}))}},[]),x=W.useCallback(e=>{var t;f.current&&(null==(t=s.current)?void 0:t.readyState)===WebSocket.OPEN?s.current.send(JSON.stringify({type:"terminal_input",data:e})):p.current.push(e)},[]),w=W.useCallback(()=>{if(!l.current||!t)return;if(d.current)return;const n=Xk();if(!n)return;d.current=!0,f.current=!1;const r=new WebSocket(`${kN}/ws/projects/${e}`);s.current=r,r.onopen=()=>{d.current=!1,u.current=0,r.send(JSON.stringify({type:"auth",token:n}))},r.onmessage=e=>{var t,n,o,a,i,s,l,u,c,d;try{const p=JSON.parse(e.data);"connected"===p.type?(r.send(JSON.stringify({type:"chat_subscribe",replay:50})),f.current=!0,g(!0),y(e=>e+1),b()):"chat_message"===p.type?h.current.onChatMessage(p):"status"===p.type&&p.status?null==(n=(t=h.current).onStatusChange)||n.call(t,p.status):"project_stopped"===p.type?null==(a=(o=h.current).onStatusChange)||a.call(o,"stopped"):"context_update"===p.type?null==(s=(i=h.current).onContextUpdate)||s.call(i,p):"approval_request"===p.type?null==(u=(l=h.current).onApprovalRequest)||u.call(l,p):"approval_resolved"===p.type&&(null==(d=(c=h.current).onApprovalResolved)||d.call(c,p))}catch{}},r.onclose=()=>{if(d.current=!1,f.current=!1,g(!1),s.current===r&&(s.current=null),l.current&&t)if(u.current<5){u.current++;const e=2e3*Math.random();c.current=window.setTimeout(w,SN+e)}else p.current.length>0&&(console.warn("[MonitorWS] Retries exhausted, dropping",p.current.length,"queued messages"),p.current=[])},r.onerror=()=>{d.current=!1}},[e,t,b]);return W.useEffect(()=>(l.current=!0,()=>{l.current=!1,p.current=[]}),[]),W.useEffect(()=>(u.current=0,w(),()=>{var e;f.current=!1,c.current&&(clearTimeout(c.current),c.current=null),null==(e=s.current)||e.close(),s.current=null}),[w,t]),{sendInput:x,connected:m,readyTick:v}}const PN="cc_project_order_cache";function NN(){try{const e=localStorage.getItem(PN);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)&&t.every(e=>"string"==typeof e)?t:[]}catch{return[]}}function TN(e){try{localStorage.setItem(PN,JSON.stringify(e))}catch{}}function MN(){const[e,t]=W.useState(NN),n=W.useRef(!1),r=W.useRef(null),o=W.useRef(null),a=W.useRef(!1),i=W.useRef(!0);W.useEffect(()=>{i.current=!0;let e=!1;return nS().then(r=>{e||n.current||(t(e=>function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(e,r)?e:r),TN(r))}).catch(()=>{}),()=>{e=!0,i.current=!1,o.current&&(clearTimeout(o.current),o.current=null)}},[]);const s=W.useCallback(async()=>{for(;r.current;){const e=r.current;r.current=null,a.current=!0;try{await rS(e)}catch{}a.current=!1}},[]),l=W.useCallback(e=>{n.current=!0,t(e),TN(e),r.current=e,o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,i.current&&(a.current||s())},400)},[s]),u=W.useCallback(t=>{const n=new Map(e.map((e,t)=>[e,t]));return[...t].sort((e,t)=>{const r=n.get(e.id)??1/0,o=n.get(t.id)??1/0;return r===o?0:r-o})},[e]);return W.useMemo(()=>({order:e,setOrder:l,applyOrder:u}),[e,l,u])}const RN=18e6,LN=6048e5;function DN(e,t=18e6){if(!e||void 0===e.utilization||e.utilization<=0||!e.resetAt)return null;const n=new Date(e.resetAt).getTime()-Date.now();if(n<=0)return null;const r=t-n;return r<=0?null:Math.round(e.utilization/(r/t))}function _N({label:e,bucket:t}){if(!t||void 0===t.utilization)return null;const n=t.utilization,r=n<50?"text-green-400":n<80?"text-yellow-400":"text-red-400",o=function(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`}(t.resetAt);return ee.jsxs("span",{className:"text-muted-foreground whitespace-nowrap",children:[e," ",ee.jsxs("span",{className:sk("font-medium",r),children:[n,"%"]}),o&&ee.jsxs("span",{className:"text-muted-foreground/70 ml-0.5",children:["(",o,")"]})]})}function AN({className:e}){const[t,n]=W.useState("loading"),[r,o]=W.useState(!1),a=()=>$k(Vk.usageMonitorTool,"claude");W.useEffect(()=>{const e=async()=>{try{n(await MS(a()))}catch{n(null)}};e();const t=setInterval(()=>{e()},3e5),r=()=>{e()},o=t=>{t.key===Vk.usageMonitorTool&&e()};return window.addEventListener("ccweb:usage-tool-change",r),window.addEventListener("storage",o),()=>{clearInterval(t),window.removeEventListener("ccweb:usage-tool-change",r),window.removeEventListener("storage",o)}},[]);if("loading"===t)return null;if(!t)return null;const i=!!t.fiveHour,s=!!t.sevenDay,l=!!t.sevenDaySonnet,u=!!t.sevenDayOpus,c=i||s||l||u,d=DN(t.fiveHour,RN),f=DN(t.sevenDay,LN),p=DN(t.sevenDaySonnet,LN),h=null!==d||null!==f||null!==p;return ee.jsxs("div",{className:sk("flex items-center gap-1.5 text-xs",e),children:[h&&ee.jsxs("span",{className:"flex items-center gap-1",children:[null!==d&&ee.jsxs("span",{className:sk("font-medium",d<=100?"text-green-400":"text-orange-400"),title:`5h 配速:按当前速率,窗口结束时预计使用 ${d}%`,children:[d,"%"]}),null!==f&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/40",children:"/"}),ee.jsxs("span",{className:sk("font-medium",f<=100?"text-green-400":"text-orange-400"),title:`7d 配速:按当前速率,窗口结束时预计使用 ${f}%`,children:[f,"%"]})]}),null!==p&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/40",children:"/"}),ee.jsxs("span",{className:sk("font-medium",p<=100?"text-green-400":"text-orange-400"),title:`7d Sonnet 配速:按当前速率,窗口结束时预计使用 ${p}%`,children:[p,"%"]})]})]}),t.planName&&ee.jsx("span",{className:"font-medium text-foreground bg-muted border border-border px-2 py-0.5 rounded-full",children:t.planName}),c&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/50",children:"|"}),ee.jsx(_N,{label:"5h",bucket:t.fiveHour}),s&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/50",children:"·"}),ee.jsx(_N,{label:"7d",bucket:t.sevenDay})]}),l&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/50",children:"·"}),ee.jsx(_N,{label:"7d Sonnet",bucket:t.sevenDaySonnet})]}),u&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/50",children:"·"}),ee.jsx(_N,{label:"7d Opus",bucket:t.sevenDayOpus})]})]}),ee.jsx("button",{onClick:()=>{(async()=>{o(!0);try{n(await RS(a()))}catch{n(null)}finally{o(!1)}})()},className:"text-muted-foreground hover:text-foreground transition-colors",title:"刷新用量信息",children:ee.jsx(tj,{className:sk("h-3 w-3",r&&"animate-spin")})})]})}const ON="zbc0315",IN="ccweb-hub";function zN({open:e,onOpenChange:t,kind:n,label:r,content:o}){const[a,i]=W.useState(()=>$k(Vk.skillhubAuthor,"")),[s,l]=W.useState(""),[u,c]=W.useState("");W.useEffect(()=>{e&&(i($k(Vk.skillhubAuthor,"")),l(""),c(""))},[e]);const d=()=>{const e=u.split(",").map(e=>e.trim()).filter(Boolean),t=a.trim()||"anonymous",i=(l=`[${"quick-prompt"===n?"Quick Prompt":"Agent Prompt"}] ${r}`,c=200,Array.from(l).slice(0,c).join(""));var l,c;const d=(e=>{let t=0;const n=e.match(/`+/g);if(n)for(const r of n)t=Math.max(t,r.length);return"`".repeat(Math.max(3,t+1))})(o),f=`\x3c!-- Submitted via ccweb. Review, then commit to ${n}s/ as a .md file. --\x3e\n\n\`\`\`yaml\n---\nlabel: ${JSON.stringify(r)}\nkind: ${JSON.stringify(n)}\nauthor: ${JSON.stringify(t)}\n`+(e.length?`tags: ${JSON.stringify(e)}\n`:"")+(s.trim()?`description: ${JSON.stringify(s.trim())}\n`:"")+`---\n\`\`\`\n\n## Body\n\n${d}\n`+o+`\n${d}\n`,p=new URLSearchParams({title:i,body:f,labels:[n].join(",")});return`https://github.com/${ON}/${IN}/issues/new?${p.toString()}`},f="quick-prompt"===n?"快捷 Prompt":"Agent Prompt";return ee.jsx(AP,{open:e,onOpenChange:t,children:ee.jsxs(zP,{className:sk("sm:max-w-lg"),children:[ee.jsxs(FP,{children:[ee.jsx($P,{children:"共享到 ccweb-hub"}),ee.jsxs(BP,{children:["「",r,"」将以 GitHub Issue 的形式提交到 ",ee.jsxs("code",{children:[ON,"/",IN]}),"。 点击「打开 Issue 页」会新开 GitHub 标签页,你在自己的 GitHub 账号下提交。 ccweb 本身不处理任何 Token。"]})]}),ee.jsxs("div",{className:"space-y-3 py-2",children:[ee.jsxs("div",{className:"space-y-1.5",children:[ee.jsx(Ak,{htmlFor:"share-author",className:"text-xs",children:"GitHub 用户名(可选)"}),ee.jsx(Mk,{id:"share-author",placeholder:"zbc0315",value:a,onChange:e=>i(e.target.value)})]}),ee.jsxs("div",{className:"space-y-1.5",children:[ee.jsx(Ak,{htmlFor:"share-desc",className:"text-xs",children:"一句话描述(可选)"}),ee.jsx(Mk,{id:"share-desc",placeholder:"quick-prompt"===n?"这个命令用来...":"这段 prompt 让 Claude...",value:s,onChange:e=>l(e.target.value)})]}),ee.jsxs("div",{className:"space-y-1.5",children:[ee.jsx(Ak,{htmlFor:"share-tags",className:"text-xs",children:"标签(逗号分隔,可选)"}),ee.jsx(Mk,{id:"share-tags",placeholder:"review, 中文, 代码",value:u,onChange:e=>c(e.target.value)})]})]}),ee.jsxs("div",{className:"rounded-md border bg-muted/30 px-3 py-2 text-xs text-muted-foreground",children:[ee.jsxs("div",{className:"font-medium text-foreground mb-1",children:["预览:",f," · ",r]}),ee.jsxs("pre",{className:"whitespace-pre-wrap font-mono text-[11px] leading-snug max-h-32 overflow-y-auto",children:[Array.from(o).slice(0,500).join(""),Array.from(o).length>500&&"…"]})]}),ee.jsxs(VP,{children:[ee.jsx(Tk,{variant:"outline",onClick:()=>t(!1),children:"取消"}),ee.jsxs(Tk,{onClick:()=>{Bk(Vk.skillhubAuthor,a);const e=d();window.open(e,"_blank","noopener,noreferrer"),t(!1)},children:[ee.jsx(_E,{className:"h-3.5 w-3.5 mr-1.5"}),"打开 Issue 页提交"]})]})]})})}function FN(){const[e,t]=W.useState([]),[n,r]=W.useState(!1),[o,a]=W.useState(""),[i,s]=W.useState(""),[l,u]=W.useState(""),[c,d]=W.useState(null),[f,p]=W.useState(""),[h,m]=W.useState(""),[g,v]=W.useState(""),y=W.useRef(null),b=W.useRef(null),[x,w]=W.useState(null);W.useEffect(()=>{fS().then(t).catch(()=>t([]))},[]),W.useEffect(()=>{n&&setTimeout(()=>{var e;return null==(e=y.current)?void 0:e.focus()},0)},[n]),W.useEffect(()=>{c&&setTimeout(()=>{var e;return null==(e=b.current)?void 0:e.focus()},0)},[c]);const k=async()=>{const e=i.trim();if(e)try{const n=await pS({label:o.trim()||e,command:e,...l?{parentId:l}:{}});t(e=>[...e,n]),a(""),s(""),u(""),r(!1)}catch(ST){console.error("[GlobalShortcuts] Failed to add:",ST)}},S=async()=>{const e=h.trim();if(e&&c)try{const n=await hS(c,{label:f.trim()||e,command:e,parentId:g||null});t(e=>e.map(e=>e.id===c?n:e)),d(null)}catch(ST){console.error("[GlobalShortcuts] Failed to save:",ST)}};return ee.jsxs("section",{className:"mt-10",children:[ee.jsxs("div",{className:"flex items-center justify-between mb-4",children:[ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(fj,{className:"h-4 w-4 text-muted-foreground"}),ee.jsx("h2",{className:"text-lg font-semibold",children:"全局快捷 Prompts"}),ee.jsx("span",{className:"text-xs text-muted-foreground",children:"在所有项目的终端中可用"})]}),ee.jsxs("button",{onClick:()=>{r(e=>!e),d(null)},className:sk("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:[ee.jsx(ej,{className:"h-3.5 w-3.5"}),"新建"]})]}),n&&ee.jsxs("div",{className:"mb-4 p-4 rounded-lg border border-border bg-background space-y-3",children:[ee.jsx("input",{ref:y,placeholder:"名称(可选)",value:o,onChange:e=>a(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"}),ee.jsx("textarea",{placeholder:"命令内容…",value:i,onChange:e=>s(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=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),k()),"Escape"===e.key&&(r(!1),a(""),s(""),u(""))}}),ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx($E,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),ee.jsxs("select",{value:l,onChange:e=>u(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:[ee.jsx("option",{value:"",children:"无继承"}),e.map(e=>ee.jsx("option",{value:e.id,children:e.label},e.id))]})]}),ee.jsxs("div",{className:"flex items-center justify-between",children:[ee.jsx("span",{className:"text-xs text-muted-foreground",children:"⌘↩ 保存 · Esc 取消"}),ee.jsxs("div",{className:"flex gap-2",children:[ee.jsx("button",{onClick:()=>{r(!1),a(""),s("")},className:"text-sm px-3 py-1 rounded bg-secondary hover:bg-accent text-foreground transition-colors",children:"取消"}),ee.jsx("button",{onClick:()=>{k()},disabled:!i.trim(),className:sk("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:"保存"})]})]})]}),0!==e.length||n?ee.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:e.map(n=>c===n.id?ee.jsxs("div",{className:"rounded-lg border border-border bg-background p-3 space-y-2",children:[ee.jsx("input",{ref:b,value:f,onChange:e=>p(e.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"}),ee.jsx("textarea",{value:h,onChange:e=>m(e.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:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),S()),"Escape"===e.key&&d(null)}}),ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx($E,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),ee.jsxs("select",{value:g,onChange:e=>v(e.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:[ee.jsx("option",{value:"",children:"无继承"}),e.filter(e=>e.id!==n.id).map(e=>ee.jsx("option",{value:e.id,children:e.label},e.id))]})]}),ee.jsxs("div",{className:"flex gap-2 justify-end",children:[ee.jsx("button",{onClick:()=>d(null),className:"text-xs px-2.5 py-1 rounded bg-secondary hover:bg-accent text-foreground transition-colors",children:"取消"}),ee.jsx("button",{onClick:()=>{S()},disabled:!h.trim(),className:sk("text-xs px-2.5 py-1 rounded transition-colors text-white",h.trim()?"bg-blue-600 hover:bg-blue-500":"bg-secondary opacity-40 cursor-not-allowed"),children:"保存"})]})]},n.id):ee.jsxs("div",{className:"group relative rounded-lg border border-border bg-background hover:border-muted-foreground/30 transition-colors p-3",children:[ee.jsx("div",{className:"text-sm font-medium text-foreground truncate pr-14",children:n.label}),n.parentId&&(()=>{const t=e.find(e=>e.id===n.parentId);return t?ee.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[ee.jsx($E,{className:"h-3 w-3 text-muted-foreground"}),ee.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["继承: ",t.label]})]}):null})(),!n.parentId&&n.label!==n.command&&ee.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate mt-1 pr-14",children:n.command}),ee.jsxs("div",{className:"absolute top-2.5 right-2.5 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[ee.jsx("button",{onClick:()=>w({label:n.label,content:n.command}),className:"p-1 rounded text-muted-foreground hover:text-green-400 transition-colors",title:"共享到 ccweb-hub",children:ee.jsx(rj,{className:"h-3.5 w-3.5"})}),ee.jsx("button",{onClick:()=>{d(n.id),p(n.label),m(n.command),v(n.parentId||""),r(!1)},className:"p-1 rounded text-muted-foreground hover:text-blue-400 transition-colors",title:"编辑",children:ee.jsx(ZE,{className:"h-3.5 w-3.5"})}),ee.jsx("button",{onClick:()=>{(async e=>{try{await mS(e),t(t=>t.filter(t=>t.id!==e)),c===e&&d(null)}catch(ST){console.error("[GlobalShortcuts] Failed to delete:",ST)}})(n.id)},className:"p-1 rounded text-muted-foreground hover:text-red-400 transition-colors",title:"删除",children:ee.jsx(dj,{className:"h-3.5 w-3.5"})})]})]},n.id))}):ee.jsxs("div",{className:"flex flex-col items-center gap-2 py-10 text-muted-foreground/50 border border-dashed border-border rounded-lg",children:[ee.jsx(fj,{className:"h-6 w-6"}),ee.jsx("p",{className:"text-sm",children:"还没有全局快捷 Prompts"})]}),ee.jsx(zN,{open:!!x,onOpenChange:e=>{e||w(null)},kind:"quick-prompt",label:(null==x?void 0:x.label)??"",content:(null==x?void 0:x.content)??""})]})}const VN=W.createContext({theme:"system",resolved:"dark",setTheme:()=>{}});function $N(){return W.useSyncExternalStore(e=>{const t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")}function BN({children:e}){const[t,n]=W.useState(()=>$k(Vk.theme,"system")),r=$N(),o="system"===t?r:t;W.useEffect(()=>{const e=document.documentElement;e.classList.remove("light","dark"),e.classList.add(o)},[o]);return ee.jsx(VN.Provider,{value:{theme:t,resolved:o,setTheme:e=>{n(e),Bk(Vk.theme,e)}},children:e})}function UN(){return W.useContext(VN)}function WN(){const{theme:e,setTheme:t}=UN(),n=[{value:"light",icon:ij,label:"浅色"},{value:"dark",icon:JE,label:"深色"},{value:"system",icon:QE,label:"系统"}];return ee.jsx("div",{className:"flex items-center rounded-md border border-border bg-muted/50 p-0.5",children:n.map(({value:n,icon:r,label:o})=>ee.jsx("button",{onClick:()=>t(n),className:sk("p-1 rounded-sm transition-colors",e===n?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:o,children:ee.jsx(r,{className:"h-3.5 w-3.5"})},n))})}const HN={workMinutes:30,breakMinutes:5};function GN(){return $k(Vk.pomodoroConfig,HN,!0)}const YN=Fk(e=>({running:!1,phase:"work",secondsLeft:60*GN().workMinutes,setRunning:t=>e({running:t}),setPhase:t=>e({phase:t}),setSecondsLeft:t=>e({secondsLeft:t})}));function qN(){const{running:e,phase:t,secondsLeft:n,setPhase:r,setSecondsLeft:o}=YN(),a=W.useCallback(e=>{const t=GN();var n;r(e),o("work"===e?60*t.workMinutes:60*t.breakMinutes),n="break"===e?"休息一下 ☕":"该工作了 💻",tN.info(`番茄钟: ${n}`)},[r,o]);return W.useEffect(()=>{if(!e)return;if(0===n)return void a("work"===t?"break":"work");const r=setTimeout(()=>o(n-1),1e3);return()=>clearTimeout(r)},[e,n,t,a,o]),null}function KN(){const{running:e,phase:t,secondsLeft:n}=YN(),r=Math.floor(n/60),o=n%60,a=`${String(r).padStart(2,"0")}:${String(o).padStart(2,"0")}`;return e?ld.createPortal(ee.jsxs("div",{className:"fixed inset-0 flex flex-col items-center justify-center pointer-events-none z-40 select-none",style:{opacity:"work"===t?.1:.6},children:[ee.jsx("div",{className:sk("font-mono font-bold tabular-nums leading-none","work"===t?"text-foreground":"text-blue-400 dark:text-blue-300"),style:{fontSize:"clamp(360px, 90vw, 1100px)"},children:a}),ee.jsx("div",{className:"mt-3 text-muted-foreground font-medium tracking-widest uppercase",style:{fontSize:"clamp(12px, 1.5vw, 20px)"},children:"work"===t?"专注工作":"休息一下"})]}),document.body):null}function XN(){const{running:e,phase:t,secondsLeft:n,setRunning:r,setPhase:o,setSecondsLeft:a}=YN(),i=Math.floor(n/60),s=n%60,l=`${String(i).padStart(2,"0")}:${String(s).padStart(2,"0")}`;return ee.jsx("button",{onClick:()=>{if(e){const e=GN();o("work"),a(60*e.workMinutes)}else{const e=GN();o("work"),a(60*e.workMinutes)}r(!e)},className:sk("p-1 rounded transition-colors",e?"work"===t?"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?"work"===t?`工作中 ${l} — 点击停止`:`休息中 ${l} — 点击停止`:"启动番茄钟",children:ee.jsx(lj,{className:"h-4 w-4"})})}const QN="v2026.4.19-u",JN=!!window.electronUpdater;function ZN(){const[e,t]=W.useState("idle"),[n,r]=W.useState(!1),[o,a]=W.useState(""),[i,s]=W.useState(0),[l,u]=W.useState(null),[c,d]=W.useState(null);W.useEffect(()=>{if(!window.electronUpdater)return;return window.electronUpdater.onUpdateStatus(e=>{switch(e.type){case"progress":{const t=e.info;s(Math.round((null==t?void 0:t.percent)??0));break}case"downloaded":t("downloaded");break;case"error":u(e.info||"Download failed"),t("error")}})},[]);const f=W.useCallback(async()=>{t("checking"),u(null),r(!0);try{if(JN){const e=await window.electronUpdater.checkForUpdate();if(e.error)throw new Error(e.error);if(!e.available)return void t("no_update");a(e.version?`v${e.version}`:"new version")}else{const e=await FS();if(!e.updateAvailable)return void t("no_update");a(`v${e.latest}`)}t("update_available")}catch(ST){u(ST instanceof Error?ST.message:"Check failed"),t("error")}},[]),p=W.useCallback(()=>{const e=3e3,n=Date.now(),r=()=>{if(Date.now()-n>3e5)return u("更新超时(5 分钟)— 请检查服务器状态"),void t("update_failed");$S().then(n=>{n?n.success?(a(n.newVersion?`v${n.newVersion}`:"new version"),t("update_complete")):(u(n.error||"Update failed"),t("update_failed")):setTimeout(r,e)}).catch(()=>{setTimeout(r,e)})};setTimeout(r,e)},[]),h=()=>{r(!1),setTimeout(()=>{t("idle"),a(""),u(null),s(0),d(null)},200)};return ee.jsxs(ee.Fragment,{children:[ee.jsx(Tk,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{f()},disabled:"checking"===e||"downloading"===e||"executing"===e||"reconnecting"===e,title:"检查更新",children:"checking"===e||"downloading"===e||"executing"===e||"reconnecting"===e?ee.jsx(GE,{className:"h-4 w-4 animate-spin"}):ee.jsx(DE,{className:"h-4 w-4"})}),ee.jsx(AP,{open:n,onOpenChange:e=>{e||h()},children:ee.jsxs(zP,{className:"sm:max-w-md",children:[ee.jsxs(FP,{children:[ee.jsxs($P,{children:["checking"===e&&"Checking for updates...","no_update"===e&&"Up to date","update_available"===e&&`Update ${o} available`,"downloading"===e&&"Downloading update...","downloaded"===e&&"Update ready to install","executing"===e&&"Updating server...","reconnecting"===e&&"Waiting for server restart...","update_complete"===e&&`Updated to ${o}`,"update_failed"===e&&"Update failed","error"===e&&"Update error"]}),ee.jsxs(BP,{children:["checking"===e&&"Checking for the latest version...","no_update"===e&&`Current version ${QN} is the latest.`,"update_available"===e&&"A new version is available. "+(JN?"Click download to update automatically.":""),"downloading"===e&&`Downloading... ${i}%`,"downloaded"===e&&"The update has been downloaded. Click install to restart and apply.","executing"===e&&"Server is shutting down and installing the update. Please wait...","reconnecting"===e&&"Update installed. Waiting for server to restart...","update_complete"===e&&`Successfully updated from ${QN} to ${o}. Click reload to use the new version.`,"update_failed"===e&&(l||"Update failed. You may need to restart the server manually."),"error"===e&&(l||"An error occurred.")]})]}),"downloading"===e&&ee.jsx("div",{className:"w-full bg-muted rounded-full h-2 overflow-hidden",children:ee.jsx("div",{className:"bg-primary h-full transition-all duration-300",style:{width:`${i}%`}})}),("executing"===e||"reconnecting"===e)&&ee.jsx("div",{className:"flex items-center justify-center py-6",children:ee.jsx(GE,{className:"h-8 w-8 animate-spin text-muted-foreground"})}),ee.jsxs(VP,{children:["no_update"===e&&ee.jsx(Tk,{onClick:h,children:"OK"}),"update_available"===e&&ee.jsxs(ee.Fragment,{children:[ee.jsx(Tk,{variant:"outline",onClick:h,children:"Later"}),ee.jsx(Tk,{onClick:()=>{(async()=>{if(JN){t("downloading"),s(0);const e=await window.electronUpdater.downloadUpdate();e.success?e.path&&d(e.path):(u(e.error||"Download failed"),t("error"))}else{t("executing");try{await VS(),t("reconnecting"),p()}catch(ST){u(ST instanceof Error?ST.message:"Execute failed"),t("error")}}})()},children:JN?"Download & Install":`Update to ${o}`})]}),"downloaded"===e&&ee.jsxs(ee.Fragment,{children:[ee.jsx(Tk,{variant:"outline",onClick:h,children:"Later"}),ee.jsx(Tk,{onClick:()=>{var e;null==(e=window.electronUpdater)||e.quitAndInstall(c||void 0)},children:"Restart & Install"})]}),"update_complete"===e&&ee.jsx(Tk,{onClick:()=>window.location.reload(),children:"Reload Page"}),"update_failed"===e&&ee.jsx(Tk,{onClick:h,children:"Close"}),"error"===e&&ee.jsx(Tk,{onClick:h,children:"Close"})]})]})})]})}function eT(e){return e.map(e=>"text"===e.type?e.content:`\n\`\`\`${e.type}\n${e.content}\n\`\`\`\n`).join("")}function tT(e,t){return{id:e.id??t(),role:e.role,content:eT(e.blocks),blocks:e.blocks,ts:e.timestamp}}function nT({project:e,liveMessages:t,ws:n,historyLimit:r=20,liveWindow:o=50,historyEnabled:a=!0}){const i=e.id,[s,l]=W.useState("running"===e.status?"live":"stopped"),{history:u,hasMore:c,reload:d,loadMore:f}=function({projectId:e,historyLimit:t=20,enabled:n=!0}){const[r,o]=W.useState([]),[a,i]=W.useState(!1),[s,l]=W.useState(!1),u=W.useRef(0),c=W.useCallback(()=>"h"+ ++u.current,[]),d=W.useRef({projectId:e,enabled:n});d.current={projectId:e,enabled:n};const f=W.useCallback(async()=>{if(!d.current.enabled)return;const e=d.current.projectId;l(!0);try{const n=await sE(e,{limit:t});if(d.current.projectId!==e)return;const r=[];for(const e of n.blocks){const t=tT(e,c);t.content.trim()&&r.push(t)}o(r),i(n.hasMore)}catch{}finally{l(!1)}},[t,c]),p=W.useCallback(async()=>{if(!a||s||0===r.length)return;if(!d.current.enabled)return;const e=d.current.projectId,n=r[0];if(n.id&&!n.id.startsWith("h")){l(!0);try{const r=await sE(e,{limit:t,before:n.id});if(d.current.projectId!==e)return;const a=[];for(const e of r.blocks){const t=tT(e,c);t.content.trim()&&a.push(t)}o(e=>[...a,...e]),i(r.hasMore)}catch{}finally{l(!1)}}},[t,a,s,r,c]);return W.useEffect(()=>{n&&f()},[e,n]),{history:r,hasMore:a,isLoading:s,reload:f,loadMore:p}}({projectId:i,historyLimit:r,enabled:a}),[p,h]=W.useState([]),m=W.useRef(0),g=W.useCallback(()=>"m"+ ++m.current,[]),v=W.useRef(null),y=W.useCallback(()=>{v.current&&(clearTimeout(v.current.timer),v.current=null)},[]),b=W.useRef([]),x=W.useRef(!1),w=W.useRef(0);W.useEffect(()=>{if(t.length<w.current&&(w.current=0,b.current=[]),t.length<=w.current)return;const e=t.slice(w.current);w.current=t.length;for(const t of e){x.current=!0;const e=eT(t.blocks);if(e.trim()){if("user"===t.role){const t=b.current.indexOf(e.trim());if(-1!==t){b.current.splice(t,1),y();continue}}h(n=>{if(t.id&&n.some(e=>e.id===t.id))return n;const r={id:t.id??g(),role:t.role,content:e,blocks:t.blocks,ts:t.timestamp};return[...n,r].slice(-o)})}}},[t,g,o,y]),W.useEffect(()=>{if("live"!==s)return void(x.current=!1);const e=setTimeout(()=>{x.current||d()},3e3);return()=>clearTimeout(e)},[s,d]),W.useEffect(()=>{"running"!==e.status||"stopped"!==s&&"error"!==s?"stopped"===e.status&&"live"===s&&l("stopped"):(h([]),l("live"))},[e.status]);const k=W.useRef([]),S=W.useRef(null),E=W.useRef(0),j=W.useCallback(()=>{if(v.current)return;const e=t=>{const r=setTimeout(()=>{if(0!==b.current.length){if(t>=20)return b.current=[],void(v.current=null);n.send("\r"),e(t+1)}else v.current=null},3e3);v.current={timer:r,attempts:t}};e(0)},[n]);W.useEffect(()=>{if(!n.connected)return;if("live"!==s)return;if(0===k.current.length)return;const e=[...k.current];k.current=[];for(const t of e)n.send(t.replace(/\n/g,"\r")+"\r");j()},[n.connected,s,n,j]),W.useEffect(()=>()=>{S.current&&clearTimeout(S.current),y()},[y]);const C=W.useCallback(e=>{k.current.length>=20&&k.current.shift(),k.current.push(e)},[]),P=W.useCallback(e=>{if(b.current.push(e),b.current.length>10&&b.current.shift(),h(t=>[...t,{id:g(),role:"user",content:e,ts:(new Date).toISOString()}].slice(-o)),"live"===s)!n.connected||k.current.length>0?C(e):(n.send(e.replace(/\n/g,"\r")+"\r"),j());else if("waking"===s)C(e);else if("stopped"===s||"error"===s){C(e);const t=++E.current;l("waking"),uS(i).then(()=>{t===E.current&&(S.current&&clearTimeout(S.current),l("live"))}).catch(e=>{t===E.current&&(tN.error(`启动失败: ${e instanceof Error?e.message:String(e)}`),l("error"),k.current=[])}),S.current=setTimeout(()=>{t===E.current&&k.current.length>0&&(tN.error("启动超时(10s)"),l("error"),k.current=[])},1e4)}},[s,n,i,g,o,j,C]),N=W.useCallback(e=>{const t=e.replace(/\r$/,"").trim();t&&(b.current.push(t),b.current.length>10&&b.current.shift(),h(e=>[...e,{id:g(),role:"user",content:t,ts:(new Date).toISOString()}].slice(-o)))},[g,o]),T=W.useMemo(()=>{const e=new Set;for(const t of p)t.id&&e.add(t.id);return[...u.filter(t=>!t.id||!e.has(t.id)),...p]},[u,p]);return{state:s,setState:l,messages:T,historyMessages:u,displayMessages:p,setDisplayMessages:h,hasMoreHistory:c,loadMoreHistory:f,reloadHistory:d,liveReceivedRef:x,sendMessage:P,appendUserMessage:N,clearSendRetry:y,isWaking:"waking"===s,isRunning:"live"===s}}function rT(e,t,n){const r=W.useRef(!0),o=W.useRef(0),a=W.useCallback(()=>{const t=e.current;t&&(o.current=performance.now(),t.scrollTop=t.scrollHeight)},[e]);return W.useEffect(()=>{const t=e.current;if(!t)return;const n=()=>{if(performance.now()-o.current<80)return;const e=t.scrollHeight-t.scrollTop-t.clientHeight<80;r.current=e};return t.addEventListener("scroll",n,{passive:!0}),()=>t.removeEventListener("scroll",n)},[e]),W.useLayoutEffect(()=>{r.current&&a()},[a,...n]),W.useEffect(()=>{const e=t.current;if(!e)return;const n=new ResizeObserver(()=>{r.current&&a()});return n.observe(e),()=>n.disconnect()},[t,a]),{pinnedRef:r,scrollToBottom:a}}function oT(e,t="shift"){return W.useCallback(n=>{if("Enter"!==n.key)return;if(n.nativeEvent.isComposing||229===n.keyCode)return;("shift"===t?!n.shiftKey:n.shiftKey)&&(n.preventDefault(),e())},[e,t])}const aT=H.memo(function({project:e,externalStatus:t,active:n=!1}){const r=cf(),[o,a]=W.useState(""),[i,s]=W.useState(!1),l=W.useRef(null),u=W.useRef(null),[c,d]=W.useState([]),f=W.useRef(0),p=W.useCallback(e=>{d(t=>{const n=[...t,e];return n.length>200?n.slice(-200):n}),"assistant"===e.role&&(s(!0),setTimeout(()=>s(!1),1e3))},[]),h=W.useCallback(e=>{var t;"stopped"===e&&(null==(t=S.current)||t.call(S,"stopped"))},[]),{sendInput:m,connected:g}=CN({projectId:e.id,enabled:!0,onChatMessage:p,onStatusChange:h}),{state:v,setState:y,messages:b,sendMessage:x,isRunning:w,isWaking:k}=nT({project:e,liveMessages:c,ws:{send:m,connected:g},historyLimit:4,liveWindow:4}),S=W.useRef(y);S.current=y,W.useEffect(()=>{"stopped"===v&&(d([]),f.current=0)},[v]),W.useEffect(()=>{t&&("running"!==t||"stopped"!==v&&"error"!==v?"stopped"===t&&"live"===v&&y("stopped"):(d([]),y("live")))},[t]),rT(l,u,[b]);const E=oT(W.useCallback(()=>{const e=o.trim();e&&(a(""),x(e))},[o,x]),"enter"),j="stopped"===v,C=b.slice(-4),P=ee.jsxs("div",{className:sk("flex flex-col h-full rounded-lg overflow-hidden bg-background transition-colors duration-300",n?"border-transparent bg-transparent shadow-none":i?"border border-blue-500":"border border-border","error"===v&&"border border-red-500/50"),children:[ee.jsxs("div",{className:"flex items-center gap-1 px-1.5 py-1.5 border-b border-border bg-muted/30 transition-colors",children:[ee.jsx(UE,{className:"h-3.5 w-3.5 text-muted-foreground/40 flex-shrink-0 cursor-grab active:cursor-grabbing"}),ee.jsx("span",{className:"font-medium text-sm truncate flex-1 cursor-pointer hover:text-blue-400 transition-colors",onClick:()=>r(`/projects/${e.id}`),title:"打开项目详情",children:e.name}),ee.jsx("span",{className:"text-[10px] text-muted-foreground font-mono",children:e.cliTool??"claude"}),ee.jsx("span",{className:sk("w-2 h-2 rounded-full flex-shrink-0",w?"bg-green-500":k?"bg-yellow-400 animate-pulse":"bg-zinc-400")})]}),ee.jsx("div",{ref:l,className:"flex-1 overflow-y-auto min-h-0 text-xs",children:ee.jsxs("div",{ref:u,className:"p-2 space-y-2 min-h-full",children:[C.map(e=>{const t="user"===e.role;return ee.jsx("div",{className:sk("flex",t?"justify-end":"justify-start"),children:ee.jsx("div",{className:sk("max-w-[85%] rounded-lg px-2.5 py-1.5 whitespace-pre-wrap break-words leading-relaxed",t?"bg-blue-500/15 text-foreground border border-blue-500/20 rounded-br-sm dark:bg-blue-500/20 dark:border-blue-500/25":"bg-secondary text-secondary-foreground border border-border rounded-bl-sm"),children:ee.jsx("div",{className:"line-clamp-6",children:e.content})})},e.id)}),j&&0===C.length&&ee.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground/40 text-xs",children:"无对话记录"}),k&&ee.jsx("div",{className:"flex items-center justify-center h-full text-yellow-400 text-xs animate-pulse",children:"启动中..."})]})}),ee.jsx("div",{className:"border-t border-border p-1.5",children:ee.jsx("input",{type:"text",value:o,onChange:e=>a(e.target.value),onKeyDown:E,disabled:k,placeholder:k?"启动中...":j?"输入命令(自动启动)... Shift+⏎":"输入命令... Shift+⏎",className:sk("w-full bg-transparent text-xs font-mono outline-none placeholder:text-muted-foreground/40 px-1.5 py-1",k&&"opacity-50 cursor-not-allowed")})})]});return n?ee.jsx("div",{className:"card-active-glow rounded-lg h-full",children:P}):P});function iT({projects:e,projectStatuses:t,activeProjectIds:n}){const r=W.useMemo(()=>e.filter(e=>!e.archived),[e]),{order:o,setOrder:a,applyOrder:i}=MN(),[s,l]=W.useState(null),[u,c]=W.useState(null),d=W.useRef(null),f=W.useMemo(()=>i(r),[r,i]),p=W.useCallback((e,t)=>{l(t),e.dataTransfer.effectAllowed="move";const n=document.createElement("div");n.style.width="1px",n.style.height="1px",n.style.opacity="0.01",document.body.appendChild(n),e.dataTransfer.setDragImage(n,0,0),d.current=n},[]),h=W.useCallback((e,t)=>{e.preventDefault(),e.dataTransfer.dropEffect="move",c(t)},[]),m=W.useCallback((e,t)=>{if(e.preventDefault(),!s||s===t)return l(null),void c(null);const n=f.map(e=>e.id),r=o.length?[...o]:n;for(const o of n)r.includes(o)||r.push(o);const i=r.indexOf(s),u=r.indexOf(t);if(-1===i||-1===u)return l(null),void c(null);r.splice(i,1),r.splice(u,0,s),a(r),l(null),c(null)},[s,f,o,a]),g=W.useCallback(()=>{l(null),c(null),d.current&&(d.current.remove(),d.current=null)},[]),{cols:v,rows:y}=(b=f.length)<=1?{cols:1,rows:1}:b<=2?{cols:2,rows:1}:b<=4?{cols:2,rows:2}:b<=6?{cols:3,rows:2}:b<=9?{cols:3,rows:3}:b<=12?{cols:4,rows:3}:{cols:4,rows:Math.ceil(b/4)};var b;if(0===f.length)return ee.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground/50 text-sm",children:"没有活跃项目"});const x=y<=3;return ee.jsx("div",{className:"h-full w-full p-2 gap-2 overflow-y-auto",style:{display:"grid",gridTemplateColumns:`repeat(${v}, minmax(0, 1fr))`,gridAutoRows:x?`minmax(180px, min(${Math.floor(100/y)}vh, 350px))`:"280px"},children:f.map(e=>ee.jsx("div",{draggable:!0,onDragStart:t=>p(t,e.id),onDragOver:t=>h(t,e.id),onDrop:t=>m(t,e.id),onDragEnd:g,className:sk("transition-all duration-200",s===e.id&&"opacity-40 scale-95",u===e.id&&s!==e.id&&"ring-2 ring-blue-500/50 rounded-lg"),children:ee.jsx(aT,{project:e,externalStatus:t.get(e.id),active:n.has(e.id)})},e.id))})}function sT(){const e=cf(),{projects:t,loading:n,error:r,hasFetched:o,fetchProjects:a,addProject:i,updateProject:s,removeProject:l}=Yk(),u=Hk(e=>e.clearToken),[c,d]=W.useState(!1),[f,p]=W.useState(!1),[h,m]=W.useState(new Set),g=W.useRef(new Map),[v,y]=W.useState(new Map),b=W.useRef(0),[x,w]=W.useState(!!document.fullscreenElement),[k,S]=W.useState(!1),[E,j]=Wk(Vk.monitorMode,!1,{parse:!0}),[C,P]=W.useState(new Map);W.useEffect(()=>{const e=()=>w(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),W.useEffect(()=>{a()},[a]);jN({onActivityUpdate:W.useCallback(e=>{if(e.status){const t=Yk.getState().projects.find(t=>t.id===e.projectId);t&&t.status!==e.status&&s({...t,status:e.status}),P(t=>{const n=new Map(t);return n.set(e.projectId,e.status),n})}const t=Date.now(),n=g.current;if(e.active){m(t=>t.has(e.projectId)?t:new Set(t).add(e.projectId));const r=n.get(e.projectId)??[];let o=!1;if(e.semantic){const n=r[r.length-1];`${e.semantic.phase}:${e.semantic.detail??""}`!==(n?`${n.phase}:${n.detail??""}`:"")?(r.push({id:b.current++,phase:e.semantic.phase,detail:e.semantic.detail,ts:t}),o=!0):n&&(n.ts=t)}const a=r.filter(e=>t-e.ts<8e3),i=a.length>3?a.slice(-3):a;i.length!==r.length&&(o=!0),n.set(e.projectId,i),o&&y(new Map(n))}else m(t=>{if(!t.has(e.projectId))return t;const n=new Set(t);return n.delete(e.projectId),n}),n.has(e.projectId)&&n.get(e.projectId).length>0&&(n.set(e.projectId,[]),y(new Map(n)))},[s])}),W.useEffect(()=>{const e=setInterval(()=>{const e=Date.now(),t=g.current;let n=!1;for(const[r,o]of t){const a=o.filter(t=>e-t.ts<8e3);a.length!==o.length&&(t.set(r,a),n=!0)}n&&y(new Map(t)),m(e=>{let n=!1;const r=new Set(e);for(const o of e){const e=t.get(o);e&&0!==e.length||(r.delete(o),n=!0)}return n?r:e})},3e3);return()=>clearInterval(e)},[]);const N=W.useMemo(()=>t.filter(e=>!e.archived),[t]),T=W.useMemo(()=>t.filter(e=>e.archived),[t]),M=W.useMemo(()=>Array.from(new Set(t.flatMap(e=>e.tags??[]))),[t]),[R,L]=W.useState([]),D=W.useMemo(()=>0===R.length?N:N.filter(e=>R.some(t=>{var n;return null==(n=e.tags)?void 0:n.includes(t)})),[N,R]),[_,A]=W.useState(!1),O=W.useCallback(async()=>{if(!_){A(!0);try{const e=await SE(),t=e.results.filter(e=>e.ok).length,n=e.results.filter(e=>e.skipped).length,r=e.total-t-n;tN.success(`同步完成:${t} 成功 / ${n} 跳过 / ${r} 失败`)}catch(ST){tN.error(`同步失败:${ST.message}`)}finally{A(!1)}}},[_]),{order:I,setOrder:z,applyOrder:F}=MN(),[V,$]=W.useState(null),[B,U]=W.useState(null),H=W.useMemo(()=>F(D),[D,F]),G=W.useCallback(e=>$(e),[]),Y=W.useCallback(()=>{$(null),U(null)},[]),q=W.useCallback((e,t)=>{e.preventDefault(),U(t)},[]),K=W.useCallback((e,t,n)=>{if(e.preventDefault(),!n||n===t)return void U(null);const r=H.map(e=>e.id),o=I.length?[...I]:r;for(const s of r)o.includes(s)||o.push(s);const a=o.indexOf(n),i=o.indexOf(t);if(-1===a||-1===i)return $(null),void U(null);o.splice(a,1),o.splice(i,0,n),z(o),$(null),U(null)},[H,I,z]),X={onDelete:e=>{(async e=>{try{await lS(e),l(e)}catch(ST){tN.error(ST instanceof Error?ST.message:"Failed to delete project")}})(e)},onArchive:e=>{(async e=>{try{const t=await cS(e);s(t)}catch(ST){tN.error(ST instanceof Error?ST.message:"Failed to archive project")}})(e)},onUnarchive:e=>{(async e=>{try{const t=await dS(e);s(t)}catch(ST){tN.error(ST instanceof Error?ST.message:"Failed to restore project")}})(e)},onUpdated:s};return ee.jsxs("div",{className:"min-h-screen bg-background",children:[ee.jsx("header",{className:"border-b sticky top-0 bg-background z-10",children:ee.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-14 flex items-center justify-between",children:[ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(sj,{className:"h-5 w-5"}),ee.jsxs("div",{children:[ee.jsx("span",{className:"font-semibold text-lg leading-tight block",children:"CC Web"}),ee.jsx("span",{className:"text-[10px] text-muted-foreground leading-none",children:QN})]})]}),ee.jsx(AN,{}),ee.jsx(Tk,{variant:"ghost",size:"sm",onClick:()=>e("/skillhub"),title:"CCWeb Hub",children:ee.jsx(aj,{className:"h-4 w-4"})}),ee.jsx(Tk,{variant:"ghost",size:"sm",onClick:()=>e("/mobile"),title:"手机界面",children:ee.jsx(oj,{className:"h-4 w-4"})}),ee.jsx(Tk,{variant:"ghost",size:"sm",onClick:()=>e("/settings"),title:"设置",children:ee.jsx(nj,{className:"h-4 w-4"})}),ee.jsx(Tk,{variant:"ghost",size:"sm",onClick:()=>j(!E),title:E?"卡片模式":"监控大屏",className:sk(E&&"text-blue-400 bg-blue-500/10"),children:E?ee.jsx(HE,{className:"h-4 w-4"}):ee.jsx(QE,{className:"h-4 w-4"})}),ee.jsx(Tk,{variant:"ghost",size:"sm",onClick:()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()},title:x?"Exit fullscreen":"Fullscreen",children:x?ee.jsx(KE,{className:"h-4 w-4"}):ee.jsx(qE,{className:"h-4 w-4"})}),ee.jsx(ZN,{}),ee.jsx(XN,{}),ee.jsx(WN,{}),ee.jsxs(Tk,{variant:"ghost",size:"sm",onClick:()=>{u(),e("/login")},children:[ee.jsx(YE,{className:"h-4 w-4 mr-2"}),"Logout"]})]})}),E&&ee.jsx("div",{className:"flex-1 min-h-0",children:ee.jsx(iT,{projects:t,projectStatuses:C,activeProjectIds:h})}),!E&&ee.jsxs("main",{className:"max-w-6xl mx-auto px-4 py-8",children:[ee.jsxs("div",{className:"flex items-center justify-between mb-6",children:[ee.jsxs("div",{children:[ee.jsx("h1",{className:"text-2xl font-bold",children:"Projects"}),ee.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Each project runs Claude CLI in a dedicated terminal session."})]}),ee.jsxs("div",{className:"flex gap-2",children:[ee.jsxs(Tk,{variant:"outline",onClick:()=>{O()},disabled:_,title:"通过 rsync 同步所有项目(在设置里配置服务器)",children:[_?ee.jsx(GE,{className:"h-4 w-4 mr-2 animate-spin"}):ee.jsx(FE,{className:"h-4 w-4 mr-2"}),"全部同步"]}),ee.jsxs(Tk,{variant:"outline",onClick:()=>p(!0),children:[ee.jsx(IE,{className:"h-4 w-4 mr-2"}),"Open Project"]}),ee.jsxs(Tk,{onClick:()=>d(!0),children:[ee.jsx(ej,{className:"h-4 w-4 mr-2"}),"New Project"]})]})]}),n&&!o&&ee.jsx("div",{className:"text-center text-muted-foreground py-12",children:"Loading projects..."}),r&&ee.jsx("div",{className:"text-center text-destructive py-12",children:r}),o&&!n&&!r&&0===t.length&&ee.jsxs("div",{className:"text-center py-20",children:[ee.jsx(sj,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),ee.jsx("h2",{className:"text-lg font-semibold mb-2",children:"No projects yet"}),ee.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:"Create a new project or open an existing one."}),ee.jsxs("div",{className:"flex gap-2 justify-center",children:[ee.jsxs(Tk,{variant:"outline",onClick:()=>p(!0),children:[ee.jsx(IE,{className:"h-4 w-4 mr-2"}),"Open Project"]}),ee.jsxs(Tk,{onClick:()=>d(!0),children:[ee.jsx(ej,{className:"h-4 w-4 mr-2"}),"New Project"]})]})]}),!n&&!r&&M.length>0&&ee.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-4",children:[M.map(e=>ee.jsxs("button",{onClick:()=>L(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),className:sk("px-2 py-0.5 rounded-full text-xs border transition-colors",R.includes(e)?"bg-blue-500/20 text-blue-400 border-blue-500/40":"bg-muted text-muted-foreground border-border hover:border-muted-foreground/40"),children:["#",e]},e)),R.length>0&&ee.jsx("button",{onClick:()=>L([]),className:"px-2 py-0.5 rounded-full text-xs text-muted-foreground hover:text-foreground transition-colors",children:"清除"})]}),!n&&!r&&H.length>0&&ee.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:H.map((e,t)=>ee.jsx(fw.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.3,delay:Math.min(.05*t,.3),ease:"easeOut"},draggable:!0,onDragStart:()=>G(e.id),onDragOver:t=>q(t,e.id),onDrop:t=>K(t,e.id,V),onDragEnd:Y,style:{opacity:V===e.id?.4:1,cursor:"grab"},className:sk(B===e.id&&V!==e.id&&"ring-2 ring-blue-500/50 rounded-xl"),children:ee.jsx(gN,{project:e,active:h.has(e.id),statusStack:v.get(e.id)??[],...X})},e.id))}),!n&&!r&&T.length>0&&ee.jsxs("div",{className:"mt-10",children:[ee.jsxs("button",{className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors mb-4 group",onClick:()=>S(e=>!e),children:[ee.jsx(fw.span,{animate:{rotate:k?90:0},transition:{duration:.2},children:ee.jsx(LE,{className:"h-4 w-4"})}),ee.jsx("span",{className:"font-medium",children:"Archived"}),ee.jsx("span",{className:"text-xs bg-muted rounded-full px-2 py-0.5",children:T.length})]}),ee.jsx(qb,{children:k&&ee.jsx(fw.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:ee.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:T.map(e=>ee.jsx(gN,{project:e,active:!1,...X},e.id))})})})]}),ee.jsx(FN,{})]}),ee.jsx(xN,{open:c,onOpenChange:d,onCreated:e=>{i(e)}}),ee.jsx(wN,{open:f,onOpenChange:p,onOpened:e=>{i(e)}})]})}class lT extends H.Component{constructor(){super(...arguments),t(this,"state",{hasError:!1,error:null}),t(this,"handleReset",()=>{var e,t;this.setState({hasError:!1,error:null}),null==(t=(e=this.props).onReset)||t.call(e)})}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("[ErrorBoundary]",e,t.componentStack),tN.error(e.message||"Something went wrong")}render(){return this.state.hasError?this.props.fallback?this.props.fallback:ee.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3 p-4 text-sm text-muted-foreground",children:[ee.jsx("p",{children:"出错了"}),ee.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 uT({plugin:e,onConfigChange:t,onClose:n}){const{float:r,userConfig:o}=e,[a,i]=W.useState(()=>{var e,t;return{x:(null==(e=o.floatPosition)?void 0:e.x)??.5*window.innerWidth-r.defaultWidth/2,y:(null==(t=o.floatPosition)?void 0:t.y)??.3*window.innerHeight}}),[s,l]=W.useState(()=>{var e,t;return{w:(null==(e=o.floatSize)?void 0:e.w)??r.defaultWidth,h:(null==(t=o.floatSize)?void 0:t.h)??r.defaultHeight}}),[u,c]=W.useState(!1),[d,f]=W.useState(100),p=W.useRef(null),h=W.useRef(null),m=W.useCallback(()=>{f(Date.now()%1e5+100)},[]),g=W.useRef(null),v=W.useCallback(n=>{n.preventDefault(),m(),g.current={sx:n.clientX,sy:n.clientY,ox:a.x,oy:a.y},h.current&&(h.current.style.pointerEvents="none");const r=e=>{if(!g.current)return;const t=Math.max(0,Math.min(window.innerWidth-100,g.current.ox+e.clientX-g.current.sx)),n=Math.max(0,Math.min(window.innerHeight-40,g.current.oy+e.clientY-g.current.sy));p.current&&(p.current.style.left=t+"px",p.current.style.top=n+"px")},o=n=>{if(!g.current)return;const a=Math.max(0,Math.min(window.innerWidth-100,g.current.ox+n.clientX-g.current.sx)),s=Math.max(0,Math.min(window.innerHeight-40,g.current.oy+n.clientY-g.current.sy));g.current=null,h.current&&(h.current.style.pointerEvents=""),i({x:a,y:s}),t(e.id,{floatPosition:{x:a,y:s}}),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",o)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",o)},[a,m,e.id,t]),y=W.useRef(null),b=W.useCallback(n=>{if(!r.resizable)return;n.preventDefault(),n.stopPropagation(),m(),y.current={sx:n.clientX,sy:n.clientY,ow:s.w,oh:s.h},h.current&&(h.current.style.pointerEvents="none");const o=r.minWidth??150,a=r.minHeight??100,i=e=>{if(!y.current)return;const t=Math.max(o,y.current.ow+e.clientX-y.current.sx),n=Math.max(a,y.current.oh+e.clientY-y.current.sy);p.current&&(p.current.style.width=t+"px",p.current.style.height=n+"px")},u=n=>{if(!y.current)return;const r=Math.max(o,y.current.ow+n.clientX-y.current.sx),s=Math.max(a,y.current.oh+n.clientY-y.current.sy);y.current=null,h.current&&(h.current.style.pointerEvents=""),l({w:r,h:s}),t(e.id,{floatSize:{w:r,h:s}}),window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",u)};window.addEventListener("mousemove",i),window.addEventListener("mouseup",u)},[s,r,m,e.id,t]);W.useEffect(()=>{const t=async t=>{var n,r,o,a,i;if(t.source!==(null==(n=h.current)?void 0:n.contentWindow))return;const{callId:s,method:l,args:u}=t.data;if(s&&l)try{const t=Xk(),n={"Content-Type":"application/json","X-Plugin-Id":e.id};let a,i;if(t&&(n.Authorization=`Bearer ${t}`),"storage:get"===l)a=`/api/plugin-bridge/storage/${e.id}`,i={method:"GET",headers:n};else if("storage:set"===l)a=`/api/plugin-bridge/storage/${e.id}`,i={method:"PUT",headers:n,body:JSON.stringify(u)};else{const t={"project:status":{path:`/api/plugin-bridge/project/status/${u.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/${u.projectId}`,httpMethod:"GET"},"system:info":{path:"/api/plugin-bridge/system/info",httpMethod:"GET"}};if("backend:api"===l){const{method:t,path:r,body:o}=u;if(!r||!r.startsWith("/")||r.includes(".."))throw new Error("Invalid API path");a=`/api/plugins/${e.id}${r}`,i={method:t||"GET",headers:n},!o||"POST"!==t&&"PUT"!==t||(i.body=JSON.stringify(o))}else{const e=t[l];if(!e)throw new Error(`Unknown method: ${l}`);a=e.path,i={method:e.httpMethod,headers:n},"POST"===e.httpMethod&&(i.body=JSON.stringify(u))}}const c=await fetch(a,i),d=await c.json();null==(o=null==(r=h.current)?void 0:r.contentWindow)||o.postMessage({callId:s,result:d,error:null},window.location.origin)}catch(ST){const t=ST instanceof Error?ST.message:"Bridge error";null==(i=null==(a=h.current)?void 0:a.contentWindow)||i.postMessage({callId:s,result:null,error:t},window.location.origin)}};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},[e.id]);const x=o.clickable??r.clickable.default,w=`/plugins/${e.id}/${e.float?"index.html":""}`;return ee.jsxs(fw.div,{ref:p,className:sk("fixed rounded-lg border border-border shadow-xl overflow-hidden flex flex-col","bg-background/95 backdrop-blur-sm"),style:{left:a.x,top:a.y,width:u?200:s.w,height:u?32:s.h,zIndex:d},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},onMouseDown:m,children:[ee.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:v,children:[ee.jsx(BE,{className:"h-3 w-3 text-muted-foreground/40 flex-shrink-0"}),ee.jsx("span",{className:"text-xs text-muted-foreground truncate flex-1",children:e.name}),ee.jsx("button",{onClick:()=>c(e=>!e),className:"p-0.5 rounded hover:bg-white/10 text-muted-foreground/60 hover:text-foreground transition-colors",children:ee.jsx(XE,{className:"h-3 w-3"})}),ee.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:ee.jsx(dj,{className:"h-3 w-3"})})]}),!u&&ee.jsxs("div",{className:"flex-1 min-h-0 relative",children:[ee.jsx("iframe",{ref:h,src:w,sandbox:"allow-scripts allow-same-origin",className:"w-full h-full border-0",style:{pointerEvents:x?"auto":"none"}}),r.resizable&&ee.jsx("div",{className:"absolute bottom-0 right-0 w-3 h-3 cursor-se-resize",onMouseDown:b,children:ee.jsxs("svg",{viewBox:"0 0 12 12",className:"w-3 h-3 text-muted-foreground/30",children:[ee.jsx("path",{d:"M11 1v10H1",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),ee.jsx("path",{d:"M11 5v6H5",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})]})})]})]})}function cT({plugins:e,onPluginsChange:t,onClose:n}){const r=W.useCallback(async(e,n)=>{t(t=>t.map(t=>t.id===e?{...t,userConfig:{...t.userConfig,...n}}:t));try{await mE(e,n)}catch{}},[t]);return 0===e.length?null:ee.jsx(qb,{children:e.map(e=>ee.jsx(uT,{plugin:e,onConfigChange:r,onClose:n},e.id))})}function dT({onTogglePlugin:e,activeIds:t}){const[n,r]=W.useState([]);return W.useEffect(()=>{fE().then(e=>r(e.filter(e=>e.enabled))).catch(()=>r([]))},[]),W.useEffect(()=>{const e=()=>{fE().then(e=>r(e.filter(e=>e.enabled))).catch(()=>{})};return window.addEventListener("focus",e),()=>window.removeEventListener("focus",e)},[]),0===n.length?null:ee.jsx("div",{className:"fixed top-14 left-1/2 -translate-x-1/2 z-40 pointer-events-none",children:ee.jsx(fw.div,{className:"pointer-events-auto flex items-center gap-1 px-2 py-1 rounded-full bg-background/60 backdrop-blur-md border border-border/50 shadow-lg",initial:{opacity:0,y:-8},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},children:n.map(n=>{const r=t.has(n.id),o=n.name.slice(0,2);return ee.jsxs(fw.button,{onClick:()=>e(n),className:sk("relative flex items-center justify-center w-7 h-7 rounded-full text-[10px] font-medium transition-colors",r?"bg-blue-500/20 text-blue-400":"text-muted-foreground/70 hover:text-foreground hover:bg-muted/80"),whileHover:{scale:1.12},whileTap:{scale:.92},title:n.name+(n.description?` — ${n.description}`:""),children:[o,ee.jsx(qb,{children:r&&ee.jsx(fw.span,{className:"absolute -bottom-0.5 left-1/2 -translate-x-1/2 h-1 w-1 rounded-full bg-blue-400",initial:{scale:0},animate:{scale:1},exit:{scale:0}})})]},n.id)})})})}const fT=H.lazy(()=>fd(()=>import("./ProjectPage-D23Cx4LX.js").then(e=>e.P),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.ProjectPage}))),pT=H.lazy(()=>fd(()=>import("./SettingsPage-CTTCafJA.js"),__vite__mapDeps([9,6,3,4])).then(e=>({default:e.SettingsPage}))),hT=H.lazy(()=>fd(()=>import("./SkillHubPage-BBWaNxzY.js"),__vite__mapDeps([10,7,3])).then(e=>({default:e.SkillHubPage}))),mT=H.lazy(()=>fd(()=>import("./MobilePage-8bMFdgD9.js"),__vite__mapDeps([11,2,3,4,5])).then(e=>({default:e.MobilePage})));function gT(){return ee.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:ee.jsx("span",{className:"text-muted-foreground text-sm",children:"Loading…"})})}function vT({children:e}){const[t,n]=W.useState(!1),r=Hk(e=>e.token),o=Hk(e=>e.setToken);return W.useEffect(()=>{r?n(!0):eS()?tS().then(e=>o(e)).catch(()=>{}).finally(()=>n(!0)):n(!0)},[]),t||r?r?ee.jsx(ee.Fragment,{children:e}):ee.jsx(wf,{to:"/login",replace:!0}):null}const yT=window.matchMedia("(pointer: coarse)").matches&&window.innerWidth<768;function bT(){const[e,t]=W.useState([]),[n,r]=W.useState(()=>{try{return new Set(JSON.parse(localStorage.getItem("cc_plugin_open")||"[]"))}catch{return new Set}}),o=lf();W.useEffect(()=>{fE().then(t).catch(()=>t([]))},[]);const a=W.useCallback(e=>{r(t=>{const n=new Set(t);n.has(e.id)?n.delete(e.id):n.add(e.id);try{localStorage.setItem("cc_plugin_open",JSON.stringify([...n]))}catch{}return n})},[]),i=W.useCallback(e=>{r(t=>{const n=new Set(t);n.delete(e);try{localStorage.setItem("cc_plugin_open",JSON.stringify([...n]))}catch{}return n})},[]),s=function(e){if("/"===e||"/dashboard"===e)return{type:"dashboard"};const t=e.match(/^\/projects?\/([^/]+)/);return t?{type:"project",projectId:t[1]}:{type:"other"}}(o.pathname),l=e.filter(e=>{if(!e.enabled||!n.has(e.id))return!1;switch(e.userConfig.scope??e.float.scope.default){case"global":return!0;case"dashboard":return"dashboard"===s.type;case"project":return"project"===s.type;case"project:specific":return"project"===s.type&&(e.userConfig.projectIds??[]).includes(s.projectId??"");default:return!1}}),u="/login"===o.pathname,c="/mobile"===o.pathname;return ee.jsxs(ee.Fragment,{children:[!u&&!c&&!yT&&ee.jsx(dT,{onTogglePlugin:a,activeIds:n}),ee.jsx(cT,{plugins:l,onPluginsChange:t,onClose:i})]})}function xT({children:e}){const t=lf();return yT&&"/"===t.pathname?ee.jsx(wf,{to:"/mobile",replace:!0}):ee.jsx(ee.Fragment,{children:e})}function wT(){return ee.jsx(BN,{children:ee.jsxs(dN,{children:[ee.jsx(uN,{richColors:!0,position:"bottom-right"}),ee.jsx(qN,{}),ee.jsx(KN,{}),ee.jsx(lT,{children:ee.jsxs(Pf,{children:[ee.jsx(bT,{}),ee.jsx(xT,{children:ee.jsx(W.Suspense,{fallback:ee.jsx(gT,{}),children:ee.jsxs(Ef,{children:[ee.jsx(kf,{path:"/login",element:ee.jsx(jE,{})}),ee.jsx(kf,{path:"/",element:ee.jsx(vT,{children:ee.jsx(sT,{})})}),ee.jsx(kf,{path:"/projects/:id",element:ee.jsx(vT,{children:ee.jsx(fT,{})})}),ee.jsx(kf,{path:"/settings",element:ee.jsx(vT,{children:ee.jsx(pT,{})})}),ee.jsx(kf,{path:"/skillhub",element:ee.jsx(vT,{children:ee.jsx(hT,{})})}),ee.jsx(kf,{path:"/mobile",element:ee.jsx(vT,{children:ee.jsx(mT,{})})}),ee.jsx(kf,{path:"*",element:ee.jsx(wf,{to:"/",replace:!0})})]})})})]})})]})})}te.createRoot(document.getElementById("root")).render(ee.jsx(H.StrictMode,{children:ee.jsx(wT,{})}));export{Zj as $,qb as A,Tk as B,LE as C,DE as D,AE as E,IE as F,rE as G,oE as H,Mk as I,Wk as J,mk as K,Mj as L,KE as M,gj as N,Xj as O,ZE as P,Kj as Q,H as R,Vk as S,uj as T,gk as U,mj as V,Nj as W,dj as X,qC as Y,Tj as Z,fd as _,UN as a,wE as a$,$C as a0,Bj as a1,Oj as a2,rj as a3,gS as a4,fS as a5,fj as a6,$E as a7,zN as a8,bS as a9,YS as aA,uS as aB,EN as aC,AN as aD,yj as aE,vE as aF,nT as aG,cE as aH,uE as aI,rT as aJ,Uk as aK,dE as aL,df as aM,Yk as aN,sj as aO,Sj as aP,wj as aQ,ld as aR,BS as aS,WS as aT,GS as aU,lk as aV,uk as aW,ck as aX,fk as aY,bE as aZ,xE as a_,AP as aa,zP as ab,FP as ac,$P as ad,BP as ae,Ak as af,VP as ag,yS as ah,vS as ai,ES as aj,NS as ak,wS as al,jS as am,kS as an,CS as ao,SS as ap,PS as aq,aj as ar,cf as as,ME as at,hj as au,XN as av,WN as aw,GE as ax,FE as ay,kE as az,OS as b,SE as b0,GN as b1,ZS as b2,lj as b3,US as b4,qS as b5,XS as b6,JS as b7,HS as b8,QS as b9,KS as ba,eE as bb,fE as bc,pE as bd,hE as be,gE as bf,TS as bg,xS as bh,pS as bi,jN as bj,MN as bk,ZN as bl,QE as bm,CN as bn,oT as bo,OE as bp,MS as bq,Sv as br,jv as bs,kv as bt,r as bu,o as bv,yE as bw,a as bx,EE as by,PE as c,sk as d,qE as e,DS as f,Xk as g,$k as h,Kk as i,ee as j,LS as k,tj as l,zS as m,_S as n,VE as o,fw as p,tE as q,W as r,Bk as s,tN as t,pN as u,aE as v,IS as w,RE as x,ej as y,nE as z};
|